From f8f622157c174ba3facc088646484ccba99acc69 Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Mon, 4 Jun 2012 17:22:01 +0300 Subject: [PATCH] initial --- COPYING | 674 ++ COPYING.LESSER | 165 + README | 51 + TODO | 90 + bitmap.js | 51 + cursor.js | 92 + display.js | 673 ++ enums.js | 280 + inputs.js | 165 + lz.js | 158 + main.js | 176 + makequic | 8 + png.js | 256 + quic.c | 7364 ++++++++++++ quic.js | 27125 ++++++++++++++++++++++++++++++++++++++++++ quic.shell | 91 + spice.css | 116 + spice.html | 134 + spiceconn.js | 447 + spicedataview.js | 96 + spicemsg.js | 791 ++ spicetype.js | 455 + thirdparty/jsbn.js | 589 + thirdparty/prng4.js | 79 + thirdparty/rng.js | 102 + thirdparty/rsa.js | 146 + thirdparty/sha1.js | 346 + ticket.js | 250 + utils.js | 239 + wire.js | 123 + 30 files changed, 41332 insertions(+) create mode 100644 COPYING create mode 100644 COPYING.LESSER create mode 100644 README create mode 100644 TODO create mode 100644 bitmap.js create mode 100644 cursor.js create mode 100644 display.js create mode 100644 enums.js create mode 100644 inputs.js create mode 100644 lz.js create mode 100644 main.js create mode 100644 makequic create mode 100644 png.js create mode 100644 quic.c create mode 100644 quic.js create mode 100644 quic.shell create mode 100644 spice.css create mode 100644 spice.html create mode 100644 spiceconn.js create mode 100644 spicedataview.js create mode 100644 spicemsg.js create mode 100644 spicetype.js create mode 100644 thirdparty/jsbn.js create mode 100644 thirdparty/prng4.js create mode 100644 thirdparty/rng.js create mode 100644 thirdparty/rsa.js create mode 100644 thirdparty/sha1.js create mode 100644 ticket.js create mode 100644 utils.js create mode 100644 wire.js diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/COPYING.LESSER b/COPYING.LESSER new file mode 100644 index 0000000..65c5ca8 --- /dev/null +++ b/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/README b/README new file mode 100644 index 0000000..6e5c5a8 --- /dev/null +++ b/README @@ -0,0 +1,51 @@ +Prototype Spice Javascript client + +Instructions and status as of June 1, 2012. + +Requirements: + + 1. Modern Firefox or Chrome + + 2. A WebSocket proxy + + I've used websockify: + https://github.com/kanaka/websockify + works great. + + + 3. A spice server + + At this point, I've tested with qemu hosting + a Fedora image, a Vista image, and with Xspice. + Vista was pretty bad; I recommend either Linux or Xspice. + + ** Xspice has a processing issue; see this email: + http://lists.freedesktop.org/archives/spice-devel/2012-May/009020.html + + +Optional: + 1. A web server + + With firefox, you can just open file:///your-path-to-spice.html-here + + With Chrome, you have to set a secret config flag to do that, or + serve the files from a web server. + + +Steps: + + 1. Start the spice server + + 2. Start websockify; my command line looks like this: + ./websockify 5959 localhost:5900 + + 3. Fire up spice.html, set host + port + password, and click start + + +Status: + + The TODO file should be a fairly comprehensive list of tasks + required to make this client more fully functional. + + As of June 1, 2012, this client is a nifty proof of concept, + but a long way from being a useful production tool. diff --git a/TODO b/TODO new file mode 100644 index 0000000..fcb6ea2 --- /dev/null +++ b/TODO @@ -0,0 +1,90 @@ +Bugs: + + . In my latest Xorg/fluxbox theme test, I get flickering of title + windows, notably when you start up gimp. That seems new. + + . In Chrome, I've gotten it to get the parsing out of sync. + Not clear why or how to reproduce. I've added a javascript + alert to hopefully make finding it more possible. + A test case is really needed for it... + + . Drawing with Gimp is slow (lack of stream support?) + + . If using xspice, you can get two bugs; a complete stall + (until you do something on the X server), or losing the mouse. + Both are probably related to that the watch_add/watch_update_mask functionality + in the qxl driver doesn't work. A patch for that has been submitted + to spice-devel ('Actually process write watches in the wakeup handler'). + + +Medium Tasks: + + . Get the mouse event code out of spicemsg (and make spicemsg + *only* about messages) + + . Change the message processing to be able to handle + an array of ArrayBuffers so we don't have to + use the combine function, which is presumed slow. + + . Use the 'real' DataView if we have it + + . Remove main() from quic.c and respin it + - It's causing unneeded bloat and memory use. + + . Consider passing a status change event back to the front end + (e.g. indicators for numlock, connection status, all that jazz) + + . Try to further Improve mouse position sends + - We now discard motions when we're more than 2 * SPICE_INPUT_MOTION_ACK_BUNCH + from an ack, just like the gtk client + - Other idea 1: queue them and only send when idle, but collapse first? + - Other idea 2: Time limit motion events + + . The whole key code to scan code thing is awful and should be + taken out and shot...or revamped + + +Big Tasks: + + . Generate messages + enums from spice.proto + + . Video + Audio: + - Need either ogg or webm codec + - Probably need a codec other than celt 0.51 + - Need a way to feed stream into a media object + * Javascript uri? + * best would be Media Source Extensions draft, but only in Chrome so far + * some trick with createObjectUrl? see: + - http://dev.w3.org/2011/webrtc/editor/getusermedia.html + + . Explore clipboard + - Supporting it may require unpleasant hacks + + . Fully flesh out image type support; plt, glz, and jpeg/alpha are likely + to be real work + + . Fix the many limitations of Draw operation support (clipping, masking, + scaling, and so on) + + . Implement direct websocket support for the spice server + + . Profile the whole mess + - Initial profiling suggests image decompression is the big hog + + . Quic: faster implementations + * current implementation is approximately 13x slower + than equivalent C code. Should be able to do + much better than that. + + . Implement agent support + + . Build a test suite for measuring performance + - Latency, bandwidth, packet loss + - But how to quantify 'feel'? + - Suggestion: recordmydesktop to capture videos + Use something like cxtest to create scripts + Do this with varying latency/bandwidth, etc + We can play videos side by side + And potentially use tool like MSU Video Quality Measurement Tool + (SSIM is the concept for measuring how much frames differ) + - Key metric - how much cpu / memory / bandwidth per 'active' user diff --git a/bitmap.js b/bitmap.js new file mode 100644 index 0000000..03f5127 --- /dev/null +++ b/bitmap.js @@ -0,0 +1,51 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + + +/*---------------------------------------------------------------------------- +** bitmap.js +** Handle SPICE_IMAGE_TYPE_BITMAP +**--------------------------------------------------------------------------*/ +function convert_spice_bitmap_to_web(context, spice_bitmap) +{ + var ret; + var offset, x; + var u8 = new Uint8Array(spice_bitmap.data); + if (spice_bitmap.format != SPICE_BITMAP_FMT_32BIT && + spice_bitmap.format != SPICE_BITMAP_FMT_RGBA) + return undefined; + + ret = context.createImageData(spice_bitmap.x, spice_bitmap.y); + for (offset = 0; offset < (spice_bitmap.y * spice_bitmap.stride); ) + for (x = 0; x < spice_bitmap.x; x++, offset += 4) + { + ret.data[offset + 0 ] = u8[offset + 2]; + ret.data[offset + 1 ] = u8[offset + 1]; + ret.data[offset + 2 ] = u8[offset + 0]; + + // FIXME - We effectively treat all images as having SPICE_IMAGE_FLAGS_HIGH_BITS_SET + if (spice_bitmap.format == SPICE_BITMAP_FMT_32BIT) + ret.data[offset + 3] = 255; + else + ret.data[offset + 3] = u8[offset]; + } + + return ret; +} diff --git a/cursor.js b/cursor.js new file mode 100644 index 0000000..e3f6e0e --- /dev/null +++ b/cursor.js @@ -0,0 +1,92 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + + +/*---------------------------------------------------------------------------- +** SpiceCursorConn +** Drive the Spice Cursor Channel +**--------------------------------------------------------------------------*/ +function SpiceCursorConn() +{ + SpiceConn.apply(this, arguments); +} + +SpiceCursorConn.prototype = Object.create(SpiceConn.prototype); +SpiceCursorConn.prototype.process_channel_message = function(msg) +{ + if (msg.type == SPICE_MSG_CURSOR_INIT) + { + var cursor_init = new SpiceMsgCursorInit(msg.data); + DEBUG > 1 && console.log("SpiceMsgCursorInit"); + if (this.parent && this.parent.inputs && + this.parent.inputs.mouse_mode == SPICE_MOUSE_MODE_SERVER) + { + // FIXME - this imagines that the server actually + // provides the current cursor position, + // instead of 0,0. As of May 11, 2012, + // that assumption was false :-(. + this.parent.inputs.mousex = cursor_init.position.x; + this.parent.inputs.mousey = cursor_init.position.y; + } + // FIXME - We don't handle most of the parameters here... + return true; + } + + if (msg.type == SPICE_MSG_CURSOR_SET) + { + var cursor_set = new SpiceMsgCursorSet(msg.data); + DEBUG > 1 && console.log("SpiceMsgCursorSet"); + if (cursor_set.flags & SPICE_CURSOR_FLAGS_NONE) + { + document.getElementById(this.parent.screen_id).style.cursor = "none"; + return true; + } + + if (cursor_set.flags > 0) + this.log_warn("FIXME: No support for cursor flags " + cursor_set.flags); + + if (cursor_set.cursor.header.type != SPICE_CURSOR_TYPE_ALPHA) + { + this.log_warn("FIXME: No support for cursor type " + cursor_set.cursor.header.type); + return false; + } + + this.set_cursor(cursor_set.cursor); + + return true; + } + + if (msg.type == SPICE_MSG_CURSOR_HIDE) + { + DEBUG > 1 && console.log("SpiceMsgCursorHide"); + document.getElementById(this.parent.screen_id).style.cursor = "none"; + return true; + } + + return false; +} + +SpiceCursorConn.prototype.set_cursor = function(cursor) +{ + var pngstr = create_rgba_png(cursor.header.height, cursor.header.width, cursor.data); + var curstr = 'url(data:image/png,' + pngstr + ') ' + + cursor.header.hot_spot_x + ' ' + cursor.header.hot_spot_y + ", default"; + document.getElementById(this.parent.screen_id).style.cursor = curstr; +} diff --git a/display.js b/display.js new file mode 100644 index 0000000..3efabb1 --- /dev/null +++ b/display.js @@ -0,0 +1,673 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + + +/*---------------------------------------------------------------------------- +** FIXME: putImageData does not support Alpha blending +** or compositing. So if we have data in an ImageData +** format, we have to draw it onto a context, +** and then use drawImage to put it onto the target, +** as drawImage does alpha. +**--------------------------------------------------------------------------*/ +function putImageDataWithAlpha(context, d, x, y) +{ + var c = document.createElement("canvas"); + var t = c.getContext("2d"); + c.setAttribute('width', d.width); + c.setAttribute('height', d.height); + t.putImageData(d, 0, 0); + context.drawImage(c, x, y, d.width, d.height); +} + +/*---------------------------------------------------------------------------- +** FIXME: Spice will send an image with '0' alpha when it is intended to +** go on a surface w/no alpha. So in that case, we have to strip +** out the alpha. The test case for this was flux box; in a Xspice +** server, right click on the desktop to get the menu; the top bar +** doesn't paint/highlight correctly w/out this change. +**--------------------------------------------------------------------------*/ +function stripAlpha(d) +{ + var i; + for (i = 0; i < (d.width * d.height * 4); i += 4) + d.data[i + 3] = 255; +} + +// FIXME - this is a hack for quic.js, I should fix this... +var global_ctx; + +/*---------------------------------------------------------------------------- +** SpiceDisplayConn +** Drive the Spice Display Channel +**--------------------------------------------------------------------------*/ +function SpiceDisplayConn() +{ + SpiceConn.apply(this, arguments); +} + +SpiceDisplayConn.prototype = Object.create(SpiceConn.prototype); +SpiceDisplayConn.prototype.process_channel_message = function(msg) +{ + if (msg.type == SPICE_MSG_DISPLAY_MARK) + { + // FIXME - DISPLAY_MARK not implemented (may be hard or impossible) + this.known_unimplemented(msg.type, "Display Mark"); + return true; + } + + if (msg.type == SPICE_MSG_DISPLAY_RESET) + { + DEBUG > 2 && console.log("Display reset"); + this.surfaces[this.primary_surface].canvas.context.restore(); + return true; + } + + if (msg.type == SPICE_MSG_DISPLAY_DRAW_COPY) + { + var draw_copy = new SpiceMsgDisplayDrawCopy(msg.data); + + DEBUG > 1 && this.log_draw("DrawCopy", draw_copy); + + if (! draw_copy.base.box.is_same_size(draw_copy.data.src_area)) + this.log_warn("FIXME: DrawCopy src_area is a different size than base.box; we do not handle that yet."); + if (draw_copy.base.clip.type != SPICE_CLIP_TYPE_NONE) + this.log_warn("FIXME: DrawCopy we don't handle clipping yet"); + if (draw_copy.data.rop_descriptor != SPICE_ROPD_OP_PUT) + this.log_warn("FIXME: DrawCopy we don't handle ropd type: " + draw_copy.data.rop_descriptor); + if (draw_copy.data.mask.flags) + this.log_warn("FIXME: DrawCopy we don't handle mask flag: " + draw_copy.data.mask.flags); + if (draw_copy.data.mask.bitmap) + this.log_warn("FIXME: DrawCopy we don't handle mask"); + + if (draw_copy.data && draw_copy.data.src_bitmap) + { + if (draw_copy.data.src_bitmap.descriptor.flags && + draw_copy.data.src_bitmap.descriptor.flags != SPICE_IMAGE_FLAGS_CACHE_ME && + draw_copy.data.src_bitmap.descriptor.flags != SPICE_IMAGE_FLAGS_HIGH_BITS_SET) + { + this.log_warn("FIXME: DrawCopy unhandled image flags: " + draw_copy.data.src_bitmap.descriptor.flags); + DEBUG <= 1 && this.log_draw("DrawCopy", draw_copy); + } + + if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_QUIC) + { + if (! draw_copy.data.src_bitmap.quic) + { + this.log_warn("FIXME: DrawCopy could not handle this QUIC file."); + return false; + } + + return this.draw_copy_helper( + { base: draw_copy.base, + src_area: draw_copy.data.src_area, + image_data: draw_copy.data.src_bitmap.quic.imgData, + tag: "copyquic." + draw_copy.data.src_bitmap.quic.type, + has_alpha: (draw_copy.data.src_bitmap.quic.type == QUIC_IMAGE_TYPE_RGBA ? true : false) , + descriptor : draw_copy.data.src_bitmap.descriptor + }); + } + else if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_FROM_CACHE || + draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_FROM_CACHE_LOSSLESS) + { + if (! this.cache || ! this.cache[draw_copy.data.src_bitmap.descriptor.id]) + { + this.log_warn("FIXME: DrawCopy did not find image id " + draw_copy.data.src_bitmap.descriptor.id + " in cache."); + return false; + } + + return this.draw_copy_helper( + { base: draw_copy.base, + src_area: draw_copy.data.src_area, + image_data: this.cache[draw_copy.data.src_bitmap.descriptor.id], + tag: "copycache." + draw_copy.data.src_bitmap.descriptor.id, + has_alpha: true, /* FIXME - may want this to be false... */ + descriptor : draw_copy.data.src_bitmap.descriptor + }); + + /* FIXME - LOSSLESS CACHE ramifications not understood or handled */ + } + else if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_SURFACE) + { + var source_context = this.surfaces[draw_copy.data.src_bitmap.surface_id].canvas.context; + var target_context = this.surfaces[draw_copy.base.surface_id].canvas.context; + + var source_img = source_context.getImageData( + draw_copy.data.src_area.left, draw_copy.data.src_area.top, + draw_copy.data.src_area.right - draw_copy.data.src_area.left, + draw_copy.data.src_area.bottom - draw_copy.data.src_area.top); + var computed_src_area = new SpiceRect; + computed_src_area.top = computed_src_area.left = 0; + computed_src_area.right = source_img.width; + computed_src_area.bottom = source_img.height; + + /* FIXME - there is a potential optimization here. + That is, if the surface is from 0,0, and + both surfaces are alpha surfaces, you should + be able to just do a drawImage, which should + save time. */ + + return this.draw_copy_helper( + { base: draw_copy.base, + src_area: computed_src_area, + image_data: source_img, + tag: "copysurf." + draw_copy.data.src_bitmap.surface_id, + has_alpha: this.surfaces[draw_copy.data.src_bitmap.surface_id].format == SPICE_SURFACE_FMT_32_xRGB ? false : true, + descriptor : draw_copy.data.src_bitmap.descriptor + }); + + return true; + } + else if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_JPEG) + { + if (! draw_copy.data.src_bitmap.jpeg) + { + this.log_warn("FIXME: DrawCopy could not handle this JPEG file."); + return false; + } + + // FIXME - how lame is this. Be have it in binary format, and we have + // to put it into string to get it back into jpeg. Blech. + var tmpstr = "data:image/jpeg,"; + var img = new Image; + var i; + var qdv = new Uint8Array(draw_copy.data.src_bitmap.jpeg.data); + for (i = 0; i < qdv.length; i++) + { + tmpstr += '%'; + if (qdv[i] < 16) + tmpstr += '0'; + tmpstr += qdv[i].toString(16); + } + + img.o = + { base: draw_copy.base, + tag: "jpeg." + draw_copy.data.src_bitmap.surface_id, + descriptor : draw_copy.data.src_bitmap.descriptor, + sc : this, + }; + img.onload = handle_draw_jpeg_onload; + img.src = tmpstr; + + return true; + } + else if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_BITMAP) + { + var canvas = this.surfaces[draw_copy.base.surface_id].canvas; + if (! draw_copy.data.src_bitmap.bitmap) + { + this.log_err("null bitmap"); + return false; + } + + var source_img = convert_spice_bitmap_to_web(canvas.context, + draw_copy.data.src_bitmap.bitmap); + if (! source_img) + { + this.log_warn("FIXME: Unable to interpret bitmap of format: " + + draw_copy.data.src_bitmap.bitmap.format); + return false; + } + + return this.draw_copy_helper( + { base: draw_copy.base, + src_area: draw_copy.data.src_area, + image_data: source_img, + tag: "bitmap." + draw_copy.data.src_bitmap.bitmap.format, + has_alpha: draw_copy.data.src_bitmap.bitmap == SPICE_BITMAP_FMT_32BIT ? false : true, + descriptor : draw_copy.data.src_bitmap.descriptor + }); + } + else if (draw_copy.data.src_bitmap.descriptor.type == SPICE_IMAGE_TYPE_LZ_RGB) + { + var canvas = this.surfaces[draw_copy.base.surface_id].canvas; + if (! draw_copy.data.src_bitmap.lz_rgb) + { + this.log_err("null lz_rgb "); + return false; + } + + if (draw_copy.data.src_bitmap.lz_rgb.top_down != 1) + this.log_warn("FIXME: Implement non top down support for lz_rgb"); + + var source_img = convert_spice_lz_rgb_to_web(canvas.context, + draw_copy.data.src_bitmap.lz_rgb); + if (! source_img) + { + this.log_warn("FIXME: Unable to interpret bitmap of type: " + + draw_copy.data.src_bitmap.lz_rgb.type); + return false; + } + + return this.draw_copy_helper( + { base: draw_copy.base, + src_area: draw_copy.data.src_area, + image_data: source_img, + tag: "lz_rgb." + draw_copy.data.src_bitmap.lz_rgb.type, + has_alpha: draw_copy.data.src_bitmap.lz_rgb.type == LZ_IMAGE_TYPE_RGBA ? true : false , + descriptor : draw_copy.data.src_bitmap.descriptor + }); + } + else + { + this.log_warn("FIXME: DrawCopy unhandled image type: " + draw_copy.data.src_bitmap.descriptor.type); + this.log_draw("DrawCopy", draw_copy); + return false; + } + } + + this.log_warn("FIXME: DrawCopy no src_bitmap."); + return false; + } + + if (msg.type == SPICE_MSG_DISPLAY_DRAW_FILL) + { + var draw_fill = new SpiceMsgDisplayDrawFill(msg.data); + + DEBUG > 1 && this.log_draw("DrawFill", draw_fill); + + if (draw_fill.data.rop_descriptor != SPICE_ROPD_OP_PUT) + this.log_warn("FIXME: DrawFill we don't handle ropd type: " + draw_fill.data.rop_descriptor); + if (draw_fill.data.mask.flags) + this.log_warn("FIXME: DrawFill we don't handle mask flag: " + draw_fill.data.mask.flags); + if (draw_fill.data.mask.bitmap) + this.log_warn("FIXME: DrawFill we don't handle mask"); + + if (draw_fill.data.brush.type == SPICE_BRUSH_TYPE_SOLID) + { + // FIXME - do brushes ever have alpha? + var color = draw_fill.data.brush.color & 0xffffff; + var color_str = "rgb(" + (color >> 16) + ", " + ((color >> 8) & 0xff) + ", " + (color & 0xff) + ")"; + this.surfaces[draw_fill.base.surface_id].canvas.context.fillStyle = color_str; + + this.surfaces[draw_fill.base.surface_id].canvas.context.fillRect( + draw_fill.base.box.left, draw_fill.base.box.top, + draw_fill.base.box.right - draw_fill.base.box.left, + draw_fill.base.box.bottom - draw_fill.base.box.top); + + if (DUMP_DRAWS && this.parent.dump_id) + { + var debug_canvas = document.createElement("canvas"); + debug_canvas.setAttribute('width', this.surfaces[draw_fill.base.surface_id].canvas.width); + debug_canvas.setAttribute('height', this.surfaces[draw_fill.base.surface_id].canvas.height); + debug_canvas.setAttribute('id', "fillbrush." + draw_fill.base.surface_id + "." + this.surfaces[draw_fill.base.surface_id].draw_count); + debug_canvas.getContext("2d").fillStyle = color_str; + debug_canvas.getContext("2d").fillRect( + draw_fill.base.box.left, draw_fill.base.box.top, + draw_fill.base.box.right - draw_fill.base.box.left, + draw_fill.base.box.bottom - draw_fill.base.box.top); + document.getElementById(this.parent.dump_id).appendChild(debug_canvas); + } + + this.surfaces[draw_fill.base.surface_id].draw_count++; + + } + else + { + this.log_warn("FIXME: DrawFill can't handle brush type: " + draw_fill.data.brush.type); + } + return true; + } + + if (msg.type == SPICE_MSG_DISPLAY_COPY_BITS) + { + var copy_bits = new SpiceMsgDisplayCopyBits(msg.data); + + DEBUG > 1 && this.log_draw("CopyBits", copy_bits); + + var source_canvas = this.surfaces[copy_bits.base.surface_id].canvas; + var source_context = source_canvas.context; + + var width = source_canvas.width - copy_bits.src_pos.x; + var height = source_canvas.height - copy_bits.src_pos.y; + if (width > (copy_bits.base.box.right - copy_bits.base.box.left)) + width = copy_bits.base.box.right - copy_bits.base.box.left; + if (height > (copy_bits.base.box.bottom - copy_bits.base.box.top)) + height = copy_bits.base.box.bottom - copy_bits.base.box.top; + + var source_img = source_context.getImageData( + copy_bits.src_pos.x, copy_bits.src_pos.y, width, height); + //source_context.putImageData(source_img, copy_bits.base.box.left, copy_bits.base.box.top); + putImageDataWithAlpha(source_context, source_img, copy_bits.base.box.left, copy_bits.base.box.top); + + if (DUMP_DRAWS && this.parent.dump_id) + { + var debug_canvas = document.createElement("canvas"); + debug_canvas.setAttribute('width', width); + debug_canvas.setAttribute('height', height); + debug_canvas.setAttribute('id', "copybits" + copy_bits.base.surface_id + "." + this.surfaces[copy_bits.base.surface_id].draw_count); + debug_canvas.getContext("2d").putImageData(source_img, 0, 0); + document.getElementById(this.parent.dump_id).appendChild(debug_canvas); + } + + + this.surfaces[copy_bits.base.surface_id].draw_count++; + return true; + } + + if (msg.type == SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES) + { + this.known_unimplemented(msg.type, "Inval All Palettes"); + return true; + } + + if (msg.type == SPICE_MSG_DISPLAY_SURFACE_CREATE) + { + if (! ("surfaces" in this)) + this.surfaces = []; + + var m = new SpiceMsgSurfaceCreate(msg.data); + DEBUG > 1 && console.log(this.type + ": MsgSurfaceCreate id " + m.surface.surface_id + + "; " + m.surface.width + "x" + m.surface.height + + "; format " + m.surface.format + + "; flags " + m.surface.flags); + if (m.surface.format != SPICE_SURFACE_FMT_32_xRGB && + m.surface.format != SPICE_SURFACE_FMT_32_ARGB) + { + this.log_warn("FIXME: cannot handle surface format " + m.surface.format + " yet."); + return false; + } + + var canvas = document.createElement("canvas"); + canvas.setAttribute('width', m.surface.width); + canvas.setAttribute('height', m.surface.height); + canvas.setAttribute('id', "spice_surface_" + m.surface.surface_id); + canvas.setAttribute('tabindex', m.surface.surface_id); + canvas.context = canvas.getContext("2d"); + + if (DUMP_CANVASES && this.parent.dump_id) + document.getElementById(this.parent.dump_id).appendChild(canvas); + + m.surface.canvas = canvas; + m.surface.draw_count = 0; + this.surfaces[m.surface.surface_id] = m.surface; + + if (m.surface.flags & SPICE_SURFACE_FLAGS_PRIMARY) + { + this.primary_surface = m.surface.surface_id; + + /* This .save() is done entirely to enable SPICE_MSG_DISPLAY_RESET */ + canvas.context.save(); + global_ctx = canvas.context; // FIXME - this is a hack entirely for the emscripten quic.js + document.getElementById(this.parent.screen_id).appendChild(canvas); + document.getElementById(this.parent.screen_id).setAttribute('width', m.surface.width); + document.getElementById(this.parent.screen_id).setAttribute('height', m.surface.height); + this.hook_events(); + } + return true; + } + + if (msg.type == SPICE_MSG_DISPLAY_SURFACE_DESTROY) + { + var m = new SpiceMsgSurfaceDestroy(msg.data); + DEBUG > 1 && console.log(this.type + ": MsgSurfaceDestroy id " + m.surface_id); + this.delete_surface(m.surface_id); + return true; + } + + + return false; +} + +SpiceDisplayConn.prototype.delete_surface = function(surface_id) +{ + var canvas = document.getElementById("spice_surface_" + surface_id); + if (DUMP_CANVASES && this.parent.dump_id) + document.getElementById(this.parent.dump_id).removeChild(canvas); + if (this.primary_surface == surface_id) + { + this.unhook_events(); + this.primary_surface = undefined; + document.getElementById(this.parent.screen_id).removeChild(canvas); + } + + delete this.surfaces[surface_id]; +} + + +SpiceDisplayConn.prototype.draw_copy_helper = function(o) +{ + + var canvas = this.surfaces[o.base.surface_id].canvas; + if (o.has_alpha) + { + /* FIXME - This is based on trial + error, not a serious thoughtful + analysis of what Spice requires. See display.js for more. */ + if (this.surfaces[o.base.surface_id].format == SPICE_SURFACE_FMT_32_xRGB) + { + stripAlpha(o.image_data); + canvas.context.putImageData(o.image_data, o.base.box.left, o.base.box.top); + } + else + putImageDataWithAlpha(canvas.context, o.image_data, + o.base.box.left, o.base.box.top); + } + else + canvas.context.putImageData(o.image_data, o.base.box.left, o.base.box.top); + + if (o.src_area.left > 0 || o.src_area.top > 0) + { + this.log_warn("FIXME: DrawCopy not shifting draw copies just yet..."); + } + + if (o.descriptor && (o.descriptor.flags & SPICE_IMAGE_FLAGS_CACHE_ME)) + { + if (! ("cache" in this)) + this.cache = []; + this.cache[o.descriptor.id] = o.image_data; + } + + if (DUMP_DRAWS && this.parent.dump_id) + { + var debug_canvas = document.createElement("canvas"); + debug_canvas.setAttribute('width', o.image_data.width); + debug_canvas.setAttribute('height', o.image_data.height); + debug_canvas.setAttribute('id', o.tag + "." + + this.surfaces[o.base.surface_id].draw_count + "." + + o.base.surface_id + "@" + o.base.box.left + "x" + o.base.box.top); + debug_canvas.getContext("2d").putImageData(o.image_data, 0, 0); + document.getElementById(this.parent.dump_id).appendChild(debug_canvas); + } + + this.surfaces[o.base.surface_id].draw_count++; + + return true; +} + + +SpiceDisplayConn.prototype.log_draw = function(prefix, draw) +{ + var str = prefix + "." + draw.base.surface_id + "." + this.surfaces[draw.base.surface_id].draw_count + ": "; + str += "base.box " + draw.base.box.left + ", " + draw.base.box.top + " to " + + draw.base.box.right + ", " + draw.base.box.bottom; + str += "; clip.type " + draw.base.clip.type; + + if (draw.data) + { + if (draw.data.src_area) + str += "; src_area " + draw.data.src_area.left + ", " + draw.data.src_area.top + " to " + + draw.data.src_area.right + ", " + draw.data.src_area.bottom; + + if (draw.data.src_bitmap && draw.data.src_bitmap != null) + { + str += "; src_bitmap id: " + draw.data.src_bitmap.descriptor.id; + str += "; src_bitmap width " + draw.data.src_bitmap.descriptor.width + ", height " + draw.data.src_bitmap.descriptor.height; + str += "; src_bitmap type " + draw.data.src_bitmap.descriptor.type + ", flags " + draw.data.src_bitmap.descriptor.flags; + if (draw.data.src_bitmap.surface_id !== undefined) + str += "; src_bitmap surface_id " + draw.data.src_bitmap.surface_id; + if (draw.data.src_bitmap.quic) + str += "; QUIC type " + draw.data.src_bitmap.quic.type + + "; width " + draw.data.src_bitmap.quic.width + + "; height " + draw.data.src_bitmap.quic.height ; + if (draw.data.src_bitmap.lz_rgb) + str += "; LZ_RGB length " + draw.data.src_bitmap.lz_rgb.length + + "; magic " + draw.data.src_bitmap.lz_rgb.magic + + "; version 0x" + draw.data.src_bitmap.lz_rgb.version.toString(16) + + "; type " + draw.data.src_bitmap.lz_rgb.type + + "; width " + draw.data.src_bitmap.lz_rgb.width + + "; height " + draw.data.src_bitmap.lz_rgb.height + + "; stride " + draw.data.src_bitmap.lz_rgb.stride + + "; top down " + draw.data.src_bitmap.lz_rgb.top_down; + } + else + str += "; src_bitmap is null"; + + if (draw.data.brush) + { + if (draw.data.brush.type == SPICE_BRUSH_TYPE_SOLID) + str += "; brush.color 0x" + draw.data.brush.color.toString(16); + if (draw.data.brush.type == SPICE_BRUSH_TYPE_PATTERN) + { + str += "; brush.pat "; + if (draw.data.brush.pattern.pat != null) + str += "[SpiceImage]"; + else + str += "[null]"; + str += " at " + draw.data.brush.pattern.pos.x + ", " + draw.data.brush.pattern.pos.y; + } + } + + str += "; rop_descriptor " + draw.data.rop_descriptor; + if (draw.data.scale_mode !== undefined) + str += "; scale_mode " + draw.data.scale_mode; + str += "; mask.flags " + draw.data.mask.flags; + str += "; mask.pos " + draw.data.mask.pos.x + ", " + draw.data.mask.pos.y; + if (draw.data.mask.bitmap != null) + { + str += "; mask.bitmap width " + draw.data.mask.bitmap.descriptor.width + ", height " + draw.data.mask.bitmap.descriptor.height; + str += "; mask.bitmap type " + draw.data.mask.bitmap.descriptor.type + ", flags " + draw.data.mask.bitmap.descriptor.flags; + } + else + str += "; mask.bitmap is null"; + } + + console.log(str); +} + +SpiceDisplayConn.prototype.hook_events = function() +{ + if (this.primary_surface !== undefined) + { + var canvas = this.surfaces[this.primary_surface].canvas; + canvas.sc = this.parent; + canvas.addEventListener('mousemove', handle_mousemove); + canvas.addEventListener('mousedown', handle_mousedown); + canvas.addEventListener('contextmenu', handle_contextmenu); + canvas.addEventListener('mouseup', handle_mouseup); + canvas.addEventListener('keydown', handle_keydown); + canvas.addEventListener('keyup', handle_keyup); + canvas.addEventListener('mouseout', handle_mouseout); + canvas.addEventListener('mouseover', handle_mouseover); + canvas.addEventListener('mousewheel', handle_mousewheel); + canvas.focus(); + } +} + +SpiceDisplayConn.prototype.unhook_events = function() +{ + if (this.primary_surface !== undefined) + { + var canvas = this.surfaces[this.primary_surface].canvas; + canvas.removeEventListener('mousemove', handle_mousemove); + canvas.removeEventListener('mousedown', handle_mousedown); + canvas.removeEventListener('contextmenu', handle_contextmenu); + canvas.removeEventListener('mouseup', handle_mouseup); + canvas.removeEventListener('keydown', handle_keydown); + canvas.removeEventListener('keyup', handle_keyup); + canvas.removeEventListener('mouseout', handle_mouseout); + canvas.removeEventListener('mouseover', handle_mouseover); + canvas.removeEventListener('mousewheel', handle_mousewheel); + } +} + + +SpiceDisplayConn.prototype.destroy_surfaces = function() +{ + for (var s in this.surfaces) + { + this.delete_surface(this.surfaces[s].surface_id); + } + + this.surfaces = undefined; +} + + +function handle_mouseover(e) +{ + this.focus(); +} + +function handle_mouseout(e) +{ + this.blur(); +} + +function handle_draw_jpeg_onload() +{ + var temp_canvas = null; + var context; + + /*------------------------------------------------------------ + ** FIXME: + ** The helper should be extended to be able to handle actual HtmlImageElements + ** ...and the cache should be modified to do so as well + **----------------------------------------------------------*/ + if (this.o.sc.surfaces[this.o.base.surface_id] === undefined) + { + // This can happen; if the jpeg image loads after our surface + // has been destroyed (e.g. open a menu, close it quickly), + // we'll find we have no surface. + DEBUG > 2 && this.o.sc.log_info("Discarding jpeg; presumed lost surface " + this.o.base.surface_id); + temp_canvas = document.createElement("canvas"); + temp_canvas.setAttribute('width', this.o.base.box.right); + temp_canvas.setAttribute('height', this.o.base.box.bottom); + context = temp_canvas.getContext("2d"); + } + else + context = this.o.sc.surfaces[this.o.base.surface_id].canvas.context; + + context.drawImage(this, this.o.base.box.left, this.o.base.box.top); + + if (this.o.descriptor && + (this.o.descriptor.flags & SPICE_IMAGE_FLAGS_CACHE_ME)) + { + if (! ("cache" in this.o.sc)) + this.o.sc.cache = []; + + this.o.sc.cache[this.o.descriptor.id] = + context.getImageData(this.o.base.box.left, this.o.base.box.top, + this.o.base.box.right - this.o.base.box.left, + this.o.base.box.bottom - this.o.base.box.top); + } + + if (temp_canvas == null) + { + if (DUMP_DRAWS && this.o.sc.parent.dump_id) + { + var debug_canvas = document.createElement("canvas"); + debug_canvas.setAttribute('id', this.o.tag + "." + + this.o.sc.surfaces[this.o.base.surface_id].draw_count + "." + + this.o.base.surface_id + "@" + this.o.base.box.left + "x" + this.o.base.box.top); + debug_canvas.getContext("2d").drawImage(this, 0, 0); + document.getElementById(this.o.sc.parent.dump_id).appendChild(debug_canvas); + } + + this.o.sc.surfaces[this.o.base.surface_id].draw_count++; + } +} diff --git a/enums.js b/enums.js new file mode 100644 index 0000000..cbf9056 --- /dev/null +++ b/enums.js @@ -0,0 +1,280 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + + +/*---------------------------------------------------------------------------- +** enums.js +** 'constants' for Spice +**--------------------------------------------------------------------------*/ +var SPICE_MAGIC = "REDQ"; +var SPICE_VERSION_MAJOR = 2; +var SPICE_VERSION_MINOR = 2; + +var SPICE_CONNECT_TIMEOUT = (30 * 1000); + +var SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION = 0; +var SPICE_COMMON_CAP_AUTH_SPICE = 1; +var SPICE_COMMON_CAP_AUTH_SASL = 2; +var SPICE_COMMON_CAP_MINI_HEADER = 3; + +var SPICE_TICKET_KEY_PAIR_LENGTH = 1024; +var SPICE_TICKET_PUBKEY_BYTES = (SPICE_TICKET_KEY_PAIR_LENGTH / 8 + 34); + +var SPICE_LINK_ERR_OK = 0, + SPICE_LINK_ERR_ERROR = 1, + SPICE_LINK_ERR_INVALID_MAGIC = 2, + SPICE_LINK_ERR_INVALID_DATA = 3, + SPICE_LINK_ERR_VERSION_MISMATCH = 4, + SPICE_LINK_ERR_NEED_SECURED = 5, + SPICE_LINK_ERR_NEED_UNSECURED = 6, + SPICE_LINK_ERR_PERMISSION_DENIED = 7, + SPICE_LINK_ERR_BAD_CONNECTION_ID = 8, + SPICE_LINK_ERR_CHANNEL_NOT_AVAILABLE = 9; + +var SPICE_MSG_MIGRATE = 1; +var SPICE_MSG_MIGRATE_DATA = 2; +var SPICE_MSG_SET_ACK = 3; +var SPICE_MSG_PING = 4; +var SPICE_MSG_WAIT_FOR_CHANNELS = 5; +var SPICE_MSG_DISCONNECTING = 6; +var SPICE_MSG_NOTIFY = 7; +var SPICE_MSG_LIST = 8; + +var SPICE_MSG_MAIN_MIGRATE_BEGIN = 101; +var SPICE_MSG_MAIN_MIGRATE_CANCEL = 102; +var SPICE_MSG_MAIN_INIT = 103; +var SPICE_MSG_MAIN_CHANNELS_LIST = 104; +var SPICE_MSG_MAIN_MOUSE_MODE = 105; +var SPICE_MSG_MAIN_MULTI_MEDIA_TIME = 106; +var SPICE_MSG_MAIN_AGENT_CONNECTED = 107; +var SPICE_MSG_MAIN_AGENT_DISCONNECTED = 108; +var SPICE_MSG_MAIN_AGENT_DATA = 109; +var SPICE_MSG_MAIN_AGENT_TOKEN = 110; +var SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST = 111; +var SPICE_MSG_MAIN_MIGRATE_END = 112; +var SPICE_MSG_MAIN_NAME = 113; +var SPICE_MSG_MAIN_UUID = 114; +var SPICE_MSG_END_MAIN = 115; + + +var SPICE_MSGC_ACK_SYNC = 1; +var SPICE_MSGC_ACK = 2; +var SPICE_MSGC_PONG = 3; +var SPICE_MSGC_MIGRATE_FLUSH_MARK = 4; +var SPICE_MSGC_MIGRATE_DATA = 5; +var SPICE_MSGC_DISCONNECTING = 6; + + +var SPICE_MSGC_MAIN_CLIENT_INFO = 101; +var SPICE_MSGC_MAIN_MIGRATE_CONNECTED = 102; +var SPICE_MSGC_MAIN_MIGRATE_CONNECT_ERROR = 103; +var SPICE_MSGC_MAIN_ATTACH_CHANNELS = 104; +var SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST = 105; +var SPICE_MSGC_MAIN_AGENT_START = 106; +var SPICE_MSGC_MAIN_AGENT_DATA = 107; +var SPICE_MSGC_MAIN_AGENT_TOKEN = 108; +var SPICE_MSGC_MAIN_MIGRATE_END = 109; +var SPICE_MSGC_END_MAIN = 110; + +var SPICE_MSG_DISPLAY_MODE = 101; +var SPICE_MSG_DISPLAY_MARK = 102; +var SPICE_MSG_DISPLAY_RESET = 103; +var SPICE_MSG_DISPLAY_COPY_BITS = 104; +var SPICE_MSG_DISPLAY_INVAL_LIST = 105; +var SPICE_MSG_DISPLAY_INVAL_ALL_PIXMAPS = 106; +var SPICE_MSG_DISPLAY_INVAL_PALETTE = 107; +var SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES= 108; + +var SPICE_MSG_DISPLAY_STREAM_CREATE = 122; +var SPICE_MSG_DISPLAY_STREAM_DATA = 123; +var SPICE_MSG_DISPLAY_STREAM_CLIP = 124; +var SPICE_MSG_DISPLAY_STREAM_DESTROY = 125; +var SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL= 126; + +var SPICE_MSG_DISPLAY_DRAW_FILL = 302; +var SPICE_MSG_DISPLAY_DRAW_OPAQUE = 303; +var SPICE_MSG_DISPLAY_DRAW_COPY = 304; +var SPICE_MSG_DISPLAY_DRAW_BLEND = 305; +var SPICE_MSG_DISPLAY_DRAW_BLACKNESS = 306; +var SPICE_MSG_DISPLAY_DRAW_WHITENESS = 307; +var SPICE_MSG_DISPLAY_DRAW_INVERS = 308; +var SPICE_MSG_DISPLAY_DRAW_ROP3 = 309; +var SPICE_MSG_DISPLAY_DRAW_STROKE = 310; +var SPICE_MSG_DISPLAY_DRAW_TEXT = 311; +var SPICE_MSG_DISPLAY_DRAW_TRANSPARENT = 312; +var SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND = 313; +var SPICE_MSG_DISPLAY_SURFACE_CREATE = 314; +var SPICE_MSG_DISPLAY_SURFACE_DESTROY = 315; + +var SPICE_MSGC_DISPLAY_INIT = 101; + +var SPICE_MSG_INPUTS_INIT = 101; +var SPICE_MSG_INPUTS_KEY_MODIFIERS = 102; + +var SPICE_MSG_INPUTS_MOUSE_MOTION_ACK = 111; + +var SPICE_MSGC_INPUTS_KEY_DOWN = 101; +var SPICE_MSGC_INPUTS_KEY_UP = 102; +var SPICE_MSGC_INPUTS_KEY_MODIFIERS = 103; + +var SPICE_MSGC_INPUTS_MOUSE_MOTION = 111; +var SPICE_MSGC_INPUTS_MOUSE_POSITION = 112; +var SPICE_MSGC_INPUTS_MOUSE_PRESS = 113; +var SPICE_MSGC_INPUTS_MOUSE_RELEASE = 114; + +var SPICE_MSG_CURSOR_INIT = 101; +var SPICE_MSG_CURSOR_RESET = 102; +var SPICE_MSG_CURSOR_SET = 103; +var SPICE_MSG_CURSOR_MOVE = 104; +var SPICE_MSG_CURSOR_HIDE = 105; +var SPICE_MSG_CURSOR_TRAIL = 106; +var SPICE_MSG_CURSOR_INVAL_ONE = 107; +var SPICE_MSG_CURSOR_INVAL_ALL = 108; + + +var SPICE_CHANNEL_MAIN = 1; +var SPICE_CHANNEL_DISPLAY = 2; +var SPICE_CHANNEL_INPUTS = 3; +var SPICE_CHANNEL_CURSOR = 4; +var SPICE_CHANNEL_PLAYBACK = 5; +var SPICE_CHANNEL_RECORD = 6; +var SPICE_CHANNEL_TUNNEL = 7; +var SPICE_CHANNEL_SMARTCARD = 8; +var SPICE_CHANNEL_USBREDIR = 9; + +var SPICE_SURFACE_FLAGS_PRIMARY = (1 << 0); + +var SPICE_NOTIFY_SEVERITY_INFO = 0; +var SPICE_NOTIFY_SEVERITY_WARN = 1; +var SPICE_NOTIFY_SEVERITY_ERROR = 2; + +var SPICE_MOUSE_MODE_SERVER = (1 << 0), + SPICE_MOUSE_MODE_CLIENT = (1 << 1), + SPICE_MOUSE_MODE_MASK = 0x3; + +var SPICE_CLIP_TYPE_NONE = 0; +var SPICE_CLIP_TYPE_RECTS = 1; + +var SPICE_IMAGE_TYPE_BITMAP = 0; +var SPICE_IMAGE_TYPE_QUIC = 1; +var SPICE_IMAGE_TYPE_RESERVED = 2; +var SPICE_IMAGE_TYPE_LZ_PLT = 100; +var SPICE_IMAGE_TYPE_LZ_RGB = 101; +var SPICE_IMAGE_TYPE_GLZ_RGB = 102; +var SPICE_IMAGE_TYPE_FROM_CACHE = 103; +var SPICE_IMAGE_TYPE_SURFACE = 104; +var SPICE_IMAGE_TYPE_JPEG = 105; +var SPICE_IMAGE_TYPE_FROM_CACHE_LOSSLESS = 106; +var SPICE_IMAGE_TYPE_ZLIB_GLZ_RGB = 107; +var SPICE_IMAGE_TYPE_JPEG_ALPHA = 108; + +var SPICE_IMAGE_FLAGS_CACHE_ME = (1 << 0), + SPICE_IMAGE_FLAGS_HIGH_BITS_SET = (1 << 1), + SPICE_IMAGE_FLAGS_CACHE_REPLACE_ME = (1 << 2); + +var SPICE_BITMAP_FLAGS_PAL_CACHE_ME = (1 << 0), + SPICE_BITMAP_FLAGS_PAL_FROM_CACHE = (1 << 1), + SPICE_BITMAP_FLAGS_TOP_DOWN = (1 << 2), + SPICE_BITMAP_FLAGS_MASK = 0x7; + +var SPICE_BITMAP_FMT_INVALID = 0, + SPICE_BITMAP_FMT_1BIT_LE = 1, + SPICE_BITMAP_FMT_1BIT_BE = 2, + SPICE_BITMAP_FMT_4BIT_LE = 3, + SPICE_BITMAP_FMT_4BIT_BE = 4, + SPICE_BITMAP_FMT_8BIT = 5, + SPICE_BITMAP_FMT_16BIT = 6, + SPICE_BITMAP_FMT_24BIT = 7, + SPICE_BITMAP_FMT_32BIT = 8, + SPICE_BITMAP_FMT_RGBA = 9; + + +var SPICE_CURSOR_FLAGS_NONE = (1 << 0), + SPICE_CURSOR_FLAGS_CACHE_ME = (1 << 1), + SPICE_CURSOR_FLAGS_FROM_CACHE = (1 << 2), + SPICE_CURSOR_FLAGS_MASK = 0x7; + +var SPICE_MOUSE_BUTTON_MASK_LEFT = (1 << 0), + SPICE_MOUSE_BUTTON_MASK_MIDDLE = (1 << 1), + SPICE_MOUSE_BUTTON_MASK_RIGHT = (1 << 2), + SPICE_MOUSE_BUTTON_MASK_MASK = 0x7; + +var SPICE_MOUSE_BUTTON_INVALID = 0; +var SPICE_MOUSE_BUTTON_LEFT = 1; +var SPICE_MOUSE_BUTTON_MIDDLE = 2; +var SPICE_MOUSE_BUTTON_RIGHT = 3; +var SPICE_MOUSE_BUTTON_UP = 4; +var SPICE_MOUSE_BUTTON_DOWN = 5; + +var SPICE_BRUSH_TYPE_NONE = 0, + SPICE_BRUSH_TYPE_SOLID = 1, + SPICE_BRUSH_TYPE_PATTERN = 2; + +var SPICE_SURFACE_FMT_INVALID = 0, + SPICE_SURFACE_FMT_1_A = 1, + SPICE_SURFACE_FMT_8_A = 8, + SPICE_SURFACE_FMT_16_555 = 16, + SPICE_SURFACE_FMT_32_xRGB = 32, + SPICE_SURFACE_FMT_16_565 = 80, + SPICE_SURFACE_FMT_32_ARGB = 96; + +var SPICE_ROPD_INVERS_SRC = (1 << 0), + SPICE_ROPD_INVERS_BRUSH = (1 << 1), + SPICE_ROPD_INVERS_DEST = (1 << 2), + SPICE_ROPD_OP_PUT = (1 << 3), + SPICE_ROPD_OP_OR = (1 << 4), + SPICE_ROPD_OP_AND = (1 << 5), + SPICE_ROPD_OP_XOR = (1 << 6), + SPICE_ROPD_OP_BLACKNESS = (1 << 7), + SPICE_ROPD_OP_WHITENESS = (1 << 8), + SPICE_ROPD_OP_INVERS = (1 << 9), + SPICE_ROPD_INVERS_RES = (1 << 10), + SPICE_ROPD_MASK = 0x7ff; + +var LZ_IMAGE_TYPE_INVALID = 0, + LZ_IMAGE_TYPE_PLT1_LE = 1, + LZ_IMAGE_TYPE_PLT1_BE = 2, // PLT stands for palette + LZ_IMAGE_TYPE_PLT4_LE = 3, + LZ_IMAGE_TYPE_PLT4_BE = 4, + LZ_IMAGE_TYPE_PLT8 = 5, + LZ_IMAGE_TYPE_RGB16 = 6, + LZ_IMAGE_TYPE_RGB24 = 7, + LZ_IMAGE_TYPE_RGB32 = 8, + LZ_IMAGE_TYPE_RGBA = 9, + LZ_IMAGE_TYPE_XXXA = 10; + + +var QUIC_IMAGE_TYPE_INVALID = 0, + QUIC_IMAGE_TYPE_GRAY = 1, + QUIC_IMAGE_TYPE_RGB16 = 2, + QUIC_IMAGE_TYPE_RGB24 = 3, + QUIC_IMAGE_TYPE_RGB32 = 4, + QUIC_IMAGE_TYPE_RGBA = 5; + +var SPICE_INPUT_MOTION_ACK_BUNCH = 4; + + +var SPICE_CURSOR_TYPE_ALPHA = 0, + SPICE_CURSOR_TYPE_MONO = 1, + SPICE_CURSOR_TYPE_COLOR4 = 2, + SPICE_CURSOR_TYPE_COLOR8 = 3, + SPICE_CURSOR_TYPE_COLOR16 = 4, + SPICE_CURSOR_TYPE_COLOR24 = 5, + SPICE_CURSOR_TYPE_COLOR32 = 6; diff --git a/inputs.js b/inputs.js new file mode 100644 index 0000000..ce1d15e --- /dev/null +++ b/inputs.js @@ -0,0 +1,165 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + + +/*---------------------------------------------------------------------------- +** SpiceInputsConn +** Drive the Spice Inputs channel (e.g. mouse + keyboard) +**--------------------------------------------------------------------------*/ +function SpiceInputsConn() +{ + SpiceConn.apply(this, arguments); + + this.mousex = undefined; + this.mousey = undefined; + this.button_state = 0; + this.waiting_for_ack = 0; +} + +SpiceInputsConn.prototype = Object.create(SpiceConn.prototype); +SpiceInputsConn.prototype.process_channel_message = function(msg) +{ + if (msg.type == SPICE_MSG_INPUTS_INIT) + { + var inputs_init = new SpiceMsgInputsInit(msg.data); + this.keyboard_modifiers = inputs_init.keyboard_modifiers; + DEBUG > 1 && console.log("MsgInputsInit - modifier " + this.keyboard_modifiers); + // FIXME - We don't do anything with the keyboard modifiers... + return true; + } + if (msg.type == SPICE_MSG_INPUTS_KEY_MODIFIERS) + { + var key = new SpiceMsgInputsKeyModifiers(msg.data); + this.keyboard_modifiers = key.keyboard_modifiers; + DEBUG > 1 && console.log("MsgInputsKeyModifiers - modifier " + this.keyboard_modifiers); + // FIXME - We don't do anything with the keyboard modifiers... + return true; + } + if (msg.type == SPICE_MSG_INPUTS_MOUSE_MOTION_ACK) + { + DEBUG > 1 && console.log("mouse motion ack"); + this.waiting_for_ack -= SPICE_INPUT_MOTION_ACK_BUNCH; + return true; + } + return false; +} + + + +function handle_mousemove(e) +{ + var msg = new SpiceMiniData(); + var move; + if (this.sc.mouse_mode == SPICE_MOUSE_MODE_CLIENT) + { + move = new SpiceMsgcMousePosition(this.sc, e) + msg.build_msg(SPICE_MSGC_INPUTS_MOUSE_POSITION, move); + } + else + { + move = new SpiceMsgcMouseMotion(this.sc, e) + msg.build_msg(SPICE_MSGC_INPUTS_MOUSE_MOTION, move); + } + if (this.sc && this.sc.inputs) + { + if (this.sc.inputs.waiting_for_ack < (2 * SPICE_INPUT_MOTION_ACK_BUNCH)) + { + this.sc.inputs.send_msg(msg); + this.sc.inputs.waiting_for_ack++; + } + else + { + DEBUG > 0 && this.sc.log_info("Discarding mouse motion"); + } + } +} + +function handle_mousedown(e) +{ + var press = new SpiceMsgcMousePress(this.sc, e) + var msg = new SpiceMiniData(); + msg.build_msg(SPICE_MSGC_INPUTS_MOUSE_PRESS, press); + if (this.sc && this.sc.inputs) + this.sc.inputs.send_msg(msg); + + e.preventDefault(); +} + +function handle_contextmenu(e) +{ + e.preventDefault(); + return false; +} + +function handle_mouseup(e) +{ + var release = new SpiceMsgcMouseRelease(this.sc, e) + var msg = new SpiceMiniData(); + msg.build_msg(SPICE_MSGC_INPUTS_MOUSE_RELEASE, release); + if (this.sc && this.sc.inputs) + this.sc.inputs.send_msg(msg); + + e.preventDefault(); +} + +function handle_mousewheel(e) +{ + var press = new SpiceMsgcMousePress; + var release = new SpiceMsgcMouseRelease; + if (e.wheelDelta > 0) + press.button = release.button = SPICE_MOUSE_BUTTON_UP; + else + press.button = release.button = SPICE_MOUSE_BUTTON_DOWN; + press.buttons_state = 0; + release.buttons_state = 0; + + var msg = new SpiceMiniData(); + msg.build_msg(SPICE_MSGC_INPUTS_MOUSE_PRESS, press); + if (this.sc && this.sc.inputs) + this.sc.inputs.send_msg(msg); + + msg.build_msg(SPICE_MSGC_INPUTS_MOUSE_RELEASE, release); + if (this.sc && this.sc.inputs) + this.sc.inputs.send_msg(msg); + + e.preventDefault(); +} + +function handle_keydown(e) +{ + var key = new SpiceMsgcKeyDown(e) + var msg = new SpiceMiniData(); + msg.build_msg(SPICE_MSGC_INPUTS_KEY_DOWN, key); + if (this.sc && this.sc.inputs) + this.sc.inputs.send_msg(msg); + + e.preventDefault(); +} + +function handle_keyup(e) +{ + var key = new SpiceMsgcKeyUp(e) + var msg = new SpiceMiniData(); + msg.build_msg(SPICE_MSGC_INPUTS_KEY_UP, key); + if (this.sc && this.sc.inputs) + this.sc.inputs.send_msg(msg); + + e.preventDefault(); +} diff --git a/lz.js b/lz.js new file mode 100644 index 0000000..2914c37 --- /dev/null +++ b/lz.js @@ -0,0 +1,158 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + + +/*---------------------------------------------------------------------------- +** lz.js +** Functions for handling SPICE_IMAGE_TYPE_LZ_RGB +** Adapted from lz.c . +**--------------------------------------------------------------------------*/ +function lz_rgb32_decompress(in_buf, at, out_buf, type, default_alpha) +{ + var encoder = at; + var op = 0; + var ctrl; + var ctr = 0; + + for (ctrl = in_buf[encoder++]; (op * 4) < out_buf.length; ctrl = in_buf[encoder++]) + { + var ref = op; + var len = ctrl >> 5; + var ofs = (ctrl & 31) << 8; + +//if (type == LZ_IMAGE_TYPE_RGBA) +//console.log(ctr++ + ": from " + (encoder + 28) + ", ctrl " + ctrl + ", len " + len + ", ofs " + ofs + ", op " + op); + if (ctrl >= 32) { + + var code; + len--; + + if (len == 7 - 1) { + do { + code = in_buf[encoder++]; + len += code; + } while (code == 255); + } + code = in_buf[encoder++]; + ofs += code; + + + if (code == 255) { + if ((ofs - code) == (31 << 8)) { + ofs = in_buf[encoder++] << 8; + ofs += in_buf[encoder++]; + ofs += 8191; + } + } + len += 1; + if (type == LZ_IMAGE_TYPE_RGBA) + len += 2; + + ofs += 1; + + ref -= ofs; + if (ref == (op - 1)) { + var b = ref; +//if (type == LZ_IMAGE_TYPE_RGBA) console.log("alpha " + out_buf[(b*4)+3] + " dupped into pixel " + op + " through pixel " + (op + len)); + for (; len; --len) { + if (type == LZ_IMAGE_TYPE_RGBA) + { + out_buf[(op*4) + 3] = out_buf[(b*4)+3]; + } + else + { + for (i = 0; i < 4; i++) + out_buf[(op*4) + i] = out_buf[(b*4)+i]; + } + op++; + } + } else { +//if (type == LZ_IMAGE_TYPE_RGBA) console.log("alpha copied to pixel " + op + " through " + (op + len) + " from " + ref); + for (; len; --len) { + if (type == LZ_IMAGE_TYPE_RGBA) + { + out_buf[(op*4) + 3] = out_buf[(ref*4)+3]; + } + else + { + for (i = 0; i < 4; i++) + out_buf[(op*4) + i] = out_buf[(ref*4)+i]; + } + op++; ref++; + } + } + } else { + ctrl++; + + if (type == LZ_IMAGE_TYPE_RGBA) + { +//console.log("alpha " + in_buf[encoder] + " set into pixel " + op); + out_buf[(op*4) + 3] = in_buf[encoder++]; + } + else + { + out_buf[(op*4) + 0] = in_buf[encoder + 2]; + out_buf[(op*4) + 1] = in_buf[encoder + 1]; + out_buf[(op*4) + 2] = in_buf[encoder + 0]; + if (default_alpha) + out_buf[(op*4) + 3] = 255; + encoder += 3; + } + op++; + + + for (--ctrl; ctrl; ctrl--) { + if (type == LZ_IMAGE_TYPE_RGBA) + { +//console.log("alpha " + in_buf[encoder] + " set into pixel " + op); + out_buf[(op*4) + 3] = in_buf[encoder++]; + } + else + { + out_buf[(op*4) + 0] = in_buf[encoder + 2]; + out_buf[(op*4) + 1] = in_buf[encoder + 1]; + out_buf[(op*4) + 2] = in_buf[encoder + 0]; + if (default_alpha) + out_buf[(op*4) + 3] = 255; + encoder += 3; + } + op++; + } + } + + } + return encoder - 1; +} + +function convert_spice_lz_rgb_to_web(context, lz_rgb) +{ + var u8 = new Uint8Array(lz_rgb.data); + var at; + if (lz_rgb.type != LZ_IMAGE_TYPE_RGB32 && lz_rgb.type != LZ_IMAGE_TYPE_RGBA) + return undefined; + + var ret = context.createImageData(lz_rgb.width, lz_rgb.height); + + at = lz_rgb32_decompress(u8, 0, ret.data, LZ_IMAGE_TYPE_RGB32, lz_rgb.type != LZ_IMAGE_TYPE_RGBA); + if (lz_rgb.type == LZ_IMAGE_TYPE_RGBA) + lz_rgb32_decompress(u8, at, ret.data, LZ_IMAGE_TYPE_RGBA, false); + + return ret; +} diff --git a/main.js b/main.js new file mode 100644 index 0000000..bd7b472 --- /dev/null +++ b/main.js @@ -0,0 +1,176 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** SpiceMainConn +** This is the master Javascript class for establishing and +** managing a connection to a Spice Server. +** +** Invocation: You must pass an object with properties as follows: +** uri (required) Uri of a WebSocket listener that is +** connected to a spice server. +** password (required) Password to send to the spice server +** message_id (optional) Identifier of an element in the DOM +** where SpiceConn will write messages. +** It will use classes spice-messages-x, +** where x is one of info, warning, or error. +** screen_id (optional) Identifier of an element in the DOM +** where SpiceConn will create any new +** client screens. This is the main UI. +** dump_id (optional) If given, an element to use for +** dumping every single image + canvas drawn. +** Sometimes useful for debugging. +** onerror (optional) If given, a function to receive async +** errors. Note that you should also catch +** errors for ones that occur inline +** +** Throws error if there are troubles. Requires a modern (by 2012 standards) +** browser, including WebSocket and WebSocket.binaryType == arraybuffer +** +**--------------------------------------------------------------------------*/ +function SpiceMainConn() +{ + if (typeof WebSocket === "undefined") + throw new Error("WebSocket unavailable. You need to use a different browser."); + + SpiceConn.apply(this, arguments); + +} + +SpiceMainConn.prototype = Object.create(SpiceConn.prototype); +SpiceMainConn.prototype.process_channel_message = function(msg) +{ + if (msg.type == SPICE_MSG_MAIN_INIT) + { + this.log_info("Connected to " + this.ws.url); + this.main_init = new SpiceMsgMainInit(msg.data); + this.connection_id = this.main_init.session_id; + + if (DEBUG > 0) + { + // FIXME - there is a lot here we don't handle; mouse modes, agent, + // ram_hint, multi_media_time + this.log_info("session id " + this.main_init.session_id + + " ; display_channels_hint " + this.main_init.display_channels_hint + + " ; supported_mouse_modes " + this.main_init.supported_mouse_modes + + " ; current_mouse_mode " + this.main_init.current_mouse_mode + + " ; agent_connected " + this.main_init.agent_connected + + " ; agent_tokens " + this.main_init.agent_tokens + + " ; multi_media_time " + this.main_init.multi_media_time + + " ; ram_hint " + this.main_init.ram_hint); + } + + this.mouse_mode = this.main_init.current_mouse_mode; + if (this.main_init.current_mouse_mode != SPICE_MOUSE_MODE_CLIENT && + (this.main_init.supported_mouse_modes & SPICE_MOUSE_MODE_CLIENT)) + { + var mode_request = new SpiceMsgcMainMouseModeRequest(SPICE_MOUSE_MODE_CLIENT); + var mr = new SpiceMiniData(); + mr.build_msg(SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST, mode_request); + this.send_msg(mr); + } + + var attach = new SpiceMiniData; + attach.type = SPICE_MSGC_MAIN_ATTACH_CHANNELS; + attach.size = attach.buffer_size(); + this.send_msg(attach); + return true; + } + + if (msg.type == SPICE_MSG_MAIN_MOUSE_MODE) + { + var mode = new SpiceMsgMainMouseMode(msg.data); + DEBUG > 0 && this.log_info("Mouse supported modes " + mode.supported_modes + "; current " + mode.current_mode); + this.mouse_mode = mode.current_mode; + if (this.inputs) + this.inputs.mouse_mode = mode.current_mode; + return true; + } + + if (msg.type == SPICE_MSG_MAIN_CHANNELS_LIST) + { + var i; + var chans; + DEBUG > 0 && console.log("channels"); + chans = new SpiceMsgChannels(msg.data); + for (i = 0; i < chans.channels.length; i++) + { + var conn = { + uri: this.ws.url, + parent: this, + connection_id : this.connection_id, + type : chans.channels[i].type, + chan_id : chans.channels[i].id + }; + if (chans.channels[i].type == SPICE_CHANNEL_DISPLAY) + this.display = new SpiceDisplayConn(conn); + else if (chans.channels[i].type == SPICE_CHANNEL_INPUTS) + { + this.inputs = new SpiceInputsConn(conn); + this.inputs.mouse_mode = this.mouse_mode; + } + else if (chans.channels[i].type == SPICE_CHANNEL_CURSOR) + this.cursor = new SpiceCursorConn(conn); + else + { + this.log_err("Channel type " + chans.channels[i].type + " unknown."); + if (! ("extra_channels" in this)) + this.extra_channels = []; + this.extra_channels[i] = new SpiceConn(conn); + } + + } + + return true; + } + + return false; +} + +SpiceMainConn.prototype.stop = function(msg) +{ + this.state = "closing"; + + if (this.inputs) + { + this.inputs.cleanup(); + this.inputs = undefined; + } + + if (this.cursor) + { + this.cursor.cleanup(); + this.cursor = undefined; + } + + if (this.display) + { + this.display.cleanup(); + this.display.destroy_surfaces(); + this.display = undefined; + } + + this.cleanup(); + + if ("extra_channels" in this) + for (var e in this.extra_channels) + this.extra_channels[e].cleanup(); + this.extra_channels = undefined; +} diff --git a/makequic b/makequic new file mode 100644 index 0000000..c32f91c --- /dev/null +++ b/makequic @@ -0,0 +1,8 @@ +./emcc -o quic.js --shell-file quic.shell quic.c +echo Okay, quic.js is partly ready. Three things to do: +echo 1. In function _quic_decode_js, after the call to simple_quic_decode, +echo add the code as given by quic.shell +echo 2. Delete the run() 3 line block near the bottom. +echo 3. Add the getQuic() function to the bottom (see quic.shell) + + diff --git a/png.js b/png.js new file mode 100644 index 0000000..6a26151 --- /dev/null +++ b/png.js @@ -0,0 +1,256 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** crc logic from rfc2083 ported to Javascript +**--------------------------------------------------------------------------*/ + +var rfc2083_crc_table = Array(256); +var rfc2083_crc_table_computed = 0; +/* Make the table for a fast CRC. */ +function rfc2083_make_crc_table() +{ + var c; + var n, k; + for (n = 0; n < 256; n++) + { + c = n; + for (k = 0; k < 8; k++) + { + if (c & 1) + c = ((0xedb88320 ^ (c >>> 1)) >>> 0) & 0xffffffff; + else + c = c >>> 1; + } + rfc2083_crc_table[n] = c; + } + + rfc2083_crc_table_computed = 1; +} + +/* Update a running CRC with the bytes buf[0..len-1]--the CRC + should be initialized to all 1's, and the transmitted value + is the 1's complement of the final running CRC (see the + crc() routine below)). */ + +function rfc2083_update_crc(crc, u8buf, at, len) +{ + var c = crc; + var n; + + if (!rfc2083_crc_table_computed) + rfc2083_make_crc_table(); + + for (n = 0; n < len; n++) + { + c = rfc2083_crc_table[(c ^ u8buf[at + n]) & 0xff] ^ (c >>> 8); + } + + return c; +} + +function rfc2083_crc(u8buf, at, len) +{ + return rfc2083_update_crc(0xffffffff, u8buf, at, len) ^ 0xffffffff; +} + +function crc32(mb, at, len) +{ + var u8 = new Uint8Array(mb); + return rfc2083_crc(u8, at, len); +} + +function PngIHDR(width, height) +{ + this.width = width; + this.height = height; + this.depth = 8; + this.type = 6; + this.compression = 0; + this.filter = 0; + this.interlace = 0; +} + +PngIHDR.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var orig = at; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.buffer_size() - 12); at += 4; + dv.setUint8(at, 'I'.charCodeAt(0)); at++; + dv.setUint8(at, 'H'.charCodeAt(0)); at++; + dv.setUint8(at, 'D'.charCodeAt(0)); at++; + dv.setUint8(at, 'R'.charCodeAt(0)); at++; + dv.setUint32(at, this.width); at += 4; + dv.setUint32(at, this.height); at += 4; + dv.setUint8(at, this.depth); at++; + dv.setUint8(at, this.type); at++; + dv.setUint8(at, this.compression); at++; + dv.setUint8(at, this.filter); at++; + dv.setUint8(at, this.interlace); at++; + dv.setUint32(at, crc32(a, orig + 4, this.buffer_size() - 8)); at += 4; + return at; + }, + buffer_size: function() + { + return 12 + 13; + } +} + + +function adler() +{ + this.s1 = 1; + this.s2 = 0; +} + +adler.prototype.update = function(b) +{ + this.s1 += b; + this.s1 %= 65521; + this.s2 += this.s1; + this.s2 %= 65521; +} + +function PngIDAT(width, height, bytes) +{ + if (bytes.byteLength > 65535) + { + throw new Error("Cannot handle more than 64K"); + } + this.data = bytes; + this.width = width; + this.height = height; +} + +PngIDAT.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var orig = at; + var x, y, i, j; + var dv = new SpiceDataView(a); + var zsum = new adler(); + dv.setUint32(at, this.buffer_size() - 12); at += 4; + dv.setUint8(at, 'I'.charCodeAt(0)); at++; + dv.setUint8(at, 'D'.charCodeAt(0)); at++; + dv.setUint8(at, 'A'.charCodeAt(0)); at++; + dv.setUint8(at, 'T'.charCodeAt(0)); at++; + + /* zlib header. */ + dv.setUint8(at, 0x78); at++; + dv.setUint8(at, 0x01); at++; + + /* Deflate header. Specifies uncompressed, final bit */ + dv.setUint8(at, 0x80); at++; + dv.setUint16(at, this.data.byteLength + this.height); at += 2; + dv.setUint16(at, ~(this.data.byteLength + this.height)); at += 2; + var u8 = new Uint8Array(this.data); + for (i = 0, y = 0; y < this.height; y++) + { + /* Filter type 0 - uncompressed */ + dv.setUint8(at, 0); at++; + zsum.update(0); + for (x = 0; x < this.width && i < this.data.byteLength; x++) + { + zsum.update(u8[i]); + dv.setUint8(at, u8[i++]); at++; + zsum.update(u8[i]); + dv.setUint8(at, u8[i++]); at++; + zsum.update(u8[i]); + dv.setUint8(at, u8[i++]); at++; + zsum.update(u8[i]); + dv.setUint8(at, u8[i++]); at++; + } + } + + /* zlib checksum. */ + dv.setUint16(at, zsum.s2); at+=2; + dv.setUint16(at, zsum.s1); at+=2; + + /* FIXME - something is not quite right with the zlib code; + you get an error from libpng if you open the image in + gimp. But it works, so it's good enough for now... */ + + dv.setUint32(at, crc32(a, orig + 4, this.buffer_size() - 8)); at += 4; + return at; + }, + buffer_size: function() + { + return 12 + this.data.byteLength + this.height + 4 + 2 + 1 + 2 + 2; + } +} + + +function PngIEND() +{ +} + +PngIEND.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var orig = at; + var i; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.buffer_size() - 12); at += 4; + dv.setUint8(at, 'I'.charCodeAt(0)); at++; + dv.setUint8(at, 'E'.charCodeAt(0)); at++; + dv.setUint8(at, 'N'.charCodeAt(0)); at++; + dv.setUint8(at, 'D'.charCodeAt(0)); at++; + dv.setUint32(at, crc32(a, orig + 4, this.buffer_size() - 8)); at += 4; + return at; + }, + buffer_size: function() + { + return 12; + } +} + + +function create_rgba_png(width, height, bytes) +{ + var i; + var ihdr = new PngIHDR(width, height); + var idat = new PngIDAT(width, height, bytes); + var iend = new PngIEND; + + var mb = new ArrayBuffer(ihdr.buffer_size() + idat.buffer_size() + iend.buffer_size()); + var at = ihdr.to_buffer(mb); + at = idat.to_buffer(mb, at); + at = iend.to_buffer(mb, at); + + var u8 = new Uint8Array(mb); + var str = ""; + for (i = 0; i < at; i++) + { + str += "%"; + if (u8[i] < 16) + str += "0"; + str += u8[i].toString(16); + } + + + return "%89PNG%0D%0A%1A%0A" + str; +} diff --git a/quic.c b/quic.c new file mode 100644 index 0000000..d101d8b --- /dev/null +++ b/quic.c @@ -0,0 +1,7364 @@ +/*---------------------------------------------------------------------------- +** quic.c +** This file was created initially by performing a gcc -E on the spice +** quic code. Utility functions were then added. It is then passed through +** emscripten to create an initial quic.js, which is also then mangled a bit +** (see quic.shell), to create a quic.js we can use with our Javascript client. +** FIXME: Take this out back and kill it. +**--------------------------------------------------------------------------*/ + + + + + + + + + + + + + + + +typedef int ptrdiff_t; + +typedef unsigned int size_t; + +typedef int wchar_t; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; + + + +__extension__ +typedef long long int int64_t; + + + + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; + +typedef int intptr_t; + + +typedef unsigned int uintptr_t; + +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + + + +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; + + + +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + + + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); + + +extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) + + __attribute__ ((__nonnull__ (2))); + +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); + + + + + +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + + + + + + + + + + + + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; + + + + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; + + +extern void *__rawmemchr (const void *__s, int __c); + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c1 (__const char *__s, int __reject); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c1 (__const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c1 (__const char *__s, int __accept); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c1 (__const char *__s, int __accept) +{ + register size_t __result = 0; + + while (__s[__result] == __accept) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c2 (__const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, + int __accept3) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} + +extern char *__strsep_g (char **__stringp, __const char *__delim); + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_1c (char **__s, char __reject); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} + + + + + + + + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + + + + + + + + +extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); + +extern char *__strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); + + + + + + + + + + + + +typedef enum { + QUIC_IMAGE_TYPE_INVALID, + QUIC_IMAGE_TYPE_GRAY, + QUIC_IMAGE_TYPE_RGB16, + QUIC_IMAGE_TYPE_RGB24, + QUIC_IMAGE_TYPE_RGB32, + QUIC_IMAGE_TYPE_RGBA +} QuicImageType; + + + + +typedef void *QuicContext; + +typedef struct QuicUsrContext QuicUsrContext; +struct QuicUsrContext { + __attribute__((format(printf,2,3))) void (*error)(QuicUsrContext *usr, const char *fmt, ...); + __attribute__((format(printf,2,3))) void (*warn)(QuicUsrContext *usr, const char *fmt, ...); + __attribute__((format(printf,2,3))) void (*info)(QuicUsrContext *usr, const char *fmt, ...); + void *(*malloc)(QuicUsrContext *usr, int size); + void (*free)(QuicUsrContext *usr, void *ptr); + int (*more_space)(QuicUsrContext *usr, uint32_t **io_ptr, int rows_completed); + int (*more_lines)(QuicUsrContext *usr, uint8_t **lines); + +}; + +int quic_encode(QuicContext *quic, QuicImageType type, int width, int height, + uint8_t *lines, unsigned int num_lines, int stride, + uint32_t *io_ptr, unsigned int num_io_words); + +int quic_decode_begin(QuicContext *quic, uint32_t *io_ptr, unsigned int num_io_words, + QuicImageType *type, int *width, int *height); +int quic_decode(QuicContext *quic, QuicImageType type, uint8_t *buf, int stride); + + +QuicContext *quic_create(QuicUsrContext *usr); +void quic_destroy(QuicContext *quic); + +void quic_init(void); + + + + + + + + + + + + + + +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + + +typedef struct _IO_FILE __FILE; + + + + + + + + + + + + + +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; + + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; + +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + + + + +typedef __builtin_va_list __gnuc_va_list; + + +struct _IO_jump_t; struct _IO_FILE; + +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; + +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; + +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; + + __off64_t _offset; + + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + +typedef struct _IO_FILE _IO_FILE; + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; + +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); + +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); + +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); + + + + + +typedef __gnuc_va_list va_list; + +typedef __off_t off_t; + +typedef __ssize_t ssize_t; + + + + + + + +typedef _G_fpos_t fpos_t; + + + + + + + + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); + +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__)); + + + + + + + + +extern FILE *tmpfile (void) ; + +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ; + + + + + +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ; + +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + + +extern int fflush_unlocked (FILE *__stream); + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) ; + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) ; + + + +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ; + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + __attribute__ ((__nothrow__)) ; + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ; + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); + + +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) ; + + + + +extern int scanf (__const char *__restrict __format, ...) ; + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + +extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") + + ; +extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") + ; +extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__)) + + ; + + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) ; + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) ; + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") + + + + __attribute__ ((__format__ (__scanf__, 2, 0))) ; +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") + + __attribute__ ((__format__ (__scanf__, 1, 0))) ; +extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__)) + + + + __attribute__ ((__format__ (__scanf__, 2, 0))); + + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + + +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); + +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + + +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + ; + + + + + + +extern char *gets (char *__s) ; + + +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) ; +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) ; + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) ; + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s); + + +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) ; + + + + +extern void rewind (FILE *__stream); + + +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) ; + + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); + + + + + +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); + +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; + +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; + + + + +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; + + + + + + + + +extern void perror (__const char *__s); + + + + + + + + +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + + + + +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; + + + + +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; + +extern FILE *popen (__const char *__command, __const char *__modes) ; + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); + +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); + + + +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; + + +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); + + + +extern __inline __attribute__ ((__gnu_inline__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) +{ + return vfprintf (stdout, __fmt, __arg); +} + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} + + + + + + + + + + + + + + + + + + + + + + + + + +typedef __clock_t clock_t; + + + + + + +typedef __time_t time_t; + + + + +typedef __clockid_t clockid_t; + +typedef __timer_t timer_t; + +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; + + + + + + + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; + + + + + +typedef __pid_t pid_t; + + + + + + + + +extern clock_t clock (void) __attribute__ ((__nothrow__)); + + +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); + + +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + + + + +extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) __attribute__ ((__nothrow__)); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); + +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __attribute__ ((__nothrow__)); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__)); + + +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); + + + + + + + + + + + + + + + + + + + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; + + +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); + + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + + +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ; + + + + +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__nothrow__)) atof (__const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) atoi (__const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__nothrow__)) atol (__const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__nothrow__)) atoll (__const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} + + +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ; + + +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + + + + + + + + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; + +typedef __id_t id_t; + +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; + + + + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); + + + + + + + + + +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; + + + + +typedef __sigset_t sigset_t; + + + + + + + + + +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; + + + +typedef __suseconds_t suseconds_t; + + + + + +typedef long int __fd_mask; + +typedef struct + { + + + + + + + __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; + + + +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); + +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + + + + + + +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} + + + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; + + + +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[24]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + + + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; + int __writer; + } __data; + char __size[32]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[20]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; + + + + + + + + + + + +extern long int random (void) __attribute__ ((__nothrow__)); + + +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) __attribute__ ((__nothrow__)); + +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); + + + + + + + +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) __attribute__ ((__nothrow__)); + + + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); + + + + + + + + + + + + + + +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); + + + + + + + + + + + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) __attribute__ ((__nothrow__)); + +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; + +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; + +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + + +extern int system (__const char *__command) ; + + +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) ; + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) ; + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + + +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + + + + + + +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ; + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ; + + +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ; + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); + + + + + + + + +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ; + +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + + + + + + +void spice_backtrace(void); + + + + + + + + + + + + +typedef enum { + SPICE_LOG_LEVEL_ERROR, + SPICE_LOG_LEVEL_CRITICAL, + SPICE_LOG_LEVEL_WARNING, + SPICE_LOG_LEVEL_INFO, + SPICE_LOG_LEVEL_DEBUG, +} SpiceLogLevel; + +void spice_logv(const char *log_domain, + SpiceLogLevel log_level, + const char *strloc, + const char *function, + const char *format, + va_list args) __attribute__((format(printf,5,0))); + +void spice_log(const char *log_domain, + SpiceLogLevel log_level, + const char *strloc, + const char *function, + const char *format, + ...) __attribute__((format(printf,5,6))); + + + + + + + + + +static inline int spice_bit_find_msb(unsigned int val) +{ + int ret; + + asm ("bsrl %1,%0\n\t" + "jnz 1f\n\t" + "movl $-1,%0\n" + "1:" + : "=r"(ret) : "r"(val)); + return ret + 1; +} + +static inline int spice_bit_next_pow2(unsigned int val) +{ + if ((val & (val - 1)) == 0) { + return val; + } + return 1 << spice_bit_find_msb(val); +} + + + + +typedef uint8_t BYTE; + +typedef struct QuicFamily { + unsigned int nGRcodewords[8]; + + unsigned int notGRcwlen[8]; + + unsigned int notGRprefixmask[8]; + + unsigned int notGRsuffixlen[8]; + + + + + BYTE xlatU2L[256]; + + + + unsigned int xlatL2U[256]; +} QuicFamily; + +static QuicFamily family_8bpc; +static QuicFamily family_5bpc; + +typedef unsigned COUNTER; + +typedef struct s_bucket { + COUNTER *pcounters; + unsigned int bestcode; +} s_bucket; + +typedef struct Encoder Encoder; + +typedef struct CommonState { + Encoder *encoder; + + unsigned int waitcnt; + unsigned int tabrand_seed; + unsigned int wm_trigger; + unsigned int wmidx; + unsigned int wmileft; + + + int melcstate; + + int melclen; + + + + + + + unsigned long melcorder; + +} CommonState; + + + + +typedef struct FamilyStat { + s_bucket **buckets_ptrs; + s_bucket *buckets_buf; + COUNTER *counters; +} FamilyStat; + +typedef struct Channel { + Encoder *encoder; + + int correlate_row_width; + BYTE *correlate_row; + + s_bucket **_buckets_ptrs; + + FamilyStat family_stat_8bpc; + FamilyStat family_stat_5bpc; + + CommonState state; +} Channel; + +struct Encoder { + QuicUsrContext *usr; + QuicImageType type; + unsigned int width; + unsigned int height; + unsigned int num_channels; + + unsigned int n_buckets_8bpc; + unsigned int n_buckets_5bpc; + + unsigned int io_available_bits; + uint32_t io_word; + uint32_t io_next_word; + uint32_t *io_now; + uint32_t *io_end; + uint32_t io_words_count; + + int rows_completed; + + Channel channels[4]; + + CommonState rgb_state; +}; + + +static int wmimax = 6; + + +static int wminext = 2048; + + +static int evol = 3; + + +static const unsigned long int bppmask[33] = { + 0x00000000, + 0x00000001, 0x00000003, 0x00000007, 0x0000000f, + 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, + 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, + 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff, + 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff, + 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff, + 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff, + 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff +}; + +static const unsigned int bitat[32] = { + 0x00000001, 0x00000002, 0x00000004, 0x00000008, + 0x00000010, 0x00000020, 0x00000040, 0x00000080, + 0x00000100, 0x00000200, 0x00000400, 0x00000800, + 0x00001000, 0x00002000, 0x00004000, 0x00008000, + 0x00010000, 0x00020000, 0x00040000, 0x00080000, + 0x00100000, 0x00200000, 0x00400000, 0x00800000, + 0x01000000, 0x02000000, 0x04000000, 0x08000000, + 0x10000000, 0x20000000, 0x40000000, 0x80000000 +}; + + + + + +static const unsigned int tabrand_chaos[256] = { + 0x02c57542, 0x35427717, 0x2f5a2153, 0x9244f155, 0x7bd26d07, 0x354c6052, 0x57329b28, 0x2993868e, + 0x6cd8808c, 0x147b46e0, 0x99db66af, 0xe32b4cac, 0x1b671264, 0x9d433486, 0x62a4c192, 0x06089a4b, + 0x9e3dce44, 0xdaabee13, 0x222425ea, 0xa46f331d, 0xcd589250, 0x8bb81d7f, 0xc8b736b9, 0x35948d33, + 0xd7ac7fd0, 0x5fbe2803, 0x2cfbc105, 0x013dbc4e, 0x7a37820f, 0x39f88e9e, 0xedd58794, 0xc5076689, + 0xfcada5a4, 0x64c2f46d, 0xb3ba3243, 0x8974b4f9, 0x5a05aebd, 0x20afcd00, 0x39e2b008, 0x88a18a45, + 0x600bde29, 0xf3971ace, 0xf37b0a6b, 0x7041495b, 0x70b707ab, 0x06beffbb, 0x4206051f, 0xe13c4ee3, + 0xc1a78327, 0x91aa067c, 0x8295f72a, 0x732917a6, 0x1d871b4d, 0x4048f136, 0xf1840e7e, 0x6a6048c1, + 0x696cb71a, 0x7ff501c3, 0x0fc6310b, 0x57e0f83d, 0x8cc26e74, 0x11a525a2, 0x946934c7, 0x7cd888f0, + 0x8f9d8604, 0x4f86e73b, 0x04520316, 0xdeeea20c, 0xf1def496, 0x67687288, 0xf540c5b2, 0x22401484, + 0x3478658a, 0xc2385746, 0x01979c2c, 0x5dad73c8, 0x0321f58b, 0xf0fedbee, 0x92826ddf, 0x284bec73, + 0x5b1a1975, 0x03df1e11, 0x20963e01, 0xa17cf12b, 0x740d776e, 0xa7a6bf3c, 0x01b5cce4, 0x1118aa76, + 0xfc6fac0a, 0xce927e9b, 0x00bf2567, 0x806f216c, 0xbca69056, 0x795bd3e9, 0xc9dc4557, 0x8929b6c2, + 0x789d52ec, 0x3f3fbf40, 0xb9197368, 0xa38c15b5, 0xc3b44fa8, 0xca8333b0, 0xb7e8d590, 0xbe807feb, + 0xbf5f8360, 0xd99e2f5c, 0x372928e1, 0x7c757c4c, 0x0db5b154, 0xc01ede02, 0x1fc86e78, 0x1f3985be, + 0xb4805c77, 0x00c880fa, 0x974c1b12, 0x35ab0214, 0xb2dc840d, 0x5b00ae37, 0xd313b026, 0xb260969d, + 0x7f4c8879, 0x1734c4d3, 0x49068631, 0xb9f6a021, 0x6b863e6f, 0xcee5debf, 0x29f8c9fb, 0x53dd6880, + 0x72b61223, 0x1f67a9fd, 0x0a0f6993, 0x13e59119, 0x11cca12e, 0xfe6b6766, 0x16b6effc, 0x97918fc4, + 0xc2b8a563, 0x94f2f741, 0x0bfa8c9a, 0xd1537ae8, 0xc1da349c, 0x873c60ca, 0x95005b85, 0x9b5c080e, + 0xbc8abbd9, 0xe1eab1d2, 0x6dac9070, 0x4ea9ebf1, 0xe0cf30d4, 0x1ef5bd7b, 0xd161043e, 0x5d2fa2e2, + 0xff5d3cae, 0x86ed9f87, 0x2aa1daa1, 0xbd731a34, 0x9e8f4b22, 0xb1c2c67a, 0xc21758c9, 0xa182215d, + 0xccb01948, 0x8d168df7, 0x04238cfe, 0x368c3dbc, 0x0aeadca5, 0xbad21c24, 0x0a71fee5, 0x9fc5d872, + 0x54c152c6, 0xfc329483, 0x6783384a, 0xeddb3e1c, 0x65f90e30, 0x884ad098, 0xce81675a, 0x4b372f7d, + 0x68bf9a39, 0x43445f1e, 0x40f8d8cb, 0x90d5acb6, 0x4cd07282, 0x349eeb06, 0x0c9d5332, 0x520b24ef, + 0x80020447, 0x67976491, 0x2f931ca3, 0xfe9b0535, 0xfcd30220, 0x61a9e6cc, 0xa487d8d7, 0x3f7c5dd1, + 0x7d0127c5, 0x48f51d15, 0x60dea871, 0xc9a91cb7, 0x58b53bb3, 0x9d5e0b2d, 0x624a78b4, 0x30dbee1b, + 0x9bdf22e7, 0x1df5c299, 0x2d5643a7, 0xf4dd35ff, 0x03ca8fd6, 0x53b47ed8, 0x6f2c19aa, 0xfeb0c1f4, + 0x49e54438, 0x2f2577e6, 0xbf876969, 0x72440ea9, 0xfa0bafb8, 0x74f5b3a0, 0x7dd357cd, 0x89ce1358, + 0x6ef2cdda, 0x1e7767f3, 0xa6be9fdb, 0x4f5f88f8, 0xba994a3a, 0x08ca6b65, 0xe0893818, 0x9e00a16a, + 0xf42bfc8f, 0x9972eedc, 0x749c8b51, 0x32c05f5e, 0xd706805f, 0x6bfbb7cf, 0xd9210a10, 0x31a1db97, + 0x923a9559, 0x37a7a1f6, 0x059f8861, 0xca493e62, 0x65157e81, 0x8f6467dd, 0xab85ff9f, 0x9331aff2, + 0x8616b9f5, 0xedbd5695, 0xee7e29b1, 0x313ac44f, 0xb903112f, 0x432ef649, 0xdc0a36c0, 0x61cf2bba, + 0x81474925, 0xa8b6c7ad, 0xee5931de, 0xb2f8158d, 0x59fb7409, 0x2e3dfaed, 0x9af25a3f, 0xe1fed4d5, +}; + +static unsigned int stabrand(void) +{ + + + + return 0x0ff; +} + +static unsigned int tabrand(unsigned int *tabrand_seed) +{ + return tabrand_chaos[++*tabrand_seed & 0x0ff]; +} + +static const unsigned short besttrigtab[3][11] = { + + { 550, 900, 800, 700, 500, 350, 300, 200, 180, 180, 160}, + { 110, 550, 900, 800, 550, 400, 350, 250, 140, 160, 140}, + { 100, 120, 550, 900, 700, 500, 400, 300, 220, 250, 160} +}; + + +static void set_wm_trigger(CommonState *state) +{ + unsigned int wm = state->wmidx; + if (wm > 10) { + wm = 10; + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (evol < 6) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "269", __FUNCTION__, "assertion `%s' failed","evol < 6"); } while (0); } } while (0); + + state->wm_trigger = besttrigtab[evol / 2][wm]; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (state->wm_trigger <= 2000) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "273", __FUNCTION__, "assertion `%s' failed","state->wm_trigger <= 2000"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (state->wm_trigger >= 1) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "274", __FUNCTION__, "assertion `%s' failed","state->wm_trigger >= 1"); } while (0); } } while (0); +} + +static int ceil_log_2(int val) +{ + int result; + + + + if (val == 1) { + return 0; + } + + result = 1; + val -= 1; + while (val >>= 1) { + result++; + } + + return result; +} + + +static const BYTE lzeroes[256] = { + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + + +static unsigned int cnt_l_zeroes(const unsigned int bits) +{ + if (bits & 0xff800000) { + return lzeroes[bits >> 24]; + } else if (bits & 0xffff8000) { + return 8 + lzeroes[(bits >> 16) & 0x000000ff]; + } else if (bits & 0xffffff80) { + return 16 + lzeroes[(bits >> 8) & 0x000000ff]; + } else { + return 24 + lzeroes[bits & 0x000000ff]; + } +} + + + + + + + +static unsigned int golomb_code_len_8bpc(const BYTE n, const unsigned int l) +{ + if (n < family_8bpc.nGRcodewords[l]) { + return (n >> l) + 1 + l; + } else { + return family_8bpc.notGRcwlen[l]; + } +} + +static void golomb_coding_8bpc(const BYTE n, const unsigned int l, unsigned int * const codeword, + unsigned int * const codewordlen) +{ + if (n < family_8bpc.nGRcodewords[l]) { + (*codeword) = bitat[l] | (n & bppmask[l]); + (*codewordlen) = (n >> l) + l + 1; + } else { + (*codeword) = n - family_8bpc.nGRcodewords[l]; + (*codewordlen) = family_8bpc.notGRcwlen[l]; + } +} + +static unsigned int golomb_decoding_8bpc(const unsigned int l, const unsigned int bits, + unsigned int * const codewordlen) +{ + if (bits > family_8bpc.notGRprefixmask[l]) { + const unsigned int zeroprefix = cnt_l_zeroes(bits); + const unsigned int cwlen = zeroprefix + 1 + l; + (*codewordlen) = cwlen; + return (zeroprefix << l) | ((bits >> (32 - cwlen)) & bppmask[l]); + } else { + const unsigned int cwlen = family_8bpc.notGRcwlen[l]; + (*codewordlen) = cwlen; + return family_8bpc.nGRcodewords[l] + ((bits) >> (32 - cwlen) & + bppmask[family_8bpc.notGRsuffixlen[l]]); + } +} + + +static void update_model_8bpc(CommonState *state, s_bucket * const bucket, + const BYTE curval, unsigned int bpp) +{ + COUNTER * const pcounters = bucket->pcounters; + unsigned int i; + unsigned int bestcode; + unsigned int bestcodelen; + + + + + bestcode = bpp - 1; + bestcodelen = (pcounters[bestcode] += golomb_code_len_8bpc(curval, bestcode)); + + for (i = bpp - 2; i < bpp; i--) { + const unsigned int ithcodelen = (pcounters[i] += golomb_code_len_8bpc(curval, i)); + + if (ithcodelen < bestcodelen) { + bestcode = i; + bestcodelen = ithcodelen; + } + } + + bucket->bestcode = bestcode; + + if (bestcodelen > state->wm_trigger) { + for (i = 0; i < bpp; i++) { + pcounters[i] >>= 1; + } + } +} + +static s_bucket *find_bucket_8bpc(Channel *channel, const unsigned int val) +{ + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (val < (0x1U << 8)) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_family_tmpl.c" ":" "110", __FUNCTION__, "assertion `%s' failed","val < (0x1U << BPC)"); } while (0); } } while (0); + + return channel->_buckets_ptrs[val]; +} + + + + + + + + + +static unsigned int golomb_code_len_5bpc(const BYTE n, const unsigned int l) +{ + if (n < family_5bpc.nGRcodewords[l]) { + return (n >> l) + 1 + l; + } else { + return family_5bpc.notGRcwlen[l]; + } +} + +static void golomb_coding_5bpc(const BYTE n, const unsigned int l, unsigned int * const codeword, + unsigned int * const codewordlen) +{ + if (n < family_5bpc.nGRcodewords[l]) { + (*codeword) = bitat[l] | (n & bppmask[l]); + (*codewordlen) = (n >> l) + l + 1; + } else { + (*codeword) = n - family_5bpc.nGRcodewords[l]; + (*codewordlen) = family_5bpc.notGRcwlen[l]; + } +} + +static unsigned int golomb_decoding_5bpc(const unsigned int l, const unsigned int bits, + unsigned int * const codewordlen) +{ + if (bits > family_5bpc.notGRprefixmask[l]) { + const unsigned int zeroprefix = cnt_l_zeroes(bits); + const unsigned int cwlen = zeroprefix + 1 + l; + (*codewordlen) = cwlen; + return (zeroprefix << l) | ((bits >> (32 - cwlen)) & bppmask[l]); + } else { + const unsigned int cwlen = family_5bpc.notGRcwlen[l]; + (*codewordlen) = cwlen; + return family_5bpc.nGRcodewords[l] + ((bits) >> (32 - cwlen) & + bppmask[family_5bpc.notGRsuffixlen[l]]); + } +} + + +static void update_model_5bpc(CommonState *state, s_bucket * const bucket, + const BYTE curval, unsigned int bpp) +{ + COUNTER * const pcounters = bucket->pcounters; + unsigned int i; + unsigned int bestcode; + unsigned int bestcodelen; + + + + + bestcode = bpp - 1; + bestcodelen = (pcounters[bestcode] += golomb_code_len_5bpc(curval, bestcode)); + + for (i = bpp - 2; i < bpp; i--) { + const unsigned int ithcodelen = (pcounters[i] += golomb_code_len_5bpc(curval, i)); + + if (ithcodelen < bestcodelen) { + bestcode = i; + bestcodelen = ithcodelen; + } + } + + bucket->bestcode = bestcode; + + if (bestcodelen > state->wm_trigger) { + for (i = 0; i < bpp; i++) { + pcounters[i] >>= 1; + } + } +} + +static s_bucket *find_bucket_5bpc(Channel *channel, const unsigned int val) +{ + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (val < (0x1U << 5)) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_family_tmpl.c" ":" "110", __FUNCTION__, "assertion `%s' failed","val < (0x1U << BPC)"); } while (0); } } while (0); + + return channel->_buckets_ptrs[val]; +} + + + +static void decorelate_init(QuicFamily *family, int bpc) +{ + const unsigned int pixelbitmask = bppmask[bpc]; + const unsigned int pixelbitmaskshr = pixelbitmask >> 1; + unsigned int s; + + + + for (s = 0; s <= pixelbitmask; s++) { + if (s <= pixelbitmaskshr) { + family->xlatU2L[s] = s << 1; + } else { + family->xlatU2L[s] = ((pixelbitmask - s) << 1) + 1; + } + } +} + +static void corelate_init(QuicFamily *family, int bpc) +{ + const unsigned long int pixelbitmask = bppmask[bpc]; + unsigned long int s; + + + + for (s = 0; s <= pixelbitmask; s++) { + if (s & 0x01) { + family->xlatL2U[s] = pixelbitmask - (s >> 1); + } else { + family->xlatL2U[s] = (s >> 1); + } + } +} + +static void family_init(QuicFamily *family, int bpc, int limit) +{ + int l; + + for (l = 0; l < bpc; l++) { + int altprefixlen, altcodewords; + + altprefixlen = limit - bpc; + if (altprefixlen > (int)(bppmask[bpc - l])) { + altprefixlen = bppmask[bpc - l]; + } + + altcodewords = bppmask[bpc] + 1 - (altprefixlen << l); + + family->nGRcodewords[l] = (altprefixlen << l); + family->notGRcwlen[l] = altprefixlen + ceil_log_2(altcodewords); + family->notGRprefixmask[l] = bppmask[32 - altprefixlen]; + family->notGRsuffixlen[l] = ceil_log_2(altcodewords); + } + + decorelate_init(family, bpc); + corelate_init(family, bpc); +} + +static void more_io_words(Encoder *encoder) +{ + uint32_t *io_ptr; + int num_io_words = encoder->usr->more_space(encoder->usr, &io_ptr, encoder->rows_completed); + if (num_io_words <= 0) { + encoder->usr->error(encoder->usr, "%s: no more words\n", __FUNCTION__); + } + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (io_ptr) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "394", __FUNCTION__, "assertion `%s' failed","io_ptr"); } while (0); } } while (0); + encoder->io_words_count += num_io_words; + encoder->io_now = io_ptr; + encoder->io_end = encoder->io_now + num_io_words; +} + +static void __write_io_word(Encoder *encoder) +{ + more_io_words(encoder); + *(encoder->io_now++) = encoder->io_word; +} + +static void (*__write_io_word_ptr)(Encoder *encoder) = __write_io_word; + +static inline void write_io_word(Encoder *encoder) +{ + if (encoder->io_now == encoder->io_end) { + __write_io_word_ptr(encoder); + return; + } + *(encoder->io_now++) = encoder->io_word; +} + +static inline void encode(Encoder *encoder, unsigned int word, unsigned int len) +{ + int delta; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (len > 0 && len < 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "421", __FUNCTION__, "assertion `%s' failed","len > 0 && len < 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (!(word & ~bppmask[len])) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "422", __FUNCTION__, "assertion `%s' failed","!(word & ~bppmask[len])"); } while (0); } } while (0); + if ((delta = ((int)encoder->io_available_bits - len)) >= 0) { + encoder->io_available_bits = delta; + encoder->io_word |= word << encoder->io_available_bits; + return; + } + delta = -delta; + encoder->io_word |= word >> delta; + write_io_word(encoder); + encoder->io_available_bits = 32 - delta; + encoder->io_word = word << encoder->io_available_bits; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->io_available_bits < 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "434", __FUNCTION__, "assertion `%s' failed","encoder->io_available_bits < 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((encoder->io_word & bppmask[encoder->io_available_bits]) == 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "435", __FUNCTION__, "assertion `%s' failed","(encoder->io_word & bppmask[encoder->io_available_bits]) == 0"); } while (0); } } while (0); +} + +static inline void encode_32(Encoder *encoder, unsigned int word) +{ + encode(encoder, word >> 16, 16); + encode(encoder, word & 0x0000ffff, 16); +} + +static inline void flush(Encoder *encoder) +{ + if (encoder->io_available_bits > 0 && encoder->io_available_bits != 32) { + encode(encoder, 0, encoder->io_available_bits); + } + encode_32(encoder, 0); + encode(encoder, 0, 1); +} + +static void __read_io_word(Encoder *encoder) +{ + more_io_words(encoder); + encoder->io_next_word = *(encoder->io_now++); +} + +static void (*__read_io_word_ptr)(Encoder *encoder) = __read_io_word; + + +static inline void read_io_word(Encoder *encoder) +{ + if (encoder->io_now == encoder->io_end) { + __read_io_word_ptr(encoder); + return; + } + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->io_now < encoder->io_end) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "468", __FUNCTION__, "assertion `%s' failed","encoder->io_now < encoder->io_end"); } while (0); } } while (0); + encoder->io_next_word = *(encoder->io_now++); +} + +static inline void decode_eatbits(Encoder *encoder, int len) +{ + int delta; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (len > 0 && len < 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "476", __FUNCTION__, "assertion `%s' failed","len > 0 && len < 32"); } while (0); } } while (0); + encoder->io_word <<= len; + + if ((delta = ((int)encoder->io_available_bits - len)) >= 0) { + encoder->io_available_bits = delta; + encoder->io_word |= encoder->io_next_word >> encoder->io_available_bits; + return; + } + + delta = -delta; + encoder->io_word |= encoder->io_next_word << delta; + read_io_word(encoder); + encoder->io_available_bits = 32 - delta; + encoder->io_word |= (encoder->io_next_word >> encoder->io_available_bits); +} + +static inline void decode_eat32bits(Encoder *encoder) +{ + decode_eatbits(encoder, 16); + decode_eatbits(encoder, 16); +} + + + + + +static inline void encode_ones(Encoder *encoder, unsigned int n) +{ + unsigned int count; + + for (count = n >> 5; count; count--) { + encode(encoder, ~0U, 32); + } + + if ((n &= 0x1f)) { + encode(encoder, (1U << n) - 1, n); + } +} + + + +static int zeroLUT[256]; + +static int J[32] = { + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, + 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + + +static void init_zeroLUT(void) +{ + int i, j, k, l; + + j = k = 1; + l = 8; + for (i = 0; i < 256; ++i) { + zeroLUT[i] = l; + --k; + if (k == 0) { + k = j; + --l; + j *= 2; + } + } +} + +static void encoder_init_rle(CommonState *state) +{ + state->melcstate = 0; + state->melclen = J[0]; + state->melcorder = 1 << state->melclen; +} + + + +static void encode_run(Encoder *encoder, unsigned int runlen) +{ + int hits = 0; + + while (runlen >= encoder->rgb_state.melcorder) { + hits++; + runlen -= encoder->rgb_state.melcorder; + if (encoder->rgb_state.melcstate < 32) { + encoder->rgb_state.melclen = J[++encoder->rgb_state.melcstate]; + encoder->rgb_state.melcorder = (1L << encoder->rgb_state.melclen); + } + } + + + + + + + encode_ones(encoder, hits); + + encode(encoder, runlen, encoder->rgb_state.melclen + 1); + + + if (encoder->rgb_state.melcstate) { + encoder->rgb_state.melclen = J[--encoder->rgb_state.melcstate]; + encoder->rgb_state.melcorder = (1L << encoder->rgb_state.melclen); + } +} + + + +static void encode_channel_run(Encoder *encoder, Channel *channel, unsigned int runlen) +{ + + int hits = 0; + + while (runlen >= channel->state.melcorder) { + hits++; + runlen -= channel->state.melcorder; + if (channel->state.melcstate < 32) { + channel->state.melclen = J[++channel->state.melcstate]; + channel->state.melcorder = (1L << channel->state.melclen); + } + } + + + + + + + encode_ones(encoder, hits); + + encode(encoder, runlen, channel->state.melclen + 1); + + + if (channel->state.melcstate) { + channel->state.melclen = J[--channel->state.melcstate]; + channel->state.melcorder = (1L << channel->state.melclen); + } +} + + + + + +static int decode_run(Encoder *encoder) +{ + int runlen = 0; + + do { + register int temp, hits; + temp = zeroLUT[(BYTE)(~(encoder->io_word >> 24))]; + + for (hits = 1; hits <= temp; hits++) { + runlen += encoder->rgb_state.melcorder; + + if (encoder->rgb_state.melcstate < 32) { + encoder->rgb_state.melclen = J[++encoder->rgb_state.melcstate]; + encoder->rgb_state.melcorder = (1U << encoder->rgb_state.melclen); + } + } + if (temp != 8) { + decode_eatbits(encoder, temp + 1); + + break; + } + decode_eatbits(encoder, 8); + } while (1); + + + if (encoder->rgb_state.melclen) { + runlen += encoder->io_word >> (32 - encoder->rgb_state.melclen); + decode_eatbits(encoder, encoder->rgb_state.melclen); + } + + + if (encoder->rgb_state.melcstate) { + encoder->rgb_state.melclen = J[--encoder->rgb_state.melcstate]; + encoder->rgb_state.melcorder = (1U << encoder->rgb_state.melclen); + } + + return runlen; +} + + + +static int decode_channel_run(Encoder *encoder, Channel *channel) +{ + int runlen = 0; + + do { + register int temp, hits; + temp = zeroLUT[(BYTE)(~(encoder->io_word >> 24))]; + + for (hits = 1; hits <= temp; hits++) { + runlen += channel->state.melcorder; + + if (channel->state.melcstate < 32) { + channel->state.melclen = J[++channel->state.melcstate]; + channel->state.melcorder = (1U << channel->state.melclen); + } + } + if (temp != 8) { + decode_eatbits(encoder, temp + 1); + + break; + } + decode_eatbits(encoder, 8); + } while (1); + + + if (channel->state.melclen) { + runlen += encoder->io_word >> (32 - channel->state.melclen); + decode_eatbits(encoder, channel->state.melclen); + } + + + if (channel->state.melcstate) { + channel->state.melclen = J[--channel->state.melcstate]; + channel->state.melcorder = (1U << channel->state.melclen); + } + + return runlen; +} + +static inline void init_decode_io(Encoder *encoder) +{ + encoder->io_next_word = encoder->io_word = *(encoder->io_now++); + encoder->io_available_bits = 0; +} + +typedef struct __attribute__ ((__packed__)) one_byte_pixel_t { + BYTE a; +} one_byte_t; + +typedef struct __attribute__ ((__packed__)) three_bytes_pixel_t { + BYTE a; + BYTE b; + BYTE c; +} three_bytes_t; + +typedef struct __attribute__ ((__packed__)) four_bytes_pixel_t { + BYTE a; + BYTE b; + BYTE c; + BYTE d; +} four_bytes_t; + +typedef struct __attribute__ ((__packed__)) rgb32_pixel_t { + BYTE b; + BYTE g; + BYTE r; + BYTE pad; +} rgb32_pixel_t; + +typedef struct __attribute__ ((__packed__)) rgb24_pixel_t { + BYTE b; + BYTE g; + BYTE r; +} rgb24_pixel_t; + +typedef uint16_t rgb16_pixel_t; + + + + + + +static inline BYTE quic_one_decorelate_0(const one_byte_t * const curr, const unsigned int bpc_mask) +{ + return family_8bpc.xlatU2L[(unsigned)((int)curr[0].a - (int)((unsigned int)curr[-1].a)) & bpc_mask]; +} + +static inline void quic_one_corelate_0(one_byte_t *curr, const BYTE corelate, + const unsigned int bpc_mask) +{ + curr->a = (family_8bpc.xlatL2U[corelate] + ((unsigned int)curr[-1].a)) & bpc_mask; +} + + + + +static inline BYTE quic_one_decorelate(const one_byte_t *const prev, const one_byte_t * const curr, + const unsigned int bpc_mask) +{ + return family_8bpc.xlatU2L[(unsigned)((int)curr->a - (int)((((unsigned int)curr[-1].a) + ((unsigned int)prev[0].a)) >> 1)) & bpc_mask]; +} + + +static inline void quic_one_corelate(const one_byte_t *prev, one_byte_t *curr, const BYTE corelate, + const unsigned int bpc_mask) +{ + curr->a = (family_8bpc.xlatL2U[corelate] + (int)((((unsigned int)curr[-1].a) + ((unsigned int)prev[0].a)) >> 1)) & bpc_mask; +} + +static void quic_one_compress_row0_seg(Encoder *encoder, Channel *channel, int i, + const one_byte_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + BYTE * const decorelate_drow = channel->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "161", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (i == 0) { + unsigned int codeword, codewordlen; + + decorelate_drow[0] = family_8bpc.xlatU2L[cur_row->a]; + golomb_coding_8bpc(decorelate_drow[0], find_bucket_8bpc(channel, decorelate_drow[-1])->bestcode, + &codeword, &codewordlen); + encode(encoder, codeword, codewordlen); + + if (channel->state.waitcnt) { + channel->state.waitcnt--; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[-1]), + decorelate_drow[i], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + decorelate_drow[i] = quic_one_decorelate_0(&cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], + find_bucket_8bpc(channel, decorelate_drow[i - 1])->bestcode, &codeword, + &codewordlen); + encode(encoder, codeword, codewordlen); + } + + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[stopidx - 1]), + decorelate_drow[stopidx], bpc); + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + decorelate_drow[i] = quic_one_decorelate_0(&cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], find_bucket_8bpc(channel, decorelate_drow[i - 1])->bestcode, + &codeword, &codewordlen); + encode(encoder, codeword, codewordlen); + } + channel->state.waitcnt = stopidx - end; +} + +static void quic_one_compress_row0(Encoder *encoder, Channel *channel, const one_byte_t *cur_row, + unsigned int width) +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_one_compress_row0_seg(encoder, channel, pos, cur_row, pos + channel->state.wmileft, + bppmask[channel->state.wmidx], bpc, bpc_mask); + width -= channel->state.wmileft; + pos += channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_one_compress_row0_seg(encoder, channel, pos, cur_row, pos + width, + bppmask[channel->state.wmidx], bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "236", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "237", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "238", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_one_compress_row_seg(Encoder *encoder, Channel *channel, int i, + const one_byte_t * const prev_row, + const one_byte_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + BYTE * const decorelate_drow = channel->correlate_row; + int stopidx; + + int run_index = 0; + int run_size; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "256", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + decorelate_drow[0] = family_8bpc.xlatU2L[(unsigned)((int)cur_row->a - + (int)prev_row->a) & bpc_mask]; + + golomb_coding_8bpc(decorelate_drow[0], + find_bucket_8bpc(channel, decorelate_drow[-1])->bestcode, + &codeword, + &codewordlen); + encode(encoder, codeword, codewordlen); + + if (channel->state.waitcnt) { + channel->state.waitcnt--; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[-1]), + decorelate_drow[0], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + decorelate_drow[i] = quic_one_decorelate(&prev_row[i], &cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], + find_bucket_8bpc(channel, decorelate_drow[i - 1])->bestcode, &codeword, + &codewordlen); + encode(encoder, codeword, codewordlen); + } + + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[stopidx - 1]), + decorelate_drow[stopidx], bpc); + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + decorelate_drow[i] = quic_one_decorelate(&prev_row[i], &cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], find_bucket_8bpc(channel, + decorelate_drow[i - 1])->bestcode, + &codeword, &codewordlen); + encode(encoder, codeword, codewordlen); + } + channel->state.waitcnt = stopidx - end; + + return; + + +do_run: + run_index = i; + channel->state.waitcnt = stopidx - i; + run_size = 0; + + while (cur_row[i].a == cur_row[i - 1].a) { + run_size++; + if (++i == end) { + + encode_channel_run(encoder, channel, run_size); + + + + return; + } + } + + encode_channel_run(encoder, channel, run_size); + + + + stopidx = i + channel->state.waitcnt; + + } +} + +static void quic_one_compress_row(Encoder *encoder, Channel *channel, + const one_byte_t * const prev_row, + const one_byte_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_one_compress_row_seg(encoder, channel, pos, prev_row, cur_row, + pos + channel->state.wmileft, bppmask[channel->state.wmidx], + bpc, bpc_mask); + width -= channel->state.wmileft; + pos += channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_one_compress_row_seg(encoder, channel, pos, prev_row, cur_row, pos + width, + bppmask[channel->state.wmidx], bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "378", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "379", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "380", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_one_uncompress_row0_seg(Encoder *encoder, Channel *channel, int i, + BYTE * const correlate_row, + one_byte_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "393", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (i == 0) { + unsigned int codewordlen; + + correlate_row[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, + correlate_row[-1])->bestcode, + encoder->io_word, &codewordlen); + cur_row[0].a = (BYTE)family_8bpc.xlatL2U[correlate_row[0]]; + decode_eatbits(encoder, codewordlen); + + if (channel->state.waitcnt) { + --channel->state.waitcnt; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, correlate_row[-1]), + correlate_row[0], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + + while (stopidx < end) { + struct s_bucket * pbucket = ((void *)0); + + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + pbucket = find_bucket_8bpc(channel, correlate_row[i - 1]); + correlate_row[i] = (BYTE)golomb_decoding_8bpc(pbucket->bestcode, encoder->io_word, + &codewordlen); + quic_one_corelate_0(&cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + + update_model_8bpc(&channel->state, pbucket, correlate_row[stopidx], bpc); + + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + correlate_row[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, + correlate_row[i - 1])->bestcode, + encoder->io_word, &codewordlen); + quic_one_corelate_0(&cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + channel->state.waitcnt = stopidx - end; +} + +static void quic_one_uncompress_row0(Encoder *encoder, Channel *channel, + one_byte_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + BYTE * const correlate_row = channel->correlate_row; + unsigned int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_one_uncompress_row0_seg(encoder, channel, pos, correlate_row, cur_row, + pos + channel->state.wmileft, bppmask[channel->state.wmidx], + bpc, bpc_mask); + pos += channel->state.wmileft; + width -= channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_one_uncompress_row0_seg(encoder, channel, pos, correlate_row, cur_row, pos + width, + bppmask[channel->state.wmidx], bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "478", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "479", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "480", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_one_uncompress_row_seg(Encoder *encoder, Channel *channel, + BYTE *correlate_row, + const one_byte_t * const prev_row, + one_byte_t * const cur_row, + int i, + const int end, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + const unsigned int waitmask = bppmask[channel->state.wmidx]; + int stopidx; + + int run_index = 0; + int run_end; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "499", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (i == 0) { + unsigned int codewordlen; + + correlate_row[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, correlate_row[-1])->bestcode, + encoder->io_word, &codewordlen); + cur_row[0].a = (family_8bpc.xlatL2U[correlate_row[0]] + prev_row[0].a) & bpc_mask; + decode_eatbits(encoder, codewordlen); + + if (channel->state.waitcnt) { + --channel->state.waitcnt; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, correlate_row[-1]), + correlate_row[0], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + for (;;) { + while (stopidx < end) { + struct s_bucket * pbucket = ((void *)0); + + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + pbucket = find_bucket_8bpc(channel, correlate_row[i - 1]); + correlate_row[i] = (BYTE)golomb_decoding_8bpc(pbucket->bestcode, encoder->io_word, + &codewordlen); + quic_one_corelate(&prev_row[i], &cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + + update_model_8bpc(&channel->state, pbucket, correlate_row[stopidx], bpc); + + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + correlate_row[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, + correlate_row[i - 1])->bestcode, + encoder->io_word, &codewordlen); + quic_one_corelate(&prev_row[i], &cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + + channel->state.waitcnt = stopidx - end; + + return; + + +do_run: + channel->state.waitcnt = stopidx - i; + run_index = i; + + run_end = i + decode_channel_run(encoder, channel); + + + + + for (; i < run_end; i++) { + cur_row[i].a = cur_row[i - 1].a; + } + + if (i == end) { + return; + } + + stopidx = i + channel->state.waitcnt; + + } +} + +static void quic_one_uncompress_row(Encoder *encoder, Channel *channel, + const one_byte_t * const prev_row, + one_byte_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + BYTE * const correlate_row = channel->correlate_row; + unsigned int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_one_uncompress_row_seg(encoder, channel, correlate_row, prev_row, cur_row, pos, + pos + channel->state.wmileft, bpc, bpc_mask); + pos += channel->state.wmileft; + width -= channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_one_uncompress_row_seg(encoder, channel, correlate_row, prev_row, cur_row, pos, + pos + width, bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "616", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "617", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "618", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + + + + + + + + +static inline BYTE quic_four_decorelate_0(const four_bytes_t * const curr, const unsigned int bpc_mask) +{ + return family_8bpc.xlatU2L[(unsigned)((int)curr[0].a - (int)((unsigned int)curr[-1].a)) & bpc_mask]; +} + +static inline void quic_four_corelate_0(four_bytes_t *curr, const BYTE corelate, + const unsigned int bpc_mask) +{ + curr->a = (family_8bpc.xlatL2U[corelate] + ((unsigned int)curr[-1].a)) & bpc_mask; +} + + + + +static inline BYTE quic_four_decorelate(const four_bytes_t *const prev, const four_bytes_t * const curr, + const unsigned int bpc_mask) +{ + return family_8bpc.xlatU2L[(unsigned)((int)curr->a - (int)((((unsigned int)curr[-1].a) + ((unsigned int)prev[0].a)) >> 1)) & bpc_mask]; +} + + +static inline void quic_four_corelate(const four_bytes_t *prev, four_bytes_t *curr, const BYTE corelate, + const unsigned int bpc_mask) +{ + curr->a = (family_8bpc.xlatL2U[corelate] + (int)((((unsigned int)curr[-1].a) + ((unsigned int)prev[0].a)) >> 1)) & bpc_mask; +} + +static void quic_four_compress_row0_seg(Encoder *encoder, Channel *channel, int i, + const four_bytes_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + BYTE * const decorelate_drow = channel->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "161", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (i == 0) { + unsigned int codeword, codewordlen; + + decorelate_drow[0] = family_8bpc.xlatU2L[cur_row->a]; + golomb_coding_8bpc(decorelate_drow[0], find_bucket_8bpc(channel, decorelate_drow[-1])->bestcode, + &codeword, &codewordlen); + encode(encoder, codeword, codewordlen); + + if (channel->state.waitcnt) { + channel->state.waitcnt--; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[-1]), + decorelate_drow[i], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + decorelate_drow[i] = quic_four_decorelate_0(&cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], + find_bucket_8bpc(channel, decorelate_drow[i - 1])->bestcode, &codeword, + &codewordlen); + encode(encoder, codeword, codewordlen); + } + + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[stopidx - 1]), + decorelate_drow[stopidx], bpc); + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + decorelate_drow[i] = quic_four_decorelate_0(&cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], find_bucket_8bpc(channel, decorelate_drow[i - 1])->bestcode, + &codeword, &codewordlen); + encode(encoder, codeword, codewordlen); + } + channel->state.waitcnt = stopidx - end; +} + +static void quic_four_compress_row0(Encoder *encoder, Channel *channel, const four_bytes_t *cur_row, + unsigned int width) +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_four_compress_row0_seg(encoder, channel, pos, cur_row, pos + channel->state.wmileft, + bppmask[channel->state.wmidx], bpc, bpc_mask); + width -= channel->state.wmileft; + pos += channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_four_compress_row0_seg(encoder, channel, pos, cur_row, pos + width, + bppmask[channel->state.wmidx], bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "236", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "237", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "238", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_four_compress_row_seg(Encoder *encoder, Channel *channel, int i, + const four_bytes_t * const prev_row, + const four_bytes_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + BYTE * const decorelate_drow = channel->correlate_row; + int stopidx; + + int run_index = 0; + int run_size; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "256", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + decorelate_drow[0] = family_8bpc.xlatU2L[(unsigned)((int)cur_row->a - + (int)prev_row->a) & bpc_mask]; + + golomb_coding_8bpc(decorelate_drow[0], + find_bucket_8bpc(channel, decorelate_drow[-1])->bestcode, + &codeword, + &codewordlen); + encode(encoder, codeword, codewordlen); + + if (channel->state.waitcnt) { + channel->state.waitcnt--; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[-1]), + decorelate_drow[0], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + decorelate_drow[i] = quic_four_decorelate(&prev_row[i], &cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], + find_bucket_8bpc(channel, decorelate_drow[i - 1])->bestcode, &codeword, + &codewordlen); + encode(encoder, codeword, codewordlen); + } + + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, decorelate_drow[stopidx - 1]), + decorelate_drow[stopidx], bpc); + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + decorelate_drow[i] = quic_four_decorelate(&prev_row[i], &cur_row[i], bpc_mask); + golomb_coding_8bpc(decorelate_drow[i], find_bucket_8bpc(channel, + decorelate_drow[i - 1])->bestcode, + &codeword, &codewordlen); + encode(encoder, codeword, codewordlen); + } + channel->state.waitcnt = stopidx - end; + + return; + + +do_run: + run_index = i; + channel->state.waitcnt = stopidx - i; + run_size = 0; + + while (cur_row[i].a == cur_row[i - 1].a) { + run_size++; + if (++i == end) { + + encode_channel_run(encoder, channel, run_size); + + + + return; + } + } + + encode_channel_run(encoder, channel, run_size); + + + + stopidx = i + channel->state.waitcnt; + + } +} + +static void quic_four_compress_row(Encoder *encoder, Channel *channel, + const four_bytes_t * const prev_row, + const four_bytes_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_four_compress_row_seg(encoder, channel, pos, prev_row, cur_row, + pos + channel->state.wmileft, bppmask[channel->state.wmidx], + bpc, bpc_mask); + width -= channel->state.wmileft; + pos += channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_four_compress_row_seg(encoder, channel, pos, prev_row, cur_row, pos + width, + bppmask[channel->state.wmidx], bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "378", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "379", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "380", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_four_uncompress_row0_seg(Encoder *encoder, Channel *channel, int i, + BYTE * const correlate_row, + four_bytes_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "393", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (i == 0) { + unsigned int codewordlen; + + correlate_row[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, + correlate_row[-1])->bestcode, + encoder->io_word, &codewordlen); + cur_row[0].a = (BYTE)family_8bpc.xlatL2U[correlate_row[0]]; + decode_eatbits(encoder, codewordlen); + + if (channel->state.waitcnt) { + --channel->state.waitcnt; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, correlate_row[-1]), + correlate_row[0], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + + while (stopidx < end) { + struct s_bucket * pbucket = ((void *)0); + + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + pbucket = find_bucket_8bpc(channel, correlate_row[i - 1]); + correlate_row[i] = (BYTE)golomb_decoding_8bpc(pbucket->bestcode, encoder->io_word, + &codewordlen); + quic_four_corelate_0(&cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + + update_model_8bpc(&channel->state, pbucket, correlate_row[stopidx], bpc); + + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + correlate_row[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, + correlate_row[i - 1])->bestcode, + encoder->io_word, &codewordlen); + quic_four_corelate_0(&cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + channel->state.waitcnt = stopidx - end; +} + +static void quic_four_uncompress_row0(Encoder *encoder, Channel *channel, + four_bytes_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + BYTE * const correlate_row = channel->correlate_row; + unsigned int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_four_uncompress_row0_seg(encoder, channel, pos, correlate_row, cur_row, + pos + channel->state.wmileft, bppmask[channel->state.wmidx], + bpc, bpc_mask); + pos += channel->state.wmileft; + width -= channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_four_uncompress_row0_seg(encoder, channel, pos, correlate_row, cur_row, pos + width, + bppmask[channel->state.wmidx], bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "478", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "479", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "480", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_four_uncompress_row_seg(Encoder *encoder, Channel *channel, + BYTE *correlate_row, + const four_bytes_t * const prev_row, + four_bytes_t * const cur_row, + int i, + const int end, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + const unsigned int waitmask = bppmask[channel->state.wmidx]; + int stopidx; + + int run_index = 0; + int run_end; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "499", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (i == 0) { + unsigned int codewordlen; + + correlate_row[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, correlate_row[-1])->bestcode, + encoder->io_word, &codewordlen); + cur_row[0].a = (family_8bpc.xlatL2U[correlate_row[0]] + prev_row[0].a) & bpc_mask; + decode_eatbits(encoder, codewordlen); + + if (channel->state.waitcnt) { + --channel->state.waitcnt; + } else { + channel->state.waitcnt = (tabrand(&channel->state.tabrand_seed) & waitmask); + update_model_8bpc(&channel->state, find_bucket_8bpc(channel, correlate_row[-1]), + correlate_row[0], bpc); + } + stopidx = ++i + channel->state.waitcnt; + } else { + stopidx = i + channel->state.waitcnt; + } + for (;;) { + while (stopidx < end) { + struct s_bucket * pbucket = ((void *)0); + + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + pbucket = find_bucket_8bpc(channel, correlate_row[i - 1]); + correlate_row[i] = (BYTE)golomb_decoding_8bpc(pbucket->bestcode, encoder->io_word, + &codewordlen); + quic_four_corelate(&prev_row[i], &cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + + update_model_8bpc(&channel->state, pbucket, correlate_row[stopidx], bpc); + + stopidx = i + (tabrand(&channel->state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + if (prev_row[i - 1].a == prev_row[i].a) { if (run_index != i && i > 2 && cur_row[i - 1].a == cur_row[i - 2].a) { goto do_run; } }; + ; + + correlate_row[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel, + correlate_row[i - 1])->bestcode, + encoder->io_word, &codewordlen); + quic_four_corelate(&prev_row[i], &cur_row[i], correlate_row[i], bpc_mask); + decode_eatbits(encoder, codewordlen); + } + + channel->state.waitcnt = stopidx - end; + + return; + + +do_run: + channel->state.waitcnt = stopidx - i; + run_index = i; + + run_end = i + decode_channel_run(encoder, channel); + + + + + for (; i < run_end; i++) { + cur_row[i].a = cur_row[i - 1].a; + } + + if (i == end) { + return; + } + + stopidx = i + channel->state.waitcnt; + + } +} + +static void quic_four_uncompress_row(Encoder *encoder, Channel *channel, + const four_bytes_t * const prev_row, + four_bytes_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + BYTE * const correlate_row = channel->correlate_row; + unsigned int pos = 0; + + while ((wmimax > (int)channel->state.wmidx) && (channel->state.wmileft <= width)) { + if (channel->state.wmileft) { + quic_four_uncompress_row_seg(encoder, channel, correlate_row, prev_row, cur_row, pos, + pos + channel->state.wmileft, bpc, bpc_mask); + pos += channel->state.wmileft; + width -= channel->state.wmileft; + } + + channel->state.wmidx++; + set_wm_trigger(&channel->state); + channel->state.wmileft = wminext; + } + + if (width) { + quic_four_uncompress_row_seg(encoder, channel, correlate_row, prev_row, cur_row, pos, + pos + width, bpc, bpc_mask); + if (wmimax > (int)channel->state.wmidx) { + channel->state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)channel->state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "616", __FUNCTION__, "assertion `%s' failed","(int)channel->state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channel->state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "617", __FUNCTION__, "assertion `%s' failed","channel->state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_tmpl.c" ":" "618", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + + + + + + + + + + +static void quic_rgb32_compress_row0_seg(Encoder *encoder, int i, + const rgb32_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "238", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + correlate_row_r[0] = family_8bpc.xlatU2L[((cur_row)->r)]; golomb_coding_8bpc(correlate_row_r[0], find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[0] = family_8bpc.xlatU2L[((cur_row)->g)]; golomb_coding_8bpc(correlate_row_g[0], find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[0] = family_8bpc.xlatU2L[((cur_row)->b)]; golomb_coding_8bpc(correlate_row_b[0], find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + encoder->rgb_state.waitcnt--; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb32_compress_row0(Encoder *encoder, const rgb32_pixel_t *cur_row, + unsigned int width) +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb32_compress_row0_seg(encoder, pos, cur_row, pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + width -= encoder->rgb_state.wmileft; + pos += encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb32_compress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "308", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "309", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "310", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb32_compress_row_seg(Encoder *encoder, int i, + const rgb32_pixel_t * const prev_row, + const rgb32_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + int run_index = 0; + int run_size; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "350", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + correlate_row_r[0] = family_8bpc.xlatU2L[(unsigned)((int)((cur_row)->r) - (int)((prev_row)->r) ) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[0], find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[0] = family_8bpc.xlatU2L[(unsigned)((int)((cur_row)->g) - (int)((prev_row)->g) ) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[0], find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[0] = family_8bpc.xlatU2L[(unsigned)((int)((cur_row)->b) - (int)((prev_row)->b) ) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[0], find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + encoder->rgb_state.waitcnt--; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + run_index = i; + encoder->rgb_state.waitcnt = stopidx - i; + run_size = 0; + + while ((((&cur_row[i])->r) == ((&cur_row[i - 1])->r) && ((&cur_row[i])->g) == ((&cur_row[i - 1])->g) && ((&cur_row[i])->b) == ((&cur_row[i - 1])->b))) { + run_size++; + if (++i == end) { + encode_run(encoder, run_size); + return; + } + } + encode_run(encoder, run_size); + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb32_compress_row(Encoder *encoder, + const rgb32_pixel_t * const prev_row, + const rgb32_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb32_compress_row_seg(encoder, pos, prev_row, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + width -= encoder->rgb_state.wmileft; + pos += encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb32_compress_row_seg(encoder, pos, prev_row, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "454", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "455", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "456", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb32_uncompress_row0_seg(Encoder *encoder, int i, + rgb32_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "493", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->r = (BYTE)family_8bpc.xlatL2U[correlate_row_r[0]]); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->g = (BYTE)family_8bpc.xlatL2U[correlate_row_g[0]]); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->b = (BYTE)family_8bpc.xlatL2U[correlate_row_b[0]]); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb32_uncompress_row0(Encoder *encoder, + rgb32_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb32_uncompress_row0_seg(encoder, pos, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb32_uncompress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "570", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "571", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "572", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb32_uncompress_row_seg(Encoder *encoder, + const rgb32_pixel_t * const prev_row, + rgb32_pixel_t * const cur_row, + int i, + const int end, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + const unsigned int waitmask = bppmask[encoder->rgb_state.wmidx]; + int stopidx; + + int run_index = 0; + int run_end; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "614", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->r = (family_8bpc.xlatL2U[correlate_row_r[0]] + ((prev_row)->r)) & bpc_mask); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->g = (family_8bpc.xlatL2U[correlate_row_g[0]] + ((prev_row)->g)) & bpc_mask); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->b = (family_8bpc.xlatL2U[correlate_row_b[0]] + ((prev_row)->b)) & bpc_mask); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + encoder->rgb_state.waitcnt = stopidx - i; + run_index = i; + run_end = i + decode_run(encoder); + + for (; i < run_end; i++) { + ((&cur_row[i])->pad = 0); + ((&cur_row[i])->r = ((&cur_row[i - 1])->r)); + ((&cur_row[i])->g = ((&cur_row[i - 1])->g)); + ((&cur_row[i])->b = ((&cur_row[i - 1])->b)); + } + + if (i == end) { + return; + } + + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb32_uncompress_row(Encoder *encoder, + const rgb32_pixel_t * const prev_row, + rgb32_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb32_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + encoder->rgb_state.wmileft, bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb32_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + width, bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "724", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "725", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "726", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + + + + + + + + +static void quic_rgb24_compress_row0_seg(Encoder *encoder, int i, + const rgb24_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "238", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + correlate_row_r[0] = family_8bpc.xlatU2L[((cur_row)->r)]; golomb_coding_8bpc(correlate_row_r[0], find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[0] = family_8bpc.xlatU2L[((cur_row)->g)]; golomb_coding_8bpc(correlate_row_g[0], find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[0] = family_8bpc.xlatU2L[((cur_row)->b)]; golomb_coding_8bpc(correlate_row_b[0], find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + encoder->rgb_state.waitcnt--; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb24_compress_row0(Encoder *encoder, const rgb24_pixel_t *cur_row, + unsigned int width) +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb24_compress_row0_seg(encoder, pos, cur_row, pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + width -= encoder->rgb_state.wmileft; + pos += encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb24_compress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "308", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "309", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "310", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb24_compress_row_seg(Encoder *encoder, int i, + const rgb24_pixel_t * const prev_row, + const rgb24_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + int run_index = 0; + int run_size; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "350", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + correlate_row_r[0] = family_8bpc.xlatU2L[(unsigned)((int)((cur_row)->r) - (int)((prev_row)->r) ) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[0], find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[0] = family_8bpc.xlatU2L[(unsigned)((int)((cur_row)->g) - (int)((prev_row)->g) ) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[0], find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[0] = family_8bpc.xlatU2L[(unsigned)((int)((cur_row)->b) - (int)((prev_row)->b) ) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[0], find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + encoder->rgb_state.waitcnt--; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + correlate_row_r[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->r) - (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_r[i], find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->g) - (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_g[i], find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_8bpc.xlatU2L[(unsigned)((int)((&cur_row[i])->b) - (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask]; golomb_coding_8bpc(correlate_row_b[i], find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + run_index = i; + encoder->rgb_state.waitcnt = stopidx - i; + run_size = 0; + + while ((((&cur_row[i])->r) == ((&cur_row[i - 1])->r) && ((&cur_row[i])->g) == ((&cur_row[i - 1])->g) && ((&cur_row[i])->b) == ((&cur_row[i - 1])->b))) { + run_size++; + if (++i == end) { + encode_run(encoder, run_size); + return; + } + } + encode_run(encoder, run_size); + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb24_compress_row(Encoder *encoder, + const rgb24_pixel_t * const prev_row, + const rgb24_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb24_compress_row_seg(encoder, pos, prev_row, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + width -= encoder->rgb_state.wmileft; + pos += encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb24_compress_row_seg(encoder, pos, prev_row, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "454", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "455", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "456", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb24_uncompress_row0_seg(Encoder *encoder, int i, + rgb24_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "493", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + ; + correlate_row_r[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->r = (BYTE)family_8bpc.xlatL2U[correlate_row_r[0]]); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->g = (BYTE)family_8bpc.xlatL2U[correlate_row_g[0]]); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->b = (BYTE)family_8bpc.xlatL2U[correlate_row_b[0]]); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b))) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb24_uncompress_row0(Encoder *encoder, + rgb24_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb24_uncompress_row0_seg(encoder, pos, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb24_uncompress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "570", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "571", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "572", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb24_uncompress_row_seg(Encoder *encoder, + const rgb24_pixel_t * const prev_row, + rgb24_pixel_t * const cur_row, + int i, + const int end, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + const unsigned int waitmask = bppmask[encoder->rgb_state.wmidx]; + int stopidx; + + int run_index = 0; + int run_end; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "614", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + ; + correlate_row_r[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->r = (family_8bpc.xlatL2U[correlate_row_r[0]] + ((prev_row)->r)) & bpc_mask); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->g = (family_8bpc.xlatL2U[correlate_row_g[0]] + ((prev_row)->g)) & bpc_mask); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->b = (family_8bpc.xlatL2U[correlate_row_b[0]] + ((prev_row)->b)) & bpc_mask); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + ; + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + + update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_8bpc(&encoder->rgb_state, find_bucket_8bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + if ((((&prev_row[i - 1])->r) == ((&prev_row[i])->r) && ((&prev_row[i - 1])->g) == ((&prev_row[i])->g) && ((&prev_row[i - 1])->b) == ((&prev_row[i])->b))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r) == ((&cur_row[i - 2])->r) && ((&cur_row[i - 1])->g) == ((&cur_row[i - 2])->g) && ((&cur_row[i - 1])->b) == ((&cur_row[i - 2])->b))) { goto do_run; } }; + ; + + ; + correlate_row_r[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((family_8bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r)) + ((unsigned int)((&prev_row[i])->r))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((family_8bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g)) + ((unsigned int)((&prev_row[i])->g))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_8bpc(find_bucket_8bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((family_8bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b)) + ((unsigned int)((&prev_row[i])->b))) >> 1)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + } + + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + encoder->rgb_state.waitcnt = stopidx - i; + run_index = i; + run_end = i + decode_run(encoder); + + for (; i < run_end; i++) { + ; + ((&cur_row[i])->r = ((&cur_row[i - 1])->r)); + ((&cur_row[i])->g = ((&cur_row[i - 1])->g)); + ((&cur_row[i])->b = ((&cur_row[i - 1])->b)); + } + + if (i == end) { + return; + } + + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb24_uncompress_row(Encoder *encoder, + const rgb24_pixel_t * const prev_row, + rgb24_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 8; + const unsigned int bpc_mask = 0xffU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb24_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + encoder->rgb_state.wmileft, bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb24_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + width, bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "724", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "725", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "726", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + + + + + + + + +static void quic_rgb16_compress_row0_seg(Encoder *encoder, int i, + const rgb16_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "238", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + correlate_row_r[0] = family_5bpc.xlatU2L[((*(cur_row) >> 10) & 0x1f)]; golomb_coding_5bpc(correlate_row_r[0], find_bucket_5bpc(channel_r, correlate_row_r[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[0] = family_5bpc.xlatU2L[((*(cur_row) >> 5) & 0x1f)]; golomb_coding_5bpc(correlate_row_g[0], find_bucket_5bpc(channel_g, correlate_row_g[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[0] = family_5bpc.xlatU2L[(*(cur_row) & 0x1f)]; golomb_coding_5bpc(correlate_row_b[0], find_bucket_5bpc(channel_b, correlate_row_b[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + encoder->rgb_state.waitcnt--; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + correlate_row_r[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 10) & 0x1f) - (int)((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f))) & bpc_mask]; golomb_coding_5bpc(correlate_row_r[i], find_bucket_5bpc(channel_r, correlate_row_r[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 5) & 0x1f) - (int)((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f))) & bpc_mask]; golomb_coding_5bpc(correlate_row_g[i], find_bucket_5bpc(channel_g, correlate_row_g[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_5bpc.xlatU2L[(unsigned)((int)(*(&cur_row[i]) & 0x1f) - (int)((unsigned int)(*((&cur_row[i]) - 1) & 0x1f))) & bpc_mask]; golomb_coding_5bpc(correlate_row_b[i], find_bucket_5bpc(channel_b, correlate_row_b[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + correlate_row_r[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 10) & 0x1f) - (int)((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f))) & bpc_mask]; golomb_coding_5bpc(correlate_row_r[i], find_bucket_5bpc(channel_r, correlate_row_r[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 5) & 0x1f) - (int)((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f))) & bpc_mask]; golomb_coding_5bpc(correlate_row_g[i], find_bucket_5bpc(channel_g, correlate_row_g[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_5bpc.xlatU2L[(unsigned)((int)(*(&cur_row[i]) & 0x1f) - (int)((unsigned int)(*((&cur_row[i]) - 1) & 0x1f))) & bpc_mask]; golomb_coding_5bpc(correlate_row_b[i], find_bucket_5bpc(channel_b, correlate_row_b[i -1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb16_compress_row0(Encoder *encoder, const rgb16_pixel_t *cur_row, + unsigned int width) +{ + const unsigned int bpc = 5; + const unsigned int bpc_mask = 0x1fU; + int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb16_compress_row0_seg(encoder, pos, cur_row, pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + width -= encoder->rgb_state.wmileft; + pos += encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb16_compress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "308", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "309", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "310", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb16_compress_row_seg(Encoder *encoder, int i, + const rgb16_pixel_t * const prev_row, + const rgb16_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + int run_index = 0; + int run_size; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "350", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codeword, codewordlen; + + correlate_row_r[0] = family_5bpc.xlatU2L[(unsigned)((int)((*(cur_row) >> 10) & 0x1f) - (int)((*(prev_row) >> 10) & 0x1f) ) & bpc_mask]; golomb_coding_5bpc(correlate_row_r[0], find_bucket_5bpc(channel_r, correlate_row_r[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[0] = family_5bpc.xlatU2L[(unsigned)((int)((*(cur_row) >> 5) & 0x1f) - (int)((*(prev_row) >> 5) & 0x1f) ) & bpc_mask]; golomb_coding_5bpc(correlate_row_g[0], find_bucket_5bpc(channel_g, correlate_row_g[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[0] = family_5bpc.xlatU2L[(unsigned)((int)(*(cur_row) & 0x1f) - (int)(*(prev_row) & 0x1f) ) & bpc_mask]; golomb_coding_5bpc(correlate_row_b[0], find_bucket_5bpc(channel_b, correlate_row_b[-1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + encoder->rgb_state.waitcnt--; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codeword, codewordlen; + + ; + if ((((*(&prev_row[i - 1]) >> 10) & 0x1f) == ((*(&prev_row[i]) >> 10) & 0x1f) && ((*(&prev_row[i - 1]) >> 5) & 0x1f) == ((*(&prev_row[i]) >> 5) & 0x1f) && (*(&prev_row[i - 1]) & 0x1f) == (*(&prev_row[i]) & 0x1f))) { if (run_index != i && i > 2 && (((*(&cur_row[i - 1]) >> 10) & 0x1f) == ((*(&cur_row[i - 2]) >> 10) & 0x1f) && ((*(&cur_row[i - 1]) >> 5) & 0x1f) == ((*(&cur_row[i - 2]) >> 5) & 0x1f) && (*(&cur_row[i - 1]) & 0x1f) == (*(&cur_row[i - 2]) & 0x1f))) { goto do_run; } }; + ; + + correlate_row_r[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 10) & 0x1f) - (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 10) & 0x1f))) >> 1)) & bpc_mask]; golomb_coding_5bpc(correlate_row_r[i], find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 5) & 0x1f) - (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 5) & 0x1f))) >> 1)) & bpc_mask]; golomb_coding_5bpc(correlate_row_g[i], find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_5bpc.xlatU2L[(unsigned)((int)(*(&cur_row[i]) & 0x1f) - (int)((((unsigned int)(*((&cur_row[i]) - 1) & 0x1f)) + ((unsigned int)(*(&prev_row[i]) & 0x1f))) >> 1)) & bpc_mask]; golomb_coding_5bpc(correlate_row_b[i], find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codeword, codewordlen; + + ; + if ((((*(&prev_row[i - 1]) >> 10) & 0x1f) == ((*(&prev_row[i]) >> 10) & 0x1f) && ((*(&prev_row[i - 1]) >> 5) & 0x1f) == ((*(&prev_row[i]) >> 5) & 0x1f) && (*(&prev_row[i - 1]) & 0x1f) == (*(&prev_row[i]) & 0x1f))) { if (run_index != i && i > 2 && (((*(&cur_row[i - 1]) >> 10) & 0x1f) == ((*(&cur_row[i - 2]) >> 10) & 0x1f) && ((*(&cur_row[i - 1]) >> 5) & 0x1f) == ((*(&cur_row[i - 2]) >> 5) & 0x1f) && (*(&cur_row[i - 1]) & 0x1f) == (*(&cur_row[i - 2]) & 0x1f))) { goto do_run; } }; + ; + + correlate_row_r[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 10) & 0x1f) - (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 10) & 0x1f))) >> 1)) & bpc_mask]; golomb_coding_5bpc(correlate_row_r[i], find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_g[i] = family_5bpc.xlatU2L[(unsigned)((int)((*(&cur_row[i]) >> 5) & 0x1f) - (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 5) & 0x1f))) >> 1)) & bpc_mask]; golomb_coding_5bpc(correlate_row_g[i], find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + correlate_row_b[i] = family_5bpc.xlatU2L[(unsigned)((int)(*(&cur_row[i]) & 0x1f) - (int)((((unsigned int)(*((&cur_row[i]) - 1) & 0x1f)) + ((unsigned int)(*(&prev_row[i]) & 0x1f))) >> 1)) & bpc_mask]; golomb_coding_5bpc(correlate_row_b[i], find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, &codeword, &codewordlen); encode(encoder, codeword, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + run_index = i; + encoder->rgb_state.waitcnt = stopidx - i; + run_size = 0; + + while ((((*(&cur_row[i]) >> 10) & 0x1f) == ((*(&cur_row[i - 1]) >> 10) & 0x1f) && ((*(&cur_row[i]) >> 5) & 0x1f) == ((*(&cur_row[i - 1]) >> 5) & 0x1f) && (*(&cur_row[i]) & 0x1f) == (*(&cur_row[i - 1]) & 0x1f))) { + run_size++; + if (++i == end) { + encode_run(encoder, run_size); + return; + } + } + encode_run(encoder, run_size); + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb16_compress_row(Encoder *encoder, + const rgb16_pixel_t * const prev_row, + const rgb16_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 5; + const unsigned int bpc_mask = 0x1fU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb16_compress_row_seg(encoder, pos, prev_row, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + width -= encoder->rgb_state.wmileft; + pos += encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb16_compress_row_seg(encoder, pos, prev_row, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "454", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "455", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "456", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb16_uncompress_row0_seg(Encoder *encoder, int i, + rgb16_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "493", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + (*(&cur_row[i]) = 0); + correlate_row_r[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[0]) = (*(&cur_row[0]) & ~(0x1f << 10)) | (((BYTE)family_5bpc.xlatL2U[correlate_row_r[0]]) << 10)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[0]) = (*(&cur_row[0]) & ~(0x1f << 5)) | (((BYTE)family_5bpc.xlatL2U[correlate_row_g[0]]) << 5)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[0]) = (*(&cur_row[0]) & ~0x1f) | ((BYTE)family_5bpc.xlatL2U[correlate_row_b[0]])); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + (*(&cur_row[i]) = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 10)) | ((((family_5bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f))) & bpc_mask)) << 10)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 5)) | ((((family_5bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f))) & bpc_mask)) << 5)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~0x1f) | (((family_5bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(*((&cur_row[i]) - 1) & 0x1f))) & bpc_mask))); decode_eatbits(encoder, codewordlen);; + } + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + (*(&cur_row[i]) = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 10)) | ((((family_5bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f))) & bpc_mask)) << 10)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 5)) | ((((family_5bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f))) & bpc_mask)) << 5)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~0x1f) | (((family_5bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(*((&cur_row[i]) - 1) & 0x1f))) & bpc_mask))); decode_eatbits(encoder, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb16_uncompress_row0(Encoder *encoder, + rgb16_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 5; + const unsigned int bpc_mask = 0x1fU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb16_uncompress_row0_seg(encoder, pos, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb16_uncompress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "570", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "571", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "572", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb16_uncompress_row_seg(Encoder *encoder, + const rgb16_pixel_t * const prev_row, + rgb16_pixel_t * const cur_row, + int i, + const int end, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + const unsigned int waitmask = bppmask[encoder->rgb_state.wmidx]; + int stopidx; + + int run_index = 0; + int run_end; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "614", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + (*(&cur_row[i]) = 0); + correlate_row_r[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[0]) = (*(&cur_row[0]) & ~(0x1f << 10)) | (((family_5bpc.xlatL2U[correlate_row_r[0]] + ((*(prev_row) >> 10) & 0x1f)) & bpc_mask) << 10)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[0]) = (*(&cur_row[0]) & ~(0x1f << 5)) | (((family_5bpc.xlatL2U[correlate_row_g[0]] + ((*(prev_row) >> 5) & 0x1f)) & bpc_mask) << 5)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[0]) = (*(&cur_row[0]) & ~0x1f) | ((family_5bpc.xlatL2U[correlate_row_b[0]] + (*(prev_row) & 0x1f)) & bpc_mask)); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + if ((((*(&prev_row[i - 1]) >> 10) & 0x1f) == ((*(&prev_row[i]) >> 10) & 0x1f) && ((*(&prev_row[i - 1]) >> 5) & 0x1f) == ((*(&prev_row[i]) >> 5) & 0x1f) && (*(&prev_row[i - 1]) & 0x1f) == (*(&prev_row[i]) & 0x1f))) { if (run_index != i && i > 2 && (((*(&cur_row[i - 1]) >> 10) & 0x1f) == ((*(&cur_row[i - 2]) >> 10) & 0x1f) && ((*(&cur_row[i - 1]) >> 5) & 0x1f) == ((*(&cur_row[i - 2]) >> 5) & 0x1f) && (*(&cur_row[i - 1]) & 0x1f) == (*(&cur_row[i - 2]) & 0x1f))) { goto do_run; } }; + ; + + (*(&cur_row[i]) = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 10)) | ((((family_5bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 10) & 0x1f))) >> 1)) & bpc_mask)) << 10)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 5)) | ((((family_5bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 5) & 0x1f))) >> 1)) & bpc_mask)) << 5)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~0x1f) | (((family_5bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(*((&cur_row[i]) - 1) & 0x1f)) + ((unsigned int)(*(&prev_row[i]) & 0x1f))) >> 1)) & bpc_mask))); decode_eatbits(encoder, codewordlen);; + } + + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + if ((((*(&prev_row[i - 1]) >> 10) & 0x1f) == ((*(&prev_row[i]) >> 10) & 0x1f) && ((*(&prev_row[i - 1]) >> 5) & 0x1f) == ((*(&prev_row[i]) >> 5) & 0x1f) && (*(&prev_row[i - 1]) & 0x1f) == (*(&prev_row[i]) & 0x1f))) { if (run_index != i && i > 2 && (((*(&cur_row[i - 1]) >> 10) & 0x1f) == ((*(&cur_row[i - 2]) >> 10) & 0x1f) && ((*(&cur_row[i - 1]) >> 5) & 0x1f) == ((*(&cur_row[i - 2]) >> 5) & 0x1f) && (*(&cur_row[i - 1]) & 0x1f) == (*(&cur_row[i - 2]) & 0x1f))) { goto do_run; } }; + ; + + (*(&cur_row[i]) = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 10)) | ((((family_5bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 10) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 10) & 0x1f))) >> 1)) & bpc_mask)) << 10)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 5)) | ((((family_5bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)((*((&cur_row[i]) - 1) >> 5) & 0x1f)) + ((unsigned int)((*(&prev_row[i]) >> 5) & 0x1f))) >> 1)) & bpc_mask)) << 5)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); (*(&cur_row[i]) = (*(&cur_row[i]) & ~0x1f) | (((family_5bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(*((&cur_row[i]) - 1) & 0x1f)) + ((unsigned int)(*(&prev_row[i]) & 0x1f))) >> 1)) & bpc_mask))); decode_eatbits(encoder, codewordlen);; + } + + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + encoder->rgb_state.waitcnt = stopidx - i; + run_index = i; + run_end = i + decode_run(encoder); + + for (; i < run_end; i++) { + (*(&cur_row[i]) = 0); + (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 10)) | ((((*(&cur_row[i - 1]) >> 10) & 0x1f)) << 10)); + (*(&cur_row[i]) = (*(&cur_row[i]) & ~(0x1f << 5)) | ((((*(&cur_row[i - 1]) >> 5) & 0x1f)) << 5)); + (*(&cur_row[i]) = (*(&cur_row[i]) & ~0x1f) | ((*(&cur_row[i - 1]) & 0x1f))); + } + + if (i == end) { + return; + } + + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb16_uncompress_row(Encoder *encoder, + const rgb16_pixel_t * const prev_row, + rgb16_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 5; + const unsigned int bpc_mask = 0x1fU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb16_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + encoder->rgb_state.wmileft, bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb16_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + width, bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "724", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "725", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "726", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + + + + + + + + +static void quic_rgb16_to_32_uncompress_row0_seg(Encoder *encoder, int i, + rgb32_pixel_t * const cur_row, + const int end, + const unsigned int waitmask, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + int stopidx; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "493", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->r = (((BYTE)family_5bpc.xlatL2U[correlate_row_r[0]]) << 3) | ((((BYTE)family_5bpc.xlatL2U[correlate_row_r[0]]) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->g = (((BYTE)family_5bpc.xlatL2U[correlate_row_g[0]]) << 3) | ((((BYTE)family_5bpc.xlatL2U[correlate_row_g[0]]) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->b = (((BYTE)family_5bpc.xlatL2U[correlate_row_b[0]]) << 3) | ((((BYTE)family_5bpc.xlatL2U[correlate_row_b[0]]) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((((family_5bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r >> 3))) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r >> 3))) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((((family_5bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g >> 3))) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g >> 3))) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((((family_5bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b >> 3))) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b >> 3))) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + } + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((((family_5bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r >> 3))) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_r[i]] + ((unsigned int)(((&cur_row[i]) - 1)->r >> 3))) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((((family_5bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g >> 3))) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_g[i]] + ((unsigned int)(((&cur_row[i]) - 1)->g >> 3))) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((((family_5bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b >> 3))) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_b[i]] + ((unsigned int)(((&cur_row[i]) - 1)->b >> 3))) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + } + encoder->rgb_state.waitcnt = stopidx - end; +} + +static void quic_rgb16_to_32_uncompress_row0(Encoder *encoder, + rgb32_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 5; + const unsigned int bpc_mask = 0x1fU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb16_to_32_uncompress_row0_seg(encoder, pos, cur_row, + pos + encoder->rgb_state.wmileft, + bppmask[encoder->rgb_state.wmidx], + bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb16_to_32_uncompress_row0_seg(encoder, pos, cur_row, pos + width, + bppmask[encoder->rgb_state.wmidx], bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "570", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "571", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "572", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + +static void quic_rgb16_to_32_uncompress_row_seg(Encoder *encoder, + const rgb32_pixel_t * const prev_row, + rgb32_pixel_t * const cur_row, + int i, + const int end, + const unsigned int bpc, + const unsigned int bpc_mask) +{ + Channel * const channel_r = encoder->channels; + Channel * const channel_g = channel_r + 1; + Channel * const channel_b = channel_g + 1; + + BYTE * const correlate_row_r = channel_r->correlate_row; + BYTE * const correlate_row_g = channel_g->correlate_row; + BYTE * const correlate_row_b = channel_b->correlate_row; + const unsigned int waitmask = bppmask[encoder->rgb_state.wmidx]; + int stopidx; + + int run_index = 0; + int run_end; + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (end - i > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "614", __FUNCTION__, "assertion `%s' failed","end - i > 0"); } while (0); } } while (0); + + if (!i) { + unsigned int codewordlen; + + ((&cur_row[i])->pad = 0); + correlate_row_r[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->r = (((family_5bpc.xlatL2U[correlate_row_r[0]] + ((prev_row)->r >> 3)) & bpc_mask) << 3) | ((((family_5bpc.xlatL2U[correlate_row_r[0]] + ((prev_row)->r >> 3)) & bpc_mask) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->g = (((family_5bpc.xlatL2U[correlate_row_g[0]] + ((prev_row)->g >> 3)) & bpc_mask) << 3) | ((((family_5bpc.xlatL2U[correlate_row_g[0]] + ((prev_row)->g >> 3)) & bpc_mask) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[0] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[-1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[0])->b = (((family_5bpc.xlatL2U[correlate_row_b[0]] + ((prev_row)->b >> 3)) & bpc_mask) << 3) | ((((family_5bpc.xlatL2U[correlate_row_b[0]] + ((prev_row)->b >> 3)) & bpc_mask) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + + if (encoder->rgb_state.waitcnt) { + --encoder->rgb_state.waitcnt; + } else { + encoder->rgb_state.waitcnt = (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[0 - 1]), correlate_row_r[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[0 - 1]), correlate_row_g[0], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[0 - 1]), correlate_row_b[0], bpc);; + } + stopidx = ++i + encoder->rgb_state.waitcnt; + } else { + stopidx = i + encoder->rgb_state.waitcnt; + } + for (;;) { + while (stopidx < end) { + for (; i <= stopidx; i++) { + unsigned int codewordlen; + + ; + if ((((&prev_row[i - 1])->r >> 3) == ((&prev_row[i])->r >> 3) && ((&prev_row[i - 1])->g >> 3) == ((&prev_row[i])->g >> 3) && ((&prev_row[i - 1])->b >> 3) == ((&prev_row[i])->b >> 3))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r >> 3) == ((&cur_row[i - 2])->r >> 3) && ((&cur_row[i - 1])->g >> 3) == ((&cur_row[i - 2])->g >> 3) && ((&cur_row[i - 1])->b >> 3) == ((&cur_row[i - 2])->b >> 3))) { goto do_run; } }; + ; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((((family_5bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r >> 3)) + ((unsigned int)((&prev_row[i])->r >> 3))) >> 1)) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r >> 3)) + ((unsigned int)((&prev_row[i])->r >> 3))) >> 1)) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((((family_5bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g >> 3)) + ((unsigned int)((&prev_row[i])->g >> 3))) >> 1)) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g >> 3)) + ((unsigned int)((&prev_row[i])->g >> 3))) >> 1)) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((((family_5bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b >> 3)) + ((unsigned int)((&prev_row[i])->b >> 3))) >> 1)) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b >> 3)) + ((unsigned int)((&prev_row[i])->b >> 3))) >> 1)) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + } + + update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_r, correlate_row_r[stopidx - 1]), correlate_row_r[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_g, correlate_row_g[stopidx - 1]), correlate_row_g[stopidx], bpc); update_model_5bpc(&encoder->rgb_state, find_bucket_5bpc(channel_b, correlate_row_b[stopidx - 1]), correlate_row_b[stopidx], bpc);; + + stopidx = i + (tabrand(&encoder->rgb_state.tabrand_seed) & waitmask); + } + + for (; i < end; i++) { + unsigned int codewordlen; + + ; + if ((((&prev_row[i - 1])->r >> 3) == ((&prev_row[i])->r >> 3) && ((&prev_row[i - 1])->g >> 3) == ((&prev_row[i])->g >> 3) && ((&prev_row[i - 1])->b >> 3) == ((&prev_row[i])->b >> 3))) { if (run_index != i && i > 2 && (((&cur_row[i - 1])->r >> 3) == ((&cur_row[i - 2])->r >> 3) && ((&cur_row[i - 1])->g >> 3) == ((&cur_row[i - 2])->g >> 3) && ((&cur_row[i - 1])->b >> 3) == ((&cur_row[i - 2])->b >> 3))) { goto do_run; } }; + ; + + ((&cur_row[i])->pad = 0); + correlate_row_r[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_r, correlate_row_r[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->r = ((((family_5bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r >> 3)) + ((unsigned int)((&prev_row[i])->r >> 3))) >> 1)) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_r[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->r >> 3)) + ((unsigned int)((&prev_row[i])->r >> 3))) >> 1)) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_g[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_g, correlate_row_g[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->g = ((((family_5bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g >> 3)) + ((unsigned int)((&prev_row[i])->g >> 3))) >> 1)) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_g[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->g >> 3)) + ((unsigned int)((&prev_row[i])->g >> 3))) >> 1)) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + correlate_row_b[i] = (BYTE)golomb_decoding_5bpc(find_bucket_5bpc(channel_b, correlate_row_b[i - 1])->bestcode, encoder->io_word, &codewordlen); ((&cur_row[i])->b = ((((family_5bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b >> 3)) + ((unsigned int)((&prev_row[i])->b >> 3))) >> 1)) & bpc_mask)) << 3) | (((((family_5bpc.xlatL2U[correlate_row_b[i]] + (int)((((unsigned int)(((&cur_row[i]) - 1)->b >> 3)) + ((unsigned int)((&prev_row[i])->b >> 3))) >> 1)) & bpc_mask)) & 0x1f) >> 2)); decode_eatbits(encoder, codewordlen);; + } + + encoder->rgb_state.waitcnt = stopidx - end; + + return; + + +do_run: + encoder->rgb_state.waitcnt = stopidx - i; + run_index = i; + run_end = i + decode_run(encoder); + + for (; i < run_end; i++) { + ((&cur_row[i])->pad = 0); + ((&cur_row[i])->r = ((((&cur_row[i - 1])->r >> 3)) << 3) | (((((&cur_row[i - 1])->r >> 3)) & 0x1f) >> 2)); + ((&cur_row[i])->g = ((((&cur_row[i - 1])->g >> 3)) << 3) | (((((&cur_row[i - 1])->g >> 3)) & 0x1f) >> 2)); + ((&cur_row[i])->b = ((((&cur_row[i - 1])->b >> 3)) << 3) | (((((&cur_row[i - 1])->b >> 3)) & 0x1f) >> 2)); + } + + if (i == end) { + return; + } + + stopidx = i + encoder->rgb_state.waitcnt; + + } +} + +static void quic_rgb16_to_32_uncompress_row(Encoder *encoder, + const rgb32_pixel_t * const prev_row, + rgb32_pixel_t * const cur_row, + unsigned int width) + +{ + const unsigned int bpc = 5; + const unsigned int bpc_mask = 0x1fU; + unsigned int pos = 0; + + while ((wmimax > (int)encoder->rgb_state.wmidx) && (encoder->rgb_state.wmileft <= width)) { + if (encoder->rgb_state.wmileft) { + quic_rgb16_to_32_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + encoder->rgb_state.wmileft, bpc, bpc_mask); + pos += encoder->rgb_state.wmileft; + width -= encoder->rgb_state.wmileft; + } + + encoder->rgb_state.wmidx++; + set_wm_trigger(&encoder->rgb_state); + encoder->rgb_state.wmileft = wminext; + } + + if (width) { + quic_rgb16_to_32_uncompress_row_seg(encoder, prev_row, cur_row, pos, + pos + width, bpc, bpc_mask); + if (wmimax > (int)encoder->rgb_state.wmidx) { + encoder->rgb_state.wmileft -= width; + } + } + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((int)encoder->rgb_state.wmidx <= wmimax) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "724", __FUNCTION__, "assertion `%s' failed","(int)encoder->rgb_state.wmidx <= wmimax"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (encoder->rgb_state.wmidx <= 32) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "725", __FUNCTION__, "assertion `%s' failed","encoder->rgb_state.wmidx <= 32"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (wminext > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic_rgb_tmpl.c" ":" "726", __FUNCTION__, "assertion `%s' failed","wminext > 0"); } while (0); } } while (0); +} + + +static void fill_model_structures(Encoder *encoder, FamilyStat *family_stat, + unsigned int rep_first, unsigned int first_size, + unsigned int rep_next, unsigned int mul_size, + unsigned int levels, unsigned int ncounters, + unsigned int nbuckets, unsigned int n_buckets_ptrs) +{ + unsigned int + bsize, + bstart, + bend = 0, + repcntr, + bnumber; + + COUNTER * free_counter = family_stat->counters; + + + bnumber = 0; + + repcntr = rep_first + 1; + bsize = first_size; + + do { + if (bnumber) { + bstart = bend + 1; + } else { + bstart = 0; + } + + if (!--repcntr) { + repcntr = rep_next; + bsize *= mul_size; + } + + bend = bstart + bsize - 1; + if (bend + bsize >= levels) { + bend = levels - 1; + } + + family_stat->buckets_buf[bnumber].pcounters = free_counter; + free_counter += ncounters; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (bstart < n_buckets_ptrs) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "861", __FUNCTION__, "assertion `%s' failed","bstart < n_buckets_ptrs"); } while (0); } } while (0); + { + unsigned int i; + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (bend < n_buckets_ptrs) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "864", __FUNCTION__, "assertion `%s' failed","bend < n_buckets_ptrs"); } while (0); } } while (0); + for (i = bstart; i <= bend; i++) { + family_stat->buckets_ptrs[i] = family_stat->buckets_buf + bnumber; + } + } + + bnumber++; + } while (bend < levels - 1); + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (free_counter - family_stat->counters == nbuckets * ncounters) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "873", __FUNCTION__, "assertion `%s' failed","free_counter - family_stat->counters == nbuckets * ncounters"); } while (0); } } while (0); +} + +static void find_model_params(Encoder *encoder, + const int bpc, + unsigned int *ncounters, + unsigned int *levels, + unsigned int *n_buckets_ptrs, + unsigned int *repfirst, + unsigned int *firstsize, + unsigned int *repnext, + unsigned int *mulsize, + unsigned int *nbuckets) +{ + unsigned int bsize; + unsigned int bstart, bend = 0; + unsigned int repcntr; + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (bpc <= 8 && bpc > 0) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "891", __FUNCTION__, "assertion `%s' failed","bpc <= 8 && bpc > 0"); } while (0); } } while (0); + + + *ncounters = 8; + + *levels = 0x1 << bpc; + + *n_buckets_ptrs = 0; + + switch (evol) { + case 1: + *repfirst = 3; + *firstsize = 1; + *repnext = 2; + *mulsize = 2; + break; + case 3: + *repfirst = 1; + *firstsize = 1; + *repnext = 1; + *mulsize = 2; + break; + case 5: + *repfirst = 1; + *firstsize = 1; + *repnext = 1; + *mulsize = 4; + break; + case 0: + case 2: + case 4: + encoder->usr->error(encoder->usr, "findmodelparams(): evol value obsolete!!!\n"); + default: + encoder->usr->error(encoder->usr, "findmodelparams(): evol out of range!!!\n"); + } + + *nbuckets = 0; + repcntr = *repfirst + 1; + bsize = *firstsize; + + do { + if (nbuckets) { + bstart = bend + 1; + } else { + bstart = 0; + } + + if (!--repcntr) { + repcntr = *repnext; + bsize *= *mulsize; + } + + bend = bstart + bsize - 1; + if (bend + bsize >= *levels) { + bend = *levels - 1; + } + + if (!*n_buckets_ptrs) { + *n_buckets_ptrs = *levels; + + } + + (*nbuckets)++; + } while (bend < *levels - 1); +} + +static int init_model_structures(Encoder *encoder, FamilyStat *family_stat, + unsigned int rep_first, unsigned int first_size, + unsigned int rep_next, unsigned int mul_size, + unsigned int levels, unsigned int ncounters, + unsigned int n_buckets_ptrs, unsigned int n_buckets) +{ + family_stat->buckets_ptrs = (s_bucket **)encoder->usr->malloc(encoder->usr, + n_buckets_ptrs * + sizeof(s_bucket *)); + if (!family_stat->buckets_ptrs) { + return (0); + } + + family_stat->counters = (COUNTER *)encoder->usr->malloc(encoder->usr, + n_buckets * sizeof(COUNTER) * + 8); + if (!family_stat->counters) { + goto error_1; + } + + family_stat->buckets_buf = (s_bucket *)encoder->usr->malloc(encoder->usr, + n_buckets * sizeof(s_bucket)); + if (!family_stat->buckets_buf) { + goto error_2; + } + + fill_model_structures(encoder, family_stat, rep_first, first_size, rep_next, mul_size, levels, + ncounters, n_buckets, n_buckets_ptrs); + + return (!(0)); + +error_2: + encoder->usr->free(encoder->usr, family_stat->counters); + +error_1: + encoder->usr->free(encoder->usr, family_stat->buckets_ptrs); + + return (0); +} + +static void free_family_stat(QuicUsrContext *usr, FamilyStat *family_stat) +{ + usr->free(usr, family_stat->buckets_ptrs); + usr->free(usr, family_stat->counters); + usr->free(usr, family_stat->buckets_buf); +} + +static int init_channel(Encoder *encoder, Channel *channel) +{ + unsigned int ncounters; + unsigned int levels; + unsigned int rep_first; + unsigned int first_size; + unsigned int rep_next; + unsigned int mul_size; + unsigned int n_buckets; + unsigned int n_buckets_ptrs; + + channel->encoder = encoder; + channel->state.encoder = encoder; + channel->correlate_row_width = 0; + channel->correlate_row = ((void *)0); + + find_model_params(encoder, 8, &ncounters, &levels, &n_buckets_ptrs, &rep_first, + &first_size, &rep_next, &mul_size, &n_buckets); + encoder->n_buckets_8bpc = n_buckets; + if (!init_model_structures(encoder, &channel->family_stat_8bpc, rep_first, first_size, + rep_next, mul_size, levels, ncounters, n_buckets_ptrs, + n_buckets)) { + return (0); + } + + find_model_params(encoder, 5, &ncounters, &levels, &n_buckets_ptrs, &rep_first, + &first_size, &rep_next, &mul_size, &n_buckets); + encoder->n_buckets_5bpc = n_buckets; + if (!init_model_structures(encoder, &channel->family_stat_5bpc, rep_first, first_size, + rep_next, mul_size, levels, ncounters, n_buckets_ptrs, + n_buckets)) { + free_family_stat(encoder->usr, &channel->family_stat_8bpc); + return (0); + } + + return (!(0)); +} + +static void destroy_channel(Channel *channel) +{ + QuicUsrContext *usr = channel->encoder->usr; + if (channel->correlate_row) { + usr->free(usr, channel->correlate_row - 1); + } + free_family_stat(usr, &channel->family_stat_8bpc); + free_family_stat(usr, &channel->family_stat_5bpc); +} + +static int init_encoder(Encoder *encoder, QuicUsrContext *usr) +{ + int i; + + encoder->usr = usr; + encoder->rgb_state.encoder = encoder; + + for (i = 0; i < 4; i++) { + if (!init_channel(encoder, &encoder->channels[i])) { + for (--i; i >= 0; i--) { + destroy_channel(&encoder->channels[i]); + } + return (0); + } + } + return (!(0)); +} + +static int encoder_reste(Encoder *encoder, uint32_t *io_ptr, uint32_t *io_ptr_end) +{ + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (((unsigned long)io_ptr % 4) == ((unsigned long)io_ptr_end % 4)) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1079", __FUNCTION__, "assertion `%s' failed","((unsigned long)io_ptr % 4) == ((unsigned long)io_ptr_end % 4)"); } while (0); } } while (0); + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (io_ptr <= io_ptr_end) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1080", __FUNCTION__, "assertion `%s' failed","io_ptr <= io_ptr_end"); } while (0); } } while (0); + + encoder->rgb_state.waitcnt = 0; + encoder->rgb_state.tabrand_seed = stabrand(); + encoder->rgb_state.wmidx = 0; + encoder->rgb_state.wmileft = wminext; + set_wm_trigger(&encoder->rgb_state); + + + encoder_init_rle(&encoder->rgb_state); + + + encoder->io_words_count = io_ptr_end - io_ptr; + encoder->io_now = io_ptr; + encoder->io_end = io_ptr_end; + encoder->rows_completed = 0; + + return (!(0)); +} + +static int encoder_reste_channels(Encoder *encoder, int channels, int width, int bpc) +{ + int i; + + encoder->num_channels = channels; + + for (i = 0; i < channels; i++) { + s_bucket *bucket; + s_bucket *end_bucket; + + if (encoder->channels[i].correlate_row_width < width) { + encoder->channels[i].correlate_row_width = 0; + if (encoder->channels[i].correlate_row) { + encoder->usr->free(encoder->usr, encoder->channels[i].correlate_row - 1); + } + if (!(encoder->channels[i].correlate_row = (BYTE *)encoder->usr->malloc(encoder->usr, + width + 1))) { + return (0); + } + encoder->channels[i].correlate_row++; + encoder->channels[i].correlate_row_width = width; + } + + if (bpc == 8) { + memset(encoder->channels[i].family_stat_8bpc.counters, 0, encoder->n_buckets_8bpc * sizeof(COUNTER) * 8) + ; + bucket = encoder->channels[i].family_stat_8bpc.buckets_buf; + end_bucket = bucket + encoder->n_buckets_8bpc; + for (; bucket < end_bucket; bucket++) { + bucket->bestcode = 8 - 1; + } + encoder->channels[i]._buckets_ptrs = encoder->channels[i].family_stat_8bpc.buckets_ptrs; + } else if (bpc == 5) { + memset(encoder->channels[i].family_stat_5bpc.counters, 0, encoder->n_buckets_5bpc * sizeof(COUNTER) * 8) + ; + bucket = encoder->channels[i].family_stat_5bpc.buckets_buf; + end_bucket = bucket + encoder->n_buckets_5bpc; + for (; bucket < end_bucket; bucket++) { + bucket->bestcode = 5 - 1; + } + encoder->channels[i]._buckets_ptrs = encoder->channels[i].family_stat_5bpc.buckets_ptrs; + } else { + encoder->usr->warn(encoder->usr, "%s: bad bpc %d\n", __FUNCTION__, bpc); + return (0); + } + + encoder->channels[i].state.waitcnt = 0; + encoder->channels[i].state.tabrand_seed = stabrand(); + encoder->channels[i].state.wmidx = 0; + encoder->channels[i].state.wmileft = wminext; + set_wm_trigger(&encoder->channels[i].state); + + + encoder_init_rle(&encoder->channels[i].state); + + } + return (!(0)); +} + +static void quic_image_params(Encoder *encoder, QuicImageType type, int *channels, int *bpc) +{ + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (channels && bpc) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1161", __FUNCTION__, "assertion `%s' failed","channels && bpc"); } while (0); } } while (0); + switch (type) { + case QUIC_IMAGE_TYPE_GRAY: + *channels = 1; + *bpc = 8; + break; + case QUIC_IMAGE_TYPE_RGB16: + *channels = 3; + *bpc = 5; + + + + break; + case QUIC_IMAGE_TYPE_RGB24: + *channels = 3; + *bpc = 8; + break; + case QUIC_IMAGE_TYPE_RGB32: + *channels = 3; + *bpc = 8; + break; + case QUIC_IMAGE_TYPE_RGBA: + *channels = 4; + *bpc = 8; + break; + case QUIC_IMAGE_TYPE_INVALID: + default: + *channels = 0; + *bpc = 0; + encoder->usr->error(encoder->usr, "bad image type\n"); + } +} + +int quic_encode(QuicContext *quic, QuicImageType type, int width, int height, + uint8_t *line, unsigned int num_lines, int stride, + uint32_t *io_ptr, unsigned int num_io_words) +{ + Encoder *encoder = (Encoder *)quic; + uint32_t *io_ptr_end = io_ptr + num_io_words; + uint8_t *lines_end; + int row; + uint8_t *prev; + int channels; + int bpc; + + + + + lines_end = line + num_lines * stride; + if (line == ((void *)0) && lines_end != line) { + do { spice_log("Spice", SPICE_LOG_LEVEL_WARNING, "quic.c" ":" "1243", __FUNCTION__, "should not be reached"); } while (0); + return -1; + } + + quic_image_params(encoder, type, &channels, &bpc); + + if (!encoder_reste(encoder, io_ptr, io_ptr_end) || + !encoder_reste_channels(encoder, channels, width, bpc)) { + return -1; + } + + encoder->io_word = 0; + encoder->io_available_bits = 32; + + encode_32(encoder, (*(uint32_t *)"QUIC")); + encode_32(encoder, ((0U << 16) | (0U & 0xffff))); + encode_32(encoder, type); + encode_32(encoder, width); + encode_32(encoder, height); + + { if (line == lines_end) { int n = encoder->usr->more_lines(encoder->usr, &line); if (n <= 0 || line == ((void *)0)) { encoder->usr->error(encoder->usr, "more lines failed\n"); } lines_end = line + n * stride; } }; + + switch (type) { + + case QUIC_IMAGE_TYPE_RGB32: + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= width * 4) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1268", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= width * 4"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; encoder->channels[1].correlate_row[-1] = 0; encoder->channels[2].correlate_row[-1] = 0; quic_rgb32_compress_row0(encoder, (rgb32_pixel_t *)(line), width); encoder->rows_completed++; for (row = 1; row < height; row++) { prev = line; { line += stride; { if (line == lines_end) { int n = encoder->usr->more_lines(encoder->usr, &line); if (n <= 0 || line == ((void *)0)) { encoder->usr->error(encoder->usr, "more lines failed\n"); } lines_end = line + n * stride; } }; }; encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; quic_rgb32_compress_row(encoder, (rgb32_pixel_t *)prev, (rgb32_pixel_t *)line, width); encoder->rows_completed++; }; + break; + case QUIC_IMAGE_TYPE_RGB24: + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= width * 3) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1272", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= width * 3"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; encoder->channels[1].correlate_row[-1] = 0; encoder->channels[2].correlate_row[-1] = 0; quic_rgb24_compress_row0(encoder, (rgb24_pixel_t *)(line), width); encoder->rows_completed++; for (row = 1; row < height; row++) { prev = line; { line += stride; { if (line == lines_end) { int n = encoder->usr->more_lines(encoder->usr, &line); if (n <= 0 || line == ((void *)0)) { encoder->usr->error(encoder->usr, "more lines failed\n"); } lines_end = line + n * stride; } }; }; encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; quic_rgb24_compress_row(encoder, (rgb24_pixel_t *)prev, (rgb24_pixel_t *)line, width); encoder->rows_completed++; }; + break; + case QUIC_IMAGE_TYPE_RGB16: + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= width * 2) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1276", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= width * 2"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; encoder->channels[1].correlate_row[-1] = 0; encoder->channels[2].correlate_row[-1] = 0; quic_rgb16_compress_row0(encoder, (rgb16_pixel_t *)(line), width); encoder->rows_completed++; for (row = 1; row < height; row++) { prev = line; { line += stride; { if (line == lines_end) { int n = encoder->usr->more_lines(encoder->usr, &line); if (n <= 0 || line == ((void *)0)) { encoder->usr->error(encoder->usr, "more lines failed\n"); } lines_end = line + n * stride; } }; }; encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; quic_rgb16_compress_row(encoder, (rgb16_pixel_t *)prev, (rgb16_pixel_t *)line, width); encoder->rows_completed++; }; + break; + case QUIC_IMAGE_TYPE_RGBA: + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= width * 4) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1280", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= width * 4"); } while (0); } } while (0); + + encoder->channels[0].correlate_row[-1] = 0; + encoder->channels[1].correlate_row[-1] = 0; + encoder->channels[2].correlate_row[-1] = 0; + quic_rgb32_compress_row0(encoder, (rgb32_pixel_t *)(line), width); + + encoder->channels[3].correlate_row[-1] = 0; + quic_four_compress_row0(encoder, &encoder->channels[3], (four_bytes_t *)(line + 3), width); + + encoder->rows_completed++; + + for (row = 1; row < height; row++) { + prev = line; + { line += stride; { if (line == lines_end) { int n = encoder->usr->more_lines(encoder->usr, &line); if (n <= 0 || line == ((void *)0)) { encoder->usr->error(encoder->usr, "more lines failed\n"); } lines_end = line + n * stride; } }; }; + encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; + encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; + encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; + quic_rgb32_compress_row(encoder, (rgb32_pixel_t *)prev, (rgb32_pixel_t *)line, width); + + encoder->channels[3].correlate_row[-1] = encoder->channels[3].correlate_row[0]; + quic_four_compress_row(encoder, &encoder->channels[3], (four_bytes_t *)(prev + 3), + (four_bytes_t *)(line + 3), width); + encoder->rows_completed++; + } + break; + + case QUIC_IMAGE_TYPE_GRAY: + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= width) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1348", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= width"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; + quic_one_compress_row0(encoder, &encoder->channels[0], (one_byte_t *)line, width); + encoder->rows_completed++; + for (row = 1; row < height; row++) { + prev = line; + { line += stride; { if (line == lines_end) { int n = encoder->usr->more_lines(encoder->usr, &line); if (n <= 0 || line == ((void *)0)) { encoder->usr->error(encoder->usr, "more lines failed\n"); } lines_end = line + n * stride; } }; }; + encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; + quic_one_compress_row(encoder, &encoder->channels[0], (one_byte_t *)prev, + (one_byte_t *)line, width); + encoder->rows_completed++; + } + break; + case QUIC_IMAGE_TYPE_INVALID: + default: + encoder->usr->error(encoder->usr, "bad image type\n"); + } + + flush(encoder); + encoder->io_words_count -= (encoder->io_end - encoder->io_now); + + return encoder->io_words_count; +} + +int quic_decode_begin(QuicContext *quic, uint32_t *io_ptr, unsigned int num_io_words, + QuicImageType *out_type, int *out_width, int *out_height) +{ + Encoder *encoder = (Encoder *)quic; + uint32_t *io_ptr_end = io_ptr + num_io_words; + QuicImageType type; + int width; + int height; + uint32_t magic; + uint32_t version; + int channels; + int bpc; + + if (!encoder_reste(encoder, io_ptr, io_ptr_end)) { + return -1; + } + + init_decode_io(encoder); + + magic = encoder->io_word; + decode_eat32bits(encoder); + if (magic != (*(uint32_t *)"QUIC")) { + encoder->usr->warn(encoder->usr, "bad magic\n"); + return -1; + } + + version = encoder->io_word; + decode_eat32bits(encoder); + if (version != ((0U << 16) | (0U & 0xffff))) { + encoder->usr->warn(encoder->usr, "bad version\n"); + return -1; + } + + type = (QuicImageType)encoder->io_word; + decode_eat32bits(encoder); + + width = encoder->io_word; + decode_eat32bits(encoder); + + height = encoder->io_word; + decode_eat32bits(encoder); + + quic_image_params(encoder, type, &channels, &bpc); + + if (!encoder_reste_channels(encoder, channels, width, bpc)) { + return -1; + } + + *out_width = encoder->width = width; + *out_height = encoder->height = height; + *out_type = encoder->type = type; + return 0; +} + +static void uncompress_rgba(Encoder *encoder, uint8_t *buf, int stride) +{ + unsigned int row; + uint8_t *prev; + + encoder->channels[0].correlate_row[-1] = 0; + encoder->channels[1].correlate_row[-1] = 0; + encoder->channels[2].correlate_row[-1] = 0; + quic_rgb32_uncompress_row0(encoder, (rgb32_pixel_t *)buf, encoder->width); + + encoder->channels[3].correlate_row[-1] = 0; + quic_four_uncompress_row0(encoder, &encoder->channels[3], (four_bytes_t *)(buf + 3), + encoder->width); + + encoder->rows_completed++; + for (row = 1; row < encoder->height; row++) { + prev = buf; + buf += stride; + + encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; + encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; + encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; + quic_rgb32_uncompress_row(encoder, (rgb32_pixel_t *)prev, (rgb32_pixel_t *)buf, + encoder->width); + + encoder->channels[3].correlate_row[-1] = encoder->channels[3].correlate_row[0]; + quic_four_uncompress_row(encoder, &encoder->channels[3], (four_bytes_t *)(prev + 3), + (four_bytes_t *)(buf + 3), encoder->width); + + encoder->rows_completed++; + } +} + + + +static void uncompress_gray(Encoder *encoder, uint8_t *buf, int stride) +{ + unsigned int row; + uint8_t *prev; + + encoder->channels[0].correlate_row[-1] = 0; + quic_one_uncompress_row0(encoder, &encoder->channels[0], (one_byte_t *)buf, encoder->width); + encoder->rows_completed++; + for (row = 1; row < encoder->height; row++) { + prev = buf; + buf += stride; + encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; + quic_one_uncompress_row(encoder, &encoder->channels[0], (one_byte_t *)prev, + (one_byte_t *)buf, encoder->width); + encoder->rows_completed++; + } +} + +int quic_decode(QuicContext *quic, QuicImageType type, uint8_t *buf, int stride) +{ + Encoder *encoder = (Encoder *)quic; + unsigned int row; + uint8_t *prev; + + + + + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (buf) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1518", __FUNCTION__, "assertion `%s' failed","buf"); } while (0); } } while (0); + + switch (encoder->type) { + + case QUIC_IMAGE_TYPE_RGB32: + case QUIC_IMAGE_TYPE_RGB24: + if (type == QUIC_IMAGE_TYPE_RGB32) { + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= (int)encoder->width * 4) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1525", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= (int)encoder->width * 4"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; + encoder->channels[1].correlate_row[-1] = 0; + encoder->channels[2].correlate_row[-1] = 0; + quic_rgb32_uncompress_row0(encoder, (rgb32_pixel_t *)buf, encoder->width); + encoder->rows_completed++; + for (row = 1; row < encoder->height; row++) + { + prev = buf; + buf += stride; + encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; + encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; + encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; + quic_rgb32_uncompress_row(encoder, (rgb32_pixel_t *)prev, (rgb32_pixel_t *)buf, encoder->width); + encoder->rows_completed++; + }; + break; + } else if (type == QUIC_IMAGE_TYPE_RGB24) { + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= (int)encoder->width * 3) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1529", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= (int)encoder->width * 3"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; encoder->channels[1].correlate_row[-1] = 0; encoder->channels[2].correlate_row[-1] = 0; quic_rgb24_uncompress_row0(encoder, (rgb24_pixel_t *)buf, encoder->width); encoder->rows_completed++; for (row = 1; row < encoder->height; row++) { prev = buf; buf += stride; encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; quic_rgb24_uncompress_row(encoder, (rgb24_pixel_t *)prev, (rgb24_pixel_t *)buf, encoder->width); encoder->rows_completed++; }; + break; + } + encoder->usr->warn(encoder->usr, "unsupported output format\n"); + return -1; + case QUIC_IMAGE_TYPE_RGB16: + if (type == QUIC_IMAGE_TYPE_RGB16) { + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= (int)encoder->width * 2) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1537", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= (int)encoder->width * 2"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; encoder->channels[1].correlate_row[-1] = 0; encoder->channels[2].correlate_row[-1] = 0; quic_rgb16_uncompress_row0(encoder, (rgb16_pixel_t *)buf, encoder->width); encoder->rows_completed++; for (row = 1; row < encoder->height; row++) { prev = buf; buf += stride; encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; quic_rgb16_uncompress_row(encoder, (rgb16_pixel_t *)prev, (rgb16_pixel_t *)buf, encoder->width); encoder->rows_completed++; }; + } else if (type == QUIC_IMAGE_TYPE_RGB32) { + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= (int)encoder->width * 4) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1540", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= (int)encoder->width * 4"); } while (0); } } while (0); + encoder->channels[0].correlate_row[-1] = 0; encoder->channels[1].correlate_row[-1] = 0; encoder->channels[2].correlate_row[-1] = 0; quic_rgb16_to_32_uncompress_row0(encoder, (rgb32_pixel_t *)buf, encoder->width); encoder->rows_completed++; for (row = 1; row < encoder->height; row++) { prev = buf; buf += stride; encoder->channels[0].correlate_row[-1] = encoder->channels[0].correlate_row[0]; encoder->channels[1].correlate_row[-1] = encoder->channels[1].correlate_row[0]; encoder->channels[2].correlate_row[-1] = encoder->channels[2].correlate_row[0]; quic_rgb16_to_32_uncompress_row(encoder, (rgb32_pixel_t *)prev, (rgb32_pixel_t *)buf, encoder->width); encoder->rows_completed++; }; + } else { + encoder->usr->warn(encoder->usr, "unsupported output format\n"); + return -1; + } + + break; + case QUIC_IMAGE_TYPE_RGBA: + + if (type != QUIC_IMAGE_TYPE_RGBA) { + encoder->usr->warn(encoder->usr, "unsupported output format\n"); + return -1; + } + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= (int)encoder->width * 4) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1554", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= (int)encoder->width * 4"); } while (0); } } while (0); + uncompress_rgba(encoder, buf, stride); + break; + + case QUIC_IMAGE_TYPE_GRAY: + + if (type != QUIC_IMAGE_TYPE_GRAY) { + encoder->usr->warn(encoder->usr, "unsupported output format\n"); + return -1; + } + do { if (__builtin_expect (__extension__ ({ int _g_boolean_var_; if ((((stride) < 0) ? -(stride) : (stride)) >= (int)encoder->width) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) { } else { do { spice_log("Spice", SPICE_LOG_LEVEL_ERROR, "quic.c" ":" "1630", __FUNCTION__, "assertion `%s' failed","ABS(stride) >= (int)encoder->width"); } while (0); } } while (0); + uncompress_gray(encoder, buf, stride); + break; + case QUIC_IMAGE_TYPE_INVALID: + default: + encoder->usr->error(encoder->usr, "bad image type\n"); + } + return 0; +} + +static int need_init = (!(0)); + +QuicContext *quic_create(QuicUsrContext *usr) +{ + Encoder *encoder; + + if (!usr || need_init || !usr->error || !usr->warn || !usr->info || !usr->malloc || + !usr->free || !usr->more_space || !usr->more_lines) { + return ((void *)0); + } + + if (!(encoder = (Encoder *)usr->malloc(usr, sizeof(Encoder)))) { + return ((void *)0); + } + + if (!init_encoder(encoder, usr)) { + usr->free(usr, encoder); + return ((void *)0); + } + return (QuicContext *)encoder; +} + +void quic_destroy(QuicContext *quic) +{ + Encoder *encoder = (Encoder *)quic; + int i; + + if (!quic) { + return; + } + + for (i = 0; i < 4; i++) { + destroy_channel(&encoder->channels[i]); + } + encoder->usr->free(encoder->usr, encoder); +} + +void quic_init(void) +{ + if (!need_init) { + return; + } + need_init = (0); + + family_init(&family_8bpc, 8, 26); + family_init(&family_5bpc, 5, 26); + + init_zeroLUT(); + +} + + + + + + + + + +#include + +void spice_log(const char *log_domain, + SpiceLogLevel log_level, + const char *strloc, + const char *function, + const char *format, + ...) +{ + va_list ap; + + fprintf(stderr, "%s-%s-%s: ", log_domain, strloc, function); + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + +} +void usr_msg(QuicUsrContext *usr, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + +} + +void *usr_malloc(QuicUsrContext *usr, int size) +{ + return malloc(size); +} + +void usr_free(QuicUsrContext *usr, void *ptr) +{ + free(ptr); +} + +int usr_more_space(QuicUsrContext *usr, uint32_t **io_ptr, int rows_completed) +{ +printf("wants more space, complete is %d\n", rows_completed); + return 0; +} +int usr_more_lines(QuicUsrContext *usr, uint8_t **lines) +{ +printf("what does more_lines mean?\n"); + return 0; +} + +void print_a_line(uint8_t *p, int width) +{ + uint32_t *pixel = (uint32_t *) p; + for (; width > 0; width--) + { + int r, g, b, a; + p = (uint8_t *) pixel++; + b = *(p++); + g = *(p++); + r = *(p++); + a = *(p++); + printf("%02x,%02x,%02x,%02x|", r, g, b, a); + } + printf("\n"); +} + +QuicContext *simple_quic_init(void) +{ + QuicUsrContext *usr = malloc(sizeof(*usr)); + + usr->warn = usr->error = usr->info = usr_msg; + usr->malloc = usr_malloc; + usr->free = usr_free; + usr->more_space = usr_more_space; + usr->more_lines = usr_more_lines; + + quic_init(); + return quic_create(usr); +} + +void simple_quic_term(QuicContext *q) +{ + quic_destroy(q); +} + +int simple_quic_decode(QuicContext *q, uint8_t *in, int inlen, + QuicImageType *type, int *width, int *height, uint8_t **out) +{ + int rc; + int stride = 4; /* FIXME - proper stride calc please */ + rc = quic_decode_begin(q, (uint32_t *)in, inlen / sizeof(uint32_t), + type, width, height); + if (rc != 0) + return rc; + if (*type != QUIC_IMAGE_TYPE_RGB32 && *type != QUIC_IMAGE_TYPE_RGBA) + { + fprintf(stderr, "Error - can't handle type %d yet\n", *type); + return -1; + } + + *out = malloc((*width) * (*height) * stride); + **out = 69; + rc = quic_decode(q, *type, *out, (*width) * stride); + return rc; +} + +int quic_decode_js(uint8_t *in, int inlen) +{ + int rc; + QuicImageType type; + int width; + int height; + uint8_t *out; + + static QuicContext *q = 0; + if (!q) + q = simple_quic_init(); + + rc = simple_quic_decode(q, in, inlen, &type, &width, &height, &out); + + /* Hack the Javascript *here* */ + return rc; +} + +void one_timeloop(uint8_t *in, int inlen) +{ + int rc; + QuicImageType type; + int width; + int height; + uint8_t *out; + + QuicContext *q = simple_quic_init(); + + rc = simple_quic_decode(q, in, inlen, &type, &width, &height, &out); + if (rc != 0) + fprintf(stderr, "Failure..."); + else + free(out); + + simple_quic_term(q); +} + + +int main(int argc, char *argv[]) +{ + QuicContext *q; + uint8_t membuf1[] = { 0x51,0x55,0x49,0x43,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x80,0x81,0x81,0x81,0xFF,0xAB,0x80,0x80,0xFF,0xFF,0x24,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x58,0x07,0x00,0x80,0x00,0xD6,0x01,0x00,0x40,0xC0,0x75,0x00,0xFA,0x3F,0x7F,0x40,0xC0,0x3A,0x00,0x00,0x00,0xB0,0x0E,0x00,0xFF,0xF5,0xAF,0x03,0xD6,0x01,0x00,0xB0,0x80,0x75,0x00,0x00,0x8F,0x7F,0x1D,0x00,0x0E,0x00,0x80,0xFD,0xAC,0x03,0x00,0xB0,0xFA,0xEB,0x00,0x00,0x00,0x00,0xD8,0xFF,0x3A,0x00,0x00,0xEB,0xBF,0x0E,0x00,0xC0,0x00,0x80,0xFD,0xAF,0x03,0x00,0xB0,0x0E,0xEB,0x00,0x00,0xAC,0x00,0x40,0x92,0xFA,0x03,0x00,0xB0,0x0E,0xEB,0x00,0x00,0xAC,0xC0,0x3A,0x00,0x00,0x00,0xB0,0x0E,0x00,0xFF,0x97,0xAF,0x03,0xFE,0x6F,0xFF,0x97,0xFB,0xBF,0xFD,0xDF,0xED,0xFF,0xF6,0x7F,0xB7,0xFF,0xDB,0xFF,0xDF,0xFE,0x6F,0xFF,0x7F,0xFB,0xBF,0xFD,0xFF,0xED,0xFF,0xF6,0xFF,0xB7,0xFF,0xDB,0xFD,0xDF,0xFE,0x6F,0xF6,0x7F,0xFB,0xBF,0xDA,0xFF,0xED,0xFF,0x00,0x00,0x00,0x00 }; + uint8_t membuf2[] = { 0x51,0x55,0x49,0x43,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x03,0x00,0x00,0x58,0x02,0x00,0x00,0xFF,0x80,0x80,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x55,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xFD,0x00,0x30,0xFA,0xFF,0x00,0xD6,0x01,0x00,0x00,0x80,0x75,0x00,0x10,0x10,0x70,0x1D,0x00,0x00,0xCF,0x1B,0x0E,0x00,0x40,0x3B,0xB7,0x03,0x00,0xD0,0x00,0x50,0xD2,0xEB,0x00,0x00,0xAC,0x03,0x3A,0x00,0x00,0xEB,0x00,0xE0,0x39,0xFE,0x01,0x00,0x68,0x07,0x76,0x00,0x00,0xDA,0x92,0x00,0x10,0xF8,0x08,0xFA,0xFA,0xFA,0xED,0x00,0x00,0x00,0x40,0x3B,0x00,0x00,0xD5,0xDF,0x0E,0x00,0xB0,0x0E,0x00,0x80,0x00,0xAC,0x03,0x00,0xE7,0xF8,0xEB,0x00,0xA0,0x1D,0x00,0x80,0x00,0x68,0x07,0x00,0x40,0xC0,0xDB,0x01,0xAF,0xAF,0x2F,0x09,0x00,0x00,0x40,0xA0,0x07,0x00,0xA0,0x1D,0xDB,0x01,0x00,0x68,0x2F,0x09,0x60,0xF2,0x80,0xA0,0xAF,0xAF,0x80,0x76,0x00,0x00,0x00,0xA0,0x1D,0x00,0x00,0x30,0x6F,0x07,0x00,0x00,0xD6,0x01,0x1D,0x00,0x80,0x75,0x07,0x00,0x80,0x7C,0xDA,0x01,0x00,0x68,0xFF,0x76,0x00,0x00,0x07,0x00,0xC0,0xED,0xD6,0x01,0x00,0x58,0xFD,0x75,0x00,0x00,0x1D,0x00,0x80,0xE7,0x68,0x07,0x00,0xA0,0xC0,0xDB,0x01,0x00,0xB0,0x0E,0x00,0x40,0x00,0xAC,0x03,0x00,0xFD,0x55,0xEB,0x00,0x00,0xAC,0xFF,0xFD,0x7F,0x7F,0x7F,0x49,0xDF,0x5F,0x12,0xE0,0x24,0x60,0xF8,0xDF,0xF3,0xBF,0xBF,0xBF,0xF5,0xF5,0x25,0x81,0x0E,0x00,0x00,0xF4,0xB4,0x03,0x00,0xD0,0xF8,0xED,0x00,0x00,0xFD,0xFD,0x25,0x01,0x00,0x60,0x97,0xFF,0x00,0xC0,0x3A,0x00,0x03,0x00,0xB0,0x0E,0xED,0x00,0x00,0xAC,0x40,0x3B,0x00,0x00,0xC0,0xDE,0x0E,0x00,0x00,0x58,0x07,0x00,0x00,0x00,0xD6,0x01,0x00,0x00,0xF4,0x75,0x0E,0x00,0x40,0x3B,0xB7,0x03,0x00,0xD0,0x00,0x20,0xF5,0xFF,0x00,0x00,0xAC,0x03,0x3A,0x00,0x00,0xEB,0x00,0xC0,0xF3,0xFE,0x03,0x00,0xD0,0x0E,0xED,0x00,0x00,0xB4,0x07,0x00,0x20,0xE0,0xD6,0x01,0x00,0x58,0x80,0x75,0x00,0x00,0x00,0xA0,0x1D,0x00,0x01,0x00,0x68,0x07,0x24,0x00,0xCE,0xDB,0xF3,0xBF,0xBF,0xBF,0xC0,0xC0,0x24,0x40,0x41,0x41,0xC1,0xC0,0x80,0xBF,0xBF,0x3F,0x00,0x60,0x1D,0x00,0x01,0x00,0x58,0x07,0x76,0x00,0x00,0xD6,0xA0,0x1D,0x00,0x80,0x18,0x6F,0x07,0x00,0x00,0xD6,0x01,0x00,0x00,0x80,0x75,0x00,0x07,0x00,0x60,0x1D,0xDA,0x01,0x00,0x68,0xF3,0x76,0x00,0x00,0x06,0x06,0x26,0x01,0xFC,0xFD,0xFD,0x05,0xFF,0xFE,0xFE,0x92,0x75,0x00,0x00,0xEE,0x60,0x1D,0x00,0x80,0x00,0x58,0x07,0x00,0x00,0x00,0xDA,0x01,0x1D,0x00,0x80,0x76,0x7F,0x49,0xA0,0xBE,0x00,0xF8,0x7F,0x7F,0x00,0x60,0x1D,0x00,0x01,0x00,0x58,0x07,0x76,0x00,0x00,0xD6,0xA0,0x1D,0x00,0x80,0x60,0x6F,0x07,0x00,0x00,0xAC,0x03,0x00,0x00,0x00,0xEB,0x00,0x00,0x00,0xFA,0x3A,0x07,0x00,0xA0,0x1D,0xDB,0x01,0x00,0x68,0x00,0x60,0xF5,0xFF,0x00,0x00,0xAC,0x03,0x3A,0x00,0x00,0xEB,0x00,0xC0,0xF3,0xFE,0x03,0x00,0xD0,0x0E,0xED,0x00,0x00,0xB4,0x07,0x00,0x20,0xE0,0xD6,0x01,0x00,0x58,0x80,0x75,0x00,0x00,0x00,0xA0,0x1D,0x00,0x01,0x00,0x68,0x07,0x24,0x00,0xD4,0xDB,0xF0,0xBF,0xBF,0xBF,0xB0,0x0E,0x00,0x40,0x00,0xAC,0x03,0x00,0x00,0x00,0xEB,0x00,0x0E,0x00,0x40,0x3B,0xB4,0x03,0x00,0xD0,0x00,0xED,0x00,0x00,0x00,0x40,0x3B,0x00,0x0C,0x4C,0xD2,0x0E,0x04,0x04,0x0C,0x0C,0xC0,0x24,0x60,0x00,0x40,0xC0,0xC0,0xC0,0x00,0x00,0x1C,0x40,0x3A,0x00,0x00,0xEB,0xB0,0x0E,0x00,0xC0,0x00,0xB4,0x03,0x00,0x00,0x00,0xED,0x00,0x01,0x00,0x78,0x3B,0x76,0x00,0x00,0xDA,0xBE,0x1D,0x00,0x80,0x14,0x0A,0x85,0x70,0x04,0x0C,0x0C,0x0C,0x00,0x08,0x07,0x04,0x00,0x00,0xD6,0x01,0x1D,0x00,0x80,0x75,0x68,0x07,0x00,0x60,0x00,0xDA,0x01,0x00,0x0F,0xF3,0x76,0x00,0x83,0xDE,0xA3,0x47,0xFF,0xFF,0xF8,0xF1,0xA3,0x47,0x0F,0xB3,0x40,0x80,0xE7,0xDE,0x3F,0x7E,0x00,0x81,0xE8,0x11,0xF0,0x1F,0x00,0x00,0x7A,0xF4,0x1D,0x00,0x80,0x76,0x6F,0x07,0x00,0xA0,0x28,0x14,0x02,0x06,0xA0,0xAF,0xAF,0x4F,0x8F,0x1F,0x3F,0x80,0x84,0x42,0x21,0xF8,0x20,0xFA,0xFA,0xFA,0xFC,0xC7,0x8F,0x1F,0x4F,0x28,0x14,0x42,0x07,0xA2,0xAF,0xAF,0x10,0xFF,0xF1,0xE3,0x7F,0x7F,0x42,0xA1,0x85,0x42,0xE4,0x7F,0xFF,0xFD,0xFD,0x09,0x7D,0x42,0xA1,0x90,0x00,0x00,0x7D,0x7D,0x03,0x00,0xD0,0x0E,0xED,0x00,0x00,0xB4,0x13,0x0A,0x85,0xF0,0x1F,0xEA,0xEB,0xEB,0x42,0xFE,0xC7,0x8F,0x02,0x02,0x0A,0x85,0x1E,0x3D,0x7A,0x00,0xD0,0x0E,0x00,0x80,0x00,0xB4,0x03,0x00,0xF1,0xE3,0xED,0x00,0x1E,0xFD,0xFF,0xF8,0x00,0xA0,0x47,0x8F,0x01,0x00,0x68,0x07,0x76,0x00,0x00,0xDA,0x4F,0x28,0x14,0xF2,0x21,0xFE,0xEF,0xEF,0xFE,0xFE,0x84,0x42,0xD1,0xA3,0xC7,0xFF,0xDA,0x01,0x00,0xE8,0x80,0x76,0x00,0x00,0x50,0xBF,0x1D,0x00,0x7D,0x7D,0x42,0xA1,0xF8,0xF1,0x83,0x7D,0x84,0x42,0xA1,0xFF,0x49,0xFE,0xFE,0xFE,0x00,0x7D,0x7D,0x7D,0x00,0xA0,0x1D,0x00,0x01,0x00,0x68,0x07,0x3D,0x7A,0xF8,0xDB,0x1D,0x00,0x80,0x1E,0x68,0x07,0x00,0xA0,0xE4,0xDB,0x01,0x00,0x5F,0x9F,0x50,0x28,0x7E,0xFC,0x60,0x5F,0xA1,0x50,0xE8,0x3F,0xE0,0xBE,0xBE,0x3E,0xF2,0x3F,0x7E,0xFC,0xAF,0x4F,0x28,0x14,0x03,0x00,0xA0,0xAF,0xED,0x00,0x00,0xB4,0x7E,0x3B,0x00,0x00,0xF5,0x09,0x85,0x42,0xC7,0x0F,0xF6,0xF5,0x42,0x21,0xFF,0xE3,0xFB,0xFA,0xFA,0x84,0xFF,0xF1,0xE3,0x07,0xAC,0x03,0x00,0xE0,0x00,0xEB,0x00,0x00,0x00,0xC0,0x3A,0x00,0x03,0x00,0xD0,0x0E,0xED,0x00,0x00,0xB4,0xA3,0x47,0x0F,0xFE,0xF8,0xF1,0x83,0xDF,0xA1,0xFF,0xFF,0xFF,0xDF,0xA3,0x47,0x0F,0x00,0x81,0xC0,0xBC,0xF0,0x1F,0x3F,0x7E,0x7A,0xF4,0xE8,0x11,0x80,0x76,0x00,0x00,0x00,0xA0,0x1D,0x00,0x0A,0x0D,0x6F,0x07,0xF7,0xF7,0x27,0x14,0xAC,0x03,0x00,0xF0,0x00,0xEB,0x00,0x00,0x7F,0xD5,0x3A,0x00,0x0A,0x03,0x7F,0x7F,0xF7,0xF7,0x27,0x14,0x0C,0x0C,0x4C,0xF2,0xF8,0xFB,0xFB,0x0B,0x7F,0x42,0xA1,0x30,0x00,0x00,0x7F,0x7F,0x0E,0x00,0xC0,0x3A,0xAC,0x03,0x00,0xB0,0x00,0xED,0x00,0x00,0x00,0x40,0x3B,0x00,0xF4,0x08,0xDE,0x0E,0x00,0x00,0x3D,0x7A,0x0E,0x00,0x40,0x3B,0xB6,0x03,0x00,0xD0,0xF1,0x03,0x08,0x04,0xD1,0x03,0xFC,0xF8,0x3F,0x7E,0xF4,0xE8,0x00,0x81,0xC0,0x1F,0x7F,0x42,0xA1,0xB0,0xF1,0xE3,0x7F,0x7F,0x00,0x00,0xFC,0xF8,0x03,0x00,0xB0,0x0E,0xEB,0x00,0x00,0xAC,0x02,0x02,0x02,0x56,0x28,0x14,0x0A,0x21,0x08,0x18,0x18,0x18,0x82,0x82,0x02,0x08,0x7F,0x7F,0x7F,0x82,0xC0,0xC0,0xC0,0x24,0x04,0x40,0x40,0xC0,0x20,0xA0,0x50,0x28,0xD1,0xA3,0x07,0x20,0xF8,0xF1,0x03,0xE9,0xA1,0x50,0x88,0xFF,0xBF,0xC0,0xC0,0x40,0x50,0x98,0xBF,0xBF,0xBF,0xBF,0x3F,0xA1,0x60,0x1D,0x00,0x80,0x00,0x58,0x07,0x00,0x00,0x00,0xD6,0x01,0x1D,0x00,0x80,0x75,0x5C,0x07,0x00,0x60,0xDF,0x5F,0x30,0x18,0x84,0x42,0xE1,0xDF,0x02,0xFF,0xFE,0xFE,0x0A,0x85,0x04,0x04,0x0C,0x0C,0x0C,0x14,0x42,0x02,0x04,0x04,0x06,0x06,0x0A,0x85,0xFE,0xFD,0xFD,0x05,0xFD,0x09,0x85,0x42,0x3D,0x7A,0xFC,0xFD,0x05,0x83,0xC1,0x1E,0x42,0xFE,0xFD,0xFD,0xFD,0xFD,0x09,0x85,0x03,0x08,0x04,0xFE,0x00,0xFC,0xF8,0xF1,0x00,0x80,0x75,0x00,0x07,0x00,0x60,0x1D,0xDA,0x01,0x00,0x58,0x80,0x76,0x00,0x00,0x20,0xB0,0x1D,0x00,0x42,0xA1,0x90,0x40,0x7F,0x81,0x81,0x81,0x42,0xA1,0x7F,0x7F,0xFF,0xFE,0xFE,0x84,0x18,0x28,0x14,0x0A,0xF7,0xF7,0x17,0x18,0x4F,0x28,0x14,0xFA,0x20,0xF0,0xEF,0xEF,0xE8,0xD1,0xC3,0x40,0x1F,0x3F,0x7E,0xF4,0xC1,0x03,0x81,0xC0,0x02,0x7B,0xF4,0xE8,0x8F,0x1F,0x0C,0x04,0xFD,0xFF,0xFF,0xC7,0x1E,0x3D,0x7A,0x08,0x08,0x04,0xE6,0xFD,0xFF,0xF8,0xF1,0x03,0xA3,0x47,0x8F,0x80,0xB4,0x03,0x00,0xD0,0x00,0xED,0x00,0x00,0x30,0x78,0x3B,0x00,0x7D,0x42,0xA1,0x10,0xFD,0x09,0x7D,0x7D,0x00,0x00,0xFC,0xFD,0x3A,0x00,0x00,0xEB,0xB0,0x0E,0x00,0xC0,0x00,0xB4,0x03,0x00,0x00,0x00,0xED,0x00,0xD1,0x23,0x78,0x3B,0x00,0x00,0xF4,0xE8,0x3B,0x00,0x00,0xED,0xD0,0x0E,0x00,0x40,0x00,0xAC,0x03,0x00,0x00,0x00,0xEB,0x00,0xD1,0xA3,0xC7,0x3A,0xDF,0xDF,0xDF,0xE8,0xE8,0xD1,0xA3,0xC7,0x81,0x3F,0x7E,0xFC,0xA3,0x47,0x00,0x02,0x7E,0xFC,0xE8,0xD1,0x00,0x02,0x81,0x3F,0xD1,0xA3,0x47,0x8F,0x02,0x7F,0xFC,0xF8,0x50,0x08,0x02,0x04,0xBE,0xBE,0x3E,0xA1,0xFC,0xFB,0xFB,0x93,0x08,0x30,0x10,0x08,0xC0,0x40,0xA1,0x50,0x40,0x40,0xC0,0xC0,0x0A,0x0A,0x0A,0x42,0x02,0x06,0x06,0x06,0xD7,0x07,0x01,0x02,0x60,0x30,0xD8,0xD7,0xC0,0xBF,0xBF,0xBF,0x47,0x8F,0x00,0x81,0xF4,0xE8,0xD1,0xA3,0xDF,0xDF,0xDF,0x7A,0xEC,0xD1,0xA3,0xC7,0x20,0x60,0x30,0x18,0x0A,0x85,0x28,0x20,0x0C,0x0C,0x0C,0x14,0x82,0x05,0x04,0x04,0x7D,0x7D,0x82,0x82,0xF1,0xE3,0x07,0x7D,0x3F,0x7E,0xFC,0xF8,0xF4,0x00,0x02,0x81,0x8F,0x1F,0x3D,0x7A,0x40,0x20,0xF0,0xC7,0xE8,0xD1,0xA3,0x47,0x81,0x3F,0x7E,0xFC,0x1E,0x3D,0x02,0x02,0xF1,0xE3,0x47,0x8F,0x20,0x10,0x08,0xFC,0x1F,0x3D,0x7A,0xF4,0x20,0xF0,0xC7,0x8F,0xF4,0xE8,0xC1,0x40,0x8F,0x1E,0x3D,0x7A,0xFC,0xFB,0xFB,0x6B,0xF4,0x20,0x10,0x08,0x8F,0x1F,0x3D,0x7A,0x40,0x20,0xF0,0xC7,0x3D,0x7A,0xF4,0xE0,0x07,0x06,0x02,0x81,0x08,0xFC,0xF1,0xE3,0xFC,0xDF,0x3F,0x10,0x1E,0x3D,0x7A,0xD4,0x79,0x03,0x81,0xC0,0xFC,0x00,0x02,0x81,0x02,0x81,0x3F,0x7E,0x7A,0xF4,0x08,0x00,0xC7,0x8F,0x1F,0x3D,0x04,0x40,0x20,0xF0,0x50,0x28,0x14,0x02,0xEF,0x2F,0x30,0x30,0x3D,0x80,0xE0,0xEF,0xE3,0x47,0x8F,0x1E,0x7A,0xF4,0xF8,0xF1,0xC7,0x8F,0x1F,0x3D,0x08,0x40,0x20,0xF0,0x1F,0x3D,0x7A,0xF4,0xD1,0xE3,0xC7,0x8F,0x18,0x0C,0xF6,0xE8,0xE4,0xEF,0xEF,0x2F,0xFB,0x13,0x0A,0x85,0x50,0x28,0xFC,0xFB,0x60,0x60,0x60,0xA0,0x7A,0x08,0x20,0x20,0xC7,0x8F,0x1E,0x3D,0x20,0x10,0xF8,0xE3,0x0A,0x85,0x42,0x08,0xFD,0x05,0x06,0x06,0xF4,0x40,0xFC,0xFD,0x8F,0x1F,0x3D,0x7A,0x40,0x20,0xF0,0xC7,0x1E,0x3D,0x7A,0xD0,0xF8,0xE3,0xC7,0x8F,0xF5,0x41,0x20,0x10,0x3F,0x7E,0xF4,0xF5,0x01,0x81,0xC0,0x1F,0x8F,0xBE,0xBE,0x3E,0x10,0xF8,0xE3,0xC7,0xF4,0xE8,0x21,0x20,0x17,0x0C,0x06,0x7B,0x3D,0xF6,0xF7,0xF7,0xE3,0x47,0x8F,0x1E,0x10,0x08,0xFC,0xF1,0x1E,0x3D,0x7A,0x20,0xF8,0xE3,0xC7,0x8F,0x28,0x4C,0x20,0x10,0xDF,0xDF,0x9F,0x50,0x3D,0x80,0x40,0xE0,0xE3,0x47,0x8F,0x1E,0x10,0x08,0xFC,0xF1,0x3D,0x7A,0xF4,0x08,0xF0,0xC7,0x8F,0x1F,0xA3,0x47,0x40,0x20,0x7E,0xFC,0xE8,0xD1,0x02,0x02,0x81,0x3F,0x47,0x8F,0x1E,0x3D,0x08,0xFC,0xF1,0xE3,0x7A,0xF4,0x28,0x10,0x0B,0x06,0x83,0x3D,0x03,0xFF,0xFB,0xFB,0x7E,0xF4,0xE8,0xD1,0x81,0xC0,0x1F,0x3F,0xE8,0xD1,0x03,0x03,0x10,0x08,0x04,0xF6,0xE0,0x8F,0x1F,0x3F,0xFA,0xFF,0x81,0x40,0x3D,0x7A,0xF4,0x30,0xF3,0x06,0x02,0x81,0xF8,0x01,0x04,0x02,0x04,0x02,0x7F,0xFC,0xF4,0xE8,0x11,0x00,0x8F,0x1F,0x3F,0x7A,0x08,0x80,0x40,0xE0,0x8F,0x1E,0x3D,0x7A,0x10,0xF8,0xE3,0xC7,0x0A,0x85,0x00,0x20,0x00,0x04,0x04,0x14,0x1E,0x3F,0x7E,0xFC,0xD1,0xA3,0x47,0x8F,0x30,0x28,0xF4,0xE8,0x40,0x40,0xC0,0x60,0xD1,0xA3,0x47,0x0F,0x02,0x7F,0xFC,0xF8,0x0A,0x41,0x00,0x04,0xF7,0xF7,0x27,0x14,0x0F,0x20,0x10,0xF8,0xF8,0xD1,0xA3,0x47,0x1E,0x3D,0x7E,0xFC,0xF1,0xE3,0x47,0x8F,0x04,0x10,0x08,0xFC,0x47,0x8F,0x1E,0x3D,0x08,0xFC,0xF1,0xE3,0x3D,0x7A,0x04,0x10,0xE3,0xC7,0x8F,0x1E,0x04,0x20,0x10,0xF8,0x20,0xA0,0x50,0x28,0xF1,0xE3,0x07,0x20,0x04,0x10,0x08,0xFC,0xFE,0x84,0x42,0x21,0x04,0x02,0xFF,0xFE,0xA1,0x50,0x88,0x09,0xC0,0xC0,0xC0,0x40,0x82,0x40,0x40,0x40,0x81,0x81,0x82,0x82,0x82,0x82,0x82,0x81,0x81,0x7F,0x7F,0x7F,0x7D,0x7D,0x01,0x02,0xC7,0x8F,0x1F,0x7D,0x43,0x40,0x20,0xF0,0x7E,0xF4,0xE8,0xD1,0x81,0xC0,0x1F,0x3F,0x84,0x42,0x21,0x01,0x3D,0xFE,0xFE,0xFE,0xE3,0x47,0x8F,0x1E,0x10,0x08,0xFC,0xF1,0x28,0x14,0x0A,0x29,0x08,0x18,0x18,0x18,0x85,0x42,0x0A,0x08,0xFE,0xFD,0xFD,0x09,0xF1,0x03,0x08,0x04,0x28,0x14,0xFE,0xF8,0xE3,0xEF,0xEF,0x4F,0x7A,0xF4,0xE8,0xD1,0x30,0xD8,0x1E,0x3D,0x40,0x40,0xC0,0x60,0x7A,0xF4,0xE8,0x51,0xE0,0x8F,0x1F,0x3F,0xA3,0x07,0x81,0x40,0x7E,0xFC,0xE8,0xD1,0x04,0x02,0x81,0x3F,0xFD,0x09,0x85,0x42,0x3D,0x7A,0xFC,0xFD,0xE3,0xC7,0x8F,0x1E,0x48,0x20,0x10,0xF8,0xBF,0x3F,0xA1,0x50,0x03,0x81,0xC0,0xBF,0xD1,0xA3,0x47,0x0F,0x02,0x7F,0xFC,0xF8,0xA3,0x07,0x0F,0x04,0x10,0x08,0xEC,0xD1,0x1F,0x3F,0x7E,0x30,0xFF,0x03,0x81,0xC0,0x3D,0x7A,0x08,0xFD,0x02,0x81,0xC0,0x1E,0x02,0x81,0x60,0xB3,0x3F,0x7E,0xFC,0x00,0x11,0x00,0x02,0x81,0x3F,0x7A,0xF4,0xE8,0x40,0xE0,0x8F,0x1F,0x28,0x14,0x0E,0x80,0xB0,0xAF,0xAF,0x4F,0x7D,0x7D,0xC1,0x60,0xC7,0x8F,0x1F,0x7D,0xF6,0xE8,0xD1,0xE3,0xEF,0x2F,0x18,0x0C,0x85,0x42,0xE2,0xEF,0xF4,0xF5,0xF5,0x09,0xC0,0x60,0x30,0x18,0x14,0x0A,0x40,0x40,0x30,0x30,0x50,0x28,0x02,0x10,0x10,0x30,0x40,0xA1,0x50,0x08,0x47,0x0F,0x40,0x40,0x8F,0x1F,0xD0,0xA3,0x40,0x20,0xF0,0xC7,0xF0,0xC7,0x8F,0x1F,0x7D,0x7D,0x42,0xA1,0x0B,0x06,0x83,0x7D,0xFC,0xE8,0xEB,0xEB,0x02,0x81,0x3F,0x7E,0x0A,0x85,0x42,0x00,0x7A,0x00,0x02,0x02,0xFC,0x80,0x1E,0x3D,0x02,0x81,0x3F,0x7E,0xD1,0xA3,0x87,0x04,0x3F,0x7E,0xFC,0xE8,0x10,0x03,0x02,0x81,0x81,0x81,0x42,0xA1,0x80,0x80,0x80,0x81,0xF0,0xC7,0x8F,0x1F,0x7F,0x7F,0x42,0xA1,0x00,0x02,0x81,0x7F,0x1F,0x3D,0x7A,0xF4,0x20,0xF0,0xC7,0x8F,0x42,0xA1,0x70,0x40,0x30,0x7D,0x7D,0x7D,0x80,0x80,0xC1,0x60,0x47,0x8F,0x1E,0x80,0xFE,0xF8,0xF1,0xA3,0x3D,0x12,0x08,0x04,0xE3,0x47,0x8F,0x1E,0x10,0x08,0xFC,0xF1,0x09,0x0A,0x0A,0x2A,0x83,0xF5,0xF5,0xF5,0x04,0x04,0x0C,0x06,0x3D,0x7A,0xF4,0x00,0xFB,0x0B,0x06,0x83,0x50,0x08,0xFE,0xFB,0x40,0x40,0x40,0xA1,0xD0,0xA3,0x47,0x0F,0xC0,0x1F,0x3F,0x7E,0x3F,0x7E,0x00,0x81,0x09,0x85,0xC2,0x1F,0x83,0xF5,0xF5,0xF5,0x04,0x04,0x0C,0x06,0x3F,0x7E,0xFC,0x00,0xEB,0x13,0x0A,0x85,0x0C,0x06,0xEB,0xEB,0x0C,0x08,0x08,0x18,0xA3,0x47,0x8F,0x1E,0x04,0xFE,0xF8,0xF1,0x8F,0x1E,0x1C,0x08,0x40,0x20,0xB0,0x47,0x3F,0x7E,0xFC,0xC0,0xFF,0x07,0x02,0x81,0xF4,0xE8,0x41,0xF4,0x0D,0x04,0x02,0x7B,0x03,0x08,0x04,0xE6,0x04,0xFE,0xF8,0xF1,0xD1,0x23,0x00,0x08,0x3D,0x7A,0xF4,0xE8,0x3F,0x00,0x81,0x1E,0x40,0xE0,0x8F,0x1F,0x7A,0xF4,0x30,0x80,0xC7,0x8F,0x1F,0x3D,0x74,0x40,0x20,0xF0,0xB0,0xAF,0xAF,0x0F,0x80,0x80,0xC1,0x60,0x8F,0x1E,0xD1,0x80,0xF8,0xF1,0xA3,0x47,0x11,0x08,0x04,0xFE,0x27,0x14,0x0A,0x81,0x10,0xD8,0xD7,0xD7,0xE3,0xC7,0x0F,0x20,0x18,0x20,0x10,0xF8,0xC0,0x1E,0x3D,0x7A,0xE3,0x07,0x01,0x81,0x10,0x08,0xFC,0xF1,0xA3,0x87,0xD9,0x3F,0x10,0x08,0xEC,0xD1,0x20,0x10,0x98,0x37,0xF8,0xE3,0xC7,0x0F,0x0F,0x06,0x20,0x10,0xF8,0xD1,0xA3,0x47,0x04,0x02,0x7F,0xFC,0x7A,0xF4,0x88,0x08,0xC7,0x8F,0x1F,0x3D,0x42,0x40,0x20,0xF0,0x60,0x8F,0x1E,0x3D,0x7E,0x10,0x80,0x40,0x81,0xC0,0x1F,0x3F,0x8F,0xA2,0x63,0x03,0x10,0xD8,0xA3,0x47,0x20,0x30,0x6F,0x20,0xC7,0x8F,0x1F,0x40,0xDC,0x40,0x20,0xF0,0xF6,0xE8,0xD1,0x43,0xCC,0x15,0x08,0x04,0xE3,0x07,0x10,0x08,0x10,0x08,0xFC,0xF1,0x3D,0x7A,0x88,0x31,0x02,0x81,0xC0,0x1E,0x00,0x81,0xC0,0x1C,0xC0,0x1F,0x3F,0x7E,0x0F,0x71,0x02,0x81,0x10,0xD8,0xA3,0x47,0x10,0x98,0x43,0x20,0xE3,0xC7,0x0F,0x20,0x4E,0x20,0x10,0xF8,0x7B,0xF4,0xE8,0x21,0x73,0x08,0x04,0x02,0xF8,0x01,0x04,0x02,0x04,0x02,0x7F,0xFC,0x1E,0x3D,0xC4,0x09,0x81,0x40,0x60,0x8F,0x80,0x40,0x60,0x0E,0xE0,0x8F,0x1F,0x3F,0x87,0x38,0x81,0x40,0x08,0xEC,0xD1,0xA3,0x08,0xCC,0x21,0x10,0xF1,0xE3,0x07,0x10,0x27,0x10,0x08,0xFC,0x3D,0x7A,0xF4,0x10,0x39,0x04,0x02,0x81,0xFC,0x00,0x02,0x81,0x02,0x81,0x3F,0x7E,0x8F,0x1E,0xE2,0x04,0x40,0x20,0xB0,0x47,0x40,0x20,0x30,0x87,0xF0,0xC7,0x8F,0x1F,0x43,0x9C,0x40,0x20,0x04,0xF6,0xE8,0xD1,0x04,0xE6,0x10,0x08,0xF8,0xF1,0x03,0x08,0x13,0x08,0x04,0xFE,0x1E,0x3D,0x7A,0x88,0x1C,0x02,0x81,0xC0,0x7E,0x00,0x81,0xC0,0x81,0xC0,0x1F,0x3F,0x47,0x0F,0x71,0x02,0x20,0x10,0xD8,0xA3,0x20,0x10,0x98,0x43,0xF8,0xE3,0xC7,0x0F,0x21,0x4E,0x20,0x10,0x02,0x7B,0xF4,0xE8,0x02,0x73,0x08,0x04,0xFC,0xF8,0x01,0x04,0x09,0x04,0x02,0x7F,0x8F,0x1E,0x3D,0xC4,0x0E,0x81,0x40,0x60,0x3F,0x80,0x40,0x60,0x40,0xE0,0x8F,0x1F,0xA3,0x87,0x38,0x81,0x10,0x08,0xEC,0xD1,0x10,0x08,0xCC,0x21,0xFC,0xF1,0xE3,0x07,0x10,0x27,0x10,0x08,0x81,0x3D,0x7A,0xF4,0x81,0x39,0x04,0x02,0x7E,0xFC,0x00,0x02,0x04,0x02,0x81,0x3F,0x47,0x8F,0x1E,0xE2,0x87,0x40,0x20,0xB0,0x1F,0x40,0x20,0x30,0x20,0xF0,0xC7,0x8F,0xD1,0x43,0x9C,0x40,0x08,0x04,0xF6,0xE8,0x08,0x04,0xE6,0x10,0xFE,0xF8,0xF1,0x03,0x88,0x13,0x08,0x04,0xC0,0x1E,0x3D,0x7A,0xC0,0x1C,0x02,0x81,0x3F,0x7E,0x00,0x81,0x02,0x81,0xC0,0x1F,0xA3,0x47,0x0F,0x71,0x43,0x20,0x10,0xD8,0x0F,0x20,0x10,0x98,0x10,0xF8,0xE3,0xC7,0xE8,0x21,0x4E,0x20,0x04,0x02,0x7B,0xF4,0x04,0x02,0x73,0x08,0x7F,0xFC,0xF8,0x01,0xC4,0x09,0x04,0x02,0x60,0x8F,0x1E,0x3D,0x60,0x0E,0x81,0x40,0x1F,0x3F,0x80,0x40,0x81,0x40,0xE0,0x8F,0xD1,0xA3,0x87,0x38,0x21,0x10,0x08,0xEC,0x07,0x10,0x08,0xCC,0x08,0xFC,0xF1,0xE3,0xF4,0x10,0x27,0x10,0x02,0x81,0x3D,0x7A,0x02,0x81,0x39,0x04,0x3F,0x7E,0xFC,0x00,0xE2,0x04,0x02,0x81,0xB0,0x47,0x8F,0x1E,0x30,0x87,0x40,0x20,0x8F,0x1F,0x40,0x20,0x40,0x20,0xF0,0xC7,0xE8,0xD1,0x43,0x9C,0x10,0x08,0x04,0xF6,0x03,0x08,0x04,0xE6,0x04,0xFE,0xF8,0xF1,0x7A,0x88,0x13,0x08,0x81,0xC0,0x1E,0x3D,0x81,0xC0,0x1C,0x02,0x1F,0x3F,0x7E,0x00,0x71,0x02,0x81,0xC0,0xD8,0xA3,0x47,0x0F,0x98,0x43,0x20,0x10,0xC7,0x0F,0x20,0x10,0x20,0x10,0xF8,0xE3,0xF4,0xE8,0x21,0x4E,0x08,0x04,0x02,0x7B,0x01,0x04,0x02,0x73,0x02,0x7F,0xFC,0xF8,0x3D,0xC4,0x09,0x04,0x40,0x60,0x8F,0x1E,0x40,0x60,0x0E,0x81,0x8F,0x1F,0x3F,0x80,0x38,0x81,0x40,0xE0,0xEC,0xD1,0xA3,0x87,0xCC,0x21,0x10,0x08,0xE3,0x07,0x10,0x08,0x10,0x08,0xFC,0xF1,0x7A,0xF4,0x10,0x27,0x04,0x02,0x81,0x3D,0x00,0x02,0x81,0x39,0x81,0x3F,0x7E,0xFC,0x1E,0xE2,0x04,0x02,0x20,0xB0,0x47,0x8F,0x20,0x30,0x87,0x40,0xC7,0x8F,0x1F,0x40,0x9C,0x40,0x20,0xF0,0xF6,0xE8,0xD1,0x43,0xE6,0x10,0x08,0x04,0xF1,0x03,0x08,0x04,0x08,0x04,0xFE,0xF8,0x3D,0x7A,0x88,0x13,0x02,0x81,0xC0,0x1E,0x00,0x81,0xC0,0x1C,0xC0,0x1F,0x3F,0x7E,0x0F,0x71,0x02,0x81,0x10,0xD8,0xA3,0x47,0x10,0x98,0x43,0x20,0xE3,0xC7,0x0F,0x20,0x4E,0x20,0x10,0xF8,0x7B,0xF4,0xE8,0x21,0x73,0x08,0x04,0x02,0xF8,0x01,0x04,0x02,0x04,0x02,0x7F,0xFC,0x1E,0x3D,0xC4,0x09,0x81,0x40,0x60,0x8F,0x80,0x40,0x60,0x0E,0xE0,0x8F,0x1F,0x3F,0x87,0x38,0x81,0x40,0x08,0xEC,0xD1,0xA3,0x08,0xCC,0x21,0x10,0xF1,0xE3,0x07,0x10,0x27,0x10,0x08,0xFC,0x3D,0x7A,0xF4,0x10,0x39,0x04,0x02,0x81,0xFC,0x00,0x02,0x81,0x02,0x81,0x3F,0x7E,0x8F,0x1E,0xE2,0x04,0x40,0x20,0xB0,0x47,0x40,0x20,0x30,0x87,0xF0,0xC7,0x8F,0x1F,0x43,0x9C,0x40,0x20,0x04,0xF6,0xE8,0xD1,0x04,0xE6,0x10,0x08,0xF8,0xF1,0x03,0x08,0x13,0x08,0x04,0xFE,0x1E,0x3D,0x7A,0x88,0x1C,0x02,0x81,0xC0,0x7E,0x00,0x81,0xC0,0x81,0xC0,0x1F,0x3F,0x47,0x0F,0x71,0x02,0x20,0x10,0xD8,0xA3,0x20,0x10,0x98,0x43,0xF8,0xE3,0xC7,0x0F,0x21,0x4E,0x20,0x10,0x02,0x7B,0xF4,0xE8,0x02,0x73,0x08,0x04,0xFC,0xF8,0x01,0x04,0x09,0x04,0x02,0x7F,0x8F,0x1E,0x3D,0xC4,0x0E,0x81,0x40,0x60,0x3F,0x80,0x40,0x60,0x40,0xE0,0x8F,0x1F,0xA3,0x87,0x38,0x81,0x10,0x08,0xEC,0xD1,0x10,0x08,0xCC,0x21,0xFC,0xF1,0xE3,0x07,0x10,0x27,0x10,0x08,0x81,0x3D,0x7A,0xF4,0x81,0x39,0x04,0x02,0x7E,0xFC,0x00,0x02,0x04,0x02,0x81,0x3F,0x47,0x8F,0x1E,0xE2,0x87,0x40,0x20,0xB0,0x1F,0x40,0x20,0x30,0x20,0xF0,0xC7,0x8F,0xD1,0x43,0x9C,0x40,0x08,0x04,0xF6,0xE8,0x08,0x04,0xE6,0x10,0xFE,0xF8,0xF1,0x03,0x88,0x13,0x08,0x04,0xC0,0x1E,0x3D,0x7A,0xC0,0x1C,0x02,0x81,0x3F,0x7E,0x00,0x81,0x02,0x81,0xC0,0x1F,0xA3,0x47,0x0F,0x71,0x43,0x20,0x10,0xD8,0x07,0x08,0x08,0x98,0x10,0xF8,0xF7,0xF7,0xD7,0x27,0x4E,0x20,0x20,0x10,0xD8,0xD7,0x08,0x08,0x98,0x43,0xF8,0xF7,0xF7,0x07,0x27,0x4E,0x20,0x10,0x10,0xD8,0xD7,0xD7,0x08,0x98,0x43,0x20,0xF7,0xF7,0x07,0x08,0x4E,0x20,0x10,0xF8,0xD8,0xD7,0xD7,0x27,0x98,0x43,0x20,0x10,0xF7,0x07,0x08,0x08,0x20,0x10,0xF8,0xF7,0xD7,0xD7,0x27,0x4E,0x43,0x20,0x10,0xD8,0x07,0x08,0x08,0x98,0x10,0xF8,0xF7,0xF7,0xD7,0x27,0x4E,0x20,0x20,0x10,0xD8,0xD7,0x08,0x08,0x98,0x43,0xF8,0xF7,0xF7,0x07,0x27,0x4E,0x20,0x10,0x10,0xD8,0xD7,0xD7,0x08,0x98,0x43,0x20,0xF7,0xF7,0x07,0x08,0x4E,0x20,0x10,0xF8,0xD8,0xD7,0xD7,0x27,0x98,0x43,0x20,0x10,0xF7,0x07,0x08,0x08,0x20,0x10,0xF8,0xF7,0xD7,0xD7,0x27,0x4E,0x43,0x20,0x10,0xD8,0x01,0x08,0x08,0x98,0x02,0x7F,0xFC,0xF8,0x3D,0xC4,0x09,0x04,0x40,0x60,0x8F,0x1E,0x40,0x60,0x0E,0x81,0x8F,0x1F,0x3F,0x80,0x38,0x81,0x40,0xE0,0xEC,0xD1,0xA3,0x87,0xCC,0x21,0x10,0x08,0xE3,0x07,0x10,0x08,0x10,0x08,0xFC,0xF1,0x7A,0xF4,0x10,0x27,0x04,0x02,0x81,0x3D,0x00,0x02,0x81,0x39,0x81,0x3F,0x7E,0xFC,0x1E,0xE2,0x04,0x02,0x20,0xB0,0x47,0x8F,0x20,0x30,0x87,0x40,0xC7,0x8F,0x1F,0x40,0x9C,0x40,0x20,0xF0,0xF6,0xE8,0xD1,0x43,0xE6,0x10,0x08,0x04,0xF1,0x03,0x08,0x04,0x08,0x04,0xFE,0xF8,0x3D,0x7A,0x88,0x13,0x02,0x81,0xC0,0x1E,0x00,0x81,0xC0,0x1C,0xC0,0x1F,0x3F,0x7E,0x0F,0x71,0x02,0x81,0x10,0xD8,0xA3,0x47,0x10,0x98,0x43,0x20,0xE3,0xC7,0x0F,0x20,0x4E,0x20,0x10,0xF8,0x7B,0xF4,0xE8,0x21,0x73,0x08,0x04,0x02,0xF8,0x01,0x04,0x02,0x04,0x02,0x7F,0xFC,0x1E,0x3D,0xC4,0x09,0x81,0x40,0x60,0x8F,0x80,0x40,0x60,0x0E,0xE0,0x8F,0x1F,0x3F,0x87,0x38,0x81,0x40,0x08,0xEC,0xD1,0xA3,0x08,0xCC,0x21,0x10,0xF1,0xE3,0x07,0x10,0x27,0x10,0x08,0xFC,0x3D,0x7A,0xF4,0x10,0x39,0x04,0x02,0x81,0xFC,0x00,0x02,0x81,0x02,0x81,0x3F,0x7E,0x8F,0x1E,0xE2,0x04,0x40,0x20,0xB0,0x47,0x40,0x20,0x30,0x87,0xF0,0xC7,0x8F,0x1F,0x43,0x9C,0x40,0x20,0x04,0xF6,0xE8,0xD1,0x04,0xE6,0x10,0x08,0xF8,0xF1,0x03,0x08,0x13,0x08,0x04,0xFE,0x1E,0x3D,0x7A,0x88,0x1C,0x02,0x81,0xC0,0x7E,0x00,0x81,0xC0,0x81,0xC0,0x1F,0x3F,0x47,0x0F,0x71,0x02,0x20,0x10,0xD8,0xA3,0x20,0x10,0x98,0x43,0xF8,0xE3,0xC7,0x0F,0x21,0x4E,0x20,0x10,0x02,0x7B,0xF4,0xE8,0x02,0x73,0x08,0x04,0xFC,0xF8,0x01,0x04,0x09,0x04,0x02,0x7F,0x8F,0x1E,0x3D,0xC4,0x0E,0x81,0x40,0x60,0x3F,0x80,0x40,0x60,0x40,0xE0,0x8F,0x1F,0xA3,0x87,0x38,0x81,0x10,0x08,0xEC,0xD1,0x10,0x08,0xCC,0x21,0xFC,0xF1,0xE3,0x07,0x10,0x27,0x10,0x08,0x81,0x3D,0x7A,0xF4,0x81,0x39,0x04,0x02,0x7E,0xFC,0x00,0x02,0x04,0x02,0x81,0x3F,0x47,0x8F,0x1E,0xE2,0x87,0x40,0x20,0xB0,0x1F,0x40,0x20,0x30,0x20,0xF0,0xC7,0x8F,0xD1,0x43,0x9C,0x40,0x08,0x04,0xF6,0xE8,0x08,0x04,0xE6,0x10,0xFE,0xF8,0xF1,0x03,0x88,0x13,0x08,0x04,0xC0,0x1E,0x3D,0x7A,0xC0,0x1C,0x02,0x81,0x3F,0x7E,0x00,0x81,0x02,0x81,0xC0,0x1F,0xA3,0x47,0x0F,0x71,0x43,0x20,0x10,0xD8,0x0F,0x20,0x10,0x98,0x10,0xF8,0xE3,0xC7,0xE8,0x21,0x4E,0x20,0x04,0x02,0x7B,0xF4,0x04,0x02,0x73,0x08,0x7F,0xFC,0xF8,0x01,0xC4,0x09,0x04,0x02,0x60,0x8F,0x1E,0x3D,0x60,0x0E,0x81,0x40,0x1F,0x3F,0x80,0x40,0x81,0x40,0xE0,0x8F,0xD1,0xA3,0x87,0x38,0x21,0x10,0x08,0xEC,0x07,0x10,0x08,0xCC,0x08,0xFC,0xF1,0xE3,0xF4,0x10,0x27,0x10,0x02,0x81,0x3D,0x7A,0x02,0x81,0x39,0x04,0x3F,0x7E,0xFC,0x00,0xE2,0x04,0x02,0x81,0xB0,0x47,0x8F,0x1E,0x30,0x87,0x40,0x20,0x8F,0x1F,0x40,0x20,0x40,0x20,0xF0,0xC7,0xE8,0xD1,0x43,0x9C,0x10,0x08,0x04,0xF6,0x03,0x08,0x04,0xE6,0x04,0xFE,0xF8,0xF1,0x7A,0x88,0x13,0x08,0x81,0xC0,0x1E,0x3D,0x81,0xC0,0x1C,0x02,0x1F,0x3F,0x7E,0x00,0x71,0x02,0x81,0xC0,0xD8,0xA3,0x47,0x0F,0x98,0x43,0x20,0x10,0xC7,0x0F,0x20,0x10,0x20,0x10,0xF8,0xE3,0xF4,0xE8,0x21,0x4E,0x08,0x04,0x02,0x7B,0x01,0x04,0x02,0x73,0x02,0x7F,0xFC,0xF8,0x3D,0xC4,0x09,0x04,0x40,0x60,0x8F,0x1E,0x40,0x60,0x0E,0x81,0x8F,0x1F,0x3F,0x80,0x38,0x81,0x40,0xE0,0xEC,0xD1,0xA3,0x87,0xCC,0x21,0x10,0x08,0xE3,0x07,0x10,0x08,0x10,0x08,0xFC,0xF1,0x7A,0xF4,0x10,0x27,0x04,0x02,0x81,0x3D,0x00,0x02,0x81,0x39,0x81,0x3F,0x7E,0xFC,0x1E,0xE2,0x04,0x02,0x20,0xB0,0x47,0x8F,0x20,0x30,0x87,0x40,0xC7,0x8F,0x1F,0x40,0x9C,0x40,0x20,0xF0,0xF6,0xE8,0xD1,0x43,0xE6,0x10,0x08,0x04,0xF1,0x03,0x08,0x04,0x08,0x04,0xFE,0xF8,0x3D,0x7A,0x88,0x13,0x02,0x81,0xC0,0x1E,0x00,0x81,0xC0,0x1C,0xC0,0x1F,0x3F,0x7E,0x0F,0x71,0x02,0x81,0x10,0xD8,0xA3,0x47,0x10,0x98,0x43,0x20,0xE3,0xC7,0x0F,0x20,0x4E,0x20,0x10,0xF8,0x7B,0xF4,0xE8,0x21,0x73,0x08,0x04,0x02,0xF8,0x01,0x04,0x02,0x04,0x02,0x7F,0xFC,0x1E,0x3D,0xC4,0x09,0x81,0x40,0x60,0x8F,0x80,0x40,0x60,0x0E,0xE0,0x8F,0x1F,0x3F,0x87,0x38,0x81,0x40,0x08,0xEC,0xD1,0xA3,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x10,0x08,0xEC,0xEB,0x04,0x04,0xCC,0x21,0xFC,0xFB,0xFB,0x03,0x13,0x27,0x10,0x08,0x08,0xEC,0xEB,0xEB,0x04,0xCC,0x21,0x10,0xFB,0xFB,0x03,0x04,0x27,0x10,0x08,0xFC,0xEC,0xEB,0xEB,0x13,0xCC,0x21,0x10,0x08,0xFB,0x03,0x04,0x04,0x10,0x08,0xFC,0xFB,0xEB,0xEB,0x13,0x27,0x21,0x10,0x08,0xEC,0x03,0x04,0x04,0xCC,0x08,0xFC,0xFB,0xFB,0xEB,0x13,0x27,0x10,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x13,0xE7,0xFF,0xFE,0x87,0xEF,0xEB,0xEB,0x0F,0x10,0x10,0x30,0x71,0xFE,0xEF,0xEF,0xF8,0xBE,0xBE,0x3E,0x00,0x01,0x01,0x73,0xE7,0xFF,0xFE,0xFE,0xEF,0xEB,0xEB,0x13,0x10,0x10,0x30,0x87,0xFE,0xEF,0xEF,0x0F,0xBE,0xBE,0x3E,0x71,0x01,0x01,0x73,0xF8,0xFF,0xFE,0xFE,0x00,0xEB,0xEB,0x13,0xE7,0x10,0x30,0x87,0xEF,0xEF,0xEF,0x0F,0x10,0xBE,0x3E,0x71,0xFE,0x01,0x73,0xF8,0xBE,0xFE,0xFE,0x00,0x01,0xEB,0x13,0xE7,0xFF,0x30,0x87,0xEF,0xEB,0xEF,0x0F,0x10,0x10,0x3E,0x71,0xFE,0xEF,0x73,0xF8,0xBE,0xBE,0xFE,0x00,0x01,0x01,0x50,0xE4,0xFF,0xFE,0x09,0x0A,0x0A,0x02,0x04,0xF4,0xF5,0xF5,0xFC,0xFD,0xFD,0x01,0xFA,0xFA,0xFA,0x92,0xFB,0xFB,0x03,0x04,0x7D,0x7D,0xAF,0xFF,0x01,0x33,0xFE,0x7D,0xFE,0xFE,0x00,0x01,0x00,0x60,0xF4,0xFF,0x00,0xD6,0x01,0x00,0x00,0x80,0x75,0x00,0x07,0x00,0x60,0x1D,0xD6,0x01,0x00,0x58,0xF0,0x75,0x00,0x00,0x17,0x18,0x18,0x08,0x10,0xFF,0xF7,0xF7,0xFB,0x7D,0x7D,0x7D,0x03,0x04,0x04,0xCC,0xD1,0xFF,0xFB,0xFB,0x07,0x00,0x00,0xA0,0xD6,0x01,0x00,0x58,0xAB,0x75,0x00,0x00,0xA4,0x00,0x01,0x01,0xF7,0xFB,0xFA,0xFA,0x07,0x08,0x08,0x98,0xA3,0xFF,0xF7,0xF7,0xB0,0x0E,0x00,0x40,0x00,0xAC,0x03,0x00,0x00,0x00,0xEB,0x00,0x0E,0x00,0x40,0x3B,0xB7,0x03,0x00,0xD0,0xBE,0xBE,0x3E,0xA9,0x01,0x01,0x73,0xFC,0xFF,0xFE,0xFE,0x00,0x00,0x00,0x34,0xF0,0x3A,0x00,0x00,0xEB,0xB0,0x0E,0x00,0xC0,0x00,0xB4,0x03,0x00,0x00,0x00,0xED,0x00,0xF5,0x49,0x79,0x3B,0x30,0xD7,0xF7,0xF5,0xEF,0x0F,0x10,0x10,0x40,0x03,0xFF,0xEF,0x00,0xB0,0x0E,0x00,0x00,0x00,0xAC,0x03,0x3B,0x00,0x00,0xEB,0xD0,0x0E,0x00,0x40,0x94,0xB7,0x03,0x00,0x7D,0x5F,0x5F,0x9F,0x00,0x01,0x01,0x73,0xF0,0xFF,0xFE,0xFE,0xEB,0x00,0x00,0x34,0xC0,0x3A,0x00,0x00,0x00,0xB0,0x0E,0x00,0x00,0x00,0xB4,0x03,0x3B,0x00,0x00,0xED,0xF5,0xF5,0x49,0x79,0x10,0x30,0xD7,0xF7,0xEF,0xEF,0x0F,0x10,0x00,0x40,0x03,0xFF,0x03,0x00,0xB0,0x0E,0xEB,0x00,0x00,0xAC,0x40,0x3B,0x00,0x00,0x00,0xD0,0x0E,0x00,0x9F,0x94,0xB7,0x03,0x73,0x7D,0x5F,0x5F,0xFE,0x00,0x01,0x01,0x34,0xF0,0xFF,0xFE,0x00,0xEB,0x00,0x00,0x00,0xC0,0x3A,0x00,0x03,0x00,0xB0,0x0E,0xED,0x00,0x00,0xB4,0x79,0x3B,0x00,0x00,0xF7,0xF5,0xF5,0x49,0x10,0x10,0x30,0xD7,0xFF,0xEF,0xEF,0x0F,0x0E,0x00,0x40,0x03,0xAC,0x03,0x00,0xB0,0x00,0xEB,0x00,0x00,0x00,0x40,0x3B,0x00,0x03,0x00,0xD0,0x0E,0x5F,0x9F,0x94,0xB7,0x01,0x73,0x7D,0x5F,0xFE,0xFE,0x00,0x01,0x00,0x34,0xF0,0xFF,0x00,0x00,0xEB,0x00,0x0E,0x00,0xC0,0x3A,0xB4,0x03,0x00,0xB0,0x00,0xED,0x00,0x00,0x49,0x79,0x3B,0x00,0xD7,0xF7,0xF5,0xF5,0x0F,0x10,0x10,0x30,0x03,0xFF,0xEF,0xEF,0xB0,0x0E,0x00,0x40,0x00,0xAC,0x03,0x00,0x00,0x00,0xEB,0x00,0x0E,0x00,0x40,0x3B,0xB7,0x03,0x00,0xD0,0x5F,0x5F,0x9F,0x94,0x01,0x01,0x73,0x7D,0xFF,0xFE,0xFE,0x00,0x49,0x00,0x30,0xF0,0x7D,0x80,0x80,0x80,0x00,0x00,0x7D,0x7D,0x00,0x40,0x3B,0x00,0x03,0x00,0xD0,0x0E,0xBE,0xBE,0xA8,0xB7,0x02,0xE6,0xFD,0xBE,0xFD,0xFD,0x01,0x02,0x08,0xA0,0xE8,0xFF,0xD7,0x27,0x28,0x28,0x03,0x01,0xDE,0xD7,0xFA,0xFA,0x02,0x03,0x75,0x00,0x00,0xFA,0x60,0x1D,0x00,0x80,0x10,0x58,0x07,0x00,0xFE,0xEF,0xEF,0x0F,0xF7,0xF5,0xF5,0xBD,0x04,0x04,0xCC,0xF8,0xFF,0xFB,0xFB,0x03,0xAF,0xAF,0x4F,0xDC,0x80,0x80,0xB9,0xBE,0x7F,0x7F,0x7F,0x80,0xFA,0xFA,0xC4,0xF8,0x04,0xCC,0xE1,0xFB,0xFB,0xFB,0x03,0x04,0xAF,0x4F,0x9C,0xFF,0xC0,0x1C,0xBE,0xAF,0xBF,0x3F,0x40,0x40,0xFA,0xC4,0xF9,0xBF,0xCC,0xE1,0xFB,0xFA,0xFB,0x03,0x04,0x04,0x4F,0x9C,0xFF,0xFB,0x1C,0xBE,0xAF,0xAF,0x3F,0x40,0x40,0xC0,0xC4,0xF9,0xBF,0xBF,0xE1,0xFB,0xFA,0xFA,0x03,0x04,0x04,0xCC,0x9C,0xFF,0xFB,0xFB,0xBE,0xAF,0xAF,0x4F,0x40,0x40,0xC0,0x1C,0xF9,0xBF,0xBF,0x3F,0xFB,0xFA,0xFA,0xC4,0x04,0x04,0xCC,0xE1,0xFF,0xFB,0xFB,0x03,0xAF,0xAF,0x4F,0x9C,0x40,0xC0,0x1C,0xBE,0xBF,0xBF,0x3F,0x40,0xFA,0xFA,0xC4,0xF9,0x04,0xCC,0xE1,0xFB,0xEB,0xEB,0x03,0x04,0xD6,0x01,0x00,0xE8,0x80,0x75,0x00,0x00,0x1D,0x78,0x1D,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x08,0x08,0x08,0x08,0x09,0x08,0x08,0x08,0x80,0x80,0x80,0x1D,0x80,0x80,0x80,0x80,0xD8,0x91,0x80,0x80,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x80,0x80,0x1D,0x09,0x80,0x80,0x80,0x80,0x91,0x80,0x80,0x80,0x08,0x08,0x08,0xD8,0x08,0x08,0x08,0x08,0x80,0x1D,0x09,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0x08,0xD8,0x91,0x08,0x08,0x08,0x08,0x1D,0x09,0x08,0x08,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x08,0xD8,0x91,0x80,0x20,0x10,0x08,0x08,0x47,0x02,0x81,0x40,0x02,0x81,0x40,0x60,0x20,0x10,0x08,0x04,0x10,0x08,0xEC,0x48,0x02,0x81,0x40,0x20,0x81,0x1D,0x09,0x04,0x10,0x08,0x04,0x02,0x23,0x81,0x40,0x20,0x81,0x40,0x20,0xB0,0x10,0x08,0x04,0x02,0x08,0x04,0x76,0x24,0x81,0x40,0x20,0x10,0xC0,0x8E,0x04,0x02,0x08,0x04,0x02,0x81,0x91,0x40,0x20,0x10,0x40,0x20,0x10,0xD8,0x08,0x04,0x02,0x81,0x04,0x02,0x3B,0x12,0x40,0x20,0x10,0x08,0x60,0x47,0x02,0x81,0x04,0x02,0x81,0x40,0x48,0x20,0x10,0x08,0x20,0x10,0x08,0xEC,0x04,0x02,0x81,0x40,0x02,0x81,0x1D,0x09,0x20,0x10,0x08,0x04,0xB0,0x23,0x81,0x40,0x02,0x81,0x40,0x20,0x24,0x10,0x08,0x04,0x10,0x08,0x04,0x76,0x02,0x81,0x40,0x20,0x81,0xC0,0x8E,0x04,0x10,0x08,0x04,0x02,0xD8,0x91,0x40,0x20,0x81,0x40,0x20,0x10,0x12,0x08,0x04,0x02,0x08,0x04,0x02,0x3B,0x81,0x40,0x20,0x10,0x40,0x60,0x47,0x02,0x08,0x04,0x02,0x81,0xEC,0x48,0x20,0x10,0x40,0x20,0x10,0x08,0x09,0x04,0x02,0x81,0x04,0x02,0x81,0x1D,0x40,0x20,0x10,0x08,0x20,0xB0,0x23,0x81,0x04,0x02,0x81,0x40,0x76,0x24,0x10,0x08,0x20,0x10,0x08,0x04,0x04,0x02,0x81,0x40,0x02,0x81,0xC0,0x8E,0x20,0x10,0x08,0x04,0x10,0xD8,0x91,0x40,0x02,0x81,0x40,0x20,0x3B,0x12,0x08,0x04,0x10,0x08,0x04,0x02,0x02,0x81,0x40,0x20,0x81,0x40,0x60,0x47,0x10,0x08,0x04,0x02,0x08,0xEC,0x48,0x20,0x81,0x40,0x20,0x10,0x1D,0x09,0x04,0x02,0x08,0x04,0x02,0x81,0x81,0x40,0x20,0x10,0x40,0x20,0xB0,0x23,0x08,0x04,0x02,0x81,0x04,0x76,0x24,0x10,0x40,0x20,0x10,0x08,0x8E,0x04,0x02,0x81,0x04,0x02,0x81,0xC0,0x40,0x20,0x10,0x08,0x20,0x10,0xD8,0x91,0x04,0x02,0x81,0x40,0x02,0x3B,0x12,0x08,0x20,0x10,0x08,0x04,0x47,0x02,0x81,0x40,0x02,0x81,0x40,0x60,0x20,0x10,0x08,0x04,0x10,0x08,0xEC,0x48,0x02,0x81,0x40,0x20,0x81,0x1D,0x09,0x04,0x10,0x08,0x04,0x02,0x23,0x81,0x40,0x20,0x81,0x40,0x20,0xB0,0x10,0x08,0x04,0x02,0x08,0x04,0x76,0x24,0x81,0x40,0x20,0x10,0xC0,0x8E,0x04,0x02,0x08,0x04,0x02,0x81,0x91,0x40,0x20,0x10,0x40,0x20,0x10,0xD8,0x08,0x04,0x02,0x81,0x04,0x02,0x3B,0x12,0x40,0x20,0x10,0x08,0x60,0x47,0x02,0x81,0x04,0x02,0x81,0x40,0x48,0x20,0x10,0x08,0x20,0x10,0x08,0xEC,0x04,0x02,0x81,0x40,0x02,0x81,0x1D,0x09,0x20,0x10,0x08,0x04,0xB0,0x23,0x81,0x40,0x02,0x81,0x40,0x20,0x24,0x10,0x08,0x04,0x10,0x08,0x04,0x76,0x02,0x81,0x40,0x20,0x81,0xC0,0x8E,0x04,0x10,0x08,0x04,0x02,0xD8,0x91,0x40,0x20,0x81,0x40,0x20,0x10,0x12,0x08,0x04,0x02,0x08,0x04,0x02,0x3B,0x81,0x40,0x20,0x10,0x40,0x60,0x47,0x02,0x08,0x04,0x02,0x81,0xEC,0x48,0x20,0x10,0x40,0x20,0x10,0x08,0x09,0x04,0x02,0x81,0x04,0x02,0x81,0x1D,0x40,0x20,0x10,0x08,0x20,0xB0,0x23,0x81,0x04,0x02,0x81,0x40,0x76,0x24,0x10,0x08,0x20,0x10,0x08,0x04,0x04,0x02,0x81,0x40,0x02,0x81,0xC0,0x8E,0x20,0x10,0x08,0x04,0x10,0xD8,0x91,0x40,0x02,0x81,0x40,0x20,0x3B,0x12,0x08,0x04,0x10,0x08,0x04,0x02,0x02,0x81,0x40,0x20,0x81,0x40,0x60,0x47,0x10,0x08,0x04,0x02,0x08,0xEC,0x48,0x20,0x81,0x40,0x20,0x10,0x1D,0x09,0x04,0x02,0x08,0x04,0x02,0x81,0x81,0x40,0x20,0x10,0x40,0x20,0xB0,0x23,0x08,0x04,0x02,0x81,0x04,0x76,0x24,0x10,0x40,0x20,0x10,0x08,0x8E,0x04,0x02,0x81,0x04,0x02,0x81,0xC0,0x40,0x20,0x10,0x08,0x20,0x10,0xD8,0x91,0x04,0x02,0x81,0x40,0x02,0x3B,0x12,0x08,0x20,0x10,0x08,0x04,0x47,0x02,0x81,0x40,0x02,0x81,0x40,0x60,0x20,0x10,0x08,0x04,0x10,0x08,0xEC,0x48,0x02,0x81,0x40,0x20,0x81,0x1D,0x09,0x04,0x10,0x08,0x04,0x02,0x23,0x81,0x40,0x20,0x81,0x40,0x20,0xB0,0x10,0x08,0x04,0x02,0x08,0x04,0x76,0x24,0x81,0x40,0x20,0x10,0xC0,0x8E,0x04,0x02,0x08,0x04,0x02,0x81,0x91,0x40,0x20,0x10,0x40,0x20,0x10,0xD8,0x08,0x04,0x02,0x81,0x04,0x02,0x3B,0x12,0x40,0x20,0x10,0x08,0x60,0x47,0x02,0x81,0x04,0x02,0x81,0x40,0x48,0x20,0x10,0x08,0x20,0x10,0x08,0xEC,0x04,0x02,0x81,0x40,0x02,0x81,0x1D,0x09,0x20,0x10,0x08,0x04,0xB0,0x23,0x81,0x40,0x02,0x81,0x40,0x20,0x24,0x10,0x08,0x04,0x10,0x08,0x04,0x76,0x02,0x81,0x40,0x20,0x81,0xC0,0x8E,0x04,0x10,0x08,0x04,0x02,0xD8,0x91,0x40,0x20,0x81,0x40,0x20,0x10,0x12,0x08,0x04,0x02,0x08,0x04,0x02,0x3B,0x81,0x40,0x20,0x10,0x40,0x60,0x47,0x02,0x08,0x04,0x02,0x81,0xEC,0x48,0x20,0x10,0x40,0x20,0x10,0x08,0x09,0x04,0x02,0x81,0x04,0x02,0x81,0x1D,0x40,0x20,0x10,0x08,0x20,0xB0,0x23,0x81,0x04,0x02,0x81,0x40,0x76,0x24,0x10,0x08,0x20,0x10,0x08,0x04,0x04,0x02,0x81,0x40,0x02,0x81,0xC0,0x8E,0x20,0x10,0x08,0x04,0x10,0xD8,0x91,0x40,0x02,0x81,0x40,0x20,0x3B,0x12,0x08,0x04,0x10,0x08,0x04,0x02,0x02,0x81,0x40,0x20,0x81,0x40,0x60,0x47,0x10,0x08,0x04,0x02,0x08,0xEC,0x48,0x20,0x81,0x40,0x20,0x10,0x1D,0x09,0x04,0x02,0x08,0x04,0x02,0x81,0x81,0x40,0x20,0x10,0x40,0x20,0xB0,0x23,0x08,0x04,0x02,0x81,0x04,0x76,0x24,0x10,0x40,0x20,0x10,0x08,0x8E,0x04,0x02,0x81,0x04,0x02,0x81,0xC0,0x40,0x20,0x10,0x08,0x20,0x10,0xD8,0x91,0x04,0x02,0x81,0x40,0x02,0x3B,0x12,0x08,0x20,0x10,0x08,0x04,0x47,0x02,0x81,0x40,0x02,0x81,0x40,0x60,0x20,0x10,0x08,0x04,0x10,0x08,0xEC,0x48,0x02,0x81,0x40,0x20,0x81,0x1D,0x09,0x04,0x10,0x08,0x04,0x02,0x23,0x81,0x40,0x20,0x81,0x40,0x20,0xB0,0x10,0x08,0x04,0x02,0x08,0x04,0x76,0x24,0x81,0x40,0x20,0x10,0xC0,0x8E,0x04,0x02,0x08,0x04,0x02,0x81,0x91,0x40,0x20,0x10,0x40,0x20,0x10,0xD8,0x08,0x04,0x02,0x81,0x04,0x02,0x3B,0x12,0x40,0x20,0x10,0x08,0x60,0x47,0x02,0x81,0x04,0x02,0x81,0x40,0x48,0x20,0x10,0x08,0x20,0x10,0x08,0xEC,0x04,0x02,0x81,0x40,0x02,0x81,0x1D,0x09,0x20,0x10,0x08,0x04,0xB0,0x23,0x81,0x40,0x02,0x81,0x40,0x20,0x24,0x10,0x08,0x04,0x10,0x08,0x04,0x76,0x02,0x81,0x40,0x20,0x81,0xC0,0x8E,0x04,0x10,0x08,0x04,0x02,0xD8,0x91,0x40,0x20,0x81,0x40,0x20,0x10,0x12,0x08,0x04,0x02,0x08,0x04,0x02,0x3B,0x81,0x40,0x20,0x10,0x40,0x60,0x47,0x02,0x08,0x04,0x02,0x81,0xEC,0x48,0x20,0x10,0x40,0x20,0x10,0x08,0x09,0x04,0x02,0x81,0x04,0x02,0x81,0x1D,0x40,0x20,0x10,0x08,0x20,0xB0,0x23,0x81,0x04,0x02,0x81,0x40,0x76,0x24,0x10,0x08,0x20,0x10,0x08,0x04,0x04,0x02,0x81,0x40,0x02,0x81,0xC0,0x8E,0x20,0x10,0x08,0x04,0x10,0xD8,0x91,0x40,0x02,0x81,0x40,0x20,0x3B,0x12,0x08,0x04,0x10,0x08,0x04,0x02,0x02,0x81,0x40,0x20,0x81,0x40,0x60,0x47,0x10,0x08,0x04,0x02,0x08,0xEC,0x48,0x20,0x81,0x40,0x20,0x10,0x1D,0x09,0x04,0x02,0x08,0x04,0x02,0x81,0x81,0x40,0x20,0x10,0x40,0x20,0xB0,0x23,0x08,0x04,0x02,0x81,0x04,0x76,0x24,0x10,0x40,0x20,0x10,0x08,0x8E,0x04,0x02,0x81,0x04,0x02,0x81,0xC0,0x40,0x20,0x10,0x08,0x20,0x10,0xD8,0x91,0x04,0x02,0x81,0x40,0x02,0x3B,0x12,0x08,0x20,0x10,0x08,0x04,0x47,0x02,0x81,0x40,0x02,0x81,0x40,0x60,0x20,0x10,0x08,0x04,0x10,0x08,0xEC,0x48,0x02,0x81,0x40,0x20,0x81,0x1D,0x09,0x04,0x10,0x08,0x04,0x02,0x23,0x81,0x40,0x20,0x81,0x40,0x20,0xB0,0x10,0x08,0x04,0x02,0x08,0x04,0x76,0x24,0x81,0x40,0x20,0x10,0xC0,0x8E,0x04,0x02,0x08,0x04,0x02,0x81,0x91,0x40,0x20,0x10,0x40,0x20,0x10,0xD8,0x08,0x04,0x02,0x81,0x04,0x02,0x3B,0x12,0x40,0x20,0x10,0x08,0x60,0x47,0x02,0x81,0x04,0x02,0x81,0x40,0x48,0x20,0x10,0x08,0x20,0x10,0x08,0xEC,0x04,0x02,0x81,0x40,0x02,0x81,0x1D,0x09,0x20,0x10,0x08,0x04,0xB0,0x23,0x81,0x40,0x02,0x81,0x40,0x20,0x24,0x10,0x08,0x04,0x10,0x08,0x04,0x76,0x02,0x81,0x40,0x20,0x81,0xC0,0x8E,0x04,0x10,0x08,0x04,0x02,0xD8,0x91,0x40,0x20,0x81,0x40,0x20,0x10,0x12,0x08,0x04,0x02,0x08,0x04,0x02,0x3B,0x81,0x40,0x20,0x10,0x40,0x60,0x47,0x02,0x08,0x04,0x02,0x81,0xEC,0x48,0x20,0x10,0x40,0x20,0x10,0x08,0x09,0x04,0x02,0x81,0x04,0x02,0x81,0x1D,0x40,0x20,0x10,0x08,0x20,0xB0,0x23,0x81,0x04,0x02,0x81,0x40,0x76,0x24,0x10,0x08,0x20,0x10,0x08,0x04,0x04,0x02,0x81,0x40,0x02,0x81,0xC0,0x8E,0x20,0x10,0x08,0x04,0x10,0xD8,0x91,0x40,0x02,0x81,0x40,0x20,0x3B,0x12,0x08,0x04,0x10,0x08,0x04,0x02,0x02,0x81,0x40,0x20,0x81,0x40,0x60,0x47,0x10,0x08,0x04,0x02,0x08,0xEC,0x48,0x20,0x81,0x40,0x20,0x10,0x1D,0x09,0x04,0x02,0x08,0x04,0x02,0x81,0x81,0x40,0x20,0x10,0x40,0x20,0xB0,0x23,0x08,0x04,0x02,0x81,0x04,0x76,0x24,0x10,0x40,0x20,0x10,0x08,0x8E,0x04,0x02,0x81,0x04,0x02,0x81,0xC0,0x40,0x20,0x10,0x08,0x20,0x10,0xD8,0x91,0x04,0x02,0x81,0x40,0x02,0x3B,0x12,0x08,0x20,0x10,0x08,0x04,0x47,0x02,0x81,0x40,0x02,0x81,0x40,0x60,0x20,0x10,0x08,0x04,0x10,0x08,0xEC,0x48,0x02,0x81,0x40,0x20,0x81,0x1D,0x09,0x04,0x10,0x08,0x04,0x02,0x23,0x81,0x40,0x20,0x81,0x40,0x20,0xB0,0x10,0x08,0x04,0x02,0x08,0x04,0x76,0x24,0x81,0x40,0x20,0x10,0xC0,0x8E,0x04,0x02,0x08,0x04,0x02,0x81,0x91,0x40,0x20,0x10,0x40,0x20,0x10,0xD8,0x08,0x04,0x02,0x81,0x04,0x02,0x3B,0x12,0x40,0x20,0x10,0x08,0x60,0x47,0x02,0x81,0x04,0x02,0x81,0x40,0x48,0x20,0x10,0x08,0x20,0x10,0x08,0xEC,0x04,0x02,0x81,0x40,0x02,0x81,0x1D,0x09,0x20,0x10,0x08,0x04,0xB0,0x23,0x81,0x40,0x02,0x81,0x40,0x20,0x24,0x10,0x08,0x04,0xBF,0x23,0xFF,0x77,0xC8,0xFF,0x1D,0xF9,0x7F,0x47,0xFE,0xEF,0x91,0xFF,0x3B,0xF2,0xFF,0x8E,0xFC,0xDF,0x23,0xFF,0x77,0xE4,0xFF,0x1D,0xF9,0xBF,0x47,0xFE,0xEF,0xC8,0xFF,0x3B,0xF2,0x7F,0x8E,0xFC,0xDF,0x91,0xFF,0x77,0xE4,0xFF,0x1D,0xF9,0xBF,0x23,0xFE,0xEF,0xC8,0xFF,0x3B,0xF2,0x7F,0x47,0xFC,0xDF,0x91,0xFF,0x77,0xE4,0xFF,0x8E,0xF9,0xBF,0x23,0xFF,0xEF,0xC8,0xFF,0x1D,0xF2,0x7F,0x47,0xFE,0xDF,0x91,0xFF,0x3B,0xE4,0xFF,0x8E,0xFC,0xBF,0x23,0xFF,0x77,0xC8,0xFF,0x1D,0xF9,0x7F,0x47,0xFE,0xEF,0x91,0xFF,0x3B,0xF2,0xFF,0x8E,0xFC,0xDF,0x23,0xFF,0x77,0xE4,0xFF,0x1D,0xF9,0xBF,0x47,0xFE,0xEF,0xC8,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00}; + static uint8_t buf[1024 * 1024]; + uint8_t *p; + uint8_t *buf2; + FILE *fp; + int i; + int rc; + int len; + QuicImageType type; + int width; + int height; + + q = simple_quic_init(); + if (q) + { + for (i = 1; i < argc; i++) + { + if (strcmp(argv[i], "membuf1") == 0) + { + p = membuf1; len = sizeof(membuf1); + } + else if (strcmp(argv[i], "membuf2") == 0) + { + p = membuf2; len = sizeof(membuf2); + } + else if (strcmp(argv[i], "timecheck") == 0) + { + int j, count; + if (i == (argc -1)) + { + fprintf(stderr, "Error: give the number of times to run the loop\n"); + exit(1); + } + count = atoi(argv[++i]); + printf("Starting %d loops at %ld\n", count, clock()); + for (j = 0; j < count; j++) + one_timeloop(membuf2, sizeof(membuf2)); + printf("finished %d loops at %ld\n", count, clock()); + continue; + } + + else + { + fp = fopen(argv[i], "rb"); + if (fp) + { + len = fread(buf, 1, sizeof(buf), fp); + printf("%s: read %d bytes\n", argv[i], len); + p = buf; + if (len >= sizeof(buf) - sizeof(uint32_t)) + { + fprintf(stderr, "Whoa! file [%s] too big...\n", argv[i]); + exit(1); + } + if (len == 0) + { + fprintf(stderr, "Whoa! nothing in file [%s]\n", argv[i]); + exit(1); + } + fclose(fp); + } + else + { + fprintf(stderr, "Whoa! couldn't open file [%s]\n", argv[i]); + exit(1); + } + } + + rc = simple_quic_decode(q, p, len, &type, &width, &height, &buf2); + if (rc == 0) + { + int j; + printf("%s: type %d, width %d, height %d\n", argv[i], type, width, height); + for (j = 0; j < height; j++) + { + print_a_line(buf2 + (j * width * 4), width); + } + } + } + + simple_quic_term(q); + } + + quic_decode_js(membuf2, sizeof(membuf2)); + + return 0; +} + diff --git a/quic.js b/quic.js new file mode 100644 index 0000000..735b20b --- /dev/null +++ b/quic.js @@ -0,0 +1,27125 @@ +/* + Copyright (C) 2012 by Jeremy P. White + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +/*---------------------------------------------------------------------------- +** HACK HACK HACK +** This file was largely auto generated by emscripten +** from a 'C' source code file. See the file quic.shell for more details. +**--------------------------------------------------------------------------*/ + +// Note: Some Emscripten settings will significantly limit the speed of the generated code. +// Note: Some Emscripten settings may limit the speed of the generated code. +// TODO: " u s e s t r i c t "; + +try { + this['Module'] = Module; +} catch(e) { + this['Module'] = Module = {}; +} + +// The environment setup code below is customized to use Module. +// *** Environment setup code *** +var ENVIRONMENT_IS_NODE = typeof process === 'object'; +var ENVIRONMENT_IS_WEB = typeof window === 'object'; +var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; +var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; + +if (ENVIRONMENT_IS_NODE) { + // Expose functionality in the same simple way that the shells work + // Note that we pollute the global namespace here, otherwise we break in node + Module['print'] = function(x) { + process['stdout'].write(x + '\n'); + }; + Module['printErr'] = function(x) { + process['stderr'].write(x + '\n'); + }; + + var nodeFS = require('fs'); + var nodePath = require('path'); + + Module['read'] = function(filename) { + filename = nodePath['normalize'](filename); + var ret = nodeFS['readFileSync'](filename).toString(); + // The path is absolute if the normalized version is the same as the resolved. + if (!ret && filename != nodePath['resolve'](filename)) { + filename = path.join(__dirname, '..', 'src', filename); + ret = nodeFS['readFileSync'](filename).toString(); + } + return ret; + }; + + Module['load'] = function(f) { + globalEval(read(f)); + }; + + if (!Module['arguments']) { + Module['arguments'] = process['argv'].slice(2); + } +} else if (ENVIRONMENT_IS_SHELL) { + Module['print'] = print; + Module['printErr'] = printErr; + + // Polyfill over SpiderMonkey/V8 differences + if (typeof read != 'undefined') { + Module['read'] = read; + } else { + Module['read'] = function(f) { snarf(f) }; + } + + if (!Module['arguments']) { + if (typeof scriptArgs != 'undefined') { + Module['arguments'] = scriptArgs; + } else if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + } +} else if (ENVIRONMENT_IS_WEB) { + if (!Module['print']) { + Module['print'] = function(x) { + console.log(x); + }; + } + + if (!Module['printErr']) { + Module['printErr'] = function(x) { + console.log(x); + }; + } + + Module['read'] = function(url) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, false); + xhr.send(null); + return xhr.responseText; + }; + + if (!Module['arguments']) { + if (typeof arguments != 'undefined') { + Module['arguments'] = arguments; + } + } +} else if (ENVIRONMENT_IS_WORKER) { + // We can do very little here... + + Module['load'] = importScripts; + +} else { + throw 'Unknown runtime environment. Where are we?'; +} + +function globalEval(x) { + eval.call(null, x); +} +if (!Module['load'] == 'undefined' && Module['read']) { + Module['load'] = function(f) { + globalEval(Module['read'](f)); + }; +} +if (!Module['printErr']) { + Module['printErr'] = function(){}; +} +if (!Module['print']) { + Module['print'] = Module['printErr']; +} +if (!Module['arguments']) { + Module['arguments'] = []; +} +// *** Environment setup code *** + +// Closure helpers +Module.print = Module['print']; +Module.printErr = Module['printErr']; + + +// === Auto-generated preamble library stuff === + +//======================================== +// Runtime code shared with compiler +//======================================== + +var Runtime = { + stackSave: function () { + return STACKTOP; + }, + stackRestore: function (stackTop) { + STACKTOP = stackTop; + }, + forceAlign: function (target, quantum) { + quantum = quantum || 4; + if (quantum == 1) return target; + if (isNumber(target) && isNumber(quantum)) { + return Math.ceil(target/quantum)*quantum; + } else if (isNumber(quantum) && isPowerOfTwo(quantum)) { + var logg = log2(quantum); + return '((((' +target + ')+' + (quantum-1) + ')>>' + logg + ')<<' + logg + ')'; + } + return 'Math.ceil((' + target + ')/' + quantum + ')*' + quantum; + }, + isNumberType: function (type) { + return type in Runtime.INT_TYPES || type in Runtime.FLOAT_TYPES; + }, + isPointerType: function isPointerType(type) { + return type[type.length-1] == '*'; +}, + isStructType: function isStructType(type) { + if (isPointerType(type)) return false; + if (/^\[\d+\ x\ (.*)\]/.test(type)) return true; // [15 x ?] blocks. Like structs + if (/?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types + // See comment in isStructPointerType() + return type[0] == '%'; +}, + INT_TYPES: {"i1":0,"i8":0,"i16":0,"i32":0,"i64":0}, + FLOAT_TYPES: {"float":0,"double":0}, + bitshift64: function (low, high, op, bits) { + var ander = Math.pow(2, bits)-1; + if (bits < 32) { + switch (op) { + case 'shl': + return [low << bits, (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits))]; + case 'ashr': + return [(((low >>> bits ) | ((high&ander) << (32 - bits))) >> 0) >>> 0, (high >> bits) >>> 0]; + case 'lshr': + return [((low >>> bits) | ((high&ander) << (32 - bits))) >>> 0, high >>> bits]; + } + } else if (bits == 32) { + switch (op) { + case 'shl': + return [0, low]; + case 'ashr': + return [high, (high|0) < 0 ? ander : 0]; + case 'lshr': + return [high, 0]; + } + } else { // bits > 32 + switch (op) { + case 'shl': + return [0, low << (bits - 32)]; + case 'ashr': + return [(high >> (bits - 32)) >>> 0, (high|0) < 0 ? ander : 0]; + case 'lshr': + return [high >>> (bits - 32) , 0]; + } + } + abort('unknown bitshift64 op: ' + [value, op, bits]); + }, + or64: function (x, y) { + var l = (x | 0) | (y | 0); + var h = (Math.round(x / 4294967296) | Math.round(y / 4294967296)) * 4294967296; + return l + h; + }, + and64: function (x, y) { + var l = (x | 0) & (y | 0); + var h = (Math.round(x / 4294967296) & Math.round(y / 4294967296)) * 4294967296; + return l + h; + }, + xor64: function (x, y) { + var l = (x | 0) ^ (y | 0); + var h = (Math.round(x / 4294967296) ^ Math.round(y / 4294967296)) * 4294967296; + return l + h; + }, + getNativeTypeSize: function (type, quantumSize) { + if (Runtime.QUANTUM_SIZE == 1) return 1; + var size = { + '%i1': 1, + '%i8': 1, + '%i16': 2, + '%i32': 4, + '%i64': 8, + "%float": 4, + "%double": 8 + }['%'+type]; // add '%' since float and double confuse Closure compiler as keys, and also spidermonkey as a compiler will remove 's from '_i8' etc + if (!size) { + if (type[type.length-1] == '*') { + size = Runtime.QUANTUM_SIZE; // A pointer + } else if (type[0] == 'i') { + var bits = parseInt(type.substr(1)); + assert(bits % 8 == 0); + size = bits/8; + } + } + return size; + }, + getNativeFieldSize: function (type) { + return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); + }, + dedup: function dedup(items, ident) { + var seen = {}; + if (ident) { + return items.filter(function(item) { + if (seen[item[ident]]) return false; + seen[item[ident]] = true; + return true; + }); + } else { + return items.filter(function(item) { + if (seen[item]) return false; + seen[item] = true; + return true; + }); + } +}, + set: function set() { + var args = typeof arguments[0] === 'object' ? arguments[0] : arguments; + var ret = {}; + for (var i = 0; i < args.length; i++) { + ret[args[i]] = 0; + } + return ret; +}, + calculateStructAlignment: function calculateStructAlignment(type) { + type.flatSize = 0; + type.alignSize = 0; + var diffs = []; + var prev = -1; + type.flatIndexes = type.fields.map(function(field) { + var size, alignSize; + if (Runtime.isNumberType(field) || Runtime.isPointerType(field)) { + size = Runtime.getNativeTypeSize(field); // pack char; char; in structs, also char[X]s. + alignSize = size; + } else if (Runtime.isStructType(field)) { + size = Types.types[field].flatSize; + alignSize = Types.types[field].alignSize; + } else { + throw 'Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]); + } + alignSize = type.packed ? 1 : Math.min(alignSize, Runtime.QUANTUM_SIZE); + type.alignSize = Math.max(type.alignSize, alignSize); + var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory + type.flatSize = curr + size; + if (prev >= 0) { + diffs.push(curr-prev); + } + prev = curr; + return curr; + }); + type.flatSize = Runtime.alignMemory(type.flatSize, type.alignSize); + if (diffs.length == 0) { + type.flatFactor = type.flatSize; + } else if (Runtime.dedup(diffs).length == 1) { + type.flatFactor = diffs[0]; + } + type.needsFlattening = (type.flatFactor != 1); + return type.flatIndexes; + }, + generateStructInfo: function (struct, typeName, offset) { + var type, alignment; + if (typeName) { + offset = offset || 0; + type = (typeof Types === 'undefined' ? Runtime.typeInfo : Types.types)[typeName]; + if (!type) return null; + assert(type.fields.length === struct.length, 'Number of named fields must match the type for ' + typeName); + alignment = type.flatIndexes; + } else { + var type = { fields: struct.map(function(item) { return item[0] }) }; + alignment = Runtime.calculateStructAlignment(type); + } + var ret = { + __size__: type.flatSize + }; + if (typeName) { + struct.forEach(function(item, i) { + if (typeof item === 'string') { + ret[item] = alignment[i] + offset; + } else { + // embedded struct + var key; + for (var k in item) key = k; + ret[key] = Runtime.generateStructInfo(item[key], type.fields[i], alignment[i]); + } + }); + } else { + struct.forEach(function(item, i) { + ret[item[1]] = alignment[i]; + }); + } + return ret; + }, + addFunction: function (func) { + var ret = FUNCTION_TABLE.length; + FUNCTION_TABLE.push(func); + FUNCTION_TABLE.push(0); + return ret; + }, + stackAlloc: function stackAlloc(size) { var ret = STACKTOP;STACKTOP += size;STACKTOP = ((((STACKTOP)+3)>>2)<<2);assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"); return ret; }, + staticAlloc: function staticAlloc(size) { var ret = STATICTOP;STATICTOP += size;STATICTOP = ((((STATICTOP)+3)>>2)<<2); if (STATICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, + alignMemory: function alignMemory(size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 4))*(quantum ? quantum : 4); return ret; }, + makeBigInt: function makeBigInt(low,high,unsigned) { var ret = (unsigned ? (((low)>>>0)+(((high)>>>0)*4294967296)) : (((low)>>>0)+(((high)|0)*4294967296))); return ret; }, + QUANTUM_SIZE: 4, + __dummy__: 0 +} + + + +var CorrectionsMonitor = { + MAX_ALLOWED: 0, // XXX + corrections: 0, + sigs: {}, + + note: function(type, succeed, sig) { + if (!succeed) { + this.corrections++; + if (this.corrections >= this.MAX_ALLOWED) abort('\n\nToo many corrections!'); + } + }, + + print: function() { + } +}; + + + + + +//======================================== +// Runtime essentials +//======================================== + +var __THREW__ = false; // Used in checking for thrown exceptions. + +var ABORT = false; + +var undef = 0; +// tempInt is used for 32-bit signed values or smaller. tempBigInt is used +// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt +var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD; +var tempI64, tempI64b; + +function abort(text) { + Module.print(text + ':\n' + (new Error).stack); + ABORT = true; + throw "Assertion: " + text; +} + +function assert(condition, text) { + if (!condition) { + abort('Assertion failed: ' + text); + } +} + +var globalScope = this; + +// C calling interface. A convenient way to call C functions (in C files, or +// defined with extern "C"). +// +// Note: LLVM optimizations can inline and remove functions, after which you will not be +// able to call them. Adding +// +// __attribute__((used)) +// +// to the function definition will prevent that. +// +// Note: Closure optimizations will minify function names, making +// functions no longer callable. If you run closure (on by default +// in -O2 and above), you should export the functions you will call +// by calling emcc with something like +// +// -s EXPORTED_FUNCTIONS='["_func1","_func2"]' +// +// @param ident The name of the C function (note that C++ functions will be name-mangled - use extern "C") +// @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and +// 'array' for JavaScript arrays and typed arrays). +// @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType, +// except that 'array' is not possible (there is no way for us to know the length of the array) +// @param args An array of the arguments to the function, as native JS values (as in returnType) +// Note that string arguments will be stored on the stack (the JS string will become a C string on the stack). +// @return The return value, as a native JS value (as in returnType) +function ccall(ident, returnType, argTypes, args) { + var stack = 0; + function toC(value, type) { + if (type == 'string') { + if (!stack) stack = Runtime.stackSave(); + var ret = Runtime.stackAlloc(value.length+1); + writeStringToMemory(value, ret); + return ret; + } else if (type == 'array') { + if (!stack) stack = Runtime.stackSave(); + var ret = Runtime.stackAlloc(value.length); + writeArrayToMemory(value, ret); + return ret; + } + return value; + } + function fromC(value, type) { + if (type == 'string') { + return Pointer_stringify(value); + } + assert(type != 'array'); + return value; + } + try { + var func = eval('_' + ident); + } catch(e) { + try { + func = globalScope['Module']['_' + ident]; // closure exported function + } catch(e) {} + } + assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); + var i = 0; + var cArgs = args ? args.map(function(arg) { + return toC(arg, argTypes[i++]); + }) : []; + var ret = fromC(func.apply(null, cArgs), returnType); + if (stack) Runtime.stackRestore(stack); + return ret; +} +Module["ccall"] = ccall; + +// Returns a native JS wrapper for a C function. This is similar to ccall, but +// returns a function you can call repeatedly in a normal way. For example: +// +// var my_function = cwrap('my_c_function', 'number', ['number', 'number']); +// alert(my_function(5, 22)); +// alert(my_function(99, 12)); +// +function cwrap(ident, returnType, argTypes) { + // TODO: optimize this, eval the whole function once instead of going through ccall each time + return function() { + return ccall(ident, returnType, argTypes, Array.prototype.slice.call(arguments)); + } +} +Module["cwrap"] = cwrap; + +// Sets a value in memory in a dynamic way at run-time. Uses the +// type data. This is the same as makeSetValue, except that +// makeSetValue is done at compile-time and generates the needed +// code then, whereas this function picks the right code at +// run-time. +// Note that setValue and getValue only do *aligned* writes and reads! +// Note that ccall uses JS types as for defining types, while setValue and +// getValue need LLVM types ('i8', 'i32') - this is a lower-level operation +function setValue(ptr, value, type, noSafe) { + type = type || 'i8'; + if (type[type.length-1] === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': HEAP8[(ptr)]=value; break; + case 'i8': HEAP8[(ptr)]=value; break; + case 'i16': HEAP16[((ptr)>>1)]=value; break; + case 'i32': HEAP32[((ptr)>>2)]=value; break; + case 'i64': HEAP32[((ptr)>>2)]=value; break; + case 'float': HEAPF32[((ptr)>>2)]=value; break; + case 'double': (tempDoubleF64[0]=value,HEAP32[((ptr)>>2)]=tempDoubleI32[0],HEAP32[((ptr+4)>>2)]=tempDoubleI32[1]); break; + default: abort('invalid type for setValue: ' + type); + } +} +Module['setValue'] = setValue; + +// Parallel to setValue. +function getValue(ptr, type, noSafe) { + type = type || 'i8'; + if (type[type.length-1] === '*') type = 'i32'; // pointers are 32-bit + switch(type) { + case 'i1': return HEAP8[(ptr)]; + case 'i8': return HEAP8[(ptr)]; + case 'i16': return HEAP16[((ptr)>>1)]; + case 'i32': return HEAP32[((ptr)>>2)]; + case 'i64': return HEAP32[((ptr)>>2)]; + case 'float': return HEAPF32[((ptr)>>2)]; + case 'double': return (tempDoubleI32[0]=HEAP32[((ptr)>>2)],tempDoubleI32[1]=HEAP32[((ptr+4)>>2)],tempDoubleF64[0]); + default: abort('invalid type for setValue: ' + type); + } + return null; +} +Module['getValue'] = getValue; + +// Allocates memory for some data and initializes it properly. + +var ALLOC_NORMAL = 0; // Tries to use _malloc() +var ALLOC_STACK = 1; // Lives for the duration of the current function call +var ALLOC_STATIC = 2; // Cannot be freed +Module['ALLOC_NORMAL'] = ALLOC_NORMAL; +Module['ALLOC_STACK'] = ALLOC_STACK; +Module['ALLOC_STATIC'] = ALLOC_STATIC; + +function allocate(slab, types, allocator) { + var zeroinit, size; + if (typeof slab === 'number') { + zeroinit = true; + size = slab; + } else { + zeroinit = false; + size = slab.length; + } + + var singleType = typeof types === 'string' ? types : null; + + var ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); + + if (zeroinit) { + _memset(ret, 0, size); + return ret; + } + + var i = 0, type; + while (i < size) { + var curr = slab[i]; + + if (typeof curr === 'function') { + curr = Runtime.getFunctionIndex(curr); + } + + type = singleType || types[i]; + if (type === 0) { + i++; + continue; + } + assert(type, 'Must know what type to store in allocate!'); + + if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later + + setValue(ret+i, curr, type); + i += Runtime.getNativeTypeSize(type); + } + + return ret; +} +Module['allocate'] = allocate; + +function Pointer_stringify(ptr, /* optional */ length) { + var nullTerminated = typeof(length) == "undefined"; + var ret = ""; + var i = 0; + var t; + var nullByte = String.fromCharCode(0); + while (1) { + t = String.fromCharCode(HEAPU8[(ptr+i)]); + if (nullTerminated && t == nullByte) { break; } else {} + ret += t; + i += 1; + if (!nullTerminated && i == length) { break; } + } + return ret; +} +Module['Pointer_stringify'] = Pointer_stringify; + +function Array_stringify(array) { + var ret = ""; + for (var i = 0; i < array.length; i++) { + ret += String.fromCharCode(array[i]); + } + return ret; +} +Module['Array_stringify'] = Array_stringify; + +// Memory management + +var FUNCTION_TABLE; // XXX: In theory the indexes here can be equal to pointers to stacked or malloced memory. Such comparisons should + // be false, but can turn out true. We should probably set the top bit to prevent such issues. + +var PAGE_SIZE = 4096; +function alignMemoryPage(x) { + return ((x+4095)>>12)<<12; +} + +var HEAP; +var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; + +var STACK_ROOT, STACKTOP, STACK_MAX; +var STATICTOP; +function enlargeMemory() { + // TOTAL_MEMORY is the current size of the actual array, and STATICTOP is the new top. + Module.printErr('Warning: Enlarging memory arrays, this is not fast! ' + [STATICTOP, TOTAL_MEMORY]); + assert(STATICTOP >= TOTAL_MEMORY); + assert(TOTAL_MEMORY > 4); // So the loop below will not be infinite + while (TOTAL_MEMORY <= STATICTOP) { // Simple heuristic. Override enlargeMemory() if your program has something more optimal for it + TOTAL_MEMORY = alignMemoryPage(2*TOTAL_MEMORY); + } + var oldHEAP8 = HEAP8; + var buffer = new ArrayBuffer(TOTAL_MEMORY); + HEAP8 = new Int8Array(buffer); + HEAP16 = new Int16Array(buffer); + HEAP32 = new Int32Array(buffer); + HEAPU8 = new Uint8Array(buffer); + HEAPU16 = new Uint16Array(buffer); + HEAPU32 = new Uint32Array(buffer); + HEAPF32 = new Float32Array(buffer); + HEAPF64 = new Float64Array(buffer); + HEAP8.set(oldHEAP8); +} + +var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; +var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 10485760; +var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; + +// Initialize the runtime's memory +// check for full engine support (use string 'subarray' to avoid closure compiler confusion) + assert(!!Int32Array && !!Float64Array && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), + 'Cannot fallback to non-typed array case: Code is too specialized'); + + var buffer = new ArrayBuffer(TOTAL_MEMORY); + HEAP8 = new Int8Array(buffer); + HEAP16 = new Int16Array(buffer); + HEAP32 = new Int32Array(buffer); + HEAPU8 = new Uint8Array(buffer); + HEAPU16 = new Uint16Array(buffer); + HEAPU32 = new Uint32Array(buffer); + HEAPF32 = new Float32Array(buffer); + HEAPF64 = new Float64Array(buffer); + + // Endianness check (note: assumes compiler arch was little-endian) + HEAP32[0] = 255; + assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); + +var base = intArrayFromString('(null)'); // So printing %s of NULL gives '(null)' + // Also this ensures we leave 0 as an invalid address, 'NULL' +STATICTOP = base.length; +for (var i = 0; i < base.length; i++) { + HEAP8[(i)]=base[i] +} + +Module['HEAP'] = HEAP; +Module['HEAP8'] = HEAP8; +Module['HEAP16'] = HEAP16; +Module['HEAP32'] = HEAP32; +Module['HEAPU8'] = HEAPU8; +Module['HEAPU16'] = HEAPU16; +Module['HEAPU32'] = HEAPU32; +Module['HEAPF32'] = HEAPF32; +Module['HEAPF64'] = HEAPF64; + +STACK_ROOT = STACKTOP = Runtime.alignMemory(STATICTOP); +STACK_MAX = STACK_ROOT + TOTAL_STACK; + +var tempDoublePtr = Runtime.alignMemory(STACK_MAX, 8); +var tempDoubleI8 = HEAP8.subarray(tempDoublePtr); +var tempDoubleI32 = HEAP32.subarray(tempDoublePtr >> 2); +var tempDoubleF32 = HEAPF32.subarray(tempDoublePtr >> 2); +var tempDoubleF64 = HEAPF64.subarray(tempDoublePtr >> 3); +function copyTempFloat(ptr) { // functions, because inlining this code is increases code size too much + tempDoubleI8[0] = HEAP8[ptr]; + tempDoubleI8[1] = HEAP8[ptr+1]; + tempDoubleI8[2] = HEAP8[ptr+2]; + tempDoubleI8[3] = HEAP8[ptr+3]; +} +function copyTempDouble(ptr) { + tempDoubleI8[0] = HEAP8[ptr]; + tempDoubleI8[1] = HEAP8[ptr+1]; + tempDoubleI8[2] = HEAP8[ptr+2]; + tempDoubleI8[3] = HEAP8[ptr+3]; + tempDoubleI8[4] = HEAP8[ptr+4]; + tempDoubleI8[5] = HEAP8[ptr+5]; + tempDoubleI8[6] = HEAP8[ptr+6]; + tempDoubleI8[7] = HEAP8[ptr+7]; +} +STACK_MAX = tempDoublePtr + 8; + +STATICTOP = alignMemoryPage(STACK_MAX); + +function callRuntimeCallbacks(callbacks) { + while(callbacks.length > 0) { + var callback = callbacks.shift(); + var func = callback.func; + if (typeof func === 'number') { + func = FUNCTION_TABLE[func]; + } + func(callback.arg === undefined ? null : callback.arg); + } +} + +var __ATINIT__ = []; // functions called during startup +var __ATMAIN__ = []; // functions called when main() is to be run +var __ATEXIT__ = []; // functions called during shutdown + +function initRuntime() { + callRuntimeCallbacks(__ATINIT__); +} +function preMain() { + callRuntimeCallbacks(__ATMAIN__); +} +function exitRuntime() { + callRuntimeCallbacks(__ATEXIT__); + + // Print summary of correction activity + CorrectionsMonitor.print(); +} + + +// Copies a list of num items on the HEAP into a +// a normal JavaScript array of numbers +function Array_copy(ptr, num) { + return Array.prototype.slice.call(HEAP8.subarray(ptr, ptr+num)); // Make a normal array out of the typed 'view' + // Consider making a typed array here, for speed? + return HEAP.slice(ptr, ptr+num); +} +Module['Array_copy'] = Array_copy; + +// Copies a list of num items on the HEAP into a +// JavaScript typed array. +function TypedArray_copy(ptr, num, offset /*optional*/) { + // TODO: optimize this! + if (offset === undefined) { + offset = 0; + } + var arr = new Uint8Array(num - offset); + for (var i = offset; i < num; ++i) { + arr[i - offset] = HEAP8[(ptr+i)]; + } + return arr.buffer; +} +Module['TypedArray_copy'] = TypedArray_copy; + +function String_len(ptr) { + var i = 0; + while (HEAP8[(ptr+i)]) i++; // Note: should be |!= 0|, technically. But this helps catch bugs with undefineds + return i; +} +Module['String_len'] = String_len; + +// Copies a C-style string, terminated by a zero, from the HEAP into +// a normal JavaScript array of numbers +function String_copy(ptr, addZero) { + var len = String_len(ptr); + if (addZero) len++; + var ret = Array_copy(ptr, len); + if (addZero) ret[len-1] = 0; + return ret; +} +Module['String_copy'] = String_copy; + +// Tools + +// This processes a JS string into a C-line array of numbers, 0-terminated. +// For LLVM-originating strings, see parser.js:parseLLVMString function +function intArrayFromString(stringy, dontAddNull, length /* optional */) { + var ret = []; + var t; + var i = 0; + if (length === undefined) { + length = stringy.length; + } + while (i < length) { + var chr = stringy.charCodeAt(i); + if (chr > 0xFF) { + assert(false, 'Character code ' + chr + ' (' + stringy[i] + ') at offset ' + i + ' not in 0x00-0xFF.'); + chr &= 0xFF; + } + ret.push(chr); + i = i + 1; + } + if (!dontAddNull) { + ret.push(0); + } + return ret; +} +Module['intArrayFromString'] = intArrayFromString; + +function intArrayToString(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + var chr = array[i]; + if (chr > 0xFF) { + assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ') at offset ' + i + ' not in 0x00-0xFF.'); + chr &= 0xFF; + } + ret.push(String.fromCharCode(chr)); + } + return ret.join(''); +} +Module['intArrayToString'] = intArrayToString; + +// Write a Javascript array to somewhere in the heap +function writeStringToMemory(string, buffer, dontAddNull) { + var i = 0; + while (i < string.length) { + var chr = string.charCodeAt(i); + if (chr > 0xFF) { + assert(false, 'Character code ' + chr + ' (' + string[i] + ') at offset ' + i + ' not in 0x00-0xFF.'); + chr &= 0xFF; + } + HEAP8[(buffer+i)]=chr + i = i + 1; + } + if (!dontAddNull) { + HEAP8[(buffer+i)]=0 + } +} +Module['writeStringToMemory'] = writeStringToMemory; + +function writeArrayToMemory(array, buffer) { + for (var i = 0; i < array.length; i++) { + HEAP8[(buffer+i)]=array[i]; + } +} +Module['writeArrayToMemory'] = writeArrayToMemory; + +var STRING_TABLE = []; + +function unSign(value, bits, ignore, sig) { + if (value >= 0) { + return value; + } + return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts + : Math.pow(2, bits) + value; + // TODO: clean up previous line +} +function reSign(value, bits, ignore, sig) { + if (value <= 0) { + return value; + } + var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 + : Math.pow(2, bits-1); + if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that + // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors + // TODO: In i64 mode 1, resign the two parts separately and safely + value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts + } + return value; +} + +// A counter of dependencies for calling run(). If we need to +// do asynchronous work before running, increment this and +// decrement it. Incrementing must happen in Module.preRun +// or PRE_RUN_ADDITIONS (used by emcc to add file preloading). +var runDependencies = 0; +function addRunDependency() { + runDependencies++; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } +} +function removeRunDependency() { + runDependencies--; + if (Module['monitorRunDependencies']) { + Module['monitorRunDependencies'](runDependencies); + } + if (runDependencies == 0) run(); +} + +// === Body === + + + + +function _init_decode_io($encoder) { + ; + var __label__; + + var $1; + $1=$encoder; + var $2=$1; + var $3=(($2+40)|0); + var $4=HEAP32[(($3)>>2)]; + var $5=(($4+4)|0); + HEAP32[(($3)>>2)]=$5; + var $6=HEAP32[(($4)>>2)]; + var $7=$1; + var $8=(($7+32)|0); + HEAP32[(($8)>>2)]=$6; + var $9=$1; + var $10=(($9+36)|0); + HEAP32[(($10)>>2)]=$6; + var $11=$1; + var $12=(($11+28)|0); + HEAP32[(($12)>>2)]=0; + ; + return; +} + + +function _spice_log($log_domain, $log_level, $strloc, $function, $format) { + var __stackBase__ = STACKTOP; STACKTOP += 4; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + + var $1; + var $2; + var $3; + var $4; + var $5; + var $ap=__stackBase__; + $1=$log_domain; + $2=$log_level; + $3=$strloc; + $4=$function; + $5=$format; + var $6=HEAP32[((_stderr)>>2)]; + var $7=$1; + var $8=$3; + var $9=$4; + var $10=_fprintf($6, ((STRING_TABLE.__str31)|0), (tempInt=STACKTOP,STACKTOP += 12,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$7,HEAP32[((tempInt+4)>>2)]=$8,HEAP32[((tempInt+8)>>2)]=$9,tempInt)); + var $11=$ap; + HEAP32[(($11)>>2)]=arguments[_spice_log.length]; + var $12=HEAP32[((_stderr)>>2)]; + var $13=$5; + var $14=HEAP32[(($ap)>>2)]; + var $15=_vfprintf($12, $13, $14); + var $16=$ap; + ; + STACKTOP = __stackBase__; + return; +} + + +function _quic_image_params($encoder, $type, $channels, $bpc) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $_g_boolean_var_; + $1=$encoder; + $2=$type; + $3=$channels; + $4=$bpc; + __label__ = 2; break; + case 2: + var $6=$3; + var $7=(($6)|0)!=0; + if ($7) { __label__ = 3; break; } else { __label__ = 5; break; } + case 3: + var $9=$4; + var $10=(($9)|0)!=0; + if ($10) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + $_g_boolean_var_=1; + __label__ = 6; break; + case 5: + $_g_boolean_var_=0; + __label__ = 6; break; + case 6: + var $14=$_g_boolean_var_; + var $15=(($14)==(1)); + var $16=(($15)|0)!=0; + if ($16) { __label__ = 7; break; } else { __label__ = 8; break; } + case 7: + __label__ = 11; break; + case 8: + __label__ = 9; break; + case 9: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str120)|0), ((STRING_TABLE.___FUNCTION___quic_image_params)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str121)|0),tempInt)); + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + var $23=$2; + if ((($23)|0) == 1) { + __label__ = 13; break; + } + else if ((($23)|0) == 2) { + __label__ = 14; break; + } + else if ((($23)|0) == 3) { + __label__ = 15; break; + } + else if ((($23)|0) == 4) { + __label__ = 16; break; + } + else if ((($23)|0) == 5) { + __label__ = 17; break; + } + else if ((($23)|0) == 0) { + __label__ = 18; break; + } + else { + __label__ = 19; break; + } + + case 13: + var $25=$3; + HEAP32[(($25)>>2)]=1; + var $26=$4; + HEAP32[(($26)>>2)]=8; + __label__ = 20; break; + case 14: + var $28=$3; + HEAP32[(($28)>>2)]=3; + var $29=$4; + HEAP32[(($29)>>2)]=5; + __label__ = 20; break; + case 15: + var $31=$3; + HEAP32[(($31)>>2)]=3; + var $32=$4; + HEAP32[(($32)>>2)]=8; + __label__ = 20; break; + case 16: + var $34=$3; + HEAP32[(($34)>>2)]=3; + var $35=$4; + HEAP32[(($35)>>2)]=8; + __label__ = 20; break; + case 17: + var $37=$3; + HEAP32[(($37)>>2)]=4; + var $38=$4; + HEAP32[(($38)>>2)]=8; + __label__ = 20; break; + case 18: + __label__ = 19; break; + case 19: + var $41=$3; + HEAP32[(($41)>>2)]=0; + var $42=$4; + HEAP32[(($42)>>2)]=0; + var $43=$1; + var $44=(($43)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=(($45)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$1; + var $49=(($48)|0); + var $50=HEAP32[(($49)>>2)]; + FUNCTION_TABLE[$47]($50, ((STRING_TABLE.__str15)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + __label__ = 20; break; + case 20: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_image_params["X"]=1; + +function _encoder_reste($encoder, $io_ptr, $io_ptr_end) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $_g_boolean_var_; + var $_g_boolean_var_1; + $1=$encoder; + $2=$io_ptr; + $3=$io_ptr_end; + __label__ = 2; break; + case 2: + var $5=$2; + var $6=$5; + var $7=(($6)>>>0)%4; + var $8=$3; + var $9=$8; + var $10=(($9)>>>0)%4; + var $11=(($7)|0)==(($10)|0); + if ($11) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $15=$_g_boolean_var_; + var $16=(($15)==(1)); + var $17=(($16)|0)!=0; + if ($17) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str116)|0), ((STRING_TABLE.___FUNCTION___encoder_reste)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str117)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + var $25=$2; + var $26=$3; + var $27=(($25)>>>0) <= (($26)>>>0); + if ($27) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + $_g_boolean_var_1=1; + __label__ = 15; break; + case 14: + $_g_boolean_var_1=0; + __label__ = 15; break; + case 15: + var $31=$_g_boolean_var_1; + var $32=(($31)==(1)); + var $33=(($32)|0)!=0; + if ($33) { __label__ = 16; break; } else { __label__ = 17; break; } + case 16: + __label__ = 20; break; + case 17: + __label__ = 18; break; + case 18: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str118)|0), ((STRING_TABLE.___FUNCTION___encoder_reste)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str119)|0),tempInt)); + __label__ = 19; break; + case 19: + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + var $40=$1; + var $41=(($40+360)|0); + var $42=(($41+4)|0); + HEAP32[(($42)>>2)]=0; + var $43=_stabrand(); + var $44=$1; + var $45=(($44+360)|0); + var $46=(($45+8)|0); + HEAP32[(($46)>>2)]=$43; + var $47=$1; + var $48=(($47+360)|0); + var $49=(($48+16)|0); + HEAP32[(($49)>>2)]=0; + var $50=HEAP32[((_wminext)>>2)]; + var $51=$1; + var $52=(($51+360)|0); + var $53=(($52+20)|0); + HEAP32[(($53)>>2)]=$50; + var $54=$1; + var $55=(($54+360)|0); + _set_wm_trigger($55); + var $56=$1; + var $57=(($56+360)|0); + _encoder_init_rle($57); + var $58=$3; + var $59=$2; + var $60=$58; + var $61=$59; + var $62=(($60-$61)|0); + var $63=(((($62)|0)/4)&-1); + var $64=$1; + var $65=(($64+48)|0); + HEAP32[(($65)>>2)]=$63; + var $66=$2; + var $67=$1; + var $68=(($67+40)|0); + HEAP32[(($68)>>2)]=$66; + var $69=$3; + var $70=$1; + var $71=(($70+44)|0); + HEAP32[(($71)>>2)]=$69; + var $72=$1; + var $73=(($72+52)|0); + HEAP32[(($73)>>2)]=0; + ; + return 1; + default: assert(0, "bad label: " + __label__); + } +} +_encoder_reste["X"]=1; + +function _encoder_reste_channels($encoder, $channels, $width, $bpc) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $i; + var $bucket; + var $end_bucket; + $2=$encoder; + $3=$channels; + $4=$width; + $5=$bpc; + var $6=$3; + var $7=$2; + var $8=(($7+16)|0); + HEAP32[(($8)>>2)]=$6; + $i=0; + __label__ = 2; break; + case 2: + var $10=$i; + var $11=$3; + var $12=(($10)|0) < (($11)|0); + if ($12) { __label__ = 3; break; } else { __label__ = 25; break; } + case 3: + var $14=$i; + var $15=$2; + var $16=(($15+56)|0); + var $17=(($16+$14*76)|0); + var $18=(($17+4)|0); + var $19=HEAP32[(($18)>>2)]; + var $20=$4; + var $21=(($19)|0) < (($20)|0); + if ($21) { __label__ = 4; break; } else { __label__ = 9; break; } + case 4: + var $23=$i; + var $24=$2; + var $25=(($24+56)|0); + var $26=(($25+$23*76)|0); + var $27=(($26+4)|0); + HEAP32[(($27)>>2)]=0; + var $28=$i; + var $29=$2; + var $30=(($29+56)|0); + var $31=(($30+$28*76)|0); + var $32=(($31+8)|0); + var $33=HEAP32[(($32)>>2)]; + var $34=(($33)|0)!=0; + if ($34) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + var $36=$2; + var $37=(($36)|0); + var $38=HEAP32[(($37)>>2)]; + var $39=(($38+16)|0); + var $40=HEAP32[(($39)>>2)]; + var $41=$2; + var $42=(($41)|0); + var $43=HEAP32[(($42)>>2)]; + var $44=$i; + var $45=$2; + var $46=(($45+56)|0); + var $47=(($46+$44*76)|0); + var $48=(($47+8)|0); + var $49=HEAP32[(($48)>>2)]; + var $50=(($49-1)|0); + FUNCTION_TABLE[$40]($43, $50); + __label__ = 6; break; + case 6: + var $52=$2; + var $53=(($52)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=(($54+12)|0); + var $56=HEAP32[(($55)>>2)]; + var $57=$2; + var $58=(($57)|0); + var $59=HEAP32[(($58)>>2)]; + var $60=$4; + var $61=(($60+1)|0); + var $62=FUNCTION_TABLE[$56]($59, $61); + var $63=$i; + var $64=$2; + var $65=(($64+56)|0); + var $66=(($65+$63*76)|0); + var $67=(($66+8)|0); + HEAP32[(($67)>>2)]=$62; + var $68=(($62)|0)!=0; + if ($68) { __label__ = 8; break; } else { __label__ = 7; break; } + case 7: + $1=0; + __label__ = 26; break; + case 8: + var $71=$i; + var $72=$2; + var $73=(($72+56)|0); + var $74=(($73+$71*76)|0); + var $75=(($74+8)|0); + var $76=HEAP32[(($75)>>2)]; + var $77=(($76+1)|0); + HEAP32[(($75)>>2)]=$77; + var $78=$4; + var $79=$i; + var $80=$2; + var $81=(($80+56)|0); + var $82=(($81+$79*76)|0); + var $83=(($82+4)|0); + HEAP32[(($83)>>2)]=$78; + __label__ = 9; break; + case 9: + var $85=$5; + var $86=(($85)|0)==8; + if ($86) { __label__ = 10; break; } else { __label__ = 15; break; } + case 10: + var $88=$i; + var $89=$2; + var $90=(($89+56)|0); + var $91=(($90+$88*76)|0); + var $92=(($91+16)|0); + var $93=(($92+8)|0); + var $94=HEAP32[(($93)>>2)]; + var $95=$94; + var $96=$2; + var $97=(($96+20)|0); + var $98=HEAP32[(($97)>>2)]; + var $99=((($98<<2))|0); + var $100=((($99<<3))|0); + _memset($95, 0, $100, 1); + var $101=$i; + var $102=$2; + var $103=(($102+56)|0); + var $104=(($103+$101*76)|0); + var $105=(($104+16)|0); + var $106=(($105+4)|0); + var $107=HEAP32[(($106)>>2)]; + $bucket=$107; + var $108=$bucket; + var $109=$2; + var $110=(($109+20)|0); + var $111=HEAP32[(($110)>>2)]; + var $112=(($108+($111<<3))|0); + $end_bucket=$112; + __label__ = 11; break; + case 11: + var $114=$bucket; + var $115=$end_bucket; + var $116=(($114)>>>0) < (($115)>>>0); + if ($116) { __label__ = 12; break; } else { __label__ = 14; break; } + case 12: + var $118=$bucket; + var $119=(($118+4)|0); + HEAP32[(($119)>>2)]=7; + __label__ = 13; break; + case 13: + var $121=$bucket; + var $122=(($121+8)|0); + $bucket=$122; + __label__ = 11; break; + case 14: + var $124=$i; + var $125=$2; + var $126=(($125+56)|0); + var $127=(($126+$124*76)|0); + var $128=(($127+16)|0); + var $129=(($128)|0); + var $130=HEAP32[(($129)>>2)]; + var $131=$i; + var $132=$2; + var $133=(($132+56)|0); + var $134=(($133+$131*76)|0); + var $135=(($134+12)|0); + HEAP32[(($135)>>2)]=$130; + __label__ = 23; break; + case 15: + var $137=$5; + var $138=(($137)|0)==5; + if ($138) { __label__ = 16; break; } else { __label__ = 21; break; } + case 16: + var $140=$i; + var $141=$2; + var $142=(($141+56)|0); + var $143=(($142+$140*76)|0); + var $144=(($143+28)|0); + var $145=(($144+8)|0); + var $146=HEAP32[(($145)>>2)]; + var $147=$146; + var $148=$2; + var $149=(($148+24)|0); + var $150=HEAP32[(($149)>>2)]; + var $151=((($150<<2))|0); + var $152=((($151<<3))|0); + _memset($147, 0, $152, 1); + var $153=$i; + var $154=$2; + var $155=(($154+56)|0); + var $156=(($155+$153*76)|0); + var $157=(($156+28)|0); + var $158=(($157+4)|0); + var $159=HEAP32[(($158)>>2)]; + $bucket=$159; + var $160=$bucket; + var $161=$2; + var $162=(($161+24)|0); + var $163=HEAP32[(($162)>>2)]; + var $164=(($160+($163<<3))|0); + $end_bucket=$164; + __label__ = 17; break; + case 17: + var $166=$bucket; + var $167=$end_bucket; + var $168=(($166)>>>0) < (($167)>>>0); + if ($168) { __label__ = 18; break; } else { __label__ = 20; break; } + case 18: + var $170=$bucket; + var $171=(($170+4)|0); + HEAP32[(($171)>>2)]=4; + __label__ = 19; break; + case 19: + var $173=$bucket; + var $174=(($173+8)|0); + $bucket=$174; + __label__ = 17; break; + case 20: + var $176=$i; + var $177=$2; + var $178=(($177+56)|0); + var $179=(($178+$176*76)|0); + var $180=(($179+28)|0); + var $181=(($180)|0); + var $182=HEAP32[(($181)>>2)]; + var $183=$i; + var $184=$2; + var $185=(($184+56)|0); + var $186=(($185+$183*76)|0); + var $187=(($186+12)|0); + HEAP32[(($187)>>2)]=$182; + __label__ = 22; break; + case 21: + var $189=$2; + var $190=(($189)|0); + var $191=HEAP32[(($190)>>2)]; + var $192=(($191+4)|0); + var $193=HEAP32[(($192)>>2)]; + var $194=$2; + var $195=(($194)|0); + var $196=HEAP32[(($195)>>2)]; + var $197=$5; + FUNCTION_TABLE[$193]($196, ((STRING_TABLE.__str115)|0), (tempInt=STACKTOP,STACKTOP += 8,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.___FUNCTION___encoder_reste_channels)|0),HEAP32[((tempInt+4)>>2)]=$197,tempInt)); + $1=0; + __label__ = 26; break; + case 22: + __label__ = 23; break; + case 23: + var $200=$i; + var $201=$2; + var $202=(($201+56)|0); + var $203=(($202+$200*76)|0); + var $204=(($203+40)|0); + var $205=(($204+4)|0); + HEAP32[(($205)>>2)]=0; + var $206=_stabrand(); + var $207=$i; + var $208=$2; + var $209=(($208+56)|0); + var $210=(($209+$207*76)|0); + var $211=(($210+40)|0); + var $212=(($211+8)|0); + HEAP32[(($212)>>2)]=$206; + var $213=$i; + var $214=$2; + var $215=(($214+56)|0); + var $216=(($215+$213*76)|0); + var $217=(($216+40)|0); + var $218=(($217+16)|0); + HEAP32[(($218)>>2)]=0; + var $219=HEAP32[((_wminext)>>2)]; + var $220=$i; + var $221=$2; + var $222=(($221+56)|0); + var $223=(($222+$220*76)|0); + var $224=(($223+40)|0); + var $225=(($224+20)|0); + HEAP32[(($225)>>2)]=$219; + var $226=$i; + var $227=$2; + var $228=(($227+56)|0); + var $229=(($228+$226*76)|0); + var $230=(($229+40)|0); + _set_wm_trigger($230); + var $231=$i; + var $232=$2; + var $233=(($232+56)|0); + var $234=(($233+$231*76)|0); + var $235=(($234+40)|0); + _encoder_init_rle($235); + __label__ = 24; break; + case 24: + var $237=$i; + var $238=(($237+1)|0); + $i=$238; + __label__ = 2; break; + case 25: + $1=1; + __label__ = 26; break; + case 26: + var $241=$1; + ; + return $241; + default: assert(0, "bad label: " + __label__); + } +} +_encoder_reste_channels["X"]=1; + +function _quic_decode_begin($quic, $io_ptr, $num_io_words, $out_type, $out_width, $out_height) { + var __stackBase__ = STACKTOP; STACKTOP += 8; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $encoder; + var $io_ptr_end; + var $type; + var $width; + var $height; + var $magic; + var $version; + var $channels=__stackBase__; + var $bpc=__stackBase__+4; + $2=$quic; + $3=$io_ptr; + $4=$num_io_words; + $5=$out_type; + $6=$out_width; + $7=$out_height; + var $8=$2; + var $9=$8; + $encoder=$9; + var $10=$3; + var $11=$4; + var $12=(($10+($11<<2))|0); + $io_ptr_end=$12; + var $13=$encoder; + var $14=$3; + var $15=$io_ptr_end; + var $16=_encoder_reste($13, $14, $15); + var $17=(($16)|0)!=0; + if ($17) { __label__ = 3; break; } else { __label__ = 2; break; } + case 2: + $1=-1; + __label__ = 10; break; + case 3: + var $20=$encoder; + _init_decode_io($20); + var $21=$encoder; + var $22=(($21+32)|0); + var $23=HEAP32[(($22)>>2)]; + $magic=$23; + var $24=$encoder; + _decode_eat32bits($24); + var $25=$magic; + var $26=HEAP32[(((STRING_TABLE.__str3))>>2)]; + var $27=(($25)|0)!=(($26)|0); + if ($27) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $29=$encoder; + var $30=(($29)|0); + var $31=HEAP32[(($30)>>2)]; + var $32=(($31+4)|0); + var $33=HEAP32[(($32)>>2)]; + var $34=$encoder; + var $35=(($34)|0); + var $36=HEAP32[(($35)>>2)]; + FUNCTION_TABLE[$33]($36, ((STRING_TABLE.__str16)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + $1=-1; + __label__ = 10; break; + case 5: + var $38=$encoder; + var $39=(($38+32)|0); + var $40=HEAP32[(($39)>>2)]; + $version=$40; + var $41=$encoder; + _decode_eat32bits($41); + var $42=$version; + var $43=(($42)|0)!=0; + if ($43) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $45=$encoder; + var $46=(($45)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=(($47+4)|0); + var $49=HEAP32[(($48)>>2)]; + var $50=$encoder; + var $51=(($50)|0); + var $52=HEAP32[(($51)>>2)]; + FUNCTION_TABLE[$49]($52, ((STRING_TABLE.__str17)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + $1=-1; + __label__ = 10; break; + case 7: + var $54=$encoder; + var $55=(($54+32)|0); + var $56=HEAP32[(($55)>>2)]; + $type=$56; + var $57=$encoder; + _decode_eat32bits($57); + var $58=$encoder; + var $59=(($58+32)|0); + var $60=HEAP32[(($59)>>2)]; + $width=$60; + var $61=$encoder; + _decode_eat32bits($61); + var $62=$encoder; + var $63=(($62+32)|0); + var $64=HEAP32[(($63)>>2)]; + $height=$64; + var $65=$encoder; + _decode_eat32bits($65); + var $66=$encoder; + var $67=$type; + _quic_image_params($66, $67, $channels, $bpc); + var $68=$encoder; + var $69=HEAP32[(($channels)>>2)]; + var $70=$width; + var $71=HEAP32[(($bpc)>>2)]; + var $72=_encoder_reste_channels($68, $69, $70, $71); + var $73=(($72)|0)!=0; + if ($73) { __label__ = 9; break; } else { __label__ = 8; break; } + case 8: + $1=-1; + __label__ = 10; break; + case 9: + var $76=$width; + var $77=$encoder; + var $78=(($77+8)|0); + HEAP32[(($78)>>2)]=$76; + var $79=$6; + HEAP32[(($79)>>2)]=$76; + var $80=$height; + var $81=$encoder; + var $82=(($81+12)|0); + HEAP32[(($82)>>2)]=$80; + var $83=$7; + HEAP32[(($83)>>2)]=$80; + var $84=$type; + var $85=$encoder; + var $86=(($85+4)|0); + HEAP32[(($86)>>2)]=$84; + var $87=$5; + HEAP32[(($87)>>2)]=$84; + $1=0; + __label__ = 10; break; + case 10: + var $89=$1; + STACKTOP = __stackBase__; + return $89; + default: assert(0, "bad label: " + __label__); + } +} +_quic_decode_begin["X"]=1; + +function _decode_eat32bits($encoder) { + ; + var __label__; + + var $1; + $1=$encoder; + var $2=$1; + _decode_eatbits($2, 16); + var $3=$1; + _decode_eatbits($3, 16); + ; + return; +} + + +function _quic_decode($quic, $type, $buf, $stride) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $encoder; + var $row; + var $prev; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + var $_g_boolean_var_3; + var $_g_boolean_var_4; + var $_g_boolean_var_5; + var $_g_boolean_var_6; + $2=$quic; + $3=$type; + $4=$buf; + $5=$stride; + var $6=$2; + var $7=$6; + $encoder=$7; + __label__ = 2; break; + case 2: + var $9=$4; + var $10=(($9)|0)!=0; + if ($10) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $14=$_g_boolean_var_; + var $15=(($14)==(1)); + var $16=(($15)|0)!=0; + if ($16) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str18)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str19)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $23=$encoder; + var $24=(($23+4)|0); + var $25=HEAP32[(($24)>>2)]; + if ((($25)|0) == 4 || (($25)|0) == 3) { + __label__ = 12; break; + } + else if ((($25)|0) == 2) { + __label__ = 52; break; + } + else if ((($25)|0) == 5) { + __label__ = 93; break; + } + else if ((($25)|0) == 1) { + __label__ = 109; break; + } + else if ((($25)|0) == 0) { + __label__ = 125; break; + } + else { + __label__ = 126; break; + } + + case 12: + var $27=$3; + var $28=(($27)|0)==4; + if ($28) { __label__ = 13; break; } else { __label__ = 31; break; } + case 13: + __label__ = 14; break; + case 14: + var $31=$5; + var $32=(($31)|0) < 0; + if ($32) { __label__ = 15; break; } else { __label__ = 16; break; } + case 15: + var $34=$5; + var $35=(((-$34))|0); + var $39 = $35;__label__ = 17; break; + case 16: + var $37=$5; + var $39 = $37;__label__ = 17; break; + case 17: + var $39; + var $40=$encoder; + var $41=(($40+8)|0); + var $42=HEAP32[(($41)>>2)]; + var $43=((($42<<2))|0); + var $44=(($39)|0) >= (($43)|0); + if ($44) { __label__ = 18; break; } else { __label__ = 19; break; } + case 18: + $_g_boolean_var_1=1; + __label__ = 20; break; + case 19: + $_g_boolean_var_1=0; + __label__ = 20; break; + case 20: + var $48=$_g_boolean_var_1; + var $49=(($48)==(1)); + var $50=(($49)|0)!=0; + if ($50) { __label__ = 21; break; } else { __label__ = 22; break; } + case 21: + __label__ = 25; break; + case 22: + __label__ = 23; break; + case 23: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str20)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str21)|0),tempInt)); + __label__ = 24; break; + case 24: + __label__ = 25; break; + case 25: + __label__ = 26; break; + case 26: + var $57=$encoder; + var $58=(($57+56)|0); + var $59=(($58)|0); + var $60=(($59+8)|0); + var $61=HEAP32[(($60)>>2)]; + var $62=(($61-1)|0); + HEAP8[($62)]=0; + var $63=$encoder; + var $64=(($63+56)|0); + var $65=(($64+76)|0); + var $66=(($65+8)|0); + var $67=HEAP32[(($66)>>2)]; + var $68=(($67-1)|0); + HEAP8[($68)]=0; + var $69=$encoder; + var $70=(($69+56)|0); + var $71=(($70+152)|0); + var $72=(($71+8)|0); + var $73=HEAP32[(($72)>>2)]; + var $74=(($73-1)|0); + HEAP8[($74)]=0; + var $75=$encoder; + var $76=$4; + var $77=$76; + var $78=$encoder; + var $79=(($78+8)|0); + var $80=HEAP32[(($79)>>2)]; + _quic_rgb32_uncompress_row0($75, $77, $80); + var $81=$encoder; + var $82=(($81+52)|0); + var $83=HEAP32[(($82)>>2)]; + var $84=(($83+1)|0); + HEAP32[(($82)>>2)]=$84; + $row=1; + __label__ = 27; break; + case 27: + var $86=$row; + var $87=$encoder; + var $88=(($87+12)|0); + var $89=HEAPU32[(($88)>>2)]; + var $90=(($86)>>>0) < (($89)>>>0); + if ($90) { __label__ = 28; break; } else { __label__ = 30; break; } + case 28: + var $92=$4; + $prev=$92; + var $93=$5; + var $94=$4; + var $95=(($94+$93)|0); + $4=$95; + var $96=$encoder; + var $97=(($96+56)|0); + var $98=(($97)|0); + var $99=(($98+8)|0); + var $100=HEAP32[(($99)>>2)]; + var $101=(($100)|0); + var $102=HEAP8[($101)]; + var $103=$encoder; + var $104=(($103+56)|0); + var $105=(($104)|0); + var $106=(($105+8)|0); + var $107=HEAP32[(($106)>>2)]; + var $108=(($107-1)|0); + HEAP8[($108)]=$102; + var $109=$encoder; + var $110=(($109+56)|0); + var $111=(($110+76)|0); + var $112=(($111+8)|0); + var $113=HEAP32[(($112)>>2)]; + var $114=(($113)|0); + var $115=HEAP8[($114)]; + var $116=$encoder; + var $117=(($116+56)|0); + var $118=(($117+76)|0); + var $119=(($118+8)|0); + var $120=HEAP32[(($119)>>2)]; + var $121=(($120-1)|0); + HEAP8[($121)]=$115; + var $122=$encoder; + var $123=(($122+56)|0); + var $124=(($123+152)|0); + var $125=(($124+8)|0); + var $126=HEAP32[(($125)>>2)]; + var $127=(($126)|0); + var $128=HEAP8[($127)]; + var $129=$encoder; + var $130=(($129+56)|0); + var $131=(($130+152)|0); + var $132=(($131+8)|0); + var $133=HEAP32[(($132)>>2)]; + var $134=(($133-1)|0); + HEAP8[($134)]=$128; + var $135=$encoder; + var $136=$prev; + var $137=$136; + var $138=$4; + var $139=$138; + var $140=$encoder; + var $141=(($140+8)|0); + var $142=HEAP32[(($141)>>2)]; + _quic_rgb32_uncompress_row($135, $137, $139, $142); + var $143=$encoder; + var $144=(($143+52)|0); + var $145=HEAP32[(($144)>>2)]; + var $146=(($145+1)|0); + HEAP32[(($144)>>2)]=$146; + __label__ = 29; break; + case 29: + var $148=$row; + var $149=(($148+1)|0); + $row=$149; + __label__ = 27; break; + case 30: + __label__ = 127; break; + case 31: + var $152=$3; + var $153=(($152)|0)==3; + if ($153) { __label__ = 32; break; } else { __label__ = 50; break; } + case 32: + __label__ = 33; break; + case 33: + var $156=$5; + var $157=(($156)|0) < 0; + if ($157) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + var $159=$5; + var $160=(((-$159))|0); + var $164 = $160;__label__ = 36; break; + case 35: + var $162=$5; + var $164 = $162;__label__ = 36; break; + case 36: + var $164; + var $165=$encoder; + var $166=(($165+8)|0); + var $167=HEAP32[(($166)>>2)]; + var $168=(($167*3)|0); + var $169=(($164)|0) >= (($168)|0); + if ($169) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + $_g_boolean_var_2=1; + __label__ = 39; break; + case 38: + $_g_boolean_var_2=0; + __label__ = 39; break; + case 39: + var $173=$_g_boolean_var_2; + var $174=(($173)==(1)); + var $175=(($174)|0)!=0; + if ($175) { __label__ = 40; break; } else { __label__ = 41; break; } + case 40: + __label__ = 44; break; + case 41: + __label__ = 42; break; + case 42: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str22)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str23)|0),tempInt)); + __label__ = 43; break; + case 43: + __label__ = 44; break; + case 44: + __label__ = 45; break; + case 45: + var $182=$encoder; + var $183=(($182+56)|0); + var $184=(($183)|0); + var $185=(($184+8)|0); + var $186=HEAP32[(($185)>>2)]; + var $187=(($186-1)|0); + HEAP8[($187)]=0; + var $188=$encoder; + var $189=(($188+56)|0); + var $190=(($189+76)|0); + var $191=(($190+8)|0); + var $192=HEAP32[(($191)>>2)]; + var $193=(($192-1)|0); + HEAP8[($193)]=0; + var $194=$encoder; + var $195=(($194+56)|0); + var $196=(($195+152)|0); + var $197=(($196+8)|0); + var $198=HEAP32[(($197)>>2)]; + var $199=(($198-1)|0); + HEAP8[($199)]=0; + var $200=$encoder; + var $201=$4; + var $202=$201; + var $203=$encoder; + var $204=(($203+8)|0); + var $205=HEAP32[(($204)>>2)]; + _quic_rgb24_uncompress_row0($200, $202, $205); + var $206=$encoder; + var $207=(($206+52)|0); + var $208=HEAP32[(($207)>>2)]; + var $209=(($208+1)|0); + HEAP32[(($207)>>2)]=$209; + $row=1; + __label__ = 46; break; + case 46: + var $211=$row; + var $212=$encoder; + var $213=(($212+12)|0); + var $214=HEAPU32[(($213)>>2)]; + var $215=(($211)>>>0) < (($214)>>>0); + if ($215) { __label__ = 47; break; } else { __label__ = 49; break; } + case 47: + var $217=$4; + $prev=$217; + var $218=$5; + var $219=$4; + var $220=(($219+$218)|0); + $4=$220; + var $221=$encoder; + var $222=(($221+56)|0); + var $223=(($222)|0); + var $224=(($223+8)|0); + var $225=HEAP32[(($224)>>2)]; + var $226=(($225)|0); + var $227=HEAP8[($226)]; + var $228=$encoder; + var $229=(($228+56)|0); + var $230=(($229)|0); + var $231=(($230+8)|0); + var $232=HEAP32[(($231)>>2)]; + var $233=(($232-1)|0); + HEAP8[($233)]=$227; + var $234=$encoder; + var $235=(($234+56)|0); + var $236=(($235+76)|0); + var $237=(($236+8)|0); + var $238=HEAP32[(($237)>>2)]; + var $239=(($238)|0); + var $240=HEAP8[($239)]; + var $241=$encoder; + var $242=(($241+56)|0); + var $243=(($242+76)|0); + var $244=(($243+8)|0); + var $245=HEAP32[(($244)>>2)]; + var $246=(($245-1)|0); + HEAP8[($246)]=$240; + var $247=$encoder; + var $248=(($247+56)|0); + var $249=(($248+152)|0); + var $250=(($249+8)|0); + var $251=HEAP32[(($250)>>2)]; + var $252=(($251)|0); + var $253=HEAP8[($252)]; + var $254=$encoder; + var $255=(($254+56)|0); + var $256=(($255+152)|0); + var $257=(($256+8)|0); + var $258=HEAP32[(($257)>>2)]; + var $259=(($258-1)|0); + HEAP8[($259)]=$253; + var $260=$encoder; + var $261=$prev; + var $262=$261; + var $263=$4; + var $264=$263; + var $265=$encoder; + var $266=(($265+8)|0); + var $267=HEAP32[(($266)>>2)]; + _quic_rgb24_uncompress_row($260, $262, $264, $267); + var $268=$encoder; + var $269=(($268+52)|0); + var $270=HEAP32[(($269)>>2)]; + var $271=(($270+1)|0); + HEAP32[(($269)>>2)]=$271; + __label__ = 48; break; + case 48: + var $273=$row; + var $274=(($273+1)|0); + $row=$274; + __label__ = 46; break; + case 49: + __label__ = 127; break; + case 50: + __label__ = 51; break; + case 51: + var $278=$encoder; + var $279=(($278)|0); + var $280=HEAP32[(($279)>>2)]; + var $281=(($280+4)|0); + var $282=HEAP32[(($281)>>2)]; + var $283=$encoder; + var $284=(($283)|0); + var $285=HEAP32[(($284)>>2)]; + FUNCTION_TABLE[$282]($285, ((STRING_TABLE.__str24)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + $1=-1; + __label__ = 128; break; + case 52: + var $287=$3; + var $288=(($287)|0)==2; + if ($288) { __label__ = 53; break; } else { __label__ = 71; break; } + case 53: + __label__ = 54; break; + case 54: + var $291=$5; + var $292=(($291)|0) < 0; + if ($292) { __label__ = 55; break; } else { __label__ = 56; break; } + case 55: + var $294=$5; + var $295=(((-$294))|0); + var $299 = $295;__label__ = 57; break; + case 56: + var $297=$5; + var $299 = $297;__label__ = 57; break; + case 57: + var $299; + var $300=$encoder; + var $301=(($300+8)|0); + var $302=HEAP32[(($301)>>2)]; + var $303=((($302<<1))|0); + var $304=(($299)|0) >= (($303)|0); + if ($304) { __label__ = 58; break; } else { __label__ = 59; break; } + case 58: + $_g_boolean_var_3=1; + __label__ = 60; break; + case 59: + $_g_boolean_var_3=0; + __label__ = 60; break; + case 60: + var $308=$_g_boolean_var_3; + var $309=(($308)==(1)); + var $310=(($309)|0)!=0; + if ($310) { __label__ = 61; break; } else { __label__ = 62; break; } + case 61: + __label__ = 65; break; + case 62: + __label__ = 63; break; + case 63: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str25)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str26)|0),tempInt)); + __label__ = 64; break; + case 64: + __label__ = 65; break; + case 65: + __label__ = 66; break; + case 66: + var $317=$encoder; + var $318=(($317+56)|0); + var $319=(($318)|0); + var $320=(($319+8)|0); + var $321=HEAP32[(($320)>>2)]; + var $322=(($321-1)|0); + HEAP8[($322)]=0; + var $323=$encoder; + var $324=(($323+56)|0); + var $325=(($324+76)|0); + var $326=(($325+8)|0); + var $327=HEAP32[(($326)>>2)]; + var $328=(($327-1)|0); + HEAP8[($328)]=0; + var $329=$encoder; + var $330=(($329+56)|0); + var $331=(($330+152)|0); + var $332=(($331+8)|0); + var $333=HEAP32[(($332)>>2)]; + var $334=(($333-1)|0); + HEAP8[($334)]=0; + var $335=$encoder; + var $336=$4; + var $337=$336; + var $338=$encoder; + var $339=(($338+8)|0); + var $340=HEAP32[(($339)>>2)]; + _quic_rgb16_uncompress_row0($335, $337, $340); + var $341=$encoder; + var $342=(($341+52)|0); + var $343=HEAP32[(($342)>>2)]; + var $344=(($343+1)|0); + HEAP32[(($342)>>2)]=$344; + $row=1; + __label__ = 67; break; + case 67: + var $346=$row; + var $347=$encoder; + var $348=(($347+12)|0); + var $349=HEAPU32[(($348)>>2)]; + var $350=(($346)>>>0) < (($349)>>>0); + if ($350) { __label__ = 68; break; } else { __label__ = 70; break; } + case 68: + var $352=$4; + $prev=$352; + var $353=$5; + var $354=$4; + var $355=(($354+$353)|0); + $4=$355; + var $356=$encoder; + var $357=(($356+56)|0); + var $358=(($357)|0); + var $359=(($358+8)|0); + var $360=HEAP32[(($359)>>2)]; + var $361=(($360)|0); + var $362=HEAP8[($361)]; + var $363=$encoder; + var $364=(($363+56)|0); + var $365=(($364)|0); + var $366=(($365+8)|0); + var $367=HEAP32[(($366)>>2)]; + var $368=(($367-1)|0); + HEAP8[($368)]=$362; + var $369=$encoder; + var $370=(($369+56)|0); + var $371=(($370+76)|0); + var $372=(($371+8)|0); + var $373=HEAP32[(($372)>>2)]; + var $374=(($373)|0); + var $375=HEAP8[($374)]; + var $376=$encoder; + var $377=(($376+56)|0); + var $378=(($377+76)|0); + var $379=(($378+8)|0); + var $380=HEAP32[(($379)>>2)]; + var $381=(($380-1)|0); + HEAP8[($381)]=$375; + var $382=$encoder; + var $383=(($382+56)|0); + var $384=(($383+152)|0); + var $385=(($384+8)|0); + var $386=HEAP32[(($385)>>2)]; + var $387=(($386)|0); + var $388=HEAP8[($387)]; + var $389=$encoder; + var $390=(($389+56)|0); + var $391=(($390+152)|0); + var $392=(($391+8)|0); + var $393=HEAP32[(($392)>>2)]; + var $394=(($393-1)|0); + HEAP8[($394)]=$388; + var $395=$encoder; + var $396=$prev; + var $397=$396; + var $398=$4; + var $399=$398; + var $400=$encoder; + var $401=(($400+8)|0); + var $402=HEAP32[(($401)>>2)]; + _quic_rgb16_uncompress_row($395, $397, $399, $402); + var $403=$encoder; + var $404=(($403+52)|0); + var $405=HEAP32[(($404)>>2)]; + var $406=(($405+1)|0); + HEAP32[(($404)>>2)]=$406; + __label__ = 69; break; + case 69: + var $408=$row; + var $409=(($408+1)|0); + $row=$409; + __label__ = 67; break; + case 70: + __label__ = 92; break; + case 71: + var $412=$3; + var $413=(($412)|0)==4; + if ($413) { __label__ = 72; break; } else { __label__ = 90; break; } + case 72: + __label__ = 73; break; + case 73: + var $416=$5; + var $417=(($416)|0) < 0; + if ($417) { __label__ = 74; break; } else { __label__ = 75; break; } + case 74: + var $419=$5; + var $420=(((-$419))|0); + var $424 = $420;__label__ = 76; break; + case 75: + var $422=$5; + var $424 = $422;__label__ = 76; break; + case 76: + var $424; + var $425=$encoder; + var $426=(($425+8)|0); + var $427=HEAP32[(($426)>>2)]; + var $428=((($427<<2))|0); + var $429=(($424)|0) >= (($428)|0); + if ($429) { __label__ = 77; break; } else { __label__ = 78; break; } + case 77: + $_g_boolean_var_4=1; + __label__ = 79; break; + case 78: + $_g_boolean_var_4=0; + __label__ = 79; break; + case 79: + var $433=$_g_boolean_var_4; + var $434=(($433)==(1)); + var $435=(($434)|0)!=0; + if ($435) { __label__ = 80; break; } else { __label__ = 81; break; } + case 80: + __label__ = 84; break; + case 81: + __label__ = 82; break; + case 82: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str27)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str21)|0),tempInt)); + __label__ = 83; break; + case 83: + __label__ = 84; break; + case 84: + __label__ = 85; break; + case 85: + var $442=$encoder; + var $443=(($442+56)|0); + var $444=(($443)|0); + var $445=(($444+8)|0); + var $446=HEAP32[(($445)>>2)]; + var $447=(($446-1)|0); + HEAP8[($447)]=0; + var $448=$encoder; + var $449=(($448+56)|0); + var $450=(($449+76)|0); + var $451=(($450+8)|0); + var $452=HEAP32[(($451)>>2)]; + var $453=(($452-1)|0); + HEAP8[($453)]=0; + var $454=$encoder; + var $455=(($454+56)|0); + var $456=(($455+152)|0); + var $457=(($456+8)|0); + var $458=HEAP32[(($457)>>2)]; + var $459=(($458-1)|0); + HEAP8[($459)]=0; + var $460=$encoder; + var $461=$4; + var $462=$461; + var $463=$encoder; + var $464=(($463+8)|0); + var $465=HEAP32[(($464)>>2)]; + _quic_rgb16_to_32_uncompress_row0($460, $462, $465); + var $466=$encoder; + var $467=(($466+52)|0); + var $468=HEAP32[(($467)>>2)]; + var $469=(($468+1)|0); + HEAP32[(($467)>>2)]=$469; + $row=1; + __label__ = 86; break; + case 86: + var $471=$row; + var $472=$encoder; + var $473=(($472+12)|0); + var $474=HEAPU32[(($473)>>2)]; + var $475=(($471)>>>0) < (($474)>>>0); + if ($475) { __label__ = 87; break; } else { __label__ = 89; break; } + case 87: + var $477=$4; + $prev=$477; + var $478=$5; + var $479=$4; + var $480=(($479+$478)|0); + $4=$480; + var $481=$encoder; + var $482=(($481+56)|0); + var $483=(($482)|0); + var $484=(($483+8)|0); + var $485=HEAP32[(($484)>>2)]; + var $486=(($485)|0); + var $487=HEAP8[($486)]; + var $488=$encoder; + var $489=(($488+56)|0); + var $490=(($489)|0); + var $491=(($490+8)|0); + var $492=HEAP32[(($491)>>2)]; + var $493=(($492-1)|0); + HEAP8[($493)]=$487; + var $494=$encoder; + var $495=(($494+56)|0); + var $496=(($495+76)|0); + var $497=(($496+8)|0); + var $498=HEAP32[(($497)>>2)]; + var $499=(($498)|0); + var $500=HEAP8[($499)]; + var $501=$encoder; + var $502=(($501+56)|0); + var $503=(($502+76)|0); + var $504=(($503+8)|0); + var $505=HEAP32[(($504)>>2)]; + var $506=(($505-1)|0); + HEAP8[($506)]=$500; + var $507=$encoder; + var $508=(($507+56)|0); + var $509=(($508+152)|0); + var $510=(($509+8)|0); + var $511=HEAP32[(($510)>>2)]; + var $512=(($511)|0); + var $513=HEAP8[($512)]; + var $514=$encoder; + var $515=(($514+56)|0); + var $516=(($515+152)|0); + var $517=(($516+8)|0); + var $518=HEAP32[(($517)>>2)]; + var $519=(($518-1)|0); + HEAP8[($519)]=$513; + var $520=$encoder; + var $521=$prev; + var $522=$521; + var $523=$4; + var $524=$523; + var $525=$encoder; + var $526=(($525+8)|0); + var $527=HEAP32[(($526)>>2)]; + _quic_rgb16_to_32_uncompress_row($520, $522, $524, $527); + var $528=$encoder; + var $529=(($528+52)|0); + var $530=HEAP32[(($529)>>2)]; + var $531=(($530+1)|0); + HEAP32[(($529)>>2)]=$531; + __label__ = 88; break; + case 88: + var $533=$row; + var $534=(($533+1)|0); + $row=$534; + __label__ = 86; break; + case 89: + __label__ = 91; break; + case 90: + var $537=$encoder; + var $538=(($537)|0); + var $539=HEAP32[(($538)>>2)]; + var $540=(($539+4)|0); + var $541=HEAP32[(($540)>>2)]; + var $542=$encoder; + var $543=(($542)|0); + var $544=HEAP32[(($543)>>2)]; + FUNCTION_TABLE[$541]($544, ((STRING_TABLE.__str24)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + $1=-1; + __label__ = 128; break; + case 91: + __label__ = 92; break; + case 92: + __label__ = 127; break; + case 93: + var $548=$3; + var $549=(($548)|0)!=5; + if ($549) { __label__ = 94; break; } else { __label__ = 95; break; } + case 94: + var $551=$encoder; + var $552=(($551)|0); + var $553=HEAP32[(($552)>>2)]; + var $554=(($553+4)|0); + var $555=HEAP32[(($554)>>2)]; + var $556=$encoder; + var $557=(($556)|0); + var $558=HEAP32[(($557)>>2)]; + FUNCTION_TABLE[$555]($558, ((STRING_TABLE.__str24)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + $1=-1; + __label__ = 128; break; + case 95: + __label__ = 96; break; + case 96: + var $561=$5; + var $562=(($561)|0) < 0; + if ($562) { __label__ = 97; break; } else { __label__ = 98; break; } + case 97: + var $564=$5; + var $565=(((-$564))|0); + var $569 = $565;__label__ = 99; break; + case 98: + var $567=$5; + var $569 = $567;__label__ = 99; break; + case 99: + var $569; + var $570=$encoder; + var $571=(($570+8)|0); + var $572=HEAP32[(($571)>>2)]; + var $573=((($572<<2))|0); + var $574=(($569)|0) >= (($573)|0); + if ($574) { __label__ = 100; break; } else { __label__ = 101; break; } + case 100: + $_g_boolean_var_5=1; + __label__ = 102; break; + case 101: + $_g_boolean_var_5=0; + __label__ = 102; break; + case 102: + var $578=$_g_boolean_var_5; + var $579=(($578)==(1)); + var $580=(($579)|0)!=0; + if ($580) { __label__ = 103; break; } else { __label__ = 104; break; } + case 103: + __label__ = 107; break; + case 104: + __label__ = 105; break; + case 105: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str28)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str21)|0),tempInt)); + __label__ = 106; break; + case 106: + __label__ = 107; break; + case 107: + __label__ = 108; break; + case 108: + var $587=$encoder; + var $588=$4; + var $589=$5; + _uncompress_rgba($587, $588, $589); + __label__ = 127; break; + case 109: + var $591=$3; + var $592=(($591)|0)!=1; + if ($592) { __label__ = 110; break; } else { __label__ = 111; break; } + case 110: + var $594=$encoder; + var $595=(($594)|0); + var $596=HEAP32[(($595)>>2)]; + var $597=(($596+4)|0); + var $598=HEAP32[(($597)>>2)]; + var $599=$encoder; + var $600=(($599)|0); + var $601=HEAP32[(($600)>>2)]; + FUNCTION_TABLE[$598]($601, ((STRING_TABLE.__str24)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + $1=-1; + __label__ = 128; break; + case 111: + __label__ = 112; break; + case 112: + var $604=$5; + var $605=(($604)|0) < 0; + if ($605) { __label__ = 113; break; } else { __label__ = 114; break; } + case 113: + var $607=$5; + var $608=(((-$607))|0); + var $612 = $608;__label__ = 115; break; + case 114: + var $610=$5; + var $612 = $610;__label__ = 115; break; + case 115: + var $612; + var $613=$encoder; + var $614=(($613+8)|0); + var $615=HEAP32[(($614)>>2)]; + var $616=(($612)|0) >= (($615)|0); + if ($616) { __label__ = 116; break; } else { __label__ = 117; break; } + case 116: + $_g_boolean_var_6=1; + __label__ = 118; break; + case 117: + $_g_boolean_var_6=0; + __label__ = 118; break; + case 118: + var $620=$_g_boolean_var_6; + var $621=(($620)==(1)); + var $622=(($621)|0)!=0; + if ($622) { __label__ = 119; break; } else { __label__ = 120; break; } + case 119: + __label__ = 123; break; + case 120: + __label__ = 121; break; + case 121: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str29)|0), ((STRING_TABLE.___FUNCTION___quic_decode)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str30)|0),tempInt)); + __label__ = 122; break; + case 122: + __label__ = 123; break; + case 123: + __label__ = 124; break; + case 124: + var $629=$encoder; + var $630=$4; + var $631=$5; + _uncompress_gray($629, $630, $631); + __label__ = 127; break; + case 125: + __label__ = 126; break; + case 126: + var $634=$encoder; + var $635=(($634)|0); + var $636=HEAP32[(($635)>>2)]; + var $637=(($636)|0); + var $638=HEAP32[(($637)>>2)]; + var $639=$encoder; + var $640=(($639)|0); + var $641=HEAP32[(($640)>>2)]; + FUNCTION_TABLE[$638]($641, ((STRING_TABLE.__str15)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + __label__ = 127; break; + case 127: + $1=0; + __label__ = 128; break; + case 128: + var $644=$1; + ; + return $644; + default: assert(0, "bad label: " + __label__); + } +} +_quic_decode["X"]=1; + +function _quic_rgb32_uncompress_row0($encoder, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$cur_row; + $3=$width; + $bpc=8; + $bpc_mask=255; + $pos=0; + __label__ = 2; break; + case 2: + var $5=HEAP32[((_wmimax)>>2)]; + var $6=$1; + var $7=(($6+360)|0); + var $8=(($7+16)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=(($5)|0) > (($9)|0); + if ($10) { __label__ = 3; break; } else { var $19 = 0;__label__ = 4; break; } + case 3: + var $12=$1; + var $13=(($12+360)|0); + var $14=(($13+20)|0); + var $15=HEAPU32[(($14)>>2)]; + var $16=$3; + var $17=(($15)>>>0) <= (($16)>>>0); + var $19 = $17;__label__ = 4; break; + case 4: + var $19; + if ($19) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $21=$1; + var $22=(($21+360)|0); + var $23=(($22+20)|0); + var $24=HEAP32[(($23)>>2)]; + var $25=(($24)|0)!=0; + if ($25) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $27=$1; + var $28=$pos; + var $29=$2; + var $30=$pos; + var $31=$1; + var $32=(($31+360)|0); + var $33=(($32+20)|0); + var $34=HEAP32[(($33)>>2)]; + var $35=(($30+$34)|0); + var $36=$1; + var $37=(($36+360)|0); + var $38=(($37+16)|0); + var $39=HEAP32[(($38)>>2)]; + var $40=((_bppmask+($39<<2))|0); + var $41=HEAP32[(($40)>>2)]; + _quic_rgb32_uncompress_row0_seg($27, $28, $29, $35, $41, 8, 255); + var $42=$1; + var $43=(($42+360)|0); + var $44=(($43+20)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=$pos; + var $47=(($46+$45)|0); + $pos=$47; + var $48=$1; + var $49=(($48+360)|0); + var $50=(($49+20)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$3; + var $53=(($52-$51)|0); + $3=$53; + __label__ = 7; break; + case 7: + var $55=$1; + var $56=(($55+360)|0); + var $57=(($56+16)|0); + var $58=HEAP32[(($57)>>2)]; + var $59=(($58+1)|0); + HEAP32[(($57)>>2)]=$59; + var $60=$1; + var $61=(($60+360)|0); + _set_wm_trigger($61); + var $62=HEAP32[((_wminext)>>2)]; + var $63=$1; + var $64=(($63+360)|0); + var $65=(($64+20)|0); + HEAP32[(($65)>>2)]=$62; + __label__ = 2; break; + case 8: + var $67=$3; + var $68=(($67)|0)!=0; + if ($68) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $70=$1; + var $71=$pos; + var $72=$2; + var $73=$pos; + var $74=$3; + var $75=(($73+$74)|0); + var $76=$1; + var $77=(($76+360)|0); + var $78=(($77+16)|0); + var $79=HEAP32[(($78)>>2)]; + var $80=((_bppmask+($79<<2))|0); + var $81=HEAP32[(($80)>>2)]; + _quic_rgb32_uncompress_row0_seg($70, $71, $72, $75, $81, 8, 255); + var $82=HEAP32[((_wmimax)>>2)]; + var $83=$1; + var $84=(($83+360)|0); + var $85=(($84+16)|0); + var $86=HEAP32[(($85)>>2)]; + var $87=(($82)|0) > (($86)|0); + if ($87) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $89=$3; + var $90=$1; + var $91=(($90+360)|0); + var $92=(($91+20)|0); + var $93=HEAP32[(($92)>>2)]; + var $94=(($93-$89)|0); + HEAP32[(($92)>>2)]=$94; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $98=$1; + var $99=(($98+360)|0); + var $100=(($99+16)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=HEAP32[((_wmimax)>>2)]; + var $103=(($101)|0) <= (($102)|0); + if ($103) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $107=$_g_boolean_var_; + var $108=(($107)==(1)); + var $109=(($108)|0)!=0; + if ($109) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str88)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $117=$1; + var $118=(($117+360)|0); + var $119=(($118+16)|0); + var $120=HEAPU32[(($119)>>2)]; + var $121=(($120)>>>0) <= 32; + if ($121) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $125=$_g_boolean_var_1; + var $126=(($125)==(1)); + var $127=(($126)|0)!=0; + if ($127) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str89)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $135=HEAP32[((_wminext)>>2)]; + var $136=(($135)|0) > 0; + if ($136) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $140=$_g_boolean_var_2; + var $141=(($140)==(1)); + var $142=(($141)|0)!=0; + if ($142) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str90)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb32_uncompress_row0["X"]=1; + +function _quic_rgb32_uncompress_row($encoder, $prev_row, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$width; + $bpc=8; + $bpc_mask=255; + $pos=0; + __label__ = 2; break; + case 2: + var $6=HEAP32[((_wmimax)>>2)]; + var $7=$1; + var $8=(($7+360)|0); + var $9=(($8+16)|0); + var $10=HEAP32[(($9)>>2)]; + var $11=(($6)|0) > (($10)|0); + if ($11) { __label__ = 3; break; } else { var $20 = 0;__label__ = 4; break; } + case 3: + var $13=$1; + var $14=(($13+360)|0); + var $15=(($14+20)|0); + var $16=HEAPU32[(($15)>>2)]; + var $17=$4; + var $18=(($16)>>>0) <= (($17)>>>0); + var $20 = $18;__label__ = 4; break; + case 4: + var $20; + if ($20) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $22=$1; + var $23=(($22+360)|0); + var $24=(($23+20)|0); + var $25=HEAP32[(($24)>>2)]; + var $26=(($25)|0)!=0; + if ($26) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $28=$1; + var $29=$2; + var $30=$3; + var $31=$pos; + var $32=$pos; + var $33=$1; + var $34=(($33+360)|0); + var $35=(($34+20)|0); + var $36=HEAP32[(($35)>>2)]; + var $37=(($32+$36)|0); + _quic_rgb32_uncompress_row_seg($28, $29, $30, $31, $37, 8, 255); + var $38=$1; + var $39=(($38+360)|0); + var $40=(($39+20)|0); + var $41=HEAP32[(($40)>>2)]; + var $42=$pos; + var $43=(($42+$41)|0); + $pos=$43; + var $44=$1; + var $45=(($44+360)|0); + var $46=(($45+20)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$4; + var $49=(($48-$47)|0); + $4=$49; + __label__ = 7; break; + case 7: + var $51=$1; + var $52=(($51+360)|0); + var $53=(($52+16)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=(($54+1)|0); + HEAP32[(($53)>>2)]=$55; + var $56=$1; + var $57=(($56+360)|0); + _set_wm_trigger($57); + var $58=HEAP32[((_wminext)>>2)]; + var $59=$1; + var $60=(($59+360)|0); + var $61=(($60+20)|0); + HEAP32[(($61)>>2)]=$58; + __label__ = 2; break; + case 8: + var $63=$4; + var $64=(($63)|0)!=0; + if ($64) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $66=$1; + var $67=$2; + var $68=$3; + var $69=$pos; + var $70=$pos; + var $71=$4; + var $72=(($70+$71)|0); + _quic_rgb32_uncompress_row_seg($66, $67, $68, $69, $72, 8, 255); + var $73=HEAP32[((_wmimax)>>2)]; + var $74=$1; + var $75=(($74+360)|0); + var $76=(($75+16)|0); + var $77=HEAP32[(($76)>>2)]; + var $78=(($73)|0) > (($77)|0); + if ($78) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $80=$4; + var $81=$1; + var $82=(($81+360)|0); + var $83=(($82+20)|0); + var $84=HEAP32[(($83)>>2)]; + var $85=(($84-$80)|0); + HEAP32[(($83)>>2)]=$85; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $89=$1; + var $90=(($89+360)|0); + var $91=(($90+16)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=HEAP32[((_wmimax)>>2)]; + var $94=(($92)|0) <= (($93)|0); + if ($94) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $98=$_g_boolean_var_; + var $99=(($98)==(1)); + var $100=(($99)|0)!=0; + if ($100) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str82)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $108=$1; + var $109=(($108+360)|0); + var $110=(($109+16)|0); + var $111=HEAPU32[(($110)>>2)]; + var $112=(($111)>>>0) <= 32; + if ($112) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $116=$_g_boolean_var_1; + var $117=(($116)==(1)); + var $118=(($117)|0)!=0; + if ($118) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str84)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $126=HEAP32[((_wminext)>>2)]; + var $127=(($126)|0) > 0; + if ($127) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $131=$_g_boolean_var_2; + var $132=(($131)==(1)); + var $133=(($132)|0)!=0; + if ($133) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str86)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb32_uncompress_row["X"]=1; + +function _quic_rgb24_uncompress_row0($encoder, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$cur_row; + $3=$width; + $bpc=8; + $bpc_mask=255; + $pos=0; + __label__ = 2; break; + case 2: + var $5=HEAP32[((_wmimax)>>2)]; + var $6=$1; + var $7=(($6+360)|0); + var $8=(($7+16)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=(($5)|0) > (($9)|0); + if ($10) { __label__ = 3; break; } else { var $19 = 0;__label__ = 4; break; } + case 3: + var $12=$1; + var $13=(($12+360)|0); + var $14=(($13+20)|0); + var $15=HEAPU32[(($14)>>2)]; + var $16=$3; + var $17=(($15)>>>0) <= (($16)>>>0); + var $19 = $17;__label__ = 4; break; + case 4: + var $19; + if ($19) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $21=$1; + var $22=(($21+360)|0); + var $23=(($22+20)|0); + var $24=HEAP32[(($23)>>2)]; + var $25=(($24)|0)!=0; + if ($25) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $27=$1; + var $28=$pos; + var $29=$2; + var $30=$pos; + var $31=$1; + var $32=(($31+360)|0); + var $33=(($32+20)|0); + var $34=HEAP32[(($33)>>2)]; + var $35=(($30+$34)|0); + var $36=$1; + var $37=(($36+360)|0); + var $38=(($37+16)|0); + var $39=HEAP32[(($38)>>2)]; + var $40=((_bppmask+($39<<2))|0); + var $41=HEAP32[(($40)>>2)]; + _quic_rgb24_uncompress_row0_seg($27, $28, $29, $35, $41, 8, 255); + var $42=$1; + var $43=(($42+360)|0); + var $44=(($43+20)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=$pos; + var $47=(($46+$45)|0); + $pos=$47; + var $48=$1; + var $49=(($48+360)|0); + var $50=(($49+20)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$3; + var $53=(($52-$51)|0); + $3=$53; + __label__ = 7; break; + case 7: + var $55=$1; + var $56=(($55+360)|0); + var $57=(($56+16)|0); + var $58=HEAP32[(($57)>>2)]; + var $59=(($58+1)|0); + HEAP32[(($57)>>2)]=$59; + var $60=$1; + var $61=(($60+360)|0); + _set_wm_trigger($61); + var $62=HEAP32[((_wminext)>>2)]; + var $63=$1; + var $64=(($63+360)|0); + var $65=(($64+20)|0); + HEAP32[(($65)>>2)]=$62; + __label__ = 2; break; + case 8: + var $67=$3; + var $68=(($67)|0)!=0; + if ($68) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $70=$1; + var $71=$pos; + var $72=$2; + var $73=$pos; + var $74=$3; + var $75=(($73+$74)|0); + var $76=$1; + var $77=(($76+360)|0); + var $78=(($77+16)|0); + var $79=HEAP32[(($78)>>2)]; + var $80=((_bppmask+($79<<2))|0); + var $81=HEAP32[(($80)>>2)]; + _quic_rgb24_uncompress_row0_seg($70, $71, $72, $75, $81, 8, 255); + var $82=HEAP32[((_wmimax)>>2)]; + var $83=$1; + var $84=(($83+360)|0); + var $85=(($84+16)|0); + var $86=HEAP32[(($85)>>2)]; + var $87=(($82)|0) > (($86)|0); + if ($87) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $89=$3; + var $90=$1; + var $91=(($90+360)|0); + var $92=(($91+20)|0); + var $93=HEAP32[(($92)>>2)]; + var $94=(($93-$89)|0); + HEAP32[(($92)>>2)]=$94; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $98=$1; + var $99=(($98+360)|0); + var $100=(($99+16)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=HEAP32[((_wmimax)>>2)]; + var $103=(($101)|0) <= (($102)|0); + if ($103) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $107=$_g_boolean_var_; + var $108=(($107)==(1)); + var $109=(($108)|0)!=0; + if ($109) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str88)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $117=$1; + var $118=(($117+360)|0); + var $119=(($118+16)|0); + var $120=HEAPU32[(($119)>>2)]; + var $121=(($120)>>>0) <= 32; + if ($121) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $125=$_g_boolean_var_1; + var $126=(($125)==(1)); + var $127=(($126)|0)!=0; + if ($127) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str89)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $135=HEAP32[((_wminext)>>2)]; + var $136=(($135)|0) > 0; + if ($136) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $140=$_g_boolean_var_2; + var $141=(($140)==(1)); + var $142=(($141)|0)!=0; + if ($142) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str90)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb24_uncompress_row0["X"]=1; + +function _quic_rgb24_uncompress_row($encoder, $prev_row, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$width; + $bpc=8; + $bpc_mask=255; + $pos=0; + __label__ = 2; break; + case 2: + var $6=HEAP32[((_wmimax)>>2)]; + var $7=$1; + var $8=(($7+360)|0); + var $9=(($8+16)|0); + var $10=HEAP32[(($9)>>2)]; + var $11=(($6)|0) > (($10)|0); + if ($11) { __label__ = 3; break; } else { var $20 = 0;__label__ = 4; break; } + case 3: + var $13=$1; + var $14=(($13+360)|0); + var $15=(($14+20)|0); + var $16=HEAPU32[(($15)>>2)]; + var $17=$4; + var $18=(($16)>>>0) <= (($17)>>>0); + var $20 = $18;__label__ = 4; break; + case 4: + var $20; + if ($20) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $22=$1; + var $23=(($22+360)|0); + var $24=(($23+20)|0); + var $25=HEAP32[(($24)>>2)]; + var $26=(($25)|0)!=0; + if ($26) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $28=$1; + var $29=$2; + var $30=$3; + var $31=$pos; + var $32=$pos; + var $33=$1; + var $34=(($33+360)|0); + var $35=(($34+20)|0); + var $36=HEAP32[(($35)>>2)]; + var $37=(($32+$36)|0); + _quic_rgb24_uncompress_row_seg($28, $29, $30, $31, $37, 8, 255); + var $38=$1; + var $39=(($38+360)|0); + var $40=(($39+20)|0); + var $41=HEAP32[(($40)>>2)]; + var $42=$pos; + var $43=(($42+$41)|0); + $pos=$43; + var $44=$1; + var $45=(($44+360)|0); + var $46=(($45+20)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$4; + var $49=(($48-$47)|0); + $4=$49; + __label__ = 7; break; + case 7: + var $51=$1; + var $52=(($51+360)|0); + var $53=(($52+16)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=(($54+1)|0); + HEAP32[(($53)>>2)]=$55; + var $56=$1; + var $57=(($56+360)|0); + _set_wm_trigger($57); + var $58=HEAP32[((_wminext)>>2)]; + var $59=$1; + var $60=(($59+360)|0); + var $61=(($60+20)|0); + HEAP32[(($61)>>2)]=$58; + __label__ = 2; break; + case 8: + var $63=$4; + var $64=(($63)|0)!=0; + if ($64) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $66=$1; + var $67=$2; + var $68=$3; + var $69=$pos; + var $70=$pos; + var $71=$4; + var $72=(($70+$71)|0); + _quic_rgb24_uncompress_row_seg($66, $67, $68, $69, $72, 8, 255); + var $73=HEAP32[((_wmimax)>>2)]; + var $74=$1; + var $75=(($74+360)|0); + var $76=(($75+16)|0); + var $77=HEAP32[(($76)>>2)]; + var $78=(($73)|0) > (($77)|0); + if ($78) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $80=$4; + var $81=$1; + var $82=(($81+360)|0); + var $83=(($82+20)|0); + var $84=HEAP32[(($83)>>2)]; + var $85=(($84-$80)|0); + HEAP32[(($83)>>2)]=$85; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $89=$1; + var $90=(($89+360)|0); + var $91=(($90+16)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=HEAP32[((_wmimax)>>2)]; + var $94=(($92)|0) <= (($93)|0); + if ($94) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $98=$_g_boolean_var_; + var $99=(($98)==(1)); + var $100=(($99)|0)!=0; + if ($100) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str82)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $108=$1; + var $109=(($108+360)|0); + var $110=(($109+16)|0); + var $111=HEAPU32[(($110)>>2)]; + var $112=(($111)>>>0) <= 32; + if ($112) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $116=$_g_boolean_var_1; + var $117=(($116)==(1)); + var $118=(($117)|0)!=0; + if ($118) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str84)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $126=HEAP32[((_wminext)>>2)]; + var $127=(($126)|0) > 0; + if ($127) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $131=$_g_boolean_var_2; + var $132=(($131)==(1)); + var $133=(($132)|0)!=0; + if ($133) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str86)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb24_uncompress_row["X"]=1; + +function _quic_rgb16_uncompress_row0($encoder, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$cur_row; + $3=$width; + $bpc=5; + $bpc_mask=31; + $pos=0; + __label__ = 2; break; + case 2: + var $5=HEAP32[((_wmimax)>>2)]; + var $6=$1; + var $7=(($6+360)|0); + var $8=(($7+16)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=(($5)|0) > (($9)|0); + if ($10) { __label__ = 3; break; } else { var $19 = 0;__label__ = 4; break; } + case 3: + var $12=$1; + var $13=(($12+360)|0); + var $14=(($13+20)|0); + var $15=HEAPU32[(($14)>>2)]; + var $16=$3; + var $17=(($15)>>>0) <= (($16)>>>0); + var $19 = $17;__label__ = 4; break; + case 4: + var $19; + if ($19) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $21=$1; + var $22=(($21+360)|0); + var $23=(($22+20)|0); + var $24=HEAP32[(($23)>>2)]; + var $25=(($24)|0)!=0; + if ($25) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $27=$1; + var $28=$pos; + var $29=$2; + var $30=$pos; + var $31=$1; + var $32=(($31+360)|0); + var $33=(($32+20)|0); + var $34=HEAP32[(($33)>>2)]; + var $35=(($30+$34)|0); + var $36=$1; + var $37=(($36+360)|0); + var $38=(($37+16)|0); + var $39=HEAP32[(($38)>>2)]; + var $40=((_bppmask+($39<<2))|0); + var $41=HEAP32[(($40)>>2)]; + _quic_rgb16_uncompress_row0_seg($27, $28, $29, $35, $41, 5, 31); + var $42=$1; + var $43=(($42+360)|0); + var $44=(($43+20)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=$pos; + var $47=(($46+$45)|0); + $pos=$47; + var $48=$1; + var $49=(($48+360)|0); + var $50=(($49+20)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$3; + var $53=(($52-$51)|0); + $3=$53; + __label__ = 7; break; + case 7: + var $55=$1; + var $56=(($55+360)|0); + var $57=(($56+16)|0); + var $58=HEAP32[(($57)>>2)]; + var $59=(($58+1)|0); + HEAP32[(($57)>>2)]=$59; + var $60=$1; + var $61=(($60+360)|0); + _set_wm_trigger($61); + var $62=HEAP32[((_wminext)>>2)]; + var $63=$1; + var $64=(($63+360)|0); + var $65=(($64+20)|0); + HEAP32[(($65)>>2)]=$62; + __label__ = 2; break; + case 8: + var $67=$3; + var $68=(($67)|0)!=0; + if ($68) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $70=$1; + var $71=$pos; + var $72=$2; + var $73=$pos; + var $74=$3; + var $75=(($73+$74)|0); + var $76=$1; + var $77=(($76+360)|0); + var $78=(($77+16)|0); + var $79=HEAP32[(($78)>>2)]; + var $80=((_bppmask+($79<<2))|0); + var $81=HEAP32[(($80)>>2)]; + _quic_rgb16_uncompress_row0_seg($70, $71, $72, $75, $81, 5, 31); + var $82=HEAP32[((_wmimax)>>2)]; + var $83=$1; + var $84=(($83+360)|0); + var $85=(($84+16)|0); + var $86=HEAP32[(($85)>>2)]; + var $87=(($82)|0) > (($86)|0); + if ($87) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $89=$3; + var $90=$1; + var $91=(($90+360)|0); + var $92=(($91+20)|0); + var $93=HEAP32[(($92)>>2)]; + var $94=(($93-$89)|0); + HEAP32[(($92)>>2)]=$94; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $98=$1; + var $99=(($98+360)|0); + var $100=(($99+16)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=HEAP32[((_wmimax)>>2)]; + var $103=(($101)|0) <= (($102)|0); + if ($103) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $107=$_g_boolean_var_; + var $108=(($107)==(1)); + var $109=(($108)|0)!=0; + if ($109) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str88)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $117=$1; + var $118=(($117+360)|0); + var $119=(($118+16)|0); + var $120=HEAPU32[(($119)>>2)]; + var $121=(($120)>>>0) <= 32; + if ($121) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $125=$_g_boolean_var_1; + var $126=(($125)==(1)); + var $127=(($126)|0)!=0; + if ($127) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str89)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $135=HEAP32[((_wminext)>>2)]; + var $136=(($135)|0) > 0; + if ($136) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $140=$_g_boolean_var_2; + var $141=(($140)==(1)); + var $142=(($141)|0)!=0; + if ($142) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str90)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_uncompress_row0["X"]=1; + +function _quic_rgb16_uncompress_row($encoder, $prev_row, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$width; + $bpc=5; + $bpc_mask=31; + $pos=0; + __label__ = 2; break; + case 2: + var $6=HEAP32[((_wmimax)>>2)]; + var $7=$1; + var $8=(($7+360)|0); + var $9=(($8+16)|0); + var $10=HEAP32[(($9)>>2)]; + var $11=(($6)|0) > (($10)|0); + if ($11) { __label__ = 3; break; } else { var $20 = 0;__label__ = 4; break; } + case 3: + var $13=$1; + var $14=(($13+360)|0); + var $15=(($14+20)|0); + var $16=HEAPU32[(($15)>>2)]; + var $17=$4; + var $18=(($16)>>>0) <= (($17)>>>0); + var $20 = $18;__label__ = 4; break; + case 4: + var $20; + if ($20) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $22=$1; + var $23=(($22+360)|0); + var $24=(($23+20)|0); + var $25=HEAP32[(($24)>>2)]; + var $26=(($25)|0)!=0; + if ($26) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $28=$1; + var $29=$2; + var $30=$3; + var $31=$pos; + var $32=$pos; + var $33=$1; + var $34=(($33+360)|0); + var $35=(($34+20)|0); + var $36=HEAP32[(($35)>>2)]; + var $37=(($32+$36)|0); + _quic_rgb16_uncompress_row_seg($28, $29, $30, $31, $37, 5, 31); + var $38=$1; + var $39=(($38+360)|0); + var $40=(($39+20)|0); + var $41=HEAP32[(($40)>>2)]; + var $42=$pos; + var $43=(($42+$41)|0); + $pos=$43; + var $44=$1; + var $45=(($44+360)|0); + var $46=(($45+20)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$4; + var $49=(($48-$47)|0); + $4=$49; + __label__ = 7; break; + case 7: + var $51=$1; + var $52=(($51+360)|0); + var $53=(($52+16)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=(($54+1)|0); + HEAP32[(($53)>>2)]=$55; + var $56=$1; + var $57=(($56+360)|0); + _set_wm_trigger($57); + var $58=HEAP32[((_wminext)>>2)]; + var $59=$1; + var $60=(($59+360)|0); + var $61=(($60+20)|0); + HEAP32[(($61)>>2)]=$58; + __label__ = 2; break; + case 8: + var $63=$4; + var $64=(($63)|0)!=0; + if ($64) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $66=$1; + var $67=$2; + var $68=$3; + var $69=$pos; + var $70=$pos; + var $71=$4; + var $72=(($70+$71)|0); + _quic_rgb16_uncompress_row_seg($66, $67, $68, $69, $72, 5, 31); + var $73=HEAP32[((_wmimax)>>2)]; + var $74=$1; + var $75=(($74+360)|0); + var $76=(($75+16)|0); + var $77=HEAP32[(($76)>>2)]; + var $78=(($73)|0) > (($77)|0); + if ($78) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $80=$4; + var $81=$1; + var $82=(($81+360)|0); + var $83=(($82+20)|0); + var $84=HEAP32[(($83)>>2)]; + var $85=(($84-$80)|0); + HEAP32[(($83)>>2)]=$85; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $89=$1; + var $90=(($89+360)|0); + var $91=(($90+16)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=HEAP32[((_wmimax)>>2)]; + var $94=(($92)|0) <= (($93)|0); + if ($94) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $98=$_g_boolean_var_; + var $99=(($98)==(1)); + var $100=(($99)|0)!=0; + if ($100) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str82)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $108=$1; + var $109=(($108+360)|0); + var $110=(($109+16)|0); + var $111=HEAPU32[(($110)>>2)]; + var $112=(($111)>>>0) <= 32; + if ($112) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $116=$_g_boolean_var_1; + var $117=(($116)==(1)); + var $118=(($117)|0)!=0; + if ($118) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str84)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $126=HEAP32[((_wminext)>>2)]; + var $127=(($126)|0) > 0; + if ($127) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $131=$_g_boolean_var_2; + var $132=(($131)==(1)); + var $133=(($132)|0)!=0; + if ($133) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str86)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_uncompress_row["X"]=1; + +function _quic_rgb16_to_32_uncompress_row0($encoder, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$cur_row; + $3=$width; + $bpc=5; + $bpc_mask=31; + $pos=0; + __label__ = 2; break; + case 2: + var $5=HEAP32[((_wmimax)>>2)]; + var $6=$1; + var $7=(($6+360)|0); + var $8=(($7+16)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=(($5)|0) > (($9)|0); + if ($10) { __label__ = 3; break; } else { var $19 = 0;__label__ = 4; break; } + case 3: + var $12=$1; + var $13=(($12+360)|0); + var $14=(($13+20)|0); + var $15=HEAPU32[(($14)>>2)]; + var $16=$3; + var $17=(($15)>>>0) <= (($16)>>>0); + var $19 = $17;__label__ = 4; break; + case 4: + var $19; + if ($19) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $21=$1; + var $22=(($21+360)|0); + var $23=(($22+20)|0); + var $24=HEAP32[(($23)>>2)]; + var $25=(($24)|0)!=0; + if ($25) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $27=$1; + var $28=$pos; + var $29=$2; + var $30=$pos; + var $31=$1; + var $32=(($31+360)|0); + var $33=(($32+20)|0); + var $34=HEAP32[(($33)>>2)]; + var $35=(($30+$34)|0); + var $36=$1; + var $37=(($36+360)|0); + var $38=(($37+16)|0); + var $39=HEAP32[(($38)>>2)]; + var $40=((_bppmask+($39<<2))|0); + var $41=HEAP32[(($40)>>2)]; + _quic_rgb16_to_32_uncompress_row0_seg($27, $28, $29, $35, $41, 5, 31); + var $42=$1; + var $43=(($42+360)|0); + var $44=(($43+20)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=$pos; + var $47=(($46+$45)|0); + $pos=$47; + var $48=$1; + var $49=(($48+360)|0); + var $50=(($49+20)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$3; + var $53=(($52-$51)|0); + $3=$53; + __label__ = 7; break; + case 7: + var $55=$1; + var $56=(($55+360)|0); + var $57=(($56+16)|0); + var $58=HEAP32[(($57)>>2)]; + var $59=(($58+1)|0); + HEAP32[(($57)>>2)]=$59; + var $60=$1; + var $61=(($60+360)|0); + _set_wm_trigger($61); + var $62=HEAP32[((_wminext)>>2)]; + var $63=$1; + var $64=(($63+360)|0); + var $65=(($64+20)|0); + HEAP32[(($65)>>2)]=$62; + __label__ = 2; break; + case 8: + var $67=$3; + var $68=(($67)|0)!=0; + if ($68) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $70=$1; + var $71=$pos; + var $72=$2; + var $73=$pos; + var $74=$3; + var $75=(($73+$74)|0); + var $76=$1; + var $77=(($76+360)|0); + var $78=(($77+16)|0); + var $79=HEAP32[(($78)>>2)]; + var $80=((_bppmask+($79<<2))|0); + var $81=HEAP32[(($80)>>2)]; + _quic_rgb16_to_32_uncompress_row0_seg($70, $71, $72, $75, $81, 5, 31); + var $82=HEAP32[((_wmimax)>>2)]; + var $83=$1; + var $84=(($83+360)|0); + var $85=(($84+16)|0); + var $86=HEAP32[(($85)>>2)]; + var $87=(($82)|0) > (($86)|0); + if ($87) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $89=$3; + var $90=$1; + var $91=(($90+360)|0); + var $92=(($91+20)|0); + var $93=HEAP32[(($92)>>2)]; + var $94=(($93-$89)|0); + HEAP32[(($92)>>2)]=$94; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $98=$1; + var $99=(($98+360)|0); + var $100=(($99+16)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=HEAP32[((_wmimax)>>2)]; + var $103=(($101)|0) <= (($102)|0); + if ($103) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $107=$_g_boolean_var_; + var $108=(($107)==(1)); + var $109=(($108)|0)!=0; + if ($109) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str88)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $117=$1; + var $118=(($117+360)|0); + var $119=(($118+16)|0); + var $120=HEAPU32[(($119)>>2)]; + var $121=(($120)>>>0) <= 32; + if ($121) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $125=$_g_boolean_var_1; + var $126=(($125)==(1)); + var $127=(($126)|0)!=0; + if ($127) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str89)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $135=HEAP32[((_wminext)>>2)]; + var $136=(($135)|0) > 0; + if ($136) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $140=$_g_boolean_var_2; + var $141=(($140)==(1)); + var $142=(($141)|0)!=0; + if ($142) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str90)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_to_32_uncompress_row0["X"]=1; + +function _quic_rgb16_to_32_uncompress_row($encoder, $prev_row, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $bpc; + var $bpc_mask; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$width; + $bpc=5; + $bpc_mask=31; + $pos=0; + __label__ = 2; break; + case 2: + var $6=HEAP32[((_wmimax)>>2)]; + var $7=$1; + var $8=(($7+360)|0); + var $9=(($8+16)|0); + var $10=HEAP32[(($9)>>2)]; + var $11=(($6)|0) > (($10)|0); + if ($11) { __label__ = 3; break; } else { var $20 = 0;__label__ = 4; break; } + case 3: + var $13=$1; + var $14=(($13+360)|0); + var $15=(($14+20)|0); + var $16=HEAPU32[(($15)>>2)]; + var $17=$4; + var $18=(($16)>>>0) <= (($17)>>>0); + var $20 = $18;__label__ = 4; break; + case 4: + var $20; + if ($20) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $22=$1; + var $23=(($22+360)|0); + var $24=(($23+20)|0); + var $25=HEAP32[(($24)>>2)]; + var $26=(($25)|0)!=0; + if ($26) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $28=$1; + var $29=$2; + var $30=$3; + var $31=$pos; + var $32=$pos; + var $33=$1; + var $34=(($33+360)|0); + var $35=(($34+20)|0); + var $36=HEAP32[(($35)>>2)]; + var $37=(($32+$36)|0); + _quic_rgb16_to_32_uncompress_row_seg($28, $29, $30, $31, $37, 5, 31); + var $38=$1; + var $39=(($38+360)|0); + var $40=(($39+20)|0); + var $41=HEAP32[(($40)>>2)]; + var $42=$pos; + var $43=(($42+$41)|0); + $pos=$43; + var $44=$1; + var $45=(($44+360)|0); + var $46=(($45+20)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$4; + var $49=(($48-$47)|0); + $4=$49; + __label__ = 7; break; + case 7: + var $51=$1; + var $52=(($51+360)|0); + var $53=(($52+16)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=(($54+1)|0); + HEAP32[(($53)>>2)]=$55; + var $56=$1; + var $57=(($56+360)|0); + _set_wm_trigger($57); + var $58=HEAP32[((_wminext)>>2)]; + var $59=$1; + var $60=(($59+360)|0); + var $61=(($60+20)|0); + HEAP32[(($61)>>2)]=$58; + __label__ = 2; break; + case 8: + var $63=$4; + var $64=(($63)|0)!=0; + if ($64) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $66=$1; + var $67=$2; + var $68=$3; + var $69=$pos; + var $70=$pos; + var $71=$4; + var $72=(($70+$71)|0); + _quic_rgb16_to_32_uncompress_row_seg($66, $67, $68, $69, $72, 5, 31); + var $73=HEAP32[((_wmimax)>>2)]; + var $74=$1; + var $75=(($74+360)|0); + var $76=(($75+16)|0); + var $77=HEAP32[(($76)>>2)]; + var $78=(($73)|0) > (($77)|0); + if ($78) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $80=$4; + var $81=$1; + var $82=(($81+360)|0); + var $83=(($82+20)|0); + var $84=HEAP32[(($83)>>2)]; + var $85=(($84-$80)|0); + HEAP32[(($83)>>2)]=$85; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $89=$1; + var $90=(($89+360)|0); + var $91=(($90+16)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=HEAP32[((_wmimax)>>2)]; + var $94=(($92)|0) <= (($93)|0); + if ($94) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $98=$_g_boolean_var_; + var $99=(($98)==(1)); + var $100=(($99)|0)!=0; + if ($100) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str82)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str83)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $108=$1; + var $109=(($108+360)|0); + var $110=(($109+16)|0); + var $111=HEAPU32[(($110)>>2)]; + var $112=(($111)>>>0) <= 32; + if ($112) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $116=$_g_boolean_var_1; + var $117=(($116)==(1)); + var $118=(($117)|0)!=0; + if ($118) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str84)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str85)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $126=HEAP32[((_wminext)>>2)]; + var $127=(($126)|0) > 0; + if ($127) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $131=$_g_boolean_var_2; + var $132=(($131)==(1)); + var $133=(($132)|0)!=0; + if ($133) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str86)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_to_32_uncompress_row["X"]=1; + +function _uncompress_rgba($encoder, $buf, $stride) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $row; + var $prev; + $1=$encoder; + $2=$buf; + $3=$stride; + var $4=$1; + var $5=(($4+56)|0); + var $6=(($5)|0); + var $7=(($6+8)|0); + var $8=HEAP32[(($7)>>2)]; + var $9=(($8-1)|0); + HEAP8[($9)]=0; + var $10=$1; + var $11=(($10+56)|0); + var $12=(($11+76)|0); + var $13=(($12+8)|0); + var $14=HEAP32[(($13)>>2)]; + var $15=(($14-1)|0); + HEAP8[($15)]=0; + var $16=$1; + var $17=(($16+56)|0); + var $18=(($17+152)|0); + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + var $21=(($20-1)|0); + HEAP8[($21)]=0; + var $22=$1; + var $23=$2; + var $24=$23; + var $25=$1; + var $26=(($25+8)|0); + var $27=HEAP32[(($26)>>2)]; + _quic_rgb32_uncompress_row0($22, $24, $27); + var $28=$1; + var $29=(($28+56)|0); + var $30=(($29+228)|0); + var $31=(($30+8)|0); + var $32=HEAP32[(($31)>>2)]; + var $33=(($32-1)|0); + HEAP8[($33)]=0; + var $34=$1; + var $35=$1; + var $36=(($35+56)|0); + var $37=(($36+228)|0); + var $38=$2; + var $39=(($38+3)|0); + var $40=$39; + var $41=$1; + var $42=(($41+8)|0); + var $43=HEAP32[(($42)>>2)]; + _quic_four_uncompress_row0($34, $37, $40, $43); + var $44=$1; + var $45=(($44+52)|0); + var $46=HEAP32[(($45)>>2)]; + var $47=(($46+1)|0); + HEAP32[(($45)>>2)]=$47; + $row=1; + __label__ = 2; break; + case 2: + var $49=$row; + var $50=$1; + var $51=(($50+12)|0); + var $52=HEAPU32[(($51)>>2)]; + var $53=(($49)>>>0) < (($52)>>>0); + if ($53) { __label__ = 3; break; } else { __label__ = 5; break; } + case 3: + var $55=$2; + $prev=$55; + var $56=$3; + var $57=$2; + var $58=(($57+$56)|0); + $2=$58; + var $59=$1; + var $60=(($59+56)|0); + var $61=(($60)|0); + var $62=(($61+8)|0); + var $63=HEAP32[(($62)>>2)]; + var $64=(($63)|0); + var $65=HEAP8[($64)]; + var $66=$1; + var $67=(($66+56)|0); + var $68=(($67)|0); + var $69=(($68+8)|0); + var $70=HEAP32[(($69)>>2)]; + var $71=(($70-1)|0); + HEAP8[($71)]=$65; + var $72=$1; + var $73=(($72+56)|0); + var $74=(($73+76)|0); + var $75=(($74+8)|0); + var $76=HEAP32[(($75)>>2)]; + var $77=(($76)|0); + var $78=HEAP8[($77)]; + var $79=$1; + var $80=(($79+56)|0); + var $81=(($80+76)|0); + var $82=(($81+8)|0); + var $83=HEAP32[(($82)>>2)]; + var $84=(($83-1)|0); + HEAP8[($84)]=$78; + var $85=$1; + var $86=(($85+56)|0); + var $87=(($86+152)|0); + var $88=(($87+8)|0); + var $89=HEAP32[(($88)>>2)]; + var $90=(($89)|0); + var $91=HEAP8[($90)]; + var $92=$1; + var $93=(($92+56)|0); + var $94=(($93+152)|0); + var $95=(($94+8)|0); + var $96=HEAP32[(($95)>>2)]; + var $97=(($96-1)|0); + HEAP8[($97)]=$91; + var $98=$1; + var $99=$prev; + var $100=$99; + var $101=$2; + var $102=$101; + var $103=$1; + var $104=(($103+8)|0); + var $105=HEAP32[(($104)>>2)]; + _quic_rgb32_uncompress_row($98, $100, $102, $105); + var $106=$1; + var $107=(($106+56)|0); + var $108=(($107+228)|0); + var $109=(($108+8)|0); + var $110=HEAP32[(($109)>>2)]; + var $111=(($110)|0); + var $112=HEAP8[($111)]; + var $113=$1; + var $114=(($113+56)|0); + var $115=(($114+228)|0); + var $116=(($115+8)|0); + var $117=HEAP32[(($116)>>2)]; + var $118=(($117-1)|0); + HEAP8[($118)]=$112; + var $119=$1; + var $120=$1; + var $121=(($120+56)|0); + var $122=(($121+228)|0); + var $123=$prev; + var $124=(($123+3)|0); + var $125=$124; + var $126=$2; + var $127=(($126+3)|0); + var $128=$127; + var $129=$1; + var $130=(($129+8)|0); + var $131=HEAP32[(($130)>>2)]; + _quic_four_uncompress_row($119, $122, $125, $128, $131); + var $132=$1; + var $133=(($132+52)|0); + var $134=HEAP32[(($133)>>2)]; + var $135=(($134+1)|0); + HEAP32[(($133)>>2)]=$135; + __label__ = 4; break; + case 4: + var $137=$row; + var $138=(($137+1)|0); + $row=$138; + __label__ = 2; break; + case 5: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_uncompress_rgba["X"]=1; + +function _uncompress_gray($encoder, $buf, $stride) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $row; + var $prev; + $1=$encoder; + $2=$buf; + $3=$stride; + var $4=$1; + var $5=(($4+56)|0); + var $6=(($5)|0); + var $7=(($6+8)|0); + var $8=HEAP32[(($7)>>2)]; + var $9=(($8-1)|0); + HEAP8[($9)]=0; + var $10=$1; + var $11=$1; + var $12=(($11+56)|0); + var $13=(($12)|0); + var $14=$2; + var $15=$14; + var $16=$1; + var $17=(($16+8)|0); + var $18=HEAP32[(($17)>>2)]; + _quic_one_uncompress_row0($10, $13, $15, $18); + var $19=$1; + var $20=(($19+52)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=(($21+1)|0); + HEAP32[(($20)>>2)]=$22; + $row=1; + __label__ = 2; break; + case 2: + var $24=$row; + var $25=$1; + var $26=(($25+12)|0); + var $27=HEAPU32[(($26)>>2)]; + var $28=(($24)>>>0) < (($27)>>>0); + if ($28) { __label__ = 3; break; } else { __label__ = 5; break; } + case 3: + var $30=$2; + $prev=$30; + var $31=$3; + var $32=$2; + var $33=(($32+$31)|0); + $2=$33; + var $34=$1; + var $35=(($34+56)|0); + var $36=(($35)|0); + var $37=(($36+8)|0); + var $38=HEAP32[(($37)>>2)]; + var $39=(($38)|0); + var $40=HEAP8[($39)]; + var $41=$1; + var $42=(($41+56)|0); + var $43=(($42)|0); + var $44=(($43+8)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=(($45-1)|0); + HEAP8[($46)]=$40; + var $47=$1; + var $48=$1; + var $49=(($48+56)|0); + var $50=(($49)|0); + var $51=$prev; + var $52=$51; + var $53=$2; + var $54=$53; + var $55=$1; + var $56=(($55+8)|0); + var $57=HEAP32[(($56)>>2)]; + _quic_one_uncompress_row($47, $50, $52, $54, $57); + var $58=$1; + var $59=(($58+52)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=(($60+1)|0); + HEAP32[(($59)>>2)]=$61; + __label__ = 4; break; + case 4: + var $63=$row; + var $64=(($63+1)|0); + $row=$64; + __label__ = 2; break; + case 5: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_uncompress_gray["X"]=1; + +function _quic_create($usr) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $encoder; + $2=$usr; + var $3=$2; + var $4=(($3)|0)!=0; + if ($4) { __label__ = 2; break; } else { __label__ = 10; break; } + case 2: + var $6=HEAP32[((_need_init)>>2)]; + var $7=(($6)|0)!=0; + if ($7) { __label__ = 10; break; } else { __label__ = 3; break; } + case 3: + var $9=$2; + var $10=(($9)|0); + var $11=HEAP32[(($10)>>2)]; + var $12=(($11)|0)!=0; + if ($12) { __label__ = 4; break; } else { __label__ = 10; break; } + case 4: + var $14=$2; + var $15=(($14+4)|0); + var $16=HEAP32[(($15)>>2)]; + var $17=(($16)|0)!=0; + if ($17) { __label__ = 5; break; } else { __label__ = 10; break; } + case 5: + var $19=$2; + var $20=(($19+8)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=(($21)|0)!=0; + if ($22) { __label__ = 6; break; } else { __label__ = 10; break; } + case 6: + var $24=$2; + var $25=(($24+12)|0); + var $26=HEAP32[(($25)>>2)]; + var $27=(($26)|0)!=0; + if ($27) { __label__ = 7; break; } else { __label__ = 10; break; } + case 7: + var $29=$2; + var $30=(($29+16)|0); + var $31=HEAP32[(($30)>>2)]; + var $32=(($31)|0)!=0; + if ($32) { __label__ = 8; break; } else { __label__ = 10; break; } + case 8: + var $34=$2; + var $35=(($34+20)|0); + var $36=HEAP32[(($35)>>2)]; + var $37=(($36)|0)!=0; + if ($37) { __label__ = 9; break; } else { __label__ = 10; break; } + case 9: + var $39=$2; + var $40=(($39+24)|0); + var $41=HEAP32[(($40)>>2)]; + var $42=(($41)|0)!=0; + if ($42) { __label__ = 11; break; } else { __label__ = 10; break; } + case 10: + $1=0; + __label__ = 16; break; + case 11: + var $45=$2; + var $46=(($45+12)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$2; + var $49=FUNCTION_TABLE[$47]($48, 396); + var $50=$49; + $encoder=$50; + var $51=(($50)|0)!=0; + if ($51) { __label__ = 13; break; } else { __label__ = 12; break; } + case 12: + $1=0; + __label__ = 16; break; + case 13: + var $54=$encoder; + var $55=$2; + var $56=_init_encoder($54, $55); + var $57=(($56)|0)!=0; + if ($57) { __label__ = 15; break; } else { __label__ = 14; break; } + case 14: + var $59=$2; + var $60=(($59+16)|0); + var $61=HEAP32[(($60)>>2)]; + var $62=$2; + var $63=$encoder; + var $64=$63; + FUNCTION_TABLE[$61]($62, $64); + $1=0; + __label__ = 16; break; + case 15: + var $66=$encoder; + var $67=$66; + $1=$67; + __label__ = 16; break; + case 16: + var $69=$1; + ; + return $69; + default: assert(0, "bad label: " + __label__); + } +} +_quic_create["X"]=1; + +function _init_encoder($encoder, $usr) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $i; + $2=$encoder; + $3=$usr; + var $4=$3; + var $5=$2; + var $6=(($5)|0); + HEAP32[(($6)>>2)]=$4; + var $7=$2; + var $8=$2; + var $9=(($8+360)|0); + var $10=(($9)|0); + HEAP32[(($10)>>2)]=$7; + $i=0; + __label__ = 2; break; + case 2: + var $12=$i; + var $13=(($12)|0) < 4; + if ($13) { __label__ = 3; break; } else { __label__ = 11; break; } + case 3: + var $15=$2; + var $16=$i; + var $17=$2; + var $18=(($17+56)|0); + var $19=(($18+$16*76)|0); + var $20=_init_channel($15, $19); + var $21=(($20)|0)!=0; + if ($21) { __label__ = 9; break; } else { __label__ = 4; break; } + case 4: + var $23=$i; + var $24=(($23-1)|0); + $i=$24; + __label__ = 5; break; + case 5: + var $26=$i; + var $27=(($26)|0) >= 0; + if ($27) { __label__ = 6; break; } else { __label__ = 8; break; } + case 6: + var $29=$i; + var $30=$2; + var $31=(($30+56)|0); + var $32=(($31+$29*76)|0); + _destroy_channel($32); + __label__ = 7; break; + case 7: + var $34=$i; + var $35=(($34-1)|0); + $i=$35; + __label__ = 5; break; + case 8: + $1=0; + __label__ = 12; break; + case 9: + __label__ = 10; break; + case 10: + var $39=$i; + var $40=(($39+1)|0); + $i=$40; + __label__ = 2; break; + case 11: + $1=1; + __label__ = 12; break; + case 12: + var $43=$1; + ; + return $43; + default: assert(0, "bad label: " + __label__); + } +} +_init_encoder["X"]=1; + +function _ceil_log_2($val) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $result; + $2=$val; + var $3=$2; + var $4=(($3)|0)==1; + if ($4) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + $1=0; + __label__ = 7; break; + case 3: + $result=1; + var $7=$2; + var $8=(($7-1)|0); + $2=$8; + __label__ = 4; break; + case 4: + var $10=$2; + var $11=$10 >> 1; + $2=$11; + var $12=(($11)|0)!=0; + if ($12) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + var $14=$result; + var $15=(($14+1)|0); + $result=$15; + __label__ = 4; break; + case 6: + var $17=$result; + $1=$17; + __label__ = 7; break; + case 7: + var $19=$1; + ; + return $19; + default: assert(0, "bad label: " + __label__); + } +} + + +function _init_zeroLUT() { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $i; + var $j; + var $k; + var $l; + $k=1; + $j=1; + $l=8; + $i=0; + __label__ = 2; break; + case 2: + var $2=$i; + var $3=(($2)|0) < 256; + if ($3) { __label__ = 3; break; } else { __label__ = 7; break; } + case 3: + var $5=$l; + var $6=$i; + var $7=((_zeroLUT+($6<<2))|0); + HEAP32[(($7)>>2)]=$5; + var $8=$k; + var $9=(($8-1)|0); + $k=$9; + var $10=$k; + var $11=(($10)|0)==0; + if ($11) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $13=$j; + $k=$13; + var $14=$l; + var $15=(($14-1)|0); + $l=$15; + var $16=$j; + var $17=((($16<<1))|0); + $j=$17; + __label__ = 5; break; + case 5: + __label__ = 6; break; + case 6: + var $20=$i; + var $21=(($20+1)|0); + $i=$21; + __label__ = 2; break; + case 7: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function _decorelate_init($family, $bpc) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $pixelbitmask; + var $pixelbitmaskshr; + var $s; + $1=$family; + $2=$bpc; + var $3=$2; + var $4=((_bppmask+($3<<2))|0); + var $5=HEAP32[(($4)>>2)]; + $pixelbitmask=$5; + var $6=$pixelbitmask; + var $7=$6 >>> 1; + $pixelbitmaskshr=$7; + $s=0; + __label__ = 2; break; + case 2: + var $9=$s; + var $10=$pixelbitmask; + var $11=(($9)>>>0) <= (($10)>>>0); + if ($11) { __label__ = 3; break; } else { __label__ = 8; break; } + case 3: + var $13=$s; + var $14=$pixelbitmaskshr; + var $15=(($13)>>>0) <= (($14)>>>0); + if ($15) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $17=$s; + var $18=$17 << 1; + var $19=(($18) & 255); + var $20=$s; + var $21=$1; + var $22=(($21+128)|0); + var $23=(($22+$20)|0); + HEAP8[($23)]=$19; + __label__ = 6; break; + case 5: + var $25=$pixelbitmask; + var $26=$s; + var $27=(($25-$26)|0); + var $28=$27 << 1; + var $29=(($28+1)|0); + var $30=(($29) & 255); + var $31=$s; + var $32=$1; + var $33=(($32+128)|0); + var $34=(($33+$31)|0); + HEAP8[($34)]=$30; + __label__ = 6; break; + case 6: + __label__ = 7; break; + case 7: + var $37=$s; + var $38=(($37+1)|0); + $s=$38; + __label__ = 2; break; + case 8: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_decorelate_init["X"]=1; + +function _corelate_init($family, $bpc) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $pixelbitmask; + var $s; + $1=$family; + $2=$bpc; + var $3=$2; + var $4=((_bppmask+($3<<2))|0); + var $5=HEAP32[(($4)>>2)]; + $pixelbitmask=$5; + $s=0; + __label__ = 2; break; + case 2: + var $7=$s; + var $8=$pixelbitmask; + var $9=(($7)>>>0) <= (($8)>>>0); + if ($9) { __label__ = 3; break; } else { __label__ = 8; break; } + case 3: + var $11=$s; + var $12=$11 & 1; + var $13=(($12)|0)!=0; + if ($13) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $15=$pixelbitmask; + var $16=$s; + var $17=$16 >>> 1; + var $18=(($15-$17)|0); + var $19=$s; + var $20=$1; + var $21=(($20+384)|0); + var $22=(($21+($19<<2))|0); + HEAP32[(($22)>>2)]=$18; + __label__ = 6; break; + case 5: + var $24=$s; + var $25=$24 >>> 1; + var $26=$s; + var $27=$1; + var $28=(($27+384)|0); + var $29=(($28+($26<<2))|0); + HEAP32[(($29)>>2)]=$25; + __label__ = 6; break; + case 6: + __label__ = 7; break; + case 7: + var $32=$s; + var $33=(($32+1)|0); + $s=$33; + __label__ = 2; break; + case 8: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function _quic_destroy($quic) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $encoder; + var $i; + $1=$quic; + var $2=$1; + var $3=$2; + $encoder=$3; + var $4=$1; + var $5=(($4)|0)!=0; + if ($5) { __label__ = 3; break; } else { __label__ = 2; break; } + case 2: + __label__ = 8; break; + case 3: + $i=0; + __label__ = 4; break; + case 4: + var $9=$i; + var $10=(($9)|0) < 4; + if ($10) { __label__ = 5; break; } else { __label__ = 7; break; } + case 5: + var $12=$i; + var $13=$encoder; + var $14=(($13+56)|0); + var $15=(($14+$12*76)|0); + _destroy_channel($15); + __label__ = 6; break; + case 6: + var $17=$i; + var $18=(($17+1)|0); + $i=$18; + __label__ = 4; break; + case 7: + var $20=$encoder; + var $21=(($20)|0); + var $22=HEAP32[(($21)>>2)]; + var $23=(($22+16)|0); + var $24=HEAP32[(($23)>>2)]; + var $25=$encoder; + var $26=(($25)|0); + var $27=HEAP32[(($26)>>2)]; + var $28=$encoder; + var $29=$28; + FUNCTION_TABLE[$24]($27, $29); + __label__ = 8; break; + case 8: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function _destroy_channel($channel) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $usr; + $1=$channel; + var $2=$1; + var $3=(($2)|0); + var $4=HEAP32[(($3)>>2)]; + var $5=(($4)|0); + var $6=HEAP32[(($5)>>2)]; + $usr=$6; + var $7=$1; + var $8=(($7+8)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=(($9)|0)!=0; + if ($10) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $12=$usr; + var $13=(($12+16)|0); + var $14=HEAP32[(($13)>>2)]; + var $15=$usr; + var $16=$1; + var $17=(($16+8)|0); + var $18=HEAP32[(($17)>>2)]; + var $19=(($18-1)|0); + FUNCTION_TABLE[$14]($15, $19); + __label__ = 3; break; + case 3: + var $21=$usr; + var $22=$1; + var $23=(($22+16)|0); + _free_family_stat($21, $23); + var $24=$usr; + var $25=$1; + var $26=(($25+28)|0); + _free_family_stat($24, $26); + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function _quic_init() { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1=HEAP32[((_need_init)>>2)]; + var $2=(($1)|0)!=0; + if ($2) { __label__ = 3; break; } else { __label__ = 2; break; } + case 2: + __label__ = 4; break; + case 3: + HEAP32[((_need_init)>>2)]=0; + _family_init(_family_8bpc, 8, 26); + _family_init(_family_5bpc, 5, 26); + _init_zeroLUT(); + __label__ = 4; break; + case 4: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function _family_init($family, $bpc, $limit) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $l; + var $altprefixlen; + var $altcodewords; + $1=$family; + $2=$bpc; + $3=$limit; + $l=0; + __label__ = 2; break; + case 2: + var $5=$l; + var $6=$2; + var $7=(($5)|0) < (($6)|0); + if ($7) { __label__ = 3; break; } else { __label__ = 7; break; } + case 3: + var $9=$3; + var $10=$2; + var $11=(($9-$10)|0); + $altprefixlen=$11; + var $12=$altprefixlen; + var $13=$2; + var $14=$l; + var $15=(($13-$14)|0); + var $16=((_bppmask+($15<<2))|0); + var $17=HEAP32[(($16)>>2)]; + var $18=(($12)|0) > (($17)|0); + if ($18) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $20=$2; + var $21=$l; + var $22=(($20-$21)|0); + var $23=((_bppmask+($22<<2))|0); + var $24=HEAP32[(($23)>>2)]; + $altprefixlen=$24; + __label__ = 5; break; + case 5: + var $26=$2; + var $27=((_bppmask+($26<<2))|0); + var $28=HEAP32[(($27)>>2)]; + var $29=(($28+1)|0); + var $30=$altprefixlen; + var $31=$l; + var $32=$30 << $31; + var $33=(($29-$32)|0); + $altcodewords=$33; + var $34=$altprefixlen; + var $35=$l; + var $36=$34 << $35; + var $37=$l; + var $38=$1; + var $39=(($38)|0); + var $40=(($39+($37<<2))|0); + HEAP32[(($40)>>2)]=$36; + var $41=$altprefixlen; + var $42=$altcodewords; + var $43=_ceil_log_2($42); + var $44=(($41+$43)|0); + var $45=$l; + var $46=$1; + var $47=(($46+32)|0); + var $48=(($47+($45<<2))|0); + HEAP32[(($48)>>2)]=$44; + var $49=$altprefixlen; + var $50=((32-$49)|0); + var $51=((_bppmask+($50<<2))|0); + var $52=HEAP32[(($51)>>2)]; + var $53=$l; + var $54=$1; + var $55=(($54+64)|0); + var $56=(($55+($53<<2))|0); + HEAP32[(($56)>>2)]=$52; + var $57=$altcodewords; + var $58=_ceil_log_2($57); + var $59=$l; + var $60=$1; + var $61=(($60+96)|0); + var $62=(($61+($59<<2))|0); + HEAP32[(($62)>>2)]=$58; + __label__ = 6; break; + case 6: + var $64=$l; + var $65=(($64+1)|0); + $l=$65; + __label__ = 2; break; + case 7: + var $67=$1; + var $68=$2; + _decorelate_init($67, $68); + var $69=$1; + var $70=$2; + _corelate_init($69, $70); + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_family_init["X"]=1; + +function _usr_msg($usr, $fmt) { + var __stackBase__ = STACKTOP; STACKTOP += 4; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + + var $1; + var $2; + var $ap=__stackBase__; + $1=$usr; + $2=$fmt; + var $3=$ap; + HEAP32[(($3)>>2)]=arguments[_usr_msg.length]; + var $4=HEAP32[((_stderr)>>2)]; + var $5=$2; + var $6=HEAP32[(($ap)>>2)]; + var $7=_vfprintf($4, $5, $6); + var $8=$ap; + ; + STACKTOP = __stackBase__; + return; +} + + +function _usr_malloc($usr, $size) { + ; + var __label__; + + var $1; + var $2; + $1=$usr; + $2=$size; + var $3=$2; + var $4=_malloc($3); + ; + return $4; +} + + +function _usr_free($usr, $ptr) { + ; + var __label__; + + var $1; + var $2; + $1=$usr; + $2=$ptr; + var $3=$2; + _free($3); + ; + return; +} + + +function _usr_more_space($usr, $io_ptr, $rows_completed) { + var __stackBase__ = STACKTOP; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + + var $1; + var $2; + var $3; + $1=$usr; + $2=$io_ptr; + $3=$rows_completed; + var $4=$3; + var $5=_printf(((STRING_TABLE.__str32)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$4,tempInt)); + STACKTOP = __stackBase__; + return 0; +} + + +function _usr_more_lines($usr, $lines) { + var __stackBase__ = STACKTOP; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + + var $1; + var $2; + $1=$usr; + $2=$lines; + var $3=_printf(((STRING_TABLE.__str33)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + STACKTOP = __stackBase__; + return 0; +} + + +function _print_a_line($p, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $pixel; + $1=$p; + $2=$width; + var $3=$1; + var $4=$3; + $pixel=$4; + __label__ = 2; break; + case 2: + var $6=$2; + var $7=(($6)|0) > 0; + if ($7) { __label__ = 3; break; } else { __label__ = 8; break; } + case 3: + var $9=$pixel; + var $10=(($9+4)|0); + $pixel=$10; + var $11=HEAP32[(($9)>>2)]; + var $12=(($11)|0)!=0; + if ($12) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $14=_printf(((STRING_TABLE.__str34)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + __label__ = 6; break; + case 5: + var $16=_printf(((STRING_TABLE.__str35)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + __label__ = 6; break; + case 6: + __label__ = 7; break; + case 7: + var $19=$2; + var $20=(($19-1)|0); + $2=$20; + __label__ = 2; break; + case 8: + var $22=_printf(((STRING_TABLE.__str36)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function _simple_quic_init() { + ; + var __label__; + + var $usr; + var $1=_malloc(28); + var $2=$1; + $usr=$2; + var $3=$usr; + var $4=(($3+8)|0); + HEAP32[(($4)>>2)]=2; + var $5=$usr; + var $6=(($5)|0); + HEAP32[(($6)>>2)]=2; + var $7=$usr; + var $8=(($7+4)|0); + HEAP32[(($8)>>2)]=2; + var $9=$usr; + var $10=(($9+12)|0); + HEAP32[(($10)>>2)]=4; + var $11=$usr; + var $12=(($11+16)|0); + HEAP32[(($12)>>2)]=6; + var $13=$usr; + var $14=(($13+20)|0); + HEAP32[(($14)>>2)]=8; + var $15=$usr; + var $16=(($15+24)|0); + HEAP32[(($16)>>2)]=10; + _quic_init(); + var $17=$usr; + var $18=_quic_create($17); + ; + return $18; +} + + +function _simple_quic_term($q) { + ; + var __label__; + + var $1; + $1=$q; + var $2=$1; + _quic_destroy($2); + ; + return; +} + + +function _simple_quic_decode($q, $in, $inlen, $type, $width, $height, $out) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $rc; + var $stride; + $2=$q; + $3=$in; + $4=$inlen; + $5=$type; + $6=$width; + $7=$height; + $8=$out; + $stride=4; + var $9=$2; + var $10=$3; + var $11=$10; + var $12=$4; + var $13=Math.floor((($12)>>>0)/4); + var $14=$5; + var $15=$6; + var $16=$7; + var $17=_quic_decode_begin($9, $11, $13, $14, $15, $16); + $rc=$17; + var $18=$rc; + var $19=(($18)|0)!=0; + if ($19) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $21=$rc; + $1=$21; + __label__ = 7; break; + case 3: + var $23=$5; + var $24=HEAP32[(($23)>>2)]; + var $25=(($24)|0)!=4; + if ($25) { __label__ = 4; break; } else { __label__ = 6; break; } + case 4: + var $27=$5; + var $28=HEAP32[(($27)>>2)]; + var $29=(($28)|0)!=5; + if ($29) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + var $31=HEAP32[((_stderr)>>2)]; + var $32=$5; + var $33=HEAP32[(($32)>>2)]; + var $34=_fprintf($31, ((STRING_TABLE.__str37)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$33,tempInt)); + $1=-1; + __label__ = 7; break; + case 6: + var $36=$6; + var $37=HEAP32[(($36)>>2)]; + var $38=$7; + var $39=HEAP32[(($38)>>2)]; + var $40=(($37*$39)|0); + var $41=$stride; + var $42=(($40*$41)|0); + var $43=_malloc($42); + var $44=$8; + HEAP32[(($44)>>2)]=$43; + var $45=$8; + var $46=HEAP32[(($45)>>2)]; + HEAP8[($46)]=69; + var $47=$2; + var $48=$5; + var $49=HEAP32[(($48)>>2)]; + var $50=$8; + var $51=HEAP32[(($50)>>2)]; + var $52=$6; + var $53=HEAP32[(($52)>>2)]; + var $54=$stride; + var $55=(($53*$54)|0); + var $56=_quic_decode($47, $49, $51, $55); + $rc=$56; + var $57=$rc; + $1=$57; + __label__ = 7; break; + case 7: + var $59=$1; + ; + return $59; + default: assert(0, "bad label: " + __label__); + } +} +_simple_quic_decode["X"]=1; + +function _quic_decode_js($in, $inlen) { + var __stackBase__ = STACKTOP; STACKTOP += 16; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $rc; + var $type=__stackBase__; + var $width=__stackBase__+4; + var $height=__stackBase__+8; + var $out=__stackBase__+12; + $1=$in; + $2=$inlen; + var $3=HEAP32[((_quic_decode_js_q)>>2)]; + var $4=(($3)|0)!=0; + if ($4) { __label__ = 3; break; } else { __label__ = 2; break; } + case 2: + var $6=_simple_quic_init(); + HEAP32[((_quic_decode_js_q)>>2)]=$6; + __label__ = 3; break; + case 3: + var $8=HEAP32[((_quic_decode_js_q)>>2)]; + var $9=$1; + var $10=$2; + var $11=_simple_quic_decode($8, $9, $10, $type, $width, $height, $out); + + var ret = new Object; + ret.type = HEAP32[$type>>2]; + ret.width = HEAP32[$width>>2]; + ret.height = HEAP32[$height>>2]; + var outptr = HEAP32[$out>>2]; + ret.imgData = global_ctx.createImageData(ret.width, ret.height); + var i; + for (i = 0; i < (ret.width * ret.height * 4); i+=4) + { + ret.imgData.data[i + 0] = HEAPU8[outptr + i + 2]; + ret.imgData.data[i + 1] = HEAPU8[outptr + i + 1]; + ret.imgData.data[i + 2] = HEAPU8[outptr + i + 0]; + if (ret.type == 4) + ret.imgData.data[i + 3] = 255; + else + ret.imgData.data[i + 3] = HEAPU8[outptr + i + 3]; + } + + $rc=$11; + var $12=$rc; + STACKTOP = __stackBase__; + return ret; + default: assert(0, "bad label: " + __label__); + } +} + + +function _free_family_stat($usr, $family_stat) { + ; + var __label__; + + var $1; + var $2; + $1=$usr; + $2=$family_stat; + var $3=$1; + var $4=(($3+16)|0); + var $5=HEAP32[(($4)>>2)]; + var $6=$1; + var $7=$2; + var $8=(($7)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=$9; + FUNCTION_TABLE[$5]($6, $10); + var $11=$1; + var $12=(($11+16)|0); + var $13=HEAP32[(($12)>>2)]; + var $14=$1; + var $15=$2; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + var $18=$17; + FUNCTION_TABLE[$13]($14, $18); + var $19=$1; + var $20=(($19+16)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=$1; + var $23=$2; + var $24=(($23+4)|0); + var $25=HEAP32[(($24)>>2)]; + var $26=$25; + FUNCTION_TABLE[$21]($22, $26); + ; + return; +} + + +function _main($argc, $argv) { + var __stackBase__ = STACKTOP; STACKTOP += 10560; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $q; + var $membuf1=__stackBase__; + var $membuf2=__stackBase__+188; + var $p; + var $buf2=__stackBase__+10544; + var $fp; + var $i; + var $rc; + var $len; + var $type=__stackBase__+10548; + var $width=__stackBase__+10552; + var $height=__stackBase__+10556; + var $j; + $1=0; + $2=$argc; + $3=$argv; + var $4=$membuf1; + assert(188 % 1 === 0, 'memcpy given ' + 188 + ' bytes to copy. Problem with quantum=1 corrections perhaps?');_memcpy($4, ((STRING_TABLE._main_membuf1)|0), 188, 1); + var $5=$membuf2; + assert(10356 % 1 === 0, 'memcpy given ' + 10356 + ' bytes to copy. Problem with quantum=1 corrections perhaps?');_memcpy($5, ((STRING_TABLE._main_membuf2)|0), 10356, 1); + var $6=_simple_quic_init(); + $q=$6; + var $7=$q; + var $8=(($7)|0)!=0; + if ($8) { __label__ = 2; break; } else { __label__ = 26; break; } + case 2: + $i=1; + __label__ = 3; break; + case 3: + var $11=$i; + var $12=$2; + var $13=(($11)|0) < (($12)|0); + if ($13) { __label__ = 4; break; } else { __label__ = 25; break; } + case 4: + var $15=$i; + var $16=$3; + var $17=(($16+($15<<2))|0); + var $18=HEAP32[(($17)>>2)]; + var $19=_strcmp($18, ((STRING_TABLE.__str38)|0)); + var $20=(($19)|0)==0; + if ($20) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + var $22=(($membuf1)|0); + $p=$22; + $len=188; + __label__ = 17; break; + case 6: + var $24=$i; + var $25=$3; + var $26=(($25+($24<<2))|0); + var $27=HEAP32[(($26)>>2)]; + var $28=_strcmp($27, ((STRING_TABLE.__str39)|0)); + var $29=(($28)|0)==0; + if ($29) { __label__ = 7; break; } else { __label__ = 8; break; } + case 7: + var $31=(($membuf2)|0); + $p=$31; + $len=10356; + __label__ = 16; break; + case 8: + var $33=$i; + var $34=$3; + var $35=(($34+($33<<2))|0); + var $36=HEAP32[(($35)>>2)]; + var $37=_fopen($36, ((STRING_TABLE.__str40)|0)); + $fp=$37; + var $38=$fp; + var $39=(($38)|0)!=0; + if ($39) { __label__ = 9; break; } else { __label__ = 14; break; } + case 9: + var $41=$fp; + var $42=_fread(((_main_buf)|0), 1, 1048576, $41); + $len=$42; + var $43=$i; + var $44=$3; + var $45=(($44+($43<<2))|0); + var $46=HEAP32[(($45)>>2)]; + var $47=$len; + var $48=_printf(((STRING_TABLE.__str41)|0), (tempInt=STACKTOP,STACKTOP += 8,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$46,HEAP32[((tempInt+4)>>2)]=$47,tempInt)); + $p=((_main_buf)|0); + var $49=$len; + var $50=(($49)>>>0) >= 1048572; + if ($50) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $52=HEAP32[((_stderr)>>2)]; + var $53=$i; + var $54=$3; + var $55=(($54+($53<<2))|0); + var $56=HEAP32[(($55)>>2)]; + var $57=_fprintf($52, ((STRING_TABLE.__str42)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$56,tempInt)); + _exit(1); + throw "Reached an unreachable!" + case 11: + var $59=$len; + var $60=(($59)|0)==0; + if ($60) { __label__ = 12; break; } else { __label__ = 13; break; } + case 12: + var $62=HEAP32[((_stderr)>>2)]; + var $63=$i; + var $64=$3; + var $65=(($64+($63<<2))|0); + var $66=HEAP32[(($65)>>2)]; + var $67=_fprintf($62, ((STRING_TABLE.__str43)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$66,tempInt)); + _exit(1); + throw "Reached an unreachable!" + case 13: + var $69=$fp; + var $70=_fclose($69); + __label__ = 15; break; + case 14: + var $72=HEAP32[((_stderr)>>2)]; + var $73=$i; + var $74=$3; + var $75=(($74+($73<<2))|0); + var $76=HEAP32[(($75)>>2)]; + var $77=_fprintf($72, ((STRING_TABLE.__str44)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=$76,tempInt)); + _exit(1); + throw "Reached an unreachable!" + case 15: + __label__ = 16; break; + case 16: + __label__ = 17; break; + case 17: + var $81=$q; + var $82=$p; + var $83=$len; + var $84=_simple_quic_decode($81, $82, $83, $type, $width, $height, $buf2); + $rc=$84; + var $85=$rc; + var $86=(($85)|0)==0; + if ($86) { __label__ = 18; break; } else { __label__ = 23; break; } + case 18: + $j=0; + __label__ = 19; break; + case 19: + var $89=$j; + var $90=HEAP32[(($height)>>2)]; + var $91=(($89)|0) < (($90)|0); + if ($91) { __label__ = 20; break; } else { __label__ = 22; break; } + case 20: + var $93=HEAP32[(($buf2)>>2)]; + var $94=$j; + var $95=HEAP32[(($width)>>2)]; + var $96=(($94*$95)|0); + var $97=((($96<<2))|0); + var $98=(($93+$97)|0); + var $99=HEAP32[(($width)>>2)]; + _print_a_line($98, $99); + __label__ = 21; break; + case 21: + var $101=$j; + var $102=(($101+1)|0); + $j=$102; + __label__ = 19; break; + case 22: + __label__ = 23; break; + case 23: + __label__ = 24; break; + case 24: + var $106=$i; + var $107=(($106+1)|0); + $i=$107; + __label__ = 3; break; + case 25: + var $109=$q; + _simple_quic_term($109); + __label__ = 26; break; + case 26: + var $111=(($membuf2)|0); + var $112=_quic_decode_js($111, 10356); + STACKTOP = __stackBase__; + return 0; + default: assert(0, "bad label: " + __label__); + } +} +Module["_main"] = _main;_main["X"]=1; + +function _init_channel($encoder, $channel) { + var __stackBase__ = STACKTOP; STACKTOP += 32; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $ncounters=__stackBase__; + var $levels=__stackBase__+4; + var $rep_first=__stackBase__+8; + var $first_size=__stackBase__+12; + var $rep_next=__stackBase__+16; + var $mul_size=__stackBase__+20; + var $n_buckets=__stackBase__+24; + var $n_buckets_ptrs=__stackBase__+28; + $2=$encoder; + $3=$channel; + var $4=$2; + var $5=$3; + var $6=(($5)|0); + HEAP32[(($6)>>2)]=$4; + var $7=$2; + var $8=$3; + var $9=(($8+40)|0); + var $10=(($9)|0); + HEAP32[(($10)>>2)]=$7; + var $11=$3; + var $12=(($11+4)|0); + HEAP32[(($12)>>2)]=0; + var $13=$3; + var $14=(($13+8)|0); + HEAP32[(($14)>>2)]=0; + var $15=$2; + _find_model_params($15, 8, $ncounters, $levels, $n_buckets_ptrs, $rep_first, $first_size, $rep_next, $mul_size, $n_buckets); + var $16=HEAP32[(($n_buckets)>>2)]; + var $17=$2; + var $18=(($17+20)|0); + HEAP32[(($18)>>2)]=$16; + var $19=$2; + var $20=$3; + var $21=(($20+16)|0); + var $22=HEAP32[(($rep_first)>>2)]; + var $23=HEAP32[(($first_size)>>2)]; + var $24=HEAP32[(($rep_next)>>2)]; + var $25=HEAP32[(($mul_size)>>2)]; + var $26=HEAP32[(($levels)>>2)]; + var $27=HEAP32[(($ncounters)>>2)]; + var $28=HEAP32[(($n_buckets_ptrs)>>2)]; + var $29=HEAP32[(($n_buckets)>>2)]; + var $30=_init_model_structures($19, $21, $22, $23, $24, $25, $26, $27, $28, $29); + var $31=(($30)|0)!=0; + if ($31) { __label__ = 3; break; } else { __label__ = 2; break; } + case 2: + $1=0; + __label__ = 6; break; + case 3: + var $34=$2; + _find_model_params($34, 5, $ncounters, $levels, $n_buckets_ptrs, $rep_first, $first_size, $rep_next, $mul_size, $n_buckets); + var $35=HEAP32[(($n_buckets)>>2)]; + var $36=$2; + var $37=(($36+24)|0); + HEAP32[(($37)>>2)]=$35; + var $38=$2; + var $39=$3; + var $40=(($39+28)|0); + var $41=HEAP32[(($rep_first)>>2)]; + var $42=HEAP32[(($first_size)>>2)]; + var $43=HEAP32[(($rep_next)>>2)]; + var $44=HEAP32[(($mul_size)>>2)]; + var $45=HEAP32[(($levels)>>2)]; + var $46=HEAP32[(($ncounters)>>2)]; + var $47=HEAP32[(($n_buckets_ptrs)>>2)]; + var $48=HEAP32[(($n_buckets)>>2)]; + var $49=_init_model_structures($38, $40, $41, $42, $43, $44, $45, $46, $47, $48); + var $50=(($49)|0)!=0; + if ($50) { __label__ = 5; break; } else { __label__ = 4; break; } + case 4: + var $52=$2; + var $53=(($52)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=$3; + var $56=(($55+16)|0); + _free_family_stat($54, $56); + $1=0; + __label__ = 6; break; + case 5: + $1=1; + __label__ = 6; break; + case 6: + var $59=$1; + STACKTOP = __stackBase__; + return $59; + default: assert(0, "bad label: " + __label__); + } +} +_init_channel["X"]=1; + +function _find_model_params($encoder, $bpc, $ncounters, $levels, $n_buckets_ptrs, $repfirst, $firstsize, $repnext, $mulsize, $nbuckets) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $10; + var $bsize; + var $bstart; + var $bend; + var $repcntr; + var $_g_boolean_var_; + $1=$encoder; + $2=$bpc; + $3=$ncounters; + $4=$levels; + $5=$n_buckets_ptrs; + $6=$repfirst; + $7=$firstsize; + $8=$repnext; + $9=$mulsize; + $10=$nbuckets; + $bend=0; + __label__ = 2; break; + case 2: + var $12=$2; + var $13=(($12)|0) <= 8; + if ($13) { __label__ = 3; break; } else { __label__ = 5; break; } + case 3: + var $15=$2; + var $16=(($15)|0) > 0; + if ($16) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + $_g_boolean_var_=1; + __label__ = 6; break; + case 5: + $_g_boolean_var_=0; + __label__ = 6; break; + case 6: + var $20=$_g_boolean_var_; + var $21=(($20)==(1)); + var $22=(($21)|0)!=0; + if ($22) { __label__ = 7; break; } else { __label__ = 8; break; } + case 7: + __label__ = 11; break; + case 8: + __label__ = 9; break; + case 9: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str51)|0), ((STRING_TABLE.___FUNCTION___find_model_params)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str52)|0),tempInt)); + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + var $29=$3; + HEAP32[(($29)>>2)]=8; + var $30=$2; + var $31=1 << $30; + var $32=$4; + HEAP32[(($32)>>2)]=$31; + var $33=$5; + HEAP32[(($33)>>2)]=0; + var $34=HEAP32[((_evol)>>2)]; + if ((($34)|0) == 1) { + __label__ = 13; break; + } + else if ((($34)|0) == 3) { + __label__ = 14; break; + } + else if ((($34)|0) == 5) { + __label__ = 15; break; + } + else if ((($34)|0) == 0 || (($34)|0) == 2 || (($34)|0) == 4) { + __label__ = 16; break; + } + else { + __label__ = 17; break; + } + + case 13: + var $36=$6; + HEAP32[(($36)>>2)]=3; + var $37=$7; + HEAP32[(($37)>>2)]=1; + var $38=$8; + HEAP32[(($38)>>2)]=2; + var $39=$9; + HEAP32[(($39)>>2)]=2; + __label__ = 18; break; + case 14: + var $41=$6; + HEAP32[(($41)>>2)]=1; + var $42=$7; + HEAP32[(($42)>>2)]=1; + var $43=$8; + HEAP32[(($43)>>2)]=1; + var $44=$9; + HEAP32[(($44)>>2)]=2; + __label__ = 18; break; + case 15: + var $46=$6; + HEAP32[(($46)>>2)]=1; + var $47=$7; + HEAP32[(($47)>>2)]=1; + var $48=$8; + HEAP32[(($48)>>2)]=1; + var $49=$9; + HEAP32[(($49)>>2)]=4; + __label__ = 18; break; + case 16: + var $51=$1; + var $52=(($51)|0); + var $53=HEAP32[(($52)>>2)]; + var $54=(($53)|0); + var $55=HEAP32[(($54)>>2)]; + var $56=$1; + var $57=(($56)|0); + var $58=HEAP32[(($57)>>2)]; + FUNCTION_TABLE[$55]($58, ((STRING_TABLE.__str53)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + __label__ = 17; break; + case 17: + var $60=$1; + var $61=(($60)|0); + var $62=HEAP32[(($61)>>2)]; + var $63=(($62)|0); + var $64=HEAP32[(($63)>>2)]; + var $65=$1; + var $66=(($65)|0); + var $67=HEAP32[(($66)>>2)]; + FUNCTION_TABLE[$64]($67, ((STRING_TABLE.__str54)|0), (tempInt=STACKTOP,STACKTOP += 1,STACKTOP = ((((STACKTOP)+3)>>2)<<2),assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=0,tempInt)); + __label__ = 18; break; + case 18: + var $69=$10; + HEAP32[(($69)>>2)]=0; + var $70=$6; + var $71=HEAP32[(($70)>>2)]; + var $72=(($71+1)|0); + $repcntr=$72; + var $73=$7; + var $74=HEAP32[(($73)>>2)]; + $bsize=$74; + __label__ = 19; break; + case 19: + var $76=$10; + var $77=(($76)|0)!=0; + if ($77) { __label__ = 20; break; } else { __label__ = 21; break; } + case 20: + var $79=$bend; + var $80=(($79+1)|0); + $bstart=$80; + __label__ = 22; break; + case 21: + $bstart=0; + __label__ = 22; break; + case 22: + var $83=$repcntr; + var $84=(($83-1)|0); + $repcntr=$84; + var $85=(($84)|0)!=0; + if ($85) { __label__ = 24; break; } else { __label__ = 23; break; } + case 23: + var $87=$8; + var $88=HEAP32[(($87)>>2)]; + $repcntr=$88; + var $89=$9; + var $90=HEAP32[(($89)>>2)]; + var $91=$bsize; + var $92=(($91*$90)|0); + $bsize=$92; + __label__ = 24; break; + case 24: + var $94=$bstart; + var $95=$bsize; + var $96=(($94+$95)|0); + var $97=(($96-1)|0); + $bend=$97; + var $98=$bend; + var $99=$bsize; + var $100=(($98+$99)|0); + var $101=$4; + var $102=HEAPU32[(($101)>>2)]; + var $103=(($100)>>>0) >= (($102)>>>0); + if ($103) { __label__ = 25; break; } else { __label__ = 26; break; } + case 25: + var $105=$4; + var $106=HEAP32[(($105)>>2)]; + var $107=(($106-1)|0); + $bend=$107; + __label__ = 26; break; + case 26: + var $109=$5; + var $110=HEAP32[(($109)>>2)]; + var $111=(($110)|0)!=0; + if ($111) { __label__ = 28; break; } else { __label__ = 27; break; } + case 27: + var $113=$4; + var $114=HEAP32[(($113)>>2)]; + var $115=$5; + HEAP32[(($115)>>2)]=$114; + __label__ = 28; break; + case 28: + var $117=$10; + var $118=HEAP32[(($117)>>2)]; + var $119=(($118+1)|0); + HEAP32[(($117)>>2)]=$119; + __label__ = 29; break; + case 29: + var $121=$bend; + var $122=$4; + var $123=HEAP32[(($122)>>2)]; + var $124=(($123-1)|0); + var $125=(($121)>>>0) < (($124)>>>0); + if ($125) { __label__ = 19; break; } else { __label__ = 30; break; } + case 30: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_find_model_params["X"]=1; + +function _init_model_structures($encoder, $family_stat, $rep_first, $first_size, $rep_next, $mul_size, $levels, $ncounters, $n_buckets_ptrs, $n_buckets) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $10; + var $11; + $2=$encoder; + $3=$family_stat; + $4=$rep_first; + $5=$first_size; + $6=$rep_next; + $7=$mul_size; + $8=$levels; + $9=$ncounters; + $10=$n_buckets_ptrs; + $11=$n_buckets; + var $12=$2; + var $13=(($12)|0); + var $14=HEAP32[(($13)>>2)]; + var $15=(($14+12)|0); + var $16=HEAP32[(($15)>>2)]; + var $17=$2; + var $18=(($17)|0); + var $19=HEAP32[(($18)>>2)]; + var $20=$10; + var $21=((($20<<2))|0); + var $22=FUNCTION_TABLE[$16]($19, $21); + var $23=$22; + var $24=$3; + var $25=(($24)|0); + HEAP32[(($25)>>2)]=$23; + var $26=$3; + var $27=(($26)|0); + var $28=HEAP32[(($27)>>2)]; + var $29=(($28)|0)!=0; + if ($29) { __label__ = 3; break; } else { __label__ = 2; break; } + case 2: + $1=0; + __label__ = 10; break; + case 3: + var $32=$2; + var $33=(($32)|0); + var $34=HEAP32[(($33)>>2)]; + var $35=(($34+12)|0); + var $36=HEAP32[(($35)>>2)]; + var $37=$2; + var $38=(($37)|0); + var $39=HEAP32[(($38)>>2)]; + var $40=$11; + var $41=((($40<<2))|0); + var $42=((($41<<3))|0); + var $43=FUNCTION_TABLE[$36]($39, $42); + var $44=$43; + var $45=$3; + var $46=(($45+8)|0); + HEAP32[(($46)>>2)]=$44; + var $47=$3; + var $48=(($47+8)|0); + var $49=HEAP32[(($48)>>2)]; + var $50=(($49)|0)!=0; + if ($50) { __label__ = 5; break; } else { __label__ = 4; break; } + case 4: + __label__ = 9; break; + case 5: + var $53=$2; + var $54=(($53)|0); + var $55=HEAP32[(($54)>>2)]; + var $56=(($55+12)|0); + var $57=HEAP32[(($56)>>2)]; + var $58=$2; + var $59=(($58)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=$11; + var $62=((($61<<3))|0); + var $63=FUNCTION_TABLE[$57]($60, $62); + var $64=$63; + var $65=$3; + var $66=(($65+4)|0); + HEAP32[(($66)>>2)]=$64; + var $67=$3; + var $68=(($67+4)|0); + var $69=HEAP32[(($68)>>2)]; + var $70=(($69)|0)!=0; + if ($70) { __label__ = 7; break; } else { __label__ = 6; break; } + case 6: + __label__ = 8; break; + case 7: + var $73=$2; + var $74=$3; + var $75=$4; + var $76=$5; + var $77=$6; + var $78=$7; + var $79=$8; + var $80=$9; + var $81=$11; + var $82=$10; + _fill_model_structures($73, $74, $75, $76, $77, $78, $79, $80, $81, $82); + $1=1; + __label__ = 10; break; + case 8: + var $84=$2; + var $85=(($84)|0); + var $86=HEAP32[(($85)>>2)]; + var $87=(($86+16)|0); + var $88=HEAP32[(($87)>>2)]; + var $89=$2; + var $90=(($89)|0); + var $91=HEAP32[(($90)>>2)]; + var $92=$3; + var $93=(($92+8)|0); + var $94=HEAP32[(($93)>>2)]; + var $95=$94; + FUNCTION_TABLE[$88]($91, $95); + __label__ = 9; break; + case 9: + var $97=$2; + var $98=(($97)|0); + var $99=HEAP32[(($98)>>2)]; + var $100=(($99+16)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=$2; + var $103=(($102)|0); + var $104=HEAP32[(($103)>>2)]; + var $105=$3; + var $106=(($105)|0); + var $107=HEAP32[(($106)>>2)]; + var $108=$107; + FUNCTION_TABLE[$101]($104, $108); + $1=0; + __label__ = 10; break; + case 10: + var $110=$1; + ; + return $110; + default: assert(0, "bad label: " + __label__); + } +} +_init_model_structures["X"]=1; + +function _fill_model_structures($encoder, $family_stat, $rep_first, $first_size, $rep_next, $mul_size, $levels, $ncounters, $nbuckets, $n_buckets_ptrs) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $10; + var $bsize; + var $bstart; + var $bend; + var $repcntr; + var $bnumber; + var $free_counter; + var $_g_boolean_var_; + var $i; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$family_stat; + $3=$rep_first; + $4=$first_size; + $5=$rep_next; + $6=$mul_size; + $7=$levels; + $8=$ncounters; + $9=$nbuckets; + $10=$n_buckets_ptrs; + $bend=0; + var $11=$2; + var $12=(($11+8)|0); + var $13=HEAP32[(($12)>>2)]; + $free_counter=$13; + $bnumber=0; + var $14=$3; + var $15=(($14+1)|0); + $repcntr=$15; + var $16=$4; + $bsize=$16; + __label__ = 2; break; + case 2: + var $18=$bnumber; + var $19=(($18)|0)!=0; + if ($19) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + var $21=$bend; + var $22=(($21+1)|0); + $bstart=$22; + __label__ = 5; break; + case 4: + $bstart=0; + __label__ = 5; break; + case 5: + var $25=$repcntr; + var $26=(($25-1)|0); + $repcntr=$26; + var $27=(($26)|0)!=0; + if ($27) { __label__ = 7; break; } else { __label__ = 6; break; } + case 6: + var $29=$5; + $repcntr=$29; + var $30=$6; + var $31=$bsize; + var $32=(($31*$30)|0); + $bsize=$32; + __label__ = 7; break; + case 7: + var $34=$bstart; + var $35=$bsize; + var $36=(($34+$35)|0); + var $37=(($36-1)|0); + $bend=$37; + var $38=$bend; + var $39=$bsize; + var $40=(($38+$39)|0); + var $41=$7; + var $42=(($40)>>>0) >= (($41)>>>0); + if ($42) { __label__ = 8; break; } else { __label__ = 9; break; } + case 8: + var $44=$7; + var $45=(($44-1)|0); + $bend=$45; + __label__ = 9; break; + case 9: + var $47=$free_counter; + var $48=$bnumber; + var $49=$2; + var $50=(($49+4)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=(($51+($48<<3))|0); + var $53=(($52)|0); + HEAP32[(($53)>>2)]=$47; + var $54=$8; + var $55=$free_counter; + var $56=(($55+($54<<2))|0); + $free_counter=$56; + __label__ = 10; break; + case 10: + var $58=$bstart; + var $59=$10; + var $60=(($58)>>>0) < (($59)>>>0); + if ($60) { __label__ = 11; break; } else { __label__ = 12; break; } + case 11: + $_g_boolean_var_=1; + __label__ = 13; break; + case 12: + $_g_boolean_var_=0; + __label__ = 13; break; + case 13: + var $64=$_g_boolean_var_; + var $65=(($64)==(1)); + var $66=(($65)|0)!=0; + if ($66) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + __label__ = 18; break; + case 15: + __label__ = 16; break; + case 16: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str45)|0), ((STRING_TABLE.___FUNCTION___fill_model_structures)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str46)|0),tempInt)); + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + __label__ = 20; break; + case 20: + var $74=$bend; + var $75=$10; + var $76=(($74)>>>0) < (($75)>>>0); + if ($76) { __label__ = 21; break; } else { __label__ = 22; break; } + case 21: + $_g_boolean_var_1=1; + __label__ = 23; break; + case 22: + $_g_boolean_var_1=0; + __label__ = 23; break; + case 23: + var $80=$_g_boolean_var_1; + var $81=(($80)==(1)); + var $82=(($81)|0)!=0; + if ($82) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + __label__ = 28; break; + case 25: + __label__ = 26; break; + case 26: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str47)|0), ((STRING_TABLE.___FUNCTION___fill_model_structures)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str48)|0),tempInt)); + __label__ = 27; break; + case 27: + __label__ = 28; break; + case 28: + __label__ = 29; break; + case 29: + var $89=$bstart; + $i=$89; + __label__ = 30; break; + case 30: + var $91=$i; + var $92=$bend; + var $93=(($91)>>>0) <= (($92)>>>0); + if ($93) { __label__ = 31; break; } else { __label__ = 33; break; } + case 31: + var $95=$2; + var $96=(($95+4)|0); + var $97=HEAP32[(($96)>>2)]; + var $98=$bnumber; + var $99=(($97+($98<<3))|0); + var $100=$i; + var $101=$2; + var $102=(($101)|0); + var $103=HEAP32[(($102)>>2)]; + var $104=(($103+($100<<2))|0); + HEAP32[(($104)>>2)]=$99; + __label__ = 32; break; + case 32: + var $106=$i; + var $107=(($106+1)|0); + $i=$107; + __label__ = 30; break; + case 33: + var $109=$bnumber; + var $110=(($109+1)|0); + $bnumber=$110; + __label__ = 34; break; + case 34: + var $112=$bend; + var $113=$7; + var $114=(($113-1)|0); + var $115=(($112)>>>0) < (($114)>>>0); + if ($115) { __label__ = 2; break; } else { __label__ = 35; break; } + case 35: + __label__ = 36; break; + case 36: + var $118=$free_counter; + var $119=$2; + var $120=(($119+8)|0); + var $121=HEAP32[(($120)>>2)]; + var $122=$118; + var $123=$121; + var $124=(($122-$123)|0); + var $125=(((($124)|0)/4)&-1); + var $126=$9; + var $127=$8; + var $128=(($126*$127)|0); + var $129=(($125)|0)==(($128)|0); + if ($129) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + $_g_boolean_var_2=1; + __label__ = 39; break; + case 38: + $_g_boolean_var_2=0; + __label__ = 39; break; + case 39: + var $133=$_g_boolean_var_2; + var $134=(($133)==(1)); + var $135=(($134)|0)!=0; + if ($135) { __label__ = 40; break; } else { __label__ = 41; break; } + case 40: + __label__ = 44; break; + case 41: + __label__ = 42; break; + case 42: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str49)|0), ((STRING_TABLE.___FUNCTION___fill_model_structures)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str50)|0),tempInt)); + __label__ = 43; break; + case 43: + __label__ = 44; break; + case 44: + __label__ = 45; break; + case 45: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_fill_model_structures["X"]=1; + +function _quic_one_uncompress_row0($encoder, $channel, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $bpc; + var $bpc_mask; + var $correlate_row; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$channel; + $3=$cur_row; + $4=$width; + $bpc=8; + $bpc_mask=255; + var $5=$2; + var $6=(($5+8)|0); + var $7=HEAP32[(($6)>>2)]; + $correlate_row=$7; + $pos=0; + __label__ = 2; break; + case 2: + var $9=HEAP32[((_wmimax)>>2)]; + var $10=$2; + var $11=(($10+40)|0); + var $12=(($11+16)|0); + var $13=HEAP32[(($12)>>2)]; + var $14=(($9)|0) > (($13)|0); + if ($14) { __label__ = 3; break; } else { var $23 = 0;__label__ = 4; break; } + case 3: + var $16=$2; + var $17=(($16+40)|0); + var $18=(($17+20)|0); + var $19=HEAPU32[(($18)>>2)]; + var $20=$4; + var $21=(($19)>>>0) <= (($20)>>>0); + var $23 = $21;__label__ = 4; break; + case 4: + var $23; + if ($23) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $25=$2; + var $26=(($25+40)|0); + var $27=(($26+20)|0); + var $28=HEAP32[(($27)>>2)]; + var $29=(($28)|0)!=0; + if ($29) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $31=$1; + var $32=$2; + var $33=$pos; + var $34=$correlate_row; + var $35=$3; + var $36=$pos; + var $37=$2; + var $38=(($37+40)|0); + var $39=(($38+20)|0); + var $40=HEAP32[(($39)>>2)]; + var $41=(($36+$40)|0); + var $42=$2; + var $43=(($42+40)|0); + var $44=(($43+16)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=((_bppmask+($45<<2))|0); + var $47=HEAP32[(($46)>>2)]; + _quic_one_uncompress_row0_seg($31, $32, $33, $34, $35, $41, $47, 8, 255); + var $48=$2; + var $49=(($48+40)|0); + var $50=(($49+20)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$pos; + var $53=(($52+$51)|0); + $pos=$53; + var $54=$2; + var $55=(($54+40)|0); + var $56=(($55+20)|0); + var $57=HEAP32[(($56)>>2)]; + var $58=$4; + var $59=(($58-$57)|0); + $4=$59; + __label__ = 7; break; + case 7: + var $61=$2; + var $62=(($61+40)|0); + var $63=(($62+16)|0); + var $64=HEAP32[(($63)>>2)]; + var $65=(($64+1)|0); + HEAP32[(($63)>>2)]=$65; + var $66=$2; + var $67=(($66+40)|0); + _set_wm_trigger($67); + var $68=HEAP32[((_wminext)>>2)]; + var $69=$2; + var $70=(($69+40)|0); + var $71=(($70+20)|0); + HEAP32[(($71)>>2)]=$68; + __label__ = 2; break; + case 8: + var $73=$4; + var $74=(($73)|0)!=0; + if ($74) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $76=$1; + var $77=$2; + var $78=$pos; + var $79=$correlate_row; + var $80=$3; + var $81=$pos; + var $82=$4; + var $83=(($81+$82)|0); + var $84=$2; + var $85=(($84+40)|0); + var $86=(($85+16)|0); + var $87=HEAP32[(($86)>>2)]; + var $88=((_bppmask+($87<<2))|0); + var $89=HEAP32[(($88)>>2)]; + _quic_one_uncompress_row0_seg($76, $77, $78, $79, $80, $83, $89, 8, 255); + var $90=HEAP32[((_wmimax)>>2)]; + var $91=$2; + var $92=(($91+40)|0); + var $93=(($92+16)|0); + var $94=HEAP32[(($93)>>2)]; + var $95=(($90)|0) > (($94)|0); + if ($95) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $97=$4; + var $98=$2; + var $99=(($98+40)|0); + var $100=(($99+20)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=(($101-$97)|0); + HEAP32[(($100)>>2)]=$102; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $106=$2; + var $107=(($106+40)|0); + var $108=(($107+16)|0); + var $109=HEAP32[(($108)>>2)]; + var $110=HEAP32[((_wmimax)>>2)]; + var $111=(($109)|0) <= (($110)|0); + if ($111) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $115=$_g_boolean_var_; + var $116=(($115)==(1)); + var $117=(($116)|0)!=0; + if ($117) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str78)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str56)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $125=$2; + var $126=(($125+40)|0); + var $127=(($126+16)|0); + var $128=HEAPU32[(($127)>>2)]; + var $129=(($128)>>>0) <= 32; + if ($129) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $133=$_g_boolean_var_1; + var $134=(($133)==(1)); + var $135=(($134)|0)!=0; + if ($135) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str79)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str58)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $143=HEAP32[((_wminext)>>2)]; + var $144=(($143)|0) > 0; + if ($144) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $148=$_g_boolean_var_2; + var $149=(($148)==(1)); + var $150=(($149)|0)!=0; + if ($150) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str80)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_one_uncompress_row0["X"]=1; + +function _quic_one_uncompress_row($encoder, $channel, $prev_row, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $bpc; + var $bpc_mask; + var $correlate_row; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$channel; + $3=$prev_row; + $4=$cur_row; + $5=$width; + $bpc=8; + $bpc_mask=255; + var $6=$2; + var $7=(($6+8)|0); + var $8=HEAP32[(($7)>>2)]; + $correlate_row=$8; + $pos=0; + __label__ = 2; break; + case 2: + var $10=HEAP32[((_wmimax)>>2)]; + var $11=$2; + var $12=(($11+40)|0); + var $13=(($12+16)|0); + var $14=HEAP32[(($13)>>2)]; + var $15=(($10)|0) > (($14)|0); + if ($15) { __label__ = 3; break; } else { var $24 = 0;__label__ = 4; break; } + case 3: + var $17=$2; + var $18=(($17+40)|0); + var $19=(($18+20)|0); + var $20=HEAPU32[(($19)>>2)]; + var $21=$5; + var $22=(($20)>>>0) <= (($21)>>>0); + var $24 = $22;__label__ = 4; break; + case 4: + var $24; + if ($24) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $26=$2; + var $27=(($26+40)|0); + var $28=(($27+20)|0); + var $29=HEAP32[(($28)>>2)]; + var $30=(($29)|0)!=0; + if ($30) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $32=$1; + var $33=$2; + var $34=$correlate_row; + var $35=$3; + var $36=$4; + var $37=$pos; + var $38=$pos; + var $39=$2; + var $40=(($39+40)|0); + var $41=(($40+20)|0); + var $42=HEAP32[(($41)>>2)]; + var $43=(($38+$42)|0); + _quic_one_uncompress_row_seg($32, $33, $34, $35, $36, $37, $43, 8, 255); + var $44=$2; + var $45=(($44+40)|0); + var $46=(($45+20)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$pos; + var $49=(($48+$47)|0); + $pos=$49; + var $50=$2; + var $51=(($50+40)|0); + var $52=(($51+20)|0); + var $53=HEAP32[(($52)>>2)]; + var $54=$5; + var $55=(($54-$53)|0); + $5=$55; + __label__ = 7; break; + case 7: + var $57=$2; + var $58=(($57+40)|0); + var $59=(($58+16)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=(($60+1)|0); + HEAP32[(($59)>>2)]=$61; + var $62=$2; + var $63=(($62+40)|0); + _set_wm_trigger($63); + var $64=HEAP32[((_wminext)>>2)]; + var $65=$2; + var $66=(($65+40)|0); + var $67=(($66+20)|0); + HEAP32[(($67)>>2)]=$64; + __label__ = 2; break; + case 8: + var $69=$5; + var $70=(($69)|0)!=0; + if ($70) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $72=$1; + var $73=$2; + var $74=$correlate_row; + var $75=$3; + var $76=$4; + var $77=$pos; + var $78=$pos; + var $79=$5; + var $80=(($78+$79)|0); + _quic_one_uncompress_row_seg($72, $73, $74, $75, $76, $77, $80, 8, 255); + var $81=HEAP32[((_wmimax)>>2)]; + var $82=$2; + var $83=(($82+40)|0); + var $84=(($83+16)|0); + var $85=HEAP32[(($84)>>2)]; + var $86=(($81)|0) > (($85)|0); + if ($86) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $88=$5; + var $89=$2; + var $90=(($89+40)|0); + var $91=(($90+20)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=(($92-$88)|0); + HEAP32[(($91)>>2)]=$93; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $97=$2; + var $98=(($97+40)|0); + var $99=(($98+16)|0); + var $100=HEAP32[(($99)>>2)]; + var $101=HEAP32[((_wmimax)>>2)]; + var $102=(($100)|0) <= (($101)|0); + if ($102) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $106=$_g_boolean_var_; + var $107=(($106)==(1)); + var $108=(($107)|0)!=0; + if ($108) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str55)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str56)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $116=$2; + var $117=(($116+40)|0); + var $118=(($117+16)|0); + var $119=HEAPU32[(($118)>>2)]; + var $120=(($119)>>>0) <= 32; + if ($120) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $124=$_g_boolean_var_1; + var $125=(($124)==(1)); + var $126=(($125)|0)!=0; + if ($126) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str57)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str58)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $134=HEAP32[((_wminext)>>2)]; + var $135=(($134)|0) > 0; + if ($135) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $139=$_g_boolean_var_2; + var $140=(($139)==(1)); + var $141=(($140)|0)!=0; + if ($141) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str59)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_one_uncompress_row["X"]=1; + +function _tabrand($tabrand_seed) { + ; + var __label__; + + var $1; + $1=$tabrand_seed; + var $2=$1; + var $3=HEAP32[(($2)>>2)]; + var $4=(($3+1)|0); + HEAP32[(($2)>>2)]=$4; + var $5=$4 & 255; + var $6=((_tabrand_chaos+($5<<2))|0); + var $7=HEAP32[(($6)>>2)]; + ; + return $7; +} + + +function _quic_one_uncompress_row_seg($encoder, $channel, $correlate_row, $prev_row, $cur_row, $i, $end, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $waitmask; + var $stopidx; + var $run_index; + var $run_end; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $pbucket; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$channel; + $3=$correlate_row; + $4=$prev_row; + $5=$cur_row; + $6=$i; + $7=$end; + $8=$bpc; + $9=$bpc_mask; + var $10=$2; + var $11=(($10+40)|0); + var $12=(($11+16)|0); + var $13=HEAP32[(($12)>>2)]; + var $14=((_bppmask+($13<<2))|0); + var $15=HEAP32[(($14)>>2)]; + $waitmask=$15; + $run_index=0; + __label__ = 2; break; + case 2: + var $17=$7; + var $18=$6; + var $19=(($17-$18)|0); + var $20=(($19)|0) > 0; + if ($20) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $24=$_g_boolean_var_; + var $25=(($24)==(1)); + var $26=(($25)|0)!=0; + if ($26) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str67)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $33=$6; + var $34=(($33)|0)==0; + if ($34) { __label__ = 12; break; } else { __label__ = 16; break; } + case 12: + var $36=$2; + var $37=$3; + var $38=(($37-1)|0); + var $39=HEAPU8[($38)]; + var $40=(($39)&255); + var $41=_find_bucket_8bpc($36, $40); + var $42=(($41+4)|0); + var $43=HEAP32[(($42)>>2)]; + var $44=$1; + var $45=(($44+32)|0); + var $46=HEAP32[(($45)>>2)]; + var $47=_golomb_decoding_8bpc($43, $46, $codewordlen); + var $48=(($47) & 255); + var $49=$3; + var $50=(($49)|0); + HEAP8[($50)]=$48; + var $51=$3; + var $52=(($51)|0); + var $53=HEAPU8[($52)]; + var $54=(($53)&255); + var $55=((((_family_8bpc+384)|0)+($54<<2))|0); + var $56=HEAP32[(($55)>>2)]; + var $57=$4; + var $58=(($57)|0); + var $59=(($58)|0); + var $60=HEAPU8[($59)]; + var $61=(($60)&255); + var $62=(($56+$61)|0); + var $63=$9; + var $64=$62 & $63; + var $65=(($64) & 255); + var $66=$5; + var $67=(($66)|0); + var $68=(($67)|0); + HEAP8[($68)]=$65; + var $69=$1; + var $70=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($69, $70); + var $71=$2; + var $72=(($71+40)|0); + var $73=(($72+4)|0); + var $74=HEAP32[(($73)>>2)]; + var $75=(($74)|0)!=0; + if ($75) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $77=$2; + var $78=(($77+40)|0); + var $79=(($78+4)|0); + var $80=HEAP32[(($79)>>2)]; + var $81=(($80-1)|0); + HEAP32[(($79)>>2)]=$81; + __label__ = 15; break; + case 14: + var $83=$2; + var $84=(($83+40)|0); + var $85=(($84+8)|0); + var $86=_tabrand($85); + var $87=$waitmask; + var $88=$86 & $87; + var $89=$2; + var $90=(($89+40)|0); + var $91=(($90+4)|0); + HEAP32[(($91)>>2)]=$88; + var $92=$2; + var $93=(($92+40)|0); + var $94=$2; + var $95=$3; + var $96=(($95-1)|0); + var $97=HEAPU8[($96)]; + var $98=(($97)&255); + var $99=_find_bucket_8bpc($94, $98); + var $100=$3; + var $101=(($100)|0); + var $102=HEAP8[($101)]; + var $103=$8; + _update_model_8bpc($93, $99, $102, $103); + __label__ = 15; break; + case 15: + var $105=$6; + var $106=(($105+1)|0); + $6=$106; + var $107=$2; + var $108=(($107+40)|0); + var $109=(($108+4)|0); + var $110=HEAP32[(($109)>>2)]; + var $111=(($106+$110)|0); + $stopidx=$111; + __label__ = 17; break; + case 16: + var $113=$6; + var $114=$2; + var $115=(($114+40)|0); + var $116=(($115+4)|0); + var $117=HEAP32[(($116)>>2)]; + var $118=(($113+$117)|0); + $stopidx=$118; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + var $122=$stopidx; + var $123=$7; + var $124=(($122)|0) < (($123)|0); + if ($124) { __label__ = 20; break; } else { __label__ = 31; break; } + case 20: + $pbucket=0; + __label__ = 21; break; + case 21: + var $127=$6; + var $128=$stopidx; + var $129=(($127)|0) <= (($128)|0); + if ($129) { __label__ = 22; break; } else { __label__ = 30; break; } + case 22: + var $131=$6; + var $132=(($131-1)|0); + var $133=$4; + var $134=(($133+$132)|0); + var $135=(($134)|0); + var $136=HEAPU8[($135)]; + var $137=(($136)&255); + var $138=$6; + var $139=$4; + var $140=(($139+$138)|0); + var $141=(($140)|0); + var $142=HEAPU8[($141)]; + var $143=(($142)&255); + var $144=(($137)|0)==(($143)|0); + if ($144) { __label__ = 23; break; } else { __label__ = 28; break; } + case 23: + var $146=$run_index; + var $147=$6; + var $148=(($146)|0)!=(($147)|0); + if ($148) { __label__ = 24; break; } else { __label__ = 27; break; } + case 24: + var $150=$6; + var $151=(($150)|0) > 2; + if ($151) { __label__ = 25; break; } else { __label__ = 27; break; } + case 25: + var $153=$6; + var $154=(($153-1)|0); + var $155=$5; + var $156=(($155+$154)|0); + var $157=(($156)|0); + var $158=HEAPU8[($157)]; + var $159=(($158)&255); + var $160=$6; + var $161=(($160-2)|0); + var $162=$5; + var $163=(($162+$161)|0); + var $164=(($163)|0); + var $165=HEAPU8[($164)]; + var $166=(($165)&255); + var $167=(($159)|0)==(($166)|0); + if ($167) { __label__ = 26; break; } else { __label__ = 27; break; } + case 26: + __label__ = 42; break; + case 27: + __label__ = 28; break; + case 28: + var $171=$2; + var $172=$6; + var $173=(($172-1)|0); + var $174=$3; + var $175=(($174+$173)|0); + var $176=HEAPU8[($175)]; + var $177=(($176)&255); + var $178=_find_bucket_8bpc($171, $177); + $pbucket=$178; + var $179=$pbucket; + var $180=(($179+4)|0); + var $181=HEAP32[(($180)>>2)]; + var $182=$1; + var $183=(($182+32)|0); + var $184=HEAP32[(($183)>>2)]; + var $185=_golomb_decoding_8bpc($181, $184, $codewordlen1); + var $186=(($185) & 255); + var $187=$6; + var $188=$3; + var $189=(($188+$187)|0); + HEAP8[($189)]=$186; + var $190=$6; + var $191=$4; + var $192=(($191+$190)|0); + var $193=$6; + var $194=$5; + var $195=(($194+$193)|0); + var $196=$6; + var $197=$3; + var $198=(($197+$196)|0); + var $199=HEAP8[($198)]; + var $200=$9; + _quic_one_corelate($192, $195, $199, $200); + var $201=$1; + var $202=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($201, $202); + __label__ = 29; break; + case 29: + var $204=$6; + var $205=(($204+1)|0); + $6=$205; + __label__ = 21; break; + case 30: + var $207=$2; + var $208=(($207+40)|0); + var $209=$pbucket; + var $210=$stopidx; + var $211=$3; + var $212=(($211+$210)|0); + var $213=HEAP8[($212)]; + var $214=$8; + _update_model_8bpc($208, $209, $213, $214); + var $215=$6; + var $216=$2; + var $217=(($216+40)|0); + var $218=(($217+8)|0); + var $219=_tabrand($218); + var $220=$waitmask; + var $221=$219 & $220; + var $222=(($215+$221)|0); + $stopidx=$222; + __label__ = 19; break; + case 31: + __label__ = 32; break; + case 32: + var $225=$6; + var $226=$7; + var $227=(($225)|0) < (($226)|0); + if ($227) { __label__ = 33; break; } else { __label__ = 41; break; } + case 33: + var $229=$6; + var $230=(($229-1)|0); + var $231=$4; + var $232=(($231+$230)|0); + var $233=(($232)|0); + var $234=HEAPU8[($233)]; + var $235=(($234)&255); + var $236=$6; + var $237=$4; + var $238=(($237+$236)|0); + var $239=(($238)|0); + var $240=HEAPU8[($239)]; + var $241=(($240)&255); + var $242=(($235)|0)==(($241)|0); + if ($242) { __label__ = 34; break; } else { __label__ = 39; break; } + case 34: + var $244=$run_index; + var $245=$6; + var $246=(($244)|0)!=(($245)|0); + if ($246) { __label__ = 35; break; } else { __label__ = 38; break; } + case 35: + var $248=$6; + var $249=(($248)|0) > 2; + if ($249) { __label__ = 36; break; } else { __label__ = 38; break; } + case 36: + var $251=$6; + var $252=(($251-1)|0); + var $253=$5; + var $254=(($253+$252)|0); + var $255=(($254)|0); + var $256=HEAPU8[($255)]; + var $257=(($256)&255); + var $258=$6; + var $259=(($258-2)|0); + var $260=$5; + var $261=(($260+$259)|0); + var $262=(($261)|0); + var $263=HEAPU8[($262)]; + var $264=(($263)&255); + var $265=(($257)|0)==(($264)|0); + if ($265) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 42; break; + case 38: + __label__ = 39; break; + case 39: + var $269=$2; + var $270=$6; + var $271=(($270-1)|0); + var $272=$3; + var $273=(($272+$271)|0); + var $274=HEAPU8[($273)]; + var $275=(($274)&255); + var $276=_find_bucket_8bpc($269, $275); + var $277=(($276+4)|0); + var $278=HEAP32[(($277)>>2)]; + var $279=$1; + var $280=(($279+32)|0); + var $281=HEAP32[(($280)>>2)]; + var $282=_golomb_decoding_8bpc($278, $281, $codewordlen2); + var $283=(($282) & 255); + var $284=$6; + var $285=$3; + var $286=(($285+$284)|0); + HEAP8[($286)]=$283; + var $287=$6; + var $288=$4; + var $289=(($288+$287)|0); + var $290=$6; + var $291=$5; + var $292=(($291+$290)|0); + var $293=$6; + var $294=$3; + var $295=(($294+$293)|0); + var $296=HEAP8[($295)]; + var $297=$9; + _quic_one_corelate($289, $292, $296, $297); + var $298=$1; + var $299=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($298, $299); + __label__ = 40; break; + case 40: + var $301=$6; + var $302=(($301+1)|0); + $6=$302; + __label__ = 32; break; + case 41: + var $304=$stopidx; + var $305=$7; + var $306=(($304-$305)|0); + var $307=$2; + var $308=(($307+40)|0); + var $309=(($308+4)|0); + HEAP32[(($309)>>2)]=$306; + __label__ = 49; break; + case 42: + var $311=$stopidx; + var $312=$6; + var $313=(($311-$312)|0); + var $314=$2; + var $315=(($314+40)|0); + var $316=(($315+4)|0); + HEAP32[(($316)>>2)]=$313; + var $317=$6; + $run_index=$317; + var $318=$6; + var $319=$1; + var $320=$2; + var $321=_decode_channel_run($319, $320); + var $322=(($318+$321)|0); + $run_end=$322; + __label__ = 43; break; + case 43: + var $324=$6; + var $325=$run_end; + var $326=(($324)|0) < (($325)|0); + if ($326) { __label__ = 44; break; } else { __label__ = 46; break; } + case 44: + var $328=$6; + var $329=(($328-1)|0); + var $330=$5; + var $331=(($330+$329)|0); + var $332=(($331)|0); + var $333=HEAP8[($332)]; + var $334=$6; + var $335=$5; + var $336=(($335+$334)|0); + var $337=(($336)|0); + HEAP8[($337)]=$333; + __label__ = 45; break; + case 45: + var $339=$6; + var $340=(($339+1)|0); + $6=$340; + __label__ = 43; break; + case 46: + var $342=$6; + var $343=$7; + var $344=(($342)|0)==(($343)|0); + if ($344) { __label__ = 47; break; } else { __label__ = 48; break; } + case 47: + __label__ = 49; break; + case 48: + var $347=$6; + var $348=$2; + var $349=(($348+40)|0); + var $350=(($349+4)|0); + var $351=HEAP32[(($350)>>2)]; + var $352=(($347+$351)|0); + $stopidx=$352; + __label__ = 18; break; + case 49: + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_one_uncompress_row_seg["X"]=1; + +function _set_wm_trigger($state) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $wm; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$state; + var $2=$1; + var $3=(($2+16)|0); + var $4=HEAP32[(($3)>>2)]; + $wm=$4; + var $5=$wm; + var $6=(($5)>>>0) > 10; + if ($6) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + $wm=10; + __label__ = 3; break; + case 3: + __label__ = 4; break; + case 4: + var $10=HEAP32[((_evol)>>2)]; + var $11=(($10)|0) < 6; + if ($11) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + $_g_boolean_var_=1; + __label__ = 7; break; + case 6: + $_g_boolean_var_=0; + __label__ = 7; break; + case 7: + var $15=$_g_boolean_var_; + var $16=(($15)==(1)); + var $17=(($16)|0)!=0; + if ($17) { __label__ = 8; break; } else { __label__ = 9; break; } + case 8: + __label__ = 12; break; + case 9: + __label__ = 10; break; + case 10: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str61)|0), ((STRING_TABLE.___FUNCTION___set_wm_trigger)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str62)|0),tempInt)); + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $24=$wm; + var $25=HEAP32[((_evol)>>2)]; + var $26=(((($25)|0)/2)&-1); + var $27=((_besttrigtab+$26*22)|0); + var $28=(($27+($24<<1))|0); + var $29=HEAPU16[(($28)>>1)]; + var $30=(($29)&65535); + var $31=$1; + var $32=(($31+12)|0); + HEAP32[(($32)>>2)]=$30; + __label__ = 14; break; + case 14: + var $34=$1; + var $35=(($34+12)|0); + var $36=HEAPU32[(($35)>>2)]; + var $37=(($36)>>>0) <= 2000; + if ($37) { __label__ = 15; break; } else { __label__ = 16; break; } + case 15: + $_g_boolean_var_1=1; + __label__ = 17; break; + case 16: + $_g_boolean_var_1=0; + __label__ = 17; break; + case 17: + var $41=$_g_boolean_var_1; + var $42=(($41)==(1)); + var $43=(($42)|0)!=0; + if ($43) { __label__ = 18; break; } else { __label__ = 19; break; } + case 18: + __label__ = 22; break; + case 19: + __label__ = 20; break; + case 20: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str63)|0), ((STRING_TABLE.___FUNCTION___set_wm_trigger)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str64)|0),tempInt)); + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + __label__ = 24; break; + case 24: + var $51=$1; + var $52=(($51+12)|0); + var $53=HEAPU32[(($52)>>2)]; + var $54=(($53)>>>0) >= 1; + if ($54) { __label__ = 25; break; } else { __label__ = 26; break; } + case 25: + $_g_boolean_var_2=1; + __label__ = 27; break; + case 26: + $_g_boolean_var_2=0; + __label__ = 27; break; + case 27: + var $58=$_g_boolean_var_2; + var $59=(($58)==(1)); + var $60=(($59)|0)!=0; + if ($60) { __label__ = 28; break; } else { __label__ = 29; break; } + case 28: + __label__ = 32; break; + case 29: + __label__ = 30; break; + case 30: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str65)|0), ((STRING_TABLE.___FUNCTION___set_wm_trigger)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str66)|0),tempInt)); + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_set_wm_trigger["X"]=1; + +function _golomb_decoding_8bpc($l, $bits, $codewordlen) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $zeroprefix; + var $cwlen; + var $cwlen1; + $2=$l; + $3=$bits; + $4=$codewordlen; + var $5=$3; + var $6=$2; + var $7=((((_family_8bpc+64)|0)+($6<<2))|0); + var $8=HEAPU32[(($7)>>2)]; + var $9=(($5)>>>0) > (($8)>>>0); + if ($9) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $11=$3; + var $12=_cnt_l_zeroes($11); + $zeroprefix=$12; + var $13=$zeroprefix; + var $14=(($13+1)|0); + var $15=$2; + var $16=(($14+$15)|0); + $cwlen=$16; + var $17=$cwlen; + var $18=$4; + HEAP32[(($18)>>2)]=$17; + var $19=$zeroprefix; + var $20=$2; + var $21=$19 << $20; + var $22=$3; + var $23=$cwlen; + var $24=((32-$23)|0); + var $25=$22 >>> (($24)>>>0); + var $26=$2; + var $27=((_bppmask+($26<<2))|0); + var $28=HEAP32[(($27)>>2)]; + var $29=$25 & $28; + var $30=$21 | $29; + $1=$30; + __label__ = 4; break; + case 3: + var $32=$2; + var $33=((((_family_8bpc+32)|0)+($32<<2))|0); + var $34=HEAP32[(($33)>>2)]; + $cwlen1=$34; + var $35=$cwlen1; + var $36=$4; + HEAP32[(($36)>>2)]=$35; + var $37=$2; + var $38=((((_family_8bpc)|0)+($37<<2))|0); + var $39=HEAP32[(($38)>>2)]; + var $40=$3; + var $41=$cwlen1; + var $42=((32-$41)|0); + var $43=$40 >>> (($42)>>>0); + var $44=$2; + var $45=((((_family_8bpc+96)|0)+($44<<2))|0); + var $46=HEAP32[(($45)>>2)]; + var $47=((_bppmask+($46<<2))|0); + var $48=HEAP32[(($47)>>2)]; + var $49=$43 & $48; + var $50=(($39+$49)|0); + $1=$50; + __label__ = 4; break; + case 4: + var $52=$1; + ; + return $52; + default: assert(0, "bad label: " + __label__); + } +} +_golomb_decoding_8bpc["X"]=1; + +function _find_bucket_8bpc($channel, $val) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $_g_boolean_var_; + $1=$channel; + $2=$val; + __label__ = 2; break; + case 2: + var $4=$2; + var $5=(($4)>>>0) < 256; + if ($5) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $9=$_g_boolean_var_; + var $10=(($9)==(1)); + var $11=(($10)|0)!=0; + if ($11) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str76)|0), ((STRING_TABLE.___FUNCTION___find_bucket_8bpc)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str77)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $18=$2; + var $19=$1; + var $20=(($19+12)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=(($21+($18<<2))|0); + var $23=HEAP32[(($22)>>2)]; + ; + return $23; + default: assert(0, "bad label: " + __label__); + } +} + + +function _decode_eatbits($encoder, $len) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $delta; + var $_g_boolean_var_; + $1=$encoder; + $2=$len; + __label__ = 2; break; + case 2: + var $4=$2; + var $5=(($4)|0) > 0; + if ($5) { __label__ = 3; break; } else { __label__ = 5; break; } + case 3: + var $7=$2; + var $8=(($7)|0) < 32; + if ($8) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + $_g_boolean_var_=1; + __label__ = 6; break; + case 5: + $_g_boolean_var_=0; + __label__ = 6; break; + case 6: + var $12=$_g_boolean_var_; + var $13=(($12)==(1)); + var $14=(($13)|0)!=0; + if ($14) { __label__ = 7; break; } else { __label__ = 8; break; } + case 7: + __label__ = 11; break; + case 8: + __label__ = 9; break; + case 9: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str69)|0), ((STRING_TABLE.___FUNCTION___decode_eatbits)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str70)|0),tempInt)); + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + var $21=$2; + var $22=$1; + var $23=(($22+32)|0); + var $24=HEAP32[(($23)>>2)]; + var $25=$24 << $21; + HEAP32[(($23)>>2)]=$25; + var $26=$1; + var $27=(($26+28)|0); + var $28=HEAP32[(($27)>>2)]; + var $29=$2; + var $30=(($28-$29)|0); + $delta=$30; + var $31=(($30)|0) >= 0; + if ($31) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $33=$delta; + var $34=$1; + var $35=(($34+28)|0); + HEAP32[(($35)>>2)]=$33; + var $36=$1; + var $37=(($36+36)|0); + var $38=HEAPU32[(($37)>>2)]; + var $39=$1; + var $40=(($39+28)|0); + var $41=HEAPU32[(($40)>>2)]; + var $42=$38 >>> (($41)>>>0); + var $43=$1; + var $44=(($43+32)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=$45 | $42; + HEAP32[(($44)>>2)]=$46; + __label__ = 15; break; + case 14: + var $48=$delta; + var $49=(((-$48))|0); + $delta=$49; + var $50=$1; + var $51=(($50+36)|0); + var $52=HEAP32[(($51)>>2)]; + var $53=$delta; + var $54=$52 << $53; + var $55=$1; + var $56=(($55+32)|0); + var $57=HEAP32[(($56)>>2)]; + var $58=$57 | $54; + HEAP32[(($56)>>2)]=$58; + var $59=$1; + _read_io_word($59); + var $60=$delta; + var $61=((32-$60)|0); + var $62=$1; + var $63=(($62+28)|0); + HEAP32[(($63)>>2)]=$61; + var $64=$1; + var $65=(($64+36)|0); + var $66=HEAPU32[(($65)>>2)]; + var $67=$1; + var $68=(($67+28)|0); + var $69=HEAPU32[(($68)>>2)]; + var $70=$66 >>> (($69)>>>0); + var $71=$1; + var $72=(($71+32)|0); + var $73=HEAP32[(($72)>>2)]; + var $74=$73 | $70; + HEAP32[(($72)>>2)]=$74; + __label__ = 15; break; + case 15: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_decode_eatbits["X"]=1; + +function _quic_one_corelate($prev, $curr, $corelate, $bpc_mask) { + ; + var __label__; + + var $1; + var $2; + var $3; + var $4; + $1=$prev; + $2=$curr; + $3=$corelate; + $4=$bpc_mask; + var $5=$3; + var $6=(($5)&255); + var $7=((((_family_8bpc+384)|0)+($6<<2))|0); + var $8=HEAP32[(($7)>>2)]; + var $9=$2; + var $10=(($9-1)|0); + var $11=(($10)|0); + var $12=HEAPU8[($11)]; + var $13=(($12)&255); + var $14=$1; + var $15=(($14)|0); + var $16=(($15)|0); + var $17=HEAPU8[($16)]; + var $18=(($17)&255); + var $19=(($13+$18)|0); + var $20=$19 >>> 1; + var $21=(($8+$20)|0); + var $22=$4; + var $23=$21 & $22; + var $24=(($23) & 255); + var $25=$2; + var $26=(($25)|0); + HEAP8[($26)]=$24; + ; + return; +} + + +function _golomb_code_len_8bpc($n, $l) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + $2=$n; + $3=$l; + var $4=$2; + var $5=(($4)&255); + var $6=$3; + var $7=((((_family_8bpc)|0)+($6<<2))|0); + var $8=HEAPU32[(($7)>>2)]; + var $9=(($5)>>>0) < (($8)>>>0); + if ($9) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $11=$2; + var $12=(($11)&255); + var $13=$3; + var $14=$12 >> (($13)|0); + var $15=(($14+1)|0); + var $16=$3; + var $17=(($15+$16)|0); + $1=$17; + __label__ = 4; break; + case 3: + var $19=$3; + var $20=((((_family_8bpc+32)|0)+($19<<2))|0); + var $21=HEAP32[(($20)>>2)]; + $1=$21; + __label__ = 4; break; + case 4: + var $23=$1; + ; + return $23; + default: assert(0, "bad label: " + __label__); + } +} + + +function _cnt_l_zeroes($bits) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + $2=$bits; + var $3=$2; + var $4=$3 & -8388608; + var $5=(($4)|0)!=0; + if ($5) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $7=$2; + var $8=$7 >>> 24; + var $9=((STRING_TABLE._lzeroes+$8)|0); + var $10=HEAPU8[($9)]; + var $11=(($10)&255); + $1=$11; + __label__ = 8; break; + case 3: + var $13=$2; + var $14=$13 & -32768; + var $15=(($14)|0)!=0; + if ($15) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $17=$2; + var $18=$17 >>> 16; + var $19=$18 & 255; + var $20=((STRING_TABLE._lzeroes+$19)|0); + var $21=HEAPU8[($20)]; + var $22=(($21)&255); + var $23=(($22+8)|0); + $1=$23; + __label__ = 8; break; + case 5: + var $25=$2; + var $26=$25 & -128; + var $27=(($26)|0)!=0; + if ($27) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $29=$2; + var $30=$29 >>> 8; + var $31=$30 & 255; + var $32=((STRING_TABLE._lzeroes+$31)|0); + var $33=HEAPU8[($32)]; + var $34=(($33)&255); + var $35=(($34+16)|0); + $1=$35; + __label__ = 8; break; + case 7: + var $37=$2; + var $38=$37 & 255; + var $39=((STRING_TABLE._lzeroes+$38)|0); + var $40=HEAPU8[($39)]; + var $41=(($40)&255); + var $42=(($41+24)|0); + $1=$42; + __label__ = 8; break; + case 8: + var $44=$1; + ; + return $44; + default: assert(0, "bad label: " + __label__); + } +} +_cnt_l_zeroes["X"]=1; + +function _quic_one_corelate_0($curr, $corelate, $bpc_mask) { + ; + var __label__; + + var $1; + var $2; + var $3; + $1=$curr; + $2=$corelate; + $3=$bpc_mask; + var $4=$2; + var $5=(($4)&255); + var $6=((((_family_8bpc+384)|0)+($5<<2))|0); + var $7=HEAP32[(($6)>>2)]; + var $8=$1; + var $9=(($8-1)|0); + var $10=(($9)|0); + var $11=HEAPU8[($10)]; + var $12=(($11)&255); + var $13=(($7+$12)|0); + var $14=$3; + var $15=$13 & $14; + var $16=(($15) & 255); + var $17=$1; + var $18=(($17)|0); + HEAP8[($18)]=$16; + ; + return; +} + + +function _update_model_8bpc($state, $bucket, $curval, $bpp) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $pcounters; + var $i; + var $bestcode; + var $bestcodelen; + var $ithcodelen; + $1=$state; + $2=$bucket; + $3=$curval; + $4=$bpp; + var $5=$2; + var $6=(($5)|0); + var $7=HEAP32[(($6)>>2)]; + $pcounters=$7; + var $8=$4; + var $9=(($8-1)|0); + $bestcode=$9; + var $10=$3; + var $11=$bestcode; + var $12=_golomb_code_len_8bpc($10, $11); + var $13=$bestcode; + var $14=$pcounters; + var $15=(($14+($13<<2))|0); + var $16=HEAP32[(($15)>>2)]; + var $17=(($16+$12)|0); + HEAP32[(($15)>>2)]=$17; + $bestcodelen=$17; + var $18=$4; + var $19=(($18-2)|0); + $i=$19; + __label__ = 2; break; + case 2: + var $21=$i; + var $22=$4; + var $23=(($21)>>>0) < (($22)>>>0); + if ($23) { __label__ = 3; break; } else { __label__ = 7; break; } + case 3: + var $25=$3; + var $26=$i; + var $27=_golomb_code_len_8bpc($25, $26); + var $28=$i; + var $29=$pcounters; + var $30=(($29+($28<<2))|0); + var $31=HEAP32[(($30)>>2)]; + var $32=(($31+$27)|0); + HEAP32[(($30)>>2)]=$32; + $ithcodelen=$32; + var $33=$ithcodelen; + var $34=$bestcodelen; + var $35=(($33)>>>0) < (($34)>>>0); + if ($35) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $37=$i; + $bestcode=$37; + var $38=$ithcodelen; + $bestcodelen=$38; + __label__ = 5; break; + case 5: + __label__ = 6; break; + case 6: + var $41=$i; + var $42=(($41-1)|0); + $i=$42; + __label__ = 2; break; + case 7: + var $44=$bestcode; + var $45=$2; + var $46=(($45+4)|0); + HEAP32[(($46)>>2)]=$44; + var $47=$bestcodelen; + var $48=$1; + var $49=(($48+12)|0); + var $50=HEAPU32[(($49)>>2)]; + var $51=(($47)>>>0) > (($50)>>>0); + if ($51) { __label__ = 8; break; } else { __label__ = 13; break; } + case 8: + $i=0; + __label__ = 9; break; + case 9: + var $54=$i; + var $55=$4; + var $56=(($54)>>>0) < (($55)>>>0); + if ($56) { __label__ = 10; break; } else { __label__ = 12; break; } + case 10: + var $58=$i; + var $59=$pcounters; + var $60=(($59+($58<<2))|0); + var $61=HEAPU32[(($60)>>2)]; + var $62=$61 >>> 1; + HEAP32[(($60)>>2)]=$62; + __label__ = 11; break; + case 11: + var $64=$i; + var $65=(($64+1)|0); + $i=$65; + __label__ = 9; break; + case 12: + __label__ = 13; break; + case 13: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_update_model_8bpc["X"]=1; + +function _decode_channel_run($encoder, $channel) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $runlen; + var $temp; + var $hits; + $1=$encoder; + $2=$channel; + $runlen=0; + __label__ = 2; break; + case 2: + var $4=$1; + var $5=(($4+32)|0); + var $6=HEAPU32[(($5)>>2)]; + var $7=$6 >>> 24; + var $8=$7 ^ -1; + var $9=(($8) & 255); + var $10=(($9)&255); + var $11=((_zeroLUT+($10<<2))|0); + var $12=HEAP32[(($11)>>2)]; + $temp=$12; + $hits=1; + __label__ = 3; break; + case 3: + var $14=$hits; + var $15=$temp; + var $16=(($14)|0) <= (($15)|0); + if ($16) { __label__ = 4; break; } else { __label__ = 8; break; } + case 4: + var $18=$2; + var $19=(($18+40)|0); + var $20=(($19+32)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=$runlen; + var $23=(($22+$21)|0); + $runlen=$23; + var $24=$2; + var $25=(($24+40)|0); + var $26=(($25+24)|0); + var $27=HEAP32[(($26)>>2)]; + var $28=(($27)|0) < 32; + if ($28) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + var $30=$2; + var $31=(($30+40)|0); + var $32=(($31+24)|0); + var $33=HEAP32[(($32)>>2)]; + var $34=(($33+1)|0); + HEAP32[(($32)>>2)]=$34; + var $35=((_J+($34<<2))|0); + var $36=HEAP32[(($35)>>2)]; + var $37=$2; + var $38=(($37+40)|0); + var $39=(($38+28)|0); + HEAP32[(($39)>>2)]=$36; + var $40=$2; + var $41=(($40+40)|0); + var $42=(($41+28)|0); + var $43=HEAP32[(($42)>>2)]; + var $44=1 << $43; + var $45=$2; + var $46=(($45+40)|0); + var $47=(($46+32)|0); + HEAP32[(($47)>>2)]=$44; + __label__ = 6; break; + case 6: + __label__ = 7; break; + case 7: + var $50=$hits; + var $51=(($50+1)|0); + $hits=$51; + __label__ = 3; break; + case 8: + var $53=$temp; + var $54=(($53)|0)!=8; + if ($54) { __label__ = 9; break; } else { __label__ = 10; break; } + case 9: + var $56=$1; + var $57=$temp; + var $58=(($57+1)|0); + _decode_eatbits($56, $58); + __label__ = 12; break; + case 10: + var $60=$1; + _decode_eatbits($60, 8); + __label__ = 11; break; + case 11: + if (1) { __label__ = 2; break; } else { __label__ = 12; break; } + case 12: + var $63=$2; + var $64=(($63+40)|0); + var $65=(($64+28)|0); + var $66=HEAP32[(($65)>>2)]; + var $67=(($66)|0)!=0; + if ($67) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $69=$1; + var $70=(($69+32)|0); + var $71=HEAPU32[(($70)>>2)]; + var $72=$2; + var $73=(($72+40)|0); + var $74=(($73+28)|0); + var $75=HEAP32[(($74)>>2)]; + var $76=((32-$75)|0); + var $77=$71 >>> (($76)>>>0); + var $78=$runlen; + var $79=(($78+$77)|0); + $runlen=$79; + var $80=$1; + var $81=$2; + var $82=(($81+40)|0); + var $83=(($82+28)|0); + var $84=HEAP32[(($83)>>2)]; + _decode_eatbits($80, $84); + __label__ = 14; break; + case 14: + var $86=$2; + var $87=(($86+40)|0); + var $88=(($87+24)|0); + var $89=HEAP32[(($88)>>2)]; + var $90=(($89)|0)!=0; + if ($90) { __label__ = 15; break; } else { __label__ = 16; break; } + case 15: + var $92=$2; + var $93=(($92+40)|0); + var $94=(($93+24)|0); + var $95=HEAP32[(($94)>>2)]; + var $96=(($95-1)|0); + HEAP32[(($94)>>2)]=$96; + var $97=((_J+($96<<2))|0); + var $98=HEAP32[(($97)>>2)]; + var $99=$2; + var $100=(($99+40)|0); + var $101=(($100+28)|0); + HEAP32[(($101)>>2)]=$98; + var $102=$2; + var $103=(($102+40)|0); + var $104=(($103+28)|0); + var $105=HEAP32[(($104)>>2)]; + var $106=1 << $105; + var $107=$2; + var $108=(($107+40)|0); + var $109=(($108+32)|0); + HEAP32[(($109)>>2)]=$106; + __label__ = 16; break; + case 16: + var $111=$runlen; + ; + return $111; + default: assert(0, "bad label: " + __label__); + } +} +_decode_channel_run["X"]=1; + +function _read_io_word($encoder) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $_g_boolean_var_; + $1=$encoder; + var $2=$1; + var $3=(($2+40)|0); + var $4=HEAP32[(($3)>>2)]; + var $5=$1; + var $6=(($5+44)|0); + var $7=HEAP32[(($6)>>2)]; + var $8=(($4)|0)==(($7)|0); + if ($8) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $10=HEAP32[((___read_io_word_ptr)>>2)]; + var $11=$1; + FUNCTION_TABLE[$10]($11); + __label__ = 14; break; + case 3: + __label__ = 4; break; + case 4: + var $14=$1; + var $15=(($14+40)|0); + var $16=HEAPU32[(($15)>>2)]; + var $17=$1; + var $18=(($17+44)|0); + var $19=HEAPU32[(($18)>>2)]; + var $20=(($16)>>>0) < (($19)>>>0); + if ($20) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + $_g_boolean_var_=1; + __label__ = 7; break; + case 6: + $_g_boolean_var_=0; + __label__ = 7; break; + case 7: + var $24=$_g_boolean_var_; + var $25=(($24)==(1)); + var $26=(($25)|0)!=0; + if ($26) { __label__ = 8; break; } else { __label__ = 9; break; } + case 8: + __label__ = 12; break; + case 9: + __label__ = 10; break; + case 10: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str71)|0), ((STRING_TABLE.___FUNCTION___read_io_word)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str72)|0),tempInt)); + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $33=$1; + var $34=(($33+40)|0); + var $35=HEAP32[(($34)>>2)]; + var $36=(($35+4)|0); + HEAP32[(($34)>>2)]=$36; + var $37=HEAP32[(($35)>>2)]; + var $38=$1; + var $39=(($38+36)|0); + HEAP32[(($39)>>2)]=$37; + __label__ = 14; break; + case 14: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} + + +function ___read_io_word($encoder) { + ; + var __label__; + + var $1; + $1=$encoder; + var $2=$1; + _more_io_words($2); + var $3=$1; + var $4=(($3+40)|0); + var $5=HEAP32[(($4)>>2)]; + var $6=(($5+4)|0); + HEAP32[(($4)>>2)]=$6; + var $7=HEAP32[(($5)>>2)]; + var $8=$1; + var $9=(($8+36)|0); + HEAP32[(($9)>>2)]=$7; + ; + return; +} + + +function _more_io_words($encoder) { + var __stackBase__ = STACKTOP; STACKTOP += 4; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $io_ptr=__stackBase__; + var $num_io_words; + var $_g_boolean_var_; + $1=$encoder; + var $2=$1; + var $3=(($2)|0); + var $4=HEAP32[(($3)>>2)]; + var $5=(($4+20)|0); + var $6=HEAP32[(($5)>>2)]; + var $7=$1; + var $8=(($7)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=$1; + var $11=(($10+52)|0); + var $12=HEAP32[(($11)>>2)]; + var $13=FUNCTION_TABLE[$6]($9, $io_ptr, $12); + $num_io_words=$13; + var $14=$num_io_words; + var $15=(($14)|0) <= 0; + if ($15) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $17=$1; + var $18=(($17)|0); + var $19=HEAP32[(($18)>>2)]; + var $20=(($19)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=$1; + var $23=(($22)|0); + var $24=HEAP32[(($23)>>2)]; + FUNCTION_TABLE[$21]($24, ((STRING_TABLE.__str73)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.___FUNCTION___more_io_words)|0),tempInt)); + __label__ = 3; break; + case 3: + __label__ = 4; break; + case 4: + var $27=HEAP32[(($io_ptr)>>2)]; + var $28=(($27)|0)!=0; + if ($28) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + $_g_boolean_var_=1; + __label__ = 7; break; + case 6: + $_g_boolean_var_=0; + __label__ = 7; break; + case 7: + var $32=$_g_boolean_var_; + var $33=(($32)==(1)); + var $34=(($33)|0)!=0; + if ($34) { __label__ = 8; break; } else { __label__ = 9; break; } + case 8: + __label__ = 12; break; + case 9: + __label__ = 10; break; + case 10: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str74)|0), ((STRING_TABLE.___FUNCTION___more_io_words)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str75)|0),tempInt)); + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $41=$num_io_words; + var $42=$1; + var $43=(($42+48)|0); + var $44=HEAP32[(($43)>>2)]; + var $45=(($44+$41)|0); + HEAP32[(($43)>>2)]=$45; + var $46=HEAP32[(($io_ptr)>>2)]; + var $47=$1; + var $48=(($47+40)|0); + HEAP32[(($48)>>2)]=$46; + var $49=$1; + var $50=(($49+40)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$num_io_words; + var $53=(($51+($52<<2))|0); + var $54=$1; + var $55=(($54+44)|0); + HEAP32[(($55)>>2)]=$53; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_more_io_words["X"]=1; + +function _quic_one_uncompress_row0_seg($encoder, $channel, $i, $correlate_row, $cur_row, $end, $waitmask, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $stopidx; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $pbucket; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$channel; + $3=$i; + $4=$correlate_row; + $5=$cur_row; + $6=$end; + $7=$waitmask; + $8=$bpc; + $9=$bpc_mask; + __label__ = 2; break; + case 2: + var $11=$6; + var $12=$3; + var $13=(($11-$12)|0); + var $14=(($13)|0) > 0; + if ($14) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $18=$_g_boolean_var_; + var $19=(($18)==(1)); + var $20=(($19)|0)!=0; + if ($20) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str81)|0), ((STRING_TABLE.___FUNCTION___quic_one_uncompress_row0_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $27=$3; + var $28=(($27)|0)==0; + if ($28) { __label__ = 12; break; } else { __label__ = 16; break; } + case 12: + var $30=$2; + var $31=$4; + var $32=(($31-1)|0); + var $33=HEAPU8[($32)]; + var $34=(($33)&255); + var $35=_find_bucket_8bpc($30, $34); + var $36=(($35+4)|0); + var $37=HEAP32[(($36)>>2)]; + var $38=$1; + var $39=(($38+32)|0); + var $40=HEAP32[(($39)>>2)]; + var $41=_golomb_decoding_8bpc($37, $40, $codewordlen); + var $42=(($41) & 255); + var $43=$4; + var $44=(($43)|0); + HEAP8[($44)]=$42; + var $45=$4; + var $46=(($45)|0); + var $47=HEAPU8[($46)]; + var $48=(($47)&255); + var $49=((((_family_8bpc+384)|0)+($48<<2))|0); + var $50=HEAP32[(($49)>>2)]; + var $51=(($50) & 255); + var $52=$5; + var $53=(($52)|0); + var $54=(($53)|0); + HEAP8[($54)]=$51; + var $55=$1; + var $56=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($55, $56); + var $57=$2; + var $58=(($57+40)|0); + var $59=(($58+4)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=(($60)|0)!=0; + if ($61) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $63=$2; + var $64=(($63+40)|0); + var $65=(($64+4)|0); + var $66=HEAP32[(($65)>>2)]; + var $67=(($66-1)|0); + HEAP32[(($65)>>2)]=$67; + __label__ = 15; break; + case 14: + var $69=$2; + var $70=(($69+40)|0); + var $71=(($70+8)|0); + var $72=_tabrand($71); + var $73=$7; + var $74=$72 & $73; + var $75=$2; + var $76=(($75+40)|0); + var $77=(($76+4)|0); + HEAP32[(($77)>>2)]=$74; + var $78=$2; + var $79=(($78+40)|0); + var $80=$2; + var $81=$4; + var $82=(($81-1)|0); + var $83=HEAPU8[($82)]; + var $84=(($83)&255); + var $85=_find_bucket_8bpc($80, $84); + var $86=$4; + var $87=(($86)|0); + var $88=HEAP8[($87)]; + var $89=$8; + _update_model_8bpc($79, $85, $88, $89); + __label__ = 15; break; + case 15: + var $91=$3; + var $92=(($91+1)|0); + $3=$92; + var $93=$2; + var $94=(($93+40)|0); + var $95=(($94+4)|0); + var $96=HEAP32[(($95)>>2)]; + var $97=(($92+$96)|0); + $stopidx=$97; + __label__ = 17; break; + case 16: + var $99=$3; + var $100=$2; + var $101=(($100+40)|0); + var $102=(($101+4)|0); + var $103=HEAP32[(($102)>>2)]; + var $104=(($99+$103)|0); + $stopidx=$104; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + var $107=$stopidx; + var $108=$6; + var $109=(($107)|0) < (($108)|0); + if ($109) { __label__ = 19; break; } else { __label__ = 24; break; } + case 19: + $pbucket=0; + __label__ = 20; break; + case 20: + var $112=$3; + var $113=$stopidx; + var $114=(($112)|0) <= (($113)|0); + if ($114) { __label__ = 21; break; } else { __label__ = 23; break; } + case 21: + var $116=$2; + var $117=$3; + var $118=(($117-1)|0); + var $119=$4; + var $120=(($119+$118)|0); + var $121=HEAPU8[($120)]; + var $122=(($121)&255); + var $123=_find_bucket_8bpc($116, $122); + $pbucket=$123; + var $124=$pbucket; + var $125=(($124+4)|0); + var $126=HEAP32[(($125)>>2)]; + var $127=$1; + var $128=(($127+32)|0); + var $129=HEAP32[(($128)>>2)]; + var $130=_golomb_decoding_8bpc($126, $129, $codewordlen1); + var $131=(($130) & 255); + var $132=$3; + var $133=$4; + var $134=(($133+$132)|0); + HEAP8[($134)]=$131; + var $135=$3; + var $136=$5; + var $137=(($136+$135)|0); + var $138=$3; + var $139=$4; + var $140=(($139+$138)|0); + var $141=HEAP8[($140)]; + var $142=$9; + _quic_one_corelate_0($137, $141, $142); + var $143=$1; + var $144=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($143, $144); + __label__ = 22; break; + case 22: + var $146=$3; + var $147=(($146+1)|0); + $3=$147; + __label__ = 20; break; + case 23: + var $149=$2; + var $150=(($149+40)|0); + var $151=$pbucket; + var $152=$stopidx; + var $153=$4; + var $154=(($153+$152)|0); + var $155=HEAP8[($154)]; + var $156=$8; + _update_model_8bpc($150, $151, $155, $156); + var $157=$3; + var $158=$2; + var $159=(($158+40)|0); + var $160=(($159+8)|0); + var $161=_tabrand($160); + var $162=$7; + var $163=$161 & $162; + var $164=(($157+$163)|0); + $stopidx=$164; + __label__ = 18; break; + case 24: + __label__ = 25; break; + case 25: + var $167=$3; + var $168=$6; + var $169=(($167)|0) < (($168)|0); + if ($169) { __label__ = 26; break; } else { __label__ = 28; break; } + case 26: + var $171=$2; + var $172=$3; + var $173=(($172-1)|0); + var $174=$4; + var $175=(($174+$173)|0); + var $176=HEAPU8[($175)]; + var $177=(($176)&255); + var $178=_find_bucket_8bpc($171, $177); + var $179=(($178+4)|0); + var $180=HEAP32[(($179)>>2)]; + var $181=$1; + var $182=(($181+32)|0); + var $183=HEAP32[(($182)>>2)]; + var $184=_golomb_decoding_8bpc($180, $183, $codewordlen2); + var $185=(($184) & 255); + var $186=$3; + var $187=$4; + var $188=(($187+$186)|0); + HEAP8[($188)]=$185; + var $189=$3; + var $190=$5; + var $191=(($190+$189)|0); + var $192=$3; + var $193=$4; + var $194=(($193+$192)|0); + var $195=HEAP8[($194)]; + var $196=$9; + _quic_one_corelate_0($191, $195, $196); + var $197=$1; + var $198=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($197, $198); + __label__ = 27; break; + case 27: + var $200=$3; + var $201=(($200+1)|0); + $3=$201; + __label__ = 25; break; + case 28: + var $203=$stopidx; + var $204=$6; + var $205=(($203-$204)|0); + var $206=$2; + var $207=(($206+40)|0); + var $208=(($207+4)|0); + HEAP32[(($208)>>2)]=$205; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_one_uncompress_row0_seg["X"]=1; + +function _quic_four_uncompress_row0($encoder, $channel, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $bpc; + var $bpc_mask; + var $correlate_row; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$channel; + $3=$cur_row; + $4=$width; + $bpc=8; + $bpc_mask=255; + var $5=$2; + var $6=(($5+8)|0); + var $7=HEAP32[(($6)>>2)]; + $correlate_row=$7; + $pos=0; + __label__ = 2; break; + case 2: + var $9=HEAP32[((_wmimax)>>2)]; + var $10=$2; + var $11=(($10+40)|0); + var $12=(($11+16)|0); + var $13=HEAP32[(($12)>>2)]; + var $14=(($9)|0) > (($13)|0); + if ($14) { __label__ = 3; break; } else { var $23 = 0;__label__ = 4; break; } + case 3: + var $16=$2; + var $17=(($16+40)|0); + var $18=(($17+20)|0); + var $19=HEAPU32[(($18)>>2)]; + var $20=$4; + var $21=(($19)>>>0) <= (($20)>>>0); + var $23 = $21;__label__ = 4; break; + case 4: + var $23; + if ($23) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $25=$2; + var $26=(($25+40)|0); + var $27=(($26+20)|0); + var $28=HEAP32[(($27)>>2)]; + var $29=(($28)|0)!=0; + if ($29) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $31=$1; + var $32=$2; + var $33=$pos; + var $34=$correlate_row; + var $35=$3; + var $36=$pos; + var $37=$2; + var $38=(($37+40)|0); + var $39=(($38+20)|0); + var $40=HEAP32[(($39)>>2)]; + var $41=(($36+$40)|0); + var $42=$2; + var $43=(($42+40)|0); + var $44=(($43+16)|0); + var $45=HEAP32[(($44)>>2)]; + var $46=((_bppmask+($45<<2))|0); + var $47=HEAP32[(($46)>>2)]; + _quic_four_uncompress_row0_seg($31, $32, $33, $34, $35, $41, $47, 8, 255); + var $48=$2; + var $49=(($48+40)|0); + var $50=(($49+20)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$pos; + var $53=(($52+$51)|0); + $pos=$53; + var $54=$2; + var $55=(($54+40)|0); + var $56=(($55+20)|0); + var $57=HEAP32[(($56)>>2)]; + var $58=$4; + var $59=(($58-$57)|0); + $4=$59; + __label__ = 7; break; + case 7: + var $61=$2; + var $62=(($61+40)|0); + var $63=(($62+16)|0); + var $64=HEAP32[(($63)>>2)]; + var $65=(($64+1)|0); + HEAP32[(($63)>>2)]=$65; + var $66=$2; + var $67=(($66+40)|0); + _set_wm_trigger($67); + var $68=HEAP32[((_wminext)>>2)]; + var $69=$2; + var $70=(($69+40)|0); + var $71=(($70+20)|0); + HEAP32[(($71)>>2)]=$68; + __label__ = 2; break; + case 8: + var $73=$4; + var $74=(($73)|0)!=0; + if ($74) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $76=$1; + var $77=$2; + var $78=$pos; + var $79=$correlate_row; + var $80=$3; + var $81=$pos; + var $82=$4; + var $83=(($81+$82)|0); + var $84=$2; + var $85=(($84+40)|0); + var $86=(($85+16)|0); + var $87=HEAP32[(($86)>>2)]; + var $88=((_bppmask+($87<<2))|0); + var $89=HEAP32[(($88)>>2)]; + _quic_four_uncompress_row0_seg($76, $77, $78, $79, $80, $83, $89, 8, 255); + var $90=HEAP32[((_wmimax)>>2)]; + var $91=$2; + var $92=(($91+40)|0); + var $93=(($92+16)|0); + var $94=HEAP32[(($93)>>2)]; + var $95=(($90)|0) > (($94)|0); + if ($95) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $97=$4; + var $98=$2; + var $99=(($98+40)|0); + var $100=(($99+20)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=(($101-$97)|0); + HEAP32[(($100)>>2)]=$102; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $106=$2; + var $107=(($106+40)|0); + var $108=(($107+16)|0); + var $109=HEAP32[(($108)>>2)]; + var $110=HEAP32[((_wmimax)>>2)]; + var $111=(($109)|0) <= (($110)|0); + if ($111) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $115=$_g_boolean_var_; + var $116=(($115)==(1)); + var $117=(($116)|0)!=0; + if ($117) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str78)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str56)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $125=$2; + var $126=(($125+40)|0); + var $127=(($126+16)|0); + var $128=HEAPU32[(($127)>>2)]; + var $129=(($128)>>>0) <= 32; + if ($129) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $133=$_g_boolean_var_1; + var $134=(($133)==(1)); + var $135=(($134)|0)!=0; + if ($135) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str79)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str58)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $143=HEAP32[((_wminext)>>2)]; + var $144=(($143)|0) > 0; + if ($144) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $148=$_g_boolean_var_2; + var $149=(($148)==(1)); + var $150=(($149)|0)!=0; + if ($150) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str80)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row0)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_four_uncompress_row0["X"]=1; + +function _quic_four_uncompress_row($encoder, $channel, $prev_row, $cur_row, $width) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $bpc; + var $bpc_mask; + var $correlate_row; + var $pos; + var $_g_boolean_var_; + var $_g_boolean_var_1; + var $_g_boolean_var_2; + $1=$encoder; + $2=$channel; + $3=$prev_row; + $4=$cur_row; + $5=$width; + $bpc=8; + $bpc_mask=255; + var $6=$2; + var $7=(($6+8)|0); + var $8=HEAP32[(($7)>>2)]; + $correlate_row=$8; + $pos=0; + __label__ = 2; break; + case 2: + var $10=HEAP32[((_wmimax)>>2)]; + var $11=$2; + var $12=(($11+40)|0); + var $13=(($12+16)|0); + var $14=HEAP32[(($13)>>2)]; + var $15=(($10)|0) > (($14)|0); + if ($15) { __label__ = 3; break; } else { var $24 = 0;__label__ = 4; break; } + case 3: + var $17=$2; + var $18=(($17+40)|0); + var $19=(($18+20)|0); + var $20=HEAPU32[(($19)>>2)]; + var $21=$5; + var $22=(($20)>>>0) <= (($21)>>>0); + var $24 = $22;__label__ = 4; break; + case 4: + var $24; + if ($24) { __label__ = 5; break; } else { __label__ = 8; break; } + case 5: + var $26=$2; + var $27=(($26+40)|0); + var $28=(($27+20)|0); + var $29=HEAP32[(($28)>>2)]; + var $30=(($29)|0)!=0; + if ($30) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + var $32=$1; + var $33=$2; + var $34=$correlate_row; + var $35=$3; + var $36=$4; + var $37=$pos; + var $38=$pos; + var $39=$2; + var $40=(($39+40)|0); + var $41=(($40+20)|0); + var $42=HEAP32[(($41)>>2)]; + var $43=(($38+$42)|0); + _quic_four_uncompress_row_seg($32, $33, $34, $35, $36, $37, $43, 8, 255); + var $44=$2; + var $45=(($44+40)|0); + var $46=(($45+20)|0); + var $47=HEAP32[(($46)>>2)]; + var $48=$pos; + var $49=(($48+$47)|0); + $pos=$49; + var $50=$2; + var $51=(($50+40)|0); + var $52=(($51+20)|0); + var $53=HEAP32[(($52)>>2)]; + var $54=$5; + var $55=(($54-$53)|0); + $5=$55; + __label__ = 7; break; + case 7: + var $57=$2; + var $58=(($57+40)|0); + var $59=(($58+16)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=(($60+1)|0); + HEAP32[(($59)>>2)]=$61; + var $62=$2; + var $63=(($62+40)|0); + _set_wm_trigger($63); + var $64=HEAP32[((_wminext)>>2)]; + var $65=$2; + var $66=(($65+40)|0); + var $67=(($66+20)|0); + HEAP32[(($67)>>2)]=$64; + __label__ = 2; break; + case 8: + var $69=$5; + var $70=(($69)|0)!=0; + if ($70) { __label__ = 9; break; } else { __label__ = 12; break; } + case 9: + var $72=$1; + var $73=$2; + var $74=$correlate_row; + var $75=$3; + var $76=$4; + var $77=$pos; + var $78=$pos; + var $79=$5; + var $80=(($78+$79)|0); + _quic_four_uncompress_row_seg($72, $73, $74, $75, $76, $77, $80, 8, 255); + var $81=HEAP32[((_wmimax)>>2)]; + var $82=$2; + var $83=(($82+40)|0); + var $84=(($83+16)|0); + var $85=HEAP32[(($84)>>2)]; + var $86=(($81)|0) > (($85)|0); + if ($86) { __label__ = 10; break; } else { __label__ = 11; break; } + case 10: + var $88=$5; + var $89=$2; + var $90=(($89+40)|0); + var $91=(($90+20)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=(($92-$88)|0); + HEAP32[(($91)>>2)]=$93; + __label__ = 11; break; + case 11: + __label__ = 12; break; + case 12: + __label__ = 13; break; + case 13: + var $97=$2; + var $98=(($97+40)|0); + var $99=(($98+16)|0); + var $100=HEAP32[(($99)>>2)]; + var $101=HEAP32[((_wmimax)>>2)]; + var $102=(($100)|0) <= (($101)|0); + if ($102) { __label__ = 14; break; } else { __label__ = 15; break; } + case 14: + $_g_boolean_var_=1; + __label__ = 16; break; + case 15: + $_g_boolean_var_=0; + __label__ = 16; break; + case 16: + var $106=$_g_boolean_var_; + var $107=(($106)==(1)); + var $108=(($107)|0)!=0; + if ($108) { __label__ = 17; break; } else { __label__ = 18; break; } + case 17: + __label__ = 21; break; + case 18: + __label__ = 19; break; + case 19: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str55)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str56)|0),tempInt)); + __label__ = 20; break; + case 20: + __label__ = 21; break; + case 21: + __label__ = 22; break; + case 22: + __label__ = 23; break; + case 23: + var $116=$2; + var $117=(($116+40)|0); + var $118=(($117+16)|0); + var $119=HEAPU32[(($118)>>2)]; + var $120=(($119)>>>0) <= 32; + if ($120) { __label__ = 24; break; } else { __label__ = 25; break; } + case 24: + $_g_boolean_var_1=1; + __label__ = 26; break; + case 25: + $_g_boolean_var_1=0; + __label__ = 26; break; + case 26: + var $124=$_g_boolean_var_1; + var $125=(($124)==(1)); + var $126=(($125)|0)!=0; + if ($126) { __label__ = 27; break; } else { __label__ = 28; break; } + case 27: + __label__ = 31; break; + case 28: + __label__ = 29; break; + case 29: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str57)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str58)|0),tempInt)); + __label__ = 30; break; + case 30: + __label__ = 31; break; + case 31: + __label__ = 32; break; + case 32: + __label__ = 33; break; + case 33: + var $134=HEAP32[((_wminext)>>2)]; + var $135=(($134)|0) > 0; + if ($135) { __label__ = 34; break; } else { __label__ = 35; break; } + case 34: + $_g_boolean_var_2=1; + __label__ = 36; break; + case 35: + $_g_boolean_var_2=0; + __label__ = 36; break; + case 36: + var $139=$_g_boolean_var_2; + var $140=(($139)==(1)); + var $141=(($140)|0)!=0; + if ($141) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 41; break; + case 38: + __label__ = 39; break; + case 39: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str59)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str60)|0),tempInt)); + __label__ = 40; break; + case 40: + __label__ = 41; break; + case 41: + __label__ = 42; break; + case 42: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_four_uncompress_row["X"]=1; + +function _quic_four_corelate($prev, $curr, $corelate, $bpc_mask) { + ; + var __label__; + + var $1; + var $2; + var $3; + var $4; + $1=$prev; + $2=$curr; + $3=$corelate; + $4=$bpc_mask; + var $5=$3; + var $6=(($5)&255); + var $7=((((_family_8bpc+384)|0)+($6<<2))|0); + var $8=HEAP32[(($7)>>2)]; + var $9=$2; + var $10=(($9-4)|0); + var $11=(($10)|0); + var $12=HEAPU8[($11)]; + var $13=(($12)&255); + var $14=$1; + var $15=(($14)|0); + var $16=(($15)|0); + var $17=HEAPU8[($16)]; + var $18=(($17)&255); + var $19=(($13+$18)|0); + var $20=$19 >>> 1; + var $21=(($8+$20)|0); + var $22=$4; + var $23=$21 & $22; + var $24=(($23) & 255); + var $25=$2; + var $26=(($25)|0); + HEAP8[($26)]=$24; + ; + return; +} + + +function _quic_four_corelate_0($curr, $corelate, $bpc_mask) { + ; + var __label__; + + var $1; + var $2; + var $3; + $1=$curr; + $2=$corelate; + $3=$bpc_mask; + var $4=$2; + var $5=(($4)&255); + var $6=((((_family_8bpc+384)|0)+($5<<2))|0); + var $7=HEAP32[(($6)>>2)]; + var $8=$1; + var $9=(($8-4)|0); + var $10=(($9)|0); + var $11=HEAPU8[($10)]; + var $12=(($11)&255); + var $13=(($7+$12)|0); + var $14=$3; + var $15=$13 & $14; + var $16=(($15) & 255); + var $17=$1; + var $18=(($17)|0); + HEAP8[($18)]=$16; + ; + return; +} + + +function _quic_four_uncompress_row_seg($encoder, $channel, $correlate_row, $prev_row, $cur_row, $i, $end, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $waitmask; + var $stopidx; + var $run_index; + var $run_end; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $pbucket; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$channel; + $3=$correlate_row; + $4=$prev_row; + $5=$cur_row; + $6=$i; + $7=$end; + $8=$bpc; + $9=$bpc_mask; + var $10=$2; + var $11=(($10+40)|0); + var $12=(($11+16)|0); + var $13=HEAP32[(($12)>>2)]; + var $14=((_bppmask+($13<<2))|0); + var $15=HEAP32[(($14)>>2)]; + $waitmask=$15; + $run_index=0; + __label__ = 2; break; + case 2: + var $17=$7; + var $18=$6; + var $19=(($17-$18)|0); + var $20=(($19)|0) > 0; + if ($20) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $24=$_g_boolean_var_; + var $25=(($24)==(1)); + var $26=(($25)|0)!=0; + if ($26) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str67)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $33=$6; + var $34=(($33)|0)==0; + if ($34) { __label__ = 12; break; } else { __label__ = 16; break; } + case 12: + var $36=$2; + var $37=$3; + var $38=(($37-1)|0); + var $39=HEAPU8[($38)]; + var $40=(($39)&255); + var $41=_find_bucket_8bpc($36, $40); + var $42=(($41+4)|0); + var $43=HEAP32[(($42)>>2)]; + var $44=$1; + var $45=(($44+32)|0); + var $46=HEAP32[(($45)>>2)]; + var $47=_golomb_decoding_8bpc($43, $46, $codewordlen); + var $48=(($47) & 255); + var $49=$3; + var $50=(($49)|0); + HEAP8[($50)]=$48; + var $51=$3; + var $52=(($51)|0); + var $53=HEAPU8[($52)]; + var $54=(($53)&255); + var $55=((((_family_8bpc+384)|0)+($54<<2))|0); + var $56=HEAP32[(($55)>>2)]; + var $57=$4; + var $58=(($57)|0); + var $59=(($58)|0); + var $60=HEAPU8[($59)]; + var $61=(($60)&255); + var $62=(($56+$61)|0); + var $63=$9; + var $64=$62 & $63; + var $65=(($64) & 255); + var $66=$5; + var $67=(($66)|0); + var $68=(($67)|0); + HEAP8[($68)]=$65; + var $69=$1; + var $70=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($69, $70); + var $71=$2; + var $72=(($71+40)|0); + var $73=(($72+4)|0); + var $74=HEAP32[(($73)>>2)]; + var $75=(($74)|0)!=0; + if ($75) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $77=$2; + var $78=(($77+40)|0); + var $79=(($78+4)|0); + var $80=HEAP32[(($79)>>2)]; + var $81=(($80-1)|0); + HEAP32[(($79)>>2)]=$81; + __label__ = 15; break; + case 14: + var $83=$2; + var $84=(($83+40)|0); + var $85=(($84+8)|0); + var $86=_tabrand($85); + var $87=$waitmask; + var $88=$86 & $87; + var $89=$2; + var $90=(($89+40)|0); + var $91=(($90+4)|0); + HEAP32[(($91)>>2)]=$88; + var $92=$2; + var $93=(($92+40)|0); + var $94=$2; + var $95=$3; + var $96=(($95-1)|0); + var $97=HEAPU8[($96)]; + var $98=(($97)&255); + var $99=_find_bucket_8bpc($94, $98); + var $100=$3; + var $101=(($100)|0); + var $102=HEAP8[($101)]; + var $103=$8; + _update_model_8bpc($93, $99, $102, $103); + __label__ = 15; break; + case 15: + var $105=$6; + var $106=(($105+1)|0); + $6=$106; + var $107=$2; + var $108=(($107+40)|0); + var $109=(($108+4)|0); + var $110=HEAP32[(($109)>>2)]; + var $111=(($106+$110)|0); + $stopidx=$111; + __label__ = 17; break; + case 16: + var $113=$6; + var $114=$2; + var $115=(($114+40)|0); + var $116=(($115+4)|0); + var $117=HEAP32[(($116)>>2)]; + var $118=(($113+$117)|0); + $stopidx=$118; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + var $122=$stopidx; + var $123=$7; + var $124=(($122)|0) < (($123)|0); + if ($124) { __label__ = 20; break; } else { __label__ = 31; break; } + case 20: + $pbucket=0; + __label__ = 21; break; + case 21: + var $127=$6; + var $128=$stopidx; + var $129=(($127)|0) <= (($128)|0); + if ($129) { __label__ = 22; break; } else { __label__ = 30; break; } + case 22: + var $131=$6; + var $132=(($131-1)|0); + var $133=$4; + var $134=(($133+($132<<2))|0); + var $135=(($134)|0); + var $136=HEAPU8[($135)]; + var $137=(($136)&255); + var $138=$6; + var $139=$4; + var $140=(($139+($138<<2))|0); + var $141=(($140)|0); + var $142=HEAPU8[($141)]; + var $143=(($142)&255); + var $144=(($137)|0)==(($143)|0); + if ($144) { __label__ = 23; break; } else { __label__ = 28; break; } + case 23: + var $146=$run_index; + var $147=$6; + var $148=(($146)|0)!=(($147)|0); + if ($148) { __label__ = 24; break; } else { __label__ = 27; break; } + case 24: + var $150=$6; + var $151=(($150)|0) > 2; + if ($151) { __label__ = 25; break; } else { __label__ = 27; break; } + case 25: + var $153=$6; + var $154=(($153-1)|0); + var $155=$5; + var $156=(($155+($154<<2))|0); + var $157=(($156)|0); + var $158=HEAPU8[($157)]; + var $159=(($158)&255); + var $160=$6; + var $161=(($160-2)|0); + var $162=$5; + var $163=(($162+($161<<2))|0); + var $164=(($163)|0); + var $165=HEAPU8[($164)]; + var $166=(($165)&255); + var $167=(($159)|0)==(($166)|0); + if ($167) { __label__ = 26; break; } else { __label__ = 27; break; } + case 26: + __label__ = 42; break; + case 27: + __label__ = 28; break; + case 28: + var $171=$2; + var $172=$6; + var $173=(($172-1)|0); + var $174=$3; + var $175=(($174+$173)|0); + var $176=HEAPU8[($175)]; + var $177=(($176)&255); + var $178=_find_bucket_8bpc($171, $177); + $pbucket=$178; + var $179=$pbucket; + var $180=(($179+4)|0); + var $181=HEAP32[(($180)>>2)]; + var $182=$1; + var $183=(($182+32)|0); + var $184=HEAP32[(($183)>>2)]; + var $185=_golomb_decoding_8bpc($181, $184, $codewordlen1); + var $186=(($185) & 255); + var $187=$6; + var $188=$3; + var $189=(($188+$187)|0); + HEAP8[($189)]=$186; + var $190=$6; + var $191=$4; + var $192=(($191+($190<<2))|0); + var $193=$6; + var $194=$5; + var $195=(($194+($193<<2))|0); + var $196=$6; + var $197=$3; + var $198=(($197+$196)|0); + var $199=HEAP8[($198)]; + var $200=$9; + _quic_four_corelate($192, $195, $199, $200); + var $201=$1; + var $202=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($201, $202); + __label__ = 29; break; + case 29: + var $204=$6; + var $205=(($204+1)|0); + $6=$205; + __label__ = 21; break; + case 30: + var $207=$2; + var $208=(($207+40)|0); + var $209=$pbucket; + var $210=$stopidx; + var $211=$3; + var $212=(($211+$210)|0); + var $213=HEAP8[($212)]; + var $214=$8; + _update_model_8bpc($208, $209, $213, $214); + var $215=$6; + var $216=$2; + var $217=(($216+40)|0); + var $218=(($217+8)|0); + var $219=_tabrand($218); + var $220=$waitmask; + var $221=$219 & $220; + var $222=(($215+$221)|0); + $stopidx=$222; + __label__ = 19; break; + case 31: + __label__ = 32; break; + case 32: + var $225=$6; + var $226=$7; + var $227=(($225)|0) < (($226)|0); + if ($227) { __label__ = 33; break; } else { __label__ = 41; break; } + case 33: + var $229=$6; + var $230=(($229-1)|0); + var $231=$4; + var $232=(($231+($230<<2))|0); + var $233=(($232)|0); + var $234=HEAPU8[($233)]; + var $235=(($234)&255); + var $236=$6; + var $237=$4; + var $238=(($237+($236<<2))|0); + var $239=(($238)|0); + var $240=HEAPU8[($239)]; + var $241=(($240)&255); + var $242=(($235)|0)==(($241)|0); + if ($242) { __label__ = 34; break; } else { __label__ = 39; break; } + case 34: + var $244=$run_index; + var $245=$6; + var $246=(($244)|0)!=(($245)|0); + if ($246) { __label__ = 35; break; } else { __label__ = 38; break; } + case 35: + var $248=$6; + var $249=(($248)|0) > 2; + if ($249) { __label__ = 36; break; } else { __label__ = 38; break; } + case 36: + var $251=$6; + var $252=(($251-1)|0); + var $253=$5; + var $254=(($253+($252<<2))|0); + var $255=(($254)|0); + var $256=HEAPU8[($255)]; + var $257=(($256)&255); + var $258=$6; + var $259=(($258-2)|0); + var $260=$5; + var $261=(($260+($259<<2))|0); + var $262=(($261)|0); + var $263=HEAPU8[($262)]; + var $264=(($263)&255); + var $265=(($257)|0)==(($264)|0); + if ($265) { __label__ = 37; break; } else { __label__ = 38; break; } + case 37: + __label__ = 42; break; + case 38: + __label__ = 39; break; + case 39: + var $269=$2; + var $270=$6; + var $271=(($270-1)|0); + var $272=$3; + var $273=(($272+$271)|0); + var $274=HEAPU8[($273)]; + var $275=(($274)&255); + var $276=_find_bucket_8bpc($269, $275); + var $277=(($276+4)|0); + var $278=HEAP32[(($277)>>2)]; + var $279=$1; + var $280=(($279+32)|0); + var $281=HEAP32[(($280)>>2)]; + var $282=_golomb_decoding_8bpc($278, $281, $codewordlen2); + var $283=(($282) & 255); + var $284=$6; + var $285=$3; + var $286=(($285+$284)|0); + HEAP8[($286)]=$283; + var $287=$6; + var $288=$4; + var $289=(($288+($287<<2))|0); + var $290=$6; + var $291=$5; + var $292=(($291+($290<<2))|0); + var $293=$6; + var $294=$3; + var $295=(($294+$293)|0); + var $296=HEAP8[($295)]; + var $297=$9; + _quic_four_corelate($289, $292, $296, $297); + var $298=$1; + var $299=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($298, $299); + __label__ = 40; break; + case 40: + var $301=$6; + var $302=(($301+1)|0); + $6=$302; + __label__ = 32; break; + case 41: + var $304=$stopidx; + var $305=$7; + var $306=(($304-$305)|0); + var $307=$2; + var $308=(($307+40)|0); + var $309=(($308+4)|0); + HEAP32[(($309)>>2)]=$306; + __label__ = 49; break; + case 42: + var $311=$stopidx; + var $312=$6; + var $313=(($311-$312)|0); + var $314=$2; + var $315=(($314+40)|0); + var $316=(($315+4)|0); + HEAP32[(($316)>>2)]=$313; + var $317=$6; + $run_index=$317; + var $318=$6; + var $319=$1; + var $320=$2; + var $321=_decode_channel_run($319, $320); + var $322=(($318+$321)|0); + $run_end=$322; + __label__ = 43; break; + case 43: + var $324=$6; + var $325=$run_end; + var $326=(($324)|0) < (($325)|0); + if ($326) { __label__ = 44; break; } else { __label__ = 46; break; } + case 44: + var $328=$6; + var $329=(($328-1)|0); + var $330=$5; + var $331=(($330+($329<<2))|0); + var $332=(($331)|0); + var $333=HEAP8[($332)]; + var $334=$6; + var $335=$5; + var $336=(($335+($334<<2))|0); + var $337=(($336)|0); + HEAP8[($337)]=$333; + __label__ = 45; break; + case 45: + var $339=$6; + var $340=(($339+1)|0); + $6=$340; + __label__ = 43; break; + case 46: + var $342=$6; + var $343=$7; + var $344=(($342)|0)==(($343)|0); + if ($344) { __label__ = 47; break; } else { __label__ = 48; break; } + case 47: + __label__ = 49; break; + case 48: + var $347=$6; + var $348=$2; + var $349=(($348+40)|0); + var $350=(($349+4)|0); + var $351=HEAP32[(($350)>>2)]; + var $352=(($347+$351)|0); + $stopidx=$352; + __label__ = 18; break; + case 49: + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_four_uncompress_row_seg["X"]=1; + +function _quic_four_uncompress_row0_seg($encoder, $channel, $i, $correlate_row, $cur_row, $end, $waitmask, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $8; + var $9; + var $stopidx; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $pbucket; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$channel; + $3=$i; + $4=$correlate_row; + $5=$cur_row; + $6=$end; + $7=$waitmask; + $8=$bpc; + $9=$bpc_mask; + __label__ = 2; break; + case 2: + var $11=$6; + var $12=$3; + var $13=(($11-$12)|0); + var $14=(($13)|0) > 0; + if ($14) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $18=$_g_boolean_var_; + var $19=(($18)==(1)); + var $20=(($19)|0)!=0; + if ($20) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str81)|0), ((STRING_TABLE.___FUNCTION___quic_four_uncompress_row0_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $27=$3; + var $28=(($27)|0)==0; + if ($28) { __label__ = 12; break; } else { __label__ = 16; break; } + case 12: + var $30=$2; + var $31=$4; + var $32=(($31-1)|0); + var $33=HEAPU8[($32)]; + var $34=(($33)&255); + var $35=_find_bucket_8bpc($30, $34); + var $36=(($35+4)|0); + var $37=HEAP32[(($36)>>2)]; + var $38=$1; + var $39=(($38+32)|0); + var $40=HEAP32[(($39)>>2)]; + var $41=_golomb_decoding_8bpc($37, $40, $codewordlen); + var $42=(($41) & 255); + var $43=$4; + var $44=(($43)|0); + HEAP8[($44)]=$42; + var $45=$4; + var $46=(($45)|0); + var $47=HEAPU8[($46)]; + var $48=(($47)&255); + var $49=((((_family_8bpc+384)|0)+($48<<2))|0); + var $50=HEAP32[(($49)>>2)]; + var $51=(($50) & 255); + var $52=$5; + var $53=(($52)|0); + var $54=(($53)|0); + HEAP8[($54)]=$51; + var $55=$1; + var $56=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($55, $56); + var $57=$2; + var $58=(($57+40)|0); + var $59=(($58+4)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=(($60)|0)!=0; + if ($61) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $63=$2; + var $64=(($63+40)|0); + var $65=(($64+4)|0); + var $66=HEAP32[(($65)>>2)]; + var $67=(($66-1)|0); + HEAP32[(($65)>>2)]=$67; + __label__ = 15; break; + case 14: + var $69=$2; + var $70=(($69+40)|0); + var $71=(($70+8)|0); + var $72=_tabrand($71); + var $73=$7; + var $74=$72 & $73; + var $75=$2; + var $76=(($75+40)|0); + var $77=(($76+4)|0); + HEAP32[(($77)>>2)]=$74; + var $78=$2; + var $79=(($78+40)|0); + var $80=$2; + var $81=$4; + var $82=(($81-1)|0); + var $83=HEAPU8[($82)]; + var $84=(($83)&255); + var $85=_find_bucket_8bpc($80, $84); + var $86=$4; + var $87=(($86)|0); + var $88=HEAP8[($87)]; + var $89=$8; + _update_model_8bpc($79, $85, $88, $89); + __label__ = 15; break; + case 15: + var $91=$3; + var $92=(($91+1)|0); + $3=$92; + var $93=$2; + var $94=(($93+40)|0); + var $95=(($94+4)|0); + var $96=HEAP32[(($95)>>2)]; + var $97=(($92+$96)|0); + $stopidx=$97; + __label__ = 17; break; + case 16: + var $99=$3; + var $100=$2; + var $101=(($100+40)|0); + var $102=(($101+4)|0); + var $103=HEAP32[(($102)>>2)]; + var $104=(($99+$103)|0); + $stopidx=$104; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + var $107=$stopidx; + var $108=$6; + var $109=(($107)|0) < (($108)|0); + if ($109) { __label__ = 19; break; } else { __label__ = 24; break; } + case 19: + $pbucket=0; + __label__ = 20; break; + case 20: + var $112=$3; + var $113=$stopidx; + var $114=(($112)|0) <= (($113)|0); + if ($114) { __label__ = 21; break; } else { __label__ = 23; break; } + case 21: + var $116=$2; + var $117=$3; + var $118=(($117-1)|0); + var $119=$4; + var $120=(($119+$118)|0); + var $121=HEAPU8[($120)]; + var $122=(($121)&255); + var $123=_find_bucket_8bpc($116, $122); + $pbucket=$123; + var $124=$pbucket; + var $125=(($124+4)|0); + var $126=HEAP32[(($125)>>2)]; + var $127=$1; + var $128=(($127+32)|0); + var $129=HEAP32[(($128)>>2)]; + var $130=_golomb_decoding_8bpc($126, $129, $codewordlen1); + var $131=(($130) & 255); + var $132=$3; + var $133=$4; + var $134=(($133+$132)|0); + HEAP8[($134)]=$131; + var $135=$3; + var $136=$5; + var $137=(($136+($135<<2))|0); + var $138=$3; + var $139=$4; + var $140=(($139+$138)|0); + var $141=HEAP8[($140)]; + var $142=$9; + _quic_four_corelate_0($137, $141, $142); + var $143=$1; + var $144=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($143, $144); + __label__ = 22; break; + case 22: + var $146=$3; + var $147=(($146+1)|0); + $3=$147; + __label__ = 20; break; + case 23: + var $149=$2; + var $150=(($149+40)|0); + var $151=$pbucket; + var $152=$stopidx; + var $153=$4; + var $154=(($153+$152)|0); + var $155=HEAP8[($154)]; + var $156=$8; + _update_model_8bpc($150, $151, $155, $156); + var $157=$3; + var $158=$2; + var $159=(($158+40)|0); + var $160=(($159+8)|0); + var $161=_tabrand($160); + var $162=$7; + var $163=$161 & $162; + var $164=(($157+$163)|0); + $stopidx=$164; + __label__ = 18; break; + case 24: + __label__ = 25; break; + case 25: + var $167=$3; + var $168=$6; + var $169=(($167)|0) < (($168)|0); + if ($169) { __label__ = 26; break; } else { __label__ = 28; break; } + case 26: + var $171=$2; + var $172=$3; + var $173=(($172-1)|0); + var $174=$4; + var $175=(($174+$173)|0); + var $176=HEAPU8[($175)]; + var $177=(($176)&255); + var $178=_find_bucket_8bpc($171, $177); + var $179=(($178+4)|0); + var $180=HEAP32[(($179)>>2)]; + var $181=$1; + var $182=(($181+32)|0); + var $183=HEAP32[(($182)>>2)]; + var $184=_golomb_decoding_8bpc($180, $183, $codewordlen2); + var $185=(($184) & 255); + var $186=$3; + var $187=$4; + var $188=(($187+$186)|0); + HEAP8[($188)]=$185; + var $189=$3; + var $190=$5; + var $191=(($190+($189<<2))|0); + var $192=$3; + var $193=$4; + var $194=(($193+$192)|0); + var $195=HEAP8[($194)]; + var $196=$9; + _quic_four_corelate_0($191, $195, $196); + var $197=$1; + var $198=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($197, $198); + __label__ = 27; break; + case 27: + var $200=$3; + var $201=(($200+1)|0); + $3=$201; + __label__ = 25; break; + case 28: + var $203=$stopidx; + var $204=$6; + var $205=(($203-$204)|0); + var $206=$2; + var $207=(($206+40)|0); + var $208=(($207+4)|0); + HEAP32[(($208)>>2)]=$205; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_four_uncompress_row0_seg["X"]=1; + +function _quic_rgb16_to_32_uncompress_row_seg($encoder, $prev_row, $cur_row, $i, $end, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $waitmask; + var $stopidx; + var $run_index; + var $run_end; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$i; + $5=$end; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + var $24=$1; + var $25=(($24+360)|0); + var $26=(($25+16)|0); + var $27=HEAP32[(($26)>>2)]; + var $28=((_bppmask+($27<<2))|0); + var $29=HEAP32[(($28)>>2)]; + $waitmask=$29; + $run_index=0; + __label__ = 2; break; + case 2: + var $31=$5; + var $32=$4; + var $33=(($31-$32)|0); + var $34=(($33)|0) > 0; + if ($34) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $38=$_g_boolean_var_; + var $39=(($38)==(1)); + var $40=(($39)|0)!=0; + if ($40) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str87)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $47=$4; + var $48=(($47)|0)!=0; + if ($48) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $50=$4; + var $51=$3; + var $52=(($51+($50<<2))|0); + var $53=(($52+3)|0); + HEAP8[($53)]=0; + var $54=$channel_r; + var $55=$correlate_row_r; + var $56=(($55-1)|0); + var $57=HEAPU8[($56)]; + var $58=(($57)&255); + var $59=_find_bucket_5bpc($54, $58); + var $60=(($59+4)|0); + var $61=HEAP32[(($60)>>2)]; + var $62=$1; + var $63=(($62+32)|0); + var $64=HEAP32[(($63)>>2)]; + var $65=_golomb_decoding_5bpc($61, $64, $codewordlen); + var $66=(($65) & 255); + var $67=$correlate_row_r; + var $68=(($67)|0); + HEAP8[($68)]=$66; + var $69=$correlate_row_r; + var $70=(($69)|0); + var $71=HEAPU8[($70)]; + var $72=(($71)&255); + var $73=((((_family_5bpc+384)|0)+($72<<2))|0); + var $74=HEAP32[(($73)>>2)]; + var $75=$2; + var $76=(($75+2)|0); + var $77=HEAPU8[($76)]; + var $78=(($77)&255); + var $79=$78 >> 3; + var $80=(($74+$79)|0); + var $81=$7; + var $82=$80 & $81; + var $83=$82 << 3; + var $84=$correlate_row_r; + var $85=(($84)|0); + var $86=HEAPU8[($85)]; + var $87=(($86)&255); + var $88=((((_family_5bpc+384)|0)+($87<<2))|0); + var $89=HEAP32[(($88)>>2)]; + var $90=$2; + var $91=(($90+2)|0); + var $92=HEAPU8[($91)]; + var $93=(($92)&255); + var $94=$93 >> 3; + var $95=(($89+$94)|0); + var $96=$7; + var $97=$95 & $96; + var $98=$97 & 31; + var $99=$98 >>> 2; + var $100=$83 | $99; + var $101=(($100) & 255); + var $102=$3; + var $103=(($102)|0); + var $104=(($103+2)|0); + HEAP8[($104)]=$101; + var $105=$1; + var $106=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($105, $106); + var $107=$channel_g; + var $108=$correlate_row_g; + var $109=(($108-1)|0); + var $110=HEAPU8[($109)]; + var $111=(($110)&255); + var $112=_find_bucket_5bpc($107, $111); + var $113=(($112+4)|0); + var $114=HEAP32[(($113)>>2)]; + var $115=$1; + var $116=(($115+32)|0); + var $117=HEAP32[(($116)>>2)]; + var $118=_golomb_decoding_5bpc($114, $117, $codewordlen); + var $119=(($118) & 255); + var $120=$correlate_row_g; + var $121=(($120)|0); + HEAP8[($121)]=$119; + var $122=$correlate_row_g; + var $123=(($122)|0); + var $124=HEAPU8[($123)]; + var $125=(($124)&255); + var $126=((((_family_5bpc+384)|0)+($125<<2))|0); + var $127=HEAP32[(($126)>>2)]; + var $128=$2; + var $129=(($128+1)|0); + var $130=HEAPU8[($129)]; + var $131=(($130)&255); + var $132=$131 >> 3; + var $133=(($127+$132)|0); + var $134=$7; + var $135=$133 & $134; + var $136=$135 << 3; + var $137=$correlate_row_g; + var $138=(($137)|0); + var $139=HEAPU8[($138)]; + var $140=(($139)&255); + var $141=((((_family_5bpc+384)|0)+($140<<2))|0); + var $142=HEAP32[(($141)>>2)]; + var $143=$2; + var $144=(($143+1)|0); + var $145=HEAPU8[($144)]; + var $146=(($145)&255); + var $147=$146 >> 3; + var $148=(($142+$147)|0); + var $149=$7; + var $150=$148 & $149; + var $151=$150 & 31; + var $152=$151 >>> 2; + var $153=$136 | $152; + var $154=(($153) & 255); + var $155=$3; + var $156=(($155)|0); + var $157=(($156+1)|0); + HEAP8[($157)]=$154; + var $158=$1; + var $159=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($158, $159); + var $160=$channel_b; + var $161=$correlate_row_b; + var $162=(($161-1)|0); + var $163=HEAPU8[($162)]; + var $164=(($163)&255); + var $165=_find_bucket_5bpc($160, $164); + var $166=(($165+4)|0); + var $167=HEAP32[(($166)>>2)]; + var $168=$1; + var $169=(($168+32)|0); + var $170=HEAP32[(($169)>>2)]; + var $171=_golomb_decoding_5bpc($167, $170, $codewordlen); + var $172=(($171) & 255); + var $173=$correlate_row_b; + var $174=(($173)|0); + HEAP8[($174)]=$172; + var $175=$correlate_row_b; + var $176=(($175)|0); + var $177=HEAPU8[($176)]; + var $178=(($177)&255); + var $179=((((_family_5bpc+384)|0)+($178<<2))|0); + var $180=HEAP32[(($179)>>2)]; + var $181=$2; + var $182=(($181)|0); + var $183=HEAPU8[($182)]; + var $184=(($183)&255); + var $185=$184 >> 3; + var $186=(($180+$185)|0); + var $187=$7; + var $188=$186 & $187; + var $189=$188 << 3; + var $190=$correlate_row_b; + var $191=(($190)|0); + var $192=HEAPU8[($191)]; + var $193=(($192)&255); + var $194=((((_family_5bpc+384)|0)+($193<<2))|0); + var $195=HEAP32[(($194)>>2)]; + var $196=$2; + var $197=(($196)|0); + var $198=HEAPU8[($197)]; + var $199=(($198)&255); + var $200=$199 >> 3; + var $201=(($195+$200)|0); + var $202=$7; + var $203=$201 & $202; + var $204=$203 & 31; + var $205=$204 >>> 2; + var $206=$189 | $205; + var $207=(($206) & 255); + var $208=$3; + var $209=(($208)|0); + var $210=(($209)|0); + HEAP8[($210)]=$207; + var $211=$1; + var $212=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($211, $212); + var $213=$1; + var $214=(($213+360)|0); + var $215=(($214+4)|0); + var $216=HEAP32[(($215)>>2)]; + var $217=(($216)|0)!=0; + if ($217) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $219=$1; + var $220=(($219+360)|0); + var $221=(($220+4)|0); + var $222=HEAP32[(($221)>>2)]; + var $223=(($222-1)|0); + HEAP32[(($221)>>2)]=$223; + __label__ = 15; break; + case 14: + var $225=$1; + var $226=(($225+360)|0); + var $227=(($226+8)|0); + var $228=_tabrand($227); + var $229=$waitmask; + var $230=$228 & $229; + var $231=$1; + var $232=(($231+360)|0); + var $233=(($232+4)|0); + HEAP32[(($233)>>2)]=$230; + var $234=$1; + var $235=(($234+360)|0); + var $236=$channel_r; + var $237=$correlate_row_r; + var $238=(($237-1)|0); + var $239=HEAPU8[($238)]; + var $240=(($239)&255); + var $241=_find_bucket_5bpc($236, $240); + var $242=$correlate_row_r; + var $243=(($242)|0); + var $244=HEAP8[($243)]; + var $245=$6; + _update_model_5bpc($235, $241, $244, $245); + var $246=$1; + var $247=(($246+360)|0); + var $248=$channel_g; + var $249=$correlate_row_g; + var $250=(($249-1)|0); + var $251=HEAPU8[($250)]; + var $252=(($251)&255); + var $253=_find_bucket_5bpc($248, $252); + var $254=$correlate_row_g; + var $255=(($254)|0); + var $256=HEAP8[($255)]; + var $257=$6; + _update_model_5bpc($247, $253, $256, $257); + var $258=$1; + var $259=(($258+360)|0); + var $260=$channel_b; + var $261=$correlate_row_b; + var $262=(($261-1)|0); + var $263=HEAPU8[($262)]; + var $264=(($263)&255); + var $265=_find_bucket_5bpc($260, $264); + var $266=$correlate_row_b; + var $267=(($266)|0); + var $268=HEAP8[($267)]; + var $269=$6; + _update_model_5bpc($259, $265, $268, $269); + __label__ = 15; break; + case 15: + var $271=$4; + var $272=(($271+1)|0); + $4=$272; + var $273=$1; + var $274=(($273+360)|0); + var $275=(($274+4)|0); + var $276=HEAP32[(($275)>>2)]; + var $277=(($272+$276)|0); + $stopidx=$277; + __label__ = 17; break; + case 16: + var $279=$4; + var $280=$1; + var $281=(($280+360)|0); + var $282=(($281+4)|0); + var $283=HEAP32[(($282)>>2)]; + var $284=(($279+$283)|0); + $stopidx=$284; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + var $288=$stopidx; + var $289=$5; + var $290=(($288)|0) < (($289)|0); + if ($290) { __label__ = 20; break; } else { __label__ = 35; break; } + case 20: + __label__ = 21; break; + case 21: + var $293=$4; + var $294=$stopidx; + var $295=(($293)|0) <= (($294)|0); + if ($295) { __label__ = 22; break; } else { __label__ = 34; break; } + case 22: + var $297=$4; + var $298=(($297-1)|0); + var $299=$2; + var $300=(($299+($298<<2))|0); + var $301=(($300+2)|0); + var $302=HEAPU8[($301)]; + var $303=(($302)&255); + var $304=$303 >> 3; + var $305=$4; + var $306=$2; + var $307=(($306+($305<<2))|0); + var $308=(($307+2)|0); + var $309=HEAPU8[($308)]; + var $310=(($309)&255); + var $311=$310 >> 3; + var $312=(($304)|0)==(($311)|0); + if ($312) { __label__ = 23; break; } else { __label__ = 32; break; } + case 23: + var $314=$4; + var $315=(($314-1)|0); + var $316=$2; + var $317=(($316+($315<<2))|0); + var $318=(($317+1)|0); + var $319=HEAPU8[($318)]; + var $320=(($319)&255); + var $321=$320 >> 3; + var $322=$4; + var $323=$2; + var $324=(($323+($322<<2))|0); + var $325=(($324+1)|0); + var $326=HEAPU8[($325)]; + var $327=(($326)&255); + var $328=$327 >> 3; + var $329=(($321)|0)==(($328)|0); + if ($329) { __label__ = 24; break; } else { __label__ = 32; break; } + case 24: + var $331=$4; + var $332=(($331-1)|0); + var $333=$2; + var $334=(($333+($332<<2))|0); + var $335=(($334)|0); + var $336=HEAPU8[($335)]; + var $337=(($336)&255); + var $338=$337 >> 3; + var $339=$4; + var $340=$2; + var $341=(($340+($339<<2))|0); + var $342=(($341)|0); + var $343=HEAPU8[($342)]; + var $344=(($343)&255); + var $345=$344 >> 3; + var $346=(($338)|0)==(($345)|0); + if ($346) { __label__ = 25; break; } else { __label__ = 32; break; } + case 25: + var $348=$run_index; + var $349=$4; + var $350=(($348)|0)!=(($349)|0); + if ($350) { __label__ = 26; break; } else { __label__ = 31; break; } + case 26: + var $352=$4; + var $353=(($352)|0) > 2; + if ($353) { __label__ = 27; break; } else { __label__ = 31; break; } + case 27: + var $355=$4; + var $356=(($355-1)|0); + var $357=$3; + var $358=(($357+($356<<2))|0); + var $359=(($358+2)|0); + var $360=HEAPU8[($359)]; + var $361=(($360)&255); + var $362=$361 >> 3; + var $363=$4; + var $364=(($363-2)|0); + var $365=$3; + var $366=(($365+($364<<2))|0); + var $367=(($366+2)|0); + var $368=HEAPU8[($367)]; + var $369=(($368)&255); + var $370=$369 >> 3; + var $371=(($362)|0)==(($370)|0); + if ($371) { __label__ = 28; break; } else { __label__ = 31; break; } + case 28: + var $373=$4; + var $374=(($373-1)|0); + var $375=$3; + var $376=(($375+($374<<2))|0); + var $377=(($376+1)|0); + var $378=HEAPU8[($377)]; + var $379=(($378)&255); + var $380=$379 >> 3; + var $381=$4; + var $382=(($381-2)|0); + var $383=$3; + var $384=(($383+($382<<2))|0); + var $385=(($384+1)|0); + var $386=HEAPU8[($385)]; + var $387=(($386)&255); + var $388=$387 >> 3; + var $389=(($380)|0)==(($388)|0); + if ($389) { __label__ = 29; break; } else { __label__ = 31; break; } + case 29: + var $391=$4; + var $392=(($391-1)|0); + var $393=$3; + var $394=(($393+($392<<2))|0); + var $395=(($394)|0); + var $396=HEAPU8[($395)]; + var $397=(($396)&255); + var $398=$397 >> 3; + var $399=$4; + var $400=(($399-2)|0); + var $401=$3; + var $402=(($401+($400<<2))|0); + var $403=(($402)|0); + var $404=HEAPU8[($403)]; + var $405=(($404)&255); + var $406=$405 >> 3; + var $407=(($398)|0)==(($406)|0); + if ($407) { __label__ = 30; break; } else { __label__ = 31; break; } + case 30: + __label__ = 50; break; + case 31: + __label__ = 32; break; + case 32: + var $411=$4; + var $412=$3; + var $413=(($412+($411<<2))|0); + var $414=(($413+3)|0); + HEAP8[($414)]=0; + var $415=$channel_r; + var $416=$4; + var $417=(($416-1)|0); + var $418=$correlate_row_r; + var $419=(($418+$417)|0); + var $420=HEAPU8[($419)]; + var $421=(($420)&255); + var $422=_find_bucket_5bpc($415, $421); + var $423=(($422+4)|0); + var $424=HEAP32[(($423)>>2)]; + var $425=$1; + var $426=(($425+32)|0); + var $427=HEAP32[(($426)>>2)]; + var $428=_golomb_decoding_5bpc($424, $427, $codewordlen1); + var $429=(($428) & 255); + var $430=$4; + var $431=$correlate_row_r; + var $432=(($431+$430)|0); + HEAP8[($432)]=$429; + var $433=$4; + var $434=$correlate_row_r; + var $435=(($434+$433)|0); + var $436=HEAPU8[($435)]; + var $437=(($436)&255); + var $438=((((_family_5bpc+384)|0)+($437<<2))|0); + var $439=HEAP32[(($438)>>2)]; + var $440=$4; + var $441=$3; + var $442=(($441+($440<<2))|0); + var $443=(($442-4)|0); + var $444=(($443+2)|0); + var $445=HEAPU8[($444)]; + var $446=(($445)&255); + var $447=$446 >> 3; + var $448=$4; + var $449=$2; + var $450=(($449+($448<<2))|0); + var $451=(($450+2)|0); + var $452=HEAPU8[($451)]; + var $453=(($452)&255); + var $454=$453 >> 3; + var $455=(($447+$454)|0); + var $456=$455 >>> 1; + var $457=(($439+$456)|0); + var $458=$7; + var $459=$457 & $458; + var $460=$459 << 3; + var $461=$4; + var $462=$correlate_row_r; + var $463=(($462+$461)|0); + var $464=HEAPU8[($463)]; + var $465=(($464)&255); + var $466=((((_family_5bpc+384)|0)+($465<<2))|0); + var $467=HEAP32[(($466)>>2)]; + var $468=$4; + var $469=$3; + var $470=(($469+($468<<2))|0); + var $471=(($470-4)|0); + var $472=(($471+2)|0); + var $473=HEAPU8[($472)]; + var $474=(($473)&255); + var $475=$474 >> 3; + var $476=$4; + var $477=$2; + var $478=(($477+($476<<2))|0); + var $479=(($478+2)|0); + var $480=HEAPU8[($479)]; + var $481=(($480)&255); + var $482=$481 >> 3; + var $483=(($475+$482)|0); + var $484=$483 >>> 1; + var $485=(($467+$484)|0); + var $486=$7; + var $487=$485 & $486; + var $488=$487 & 31; + var $489=$488 >>> 2; + var $490=$460 | $489; + var $491=(($490) & 255); + var $492=$4; + var $493=$3; + var $494=(($493+($492<<2))|0); + var $495=(($494+2)|0); + HEAP8[($495)]=$491; + var $496=$1; + var $497=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($496, $497); + var $498=$channel_g; + var $499=$4; + var $500=(($499-1)|0); + var $501=$correlate_row_g; + var $502=(($501+$500)|0); + var $503=HEAPU8[($502)]; + var $504=(($503)&255); + var $505=_find_bucket_5bpc($498, $504); + var $506=(($505+4)|0); + var $507=HEAP32[(($506)>>2)]; + var $508=$1; + var $509=(($508+32)|0); + var $510=HEAP32[(($509)>>2)]; + var $511=_golomb_decoding_5bpc($507, $510, $codewordlen1); + var $512=(($511) & 255); + var $513=$4; + var $514=$correlate_row_g; + var $515=(($514+$513)|0); + HEAP8[($515)]=$512; + var $516=$4; + var $517=$correlate_row_g; + var $518=(($517+$516)|0); + var $519=HEAPU8[($518)]; + var $520=(($519)&255); + var $521=((((_family_5bpc+384)|0)+($520<<2))|0); + var $522=HEAP32[(($521)>>2)]; + var $523=$4; + var $524=$3; + var $525=(($524+($523<<2))|0); + var $526=(($525-4)|0); + var $527=(($526+1)|0); + var $528=HEAPU8[($527)]; + var $529=(($528)&255); + var $530=$529 >> 3; + var $531=$4; + var $532=$2; + var $533=(($532+($531<<2))|0); + var $534=(($533+1)|0); + var $535=HEAPU8[($534)]; + var $536=(($535)&255); + var $537=$536 >> 3; + var $538=(($530+$537)|0); + var $539=$538 >>> 1; + var $540=(($522+$539)|0); + var $541=$7; + var $542=$540 & $541; + var $543=$542 << 3; + var $544=$4; + var $545=$correlate_row_g; + var $546=(($545+$544)|0); + var $547=HEAPU8[($546)]; + var $548=(($547)&255); + var $549=((((_family_5bpc+384)|0)+($548<<2))|0); + var $550=HEAP32[(($549)>>2)]; + var $551=$4; + var $552=$3; + var $553=(($552+($551<<2))|0); + var $554=(($553-4)|0); + var $555=(($554+1)|0); + var $556=HEAPU8[($555)]; + var $557=(($556)&255); + var $558=$557 >> 3; + var $559=$4; + var $560=$2; + var $561=(($560+($559<<2))|0); + var $562=(($561+1)|0); + var $563=HEAPU8[($562)]; + var $564=(($563)&255); + var $565=$564 >> 3; + var $566=(($558+$565)|0); + var $567=$566 >>> 1; + var $568=(($550+$567)|0); + var $569=$7; + var $570=$568 & $569; + var $571=$570 & 31; + var $572=$571 >>> 2; + var $573=$543 | $572; + var $574=(($573) & 255); + var $575=$4; + var $576=$3; + var $577=(($576+($575<<2))|0); + var $578=(($577+1)|0); + HEAP8[($578)]=$574; + var $579=$1; + var $580=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($579, $580); + var $581=$channel_b; + var $582=$4; + var $583=(($582-1)|0); + var $584=$correlate_row_b; + var $585=(($584+$583)|0); + var $586=HEAPU8[($585)]; + var $587=(($586)&255); + var $588=_find_bucket_5bpc($581, $587); + var $589=(($588+4)|0); + var $590=HEAP32[(($589)>>2)]; + var $591=$1; + var $592=(($591+32)|0); + var $593=HEAP32[(($592)>>2)]; + var $594=_golomb_decoding_5bpc($590, $593, $codewordlen1); + var $595=(($594) & 255); + var $596=$4; + var $597=$correlate_row_b; + var $598=(($597+$596)|0); + HEAP8[($598)]=$595; + var $599=$4; + var $600=$correlate_row_b; + var $601=(($600+$599)|0); + var $602=HEAPU8[($601)]; + var $603=(($602)&255); + var $604=((((_family_5bpc+384)|0)+($603<<2))|0); + var $605=HEAP32[(($604)>>2)]; + var $606=$4; + var $607=$3; + var $608=(($607+($606<<2))|0); + var $609=(($608-4)|0); + var $610=(($609)|0); + var $611=HEAPU8[($610)]; + var $612=(($611)&255); + var $613=$612 >> 3; + var $614=$4; + var $615=$2; + var $616=(($615+($614<<2))|0); + var $617=(($616)|0); + var $618=HEAPU8[($617)]; + var $619=(($618)&255); + var $620=$619 >> 3; + var $621=(($613+$620)|0); + var $622=$621 >>> 1; + var $623=(($605+$622)|0); + var $624=$7; + var $625=$623 & $624; + var $626=$625 << 3; + var $627=$4; + var $628=$correlate_row_b; + var $629=(($628+$627)|0); + var $630=HEAPU8[($629)]; + var $631=(($630)&255); + var $632=((((_family_5bpc+384)|0)+($631<<2))|0); + var $633=HEAP32[(($632)>>2)]; + var $634=$4; + var $635=$3; + var $636=(($635+($634<<2))|0); + var $637=(($636-4)|0); + var $638=(($637)|0); + var $639=HEAPU8[($638)]; + var $640=(($639)&255); + var $641=$640 >> 3; + var $642=$4; + var $643=$2; + var $644=(($643+($642<<2))|0); + var $645=(($644)|0); + var $646=HEAPU8[($645)]; + var $647=(($646)&255); + var $648=$647 >> 3; + var $649=(($641+$648)|0); + var $650=$649 >>> 1; + var $651=(($633+$650)|0); + var $652=$7; + var $653=$651 & $652; + var $654=$653 & 31; + var $655=$654 >>> 2; + var $656=$626 | $655; + var $657=(($656) & 255); + var $658=$4; + var $659=$3; + var $660=(($659+($658<<2))|0); + var $661=(($660)|0); + HEAP8[($661)]=$657; + var $662=$1; + var $663=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($662, $663); + __label__ = 33; break; + case 33: + var $665=$4; + var $666=(($665+1)|0); + $4=$666; + __label__ = 21; break; + case 34: + var $668=$1; + var $669=(($668+360)|0); + var $670=$channel_r; + var $671=$stopidx; + var $672=(($671-1)|0); + var $673=$correlate_row_r; + var $674=(($673+$672)|0); + var $675=HEAPU8[($674)]; + var $676=(($675)&255); + var $677=_find_bucket_5bpc($670, $676); + var $678=$stopidx; + var $679=$correlate_row_r; + var $680=(($679+$678)|0); + var $681=HEAP8[($680)]; + var $682=$6; + _update_model_5bpc($669, $677, $681, $682); + var $683=$1; + var $684=(($683+360)|0); + var $685=$channel_g; + var $686=$stopidx; + var $687=(($686-1)|0); + var $688=$correlate_row_g; + var $689=(($688+$687)|0); + var $690=HEAPU8[($689)]; + var $691=(($690)&255); + var $692=_find_bucket_5bpc($685, $691); + var $693=$stopidx; + var $694=$correlate_row_g; + var $695=(($694+$693)|0); + var $696=HEAP8[($695)]; + var $697=$6; + _update_model_5bpc($684, $692, $696, $697); + var $698=$1; + var $699=(($698+360)|0); + var $700=$channel_b; + var $701=$stopidx; + var $702=(($701-1)|0); + var $703=$correlate_row_b; + var $704=(($703+$702)|0); + var $705=HEAPU8[($704)]; + var $706=(($705)&255); + var $707=_find_bucket_5bpc($700, $706); + var $708=$stopidx; + var $709=$correlate_row_b; + var $710=(($709+$708)|0); + var $711=HEAP8[($710)]; + var $712=$6; + _update_model_5bpc($699, $707, $711, $712); + var $713=$4; + var $714=$1; + var $715=(($714+360)|0); + var $716=(($715+8)|0); + var $717=_tabrand($716); + var $718=$waitmask; + var $719=$717 & $718; + var $720=(($713+$719)|0); + $stopidx=$720; + __label__ = 19; break; + case 35: + __label__ = 36; break; + case 36: + var $723=$4; + var $724=$5; + var $725=(($723)|0) < (($724)|0); + if ($725) { __label__ = 37; break; } else { __label__ = 49; break; } + case 37: + var $727=$4; + var $728=(($727-1)|0); + var $729=$2; + var $730=(($729+($728<<2))|0); + var $731=(($730+2)|0); + var $732=HEAPU8[($731)]; + var $733=(($732)&255); + var $734=$733 >> 3; + var $735=$4; + var $736=$2; + var $737=(($736+($735<<2))|0); + var $738=(($737+2)|0); + var $739=HEAPU8[($738)]; + var $740=(($739)&255); + var $741=$740 >> 3; + var $742=(($734)|0)==(($741)|0); + if ($742) { __label__ = 38; break; } else { __label__ = 47; break; } + case 38: + var $744=$4; + var $745=(($744-1)|0); + var $746=$2; + var $747=(($746+($745<<2))|0); + var $748=(($747+1)|0); + var $749=HEAPU8[($748)]; + var $750=(($749)&255); + var $751=$750 >> 3; + var $752=$4; + var $753=$2; + var $754=(($753+($752<<2))|0); + var $755=(($754+1)|0); + var $756=HEAPU8[($755)]; + var $757=(($756)&255); + var $758=$757 >> 3; + var $759=(($751)|0)==(($758)|0); + if ($759) { __label__ = 39; break; } else { __label__ = 47; break; } + case 39: + var $761=$4; + var $762=(($761-1)|0); + var $763=$2; + var $764=(($763+($762<<2))|0); + var $765=(($764)|0); + var $766=HEAPU8[($765)]; + var $767=(($766)&255); + var $768=$767 >> 3; + var $769=$4; + var $770=$2; + var $771=(($770+($769<<2))|0); + var $772=(($771)|0); + var $773=HEAPU8[($772)]; + var $774=(($773)&255); + var $775=$774 >> 3; + var $776=(($768)|0)==(($775)|0); + if ($776) { __label__ = 40; break; } else { __label__ = 47; break; } + case 40: + var $778=$run_index; + var $779=$4; + var $780=(($778)|0)!=(($779)|0); + if ($780) { __label__ = 41; break; } else { __label__ = 46; break; } + case 41: + var $782=$4; + var $783=(($782)|0) > 2; + if ($783) { __label__ = 42; break; } else { __label__ = 46; break; } + case 42: + var $785=$4; + var $786=(($785-1)|0); + var $787=$3; + var $788=(($787+($786<<2))|0); + var $789=(($788+2)|0); + var $790=HEAPU8[($789)]; + var $791=(($790)&255); + var $792=$791 >> 3; + var $793=$4; + var $794=(($793-2)|0); + var $795=$3; + var $796=(($795+($794<<2))|0); + var $797=(($796+2)|0); + var $798=HEAPU8[($797)]; + var $799=(($798)&255); + var $800=$799 >> 3; + var $801=(($792)|0)==(($800)|0); + if ($801) { __label__ = 43; break; } else { __label__ = 46; break; } + case 43: + var $803=$4; + var $804=(($803-1)|0); + var $805=$3; + var $806=(($805+($804<<2))|0); + var $807=(($806+1)|0); + var $808=HEAPU8[($807)]; + var $809=(($808)&255); + var $810=$809 >> 3; + var $811=$4; + var $812=(($811-2)|0); + var $813=$3; + var $814=(($813+($812<<2))|0); + var $815=(($814+1)|0); + var $816=HEAPU8[($815)]; + var $817=(($816)&255); + var $818=$817 >> 3; + var $819=(($810)|0)==(($818)|0); + if ($819) { __label__ = 44; break; } else { __label__ = 46; break; } + case 44: + var $821=$4; + var $822=(($821-1)|0); + var $823=$3; + var $824=(($823+($822<<2))|0); + var $825=(($824)|0); + var $826=HEAPU8[($825)]; + var $827=(($826)&255); + var $828=$827 >> 3; + var $829=$4; + var $830=(($829-2)|0); + var $831=$3; + var $832=(($831+($830<<2))|0); + var $833=(($832)|0); + var $834=HEAPU8[($833)]; + var $835=(($834)&255); + var $836=$835 >> 3; + var $837=(($828)|0)==(($836)|0); + if ($837) { __label__ = 45; break; } else { __label__ = 46; break; } + case 45: + __label__ = 50; break; + case 46: + __label__ = 47; break; + case 47: + var $841=$4; + var $842=$3; + var $843=(($842+($841<<2))|0); + var $844=(($843+3)|0); + HEAP8[($844)]=0; + var $845=$channel_r; + var $846=$4; + var $847=(($846-1)|0); + var $848=$correlate_row_r; + var $849=(($848+$847)|0); + var $850=HEAPU8[($849)]; + var $851=(($850)&255); + var $852=_find_bucket_5bpc($845, $851); + var $853=(($852+4)|0); + var $854=HEAP32[(($853)>>2)]; + var $855=$1; + var $856=(($855+32)|0); + var $857=HEAP32[(($856)>>2)]; + var $858=_golomb_decoding_5bpc($854, $857, $codewordlen2); + var $859=(($858) & 255); + var $860=$4; + var $861=$correlate_row_r; + var $862=(($861+$860)|0); + HEAP8[($862)]=$859; + var $863=$4; + var $864=$correlate_row_r; + var $865=(($864+$863)|0); + var $866=HEAPU8[($865)]; + var $867=(($866)&255); + var $868=((((_family_5bpc+384)|0)+($867<<2))|0); + var $869=HEAP32[(($868)>>2)]; + var $870=$4; + var $871=$3; + var $872=(($871+($870<<2))|0); + var $873=(($872-4)|0); + var $874=(($873+2)|0); + var $875=HEAPU8[($874)]; + var $876=(($875)&255); + var $877=$876 >> 3; + var $878=$4; + var $879=$2; + var $880=(($879+($878<<2))|0); + var $881=(($880+2)|0); + var $882=HEAPU8[($881)]; + var $883=(($882)&255); + var $884=$883 >> 3; + var $885=(($877+$884)|0); + var $886=$885 >>> 1; + var $887=(($869+$886)|0); + var $888=$7; + var $889=$887 & $888; + var $890=$889 << 3; + var $891=$4; + var $892=$correlate_row_r; + var $893=(($892+$891)|0); + var $894=HEAPU8[($893)]; + var $895=(($894)&255); + var $896=((((_family_5bpc+384)|0)+($895<<2))|0); + var $897=HEAP32[(($896)>>2)]; + var $898=$4; + var $899=$3; + var $900=(($899+($898<<2))|0); + var $901=(($900-4)|0); + var $902=(($901+2)|0); + var $903=HEAPU8[($902)]; + var $904=(($903)&255); + var $905=$904 >> 3; + var $906=$4; + var $907=$2; + var $908=(($907+($906<<2))|0); + var $909=(($908+2)|0); + var $910=HEAPU8[($909)]; + var $911=(($910)&255); + var $912=$911 >> 3; + var $913=(($905+$912)|0); + var $914=$913 >>> 1; + var $915=(($897+$914)|0); + var $916=$7; + var $917=$915 & $916; + var $918=$917 & 31; + var $919=$918 >>> 2; + var $920=$890 | $919; + var $921=(($920) & 255); + var $922=$4; + var $923=$3; + var $924=(($923+($922<<2))|0); + var $925=(($924+2)|0); + HEAP8[($925)]=$921; + var $926=$1; + var $927=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($926, $927); + var $928=$channel_g; + var $929=$4; + var $930=(($929-1)|0); + var $931=$correlate_row_g; + var $932=(($931+$930)|0); + var $933=HEAPU8[($932)]; + var $934=(($933)&255); + var $935=_find_bucket_5bpc($928, $934); + var $936=(($935+4)|0); + var $937=HEAP32[(($936)>>2)]; + var $938=$1; + var $939=(($938+32)|0); + var $940=HEAP32[(($939)>>2)]; + var $941=_golomb_decoding_5bpc($937, $940, $codewordlen2); + var $942=(($941) & 255); + var $943=$4; + var $944=$correlate_row_g; + var $945=(($944+$943)|0); + HEAP8[($945)]=$942; + var $946=$4; + var $947=$correlate_row_g; + var $948=(($947+$946)|0); + var $949=HEAPU8[($948)]; + var $950=(($949)&255); + var $951=((((_family_5bpc+384)|0)+($950<<2))|0); + var $952=HEAP32[(($951)>>2)]; + var $953=$4; + var $954=$3; + var $955=(($954+($953<<2))|0); + var $956=(($955-4)|0); + var $957=(($956+1)|0); + var $958=HEAPU8[($957)]; + var $959=(($958)&255); + var $960=$959 >> 3; + var $961=$4; + var $962=$2; + var $963=(($962+($961<<2))|0); + var $964=(($963+1)|0); + var $965=HEAPU8[($964)]; + var $966=(($965)&255); + var $967=$966 >> 3; + var $968=(($960+$967)|0); + var $969=$968 >>> 1; + var $970=(($952+$969)|0); + var $971=$7; + var $972=$970 & $971; + var $973=$972 << 3; + var $974=$4; + var $975=$correlate_row_g; + var $976=(($975+$974)|0); + var $977=HEAPU8[($976)]; + var $978=(($977)&255); + var $979=((((_family_5bpc+384)|0)+($978<<2))|0); + var $980=HEAP32[(($979)>>2)]; + var $981=$4; + var $982=$3; + var $983=(($982+($981<<2))|0); + var $984=(($983-4)|0); + var $985=(($984+1)|0); + var $986=HEAPU8[($985)]; + var $987=(($986)&255); + var $988=$987 >> 3; + var $989=$4; + var $990=$2; + var $991=(($990+($989<<2))|0); + var $992=(($991+1)|0); + var $993=HEAPU8[($992)]; + var $994=(($993)&255); + var $995=$994 >> 3; + var $996=(($988+$995)|0); + var $997=$996 >>> 1; + var $998=(($980+$997)|0); + var $999=$7; + var $1000=$998 & $999; + var $1001=$1000 & 31; + var $1002=$1001 >>> 2; + var $1003=$973 | $1002; + var $1004=(($1003) & 255); + var $1005=$4; + var $1006=$3; + var $1007=(($1006+($1005<<2))|0); + var $1008=(($1007+1)|0); + HEAP8[($1008)]=$1004; + var $1009=$1; + var $1010=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($1009, $1010); + var $1011=$channel_b; + var $1012=$4; + var $1013=(($1012-1)|0); + var $1014=$correlate_row_b; + var $1015=(($1014+$1013)|0); + var $1016=HEAPU8[($1015)]; + var $1017=(($1016)&255); + var $1018=_find_bucket_5bpc($1011, $1017); + var $1019=(($1018+4)|0); + var $1020=HEAP32[(($1019)>>2)]; + var $1021=$1; + var $1022=(($1021+32)|0); + var $1023=HEAP32[(($1022)>>2)]; + var $1024=_golomb_decoding_5bpc($1020, $1023, $codewordlen2); + var $1025=(($1024) & 255); + var $1026=$4; + var $1027=$correlate_row_b; + var $1028=(($1027+$1026)|0); + HEAP8[($1028)]=$1025; + var $1029=$4; + var $1030=$correlate_row_b; + var $1031=(($1030+$1029)|0); + var $1032=HEAPU8[($1031)]; + var $1033=(($1032)&255); + var $1034=((((_family_5bpc+384)|0)+($1033<<2))|0); + var $1035=HEAP32[(($1034)>>2)]; + var $1036=$4; + var $1037=$3; + var $1038=(($1037+($1036<<2))|0); + var $1039=(($1038-4)|0); + var $1040=(($1039)|0); + var $1041=HEAPU8[($1040)]; + var $1042=(($1041)&255); + var $1043=$1042 >> 3; + var $1044=$4; + var $1045=$2; + var $1046=(($1045+($1044<<2))|0); + var $1047=(($1046)|0); + var $1048=HEAPU8[($1047)]; + var $1049=(($1048)&255); + var $1050=$1049 >> 3; + var $1051=(($1043+$1050)|0); + var $1052=$1051 >>> 1; + var $1053=(($1035+$1052)|0); + var $1054=$7; + var $1055=$1053 & $1054; + var $1056=$1055 << 3; + var $1057=$4; + var $1058=$correlate_row_b; + var $1059=(($1058+$1057)|0); + var $1060=HEAPU8[($1059)]; + var $1061=(($1060)&255); + var $1062=((((_family_5bpc+384)|0)+($1061<<2))|0); + var $1063=HEAP32[(($1062)>>2)]; + var $1064=$4; + var $1065=$3; + var $1066=(($1065+($1064<<2))|0); + var $1067=(($1066-4)|0); + var $1068=(($1067)|0); + var $1069=HEAPU8[($1068)]; + var $1070=(($1069)&255); + var $1071=$1070 >> 3; + var $1072=$4; + var $1073=$2; + var $1074=(($1073+($1072<<2))|0); + var $1075=(($1074)|0); + var $1076=HEAPU8[($1075)]; + var $1077=(($1076)&255); + var $1078=$1077 >> 3; + var $1079=(($1071+$1078)|0); + var $1080=$1079 >>> 1; + var $1081=(($1063+$1080)|0); + var $1082=$7; + var $1083=$1081 & $1082; + var $1084=$1083 & 31; + var $1085=$1084 >>> 2; + var $1086=$1056 | $1085; + var $1087=(($1086) & 255); + var $1088=$4; + var $1089=$3; + var $1090=(($1089+($1088<<2))|0); + var $1091=(($1090)|0); + HEAP8[($1091)]=$1087; + var $1092=$1; + var $1093=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($1092, $1093); + __label__ = 48; break; + case 48: + var $1095=$4; + var $1096=(($1095+1)|0); + $4=$1096; + __label__ = 36; break; + case 49: + var $1098=$stopidx; + var $1099=$5; + var $1100=(($1098-$1099)|0); + var $1101=$1; + var $1102=(($1101+360)|0); + var $1103=(($1102+4)|0); + HEAP32[(($1103)>>2)]=$1100; + __label__ = 57; break; + case 50: + var $1105=$stopidx; + var $1106=$4; + var $1107=(($1105-$1106)|0); + var $1108=$1; + var $1109=(($1108+360)|0); + var $1110=(($1109+4)|0); + HEAP32[(($1110)>>2)]=$1107; + var $1111=$4; + $run_index=$1111; + var $1112=$4; + var $1113=$1; + var $1114=_decode_run($1113); + var $1115=(($1112+$1114)|0); + $run_end=$1115; + __label__ = 51; break; + case 51: + var $1117=$4; + var $1118=$run_end; + var $1119=(($1117)|0) < (($1118)|0); + if ($1119) { __label__ = 52; break; } else { __label__ = 54; break; } + case 52: + var $1121=$4; + var $1122=$3; + var $1123=(($1122+($1121<<2))|0); + var $1124=(($1123+3)|0); + HEAP8[($1124)]=0; + var $1125=$4; + var $1126=(($1125-1)|0); + var $1127=$3; + var $1128=(($1127+($1126<<2))|0); + var $1129=(($1128+2)|0); + var $1130=HEAPU8[($1129)]; + var $1131=(($1130)&255); + var $1132=$1131 >> 3; + var $1133=$1132 << 3; + var $1134=$4; + var $1135=(($1134-1)|0); + var $1136=$3; + var $1137=(($1136+($1135<<2))|0); + var $1138=(($1137+2)|0); + var $1139=HEAPU8[($1138)]; + var $1140=(($1139)&255); + var $1141=$1140 >> 3; + var $1142=$1141 & 31; + var $1143=$1142 >> 2; + var $1144=$1133 | $1143; + var $1145=(($1144) & 255); + var $1146=$4; + var $1147=$3; + var $1148=(($1147+($1146<<2))|0); + var $1149=(($1148+2)|0); + HEAP8[($1149)]=$1145; + var $1150=$4; + var $1151=(($1150-1)|0); + var $1152=$3; + var $1153=(($1152+($1151<<2))|0); + var $1154=(($1153+1)|0); + var $1155=HEAPU8[($1154)]; + var $1156=(($1155)&255); + var $1157=$1156 >> 3; + var $1158=$1157 << 3; + var $1159=$4; + var $1160=(($1159-1)|0); + var $1161=$3; + var $1162=(($1161+($1160<<2))|0); + var $1163=(($1162+1)|0); + var $1164=HEAPU8[($1163)]; + var $1165=(($1164)&255); + var $1166=$1165 >> 3; + var $1167=$1166 & 31; + var $1168=$1167 >> 2; + var $1169=$1158 | $1168; + var $1170=(($1169) & 255); + var $1171=$4; + var $1172=$3; + var $1173=(($1172+($1171<<2))|0); + var $1174=(($1173+1)|0); + HEAP8[($1174)]=$1170; + var $1175=$4; + var $1176=(($1175-1)|0); + var $1177=$3; + var $1178=(($1177+($1176<<2))|0); + var $1179=(($1178)|0); + var $1180=HEAPU8[($1179)]; + var $1181=(($1180)&255); + var $1182=$1181 >> 3; + var $1183=$1182 << 3; + var $1184=$4; + var $1185=(($1184-1)|0); + var $1186=$3; + var $1187=(($1186+($1185<<2))|0); + var $1188=(($1187)|0); + var $1189=HEAPU8[($1188)]; + var $1190=(($1189)&255); + var $1191=$1190 >> 3; + var $1192=$1191 & 31; + var $1193=$1192 >> 2; + var $1194=$1183 | $1193; + var $1195=(($1194) & 255); + var $1196=$4; + var $1197=$3; + var $1198=(($1197+($1196<<2))|0); + var $1199=(($1198)|0); + HEAP8[($1199)]=$1195; + __label__ = 53; break; + case 53: + var $1201=$4; + var $1202=(($1201+1)|0); + $4=$1202; + __label__ = 51; break; + case 54: + var $1204=$4; + var $1205=$5; + var $1206=(($1204)|0)==(($1205)|0); + if ($1206) { __label__ = 55; break; } else { __label__ = 56; break; } + case 55: + __label__ = 57; break; + case 56: + var $1209=$4; + var $1210=$1; + var $1211=(($1210+360)|0); + var $1212=(($1211+4)|0); + var $1213=HEAP32[(($1212)>>2)]; + var $1214=(($1209+$1213)|0); + $stopidx=$1214; + __label__ = 18; break; + case 57: + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_to_32_uncompress_row_seg["X"]=1; + +function _golomb_code_len_5bpc($n, $l) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + $2=$n; + $3=$l; + var $4=$2; + var $5=(($4)&255); + var $6=$3; + var $7=((((_family_5bpc)|0)+($6<<2))|0); + var $8=HEAPU32[(($7)>>2)]; + var $9=(($5)>>>0) < (($8)>>>0); + if ($9) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $11=$2; + var $12=(($11)&255); + var $13=$3; + var $14=$12 >> (($13)|0); + var $15=(($14+1)|0); + var $16=$3; + var $17=(($15+$16)|0); + $1=$17; + __label__ = 4; break; + case 3: + var $19=$3; + var $20=((((_family_5bpc+32)|0)+($19<<2))|0); + var $21=HEAP32[(($20)>>2)]; + $1=$21; + __label__ = 4; break; + case 4: + var $23=$1; + ; + return $23; + default: assert(0, "bad label: " + __label__); + } +} + + +function _golomb_decoding_5bpc($l, $bits, $codewordlen) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $zeroprefix; + var $cwlen; + var $cwlen1; + $2=$l; + $3=$bits; + $4=$codewordlen; + var $5=$3; + var $6=$2; + var $7=((((_family_5bpc+64)|0)+($6<<2))|0); + var $8=HEAPU32[(($7)>>2)]; + var $9=(($5)>>>0) > (($8)>>>0); + if ($9) { __label__ = 2; break; } else { __label__ = 3; break; } + case 2: + var $11=$3; + var $12=_cnt_l_zeroes($11); + $zeroprefix=$12; + var $13=$zeroprefix; + var $14=(($13+1)|0); + var $15=$2; + var $16=(($14+$15)|0); + $cwlen=$16; + var $17=$cwlen; + var $18=$4; + HEAP32[(($18)>>2)]=$17; + var $19=$zeroprefix; + var $20=$2; + var $21=$19 << $20; + var $22=$3; + var $23=$cwlen; + var $24=((32-$23)|0); + var $25=$22 >>> (($24)>>>0); + var $26=$2; + var $27=((_bppmask+($26<<2))|0); + var $28=HEAP32[(($27)>>2)]; + var $29=$25 & $28; + var $30=$21 | $29; + $1=$30; + __label__ = 4; break; + case 3: + var $32=$2; + var $33=((((_family_5bpc+32)|0)+($32<<2))|0); + var $34=HEAP32[(($33)>>2)]; + $cwlen1=$34; + var $35=$cwlen1; + var $36=$4; + HEAP32[(($36)>>2)]=$35; + var $37=$2; + var $38=((((_family_5bpc)|0)+($37<<2))|0); + var $39=HEAP32[(($38)>>2)]; + var $40=$3; + var $41=$cwlen1; + var $42=((32-$41)|0); + var $43=$40 >>> (($42)>>>0); + var $44=$2; + var $45=((((_family_5bpc+96)|0)+($44<<2))|0); + var $46=HEAP32[(($45)>>2)]; + var $47=((_bppmask+($46<<2))|0); + var $48=HEAP32[(($47)>>2)]; + var $49=$43 & $48; + var $50=(($39+$49)|0); + $1=$50; + __label__ = 4; break; + case 4: + var $52=$1; + ; + return $52; + default: assert(0, "bad label: " + __label__); + } +} +_golomb_decoding_5bpc["X"]=1; + +function _find_bucket_5bpc($channel, $val) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $_g_boolean_var_; + $1=$channel; + $2=$val; + __label__ = 2; break; + case 2: + var $4=$2; + var $5=(($4)>>>0) < 32; + if ($5) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $9=$_g_boolean_var_; + var $10=(($9)==(1)); + var $11=(($10)|0)!=0; + if ($11) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str76)|0), ((STRING_TABLE.___FUNCTION___find_bucket_5bpc)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str77)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $18=$2; + var $19=$1; + var $20=(($19+12)|0); + var $21=HEAP32[(($20)>>2)]; + var $22=(($21+($18<<2))|0); + var $23=HEAP32[(($22)>>2)]; + ; + return $23; + default: assert(0, "bad label: " + __label__); + } +} + + +function _update_model_5bpc($state, $bucket, $curval, $bpp) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $pcounters; + var $i; + var $bestcode; + var $bestcodelen; + var $ithcodelen; + $1=$state; + $2=$bucket; + $3=$curval; + $4=$bpp; + var $5=$2; + var $6=(($5)|0); + var $7=HEAP32[(($6)>>2)]; + $pcounters=$7; + var $8=$4; + var $9=(($8-1)|0); + $bestcode=$9; + var $10=$3; + var $11=$bestcode; + var $12=_golomb_code_len_5bpc($10, $11); + var $13=$bestcode; + var $14=$pcounters; + var $15=(($14+($13<<2))|0); + var $16=HEAP32[(($15)>>2)]; + var $17=(($16+$12)|0); + HEAP32[(($15)>>2)]=$17; + $bestcodelen=$17; + var $18=$4; + var $19=(($18-2)|0); + $i=$19; + __label__ = 2; break; + case 2: + var $21=$i; + var $22=$4; + var $23=(($21)>>>0) < (($22)>>>0); + if ($23) { __label__ = 3; break; } else { __label__ = 7; break; } + case 3: + var $25=$3; + var $26=$i; + var $27=_golomb_code_len_5bpc($25, $26); + var $28=$i; + var $29=$pcounters; + var $30=(($29+($28<<2))|0); + var $31=HEAP32[(($30)>>2)]; + var $32=(($31+$27)|0); + HEAP32[(($30)>>2)]=$32; + $ithcodelen=$32; + var $33=$ithcodelen; + var $34=$bestcodelen; + var $35=(($33)>>>0) < (($34)>>>0); + if ($35) { __label__ = 4; break; } else { __label__ = 5; break; } + case 4: + var $37=$i; + $bestcode=$37; + var $38=$ithcodelen; + $bestcodelen=$38; + __label__ = 5; break; + case 5: + __label__ = 6; break; + case 6: + var $41=$i; + var $42=(($41-1)|0); + $i=$42; + __label__ = 2; break; + case 7: + var $44=$bestcode; + var $45=$2; + var $46=(($45+4)|0); + HEAP32[(($46)>>2)]=$44; + var $47=$bestcodelen; + var $48=$1; + var $49=(($48+12)|0); + var $50=HEAPU32[(($49)>>2)]; + var $51=(($47)>>>0) > (($50)>>>0); + if ($51) { __label__ = 8; break; } else { __label__ = 13; break; } + case 8: + $i=0; + __label__ = 9; break; + case 9: + var $54=$i; + var $55=$4; + var $56=(($54)>>>0) < (($55)>>>0); + if ($56) { __label__ = 10; break; } else { __label__ = 12; break; } + case 10: + var $58=$i; + var $59=$pcounters; + var $60=(($59+($58<<2))|0); + var $61=HEAPU32[(($60)>>2)]; + var $62=$61 >>> 1; + HEAP32[(($60)>>2)]=$62; + __label__ = 11; break; + case 11: + var $64=$i; + var $65=(($64+1)|0); + $i=$65; + __label__ = 9; break; + case 12: + __label__ = 13; break; + case 13: + ; + return; + default: assert(0, "bad label: " + __label__); + } +} +_update_model_5bpc["X"]=1; + +function _decode_run($encoder) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $runlen; + var $temp; + var $hits; + $1=$encoder; + $runlen=0; + __label__ = 2; break; + case 2: + var $3=$1; + var $4=(($3+32)|0); + var $5=HEAPU32[(($4)>>2)]; + var $6=$5 >>> 24; + var $7=$6 ^ -1; + var $8=(($7) & 255); + var $9=(($8)&255); + var $10=((_zeroLUT+($9<<2))|0); + var $11=HEAP32[(($10)>>2)]; + $temp=$11; + $hits=1; + __label__ = 3; break; + case 3: + var $13=$hits; + var $14=$temp; + var $15=(($13)|0) <= (($14)|0); + if ($15) { __label__ = 4; break; } else { __label__ = 8; break; } + case 4: + var $17=$1; + var $18=(($17+360)|0); + var $19=(($18+32)|0); + var $20=HEAP32[(($19)>>2)]; + var $21=$runlen; + var $22=(($21+$20)|0); + $runlen=$22; + var $23=$1; + var $24=(($23+360)|0); + var $25=(($24+24)|0); + var $26=HEAP32[(($25)>>2)]; + var $27=(($26)|0) < 32; + if ($27) { __label__ = 5; break; } else { __label__ = 6; break; } + case 5: + var $29=$1; + var $30=(($29+360)|0); + var $31=(($30+24)|0); + var $32=HEAP32[(($31)>>2)]; + var $33=(($32+1)|0); + HEAP32[(($31)>>2)]=$33; + var $34=((_J+($33<<2))|0); + var $35=HEAP32[(($34)>>2)]; + var $36=$1; + var $37=(($36+360)|0); + var $38=(($37+28)|0); + HEAP32[(($38)>>2)]=$35; + var $39=$1; + var $40=(($39+360)|0); + var $41=(($40+28)|0); + var $42=HEAP32[(($41)>>2)]; + var $43=1 << $42; + var $44=$1; + var $45=(($44+360)|0); + var $46=(($45+32)|0); + HEAP32[(($46)>>2)]=$43; + __label__ = 6; break; + case 6: + __label__ = 7; break; + case 7: + var $49=$hits; + var $50=(($49+1)|0); + $hits=$50; + __label__ = 3; break; + case 8: + var $52=$temp; + var $53=(($52)|0)!=8; + if ($53) { __label__ = 9; break; } else { __label__ = 10; break; } + case 9: + var $55=$1; + var $56=$temp; + var $57=(($56+1)|0); + _decode_eatbits($55, $57); + __label__ = 12; break; + case 10: + var $59=$1; + _decode_eatbits($59, 8); + __label__ = 11; break; + case 11: + if (1) { __label__ = 2; break; } else { __label__ = 12; break; } + case 12: + var $62=$1; + var $63=(($62+360)|0); + var $64=(($63+28)|0); + var $65=HEAP32[(($64)>>2)]; + var $66=(($65)|0)!=0; + if ($66) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $68=$1; + var $69=(($68+32)|0); + var $70=HEAPU32[(($69)>>2)]; + var $71=$1; + var $72=(($71+360)|0); + var $73=(($72+28)|0); + var $74=HEAP32[(($73)>>2)]; + var $75=((32-$74)|0); + var $76=$70 >>> (($75)>>>0); + var $77=$runlen; + var $78=(($77+$76)|0); + $runlen=$78; + var $79=$1; + var $80=$1; + var $81=(($80+360)|0); + var $82=(($81+28)|0); + var $83=HEAP32[(($82)>>2)]; + _decode_eatbits($79, $83); + __label__ = 14; break; + case 14: + var $85=$1; + var $86=(($85+360)|0); + var $87=(($86+24)|0); + var $88=HEAP32[(($87)>>2)]; + var $89=(($88)|0)!=0; + if ($89) { __label__ = 15; break; } else { __label__ = 16; break; } + case 15: + var $91=$1; + var $92=(($91+360)|0); + var $93=(($92+24)|0); + var $94=HEAP32[(($93)>>2)]; + var $95=(($94-1)|0); + HEAP32[(($93)>>2)]=$95; + var $96=((_J+($95<<2))|0); + var $97=HEAP32[(($96)>>2)]; + var $98=$1; + var $99=(($98+360)|0); + var $100=(($99+28)|0); + HEAP32[(($100)>>2)]=$97; + var $101=$1; + var $102=(($101+360)|0); + var $103=(($102+28)|0); + var $104=HEAP32[(($103)>>2)]; + var $105=1 << $104; + var $106=$1; + var $107=(($106+360)|0); + var $108=(($107+32)|0); + HEAP32[(($108)>>2)]=$105; + __label__ = 16; break; + case 16: + var $110=$runlen; + ; + return $110; + default: assert(0, "bad label: " + __label__); + } +} +_decode_run["X"]=1; + +function _quic_rgb16_to_32_uncompress_row0_seg($encoder, $i, $cur_row, $end, $waitmask, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $stopidx; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$i; + $3=$cur_row; + $4=$end; + $5=$waitmask; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + __label__ = 2; break; + case 2: + var $25=$4; + var $26=$2; + var $27=(($25-$26)|0); + var $28=(($27)|0) > 0; + if ($28) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $32=$_g_boolean_var_; + var $33=(($32)==(1)); + var $34=(($33)|0)!=0; + if ($34) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str91)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row0_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $41=$2; + var $42=(($41)|0)!=0; + if ($42) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $44=$2; + var $45=$3; + var $46=(($45+($44<<2))|0); + var $47=(($46+3)|0); + HEAP8[($47)]=0; + var $48=$channel_r; + var $49=$correlate_row_r; + var $50=(($49-1)|0); + var $51=HEAPU8[($50)]; + var $52=(($51)&255); + var $53=_find_bucket_5bpc($48, $52); + var $54=(($53+4)|0); + var $55=HEAP32[(($54)>>2)]; + var $56=$1; + var $57=(($56+32)|0); + var $58=HEAP32[(($57)>>2)]; + var $59=_golomb_decoding_5bpc($55, $58, $codewordlen); + var $60=(($59) & 255); + var $61=$correlate_row_r; + var $62=(($61)|0); + HEAP8[($62)]=$60; + var $63=$correlate_row_r; + var $64=(($63)|0); + var $65=HEAPU8[($64)]; + var $66=(($65)&255); + var $67=((((_family_5bpc+384)|0)+($66<<2))|0); + var $68=HEAP32[(($67)>>2)]; + var $69=(($68) & 255); + var $70=(($69)&255); + var $71=$70 << 3; + var $72=$correlate_row_r; + var $73=(($72)|0); + var $74=HEAPU8[($73)]; + var $75=(($74)&255); + var $76=((((_family_5bpc+384)|0)+($75<<2))|0); + var $77=HEAP32[(($76)>>2)]; + var $78=(($77) & 255); + var $79=(($78)&255); + var $80=$79 & 31; + var $81=$80 >> 2; + var $82=$71 | $81; + var $83=(($82) & 255); + var $84=$3; + var $85=(($84)|0); + var $86=(($85+2)|0); + HEAP8[($86)]=$83; + var $87=$1; + var $88=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($87, $88); + var $89=$channel_g; + var $90=$correlate_row_g; + var $91=(($90-1)|0); + var $92=HEAPU8[($91)]; + var $93=(($92)&255); + var $94=_find_bucket_5bpc($89, $93); + var $95=(($94+4)|0); + var $96=HEAP32[(($95)>>2)]; + var $97=$1; + var $98=(($97+32)|0); + var $99=HEAP32[(($98)>>2)]; + var $100=_golomb_decoding_5bpc($96, $99, $codewordlen); + var $101=(($100) & 255); + var $102=$correlate_row_g; + var $103=(($102)|0); + HEAP8[($103)]=$101; + var $104=$correlate_row_g; + var $105=(($104)|0); + var $106=HEAPU8[($105)]; + var $107=(($106)&255); + var $108=((((_family_5bpc+384)|0)+($107<<2))|0); + var $109=HEAP32[(($108)>>2)]; + var $110=(($109) & 255); + var $111=(($110)&255); + var $112=$111 << 3; + var $113=$correlate_row_g; + var $114=(($113)|0); + var $115=HEAPU8[($114)]; + var $116=(($115)&255); + var $117=((((_family_5bpc+384)|0)+($116<<2))|0); + var $118=HEAP32[(($117)>>2)]; + var $119=(($118) & 255); + var $120=(($119)&255); + var $121=$120 & 31; + var $122=$121 >> 2; + var $123=$112 | $122; + var $124=(($123) & 255); + var $125=$3; + var $126=(($125)|0); + var $127=(($126+1)|0); + HEAP8[($127)]=$124; + var $128=$1; + var $129=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($128, $129); + var $130=$channel_b; + var $131=$correlate_row_b; + var $132=(($131-1)|0); + var $133=HEAPU8[($132)]; + var $134=(($133)&255); + var $135=_find_bucket_5bpc($130, $134); + var $136=(($135+4)|0); + var $137=HEAP32[(($136)>>2)]; + var $138=$1; + var $139=(($138+32)|0); + var $140=HEAP32[(($139)>>2)]; + var $141=_golomb_decoding_5bpc($137, $140, $codewordlen); + var $142=(($141) & 255); + var $143=$correlate_row_b; + var $144=(($143)|0); + HEAP8[($144)]=$142; + var $145=$correlate_row_b; + var $146=(($145)|0); + var $147=HEAPU8[($146)]; + var $148=(($147)&255); + var $149=((((_family_5bpc+384)|0)+($148<<2))|0); + var $150=HEAP32[(($149)>>2)]; + var $151=(($150) & 255); + var $152=(($151)&255); + var $153=$152 << 3; + var $154=$correlate_row_b; + var $155=(($154)|0); + var $156=HEAPU8[($155)]; + var $157=(($156)&255); + var $158=((((_family_5bpc+384)|0)+($157<<2))|0); + var $159=HEAP32[(($158)>>2)]; + var $160=(($159) & 255); + var $161=(($160)&255); + var $162=$161 & 31; + var $163=$162 >> 2; + var $164=$153 | $163; + var $165=(($164) & 255); + var $166=$3; + var $167=(($166)|0); + var $168=(($167)|0); + HEAP8[($168)]=$165; + var $169=$1; + var $170=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($169, $170); + var $171=$1; + var $172=(($171+360)|0); + var $173=(($172+4)|0); + var $174=HEAP32[(($173)>>2)]; + var $175=(($174)|0)!=0; + if ($175) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $177=$1; + var $178=(($177+360)|0); + var $179=(($178+4)|0); + var $180=HEAP32[(($179)>>2)]; + var $181=(($180-1)|0); + HEAP32[(($179)>>2)]=$181; + __label__ = 15; break; + case 14: + var $183=$1; + var $184=(($183+360)|0); + var $185=(($184+8)|0); + var $186=_tabrand($185); + var $187=$5; + var $188=$186 & $187; + var $189=$1; + var $190=(($189+360)|0); + var $191=(($190+4)|0); + HEAP32[(($191)>>2)]=$188; + var $192=$1; + var $193=(($192+360)|0); + var $194=$channel_r; + var $195=$correlate_row_r; + var $196=(($195-1)|0); + var $197=HEAPU8[($196)]; + var $198=(($197)&255); + var $199=_find_bucket_5bpc($194, $198); + var $200=$correlate_row_r; + var $201=(($200)|0); + var $202=HEAP8[($201)]; + var $203=$6; + _update_model_5bpc($193, $199, $202, $203); + var $204=$1; + var $205=(($204+360)|0); + var $206=$channel_g; + var $207=$correlate_row_g; + var $208=(($207-1)|0); + var $209=HEAPU8[($208)]; + var $210=(($209)&255); + var $211=_find_bucket_5bpc($206, $210); + var $212=$correlate_row_g; + var $213=(($212)|0); + var $214=HEAP8[($213)]; + var $215=$6; + _update_model_5bpc($205, $211, $214, $215); + var $216=$1; + var $217=(($216+360)|0); + var $218=$channel_b; + var $219=$correlate_row_b; + var $220=(($219-1)|0); + var $221=HEAPU8[($220)]; + var $222=(($221)&255); + var $223=_find_bucket_5bpc($218, $222); + var $224=$correlate_row_b; + var $225=(($224)|0); + var $226=HEAP8[($225)]; + var $227=$6; + _update_model_5bpc($217, $223, $226, $227); + __label__ = 15; break; + case 15: + var $229=$2; + var $230=(($229+1)|0); + $2=$230; + var $231=$1; + var $232=(($231+360)|0); + var $233=(($232+4)|0); + var $234=HEAP32[(($233)>>2)]; + var $235=(($230+$234)|0); + $stopidx=$235; + __label__ = 17; break; + case 16: + var $237=$2; + var $238=$1; + var $239=(($238+360)|0); + var $240=(($239+4)|0); + var $241=HEAP32[(($240)>>2)]; + var $242=(($237+$241)|0); + $stopidx=$242; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + var $245=$stopidx; + var $246=$4; + var $247=(($245)|0) < (($246)|0); + if ($247) { __label__ = 19; break; } else { __label__ = 24; break; } + case 19: + __label__ = 20; break; + case 20: + var $250=$2; + var $251=$stopidx; + var $252=(($250)|0) <= (($251)|0); + if ($252) { __label__ = 21; break; } else { __label__ = 23; break; } + case 21: + var $254=$2; + var $255=$3; + var $256=(($255+($254<<2))|0); + var $257=(($256+3)|0); + HEAP8[($257)]=0; + var $258=$channel_r; + var $259=$2; + var $260=(($259-1)|0); + var $261=$correlate_row_r; + var $262=(($261+$260)|0); + var $263=HEAPU8[($262)]; + var $264=(($263)&255); + var $265=_find_bucket_5bpc($258, $264); + var $266=(($265+4)|0); + var $267=HEAP32[(($266)>>2)]; + var $268=$1; + var $269=(($268+32)|0); + var $270=HEAP32[(($269)>>2)]; + var $271=_golomb_decoding_5bpc($267, $270, $codewordlen1); + var $272=(($271) & 255); + var $273=$2; + var $274=$correlate_row_r; + var $275=(($274+$273)|0); + HEAP8[($275)]=$272; + var $276=$2; + var $277=$correlate_row_r; + var $278=(($277+$276)|0); + var $279=HEAPU8[($278)]; + var $280=(($279)&255); + var $281=((((_family_5bpc+384)|0)+($280<<2))|0); + var $282=HEAP32[(($281)>>2)]; + var $283=$2; + var $284=$3; + var $285=(($284+($283<<2))|0); + var $286=(($285-4)|0); + var $287=(($286+2)|0); + var $288=HEAPU8[($287)]; + var $289=(($288)&255); + var $290=$289 >> 3; + var $291=(($282+$290)|0); + var $292=$7; + var $293=$291 & $292; + var $294=$293 << 3; + var $295=$2; + var $296=$correlate_row_r; + var $297=(($296+$295)|0); + var $298=HEAPU8[($297)]; + var $299=(($298)&255); + var $300=((((_family_5bpc+384)|0)+($299<<2))|0); + var $301=HEAP32[(($300)>>2)]; + var $302=$2; + var $303=$3; + var $304=(($303+($302<<2))|0); + var $305=(($304-4)|0); + var $306=(($305+2)|0); + var $307=HEAPU8[($306)]; + var $308=(($307)&255); + var $309=$308 >> 3; + var $310=(($301+$309)|0); + var $311=$7; + var $312=$310 & $311; + var $313=$312 & 31; + var $314=$313 >>> 2; + var $315=$294 | $314; + var $316=(($315) & 255); + var $317=$2; + var $318=$3; + var $319=(($318+($317<<2))|0); + var $320=(($319+2)|0); + HEAP8[($320)]=$316; + var $321=$1; + var $322=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($321, $322); + var $323=$channel_g; + var $324=$2; + var $325=(($324-1)|0); + var $326=$correlate_row_g; + var $327=(($326+$325)|0); + var $328=HEAPU8[($327)]; + var $329=(($328)&255); + var $330=_find_bucket_5bpc($323, $329); + var $331=(($330+4)|0); + var $332=HEAP32[(($331)>>2)]; + var $333=$1; + var $334=(($333+32)|0); + var $335=HEAP32[(($334)>>2)]; + var $336=_golomb_decoding_5bpc($332, $335, $codewordlen1); + var $337=(($336) & 255); + var $338=$2; + var $339=$correlate_row_g; + var $340=(($339+$338)|0); + HEAP8[($340)]=$337; + var $341=$2; + var $342=$correlate_row_g; + var $343=(($342+$341)|0); + var $344=HEAPU8[($343)]; + var $345=(($344)&255); + var $346=((((_family_5bpc+384)|0)+($345<<2))|0); + var $347=HEAP32[(($346)>>2)]; + var $348=$2; + var $349=$3; + var $350=(($349+($348<<2))|0); + var $351=(($350-4)|0); + var $352=(($351+1)|0); + var $353=HEAPU8[($352)]; + var $354=(($353)&255); + var $355=$354 >> 3; + var $356=(($347+$355)|0); + var $357=$7; + var $358=$356 & $357; + var $359=$358 << 3; + var $360=$2; + var $361=$correlate_row_g; + var $362=(($361+$360)|0); + var $363=HEAPU8[($362)]; + var $364=(($363)&255); + var $365=((((_family_5bpc+384)|0)+($364<<2))|0); + var $366=HEAP32[(($365)>>2)]; + var $367=$2; + var $368=$3; + var $369=(($368+($367<<2))|0); + var $370=(($369-4)|0); + var $371=(($370+1)|0); + var $372=HEAPU8[($371)]; + var $373=(($372)&255); + var $374=$373 >> 3; + var $375=(($366+$374)|0); + var $376=$7; + var $377=$375 & $376; + var $378=$377 & 31; + var $379=$378 >>> 2; + var $380=$359 | $379; + var $381=(($380) & 255); + var $382=$2; + var $383=$3; + var $384=(($383+($382<<2))|0); + var $385=(($384+1)|0); + HEAP8[($385)]=$381; + var $386=$1; + var $387=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($386, $387); + var $388=$channel_b; + var $389=$2; + var $390=(($389-1)|0); + var $391=$correlate_row_b; + var $392=(($391+$390)|0); + var $393=HEAPU8[($392)]; + var $394=(($393)&255); + var $395=_find_bucket_5bpc($388, $394); + var $396=(($395+4)|0); + var $397=HEAP32[(($396)>>2)]; + var $398=$1; + var $399=(($398+32)|0); + var $400=HEAP32[(($399)>>2)]; + var $401=_golomb_decoding_5bpc($397, $400, $codewordlen1); + var $402=(($401) & 255); + var $403=$2; + var $404=$correlate_row_b; + var $405=(($404+$403)|0); + HEAP8[($405)]=$402; + var $406=$2; + var $407=$correlate_row_b; + var $408=(($407+$406)|0); + var $409=HEAPU8[($408)]; + var $410=(($409)&255); + var $411=((((_family_5bpc+384)|0)+($410<<2))|0); + var $412=HEAP32[(($411)>>2)]; + var $413=$2; + var $414=$3; + var $415=(($414+($413<<2))|0); + var $416=(($415-4)|0); + var $417=(($416)|0); + var $418=HEAPU8[($417)]; + var $419=(($418)&255); + var $420=$419 >> 3; + var $421=(($412+$420)|0); + var $422=$7; + var $423=$421 & $422; + var $424=$423 << 3; + var $425=$2; + var $426=$correlate_row_b; + var $427=(($426+$425)|0); + var $428=HEAPU8[($427)]; + var $429=(($428)&255); + var $430=((((_family_5bpc+384)|0)+($429<<2))|0); + var $431=HEAP32[(($430)>>2)]; + var $432=$2; + var $433=$3; + var $434=(($433+($432<<2))|0); + var $435=(($434-4)|0); + var $436=(($435)|0); + var $437=HEAPU8[($436)]; + var $438=(($437)&255); + var $439=$438 >> 3; + var $440=(($431+$439)|0); + var $441=$7; + var $442=$440 & $441; + var $443=$442 & 31; + var $444=$443 >>> 2; + var $445=$424 | $444; + var $446=(($445) & 255); + var $447=$2; + var $448=$3; + var $449=(($448+($447<<2))|0); + var $450=(($449)|0); + HEAP8[($450)]=$446; + var $451=$1; + var $452=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($451, $452); + __label__ = 22; break; + case 22: + var $454=$2; + var $455=(($454+1)|0); + $2=$455; + __label__ = 20; break; + case 23: + var $457=$1; + var $458=(($457+360)|0); + var $459=$channel_r; + var $460=$stopidx; + var $461=(($460-1)|0); + var $462=$correlate_row_r; + var $463=(($462+$461)|0); + var $464=HEAPU8[($463)]; + var $465=(($464)&255); + var $466=_find_bucket_5bpc($459, $465); + var $467=$stopidx; + var $468=$correlate_row_r; + var $469=(($468+$467)|0); + var $470=HEAP8[($469)]; + var $471=$6; + _update_model_5bpc($458, $466, $470, $471); + var $472=$1; + var $473=(($472+360)|0); + var $474=$channel_g; + var $475=$stopidx; + var $476=(($475-1)|0); + var $477=$correlate_row_g; + var $478=(($477+$476)|0); + var $479=HEAPU8[($478)]; + var $480=(($479)&255); + var $481=_find_bucket_5bpc($474, $480); + var $482=$stopidx; + var $483=$correlate_row_g; + var $484=(($483+$482)|0); + var $485=HEAP8[($484)]; + var $486=$6; + _update_model_5bpc($473, $481, $485, $486); + var $487=$1; + var $488=(($487+360)|0); + var $489=$channel_b; + var $490=$stopidx; + var $491=(($490-1)|0); + var $492=$correlate_row_b; + var $493=(($492+$491)|0); + var $494=HEAPU8[($493)]; + var $495=(($494)&255); + var $496=_find_bucket_5bpc($489, $495); + var $497=$stopidx; + var $498=$correlate_row_b; + var $499=(($498+$497)|0); + var $500=HEAP8[($499)]; + var $501=$6; + _update_model_5bpc($488, $496, $500, $501); + var $502=$2; + var $503=$1; + var $504=(($503+360)|0); + var $505=(($504+8)|0); + var $506=_tabrand($505); + var $507=$5; + var $508=$506 & $507; + var $509=(($502+$508)|0); + $stopidx=$509; + __label__ = 18; break; + case 24: + __label__ = 25; break; + case 25: + var $512=$2; + var $513=$4; + var $514=(($512)|0) < (($513)|0); + if ($514) { __label__ = 26; break; } else { __label__ = 28; break; } + case 26: + var $516=$2; + var $517=$3; + var $518=(($517+($516<<2))|0); + var $519=(($518+3)|0); + HEAP8[($519)]=0; + var $520=$channel_r; + var $521=$2; + var $522=(($521-1)|0); + var $523=$correlate_row_r; + var $524=(($523+$522)|0); + var $525=HEAPU8[($524)]; + var $526=(($525)&255); + var $527=_find_bucket_5bpc($520, $526); + var $528=(($527+4)|0); + var $529=HEAP32[(($528)>>2)]; + var $530=$1; + var $531=(($530+32)|0); + var $532=HEAP32[(($531)>>2)]; + var $533=_golomb_decoding_5bpc($529, $532, $codewordlen2); + var $534=(($533) & 255); + var $535=$2; + var $536=$correlate_row_r; + var $537=(($536+$535)|0); + HEAP8[($537)]=$534; + var $538=$2; + var $539=$correlate_row_r; + var $540=(($539+$538)|0); + var $541=HEAPU8[($540)]; + var $542=(($541)&255); + var $543=((((_family_5bpc+384)|0)+($542<<2))|0); + var $544=HEAP32[(($543)>>2)]; + var $545=$2; + var $546=$3; + var $547=(($546+($545<<2))|0); + var $548=(($547-4)|0); + var $549=(($548+2)|0); + var $550=HEAPU8[($549)]; + var $551=(($550)&255); + var $552=$551 >> 3; + var $553=(($544+$552)|0); + var $554=$7; + var $555=$553 & $554; + var $556=$555 << 3; + var $557=$2; + var $558=$correlate_row_r; + var $559=(($558+$557)|0); + var $560=HEAPU8[($559)]; + var $561=(($560)&255); + var $562=((((_family_5bpc+384)|0)+($561<<2))|0); + var $563=HEAP32[(($562)>>2)]; + var $564=$2; + var $565=$3; + var $566=(($565+($564<<2))|0); + var $567=(($566-4)|0); + var $568=(($567+2)|0); + var $569=HEAPU8[($568)]; + var $570=(($569)&255); + var $571=$570 >> 3; + var $572=(($563+$571)|0); + var $573=$7; + var $574=$572 & $573; + var $575=$574 & 31; + var $576=$575 >>> 2; + var $577=$556 | $576; + var $578=(($577) & 255); + var $579=$2; + var $580=$3; + var $581=(($580+($579<<2))|0); + var $582=(($581+2)|0); + HEAP8[($582)]=$578; + var $583=$1; + var $584=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($583, $584); + var $585=$channel_g; + var $586=$2; + var $587=(($586-1)|0); + var $588=$correlate_row_g; + var $589=(($588+$587)|0); + var $590=HEAPU8[($589)]; + var $591=(($590)&255); + var $592=_find_bucket_5bpc($585, $591); + var $593=(($592+4)|0); + var $594=HEAP32[(($593)>>2)]; + var $595=$1; + var $596=(($595+32)|0); + var $597=HEAP32[(($596)>>2)]; + var $598=_golomb_decoding_5bpc($594, $597, $codewordlen2); + var $599=(($598) & 255); + var $600=$2; + var $601=$correlate_row_g; + var $602=(($601+$600)|0); + HEAP8[($602)]=$599; + var $603=$2; + var $604=$correlate_row_g; + var $605=(($604+$603)|0); + var $606=HEAPU8[($605)]; + var $607=(($606)&255); + var $608=((((_family_5bpc+384)|0)+($607<<2))|0); + var $609=HEAP32[(($608)>>2)]; + var $610=$2; + var $611=$3; + var $612=(($611+($610<<2))|0); + var $613=(($612-4)|0); + var $614=(($613+1)|0); + var $615=HEAPU8[($614)]; + var $616=(($615)&255); + var $617=$616 >> 3; + var $618=(($609+$617)|0); + var $619=$7; + var $620=$618 & $619; + var $621=$620 << 3; + var $622=$2; + var $623=$correlate_row_g; + var $624=(($623+$622)|0); + var $625=HEAPU8[($624)]; + var $626=(($625)&255); + var $627=((((_family_5bpc+384)|0)+($626<<2))|0); + var $628=HEAP32[(($627)>>2)]; + var $629=$2; + var $630=$3; + var $631=(($630+($629<<2))|0); + var $632=(($631-4)|0); + var $633=(($632+1)|0); + var $634=HEAPU8[($633)]; + var $635=(($634)&255); + var $636=$635 >> 3; + var $637=(($628+$636)|0); + var $638=$7; + var $639=$637 & $638; + var $640=$639 & 31; + var $641=$640 >>> 2; + var $642=$621 | $641; + var $643=(($642) & 255); + var $644=$2; + var $645=$3; + var $646=(($645+($644<<2))|0); + var $647=(($646+1)|0); + HEAP8[($647)]=$643; + var $648=$1; + var $649=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($648, $649); + var $650=$channel_b; + var $651=$2; + var $652=(($651-1)|0); + var $653=$correlate_row_b; + var $654=(($653+$652)|0); + var $655=HEAPU8[($654)]; + var $656=(($655)&255); + var $657=_find_bucket_5bpc($650, $656); + var $658=(($657+4)|0); + var $659=HEAP32[(($658)>>2)]; + var $660=$1; + var $661=(($660+32)|0); + var $662=HEAP32[(($661)>>2)]; + var $663=_golomb_decoding_5bpc($659, $662, $codewordlen2); + var $664=(($663) & 255); + var $665=$2; + var $666=$correlate_row_b; + var $667=(($666+$665)|0); + HEAP8[($667)]=$664; + var $668=$2; + var $669=$correlate_row_b; + var $670=(($669+$668)|0); + var $671=HEAPU8[($670)]; + var $672=(($671)&255); + var $673=((((_family_5bpc+384)|0)+($672<<2))|0); + var $674=HEAP32[(($673)>>2)]; + var $675=$2; + var $676=$3; + var $677=(($676+($675<<2))|0); + var $678=(($677-4)|0); + var $679=(($678)|0); + var $680=HEAPU8[($679)]; + var $681=(($680)&255); + var $682=$681 >> 3; + var $683=(($674+$682)|0); + var $684=$7; + var $685=$683 & $684; + var $686=$685 << 3; + var $687=$2; + var $688=$correlate_row_b; + var $689=(($688+$687)|0); + var $690=HEAPU8[($689)]; + var $691=(($690)&255); + var $692=((((_family_5bpc+384)|0)+($691<<2))|0); + var $693=HEAP32[(($692)>>2)]; + var $694=$2; + var $695=$3; + var $696=(($695+($694<<2))|0); + var $697=(($696-4)|0); + var $698=(($697)|0); + var $699=HEAPU8[($698)]; + var $700=(($699)&255); + var $701=$700 >> 3; + var $702=(($693+$701)|0); + var $703=$7; + var $704=$702 & $703; + var $705=$704 & 31; + var $706=$705 >>> 2; + var $707=$686 | $706; + var $708=(($707) & 255); + var $709=$2; + var $710=$3; + var $711=(($710+($709<<2))|0); + var $712=(($711)|0); + HEAP8[($712)]=$708; + var $713=$1; + var $714=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($713, $714); + __label__ = 27; break; + case 27: + var $716=$2; + var $717=(($716+1)|0); + $2=$717; + __label__ = 25; break; + case 28: + var $719=$stopidx; + var $720=$4; + var $721=(($719-$720)|0); + var $722=$1; + var $723=(($722+360)|0); + var $724=(($723+4)|0); + HEAP32[(($724)>>2)]=$721; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_to_32_uncompress_row0_seg["X"]=1; + +function _quic_rgb16_uncompress_row_seg($encoder, $prev_row, $cur_row, $i, $end, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $waitmask; + var $stopidx; + var $run_index; + var $run_end; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$i; + $5=$end; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + var $24=$1; + var $25=(($24+360)|0); + var $26=(($25+16)|0); + var $27=HEAP32[(($26)>>2)]; + var $28=((_bppmask+($27<<2))|0); + var $29=HEAP32[(($28)>>2)]; + $waitmask=$29; + $run_index=0; + __label__ = 2; break; + case 2: + var $31=$5; + var $32=$4; + var $33=(($31-$32)|0); + var $34=(($33)|0) > 0; + if ($34) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $38=$_g_boolean_var_; + var $39=(($38)==(1)); + var $40=(($39)|0)!=0; + if ($40) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str87)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $47=$4; + var $48=(($47)|0)!=0; + if ($48) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $50=$4; + var $51=$3; + var $52=(($51+($50<<1))|0); + HEAP16[(($52)>>1)]=0; + var $53=$channel_r; + var $54=$correlate_row_r; + var $55=(($54-1)|0); + var $56=HEAPU8[($55)]; + var $57=(($56)&255); + var $58=_find_bucket_5bpc($53, $57); + var $59=(($58+4)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=$1; + var $62=(($61+32)|0); + var $63=HEAP32[(($62)>>2)]; + var $64=_golomb_decoding_5bpc($60, $63, $codewordlen); + var $65=(($64) & 255); + var $66=$correlate_row_r; + var $67=(($66)|0); + HEAP8[($67)]=$65; + var $68=$3; + var $69=(($68)|0); + var $70=HEAPU16[(($69)>>1)]; + var $71=(($70)&65535); + var $72=$71 & -31745; + var $73=$correlate_row_r; + var $74=(($73)|0); + var $75=HEAPU8[($74)]; + var $76=(($75)&255); + var $77=((((_family_5bpc+384)|0)+($76<<2))|0); + var $78=HEAP32[(($77)>>2)]; + var $79=$2; + var $80=HEAPU16[(($79)>>1)]; + var $81=(($80)&65535); + var $82=$81 >> 10; + var $83=$82 & 31; + var $84=(($78+$83)|0); + var $85=$7; + var $86=$84 & $85; + var $87=$86 << 10; + var $88=$72 | $87; + var $89=(($88) & 65535); + var $90=$3; + var $91=(($90)|0); + HEAP16[(($91)>>1)]=$89; + var $92=$1; + var $93=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($92, $93); + var $94=$channel_g; + var $95=$correlate_row_g; + var $96=(($95-1)|0); + var $97=HEAPU8[($96)]; + var $98=(($97)&255); + var $99=_find_bucket_5bpc($94, $98); + var $100=(($99+4)|0); + var $101=HEAP32[(($100)>>2)]; + var $102=$1; + var $103=(($102+32)|0); + var $104=HEAP32[(($103)>>2)]; + var $105=_golomb_decoding_5bpc($101, $104, $codewordlen); + var $106=(($105) & 255); + var $107=$correlate_row_g; + var $108=(($107)|0); + HEAP8[($108)]=$106; + var $109=$3; + var $110=(($109)|0); + var $111=HEAPU16[(($110)>>1)]; + var $112=(($111)&65535); + var $113=$112 & -993; + var $114=$correlate_row_g; + var $115=(($114)|0); + var $116=HEAPU8[($115)]; + var $117=(($116)&255); + var $118=((((_family_5bpc+384)|0)+($117<<2))|0); + var $119=HEAP32[(($118)>>2)]; + var $120=$2; + var $121=HEAPU16[(($120)>>1)]; + var $122=(($121)&65535); + var $123=$122 >> 5; + var $124=$123 & 31; + var $125=(($119+$124)|0); + var $126=$7; + var $127=$125 & $126; + var $128=$127 << 5; + var $129=$113 | $128; + var $130=(($129) & 65535); + var $131=$3; + var $132=(($131)|0); + HEAP16[(($132)>>1)]=$130; + var $133=$1; + var $134=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($133, $134); + var $135=$channel_b; + var $136=$correlate_row_b; + var $137=(($136-1)|0); + var $138=HEAPU8[($137)]; + var $139=(($138)&255); + var $140=_find_bucket_5bpc($135, $139); + var $141=(($140+4)|0); + var $142=HEAP32[(($141)>>2)]; + var $143=$1; + var $144=(($143+32)|0); + var $145=HEAP32[(($144)>>2)]; + var $146=_golomb_decoding_5bpc($142, $145, $codewordlen); + var $147=(($146) & 255); + var $148=$correlate_row_b; + var $149=(($148)|0); + HEAP8[($149)]=$147; + var $150=$3; + var $151=(($150)|0); + var $152=HEAPU16[(($151)>>1)]; + var $153=(($152)&65535); + var $154=$153 & -32; + var $155=$correlate_row_b; + var $156=(($155)|0); + var $157=HEAPU8[($156)]; + var $158=(($157)&255); + var $159=((((_family_5bpc+384)|0)+($158<<2))|0); + var $160=HEAP32[(($159)>>2)]; + var $161=$2; + var $162=HEAPU16[(($161)>>1)]; + var $163=(($162)&65535); + var $164=$163 & 31; + var $165=(($160+$164)|0); + var $166=$7; + var $167=$165 & $166; + var $168=$154 | $167; + var $169=(($168) & 65535); + var $170=$3; + var $171=(($170)|0); + HEAP16[(($171)>>1)]=$169; + var $172=$1; + var $173=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($172, $173); + var $174=$1; + var $175=(($174+360)|0); + var $176=(($175+4)|0); + var $177=HEAP32[(($176)>>2)]; + var $178=(($177)|0)!=0; + if ($178) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $180=$1; + var $181=(($180+360)|0); + var $182=(($181+4)|0); + var $183=HEAP32[(($182)>>2)]; + var $184=(($183-1)|0); + HEAP32[(($182)>>2)]=$184; + __label__ = 15; break; + case 14: + var $186=$1; + var $187=(($186+360)|0); + var $188=(($187+8)|0); + var $189=_tabrand($188); + var $190=$waitmask; + var $191=$189 & $190; + var $192=$1; + var $193=(($192+360)|0); + var $194=(($193+4)|0); + HEAP32[(($194)>>2)]=$191; + var $195=$1; + var $196=(($195+360)|0); + var $197=$channel_r; + var $198=$correlate_row_r; + var $199=(($198-1)|0); + var $200=HEAPU8[($199)]; + var $201=(($200)&255); + var $202=_find_bucket_5bpc($197, $201); + var $203=$correlate_row_r; + var $204=(($203)|0); + var $205=HEAP8[($204)]; + var $206=$6; + _update_model_5bpc($196, $202, $205, $206); + var $207=$1; + var $208=(($207+360)|0); + var $209=$channel_g; + var $210=$correlate_row_g; + var $211=(($210-1)|0); + var $212=HEAPU8[($211)]; + var $213=(($212)&255); + var $214=_find_bucket_5bpc($209, $213); + var $215=$correlate_row_g; + var $216=(($215)|0); + var $217=HEAP8[($216)]; + var $218=$6; + _update_model_5bpc($208, $214, $217, $218); + var $219=$1; + var $220=(($219+360)|0); + var $221=$channel_b; + var $222=$correlate_row_b; + var $223=(($222-1)|0); + var $224=HEAPU8[($223)]; + var $225=(($224)&255); + var $226=_find_bucket_5bpc($221, $225); + var $227=$correlate_row_b; + var $228=(($227)|0); + var $229=HEAP8[($228)]; + var $230=$6; + _update_model_5bpc($220, $226, $229, $230); + __label__ = 15; break; + case 15: + var $232=$4; + var $233=(($232+1)|0); + $4=$233; + var $234=$1; + var $235=(($234+360)|0); + var $236=(($235+4)|0); + var $237=HEAP32[(($236)>>2)]; + var $238=(($233+$237)|0); + $stopidx=$238; + __label__ = 17; break; + case 16: + var $240=$4; + var $241=$1; + var $242=(($241+360)|0); + var $243=(($242+4)|0); + var $244=HEAP32[(($243)>>2)]; + var $245=(($240+$244)|0); + $stopidx=$245; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + var $249=$stopidx; + var $250=$5; + var $251=(($249)|0) < (($250)|0); + if ($251) { __label__ = 20; break; } else { __label__ = 35; break; } + case 20: + __label__ = 21; break; + case 21: + var $254=$4; + var $255=$stopidx; + var $256=(($254)|0) <= (($255)|0); + if ($256) { __label__ = 22; break; } else { __label__ = 34; break; } + case 22: + var $258=$4; + var $259=(($258-1)|0); + var $260=$2; + var $261=(($260+($259<<1))|0); + var $262=HEAPU16[(($261)>>1)]; + var $263=(($262)&65535); + var $264=$263 >> 10; + var $265=$264 & 31; + var $266=$4; + var $267=$2; + var $268=(($267+($266<<1))|0); + var $269=HEAPU16[(($268)>>1)]; + var $270=(($269)&65535); + var $271=$270 >> 10; + var $272=$271 & 31; + var $273=(($265)|0)==(($272)|0); + if ($273) { __label__ = 23; break; } else { __label__ = 32; break; } + case 23: + var $275=$4; + var $276=(($275-1)|0); + var $277=$2; + var $278=(($277+($276<<1))|0); + var $279=HEAPU16[(($278)>>1)]; + var $280=(($279)&65535); + var $281=$280 >> 5; + var $282=$281 & 31; + var $283=$4; + var $284=$2; + var $285=(($284+($283<<1))|0); + var $286=HEAPU16[(($285)>>1)]; + var $287=(($286)&65535); + var $288=$287 >> 5; + var $289=$288 & 31; + var $290=(($282)|0)==(($289)|0); + if ($290) { __label__ = 24; break; } else { __label__ = 32; break; } + case 24: + var $292=$4; + var $293=(($292-1)|0); + var $294=$2; + var $295=(($294+($293<<1))|0); + var $296=HEAPU16[(($295)>>1)]; + var $297=(($296)&65535); + var $298=$297 & 31; + var $299=$4; + var $300=$2; + var $301=(($300+($299<<1))|0); + var $302=HEAPU16[(($301)>>1)]; + var $303=(($302)&65535); + var $304=$303 & 31; + var $305=(($298)|0)==(($304)|0); + if ($305) { __label__ = 25; break; } else { __label__ = 32; break; } + case 25: + var $307=$run_index; + var $308=$4; + var $309=(($307)|0)!=(($308)|0); + if ($309) { __label__ = 26; break; } else { __label__ = 31; break; } + case 26: + var $311=$4; + var $312=(($311)|0) > 2; + if ($312) { __label__ = 27; break; } else { __label__ = 31; break; } + case 27: + var $314=$4; + var $315=(($314-1)|0); + var $316=$3; + var $317=(($316+($315<<1))|0); + var $318=HEAPU16[(($317)>>1)]; + var $319=(($318)&65535); + var $320=$319 >> 10; + var $321=$320 & 31; + var $322=$4; + var $323=(($322-2)|0); + var $324=$3; + var $325=(($324+($323<<1))|0); + var $326=HEAPU16[(($325)>>1)]; + var $327=(($326)&65535); + var $328=$327 >> 10; + var $329=$328 & 31; + var $330=(($321)|0)==(($329)|0); + if ($330) { __label__ = 28; break; } else { __label__ = 31; break; } + case 28: + var $332=$4; + var $333=(($332-1)|0); + var $334=$3; + var $335=(($334+($333<<1))|0); + var $336=HEAPU16[(($335)>>1)]; + var $337=(($336)&65535); + var $338=$337 >> 5; + var $339=$338 & 31; + var $340=$4; + var $341=(($340-2)|0); + var $342=$3; + var $343=(($342+($341<<1))|0); + var $344=HEAPU16[(($343)>>1)]; + var $345=(($344)&65535); + var $346=$345 >> 5; + var $347=$346 & 31; + var $348=(($339)|0)==(($347)|0); + if ($348) { __label__ = 29; break; } else { __label__ = 31; break; } + case 29: + var $350=$4; + var $351=(($350-1)|0); + var $352=$3; + var $353=(($352+($351<<1))|0); + var $354=HEAPU16[(($353)>>1)]; + var $355=(($354)&65535); + var $356=$355 & 31; + var $357=$4; + var $358=(($357-2)|0); + var $359=$3; + var $360=(($359+($358<<1))|0); + var $361=HEAPU16[(($360)>>1)]; + var $362=(($361)&65535); + var $363=$362 & 31; + var $364=(($356)|0)==(($363)|0); + if ($364) { __label__ = 30; break; } else { __label__ = 31; break; } + case 30: + __label__ = 50; break; + case 31: + __label__ = 32; break; + case 32: + var $368=$4; + var $369=$3; + var $370=(($369+($368<<1))|0); + HEAP16[(($370)>>1)]=0; + var $371=$channel_r; + var $372=$4; + var $373=(($372-1)|0); + var $374=$correlate_row_r; + var $375=(($374+$373)|0); + var $376=HEAPU8[($375)]; + var $377=(($376)&255); + var $378=_find_bucket_5bpc($371, $377); + var $379=(($378+4)|0); + var $380=HEAP32[(($379)>>2)]; + var $381=$1; + var $382=(($381+32)|0); + var $383=HEAP32[(($382)>>2)]; + var $384=_golomb_decoding_5bpc($380, $383, $codewordlen1); + var $385=(($384) & 255); + var $386=$4; + var $387=$correlate_row_r; + var $388=(($387+$386)|0); + HEAP8[($388)]=$385; + var $389=$4; + var $390=$3; + var $391=(($390+($389<<1))|0); + var $392=HEAPU16[(($391)>>1)]; + var $393=(($392)&65535); + var $394=$393 & -31745; + var $395=$4; + var $396=$correlate_row_r; + var $397=(($396+$395)|0); + var $398=HEAPU8[($397)]; + var $399=(($398)&255); + var $400=((((_family_5bpc+384)|0)+($399<<2))|0); + var $401=HEAP32[(($400)>>2)]; + var $402=$4; + var $403=$3; + var $404=(($403+($402<<1))|0); + var $405=(($404-2)|0); + var $406=HEAPU16[(($405)>>1)]; + var $407=(($406)&65535); + var $408=$407 >> 10; + var $409=$408 & 31; + var $410=$4; + var $411=$2; + var $412=(($411+($410<<1))|0); + var $413=HEAPU16[(($412)>>1)]; + var $414=(($413)&65535); + var $415=$414 >> 10; + var $416=$415 & 31; + var $417=(($409+$416)|0); + var $418=$417 >>> 1; + var $419=(($401+$418)|0); + var $420=$7; + var $421=$419 & $420; + var $422=$421 << 10; + var $423=$394 | $422; + var $424=(($423) & 65535); + var $425=$4; + var $426=$3; + var $427=(($426+($425<<1))|0); + HEAP16[(($427)>>1)]=$424; + var $428=$1; + var $429=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($428, $429); + var $430=$channel_g; + var $431=$4; + var $432=(($431-1)|0); + var $433=$correlate_row_g; + var $434=(($433+$432)|0); + var $435=HEAPU8[($434)]; + var $436=(($435)&255); + var $437=_find_bucket_5bpc($430, $436); + var $438=(($437+4)|0); + var $439=HEAP32[(($438)>>2)]; + var $440=$1; + var $441=(($440+32)|0); + var $442=HEAP32[(($441)>>2)]; + var $443=_golomb_decoding_5bpc($439, $442, $codewordlen1); + var $444=(($443) & 255); + var $445=$4; + var $446=$correlate_row_g; + var $447=(($446+$445)|0); + HEAP8[($447)]=$444; + var $448=$4; + var $449=$3; + var $450=(($449+($448<<1))|0); + var $451=HEAPU16[(($450)>>1)]; + var $452=(($451)&65535); + var $453=$452 & -993; + var $454=$4; + var $455=$correlate_row_g; + var $456=(($455+$454)|0); + var $457=HEAPU8[($456)]; + var $458=(($457)&255); + var $459=((((_family_5bpc+384)|0)+($458<<2))|0); + var $460=HEAP32[(($459)>>2)]; + var $461=$4; + var $462=$3; + var $463=(($462+($461<<1))|0); + var $464=(($463-2)|0); + var $465=HEAPU16[(($464)>>1)]; + var $466=(($465)&65535); + var $467=$466 >> 5; + var $468=$467 & 31; + var $469=$4; + var $470=$2; + var $471=(($470+($469<<1))|0); + var $472=HEAPU16[(($471)>>1)]; + var $473=(($472)&65535); + var $474=$473 >> 5; + var $475=$474 & 31; + var $476=(($468+$475)|0); + var $477=$476 >>> 1; + var $478=(($460+$477)|0); + var $479=$7; + var $480=$478 & $479; + var $481=$480 << 5; + var $482=$453 | $481; + var $483=(($482) & 65535); + var $484=$4; + var $485=$3; + var $486=(($485+($484<<1))|0); + HEAP16[(($486)>>1)]=$483; + var $487=$1; + var $488=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($487, $488); + var $489=$channel_b; + var $490=$4; + var $491=(($490-1)|0); + var $492=$correlate_row_b; + var $493=(($492+$491)|0); + var $494=HEAPU8[($493)]; + var $495=(($494)&255); + var $496=_find_bucket_5bpc($489, $495); + var $497=(($496+4)|0); + var $498=HEAP32[(($497)>>2)]; + var $499=$1; + var $500=(($499+32)|0); + var $501=HEAP32[(($500)>>2)]; + var $502=_golomb_decoding_5bpc($498, $501, $codewordlen1); + var $503=(($502) & 255); + var $504=$4; + var $505=$correlate_row_b; + var $506=(($505+$504)|0); + HEAP8[($506)]=$503; + var $507=$4; + var $508=$3; + var $509=(($508+($507<<1))|0); + var $510=HEAPU16[(($509)>>1)]; + var $511=(($510)&65535); + var $512=$511 & -32; + var $513=$4; + var $514=$correlate_row_b; + var $515=(($514+$513)|0); + var $516=HEAPU8[($515)]; + var $517=(($516)&255); + var $518=((((_family_5bpc+384)|0)+($517<<2))|0); + var $519=HEAP32[(($518)>>2)]; + var $520=$4; + var $521=$3; + var $522=(($521+($520<<1))|0); + var $523=(($522-2)|0); + var $524=HEAPU16[(($523)>>1)]; + var $525=(($524)&65535); + var $526=$525 & 31; + var $527=$4; + var $528=$2; + var $529=(($528+($527<<1))|0); + var $530=HEAPU16[(($529)>>1)]; + var $531=(($530)&65535); + var $532=$531 & 31; + var $533=(($526+$532)|0); + var $534=$533 >>> 1; + var $535=(($519+$534)|0); + var $536=$7; + var $537=$535 & $536; + var $538=$512 | $537; + var $539=(($538) & 65535); + var $540=$4; + var $541=$3; + var $542=(($541+($540<<1))|0); + HEAP16[(($542)>>1)]=$539; + var $543=$1; + var $544=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($543, $544); + __label__ = 33; break; + case 33: + var $546=$4; + var $547=(($546+1)|0); + $4=$547; + __label__ = 21; break; + case 34: + var $549=$1; + var $550=(($549+360)|0); + var $551=$channel_r; + var $552=$stopidx; + var $553=(($552-1)|0); + var $554=$correlate_row_r; + var $555=(($554+$553)|0); + var $556=HEAPU8[($555)]; + var $557=(($556)&255); + var $558=_find_bucket_5bpc($551, $557); + var $559=$stopidx; + var $560=$correlate_row_r; + var $561=(($560+$559)|0); + var $562=HEAP8[($561)]; + var $563=$6; + _update_model_5bpc($550, $558, $562, $563); + var $564=$1; + var $565=(($564+360)|0); + var $566=$channel_g; + var $567=$stopidx; + var $568=(($567-1)|0); + var $569=$correlate_row_g; + var $570=(($569+$568)|0); + var $571=HEAPU8[($570)]; + var $572=(($571)&255); + var $573=_find_bucket_5bpc($566, $572); + var $574=$stopidx; + var $575=$correlate_row_g; + var $576=(($575+$574)|0); + var $577=HEAP8[($576)]; + var $578=$6; + _update_model_5bpc($565, $573, $577, $578); + var $579=$1; + var $580=(($579+360)|0); + var $581=$channel_b; + var $582=$stopidx; + var $583=(($582-1)|0); + var $584=$correlate_row_b; + var $585=(($584+$583)|0); + var $586=HEAPU8[($585)]; + var $587=(($586)&255); + var $588=_find_bucket_5bpc($581, $587); + var $589=$stopidx; + var $590=$correlate_row_b; + var $591=(($590+$589)|0); + var $592=HEAP8[($591)]; + var $593=$6; + _update_model_5bpc($580, $588, $592, $593); + var $594=$4; + var $595=$1; + var $596=(($595+360)|0); + var $597=(($596+8)|0); + var $598=_tabrand($597); + var $599=$waitmask; + var $600=$598 & $599; + var $601=(($594+$600)|0); + $stopidx=$601; + __label__ = 19; break; + case 35: + __label__ = 36; break; + case 36: + var $604=$4; + var $605=$5; + var $606=(($604)|0) < (($605)|0); + if ($606) { __label__ = 37; break; } else { __label__ = 49; break; } + case 37: + var $608=$4; + var $609=(($608-1)|0); + var $610=$2; + var $611=(($610+($609<<1))|0); + var $612=HEAPU16[(($611)>>1)]; + var $613=(($612)&65535); + var $614=$613 >> 10; + var $615=$614 & 31; + var $616=$4; + var $617=$2; + var $618=(($617+($616<<1))|0); + var $619=HEAPU16[(($618)>>1)]; + var $620=(($619)&65535); + var $621=$620 >> 10; + var $622=$621 & 31; + var $623=(($615)|0)==(($622)|0); + if ($623) { __label__ = 38; break; } else { __label__ = 47; break; } + case 38: + var $625=$4; + var $626=(($625-1)|0); + var $627=$2; + var $628=(($627+($626<<1))|0); + var $629=HEAPU16[(($628)>>1)]; + var $630=(($629)&65535); + var $631=$630 >> 5; + var $632=$631 & 31; + var $633=$4; + var $634=$2; + var $635=(($634+($633<<1))|0); + var $636=HEAPU16[(($635)>>1)]; + var $637=(($636)&65535); + var $638=$637 >> 5; + var $639=$638 & 31; + var $640=(($632)|0)==(($639)|0); + if ($640) { __label__ = 39; break; } else { __label__ = 47; break; } + case 39: + var $642=$4; + var $643=(($642-1)|0); + var $644=$2; + var $645=(($644+($643<<1))|0); + var $646=HEAPU16[(($645)>>1)]; + var $647=(($646)&65535); + var $648=$647 & 31; + var $649=$4; + var $650=$2; + var $651=(($650+($649<<1))|0); + var $652=HEAPU16[(($651)>>1)]; + var $653=(($652)&65535); + var $654=$653 & 31; + var $655=(($648)|0)==(($654)|0); + if ($655) { __label__ = 40; break; } else { __label__ = 47; break; } + case 40: + var $657=$run_index; + var $658=$4; + var $659=(($657)|0)!=(($658)|0); + if ($659) { __label__ = 41; break; } else { __label__ = 46; break; } + case 41: + var $661=$4; + var $662=(($661)|0) > 2; + if ($662) { __label__ = 42; break; } else { __label__ = 46; break; } + case 42: + var $664=$4; + var $665=(($664-1)|0); + var $666=$3; + var $667=(($666+($665<<1))|0); + var $668=HEAPU16[(($667)>>1)]; + var $669=(($668)&65535); + var $670=$669 >> 10; + var $671=$670 & 31; + var $672=$4; + var $673=(($672-2)|0); + var $674=$3; + var $675=(($674+($673<<1))|0); + var $676=HEAPU16[(($675)>>1)]; + var $677=(($676)&65535); + var $678=$677 >> 10; + var $679=$678 & 31; + var $680=(($671)|0)==(($679)|0); + if ($680) { __label__ = 43; break; } else { __label__ = 46; break; } + case 43: + var $682=$4; + var $683=(($682-1)|0); + var $684=$3; + var $685=(($684+($683<<1))|0); + var $686=HEAPU16[(($685)>>1)]; + var $687=(($686)&65535); + var $688=$687 >> 5; + var $689=$688 & 31; + var $690=$4; + var $691=(($690-2)|0); + var $692=$3; + var $693=(($692+($691<<1))|0); + var $694=HEAPU16[(($693)>>1)]; + var $695=(($694)&65535); + var $696=$695 >> 5; + var $697=$696 & 31; + var $698=(($689)|0)==(($697)|0); + if ($698) { __label__ = 44; break; } else { __label__ = 46; break; } + case 44: + var $700=$4; + var $701=(($700-1)|0); + var $702=$3; + var $703=(($702+($701<<1))|0); + var $704=HEAPU16[(($703)>>1)]; + var $705=(($704)&65535); + var $706=$705 & 31; + var $707=$4; + var $708=(($707-2)|0); + var $709=$3; + var $710=(($709+($708<<1))|0); + var $711=HEAPU16[(($710)>>1)]; + var $712=(($711)&65535); + var $713=$712 & 31; + var $714=(($706)|0)==(($713)|0); + if ($714) { __label__ = 45; break; } else { __label__ = 46; break; } + case 45: + __label__ = 50; break; + case 46: + __label__ = 47; break; + case 47: + var $718=$4; + var $719=$3; + var $720=(($719+($718<<1))|0); + HEAP16[(($720)>>1)]=0; + var $721=$channel_r; + var $722=$4; + var $723=(($722-1)|0); + var $724=$correlate_row_r; + var $725=(($724+$723)|0); + var $726=HEAPU8[($725)]; + var $727=(($726)&255); + var $728=_find_bucket_5bpc($721, $727); + var $729=(($728+4)|0); + var $730=HEAP32[(($729)>>2)]; + var $731=$1; + var $732=(($731+32)|0); + var $733=HEAP32[(($732)>>2)]; + var $734=_golomb_decoding_5bpc($730, $733, $codewordlen2); + var $735=(($734) & 255); + var $736=$4; + var $737=$correlate_row_r; + var $738=(($737+$736)|0); + HEAP8[($738)]=$735; + var $739=$4; + var $740=$3; + var $741=(($740+($739<<1))|0); + var $742=HEAPU16[(($741)>>1)]; + var $743=(($742)&65535); + var $744=$743 & -31745; + var $745=$4; + var $746=$correlate_row_r; + var $747=(($746+$745)|0); + var $748=HEAPU8[($747)]; + var $749=(($748)&255); + var $750=((((_family_5bpc+384)|0)+($749<<2))|0); + var $751=HEAP32[(($750)>>2)]; + var $752=$4; + var $753=$3; + var $754=(($753+($752<<1))|0); + var $755=(($754-2)|0); + var $756=HEAPU16[(($755)>>1)]; + var $757=(($756)&65535); + var $758=$757 >> 10; + var $759=$758 & 31; + var $760=$4; + var $761=$2; + var $762=(($761+($760<<1))|0); + var $763=HEAPU16[(($762)>>1)]; + var $764=(($763)&65535); + var $765=$764 >> 10; + var $766=$765 & 31; + var $767=(($759+$766)|0); + var $768=$767 >>> 1; + var $769=(($751+$768)|0); + var $770=$7; + var $771=$769 & $770; + var $772=$771 << 10; + var $773=$744 | $772; + var $774=(($773) & 65535); + var $775=$4; + var $776=$3; + var $777=(($776+($775<<1))|0); + HEAP16[(($777)>>1)]=$774; + var $778=$1; + var $779=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($778, $779); + var $780=$channel_g; + var $781=$4; + var $782=(($781-1)|0); + var $783=$correlate_row_g; + var $784=(($783+$782)|0); + var $785=HEAPU8[($784)]; + var $786=(($785)&255); + var $787=_find_bucket_5bpc($780, $786); + var $788=(($787+4)|0); + var $789=HEAP32[(($788)>>2)]; + var $790=$1; + var $791=(($790+32)|0); + var $792=HEAP32[(($791)>>2)]; + var $793=_golomb_decoding_5bpc($789, $792, $codewordlen2); + var $794=(($793) & 255); + var $795=$4; + var $796=$correlate_row_g; + var $797=(($796+$795)|0); + HEAP8[($797)]=$794; + var $798=$4; + var $799=$3; + var $800=(($799+($798<<1))|0); + var $801=HEAPU16[(($800)>>1)]; + var $802=(($801)&65535); + var $803=$802 & -993; + var $804=$4; + var $805=$correlate_row_g; + var $806=(($805+$804)|0); + var $807=HEAPU8[($806)]; + var $808=(($807)&255); + var $809=((((_family_5bpc+384)|0)+($808<<2))|0); + var $810=HEAP32[(($809)>>2)]; + var $811=$4; + var $812=$3; + var $813=(($812+($811<<1))|0); + var $814=(($813-2)|0); + var $815=HEAPU16[(($814)>>1)]; + var $816=(($815)&65535); + var $817=$816 >> 5; + var $818=$817 & 31; + var $819=$4; + var $820=$2; + var $821=(($820+($819<<1))|0); + var $822=HEAPU16[(($821)>>1)]; + var $823=(($822)&65535); + var $824=$823 >> 5; + var $825=$824 & 31; + var $826=(($818+$825)|0); + var $827=$826 >>> 1; + var $828=(($810+$827)|0); + var $829=$7; + var $830=$828 & $829; + var $831=$830 << 5; + var $832=$803 | $831; + var $833=(($832) & 65535); + var $834=$4; + var $835=$3; + var $836=(($835+($834<<1))|0); + HEAP16[(($836)>>1)]=$833; + var $837=$1; + var $838=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($837, $838); + var $839=$channel_b; + var $840=$4; + var $841=(($840-1)|0); + var $842=$correlate_row_b; + var $843=(($842+$841)|0); + var $844=HEAPU8[($843)]; + var $845=(($844)&255); + var $846=_find_bucket_5bpc($839, $845); + var $847=(($846+4)|0); + var $848=HEAP32[(($847)>>2)]; + var $849=$1; + var $850=(($849+32)|0); + var $851=HEAP32[(($850)>>2)]; + var $852=_golomb_decoding_5bpc($848, $851, $codewordlen2); + var $853=(($852) & 255); + var $854=$4; + var $855=$correlate_row_b; + var $856=(($855+$854)|0); + HEAP8[($856)]=$853; + var $857=$4; + var $858=$3; + var $859=(($858+($857<<1))|0); + var $860=HEAPU16[(($859)>>1)]; + var $861=(($860)&65535); + var $862=$861 & -32; + var $863=$4; + var $864=$correlate_row_b; + var $865=(($864+$863)|0); + var $866=HEAPU8[($865)]; + var $867=(($866)&255); + var $868=((((_family_5bpc+384)|0)+($867<<2))|0); + var $869=HEAP32[(($868)>>2)]; + var $870=$4; + var $871=$3; + var $872=(($871+($870<<1))|0); + var $873=(($872-2)|0); + var $874=HEAPU16[(($873)>>1)]; + var $875=(($874)&65535); + var $876=$875 & 31; + var $877=$4; + var $878=$2; + var $879=(($878+($877<<1))|0); + var $880=HEAPU16[(($879)>>1)]; + var $881=(($880)&65535); + var $882=$881 & 31; + var $883=(($876+$882)|0); + var $884=$883 >>> 1; + var $885=(($869+$884)|0); + var $886=$7; + var $887=$885 & $886; + var $888=$862 | $887; + var $889=(($888) & 65535); + var $890=$4; + var $891=$3; + var $892=(($891+($890<<1))|0); + HEAP16[(($892)>>1)]=$889; + var $893=$1; + var $894=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($893, $894); + __label__ = 48; break; + case 48: + var $896=$4; + var $897=(($896+1)|0); + $4=$897; + __label__ = 36; break; + case 49: + var $899=$stopidx; + var $900=$5; + var $901=(($899-$900)|0); + var $902=$1; + var $903=(($902+360)|0); + var $904=(($903+4)|0); + HEAP32[(($904)>>2)]=$901; + __label__ = 57; break; + case 50: + var $906=$stopidx; + var $907=$4; + var $908=(($906-$907)|0); + var $909=$1; + var $910=(($909+360)|0); + var $911=(($910+4)|0); + HEAP32[(($911)>>2)]=$908; + var $912=$4; + $run_index=$912; + var $913=$4; + var $914=$1; + var $915=_decode_run($914); + var $916=(($913+$915)|0); + $run_end=$916; + __label__ = 51; break; + case 51: + var $918=$4; + var $919=$run_end; + var $920=(($918)|0) < (($919)|0); + if ($920) { __label__ = 52; break; } else { __label__ = 54; break; } + case 52: + var $922=$4; + var $923=$3; + var $924=(($923+($922<<1))|0); + HEAP16[(($924)>>1)]=0; + var $925=$4; + var $926=$3; + var $927=(($926+($925<<1))|0); + var $928=HEAPU16[(($927)>>1)]; + var $929=(($928)&65535); + var $930=$929 & -31745; + var $931=$4; + var $932=(($931-1)|0); + var $933=$3; + var $934=(($933+($932<<1))|0); + var $935=HEAPU16[(($934)>>1)]; + var $936=(($935)&65535); + var $937=$936 >> 10; + var $938=$937 & 31; + var $939=$938 << 10; + var $940=$930 | $939; + var $941=(($940) & 65535); + var $942=$4; + var $943=$3; + var $944=(($943+($942<<1))|0); + HEAP16[(($944)>>1)]=$941; + var $945=$4; + var $946=$3; + var $947=(($946+($945<<1))|0); + var $948=HEAPU16[(($947)>>1)]; + var $949=(($948)&65535); + var $950=$949 & -993; + var $951=$4; + var $952=(($951-1)|0); + var $953=$3; + var $954=(($953+($952<<1))|0); + var $955=HEAPU16[(($954)>>1)]; + var $956=(($955)&65535); + var $957=$956 >> 5; + var $958=$957 & 31; + var $959=$958 << 5; + var $960=$950 | $959; + var $961=(($960) & 65535); + var $962=$4; + var $963=$3; + var $964=(($963+($962<<1))|0); + HEAP16[(($964)>>1)]=$961; + var $965=$4; + var $966=$3; + var $967=(($966+($965<<1))|0); + var $968=HEAPU16[(($967)>>1)]; + var $969=(($968)&65535); + var $970=$969 & -32; + var $971=$4; + var $972=(($971-1)|0); + var $973=$3; + var $974=(($973+($972<<1))|0); + var $975=HEAPU16[(($974)>>1)]; + var $976=(($975)&65535); + var $977=$976 & 31; + var $978=$970 | $977; + var $979=(($978) & 65535); + var $980=$4; + var $981=$3; + var $982=(($981+($980<<1))|0); + HEAP16[(($982)>>1)]=$979; + __label__ = 53; break; + case 53: + var $984=$4; + var $985=(($984+1)|0); + $4=$985; + __label__ = 51; break; + case 54: + var $987=$4; + var $988=$5; + var $989=(($987)|0)==(($988)|0); + if ($989) { __label__ = 55; break; } else { __label__ = 56; break; } + case 55: + __label__ = 57; break; + case 56: + var $992=$4; + var $993=$1; + var $994=(($993+360)|0); + var $995=(($994+4)|0); + var $996=HEAP32[(($995)>>2)]; + var $997=(($992+$996)|0); + $stopidx=$997; + __label__ = 18; break; + case 57: + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_uncompress_row_seg["X"]=1; + +function _quic_rgb16_uncompress_row0_seg($encoder, $i, $cur_row, $end, $waitmask, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $stopidx; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$i; + $3=$cur_row; + $4=$end; + $5=$waitmask; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + __label__ = 2; break; + case 2: + var $25=$4; + var $26=$2; + var $27=(($25-$26)|0); + var $28=(($27)|0) > 0; + if ($28) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $32=$_g_boolean_var_; + var $33=(($32)==(1)); + var $34=(($33)|0)!=0; + if ($34) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str91)|0), ((STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row0_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $41=$2; + var $42=(($41)|0)!=0; + if ($42) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $44=$2; + var $45=$3; + var $46=(($45+($44<<1))|0); + HEAP16[(($46)>>1)]=0; + var $47=$channel_r; + var $48=$correlate_row_r; + var $49=(($48-1)|0); + var $50=HEAPU8[($49)]; + var $51=(($50)&255); + var $52=_find_bucket_5bpc($47, $51); + var $53=(($52+4)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=$1; + var $56=(($55+32)|0); + var $57=HEAP32[(($56)>>2)]; + var $58=_golomb_decoding_5bpc($54, $57, $codewordlen); + var $59=(($58) & 255); + var $60=$correlate_row_r; + var $61=(($60)|0); + HEAP8[($61)]=$59; + var $62=$3; + var $63=(($62)|0); + var $64=HEAPU16[(($63)>>1)]; + var $65=(($64)&65535); + var $66=$65 & -31745; + var $67=$correlate_row_r; + var $68=(($67)|0); + var $69=HEAPU8[($68)]; + var $70=(($69)&255); + var $71=((((_family_5bpc+384)|0)+($70<<2))|0); + var $72=HEAP32[(($71)>>2)]; + var $73=(($72) & 255); + var $74=(($73)&255); + var $75=$74 << 10; + var $76=$66 | $75; + var $77=(($76) & 65535); + var $78=$3; + var $79=(($78)|0); + HEAP16[(($79)>>1)]=$77; + var $80=$1; + var $81=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($80, $81); + var $82=$channel_g; + var $83=$correlate_row_g; + var $84=(($83-1)|0); + var $85=HEAPU8[($84)]; + var $86=(($85)&255); + var $87=_find_bucket_5bpc($82, $86); + var $88=(($87+4)|0); + var $89=HEAP32[(($88)>>2)]; + var $90=$1; + var $91=(($90+32)|0); + var $92=HEAP32[(($91)>>2)]; + var $93=_golomb_decoding_5bpc($89, $92, $codewordlen); + var $94=(($93) & 255); + var $95=$correlate_row_g; + var $96=(($95)|0); + HEAP8[($96)]=$94; + var $97=$3; + var $98=(($97)|0); + var $99=HEAPU16[(($98)>>1)]; + var $100=(($99)&65535); + var $101=$100 & -993; + var $102=$correlate_row_g; + var $103=(($102)|0); + var $104=HEAPU8[($103)]; + var $105=(($104)&255); + var $106=((((_family_5bpc+384)|0)+($105<<2))|0); + var $107=HEAP32[(($106)>>2)]; + var $108=(($107) & 255); + var $109=(($108)&255); + var $110=$109 << 5; + var $111=$101 | $110; + var $112=(($111) & 65535); + var $113=$3; + var $114=(($113)|0); + HEAP16[(($114)>>1)]=$112; + var $115=$1; + var $116=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($115, $116); + var $117=$channel_b; + var $118=$correlate_row_b; + var $119=(($118-1)|0); + var $120=HEAPU8[($119)]; + var $121=(($120)&255); + var $122=_find_bucket_5bpc($117, $121); + var $123=(($122+4)|0); + var $124=HEAP32[(($123)>>2)]; + var $125=$1; + var $126=(($125+32)|0); + var $127=HEAP32[(($126)>>2)]; + var $128=_golomb_decoding_5bpc($124, $127, $codewordlen); + var $129=(($128) & 255); + var $130=$correlate_row_b; + var $131=(($130)|0); + HEAP8[($131)]=$129; + var $132=$3; + var $133=(($132)|0); + var $134=HEAPU16[(($133)>>1)]; + var $135=(($134)&65535); + var $136=$135 & -32; + var $137=$correlate_row_b; + var $138=(($137)|0); + var $139=HEAPU8[($138)]; + var $140=(($139)&255); + var $141=((((_family_5bpc+384)|0)+($140<<2))|0); + var $142=HEAP32[(($141)>>2)]; + var $143=(($142) & 255); + var $144=(($143)&255); + var $145=$136 | $144; + var $146=(($145) & 65535); + var $147=$3; + var $148=(($147)|0); + HEAP16[(($148)>>1)]=$146; + var $149=$1; + var $150=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($149, $150); + var $151=$1; + var $152=(($151+360)|0); + var $153=(($152+4)|0); + var $154=HEAP32[(($153)>>2)]; + var $155=(($154)|0)!=0; + if ($155) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $157=$1; + var $158=(($157+360)|0); + var $159=(($158+4)|0); + var $160=HEAP32[(($159)>>2)]; + var $161=(($160-1)|0); + HEAP32[(($159)>>2)]=$161; + __label__ = 15; break; + case 14: + var $163=$1; + var $164=(($163+360)|0); + var $165=(($164+8)|0); + var $166=_tabrand($165); + var $167=$5; + var $168=$166 & $167; + var $169=$1; + var $170=(($169+360)|0); + var $171=(($170+4)|0); + HEAP32[(($171)>>2)]=$168; + var $172=$1; + var $173=(($172+360)|0); + var $174=$channel_r; + var $175=$correlate_row_r; + var $176=(($175-1)|0); + var $177=HEAPU8[($176)]; + var $178=(($177)&255); + var $179=_find_bucket_5bpc($174, $178); + var $180=$correlate_row_r; + var $181=(($180)|0); + var $182=HEAP8[($181)]; + var $183=$6; + _update_model_5bpc($173, $179, $182, $183); + var $184=$1; + var $185=(($184+360)|0); + var $186=$channel_g; + var $187=$correlate_row_g; + var $188=(($187-1)|0); + var $189=HEAPU8[($188)]; + var $190=(($189)&255); + var $191=_find_bucket_5bpc($186, $190); + var $192=$correlate_row_g; + var $193=(($192)|0); + var $194=HEAP8[($193)]; + var $195=$6; + _update_model_5bpc($185, $191, $194, $195); + var $196=$1; + var $197=(($196+360)|0); + var $198=$channel_b; + var $199=$correlate_row_b; + var $200=(($199-1)|0); + var $201=HEAPU8[($200)]; + var $202=(($201)&255); + var $203=_find_bucket_5bpc($198, $202); + var $204=$correlate_row_b; + var $205=(($204)|0); + var $206=HEAP8[($205)]; + var $207=$6; + _update_model_5bpc($197, $203, $206, $207); + __label__ = 15; break; + case 15: + var $209=$2; + var $210=(($209+1)|0); + $2=$210; + var $211=$1; + var $212=(($211+360)|0); + var $213=(($212+4)|0); + var $214=HEAP32[(($213)>>2)]; + var $215=(($210+$214)|0); + $stopidx=$215; + __label__ = 17; break; + case 16: + var $217=$2; + var $218=$1; + var $219=(($218+360)|0); + var $220=(($219+4)|0); + var $221=HEAP32[(($220)>>2)]; + var $222=(($217+$221)|0); + $stopidx=$222; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + var $225=$stopidx; + var $226=$4; + var $227=(($225)|0) < (($226)|0); + if ($227) { __label__ = 19; break; } else { __label__ = 24; break; } + case 19: + __label__ = 20; break; + case 20: + var $230=$2; + var $231=$stopidx; + var $232=(($230)|0) <= (($231)|0); + if ($232) { __label__ = 21; break; } else { __label__ = 23; break; } + case 21: + var $234=$2; + var $235=$3; + var $236=(($235+($234<<1))|0); + HEAP16[(($236)>>1)]=0; + var $237=$channel_r; + var $238=$2; + var $239=(($238-1)|0); + var $240=$correlate_row_r; + var $241=(($240+$239)|0); + var $242=HEAPU8[($241)]; + var $243=(($242)&255); + var $244=_find_bucket_5bpc($237, $243); + var $245=(($244+4)|0); + var $246=HEAP32[(($245)>>2)]; + var $247=$1; + var $248=(($247+32)|0); + var $249=HEAP32[(($248)>>2)]; + var $250=_golomb_decoding_5bpc($246, $249, $codewordlen1); + var $251=(($250) & 255); + var $252=$2; + var $253=$correlate_row_r; + var $254=(($253+$252)|0); + HEAP8[($254)]=$251; + var $255=$2; + var $256=$3; + var $257=(($256+($255<<1))|0); + var $258=HEAPU16[(($257)>>1)]; + var $259=(($258)&65535); + var $260=$259 & -31745; + var $261=$2; + var $262=$correlate_row_r; + var $263=(($262+$261)|0); + var $264=HEAPU8[($263)]; + var $265=(($264)&255); + var $266=((((_family_5bpc+384)|0)+($265<<2))|0); + var $267=HEAP32[(($266)>>2)]; + var $268=$2; + var $269=$3; + var $270=(($269+($268<<1))|0); + var $271=(($270-2)|0); + var $272=HEAPU16[(($271)>>1)]; + var $273=(($272)&65535); + var $274=$273 >> 10; + var $275=$274 & 31; + var $276=(($267+$275)|0); + var $277=$7; + var $278=$276 & $277; + var $279=$278 << 10; + var $280=$260 | $279; + var $281=(($280) & 65535); + var $282=$2; + var $283=$3; + var $284=(($283+($282<<1))|0); + HEAP16[(($284)>>1)]=$281; + var $285=$1; + var $286=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($285, $286); + var $287=$channel_g; + var $288=$2; + var $289=(($288-1)|0); + var $290=$correlate_row_g; + var $291=(($290+$289)|0); + var $292=HEAPU8[($291)]; + var $293=(($292)&255); + var $294=_find_bucket_5bpc($287, $293); + var $295=(($294+4)|0); + var $296=HEAP32[(($295)>>2)]; + var $297=$1; + var $298=(($297+32)|0); + var $299=HEAP32[(($298)>>2)]; + var $300=_golomb_decoding_5bpc($296, $299, $codewordlen1); + var $301=(($300) & 255); + var $302=$2; + var $303=$correlate_row_g; + var $304=(($303+$302)|0); + HEAP8[($304)]=$301; + var $305=$2; + var $306=$3; + var $307=(($306+($305<<1))|0); + var $308=HEAPU16[(($307)>>1)]; + var $309=(($308)&65535); + var $310=$309 & -993; + var $311=$2; + var $312=$correlate_row_g; + var $313=(($312+$311)|0); + var $314=HEAPU8[($313)]; + var $315=(($314)&255); + var $316=((((_family_5bpc+384)|0)+($315<<2))|0); + var $317=HEAP32[(($316)>>2)]; + var $318=$2; + var $319=$3; + var $320=(($319+($318<<1))|0); + var $321=(($320-2)|0); + var $322=HEAPU16[(($321)>>1)]; + var $323=(($322)&65535); + var $324=$323 >> 5; + var $325=$324 & 31; + var $326=(($317+$325)|0); + var $327=$7; + var $328=$326 & $327; + var $329=$328 << 5; + var $330=$310 | $329; + var $331=(($330) & 65535); + var $332=$2; + var $333=$3; + var $334=(($333+($332<<1))|0); + HEAP16[(($334)>>1)]=$331; + var $335=$1; + var $336=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($335, $336); + var $337=$channel_b; + var $338=$2; + var $339=(($338-1)|0); + var $340=$correlate_row_b; + var $341=(($340+$339)|0); + var $342=HEAPU8[($341)]; + var $343=(($342)&255); + var $344=_find_bucket_5bpc($337, $343); + var $345=(($344+4)|0); + var $346=HEAP32[(($345)>>2)]; + var $347=$1; + var $348=(($347+32)|0); + var $349=HEAP32[(($348)>>2)]; + var $350=_golomb_decoding_5bpc($346, $349, $codewordlen1); + var $351=(($350) & 255); + var $352=$2; + var $353=$correlate_row_b; + var $354=(($353+$352)|0); + HEAP8[($354)]=$351; + var $355=$2; + var $356=$3; + var $357=(($356+($355<<1))|0); + var $358=HEAPU16[(($357)>>1)]; + var $359=(($358)&65535); + var $360=$359 & -32; + var $361=$2; + var $362=$correlate_row_b; + var $363=(($362+$361)|0); + var $364=HEAPU8[($363)]; + var $365=(($364)&255); + var $366=((((_family_5bpc+384)|0)+($365<<2))|0); + var $367=HEAP32[(($366)>>2)]; + var $368=$2; + var $369=$3; + var $370=(($369+($368<<1))|0); + var $371=(($370-2)|0); + var $372=HEAPU16[(($371)>>1)]; + var $373=(($372)&65535); + var $374=$373 & 31; + var $375=(($367+$374)|0); + var $376=$7; + var $377=$375 & $376; + var $378=$360 | $377; + var $379=(($378) & 65535); + var $380=$2; + var $381=$3; + var $382=(($381+($380<<1))|0); + HEAP16[(($382)>>1)]=$379; + var $383=$1; + var $384=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($383, $384); + __label__ = 22; break; + case 22: + var $386=$2; + var $387=(($386+1)|0); + $2=$387; + __label__ = 20; break; + case 23: + var $389=$1; + var $390=(($389+360)|0); + var $391=$channel_r; + var $392=$stopidx; + var $393=(($392-1)|0); + var $394=$correlate_row_r; + var $395=(($394+$393)|0); + var $396=HEAPU8[($395)]; + var $397=(($396)&255); + var $398=_find_bucket_5bpc($391, $397); + var $399=$stopidx; + var $400=$correlate_row_r; + var $401=(($400+$399)|0); + var $402=HEAP8[($401)]; + var $403=$6; + _update_model_5bpc($390, $398, $402, $403); + var $404=$1; + var $405=(($404+360)|0); + var $406=$channel_g; + var $407=$stopidx; + var $408=(($407-1)|0); + var $409=$correlate_row_g; + var $410=(($409+$408)|0); + var $411=HEAPU8[($410)]; + var $412=(($411)&255); + var $413=_find_bucket_5bpc($406, $412); + var $414=$stopidx; + var $415=$correlate_row_g; + var $416=(($415+$414)|0); + var $417=HEAP8[($416)]; + var $418=$6; + _update_model_5bpc($405, $413, $417, $418); + var $419=$1; + var $420=(($419+360)|0); + var $421=$channel_b; + var $422=$stopidx; + var $423=(($422-1)|0); + var $424=$correlate_row_b; + var $425=(($424+$423)|0); + var $426=HEAPU8[($425)]; + var $427=(($426)&255); + var $428=_find_bucket_5bpc($421, $427); + var $429=$stopidx; + var $430=$correlate_row_b; + var $431=(($430+$429)|0); + var $432=HEAP8[($431)]; + var $433=$6; + _update_model_5bpc($420, $428, $432, $433); + var $434=$2; + var $435=$1; + var $436=(($435+360)|0); + var $437=(($436+8)|0); + var $438=_tabrand($437); + var $439=$5; + var $440=$438 & $439; + var $441=(($434+$440)|0); + $stopidx=$441; + __label__ = 18; break; + case 24: + __label__ = 25; break; + case 25: + var $444=$2; + var $445=$4; + var $446=(($444)|0) < (($445)|0); + if ($446) { __label__ = 26; break; } else { __label__ = 28; break; } + case 26: + var $448=$2; + var $449=$3; + var $450=(($449+($448<<1))|0); + HEAP16[(($450)>>1)]=0; + var $451=$channel_r; + var $452=$2; + var $453=(($452-1)|0); + var $454=$correlate_row_r; + var $455=(($454+$453)|0); + var $456=HEAPU8[($455)]; + var $457=(($456)&255); + var $458=_find_bucket_5bpc($451, $457); + var $459=(($458+4)|0); + var $460=HEAP32[(($459)>>2)]; + var $461=$1; + var $462=(($461+32)|0); + var $463=HEAP32[(($462)>>2)]; + var $464=_golomb_decoding_5bpc($460, $463, $codewordlen2); + var $465=(($464) & 255); + var $466=$2; + var $467=$correlate_row_r; + var $468=(($467+$466)|0); + HEAP8[($468)]=$465; + var $469=$2; + var $470=$3; + var $471=(($470+($469<<1))|0); + var $472=HEAPU16[(($471)>>1)]; + var $473=(($472)&65535); + var $474=$473 & -31745; + var $475=$2; + var $476=$correlate_row_r; + var $477=(($476+$475)|0); + var $478=HEAPU8[($477)]; + var $479=(($478)&255); + var $480=((((_family_5bpc+384)|0)+($479<<2))|0); + var $481=HEAP32[(($480)>>2)]; + var $482=$2; + var $483=$3; + var $484=(($483+($482<<1))|0); + var $485=(($484-2)|0); + var $486=HEAPU16[(($485)>>1)]; + var $487=(($486)&65535); + var $488=$487 >> 10; + var $489=$488 & 31; + var $490=(($481+$489)|0); + var $491=$7; + var $492=$490 & $491; + var $493=$492 << 10; + var $494=$474 | $493; + var $495=(($494) & 65535); + var $496=$2; + var $497=$3; + var $498=(($497+($496<<1))|0); + HEAP16[(($498)>>1)]=$495; + var $499=$1; + var $500=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($499, $500); + var $501=$channel_g; + var $502=$2; + var $503=(($502-1)|0); + var $504=$correlate_row_g; + var $505=(($504+$503)|0); + var $506=HEAPU8[($505)]; + var $507=(($506)&255); + var $508=_find_bucket_5bpc($501, $507); + var $509=(($508+4)|0); + var $510=HEAP32[(($509)>>2)]; + var $511=$1; + var $512=(($511+32)|0); + var $513=HEAP32[(($512)>>2)]; + var $514=_golomb_decoding_5bpc($510, $513, $codewordlen2); + var $515=(($514) & 255); + var $516=$2; + var $517=$correlate_row_g; + var $518=(($517+$516)|0); + HEAP8[($518)]=$515; + var $519=$2; + var $520=$3; + var $521=(($520+($519<<1))|0); + var $522=HEAPU16[(($521)>>1)]; + var $523=(($522)&65535); + var $524=$523 & -993; + var $525=$2; + var $526=$correlate_row_g; + var $527=(($526+$525)|0); + var $528=HEAPU8[($527)]; + var $529=(($528)&255); + var $530=((((_family_5bpc+384)|0)+($529<<2))|0); + var $531=HEAP32[(($530)>>2)]; + var $532=$2; + var $533=$3; + var $534=(($533+($532<<1))|0); + var $535=(($534-2)|0); + var $536=HEAPU16[(($535)>>1)]; + var $537=(($536)&65535); + var $538=$537 >> 5; + var $539=$538 & 31; + var $540=(($531+$539)|0); + var $541=$7; + var $542=$540 & $541; + var $543=$542 << 5; + var $544=$524 | $543; + var $545=(($544) & 65535); + var $546=$2; + var $547=$3; + var $548=(($547+($546<<1))|0); + HEAP16[(($548)>>1)]=$545; + var $549=$1; + var $550=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($549, $550); + var $551=$channel_b; + var $552=$2; + var $553=(($552-1)|0); + var $554=$correlate_row_b; + var $555=(($554+$553)|0); + var $556=HEAPU8[($555)]; + var $557=(($556)&255); + var $558=_find_bucket_5bpc($551, $557); + var $559=(($558+4)|0); + var $560=HEAP32[(($559)>>2)]; + var $561=$1; + var $562=(($561+32)|0); + var $563=HEAP32[(($562)>>2)]; + var $564=_golomb_decoding_5bpc($560, $563, $codewordlen2); + var $565=(($564) & 255); + var $566=$2; + var $567=$correlate_row_b; + var $568=(($567+$566)|0); + HEAP8[($568)]=$565; + var $569=$2; + var $570=$3; + var $571=(($570+($569<<1))|0); + var $572=HEAPU16[(($571)>>1)]; + var $573=(($572)&65535); + var $574=$573 & -32; + var $575=$2; + var $576=$correlate_row_b; + var $577=(($576+$575)|0); + var $578=HEAPU8[($577)]; + var $579=(($578)&255); + var $580=((((_family_5bpc+384)|0)+($579<<2))|0); + var $581=HEAP32[(($580)>>2)]; + var $582=$2; + var $583=$3; + var $584=(($583+($582<<1))|0); + var $585=(($584-2)|0); + var $586=HEAPU16[(($585)>>1)]; + var $587=(($586)&65535); + var $588=$587 & 31; + var $589=(($581+$588)|0); + var $590=$7; + var $591=$589 & $590; + var $592=$574 | $591; + var $593=(($592) & 65535); + var $594=$2; + var $595=$3; + var $596=(($595+($594<<1))|0); + HEAP16[(($596)>>1)]=$593; + var $597=$1; + var $598=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($597, $598); + __label__ = 27; break; + case 27: + var $600=$2; + var $601=(($600+1)|0); + $2=$601; + __label__ = 25; break; + case 28: + var $603=$stopidx; + var $604=$4; + var $605=(($603-$604)|0); + var $606=$1; + var $607=(($606+360)|0); + var $608=(($607+4)|0); + HEAP32[(($608)>>2)]=$605; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb16_uncompress_row0_seg["X"]=1; + +function _quic_rgb24_uncompress_row_seg($encoder, $prev_row, $cur_row, $i, $end, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $waitmask; + var $stopidx; + var $run_index; + var $run_end; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$i; + $5=$end; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + var $24=$1; + var $25=(($24+360)|0); + var $26=(($25+16)|0); + var $27=HEAP32[(($26)>>2)]; + var $28=((_bppmask+($27<<2))|0); + var $29=HEAP32[(($28)>>2)]; + $waitmask=$29; + $run_index=0; + __label__ = 2; break; + case 2: + var $31=$5; + var $32=$4; + var $33=(($31-$32)|0); + var $34=(($33)|0) > 0; + if ($34) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $38=$_g_boolean_var_; + var $39=(($38)==(1)); + var $40=(($39)|0)!=0; + if ($40) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str87)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $47=$4; + var $48=(($47)|0)!=0; + if ($48) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $50=$channel_r; + var $51=$correlate_row_r; + var $52=(($51-1)|0); + var $53=HEAPU8[($52)]; + var $54=(($53)&255); + var $55=_find_bucket_8bpc($50, $54); + var $56=(($55+4)|0); + var $57=HEAP32[(($56)>>2)]; + var $58=$1; + var $59=(($58+32)|0); + var $60=HEAP32[(($59)>>2)]; + var $61=_golomb_decoding_8bpc($57, $60, $codewordlen); + var $62=(($61) & 255); + var $63=$correlate_row_r; + var $64=(($63)|0); + HEAP8[($64)]=$62; + var $65=$correlate_row_r; + var $66=(($65)|0); + var $67=HEAPU8[($66)]; + var $68=(($67)&255); + var $69=((((_family_8bpc+384)|0)+($68<<2))|0); + var $70=HEAP32[(($69)>>2)]; + var $71=$2; + var $72=(($71+2)|0); + var $73=HEAPU8[($72)]; + var $74=(($73)&255); + var $75=(($70+$74)|0); + var $76=$7; + var $77=$75 & $76; + var $78=(($77) & 255); + var $79=$3; + var $80=(($79)|0); + var $81=(($80+2)|0); + HEAP8[($81)]=$78; + var $82=$1; + var $83=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($82, $83); + var $84=$channel_g; + var $85=$correlate_row_g; + var $86=(($85-1)|0); + var $87=HEAPU8[($86)]; + var $88=(($87)&255); + var $89=_find_bucket_8bpc($84, $88); + var $90=(($89+4)|0); + var $91=HEAP32[(($90)>>2)]; + var $92=$1; + var $93=(($92+32)|0); + var $94=HEAP32[(($93)>>2)]; + var $95=_golomb_decoding_8bpc($91, $94, $codewordlen); + var $96=(($95) & 255); + var $97=$correlate_row_g; + var $98=(($97)|0); + HEAP8[($98)]=$96; + var $99=$correlate_row_g; + var $100=(($99)|0); + var $101=HEAPU8[($100)]; + var $102=(($101)&255); + var $103=((((_family_8bpc+384)|0)+($102<<2))|0); + var $104=HEAP32[(($103)>>2)]; + var $105=$2; + var $106=(($105+1)|0); + var $107=HEAPU8[($106)]; + var $108=(($107)&255); + var $109=(($104+$108)|0); + var $110=$7; + var $111=$109 & $110; + var $112=(($111) & 255); + var $113=$3; + var $114=(($113)|0); + var $115=(($114+1)|0); + HEAP8[($115)]=$112; + var $116=$1; + var $117=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($116, $117); + var $118=$channel_b; + var $119=$correlate_row_b; + var $120=(($119-1)|0); + var $121=HEAPU8[($120)]; + var $122=(($121)&255); + var $123=_find_bucket_8bpc($118, $122); + var $124=(($123+4)|0); + var $125=HEAP32[(($124)>>2)]; + var $126=$1; + var $127=(($126+32)|0); + var $128=HEAP32[(($127)>>2)]; + var $129=_golomb_decoding_8bpc($125, $128, $codewordlen); + var $130=(($129) & 255); + var $131=$correlate_row_b; + var $132=(($131)|0); + HEAP8[($132)]=$130; + var $133=$correlate_row_b; + var $134=(($133)|0); + var $135=HEAPU8[($134)]; + var $136=(($135)&255); + var $137=((((_family_8bpc+384)|0)+($136<<2))|0); + var $138=HEAP32[(($137)>>2)]; + var $139=$2; + var $140=(($139)|0); + var $141=HEAPU8[($140)]; + var $142=(($141)&255); + var $143=(($138+$142)|0); + var $144=$7; + var $145=$143 & $144; + var $146=(($145) & 255); + var $147=$3; + var $148=(($147)|0); + var $149=(($148)|0); + HEAP8[($149)]=$146; + var $150=$1; + var $151=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($150, $151); + var $152=$1; + var $153=(($152+360)|0); + var $154=(($153+4)|0); + var $155=HEAP32[(($154)>>2)]; + var $156=(($155)|0)!=0; + if ($156) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $158=$1; + var $159=(($158+360)|0); + var $160=(($159+4)|0); + var $161=HEAP32[(($160)>>2)]; + var $162=(($161-1)|0); + HEAP32[(($160)>>2)]=$162; + __label__ = 15; break; + case 14: + var $164=$1; + var $165=(($164+360)|0); + var $166=(($165+8)|0); + var $167=_tabrand($166); + var $168=$waitmask; + var $169=$167 & $168; + var $170=$1; + var $171=(($170+360)|0); + var $172=(($171+4)|0); + HEAP32[(($172)>>2)]=$169; + var $173=$1; + var $174=(($173+360)|0); + var $175=$channel_r; + var $176=$correlate_row_r; + var $177=(($176-1)|0); + var $178=HEAPU8[($177)]; + var $179=(($178)&255); + var $180=_find_bucket_8bpc($175, $179); + var $181=$correlate_row_r; + var $182=(($181)|0); + var $183=HEAP8[($182)]; + var $184=$6; + _update_model_8bpc($174, $180, $183, $184); + var $185=$1; + var $186=(($185+360)|0); + var $187=$channel_g; + var $188=$correlate_row_g; + var $189=(($188-1)|0); + var $190=HEAPU8[($189)]; + var $191=(($190)&255); + var $192=_find_bucket_8bpc($187, $191); + var $193=$correlate_row_g; + var $194=(($193)|0); + var $195=HEAP8[($194)]; + var $196=$6; + _update_model_8bpc($186, $192, $195, $196); + var $197=$1; + var $198=(($197+360)|0); + var $199=$channel_b; + var $200=$correlate_row_b; + var $201=(($200-1)|0); + var $202=HEAPU8[($201)]; + var $203=(($202)&255); + var $204=_find_bucket_8bpc($199, $203); + var $205=$correlate_row_b; + var $206=(($205)|0); + var $207=HEAP8[($206)]; + var $208=$6; + _update_model_8bpc($198, $204, $207, $208); + __label__ = 15; break; + case 15: + var $210=$4; + var $211=(($210+1)|0); + $4=$211; + var $212=$1; + var $213=(($212+360)|0); + var $214=(($213+4)|0); + var $215=HEAP32[(($214)>>2)]; + var $216=(($211+$215)|0); + $stopidx=$216; + __label__ = 17; break; + case 16: + var $218=$4; + var $219=$1; + var $220=(($219+360)|0); + var $221=(($220+4)|0); + var $222=HEAP32[(($221)>>2)]; + var $223=(($218+$222)|0); + $stopidx=$223; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + var $227=$stopidx; + var $228=$5; + var $229=(($227)|0) < (($228)|0); + if ($229) { __label__ = 20; break; } else { __label__ = 35; break; } + case 20: + __label__ = 21; break; + case 21: + var $232=$4; + var $233=$stopidx; + var $234=(($232)|0) <= (($233)|0); + if ($234) { __label__ = 22; break; } else { __label__ = 34; break; } + case 22: + var $236=$4; + var $237=(($236-1)|0); + var $238=$2; + var $239=(($238+$237*3)|0); + var $240=(($239+2)|0); + var $241=HEAPU8[($240)]; + var $242=(($241)&255); + var $243=$4; + var $244=$2; + var $245=(($244+$243*3)|0); + var $246=(($245+2)|0); + var $247=HEAPU8[($246)]; + var $248=(($247)&255); + var $249=(($242)|0)==(($248)|0); + if ($249) { __label__ = 23; break; } else { __label__ = 32; break; } + case 23: + var $251=$4; + var $252=(($251-1)|0); + var $253=$2; + var $254=(($253+$252*3)|0); + var $255=(($254+1)|0); + var $256=HEAPU8[($255)]; + var $257=(($256)&255); + var $258=$4; + var $259=$2; + var $260=(($259+$258*3)|0); + var $261=(($260+1)|0); + var $262=HEAPU8[($261)]; + var $263=(($262)&255); + var $264=(($257)|0)==(($263)|0); + if ($264) { __label__ = 24; break; } else { __label__ = 32; break; } + case 24: + var $266=$4; + var $267=(($266-1)|0); + var $268=$2; + var $269=(($268+$267*3)|0); + var $270=(($269)|0); + var $271=HEAPU8[($270)]; + var $272=(($271)&255); + var $273=$4; + var $274=$2; + var $275=(($274+$273*3)|0); + var $276=(($275)|0); + var $277=HEAPU8[($276)]; + var $278=(($277)&255); + var $279=(($272)|0)==(($278)|0); + if ($279) { __label__ = 25; break; } else { __label__ = 32; break; } + case 25: + var $281=$run_index; + var $282=$4; + var $283=(($281)|0)!=(($282)|0); + if ($283) { __label__ = 26; break; } else { __label__ = 31; break; } + case 26: + var $285=$4; + var $286=(($285)|0) > 2; + if ($286) { __label__ = 27; break; } else { __label__ = 31; break; } + case 27: + var $288=$4; + var $289=(($288-1)|0); + var $290=$3; + var $291=(($290+$289*3)|0); + var $292=(($291+2)|0); + var $293=HEAPU8[($292)]; + var $294=(($293)&255); + var $295=$4; + var $296=(($295-2)|0); + var $297=$3; + var $298=(($297+$296*3)|0); + var $299=(($298+2)|0); + var $300=HEAPU8[($299)]; + var $301=(($300)&255); + var $302=(($294)|0)==(($301)|0); + if ($302) { __label__ = 28; break; } else { __label__ = 31; break; } + case 28: + var $304=$4; + var $305=(($304-1)|0); + var $306=$3; + var $307=(($306+$305*3)|0); + var $308=(($307+1)|0); + var $309=HEAPU8[($308)]; + var $310=(($309)&255); + var $311=$4; + var $312=(($311-2)|0); + var $313=$3; + var $314=(($313+$312*3)|0); + var $315=(($314+1)|0); + var $316=HEAPU8[($315)]; + var $317=(($316)&255); + var $318=(($310)|0)==(($317)|0); + if ($318) { __label__ = 29; break; } else { __label__ = 31; break; } + case 29: + var $320=$4; + var $321=(($320-1)|0); + var $322=$3; + var $323=(($322+$321*3)|0); + var $324=(($323)|0); + var $325=HEAPU8[($324)]; + var $326=(($325)&255); + var $327=$4; + var $328=(($327-2)|0); + var $329=$3; + var $330=(($329+$328*3)|0); + var $331=(($330)|0); + var $332=HEAPU8[($331)]; + var $333=(($332)&255); + var $334=(($326)|0)==(($333)|0); + if ($334) { __label__ = 30; break; } else { __label__ = 31; break; } + case 30: + __label__ = 50; break; + case 31: + __label__ = 32; break; + case 32: + var $338=$channel_r; + var $339=$4; + var $340=(($339-1)|0); + var $341=$correlate_row_r; + var $342=(($341+$340)|0); + var $343=HEAPU8[($342)]; + var $344=(($343)&255); + var $345=_find_bucket_8bpc($338, $344); + var $346=(($345+4)|0); + var $347=HEAP32[(($346)>>2)]; + var $348=$1; + var $349=(($348+32)|0); + var $350=HEAP32[(($349)>>2)]; + var $351=_golomb_decoding_8bpc($347, $350, $codewordlen1); + var $352=(($351) & 255); + var $353=$4; + var $354=$correlate_row_r; + var $355=(($354+$353)|0); + HEAP8[($355)]=$352; + var $356=$4; + var $357=$correlate_row_r; + var $358=(($357+$356)|0); + var $359=HEAPU8[($358)]; + var $360=(($359)&255); + var $361=((((_family_8bpc+384)|0)+($360<<2))|0); + var $362=HEAP32[(($361)>>2)]; + var $363=$4; + var $364=$3; + var $365=(($364+$363*3)|0); + var $366=(($365-3)|0); + var $367=(($366+2)|0); + var $368=HEAPU8[($367)]; + var $369=(($368)&255); + var $370=$4; + var $371=$2; + var $372=(($371+$370*3)|0); + var $373=(($372+2)|0); + var $374=HEAPU8[($373)]; + var $375=(($374)&255); + var $376=(($369+$375)|0); + var $377=$376 >>> 1; + var $378=(($362+$377)|0); + var $379=$7; + var $380=$378 & $379; + var $381=(($380) & 255); + var $382=$4; + var $383=$3; + var $384=(($383+$382*3)|0); + var $385=(($384+2)|0); + HEAP8[($385)]=$381; + var $386=$1; + var $387=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($386, $387); + var $388=$channel_g; + var $389=$4; + var $390=(($389-1)|0); + var $391=$correlate_row_g; + var $392=(($391+$390)|0); + var $393=HEAPU8[($392)]; + var $394=(($393)&255); + var $395=_find_bucket_8bpc($388, $394); + var $396=(($395+4)|0); + var $397=HEAP32[(($396)>>2)]; + var $398=$1; + var $399=(($398+32)|0); + var $400=HEAP32[(($399)>>2)]; + var $401=_golomb_decoding_8bpc($397, $400, $codewordlen1); + var $402=(($401) & 255); + var $403=$4; + var $404=$correlate_row_g; + var $405=(($404+$403)|0); + HEAP8[($405)]=$402; + var $406=$4; + var $407=$correlate_row_g; + var $408=(($407+$406)|0); + var $409=HEAPU8[($408)]; + var $410=(($409)&255); + var $411=((((_family_8bpc+384)|0)+($410<<2))|0); + var $412=HEAP32[(($411)>>2)]; + var $413=$4; + var $414=$3; + var $415=(($414+$413*3)|0); + var $416=(($415-3)|0); + var $417=(($416+1)|0); + var $418=HEAPU8[($417)]; + var $419=(($418)&255); + var $420=$4; + var $421=$2; + var $422=(($421+$420*3)|0); + var $423=(($422+1)|0); + var $424=HEAPU8[($423)]; + var $425=(($424)&255); + var $426=(($419+$425)|0); + var $427=$426 >>> 1; + var $428=(($412+$427)|0); + var $429=$7; + var $430=$428 & $429; + var $431=(($430) & 255); + var $432=$4; + var $433=$3; + var $434=(($433+$432*3)|0); + var $435=(($434+1)|0); + HEAP8[($435)]=$431; + var $436=$1; + var $437=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($436, $437); + var $438=$channel_b; + var $439=$4; + var $440=(($439-1)|0); + var $441=$correlate_row_b; + var $442=(($441+$440)|0); + var $443=HEAPU8[($442)]; + var $444=(($443)&255); + var $445=_find_bucket_8bpc($438, $444); + var $446=(($445+4)|0); + var $447=HEAP32[(($446)>>2)]; + var $448=$1; + var $449=(($448+32)|0); + var $450=HEAP32[(($449)>>2)]; + var $451=_golomb_decoding_8bpc($447, $450, $codewordlen1); + var $452=(($451) & 255); + var $453=$4; + var $454=$correlate_row_b; + var $455=(($454+$453)|0); + HEAP8[($455)]=$452; + var $456=$4; + var $457=$correlate_row_b; + var $458=(($457+$456)|0); + var $459=HEAPU8[($458)]; + var $460=(($459)&255); + var $461=((((_family_8bpc+384)|0)+($460<<2))|0); + var $462=HEAP32[(($461)>>2)]; + var $463=$4; + var $464=$3; + var $465=(($464+$463*3)|0); + var $466=(($465-3)|0); + var $467=(($466)|0); + var $468=HEAPU8[($467)]; + var $469=(($468)&255); + var $470=$4; + var $471=$2; + var $472=(($471+$470*3)|0); + var $473=(($472)|0); + var $474=HEAPU8[($473)]; + var $475=(($474)&255); + var $476=(($469+$475)|0); + var $477=$476 >>> 1; + var $478=(($462+$477)|0); + var $479=$7; + var $480=$478 & $479; + var $481=(($480) & 255); + var $482=$4; + var $483=$3; + var $484=(($483+$482*3)|0); + var $485=(($484)|0); + HEAP8[($485)]=$481; + var $486=$1; + var $487=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($486, $487); + __label__ = 33; break; + case 33: + var $489=$4; + var $490=(($489+1)|0); + $4=$490; + __label__ = 21; break; + case 34: + var $492=$1; + var $493=(($492+360)|0); + var $494=$channel_r; + var $495=$stopidx; + var $496=(($495-1)|0); + var $497=$correlate_row_r; + var $498=(($497+$496)|0); + var $499=HEAPU8[($498)]; + var $500=(($499)&255); + var $501=_find_bucket_8bpc($494, $500); + var $502=$stopidx; + var $503=$correlate_row_r; + var $504=(($503+$502)|0); + var $505=HEAP8[($504)]; + var $506=$6; + _update_model_8bpc($493, $501, $505, $506); + var $507=$1; + var $508=(($507+360)|0); + var $509=$channel_g; + var $510=$stopidx; + var $511=(($510-1)|0); + var $512=$correlate_row_g; + var $513=(($512+$511)|0); + var $514=HEAPU8[($513)]; + var $515=(($514)&255); + var $516=_find_bucket_8bpc($509, $515); + var $517=$stopidx; + var $518=$correlate_row_g; + var $519=(($518+$517)|0); + var $520=HEAP8[($519)]; + var $521=$6; + _update_model_8bpc($508, $516, $520, $521); + var $522=$1; + var $523=(($522+360)|0); + var $524=$channel_b; + var $525=$stopidx; + var $526=(($525-1)|0); + var $527=$correlate_row_b; + var $528=(($527+$526)|0); + var $529=HEAPU8[($528)]; + var $530=(($529)&255); + var $531=_find_bucket_8bpc($524, $530); + var $532=$stopidx; + var $533=$correlate_row_b; + var $534=(($533+$532)|0); + var $535=HEAP8[($534)]; + var $536=$6; + _update_model_8bpc($523, $531, $535, $536); + var $537=$4; + var $538=$1; + var $539=(($538+360)|0); + var $540=(($539+8)|0); + var $541=_tabrand($540); + var $542=$waitmask; + var $543=$541 & $542; + var $544=(($537+$543)|0); + $stopidx=$544; + __label__ = 19; break; + case 35: + __label__ = 36; break; + case 36: + var $547=$4; + var $548=$5; + var $549=(($547)|0) < (($548)|0); + if ($549) { __label__ = 37; break; } else { __label__ = 49; break; } + case 37: + var $551=$4; + var $552=(($551-1)|0); + var $553=$2; + var $554=(($553+$552*3)|0); + var $555=(($554+2)|0); + var $556=HEAPU8[($555)]; + var $557=(($556)&255); + var $558=$4; + var $559=$2; + var $560=(($559+$558*3)|0); + var $561=(($560+2)|0); + var $562=HEAPU8[($561)]; + var $563=(($562)&255); + var $564=(($557)|0)==(($563)|0); + if ($564) { __label__ = 38; break; } else { __label__ = 47; break; } + case 38: + var $566=$4; + var $567=(($566-1)|0); + var $568=$2; + var $569=(($568+$567*3)|0); + var $570=(($569+1)|0); + var $571=HEAPU8[($570)]; + var $572=(($571)&255); + var $573=$4; + var $574=$2; + var $575=(($574+$573*3)|0); + var $576=(($575+1)|0); + var $577=HEAPU8[($576)]; + var $578=(($577)&255); + var $579=(($572)|0)==(($578)|0); + if ($579) { __label__ = 39; break; } else { __label__ = 47; break; } + case 39: + var $581=$4; + var $582=(($581-1)|0); + var $583=$2; + var $584=(($583+$582*3)|0); + var $585=(($584)|0); + var $586=HEAPU8[($585)]; + var $587=(($586)&255); + var $588=$4; + var $589=$2; + var $590=(($589+$588*3)|0); + var $591=(($590)|0); + var $592=HEAPU8[($591)]; + var $593=(($592)&255); + var $594=(($587)|0)==(($593)|0); + if ($594) { __label__ = 40; break; } else { __label__ = 47; break; } + case 40: + var $596=$run_index; + var $597=$4; + var $598=(($596)|0)!=(($597)|0); + if ($598) { __label__ = 41; break; } else { __label__ = 46; break; } + case 41: + var $600=$4; + var $601=(($600)|0) > 2; + if ($601) { __label__ = 42; break; } else { __label__ = 46; break; } + case 42: + var $603=$4; + var $604=(($603-1)|0); + var $605=$3; + var $606=(($605+$604*3)|0); + var $607=(($606+2)|0); + var $608=HEAPU8[($607)]; + var $609=(($608)&255); + var $610=$4; + var $611=(($610-2)|0); + var $612=$3; + var $613=(($612+$611*3)|0); + var $614=(($613+2)|0); + var $615=HEAPU8[($614)]; + var $616=(($615)&255); + var $617=(($609)|0)==(($616)|0); + if ($617) { __label__ = 43; break; } else { __label__ = 46; break; } + case 43: + var $619=$4; + var $620=(($619-1)|0); + var $621=$3; + var $622=(($621+$620*3)|0); + var $623=(($622+1)|0); + var $624=HEAPU8[($623)]; + var $625=(($624)&255); + var $626=$4; + var $627=(($626-2)|0); + var $628=$3; + var $629=(($628+$627*3)|0); + var $630=(($629+1)|0); + var $631=HEAPU8[($630)]; + var $632=(($631)&255); + var $633=(($625)|0)==(($632)|0); + if ($633) { __label__ = 44; break; } else { __label__ = 46; break; } + case 44: + var $635=$4; + var $636=(($635-1)|0); + var $637=$3; + var $638=(($637+$636*3)|0); + var $639=(($638)|0); + var $640=HEAPU8[($639)]; + var $641=(($640)&255); + var $642=$4; + var $643=(($642-2)|0); + var $644=$3; + var $645=(($644+$643*3)|0); + var $646=(($645)|0); + var $647=HEAPU8[($646)]; + var $648=(($647)&255); + var $649=(($641)|0)==(($648)|0); + if ($649) { __label__ = 45; break; } else { __label__ = 46; break; } + case 45: + __label__ = 50; break; + case 46: + __label__ = 47; break; + case 47: + var $653=$channel_r; + var $654=$4; + var $655=(($654-1)|0); + var $656=$correlate_row_r; + var $657=(($656+$655)|0); + var $658=HEAPU8[($657)]; + var $659=(($658)&255); + var $660=_find_bucket_8bpc($653, $659); + var $661=(($660+4)|0); + var $662=HEAP32[(($661)>>2)]; + var $663=$1; + var $664=(($663+32)|0); + var $665=HEAP32[(($664)>>2)]; + var $666=_golomb_decoding_8bpc($662, $665, $codewordlen2); + var $667=(($666) & 255); + var $668=$4; + var $669=$correlate_row_r; + var $670=(($669+$668)|0); + HEAP8[($670)]=$667; + var $671=$4; + var $672=$correlate_row_r; + var $673=(($672+$671)|0); + var $674=HEAPU8[($673)]; + var $675=(($674)&255); + var $676=((((_family_8bpc+384)|0)+($675<<2))|0); + var $677=HEAP32[(($676)>>2)]; + var $678=$4; + var $679=$3; + var $680=(($679+$678*3)|0); + var $681=(($680-3)|0); + var $682=(($681+2)|0); + var $683=HEAPU8[($682)]; + var $684=(($683)&255); + var $685=$4; + var $686=$2; + var $687=(($686+$685*3)|0); + var $688=(($687+2)|0); + var $689=HEAPU8[($688)]; + var $690=(($689)&255); + var $691=(($684+$690)|0); + var $692=$691 >>> 1; + var $693=(($677+$692)|0); + var $694=$7; + var $695=$693 & $694; + var $696=(($695) & 255); + var $697=$4; + var $698=$3; + var $699=(($698+$697*3)|0); + var $700=(($699+2)|0); + HEAP8[($700)]=$696; + var $701=$1; + var $702=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($701, $702); + var $703=$channel_g; + var $704=$4; + var $705=(($704-1)|0); + var $706=$correlate_row_g; + var $707=(($706+$705)|0); + var $708=HEAPU8[($707)]; + var $709=(($708)&255); + var $710=_find_bucket_8bpc($703, $709); + var $711=(($710+4)|0); + var $712=HEAP32[(($711)>>2)]; + var $713=$1; + var $714=(($713+32)|0); + var $715=HEAP32[(($714)>>2)]; + var $716=_golomb_decoding_8bpc($712, $715, $codewordlen2); + var $717=(($716) & 255); + var $718=$4; + var $719=$correlate_row_g; + var $720=(($719+$718)|0); + HEAP8[($720)]=$717; + var $721=$4; + var $722=$correlate_row_g; + var $723=(($722+$721)|0); + var $724=HEAPU8[($723)]; + var $725=(($724)&255); + var $726=((((_family_8bpc+384)|0)+($725<<2))|0); + var $727=HEAP32[(($726)>>2)]; + var $728=$4; + var $729=$3; + var $730=(($729+$728*3)|0); + var $731=(($730-3)|0); + var $732=(($731+1)|0); + var $733=HEAPU8[($732)]; + var $734=(($733)&255); + var $735=$4; + var $736=$2; + var $737=(($736+$735*3)|0); + var $738=(($737+1)|0); + var $739=HEAPU8[($738)]; + var $740=(($739)&255); + var $741=(($734+$740)|0); + var $742=$741 >>> 1; + var $743=(($727+$742)|0); + var $744=$7; + var $745=$743 & $744; + var $746=(($745) & 255); + var $747=$4; + var $748=$3; + var $749=(($748+$747*3)|0); + var $750=(($749+1)|0); + HEAP8[($750)]=$746; + var $751=$1; + var $752=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($751, $752); + var $753=$channel_b; + var $754=$4; + var $755=(($754-1)|0); + var $756=$correlate_row_b; + var $757=(($756+$755)|0); + var $758=HEAPU8[($757)]; + var $759=(($758)&255); + var $760=_find_bucket_8bpc($753, $759); + var $761=(($760+4)|0); + var $762=HEAP32[(($761)>>2)]; + var $763=$1; + var $764=(($763+32)|0); + var $765=HEAP32[(($764)>>2)]; + var $766=_golomb_decoding_8bpc($762, $765, $codewordlen2); + var $767=(($766) & 255); + var $768=$4; + var $769=$correlate_row_b; + var $770=(($769+$768)|0); + HEAP8[($770)]=$767; + var $771=$4; + var $772=$correlate_row_b; + var $773=(($772+$771)|0); + var $774=HEAPU8[($773)]; + var $775=(($774)&255); + var $776=((((_family_8bpc+384)|0)+($775<<2))|0); + var $777=HEAP32[(($776)>>2)]; + var $778=$4; + var $779=$3; + var $780=(($779+$778*3)|0); + var $781=(($780-3)|0); + var $782=(($781)|0); + var $783=HEAPU8[($782)]; + var $784=(($783)&255); + var $785=$4; + var $786=$2; + var $787=(($786+$785*3)|0); + var $788=(($787)|0); + var $789=HEAPU8[($788)]; + var $790=(($789)&255); + var $791=(($784+$790)|0); + var $792=$791 >>> 1; + var $793=(($777+$792)|0); + var $794=$7; + var $795=$793 & $794; + var $796=(($795) & 255); + var $797=$4; + var $798=$3; + var $799=(($798+$797*3)|0); + var $800=(($799)|0); + HEAP8[($800)]=$796; + var $801=$1; + var $802=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($801, $802); + __label__ = 48; break; + case 48: + var $804=$4; + var $805=(($804+1)|0); + $4=$805; + __label__ = 36; break; + case 49: + var $807=$stopidx; + var $808=$5; + var $809=(($807-$808)|0); + var $810=$1; + var $811=(($810+360)|0); + var $812=(($811+4)|0); + HEAP32[(($812)>>2)]=$809; + __label__ = 57; break; + case 50: + var $814=$stopidx; + var $815=$4; + var $816=(($814-$815)|0); + var $817=$1; + var $818=(($817+360)|0); + var $819=(($818+4)|0); + HEAP32[(($819)>>2)]=$816; + var $820=$4; + $run_index=$820; + var $821=$4; + var $822=$1; + var $823=_decode_run($822); + var $824=(($821+$823)|0); + $run_end=$824; + __label__ = 51; break; + case 51: + var $826=$4; + var $827=$run_end; + var $828=(($826)|0) < (($827)|0); + if ($828) { __label__ = 52; break; } else { __label__ = 54; break; } + case 52: + var $830=$4; + var $831=(($830-1)|0); + var $832=$3; + var $833=(($832+$831*3)|0); + var $834=(($833+2)|0); + var $835=HEAP8[($834)]; + var $836=$4; + var $837=$3; + var $838=(($837+$836*3)|0); + var $839=(($838+2)|0); + HEAP8[($839)]=$835; + var $840=$4; + var $841=(($840-1)|0); + var $842=$3; + var $843=(($842+$841*3)|0); + var $844=(($843+1)|0); + var $845=HEAP8[($844)]; + var $846=$4; + var $847=$3; + var $848=(($847+$846*3)|0); + var $849=(($848+1)|0); + HEAP8[($849)]=$845; + var $850=$4; + var $851=(($850-1)|0); + var $852=$3; + var $853=(($852+$851*3)|0); + var $854=(($853)|0); + var $855=HEAP8[($854)]; + var $856=$4; + var $857=$3; + var $858=(($857+$856*3)|0); + var $859=(($858)|0); + HEAP8[($859)]=$855; + __label__ = 53; break; + case 53: + var $861=$4; + var $862=(($861+1)|0); + $4=$862; + __label__ = 51; break; + case 54: + var $864=$4; + var $865=$5; + var $866=(($864)|0)==(($865)|0); + if ($866) { __label__ = 55; break; } else { __label__ = 56; break; } + case 55: + __label__ = 57; break; + case 56: + var $869=$4; + var $870=$1; + var $871=(($870+360)|0); + var $872=(($871+4)|0); + var $873=HEAP32[(($872)>>2)]; + var $874=(($869+$873)|0); + $stopidx=$874; + __label__ = 18; break; + case 57: + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb24_uncompress_row_seg["X"]=1; + +function _quic_rgb24_uncompress_row0_seg($encoder, $i, $cur_row, $end, $waitmask, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $stopidx; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$i; + $3=$cur_row; + $4=$end; + $5=$waitmask; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + __label__ = 2; break; + case 2: + var $25=$4; + var $26=$2; + var $27=(($25-$26)|0); + var $28=(($27)|0) > 0; + if ($28) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $32=$_g_boolean_var_; + var $33=(($32)==(1)); + var $34=(($33)|0)!=0; + if ($34) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str91)|0), ((STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row0_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $41=$2; + var $42=(($41)|0)!=0; + if ($42) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $44=$channel_r; + var $45=$correlate_row_r; + var $46=(($45-1)|0); + var $47=HEAPU8[($46)]; + var $48=(($47)&255); + var $49=_find_bucket_8bpc($44, $48); + var $50=(($49+4)|0); + var $51=HEAP32[(($50)>>2)]; + var $52=$1; + var $53=(($52+32)|0); + var $54=HEAP32[(($53)>>2)]; + var $55=_golomb_decoding_8bpc($51, $54, $codewordlen); + var $56=(($55) & 255); + var $57=$correlate_row_r; + var $58=(($57)|0); + HEAP8[($58)]=$56; + var $59=$correlate_row_r; + var $60=(($59)|0); + var $61=HEAPU8[($60)]; + var $62=(($61)&255); + var $63=((((_family_8bpc+384)|0)+($62<<2))|0); + var $64=HEAP32[(($63)>>2)]; + var $65=(($64) & 255); + var $66=$3; + var $67=(($66)|0); + var $68=(($67+2)|0); + HEAP8[($68)]=$65; + var $69=$1; + var $70=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($69, $70); + var $71=$channel_g; + var $72=$correlate_row_g; + var $73=(($72-1)|0); + var $74=HEAPU8[($73)]; + var $75=(($74)&255); + var $76=_find_bucket_8bpc($71, $75); + var $77=(($76+4)|0); + var $78=HEAP32[(($77)>>2)]; + var $79=$1; + var $80=(($79+32)|0); + var $81=HEAP32[(($80)>>2)]; + var $82=_golomb_decoding_8bpc($78, $81, $codewordlen); + var $83=(($82) & 255); + var $84=$correlate_row_g; + var $85=(($84)|0); + HEAP8[($85)]=$83; + var $86=$correlate_row_g; + var $87=(($86)|0); + var $88=HEAPU8[($87)]; + var $89=(($88)&255); + var $90=((((_family_8bpc+384)|0)+($89<<2))|0); + var $91=HEAP32[(($90)>>2)]; + var $92=(($91) & 255); + var $93=$3; + var $94=(($93)|0); + var $95=(($94+1)|0); + HEAP8[($95)]=$92; + var $96=$1; + var $97=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($96, $97); + var $98=$channel_b; + var $99=$correlate_row_b; + var $100=(($99-1)|0); + var $101=HEAPU8[($100)]; + var $102=(($101)&255); + var $103=_find_bucket_8bpc($98, $102); + var $104=(($103+4)|0); + var $105=HEAP32[(($104)>>2)]; + var $106=$1; + var $107=(($106+32)|0); + var $108=HEAP32[(($107)>>2)]; + var $109=_golomb_decoding_8bpc($105, $108, $codewordlen); + var $110=(($109) & 255); + var $111=$correlate_row_b; + var $112=(($111)|0); + HEAP8[($112)]=$110; + var $113=$correlate_row_b; + var $114=(($113)|0); + var $115=HEAPU8[($114)]; + var $116=(($115)&255); + var $117=((((_family_8bpc+384)|0)+($116<<2))|0); + var $118=HEAP32[(($117)>>2)]; + var $119=(($118) & 255); + var $120=$3; + var $121=(($120)|0); + var $122=(($121)|0); + HEAP8[($122)]=$119; + var $123=$1; + var $124=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($123, $124); + var $125=$1; + var $126=(($125+360)|0); + var $127=(($126+4)|0); + var $128=HEAP32[(($127)>>2)]; + var $129=(($128)|0)!=0; + if ($129) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $131=$1; + var $132=(($131+360)|0); + var $133=(($132+4)|0); + var $134=HEAP32[(($133)>>2)]; + var $135=(($134-1)|0); + HEAP32[(($133)>>2)]=$135; + __label__ = 15; break; + case 14: + var $137=$1; + var $138=(($137+360)|0); + var $139=(($138+8)|0); + var $140=_tabrand($139); + var $141=$5; + var $142=$140 & $141; + var $143=$1; + var $144=(($143+360)|0); + var $145=(($144+4)|0); + HEAP32[(($145)>>2)]=$142; + var $146=$1; + var $147=(($146+360)|0); + var $148=$channel_r; + var $149=$correlate_row_r; + var $150=(($149-1)|0); + var $151=HEAPU8[($150)]; + var $152=(($151)&255); + var $153=_find_bucket_8bpc($148, $152); + var $154=$correlate_row_r; + var $155=(($154)|0); + var $156=HEAP8[($155)]; + var $157=$6; + _update_model_8bpc($147, $153, $156, $157); + var $158=$1; + var $159=(($158+360)|0); + var $160=$channel_g; + var $161=$correlate_row_g; + var $162=(($161-1)|0); + var $163=HEAPU8[($162)]; + var $164=(($163)&255); + var $165=_find_bucket_8bpc($160, $164); + var $166=$correlate_row_g; + var $167=(($166)|0); + var $168=HEAP8[($167)]; + var $169=$6; + _update_model_8bpc($159, $165, $168, $169); + var $170=$1; + var $171=(($170+360)|0); + var $172=$channel_b; + var $173=$correlate_row_b; + var $174=(($173-1)|0); + var $175=HEAPU8[($174)]; + var $176=(($175)&255); + var $177=_find_bucket_8bpc($172, $176); + var $178=$correlate_row_b; + var $179=(($178)|0); + var $180=HEAP8[($179)]; + var $181=$6; + _update_model_8bpc($171, $177, $180, $181); + __label__ = 15; break; + case 15: + var $183=$2; + var $184=(($183+1)|0); + $2=$184; + var $185=$1; + var $186=(($185+360)|0); + var $187=(($186+4)|0); + var $188=HEAP32[(($187)>>2)]; + var $189=(($184+$188)|0); + $stopidx=$189; + __label__ = 17; break; + case 16: + var $191=$2; + var $192=$1; + var $193=(($192+360)|0); + var $194=(($193+4)|0); + var $195=HEAP32[(($194)>>2)]; + var $196=(($191+$195)|0); + $stopidx=$196; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + var $199=$stopidx; + var $200=$4; + var $201=(($199)|0) < (($200)|0); + if ($201) { __label__ = 19; break; } else { __label__ = 24; break; } + case 19: + __label__ = 20; break; + case 20: + var $204=$2; + var $205=$stopidx; + var $206=(($204)|0) <= (($205)|0); + if ($206) { __label__ = 21; break; } else { __label__ = 23; break; } + case 21: + var $208=$channel_r; + var $209=$2; + var $210=(($209-1)|0); + var $211=$correlate_row_r; + var $212=(($211+$210)|0); + var $213=HEAPU8[($212)]; + var $214=(($213)&255); + var $215=_find_bucket_8bpc($208, $214); + var $216=(($215+4)|0); + var $217=HEAP32[(($216)>>2)]; + var $218=$1; + var $219=(($218+32)|0); + var $220=HEAP32[(($219)>>2)]; + var $221=_golomb_decoding_8bpc($217, $220, $codewordlen1); + var $222=(($221) & 255); + var $223=$2; + var $224=$correlate_row_r; + var $225=(($224+$223)|0); + HEAP8[($225)]=$222; + var $226=$2; + var $227=$correlate_row_r; + var $228=(($227+$226)|0); + var $229=HEAPU8[($228)]; + var $230=(($229)&255); + var $231=((((_family_8bpc+384)|0)+($230<<2))|0); + var $232=HEAP32[(($231)>>2)]; + var $233=$2; + var $234=$3; + var $235=(($234+$233*3)|0); + var $236=(($235-3)|0); + var $237=(($236+2)|0); + var $238=HEAPU8[($237)]; + var $239=(($238)&255); + var $240=(($232+$239)|0); + var $241=$7; + var $242=$240 & $241; + var $243=(($242) & 255); + var $244=$2; + var $245=$3; + var $246=(($245+$244*3)|0); + var $247=(($246+2)|0); + HEAP8[($247)]=$243; + var $248=$1; + var $249=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($248, $249); + var $250=$channel_g; + var $251=$2; + var $252=(($251-1)|0); + var $253=$correlate_row_g; + var $254=(($253+$252)|0); + var $255=HEAPU8[($254)]; + var $256=(($255)&255); + var $257=_find_bucket_8bpc($250, $256); + var $258=(($257+4)|0); + var $259=HEAP32[(($258)>>2)]; + var $260=$1; + var $261=(($260+32)|0); + var $262=HEAP32[(($261)>>2)]; + var $263=_golomb_decoding_8bpc($259, $262, $codewordlen1); + var $264=(($263) & 255); + var $265=$2; + var $266=$correlate_row_g; + var $267=(($266+$265)|0); + HEAP8[($267)]=$264; + var $268=$2; + var $269=$correlate_row_g; + var $270=(($269+$268)|0); + var $271=HEAPU8[($270)]; + var $272=(($271)&255); + var $273=((((_family_8bpc+384)|0)+($272<<2))|0); + var $274=HEAP32[(($273)>>2)]; + var $275=$2; + var $276=$3; + var $277=(($276+$275*3)|0); + var $278=(($277-3)|0); + var $279=(($278+1)|0); + var $280=HEAPU8[($279)]; + var $281=(($280)&255); + var $282=(($274+$281)|0); + var $283=$7; + var $284=$282 & $283; + var $285=(($284) & 255); + var $286=$2; + var $287=$3; + var $288=(($287+$286*3)|0); + var $289=(($288+1)|0); + HEAP8[($289)]=$285; + var $290=$1; + var $291=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($290, $291); + var $292=$channel_b; + var $293=$2; + var $294=(($293-1)|0); + var $295=$correlate_row_b; + var $296=(($295+$294)|0); + var $297=HEAPU8[($296)]; + var $298=(($297)&255); + var $299=_find_bucket_8bpc($292, $298); + var $300=(($299+4)|0); + var $301=HEAP32[(($300)>>2)]; + var $302=$1; + var $303=(($302+32)|0); + var $304=HEAP32[(($303)>>2)]; + var $305=_golomb_decoding_8bpc($301, $304, $codewordlen1); + var $306=(($305) & 255); + var $307=$2; + var $308=$correlate_row_b; + var $309=(($308+$307)|0); + HEAP8[($309)]=$306; + var $310=$2; + var $311=$correlate_row_b; + var $312=(($311+$310)|0); + var $313=HEAPU8[($312)]; + var $314=(($313)&255); + var $315=((((_family_8bpc+384)|0)+($314<<2))|0); + var $316=HEAP32[(($315)>>2)]; + var $317=$2; + var $318=$3; + var $319=(($318+$317*3)|0); + var $320=(($319-3)|0); + var $321=(($320)|0); + var $322=HEAPU8[($321)]; + var $323=(($322)&255); + var $324=(($316+$323)|0); + var $325=$7; + var $326=$324 & $325; + var $327=(($326) & 255); + var $328=$2; + var $329=$3; + var $330=(($329+$328*3)|0); + var $331=(($330)|0); + HEAP8[($331)]=$327; + var $332=$1; + var $333=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($332, $333); + __label__ = 22; break; + case 22: + var $335=$2; + var $336=(($335+1)|0); + $2=$336; + __label__ = 20; break; + case 23: + var $338=$1; + var $339=(($338+360)|0); + var $340=$channel_r; + var $341=$stopidx; + var $342=(($341-1)|0); + var $343=$correlate_row_r; + var $344=(($343+$342)|0); + var $345=HEAPU8[($344)]; + var $346=(($345)&255); + var $347=_find_bucket_8bpc($340, $346); + var $348=$stopidx; + var $349=$correlate_row_r; + var $350=(($349+$348)|0); + var $351=HEAP8[($350)]; + var $352=$6; + _update_model_8bpc($339, $347, $351, $352); + var $353=$1; + var $354=(($353+360)|0); + var $355=$channel_g; + var $356=$stopidx; + var $357=(($356-1)|0); + var $358=$correlate_row_g; + var $359=(($358+$357)|0); + var $360=HEAPU8[($359)]; + var $361=(($360)&255); + var $362=_find_bucket_8bpc($355, $361); + var $363=$stopidx; + var $364=$correlate_row_g; + var $365=(($364+$363)|0); + var $366=HEAP8[($365)]; + var $367=$6; + _update_model_8bpc($354, $362, $366, $367); + var $368=$1; + var $369=(($368+360)|0); + var $370=$channel_b; + var $371=$stopidx; + var $372=(($371-1)|0); + var $373=$correlate_row_b; + var $374=(($373+$372)|0); + var $375=HEAPU8[($374)]; + var $376=(($375)&255); + var $377=_find_bucket_8bpc($370, $376); + var $378=$stopidx; + var $379=$correlate_row_b; + var $380=(($379+$378)|0); + var $381=HEAP8[($380)]; + var $382=$6; + _update_model_8bpc($369, $377, $381, $382); + var $383=$2; + var $384=$1; + var $385=(($384+360)|0); + var $386=(($385+8)|0); + var $387=_tabrand($386); + var $388=$5; + var $389=$387 & $388; + var $390=(($383+$389)|0); + $stopidx=$390; + __label__ = 18; break; + case 24: + __label__ = 25; break; + case 25: + var $393=$2; + var $394=$4; + var $395=(($393)|0) < (($394)|0); + if ($395) { __label__ = 26; break; } else { __label__ = 28; break; } + case 26: + var $397=$channel_r; + var $398=$2; + var $399=(($398-1)|0); + var $400=$correlate_row_r; + var $401=(($400+$399)|0); + var $402=HEAPU8[($401)]; + var $403=(($402)&255); + var $404=_find_bucket_8bpc($397, $403); + var $405=(($404+4)|0); + var $406=HEAP32[(($405)>>2)]; + var $407=$1; + var $408=(($407+32)|0); + var $409=HEAP32[(($408)>>2)]; + var $410=_golomb_decoding_8bpc($406, $409, $codewordlen2); + var $411=(($410) & 255); + var $412=$2; + var $413=$correlate_row_r; + var $414=(($413+$412)|0); + HEAP8[($414)]=$411; + var $415=$2; + var $416=$correlate_row_r; + var $417=(($416+$415)|0); + var $418=HEAPU8[($417)]; + var $419=(($418)&255); + var $420=((((_family_8bpc+384)|0)+($419<<2))|0); + var $421=HEAP32[(($420)>>2)]; + var $422=$2; + var $423=$3; + var $424=(($423+$422*3)|0); + var $425=(($424-3)|0); + var $426=(($425+2)|0); + var $427=HEAPU8[($426)]; + var $428=(($427)&255); + var $429=(($421+$428)|0); + var $430=$7; + var $431=$429 & $430; + var $432=(($431) & 255); + var $433=$2; + var $434=$3; + var $435=(($434+$433*3)|0); + var $436=(($435+2)|0); + HEAP8[($436)]=$432; + var $437=$1; + var $438=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($437, $438); + var $439=$channel_g; + var $440=$2; + var $441=(($440-1)|0); + var $442=$correlate_row_g; + var $443=(($442+$441)|0); + var $444=HEAPU8[($443)]; + var $445=(($444)&255); + var $446=_find_bucket_8bpc($439, $445); + var $447=(($446+4)|0); + var $448=HEAP32[(($447)>>2)]; + var $449=$1; + var $450=(($449+32)|0); + var $451=HEAP32[(($450)>>2)]; + var $452=_golomb_decoding_8bpc($448, $451, $codewordlen2); + var $453=(($452) & 255); + var $454=$2; + var $455=$correlate_row_g; + var $456=(($455+$454)|0); + HEAP8[($456)]=$453; + var $457=$2; + var $458=$correlate_row_g; + var $459=(($458+$457)|0); + var $460=HEAPU8[($459)]; + var $461=(($460)&255); + var $462=((((_family_8bpc+384)|0)+($461<<2))|0); + var $463=HEAP32[(($462)>>2)]; + var $464=$2; + var $465=$3; + var $466=(($465+$464*3)|0); + var $467=(($466-3)|0); + var $468=(($467+1)|0); + var $469=HEAPU8[($468)]; + var $470=(($469)&255); + var $471=(($463+$470)|0); + var $472=$7; + var $473=$471 & $472; + var $474=(($473) & 255); + var $475=$2; + var $476=$3; + var $477=(($476+$475*3)|0); + var $478=(($477+1)|0); + HEAP8[($478)]=$474; + var $479=$1; + var $480=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($479, $480); + var $481=$channel_b; + var $482=$2; + var $483=(($482-1)|0); + var $484=$correlate_row_b; + var $485=(($484+$483)|0); + var $486=HEAPU8[($485)]; + var $487=(($486)&255); + var $488=_find_bucket_8bpc($481, $487); + var $489=(($488+4)|0); + var $490=HEAP32[(($489)>>2)]; + var $491=$1; + var $492=(($491+32)|0); + var $493=HEAP32[(($492)>>2)]; + var $494=_golomb_decoding_8bpc($490, $493, $codewordlen2); + var $495=(($494) & 255); + var $496=$2; + var $497=$correlate_row_b; + var $498=(($497+$496)|0); + HEAP8[($498)]=$495; + var $499=$2; + var $500=$correlate_row_b; + var $501=(($500+$499)|0); + var $502=HEAPU8[($501)]; + var $503=(($502)&255); + var $504=((((_family_8bpc+384)|0)+($503<<2))|0); + var $505=HEAP32[(($504)>>2)]; + var $506=$2; + var $507=$3; + var $508=(($507+$506*3)|0); + var $509=(($508-3)|0); + var $510=(($509)|0); + var $511=HEAPU8[($510)]; + var $512=(($511)&255); + var $513=(($505+$512)|0); + var $514=$7; + var $515=$513 & $514; + var $516=(($515) & 255); + var $517=$2; + var $518=$3; + var $519=(($518+$517*3)|0); + var $520=(($519)|0); + HEAP8[($520)]=$516; + var $521=$1; + var $522=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($521, $522); + __label__ = 27; break; + case 27: + var $524=$2; + var $525=(($524+1)|0); + $2=$525; + __label__ = 25; break; + case 28: + var $527=$stopidx; + var $528=$4; + var $529=(($527-$528)|0); + var $530=$1; + var $531=(($530+360)|0); + var $532=(($531+4)|0); + HEAP32[(($532)>>2)]=$529; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb24_uncompress_row0_seg["X"]=1; + +function _quic_rgb32_uncompress_row_seg($encoder, $prev_row, $cur_row, $i, $end, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $waitmask; + var $stopidx; + var $run_index; + var $run_end; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$prev_row; + $3=$cur_row; + $4=$i; + $5=$end; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + var $24=$1; + var $25=(($24+360)|0); + var $26=(($25+16)|0); + var $27=HEAP32[(($26)>>2)]; + var $28=((_bppmask+($27<<2))|0); + var $29=HEAP32[(($28)>>2)]; + $waitmask=$29; + $run_index=0; + __label__ = 2; break; + case 2: + var $31=$5; + var $32=$4; + var $33=(($31-$32)|0); + var $34=(($33)|0) > 0; + if ($34) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $38=$_g_boolean_var_; + var $39=(($38)==(1)); + var $40=(($39)|0)!=0; + if ($40) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str87)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $47=$4; + var $48=(($47)|0)!=0; + if ($48) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $50=$4; + var $51=$3; + var $52=(($51+($50<<2))|0); + var $53=(($52+3)|0); + HEAP8[($53)]=0; + var $54=$channel_r; + var $55=$correlate_row_r; + var $56=(($55-1)|0); + var $57=HEAPU8[($56)]; + var $58=(($57)&255); + var $59=_find_bucket_8bpc($54, $58); + var $60=(($59+4)|0); + var $61=HEAP32[(($60)>>2)]; + var $62=$1; + var $63=(($62+32)|0); + var $64=HEAP32[(($63)>>2)]; + var $65=_golomb_decoding_8bpc($61, $64, $codewordlen); + var $66=(($65) & 255); + var $67=$correlate_row_r; + var $68=(($67)|0); + HEAP8[($68)]=$66; + var $69=$correlate_row_r; + var $70=(($69)|0); + var $71=HEAPU8[($70)]; + var $72=(($71)&255); + var $73=((((_family_8bpc+384)|0)+($72<<2))|0); + var $74=HEAP32[(($73)>>2)]; + var $75=$2; + var $76=(($75+2)|0); + var $77=HEAPU8[($76)]; + var $78=(($77)&255); + var $79=(($74+$78)|0); + var $80=$7; + var $81=$79 & $80; + var $82=(($81) & 255); + var $83=$3; + var $84=(($83)|0); + var $85=(($84+2)|0); + HEAP8[($85)]=$82; + var $86=$1; + var $87=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($86, $87); + var $88=$channel_g; + var $89=$correlate_row_g; + var $90=(($89-1)|0); + var $91=HEAPU8[($90)]; + var $92=(($91)&255); + var $93=_find_bucket_8bpc($88, $92); + var $94=(($93+4)|0); + var $95=HEAP32[(($94)>>2)]; + var $96=$1; + var $97=(($96+32)|0); + var $98=HEAP32[(($97)>>2)]; + var $99=_golomb_decoding_8bpc($95, $98, $codewordlen); + var $100=(($99) & 255); + var $101=$correlate_row_g; + var $102=(($101)|0); + HEAP8[($102)]=$100; + var $103=$correlate_row_g; + var $104=(($103)|0); + var $105=HEAPU8[($104)]; + var $106=(($105)&255); + var $107=((((_family_8bpc+384)|0)+($106<<2))|0); + var $108=HEAP32[(($107)>>2)]; + var $109=$2; + var $110=(($109+1)|0); + var $111=HEAPU8[($110)]; + var $112=(($111)&255); + var $113=(($108+$112)|0); + var $114=$7; + var $115=$113 & $114; + var $116=(($115) & 255); + var $117=$3; + var $118=(($117)|0); + var $119=(($118+1)|0); + HEAP8[($119)]=$116; + var $120=$1; + var $121=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($120, $121); + var $122=$channel_b; + var $123=$correlate_row_b; + var $124=(($123-1)|0); + var $125=HEAPU8[($124)]; + var $126=(($125)&255); + var $127=_find_bucket_8bpc($122, $126); + var $128=(($127+4)|0); + var $129=HEAP32[(($128)>>2)]; + var $130=$1; + var $131=(($130+32)|0); + var $132=HEAP32[(($131)>>2)]; + var $133=_golomb_decoding_8bpc($129, $132, $codewordlen); + var $134=(($133) & 255); + var $135=$correlate_row_b; + var $136=(($135)|0); + HEAP8[($136)]=$134; + var $137=$correlate_row_b; + var $138=(($137)|0); + var $139=HEAPU8[($138)]; + var $140=(($139)&255); + var $141=((((_family_8bpc+384)|0)+($140<<2))|0); + var $142=HEAP32[(($141)>>2)]; + var $143=$2; + var $144=(($143)|0); + var $145=HEAPU8[($144)]; + var $146=(($145)&255); + var $147=(($142+$146)|0); + var $148=$7; + var $149=$147 & $148; + var $150=(($149) & 255); + var $151=$3; + var $152=(($151)|0); + var $153=(($152)|0); + HEAP8[($153)]=$150; + var $154=$1; + var $155=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($154, $155); + var $156=$1; + var $157=(($156+360)|0); + var $158=(($157+4)|0); + var $159=HEAP32[(($158)>>2)]; + var $160=(($159)|0)!=0; + if ($160) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $162=$1; + var $163=(($162+360)|0); + var $164=(($163+4)|0); + var $165=HEAP32[(($164)>>2)]; + var $166=(($165-1)|0); + HEAP32[(($164)>>2)]=$166; + __label__ = 15; break; + case 14: + var $168=$1; + var $169=(($168+360)|0); + var $170=(($169+8)|0); + var $171=_tabrand($170); + var $172=$waitmask; + var $173=$171 & $172; + var $174=$1; + var $175=(($174+360)|0); + var $176=(($175+4)|0); + HEAP32[(($176)>>2)]=$173; + var $177=$1; + var $178=(($177+360)|0); + var $179=$channel_r; + var $180=$correlate_row_r; + var $181=(($180-1)|0); + var $182=HEAPU8[($181)]; + var $183=(($182)&255); + var $184=_find_bucket_8bpc($179, $183); + var $185=$correlate_row_r; + var $186=(($185)|0); + var $187=HEAP8[($186)]; + var $188=$6; + _update_model_8bpc($178, $184, $187, $188); + var $189=$1; + var $190=(($189+360)|0); + var $191=$channel_g; + var $192=$correlate_row_g; + var $193=(($192-1)|0); + var $194=HEAPU8[($193)]; + var $195=(($194)&255); + var $196=_find_bucket_8bpc($191, $195); + var $197=$correlate_row_g; + var $198=(($197)|0); + var $199=HEAP8[($198)]; + var $200=$6; + _update_model_8bpc($190, $196, $199, $200); + var $201=$1; + var $202=(($201+360)|0); + var $203=$channel_b; + var $204=$correlate_row_b; + var $205=(($204-1)|0); + var $206=HEAPU8[($205)]; + var $207=(($206)&255); + var $208=_find_bucket_8bpc($203, $207); + var $209=$correlate_row_b; + var $210=(($209)|0); + var $211=HEAP8[($210)]; + var $212=$6; + _update_model_8bpc($202, $208, $211, $212); + __label__ = 15; break; + case 15: + var $214=$4; + var $215=(($214+1)|0); + $4=$215; + var $216=$1; + var $217=(($216+360)|0); + var $218=(($217+4)|0); + var $219=HEAP32[(($218)>>2)]; + var $220=(($215+$219)|0); + $stopidx=$220; + __label__ = 17; break; + case 16: + var $222=$4; + var $223=$1; + var $224=(($223+360)|0); + var $225=(($224+4)|0); + var $226=HEAP32[(($225)>>2)]; + var $227=(($222+$226)|0); + $stopidx=$227; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + __label__ = 19; break; + case 19: + var $231=$stopidx; + var $232=$5; + var $233=(($231)|0) < (($232)|0); + if ($233) { __label__ = 20; break; } else { __label__ = 35; break; } + case 20: + __label__ = 21; break; + case 21: + var $236=$4; + var $237=$stopidx; + var $238=(($236)|0) <= (($237)|0); + if ($238) { __label__ = 22; break; } else { __label__ = 34; break; } + case 22: + var $240=$4; + var $241=(($240-1)|0); + var $242=$2; + var $243=(($242+($241<<2))|0); + var $244=(($243+2)|0); + var $245=HEAPU8[($244)]; + var $246=(($245)&255); + var $247=$4; + var $248=$2; + var $249=(($248+($247<<2))|0); + var $250=(($249+2)|0); + var $251=HEAPU8[($250)]; + var $252=(($251)&255); + var $253=(($246)|0)==(($252)|0); + if ($253) { __label__ = 23; break; } else { __label__ = 32; break; } + case 23: + var $255=$4; + var $256=(($255-1)|0); + var $257=$2; + var $258=(($257+($256<<2))|0); + var $259=(($258+1)|0); + var $260=HEAPU8[($259)]; + var $261=(($260)&255); + var $262=$4; + var $263=$2; + var $264=(($263+($262<<2))|0); + var $265=(($264+1)|0); + var $266=HEAPU8[($265)]; + var $267=(($266)&255); + var $268=(($261)|0)==(($267)|0); + if ($268) { __label__ = 24; break; } else { __label__ = 32; break; } + case 24: + var $270=$4; + var $271=(($270-1)|0); + var $272=$2; + var $273=(($272+($271<<2))|0); + var $274=(($273)|0); + var $275=HEAPU8[($274)]; + var $276=(($275)&255); + var $277=$4; + var $278=$2; + var $279=(($278+($277<<2))|0); + var $280=(($279)|0); + var $281=HEAPU8[($280)]; + var $282=(($281)&255); + var $283=(($276)|0)==(($282)|0); + if ($283) { __label__ = 25; break; } else { __label__ = 32; break; } + case 25: + var $285=$run_index; + var $286=$4; + var $287=(($285)|0)!=(($286)|0); + if ($287) { __label__ = 26; break; } else { __label__ = 31; break; } + case 26: + var $289=$4; + var $290=(($289)|0) > 2; + if ($290) { __label__ = 27; break; } else { __label__ = 31; break; } + case 27: + var $292=$4; + var $293=(($292-1)|0); + var $294=$3; + var $295=(($294+($293<<2))|0); + var $296=(($295+2)|0); + var $297=HEAPU8[($296)]; + var $298=(($297)&255); + var $299=$4; + var $300=(($299-2)|0); + var $301=$3; + var $302=(($301+($300<<2))|0); + var $303=(($302+2)|0); + var $304=HEAPU8[($303)]; + var $305=(($304)&255); + var $306=(($298)|0)==(($305)|0); + if ($306) { __label__ = 28; break; } else { __label__ = 31; break; } + case 28: + var $308=$4; + var $309=(($308-1)|0); + var $310=$3; + var $311=(($310+($309<<2))|0); + var $312=(($311+1)|0); + var $313=HEAPU8[($312)]; + var $314=(($313)&255); + var $315=$4; + var $316=(($315-2)|0); + var $317=$3; + var $318=(($317+($316<<2))|0); + var $319=(($318+1)|0); + var $320=HEAPU8[($319)]; + var $321=(($320)&255); + var $322=(($314)|0)==(($321)|0); + if ($322) { __label__ = 29; break; } else { __label__ = 31; break; } + case 29: + var $324=$4; + var $325=(($324-1)|0); + var $326=$3; + var $327=(($326+($325<<2))|0); + var $328=(($327)|0); + var $329=HEAPU8[($328)]; + var $330=(($329)&255); + var $331=$4; + var $332=(($331-2)|0); + var $333=$3; + var $334=(($333+($332<<2))|0); + var $335=(($334)|0); + var $336=HEAPU8[($335)]; + var $337=(($336)&255); + var $338=(($330)|0)==(($337)|0); + if ($338) { __label__ = 30; break; } else { __label__ = 31; break; } + case 30: + __label__ = 50; break; + case 31: + __label__ = 32; break; + case 32: + var $342=$4; + var $343=$3; + var $344=(($343+($342<<2))|0); + var $345=(($344+3)|0); + HEAP8[($345)]=0; + var $346=$channel_r; + var $347=$4; + var $348=(($347-1)|0); + var $349=$correlate_row_r; + var $350=(($349+$348)|0); + var $351=HEAPU8[($350)]; + var $352=(($351)&255); + var $353=_find_bucket_8bpc($346, $352); + var $354=(($353+4)|0); + var $355=HEAP32[(($354)>>2)]; + var $356=$1; + var $357=(($356+32)|0); + var $358=HEAP32[(($357)>>2)]; + var $359=_golomb_decoding_8bpc($355, $358, $codewordlen1); + var $360=(($359) & 255); + var $361=$4; + var $362=$correlate_row_r; + var $363=(($362+$361)|0); + HEAP8[($363)]=$360; + var $364=$4; + var $365=$correlate_row_r; + var $366=(($365+$364)|0); + var $367=HEAPU8[($366)]; + var $368=(($367)&255); + var $369=((((_family_8bpc+384)|0)+($368<<2))|0); + var $370=HEAP32[(($369)>>2)]; + var $371=$4; + var $372=$3; + var $373=(($372+($371<<2))|0); + var $374=(($373-4)|0); + var $375=(($374+2)|0); + var $376=HEAPU8[($375)]; + var $377=(($376)&255); + var $378=$4; + var $379=$2; + var $380=(($379+($378<<2))|0); + var $381=(($380+2)|0); + var $382=HEAPU8[($381)]; + var $383=(($382)&255); + var $384=(($377+$383)|0); + var $385=$384 >>> 1; + var $386=(($370+$385)|0); + var $387=$7; + var $388=$386 & $387; + var $389=(($388) & 255); + var $390=$4; + var $391=$3; + var $392=(($391+($390<<2))|0); + var $393=(($392+2)|0); + HEAP8[($393)]=$389; + var $394=$1; + var $395=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($394, $395); + var $396=$channel_g; + var $397=$4; + var $398=(($397-1)|0); + var $399=$correlate_row_g; + var $400=(($399+$398)|0); + var $401=HEAPU8[($400)]; + var $402=(($401)&255); + var $403=_find_bucket_8bpc($396, $402); + var $404=(($403+4)|0); + var $405=HEAP32[(($404)>>2)]; + var $406=$1; + var $407=(($406+32)|0); + var $408=HEAP32[(($407)>>2)]; + var $409=_golomb_decoding_8bpc($405, $408, $codewordlen1); + var $410=(($409) & 255); + var $411=$4; + var $412=$correlate_row_g; + var $413=(($412+$411)|0); + HEAP8[($413)]=$410; + var $414=$4; + var $415=$correlate_row_g; + var $416=(($415+$414)|0); + var $417=HEAPU8[($416)]; + var $418=(($417)&255); + var $419=((((_family_8bpc+384)|0)+($418<<2))|0); + var $420=HEAP32[(($419)>>2)]; + var $421=$4; + var $422=$3; + var $423=(($422+($421<<2))|0); + var $424=(($423-4)|0); + var $425=(($424+1)|0); + var $426=HEAPU8[($425)]; + var $427=(($426)&255); + var $428=$4; + var $429=$2; + var $430=(($429+($428<<2))|0); + var $431=(($430+1)|0); + var $432=HEAPU8[($431)]; + var $433=(($432)&255); + var $434=(($427+$433)|0); + var $435=$434 >>> 1; + var $436=(($420+$435)|0); + var $437=$7; + var $438=$436 & $437; + var $439=(($438) & 255); + var $440=$4; + var $441=$3; + var $442=(($441+($440<<2))|0); + var $443=(($442+1)|0); + HEAP8[($443)]=$439; + var $444=$1; + var $445=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($444, $445); + var $446=$channel_b; + var $447=$4; + var $448=(($447-1)|0); + var $449=$correlate_row_b; + var $450=(($449+$448)|0); + var $451=HEAPU8[($450)]; + var $452=(($451)&255); + var $453=_find_bucket_8bpc($446, $452); + var $454=(($453+4)|0); + var $455=HEAP32[(($454)>>2)]; + var $456=$1; + var $457=(($456+32)|0); + var $458=HEAP32[(($457)>>2)]; + var $459=_golomb_decoding_8bpc($455, $458, $codewordlen1); + var $460=(($459) & 255); + var $461=$4; + var $462=$correlate_row_b; + var $463=(($462+$461)|0); + HEAP8[($463)]=$460; + var $464=$4; + var $465=$correlate_row_b; + var $466=(($465+$464)|0); + var $467=HEAPU8[($466)]; + var $468=(($467)&255); + var $469=((((_family_8bpc+384)|0)+($468<<2))|0); + var $470=HEAP32[(($469)>>2)]; + var $471=$4; + var $472=$3; + var $473=(($472+($471<<2))|0); + var $474=(($473-4)|0); + var $475=(($474)|0); + var $476=HEAPU8[($475)]; + var $477=(($476)&255); + var $478=$4; + var $479=$2; + var $480=(($479+($478<<2))|0); + var $481=(($480)|0); + var $482=HEAPU8[($481)]; + var $483=(($482)&255); + var $484=(($477+$483)|0); + var $485=$484 >>> 1; + var $486=(($470+$485)|0); + var $487=$7; + var $488=$486 & $487; + var $489=(($488) & 255); + var $490=$4; + var $491=$3; + var $492=(($491+($490<<2))|0); + var $493=(($492)|0); + HEAP8[($493)]=$489; + var $494=$1; + var $495=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($494, $495); + __label__ = 33; break; + case 33: + var $497=$4; + var $498=(($497+1)|0); + $4=$498; + __label__ = 21; break; + case 34: + var $500=$1; + var $501=(($500+360)|0); + var $502=$channel_r; + var $503=$stopidx; + var $504=(($503-1)|0); + var $505=$correlate_row_r; + var $506=(($505+$504)|0); + var $507=HEAPU8[($506)]; + var $508=(($507)&255); + var $509=_find_bucket_8bpc($502, $508); + var $510=$stopidx; + var $511=$correlate_row_r; + var $512=(($511+$510)|0); + var $513=HEAP8[($512)]; + var $514=$6; + _update_model_8bpc($501, $509, $513, $514); + var $515=$1; + var $516=(($515+360)|0); + var $517=$channel_g; + var $518=$stopidx; + var $519=(($518-1)|0); + var $520=$correlate_row_g; + var $521=(($520+$519)|0); + var $522=HEAPU8[($521)]; + var $523=(($522)&255); + var $524=_find_bucket_8bpc($517, $523); + var $525=$stopidx; + var $526=$correlate_row_g; + var $527=(($526+$525)|0); + var $528=HEAP8[($527)]; + var $529=$6; + _update_model_8bpc($516, $524, $528, $529); + var $530=$1; + var $531=(($530+360)|0); + var $532=$channel_b; + var $533=$stopidx; + var $534=(($533-1)|0); + var $535=$correlate_row_b; + var $536=(($535+$534)|0); + var $537=HEAPU8[($536)]; + var $538=(($537)&255); + var $539=_find_bucket_8bpc($532, $538); + var $540=$stopidx; + var $541=$correlate_row_b; + var $542=(($541+$540)|0); + var $543=HEAP8[($542)]; + var $544=$6; + _update_model_8bpc($531, $539, $543, $544); + var $545=$4; + var $546=$1; + var $547=(($546+360)|0); + var $548=(($547+8)|0); + var $549=_tabrand($548); + var $550=$waitmask; + var $551=$549 & $550; + var $552=(($545+$551)|0); + $stopidx=$552; + __label__ = 19; break; + case 35: + __label__ = 36; break; + case 36: + var $555=$4; + var $556=$5; + var $557=(($555)|0) < (($556)|0); + if ($557) { __label__ = 37; break; } else { __label__ = 49; break; } + case 37: + var $559=$4; + var $560=(($559-1)|0); + var $561=$2; + var $562=(($561+($560<<2))|0); + var $563=(($562+2)|0); + var $564=HEAPU8[($563)]; + var $565=(($564)&255); + var $566=$4; + var $567=$2; + var $568=(($567+($566<<2))|0); + var $569=(($568+2)|0); + var $570=HEAPU8[($569)]; + var $571=(($570)&255); + var $572=(($565)|0)==(($571)|0); + if ($572) { __label__ = 38; break; } else { __label__ = 47; break; } + case 38: + var $574=$4; + var $575=(($574-1)|0); + var $576=$2; + var $577=(($576+($575<<2))|0); + var $578=(($577+1)|0); + var $579=HEAPU8[($578)]; + var $580=(($579)&255); + var $581=$4; + var $582=$2; + var $583=(($582+($581<<2))|0); + var $584=(($583+1)|0); + var $585=HEAPU8[($584)]; + var $586=(($585)&255); + var $587=(($580)|0)==(($586)|0); + if ($587) { __label__ = 39; break; } else { __label__ = 47; break; } + case 39: + var $589=$4; + var $590=(($589-1)|0); + var $591=$2; + var $592=(($591+($590<<2))|0); + var $593=(($592)|0); + var $594=HEAPU8[($593)]; + var $595=(($594)&255); + var $596=$4; + var $597=$2; + var $598=(($597+($596<<2))|0); + var $599=(($598)|0); + var $600=HEAPU8[($599)]; + var $601=(($600)&255); + var $602=(($595)|0)==(($601)|0); + if ($602) { __label__ = 40; break; } else { __label__ = 47; break; } + case 40: + var $604=$run_index; + var $605=$4; + var $606=(($604)|0)!=(($605)|0); + if ($606) { __label__ = 41; break; } else { __label__ = 46; break; } + case 41: + var $608=$4; + var $609=(($608)|0) > 2; + if ($609) { __label__ = 42; break; } else { __label__ = 46; break; } + case 42: + var $611=$4; + var $612=(($611-1)|0); + var $613=$3; + var $614=(($613+($612<<2))|0); + var $615=(($614+2)|0); + var $616=HEAPU8[($615)]; + var $617=(($616)&255); + var $618=$4; + var $619=(($618-2)|0); + var $620=$3; + var $621=(($620+($619<<2))|0); + var $622=(($621+2)|0); + var $623=HEAPU8[($622)]; + var $624=(($623)&255); + var $625=(($617)|0)==(($624)|0); + if ($625) { __label__ = 43; break; } else { __label__ = 46; break; } + case 43: + var $627=$4; + var $628=(($627-1)|0); + var $629=$3; + var $630=(($629+($628<<2))|0); + var $631=(($630+1)|0); + var $632=HEAPU8[($631)]; + var $633=(($632)&255); + var $634=$4; + var $635=(($634-2)|0); + var $636=$3; + var $637=(($636+($635<<2))|0); + var $638=(($637+1)|0); + var $639=HEAPU8[($638)]; + var $640=(($639)&255); + var $641=(($633)|0)==(($640)|0); + if ($641) { __label__ = 44; break; } else { __label__ = 46; break; } + case 44: + var $643=$4; + var $644=(($643-1)|0); + var $645=$3; + var $646=(($645+($644<<2))|0); + var $647=(($646)|0); + var $648=HEAPU8[($647)]; + var $649=(($648)&255); + var $650=$4; + var $651=(($650-2)|0); + var $652=$3; + var $653=(($652+($651<<2))|0); + var $654=(($653)|0); + var $655=HEAPU8[($654)]; + var $656=(($655)&255); + var $657=(($649)|0)==(($656)|0); + if ($657) { __label__ = 45; break; } else { __label__ = 46; break; } + case 45: + __label__ = 50; break; + case 46: + __label__ = 47; break; + case 47: + var $661=$4; + var $662=$3; + var $663=(($662+($661<<2))|0); + var $664=(($663+3)|0); + HEAP8[($664)]=0; + var $665=$channel_r; + var $666=$4; + var $667=(($666-1)|0); + var $668=$correlate_row_r; + var $669=(($668+$667)|0); + var $670=HEAPU8[($669)]; + var $671=(($670)&255); + var $672=_find_bucket_8bpc($665, $671); + var $673=(($672+4)|0); + var $674=HEAP32[(($673)>>2)]; + var $675=$1; + var $676=(($675+32)|0); + var $677=HEAP32[(($676)>>2)]; + var $678=_golomb_decoding_8bpc($674, $677, $codewordlen2); + var $679=(($678) & 255); + var $680=$4; + var $681=$correlate_row_r; + var $682=(($681+$680)|0); + HEAP8[($682)]=$679; + var $683=$4; + var $684=$correlate_row_r; + var $685=(($684+$683)|0); + var $686=HEAPU8[($685)]; + var $687=(($686)&255); + var $688=((((_family_8bpc+384)|0)+($687<<2))|0); + var $689=HEAP32[(($688)>>2)]; + var $690=$4; + var $691=$3; + var $692=(($691+($690<<2))|0); + var $693=(($692-4)|0); + var $694=(($693+2)|0); + var $695=HEAPU8[($694)]; + var $696=(($695)&255); + var $697=$4; + var $698=$2; + var $699=(($698+($697<<2))|0); + var $700=(($699+2)|0); + var $701=HEAPU8[($700)]; + var $702=(($701)&255); + var $703=(($696+$702)|0); + var $704=$703 >>> 1; + var $705=(($689+$704)|0); + var $706=$7; + var $707=$705 & $706; + var $708=(($707) & 255); + var $709=$4; + var $710=$3; + var $711=(($710+($709<<2))|0); + var $712=(($711+2)|0); + HEAP8[($712)]=$708; + var $713=$1; + var $714=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($713, $714); + var $715=$channel_g; + var $716=$4; + var $717=(($716-1)|0); + var $718=$correlate_row_g; + var $719=(($718+$717)|0); + var $720=HEAPU8[($719)]; + var $721=(($720)&255); + var $722=_find_bucket_8bpc($715, $721); + var $723=(($722+4)|0); + var $724=HEAP32[(($723)>>2)]; + var $725=$1; + var $726=(($725+32)|0); + var $727=HEAP32[(($726)>>2)]; + var $728=_golomb_decoding_8bpc($724, $727, $codewordlen2); + var $729=(($728) & 255); + var $730=$4; + var $731=$correlate_row_g; + var $732=(($731+$730)|0); + HEAP8[($732)]=$729; + var $733=$4; + var $734=$correlate_row_g; + var $735=(($734+$733)|0); + var $736=HEAPU8[($735)]; + var $737=(($736)&255); + var $738=((((_family_8bpc+384)|0)+($737<<2))|0); + var $739=HEAP32[(($738)>>2)]; + var $740=$4; + var $741=$3; + var $742=(($741+($740<<2))|0); + var $743=(($742-4)|0); + var $744=(($743+1)|0); + var $745=HEAPU8[($744)]; + var $746=(($745)&255); + var $747=$4; + var $748=$2; + var $749=(($748+($747<<2))|0); + var $750=(($749+1)|0); + var $751=HEAPU8[($750)]; + var $752=(($751)&255); + var $753=(($746+$752)|0); + var $754=$753 >>> 1; + var $755=(($739+$754)|0); + var $756=$7; + var $757=$755 & $756; + var $758=(($757) & 255); + var $759=$4; + var $760=$3; + var $761=(($760+($759<<2))|0); + var $762=(($761+1)|0); + HEAP8[($762)]=$758; + var $763=$1; + var $764=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($763, $764); + var $765=$channel_b; + var $766=$4; + var $767=(($766-1)|0); + var $768=$correlate_row_b; + var $769=(($768+$767)|0); + var $770=HEAPU8[($769)]; + var $771=(($770)&255); + var $772=_find_bucket_8bpc($765, $771); + var $773=(($772+4)|0); + var $774=HEAP32[(($773)>>2)]; + var $775=$1; + var $776=(($775+32)|0); + var $777=HEAP32[(($776)>>2)]; + var $778=_golomb_decoding_8bpc($774, $777, $codewordlen2); + var $779=(($778) & 255); + var $780=$4; + var $781=$correlate_row_b; + var $782=(($781+$780)|0); + HEAP8[($782)]=$779; + var $783=$4; + var $784=$correlate_row_b; + var $785=(($784+$783)|0); + var $786=HEAPU8[($785)]; + var $787=(($786)&255); + var $788=((((_family_8bpc+384)|0)+($787<<2))|0); + var $789=HEAP32[(($788)>>2)]; + var $790=$4; + var $791=$3; + var $792=(($791+($790<<2))|0); + var $793=(($792-4)|0); + var $794=(($793)|0); + var $795=HEAPU8[($794)]; + var $796=(($795)&255); + var $797=$4; + var $798=$2; + var $799=(($798+($797<<2))|0); + var $800=(($799)|0); + var $801=HEAPU8[($800)]; + var $802=(($801)&255); + var $803=(($796+$802)|0); + var $804=$803 >>> 1; + var $805=(($789+$804)|0); + var $806=$7; + var $807=$805 & $806; + var $808=(($807) & 255); + var $809=$4; + var $810=$3; + var $811=(($810+($809<<2))|0); + var $812=(($811)|0); + HEAP8[($812)]=$808; + var $813=$1; + var $814=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($813, $814); + __label__ = 48; break; + case 48: + var $816=$4; + var $817=(($816+1)|0); + $4=$817; + __label__ = 36; break; + case 49: + var $819=$stopidx; + var $820=$5; + var $821=(($819-$820)|0); + var $822=$1; + var $823=(($822+360)|0); + var $824=(($823+4)|0); + HEAP32[(($824)>>2)]=$821; + __label__ = 57; break; + case 50: + var $826=$stopidx; + var $827=$4; + var $828=(($826-$827)|0); + var $829=$1; + var $830=(($829+360)|0); + var $831=(($830+4)|0); + HEAP32[(($831)>>2)]=$828; + var $832=$4; + $run_index=$832; + var $833=$4; + var $834=$1; + var $835=_decode_run($834); + var $836=(($833+$835)|0); + $run_end=$836; + __label__ = 51; break; + case 51: + var $838=$4; + var $839=$run_end; + var $840=(($838)|0) < (($839)|0); + if ($840) { __label__ = 52; break; } else { __label__ = 54; break; } + case 52: + var $842=$4; + var $843=$3; + var $844=(($843+($842<<2))|0); + var $845=(($844+3)|0); + HEAP8[($845)]=0; + var $846=$4; + var $847=(($846-1)|0); + var $848=$3; + var $849=(($848+($847<<2))|0); + var $850=(($849+2)|0); + var $851=HEAP8[($850)]; + var $852=$4; + var $853=$3; + var $854=(($853+($852<<2))|0); + var $855=(($854+2)|0); + HEAP8[($855)]=$851; + var $856=$4; + var $857=(($856-1)|0); + var $858=$3; + var $859=(($858+($857<<2))|0); + var $860=(($859+1)|0); + var $861=HEAP8[($860)]; + var $862=$4; + var $863=$3; + var $864=(($863+($862<<2))|0); + var $865=(($864+1)|0); + HEAP8[($865)]=$861; + var $866=$4; + var $867=(($866-1)|0); + var $868=$3; + var $869=(($868+($867<<2))|0); + var $870=(($869)|0); + var $871=HEAP8[($870)]; + var $872=$4; + var $873=$3; + var $874=(($873+($872<<2))|0); + var $875=(($874)|0); + HEAP8[($875)]=$871; + __label__ = 53; break; + case 53: + var $877=$4; + var $878=(($877+1)|0); + $4=$878; + __label__ = 51; break; + case 54: + var $880=$4; + var $881=$5; + var $882=(($880)|0)==(($881)|0); + if ($882) { __label__ = 55; break; } else { __label__ = 56; break; } + case 55: + __label__ = 57; break; + case 56: + var $885=$4; + var $886=$1; + var $887=(($886+360)|0); + var $888=(($887+4)|0); + var $889=HEAP32[(($888)>>2)]; + var $890=(($885+$889)|0); + $stopidx=$890; + __label__ = 18; break; + case 57: + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb32_uncompress_row_seg["X"]=1; + +function _stabrand() { + ; + var __label__; + + ; + return 255; +} + + +function _encoder_init_rle($state) { + ; + var __label__; + + var $1; + $1=$state; + var $2=$1; + var $3=(($2+24)|0); + HEAP32[(($3)>>2)]=0; + var $4=HEAP32[((((_J)|0))>>2)]; + var $5=$1; + var $6=(($5+28)|0); + HEAP32[(($6)>>2)]=$4; + var $7=$1; + var $8=(($7+28)|0); + var $9=HEAP32[(($8)>>2)]; + var $10=1 << $9; + var $11=$1; + var $12=(($11+32)|0); + HEAP32[(($12)>>2)]=$10; + ; + return; +} + + +function _quic_rgb32_uncompress_row0_seg($encoder, $i, $cur_row, $end, $waitmask, $bpc, $bpc_mask) { + var __stackBase__ = STACKTOP; STACKTOP += 12; assert(STACKTOP % 4 == 0, "Stack is unaligned"); assert(STACKTOP < STACK_MAX, "Ran out of stack"); + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $5; + var $6; + var $7; + var $channel_r; + var $channel_g; + var $channel_b; + var $correlate_row_r; + var $correlate_row_g; + var $correlate_row_b; + var $stopidx; + var $_g_boolean_var_; + var $codewordlen=__stackBase__; + var $codewordlen1=__stackBase__+4; + var $codewordlen2=__stackBase__+8; + $1=$encoder; + $2=$i; + $3=$cur_row; + $4=$end; + $5=$waitmask; + $6=$bpc; + $7=$bpc_mask; + var $8=$1; + var $9=(($8+56)|0); + var $10=(($9)|0); + $channel_r=$10; + var $11=$channel_r; + var $12=(($11+76)|0); + $channel_g=$12; + var $13=$channel_g; + var $14=(($13+76)|0); + $channel_b=$14; + var $15=$channel_r; + var $16=(($15+8)|0); + var $17=HEAP32[(($16)>>2)]; + $correlate_row_r=$17; + var $18=$channel_g; + var $19=(($18+8)|0); + var $20=HEAP32[(($19)>>2)]; + $correlate_row_g=$20; + var $21=$channel_b; + var $22=(($21+8)|0); + var $23=HEAP32[(($22)>>2)]; + $correlate_row_b=$23; + __label__ = 2; break; + case 2: + var $25=$4; + var $26=$2; + var $27=(($25-$26)|0); + var $28=(($27)|0) > 0; + if ($28) { __label__ = 3; break; } else { __label__ = 4; break; } + case 3: + $_g_boolean_var_=1; + __label__ = 5; break; + case 4: + $_g_boolean_var_=0; + __label__ = 5; break; + case 5: + var $32=$_g_boolean_var_; + var $33=(($32)==(1)); + var $34=(($33)|0)!=0; + if ($34) { __label__ = 6; break; } else { __label__ = 7; break; } + case 6: + __label__ = 10; break; + case 7: + __label__ = 8; break; + case 8: + _spice_log(((STRING_TABLE.__str)|0), 0, ((STRING_TABLE.__str91)|0), ((STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row0_seg)|0), ((STRING_TABLE.__str6)|0), (tempInt=STACKTOP,STACKTOP += 4,assert(STACKTOP < STACK_ROOT + STACK_MAX, "Ran out of stack"),HEAP32[((tempInt)>>2)]=((STRING_TABLE.__str68)|0),tempInt)); + __label__ = 9; break; + case 9: + __label__ = 10; break; + case 10: + __label__ = 11; break; + case 11: + var $41=$2; + var $42=(($41)|0)!=0; + if ($42) { __label__ = 16; break; } else { __label__ = 12; break; } + case 12: + var $44=$2; + var $45=$3; + var $46=(($45+($44<<2))|0); + var $47=(($46+3)|0); + HEAP8[($47)]=0; + var $48=$channel_r; + var $49=$correlate_row_r; + var $50=(($49-1)|0); + var $51=HEAPU8[($50)]; + var $52=(($51)&255); + var $53=_find_bucket_8bpc($48, $52); + var $54=(($53+4)|0); + var $55=HEAP32[(($54)>>2)]; + var $56=$1; + var $57=(($56+32)|0); + var $58=HEAP32[(($57)>>2)]; + var $59=_golomb_decoding_8bpc($55, $58, $codewordlen); + var $60=(($59) & 255); + var $61=$correlate_row_r; + var $62=(($61)|0); + HEAP8[($62)]=$60; + var $63=$correlate_row_r; + var $64=(($63)|0); + var $65=HEAPU8[($64)]; + var $66=(($65)&255); + var $67=((((_family_8bpc+384)|0)+($66<<2))|0); + var $68=HEAP32[(($67)>>2)]; + var $69=(($68) & 255); + var $70=$3; + var $71=(($70)|0); + var $72=(($71+2)|0); + HEAP8[($72)]=$69; + var $73=$1; + var $74=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($73, $74); + var $75=$channel_g; + var $76=$correlate_row_g; + var $77=(($76-1)|0); + var $78=HEAPU8[($77)]; + var $79=(($78)&255); + var $80=_find_bucket_8bpc($75, $79); + var $81=(($80+4)|0); + var $82=HEAP32[(($81)>>2)]; + var $83=$1; + var $84=(($83+32)|0); + var $85=HEAP32[(($84)>>2)]; + var $86=_golomb_decoding_8bpc($82, $85, $codewordlen); + var $87=(($86) & 255); + var $88=$correlate_row_g; + var $89=(($88)|0); + HEAP8[($89)]=$87; + var $90=$correlate_row_g; + var $91=(($90)|0); + var $92=HEAPU8[($91)]; + var $93=(($92)&255); + var $94=((((_family_8bpc+384)|0)+($93<<2))|0); + var $95=HEAP32[(($94)>>2)]; + var $96=(($95) & 255); + var $97=$3; + var $98=(($97)|0); + var $99=(($98+1)|0); + HEAP8[($99)]=$96; + var $100=$1; + var $101=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($100, $101); + var $102=$channel_b; + var $103=$correlate_row_b; + var $104=(($103-1)|0); + var $105=HEAPU8[($104)]; + var $106=(($105)&255); + var $107=_find_bucket_8bpc($102, $106); + var $108=(($107+4)|0); + var $109=HEAP32[(($108)>>2)]; + var $110=$1; + var $111=(($110+32)|0); + var $112=HEAP32[(($111)>>2)]; + var $113=_golomb_decoding_8bpc($109, $112, $codewordlen); + var $114=(($113) & 255); + var $115=$correlate_row_b; + var $116=(($115)|0); + HEAP8[($116)]=$114; + var $117=$correlate_row_b; + var $118=(($117)|0); + var $119=HEAPU8[($118)]; + var $120=(($119)&255); + var $121=((((_family_8bpc+384)|0)+($120<<2))|0); + var $122=HEAP32[(($121)>>2)]; + var $123=(($122) & 255); + var $124=$3; + var $125=(($124)|0); + var $126=(($125)|0); + HEAP8[($126)]=$123; + var $127=$1; + var $128=HEAP32[(($codewordlen)>>2)]; + _decode_eatbits($127, $128); + var $129=$1; + var $130=(($129+360)|0); + var $131=(($130+4)|0); + var $132=HEAP32[(($131)>>2)]; + var $133=(($132)|0)!=0; + if ($133) { __label__ = 13; break; } else { __label__ = 14; break; } + case 13: + var $135=$1; + var $136=(($135+360)|0); + var $137=(($136+4)|0); + var $138=HEAP32[(($137)>>2)]; + var $139=(($138-1)|0); + HEAP32[(($137)>>2)]=$139; + __label__ = 15; break; + case 14: + var $141=$1; + var $142=(($141+360)|0); + var $143=(($142+8)|0); + var $144=_tabrand($143); + var $145=$5; + var $146=$144 & $145; + var $147=$1; + var $148=(($147+360)|0); + var $149=(($148+4)|0); + HEAP32[(($149)>>2)]=$146; + var $150=$1; + var $151=(($150+360)|0); + var $152=$channel_r; + var $153=$correlate_row_r; + var $154=(($153-1)|0); + var $155=HEAPU8[($154)]; + var $156=(($155)&255); + var $157=_find_bucket_8bpc($152, $156); + var $158=$correlate_row_r; + var $159=(($158)|0); + var $160=HEAP8[($159)]; + var $161=$6; + _update_model_8bpc($151, $157, $160, $161); + var $162=$1; + var $163=(($162+360)|0); + var $164=$channel_g; + var $165=$correlate_row_g; + var $166=(($165-1)|0); + var $167=HEAPU8[($166)]; + var $168=(($167)&255); + var $169=_find_bucket_8bpc($164, $168); + var $170=$correlate_row_g; + var $171=(($170)|0); + var $172=HEAP8[($171)]; + var $173=$6; + _update_model_8bpc($163, $169, $172, $173); + var $174=$1; + var $175=(($174+360)|0); + var $176=$channel_b; + var $177=$correlate_row_b; + var $178=(($177-1)|0); + var $179=HEAPU8[($178)]; + var $180=(($179)&255); + var $181=_find_bucket_8bpc($176, $180); + var $182=$correlate_row_b; + var $183=(($182)|0); + var $184=HEAP8[($183)]; + var $185=$6; + _update_model_8bpc($175, $181, $184, $185); + __label__ = 15; break; + case 15: + var $187=$2; + var $188=(($187+1)|0); + $2=$188; + var $189=$1; + var $190=(($189+360)|0); + var $191=(($190+4)|0); + var $192=HEAP32[(($191)>>2)]; + var $193=(($188+$192)|0); + $stopidx=$193; + __label__ = 17; break; + case 16: + var $195=$2; + var $196=$1; + var $197=(($196+360)|0); + var $198=(($197+4)|0); + var $199=HEAP32[(($198)>>2)]; + var $200=(($195+$199)|0); + $stopidx=$200; + __label__ = 17; break; + case 17: + __label__ = 18; break; + case 18: + var $203=$stopidx; + var $204=$4; + var $205=(($203)|0) < (($204)|0); + if ($205) { __label__ = 19; break; } else { __label__ = 24; break; } + case 19: + __label__ = 20; break; + case 20: + var $208=$2; + var $209=$stopidx; + var $210=(($208)|0) <= (($209)|0); + if ($210) { __label__ = 21; break; } else { __label__ = 23; break; } + case 21: + var $212=$2; + var $213=$3; + var $214=(($213+($212<<2))|0); + var $215=(($214+3)|0); + HEAP8[($215)]=0; + var $216=$channel_r; + var $217=$2; + var $218=(($217-1)|0); + var $219=$correlate_row_r; + var $220=(($219+$218)|0); + var $221=HEAPU8[($220)]; + var $222=(($221)&255); + var $223=_find_bucket_8bpc($216, $222); + var $224=(($223+4)|0); + var $225=HEAP32[(($224)>>2)]; + var $226=$1; + var $227=(($226+32)|0); + var $228=HEAP32[(($227)>>2)]; + var $229=_golomb_decoding_8bpc($225, $228, $codewordlen1); + var $230=(($229) & 255); + var $231=$2; + var $232=$correlate_row_r; + var $233=(($232+$231)|0); + HEAP8[($233)]=$230; + var $234=$2; + var $235=$correlate_row_r; + var $236=(($235+$234)|0); + var $237=HEAPU8[($236)]; + var $238=(($237)&255); + var $239=((((_family_8bpc+384)|0)+($238<<2))|0); + var $240=HEAP32[(($239)>>2)]; + var $241=$2; + var $242=$3; + var $243=(($242+($241<<2))|0); + var $244=(($243-4)|0); + var $245=(($244+2)|0); + var $246=HEAPU8[($245)]; + var $247=(($246)&255); + var $248=(($240+$247)|0); + var $249=$7; + var $250=$248 & $249; + var $251=(($250) & 255); + var $252=$2; + var $253=$3; + var $254=(($253+($252<<2))|0); + var $255=(($254+2)|0); + HEAP8[($255)]=$251; + var $256=$1; + var $257=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($256, $257); + var $258=$channel_g; + var $259=$2; + var $260=(($259-1)|0); + var $261=$correlate_row_g; + var $262=(($261+$260)|0); + var $263=HEAPU8[($262)]; + var $264=(($263)&255); + var $265=_find_bucket_8bpc($258, $264); + var $266=(($265+4)|0); + var $267=HEAP32[(($266)>>2)]; + var $268=$1; + var $269=(($268+32)|0); + var $270=HEAP32[(($269)>>2)]; + var $271=_golomb_decoding_8bpc($267, $270, $codewordlen1); + var $272=(($271) & 255); + var $273=$2; + var $274=$correlate_row_g; + var $275=(($274+$273)|0); + HEAP8[($275)]=$272; + var $276=$2; + var $277=$correlate_row_g; + var $278=(($277+$276)|0); + var $279=HEAPU8[($278)]; + var $280=(($279)&255); + var $281=((((_family_8bpc+384)|0)+($280<<2))|0); + var $282=HEAP32[(($281)>>2)]; + var $283=$2; + var $284=$3; + var $285=(($284+($283<<2))|0); + var $286=(($285-4)|0); + var $287=(($286+1)|0); + var $288=HEAPU8[($287)]; + var $289=(($288)&255); + var $290=(($282+$289)|0); + var $291=$7; + var $292=$290 & $291; + var $293=(($292) & 255); + var $294=$2; + var $295=$3; + var $296=(($295+($294<<2))|0); + var $297=(($296+1)|0); + HEAP8[($297)]=$293; + var $298=$1; + var $299=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($298, $299); + var $300=$channel_b; + var $301=$2; + var $302=(($301-1)|0); + var $303=$correlate_row_b; + var $304=(($303+$302)|0); + var $305=HEAPU8[($304)]; + var $306=(($305)&255); + var $307=_find_bucket_8bpc($300, $306); + var $308=(($307+4)|0); + var $309=HEAP32[(($308)>>2)]; + var $310=$1; + var $311=(($310+32)|0); + var $312=HEAP32[(($311)>>2)]; + var $313=_golomb_decoding_8bpc($309, $312, $codewordlen1); + var $314=(($313) & 255); + var $315=$2; + var $316=$correlate_row_b; + var $317=(($316+$315)|0); + HEAP8[($317)]=$314; + var $318=$2; + var $319=$correlate_row_b; + var $320=(($319+$318)|0); + var $321=HEAPU8[($320)]; + var $322=(($321)&255); + var $323=((((_family_8bpc+384)|0)+($322<<2))|0); + var $324=HEAP32[(($323)>>2)]; + var $325=$2; + var $326=$3; + var $327=(($326+($325<<2))|0); + var $328=(($327-4)|0); + var $329=(($328)|0); + var $330=HEAPU8[($329)]; + var $331=(($330)&255); + var $332=(($324+$331)|0); + var $333=$7; + var $334=$332 & $333; + var $335=(($334) & 255); + var $336=$2; + var $337=$3; + var $338=(($337+($336<<2))|0); + var $339=(($338)|0); + HEAP8[($339)]=$335; + var $340=$1; + var $341=HEAP32[(($codewordlen1)>>2)]; + _decode_eatbits($340, $341); + __label__ = 22; break; + case 22: + var $343=$2; + var $344=(($343+1)|0); + $2=$344; + __label__ = 20; break; + case 23: + var $346=$1; + var $347=(($346+360)|0); + var $348=$channel_r; + var $349=$stopidx; + var $350=(($349-1)|0); + var $351=$correlate_row_r; + var $352=(($351+$350)|0); + var $353=HEAPU8[($352)]; + var $354=(($353)&255); + var $355=_find_bucket_8bpc($348, $354); + var $356=$stopidx; + var $357=$correlate_row_r; + var $358=(($357+$356)|0); + var $359=HEAP8[($358)]; + var $360=$6; + _update_model_8bpc($347, $355, $359, $360); + var $361=$1; + var $362=(($361+360)|0); + var $363=$channel_g; + var $364=$stopidx; + var $365=(($364-1)|0); + var $366=$correlate_row_g; + var $367=(($366+$365)|0); + var $368=HEAPU8[($367)]; + var $369=(($368)&255); + var $370=_find_bucket_8bpc($363, $369); + var $371=$stopidx; + var $372=$correlate_row_g; + var $373=(($372+$371)|0); + var $374=HEAP8[($373)]; + var $375=$6; + _update_model_8bpc($362, $370, $374, $375); + var $376=$1; + var $377=(($376+360)|0); + var $378=$channel_b; + var $379=$stopidx; + var $380=(($379-1)|0); + var $381=$correlate_row_b; + var $382=(($381+$380)|0); + var $383=HEAPU8[($382)]; + var $384=(($383)&255); + var $385=_find_bucket_8bpc($378, $384); + var $386=$stopidx; + var $387=$correlate_row_b; + var $388=(($387+$386)|0); + var $389=HEAP8[($388)]; + var $390=$6; + _update_model_8bpc($377, $385, $389, $390); + var $391=$2; + var $392=$1; + var $393=(($392+360)|0); + var $394=(($393+8)|0); + var $395=_tabrand($394); + var $396=$5; + var $397=$395 & $396; + var $398=(($391+$397)|0); + $stopidx=$398; + __label__ = 18; break; + case 24: + __label__ = 25; break; + case 25: + var $401=$2; + var $402=$4; + var $403=(($401)|0) < (($402)|0); + if ($403) { __label__ = 26; break; } else { __label__ = 28; break; } + case 26: + var $405=$2; + var $406=$3; + var $407=(($406+($405<<2))|0); + var $408=(($407+3)|0); + HEAP8[($408)]=0; + var $409=$channel_r; + var $410=$2; + var $411=(($410-1)|0); + var $412=$correlate_row_r; + var $413=(($412+$411)|0); + var $414=HEAPU8[($413)]; + var $415=(($414)&255); + var $416=_find_bucket_8bpc($409, $415); + var $417=(($416+4)|0); + var $418=HEAP32[(($417)>>2)]; + var $419=$1; + var $420=(($419+32)|0); + var $421=HEAP32[(($420)>>2)]; + var $422=_golomb_decoding_8bpc($418, $421, $codewordlen2); + var $423=(($422) & 255); + var $424=$2; + var $425=$correlate_row_r; + var $426=(($425+$424)|0); + HEAP8[($426)]=$423; + var $427=$2; + var $428=$correlate_row_r; + var $429=(($428+$427)|0); + var $430=HEAPU8[($429)]; + var $431=(($430)&255); + var $432=((((_family_8bpc+384)|0)+($431<<2))|0); + var $433=HEAP32[(($432)>>2)]; + var $434=$2; + var $435=$3; + var $436=(($435+($434<<2))|0); + var $437=(($436-4)|0); + var $438=(($437+2)|0); + var $439=HEAPU8[($438)]; + var $440=(($439)&255); + var $441=(($433+$440)|0); + var $442=$7; + var $443=$441 & $442; + var $444=(($443) & 255); + var $445=$2; + var $446=$3; + var $447=(($446+($445<<2))|0); + var $448=(($447+2)|0); + HEAP8[($448)]=$444; + var $449=$1; + var $450=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($449, $450); + var $451=$channel_g; + var $452=$2; + var $453=(($452-1)|0); + var $454=$correlate_row_g; + var $455=(($454+$453)|0); + var $456=HEAPU8[($455)]; + var $457=(($456)&255); + var $458=_find_bucket_8bpc($451, $457); + var $459=(($458+4)|0); + var $460=HEAP32[(($459)>>2)]; + var $461=$1; + var $462=(($461+32)|0); + var $463=HEAP32[(($462)>>2)]; + var $464=_golomb_decoding_8bpc($460, $463, $codewordlen2); + var $465=(($464) & 255); + var $466=$2; + var $467=$correlate_row_g; + var $468=(($467+$466)|0); + HEAP8[($468)]=$465; + var $469=$2; + var $470=$correlate_row_g; + var $471=(($470+$469)|0); + var $472=HEAPU8[($471)]; + var $473=(($472)&255); + var $474=((((_family_8bpc+384)|0)+($473<<2))|0); + var $475=HEAP32[(($474)>>2)]; + var $476=$2; + var $477=$3; + var $478=(($477+($476<<2))|0); + var $479=(($478-4)|0); + var $480=(($479+1)|0); + var $481=HEAPU8[($480)]; + var $482=(($481)&255); + var $483=(($475+$482)|0); + var $484=$7; + var $485=$483 & $484; + var $486=(($485) & 255); + var $487=$2; + var $488=$3; + var $489=(($488+($487<<2))|0); + var $490=(($489+1)|0); + HEAP8[($490)]=$486; + var $491=$1; + var $492=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($491, $492); + var $493=$channel_b; + var $494=$2; + var $495=(($494-1)|0); + var $496=$correlate_row_b; + var $497=(($496+$495)|0); + var $498=HEAPU8[($497)]; + var $499=(($498)&255); + var $500=_find_bucket_8bpc($493, $499); + var $501=(($500+4)|0); + var $502=HEAP32[(($501)>>2)]; + var $503=$1; + var $504=(($503+32)|0); + var $505=HEAP32[(($504)>>2)]; + var $506=_golomb_decoding_8bpc($502, $505, $codewordlen2); + var $507=(($506) & 255); + var $508=$2; + var $509=$correlate_row_b; + var $510=(($509+$508)|0); + HEAP8[($510)]=$507; + var $511=$2; + var $512=$correlate_row_b; + var $513=(($512+$511)|0); + var $514=HEAPU8[($513)]; + var $515=(($514)&255); + var $516=((((_family_8bpc+384)|0)+($515<<2))|0); + var $517=HEAP32[(($516)>>2)]; + var $518=$2; + var $519=$3; + var $520=(($519+($518<<2))|0); + var $521=(($520-4)|0); + var $522=(($521)|0); + var $523=HEAPU8[($522)]; + var $524=(($523)&255); + var $525=(($517+$524)|0); + var $526=$7; + var $527=$525 & $526; + var $528=(($527) & 255); + var $529=$2; + var $530=$3; + var $531=(($530+($529<<2))|0); + var $532=(($531)|0); + HEAP8[($532)]=$528; + var $533=$1; + var $534=HEAP32[(($codewordlen2)>>2)]; + _decode_eatbits($533, $534); + __label__ = 27; break; + case 27: + var $536=$2; + var $537=(($536+1)|0); + $2=$537; + __label__ = 25; break; + case 28: + var $539=$stopidx; + var $540=$4; + var $541=(($539-$540)|0); + var $542=$1; + var $543=(($542+360)|0); + var $544=(($543+4)|0); + HEAP32[(($544)>>2)]=$541; + STACKTOP = __stackBase__; + return; + default: assert(0, "bad label: " + __label__); + } +} +_quic_rgb32_uncompress_row0_seg["X"]=1; + +function _malloc($bytes) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $mem; + var $nb; + var $idx; + var $smallbits; + var $b; + var $p; + var $F; + var $b1; + var $p2; + var $r; + var $rsize; + var $i; + var $leftbits; + var $leastbit; + var $Y; + var $K; + var $N; + var $F3; + var $DVS; + var $DV; + var $I; + var $B; + var $F4; + var $rsize5; + var $p6; + var $r7; + var $dvs; + var $rsize8; + var $p9; + var $r10; + $1=$bytes; + var $2=$1; //@line 4628 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $3=(($2)>>>0) <= 244; //@line 4628 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($3) { __label__ = 2; break; } else { __label__ = 37; break; } //@line 4628 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $5=$1; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=(($5)>>>0) < 11; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($6) { __label__ = 3; break; } else { __label__ = 4; break; } //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $14 = 16;__label__ = 5; break; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $9=$1; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=(($9+4)|0); //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=(($10+7)|0); //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=$11 & -8; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14 = $12;__label__ = 5; break; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $14; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nb=$14; //@line 4631 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$nb; //@line 4632 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=$15 >>> 3; //@line 4632 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $idx=$16; //@line 4632 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=HEAPU32[((((__gm_)|0))>>2)]; //@line 4633 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=$idx; //@line 4633 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=$17 >>> (($18)>>>0); //@line 4633 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $smallbits=$19; //@line 4633 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=$smallbits; //@line 4635 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=$20 & 3; //@line 4635 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=(($21)|0)!=0; //@line 4635 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($22) { __label__ = 6; break; } else { __label__ = 13; break; } //@line 4635 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $24=$smallbits; //@line 4637 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$24 ^ -1; //@line 4637 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=$25 & 1; //@line 4637 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$idx; //@line 4637 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=(($27+$26)|0); //@line 4637 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $idx=$28; //@line 4637 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=$idx; //@line 4638 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$29 << 1; //@line 4638 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=((((__gm_+40)|0)+($30<<2))|0); //@line 4638 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=$31; //@line 4638 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$32; //@line 4638 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $b=$33; //@line 4638 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=$b; //@line 4639 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=(($34+8)|0); //@line 4639 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=HEAP32[(($35)>>2)]; //@line 4639 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$36; //@line 4639 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=$p; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=(($37+8)|0); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=HEAP32[(($38)>>2)]; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$39; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=$b; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$F; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=(($40)|0)==(($41)|0); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($42) { __label__ = 7; break; } else { __label__ = 8; break; } //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $44=$idx; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=1 << $44; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=$45 ^ -1; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=HEAP32[((((__gm_)|0))>>2)]; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $48=$47 & $46; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_)|0))>>2)]=$48; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 12; break; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $50=$F; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=$50; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=(($51)>>>0) >= (($52)>>>0); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=(($53)&1); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=(($54)==(1)); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=(($55)|0)!=0; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($56) { __label__ = 9; break; } else { __label__ = 10; break; } //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $58=$F; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=$b; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=(($59+8)|0); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($60)>>2)]=$58; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=$b; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $62=$F; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=(($62+12)|0); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($63)>>2)]=$61; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 11; break; //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + _abort(); //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4641 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + __label__ = 12; break; + case 12: + var $67=$idx; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=$67 << 3; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=$68 | 1; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=$69 | 2; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=$p; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=(($71+4)|0); //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($72)>>2)]=$70; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=$p; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=$73; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=$idx; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=$75 << 3; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=(($74+$76)|0); //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $78=$77; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $79=(($78+4)|0); //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=HEAP32[(($79)>>2)]; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=$80 | 1; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($79)>>2)]=$81; //@line 4642 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=$p; //@line 4643 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=$82; //@line 4643 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=(($83+8)|0); //@line 4643 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$84; //@line 4643 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 53; break; //@line 4645 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $86=$nb; //@line 4648 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=HEAPU32[((((__gm_+8)|0))>>2)]; //@line 4648 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=(($86)>>>0) > (($87)>>>0); //@line 4648 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($88) { __label__ = 14; break; } else { __label__ = 35; break; } //@line 4648 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $90=$smallbits; //@line 4649 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=(($90)|0)!=0; //@line 4649 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($91) { __label__ = 15; break; } else { __label__ = 30; break; } //@line 4649 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + var $93=$smallbits; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $94=$idx; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=$93 << $94; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $96=$idx; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $97=1 << $96; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=$97 << 1; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=$idx; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=1 << $99; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$100 << 1; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=(((-$101))|0); //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=$98 | $102; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=$95 & $103; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $leftbits=$104; //@line 4653 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $105=$leftbits; //@line 4654 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $106=$leftbits; //@line 4654 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=(((-$106))|0); //@line 4654 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=$105 & $107; //@line 4654 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $leastbit=$108; //@line 4654 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $109=$leastbit; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $110=(($109-1)|0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$110; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $111=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $112=$111 >>> 12; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=$112 & 16; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$113; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=$K; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$114; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=$K; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $117=$116 >>> (($115)>>>0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$117; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $118=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $119=$118 >>> 5; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $120=$119 & 8; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$120; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=$N; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=(($121+$120)|0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$122; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $123=$K; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $124=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=$124 >>> (($123)>>>0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$125; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=$126 >>> 2; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=$127 & 4; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$128; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=$N; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=(($129+$128)|0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$130; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $131=$K; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $132=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=$132 >>> (($131)>>>0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$133; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=$134 >>> 1; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $136=$135 & 2; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$136; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $137=$N; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $138=(($137+$136)|0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$138; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $139=$K; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $140=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $141=$140 >>> (($139)>>>0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$141; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $143=$142 >>> 1; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144=$143 & 1; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$144; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=$N; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $146=(($145+$144)|0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$146; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=$K; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $148=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $149=$148 >>> (($147)>>>0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$149; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $150=$N; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $151=$Y; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=(($150+$151)|0); //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $i=$152; //@line 4655 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=$i; //@line 4656 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=$153 << 1; //@line 4656 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=((((__gm_+40)|0)+($154<<2))|0); //@line 4656 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $156=$155; //@line 4656 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $157=$156; //@line 4656 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $b1=$157; //@line 4656 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $158=$b1; //@line 4657 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=(($158+8)|0); //@line 4657 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=HEAP32[(($159)>>2)]; //@line 4657 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p2=$160; //@line 4657 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=$p2; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=(($161+8)|0); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $163=HEAP32[(($162)>>2)]; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F3=$163; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $164=$b1; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $165=$F3; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $166=(($164)|0)==(($165)|0); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($166) { __label__ = 16; break; } else { __label__ = 17; break; } //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $168=$i; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=1 << $168; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $170=$169 ^ -1; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $171=HEAP32[((((__gm_)|0))>>2)]; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=$171 & $170; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_)|0))>>2)]=$172; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 21; break; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $174=$F3; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $175=$174; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $176=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $177=(($175)>>>0) >= (($176)>>>0); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $178=(($177)&1); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $179=(($178)==(1)); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $180=(($179)|0)!=0; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($180) { __label__ = 18; break; } else { __label__ = 19; break; } //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + var $182=$F3; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=$b1; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $184=(($183+8)|0); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($184)>>2)]=$182; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $185=$b1; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $186=$F3; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $187=(($186+12)|0); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($187)>>2)]=$185; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 20; break; //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + _abort(); //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4659 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + __label__ = 21; break; + case 21: + var $191=$i; //@line 4660 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $192=$191 << 3; //@line 4660 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $193=$nb; //@line 4660 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=(($192-$193)|0); //@line 4660 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$194; //@line 4660 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $195=$nb; //@line 4665 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=$195 | 1; //@line 4665 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $197=$196 | 2; //@line 4665 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $198=$p2; //@line 4665 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199=(($198+4)|0); //@line 4665 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($199)>>2)]=$197; //@line 4665 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $200=$p2; //@line 4666 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $201=$200; //@line 4666 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $202=$nb; //@line 4666 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $203=(($201+$202)|0); //@line 4666 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=$203; //@line 4666 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $r=$204; //@line 4666 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $205=$rsize; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $206=$205 | 1; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=$r; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=(($207+4)|0); //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($208)>>2)]=$206; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $209=$rsize; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $210=$r; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $211=$210; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $212=$rsize; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $213=(($211+$212)|0); //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $214=$213; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $215=(($214)|0); //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($215)>>2)]=$209; //@line 4667 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $216=HEAP32[((((__gm_+8)|0))>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $DVS=$216; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $217=$DVS; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $218=(($217)|0)!=0; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($218) { __label__ = 22; break; } else { __label__ = 29; break; } //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + var $220=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $DV=$220; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $221=$DVS; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $222=$221 >>> 3; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$222; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $223=$I; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $224=$223 << 1; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $225=((((__gm_+40)|0)+($224<<2))|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $226=$225; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=$226; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B=$227; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=$B; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F4=$228; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $229=HEAP32[((((__gm_)|0))>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230=$I; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $231=1 << $230; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $232=$229 & $231; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $233=(($232)|0)!=0; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($233) { __label__ = 24; break; } else { __label__ = 23; break; } //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $235=$I; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $236=1 << $235; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=HEAP32[((((__gm_)|0))>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $238=$237 | $236; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_)|0))>>2)]=$238; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 28; break; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + var $240=$B; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $241=(($240+8)|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $242=HEAP32[(($241)>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=$242; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $245=(($243)>>>0) >= (($244)>>>0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=(($245)&1); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=(($246)==(1)); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=(($247)|0)!=0; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($248) { __label__ = 25; break; } else { __label__ = 26; break; } //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $250=$B; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $251=(($250+8)|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $252=HEAP32[(($251)>>2)]; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F4=$252; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 27; break; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 26: + _abort(); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + __label__ = 28; break; + case 28: + var $256=$DV; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $257=$B; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $258=(($257+8)|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($258)>>2)]=$256; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=$DV; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=$F4; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $261=(($260+12)|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($261)>>2)]=$259; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $262=$F4; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $263=$DV; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $264=(($263+8)|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($264)>>2)]=$262; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $265=$B; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $266=$DV; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $267=(($266+12)|0); //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($267)>>2)]=$265; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 29; break; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + var $269=$rsize; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=$269; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $270=$r; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+20)|0))>>2)]=$270; //@line 4668 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $271=$p2; //@line 4670 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $272=$271; //@line 4670 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $273=(($272+8)|0); //@line 4670 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$273; //@line 4670 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 53; break; //@line 4672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $275=HEAP32[((((__gm_+4)|0))>>2)]; //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=(($275)|0)!=0; //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($276) { __label__ = 31; break; } else { __label__ = 33; break; } //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $278=$nb; //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=_tmalloc_small(__gm_, $278); //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$279; //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $280=(($279)|0)!=0; //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($280) { __label__ = 32; break; } else { __label__ = 33; break; } //@line 4675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + __label__ = 53; break; //@line 4677 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + __label__ = 34; break; + case 34: + __label__ = 35; break; //@line 4679 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + __label__ = 36; break; + case 36: + __label__ = 44; break; //@line 4680 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + var $287=$1; //@line 4681 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=(($287)>>>0) >= 4294967232; //@line 4681 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($288) { __label__ = 38; break; } else { __label__ = 39; break; } //@line 4681 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + $nb=-1; //@line 4682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 43; break; //@line 4682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + var $291=$1; //@line 4684 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $292=(($291+4)|0); //@line 4684 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $293=(($292+7)|0); //@line 4684 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $294=$293 & -8; //@line 4684 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nb=$294; //@line 4684 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $295=HEAP32[((((__gm_+4)|0))>>2)]; //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $296=(($295)|0)!=0; //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($296) { __label__ = 40; break; } else { __label__ = 42; break; } //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 40: + var $298=$nb; //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $299=_tmalloc_large(__gm_, $298); //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$299; //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $300=(($299)|0)!=0; //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($300) { __label__ = 41; break; } else { __label__ = 42; break; } //@line 4685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + __label__ = 53; break; //@line 4687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 42: + __label__ = 43; break; + case 43: + __label__ = 44; break; + case 44: + var $305=$nb; //@line 4691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $306=HEAPU32[((((__gm_+8)|0))>>2)]; //@line 4691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $307=(($305)>>>0) <= (($306)>>>0); //@line 4691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($307) { __label__ = 45; break; } else { __label__ = 49; break; } //@line 4691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + var $309=HEAP32[((((__gm_+8)|0))>>2)]; //@line 4692 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $310=$nb; //@line 4692 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $311=(($309-$310)|0); //@line 4692 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize5=$311; //@line 4692 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $312=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4693 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p6=$312; //@line 4693 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $313=$rsize5; //@line 4694 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $314=(($313)>>>0) >= 16; //@line 4694 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($314) { __label__ = 46; break; } else { __label__ = 47; break; } //@line 4694 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + var $316=$p6; //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=$316; //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $318=$nb; //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $319=(($317+$318)|0); //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $320=$319; //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+20)|0))>>2)]=$320; //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $r7=$320; //@line 4695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=$rsize5; //@line 4696 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=$321; //@line 4696 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $322=$rsize5; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=$322 | 1; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=$r7; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=(($324+4)|0); //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($325)>>2)]=$323; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=$rsize5; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $327=$r7; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $328=$327; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $329=$rsize5; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $330=(($328+$329)|0); //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $331=$330; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $332=(($331)|0); //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($332)>>2)]=$326; //@line 4697 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $333=$nb; //@line 4698 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $334=$333 | 1; //@line 4698 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $335=$334 | 2; //@line 4698 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $336=$p6; //@line 4698 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $337=(($336+4)|0); //@line 4698 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($337)>>2)]=$335; //@line 4698 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 48; break; //@line 4699 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + var $339=HEAP32[((((__gm_+8)|0))>>2)]; //@line 4701 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $dvs=$339; //@line 4701 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=0; //@line 4702 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+20)|0))>>2)]=0; //@line 4703 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=$dvs; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=$340 | 1; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=$341 | 2; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $343=$p6; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $344=(($343+4)|0); //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($344)>>2)]=$342; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $345=$p6; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=$345; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=$dvs; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348=(($346+$347)|0); //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $349=$348; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=(($349+4)|0); //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=HEAP32[(($350)>>2)]; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=$351 | 1; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($350)>>2)]=$352; //@line 4704 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 48; break; + case 48: + var $354=$p6; //@line 4706 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $355=$354; //@line 4706 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $356=(($355+8)|0); //@line 4706 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$356; //@line 4706 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 53; break; //@line 4708 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + var $358=$nb; //@line 4711 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=HEAPU32[((((__gm_+12)|0))>>2)]; //@line 4711 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $360=(($358)>>>0) < (($359)>>>0); //@line 4711 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($360) { __label__ = 50; break; } else { __label__ = 51; break; } //@line 4711 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + var $362=$nb; //@line 4712 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $363=HEAP32[((((__gm_+12)|0))>>2)]; //@line 4712 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $364=(($363-$362)|0); //@line 4712 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+12)|0))>>2)]=$364; //@line 4712 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize8=$364; //@line 4712 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $365=HEAP32[((((__gm_+24)|0))>>2)]; //@line 4713 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p9=$365; //@line 4713 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $366=$p9; //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=$366; //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=$nb; //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=(($367+$368)|0); //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $370=$369; //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+24)|0))>>2)]=$370; //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $r10=$370; //@line 4714 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $371=$rsize8; //@line 4715 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $372=$371 | 1; //@line 4715 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $373=$r10; //@line 4715 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374=(($373+4)|0); //@line 4715 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($374)>>2)]=$372; //@line 4715 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $375=$nb; //@line 4716 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $376=$375 | 1; //@line 4716 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $377=$376 | 2; //@line 4716 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $378=$p9; //@line 4716 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $379=(($378+4)|0); //@line 4716 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($379)>>2)]=$377; //@line 4716 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=$p9; //@line 4717 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=$380; //@line 4717 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=(($381+8)|0); //@line 4717 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$382; //@line 4717 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 53; break; //@line 4720 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 51: + __label__ = 52; break; + case 52: + var $385=$nb; //@line 4723 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=_sys_alloc(__gm_, $385); //@line 4723 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$386; //@line 4723 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 53; break; //@line 4723 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + var $388=$mem; //@line 4727 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $388; //@line 4727 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +Module["_malloc"] = _malloc;_malloc["X"]=1; + +function _tmalloc_small($m, $nb) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $t; + var $v; + var $rsize; + var $i; + var $leastbit; + var $Y; + var $K; + var $N; + var $trem; + var $r; + var $XP; + var $R; + var $F; + var $RP; + var $CP; + var $H; + var $C0; + var $C1; + var $DVS; + var $DV; + var $I; + var $B; + var $F1; + $1=$m; + $2=$nb; + var $3=$1; //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $4=(($3+4)|0); //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=HEAP32[(($4)>>2)]; //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=$1; //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=(($6+4)|0); //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=HEAP32[(($7)>>2)]; //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(((-$8))|0); //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=$5 & $9; //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $leastbit=$10; //@line 4268 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=$leastbit; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=(($11-1)|0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$12; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=$13 >>> 12; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$14 & 16; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$15; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=$K; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$16; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=$K; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=$18 >>> (($17)>>>0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$19; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=$20 >>> 5; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=$21 & 8; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$22; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=$N; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=(($23+$22)|0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$24; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$K; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$26 >>> (($25)>>>0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$27; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=$28 >>> 2; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$29 & 4; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$30; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=$N; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=(($31+$30)|0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$32; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$K; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=$34 >>> (($33)>>>0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$35; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=$36 >>> 1; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=$37 & 2; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$38; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=$N; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=(($39+$38)|0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$40; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$K; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=$42 >>> (($41)>>>0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$43; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$44 >>> 1; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=$45 & 1; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$46; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=$N; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $48=(($47+$46)|0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$48; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=$K; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=$50 >>> (($49)>>>0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$51; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=$N; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=$Y; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=(($52+$53)|0); //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $i=$54; //@line 4269 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=$i; //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$1; //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($56+304)|0); //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=(($57+($55<<2))|0); //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=HEAP32[(($58)>>2)]; //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$59; //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $v=$59; //@line 4270 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=$t; //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=(($60+4)|0); //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $62=HEAP32[(($61)>>2)]; //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=$62 & -8; //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=$2; //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=(($63-$64)|0); //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$65; //@line 4271 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 2; break; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $67=$t; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=(($67+16)|0); //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68)|0); //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=HEAP32[(($69)>>2)]; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=(($70)|0)!=0; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($71) { __label__ = 3; break; } else { __label__ = 4; break; } //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $73=$t; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=(($73+16)|0); //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=(($74)|0); //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=HEAP32[(($75)>>2)]; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83 = $76;__label__ = 5; break; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $78=$t; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $79=(($78+16)|0); //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=(($79+4)|0); //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=HEAP32[(($80)>>2)]; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83 = $81;__label__ = 5; break; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $83; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$83; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=(($83)|0)!=0; //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($84) { __label__ = 6; break; } else { __label__ = 9; break; } //@line 4273 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $86=$t; //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=(($86+4)|0); //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=HEAP32[(($87)>>2)]; //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=$88 & -8; //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=$2; //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=(($89-$90)|0); //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $trem=$91; //@line 4274 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=$trem; //@line 4275 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $93=$rsize; //@line 4275 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $94=(($92)>>>0) < (($93)>>>0); //@line 4275 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($94) { __label__ = 7; break; } else { __label__ = 8; break; } //@line 4275 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $96=$trem; //@line 4276 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$96; //@line 4276 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $97=$t; //@line 4277 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $v=$97; //@line 4277 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 8; break; //@line 4278 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + __label__ = 2; break; //@line 4279 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $100=$v; //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$100; //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=$1; //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=(($102+16)|0); //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=HEAPU32[(($103)>>2)]; //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $105=(($101)>>>0) >= (($104)>>>0); //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $106=(($105)&1); //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=(($106)==(1)); //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=(($107)|0)!=0; //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($108) { __label__ = 10; break; } else { __label__ = 69; break; } //@line 4281 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $110=$v; //@line 4282 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $111=$110; //@line 4282 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $112=$2; //@line 4282 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=(($111+$112)|0); //@line 4282 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=$113; //@line 4282 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $r=$114; //@line 4282 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=$v; //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=$115; //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $117=$r; //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $118=$117; //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $119=(($116)>>>0) < (($118)>>>0); //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $120=(($119)&1); //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=(($120)==(1)); //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=(($121)|0)!=0; //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($122) { __label__ = 11; break; } else { __label__ = 68; break; } //@line 4284 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $124=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=(($124+24)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=HEAP32[(($125)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $XP=$126; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=(($127+12)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=HEAP32[(($128)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $131=(($129)|0)!=(($130)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($131) { __label__ = 12; break; } else { __label__ = 16; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $133=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=(($133+8)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=HEAP32[(($134)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$135; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $136=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $137=(($136+12)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $138=HEAP32[(($137)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$138; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $139=$F; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $140=$139; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $141=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=(($141+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $143=HEAPU32[(($142)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144=(($140)>>>0) >= (($143)>>>0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=(($144)&1); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $146=(($145)==(1)); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=(($146)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($147) { __label__ = 13; break; } else { __label__ = 14; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $149=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $150=$F; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $151=(($150+12)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($151)>>2)]=$149; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=$F; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=(($153+8)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($154)>>2)]=$152; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 15; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + _abort(); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + __label__ = 28; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $158=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=(($158+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=(($159+4)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$160; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=HEAP32[(($160)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$161; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=(($161)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($162) { __label__ = 18; break; } else { __label__ = 17; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $164=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $165=(($164+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $166=(($165)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$166; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $167=HEAP32[(($166)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$167; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $168=(($167)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($168) { __label__ = 18; break; } else { __label__ = 27; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + __label__ = 19; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + var $171=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=(($171+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $173=(($172+4)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$173; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $174=HEAP32[(($173)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $175=(($174)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($175) { var $183 = 1;__label__ = 21; break; } else { __label__ = 20; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + var $177=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $178=(($177+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $179=(($178)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$179; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $180=HEAP32[(($179)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $181=(($180)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183 = $181;__label__ = 21; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + var $183; + if ($183) { __label__ = 22; break; } else { __label__ = 23; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + var $185=$CP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$185; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $186=HEAP32[(($185)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$186; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 19; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $188=$RP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $189=$188; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $190=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $191=(($190+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $192=HEAPU32[(($191)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $193=(($189)>>>0) >= (($192)>>>0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=(($193)&1); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $195=(($194)==(1)); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=(($195)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($196) { __label__ = 24; break; } else { __label__ = 25; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + var $198=$RP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($198)>>2)]=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 26; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + _abort(); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 26: + __label__ = 27; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + __label__ = 28; break; + case 28: + var $203=$XP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=(($203)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($204) { __label__ = 29; break; } else { __label__ = 56; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + var $206=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=(($206+28)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=HEAP32[(($207)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $209=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $210=(($209+304)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $211=(($210+($208<<2))|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H=$211; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $212=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $213=$H; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $214=HEAP32[(($213)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $215=(($212)|0)==(($214)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($215) { __label__ = 30; break; } else { __label__ = 33; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $217=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $218=$H; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($218)>>2)]=$217; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $219=(($217)|0)==0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($219) { __label__ = 31; break; } else { __label__ = 32; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $221=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $222=(($221+28)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $223=HEAP32[(($222)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $224=1 << $223; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $225=$224 ^ -1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $226=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=(($226+4)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=HEAP32[(($227)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $229=$228 & $225; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($227)>>2)]=$229; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 32; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + __label__ = 40; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + var $232=$XP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $233=$232; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $234=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $235=(($234+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $236=HEAPU32[(($235)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=(($233)>>>0) >= (($236)>>>0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $238=(($237)&1); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $239=(($238)==(1)); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $240=(($239)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($240) { __label__ = 34; break; } else { __label__ = 38; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 34: + var $242=$XP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=(($242+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=(($243)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $245=HEAP32[(($244)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=(($245)|0)==(($246)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($247) { __label__ = 35; break; } else { __label__ = 36; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + var $249=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $250=$XP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $251=(($250+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $252=(($251)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($252)>>2)]=$249; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 37; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + var $254=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $255=$XP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $256=(($255+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $257=(($256+4)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($257)>>2)]=$254; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 37; break; + case 37: + __label__ = 39; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + _abort(); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + __label__ = 40; break; + case 40: + var $262=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $263=(($262)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($263) { __label__ = 41; break; } else { __label__ = 55; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + var $265=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $266=$265; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $267=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $268=(($267+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $269=HEAPU32[(($268)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $270=(($266)>>>0) >= (($269)>>>0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $271=(($270)&1); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $272=(($271)==(1)); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $273=(($272)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($273) { __label__ = 42; break; } else { __label__ = 53; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 42: + var $275=$XP; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $277=(($276+24)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($277)>>2)]=$275; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $278=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=(($278+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $280=(($279)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $281=HEAP32[(($280)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C0=$281; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=(($281)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($282) { __label__ = 43; break; } else { __label__ = 47; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 43: + var $284=$C0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $285=$284; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $286=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=(($286+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=HEAPU32[(($287)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $289=(($285)>>>0) >= (($288)>>>0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $290=(($289)&1); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $291=(($290)==(1)); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $292=(($291)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($292) { __label__ = 44; break; } else { __label__ = 45; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + var $294=$C0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $295=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $296=(($295+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $297=(($296)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($297)>>2)]=$294; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $298=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $299=$C0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $300=(($299+24)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($300)>>2)]=$298; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 46; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + _abort(); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + __label__ = 47; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + var $304=$v; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $305=(($304+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $306=(($305+4)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $307=HEAP32[(($306)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C1=$307; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $308=(($307)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($308) { __label__ = 48; break; } else { __label__ = 52; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 48: + var $310=$C1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $311=$310; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $312=$1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $313=(($312+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $314=HEAPU32[(($313)>>2)]; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=(($311)>>>0) >= (($314)>>>0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=(($315)&1); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=(($316)==(1)); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $318=(($317)|0)!=0; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($318) { __label__ = 49; break; } else { __label__ = 50; break; } //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + var $320=$C1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $322=(($321+16)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=(($322+4)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($323)>>2)]=$320; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=$R; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=$C1; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=(($325+24)|0); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($326)>>2)]=$324; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 51; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + _abort(); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 51: + __label__ = 52; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 52: + __label__ = 54; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + _abort(); //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 54: + __label__ = 55; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 55: + __label__ = 56; break; //@line 4285 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 56: + var $334=$rsize; //@line 4286 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $335=(($334)>>>0) < 16; //@line 4286 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($335) { __label__ = 57; break; } else { __label__ = 58; break; } //@line 4286 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 57: + var $337=$rsize; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $338=$2; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=(($337+$338)|0); //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=$339 | 1; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=$340 | 2; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=$v; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $343=(($342+4)|0); //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($343)>>2)]=$341; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $344=$v; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $345=$344; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=$rsize; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=$2; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348=(($346+$347)|0); //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $349=(($345+$348)|0); //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=$349; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=(($350+4)|0); //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=HEAP32[(($351)>>2)]; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $353=$352 | 1; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($351)>>2)]=$353; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 67; break; //@line 4287 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 58: + var $355=$2; //@line 4289 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $356=$355 | 1; //@line 4289 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $357=$356 | 2; //@line 4289 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=$v; //@line 4289 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=(($358+4)|0); //@line 4289 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($359)>>2)]=$357; //@line 4289 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $360=$rsize; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $361=$360 | 1; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $362=$r; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $363=(($362+4)|0); //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($363)>>2)]=$361; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $364=$rsize; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $365=$r; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $366=$365; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=$rsize; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=(($366+$367)|0); //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=$368; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $370=(($369)|0); //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($370)>>2)]=$364; //@line 4290 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $371=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $372=(($371+8)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $373=HEAP32[(($372)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $DVS=$373; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374=$DVS; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $375=(($374)|0)!=0; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($375) { __label__ = 59; break; } else { __label__ = 66; break; } //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 59: + var $377=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $378=(($377+20)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $379=HEAP32[(($378)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $DV=$379; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=$DVS; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=$380 >>> 3; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$381; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=$I; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $383=$382 << 1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $384=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $385=(($384+40)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=(($385+($383<<2))|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=$386; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $388=$387; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B=$388; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $389=$B; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F1=$389; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $390=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $391=(($390)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $392=HEAP32[(($391)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $393=$I; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $394=1 << $393; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $395=$392 & $394; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $396=(($395)|0)!=0; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($396) { __label__ = 61; break; } else { __label__ = 60; break; } //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 60: + var $398=$I; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $399=1 << $398; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $400=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $401=(($400)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $402=HEAP32[(($401)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $403=$402 | $399; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($401)>>2)]=$403; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 65; break; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 61: + var $405=$B; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $406=(($405+8)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $407=HEAP32[(($406)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $408=$407; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $409=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $410=(($409+16)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $411=HEAPU32[(($410)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $412=(($408)>>>0) >= (($411)>>>0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $413=(($412)&1); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $414=(($413)==(1)); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $415=(($414)|0)!=0; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($415) { __label__ = 62; break; } else { __label__ = 63; break; } //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 62: + var $417=$B; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $418=(($417+8)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $419=HEAP32[(($418)>>2)]; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F1=$419; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 64; break; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 63: + _abort(); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 64: + __label__ = 65; break; + case 65: + var $423=$DV; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $424=$B; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $425=(($424+8)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($425)>>2)]=$423; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $426=$DV; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $427=$F1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $428=(($427+12)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($428)>>2)]=$426; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $429=$F1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $430=$DV; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $431=(($430+8)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($431)>>2)]=$429; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $432=$B; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $433=$DV; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $434=(($433+12)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($434)>>2)]=$432; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 66; break; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 66: + var $436=$rsize; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $437=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $438=(($437+8)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($438)>>2)]=$436; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $439=$r; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $440=$1; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $441=(($440+20)|0); //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($441)>>2)]=$439; //@line 4291 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 67; break; + case 67: + var $443=$v; //@line 4293 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $444=$443; //@line 4293 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $445=(($444+8)|0); //@line 4293 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $445; //@line 4293 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 68: + __label__ = 69; break; //@line 4295 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 69: + _abort(); //@line 4297 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4297 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_tmalloc_small["X"]=1; + +function _tmalloc_large($m, $nb) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $v; + var $rsize; + var $t; + var $idx; + var $X; + var $Y; + var $N; + var $K; + var $sizebits; + var $rst; + var $rt; + var $trem; + var $leftbits; + var $i; + var $leastbit; + var $Y1; + var $K2; + var $N3; + var $trem4; + var $r; + var $XP; + var $R; + var $F; + var $RP; + var $CP; + var $H; + var $C0; + var $C1; + var $I; + var $B; + var $F5; + var $TP; + var $H6; + var $I7; + var $X8; + var $Y9; + var $N10; + var $K11; + var $T; + var $K12; + var $C; + var $F13; + $2=$m; + $3=$nb; + $v=0; //@line 4194 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $4=$3; //@line 4195 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=(((-$4))|0); //@line 4195 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$5; //@line 4195 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=$3; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=$6 >>> 8; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $X=$7; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$X; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(($8)|0)==0; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($9) { __label__ = 2; break; } else { __label__ = 3; break; } //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + $idx=0; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 7; break; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $12=$X; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=(($12)>>>0) > 65535; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($13) { __label__ = 4; break; } else { __label__ = 5; break; } //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + $idx=31; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 6; break; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $16=$X; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$16; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=$Y; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=(($17-256)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=$18 >>> 16; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=$19 & 8; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$20; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=$N; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=$Y; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=$22 << $21; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$23; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=(($23-4096)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$24 >>> 16; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=$25 & 4; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$26; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$K; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$N; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=(($28+$27)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$29; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$K; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=$Y; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=$31 << $30; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$32; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=(($32-16384)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=$33 >>> 16; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=$34 & 2; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$35; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$N; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=(($36+$35)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$37; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=$N; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=((14-$38)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=$K; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$Y; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=$41 << $40; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$42; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=$42 >>> 15; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=(($39+$43)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$44; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$K; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=$45 << 1; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=$3; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $48=$K; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=(($48+7)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=$47 >>> (($49)>>>0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=$50 & 1; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=(($46+$51)|0); //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $idx=$52; //@line 4198 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 6; break; + case 6: + __label__ = 7; break; + case 7: + var $55=$idx; //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$2; //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($56+304)|0); //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=(($57+($55<<2))|0); //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=HEAP32[(($58)>>2)]; //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$59; //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=(($59)|0)!=0; //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($60) { __label__ = 8; break; } else { __label__ = 23; break; } //@line 4199 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $62=$3; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=$idx; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=(($63)|0)==31; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($64) { __label__ = 9; break; } else { __label__ = 10; break; } //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $73 = 0;__label__ = 11; break; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $67=$idx; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=$67 >>> 1; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68+8)|0); //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=(($69-2)|0); //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=((31-$70)|0); //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73 = $71;__label__ = 11; break; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $73; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=$62 << $73; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sizebits=$74; //@line 4201 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rst=0; //@line 4202 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 12; break; //@line 4203 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $76=$t; //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=(($76+4)|0); //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $78=HEAP32[(($77)>>2)]; //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $79=$78 & -8; //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=$3; //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=(($79-$80)|0); //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $trem=$81; //@line 4205 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=$trem; //@line 4206 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=$rsize; //@line 4206 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=(($82)>>>0) < (($83)>>>0); //@line 4206 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($84) { __label__ = 13; break; } else { __label__ = 16; break; } //@line 4206 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $86=$t; //@line 4207 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $v=$86; //@line 4207 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=$trem; //@line 4208 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$87; //@line 4208 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=(($87)|0)==0; //@line 4208 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($88) { __label__ = 14; break; } else { __label__ = 15; break; } //@line 4208 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + __label__ = 22; break; //@line 4209 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + __label__ = 16; break; //@line 4210 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $92=$t; //@line 4211 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $93=(($92+16)|0); //@line 4211 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $94=(($93+4)|0); //@line 4211 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=HEAP32[(($94)>>2)]; //@line 4211 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rt=$95; //@line 4211 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $96=$sizebits; //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $97=$96 >>> 31; //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=$97 & 1; //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=$t; //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=(($99+16)|0); //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=(($100+($98<<2))|0); //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=HEAP32[(($101)>>2)]; //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$102; //@line 4212 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=$rt; //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=(($103)|0)!=0; //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($104) { __label__ = 17; break; } else { __label__ = 19; break; } //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $106=$rt; //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=$t; //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=(($106)|0)!=(($107)|0); //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($108) { __label__ = 18; break; } else { __label__ = 19; break; } //@line 4213 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + var $110=$rt; //@line 4214 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rst=$110; //@line 4214 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 19; break; //@line 4214 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + var $112=$t; //@line 4215 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=(($112)|0)==0; //@line 4215 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($113) { __label__ = 20; break; } else { __label__ = 21; break; } //@line 4215 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + var $115=$rst; //@line 4216 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$115; //@line 4216 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 22; break; //@line 4217 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + var $117=$sizebits; //@line 4219 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $118=$117 << 1; //@line 4219 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sizebits=$118; //@line 4219 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 12; break; //@line 4220 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + __label__ = 23; break; //@line 4221 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $121=$t; //@line 4222 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=(($121)|0)==0; //@line 4222 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($122) { __label__ = 24; break; } else { __label__ = 28; break; } //@line 4222 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + var $124=$v; //@line 4222 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=(($124)|0)==0; //@line 4222 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($125) { __label__ = 25; break; } else { __label__ = 28; break; } //@line 4222 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $127=$idx; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=1 << $127; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=$128 << 1; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=$idx; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $131=1 << $130; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $132=$131 << 1; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=(((-$132))|0); //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=$129 | $133; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=$2; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $136=(($135+4)|0); //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $137=HEAP32[(($136)>>2)]; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $138=$134 & $137; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $leftbits=$138; //@line 4223 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $139=$leftbits; //@line 4224 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $140=(($139)|0)!=0; //@line 4224 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($140) { __label__ = 26; break; } else { __label__ = 27; break; } //@line 4224 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 26: + var $142=$leftbits; //@line 4226 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $143=$leftbits; //@line 4226 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144=(((-$143))|0); //@line 4226 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=$142 & $144; //@line 4226 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $leastbit=$145; //@line 4226 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $146=$leastbit; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=(($146-1)|0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y1=$147; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $148=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $149=$148 >>> 12; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $150=$149 & 16; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$150; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $151=$K2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N3=$151; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=$K2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=$153 >>> (($152)>>>0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y1=$154; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $156=$155 >>> 5; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $157=$156 & 8; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$157; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $158=$N3; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=(($158+$157)|0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N3=$159; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=$K2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=$161 >>> (($160)>>>0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y1=$162; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $163=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $164=$163 >>> 2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $165=$164 & 4; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$165; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $166=$N3; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $167=(($166+$165)|0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N3=$167; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $168=$K2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $170=$169 >>> (($168)>>>0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y1=$170; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $171=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=$171 >>> 1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $173=$172 & 2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$173; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $174=$N3; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $175=(($174+$173)|0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N3=$175; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $176=$K2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $177=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $178=$177 >>> (($176)>>>0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y1=$178; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $179=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $180=$179 >>> 1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $181=$180 & 1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$181; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $182=$N3; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=(($182+$181)|0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N3=$183; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $184=$K2; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $185=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $186=$185 >>> (($184)>>>0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y1=$186; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $187=$N3; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $188=$Y1; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $189=(($187+$188)|0); //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $i=$189; //@line 4227 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $190=$i; //@line 4228 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $191=$2; //@line 4228 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $192=(($191+304)|0); //@line 4228 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $193=(($192+($190<<2))|0); //@line 4228 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=HEAP32[(($193)>>2)]; //@line 4228 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$194; //@line 4228 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 27; break; //@line 4229 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + __label__ = 28; break; //@line 4230 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 28: + __label__ = 29; break; //@line 4232 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + var $198=$t; //@line 4232 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199=(($198)|0)!=0; //@line 4232 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($199) { __label__ = 30; break; } else { __label__ = 36; break; } //@line 4232 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $201=$t; //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $202=(($201+4)|0); //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $203=HEAP32[(($202)>>2)]; //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=$203 & -8; //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $205=$3; //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $206=(($204-$205)|0); //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $trem4=$206; //@line 4233 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=$trem4; //@line 4234 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=$rsize; //@line 4234 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $209=(($207)>>>0) < (($208)>>>0); //@line 4234 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($209) { __label__ = 31; break; } else { __label__ = 32; break; } //@line 4234 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $211=$trem4; //@line 4235 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$211; //@line 4235 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $212=$t; //@line 4236 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $v=$212; //@line 4236 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 32; break; //@line 4237 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + var $214=$t; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $215=(($214+16)|0); //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $216=(($215)|0); //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $217=HEAP32[(($216)>>2)]; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $218=(($217)|0)!=0; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($218) { __label__ = 33; break; } else { __label__ = 34; break; } //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + var $220=$t; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $221=(($220+16)|0); //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $222=(($221)|0); //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $223=HEAP32[(($222)>>2)]; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230 = $223;__label__ = 35; break; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 34: + var $225=$t; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $226=(($225+16)|0); //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=(($226+4)|0); //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=HEAP32[(($227)>>2)]; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230 = $228;__label__ = 35; break; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + var $230; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $t=$230; //@line 4238 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 29; break; //@line 4239 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + var $232=$v; //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $233=(($232)|0)!=0; //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($233) { __label__ = 37; break; } else { __label__ = 126; break; } //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + var $235=$rsize; //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $236=$2; //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=(($236+8)|0); //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $238=HEAP32[(($237)>>2)]; //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $239=$3; //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $240=(($238-$239)|0); //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $241=(($235)>>>0) < (($240)>>>0); //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($241) { __label__ = 38; break; } else { __label__ = 126; break; } //@line 4242 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + var $243=$v; //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=$243; //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $245=$2; //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=(($245+16)|0); //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=HEAPU32[(($246)>>2)]; //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=(($244)>>>0) >= (($247)>>>0); //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $249=(($248)&1); //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $250=(($249)==(1)); //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $251=(($250)|0)!=0; //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($251) { __label__ = 39; break; } else { __label__ = 125; break; } //@line 4243 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + var $253=$v; //@line 4244 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $254=$253; //@line 4244 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $255=$3; //@line 4244 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $256=(($254+$255)|0); //@line 4244 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $257=$256; //@line 4244 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $r=$257; //@line 4244 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $258=$v; //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=$258; //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=$r; //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $261=$260; //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $262=(($259)>>>0) < (($261)>>>0); //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $263=(($262)&1); //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $264=(($263)==(1)); //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $265=(($264)|0)!=0; //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($265) { __label__ = 40; break; } else { __label__ = 124; break; } //@line 4246 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 40: + var $267=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $268=(($267+24)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $269=HEAP32[(($268)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $XP=$269; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $270=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $271=(($270+12)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $272=HEAP32[(($271)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $273=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $274=(($272)|0)!=(($273)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($274) { __label__ = 41; break; } else { __label__ = 45; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + var $276=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $277=(($276+8)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $278=HEAP32[(($277)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$278; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $280=(($279+12)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $281=HEAP32[(($280)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$281; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=$F; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $283=$282; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $284=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $285=(($284+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $286=HEAPU32[(($285)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=(($283)>>>0) >= (($286)>>>0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=(($287)&1); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $289=(($288)==(1)); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $290=(($289)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($290) { __label__ = 42; break; } else { __label__ = 43; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 42: + var $292=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $293=$F; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $294=(($293+12)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($294)>>2)]=$292; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $295=$F; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $296=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $297=(($296+8)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($297)>>2)]=$295; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 44; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 43: + _abort(); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + __label__ = 57; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + var $301=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $302=(($301+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $303=(($302+4)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$303; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $304=HEAP32[(($303)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$304; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $305=(($304)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($305) { __label__ = 47; break; } else { __label__ = 46; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + var $307=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $308=(($307+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $309=(($308)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$309; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $310=HEAP32[(($309)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$310; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $311=(($310)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($311) { __label__ = 47; break; } else { __label__ = 56; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + __label__ = 48; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 48: + var $314=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=(($314+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=(($315+4)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$316; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=HEAP32[(($316)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $318=(($317)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($318) { var $326 = 1;__label__ = 50; break; } else { __label__ = 49; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + var $320=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=(($320+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $322=(($321)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$322; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=HEAP32[(($322)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=(($323)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326 = $324;__label__ = 50; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + var $326; + if ($326) { __label__ = 51; break; } else { __label__ = 52; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 51: + var $328=$CP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$328; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $329=HEAP32[(($328)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$329; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 48; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 52: + var $331=$RP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $332=$331; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $333=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $334=(($333+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $335=HEAPU32[(($334)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $336=(($332)>>>0) >= (($335)>>>0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $337=(($336)&1); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $338=(($337)==(1)); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=(($338)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($339) { __label__ = 53; break; } else { __label__ = 54; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + var $341=$RP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($341)>>2)]=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 55; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 54: + _abort(); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 55: + __label__ = 56; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 56: + __label__ = 57; break; + case 57: + var $346=$XP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=(($346)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($347) { __label__ = 58; break; } else { __label__ = 85; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 58: + var $349=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=(($349+28)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=HEAP32[(($350)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $353=(($352+304)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $354=(($353+($351<<2))|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H=$354; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $355=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $356=$H; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $357=HEAP32[(($356)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=(($355)|0)==(($357)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($358) { __label__ = 59; break; } else { __label__ = 62; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 59: + var $360=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $361=$H; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($361)>>2)]=$360; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $362=(($360)|0)==0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($362) { __label__ = 60; break; } else { __label__ = 61; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 60: + var $364=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $365=(($364+28)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $366=HEAP32[(($365)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=1 << $366; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=$367 ^ -1; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $370=(($369+4)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $371=HEAP32[(($370)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $372=$371 & $368; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($370)>>2)]=$372; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 61; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 61: + __label__ = 69; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 62: + var $375=$XP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $376=$375; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $377=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $378=(($377+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $379=HEAPU32[(($378)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=(($376)>>>0) >= (($379)>>>0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=(($380)&1); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=(($381)==(1)); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $383=(($382)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($383) { __label__ = 63; break; } else { __label__ = 67; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 63: + var $385=$XP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=(($385+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=(($386)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $388=HEAP32[(($387)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $389=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $390=(($388)|0)==(($389)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($390) { __label__ = 64; break; } else { __label__ = 65; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 64: + var $392=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $393=$XP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $394=(($393+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $395=(($394)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($395)>>2)]=$392; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 66; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 65: + var $397=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $398=$XP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $399=(($398+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $400=(($399+4)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($400)>>2)]=$397; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 66; break; + case 66: + __label__ = 68; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 67: + _abort(); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 68: + __label__ = 69; break; + case 69: + var $405=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $406=(($405)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($406) { __label__ = 70; break; } else { __label__ = 84; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 70: + var $408=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $409=$408; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $410=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $411=(($410+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $412=HEAPU32[(($411)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $413=(($409)>>>0) >= (($412)>>>0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $414=(($413)&1); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $415=(($414)==(1)); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $416=(($415)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($416) { __label__ = 71; break; } else { __label__ = 82; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 71: + var $418=$XP; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $419=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $420=(($419+24)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($420)>>2)]=$418; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $421=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $422=(($421+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $423=(($422)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $424=HEAP32[(($423)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C0=$424; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $425=(($424)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($425) { __label__ = 72; break; } else { __label__ = 76; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 72: + var $427=$C0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $428=$427; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $429=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $430=(($429+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $431=HEAPU32[(($430)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $432=(($428)>>>0) >= (($431)>>>0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $433=(($432)&1); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $434=(($433)==(1)); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $435=(($434)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($435) { __label__ = 73; break; } else { __label__ = 74; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 73: + var $437=$C0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $438=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $439=(($438+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $440=(($439)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($440)>>2)]=$437; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $441=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $442=$C0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $443=(($442+24)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($443)>>2)]=$441; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 75; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 74: + _abort(); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 75: + __label__ = 76; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 76: + var $447=$v; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $448=(($447+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $449=(($448+4)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $450=HEAP32[(($449)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C1=$450; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $451=(($450)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($451) { __label__ = 77; break; } else { __label__ = 81; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 77: + var $453=$C1; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $454=$453; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $455=$2; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $456=(($455+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $457=HEAPU32[(($456)>>2)]; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $458=(($454)>>>0) >= (($457)>>>0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $459=(($458)&1); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $460=(($459)==(1)); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $461=(($460)|0)!=0; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($461) { __label__ = 78; break; } else { __label__ = 79; break; } //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 78: + var $463=$C1; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $464=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $465=(($464+16)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $466=(($465+4)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($466)>>2)]=$463; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $467=$R; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $468=$C1; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $469=(($468+24)|0); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($469)>>2)]=$467; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 80; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 79: + _abort(); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 80: + __label__ = 81; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 81: + __label__ = 83; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 82: + _abort(); //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 83: + __label__ = 84; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 84: + __label__ = 85; break; //@line 4247 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 85: + var $477=$rsize; //@line 4248 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $478=(($477)>>>0) < 16; //@line 4248 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($478) { __label__ = 86; break; } else { __label__ = 87; break; } //@line 4248 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 86: + var $480=$rsize; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $481=$3; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $482=(($480+$481)|0); //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $483=$482 | 1; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $484=$483 | 2; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $485=$v; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $486=(($485+4)|0); //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($486)>>2)]=$484; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $487=$v; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $488=$487; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $489=$rsize; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $490=$3; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $491=(($489+$490)|0); //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $492=(($488+$491)|0); //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $493=$492; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $494=(($493+4)|0); //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $495=HEAP32[(($494)>>2)]; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $496=$495 | 1; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($494)>>2)]=$496; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 123; break; //@line 4249 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 87: + var $498=$3; //@line 4251 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $499=$498 | 1; //@line 4251 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $500=$499 | 2; //@line 4251 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $501=$v; //@line 4251 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $502=(($501+4)|0); //@line 4251 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($502)>>2)]=$500; //@line 4251 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $503=$rsize; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $504=$503 | 1; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $505=$r; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $506=(($505+4)|0); //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($506)>>2)]=$504; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $507=$rsize; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $508=$r; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $509=$508; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $510=$rsize; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $511=(($509+$510)|0); //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $512=$511; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $513=(($512)|0); //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($513)>>2)]=$507; //@line 4252 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $514=$rsize; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $515=$514 >>> 3; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $516=(($515)>>>0) < 32; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($516) { __label__ = 88; break; } else { __label__ = 95; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 88: + var $518=$rsize; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $519=$518 >>> 3; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$519; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $520=$I; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $521=$520 << 1; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $522=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $523=(($522+40)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $524=(($523+($521<<2))|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $525=$524; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $526=$525; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B=$526; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $527=$B; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F5=$527; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $528=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $529=(($528)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $530=HEAP32[(($529)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $531=$I; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $532=1 << $531; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $533=$530 & $532; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $534=(($533)|0)!=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($534) { __label__ = 90; break; } else { __label__ = 89; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 89: + var $536=$I; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $537=1 << $536; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $538=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $539=(($538)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $540=HEAP32[(($539)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $541=$540 | $537; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($539)>>2)]=$541; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 94; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 90: + var $543=$B; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $544=(($543+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $545=HEAP32[(($544)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $546=$545; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $547=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $548=(($547+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $549=HEAPU32[(($548)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $550=(($546)>>>0) >= (($549)>>>0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $551=(($550)&1); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $552=(($551)==(1)); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $553=(($552)|0)!=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($553) { __label__ = 91; break; } else { __label__ = 92; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 91: + var $555=$B; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $556=(($555+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $557=HEAP32[(($556)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F5=$557; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 93; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 92: + _abort(); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 93: + __label__ = 94; break; + case 94: + var $561=$r; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $562=$B; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $563=(($562+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($563)>>2)]=$561; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $564=$r; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $565=$F5; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $566=(($565+12)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($566)>>2)]=$564; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $567=$F5; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $568=$r; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $569=(($568+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($569)>>2)]=$567; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $570=$B; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $571=$r; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $572=(($571+12)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($572)>>2)]=$570; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 122; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 95: + var $574=$r; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $575=$574; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $TP=$575; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $576=$rsize; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $577=$576 >>> 8; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $X8=$577; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $578=$X8; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $579=(($578)|0)==0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($579) { __label__ = 96; break; } else { __label__ = 97; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 96: + $I7=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 101; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 97: + var $582=$X8; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $583=(($582)>>>0) > 65535; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($583) { __label__ = 98; break; } else { __label__ = 99; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 98: + $I7=31; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 100; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 99: + var $586=$X8; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y9=$586; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $587=$Y9; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $588=(($587-256)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $589=$588 >>> 16; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $590=$589 & 8; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N10=$590; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $591=$N10; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $592=$Y9; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $593=$592 << $591; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y9=$593; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $594=(($593-4096)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $595=$594 >>> 16; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $596=$595 & 4; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K11=$596; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $597=$K11; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $598=$N10; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $599=(($598+$597)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N10=$599; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $600=$K11; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $601=$Y9; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $602=$601 << $600; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y9=$602; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $603=(($602-16384)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $604=$603 >>> 16; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $605=$604 & 2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K11=$605; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $606=$N10; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $607=(($606+$605)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N10=$607; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $608=$N10; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $609=((14-$608)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $610=$K11; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $611=$Y9; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $612=$611 << $610; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y9=$612; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $613=$612 >>> 15; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $614=(($609+$613)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K11=$614; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $615=$K11; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $616=$615 << 1; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $617=$rsize; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $618=$K11; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $619=(($618+7)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $620=$617 >>> (($619)>>>0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $621=$620 & 1; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $622=(($616+$621)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I7=$622; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 100; break; + case 100: + __label__ = 101; break; + case 101: + var $625=$I7; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $626=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $627=(($626+304)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $628=(($627+($625<<2))|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H6=$628; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $629=$I7; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $630=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $631=(($630+28)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($631)>>2)]=$629; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $632=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $633=(($632+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $634=(($633+4)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($634)>>2)]=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $635=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $636=(($635+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $637=(($636)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($637)>>2)]=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $638=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $639=(($638+4)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $640=HEAP32[(($639)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $641=$I7; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $642=1 << $641; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $643=$640 & $642; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $644=(($643)|0)!=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($644) { __label__ = 103; break; } else { __label__ = 102; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 102: + var $646=$I7; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $647=1 << $646; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $648=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $649=(($648+4)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $650=HEAP32[(($649)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $651=$650 | $647; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($649)>>2)]=$651; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $652=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $653=$H6; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($653)>>2)]=$652; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $654=$H6; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $655=$654; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $656=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $657=(($656+24)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($657)>>2)]=$655; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $658=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $659=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $660=(($659+12)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($660)>>2)]=$658; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $661=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $662=(($661+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($662)>>2)]=$658; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 121; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 103: + var $664=$H6; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $665=HEAP32[(($664)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$665; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $666=$rsize; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $667=$I7; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $668=(($667)|0)==31; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($668) { __label__ = 104; break; } else { __label__ = 105; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 104: + var $677 = 0;__label__ = 106; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 105: + var $671=$I7; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $672=$671 >>> 1; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $673=(($672+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $674=(($673-2)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $675=((31-$674)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $677 = $675;__label__ = 106; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 106: + var $677; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $678=$666 << $677; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K12=$678; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 107; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 107: + var $680=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $681=(($680+4)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $682=HEAP32[(($681)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $683=$682 & -8; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $684=$rsize; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $685=(($683)|0)!=(($684)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($685) { __label__ = 108; break; } else { __label__ = 114; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 108: + var $687=$K12; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $688=$687 >>> 31; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $689=$688 & 1; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $690=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $691=(($690+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $692=(($691+($689<<2))|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C=$692; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $693=$K12; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $694=$693 << 1; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K12=$694; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $695=$C; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $696=HEAP32[(($695)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $697=(($696)|0)!=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($697) { __label__ = 109; break; } else { __label__ = 110; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 109: + var $699=$C; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $700=HEAP32[(($699)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$700; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 113; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 110: + var $702=$C; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $703=$702; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $704=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $705=(($704+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $706=HEAPU32[(($705)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $707=(($703)>>>0) >= (($706)>>>0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $708=(($707)&1); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $709=(($708)==(1)); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $710=(($709)|0)!=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($710) { __label__ = 111; break; } else { __label__ = 112; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 111: + var $712=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $713=$C; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($713)>>2)]=$712; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $714=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $715=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $716=(($715+24)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($716)>>2)]=$714; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $717=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $718=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $719=(($718+12)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($719)>>2)]=$717; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $720=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $721=(($720+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($721)>>2)]=$717; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 120; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 112: + _abort(); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 113: + __label__ = 119; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 114: + var $725=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $726=(($725+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $727=HEAP32[(($726)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F13=$727; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $728=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $729=$728; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $730=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $731=(($730+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $732=HEAPU32[(($731)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $733=(($729)>>>0) >= (($732)>>>0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($733) { __label__ = 115; break; } else { var $742 = 0;__label__ = 116; break; } //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 115: + var $735=$F13; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $736=$735; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $737=$2; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $738=(($737+16)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $739=HEAPU32[(($738)>>2)]; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $740=(($736)>>>0) >= (($739)>>>0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $742 = $740;__label__ = 116; break; + case 116: + var $742; + var $743=(($742)&1); + var $744=(($743)==(1)); + var $745=(($744)|0)!=0; + if ($745) { __label__ = 117; break; } else { __label__ = 118; break; } + case 117: + var $747=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $748=$F13; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $749=(($748+12)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($749)>>2)]=$747; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $750=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $751=(($750+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($751)>>2)]=$747; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $752=$F13; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $753=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $754=(($753+8)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($754)>>2)]=$752; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $755=$T; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $756=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $757=(($756+12)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($757)>>2)]=$755; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $758=$TP; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $759=(($758+24)|0); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($759)>>2)]=0; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 120; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 118: + _abort(); //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 119: + __label__ = 107; break; //@line 4253 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 120: + __label__ = 121; break; + case 121: + __label__ = 122; break; + case 122: + __label__ = 123; break; + case 123: + var $766=$v; //@line 4255 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $767=$766; //@line 4255 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $768=(($767+8)|0); //@line 4255 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=$768; //@line 4255 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 127; break; //@line 4255 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 124: + __label__ = 125; break; //@line 4257 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 125: + _abort(); //@line 4258 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4258 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 126: + $1=0; //@line 4260 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 127; break; //@line 4260 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 127: + var $773=$1; //@line 4261 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $773; //@line 4261 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_tmalloc_large["X"]=1; + +function _sys_alloc($m, $nb) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $tbase; + var $tsize; + var $mmap_flag; + var $mem; + var $br; + var $ss; + var $asize; + var $base; + var $esize; + var $end; + var $asize1; + var $br2; + var $end3; + var $ssize; + var $mn; + var $sp; + var $oldbase; + var $rsize; + var $p; + var $r; + $2=$m; + $3=$nb; + $tbase=-1; //@line 3876 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=0; //@line 3877 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mmap_flag=0; //@line 3878 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $4=HEAP32[((((_mparams)|0))>>2)]; //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=(($4)|0)!=0; //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($5) { var $10 = 1;__label__ = 3; break; } else { __label__ = 2; break; } //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $7=_init_mparams(); //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=(($7)|0)!=0; //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10 = $8;__label__ = 3; break; //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $10; + var $11=(($10)&1); //@line 3880 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=$2; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=(($12+440)|0); //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=HEAP32[(($13)>>2)]; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$14 & 0; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=(($15)|0)!=0; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($16) { __label__ = 4; break; } else { __label__ = 9; break; } //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $18=$3; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=HEAPU32[((((_mparams+12)|0))>>2)]; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=(($18)>>>0) >= (($19)>>>0); //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($20) { __label__ = 5; break; } else { __label__ = 9; break; } //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $22=$2; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=(($22+12)|0); //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=HEAP32[(($23)>>2)]; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=(($24)|0)!=0; //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($25) { __label__ = 6; break; } else { __label__ = 9; break; } //@line 3883 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $27=$2; //@line 3884 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$3; //@line 3884 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=_mmap_alloc($27, $28); //@line 3884 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mem=$29; //@line 3884 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$mem; //@line 3885 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=(($30)|0)!=0; //@line 3885 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($31) { __label__ = 7; break; } else { __label__ = 8; break; } //@line 3885 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $33=$mem; //@line 3886 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=$33; //@line 3886 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 92; break; //@line 3886 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + __label__ = 9; break; //@line 3887 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $36=$2; //@line 3911 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=(($36+440)|0); //@line 3911 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=HEAP32[(($37)>>2)]; //@line 3911 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=$38 & 4; //@line 3911 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=(($39)|0)!=0; //@line 3911 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($40) { __label__ = 42; break; } else { __label__ = 10; break; } //@line 3911 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + $br=-1; //@line 3912 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=$2; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=(($42+24)|0); //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=HEAP32[(($43)>>2)]; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=(($44)|0)==0; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($45) { __label__ = 11; break; } else { __label__ = 12; break; } //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $55 = 0;__label__ = 13; break; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $48=$2; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=$2; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=(($49+24)|0); //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=HEAP32[(($50)>>2)]; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=$51; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=_segment_holding($48, $52); //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55 = $53;__label__ = 13; break; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $55; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $ss=$55; //@line 3913 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asize=0; //@line 3914 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$ss; //@line 3917 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($56)|0)==0; //@line 3917 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($57) { __label__ = 14; break; } else { __label__ = 22; break; } //@line 3917 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $59=_sbrk(0); //@line 3918 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $base=$59; //@line 3918 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=$base; //@line 3919 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=(($60)|0)!=-1; //@line 3919 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($61) { __label__ = 15; break; } else { __label__ = 21; break; } //@line 3919 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + var $63=$3; //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=(($63+48)|0); //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $66=(($65-1)|0); //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $67=(($64+$66)|0); //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68-1)|0); //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=$69 ^ -1; //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=$67 & $70; //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asize=$71; //@line 3920 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=$base; //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=$72; //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=HEAP32[((((_mparams+4)|0))>>2)]; //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=(($74-1)|0); //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=$73 & $75; //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=(($76)|0)==0; //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($77) { __label__ = 17; break; } else { __label__ = 16; break; } //@line 3922 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $79=$base; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=$79; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=HEAP32[((((_mparams+4)|0))>>2)]; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=(($81-1)|0); //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=(($80+$82)|0); //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=HEAP32[((((_mparams+4)|0))>>2)]; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $85=(($84-1)|0); //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $86=$85 ^ -1; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=$83 & $86; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=$base; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=$88; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=(($87-$89)|0); //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=$asize; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=(($91+$90)|0); //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asize=$92; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 17; break; //@line 3923 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $94=$asize; //@line 3925 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=(($94)>>>0) < 2147483647; //@line 3925 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($95) { __label__ = 18; break; } else { __label__ = 20; break; } //@line 3925 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + var $97=$asize; //@line 3926 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=_sbrk($97); //@line 3926 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $br=$98; //@line 3926 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=$base; //@line 3926 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=(($98)|0)==(($99)|0); //@line 3926 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($100) { __label__ = 19; break; } else { __label__ = 20; break; } //@line 3926 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + var $102=$base; //@line 3927 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tbase=$102; //@line 3927 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=$asize; //@line 3928 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=$103; //@line 3928 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 20; break; //@line 3929 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + __label__ = 21; break; //@line 3930 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + __label__ = 26; break; //@line 3931 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + var $107=$3; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=$2; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $109=(($108+12)|0); //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $110=HEAP32[(($109)>>2)]; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $111=(($107-$110)|0); //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $112=(($111+48)|0); //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=(($113-1)|0); //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=(($112+$114)|0); //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $117=(($116-1)|0); //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $118=$117 ^ -1; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $119=$115 & $118; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asize=$119; //@line 3934 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $120=$asize; //@line 3936 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=(($120)>>>0) < 2147483647; //@line 3936 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($121) { __label__ = 23; break; } else { __label__ = 25; break; } //@line 3936 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $123=$asize; //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $124=_sbrk($123); //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $br=$124; //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=$ss; //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=(($125)|0); //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=HEAP32[(($126)>>2)]; //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=$ss; //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=(($128+4)|0); //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=HEAP32[(($129)>>2)]; //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $131=(($127+$130)|0); //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $132=(($124)|0)==(($131)|0); //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($132) { __label__ = 24; break; } else { __label__ = 25; break; } //@line 3937 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + var $134=$br; //@line 3938 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tbase=$134; //@line 3938 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=$asize; //@line 3939 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=$135; //@line 3939 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 25; break; //@line 3940 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + __label__ = 26; break; + case 26: + var $138=$tbase; //@line 3943 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $139=(($138)|0)==-1; //@line 3943 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($139) { __label__ = 27; break; } else { __label__ = 41; break; } //@line 3943 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + var $141=$br; //@line 3944 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=(($141)|0)!=-1; //@line 3944 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($142) { __label__ = 28; break; } else { __label__ = 37; break; } //@line 3944 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 28: + var $144=$asize; //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=(($144)>>>0) < 2147483647; //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($145) { __label__ = 29; break; } else { __label__ = 36; break; } //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + var $147=$asize; //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $148=$3; //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $149=(($148+48)|0); //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $150=(($147)>>>0) < (($149)>>>0); //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($150) { __label__ = 30; break; } else { __label__ = 36; break; } //@line 3945 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $152=$3; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=(($152+48)|0); //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=$asize; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=(($153-$154)|0); //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $156=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $157=(($156-1)|0); //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $158=(($155+$157)|0); //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=(($159-1)|0); //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=$160 ^ -1; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=$158 & $161; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $esize=$162; //@line 3947 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $163=$esize; //@line 3948 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $164=(($163)>>>0) < 2147483647; //@line 3948 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($164) { __label__ = 31; break; } else { __label__ = 35; break; } //@line 3948 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $166=$esize; //@line 3949 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $167=_sbrk($166); //@line 3949 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $end=$167; //@line 3949 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $168=$end; //@line 3950 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=(($168)|0)!=-1; //@line 3950 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($169) { __label__ = 32; break; } else { __label__ = 33; break; } //@line 3950 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + var $171=$esize; //@line 3951 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=$asize; //@line 3951 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $173=(($172+$171)|0); //@line 3951 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asize=$173; //@line 3951 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 34; break; //@line 3951 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + var $175=$asize; //@line 3953 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $176=(((-$175))|0); //@line 3953 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $177=_sbrk($176); //@line 3953 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $br=-1; //@line 3954 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 34; break; + case 34: + __label__ = 35; break; //@line 3956 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + __label__ = 36; break; //@line 3957 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + __label__ = 37; break; //@line 3958 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + var $182=$br; //@line 3959 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=(($182)|0)!=-1; //@line 3959 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($183) { __label__ = 38; break; } else { __label__ = 39; break; } //@line 3959 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + var $185=$br; //@line 3960 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tbase=$185; //@line 3960 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $186=$asize; //@line 3961 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=$186; //@line 3961 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 40; break; //@line 3962 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + var $188=$2; //@line 3964 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $189=(($188+440)|0); //@line 3964 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $190=HEAP32[(($189)>>2)]; //@line 3964 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $191=$190 | 4; //@line 3964 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($189)>>2)]=$191; //@line 3964 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 40; break; + case 40: + __label__ = 41; break; //@line 3965 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + __label__ = 42; break; //@line 3968 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 42: + var $195=$tbase; //@line 3982 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=(($195)|0)==-1; //@line 3982 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($196) { __label__ = 43; break; } else { __label__ = 52; break; } //@line 3982 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 43: + var $198=$3; //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199=(($198+48)|0); //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $200=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $201=(($200-1)|0); //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $202=(($199+$201)|0); //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $203=HEAP32[((((_mparams+8)|0))>>2)]; //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=(($203-1)|0); //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $205=$204 ^ -1; //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $206=$202 & $205; //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asize1=$206; //@line 3983 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=$asize1; //@line 3984 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=(($207)>>>0) < 2147483647; //@line 3984 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($208) { __label__ = 44; break; } else { __label__ = 51; break; } //@line 3984 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + $br2=-1; //@line 3985 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $end3=-1; //@line 3986 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $210=$asize1; //@line 3988 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $211=_sbrk($210); //@line 3988 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $br2=$211; //@line 3988 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $212=_sbrk(0); //@line 3989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $end3=$212; //@line 3989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $213=$br2; //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $214=(($213)|0)!=-1; //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($214) { __label__ = 45; break; } else { __label__ = 50; break; } //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + var $216=$end3; //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $217=(($216)|0)!=-1; //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($217) { __label__ = 46; break; } else { __label__ = 50; break; } //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + var $219=$br2; //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $220=$end3; //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $221=(($219)>>>0) < (($220)>>>0); //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($221) { __label__ = 47; break; } else { __label__ = 50; break; } //@line 3991 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + var $223=$end3; //@line 3992 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $224=$br2; //@line 3992 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $225=$223; //@line 3992 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $226=$224; //@line 3992 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=(($225-$226)|0); //@line 3992 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $ssize=$227; //@line 3992 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=$ssize; //@line 3993 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $229=$3; //@line 3993 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230=(($229+40)|0); //@line 3993 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $231=(($228)>>>0) > (($230)>>>0); //@line 3993 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($231) { __label__ = 48; break; } else { __label__ = 49; break; } //@line 3993 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 48: + var $233=$br2; //@line 3994 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tbase=$233; //@line 3994 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $234=$ssize; //@line 3995 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=$234; //@line 3995 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 49; break; //@line 3996 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + __label__ = 50; break; //@line 3997 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + __label__ = 51; break; //@line 3998 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 51: + __label__ = 52; break; //@line 3999 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 52: + var $239=$tbase; //@line 4001 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $240=(($239)|0)!=-1; //@line 4001 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($240) { __label__ = 53; break; } else { __label__ = 91; break; } //@line 4001 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + var $242=$tsize; //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=$2; //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=(($243+432)|0); //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $245=HEAP32[(($244)>>2)]; //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=(($245+$242)|0); //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($244)>>2)]=$246; //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=$2; //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=(($247+436)|0); //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $249=HEAPU32[(($248)>>2)]; //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $250=(($246)>>>0) > (($249)>>>0); //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($250) { __label__ = 54; break; } else { __label__ = 55; break; } //@line 4003 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 54: + var $252=$2; //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $253=(($252+432)|0); //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $254=HEAP32[(($253)>>2)]; //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $255=$2; //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $256=(($255+436)|0); //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($256)>>2)]=$254; //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 55; break; //@line 4004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 55: + var $258=$2; //@line 4006 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=(($258+24)|0); //@line 4006 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=HEAP32[(($259)>>2)]; //@line 4006 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $261=(($260)|0)!=0; //@line 4006 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($261) { __label__ = 63; break; } else { __label__ = 56; break; } //@line 4006 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 56: + var $263=$2; //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $264=(($263+16)|0); //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $265=HEAP32[(($264)>>2)]; //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $266=(($265)|0)==0; //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($266) { __label__ = 58; break; } else { __label__ = 57; break; } //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 57: + var $268=$tbase; //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $269=$2; //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $270=(($269+16)|0); //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $271=HEAPU32[(($270)>>2)]; //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $272=(($268)>>>0) < (($271)>>>0); //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($272) { __label__ = 58; break; } else { __label__ = 59; break; } //@line 4007 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 58: + var $274=$tbase; //@line 4008 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $275=$2; //@line 4008 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=(($275+16)|0); //@line 4008 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($276)>>2)]=$274; //@line 4008 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 59; break; //@line 4008 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 59: + var $278=$tbase; //@line 4009 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=$2; //@line 4009 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $280=(($279+444)|0); //@line 4009 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $281=(($280)|0); //@line 4009 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($281)>>2)]=$278; //@line 4009 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=$tsize; //@line 4010 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $283=$2; //@line 4010 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $284=(($283+444)|0); //@line 4010 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $285=(($284+4)|0); //@line 4010 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($285)>>2)]=$282; //@line 4010 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $286=$mmap_flag; //@line 4011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=$2; //@line 4011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=(($287+444)|0); //@line 4011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $289=(($288+12)|0); //@line 4011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($289)>>2)]=$286; //@line 4011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $290=HEAP32[((((_mparams)|0))>>2)]; //@line 4012 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $291=$2; //@line 4012 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $292=(($291+36)|0); //@line 4012 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($292)>>2)]=$290; //@line 4012 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $293=$2; //@line 4013 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $294=(($293+32)|0); //@line 4013 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($294)>>2)]=-1; //@line 4013 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $295=$2; //@line 4014 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _init_bins($295); //@line 4014 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $296=$2; //@line 4016 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $297=(($296)|0)==((__gm_)|0); //@line 4016 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($297) { __label__ = 60; break; } else { __label__ = 61; break; } //@line 4016 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 60: + var $299=$2; //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $300=$tbase; //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $301=$300; //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $302=$tsize; //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $303=(($302-40)|0); //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _init_top($299, $301, $303); //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 62; break; //@line 4017 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 61: + var $305=$2; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $306=$305; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $307=(($306-8)|0); //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $308=$307; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $309=$308; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $310=$2; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $311=$310; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $312=(($311-8)|0); //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $313=$312; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $314=(($313+4)|0); //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=HEAP32[(($314)>>2)]; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=$315 & -8; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=(($309+$316)|0); //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $318=$317; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mn=$318; //@line 4022 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $319=$2; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $320=$mn; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=$tbase; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $322=$tsize; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=(($321+$322)|0); //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=$mn; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=$324; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=$323; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $327=$325; //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $328=(($326-$327)|0); //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $329=(($328-40)|0); //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _init_top($319, $320, $329); //@line 4023 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 62; break; + case 62: + __label__ = 88; break; //@line 4025 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 63: + var $332=$2; //@line 4029 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $333=(($332+444)|0); //@line 4029 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$333; //@line 4029 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 64; break; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 64: + var $335=$sp; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $336=(($335)|0)!=0; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($336) { __label__ = 65; break; } else { var $348 = 0;__label__ = 66; break; } //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 65: + var $338=$tbase; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=$sp; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=(($339)|0); //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=HEAP32[(($340)>>2)]; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=$sp; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $343=(($342+4)|0); //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $344=HEAP32[(($343)>>2)]; //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $345=(($341+$344)|0); //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=(($338)|0)!=(($345)|0); //@line 4031 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348 = $346;__label__ = 66; break; + case 66: + var $348; + if ($348) { __label__ = 67; break; } else { __label__ = 68; break; } + case 67: + var $350=$sp; //@line 4032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=(($350+8)|0); //@line 4032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=HEAP32[(($351)>>2)]; //@line 4032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$352; //@line 4032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 64; break; //@line 4032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 68: + var $354=$sp; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $355=(($354)|0)!=0; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($355) { __label__ = 69; break; } else { __label__ = 74; break; } //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 69: + var $357=$sp; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=(($357+12)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=HEAP32[(($358)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $360=$359 & 8; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $361=(($360)|0)!=0; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($361) { __label__ = 74; break; } else { __label__ = 70; break; } //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 70: + var $363=$sp; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $364=(($363+12)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $365=HEAP32[(($364)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $366=$365 & 0; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=$mmap_flag; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=(($366)|0)==(($367)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($368) { __label__ = 71; break; } else { __label__ = 74; break; } //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 71: + var $370=$2; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $371=(($370+24)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $372=HEAP32[(($371)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $373=$372; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374=$sp; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $375=(($374)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $376=HEAPU32[(($375)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $377=(($373)>>>0) >= (($376)>>>0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($377) { __label__ = 72; break; } else { __label__ = 74; break; } //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 72: + var $379=$2; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=(($379+24)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=HEAP32[(($380)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=$381; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $383=$sp; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $384=(($383)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $385=HEAP32[(($384)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=$sp; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=(($386+4)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $388=HEAP32[(($387)>>2)]; //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $389=(($385+$388)|0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $390=(($382)>>>0) < (($389)>>>0); //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($390) { __label__ = 73; break; } else { __label__ = 74; break; } //@line 4033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 73: + var $392=$tsize; //@line 4037 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $393=$sp; //@line 4037 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $394=(($393+4)|0); //@line 4037 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $395=HEAP32[(($394)>>2)]; //@line 4037 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $396=(($395+$392)|0); //@line 4037 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($394)>>2)]=$396; //@line 4037 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $397=$2; //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $398=$2; //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $399=(($398+24)|0); //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $400=HEAP32[(($399)>>2)]; //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $401=$2; //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $402=(($401+12)|0); //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $403=HEAP32[(($402)>>2)]; //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $404=$tsize; //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $405=(($403+$404)|0); //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _init_top($397, $400, $405); //@line 4038 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 87; break; //@line 4039 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 74: + var $407=$tbase; //@line 4041 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $408=$2; //@line 4041 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $409=(($408+16)|0); //@line 4041 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $410=HEAPU32[(($409)>>2)]; //@line 4041 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $411=(($407)>>>0) < (($410)>>>0); //@line 4041 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($411) { __label__ = 75; break; } else { __label__ = 76; break; } //@line 4041 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 75: + var $413=$tbase; //@line 4042 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $414=$2; //@line 4042 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $415=(($414+16)|0); //@line 4042 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($415)>>2)]=$413; //@line 4042 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 76; break; //@line 4042 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 76: + var $417=$2; //@line 4043 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $418=(($417+444)|0); //@line 4043 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$418; //@line 4043 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 77; break; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 77: + var $420=$sp; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $421=(($420)|0)!=0; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($421) { __label__ = 78; break; } else { var $431 = 0;__label__ = 79; break; } //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 78: + var $423=$sp; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $424=(($423)|0); //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $425=HEAP32[(($424)>>2)]; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $426=$tbase; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $427=$tsize; //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $428=(($426+$427)|0); //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $429=(($425)|0)!=(($428)|0); //@line 4044 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $431 = $429;__label__ = 79; break; + case 79: + var $431; + if ($431) { __label__ = 80; break; } else { __label__ = 81; break; } + case 80: + var $433=$sp; //@line 4045 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $434=(($433+8)|0); //@line 4045 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $435=HEAP32[(($434)>>2)]; //@line 4045 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$435; //@line 4045 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 77; break; //@line 4045 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 81: + var $437=$sp; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $438=(($437)|0)!=0; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($438) { __label__ = 82; break; } else { __label__ = 85; break; } //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 82: + var $440=$sp; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $441=(($440+12)|0); //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $442=HEAP32[(($441)>>2)]; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $443=$442 & 8; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $444=(($443)|0)!=0; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($444) { __label__ = 85; break; } else { __label__ = 83; break; } //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 83: + var $446=$sp; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $447=(($446+12)|0); //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $448=HEAP32[(($447)>>2)]; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $449=$448 & 0; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $450=$mmap_flag; //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $451=(($449)|0)==(($450)|0); //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($451) { __label__ = 84; break; } else { __label__ = 85; break; } //@line 4046 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 84: + var $453=$sp; //@line 4049 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $454=(($453)|0); //@line 4049 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $455=HEAP32[(($454)>>2)]; //@line 4049 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $oldbase=$455; //@line 4049 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $456=$tbase; //@line 4050 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $457=$sp; //@line 4050 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $458=(($457)|0); //@line 4050 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($458)>>2)]=$456; //@line 4050 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $459=$tsize; //@line 4051 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $460=$sp; //@line 4051 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $461=(($460+4)|0); //@line 4051 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $462=HEAP32[(($461)>>2)]; //@line 4051 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $463=(($462+$459)|0); //@line 4051 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($461)>>2)]=$463; //@line 4051 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $464=$2; //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $465=$tbase; //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $466=$oldbase; //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $467=$3; //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $468=_prepend_alloc($464, $465, $466, $467); //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=$468; //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 92; break; //@line 4052 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 85: + var $470=$2; //@line 4055 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $471=$tbase; //@line 4055 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $472=$tsize; //@line 4055 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $473=$mmap_flag; //@line 4055 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _add_segment($470, $471, $472, $473); //@line 4055 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 86; break; + case 86: + __label__ = 87; break; + case 87: + __label__ = 88; break; + case 88: + var $477=$3; //@line 4059 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $478=$2; //@line 4059 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $479=(($478+12)|0); //@line 4059 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $480=HEAPU32[(($479)>>2)]; //@line 4059 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $481=(($477)>>>0) < (($480)>>>0); //@line 4059 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($481) { __label__ = 89; break; } else { __label__ = 90; break; } //@line 4059 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 89: + var $483=$3; //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $484=$2; //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $485=(($484+12)|0); //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $486=HEAP32[(($485)>>2)]; //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $487=(($486-$483)|0); //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($485)>>2)]=$487; //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rsize=$487; //@line 4060 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $488=$2; //@line 4061 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $489=(($488+24)|0); //@line 4061 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $490=HEAP32[(($489)>>2)]; //@line 4061 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$490; //@line 4061 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $491=$p; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $492=$491; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $493=$3; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $494=(($492+$493)|0); //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $495=$494; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $496=$2; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $497=(($496+24)|0); //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($497)>>2)]=$495; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $r=$495; //@line 4062 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $498=$rsize; //@line 4063 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $499=$498 | 1; //@line 4063 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $500=$r; //@line 4063 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $501=(($500+4)|0); //@line 4063 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($501)>>2)]=$499; //@line 4063 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $502=$3; //@line 4064 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $503=$502 | 1; //@line 4064 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $504=$503 | 2; //@line 4064 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $505=$p; //@line 4064 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $506=(($505+4)|0); //@line 4064 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($506)>>2)]=$504; //@line 4064 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $507=$p; //@line 4067 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $508=$507; //@line 4067 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $509=(($508+8)|0); //@line 4067 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=$509; //@line 4067 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 92; break; //@line 4067 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 90: + __label__ = 91; break; //@line 4069 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 91: + var $512=___errno(); //@line 4071 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($512)>>2)]=12; //@line 4071 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=0; //@line 4072 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 92; break; //@line 4072 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 92: + var $514=$1; //@line 4073 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $514; //@line 4073 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_sys_alloc["X"]=1; + +function _free($mem) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $p; + var $psize; + var $next; + var $prevsize; + var $prev; + var $F; + var $B; + var $I; + var $TP; + var $XP; + var $R; + var $F1; + var $RP; + var $CP; + var $H; + var $C0; + var $C1; + var $tsize; + var $dsize; + var $nsize; + var $F2; + var $B3; + var $I4; + var $TP5; + var $XP6; + var $R7; + var $F8; + var $RP9; + var $CP10; + var $H11; + var $C012; + var $C113; + var $I14; + var $B15; + var $F16; + var $tp; + var $H17; + var $I18; + var $X; + var $Y; + var $N; + var $K; + var $T; + var $K19; + var $C; + var $F20; + $1=$mem; + var $2=$1; //@line 4740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $3=(($2)|0)!=0; //@line 4740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($3) { __label__ = 2; break; } else { __label__ = 196; break; } //@line 4740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $5=$1; //@line 4741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=(($5-8)|0); //@line 4741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=$6; //@line 4741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$7; //@line 4741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$p; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=$8; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=(($9)>>>0) >= (($10)>>>0); //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($11) { __label__ = 3; break; } else { var $19 = 0;__label__ = 4; break; } //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $13=$p; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=(($13+4)|0); //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=HEAP32[(($14)>>2)]; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=$15 & 3; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=(($16)|0)!=1; //@line 4753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19 = $17;__label__ = 4; break; + case 4: + var $19; + var $20=(($19)&1); + var $21=(($20)==(1)); + var $22=(($21)|0)!=0; + if ($22) { __label__ = 5; break; } else { __label__ = 193; break; } + case 5: + var $24=$p; //@line 4754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=(($24+4)|0); //@line 4754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=HEAP32[(($25)>>2)]; //@line 4754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$26 & -8; //@line 4754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$27; //@line 4754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$p; //@line 4755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=$28; //@line 4755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$psize; //@line 4755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=(($29+$30)|0); //@line 4755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=$31; //@line 4755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $next=$32; //@line 4755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$p; //@line 4756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=(($33+4)|0); //@line 4756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=HEAP32[(($34)>>2)]; //@line 4756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$35 & 1; //@line 4756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=(($36)|0)!=0; //@line 4756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($37) { __label__ = 77; break; } else { __label__ = 6; break; } //@line 4756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $39=$p; //@line 4757 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=(($39)|0); //@line 4757 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=HEAP32[(($40)>>2)]; //@line 4757 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $prevsize=$41; //@line 4757 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=$p; //@line 4758 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=(($42+4)|0); //@line 4758 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=HEAP32[(($43)>>2)]; //@line 4758 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$44 & 3; //@line 4758 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=(($45)|0)==0; //@line 4758 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($46) { __label__ = 7; break; } else { __label__ = 8; break; } //@line 4758 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $48=$prevsize; //@line 4759 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=(($48+16)|0); //@line 4759 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=$psize; //@line 4759 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=(($50+$49)|0); //@line 4759 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$51; //@line 4759 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 195; break; //@line 4762 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $53=$p; //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=$53; //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=$prevsize; //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=(((-$55))|0); //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($54+$56)|0); //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=$57; //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $prev=$58; //@line 4765 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=$prevsize; //@line 4766 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=$psize; //@line 4766 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=(($60+$59)|0); //@line 4766 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$61; //@line 4766 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $62=$prev; //@line 4767 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$62; //@line 4767 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=$prev; //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=$63; //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $66=(($64)>>>0) >= (($65)>>>0); //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $67=(($66)&1); //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=(($67)==(1)); //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68)|0)!=0; //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($69) { __label__ = 9; break; } else { __label__ = 74; break; } //@line 4768 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $71=$p; //@line 4769 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4769 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=(($71)|0)!=(($72)|0); //@line 4769 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($73) { __label__ = 10; break; } else { __label__ = 70; break; } //@line 4769 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $75=$prevsize; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=$75 >>> 3; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=(($76)>>>0) < 32; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($77) { __label__ = 11; break; } else { __label__ = 23; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $79=$p; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=(($79+8)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=HEAP32[(($80)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$81; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=$p; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=(($82+12)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=HEAP32[(($83)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B=$84; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $85=$prevsize; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $86=$85 >>> 3; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$86; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=$F; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=$B; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=(($87)|0)==(($88)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($89) { __label__ = 12; break; } else { __label__ = 13; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $91=$I; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=1 << $91; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $93=$92 ^ -1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $94=HEAP32[((((__gm_)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=$94 & $93; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_)|0))>>2)]=$95; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 22; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $97=$F; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=$I; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=$98 << 1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=((((__gm_+40)|0)+($99<<2))|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$100; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=$101; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=(($97)|0)==(($102)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($103) { __label__ = 15; break; } else { __label__ = 14; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $105=$F; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $106=$105; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=(($106)>>>0) >= (($107)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($108) { __label__ = 15; break; } else { var $125 = 0;__label__ = 18; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + var $110=$B; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $111=$I; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $112=$111 << 1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=((((__gm_+40)|0)+($112<<2))|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=$113; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=$114; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=(($110)|0)==(($115)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($116) { var $123 = 1;__label__ = 17; break; } else { __label__ = 16; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $118=$B; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $119=$118; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $120=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=(($119)>>>0) >= (($120)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $123 = $121;__label__ = 17; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $123; + var $125 = $123;__label__ = 18; break; + case 18: + var $125; + var $126=(($125)&1); + var $127=(($126)==(1)); + var $128=(($127)|0)!=0; + if ($128) { __label__ = 19; break; } else { __label__ = 20; break; } + case 19: + var $130=$B; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $131=$F; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $132=(($131+12)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($132)>>2)]=$130; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=$F; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=$B; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=(($134+8)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($135)>>2)]=$133; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 21; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + __label__ = 22; break; + case 22: + __label__ = 69; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $140=$p; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $141=$140; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $TP=$141; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $143=(($142+24)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144=HEAP32[(($143)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $XP=$144; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $146=(($145+12)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=HEAP32[(($146)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $148=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $149=(($147)|0)!=(($148)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($149) { __label__ = 24; break; } else { __label__ = 28; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + var $151=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=(($151+8)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=HEAP32[(($152)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F1=$153; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=(($154+12)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $156=HEAP32[(($155)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$156; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $157=$F1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $158=$157; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=(($158)>>>0) >= (($159)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=(($160)&1); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=(($161)==(1)); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $163=(($162)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($163) { __label__ = 25; break; } else { __label__ = 26; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $165=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $166=$F1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $167=(($166+12)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($167)>>2)]=$165; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $168=$F1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $170=(($169+8)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($170)>>2)]=$168; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 27; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 26: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + __label__ = 40; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 28: + var $174=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $175=(($174+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $176=(($175+4)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$176; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $177=HEAP32[(($176)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$177; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $178=(($177)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($178) { __label__ = 30; break; } else { __label__ = 29; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + var $180=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $181=(($180+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $182=(($181)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$182; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=HEAP32[(($182)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$183; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $184=(($183)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($184) { __label__ = 30; break; } else { __label__ = 39; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + __label__ = 31; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $187=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $188=(($187+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $189=(($188+4)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$189; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $190=HEAP32[(($189)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $191=(($190)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($191) { var $199 = 1;__label__ = 33; break; } else { __label__ = 32; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + var $193=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=(($193+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $195=(($194)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$195; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=HEAP32[(($195)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $197=(($196)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199 = $197;__label__ = 33; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + var $199; + if ($199) { __label__ = 34; break; } else { __label__ = 35; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 34: + var $201=$CP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$201; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $202=HEAP32[(($201)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$202; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 31; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + var $204=$RP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $205=$204; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $206=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=(($205)>>>0) >= (($206)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=(($207)&1); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $209=(($208)==(1)); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $210=(($209)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($210) { __label__ = 36; break; } else { __label__ = 37; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + var $212=$RP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($212)>>2)]=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 38; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + __label__ = 39; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + __label__ = 40; break; + case 40: + var $217=$XP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $218=(($217)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($218) { __label__ = 41; break; } else { __label__ = 68; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + var $220=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $221=(($220+28)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $222=HEAP32[(($221)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $223=((((__gm_+304)|0)+($222<<2))|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H=$223; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $224=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $225=$H; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $226=HEAP32[(($225)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=(($224)|0)==(($226)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($227) { __label__ = 42; break; } else { __label__ = 45; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 42: + var $229=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230=$H; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($230)>>2)]=$229; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $231=(($229)|0)==0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($231) { __label__ = 43; break; } else { __label__ = 44; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 43: + var $233=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $234=(($233+28)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $235=HEAP32[(($234)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $236=1 << $235; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=$236 ^ -1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $238=HEAP32[((((__gm_+4)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $239=$238 & $237; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+4)|0))>>2)]=$239; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 44; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + __label__ = 52; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + var $242=$XP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=$242; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $245=(($243)>>>0) >= (($244)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=(($245)&1); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=(($246)==(1)); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=(($247)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($248) { __label__ = 46; break; } else { __label__ = 50; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + var $250=$XP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $251=(($250+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $252=(($251)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $253=HEAP32[(($252)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $254=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $255=(($253)|0)==(($254)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($255) { __label__ = 47; break; } else { __label__ = 48; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + var $257=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $258=$XP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=(($258+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=(($259)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($260)>>2)]=$257; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 49; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 48: + var $262=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $263=$XP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $264=(($263+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $265=(($264+4)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($265)>>2)]=$262; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 49; break; + case 49: + __label__ = 51; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 51: + __label__ = 52; break; + case 52: + var $270=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $271=(($270)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($271) { __label__ = 53; break; } else { __label__ = 67; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + var $273=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $274=$273; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $275=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=(($274)>>>0) >= (($275)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $277=(($276)&1); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $278=(($277)==(1)); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=(($278)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($279) { __label__ = 54; break; } else { __label__ = 65; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 54: + var $281=$XP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $283=(($282+24)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($283)>>2)]=$281; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $284=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $285=(($284+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $286=(($285)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=HEAP32[(($286)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C0=$287; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=(($287)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($288) { __label__ = 55; break; } else { __label__ = 59; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 55: + var $290=$C0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $291=$290; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $292=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $293=(($291)>>>0) >= (($292)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $294=(($293)&1); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $295=(($294)==(1)); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $296=(($295)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($296) { __label__ = 56; break; } else { __label__ = 57; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 56: + var $298=$C0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $299=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $300=(($299+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $301=(($300)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($301)>>2)]=$298; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $302=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $303=$C0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $304=(($303+24)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($304)>>2)]=$302; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 58; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 57: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 58: + __label__ = 59; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 59: + var $308=$TP; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $309=(($308+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $310=(($309+4)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $311=HEAP32[(($310)>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C1=$311; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $312=(($311)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($312) { __label__ = 60; break; } else { __label__ = 64; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 60: + var $314=$C1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=$314; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=(($315)>>>0) >= (($316)>>>0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $318=(($317)&1); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $319=(($318)==(1)); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $320=(($319)|0)!=0; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($320) { __label__ = 61; break; } else { __label__ = 62; break; } //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 61: + var $322=$C1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=(($323+16)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=(($324+4)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($325)>>2)]=$322; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=$R; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $327=$C1; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $328=(($327+24)|0); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($328)>>2)]=$326; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 63; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 62: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 63: + __label__ = 64; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 64: + __label__ = 66; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 65: + _abort(); //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 66: + __label__ = 67; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 67: + __label__ = 68; break; //@line 4770 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 68: + __label__ = 69; break; + case 69: + __label__ = 73; break; //@line 4771 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 70: + var $338=$next; //@line 4772 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=(($338+4)|0); //@line 4772 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=HEAP32[(($339)>>2)]; //@line 4772 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=$340 & 3; //@line 4772 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=(($341)|0)==3; //@line 4772 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($342) { __label__ = 71; break; } else { __label__ = 72; break; } //@line 4772 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 71: + var $344=$psize; //@line 4773 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=$344; //@line 4773 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $345=$next; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=(($345+4)|0); //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=HEAP32[(($346)>>2)]; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348=$347 & -2; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($346)>>2)]=$348; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $349=$psize; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=$349 | 1; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=$p; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=(($351+4)|0); //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($352)>>2)]=$350; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $353=$psize; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $354=$p; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $355=$354; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $356=$psize; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $357=(($355+$356)|0); //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=$357; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=(($358)|0); //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($359)>>2)]=$353; //@line 4774 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 195; break; //@line 4775 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 72: + __label__ = 73; break; + case 73: + __label__ = 75; break; //@line 4777 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 74: + __label__ = 194; break; //@line 4779 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 75: + __label__ = 76; break; + case 76: + __label__ = 77; break; //@line 4781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 77: + var $366=$p; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=$366; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=$next; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=$368; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $370=(($367)>>>0) < (($369)>>>0); //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($370) { __label__ = 78; break; } else { var $378 = 0;__label__ = 79; break; } //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 78: + var $372=$next; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $373=(($372+4)|0); //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374=HEAP32[(($373)>>2)]; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $375=$374 & 1; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $376=(($375)|0)!=0; //@line 4783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $378 = $376;__label__ = 79; break; + case 79: + var $378; + var $379=(($378)&1); + var $380=(($379)==(1)); + var $381=(($380)|0)!=0; + if ($381) { __label__ = 80; break; } else { __label__ = 192; break; } + case 80: + var $383=$next; //@line 4784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $384=(($383+4)|0); //@line 4784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $385=HEAP32[(($384)>>2)]; //@line 4784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=$385 & 2; //@line 4784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=(($386)|0)!=0; //@line 4784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($387) { __label__ = 153; break; } else { __label__ = 81; break; } //@line 4784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 81: + var $389=$next; //@line 4785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $390=HEAP32[((((__gm_+24)|0))>>2)]; //@line 4785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $391=(($389)|0)==(($390)|0); //@line 4785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($391) { __label__ = 82; break; } else { __label__ = 87; break; } //@line 4785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 82: + var $393=$psize; //@line 4786 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $394=HEAP32[((((__gm_+12)|0))>>2)]; //@line 4786 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $395=(($394+$393)|0); //@line 4786 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+12)|0))>>2)]=$395; //@line 4786 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=$395; //@line 4786 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $396=$p; //@line 4787 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+24)|0))>>2)]=$396; //@line 4787 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $397=$tsize; //@line 4788 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $398=$397 | 1; //@line 4788 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $399=$p; //@line 4788 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $400=(($399+4)|0); //@line 4788 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($400)>>2)]=$398; //@line 4788 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $401=$p; //@line 4789 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $402=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4789 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $403=(($401)|0)==(($402)|0); //@line 4789 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($403) { __label__ = 83; break; } else { __label__ = 84; break; } //@line 4789 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 83: + HEAP32[((((__gm_+20)|0))>>2)]=0; //@line 4790 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=0; //@line 4791 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 84; break; //@line 4792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 84: + var $406=$tsize; //@line 4793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $407=HEAPU32[((((__gm_+28)|0))>>2)]; //@line 4793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $408=(($406)>>>0) > (($407)>>>0); //@line 4793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($408) { __label__ = 85; break; } else { __label__ = 86; break; } //@line 4793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 85: + var $410=_sys_trim(__gm_, 0); //@line 4794 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 86; break; //@line 4794 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 86: + __label__ = 195; break; //@line 4795 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 87: + var $413=$next; //@line 4797 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $414=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4797 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $415=(($413)|0)==(($414)|0); //@line 4797 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($415) { __label__ = 88; break; } else { __label__ = 89; break; } //@line 4797 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 88: + var $417=$psize; //@line 4798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $418=HEAP32[((((__gm_+8)|0))>>2)]; //@line 4798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $419=(($418+$417)|0); //@line 4798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=$419; //@line 4798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $dsize=$419; //@line 4798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $420=$p; //@line 4799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+20)|0))>>2)]=$420; //@line 4799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $421=$dsize; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $422=$421 | 1; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $423=$p; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $424=(($423+4)|0); //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($424)>>2)]=$422; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $425=$dsize; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $426=$p; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $427=$426; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $428=$dsize; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $429=(($427+$428)|0); //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $430=$429; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $431=(($430)|0); //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($431)>>2)]=$425; //@line 4800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 195; break; //@line 4801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 89: + var $433=$next; //@line 4804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $434=(($433+4)|0); //@line 4804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $435=HEAP32[(($434)>>2)]; //@line 4804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $436=$435 & -8; //@line 4804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nsize=$436; //@line 4804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $437=$nsize; //@line 4805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $438=$psize; //@line 4805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $439=(($438+$437)|0); //@line 4805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$439; //@line 4805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $440=$nsize; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $441=$440 >>> 3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $442=(($441)>>>0) < 32; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($442) { __label__ = 90; break; } else { __label__ = 102; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 90: + var $444=$next; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $445=(($444+8)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $446=HEAP32[(($445)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F2=$446; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $447=$next; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $448=(($447+12)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $449=HEAP32[(($448)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B3=$449; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $450=$nsize; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $451=$450 >>> 3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I4=$451; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $452=$F2; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $453=$B3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $454=(($452)|0)==(($453)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($454) { __label__ = 91; break; } else { __label__ = 92; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 91: + var $456=$I4; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $457=1 << $456; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $458=$457 ^ -1; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $459=HEAP32[((((__gm_)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $460=$459 & $458; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_)|0))>>2)]=$460; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 101; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 92: + var $462=$F2; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $463=$I4; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $464=$463 << 1; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $465=((((__gm_+40)|0)+($464<<2))|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $466=$465; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $467=$466; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $468=(($462)|0)==(($467)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($468) { __label__ = 94; break; } else { __label__ = 93; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 93: + var $470=$F2; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $471=$470; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $472=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $473=(($471)>>>0) >= (($472)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($473) { __label__ = 94; break; } else { var $490 = 0;__label__ = 97; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 94: + var $475=$B3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $476=$I4; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $477=$476 << 1; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $478=((((__gm_+40)|0)+($477<<2))|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $479=$478; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $480=$479; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $481=(($475)|0)==(($480)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($481) { var $488 = 1;__label__ = 96; break; } else { __label__ = 95; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 95: + var $483=$B3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $484=$483; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $485=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $486=(($484)>>>0) >= (($485)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $488 = $486;__label__ = 96; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 96: + var $488; + var $490 = $488;__label__ = 97; break; + case 97: + var $490; + var $491=(($490)&1); + var $492=(($491)==(1)); + var $493=(($492)|0)!=0; + if ($493) { __label__ = 98; break; } else { __label__ = 99; break; } + case 98: + var $495=$B3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $496=$F2; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $497=(($496+12)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($497)>>2)]=$495; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $498=$F2; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $499=$B3; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $500=(($499+8)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($500)>>2)]=$498; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 100; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 99: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 100: + __label__ = 101; break; + case 101: + __label__ = 148; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 102: + var $505=$next; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $506=$505; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $TP5=$506; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $507=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $508=(($507+24)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $509=HEAP32[(($508)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $XP6=$509; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $510=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $511=(($510+12)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $512=HEAP32[(($511)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $513=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $514=(($512)|0)!=(($513)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($514) { __label__ = 103; break; } else { __label__ = 107; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 103: + var $516=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $517=(($516+8)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $518=HEAP32[(($517)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F8=$518; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $519=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $520=(($519+12)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $521=HEAP32[(($520)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R7=$521; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $522=$F8; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $523=$522; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $524=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $525=(($523)>>>0) >= (($524)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $526=(($525)&1); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $527=(($526)==(1)); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $528=(($527)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($528) { __label__ = 104; break; } else { __label__ = 105; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 104: + var $530=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $531=$F8; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $532=(($531+12)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($532)>>2)]=$530; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $533=$F8; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $534=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $535=(($534+8)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($535)>>2)]=$533; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 106; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 105: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 106: + __label__ = 119; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 107: + var $539=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $540=(($539+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $541=(($540+4)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP9=$541; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $542=HEAP32[(($541)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R7=$542; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $543=(($542)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($543) { __label__ = 109; break; } else { __label__ = 108; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 108: + var $545=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $546=(($545+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $547=(($546)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP9=$547; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $548=HEAP32[(($547)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R7=$548; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $549=(($548)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($549) { __label__ = 109; break; } else { __label__ = 118; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 109: + __label__ = 110; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 110: + var $552=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $553=(($552+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $554=(($553+4)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP10=$554; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $555=HEAP32[(($554)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $556=(($555)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($556) { var $564 = 1;__label__ = 112; break; } else { __label__ = 111; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 111: + var $558=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $559=(($558+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $560=(($559)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP10=$560; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $561=HEAP32[(($560)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $562=(($561)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $564 = $562;__label__ = 112; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 112: + var $564; + if ($564) { __label__ = 113; break; } else { __label__ = 114; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 113: + var $566=$CP10; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP9=$566; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $567=HEAP32[(($566)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R7=$567; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 110; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 114: + var $569=$RP9; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $570=$569; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $571=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $572=(($570)>>>0) >= (($571)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $573=(($572)&1); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $574=(($573)==(1)); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $575=(($574)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($575) { __label__ = 115; break; } else { __label__ = 116; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 115: + var $577=$RP9; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($577)>>2)]=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 117; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 116: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 117: + __label__ = 118; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 118: + __label__ = 119; break; + case 119: + var $582=$XP6; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $583=(($582)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($583) { __label__ = 120; break; } else { __label__ = 147; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 120: + var $585=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $586=(($585+28)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $587=HEAP32[(($586)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $588=((((__gm_+304)|0)+($587<<2))|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H11=$588; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $589=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $590=$H11; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $591=HEAP32[(($590)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $592=(($589)|0)==(($591)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($592) { __label__ = 121; break; } else { __label__ = 124; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 121: + var $594=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $595=$H11; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($595)>>2)]=$594; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $596=(($594)|0)==0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($596) { __label__ = 122; break; } else { __label__ = 123; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 122: + var $598=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $599=(($598+28)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $600=HEAP32[(($599)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $601=1 << $600; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $602=$601 ^ -1; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $603=HEAP32[((((__gm_+4)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $604=$603 & $602; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+4)|0))>>2)]=$604; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 123; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 123: + __label__ = 131; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 124: + var $607=$XP6; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $608=$607; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $609=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $610=(($608)>>>0) >= (($609)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $611=(($610)&1); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $612=(($611)==(1)); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $613=(($612)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($613) { __label__ = 125; break; } else { __label__ = 129; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 125: + var $615=$XP6; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $616=(($615+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $617=(($616)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $618=HEAP32[(($617)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $619=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $620=(($618)|0)==(($619)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($620) { __label__ = 126; break; } else { __label__ = 127; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 126: + var $622=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $623=$XP6; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $624=(($623+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $625=(($624)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($625)>>2)]=$622; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 128; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 127: + var $627=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $628=$XP6; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $629=(($628+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $630=(($629+4)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($630)>>2)]=$627; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 128; break; + case 128: + __label__ = 130; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 129: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 130: + __label__ = 131; break; + case 131: + var $635=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $636=(($635)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($636) { __label__ = 132; break; } else { __label__ = 146; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 132: + var $638=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $639=$638; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $640=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $641=(($639)>>>0) >= (($640)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $642=(($641)&1); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $643=(($642)==(1)); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $644=(($643)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($644) { __label__ = 133; break; } else { __label__ = 144; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 133: + var $646=$XP6; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $647=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $648=(($647+24)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($648)>>2)]=$646; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $649=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $650=(($649+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $651=(($650)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $652=HEAP32[(($651)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C012=$652; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $653=(($652)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($653) { __label__ = 134; break; } else { __label__ = 138; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 134: + var $655=$C012; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $656=$655; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $657=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $658=(($656)>>>0) >= (($657)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $659=(($658)&1); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $660=(($659)==(1)); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $661=(($660)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($661) { __label__ = 135; break; } else { __label__ = 136; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 135: + var $663=$C012; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $664=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $665=(($664+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $666=(($665)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($666)>>2)]=$663; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $667=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $668=$C012; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $669=(($668+24)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($669)>>2)]=$667; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 137; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 136: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 137: + __label__ = 138; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 138: + var $673=$TP5; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $674=(($673+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $675=(($674+4)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $676=HEAP32[(($675)>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C113=$676; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $677=(($676)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($677) { __label__ = 139; break; } else { __label__ = 143; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 139: + var $679=$C113; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $680=$679; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $681=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $682=(($680)>>>0) >= (($681)>>>0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $683=(($682)&1); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $684=(($683)==(1)); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $685=(($684)|0)!=0; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($685) { __label__ = 140; break; } else { __label__ = 141; break; } //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 140: + var $687=$C113; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $688=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $689=(($688+16)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $690=(($689+4)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($690)>>2)]=$687; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $691=$R7; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $692=$C113; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $693=(($692+24)|0); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($693)>>2)]=$691; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 142; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 141: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 142: + __label__ = 143; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 143: + __label__ = 145; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 144: + _abort(); //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 145: + __label__ = 146; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 146: + __label__ = 147; break; //@line 4806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 147: + __label__ = 148; break; + case 148: + var $702=$psize; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $703=$702 | 1; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $704=$p; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $705=(($704+4)|0); //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($705)>>2)]=$703; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $706=$psize; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $707=$p; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $708=$707; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $709=$psize; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $710=(($708+$709)|0); //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $711=$710; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $712=(($711)|0); //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($712)>>2)]=$706; //@line 4807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $713=$p; //@line 4808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $714=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $715=(($713)|0)==(($714)|0); //@line 4808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($715) { __label__ = 149; break; } else { __label__ = 150; break; } //@line 4808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 149: + var $717=$psize; //@line 4809 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+8)|0))>>2)]=$717; //@line 4809 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 195; break; //@line 4810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 150: + __label__ = 151; break; + case 151: + __label__ = 152; break; + case 152: + __label__ = 154; break; //@line 4813 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 153: + var $722=$next; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $723=(($722+4)|0); //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $724=HEAP32[(($723)>>2)]; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $725=$724 & -2; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($723)>>2)]=$725; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $726=$psize; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $727=$726 | 1; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $728=$p; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $729=(($728+4)|0); //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($729)>>2)]=$727; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $730=$psize; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $731=$p; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $732=$731; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $733=$psize; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $734=(($732+$733)|0); //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $735=$734; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $736=(($735)|0); //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($736)>>2)]=$730; //@line 4815 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 154; break; + case 154: + var $738=$psize; //@line 4817 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $739=$738 >>> 3; //@line 4817 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $740=(($739)>>>0) < 32; //@line 4817 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($740) { __label__ = 155; break; } else { __label__ = 162; break; } //@line 4817 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 155: + var $742=$psize; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $743=$742 >>> 3; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I14=$743; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $744=$I14; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $745=$744 << 1; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $746=((((__gm_+40)|0)+($745<<2))|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $747=$746; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $748=$747; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B15=$748; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $749=$B15; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F16=$749; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $750=HEAP32[((((__gm_)|0))>>2)]; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $751=$I14; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $752=1 << $751; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $753=$750 & $752; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $754=(($753)|0)!=0; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($754) { __label__ = 157; break; } else { __label__ = 156; break; } //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 156: + var $756=$I14; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $757=1 << $756; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $758=HEAP32[((((__gm_)|0))>>2)]; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $759=$758 | $757; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_)|0))>>2)]=$759; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 161; break; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 157: + var $761=$B15; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $762=(($761+8)|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $763=HEAP32[(($762)>>2)]; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $764=$763; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $765=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $766=(($764)>>>0) >= (($765)>>>0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $767=(($766)&1); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $768=(($767)==(1)); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $769=(($768)|0)!=0; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($769) { __label__ = 158; break; } else { __label__ = 159; break; } //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 158: + var $771=$B15; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $772=(($771+8)|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $773=HEAP32[(($772)>>2)]; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F16=$773; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 160; break; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 159: + _abort(); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 160: + __label__ = 161; break; + case 161: + var $777=$p; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $778=$B15; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $779=(($778+8)|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($779)>>2)]=$777; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $780=$p; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $781=$F16; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $782=(($781+12)|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($782)>>2)]=$780; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $783=$F16; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $784=$p; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $785=(($784+8)|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($785)>>2)]=$783; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $786=$B15; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $787=$p; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $788=(($787+12)|0); //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($788)>>2)]=$786; //@line 4818 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 191; break; //@line 4820 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 162: + var $790=$p; //@line 4822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $791=$790; //@line 4822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tp=$791; //@line 4822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $792=$psize; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $793=$792 >>> 8; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $X=$793; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $794=$X; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $795=(($794)|0)==0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($795) { __label__ = 163; break; } else { __label__ = 164; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 163: + $I18=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 168; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 164: + var $798=$X; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $799=(($798)>>>0) > 65535; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($799) { __label__ = 165; break; } else { __label__ = 166; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 165: + $I18=31; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 167; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 166: + var $802=$X; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$802; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $803=$Y; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $804=(($803-256)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $805=$804 >>> 16; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $806=$805 & 8; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$806; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $807=$N; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $808=$Y; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $809=$808 << $807; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$809; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $810=(($809-4096)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $811=$810 >>> 16; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $812=$811 & 4; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$812; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $813=$K; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $814=$N; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $815=(($814+$813)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$815; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $816=$K; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $817=$Y; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $818=$817 << $816; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$818; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $819=(($818-16384)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $820=$819 >>> 16; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $821=$820 & 2; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$821; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $822=$N; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $823=(($822+$821)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$823; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $824=$N; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $825=((14-$824)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $826=$K; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $827=$Y; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $828=$827 << $826; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$828; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $829=$828 >>> 15; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $830=(($825+$829)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$830; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $831=$K; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $832=$831 << 1; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $833=$psize; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $834=$K; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $835=(($834+7)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $836=$833 >>> (($835)>>>0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $837=$836 & 1; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $838=(($832+$837)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I18=$838; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 167; break; + case 167: + __label__ = 168; break; + case 168: + var $841=$I18; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $842=((((__gm_+304)|0)+($841<<2))|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H17=$842; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $843=$I18; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $844=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $845=(($844+28)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($845)>>2)]=$843; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $846=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $847=(($846+16)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $848=(($847+4)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($848)>>2)]=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $849=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $850=(($849+16)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $851=(($850)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($851)>>2)]=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $852=HEAP32[((((__gm_+4)|0))>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $853=$I18; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $854=1 << $853; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $855=$852 & $854; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $856=(($855)|0)!=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($856) { __label__ = 170; break; } else { __label__ = 169; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 169: + var $858=$I18; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $859=1 << $858; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $860=HEAP32[((((__gm_+4)|0))>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $861=$860 | $859; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+4)|0))>>2)]=$861; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $862=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $863=$H17; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($863)>>2)]=$862; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $864=$H17; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $865=$864; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $866=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $867=(($866+24)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($867)>>2)]=$865; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $868=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $869=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $870=(($869+12)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($870)>>2)]=$868; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $871=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $872=(($871+8)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($872)>>2)]=$868; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 188; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 170: + var $874=$H17; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $875=HEAP32[(($874)>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$875; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $876=$psize; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $877=$I18; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $878=(($877)|0)==31; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($878) { __label__ = 171; break; } else { __label__ = 172; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 171: + var $887 = 0;__label__ = 173; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 172: + var $881=$I18; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $882=$881 >>> 1; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $883=(($882+8)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $884=(($883-2)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $885=((31-$884)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $887 = $885;__label__ = 173; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 173: + var $887; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $888=$876 << $887; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K19=$888; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 174; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 174: + var $890=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $891=(($890+4)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $892=HEAP32[(($891)>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $893=$892 & -8; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $894=$psize; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $895=(($893)|0)!=(($894)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($895) { __label__ = 175; break; } else { __label__ = 181; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 175: + var $897=$K19; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $898=$897 >>> 31; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $899=$898 & 1; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $900=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $901=(($900+16)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $902=(($901+($899<<2))|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C=$902; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $903=$K19; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $904=$903 << 1; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K19=$904; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $905=$C; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $906=HEAP32[(($905)>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $907=(($906)|0)!=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($907) { __label__ = 176; break; } else { __label__ = 177; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 176: + var $909=$C; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $910=HEAP32[(($909)>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$910; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 180; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 177: + var $912=$C; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $913=$912; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $914=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $915=(($913)>>>0) >= (($914)>>>0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $916=(($915)&1); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $917=(($916)==(1)); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $918=(($917)|0)!=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($918) { __label__ = 178; break; } else { __label__ = 179; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 178: + var $920=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $921=$C; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($921)>>2)]=$920; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $922=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $923=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $924=(($923+24)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($924)>>2)]=$922; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $925=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $926=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $927=(($926+12)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($927)>>2)]=$925; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $928=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $929=(($928+8)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($929)>>2)]=$925; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 187; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 179: + _abort(); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 180: + __label__ = 186; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 181: + var $933=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $934=(($933+8)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $935=HEAP32[(($934)>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F20=$935; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $936=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $937=$936; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $938=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $939=(($937)>>>0) >= (($938)>>>0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($939) { __label__ = 182; break; } else { var $946 = 0;__label__ = 183; break; } //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 182: + var $941=$F20; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $942=$941; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $943=HEAPU32[((((__gm_+16)|0))>>2)]; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $944=(($942)>>>0) >= (($943)>>>0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $946 = $944;__label__ = 183; break; + case 183: + var $946; + var $947=(($946)&1); + var $948=(($947)==(1)); + var $949=(($948)|0)!=0; + if ($949) { __label__ = 184; break; } else { __label__ = 185; break; } + case 184: + var $951=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $952=$F20; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $953=(($952+12)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($953)>>2)]=$951; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $954=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $955=(($954+8)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($955)>>2)]=$951; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $956=$F20; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $957=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $958=(($957+8)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($958)>>2)]=$956; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $959=$T; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $960=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $961=(($960+12)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($961)>>2)]=$959; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $962=$tp; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $963=(($962+24)|0); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($963)>>2)]=0; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 187; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 185: + _abort(); //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 186: + __label__ = 174; break; //@line 4823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 187: + __label__ = 188; break; + case 188: + var $968=HEAP32[((((__gm_+32)|0))>>2)]; //@line 4825 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $969=(($968-1)|0); //@line 4825 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+32)|0))>>2)]=$969; //@line 4825 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $970=(($969)|0)==0; //@line 4825 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($970) { __label__ = 189; break; } else { __label__ = 190; break; } //@line 4825 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 189: + var $972=_release_unused_segments(__gm_); //@line 4826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 190; break; //@line 4826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 190: + __label__ = 191; break; + case 191: + __label__ = 195; break; //@line 4828 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 192: + __label__ = 193; break; //@line 4830 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 193: + __label__ = 194; break; //@line 4830 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 194: + _abort(); //@line 4832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 195: + __label__ = 196; break; //@line 4836 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 196: + ; + return; //@line 4840 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +Module["_free"] = _free;_free["X"]=1; + +function _sys_trim($m, $pad) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $released; + var $unit; + var $extra; + var $sp; + var $old_br; + var $rel_br; + var $new_br; + $1=$m; + $2=$pad; + $released=0; //@line 4126 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $3=HEAP32[((((_mparams)|0))>>2)]; //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $4=(($3)|0)!=0; //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($4) { var $9 = 1;__label__ = 3; break; } else { __label__ = 2; break; } //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $6=_init_mparams(); //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=(($6)|0)!=0; //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9 = $7;__label__ = 3; break; //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $9; + var $10=(($9)&1); //@line 4127 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=$2; //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=(($11)>>>0) < 4294967232; //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($12) { __label__ = 4; break; } else { __label__ = 25; break; } //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $14=$1; //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=(($14+24)|0); //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=HEAP32[(($15)>>2)]; //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=(($16)|0)!=0; //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($17) { __label__ = 5; break; } else { __label__ = 25; break; } //@line 4128 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $19=$2; //@line 4129 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=(($19+40)|0); //@line 4129 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $2=$20; //@line 4129 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=$1; //@line 4131 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=(($21+12)|0); //@line 4131 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=HEAPU32[(($22)>>2)]; //@line 4131 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=$2; //@line 4131 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=(($23)>>>0) > (($24)>>>0); //@line 4131 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($25) { __label__ = 6; break; } else { __label__ = 21; break; } //@line 4131 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $27=HEAP32[((((_mparams+8)|0))>>2)]; //@line 4133 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $unit=$27; //@line 4133 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$1; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=(($28+12)|0); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=HEAP32[(($29)>>2)]; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=$2; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=(($30-$31)|0); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$unit; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=(($33-1)|0); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=(($32+$34)|0); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$unit; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=Math.floor((($35)>>>0)/(($36)>>>0)); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=(($37-1)|0); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=$unit; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=(($38*$39)|0); //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $extra=$40; //@line 4135 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$1; //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=$1; //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=(($42+24)|0); //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=HEAP32[(($43)>>2)]; //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$44; //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=_segment_holding($41, $45); //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$46; //@line 4136 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=$sp; //@line 4138 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $48=(($47+12)|0); //@line 4138 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=HEAP32[(($48)>>2)]; //@line 4138 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=$49 & 8; //@line 4138 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=(($50)|0)!=0; //@line 4138 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($51) { __label__ = 18; break; } else { __label__ = 7; break; } //@line 4138 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $53=$sp; //@line 4139 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=(($53+12)|0); //@line 4139 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=HEAP32[(($54)>>2)]; //@line 4139 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$55 & 0; //@line 4139 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($56)|0)!=0; //@line 4139 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($57) { __label__ = 8; break; } else { __label__ = 9; break; } //@line 4139 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + __label__ = 17; break; //@line 4150 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $60=$extra; //@line 4152 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=(($60)>>>0) >= 2147483647; //@line 4152 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($61) { __label__ = 10; break; } else { __label__ = 11; break; } //@line 4152 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $63=$unit; //@line 4153 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=((-2147483648-$63)|0); //@line 4153 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $extra=$64; //@line 4153 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 11; break; //@line 4153 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $66=_sbrk(0); //@line 4157 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $old_br=$66; //@line 4157 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $67=$old_br; //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=$sp; //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68)|0); //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=HEAP32[(($69)>>2)]; //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=$sp; //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=(($71+4)|0); //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=HEAP32[(($72)>>2)]; //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=(($70+$73)|0); //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=(($67)|0)==(($74)|0); //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($75) { __label__ = 12; break; } else { __label__ = 16; break; } //@line 4158 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $77=$extra; //@line 4159 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $78=(((-$77))|0); //@line 4159 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $79=_sbrk($78); //@line 4159 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rel_br=$79; //@line 4159 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=_sbrk(0); //@line 4160 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $new_br=$80; //@line 4160 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=$rel_br; //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=(($81)|0)!=-1; //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($82) { __label__ = 13; break; } else { __label__ = 15; break; } //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $84=$new_br; //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $85=$old_br; //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $86=(($84)>>>0) < (($85)>>>0); //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($86) { __label__ = 14; break; } else { __label__ = 15; break; } //@line 4161 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $88=$old_br; //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=$new_br; //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=$88; //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=$89; //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=(($90-$91)|0); //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $released=$92; //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 15; break; //@line 4162 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + __label__ = 16; break; //@line 4163 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + __label__ = 17; break; + case 17: + __label__ = 18; break; //@line 4167 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + var $97=$released; //@line 4169 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=(($97)|0)!=0; //@line 4169 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($98) { __label__ = 19; break; } else { __label__ = 20; break; } //@line 4169 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + var $100=$released; //@line 4170 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$sp; //@line 4170 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=(($101+4)|0); //@line 4170 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=HEAP32[(($102)>>2)]; //@line 4170 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=(($103-$100)|0); //@line 4170 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($102)>>2)]=$104; //@line 4170 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $105=$released; //@line 4171 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $106=$1; //@line 4171 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=(($106+432)|0); //@line 4171 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=HEAP32[(($107)>>2)]; //@line 4171 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $109=(($108-$105)|0); //@line 4171 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($107)>>2)]=$109; //@line 4171 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $110=$1; //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $111=$1; //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $112=(($111+24)|0); //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=HEAP32[(($112)>>2)]; //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=$1; //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=(($114+12)|0); //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=HEAP32[(($115)>>2)]; //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $117=$released; //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $118=(($116-$117)|0); //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _init_top($110, $113, $118); //@line 4172 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 20; break; //@line 4174 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + __label__ = 21; break; //@line 4175 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + var $121=$released; //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=(($121)|0)==0; //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($122) { __label__ = 22; break; } else { __label__ = 24; break; } //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + var $124=$1; //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=(($124+12)|0); //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=HEAPU32[(($125)>>2)]; //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=$1; //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=(($127+28)|0); //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=HEAPU32[(($128)>>2)]; //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=(($126)>>>0) > (($129)>>>0); //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($130) { __label__ = 23; break; } else { __label__ = 24; break; } //@line 4182 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $132=$1; //@line 4183 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=(($132+28)|0); //@line 4183 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($133)>>2)]=-1; //@line 4183 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 24; break; //@line 4183 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + __label__ = 25; break; //@line 4184 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $136=$released; //@line 4186 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $137=(($136)|0)!=0; //@line 4186 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $138=$137 ? 1 : 0; //@line 4186 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $138; //@line 4186 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_sys_trim["X"]=1; + +function _segment_holding($m, $addr) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $sp; + $2=$m; + $3=$addr; + var $4=$2; //@line 2562 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=(($4+444)|0); //@line 2562 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$5; //@line 2562 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 2; break; //@line 2563 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $7=$3; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$sp; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(($8)|0); //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=HEAPU32[(($9)>>2)]; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=(($7)>>>0) >= (($10)>>>0); //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($11) { __label__ = 3; break; } else { __label__ = 5; break; } //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $13=$3; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=$sp; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=(($14)|0); //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=HEAP32[(($15)>>2)]; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=$sp; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=(($17+4)|0); //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=HEAP32[(($18)>>2)]; //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=(($16+$19)|0); //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=(($13)>>>0) < (($20)>>>0); //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($21) { __label__ = 4; break; } else { __label__ = 5; break; } //@line 2564 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $23=$sp; //@line 2565 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=$23; //@line 2565 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 8; break; //@line 2565 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $25=$sp; //@line 2566 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=(($25+8)|0); //@line 2566 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=HEAP32[(($26)>>2)]; //@line 2566 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$27; //@line 2566 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=(($27)|0)==0; //@line 2566 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($28) { __label__ = 6; break; } else { __label__ = 7; break; } //@line 2566 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + $1=0; //@line 2567 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 8; break; //@line 2567 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + __label__ = 2; break; //@line 2568 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $32=$1; //@line 2569 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $32; //@line 2569 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} + + +function _release_unused_segments($m) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $released; + var $nsegs; + var $pred; + var $sp; + var $base; + var $size; + var $next; + var $p; + var $psize; + var $tp; + var $XP; + var $R; + var $F; + var $RP; + var $CP; + var $H; + var $C0; + var $C1; + var $H1; + var $I; + var $X; + var $Y; + var $N; + var $K; + var $T; + var $K2; + var $C; + var $F3; + $1=$m; + $released=0; //@line 4079 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nsegs=0; //@line 4080 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $2=$1; //@line 4081 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $3=(($2+444)|0); //@line 4081 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $pred=$3; //@line 4081 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $4=$pred; //@line 4082 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=(($4+8)|0); //@line 4082 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=HEAP32[(($5)>>2)]; //@line 4082 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$6; //@line 4082 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 2; break; //@line 4083 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $8=$sp; //@line 4083 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(($8)|0)!=0; //@line 4083 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($9) { __label__ = 3; break; } else { __label__ = 87; break; } //@line 4083 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $11=$sp; //@line 4084 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=(($11)|0); //@line 4084 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=HEAP32[(($12)>>2)]; //@line 4084 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $base=$13; //@line 4084 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=$sp; //@line 4085 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=(($14+4)|0); //@line 4085 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=HEAP32[(($15)>>2)]; //@line 4085 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $size=$16; //@line 4085 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=$sp; //@line 4086 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=(($17+8)|0); //@line 4086 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=HEAP32[(($18)>>2)]; //@line 4086 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $next=$19; //@line 4086 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=$nsegs; //@line 4087 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=(($20+1)|0); //@line 4087 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nsegs=$21; //@line 4087 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=$sp; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=(($22+12)|0); //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=HEAP32[(($23)>>2)]; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$24 & 0; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=(($25)|0)!=0; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($26) { __label__ = 4; break; } else { __label__ = 86; break; } //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $28=$sp; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=(($28+12)|0); //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=HEAP32[(($29)>>2)]; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=$30 & 8; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=(($31)|0)!=0; //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($32) { __label__ = 86; break; } else { __label__ = 5; break; } //@line 4088 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $34=$base; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=$base; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=(($35+8)|0); //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=$36; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=$37 & 7; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=(($38)|0)==0; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($39) { __label__ = 6; break; } else { __label__ = 7; break; } //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $49 = 0;__label__ = 8; break; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $42=$base; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=(($42+8)|0); //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=$43; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$44 & 7; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=((8-$45)|0); //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=$46 & 7; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49 = $47;__label__ = 8; break; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $49; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=(($34+$49)|0); //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=$50; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$51; //@line 4089 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=$p; //@line 4090 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=(($52+4)|0); //@line 4090 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=HEAP32[(($53)>>2)]; //@line 4090 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=$54 & -8; //@line 4090 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$55; //@line 4090 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$p; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($56+4)|0); //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=HEAP32[(($57)>>2)]; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=$58 & 3; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=(($59)|0)!=1; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($60) { __label__ = 85; break; } else { __label__ = 9; break; } //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $62=$p; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=$62; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=$psize; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=(($63+$64)|0); //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $66=$base; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $67=$size; //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=(($66+$67)|0); //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68-40)|0); //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=(($65)>>>0) >= (($69)>>>0); //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($70) { __label__ = 10; break; } else { __label__ = 85; break; } //@line 4092 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $72=$p; //@line 4093 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=$72; //@line 4093 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tp=$73; //@line 4093 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=$p; //@line 4095 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=$1; //@line 4095 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=(($75+20)|0); //@line 4095 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=HEAP32[(($76)>>2)]; //@line 4095 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $78=(($74)|0)==(($77)|0); //@line 4095 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($78) { __label__ = 11; break; } else { __label__ = 12; break; } //@line 4095 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $80=$1; //@line 4096 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=(($80+20)|0); //@line 4096 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($81)>>2)]=0; //@line 4096 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=$1; //@line 4097 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=(($82+8)|0); //@line 4097 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($83)>>2)]=0; //@line 4097 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 58; break; //@line 4098 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $85=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $86=(($85+24)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=HEAP32[(($86)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $XP=$87; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=(($88+12)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=HEAP32[(($89)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=(($90)|0)!=(($91)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($92) { __label__ = 13; break; } else { __label__ = 17; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $94=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=(($94+8)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $96=HEAP32[(($95)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$96; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $97=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=(($97+12)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=HEAP32[(($98)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$99; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=$F; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$100; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=(($102+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=HEAPU32[(($103)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $105=(($101)>>>0) >= (($104)>>>0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $106=(($105)&1); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=(($106)==(1)); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=(($107)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($108) { __label__ = 14; break; } else { __label__ = 15; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $110=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $111=$F; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $112=(($111+12)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($112)>>2)]=$110; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=$F; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=(($114+8)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($115)>>2)]=$113; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 16; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + _abort(); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + __label__ = 29; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $119=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $120=(($119+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=(($120+4)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$121; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=HEAP32[(($121)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$122; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $123=(($122)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($123) { __label__ = 19; break; } else { __label__ = 18; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + var $125=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=(($125+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=(($126)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$127; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=HEAP32[(($127)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$128; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=(($128)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($129) { __label__ = 19; break; } else { __label__ = 28; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + __label__ = 20; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 20: + var $132=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=(($132+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=(($133+4)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$134; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=HEAP32[(($134)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $136=(($135)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($136) { var $144 = 1;__label__ = 22; break; } else { __label__ = 21; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + var $138=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $139=(($138+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $140=(($139)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$140; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $141=HEAP32[(($140)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=(($141)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144 = $142;__label__ = 22; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + var $144; + if ($144) { __label__ = 23; break; } else { __label__ = 24; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $146=$CP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$146; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=HEAP32[(($146)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$147; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 20; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + var $149=$RP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $150=$149; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $151=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=(($151+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=HEAPU32[(($152)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=(($150)>>>0) >= (($153)>>>0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=(($154)&1); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $156=(($155)==(1)); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $157=(($156)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($157) { __label__ = 25; break; } else { __label__ = 26; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $159=$RP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($159)>>2)]=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 27; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 26: + _abort(); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + __label__ = 28; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 28: + __label__ = 29; break; + case 29: + var $164=$XP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $165=(($164)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($165) { __label__ = 30; break; } else { __label__ = 57; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $167=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $168=(($167+28)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=HEAP32[(($168)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $170=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $171=(($170+304)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=(($171+($169<<2))|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H=$172; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $173=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $174=$H; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $175=HEAP32[(($174)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $176=(($173)|0)==(($175)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($176) { __label__ = 31; break; } else { __label__ = 34; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $178=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $179=$H; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($179)>>2)]=$178; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $180=(($178)|0)==0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($180) { __label__ = 32; break; } else { __label__ = 33; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + var $182=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=(($182+28)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $184=HEAP32[(($183)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $185=1 << $184; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $186=$185 ^ -1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $187=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $188=(($187+4)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $189=HEAP32[(($188)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $190=$189 & $186; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($188)>>2)]=$190; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 33; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + __label__ = 41; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 34: + var $193=$XP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=$193; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $195=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=(($195+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $197=HEAPU32[(($196)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $198=(($194)>>>0) >= (($197)>>>0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199=(($198)&1); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $200=(($199)==(1)); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $201=(($200)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($201) { __label__ = 35; break; } else { __label__ = 39; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + var $203=$XP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=(($203+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $205=(($204)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $206=HEAP32[(($205)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=(($206)|0)==(($207)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($208) { __label__ = 36; break; } else { __label__ = 37; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + var $210=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $211=$XP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $212=(($211+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $213=(($212)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($213)>>2)]=$210; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 38; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + var $215=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $216=$XP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $217=(($216+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $218=(($217+4)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($218)>>2)]=$215; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 38; break; + case 38: + __label__ = 40; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + _abort(); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 40: + __label__ = 41; break; + case 41: + var $223=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $224=(($223)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($224) { __label__ = 42; break; } else { __label__ = 56; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 42: + var $226=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=$226; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $229=(($228+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230=HEAPU32[(($229)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $231=(($227)>>>0) >= (($230)>>>0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $232=(($231)&1); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $233=(($232)==(1)); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $234=(($233)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($234) { __label__ = 43; break; } else { __label__ = 54; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 43: + var $236=$XP; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $238=(($237+24)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($238)>>2)]=$236; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $239=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $240=(($239+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $241=(($240)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $242=HEAP32[(($241)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C0=$242; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=(($242)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($243) { __label__ = 44; break; } else { __label__ = 48; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + var $245=$C0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=$245; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=(($247+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $249=HEAPU32[(($248)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $250=(($246)>>>0) >= (($249)>>>0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $251=(($250)&1); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $252=(($251)==(1)); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $253=(($252)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($253) { __label__ = 45; break; } else { __label__ = 46; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + var $255=$C0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $256=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $257=(($256+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $258=(($257)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($258)>>2)]=$255; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=$C0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $261=(($260+24)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($261)>>2)]=$259; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 47; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + _abort(); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + __label__ = 48; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 48: + var $265=$tp; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $266=(($265+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $267=(($266+4)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $268=HEAP32[(($267)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C1=$268; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $269=(($268)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($269) { __label__ = 49; break; } else { __label__ = 53; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + var $271=$C1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $272=$271; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $273=$1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $274=(($273+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $275=HEAPU32[(($274)>>2)]; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=(($272)>>>0) >= (($275)>>>0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $277=(($276)&1); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $278=(($277)==(1)); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=(($278)|0)!=0; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($279) { __label__ = 50; break; } else { __label__ = 51; break; } //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + var $281=$C1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $283=(($282+16)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $284=(($283+4)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($284)>>2)]=$281; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $285=$R; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $286=$C1; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=(($286+24)|0); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($287)>>2)]=$285; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 52; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 51: + _abort(); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 52: + __label__ = 53; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + __label__ = 55; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 54: + _abort(); //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 55: + __label__ = 56; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 56: + __label__ = 57; break; //@line 4100 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 57: + __label__ = 58; break; + case 58: + var $296=$psize; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $297=$296 >>> 8; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $X=$297; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $298=$X; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $299=(($298)|0)==0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($299) { __label__ = 59; break; } else { __label__ = 60; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 59: + $I=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 64; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 60: + var $302=$X; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $303=(($302)>>>0) > 65535; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($303) { __label__ = 61; break; } else { __label__ = 62; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 61: + $I=31; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 63; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 62: + var $306=$X; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$306; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $307=$Y; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $308=(($307-256)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $309=$308 >>> 16; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $310=$309 & 8; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$310; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $311=$N; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $312=$Y; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $313=$312 << $311; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$313; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $314=(($313-4096)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=$314 >>> 16; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=$315 & 4; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$316; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=$K; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $318=$N; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $319=(($318+$317)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$319; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $320=$K; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=$Y; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $322=$321 << $320; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$322; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=(($322-16384)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=$323 >>> 16; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=$324 & 2; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$325; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=$N; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $327=(($326+$325)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$327; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $328=$N; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $329=((14-$328)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $330=$K; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $331=$Y; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $332=$331 << $330; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$332; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $333=$332 >>> 15; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $334=(($329+$333)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$334; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $335=$K; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $336=$335 << 1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $337=$psize; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $338=$K; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=(($338+7)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=$337 >>> (($339)>>>0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=$340 & 1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=(($336+$341)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$342; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 63; break; + case 63: + __label__ = 64; break; + case 64: + var $345=$I; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=$1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=(($346+304)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348=(($347+($345<<2))|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H1=$348; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $349=$I; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=(($350+28)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($351)>>2)]=$349; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $353=(($352+16)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $354=(($353+4)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($354)>>2)]=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $355=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $356=(($355+16)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $357=(($356)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($357)>>2)]=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=$1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=(($358+4)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $360=HEAP32[(($359)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $361=$I; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $362=1 << $361; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $363=$360 & $362; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $364=(($363)|0)!=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($364) { __label__ = 66; break; } else { __label__ = 65; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 65: + var $366=$I; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=1 << $366; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=$1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=(($368+4)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $370=HEAP32[(($369)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $371=$370 | $367; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($369)>>2)]=$371; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $372=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $373=$H1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($373)>>2)]=$372; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374=$H1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $375=$374; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $376=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $377=(($376+24)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($377)>>2)]=$375; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $378=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $379=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=(($379+12)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($380)>>2)]=$378; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=(($381+8)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($382)>>2)]=$378; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 84; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 66: + var $384=$H1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $385=HEAP32[(($384)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$385; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=$psize; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=$I; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $388=(($387)|0)==31; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($388) { __label__ = 67; break; } else { __label__ = 68; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 67: + var $397 = 0;__label__ = 69; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 68: + var $391=$I; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $392=$391 >>> 1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $393=(($392+8)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $394=(($393-2)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $395=((31-$394)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $397 = $395;__label__ = 69; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 69: + var $397; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $398=$386 << $397; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$398; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 70; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 70: + var $400=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $401=(($400+4)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $402=HEAP32[(($401)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $403=$402 & -8; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $404=$psize; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $405=(($403)|0)!=(($404)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($405) { __label__ = 71; break; } else { __label__ = 77; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 71: + var $407=$K2; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $408=$407 >>> 31; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $409=$408 & 1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $410=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $411=(($410+16)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $412=(($411+($409<<2))|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C=$412; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $413=$K2; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $414=$413 << 1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$414; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $415=$C; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $416=HEAP32[(($415)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $417=(($416)|0)!=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($417) { __label__ = 72; break; } else { __label__ = 73; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 72: + var $419=$C; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $420=HEAP32[(($419)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$420; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 76; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 73: + var $422=$C; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $423=$422; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $424=$1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $425=(($424+16)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $426=HEAPU32[(($425)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $427=(($423)>>>0) >= (($426)>>>0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $428=(($427)&1); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $429=(($428)==(1)); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $430=(($429)|0)!=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($430) { __label__ = 74; break; } else { __label__ = 75; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 74: + var $432=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $433=$C; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($433)>>2)]=$432; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $434=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $435=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $436=(($435+24)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($436)>>2)]=$434; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $437=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $438=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $439=(($438+12)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($439)>>2)]=$437; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $440=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $441=(($440+8)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($441)>>2)]=$437; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 83; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 75: + _abort(); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 76: + __label__ = 82; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 77: + var $445=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $446=(($445+8)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $447=HEAP32[(($446)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F3=$447; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $448=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $449=$448; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $450=$1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $451=(($450+16)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $452=HEAPU32[(($451)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $453=(($449)>>>0) >= (($452)>>>0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($453) { __label__ = 78; break; } else { var $462 = 0;__label__ = 79; break; } //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 78: + var $455=$F3; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $456=$455; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $457=$1; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $458=(($457+16)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $459=HEAPU32[(($458)>>2)]; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $460=(($456)>>>0) >= (($459)>>>0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $462 = $460;__label__ = 79; break; + case 79: + var $462; + var $463=(($462)&1); + var $464=(($463)==(1)); + var $465=(($464)|0)!=0; + if ($465) { __label__ = 80; break; } else { __label__ = 81; break; } + case 80: + var $467=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $468=$F3; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $469=(($468+12)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($469)>>2)]=$467; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $470=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $471=(($470+8)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($471)>>2)]=$467; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $472=$F3; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $473=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $474=(($473+8)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($474)>>2)]=$472; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $475=$T; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $476=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $477=(($476+12)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($477)>>2)]=$475; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $478=$tp; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $479=(($478+24)|0); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($479)>>2)]=0; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 83; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 81: + _abort(); //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 82: + __label__ = 70; break; //@line 4110 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 83: + __label__ = 84; break; + case 84: + __label__ = 85; break; //@line 4112 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 85: + __label__ = 86; break; //@line 4113 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 86: + var $486=$sp; //@line 4116 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $pred=$486; //@line 4116 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $487=$next; //@line 4117 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$487; //@line 4117 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 2; break; //@line 4118 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 87: + var $489=$nsegs; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $490=(($489)>>>0) > 4294967295; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($490) { __label__ = 88; break; } else { __label__ = 89; break; } //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 88: + var $492=$nsegs; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $495 = $492;__label__ = 90; break; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 89: + var $495 = -1;__label__ = 90; break; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 90: + var $495; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $496=$1; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $497=(($496+32)|0); //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($497)>>2)]=$495; //@line 4120 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $498=$released; //@line 4122 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $498; //@line 4122 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_release_unused_segments["X"]=1; + +function _init_mparams() { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $magic; + var $psize; + var $gsize; + var $1=HEAP32[((((_mparams)|0))>>2)]; //@line 2965 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $2=(($1)|0)==0; //@line 2965 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($2) { __label__ = 2; break; } else { __label__ = 6; break; } //@line 2965 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $4=_sysconf(8); //@line 2971 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$4; //@line 2971 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=$psize; //@line 2972 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $gsize=$5; //@line 2972 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=$gsize; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=$gsize; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=(($7-1)|0); //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=$6 & $8; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=(($9)|0)!=0; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($10) { __label__ = 4; break; } else { __label__ = 3; break; } //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $12=$psize; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=$psize; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=(($13-1)|0); //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$12 & $14; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=(($15)|0)!=0; //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($16) { __label__ = 4; break; } else { __label__ = 5; break; } //@line 2989 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + _abort(); //@line 2997 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 2997 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $19=$gsize; //@line 2999 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((_mparams+8)|0))>>2)]=$19; //@line 2999 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=$psize; //@line 3000 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((_mparams+4)|0))>>2)]=$20; //@line 3000 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((_mparams+12)|0))>>2)]=-1; //@line 3001 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((_mparams+16)|0))>>2)]=2097152; //@line 3002 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((_mparams+20)|0))>>2)]=0; //@line 3004 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=HEAP32[((((_mparams+20)|0))>>2)]; //@line 3011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((__gm_+440)|0))>>2)]=$21; //@line 3011 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=_time(0); //@line 3030 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=$22 ^ 1431655765; //@line 3030 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $magic=$23; //@line 3030 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=$magic; //@line 3032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$24 | 8; //@line 3032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $magic=$25; //@line 3032 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=$magic; //@line 3033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$26 & -8; //@line 3033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $magic=$27; //@line 3033 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$magic; //@line 3034 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[((((_mparams)|0))>>2)]=$28; //@line 3034 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 6; break; //@line 3036 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + ; + return 1; //@line 3039 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} + + +function _init_top($m, $p, $psize) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $offset; + $1=$m; + $2=$p; + $3=$psize; + var $4=$2; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=$4; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=(($5+8)|0); //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=$6; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$7 & 7; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(($8)|0)==0; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($9) { __label__ = 2; break; } else { __label__ = 3; break; } //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $20 = 0;__label__ = 4; break; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $12=$2; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=$12; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=(($13+8)|0); //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$14; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=$15 & 7; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=((8-$16)|0); //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=$17 & 7; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20 = $18;__label__ = 4; break; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $20; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $offset=$20; //@line 3736 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=$2; //@line 3737 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=$21; //@line 3737 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=$offset; //@line 3737 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=(($22+$23)|0); //@line 3737 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$24; //@line 3737 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $2=$25; //@line 3737 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=$offset; //@line 3738 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$3; //@line 3738 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=(($27-$26)|0); //@line 3738 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $3=$28; //@line 3738 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=$2; //@line 3740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$1; //@line 3740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=(($30+24)|0); //@line 3740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($31)>>2)]=$29; //@line 3740 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=$3; //@line 3741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$1; //@line 3741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=(($33+12)|0); //@line 3741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($34)>>2)]=$32; //@line 3741 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=$3; //@line 3742 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$35 | 1; //@line 3742 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=$2; //@line 3742 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=(($37+4)|0); //@line 3742 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($38)>>2)]=$36; //@line 3742 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=$2; //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=$39; //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$3; //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=(($40+$41)|0); //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=$42; //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=(($43+4)|0); //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($44)>>2)]=40; //@line 3744 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=HEAP32[((((_mparams+16)|0))>>2)]; //@line 3745 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=$1; //@line 3745 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=(($46+28)|0); //@line 3745 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($47)>>2)]=$45; //@line 3745 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return; //@line 3746 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_init_top["X"]=1; + +function _mmap_alloc($m, $nb) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $mmsize; + var $mm; + var $offset; + var $psize; + var $p; + $2=$m; + $3=$nb; + var $4=$3; //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $5=(($4+24)|0); //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=(($5+7)|0); //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=HEAP32[((((_mparams+4)|0))>>2)]; //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=(($7-1)|0); //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(($6+$8)|0); //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=HEAP32[((((_mparams+4)|0))>>2)]; //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=(($10-1)|0); //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=$11 ^ -1; //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=$9 & $12; //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $mmsize=$13; //@line 3672 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=$mmsize; //@line 3673 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$3; //@line 3673 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=(($14)>>>0) > (($15)>>>0); //@line 3673 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($16) { __label__ = 2; break; } else { __label__ = 13; break; } //@line 3673 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + $mm=-1; //@line 3674 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=$mm; //@line 3675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=(($18)|0)!=-1; //@line 3675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($19) { __label__ = 3; break; } else { __label__ = 12; break; } //@line 3675 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $21=$mm; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=(($21+8)|0); //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=$22; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=$23 & 7; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=(($24)|0)==0; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($25) { __label__ = 4; break; } else { __label__ = 5; break; } //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $35 = 0;__label__ = 6; break; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $28=$mm; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=(($28+8)|0); //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $30=$29; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $31=$30 & 7; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=((8-$31)|0); //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$32 & 7; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35 = $33;__label__ = 6; break; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $35; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $offset=$35; //@line 3676 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$mmsize; //@line 3677 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=$offset; //@line 3677 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38=(($36-$37)|0); //@line 3677 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=(($38-16)|0); //@line 3677 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$39; //@line 3677 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=$mm; //@line 3678 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$offset; //@line 3678 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=(($40+$41)|0); //@line 3678 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=$42; //@line 3678 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$43; //@line 3678 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=$offset; //@line 3679 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$p; //@line 3679 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=(($45)|0); //@line 3679 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($46)>>2)]=$44; //@line 3679 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=$psize; //@line 3680 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $48=$p; //@line 3680 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=(($48+4)|0); //@line 3680 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($49)>>2)]=$47; //@line 3680 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=$p; //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=$50; //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=$psize; //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=(($51+$52)|0); //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=$53; //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=(($54+4)|0); //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($55)>>2)]=7; //@line 3682 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$p; //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=$56; //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=$psize; //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=(($58+4)|0); //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=(($57+$59)|0); //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=$60; //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $62=(($61+4)|0); //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($62)>>2)]=0; //@line 3683 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=$2; //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=(($63+16)|0); //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=HEAP32[(($64)>>2)]; //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $66=(($65)|0)==0; //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($66) { __label__ = 8; break; } else { __label__ = 7; break; } //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $68=$mm; //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=$2; //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=(($69+16)|0); //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=HEAPU32[(($70)>>2)]; //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=(($68)>>>0) < (($71)>>>0); //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($72) { __label__ = 8; break; } else { __label__ = 9; break; } //@line 3685 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $74=$mm; //@line 3686 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=$2; //@line 3686 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=(($75+16)|0); //@line 3686 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($76)>>2)]=$74; //@line 3686 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 9; break; //@line 3686 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $78=$mmsize; //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $79=$2; //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=(($79+432)|0); //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=HEAP32[(($80)>>2)]; //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=(($81+$78)|0); //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($80)>>2)]=$82; //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=$2; //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=(($83+436)|0); //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $85=HEAPU32[(($84)>>2)]; //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $86=(($82)>>>0) > (($85)>>>0); //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($86) { __label__ = 10; break; } else { __label__ = 11; break; } //@line 3687 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $88=$2; //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=(($88+432)|0); //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=HEAP32[(($89)>>2)]; //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=$2; //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=(($91+436)|0); //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($92)>>2)]=$90; //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 11; break; //@line 3688 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $94=$p; //@line 3691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=$94; //@line 3691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $96=(($95+8)|0); //@line 3691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $1=$96; //@line 3691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 14; break; //@line 3691 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + __label__ = 13; break; //@line 3693 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + $1=0; //@line 3694 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 14; break; //@line 3694 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $100=$1; //@line 3695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $100; //@line 3695 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_mmap_alloc["X"]=1; + +function _init_bins($m) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $i; + var $bin; + $1=$m; + $i=0; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 2; break; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $3=$i; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $4=(($3)>>>0) < 32; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($4) { __label__ = 3; break; } else { __label__ = 5; break; } //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $6=$i; //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=$6 << 1; //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$1; //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=(($8+40)|0); //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=(($9+($7<<2))|0); //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=$10; //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=$11; //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $bin=$12; //@line 3753 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=$bin; //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=$bin; //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=(($14+12)|0); //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($15)>>2)]=$13; //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=$bin; //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=(($16+8)|0); //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($17)>>2)]=$13; //@line 3754 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 4; break; //@line 3755 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $19=$i; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=(($19+1)|0); //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $i=$20; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 2; break; //@line 3752 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + ; + return; //@line 3756 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} + + +function _prepend_alloc($m, $newbase, $oldbase, $nb) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $p; + var $oldfirst; + var $psize; + var $q; + var $qsize; + var $tsize; + var $dsize; + var $nsize; + var $F; + var $B; + var $I; + var $TP; + var $XP; + var $R; + var $F1; + var $RP; + var $CP; + var $H; + var $C0; + var $C1; + var $I2; + var $B3; + var $F4; + var $TP5; + var $H6; + var $I7; + var $X; + var $Y; + var $N; + var $K; + var $T; + var $K8; + var $C; + var $F9; + $1=$m; + $2=$newbase; + $3=$oldbase; + $4=$nb; + var $5=$2; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=$2; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=(($6+8)|0); //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$7; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=$8 & 7; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=(($9)|0)==0; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($10) { __label__ = 2; break; } else { __label__ = 3; break; } //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $20 = 0;__label__ = 4; break; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $13=$2; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=(($13+8)|0); //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$14; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=$15 & 7; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=((8-$16)|0); //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=$17 & 7; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20 = $18;__label__ = 4; break; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $20; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=(($5+$20)|0); //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=$21; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$22; //@line 3780 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=$3; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=$3; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=(($24+8)|0); //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=$25; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$26 & 7; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=(($27)|0)==0; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($28) { __label__ = 5; break; } else { __label__ = 6; break; } //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $38 = 0;__label__ = 7; break; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $31=$3; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $32=(($31+8)|0); //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=$32; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=$33 & 7; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=((8-$34)|0); //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=$35 & 7; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $38 = $36;__label__ = 7; break; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $38; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39=(($23+$38)|0); //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=$39; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $oldfirst=$40; //@line 3781 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$oldfirst; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=$41; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=$p; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=$43; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=$42; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=$44; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $47=(($45-$46)|0); //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$47; //@line 3782 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $48=$p; //@line 3783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $49=$48; //@line 3783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $50=$4; //@line 3783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $51=(($49+$50)|0); //@line 3783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52=$51; //@line 3783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $q=$52; //@line 3783 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=$psize; //@line 3784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=$4; //@line 3784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=(($53-$54)|0); //@line 3784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $qsize=$55; //@line 3784 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$4; //@line 3785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=$56 | 1; //@line 3785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=$57 | 2; //@line 3785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=$p; //@line 3785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=(($59+4)|0); //@line 3785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($60)>>2)]=$58; //@line 3785 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=$oldfirst; //@line 3792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $62=$1; //@line 3792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=(($62+24)|0); //@line 3792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=HEAP32[(($63)>>2)]; //@line 3792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=(($61)|0)==(($64)|0); //@line 3792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($65) { __label__ = 8; break; } else { __label__ = 9; break; } //@line 3792 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $67=$qsize; //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=$1; //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68+12)|0); //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=HEAP32[(($69)>>2)]; //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=(($70+$67)|0); //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($69)>>2)]=$71; //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tsize=$71; //@line 3793 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=$q; //@line 3794 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=$1; //@line 3794 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=(($73+24)|0); //@line 3794 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($74)>>2)]=$72; //@line 3794 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=$tsize; //@line 3795 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=$75 | 1; //@line 3795 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=$q; //@line 3795 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $78=(($77+4)|0); //@line 3795 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($78)>>2)]=$76; //@line 3795 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 109; break; //@line 3797 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $80=$oldfirst; //@line 3798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=$1; //@line 3798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=(($81+20)|0); //@line 3798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=HEAP32[(($82)>>2)]; //@line 3798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=(($80)|0)==(($83)|0); //@line 3798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($84) { __label__ = 10; break; } else { __label__ = 11; break; } //@line 3798 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + var $86=$qsize; //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=$1; //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=(($87+8)|0); //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=HEAP32[(($88)>>2)]; //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=(($89+$86)|0); //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($88)>>2)]=$90; //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $dsize=$90; //@line 3799 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=$q; //@line 3800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=$1; //@line 3800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $93=(($92+20)|0); //@line 3800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($93)>>2)]=$91; //@line 3800 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $94=$dsize; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=$94 | 1; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $96=$q; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $97=(($96+4)|0); //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($97)>>2)]=$95; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=$dsize; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=$q; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=$99; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$dsize; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=(($100+$101)|0); //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=$102; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=(($103)|0); //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($104)>>2)]=$98; //@line 3801 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 108; break; //@line 3802 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + var $106=$oldfirst; //@line 3804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=(($106+4)|0); //@line 3804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=HEAP32[(($107)>>2)]; //@line 3804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $109=$108 & 3; //@line 3804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $110=(($109)|0)!=1; //@line 3804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($110) { __label__ = 72; break; } else { __label__ = 12; break; } //@line 3804 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $112=$oldfirst; //@line 3805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $113=(($112+4)|0); //@line 3805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $114=HEAP32[(($113)>>2)]; //@line 3805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $115=$114 & -8; //@line 3805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nsize=$115; //@line 3805 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=$nsize; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $117=$116 >>> 3; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $118=(($117)>>>0) < 32; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($118) { __label__ = 13; break; } else { __label__ = 25; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $120=$oldfirst; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=(($120+8)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=HEAP32[(($121)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$122; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $123=$oldfirst; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $124=(($123+12)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=HEAP32[(($124)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B=$125; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=$nsize; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=$126 >>> 3; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$127; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=$F; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=$B; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=(($128)|0)==(($129)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($130) { __label__ = 14; break; } else { __label__ = 15; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $132=$I; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=1 << $132; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=$133 ^ -1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $136=(($135)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $137=HEAP32[(($136)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $138=$137 & $134; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($136)>>2)]=$138; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 24; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + var $140=$F; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $141=$I; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=$141 << 1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $143=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144=(($143+40)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=(($144+($142<<2))|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $146=$145; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=$146; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $148=(($140)|0)==(($147)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($148) { __label__ = 17; break; } else { __label__ = 16; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $150=$F; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $151=$150; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=(($152+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=HEAPU32[(($153)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=(($151)>>>0) >= (($154)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($155) { __label__ = 17; break; } else { var $176 = 0;__label__ = 20; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $157=$B; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $158=$I; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=$158 << 1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=(($160+40)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=(($161+($159<<2))|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $163=$162; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $164=$163; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $165=(($157)|0)==(($164)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($165) { var $174 = 1;__label__ = 19; break; } else { __label__ = 18; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + var $167=$B; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $168=$167; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $170=(($169+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $171=HEAPU32[(($170)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=(($168)>>>0) >= (($171)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $174 = $172;__label__ = 19; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + var $174; + var $176 = $174;__label__ = 20; break; + case 20: + var $176; + var $177=(($176)&1); + var $178=(($177)==(1)); + var $179=(($178)|0)!=0; + if ($179) { __label__ = 21; break; } else { __label__ = 22; break; } + case 21: + var $181=$B; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $182=$F; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=(($182+12)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($183)>>2)]=$181; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $184=$F; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $185=$B; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $186=(($185+8)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($186)>>2)]=$184; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 23; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + __label__ = 24; break; + case 24: + __label__ = 71; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $191=$oldfirst; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $192=$191; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $TP=$192; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $193=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=(($193+24)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $195=HEAP32[(($194)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $XP=$195; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $197=(($196+12)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $198=HEAP32[(($197)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $200=(($198)|0)!=(($199)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($200) { __label__ = 26; break; } else { __label__ = 30; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 26: + var $202=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $203=(($202+8)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=HEAP32[(($203)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F1=$204; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $205=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $206=(($205+12)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=HEAP32[(($206)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$207; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=$F1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $209=$208; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $210=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $211=(($210+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $212=HEAPU32[(($211)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $213=(($209)>>>0) >= (($212)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $214=(($213)&1); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $215=(($214)==(1)); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $216=(($215)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($216) { __label__ = 27; break; } else { __label__ = 28; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 27: + var $218=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $219=$F1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $220=(($219+12)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($220)>>2)]=$218; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $221=$F1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $222=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $223=(($222+8)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($223)>>2)]=$221; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 29; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 28: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + __label__ = 42; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $227=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=(($227+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $229=(($228+4)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$229; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230=HEAP32[(($229)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$230; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $231=(($230)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($231) { __label__ = 32; break; } else { __label__ = 31; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $233=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $234=(($233+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $235=(($234)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$235; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $236=HEAP32[(($235)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$236; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=(($236)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($237) { __label__ = 32; break; } else { __label__ = 41; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + __label__ = 33; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + var $240=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $241=(($240+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $242=(($241+4)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$242; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=HEAP32[(($242)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=(($243)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($244) { var $252 = 1;__label__ = 35; break; } else { __label__ = 34; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 34: + var $246=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=(($246+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=(($247)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $CP=$248; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $249=HEAP32[(($248)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $250=(($249)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $252 = $250;__label__ = 35; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + var $252; + if ($252) { __label__ = 36; break; } else { __label__ = 37; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + var $254=$CP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $RP=$254; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $255=HEAP32[(($254)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $R=$255; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 33; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + var $257=$RP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $258=$257; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=(($259+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $261=HEAPU32[(($260)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $262=(($258)>>>0) >= (($261)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $263=(($262)&1); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $264=(($263)==(1)); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $265=(($264)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($265) { __label__ = 38; break; } else { __label__ = 39; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + var $267=$RP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($267)>>2)]=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 40; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 40: + __label__ = 41; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + __label__ = 42; break; + case 42: + var $272=$XP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $273=(($272)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($273) { __label__ = 43; break; } else { __label__ = 70; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 43: + var $275=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=(($275+28)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $277=HEAP32[(($276)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $278=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=(($278+304)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $280=(($279+($277<<2))|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H=$280; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $281=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=$H; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $283=HEAP32[(($282)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $284=(($281)|0)==(($283)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($284) { __label__ = 44; break; } else { __label__ = 47; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + var $286=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=$H; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($287)>>2)]=$286; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=(($286)|0)==0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($288) { __label__ = 45; break; } else { __label__ = 46; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + var $290=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $291=(($290+28)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $292=HEAP32[(($291)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $293=1 << $292; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $294=$293 ^ -1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $295=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $296=(($295+4)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $297=HEAP32[(($296)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $298=$297 & $294; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($296)>>2)]=$298; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 46; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + __label__ = 54; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 47: + var $301=$XP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $302=$301; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $303=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $304=(($303+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $305=HEAPU32[(($304)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $306=(($302)>>>0) >= (($305)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $307=(($306)&1); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $308=(($307)==(1)); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $309=(($308)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($309) { __label__ = 48; break; } else { __label__ = 52; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 48: + var $311=$XP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $312=(($311+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $313=(($312)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $314=HEAP32[(($313)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=(($314)|0)==(($315)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($316) { __label__ = 49; break; } else { __label__ = 50; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + var $318=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $319=$XP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $320=(($319+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=(($320)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($321)>>2)]=$318; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 51; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 50: + var $323=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=$XP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=(($324+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=(($325+4)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($326)>>2)]=$323; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 51; break; + case 51: + __label__ = 53; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 52: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 53: + __label__ = 54; break; + case 54: + var $331=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $332=(($331)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($332) { __label__ = 55; break; } else { __label__ = 69; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 55: + var $334=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $335=$334; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $336=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $337=(($336+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $338=HEAPU32[(($337)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=(($335)>>>0) >= (($338)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=(($339)&1); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=(($340)==(1)); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=(($341)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($342) { __label__ = 56; break; } else { __label__ = 67; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 56: + var $344=$XP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $345=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=(($345+24)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($346)>>2)]=$344; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348=(($347+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $349=(($348)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=HEAP32[(($349)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C0=$350; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=(($350)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($351) { __label__ = 57; break; } else { __label__ = 61; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 57: + var $353=$C0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $354=$353; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $355=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $356=(($355+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $357=HEAPU32[(($356)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=(($354)>>>0) >= (($357)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=(($358)&1); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $360=(($359)==(1)); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $361=(($360)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($361) { __label__ = 58; break; } else { __label__ = 59; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 58: + var $363=$C0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $364=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $365=(($364+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $366=(($365)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($366)>>2)]=$363; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $367=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=$C0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=(($368+24)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($369)>>2)]=$367; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 60; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 59: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 60: + __label__ = 61; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 61: + var $373=$TP; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374=(($373+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $375=(($374+4)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $376=HEAP32[(($375)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C1=$376; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $377=(($376)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($377) { __label__ = 62; break; } else { __label__ = 66; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 62: + var $379=$C1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=$379; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=$1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=(($381+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $383=HEAPU32[(($382)>>2)]; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $384=(($380)>>>0) >= (($383)>>>0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $385=(($384)&1); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=(($385)==(1)); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=(($386)|0)!=0; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($387) { __label__ = 63; break; } else { __label__ = 64; break; } //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 63: + var $389=$C1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $390=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $391=(($390+16)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $392=(($391+4)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($392)>>2)]=$389; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $393=$R; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $394=$C1; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $395=(($394+24)|0); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($395)>>2)]=$393; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 65; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 64: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 65: + __label__ = 66; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 66: + __label__ = 68; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 67: + _abort(); //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 68: + __label__ = 69; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 69: + __label__ = 70; break; //@line 3806 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 70: + __label__ = 71; break; + case 71: + var $404=$oldfirst; //@line 3807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $405=$404; //@line 3807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $406=$nsize; //@line 3807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $407=(($405+$406)|0); //@line 3807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $408=$407; //@line 3807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $oldfirst=$408; //@line 3807 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $409=$nsize; //@line 3808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $410=$qsize; //@line 3808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $411=(($410+$409)|0); //@line 3808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $qsize=$411; //@line 3808 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 72; break; //@line 3809 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 72: + var $413=$oldfirst; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $414=(($413+4)|0); //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $415=HEAP32[(($414)>>2)]; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $416=$415 & -2; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($414)>>2)]=$416; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $417=$qsize; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $418=$417 | 1; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $419=$q; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $420=(($419+4)|0); //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($420)>>2)]=$418; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $421=$qsize; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $422=$q; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $423=$422; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $424=$qsize; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $425=(($423+$424)|0); //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $426=$425; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $427=(($426)|0); //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($427)>>2)]=$421; //@line 3810 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $428=$qsize; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $429=$428 >>> 3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $430=(($429)>>>0) < 32; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($430) { __label__ = 73; break; } else { __label__ = 80; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 73: + var $432=$qsize; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $433=$432 >>> 3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I2=$433; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $434=$I2; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $435=$434 << 1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $436=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $437=(($436+40)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $438=(($437+($435<<2))|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $439=$438; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $440=$439; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B3=$440; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $441=$B3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F4=$441; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $442=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $443=(($442)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $444=HEAP32[(($443)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $445=$I2; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $446=1 << $445; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $447=$444 & $446; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $448=(($447)|0)!=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($448) { __label__ = 75; break; } else { __label__ = 74; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 74: + var $450=$I2; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $451=1 << $450; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $452=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $453=(($452)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $454=HEAP32[(($453)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $455=$454 | $451; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($453)>>2)]=$455; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 79; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 75: + var $457=$B3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $458=(($457+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $459=HEAP32[(($458)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $460=$459; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $461=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $462=(($461+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $463=HEAPU32[(($462)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $464=(($460)>>>0) >= (($463)>>>0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $465=(($464)&1); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $466=(($465)==(1)); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $467=(($466)|0)!=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($467) { __label__ = 76; break; } else { __label__ = 77; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 76: + var $469=$B3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $470=(($469+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $471=HEAP32[(($470)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F4=$471; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 78; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 77: + _abort(); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 78: + __label__ = 79; break; + case 79: + var $475=$q; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $476=$B3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $477=(($476+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($477)>>2)]=$475; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $478=$q; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $479=$F4; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $480=(($479+12)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($480)>>2)]=$478; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $481=$F4; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $482=$q; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $483=(($482+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($483)>>2)]=$481; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $484=$B3; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $485=$q; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $486=(($485+12)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($486)>>2)]=$484; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 107; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 80: + var $488=$q; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $489=$488; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $TP5=$489; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $490=$qsize; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $491=$490 >>> 8; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $X=$491; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $492=$X; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $493=(($492)|0)==0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($493) { __label__ = 81; break; } else { __label__ = 82; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 81: + $I7=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 86; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 82: + var $496=$X; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $497=(($496)>>>0) > 65535; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($497) { __label__ = 83; break; } else { __label__ = 84; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 83: + $I7=31; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 85; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 84: + var $500=$X; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$500; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $501=$Y; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $502=(($501-256)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $503=$502 >>> 16; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $504=$503 & 8; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$504; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $505=$N; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $506=$Y; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $507=$506 << $505; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$507; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $508=(($507-4096)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $509=$508 >>> 16; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $510=$509 & 4; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$510; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $511=$K; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $512=$N; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $513=(($512+$511)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$513; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $514=$K; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $515=$Y; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $516=$515 << $514; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$516; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $517=(($516-16384)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $518=$517 >>> 16; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $519=$518 & 2; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$519; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $520=$N; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $521=(($520+$519)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$521; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $522=$N; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $523=((14-$522)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $524=$K; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $525=$Y; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $526=$525 << $524; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$526; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $527=$526 >>> 15; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $528=(($523+$527)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$528; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $529=$K; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $530=$529 << 1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $531=$qsize; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $532=$K; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $533=(($532+7)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $534=$531 >>> (($533)>>>0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $535=$534 & 1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $536=(($530+$535)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I7=$536; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 85; break; + case 85: + __label__ = 86; break; + case 86: + var $539=$I7; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $540=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $541=(($540+304)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $542=(($541+($539<<2))|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H6=$542; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $543=$I7; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $544=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $545=(($544+28)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($545)>>2)]=$543; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $546=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $547=(($546+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $548=(($547+4)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($548)>>2)]=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $549=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $550=(($549+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $551=(($550)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($551)>>2)]=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $552=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $553=(($552+4)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $554=HEAP32[(($553)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $555=$I7; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $556=1 << $555; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $557=$554 & $556; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $558=(($557)|0)!=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($558) { __label__ = 88; break; } else { __label__ = 87; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 87: + var $560=$I7; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $561=1 << $560; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $562=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $563=(($562+4)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $564=HEAP32[(($563)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $565=$564 | $561; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($563)>>2)]=$565; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $566=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $567=$H6; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($567)>>2)]=$566; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $568=$H6; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $569=$568; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $570=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $571=(($570+24)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($571)>>2)]=$569; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $572=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $573=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $574=(($573+12)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($574)>>2)]=$572; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $575=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $576=(($575+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($576)>>2)]=$572; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 106; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 88: + var $578=$H6; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $579=HEAP32[(($578)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$579; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $580=$qsize; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $581=$I7; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $582=(($581)|0)==31; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($582) { __label__ = 89; break; } else { __label__ = 90; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 89: + var $591 = 0;__label__ = 91; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 90: + var $585=$I7; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $586=$585 >>> 1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $587=(($586+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $588=(($587-2)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $589=((31-$588)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $591 = $589;__label__ = 91; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 91: + var $591; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $592=$580 << $591; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K8=$592; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 92; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 92: + var $594=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $595=(($594+4)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $596=HEAP32[(($595)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $597=$596 & -8; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $598=$qsize; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $599=(($597)|0)!=(($598)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($599) { __label__ = 93; break; } else { __label__ = 99; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 93: + var $601=$K8; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $602=$601 >>> 31; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $603=$602 & 1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $604=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $605=(($604+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $606=(($605+($603<<2))|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C=$606; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $607=$K8; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $608=$607 << 1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K8=$608; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $609=$C; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $610=HEAP32[(($609)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $611=(($610)|0)!=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($611) { __label__ = 94; break; } else { __label__ = 95; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 94: + var $613=$C; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $614=HEAP32[(($613)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$614; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 98; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 95: + var $616=$C; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $617=$616; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $618=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $619=(($618+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $620=HEAPU32[(($619)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $621=(($617)>>>0) >= (($620)>>>0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $622=(($621)&1); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $623=(($622)==(1)); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $624=(($623)|0)!=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($624) { __label__ = 96; break; } else { __label__ = 97; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 96: + var $626=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $627=$C; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($627)>>2)]=$626; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $628=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $629=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $630=(($629+24)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($630)>>2)]=$628; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $631=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $632=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $633=(($632+12)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($633)>>2)]=$631; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $634=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $635=(($634+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($635)>>2)]=$631; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 105; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 97: + _abort(); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 98: + __label__ = 104; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 99: + var $639=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $640=(($639+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $641=HEAP32[(($640)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F9=$641; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $642=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $643=$642; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $644=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $645=(($644+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $646=HEAPU32[(($645)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $647=(($643)>>>0) >= (($646)>>>0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($647) { __label__ = 100; break; } else { var $656 = 0;__label__ = 101; break; } //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 100: + var $649=$F9; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $650=$649; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $651=$1; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $652=(($651+16)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $653=HEAPU32[(($652)>>2)]; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $654=(($650)>>>0) >= (($653)>>>0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $656 = $654;__label__ = 101; break; + case 101: + var $656; + var $657=(($656)&1); + var $658=(($657)==(1)); + var $659=(($658)|0)!=0; + if ($659) { __label__ = 102; break; } else { __label__ = 103; break; } + case 102: + var $661=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $662=$F9; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $663=(($662+12)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($663)>>2)]=$661; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $664=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $665=(($664+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($665)>>2)]=$661; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $666=$F9; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $667=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $668=(($667+8)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($668)>>2)]=$666; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $669=$T; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $670=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $671=(($670+12)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($671)>>2)]=$669; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $672=$TP5; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $673=(($672+24)|0); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($673)>>2)]=0; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 105; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 103: + _abort(); //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 104: + __label__ = 92; break; //@line 3811 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 105: + __label__ = 106; break; + case 106: + __label__ = 107; break; + case 107: + __label__ = 108; break; + case 108: + __label__ = 109; break; + case 109: + var $681=$p; //@line 3816 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $682=$681; //@line 3816 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $683=(($682+8)|0); //@line 3816 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + ; + return $683; //@line 3816 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_prepend_alloc["X"]=1; + +function _add_segment($m, $tbase, $tsize, $mmapped) { + ; + var __label__; + __label__ = 1; + while(1) switch(__label__) { + case 1: + var $1; + var $2; + var $3; + var $4; + var $old_top; + var $oldsp; + var $old_end; + var $ssize; + var $rawsp; + var $offset; + var $asp; + var $csp; + var $sp; + var $ss; + var $tnext; + var $p; + var $nfences; + var $nextp; + var $q; + var $psize; + var $tn; + var $I; + var $B; + var $F; + var $TP; + var $H; + var $I1; + var $X; + var $Y; + var $N; + var $K; + var $T; + var $K2; + var $C; + var $F3; + $1=$m; + $2=$tbase; + $3=$tsize; + $4=$mmapped; + var $5=$1; //@line 3822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $6=(($5+24)|0); //@line 3822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $7=HEAP32[(($6)>>2)]; //@line 3822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $8=$7; //@line 3822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $old_top=$8; //@line 3822 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $9=$1; //@line 3823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $10=$old_top; //@line 3823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $11=_segment_holding($9, $10); //@line 3823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $oldsp=$11; //@line 3823 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $12=$oldsp; //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $13=(($12)|0); //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $14=HEAP32[(($13)>>2)]; //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $15=$oldsp; //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $16=(($15+4)|0); //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $17=HEAP32[(($16)>>2)]; //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $18=(($14+$17)|0); //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $old_end=$18; //@line 3824 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $ssize=24; //@line 3825 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $19=$old_end; //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $20=$ssize; //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $21=(($20+16)|0); //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $22=(($21+7)|0); //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $23=(((-$22))|0); //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $24=(($19+$23)|0); //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $rawsp=$24; //@line 3826 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $25=$rawsp; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $26=(($25+8)|0); //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $27=$26; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $28=$27 & 7; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $29=(($28)|0)==0; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($29) { __label__ = 2; break; } else { __label__ = 3; break; } //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 2: + var $39 = 0;__label__ = 4; break; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 3: + var $32=$rawsp; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $33=(($32+8)|0); //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $34=$33; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $35=$34 & 7; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $36=((8-$35)|0); //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $37=$36 & 7; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $39 = $37;__label__ = 4; break; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 4: + var $39; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $offset=$39; //@line 3827 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $40=$rawsp; //@line 3828 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $41=$offset; //@line 3828 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $42=(($40+$41)|0); //@line 3828 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $asp=$42; //@line 3828 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $43=$asp; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $44=$old_top; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $45=(($44+16)|0); //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $46=(($43)>>>0) < (($45)>>>0); //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($46) { __label__ = 5; break; } else { __label__ = 6; break; } //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 5: + var $48=$old_top; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52 = $48;__label__ = 7; break; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 6: + var $50=$asp; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $52 = $50;__label__ = 7; break; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 7: + var $52; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $csp=$52; //@line 3829 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $53=$csp; //@line 3830 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $54=$53; //@line 3830 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $sp=$54; //@line 3830 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $55=$sp; //@line 3831 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $56=$55; //@line 3831 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $57=(($56+8)|0); //@line 3831 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $58=$57; //@line 3831 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $ss=$58; //@line 3831 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $59=$sp; //@line 3832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $60=$59; //@line 3832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $61=$ssize; //@line 3832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $62=(($60+$61)|0); //@line 3832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $63=$62; //@line 3832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tnext=$63; //@line 3832 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $64=$tnext; //@line 3833 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$64; //@line 3833 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nfences=0; //@line 3834 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $65=$1; //@line 3837 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $66=$2; //@line 3837 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $67=$66; //@line 3837 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $68=$3; //@line 3837 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $69=(($68-40)|0); //@line 3837 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + _init_top($65, $67, $69); //@line 3837 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $70=$ssize; //@line 3841 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $71=$70 | 1; //@line 3841 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $72=$71 | 2; //@line 3841 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $73=$sp; //@line 3841 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $74=(($73+4)|0); //@line 3841 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($74)>>2)]=$72; //@line 3841 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $75=$ss; //@line 3842 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $76=$1; //@line 3842 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $77=(($76+444)|0); //@line 3842 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $78=$75; //@line 3842 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $79=$77; //@line 3842 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + assert(16 % 1 === 0, 'memcpy given ' + 16 + ' bytes to copy. Problem with quantum=1 corrections perhaps?');HEAP32[(($78)>>2)]=HEAP32[(($79)>>2)];HEAP32[(($78+4)>>2)]=HEAP32[(($79+4)>>2)];HEAP32[(($78+8)>>2)]=HEAP32[(($79+8)>>2)];HEAP32[(($78+12)>>2)]=HEAP32[(($79+12)>>2)]; //@line 3842 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $80=$2; //@line 3843 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $81=$1; //@line 3843 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $82=(($81+444)|0); //@line 3843 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $83=(($82)|0); //@line 3843 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($83)>>2)]=$80; //@line 3843 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $84=$3; //@line 3844 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $85=$1; //@line 3844 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $86=(($85+444)|0); //@line 3844 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $87=(($86+4)|0); //@line 3844 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($87)>>2)]=$84; //@line 3844 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $88=$4; //@line 3845 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $89=$1; //@line 3845 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $90=(($89+444)|0); //@line 3845 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $91=(($90+12)|0); //@line 3845 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($91)>>2)]=$88; //@line 3845 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $92=$ss; //@line 3846 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $93=$1; //@line 3846 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $94=(($93+444)|0); //@line 3846 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $95=(($94+8)|0); //@line 3846 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($95)>>2)]=$92; //@line 3846 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 8; break; //@line 3849 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 8: + var $97=$p; //@line 3850 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $98=$97; //@line 3850 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $99=(($98+4)|0); //@line 3850 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $100=$99; //@line 3850 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nextp=$100; //@line 3850 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $101=$p; //@line 3851 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $102=(($101+4)|0); //@line 3851 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($102)>>2)]=7; //@line 3851 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $103=$nfences; //@line 3852 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $104=(($103+1)|0); //@line 3852 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $nfences=$104; //@line 3852 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $105=$nextp; //@line 3853 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $106=(($105+4)|0); //@line 3853 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $107=$106; //@line 3853 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $108=$old_end; //@line 3853 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $109=(($107)>>>0) < (($108)>>>0); //@line 3853 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($109) { __label__ = 9; break; } else { __label__ = 10; break; } //@line 3853 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 9: + var $111=$nextp; //@line 3854 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $p=$111; //@line 3854 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 11; break; //@line 3854 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 10: + __label__ = 12; break; //@line 3856 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 11: + __label__ = 8; break; //@line 3857 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 12: + var $115=$csp; //@line 3861 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $116=$old_top; //@line 3861 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $117=(($115)|0)!=(($116)|0); //@line 3861 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($117) { __label__ = 13; break; } else { __label__ = 49; break; } //@line 3861 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 13: + var $119=$old_top; //@line 3862 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $120=$119; //@line 3862 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $q=$120; //@line 3862 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $121=$csp; //@line 3863 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $122=$old_top; //@line 3863 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $123=$121; //@line 3863 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $124=$122; //@line 3863 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $125=(($123-$124)|0); //@line 3863 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $psize=$125; //@line 3863 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $126=$q; //@line 3864 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $127=$126; //@line 3864 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $128=$psize; //@line 3864 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $129=(($127+$128)|0); //@line 3864 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $130=$129; //@line 3864 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $tn=$130; //@line 3864 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $131=$tn; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $132=(($131+4)|0); //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $133=HEAP32[(($132)>>2)]; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $134=$133 & -2; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($132)>>2)]=$134; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $135=$psize; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $136=$135 | 1; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $137=$q; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $138=(($137+4)|0); //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($138)>>2)]=$136; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $139=$psize; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $140=$q; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $141=$140; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $142=$psize; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $143=(($141+$142)|0); //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $144=$143; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $145=(($144)|0); //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($145)>>2)]=$139; //@line 3865 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $146=$psize; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $147=$146 >>> 3; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $148=(($147)>>>0) < 32; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($148) { __label__ = 14; break; } else { __label__ = 21; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 14: + var $150=$psize; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $151=$150 >>> 3; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I=$151; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $152=$I; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $153=$152 << 1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $154=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $155=(($154+40)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $156=(($155+($153<<2))|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $157=$156; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $158=$157; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $B=$158; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $159=$B; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$159; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $160=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $161=(($160)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $162=HEAP32[(($161)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $163=$I; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $164=1 << $163; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $165=$162 & $164; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $166=(($165)|0)!=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($166) { __label__ = 16; break; } else { __label__ = 15; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 15: + var $168=$I; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $169=1 << $168; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $170=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $171=(($170)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $172=HEAP32[(($171)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $173=$172 | $169; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($171)>>2)]=$173; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 20; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 16: + var $175=$B; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $176=(($175+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $177=HEAP32[(($176)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $178=$177; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $179=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $180=(($179+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $181=HEAPU32[(($180)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $182=(($178)>>>0) >= (($181)>>>0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $183=(($182)&1); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $184=(($183)==(1)); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $185=(($184)|0)!=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($185) { __label__ = 17; break; } else { __label__ = 18; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 17: + var $187=$B; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $188=(($187+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $189=HEAP32[(($188)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F=$189; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 19; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 18: + _abort(); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 19: + __label__ = 20; break; + case 20: + var $193=$q; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $194=$B; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $195=(($194+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($195)>>2)]=$193; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $196=$q; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $197=$F; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $198=(($197+12)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($198)>>2)]=$196; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $199=$F; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $200=$q; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $201=(($200+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($201)>>2)]=$199; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $202=$B; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $203=$q; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $204=(($203+12)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($204)>>2)]=$202; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 48; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 21: + var $206=$q; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $207=$206; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $TP=$207; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $208=$psize; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $209=$208 >>> 8; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $X=$209; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $210=$X; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $211=(($210)|0)==0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($211) { __label__ = 22; break; } else { __label__ = 23; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 22: + $I1=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 27; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 23: + var $214=$X; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $215=(($214)>>>0) > 65535; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($215) { __label__ = 24; break; } else { __label__ = 25; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 24: + $I1=31; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 26; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 25: + var $218=$X; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$218; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $219=$Y; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $220=(($219-256)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $221=$220 >>> 16; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $222=$221 & 8; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$222; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $223=$N; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $224=$Y; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $225=$224 << $223; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$225; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $226=(($225-4096)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $227=$226 >>> 16; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $228=$227 & 4; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$228; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $229=$K; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $230=$N; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $231=(($230+$229)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$231; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $232=$K; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $233=$Y; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $234=$233 << $232; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$234; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $235=(($234-16384)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $236=$235 >>> 16; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $237=$236 & 2; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$237; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $238=$N; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $239=(($238+$237)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $N=$239; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $240=$N; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $241=((14-$240)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $242=$K; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $243=$Y; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $244=$243 << $242; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $Y=$244; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $245=$244 >>> 15; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $246=(($241+$245)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K=$246; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $247=$K; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $248=$247 << 1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $249=$psize; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $250=$K; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $251=(($250+7)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $252=$249 >>> (($251)>>>0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $253=$252 & 1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $254=(($248+$253)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $I1=$254; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 26; break; + case 26: + __label__ = 27; break; + case 27: + var $257=$I1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $258=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $259=(($258+304)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $260=(($259+($257<<2))|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $H=$260; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $261=$I1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $262=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $263=(($262+28)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($263)>>2)]=$261; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $264=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $265=(($264+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $266=(($265+4)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($266)>>2)]=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $267=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $268=(($267+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $269=(($268)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($269)>>2)]=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $270=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $271=(($270+4)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $272=HEAP32[(($271)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $273=$I1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $274=1 << $273; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $275=$272 & $274; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $276=(($275)|0)!=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($276) { __label__ = 29; break; } else { __label__ = 28; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 28: + var $278=$I1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $279=1 << $278; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $280=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $281=(($280+4)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $282=HEAP32[(($281)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $283=$282 | $279; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($281)>>2)]=$283; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $284=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $285=$H; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($285)>>2)]=$284; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $286=$H; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $287=$286; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $288=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $289=(($288+24)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($289)>>2)]=$287; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $290=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $291=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $292=(($291+12)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($292)>>2)]=$290; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $293=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $294=(($293+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($294)>>2)]=$290; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 47; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 29: + var $296=$H; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $297=HEAP32[(($296)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$297; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $298=$psize; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $299=$I1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $300=(($299)|0)==31; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($300) { __label__ = 30; break; } else { __label__ = 31; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 30: + var $309 = 0;__label__ = 32; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 31: + var $303=$I1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $304=$303 >>> 1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $305=(($304+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $306=(($305-2)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $307=((31-$306)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $309 = $307;__label__ = 32; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 32: + var $309; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $310=$298 << $309; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$310; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 33; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 33: + var $312=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $313=(($312+4)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $314=HEAP32[(($313)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $315=$314 & -8; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $316=$psize; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $317=(($315)|0)!=(($316)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($317) { __label__ = 34; break; } else { __label__ = 40; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 34: + var $319=$K2; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $320=$319 >>> 31; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $321=$320 & 1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $322=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $323=(($322+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $324=(($323+($321<<2))|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $C=$324; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $325=$K2; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $326=$325 << 1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $K2=$326; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $327=$C; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $328=HEAP32[(($327)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $329=(($328)|0)!=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($329) { __label__ = 35; break; } else { __label__ = 36; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 35: + var $331=$C; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $332=HEAP32[(($331)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $T=$332; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 39; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 36: + var $334=$C; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $335=$334; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $336=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $337=(($336+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $338=HEAPU32[(($337)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $339=(($335)>>>0) >= (($338)>>>0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $340=(($339)&1); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $341=(($340)==(1)); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $342=(($341)|0)!=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($342) { __label__ = 37; break; } else { __label__ = 38; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 37: + var $344=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $345=$C; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($345)>>2)]=$344; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $346=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $347=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $348=(($347+24)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($348)>>2)]=$346; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $349=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $350=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $351=(($350+12)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($351)>>2)]=$349; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $352=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $353=(($352+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($353)>>2)]=$349; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 46; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 38: + _abort(); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 39: + __label__ = 45; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 40: + var $357=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $358=(($357+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $359=HEAP32[(($358)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + $F3=$359; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $360=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $361=$360; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $362=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $363=(($362+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $364=HEAPU32[(($363)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $365=(($361)>>>0) >= (($364)>>>0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + if ($365) { __label__ = 41; break; } else { var $374 = 0;__label__ = 42; break; } //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 41: + var $367=$F3; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $368=$367; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $369=$1; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $370=(($369+16)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $371=HEAPU32[(($370)>>2)]; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $372=(($368)>>>0) >= (($371)>>>0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $374 = $372;__label__ = 42; break; + case 42: + var $374; + var $375=(($374)&1); + var $376=(($375)==(1)); + var $377=(($376)|0)!=0; + if ($377) { __label__ = 43; break; } else { __label__ = 44; break; } + case 43: + var $379=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $380=$F3; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $381=(($380+12)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($381)>>2)]=$379; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $382=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $383=(($382+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($383)>>2)]=$379; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $384=$F3; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $385=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $386=(($385+8)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($386)>>2)]=$384; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $387=$T; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $388=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $389=(($388+12)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($389)>>2)]=$387; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $390=$TP; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + var $391=(($390+24)|0); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + HEAP32[(($391)>>2)]=0; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + __label__ = 46; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 44: + _abort(); //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + throw "Reached an unreachable!" //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 45: + __label__ = 33; break; //@line 3866 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 46: + __label__ = 47; break; + case 47: + __label__ = 48; break; + case 48: + __label__ = 49; break; //@line 3867 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + case 49: + ; + return; //@line 3870 "/home/jwhite/w/emscripten/system/lib/dlmalloc.c" + default: assert(0, "bad label: " + __label__); + } +} +_add_segment["X"]=1; +// Warning: printing of i64 values may be slightly rounded! No deep i64 math used, so precise i64 code not included +var i64Math = null; +var _llvm_expect_i32; // stub for _llvm_expect_i32 + + + + + var ERRNO_CODES={E2BIG:7,EACCES:13,EADDRINUSE:98,EADDRNOTAVAIL:99,EAFNOSUPPORT:97,EAGAIN:11,EALREADY:114,EBADF:9,EBADMSG:74,EBUSY:16,ECANCELED:125,ECHILD:10,ECONNABORTED:103,ECONNREFUSED:111,ECONNRESET:104,EDEADLK:35,EDESTADDRREQ:89,EDOM:33,EDQUOT:122,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:113,EIDRM:43,EILSEQ:84,EINPROGRESS:115,EINTR:4,EINVAL:22,EIO:5,EISCONN:106,EISDIR:21,ELOOP:40,EMFILE:24,EMLINK:31,EMSGSIZE:90,EMULTIHOP:72,ENAMETOOLONG:36,ENETDOWN:100,ENETRESET:102,ENETUNREACH:101,ENFILE:23,ENOBUFS:105,ENODATA:61,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:37,ENOLINK:67,ENOMEM:12,ENOMSG:42,ENOPROTOOPT:92,ENOSPC:28,ENOSR:63,ENOSTR:60,ENOSYS:38,ENOTCONN:107,ENOTDIR:20,ENOTEMPTY:39,ENOTRECOVERABLE:131,ENOTSOCK:88,ENOTSUP:95,ENOTTY:25,ENXIO:6,EOVERFLOW:75,EOWNERDEAD:130,EPERM:1,EPIPE:32,EPROTO:71,EPROTONOSUPPORT:93,EPROTOTYPE:91,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:116,ETIME:62,ETIMEDOUT:110,ETXTBSY:26,EWOULDBLOCK:11,EXDEV:18}; + + function ___setErrNo(value) { + // For convenient setting and returning of errno. + if (!___setErrNo.ret) ___setErrNo.ret = allocate([0], 'i32', ALLOC_STATIC); + HEAP32[((___setErrNo.ret)>>2)]=value + return value; + } + + var _stdin=0; + + var _stdout=0; + + var _stderr=0; + + var __impure_ptr=0;var FS={currentPath:"/",nextInode:2,streams:[null],ignorePermissions:true,absolutePath:function (relative, base) { + if (typeof relative !== 'string') return null; + if (base === undefined) base = FS.currentPath; + if (relative && relative[0] == '/') base = ''; + var full = base + '/' + relative; + var parts = full.split('/').reverse(); + var absolute = ['']; + while (parts.length) { + var part = parts.pop(); + if (part == '' || part == '.') { + // Nothing. + } else if (part == '..') { + if (absolute.length > 1) absolute.pop(); + } else { + absolute.push(part); + } + } + return absolute.length == 1 ? '/' : absolute.join('/'); + },analyzePath:function (path, dontResolveLastLink, linksVisited) { + var ret = { + isRoot: false, + exists: false, + error: 0, + name: null, + path: null, + object: null, + parentExists: false, + parentPath: null, + parentObject: null + }; + path = FS.absolutePath(path); + if (path == '/') { + ret.isRoot = true; + ret.exists = ret.parentExists = true; + ret.name = '/'; + ret.path = ret.parentPath = '/'; + ret.object = ret.parentObject = FS.root; + } else if (path !== null) { + linksVisited = linksVisited || 0; + path = path.slice(1).split('/'); + var current = FS.root; + var traversed = ['']; + while (path.length) { + if (path.length == 1 && current.isFolder) { + ret.parentExists = true; + ret.parentPath = traversed.length == 1 ? '/' : traversed.join('/'); + ret.parentObject = current; + ret.name = path[0]; + } + var target = path.shift(); + if (!current.isFolder) { + ret.error = ERRNO_CODES.ENOTDIR; + break; + } else if (!current.read) { + ret.error = ERRNO_CODES.EACCES; + break; + } else if (!current.contents.hasOwnProperty(target)) { + ret.error = ERRNO_CODES.ENOENT; + break; + } + current = current.contents[target]; + if (current.link && !(dontResolveLastLink && path.length == 0)) { + if (linksVisited > 40) { // Usual Linux SYMLOOP_MAX. + ret.error = ERRNO_CODES.ELOOP; + break; + } + var link = FS.absolutePath(current.link, traversed.join('/')); + ret = FS.analyzePath([link].concat(path).join('/'), + dontResolveLastLink, linksVisited + 1); + return ret; + } + traversed.push(target); + if (path.length == 0) { + ret.exists = true; + ret.path = traversed.join('/'); + ret.object = current; + } + } + } + return ret; + },findObject:function (path, dontResolveLastLink) { + FS.ensureRoot(); + var ret = FS.analyzePath(path, dontResolveLastLink); + if (ret.exists) { + return ret.object; + } else { + ___setErrNo(ret.error); + return null; + } + },createObject:function (parent, name, properties, canRead, canWrite) { + if (!parent) parent = '/'; + if (typeof parent === 'string') parent = FS.findObject(parent); + + if (!parent) { + ___setErrNo(ERRNO_CODES.EACCES); + throw new Error('Parent path must exist.'); + } + if (!parent.isFolder) { + ___setErrNo(ERRNO_CODES.ENOTDIR); + throw new Error('Parent must be a folder.'); + } + if (!parent.write && !FS.ignorePermissions) { + ___setErrNo(ERRNO_CODES.EACCES); + throw new Error('Parent folder must be writeable.'); + } + if (!name || name == '.' || name == '..') { + ___setErrNo(ERRNO_CODES.ENOENT); + throw new Error('Name must not be empty.'); + } + if (parent.contents.hasOwnProperty(name)) { + ___setErrNo(ERRNO_CODES.EEXIST); + throw new Error("Can't overwrite object."); + } + + parent.contents[name] = { + read: canRead === undefined ? true : canRead, + write: canWrite === undefined ? false : canWrite, + timestamp: Date.now(), + inodeNumber: FS.nextInode++ + }; + for (var key in properties) { + if (properties.hasOwnProperty(key)) { + parent.contents[name][key] = properties[key]; + } + } + + return parent.contents[name]; + },createFolder:function (parent, name, canRead, canWrite) { + var properties = {isFolder: true, isDevice: false, contents: {}}; + return FS.createObject(parent, name, properties, canRead, canWrite); + },createPath:function (parent, path, canRead, canWrite) { + var current = FS.findObject(parent); + if (current === null) throw new Error('Invalid parent.'); + path = path.split('/').reverse(); + while (path.length) { + var part = path.pop(); + if (!part) continue; + if (!current.contents.hasOwnProperty(part)) { + FS.createFolder(current, part, canRead, canWrite); + } + current = current.contents[part]; + } + return current; + },createFile:function (parent, name, properties, canRead, canWrite) { + properties.isFolder = false; + return FS.createObject(parent, name, properties, canRead, canWrite); + },createDataFile:function (parent, name, data, canRead, canWrite) { + if (typeof data === 'string') { + var dataArray = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) dataArray[i] = data.charCodeAt(i); + data = dataArray; + } + var properties = {isDevice: false, contents: data}; + return FS.createFile(parent, name, properties, canRead, canWrite); + },createLazyFile:function (parent, name, url, canRead, canWrite) { + var properties = {isDevice: false, url: url}; + return FS.createFile(parent, name, properties, canRead, canWrite); + },createLink:function (parent, name, target, canRead, canWrite) { + var properties = {isDevice: false, link: target}; + return FS.createFile(parent, name, properties, canRead, canWrite); + },createDevice:function (parent, name, input, output) { + if (!(input || output)) { + throw new Error('A device must have at least one callback defined.'); + } + var ops = {isDevice: true, input: input, output: output}; + return FS.createFile(parent, name, ops, Boolean(input), Boolean(output)); + },forceLoadFile:function (obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + var success = true; + if (typeof XMLHttpRequest !== 'undefined') { + // Browser. + assert('Cannot do synchronous binary XHRs in modern browsers. Use --embed-file or --preload-file in emcc'); + } else if (Module['read']) { + // Command-line. + try { + // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as + // read() will try to parse UTF8. + obj.contents = intArrayFromString(Module['read'](obj.url), true); + } catch (e) { + success = false; + } + } else { + throw new Error('Cannot load without read() or XMLHttpRequest.'); + } + if (!success) ___setErrNo(ERRNO_CODES.EIO); + return success; + },ensureRoot:function () { + if (FS.root) return; + // The main file system tree. All the contents are inside this. + FS.root = { + read: true, + write: true, + isFolder: true, + isDevice: false, + timestamp: Date.now(), + inodeNumber: 1, + contents: {} + }; + },init:function (input, output, error) { + // Make sure we initialize only once. + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); + FS.init.initialized = true; + + FS.ensureRoot(); + + // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here + input = input || Module['stdin']; + output = output || Module['stdout']; + error = error || Module['stderr']; + + // Default handlers. + var stdinOverridden = true, stdoutOverridden = true, stderrOverridden = true; + if (!input) { + stdinOverridden = false; + input = function() { + if (!input.cache || !input.cache.length) { + var result; + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { + // Browser. + result = window.prompt('Input: '); + } else if (typeof readline == 'function') { + // Command line. + result = readline(); + } + if (!result) result = ''; + input.cache = intArrayFromString(result + '\n', true); + } + return input.cache.shift(); + }; + } + function simpleOutput(val) { + if (val === null || val === '\n'.charCodeAt(0)) { + output.printer(output.buffer.join('')); + output.buffer = []; + } else { + output.buffer.push(String.fromCharCode(val)); + } + } + if (!output) { + stdoutOverridden = false; + output = simpleOutput; + } + if (!output.printer) output.printer = Module['print']; + if (!output.buffer) output.buffer = []; + if (!error) { + stderrOverridden = false; + error = simpleOutput; + } + if (!error.printer) error.printer = Module['print']; + if (!error.buffer) error.buffer = []; + + // Create the temporary folder. + FS.createFolder('/', 'tmp', true, true); + + // Create the I/O devices. + var devFolder = FS.createFolder('/', 'dev', true, true); + var stdin = FS.createDevice(devFolder, 'stdin', input); + var stdout = FS.createDevice(devFolder, 'stdout', null, output); + var stderr = FS.createDevice(devFolder, 'stderr', null, error); + FS.createDevice(devFolder, 'tty', input, output); + + // Create default streams. + FS.streams[1] = { + path: '/dev/stdin', + object: stdin, + position: 0, + isRead: true, + isWrite: false, + isAppend: false, + isTerminal: !stdinOverridden, + error: false, + eof: false, + ungotten: [] + }; + FS.streams[2] = { + path: '/dev/stdout', + object: stdout, + position: 0, + isRead: false, + isWrite: true, + isAppend: false, + isTerminal: !stdoutOverridden, + error: false, + eof: false, + ungotten: [] + }; + FS.streams[3] = { + path: '/dev/stderr', + object: stderr, + position: 0, + isRead: false, + isWrite: true, + isAppend: false, + isTerminal: !stderrOverridden, + error: false, + eof: false, + ungotten: [] + }; + _stdin = allocate([1], 'void*', ALLOC_STATIC); + _stdout = allocate([2], 'void*', ALLOC_STATIC); + _stderr = allocate([3], 'void*', ALLOC_STATIC); + + // Other system paths + FS.createPath('/', 'dev/shm/tmp', true, true); // temp files + + // Newlib initialization + FS.streams[_stdin] = FS.streams[1]; + FS.streams[_stdout] = FS.streams[2]; + FS.streams[_stderr] = FS.streams[3]; + __impure_ptr = allocate([ allocate( + [0, 0, 0, 0, _stdin, 0, 0, 0, _stdout, 0, 0, 0, _stderr, 0, 0, 0], + 'void*', ALLOC_STATIC) ], 'void*', ALLOC_STATIC); + },quit:function () { + if (!FS.init.initialized) return; + // Flush any partially-printed lines in stdout and stderr. Careful, they may have been closed + if (FS.streams[2] && FS.streams[2].object.output.buffer.length > 0) FS.streams[2].object.output('\n'.charCodeAt(0)); + if (FS.streams[3] && FS.streams[3].object.output.buffer.length > 0) FS.streams[3].object.output('\n'.charCodeAt(0)); + },standardizePath:function (path) { + if (path.substr(0, 2) == './') path = path.substr(2); + return path; + },deleteFile:function (path) { + var path = FS.analyzePath(path); + if (!path.parentExists || !path.exists) { + throw 'Invalid path ' + path; + } + delete path.parentObject.contents[path.name]; + }}; + + + + + + + + function _pwrite(fildes, buf, nbyte, offset) { + // ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html + var stream = FS.streams[fildes]; + if (!stream || stream.object.isDevice) { + ___setErrNo(ERRNO_CODES.EBADF); + return -1; + } else if (!stream.isWrite) { + ___setErrNo(ERRNO_CODES.EACCES); + return -1; + } else if (stream.object.isFolder) { + ___setErrNo(ERRNO_CODES.EISDIR); + return -1; + } else if (nbyte < 0 || offset < 0) { + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } else { + var contents = stream.object.contents; + while (contents.length < offset) contents.push(0); + for (var i = 0; i < nbyte; i++) { + contents[offset + i] = HEAPU8[(buf+i)]; + } + stream.object.timestamp = Date.now(); + return i; + } + }function _write(fildes, buf, nbyte) { + // ssize_t write(int fildes, const void *buf, size_t nbyte); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html + var stream = FS.streams[fildes]; + if (!stream) { + ___setErrNo(ERRNO_CODES.EBADF); + return -1; + } else if (!stream.isWrite) { + ___setErrNo(ERRNO_CODES.EACCES); + return -1; + } else if (nbyte < 0) { + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } else { + if (stream.object.isDevice) { + if (stream.object.output) { + for (var i = 0; i < nbyte; i++) { + try { + stream.object.output(HEAP8[(buf+i)]); + } catch (e) { + ___setErrNo(ERRNO_CODES.EIO); + return -1; + } + } + stream.object.timestamp = Date.now(); + return i; + } else { + ___setErrNo(ERRNO_CODES.ENXIO); + return -1; + } + } else { + var bytesWritten = _pwrite(fildes, buf, nbyte, stream.position); + if (bytesWritten != -1) stream.position += bytesWritten; + return bytesWritten; + } + } + }function _fwrite(ptr, size, nitems, stream) { + // size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html + var bytesToWrite = nitems * size; + if (bytesToWrite == 0) return 0; + var bytesWritten = _write(stream, ptr, bytesToWrite); + if (bytesWritten == -1) { + if (FS.streams[stream]) FS.streams[stream].error = true; + return -1; + } else { + return Math.floor(bytesWritten / size); + } + } + + function __formatString(format, varargs) { + var textIndex = format; + var argIndex = 0; + function getNextArg(type) { + // NOTE: Explicitly ignoring type safety. Otherwise this fails: + // int x = 4; printf("%c\n", (char)x); + var ret; + if (type === 'double') { + ret = (tempDoubleI32[0]=HEAP32[((varargs+argIndex)>>2)],tempDoubleI32[1]=HEAP32[((varargs+argIndex+4)>>2)],tempDoubleF64[0]); + } else if (type == 'i64') { + ret = [HEAP32[((varargs+argIndex)>>2)], + HEAP32[((varargs+argIndex+4)>>2)]]; + } else { + type = 'i32'; // varargs are always i32, i64, or double + ret = HEAP32[((varargs+argIndex)>>2)]; + } + argIndex += Runtime.getNativeFieldSize(type); + return ret; + } + + var ret = []; + var curr, next, currArg; + while(1) { + var startTextIndex = textIndex; + curr = HEAP8[(textIndex)]; + if (curr === 0) break; + next = HEAP8[(textIndex+1)]; + if (curr == '%'.charCodeAt(0)) { + // Handle flags. + var flagAlwaysSigned = false; + var flagLeftAlign = false; + var flagAlternative = false; + var flagZeroPad = false; + flagsLoop: while (1) { + switch (next) { + case '+'.charCodeAt(0): + flagAlwaysSigned = true; + break; + case '-'.charCodeAt(0): + flagLeftAlign = true; + break; + case '#'.charCodeAt(0): + flagAlternative = true; + break; + case '0'.charCodeAt(0): + if (flagZeroPad) { + break flagsLoop; + } else { + flagZeroPad = true; + break; + } + default: + break flagsLoop; + } + textIndex++; + next = HEAP8[(textIndex+1)]; + } + + // Handle width. + var width = 0; + if (next == '*'.charCodeAt(0)) { + width = getNextArg('i32'); + textIndex++; + next = HEAP8[(textIndex+1)]; + } else { + while (next >= '0'.charCodeAt(0) && next <= '9'.charCodeAt(0)) { + width = width * 10 + (next - '0'.charCodeAt(0)); + textIndex++; + next = HEAP8[(textIndex+1)]; + } + } + + // Handle precision. + var precisionSet = false; + if (next == '.'.charCodeAt(0)) { + var precision = 0; + precisionSet = true; + textIndex++; + next = HEAP8[(textIndex+1)]; + if (next == '*'.charCodeAt(0)) { + precision = getNextArg('i32'); + textIndex++; + } else { + while(1) { + var precisionChr = HEAP8[(textIndex+1)]; + if (precisionChr < '0'.charCodeAt(0) || + precisionChr > '9'.charCodeAt(0)) break; + precision = precision * 10 + (precisionChr - '0'.charCodeAt(0)); + textIndex++; + } + } + next = HEAP8[(textIndex+1)]; + } else { + var precision = 6; // Standard default. + } + + // Handle integer sizes. WARNING: These assume a 32-bit architecture! + var argSize; + switch (String.fromCharCode(next)) { + case 'h': + var nextNext = HEAP8[(textIndex+2)]; + if (nextNext == 'h'.charCodeAt(0)) { + textIndex++; + argSize = 1; // char (actually i32 in varargs) + } else { + argSize = 2; // short (actually i32 in varargs) + } + break; + case 'l': + var nextNext = HEAP8[(textIndex+2)]; + if (nextNext == 'l'.charCodeAt(0)) { + textIndex++; + argSize = 8; // long long + } else { + argSize = 4; // long + } + break; + case 'L': // long long + case 'q': // int64_t + case 'j': // intmax_t + argSize = 8; + break; + case 'z': // size_t + case 't': // ptrdiff_t + case 'I': // signed ptrdiff_t or unsigned size_t + argSize = 4; + break; + default: + argSize = null; + } + if (argSize) textIndex++; + next = HEAP8[(textIndex+1)]; + + // Handle type specifier. + if (['d', 'i', 'u', 'o', 'x', 'X', 'p'].indexOf(String.fromCharCode(next)) != -1) { + // Integer. + var signed = next == 'd'.charCodeAt(0) || next == 'i'.charCodeAt(0); + argSize = argSize || 4; + var currArg = getNextArg('i' + (argSize * 8)); + var origArg = currArg; + var argText; + // Flatten i64-1 [low, high] into a (slightly rounded) double + if (argSize == 8) { + currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 'u'.charCodeAt(0)); + } + // Truncate to requested size. + if (argSize <= 4) { + var limit = Math.pow(256, argSize) - 1; + currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8); + } + // Format the number. + var currAbsArg = Math.abs(currArg); + var prefix = ''; + if (next == 'd'.charCodeAt(0) || next == 'i'.charCodeAt(0)) { + if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1]); else + argText = reSign(currArg, 8 * argSize, 1).toString(10); + } else if (next == 'u'.charCodeAt(0)) { + if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], true); else + argText = unSign(currArg, 8 * argSize, 1).toString(10); + currArg = Math.abs(currArg); + } else if (next == 'o'.charCodeAt(0)) { + argText = (flagAlternative ? '0' : '') + currAbsArg.toString(8); + } else if (next == 'x'.charCodeAt(0) || next == 'X'.charCodeAt(0)) { + prefix = flagAlternative ? '0x' : ''; + if (currArg < 0) { + // Represent negative numbers in hex as 2's complement. + currArg = -currArg; + argText = (currAbsArg - 1).toString(16); + var buffer = []; + for (var i = 0; i < argText.length; i++) { + buffer.push((0xF - parseInt(argText[i], 16)).toString(16)); + } + argText = buffer.join(''); + while (argText.length < argSize * 2) argText = 'f' + argText; + } else { + argText = currAbsArg.toString(16); + } + if (next == 'X'.charCodeAt(0)) { + prefix = prefix.toUpperCase(); + argText = argText.toUpperCase(); + } + } else if (next == 'p'.charCodeAt(0)) { + if (currAbsArg === 0) { + argText = '(nil)'; + } else { + prefix = '0x'; + argText = currAbsArg.toString(16); + } + } + if (precisionSet) { + while (argText.length < precision) { + argText = '0' + argText; + } + } + + // Add sign if needed + if (flagAlwaysSigned) { + if (currArg < 0) { + prefix = '-' + prefix; + } else { + prefix = '+' + prefix; + } + } + + // Add padding. + while (prefix.length + argText.length < width) { + if (flagLeftAlign) { + argText += ' '; + } else { + if (flagZeroPad) { + argText = '0' + argText; + } else { + prefix = ' ' + prefix; + } + } + } + + // Insert the result into the buffer. + argText = prefix + argText; + argText.split('').forEach(function(chr) { + ret.push(chr.charCodeAt(0)); + }); + } else if (['f', 'F', 'e', 'E', 'g', 'G'].indexOf(String.fromCharCode(next)) != -1) { + // Float. + var currArg = getNextArg('double'); + var argText; + + if (isNaN(currArg)) { + argText = 'nan'; + flagZeroPad = false; + } else if (!isFinite(currArg)) { + argText = (currArg < 0 ? '-' : '') + 'inf'; + flagZeroPad = false; + } else { + var isGeneral = false; + var effectivePrecision = Math.min(precision, 20); + + // Convert g/G to f/F or e/E, as per: + // http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html + if (next == 'g'.charCodeAt(0) || next == 'G'.charCodeAt(0)) { + isGeneral = true; + precision = precision || 1; + var exponent = parseInt(currArg.toExponential(effectivePrecision).split('e')[1], 10); + if (precision > exponent && exponent >= -4) { + next = ((next == 'g'.charCodeAt(0)) ? 'f' : 'F').charCodeAt(0); + precision -= exponent + 1; + } else { + next = ((next == 'g'.charCodeAt(0)) ? 'e' : 'E').charCodeAt(0); + precision--; + } + effectivePrecision = Math.min(precision, 20); + } + + if (next == 'e'.charCodeAt(0) || next == 'E'.charCodeAt(0)) { + argText = currArg.toExponential(effectivePrecision); + // Make sure the exponent has at least 2 digits. + if (/[eE][-+]\d$/.test(argText)) { + argText = argText.slice(0, -1) + '0' + argText.slice(-1); + } + } else if (next == 'f'.charCodeAt(0) || next == 'F'.charCodeAt(0)) { + argText = currArg.toFixed(effectivePrecision); + } + + var parts = argText.split('e'); + if (isGeneral && !flagAlternative) { + // Discard trailing zeros and periods. + while (parts[0].length > 1 && parts[0].indexOf('.') != -1 && + (parts[0].slice(-1) == '0' || parts[0].slice(-1) == '.')) { + parts[0] = parts[0].slice(0, -1); + } + } else { + // Make sure we have a period in alternative mode. + if (flagAlternative && argText.indexOf('.') == -1) parts[0] += '.'; + // Zero pad until required precision. + while (precision > effectivePrecision++) parts[0] += '0'; + } + argText = parts[0] + (parts.length > 1 ? 'e' + parts[1] : ''); + + // Capitalize 'E' if needed. + if (next == 'E'.charCodeAt(0)) argText = argText.toUpperCase(); + + // Add sign. + if (flagAlwaysSigned && currArg >= 0) { + argText = '+' + argText; + } + } + + // Add padding. + while (argText.length < width) { + if (flagLeftAlign) { + argText += ' '; + } else { + if (flagZeroPad && (argText[0] == '-' || argText[0] == '+')) { + argText = argText[0] + '0' + argText.slice(1); + } else { + argText = (flagZeroPad ? '0' : ' ') + argText; + } + } + } + + // Adjust case. + if (next < 'a'.charCodeAt(0)) argText = argText.toUpperCase(); + + // Insert the result into the buffer. + argText.split('').forEach(function(chr) { + ret.push(chr.charCodeAt(0)); + }); + } else if (next == 's'.charCodeAt(0)) { + // String. + var arg = getNextArg('i8*'); + var copiedString; + if (arg) { + copiedString = String_copy(arg); + if (precisionSet && copiedString.length > precision) { + copiedString = copiedString.slice(0, precision); + } + } else { + copiedString = intArrayFromString('(null)', true); + } + if (!flagLeftAlign) { + while (copiedString.length < width--) { + ret.push(' '.charCodeAt(0)); + } + } + ret = ret.concat(copiedString); + if (flagLeftAlign) { + while (copiedString.length < width--) { + ret.push(' '.charCodeAt(0)); + } + } + } else if (next == 'c'.charCodeAt(0)) { + // Character. + if (flagLeftAlign) ret.push(getNextArg('i8')); + while (--width > 0) { + ret.push(' '.charCodeAt(0)); + } + if (!flagLeftAlign) ret.push(getNextArg('i8')); + } else if (next == 'n'.charCodeAt(0)) { + // Write the length written so far to the next parameter. + var ptr = getNextArg('i32*'); + HEAP32[((ptr)>>2)]=ret.length + } else if (next == '%'.charCodeAt(0)) { + // Literal percent sign. + ret.push(curr); + } else { + // Unknown specifiers remain untouched. + for (var i = startTextIndex; i < textIndex + 2; i++) { + ret.push(HEAP8[(i)]); + } + } + textIndex += 2; + // TODO: Support a/A (hex float) and m (last error) specifiers. + // TODO: Support %1${specifier} for arg selection. + } else { + ret.push(curr); + textIndex += 1; + } + } + return ret; + }function _fprintf(stream, format, varargs) { + // int fprintf(FILE *restrict stream, const char *restrict format, ...); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html + var result = __formatString(format, varargs); + var stack = Runtime.stackSave(); + var ret = _fwrite(allocate(result, 'i8', ALLOC_STACK), 1, result.length, stream); + Runtime.stackRestore(stack); + return ret; + } +var _llvm_va_start; // stub for _llvm_va_start + + + + var _vfprintf=_fprintf; + + function _llvm_va_end() {} + + function _printf(format, varargs) { + // int printf(const char *restrict format, ...); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html + var stdout = HEAP32[((_stdout)>>2)]; + return _fprintf(stdout, format, varargs); + } + + + function _memcpy(dest, src, num, align) { + assert(num % 1 === 0, 'memcpy given ' + num + ' bytes to copy. Problem with quantum=1 corrections perhaps?'); + if (num >= 20 && src % 2 == dest % 2) { + // This is unaligned, but quite large, and potentially alignable, so work hard to get to aligned settings + if (src % 4 == dest % 4) { + var stop = src + num; + while (src % 4) { // no need to check for stop, since we have large num + HEAP8[dest++] = HEAP8[src++]; + } + var src4 = src >> 2, dest4 = dest >> 2, stop4 = stop >> 2; + while (src4 < stop4) { + HEAP32[dest4++] = HEAP32[src4++]; + } + src = src4 << 2; + dest = dest4 << 2; + while (src < stop) { + HEAP8[dest++] = HEAP8[src++]; + } + } else { + var stop = src + num; + if (src % 2) { // no need to check for stop, since we have large num + HEAP8[dest++] = HEAP8[src++]; + } + var src2 = src >> 1, dest2 = dest >> 1, stop2 = stop >> 1; + while (src2 < stop2) { + HEAP16[dest2++] = HEAP16[src2++]; + } + src = src2 << 1; + dest = dest2 << 1; + if (src < stop) { + HEAP8[dest++] = HEAP8[src++]; + } + } + } else { + while (num--) { + HEAP8[dest++] = HEAP8[src++]; + } + } + }var _llvm_memcpy_p0i8_p0i8_i32=_memcpy; + + + function _strncmp(px, py, n) { + var i = 0; + while (i < n) { + var x = HEAP8[(px+i)]; + var y = HEAP8[(py+i)]; + if (x == y && x == 0) return 0; + if (x == 0) return -1; + if (y == 0) return 1; + if (x == y) { + i ++; + continue; + } else { + return x > y ? 1 : -1; + } + } + return 0; + }function _strcmp(px, py) { + return _strncmp(px, py, TOTAL_MEMORY); + } + + + + + + + + + + var ___dirent_struct_layout=null;function _open(path, oflag, varargs) { + // int open(const char *path, int oflag, ...); + // http://pubs.opengroup.org/onlinepubs/009695399/functions/open.html + // NOTE: This implementation tries to mimic glibc rather that strictly + // following the POSIX standard. + + var mode = HEAP32[((varargs)>>2)]; + + // Simplify flags. + var accessMode = oflag & 3; + var isWrite = accessMode != 0; + var isRead = accessMode != 1; + var isCreate = Boolean(oflag & 512); + var isExistCheck = Boolean(oflag & 2048); + var isTruncate = Boolean(oflag & 1024); + var isAppend = Boolean(oflag & 8); + + // Verify path. + var origPath = path; + path = FS.analyzePath(Pointer_stringify(path)); + if (!path.parentExists) { + ___setErrNo(path.error); + return -1; + } + var target = path.object || null; + var finalPath; + + // Verify the file exists, create if needed and allowed. + if (target) { + if (isCreate && isExistCheck) { + ___setErrNo(ERRNO_CODES.EEXIST); + return -1; + } + if ((isWrite || isCreate || isTruncate) && target.isFolder) { + ___setErrNo(ERRNO_CODES.EISDIR); + return -1; + } + if (isRead && !target.read || isWrite && !target.write) { + ___setErrNo(ERRNO_CODES.EACCES); + return -1; + } + if (isTruncate && !target.isDevice) { + target.contents = []; + } else { + if (!FS.forceLoadFile(target)) { + ___setErrNo(ERRNO_CODES.EIO); + return -1; + } + } + finalPath = path.path; + } else { + if (!isCreate) { + ___setErrNo(ERRNO_CODES.ENOENT); + return -1; + } + if (!path.parentObject.write) { + ___setErrNo(ERRNO_CODES.EACCES); + return -1; + } + target = FS.createDataFile(path.parentObject, path.name, [], + mode & 0x100, mode & 0x80); // S_IRUSR, S_IWUSR. + finalPath = path.parentPath + '/' + path.name; + } + // Actually create an open stream. + var id = FS.streams.length; + if (target.isFolder) { + var entryBuffer = 0; + if (___dirent_struct_layout) { + entryBuffer = _malloc(___dirent_struct_layout.__size__); + } + var contents = []; + for (var key in target.contents) contents.push(key); + FS.streams[id] = { + path: finalPath, + object: target, + // An index into contents. Special values: -2 is ".", -1 is "..". + position: -2, + isRead: true, + isWrite: false, + isAppend: false, + error: false, + eof: false, + ungotten: [], + // Folder-specific properties: + // Remember the contents at the time of opening in an array, so we can + // seek between them relying on a single order. + contents: contents, + // Each stream has its own area for readdir() returns. + currentEntry: entryBuffer + }; + } else { + FS.streams[id] = { + path: finalPath, + object: target, + position: 0, + isRead: isRead, + isWrite: isWrite, + isAppend: isAppend, + error: false, + eof: false, + ungotten: [] + }; + } + return id; + }function _fopen(filename, mode) { + // FILE *fopen(const char *restrict filename, const char *restrict mode); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/fopen.html + var flags; + mode = Pointer_stringify(mode); + if (mode[0] == 'r') { + if (mode.indexOf('+') != -1) { + flags = 2; + } else { + flags = 0; + } + } else if (mode[0] == 'w') { + if (mode.indexOf('+') != -1) { + flags = 2; + } else { + flags = 1; + } + flags |= 512; + flags |= 1024; + } else if (mode[0] == 'a') { + if (mode.indexOf('+') != -1) { + flags = 2; + } else { + flags = 1; + } + flags |= 512; + flags |= 8; + } else { + ___setErrNo(ERRNO_CODES.EINVAL); + return 0; + } + var ret = _open(filename, flags, allocate([0x1FF, 0, 0, 0], 'i32', ALLOC_STACK)); // All creation permissions. + return (ret == -1) ? 0 : ret; + } + + + + + + + + + + function _pread(fildes, buf, nbyte, offset) { + // ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html + var stream = FS.streams[fildes]; + if (!stream || stream.object.isDevice) { + ___setErrNo(ERRNO_CODES.EBADF); + return -1; + } else if (!stream.isRead) { + ___setErrNo(ERRNO_CODES.EACCES); + return -1; + } else if (stream.object.isFolder) { + ___setErrNo(ERRNO_CODES.EISDIR); + return -1; + } else if (nbyte < 0 || offset < 0) { + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } else { + var bytesRead = 0; + while (stream.ungotten.length && nbyte > 0) { + HEAP8[(buf++)]=stream.ungotten.pop() + nbyte--; + bytesRead++; + } + var contents = stream.object.contents; + var size = Math.min(contents.length - offset, nbyte); + for (var i = 0; i < size; i++) { + HEAP8[(buf+i)]=contents[offset + i] + bytesRead++; + } + return bytesRead; + } + }function _read(fildes, buf, nbyte) { + // ssize_t read(int fildes, void *buf, size_t nbyte); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html + var stream = FS.streams[fildes]; + if (!stream) { + ___setErrNo(ERRNO_CODES.EBADF); + return -1; + } else if (!stream.isRead) { + ___setErrNo(ERRNO_CODES.EACCES); + return -1; + } else if (nbyte < 0) { + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } else { + var bytesRead; + if (stream.object.isDevice) { + if (stream.object.input) { + bytesRead = 0; + while (stream.ungotten.length && nbyte > 0) { + HEAP8[(buf++)]=stream.ungotten.pop() + nbyte--; + bytesRead++; + } + for (var i = 0; i < nbyte; i++) { + try { + var result = stream.object.input(); + } catch (e) { + ___setErrNo(ERRNO_CODES.EIO); + return -1; + } + if (result === null || result === undefined) break; + bytesRead++; + HEAP8[(buf+i)]=result + } + return bytesRead; + } else { + ___setErrNo(ERRNO_CODES.ENXIO); + return -1; + } + } else { + var ungotSize = stream.ungotten.length; + bytesRead = _pread(fildes, buf, nbyte, stream.position); + if (bytesRead != -1) { + stream.position += (stream.ungotten.length - ungotSize) + bytesRead; + } + return bytesRead; + } + } + }function _fread(ptr, size, nitems, stream) { + // size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/fread.html + var bytesToRead = nitems * size; + if (bytesToRead == 0) return 0; + var bytesRead = _read(stream, ptr, bytesToRead); + var streamObj = FS.streams[stream]; + if (bytesRead == -1) { + if (streamObj) streamObj.error = true; + return -1; + } else { + if (bytesRead < bytesToRead) streamObj.eof = true; + return Math.floor(bytesRead / size); + } + } + + + function __exit(status) { + // void _exit(int status); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html + + + exitRuntime(); + ABORT = true; + + throw 'exit(' + status + ') called, at ' + new Error().stack; + }function _exit(status) { + __exit(status); + } + + + + + function _close(fildes) { + // int close(int fildes); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/close.html + if (FS.streams[fildes]) { + if (FS.streams[fildes].currentEntry) { + _free(FS.streams[fildes].currentEntry); + } + delete FS.streams[fildes]; + return 0; + } else { + ___setErrNo(ERRNO_CODES.EBADF); + return -1; + } + } + + + + function _fsync(fildes) { + // int fsync(int fildes); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/fsync.html + if (FS.streams[fildes]) { + // We write directly to the file system, so there's nothing to do here. + return 0; + } else { + ___setErrNo(ERRNO_CODES.EBADF); + return -1; + } + }function _fclose(stream) { + // int fclose(FILE *stream); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/fclose.html + _fsync(stream); + return _close(stream); + } + + + function _memset(ptr, value, num, align) { + // TODO: make these settings, and in memcpy, {{'s + if (num >= 20) { + // This is unaligned, but quite large, so work hard to get to aligned settings + var stop = ptr + num; + while (ptr % 4) { // no need to check for stop, since we have large num + HEAP8[ptr++] = value; + } + if (value < 0) value += 256; // make it unsigned + var ptr4 = ptr >> 2, stop4 = stop >> 2, value4 = value | (value << 8) | (value << 16) | (value << 24); + while (ptr4 < stop4) { + HEAP32[ptr4++] = value4; + } + ptr = ptr4 << 2; + while (ptr < stop) { + HEAP8[ptr++] = value; + } + } else { + while (num--) { + HEAP8[ptr++] = value; + } + } + }var _llvm_memset_p0i8_i32=_memset; +var _llvm_dbg_declare; // stub for _llvm_dbg_declare + + function _abort() { + ABORT = true; + throw 'abort() at ' + (new Error().stack); + } + + + function _sysconf(name) { + // long sysconf(int name); + // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html + switch(name) { + case 8: return PAGE_SIZE; + case 54: + case 56: + case 21: + case 61: + case 63: + case 22: + case 67: + case 23: + case 24: + case 25: + case 26: + case 27: + case 69: + case 28: + case 101: + case 70: + case 71: + case 29: + case 30: + case 199: + case 75: + case 76: + case 32: + case 43: + case 44: + case 80: + case 46: + case 47: + case 45: + case 48: + case 49: + case 42: + case 82: + case 33: + case 7: + case 108: + case 109: + case 107: + case 112: + case 119: + case 121: + return 200809; + case 13: + case 104: + case 94: + case 95: + case 34: + case 35: + case 77: + case 81: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 91: + case 94: + case 95: + case 110: + case 111: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 120: + case 40: + case 16: + case 79: + case 19: + return -1; + case 92: + case 93: + case 5: + case 72: + case 6: + case 74: + case 92: + case 93: + case 96: + case 97: + case 98: + case 99: + case 102: + case 103: + case 105: + return 1; + case 38: + case 66: + case 50: + case 51: + case 4: + return 1024; + case 15: + case 64: + case 41: + return 32; + case 55: + case 37: + case 17: + return 2147483647; + case 18: + case 1: + return 47839; + case 59: + case 57: + return 99; + case 68: + case 58: + return 2048; + case 0: return 2097152; + case 3: return 65536; + case 14: return 32768; + case 73: return 32767; + case 39: return 16384; + case 60: return 1000; + case 106: return 700; + case 52: return 256; + case 62: return 255; + case 2: return 100; + case 65: return 64; + case 36: return 20; + case 100: return 16; + case 20: return 6; + case 53: return 4; + } + ___setErrNo(ERRNO_CODES.EINVAL); + return -1; + } + + function _time(ptr) { + var ret = Math.floor(Date.now()/1000); + if (ptr) { + HEAP32[((ptr)>>2)]=ret + } + return ret; + } + + + function ___errno_location() { + return ___setErrNo.ret; + } + var ___errno=___errno_location; + + function _sbrk(bytes) { + // Implement a Linux-like 'memory area' for our 'process'. + // Changes the size of the memory area by |bytes|; returns the + // address of the previous top ('break') of the memory area + + // We need to make sure no one else allocates unfreeable memory! + // We must control this entirely. So we don't even need to do + // unfreeable allocations - the HEAP is ours, from STATICTOP up. + // TODO: We could in theory slice off the top of the HEAP when + // sbrk gets a negative increment in |bytes|... + var self = _sbrk; + if (!self.called) { + STATICTOP = alignMemoryPage(STATICTOP); // make sure we start out aligned + self.called = true; + } + var ret = STATICTOP; + if (bytes != 0) Runtime.staticAlloc(bytes); + return ret; // Previous break location. + } + + + + +__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } }); +___setErrNo(0); + +// === Auto-generated postamble setup entry stuff === + +Module.callMain = function callMain(args) { + var argc = args.length+1; + function pad() { + for (var i = 0; i < 4-1; i++) { + argv.push(0); + } + } + var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_STATIC) ]; + pad(); + for (var i = 0; i < argc-1; i = i + 1) { + argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_STATIC)); + pad(); + } + argv.push(0); + argv = allocate(argv, 'i32', ALLOC_STATIC); + + return _main(argc, argv, 0); +} + + + + + + + + + + + + + + + + + + + + + + +var _need_init; +var _family_8bpc; +var _family_5bpc; +var _stderr; + + + + + + + +var _quic_decode_js_q; + + +var _main_buf; + + + + + + + +var _zeroLUT; +var _bppmask; + + + + + + + + + + +var _evol; + + +var _wmimax; +var _wminext; + + + + + + + + + + +var _besttrigtab; + + + + + + + +var _J; +var _tabrand_chaos; + + + +var ___read_io_word_ptr; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var __gm_; +var _mparams; +STRING_TABLE.__str=allocate([83,112,105,99,101,0] /* Spice\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str3=allocate([81,85,73,67,0] /* QUIC\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str6=allocate([97,115,115,101,114,116,105,111,110,32,96,37,115,39,32,102,97,105,108,101,100,0] /* assertion `%s' faile */, "i8", ALLOC_STATIC); +STRING_TABLE.__str15=allocate([98,97,100,32,105,109,97,103,101,32,116,121,112,101,10,0] /* bad image type\0A\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str16=allocate([98,97,100,32,109,97,103,105,99,10,0] /* bad magic\0A\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str17=allocate([98,97,100,32,118,101,114,115,105,111,110,10,0] /* bad version\0A\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str18=allocate([113,117,105,99,46,99,58,49,53,49,56,0] /* quic.c:1518\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_decode=allocate([113,117,105,99,95,100,101,99,111,100,101,0] /* quic_decode\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str19=allocate([98,117,102,0] /* buf\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str20=allocate([113,117,105,99,46,99,58,49,53,50,53,0] /* quic.c:1525\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str21=allocate([65,66,83,40,115,116,114,105,100,101,41,32,62,61,32,40,105,110,116,41,101,110,99,111,100,101,114,45,62,119,105,100,116,104,32,42,32,52,0] /* ABS(stride) _= (int) */, "i8", ALLOC_STATIC); +STRING_TABLE.__str22=allocate([113,117,105,99,46,99,58,49,53,50,57,0] /* quic.c:1529\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str23=allocate([65,66,83,40,115,116,114,105,100,101,41,32,62,61,32,40,105,110,116,41,101,110,99,111,100,101,114,45,62,119,105,100,116,104,32,42,32,51,0] /* ABS(stride) _= (int) */, "i8", ALLOC_STATIC); +STRING_TABLE.__str24=allocate([117,110,115,117,112,112,111,114,116,101,100,32,111,117,116,112,117,116,32,102,111,114,109,97,116,10,0] /* unsupported output f */, "i8", ALLOC_STATIC); +STRING_TABLE.__str25=allocate([113,117,105,99,46,99,58,49,53,51,55,0] /* quic.c:1537\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str26=allocate([65,66,83,40,115,116,114,105,100,101,41,32,62,61,32,40,105,110,116,41,101,110,99,111,100,101,114,45,62,119,105,100,116,104,32,42,32,50,0] /* ABS(stride) _= (int) */, "i8", ALLOC_STATIC); +STRING_TABLE.__str27=allocate([113,117,105,99,46,99,58,49,53,52,48,0] /* quic.c:1540\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str28=allocate([113,117,105,99,46,99,58,49,53,53,52,0] /* quic.c:1554\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str29=allocate([113,117,105,99,46,99,58,49,54,51,48,0] /* quic.c:1630\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str30=allocate([65,66,83,40,115,116,114,105,100,101,41,32,62,61,32,40,105,110,116,41,101,110,99,111,100,101,114,45,62,119,105,100,116,104,0] /* ABS(stride) _= (int) */, "i8", ALLOC_STATIC); +_need_init=allocate([1], ["i32",0,0,0,0], ALLOC_STATIC); +_family_8bpc=allocate(1408, ["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0], ALLOC_STATIC); +_family_5bpc=allocate(1408, ["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i8","i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0], ALLOC_STATIC); +STRING_TABLE.__str31=allocate([37,115,45,37,115,45,37,115,58,32,0] /* %s-%s-%s: \00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str32=allocate([119,97,110,116,115,32,109,111,114,101,32,115,112,97,99,101,44,32,99,111,109,112,108,101,116,101,32,105,115,32,37,100,10,0] /* wants more space, co */, "i8", ALLOC_STATIC); +STRING_TABLE.__str33=allocate([119,104,97,116,32,100,111,101,115,32,109,111,114,101,95,108,105,110,101,115,32,109,101,97,110,63,10,0] /* what does more_lines */, "i8", ALLOC_STATIC); +STRING_TABLE.__str34=allocate([88,0] /* X\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str35=allocate([32,0] /* \00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str36=allocate([10,0] /* \0A\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str37=allocate([69,114,114,111,114,32,45,32,99,97,110,39,116,32,104,97,110,100,108,101,32,116,121,112,101,32,37,100,32,121,101,116,10,0] /* Error - can't handle */, "i8", ALLOC_STATIC); +_quic_decode_js_q=allocate(1, "i8**", ALLOC_STATIC); +STRING_TABLE._main_membuf1=allocate([81,85,73,67,0,0,0,0,4,0,0,0,32,0,0,0,32,0,0,0,128,129,129,129,255,171,128,128,255,255,36,255,255,255,255,255,255,255,255,255,88,7,0,128,0,214,1,0,64,192,117,0,250,63,127,64,192,58,0,0,0,176,14,0,255,245,175,3,214,1,0,176,128,117,0,0,143,127,29,0,14,0,128,253,172,3,0,176,250,235,0,0,0,0,216,255,58,0,0,235,191,14,0,192,0,128,253,175,3,0,176,14,235,0,0,172,0,64,146,250,3,0,176,14,235,0,0,172,192,58,0,0,0,176,14,0,255,151,175,3,254,111,255,151,251,191,253,223,237,255,246,127,183,255,219,255,223,254,111,255,127,251,191,253,255,237,255,246,255,183,255,219,253,223,254,111,246,127,251,191,218,255,237,255,0,0,0,0] /* QUIC\00\00\00\00\04\ */, "i8", ALLOC_STATIC); +STRING_TABLE._main_membuf2=allocate([81,85,73,67,0,0,0,0,4,0,0,0,32,3,0,0,88,2,0,0,255,128,128,128,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,85,255,255,255,255,255,253,253,0,48,250,255,0,214,1,0,0,128,117,0,16,16,112,29,0,0,207,27,14,0,64,59,183,3,0,208,0,80,210,235,0,0,172,3,58,0,0,235,0,224,57,254,1,0,104,7,118,0,0,218,146,0,16,248,8,250,250,250,237,0,0,0,64,59,0,0,213,223,14,0,176,14,0,128,0,172,3,0,231,248,235,0,160,29,0,128,0,104,7,0,64,192,219,1,175,175,47,9,0,0,64,160,7,0,160,29,219,1,0,104,47,9,96,242,128,160,175,175,128,118,0,0,0,160,29,0,0,48,111,7,0,0,214,1,29,0,128,117,7,0,128,124,218,1,0,104,255,118,0,0,7,0,192,237,214,1,0,88,253,117,0,0,29,0,128,231,104,7,0,160,192,219,1,0,176,14,0,64,0,172,3,0,253,85,235,0,0,172,255,253,127,127,127,73,223,95,18,224,36,96,248,223,243,191,191,191,245,245,37,129,14,0,0,244,180,3,0,208,248,237,0,0,253,253,37,1,0,96,151,255,0,192,58,0,3,0,176,14,237,0,0,172,64,59,0,0,192,222,14,0,0,88,7,0,0,0,214,1,0,0,244,117,14,0,64,59,183,3,0,208,0,32,245,255,0,0,172,3,58,0,0,235,0,192,243,254,3,0,208,14,237,0,0,180,7,0,32,224,214,1,0,88,128,117,0,0,0,160,29,0,1,0,104,7,36,0,206,219,243,191,191,191,192,192,36,64,65,65,193,192,128,191,191,63,0,96,29,0,1,0,88,7,118,0,0,214,160,29,0,128,24,111,7,0,0,214,1,0,0,128,117,0,7,0,96,29,218,1,0,104,243,118,0,0,6,6,38,1,252,253,253,5,255,254,254,146,117,0,0,238,96,29,0,128,0,88,7,0,0,0,218,1,29,0,128,118,127,73,160,190,0,248,127,127,0,96,29,0,1,0,88,7,118,0,0,214,160,29,0,128,96,111,7,0,0,172,3,0,0,0,235,0,0,0,250,58,7,0,160,29,219,1,0,104,0,96,245,255,0,0,172,3,58,0,0,235,0,192,243,254,3,0,208,14,237,0,0,180,7,0,32,224,214,1,0,88,128,117,0,0,0,160,29,0,1,0,104,7,36,0,212,219,240,191,191,191,176,14,0,64,0,172,3,0,0,0,235,0,14,0,64,59,180,3,0,208,0,237,0,0,0,64,59,0,12,76,210,14,4,4,12,12,192,36,96,0,64,192,192,192,0,0,28,64,58,0,0,235,176,14,0,192,0,180,3,0,0,0,237,0,1,0,120,59,118,0,0,218,190,29,0,128,20,10,133,112,4,12,12,12,0,8,7,4,0,0,214,1,29,0,128,117,104,7,0,96,0,218,1,0,15,243,118,0,131,222,163,71,255,255,248,241,163,71,15,179,64,128,231,222,63,126,0,129,232,17,240,31,0,0,122,244,29,0,128,118,111,7,0,160,40,20,2,6,160,175,175,79,143,31,63,128,132,66,33,248,32,250,250,250,252,199,143,31,79,40,20,66,7,162,175,175,16,255,241,227,127,127,66,161,133,66,228,127,255,253,253,9,125,66,161,144,0,0,125,125,3,0,208,14,237,0,0,180,19,10,133,240,31,234,235,235,66,254,199,143,2,2,10,133,30,61,122,0,208,14,0,128,0,180,3,0,241,227,237,0,30,253,255,248,0,160,71,143,1,0,104,7,118,0,0,218,79,40,20,242,33,254,239,239,254,254,132,66,209,163,199,255,218,1,0,232,128,118,0,0,80,191,29,0,125,125,66,161,248,241,131,125,132,66,161,255,73,254,254,254,0,125,125,125,0,160,29,0,1,0,104,7,61,122,248,219,29,0,128,30,104,7,0,160,228,219,1,0,95,159,80,40,126,252,96,95,161,80,232,63,224,190,190,62,242,63,126,252,175,79,40,20,3,0,160,175,237,0,0,180,126,59,0,0,245,9,133,66,199,15,246,245,66,33,255,227,251,250,250,132,255,241,227,7,172,3,0,224,0,235,0,0,0,192,58,0,3,0,208,14,237,0,0,180,163,71,15,254,248,241,131,223,161,255,255,255,223,163,71,15,0,129,192,188,240,31,63,126,122,244,232,17,128,118,0,0,0,160,29,0,10,13,111,7,247,247,39,20,172,3,0,240,0,235,0,0,127,213,58,0,10,3,127,127,247,247,39,20,12,12,76,242,248,251,251,11,127,66,161,48,0,0,127,127,14,0,192,58,172,3,0,176,0,237,0,0,0,64,59,0,244,8,222,14,0,0,61,122,14,0,64,59,182,3,0,208,241,3,8,4,209,3,252,248,63,126,244,232,0,129,192,31,127,66,161,176,241,227,127,127,0,0,252,248,3,0,176,14,235,0,0,172,2,2,2,86,40,20,10,33,8,24,24,24,130,130,2,8,127,127,127,130,192,192,192,36,4,64,64,192,32,160,80,40,209,163,7,32,248,241,3,233,161,80,136,255,191,192,192,64,80,152,191,191,191,191,63,161,96,29,0,128,0,88,7,0,0,0,214,1,29,0,128,117,92,7,0,96,223,95,48,24,132,66,225,223,2,255,254,254,10,133,4,4,12,12,12,20,66,2,4,4,6,6,10,133,254,253,253,5,253,9,133,66,61,122,252,253,5,131,193,30,66,254,253,253,253,253,9,133,3,8,4,254,0,252,248,241,0,128,117,0,7,0,96,29,218,1,0,88,128,118,0,0,32,176,29,0,66,161,144,64,127,129,129,129,66,161,127,127,255,254,254,132,24,40,20,10,247,247,23,24,79,40,20,250,32,240,239,239,232,209,195,64,31,63,126,244,193,3,129,192,2,123,244,232,143,31,12,4,253,255,255,199,30,61,122,8,8,4,230,253,255,248,241,3,163,71,143,128,180,3,0,208,0,237,0,0,48,120,59,0,125,66,161,16,253,9,125,125,0,0,252,253,58,0,0,235,176,14,0,192,0,180,3,0,0,0,237,0,209,35,120,59,0,0,244,232,59,0,0,237,208,14,0,64,0,172,3,0,0,0,235,0,209,163,199,58,223,223,223,232,232,209,163,199,129,63,126,252,163,71,0,2,126,252,232,209,0,2,129,63,209,163,71,143,2,127,252,248,80,8,2,4,190,190,62,161,252,251,251,147,8,48,16,8,192,64,161,80,64,64,192,192,10,10,10,66,2,6,6,6,215,7,1,2,96,48,216,215,192,191,191,191,71,143,0,129,244,232,209,163,223,223,223,122,236,209,163,199,32,96,48,24,10,133,40,32,12,12,12,20,130,5,4,4,125,125,130,130,241,227,7,125,63,126,252,248,244,0,2,129,143,31,61,122,64,32,240,199,232,209,163,71,129,63,126,252,30,61,2,2,241,227,71,143,32,16,8,252,31,61,122,244,32,240,199,143,244,232,193,64,143,30,61,122,252,251,251,107,244,32,16,8,143,31,61,122,64,32,240,199,61,122,244,224,7,6,2,129,8,252,241,227,252,223,63,16,30,61,122,212,121,3,129,192,252,0,2,129,2,129,63,126,122,244,8,0,199,143,31,61,4,64,32,240,80,40,20,2,239,47,48,48,61,128,224,239,227,71,143,30,122,244,248,241,199,143,31,61,8,64,32,240,31,61,122,244,209,227,199,143,24,12,246,232,228,239,239,47,251,19,10,133,80,40,252,251,96,96,96,160,122,8,32,32,199,143,30,61,32,16,248,227,10,133,66,8,253,5,6,6,244,64,252,253,143,31,61,122,64,32,240,199,30,61,122,208,248,227,199,143,245,65,32,16,63,126,244,245,1,129,192,31,143,190,190,62,16,248,227,199,244,232,33,32,23,12,6,123,61,246,247,247,227,71,143,30,16,8,252,241,30,61,122,32,248,227,199,143,40,76,32,16,223,223,159,80,61,128,64,224,227,71,143,30,16,8,252,241,61,122,244,8,240,199,143,31,163,71,64,32,126,252,232,209,2,2,129,63,71,143,30,61,8,252,241,227,122,244,40,16,11,6,131,61,3,255,251,251,126,244,232,209,129,192,31,63,232,209,3,3,16,8,4,246,224,143,31,63,250,255,129,64,61,122,244,48,243,6,2,129,248,1,4,2,4,2,127,252,244,232,17,0,143,31,63,122,8,128,64,224,143,30,61,122,16,248,227,199,10,133,0,32,0,4,4,20,30,63,126,252,209,163,71,143,48,40,244,232,64,64,192,96,209,163,71,15,2,127,252,248,10,65,0,4,247,247,39,20,15,32,16,248,248,209,163,71,30,61,126,252,241,227,71,143,4,16,8,252,71,143,30,61,8,252,241,227,61,122,4,16,227,199,143,30,4,32,16,248,32,160,80,40,241,227,7,32,4,16,8,252,254,132,66,33,4,2,255,254,161,80,136,9,192,192,192,64,130,64,64,64,129,129,130,130,130,130,130,129,129,127,127,127,125,125,1,2,199,143,31,125,67,64,32,240,126,244,232,209,129,192,31,63,132,66,33,1,61,254,254,254,227,71,143,30,16,8,252,241,40,20,10,41,8,24,24,24,133,66,10,8,254,253,253,9,241,3,8,4,40,20,254,248,227,239,239,79,122,244,232,209,48,216,30,61,64,64,192,96,122,244,232,81,224,143,31,63,163,7,129,64,126,252,232,209,4,2,129,63,253,9,133,66,61,122,252,253,227,199,143,30,72,32,16,248,191,63,161,80,3,129,192,191,209,163,71,15,2,127,252,248,163,7,15,4,16,8,236,209,31,63,126,48,255,3,129,192,61,122,8,253,2,129,192,30,2,129,96,179,63,126,252,0,17,0,2,129,63,122,244,232,64,224,143,31,40,20,14,128,176,175,175,79,125,125,193,96,199,143,31,125,246,232,209,227,239,47,24,12,133,66,226,239,244,245,245,9,192,96,48,24,20,10,64,64,48,48,80,40,2,16,16,48,64,161,80,8,71,15,64,64,143,31,208,163,64,32,240,199,240,199,143,31,125,125,66,161,11,6,131,125,252,232,235,235,2,129,63,126,10,133,66,0,122,0,2,2,252,128,30,61,2,129,63,126,209,163,135,4,63,126,252,232,16,3,2,129,129,129,66,161,128,128,128,129,240,199,143,31,127,127,66,161,0,2,129,127,31,61,122,244,32,240,199,143,66,161,112,64,48,125,125,125,128,128,193,96,71,143,30,128,254,248,241,163,61,18,8,4,227,71,143,30,16,8,252,241,9,10,10,42,131,245,245,245,4,4,12,6,61,122,244,0,251,11,6,131,80,8,254,251,64,64,64,161,208,163,71,15,192,31,63,126,63,126,0,129,9,133,194,31,131,245,245,245,4,4,12,6,63,126,252,0,235,19,10,133,12,6,235,235,12,8,8,24,163,71,143,30,4,254,248,241,143,30,28,8,64,32,176,71,63,126,252,192,255,7,2,129,244,232,65,244,13,4,2,123,3,8,4,230,4,254,248,241,209,35,0,8,61,122,244,232,63,0,129,30,64,224,143,31,122,244,48,128,199,143,31,61,116,64,32,240,176,175,175,15,128,128,193,96,143,30,209,128,248,241,163,71,17,8,4,254,39,20,10,129,16,216,215,215,227,199,15,32,24,32,16,248,192,30,61,122,227,7,1,129,16,8,252,241,163,135,217,63,16,8,236,209,32,16,152,55,248,227,199,15,15,6,32,16,248,209,163,71,4,2,127,252,122,244,136,8,199,143,31,61,66,64,32,240,96,143,30,61,126,16,128,64,129,192,31,63,143,162,99,3,16,216,163,71,32,48,111,32,199,143,31,64,220,64,32,240,246,232,209,67,204,21,8,4,227,7,16,8,16,8,252,241,61,122,136,49,2,129,192,30,0,129,192,28,192,31,63,126,15,113,2,129,16,216,163,71,16,152,67,32,227,199,15,32,78,32,16,248,123,244,232,33,115,8,4,2,248,1,4,2,4,2,127,252,30,61,196,9,129,64,96,143,128,64,96,14,224,143,31,63,135,56,129,64,8,236,209,163,8,204,33,16,241,227,7,16,39,16,8,252,61,122,244,16,57,4,2,129,252,0,2,129,2,129,63,126,143,30,226,4,64,32,176,71,64,32,48,135,240,199,143,31,67,156,64,32,4,246,232,209,4,230,16,8,248,241,3,8,19,8,4,254,30,61,122,136,28,2,129,192,126,0,129,192,129,192,31,63,71,15,113,2,32,16,216,163,32,16,152,67,248,227,199,15,33,78,32,16,2,123,244,232,2,115,8,4,252,248,1,4,9,4,2,127,143,30,61,196,14,129,64,96,63,128,64,96,64,224,143,31,163,135,56,129,16,8,236,209,16,8,204,33,252,241,227,7,16,39,16,8,129,61,122,244,129,57,4,2,126,252,0,2,4,2,129,63,71,143,30,226,135,64,32,176,31,64,32,48,32,240,199,143,209,67,156,64,8,4,246,232,8,4,230,16,254,248,241,3,136,19,8,4,192,30,61,122,192,28,2,129,63,126,0,129,2,129,192,31,163,71,15,113,67,32,16,216,15,32,16,152,16,248,227,199,232,33,78,32,4,2,123,244,4,2,115,8,127,252,248,1,196,9,4,2,96,143,30,61,96,14,129,64,31,63,128,64,129,64,224,143,209,163,135,56,33,16,8,236,7,16,8,204,8,252,241,227,244,16,39,16,2,129,61,122,2,129,57,4,63,126,252,0,226,4,2,129,176,71,143,30,48,135,64,32,143,31,64,32,64,32,240,199,232,209,67,156,16,8,4,246,3,8,4,230,4,254,248,241,122,136,19,8,129,192,30,61,129,192,28,2,31,63,126,0,113,2,129,192,216,163,71,15,152,67,32,16,199,15,32,16,32,16,248,227,244,232,33,78,8,4,2,123,1,4,2,115,2,127,252,248,61,196,9,4,64,96,143,30,64,96,14,129,143,31,63,128,56,129,64,224,236,209,163,135,204,33,16,8,227,7,16,8,16,8,252,241,122,244,16,39,4,2,129,61,0,2,129,57,129,63,126,252,30,226,4,2,32,176,71,143,32,48,135,64,199,143,31,64,156,64,32,240,246,232,209,67,230,16,8,4,241,3,8,4,8,4,254,248,61,122,136,19,2,129,192,30,0,129,192,28,192,31,63,126,15,113,2,129,16,216,163,71,16,152,67,32,227,199,15,32,78,32,16,248,123,244,232,33,115,8,4,2,248,1,4,2,4,2,127,252,30,61,196,9,129,64,96,143,128,64,96,14,224,143,31,63,135,56,129,64,8,236,209,163,8,204,33,16,241,227,7,16,39,16,8,252,61,122,244,16,57,4,2,129,252,0,2,129,2,129,63,126,143,30,226,4,64,32,176,71,64,32,48,135,240,199,143,31,67,156,64,32,4,246,232,209,4,230,16,8,248,241,3,8,19,8,4,254,30,61,122,136,28,2,129,192,126,0,129,192,129,192,31,63,71,15,113,2,32,16,216,163,32,16,152,67,248,227,199,15,33,78,32,16,2,123,244,232,2,115,8,4,252,248,1,4,9,4,2,127,143,30,61,196,14,129,64,96,63,128,64,96,64,224,143,31,163,135,56,129,16,8,236,209,16,8,204,33,252,241,227,7,16,39,16,8,129,61,122,244,129,57,4,2,126,252,0,2,4,2,129,63,71,143,30,226,135,64,32,176,31,64,32,48,32,240,199,143,209,67,156,64,8,4,246,232,8,4,230,16,254,248,241,3,136,19,8,4,192,30,61,122,192,28,2,129,63,126,0,129,2,129,192,31,163,71,15,113,67,32,16,216,7,8,8,152,16,248,247,247,215,39,78,32,32,16,216,215,8,8,152,67,248,247,247,7,39,78,32,16,16,216,215,215,8,152,67,32,247,247,7,8,78,32,16,248,216,215,215,39,152,67,32,16,247,7,8,8,32,16,248,247,215,215,39,78,67,32,16,216,7,8,8,152,16,248,247,247,215,39,78,32,32,16,216,215,8,8,152,67,248,247,247,7,39,78,32,16,16,216,215,215,8,152,67,32,247,247,7,8,78,32,16,248,216,215,215,39,152,67,32,16,247,7,8,8,32,16,248,247,215,215,39,78,67,32,16,216,1,8,8,152,2,127,252,248,61,196,9,4,64,96,143,30,64,96,14,129,143,31,63,128,56,129,64,224,236,209,163,135,204,33,16,8,227,7,16,8,16,8,252,241,122,244,16,39,4,2,129,61,0,2,129,57,129,63,126,252,30,226,4,2,32,176,71,143,32,48,135,64,199,143,31,64,156,64,32,240,246,232,209,67,230,16,8,4,241,3,8,4,8,4,254,248,61,122,136,19,2,129,192,30,0,129,192,28,192,31,63,126,15,113,2,129,16,216,163,71,16,152,67,32,227,199,15,32,78,32,16,248,123,244,232,33,115,8,4,2,248,1,4,2,4,2,127,252,30,61,196,9,129,64,96,143,128,64,96,14,224,143,31,63,135,56,129,64,8,236,209,163,8,204,33,16,241,227,7,16,39,16,8,252,61,122,244,16,57,4,2,129,252,0,2,129,2,129,63,126,143,30,226,4,64,32,176,71,64,32,48,135,240,199,143,31,67,156,64,32,4,246,232,209,4,230,16,8,248,241,3,8,19,8,4,254,30,61,122,136,28,2,129,192,126,0,129,192,129,192,31,63,71,15,113,2,32,16,216,163,32,16,152,67,248,227,199,15,33,78,32,16,2,123,244,232,2,115,8,4,252,248,1,4,9,4,2,127,143,30,61,196,14,129,64,96,63,128,64,96,64,224,143,31,163,135,56,129,16,8,236,209,16,8,204,33,252,241,227,7,16,39,16,8,129,61,122,244,129,57,4,2,126,252,0,2,4,2,129,63,71,143,30,226,135,64,32,176,31,64,32,48,32,240,199,143,209,67,156,64,8,4,246,232,8,4,230,16,254,248,241,3,136,19,8,4,192,30,61,122,192,28,2,129,63,126,0,129,2,129,192,31,163,71,15,113,67,32,16,216,15,32,16,152,16,248,227,199,232,33,78,32,4,2,123,244,4,2,115,8,127,252,248,1,196,9,4,2,96,143,30,61,96,14,129,64,31,63,128,64,129,64,224,143,209,163,135,56,33,16,8,236,7,16,8,204,8,252,241,227,244,16,39,16,2,129,61,122,2,129,57,4,63,126,252,0,226,4,2,129,176,71,143,30,48,135,64,32,143,31,64,32,64,32,240,199,232,209,67,156,16,8,4,246,3,8,4,230,4,254,248,241,122,136,19,8,129,192,30,61,129,192,28,2,31,63,126,0,113,2,129,192,216,163,71,15,152,67,32,16,199,15,32,16,32,16,248,227,244,232,33,78,8,4,2,123,1,4,2,115,2,127,252,248,61,196,9,4,64,96,143,30,64,96,14,129,143,31,63,128,56,129,64,224,236,209,163,135,204,33,16,8,227,7,16,8,16,8,252,241,122,244,16,39,4,2,129,61,0,2,129,57,129,63,126,252,30,226,4,2,32,176,71,143,32,48,135,64,199,143,31,64,156,64,32,240,246,232,209,67,230,16,8,4,241,3,8,4,8,4,254,248,61,122,136,19,2,129,192,30,0,129,192,28,192,31,63,126,15,113,2,129,16,216,163,71,16,152,67,32,227,199,15,32,78,32,16,248,123,244,232,33,115,8,4,2,248,1,4,2,4,2,127,252,30,61,196,9,129,64,96,143,128,64,96,14,224,143,31,63,135,56,129,64,8,236,209,163,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,16,8,236,235,4,4,204,33,252,251,251,3,19,39,16,8,8,236,235,235,4,204,33,16,251,251,3,4,39,16,8,252,236,235,235,19,204,33,16,8,251,3,4,4,16,8,252,251,235,235,19,39,33,16,8,236,3,4,4,204,8,252,251,251,235,19,39,16,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,19,231,255,254,135,239,235,235,15,16,16,48,113,254,239,239,248,190,190,62,0,1,1,115,231,255,254,254,239,235,235,19,16,16,48,135,254,239,239,15,190,190,62,113,1,1,115,248,255,254,254,0,235,235,19,231,16,48,135,239,239,239,15,16,190,62,113,254,1,115,248,190,254,254,0,1,235,19,231,255,48,135,239,235,239,15,16,16,62,113,254,239,115,248,190,190,254,0,1,1,80,228,255,254,9,10,10,2,4,244,245,245,252,253,253,1,250,250,250,146,251,251,3,4,125,125,175,255,1,51,254,125,254,254,0,1,0,96,244,255,0,214,1,0,0,128,117,0,7,0,96,29,214,1,0,88,240,117,0,0,23,24,24,8,16,255,247,247,251,125,125,125,3,4,4,204,209,255,251,251,7,0,0,160,214,1,0,88,171,117,0,0,164,0,1,1,247,251,250,250,7,8,8,152,163,255,247,247,176,14,0,64,0,172,3,0,0,0,235,0,14,0,64,59,183,3,0,208,190,190,62,169,1,1,115,252,255,254,254,0,0,0,52,240,58,0,0,235,176,14,0,192,0,180,3,0,0,0,237,0,245,73,121,59,48,215,247,245,239,15,16,16,64,3,255,239,0,176,14,0,0,0,172,3,59,0,0,235,208,14,0,64,148,183,3,0,125,95,95,159,0,1,1,115,240,255,254,254,235,0,0,52,192,58,0,0,0,176,14,0,0,0,180,3,59,0,0,237,245,245,73,121,16,48,215,247,239,239,15,16,0,64,3,255,3,0,176,14,235,0,0,172,64,59,0,0,0,208,14,0,159,148,183,3,115,125,95,95,254,0,1,1,52,240,255,254,0,235,0,0,0,192,58,0,3,0,176,14,237,0,0,180,121,59,0,0,247,245,245,73,16,16,48,215,255,239,239,15,14,0,64,3,172,3,0,176,0,235,0,0,0,64,59,0,3,0,208,14,95,159,148,183,1,115,125,95,254,254,0,1,0,52,240,255,0,0,235,0,14,0,192,58,180,3,0,176,0,237,0,0,73,121,59,0,215,247,245,245,15,16,16,48,3,255,239,239,176,14,0,64,0,172,3,0,0,0,235,0,14,0,64,59,183,3,0,208,95,95,159,148,1,1,115,125,255,254,254,0,73,0,48,240,125,128,128,128,0,0,125,125,0,64,59,0,3,0,208,14,190,190,168,183,2,230,253,190,253,253,1,2,8,160,232,255,215,39,40,40,3,1,222,215,250,250,2,3,117,0,0,250,96,29,0,128,16,88,7,0,254,239,239,15,247,245,245,189,4,4,204,248,255,251,251,3,175,175,79,220,128,128,185,190,127,127,127,128,250,250,196,248,4,204,225,251,251,251,3,4,175,79,156,255,192,28,190,175,191,63,64,64,250,196,249,191,204,225,251,250,251,3,4,4,79,156,255,251,28,190,175,175,63,64,64,192,196,249,191,191,225,251,250,250,3,4,4,204,156,255,251,251,190,175,175,79,64,64,192,28,249,191,191,63,251,250,250,196,4,4,204,225,255,251,251,3,175,175,79,156,64,192,28,190,191,191,63,64,250,250,196,249,4,204,225,251,235,235,3,4,214,1,0,232,128,117,0,0,29,120,29,0,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,8,8,8,8,9,8,8,8,128,128,128,29,128,128,128,128,216,145,128,128,8,8,8,8,8,8,8,8,128,128,29,9,128,128,128,128,145,128,128,128,8,8,8,216,8,8,8,8,128,29,9,8,128,128,128,128,128,128,128,128,8,8,216,145,8,8,8,8,29,9,8,8,128,128,128,128,128,128,128,128,8,216,145,128,32,16,8,8,71,2,129,64,2,129,64,96,32,16,8,4,16,8,236,72,2,129,64,32,129,29,9,4,16,8,4,2,35,129,64,32,129,64,32,176,16,8,4,2,8,4,118,36,129,64,32,16,192,142,4,2,8,4,2,129,145,64,32,16,64,32,16,216,8,4,2,129,4,2,59,18,64,32,16,8,96,71,2,129,4,2,129,64,72,32,16,8,32,16,8,236,4,2,129,64,2,129,29,9,32,16,8,4,176,35,129,64,2,129,64,32,36,16,8,4,16,8,4,118,2,129,64,32,129,192,142,4,16,8,4,2,216,145,64,32,129,64,32,16,18,8,4,2,8,4,2,59,129,64,32,16,64,96,71,2,8,4,2,129,236,72,32,16,64,32,16,8,9,4,2,129,4,2,129,29,64,32,16,8,32,176,35,129,4,2,129,64,118,36,16,8,32,16,8,4,4,2,129,64,2,129,192,142,32,16,8,4,16,216,145,64,2,129,64,32,59,18,8,4,16,8,4,2,2,129,64,32,129,64,96,71,16,8,4,2,8,236,72,32,129,64,32,16,29,9,4,2,8,4,2,129,129,64,32,16,64,32,176,35,8,4,2,129,4,118,36,16,64,32,16,8,142,4,2,129,4,2,129,192,64,32,16,8,32,16,216,145,4,2,129,64,2,59,18,8,32,16,8,4,71,2,129,64,2,129,64,96,32,16,8,4,16,8,236,72,2,129,64,32,129,29,9,4,16,8,4,2,35,129,64,32,129,64,32,176,16,8,4,2,8,4,118,36,129,64,32,16,192,142,4,2,8,4,2,129,145,64,32,16,64,32,16,216,8,4,2,129,4,2,59,18,64,32,16,8,96,71,2,129,4,2,129,64,72,32,16,8,32,16,8,236,4,2,129,64,2,129,29,9,32,16,8,4,176,35,129,64,2,129,64,32,36,16,8,4,16,8,4,118,2,129,64,32,129,192,142,4,16,8,4,2,216,145,64,32,129,64,32,16,18,8,4,2,8,4,2,59,129,64,32,16,64,96,71,2,8,4,2,129,236,72,32,16,64,32,16,8,9,4,2,129,4,2,129,29,64,32,16,8,32,176,35,129,4,2,129,64,118,36,16,8,32,16,8,4,4,2,129,64,2,129,192,142,32,16,8,4,16,216,145,64,2,129,64,32,59,18,8,4,16,8,4,2,2,129,64,32,129,64,96,71,16,8,4,2,8,236,72,32,129,64,32,16,29,9,4,2,8,4,2,129,129,64,32,16,64,32,176,35,8,4,2,129,4,118,36,16,64,32,16,8,142,4,2,129,4,2,129,192,64,32,16,8,32,16,216,145,4,2,129,64,2,59,18,8,32,16,8,4,71,2,129,64,2,129,64,96,32,16,8,4,16,8,236,72,2,129,64,32,129,29,9,4,16,8,4,2,35,129,64,32,129,64,32,176,16,8,4,2,8,4,118,36,129,64,32,16,192,142,4,2,8,4,2,129,145,64,32,16,64,32,16,216,8,4,2,129,4,2,59,18,64,32,16,8,96,71,2,129,4,2,129,64,72,32,16,8,32,16,8,236,4,2,129,64,2,129,29,9,32,16,8,4,176,35,129,64,2,129,64,32,36,16,8,4,16,8,4,118,2,129,64,32,129,192,142,4,16,8,4,2,216,145,64,32,129,64,32,16,18,8,4,2,8,4,2,59,129,64,32,16,64,96,71,2,8,4,2,129,236,72,32,16,64,32,16,8,9,4,2,129,4,2,129,29,64,32,16,8,32,176,35,129,4,2,129,64,118,36,16,8,32,16,8,4,4,2,129,64,2,129,192,142,32,16,8,4,16,216,145,64,2,129,64,32,59,18,8,4,16,8,4,2,2,129,64,32,129,64,96,71,16,8,4,2,8,236,72,32,129,64,32,16,29,9,4,2,8,4,2,129,129,64,32,16,64,32,176,35,8,4,2,129,4,118,36,16,64,32,16,8,142,4,2,129,4,2,129,192,64,32,16,8,32,16,216,145,4,2,129,64,2,59,18,8,32,16,8,4,71,2,129,64,2,129,64,96,32,16,8,4,16,8,236,72,2,129,64,32,129,29,9,4,16,8,4,2,35,129,64,32,129,64,32,176,16,8,4,2,8,4,118,36,129,64,32,16,192,142,4,2,8,4,2,129,145,64,32,16,64,32,16,216,8,4,2,129,4,2,59,18,64,32,16,8,96,71,2,129,4,2,129,64,72,32,16,8,32,16,8,236,4,2,129,64,2,129,29,9,32,16,8,4,176,35,129,64,2,129,64,32,36,16,8,4,16,8,4,118,2,129,64,32,129,192,142,4,16,8,4,2,216,145,64,32,129,64,32,16,18,8,4,2,8,4,2,59,129,64,32,16,64,96,71,2,8,4,2,129,236,72,32,16,64,32,16,8,9,4,2,129,4,2,129,29,64,32,16,8,32,176,35,129,4,2,129,64,118,36,16,8,32,16,8,4,4,2,129,64,2,129,192,142,32,16,8,4,16,216,145,64,2,129,64,32,59,18,8,4,16,8,4,2,2,129,64,32,129,64,96,71,16,8,4,2,8,236,72,32,129,64,32,16,29,9,4,2,8,4,2,129,129,64,32,16,64,32,176,35,8,4,2,129,4,118,36,16,64,32,16,8,142,4,2,129,4,2,129,192,64,32,16,8,32,16,216,145,4,2,129,64,2,59,18,8,32,16,8,4,71,2,129,64,2,129,64,96,32,16,8,4,16,8,236,72,2,129,64,32,129,29,9,4,16,8,4,2,35,129,64,32,129,64,32,176,16,8,4,2,8,4,118,36,129,64,32,16,192,142,4,2,8,4,2,129,145,64,32,16,64,32,16,216,8,4,2,129,4,2,59,18,64,32,16,8,96,71,2,129,4,2,129,64,72,32,16,8,32,16,8,236,4,2,129,64,2,129,29,9,32,16,8,4,176,35,129,64,2,129,64,32,36,16,8,4,16,8,4,118,2,129,64,32,129,192,142,4,16,8,4,2,216,145,64,32,129,64,32,16,18,8,4,2,8,4,2,59,129,64,32,16,64,96,71,2,8,4,2,129,236,72,32,16,64,32,16,8,9,4,2,129,4,2,129,29,64,32,16,8,32,176,35,129,4,2,129,64,118,36,16,8,32,16,8,4,4,2,129,64,2,129,192,142,32,16,8,4,16,216,145,64,2,129,64,32,59,18,8,4,16,8,4,2,2,129,64,32,129,64,96,71,16,8,4,2,8,236,72,32,129,64,32,16,29,9,4,2,8,4,2,129,129,64,32,16,64,32,176,35,8,4,2,129,4,118,36,16,64,32,16,8,142,4,2,129,4,2,129,192,64,32,16,8,32,16,216,145,4,2,129,64,2,59,18,8,32,16,8,4,71,2,129,64,2,129,64,96,32,16,8,4,16,8,236,72,2,129,64,32,129,29,9,4,16,8,4,2,35,129,64,32,129,64,32,176,16,8,4,2,8,4,118,36,129,64,32,16,192,142,4,2,8,4,2,129,145,64,32,16,64,32,16,216,8,4,2,129,4,2,59,18,64,32,16,8,96,71,2,129,4,2,129,64,72,32,16,8,32,16,8,236,4,2,129,64,2,129,29,9,32,16,8,4,176,35,129,64,2,129,64,32,36,16,8,4,191,35,255,119,200,255,29,249,127,71,254,239,145,255,59,242,255,142,252,223,35,255,119,228,255,29,249,191,71,254,239,200,255,59,242,127,142,252,223,145,255,119,228,255,29,249,191,35,254,239,200,255,59,242,127,71,252,223,145,255,119,228,255,142,249,191,35,255,239,200,255,29,242,127,71,254,223,145,255,59,228,255,142,252,191,35,255,119,200,255,29,249,127,71,254,239,145,255,59,242,255,142,252,223,35,255,119,228,255,29,249,191,71,254,239,200,0,0,0,64,0,0,0,0] /* QUIC\00\00\00\00\04\ */, "i8", ALLOC_STATIC); +_main_buf=allocate(1048576, "i8", ALLOC_STATIC); +STRING_TABLE.__str38=allocate([109,101,109,98,117,102,49,0] /* membuf1\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str39=allocate([109,101,109,98,117,102,50,0] /* membuf2\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str40=allocate([114,98,0] /* rb\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str41=allocate([37,115,58,32,114,101,97,100,32,37,100,32,98,121,116,101,115,10,0] /* %s: read %d bytes\0A */, "i8", ALLOC_STATIC); +STRING_TABLE.__str42=allocate([87,104,111,97,33,32,32,102,105,108,101,32,91,37,115,93,32,116,111,111,32,98,105,103,46,46,46,10,0] /* Whoa! file [%s] too */, "i8", ALLOC_STATIC); +STRING_TABLE.__str43=allocate([87,104,111,97,33,32,32,110,111,116,104,105,110,103,32,105,110,32,102,105,108,101,32,91,37,115,93,10,0] /* Whoa! nothing in fi */, "i8", ALLOC_STATIC); +STRING_TABLE.__str44=allocate([87,104,111,97,33,32,32,99,111,117,108,100,110,39,116,32,111,112,101,110,32,102,105,108,101,32,91,37,115,93,10,0] /* Whoa! couldn't open */, "i8", ALLOC_STATIC); +_zeroLUT=allocate(1024, "i32", ALLOC_STATIC); +_bppmask=allocate([0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, 31, 0, 0, 0, 63, 0, 0, 0, 127, 0, 0, 0, 255, 0, 0, 0, 511, 0, 0, 0, 1023, 0, 0, 0, 2047, 0, 0, 0, 4095, 0, 0, 0, 8191, 0, 0, 0, 16383, 0, 0, 0, 32767, 0, 0, 0, 65535, 0, 0, 0, 131071, 0, 0, 0, 262143, 0, 0, 0, 524287, 0, 0, 0, 1048575, 0, 0, 0, 2097151, 0, 0, 0, 4194303, 0, 0, 0, 8388607, 0, 0, 0, 16777215, 0, 0, 0, 33554431, 0, 0, 0, 67108863, 0, 0, 0, 134217727, 0, 0, 0, 268435455, 0, 0, 0, 536870911, 0, 0, 0, 1073741823, 0, 0, 0, 2147483647, 0, 0, 0, -1, 0, 0, 0], ["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0], ALLOC_STATIC); +STRING_TABLE.__str45=allocate([113,117,105,99,46,99,58,56,54,49,0] /* quic.c:861\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___fill_model_structures=allocate([102,105,108,108,95,109,111,100,101,108,95,115,116,114,117,99,116,117,114,101,115,0] /* fill_model_structure */, "i8", ALLOC_STATIC); +STRING_TABLE.__str46=allocate([98,115,116,97,114,116,32,60,32,110,95,98,117,99,107,101,116,115,95,112,116,114,115,0] /* bstart _ n_buckets_p */, "i8", ALLOC_STATIC); +STRING_TABLE.__str47=allocate([113,117,105,99,46,99,58,56,54,52,0] /* quic.c:864\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str48=allocate([98,101,110,100,32,60,32,110,95,98,117,99,107,101,116,115,95,112,116,114,115,0] /* bend _ n_buckets_ptr */, "i8", ALLOC_STATIC); +STRING_TABLE.__str49=allocate([113,117,105,99,46,99,58,56,55,51,0] /* quic.c:873\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str50=allocate([102,114,101,101,95,99,111,117,110,116,101,114,32,45,32,102,97,109,105,108,121,95,115,116,97,116,45,62,99,111,117,110,116,101,114,115,32,61,61,32,110,98,117,99,107,101,116,115,32,42,32,110,99,111,117,110,116,101,114,115,0] /* free_counter - famil */, "i8", ALLOC_STATIC); +STRING_TABLE.__str51=allocate([113,117,105,99,46,99,58,56,57,49,0] /* quic.c:891\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___find_model_params=allocate([102,105,110,100,95,109,111,100,101,108,95,112,97,114,97,109,115,0] /* find_model_params\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str52=allocate([98,112,99,32,60,61,32,56,32,38,38,32,98,112,99,32,62,32,48,0] /* bpc _= 8 && bpc _ 0\ */, "i8", ALLOC_STATIC); +_evol=allocate([3], ["i32",0,0,0,0], ALLOC_STATIC); +STRING_TABLE.__str53=allocate([102,105,110,100,109,111,100,101,108,112,97,114,97,109,115,40,41,58,32,101,118,111,108,32,118,97,108,117,101,32,111,98,115,111,108,101,116,101,33,33,33,10,0] /* findmodelparams(): e */, "i8", ALLOC_STATIC); +STRING_TABLE.__str54=allocate([102,105,110,100,109,111,100,101,108,112,97,114,97,109,115,40,41,58,32,101,118,111,108,32,111,117,116,32,111,102,32,114,97,110,103,101,33,33,33,10,0] /* findmodelparams(): e */, "i8", ALLOC_STATIC); +_wmimax=allocate([6], ["i32",0,0,0,0], ALLOC_STATIC); +_wminext=allocate([2048], ["i32",0,0,0,0], ALLOC_STATIC); +STRING_TABLE.__str55=allocate([113,117,105,99,95,116,109,112,108,46,99,58,54,49,54,0] /* quic_tmpl.c:616\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_one_uncompress_row=allocate([113,117,105,99,95,111,110,101,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,0] /* quic_one_uncompress_ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str56=allocate([40,105,110,116,41,99,104,97,110,110,101,108,45,62,115,116,97,116,101,46,119,109,105,100,120,32,60,61,32,119,109,105,109,97,120,0] /* (int)channel-_state. */, "i8", ALLOC_STATIC); +STRING_TABLE.__str57=allocate([113,117,105,99,95,116,109,112,108,46,99,58,54,49,55,0] /* quic_tmpl.c:617\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str58=allocate([99,104,97,110,110,101,108,45,62,115,116,97,116,101,46,119,109,105,100,120,32,60,61,32,51,50,0] /* channel-_state.wmidx */, "i8", ALLOC_STATIC); +STRING_TABLE.__str59=allocate([113,117,105,99,95,116,109,112,108,46,99,58,54,49,56,0] /* quic_tmpl.c:618\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str60=allocate([119,109,105,110,101,120,116,32,62,32,48,0] /* wminext _ 0\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str61=allocate([113,117,105,99,46,99,58,50,54,57,0] /* quic.c:269\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___set_wm_trigger=allocate([115,101,116,95,119,109,95,116,114,105,103,103,101,114,0] /* set_wm_trigger\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str62=allocate([101,118,111,108,32,60,32,54,0] /* evol _ 6\00 */, "i8", ALLOC_STATIC); +_besttrigtab=allocate([550, 0, 900, 0, 800, 0, 700, 0, 500, 0, 350, 0, 300, 0, 200, 0, 180, 0, 180, 0, 160, 0, 110, 0, 550, 0, 900, 0, 800, 0, 550, 0, 400, 0, 350, 0, 250, 0, 140, 0, 160, 0, 140, 0, 100, 0, 120, 0, 550, 0, 900, 0, 700, 0, 500, 0, 400, 0, 300, 0, 220, 0, 250, 0, 160, 0], ["i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0,"i16",0], ALLOC_STATIC); +STRING_TABLE.__str63=allocate([113,117,105,99,46,99,58,50,55,51,0] /* quic.c:273\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str64=allocate([115,116,97,116,101,45,62,119,109,95,116,114,105,103,103,101,114,32,60,61,32,50,48,48,48,0] /* state-_wm_trigger _= */, "i8", ALLOC_STATIC); +STRING_TABLE.__str65=allocate([113,117,105,99,46,99,58,50,55,52,0] /* quic.c:274\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str66=allocate([115,116,97,116,101,45,62,119,109,95,116,114,105,103,103,101,114,32,62,61,32,49,0] /* state-_wm_trigger _= */, "i8", ALLOC_STATIC); +STRING_TABLE.__str67=allocate([113,117,105,99,95,116,109,112,108,46,99,58,52,57,57,0] /* quic_tmpl.c:499\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_one_uncompress_row_seg=allocate([113,117,105,99,95,111,110,101,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,95,115,101,103,0] /* quic_one_uncompress_ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str68=allocate([101,110,100,32,45,32,105,32,62,32,48,0] /* end - i _ 0\00 */, "i8", ALLOC_STATIC); +_J=allocate([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0], ["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0], ALLOC_STATIC); +_tabrand_chaos=allocate([46495042, 0, 0, 0, 893548311, 0, 0, 0, 794435923, 0, 0, 0, -1840975531, 0, 0, 0, 2077388039, 0, 0, 0, 894197842, 0, 0, 0, 1462934312, 0, 0, 0, 697534094, 0, 0, 0, 1826128012, 0, 0, 0, 343623392, 0, 0, 0, -1713674577, 0, 0, 0, -483701588, 0, 0, 0, 459739748, 0, 0, 0, -1656540026, 0, 0, 0, 1654964626, 0, 0, 0, 101227083, 0, 0, 0, -1640116668, 0, 0, 0, -626266605, 0, 0, 0, 572794346, 0, 0, 0, -1536216291, 0, 0, 0, -849833392, 0, 0, 0, -1950868097, 0, 0, 0, -927516999, 0, 0, 0, 898927923, 0, 0, 0, -676560944, 0, 0, 0, 1606297603, 0, 0, 0, 754696453, 0, 0, 0, 20823118, 0, 0, 0, 2050458127, 0, 0, 0, 972590750, 0, 0, 0, -304773228, 0, 0, 0, -989370743, 0, 0, 0, -55728732, 0, 0, 0, 1690498157, 0, 0, 0, -1279643069, 0, 0, 0, -1988840199, 0, 0, 0, 1510321853, 0, 0, 0, 548392192, 0, 0, 0, 971157512, 0, 0, 0, -2002679227, 0, 0, 0, 1611390505, 0, 0, 0, -208201010, 0, 0, 0, -210040213, 0, 0, 0, 1883326811, 0, 0, 0, 1891043243, 0, 0, 0, 113180603, 0, 0, 0, 1107690783, 0, 0, 0, -516141341, 0, 0, 0, -1045986521, 0, 0, 0, -1851128196, 0, 0, 0, -2104101078, 0, 0, 0, 1932072870, 0, 0, 0, 495393613, 0, 0, 0, 1078522166, 0, 0, 0, -243003778, 0, 0, 0, 1784694977, 0, 0, 0, 1768732442, 0, 0, 0, 2146763203, 0, 0, 0, 264646923, 0, 0, 0, 1474361405, 0, 0, 0, -1933414796, 0, 0, 0, 296035746, 0, 0, 0, -1805044537, 0, 0, 0, 2094565616, 0, 0, 0, -1885501948, 0, 0, 0, 1334241083, 0, 0, 0, 72483606, 0, 0, 0, -554786292, 0, 0, 0, -237046634, 0, 0, 0, 1734898312, 0, 0, 0, -180304462, 0, 0, 0, 574624900, 0, 0, 0, 880305546, 0, 0, 0, -1036495034, 0, 0, 0, 26713132, 0, 0, 0, 1571648456, 0, 0, 0, 52557195, 0, 0, 0, -251733010, 0, 0, 0, -1836945953, 0, 0, 0, 676064371, 0, 0, 0, 1528437109, 0, 0, 0, 64953873, 0, 0, 0, 546717185, 0, 0, 0, -1585647317, 0, 0, 0, 1947039598, 0, 0, 0, -1482244292, 0, 0, 0, 28691684, 0, 0, 0, 286829174, 0, 0, 0, -59790326, 0, 0, 0, -829260133, 0, 0, 0, 12526951, 0, 0, 0, -2140200596, 0, 0, 0, -1129934762, 0, 0, 0, 2036061161, 0, 0, 0, -908311209, 0, 0, 0, -1993754942, 0, 0, 0, 2023576300, 0, 0, 0, 1061142336, 0, 0, 0, -1189514392, 0, 0, 0, -1551100491, 0, 0, 0, -1011593304, 0, 0, 0, -897371216, 0, 0, 0, -1209477744, 0, 0, 0, -1098874901, 0, 0, 0, -1084259488, 0, 0, 0, -643944612, 0, 0, 0, 925444321, 0, 0, 0, 2088074316, 0, 0, 0, 230011220, 0, 0, 0, -1071718910, 0, 0, 0, 533229176, 0, 0, 0, 523863486, 0, 0, 0, -1266656137, 0, 0, 0, 13140218, 0, 0, 0, -1756620014, 0, 0, 0, 900399636, 0, 0, 0, -1294171123, 0, 0, 0, 1526771255, 0, 0, 0, -753684442, 0, 0, 0, -1302292835, 0, 0, 0, 2135722105, 0, 0, 0, 389334227, 0, 0, 0, 1225164337, 0, 0, 0, -1175019487, 0, 0, 0, 1803959919, 0, 0, 0, -823796033, 0, 0, 0, 704170491, 0, 0, 0, 1407019136, 0, 0, 0, 1924534819, 0, 0, 0, 526887421, 0, 0, 0, 168782227, 0, 0, 0, 333811993, 0, 0, 0, 298623278, 0, 0, 0, -26515610, 0, 0, 0, 381087740, 0, 0, 0, -1752068156, 0, 0, 0, -1028086429, 0, 0, 0, -1796016319, 0, 0, 0, 200969370, 0, 0, 0, -783058200, 0, 0, 0, -1042664292, 0, 0, 0, -2026086198, 0, 0, 0, -1795138683, 0, 0, 0, -1688467442, 0, 0, 0, -1131758631, 0, 0, 0, -504712750, 0, 0, 0, 1840025712, 0, 0, 0, 1319758833, 0, 0, 0, -523292460, 0, 0, 0, 519421307, 0, 0, 0, -782171074, 0, 0, 0, 1563402978, 0, 0, 0, -10666834, 0, 0, 0, -2031247481, 0, 0, 0, 715250337, 0, 0, 0, -1116530124, 0, 0, 0, -1634776286, 0, 0, 0, -1312635270, 0, 0, 0, -1038657335, 0, 0, 0, -1585307299, 0, 0, 0, -860874424, 0, 0, 0, -1927901705, 0, 0, 0, 69438718, 0, 0, 0, 915160508, 0, 0, 0, 183164069, 0, 0, 0, -1160635356, 0, 0, 0, 175242981, 0, 0, 0, -1614423950, 0, 0, 0, 1421955782, 0, 0, 0, -63794045, 0, 0, 0, 1736652874, 0, 0, 0, -304398820, 0, 0, 0, 1710820912, 0, 0, 0, -2008362856, 0, 0, 0, -830380198, 0, 0, 0, 1261907837, 0, 0, 0, 1757387321, 0, 0, 0, 1128554270, 0, 0, 0, 1090050251, 0, 0, 0, -1865044810, 0, 0, 0, 1288729218, 0, 0, 0, 882830086, 0, 0, 0, 211637042, 0, 0, 0, 1376462063, 0, 0, 0, -2147351481, 0, 0, 0, 1737974929, 0, 0, 0, 798170275, 0, 0, 0, -23395019, 0, 0, 0, -53280224, 0, 0, 0, 1638524620, 0, 0, 0, -1534601001, 0, 0, 0, 1065115089, 0, 0, 0, 2097227717, 0, 0, 0, 1224023317, 0, 0, 0, 1625204849, 0, 0, 0, -911663945, 0, 0, 0, 1488272307, 0, 0, 0, -1654781139, 0, 0, 0, 1649047732, 0, 0, 0, 819719707, 0, 0, 0, -1679875353, 0, 0, 0, 502645401, 0, 0, 0, 760628135, 0, 0, 0, -186829313, 0, 0, 0, 63606742, 0, 0, 0, 1404337880, 0, 0, 0, 1865161130, 0, 0, 0, -21970444, 0, 0, 0, 1239761976, 0, 0, 0, 790984678, 0, 0, 0, -1081644695, 0, 0, 0, 1917062825, 0, 0, 0, -99897416, 0, 0, 0, 1962259360, 0, 0, 0, 2111002573, 0, 0, 0, -1982983336, 0, 0, 0, 1861406170, 0, 0, 0, 511141875, 0, 0, 0, -1497456677, 0, 0, 0, 1331661048, 0, 0, 0, -1164359110, 0, 0, 0, 147483493, 0, 0, 0, -527878120, 0, 0, 0, -1644125846, 0, 0, 0, -198443889, 0, 0, 0, -1720520996, 0, 0, 0, 1956416337, 0, 0, 0, 851468126, 0, 0, 0, -687439777, 0, 0, 0, 1811658703, 0, 0, 0, -652146160, 0, 0, 0, 832691095, 0, 0, 0, -1841654439, 0, 0, 0, 933732854, 0, 0, 0, 94341217, 0, 0, 0, -901169566, 0, 0, 0, 1695907457, 0, 0, 0, -1889245219, 0, 0, 0, -1417281633, 0, 0, 0, -1825460238, 0, 0, 0, -2045330955, 0, 0, 0, -306358635, 0, 0, 0, -293721679, 0, 0, 0, 825934927, 0, 0, 0, -1190981329, 0, 0, 0, 1127151177, 0, 0, 0, -603310400, 0, 0, 0, 1640967098, 0, 0, 0, -2126034651, 0, 0, 0, -1464416339, 0, 0, 0, -296144418, 0, 0, 0, -1292364403, 0, 0, 0, 1509651465, 0, 0, 0, 775813869, 0, 0, 0, -1695393217, 0, 0, 0, -503393067, 0, 0, 0], ["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0], ALLOC_STATIC); +STRING_TABLE.__str69=allocate([113,117,105,99,46,99,58,52,55,54,0] /* quic.c:476\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___decode_eatbits=allocate([100,101,99,111,100,101,95,101,97,116,98,105,116,115,0] /* decode_eatbits\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str70=allocate([108,101,110,32,62,32,48,32,38,38,32,108,101,110,32,60,32,51,50,0] /* len _ 0 && len _ 32\ */, "i8", ALLOC_STATIC); +___read_io_word_ptr=allocate([12], ["void (%struct.Encoder*)*",0,0,0,0], ALLOC_STATIC); +STRING_TABLE.__str71=allocate([113,117,105,99,46,99,58,52,54,56,0] /* quic.c:468\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___read_io_word=allocate([114,101,97,100,95,105,111,95,119,111,114,100,0] /* read_io_word\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str72=allocate([101,110,99,111,100,101,114,45,62,105,111,95,110,111,119,32,60,32,101,110,99,111,100,101,114,45,62,105,111,95,101,110,100,0] /* encoder-_io_now _ en */, "i8", ALLOC_STATIC); +STRING_TABLE.__str73=allocate([37,115,58,32,110,111,32,109,111,114,101,32,119,111,114,100,115,10,0] /* %s: no more words\0A */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___more_io_words=allocate([109,111,114,101,95,105,111,95,119,111,114,100,115,0] /* more_io_words\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str74=allocate([113,117,105,99,46,99,58,51,57,52,0] /* quic.c:394\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str75=allocate([105,111,95,112,116,114,0] /* io_ptr\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str76=allocate([113,117,105,99,95,102,97,109,105,108,121,95,116,109,112,108,46,99,58,49,49,48,0] /* quic_family_tmpl.c:1 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___find_bucket_8bpc=allocate([102,105,110,100,95,98,117,99,107,101,116,95,56,98,112,99,0] /* find_bucket_8bpc\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str77=allocate([118,97,108,32,60,32,40,48,120,49,85,32,60,60,32,66,80,67,41,0] /* val _ (0x1U __ BPC)\ */, "i8", ALLOC_STATIC); +STRING_TABLE._lzeroes=allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] /* \08\07\06\06\05\05\0 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str78=allocate([113,117,105,99,95,116,109,112,108,46,99,58,52,55,56,0] /* quic_tmpl.c:478\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_one_uncompress_row0=allocate([113,117,105,99,95,111,110,101,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,0] /* quic_one_uncompress_ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str79=allocate([113,117,105,99,95,116,109,112,108,46,99,58,52,55,57,0] /* quic_tmpl.c:479\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str80=allocate([113,117,105,99,95,116,109,112,108,46,99,58,52,56,48,0] /* quic_tmpl.c:480\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str81=allocate([113,117,105,99,95,116,109,112,108,46,99,58,51,57,51,0] /* quic_tmpl.c:393\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_one_uncompress_row0_seg=allocate([113,117,105,99,95,111,110,101,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,95,115,101,103,0] /* quic_one_uncompress_ */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_four_uncompress_row=allocate([113,117,105,99,95,102,111,117,114,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,0] /* quic_four_uncompress */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_four_uncompress_row_seg=allocate([113,117,105,99,95,102,111,117,114,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,95,115,101,103,0] /* quic_four_uncompress */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_four_uncompress_row0=allocate([113,117,105,99,95,102,111,117,114,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,0] /* quic_four_uncompress */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_four_uncompress_row0_seg=allocate([113,117,105,99,95,102,111,117,114,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,95,115,101,103,0] /* quic_four_uncompress */, "i8", ALLOC_STATIC); +STRING_TABLE.__str82=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,55,50,52,0] /* quic_rgb_tmpl.c:724\ */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row=allocate([113,117,105,99,95,114,103,98,49,54,95,116,111,95,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,0] /* quic_rgb16_to_32_unc */, "i8", ALLOC_STATIC); +STRING_TABLE.__str83=allocate([40,105,110,116,41,101,110,99,111,100,101,114,45,62,114,103,98,95,115,116,97,116,101,46,119,109,105,100,120,32,60,61,32,119,109,105,109,97,120,0] /* (int)encoder-_rgb_st */, "i8", ALLOC_STATIC); +STRING_TABLE.__str84=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,55,50,53,0] /* quic_rgb_tmpl.c:725\ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str85=allocate([101,110,99,111,100,101,114,45,62,114,103,98,95,115,116,97,116,101,46,119,109,105,100,120,32,60,61,32,51,50,0] /* encoder-_rgb_state.w */, "i8", ALLOC_STATIC); +STRING_TABLE.__str86=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,55,50,54,0] /* quic_rgb_tmpl.c:726\ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str87=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,54,49,52,0] /* quic_rgb_tmpl.c:614\ */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row_seg=allocate([113,117,105,99,95,114,103,98,49,54,95,116,111,95,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,95,115,101,103,0] /* quic_rgb16_to_32_unc */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___find_bucket_5bpc=allocate([102,105,110,100,95,98,117,99,107,101,116,95,53,98,112,99,0] /* find_bucket_5bpc\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str88=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,53,55,48,0] /* quic_rgb_tmpl.c:570\ */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row0=allocate([113,117,105,99,95,114,103,98,49,54,95,116,111,95,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,0] /* quic_rgb16_to_32_unc */, "i8", ALLOC_STATIC); +STRING_TABLE.__str89=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,53,55,49,0] /* quic_rgb_tmpl.c:571\ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str90=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,53,55,50,0] /* quic_rgb_tmpl.c:572\ */, "i8", ALLOC_STATIC); +STRING_TABLE.__str91=allocate([113,117,105,99,95,114,103,98,95,116,109,112,108,46,99,58,52,57,51,0] /* quic_rgb_tmpl.c:493\ */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_to_32_uncompress_row0_seg=allocate([113,117,105,99,95,114,103,98,49,54,95,116,111,95,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,95,115,101,103,0] /* quic_rgb16_to_32_unc */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row=allocate([113,117,105,99,95,114,103,98,49,54,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,0] /* quic_rgb16_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row_seg=allocate([113,117,105,99,95,114,103,98,49,54,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,95,115,101,103,0] /* quic_rgb16_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row0=allocate([113,117,105,99,95,114,103,98,49,54,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,0] /* quic_rgb16_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb16_uncompress_row0_seg=allocate([113,117,105,99,95,114,103,98,49,54,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,95,115,101,103,0] /* quic_rgb16_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row=allocate([113,117,105,99,95,114,103,98,50,52,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,0] /* quic_rgb24_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row_seg=allocate([113,117,105,99,95,114,103,98,50,52,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,95,115,101,103,0] /* quic_rgb24_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row0=allocate([113,117,105,99,95,114,103,98,50,52,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,0] /* quic_rgb24_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb24_uncompress_row0_seg=allocate([113,117,105,99,95,114,103,98,50,52,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,95,115,101,103,0] /* quic_rgb24_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row=allocate([113,117,105,99,95,114,103,98,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,0] /* quic_rgb32_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row_seg=allocate([113,117,105,99,95,114,103,98,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,95,115,101,103,0] /* quic_rgb32_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row0=allocate([113,117,105,99,95,114,103,98,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,0] /* quic_rgb32_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_rgb32_uncompress_row0_seg=allocate([113,117,105,99,95,114,103,98,51,50,95,117,110,99,111,109,112,114,101,115,115,95,114,111,119,48,95,115,101,103,0] /* quic_rgb32_uncompres */, "i8", ALLOC_STATIC); +STRING_TABLE.__str115=allocate([37,115,58,32,98,97,100,32,98,112,99,32,37,100,10,0] /* %s: bad bpc %d\0A\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___encoder_reste_channels=allocate([101,110,99,111,100,101,114,95,114,101,115,116,101,95,99,104,97,110,110,101,108,115,0] /* encoder_reste_channe */, "i8", ALLOC_STATIC); +STRING_TABLE.__str116=allocate([113,117,105,99,46,99,58,49,48,55,57,0] /* quic.c:1079\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___encoder_reste=allocate([101,110,99,111,100,101,114,95,114,101,115,116,101,0] /* encoder_reste\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str117=allocate([40,40,117,110,115,105,103,110,101,100,32,108,111,110,103,41,105,111,95,112,116,114,32,37,32,52,41,32,61,61,32,40,40,117,110,115,105,103,110,101,100,32,108,111,110,103,41,105,111,95,112,116,114,95,101,110,100,32,37,32,52,41,0] /* ((unsigned long)io_p */, "i8", ALLOC_STATIC); +STRING_TABLE.__str118=allocate([113,117,105,99,46,99,58,49,48,56,48,0] /* quic.c:1080\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str119=allocate([105,111,95,112,116,114,32,60,61,32,105,111,95,112,116,114,95,101,110,100,0] /* io_ptr _= io_ptr_end */, "i8", ALLOC_STATIC); +STRING_TABLE.__str120=allocate([113,117,105,99,46,99,58,49,49,54,49,0] /* quic.c:1161\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.___FUNCTION___quic_image_params=allocate([113,117,105,99,95,105,109,97,103,101,95,112,97,114,97,109,115,0] /* quic_image_params\00 */, "i8", ALLOC_STATIC); +STRING_TABLE.__str121=allocate([99,104,97,110,110,101,108,115,32,38,38,32,98,112,99,0] /* channels && bpc\00 */, "i8", ALLOC_STATIC); +__gm_=allocate(468, ["i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"*",0,0,0,"i32",0,0,0,"i32",0,0,0,"i32",0,0,0,"*",0,0,0,"i32",0,0,0,"*",0,0,0,"i32",0,0,0,"*",0,0,0,"i32",0,0,0], ALLOC_STATIC); +_mparams=allocate(24, "i32", ALLOC_STATIC); +FUNCTION_TABLE = [0,0,_usr_msg,0,_usr_malloc,0,_usr_free,0,_usr_more_space,0,_usr_more_lines,0,___read_io_word,0]; Module["FUNCTION_TABLE"] = FUNCTION_TABLE; + + +function run(args) { + args = args || Module['arguments']; + + if (Module['setStatus']) { + Module['setStatus'](''); // clear the status from "Downloading.." etc. + } + + if (Module['preRun']) { + Module['preRun'](); + } + + var ret = null; + if (Module['_main']) { + preMain(); + ret = Module.callMain(args); + if (!Module['noExitRuntime']) { + exitRuntime(); + } + } + + if (Module['postRun']) { + Module['postRun'](); + } + + return ret; +} +Module['run'] = run; + +// {{PRE_RUN_ADDITIONS}} + +initRuntime(); + +if (Module['noInitialRun']) { + addRunDependency(); +} + +// {{POST_RUN_ADDITIONS}} + + + + + + // {{MODULE_ADDITIONS}} + + +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["_init_decode_io","_spice_log","_quic_image_params","_encoder_reste","_encoder_reste_channels","_quic_decode_begin","_decode_eat32bits","_quic_decode","_quic_rgb32_uncompress_row0","_quic_rgb32_uncompress_row","_quic_rgb24_uncompress_row0","_quic_rgb24_uncompress_row","_quic_rgb16_uncompress_row0","_quic_rgb16_uncompress_row","_quic_rgb16_to_32_uncompress_row0","_quic_rgb16_to_32_uncompress_row","_uncompress_rgba","_uncompress_gray","_quic_create","_init_encoder","_ceil_log_2","_init_zeroLUT","_decorelate_init","_corelate_init","_quic_destroy","_destroy_channel","_quic_init","_family_init","_usr_msg","_usr_malloc","_usr_free","_usr_more_space","_usr_more_lines","_print_a_line","_simple_quic_init","_simple_quic_term","_simple_quic_decode","_quic_decode_js","_free_family_stat","_main","_init_channel","_find_model_params","_init_model_structures","_fill_model_structures","_quic_one_uncompress_row0","_quic_one_uncompress_row","_tabrand","_quic_one_uncompress_row_seg","_set_wm_trigger","_golomb_decoding_8bpc","_find_bucket_8bpc","_decode_eatbits","_quic_one_corelate","_golomb_code_len_8bpc","_cnt_l_zeroes","_quic_one_corelate_0","_update_model_8bpc","_decode_channel_run","_read_io_word","___read_io_word","_more_io_words","_quic_one_uncompress_row0_seg","_quic_four_uncompress_row0","_quic_four_uncompress_row","_quic_four_corelate","_quic_four_corelate_0","_quic_four_uncompress_row_seg","_quic_four_uncompress_row0_seg","_quic_rgb16_to_32_uncompress_row_seg","_golomb_code_len_5bpc","_golomb_decoding_5bpc","_find_bucket_5bpc","_update_model_5bpc","_decode_run","_quic_rgb16_to_32_uncompress_row0_seg","_quic_rgb16_uncompress_row_seg","_quic_rgb16_uncompress_row0_seg","_quic_rgb24_uncompress_row_seg","_quic_rgb24_uncompress_row0_seg","_quic_rgb32_uncompress_row_seg","_stabrand","_encoder_init_rle","_quic_rgb32_uncompress_row0_seg","_malloc","_tmalloc_small","_tmalloc_large","_sys_alloc","_free","_sys_trim","_segment_holding","_release_unused_segments","_init_mparams","_init_top","_mmap_alloc","_init_bins","_prepend_alloc","_add_segment"] + +function getQuic(array_o_data) +{ + var ret = ccall("quic_decode_js", "", [ "array", "number" ], [ array_o_data, array_o_data.length ]); + return ret; +} diff --git a/quic.shell b/quic.shell new file mode 100644 index 0000000..bf04de4 --- /dev/null +++ b/quic.shell @@ -0,0 +1,91 @@ + + + + + +your browser does not support the canvas tag + + +Hi mom! + + diff --git a/spice.css b/spice.css new file mode 100644 index 0000000..450cf05 --- /dev/null +++ b/spice.css @@ -0,0 +1,116 @@ +body +{ + background-color: #999999; + color: #000000; margin: 0; padding: 0; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif; + font-size: 12pt; + line-height: 1.5em; +} + +* { margin: 0; } + +#login +{ + width: 790px; + margin-top: 20px; + margin-left: auto; + margin-right: auto; + padding: 2px 10px 2px 20px; + border: 1px solid #999999; + background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#24414e)); + background: -moz-linear-gradient(top, #fff, #24414e); + background-color: #24414e; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; +} +#login span.logo +{ + display: inline-block; + margin-right: 5px; + padding-right: 10px; + border-right: 1px solid #999999; + font-size: 20px; + font-weight: bolder; + text-shadow: #efefef 1px 1px 0px; +} +#login label { color: #ffffff; text-shadow: 1px 1px 0px rgba(175, 210, 220, 0.8); } +#login input +{ + padding: 5px; + background-color: #fAfAfA; + border: 1px inset #999999; + outline: none; + -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} +#login input#host { width: 200px; } +#login input#port { width: 75px; } +#login input#password { width: 100px; } +#login button +{ + padding: 5px 10px 5px 10px; + margin-left: 5px; + text-shadow: #efefef 1px 1px 0px; + border: 1px outset #999999; + cursor: pointer; + -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; +} +#login button:hover +{ + background-color: #666666; + color: #ffffff; +} + +#spice-area +{ + text-align: center; +} +.spice-screen +{ + display: inline-block; + padding: 10px; + min-width: 800px; + min-height: 600px; + border: solid #222222 1px; + background-color: #333333; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; +} +.spice-message { + width: 700px; + height: 50px; + overflow: auto; + margin-top: 5px; + margin-left: auto; + margin-right: auto; + padding: 10px; + background-color: #efefef; + border: solid #c3c3c3 2px; + font-size: 8pt; + line-height: 1.1em; + font-family: 'Andale Mono', monospace; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); +} +.spice-message p { + margin-bottom: 0em; + margin-top: 0em; +} +.spice-message-warning { + color: orange; +} +.spice-message-error { + color: red; +} + diff --git a/spice.html b/spice.html new file mode 100644 index 0000000..6ab1fed --- /dev/null +++ b/spice.html @@ -0,0 +1,134 @@ + + + + + + + Spice Javascript client + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+
+
+ +
+ +
+ +
+ + + diff --git a/spiceconn.js b/spiceconn.js new file mode 100644 index 0000000..b448881 --- /dev/null +++ b/spiceconn.js @@ -0,0 +1,447 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** SpiceConn +** This is the base Javascript class for establishing and +** managing a connection to a Spice Server. +** It is used to provide core functionality to the Spice main, +** display, inputs, and cursor channels. See main.js for +** usage. +**--------------------------------------------------------------------------*/ +function SpiceConn(o) +{ + if (o === undefined || o.uri === undefined || ! o.uri) + throw new Error("You must specify a uri"); + + this.ws = new WebSocket(o.uri, 'binary'); + + if (! this.ws.binaryType) + throw new Error("WebSocket doesn't support binaryType. Try a different browser."); + + this.connection_id = o.connection_id !== undefined ? o.connection_id : 0; + this.type = o.type !== undefined ? o.type : SPICE_CHANNEL_MAIN; + this.chan_id = o.chan_id !== undefined ? o.chan_id : 0; + if (o.parent !== undefined) + { + this.parent = o.parent; + this.message_id = o.parent.message_id; + this.password = o.parent.password; + } + if (o.screen_id !== undefined) + this.screen_id = o.screen_id; + if (o.dump_id !== undefined) + this.dump_id = o.dump_id; + if (o.message_id !== undefined) + this.message_id = o.message_id; + if (o.password !== undefined) + this.password = o.password; + if (o.onerror !== undefined) + this.onerror = o.onerror; + + this.state = "connecting"; + this.ws.parent = this; + this.wire_reader = new SpiceWireReader(this, this.process_inbound); + this.messages_sent = 0; + this.warnings = []; + + this.ws.addEventListener('open', function(e) { + DEBUG > 0 && console.log(">> WebSockets.onopen"); + DEBUG > 0 && console.log("id " + this.parent.connection_id +"; type " + this.parent.type); + + /*********************************************************************** + ** WHERE IT ALL REALLY BEGINS + ***********************************************************************/ + this.parent.send_hdr(); + this.parent.wire_reader.request(SpiceLinkHeader.prototype.buffer_size()); + this.parent.state = "start"; + }); + this.ws.addEventListener('error', function(e) { + this.parent.log_err(">> WebSockets.onerror" + e.toString()); + this.parent.report_error(e); + }); + this.ws.addEventListener('close', function(e) { + DEBUG > 0 && console.log(">> WebSockets.onclose"); + DEBUG > 0 && console.log("id " + this.parent.connection_id +"; type " + this.parent.type); + DEBUG > 0 && console.log(e); + if (this.parent.state != "closing" && this.parent.state != "error" && this.parent.onerror !== undefined) + { + var e; + if (this.parent.state == "connecting") + e = new Error("Connection refused."); + else if (this.parent.state == "start" || this.parent.state == "link") + e = new Error("Unexpected protocol mismatch."); + else if (this.parent.state == "ticket") + e = new Error("Bad password."); + else + e = new Error("Unexpected close while " + this.parent.state); + + this.parent.onerror(e); + this.parent.log_err(e.toString()); + } + }); + + if (this.ws.readyState == 2 || this.ws.readyState == 3) + throw new Error("Unable to connect to " + o.uri); + + this.timeout = window.setTimeout(spiceconn_timeout, SPICE_CONNECT_TIMEOUT, this); +} + +SpiceConn.prototype = +{ + send_hdr : function () + { + var hdr = new SpiceLinkHeader; + var msg = new SpiceLinkMess; + + msg.connection_id = this.connection_id; + msg.channel_type = this.type; + // FIXME - we're not setting a channel_id... + msg.common_caps.push( + (1 << SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION) | + (1 << SPICE_COMMON_CAP_MINI_HEADER) + ); + + hdr.size = msg.buffer_size(); + + var mb = new ArrayBuffer(hdr.buffer_size() + msg.buffer_size()); + hdr.to_buffer(mb); + msg.to_buffer(mb, hdr.buffer_size()); + + DEBUG > 1 && console.log("Sending header:"); + DEBUG > 2 && hexdump_buffer(mb); + this.ws.send(mb); + }, + + send_ticket: function(ticket) + { + var hdr = new SpiceLinkAuthTicket(); + hdr.auth_mechanism = SPICE_COMMON_CAP_AUTH_SPICE; + // FIXME - we need to implement RSA to make this work right + hdr.encrypted_data = ticket; + var mb = new ArrayBuffer(hdr.buffer_size()); + + hdr.to_buffer(mb); + DEBUG > 1 && console.log("Sending ticket:"); + DEBUG > 2 && hexdump_buffer(mb); + this.ws.send(mb); + }, + + send_msg: function(msg) + { + var mb = new ArrayBuffer(msg.buffer_size()); + msg.to_buffer(mb); + this.messages_sent++; + DEBUG > 0 && console.log(">> hdr " + this.channel_type() + " type " + msg.type + " size " + mb.byteLength); + DEBUG > 2 && hexdump_buffer(mb); + this.ws.send(mb); + }, + + process_inbound: function(mb, saved_header) + { + DEBUG > 2 && console.log(this.type + ": processing message of size " + mb.byteLength + "; state is " + this.state); + if (this.state == "ready") + { + if (saved_header == undefined) + { + var msg = new SpiceMiniData(mb); + + if (msg.type > 500) + { + alert("Something has gone very wrong; we think we have message of type " + msg.type); + debugger; + } + + if (msg.size == 0) + { + this.process_message(msg); + this.wire_reader.request(SpiceMiniData.prototype.buffer_size()); + } + else + { + this.wire_reader.request(msg.size); + this.wire_reader.save_header(msg); + } + } + else + { + saved_header.data = mb; + this.process_message(saved_header); + this.wire_reader.request(SpiceMiniData.prototype.buffer_size()); + this.wire_reader.save_header(undefined); + } + } + + else if (this.state == "start") + { + this.reply_hdr = new SpiceLinkHeader(mb); + if (this.reply_hdr.magic != SPICE_MAGIC) + { + this.state = "error"; + var e = new Error('Error: magic mismatch: ' + this.reply_hdr.magic); + this.report_error(e); + } + else + { + // FIXME - Determine major/minor version requirements + this.wire_reader.request(this.reply_hdr.size); + this.state = "link"; + } + } + + else if (this.state == "link") + { + this.reply_link = new SpiceLinkReply(mb); + // FIXME - Screen the caps - require minihdr at least, right? + if (this.reply_link.error) + { + this.state = "error"; + var e = new Error('Error: reply link error ' + this.reply_link.error); + this.report_error(e); + } + else + { + this.send_ticket(rsa_encrypt(this.reply_link.pub_key, this.password + String.fromCharCode(0))); + this.state = "ticket"; + this.wire_reader.request(SpiceLinkAuthReply.prototype.buffer_size()); + } + } + + else if (this.state == "ticket") + { + this.auth_reply = new SpiceLinkAuthReply(mb); + if (this.auth_reply.auth_code == SPICE_LINK_ERR_OK) + { + DEBUG > 0 && console.log(this.type + ': Connected'); + + if (this.type == SPICE_CHANNEL_DISPLAY) + { + // FIXME - pixmap and glz dictionary config info? + var dinit = new SpiceMsgcDisplayInit(); + var reply = new SpiceMiniData(); + reply.build_msg(SPICE_MSGC_DISPLAY_INIT, dinit); + DEBUG > 0 && console.log("Request display init"); + this.send_msg(reply); + } + this.state = "ready"; + this.wire_reader.request(SpiceMiniData.prototype.buffer_size()); + if (this.timeout) + { + window.clearTimeout(this.timeout); + delete this.timeout; + } + } + else + { + this.state = "error"; + if (this.auth_reply.auth_code == SPICE_LINK_ERR_PERMISSION_DENIED) + { + var e = new Error("Permission denied."); + } + else + { + var e = new Error("Unexpected link error " + this.auth_reply.auth_code); + } + this.report_error(e); + } + } + }, + + process_common_messages : function(msg) + { + if (msg.type == SPICE_MSG_SET_ACK) + { + var ack = new SpiceMsgSetAck(msg.data); + // FIXME - what to do with generation? + this.ack_window = ack.window; + DEBUG > 1 && console.log(this.type + ": set ack to " + ack.window); + this.msgs_until_ack = this.ack_window; + var ackack = new SpiceMsgcAckSync(ack); + var reply = new SpiceMiniData(); + reply.build_msg(SPICE_MSGC_ACK_SYNC, ackack); + this.send_msg(reply); + return true; + } + + if (msg.type == SPICE_MSG_PING) + { + DEBUG > 1 && console.log("ping!"); + var pong = new SpiceMiniData; + pong.type = SPICE_MSGC_PONG; + if (msg.data) + { + pong.data = msg.data.slice(0, 12); + } + pong.size = pong.buffer_size(); + this.send_msg(pong); + return true; + } + + if (msg.type == SPICE_MSG_NOTIFY) + { + // FIXME - Visibility + what + var notify = new SpiceMsgNotify(msg.data); + if (notify.severity == SPICE_NOTIFY_SEVERITY_ERROR) + this.log_err(notify.message); + else if (notify.severity == SPICE_NOTIFY_SEVERITY_WARN ) + this.log_warn(notify.message); + else + this.log_info(notify.message); + return true; + } + + return false; + + }, + + process_message: function(msg) + { + var rc; + DEBUG > 0 && console.log("<< hdr " + this.channel_type() + " type " + msg.type + " size " + (msg.data && msg.data.byteLength)); + rc = this.process_common_messages(msg); + if (rc) + return rc; + + if (this.process_channel_message) + rc = this.process_channel_message(msg); + else + { + this.log_err(this.type + ": No message handlers for this channel; message " + msg.type); + return false; + } + + if (! rc) + this.log_warn(this.type + ": Unknown message type " + msg.type + "!"); + + if (this.msgs_until_ack !== undefined && this.ack_window) + { + this.msgs_until_ack--; + if (this.msgs_until_ack <= 0) + { + this.msgs_until_ack = this.ack_window; + var ack = new SpiceMiniData(); + ack.type = SPICE_MSGC_ACK; + this.send_msg(ack); + DEBUG > 1 && console.log(this.type + ": sent ack"); + } + } + + return rc; + }, + + channel_type: function() + { + if (this.type == SPICE_CHANNEL_MAIN) + return "main"; + else if (this.type == SPICE_CHANNEL_DISPLAY) + return "display"; + else if (this.type == SPICE_CHANNEL_INPUTS) + return "inputs"; + else if (this.type == SPICE_CHANNEL_CURSOR) + return "cursor"; + return "unknown-" + this.type; + + }, + + log_info: function() + { + var msg = Array.prototype.join.call(arguments, " "); + console.log(msg); + if (this.message_id) + { + var p = document.createElement("p"); + p.appendChild(document.createTextNode(msg)); + p.className += "spice-message-info"; + document.getElementById(this.message_id).appendChild(p); + } + }, + + log_warn: function() + { + var msg = Array.prototype.join.call(arguments, " "); + console.log("WARNING: " + msg); + if (this.message_id) + { + var p = document.createElement("p"); + p.appendChild(document.createTextNode(msg)); + p.className += "spice-message-warning"; + document.getElementById(this.message_id).appendChild(p); + } + }, + + log_err: function() + { + var msg = Array.prototype.join.call(arguments, " "); + console.log("ERROR: " + msg); + if (this.message_id) + { + var p = document.createElement("p"); + p.appendChild(document.createTextNode(msg)); + p.className += "spice-message-error"; + document.getElementById(this.message_id).appendChild(p); + } + }, + + known_unimplemented: function(type, msg) + { + if ( (!this.warnings[type]) || DEBUG > 1) + { + var str = ""; + if (DEBUG <= 1) + str = " [ further notices suppressed ]"; + this.log_warn("Unimplemented function " + type + "(" + msg + ")" + str); + this.warnings[type] = true; + } + }, + + report_error: function(e) + { + this.log_err(e.toString()); + if (this.onerror != undefined) + this.onerror(e); + else + throw(e); + }, + + cleanup: function() + { + if (this.timeout) + { + window.clearTimeout(this.timeout); + delete this.timeout; + } + if (this.ws) + { + this.ws.close(); + this.ws = undefined; + } + }, + + handle_timeout: function() + { + var e = new Error("Connection timed out."); + this.report_error(e); + }, +} + +function spiceconn_timeout(sc) +{ + SpiceConn.prototype.handle_timeout.call(sc); +} diff --git a/spicedataview.js b/spicedataview.js new file mode 100644 index 0000000..ef9555d --- /dev/null +++ b/spicedataview.js @@ -0,0 +1,96 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** SpiceDataView +** FIXME FIXME +** This is used because Firefox does not have DataView yet. +** We should use DataView if we have it, because it *has* to +** be faster than this code +**--------------------------------------------------------------------------*/ +function SpiceDataView(buffer, byteOffset, byteLength) +{ + if (byteOffset !== undefined) + { + if (byteLength !== undefined) + this.u8 = new Uint8Array(buffer, byteOffset, byteLength); + else + this.u8 = new Uint8Array(buffer, byteOffset); + } + else + this.u8 = new Uint8Array(buffer); +}; + +SpiceDataView.prototype = { + getUint8: function(byteOffset) + { + return this.u8[byteOffset]; + }, + getUint16: function(byteOffset, littleEndian) + { + var low = 1, high = 0; + if (littleEndian) + { + low = 0; + high = 1; + } + + return (this.u8[byteOffset + high] << 8) | this.u8[byteOffset + low]; + }, + getUint32: function(byteOffset, littleEndian) + { + var low = 2, high = 0; + if (littleEndian) + { + low = 0; + high = 2; + } + + return (this.getUint16(byteOffset + high, littleEndian) << 16) | + this.getUint16(byteOffset + low, littleEndian); + }, + setUint8: function(byteOffset, b) + { + this.u8[byteOffset] = (b & 0xff); + }, + setUint16: function(byteOffset, i, littleEndian) + { + var low = 1, high = 0; + if (littleEndian) + { + low = 0; + high = 1; + } + this.u8[byteOffset + high] = (i & 0xffff) >> 8; + this.u8[byteOffset + low] = (i & 0x00ff); + }, + setUint32: function(byteOffset, w, littleEndian) + { + var low = 2, high = 0; + if (littleEndian) + { + low = 0; + high = 2; + } + + this.setUint16(byteOffset + high, (w & 0xffffffff) >> 16, littleEndian); + this.setUint16(byteOffset + low, (w & 0x0000ffff), littleEndian); + }, +} diff --git a/spicemsg.js b/spicemsg.js new file mode 100644 index 0000000..41b001d --- /dev/null +++ b/spicemsg.js @@ -0,0 +1,791 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** Spice messages +** This file contains classes for passing messages to and from +** a spice server. This file should arguably be generated from +** spice.proto, but it was instead put together by hand. +**--------------------------------------------------------------------------*/ +function SpiceLinkHeader(a, at) +{ + this.magic = SPICE_MAGIC; + this.major_version = SPICE_VERSION_MAJOR; + this.minor_version = SPICE_VERSION_MINOR; + this.size = 0; + if (a !== undefined) + this.from_buffer(a, at); +} + +SpiceLinkHeader.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.magic = ""; + for (var i = 0; i < 4; i++) + this.magic += String.fromCharCode(dv.getUint8(at + i)); + at += 4; + + this.major_version = dv.getUint32(at, true); at += 4; + this.minor_version = dv.getUint32(at, true); at += 4; + this.size = dv.getUint32(at, true); at += 4; + }, + + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + for (var i = 0; i < 4; i++) + dv.setUint8(at + i, this.magic.charCodeAt(i)); + at += 4; + + dv.setUint32(at, this.major_version, true); at += 4; + dv.setUint32(at, this.minor_version, true); at += 4; + dv.setUint32(at, this.size, true); at += 4; + }, + buffer_size: function() + { + return 16; + }, +} + +function SpiceLinkMess(a, at) +{ + this.connection_id = 0; + this.channel_type = 0; + this.channel_id = 0; + this.common_caps = []; + this.channel_caps = []; + + if (a !== undefined) + this.from_buffer(a, at); +} + +SpiceLinkMess.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var i; + var orig_at = at; + var dv = new SpiceDataView(a); + this.connection_id = dv.getUint32(at, true); at += 4; + this.channel_type = dv.getUint8(at, true); at++; + this.channel_id = dv.getUint8(at, true); at++; + var num_common_caps = dv.getUint32(at, true); at += 4; + var num_channel_caps = dv.getUint32(at, true); at += 4; + var caps_offset = dv.getUint32(at, true); at += 4; + + at = orig_at + caps_offset; + this.common_caps = []; + for (i = 0; i < num_common_caps; i++) + { + this.common_caps.unshift(dv.getUint32(at, true)); at += 4; + } + + this.channel_caps = []; + for (i = 0; i < num_channel_caps; i++) + { + this.channel_caps.unshift(dv.getUint32(at, true)); at += 4; + } + }, + + to_buffer: function(a, at) + { + at = at || 0; + var orig_at = at; + var i; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.connection_id, true); at += 4; + dv.setUint8(at, this.channel_type, true); at++; + dv.setUint8(at, this.channel_id, true); at++; + dv.setUint32(at, this.common_caps.length, true); at += 4; + dv.setUint32(at, this.channel_caps.length, true); at += 4; + dv.setUint32(at, (at - orig_at) + 4, true); at += 4; + + for (i = 0; i < this.common_caps.length; i++) + { + dv.setUint32(at, this.common_caps[i], true); at += 4; + } + + for (i = 0; i < this.channel_caps.length; i++) + { + dv.setUint32(at, this.channel_caps[i], true); at += 4; + } + }, + buffer_size: function() + { + return 18 + (4 * this.common_caps.length) + (4 * this.channel_caps.length); + } +} + +function SpiceLinkReply(a, at) +{ + this.error = 0; + this.pub_key = undefined; + this.common_caps = []; + this.channel_caps = []; + + if (a !== undefined) + this.from_buffer(a, at); +} + +SpiceLinkReply.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var i; + var orig_at = at; + var dv = new SpiceDataView(a); + this.error = dv.getUint32(at, true); at += 4; + + this.pub_key = create_rsa_from_mb(a, at); + at += SPICE_TICKET_PUBKEY_BYTES; + + var num_common_caps = dv.getUint32(at, true); at += 4; + var num_channel_caps = dv.getUint32(at, true); at += 4; + var caps_offset = dv.getUint32(at, true); at += 4; + + at = orig_at + caps_offset; + this.common_caps = []; + for (i = 0; i < num_common_caps; i++) + { + this.common_caps.unshift(dv.getUint32(at, true)); at += 4; + } + + this.channel_caps = []; + for (i = 0; i < num_channel_caps; i++) + { + this.channel_caps.unshift(dv.getUint32(at, true)); at += 4; + } + }, +} + +function SpiceLinkAuthTicket(a, at) +{ + this.auth_mechanism = 0; + this.encrypted_data = undefined; +} + +SpiceLinkAuthTicket.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var i; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.auth_mechanism, true); at += 4; + for (i = 0; i < SPICE_TICKET_KEY_PAIR_LENGTH / 8; i++) + { + if (this.encrypted_data && i < this.encrypted_data.length) + dv.setUint8(at, this.encrypted_data[i], true); + else + dv.setUint8(at, 0, true); + at++; + } + }, + buffer_size: function() + { + return 4 + (SPICE_TICKET_KEY_PAIR_LENGTH / 8); + } +} + +function SpiceLinkAuthReply(a, at) +{ + this.auth_code = 0; + if (a !== undefined) + this.from_buffer(a, at); +} + +SpiceLinkAuthReply.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.auth_code = dv.getUint32(at, true); at += 4; + }, + buffer_size: function() + { + return 4; + } +} + +function SpiceMiniData(a, at) +{ + this.type = 0; + this.size = 0; + this.data = undefined; + if (a !== undefined) + this.from_buffer(a, at); +} + +SpiceMiniData.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var i; + var dv = new SpiceDataView(a); + this.type = dv.getUint16(at, true); at += 2; + this.size = dv.getUint32(at, true); at += 4; + if (a.byteLength > at) + { + this.data = a.slice(at); + at += this.data.byteLength; + } + }, + to_buffer : function(a, at) + { + at = at || 0; + var i; + var dv = new SpiceDataView(a); + dv.setUint16(at, this.type, true); at += 2; + dv.setUint32(at, this.data ? this.data.byteLength : 0, true); at += 4; + if (this.data && this.data.byteLength > 0) + { + var u8arr = new Uint8Array(this.data); + for (i = 0; i < u8arr.length; i++, at++) + dv.setUint8(at, u8arr[i], true); + } + }, + build_msg : function(in_type, extra) + { + this.type = in_type; + this.size = extra.buffer_size(); + this.data = new ArrayBuffer(this.size); + extra.to_buffer(this.data); + }, + buffer_size: function() + { + if (this.data) + return 6 + this.data.byteLength; + else + return 6; + }, +} + +function SpiceMsgChannels(a, at) +{ + this.num_of_channels = 0; + this.channels = []; + if (a !== undefined) + this.from_buffer(a, at); +} + +SpiceMsgChannels.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var i; + var dv = new SpiceDataView(a); + this.num_of_channels = dv.getUint32(at, true); at += 4; + for (i = 0; i < this.num_of_channels; i++) + { + var chan = new SpiceChannelId(); + at = chan.from_dv(dv, at, a); + this.channels.push(chan); + } + }, +} + +function SpiceMsgMainInit(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgMainInit.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.session_id = dv.getUint32(at, true); at += 4; + this.display_channels_hint = dv.getUint32(at, true); at += 4; + this.supported_mouse_modes = dv.getUint32(at, true); at += 4; + this.current_mouse_mode = dv.getUint32(at, true); at += 4; + this.agent_connected = dv.getUint32(at, true); at += 4; + this.agent_tokens = dv.getUint32(at, true); at += 4; + this.multi_media_time = dv.getUint32(at, true); at += 4; + this.ram_hint = dv.getUint32(at, true); at += 4; + }, +} + +function SpiceMsgMainMouseMode(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgMainMouseMode.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.supported_modes = dv.getUint16(at, true); at += 2; + this.current_mode = dv.getUint16(at, true); at += 2; + }, +} + +function SpiceMsgSetAck(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgSetAck.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.generation = dv.getUint32(at, true); at += 4; + this.window = dv.getUint32(at, true); at += 4; + }, +} + +function SpiceMsgcAckSync(ack) +{ + this.generation = ack.generation; +} + +SpiceMsgcAckSync.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.generation, true); at += 4; + }, + buffer_size: function() + { + return 4; + } +} + +function SpiceMsgcMainMouseModeRequest(mode) +{ + this.mode = mode; +} + +SpiceMsgcMainMouseModeRequest.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + dv.setUint16(at, this.mode, true); at += 2; + }, + buffer_size: function() + { + return 2; + } +} + +function SpiceMsgNotify(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgNotify.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var i; + var dv = new SpiceDataView(a); + this.time_stamp = []; + this.time_stamp[0] = dv.getUint32(at, true); at += 4; + this.time_stamp[1] = dv.getUint32(at, true); at += 4; + this.severity = dv.getUint32(at, true); at += 4; + this.visibility = dv.getUint32(at, true); at += 4; + this.what = dv.getUint32(at, true); at += 4; + this.message_len = dv.getUint32(at, true); at += 4; + this.message = ""; + for (i = 0; i < this.message_len; i++) + { + var c = dv.getUint8(at, true); at++; + this.message += String.fromCharCode(c); + } + }, +} + +function SpiceMsgcDisplayInit() +{ + this.pixmap_cache_id = 1; + this.glz_dictionary_id = 0; + this.pixmap_cache_size = 10 * 1024 * 1024; + this.glz_dictionary_window_size = 0; +} + +SpiceMsgcDisplayInit.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + dv.setUint8(at, this.pixmap_cache_id, true); at++; + dv.setUint32(at, 0, true); at += 4; + dv.setUint32(at, this.pixmap_cache_size, true); at += 4; + dv.setUint8(at, this.glz_dictionary_id, true); at++; + dv.setUint32(at, this.glz_dictionary_window_size, true); at += 4; + }, + buffer_size: function() + { + return 14; + } +} + +function SpiceMsgDisplayBase() +{ +} + +SpiceMsgDisplayBase.prototype = +{ + from_dv : function(dv, at, mb) + { + this.surface_id = dv.getUint32(at, true); at += 4; + this.box = new SpiceRect; + at = this.box.from_dv(dv, at, mb); + this.clip = new SpiceClip; + return this.clip.from_dv(dv, at, mb); + }, +} + +function SpiceMsgDisplayDrawCopy(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgDisplayDrawCopy.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.base = new SpiceMsgDisplayBase; + at = this.base.from_dv(dv, at, a); + this.data = new SpiceCopy; + return this.data.from_dv(dv, at, a); + }, +} + +function SpiceMsgDisplayDrawFill(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgDisplayDrawFill.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.base = new SpiceMsgDisplayBase; + at = this.base.from_dv(dv, at, a); + this.data = new SpiceFill; + return this.data.from_dv(dv, at, a); + }, +} + +function SpiceMsgDisplayCopyBits(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgDisplayCopyBits.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.base = new SpiceMsgDisplayBase; + at = this.base.from_dv(dv, at, a); + this.src_pos = new SpicePoint; + return this.src_pos.from_dv(dv, at, a); + }, +} + + +function SpiceMsgSurfaceCreate(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgSurfaceCreate.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.surface = new SpiceSurface; + return this.surface.from_dv(dv, at, a); + }, +} + +function SpiceMsgSurfaceDestroy(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgSurfaceDestroy.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.surface_id = dv.getUint32(at, true); at += 4; + }, +} + +function SpiceMsgInputsInit(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgInputsInit.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.keyboard_modifiers = dv.getUint16(at, true); at += 2; + return at; + }, +} + +function SpiceMsgInputsKeyModifiers(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgInputsKeyModifiers.prototype = +{ + from_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.keyboard_modifiers = dv.getUint16(at, true); at += 2; + return at; + }, +} + +function SpiceMsgCursorInit(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgCursorInit.prototype = +{ + from_buffer: function(a, at, mb) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.position = new SpicePoint16; + at = this.position.from_dv(dv, at, mb); + this.trail_length = dv.getUint16(at, true); at += 2; + this.trail_frequency = dv.getUint16(at, true); at += 2; + this.visible = dv.getUint8(at, true); at ++; + this.cursor = new SpiceCursor; + return this.cursor.from_dv(dv, at, a); + }, +} + + +function SpiceMsgCursorSet(a, at) +{ + this.from_buffer(a, at); +} + +SpiceMsgCursorSet.prototype = +{ + from_buffer: function(a, at, mb) + { + at = at || 0; + var dv = new SpiceDataView(a); + this.position = new SpicePoint16; + at = this.position.from_dv(dv, at, mb); + this.visible = dv.getUint8(at, true); at ++; + this.cursor = new SpiceCursor; + return this.cursor.from_dv(dv, at, a); + }, +} + + +function SpiceMsgcMousePosition(sc, e) +{ + // FIXME - figure out how to correctly compute display_id + this.display_id = 0; + this.buttons_state = sc.buttons_state; + if (e) + { + this.x = e.clientX - sc.display.surfaces[sc.display.primary_surface].canvas.offsetLeft; + this.y = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop; + sc.mousex = this.x; + sc.mousey = this.y; + } + else + { + this.x = this.y = this.buttons_state = 0; + } +} + +SpiceMsgcMousePosition.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.x, true); at += 4; + dv.setUint32(at, this.y, true); at += 4; + dv.setUint16(at, this.buttons_state, true); at += 2; + dv.setUint8(at, this.display_id, true); at += 1; + return at; + }, + buffer_size: function() + { + return 11; + } +} + +function SpiceMsgcMouseMotion(sc, e) +{ + // FIXME - figure out how to correctly compute display_id + this.display_id = 0; + this.buttons_state = sc.buttons_state; + if (e) + { + this.x = e.clientX - sc.display.surfaces[sc.display.primary_surface].canvas.offsetLeft; + this.y = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop; + + if (sc.mousex !== undefined) + { + this.x -= sc.mousex; + this.y -= sc.mousey; + } + sc.mousex = e.clientX - sc.display.surfaces[sc.display.primary_surface].canvas.offsetLeft; + sc.mousey = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop; + } + else + { + this.x = this.y = this.buttons_state = 0; + } +} + +/* Use the same functions as for MousePosition */ +SpiceMsgcMouseMotion.prototype.to_buffer = SpiceMsgcMousePosition.prototype.to_buffer; +SpiceMsgcMouseMotion.prototype.buffer_size = SpiceMsgcMousePosition.prototype.buffer_size; + +function SpiceMsgcMousePress(sc, e) +{ + if (e) + { + this.button = e.button + 1; + this.buttons_state = 1 << e.button; + sc.buttons_state = this.buttons_state; + } + else + { + this.button = SPICE_MOUSE_BUTTON_LEFT; + this.buttons_state = SPICE_MOUSE_BUTTON_MASK_LEFT; + } +} + +SpiceMsgcMousePress.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + dv.setUint8(at, this.button, true); at ++; + dv.setUint16(at, this.buttons_state, true); at += 2; + return at; + }, + buffer_size: function() + { + return 3; + } +} + +function SpiceMsgcMouseRelease(sc, e) +{ + if (e) + { + this.button = e.button + 1; + this.buttons_state = 0; + sc.buttons_state = this.buttons_state; + } + else + { + this.button = SPICE_MOUSE_BUTTON_LEFT; + this.buttons_state = 0; + } +} + +/* Use the same functions as for MousePress */ +SpiceMsgcMouseRelease.prototype.to_buffer = SpiceMsgcMousePress.prototype.to_buffer; +SpiceMsgcMouseRelease.prototype.buffer_size = SpiceMsgcMousePress.prototype.buffer_size; + + +function SpiceMsgcKeyDown(e) +{ + if (e) + { + this.code = keycode_to_start_scan(e.keyCode); + } + else + { + this.code = 0; + } +} + +SpiceMsgcKeyDown.prototype = +{ + to_buffer: function(a, at) + { + at = at || 0; + var dv = new SpiceDataView(a); + dv.setUint32(at, this.code, true); at += 4; + return at; + }, + buffer_size: function() + { + return 4; + } +} + +function SpiceMsgcKeyUp(e) +{ + if (e) + { + this.code = keycode_to_end_scan(e.keyCode); + } + else + { + this.code = 0; + } +} + +/* Use the same functions as for KeyDown */ +SpiceMsgcKeyUp.prototype.to_buffer = SpiceMsgcKeyDown.prototype.to_buffer; +SpiceMsgcKeyUp.prototype.buffer_size = SpiceMsgcKeyDown.prototype.buffer_size; diff --git a/spicetype.js b/spicetype.js new file mode 100644 index 0000000..f7c9661 --- /dev/null +++ b/spicetype.js @@ -0,0 +1,455 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** Spice types +** This file contains classes for common spice types. +** Generally, they are used as helpers in reading and writing messages +** to and from the server. +**--------------------------------------------------------------------------*/ + +function SpiceChannelId() +{ +} +SpiceChannelId.prototype = +{ + from_dv: function(dv, at, mb) + { + this.type = dv.getUint8(at, true); at ++; + this.id = dv.getUint8(at, true); at ++; + return at; + }, +} + +function SpiceRect() +{ +} + +SpiceRect.prototype = +{ + from_dv: function(dv, at, mb) + { + this.top = dv.getUint32(at, true); at += 4; + this.left = dv.getUint32(at, true); at += 4; + this.bottom = dv.getUint32(at, true); at += 4; + this.right = dv.getUint32(at, true); at += 4; + return at; + }, + is_same_size : function(r) + { + if ((this.bottom - this.top) == (r.bottom - r.top) && + (this.right - this.left) == (r.right - r.left) ) + return true; + + return false; + }, +} + +function SpiceClipRects() +{ +} + +SpiceClipRects.prototype = +{ + from_dv: function(dv, at, mb) + { + var i; + this.num_rects = dv.getUint32(at, true); at += 4; + if (this.num_rects > 0) + this.rects = []; + for (i = 0; i < this.num_rects; i++) + { + this.rects[i] = new SpiceRect(); + at = this.rects[i].from_dv(dv, at, mb); + } + return at; + }, +} + +function SpiceClip() +{ +} + +SpiceClip.prototype = +{ + from_dv: function(dv, at, mb) + { + this.type = dv.getUint8(at, true); at ++; + if (this.type == SPICE_CLIP_TYPE_RECTS) + { + this.rects = new SpiceClipRects(); + at = this.rects.from_dv(dv, at, mb); + } + return at; + }, +} + +function SpiceImageDescriptor() +{ +} + +SpiceImageDescriptor.prototype = +{ + from_dv: function(dv, at, mb) + { + this.id = dv.getUint32(at, true); at += 4; + this.id += (dv.getUint32(at, true) << 32); at += 4; + this.type = dv.getUint8(at, true); at ++; + this.flags = dv.getUint8(at, true); at ++; + this.width = dv.getUint32(at, true); at += 4; + this.height= dv.getUint32(at, true); at += 4; + return at; + }, +} + +function SpicePalette() +{ +} + +SpicePalette.prototype = +{ + from_dv: function(dv, at, mb) + { + var i; + this.unique = []; + this.unique[0] = dv.getUint32(at, true); at += 4; + this.unique[1] = dv.getUint32(at, true); at += 4; + this.num_ents = dv.getUint16(at, true); at += 2; + this.ents = []; + for (i = 0; i < this.num_ents; i++) + { + this.ents[i] = dv.getUint32(at, true); at += 4; + } + return at; + }, +} + +function SpiceBitmap() +{ +} + +SpiceBitmap.prototype = +{ + from_dv: function(dv, at, mb) + { + this.format = dv.getUint8(at, true); at++; + this.flags = dv.getUint8(at, true); at++; + this.x = dv.getUint32(at, true); at += 4; + this.y = dv.getUint32(at, true); at += 4; + this.stride = dv.getUint32(at, true); at += 4; + if (this.flags & SPICE_BITMAP_FLAGS_PAL_FROM_CACHE) + { + this.palette_id = []; + this.palette_id[0] = dv.getUint32(at, true); at += 4; + this.palette_id[1] = dv.getUint32(at, true); at += 4; + } + else + { + var offset = dv.getUint32(at, true); at += 4; + if (offset == 0) + this.palette = null; + else + { + this.palette = new SpicePalette; + this.palette.from_dv(dv, offset, mb); + } + } + // FIXME - should probably constrain this to the offset + // of palette, if non zero + this.data = mb.slice(at); + at += this.data.byteLength; + return at; + }, +} + +function SpiceImage() +{ +} + +SpiceImage.prototype = +{ + from_dv: function(dv, at, mb) + { + this.descriptor = new SpiceImageDescriptor; + at = this.descriptor.from_dv(dv, at, mb); + + if (this.descriptor.type == SPICE_IMAGE_TYPE_LZ_RGB) + { + this.lz_rgb = new Object(); + this.lz_rgb.length = dv.getUint32(at, true); at += 4; + var initial_at = at; + this.lz_rgb.magic = ""; + for (var i = 3; i >= 0; i--) + this.lz_rgb.magic += String.fromCharCode(dv.getUint8(at + i)); + at += 4; + + // NOTE: The endian change is *correct* + this.lz_rgb.version = dv.getUint32(at); at += 4; + this.lz_rgb.type = dv.getUint32(at); at += 4; + this.lz_rgb.width = dv.getUint32(at); at += 4; + this.lz_rgb.height = dv.getUint32(at); at += 4; + this.lz_rgb.stride = dv.getUint32(at); at += 4; + this.lz_rgb.top_down = dv.getUint32(at); at += 4; + + var header_size = at - initial_at; + + this.lz_rgb.data = mb.slice(at, this.lz_rgb.length + at - header_size); + at += this.lz_rgb.data.byteLength; + + } + + if (this.descriptor.type == SPICE_IMAGE_TYPE_BITMAP) + { + this.bitmap = new SpiceBitmap; + at = this.bitmap.from_dv(dv, at, mb); + } + + if (this.descriptor.type == SPICE_IMAGE_TYPE_SURFACE) + { + this.surface_id = dv.getUint32(at, true); at += 4; + } + + if (this.descriptor.type == SPICE_IMAGE_TYPE_JPEG) + { + this.jpeg = new Object; + this.jpeg.data_size = dv.getUint32(at, true); at += 4; + this.jpeg.data = mb.slice(at); + at += this.jpeg.data.byteLength; + } + + if (this.descriptor.type == SPICE_IMAGE_TYPE_QUIC) + { + var tmparr = []; + var i; + this.quicr_length = dv.getUint32(at, true); at += 4; + var qdv = new Uint8Array(mb.slice(at)); + for (i = 0; i < qdv.length; i++) + tmparr[i] = qdv[i]; + this.quic = getQuic(tmparr); + at += qdv.length; + } + return at; + }, +} + + +function SpiceQMask() +{ +} + +SpiceQMask.prototype = +{ + from_dv: function(dv, at, mb) + { + this.flags = dv.getUint8(at, true); at++; + this.pos = new SpicePoint; + at = this.pos.from_dv(dv, at, mb); + var offset = dv.getUint32(at, true); at += 4; + if (offset == 0) + { + this.bitmap = null; + return at; + } + + this.bitmap = new SpiceImage; + return this.bitmap.from_dv(dv, offset, mb); + }, +} + + +function SpicePattern() +{ +} + +SpicePattern.prototype = +{ + from_dv: function(dv, at, mb) + { + var offset = dv.getUint32(at, true); at += 4; + if (offset == 0) + { + this.pat = null; + } + else + { + this.pat = new SpiceImage; + this.pat.from_dv(dv, offset, mb); + } + + this.pos = new SpicePoint; + return this.pos.from_dv(dv, at, mb); + } +} + +function SpiceBrush() +{ +} + +SpiceBrush.prototype = +{ + from_dv: function(dv, at, mb) + { + this.type = dv.getUint8(at, true); at ++; + if (this.type == SPICE_BRUSH_TYPE_SOLID) + { + this.color = dv.getUint32(at, true); at += 4; + } + else if (this.type == SPICE_BRUSH_TYPE_PATTERN) + { + this.pattern = new SpicePattern; + at = this.pattern.from_dv(dv, at, mb); + } + return at; + }, +} + +function SpiceFill() +{ +} + +SpiceFill.prototype = +{ + from_dv: function(dv, at, mb) + { + this.brush = new SpiceBrush; + at = this.brush.from_dv(dv, at, mb); + this.rop_descriptor = dv.getUint16(at, true); at += 2; + this.mask = new SpiceQMask; + return this.mask.from_dv(dv, at, mb); + }, +} + + +function SpiceCopy() +{ +} + +SpiceCopy.prototype = +{ + from_dv: function(dv, at, mb) + { + var offset = dv.getUint32(at, true); at += 4; + if (offset == 0) + { + this.src_bitmap = null; + } + else + { + this.src_bitmap = new SpiceImage; + this.src_bitmap.from_dv(dv, offset, mb); + } + this.src_area = new SpiceRect; + at = this.src_area.from_dv(dv, at, mb); + this.rop_descriptor = dv.getUint16(at, true); at += 2; + this.scale_mode = dv.getUint8(at, true); at ++; + this.mask = new SpiceQMask; + return this.mask.from_dv(dv, at, mb); + }, +} + +function SpicePoint16() +{ +} + +SpicePoint16.prototype = +{ + from_dv: function(dv, at, mb) + { + this.x = dv.getUint16(at, true); at += 2; + this.y = dv.getUint16(at, true); at += 2; + return at; + }, +} + +function SpicePoint() +{ +} + +SpicePoint.prototype = +{ + from_dv: function(dv, at, mb) + { + this.x = dv.getUint32(at, true); at += 4; + this.y = dv.getUint32(at, true); at += 4; + return at; + }, +} + +function SpiceCursorHeader() +{ +} + +SpiceCursorHeader.prototype = +{ + from_dv: function(dv, at, mb) + { + this.unique = []; + this.unique[0] = dv.getUint32(at, true); at += 4; + this.unique[1] = dv.getUint32(at, true); at += 4; + this.type = dv.getUint8(at, true); at ++; + this.width = dv.getUint16(at, true); at += 2; + this.height = dv.getUint16(at, true); at += 2; + this.hot_spot_x = dv.getUint16(at, true); at += 2; + this.hot_spot_y = dv.getUint16(at, true); at += 2; + return at; + }, +} + +function SpiceCursor() +{ +} + +SpiceCursor.prototype = +{ + from_dv: function(dv, at, mb) + { + this.flags = dv.getUint16(at, true); at += 2; + if (this.flags & SPICE_CURSOR_FLAGS_NONE) + this.header = null; + else + { + this.header = new SpiceCursorHeader; + at = this.header.from_dv(dv, at, mb); + this.data = mb.slice(at); + at += this.data.byteLength; + } + return at; + }, +} + +function SpiceSurface() +{ +} + +SpiceSurface.prototype = +{ + from_dv: function(dv, at, mb) + { + this.surface_id = dv.getUint32(at, true); at += 4; + this.width = dv.getUint32(at, true); at += 4; + this.height = dv.getUint32(at, true); at += 4; + this.format = dv.getUint32(at, true); at += 4; + this.flags = dv.getUint32(at, true); at += 4; + return at; + }, +} + +/* FIXME - SpiceImage types lz_plt, jpeg, zlib_glz, and jpeg_alpha are + completely unimplemented */ diff --git a/thirdparty/jsbn.js b/thirdparty/jsbn.js new file mode 100644 index 0000000..9b9476e --- /dev/null +++ b/thirdparty/jsbn.js @@ -0,0 +1,589 @@ +// Downloaded from http://www-cs-students.stanford.edu/~tjw/jsbn/ by Jeremy White on 6/1/2012 + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + + +// Basic JavaScript BN library - subset useful for RSA encryption. + +// Bits per digit +var dbits; + +// JavaScript engine analysis +var canary = 0xdeadbeefcafe; +var j_lm = ((canary&0xffffff)==0xefcafe); + +// (public) Constructor +function BigInteger(a,b,c) { + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); +} + +// return new, unset BigInteger +function nbi() { return new BigInteger(null); } + +// am: Compute w_j += (x*this_i), propagate carries, +// c is initial carry, returns final carry. +// c < 3*dvalue, x < 2*dvalue, this_i < dvalue +// We need to select the fastest one that works in this environment. + +// am1: use a single mult and divide to get the high bits, +// max digit bits should be 26 because +// max internal value = 2*dvalue^2-2*dvalue (< 2^53) +function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this[i++]+w[j]+c; + c = Math.floor(v/0x4000000); + w[j++] = v&0x3ffffff; + } + return c; +} +// am2 avoids a big mult-and-extract completely. +// Max digit bits should be <= 30 because we do bitwise ops +// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) +function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this[i]&0x7fff; + var h = this[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w[j++] = l&0x3fffffff; + } + return c; +} +// Alternately, set max digit bits to 28 since some +// browsers slow down when dealing with 32-bit numbers. +function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this[i]&0x3fff; + var h = this[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w[j++] = l&0xfffffff; + } + return c; +} +if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; +} +else if(j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; +} +else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; +} + +BigInteger.prototype.DB = dbits; +BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; + r.t = this.t; + r.s = this.s; +} + +// (protected) set from integer value x, -DV <= x < DV +function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this[0] = x; + else if(x < -1) this[0] = x+DV; + else this.t = 0; +} + +// return bigint initialized to value +function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + +// (protected) set from string and radix +function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this[this.t++] = x; + else if(sh+k > this.DB) { + this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } + else + this[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; +} + +// (public) return string representation in given radix +function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this[i]&((1<>(p+=this.DB-k); + } + else { + d = (this[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; +} + +// (public) -this +function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + +// (public) |this| +function bnAbs() { return (this.s<0)?this.negate():this; } + +// (public) return + if this > a, - if this < a, 0 if equal +function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return r; + while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; + return 0; +} + +// returns bit length of the integer x +function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; +} + +// (public) return the number of bits in "this" +function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); +} + +// (protected) r = this << n*DB +function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; + for(i = n-1; i >= 0; --i) r[i] = 0; + r.t = this.t+n; + r.s = this.s; +} + +// (protected) r = this >> n*DB +function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r[i-n] = this[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; +} + +// (protected) r = this << n +function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r[i+ds+1] = (this[i]>>cbs)|c; + c = (this[i]&bm)<= 0; --i) r[i] = 0; + r[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); +} + +// (protected) r = this >> n +function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r[i-ds-1] |= (this[i]&bm)<>bs; + } + if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r[i++] = this.DV+c; + else if(c > 0) r[i++] = c; + r.t = i; + r.clamp(); +} + +// (protected) r = this * a, r != this,a (HAC 14.12) +// "this" should be the larger one if appropriate. +function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); +} + +// (protected) r = this^2, r != this (HAC 14.16) +function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x[i],r,2*i,0,1); + if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r[i+x.t] -= x.DV; + r[i+x.t+1] = 1; + } + } + if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); + r.s = 0; + r.clamp(); +} + +// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) +// r != q, this != m. q or r may be null. +function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); + if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); +} + +// (public) this mod a +function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; +} + +// Modular reduction using "classic" algorithm +function Classic(m) { this.m = m; } +function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; +} +function cRevert(x) { return x; } +function cReduce(x) { x.divRemTo(this.m,null,x); } +function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } +function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +Classic.prototype.convert = cConvert; +Classic.prototype.revert = cRevert; +Classic.prototype.reduce = cReduce; +Classic.prototype.mulTo = cMulTo; +Classic.prototype.sqrTo = cSqrTo; + +// (protected) return "-1/this % 2^DB"; useful for Mont. reduction +// justification: +// xy == 1 (mod m) +// xy = 1+km +// xy(2-xy) = (1+km)(1-km) +// x[y(2-xy)] = 1-k^2m^2 +// x[y(2-xy)] == 1 (mod m^2) +// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 +// should reduce x and y(2-xy) by m^2 at each step to keep size bounded. +// JS multiply "overflows" differently from C/C++, so care is needed here. +function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; +} + +// Montgomery reduction +function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; +} + +// xR mod m +function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; +} + +// x/R mod m +function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; +} + +// x = x/R mod m (HAC 14.32) +function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); +} + +// r = "x^2/R mod m"; x != r +function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +// r = "xy/R mod m"; x,y != r +function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + +Montgomery.prototype.convert = montConvert; +Montgomery.prototype.revert = montRevert; +Montgomery.prototype.reduce = montReduce; +Montgomery.prototype.mulTo = montMulTo; +Montgomery.prototype.sqrTo = montSqrTo; + +// (protected) true iff this is even +function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } + +// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) +function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); +} + +// (public) this^e % m, 0 <= e < 2^32 +function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); +} + +// protected +BigInteger.prototype.copyTo = bnpCopyTo; +BigInteger.prototype.fromInt = bnpFromInt; +BigInteger.prototype.fromString = bnpFromString; +BigInteger.prototype.clamp = bnpClamp; +BigInteger.prototype.dlShiftTo = bnpDLShiftTo; +BigInteger.prototype.drShiftTo = bnpDRShiftTo; +BigInteger.prototype.lShiftTo = bnpLShiftTo; +BigInteger.prototype.rShiftTo = bnpRShiftTo; +BigInteger.prototype.subTo = bnpSubTo; +BigInteger.prototype.multiplyTo = bnpMultiplyTo; +BigInteger.prototype.squareTo = bnpSquareTo; +BigInteger.prototype.divRemTo = bnpDivRemTo; +BigInteger.prototype.invDigit = bnpInvDigit; +BigInteger.prototype.isEven = bnpIsEven; +BigInteger.prototype.exp = bnpExp; + +// public +BigInteger.prototype.toString = bnToString; +BigInteger.prototype.negate = bnNegate; +BigInteger.prototype.abs = bnAbs; +BigInteger.prototype.compareTo = bnCompareTo; +BigInteger.prototype.bitLength = bnBitLength; +BigInteger.prototype.mod = bnMod; +BigInteger.prototype.modPowInt = bnModPowInt; + +// "constants" +BigInteger.ZERO = nbv(0); +BigInteger.ONE = nbv(1); diff --git a/thirdparty/prng4.js b/thirdparty/prng4.js new file mode 100644 index 0000000..4715372 --- /dev/null +++ b/thirdparty/prng4.js @@ -0,0 +1,79 @@ +// Downloaded from http://www-cs-students.stanford.edu/~tjw/jsbn/ by Jeremy White on 6/1/2012 + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + + +// prng4.js - uses Arcfour as a PRNG + +function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); +} + +// Initialize arcfour context from key, an array of ints, each from [0..255] +function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; +} + +function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; +} + +Arcfour.prototype.init = ARC4init; +Arcfour.prototype.next = ARC4next; + +// Plug in your RNG constructor here +function prng_newstate() { + return new Arcfour(); +} + +// Pool size must be a multiple of 4 and greater than 32. +// An array of bytes the size of the pool will be passed to init() +var rng_psize = 256; diff --git a/thirdparty/rng.js b/thirdparty/rng.js new file mode 100644 index 0000000..829a23c --- /dev/null +++ b/thirdparty/rng.js @@ -0,0 +1,102 @@ +// Downloaded from http://www-cs-students.stanford.edu/~tjw/jsbn/ by Jeremy White on 6/1/2012 + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + + +// Random number generator - requires a PRNG backend, e.g. prng4.js + +// For best results, put code like +// +// in your main HTML document. + +var rng_state; +var rng_pool; +var rng_pptr; + +// Mix in a 32-bit integer into the pool +function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; +} + +// Mix in the current time (w/milliseconds) into the pool +function rng_seed_time() { + rng_seed_int(new Date().getTime()); +} + +// Initialize the pool with junk if needed. +if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if(navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto) { + // Extract entropy (256 bits) from NS4 RNG if available + var z = window.crypto.random(32); + for(t = 0; t < z.length; ++t) + rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; + } + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); +} + +function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); +} + +function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); +} + +function SecureRandom() {} + +SecureRandom.prototype.nextBytes = rng_get_bytes; diff --git a/thirdparty/rsa.js b/thirdparty/rsa.js new file mode 100644 index 0000000..1bbf249 --- /dev/null +++ b/thirdparty/rsa.js @@ -0,0 +1,146 @@ +// Downloaded from http://www-cs-students.stanford.edu/~tjw/jsbn/ by Jeremy White on 6/1/2012 + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + + +// Depends on jsbn.js and rng.js + +// Version 1.1: support utf-8 encoding in pkcs1pad2 + +// convert a (hex) string to a bignum object +function parseBigInt(str,r) { + return new BigInteger(str,r); +} + +function linebrk(s,n) { + var ret = ""; + var i = 0; + while(i + n < s.length) { + ret += s.substring(i,i+n) + "\n"; + i += n; + } + return ret + s.substring(i,s.length); +} + +function byte2Hex(b) { + if(b < 0x10) + return "0" + b.toString(16); + else + return b.toString(16); +} + +// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint +function pkcs1pad2(s,n) { + if(n < s.length + 11) { // TODO: fix for utf-8 + alert("Message too long for RSA"); + return null; + } + var ba = new Array(); + var i = s.length - 1; + while(i >= 0 && n > 0) { + var c = s.charCodeAt(i--); + if(c < 128) { // encode using utf-8 + ba[--n] = c; + } + else if((c > 127) && (c < 2048)) { + ba[--n] = (c & 63) | 128; + ba[--n] = (c >> 6) | 192; + } + else { + ba[--n] = (c & 63) | 128; + ba[--n] = ((c >> 6) & 63) | 128; + ba[--n] = (c >> 12) | 224; + } + } + ba[--n] = 0; + var rng = new SecureRandom(); + var x = new Array(); + while(n > 2) { // random non-zero pad + x[0] = 0; + while(x[0] == 0) rng.nextBytes(x); + ba[--n] = x[0]; + } + ba[--n] = 2; + ba[--n] = 0; + return new BigInteger(ba); +} + +// "empty" RSA key constructor +function RSAKey() { + this.n = null; + this.e = 0; + this.d = null; + this.p = null; + this.q = null; + this.dmp1 = null; + this.dmq1 = null; + this.coeff = null; +} + +// Set the public key fields N and e from hex strings +function RSASetPublic(N,E) { + if(N != null && E != null && N.length > 0 && E.length > 0) { + this.n = parseBigInt(N,16); + this.e = parseInt(E,16); + } + else + alert("Invalid RSA public key"); +} + +// Perform raw public operation on "x": return x^e (mod n) +function RSADoPublic(x) { + return x.modPowInt(this.e, this.n); +} + +// Return the PKCS#1 RSA encryption of "text" as an even-length hex string +function RSAEncrypt(text) { + var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3); + if(m == null) return null; + var c = this.doPublic(m); + if(c == null) return null; + var h = c.toString(16); + if((h.length & 1) == 0) return h; else return "0" + h; +} + +// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string +//function RSAEncryptB64(text) { +// var h = this.encrypt(text); +// if(h) return hex2b64(h); else return null; +//} + +// protected +RSAKey.prototype.doPublic = RSADoPublic; + +// public +RSAKey.prototype.setPublic = RSASetPublic; +RSAKey.prototype.encrypt = RSAEncrypt; +//RSAKey.prototype.encrypt_b64 = RSAEncryptB64; diff --git a/thirdparty/sha1.js b/thirdparty/sha1.js new file mode 100644 index 0000000..8118cb4 --- /dev/null +++ b/thirdparty/sha1.js @@ -0,0 +1,346 @@ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS 180-1 + * Version 2.2 Copyright Paul Johnston 2000 - 2009. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + + /* Downloaded 6/1/2012 from the above address by Jeremy White. + License reproduce here for completeness: + +Copyright (c) 1998 - 2009, Paul Johnston & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); } +function b64_sha1(s) { return rstr2b64(rstr_sha1(str2rstr_utf8(s))); } +function any_sha1(s, e) { return rstr2any(rstr_sha1(str2rstr_utf8(s)), e); } +function hex_hmac_sha1(k, d) + { return rstr2hex(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d))); } +function b64_hmac_sha1(k, d) + { return rstr2b64(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d))); } +function any_hmac_sha1(k, d, e) + { return rstr2any(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d)), e); } + +/* + * Perform a simple self-test to see if the VM is working + */ +function sha1_vm_test() +{ + return hex_sha1("abc").toLowerCase() == "a9993e364706816aba3e25717850c26c9cd0d89d"; +} + +/* + * Calculate the SHA1 of a raw string + */ +function rstr_sha1(s) +{ + return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8)); +} + +/* + * Calculate the HMAC-SHA1 of a key and some data (raw strings) + */ +function rstr_hmac_sha1(key, data) +{ + var bkey = rstr2binb(key); + if(bkey.length > 16) bkey = binb_sha1(bkey, key.length * 8); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = binb_sha1(ipad.concat(rstr2binb(data)), 512 + data.length * 8); + return binb2rstr(binb_sha1(opad.concat(hash), 512 + 160)); +} + +/* + * Convert a raw string to a hex string + */ +function rstr2hex(input) +{ + try { hexcase } catch(e) { hexcase=0; } + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var output = ""; + var x; + for(var i = 0; i < input.length; i++) + { + x = input.charCodeAt(i); + output += hex_tab.charAt((x >>> 4) & 0x0F) + + hex_tab.charAt( x & 0x0F); + } + return output; +} + +/* + * Convert a raw string to a base-64 string + */ +function rstr2b64(input) +{ + try { b64pad } catch(e) { b64pad=''; } + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var output = ""; + var len = input.length; + for(var i = 0; i < len; i += 3) + { + var triplet = (input.charCodeAt(i) << 16) + | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0) + | (i + 2 < len ? input.charCodeAt(i+2) : 0); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > input.length * 8) output += b64pad; + else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); + } + } + return output; +} + +/* + * Convert a raw string to an arbitrary string encoding + */ +function rstr2any(input, encoding) +{ + var divisor = encoding.length; + var remainders = Array(); + var i, q, x, quotient; + + /* Convert to an array of 16-bit big-endian values, forming the dividend */ + var dividend = Array(Math.ceil(input.length / 2)); + for(i = 0; i < dividend.length; i++) + { + dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1); + } + + /* + * Repeatedly perform a long division. The binary array forms the dividend, + * the length of the encoding is the divisor. Once computed, the quotient + * forms the dividend for the next step. We stop when the dividend is zero. + * All remainders are stored for later use. + */ + while(dividend.length > 0) + { + quotient = Array(); + x = 0; + for(i = 0; i < dividend.length; i++) + { + x = (x << 16) + dividend[i]; + q = Math.floor(x / divisor); + x -= q * divisor; + if(quotient.length > 0 || q > 0) + quotient[quotient.length] = q; + } + remainders[remainders.length] = x; + dividend = quotient; + } + + /* Convert the remainders to the output string */ + var output = ""; + for(i = remainders.length - 1; i >= 0; i--) + output += encoding.charAt(remainders[i]); + + /* Append leading zero equivalents */ + var full_length = Math.ceil(input.length * 8 / + (Math.log(encoding.length) / Math.log(2))) + for(i = output.length; i < full_length; i++) + output = encoding[0] + output; + + return output; +} + +/* + * Encode a string as utf-8. + * For efficiency, this assumes the input is valid utf-16. + */ +function str2rstr_utf8(input) +{ + var output = ""; + var i = -1; + var x, y; + + while(++i < input.length) + { + /* Decode utf-16 surrogate pairs */ + x = input.charCodeAt(i); + y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; + if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) + { + x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); + i++; + } + + /* Encode output as utf-8 */ + if(x <= 0x7F) + output += String.fromCharCode(x); + else if(x <= 0x7FF) + output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F), + 0x80 | ( x & 0x3F)); + else if(x <= 0xFFFF) + output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F), + 0x80 | ((x >>> 6 ) & 0x3F), + 0x80 | ( x & 0x3F)); + else if(x <= 0x1FFFFF) + output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07), + 0x80 | ((x >>> 12) & 0x3F), + 0x80 | ((x >>> 6 ) & 0x3F), + 0x80 | ( x & 0x3F)); + } + return output; +} + +/* + * Encode a string as utf-16 + */ +function str2rstr_utf16le(input) +{ + var output = ""; + for(var i = 0; i < input.length; i++) + output += String.fromCharCode( input.charCodeAt(i) & 0xFF, + (input.charCodeAt(i) >>> 8) & 0xFF); + return output; +} + +function str2rstr_utf16be(input) +{ + var output = ""; + for(var i = 0; i < input.length; i++) + output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, + input.charCodeAt(i) & 0xFF); + return output; +} + +/* + * Convert a raw string to an array of big-endian words + * Characters >255 have their high-byte silently ignored. + */ +function rstr2binb(input) +{ + var output = Array(input.length >> 2); + for(var i = 0; i < output.length; i++) + output[i] = 0; + for(var i = 0; i < input.length * 8; i += 8) + output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32); + return output; +} + +/* + * Convert an array of big-endian words to a string + */ +function binb2rstr(input) +{ + var output = ""; + for(var i = 0; i < input.length * 32; i += 8) + output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF); + return output; +} + +/* + * Calculate the SHA-1 of an array of big-endian words, and a bit length + */ +function binb_sha1(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << (24 - len % 32); + x[((len + 64 >> 9) << 4) + 15] = len; + + var w = Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + + for(var j = 0; j < 80; j++) + { + if(j < 16) w[j] = x[i + j]; + else w[j] = bit_rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); + var t = safe_add(safe_add(bit_rol(a, 5), sha1_ft(j, b, c, d)), + safe_add(safe_add(e, w[j]), sha1_kt(j))); + e = d; + d = c; + c = bit_rol(b, 30); + b = a; + a = t; + } + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return Array(a, b, c, d, e); + +} + +/* + * Perform the appropriate triplet combination function for the current + * iteration + */ +function sha1_ft(t, b, c, d) +{ + if(t < 20) return (b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +/* + * Determine the appropriate additive constant for the current iteration + */ +function sha1_kt(t) +{ + return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : + (t < 60) ? -1894007588 : -899497514; +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} diff --git a/ticket.js b/ticket.js new file mode 100644 index 0000000..96577a3 --- /dev/null +++ b/ticket.js @@ -0,0 +1,250 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +var SHA_DIGEST_LENGTH = 20; + +/*---------------------------------------------------------------------------- +** General ticket RSA encryption functions - just good enough to +** support what we need to send back an encrypted ticket. +**--------------------------------------------------------------------------*/ + + +/*---------------------------------------------------------------------------- +** OAEP padding functions. Inspired by the OpenSSL implementation. +**--------------------------------------------------------------------------*/ +function MGF1(mask, seed) +{ + var i, j, outlen; + for (i = 0, outlen = 0; outlen < mask.length; i++) + { + var combo_buf = new String; + + for (j = 0; j < seed.length; j++) + combo_buf += String.fromCharCode(seed[j]); + combo_buf += String.fromCharCode((i >> 24) & 255); + combo_buf += String.fromCharCode((i >> 16) & 255); + combo_buf += String.fromCharCode((i >> 8) & 255); + combo_buf += String.fromCharCode((i) & 255); + + var combo_hash = rstr_sha1(combo_buf); + for (j = 0; j < combo_hash.length && outlen < mask.length; j++, outlen++) + { + mask[outlen] = combo_hash.charCodeAt(j); + } + } +} + + +function RSA_padding_add_PKCS1_OAEP(tolen, from, param) +{ + var seed = new Array(SHA_DIGEST_LENGTH); + var rand = new SecureRandom(); + rand.nextBytes(seed); + + var dblen = tolen - 1 - seed.length; + var db = new Array(dblen); + var padlen = dblen - from.length - 1; + var i; + + if (param === undefined) + param = ""; + + if (padlen < SHA_DIGEST_LENGTH) + { + console.log("Error - data too large for key size."); + return null; + } + + for (i = 0; i < padlen; i++) + db[i] = 0; + + var param_hash = rstr_sha1(param); + for (i = 0; i < param_hash.length; i++) + db[i] = param_hash.charCodeAt(i); + + db[padlen] = 1; + for (i = 0; i < from.length; i++) + db[i + padlen + 1] = from.charCodeAt(i); + + var dbmask = new Array(dblen); + if (MGF1(dbmask, seed) < 0) + return null; + + for (i = 0; i < dbmask.length; i++) + db[i] ^= dbmask[i]; + + + var seedmask = Array(SHA_DIGEST_LENGTH); + if (MGF1(seedmask, db) < 0) + return null; + + for (i = 0; i < seedmask.length; i++) + seed[i] ^= seedmask[i]; + + var ret = new String; + ret += String.fromCharCode(0); + for (i = 0; i < seed.length; i++) + ret += String.fromCharCode(seed[i]); + for (i = 0; i < db.length; i++) + ret += String.fromCharCode(db[i]); + return ret; +} + + +function asn_get_length(u8, at) +{ + var len = u8[at++]; + if (len > 0x80) + { + if (len != 0x81) + { + console.log("Error: we lazily don't support keys bigger than 255 bytes. It'd be easy to fix."); + return null; + } + len = u8[at++]; + } + + return [ at, len]; +} + +function find_sequence(u8, at) +{ + var lenblock; + at = at || 0; + if (u8[at++] != 0x30) + { + console.log("Error: public key should start with a sequence flag."); + return null; + } + + lenblock = asn_get_length(u8, at); + if (! lenblock) + return null; + return lenblock; +} + +/*---------------------------------------------------------------------------- +** Extract an RSA key from a memory buffer +**--------------------------------------------------------------------------*/ +function create_rsa_from_mb(mb, at) +{ + var u8 = new Uint8Array(mb); + var lenblock; + var seq; + var ba; + var i; + var ret; + + /* We have a sequence which contains a sequence followed by a bit string */ + seq = find_sequence(u8, at); + if (! seq) + return null; + + at = seq[0]; + seq = find_sequence(u8, at); + if (! seq) + return null; + + /* Skip over the contained sequence */ + at = seq[0] + seq[1]; + if (u8[at++] != 0x3) + { + console.log("Error: expecting bit string next."); + return null; + } + + /* Get the bit string, which is *itself* a sequence. Having fun yet? */ + lenblock = asn_get_length(u8, at); + if (! lenblock) + return null; + + at = lenblock[0]; + if (u8[at] != 0 && u8[at + 1] != 0x30) + { + console.log("Error: unexpected values in bit string."); + return null; + } + + /* Okay, now we have a sequence of two binary values, we hope. */ + seq = find_sequence(u8, at + 1); + if (! seq) + return null; + + at = seq[0]; + if (u8[at++] != 0x02) + { + console.log("Error: expecting integer n next."); + return null; + } + lenblock = asn_get_length(u8, at); + if (! lenblock) + return null; + at = lenblock[0]; + + ba = new Array(lenblock[1]); + for (i = 0; i < lenblock[1]; i++) + ba[i] = u8[at + i]; + + ret = new RSAKey(); + ret.n = new BigInteger(ba); + + at += lenblock[1]; + + if (u8[at++] != 0x02) + { + console.log("Error: expecting integer e next."); + return null; + } + lenblock = asn_get_length(u8, at); + if (! lenblock) + return null; + at = lenblock[0]; + + ret.e = u8[at++]; + for (i = 1; i < lenblock[1]; i++) + { + ret.e <<= 8; + ret.e |= u8[at++]; + } + + return ret; +} + +function rsa_encrypt(rsa, str) +{ + var i; + var ret = []; + var oaep = RSA_padding_add_PKCS1_OAEP((rsa.n.bitLength()+7)>>3, str); + if (! oaep) + return null; + + var ba = new Array(oaep.length); + + for (i = 0; i < oaep.length; i++) + ba[i] = oaep.charCodeAt(i); + var bigint = new BigInteger(ba); + var enc = rsa.doPublic(bigint); + var h = enc.toString(16); + if ((h.length & 1) != 0) + h = "0" + h; + for (i = 0; i < h.length; i += 2) + ret[i / 2] = parseInt(h.substring(i, i + 2), 16); + return ret; +} diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..3a0ee28 --- /dev/null +++ b/utils.js @@ -0,0 +1,239 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*---------------------------------------------------------------------------- +** Utility settings and functions for Spice +**--------------------------------------------------------------------------*/ +var DEBUG = 0; +var DUMP_DRAWS = false; +var DUMP_CANVASES = false; + + +/*---------------------------------------------------------------------------- +** combine_array_buffers +** Combine two array buffers. +** FIXME - this can't be optimal. See wire.js about eliminating the need. +**--------------------------------------------------------------------------*/ +function combine_array_buffers(a1, a2) +{ + var in1 = new Uint8Array(a1); + var in2 = new Uint8Array(a2); + var ret = new ArrayBuffer(a1.byteLength + a2.byteLength); + var out = new Uint8Array(ret); + var o = 0; + var i; + for (i = 0; i < in1.length; i++) + out[o++] = in1[i]; + for (i = 0; i < in2.length; i++) + out[o++] = in2[i]; + + return ret; +} + +/*---------------------------------------------------------------------------- +** hexdump_buffer +**--------------------------------------------------------------------------*/ +function hexdump_buffer(a) +{ + var mg = new Uint8Array(a); + var hex = ""; + var str = ""; + var last_zeros = 0; + for (var i = 0; i < mg.length; i++) + { + var h = Number(mg[i]).toString(16); + if (h.length == 1) + hex += "0"; + hex += h + " "; + + str += String.fromCharCode(mg[i]); + + if ((i % 16 == 15) || (i == (mg.length - 1))) + { + while (i % 16 != 15) + { + hex += " "; + i++; + } + + if (last_zeros == 0) + console.log(hex + " | " + str); + + if (hex == "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ") + { + if (last_zeros == 1) + { + console.log("."); + last_zeros++; + } + else if (last_zeros == 0) + last_zeros++; + } + else + last_zeros = 0; + + hex = str = ""; + } + } +} + + +/*---------------------------------------------------------------------------- +** FIXME FIXME FIXME - web key code to scan code mapping +** This is really atrocious code. At the end of the day, we need to +** map keystrokes generated by the browser into the scan codes required +** by spice. This table was literally built by me pressing keys on my keyboard +** and typing the resulting value in by hand. +** I'm sure Europeans will hate me, and the Chinese will likely *never* +** talk to me. +**--------------------------------------------------------------------------*/ +var scanmap = []; +var codei = 1; +scanmap[27] = codei++; +scanmap['1'.charCodeAt(0)] = codei++; +scanmap['2'.charCodeAt(0)] = codei++; +scanmap['3'.charCodeAt(0)] = codei++; +scanmap['4'.charCodeAt(0)] = codei++; +scanmap['5'.charCodeAt(0)] = codei++; +scanmap['6'.charCodeAt(0)] = codei++; +scanmap['7'.charCodeAt(0)] = codei++; +scanmap['8'.charCodeAt(0)] = codei++; +scanmap['9'.charCodeAt(0)] = codei++; +scanmap['0'.charCodeAt(0)] = codei++; +scanmap[109] = codei++; +scanmap['='.charCodeAt(0)] = codei++; +scanmap[8] = codei++; +scanmap[9] = codei++; +scanmap['Q'.charCodeAt(0)] = codei++; +scanmap['W'.charCodeAt(0)] = codei++; +scanmap['E'.charCodeAt(0)] = codei++; +scanmap['R'.charCodeAt(0)] = codei++; +scanmap['T'.charCodeAt(0)] = codei++; +scanmap['Y'.charCodeAt(0)] = codei++; +scanmap['U'.charCodeAt(0)] = codei++; +scanmap['I'.charCodeAt(0)] = codei++; +scanmap['O'.charCodeAt(0)] = codei++; +scanmap['P'.charCodeAt(0)] = codei++; +scanmap[219] = codei++; +scanmap[221] = codei++; +scanmap[13] = codei++; +scanmap[17] = codei++; +scanmap['A'.charCodeAt(0)] = codei++; +scanmap['S'.charCodeAt(0)] = codei++; +scanmap['D'.charCodeAt(0)] = codei++; +scanmap['F'.charCodeAt(0)] = codei++; +scanmap['G'.charCodeAt(0)] = codei++; +scanmap['H'.charCodeAt(0)] = codei++; +scanmap['J'.charCodeAt(0)] = codei++; +scanmap['K'.charCodeAt(0)] = codei++; +scanmap['L'.charCodeAt(0)] = codei++; +scanmap[';'.charCodeAt(0)] = codei++; +scanmap[222] = codei++; +scanmap[192] = codei++; +scanmap[16] = codei++; +scanmap[220] = codei++; +scanmap['Z'.charCodeAt(0)] = codei++; +scanmap['X'.charCodeAt(0)] = codei++; +scanmap['C'.charCodeAt(0)] = codei++; +scanmap['V'.charCodeAt(0)] = codei++; +scanmap['B'.charCodeAt(0)] = codei++; +scanmap['N'.charCodeAt(0)] = codei++; +scanmap['M'.charCodeAt(0)] = codei++; +scanmap[188] = codei++; +scanmap[190] = codei++; +scanmap[191] = codei++; +codei++; // right shift seems to be same +scanmap[106] = codei++; +scanmap[18] = codei++; +scanmap[' '.charCodeAt(0)] = codei++; +scanmap[20] = codei++; +scanmap[112] = codei++; +scanmap[113] = codei++; +scanmap[114] = codei++; +scanmap[115] = codei++; +scanmap[116] = codei++; +scanmap[117] = codei++; +scanmap[118] = codei++; +scanmap[119] = codei++; +scanmap[120] = codei++; +scanmap[121] = codei++; +scanmap[144] = codei++; +scanmap[145] = codei++; // Scroll lock +scanmap[103] = codei++; +scanmap[104] = codei++; +scanmap[105] = codei++; +codei++;// skip minus; +scanmap[100] = codei++; +scanmap[101] = codei++; +scanmap[102] = codei++; +scanmap[107] = codei++; +scanmap[97] = codei++; +scanmap[98] = codei++; +scanmap[99] = codei++; +scanmap[96] = codei++; +scanmap[110] = codei++; + +// F11 + 12 go up at 87/88, after the less +codei = 87; +scanmap[122] = codei++; +scanmap[123] = codei++; + +codei = 99; +scanmap[42] = codei++; +codei++; // skip alt +scanmap[19] = codei++; // break + +scanmap[36] = codei++; // home +scanmap[38] = codei++; // up +scanmap[33] = codei++; // page up +scanmap[37] = codei++; // left +scanmap[39] = codei++; // right +scanmap[35] = codei++; // end +scanmap[40] = codei++; // down +scanmap[34] = codei++; // page down +scanmap[45] = codei++; // insert +scanmap[46] = codei++; // delete + +function keycode_to_start_scan(code) +{ + if (scanmap[code] === undefined) + { + alert('no map for ' + code); + return 0; + } + + if (scanmap[code] < 0x100) { + return scanmap[code]; + } else { + return 0xe0 | ((scanmap[code] - 0x100) << 8); + } +} + +function keycode_to_end_scan(code) +{ + if (scanmap[code] === undefined) + return 0; + + if (scanmap[code] < 0x100) { + return scanmap[code] | 0x80; + } else { + return 0x80e0 | ((scanmap[code] - 0x100) << 8); + } +} diff --git a/wire.js b/wire.js new file mode 100644 index 0000000..7407ce7 --- /dev/null +++ b/wire.js @@ -0,0 +1,123 @@ +"use strict"; +/* + Copyright (C) 2012 by Jeremy P. White + + This file is part of spice-html5. + + spice-html5 is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + spice-html5 is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with spice-html5. If not, see . +*/ + +/*-------------------------------------------------------------------------------------- +** SpiceWireReader +** This class will receive messages from a WebSocket and relay it to a given +** callback. It will optionally save and pass along a header, useful in processing +** the mini message format. +**--------------------------------------------------------------------------------------*/ +function SpiceWireReader(sc, callback) +{ + this.sc = sc; + this.callback = callback; + this.needed = 0; + + this.buffers = []; + + this.sc.ws.wire_reader = this; + this.sc.ws.binaryType = "arraybuffer"; + this.sc.ws.addEventListener('message', wire_blob_catcher); +} + +SpiceWireReader.prototype = +{ + + /*------------------------------------------------------------------------ + ** Process messages coming in from our WebSocket + **----------------------------------------------------------------------*/ + inbound: function (mb) + { + var at; + + /* Just buffer if we don't need anything yet */ + if (this.needed == 0) + { + this.buffers.push(mb); + return; + } + + /* Optimization - if we have just one inbound block, and it's + suitable for our needs, just use it. */ + if (this.buffers.length == 0 && mb.byteLength >= this.needed) + { + if (mb.byteLength > this.needed) + { + this.buffers.push(mb.slice(this.needed)); + mb = mb.slice(0, this.needed); + } + this.callback.call(this.sc, mb, + this.saved_msg_header || undefined); + } + else + { + this.buffers.push(mb); + } + + + /* If we have fragments that add up to what we need, combine them */ + /* FIXME - it would be faster to revise the processing code to handle + ** multiple fragments directly. Essentially, we should be + ** able to do this without any slice() or combine_array_buffers() calls */ + while (this.buffers.length > 1 && this.buffers[0].byteLength < this.needed) + { + var mb1 = this.buffers.shift(); + var mb2 = this.buffers.shift(); + + this.buffers.unshift(combine_array_buffers(mb1, mb2)); + } + + + while (this.buffers.length > 0 && this.buffers[0].byteLength >= this.needed) + { + mb = this.buffers.shift(); + if (mb.byteLength > this.needed) + { + this.buffers.unshift(mb.slice(this.needed)); + mb = mb.slice(0, this.needed); + } + this.callback.call(this.sc, mb, + this.saved_msg_header || undefined); + } + + }, + + request: function(n) + { + this.needed = n; + }, + + save_header: function(h) + { + this.saved_msg_header = h; + }, + + clear_header: function() + { + this.saved_msg_header = undefined; + }, +} + +function wire_blob_catcher(e) +{ + DEBUG > 1 && console.log(">> WebSockets.onmessage"); + DEBUG > 1 && console.log("id " + this.wire_reader.sc.connection_id +"; type " + this.wire_reader.sc.type); + SpiceWireReader.prototype.inbound.call(this.wire_reader, e.data); +}