[
  {
    "path": ".gitignore",
    "content": "Makefile\nautom4te.cache\nconfig.h\nconfig.log\nconfig.status\n.idea/\nnbproject/\nbin/\nobjs/\ndep/\nauto/\nlibs/\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"tl-parser\"]\n\tpath = tl-parser\n\turl = https://github.com/vysheng/tl-parser\n"
  },
  {
    "path": "CHANGELOG",
    "content": "2.0.3\n* updated to layer 31 (bot support)\n* changed signature of contact_search method\n2.0.2\n* fixed small bugs\n* added block/unblock user method\n2.0.1\n* store error code for last operation in TLS->error/TLS->error_code\n* make interface more consitent\n* deleted outdated *_ex functions\n* fixed bugs \n* support for layer 28:\n*   support for new pts system\n*   support for new read system\n*   support for passwords\n*   support replies\n*   support photo captions\n*   support group links\n1.2.1\n* fixed registration/login problem\n* added extension to downloads\n1.2.0\n* layer 22 support\n"
  },
  {
    "path": "LICENSE",
    "content": "GNU LESSER GENERAL PUBLIC LICENSE\n\nVersion 2.1, February 1999\n\nCopyright (C) 1991, 1999 Free Software Foundation, Inc.\n51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\nEveryone is permitted to copy and distribute verbatim copies\nof this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.\n\nThis license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.\n\nWhen we speak of free software, we are referring to freedom of use, 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 this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.\n\nFor example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.\n\nWe protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.\n\nTo protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.\n\nFinally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.\n\nMost GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.\n\nWhen a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.\n\nWe call this license the \"Lesser\" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.\n\nFor example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.\n\nIn other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.\n\nAlthough the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.\n\nThe precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a \"work based on the library\" and a \"work that uses the library\". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called \"this License\"). Each licensee is addressed as \"you\".\n\nA \"library\" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.\n\nThe \"Library\", below, refers to any such software library or work which has been distributed under these terms. A \"work based on the Library\" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term \"modification\".)\n\n\"Source code\" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.\n\nActivities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.\n\n1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.\n\nYou may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\n\na) The modified work must itself be a software library.\nb) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.\nc) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.\nd) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.\n(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.\n\n3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.\n\nOnce this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.\n\nThis option is useful when you wish to copy part of the code of the Library into a program that is not a library.\n\n4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.\n\nIf distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.\n\n5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a \"work that uses the Library\". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.\n\nHowever, linking a \"work that uses the Library\" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a \"work that uses the library\". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.\n\nWhen a \"work that uses the Library\" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.\n\nIf such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)\n\nOtherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.\n\n6. As an exception to the Sections above, you may also combine or link a \"work that uses the Library\" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.\n\nYou must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:\n\na) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable \"work that uses the Library\", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)\nb) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.\nc) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.\nd) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.\ne) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.\nFor an executable, the required form of the \"work that uses the Library\" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.\n\nIt may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.\n\n7. 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 not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:\n\na) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.\nb) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.\n8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.\n\n9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.\n\n10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.\n\n11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.\n\nThis section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\n\n12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.\n\n13. The Free Software Foundation may publish revised and/or new versions of the 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.\n\nEach version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and \"any later version\", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.\n\n14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.\n\nNO WARRANTY\n\n15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY \"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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Libraries\n\nIf you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).\n\nTo apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the \"copyright\" line and a pointer to where the full notice is found.\n\none line to give the library's name and an idea of what it does.\nCopyright (C) year  name of author\n\nThis library is free software; you can redistribute it and/or\nmodify it under the terms of the GNU Lesser General Public\nLicense as published by the Free Software Foundation; either\nversion 2.1 of the License, or (at your option) any later version.\n\nThis library is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this library; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your school, if any, to sign a \"copyright disclaimer\" for the library, if necessary. Here is a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in\nthe library `Frob' (a library for tweaking knobs) written\nby James Random Hacker.\n\nsignature of Ty Coon, 1 April 1990\nTy Coon, President of Vice\nThat's all there is to it!\n\n"
  },
  {
    "path": "Makefile.in",
    "content": "srcdir=@srcdir@\n\nCFLAGS=@CFLAGS@\nLDFLAGS=@LDFLAGS@ @OPENSSL_LDFLAGS@\nCPPFLAGS=@CPPFLAGS@ @OPENSSL_INCLUDES@\nDEFS=@DEFS@\nCOMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC\n\nEXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@\nLOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}\nLINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}\n\nDEP=dep\nAUTO=auto\nOBJ=objs\nLIB=libs\nEXE=bin\nDIR_LIST=${DEP} ${DEP}/crypto ${AUTO} ${EXE} ${OBJ} ${OBJ}/crypto ${LIB} ${DEP}/auto ${OBJ}/auto\n\nLIB_LIST=${LIB}/libtgl.a ${LIB}/libtgl.so\n\nTGL_OBJECTS=${OBJ}/mtproto-common.o ${OBJ}/mtproto-client.o ${OBJ}/mtproto-key.o ${OBJ}/queries.o ${OBJ}/structures.o ${OBJ}/binlog.o ${OBJ}/tgl.o ${OBJ}/updates.o ${OBJ}/tg-mime-types.o ${OBJ}/mtproto-utils.o ${OBJ}/crypto/bn_openssl.o ${OBJ}/crypto/bn_altern.o ${OBJ}/crypto/rsa_pem_openssl.o ${OBJ}/crypto/rsa_pem_altern.o ${OBJ}/crypto/md5_openssl.o ${OBJ}/crypto/md5_altern.o ${OBJ}/crypto/sha_openssl.o ${OBJ}/crypto/sha_altern.o ${OBJ}/crypto/aes_openssl.o ${OBJ}/crypto/aes_altern.o @EXTRA_OBJECTS@\nTGL_OBJECTS_AUTO=${OBJ}/auto/auto-skip.o ${OBJ}/auto/auto-fetch.o ${OBJ}/auto/auto-store.o ${OBJ}/auto/auto-autocomplete.o ${OBJ}/auto/auto-types.o ${OBJ}/auto/auto-fetch-ds.o  ${OBJ}/auto/auto-free-ds.o ${OBJ}/auto/auto-store-ds.o ${OBJ}/auto/auto-print-ds.o\nTLD_OBJECTS=${OBJ}/dump-tl-file.o\nGENERATE_OBJECTS=${OBJ}/generate.o\nCOMMON_OBJECTS=${OBJ}/tools.o ${OBJ}/crypto/rand_openssl.o ${OBJ}/crypto/rand_altern.o ${OBJ}/crypto/err_openssl.o ${OBJ}/crypto/err_altern.o\nOBJ_C=${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS} ${TLD_OBJECTS}\n\nDEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${OBJ_C}))\nDEPENDENCE_LIST=${DEPENDENCE}\n\nINCLUDE=-I. -I${srcdir}\nCC=@CC@\n\n.SUFFIXES:\n\n.SUFFIXES: .c .h .o\n\nall: ${LIB_LIST}\ncreate_dirs_and_headers: ${DIR_LIST}  ${AUTO}/auto-skip.h ${AUTO}/auto-fetch.h ${AUTO}/auto-store.h ${AUTO}/auto-autocomplete.h ${AUTO}/auto-types.h\ncreate_dirs: ${DIR_LIST}\ndump-tl: ${EXE}/dump-tl-file\n\ninclude ${srcdir}/Makefile.tl-parser\n\n${DIR_LIST}:\n\t@test -d $@ || mkdir -p $@\n\n-include ${DEPENDENCE_LIST}\n\n${TGL_OBJECTS}: ${AUTO}/constants.h ${AUTO}/auto-skip.h ${AUTO}/auto-fetch.h ${AUTO}/auto-store.h ${AUTO}/auto-autocomplete.h ${AUTO}/auto-types.h ${AUTO}/auto-fetch-ds.h ${AUTO}/auto-free-ds.h ${AUTO}/auto-store-ds.h ${AUTO}/auto-print-ds.h\n\n${OBJ_C}: ${OBJ}/%.o: ${srcdir}/%.c | create_dirs\n\t${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<\n\n${TGL_OBJECTS_AUTO}: ${OBJ}/auto/%.o: ${AUTO}/%.c | create_dirs\n\t${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tgl -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<\n\n${LIB}/libtgl.a: ${TGL_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS_AUTO}\n\trm -f $@ && ar ruv $@ $^\n\n${LIB}/libtgl.so: ${TGL_OBJECTS} ${COMMON_OBJECTS} ${TGL_OBJECTS_AUTO}\n\t${CC} -shared -o $@ $^ ${LINK_FLAGS}\n\n${EXE}/generate: ${GENERATE_OBJECTS} ${COMMON_OBJECTS}\n\t${CC} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -o $@\n\n${AUTO}/scheme.tlo: ${AUTO}/scheme.tl ${EXE}/tl-parser\n\t${EXE}/tl-parser -e $@ ${AUTO}/scheme.tl\n\n${AUTO}/scheme.tl: ${srcdir}/scheme.tl ${srcdir}/encrypted_scheme.tl ${srcdir}/binlog.tl ${srcdir}/mtproto.tl ${srcdir}/append.tl | ${AUTO}\n\tcat $^ > $@\n\n${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tl-parser\n\t${EXE}/tl-parser -E ${AUTO}/scheme.tl 2> $@  || ( cat $@ && rm $@ && false )\n\n${AUTO}/auto.c: ${AUTO}/scheme.tlo ${EXE}/generate\n\t${EXE}/generate ${AUTO}/scheme.tlo > $@\n\n${AUTO}/auto-%.c: ${AUTO}/scheme.tlo ${EXE}/generate auto/constants.h ${AUTO}/auto-%.h | create_dirs_and_headers\n\t${EXE}/generate -g $(patsubst ${AUTO}/auto-%.c,%,$@) ${AUTO}/scheme.tlo > $@ || ( rm $@ && false )\n\n${AUTO}/auto-%.h: ${AUTO}/scheme.tlo ${EXE}/generate\n\t${EXE}/generate -g $(patsubst ${AUTO}/auto-%.h,%-header,$@) ${AUTO}/scheme.tlo > $@ || ( rm $@ && false )\n\n\n${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/gen_constants_h.awk\n\tawk -f ${srcdir}/gen_constants_h.awk < $< > $@\n\n${EXE}/dump-tl-file: ${OBJ}/auto/auto.o ${TLD_OBJECTS}\n\t${CC} ${OBJ}/auto/auto.o ${TLD_OBJECTS} ${LINK_FLAGS} -o $@\n\nclean:\n\trm -rf ${DIR_LIST}\n\ndistclean:\n\trm -rf ${DIR_LIST} config.h config.log config.status\n\nmime-types.c: mime.types\n\t@echo \"// DO NOT EDIT! SEE MAKE-TARGET 'gen-mime-types'\" > mime-types.c\n# xxd is usually packaged with vim-common\n\txxd -i mime.types >> mime-types.c\n"
  },
  {
    "path": "Makefile.tl-parser",
    "content": "TL_PARSER_OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o\n\n${TL_PARSER_OBJECTS}: ${OBJ}/%.o: ${srcdir}/tl-parser/%.c | create_dirs\n\t${CC} ${INCLUDE} ${COMPILE_FLAGS} -iquote ${srcdir}/tl-parser -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<\n\n${EXE}/tl-parser: ${TL_PARSER_OBJECTS}\n\t${CC} $^ ${LINK_FLAGS} -o $@\n"
  },
  {
    "path": "README.md",
    "content": "This is library that handles telegram api and protocol.\n\nCurrent versions:\n\n- scheme.tl: Layer 38\n- encrypted_scheme.tl: Layer 23\n\n### API, Protocol documentation\n\nDocumentation for Telegram API is available here: https://core.telegram.org/api\n\nDocumentation for MTproto protocol is available here: https://core.telegram.org/mtproto\n\n### Installation\n\nClone GitHub Repository\n\n     git clone --recursive  https://github.com/vysheng/tgl.git && cd tgl\n\n#### Linux and BSDs\n\nInstall libs: openssl, zlib\nif you want to use provided net/timers then install libevent and add --enable-libevent key to configure\n\nYou can also avoid the OpenSSL dependency: Install gcrypt (>= 1.60, Debian derivates know it as \"libgcrypt20-dev\"), and add --disable-openssl key to configure\n\nThen,\n\n     ./configure\n     make\n\n### Contacts \nIf you would like to ask a question, you can write to my telegram or to the github (or both). To contact me via telegram, you should use import_card method with argument 000653bf:0738ca5d:5521fbac:29246815:a27d0cda\n\n"
  },
  {
    "path": "append.tl",
    "content": "---types---\ndecryptedMessageMediaVideoL12#4cee6ef3 str_thumb:bytes thumb_w:int thumb_h:int duration:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;\ndecryptedMessageMediaAudioL12#6080758f duration:int size:int key:bytes iv:bytes = DecryptedMessageMedia;\n\nupdateMsgUpdate id:int pts:int pts_count:int = Update;\n\nmessageMediaPhotoL27#c8c45a2a photo:Photo = MessageMedia;\nmessageMediaVideoL27#a2d24290 video:Video = MessageMedia;\n//messageMediaDocumentL27#2fda2204 document:Document = MessageMedia;\n//messageMediaAudioL27#c6b68300 audio:Audio = MessageMedia;\n---functions---\n"
  },
  {
    "path": "auto-static-autocomplete.c",
    "content": "#include <assert.h>\n\n#include \"config.h\"\n\n#define IN_AUTOCOMPLETE_H\n#include \"auto-static-store.c\"\n#undef IN_AUTOCOMPLETE_H\n\nstatic int autocomplete_mode;\nstatic char *autocomplete_string;\nstatic int (*autocomplete_fun)(const char *, int, int, char **);\n\nstatic void set_autocomplete_string (const char *s) {\n  if (autocomplete_string) { free (autocomplete_string); }\n  autocomplete_string = strdup (s);\n  assert (autocomplete_string);\n  autocomplete_mode = 1;\n}\n\nstatic void set_autocomplete_type (int (*f)(const char *, int, int, char **)) {\n  autocomplete_fun = f;\n  autocomplete_mode = 2;\n}\n\n#define MAX_FVARS 100\nstatic struct paramed_type *fvars[MAX_FVARS];\nstatic int fvars_pos;\n\nstatic void add_var_to_be_freed (struct paramed_type *P) {\n  assert (fvars_pos < MAX_FVARS);\n  fvars[fvars_pos ++] = P;\n}\n\nstatic void free_vars_to_be_freed (void) {\n  int i;\n  for (i = 0; i < fvars_pos; i++) {\n    tgl_paramed_type_free (fvars[i]);\n  }\n  fvars_pos = 0;\n}\n\nint tglf_extf_autocomplete (struct tgl_state *TLS, const char *text, int text_len, int index, char **R, char *data, int data_len) {\n#ifdef DISABLE_EXTF\n  (void) free_vars_to_be_freed;\n  assert (0);\n#else\n  if (index == -1) {\n    buffer_pos = data;\n    buffer_end = data + data_len;\n    autocomplete_mode = 0;\n    local_next_token ();\n    struct paramed_type *P = autocomplete_function_any ();\n    free_vars_to_be_freed ();\n    if (P) { tgl_paramed_type_free (P); }\n  }\n  if (autocomplete_mode == 0) { return -1; }\n  int len = strlen (text);\n  if (autocomplete_mode == 1) {\n    if (index >= 0) { return -1; }\n    index = 0;\n    if (!strncmp (text, autocomplete_string, len)) {\n      *R = strdup (autocomplete_string);\n      assert (*R);\n      return index;\n    } else {\n      return -1;\n    }\n  } else {\n    return autocomplete_fun (text, len, index, R);\n  }\n#endif\n}\n"
  },
  {
    "path": "auto-static-fetch.c",
    "content": "#include <assert.h>\n\n#include \"config.h\"\n\nstatic int multiline_output = 1;\nstatic int multiline_offset;\nstatic int multiline_offset_size = 2;\n\nstatic int disable_field_names;\n\n#define OUT_BUF_SIZE (1 << 25)\nstatic char out_buf[OUT_BUF_SIZE];\nstatic int out_buf_pos;\n\n#define eprintf(...) \\\n  do { \\\n    out_buf_pos += snprintf (out_buf + out_buf_pos, OUT_BUF_SIZE - out_buf_pos, __VA_ARGS__);\\\n    assert (out_buf_pos < OUT_BUF_SIZE);\\\n  } while (0)\\\n\nstatic int valid_utf8_char (const char *str) {\n  unsigned char c = (unsigned char) *str;\n  int n = 0;\n \n  if ((c & 0x80) == 0x00) {\n    n = 0;\n  } else if ((c & 0xe0) == 0xc0) {\n    n = 1;\n  } else if ((c & 0xf0) == 0xe0) {\n    n = 2;\n  } else if ((c & 0xf8) == 0xf0) {\n    n = 3;\n  } else if ((c & 0xfc) == 0xf8) {\n    n = 4;\n  } else if ((c & 0xfe) == 0xfc) {\n    n = 5;\n  } else {\n    return -1;\n  }\n\n  int i;\n  for (i = 0; i < n; i ++) {\n    if ((((unsigned char)(str[i + 1])) & 0xc0) != 0x80) {\n      return -1;\n    }\n  }\n  return n + 1;\n}\n\nstatic void print_escaped_string (const char *str, int len) {\n  eprintf (\"\\\"\");\n  const char *end = str + len;\n  while (str < end) {\n    int n = valid_utf8_char (str);\n    if (n < 0) {\n      eprintf (\"\\\\x%02x\", (int)(unsigned char)*str);\n      str ++;\n    } else if (n >= 2) {\n      int i;\n      for (i = 0; i < n; i++) {\n        eprintf (\"%c\", *(str ++));\n      }\n    } else if (((unsigned char)*str) >= ' ' && *str != '\"' && *str != '\\\\') {\n      eprintf (\"%c\", *str);      \n      str ++;\n    } else {\n      switch (*str) {\n      case '\\n':\n        eprintf(\"\\\\n\");\n        break;\n      case '\\r':\n        eprintf(\"\\\\r\");\n        break;\n      case '\\t':\n        eprintf(\"\\\\t\");\n        break;\n      case '\\b':\n        eprintf(\"\\\\b\");\n        break;\n      case '\\a':\n        eprintf(\"\\\\a\");\n        break;\n      case '\\\\':\n        eprintf (\"\\\\\\\\\");\n        break;\n      case '\"':\n        eprintf (\"\\\\\\\"\");\n        break;\n      default:\n        eprintf (\"\\\\x%02x\", (int)(unsigned char)*str);\n        break;\n      }\n      str ++;\n    }\n  }\n  eprintf (\"\\\"\");\n}\n\nstatic void print_offset (void) {\n  int i;\n  for (i = 0; i < multiline_offset; i++) {\n    eprintf (\" \");\n  }\n}\n\nchar *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T) {\n#ifdef DISABLE_EXTF\n  assert (0);\n#else\n  out_buf_pos = 0;\n  if (fetch_type_any (T) < 0) { return 0; }\n  return out_buf;\n#endif\n}\n"
  },
  {
    "path": "auto-static-print-ds.c",
    "content": "#include \"config.h\"\n#ifdef DISABLE_EXTF\n#error \"EXTF disabled, so nothing uses auto-print anymore.\"\n#endif\n\nstatic int multiline_output = 1;\nstatic int multiline_offset;\nstatic int multiline_offset_size = 2;\n\nstatic int disable_field_names;\n\n#define OUT_BUF_SIZE (1 << 25)\nstatic char out_buf[OUT_BUF_SIZE];\nstatic int out_buf_pos;\n\n#define eprintf(...) \\\n  do { \\\n    out_buf_pos += snprintf (out_buf + out_buf_pos, OUT_BUF_SIZE - out_buf_pos, __VA_ARGS__);\\\n    assert (out_buf_pos < OUT_BUF_SIZE);\\\n  } while (0)\\\n\nstatic int valid_utf8_char (const char *str) {\n  unsigned char c = (unsigned char) *str;\n  int n = 0;\n \n  if ((c & 0x80) == 0x00) {\n    n = 0;\n  } else if ((c & 0xe0) == 0xc0) {\n    n = 1;\n  } else if ((c & 0xf0) == 0xe0) {\n    n = 2;\n  } else if ((c & 0xf8) == 0xf0) {\n    n = 3;\n  } else if ((c & 0xfc) == 0xf8) {\n    n = 4;\n  } else if ((c & 0xfe) == 0xfc) {\n    n = 5;\n  } else {\n    return -1;\n  }\n\n  int i;\n  for (i = 0; i < n; i ++) {\n    if ((((unsigned char)(str[i + 1])) & 0xc0) != 0x80) {\n      return -1;\n    }\n  }\n  return n + 1;\n}\n\nstatic void print_escaped_string (const char *str, int len) {\n  eprintf (\"\\\"\");\n  const char *end = str + len;\n  while (str < end) {\n    int n = valid_utf8_char (str);\n    if (n < 0) {\n      eprintf (\"\\\\x%02x\", (int)(unsigned char)*str);\n      str ++;\n    } else if (n >= 2) {\n      int i;\n      for (i = 0; i < n; i++) {\n        eprintf (\"%c\", *(str ++));\n      }\n    } else if (((unsigned char)*str) >= ' ' && *str != '\"' && *str != '\\\\') {\n      eprintf (\"%c\", *str);      \n      str ++;\n    } else {\n      switch (*str) {\n      case '\\n':\n        eprintf(\"\\\\n\");\n        break;\n      case '\\r':\n        eprintf(\"\\\\r\");\n        break;\n      case '\\t':\n        eprintf(\"\\\\t\");\n        break;\n      case '\\b':\n        eprintf(\"\\\\b\");\n        break;\n      case '\\a':\n        eprintf(\"\\\\a\");\n        break;\n      case '\\\\':\n        eprintf (\"\\\\\\\\\");\n        break;\n      case '\"':\n        eprintf (\"\\\\\\\"\");\n        break;\n      default:\n        eprintf (\"\\\\x%02x\", (int)(unsigned char)*str);\n        break;\n      }\n      str ++;\n    }\n  }\n  eprintf (\"\\\"\");\n}\n\nstatic void print_offset (void) {\n  int i;\n  for (i = 0; i < multiline_offset; i++) {\n    eprintf (\" \");\n  }\n}\n\nchar *tglf_extf_print_ds (struct tgl_state *TLS, void *DS, struct paramed_type *T) {\n  out_buf_pos = 0;\n  if (print_ds_type_any (DS, T) < 0) { return 0; }\n  return out_buf;\n}\n"
  },
  {
    "path": "auto-static-skip.c",
    "content": ""
  },
  {
    "path": "auto-static-store.c",
    "content": "#include <assert.h>\n\n#include \"config.h\"\n\nstatic int cur_token_len;\nstatic char *cur_token;\nstatic int cur_token_real_len;\nstatic int cur_token_quoted;\n\n#define expect_token(token,len) \\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return -1; } \\\n  local_next_token ();\n\n#define expect_token_ptr(token,len) \\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return 0; } \\\n  local_next_token ();\n\n#define expect_token_autocomplete(token,len) \\\n  if (cur_token_len == -3 && len >= cur_token_real_len && !memcmp (cur_token, token, cur_token_real_len)) { set_autocomplete_string (token); return -1; }\\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return -1; } \\\n  local_next_token ();\n\n#define expect_token_ptr_autocomplete(token,len) \\\n  if (cur_token_len == -3 && len >= cur_token_real_len && !memcmp (cur_token, token, cur_token_real_len)) { set_autocomplete_string (token); return 0; }\\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return 0; } \\\n  local_next_token ();\n\nstatic int is_int (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  if (strtoll (cur_token, &p, 10)) {}\n  cur_token[cur_token_len] = c;\n\n  return p == cur_token + cur_token_len;\n}\n\nstatic long long get_int (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  long long val = strtoll (cur_token, &p, 0);\n  cur_token[cur_token_len] = c;\n\n  return val;\n}\n\nstatic int is_double (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  if (strtod (cur_token, &p)) {}\n  cur_token[cur_token_len] = c;\n\n  return p == cur_token + cur_token_len;\n}\n\n#ifndef IN_AUTOCOMPLETE_H\nstatic double get_double (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  double val = strtod (cur_token, &p);\n  cur_token[cur_token_len] = c;\n\n  return val;\n}\n#endif\n\nstatic char *buffer_pos, *buffer_end;\n\nstatic int is_wspc (char c) {\n  return c <= 32 && c > 0;\n}\n\nstatic void skip_wspc (void) {\n  while (buffer_pos < buffer_end && is_wspc (*buffer_pos)) {\n    buffer_pos ++;\n  }\n}\n\nstatic int is_letter (char c) {\n  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '.' || c == '_' || c == '-';\n}\n\n\nstatic char exp_buffer[1 << 25];;\nstatic int exp_buffer_pos;\n\nstatic inline int is_hex (char c) {\n  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f');\n}\n\nstatic inline int hex2dec (char c) {\n  if (c >= '0' && c <= '9') { return c - '0'; }\n  else { return c - 'a' + 10; }\n}\n\nstatic void expand_backslashed (char *s, int len) {\n  int backslashed = 0;\n  exp_buffer_pos = 0;\n  int i = 0;\n  while (i < len) {\n    assert (i + 3 <= (1 << 25));\n    if (backslashed) {\n      backslashed = 0;\n      switch (s[i ++]) {\n      case 'n':\n        exp_buffer[exp_buffer_pos ++] = '\\n';\n        break;\n      case 'r':\n        exp_buffer[exp_buffer_pos ++] = '\\r';\n        break;\n      case 't':\n        exp_buffer[exp_buffer_pos ++] = '\\t';\n        break;\n      case 'b':\n        exp_buffer[exp_buffer_pos ++] = '\\b';\n        break;\n      case 'a':\n        exp_buffer[exp_buffer_pos ++] = '\\a';\n        break;\n      case '\\\\':\n        exp_buffer[exp_buffer_pos ++] = '\\\\';\n        break;\n      case 'x':\n        if (i + 2 > len || !is_hex (s[i]) || !is_hex (s[i + 1])) {\n          exp_buffer_pos = -1;\n          return;\n        }\n        exp_buffer[exp_buffer_pos ++] = hex2dec (s[i]) * 16 + hex2dec (s[i + 1]);\n        i += 2;\n        break;\n      default:\n        break;\n      }\n    } else {\n      if (s[i] == '\\\\') { \n        backslashed = 1; \n        i ++;\n      } else {\n        exp_buffer[exp_buffer_pos ++] = s[i ++];\n      }\n    }\n  }\n}\n\nstatic void local_next_token (void) {\n  skip_wspc ();\n  cur_token_quoted = 0;\n  if (buffer_pos >= buffer_end) {\n    cur_token_len = -3;\n    cur_token_real_len = 0;\n    return;\n  }\n  char c = *buffer_pos;\n  if (is_letter (c)) {\n    cur_token = buffer_pos;\n    while (buffer_pos < buffer_end && is_letter (*buffer_pos)) {\n      buffer_pos ++;\n    }\n    if (buffer_pos < buffer_end) {\n      cur_token_len = buffer_pos - cur_token;\n    } else {\n      cur_token_real_len = buffer_pos - cur_token;\n      cur_token_len = -3;\n    }\n    return;\n  } else if (c == '\"') {\n    cur_token_quoted = 1;\n    cur_token = buffer_pos ++;\n    int backslashed = 0;\n    while (buffer_pos < buffer_end && (*buffer_pos != '\"' || backslashed)) {\n      if (*buffer_pos == '\\\\') {\n        backslashed ^= 1;\n      } else {\n        backslashed = 0;\n      }\n      buffer_pos ++;\n    }\n    if (*buffer_pos == '\"') {\n      buffer_pos ++;\n      expand_backslashed (cur_token + 1, buffer_pos - cur_token - 2);\n      if (exp_buffer_pos < 0) {\n        cur_token_len = -2;\n      } else {\n        cur_token_len = exp_buffer_pos;\n        cur_token = exp_buffer;\n      }\n    } else {\n      cur_token_len = -2;\n    }\n    return;\n  } else {\n    if (c) {\n      cur_token = buffer_pos ++;\n      cur_token_len = 1;\n    } else {\n      cur_token_len = -3;\n      cur_token_real_len = 0;\n    }\n  }\n}\n\nstatic struct paramed_type *paramed_type_dup (struct paramed_type *P) {\n  if (ODDP (P)) { return P; }\n  struct paramed_type *R = malloc (sizeof (*R));\n  assert (R);\n  R->type = malloc (sizeof (*R->type));\n  assert (R->type);\n  memcpy (R->type, P->type, sizeof (*P->type)); \n  R->type->id = strdup (P->type->id);\n  assert (R->type->id);\n\n  if (P->type->params_num) {\n    R->params = malloc (sizeof (void *) * P->type->params_num);\n    assert (R->params);\n    int i;\n    for (i = 0; i < P->type->params_num; i++) {\n      R->params[i] = paramed_type_dup (P->params[i]);\n    }\n  }\n  return R;\n}\n\n#ifndef IN_AUTOCOMPLETE_H\nvoid tgl_paramed_type_free (struct paramed_type *P) {\n  if (ODDP (P)) { return; }\n  if (P->type->params_num) {\n    int i;\n    for (i = 0; i < P->type->params_num; i++) {\n      tgl_paramed_type_free (P->params[i]);\n    }\n    free (P->params);\n  }\n  free (P->type->id);\n  free (P->type);\n  free (P);\n}\n#else\nvoid tgl_paramed_type_free (struct paramed_type *P);\n#endif\n\n#ifndef IN_AUTOCOMPLETE_H\nstruct paramed_type *tglf_extf_store (struct tgl_state *TLS, const char *data, int data_len) { \n#ifdef DISABLE_EXTF\n  assert (0);\n#else\n  buffer_pos = (char *)data;\n  buffer_end = (char *)(data + data_len);\n  local_next_token ();\n  return store_function_any ();\n#endif\n}\n\nint tglf_store_type (struct tgl_state *TLS, const char *data, int data_len, struct paramed_type *P) {\n  buffer_pos = (char *)data;\n  buffer_end = (char *)(data + data_len);\n  local_next_token ();\n  return store_type_any (P);\n}\n#endif\n"
  },
  {
    "path": "auto-static.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n\n#include \"mtproto-common.h\"\n#include \"config.h\"\n#include <string.h>\n\n#ifndef DISABLE_EXTF\nstatic int cur_token_len;\nstatic char *cur_token;\nstatic int cur_token_real_len;\nstatic int cur_token_quoted;\n\n#define expect_token(token,len) \\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return -1; } \\\n  local_next_token ();\n\n#define expect_token_ptr(token,len) \\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return 0; } \\\n  local_next_token ();\n\n#define expect_token_autocomplete(token,len) \\\n  if (cur_token_len == -3 && len >= cur_token_real_len && !memcmp (cur_token, token, cur_token_real_len)) { set_autocomplete_string (token); return -1; }\\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return -1; } \\\n  local_next_token ();\n\n#define expect_token_ptr_autocomplete(token,len) \\\n  if (cur_token_len == -3 && len >= cur_token_real_len && !memcmp (cur_token, token, cur_token_real_len)) { set_autocomplete_string (token); return 0; }\\\n  if (len != cur_token_len || memcmp (cur_token, token, cur_token_len)) { return 0; } \\\n  local_next_token ();\n\n\nstatic int autocomplete_mode;\nstatic char *autocomplete_string;\nstatic int (*autocomplete_fun)(const char *, int, int, char **);\n\nstatic void set_autocomplete_string (const char *s) {\n  if (autocomplete_string) { free (autocomplete_string); }\n  autocomplete_string = strdup (s);\n  assert (autocomplete_string);\n  autocomplete_mode = 1;\n}\n\nstatic void set_autocomplete_type (int (*f)(const char *, int, int, char **)) {\n  autocomplete_fun = f;\n  autocomplete_mode = 2;\n}\n\nstatic int is_int (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  if (strtoll (cur_token, &p, 10)) {}\n  cur_token[cur_token_len] = c;\n\n  return p == cur_token + cur_token_len;\n}\n\nstatic long long get_int (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  long long val = strtoll (cur_token, &p, 0);\n  cur_token[cur_token_len] = c;\n\n  return val;\n}\n\nstatic int is_double (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  if (strtod (cur_token, &p)) {}\n  cur_token[cur_token_len] = c;\n\n  return p == cur_token + cur_token_len;\n}\n\nstatic double get_double (void) {\n  if (cur_token_len <= 0) { return 0; }\n  char c = cur_token[cur_token_len];\n  cur_token[cur_token_len] = 0;\n  char *p = 0;\n\n  double val = strtod (cur_token, &p);\n  cur_token[cur_token_len] = c;\n\n  return val;\n}\n\nstatic struct paramed_type *paramed_type_dup (struct paramed_type *P) {\n  if (ODDP (P)) { return P; }\n  struct paramed_type *R = malloc (sizeof (*R));\n  assert (R);\n  R->type = malloc (sizeof (*R->type));\n  assert (R->type);\n  memcpy (R->type, P->type, sizeof (*P->type)); \n  R->type->id = strdup (P->type->id);\n  assert (R->type->id);\n\n  if (P->type->params_num) {\n    R->params = malloc (sizeof (void *) * P->type->params_num);\n    assert (R->params);\n    int i;\n    for (i = 0; i < P->type->params_num; i++) {\n      R->params[i] = paramed_type_dup (P->params[i]);\n    }\n  }\n  return R;\n}\n\nvoid tgl_paramed_type_free (struct paramed_type *P) {\n  if (ODDP (P)) { return; }\n  if (P->type->params_num) {\n    int i;\n    for (i = 0; i < P->type->params_num; i++) {\n      tgl_paramed_type_free (P->params[i]);\n    }\n    free (P->params);\n  }\n  free (P->type->id);\n  free (P->type);\n  free (P);\n}\n\nstatic char *buffer_pos, *buffer_end;\n\nstatic int is_wspc (char c) {\n  return c <= 32 && c > 0;\n}\n\nstatic void skip_wspc (void) {\n  while (buffer_pos < buffer_end && is_wspc (*buffer_pos)) {\n    buffer_pos ++;\n  }\n}\n\nstatic int is_letter (char c) {\n  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '.' || c == '_' || c == '-';\n}\n\n\nstatic char exp_buffer[1 << 25];;\nstatic int exp_buffer_pos;\n\nstatic inline int is_hex (char c) {\n  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f');\n}\n\nstatic inline int hex2dec (char c) {\n  if (c >= '0' && c <= '9') { return c - '0'; }\n  else { return c - 'a' + 10; }\n}\n\nstatic void expand_backslashed (char *s, int len) {\n  int backslashed = 0;\n  exp_buffer_pos = 0;\n  int i = 0;\n  while (i < len) {\n    assert (i + 3 <= (1 << 25));\n    if (backslashed) {\n      backslashed = 0;\n      switch (s[i ++]) {\n      case 'n':\n        exp_buffer[exp_buffer_pos ++] = '\\n';\n        break;\n      case 'r':\n        exp_buffer[exp_buffer_pos ++] = '\\r';\n        break;\n      case 't':\n        exp_buffer[exp_buffer_pos ++] = '\\t';\n        break;\n      case 'b':\n        exp_buffer[exp_buffer_pos ++] = '\\b';\n        break;\n      case 'a':\n        exp_buffer[exp_buffer_pos ++] = '\\a';\n        break;\n      case '\\\\':\n        exp_buffer[exp_buffer_pos ++] = '\\\\';\n        break;\n      case 'x':\n        if (i + 2 > len || !is_hex (s[i]) || !is_hex (s[i + 1])) {\n          exp_buffer_pos = -1;\n          return;\n        }\n        exp_buffer[exp_buffer_pos ++] = hex2dec (s[i]) * 16 + hex2dec (s[i + 1]);\n        i += 2;\n        break;\n      default:\n        break;\n      }\n    } else {\n      if (s[i] == '\\\\') { \n        backslashed = 1; \n        i ++;\n      } else {\n        exp_buffer[exp_buffer_pos ++] = s[i ++];\n      }\n    }\n  }\n}\n\nstatic void local_next_token (void) {\n  skip_wspc ();\n  cur_token_quoted = 0;\n  if (buffer_pos >= buffer_end) {\n    cur_token_len = -3;\n    cur_token_real_len = 0;\n    return;\n  }\n  char c = *buffer_pos;\n  if (is_letter (c)) {\n    cur_token = buffer_pos;\n    while (buffer_pos < buffer_end && is_letter (*buffer_pos)) {\n      buffer_pos ++;\n    }\n    if (buffer_pos < buffer_end) {\n      cur_token_len = buffer_pos - cur_token;\n    } else {\n      cur_token_real_len = buffer_pos - cur_token;\n      cur_token_len = -3;\n    }\n    return;\n  } else if (c == '\"') {\n    cur_token_quoted = 1;\n    cur_token = buffer_pos ++;\n    int backslashed = 0;\n    while (buffer_pos < buffer_end && (*buffer_pos != '\"' || backslashed)) {\n      if (*buffer_pos == '\\\\') {\n        backslashed ^= 1;\n      } else {\n        backslashed = 0;\n      }\n      buffer_pos ++;\n    }\n    if (*buffer_pos == '\"') {\n      buffer_pos ++;\n      expand_backslashed (cur_token + 1, buffer_pos - cur_token - 2);\n      if (exp_buffer_pos < 0) {\n        cur_token_len = -2;\n      } else {\n        cur_token_len = exp_buffer_pos;\n        cur_token = exp_buffer;\n      }\n    } else {\n      cur_token_len = -2;\n    }\n    return;\n  } else {\n    if (c) {\n      cur_token = buffer_pos ++;\n      cur_token_len = 1;\n    } else {\n      cur_token_len = -3;\n      cur_token_real_len = 0;\n    }\n  }\n}\n\n#define MAX_FVARS 100\nstatic struct paramed_type *fvars[MAX_FVARS];\nstatic int fvars_pos;\n\nstatic void add_var_to_be_freed (struct paramed_type *P) {\n  assert (fvars_pos < MAX_FVARS);\n  fvars[fvars_pos ++] = P;\n}\n\nstatic void free_vars_to_be_freed (void) {\n  int i;\n  for (i = 0; i < fvars_pos; i++) {\n    tgl_paramed_type_free (fvars[i]);\n  }\n  fvars_pos = 0;\n}\n\nint tglf_extf_autocomplete (struct tgl_state *TLS, const char *text, int text_len, int index, char **R, char *data, int data_len) {\n  if (index == -1) {\n    buffer_pos = data;\n    buffer_end = data + data_len;\n    autocomplete_mode = 0;\n    local_next_token ();\n    struct paramed_type *P = autocomplete_function_any ();\n    free_vars_to_be_freed ();\n    if (P) { tgl_paramed_type_free (P); }\n  }\n  if (autocomplete_mode == 0) { return -1; }\n  int len = strlen (text);\n  if (autocomplete_mode == 1) {\n    if (index >= 0) { return -1; }\n    index = 0;\n    if (!strncmp (text, autocomplete_string, len)) {\n      *R = strdup (autocomplete_string);\n      assert (*R);\n      return index;\n    } else {\n      return -1;\n    }\n  } else {\n    return autocomplete_fun (text, len, index, R);\n  }\n}\n\n#endif\n"
  },
  {
    "path": "auto.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n#ifndef __AUTO_H__\n#define __AUTO_H__\n\n#include \"tools.h\"\n\nstruct tl_type_descr {\n  unsigned name;\n  char *id;\n  int params_num;\n  long long params_types;\n};\n\nstruct paramed_type {\n  struct tl_type_descr *type;\n  struct paramed_type **params;\n};\n\n#define NAME_ARRAY 0x89932ad9\n\n#define TYPE_TO_PARAM(NAME) (&(struct paramed_type) {.type = &tl_type_## NAME, .params=0})\n#define TYPE_TO_PARAM_1(NAME,PARAM1) (&(struct paramed_type) {.type = &tl_type_## NAME, .params=(struct paramed_type *[1]){PARAM1}})\n#define ODDP(x) (((long)(x)) & 1)\n#define EVENP(x) (!ODDP(x))\n#define INT2PTR(x) (void *)(long)(((long)x) * 2 + 1)\n#define PTR2INT(x) ((((long)x) - 1) / 2)\n\nstatic inline void *memdup (const void *d, int len) {\n  assert (d || !len);\n  if (!d) { return NULL; }\n  void *r = talloc (len);\n  memcpy (r, d, len);\n  return r;\n}\n\n#define DS_LVAL(x) ((x) ? *(x) : 0)\n#define DS_STR(x) ((x) ? (x)->data : NULL), ((x) ? (x)->len : 0)\n#define DS_RSTR(x) ((x) ? (x)->len : 0), ((x) ? (x)->data : NULL)\n#define DS_STR_DUP(x) memdup(((x) ? (x)->data : NULL), ((x) ? (x)->len + 1: 0))\n#define DS_BVAL(x) ((x) && ((x)->magic == CODE_bool_true))\n\nvoid tgl_paramed_type_free (struct paramed_type *P);\n\n#endif\n"
  },
  {
    "path": "binlog.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#  include \"config.h\"\n#endif\n\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <sys/file.h>\n#include <stdlib.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n#include \"crypto/bn.h\"\n\n#include \"tgl-binlog.h\"\n#include \"mtproto-common.h\"\n//#include \"net.h\"\n#include \"mtproto-client.h\"\n#include \"mtproto-utils.h\"\n\n#include \"tgl.h\"\n#include \"auto.h\"\n#include \"auto/auto-types.h\"\n#include \"auto/auto-skip.h\"\n#include \"auto/auto-store-ds.h\"\n#include \"auto/auto-fetch-ds.h\"\n#include \"auto/auto-free-ds.h\"\n\n#include \"tgl-structures.h\"\n#include \"tgl-methods-in.h\"\n\n#include \"crypto/sha.h\"\n\nstatic int mystreq1 (const char *a, const char *b, int l) {\n  if ((int)strlen (a) != l) { return 1; }\n  return memcmp (a, b, l);\n}\n\nvoid bl_do_dc_option (struct tgl_state *TLS, int flags, int id, const char *name, int l1, const char *ip, int l2, int port) /* {{{ */ {\n  struct tgl_dc *DC = TLS->DC_list[id];\n\n  if (DC) {\n    struct tgl_dc_option *O = DC->options[flags & 3];\n    while (O) {\n      if (!strncmp (O->ip, ip, l2)) {\n        return;\n      }\n      O = O->next;\n    }\n  }\n  \n  vlogprintf (E_NOTICE, \"DC%d '%.*s' update: %.*s:%d\\n\", \n    id, \n    l1, name,\n    l2, ip,\n    port\n  );\n\n  tglmp_alloc_dc (TLS,\n    flags,\n    id,\n    tstrndup (ip, l2),\n    port\n  );\n}\n/* }}} */\n\nvoid bl_do_set_working_dc (struct tgl_state *TLS, int num) /* {{{ */ {\n  assert (num > 0 && num <= MAX_DC_ID);\n  TLS->DC_working = TLS->DC_list[num];\n  TLS->dc_working_num = num;\n}\n/* }}} */\n\nvoid bl_do_dc_signed (struct tgl_state *TLS, int num) /* {{{ */ {\n  assert (num > 0 && num <= MAX_DC_ID);\n  assert (TLS->DC_list[num]);\n  TLS->DC_list[num]->flags |= TGLDCF_LOGGED_IN;\n}\n/* }}} */\n\nvoid bl_do_set_auth_key (struct tgl_state *TLS, int num, unsigned char *buf) /* {{{ */ {\n  assert (num > 0 && num <= MAX_DC_ID);\n  assert (TLS->DC_list[num]);\n\n  memcpy (TLS->DC_list[num]->auth_key, buf, 256);\n  \n  static unsigned char sha1_buffer[20];\n  TGLC_sha1 ((void *)TLS->DC_list[num]->auth_key, 256, sha1_buffer);\n  TLS->DC_list[num]->auth_key_id = *(long long *)(sha1_buffer + 12);\n\n  TLS->DC_list[num]->flags |= TGLDCF_AUTHORIZED;\n}\n/* }}} */\n\nvoid bl_do_set_our_id (struct tgl_state *TLS, tgl_peer_id_t id) /* {{{ */ {\n  /*if (TLS->our_id.peer_type) {\n    assert (!tgl_cmp_peer_id (TLS->our_id, id));\n    return;\n  }*/\n\n  TLS->our_id = id;\n\n  if (TLS->callback.our_id) {\n    TLS->callback.our_id (TLS, TLS->our_id);\n  }\n}\n/* }}} */\n\nvoid bl_do_set_dh_params (struct tgl_state *TLS, int root, unsigned char prime[], int version) /* {{{ */ {\n  if (TLS->encr_prime) { tfree (TLS->encr_prime, 256); TGLC_bn_free (TLS->encr_prime_bn); }\n\n  TLS->encr_root = root;\n\n  TLS->encr_prime = talloc (256);\n  memcpy (TLS->encr_prime, prime, 256);\n  TLS->encr_prime_bn = TGLC_bn_new ();\n  TGLC_bn_bin2bn ((void *)TLS->encr_prime, 256, TLS->encr_prime_bn);\n  \n  TLS->encr_param_version = version;\n    \n  assert (tglmp_check_DH_params (TLS, TLS->encr_prime_bn, TLS->encr_root) >= 0);\n}\n/* }}} */\n\nvoid bl_do_set_pts (struct tgl_state *TLS, int pts) /* {{{ */ {\n  if (TLS->locks & TGL_LOCK_DIFF) { return; }\n  if (pts <= TLS->pts) { return; }\n  \n  TLS->pts = pts;\n}\n/* }}} */\n\nvoid bl_do_set_channel_pts (struct tgl_state *TLS, int id, int pts) /* {{{ */ {\n  tgl_peer_t *E = tgl_peer_get (TLS, TGL_MK_CHANNEL (id));\n  if (!E || !(E->flags & TGLPF_CREATED)) { return; }\n  if (E->flags & TGLCHF_DIFF) { return ; }\n  if (E->channel.pts <= pts) { return; }\n  E->channel.pts = pts;\n}\n/* }}} */\n\nvoid bl_do_set_qts (struct tgl_state *TLS, int qts) /* {{{ */ {\n  if (TLS->locks & TGL_LOCK_DIFF) { return; }\n  if (qts <= TLS->qts) { return; }\n  \n  TLS->qts = qts;\n}\n/* }}} */\n\nvoid bl_do_set_date (struct tgl_state *TLS, int date) /* {{{ */ {\n  if (TLS->locks & TGL_LOCK_DIFF) { return; }\n  if (date <= TLS->date) { return; }\n  \n  TLS->date = date;\n}\n/* }}} */\n\nvoid bl_do_set_seq (struct tgl_state *TLS, int seq) /* {{{ */ {\n  if (TLS->locks & TGL_LOCK_DIFF) { return; }\n  if (seq <= TLS->seq) { return; }\n  \n  TLS->seq = seq;\n}\n/* }}} */\n\nvoid bl_do_set_msg_id (struct tgl_state *TLS, tgl_message_id_t *old_id, tgl_message_id_t *new_id) /* {{{ */ {\n  if (!memcmp (old_id, new_id, sizeof (tgl_message_id_t))) {\n    return;\n  }\n\n  struct tgl_message *M = tgl_message_get (TLS, old_id);\n  assert (M);\n  \n  \n  if (M->flags & TGLMF_PENDING) {\n    tglm_message_remove_unsent (TLS, M);\n    M->flags &= ~TGLMF_PENDING;\n  }\n  \n  tglm_message_remove_tree (TLS, M);\n  tglm_message_del_peer (TLS, M);\n  \n  M->permanent_id = *new_id;\n  if (tgl_message_get (TLS, new_id)) {\n    tglm_message_del_use (TLS, M);\n    tglm_message_del_temp_id (TLS, M);\n    tglm_message_del_random_id (TLS, M);\n    tgls_free_message (TLS, M);\n  } else {\n    tglm_message_insert_tree (TLS, M);\n    tglm_message_add_peer (TLS, M);\n  }\n\n  M->server_id = new_id->id;\n}\n/* }}} */\n\nvoid bl_do_chat_add_user (struct tgl_state *TLS, tgl_peer_id_t id, int version, int user, int inviter, int date) /* {{{ */ {\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P || !(P->flags & TGLPF_CREATED)) { return; }\n\n  struct tgl_chat *C = &P->chat;\n  if (C->user_list_version >= version || !C->user_list_version) { return; }\n\n  int i;\n  for (i = 0; i < C->user_list_size; i++) {\n    if (C->user_list[i].user_id == user) { \n      return;\n    }\n  }\n\n  C->user_list_size ++;\n  C->user_list = trealloc (C->user_list, 12 * C->user_list_size - 12, 12 * C->user_list_size);\n  C->user_list[C->user_list_size - 1].user_id = user;\n  C->user_list[C->user_list_size - 1].inviter_id = inviter;\n  C->user_list[C->user_list_size - 1].date = date;\n  C->user_list_version = version;\n  \n  if (TLS->callback.chat_update) {\n    TLS->callback.chat_update (TLS, C, TGL_UPDATE_MEMBERS);\n  }\n}\n/* }}} */\n\nvoid bl_do_chat_del_user (struct tgl_state *TLS, tgl_peer_id_t id, int version, int user) /* {{{ */ {\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P || !(P->flags & TGLPF_CREATED)) { return; }\n\n  struct tgl_chat *C = &P->chat;\n  if (C->user_list_version >= version || !C->user_list_version) { return; }\n  \n  int i;\n  for (i = 0; i < C->user_list_size; i++) {\n    if (C->user_list[i].user_id == user) {\n      struct tgl_chat_user t;\n      t = C->user_list[i];\n      C->user_list[i] = C->user_list[C->user_list_size - 1];\n      C->user_list[C->user_list_size - 1] = t;\n    }\n  }\n  if (C->user_list[C->user_list_size - 1].user_id != user) { return; }\n\n  assert (C->user_list[C->user_list_size - 1].user_id == user);\n  C->user_list_size --;\n  C->user_list = trealloc (C->user_list, 12 * C->user_list_size + 12, 12 * C->user_list_size);\n  C->user_list_version = version;\n  \n  if (TLS->callback.chat_update) {\n    TLS->callback.chat_update (TLS, C, TGL_UPDATE_MEMBERS);\n  }\n}\n/* }}} */\n\nvoid bl_do_edit_message (struct tgl_state *TLS, tgl_message_id_t *id, tgl_peer_id_t *from_id, tgl_peer_id_t *to_id, tgl_peer_id_t *fwd_from_id, int *fwd_date, int *date, const char *message, int message_len, struct tl_ds_message_media *media, struct tl_ds_message_action *action, int *reply_id, struct tl_ds_reply_markup *reply_markup, struct tl_ds_vector *entities, int flags) /* {{{ */ {\n  assert (!(flags & 0xfffe0000));\n  \n  struct tgl_message *M = tgl_message_get (TLS, id);\n  \n  assert (flags & TGLMF_CREATED);\n  assert (!(flags & TGLMF_ENCRYPTED));\n\n  if (flags & (1 << 16)) {\n    if (!M) {\n      M = tglm_message_alloc (TLS, id);\n    }\n    M->server_id = id->id;\n    assert (!(M->flags & TGLMF_CREATED));\n  } else {\n    assert (M->flags & TGLMF_CREATED);\n  }\n\n  assert (M);\n  assert (!(M->flags & TGLMF_ENCRYPTED));\n\n  if ((M->flags & TGLMF_PENDING) && !(flags & TGLMF_PENDING)){\n    tglm_message_remove_unsent (TLS, M);\n  }\n  if (!(M->flags & TGLMF_PENDING) && (flags & TGLMF_PENDING)){\n    tglm_message_insert_unsent (TLS, M);\n  }\n\n  if ((M->flags & TGLMF_UNREAD) && !(flags & TGLMF_UNREAD)) {\n    M->flags = (flags & 0xffff) | TGLMF_UNREAD;\n  } else {\n    M->flags = (flags & 0xffff);\n  }\n \n  if (from_id) {\n    M->from_id = *from_id;\n  } else {\n    if (!M->from_id.peer_type) {\n      assert (to_id);\n      M->from_id = *to_id;\n    }\n  }\n\n  if (to_id) {\n    assert (flags & 0x10000);\n    M->to_id = *to_id;\n  }\n\n  if (date) {\n    M->date = *date;\n  }\n  \n  if (fwd_from_id) {\n    assert (fwd_date);\n    M->fwd_from_id = *fwd_from_id;\n    M->fwd_date = *fwd_date;;\n  }\n  \n  if (action) {\n    tglf_fetch_message_action (TLS, &M->action, action);\n    M->flags |= TGLMF_SERVICE;\n  } \n\n  if (message) {\n    M->message_len = message_len;\n    M->message = tstrndup (message, message_len);\n    assert (!(M->flags & TGLMF_SERVICE));\n  }\n\n  if (media) {\n    tglf_fetch_message_media (TLS, &M->media, media);\n    assert (!(M->flags & TGLMF_SERVICE));\n  }\n\n  if (entities) {\n    tglf_fetch_message_entities (TLS, M, entities);\n  }\n\n  if (reply_id) {\n    M->reply_id = *reply_id;\n  }\n\n  if (flags & 0x10000) {\n    tglm_message_insert (TLS, M);\n  }\n\n  if (!(flags & TGLMF_UNREAD) && (M->flags & TGLMF_UNREAD)) {\n    tgls_messages_mark_read (TLS, M, M->flags & TGLMF_OUT, M->permanent_id.id);\n  }\n\n  if (reply_markup) {\n    M->reply_markup = tglf_fetch_alloc_reply_markup (TLS, M->next, reply_markup);\n  }\n\n  if (M->flags & TGLMF_PENDING) {\n    tgls_message_change_random_id (TLS, M, M->permanent_id.id);\n  }\n  \n  if (!M->temp_id) {\n    tgls_message_change_temp_id (TLS, M, ++TLS->last_temp_id);\n  }\n}\n/* }}} */\n\nvoid bl_do_edit_message_encr (struct tgl_state *TLS, tgl_message_id_t *id, tgl_peer_id_t *from_id, tgl_peer_id_t *to_id, int *date, const char *message, int message_len, struct tl_ds_decrypted_message_media *media, struct tl_ds_decrypted_message_action *action, struct tl_ds_encrypted_file *file, int flags) /* {{{ */ {\n  clear_packet ();\n  assert (!(flags & 0xfffe0000));\n  \n  struct tgl_message *M = tgl_message_get (TLS, id);\n\n  if (flags & (1 << 16)) {\n    if (!M) {\n      M = tglm_message_alloc (TLS, id);\n    } else {\n      assert (!(M->flags & TGLMF_CREATED));\n    }\n    assert (!(M->flags & TGLMF_CREATED));\n  } else {\n    assert (M->flags & TGLMF_CREATED);\n  }\n\n  assert (flags & TGLMF_CREATED);\n  assert (flags & TGLMF_ENCRYPTED);\n\n  if ((M->flags & TGLMF_PENDING) && !(flags & TGLMF_PENDING)){\n    tglm_message_remove_unsent (TLS, M);\n  }\n  if (!(M->flags & TGLMF_PENDING) && (flags & TGLMF_PENDING)){\n    tglm_message_insert_unsent (TLS, M);\n  }\n\n  M->flags = flags & 0xffff;\n \n  if (from_id) {\n    M->from_id = *from_id;\n  }\n  if (to_id) {  \n    assert (flags & 0x10000);\n    M->to_id = *to_id;\n  }\n\n  if (date) {\n    M->date = *date;\n  }\n\n  struct tgl_secret_chat *E = (void *)tgl_peer_get (TLS, M->to_id);\n  assert (E);\n\n  if (action) {\n    tglf_fetch_message_action_encrypted (TLS, &M->action, action);\n    M->flags |= TGLMF_SERVICE;\n  }\n\n  if (message) {\n    M->message_len = message_len;\n    M->message = tstrndup (message, message_len);\n    assert (!(M->flags & TGLMF_SERVICE));\n  }\n\n  if (media) {\n    tglf_fetch_message_media_encrypted (TLS, &M->media, media);\n    assert (!(M->flags & TGLMF_SERVICE));\n  }\n\n  if (file) {\n    tglf_fetch_encrypted_message_file (TLS, &M->media, file);\n    assert (!(M->flags & TGLMF_SERVICE));\n  }\n\n  if (action && !(M->flags & TGLMF_OUT) && M->action.type == tgl_message_action_notify_layer) {\n    E->layer = M->action.layer;\n  }\n\n  if ((flags & TGLMF_CREATE) && (flags & TGLMF_OUT)) {\n    E->out_seq_no ++;\n  }\n\n  if (flags & 0x10000) {\n    tglm_message_insert (TLS, M);\n  }\n}\n/* }}} */\n\nvoid bl_do_message_delete (struct tgl_state *TLS, tgl_message_id_t *id) /* {{{ */ {\n  struct tgl_message *M = tgl_message_get (TLS, id);\n  if (!M) { return; }\n  assert (M);\n  if (M->flags & TGLMF_PENDING) {\n    tglm_message_remove_unsent (TLS, M);\n    M->flags &= ~TGLMF_PENDING;\n  }\n\n  tglm_message_remove_tree (TLS, M);\n  tglm_message_del_peer (TLS, M);\n  tglm_message_del_use (TLS, M);\n  tglm_message_del_temp_id (TLS, M);\n  tglm_message_del_random_id (TLS, M);\n  tgls_free_message (TLS, M);\n}\n/* }}} */\n\nvoid bl_do_msg_update (struct tgl_state *TLS, tgl_message_id_t *id) /* {{{ */ {\n  struct tgl_message *M = tgl_message_get (TLS, id);\n  if (!M) { return; }\n  assert (M);\n  \n  if (!(M->flags & TGLMF_ENCRYPTED)) {\n    if (TLS->max_msg_id < M->server_id) {\n      TLS->max_msg_id = M->server_id;\n    }\n  }\n\n  if (TLS->callback.msg_receive) {\n    TLS->callback.msg_receive (TLS, M);\n  }\n}\n/* }}} */\n\nvoid bl_do_reset_authorization (struct tgl_state *TLS) /* {{{ */ {\n  int i;\n  for (i = 0; i <= TLS->max_dc_num; i++) if (TLS->DC_list[i]) {\n    struct tgl_dc *D = TLS->DC_list[i];\n    D->flags = 0;\n    D->state = st_init;\n    D->auth_key_id = D->temp_auth_key_id = 0;\n  }\n  TLS->seq = 0;\n  TLS->qts = 0;\n}\n/* }}} */\n\nvoid bl_do_encr_chat_exchange (struct tgl_state *TLS, tgl_peer_id_t id, long long *exchange_id, const void *key, int *state) /* {{{ */ {\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P) { return; }\n  \n  if (state) {\n    P->encr_chat.exchange_state = *state;\n  }\n  if (exchange_id) {\n    P->encr_chat.exchange_id = *exchange_id;\n  }\n\n  static unsigned char sha_buffer[20];\n  switch (P->encr_chat.exchange_state) {\n  case tgl_sce_requested:\n    memcpy (P->encr_chat.exchange_key, key, 256);\n    break;\n  case tgl_sce_accepted:\n    memcpy (P->encr_chat.exchange_key, key, 256);\n  \n    TGLC_sha1 ((unsigned char *)P->encr_chat.exchange_key, 256, sha_buffer);\n    P->encr_chat.exchange_key_fingerprint = *(long long *)(sha_buffer + 12);\n    break;\n  case tgl_sce_committed:\n    memcpy (P->encr_chat.exchange_key, P->encr_chat.key, 256);\n    P->encr_chat.exchange_key_fingerprint = P->encr_chat.key_fingerprint;\n\n    memcpy (P->encr_chat.key, key, 256);\n  \n    TGLC_sha1 ((unsigned char *)P->encr_chat.key, 256, sha_buffer);\n    P->encr_chat.key_fingerprint = *(long long *)(sha_buffer + 12);\n    break;\n  case tgl_sce_confirmed:\n    P->encr_chat.exchange_state = tgl_sce_none;\n    if (P->encr_chat.exchange_state != tgl_sce_committed) {\n      memcpy (P->encr_chat.key, P->encr_chat.exchange_key, 256);\n      P->encr_chat.key_fingerprint = P->encr_chat.exchange_key_fingerprint;\n    }\n    break;\n  case tgl_sce_aborted:\n    P->encr_chat.exchange_state = tgl_sce_none;\n    if (P->encr_chat.exchange_state == tgl_sce_committed) {\n      memcpy (P->encr_chat.key, P->encr_chat.exchange_key, 256);\n      P->encr_chat.key_fingerprint = P->encr_chat.exchange_key_fingerprint;\n    }\n    break;\n  default:\n    assert (0);\n  }\n}\n/* }}} */\n\nvoid bl_do_user (struct tgl_state *TLS, int id, long long *access_hash, const char *first_name, int first_name_len, const char *last_name, int last_name_len, const char *phone, int phone_len, const char *username, int username_len, struct tl_ds_photo *photo, struct tl_ds_user_profile_photo *profile_photo, int *last_read_in, int *last_read_out, struct tl_ds_bot_info *bot_info, int flags) /* {{{ */ {\n  tgl_peer_t *_U = tgl_peer_get (TLS, TGL_MK_USER (id));\n\n  unsigned updates = 0;\n\n  if ((flags & TGLPF_CREATE) && (flags != TGL_FLAGS_UNCHANGED)) {\n    if (!_U) {\n      _U = talloc0 (sizeof (*_U));\n      _U->id = TGL_MK_USER (id);\n      tglp_insert_user (TLS, _U);\n    } else {\n      assert (!(_U->flags & TGLPF_CREATED));\n    }\n    updates |= TGL_UPDATE_CREATED;\n  } else {\n    assert (_U->flags & TGLPF_CREATED);\n  }\n\n  struct tgl_user *U = (void *)_U;\n  if (flags == TGL_FLAGS_UNCHANGED) { flags = U->flags; }\n  flags &= TGLUF_TYPE_MASK;\n  \n  if ((flags & TGLUF_TYPE_MASK) != (U->flags & TGLUF_TYPE_MASK)) {\n    updates |= TGL_UPDATE_FLAGS;\n  }\n  U->flags = (U->flags & ~TGLUF_TYPE_MASK) | flags;\n\n  if (access_hash && *access_hash != U->access_hash) {\n    U->access_hash = *access_hash;\n    U->id.access_hash = *access_hash;\n    updates |= TGL_UPDATE_ACCESS_HASH;\n  }\n\n  if (first_name || last_name) {\n    if (!U->first_name || !U->last_name || mystreq1 (U->first_name, first_name, first_name_len) || mystreq1 (U->last_name, last_name, last_name_len)) {\n      if (U->first_name) {\n        tfree_str (U->first_name);\n      }\n      U->first_name = tstrndup (first_name, first_name_len);\n      if (U->last_name) {\n        tfree_str (U->last_name);\n      }\n      U->last_name = tstrndup (last_name, last_name_len);\n    \n      updates |= TGL_UPDATE_NAME;\n\n      if (U->print_name) { \n        tglp_peer_delete_name (TLS, (void *)U);\n        tfree_str (U->print_name); \n      }\n      U->print_name = TLS->callback.create_print_name (TLS, U->id, U->first_name, U->last_name, 0, 0);\n      tglp_peer_insert_name (TLS, (void *)U);\n    }\n  }\n\n  if (phone && (!U->phone || mystreq1 (U->phone, phone, phone_len))) {\n    if (U->phone) {\n      tfree_str (U->phone);\n    }\n    U->phone = tstrndup (phone, phone_len);\n    updates |= TGL_UPDATE_PHONE;\n  }\n\n  if (username && (!U->username || mystreq1 (U->username, username, username_len))) {\n    if (U->username) {\n      tfree_str (U->username);\n    }\n    U->username = tstrndup (username, username_len);\n    updates |= TGL_UPDATE_USERNAME;\n  }\n\n  if (photo) {\n    if (!U->photo || U->photo->id != DS_LVAL (photo->id)) {\n      if (U->photo) {\n        tgls_free_photo (TLS, U->photo);\n      }\n      U->photo = tglf_fetch_alloc_photo (TLS, photo);\n      U->flags |= TGLUF_HAS_PHOTO;\n    }\n  }\n  \n  if (profile_photo) {\n    if (U->photo_id != DS_LVAL (profile_photo->photo_id)) {\n      U->photo_id = DS_LVAL (profile_photo->photo_id);\n      tglf_fetch_file_location (TLS, &U->photo_big, profile_photo->photo_big);\n      tglf_fetch_file_location (TLS, &U->photo_small, profile_photo->photo_small);\n      updates |= TGL_UPDATE_PHOTO;\n    }\n  }\n\n  if (last_read_in) {\n    U->last_read_in = *last_read_in;\n    tgls_messages_mark_read (TLS, U->last, 0, U->last_read_in);\n  }\n  if (last_read_out) {\n    U->last_read_out = *last_read_out;\n    tgls_messages_mark_read (TLS, U->last, TGLMF_OUT, U->last_read_out);\n  }\n  \n  if (bot_info) {\n    if (!U->bot_info || U->bot_info->version != DS_LVAL (bot_info->version)) {\n      if (U->bot_info) {\n        tgls_free_bot_info (TLS, U->bot_info);\n      }\n      U->bot_info = tglf_fetch_alloc_bot_info (TLS, bot_info);\n    }\n  }\n\n  if (TLS->callback.user_update && updates) {\n    TLS->callback.user_update (TLS, U, updates);\n  }\n}\n/* }}} */\n\nvoid bl_do_chat (struct tgl_state *TLS, int id, const char *title, int title_len, int *user_num, int *date, int *version, struct tl_ds_vector *participants, struct tl_ds_chat_photo *chat_photo, struct tl_ds_photo *photo, int *admin, int *last_read_in, int *last_read_out, int flags) /* {{{ */ {\n  tgl_peer_t *_U = tgl_peer_get (TLS, TGL_MK_CHAT (id));\n\n  unsigned updates = 0;\n\n  if ((flags & TGLPF_CREATE) && (flags != TGL_FLAGS_UNCHANGED)) {\n    if (!_U) {\n      _U = talloc0 (sizeof (*_U));\n      _U->id = TGL_MK_CHAT (id);\n      tglp_insert_chat (TLS, _U);\n    } else {\n      assert (!(_U->flags & TGLPF_CREATED));\n    }\n    updates |= TGL_UPDATE_CREATED;\n  } else {\n    assert (_U->flags & TGLPF_CREATED);\n  }\n\n  struct tgl_chat *C = &_U->chat;\n  if (flags == TGL_FLAGS_UNCHANGED) { flags = C->flags; }\n  flags &= TGLCF_TYPE_MASK;\n  \n  if ((flags & TGLCF_TYPE_MASK) != (C->flags & TGLCF_TYPE_MASK)) {\n    updates |= TGL_UPDATE_FLAGS;\n  }\n  C->flags = (C->flags & ~TGLCF_TYPE_MASK) | flags;\n\n  if (title && (!C->title || mystreq1 (C->title, title, title_len))) {\n    if (C->title) {\n      tfree_str (C->title);\n    }\n    C->title = tstrndup (title, title_len);\n\n    if (C->print_title) { \n      tglp_peer_delete_name (TLS, (void *)C);\n      tfree_str (C->print_title); \n    }\n    C->print_title = TLS->callback.create_print_name (TLS, C->id, C->title, 0, 0, 0);\n    tglp_peer_insert_name (TLS, (void *)C);\n    \n    updates |= TGL_UPDATE_TITLE;\n  }\n  \n  if (user_num) {\n    C->users_num = *user_num;\n  }\n  \n  if (date) {\n    C->date = *date;\n  }\n\n  if (chat_photo && chat_photo->photo_big) {\n    if (DS_LVAL (chat_photo->photo_big->secret) != C->photo_big.secret) {\n      tglf_fetch_file_location (TLS, &C->photo_big, chat_photo->photo_big);\n      tglf_fetch_file_location (TLS, &C->photo_small, chat_photo->photo_small);\n      updates |= TGL_UPDATE_PHOTO;\n    }\n  }\n\n  if (photo) {\n    if (!C->photo || C->photo->id != DS_LVAL (photo->id)) {\n      if (C->photo) {\n        tgls_free_photo (TLS, C->photo);\n      }\n      C->photo = tglf_fetch_alloc_photo (TLS, photo);\n      C->flags |= TGLPF_HAS_PHOTO;\n      //updates |= TGL_UPDATE_PHOTO;\n    }\n  }\n\n  if (admin && *admin != C->admin_id) {\n    C->admin_id = *admin;\n    updates |= TGL_UPDATE_ADMIN;\n  }\n  \n  if (version) {\n    assert (participants);\n    if (*version > C->version) {\n      C->version = *version;\n\n      if (C->user_list) { tfree (C->user_list, 12 * C->user_list_size); }\n\n      C->user_list_size = DS_LVAL (participants->f1);\n      C->user_list = talloc (12 * C->user_list_size);\n\n      int i;\n      for (i = 0; i < C->user_list_size; i++) {\n        struct tl_ds_chat_participant *DS_P = participants->f2[i];\n        C->user_list[i].user_id = DS_LVAL (DS_P->user_id);\n        C->user_list[i].inviter_id = DS_LVAL (DS_P->inviter_id);\n        C->user_list[i].date = DS_LVAL (DS_P->date);\n      }\n\n      updates |= TGL_UPDATE_MEMBERS;\n    }\n  }\n \n  if (last_read_in) {\n    C->last_read_in = *last_read_in;\n    tgls_messages_mark_read (TLS, C->last, 0, C->last_read_in);\n  }\n \n  if (last_read_out) {\n    C->last_read_out = *last_read_out;\n    tgls_messages_mark_read (TLS, C->last, TGLMF_OUT, C->last_read_out);\n  }\n\n      \n  if (TLS->callback.chat_update && updates) {\n    TLS->callback.chat_update (TLS, C, updates);\n  }\n}\n/* }}} */\n\nvoid bl_do_encr_chat (struct tgl_state *TLS, int id, long long *access_hash, int *date, int *admin, int *user_id, void *key, void *g_key, void *first_key_id, int *state, int *ttl, int *layer, int *in_seq_no, int *last_in_seq_no, int *out_seq_no, long long *key_fingerprint, int flags, const char *print_name, int print_name_len) /* {{{ */ {\n  tgl_peer_t *_U = tgl_peer_get (TLS, TGL_MK_ENCR_CHAT (id));\n\n  unsigned updates = 0;\n\n  if ((flags & TGLPF_CREATE) && (flags != TGL_FLAGS_UNCHANGED)) {\n    if (!_U) {\n      _U = talloc0 (sizeof (*_U));\n      _U->id = TGL_MK_ENCR_CHAT (id);\n      tglp_insert_encrypted_chat (TLS, _U);\n    } else {\n      assert (!(_U->flags & TGLPF_CREATED));\n    }\n    updates |= TGL_UPDATE_CREATED;\n  } else {\n    assert (_U->flags & TGLPF_CREATED);\n  }\n\n  struct tgl_secret_chat *U = (void *)_U;\n  if (flags == TGL_FLAGS_UNCHANGED) { flags = U->flags; }\n  flags &= TGLECF_TYPE_MASK;\n  \n  if ((flags & TGLECF_TYPE_MASK) != (U->flags & TGLECF_TYPE_MASK)) {\n    updates |= TGL_UPDATE_FLAGS;\n  }\n  U->flags = (U->flags & ~TGLECF_TYPE_MASK) | flags;\n\n  if (access_hash && *access_hash != U->access_hash) {\n    U->access_hash = *access_hash;\n    U->id.access_hash = *access_hash;\n    updates |= TGL_UPDATE_ACCESS_HASH;\n  }\n\n  if (date) {\n    U->date = *date;\n  }\n\n  if (admin) {\n    U->admin_id = *admin;\n  }\n\n  if (user_id) {\n    U->user_id = *user_id;\n  }\n\n  if (key_fingerprint) {\n    U->key_fingerprint = *key_fingerprint;\n  }\n\n  if (in_seq_no) {\n    U->in_seq_no = *in_seq_no;\n  }\n  if (out_seq_no) {\n    U->out_seq_no = *out_seq_no;\n  }\n  if (last_in_seq_no) {\n    U->last_in_seq_no = *last_in_seq_no;\n  }\n\n  tgl_peer_t *Us = tgl_peer_get (TLS, TGL_MK_USER (U->user_id));\n  \n  if (!U->print_name) {\n    if (print_name) {\n      U->print_name = tstrndup (print_name, print_name_len);\n    } else {\n      if (Us) {\n        U->print_name = TLS->callback.create_print_name (TLS, TGL_MK_ENCR_CHAT (id), \"!\", Us->user.first_name, Us->user.last_name, 0);\n      } else {\n        static char buf[100];\n        tsnprintf (buf, 99, \"user#%d\", U->user_id);\n        U->print_name = TLS->callback.create_print_name (TLS, TGL_MK_ENCR_CHAT (id), \"!\", buf, 0, 0);\n      }\n      tglp_peer_insert_name (TLS, (void *)U);\n    }\n  }\n\n  if (g_key) {\n    if (!U->g_key)  {\n      U->g_key = talloc (256);\n    }\n    memcpy (U->g_key, g_key, 256);\n  }\n\n  if (key) {\n    memcpy (U->key, key, 256);\n  }\n\n  if (first_key_id) {\n    memcpy (U->first_key_sha, first_key_id, 20);\n  }\n\n  if (state) {\n    if (U->state == sc_waiting && *state == sc_ok) {\n      tgl_do_create_keys_end (TLS, U);\n    }\n    if ((int)U->state != *state) {\n      switch (*state) {\n      case sc_request:\n        updates |= TGL_UPDATE_REQUESTED;\n        break;\n      case sc_ok:\n        updates |= TGL_UPDATE_WORKING;\n        vlogprintf (E_WARNING, \"Secret chat in ok state\\n\");\n        break;\n      default:\n        break;\n      } \n    }\n    U->state = *state;\n  }\n  \n  if (TLS->callback.secret_chat_update && updates) {\n    TLS->callback.secret_chat_update (TLS, U, updates);\n  }\n}\n/* }}} */\n\nvoid bl_do_channel (struct tgl_state *TLS, int id, long long *access_hash, int *date, const char *title, int title_len, const char *username, int username_len, struct tl_ds_chat_photo *chat_photo, struct tl_ds_photo *photo, int *version, char *about, int about_len, int *participants_count, int *admins_count, int *kicked_count, int *last_read_in, int flags) /* {{{ */ {\n  tgl_peer_t *_U = tgl_peer_get (TLS, TGL_MK_CHANNEL (id));\n\n  unsigned updates = 0;\n\n  if ((flags & TGLPF_CREATE) && (flags != TGL_FLAGS_UNCHANGED)) {\n    if (!_U) {\n      _U = talloc0 (sizeof (*_U));\n      _U->id = TGL_MK_CHANNEL (id);\n      tglp_insert_channel (TLS, _U);\n    } else {\n      assert (!(_U->flags & TGLPF_CREATED));\n    }\n    updates |= TGL_UPDATE_CREATED;\n  } else {\n    assert (_U->flags & TGLPF_CREATED);\n  }\n  \n  struct tgl_channel *C = &_U->channel;\n  if (flags == TGL_FLAGS_UNCHANGED) { flags = C->flags; }\n  flags &= TGLCHF_TYPE_MASK;\n  \n  if ((flags & TGLCHF_TYPE_MASK) != (C->flags & TGLCHF_TYPE_MASK)) {\n    updates |= TGL_UPDATE_FLAGS;\n  }\n  C->flags = (C->flags & ~TGLCHF_TYPE_MASK) | flags;\n\n  if (access_hash && *access_hash != C->access_hash) {\n    C->access_hash = *access_hash;\n    C->id.access_hash = *access_hash;\n    updates |= TGL_UPDATE_ACCESS_HASH;\n  }\n\n  if (date) {\n    C->date = *date;\n  }\n\n  if (title && (!C->title || mystreq1 (C->title, title, title_len))) {\n    if (C->title) {\n      tfree_str (C->title);\n    }\n    C->title = tstrndup (title, title_len);\n    \n    if (C->print_title) { \n      tglp_peer_delete_name (TLS, (void *)C);\n      tfree_str (C->print_title); \n    }\n    C->print_title = TLS->callback.create_print_name (TLS, C->id, C->title, 0, 0, 0);\n    tglp_peer_insert_name (TLS, (void *)C);\n    \n    updates |= TGL_UPDATE_TITLE;\n  }\n  \n  if (chat_photo) {\n    if (chat_photo->photo_big && DS_LVAL (chat_photo->photo_big->secret) != C->photo_big.secret) {\n      tglf_fetch_file_location (TLS, &C->photo_big, chat_photo->photo_big);\n      tglf_fetch_file_location (TLS, &C->photo_small, chat_photo->photo_small);\n      updates |= TGL_UPDATE_PHOTO;\n    }\n  }\n\n  if (photo) {\n    if (!C->photo || C->photo->id != DS_LVAL (photo->id)) {\n      if (C->photo) {\n        tgls_free_photo (TLS, C->photo);\n      }\n      C->photo = tglf_fetch_alloc_photo (TLS, photo);\n      C->flags |= TGLPF_HAS_PHOTO;\n    }\n  }\n\n  if (username) {\n    if (!C->username || mystreq1 (C->username, username, username_len)) {\n      if (C->username) {\n        tfree_str (C->username);\n      }\n      C->username = tstrndup (username, username_len);\n      updates |= TGL_UPDATE_USERNAME;\n    }\n  }\n  \n  if (about) {\n    if (!C->about || mystreq1 (C->about, about, about_len)) {\n      tfree_str (C->about);\n    }\n    C->about = tstrndup (about, about_len);\n  }\n\n  if (admins_count) {\n    C->admins_count = *admins_count;\n  }\n  \n  if (participants_count) {\n    C->participants_count = *participants_count;\n  }\n  \n  if (kicked_count) {\n    C->kicked_count = *kicked_count;\n  }\n  \n  if (last_read_in) {\n    C->last_read_in = *last_read_in;\n    tgls_messages_mark_read (TLS, C->last, 0, C->last_read_in);\n  }\n  \n  if (TLS->callback.channel_update && updates) {\n    TLS->callback.channel_update (TLS, C, updates);\n  }\n}\n/* }}} */\n\nvoid bl_do_peer_delete (struct tgl_state *TLS, tgl_peer_id_t id) /* {{{ */ {\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P || !(P->flags & TGLPF_CREATED)) { return; }\n\n  if (P->flags & TGLPF_DELETED) { return; }\n  P->flags |= TGLPF_DELETED;\n\n  switch (id.peer_type) {\n  case TGL_PEER_USER:\n    if (TLS->callback.user_update) {\n      TLS->callback.user_update (TLS, (void *)P, TGL_UPDATE_DELETED);\n    }\n    break;\n  case TGL_PEER_CHAT:\n    if (TLS->callback.chat_update) {\n      TLS->callback.chat_update (TLS, (void *)P, TGL_UPDATE_DELETED);\n    }\n    break;\n  case TGL_PEER_ENCR_CHAT:\n    if (TLS->callback.secret_chat_update) {\n      TLS->callback.secret_chat_update (TLS, (void *)P, TGL_UPDATE_DELETED);\n    }\n    break;\n  case TGL_PEER_CHANNEL:\n    if (TLS->callback.channel_update) {\n      TLS->callback.channel_update (TLS, (void *)P, TGL_UPDATE_DELETED);\n    }\n    break;\n  default:\n    assert (0);\n  }\n}\n/* }}} */\n"
  },
  {
    "path": "binlog.tl",
    "content": "---types---\n\nbinlog.encrKey key:64*[int] = binlog.EncrKey;\n\nbinlog.peerUser = binlog.PeerType;\nbinlog.peerChat = binlog.PeerType;\nbinlog.peerChannel = binlog.PeerType;\n\nbinlog.peer peer_type:binlog.PeerType peer_id:int = binlog.Peer;\n\n\nbinlog.start = binlog.Update;\n\nbinlog.authKey dc:int key:%binlog.EncrKey = binlog.Update; \nbinlog.defaultDc dc:int = binlog.Update;\nbinlog.dcSigned dc:int = binlog.Update;\n\nbinlog.dcOption flags:int dc:int name:string ip:string port:int = binlog.Update;\n\nbinlog.ourId id:int = binlog.Update;\n\nbinlog.setDhParams root:int prime:%binlog.EncrKey version:int = binlog.Update;\n\n\n\nbinlog.setPts pts:int = binlog.Update;\nbinlog.setQts qts:int = binlog.Update;\nbinlog.setDate date:int = binlog.Update;\nbinlog.setSeq seq:int = binlog.Update;\n\nbinlog.peerDelete peer:%binlog.Peer = binlog.Update;\n\nbinlog.encrChat#84977251 flags:# id:int \n  access_hash:flags.17?long \n  date:flags.18?int \n  admin:flags.19?int \n  user_id:flags.20?int\n  key:flags.21?%binlog.EncrKey \n  g_key:flags.22?%binlog.EncrKey\n  state:flags.23?int \n  ttl:flags.24?int\n  layer:flags.25?int\n  in_seq_no:flags.26?int last_in_seq_no:flags.26?int out_seq_no:flags.26?int\n  key_fingerprint:flags.27?long\n    = binlog.Update;\n\nbinlog.encrChatExchange#9d49488d flags:# id:int\n  exchange_id:flags.17?long\n  key:flags.18?%binlog.EncrKey\n  state:flags.19?int \n    = binlog.Update;\n\nbinlog.user#127cf2f9 flags:# id:int \n  access_hash:flags.17?long \n  first_name:flags.18?string last_name:flags.18?string \n  phone:flags.19?string \n  username:flags.20?string \n  photo:flags.21?Photo \n  real_first_name:flags.22?string real_last_name:flags.22?string \n  user_photo:flags.23?UserProfilePhoto \n  last_read_in:flags.24?int \n  last_read_out:flags.25?int\n  bot_info:flags.26?BotInfo\n    = binlog.Update;\n\nbinlog.chat#0a10aa92 flags:# id:int \n  title:flags.17?string \n  user_num:flags.18?int \n  date:flags.19?int \n  version:flags.20?int participants:flags.20?(Vector ChatParticipant)\n  chat_photo:flags.21?ChatPhoto\n  photo:flags.22?Photo\n  admin:flags.23?int\n  last_read_in:flags.24?int \n  last_read_out:flags.25?int\n    = binlog.Update;\n\nbinlog.channel flags:# id:int\n  title:flags.17?string\n  username:flags.18?string\n  date:flags.19?int\n  version:flags.20?int\n  chat_photo:flags.21?ChatPhoto\n  photo:flags.22?Photo\n  about:flags.23?int\n  last_read_in:flags.24?int\n  admins_count:flags.25?int\n  kicked_count:flags.26?int\n  access_hash:flags.27?long \n    = binlog.Update;\n\n\nbinlog.chatAddParticipant id:int version:int user_id:int inviter_id:int date:int = binlog.Update;\nbinlog.chatDelParticipant id:int version:int user_id:int = binlog.Update;\n\nbinlog.setMsgId old_id:long new_id:int = binlog.Update;\nbinlog.messageDelete lid:long = binlog.Update;\n\nbinlog.messageNew#427cfcdb flags:# lid:long \n  from:flags.17?%binlog.Peer to:flags.17?%binlog.Peer\n  fwd_from_id:flags.18?%binlog.Peer fwd_date:flags.18?int \n  date:flags.19?int \n  message:flags.20?string \n  media:flags.21?MessageMedia \n  action:flags.22?MessageAction \n  reply_id:flags.23?int\n  reply_markup:flags.24?ReplyMarkup\n    = binlog.Update;\n\nbinlog.messageEncrNew#6cf7cabc flags:# lid:long \n  from:flags.17?%binlog.Peer to:flags.17?%binlog.Peer\n  //empty 18 bit\n  date:flags.19?int \n  message:flags.20?string \n  encr_media:flags.21?DecryptedMessageMedia \n  encr_action:flags.22?DecryptedMessageAction \n  file:flags.23?EncryptedFile \n    = binlog.Update;\n\nbinlog.msgUpdate#6dd4d85f lid:long = binlog.Update;\n\nbinlog.resetAuthorization = binlog.Update;\n\n\n---functions---\n"
  },
  {
    "path": "config.h.in",
    "content": "/* config.h.in.  Generated from configure.ac by autoheader.  */\n\n/* disable extf queries */\n#undef DISABLE_EXTF\n\n/* Use libevent v1 */\n#undef EVENT_V1\n\n/* Use libevent v2 */\n#undef EVENT_V2\n\n/* Define to 1 if you have the `alarm' function. */\n#undef HAVE_ALARM\n\n/* Define to 1 if you have the <arpa/inet.h> header file. */\n#undef HAVE_ARPA_INET_H\n\n/* Define to 1 if you have the `endpwent' function. */\n#undef HAVE_ENDPWENT\n\n/* Define to 1 if you have the <execinfo.h> header file. */\n#undef HAVE_EXECINFO_H\n\n/* Define to 1 if you have the <fcntl.h> header file. */\n#undef HAVE_FCNTL_H\n\n/* Define to 1 if you have the <inttypes.h> header file. */\n#undef HAVE_INTTYPES_H\n\n/* Define to 1 if you have the `event' library (-levent). */\n#undef HAVE_LIBEVENT\n\n/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */\n#undef HAVE_LIBGCRYPT\n\n/* Define to 1 if you have `z' library (-lz) */\n#undef HAVE_LIBZ\n\n/* Define to 1 if you have the <mach/mach.h> header file. */\n#undef HAVE_MACH_MACH_H\n\n/* Define to 1 if your system has a GNU libc compatible `malloc' function, and\n   to 0 otherwise. */\n#undef HAVE_MALLOC\n\n/* Define to 1 if you have the <malloc.h> header file. */\n#undef HAVE_MALLOC_H\n\n/* Define to 1 if you have the `memmove' function. */\n#undef HAVE_MEMMOVE\n\n/* Define to 1 if you have the <memory.h> header file. */\n#undef HAVE_MEMORY_H\n\n/* Define to 1 if you have the `memset' function. */\n#undef HAVE_MEMSET\n\n/* Define to 1 if you have the `mkdir' function. */\n#undef HAVE_MKDIR\n\n/* Define to 1 if you have the <netdb.h> header file. */\n#undef HAVE_NETDB_H\n\n/* Define to 1 if you have the <netinet/in.h> header file. */\n#undef HAVE_NETINET_IN_H\n\n/* Define to 1 if your system has a GNU libc compatible `realloc' function,\n   and to 0 otherwise. */\n#undef HAVE_REALLOC\n\n/* Define to 1 if you have the `select' function. */\n#undef HAVE_SELECT\n\n/* Define to 1 if you have the `socket' function. */\n#undef HAVE_SOCKET\n\n/* Define to 1 if you have the <stdint.h> header file. */\n#undef HAVE_STDINT_H\n\n/* Define to 1 if you have the <stdlib.h> header file. */\n#undef HAVE_STDLIB_H\n\n/* Define to 1 if you have the `strdup' function. */\n#undef HAVE_STRDUP\n\n/* Define to 1 if you have the <strings.h> header file. */\n#undef HAVE_STRINGS_H\n\n/* Define to 1 if you have the <string.h> header file. */\n#undef HAVE_STRING_H\n\n/* Define to 1 if you have the `strndup' function. */\n#undef HAVE_STRNDUP\n\n/* Define to 1 if you have the <sys/file.h> header file. */\n#undef HAVE_SYS_FILE_H\n\n/* Define to 1 if you have the <sys/socket.h> header file. */\n#undef HAVE_SYS_SOCKET_H\n\n/* Define to 1 if you have the <sys/stat.h> header file. */\n#undef HAVE_SYS_STAT_H\n\n/* Define to 1 if you have the <sys/types.h> header file. */\n#undef HAVE_SYS_TYPES_H\n\n/* Define to 1 if you have the <termios.h> header file. */\n#undef HAVE_TERMIOS_H\n\n/* Define to 1 if you have the `uname' function. */\n#undef HAVE_UNAME\n\n/* Define to 1 if you have the <unistd.h> header file. */\n#undef HAVE_UNISTD_H\n\n/* Define to 1 if the system has the `__builtin_bswap32' built-in function */\n#undef HAVE___BUILTIN_BSWAP32\n\n/* Define to the address where bug reports for this package should be sent. */\n#undef PACKAGE_BUGREPORT\n\n/* Define to the full name of this package. */\n#undef PACKAGE_NAME\n\n/* Define to the full name and version of this package. */\n#undef PACKAGE_STRING\n\n/* Define to the one symbol short name of this package. */\n#undef PACKAGE_TARNAME\n\n/* Define to the home page for this package. */\n#undef PACKAGE_URL\n\n/* Define to the version of this package. */\n#undef PACKAGE_VERSION\n\n/* Define to 1 if you have the ANSI C header files. */\n#undef STDC_HEADERS\n\n/* avoid OpenSSL entirely, use libgcrypt instead (this can't read *.pub files,\n   though.) */\n#undef TGL_AVOID_OPENSSL\n\n/* fixed for correct valgrind work */\n#undef VALGRIND_FIXES\n\n/* Define to `int' if <sys/types.h> doesn't define. */\n#undef gid_t\n\n/* Define to `__inline__' or `__inline' if that's what the C compiler\n   calls it, or to nothing if 'inline' is not supported under any name.  */\n#ifndef __cplusplus\n#undef inline\n#endif\n\n/* Define to rpl_malloc if the replacement function should be used. */\n#undef malloc\n\n/* Define to rpl_realloc if the replacement function should be used. */\n#undef realloc\n\n/* Define to `unsigned int' if <sys/types.h> does not define. */\n#undef size_t\n\n/* Define to `int' if <sys/types.h> doesn't define. */\n#undef uid_t\n"
  },
  {
    "path": "configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.69 for telegram-cli 1.0.\n#\n#\n# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.\n#\n#\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n# Use a proper internal environment variable to ensure we don't fall\n  # into an infinite loop, continuously re-executing ourselves.\n  if test x\"${_as_can_reexec}\" != xno && test \"x$CONFIG_SHELL\" != x; then\n    _as_can_reexec=no; export _as_can_reexec;\n    # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nas_fn_exit 255\n  fi\n  # We don't want this to propagate to other subprocesses.\n          { _as_can_reexec=; unset _as_can_reexec;}\nif test \"x$CONFIG_SHELL\" = x; then\n  as_bourne_compatible=\"if test -n \\\"\\${ZSH_VERSION+set}\\\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on \\${1+\\\"\\$@\\\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '\\${1+\\\"\\$@\\\"}'='\\\"\\$@\\\"'\n  setopt NO_GLOB_SUBST\nelse\n  case \\`(set -o) 2>/dev/null\\` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\"\n  as_required=\"as_fn_return () { (exit \\$1); }\nas_fn_success () { as_fn_return 0; }\nas_fn_failure () { as_fn_return 1; }\nas_fn_ret_success () { return 0; }\nas_fn_ret_failure () { return 1; }\n\nexitcode=0\nas_fn_success || { exitcode=1; echo as_fn_success failed.; }\nas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }\nas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }\nas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }\nif ( set x; as_fn_ret_success y && test x = \\\"\\$1\\\" ); then :\n\nelse\n  exitcode=1; echo positional parameters were not saved.\nfi\ntest x\\$exitcode = x0 || exit 1\ntest -x / || exit 1\"\n  as_suggested=\"  as_lineno_1=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_1a=\\$LINENO\n  as_lineno_2=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_2a=\\$LINENO\n  eval 'test \\\"x\\$as_lineno_1'\\$as_run'\\\" != \\\"x\\$as_lineno_2'\\$as_run'\\\" &&\n  test \\\"x\\`expr \\$as_lineno_1'\\$as_run' + 1\\`\\\" = \\\"x\\$as_lineno_2'\\$as_run'\\\"' || exit 1\ntest \\$(( 1 + 1 )) = 2 || exit 1\"\n  if (eval \"$as_required\") 2>/dev/null; then :\n  as_have_required=yes\nelse\n  as_have_required=no\nfi\n  if test x$as_have_required = xyes && (eval \"$as_suggested\") 2>/dev/null; then :\n\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nas_found=false\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  as_found=:\n  case $as_dir in #(\n\t /*)\n\t   for as_base in sh bash ksh sh5; do\n\t     # Try only shells that exist, to save several forks.\n\t     as_shell=$as_dir/$as_base\n\t     if { test -f \"$as_shell\" || test -f \"$as_shell.exe\"; } &&\n\t\t    { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$as_shell as_have_required=yes\n\t\t   if { $as_echo \"$as_bourne_compatible\"\"$as_suggested\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  break 2\nfi\nfi\n\t   done;;\n       esac\n  as_found=false\ndone\n$as_found || { if { test -f \"$SHELL\" || test -f \"$SHELL.exe\"; } &&\n\t      { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$SHELL\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$SHELL as_have_required=yes\nfi; }\nIFS=$as_save_IFS\n\n\n      if test \"x$CONFIG_SHELL\" != x; then :\n  export CONFIG_SHELL\n             # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nexit 255\nfi\n\n    if test x$as_have_required = xno; then :\n  $as_echo \"$0: This script requires a shell more modern than all\"\n  $as_echo \"$0: the shells that I found on your system.\"\n  if test x${ZSH_VERSION+set} = xset ; then\n    $as_echo \"$0: In particular, zsh $ZSH_VERSION has bugs and should\"\n    $as_echo \"$0: be upgraded to zsh 4.3.4 or later.\"\n  else\n    $as_echo \"$0: Please tell bug-autoconf@gnu.org about your system,\n$0: including any error possibly output before this\n$0: message. Then install a modern shell, or manually run\n$0: the script under such a shell if you do have one.\"\n  fi\n  exit 1\nfi\nfi\nfi\nSHELL=${CONFIG_SHELL-/bin/sh}\nexport SHELL\n# Unset more variables known to interfere with behavior of common tools.\nCLICOLOR_FORCE= GREP_OPTIONS=\nunset CLICOLOR_FORCE GREP_OPTIONS\n\n## --------------------- ##\n## M4sh Shell Functions. ##\n## --------------------- ##\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n\n  as_lineno_1=$LINENO as_lineno_1a=$LINENO\n  as_lineno_2=$LINENO as_lineno_2a=$LINENO\n  eval 'test \"x$as_lineno_1'$as_run'\" != \"x$as_lineno_2'$as_run'\" &&\n  test \"x`expr $as_lineno_1'$as_run' + 1`\" = \"x$as_lineno_2'$as_run'\"' || {\n  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)\n  sed -n '\n    p\n    /[$]LINENO/=\n  ' <$as_myself |\n    sed '\n      s/[$]LINENO.*/&-/\n      t lineno\n      b\n      :lineno\n      N\n      :loop\n      s/[$]LINENO\\([^'$as_cr_alnum'_].*\\n\\)\\(.*\\)/\\2\\1\\2/\n      t loop\n      s/-\\n.*//\n    ' >$as_me.lineno &&\n  chmod +x \"$as_me.lineno\" ||\n    { $as_echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2; as_fn_exit 1; }\n\n  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have\n  # already done that, so ensure we don't try to do so again and fall\n  # in an infinite loop.  This has already happened in practice.\n  _as_can_reexec=no; export _as_can_reexec\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensitive to this).\n  . \"./$as_me.lineno\"\n  # Exit status is that of the last command.\n  exit\n}\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\ntest -n \"$DJDIR\" || exec 7<&0 </dev/null\nexec 6>&1\n\n# Name of the host.\n# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_clean_files=\nac_config_libobj_dir=.\nLIBOBJS=\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\n\n# Identity of this package.\nPACKAGE_NAME='telegram-cli'\nPACKAGE_TARNAME='telegram-cli'\nPACKAGE_VERSION='1.0'\nPACKAGE_STRING='telegram-cli 1.0'\nPACKAGE_BUGREPORT=''\nPACKAGE_URL=''\n\nac_unique_file=\"config.h.in\"\n# Factoring default headers for most tests.\nac_includes_default=\"\\\n#include <stdio.h>\n#ifdef HAVE_SYS_TYPES_H\n# include <sys/types.h>\n#endif\n#ifdef HAVE_SYS_STAT_H\n# include <sys/stat.h>\n#endif\n#ifdef STDC_HEADERS\n# include <stdlib.h>\n# include <stddef.h>\n#else\n# ifdef HAVE_STDLIB_H\n#  include <stdlib.h>\n# endif\n#endif\n#ifdef HAVE_STRING_H\n# if !defined STDC_HEADERS && defined HAVE_MEMORY_H\n#  include <memory.h>\n# endif\n# include <string.h>\n#endif\n#ifdef HAVE_STRINGS_H\n# include <strings.h>\n#endif\n#ifdef HAVE_INTTYPES_H\n# include <inttypes.h>\n#endif\n#ifdef HAVE_STDINT_H\n# include <stdint.h>\n#endif\n#ifdef HAVE_UNISTD_H\n# include <unistd.h>\n#endif\"\n\nac_subst_vars='LTLIBOBJS\nEXTRA_OBJECTS\nEXTRA_LIBS\nLIBOBJS\nEGREP\nGREP\nCPP\nOPENSSL_LDFLAGS\nOPENSSL_LIBS\nOPENSSL_INCLUDES\nPKG_CONFIG\nOBJEXT\nEXEEXT\nac_ct_CC\nCPPFLAGS\nLDFLAGS\nCFLAGS\nCC\ntarget_alias\nhost_alias\nbuild_alias\nLIBS\nECHO_T\nECHO_N\nECHO_C\nDEFS\nmandir\nlocaledir\nlibdir\npsdir\npdfdir\ndvidir\nhtmldir\ninfodir\ndocdir\noldincludedir\nincludedir\nlocalstatedir\nsharedstatedir\nsysconfdir\ndatadir\ndatarootdir\nlibexecdir\nsbindir\nbindir\nprogram_transform_name\nprefix\nexec_prefix\nPACKAGE_URL\nPACKAGE_BUGREPORT\nPACKAGE_STRING\nPACKAGE_VERSION\nPACKAGE_TARNAME\nPACKAGE_NAME\nPATH_SEPARATOR\nSHELL'\nac_subst_files=''\nac_user_opts='\nenable_option_checking\nenable_openssl\nwith_openssl\nwith_zlib\nenable_extf\nenable_libevent\nenable_valgrind\n'\n      ac_precious_vars='build_alias\nhost_alias\ntarget_alias\nCC\nCFLAGS\nLDFLAGS\nLIBS\nCPPFLAGS\nCPP'\n\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\nac_unrecognized_opts=\nac_unrecognized_sep=\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\n# (The list follows the same order as the GNU Coding Standards.)\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatarootdir='${prefix}/share'\ndatadir='${datarootdir}'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ndocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'\ninfodir='${datarootdir}/info'\nhtmldir='${docdir}'\ndvidir='${docdir}'\npdfdir='${docdir}'\npsdir='${docdir}'\nlibdir='${exec_prefix}/lib'\nlocaledir='${datarootdir}/locale'\nmandir='${datarootdir}/man'\n\nac_prev=\nac_dashdash=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval $ac_prev=\\$ac_option\n    ac_prev=\n    continue\n  fi\n\n  case $ac_option in\n  *=?*) ac_optarg=`expr \"X$ac_option\" : '[^=]*=\\(.*\\)'` ;;\n  *=)   ac_optarg= ;;\n  *)    ac_optarg=yes ;;\n  esac\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_dashdash$ac_option in\n  --)\n    ac_dashdash=yes ;;\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=*)\n    datadir=$ac_optarg ;;\n\n  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \\\n  | --dataroo | --dataro | --datar)\n    ac_prev=datarootdir ;;\n  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \\\n  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)\n    datarootdir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=no ;;\n\n  -docdir | --docdir | --docdi | --doc | --do)\n    ac_prev=docdir ;;\n  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)\n    docdir=$ac_optarg ;;\n\n  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)\n    ac_prev=dvidir ;;\n  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)\n    dvidir=$ac_optarg ;;\n\n  -enable-* | --enable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=\\$ac_optarg ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)\n    ac_prev=htmldir ;;\n  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \\\n  | --ht=*)\n    htmldir=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localedir | --localedir | --localedi | --localed | --locale)\n    ac_prev=localedir ;;\n  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)\n    localedir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst | --locals)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)\n    ac_prev=pdfdir ;;\n  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)\n    pdfdir=$ac_optarg ;;\n\n  -psdir | --psdir | --psdi | --psd | --ps)\n    ac_prev=psdir ;;\n  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)\n    psdir=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=\\$ac_optarg ;;\n\n  -without-* | --without-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=no ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) as_fn_error $? \"unrecognized option: \\`$ac_option'\nTry \\`$0 --help' for more information\"\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    case $ac_envvar in #(\n      '' | [0-9]* | *[!_$as_cr_alnum]* )\n      as_fn_error $? \"invalid variable name: \\`$ac_envvar'\" ;;\n    esac\n    eval $ac_envvar=\\$ac_optarg\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    $as_echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      $as_echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : \"${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\"\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  as_fn_error $? \"missing argument to $ac_option\"\nfi\n\nif test -n \"$ac_unrecognized_opts\"; then\n  case $enable_option_checking in\n    no) ;;\n    fatal) as_fn_error $? \"unrecognized options: $ac_unrecognized_opts\" ;;\n    *)     $as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2 ;;\n  esac\nfi\n\n# Check all directory arguments for consistency.\nfor ac_var in\texec_prefix prefix bindir sbindir libexecdir datarootdir \\\n\t\tdatadir sysconfdir sharedstatedir localstatedir includedir \\\n\t\toldincludedir docdir infodir htmldir dvidir pdfdir psdir \\\n\t\tlibdir localedir mandir\ndo\n  eval ac_val=\\$$ac_var\n  # Remove trailing slashes.\n  case $ac_val in\n    */ )\n      ac_val=`expr \"X$ac_val\" : 'X\\(.*[^/]\\)' \\| \"X$ac_val\" : 'X\\(.*\\)'`\n      eval $ac_var=\\$ac_val;;\n  esac\n  # Be sure to have absolute directory names.\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* )  continue;;\n    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;\n  esac\n  as_fn_error $? \"expected an absolute directory name for --$ac_var: $ac_val\"\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\nac_pwd=`pwd` && test -n \"$ac_pwd\" &&\nac_ls_di=`ls -di .` &&\nac_pwd_ls_di=`cd \"$ac_pwd\" && ls -di .` ||\n  as_fn_error $? \"working directory cannot be determined\"\ntest \"X$ac_ls_di\" = \"X$ac_pwd_ls_di\" ||\n  as_fn_error $? \"pwd does not report name of working directory\"\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then the parent directory.\n  ac_confdir=`$as_dirname -- \"$as_myself\" ||\n$as_expr X\"$as_myself\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_myself\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_myself\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r \"$srcdir/$ac_unique_file\"; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r \"$srcdir/$ac_unique_file\"; then\n  test \"$ac_srcdir_defaulted\" = yes && srcdir=\"$ac_confdir or ..\"\n  as_fn_error $? \"cannot find sources ($ac_unique_file) in $srcdir\"\nfi\nac_msg=\"sources are in $srcdir, but \\`cd $srcdir' does not work\"\nac_abs_confdir=`(\n\tcd \"$srcdir\" && test -r \"./$ac_unique_file\" || as_fn_error $? \"$ac_msg\"\n\tpwd)`\n# When building in place, set srcdir=.\nif test \"$ac_abs_confdir\" = \"$ac_pwd\"; then\n  srcdir=.\nfi\n# Remove unnecessary trailing slashes from srcdir.\n# Double slashes in file names in object file debugging info\n# mess up M-x gdb in Emacs.\ncase $srcdir in\n*/) srcdir=`expr \"X$srcdir\" : 'X\\(.*[^/]\\)' \\| \"X$srcdir\" : 'X\\(.*\\)'`;;\nesac\nfor ac_var in $ac_precious_vars; do\n  eval ac_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_env_${ac_var}_value=\\$${ac_var}\n  eval ac_cv_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_cv_env_${ac_var}_value=\\$${ac_var}\ndone\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures telegram-cli 1.0 to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking ...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n                          [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n                          [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR            user executables [EPREFIX/bin]\n  --sbindir=DIR           system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR        program executables [EPREFIX/libexec]\n  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]\n  --libdir=DIR            object code libraries [EPREFIX/lib]\n  --includedir=DIR        C header files [PREFIX/include]\n  --oldincludedir=DIR     C header files for non-gcc [/usr/include]\n  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]\n  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]\n  --infodir=DIR           info documentation [DATAROOTDIR/info]\n  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]\n  --mandir=DIR            man documentation [DATAROOTDIR/man]\n  --docdir=DIR            documentation root [DATAROOTDIR/doc/telegram-cli]\n  --htmldir=DIR           html documentation [DOCDIR]\n  --dvidir=DIR            dvi documentation [DOCDIR]\n  --pdfdir=DIR            pdf documentation [DOCDIR]\n  --psdir=DIR             ps documentation [DOCDIR]\n_ACEOF\n\n  cat <<\\_ACEOF\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n  case $ac_init_help in\n     short | recursive ) echo \"Configuration of telegram-cli 1.0:\";;\n   esac\n  cat <<\\_ACEOF\n\nOptional Features:\n  --disable-option-checking  ignore unrecognized --enable/--with options\n  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)\n  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]\n  --disable-openssl\t  disables OpenSSL, and don't link against it\n\t\t\t  (this can't read *.pub files, though.)\n  --enable-extf\t\t  enables extended queries system\n  --enable-libevent\t  include libevent-based net and timers\n  --enable-valgrind\t  fixes for correct valgrind work\n\nOptional Packages:\n  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]\n  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\n  --with-openssl=DIR      root of the OpenSSL directory\n  --with-zlib=DIR         root directory path of zlib installation [defaults to\n                          /usr/local or /usr if not found in /usr/local]\n  --without-zlib          to disable zlib usage completely\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  LIBS        libraries to pass to the linker, e.g. -l<library>\n  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if\n              you have headers in a nonstandard directory <include dir>\n  CPP         C preprocessor\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\nReport bugs to the package provider.\n_ACEOF\nac_status=$?\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d \"$ac_dir\" ||\n      { cd \"$srcdir\" && ac_pwd=`pwd` && srcdir=. && test -d \"$ac_dir\"; } ||\n      continue\n    ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n    cd \"$ac_dir\" || { ac_status=$?; continue; }\n    # Check for guested configure.\n    if test -f \"$ac_srcdir/configure.gnu\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure.gnu\" --help=recursive\n    elif test -f \"$ac_srcdir/configure\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure\" --help=recursive\n    else\n      $as_echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi || ac_status=$?\n    cd \"$ac_pwd\" || { ac_status=$?; break; }\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit $ac_status\nif $ac_init_version; then\n  cat <<\\_ACEOF\ntelegram-cli configure 1.0\ngenerated by GNU Autoconf 2.69\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit\nfi\n\n## ------------------------ ##\n## Autoconf initialization. ##\n## ------------------------ ##\n\n# ac_fn_c_try_compile LINENO\n# --------------------------\n# Try to compile conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext\n  if { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest.$ac_objext; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_compile\n\n# ac_fn_c_try_link LINENO\n# -----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_link ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext conftest$ac_exeext\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest$ac_exeext && {\n\t test \"$cross_compiling\" = yes ||\n\t test -x conftest$ac_exeext\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information\n  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would\n  # interfere with the next link command; also delete a directory that is\n  # left behind by Apple's compiler.  We do this before executing the actions.\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_link\n\n# ac_fn_c_try_cpp LINENO\n# ----------------------\n# Try to preprocess conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_cpp ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_cpp conftest.$ac_ext\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_cpp conftest.$ac_ext\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } > conftest.i && {\n\t test -z \"$ac_c_preproc_warn_flag$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n    ac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_cpp\n\n# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES\n# -------------------------------------------------------\n# Tests whether HEADER exists, giving a warning if it cannot be compiled using\n# the include files in INCLUDES and setting the cache variable VAR\n# accordingly.\nac_fn_c_check_header_mongrel ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if eval \\${$3+:} false; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\nelse\n  # Is the header compilable?\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking $2 usability\" >&5\n$as_echo_n \"checking $2 usability... \" >&6; }\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\n#include <$2>\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_header_compiler=yes\nelse\n  ac_header_compiler=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler\" >&5\n$as_echo \"$ac_header_compiler\" >&6; }\n\n# Is the header present?\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking $2 presence\" >&5\n$as_echo_n \"checking $2 presence... \" >&6; }\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <$2>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  ac_header_preproc=yes\nelse\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc\" >&5\n$as_echo \"$ac_header_preproc\" >&6; }\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((\n  yes:no: )\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!\" >&5\n$as_echo \"$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result\" >&5\n$as_echo \"$as_me: WARNING: $2: proceeding with the compiler's result\" >&2;}\n    ;;\n  no:yes:* )\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled\" >&5\n$as_echo \"$as_me: WARNING: $2: present but cannot be compiled\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?\" >&5\n$as_echo \"$as_me: WARNING: $2:     check for missing prerequisite headers?\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation\" >&5\n$as_echo \"$as_me: WARNING: $2: see the Autoconf documentation\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\n$as_echo \"$as_me: WARNING: $2:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result\" >&5\n$as_echo \"$as_me: WARNING: $2: proceeding with the compiler's result\" >&2;}\n    ;;\nesac\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  eval \"$3=\\$ac_header_compiler\"\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_header_mongrel\n\n# ac_fn_c_try_run LINENO\n# ----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes\n# that executables *can* be run.\nac_fn_c_try_run ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: program exited with status $ac_status\" >&5\n       $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n       ac_retval=$ac_status\nfi\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_run\n\n# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES\n# -------------------------------------------------------\n# Tests whether HEADER exists and can be compiled using the include files in\n# INCLUDES, setting the cache variable VAR accordingly.\nac_fn_c_check_header_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\n#include <$2>\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  eval \"$3=yes\"\nelse\n  eval \"$3=no\"\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_header_compile\n\n# ac_fn_c_check_type LINENO TYPE VAR INCLUDES\n# -------------------------------------------\n# Tests whether TYPE exists after having included INCLUDES, setting cache\n# variable VAR accordingly.\nac_fn_c_check_type ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  eval \"$3=no\"\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nif (sizeof ($2))\n\t return 0;\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nif (sizeof (($2)))\n\t    return 0;\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nelse\n  eval \"$3=yes\"\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_type\n\n# ac_fn_c_check_func LINENO FUNC VAR\n# ----------------------------------\n# Tests whether FUNC exists, setting the cache variable VAR accordingly\nac_fn_c_check_func ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n/* Define $2 to an innocuous variant, in case <limits.h> declares $2.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define $2 innocuous_$2\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char $2 (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef $2\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar $2 ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined __stub_$2 || defined __stub___$2\nchoke me\n#endif\n\nint\nmain ()\n{\nreturn $2 ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  eval \"$3=yes\"\nelse\n  eval \"$3=no\"\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_func\ncat >config.log <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by telegram-cli $as_me 1.0, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\nexec 5>>config.log\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\n/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    $as_echo \"PATH: $as_dir\"\n  done\nIFS=$as_save_IFS\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\\'*)\n      ac_arg=`$as_echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) as_fn_append ac_configure_args0 \" '$ac_arg'\" ;;\n    2)\n      as_fn_append ac_configure_args1 \" '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n\tac_must_keep_next=false # Got value, back to normal.\n      else\n\tcase $ac_arg in\n\t  *=* | --config-cache | -C | -disable-* | --disable-* \\\n\t  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n\t  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n\t  | -with-* | --with-* | -without-* | --without-* | --x)\n\t    case \"$ac_configure_args0 \" in\n\t      \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n\t    esac\n\t    ;;\n\t  -* ) ac_must_keep_next=true ;;\n\tesac\n      fi\n      as_fn_append ac_configure_args \" '$ac_arg'\"\n      ;;\n    esac\n  done\ndone\n{ ac_configure_args0=; unset ac_configure_args0;}\n{ ac_configure_args1=; unset ac_configure_args1;}\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Use '\\'' to represent an apostrophe within the trap.\n# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    $as_echo \"## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\"\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n(\n  for ac_var in `(set) 2>&1 | sed -n '\\''s/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'\\''`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n  (set) 2>&1 |\n    case $as_nl`(ac_space='\\'' '\\''; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      sed -n \\\n\t\"s/'\\''/'\\''\\\\\\\\'\\'''\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\''\\\\2'\\''/p\"\n      ;; #(\n    *)\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n)\n    echo\n\n    $as_echo \"## ----------------- ##\n## Output variables. ##\n## ----------------- ##\"\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=\\$$ac_var\n      case $ac_val in\n      *\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n      esac\n      $as_echo \"$ac_var='\\''$ac_val'\\''\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      $as_echo \"## ------------------- ##\n## File substitutions. ##\n## ------------------- ##\"\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=\\$$ac_var\n\tcase $ac_val in\n\t*\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n\tesac\n\t$as_echo \"$ac_var='\\''$ac_val'\\''\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      $as_echo \"## ----------- ##\n## confdefs.h. ##\n## ----------- ##\"\n      echo\n      cat confdefs.h\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      $as_echo \"$as_me: caught signal $ac_signal\"\n    $as_echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core core.conftest.* &&\n    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -f -r conftest* confdefs.h\n\n$as_echo \"/* confdefs.h */\" > confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_URL \"$PACKAGE_URL\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer an explicitly selected file to automatically selected ones.\nac_site_file1=NONE\nac_site_file2=NONE\nif test -n \"$CONFIG_SITE\"; then\n  # We do not want a PATH search for config.site.\n  case $CONFIG_SITE in #((\n    -*)  ac_site_file1=./$CONFIG_SITE;;\n    */*) ac_site_file1=$CONFIG_SITE;;\n    *)   ac_site_file1=./$CONFIG_SITE;;\n  esac\nelif test \"x$prefix\" != xNONE; then\n  ac_site_file1=$prefix/share/config.site\n  ac_site_file2=$prefix/etc/config.site\nelse\n  ac_site_file1=$ac_default_prefix/share/config.site\n  ac_site_file2=$ac_default_prefix/etc/config.site\nfi\nfor ac_site_file in \"$ac_site_file1\" \"$ac_site_file2\"\ndo\n  test \"x$ac_site_file\" = xNONE && continue\n  if test /dev/null != \"$ac_site_file\" && test -r \"$ac_site_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file\" >&5\n$as_echo \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\" \\\n      || { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"failed to load site script $ac_site_file\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special files\n  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.\n  if test /dev/null != \"$cache_file\" && test -f \"$cache_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading cache $cache_file\" >&5\n$as_echo \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . \"$cache_file\";;\n      *)                      . \"./$cache_file\";;\n    esac\n  fi\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: creating cache $cache_file\" >&5\n$as_echo \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in $ac_precious_vars; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\\$ac_cv_env_${ac_var}_value\n  eval ac_new_val=\\$ac_env_${ac_var}_value\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was not set in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n\t# differences in whitespace do not lead to failure.\n\tac_old_val_w=`echo x $ac_old_val`\n\tac_new_val_w=`echo x $ac_new_val`\n\tif test \"$ac_old_val_w\" != \"$ac_new_val_w\"; then\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' has changed since the previous run:\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n\t  ac_cache_corrupted=:\n\telse\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&5\n$as_echo \"$as_me: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&2;}\n\t  eval $ac_var=\\$ac_old_val\n\tfi\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   former value:  \\`$ac_old_val'\" >&5\n$as_echo \"$as_me:   former value:  \\`$ac_old_val'\" >&2;}\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   current value: \\`$ac_new_val'\" >&5\n$as_echo \"$as_me:   current value: \\`$ac_new_val'\" >&2;}\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\\'*) ac_arg=$ac_var=`$as_echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) as_fn_append ac_configure_args \" '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build\" >&5\n$as_echo \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  as_fn_error $? \"run \\`make distclean' and/or \\`rm $cache_file' and start over\" \"$LINENO\" 5\nfi\n## -------------------- ##\n## Main body of script. ##\n## -------------------- ##\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\nac_config_headers=\"$ac_config_headers config.h\"\n\n\n# ===========================================================================\n#     http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html\n# ===========================================================================\n#\n# SYNOPSIS\n#\n#   AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])\n#\n# DESCRIPTION\n#\n#   Look for OpenSSL in a number of default spots, or in a user-selected\n#   spot (via --with-openssl).  Sets\n#\n#     OPENSSL_INCLUDES to the include directives required\n#     OPENSSL_LIBS to the -l directives required\n#     OPENSSL_LDFLAGS to the -L or -R flags required\n#\n#   and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately\n#\n#   This macro sets OPENSSL_INCLUDES such that source files should use the\n#   openssl/ directory in include directives:\n#\n#     #include <openssl/hmac.h>\n#\n# LICENSE\n#\n#   Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>\n#   Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>\n#\n#   Copying and distribution of this file, with or without modification, are\n#   permitted in any medium without royalty provided the copyright notice\n#   and this notice are preserved. This file is offered as-is, without any\n#   warranty.\n\n#serial 8\n\n# This is what autoupdate's m4 run will expand.  It fires\n# the warning (with _au_warn_XXX), outputs it into the\n# updated configure.ac (with AC_DIAGNOSE), and then outputs\n# the replacement expansion.\n\n\n# This is an auxiliary macro that is also run when\n# autoupdate runs m4.  It simply calls m4_warning, but\n# we need a wrapper so that each warning is emitted only\n# once.  We break the quoting in m4_warning's argument in\n# order to expand this macro's arguments, not AU_DEFUN's.\n\n\n# Finally, this is the expansion that is picked up by\n# autoconf.  It tells the user to run autoupdate, and\n# then outputs the replacement expansion.  We do not care\n# about autoupdate's warning because that contains\n# information on what to do *after* running autoupdate.\n\n\n\n# ===========================================================================\n#       http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html\n# ===========================================================================\n#\n# SYNOPSIS\n#\n#   AX_CHECK_ZLIB([action-if-found], [action-if-not-found])\n#\n# DESCRIPTION\n#\n#   This macro searches for an installed zlib library. If nothing was\n#   specified when calling configure, it searches first in /usr/local and\n#   then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,\n#   it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If\n#   --without-zlib is specified, the library is not searched at all.\n#\n#   If either the header file (zlib.h) or the library (libz) is not found,\n#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is\n#   not specified, the configuration exits on error, asking for a valid zlib\n#   installation directory or --without-zlib.\n#\n#   If both header file and library are found, shell commands\n#   'action-if-found' is run. If 'action-if-found' is not specified, the\n#   default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends\n#   '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls\n#   AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition\n#   for this symbol in a config.h file. Sample usage in a C/C++ source is as\n#   follows:\n#\n#     #ifdef HAVE_LIBZ\n#     #include <zlib.h>\n#     #endif /* HAVE_LIBZ */\n#\n# LICENSE\n#\n#   Copyright (c) 2008 Loic Dachary <loic@senga.org>\n#   Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>\n#\n#   This program is free software; you can redistribute it and/or modify it\n#   under the terms of the GNU General Public License as published by the\n#   Free Software Foundation; either version 2 of the License, or (at your\n#   option) any later version.\n#\n#   This program is distributed in the hope that it will be useful, but\n#   WITHOUT ANY WARRANTY; without even the implied warranty of\n#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\n#   Public License for more details.\n#\n#   You should have received a copy of the GNU General Public License along\n#   with this program. If not, see <http://www.gnu.org/licenses/>.\n#\n#   As a special exception, the respective Autoconf Macro's copyright owner\n#   gives unlimited permission to copy, distribute and modify the configure\n#   scripts that are the output of Autoconf when processing the Macro. You\n#   need not follow the terms of the GNU General Public License when using\n#   or distributing such scripts, even though portions of the text of the\n#   Macro appear in them. The GNU General Public License (GPL) does govern\n#   all other use of the material that constitutes the Autoconf Macro.\n#\n#   This special exception to the GPL applies to versions of the Autoconf\n#   Macro released by the Autoconf Archive. When you make and distribute a\n#   modified version of the Autoconf Macro, you may extend this special\n#   exception to the GPL to apply to your modified version as well.\n\n#serial 14\n\n# This is what autoupdate's m4 run will expand.  It fires\n# the warning (with _au_warn_XXX), outputs it into the\n# updated configure.ac (with AC_DIAGNOSE), and then outputs\n# the replacement expansion.\n\n\n# This is an auxiliary macro that is also run when\n# autoupdate runs m4.  It simply calls m4_warning, but\n# we need a wrapper so that each warning is emitted only\n# once.  We break the quoting in m4_warning's argument in\n# order to expand this macro's arguments, not AU_DEFUN's.\n\n\n# Finally, this is the expansion that is picked up by\n# autoconf.  It tells the user to run autoupdate, and\n# then outputs the replacement expansion.  We do not care\n# about autoupdate's warning because that contains\n# information on what to do *after* running autoupdate.\n\n\n\n\n# Checks for programs.\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n          if test -n \"$ac_tool_prefix\"; then\n    # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  fi\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl.exe\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl.exe\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n\n# Provide some information about the compiler.\n$as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler version\" >&5\nset X $ac_compile\nac_compiler=$2\nfor ac_option in --version -v -V -qversion; do\n  { { ac_try=\"$ac_compiler $ac_option >&5\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compiler $ac_option >&5\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    sed '10a\\\n... rest of stderr output deleted ...\n         10q' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n  fi\n  rm -f conftest.er1 conftest.err\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\ndone\n\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.out.dSYM a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the C compiler works\" >&5\n$as_echo_n \"checking whether the C compiler works... \" >&6; }\nac_link_default=`$as_echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\n\n# The possible output files:\nac_files=\"a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*\"\n\nac_rmfiles=\nfor ac_file in $ac_files\ndo\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    * ) ac_rmfiles=\"$ac_rmfiles $ac_file\";;\n  esac\ndone\nrm -f $ac_rmfiles\n\nif { { ac_try=\"$ac_link_default\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link_default\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.\n# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'\n# in a Makefile.  We should not override ac_cv_exeext if it was cached,\n# so that the user can short-circuit this test for compilers unknown to\n# Autoconf.\nfor ac_file in $ac_files ''\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )\n\t;;\n    [ab].out )\n\t# We found the default executable, but exeext='' is most\n\t# certainly right.\n\tbreak;;\n    *.* )\n\tif test \"${ac_cv_exeext+set}\" = set && test \"$ac_cv_exeext\" != no;\n\tthen :; else\n\t   ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\tfi\n\t# We set ac_cv_exeext here because the later test for it is not\n\t# safe: cross compilers may not add the suffix if given an `-o'\n\t# argument, so we may need to know it at that point already.\n\t# Even if this section looks crufty: it has the advantage of\n\t# actually working.\n\tbreak;;\n    * )\n\tbreak;;\n  esac\ndone\ntest \"$ac_cv_exeext\" = no && ac_cv_exeext=\n\nelse\n  ac_file=''\nfi\nif test -z \"$ac_file\"; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n$as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"C compiler cannot create executables\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name\" >&5\n$as_echo_n \"checking for C compiler default output file name... \" >&6; }\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_file\" >&5\n$as_echo \"$ac_file\" >&6; }\nac_exeext=$ac_cv_exeext\n\nrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of executables\" >&5\n$as_echo_n \"checking for suffix of executables... \" >&6; }\nif { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t  break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest conftest$ac_cv_exeext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext\" >&5\n$as_echo \"$ac_cv_exeext\" >&6; }\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdio.h>\nint\nmain ()\n{\nFILE *f = fopen (\"conftest.out\", \"w\");\n return ferror (f) || fclose (f) != 0;\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files=\"$ac_clean_files conftest.out\"\n# Check that the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling\" >&5\n$as_echo_n \"checking whether we are cross compiling... \" >&6; }\nif test \"$cross_compiling\" != yes; then\n  { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n  if { ac_try='./conftest$ac_cv_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n    fi\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $cross_compiling\" >&5\n$as_echo \"$cross_compiling\" >&6; }\n\nrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of object files\" >&5\n$as_echo_n \"checking for suffix of object files... \" >&6; }\nif ${ac_cv_objext+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  for ac_file in conftest.o conftest.obj conftest.*; do\n  test -f \"$ac_file\" || continue;\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext\" >&5\n$as_echo \"$ac_cv_objext\" >&6; }\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler\" >&5\n$as_echo_n \"checking whether we are using the GNU C compiler... \" >&6; }\nif ${ac_cv_c_compiler_gnu+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_compiler_gnu=yes\nelse\n  ac_compiler_gnu=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu\" >&5\n$as_echo \"$ac_cv_c_compiler_gnu\" >&6; }\nif test $ac_compiler_gnu = yes; then\n  GCC=yes\nelse\n  GCC=\nfi\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g\" >&5\n$as_echo_n \"checking whether $CC accepts -g... \" >&6; }\nif ${ac_cv_prog_cc_g+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_save_c_werror_flag=$ac_c_werror_flag\n   ac_c_werror_flag=yes\n   ac_cv_prog_cc_g=no\n   CFLAGS=\"-g\"\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nelse\n  CFLAGS=\"\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nelse\n  ac_c_werror_flag=$ac_save_c_werror_flag\n\t CFLAGS=\"-g\"\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n   ac_c_werror_flag=$ac_save_c_werror_flag\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g\" >&5\n$as_echo \"$ac_cv_prog_cc_g\" >&6; }\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89\" >&5\n$as_echo_n \"checking for $CC option to accept ISO C89... \" >&6; }\nif ${ac_cv_prog_cc_c89+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_cv_prog_cc_c89=no\nac_save_CC=$CC\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\nstruct stat;\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\n\n/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has\n   function prototypes and stuff, but not '\\xHH' hex character constants.\n   These don't provoke an error unfortunately, instead are silently treated\n   as 'x'.  The following induces an error, until -std is added to get\n   proper ANSI mode.  Curiously '\\x00'!='x' always comes out true, for an\n   array size at least.  It's necessary to write '\\x00'==0 to get something\n   that's true only with -std.  */\nint osf4_cc_array ['\\x00' == 0 ? 1 : -1];\n\n/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters\n   inside strings and character constants.  */\n#define FOO(x) 'x'\nint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];\n\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\nfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \\\n\t-Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  if ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_c89=$ac_arg\nfi\nrm -f core conftest.err conftest.$ac_objext\n  test \"x$ac_cv_prog_cc_c89\" != \"xno\" && break\ndone\nrm -f conftest.$ac_ext\nCC=$ac_save_CC\n\nfi\n# AC_CACHE_VAL\ncase \"x$ac_cv_prog_cc_c89\" in\n  x)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: none needed\" >&5\n$as_echo \"none needed\" >&6; } ;;\n  xno)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: unsupported\" >&5\n$as_echo \"unsupported\" >&6; } ;;\n  *)\n    CC=\"$CC $ac_cv_prog_cc_c89\"\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89\" >&5\n$as_echo \"$ac_cv_prog_cc_c89\" >&6; } ;;\nesac\nif test \"x$ac_cv_prog_cc_c89\" != xno; then :\n\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n# BSD locations for headers and libraries from packages, Linux locations for self-compiled stuff.\nCPPFLAGS=\"$CPPFLAGS -I/usr/local/include\"\nLDFLAGS=\"$LDFLAGS -L/usr/local/lib\"\n\n# Checks for libraries.\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime\" >&5\n$as_echo_n \"checking for library containing clock_gettime... \" >&6; }\nif ${ac_cv_search_clock_gettime+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_func_search_save_LIBS=$LIBS\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar clock_gettime ();\nint\nmain ()\n{\nreturn clock_gettime ();\n  ;\n  return 0;\n}\n_ACEOF\nfor ac_lib in '' rt; do\n  if test -z \"$ac_lib\"; then\n    ac_res=\"none required\"\n  else\n    ac_res=-l$ac_lib\n    LIBS=\"-l$ac_lib  $ac_func_search_save_LIBS\"\n  fi\n  if ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_search_clock_gettime=$ac_res\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext\n  if ${ac_cv_search_clock_gettime+:} false; then :\n  break\nfi\ndone\nif ${ac_cv_search_clock_gettime+:} false; then :\n\nelse\n  ac_cv_search_clock_gettime=no\nfi\nrm conftest.$ac_ext\nLIBS=$ac_func_search_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime\" >&5\n$as_echo \"$ac_cv_search_clock_gettime\" >&6; }\nac_res=$ac_cv_search_clock_gettime\nif test \"$ac_res\" != no; then :\n  test \"$ac_res\" = \"none required\" || LIBS=\"$ac_res $LIBS\"\n\nfi\n\n\nEVENT_VER=\"\"\nEXTRA_OBJECTS=\"\"\n\n#     OPENSSL_INCLUDES to the include directives required\n#     OPENSSL_LIBS to the -l directives required\n#     OPENSSL_LDFLAGS to the -L or -R flags required\n\n# Check whether --enable-openssl was given.\nif test \"${enable_openssl+set}\" = set; then :\n  enableval=$enable_openssl;\n  if test \"x$enableval\" = \"xno\" ; then\n\n$as_echo \"#define TGL_AVOID_OPENSSL 1\" >>confdefs.h\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for gcry_mpi_snatch in -lgcrypt\" >&5\n$as_echo_n \"checking for gcry_mpi_snatch in -lgcrypt... \" >&6; }\nif ${ac_cv_lib_gcrypt_gcry_mpi_snatch+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lgcrypt  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar gcry_mpi_snatch ();\nint\nmain ()\n{\nreturn gcry_mpi_snatch ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_gcrypt_gcry_mpi_snatch=yes\nelse\n  ac_cv_lib_gcrypt_gcry_mpi_snatch=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_mpi_snatch\" >&5\n$as_echo \"$ac_cv_lib_gcrypt_gcry_mpi_snatch\" >&6; }\nif test \"x$ac_cv_lib_gcrypt_gcry_mpi_snatch\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBGCRYPT 1\n_ACEOF\n\n  LIBS=\"-lgcrypt $LIBS\"\n\nelse\n  as_fn_error $? \"\\\"Need libgcrypt >= 1.60\\\"\" \"$LINENO\" 5\nfi\n\n  else\n    # Don't be annoying, so don't inform the user about --disable-openssl\n\n    found=false\n\n# Check whether --with-openssl was given.\nif test \"${with_openssl+set}\" = set; then :\n  withval=$with_openssl;\n            case \"$withval\" in\n            \"\" | y | ye | yes | n | no)\n            as_fn_error $? \"Invalid --with-openssl value\" \"$LINENO\" 5\n              ;;\n            *) ssldirs=\"$withval\"\n              ;;\n            esac\n\nelse\n\n            # if pkg-config is installed and openssl has installed a .pc file,\n            # then use that information and don't search ssldirs\n            # Extract the first word of \"pkg-config\", so it can be a program name with args.\nset dummy pkg-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_PKG_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_PKG_CONFIG=\"$PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  ;;\nesac\nfi\nPKG_CONFIG=$ac_cv_path_PKG_CONFIG\nif test -n \"$PKG_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG\" >&5\n$as_echo \"$PKG_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n            if test x\"$PKG_CONFIG\" != x\"\"; then\n                OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`\n                if test $? = 0; then\n                    OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`\n                    OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`\n                    found=true\n                fi\n            fi\n\n            # no such luck; use some default ssldirs\n            if ! $found; then\n                ssldirs=\"/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr\"\n            fi\n\n\nfi\n\n\n\n    # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in\n    # an 'openssl' subdirectory\n\n    if ! $found; then\n        OPENSSL_INCLUDES=\n        for ssldir in $ssldirs; do\n            { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir\" >&5\n$as_echo_n \"checking for openssl/ssl.h in $ssldir... \" >&6; }\n            if test -f \"$ssldir/include/openssl/ssl.h\"; then\n                OPENSSL_INCLUDES=\"-I$ssldir/include\"\n                OPENSSL_LDFLAGS=\"-L$ssldir/lib\"\n                OPENSSL_LIBS=\"-lssl -lcrypto\"\n                found=true\n                { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n                break\n            else\n                { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n            fi\n        done\n\n        # if the file wasn't found, well, go ahead and try the link anyway -- maybe\n        # it will just work!\n    fi\n\n    # try the preprocessor and linker with our new flags,\n    # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works\" >&5\n$as_echo_n \"checking whether compiling and linking against OpenSSL works... \" >&6; }\n    echo \"Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;\" \\\n        \"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES\" >&5\n\n    save_LIBS=\"$LIBS\"\n    save_LDFLAGS=\"$LDFLAGS\"\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    LDFLAGS=\"$LDFLAGS $OPENSSL_LDFLAGS\"\n    LIBS=\"$OPENSSL_LIBS $LIBS\"\n    CPPFLAGS=\"$OPENSSL_INCLUDES $CPPFLAGS\"\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <openssl/ssl.h>\nint\nmain ()\n{\nSSL_new(NULL)\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n\n            { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n\n\nelse\n\n            { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n            as_fn_error $? \"No openssl found.\" \"$LINENO\" 5\n\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n\n\n\n\n\n  fi\n\nelse\n\n\n    found=false\n\n# Check whether --with-openssl was given.\nif test \"${with_openssl+set}\" = set; then :\n  withval=$with_openssl;\n            case \"$withval\" in\n            \"\" | y | ye | yes | n | no)\n            as_fn_error $? \"Invalid --with-openssl value\" \"$LINENO\" 5\n              ;;\n            *) ssldirs=\"$withval\"\n              ;;\n            esac\n\nelse\n\n            # if pkg-config is installed and openssl has installed a .pc file,\n            # then use that information and don't search ssldirs\n            # Extract the first word of \"pkg-config\", so it can be a program name with args.\nset dummy pkg-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_PKG_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_PKG_CONFIG=\"$PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  ;;\nesac\nfi\nPKG_CONFIG=$ac_cv_path_PKG_CONFIG\nif test -n \"$PKG_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG\" >&5\n$as_echo \"$PKG_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n            if test x\"$PKG_CONFIG\" != x\"\"; then\n                OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`\n                if test $? = 0; then\n                    OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`\n                    OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`\n                    found=true\n                fi\n            fi\n\n            # no such luck; use some default ssldirs\n            if ! $found; then\n                ssldirs=\"/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr\"\n            fi\n\n\nfi\n\n\n\n    # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in\n    # an 'openssl' subdirectory\n\n    if ! $found; then\n        OPENSSL_INCLUDES=\n        for ssldir in $ssldirs; do\n            { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir\" >&5\n$as_echo_n \"checking for openssl/ssl.h in $ssldir... \" >&6; }\n            if test -f \"$ssldir/include/openssl/ssl.h\"; then\n                OPENSSL_INCLUDES=\"-I$ssldir/include\"\n                OPENSSL_LDFLAGS=\"-L$ssldir/lib\"\n                OPENSSL_LIBS=\"-lssl -lcrypto\"\n                found=true\n                { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n                break\n            else\n                { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n            fi\n        done\n\n        # if the file wasn't found, well, go ahead and try the link anyway -- maybe\n        # it will just work!\n    fi\n\n    # try the preprocessor and linker with our new flags,\n    # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works\" >&5\n$as_echo_n \"checking whether compiling and linking against OpenSSL works... \" >&6; }\n    echo \"Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;\" \\\n        \"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES\" >&5\n\n    save_LIBS=\"$LIBS\"\n    save_LDFLAGS=\"$LDFLAGS\"\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    LDFLAGS=\"$LDFLAGS $OPENSSL_LDFLAGS\"\n    LIBS=\"$OPENSSL_LIBS $LIBS\"\n    CPPFLAGS=\"$OPENSSL_INCLUDES $CPPFLAGS\"\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <openssl/ssl.h>\nint\nmain ()\n{\nSSL_new(NULL)\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n\n            { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n\n\nelse\n\n            { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n            as_fn_error $? \"No openssl found. With --disable-openssl, libtgl will use libgcrypt instead.\" \"$LINENO\" 5\n\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n\n\n\n\n\n\nfi\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor\" >&5\n$as_echo_n \"checking how to run the C preprocessor... \" >&6; }\n# On Suns, sometimes $CPP names a directory.\nif test -n \"$CPP\" && test -d \"$CPP\"; then\n  CPP=\nfi\nif test -z \"$CPP\"; then\n  if ${ac_cv_prog_CPP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n      # Double quotes because CPP needs to be expanded\n    for CPP in \"$CC -E\" \"$CC -E -traditional-cpp\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n  break\nfi\n\n    done\n    ac_cv_prog_CPP=$CPP\n\nfi\n  CPP=$ac_cv_prog_CPP\nelse\n  ac_cv_prog_CPP=$CPP\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CPP\" >&5\n$as_echo \"$CPP\" >&6; }\nac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"C preprocessor \\\"$CPP\\\" fails sanity check\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e\" >&5\n$as_echo_n \"checking for grep that handles long lines and -e... \" >&6; }\nif ${ac_cv_path_GREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$GREP\"; then\n  ac_path_GREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in grep ggrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_GREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_GREP\" || continue\n# Check for GNU ac_path_GREP and select it if it is found.\n  # Check for GNU $ac_path_GREP\ncase `\"$ac_path_GREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_GREP=\"$ac_path_GREP\" ac_path_GREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'GREP' >> \"conftest.nl\"\n    \"$ac_path_GREP\" -e 'GREP$' -e '-(cannot match)-' < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_GREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_GREP=\"$ac_path_GREP\"\n      ac_path_GREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_GREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_GREP\"; then\n    as_fn_error $? \"no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_GREP=$GREP\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP\" >&5\n$as_echo \"$ac_cv_path_GREP\" >&6; }\n GREP=\"$ac_cv_path_GREP\"\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for egrep\" >&5\n$as_echo_n \"checking for egrep... \" >&6; }\nif ${ac_cv_path_EGREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1\n   then ac_cv_path_EGREP=\"$GREP -E\"\n   else\n     if test -z \"$EGREP\"; then\n  ac_path_EGREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in egrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_EGREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_EGREP\" || continue\n# Check for GNU ac_path_EGREP and select it if it is found.\n  # Check for GNU $ac_path_EGREP\ncase `\"$ac_path_EGREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_EGREP=\"$ac_path_EGREP\" ac_path_EGREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'EGREP' >> \"conftest.nl\"\n    \"$ac_path_EGREP\" 'EGREP$' < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_EGREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_EGREP=\"$ac_path_EGREP\"\n      ac_path_EGREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_EGREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_EGREP\"; then\n    as_fn_error $? \"no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_EGREP=$EGREP\nfi\n\n   fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP\" >&5\n$as_echo \"$ac_cv_path_EGREP\" >&6; }\n EGREP=\"$ac_cv_path_EGREP\"\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ANSI C header files\" >&5\n$as_echo_n \"checking for ANSI C header files... \" >&6; }\nif ${ac_cv_header_stdc+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <float.h>\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_header_stdc=yes\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n\nif test $ac_cv_header_stdc = yes; then\n  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <string.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"memchr\" >/dev/null 2>&1; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdlib.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"free\" >/dev/null 2>&1; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.\n  if test \"$cross_compiling\" = yes; then :\n  :\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ctype.h>\n#include <stdlib.h>\n#if ((' ' & 0x0FF) == 0x020)\n# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')\n# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))\n#else\n# define ISLOWER(c) \\\n\t\t   (('a' <= (c) && (c) <= 'i') \\\n\t\t     || ('j' <= (c) && (c) <= 'r') \\\n\t\t     || ('s' <= (c) && (c) <= 'z'))\n# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))\n#endif\n\n#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))\nint\nmain ()\n{\n  int i;\n  for (i = 0; i < 256; i++)\n    if (XOR (islower (i), ISLOWER (i))\n\t|| toupper (i) != TOUPPER (i))\n      return 2;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\nfi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc\" >&5\n$as_echo \"$ac_cv_header_stdc\" >&6; }\nif test $ac_cv_header_stdc = yes; then\n\n$as_echo \"#define STDC_HEADERS 1\" >>confdefs.h\n\nfi\n\n# On IRIX 5.3, sys/types and inttypes.h are conflicting.\nfor ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \\\n\t\t  inttypes.h stdint.h unistd.h\ndo :\n  as_ac_Header=`$as_echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nac_fn_c_check_header_compile \"$LINENO\" \"$ac_header\" \"$as_ac_Header\" \"$ac_includes_default\n\"\nif eval test \\\"x\\$\"$as_ac_Header\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\n#\n# Handle user hints\n#\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if zlib is wanted\" >&5\n$as_echo_n \"checking if zlib is wanted... \" >&6; }\nzlib_places=\"/usr/local /usr /opt/local /sw\"\n\n# Check whether --with-zlib was given.\nif test \"${with_zlib+set}\" = set; then :\n  withval=$with_zlib; if test \"$withval\" != no ; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n  if test -d \"$withval\"\n  then\n    zlib_places=\"$withval $zlib_places\"\n  else\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places\" >&5\n$as_echo \"$as_me: WARNING: Sorry, $withval does not exist, checking usual places\" >&2;}\n  fi\nelse\n  zlib_places=\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nfi\n\n\n#\n# Locate zlib, if wanted\n#\nif test -n \"${zlib_places}\"\nthen\n\t# check the user supplied or any other more or less 'standard' place:\n\t#   Most UNIX systems      : /usr/local and /usr\n\t#   MacPorts / Fink on OSX : /opt/local respectively /sw\n\tfor ZLIB_HOME in ${zlib_places} ; do\n\t  if test -f \"${ZLIB_HOME}/include/zlib.h\"; then break; fi\n\t  ZLIB_HOME=\"\"\n\tdone\n\n  ZLIB_OLD_LDFLAGS=$LDFLAGS\n  ZLIB_OLD_CPPFLAGS=$CPPFLAGS\n  if test -n \"${ZLIB_HOME}\"; then\n        LDFLAGS=\"$LDFLAGS -L${ZLIB_HOME}/lib\"\n        CPPFLAGS=\"$CPPFLAGS -I${ZLIB_HOME}/include\"\n  fi\n\n  ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz\" >&5\n$as_echo_n \"checking for inflateEnd in -lz... \" >&6; }\nif ${ac_cv_lib_z_inflateEnd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lz  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar inflateEnd ();\nint\nmain ()\n{\nreturn inflateEnd ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_z_inflateEnd=yes\nelse\n  ac_cv_lib_z_inflateEnd=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd\" >&5\n$as_echo \"$ac_cv_lib_z_inflateEnd\" >&6; }\nif test \"x$ac_cv_lib_z_inflateEnd\" = xyes; then :\n  zlib_cv_libz=yes\nelse\n  zlib_cv_libz=no\nfi\n\n  ac_fn_c_check_header_mongrel \"$LINENO\" \"zlib.h\" \"ac_cv_header_zlib_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_zlib_h\" = xyes; then :\n  zlib_cv_zlib_h=yes\nelse\n  zlib_cv_zlib_h=no\nfi\n\n\n  ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n  if test \"$zlib_cv_libz\" = \"yes\" && test \"$zlib_cv_zlib_h\" = \"yes\"\n  then\n    #\n    # If both library and header were found, action-if-found\n    #\n\n                CPPFLAGS=\"$CPPFLAGS -I${ZLIB_HOME}/include\"\n                LDFLAGS=\"$LDFLAGS -L${ZLIB_HOME}/lib\"\n                LIBS=\"-lz $LIBS\"\n\n$as_echo \"#define HAVE_LIBZ 1\" >>confdefs.h\n\n\n  else\n    #\n    # If either header or library was not found, action-if-not-found\n    #\n    as_fn_error $? \"No zlib found\" \"$LINENO\" 5\n  fi\nfi\n\n\n# Check whether --enable-extf was given.\nif test \"${enable_extf+set}\" = set; then :\n  enableval=$enable_extf;\n  if test \"x$enableval\" = \"xno\" ; then\n\n$as_echo \"#define DISABLE_EXTF 1\" >>confdefs.h\n\n  fi\n\nfi\n\n\n# Check whether --enable-libevent was given.\nif test \"${enable_libevent+set}\" = set; then :\n  enableval=$enable_libevent;\n  if test \"x$enableval\" = \"xyes\" ; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for event_base_new in -levent\" >&5\n$as_echo_n \"checking for event_base_new in -levent... \" >&6; }\nif ${ac_cv_lib_event_event_base_new+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-levent  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar event_base_new ();\nint\nmain ()\n{\nreturn event_base_new ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_event_event_base_new=yes\nelse\n  ac_cv_lib_event_event_base_new=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_event_event_base_new\" >&5\n$as_echo \"$ac_cv_lib_event_event_base_new\" >&6; }\nif test \"x$ac_cv_lib_event_event_base_new\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBEVENT 1\n_ACEOF\n\n  LIBS=\"-levent $LIBS\"\n\nelse\n  as_fn_error $? \"no libevent found\" \"$LINENO\" 5\nfi\n\n    ac_fn_c_check_header_mongrel \"$LINENO\" \"event2/event.h\" \"ac_cv_header_event2_event_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_event2_event_h\" = xyes; then :\n\n$as_echo \"#define EVENT_V2 1\" >>confdefs.h\n\nelse\n\n      ac_fn_c_check_header_mongrel \"$LINENO\" \"event.h\" \"ac_cv_header_event_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_event_h\" = xyes; then :\n\n$as_echo \"#define EVENT_V1 1\" >>confdefs.h\n\nelse\n  as_fn_error $? \"no libevent found\" \"$LINENO\" 5\nfi\n\n\n\nfi\n\n\n    EXTRA_OBJECTS=\"${EXTRA_OBJECTS} objs/tgl-net.o objs/tgl-timers.o\"\n  fi\n\nfi\n\n\n# Check whether --enable-valgrind was given.\nif test \"${enable_valgrind+set}\" = set; then :\n  enableval=$enable_valgrind;\n  if test \"x$enableval\" = \"xyes\" ; then\n    ac_fn_c_check_header_mongrel \"$LINENO\" \"valgrind/memcheck.h\" \"ac_cv_header_valgrind_memcheck_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_valgrind_memcheck_h\" = xyes; then :\n\n$as_echo \"#define VALGRIND_FIXES 1\" >>confdefs.h\n\nfi\n\n\n  fi\n\nfi\n\n\n# Checks for header files.\nfor ac_header in fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h\ndo :\n  as_ac_Header=`$as_echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nac_fn_c_check_header_mongrel \"$LINENO\" \"$ac_header\" \"$as_ac_Header\" \"$ac_includes_default\"\nif eval test \\\"x\\$\"$as_ac_Header\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\n# FreeBSD needs -lexecinfo\nfor ac_header in execinfo.h\ndo :\n  ac_fn_c_check_header_mongrel \"$LINENO\" \"execinfo.h\" \"ac_cv_header_execinfo_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_execinfo_h\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_EXECINFO_H 1\n_ACEOF\n tgl_found_execinfo_header=yes; break;\nfi\n\ndone\n\nif test \"x$tgl_found_execinfo_header\" = \"xyes\"; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd\" >&5\n$as_echo_n \"checking for library containing backtrace_symbols_fd... \" >&6; }\nif ${ac_cv_search_backtrace_symbols_fd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_func_search_save_LIBS=$LIBS\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar backtrace_symbols_fd ();\nint\nmain ()\n{\nreturn backtrace_symbols_fd ();\n  ;\n  return 0;\n}\n_ACEOF\nfor ac_lib in '' execinfo; do\n  if test -z \"$ac_lib\"; then\n    ac_res=\"none required\"\n  else\n    ac_res=-l$ac_lib\n    LIBS=\"-l$ac_lib  $ac_func_search_save_LIBS\"\n  fi\n  if ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_search_backtrace_symbols_fd=$ac_res\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext\n  if ${ac_cv_search_backtrace_symbols_fd+:} false; then :\n  break\nfi\ndone\nif ${ac_cv_search_backtrace_symbols_fd+:} false; then :\n\nelse\n  ac_cv_search_backtrace_symbols_fd=no\nfi\nrm conftest.$ac_ext\nLIBS=$ac_func_search_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd\" >&5\n$as_echo \"$ac_cv_search_backtrace_symbols_fd\" >&6; }\nac_res=$ac_cv_search_backtrace_symbols_fd\nif test \"$ac_res\" != no; then :\n  test \"$ac_res\" = \"none required\" || LIBS=\"$ac_res $LIBS\"\n\nfi\n\nfi\n\n\n# Checks for typedefs, structures, and compiler characteristics.\nac_fn_c_check_type \"$LINENO\" \"size_t\" \"ac_cv_type_size_t\" \"$ac_includes_default\"\nif test \"x$ac_cv_type_size_t\" = xyes; then :\n\nelse\n\ncat >>confdefs.h <<_ACEOF\n#define size_t unsigned int\n_ACEOF\n\nfi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h\" >&5\n$as_echo_n \"checking for uid_t in sys/types.h... \" >&6; }\nif ${ac_cv_type_uid_t+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <sys/types.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"uid_t\" >/dev/null 2>&1; then :\n  ac_cv_type_uid_t=yes\nelse\n  ac_cv_type_uid_t=no\nfi\nrm -f conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t\" >&5\n$as_echo \"$ac_cv_type_uid_t\" >&6; }\nif test $ac_cv_type_uid_t = no; then\n\n$as_echo \"#define uid_t int\" >>confdefs.h\n\n\n$as_echo \"#define gid_t int\" >>confdefs.h\n\nfi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for inline\" >&5\n$as_echo_n \"checking for inline... \" >&6; }\nif ${ac_cv_c_inline+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_cv_c_inline=no\nfor ac_kw in inline __inline__ __inline; do\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifndef __cplusplus\ntypedef int foo_t;\nstatic $ac_kw foo_t static_foo () {return 0; }\n$ac_kw foo_t foo () {return 0; }\n#endif\n\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_c_inline=$ac_kw\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n  test \"$ac_cv_c_inline\" != no && break\ndone\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline\" >&5\n$as_echo \"$ac_cv_c_inline\" >&6; }\n\ncase $ac_cv_c_inline in\n  inline | yes) ;;\n  *)\n    case $ac_cv_c_inline in\n      no) ac_val=;;\n      *) ac_val=$ac_cv_c_inline;;\n    esac\n    cat >>confdefs.h <<_ACEOF\n#ifndef __cplusplus\n#define inline $ac_val\n#endif\n_ACEOF\n    ;;\nesac\n\n\n# Checks for library functions.\nfor ac_header in stdlib.h\ndo :\n  ac_fn_c_check_header_mongrel \"$LINENO\" \"stdlib.h\" \"ac_cv_header_stdlib_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_stdlib_h\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_STDLIB_H 1\n_ACEOF\n\nfi\n\ndone\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc\" >&5\n$as_echo_n \"checking for GNU libc compatible malloc... \" >&6; }\nif ${ac_cv_func_malloc_0_nonnull+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test \"$cross_compiling\" = yes; then :\n  ac_cv_func_malloc_0_nonnull=no\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#if defined STDC_HEADERS || defined HAVE_STDLIB_H\n# include <stdlib.h>\n#else\nchar *malloc ();\n#endif\n\nint\nmain ()\n{\nreturn ! malloc (0);\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n  ac_cv_func_malloc_0_nonnull=yes\nelse\n  ac_cv_func_malloc_0_nonnull=no\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull\" >&5\n$as_echo \"$ac_cv_func_malloc_0_nonnull\" >&6; }\nif test $ac_cv_func_malloc_0_nonnull = yes; then :\n\n$as_echo \"#define HAVE_MALLOC 1\" >>confdefs.h\n\nelse\n  $as_echo \"#define HAVE_MALLOC 0\" >>confdefs.h\n\n   case \" $LIBOBJS \" in\n  *\" malloc.$ac_objext \"* ) ;;\n  *) LIBOBJS=\"$LIBOBJS malloc.$ac_objext\"\n ;;\nesac\n\n\n$as_echo \"#define malloc rpl_malloc\" >>confdefs.h\n\nfi\n\n\nfor ac_header in stdlib.h\ndo :\n  ac_fn_c_check_header_mongrel \"$LINENO\" \"stdlib.h\" \"ac_cv_header_stdlib_h\" \"$ac_includes_default\"\nif test \"x$ac_cv_header_stdlib_h\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_STDLIB_H 1\n_ACEOF\n\nfi\n\ndone\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc\" >&5\n$as_echo_n \"checking for GNU libc compatible realloc... \" >&6; }\nif ${ac_cv_func_realloc_0_nonnull+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test \"$cross_compiling\" = yes; then :\n  ac_cv_func_realloc_0_nonnull=no\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#if defined STDC_HEADERS || defined HAVE_STDLIB_H\n# include <stdlib.h>\n#else\nchar *realloc ();\n#endif\n\nint\nmain ()\n{\nreturn ! realloc (0, 0);\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n  ac_cv_func_realloc_0_nonnull=yes\nelse\n  ac_cv_func_realloc_0_nonnull=no\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull\" >&5\n$as_echo \"$ac_cv_func_realloc_0_nonnull\" >&6; }\nif test $ac_cv_func_realloc_0_nonnull = yes; then :\n\n$as_echo \"#define HAVE_REALLOC 1\" >>confdefs.h\n\nelse\n  $as_echo \"#define HAVE_REALLOC 0\" >>confdefs.h\n\n   case \" $LIBOBJS \" in\n  *\" realloc.$ac_objext \"* ) ;;\n  *) LIBOBJS=\"$LIBOBJS realloc.$ac_objext\"\n ;;\nesac\n\n\n$as_echo \"#define realloc rpl_realloc\" >>confdefs.h\n\nfi\n\n\nfor ac_func in alarm endpwent memset memmove mkdir select socket strdup strndup uname\ndo :\n  as_ac_var=`$as_echo \"ac_cv_func_$ac_func\" | $as_tr_sh`\nac_fn_c_check_func \"$LINENO\" \"$ac_func\" \"$as_ac_var\"\nif eval test \\\"x\\$\"$as_ac_var\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_func\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\ndone\n\n\n\n\nac_config_files=\"$ac_config_files Makefile\"\n\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, we kill variables containing newlines.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n(\n  for ac_var in `(set) 2>&1 | sed -n 's/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n\n  (set) 2>&1 |\n    case $as_nl`(ac_space=' '; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes: double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\.\n      sed -n \\\n\t\"s/'/'\\\\\\\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;; #(\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n) |\n  sed '\n     /^ac_cv_env_/b end\n     t clear\n     :clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     :end' >>confcache\nif diff \"$cache_file\" confcache >/dev/null 2>&1; then :; else\n  if test -w \"$cache_file\"; then\n    if test \"x$cache_file\" != \"x/dev/null\"; then\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: updating cache $cache_file\" >&5\n$as_echo \"$as_me: updating cache $cache_file\" >&6;}\n      if test ! -f \"$cache_file\" || test -h \"$cache_file\"; then\n\tcat confcache >\"$cache_file\"\n      else\n        case $cache_file in #(\n        */* | ?:*)\n\t  mv -f confcache \"$cache_file\"$$ &&\n\t  mv -f \"$cache_file\"$$ \"$cache_file\" ;; #(\n        *)\n\t  mv -f confcache \"$cache_file\" ;;\n\tesac\n      fi\n    fi\n  else\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file\" >&5\n$as_echo \"$as_me: not updating unwritable cache $cache_file\" >&6;}\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\nDEFS=-DHAVE_CONFIG_H\n\nac_libobjs=\nac_ltlibobjs=\nU=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_script='s/\\$U\\././;s/\\.o$//;s/\\.obj$//'\n  ac_i=`$as_echo \"$ac_i\" | sed \"$ac_script\"`\n  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR\n  #    will be set to the directory where LIBOBJS objects are built.\n  as_fn_append ac_libobjs \" \\${LIBOBJDIR}$ac_i\\$U.$ac_objext\"\n  as_fn_append ac_ltlibobjs \" \\${LIBOBJDIR}$ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n\n: \"${CONFIG_STATUS=./config.status}\"\nac_write_fail=0\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS\" >&5\n$as_echo \"$as_me: creating $CONFIG_STATUS\" >&6;}\nas_write_fail=0\ncat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\n\nSHELL=\\${CONFIG_SHELL-$SHELL}\nexport SHELL\n_ASEOF\ncat >>$CONFIG_STATUS <<\\_ASEOF || as_write_fail=1\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\nexec 6>&1\n## ----------------------------------- ##\n## Main body of $CONFIG_STATUS script. ##\n## ----------------------------------- ##\n_ASEOF\ntest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# Save the log message, to keep $0 and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.\nac_log=\"\nThis file was extended by telegram-cli $as_me 1.0, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\non `(hostname || uname -n) 2>/dev/null | sed 1q`\n\"\n\n_ACEOF\n\ncase $ac_config_files in *\"\n\"*) set x $ac_config_files; shift; ac_config_files=$*;;\nesac\n\ncase $ac_config_headers in *\"\n\"*) set x $ac_config_headers; shift; ac_config_headers=$*;;\nesac\n\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n# Files that config.status was made for.\nconfig_files=\"$ac_config_files\"\nconfig_headers=\"$ac_config_headers\"\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nac_cs_usage=\"\\\n\\`$as_me' instantiates files and other configuration actions\nfrom templates according to the current configuration.  Unless the files\nand actions are specified as TAGs, all are instantiated by default.\n\nUsage: $0 [OPTION]... [TAG]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number and configuration settings, then exit\n      --config     print configuration, then exit\n  -q, --quiet, --silent\n                   do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n      --file=FILE[:TEMPLATE]\n                   instantiate the configuration file FILE\n      --header=FILE[:TEMPLATE]\n                   instantiate the configuration header FILE\n\nConfiguration files:\n$config_files\n\nConfiguration headers:\n$config_headers\n\nReport bugs to the package provider.\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_cs_config=\"`$as_echo \"$ac_configure_args\" | sed 's/^ //; s/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\"\nac_cs_version=\"\\\\\ntelegram-cli config.status 1.0\nconfigured by $0, generated by GNU Autoconf 2.69,\n  with options \\\\\"\\$ac_cs_config\\\\\"\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\n\nac_pwd='$ac_pwd'\nsrcdir='$srcdir'\ntest -n \"\\$AWK\" || AWK=awk\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# The default lists apply if the user does not specify any file.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=?*)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=`expr \"X$1\" : 'X[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  --*=)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=\n    ac_shift=:\n    ;;\n  *)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )\n    $as_echo \"$ac_cs_version\"; exit ;;\n  --config | --confi | --conf | --con | --co | --c )\n    $as_echo \"$ac_cs_config\"; exit ;;\n  --debug | --debu | --deb | --de | --d | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    case $ac_optarg in\n    *\\'*) ac_optarg=`$as_echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    '') as_fn_error $? \"missing file argument\" ;;\n    esac\n    as_fn_append CONFIG_FILES \" '$ac_optarg'\"\n    ac_need_defaults=false;;\n  --header | --heade | --head | --hea )\n    $ac_shift\n    case $ac_optarg in\n    *\\'*) ac_optarg=`$as_echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    as_fn_append CONFIG_HEADERS \" '$ac_optarg'\"\n    ac_need_defaults=false;;\n  --he | --h)\n    # Conflict between --help and --header\n    as_fn_error $? \"ambiguous option: \\`$1'\nTry \\`$0 --help' for more information.\";;\n  --help | --hel | -h )\n    $as_echo \"$ac_cs_usage\"; exit ;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) as_fn_error $? \"unrecognized option: \\`$1'\nTry \\`$0 --help' for more information.\" ;;\n\n  *) as_fn_append ac_config_targets \" $1\"\n     ac_need_defaults=false ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nif \\$ac_cs_recheck; then\n  set X $SHELL '$0' $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\n  shift\n  \\$as_echo \"running CONFIG_SHELL=$SHELL \\$*\" >&6\n  CONFIG_SHELL='$SHELL'\n  export CONFIG_SHELL\n  exec \"\\$@\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n  $as_echo \"$ac_log\"\n} >&5\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n\n# Handling of arguments.\nfor ac_config_target in $ac_config_targets\ndo\n  case $ac_config_target in\n    \"config.h\") CONFIG_HEADERS=\"$CONFIG_HEADERS config.h\" ;;\n    \"Makefile\") CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n\n  *) as_fn_error $? \"invalid argument: \\`$ac_config_target'\" \"$LINENO\" 5;;\n  esac\ndone\n\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\n  test \"${CONFIG_HEADERS+set}\" = set || CONFIG_HEADERS=$config_headers\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason against having it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Hook for its removal unless debugging.\n# Note that there is a small window in which the directory will not be cleaned:\n# after its creation but before its name has been assigned to `$tmp'.\n$debug ||\n{\n  tmp= ac_tmp=\n  trap 'exit_status=$?\n  : \"${ac_tmp:=$tmp}\"\n  { test ! -d \"$ac_tmp\" || rm -fr \"$ac_tmp\"; } && exit $exit_status\n' 0\n  trap 'as_fn_exit 1' 1 2 13 15\n}\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d \"./confXXXXXX\") 2>/dev/null` &&\n  test -d \"$tmp\"\n}  ||\n{\n  tmp=./conf$$-$RANDOM\n  (umask 077 && mkdir \"$tmp\")\n} || as_fn_error $? \"cannot create a temporary directory in .\" \"$LINENO\" 5\nac_tmp=$tmp\n\n# Set up the scripts for CONFIG_FILES section.\n# No need to generate them if there are no CONFIG_FILES.\n# This happens for instance with `./config.status config.h'.\nif test -n \"$CONFIG_FILES\"; then\n\n\nac_cr=`echo X | tr X '\\015'`\n# On cygwin, bash can eat \\r inside `` if the user requested igncr.\n# But we know of no other shell where ac_cr would be empty at this\n# point, so we can use a bashism as a fallback.\nif test \"x$ac_cr\" = x; then\n  eval ac_cr=\\$\\'\\\\r\\'\nfi\nac_cs_awk_cr=`$AWK 'BEGIN { print \"a\\rb\" }' </dev/null 2>/dev/null`\nif test \"$ac_cs_awk_cr\" = \"a${ac_cr}b\"; then\n  ac_cs_awk_cr='\\\\r'\nelse\n  ac_cs_awk_cr=$ac_cr\nfi\n\necho 'BEGIN {' >\"$ac_tmp/subs1.awk\" &&\n_ACEOF\n\n\n{\n  echo \"cat >conf$$subs.awk <<_ACEOF\" &&\n  echo \"$ac_subst_vars\" | sed 's/.*/&!$&$ac_delim/' &&\n  echo \"_ACEOF\"\n} >conf$$subs.sh ||\n  as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\nac_delim_num=`echo \"$ac_subst_vars\" | grep -c '^'`\nac_delim='%!_!# '\nfor ac_last_try in false false false false false :; do\n  . ./conf$$subs.sh ||\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n\n  ac_delim_n=`sed -n \"s/.*$ac_delim\\$/X/p\" conf$$subs.awk | grep -c X`\n  if test $ac_delim_n = $ac_delim_num; then\n    break\n  elif $ac_last_try; then\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n  else\n    ac_delim=\"$ac_delim!$ac_delim _$ac_delim!! \"\n  fi\ndone\nrm -f conf$$subs.sh\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\ncat >>\"\\$ac_tmp/subs1.awk\" <<\\\\_ACAWK &&\n_ACEOF\nsed -n '\nh\ns/^/S[\"/; s/!.*/\"]=/\np\ng\ns/^[^!]*!//\n:repl\nt repl\ns/'\"$ac_delim\"'$//\nt delim\n:nl\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\\\\n\"\\\\/\np\nn\nb repl\n:more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt nl\n:delim\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"/\np\nb\n:more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt delim\n' <conf$$subs.awk | sed '\n/^[^\"\"]/{\n  N\n  s/\\n//\n}\n' >>$CONFIG_STATUS || ac_write_fail=1\nrm -f conf$$subs.awk\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n_ACAWK\ncat >>\"\\$ac_tmp/subs1.awk\" <<_ACAWK &&\n  for (key in S) S_is_set[key] = 1\n  FS = \"\u0007\"\n\n}\n{\n  line = $ 0\n  nfields = split(line, field, \"@\")\n  substed = 0\n  len = length(field[1])\n  for (i = 2; i < nfields; i++) {\n    key = field[i]\n    keylen = length(key)\n    if (S_is_set[key]) {\n      value = S[key]\n      line = substr(line, 1, len) \"\" value \"\" substr(line, len + keylen + 3)\n      len += length(value) + length(field[++i])\n      substed = 1\n    } else\n      len += 1 + keylen\n  }\n\n  print line\n}\n\n_ACAWK\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nif sed \"s/$ac_cr//\" < /dev/null > /dev/null 2>&1; then\n  sed \"s/$ac_cr\\$//; s/$ac_cr/$ac_cs_awk_cr/g\"\nelse\n  cat\nfi < \"$ac_tmp/subs1.awk\" > \"$ac_tmp/subs.awk\" \\\n  || as_fn_error $? \"could not setup config files machinery\" \"$LINENO\" 5\n_ACEOF\n\n# VPATH may cause trouble with some makes, so we remove sole $(srcdir),\n# ${srcdir} and @srcdir@ entries from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[\t ]*VPATH[\t ]*=[\t ]*/{\nh\ns///\ns/^/:/\ns/[\t ]*$/:/\ns/:\\$(srcdir):/:/g\ns/:\\${srcdir}:/:/g\ns/:@srcdir@:/:/g\ns/^:*//\ns/:*$//\nx\ns/\\(=[\t ]*\\).*/\\1/\nG\ns/\\n//\ns/^[^=]*=[\t ]*$//\n}'\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nfi # test -n \"$CONFIG_FILES\"\n\n# Set up the scripts for CONFIG_HEADERS section.\n# No need to generate them if there are no CONFIG_HEADERS.\n# This happens for instance with `./config.status Makefile'.\nif test -n \"$CONFIG_HEADERS\"; then\ncat >\"$ac_tmp/defines.awk\" <<\\_ACAWK ||\nBEGIN {\n_ACEOF\n\n# Transform confdefs.h into an awk script `defines.awk', embedded as\n# here-document in config.status, that substitutes the proper values into\n# config.h.in to produce config.h.\n\n# Create a delimiter string that does not exist in confdefs.h, to ease\n# handling of long lines.\nac_delim='%!_!# '\nfor ac_last_try in false false :; do\n  ac_tt=`sed -n \"/$ac_delim/p\" confdefs.h`\n  if test -z \"$ac_tt\"; then\n    break\n  elif $ac_last_try; then\n    as_fn_error $? \"could not make $CONFIG_HEADERS\" \"$LINENO\" 5\n  else\n    ac_delim=\"$ac_delim!$ac_delim _$ac_delim!! \"\n  fi\ndone\n\n# For the awk script, D is an array of macro values keyed by name,\n# likewise P contains macro parameters if any.  Preserve backslash\n# newline sequences.\n\nac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*\nsed -n '\ns/.\\{148\\}/&'\"$ac_delim\"'/g\nt rset\n:rset\ns/^[\t ]*#[\t ]*define[\t ][\t ]*/ /\nt def\nd\n:def\ns/\\\\$//\nt bsnl\ns/[\"\\\\]/\\\\&/g\ns/^ \\('\"$ac_word_re\"'\\)\\(([^()]*)\\)[\t ]*\\(.*\\)/P[\"\\1\"]=\"\\2\"\\\nD[\"\\1\"]=\" \\3\"/p\ns/^ \\('\"$ac_word_re\"'\\)[\t ]*\\(.*\\)/D[\"\\1\"]=\" \\2\"/p\nd\n:bsnl\ns/[\"\\\\]/\\\\&/g\ns/^ \\('\"$ac_word_re\"'\\)\\(([^()]*)\\)[\t ]*\\(.*\\)/P[\"\\1\"]=\"\\2\"\\\nD[\"\\1\"]=\" \\3\\\\\\\\\\\\n\"\\\\/p\nt cont\ns/^ \\('\"$ac_word_re\"'\\)[\t ]*\\(.*\\)/D[\"\\1\"]=\" \\2\\\\\\\\\\\\n\"\\\\/p\nt cont\nd\n:cont\nn\ns/.\\{148\\}/&'\"$ac_delim\"'/g\nt clear\n:clear\ns/\\\\$//\nt bsnlc\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"/p\nd\n:bsnlc\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\\\\\\\\\\\\n\"\\\\/p\nb cont\n' <confdefs.h | sed '\ns/'\"$ac_delim\"'/\"\\\\\\\n\"/g' >>$CONFIG_STATUS || ac_write_fail=1\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n  for (key in D) D_is_set[key] = 1\n  FS = \"\u0007\"\n}\n/^[\\t ]*#[\\t ]*(define|undef)[\\t ]+$ac_word_re([\\t (]|\\$)/ {\n  line = \\$ 0\n  split(line, arg, \" \")\n  if (arg[1] == \"#\") {\n    defundef = arg[2]\n    mac1 = arg[3]\n  } else {\n    defundef = substr(arg[1], 2)\n    mac1 = arg[2]\n  }\n  split(mac1, mac2, \"(\") #)\n  macro = mac2[1]\n  prefix = substr(line, 1, index(line, defundef) - 1)\n  if (D_is_set[macro]) {\n    # Preserve the white space surrounding the \"#\".\n    print prefix \"define\", macro P[macro] D[macro]\n    next\n  } else {\n    # Replace #undef with comments.  This is necessary, for example,\n    # in the case of _POSIX_SOURCE, which is predefined and required\n    # on some systems where configure will not decide to define it.\n    if (defundef == \"undef\") {\n      print \"/*\", prefix defundef, macro, \"*/\"\n      next\n    }\n  }\n}\n{ print }\n_ACAWK\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n  as_fn_error $? \"could not setup config headers machinery\" \"$LINENO\" 5\nfi # test -n \"$CONFIG_HEADERS\"\n\n\neval set X \"  :F $CONFIG_FILES  :H $CONFIG_HEADERS    \"\nshift\nfor ac_tag\ndo\n  case $ac_tag in\n  :[FHLC]) ac_mode=$ac_tag; continue;;\n  esac\n  case $ac_mode$ac_tag in\n  :[FHL]*:*);;\n  :L* | :C*:*) as_fn_error $? \"invalid tag \\`$ac_tag'\" \"$LINENO\" 5;;\n  :[FH]-) ac_tag=-:-;;\n  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;\n  esac\n  ac_save_IFS=$IFS\n  IFS=:\n  set x $ac_tag\n  IFS=$ac_save_IFS\n  shift\n  ac_file=$1\n  shift\n\n  case $ac_mode in\n  :L) ac_source=$1;;\n  :[FH])\n    ac_file_inputs=\n    for ac_f\n    do\n      case $ac_f in\n      -) ac_f=\"$ac_tmp/stdin\";;\n      *) # Look for the file first in the build tree, then in the source tree\n\t # (if the path is not absolute).  The absolute path cannot be DOS-style,\n\t # because $ac_f cannot contain `:'.\n\t test -f \"$ac_f\" ||\n\t   case $ac_f in\n\t   [\\\\/$]*) false;;\n\t   *) test -f \"$srcdir/$ac_f\" && ac_f=\"$srcdir/$ac_f\";;\n\t   esac ||\n\t   as_fn_error 1 \"cannot find input file: \\`$ac_f'\" \"$LINENO\" 5;;\n      esac\n      case $ac_f in *\\'*) ac_f=`$as_echo \"$ac_f\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; esac\n      as_fn_append ac_file_inputs \" '$ac_f'\"\n    done\n\n    # Let's still pretend it is `configure' which instantiates (i.e., don't\n    # use $as_me), people would be surprised to read:\n    #    /* config.h.  Generated by config.status.  */\n    configure_input='Generated from '`\n\t  $as_echo \"$*\" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'\n\t`' by configure.'\n    if test x\"$ac_file\" != x-; then\n      configure_input=\"$ac_file.  $configure_input\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: creating $ac_file\" >&5\n$as_echo \"$as_me: creating $ac_file\" >&6;}\n    fi\n    # Neutralize special characters interpreted by sed in replacement strings.\n    case $configure_input in #(\n    *\\&* | *\\|* | *\\\\* )\n       ac_sed_conf_input=`$as_echo \"$configure_input\" |\n       sed 's/[\\\\\\\\&|]/\\\\\\\\&/g'`;; #(\n    *) ac_sed_conf_input=$configure_input;;\n    esac\n\n    case $ac_tag in\n    *:-:* | *:-) cat >\"$ac_tmp/stdin\" \\\n      || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5 ;;\n    esac\n    ;;\n  esac\n\n  ac_dir=`$as_dirname -- \"$ac_file\" ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  as_dir=\"$ac_dir\"; as_fn_mkdir_p\n  ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n\n  case $ac_mode in\n  :F)\n  #\n  # CONFIG_FILE\n  #\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# If the template does not know about datarootdir, expand it.\n# FIXME: This hack should be removed a few years after 2.60.\nac_datarootdir_hack=; ac_datarootdir_seen=\nac_sed_dataroot='\n/datarootdir/ {\n  p\n  q\n}\n/@datadir@/p\n/@docdir@/p\n/@infodir@/p\n/@localedir@/p\n/@mandir@/p'\ncase `eval \"sed -n \\\"\\$ac_sed_dataroot\\\" $ac_file_inputs\"` in\n*datarootdir*) ac_datarootdir_seen=yes;;\n*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&5\n$as_echo \"$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&2;}\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n  ac_datarootdir_hack='\n  s&@datadir@&$datadir&g\n  s&@docdir@&$docdir&g\n  s&@infodir@&$infodir&g\n  s&@localedir@&$localedir&g\n  s&@mandir@&$mandir&g\n  s&\\\\\\${datarootdir}&$datarootdir&g' ;;\nesac\n_ACEOF\n\n# Neutralize VPATH when `$srcdir' = `.'.\n# Shell code in configure.ac might set extrasub.\n# FIXME: do we really want to maintain this feature?\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_sed_extra=\"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns|@configure_input@|$ac_sed_conf_input|;t t\ns&@top_builddir@&$ac_top_builddir_sub&;t t\ns&@top_build_prefix@&$ac_top_build_prefix&;t t\ns&@srcdir@&$ac_srcdir&;t t\ns&@abs_srcdir@&$ac_abs_srcdir&;t t\ns&@top_srcdir@&$ac_top_srcdir&;t t\ns&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t\ns&@builddir@&$ac_builddir&;t t\ns&@abs_builddir@&$ac_abs_builddir&;t t\ns&@abs_top_builddir@&$ac_abs_top_builddir&;t t\n$ac_datarootdir_hack\n\"\neval sed \\\"\\$ac_sed_extra\\\" \"$ac_file_inputs\" | $AWK -f \"$ac_tmp/subs.awk\" \\\n  >$ac_tmp/out || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n\ntest -z \"$ac_datarootdir_hack$ac_datarootdir_seen\" &&\n  { ac_out=`sed -n '/\\${datarootdir}/p' \"$ac_tmp/out\"`; test -n \"$ac_out\"; } &&\n  { ac_out=`sed -n '/^[\t ]*datarootdir[\t ]*:*=/p' \\\n      \"$ac_tmp/out\"`; test -z \"$ac_out\"; } &&\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&5\n$as_echo \"$as_me: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&2;}\n\n  rm -f \"$ac_tmp/stdin\"\n  case $ac_file in\n  -) cat \"$ac_tmp/out\" && rm -f \"$ac_tmp/out\";;\n  *) rm -f \"$ac_file\" && mv \"$ac_tmp/out\" \"$ac_file\";;\n  esac \\\n  || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n ;;\n  :H)\n  #\n  # CONFIG_HEADER\n  #\n  if test x\"$ac_file\" != x-; then\n    {\n      $as_echo \"/* $configure_input  */\" \\\n      && eval '$AWK -f \"$ac_tmp/defines.awk\"' \"$ac_file_inputs\"\n    } >\"$ac_tmp/config.h\" \\\n      || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n    if diff \"$ac_file\" \"$ac_tmp/config.h\" >/dev/null 2>&1; then\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: $ac_file is unchanged\" >&5\n$as_echo \"$as_me: $ac_file is unchanged\" >&6;}\n    else\n      rm -f \"$ac_file\"\n      mv \"$ac_tmp/config.h\" \"$ac_file\" \\\n\t|| as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n    fi\n  else\n    $as_echo \"/* $configure_input  */\" \\\n      && eval '$AWK -f \"$ac_tmp/defines.awk\"' \"$ac_file_inputs\" \\\n      || as_fn_error $? \"could not create -\" \"$LINENO\" 5\n  fi\n ;;\n\n\n  esac\n\ndone # for ac_tag\n\n\nas_fn_exit 0\n_ACEOF\nac_clean_files=$ac_clean_files_save\n\ntest $ac_write_fail = 0 ||\n  as_fn_error $? \"write failure creating $CONFIG_STATUS\" \"$LINENO\" 5\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || as_fn_exit 1\nfi\nif test -n \"$ac_unrecognized_opts\" && test \"$enable_option_checking\" != no; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts\" >&5\n$as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2;}\nfi\n\n\n"
  },
  {
    "path": "configure.ac",
    "content": "AC_PREREQ([2.68])\nAC_INIT([telegram-cli], [1.0])\nAC_CONFIG_SRCDIR([config.h.in])\nAC_CONFIG_HEADERS([config.h])\n\nm4_include([m4_ax_check_openssl.m4])\nm4_include([m4_ax_check_zlib.m4])\n\n# Checks for programs.\nAC_PROG_CC\n\n# BSD locations for headers and libraries from packages, Linux locations for self-compiled stuff.\nCPPFLAGS=\"$CPPFLAGS -I/usr/local/include\"\nLDFLAGS=\"$LDFLAGS -L/usr/local/lib\"\n\n# Checks for libraries.\nAC_SEARCH_LIBS([clock_gettime], [rt])\n\nEVENT_VER=\"\"\nEXTRA_OBJECTS=\"\"\n\n#     OPENSSL_INCLUDES to the include directives required\n#     OPENSSL_LIBS to the -l directives required\n#     OPENSSL_LDFLAGS to the -L or -R flags required\n\nAC_ARG_ENABLE(openssl,[  --disable-openssl\t  disables OpenSSL, and don't link against it\n\t\t\t  (this can't read *.pub files, though.)],\n  [ \n  if test \"x$enableval\" = \"xno\" ; then    \n  \tAC_DEFINE([TGL_AVOID_OPENSSL],[1],[avoid OpenSSL entirely, use libgcrypt instead (this can't read *.pub files, though.)])\n    AC_CHECK_LIB([gcrypt], [gcry_mpi_snatch], [], [AC_MSG_ERROR([\"Need libgcrypt >= 1.60\"])])\n  else\n    # Don't be annoying, so don't inform the user about --disable-openssl\n    AX_CHECK_OPENSSL(,[AC_MSG_ERROR([No openssl found.])])\n  fi \n  ],[\n  AX_CHECK_OPENSSL(,[AC_MSG_ERROR([No openssl found. With --disable-openssl, libtgl will use libgcrypt instead.])])\n  ])\n\nAX_CHECK_ZLIB(, [AC_MSG_ERROR([No zlib found])])\n\nAC_ARG_ENABLE(extf,[  --enable-extf\t\t  enables extended queries system],\n  [ \n  if test \"x$enableval\" = \"xno\" ; then    \n    AC_DEFINE([DISABLE_EXTF],[1],[disable extf queries])\n  fi \n  ],[\n  ])\n\nAC_ARG_ENABLE(libevent,[  --enable-libevent\t  include libevent-based net and timers],\n  [ \n  if test \"x$enableval\" = \"xyes\" ; then\n    AC_CHECK_LIB([event], [event_base_new], [], [AC_MSG_ERROR([no libevent found])])\n    AC_CHECK_HEADER(event2/event.h, [AC_DEFINE([EVENT_V2], [1], [Use libevent v2])], [\n      AC_CHECK_HEADER(event.h, [AC_DEFINE([EVENT_V1], [1], [Use libevent v1])], [AC_MSG_ERROR([no libevent found])])\n    ])\n    EXTRA_OBJECTS=\"${EXTRA_OBJECTS} objs/tgl-net.o objs/tgl-timers.o\"\n  fi\n  ],[\n  ])\n\nAC_ARG_ENABLE(valgrind,[  --enable-valgrind\t  fixes for correct valgrind work],\n  [ \n  if test \"x$enableval\" = \"xyes\" ; then\n    AC_CHECK_HEADER(valgrind/memcheck.h, [AC_DEFINE([VALGRIND_FIXES], [1], [fixed for correct valgrind work])], [\n    ])\n  fi\n  ],[\n  ])\n    \n# Checks for header files.\nAC_CHECK_HEADERS([fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])\n\n# FreeBSD needs -lexecinfo\nAC_CHECK_HEADERS([execinfo.h], [tgl_found_execinfo_header=yes; break;])\nAS_IF([test \"x$tgl_found_execinfo_header\" = \"xyes\"],\n\t[AC_SEARCH_LIBS([backtrace_symbols_fd], [execinfo])])\n\n\n# Checks for typedefs, structures, and compiler characteristics.\nAC_TYPE_SIZE_T\nAC_TYPE_UID_T\nAC_C_INLINE\n\n# Checks for library functions.\nAC_FUNC_MALLOC\nAC_FUNC_REALLOC\nAC_CHECK_FUNCS([alarm endpwent memset memmove mkdir select socket strdup strndup uname])\n\nAC_SUBST(EXTRA_LIBS)\nAC_SUBST(EXTRA_OBJECTS)\nAC_CONFIG_FILES([Makefile])\nAC_OUTPUT\n\n"
  },
  {
    "path": "crypto/aes.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_AES_H__\n#define __TGL_CRYPTO_AES_H__\n\n#include <stddef.h> /* size_t */\n\n#include \"../config.h\"\n\ntypedef struct TGLC_aes_key {\n  char _dummy[\n#ifdef TGL_AVOID_OPENSSL\n              32\n#else\n              244\n#endif\n              ];\n} TGLC_aes_key;\n\nvoid TGLC_aes_set_encrypt_key (const unsigned char *userKey, const int bits, TGLC_aes_key *key);\nvoid TGLC_aes_set_decrypt_key (const unsigned char *userKey, const int bits, TGLC_aes_key *key);\nvoid TGLC_aes_ige_encrypt (const unsigned char *in, unsigned char *out, size_t length, const TGLC_aes_key *key, unsigned char *ivec, const int enc);\n\n#endif\n"
  },
  {
    "path": "crypto/aes_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n/* Marginally speed up compilation */\n#define GCRYPT_NO_MPI_MACROS\n/* Fail-fast when something becomes deprecated. */\n#define GCRYPT_NO_DEPRECATED\n\n#include <assert.h>\n#include <gcrypt.h>\n\n#include \"aes.h\"\n#include \"meta.h\"\n#include \"rand.h\"\n\n#define AES_BLOCK_BITS 128\n#define AES_BLOCK_BYTES (AES_BLOCK_BITS/8)\n#define AES_KEY_BITS 256\n#define AES_KEY_BYTES (AES_KEY_BITS/8)\n\ntypedef char check_struct_sizes[(sizeof (TGLC_aes_key) == AES_KEY_BYTES) - 1];\n\nvoid TGLC_aes_set_encrypt_key (const unsigned char *userKey, const int bits, TGLC_aes_key *key) {\n  assert (bits == AES_KEY_BITS);\n  memcpy (key->_dummy, userKey, AES_KEY_BYTES);\n}\n\nvoid TGLC_aes_set_decrypt_key (const unsigned char *userKey, const int bits, TGLC_aes_key *key) {\n  TGLC_aes_set_encrypt_key (userKey, bits, key);\n}\n\n// TODO: Try to use gcrypt's internal buf_xor?\nstatic void do_xor_block (const unsigned char *in, const unsigned char *with, unsigned char *out) {\n  /* TODO: Referencing them as \"size_t\" (or whatever biggest numerical type available) is probably faster, but also more error-prone. */\n  int i;\n  for (i = 0; i < 16; ++i) {\n    *out++ = *in++ ^ *with++;\n  }\n}\n\nstatic gcry_error_t do_ige_encrypt (const unsigned char *in, unsigned char *out,\n    unsigned long n_blocks, gcry_cipher_hd_t cipher, unsigned char *ivec) {\n  /* The docs say, at the end of section 2:\n   * \"OpenSSL uses the convention that the first block of the IV is x_0\n   * and the second block is y_0.\"\n   * Well, no. This is a subtle error: FIRST comes the previous ENcrypted block,\n   * THEN the DEcrypted block.\n   * Also, keep a copy of the old cleartext, in case in == out. */\n  unsigned char buf[2 * 16];\n  unsigned char *prev_x = buf;\n  unsigned char *cur_x = buf + 16;\n  memcpy (prev_x, ivec + 16, 16);\n  const unsigned char *prev_y = ivec;\n\n  /* gcrypt doesn't allow overlapping buffers. Kudos to \"reubensammut\" for\n   * noticing this. Note that this also works if in == out. */\n  unsigned char tmp[16];\n  unsigned long i;\n  for (i = 0; i < n_blocks; ++i) {\n    memcpy (cur_x, in, 16);\n    /* Might overwrite 'in'. */\n    do_xor_block (in, prev_y, out);\n    gcry_error_t gcry_error = gcry_cipher_encrypt (cipher, tmp, 16, out, 16);\n    if (gcry_error) {\n      return gcry_error;\n    }\n    do_xor_block (tmp, prev_x, out);\n    prev_y = out; // encrypted is in 'out'\n    in += 16;\n    out += 16;\n    // swap (tmp_x, cur_x);\n    unsigned char *tmp_x = cur_x;\n    cur_x = prev_x;\n    prev_x = tmp_x;\n  }\n  if (n_blocks > 0) {\n    /* OpenSSL updates the IV, so we do that, too.\n     * One could avoid memcpy here, as it's only 16 bytes. */\n    memcpy (ivec + 16, prev_x, 16);\n    memcpy (ivec, prev_y, 16);\n  }\n  return 0;\n}\n\nstatic gcry_error_t do_ige_decrypt (const unsigned char *in, unsigned char *out,\n    unsigned long n_blocks, gcry_cipher_hd_t cipher, unsigned char *ivec) {\n  /* Also, keep a copy of the old ciphertext, in case in == out. */\n  unsigned char buf[2 * 16];\n  unsigned char *prev_y = buf;\n  unsigned char *cur_y = buf + 16;\n  memcpy (prev_y, ivec, 16);\n  const unsigned char *prev_x = ivec + 16;\n\n  /* gcrypt doesn't allow overlapping buffers. Kudos to \"reubensammut\" for\n   * noticing this. Note that this also works if in == out. */\n  unsigned char tmp[16];\n  unsigned long i;\n  for (i = 0; i < n_blocks; ++i) {\n    memcpy (cur_y, in, 16);\n    /* Might overwrite 'in'. */\n    do_xor_block (in, prev_x, out);\n    gcry_error_t gcry_error = gcry_cipher_decrypt (cipher, tmp, 16, out, 16);\n    if (gcry_error) {\n      return gcry_error;\n    }\n    do_xor_block (tmp, prev_y, out);\n    prev_x = out; // decrypted is in 'out'\n    in += 16;\n    out += 16;\n    // swap (tmp_y, cur_y);\n    unsigned char *tmp_y = cur_y;\n    cur_y = prev_y;\n    prev_y = tmp_y;\n  }\n  /* Do not change ivec */\n  return 0;\n}\n\n/* Needs to be given an IV of length 2*AES_BLOCK_BYTES. */\nvoid TGLC_aes_ige_encrypt (const unsigned char *in, unsigned char *out, size_t length, const TGLC_aes_key *key, unsigned char *ivec, const int enc) {\n  assert (!(length % AES_BLOCK_BYTES));\n\n  /* Set it up. */\n  gcry_cipher_hd_t cipher;\n  gcry_error_t gcry_error = gcry_cipher_open (&cipher, GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_ECB, 0);\n  assert (!gcry_error);\n  gcry_cipher_setkey (cipher, key->_dummy, AES_KEY_BYTES);\n\n  if (enc) {\n    gcry_error = do_ige_encrypt(in, out, length / AES_BLOCK_BYTES, cipher, ivec);\n  } else {\n    gcry_error = do_ige_decrypt(in, out, length / AES_BLOCK_BYTES, cipher, ivec);\n  }\n  assert (!gcry_error);\n\n  gcry_cipher_close(cipher);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/aes_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n#include <openssl/aes.h>\n\n#include \"aes.h\"\n#include \"meta.h\"\n\ntypedef char check_struct_sizes[(sizeof (AES_KEY) == sizeof (TGLC_aes_key)) - 1];\n\nTGLC_WRAPPER_ASSOC(aes_key,AES_KEY)\n\nvoid TGLC_aes_set_encrypt_key (const unsigned char *userKey, const int bits, TGLC_aes_key *key) {\n  int success = AES_set_encrypt_key(userKey, bits, unwrap_aes_key (key));\n  assert (0 == success);\n}\n\nvoid TGLC_aes_set_decrypt_key (const unsigned char *userKey, const int bits, TGLC_aes_key *key) {\n  int success = AES_set_decrypt_key(userKey, bits, unwrap_aes_key (key));\n  assert (0 == success);\n}\n\nvoid TGLC_aes_ige_encrypt (const unsigned char *in, unsigned char *out, size_t length, const TGLC_aes_key *key, unsigned char *ivec, const int enc) {\n  AES_ige_encrypt (in, out, length, unwrap_aes_key (key), ivec, enc);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/bn.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_BN_H__\n#define __TGL_CRYPTO_BN_H__\n\ntypedef struct TGLC_bn_ctx TGLC_bn_ctx;\ntypedef struct TGLC_bn TGLC_bn;\n\nTGLC_bn_ctx *TGLC_bn_ctx_new (void);\nvoid TGLC_bn_ctx_free (TGLC_bn_ctx* ctx);\n\nTGLC_bn *TGLC_bn_new (void);\nvoid TGLC_bn_free (TGLC_bn *a);\nvoid TGLC_bn_clear_free (TGLC_bn *a);\nint TGLC_bn_cmp (const TGLC_bn *a, const TGLC_bn *b);\nint TGLC_bn_is_prime (const TGLC_bn *a, int checks, void (*callback) (int, int, void *), TGLC_bn_ctx *ctx, void *cb_arg);\nint TGLC_bn_bn2bin (const TGLC_bn *a, unsigned char *to);\nTGLC_bn * TGLC_bn_bin2bn(const unsigned char *s, int len, TGLC_bn *ret);\nint TGLC_bn_set_word (TGLC_bn *a, unsigned long w);\nunsigned long TGLC_bn_get_word (const TGLC_bn *a);\nint TGLC_bn_num_bits (const TGLC_bn *a);\nvoid TGLC_bn_sub (TGLC_bn *r, const TGLC_bn *a, const TGLC_bn *b);\nint TGLC_bn_div (TGLC_bn *dv, TGLC_bn *rem, const TGLC_bn *a, const TGLC_bn *d, TGLC_bn_ctx *ctx);\nint TGLC_bn_mod_exp (TGLC_bn *r, const TGLC_bn *a, const TGLC_bn *p, const TGLC_bn *m, TGLC_bn_ctx *ctx);\n\n#define TGLC_bn_num_bytes(a) ((TGLC_bn_num_bits(a)+7)/8)\n#define TGLC_bn_mod(rem,m,d,ctx) TGLC_bn_div(NULL,(rem),(m),(d),(ctx))\n\n#endif\n"
  },
  {
    "path": "crypto/bn_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n/* Fail-fast when something becomes deprecated. */\n#define GCRYPT_NO_DEPRECATED\n\n#include <assert.h>\n#include <gcrypt.h>\n\n#include \"bn.h\"\n#include \"meta.h\"\n\n// There is no \"_ctx\" equivalent in gcrypt.\nTGLC_WRAPPER_ASSOC(bn_ctx,int)\nTGLC_WRAPPER_ASSOC(bn,struct gcry_mpi)\n\nTGLC_bn_ctx *TGLC_bn_ctx_new (void) {\n  /* Must not be the null pointer, but must never be dereferenced. Assume that \"1\" is an invalid address. */\n  return ((void *)1);\n}\n\nvoid TGLC_bn_ctx_free (TGLC_bn_ctx* ctx) {\n  (void) ctx;\n}\n\nTGLC_bn *TGLC_bn_new (void) {\n  // TODO: Determine how many bits should be pre-allocated.\n  TGLC_bn *ret = wrap_bn (gcry_mpi_new (2048));\n  assert (ret);\n  return ret;\n}\n\nvoid TGLC_bn_free (TGLC_bn *a) {\n  gcry_mpi_release (unwrap_bn (a));\n}\n\nvoid TGLC_bn_clear_free (TGLC_bn *a) {\n  /* This only protects against accidental use-after-free. I don't see the point of clearing, since we're not operating in protected memory AND the most crucial fields are never cleared anyway. */\n  gcry_mpi_set_ui (unwrap_bn (a), 0);\n  gcry_mpi_release (unwrap_bn (a));\n}\n\nint TGLC_bn_cmp (const TGLC_bn *a, const TGLC_bn *b) {\n  return gcry_mpi_cmp (unwrap_bn (a), unwrap_bn (b));\n}\n\nint TGLC_bn_is_prime (const TGLC_bn *a, int checks, void (*callback) (int, int, void *), TGLC_bn_ctx *ctx, void *cb_arg) {\n  assert (0 == checks);\n  assert (NULL == callback);\n  (void) ctx;\n  assert (NULL == cb_arg);\n  /* Second argument is ignored.\n   * No really, here's what libgcrypt's source does:\n   * (void)flags; */\n  gcry_error_t err = gcry_prime_check (unwrap_bn (a), 0);\n  /* This is nasty. In essence, gcry returns a bool whether it is NOT a prime. */\n  return !err;\n}\n\nint TGLC_bn_bn2bin (const TGLC_bn *a, unsigned char *to) {\n  const unsigned long num_bytes = TGLC_bn_num_bytes (a);\n  gcry_error_t gcry_error = gcry_mpi_print (GCRYMPI_FMT_USG, to, num_bytes, NULL, unwrap_bn (a));\n  assert (!gcry_error);\n  return num_bytes;\n}\n\nTGLC_bn *TGLC_bn_bin2bn(const unsigned char *s, int len, TGLC_bn *ret) {\n  gcry_mpi_t ret_ptr = NULL;\n  gcry_error_t gcry_error = gcry_mpi_scan (&ret_ptr, GCRYMPI_FMT_USG, s, len, NULL);\n  assert (!gcry_error);\n  assert (ret_ptr);\n\n  if (!ret) {\n    return wrap_bn (ret_ptr);\n  }\n\n  gcry_mpi_snatch (unwrap_bn (ret), ret_ptr);\n  return ret;\n}\n\nint TGLC_bn_set_word (TGLC_bn *a, unsigned long w) {\n  assert (a);\n  gcry_mpi_set_ui (unwrap_bn (a), w);\n  return 1;\n}\n\nunsigned long TGLC_bn_get_word (const TGLC_bn *a) {\n  const unsigned long num_bytes = TGLC_bn_num_bytes (a);\n  assert (sizeof (unsigned long) >= num_bytes);\n  unsigned char tmp[sizeof (unsigned long)];\n  memset (tmp, 0, sizeof (unsigned long));\n  TGLC_bn_bn2bin (a, tmp + sizeof (unsigned long) - num_bytes);\n\n  /* Inefficient, but runs a total of three times per connection. */\n  /* TODO: Optimize? */\n  unsigned long ret = 0;\n  unsigned int i;\n  for (i = 0; i < sizeof (unsigned long); ++i) {\n      ret <<= 8;\n      ret |= tmp[i];\n  }\n  return ret;\n}\n\nint TGLC_bn_num_bits (const TGLC_bn *a) {\n  return gcry_mpi_get_nbits (unwrap_bn (a));\n}\n\nvoid TGLC_bn_sub (TGLC_bn *r, const TGLC_bn *a, const TGLC_bn *b) {\n  gcry_mpi_sub (unwrap_bn (r), unwrap_bn (a), unwrap_bn (b));\n}\n\nint TGLC_bn_div (TGLC_bn *dv, TGLC_bn *rem, const TGLC_bn *a, const TGLC_bn *d, TGLC_bn_ctx *ctx) {\n  (void) ctx;\n  gcry_mpi_div (unwrap_bn (dv), unwrap_bn (rem), unwrap_bn (a), unwrap_bn (d), 0);\n  return 1;\n}\n\nint TGLC_bn_mod_exp (TGLC_bn *r, const TGLC_bn *a, const TGLC_bn *p, const TGLC_bn *m, TGLC_bn_ctx *ctx) {\n  (void) ctx;\n  gcry_mpi_powm (unwrap_bn (r), unwrap_bn (a), unwrap_bn (p), unwrap_bn (m));\n  return 1;\n}\n\n#endif\n"
  },
  {
    "path": "crypto/bn_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n#include <assert.h>\n\n#include <openssl/bn.h>\n\n#include \"bn.h\"\n#include \"meta.h\"\n\nTGLC_WRAPPER_ASSOC(bn_ctx,BN_CTX)\nTGLC_WRAPPER_ASSOC(bn,BIGNUM)\n\nTGLC_bn_ctx *TGLC_bn_ctx_new (void) {\n  return wrap_bn_ctx (BN_CTX_new ());\n}\n\nvoid TGLC_bn_ctx_free (TGLC_bn_ctx* ctx) {\n  BN_CTX_free (unwrap_bn_ctx (ctx));\n}\n\nTGLC_bn *TGLC_bn_new (void) {\n  return wrap_bn (BN_new ());\n}\n\nvoid TGLC_bn_free (TGLC_bn *a) {\n  BN_free (unwrap_bn (a));\n}\n\nvoid TGLC_bn_clear_free (TGLC_bn *a) {\n  BN_clear_free (unwrap_bn (a));\n}\n\nint TGLC_bn_cmp (const TGLC_bn *a, const TGLC_bn *b) {\n  return BN_cmp (unwrap_bn (a), unwrap_bn (b));\n}\n\nint TGLC_bn_is_prime (const TGLC_bn *a, int checks, void (*callback) (int, int, void *), TGLC_bn_ctx *ctx, void *cb_arg) {\n  return BN_is_prime (unwrap_bn (a), checks, callback, unwrap_bn_ctx (ctx), cb_arg);\n}\n\nint TGLC_bn_bn2bin (const TGLC_bn *a, unsigned char *to) {\n  return BN_bn2bin (unwrap_bn (a), to);\n}\n\nTGLC_bn * TGLC_bn_bin2bn(const unsigned char *s, int len, TGLC_bn *ret) {\n  return wrap_bn (BN_bin2bn (s, len, unwrap_bn (ret)));\n}\n\nint TGLC_bn_set_word (TGLC_bn *a, unsigned long w) {\n  return BN_set_word (unwrap_bn (a), w);\n}\n\nunsigned long TGLC_bn_get_word (const TGLC_bn *a) {\n  return BN_get_word (unwrap_bn (a));\n}\n\nint TGLC_bn_num_bits (const TGLC_bn *a) {\n  return BN_num_bits (unwrap_bn (a));\n}\n\nvoid TGLC_bn_sub (TGLC_bn *r, const TGLC_bn *a, const TGLC_bn *b) {\n  int res = BN_sub (unwrap_bn (r), unwrap_bn (a), unwrap_bn (b));\n  assert (res);\n}\n\nint TGLC_bn_div (TGLC_bn *dv, TGLC_bn *rem, const TGLC_bn *a, const TGLC_bn *d, TGLC_bn_ctx *ctx) {\n  return BN_div (unwrap_bn (dv), unwrap_bn (rem), unwrap_bn (a), unwrap_bn (d), unwrap_bn_ctx (ctx));\n}\n\nint TGLC_bn_mod_exp (TGLC_bn *r, const TGLC_bn *a, const TGLC_bn *p, const TGLC_bn *m, TGLC_bn_ctx *ctx) {\n  return BN_mod_exp (unwrap_bn (r), unwrap_bn (a), unwrap_bn (p), unwrap_bn (m), unwrap_bn_ctx (ctx));\n}\n\n#endif\n"
  },
  {
    "path": "crypto/err.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_ERR_H__\n#define __TGL_CRYPTO_ERR_H__\n\n#include <stdio.h>\n\nvoid TGLC_err_print_errors_fp (FILE *fp);\n\n#endif\n"
  },
  {
    "path": "crypto/err_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n#include <gcrypt.h>\n\n#include \"err.h\"\n\nvoid TGLC_err_print_errors_fp (FILE *fp) {\n  // Can't print anything meaningful, so don't.\n  (void) fp;\n}\n\n#endif\n"
  },
  {
    "path": "crypto/err_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n#include <openssl/err.h>\n\n#include \"err.h\"\n\nvoid TGLC_err_print_errors_fp (FILE *fp) {\n  ERR_print_errors_fp (fp);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/md5.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_MD5_H__\n#define __TGL_CRYPTO_MD5_H__\n\n#include <stddef.h> /* size_t */\n\nvoid TGLC_md5 (const unsigned char *d, size_t n, unsigned char *md);\n\n#endif\n"
  },
  {
    "path": "crypto/md5_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n/* Marginally speed up compilation */\n#define GCRYPT_NO_MPI_MACROS\n/* Fail-fast when something becomes deprecated. */\n#define GCRYPT_NO_DEPRECATED\n\n#include <gcrypt.h>\n\n#include \"md5.h\"\n\nvoid TGLC_md5 (const unsigned char *d, size_t n, unsigned char *md) {\n  gcry_md_hash_buffer (GCRY_MD_MD5, md, d, n);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/md5_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n#include <openssl/md5.h>\n\n#include \"md5.h\"\n\nvoid TGLC_md5(const unsigned char *d, size_t n, unsigned char *md) {\n  MD5(d, n, md);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/meta.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef CRYPTO_META_H_\n#define CRYPTO_META_H_\n\n#include <assert.h>\n\n/* All this wrapping/unwrapping solves a fundamental problem:\n * - The libtgl implementation wants access to the TGLC_* types.\n * - The libtgl implementation should not see any other definitions from any\n *   external crypto library (to make sure no symbol slips \"through\" during the\n *   OpenSSL-to-gcrypt transition).\n * - Most TGLC_* types (3 out of 4 types) are exclusively used as pointers\n *   throughout the libtgl source, in a way to allow for incomplete types.\n * - The CORE type (e.g. BIGNUM from <openssl/bn.h>) may be incomplete,\n *   even for tglc.\n * This means the standard approaches don't work:\n * - TGLC_NAME can't be a typedef to CORE, since CORE shouldn't even be visible\n *   from libtgl.\n * - TGLC_NAME can't be a pointer to CORE, same reason. Also, it would require\n *   a significant amount of rewriting (error-prone work).\n * - TGLC_NAME can't be a void pointer. Retain type checking!\n * - So TGLC_NAME *must* be an incomplete custom struct.\n * However, this ensues the following ugliness.\n *\n * The standard doesn't explicitly allow it, but there's a pretty good argument\n * that casting ptr-to-some-struct to ptr-to-other-struct is *probably* okay for\n * most compilers: https://stackoverflow.com/a/8702750/3070326\n */\n#define TGLC_WRAPPER_ASSOC(NAME,CORE)                                          \\\n  static TGLC_ ## NAME *wrap_ ## NAME (const CORE *p)                          \\\n                              __attribute__ ((unused));                        \\\n  static CORE *unwrap_ ## NAME (const TGLC_ ## NAME *p)                        \\\n                              __attribute__ ((unused));                        \\\n  static CORE *unwrap_ ## NAME (const TGLC_ ## NAME *p) {                      \\\n    return (CORE *)p;                                                          \\\n  }                                                                            \\\n  static TGLC_ ## NAME *wrap_ ## NAME (const CORE *p) {                        \\\n    return (TGLC_ ## NAME *)p;                                                 \\\n  }\n\n#endif /* CRYPTO_META_H_ */\n"
  },
  {
    "path": "crypto/rand.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_RAND_H__\n#define __TGL_CRYPTO_RAND_H__\n\nvoid TGLC_rand_add (const void *buf, int num, double entropy);\nint TGLC_rand_bytes (unsigned char *buf, int num);\nint TGLC_rand_pseudo_bytes (unsigned char *buf, int num);\n\n#endif\n"
  },
  {
    "path": "crypto/rand_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n/* Marginally speed up compilation */\n#define GCRYPT_NO_MPI_MACROS\n/* Fail-fast when something becomes deprecated. */\n#define GCRYPT_NO_DEPRECATED\n\n#include <assert.h>\n#include <gcrypt.h>\n\n#include \"rand.h\"\n\nvoid TGLC_rand_add (const void *buf, int num, double entropy) {\n  (void) entropy;\n  // TODO: Translate half-broken \"entropy\" into gcry's \"quality\".\n  gcry_random_add_bytes (buf, num, 50);\n}\n\nint TGLC_rand_bytes (unsigned char *buf, int num) {\n  gcry_randomize (buf, num, GCRY_STRONG_RANDOM);\n  return 1; // Don't ask why.\n}\n\nint TGLC_rand_pseudo_bytes (unsigned char *buf, int num) {\n  gcry_create_nonce (buf, num);\n  return 0; // Don't ask why.\n}\n\n#endif\n"
  },
  {
    "path": "crypto/rand_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n#include <openssl/rand.h>\n\n#include \"rand.h\"\n\nvoid TGLC_rand_add (const void *buf, int num, double entropy) {\n  RAND_add (buf, num, entropy);\n}\n\nint TGLC_rand_bytes (unsigned char *buf, int num) {\n  return RAND_bytes (buf, num);\n}\n\nint TGLC_rand_pseudo_bytes (unsigned char *buf, int num) {\n  return RAND_pseudo_bytes (buf, num);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/rsa_pem.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_RSA_H__\n#define __TGL_CRYPTO_RSA_H__\n\n#include <stdio.h> /* FILE */\n\n#include \"bn.h\"\n\ntypedef struct TGLC_rsa TGLC_rsa;\n\nTGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n);\n\nTGLC_bn *TGLC_rsa_n (TGLC_rsa *);\nTGLC_bn *TGLC_rsa_e (TGLC_rsa *);\n\nvoid TGLC_rsa_free (TGLC_rsa *);\n\nTGLC_rsa *TGLC_pem_read_RSAPublicKey (FILE *fp);\n\n#endif\n"
  },
  {
    "path": "crypto/rsa_pem_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n#include <gcrypt.h>\n\n#include \"meta.h\"\n#include \"rsa_pem.h\"\n#include \"../tools.h\" /* talloc */\n\nstruct TGLC_rsa {\n  TGLC_bn *n;\n  TGLC_bn *e;\n};\n\nTGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) {\n  assert (n_bytes > 0 && n_bytes < 5000);\n  TGLC_rsa *ret = talloc (sizeof (TGLC_rsa));\n  ret->e = TGLC_bn_new ();\n  TGLC_bn_set_word (ret->e, e);\n  ret->n = TGLC_bn_bin2bn (n, n_bytes, NULL);\n  assert (n_bytes == TGLC_bn_num_bytes (ret->n));\n  return ret;\n}\n\n#define RSA_GETTER(M)                                                          \\\n  TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) {                                    \\\n    return key->M;                                                             \\\n  }                                                                            \\\n\nRSA_GETTER(n);\nRSA_GETTER(e);\n\nvoid TGLC_rsa_free (TGLC_rsa *key) {\n  if (key->e) {\n    TGLC_bn_free (key->e);\n  }\n  if (key->n) {\n    TGLC_bn_free (key->n);\n  }\n  tfree (key, sizeof (TGLC_rsa));\n}\n\nTGLC_rsa *TGLC_pem_read_RSAPublicKey (FILE *fp) {\n  /*\n   * Reading PEM format involves ASN.1 and is hard. libgcrypt doesn't support it.\n   * The dependency on oh-so-freaking-much code just to parse static data that\n   * will never change is not justified. Let the caller figure out how to resolve\n   * this (telegram-purple does so by using libpurple's built-in functions), and\n   * ignore any PEM files.\n   */\n  (void) fp;\n  return NULL;\n}\n\n#endif\n"
  },
  {
    "path": "crypto/rsa_pem_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n//#include <stddef.h> /* NULL */\n\n#include <openssl/rsa.h>\n#include <openssl/pem.h>\n\n#include \"bn.h\"\n#include \"meta.h\"\n#include \"rsa_pem.h\"\n\nTGLC_WRAPPER_ASSOC(rsa,RSA)\n\n// TODO: Refactor crucial struct-identity into its own header.\nTGLC_WRAPPER_ASSOC(bn,BIGNUM)\n\nTGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) {\n  RSA *ret = RSA_new ();\n  ret->e = unwrap_bn (TGLC_bn_new ());\n  TGLC_bn_set_word (wrap_bn (ret->e), e);\n  ret->n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL));\n  return wrap_rsa (ret);\n}\n\n#define RSA_GETTER(M)                                                          \\\n  TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) {                                    \\\n    return wrap_bn (unwrap_rsa (key)->M);                                      \\\n  }                                                                            \\\n\nRSA_GETTER(n);\nRSA_GETTER(e);\n\nvoid TGLC_rsa_free (TGLC_rsa *p) {\n  RSA_free (unwrap_rsa (p));\n}\n\nTGLC_rsa *TGLC_pem_read_RSAPublicKey (FILE *fp) {\n  return wrap_rsa (PEM_read_RSAPublicKey (fp, NULL, NULL, NULL));\n}\n\n#endif\n"
  },
  {
    "path": "crypto/sha.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#ifndef __TGL_CRYPTO_SHA_H__\n#define __TGL_CRYPTO_SHA_H__\n\n#include <stddef.h> /* size_t */\n\nvoid TGLC_sha1 (const unsigned char *d, size_t n, unsigned char *md);\nvoid TGLC_sha256 (const unsigned char *d, size_t n, unsigned char *md);\n\n#endif\n"
  },
  {
    "path": "crypto/sha_altern.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifdef TGL_AVOID_OPENSSL\n\n/* Marginally speed up compilation */\n#define GCRYPT_NO_MPI_MACROS\n/* Fail-fast when something becomes deprecated. */\n#define GCRYPT_NO_DEPRECATED\n\n#include <gcrypt.h>\n\n#include \"sha.h\"\n\nvoid TGLC_sha1 (const unsigned char *d, size_t n, unsigned char *md) {\n  gcry_md_hash_buffer (GCRY_MD_SHA1, md, d, n);\n}\nvoid TGLC_sha256 (const unsigned char *d, size_t n, unsigned char *md) {\n  gcry_md_hash_buffer (GCRY_MD_SHA256, md, d, n);\n}\n\n#endif\n"
  },
  {
    "path": "crypto/sha_openssl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Ben Wiederhake 2015\n*/\n\n#include \"../config.h\"\n\n#ifndef TGL_AVOID_OPENSSL\n\n#include <openssl/sha.h>\n\n#include \"sha.h\"\n\nvoid TGLC_sha1 (const unsigned char *d, size_t n, unsigned char *md) {\n  SHA1 (d, n, md);\n}\nvoid TGLC_sha256 (const unsigned char *d, size_t n, unsigned char *md) {\n  SHA256 (d, n, md);\n}\n\n#endif\n"
  },
  {
    "path": "encrypted_scheme.tl",
    "content": "---types---\ndecryptedMessageMediaEmpty#89f5c4a = DecryptedMessageMedia;\ndecryptedMessageMediaPhoto#32798a8c str_thumb:bytes thumb_w:int thumb_h:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;\ndecryptedMessageMediaGeoPoint#35480a59 latitude:double longitude:double = DecryptedMessageMedia;\ndecryptedMessageMediaContact#588a0a97 phone_number:string first_name:string last_name:string user_id:int = DecryptedMessageMedia;\ndecryptedMessageActionSetMessageTTL#a1733aec ttl_seconds:int = DecryptedMessageAction;\ndecryptedMessageMediaDocument#b095434b str_thumb:bytes thumb_w:int thumb_h:int file_name:string mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia;\ndecryptedMessageActionReadMessages#c4f40be random_ids:Vector<long> = DecryptedMessageAction;\ndecryptedMessageActionDeleteMessages#65614304 random_ids:Vector<long> = DecryptedMessageAction;\ndecryptedMessageActionScreenshotMessages#8ac1f475 random_ids:Vector<long> = DecryptedMessageAction;\ndecryptedMessageActionFlushHistory#6719e45c = DecryptedMessageAction;\n\ndecryptedMessage#204d3878 random_id:long ttl:int message:string media:DecryptedMessageMedia = DecryptedMessage;\ndecryptedMessageService#73164160 random_id:long action:DecryptedMessageAction = DecryptedMessage;\ndecryptedMessageMediaVideo#524a415d str_thumb:bytes thumb_w:int thumb_h:int duration:int mime_type:string w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia;\ndecryptedMessageMediaAudio#57e0a9cb duration:int mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia;\ndecryptedMessageLayer#1be31789 random_bytes:bytes layer:int in_seq_no:int out_seq_no:int message:DecryptedMessage = DecryptedMessageLayer;\ndecryptedMessageActionResend#511110b0 start_seq_no:int end_seq_no:int = DecryptedMessageAction;\ndecryptedMessageActionNotifyLayer#f3048883 layer:int = DecryptedMessageAction;\ndecryptedMessageActionTyping#ccb27641 action:SendMessageAction = DecryptedMessageAction;\n\ndecryptedMessageActionRequestKey#f3c9611b exchange_id:long g_a:bytes = DecryptedMessageAction;\ndecryptedMessageActionAcceptKey#6fe1735b exchange_id:long g_b:bytes key_fingerprint:long = DecryptedMessageAction;\ndecryptedMessageActionAbortKey#dd05ec6b exchange_id:long = DecryptedMessageAction;\ndecryptedMessageActionCommitKey#ec2e0b9b exchange_id:long key_fingerprint:long = DecryptedMessageAction;\ndecryptedMessageActionNoop#a82fdd63 = DecryptedMessageAction;\n\ndecryptedMessageMediaExternalDocument#fa95b0dd id:long access_hash:long date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector<DocumentAttribute> = DecryptedMessageMedia;\n---functions---\n"
  },
  {
    "path": "errors",
    "content": "type of errors that tgl can set:\n\nEPROTO: server returned error for query. Some kinds of error (such as FLOOD_WAIT) tgl can handle by itself, but others it can not. In most cases it means bug in tgl or invalid parameter supplied to method (such as message id). On BSD, EPROTO is not defined. Whenever EPROTO is not #define'd, tgl uses EIO instead.\n\nEINVAL: tgl detected invalid argument supplied before sending query to server. For example user instead of chat or bad msg id. \n\nENOENT: tgl received empty response from server. For example when user tried to get message by id\n\nEBADF: tgl can not open file on disk or file is empty\n\nE2BIG: supplied file is too big\n\nENOTCONN: no public keys available\n"
  },
  {
    "path": "event-old.h",
    "content": "#ifndef __EVENT_OLD_H__\n#define __EVENT_OLD_H__\n\n#include <assert.h>\n#include <stdlib.h>\n\n#define BEV_EVENT_READ EVBUFFER_READ\n#define BEV_EVENT_WRITE EVBUFFER_WRITE\n#define BEV_EVENT_EOF EVBUFFER_EOF\n#define BEV_EVENT_ERROR EVBUFFER_ERROR\n#define BEV_EVENT_TIMEOUT EVBUFFER_TIMEOUT\n\ntypedef int evutil_socket_t;\n  \nstatic inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));\nstatic inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) {\n  struct event *ev = malloc (sizeof (*ev));  \n  event_set (ev, fd, what, callback, arg);\n  event_base_set (base, ev);\n  return ev;\n}\n  \nstatic inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));\nstatic inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) {\n  struct event *ev = malloc (sizeof (*ev));\n  event_set (ev, -1, 0, callback, arg);\n  event_base_set (base, ev);\n  return ev;\n}\n\nstatic void event_free (struct event *ev) __attribute__ ((unused));\nstatic void event_free (struct event *ev) {\n  event_del (ev);\n  free (ev);\n}\n\nstatic struct bufferevent *bufferevent_socket_new (struct event_base *base, int fd, int flags) __attribute__ ((unused));\nstatic struct bufferevent *bufferevent_socket_new (struct event_base *base, int fd, int flags) {\n  assert (!flags);\n  struct bufferevent *bev = bufferevent_new(fd, 0, 0, 0, 0);\n  bufferevent_base_set (base, bev);\n  return bev;\n}\n\nstatic inline void *event_get_callback_arg(const struct event *ev) {\n  return ev->ev_arg;\n}\n#endif\n"
  },
  {
    "path": "gen_constants_h.awk",
    "content": "BEGIN {\n  print \"/*\";\n  print \"    This file is part of telegram-client.\";\n  print \"\";\n  print \"    Telegram-client is free software: you can redistribute it and/or modify\";\n  print \"    it under the terms of the GNU General Public License as published by\";\n  print \"    the Free Software Foundation, either version 2 of the License, or\";\n  print \"    (at your option) any later version.\";\n  print \"\";\n  print \"    Telegram-client is distributed in the hope that it will be useful,\";\n  print \"    but WITHOUT ANY WARRANTY; without even the implied warranty of\";\n  print \"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\";\n  print \"    GNU General Public License for more details.\";\n  print \"\";\n  print \"    You should have received a copy of the GNU General Public License\";\n  print \"    along with this telegram-client.  If not, see <http://www.gnu.org/licenses/>.\";\n  print \"\";\n  print \"    Copyright Vitaly Valtman 2013\";\n  print \"*/\";\n  print \"#ifndef CONSTANTS_H\";\n  print \"#define CONSTANTS_H\";\n}\n//  {\n  if (split ($1, a, \"#\") == 2) {\n    gsub (/[ABCDEFGHIJKLMNOPQRSTUVWXYZ]/, \"_&\", a[1]);\n    gsub (/[.]/, \"_\", a[1]);\n    if (a[2] in h) {\n      print \"ERROR: Duplicate magic \" a[2] \" for define \" a[1] \" and \" h[a[2]] > \"/dev/stderr\"\n      exit 1;\n    }\n    h[a[2]] = a[1];\n    print \"#define\", \"CODE_\" tolower(a[1]), \"0x\" a[2];\n  }\n}\nEND {\n  print \"#endif\";\n}\n"
  },
  {
    "path": "generate.c",
    "content": "/*\n    This file is part of tgl-libary/generate\n\n    Tgl-library/generate is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 2 of the License, or\n    (at your option) any later version.\n\n    Tgl-library/generate is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this tgl-library/generate.  If not, see <http://www.gnu.org/licenses/>.\n\n    Copyright Vitaly Valtman 2014-2015\n\n    It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)\n    Copyright 2012-2013 Vkontakte Ltd\n              2012-2013 Vitaliy Valtman\n*/\n\n#define _GNU_SOURCE\n\n#include \"config.h\"\n#include <stdio.h>\n#include <signal.h>\n#ifdef HAVE_EXECINFO_H\n#include <execinfo.h>\n#endif\n#include <unistd.h>\n#include <stdlib.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <assert.h>\n#include <string.h>\n#include <errno.h>\n\n#if defined(_MSC_VER) || defined(__MINGW32__)\n\n/* Find the length of STRING, but scan at most MAXLEN characters.\n   If no '\\0' terminator is found in that many characters, return MAXLEN.  */\nsize_t strnlen (const char *string, size_t maxlen)\n{\n  const char *end = memchr (string, '\\0', maxlen);\n  return end ? (size_t)(end - string) : maxlen;\n}\n\nchar *strndup (const char *s, size_t n) {\n  size_t len = strnlen (s, n);\n  char *new = malloc (len + 1);\n\n  if (new == NULL)\n    return NULL;\n\n  new[len] = '\\0';\n  return memcpy (new, s, len);\n}\n\n#define INT64_PRINTF_MODIFIER \"I64\"\n#else\n#define INT64_PRINTF_MODIFIER \"ll\"\n#endif\n\n#include \"tl-parser/tl-tl.h\"\n#include \"generate.h\"\n\n#include \"tree.h\"\n\nint header;\n\n#define tl_type_name_cmp(a,b) (a->name > b->name ? 1 : a->name < b->name ? -1 : 0)\n\nDEFINE_TREE (tl_type, struct tl_type *, tl_type_name_cmp, 0)\nDEFINE_TREE (tl_combinator, struct tl_combinator *, tl_type_name_cmp, 0)\n\nstruct tree_tl_type *type_tree;\nstruct tree_tl_combinator *function_tree;\n\nvoid tl_function_insert_by_name (struct tl_combinator *c) {\n  function_tree = tree_insert_tl_combinator (function_tree, c, rand ());\n}\n\nstruct tl_type *tl_type_get_by_name (int name) {\n  static struct tl_type t;\n  t.name = name;\n\n  return tree_lookup_tl_type (type_tree, &t);\n}\n\nvoid tl_type_insert_by_name (struct tl_type *t) {\n  type_tree = tree_insert_tl_type (type_tree, t, rand ());\n}\n\nint is_empty (struct tl_type *t) {\n  if (t->name == NAME_INT  || t->name == NAME_LONG || t->name == NAME_DOUBLE || t->name == NAME_STRING) { return 1; }\n  if (t->constructors_num != 1) { return 0; }\n  int count = 0;\n  int i;\n  struct tl_combinator *c = t->constructors[0];\n  for (i = 0; i < c->args_num; i++) {\n    if (!(c->args[i]->flags & FLAG_OPT_VAR)) { count ++; }\n  }\n  return count == 1;\n}\n\n\nstatic char buf[1 << 20];\nint buf_size;\nint *buf_ptr = (int *)buf;\nint *buf_end;\n#ifndef DISABLE_EXTF\nint skip_only = 0;\n#else\nint skip_only = 1;\n#endif\n\nint verbosity;\n\nint get_int (void) {\n  assert (buf_ptr < buf_end);\n  return *(buf_ptr ++);\n}\n\nlong long get_long (void) {\n  assert (buf_ptr + 1 < buf_end);\n  long long r = *(long long *)buf_ptr;\n  buf_ptr += 2;\n  return r;\n}\n\nstatic void *malloc0 (int size) {\n  void *r = malloc (size);\n  assert (r);\n  memset (r, 0, size);\n  return r;\n}\n\nchar *get_string (void) {\n  int l = *(unsigned char *)buf_ptr;\n  assert (l != 0xff);\n  \n  char *res;\n  int tlen = 0;\n  if (l == 0xfe) {\n    l = ((unsigned)get_int ()) >> 8;\n    res = (char *)buf_ptr;\n    tlen = l;\n  } else {\n    res = ((char *)buf_ptr) + 1;\n    tlen = 1 + l;\n  }\n\n  int len = l;\n  \n  tlen += ((-tlen) & 3);\n  assert (!(tlen & 3));\n\n  buf_ptr += tlen / 4;\n  assert (buf_ptr <= buf_end);\n  \n  char *r = strndup (res, len);\n  assert (r);\n  return r;\n}\n\n\nint tn, fn, cn;\nstruct tl_type **tps;\nstruct tl_combinator **fns;\n\nstruct tl_tree *read_tree (int *var_num);\nstruct tl_tree *read_nat_expr (int *var_num);\nstruct tl_tree *read_type_expr (int *var_num);\nint read_args_list (struct arg **args, int args_num, int *var_num);\n\n#define use_var_nat_full_form(x) 0\n\nvoid *int_to_var_nat_const_init (long long x) {\n  if (use_var_nat_full_form (x)) {\n    struct tl_tree_nat_const *T = malloc (sizeof (*T));\n    assert (T);\n    T->self.flags = 0;\n    T->self.methods = &tl_pnat_const_full_methods;\n    T->value = x;\n    return T;\n  } else {\n    return (void *)(long)(x * 2 - 0x80000001l);\n  }\n}\n\nlong long var_nat_const_to_int (void *x) {\n  if (((long)x) & 1) {\n    return (((long)x) + 0x80000001l) / 2;\n  } else {\n    return ((struct tl_tree_nat_const *)x)->value;\n  }\n}\n\nint tl_tree_type_type (struct tl_tree *x) {\n  return NODE_TYPE_TYPE;\n}\n\nint tl_tree_type_array (struct tl_tree *x) {\n  return NODE_TYPE_ARRAY;\n}\n\nint tl_tree_type_nat_const (struct tl_tree *x) {\n  return NODE_TYPE_NAT_CONST;\n}\n\nint tl_tree_type_var_num (struct tl_tree *x) {\n  return NODE_TYPE_VAR_NUM;\n}\n\nint tl_tree_type_var_type (struct tl_tree *x) {\n  return NODE_TYPE_VAR_TYPE;\n}\n\nstruct tl_tree_methods tl_var_num_methods = {\n  .type = tl_tree_type_var_num\n};\n\nstruct tl_tree_methods tl_var_type_methods = {\n  .type = tl_tree_type_var_type\n};\n\nstruct tl_tree_methods tl_type_methods = {\n  .type = tl_tree_type_type\n};\n\nstruct tl_tree_methods tl_nat_const_methods = {\n  .type = tl_tree_type_nat_const\n};\n\nstruct tl_tree_methods tl_array_methods = {\n  .type = tl_tree_type_array\n};\n\nstruct tl_tree_methods tl_ptype_methods = {\n  .type = tl_tree_type_type\n};\n\nstruct tl_tree_methods tl_parray_methods = {\n  .type = tl_tree_type_array\n};\n\nstruct tl_tree_methods tl_pvar_num_methods = {\n  .type = tl_tree_type_var_num\n};\n\nstruct tl_tree_methods tl_pvar_type_methods = {\n  .type = tl_tree_type_var_type\n};\n\nstruct tl_tree_methods tl_nat_const_full_methods = {\n  .type = tl_tree_type_nat_const\n};\n\nstruct tl_tree_methods tl_pnat_const_full_methods = {\n  .type = tl_tree_type_nat_const\n};\n\nstruct tl_tree *read_num_const (int *var_num) {\n  return (void *)int_to_var_nat_const_init (get_int ());\n}\n\n\nvoid print_c_type_name (struct tl_tree *t, char *offset, int in) {\n  int x = TL_TREE_METHODS(t)->type (t);\n\n  if (x == NODE_TYPE_VAR_TYPE) {\n    printf (\"void *\");\n    return;\n  }\n\n  if (x == NODE_TYPE_ARRAY) {\n    struct tl_tree_array *a = (void *)t;\n    assert (a->args_num == 1);\n    print_c_type_name (a->args[0]->type, offset, in);\n    printf (\"*\");\n    return;\n  }\n\n  struct tl_type *T = ((struct tl_tree_type *)t)->type;\n  if (!strcmp (T->id, \"Vector\") && in) {\n    printf (\"struct {\\n\");\n    printf (\"%s  int *cnt;\\n\", offset);\n    printf (\"%s  \", offset);\n    print_c_type_name (((struct tl_tree_type *)t)->children[0], offset, in);\n    printf (\"*data;\\n\");\n    printf (\"%s} *\", offset);\n    return;\n  } \n  if (!strcmp (T->id, \"Long\")) {\n    printf (\"long long *\");\n    return;\n  } \n  if (!strcmp (T->id, \"#\") || !strcmp (T->id, \"Int\")) {\n    printf (\"int *\");\n    return;\n  } \n  if (!strcmp (T->id, \"Double\")) {\n    printf (\"double *\");\n    return;\n  } \n  if (!strcmp (T->id, \"String\") || !strcmp (T->id, \"Bytes\")) {\n    /*printf (\"struct {\\n\");\n    printf (\"%s  int len;\\n\", offset);\n    printf (\"%s  char *data;\\n\", offset);\n    printf (\"%s} *\", offset);\n    return;*/\n    \n    printf (\"struct tl_ds_string *\");\n    return;\n  }\n  printf (\"struct tl_ds_%s *\", T->print_id);\n}\n\nint gen_uni_skip (struct tl_tree *t, char *cur_name, int *vars, int first, int fun) {\n  assert (t);\n  int x = TL_TREE_METHODS (t)->type (t);\n  int l = 0;\n  int i;\n  int j;\n  struct tl_tree_type *t1;\n  struct tl_tree_array *t2;\n  int y;\n  int L = strlen (cur_name);\n  char *fail = fun == 1 ? \"return 0;\" : fun == -1 ? \"return;\" : \"return -1;\";\n  switch (x) {\n  case NODE_TYPE_TYPE:\n    t1 = (void *)t;\n    if (!first) {\n      printf (\"  if (ODDP(%s) || %s->type->name != 0x%08x) { %s }\\n\", cur_name, cur_name, t1->type->name, fail);\n    } else {\n      printf (\"  if (ODDP(%s) || (%s->type->name != 0x%08x && %s->type->name != 0x%08x)) { %s }\\n\", cur_name, cur_name, t1->type->name, cur_name, ~t1->type->name, fail);\n    }\n    for (i = 0; i < t1->children_num; i++) {\n      sprintf (cur_name + L, \"->params[%d]\", i);\n      gen_uni_skip (t1->children[i], cur_name, vars, 0, fun);\n      cur_name[L] = 0;\n    }\n    return 0;\n  case NODE_TYPE_NAT_CONST:\n    printf (\"  if (EVENP(%s) || ((long)%s) != %\" INT64_PRINTF_MODIFIER \"d) { %s }\\n\", cur_name, cur_name, var_nat_const_to_int (t) * 2 + 1, fail);\n    return 0;\n  case NODE_TYPE_ARRAY:\n    printf (\"  if (ODDP(%s) || %s->type->name != TL_TYPE_ARRAY) { %s }\\n\", cur_name, cur_name, fail);\n    t2 = (void *)t;\n    \n    sprintf (cur_name + L, \"->params[0]\");\n    y = gen_uni_skip (t2->multiplicity, cur_name, vars, 0, fun);    \n    cur_name[L] = 0;\n\n    sprintf (cur_name + L, \"->params[1]\");\n    y += gen_uni_skip (t2->args[0]->type, cur_name, vars, 0, fun);\n    cur_name[L] = 0;\n    return 0;\n  case NODE_TYPE_VAR_TYPE:\n    printf (\"  if (ODDP(%s)) { %s }\\n\", cur_name, fail);\n    i = ((struct tl_tree_var_type *)t)->var_num;\n    if (!vars[i]) {\n      printf (\"  struct paramed_type *var%d = %s; assert (var%d);\\n\", i, cur_name, i);      \n      vars[i] = 1;\n    } else if (vars[i] == 1) {\n      printf (\" if (compare_types (var%d, %s) < 0) { %s }\\n\", i, cur_name, fail);\n    } else {\n      assert (0);\n      return -1;\n    }\n    return l;\n  case NODE_TYPE_VAR_NUM:\n    printf (\"  if (EVENP(%s)) { %s }\\n\", cur_name, fail);\n    i = ((struct tl_tree_var_num *)t)->var_num;\n    j = ((struct tl_tree_var_num *)t)->dif;\n    if (!vars[i]) {\n      printf (\"  struct paramed_type *var%d = ((void *)%s) + %d; assert (var%d);\\n\", i, cur_name, 2 * j, i);\n      vars[i] = 2;\n    } else if (vars[i] == 2) {\n      printf (\"  if (var%d != ((void *)%s) + %d) { %s }\\n\", i, cur_name, 2 * j, fail);\n    } else {\n      assert (0);\n      return -1;\n    }\n    return 0;\n  default:\n    assert (0);\n    return -1;\n  }\n}\n\nvoid print_offset (int len) {\n  int i;\n  for (i = 0; i < len; i++) { printf (\" \"); }\n}\n\nint gen_create (struct tl_tree *t, int *vars, int offset) {\n  int x = TL_TREE_METHODS (t)->type (t);\n  int i;\n  struct tl_tree_type *t1;\n  struct tl_tree_array *t2;\n  switch (x) {\n  case NODE_TYPE_TYPE: \n    print_offset (offset); \n    printf (\"&(struct paramed_type){\\n\");\n    print_offset (offset + 2);\n    t1 = (void *)t;\n    if (t1->self.flags & FLAG_BARE) {\n      printf (\".type = &(struct tl_type_descr) {.name = 0x%08x, .id = \\\"Bare_%s\\\", .params_num = %d, .params_types = %\" INT64_PRINTF_MODIFIER \"d},\\n\", ~t1->type->name, t1->type->id, t1->type->arity, t1->type->params_types);\n    } else {\n      printf (\".type = &(struct tl_type_descr) {.name = 0x%08x, .id = \\\"%s\\\", .params_num = %d, .params_types = %\" INT64_PRINTF_MODIFIER \"d},\\n\", t1->type->name, t1->type->id, t1->type->arity, t1->type->params_types);\n    }\n    if (t1->children_num) {\n      print_offset (offset + 2);\n      printf (\".params = (struct paramed_type *[]){\\n\");\n      for (i = 0; i < t1->children_num; i++) {\n        assert (gen_create (t1->children[i], vars, offset + 4) >= 0);\n        printf (\",\\n\");\n      }\n      print_offset (offset + 2);\n      printf (\"}\\n\");\n    } else {\n      print_offset (offset + 2);\n      printf (\".params = 0,\\n\");\n    }\n    print_offset (offset);\n    printf (\"}\");\n    return 0;\n  case NODE_TYPE_NAT_CONST:\n    print_offset (offset); \n    printf (\"INT2PTR (%d)\", (int)var_nat_const_to_int (t));\n    return 0;\n  case NODE_TYPE_ARRAY:\n    print_offset (offset); \n    printf (\"&(struct paramed_type){\\n\");\n    print_offset (offset + 2);\n    t2 = (void *)t;\n    printf (\".type = &(struct tl_type_descr) {.name = NAME_ARRAY, .id = \\\"array\\\", .params_num = 2, .params_types = 1},\\n\");\n    print_offset (offset + 2);\n    printf (\".params = (struct paramed_type **){\\n\");\n    gen_create (t2->multiplicity, vars, offset + 4);\n    printf (\",\\n\");\n    gen_create (t2->args[0]->type, vars, offset + 4);\n    printf (\",\\n\");\n    print_offset (offset + 2);\n    printf (\"}\\n\");\n    print_offset (offset);\n    printf (\"}\");\n    return 0;\n  case NODE_TYPE_VAR_TYPE:\n    print_offset (offset);\n    printf (\"var%d\", ((struct tl_tree_var_type *)t)->var_num);\n    return 0;\n  case NODE_TYPE_VAR_NUM:\n    print_offset (offset);\n    printf (\"((void *)var%d) + %d\", ((struct tl_tree_var_type *)t)->var_num, 2 * ((struct tl_tree_var_num *)t)->dif);\n    return 0;\n  default:\n    assert (0);\n    return -1;\n  }\n}\n\nint gen_field_skip (struct arg *arg, int *vars, int num) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  if (arg->var_num >= 0) {\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      if (vars[arg->var_num] == 0) {\n        printf (\"%sif (in_remaining () < 4) { return -1;}\\n\", offset);\n        printf (\"%sstruct paramed_type *var%d = INT2PTR (fetch_int ());\\n\", offset, arg->var_num);\n        vars[arg->var_num] = 2;\n      } else if (vars[arg->var_num] == 2) {\n        printf (\"%sif (in_remaining () < 4) { return -1;}\\n\", offset);\n        printf (\"%sif (vars%d != INT2PTR (fetch_int ())) { return -1; }\\n\", offset, arg->var_num);\n      } else {\n        assert (0);\n        return -1;\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      if (!bare) {\n        printf (\"%sif (skip_type_%s (field%d) < 0) { return -1;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num);\n      } else {\n        printf (\"%sif (skip_type_bare_%s (field%d) < 0) { return -1;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num);\n      }\n    } else {\n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%swhile (multiplicity%d -- > 0) {\\n\", offset, num);\n      printf (\"%s  if (skip_type_%s (field%d) < 0) { return -1;}\\n\", offset, \"any\", num);\n      printf (\"%s}\\n\", offset);\n    }\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_fetch (struct arg *arg, int *vars, int num, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  if (!empty) {\n    printf(\"%sif (multiline_output >= 2) { print_offset (); }\\n\", offset);\n  }\n  if (arg->id && strlen (arg->id) && !empty) {\n    printf (\"%sif (!disable_field_names) { eprintf (\\\" %s :\\\"); }\\n\", offset, arg->id);\n  }\n  if (arg->var_num >= 0) {\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      if (vars[arg->var_num] == 0) {\n        printf (\"%sif (in_remaining () < 4) { return -1;}\\n\", offset);\n        printf (\"%seprintf (\\\" %%d\\\", prefetch_int ());\\n\", offset);\n        printf (\"%sstruct paramed_type *var%d = INT2PTR (fetch_int ());\\n\", offset, arg->var_num);\n        vars[arg->var_num] = 2;\n      } else if (vars[arg->var_num] == 2) {\n        printf (\"%sif (in_remaining () < 4) { return -1;}\\n\", offset);\n        printf (\"%seprintf (\\\" %%d\\\", prefetch_int ());\\n\", offset);\n        printf (\"%sif (vars%d != INT2PTR (fetch_int ())) { return -1; }\\n\", offset, arg->var_num);\n      } else {\n        assert (0);\n        return -1;\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      if (!bare) {\n        printf (\"%sif (fetch_type_%s (field%d) < 0) { return -1;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num);\n      } else {\n        printf (\"%sif (fetch_type_bare_%s (field%d) < 0) { return -1;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num);\n      }\n    } else {\n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%seprintf (\\\" [\\\");\\n\", offset);\n      printf (\"%sif (multiline_output >= 1) { eprintf (\\\"\\\\n\\\"); }\\n\", offset);\n      printf (\"%sif (multiline_output >= 1) { multiline_offset += multiline_offset_size;}\\n\", offset);\n      printf (\"%swhile (multiplicity%d -- > 0) {\\n\", offset, num);\n      printf (\"%s  if (multiline_output >= 1) { print_offset (); }\\n\", offset);\n      printf (\"%s  if (fetch_type_%s (field%d) < 0) { return -1;}\\n\", offset, \"any\", num);\n      printf (\"%s  if (multiline_output >= 1) { eprintf (\\\"\\\\n\\\"); }\\n\", offset);\n      printf (\"%s}\\n\", offset);\n      printf (\"%sif (multiline_output >= 1) { multiline_offset -= multiline_offset_size; print_offset ();}\\n\", offset);\n      printf (\"%seprintf (\\\" ]\\\");\\n\", offset);\n    }\n  }\n  if (!empty) {\n    printf(\"%sif (multiline_output >= 2) { eprintf (\\\"\\\\n\\\"); }\\n\", offset);\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_store (struct arg *arg, int *vars, int num, int from_func, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  char *fail = from_func ? \"0\" : \"-1\";\n  char *expect = from_func ? \"expect_token_ptr\" : \"expect_token\";\n  if (arg->id && strlen (arg->id) > 0 && !empty) {\n    printf (\"%sif (cur_token_len >= 0 && cur_token_len == %d && !cur_token_quoted && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", offset, (int)(strlen (arg->id)), arg->id);\n    printf (\"%s  local_next_token ();\\n\", offset);\n    printf (\"%s  %s (\\\":\\\", 1);\\n\", offset, expect);\n    printf (\"%s}\\n\", offset);\n  }\n  if (arg->var_num >= 0) {\n    printf (\"%sif (cur_token_len < 0) { return %s; }\\n\", offset, fail);\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      if (vars[arg->var_num] == 0) {\n        printf (\"%sif (!is_int ()) { return %s;}\\n\", offset, fail);\n        printf (\"%sstruct paramed_type *var%d = INT2PTR (get_int ());\\n\", offset, arg->var_num);\n        printf (\"%sout_int (get_int ());\\n\", offset);\n        printf (\"%sassert (var%d);\\n\", offset, arg->var_num);\n        printf (\"%slocal_next_token ();\\n\", offset);\n        vars[arg->var_num] = 2;\n      } else if (vars[arg->var_num] == 2) {\n        printf (\"%sif (!is_int ()) { return %s;}\\n\", offset, fail);\n        printf (\"%sif (vars%d != INT2PTR (get_int ())) { return %s; }\\n\", offset, arg->var_num, fail);\n        printf (\"%sout_int (get_int ());\\n\", offset);\n        printf (\"%slocal_next_token ();\\n\", offset);\n      } else {\n        assert (0);\n        return -1;\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      if (!bare) {\n        printf (\"%sif (store_type_%s (field%d) < 0) { return %s;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num, fail);\n      } else {\n        printf (\"%sif (store_type_bare_%s (field%d) < 0) { return %s;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num, fail);\n      }\n    } else {\n      printf (\"%s%s (\\\"[\\\", 1);\\n\", offset, expect);\n      \n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%swhile (multiplicity%d -- > 0) {\\n\", offset, num);\n      printf (\"%s  if (store_type_%s (field%d) < 0) { return %s;}\\n\", offset, \"any\", num, fail);\n      printf (\"%s}\\n\", offset);\n      \n      printf (\"%s%s (\\\"]\\\", 1);\\n\", offset, expect);\n    }\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_autocomplete (struct arg *arg, int *vars, int num, int from_func, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  char *fail = from_func ? \"0\" : \"-1\";\n  char *expect = from_func ? \"expect_token_ptr_autocomplete\" : \"expect_token_autocomplete\";\n  if (arg->id && strlen (arg->id) > 0 && !empty) {\n    printf (\"%sif (cur_token_len == -3 && cur_token_real_len <= %d && !cur_token_quoted && !memcmp (cur_token, \\\"%s\\\", cur_token_real_len)) {\\n\", offset, (int)(strlen (arg->id)), arg->id);\n    printf (\"%s  set_autocomplete_string (\\\"%s\\\");\\n\", offset, arg->id);\n    printf (\"%s  return %s;\\n\", offset, fail);\n    printf (\"%s}\\n\", offset);\n\n    printf (\"%sif (cur_token_len >= 0 && cur_token_len == %d && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", offset, (int)(strlen (arg->id)), arg->id);\n    printf (\"%s  local_next_token ();\\n\", offset);\n    printf (\"%s  %s (\\\":\\\", 1);\\n\", offset, expect);\n    printf (\"%s}\\n\", offset);\n  }\n  if (arg->var_num >= 0) {\n    printf (\"%sif (cur_token_len < 0) { return %s; }\\n\", offset, fail);\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      if (vars[arg->var_num] == 0) {\n        printf (\"%sif (!is_int ()) { return %s;}\\n\", offset, fail);\n        printf (\"%sstruct paramed_type *var%d = INT2PTR (get_int ());\\n\", offset, arg->var_num);\n        printf (\"%sassert (var%d);\\n\", offset, arg->var_num);\n        printf (\"%slocal_next_token ();\\n\", offset);\n        vars[arg->var_num] = 2;\n      } else if (vars[arg->var_num] == 2) {\n        printf (\"%sif (!is_int ()) { return %s;}\\n\", offset, fail);\n        printf (\"%sif (vars%d != INT2PTR (get_int ())) { return %s; }\\n\", offset, arg->var_num, fail);\n        printf (\"%slocal_next_token ();\\n\", offset);\n      } else {\n        assert (0);\n        return -1;\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      if (!bare) {\n        printf (\"%sif (autocomplete_type_%s (field%d) < 0) { return %s;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num, fail);\n      } else {\n        printf (\"%sif (autocomplete_type_bare_%s (field%d) < 0) { return %s;}\\n\", offset, t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num, fail);\n      }\n    } else {\n      printf (\"%s%s (\\\"[\\\", 1);\\n\", offset, expect);\n      \n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%swhile (multiplicity%d -- > 0) {\\n\", offset, num);\n      printf (\"%s  if (autocomplete_type_%s (field%d) < 0) { return %s;}\\n\", offset, \"any\", num, fail);\n      printf (\"%s}\\n\", offset);\n      \n      printf (\"%s%s (\\\"]\\\", 1);\\n\", offset, expect);\n    }\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_fetch_ds (struct arg *arg, int *vars, int num, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  if (arg->var_num >= 0) {\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      printf (\"%sassert (in_remaining () >= 4);\\n\", offset);\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%sresult->%s = talloc (4);\", offset, arg->id);\n        printf (\"%s*result->%s = prefetch_int ();\", offset, arg->id);\n      } else {\n        printf (\"%sresult->f%d = talloc (4);\", offset, num - 1);\n        printf (\"%s*result->f%d = prefetch_int ();\", offset, num - 1);\n      }\n      if (vars[arg->var_num] == 0) {\n        printf (\"%sstruct paramed_type *var%d = INT2PTR (fetch_int ());\\n\", offset, arg->var_num);\n        vars[arg->var_num] = 2;\n      } else if (vars[arg->var_num] == 2) {\n        printf (\"%sassert (vars%d == INT2PTR (fetch_int ()));\\n\", offset, arg->var_num);\n      } else {\n        assert (0);\n        return -1;\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%sresult->%s = \", offset, arg->id);\n      } else {\n        printf (\"%sresult->f%d = \", offset, num - 1);\n      }\n      if (t == NODE_TYPE_TYPE && !strcmp (((struct tl_tree_type *)arg->type)->type->id, \"Vector\")) {\n        printf (\"(void *)\");\n      }\n      if (!bare) {\n        printf (\"fetch_ds_type_%s (field%d);\\n\", t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num);\n      } else {\n        printf (\"fetch_ds_type_bare_%s (field%d);\\n\", t == NODE_TYPE_VAR_TYPE ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num);\n      }\n    } else {\n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%sresult->%s = \", offset, arg->id);\n      } else {\n        printf (\"%sresult->f%d = \", offset, num - 1);\n      }\n      printf (\"talloc0 (multiplicity%d * sizeof (void *));\\n\", num);\n      printf (\"%s{\\n\", offset);\n      printf (\"%s  int i = 0;\\n\", offset);\n      printf (\"%s  while (i < multiplicity%d) {\\n\", offset, num);\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%s    result->%s[i ++] =\", offset, arg->id);\n      } else {\n        printf (\"%s    result->f%d[i ++] = \", offset, num - 1);\n      }\n      printf (\"fetch_ds_type_%s (field%d);\\n\", \"any\", num);\n      printf (\"%s  }\\n\", offset);\n      printf (\"%s}\\n\", offset);\n    }\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_free_ds (struct arg *arg, int *vars, int num, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  if (arg->var_num >= 0) {\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      if (arg->id && strlen (arg->id)) {\n        if (vars[arg->var_num] == 0) {\n          printf (\"%sstruct paramed_type *var%d = INT2PTR (*D->%s);\\n\", offset, arg->var_num, arg->id);\n          vars[arg->var_num] = 2;\n        } else if (vars[arg->var_num] == 2) {\n          printf (\"%sassert (vars%d == INT2PTR (*D->%s));\\n\", offset, arg->var_num, arg->id);\n        }\n        printf (\"%stfree (D->%s, sizeof (*D->%s));\\n\", offset, arg->id, arg->id);\n      } else {\n        if (vars[arg->var_num] == 0) {\n          printf (\"%sstruct paramed_type *var%d = INT2PTR (*D->f%d);\\n\", offset, arg->var_num, num - 1);\n          vars[arg->var_num] = 2;\n        } else if (vars[arg->var_num] == 2) {\n          printf (\"%sassert (vars%d == *D->f%d);\\n\", offset, arg->var_num, num - 1);\n        }\n        printf (\"%stfree (D->f%d, sizeof (*D->f%d));\\n\", offset, num - 1, num - 1);\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int any = (t == NODE_TYPE_VAR_TYPE) || ((struct tl_tree_type *)arg->type)->type->name == NAME_VECTOR;\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%sfree_ds_type_%s (D->%s, field%d);\\n\", offset, any ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, arg->id, num);      \n      } else {\n        printf (\"%sfree_ds_type_%s (D->f%d, field%d);\\n\", offset, any ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, num - 1, num);      \n      }\n    } else {\n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%s{\\n\", offset);\n      printf (\"%s  int i = 0;\\n\", offset);\n      printf (\"%s  while (i < multiplicity%d) {\\n\", offset, num);\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%s    free_ds_type_%s (D->%s[i ++], field%d);\\n\", offset, \"any\", arg->id, num);\n      } else {\n        printf (\"%s    free_ds_type_%s (D->f%d[i ++], field%d);\\n\", offset, \"any\", num - 1, num);\n      }\n      printf (\"%s  }\\n\", offset);\n      printf (\"%s}\\n\", offset);\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%stfree (D->%s, sizeof (void *) * multiplicity%d);\\n\", offset, arg->id, num);\n      } else {\n        printf (\"%stfree (D->f%d, sizeof (void *) * multiplicity%d);\\n\", offset, num - 1, num);\n      }\n    }\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_store_ds (struct arg *arg, int *vars, int num, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  if (arg->var_num >= 0) {\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      assert (t == NAME_VAR_NUM);\n      if (arg->id && strlen (arg->id)) {\n        if (vars[arg->var_num] == 0) {\n          printf (\"%sstruct paramed_type *var%d = INT2PTR (*D->%s);\\n\", offset, arg->var_num, arg->id);\n          vars[arg->var_num] = 2;\n        } else if (vars[arg->var_num] == 2) {\n          printf (\"%sassert (vars%d == INT2PTR (*D->%s));\\n\", offset, arg->var_num, arg->id);\n        }\n        printf (\"%sout_int (PTR2INT (var%d));\\n\", offset, arg->var_num);\n      } else {\n        if (vars[arg->var_num] == 0) {\n          printf (\"%sstruct paramed_type *var%d = INT2PTR (*D->f%d);\\n\", offset, arg->var_num, num - 1);\n          vars[arg->var_num] = 2;\n        } else if (vars[arg->var_num] == 2) {\n          printf (\"%sassert (vars%d == *D->f%d);\\n\", offset, arg->var_num, num - 1);\n        }\n        printf (\"%sout_int (PTR2INT (var%d));\\n\", offset, arg->var_num);\n      }\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int any = (t == NODE_TYPE_VAR_TYPE);\n      int vec = ((struct tl_tree_type *)arg->type)->type->name == NAME_VECTOR;\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%sstore_ds_type_%s%s (%sD->%s, field%d);\\n\", offset, bare ? \"bare_\" : \"\", any ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, vec ? \"(void *)\" : \"\", arg->id, num);      \n      } else {\n        printf (\"%sstore_ds_type_%s%s (%sD->f%d, field%d);\\n\", offset, bare ? \"bare_\" : \"\", any ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, vec ? \"(void *)\" : \"\", num - 1, num);      \n      }\n    } else {\n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%s{\\n\", offset);\n      printf (\"%s  int i = 0;\\n\", offset);\n      printf (\"%s  while (i < multiplicity%d) {\\n\", offset, num);\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%s    store_ds_type_%s (D->%s[i ++], field%d);\\n\", offset, \"any\", arg->id, num);\n      } else {\n        printf (\"%s    store_ds_type_%s (D->f%d[i ++], field%d);\\n\", offset, \"any\", num - 1, num);\n      }\n      printf (\"%s  }\\n\", offset);\n      printf (\"%s}\\n\", offset);\n    }\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_print_ds (struct arg *arg, int *vars, int num, int empty) {\n  assert (arg);\n  char *offset = \"  \";\n  int o = 0;\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n    o = 2;\n  }\n  if (!empty) {\n    printf(\"%sif (multiline_output >= 2) { print_offset (); }\\n\", offset);\n  }\n  if (arg->id && strlen (arg->id) && !empty) {\n    printf (\"%sif (!disable_field_names) { eprintf (\\\" %s :\\\"); }\\n\", offset, arg->id);\n  }\n  if (arg->var_num >= 0) {\n    assert (TL_TREE_METHODS (arg->type)->type (arg->type) == NODE_TYPE_TYPE);\n    int t = ((struct tl_tree_type *)arg->type)->type->name;\n    if (t == NAME_VAR_TYPE) {\n      fprintf (stderr, \"Not supported yet\\n\");\n      assert (0);\n    } else {\n      if (arg->id && strlen (arg->id)) {\n        if (vars[arg->var_num] == 0) {\n          printf (\"%sstruct paramed_type *var%d = INT2PTR (*DS->%s);\\n\", offset, arg->var_num, arg->id);\n          vars[arg->var_num] = 2;\n        } else if (vars[arg->var_num] == 2) {\n          printf (\"%sassert (vars%d == INT2PTR (*DS->%s));\\n\", offset, arg->var_num, arg->id);\n        }\n      } else {\n        if (vars[arg->var_num] == 0) {\n          printf (\"%sstruct paramed_type *var%d = INT2PTR (*DS->f%d);\\n\", offset, arg->var_num, num - 1);\n          vars[arg->var_num] = 2;\n        } else if (vars[arg->var_num] == 2) {\n          printf (\"%sassert (vars%d == *DS->f%d);\\n\", offset, arg->var_num, num - 1);\n        }\n      }\n      printf (\"%seprintf (\\\" %%d\\\", (int)PTR2INT (var%d));\\n\", offset, arg->var_num);\n    }\n  } else {\n    int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n    if (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE) {    \n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (arg->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      int bare = arg->flags & FLAG_BARE;\n      if (!bare && t == NODE_TYPE_TYPE) {\n        bare = ((struct tl_tree_type *)arg->type)->self.flags & FLAG_BARE;\n      }\n      int any = (t == NODE_TYPE_VAR_TYPE);\n      int vec = ((struct tl_tree_type *)arg->type)->type->name == NAME_VECTOR;\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%sprint_ds_type_%s%s (%sDS->%s, field%d);\\n\", offset, bare ? \"bare_\" : \"\", any ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, vec ? \"(void *)\" : \"\", arg->id, num);      \n      } else {\n        printf (\"%sprint_ds_type_%s%s (%sDS->f%d, field%d);\\n\", offset, bare ? \"bare_\" : \"\", any ? \"any\" : ((struct tl_tree_type *)arg->type)->type->print_id, vec ? \"(void *)\" : \"\", num - 1, num);      \n      }\n    } else {\n      assert (t == NODE_TYPE_ARRAY);\n      printf (\"%sint multiplicity%d = PTR2INT (\\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->multiplicity, vars, 2 + o) >= 0);\n      printf (\"%s);\\n\", offset);\n      printf (\"%sstruct paramed_type *field%d = \\n\", offset, num);\n      assert (gen_create (((struct tl_tree_array *)arg->type)->args[0]->type, vars, 2 + o) >= 0);\n      printf (\";\\n\");\n      printf (\"%seprintf (\\\" [\\\");\\n\", offset);\n      printf (\"%sif (multiline_output >= 1) { eprintf (\\\"\\\\n\\\"); }\\n\", offset);\n      printf (\"%sif (multiline_output >= 1) { multiline_offset += multiline_offset_size;}\\n\", offset);\n      printf (\"%s{\\n\", offset);\n      printf (\"%s  int i = 0;\\n\", offset);\n      printf (\"%s  while (i < multiplicity%d) {\\n\", offset, num);\n      printf (\"%s    if (multiline_output >= 1) { print_offset (); }\\n\", offset);\n      if (arg->id && strlen (arg->id)) {\n        printf (\"%s    print_ds_type_%s (DS->%s[i ++], field%d);\\n\", offset, \"any\", arg->id, num);\n      } else {\n        printf (\"%s    print_ds_type_%s (DS->f%d[i ++], field%d);\\n\", offset, \"any\", num - 1, num);\n      }\n      printf (\"%s    if (multiline_output >= 1) { eprintf (\\\"\\\\n\\\"); }\\n\", offset);\n      printf (\"%s  }\\n\", offset);\n      printf (\"%s}\\n\", offset);\n      printf (\"%sif (multiline_output >= 1) { multiline_offset -= multiline_offset_size; print_offset ();}\\n\", offset);\n      printf (\"%seprintf (\\\" ]\\\");\\n\", offset);\n    }\n  }\n  if (!empty) {\n    printf(\"%sif (multiline_output >= 2) { eprintf (\\\"\\\\n\\\"); }\\n\", offset);\n  }\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_autocomplete_excl (struct arg *arg, int *vars, int num, int from_func) {\n  assert (arg);\n  assert (arg->var_num < 0);\n  char *offset = \"  \";\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n  }\n  char *fail = from_func ? \"0\" : \"-1\";\n  char *expect = from_func ? \"expect_token_ptr_autocomplete\" : \"expect_token_autocomplete\";\n  if (arg->id && strlen (arg->id) > 0) {\n    printf (\"%sif (cur_token_len == -3 && cur_token_real_len <= %d && !cur_token_quoted && !memcmp (cur_token, \\\"%s\\\", cur_token_real_len)) {\\n\", offset, (int)(strlen (arg->id)), arg->id);\n    printf (\"%s  set_autocomplete_string (\\\"%s\\\");\\n\", offset, arg->id);\n    printf (\"%s  return %s;\\n\", offset, fail);\n    printf (\"%s}\\n\", offset);\n\n    printf (\"%sif (cur_token_len >= 0 && cur_token_len == %d && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", offset, (int)(strlen (arg->id)), arg->id);\n    printf (\"%s  local_next_token ();\\n\", offset);\n    printf (\"%s  %s (\\\":\\\", 1);\\n\", offset, expect);\n    printf (\"%s}\\n\", offset);\n  }\n  int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n  assert (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE);\n  printf (\"%sstruct paramed_type *field%d = autocomplete_function_any ();\\n\", offset, num);\n  printf (\"%sif (!field%d) { return 0; }\\n\", offset, num);\n  printf (\"%sadd_var_to_be_freed (field%d);\\n\", offset, num);\n  static char s[20];\n  sprintf (s, \"field%d\", num);\n  gen_uni_skip (arg->type, s, vars, 1, 1);\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nint gen_field_store_excl (struct arg *arg, int *vars, int num, int from_func) {\n  assert (arg);\n  assert (arg->var_num < 0);\n  char *offset = \"  \";\n  if (arg->exist_var_num >= 0) {\n    printf (\"  if (PTR2INT (var%d) & (1 << %d)) {\\n\", arg->exist_var_num, arg->exist_var_bit);\n    offset = \"    \";\n  }\n  char *expect = from_func ? \"expect_token_ptr\" : \"expect_token\";\n  if (arg->id && strlen (arg->id) > 0) {\n    printf (\"%sif (cur_token_len >= 0 && cur_token_len == %d && !cur_token_quoted && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", offset, (int)(strlen (arg->id)), arg->id);\n    printf (\"%s  local_next_token ();\\n\", offset);\n    printf (\"%s  %s (\\\":\\\", 1);\\n\", offset, expect);\n    printf (\"%s}\\n\", offset);\n  }\n  int t = TL_TREE_METHODS (arg->type)->type (arg->type);\n  assert (t == NODE_TYPE_TYPE || t == NODE_TYPE_VAR_TYPE);\n  printf (\"%sstruct paramed_type *field%d = store_function_any ();\\n\", offset, num);\n  printf (\"%sif (!field%d) { return 0; }\\n\", offset, num);\n  static char s[20];\n  sprintf (s, \"field%d\", num);\n  gen_uni_skip (arg->type, s, vars, 1, 1);\n  if (arg->exist_var_num >= 0) {\n    printf (\"  }\\n\");\n  }\n  return 0;\n}\n\nvoid gen_constructor_skip (struct tl_combinator *c) {\n  printf (\"int skip_constructor_%s (struct paramed_type *T) {\\n\", c->print_id);\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" return -1;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  gen_uni_skip (c->result, s, vars, 1, 0);\n  \n  if (c->name == NAME_INT) {\n    printf (\"  if (in_remaining () < 4) { return -1;}\\n\");\n    printf (\"  fetch_int ();\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  if (in_remaining () < 8) { return -1;}\\n\");\n    printf (\"  fetch_long ();\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING) {\n    printf (\"  int l = prefetch_strlen ();\\n\");\n    printf (\"  if (l < 0) { return -1;}\\n\");\n    printf (\"  fetch_str (l);\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  if (in_remaining () < 8) { return -1;}\\n\");\n    printf (\"  fetch_double ();\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_skip (c->args[i], vars, i + 1) >= 0);\n  }\n  free (vars);\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_fetch (struct tl_combinator *c) {\n  printf (\"int fetch_constructor_%s (struct paramed_type *T) {\\n\", c->print_id);\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" return -1;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  gen_uni_skip (c->result, s, vars, 1, 0);\n\n  if (c->name == NAME_INT) {\n    printf (\"  if (in_remaining () < 4) { return -1;}\\n\");\n    printf (\"  eprintf (\\\" %%d\\\", fetch_int ());\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  if (in_remaining () < 8) { return -1;}\\n\");\n    printf (\"  eprintf (\\\" %%\" INT64_PRINTF_MODIFIER \"d\\\", fetch_long ());\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING) {\n    printf (\"  static char buf[1 << 22];\\n\");\n    printf (\"  int l = prefetch_strlen ();\\n\");\n    printf (\"  if (l < 0 || (l >= (1 << 22) - 2)) { return -1; }\\n\");\n    printf (\"  memcpy (buf, fetch_str (l), l);\\n\");\n    printf (\"  buf[l] = 0;\\n\");\n    printf (\"  print_escaped_string (buf, l);\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  if (in_remaining () < 8) { return -1;}\\n\");\n    printf (\"  eprintf (\\\" %%lf\\\", fetch_double ());\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n \n  assert (c->result->methods->type (c->result) == NODE_TYPE_TYPE);\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n  if (!empty) {\n    printf (\"  eprintf (\\\" %s\\\");\\n\", c->id);\n    printf (\"  if (multiline_output >= 2) { eprintf (\\\"\\\\n\\\"); }\\n\");\n  }\n  \n\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_fetch (c->args[i], vars, i + 1, empty) >= 0);\n  }\n  free (vars);\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_store (struct tl_combinator *c) {\n  printf (\"int store_constructor_%s (struct paramed_type *T) {\\n\", c->print_id);\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" return -1;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  assert (c->var_num <= 10);\n  gen_uni_skip (c->result, s, vars, 1, 0);\n\n  if (c->name == NAME_INT) {\n    printf (\"  if (is_int ()) {\\n\");\n    printf (\"    out_int (get_int ());\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  if (is_int ()) {\\n\");\n    printf (\"    out_long (get_int ());\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING) {\n    printf (\"  if (cur_token_len >= 0) {\\n\");\n    printf (\"    out_cstring (cur_token, cur_token_len);\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  if (is_double ()) {\\n\");\n    printf (\"    out_double (get_double());\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_store (c->args[i], vars, i + 1, 0, empty) >= 0);\n  }\n\n  free (vars);\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_autocomplete (struct tl_combinator *c) {\n  printf (\"int autocomplete_constructor_%s (struct paramed_type *T) {\\n\", c->print_id);\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" return -1;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  assert (c->var_num <= 10);\n  gen_uni_skip (c->result, s, vars, 1, 0);\n\n  if (c->name == NAME_INT) {\n    printf (\"  if (is_int ()) {\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  if (is_int ()) {\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING) {\n    printf (\"  if (cur_token_len >= 0) {\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  if (is_double ()) {\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return 0;\\n\");\n    printf (\"  } else {\\n\");\n    printf (\"    return -1;\\n\");\n    printf (\"  }\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_autocomplete (c->args[i], vars, i + 1, 0, empty) >= 0);\n  }\n\n  free (vars);\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_fetch_ds (struct tl_combinator *c) {\n  print_c_type_name (c->result, \"\", 0);\n  printf (\"fetch_ds_constructor_%s (struct paramed_type *T) {\\n\", c->print_id);\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" assert (0);\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  gen_uni_skip (c->result, s, vars, 1, 1);\n\n  printf (\"  \");\n  print_c_type_name (c->result, \"  \", 0);\n  printf (\"  result = talloc0 (sizeof (*result));\\n\");\n\n  struct tl_type *T = ((struct tl_tree_type *)c->result)->type;\n  if (T->constructors_num > 1) {\n    printf (\"  result->magic = 0x%08x;\\n\", c->name);\n  }\n\n  if (c->name == NAME_INT) {\n    printf (\"  assert (in_remaining () >= 4);\\n\");\n    printf (\"  *result = fetch_int ();\\n\");\n    printf (\"  return result;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  assert (in_remaining () >= 8);\\n\");\n    printf (\"  *result = fetch_long ();\\n\");\n    printf (\"  return result;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING || c->name == NAME_BYTES) {\n    printf (\"  assert (in_remaining () >= 4);\\n\");\n    printf (\"  int l = prefetch_strlen ();\\n\");\n    printf (\"  assert (l >= 0);\\n\");\n    printf (\"  result->len = l;\\n\");\n    printf (\"  result->data = talloc (l + 1);\\n\");\n    printf (\"  result->data[l] = 0;\\n\");\n    printf (\"  memcpy (result->data, fetch_str (l), l);\\n\");\n    printf (\"  return result;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  assert (in_remaining () >= 8);\\n\");\n    printf (\"  *result = fetch_double ();\\n\");\n    printf (\"  return result;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n \n  assert (c->result->methods->type (c->result) == NODE_TYPE_TYPE);\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_fetch_ds (c->args[i], vars, i + 1, empty) >= 0);\n  }\n  free (vars);\n  printf (\"  return result;\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_free_ds (struct tl_combinator *c) {\n  printf (\"void free_ds_constructor_%s (\", c->print_id);\n  print_c_type_name (c->result, \"\", 0);\n  printf (\"D, struct paramed_type *T) {\\n\");\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" assert (0);\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  gen_uni_skip (c->result, s, vars, 1, -1);\n\n  //printf (\"  \");\n  //print_c_type_name (c->result, \"  \", 0);\n  //printf (\"  result = talloc0 (sizeof (*result));\\n\");\n\n  //struct tl_type *T = ((struct tl_tree_type *)c->result)->type;\n\n  if (c->name == NAME_INT) {\n    printf (\"  tfree (D, sizeof (*D));\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  tfree (D, sizeof (*D));\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING || c->name == NAME_BYTES) {\n    printf (\"  tfree (D->data, D->len + 1);\\n\");\n    printf (\"  tfree (D, sizeof (*D));\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  tfree (D, sizeof (*D));\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n \n  assert (c->result->methods->type (c->result) == NODE_TYPE_TYPE);\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_free_ds (c->args[i], vars, i + 1, empty) >= 0);\n  }\n  printf (\"  tfree (D, sizeof (*D));\\n\");\n  free (vars);\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_store_ds (struct tl_combinator *c) {\n  printf (\"void store_ds_constructor_%s (\", c->print_id);\n  print_c_type_name (c->result, \"\", 0);\n  printf (\"D, struct paramed_type *T) {\\n\");\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" assert (0);\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  gen_uni_skip (c->result, s, vars, 1, -1);\n\n  //printf (\"  \");\n  //print_c_type_name (c->result, \"  \", 0);\n  //printf (\"  result = talloc0 (sizeof (*result));\\n\");\n\n  //struct tl_type *T = ((struct tl_tree_type *)c->result)->type;\n\n  if (c->name == NAME_INT) {\n    printf (\"  out_int (*D);\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  out_long (*D);\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING || c->name == NAME_BYTES) {\n    printf (\"  out_cstring (D->data, D->len);\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  out_double (*D);\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n \n  assert (c->result->methods->type (c->result) == NODE_TYPE_TYPE);\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_store_ds (c->args[i], vars, i + 1, empty) >= 0);\n  }\n  free (vars);\n  printf (\"}\\n\"); \n}\n\nvoid gen_constructor_print_ds (struct tl_combinator *c) {\n  printf (\"int print_ds_constructor_%s (\", c->print_id);\n  print_c_type_name (c->result, \"\", 0);\n  printf (\"DS, struct paramed_type *T) {\\n\");\n  int i;\n  for (i = 0; i < c->args_num; i++) if (c->args[i]->flags & FLAG_EXCL) {\n    printf (\" return -1;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n  static char s[10000];\n  sprintf (s, \"T\");\n  \n  int *vars = malloc0 (c->var_num * 4);;\n  gen_uni_skip (c->result, s, vars, 1, 0);\n\n  if (c->name == NAME_INT) {\n    printf (\"  eprintf (\\\" %%d\\\", *DS);\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_LONG) {\n    printf (\"  eprintf (\\\" %%\" INT64_PRINTF_MODIFIER \"d\\\", *DS);\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_STRING || c->name == NAME_BYTES) {\n    printf (\"  print_escaped_string (DS->data, DS->len);\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  } else if (c->name == NAME_DOUBLE) {\n    printf (\"  eprintf (\\\" %%lf\\\", *DS);\\n\");\n    printf (\"  return 0;\\n\");\n    printf (\"}\\n\");\n    return;\n  }\n \n  assert (c->result->methods->type (c->result) == NODE_TYPE_TYPE);\n  int empty = is_empty (((struct tl_tree_type *)c->result)->type);\n  if (!empty) {\n    printf (\"  eprintf (\\\" %s\\\");\\n\", c->id);\n    printf (\"  if (multiline_output >= 2) { eprintf (\\\"\\\\n\\\"); }\\n\");\n  }\n  \n\n  for (i = 0; i < c->args_num; i++) if (!(c->args[i]->flags & FLAG_OPT_VAR)) {\n    assert (gen_field_print_ds (c->args[i], vars, i + 1, empty) >= 0);\n  }\n  free (vars);\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_type_skip (struct tl_type *t) {\n  printf (\"int skip_type_%s (struct paramed_type *T) {\\n\", t->print_id);\n  printf (\"  if (in_remaining () < 4) { return -1;}\\n\");\n  printf (\"  int magic = fetch_int ();\\n\");\n  printf (\"  switch (magic) {\\n\");\n  int i;\n  for (i = 0; i < t->constructors_num; i++) {\n     printf (\"  case 0x%08x: return skip_constructor_%s (T);\\n\", t->constructors[i]->name, t->constructors[i]->print_id);\n  }\n  printf (\"  default: return -1;\\n\");\n  printf (\"  }\\n\");\n  printf (\"}\\n\");\n  printf (\"int skip_type_bare_%s (struct paramed_type *T) {\\n\", t->print_id);\n  if (t->constructors_num > 1) {\n    printf (\"  int *save_in_ptr = in_ptr;\\n\");\n    for (i = 0; i < t->constructors_num; i++) {\n      printf (\"  if (skip_constructor_%s (T) >= 0) { return 0; }\\n\", t->constructors[i]->print_id);\n      printf (\"  in_ptr = save_in_ptr;\\n\");\n    }\n  } else {\n    for (i = 0; i < t->constructors_num; i++) {\n      printf (\"  if (skip_constructor_%s (T) >= 0) { return 0; }\\n\", t->constructors[i]->print_id);\n    }\n  }\n  printf (\"  return -1;\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_type_fetch (struct tl_type *t) {\n  int empty = is_empty (t);;\n  printf (\"int fetch_type_%s (struct paramed_type *T) {\\n\", t->print_id);\n  printf (\"  if (in_remaining () < 4) { return -1;}\\n\");\n  if (!empty) {\n    printf (\"  if (multiline_output >= 2) { multiline_offset += multiline_offset_size; }\\n\");\n    printf (\"  eprintf (\\\" (\\\");\\n\");\n  }\n  printf (\"  int magic = fetch_int ();\\n\");\n  printf (\"  int res = -1;\\n\");\n  printf (\"  switch (magic) {\\n\");\n  int i;\n  for (i = 0; i < t->constructors_num; i++) {\n     printf (\"  case 0x%08x: res = fetch_constructor_%s (T); break;\\n\", t->constructors[i]->name, t->constructors[i]->print_id);\n  }\n  printf (\"  default: return -1;\\n\");\n  printf (\"  }\\n\");\n  if (!empty) {\n    printf (\"  if (res >= 0) {\\n\");\n    printf (\"    if (multiline_output >= 2) { multiline_offset -= multiline_offset_size; print_offset (); }\\n\");\n    printf (\"    eprintf (\\\" )\\\");\\n\");\n    //printf (\"    if (multiline_output >= 2) { printf (\\\"\\\\n\\\"); }\\n\");\n    printf (\"  }\\n\");\n  }\n  printf (\"  return res;\\n\");\n  printf (\"}\\n\");\n  printf (\"int fetch_type_bare_%s (struct paramed_type *T) {\\n\", t->print_id);\n  if (t->constructors_num > 1) {\n    printf (\"  int *save_in_ptr = in_ptr;\\n\");\n  \n    if (!empty) {\n      printf (\"  if (multiline_output >= 2) { multiline_offset += multiline_offset_size; }\\n\");\n    }\n    for (i = 0; i < t->constructors_num; i++) {\n      printf (\"  if (skip_constructor_%s (T) >= 0) { in_ptr = save_in_ptr; %sassert (!fetch_constructor_%s (T)); %sreturn 0; }\\n\", t->constructors[i]->print_id, empty ? \"\" : \"eprintf (\\\" (\\\"); \", t->constructors[i]->print_id , empty ? \"\" : \"if (multiline_output >= 2) { multiline_offset -= multiline_offset_size; print_offset (); } eprintf (\\\" )\\\");\");\n      printf (\"  in_ptr = save_in_ptr;\\n\");\n    }\n  } else {\n    for (i = 0; i < t->constructors_num; i++) {\n      if (!empty) {\n        printf (\"  if (multiline_output >= 2) { multiline_offset += multiline_offset_size; }\\n\");\n        printf (\"  eprintf (\\\" (\\\");\\n\");\n      }\n      printf (\"  if (fetch_constructor_%s (T) >= 0) { %sreturn 0; }\\n\", t->constructors[i]->print_id, empty ? \"\" : \"if (multiline_output >= 2) { multiline_offset -= multiline_offset_size; print_offset (); } eprintf (\\\" )\\\");\" );\n    }\n  }\n  printf (\"  return -1;\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_type_store (struct tl_type *t) {\n  int empty = is_empty (t);;\n  int k = 0;\n  for (k = 0; k < 2; k++) {\n    printf (\"int store_type_%s%s (struct paramed_type *T) {\\n\", k == 0 ? \"\" : \"bare_\", t->print_id);\n    if (empty) {\n      if (!k) {\n        printf (\"    out_int (0x%08x);\\n\", t->constructors[0]->name);\n      }\n      printf (\"  if (store_constructor_%s (T) < 0) { return -1; }\\n\", t->constructors[0]->print_id);\n      printf (\"  return 0;\\n\");\n      printf (\"}\\n\");\n    } else {\n      printf (\"  expect_token (\\\"(\\\", 1);\\n\");\n      printf (\"  if (cur_token_len < 0) { return -1; }\\n\");\n      printf (\"  if (cur_token_len < 0) { return -1; }\\n\");      \n      int i;\n      for (i = 0; i < t->constructors_num; i++) {\n        printf (\"  if (cur_token_len == %d && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", (int)strlen (t->constructors[i]->id), t->constructors[i]->id);\n        if (!k) {\n          printf (\"    out_int (0x%08x);\\n\", t->constructors[i]->name);\n        }\n        printf (\"    local_next_token ();\\n\");\n        printf (\"    if (store_constructor_%s (T) < 0) { return -1; }\\n\", t->constructors[i]->print_id);\n        printf (\"    expect_token (\\\")\\\", 1);\\n\");\n        printf (\"    return 0;\\n\");\n        printf (\"  }\\n\");\n      }\n      /*if (t->constructors_num == 1) {\n        printf (\"  if (!force) {\\n\");\n        if (!k) {\n          printf (\"    out_int (0x%08x);\\n\", t->constructors[0]->name);\n        }\n        printf (\"    if (store_constructor_%s (T) < 0) { return -1; }\\n\", t->constructors[0]->print_id);\n        printf (\"    expect_token (\\\")\\\", 1);\\n\");\n        printf (\"    return 0;\\n\");\n        printf (\"  }\\n\");\n      }*/\n      printf (\"  return -1;\\n\");\n      printf (\"}\\n\");\n    }\n  }\n}\n\nvoid gen_type_autocomplete (struct tl_type *t) {\n  int empty = is_empty (t);;\n  int k = 0;\n  for (k = 0; k < 2; k++) {\n    printf (\"int autocomplete_type_%s%s (struct paramed_type *T) {\\n\", k == 0 ? \"\" : \"bare_\", t->print_id);\n    if (empty) {\n      printf (\"  if (autocomplete_constructor_%s (T) < 0) { return -1; }\\n\", t->constructors[0]->print_id);\n      printf (\"  return 0;\\n\");\n      printf (\"}\\n\");\n    } else {\n      printf (\"  expect_token_autocomplete (\\\"(\\\", 1);\\n\");\n      printf (\"  if (cur_token_len == -3) { set_autocomplete_type (do_autocomplete_type_%s); return -1; }\\n\", t->print_id);\n      printf (\"  if (cur_token_len < 0) { return -1; }\\n\");      \n      int i;\n      for (i = 0; i < t->constructors_num; i++) {\n        printf (\"  if (cur_token_len == %d && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", (int)strlen (t->constructors[i]->id), t->constructors[i]->id);\n        printf (\"    local_next_token ();\\n\");\n        printf (\"    if (autocomplete_constructor_%s (T) < 0) { return -1; }\\n\", t->constructors[i]->print_id);\n        printf (\"    expect_token_autocomplete (\\\")\\\", 1);\\n\");\n        printf (\"    return 0;\\n\");\n        printf (\"  }\\n\");\n      }\n      /*if (t->constructors_num == 1) {\n        printf (\"  if (!force) {\\n\");\n        printf (\"    if (autocomplete_constructor_%s (T) < 0) { return -1; }\\n\", t->constructors[0]->print_id);\n        printf (\"    expect_token_autocomplete (\\\")\\\", 1);\\n\");\n        printf (\"    return 0;\\n\");\n        printf (\"  }\\n\");\n      }*/\n      printf (\"  return -1;\\n\");\n      printf (\"}\\n\");\n    }\n  }\n}\n\nvoid gen_type_fetch_ds (struct tl_type *t) {\n  //int empty = is_empty (t);;  \n  print_c_type_name (t->constructors[0]->result, \"\", 0);\n\n  printf (\"fetch_ds_type_%s (struct paramed_type *T) {\\n\", t->print_id);\n  printf (\"  assert (in_remaining () >= 4);\\n\");\n  printf (\"  int magic = fetch_int ();\\n\");\n  printf (\"  switch (magic) {\\n\");\n  int i;\n  for (i = 0; i < t->constructors_num; i++) {\n     printf (\"  case 0x%08x: return fetch_ds_constructor_%s (T); break;\\n\", t->constructors[i]->name, t->constructors[i]->print_id);\n  }\n  printf (\"  default: assert (0); return NULL;\\n\");\n  printf (\"  }\\n\");\n  printf (\"}\\n\");\n  print_c_type_name (t->constructors[0]->result, \"\", 0);\n  printf (\"fetch_ds_type_bare_%s (struct paramed_type *T) {\\n\", t->print_id);\n  if (t->constructors_num > 1) {\n    printf (\"  int *save_in_ptr = in_ptr;\\n\");\n  \n    for (i = 0; i < t->constructors_num; i++) {\n      printf (\"  if (skip_constructor_%s (T) >= 0) { in_ptr = save_in_ptr; return fetch_ds_constructor_%s (T); }\\n\", t->constructors[i]->print_id, t->constructors[i]->print_id);\n    }\n  } else {\n    printf (\"  return fetch_ds_constructor_%s (T);\\n\", t->constructors[0]->print_id);\n  }\n  printf (\"  assert (0);\\n\");\n  printf (\"  return NULL;\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_type_free_ds (struct tl_type *t) {\n  printf (\"void free_ds_type_%s (\", t->print_id);\n  print_c_type_name (t->constructors[0]->result, \"\", 0);\n  printf (\"D, struct paramed_type *T) {\\n\");\n  \n  if (t->constructors_num > 1) {\n    printf (\"  switch (D->magic) {\\n\");\n    int i;\n    for (i = 0; i < t->constructors_num; i++) {\n      printf (\"  case 0x%08x: free_ds_constructor_%s (D, T); return; \\n\", t->constructors[i]->name, t->constructors[i]->print_id);\n    }\n    printf (\"  default: assert (0);\\n\");\n    printf (\"  }\\n\");\n  } else {\n    printf (\"  free_ds_constructor_%s (D, T); return; \\n\", t->constructors[0]->print_id);\n  }\n  printf (\"}\\n\");\n}\n\nvoid gen_type_store_ds (struct tl_type *t) {\n  int k;\n  for (k = 0; k < 2; k++) {\n    if (k == 0) {\n      printf (\"void store_ds_type_%s (\", t->print_id);\n    } else {\n      printf (\"void store_ds_type_bare_%s (\", t->print_id);\n    }\n    print_c_type_name (t->constructors[0]->result, \"\", 0);\n    printf (\"D, struct paramed_type *T) {\\n\");\n\n    if (t->constructors_num > 1) {\n      if (k == 0) {\n        printf (\"  out_int (D->magic);\\n\");\n      }\n      printf (\"  switch (D->magic) {\\n\");\n      int i;\n      for (i = 0; i < t->constructors_num; i++) {\n        printf (\"  case 0x%08x: store_ds_constructor_%s (D, T); return; \\n\", t->constructors[i]->name, t->constructors[i]->print_id);\n      }\n      printf (\"  default: assert (0);\\n\");\n      printf (\"  }\\n\");\n    } else {\n      if (k == 0) {\n        printf (\"  out_int (0x%08x);\\n\", t->constructors[0]->name);\n      }\n      printf (\"  store_ds_constructor_%s (D, T); return; \\n\", t->constructors[0]->print_id);\n    }\n    printf (\"}\\n\");\n  }\n}\n\nvoid gen_type_print_ds (struct tl_type *t) {\n  int empty = is_empty (t);;\n  int k;\n  for (k = 0; k < 2; k++) {\n    printf (\"int print_ds_type_%s%s (\", k ? \"bare_\" : \"\", t->print_id);\n    print_c_type_name (t->constructors[0]->result, \"\", 0);\n    printf (\"DS, struct paramed_type *T) {\\n\");\n    printf (\"  int res;\\n\");\n    if (!empty) {\n      printf (\"  if (multiline_output >= 2) { multiline_offset += multiline_offset_size; }\\n\");\n      printf (\"  eprintf (\\\" (\\\");\\n\");\n    }\n    if (t->constructors_num > 1) {\n      printf (\"  switch (DS->magic) {\\n\");\n      int i;\n      for (i = 0; i < t->constructors_num; i++) {\n         printf (\"  case 0x%08x: res = print_ds_constructor_%s (DS, T); break;\\n\", t->constructors[i]->name, t->constructors[i]->print_id);\n      }\n      printf (\"  default: return -1;\\n\");\n      printf (\"  }\\n\");\n    } else {\n      printf (\"  res = print_ds_constructor_%s (DS, T);\\n\", t->constructors[0]->print_id);\n    }\n    if (!empty) {\n      printf (\"  if (res >= 0) {\\n\");\n      printf (\"    if (multiline_output >= 2) { multiline_offset -= multiline_offset_size; print_offset (); }\\n\");\n      printf (\"    eprintf (\\\" )\\\");\\n\");\n      //printf (\"    if (multiline_output >= 2) { printf (\\\"\\\\n\\\"); }\\n\");\n      printf (\"  }\\n\");\n    }\n    printf (\"  return res;\\n\");\n    printf (\"}\\n\");\n  }\n}\n\nvoid gen_function_store (struct tl_combinator *f) {\n  printf (\"struct paramed_type *store_function_%s (void) {\\n\", f->print_id);\n  int i;\n  \n  int *vars = malloc0 (f->var_num * 4);;\n  assert (f->var_num <= 10);\n\n  for (i = 0; i < f->args_num; i++) if (!(f->args[i]->flags & FLAG_OPT_VAR)) {\n    if (f->args[i]->flags & FLAG_EXCL) {\n      assert (gen_field_store_excl (f->args[i], vars, i + 1, 1) >= 0);\n    } else {\n      assert (gen_field_store (f->args[i], vars, i + 1, 1, 0) >= 0);\n    }\n  }\n\n\n  printf (\"  struct paramed_type *R = \\n\");\n  assert (gen_create (f->result, vars, 2) >= 0);\n  printf (\";\\n\");\n\n  free (vars);\n  printf (\"  return paramed_type_dup (R);\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_function_autocomplete (struct tl_combinator *f) {\n  printf (\"struct paramed_type *autocomplete_function_%s (void) {\\n\", f->print_id);\n  int i;\n  \n  int *vars = malloc0 (f->var_num * 4);;\n  assert (f->var_num <= 10);\n\n  for (i = 0; i < f->args_num; i++) if (!(f->args[i]->flags & FLAG_OPT_VAR)) {\n    if (f->args[i]->flags & FLAG_EXCL) {\n      assert (gen_field_autocomplete_excl (f->args[i], vars, i + 1, 1) >= 0);\n    } else {\n      assert (gen_field_autocomplete (f->args[i], vars, i + 1, 1, 0) >= 0);\n    }\n  }\n\n  printf (\"  struct paramed_type *R = \\n\");\n  assert (gen_create (f->result, vars, 2) >= 0);\n  printf (\";\\n\");\n\n  free (vars);\n  printf (\"  return paramed_type_dup (R);\\n\");\n  printf (\"}\\n\"); \n}\n\nvoid gen_type_do_autocomplete (struct tl_type *t) {\n  printf (\"int do_autocomplete_type_%s (const char *text, int text_len, int index, char **R) {\\n\", t->print_id);\n  printf (\"  index ++;\\n\");  \n  int i;\n  for (i = 0; i < t->constructors_num; i++) {\n    printf (\"  if (index == %d) { if (!strncmp (text, \\\"%s\\\", text_len)) { *R = tstrdup (\\\"%s\\\"); return index; } else { index ++; }}\\n\", i, t->constructors[i]->id, t->constructors[i]->id);\n  }\n  printf (\"  *R = 0;\\n\");\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\");\n}\n\nstruct tl_tree *read_num_var (int *var_num) {\n  struct tl_tree_var_num *T = malloc0 (sizeof (*T));\n  T->self.flags = 0;\n  T->self.methods = &tl_pvar_num_methods;; \n  T->dif = get_int ();\n  T->var_num = get_int ();\n  \n  if (T->var_num >= *var_num) {\n    *var_num = T->var_num + 1;\n  }\n  assert (!(T->self.flags & FLAG_NOVAR));\n  return (void *)T;\n}\n\nstruct tl_tree *read_type_var (int *var_num) {\n  struct tl_tree_var_type *T = malloc0 (sizeof (*T));\n  T->self.methods = &tl_pvar_type_methods;\n  T->var_num = get_int ();\n  T->self.flags = get_int ();\n  if (T->var_num >= *var_num) {  \n    *var_num = T->var_num + 1;\n  }\n  assert (!(T->self.flags & (FLAG_NOVAR | FLAG_BARE)));\n  return (void *)T;\n}\n\nstruct tl_tree *read_array (int *var_num) {\n  struct tl_tree_array *T = malloc0 (sizeof (*T));\n  T->self.methods = &tl_parray_methods;\n  T->self.flags = 0;\n  T->multiplicity = read_nat_expr (var_num);\n  assert (T->multiplicity);\n\n  T->args_num = get_int ();\n  assert (T->args_num >= 0 && T->args_num <= 1000);\n  T->args = malloc0 (sizeof (void *) * T->args_num);\n\n  assert (read_args_list (T->args, T->args_num, var_num) >= 0);\n  T->self.flags |= FLAG_NOVAR;\n  int i;\n  for (i = 0; i < T->args_num; i++) {\n    if (!(T->args[i]->flags & FLAG_NOVAR)) {\n      T->self.flags &= ~FLAG_NOVAR;\n    }\n  }\n  return (void *)T;\n}\n\nstruct tl_tree *read_type (int *var_num) {\n  struct tl_tree_type *T = malloc0 (sizeof (*T));\n  T->self.methods = &tl_ptype_methods;\n \n  T->type = tl_type_get_by_name (get_int ());\n  assert (T->type);\n  T->self.flags = get_int ();\n  T->children_num = get_int ();\n  assert (T->type->arity == T->children_num);\n  T->children = malloc0 (sizeof (void *) * T->children_num);\n  int i;\n  T->self.flags |= FLAG_NOVAR;\n  for (i = 0; i < T->children_num; i++) {\n    int t = get_int ();\n    if (t == (int)TLS_EXPR_NAT) {\n      assert ((T->type->params_types & (1 << i)));\n      T->children[i] = read_nat_expr (var_num);\n    } else if (t == (int)TLS_EXPR_TYPE) {\n      assert (!(T->type->params_types & (1 << i)));\n      T->children[i] = read_type_expr (var_num);\n    } else {\n      assert (0);\n    }\n    if (!TL_IS_NAT_VAR (T->children[i]) && !(T->children[i]->flags & FLAG_NOVAR)) {\n      T->self.flags &= ~FLAG_NOVAR;\n    }\n  }\n  return (void *)T;\n}\n\nstruct tl_tree *read_tree (int *var_num) {\n  int x = get_int ();\n  if (verbosity >= 2) {\n    fprintf (stderr, \"read_tree: constructor = 0x%08x\\n\", x);\n  }\n  switch (x) {\n  case TLS_TREE_NAT_CONST:\n    return read_num_const (var_num);\n  case TLS_TREE_NAT_VAR:\n    return read_num_var (var_num);\n  case TLS_TREE_TYPE_VAR:\n    return read_type_var (var_num);\n  case TLS_TREE_TYPE:\n    return read_type (var_num);\n  case TLS_TREE_ARRAY:\n    return read_array (var_num);\n  default:\n    if (verbosity) {\n      fprintf (stderr, \"x = %d\\n\", x);\n    }\n    assert (0);\n    return 0;\n  }    \n}\n\nstruct tl_tree *read_type_expr (int *var_num) {\n  int x = get_int ();\n  if (verbosity >= 2) {\n    fprintf (stderr, \"read_type_expr: constructor = 0x%08x\\n\", x);\n  }\n  switch (x) {\n  case TLS_TYPE_VAR:\n    return read_type_var (var_num);\n  case TLS_TYPE_EXPR:\n    return read_type (var_num);\n  case TLS_ARRAY:\n    return read_array (var_num);\n  default:\n    if (verbosity) {\n      fprintf (stderr, \"x = %d\\n\", x);\n    }\n    assert (0);\n    return 0;\n  }     \n}\n\nstruct tl_tree *read_nat_expr (int *var_num) {\n  int x = get_int ();\n  if (verbosity >= 2) {\n    fprintf (stderr, \"read_nat_expr: constructor = 0x%08x\\n\", x);\n  }\n  switch (x) {\n  case TLS_NAT_CONST:\n    return read_num_const (var_num);\n  case TLS_NAT_VAR:\n    return read_num_var (var_num);\n  default:\n    if (verbosity) {\n      fprintf (stderr, \"x = %d\\n\", x);\n    }\n    assert (0);\n    return 0;\n  }     \n}\n\nstruct tl_tree *read_expr (int *var_num) {\n  int x = get_int ();\n  if (verbosity >= 2) {\n    fprintf (stderr, \"read_nat_expr: constructor = 0x%08x\\n\", x);\n  }\n  switch (x) {\n  case TLS_EXPR_NAT:\n    return read_nat_expr (var_num);\n  case TLS_EXPR_TYPE:\n    return read_type_expr (var_num);\n  default:\n    if (verbosity) {\n      fprintf (stderr, \"x = %d\\n\", x);\n    }\n    assert (0);\n    return 0;\n  }\n}\n\nint read_args_list (struct arg **args, int args_num, int *var_num) {\n  int i;\n  for (i = 0; i < args_num; i++) {\n    args[i] = malloc0 (sizeof (struct arg));\n    args[i]->exist_var_num = -1;\n    args[i]->exist_var_bit = 0;\n    assert (get_int () == TLS_ARG_V2);\n    args[i]->id = get_string ();\n    args[i]->flags = get_int ();\n\n    if (args[i]->flags & 2) {\n      args[i]->flags &= ~2;\n      args[i]->flags |= (1 << 20);\n    }\n    if (args[i]->flags & 4) {\n      args[i]->flags &= ~4;\n      args[i]->var_num = get_int ();\n    } else {\n      args[i]->var_num = -1;\n    }\n    \n    int x = args[i]->flags & 6;\n    args[i]->flags &= ~6;\n    if (x & 2) { args[i]->flags |= 4; }\n    if (x & 4) { args[i]->flags |= 2; }\n    \n    if (args[i]->var_num >= *var_num) {\n      *var_num = args[i]->var_num + 1;\n    }\n    if (args[i]->flags & FLAG_OPT_FIELD) {\n      args[i]->exist_var_num = get_int ();\n      args[i]->exist_var_bit = get_int ();\n    }\n    args[i]->type = read_type_expr (var_num);\n    assert (args[i]->type);\n    \n    if (args[i]->var_num < 0 && args[i]->exist_var_num < 0 && (TL_IS_NAT_VAR(args[i]->type) || (args[i]->type->flags & FLAG_NOVAR))) {\n      args[i]->flags |= FLAG_NOVAR;\n    }\n  }\n  return 1;\n}\n\nint read_combinator_args_list (struct tl_combinator *c) {\n  c->args_num = get_int ();\n  if (verbosity >= 2) {\n    fprintf (stderr, \"c->id = %s, c->args_num = %d\\n\", c->id, c->args_num);\n  }\n  assert (c->args_num >= 0 && c->args_num <= 1000);\n  c->args = malloc0 (sizeof (void *) * c->args_num);\n  c->var_num = 0;\n  return read_args_list (c->args, c->args_num, &c->var_num);\n}\n\nint read_combinator_right (struct tl_combinator *c) {\n  assert (get_int () == TLS_COMBINATOR_RIGHT_V2);\n  c->result = read_type_expr (&c->var_num);\n  assert (c->result);\n  return 1;\n}\n\nint read_combinator_left (struct tl_combinator *c) {\n  int x = get_int ();\n\n  if (x == (int)TLS_COMBINATOR_LEFT_BUILTIN) {\n    c->args_num = 0;\n    c->var_num = 0;\n    c->args = 0;\n    return 1;\n  } else if (x == TLS_COMBINATOR_LEFT) {\n    return read_combinator_args_list (c);\n  } else {\n    assert (0);\n    return -1;\n  }\n}\n\nchar *gen_print_id (const char *id) {\n  static char s[1000];\n  char *ptr = s;\n  int first = 1;\n  while (*id) {\n    if (*id == '.') { \n      *(ptr ++) = '_';\n    } else if (*id >= 'A' && *id <= 'Z') {\n      if (!first && *(ptr - 1) != '_') {\n        *(ptr ++) = '_';\n      }\n      *(ptr ++) = *id - 'A' + 'a';\n    } else {\n      *(ptr ++) = *id;\n    }\n    id ++;\n    first = 0;\n  }\n  *ptr = 0;\n  return s;\n}\n\nstruct tl_combinator *read_combinators (int v) {\n  struct tl_combinator *c = malloc0 (sizeof (*c));\n  c->name = get_int ();\n  c->id = get_string ();\n  c->print_id = strdup (gen_print_id (c->id));\n  assert (c->print_id);\n  //char *s = c->id;\n  //while (*s) { if (*s == '.') { *s = '_'; } ; s ++;}\n  int x = get_int ();\n  struct tl_type *t = tl_type_get_by_name (x);\n  assert (t || (!x && v == 3));\n\n  if (v == 2) {\n    assert (t->extra < t->constructors_num);\n    t->constructors[t->extra ++] = c;\n    c->is_fun = 0;\n  } else {\n    assert (v == 3);\n    tl_function_insert_by_name (c);\n    c->is_fun = 1;\n  }\n  assert (read_combinator_left (c) >= 0);\n  assert (read_combinator_right (c) >= 0);\n  return c;\n}\n\nstruct tl_type *read_types (void) {\n  struct tl_type *t = malloc0 (sizeof (*t));\n  t->name = get_int ();\n  t->id = get_string ();\n  t->print_id = strdup (gen_print_id (t->id));\n  assert (t->print_id);\n  \n  t->constructors_num = get_int ();\n  assert (t->constructors_num >= 0 && t->constructors_num <= 1000);\n\n  t->constructors = malloc0 (sizeof (void *) * t->constructors_num);\n  t->flags = get_int ();\n  t->arity = get_int ();\n  t->params_types = get_long (); // params_types\n  t->extra = 0;\n  tl_type_insert_by_name (t);\n  return t;\n}\n\n\n\nchar *gen_what[1000];\nint gen_what_cnt;\n\n\nvoid gen_skip_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"int skip_constructor_%s (struct paramed_type *T);\\n\", tps[i]->constructors[j]->print_id);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"int skip_type_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n    printf (\"int skip_type_bare_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n  }\n  printf (\"int skip_type_any (struct paramed_type *T);\\n\");\n}\n\nvoid gen_skip_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  printf (\"#include \\\"auto/auto-skip.h\\\"\\n\");\n  printf (\"#include \\\"auto-static-skip.c\\\"\\n\");\n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_skip (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_skip (tps[i]);\n  }\n  printf (\"int skip_type_any (struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: return skip_type_%s (T);\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: return skip_type_bare_%s (T);\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return -1; }\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_fetch_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  printf (\"#include <stdio.h>\\n\");\n\n  printf (\"struct tgl_state;\\n\");\n  printf (\"char *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"int fetch_constructor_%s (struct paramed_type *T);\\n\", tps[i]->constructors[j]->print_id);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"int fetch_type_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n    printf (\"int fetch_type_bare_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n  }\n  printf (\"int fetch_type_any (struct paramed_type *T);\\n\");\n}\n\nvoid gen_fetch_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  printf (\"#include \\\"auto/auto-fetch.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-skip.h\\\"\\n\");\n  printf (\"#include \\\"auto-static-fetch.c\\\"\\n\");\n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_fetch (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_fetch (tps[i]);\n  }\n  printf (\"int fetch_type_any (struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: return fetch_type_%s (T);\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: return fetch_type_bare_%s (T);\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return -1; }\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_store_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n\n  printf (\"struct paramed_type *tglf_extf_store (struct tgl_state *TLS, const char *data, int data_len);\\n\");\n  printf (\"int tglf_store_type (struct tgl_state *TLS, const char *work, int work_len, struct paramed_type *P);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"int store_constructor_%s (struct paramed_type *T);\\n\", tps[i]->constructors[j]->print_id);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"int store_type_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n    printf (\"int store_type_bare_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n  }\n  for (i = 0; i < fn; i++) {\n    printf (\"struct paramed_type *store_function_%s (void);\\n\", fns[i]->print_id);\n  }\n  printf (\"int store_type_any (struct paramed_type *T);\\n\");\n  printf (\"struct paramed_type *store_function_any (void);\\n\");\n}\n\nvoid gen_store_source (void ) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  \n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-store.h\\\"\\n\");\n  printf (\"#include \\\"auto-static-store.c\\\"\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_store (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_store (tps[i]);\n  }\n  for (i = 0; i < fn; i++) {\n    gen_function_store (fns[i]);\n  }\n  printf (\"int store_type_any (struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: return store_type_%s (T);\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: return store_type_bare_%s (T);\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return -1; }\\n\");\n  printf (\"}\\n\");\n  printf (\"struct paramed_type *store_function_any (void) {\\n\");\n  printf (\"  if (cur_token_len != 1 || *cur_token != '(') { return 0; }\\n\");\n  printf (\"  local_next_token ();\\n\");\n  printf (\"  if (cur_token_len == 1 || *cur_token == '.') { \\n\");\n  printf (\"    local_next_token ();\\n\");\n  printf (\"    if (cur_token_len != 1 || *cur_token != '=') { return 0; }\\n\");\n  printf (\"    local_next_token ();\\n\");\n  printf (\"  };\\n\");\n  printf (\"  if (cur_token_len < 0) { return 0; }\\n\");\n  for (i = 0; i < fn; i++) {\n    printf (\"  if (cur_token_len == %d && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", (int)strlen (fns[i]->id), fns[i]->id);\n    printf (\"    out_int (0x%08x);\\n\", fns[i]->name);\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    struct paramed_type *P = store_function_%s ();\\n\", fns[i]->print_id);\n    printf (\"    if (!P) { return 0; }\\n\");\n    printf (\"    if (cur_token_len != 1 || *cur_token != ')') { return 0; }\\n\");\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    return P;\\n\");\n    printf (\"  }\\n\");\n  }\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_autocomplete_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  printf (\"int tglf_extf_autocomplete (struct tgl_state *TLS, const char *text, int text_len, int index, char **R, char *data, int data_len);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"int autocomplete_constructor_%s (struct paramed_type *T);\\n\", tps[i]->constructors[j]->print_id);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"int autocomplete_type_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n    printf (\"int do_autocomplete_type_%s (const char *text, int len, int index, char **R);\\n\", tps[i]->print_id);\n    printf (\"int autocomplete_type_bare_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n  }\n  printf (\"int autocomplete_type_any (struct paramed_type *T);\\n\");\n  printf (\"struct paramed_type *autocomplete_function_any (void);\\n\");\n}\n\nvoid gen_autocomplete_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  \n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-autocomplete.h\\\"\\n\");\n  printf (\"#include \\\"auto-static-autocomplete.c\\\"\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_autocomplete (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_autocomplete (tps[i]);\n    gen_type_do_autocomplete (tps[i]);\n  }\n  for (i = 0; i < fn; i++) {\n    gen_function_autocomplete (fns[i]);\n  }\n  printf (\"int autocomplete_type_any (struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: return autocomplete_type_%s (T);\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: return autocomplete_type_bare_%s (T);\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return -1; }\\n\");\n  printf (\"}\\n\");\n  printf (\"int do_autocomplete_function (const char *text, int text_len, int index, char **R) {\\n\");\n  printf (\"  index ++;\\n\");  \n  for (i = 0; i < fn; i++) {\n    printf (\"  if (index == %d) { if (!strncmp (text, \\\"%s\\\", text_len)) { *R = tstrdup (\\\"%s\\\"); return index; } else { index ++; }}\\n\", i, fns[i]->id, fns[i]->id);\n  }\n  printf (\"  *R = 0;\\n\");\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\");\n  printf (\"struct paramed_type *autocomplete_function_any (void) {\\n\");\n  printf (\"  expect_token_ptr_autocomplete (\\\"(\\\", 1);\\n\");\n  printf (\"  if (cur_token_len == -3) { set_autocomplete_type (do_autocomplete_function); }\\n\");\n  printf (\"  if (cur_token_len < 0) { return 0; }\\n\");\n  for (i = 0; i < fn; i++) {\n    printf (\"  if (cur_token_len == %d && !memcmp (cur_token, \\\"%s\\\", cur_token_len)) {\\n\", (int)strlen (fns[i]->id), fns[i]->id);\n    printf (\"    local_next_token ();\\n\");\n    printf (\"    struct paramed_type *P = autocomplete_function_%s ();\\n\", fns[i]->print_id);\n    printf (\"    if (!P) { return 0; }\\n\");\n    printf (\"    expect_token_ptr_autocomplete (\\\")\\\", 1);\\n\");\n    printf (\"    return P;\\n\");\n    printf (\"  }\\n\");\n  }\n  printf (\"  return 0;\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_types_header (void) {\n  printf (\"#ifndef __AUTO_TYPES_H__\\n\");\n  printf (\"#define __AUTO_TYPES_H__\\n\");\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  int i;\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"extern struct tl_type_descr tl_type_%s;\\n\", tps[i]->print_id);\n    printf (\"extern struct tl_type_descr tl_type_bare_%s;\\n\", tps[i]->print_id);\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"struct tl_ds_%s {\\n\", tps[i]->print_id);\n    if (!strcmp (tps[i]->id, \"String\") || !strcmp (tps[i]->id, \"Bytes\")) {\n      printf (\"  int len;\\n\");\n      printf (\"  char *data;\\n\");\n      printf (\"};\\n\");\n      continue;\n    }\n    int j;\n    if (tps[i]->constructors_num > 1) {\n      printf (\"  unsigned magic;\\n\");\n    }\n    for (j = 0; j < tps[i]->constructors_num; j++) {\n      struct tl_combinator *c = tps[i]->constructors[j];\n      int k;\n      for (k = 0; k < c->args_num; k++) {\n        if ((c->args[k]->flags & FLAG_OPT_VAR)) { continue; }\n        if (c->args[k]->id && strlen (c->args[k]->id) && j > 0) {\n          int l;\n          int ok = 1;\n          for (l = 0; l < j && ok; l++) {\n            int m;\n            struct tl_combinator *d = tps[i]->constructors[l];\n            for (m = 0; m < d->args_num && ok; m++) {\n              if (d->args[m]->id && !strcmp (d->args[m]->id, c->args[k]->id)) {\n                ok = 0;\n              }\n            }\n          }\n          if (!ok) { continue; }\n        }\n    \n        printf (\"  \");\n        print_c_type_name (c->args[k]->type, \"  \", 1);\n\n        if (!c->args[k]->id || !strlen (c->args[k]->id)) {          \n          assert (!j);\n          \n          printf (\"f%d;\\n\", k);\n        } else {\n          printf (\"%s;\\n\", c->args[k]->id);\n        }\n      }\n    }\n    printf (\"};\\n\");\n  }\n  printf (\"#endif\\n\");\n}\n\nvoid gen_types_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  int i;\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"struct tl_type_descr tl_type_%s = {\\n\", tps[i]->print_id);\n    printf (\"  .name = 0x%08x,\\n\", tps[i]->name);\n    printf (\"  .id = \\\"%s\\\"\\n,\", tps[i]->id);\n    printf (\"  .params_num = %d,\\n\", tps[i]->arity);\n    printf (\"  .params_types = %\" INT64_PRINTF_MODIFIER \"d\\n\", tps[i]->params_types);\n    printf (\"};\\n\");\n    printf (\"struct tl_type_descr tl_type_bare_%s = {\\n\", tps[i]->print_id);\n    printf (\"  .name = 0x%08x,\\n\", ~tps[i]->name);\n    printf (\"  .id = \\\"Bare_%s\\\",\\n\", tps[i]->id);\n    printf (\"  .params_num = %d,\\n\", tps[i]->arity);\n    printf (\"  .params_types = %\" INT64_PRINTF_MODIFIER \"d\\n\", tps[i]->params_types);\n    printf (\"};\\n\");\n  }\n}\n\nvoid gen_fetch_ds_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  printf (\"#include \\\"auto/auto-fetch-ds.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-skip.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-types.h\\\"\\n\");\n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_fetch_ds (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_fetch_ds (tps[i]);\n  }\n  printf (\"void *fetch_ds_type_any (struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: return fetch_ds_type_%s (T);\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: return fetch_ds_type_bare_%s (T);\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return NULL; }\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_fetch_ds_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  printf (\"#include <stdio.h>\\n\");\n\n  printf (\"struct tgl_state;\\n\");\n  //printf (\"char *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      print_c_type_name (tps[i]->constructors[j]->result, \"\", 0);\n      printf (\"fetch_ds_constructor_%s (struct paramed_type *T);\\n\", tps[i]->constructors[j]->print_id);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"fetch_ds_type_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"fetch_ds_type_bare_%s (struct paramed_type *T);\\n\", tps[i]->print_id);\n  }\n  printf (\"void *fetch_ds_type_any (struct paramed_type *T);\\n\");\n}\n\nvoid gen_free_ds_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  printf (\"#include \\\"auto/auto-free-ds.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-skip.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-types.h\\\"\\n\");\n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_free_ds (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_free_ds (tps[i]);\n  }\n  printf (\"void free_ds_type_any (void *D, struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: free_ds_type_%s (D, T); return;\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: free_ds_type_%s (D, T); return;\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return; }\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_free_ds_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-types.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  printf (\"#include <stdio.h>\\n\");\n\n  printf (\"struct tgl_state;\\n\");\n  //printf (\"char *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"void free_ds_constructor_%s (\", tps[i]->constructors[j]->print_id); \n      print_c_type_name (tps[i]->constructors[j]->result, \"\", 0);\n      printf (\"D, struct paramed_type *T);\\n\");\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"void free_ds_type_%s (\", tps[i]->print_id);\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"D, struct paramed_type *T);\\n\");\n  }\n  printf (\"void free_ds_type_any (void *D, struct paramed_type *T);\\n\");\n}\n\nvoid gen_store_ds_source (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n\n  printf (\"#include \\\"auto/auto-store-ds.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-skip.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-types.h\\\"\\n\");\n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_store_ds (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_store_ds (tps[i]);\n  }\n  printf (\"void store_ds_type_any (void *D, struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: store_ds_type_%s (D, T); return;\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: store_ds_type_bare_%s (D, T); return;\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return; }\\n\");\n  printf (\"}\\n\");\n}\n\nvoid gen_store_ds_header (void) {\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-types.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  printf (\"#include <stdio.h>\\n\");\n\n  printf (\"struct tgl_state;\\n\");\n  //printf (\"char *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"void store_ds_constructor_%s (\", tps[i]->constructors[j]->print_id); \n      print_c_type_name (tps[i]->constructors[j]->result, \"\", 0);\n      printf (\"D, struct paramed_type *T);\\n\");\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"void store_ds_type_%s (\", tps[i]->print_id);\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"D, struct paramed_type *T);\\n\");\n    printf (\"void store_ds_type_bare_%s (\", tps[i]->print_id);\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"D, struct paramed_type *T);\\n\");\n  }\n  printf (\"void store_ds_type_any (void *D, struct paramed_type *T);\\n\");\n}\n\nvoid gen_print_ds_header (void) {\n  printf (\"#include \\\"config.h\\\"\\n\");\n  printf (\"#ifndef DISABLE_EXTF\\n\");\n  printf (\"\\n\");\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include \\\"auto-types.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  printf (\"#include <stdio.h>\\n\");\n\n  printf (\"struct tgl_state;\\n\");\n  printf (\"char *tglf_extf_print_ds (struct tgl_state *TLS, void *DS, struct paramed_type *T);\\n\");\n\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      printf (\"int print_ds_constructor_%s (\", tps[i]->constructors[j]->print_id);\n      print_c_type_name (tps[i]->constructors[j]->result, \"\", 0);\n      printf (\"DS, struct paramed_type *T);\\n\");\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    printf (\"int print_ds_type_%s (\", tps[i]->print_id);\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"DS, struct paramed_type *T);\\n\");\n    printf (\"int print_ds_type_bare_%s (\", tps[i]->print_id);\n    print_c_type_name (tps[i]->constructors[0]->result, \"\", 0);\n    printf (\"DS, struct paramed_type *T);\\n\");\n  }\n  printf (\"int print_ds_type_any (void *DS, struct paramed_type *T);\\n\");\n  printf (\"#endif\\n\");\n}\n\nvoid gen_print_ds_source (void) {\n  printf (\"#include \\\"config.h\\\"\\n\");\n  printf (\"#ifndef DISABLE_EXTF\\n\");\n  printf (\"\\n\");\n  printf (\"#include \\\"auto.h\\\"\\n\");\n  printf (\"#include <assert.h>\\n\");\n  printf (\"\\n\");\n  printf (\"#include \\\"auto/auto-print-ds.h\\\"\\n\");\n  printf (\"#include \\\"auto/auto-skip.h\\\"\\n\");\n  printf (\"#include \\\"auto-static-print-ds.c\\\"\\n\");\n  printf (\"#include \\\"mtproto-common.h\\\"\\n\");\n  int i, j;\n  for (i = 0; i < tn; i++) {\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      gen_constructor_print_ds (tps[i]->constructors[j]);\n    }\n  }\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    gen_type_print_ds (tps[i]);\n  }\n  printf (\"int print_ds_type_any (void *DS, struct paramed_type *T) {\\n\");\n  printf (\"  switch (T->type->name) {\\n\");\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\") && tps[i]->name) {\n    printf (\"  case 0x%08x: return print_ds_type_%s (DS, T);\\n\", tps[i]->name, tps[i]->print_id);\n    printf (\"  case 0x%08x: return print_ds_type_bare_%s (DS, T);\\n\", ~tps[i]->name, tps[i]->print_id);\n  }\n  printf (\"  default: return -1; }\\n\");\n  printf (\"}\\n\");\n  printf (\"#endif\\n\");\n}\n\nint parse_tlo_file (void) {\n  buf_end = buf_ptr + (buf_size / 4);\n  assert (get_int () == TLS_SCHEMA_V2);\n\n  get_int (); // version\n  get_int (); // date\n  \n  tn = 0;\n  fn = 0;\n  cn = 0;\n  int i;\n\n  tn = get_int ();\n  assert (tn >= 0 && tn < 10000);\n  tps = malloc0 (sizeof (void *) * tn);\n  \n  if (verbosity >= 2) {\n    fprintf (stderr, \"Found %d types\\n\", tn);\n  }\n\n  for (i = 0; i < tn; i++) {\n    assert (get_int () == TLS_TYPE);\n    tps[i] = read_types ();\n    assert (tps[i]);\n  }\n\n  cn = get_int ();  \n  assert (cn >= 0);\n\n  if (verbosity >= 2) {\n    fprintf (stderr, \"Found %d constructors\\n\", cn);\n  }\n\n  for (i = 0; i < cn; i++) {\n    assert (get_int () == TLS_COMBINATOR);\n    assert (read_combinators (2));\n  }\n  \n  fn = get_int ();\n  assert (fn >= 0 && fn < 10000);\n  \n  fns = malloc0 (sizeof (void *) * fn);\n  \n  if (verbosity >= 2) {\n    fprintf (stderr, \"Found %d functions\\n\", fn);\n  }\n\n  for (i = 0; i < fn; i++) {\n    assert (get_int () == TLS_COMBINATOR);\n    fns[i] = read_combinators (3);\n    assert (fns[i]);\n  }\n\n  assert (buf_ptr == buf_end);\n \n\n  int j;\n  for (i = 0; i < tn; i++) if (tps[i]->id[0] != '#' && strcmp (tps[i]->id, \"Type\")) {\n    tps[i]->name = 0;\n    for (j = 0; j < tps[i]->constructors_num; j ++) {\n      tps[i]->name ^= tps[i]->constructors[j]->name;\n    }\n  }\n \n  \n  for (i = 0; i < gen_what_cnt; i++) {\n    if (!strcmp (gen_what[i], \"fetch\")) {\n      gen_fetch_source ();\n    } else if (!strcmp (gen_what[i], \"fetch-header\")) {\n      gen_fetch_header ();\n    } else if (!strcmp (gen_what[i], \"skip\")) {\n      gen_skip_source ();\n    } else if (!strcmp (gen_what[i], \"skip-header\")) {\n      gen_skip_header ();\n    } else if (!strcmp (gen_what[i], \"store\")) {\n      gen_store_source ();\n    } else if (!strcmp (gen_what[i], \"store-header\")) {\n      gen_store_header ();\n    } else if (!strcmp (gen_what[i], \"autocomplete\")) {\n      gen_autocomplete_source ();\n    } else if (!strcmp (gen_what[i], \"autocomplete-header\")) {\n      gen_autocomplete_header ();\n    } else if (!strcmp (gen_what[i], \"types\")) {\n      gen_types_source ();\n    } else if (!strcmp (gen_what[i], \"types-header\")) {\n      gen_types_header ();\n    } else if (!strcmp (gen_what[i], \"fetch-ds\")) {\n      gen_fetch_ds_source ();\n    } else if (!strcmp (gen_what[i], \"fetch-ds-header\")) {\n      gen_fetch_ds_header ();\n    } else if (!strcmp (gen_what[i], \"free-ds\")) {\n      gen_free_ds_source ();\n    } else if (!strcmp (gen_what[i], \"free-ds-header\")) {\n      gen_free_ds_header ();\n    } else if (!strcmp (gen_what[i], \"store-ds\")) {\n      gen_store_ds_source ();\n    } else if (!strcmp (gen_what[i], \"store-ds-header\")) {\n      gen_store_ds_header ();\n    } else if (!strcmp (gen_what[i], \"print-ds\")) {\n      gen_print_ds_source ();\n    } else if (!strcmp (gen_what[i], \"print-ds-header\")) {\n      gen_print_ds_header ();\n    } else {\n      assert (0);\n    }\n  }\n\n  \n  return 0;\n}\n\nvoid usage (void) {\n  printf (\"usage: generate [-v] [-h] <tlo-file>\\n\"\n       );\n  exit (2);\n}\n\nvoid logprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));\nvoid logprintf (const char *format __attribute__ ((unused)), ...) {\n}\n/*\nvoid hexdump (int *in_ptr, int *in_end) {\n  int *ptr = in_ptr;\n  while (ptr < in_end) { printf (\" %08x\", *(ptr ++)); }\n  printf (\"\\n\");\n}*/\n\n#ifdef HAVE_EXECINFO_H\nvoid print_backtrace (void) {\n  void *buffer[255];\n  const int calls = backtrace (buffer, sizeof (buffer) / sizeof (void *));\n  backtrace_symbols_fd (buffer, calls, 1);\n}\n#else\nvoid print_backtrace (void) {\n  if (write (1, \"No libexec. Backtrace disabled\\n\", 32) < 0) {\n    // Sad thing\n  }\n}\n#endif\n\nvoid sig_segv_handler (int signum __attribute__ ((unused))) {\n  if (write (1, \"SIGSEGV received\\n\", 18) < 0) { \n    // Sad thing\n  }\n  print_backtrace ();\n  exit (EXIT_FAILURE);\n}\n\nvoid sig_abrt_handler (int signum __attribute__ ((unused))) {\n  if (write (1, \"SIGABRT received\\n\", 18) < 0) { \n    // Sad thing\n  }\n  print_backtrace ();\n  exit (EXIT_FAILURE);\n}\n\nstatic int read_all (int fd, void *buf, size_t len) {\n\tunsigned int rs = 0;\n\twhile(rs < len) {\n\t\tint rval = read (fd, buf + rs, len - rs);\n\t\tif (rval == 0) {\n\t\t\tbreak;\n    }\n\t\tif (rval < 0) {\n\t\t\treturn rval;\n    }\n\n\t\trs += rval;\n\t}\n\treturn rs;\n}\n\n#ifndef O_BINARY \n#define O_BINARY 0 \n#endif\n\nint main (int argc, char **argv) {\n  signal (SIGSEGV, sig_segv_handler);\n  signal (SIGABRT, sig_abrt_handler);\n  int i;\n  while ((i = getopt (argc, argv, \"vhHg:\")) != -1) {\n    switch (i) {\n    case 'h':\n      usage ();\n      return 2;\n    case 'v':\n      verbosity++;\n      break;\n    case 'H':\n      header ++;\n      break;\n    case 'g':\n      assert (gen_what_cnt < 1000);\n      gen_what[gen_what_cnt ++] = optarg;\n      break;\n    }\n  }\n\n  if (argc != optind + 1) {\n    usage ();\n  }\n\n  int fd = open (argv[optind], O_RDONLY | O_BINARY);\n  if (fd < 0) {\n    fprintf (stderr, \"Can not open file '%s'. Error %s\\n\", argv[optind], strerror(errno));\n    exit (1);\n  }\n  buf_size = read_all (fd, buf, (1 << 20));\n  if (fd == (1 << 20)) {\n    fprintf (stderr, \"Too big tlo file\\n\");\n    exit (2);\n  }\n  return parse_tlo_file ();\n}\n"
  },
  {
    "path": "generate.h",
    "content": "/*\n    This file is part of tgl-libary/generate\n\n    Tgl-library/generate is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 2 of the License, or\n    (at your option) any later version.\n\n    Tgl-library/generate is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this tgl-library/generate.  If not, see <http://www.gnu.org/licenses/>.\n\n    Copyright Vitaly Valtman 2014-2015\n\n    It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)\n    Copyright 2012-2013 Vkontakte Ltd\n              2012-2013 Vitaliy Valtman\n*/\n\n#ifndef __GENERATE_H__\n#define __GENERATE_H__\n\nstruct tl_combinator;\n\nstruct tl_type {  \n//  struct tl_type_methods *methods;\n  char *id;\n  char *print_id;\n  unsigned name;\n  int arity;\n  int flags;\n  int constructors_num;\n  struct tl_combinator **constructors;\n  long long params_types;\n  int extra;\n};\n\n#define NODE_TYPE_TYPE 1\n#define NODE_TYPE_NAT_CONST 2\n#define NODE_TYPE_VAR_TYPE 3\n#define NODE_TYPE_VAR_NUM 4\n#define NODE_TYPE_ARRAY 5\n\n#define MAX_COMBINATOR_VARS 64\n\n#define NAME_VAR_NUM 0x70659eff\n#define NAME_VAR_TYPE 0x2cecf817\n#define NAME_INT 0xa8509bda\n#define NAME_LONG 0x22076cba\n#define NAME_DOUBLE 0x2210c154\n#define NAME_STRING 0xb5286e24\n#define NAME_VECTOR 0x1cb5c415\n#define NAME_MAYBE_TRUE 0x3f9c8ef8\n#define NAME_MAYBE_FALSE 0x27930a7b\n#define NAME_BOOL_FALSE 0xbc799737\n#define NAME_BOOL_TRUE 0x997275b5\n#define NAME_BYTES 0x0ee1379f\n\n\n#define FLAG_OPT_VAR (1 << 17)\n#define FLAG_EXCL (1 << 18)\n#define FLAG_OPT_FIELD (1 << 20)\n#define FLAG_NOVAR (1 << 21)\n#define FLAG_BARE 1\n#define FLAGS_MASK ((1 << 16) - 1)\n#define FLAG_DEFAULT_CONSTRUCTOR (1 << 25)\n#define FLAG_NOCONS (1 << 1)\n\nextern struct tl_tree_methods tl_nat_const_methods;\nextern struct tl_tree_methods tl_nat_const_full_methods;\nextern struct tl_tree_methods tl_pnat_const_full_methods;\nextern struct tl_tree_methods tl_array_methods;\nextern struct tl_tree_methods tl_type_methods;\nextern struct tl_tree_methods tl_parray_methods;\nextern struct tl_tree_methods tl_ptype_methods;\nextern struct tl_tree_methods tl_var_num_methods;\nextern struct tl_tree_methods tl_var_type_methods;\nextern struct tl_tree_methods tl_pvar_num_methods;\nextern struct tl_tree_methods tl_pvar_type_methods;\n#define TL_IS_NAT_VAR(x) (((long)x) & 1)\n#define TL_TREE_METHODS(x) (TL_IS_NAT_VAR (x) ? &tl_nat_const_methods : ((struct tl_tree *)(x))->methods)\n\n#define DEC_REF(x) (TL_TREE_METHODS(x)->dec_ref ((void *)x))\n#define INC_REF(x) (TL_TREE_METHODS(x)->inc_ref ((void *)x))\n#define TYPE(x) (TL_TREE_METHODS(x)->type ((void *)x))\n\ntypedef unsigned long long tl_tree_hash_t;\nstruct tl_tree;\n\nstruct tl_tree_methods {\n  int (*type)(struct tl_tree *T);\n  int (*eq)(struct tl_tree *T, struct tl_tree *U);\n  void (*inc_ref)(struct tl_tree *T);\n  void (*dec_ref)(struct tl_tree *T);\n};\n\nstruct tl_tree {\n  int ref_cnt;\n  int flags;\n  //tl_tree_hash_t hash;\n  struct tl_tree_methods *methods;\n};\n/*\nstruct tl_tree_nat_const {\n  struct tl_tree self;\n  int value;\n};*/\n\nstruct tl_tree_type {\n  struct tl_tree self;\n\n  struct tl_type *type;\n  int children_num;\n  struct tl_tree **children;\n};\n\nstruct tl_tree_array {\n  struct tl_tree self;\n\n  struct tl_tree *multiplicity;\n  int args_num;\n  struct arg **args;\n};\n\nstruct tl_tree_var_type {\n  struct tl_tree self;\n\n  int var_num;\n};\n\nstruct tl_tree_var_num {\n  struct tl_tree self;\n\n  int var_num;\n  int dif;\n};\n\nstruct tl_tree_nat_const {\n  struct tl_tree self;\n\n  long long value;\n};\n\nstruct arg {\n  char *id;\n  int var_num;\n  int flags;\n  int exist_var_num;\n  int exist_var_bit;\n  struct tl_tree *type;\n};\n\nstruct tl_combinator {\n  //struct tl_combinator_methods *methods;\n  char *id;\n  char *print_id;\n  unsigned name;\n  int is_fun;\n  int var_num;\n  int args_num;\n  struct arg **args;\n  struct tl_tree *result;\n  void **IP;\n  void **fIP;\n  int IP_len;\n  int fIP_len;\n};\n\n#endif\n"
  },
  {
    "path": "m4_ax_check_openssl.m4",
    "content": "# ===========================================================================\n#     http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html\n# ===========================================================================\n#\n# SYNOPSIS\n#\n#   AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])\n#\n# DESCRIPTION\n#\n#   Look for OpenSSL in a number of default spots, or in a user-selected\n#   spot (via --with-openssl).  Sets\n#\n#     OPENSSL_INCLUDES to the include directives required\n#     OPENSSL_LIBS to the -l directives required\n#     OPENSSL_LDFLAGS to the -L or -R flags required\n#\n#   and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately\n#\n#   This macro sets OPENSSL_INCLUDES such that source files should use the\n#   openssl/ directory in include directives:\n#\n#     #include <openssl/hmac.h>\n#\n# LICENSE\n#\n#   Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>\n#   Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>\n#\n#   Copying and distribution of this file, with or without modification, are\n#   permitted in any medium without royalty provided the copyright notice\n#   and this notice are preserved. This file is offered as-is, without any\n#   warranty.\n\n#serial 8\n\nAU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])\nAC_DEFUN([AX_CHECK_OPENSSL], [\n    found=false\n    AC_ARG_WITH([openssl],\n        [AS_HELP_STRING([--with-openssl=DIR],\n            [root of the OpenSSL directory])],\n        [\n            case \"$withval\" in\n            \"\" | y | ye | yes | n | no)\n            AC_MSG_ERROR([Invalid --with-openssl value])\n              ;;\n            *) ssldirs=\"$withval\"\n              ;;\n            esac\n        ], [\n            # if pkg-config is installed and openssl has installed a .pc file,\n            # then use that information and don't search ssldirs\n            AC_PATH_PROG([PKG_CONFIG], [pkg-config])\n            if test x\"$PKG_CONFIG\" != x\"\"; then\n                OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`\n                if test $? = 0; then\n                    OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`\n                    OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`\n                    found=true\n                fi\n            fi\n\n            # no such luck; use some default ssldirs\n            if ! $found; then\n                ssldirs=\"/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr\"\n            fi\n        ]\n        )\n\n\n    # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in\n    # an 'openssl' subdirectory\n\n    if ! $found; then\n        OPENSSL_INCLUDES=\n        for ssldir in $ssldirs; do\n            AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])\n            if test -f \"$ssldir/include/openssl/ssl.h\"; then\n                OPENSSL_INCLUDES=\"-I$ssldir/include\"\n                OPENSSL_LDFLAGS=\"-L$ssldir/lib\"\n                OPENSSL_LIBS=\"-lssl -lcrypto\"\n                found=true\n                AC_MSG_RESULT([yes])\n                break\n            else\n                AC_MSG_RESULT([no])\n            fi\n        done\n\n        # if the file wasn't found, well, go ahead and try the link anyway -- maybe\n        # it will just work!\n    fi\n\n    # try the preprocessor and linker with our new flags,\n    # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS\n\n    AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])\n    echo \"Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;\" \\\n        \"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES\" >&AS_MESSAGE_LOG_FD\n\n    save_LIBS=\"$LIBS\"\n    save_LDFLAGS=\"$LDFLAGS\"\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    LDFLAGS=\"$LDFLAGS $OPENSSL_LDFLAGS\"\n    LIBS=\"$OPENSSL_LIBS $LIBS\"\n    CPPFLAGS=\"$OPENSSL_INCLUDES $CPPFLAGS\"\n    AC_LINK_IFELSE(\n        [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],\n        [\n            AC_MSG_RESULT([yes])\n            $1\n        ], [\n            AC_MSG_RESULT([no])\n            $2\n        ])\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n\n    AC_SUBST([OPENSSL_INCLUDES])\n    AC_SUBST([OPENSSL_LIBS])\n    AC_SUBST([OPENSSL_LDFLAGS])\n])\n"
  },
  {
    "path": "m4_ax_check_zlib.m4",
    "content": "# ===========================================================================\n#       http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html\n# ===========================================================================\n#\n# SYNOPSIS\n#\n#   AX_CHECK_ZLIB([action-if-found], [action-if-not-found])\n#\n# DESCRIPTION\n#\n#   This macro searches for an installed zlib library. If nothing was\n#   specified when calling configure, it searches first in /usr/local and\n#   then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,\n#   it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If\n#   --without-zlib is specified, the library is not searched at all.\n#\n#   If either the header file (zlib.h) or the library (libz) is not found,\n#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is\n#   not specified, the configuration exits on error, asking for a valid zlib\n#   installation directory or --without-zlib.\n#\n#   If both header file and library are found, shell commands\n#   'action-if-found' is run. If 'action-if-found' is not specified, the\n#   default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends\n#   '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls\n#   AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition\n#   for this symbol in a config.h file. Sample usage in a C/C++ source is as\n#   follows:\n#\n#     #ifdef HAVE_LIBZ\n#     #include <zlib.h>\n#     #endif /* HAVE_LIBZ */\n#\n# LICENSE\n#\n#   Copyright (c) 2008 Loic Dachary <loic@senga.org>\n#   Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>\n#\n#   This program is free software; you can redistribute it and/or modify it\n#   under the terms of the GNU General Public License as published by the\n#   Free Software Foundation; either version 2 of the License, or (at your\n#   option) any later version.\n#\n#   This program is distributed in the hope that it will be useful, but\n#   WITHOUT ANY WARRANTY; without even the implied warranty of\n#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\n#   Public License for more details.\n#\n#   You should have received a copy of the GNU General Public License along\n#   with this program. If not, see <http://www.gnu.org/licenses/>.\n#\n#   As a special exception, the respective Autoconf Macro's copyright owner\n#   gives unlimited permission to copy, distribute and modify the configure\n#   scripts that are the output of Autoconf when processing the Macro. You\n#   need not follow the terms of the GNU General Public License when using\n#   or distributing such scripts, even though portions of the text of the\n#   Macro appear in them. The GNU General Public License (GPL) does govern\n#   all other use of the material that constitutes the Autoconf Macro.\n#\n#   This special exception to the GPL applies to versions of the Autoconf\n#   Macro released by the Autoconf Archive. When you make and distribute a\n#   modified version of the Autoconf Macro, you may extend this special\n#   exception to the GPL to apply to your modified version as well.\n\n#serial 14\n\nAU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])\nAC_DEFUN([AX_CHECK_ZLIB],\n#\n# Handle user hints\n#\n[AC_MSG_CHECKING(if zlib is wanted)\nzlib_places=\"/usr/local /usr /opt/local /sw\"\nAC_ARG_WITH([zlib],\n[  --with-zlib=DIR         root directory path of zlib installation @<:@defaults to\n                          /usr/local or /usr if not found in /usr/local@:>@\n  --without-zlib          to disable zlib usage completely],\n[if test \"$withval\" != no ; then\n  AC_MSG_RESULT(yes)\n  if test -d \"$withval\"\n  then\n    zlib_places=\"$withval $zlib_places\"\n  else\n    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])\n  fi\nelse\n  zlib_places=\n  AC_MSG_RESULT(no)\nfi],\n[AC_MSG_RESULT(yes)])\n\n#\n# Locate zlib, if wanted\n#\nif test -n \"${zlib_places}\"\nthen\n\t# check the user supplied or any other more or less 'standard' place:\n\t#   Most UNIX systems      : /usr/local and /usr\n\t#   MacPorts / Fink on OSX : /opt/local respectively /sw\n\tfor ZLIB_HOME in ${zlib_places} ; do\n\t  if test -f \"${ZLIB_HOME}/include/zlib.h\"; then break; fi\n\t  ZLIB_HOME=\"\"\n\tdone\n\n  ZLIB_OLD_LDFLAGS=$LDFLAGS\n  ZLIB_OLD_CPPFLAGS=$CPPFLAGS\n  if test -n \"${ZLIB_HOME}\"; then\n        LDFLAGS=\"$LDFLAGS -L${ZLIB_HOME}/lib\"\n        CPPFLAGS=\"$CPPFLAGS -I${ZLIB_HOME}/include\"\n  fi\n  AC_LANG_SAVE\n  AC_LANG_C\n  AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no])\n  AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])\n  AC_LANG_RESTORE\n  if test \"$zlib_cv_libz\" = \"yes\" && test \"$zlib_cv_zlib_h\" = \"yes\"\n  then\n    #\n    # If both library and header were found, action-if-found\n    #\n    m4_ifblank([$1],[\n                CPPFLAGS=\"$CPPFLAGS -I${ZLIB_HOME}/include\"\n                LDFLAGS=\"$LDFLAGS -L${ZLIB_HOME}/lib\"\n                LIBS=\"-lz $LIBS\"\n                AC_DEFINE([HAVE_LIBZ], [1],\n                          [Define to 1 if you have `z' library (-lz)])\n               ],[\n                # Restore variables\n                LDFLAGS=\"$ZLIB_OLD_LDFLAGS\"\n                CPPFLAGS=\"$ZLIB_OLD_CPPFLAGS\"\n                $1\n               ])\n  else\n    #\n    # If either header or library was not found, action-if-not-found\n    #\n    m4_default([$2],[\n                AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib])\n                ])\n  fi\nfi\n])\n"
  },
  {
    "path": "mime-types.c",
    "content": "unsigned char mime_types[] = {\n  0x23, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20,\n  0x6d, 0x61, 0x70, 0x73, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65,\n  0x74, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x20, 0x74, 0x79, 0x70, 0x65,\n  0x73, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20,\n  0x66, 0x69, 0x6c, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,\n  0x6f, 0x6e, 0x28, 0x73, 0x29, 0x2e, 0x0a, 0x23, 0x20, 0x41, 0x6c, 0x74,\n  0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,\n  0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x68, 0x74, 0x74, 0x70, 0x64, 0x2c,\n  0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x69,\n  0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x61,\n  0x6e, 0x79, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20,\n  0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x6e,\n  0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x70,\n  0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,\n  0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x64, 0x6f, 0x6d, 0x61,\n  0x69, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, 0x6e, 0x6c, 0x69, 0x6d,\n  0x69, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73, 0x72, 0x69,\n  0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x23, 0x0a, 0x23, 0x20,\n  0x54, 0x68, 0x65, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x65,\n  0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,\n  0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,\n  0x65, 0x72, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x63, 0x6f,\n  0x6d, 0x6d, 0x6f, 0x6e, 0x29, 0x20, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69,\n  0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73,\n  0x2e, 0x0a, 0x23, 0x20, 0x41, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74,\n  0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x75,\n  0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,\n  0x69, 0x6f, 0x6e, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x69,\n  0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68,\n  0x65, 0x79, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65,\n  0x64, 0x0a, 0x23, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x20,\n  0x67, 0x75, 0x69, 0x64, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,\n  0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x77,\n  0x61, 0x72, 0x64, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x74, 0x79,\n  0x70, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6d,\n  0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x20, 0x65, 0x61, 0x73, 0x69, 0x65,\n  0x72, 0x20, 0x74, 0x6f, 0x0a, 0x23, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74,\n  0x69, 0x66, 0x79, 0x20, 0x22, 0x6e, 0x65, 0x77, 0x22, 0x20, 0x74, 0x79,\n  0x70, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x20, 0x65,\n  0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72,\n  0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,\n  0x6e, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20,\n  0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x0a, 0x23, 0x20, 0x63,\n  0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75,\n  0x61, 0x67, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x63,\n  0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x63,\n  0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x63,\n  0x61, 0x72, 0x65, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x0a, 0x23, 0x0a,\n  0x23, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x6d,\n  0x65, 0x64, 0x69, 0x61, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x73,\n  0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x67,\n  0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x64,\n  0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20,\n  0x52, 0x46, 0x43, 0x20, 0x34, 0x32, 0x38, 0x38, 0x2e, 0x0a, 0x23, 0x20,\n  0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,\n  0x20, 0x69, 0x73, 0x20, 0x61, 0x74, 0x20, 0x3c, 0x68, 0x74, 0x74, 0x70,\n  0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x61, 0x6e, 0x61,\n  0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d,\n  0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2d, 0x74,\n  0x79, 0x70, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2d, 0x74,\n  0x79, 0x70, 0x65, 0x73, 0x2e, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x2e,\n  0x0a, 0x23, 0x0a, 0x23, 0x20, 0x4d, 0x49, 0x4d, 0x45, 0x20, 0x74, 0x79,\n  0x70, 0x65, 0x20, 0x28, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x63, 0x61, 0x73,\n  0x65, 0x64, 0x29, 0x09, 0x09, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,\n  0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x23, 0x20, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,\n  0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,\n  0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,\n  0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,\n  0x3d, 0x3d, 0x3d, 0x09, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,\n  0x3d, 0x3d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x31, 0x64, 0x2d, 0x69, 0x6e, 0x74, 0x65,\n  0x72, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x64, 0x2d, 0x70, 0x61, 0x72, 0x69,\n  0x74, 0x79, 0x66, 0x65, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x33, 0x67, 0x70, 0x70,\n  0x2d, 0x69, 0x6d, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61,\n  0x63, 0x74, 0x69, 0x76, 0x65, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x61, 0x6e, 0x64, 0x72, 0x65, 0x77, 0x2d, 0x69, 0x6e, 0x73, 0x65,\n  0x74, 0x09, 0x09, 0x09, 0x65, 0x7a, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70,\n  0x6c, 0x65, 0x66, 0x69, 0x6c, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x78, 0x77, 0x61, 0x72, 0x65, 0x09, 0x09, 0x09, 0x09, 0x61, 0x77, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x61, 0x74, 0x6f, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x61, 0x74, 0x6f, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x74, 0x6f, 0x6d, 0x63, 0x61, 0x74,\n  0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x61, 0x74, 0x6f, 0x6d,\n  0x63, 0x61, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63,\n  0x6d, 0x61, 0x69, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x74, 0x6f, 0x6d, 0x73, 0x76, 0x63,\n  0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x61, 0x74, 0x6f, 0x6d,\n  0x73, 0x76, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2d, 0x70,\n  0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x62, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x73, 0x6d, 0x74, 0x70, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x62, 0x65, 0x65, 0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x63, 0x61, 0x6c, 0x73, 0x2d, 0x31, 0x38, 0x34, 0x30,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x63, 0x63, 0x6d, 0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x63, 0x63, 0x78, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09,\n  0x09, 0x63, 0x63, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x64, 0x6d, 0x69, 0x2d,\n  0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x09, 0x09,\n  0x09, 0x63, 0x64, 0x6d, 0x69, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x64, 0x6d, 0x69, 0x2d,\n  0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x09, 0x09, 0x09,\n  0x63, 0x64, 0x6d, 0x69, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x64, 0x6d, 0x69, 0x2d, 0x64,\n  0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x09, 0x09, 0x09, 0x09, 0x63, 0x64, 0x6d,\n  0x69, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x63, 0x64, 0x6d, 0x69, 0x2d, 0x6f, 0x62, 0x6a, 0x65,\n  0x63, 0x74, 0x09, 0x09, 0x09, 0x09, 0x63, 0x64, 0x6d, 0x69, 0x6f, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x63, 0x64, 0x6d, 0x69, 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x09, 0x09,\n  0x09, 0x09, 0x63, 0x64, 0x6d, 0x69, 0x71, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x65,\n  0x61, 0x2d, 0x32, 0x30, 0x31, 0x38, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x63, 0x65, 0x6c, 0x6c, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x63, 0x66, 0x77, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6e, 0x72, 0x70,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,\n  0x6e, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f,\n  0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x69, 0x6e, 0x66,\n  0x6f, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x70, 0x6c, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x73, 0x74, 0x61, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x73, 0x74, 0x61, 0x64, 0x61, 0x74,\n  0x61, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x75, 0x2d, 0x73, 0x65, 0x65,\n  0x6d, 0x65, 0x09, 0x09, 0x09, 0x09, 0x63, 0x75, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63,\n  0x79, 0x62, 0x65, 0x72, 0x63, 0x61, 0x73, 0x68, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x61, 0x76,\n  0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09,\n  0x64, 0x61, 0x76, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64,\n  0x63, 0x61, 0x2d, 0x72, 0x66, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x63,\n  0x2d, 0x64, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67,\n  0x2d, 0x69, 0x6e, 0x66, 0x6f, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x64, 0x69, 0x63, 0x6f, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x6e, 0x73, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x64, 0x6f, 0x63, 0x62, 0x6f, 0x6f, 0x6b, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x64, 0x62, 0x6b, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x73, 0x6b,\n  0x70, 0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x73, 0x73, 0x63, 0x2b,\n  0x64, 0x65, 0x72, 0x09, 0x09, 0x09, 0x09, 0x64, 0x73, 0x73, 0x63, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x64, 0x73, 0x73, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x78, 0x64, 0x73, 0x73, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x76, 0x63, 0x73,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x65, 0x63, 0x6d, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x09,\n  0x09, 0x09, 0x09, 0x65, 0x63, 0x6d, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x64,\n  0x69, 0x2d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x65, 0x64, 0x69, 0x2d, 0x78, 0x31, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x64,\n  0x69, 0x66, 0x61, 0x63, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x6d, 0x6d, 0x61, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6d, 0x6d, 0x61, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x65, 0x70, 0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x70, 0x75,\n  0x62, 0x2b, 0x7a, 0x69, 0x70, 0x09, 0x09, 0x09, 0x09, 0x65, 0x70, 0x75,\n  0x62, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x73, 0x68, 0x6f, 0x70, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x78, 0x69, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x65, 0x78, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x61,\n  0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x65, 0x74, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x66, 0x61, 0x73, 0x74, 0x73, 0x6f, 0x61, 0x70, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x62, 0x32,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x66, 0x62, 0x32, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66,\n  0x69, 0x74, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x74, 0x64, 0x70,\n  0x66, 0x72, 0x09, 0x09, 0x09, 0x09, 0x70, 0x66, 0x72, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x2d, 0x61, 0x74,\n  0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x67, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x67, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x70, 0x78, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x67, 0x70, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x78, 0x66, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x67, 0x78, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x68, 0x32, 0x32,\n  0x34, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x68, 0x65, 0x6c, 0x64, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x68, 0x79, 0x70, 0x65,\n  0x72, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x73,\n  0x74, 0x6b, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x62, 0x65, 0x2d, 0x6b, 0x65, 0x79,\n  0x2d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x69, 0x62, 0x65, 0x2d, 0x70, 0x6b, 0x67, 0x2d, 0x72,\n  0x65, 0x70, 0x6c, 0x79, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69,\n  0x62, 0x65, 0x2d, 0x70, 0x70, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x69, 0x67, 0x65, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6d, 0x2d, 0x69,\n  0x73, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x63, 0x6d, 0x64, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x6f, 0x62, 0x6a, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f,\n  0x6e, 0x73, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e,\n  0x76, 0x6e, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x6b, 0x6d, 0x6c, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x09, 0x69, 0x6e, 0x6b, 0x20, 0x69, 0x6e, 0x6b,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6f, 0x74, 0x70, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x70,\n  0x66, 0x69, 0x78, 0x09, 0x09, 0x09, 0x09, 0x69, 0x70, 0x66, 0x69, 0x78,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x69, 0x70, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x73, 0x75,\n  0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x2d, 0x61, 0x72, 0x63, 0x68, 0x69,\n  0x76, 0x65, 0x09, 0x09, 0x09, 0x6a, 0x61, 0x72, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x61, 0x76,\n  0x61, 0x2d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64,\n  0x2d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x09, 0x09, 0x73, 0x65, 0x72,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x6a, 0x61, 0x76, 0x61, 0x2d, 0x76, 0x6d, 0x09, 0x09, 0x09, 0x09,\n  0x63, 0x6c, 0x61, 0x73, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63,\n  0x72, 0x69, 0x70, 0x74, 0x09, 0x09, 0x09, 0x09, 0x6a, 0x73, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a,\n  0x73, 0x6f, 0x6e, 0x09, 0x09, 0x09, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x6a, 0x73, 0x6f, 0x6e, 0x6d, 0x6c, 0x2b, 0x6a, 0x73, 0x6f, 0x6e, 0x09,\n  0x09, 0x09, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x6b, 0x70, 0x6d, 0x6c, 0x2d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6b, 0x70, 0x6d, 0x6c, 0x2d,\n  0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x6c, 0x6f, 0x73, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09,\n  0x09, 0x6c, 0x6f, 0x73, 0x74, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x63,\n  0x2d, 0x62, 0x69, 0x6e, 0x68, 0x65, 0x78, 0x34, 0x30, 0x09, 0x09, 0x09,\n  0x68, 0x71, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x63, 0x2d, 0x63, 0x6f, 0x6d, 0x70,\n  0x61, 0x63, 0x74, 0x70, 0x72, 0x6f, 0x09, 0x09, 0x09, 0x63, 0x70, 0x74,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x63, 0x77, 0x72, 0x69, 0x74, 0x65, 0x69,\n  0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x6d, 0x61, 0x64, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x09, 0x6d, 0x61, 0x64, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x72, 0x63, 0x09,\n  0x09, 0x09, 0x09, 0x6d, 0x72, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x72, 0x63, 0x78,\n  0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x72,\n  0x63, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69,\n  0x63, 0x61, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x61, 0x20, 0x6e, 0x62, 0x20,\n  0x6d, 0x62, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x6d, 0x6c, 0x2d,\n  0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x6d, 0x6c, 0x2d, 0x70, 0x72, 0x65,\n  0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c,\n  0x09, 0x09, 0x09, 0x09, 0x6d, 0x61, 0x74, 0x68, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69,\n  0x61, 0x74, 0x65, 0x64, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75,\n  0x72, 0x65, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,\n  0x6f, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d,\n  0x73, 0x2d, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d,\n  0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d, 0x6d, 0x73, 0x6b, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d, 0x6d,\n  0x73, 0x6b, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d, 0x70,\n  0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x64, 0x65,\n  0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d, 0x72, 0x65, 0x63,\n  0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x72, 0x65, 0x70, 0x6f, 0x72,\n  0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73,\n  0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d, 0x73, 0x2d, 0x72, 0x65, 0x67,\n  0x69, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n  0x73, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6d,\n  0x73, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69,\n  0x63, 0x65, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,\n  0x6f, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x62, 0x6f, 0x78, 0x09,\n  0x09, 0x09, 0x09, 0x6d, 0x62, 0x6f, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x65,\n  0x64, 0x69, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x65, 0x72,\n  0x76, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x6d, 0x73, 0x63, 0x6d, 0x6c, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x65,\n  0x74, 0x61, 0x6c, 0x69, 0x6e, 0x6b, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x6b, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x65,\n  0x74, 0x61, 0x6c, 0x69, 0x6e, 0x6b, 0x34, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x34, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x65, 0x74, 0x73,\n  0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x65, 0x74, 0x73,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x6d, 0x69, 0x6b, 0x65, 0x79, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64,\n  0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x6f, 0x64,\n  0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x73, 0x73, 0x2d, 0x6b, 0x65, 0x79,\n  0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x73, 0x73, 0x2d, 0x73, 0x69, 0x67,\n  0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x73,\n  0x73, 0x6b, 0x65, 0x79, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x6d, 0x6f, 0x73, 0x73, 0x6b, 0x65, 0x79, 0x2d, 0x72, 0x65, 0x71, 0x75,\n  0x65, 0x73, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x70, 0x32, 0x31, 0x09, 0x09, 0x09, 0x09,\n  0x6d, 0x32, 0x31, 0x20, 0x6d, 0x70, 0x32, 0x31, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x70, 0x34,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x70, 0x34, 0x73, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x6d, 0x70, 0x65, 0x67, 0x34, 0x2d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69,\n  0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x70, 0x65, 0x67, 0x34, 0x2d, 0x69, 0x6f,\n  0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x70, 0x65, 0x67, 0x34, 0x2d, 0x69, 0x6f,\n  0x64, 0x2d, 0x78, 0x6d, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x73, 0x63, 0x2d,\n  0x69, 0x76, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x73,\n  0x63, 0x2d, 0x6d, 0x69, 0x78, 0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x6d, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6f,\n  0x63, 0x20, 0x64, 0x6f, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x78, 0x66, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x6d, 0x78, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6e, 0x61, 0x73, 0x64,\n  0x61, 0x74, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2d, 0x63,\n  0x68, 0x65, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x69,\n  0x6e, 0x66, 0x6f, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2d, 0x74,\n  0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x6e, 0x73, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x73, 0x70,\n  0x2d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f,\n  0x63, 0x73, 0x70, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61,\n  0x6d, 0x09, 0x62, 0x69, 0x6e, 0x20, 0x64, 0x6d, 0x73, 0x20, 0x6c, 0x72,\n  0x66, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x73, 0x6f, 0x20, 0x64, 0x69, 0x73,\n  0x74, 0x20, 0x64, 0x69, 0x73, 0x74, 0x7a, 0x20, 0x70, 0x6b, 0x67, 0x20,\n  0x62, 0x70, 0x6b, 0x20, 0x64, 0x75, 0x6d, 0x70, 0x20, 0x65, 0x6c, 0x63,\n  0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x64, 0x61, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x6f, 0x64, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x65, 0x62, 0x70,\n  0x73, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x6f, 0x70, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x67, 0x67, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x6f, 0x67, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x6d, 0x64, 0x6f,\n  0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6f, 0x6d, 0x64,\n  0x6f, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x6e, 0x6f, 0x74, 0x65, 0x09, 0x09,\n  0x09, 0x09, 0x6f, 0x6e, 0x65, 0x74, 0x6f, 0x63, 0x20, 0x6f, 0x6e, 0x65,\n  0x74, 0x6f, 0x63, 0x32, 0x20, 0x6f, 0x6e, 0x65, 0x74, 0x6d, 0x70, 0x20,\n  0x6f, 0x6e, 0x65, 0x70, 0x6b, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x78, 0x70, 0x73, 0x09,\n  0x09, 0x09, 0x09, 0x6f, 0x78, 0x70, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61,\n  0x72, 0x69, 0x74, 0x79, 0x66, 0x65, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x74, 0x63,\n  0x68, 0x2d, 0x6f, 0x70, 0x73, 0x2d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x78, 0x65, 0x72, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x64,\n  0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x70, 0x64, 0x66, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x67,\n  0x70, 0x2d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x09,\n  0x09, 0x09, 0x70, 0x67, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x67, 0x70, 0x2d,\n  0x6b, 0x65, 0x79, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x67, 0x70, 0x2d, 0x73, 0x69, 0x67,\n  0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x09, 0x09, 0x09, 0x61, 0x73, 0x63,\n  0x20, 0x73, 0x69, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x69, 0x63, 0x73, 0x2d, 0x72, 0x75,\n  0x6c, 0x65, 0x73, 0x09, 0x09, 0x09, 0x09, 0x70, 0x72, 0x66, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x70, 0x69, 0x64, 0x66, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x70, 0x69, 0x64, 0x66, 0x2d, 0x64, 0x69, 0x66, 0x66, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x70, 0x6b, 0x63, 0x73, 0x31, 0x30, 0x09, 0x09, 0x09, 0x09,\n  0x70, 0x31, 0x30, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x63, 0x73, 0x37, 0x2d, 0x6d, 0x69,\n  0x6d, 0x65, 0x09, 0x09, 0x09, 0x09, 0x70, 0x37, 0x6d, 0x20, 0x70, 0x37,\n  0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x70, 0x6b, 0x63, 0x73, 0x37, 0x2d, 0x73, 0x69, 0x67, 0x6e,\n  0x61, 0x74, 0x75, 0x72, 0x65, 0x09, 0x09, 0x09, 0x70, 0x37, 0x73, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x70, 0x6b, 0x63, 0x73, 0x38, 0x09, 0x09, 0x09, 0x09, 0x70, 0x38, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x70, 0x6b, 0x69, 0x78, 0x2d, 0x61, 0x74, 0x74, 0x72, 0x2d, 0x63, 0x65,\n  0x72, 0x74, 0x09, 0x09, 0x09, 0x61, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x69, 0x78,\n  0x2d, 0x63, 0x65, 0x72, 0x74, 0x09, 0x09, 0x09, 0x09, 0x63, 0x65, 0x72,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x70, 0x6b, 0x69, 0x78, 0x2d, 0x63, 0x72, 0x6c, 0x09, 0x09, 0x09,\n  0x09, 0x63, 0x72, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x69, 0x78, 0x2d, 0x70, 0x6b,\n  0x69, 0x70, 0x61, 0x74, 0x68, 0x09, 0x09, 0x09, 0x70, 0x6b, 0x69, 0x70,\n  0x61, 0x74, 0x68, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x69, 0x78, 0x63, 0x6d, 0x70, 0x09,\n  0x09, 0x09, 0x09, 0x70, 0x6b, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x6c, 0x73, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x70, 0x6c, 0x73, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x70, 0x6f, 0x63, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x63, 0x72,\n  0x69, 0x70, 0x74, 0x09, 0x09, 0x09, 0x09, 0x61, 0x69, 0x20, 0x65, 0x70,\n  0x73, 0x20, 0x70, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x61,\n  0x6c, 0x76, 0x65, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x69,\n  0x74, 0x72, 0x61, 0x78, 0x2d, 0x73, 0x68, 0x65, 0x65, 0x74, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70,\n  0x72, 0x73, 0x2e, 0x63, 0x77, 0x77, 0x09, 0x09, 0x09, 0x09, 0x63, 0x77,\n  0x77, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x6e, 0x70, 0x72, 0x65,\n  0x6e, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x70, 0x6c, 0x75,\n  0x63, 0x6b, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x72,\n  0x64, 0x66, 0x2d, 0x78, 0x6d, 0x6c, 0x2d, 0x63, 0x72, 0x79, 0x70, 0x74,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x78, 0x73, 0x66, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x70, 0x73, 0x6b, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x70, 0x73, 0x6b, 0x63, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x71, 0x73, 0x69, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x64, 0x66, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x09, 0x72, 0x64, 0x66, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x67,\n  0x69, 0x6e, 0x66, 0x6f, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x72, 0x69, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x78, 0x2d, 0x6e, 0x67,\n  0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x2d, 0x73, 0x79, 0x6e,\n  0x74, 0x61, 0x78, 0x09, 0x09, 0x72, 0x6e, 0x63, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72,\n  0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69,\n  0x6e, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d,\n  0x6c, 0x69, 0x73, 0x74, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09,\n  0x72, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d,\n  0x6c, 0x69, 0x73, 0x74, 0x73, 0x2d, 0x64, 0x69, 0x66, 0x66, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x72, 0x6c, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x69,\n  0x73, 0x63, 0x6f, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x6c, 0x6d, 0x69, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x6c, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76,\n  0x69, 0x63, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x72,\n  0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x72, 0x70, 0x6b, 0x69, 0x2d, 0x67, 0x68, 0x6f, 0x73, 0x74,\n  0x62, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x09, 0x09, 0x09, 0x67, 0x62,\n  0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x72, 0x70, 0x6b, 0x69, 0x2d, 0x6d, 0x61, 0x6e, 0x69, 0x66,\n  0x65, 0x73, 0x74, 0x09, 0x09, 0x09, 0x6d, 0x66, 0x74, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x70,\n  0x6b, 0x69, 0x2d, 0x72, 0x6f, 0x61, 0x09, 0x09, 0x09, 0x09, 0x72, 0x6f,\n  0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x6b, 0x69, 0x2d, 0x75, 0x70, 0x64,\n  0x6f, 0x77, 0x6e, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x73, 0x64, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x72, 0x73, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x73, 0x73, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x72, 0x73, 0x73, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x74,\n  0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x74, 0x66, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x72, 0x74, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x61, 0x6d, 0x6c, 0x61, 0x73,\n  0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x73, 0x61, 0x6d, 0x6c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,\n  0x74, 0x61, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x62, 0x6d, 0x6c, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x73, 0x62, 0x6d, 0x6c, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x73, 0x63, 0x76, 0x70, 0x2d, 0x63, 0x76, 0x2d, 0x72, 0x65, 0x71, 0x75,\n  0x65, 0x73, 0x74, 0x09, 0x09, 0x09, 0x73, 0x63, 0x71, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x63,\n  0x76, 0x70, 0x2d, 0x63, 0x76, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n  0x73, 0x65, 0x09, 0x09, 0x09, 0x73, 0x63, 0x73, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x63, 0x76,\n  0x70, 0x2d, 0x76, 0x70, 0x2d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n  0x09, 0x09, 0x09, 0x73, 0x70, 0x71, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x63, 0x76, 0x70, 0x2d,\n  0x76, 0x70, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x09,\n  0x09, 0x09, 0x73, 0x70, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x64, 0x70, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x73, 0x64, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x74, 0x2d,\n  0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x74, 0x2d,\n  0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x69, 0x6e, 0x69, 0x74,\n  0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x09, 0x09, 0x73, 0x65, 0x74, 0x70,\n  0x61, 0x79, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x74, 0x2d, 0x72, 0x65, 0x67,\n  0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x65,\n  0x74, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x09, 0x09, 0x73, 0x65, 0x74, 0x72, 0x65, 0x67, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x73, 0x67, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x67, 0x6d, 0x6c, 0x2d,\n  0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x73, 0x68, 0x66, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x73, 0x68, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x69, 0x65, 0x76, 0x65, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2d, 0x66, 0x69, 0x6c,\n  0x74, 0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x69,\n  0x6d, 0x70, 0x6c, 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n  0x2d, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73,\n  0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x63,\n  0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73,\n  0x6c, 0x61, 0x74, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x6d, 0x69, 0x6c, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x73, 0x6d, 0x69, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x73, 0x6d, 0x69, 0x20, 0x73, 0x6d, 0x69, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73,\n  0x6f, 0x61, 0x70, 0x2b, 0x66, 0x61, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f,\n  0x73, 0x65, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x6f, 0x61, 0x70, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x71, 0x6c, 0x2d, 0x71, 0x75,\n  0x65, 0x72, 0x79, 0x09, 0x09, 0x09, 0x72, 0x71, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x70, 0x61,\n  0x72, 0x71, 0x6c, 0x2d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x73, 0x72, 0x78, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x73, 0x2d, 0x65, 0x76, 0x65, 0x6e,\n  0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x72, 0x67, 0x73, 0x09, 0x09,\n  0x09, 0x09, 0x67, 0x72, 0x61, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x72, 0x67, 0x73, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x67, 0x72, 0x78, 0x6d, 0x6c,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x73, 0x72, 0x75, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x73, 0x72, 0x75, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x73, 0x64, 0x6c, 0x2b, 0x78, 0x6d, 0x6c,\n  0x09, 0x09, 0x09, 0x09, 0x73, 0x73, 0x64, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x73, 0x6d,\n  0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x73, 0x73, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x61, 0x70, 0x65,\n  0x78, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74,\n  0x61, 0x6d, 0x70, 0x2d, 0x61, 0x70, 0x65, 0x78, 0x2d, 0x75, 0x70, 0x64,\n  0x61, 0x74, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x75,\n  0x6e, 0x69, 0x74, 0x79, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x75,\n  0x6e, 0x69, 0x74, 0x79, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2d,\n  0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x61,\n  0x6d, 0x70, 0x2d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74,\n  0x61, 0x6d, 0x70, 0x2d, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,\n  0x2d, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x61,\n  0x6d, 0x70, 0x2d, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x2d,\n  0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69,\n  0x72, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x73, 0x74,\n  0x61, 0x74, 0x75, 0x73, 0x2d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,\n  0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x74, 0x61, 0x6d, 0x70, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74,\n  0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65,\n  0x69, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x74, 0x65, 0x69,\n  0x20, 0x74, 0x65, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x75, 0x73, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74,\n  0x68, 0x72, 0x61, 0x75, 0x64, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09,\n  0x09, 0x74, 0x66, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73,\n  0x74, 0x61, 0x6d, 0x70, 0x2d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2d, 0x72,\n  0x65, 0x70, 0x6c, 0x79, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,\n  0x6d, 0x70, 0x65, 0x64, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x09, 0x09, 0x09,\n  0x74, 0x73, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x76, 0x65, 0x2d, 0x74, 0x72,\n  0x69, 0x67, 0x67, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x75, 0x6c, 0x70, 0x66,\n  0x65, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x63, 0x61, 0x72, 0x64, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x65, 0x6d, 0x6d, 0x69, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x69, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x73,\n  0x63, 0x72, 0x69, 0x70, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x33, 0x67, 0x70, 0x70, 0x2e, 0x62, 0x73, 0x66,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x33, 0x67, 0x70,\n  0x70, 0x2e, 0x70, 0x69, 0x63, 0x2d, 0x62, 0x77, 0x2d, 0x6c, 0x61, 0x72,\n  0x67, 0x65, 0x09, 0x09, 0x70, 0x6c, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x33, 0x67, 0x70, 0x70, 0x2e, 0x70, 0x69, 0x63, 0x2d, 0x62, 0x77, 0x2d,\n  0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x09, 0x09, 0x70, 0x73, 0x62, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x33, 0x67, 0x70, 0x70, 0x2e, 0x70, 0x69, 0x63, 0x2d,\n  0x62, 0x77, 0x2d, 0x76, 0x61, 0x72, 0x09, 0x09, 0x09, 0x70, 0x76, 0x62,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x33, 0x67, 0x70, 0x70, 0x2e,\n  0x73, 0x6d, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x33, 0x67,\n  0x70, 0x70, 0x32, 0x2e, 0x62, 0x63, 0x6d, 0x63, 0x73, 0x69, 0x6e, 0x66,\n  0x6f, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x33, 0x67, 0x70, 0x70, 0x32, 0x2e, 0x73, 0x6d, 0x73, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x33, 0x67, 0x70, 0x70, 0x32, 0x2e, 0x74, 0x63, 0x61, 0x70,\n  0x09, 0x09, 0x09, 0x74, 0x63, 0x61, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x33, 0x6d, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x2d, 0x69, 0x74, 0x2d, 0x6e,\n  0x6f, 0x74, 0x65, 0x73, 0x09, 0x09, 0x70, 0x77, 0x6e, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x61, 0x63, 0x63, 0x70, 0x61, 0x63, 0x2e, 0x73, 0x69, 0x6d,\n  0x70, 0x6c, 0x79, 0x2e, 0x61, 0x73, 0x6f, 0x09, 0x09, 0x61, 0x73, 0x6f,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x63, 0x63, 0x70, 0x61, 0x63, 0x2e,\n  0x73, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x2e, 0x69, 0x6d, 0x70, 0x09, 0x09,\n  0x69, 0x6d, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x63, 0x75, 0x63,\n  0x6f, 0x62, 0x6f, 0x6c, 0x09, 0x09, 0x09, 0x61, 0x63, 0x75, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x61, 0x63, 0x75, 0x63, 0x6f, 0x72, 0x70, 0x09, 0x09,\n  0x09, 0x09, 0x61, 0x74, 0x63, 0x20, 0x61, 0x63, 0x75, 0x74, 0x63, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x61, 0x69,\n  0x72, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x2d,\n  0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2b, 0x7a, 0x69, 0x70, 0x09,\n  0x61, 0x69, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x6f, 0x62,\n  0x65, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x72,\n  0x61, 0x6c, 0x2e, 0x66, 0x63, 0x64, 0x74, 0x09, 0x09, 0x66, 0x63, 0x64,\n  0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e,\n  0x66, 0x78, 0x70, 0x09, 0x09, 0x09, 0x66, 0x78, 0x70, 0x20, 0x66, 0x78,\n  0x70, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x6f,\n  0x62, 0x65, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x75,\n  0x70, 0x6c, 0x6f, 0x61, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64,\n  0x6f, 0x62, 0x65, 0x2e, 0x78, 0x64, 0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x78, 0x64, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64,\n  0x6f, 0x62, 0x65, 0x2e, 0x78, 0x66, 0x64, 0x66, 0x09, 0x09, 0x09, 0x78,\n  0x66, 0x64, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x65,\n  0x74, 0x68, 0x65, 0x72, 0x2e, 0x69, 0x6d, 0x70, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x61, 0x68, 0x2d, 0x62, 0x61, 0x72, 0x63, 0x6f, 0x64,\n  0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x68, 0x65, 0x61, 0x64, 0x2e,\n  0x73, 0x70, 0x61, 0x63, 0x65, 0x09, 0x09, 0x09, 0x61, 0x68, 0x65, 0x61,\n  0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x69, 0x72, 0x7a, 0x69, 0x70,\n  0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e,\n  0x61, 0x7a, 0x66, 0x09, 0x09, 0x61, 0x7a, 0x66, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x61, 0x69, 0x72, 0x7a, 0x69, 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x65,\n  0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2e, 0x61, 0x7a, 0x73, 0x09, 0x09,\n  0x61, 0x7a, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x6d, 0x61, 0x7a,\n  0x6f, 0x6e, 0x2e, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x09, 0x09, 0x09, 0x61,\n  0x7a, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x6d, 0x65, 0x72, 0x69,\n  0x63, 0x61, 0x6e, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x73, 0x2e,\n  0x61, 0x63, 0x63, 0x09, 0x09, 0x61, 0x63, 0x63, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x61, 0x6d, 0x69, 0x67, 0x61, 0x2e, 0x61, 0x6d, 0x69, 0x09, 0x09,\n  0x09, 0x61, 0x6d, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61,\n  0x6d, 0x75, 0x6e, 0x64, 0x73, 0x65, 0x6e, 0x2e, 0x6d, 0x61, 0x7a, 0x65,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x6e, 0x64,\n  0x72, 0x6f, 0x69, 0x64, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,\n  0x2d, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x09, 0x09, 0x61, 0x70,\n  0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x6e, 0x73, 0x65, 0x72, 0x2d,\n  0x77, 0x65, 0x62, 0x2d, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,\n  0x61, 0x74, 0x65, 0x2d, 0x69, 0x73, 0x73, 0x75, 0x65, 0x2d, 0x69, 0x6e,\n  0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x09, 0x63, 0x69, 0x69,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x6e, 0x73, 0x65, 0x72, 0x2d, 0x77,\n  0x65, 0x62, 0x2d, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x2d, 0x74, 0x72, 0x61,\n  0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x09, 0x66, 0x74, 0x69, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x61, 0x6e, 0x74, 0x69, 0x78, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2d,\n  0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x09, 0x09, 0x61,\n  0x74, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65,\n  0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x6d, 0x70, 0x6b, 0x67, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x6d, 0x70, 0x65, 0x67, 0x75,\n  0x72, 0x6c, 0x09, 0x09, 0x09, 0x6d, 0x33, 0x75, 0x38, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x61, 0x72, 0x61, 0x73, 0x74, 0x72, 0x61, 0x2e,\n  0x73, 0x77, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x72, 0x69, 0x73,\n  0x74, 0x61, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x73,\n  0x77, 0x69, 0x09, 0x09, 0x73, 0x77, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x61, 0x73, 0x74, 0x72, 0x61, 0x65, 0x61, 0x2d, 0x73, 0x6f, 0x66, 0x74,\n  0x77, 0x61, 0x72, 0x65, 0x2e, 0x69, 0x6f, 0x74, 0x61, 0x09, 0x09, 0x69,\n  0x6f, 0x74, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x09, 0x09, 0x09, 0x61, 0x65, 0x70,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x70,\n  0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x61, 0x76, 0x69, 0x73, 0x74, 0x61, 0x72, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x62, 0x6c, 0x75, 0x65, 0x69, 0x63, 0x65,\n  0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x73, 0x73, 0x09, 0x09,\n  0x6d, 0x70, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x62, 0x6c,\n  0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x2e, 0x65, 0x70, 0x2e, 0x6f,\n  0x6f, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x62, 0x6d, 0x69, 0x09, 0x09,\n  0x09, 0x09, 0x62, 0x6d, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x62, 0x75,\n  0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,\n  0x73, 0x09, 0x09, 0x09, 0x72, 0x65, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x63, 0x61, 0x62, 0x2d, 0x6a, 0x73, 0x63, 0x72, 0x69, 0x70,\n  0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x61, 0x6e, 0x6f,\n  0x6e, 0x2d, 0x63, 0x70, 0x64, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x2d, 0x6c, 0x69, 0x70, 0x73, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6f,\n  0x2e, 0x74, 0x68, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x63, 0x2e, 0x63, 0x6c,\n  0x69, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x63, 0x68, 0x65, 0x6d, 0x64, 0x72, 0x61, 0x77, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x63, 0x64, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x63, 0x68, 0x69, 0x70, 0x6e, 0x75, 0x74, 0x73, 0x2e, 0x6b,\n  0x61, 0x72, 0x61, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x6d, 0x64, 0x09, 0x09,\n  0x6d, 0x6d, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x69, 0x6e, 0x64,\n  0x65, 0x72, 0x65, 0x6c, 0x6c, 0x61, 0x09, 0x09, 0x09, 0x63, 0x64, 0x79,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x69, 0x72, 0x70, 0x61,\n  0x63, 0x6b, 0x2e, 0x69, 0x73, 0x64, 0x6e, 0x2d, 0x65, 0x78, 0x74, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6c, 0x61, 0x79, 0x6d, 0x6f, 0x72, 0x65,\n  0x09, 0x09, 0x09, 0x63, 0x6c, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63,\n  0x6c, 0x6f, 0x61, 0x6e, 0x74, 0x6f, 0x2e, 0x72, 0x70, 0x39, 0x09, 0x09,\n  0x09, 0x72, 0x70, 0x39, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6c, 0x6f,\n  0x6e, 0x6b, 0x2e, 0x63, 0x34, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x09, 0x09,\n  0x09, 0x63, 0x34, 0x67, 0x20, 0x63, 0x34, 0x64, 0x20, 0x63, 0x34, 0x66,\n  0x20, 0x63, 0x34, 0x70, 0x20, 0x63, 0x34, 0x75, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x63, 0x6c, 0x75, 0x65, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e, 0x63,\n  0x61, 0x72, 0x74, 0x6f, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x2d, 0x63,\n  0x6f, 0x6e, 0x66, 0x69, 0x67, 0x09, 0x09, 0x63, 0x31, 0x31, 0x61, 0x6d,\n  0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6c, 0x75, 0x65, 0x74, 0x72,\n  0x75, 0x73, 0x74, 0x2e, 0x63, 0x61, 0x72, 0x74, 0x6f, 0x6d, 0x6f, 0x62,\n  0x69, 0x6c, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2d, 0x70,\n  0x6b, 0x67, 0x09, 0x63, 0x31, 0x31, 0x61, 0x6d, 0x7a, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,\n  0x6f, 0x6e, 0x2b, 0x6a, 0x73, 0x6f, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x65, 0x2d, 0x62,\n  0x61, 0x74, 0x74, 0x65, 0x6c, 0x6c, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x09,\n  0x09, 0x09, 0x63, 0x73, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6f,\n  0x6e, 0x74, 0x61, 0x63, 0x74, 0x2e, 0x63, 0x6d, 0x73, 0x67, 0x09, 0x09,\n  0x09, 0x63, 0x64, 0x62, 0x63, 0x6d, 0x73, 0x67, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72,\n  0x09, 0x09, 0x09, 0x63, 0x6d, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63,\n  0x72, 0x69, 0x63, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x72,\n  0x09, 0x09, 0x09, 0x63, 0x6c, 0x6b, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x63, 0x72, 0x69, 0x63, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x65,\n  0x72, 0x2e, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x09, 0x09,\n  0x63, 0x6c, 0x6b, 0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x72, 0x69,\n  0x63, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x70,\n  0x61, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x09, 0x09, 0x63, 0x6c, 0x6b, 0x70,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x72, 0x69, 0x63, 0x6b, 0x2e, 0x63,\n  0x6c, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,\n  0x61, 0x74, 0x65, 0x09, 0x09, 0x63, 0x6c, 0x6b, 0x74, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x63, 0x72, 0x69, 0x63, 0x6b, 0x2e, 0x63, 0x6c, 0x69, 0x63,\n  0x6b, 0x65, 0x72, 0x2e, 0x77, 0x6f, 0x72, 0x64, 0x62, 0x61, 0x6e, 0x6b,\n  0x09, 0x09, 0x63, 0x6c, 0x6b, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63,\n  0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x74, 0x6f, 0x6f, 0x6c, 0x73,\n  0x2e, 0x77, 0x62, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x77, 0x62,\n  0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x74, 0x63, 0x2d, 0x70, 0x6f,\n  0x73, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x70, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x63, 0x74, 0x63, 0x74, 0x2e, 0x77, 0x73, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75,\n  0x70, 0x73, 0x2d, 0x70, 0x64, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x63, 0x75, 0x70, 0x73, 0x2d, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x63,\n  0x72, 0x69, 0x70, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75, 0x70,\n  0x73, 0x2d, 0x70, 0x70, 0x64, 0x09, 0x09, 0x09, 0x70, 0x70, 0x64, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75, 0x70, 0x73, 0x2d, 0x72,\n  0x61, 0x73, 0x74, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x63, 0x75, 0x70, 0x73, 0x2d, 0x72, 0x61, 0x77, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x63, 0x75, 0x72, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x63, 0x75, 0x72, 0x6c, 0x2e, 0x63, 0x61, 0x72, 0x09, 0x09, 0x09, 0x63,\n  0x61, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75, 0x72, 0x6c, 0x2e,\n  0x70, 0x63, 0x75, 0x72, 0x6c, 0x09, 0x09, 0x09, 0x70, 0x63, 0x75, 0x72,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x79, 0x62, 0x61,\n  0x6e, 0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x61, 0x72, 0x74, 0x09,\n  0x09, 0x09, 0x09, 0x64, 0x61, 0x72, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x61, 0x74, 0x61, 0x2d, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e,\n  0x72, 0x64, 0x7a, 0x09, 0x09, 0x09, 0x72, 0x64, 0x7a, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x64, 0x65, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x09,\n  0x09, 0x09, 0x75, 0x76, 0x66, 0x20, 0x75, 0x76, 0x76, 0x66, 0x20, 0x75,\n  0x76, 0x64, 0x20, 0x75, 0x76, 0x76, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x65, 0x63, 0x65, 0x2e, 0x74, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x75, 0x76, 0x74, 0x20, 0x75, 0x76, 0x76, 0x74,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x65, 0x63, 0x65, 0x2e, 0x75, 0x6e,\n  0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x09, 0x09, 0x75,\n  0x76, 0x78, 0x20, 0x75, 0x76, 0x76, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x65, 0x63, 0x65, 0x2e, 0x7a, 0x69, 0x70, 0x09, 0x09, 0x09, 0x75,\n  0x76, 0x7a, 0x20, 0x75, 0x76, 0x76, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x65, 0x6e, 0x6f, 0x76, 0x6f, 0x2e, 0x66, 0x63, 0x73, 0x65, 0x6c,\n  0x61, 0x79, 0x6f, 0x75, 0x74, 0x2d, 0x6c, 0x69, 0x6e, 0x6b, 0x09, 0x09,\n  0x66, 0x65, 0x5f, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x69, 0x72, 0x2d, 0x62, 0x69, 0x2e, 0x70,\n  0x6c, 0x61, 0x74, 0x65, 0x2d, 0x64, 0x6c, 0x2d, 0x6e, 0x6f, 0x73, 0x75,\n  0x66, 0x66, 0x69, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6e, 0x61,\n  0x09, 0x09, 0x09, 0x09, 0x64, 0x6e, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x6d, 0x6c, 0x70, 0x09, 0x09, 0x09,\n  0x6d, 0x6c, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6f,\n  0x6c, 0x62, 0x79, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x2e, 0x31,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6f, 0x6c, 0x62, 0x79,\n  0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x2e, 0x32, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x64, 0x70, 0x67, 0x72, 0x61, 0x70, 0x68, 0x09, 0x09, 0x09,\n  0x09, 0x64, 0x70, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x72, 0x65,\n  0x61, 0x6d, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x09, 0x09, 0x09,\n  0x64, 0x66, 0x61, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x73, 0x2d,\n  0x6b, 0x65, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x09, 0x09, 0x09, 0x6b,\n  0x70, 0x78, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e,\n  0x61, 0x69, 0x74, 0x09, 0x09, 0x09, 0x09, 0x61, 0x69, 0x74, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x64, 0x76, 0x62,\n  0x6a, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e,\n  0x65, 0x73, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x69,\n  0x70, 0x64, 0x63, 0x64, 0x66, 0x74, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x61,\n  0x63, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x76, 0x62, 0x2e, 0x69, 0x70, 0x64, 0x63, 0x65, 0x73, 0x67, 0x61,\n  0x63, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x76, 0x62, 0x2e, 0x69, 0x70, 0x64, 0x63, 0x65, 0x73, 0x67, 0x61,\n  0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x64, 0x76, 0x62, 0x2e, 0x69, 0x70, 0x64, 0x63, 0x65, 0x73, 0x67,\n  0x70, 0x64, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76,\n  0x62, 0x2e, 0x69, 0x70, 0x64, 0x63, 0x72, 0x6f, 0x61, 0x6d, 0x69, 0x6e,\n  0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e,\n  0x69, 0x70, 0x74, 0x76, 0x2e, 0x61, 0x6c, 0x66, 0x65, 0x63, 0x2d, 0x62,\n  0x61, 0x73, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76,\n  0x62, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x2e, 0x61, 0x6c, 0x66, 0x65, 0x63,\n  0x2d, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x6e,\n  0x6f, 0x74, 0x69, 0x66, 0x2d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,\n  0x74, 0x65, 0x2d, 0x72, 0x6f, 0x6f, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x6e, 0x6f,\n  0x74, 0x69, 0x66, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,\n  0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x76, 0x62, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x2d, 0x67, 0x65,\n  0x6e, 0x65, 0x72, 0x69, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x6e, 0x6f, 0x74, 0x69,\n  0x66, 0x2d, 0x69, 0x61, 0x2d, 0x6d, 0x73, 0x67, 0x6c, 0x69, 0x73, 0x74,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64,\n  0x76, 0x62, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x2d, 0x69, 0x61, 0x2d,\n  0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x6e,\n  0x6f, 0x74, 0x69, 0x66, 0x2d, 0x69, 0x61, 0x2d, 0x72, 0x65, 0x67, 0x69,\n  0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x72, 0x65, 0x73,\n  0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x6e, 0x6f, 0x74, 0x69,\n  0x66, 0x2d, 0x69, 0x6e, 0x69, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x70, 0x66, 0x72,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x73, 0x65, 0x72,\n  0x76, 0x69, 0x63, 0x65, 0x09, 0x09, 0x09, 0x73, 0x76, 0x63, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x78, 0x72, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x64, 0x79, 0x6e, 0x61, 0x67, 0x65, 0x6f, 0x09, 0x09, 0x09, 0x09,\n  0x67, 0x65, 0x6f, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x61,\n  0x73, 0x79, 0x6b, 0x61, 0x72, 0x61, 0x6f, 0x6b, 0x65, 0x2e, 0x63, 0x64,\n  0x67, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x65, 0x63, 0x64, 0x69, 0x73, 0x2d, 0x75, 0x70,\n  0x64, 0x61, 0x74, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x63, 0x6f,\n  0x77, 0x69, 0x6e, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x74, 0x09, 0x09, 0x09,\n  0x6d, 0x61, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x63,\n  0x6f, 0x77, 0x69, 0x6e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x65, 0x71,\n  0x75, 0x65, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65,\n  0x63, 0x6f, 0x77, 0x69, 0x6e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x75, 0x70,\n  0x64, 0x61, 0x74, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65,\n  0x63, 0x6f, 0x77, 0x69, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x63, 0x6f, 0x77, 0x69,\n  0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x72, 0x65, 0x71, 0x75,\n  0x65, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x63,\n  0x6f, 0x77, 0x69, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x75,\n  0x70, 0x64, 0x61, 0x74, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x65, 0x6d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63,\n  0x65, 0x73, 0x73, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x6e, 0x6c, 0x69, 0x76,\n  0x65, 0x6e, 0x09, 0x09, 0x09, 0x09, 0x6e, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x2e,\n  0x64, 0x61, 0x74, 0x61, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x65, 0x70, 0x73, 0x6f, 0x6e, 0x2e, 0x65, 0x73, 0x66, 0x09, 0x09,\n  0x09, 0x65, 0x73, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x70, 0x73,\n  0x6f, 0x6e, 0x2e, 0x6d, 0x73, 0x66, 0x09, 0x09, 0x09, 0x6d, 0x73, 0x66,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x70, 0x73, 0x6f, 0x6e, 0x2e, 0x71,\n  0x75, 0x69, 0x63, 0x6b, 0x61, 0x6e, 0x69, 0x6d, 0x65, 0x09, 0x09, 0x71,\n  0x61, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x70, 0x73, 0x6f, 0x6e,\n  0x2e, 0x73, 0x61, 0x6c, 0x74, 0x09, 0x09, 0x09, 0x73, 0x6c, 0x74, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x65, 0x70, 0x73, 0x6f, 0x6e, 0x2e, 0x73, 0x73,\n  0x66, 0x09, 0x09, 0x09, 0x73, 0x73, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x65, 0x72, 0x69, 0x63, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x71,\n  0x75, 0x69, 0x63, 0x6b, 0x63, 0x61, 0x6c, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x65, 0x73, 0x7a, 0x69, 0x67, 0x6e, 0x6f, 0x33, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x65, 0x73, 0x33, 0x20, 0x65, 0x74, 0x33, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e, 0x61,\n  0x6f, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e, 0x63, 0x75, 0x67, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69,\n  0x2e, 0x69, 0x70, 0x74, 0x76, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65,\n  0x74, 0x73, 0x69, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x64, 0x69, 0x73, 0x63,\n  0x6f, 0x76, 0x65, 0x72, 0x79, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e, 0x69, 0x70, 0x74,\n  0x76, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e,\n  0x69, 0x70, 0x74, 0x76, 0x73, 0x61, 0x64, 0x2d, 0x62, 0x63, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73,\n  0x69, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x73, 0x61, 0x64, 0x2d, 0x63, 0x6f,\n  0x64, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x65, 0x74, 0x73, 0x69, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x73, 0x61, 0x64,\n  0x2d, 0x6e, 0x70, 0x76, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e, 0x69, 0x70, 0x74,\n  0x76, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e,\n  0x69, 0x70, 0x74, 0x76, 0x73, 0x79, 0x6e, 0x63, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e,\n  0x69, 0x70, 0x74, 0x76, 0x75, 0x65, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,\n  0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x65, 0x74, 0x73, 0x69, 0x2e, 0x6d, 0x63, 0x69, 0x64, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69,\n  0x2e, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x2d, 0x63, 0x6f,\n  0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,\n  0x2d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e,\n  0x73, 0x63, 0x69, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e, 0x73, 0x69, 0x6d, 0x73, 0x65,\n  0x72, 0x76, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x65, 0x74, 0x73, 0x69, 0x2e, 0x74, 0x73, 0x6c, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x74, 0x73,\n  0x69, 0x2e, 0x74, 0x73, 0x6c, 0x2e, 0x64, 0x65, 0x72, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x65, 0x75, 0x64, 0x6f, 0x72, 0x61, 0x2e, 0x64,\n  0x61, 0x74, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x7a, 0x70, 0x69,\n  0x78, 0x2d, 0x61, 0x6c, 0x62, 0x75, 0x6d, 0x09, 0x09, 0x09, 0x65, 0x7a,\n  0x32, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x7a, 0x70, 0x69, 0x78, 0x2d,\n  0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x09, 0x09, 0x09, 0x65, 0x7a,\n  0x33, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x2d, 0x73, 0x65,\n  0x63, 0x75, 0x72, 0x65, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x66, 0x64, 0x66, 0x09, 0x09, 0x09, 0x09, 0x66,\n  0x64, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x64, 0x73, 0x6e, 0x2e,\n  0x6d, 0x73, 0x65, 0x65, 0x64, 0x09, 0x09, 0x09, 0x6d, 0x73, 0x65, 0x65,\n  0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x64, 0x73, 0x6e, 0x2e, 0x73,\n  0x65, 0x65, 0x64, 0x09, 0x09, 0x09, 0x73, 0x65, 0x65, 0x64, 0x20, 0x64,\n  0x61, 0x74, 0x61, 0x6c, 0x65, 0x73, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x66, 0x66, 0x73, 0x6e, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x66, 0x69, 0x6e, 0x74, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x66, 0x6c, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x09, 0x09,\n  0x09, 0x67, 0x70, 0x68, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x6c, 0x75,\n  0x78, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x70, 0x09, 0x09,\n  0x09, 0x66, 0x74, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66,\n  0x6f, 0x6e, 0x74, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x66, 0x6f, 0x72, 0x67,\n  0x65, 0x2d, 0x73, 0x66, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x72,\n  0x61, 0x6d, 0x65, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x09, 0x09, 0x09, 0x66,\n  0x6d, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x6b, 0x65,\n  0x72, 0x20, 0x62, 0x6f, 0x6f, 0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66,\n  0x72, 0x6f, 0x67, 0x61, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x63, 0x09, 0x09,\n  0x09, 0x66, 0x6e, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x72, 0x6f,\n  0x67, 0x61, 0x6e, 0x73, 0x2e, 0x6c, 0x74, 0x66, 0x09, 0x09, 0x09, 0x6c,\n  0x74, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x73, 0x63, 0x2e, 0x77,\n  0x65, 0x62, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x09, 0x09, 0x09, 0x66,\n  0x73, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x74,\n  0x73, 0x75, 0x2e, 0x6f, 0x61, 0x73, 0x79, 0x73, 0x09, 0x09, 0x09, 0x6f,\n  0x61, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x74,\n  0x73, 0x75, 0x2e, 0x6f, 0x61, 0x73, 0x79, 0x73, 0x32, 0x09, 0x09, 0x09,\n  0x6f, 0x61, 0x32, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69,\n  0x74, 0x73, 0x75, 0x2e, 0x6f, 0x61, 0x73, 0x79, 0x73, 0x33, 0x09, 0x09,\n  0x09, 0x6f, 0x61, 0x33, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a,\n  0x69, 0x74, 0x73, 0x75, 0x2e, 0x6f, 0x61, 0x73, 0x79, 0x73, 0x67, 0x70,\n  0x09, 0x09, 0x09, 0x66, 0x67, 0x35, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66,\n  0x75, 0x6a, 0x69, 0x74, 0x73, 0x75, 0x2e, 0x6f, 0x61, 0x73, 0x79, 0x73,\n  0x70, 0x72, 0x73, 0x09, 0x09, 0x62, 0x68, 0x32, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x78, 0x65, 0x72, 0x6f, 0x78,\n  0x2e, 0x61, 0x72, 0x74, 0x2d, 0x65, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x78, 0x65, 0x72, 0x6f, 0x78, 0x2e,\n  0x61, 0x72, 0x74, 0x34, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66,\n  0x75, 0x6a, 0x69, 0x78, 0x65, 0x72, 0x6f, 0x78, 0x2e, 0x68, 0x62, 0x70,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x78, 0x65,\n  0x72, 0x6f, 0x78, 0x2e, 0x64, 0x64, 0x64, 0x09, 0x09, 0x09, 0x64, 0x64,\n  0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x78, 0x65,\n  0x72, 0x6f, 0x78, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x77, 0x6f, 0x72, 0x6b,\n  0x73, 0x09, 0x09, 0x78, 0x64, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66,\n  0x75, 0x6a, 0x69, 0x78, 0x65, 0x72, 0x6f, 0x78, 0x2e, 0x64, 0x6f, 0x63,\n  0x75, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x65,\n  0x72, 0x09, 0x78, 0x62, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x66, 0x75, 0x74, 0x2d, 0x6d, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x66, 0x75, 0x7a, 0x7a, 0x79, 0x73, 0x68, 0x65, 0x65,\n  0x74, 0x09, 0x09, 0x09, 0x66, 0x7a, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x67, 0x65, 0x6e, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x78, 0x2e, 0x74, 0x75,\n  0x78, 0x65, 0x64, 0x6f, 0x09, 0x09, 0x74, 0x78, 0x64, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x6f, 0x63, 0x75, 0x62, 0x65, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x6f, 0x67,\n  0x65, 0x62, 0x72, 0x61, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x09,\n  0x67, 0x67, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x6f, 0x67,\n  0x65, 0x62, 0x72, 0x61, 0x2e, 0x74, 0x6f, 0x6f, 0x6c, 0x09, 0x09, 0x09,\n  0x67, 0x67, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x6f, 0x6d,\n  0x65, 0x74, 0x72, 0x79, 0x2d, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65,\n  0x72, 0x09, 0x09, 0x67, 0x65, 0x78, 0x20, 0x67, 0x72, 0x65, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x67, 0x65, 0x6f, 0x6e, 0x65, 0x78, 0x74, 0x09, 0x09,\n  0x09, 0x09, 0x67, 0x78, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x65,\n  0x6f, 0x70, 0x6c, 0x61, 0x6e, 0x09, 0x09, 0x09, 0x09, 0x67, 0x32, 0x77,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x6f, 0x73, 0x70, 0x61, 0x63,\n  0x65, 0x09, 0x09, 0x09, 0x67, 0x33, 0x77, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x70, 0x6c, 0x61, 0x74,\n  0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x2d, 0x63, 0x6f,\n  0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6d, 0x67, 0x74, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x70, 0x6c,\n  0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x2d,\n  0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6d, 0x67, 0x74, 0x2d,\n  0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x67, 0x6d, 0x78, 0x09, 0x09, 0x09, 0x09, 0x67, 0x6d, 0x78, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x65,\n  0x61, 0x72, 0x74, 0x68, 0x2e, 0x6b, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c,\n  0x09, 0x09, 0x6b, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x6f,\n  0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x65, 0x61, 0x72, 0x74, 0x68, 0x2e, 0x6b,\n  0x6d, 0x7a, 0x09, 0x09, 0x6b, 0x6d, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x67, 0x72, 0x61, 0x66, 0x65, 0x71, 0x09, 0x09, 0x09, 0x09, 0x67, 0x71,\n  0x66, 0x20, 0x67, 0x71, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x67, 0x72, 0x69, 0x64, 0x6d, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67,\n  0x72, 0x6f, 0x6f, 0x76, 0x65, 0x2d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,\n  0x74, 0x09, 0x09, 0x09, 0x67, 0x61, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x67, 0x72, 0x6f, 0x6f, 0x76, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x70, 0x09,\n  0x09, 0x09, 0x67, 0x68, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x72,\n  0x6f, 0x6f, 0x76, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,\n  0x79, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x09, 0x09, 0x67,\n  0x69, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x72, 0x6f, 0x6f, 0x76,\n  0x65, 0x2d, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x09, 0x09,\n  0x09, 0x67, 0x72, 0x76, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x72, 0x6f,\n  0x6f, 0x76, 0x65, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x6d, 0x65, 0x73,\n  0x73, 0x61, 0x67, 0x65, 0x09, 0x09, 0x67, 0x74, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x67, 0x72, 0x6f, 0x6f, 0x76, 0x65, 0x2d, 0x74, 0x6f, 0x6f,\n  0x6c, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x09,\n  0x74, 0x70, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x72, 0x6f, 0x6f,\n  0x76, 0x65, 0x2d, 0x76, 0x63, 0x61, 0x72, 0x64, 0x09, 0x09, 0x09, 0x76,\n  0x63, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x61, 0x6c,\n  0x2b, 0x6a, 0x73, 0x6f, 0x6e, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x61,\n  0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x68, 0x61, 0x6c,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x61, 0x6e, 0x64, 0x68, 0x65, 0x6c,\n  0x64, 0x2d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x6d,\n  0x65, 0x6e, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x7a, 0x6d, 0x6d, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x68, 0x62, 0x63, 0x69, 0x09, 0x09, 0x09, 0x09,\n  0x68, 0x62, 0x63, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68,\n  0x63, 0x6c, 0x2d, 0x62, 0x69, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x68, 0x65, 0x2e, 0x6c, 0x65, 0x73,\n  0x73, 0x6f, 0x6e, 0x2d, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x09, 0x09,\n  0x6c, 0x65, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x70, 0x2d, 0x68,\n  0x70, 0x67, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x68, 0x70, 0x67, 0x6c, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x68, 0x70, 0x2d, 0x68, 0x70, 0x69, 0x64, 0x09,\n  0x09, 0x09, 0x09, 0x68, 0x70, 0x69, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x68, 0x70, 0x2d, 0x68, 0x70, 0x73, 0x09, 0x09, 0x09, 0x09, 0x68, 0x70,\n  0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x70, 0x2d, 0x6a, 0x6c, 0x79,\n  0x74, 0x09, 0x09, 0x09, 0x09, 0x6a, 0x6c, 0x74, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x68, 0x70, 0x2d, 0x70, 0x63, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x70,\n  0x63, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x70, 0x2d, 0x70, 0x63,\n  0x6c, 0x78, 0x6c, 0x09, 0x09, 0x09, 0x70, 0x63, 0x6c, 0x78, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x68, 0x6f,\n  0x6e, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x79, 0x64, 0x72, 0x6f,\n  0x73, 0x74, 0x61, 0x74, 0x69, 0x78, 0x2e, 0x73, 0x6f, 0x66, 0x2d, 0x64,\n  0x61, 0x74, 0x61, 0x09, 0x09, 0x73, 0x66, 0x64, 0x2d, 0x68, 0x64, 0x73,\n  0x74, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x7a, 0x6e,\n  0x2d, 0x33, 0x64, 0x2d, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x77, 0x6f, 0x72,\n  0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x62, 0x6d, 0x2e,\n  0x61, 0x66, 0x70, 0x6c, 0x69, 0x6e, 0x65, 0x64, 0x61, 0x74, 0x61, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x62, 0x6d, 0x2e, 0x65, 0x6c,\n  0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x2d, 0x6d, 0x65, 0x64,\n  0x69, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x62, 0x6d, 0x2e, 0x6d,\n  0x69, 0x6e, 0x69, 0x70, 0x61, 0x79, 0x09, 0x09, 0x09, 0x6d, 0x70, 0x79,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x62, 0x6d, 0x2e, 0x6d, 0x6f, 0x64,\n  0x63, 0x61, 0x70, 0x09, 0x09, 0x09, 0x61, 0x66, 0x70, 0x20, 0x6c, 0x69,\n  0x73, 0x74, 0x61, 0x66, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x33, 0x38,\n  0x32, 0x30, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x62, 0x6d, 0x2e, 0x72,\n  0x69, 0x67, 0x68, 0x74, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,\n  0x6d, 0x65, 0x6e, 0x74, 0x09, 0x09, 0x69, 0x72, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x69, 0x62, 0x6d, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65,\n  0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x09, 0x09,\n  0x73, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x63, 0x63, 0x70, 0x72,\n  0x6f, 0x66, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x69, 0x63, 0x63, 0x20,\n  0x69, 0x63, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x67, 0x6c, 0x6f,\n  0x61, 0x64, 0x65, 0x72, 0x09, 0x09, 0x09, 0x69, 0x67, 0x6c, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x69, 0x6d, 0x6d, 0x65, 0x72, 0x76, 0x69, 0x73, 0x69,\n  0x6f, 0x6e, 0x2d, 0x69, 0x76, 0x70, 0x09, 0x09, 0x09, 0x69, 0x76, 0x70,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6d, 0x6d, 0x65, 0x72, 0x76, 0x69,\n  0x73, 0x69, 0x6f, 0x6e, 0x2d, 0x69, 0x76, 0x75, 0x09, 0x09, 0x09, 0x69,\n  0x76, 0x75, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x66,\n  0x6f, 0x72, 0x6d, 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,\n  0x2e, 0x72, 0x6d, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x78, 0x2d,\n  0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x74, 0x65, 0x63, 0x68,\n  0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x74, 0x65, 0x63, 0x68, 0x2e,\n  0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x6e, 0x6f, 0x70, 0x61,\n  0x74, 0x68, 0x2e, 0x77, 0x61, 0x6d, 0x70, 0x2e, 0x6e, 0x6f, 0x74, 0x69,\n  0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x69, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x69, 0x67, 0x6d, 0x09,\n  0x09, 0x09, 0x69, 0x67, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e,\n  0x74, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x6e,\n  0x65, 0x74, 0x09, 0x09, 0x78, 0x70, 0x77, 0x20, 0x78, 0x70, 0x78, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x67, 0x65, 0x6f,\n  0x09, 0x09, 0x09, 0x69, 0x32, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x2e,\n  0x64, 0x69, 0x67, 0x69, 0x62, 0x6f, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74,\n  0x2e, 0x6e, 0x6e, 0x63, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e,\n  0x74, 0x75, 0x2e, 0x71, 0x62, 0x6f, 0x09, 0x09, 0x09, 0x71, 0x62, 0x6f,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x74, 0x75, 0x2e, 0x71, 0x66,\n  0x78, 0x09, 0x09, 0x09, 0x71, 0x66, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e, 0x67, 0x32, 0x2e, 0x63, 0x6f,\n  0x6e, 0x63, 0x65, 0x70, 0x74, 0x69, 0x74, 0x65, 0x6d, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x63,\n  0x2e, 0x67, 0x32, 0x2e, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67,\n  0x65, 0x69, 0x74, 0x65, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e, 0x67, 0x32, 0x2e,\n  0x6e, 0x65, 0x77, 0x73, 0x69, 0x74, 0x65, 0x6d, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e,\n  0x67, 0x32, 0x2e, 0x6e, 0x65, 0x77, 0x73, 0x6d, 0x65, 0x73, 0x73, 0x61,\n  0x67, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e, 0x67, 0x32, 0x2e, 0x70, 0x61, 0x63,\n  0x6b, 0x61, 0x67, 0x65, 0x69, 0x74, 0x65, 0x6d, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e,\n  0x67, 0x32, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x69,\n  0x74, 0x65, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x69, 0x70, 0x75, 0x6e, 0x70, 0x6c, 0x75, 0x67, 0x67, 0x65, 0x64, 0x2e,\n  0x72, 0x63, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x72,\n  0x63, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x69, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,\n  0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2b, 0x78, 0x6d, 0x6c,\n  0x09, 0x09, 0x69, 0x72, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x73,\n  0x2d, 0x78, 0x70, 0x72, 0x09, 0x09, 0x09, 0x09, 0x78, 0x70, 0x72, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x69, 0x73, 0x61, 0x63, 0x2e, 0x66, 0x63, 0x73,\n  0x09, 0x09, 0x09, 0x66, 0x63, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6a,\n  0x61, 0x6d, 0x09, 0x09, 0x09, 0x09, 0x6a, 0x61, 0x6d, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x74,\n  0x2d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2d, 0x73,\n  0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x74, 0x2d, 0x6a, 0x70,\n  0x6e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x77, 0x61, 0x6b, 0x65, 0x75,\n  0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6a, 0x61, 0x70, 0x61,\n  0x6e, 0x6e, 0x65, 0x74, 0x2d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,\n  0x2d, 0x77, 0x61, 0x6b, 0x65, 0x75, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x74, 0x2d, 0x72,\n  0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e,\n  0x65, 0x74, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2d, 0x77, 0x61, 0x6b, 0x65, 0x75, 0x70, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e, 0x65,\n  0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x77,\n  0x61, 0x6b, 0x65, 0x75, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x74, 0x2d, 0x76, 0x65, 0x72,\n  0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x74,\n  0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2d, 0x77, 0x61, 0x6b, 0x65, 0x75, 0x70, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6a, 0x63, 0x70, 0x2e, 0x6a, 0x61, 0x76, 0x61, 0x6d, 0x65, 0x2e,\n  0x6d, 0x69, 0x64, 0x6c, 0x65, 0x74, 0x2d, 0x72, 0x6d, 0x73, 0x09, 0x09,\n  0x72, 0x6d, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6a, 0x69, 0x73, 0x70,\n  0x09, 0x09, 0x09, 0x09, 0x6a, 0x69, 0x73, 0x70, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6a, 0x6f, 0x6f, 0x73, 0x74, 0x2e, 0x6a, 0x6f, 0x64, 0x61, 0x2d,\n  0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x09, 0x09, 0x6a, 0x6f, 0x64,\n  0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x61, 0x68, 0x6f, 0x6f, 0x74,\n  0x7a, 0x09, 0x09, 0x09, 0x09, 0x6b, 0x74, 0x7a, 0x20, 0x6b, 0x74, 0x72,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x64, 0x65, 0x2e, 0x6b, 0x61, 0x72,\n  0x62, 0x6f, 0x6e, 0x09, 0x09, 0x09, 0x6b, 0x61, 0x72, 0x62, 0x6f, 0x6e,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x64, 0x65, 0x2e, 0x6b, 0x63, 0x68,\n  0x61, 0x72, 0x74, 0x09, 0x09, 0x09, 0x63, 0x68, 0x72, 0x74, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6b, 0x64, 0x65, 0x2e, 0x6b, 0x66, 0x6f, 0x72, 0x6d,\n  0x75, 0x6c, 0x61, 0x09, 0x09, 0x09, 0x6b, 0x66, 0x6f, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6b, 0x64, 0x65, 0x2e, 0x6b, 0x69, 0x76, 0x69, 0x6f, 0x09,\n  0x09, 0x09, 0x66, 0x6c, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x64,\n  0x65, 0x2e, 0x6b, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x72, 0x09, 0x09, 0x09,\n  0x6b, 0x6f, 0x6e, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x64, 0x65, 0x2e,\n  0x6b, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x09, 0x09,\n  0x09, 0x6b, 0x70, 0x72, 0x20, 0x6b, 0x70, 0x74, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6b, 0x64, 0x65, 0x2e, 0x6b, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64,\n  0x09, 0x09, 0x09, 0x6b, 0x73, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b,\n  0x64, 0x65, 0x2e, 0x6b, 0x77, 0x6f, 0x72, 0x64, 0x09, 0x09, 0x09, 0x6b,\n  0x77, 0x64, 0x20, 0x6b, 0x77, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b,\n  0x65, 0x6e, 0x61, 0x6d, 0x65, 0x61, 0x61, 0x70, 0x70, 0x09, 0x09, 0x09,\n  0x68, 0x74, 0x6b, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x69, 0x64,\n  0x73, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x09, 0x09, 0x09,\n  0x6b, 0x69, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x69, 0x6e, 0x61,\n  0x72, 0x09, 0x09, 0x09, 0x09, 0x6b, 0x6e, 0x65, 0x20, 0x6b, 0x6e, 0x70,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x6f, 0x61, 0x6e, 0x09, 0x09, 0x09,\n  0x09, 0x73, 0x6b, 0x70, 0x20, 0x73, 0x6b, 0x64, 0x20, 0x73, 0x6b, 0x74,\n  0x20, 0x73, 0x6b, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6b, 0x6f, 0x64,\n  0x61, 0x6b, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,\n  0x72, 0x09, 0x09, 0x73, 0x73, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c,\n  0x61, 0x73, 0x2e, 0x6c, 0x61, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x6c, 0x61, 0x73, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6c, 0x69, 0x62, 0x65, 0x72, 0x74, 0x79, 0x2d, 0x72, 0x65,\n  0x71, 0x75, 0x65, 0x73, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6c, 0x6c, 0x61, 0x6d, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68,\n  0x69, 0x63, 0x73, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x2d, 0x62, 0x61, 0x6c,\n  0x61, 0x6e, 0x63, 0x65, 0x2e, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,\n  0x09, 0x6c, 0x62, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6c, 0x61,\n  0x6d, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6c,\n  0x69, 0x66, 0x65, 0x2d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x2e,\n  0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2b, 0x78, 0x6d, 0x6c,\n  0x09, 0x6c, 0x62, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6f, 0x74,\n  0x75, 0x73, 0x2d, 0x31, 0x2d, 0x32, 0x2d, 0x33, 0x09, 0x09, 0x09, 0x31,\n  0x32, 0x33, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6f, 0x74, 0x75, 0x73,\n  0x2d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x09, 0x09, 0x09,\n  0x61, 0x70, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6f, 0x74, 0x75,\n  0x73, 0x2d, 0x66, 0x72, 0x65, 0x65, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x09,\n  0x09, 0x09, 0x70, 0x72, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6f,\n  0x74, 0x75, 0x73, 0x2d, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x09, 0x09, 0x09,\n  0x6e, 0x73, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6f, 0x74, 0x75,\n  0x73, 0x2d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x09,\n  0x09, 0x09, 0x6f, 0x72, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c, 0x6f,\n  0x74, 0x75, 0x73, 0x2d, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x63, 0x61,\n  0x6d, 0x09, 0x09, 0x09, 0x73, 0x63, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6c, 0x6f, 0x74, 0x75, 0x73, 0x2d, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72,\n  0x6f, 0x09, 0x09, 0x09, 0x6c, 0x77, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x61, 0x63, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x6f, 0x72,\n  0x74, 0x70, 0x6b, 0x67, 0x09, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x6b,\n  0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x61, 0x72, 0x6c,\n  0x69, 0x6e, 0x2e, 0x64, 0x72, 0x6d, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f,\n  0x6e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x61, 0x72, 0x6c, 0x69, 0x6e, 0x2e,\n  0x64, 0x72, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x74, 0x6f, 0x6b, 0x65,\n  0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x61, 0x72, 0x6c, 0x69, 0x6e, 0x2e, 0x64, 0x72, 0x6d, 0x2e, 0x6c,\n  0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x61, 0x72, 0x6c, 0x69, 0x6e, 0x2e,\n  0x64, 0x72, 0x6d, 0x2e, 0x6d, 0x64, 0x63, 0x66, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6d, 0x63, 0x64, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x63, 0x64, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x63, 0x64,\n  0x61, 0x74, 0x61, 0x09, 0x09, 0x09, 0x6d, 0x63, 0x31, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x73, 0x74, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2e, 0x63, 0x64, 0x6b, 0x65, 0x79, 0x09, 0x09, 0x63, 0x64,\n  0x6b, 0x65, 0x79, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x65,\n  0x72, 0x69, 0x64, 0x69, 0x61, 0x6e, 0x2d, 0x73, 0x6c, 0x69, 0x6e, 0x67,\n  0x73, 0x68, 0x6f, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x66, 0x65,\n  0x72, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x77, 0x66, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6d, 0x66, 0x6d, 0x70, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x66, 0x6d,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x67, 0x72,\n  0x61, 0x66, 0x78, 0x2e, 0x66, 0x6c, 0x6f, 0x09, 0x09, 0x09, 0x66, 0x6c,\n  0x6f, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x67,\n  0x72, 0x61, 0x66, 0x78, 0x2e, 0x69, 0x67, 0x78, 0x09, 0x09, 0x09, 0x69,\n  0x67, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x69, 0x66, 0x09, 0x09,\n  0x09, 0x09, 0x6d, 0x69, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x69, 0x6e, 0x69, 0x73, 0x6f, 0x66, 0x74, 0x2d, 0x68, 0x70, 0x33,\n  0x30, 0x30, 0x30, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x69, 0x74, 0x73, 0x75, 0x62, 0x69, 0x73, 0x68,\n  0x69, 0x2e, 0x6d, 0x69, 0x73, 0x74, 0x79, 0x2d, 0x67, 0x75, 0x61, 0x72,\n  0x64, 0x2e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x77, 0x65, 0x62, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x64, 0x61,\n  0x66, 0x09, 0x09, 0x09, 0x64, 0x61, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x6f, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x64, 0x69, 0x73, 0x09, 0x09,\n  0x09, 0x64, 0x69, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x62,\n  0x69, 0x75, 0x73, 0x2e, 0x6d, 0x62, 0x6b, 0x09, 0x09, 0x09, 0x6d, 0x62,\n  0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x75, 0x73,\n  0x2e, 0x6d, 0x71, 0x79, 0x09, 0x09, 0x09, 0x6d, 0x71, 0x79, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73,\n  0x6c, 0x09, 0x09, 0x09, 0x6d, 0x73, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x6f, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x63, 0x09, 0x09,\n  0x09, 0x70, 0x6c, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x62,\n  0x69, 0x75, 0x73, 0x2e, 0x74, 0x78, 0x66, 0x09, 0x09, 0x09, 0x74, 0x78,\n  0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x70, 0x68, 0x75, 0x6e,\n  0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x09, 0x09, 0x6d, 0x70, 0x6e, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f,\n  0x70, 0x68, 0x75, 0x6e, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,\n  0x63, 0x61, 0x74, 0x65, 0x09, 0x09, 0x6d, 0x70, 0x63, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x61,\n  0x2e, 0x66, 0x6c, 0x65, 0x78, 0x73, 0x75, 0x69, 0x74, 0x65, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c,\n  0x61, 0x2e, 0x66, 0x6c, 0x65, 0x78, 0x73, 0x75, 0x69, 0x74, 0x65, 0x2e,\n  0x61, 0x64, 0x73, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x61, 0x2e, 0x66, 0x6c, 0x65, 0x78,\n  0x73, 0x75, 0x69, 0x74, 0x65, 0x2e, 0x66, 0x69, 0x73, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x61,\n  0x2e, 0x66, 0x6c, 0x65, 0x78, 0x73, 0x75, 0x69, 0x74, 0x65, 0x2e, 0x67,\n  0x6f, 0x74, 0x61, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x61, 0x2e, 0x66, 0x6c, 0x65, 0x78,\n  0x73, 0x75, 0x69, 0x74, 0x65, 0x2e, 0x6b, 0x6d, 0x72, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x61,\n  0x2e, 0x66, 0x6c, 0x65, 0x78, 0x73, 0x75, 0x69, 0x74, 0x65, 0x2e, 0x74,\n  0x74, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74,\n  0x6f, 0x72, 0x6f, 0x6c, 0x61, 0x2e, 0x66, 0x6c, 0x65, 0x78, 0x73, 0x75,\n  0x69, 0x74, 0x65, 0x2e, 0x77, 0x65, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c, 0x61, 0x2e, 0x69,\n  0x70, 0x72, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x7a, 0x69,\n  0x6c, 0x6c, 0x61, 0x2e, 0x78, 0x75, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x78, 0x75, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73,\n  0x2d, 0x61, 0x72, 0x74, 0x67, 0x61, 0x6c, 0x72, 0x79, 0x09, 0x09, 0x09,\n  0x63, 0x69, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73,\n  0x2d, 0x61, 0x73, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x63, 0x61, 0x62, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73,\n  0x65, 0x64, 0x09, 0x09, 0x63, 0x61, 0x62, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x69,\n  0x63, 0x63, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, 0x63, 0x65, 0x6c, 0x09, 0x09,\n  0x09, 0x78, 0x6c, 0x73, 0x20, 0x78, 0x6c, 0x6d, 0x20, 0x78, 0x6c, 0x61,\n  0x20, 0x78, 0x6c, 0x63, 0x20, 0x78, 0x6c, 0x74, 0x20, 0x78, 0x6c, 0x77,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, 0x63, 0x65,\n  0x6c, 0x2e, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x2e, 0x6d, 0x61, 0x63, 0x72,\n  0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31, 0x32, 0x09,\n  0x09, 0x78, 0x6c, 0x61, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73,\n  0x2d, 0x65, 0x78, 0x63, 0x65, 0x6c, 0x2e, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x2e, 0x6d, 0x61, 0x63, 0x72,\n  0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31, 0x32, 0x09,\n  0x78, 0x6c, 0x73, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x65, 0x78, 0x63, 0x65, 0x6c, 0x2e, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e,\n  0x6d, 0x61, 0x63, 0x72, 0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,\n  0x2e, 0x31, 0x32, 0x09, 0x09, 0x78, 0x6c, 0x73, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x65, 0x78, 0x63, 0x65, 0x6c, 0x2e, 0x74,\n  0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x6d, 0x61, 0x63, 0x72,\n  0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31, 0x32, 0x09,\n  0x78, 0x6c, 0x74, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x66, 0x6f, 0x6e, 0x74, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x09, 0x09,\n  0x09, 0x65, 0x6f, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x68, 0x74, 0x6d, 0x6c, 0x68, 0x65, 0x6c, 0x70, 0x09, 0x09, 0x09, 0x63,\n  0x68, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x69, 0x6d,\n  0x73, 0x09, 0x09, 0x09, 0x09, 0x69, 0x6d, 0x73, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6d, 0x73, 0x2d, 0x6c, 0x72, 0x6d, 0x09, 0x09, 0x09, 0x09, 0x6c,\n  0x72, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76,\n  0x65, 0x78, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x74, 0x68, 0x65, 0x6d,\n  0x65, 0x09, 0x09, 0x09, 0x74, 0x68, 0x6d, 0x78, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x79,\n  0x70, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6f, 0x62, 0x66, 0x75,\n  0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x74,\n  0x79, 0x70, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70,\n  0x6b, 0x69, 0x2e, 0x73, 0x65, 0x63, 0x63, 0x61, 0x74, 0x09, 0x09, 0x09,\n  0x63, 0x61, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70,\n  0x6b, 0x69, 0x2e, 0x73, 0x74, 0x6c, 0x09, 0x09, 0x09, 0x73, 0x74, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6c,\n  0x61, 0x79, 0x72, 0x65, 0x61, 0x64, 0x79, 0x2e, 0x69, 0x6e, 0x69, 0x74,\n  0x69, 0x61, 0x74, 0x6f, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x70, 0x6f,\n  0x69, 0x6e, 0x74, 0x09, 0x09, 0x09, 0x70, 0x70, 0x74, 0x20, 0x70, 0x70,\n  0x73, 0x20, 0x70, 0x6f, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73,\n  0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e,\n  0x61, 0x64, 0x64, 0x69, 0x6e, 0x2e, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x65,\n  0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31, 0x32, 0x09, 0x09, 0x70,\n  0x70, 0x61, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70,\n  0x6f, 0x77, 0x65, 0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72,\n  0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d,\n  0x61, 0x63, 0x72, 0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e,\n  0x31, 0x32, 0x09, 0x70, 0x70, 0x74, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x70, 0x6f, 0x69, 0x6e,\n  0x74, 0x2e, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x2e, 0x6d, 0x61, 0x63, 0x72,\n  0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31, 0x32, 0x09,\n  0x09, 0x73, 0x6c, 0x64, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73,\n  0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e,\n  0x73, 0x6c, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x2e, 0x6d, 0x61,\n  0x63, 0x72, 0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31,\n  0x32, 0x09, 0x09, 0x70, 0x70, 0x73, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6d, 0x73, 0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x70, 0x6f, 0x69, 0x6e,\n  0x74, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x6d,\n  0x61, 0x63, 0x72, 0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e,\n  0x31, 0x32, 0x09, 0x09, 0x70, 0x6f, 0x74, 0x6d, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69,\n  0x6e, 0x67, 0x2e, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x74, 0x69, 0x63, 0x6b,\n  0x65, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x09, 0x09, 0x09,\n  0x6d, 0x70, 0x70, 0x20, 0x6d, 0x70, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x74, 0x6e, 0x65, 0x66, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77, 0x6d, 0x64, 0x72, 0x6d,\n  0x2e, 0x6c, 0x69, 0x63, 0x2d, 0x63, 0x68, 0x6c, 0x67, 0x2d, 0x72, 0x65,\n  0x71, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77,\n  0x6d, 0x64, 0x72, 0x6d, 0x2e, 0x6c, 0x69, 0x63, 0x2d, 0x72, 0x65, 0x73,\n  0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77,\n  0x6d, 0x64, 0x72, 0x6d, 0x2e, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2d, 0x63,\n  0x68, 0x6c, 0x67, 0x2d, 0x72, 0x65, 0x71, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77, 0x6d, 0x64, 0x72, 0x6d, 0x2e, 0x6d,\n  0x65, 0x74, 0x65, 0x72, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x61, 0x63, 0x72, 0x6f,\n  0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x31, 0x32, 0x09, 0x64,\n  0x6f, 0x63, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77,\n  0x6f, 0x72, 0x64, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,\n  0x2e, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,\n  0x64, 0x2e, 0x31, 0x32, 0x09, 0x64, 0x6f, 0x74, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x09, 0x09,\n  0x09, 0x77, 0x70, 0x73, 0x20, 0x77, 0x6b, 0x73, 0x20, 0x77, 0x63, 0x6d,\n  0x20, 0x77, 0x64, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x77, 0x70, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x77, 0x70, 0x6c, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x78, 0x70, 0x73, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x09, 0x09, 0x09, 0x78, 0x70, 0x73, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x65, 0x71, 0x09, 0x09, 0x09, 0x09,\n  0x6d, 0x73, 0x65, 0x71, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x73, 0x69, 0x67, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74,\n  0x6f, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x75, 0x6c,\n  0x74, 0x69, 0x61, 0x64, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72,\n  0x2e, 0x63, 0x69, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d,\n  0x75, 0x73, 0x69, 0x63, 0x2d, 0x6e, 0x69, 0x66, 0x66, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x69, 0x61, 0x6e, 0x09, 0x09,\n  0x09, 0x6d, 0x75, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x75, 0x76,\n  0x65, 0x65, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x6d,\n  0x73, 0x74, 0x79, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x79, 0x6e, 0x66,\n  0x63, 0x09, 0x09, 0x09, 0x09, 0x74, 0x61, 0x67, 0x6c, 0x65, 0x74, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x63, 0x64, 0x2e, 0x63, 0x6f,\n  0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x63, 0x64, 0x2e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,\n  0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x65, 0x72, 0x76,\n  0x61, 0x6e, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x65,\n  0x74, 0x66, 0x70, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x65, 0x75,\n  0x72, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x6e,\n  0x6c, 0x75, 0x09, 0x09, 0x6e, 0x6c, 0x75, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x69, 0x74, 0x66, 0x09, 0x09, 0x09, 0x09, 0x6e, 0x74, 0x66, 0x20,\n  0x6e, 0x69, 0x74, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x62,\n  0x6c, 0x65, 0x6e, 0x65, 0x74, 0x2d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74,\n  0x6f, 0x72, 0x79, 0x09, 0x09, 0x6e, 0x6e, 0x64, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x6e, 0x65, 0x74, 0x2d, 0x73, 0x65,\n  0x61, 0x6c, 0x65, 0x72, 0x09, 0x09, 0x09, 0x6e, 0x6e, 0x73, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x6e, 0x65, 0x74, 0x2d,\n  0x77, 0x65, 0x62, 0x09, 0x09, 0x09, 0x6e, 0x6e, 0x77, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x63, 0x61,\n  0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x6d, 0x6c,\n  0x2b, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x63, 0x6f, 0x6e, 0x6d, 0x6c,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e,\n  0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x69, 0x73, 0x64, 0x73, 0x2d, 0x72, 0x61,\n  0x64, 0x69, 0x6f, 0x2d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e,\n  0x69, 0x70, 0x74, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f,\n  0x6b, 0x69, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x64, 0x6d, 0x61, 0x72, 0x6b,\n  0x2b, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x64, 0x6d,\n  0x61, 0x72, 0x6b, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x64,\n  0x6d, 0x61, 0x72, 0x6b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,\n  0x6f, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x6e, 0x2d, 0x67, 0x61, 0x67,\n  0x65, 0x2e, 0x61, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x6e, 0x2d, 0x67, 0x61, 0x67,\n  0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x09, 0x09, 0x6e, 0x67, 0x64, 0x61,\n  0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e,\n  0x6e, 0x2d, 0x67, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x79, 0x6d, 0x62, 0x69,\n  0x61, 0x6e, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x09, 0x6e,\n  0x2d, 0x67, 0x61, 0x67, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x6e, 0x63, 0x64, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x70, 0x63,\n  0x64, 0x2b, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x70, 0x63, 0x64, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69,\n  0x61, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x2d, 0x70, 0x72, 0x65, 0x73,\n  0x65, 0x74, 0x09, 0x09, 0x72, 0x70, 0x73, 0x74, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x6f,\n  0x2d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x09, 0x09, 0x72, 0x70,\n  0x73, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x64,\n  0x69, 0x67, 0x6d, 0x2e, 0x65, 0x64, 0x6d, 0x09, 0x09, 0x09, 0x65, 0x64,\n  0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x64, 0x69,\n  0x67, 0x6d, 0x2e, 0x65, 0x64, 0x78, 0x09, 0x09, 0x09, 0x65, 0x64, 0x78,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x64, 0x69, 0x67,\n  0x6d, 0x2e, 0x65, 0x78, 0x74, 0x09, 0x09, 0x09, 0x65, 0x78, 0x74, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x74, 0x74, 0x2d, 0x6c, 0x6f,\n  0x63, 0x61, 0x6c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x74, 0x72, 0x61,\n  0x6e, 0x73, 0x66, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x74, 0x74, 0x2d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x73, 0x69,\n  0x70, 0x2d, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x74, 0x74, 0x2d, 0x6c, 0x6f,\n  0x63, 0x61, 0x6c, 0x2e, 0x73, 0x69, 0x70, 0x2d, 0x74, 0x61, 0x5f, 0x74,\n  0x63, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x68, 0x61,\n  0x72, 0x74, 0x09, 0x09, 0x6f, 0x64, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x74,\n  0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x6f, 0x74,\n  0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x09, 0x09, 0x6f,\n  0x64, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n  0x74, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x09, 0x09, 0x6f,\n  0x64, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n  0x74, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x2d, 0x74, 0x65,\n  0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x6f, 0x64, 0x66, 0x74, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67,\n  0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x09, 0x09, 0x6f, 0x64, 0x67,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e,\n  0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2d, 0x74, 0x65, 0x6d,\n  0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x6f, 0x74, 0x67, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x61,\n  0x67, 0x65, 0x09, 0x09, 0x6f, 0x64, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65,\n  0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x6f, 0x74,\n  0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x09, 0x09, 0x6f, 0x64, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,\n  0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6c,\n  0x61, 0x74, 0x65, 0x09, 0x6f, 0x74, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61,\n  0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x09, 0x09, 0x6f, 0x64, 0x73, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73,\n  0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2d, 0x74,\n  0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x6f, 0x74, 0x73, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x74,\n  0x65, 0x78, 0x74, 0x09, 0x09, 0x09, 0x6f, 0x64, 0x74, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x74, 0x65, 0x78,\n  0x74, 0x2d, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x09, 0x09, 0x6f, 0x64,\n  0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x61, 0x73, 0x69, 0x73, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,\n  0x74, 0x65, 0x09, 0x6f, 0x74, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x61, 0x73, 0x69, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x77,\n  0x65, 0x62, 0x09, 0x09, 0x6f, 0x74, 0x68, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x62, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x66, 0x74, 0x6e, 0x2e, 0x6c, 0x31, 0x30, 0x6e, 0x2b, 0x6a, 0x73,\n  0x6f, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x69, 0x70,\n  0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x61, 0x63, 0x63,\n  0x65, 0x73, 0x73, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x69,\n  0x70, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x61, 0x63,\n  0x63, 0x65, 0x73, 0x73, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,\n  0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x69, 0x70, 0x66, 0x2e, 0x63, 0x73, 0x70, 0x67, 0x2d, 0x68, 0x65,\n  0x78, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x69, 0x70, 0x66, 0x2e, 0x64, 0x61, 0x65, 0x2e, 0x73,\n  0x76, 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x69, 0x70, 0x66, 0x2e, 0x64, 0x61, 0x65, 0x2e, 0x78, 0x68,\n  0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x69, 0x70, 0x66, 0x2e, 0x6d, 0x69, 0x70, 0x70, 0x76,\n  0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6d, 0x65, 0x73, 0x73, 0x61,\n  0x67, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x69, 0x70, 0x66, 0x2e, 0x70, 0x61, 0x65, 0x2e, 0x67, 0x65,\n  0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x69, 0x70, 0x66,\n  0x2e, 0x73, 0x70, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x69, 0x70, 0x66, 0x2e, 0x73, 0x70, 0x64, 0x6c, 0x69, 0x73, 0x74, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x69,\n  0x70, 0x66, 0x2e, 0x75, 0x65, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x69, 0x70, 0x66, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x66,\n  0x69, 0x6c, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x6c, 0x70, 0x63, 0x2d, 0x73, 0x75, 0x67, 0x61, 0x72, 0x09, 0x09,\n  0x09, 0x78, 0x6f, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2d, 0x73, 0x63, 0x77, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69,\n  0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2d,\n  0x73, 0x63, 0x77, 0x73, 0x2d, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x72, 0x65,\n  0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x6d, 0x61, 0x2d, 0x73, 0x63, 0x77, 0x73, 0x2d, 0x68, 0x74, 0x74,\n  0x70, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61,\n  0x73, 0x74, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65,\n  0x64, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x2d,\n  0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e,\n  0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x64, 0x72, 0x6d, 0x2d, 0x74, 0x72,\n  0x69, 0x67, 0x67, 0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61, 0x73,\n  0x74, 0x2e, 0x69, 0x6d, 0x64, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61, 0x73,\n  0x74, 0x2e, 0x6c, 0x74, 0x6b, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x6e,\n  0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x76,\n  0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x74, 0x72, 0x69, 0x67,\n  0x67, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x73, 0x67, 0x62, 0x6f,\n  0x6f, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61,\n  0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x73, 0x67, 0x64, 0x64, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x73, 0x67, 0x64, 0x75,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62,\n  0x63, 0x61, 0x73, 0x74, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2d,\n  0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x61,\n  0x69, 0x6e, 0x65, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x73, 0x6d, 0x61,\n  0x72, 0x74, 0x63, 0x61, 0x72, 0x64, 0x2d, 0x74, 0x72, 0x69, 0x67, 0x67,\n  0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x73,\n  0x70, 0x72, 0x6f, 0x76, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x62, 0x63, 0x61, 0x73, 0x74,\n  0x2e, 0x73, 0x74, 0x6b, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x6d, 0x61, 0x2e, 0x63, 0x61, 0x62, 0x2d, 0x61, 0x64, 0x64, 0x72,\n  0x65, 0x73, 0x73, 0x2d, 0x62, 0x6f, 0x6f, 0x6b, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x63,\n  0x61, 0x62, 0x2d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2d, 0x68,\n  0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x63, 0x61, 0x62,\n  0x2d, 0x70, 0x63, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x63, 0x61, 0x62, 0x2d, 0x75,\n  0x73, 0x65, 0x72, 0x2d, 0x70, 0x72, 0x65, 0x66, 0x73, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e,\n  0x64, 0x63, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2e, 0x64, 0x63, 0x64, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x6d, 0x61, 0x2e, 0x64, 0x64, 0x32, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x64, 0x64, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x6d, 0x61, 0x2e, 0x64, 0x72, 0x6d, 0x2e, 0x72, 0x69, 0x73, 0x64, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x75, 0x73, 0x61, 0x67,\n  0x65, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x70, 0x61, 0x6c,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x6d, 0x61, 0x2e, 0x70, 0x6f, 0x63, 0x2e, 0x64, 0x65, 0x74, 0x61, 0x69,\n  0x6c, 0x65, 0x64, 0x2d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,\n  0x2d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x70, 0x6f,\n  0x63, 0x2e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x72, 0x65, 0x70, 0x6f,\n  0x72, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x70, 0x6f, 0x63, 0x2e, 0x67, 0x72, 0x6f,\n  0x75, 0x70, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x70, 0x6f, 0x63, 0x2e, 0x69, 0x6e,\n  0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x64, 0x65, 0x73,\n  0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x70, 0x6f,\n  0x63, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x2d,\n  0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2d, 0x72, 0x65, 0x70,\n  0x6f, 0x72, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x2e, 0x73, 0x63, 0x69,\n  0x64, 0x6d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x2e, 0x78, 0x63, 0x61, 0x70, 0x2d, 0x64, 0x69, 0x72, 0x65, 0x63,\n  0x74, 0x6f, 0x72, 0x79, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61, 0x64, 0x73, 0x2d, 0x65, 0x6d, 0x61,\n  0x69, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x6d, 0x61, 0x64, 0x73, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d,\n  0x61, 0x64, 0x73, 0x2d, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x6d, 0x61,\n  0x6c, 0x6f, 0x63, 0x2d, 0x73, 0x75, 0x70, 0x6c, 0x2d, 0x69, 0x6e, 0x69,\n  0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x78, 0x74, 0x65,\n  0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x09, 0x09, 0x6f, 0x78, 0x74, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63,\n  0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,\n  0x74, 0x69, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x75, 0x73,\n  0x74, 0x6f, 0x6d, 0x78, 0x6d, 0x6c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,\n  0x74, 0x69, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x64, 0x72, 0x61,\n  0x77, 0x69, 0x6e, 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x64, 0x72, 0x61,\n  0x77, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x74,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n  0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75,\n  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67,\n  0x6d, 0x6c, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x68, 0x61, 0x70,\n  0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x69,\n  0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x72, 0x61, 0x6d,\n  0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x64,\n  0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x64, 0x69, 0x61,\n  0x67, 0x72, 0x61, 0x6d, 0x64, 0x61, 0x74, 0x61, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x64, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x64,\n  0x69, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n  0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75,\n  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67,\n  0x6d, 0x6c, 0x2e, 0x64, 0x69, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x74,\n  0x79, 0x6c, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x65, 0x78, 0x74, 0x65,\n  0x6e, 0x64, 0x65, 0x64, 0x2d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,\n  0x69, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73,\n  0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x63,\n  0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,\n  0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n  0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,\n  0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x63, 0x6f, 0x6d,\n  0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,\n  0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c,\n  0x2e, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x75, 0x74, 0x6d, 0x61, 0x73, 0x74,\n  0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65,\n  0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x6e, 0x6f,\n  0x74, 0x65, 0x73, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e,\n  0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f,\n  0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n  0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x73, 0x6c,\n  0x69, 0x64, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n  0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,\n  0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x70, 0x72, 0x65,\n  0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x09, 0x70, 0x70,\n  0x74, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65,\n  0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d,\n  0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,\n  0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,\n  0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73,\n  0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n  0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x70,\n  0x72, 0x6f, 0x70, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65,\n  0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x73, 0x6c,\n  0x69, 0x64, 0x65, 0x09, 0x73, 0x6c, 0x64, 0x78, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65,\n  0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e,\n  0x73, 0x6c, 0x69, 0x64, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,\n  0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c,\n  0x2e, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n  0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75,\n  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x73, 0x6c, 0x69, 0x64,\n  0x65, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,\n  0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c,\n  0x2e, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x09, 0x70,\n  0x70, 0x73, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73,\n  0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n  0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x73, 0x6c, 0x69, 0x64, 0x65,\n  0x73, 0x68, 0x6f, 0x77, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e,\n  0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f,\n  0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n  0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x75, 0x70,\n  0x64, 0x61, 0x74, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x6d, 0x6c, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x79,\n  0x6c, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73,\n  0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x74,\n  0x61, 0x67, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n  0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,\n  0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x74, 0x65, 0x6d,\n  0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x70, 0x6f, 0x74, 0x78, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70,\n  0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d,\n  0x6c, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x6d,\n  0x61, 0x69, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x73,\n  0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6c, 0x2e, 0x76,\n  0x69, 0x65, 0x77, 0x70, 0x72, 0x6f, 0x70, 0x73, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x6d, 0x6c, 0x2e, 0x63, 0x61, 0x6c, 0x63, 0x63, 0x68, 0x61, 0x69, 0x6e,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n  0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75,\n  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73,\n  0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x74,\n  0x73, 0x68, 0x65, 0x65, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70,\n  0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e,\n  0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x6d, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,\n  0x6e, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61,\n  0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x64, 0x69, 0x61,\n  0x6c, 0x6f, 0x67, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x6d, 0x6c, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x6c,\n  0x69, 0x6e, 0x6b, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65,\n  0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x70, 0x69,\n  0x76, 0x6f, 0x74, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x65, 0x66, 0x69,\n  0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73,\n  0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c,\n  0x2e, 0x70, 0x69, 0x76, 0x6f, 0x74, 0x63, 0x61, 0x63, 0x68, 0x65, 0x72,\n  0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73,\n  0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c,\n  0x2e, 0x70, 0x69, 0x76, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73,\n  0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n  0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68,\n  0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x74,\n  0x61, 0x62, 0x6c, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72,\n  0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x72,\n  0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x68, 0x65, 0x61, 0x64, 0x65,\n  0x72, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61,\n  0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x72, 0x65, 0x76,\n  0x69, 0x73, 0x69, 0x6f, 0x6e, 0x6c, 0x6f, 0x67, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x6d, 0x6c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x73, 0x74, 0x72,\n  0x69, 0x6e, 0x67, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61,\n  0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x73, 0x68, 0x65,\n  0x65, 0x74, 0x09, 0x78, 0x6c, 0x73, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65,\n  0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x73, 0x68,\n  0x65, 0x65, 0x74, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x6d, 0x6c, 0x2e, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61,\n  0x64, 0x61, 0x74, 0x61, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72,\n  0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x73,\n  0x74, 0x79, 0x6c, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70,\n  0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e,\n  0x74, 0x61, 0x62, 0x6c, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70,\n  0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e,\n  0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x63,\n  0x65, 0x6c, 0x6c, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61,\n  0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x74, 0x65, 0x6d,\n  0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x78, 0x6c, 0x74, 0x78, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73,\n  0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c,\n  0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x6d, 0x61,\n  0x69, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61,\n  0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c, 0x2e, 0x75, 0x73, 0x65,\n  0x72, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x73,\n  0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x6d, 0x6c,\n  0x2e, 0x76, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6c, 0x65, 0x64, 0x65, 0x70,\n  0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e,\n  0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f,\n  0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,\n  0x74, 0x2e, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65,\n  0x74, 0x6d, 0x6c, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65,\n  0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n  0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63,\n  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73,\n  0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n  0x65, 0x6e, 0x74, 0x2e, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x6f, 0x76, 0x65,\n  0x72, 0x72, 0x69, 0x64, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x6d,\n  0x6c, 0x64, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65,\n  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72,\n  0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d,\n  0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,\n  0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,\n  0x6e, 0x74, 0x09, 0x64, 0x6f, 0x63, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x64,\n  0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d, 0x6c,\n  0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x6c,\n  0x6f, 0x73, 0x73, 0x61, 0x72, 0x79, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77,\n  0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e,\n  0x67, 0x6d, 0x6c, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f,\n  0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67,\n  0x6d, 0x6c, 0x2e, 0x65, 0x6e, 0x64, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73,\n  0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d,\n  0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63,\n  0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x66, 0x6f, 0x6e,\n  0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77,\n  0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e,\n  0x67, 0x6d, 0x6c, 0x2e, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65,\n  0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d,\n  0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,\n  0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65,\n  0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x66, 0x6f, 0x6f, 0x74,\n  0x6e, 0x6f, 0x74, 0x65, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66,\n  0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63,\n  0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f,\n  0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67,\n  0x6d, 0x6c, 0x2e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x6e, 0x67,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n  0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75,\n  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f,\n  0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x73, 0x65,\n  0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c,\n  0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69,\n  0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77,\n  0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e,\n  0x67, 0x6d, 0x6c, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78,\n  0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66,\n  0x66, 0x69, 0x63, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n  0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,\n  0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,\n  0x74, 0x65, 0x09, 0x64, 0x6f, 0x74, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72,\n  0x6d, 0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64,\n  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x64,\n  0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d, 0x6c,\n  0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x6d, 0x61,\n  0x69, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d,\n  0x61, 0x74, 0x73, 0x2d, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x64, 0x6f,\n  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70,\n  0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x6d, 0x6c, 0x2e,\n  0x77, 0x65, 0x62, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2b,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73,\n  0x2d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x63, 0x6f, 0x72,\n  0x65, 0x2d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,\n  0x73, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x64, 0x69,\n  0x67, 0x69, 0x74, 0x61, 0x6c, 0x2d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,\n  0x75, 0x72, 0x65, 0x2d, 0x78, 0x6d, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x61,\n  0x74, 0x75, 0x72, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x78, 0x6d, 0x6c, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x73, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,\n  0x65, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68,\n  0x69, 0x70, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x71, 0x75, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x71,\n  0x75, 0x6f, 0x78, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x73, 0x61, 0x2e, 0x6e, 0x65,\n  0x74, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6f, 0x73, 0x67, 0x65, 0x6f, 0x2e, 0x6d, 0x61, 0x70, 0x67, 0x75, 0x69,\n  0x64, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x09, 0x09,\n  0x6d, 0x67, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x73,\n  0x67, 0x69, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6f, 0x73, 0x67, 0x69, 0x2e, 0x64, 0x70, 0x09, 0x09, 0x09,\n  0x09, 0x64, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x73, 0x67, 0x69,\n  0x2e, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x09, 0x09,\n  0x09, 0x65, 0x73, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f,\n  0x74, 0x70, 0x73, 0x2e, 0x63, 0x74, 0x2d, 0x6b, 0x69, 0x70, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x61, 0x6c, 0x6d, 0x09,\n  0x09, 0x09, 0x09, 0x70, 0x64, 0x62, 0x20, 0x70, 0x71, 0x61, 0x20, 0x6f,\n  0x70, 0x72, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x61,\n  0x6f, 0x73, 0x2e, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70,\n  0x61, 0x77, 0x61, 0x61, 0x66, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x70,\n  0x61, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x67, 0x2e, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x09, 0x09, 0x09, 0x73, 0x74, 0x72, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x70, 0x67, 0x2e, 0x6f, 0x73, 0x61, 0x73, 0x6c, 0x69,\n  0x09, 0x09, 0x09, 0x65, 0x69, 0x36, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x70, 0x69, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x6c, 0x69,\n  0x63, 0x65, 0x6e, 0x63, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x69,\n  0x63, 0x73, 0x65, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x65, 0x66, 0x69, 0x66,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x6d, 0x69, 0x2e, 0x77, 0x69, 0x64,\n  0x67, 0x65, 0x74, 0x09, 0x09, 0x09, 0x77, 0x67, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x70, 0x6f, 0x63, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70,\n  0x2d, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65,\n  0x6e, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70,\n  0x6f, 0x63, 0x6b, 0x65, 0x74, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x09, 0x09,\n  0x09, 0x70, 0x6c, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x6f, 0x77,\n  0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x36, 0x09, 0x09,\n  0x09, 0x70, 0x62, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70,\n  0x6f, 0x77, 0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x36,\n  0x2d, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x6f, 0x77,\n  0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x37, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x62, 0x75,\n  0x69, 0x6c, 0x64, 0x65, 0x72, 0x37, 0x2d, 0x73, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x62, 0x75, 0x69, 0x6c,\n  0x64, 0x65, 0x72, 0x37, 0x35, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x70, 0x6f, 0x77, 0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72,\n  0x37, 0x35, 0x2d, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70,\n  0x72, 0x65, 0x6d, 0x69, 0x6e, 0x65, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x79, 0x73, 0x74, 0x65,\n  0x6d, 0x73, 0x2e, 0x62, 0x6f, 0x78, 0x09, 0x09, 0x62, 0x6f, 0x78, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x75, 0x73, 0x2e,\n  0x6d, 0x61, 0x67, 0x61, 0x7a, 0x69, 0x6e, 0x65, 0x09, 0x09, 0x6d, 0x67,\n  0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73,\n  0x68, 0x61, 0x72, 0x65, 0x2d, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x2d, 0x74,\n  0x72, 0x65, 0x65, 0x09, 0x09, 0x71, 0x70, 0x73, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x70, 0x76, 0x69, 0x2e, 0x70, 0x74, 0x69, 0x64, 0x31, 0x09, 0x09,\n  0x09, 0x70, 0x74, 0x69, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x70, 0x77, 0x67, 0x2d, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65,\n  0x78, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x77,\n  0x67, 0x2d, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x2d, 0x70, 0x72, 0x69, 0x6e,\n  0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x71, 0x75, 0x61, 0x6c, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x62, 0x72, 0x65,\n  0x77, 0x2d, 0x61, 0x70, 0x70, 0x2d, 0x72, 0x65, 0x73, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x71, 0x75, 0x61, 0x72, 0x6b, 0x2e, 0x71, 0x75, 0x61, 0x72,\n  0x6b, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x09, 0x09, 0x71, 0x78, 0x64,\n  0x20, 0x71, 0x78, 0x74, 0x20, 0x71, 0x77, 0x64, 0x20, 0x71, 0x77, 0x74,\n  0x20, 0x71, 0x78, 0x6c, 0x20, 0x71, 0x78, 0x62, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d,\n  0x6f, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73,\n  0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73, 0x6d,\n  0x6c, 0x2d, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79,\n  0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c, 0x2d, 0x61, 0x75, 0x64, 0x69, 0x74,\n  0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e,\n  0x6d, 0x73, 0x6d, 0x6c, 0x2d, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2d, 0x63,\n  0x6f, 0x6e, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73,\n  0x6d, 0x6c, 0x2d, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2d, 0x64, 0x69, 0x61,\n  0x6c, 0x6f, 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73,\n  0x6d, 0x6c, 0x2d, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2d, 0x73, 0x74, 0x72,\n  0x65, 0x61, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73,\n  0x6d, 0x6c, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79,\n  0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c, 0x2d, 0x64, 0x69, 0x61, 0x6c, 0x6f,\n  0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c,\n  0x2d, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x62, 0x61, 0x73, 0x65,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72,\n  0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c, 0x2d,\n  0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x66, 0x61, 0x78, 0x2d, 0x64,\n  0x65, 0x74, 0x65, 0x63, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e,\n  0x6d, 0x73, 0x6d, 0x6c, 0x2d, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2d,\n  0x66, 0x61, 0x78, 0x2d, 0x73, 0x65, 0x6e, 0x64, 0x72, 0x65, 0x63, 0x76,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72,\n  0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c, 0x2d,\n  0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72,\n  0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c, 0x2d,\n  0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x73, 0x70, 0x65, 0x65, 0x63,\n  0x68, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d, 0x73, 0x6d, 0x6c,\n  0x2d, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x74, 0x72, 0x61, 0x6e,\n  0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x72, 0x61, 0x69, 0x6e, 0x73, 0x74, 0x6f, 0x72,\n  0x2e, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x72, 0x61, 0x70, 0x69, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72, 0x65,\n  0x61, 0x6c, 0x76, 0x6e, 0x63, 0x2e, 0x62, 0x65, 0x64, 0x09, 0x09, 0x09,\n  0x62, 0x65, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72, 0x65, 0x63, 0x6f,\n  0x72, 0x64, 0x61, 0x72, 0x65, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x6d, 0x78, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x61, 0x72, 0x65, 0x2e, 0x6d, 0x75,\n  0x73, 0x69, 0x63, 0x78, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x6d, 0x75, 0x73, 0x69, 0x63, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x72, 0x65, 0x6e, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x2e,\n  0x72, 0x6c, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x72, 0x69, 0x67, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x6e, 0x6f,\n  0x74, 0x65, 0x09, 0x09, 0x09, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x6e,\n  0x6f, 0x74, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72, 0x69, 0x6d, 0x2e,\n  0x63, 0x6f, 0x64, 0x09, 0x09, 0x09, 0x09, 0x63, 0x6f, 0x64, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x72, 0x6e, 0x2d, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x65,\n  0x64, 0x69, 0x61, 0x09, 0x09, 0x09, 0x72, 0x6d, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x72, 0x6e, 0x2d, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x65, 0x64, 0x69,\n  0x61, 0x2d, 0x76, 0x62, 0x72, 0x09, 0x09, 0x72, 0x6d, 0x76, 0x62, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x36, 0x36, 0x2e,\n  0x6c, 0x69, 0x6e, 0x6b, 0x36, 0x36, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x6c, 0x69, 0x6e, 0x6b, 0x36, 0x36, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x72, 0x73, 0x2d, 0x32, 0x37, 0x34, 0x78, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x72, 0x75, 0x63, 0x6b, 0x75, 0x73, 0x2e, 0x64, 0x6f,\n  0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x73, 0x33, 0x73, 0x6d, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73,\n  0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65,\n  0x72, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x09, 0x09, 0x73, 0x74, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x62, 0x6d, 0x2e, 0x63, 0x69,\n  0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x62, 0x6d, 0x2e,\n  0x6d, 0x69, 0x64, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73,\n  0x63, 0x72, 0x69, 0x62, 0x75, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e, 0x33, 0x64, 0x66, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64,\n  0x2e, 0x63, 0x73, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73,\n  0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e, 0x65,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61,\n  0x6c, 0x65, 0x64, 0x2e, 0x6d, 0x68, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e, 0x6e, 0x65, 0x74,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65,\n  0x64, 0x2e, 0x70, 0x70, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e, 0x74, 0x69, 0x66, 0x66, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64,\n  0x2e, 0x78, 0x6c, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73,\n  0x65, 0x61, 0x6c, 0x65, 0x64, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x73,\n  0x6f, 0x66, 0x74, 0x73, 0x65, 0x61, 0x6c, 0x2e, 0x68, 0x74, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65,\n  0x64, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x73, 0x6f, 0x66, 0x74, 0x73,\n  0x65, 0x61, 0x6c, 0x2e, 0x70, 0x64, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x73, 0x65, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x73,\n  0x65, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x09,\n  0x09, 0x09, 0x09, 0x73, 0x65, 0x6d, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x73, 0x65, 0x6d, 0x64, 0x09, 0x09, 0x09, 0x09, 0x73, 0x65, 0x6d, 0x64,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x6d, 0x66, 0x09, 0x09, 0x09,\n  0x09, 0x73, 0x65, 0x6d, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x68,\n  0x61, 0x6e, 0x61, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64,\n  0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x64, 0x61, 0x74, 0x61, 0x09, 0x09, 0x69,\n  0x66, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x68, 0x61, 0x6e, 0x61,\n  0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x2e, 0x66, 0x6f,\n  0x72, 0x6d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x69,\n  0x74, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x68, 0x61, 0x6e, 0x61,\n  0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x2e, 0x69, 0x6e,\n  0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x09, 0x69, 0x69,\n  0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x68, 0x61, 0x6e, 0x61, 0x2e,\n  0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x63,\n  0x6b, 0x61, 0x67, 0x65, 0x09, 0x09, 0x69, 0x70, 0x6b, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x73, 0x69, 0x6d, 0x74, 0x65, 0x63, 0x68, 0x2d, 0x6d, 0x69,\n  0x6e, 0x64, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x09, 0x09, 0x74, 0x77,\n  0x64, 0x20, 0x74, 0x77, 0x64, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73,\n  0x6d, 0x61, 0x66, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x6d, 0x66, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x2e, 0x6e,\n  0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x73, 0x6d, 0x61, 0x72, 0x74, 0x2e, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65,\n  0x72, 0x09, 0x09, 0x09, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61,\n  0x72, 0x65, 0x36, 0x30, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x72,\n  0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,\n  0x36, 0x30, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x66,\n  0x6f, 0x72, 0x6d, 0x2d, 0x78, 0x6d, 0x6c, 0x2d, 0x7a, 0x69, 0x70, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x6f, 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x73,\n  0x64, 0x6b, 0x6d, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x73, 0x64,\n  0x6b, 0x6d, 0x20, 0x73, 0x64, 0x6b, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x73, 0x70, 0x6f, 0x74, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x64, 0x78, 0x70,\n  0x09, 0x09, 0x09, 0x64, 0x78, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73,\n  0x70, 0x6f, 0x74, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x73, 0x66, 0x73, 0x09,\n  0x09, 0x09, 0x73, 0x66, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x73, 0x73, 0x73, 0x2d, 0x63, 0x6f, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x73, 0x73, 0x73, 0x2d, 0x64, 0x74, 0x66, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x73, 0x73, 0x2d, 0x6e, 0x74, 0x66, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x64, 0x69, 0x76, 0x69,\n  0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x63, 0x61, 0x6c, 0x63, 0x09, 0x09, 0x73,\n  0x64, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x64,\n  0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x64, 0x72, 0x61, 0x77,\n  0x09, 0x09, 0x73, 0x64, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74,\n  0x61, 0x72, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x69,\n  0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x09, 0x09, 0x73, 0x64, 0x64, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x64, 0x69, 0x76, 0x69,\n  0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x09, 0x09, 0x73,\n  0x6d, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x64,\n  0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x77, 0x72, 0x69, 0x74,\n  0x65, 0x72, 0x09, 0x09, 0x73, 0x64, 0x77, 0x20, 0x76, 0x6f, 0x72, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x64, 0x69, 0x76, 0x69,\n  0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2d,\n  0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x09, 0x73, 0x67, 0x6c, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x6d, 0x61, 0x6e, 0x69, 0x61,\n  0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x09, 0x09, 0x73, 0x6d,\n  0x7a, 0x69, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x74, 0x65, 0x70,\n  0x6d, 0x61, 0x6e, 0x69, 0x61, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x63, 0x68,\n  0x61, 0x72, 0x74, 0x09, 0x09, 0x73, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x72,\n  0x65, 0x61, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e,\n  0x78, 0x6d, 0x6c, 0x2e, 0x63, 0x61, 0x6c, 0x63, 0x09, 0x09, 0x09, 0x73,\n  0x78, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78,\n  0x6d, 0x6c, 0x2e, 0x63, 0x61, 0x6c, 0x63, 0x2e, 0x74, 0x65, 0x6d, 0x70,\n  0x6c, 0x61, 0x74, 0x65, 0x09, 0x09, 0x73, 0x74, 0x63, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78, 0x6d, 0x6c, 0x2e, 0x64, 0x72,\n  0x61, 0x77, 0x09, 0x09, 0x09, 0x73, 0x78, 0x64, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78, 0x6d, 0x6c, 0x2e, 0x64, 0x72, 0x61,\n  0x77, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x09,\n  0x73, 0x74, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e,\n  0x78, 0x6d, 0x6c, 0x2e, 0x69, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x09,\n  0x09, 0x09, 0x73, 0x78, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75,\n  0x6e, 0x2e, 0x78, 0x6d, 0x6c, 0x2e, 0x69, 0x6d, 0x70, 0x72, 0x65, 0x73,\n  0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x09, 0x73,\n  0x74, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78,\n  0x6d, 0x6c, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x09, 0x09, 0x09, 0x73, 0x78,\n  0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78, 0x6d,\n  0x6c, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x09, 0x09, 0x09, 0x73,\n  0x78, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78,\n  0x6d, 0x6c, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x67, 0x6c,\n  0x6f, 0x62, 0x61, 0x6c, 0x09, 0x09, 0x73, 0x78, 0x67, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x78, 0x6d, 0x6c, 0x2e, 0x77, 0x72,\n  0x69, 0x74, 0x65, 0x72, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,\n  0x65, 0x09, 0x09, 0x73, 0x74, 0x77, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x77, 0x61, 0x64, 0x6c, 0x2b, 0x78, 0x6d,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x73, 0x2d, 0x63, 0x61,\n  0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x09, 0x09, 0x09, 0x73, 0x75, 0x73,\n  0x20, 0x73, 0x75, 0x73, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x76,\n  0x64, 0x09, 0x09, 0x09, 0x09, 0x73, 0x76, 0x64, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x76, 0x69, 0x65, 0x77,\n  0x2d, 0x69, 0x63, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x79, 0x6d,\n  0x62, 0x69, 0x61, 0x6e, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,\n  0x09, 0x09, 0x09, 0x73, 0x69, 0x73, 0x20, 0x73, 0x69, 0x73, 0x78, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x6d, 0x6c, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x09, 0x78, 0x73, 0x6d, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x73, 0x79, 0x6e, 0x63, 0x6d, 0x6c, 0x2e, 0x64, 0x6d, 0x2b, 0x77,\n  0x62, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x62, 0x64, 0x6d, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x6d, 0x6c, 0x2e, 0x64, 0x6d,\n  0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x78, 0x64, 0x6d, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x6d, 0x6c, 0x2e,\n  0x64, 0x6d, 0x2e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x79,\n  0x6e, 0x63, 0x6d, 0x6c, 0x2e, 0x64, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x69,\n  0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x74, 0x61, 0x6f, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d,\n  0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2d, 0x61, 0x72, 0x63, 0x68, 0x69,\n  0x76, 0x65, 0x09, 0x74, 0x61, 0x6f, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x74,\n  0x63, 0x70, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x70, 0x63, 0x61, 0x70, 0x09,\n  0x09, 0x09, 0x70, 0x63, 0x61, 0x70, 0x20, 0x63, 0x61, 0x70, 0x20, 0x64,\n  0x6d, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x74, 0x6d, 0x6f, 0x62, 0x69,\n  0x6c, 0x65, 0x2d, 0x6c, 0x69, 0x76, 0x65, 0x74, 0x76, 0x09, 0x09, 0x09,\n  0x74, 0x6d, 0x6f, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x74, 0x72, 0x69, 0x64,\n  0x2e, 0x74, 0x70, 0x74, 0x09, 0x09, 0x09, 0x74, 0x70, 0x74, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e,\n  0x6d, 0x78, 0x73, 0x09, 0x09, 0x09, 0x6d, 0x78, 0x73, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x74, 0x72, 0x75, 0x65, 0x61, 0x70, 0x70, 0x09, 0x09, 0x09,\n  0x09, 0x74, 0x72, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x74,\n  0x72, 0x75, 0x65, 0x64, 0x6f, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x75, 0x62, 0x69, 0x73, 0x6f, 0x66, 0x74, 0x2e, 0x77, 0x65, 0x62,\n  0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75,\n  0x66, 0x64, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x75, 0x66, 0x64, 0x20, 0x75,\n  0x66, 0x64, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x69, 0x71, 0x2e,\n  0x74, 0x68, 0x65, 0x6d, 0x65, 0x09, 0x09, 0x09, 0x75, 0x74, 0x7a, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x75, 0x6d, 0x61, 0x6a, 0x69, 0x6e, 0x09, 0x09,\n  0x09, 0x09, 0x75, 0x6d, 0x6a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x6e,\n  0x69, 0x74, 0x79, 0x09, 0x09, 0x09, 0x09, 0x75, 0x6e, 0x69, 0x74, 0x79,\n  0x77, 0x65, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x6f, 0x6d, 0x6c,\n  0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x75, 0x6f, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65,\n  0x74, 0x2e, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x61, 0x6c,\n  0x65, 0x72, 0x74, 0x2d, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e,\n  0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x2d, 0x63, 0x68, 0x6f, 0x69, 0x63,\n  0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61,\n  0x6e, 0x65, 0x74, 0x2e, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x2d, 0x63,\n  0x68, 0x6f, 0x69, 0x63, 0x65, 0x2d, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65,\n  0x74, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x6f, 0x70, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e,\n  0x63, 0x61, 0x63, 0x68, 0x65, 0x6f, 0x70, 0x2d, 0x77, 0x62, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61,\n  0x6e, 0x65, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65,\n  0x74, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2d, 0x77, 0x62,\n  0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70,\n  0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74,\n  0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65,\n  0x74, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x63, 0x6d, 0x64, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x2e,\n  0x6c, 0x69, 0x73, 0x74, 0x63, 0x6d, 0x64, 0x2d, 0x77, 0x62, 0x78, 0x6d,\n  0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x75, 0x70, 0x6c, 0x61,\n  0x6e, 0x65, 0x74, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x76, 0x63, 0x78, 0x09, 0x09, 0x09, 0x09, 0x76, 0x63,\n  0x78, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x64, 0x2d, 0x73,\n  0x74, 0x75, 0x64, 0x79, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76,\n  0x65, 0x63, 0x74, 0x6f, 0x72, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x6d, 0x61, 0x74,\n  0x72, 0x69, 0x78, 0x2e, 0x76, 0x63, 0x61, 0x73, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x76, 0x69, 0x64, 0x73, 0x6f, 0x66, 0x74, 0x2e, 0x76,\n  0x69, 0x64, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x09, 0x09,\n  0x09, 0x09, 0x76, 0x73, 0x64, 0x20, 0x76, 0x73, 0x74, 0x20, 0x76, 0x73,\n  0x73, 0x20, 0x76, 0x73, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x69,\n  0x73, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x09, 0x09, 0x09, 0x76, 0x69,\n  0x73, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x69, 0x76, 0x69,\n  0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,\n  0x66, 0x69, 0x6c, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x73, 0x66,\n  0x09, 0x09, 0x09, 0x09, 0x76, 0x73, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x77, 0x61, 0x70, 0x2e, 0x73, 0x69, 0x63, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x77, 0x61, 0x70, 0x2e, 0x73, 0x6c, 0x63, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x77, 0x61, 0x70, 0x2e, 0x77, 0x62, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x77, 0x62, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x77, 0x61, 0x70, 0x2e, 0x77, 0x6d, 0x6c, 0x63, 0x09, 0x09,\n  0x09, 0x77, 0x6d, 0x6c, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x61,\n  0x70, 0x2e, 0x77, 0x6d, 0x6c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x63,\n  0x09, 0x09, 0x09, 0x77, 0x6d, 0x6c, 0x73, 0x63, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x77, 0x65, 0x62, 0x74, 0x75, 0x72, 0x62, 0x6f, 0x09, 0x09, 0x09,\n  0x77, 0x74, 0x62, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x66,\n  0x61, 0x2e, 0x77, 0x73, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x77, 0x6d, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x6d,\n  0x66, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x6f, 0x6c, 0x66, 0x72, 0x61,\n  0x6d, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63,\n  0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x6f, 0x6c, 0x66,\n  0x72, 0x61, 0x6d, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74,\n  0x69, 0x63, 0x61, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x77, 0x6f, 0x6c, 0x66, 0x72, 0x61, 0x6d, 0x2e,\n  0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x09, 0x09, 0x09, 0x6e, 0x62, 0x70,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x65, 0x72,\n  0x66, 0x65, 0x63, 0x74, 0x09, 0x09, 0x09, 0x77, 0x70, 0x64, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x77, 0x71, 0x64, 0x09, 0x09, 0x09, 0x09, 0x77, 0x71,\n  0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x72, 0x71, 0x2d,\n  0x68, 0x70, 0x33, 0x30, 0x30, 0x30, 0x2d, 0x6c, 0x61, 0x62, 0x65, 0x6c,\n  0x6c, 0x65, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x74, 0x2e, 0x73,\n  0x74, 0x66, 0x09, 0x09, 0x09, 0x09, 0x73, 0x74, 0x66, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x77, 0x76, 0x2e, 0x63, 0x73, 0x70, 0x2b, 0x77,\n  0x62, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77,\n  0x76, 0x2e, 0x63, 0x73, 0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x77, 0x76, 0x2e, 0x73, 0x73, 0x70, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x78, 0x61, 0x72, 0x61, 0x09,\n  0x09, 0x09, 0x09, 0x78, 0x61, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x78,\n  0x66, 0x64, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x66, 0x64, 0x6c, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x78, 0x66, 0x64, 0x6c, 0x2e, 0x77,\n  0x65, 0x62, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x78, 0x6d, 0x69, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x78, 0x6d, 0x70, 0x69, 0x65, 0x2e, 0x63, 0x70, 0x6b,\n  0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x78, 0x6d, 0x70, 0x69,\n  0x65, 0x2e, 0x64, 0x70, 0x6b, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x78, 0x6d, 0x70, 0x69, 0x65, 0x2e, 0x70, 0x6c, 0x61, 0x6e, 0x0a,\n  0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x78, 0x6d, 0x70, 0x69, 0x65, 0x2e,\n  0x70, 0x70, 0x6b, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x78,\n  0x6d, 0x70, 0x69, 0x65, 0x2e, 0x78, 0x6c, 0x69, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x68, 0x76, 0x2d,\n  0x64, 0x69, 0x63, 0x09, 0x09, 0x09, 0x68, 0x76, 0x64, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x68, 0x76, 0x2d,\n  0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x09, 0x09, 0x68, 0x76, 0x73, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x68,\n  0x76, 0x2d, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x09, 0x09, 0x09, 0x68, 0x76,\n  0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61,\n  0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x66, 0x6f,\n  0x72, 0x6d, 0x61, 0x74, 0x09, 0x09, 0x09, 0x6f, 0x73, 0x66, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x6f, 0x70,\n  0x65, 0x6e, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61,\n  0x74, 0x2e, 0x6f, 0x73, 0x66, 0x70, 0x76, 0x67, 0x2b, 0x78, 0x6d, 0x6c,\n  0x09, 0x6f, 0x73, 0x66, 0x70, 0x76, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x6d,\n  0x6f, 0x74, 0x65, 0x2d, 0x73, 0x65, 0x74, 0x75, 0x70, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x73, 0x6d, 0x61,\n  0x66, 0x2d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x09, 0x09, 0x73, 0x61, 0x66,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e,\n  0x73, 0x6d, 0x61, 0x66, 0x2d, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x09,\n  0x09, 0x73, 0x70, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x79,\n  0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67,\n  0x68, 0x2d, 0x6e, 0x67, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x79, 0x61, 0x6d, 0x61, 0x68, 0x61, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65,\n  0x6c, 0x2d, 0x75, 0x64, 0x70, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x72, 0x69, 0x76,\n  0x65, 0x72, 0x2d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2d, 0x6d, 0x65,\n  0x6e, 0x75, 0x09, 0x09, 0x63, 0x6d, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x7a, 0x75, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x7a, 0x69, 0x72, 0x20, 0x7a,\n  0x69, 0x72, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x7a, 0x7a, 0x61, 0x7a,\n  0x7a, 0x2e, 0x64, 0x65, 0x63, 0x6b, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x7a, 0x61, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x78, 0x6d,\n  0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x76, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x76, 0x71, 0x2d, 0x72, 0x74, 0x63, 0x70, 0x78, 0x72,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x69, 0x6e,\n  0x66, 0x6f, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x77, 0x68, 0x6f,\n  0x69, 0x73, 0x70, 0x70, 0x2d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x0a, 0x23,\n  0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x77, 0x68, 0x6f, 0x69, 0x73, 0x70, 0x70, 0x2d, 0x72, 0x65, 0x73,\n  0x70, 0x6f, 0x6e, 0x73, 0x65, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,\n  0x09, 0x09, 0x09, 0x09, 0x77, 0x67, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x77, 0x69, 0x6e, 0x68,\n  0x6c, 0x70, 0x09, 0x09, 0x09, 0x09, 0x68, 0x6c, 0x70, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x77, 0x69, 0x74, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x77, 0x6f, 0x72, 0x64, 0x70,\n  0x65, 0x72, 0x66, 0x65, 0x63, 0x74, 0x35, 0x2e, 0x31, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x77, 0x73,\n  0x64, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x77, 0x73,\n  0x64, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x77, 0x73, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x77, 0x73, 0x70, 0x6f, 0x6c, 0x69,\n  0x63, 0x79, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x37, 0x7a, 0x2d, 0x63, 0x6f, 0x6d, 0x70,\n  0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09, 0x09, 0x37, 0x7a, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x61, 0x62, 0x69, 0x77, 0x6f, 0x72, 0x64, 0x09, 0x09, 0x09,\n  0x09, 0x61, 0x62, 0x77, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x61, 0x63, 0x65, 0x2d, 0x63,\n  0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09, 0x09,\n  0x61, 0x63, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x61, 0x6d, 0x66, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d, 0x64, 0x69, 0x73, 0x6b,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x09, 0x09, 0x09, 0x64, 0x6d, 0x67, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x65,\n  0x2d, 0x62, 0x69, 0x6e, 0x09, 0x09, 0x09, 0x61, 0x61, 0x62, 0x20, 0x78,\n  0x33, 0x32, 0x20, 0x75, 0x33, 0x32, 0x20, 0x76, 0x6f, 0x78, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x65, 0x2d,\n  0x6d, 0x61, 0x70, 0x09, 0x09, 0x09, 0x61, 0x61, 0x6d, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x73,\n  0x65, 0x67, 0x09, 0x09, 0x09, 0x61, 0x61, 0x73, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x62,\n  0x63, 0x70, 0x69, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x62, 0x63, 0x70, 0x69,\n  0x6f, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x62, 0x69, 0x74, 0x74, 0x6f, 0x72, 0x72, 0x65,\n  0x6e, 0x74, 0x09, 0x09, 0x09, 0x74, 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x62, 0x6c, 0x6f, 0x72, 0x62, 0x09, 0x09, 0x09, 0x09,\n  0x62, 0x6c, 0x62, 0x20, 0x62, 0x6c, 0x6f, 0x72, 0x62, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x62, 0x7a, 0x69, 0x70, 0x09, 0x09, 0x09, 0x09, 0x62, 0x7a, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x2d, 0x62, 0x7a, 0x69, 0x70, 0x32, 0x09, 0x09, 0x09, 0x09, 0x62, 0x7a,\n  0x32, 0x20, 0x62, 0x6f, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x63, 0x62, 0x72, 0x09,\n  0x09, 0x09, 0x09, 0x63, 0x62, 0x72, 0x20, 0x63, 0x62, 0x61, 0x20, 0x63,\n  0x62, 0x74, 0x20, 0x63, 0x62, 0x7a, 0x20, 0x63, 0x62, 0x37, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x2d, 0x63, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x09, 0x09, 0x09, 0x09, 0x76,\n  0x63, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x63, 0x66, 0x73, 0x2d, 0x63, 0x6f, 0x6d,\n  0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09, 0x09, 0x63, 0x66,\n  0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x63, 0x68, 0x61, 0x74, 0x09, 0x09, 0x09, 0x09,\n  0x63, 0x68, 0x61, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x63, 0x68, 0x65, 0x73, 0x73,\n  0x2d, 0x70, 0x67, 0x6e, 0x09, 0x09, 0x09, 0x09, 0x70, 0x67, 0x6e, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,\n  0x09, 0x09, 0x09, 0x6e, 0x73, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x63,\n  0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x63, 0x70,\n  0x69, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x63, 0x70, 0x69, 0x6f, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x2d, 0x63, 0x73, 0x68, 0x09, 0x09, 0x09, 0x09, 0x63, 0x73, 0x68, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x64, 0x65, 0x62, 0x69, 0x61, 0x6e, 0x2d, 0x70, 0x61, 0x63,\n  0x6b, 0x61, 0x67, 0x65, 0x09, 0x09, 0x09, 0x64, 0x65, 0x62, 0x20, 0x75,\n  0x64, 0x65, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x64, 0x67, 0x63, 0x2d, 0x63, 0x6f,\n  0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09, 0x09, 0x64,\n  0x67, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,\n  0x72, 0x09, 0x09, 0x09, 0x64, 0x69, 0x72, 0x20, 0x64, 0x63, 0x72, 0x20,\n  0x64, 0x78, 0x72, 0x20, 0x63, 0x73, 0x74, 0x20, 0x63, 0x63, 0x74, 0x20,\n  0x63, 0x78, 0x74, 0x20, 0x77, 0x33, 0x64, 0x20, 0x66, 0x67, 0x64, 0x20,\n  0x73, 0x77, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x64, 0x6f, 0x6f, 0x6d, 0x09, 0x09,\n  0x09, 0x09, 0x77, 0x61, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x64, 0x74, 0x62, 0x6e,\n  0x63, 0x78, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x6e, 0x63, 0x78,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x64, 0x74, 0x62, 0x6f, 0x6f, 0x6b, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x64, 0x74, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x64, 0x74,\n  0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x72, 0x65, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x64, 0x76,\n  0x69, 0x09, 0x09, 0x09, 0x09, 0x64, 0x76, 0x69, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x65,\n  0x6e, 0x76, 0x6f, 0x79, 0x09, 0x09, 0x09, 0x09, 0x65, 0x76, 0x79, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x65, 0x76, 0x61, 0x09, 0x09, 0x09, 0x09, 0x65, 0x76, 0x61,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x62, 0x64, 0x66, 0x09,\n  0x09, 0x09, 0x09, 0x62, 0x64, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66,\n  0x6f, 0x6e, 0x74, 0x2d, 0x64, 0x6f, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x6d, 0x61,\n  0x6b, 0x65, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x67,\n  0x68, 0x6f, 0x73, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x09, 0x09,\n  0x09, 0x67, 0x73, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e,\n  0x74, 0x2d, 0x6c, 0x69, 0x62, 0x67, 0x72, 0x78, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66,\n  0x6f, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x70, 0x73,\n  0x66, 0x09, 0x09, 0x09, 0x70, 0x73, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f,\n  0x6e, 0x74, 0x2d, 0x6f, 0x74, 0x66, 0x09, 0x09, 0x09, 0x09, 0x6f, 0x74,\n  0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x70, 0x63, 0x66,\n  0x09, 0x09, 0x09, 0x09, 0x70, 0x63, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f,\n  0x6e, 0x74, 0x2d, 0x73, 0x6e, 0x66, 0x09, 0x09, 0x09, 0x09, 0x73, 0x6e,\n  0x66, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73,\n  0x70, 0x65, 0x65, 0x64, 0x6f, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f,\n  0x6e, 0x74, 0x2d, 0x73, 0x75, 0x6e, 0x6f, 0x73, 0x2d, 0x6e, 0x65, 0x77,\n  0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x74, 0x74, 0x66,\n  0x09, 0x09, 0x09, 0x09, 0x74, 0x74, 0x66, 0x20, 0x74, 0x74, 0x63, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x31,\n  0x09, 0x09, 0x09, 0x70, 0x66, 0x61, 0x20, 0x70, 0x66, 0x62, 0x20, 0x70,\n  0x66, 0x6d, 0x20, 0x61, 0x66, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x2d,\n  0x77, 0x6f, 0x66, 0x66, 0x09, 0x09, 0x09, 0x09, 0x77, 0x6f, 0x66, 0x66,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x76, 0x66,\n  0x6f, 0x6e, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x72, 0x65, 0x65, 0x61, 0x72,\n  0x63, 0x09, 0x09, 0x09, 0x09, 0x61, 0x72, 0x63, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66,\n  0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x6c, 0x61, 0x73, 0x68, 0x09,\n  0x09, 0x09, 0x73, 0x70, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x67, 0x63, 0x61, 0x2d,\n  0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09,\n  0x09, 0x67, 0x63, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x67, 0x6c, 0x75, 0x6c, 0x78,\n  0x09, 0x09, 0x09, 0x09, 0x75, 0x6c, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x67, 0x6e,\n  0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x09, 0x09, 0x09, 0x09, 0x67, 0x6e,\n  0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x67, 0x72, 0x61,\n  0x6d, 0x70, 0x73, 0x2d, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x67, 0x72,\n  0x61, 0x6d, 0x70, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x67, 0x74, 0x61, 0x72, 0x09,\n  0x09, 0x09, 0x09, 0x67, 0x74, 0x61, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x67, 0x7a, 0x69, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x68, 0x64, 0x66, 0x09, 0x09,\n  0x09, 0x09, 0x68, 0x64, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x69, 0x6e, 0x73, 0x74,\n  0x61, 0x6c, 0x6c, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,\n  0x69, 0x6f, 0x6e, 0x73, 0x09, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x69, 0x73, 0x6f, 0x39, 0x36, 0x36, 0x30, 0x2d,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x09, 0x09, 0x09, 0x69, 0x73, 0x6f, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x6a, 0x61, 0x76, 0x61, 0x2d, 0x6a, 0x6e, 0x6c, 0x70, 0x2d,\n  0x66, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x6a, 0x6e, 0x6c, 0x70, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x6c, 0x61, 0x74, 0x65, 0x78, 0x09, 0x09, 0x09, 0x09, 0x6c,\n  0x61, 0x74, 0x65, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6c, 0x7a, 0x68, 0x2d, 0x63,\n  0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09, 0x09,\n  0x6c, 0x7a, 0x68, 0x20, 0x6c, 0x68, 0x61, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x69,\n  0x65, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x69, 0x65, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d,\n  0x6f, 0x62, 0x69, 0x70, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x65, 0x62,\n  0x6f, 0x6f, 0x6b, 0x09, 0x09, 0x09, 0x70, 0x72, 0x63, 0x20, 0x6d, 0x6f,\n  0x62, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x09, 0x09, 0x09, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x6d, 0x73, 0x2d, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x09,\n  0x09, 0x09, 0x6c, 0x6e, 0x6b, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77,\n  0x6d, 0x64, 0x09, 0x09, 0x09, 0x09, 0x77, 0x6d, 0x64, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x6d, 0x73, 0x2d, 0x77, 0x6d, 0x7a, 0x09, 0x09, 0x09, 0x09, 0x77, 0x6d,\n  0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x78, 0x62, 0x61, 0x70, 0x09,\n  0x09, 0x09, 0x09, 0x78, 0x62, 0x61, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73,\n  0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x64,\n  0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x62, 0x69, 0x6e, 0x64, 0x65, 0x72,\n  0x09, 0x09, 0x09, 0x09, 0x6f, 0x62, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73,\n  0x63, 0x61, 0x72, 0x64, 0x66, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x63,\n  0x72, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x63, 0x6c, 0x69, 0x70, 0x09,\n  0x09, 0x09, 0x09, 0x63, 0x6c, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x64,\n  0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x09, 0x09, 0x09, 0x65, 0x78,\n  0x65, 0x20, 0x64, 0x6c, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x20, 0x62, 0x61,\n  0x74, 0x20, 0x6d, 0x73, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x6d, 0x65,\n  0x64, 0x69, 0x61, 0x76, 0x69, 0x65, 0x77, 0x09, 0x09, 0x09, 0x6d, 0x76,\n  0x62, 0x20, 0x6d, 0x31, 0x33, 0x20, 0x6d, 0x31, 0x34, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x6d, 0x73, 0x6d, 0x65, 0x74, 0x61, 0x66, 0x69, 0x6c, 0x65, 0x09, 0x09,\n  0x09, 0x77, 0x6d, 0x66, 0x20, 0x77, 0x6d, 0x7a, 0x20, 0x65, 0x6d, 0x66,\n  0x20, 0x65, 0x6d, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x6d, 0x6f, 0x6e,\n  0x65, 0x79, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x6e, 0x79, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x6d, 0x73, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x09,\n  0x09, 0x09, 0x70, 0x75, 0x62, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x73, 0x63,\n  0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x73, 0x63, 0x64,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,\n  0x6c, 0x09, 0x09, 0x09, 0x74, 0x72, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6d, 0x73,\n  0x77, 0x72, 0x69, 0x74, 0x65, 0x09, 0x09, 0x09, 0x09, 0x77, 0x72, 0x69,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x6e, 0x65, 0x74, 0x63, 0x64, 0x66, 0x09, 0x09, 0x09,\n  0x09, 0x6e, 0x63, 0x20, 0x63, 0x64, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x6e, 0x7a,\n  0x62, 0x09, 0x09, 0x09, 0x09, 0x6e, 0x7a, 0x62, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x70,\n  0x6b, 0x63, 0x73, 0x31, 0x32, 0x09, 0x09, 0x09, 0x09, 0x70, 0x31, 0x32,\n  0x20, 0x70, 0x66, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x70, 0x6b, 0x63, 0x73, 0x37,\n  0x2d, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,\n  0x73, 0x09, 0x09, 0x70, 0x37, 0x62, 0x20, 0x73, 0x70, 0x63, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x2d, 0x70, 0x6b, 0x63, 0x73, 0x37, 0x2d, 0x63, 0x65, 0x72, 0x74, 0x72,\n  0x65, 0x71, 0x72, 0x65, 0x73, 0x70, 0x09, 0x09, 0x09, 0x70, 0x37, 0x72,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x72, 0x61, 0x72, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x72,\n  0x65, 0x73, 0x73, 0x65, 0x64, 0x09, 0x09, 0x09, 0x72, 0x61, 0x72, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x72, 0x65, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2d, 0x69,\n  0x6e, 0x66, 0x6f, 0x2d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x09,\n  0x09, 0x72, 0x69, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x68, 0x09, 0x09, 0x09,\n  0x09, 0x73, 0x68, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x68, 0x61, 0x72, 0x09, 0x09,\n  0x09, 0x09, 0x73, 0x68, 0x61, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x68, 0x6f,\n  0x63, 0x6b, 0x77, 0x61, 0x76, 0x65, 0x2d, 0x66, 0x6c, 0x61, 0x73, 0x68,\n  0x09, 0x09, 0x09, 0x73, 0x77, 0x66, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x69, 0x6c,\n  0x76, 0x65, 0x72, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2d, 0x61, 0x70, 0x70,\n  0x09, 0x09, 0x09, 0x78, 0x61, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x71, 0x6c,\n  0x09, 0x09, 0x09, 0x09, 0x73, 0x71, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x74,\n  0x75, 0x66, 0x66, 0x69, 0x74, 0x09, 0x09, 0x09, 0x09, 0x73, 0x69, 0x74,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x73, 0x74, 0x75, 0x66, 0x66, 0x69, 0x74, 0x78, 0x09,\n  0x09, 0x09, 0x09, 0x73, 0x69, 0x74, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73, 0x75,\n  0x62, 0x72, 0x69, 0x70, 0x09, 0x09, 0x09, 0x09, 0x73, 0x72, 0x74, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x73, 0x76, 0x34, 0x63, 0x70, 0x69, 0x6f, 0x09, 0x09, 0x09,\n  0x09, 0x73, 0x76, 0x34, 0x63, 0x70, 0x69, 0x6f, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x73,\n  0x76, 0x34, 0x63, 0x72, 0x63, 0x09, 0x09, 0x09, 0x09, 0x73, 0x76, 0x34,\n  0x63, 0x72, 0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x74, 0x33, 0x76, 0x6d, 0x2d, 0x69,\n  0x6d, 0x61, 0x67, 0x65, 0x09, 0x09, 0x09, 0x74, 0x33, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x74, 0x61, 0x64, 0x73, 0x09, 0x09, 0x09, 0x09, 0x67, 0x61, 0x6d, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x74, 0x61, 0x72, 0x09, 0x09, 0x09, 0x09, 0x74, 0x61, 0x72,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x74, 0x63, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x74, 0x63,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x74, 0x65, 0x78, 0x09, 0x09, 0x09, 0x09, 0x74,\n  0x65, 0x78, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x74, 0x65, 0x78, 0x2d, 0x74, 0x66, 0x6d,\n  0x09, 0x09, 0x09, 0x09, 0x74, 0x66, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x74, 0x65,\n  0x78, 0x69, 0x6e, 0x66, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x74, 0x65, 0x78,\n  0x69, 0x6e, 0x66, 0x6f, 0x20, 0x74, 0x65, 0x78, 0x69, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d,\n  0x74, 0x67, 0x69, 0x66, 0x09, 0x09, 0x09, 0x09, 0x6f, 0x62, 0x6a, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x2d, 0x75, 0x73, 0x74, 0x61, 0x72, 0x09, 0x09, 0x09, 0x09, 0x75,\n  0x73, 0x74, 0x61, 0x72, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x61, 0x69, 0x73, 0x2d,\n  0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x09, 0x09, 0x09, 0x73, 0x72, 0x63,\n  0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x2f, 0x78, 0x2d, 0x78, 0x35, 0x30, 0x39, 0x2d, 0x63, 0x61, 0x2d, 0x63,\n  0x65, 0x72, 0x74, 0x09, 0x09, 0x09, 0x64, 0x65, 0x72, 0x20, 0x63, 0x72,\n  0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x2d, 0x78, 0x66, 0x69, 0x67, 0x09, 0x09, 0x09, 0x09,\n  0x66, 0x69, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x78, 0x6c, 0x69, 0x66, 0x66, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x6c, 0x66, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x2d, 0x78, 0x70, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x09, 0x09,\n  0x09, 0x09, 0x78, 0x70, 0x69, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x78, 0x7a, 0x09, 0x09,\n  0x09, 0x09, 0x78, 0x7a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x7a, 0x6d, 0x61, 0x63, 0x68,\n  0x69, 0x6e, 0x65, 0x09, 0x09, 0x09, 0x09, 0x7a, 0x31, 0x20, 0x7a, 0x32,\n  0x20, 0x7a, 0x33, 0x20, 0x7a, 0x34, 0x20, 0x7a, 0x35, 0x20, 0x7a, 0x36,\n  0x20, 0x7a, 0x37, 0x20, 0x7a, 0x38, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x34, 0x30,\n  0x30, 0x2d, 0x62, 0x70, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x61, 0x6d, 0x6c, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x61, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x63, 0x61, 0x70, 0x2d, 0x61, 0x74, 0x74, 0x2b, 0x78, 0x6d, 0x6c,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x63, 0x61, 0x70, 0x2d, 0x63, 0x61, 0x70, 0x73,\n  0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x63, 0x61, 0x70, 0x2d, 0x64, 0x69,\n  0x66, 0x66, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x78, 0x64, 0x66,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x63, 0x61, 0x70, 0x2d, 0x65, 0x6c, 0x2b, 0x78,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,\n  0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x63, 0x61, 0x70, 0x2d, 0x65, 0x72,\n  0x72, 0x6f, 0x72, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x63,\n  0x61, 0x70, 0x2d, 0x6e, 0x73, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x63, 0x6f, 0x6e, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65,\n  0x6e, 0x63, 0x65, 0x2d, 0x69, 0x6e, 0x66, 0x6f, 0x2d, 0x64, 0x69, 0x66,\n  0x66, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c,\n  0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x63, 0x6f, 0x6e,\n  0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d,\n  0x69, 0x6e, 0x66, 0x6f, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x65, 0x6e,\n  0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x65, 0x6e,\n  0x63, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x78, 0x68, 0x74,\n  0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,\n  0x6f, 0x6e, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x2d, 0x76, 0x6f, 0x69,\n  0x63, 0x65, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x78, 0x6d, 0x6c, 0x20, 0x78, 0x73, 0x6c, 0x0a, 0x61,\n  0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,\n  0x6d, 0x6c, 0x2d, 0x64, 0x74, 0x64, 0x09, 0x09, 0x09, 0x09, 0x64, 0x74,\n  0x64, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,\n  0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x6d, 0x6c, 0x2d, 0x65, 0x78, 0x74, 0x65,\n  0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2d,\n  0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x0a, 0x23, 0x20, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x6d, 0x70,\n  0x70, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x6f, 0x70, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x6f, 0x70, 0x0a, 0x61, 0x70, 0x70,\n  0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x70, 0x72,\n  0x6f, 0x63, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x70,\n  0x6c, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,\n  0x6e, 0x2f, 0x78, 0x73, 0x6c, 0x74, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09,\n  0x09, 0x09, 0x78, 0x73, 0x6c, 0x74, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x73, 0x70, 0x66, 0x2b,\n  0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x78, 0x73, 0x70, 0x66, 0x0a,\n  0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,\n  0x78, 0x76, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x78,\n  0x6d, 0x6c, 0x20, 0x78, 0x68, 0x76, 0x6d, 0x6c, 0x20, 0x78, 0x76, 0x6d,\n  0x6c, 0x20, 0x78, 0x76, 0x6d, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,\n  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6e, 0x67, 0x09, 0x09,\n  0x09, 0x09, 0x79, 0x61, 0x6e, 0x67, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x69,\n  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x69, 0x6e, 0x2b, 0x78,\n  0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x79, 0x69, 0x6e, 0x0a, 0x61, 0x70,\n  0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, 0x69,\n  0x70, 0x09, 0x09, 0x09, 0x09, 0x09, 0x7a, 0x69, 0x70, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x31, 0x64, 0x2d, 0x69, 0x6e, 0x74,\n  0x65, 0x72, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x64, 0x2d, 0x70, 0x61, 0x72,\n  0x69, 0x74, 0x79, 0x66, 0x65, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x33, 0x32, 0x6b, 0x61, 0x64, 0x70, 0x63, 0x6d, 0x0a,\n  0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x33, 0x67, 0x70, 0x70,\n  0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x33, 0x67, 0x70,\n  0x70, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x61,\n  0x63, 0x33, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x61, 0x64, 0x70,\n  0x63, 0x6d, 0x09, 0x09, 0x09, 0x09, 0x09, 0x61, 0x64, 0x70, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x61, 0x6d, 0x72, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x61, 0x6d, 0x72, 0x2d, 0x77,\n  0x62, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x61, 0x6d,\n  0x72, 0x2d, 0x77, 0x62, 0x2b, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x61, 0x73, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x61, 0x74, 0x72, 0x61, 0x63, 0x2d, 0x61, 0x64, 0x76, 0x61,\n  0x6e, 0x63, 0x65, 0x64, 0x2d, 0x6c, 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73,\n  0x73, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x61, 0x74,\n  0x72, 0x61, 0x63, 0x2d, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x61, 0x74, 0x72, 0x61, 0x63, 0x33, 0x0a, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x61, 0x75, 0x20, 0x73, 0x6e, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x62, 0x76, 0x31, 0x36, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x62, 0x76, 0x33, 0x32, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x6d,\n  0x6f, 0x64, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x63, 0x6e, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x64,\n  0x61, 0x74, 0x31, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x64, 0x6c, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x64, 0x73, 0x72, 0x2d, 0x65, 0x73, 0x32, 0x30, 0x31, 0x31, 0x30,\n  0x38, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x64, 0x73,\n  0x72, 0x2d, 0x65, 0x73, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x64, 0x73, 0x72, 0x2d, 0x65,\n  0x73, 0x32, 0x30, 0x32, 0x32, 0x31, 0x31, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x64, 0x73, 0x72, 0x2d, 0x65, 0x73, 0x32, 0x30,\n  0x32, 0x32, 0x31, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x64, 0x76, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x64, 0x76, 0x69, 0x34, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x65, 0x61, 0x63, 0x33, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63, 0x2d, 0x71, 0x63, 0x70, 0x0a,\n  0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63,\n  0x30, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x65, 0x76,\n  0x72, 0x63, 0x31, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x65, 0x76, 0x72, 0x63, 0x62, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63, 0x62, 0x30, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63, 0x62, 0x31, 0x0a,\n  0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63,\n  0x77, 0x62, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x65,\n  0x76, 0x72, 0x63, 0x77, 0x62, 0x30, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x65, 0x76, 0x72, 0x63, 0x77, 0x62, 0x31, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,\n  0x6c, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x66,\n  0x77, 0x64, 0x72, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x67, 0x37, 0x31, 0x39, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x32, 0x31, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x33, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x36, 0x2d,\n  0x31, 0x36, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67,\n  0x37, 0x32, 0x36, 0x2d, 0x32, 0x34, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x36, 0x2d, 0x33, 0x32, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x36, 0x2d,\n  0x34, 0x30, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67,\n  0x37, 0x32, 0x38, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x67, 0x37, 0x32, 0x39, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x67, 0x37, 0x32, 0x39, 0x31, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x39, 0x64, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67, 0x37, 0x32, 0x39, 0x65, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67, 0x73, 0x6d, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67, 0x73, 0x6d, 0x2d, 0x65,\n  0x66, 0x72, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x67,\n  0x73, 0x6d, 0x2d, 0x68, 0x72, 0x2d, 0x30, 0x38, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x69, 0x6c, 0x62, 0x63, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x69, 0x70, 0x2d, 0x6d, 0x72, 0x5f,\n  0x76, 0x32, 0x2e, 0x35, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x69, 0x73, 0x61, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x6c, 0x31, 0x36, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x6c, 0x32, 0x30, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x6c, 0x32, 0x34, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x6c, 0x38, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x6c, 0x70, 0x63, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d,\n  0x69, 0x64, 0x69, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x69, 0x64, 0x20,\n  0x6d, 0x69, 0x64, 0x69, 0x20, 0x6b, 0x61, 0x72, 0x20, 0x72, 0x6d, 0x69,\n  0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d, 0x6f, 0x62,\n  0x69, 0x6c, 0x65, 0x2d, 0x78, 0x6d, 0x66, 0x0a, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x6d, 0x70, 0x34, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x70,\n  0x34, 0x61, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d,\n  0x70, 0x34, 0x61, 0x2d, 0x6c, 0x61, 0x74, 0x6d, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d, 0x70, 0x61, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d, 0x70, 0x61, 0x2d, 0x72, 0x6f, 0x62,\n  0x75, 0x73, 0x74, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d, 0x70,\n  0x65, 0x67, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x70, 0x67, 0x61, 0x20,\n  0x6d, 0x70, 0x32, 0x20, 0x6d, 0x70, 0x32, 0x61, 0x20, 0x6d, 0x70, 0x33,\n  0x20, 0x6d, 0x32, 0x61, 0x20, 0x6d, 0x33, 0x61, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6d, 0x70, 0x65, 0x67, 0x34, 0x2d, 0x67,\n  0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x6d, 0x75, 0x73, 0x65, 0x70, 0x61, 0x63, 0x6b, 0x0a,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6f, 0x67, 0x67, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x6f, 0x67, 0x61, 0x20, 0x6f, 0x67, 0x67, 0x20, 0x73, 0x70,\n  0x78, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x6f, 0x70,\n  0x75, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x70,\n  0x61, 0x72, 0x69, 0x74, 0x79, 0x66, 0x65, 0x63, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x70, 0x63, 0x6d, 0x61, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x70, 0x63, 0x6d, 0x61, 0x2d, 0x77,\n  0x62, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x70, 0x63,\n  0x6d, 0x75, 0x2d, 0x77, 0x62, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x70, 0x63, 0x6d, 0x75, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x73, 0x69, 0x64, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x71, 0x63, 0x65, 0x6c, 0x70,\n  0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x72, 0x65, 0x64,\n  0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x72, 0x74, 0x70,\n  0x2d, 0x65, 0x6e, 0x63, 0x2d, 0x61, 0x65, 0x73, 0x63, 0x6d, 0x31, 0x32,\n  0x38, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x72, 0x74,\n  0x70, 0x2d, 0x6d, 0x69, 0x64, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x72, 0x74, 0x78, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x73, 0x33, 0x6d, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x33, 0x6d,\n  0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x69, 0x6c, 0x6b, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x73, 0x69, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x73, 0x6d, 0x76, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x73, 0x6d, 0x76, 0x30, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x6d, 0x76, 0x2d, 0x71, 0x63, 0x70,\n  0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x73, 0x70, 0x2d,\n  0x6d, 0x69, 0x64, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x73, 0x70, 0x65, 0x65, 0x78, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x74, 0x31, 0x34, 0x30, 0x63, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x74, 0x33, 0x38, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f,\n  0x6e, 0x65, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x74, 0x6f, 0x6e, 0x65, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x75, 0x65, 0x6d, 0x63, 0x6c, 0x69,\n  0x70, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x75, 0x6c,\n  0x70, 0x66, 0x65, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x76, 0x64, 0x76, 0x69, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6d, 0x72, 0x2d, 0x77, 0x62, 0x0a, 0x23, 0x20, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x33, 0x67, 0x70,\n  0x70, 0x2e, 0x69, 0x75, 0x66, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x34, 0x73, 0x62, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x6b, 0x6f, 0x7a, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x65, 0x6c, 0x70,\n  0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x63, 0x69, 0x73, 0x63, 0x6f, 0x2e, 0x6e, 0x73, 0x65, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63,\n  0x6d, 0x6c, 0x65, 0x73, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x2d, 0x65,\n  0x76, 0x65, 0x6e, 0x74, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6e, 0x73, 0x2e, 0x61, 0x6e,\n  0x70, 0x31, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x63, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x31, 0x0a,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x65,\n  0x63, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x09, 0x09, 0x09, 0x09,\n  0x75, 0x76, 0x61, 0x20, 0x75, 0x76, 0x76, 0x61, 0x0a, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x69, 0x67, 0x69, 0x74,\n  0x61, 0x6c, 0x2d, 0x77, 0x69, 0x6e, 0x64, 0x73, 0x09, 0x09, 0x09, 0x09,\n  0x65, 0x6f, 0x6c, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6c, 0x6e, 0x61, 0x2e, 0x61, 0x64, 0x74,\n  0x73, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x68, 0x65, 0x61, 0x61,\n  0x63, 0x2e, 0x31, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x68, 0x65,\n  0x61, 0x61, 0x63, 0x2e, 0x32, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e,\n  0x6d, 0x6c, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x6d, 0x70,\n  0x73, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x70, 0x6c, 0x32, 0x0a,\n  0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x70, 0x6c, 0x32, 0x78, 0x0a, 0x23,\n  0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64,\n  0x6f, 0x6c, 0x62, 0x79, 0x2e, 0x70, 0x6c, 0x32, 0x7a, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6f,\n  0x6c, 0x62, 0x79, 0x2e, 0x70, 0x75, 0x6c, 0x73, 0x65, 0x2e, 0x31, 0x0a,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x72,\n  0x61, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x72, 0x61, 0x0a, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x74, 0x73, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x64, 0x74, 0x73, 0x0a, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x74, 0x73, 0x2e, 0x68, 0x64,\n  0x09, 0x09, 0x09, 0x09, 0x64, 0x74, 0x73, 0x68, 0x64, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76,\n  0x62, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x72, 0x61,\n  0x64, 0x2e, 0x70, 0x6c, 0x6a, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x6e, 0x73, 0x2e, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6c, 0x75, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x6f, 0x69,\n  0x63, 0x65, 0x09, 0x09, 0x09, 0x09, 0x6c, 0x76, 0x70, 0x0a, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70,\n  0x6c, 0x61, 0x79, 0x72, 0x65, 0x61, 0x64, 0x79, 0x2e, 0x6d, 0x65, 0x64,\n  0x69, 0x61, 0x2e, 0x70, 0x79, 0x61, 0x09, 0x09, 0x70, 0x79, 0x61, 0x0a,\n  0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,\n  0x2d, 0x78, 0x6d, 0x66, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x72, 0x74, 0x65, 0x6c, 0x2e,\n  0x76, 0x62, 0x6b, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6e, 0x75, 0x65, 0x72, 0x61, 0x2e, 0x65, 0x63, 0x65, 0x6c,\n  0x70, 0x34, 0x38, 0x30, 0x30, 0x09, 0x09, 0x09, 0x65, 0x63, 0x65, 0x6c,\n  0x70, 0x34, 0x38, 0x30, 0x30, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x75, 0x65, 0x72, 0x61, 0x2e, 0x65, 0x63,\n  0x65, 0x6c, 0x70, 0x37, 0x34, 0x37, 0x30, 0x09, 0x09, 0x09, 0x65, 0x63,\n  0x65, 0x6c, 0x70, 0x37, 0x34, 0x37, 0x30, 0x0a, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x75, 0x65, 0x72, 0x61, 0x2e,\n  0x65, 0x63, 0x65, 0x6c, 0x70, 0x39, 0x36, 0x30, 0x30, 0x09, 0x09, 0x09,\n  0x65, 0x63, 0x65, 0x6c, 0x70, 0x39, 0x36, 0x30, 0x30, 0x0a, 0x23, 0x20,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x63,\n  0x74, 0x65, 0x6c, 0x2e, 0x73, 0x62, 0x63, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x71, 0x63, 0x65, 0x6c,\n  0x70, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x72, 0x68, 0x65, 0x74, 0x6f, 0x72, 0x65, 0x78, 0x2e, 0x33,\n  0x32, 0x6b, 0x61, 0x64, 0x70, 0x63, 0x6d, 0x0a, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x72, 0x69, 0x70, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x72, 0x69, 0x70, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64,\n  0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x73, 0x6f, 0x66, 0x74, 0x73, 0x65,\n  0x61, 0x6c, 0x2e, 0x6d, 0x70, 0x65, 0x67, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x6d, 0x78, 0x2e,\n  0x63, 0x76, 0x73, 0x64, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2f, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x0a, 0x23, 0x20, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73, 0x2d, 0x63,\n  0x6f, 0x6e, 0x66, 0x69, 0x67, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f,\n  0x77, 0x65, 0x62, 0x6d, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x65, 0x62,\n  0x61, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x61, 0x61,\n  0x63, 0x09, 0x09, 0x09, 0x09, 0x09, 0x61, 0x61, 0x63, 0x0a, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x61, 0x69, 0x66, 0x66, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x61, 0x69, 0x66, 0x20, 0x61, 0x69, 0x66, 0x66, 0x20,\n  0x61, 0x69, 0x66, 0x63, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78,\n  0x2d, 0x63, 0x61, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x61, 0x66,\n  0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x66, 0x6c, 0x61,\n  0x63, 0x09, 0x09, 0x09, 0x09, 0x09, 0x66, 0x6c, 0x61, 0x63, 0x0a, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x61, 0x74, 0x72, 0x6f,\n  0x73, 0x6b, 0x61, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x6b, 0x61, 0x0a, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x70, 0x65, 0x67, 0x75,\n  0x72, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x33, 0x75, 0x0a, 0x61,\n  0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77, 0x61,\n  0x78, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x61, 0x78, 0x0a, 0x61, 0x75,\n  0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77, 0x6d, 0x61,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x6d, 0x61, 0x0a, 0x61, 0x75, 0x64,\n  0x69, 0x6f, 0x2f, 0x78, 0x2d, 0x70, 0x6e, 0x2d, 0x72, 0x65, 0x61, 0x6c,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x72, 0x61, 0x6d,\n  0x20, 0x72, 0x61, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d,\n  0x70, 0x6e, 0x2d, 0x72, 0x65, 0x61, 0x6c, 0x61, 0x75, 0x64, 0x69, 0x6f,\n  0x2d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x09, 0x09, 0x09, 0x72, 0x6d,\n  0x70, 0x0a, 0x23, 0x20, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d,\n  0x74, 0x74, 0x61, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x2d,\n  0x77, 0x61, 0x76, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x61, 0x76, 0x0a,\n  0x61, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x78, 0x6d, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x78, 0x6d, 0x0a, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x63, 0x61, 0x6c,\n  0x2f, 0x78, 0x2d, 0x63, 0x64, 0x78, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63,\n  0x64, 0x78, 0x0a, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x2f,\n  0x78, 0x2d, 0x63, 0x69, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x69,\n  0x66, 0x0a, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x2f, 0x78,\n  0x2d, 0x63, 0x6d, 0x64, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x6d,\n  0x64, 0x66, 0x0a, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x2f,\n  0x78, 0x2d, 0x63, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x6d,\n  0x6c, 0x0a, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x2f, 0x78,\n  0x2d, 0x63, 0x73, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x73,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x63, 0x68, 0x65, 0x6d, 0x69, 0x63, 0x61,\n  0x6c, 0x2f, 0x78, 0x2d, 0x70, 0x64, 0x62, 0x0a, 0x63, 0x68, 0x65, 0x6d,\n  0x69, 0x63, 0x61, 0x6c, 0x2f, 0x78, 0x2d, 0x78, 0x79, 0x7a, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x78, 0x79, 0x7a, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65,\n  0x2f, 0x62, 0x6d, 0x70, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x6d, 0x70,\n  0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x63, 0x67, 0x6d, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x63, 0x67, 0x6d, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61,\n  0x67, 0x65, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x0a, 0x23,\n  0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x66, 0x69, 0x74, 0x73, 0x0a,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x33, 0x66, 0x61, 0x78, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x67, 0x33, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65,\n  0x2f, 0x67, 0x69, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x67, 0x69, 0x66,\n  0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x65, 0x66, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x69, 0x65, 0x66, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61,\n  0x67, 0x65, 0x2f, 0x6a, 0x70, 0x32, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65,\n  0x2f, 0x6a, 0x70, 0x65, 0x67, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6a, 0x70,\n  0x65, 0x67, 0x20, 0x6a, 0x70, 0x67, 0x20, 0x6a, 0x70, 0x65, 0x0a, 0x23,\n  0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x6d, 0x0a, 0x23,\n  0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x78, 0x0a, 0x69,\n  0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6b, 0x74, 0x78, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x6b, 0x74, 0x78, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65,\n  0x2f, 0x6e, 0x61, 0x70, 0x6c, 0x70, 0x73, 0x0a, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x70, 0x6e, 0x67, 0x09, 0x09, 0x09, 0x09, 0x09, 0x70, 0x6e,\n  0x67, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x72, 0x73, 0x2e,\n  0x62, 0x74, 0x69, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x62, 0x74, 0x69,\n  0x66, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x72,\n  0x73, 0x2e, 0x70, 0x74, 0x69, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x73, 0x67, 0x69, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x67, 0x69, 0x0a,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x76, 0x67, 0x2b, 0x78, 0x6d,\n  0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x73, 0x76, 0x67, 0x20, 0x73, 0x76,\n  0x67, 0x7a, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x74,\n  0x33, 0x38, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x74, 0x69, 0x66,\n  0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x69, 0x66, 0x66, 0x20, 0x74,\n  0x69, 0x66, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x74,\n  0x69, 0x66, 0x66, 0x2d, 0x66, 0x78, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x70,\n  0x68, 0x6f, 0x74, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x09, 0x09, 0x09, 0x70,\n  0x73, 0x64, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x63, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x32, 0x0a,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x65,\n  0x63, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x09, 0x09,\n  0x09, 0x09, 0x75, 0x76, 0x69, 0x20, 0x75, 0x76, 0x76, 0x69, 0x20, 0x75,\n  0x76, 0x67, 0x20, 0x75, 0x76, 0x76, 0x67, 0x0a, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x73, 0x75,\n  0x62, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x09, 0x73, 0x75,\n  0x62, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x6a, 0x76, 0x75, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x6a, 0x76,\n  0x75, 0x20, 0x64, 0x6a, 0x76, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x64, 0x77, 0x67, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x64, 0x77, 0x67, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x64, 0x78, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x78,\n  0x66, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x66, 0x61, 0x73, 0x74, 0x62, 0x69, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74,\n  0x09, 0x09, 0x09, 0x09, 0x66, 0x62, 0x73, 0x0a, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x70, 0x78, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x66, 0x70, 0x78, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x66, 0x73, 0x74, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x66, 0x73, 0x74, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x78, 0x65, 0x72, 0x6f, 0x78, 0x2e,\n  0x65, 0x64, 0x6d, 0x69, 0x63, 0x73, 0x2d, 0x6d, 0x6d, 0x72, 0x09, 0x09,\n  0x09, 0x6d, 0x6d, 0x72, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x66, 0x75, 0x6a, 0x69, 0x78, 0x65, 0x72, 0x6f, 0x78,\n  0x2e, 0x65, 0x64, 0x6d, 0x69, 0x63, 0x73, 0x2d, 0x72, 0x6c, 0x63, 0x09,\n  0x09, 0x09, 0x72, 0x6c, 0x63, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c,\n  0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x67, 0x62,\n  0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x2e, 0x69,\n  0x63, 0x6f, 0x6e, 0x0a, 0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x69, 0x78, 0x0a, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x6d, 0x6f, 0x64,\n  0x69, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x64, 0x69, 0x0a, 0x69, 0x6d, 0x61,\n  0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x68,\n  0x6f, 0x74, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x77, 0x64, 0x70, 0x0a, 0x69,\n  0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x65, 0x74,\n  0x2d, 0x66, 0x70, 0x78, 0x09, 0x09, 0x09, 0x09, 0x6e, 0x70, 0x78, 0x0a,\n  0x23, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x72, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x0a, 0x23, 0x20, 0x69,\n  0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61,\n  0x6c, 0x65, 0x64, 0x2e, 0x70, 0x6e, 0x67, 0x0a, 0x23, 0x20, 0x69, 0x6d,\n  0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c,\n  0x65, 0x64, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x73, 0x6f, 0x66, 0x74,\n  0x73, 0x65, 0x61, 0x6c, 0x2e, 0x67, 0x69, 0x66, 0x0a, 0x23, 0x20, 0x69,\n  0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61,\n  0x6c, 0x65, 0x64, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x73, 0x6f, 0x66,\n  0x74, 0x73, 0x65, 0x61, 0x6c, 0x2e, 0x6a, 0x70, 0x67, 0x0a, 0x23, 0x20,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x76,\n  0x66, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x77, 0x61, 0x70, 0x2e, 0x77, 0x62, 0x6d, 0x70, 0x09, 0x09, 0x09, 0x09,\n  0x77, 0x62, 0x6d, 0x70, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x78, 0x69, 0x66, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x78, 0x69, 0x66, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x77, 0x65,\n  0x62, 0x70, 0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x65, 0x62, 0x70, 0x0a,\n  0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x33, 0x64, 0x73, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x33, 0x64, 0x73, 0x0a, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x78, 0x2d, 0x63, 0x6d, 0x75, 0x2d, 0x72, 0x61, 0x73, 0x74,\n  0x65, 0x72, 0x09, 0x09, 0x09, 0x09, 0x72, 0x61, 0x73, 0x0a, 0x69, 0x6d,\n  0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x63, 0x6d, 0x78, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x63, 0x6d, 0x78, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x78, 0x2d, 0x66, 0x72, 0x65, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x09, 0x09,\n  0x09, 0x09, 0x66, 0x68, 0x20, 0x66, 0x68, 0x63, 0x20, 0x66, 0x68, 0x34,\n  0x20, 0x66, 0x68, 0x35, 0x20, 0x66, 0x68, 0x37, 0x0a, 0x69, 0x6d, 0x61,\n  0x67, 0x65, 0x2f, 0x78, 0x2d, 0x69, 0x63, 0x6f, 0x6e, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x69, 0x63, 0x6f, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x78, 0x2d, 0x6d, 0x72, 0x73, 0x69, 0x64, 0x2d, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x09, 0x09, 0x09, 0x09, 0x73, 0x69, 0x64, 0x0a, 0x69, 0x6d, 0x61,\n  0x67, 0x65, 0x2f, 0x78, 0x2d, 0x70, 0x63, 0x78, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x70, 0x63, 0x78, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78,\n  0x2d, 0x70, 0x69, 0x63, 0x74, 0x09, 0x09, 0x09, 0x09, 0x09, 0x70, 0x69,\n  0x63, 0x20, 0x70, 0x63, 0x74, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x78, 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2d, 0x61,\n  0x6e, 0x79, 0x6d, 0x61, 0x70, 0x09, 0x09, 0x09, 0x09, 0x70, 0x6e, 0x6d,\n  0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x70, 0x6f, 0x72,\n  0x74, 0x61, 0x62, 0x6c, 0x65, 0x2d, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70,\n  0x09, 0x09, 0x09, 0x09, 0x70, 0x62, 0x6d, 0x0a, 0x69, 0x6d, 0x61, 0x67,\n  0x65, 0x2f, 0x78, 0x2d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65,\n  0x2d, 0x67, 0x72, 0x61, 0x79, 0x6d, 0x61, 0x70, 0x09, 0x09, 0x09, 0x70,\n  0x67, 0x6d, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x70,\n  0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2d, 0x70, 0x69, 0x78, 0x6d,\n  0x61, 0x70, 0x09, 0x09, 0x09, 0x09, 0x70, 0x70, 0x6d, 0x0a, 0x69, 0x6d,\n  0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x72, 0x67, 0x62, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x72, 0x67, 0x62, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f,\n  0x78, 0x2d, 0x74, 0x67, 0x61, 0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x67,\n  0x61, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x78, 0x62,\n  0x69, 0x74, 0x6d, 0x61, 0x70, 0x09, 0x09, 0x09, 0x09, 0x09, 0x78, 0x62,\n  0x6d, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x78, 0x70,\n  0x69, 0x78, 0x6d, 0x61, 0x70, 0x09, 0x09, 0x09, 0x09, 0x09, 0x78, 0x70,\n  0x6d, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x78, 0x77,\n  0x69, 0x6e, 0x64, 0x6f, 0x77, 0x64, 0x75, 0x6d, 0x70, 0x09, 0x09, 0x09,\n  0x09, 0x78, 0x77, 0x64, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61,\n  0x67, 0x65, 0x2f, 0x63, 0x70, 0x69, 0x6d, 0x0a, 0x23, 0x20, 0x6d, 0x65,\n  0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65,\n  0x72, 0x79, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x23, 0x20,\n  0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x70,\n  0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x6e, 0x6f, 0x74, 0x69,\n  0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x23, 0x20, 0x6d,\n  0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,\n  0x6c, 0x65, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n  0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x62, 0x6f,\n  0x64, 0x79, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n  0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2d, 0x72, 0x65,\n  0x70, 0x6f, 0x72, 0x74, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61,\n  0x67, 0x65, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, 0x23, 0x20,\n  0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x6c, 0x6f, 0x62,\n  0x61, 0x6c, 0x2d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x2d,\n  0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73,\n  0x73, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2d,\n  0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d,\n  0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n  0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x67,\n  0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,\n  0x73, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f,\n  0x68, 0x74, 0x74, 0x70, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61,\n  0x67, 0x65, 0x2f, 0x69, 0x6d, 0x64, 0x6e, 0x2b, 0x78, 0x6d, 0x6c, 0x0a,\n  0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x6e, 0x65,\n  0x77, 0x73, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n  0x2f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x0a, 0x6d, 0x65, 0x73,\n  0x73, 0x61, 0x67, 0x65, 0x2f, 0x72, 0x66, 0x63, 0x38, 0x32, 0x32, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x65, 0x6d, 0x6c, 0x20, 0x6d, 0x69, 0x6d, 0x65,\n  0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x73,\n  0x2d, 0x68, 0x74, 0x74, 0x70, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73,\n  0x61, 0x67, 0x65, 0x2f, 0x73, 0x69, 0x70, 0x0a, 0x23, 0x20, 0x6d, 0x65,\n  0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x69, 0x70, 0x66, 0x72, 0x61,\n  0x67, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f,\n  0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x74, 0x61,\n  0x74, 0x75, 0x73, 0x0a, 0x23, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,\n  0x65, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x69, 0x2e, 0x73, 0x69, 0x6d,\n  0x70, 0x0a, 0x23, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x65, 0x78,\n  0x61, 0x6d, 0x70, 0x6c, 0x65, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f,\n  0x69, 0x67, 0x65, 0x73, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x67, 0x73,\n  0x20, 0x69, 0x67, 0x65, 0x73, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f,\n  0x6d, 0x65, 0x73, 0x68, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x73, 0x68,\n  0x20, 0x6d, 0x65, 0x73, 0x68, 0x20, 0x73, 0x69, 0x6c, 0x6f, 0x0a, 0x6d,\n  0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x6f, 0x6c,\n  0x6c, 0x61, 0x64, 0x61, 0x2b, 0x78, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x64, 0x61, 0x65, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x64, 0x77, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x64, 0x77,\n  0x66, 0x0a, 0x23, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x66, 0x6c, 0x61, 0x74, 0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x33,\n  0x64, 0x6d, 0x6c, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x67, 0x64, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x67, 0x64,\n  0x6c, 0x0a, 0x23, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x67, 0x73, 0x2d, 0x67, 0x64, 0x6c, 0x0a, 0x23, 0x20, 0x6d,\n  0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x73, 0x2e,\n  0x67, 0x64, 0x6c, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x67, 0x74, 0x77, 0x09, 0x09, 0x09, 0x09, 0x09, 0x67, 0x74,\n  0x77, 0x0a, 0x23, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x6d, 0x6f, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, 0x0a, 0x6d,\n  0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x74, 0x73,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x74, 0x73, 0x0a, 0x23, 0x20, 0x6d,\n  0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70, 0x61, 0x72,\n  0x61, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73,\n  0x6d, 0x69, 0x74, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x0a, 0x23,\n  0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x70,\n  0x61, 0x72, 0x61, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x2e, 0x74, 0x72, 0x61,\n  0x6e, 0x73, 0x6d, 0x69, 0x74, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x0a, 0x6d,\n  0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76, 0x74, 0x75,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x74, 0x75, 0x0a, 0x6d, 0x6f, 0x64,\n  0x65, 0x6c, 0x2f, 0x76, 0x72, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x77, 0x72, 0x6c, 0x20, 0x76, 0x72, 0x6d, 0x6c, 0x0a, 0x6d, 0x6f, 0x64,\n  0x65, 0x6c, 0x2f, 0x78, 0x33, 0x64, 0x2b, 0x62, 0x69, 0x6e, 0x61, 0x72,\n  0x79, 0x09, 0x09, 0x09, 0x09, 0x78, 0x33, 0x64, 0x62, 0x20, 0x78, 0x33,\n  0x64, 0x62, 0x7a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x78, 0x33,\n  0x64, 0x2b, 0x76, 0x72, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x78,\n  0x33, 0x64, 0x76, 0x20, 0x78, 0x33, 0x64, 0x76, 0x7a, 0x0a, 0x6d, 0x6f,\n  0x64, 0x65, 0x6c, 0x2f, 0x78, 0x33, 0x64, 0x2b, 0x78, 0x6d, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x78, 0x33, 0x64, 0x20, 0x78, 0x33, 0x64, 0x7a,\n  0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74,\n  0x2f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,\n  0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74,\n  0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65,\n  0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74,\n  0x2f, 0x62, 0x79, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x0a,\n  0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f,\n  0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c,\n  0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x72, 0x79,\n  0x70, 0x74, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69,\n  0x70, 0x61, 0x72, 0x74, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,\n  0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74,\n  0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x23,\n  0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f, 0x68,\n  0x65, 0x61, 0x64, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x74, 0x0a, 0x23, 0x20,\n  0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f, 0x6d, 0x69,\n  0x78, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70,\n  0x61, 0x72, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c,\n  0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74,\n  0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x6d,\n  0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x70,\n  0x6f, 0x72, 0x74, 0x0a, 0x23, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70,\n  0x61, 0x72, 0x74, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x0a, 0x23,\n  0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f, 0x76,\n  0x6f, 0x69, 0x63, 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n  0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x31, 0x64, 0x2d, 0x69,\n  0x6e, 0x74, 0x65, 0x72, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x64, 0x2d, 0x70,\n  0x61, 0x72, 0x69, 0x74, 0x79, 0x66, 0x65, 0x63, 0x0a, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x6d, 0x61, 0x6e, 0x69,\n  0x66, 0x65, 0x73, 0x74, 0x09, 0x09, 0x09, 0x09, 0x61, 0x70, 0x70, 0x63,\n  0x61, 0x63, 0x68, 0x65, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x61,\n  0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69,\n  0x63, 0x73, 0x20, 0x69, 0x66, 0x62, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x63, 0x73, 0x73, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x73, 0x73, 0x0a,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x76, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x63, 0x73, 0x76, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x0a, 0x23, 0x20,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x64, 0x6e, 0x73, 0x0a, 0x23, 0x20, 0x74,\n  0x65, 0x78, 0x74, 0x2f, 0x65, 0x63, 0x6d, 0x61, 0x73, 0x63, 0x72, 0x69,\n  0x70, 0x74, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x6e,\n  0x72, 0x69, 0x63, 0x68, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x0a, 0x23, 0x20,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x66, 0x77, 0x64, 0x72, 0x65, 0x64, 0x0a,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x68, 0x74, 0x6d, 0x0a, 0x23,\n  0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63,\n  0x72, 0x69, 0x70, 0x74, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6e, 0x33,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6e, 0x33, 0x0a, 0x23, 0x20, 0x74,\n  0x65, 0x78, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x66, 0x65,\n  0x63, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x78, 0x74, 0x20, 0x74, 0x65, 0x78,\n  0x74, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x20, 0x64, 0x65, 0x66, 0x20, 0x6c,\n  0x69, 0x73, 0x74, 0x20, 0x6c, 0x6f, 0x67, 0x20, 0x69, 0x6e, 0x0a, 0x23,\n  0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x66, 0x61,\n  0x6c, 0x6c, 0x65, 0x6e, 0x73, 0x74, 0x65, 0x69, 0x6e, 0x2e, 0x72, 0x73,\n  0x74, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x72, 0x73, 0x2e, 0x6c,\n  0x69, 0x6e, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x67, 0x09, 0x09, 0x09, 0x09,\n  0x64, 0x73, 0x63, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x72, 0x61, 0x64, 0x69, 0x73, 0x79, 0x73, 0x2e, 0x6d,\n  0x73, 0x6d, 0x6c, 0x2d, 0x62, 0x61, 0x73, 0x69, 0x63, 0x2d, 0x6c, 0x61,\n  0x79, 0x6f, 0x75, 0x74, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x72, 0x65, 0x64, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x72,\n  0x66, 0x63, 0x38, 0x32, 0x32, 0x2d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,\n  0x73, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x72, 0x69, 0x63, 0x68, 0x74,\n  0x65, 0x78, 0x74, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x74, 0x78, 0x0a,\n  0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x72, 0x74, 0x66, 0x0a, 0x23,\n  0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x72, 0x74, 0x70, 0x2d, 0x65, 0x6e,\n  0x63, 0x2d, 0x61, 0x65, 0x73, 0x63, 0x6d, 0x31, 0x32, 0x38, 0x0a, 0x23,\n  0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x72, 0x74, 0x78, 0x0a, 0x74, 0x65,\n  0x78, 0x74, 0x2f, 0x73, 0x67, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x73, 0x67, 0x6d, 0x6c, 0x20, 0x73, 0x67, 0x6d, 0x0a, 0x23, 0x20, 0x74,\n  0x65, 0x78, 0x74, 0x2f, 0x74, 0x31, 0x34, 0x30, 0x0a, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x74, 0x61, 0x62, 0x2d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61,\n  0x74, 0x65, 0x64, 0x2d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x09, 0x09,\n  0x09, 0x74, 0x73, 0x76, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x74, 0x72,\n  0x6f, 0x66, 0x66, 0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x20, 0x74, 0x72,\n  0x20, 0x72, 0x6f, 0x66, 0x66, 0x20, 0x6d, 0x61, 0x6e, 0x20, 0x6d, 0x65,\n  0x20, 0x6d, 0x73, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x74, 0x75, 0x72,\n  0x74, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x09, 0x09, 0x74, 0x74, 0x6c, 0x0a,\n  0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x75, 0x6c, 0x70, 0x66, 0x65,\n  0x63, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x75, 0x72, 0x69, 0x2d, 0x6c,\n  0x69, 0x73, 0x74, 0x09, 0x09, 0x09, 0x09, 0x09, 0x75, 0x72, 0x69, 0x20,\n  0x75, 0x72, 0x69, 0x73, 0x20, 0x75, 0x72, 0x6c, 0x73, 0x0a, 0x74, 0x65,\n  0x78, 0x74, 0x2f, 0x76, 0x63, 0x61, 0x72, 0x64, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x76, 0x63, 0x61, 0x72, 0x64, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x61, 0x62, 0x63, 0x0a, 0x74, 0x65,\n  0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75, 0x72, 0x6c, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x63, 0x75, 0x72, 0x6c, 0x0a, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75, 0x72, 0x6c, 0x2e, 0x64,\n  0x63, 0x75, 0x72, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x64, 0x63, 0x75, 0x72,\n  0x6c, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63,\n  0x75, 0x72, 0x6c, 0x2e, 0x73, 0x63, 0x75, 0x72, 0x6c, 0x09, 0x09, 0x09,\n  0x09, 0x73, 0x63, 0x75, 0x72, 0x6c, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x63, 0x75, 0x72, 0x6c, 0x2e, 0x6d, 0x63, 0x75,\n  0x72, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x63, 0x75, 0x72, 0x6c, 0x0a,\n  0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64,\n  0x6d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x63, 0x72, 0x69, 0x70,\n  0x74, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64,\n  0x76, 0x62, 0x2e, 0x73, 0x75, 0x62, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x09,\n  0x09, 0x09, 0x09, 0x73, 0x75, 0x62, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x65, 0x73, 0x6d, 0x65, 0x72, 0x74,\n  0x65, 0x63, 0x2e, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x2d, 0x64, 0x65, 0x73,\n  0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x0a, 0x74, 0x65, 0x78, 0x74,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x6c, 0x79, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x66, 0x6c, 0x79, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x66, 0x6d, 0x69, 0x2e, 0x66, 0x6c, 0x65, 0x78, 0x73, 0x74,\n  0x6f, 0x72, 0x09, 0x09, 0x09, 0x09, 0x66, 0x6c, 0x78, 0x0a, 0x74, 0x65,\n  0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,\n  0x76, 0x69, 0x7a, 0x09, 0x09, 0x09, 0x09, 0x67, 0x76, 0x0a, 0x74, 0x65,\n  0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e, 0x33, 0x64, 0x2e,\n  0x33, 0x64, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x33, 0x64, 0x6d, 0x6c,\n  0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x6e,\n  0x33, 0x64, 0x2e, 0x73, 0x70, 0x6f, 0x74, 0x09, 0x09, 0x09, 0x09, 0x73,\n  0x70, 0x6f, 0x74, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e, 0x6e, 0x65, 0x77, 0x73,\n  0x6d, 0x6c, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x69, 0x70, 0x74, 0x63, 0x2e, 0x6e, 0x69, 0x74, 0x66, 0x0a,\n  0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6c,\n  0x61, 0x74, 0x65, 0x78, 0x2d, 0x7a, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f,\n  0x6c, 0x61, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x78, 0x0a, 0x23, 0x20,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d,\n  0x6d, 0x65, 0x64, 0x69, 0x61, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,\n  0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x65, 0x74, 0x32, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x2e, 0x63, 0x6f,\n  0x6d, 0x6d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d,\n  0x6d, 0x61, 0x6e, 0x64, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x69, 0x2e, 0x75, 0x72, 0x69, 0x63, 0x61,\n  0x74, 0x61, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x0a, 0x74, 0x65, 0x78, 0x74,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x75, 0x6e, 0x2e, 0x6a, 0x32, 0x6d,\n  0x65, 0x2e, 0x61, 0x70, 0x70, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,\n  0x70, 0x74, 0x6f, 0x72, 0x09, 0x09, 0x6a, 0x61, 0x64, 0x0a, 0x23, 0x20,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x74, 0x72, 0x6f,\n  0x6c, 0x6c, 0x74, 0x65, 0x63, 0x68, 0x2e, 0x6c, 0x69, 0x6e, 0x67, 0x75,\n  0x69, 0x73, 0x74, 0x0a, 0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x77, 0x61, 0x70, 0x2e, 0x73, 0x69, 0x0a, 0x23, 0x20,\n  0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x77, 0x61, 0x70,\n  0x2e, 0x73, 0x6c, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x77, 0x61, 0x70, 0x2e, 0x77, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09,\n  0x77, 0x6d, 0x6c, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x6e, 0x64,\n  0x2e, 0x77, 0x61, 0x70, 0x2e, 0x77, 0x6d, 0x6c, 0x73, 0x63, 0x72, 0x69,\n  0x70, 0x74, 0x09, 0x09, 0x09, 0x09, 0x77, 0x6d, 0x6c, 0x73, 0x0a, 0x74,\n  0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x61, 0x73, 0x6d, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x73, 0x20, 0x61, 0x73, 0x6d, 0x0a, 0x74, 0x65, 0x78, 0x74,\n  0x2f, 0x78, 0x2d, 0x63, 0x09, 0x09, 0x09, 0x09, 0x09, 0x63, 0x20, 0x63,\n  0x63, 0x20, 0x63, 0x78, 0x78, 0x20, 0x63, 0x70, 0x70, 0x20, 0x68, 0x20,\n  0x68, 0x68, 0x20, 0x64, 0x69, 0x63, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x78, 0x2d, 0x66, 0x6f, 0x72, 0x74, 0x72, 0x61, 0x6e, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x66, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x37, 0x37, 0x20,\n  0x66, 0x39, 0x30, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x6a,\n  0x61, 0x76, 0x61, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x09, 0x09,\n  0x09, 0x09, 0x6a, 0x61, 0x76, 0x61, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f,\n  0x78, 0x2d, 0x6f, 0x70, 0x6d, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6f,\n  0x70, 0x6d, 0x6c, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x70,\n  0x61, 0x73, 0x63, 0x61, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x09, 0x70, 0x20,\n  0x70, 0x61, 0x73, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x6e,\n  0x66, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6e, 0x66, 0x6f, 0x0a, 0x74,\n  0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x73, 0x65, 0x74, 0x65, 0x78, 0x74,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x65, 0x74, 0x78, 0x0a, 0x74, 0x65, 0x78,\n  0x74, 0x2f, 0x78, 0x2d, 0x73, 0x66, 0x76, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x73, 0x66, 0x76, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x75,\n  0x75, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x75, 0x75, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x76, 0x63,\n  0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x09, 0x09, 0x09, 0x09, 0x76,\n  0x63, 0x73, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x2d, 0x76, 0x63,\n  0x61, 0x72, 0x64, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x63, 0x66, 0x0a,\n  0x23, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x6d, 0x6c, 0x0a, 0x23,\n  0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x78, 0x6d, 0x6c, 0x2d, 0x65, 0x78,\n  0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x70, 0x61, 0x72, 0x73, 0x65,\n  0x64, 0x2d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x0a, 0x23, 0x20, 0x76,\n  0x69, 0x64, 0x65, 0x6f, 0x2f, 0x31, 0x64, 0x2d, 0x69, 0x6e, 0x74, 0x65,\n  0x72, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x64, 0x2d, 0x70, 0x61, 0x72, 0x69,\n  0x74, 0x79, 0x66, 0x65, 0x63, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x33, 0x67, 0x70, 0x70, 0x09, 0x09, 0x09, 0x09, 0x09, 0x33, 0x67, 0x70,\n  0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x33, 0x67, 0x70,\n  0x70, 0x2d, 0x74, 0x74, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x33,\n  0x67, 0x70, 0x70, 0x32, 0x09, 0x09, 0x09, 0x09, 0x09, 0x33, 0x67, 0x32,\n  0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x62, 0x6d, 0x70,\n  0x65, 0x67, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x62,\n  0x74, 0x36, 0x35, 0x36, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x63, 0x65, 0x6c, 0x62, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x64, 0x76, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x0a, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x68, 0x32, 0x36, 0x31, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x68, 0x32, 0x36, 0x31, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x68,\n  0x32, 0x36, 0x33, 0x09, 0x09, 0x09, 0x09, 0x09, 0x68, 0x32, 0x36, 0x33,\n  0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x68, 0x32, 0x36,\n  0x33, 0x2d, 0x31, 0x39, 0x39, 0x38, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x68, 0x32, 0x36, 0x33, 0x2d, 0x32, 0x30, 0x30, 0x30,\n  0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x68, 0x32, 0x36, 0x34, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x68, 0x32, 0x36, 0x34, 0x0a, 0x23, 0x20, 0x76,\n  0x69, 0x64, 0x65, 0x6f, 0x2f, 0x68, 0x32, 0x36, 0x34, 0x2d, 0x72, 0x63,\n  0x64, 0x6f, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x68,\n  0x32, 0x36, 0x34, 0x2d, 0x73, 0x76, 0x63, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x6a, 0x70, 0x65, 0x67, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6a,\n  0x70, 0x67, 0x76, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x6a, 0x70, 0x65, 0x67, 0x32, 0x30, 0x30, 0x30, 0x0a, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x6a, 0x70, 0x6d, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6a,\n  0x70, 0x6d, 0x20, 0x6a, 0x70, 0x67, 0x6d, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x6d, 0x6a, 0x32, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x6a,\n  0x32, 0x20, 0x6d, 0x6a, 0x70, 0x32, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x6d, 0x70, 0x31, 0x73, 0x0a, 0x23, 0x20, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x2f, 0x6d, 0x70, 0x32, 0x70, 0x0a, 0x23, 0x20, 0x76,\n  0x69, 0x64, 0x65, 0x6f, 0x2f, 0x6d, 0x70, 0x32, 0x74, 0x0a, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x2f, 0x6d, 0x70, 0x34, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x6d, 0x70, 0x34, 0x20, 0x6d, 0x70, 0x34, 0x76, 0x20, 0x6d, 0x70, 0x67,\n  0x34, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x6d, 0x70,\n  0x34, 0x76, 0x2d, 0x65, 0x73, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x6d, 0x70, 0x65, 0x67, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x70, 0x65,\n  0x67, 0x20, 0x6d, 0x70, 0x67, 0x20, 0x6d, 0x70, 0x65, 0x20, 0x6d, 0x31,\n  0x76, 0x20, 0x6d, 0x32, 0x76, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x6d, 0x70, 0x65, 0x67, 0x34, 0x2d, 0x67, 0x65, 0x6e, 0x65,\n  0x72, 0x69, 0x63, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x6d, 0x70, 0x76, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x6e, 0x76, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x6f, 0x67, 0x67,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x6f, 0x67, 0x76, 0x0a, 0x23, 0x20, 0x76,\n  0x69, 0x64, 0x65, 0x6f, 0x2f, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x66,\n  0x65, 0x63, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x70,\n  0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x71, 0x74, 0x20, 0x6d, 0x6f, 0x76, 0x0a, 0x23, 0x20,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x72, 0x61, 0x77, 0x0a, 0x23, 0x20,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x72, 0x74, 0x70, 0x2d, 0x65, 0x6e,\n  0x63, 0x2d, 0x61, 0x65, 0x73, 0x63, 0x6d, 0x31, 0x32, 0x38, 0x0a, 0x23,\n  0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x72, 0x74, 0x78, 0x0a, 0x23,\n  0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x73, 0x6d, 0x70, 0x74, 0x65,\n  0x32, 0x39, 0x32, 0x6d, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x75, 0x6c, 0x70, 0x66, 0x65, 0x63, 0x0a, 0x23, 0x20, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x2f, 0x76, 0x63, 0x31, 0x0a, 0x23, 0x20, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x63, 0x63, 0x74, 0x76,\n  0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64,\n  0x65, 0x63, 0x65, 0x2e, 0x68, 0x64, 0x09, 0x09, 0x09, 0x09, 0x75, 0x76,\n  0x68, 0x20, 0x75, 0x76, 0x76, 0x68, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x65, 0x63, 0x65, 0x2e, 0x6d, 0x6f,\n  0x62, 0x69, 0x6c, 0x65, 0x09, 0x09, 0x09, 0x09, 0x75, 0x76, 0x6d, 0x20,\n  0x75, 0x76, 0x76, 0x6d, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x65, 0x63, 0x65, 0x2e, 0x6d, 0x70,\n  0x34, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x65, 0x63, 0x65, 0x2e, 0x70, 0x64, 0x09, 0x09, 0x09, 0x09, 0x75,\n  0x76, 0x70, 0x20, 0x75, 0x76, 0x76, 0x70, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x65, 0x63, 0x65, 0x2e, 0x73,\n  0x64, 0x09, 0x09, 0x09, 0x09, 0x75, 0x76, 0x73, 0x20, 0x75, 0x76, 0x76,\n  0x73, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x65, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x09, 0x09,\n  0x09, 0x09, 0x75, 0x76, 0x76, 0x20, 0x75, 0x76, 0x76, 0x76, 0x0a, 0x23,\n  0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64,\n  0x69, 0x72, 0x65, 0x63, 0x74, 0x76, 0x2e, 0x6d, 0x70, 0x65, 0x67, 0x0a,\n  0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x76, 0x2e, 0x6d, 0x70, 0x65, 0x67,\n  0x2d, 0x74, 0x74, 0x73, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x6c, 0x6e, 0x61, 0x2e, 0x6d, 0x70,\n  0x65, 0x67, 0x2d, 0x74, 0x74, 0x73, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x64, 0x76, 0x62, 0x2e, 0x66, 0x69, 0x6c,\n  0x65, 0x09, 0x09, 0x09, 0x09, 0x64, 0x76, 0x62, 0x0a, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x66, 0x76, 0x74, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x66, 0x76, 0x74, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x68, 0x6e, 0x73, 0x2e, 0x76,\n  0x69, 0x64, 0x65, 0x6f, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x66, 0x6f, 0x72,\n  0x75, 0x6d, 0x2e, 0x31, 0x64, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x66,\n  0x65, 0x63, 0x2d, 0x31, 0x30, 0x31, 0x30, 0x0a, 0x23, 0x20, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x76,\n  0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x31, 0x64, 0x70, 0x61, 0x72, 0x69,\n  0x74, 0x79, 0x66, 0x65, 0x63, 0x2d, 0x32, 0x30, 0x30, 0x35, 0x0a, 0x23,\n  0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69,\n  0x70, 0x74, 0x76, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x32, 0x64, 0x70,\n  0x61, 0x72, 0x69, 0x74, 0x79, 0x66, 0x65, 0x63, 0x2d, 0x31, 0x30, 0x31,\n  0x30, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e,\n  0x64, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2e,\n  0x32, 0x64, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x66, 0x65, 0x63, 0x2d,\n  0x32, 0x30, 0x30, 0x35, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70, 0x74, 0x76, 0x66, 0x6f, 0x72,\n  0x75, 0x6d, 0x2e, 0x74, 0x74, 0x73, 0x61, 0x76, 0x63, 0x0a, 0x23, 0x20,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x69, 0x70,\n  0x74, 0x76, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x74, 0x74, 0x73, 0x6d,\n  0x70, 0x65, 0x67, 0x32, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x6f, 0x6c,\n  0x61, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x0a, 0x23, 0x20, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x6f, 0x74, 0x6f,\n  0x72, 0x6f, 0x6c, 0x61, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x70, 0x0a,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x70,\n  0x65, 0x67, 0x75, 0x72, 0x6c, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x78, 0x75,\n  0x20, 0x6d, 0x34, 0x75, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76,\n  0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x70, 0x6c, 0x61, 0x79, 0x72, 0x65,\n  0x61, 0x64, 0x79, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x70, 0x79,\n  0x76, 0x09, 0x09, 0x70, 0x79, 0x76, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6e, 0x6f, 0x6b, 0x69, 0x61,\n  0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x64,\n  0x2d, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x0a,\n  0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e,\n  0x6e, 0x6f, 0x6b, 0x69, 0x61, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x76,\n  0x6f, 0x69, 0x70, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x76, 0x69,\n  0x64, 0x65, 0x6f, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e, 0x6d,\n  0x70, 0x65, 0x67, 0x31, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x2e,\n  0x6d, 0x70, 0x65, 0x67, 0x34, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64,\n  0x2e, 0x73, 0x77, 0x66, 0x0a, 0x23, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x6d,\n  0x65, 0x64, 0x69, 0x61, 0x2e, 0x73, 0x6f, 0x66, 0x74, 0x73, 0x65, 0x61,\n  0x6c, 0x2e, 0x6d, 0x6f, 0x76, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x76, 0x6e, 0x64, 0x2e, 0x75, 0x76, 0x76, 0x75, 0x2e, 0x6d, 0x70, 0x34,\n  0x09, 0x09, 0x09, 0x09, 0x75, 0x76, 0x75, 0x20, 0x75, 0x76, 0x76, 0x75,\n  0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x76,\n  0x69, 0x76, 0x6f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x69, 0x76, 0x0a,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x77, 0x65, 0x62, 0x6d, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x77, 0x65, 0x62, 0x6d, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x78, 0x2d, 0x66, 0x34, 0x76, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x66, 0x34, 0x76, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78, 0x2d,\n  0x66, 0x6c, 0x69, 0x09, 0x09, 0x09, 0x09, 0x09, 0x66, 0x6c, 0x69, 0x0a,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78, 0x2d, 0x66, 0x6c, 0x76, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x66, 0x6c, 0x76, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x34, 0x76, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x6d, 0x34, 0x76, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78, 0x2d,\n  0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61, 0x09, 0x09, 0x09, 0x09,\n  0x6d, 0x6b, 0x76, 0x20, 0x6d, 0x6b, 0x33, 0x64, 0x20, 0x6d, 0x6b, 0x73,\n  0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x6e, 0x67,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x6d, 0x6e, 0x67, 0x0a, 0x76, 0x69, 0x64,\n  0x65, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x61, 0x73, 0x66, 0x09,\n  0x09, 0x09, 0x09, 0x09, 0x61, 0x73, 0x66, 0x20, 0x61, 0x73, 0x78, 0x0a,\n  0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x76,\n  0x6f, 0x62, 0x09, 0x09, 0x09, 0x09, 0x09, 0x76, 0x6f, 0x62, 0x0a, 0x76,\n  0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77, 0x6d,\n  0x09, 0x09, 0x09, 0x09, 0x09, 0x77, 0x6d, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77, 0x6d, 0x76, 0x09, 0x09,\n  0x09, 0x09, 0x09, 0x77, 0x6d, 0x76, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f,\n  0x2f, 0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77, 0x6d, 0x78, 0x09, 0x09, 0x09,\n  0x09, 0x09, 0x77, 0x6d, 0x78, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f,\n  0x78, 0x2d, 0x6d, 0x73, 0x2d, 0x77, 0x76, 0x78, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x77, 0x76, 0x78, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78,\n  0x2d, 0x6d, 0x73, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x09, 0x09, 0x09, 0x09,\n  0x09, 0x61, 0x76, 0x69, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x78,\n  0x2d, 0x73, 0x67, 0x69, 0x2d, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x09, 0x09,\n  0x09, 0x09, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x0a, 0x76, 0x69, 0x64, 0x65,\n  0x6f, 0x2f, 0x78, 0x2d, 0x73, 0x6d, 0x76, 0x09, 0x09, 0x09, 0x09, 0x09,\n  0x73, 0x6d, 0x76, 0x0a, 0x78, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72,\n  0x65, 0x6e, 0x63, 0x65, 0x2f, 0x78, 0x2d, 0x63, 0x6f, 0x6f, 0x6c, 0x74,\n  0x61, 0x6c, 0x6b, 0x09, 0x09, 0x09, 0x09, 0x69, 0x63, 0x65, 0x0a\n};\nunsigned int mime_types_len = 53051;\n"
  },
  {
    "path": "mime.types",
    "content": "# This file maps Internet media types to unique file extension(s).\n# Although created for httpd, this file is used by many software systems\n# and has been placed in the public domain for unlimited redisribution.\n#\n# The table below contains both registered and (common) unregistered types.\n# A type that has no unique extension can be ignored -- they are listed\n# here to guide configurations toward known types and to make it easier to\n# identify \"new\" types.  File extensions are also commonly used to indicate\n# content languages and encodings, so choose them carefully.\n#\n# Internet media types should be registered as described in RFC 4288.\n# The registry is at <https://www.iana.org/assignments/media-types/media-types.xhtml>.\n#\n# MIME type (lowercased)\t\t\tExtensions\n# ============================================\t==========\n# application/1d-interleaved-parityfec\n# application/3gpp-ims+xml\n# application/activemessage\napplication/andrew-inset\t\t\tez\n# application/applefile\napplication/applixware\t\t\t\taw\napplication/atom+xml\t\t\t\tatom\napplication/atomcat+xml\t\t\t\tatomcat\n# application/atomicmail\napplication/atomsvc+xml\t\t\t\tatomsvc\n# application/auth-policy+xml\n# application/batch-smtp\n# application/beep+xml\n# application/calendar+xml\n# application/cals-1840\n# application/ccmp+xml\napplication/ccxml+xml\t\t\t\tccxml\napplication/cdmi-capability\t\t\tcdmia\napplication/cdmi-container\t\t\tcdmic\napplication/cdmi-domain\t\t\t\tcdmid\napplication/cdmi-object\t\t\t\tcdmio\napplication/cdmi-queue\t\t\t\tcdmiq\n# application/cea-2018+xml\n# application/cellml+xml\n# application/cfw\n# application/cnrp+xml\n# application/commonground\n# application/conference-info+xml\n# application/cpl+xml\n# application/csta+xml\n# application/cstadata+xml\napplication/cu-seeme\t\t\t\tcu\n# application/cybercash\napplication/davmount+xml\t\t\tdavmount\n# application/dca-rft\n# application/dec-dx\n# application/dialog-info+xml\n# application/dicom\n# application/dns\napplication/docbook+xml\t\t\t\tdbk\n# application/dskpp+xml\napplication/dssc+der\t\t\t\tdssc\napplication/dssc+xml\t\t\t\txdssc\n# application/dvcs\napplication/ecmascript\t\t\t\tecma\n# application/edi-consent\n# application/edi-x12\n# application/edifact\napplication/emma+xml\t\t\t\temma\n# application/epp+xml\napplication/epub+zip\t\t\t\tepub\n# application/eshop\n# application/example\napplication/exi\t\t\t\t\texi\n# application/fastinfoset\n# application/fastsoap\napplication/fb2\t\t\t\t\tfb2\n# application/fits\napplication/font-tdpfr\t\t\t\tpfr\n# application/framework-attributes+xml\napplication/gml+xml\t\t\t\tgml\napplication/gpx+xml\t\t\t\tgpx\napplication/gxf\t\t\t\t\tgxf\n# application/h224\n# application/held+xml\n# application/http\napplication/hyperstudio\t\t\t\tstk\n# application/ibe-key-request+xml\n# application/ibe-pkg-reply+xml\n# application/ibe-pp-data\n# application/iges\n# application/im-iscomposing+xml\n# application/index\n# application/index.cmd\n# application/index.obj\n# application/index.response\n# application/index.vnd\napplication/inkml+xml\t\t\t\tink inkml\n# application/iotp\napplication/ipfix\t\t\t\tipfix\n# application/ipp\n# application/isup\napplication/java-archive\t\t\tjar\napplication/java-serialized-object\t\tser\napplication/java-vm\t\t\t\tclass\napplication/javascript\t\t\t\tjs\napplication/json\t\t\t\tjson\napplication/jsonml+json\t\t\t\tjsonml\n# application/kpml-request+xml\n# application/kpml-response+xml\napplication/lost+xml\t\t\t\tlostxml\napplication/mac-binhex40\t\t\thqx\napplication/mac-compactpro\t\t\tcpt\n# application/macwriteii\napplication/mads+xml\t\t\t\tmads\napplication/marc\t\t\t\tmrc\napplication/marcxml+xml\t\t\t\tmrcx\napplication/mathematica\t\t\t\tma nb mb\n# application/mathml-content+xml\n# application/mathml-presentation+xml\napplication/mathml+xml\t\t\t\tmathml\n# application/mbms-associated-procedure-description+xml\n# application/mbms-deregister+xml\n# application/mbms-envelope+xml\n# application/mbms-msk+xml\n# application/mbms-msk-response+xml\n# application/mbms-protection-description+xml\n# application/mbms-reception-report+xml\n# application/mbms-register+xml\n# application/mbms-register-response+xml\n# application/mbms-user-service-description+xml\napplication/mbox\t\t\t\tmbox\n# application/media_control+xml\napplication/mediaservercontrol+xml\t\tmscml\napplication/metalink+xml\t\t\tmetalink\napplication/metalink4+xml\t\t\tmeta4\napplication/mets+xml\t\t\t\tmets\n# application/mikey\napplication/mods+xml\t\t\t\tmods\n# application/moss-keys\n# application/moss-signature\n# application/mosskey-data\n# application/mosskey-request\napplication/mp21\t\t\t\tm21 mp21\napplication/mp4\t\t\t\t\tmp4s\n# application/mpeg4-generic\n# application/mpeg4-iod\n# application/mpeg4-iod-xmt\n# application/msc-ivr+xml\n# application/msc-mixer+xml\napplication/msword\t\t\t\tdoc dot\napplication/mxf\t\t\t\t\tmxf\n# application/nasdata\n# application/news-checkgroups\n# application/news-groupinfo\n# application/news-transmission\n# application/nss\n# application/ocsp-request\n# application/ocsp-response\napplication/octet-stream\tbin dms lrf mar so dist distz pkg bpk dump elc deploy\napplication/oda\t\t\t\t\toda\napplication/oebps-package+xml\t\t\topf\napplication/ogg\t\t\t\t\togx\napplication/omdoc+xml\t\t\t\tomdoc\napplication/onenote\t\t\t\tonetoc onetoc2 onetmp onepkg\napplication/oxps\t\t\t\toxps\n# application/parityfec\napplication/patch-ops-error+xml\t\t\txer\napplication/pdf\t\t\t\t\tpdf\napplication/pgp-encrypted\t\t\tpgp\n# application/pgp-keys\napplication/pgp-signature\t\t\tasc sig\napplication/pics-rules\t\t\t\tprf\n# application/pidf+xml\n# application/pidf-diff+xml\napplication/pkcs10\t\t\t\tp10\napplication/pkcs7-mime\t\t\t\tp7m p7c\napplication/pkcs7-signature\t\t\tp7s\napplication/pkcs8\t\t\t\tp8\napplication/pkix-attr-cert\t\t\tac\napplication/pkix-cert\t\t\t\tcer\napplication/pkix-crl\t\t\t\tcrl\napplication/pkix-pkipath\t\t\tpkipath\napplication/pkixcmp\t\t\t\tpki\napplication/pls+xml\t\t\t\tpls\n# application/poc-settings+xml\napplication/postscript\t\t\t\tai eps ps\n# application/prs.alvestrand.titrax-sheet\napplication/prs.cww\t\t\t\tcww\n# application/prs.nprend\n# application/prs.plucker\n# application/prs.rdf-xml-crypt\n# application/prs.xsf+xml\napplication/pskc+xml\t\t\t\tpskcxml\n# application/qsig\napplication/rdf+xml\t\t\t\trdf\napplication/reginfo+xml\t\t\t\trif\napplication/relax-ng-compact-syntax\t\trnc\n# application/remote-printing\napplication/resource-lists+xml\t\t\trl\napplication/resource-lists-diff+xml\t\trld\n# application/riscos\n# application/rlmi+xml\napplication/rls-services+xml\t\t\trs\napplication/rpki-ghostbusters\t\t\tgbr\napplication/rpki-manifest\t\t\tmft\napplication/rpki-roa\t\t\t\troa\n# application/rpki-updown\napplication/rsd+xml\t\t\t\trsd\napplication/rss+xml\t\t\t\trss\napplication/rtf\t\t\t\t\trtf\n# application/rtx\n# application/samlassertion+xml\n# application/samlmetadata+xml\napplication/sbml+xml\t\t\t\tsbml\napplication/scvp-cv-request\t\t\tscq\napplication/scvp-cv-response\t\t\tscs\napplication/scvp-vp-request\t\t\tspq\napplication/scvp-vp-response\t\t\tspp\napplication/sdp\t\t\t\t\tsdp\n# application/set-payment\napplication/set-payment-initiation\t\tsetpay\n# application/set-registration\napplication/set-registration-initiation\t\tsetreg\n# application/sgml\n# application/sgml-open-catalog\napplication/shf+xml\t\t\t\tshf\n# application/sieve\n# application/simple-filter+xml\n# application/simple-message-summary\n# application/simplesymbolcontainer\n# application/slate\n# application/smil\napplication/smil+xml\t\t\t\tsmi smil\n# application/soap+fastinfoset\n# application/soap+xml\napplication/sparql-query\t\t\trq\napplication/sparql-results+xml\t\t\tsrx\n# application/spirits-event+xml\napplication/srgs\t\t\t\tgram\napplication/srgs+xml\t\t\t\tgrxml\napplication/sru+xml\t\t\t\tsru\napplication/ssdl+xml\t\t\t\tssdl\napplication/ssml+xml\t\t\t\tssml\n# application/tamp-apex-update\n# application/tamp-apex-update-confirm\n# application/tamp-community-update\n# application/tamp-community-update-confirm\n# application/tamp-error\n# application/tamp-sequence-adjust\n# application/tamp-sequence-adjust-confirm\n# application/tamp-status-query\n# application/tamp-status-response\n# application/tamp-update\n# application/tamp-update-confirm\napplication/tei+xml\t\t\t\ttei teicorpus\napplication/thraud+xml\t\t\t\ttfi\n# application/timestamp-query\n# application/timestamp-reply\napplication/timestamped-data\t\t\ttsd\n# application/tve-trigger\n# application/ulpfec\n# application/vcard+xml\n# application/vemmi\n# application/vividence.scriptfile\n# application/vnd.3gpp.bsf+xml\napplication/vnd.3gpp.pic-bw-large\t\tplb\napplication/vnd.3gpp.pic-bw-small\t\tpsb\napplication/vnd.3gpp.pic-bw-var\t\t\tpvb\n# application/vnd.3gpp.sms\n# application/vnd.3gpp2.bcmcsinfo+xml\n# application/vnd.3gpp2.sms\napplication/vnd.3gpp2.tcap\t\t\ttcap\napplication/vnd.3m.post-it-notes\t\tpwn\napplication/vnd.accpac.simply.aso\t\taso\napplication/vnd.accpac.simply.imp\t\timp\napplication/vnd.acucobol\t\t\tacu\napplication/vnd.acucorp\t\t\t\tatc acutc\napplication/vnd.adobe.air-application-installer-package+zip\tair\napplication/vnd.adobe.formscentral.fcdt\t\tfcdt\napplication/vnd.adobe.fxp\t\t\tfxp fxpl\n# application/vnd.adobe.partial-upload\napplication/vnd.adobe.xdp+xml\t\t\txdp\napplication/vnd.adobe.xfdf\t\t\txfdf\n# application/vnd.aether.imp\n# application/vnd.ah-barcode\napplication/vnd.ahead.space\t\t\tahead\napplication/vnd.airzip.filesecure.azf\t\tazf\napplication/vnd.airzip.filesecure.azs\t\tazs\napplication/vnd.amazon.ebook\t\t\tazw\napplication/vnd.americandynamics.acc\t\tacc\napplication/vnd.amiga.ami\t\t\tami\n# application/vnd.amundsen.maze+xml\napplication/vnd.android.package-archive\t\tapk\napplication/vnd.anser-web-certificate-issue-initiation\tcii\napplication/vnd.anser-web-funds-transfer-initiation\tfti\napplication/vnd.antix.game-component\t\tatx\napplication/vnd.apple.installer+xml\t\tmpkg\napplication/vnd.apple.mpegurl\t\t\tm3u8\n# application/vnd.arastra.swi\napplication/vnd.aristanetworks.swi\t\tswi\napplication/vnd.astraea-software.iota\t\tiota\napplication/vnd.audiograph\t\t\taep\n# application/vnd.autopackage\n# application/vnd.avistar+xml\napplication/vnd.blueice.multipass\t\tmpm\n# application/vnd.bluetooth.ep.oob\napplication/vnd.bmi\t\t\t\tbmi\napplication/vnd.businessobjects\t\t\trep\n# application/vnd.cab-jscript\n# application/vnd.canon-cpdl\n# application/vnd.canon-lips\n# application/vnd.cendio.thinlinc.clientconf\napplication/vnd.chemdraw+xml\t\t\tcdxml\napplication/vnd.chipnuts.karaoke-mmd\t\tmmd\napplication/vnd.cinderella\t\t\tcdy\n# application/vnd.cirpack.isdn-ext\napplication/vnd.claymore\t\t\tcla\napplication/vnd.cloanto.rp9\t\t\trp9\napplication/vnd.clonk.c4group\t\t\tc4g c4d c4f c4p c4u\napplication/vnd.cluetrust.cartomobile-config\t\tc11amc\napplication/vnd.cluetrust.cartomobile-config-pkg\tc11amz\n# application/vnd.collection+json\n# application/vnd.commerce-battelle\napplication/vnd.commonspace\t\t\tcsp\napplication/vnd.contact.cmsg\t\t\tcdbcmsg\napplication/vnd.cosmocaller\t\t\tcmc\napplication/vnd.crick.clicker\t\t\tclkx\napplication/vnd.crick.clicker.keyboard\t\tclkk\napplication/vnd.crick.clicker.palette\t\tclkp\napplication/vnd.crick.clicker.template\t\tclkt\napplication/vnd.crick.clicker.wordbank\t\tclkw\napplication/vnd.criticaltools.wbs+xml\t\twbs\napplication/vnd.ctc-posml\t\t\tpml\n# application/vnd.ctct.ws+xml\n# application/vnd.cups-pdf\n# application/vnd.cups-postscript\napplication/vnd.cups-ppd\t\t\tppd\n# application/vnd.cups-raster\n# application/vnd.cups-raw\n# application/vnd.curl\napplication/vnd.curl.car\t\t\tcar\napplication/vnd.curl.pcurl\t\t\tpcurl\n# application/vnd.cybank\napplication/vnd.dart\t\t\t\tdart\napplication/vnd.data-vision.rdz\t\t\trdz\napplication/vnd.dece.data\t\t\tuvf uvvf uvd uvvd\napplication/vnd.dece.ttml+xml\t\t\tuvt uvvt\napplication/vnd.dece.unspecified\t\tuvx uvvx\napplication/vnd.dece.zip\t\t\tuvz uvvz\napplication/vnd.denovo.fcselayout-link\t\tfe_launch\n# application/vnd.dir-bi.plate-dl-nosuffix\napplication/vnd.dna\t\t\t\tdna\napplication/vnd.dolby.mlp\t\t\tmlp\n# application/vnd.dolby.mobile.1\n# application/vnd.dolby.mobile.2\napplication/vnd.dpgraph\t\t\t\tdpg\napplication/vnd.dreamfactory\t\t\tdfac\napplication/vnd.ds-keypoint\t\t\tkpxx\napplication/vnd.dvb.ait\t\t\t\tait\n# application/vnd.dvb.dvbj\n# application/vnd.dvb.esgcontainer\n# application/vnd.dvb.ipdcdftnotifaccess\n# application/vnd.dvb.ipdcesgaccess\n# application/vnd.dvb.ipdcesgaccess2\n# application/vnd.dvb.ipdcesgpdd\n# application/vnd.dvb.ipdcroaming\n# application/vnd.dvb.iptv.alfec-base\n# application/vnd.dvb.iptv.alfec-enhancement\n# application/vnd.dvb.notif-aggregate-root+xml\n# application/vnd.dvb.notif-container+xml\n# application/vnd.dvb.notif-generic+xml\n# application/vnd.dvb.notif-ia-msglist+xml\n# application/vnd.dvb.notif-ia-registration-request+xml\n# application/vnd.dvb.notif-ia-registration-response+xml\n# application/vnd.dvb.notif-init+xml\n# application/vnd.dvb.pfr\napplication/vnd.dvb.service\t\t\tsvc\n# application/vnd.dxr\napplication/vnd.dynageo\t\t\t\tgeo\n# application/vnd.easykaraoke.cdgdownload\n# application/vnd.ecdis-update\napplication/vnd.ecowin.chart\t\t\tmag\n# application/vnd.ecowin.filerequest\n# application/vnd.ecowin.fileupdate\n# application/vnd.ecowin.series\n# application/vnd.ecowin.seriesrequest\n# application/vnd.ecowin.seriesupdate\n# application/vnd.emclient.accessrequest+xml\napplication/vnd.enliven\t\t\t\tnml\n# application/vnd.eprints.data+xml\napplication/vnd.epson.esf\t\t\tesf\napplication/vnd.epson.msf\t\t\tmsf\napplication/vnd.epson.quickanime\t\tqam\napplication/vnd.epson.salt\t\t\tslt\napplication/vnd.epson.ssf\t\t\tssf\n# application/vnd.ericsson.quickcall\napplication/vnd.eszigno3+xml\t\t\tes3 et3\n# application/vnd.etsi.aoc+xml\n# application/vnd.etsi.cug+xml\n# application/vnd.etsi.iptvcommand+xml\n# application/vnd.etsi.iptvdiscovery+xml\n# application/vnd.etsi.iptvprofile+xml\n# application/vnd.etsi.iptvsad-bc+xml\n# application/vnd.etsi.iptvsad-cod+xml\n# application/vnd.etsi.iptvsad-npvr+xml\n# application/vnd.etsi.iptvservice+xml\n# application/vnd.etsi.iptvsync+xml\n# application/vnd.etsi.iptvueprofile+xml\n# application/vnd.etsi.mcid+xml\n# application/vnd.etsi.overload-control-policy-dataset+xml\n# application/vnd.etsi.sci+xml\n# application/vnd.etsi.simservs+xml\n# application/vnd.etsi.tsl+xml\n# application/vnd.etsi.tsl.der\n# application/vnd.eudora.data\napplication/vnd.ezpix-album\t\t\tez2\napplication/vnd.ezpix-package\t\t\tez3\n# application/vnd.f-secure.mobile\napplication/vnd.fdf\t\t\t\tfdf\napplication/vnd.fdsn.mseed\t\t\tmseed\napplication/vnd.fdsn.seed\t\t\tseed dataless\n# application/vnd.ffsns\n# application/vnd.fints\napplication/vnd.flographit\t\t\tgph\napplication/vnd.fluxtime.clip\t\t\tftc\n# application/vnd.font-fontforge-sfd\napplication/vnd.framemaker\t\t\tfm frame maker book\napplication/vnd.frogans.fnc\t\t\tfnc\napplication/vnd.frogans.ltf\t\t\tltf\napplication/vnd.fsc.weblaunch\t\t\tfsc\napplication/vnd.fujitsu.oasys\t\t\toas\napplication/vnd.fujitsu.oasys2\t\t\toa2\napplication/vnd.fujitsu.oasys3\t\t\toa3\napplication/vnd.fujitsu.oasysgp\t\t\tfg5\napplication/vnd.fujitsu.oasysprs\t\tbh2\n# application/vnd.fujixerox.art-ex\n# application/vnd.fujixerox.art4\n# application/vnd.fujixerox.hbpl\napplication/vnd.fujixerox.ddd\t\t\tddd\napplication/vnd.fujixerox.docuworks\t\txdw\napplication/vnd.fujixerox.docuworks.binder\txbd\n# application/vnd.fut-misnet\napplication/vnd.fuzzysheet\t\t\tfzs\napplication/vnd.genomatix.tuxedo\t\ttxd\n# application/vnd.geocube+xml\napplication/vnd.geogebra.file\t\t\tggb\napplication/vnd.geogebra.tool\t\t\tggt\napplication/vnd.geometry-explorer\t\tgex gre\napplication/vnd.geonext\t\t\t\tgxt\napplication/vnd.geoplan\t\t\t\tg2w\napplication/vnd.geospace\t\t\tg3w\n# application/vnd.globalplatform.card-content-mgt\n# application/vnd.globalplatform.card-content-mgt-response\napplication/vnd.gmx\t\t\t\tgmx\napplication/vnd.google-earth.kml+xml\t\tkml\napplication/vnd.google-earth.kmz\t\tkmz\napplication/vnd.grafeq\t\t\t\tgqf gqs\n# application/vnd.gridmp\napplication/vnd.groove-account\t\t\tgac\napplication/vnd.groove-help\t\t\tghf\napplication/vnd.groove-identity-message\t\tgim\napplication/vnd.groove-injector\t\t\tgrv\napplication/vnd.groove-tool-message\t\tgtm\napplication/vnd.groove-tool-template\t\ttpl\napplication/vnd.groove-vcard\t\t\tvcg\n# application/vnd.hal+json\napplication/vnd.hal+xml\t\t\t\thal\napplication/vnd.handheld-entertainment+xml\tzmm\napplication/vnd.hbci\t\t\t\thbci\n# application/vnd.hcl-bireports\napplication/vnd.hhe.lesson-player\t\tles\napplication/vnd.hp-hpgl\t\t\t\thpgl\napplication/vnd.hp-hpid\t\t\t\thpid\napplication/vnd.hp-hps\t\t\t\thps\napplication/vnd.hp-jlyt\t\t\t\tjlt\napplication/vnd.hp-pcl\t\t\t\tpcl\napplication/vnd.hp-pclxl\t\t\tpclxl\n# application/vnd.httphone\napplication/vnd.hydrostatix.sof-data\t\tsfd-hdstx\n# application/vnd.hzn-3d-crossword\n# application/vnd.ibm.afplinedata\n# application/vnd.ibm.electronic-media\napplication/vnd.ibm.minipay\t\t\tmpy\napplication/vnd.ibm.modcap\t\t\tafp listafp list3820\napplication/vnd.ibm.rights-management\t\tirm\napplication/vnd.ibm.secure-container\t\tsc\napplication/vnd.iccprofile\t\t\ticc icm\napplication/vnd.igloader\t\t\tigl\napplication/vnd.immervision-ivp\t\t\tivp\napplication/vnd.immervision-ivu\t\t\tivu\n# application/vnd.informedcontrol.rms+xml\n# application/vnd.informix-visionary\n# application/vnd.infotech.project\n# application/vnd.infotech.project+xml\n# application/vnd.innopath.wamp.notification\napplication/vnd.insors.igm\t\t\tigm\napplication/vnd.intercon.formnet\t\txpw xpx\napplication/vnd.intergeo\t\t\ti2g\n# application/vnd.intertrust.digibox\n# application/vnd.intertrust.nncp\napplication/vnd.intu.qbo\t\t\tqbo\napplication/vnd.intu.qfx\t\t\tqfx\n# application/vnd.iptc.g2.conceptitem+xml\n# application/vnd.iptc.g2.knowledgeitem+xml\n# application/vnd.iptc.g2.newsitem+xml\n# application/vnd.iptc.g2.newsmessage+xml\n# application/vnd.iptc.g2.packageitem+xml\n# application/vnd.iptc.g2.planningitem+xml\napplication/vnd.ipunplugged.rcprofile\t\trcprofile\napplication/vnd.irepository.package+xml\t\tirp\napplication/vnd.is-xpr\t\t\t\txpr\napplication/vnd.isac.fcs\t\t\tfcs\napplication/vnd.jam\t\t\t\tjam\n# application/vnd.japannet-directory-service\n# application/vnd.japannet-jpnstore-wakeup\n# application/vnd.japannet-payment-wakeup\n# application/vnd.japannet-registration\n# application/vnd.japannet-registration-wakeup\n# application/vnd.japannet-setstore-wakeup\n# application/vnd.japannet-verification\n# application/vnd.japannet-verification-wakeup\napplication/vnd.jcp.javame.midlet-rms\t\trms\napplication/vnd.jisp\t\t\t\tjisp\napplication/vnd.joost.joda-archive\t\tjoda\napplication/vnd.kahootz\t\t\t\tktz ktr\napplication/vnd.kde.karbon\t\t\tkarbon\napplication/vnd.kde.kchart\t\t\tchrt\napplication/vnd.kde.kformula\t\t\tkfo\napplication/vnd.kde.kivio\t\t\tflw\napplication/vnd.kde.kontour\t\t\tkon\napplication/vnd.kde.kpresenter\t\t\tkpr kpt\napplication/vnd.kde.kspread\t\t\tksp\napplication/vnd.kde.kword\t\t\tkwd kwt\napplication/vnd.kenameaapp\t\t\thtke\napplication/vnd.kidspiration\t\t\tkia\napplication/vnd.kinar\t\t\t\tkne knp\napplication/vnd.koan\t\t\t\tskp skd skt skm\napplication/vnd.kodak-descriptor\t\tsse\napplication/vnd.las.las+xml\t\t\tlasxml\n# application/vnd.liberty-request+xml\napplication/vnd.llamagraphics.life-balance.desktop\tlbd\napplication/vnd.llamagraphics.life-balance.exchange+xml\tlbe\napplication/vnd.lotus-1-2-3\t\t\t123\napplication/vnd.lotus-approach\t\t\tapr\napplication/vnd.lotus-freelance\t\t\tpre\napplication/vnd.lotus-notes\t\t\tnsf\napplication/vnd.lotus-organizer\t\t\torg\napplication/vnd.lotus-screencam\t\t\tscm\napplication/vnd.lotus-wordpro\t\t\tlwp\napplication/vnd.macports.portpkg\t\tportpkg\n# application/vnd.marlin.drm.actiontoken+xml\n# application/vnd.marlin.drm.conftoken+xml\n# application/vnd.marlin.drm.license+xml\n# application/vnd.marlin.drm.mdcf\napplication/vnd.mcd\t\t\t\tmcd\napplication/vnd.medcalcdata\t\t\tmc1\napplication/vnd.mediastation.cdkey\t\tcdkey\n# application/vnd.meridian-slingshot\napplication/vnd.mfer\t\t\t\tmwf\napplication/vnd.mfmp\t\t\t\tmfm\napplication/vnd.micrografx.flo\t\t\tflo\napplication/vnd.micrografx.igx\t\t\tigx\napplication/vnd.mif\t\t\t\tmif\n# application/vnd.minisoft-hp3000-save\n# application/vnd.mitsubishi.misty-guard.trustweb\napplication/vnd.mobius.daf\t\t\tdaf\napplication/vnd.mobius.dis\t\t\tdis\napplication/vnd.mobius.mbk\t\t\tmbk\napplication/vnd.mobius.mqy\t\t\tmqy\napplication/vnd.mobius.msl\t\t\tmsl\napplication/vnd.mobius.plc\t\t\tplc\napplication/vnd.mobius.txf\t\t\ttxf\napplication/vnd.mophun.application\t\tmpn\napplication/vnd.mophun.certificate\t\tmpc\n# application/vnd.motorola.flexsuite\n# application/vnd.motorola.flexsuite.adsi\n# application/vnd.motorola.flexsuite.fis\n# application/vnd.motorola.flexsuite.gotap\n# application/vnd.motorola.flexsuite.kmr\n# application/vnd.motorola.flexsuite.ttc\n# application/vnd.motorola.flexsuite.wem\n# application/vnd.motorola.iprm\napplication/vnd.mozilla.xul+xml\t\t\txul\napplication/vnd.ms-artgalry\t\t\tcil\n# application/vnd.ms-asf\napplication/vnd.ms-cab-compressed\t\tcab\n# application/vnd.ms-color.iccprofile\napplication/vnd.ms-excel\t\t\txls xlm xla xlc xlt xlw\napplication/vnd.ms-excel.addin.macroenabled.12\t\txlam\napplication/vnd.ms-excel.sheet.binary.macroenabled.12\txlsb\napplication/vnd.ms-excel.sheet.macroenabled.12\t\txlsm\napplication/vnd.ms-excel.template.macroenabled.12\txltm\napplication/vnd.ms-fontobject\t\t\teot\napplication/vnd.ms-htmlhelp\t\t\tchm\napplication/vnd.ms-ims\t\t\t\tims\napplication/vnd.ms-lrm\t\t\t\tlrm\n# application/vnd.ms-office.activex+xml\napplication/vnd.ms-officetheme\t\t\tthmx\n# application/vnd.ms-opentype\n# application/vnd.ms-package.obfuscated-opentype\napplication/vnd.ms-pki.seccat\t\t\tcat\napplication/vnd.ms-pki.stl\t\t\tstl\n# application/vnd.ms-playready.initiator+xml\napplication/vnd.ms-powerpoint\t\t\tppt pps pot\napplication/vnd.ms-powerpoint.addin.macroenabled.12\t\tppam\napplication/vnd.ms-powerpoint.presentation.macroenabled.12\tpptm\napplication/vnd.ms-powerpoint.slide.macroenabled.12\t\tsldm\napplication/vnd.ms-powerpoint.slideshow.macroenabled.12\t\tppsm\napplication/vnd.ms-powerpoint.template.macroenabled.12\t\tpotm\n# application/vnd.ms-printing.printticket+xml\napplication/vnd.ms-project\t\t\tmpp mpt\n# application/vnd.ms-tnef\n# application/vnd.ms-wmdrm.lic-chlg-req\n# application/vnd.ms-wmdrm.lic-resp\n# application/vnd.ms-wmdrm.meter-chlg-req\n# application/vnd.ms-wmdrm.meter-resp\napplication/vnd.ms-word.document.macroenabled.12\tdocm\napplication/vnd.ms-word.template.macroenabled.12\tdotm\napplication/vnd.ms-works\t\t\twps wks wcm wdb\napplication/vnd.ms-wpl\t\t\t\twpl\napplication/vnd.ms-xpsdocument\t\t\txps\napplication/vnd.mseq\t\t\t\tmseq\n# application/vnd.msign\n# application/vnd.multiad.creator\n# application/vnd.multiad.creator.cif\n# application/vnd.music-niff\napplication/vnd.musician\t\t\tmus\napplication/vnd.muvee.style\t\t\tmsty\napplication/vnd.mynfc\t\t\t\ttaglet\n# application/vnd.ncd.control\n# application/vnd.ncd.reference\n# application/vnd.nervana\n# application/vnd.netfpx\napplication/vnd.neurolanguage.nlu\t\tnlu\napplication/vnd.nitf\t\t\t\tntf nitf\napplication/vnd.noblenet-directory\t\tnnd\napplication/vnd.noblenet-sealer\t\t\tnns\napplication/vnd.noblenet-web\t\t\tnnw\n# application/vnd.nokia.catalogs\n# application/vnd.nokia.conml+wbxml\n# application/vnd.nokia.conml+xml\n# application/vnd.nokia.isds-radio-presets\n# application/vnd.nokia.iptv.config+xml\n# application/vnd.nokia.landmark+wbxml\n# application/vnd.nokia.landmark+xml\n# application/vnd.nokia.landmarkcollection+xml\n# application/vnd.nokia.n-gage.ac+xml\napplication/vnd.nokia.n-gage.data\t\tngdat\napplication/vnd.nokia.n-gage.symbian.install\tn-gage\n# application/vnd.nokia.ncd\n# application/vnd.nokia.pcd+wbxml\n# application/vnd.nokia.pcd+xml\napplication/vnd.nokia.radio-preset\t\trpst\napplication/vnd.nokia.radio-presets\t\trpss\napplication/vnd.novadigm.edm\t\t\tedm\napplication/vnd.novadigm.edx\t\t\tedx\napplication/vnd.novadigm.ext\t\t\text\n# application/vnd.ntt-local.file-transfer\n# application/vnd.ntt-local.sip-ta_remote\n# application/vnd.ntt-local.sip-ta_tcp_stream\napplication/vnd.oasis.opendocument.chart\t\todc\napplication/vnd.oasis.opendocument.chart-template\totc\napplication/vnd.oasis.opendocument.database\t\todb\napplication/vnd.oasis.opendocument.formula\t\todf\napplication/vnd.oasis.opendocument.formula-template\todft\napplication/vnd.oasis.opendocument.graphics\t\todg\napplication/vnd.oasis.opendocument.graphics-template\totg\napplication/vnd.oasis.opendocument.image\t\todi\napplication/vnd.oasis.opendocument.image-template\toti\napplication/vnd.oasis.opendocument.presentation\t\todp\napplication/vnd.oasis.opendocument.presentation-template\totp\napplication/vnd.oasis.opendocument.spreadsheet\t\tods\napplication/vnd.oasis.opendocument.spreadsheet-template\tots\napplication/vnd.oasis.opendocument.text\t\t\todt\napplication/vnd.oasis.opendocument.text-master\t\todm\napplication/vnd.oasis.opendocument.text-template\tott\napplication/vnd.oasis.opendocument.text-web\t\toth\n# application/vnd.obn\n# application/vnd.oftn.l10n+json\n# application/vnd.oipf.contentaccessdownload+xml\n# application/vnd.oipf.contentaccessstreaming+xml\n# application/vnd.oipf.cspg-hexbinary\n# application/vnd.oipf.dae.svg+xml\n# application/vnd.oipf.dae.xhtml+xml\n# application/vnd.oipf.mippvcontrolmessage+xml\n# application/vnd.oipf.pae.gem\n# application/vnd.oipf.spdiscovery+xml\n# application/vnd.oipf.spdlist+xml\n# application/vnd.oipf.ueprofile+xml\n# application/vnd.oipf.userprofile+xml\napplication/vnd.olpc-sugar\t\t\txo\n# application/vnd.oma-scws-config\n# application/vnd.oma-scws-http-request\n# application/vnd.oma-scws-http-response\n# application/vnd.oma.bcast.associated-procedure-parameter+xml\n# application/vnd.oma.bcast.drm-trigger+xml\n# application/vnd.oma.bcast.imd+xml\n# application/vnd.oma.bcast.ltkm\n# application/vnd.oma.bcast.notification+xml\n# application/vnd.oma.bcast.provisioningtrigger\n# application/vnd.oma.bcast.sgboot\n# application/vnd.oma.bcast.sgdd+xml\n# application/vnd.oma.bcast.sgdu\n# application/vnd.oma.bcast.simple-symbol-container\n# application/vnd.oma.bcast.smartcard-trigger+xml\n# application/vnd.oma.bcast.sprov+xml\n# application/vnd.oma.bcast.stkm\n# application/vnd.oma.cab-address-book+xml\n# application/vnd.oma.cab-feature-handler+xml\n# application/vnd.oma.cab-pcc+xml\n# application/vnd.oma.cab-user-prefs+xml\n# application/vnd.oma.dcd\n# application/vnd.oma.dcdc\napplication/vnd.oma.dd2+xml\t\t\tdd2\n# application/vnd.oma.drm.risd+xml\n# application/vnd.oma.group-usage-list+xml\n# application/vnd.oma.pal+xml\n# application/vnd.oma.poc.detailed-progress-report+xml\n# application/vnd.oma.poc.final-report+xml\n# application/vnd.oma.poc.groups+xml\n# application/vnd.oma.poc.invocation-descriptor+xml\n# application/vnd.oma.poc.optimized-progress-report+xml\n# application/vnd.oma.push\n# application/vnd.oma.scidm.messages+xml\n# application/vnd.oma.xcap-directory+xml\n# application/vnd.omads-email+xml\n# application/vnd.omads-file+xml\n# application/vnd.omads-folder+xml\n# application/vnd.omaloc-supl-init\napplication/vnd.openofficeorg.extension\t\toxt\n# application/vnd.openxmlformats-officedocument.custom-properties+xml\n# application/vnd.openxmlformats-officedocument.customxmlproperties+xml\n# application/vnd.openxmlformats-officedocument.drawing+xml\n# application/vnd.openxmlformats-officedocument.drawingml.chart+xml\n# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\n# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml\n# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml\n# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml\n# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml\n# application/vnd.openxmlformats-officedocument.extended-properties+xml\n# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml\n# application/vnd.openxmlformats-officedocument.presentationml.comments+xml\n# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml\n# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml\n# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml\napplication/vnd.openxmlformats-officedocument.presentationml.presentation\tpptx\n# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml\n# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml\napplication/vnd.openxmlformats-officedocument.presentationml.slide\tsldx\n# application/vnd.openxmlformats-officedocument.presentationml.slide+xml\n# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml\n# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml\napplication/vnd.openxmlformats-officedocument.presentationml.slideshow\tppsx\n# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml\n# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml\n# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml\n# application/vnd.openxmlformats-officedocument.presentationml.tags+xml\napplication/vnd.openxmlformats-officedocument.presentationml.template\tpotx\n# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml\n# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml\napplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet\txlsx\n# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml\napplication/vnd.openxmlformats-officedocument.spreadsheetml.template\txltx\n# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml\n# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\n# application/vnd.openxmlformats-officedocument.theme+xml\n# application/vnd.openxmlformats-officedocument.themeoverride+xml\n# application/vnd.openxmlformats-officedocument.vmldrawing\n# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\napplication/vnd.openxmlformats-officedocument.wordprocessingml.document\tdocx\n# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\napplication/vnd.openxmlformats-officedocument.wordprocessingml.template\tdotx\n# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml\n# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml\n# application/vnd.openxmlformats-package.core-properties+xml\n# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml\n# application/vnd.openxmlformats-package.relationships+xml\n# application/vnd.quobject-quoxdocument\n# application/vnd.osa.netdeploy\napplication/vnd.osgeo.mapguide.package\t\tmgp\n# application/vnd.osgi.bundle\napplication/vnd.osgi.dp\t\t\t\tdp\napplication/vnd.osgi.subsystem\t\t\tesa\n# application/vnd.otps.ct-kip+xml\napplication/vnd.palm\t\t\t\tpdb pqa oprc\n# application/vnd.paos.xml\napplication/vnd.pawaafile\t\t\tpaw\napplication/vnd.pg.format\t\t\tstr\napplication/vnd.pg.osasli\t\t\tei6\n# application/vnd.piaccess.application-licence\napplication/vnd.picsel\t\t\t\tefif\napplication/vnd.pmi.widget\t\t\twg\n# application/vnd.poc.group-advertisement+xml\napplication/vnd.pocketlearn\t\t\tplf\napplication/vnd.powerbuilder6\t\t\tpbd\n# application/vnd.powerbuilder6-s\n# application/vnd.powerbuilder7\n# application/vnd.powerbuilder7-s\n# application/vnd.powerbuilder75\n# application/vnd.powerbuilder75-s\n# application/vnd.preminet\napplication/vnd.previewsystems.box\t\tbox\napplication/vnd.proteus.magazine\t\tmgz\napplication/vnd.publishare-delta-tree\t\tqps\napplication/vnd.pvi.ptid1\t\t\tptid\n# application/vnd.pwg-multiplexed\n# application/vnd.pwg-xhtml-print+xml\n# application/vnd.qualcomm.brew-app-res\napplication/vnd.quark.quarkxpress\t\tqxd qxt qwd qwt qxl qxb\n# application/vnd.radisys.moml+xml\n# application/vnd.radisys.msml+xml\n# application/vnd.radisys.msml-audit+xml\n# application/vnd.radisys.msml-audit-conf+xml\n# application/vnd.radisys.msml-audit-conn+xml\n# application/vnd.radisys.msml-audit-dialog+xml\n# application/vnd.radisys.msml-audit-stream+xml\n# application/vnd.radisys.msml-conf+xml\n# application/vnd.radisys.msml-dialog+xml\n# application/vnd.radisys.msml-dialog-base+xml\n# application/vnd.radisys.msml-dialog-fax-detect+xml\n# application/vnd.radisys.msml-dialog-fax-sendrecv+xml\n# application/vnd.radisys.msml-dialog-group+xml\n# application/vnd.radisys.msml-dialog-speech+xml\n# application/vnd.radisys.msml-dialog-transform+xml\n# application/vnd.rainstor.data\n# application/vnd.rapid\napplication/vnd.realvnc.bed\t\t\tbed\napplication/vnd.recordare.musicxml\t\tmxl\napplication/vnd.recordare.musicxml+xml\t\tmusicxml\n# application/vnd.renlearn.rlprint\napplication/vnd.rig.cryptonote\t\t\tcryptonote\napplication/vnd.rim.cod\t\t\t\tcod\napplication/vnd.rn-realmedia\t\t\trm\napplication/vnd.rn-realmedia-vbr\t\trmvb\napplication/vnd.route66.link66+xml\t\tlink66\n# application/vnd.rs-274x\n# application/vnd.ruckus.download\n# application/vnd.s3sms\napplication/vnd.sailingtracker.track\t\tst\n# application/vnd.sbm.cid\n# application/vnd.sbm.mid2\n# application/vnd.scribus\n# application/vnd.sealed.3df\n# application/vnd.sealed.csf\n# application/vnd.sealed.doc\n# application/vnd.sealed.eml\n# application/vnd.sealed.mht\n# application/vnd.sealed.net\n# application/vnd.sealed.ppt\n# application/vnd.sealed.tiff\n# application/vnd.sealed.xls\n# application/vnd.sealedmedia.softseal.html\n# application/vnd.sealedmedia.softseal.pdf\napplication/vnd.seemail\t\t\t\tsee\napplication/vnd.sema\t\t\t\tsema\napplication/vnd.semd\t\t\t\tsemd\napplication/vnd.semf\t\t\t\tsemf\napplication/vnd.shana.informed.formdata\t\tifm\napplication/vnd.shana.informed.formtemplate\titp\napplication/vnd.shana.informed.interchange\tiif\napplication/vnd.shana.informed.package\t\tipk\napplication/vnd.simtech-mindmapper\t\ttwd twds\napplication/vnd.smaf\t\t\t\tmmf\n# application/vnd.smart.notebook\napplication/vnd.smart.teacher\t\t\tteacher\n# application/vnd.software602.filler.form+xml\n# application/vnd.software602.filler.form-xml-zip\napplication/vnd.solent.sdkm+xml\t\t\tsdkm sdkd\napplication/vnd.spotfire.dxp\t\t\tdxp\napplication/vnd.spotfire.sfs\t\t\tsfs\n# application/vnd.sss-cod\n# application/vnd.sss-dtf\n# application/vnd.sss-ntf\napplication/vnd.stardivision.calc\t\tsdc\napplication/vnd.stardivision.draw\t\tsda\napplication/vnd.stardivision.impress\t\tsdd\napplication/vnd.stardivision.math\t\tsmf\napplication/vnd.stardivision.writer\t\tsdw vor\napplication/vnd.stardivision.writer-global\tsgl\napplication/vnd.stepmania.package\t\tsmzip\napplication/vnd.stepmania.stepchart\t\tsm\n# application/vnd.street-stream\napplication/vnd.sun.xml.calc\t\t\tsxc\napplication/vnd.sun.xml.calc.template\t\tstc\napplication/vnd.sun.xml.draw\t\t\tsxd\napplication/vnd.sun.xml.draw.template\t\tstd\napplication/vnd.sun.xml.impress\t\t\tsxi\napplication/vnd.sun.xml.impress.template\tsti\napplication/vnd.sun.xml.math\t\t\tsxm\napplication/vnd.sun.xml.writer\t\t\tsxw\napplication/vnd.sun.xml.writer.global\t\tsxg\napplication/vnd.sun.xml.writer.template\t\tstw\n# application/vnd.sun.wadl+xml\napplication/vnd.sus-calendar\t\t\tsus susp\napplication/vnd.svd\t\t\t\tsvd\n# application/vnd.swiftview-ics\napplication/vnd.symbian.install\t\t\tsis sisx\napplication/vnd.syncml+xml\t\t\txsm\napplication/vnd.syncml.dm+wbxml\t\t\tbdm\napplication/vnd.syncml.dm+xml\t\t\txdm\n# application/vnd.syncml.dm.notification\n# application/vnd.syncml.ds.notification\napplication/vnd.tao.intent-module-archive\ttao\napplication/vnd.tcpdump.pcap\t\t\tpcap cap dmp\napplication/vnd.tmobile-livetv\t\t\ttmo\napplication/vnd.trid.tpt\t\t\ttpt\napplication/vnd.triscape.mxs\t\t\tmxs\napplication/vnd.trueapp\t\t\t\ttra\n# application/vnd.truedoc\n# application/vnd.ubisoft.webplayer\napplication/vnd.ufdl\t\t\t\tufd ufdl\napplication/vnd.uiq.theme\t\t\tutz\napplication/vnd.umajin\t\t\t\tumj\napplication/vnd.unity\t\t\t\tunityweb\napplication/vnd.uoml+xml\t\t\tuoml\n# application/vnd.uplanet.alert\n# application/vnd.uplanet.alert-wbxml\n# application/vnd.uplanet.bearer-choice\n# application/vnd.uplanet.bearer-choice-wbxml\n# application/vnd.uplanet.cacheop\n# application/vnd.uplanet.cacheop-wbxml\n# application/vnd.uplanet.channel\n# application/vnd.uplanet.channel-wbxml\n# application/vnd.uplanet.list\n# application/vnd.uplanet.list-wbxml\n# application/vnd.uplanet.listcmd\n# application/vnd.uplanet.listcmd-wbxml\n# application/vnd.uplanet.signal\napplication/vnd.vcx\t\t\t\tvcx\n# application/vnd.vd-study\n# application/vnd.vectorworks\n# application/vnd.verimatrix.vcas\n# application/vnd.vidsoft.vidconference\napplication/vnd.visio\t\t\t\tvsd vst vss vsw\napplication/vnd.visionary\t\t\tvis\n# application/vnd.vividence.scriptfile\napplication/vnd.vsf\t\t\t\tvsf\n# application/vnd.wap.sic\n# application/vnd.wap.slc\napplication/vnd.wap.wbxml\t\t\twbxml\napplication/vnd.wap.wmlc\t\t\twmlc\napplication/vnd.wap.wmlscriptc\t\t\twmlsc\napplication/vnd.webturbo\t\t\twtb\n# application/vnd.wfa.wsc\n# application/vnd.wmc\n# application/vnd.wmf.bootstrap\n# application/vnd.wolfram.mathematica\n# application/vnd.wolfram.mathematica.package\napplication/vnd.wolfram.player\t\t\tnbp\napplication/vnd.wordperfect\t\t\twpd\napplication/vnd.wqd\t\t\t\twqd\n# application/vnd.wrq-hp3000-labelled\napplication/vnd.wt.stf\t\t\t\tstf\n# application/vnd.wv.csp+wbxml\n# application/vnd.wv.csp+xml\n# application/vnd.wv.ssp+xml\napplication/vnd.xara\t\t\t\txar\napplication/vnd.xfdl\t\t\t\txfdl\n# application/vnd.xfdl.webform\n# application/vnd.xmi+xml\n# application/vnd.xmpie.cpkg\n# application/vnd.xmpie.dpkg\n# application/vnd.xmpie.plan\n# application/vnd.xmpie.ppkg\n# application/vnd.xmpie.xlim\napplication/vnd.yamaha.hv-dic\t\t\thvd\napplication/vnd.yamaha.hv-script\t\thvs\napplication/vnd.yamaha.hv-voice\t\t\thvp\napplication/vnd.yamaha.openscoreformat\t\t\tosf\napplication/vnd.yamaha.openscoreformat.osfpvg+xml\tosfpvg\n# application/vnd.yamaha.remote-setup\napplication/vnd.yamaha.smaf-audio\t\tsaf\napplication/vnd.yamaha.smaf-phrase\t\tspf\n# application/vnd.yamaha.through-ngn\n# application/vnd.yamaha.tunnel-udpencap\napplication/vnd.yellowriver-custom-menu\t\tcmp\napplication/vnd.zul\t\t\t\tzir zirz\napplication/vnd.zzazz.deck+xml\t\t\tzaz\napplication/voicexml+xml\t\t\tvxml\n# application/vq-rtcpxr\n# application/watcherinfo+xml\n# application/whoispp-query\n# application/whoispp-response\napplication/widget\t\t\t\twgt\napplication/winhlp\t\t\t\thlp\n# application/wita\n# application/wordperfect5.1\napplication/wsdl+xml\t\t\t\twsdl\napplication/wspolicy+xml\t\t\twspolicy\napplication/x-7z-compressed\t\t\t7z\napplication/x-abiword\t\t\t\tabw\napplication/x-ace-compressed\t\t\tace\n# application/x-amf\napplication/x-apple-diskimage\t\t\tdmg\napplication/x-authorware-bin\t\t\taab x32 u32 vox\napplication/x-authorware-map\t\t\taam\napplication/x-authorware-seg\t\t\taas\napplication/x-bcpio\t\t\t\tbcpio\napplication/x-bittorrent\t\t\ttorrent\napplication/x-blorb\t\t\t\tblb blorb\napplication/x-bzip\t\t\t\tbz\napplication/x-bzip2\t\t\t\tbz2 boz\napplication/x-cbr\t\t\t\tcbr cba cbt cbz cb7\napplication/x-cdlink\t\t\t\tvcd\napplication/x-cfs-compressed\t\t\tcfs\napplication/x-chat\t\t\t\tchat\napplication/x-chess-pgn\t\t\t\tpgn\napplication/x-conference\t\t\tnsc\n# application/x-compress\napplication/x-cpio\t\t\t\tcpio\napplication/x-csh\t\t\t\tcsh\napplication/x-debian-package\t\t\tdeb udeb\napplication/x-dgc-compressed\t\t\tdgc\napplication/x-director\t\t\tdir dcr dxr cst cct cxt w3d fgd swa\napplication/x-doom\t\t\t\twad\napplication/x-dtbncx+xml\t\t\tncx\napplication/x-dtbook+xml\t\t\tdtb\napplication/x-dtbresource+xml\t\t\tres\napplication/x-dvi\t\t\t\tdvi\napplication/x-envoy\t\t\t\tevy\napplication/x-eva\t\t\t\teva\napplication/x-font-bdf\t\t\t\tbdf\n# application/x-font-dos\n# application/x-font-framemaker\napplication/x-font-ghostscript\t\t\tgsf\n# application/x-font-libgrx\napplication/x-font-linux-psf\t\t\tpsf\napplication/x-font-otf\t\t\t\totf\napplication/x-font-pcf\t\t\t\tpcf\napplication/x-font-snf\t\t\t\tsnf\n# application/x-font-speedo\n# application/x-font-sunos-news\napplication/x-font-ttf\t\t\t\tttf ttc\napplication/x-font-type1\t\t\tpfa pfb pfm afm\napplication/font-woff\t\t\t\twoff\n# application/x-font-vfont\napplication/x-freearc\t\t\t\tarc\napplication/x-futuresplash\t\t\tspl\napplication/x-gca-compressed\t\t\tgca\napplication/x-glulx\t\t\t\tulx\napplication/x-gnumeric\t\t\t\tgnumeric\napplication/x-gramps-xml\t\t\tgramps\napplication/x-gtar\t\t\t\tgtar\n# application/x-gzip\napplication/x-hdf\t\t\t\thdf\napplication/x-install-instructions\t\tinstall\napplication/x-iso9660-image\t\t\tiso\napplication/x-java-jnlp-file\t\t\tjnlp\napplication/x-latex\t\t\t\tlatex\napplication/x-lzh-compressed\t\t\tlzh lha\napplication/x-mie\t\t\t\tmie\napplication/x-mobipocket-ebook\t\t\tprc mobi\napplication/x-ms-application\t\t\tapplication\napplication/x-ms-shortcut\t\t\tlnk\napplication/x-ms-wmd\t\t\t\twmd\napplication/x-ms-wmz\t\t\t\twmz\napplication/x-ms-xbap\t\t\t\txbap\napplication/x-msaccess\t\t\t\tmdb\napplication/x-msbinder\t\t\t\tobd\napplication/x-mscardfile\t\t\tcrd\napplication/x-msclip\t\t\t\tclp\napplication/x-msdownload\t\t\texe dll com bat msi\napplication/x-msmediaview\t\t\tmvb m13 m14\napplication/x-msmetafile\t\t\twmf wmz emf emz\napplication/x-msmoney\t\t\t\tmny\napplication/x-mspublisher\t\t\tpub\napplication/x-msschedule\t\t\tscd\napplication/x-msterminal\t\t\ttrm\napplication/x-mswrite\t\t\t\twri\napplication/x-netcdf\t\t\t\tnc cdf\napplication/x-nzb\t\t\t\tnzb\napplication/x-pkcs12\t\t\t\tp12 pfx\napplication/x-pkcs7-certificates\t\tp7b spc\napplication/x-pkcs7-certreqresp\t\t\tp7r\napplication/x-rar-compressed\t\t\trar\napplication/x-research-info-systems\t\tris\napplication/x-sh\t\t\t\tsh\napplication/x-shar\t\t\t\tshar\napplication/x-shockwave-flash\t\t\tswf\napplication/x-silverlight-app\t\t\txap\napplication/x-sql\t\t\t\tsql\napplication/x-stuffit\t\t\t\tsit\napplication/x-stuffitx\t\t\t\tsitx\napplication/x-subrip\t\t\t\tsrt\napplication/x-sv4cpio\t\t\t\tsv4cpio\napplication/x-sv4crc\t\t\t\tsv4crc\napplication/x-t3vm-image\t\t\tt3\napplication/x-tads\t\t\t\tgam\napplication/x-tar\t\t\t\ttar\napplication/x-tcl\t\t\t\ttcl\napplication/x-tex\t\t\t\ttex\napplication/x-tex-tfm\t\t\t\ttfm\napplication/x-texinfo\t\t\t\ttexinfo texi\napplication/x-tgif\t\t\t\tobj\napplication/x-ustar\t\t\t\tustar\napplication/x-wais-source\t\t\tsrc\napplication/x-x509-ca-cert\t\t\tder crt\napplication/x-xfig\t\t\t\tfig\napplication/x-xliff+xml\t\t\t\txlf\napplication/x-xpinstall\t\t\t\txpi\napplication/x-xz\t\t\t\txz\napplication/x-zmachine\t\t\t\tz1 z2 z3 z4 z5 z6 z7 z8\n# application/x400-bp\napplication/xaml+xml\t\t\t\txaml\n# application/xcap-att+xml\n# application/xcap-caps+xml\napplication/xcap-diff+xml\t\t\txdf\n# application/xcap-el+xml\n# application/xcap-error+xml\n# application/xcap-ns+xml\n# application/xcon-conference-info-diff+xml\n# application/xcon-conference-info+xml\napplication/xenc+xml\t\t\t\txenc\napplication/xhtml+xml\t\t\t\txhtml xht\n# application/xhtml-voice+xml\napplication/xml\t\t\t\t\txml xsl\napplication/xml-dtd\t\t\t\tdtd\n# application/xml-external-parsed-entity\n# application/xmpp+xml\napplication/xop+xml\t\t\t\txop\napplication/xproc+xml\t\t\t\txpl\napplication/xslt+xml\t\t\t\txslt\napplication/xspf+xml\t\t\t\txspf\napplication/xv+xml\t\t\t\tmxml xhvml xvml xvm\napplication/yang\t\t\t\tyang\napplication/yin+xml\t\t\t\tyin\napplication/zip\t\t\t\t\tzip\n# audio/1d-interleaved-parityfec\n# audio/32kadpcm\n# audio/3gpp\n# audio/3gpp2\n# audio/ac3\naudio/adpcm\t\t\t\t\tadp\n# audio/amr\n# audio/amr-wb\n# audio/amr-wb+\n# audio/asc\n# audio/atrac-advanced-lossless\n# audio/atrac-x\n# audio/atrac3\naudio/basic\t\t\t\t\tau snd\n# audio/bv16\n# audio/bv32\n# audio/clearmode\n# audio/cn\n# audio/dat12\n# audio/dls\n# audio/dsr-es201108\n# audio/dsr-es202050\n# audio/dsr-es202211\n# audio/dsr-es202212\n# audio/dv\n# audio/dvi4\n# audio/eac3\n# audio/evrc\n# audio/evrc-qcp\n# audio/evrc0\n# audio/evrc1\n# audio/evrcb\n# audio/evrcb0\n# audio/evrcb1\n# audio/evrcwb\n# audio/evrcwb0\n# audio/evrcwb1\n# audio/example\n# audio/fwdred\n# audio/g719\n# audio/g722\n# audio/g7221\n# audio/g723\n# audio/g726-16\n# audio/g726-24\n# audio/g726-32\n# audio/g726-40\n# audio/g728\n# audio/g729\n# audio/g7291\n# audio/g729d\n# audio/g729e\n# audio/gsm\n# audio/gsm-efr\n# audio/gsm-hr-08\n# audio/ilbc\n# audio/ip-mr_v2.5\n# audio/isac\n# audio/l16\n# audio/l20\n# audio/l24\n# audio/l8\n# audio/lpc\naudio/midi\t\t\t\t\tmid midi kar rmi\n# audio/mobile-xmf\naudio/mp4\t\t\t\t\tmp4a\n# audio/mp4a-latm\n# audio/mpa\n# audio/mpa-robust\naudio/mpeg\t\t\t\t\tmpga mp2 mp2a mp3 m2a m3a\n# audio/mpeg4-generic\n# audio/musepack\naudio/ogg\t\t\t\t\toga ogg spx\n# audio/opus\n# audio/parityfec\n# audio/pcma\n# audio/pcma-wb\n# audio/pcmu-wb\n# audio/pcmu\n# audio/prs.sid\n# audio/qcelp\n# audio/red\n# audio/rtp-enc-aescm128\n# audio/rtp-midi\n# audio/rtx\naudio/s3m\t\t\t\t\ts3m\naudio/silk\t\t\t\t\tsil\n# audio/smv\n# audio/smv0\n# audio/smv-qcp\n# audio/sp-midi\n# audio/speex\n# audio/t140c\n# audio/t38\n# audio/telephone-event\n# audio/tone\n# audio/uemclip\n# audio/ulpfec\n# audio/vdvi\n# audio/vmr-wb\n# audio/vnd.3gpp.iufp\n# audio/vnd.4sb\n# audio/vnd.audiokoz\n# audio/vnd.celp\n# audio/vnd.cisco.nse\n# audio/vnd.cmles.radio-events\n# audio/vnd.cns.anp1\n# audio/vnd.cns.inf1\naudio/vnd.dece.audio\t\t\t\tuva uvva\naudio/vnd.digital-winds\t\t\t\teol\n# audio/vnd.dlna.adts\n# audio/vnd.dolby.heaac.1\n# audio/vnd.dolby.heaac.2\n# audio/vnd.dolby.mlp\n# audio/vnd.dolby.mps\n# audio/vnd.dolby.pl2\n# audio/vnd.dolby.pl2x\n# audio/vnd.dolby.pl2z\n# audio/vnd.dolby.pulse.1\naudio/vnd.dra\t\t\t\t\tdra\naudio/vnd.dts\t\t\t\t\tdts\naudio/vnd.dts.hd\t\t\t\tdtshd\n# audio/vnd.dvb.file\n# audio/vnd.everad.plj\n# audio/vnd.hns.audio\naudio/vnd.lucent.voice\t\t\t\tlvp\naudio/vnd.ms-playready.media.pya\t\tpya\n# audio/vnd.nokia.mobile-xmf\n# audio/vnd.nortel.vbk\naudio/vnd.nuera.ecelp4800\t\t\tecelp4800\naudio/vnd.nuera.ecelp7470\t\t\tecelp7470\naudio/vnd.nuera.ecelp9600\t\t\tecelp9600\n# audio/vnd.octel.sbc\n# audio/vnd.qcelp\n# audio/vnd.rhetorex.32kadpcm\naudio/vnd.rip\t\t\t\t\trip\n# audio/vnd.sealedmedia.softseal.mpeg\n# audio/vnd.vmx.cvsd\n# audio/vorbis\n# audio/vorbis-config\naudio/webm\t\t\t\t\tweba\naudio/x-aac\t\t\t\t\taac\naudio/x-aiff\t\t\t\t\taif aiff aifc\naudio/x-caf\t\t\t\t\tcaf\naudio/x-flac\t\t\t\t\tflac\naudio/x-matroska\t\t\t\tmka\naudio/x-mpegurl\t\t\t\t\tm3u\naudio/x-ms-wax\t\t\t\t\twax\naudio/x-ms-wma\t\t\t\t\twma\naudio/x-pn-realaudio\t\t\t\tram ra\naudio/x-pn-realaudio-plugin\t\t\trmp\n# audio/x-tta\naudio/x-wav\t\t\t\t\twav\naudio/xm\t\t\t\t\txm\nchemical/x-cdx\t\t\t\t\tcdx\nchemical/x-cif\t\t\t\t\tcif\nchemical/x-cmdf\t\t\t\t\tcmdf\nchemical/x-cml\t\t\t\t\tcml\nchemical/x-csml\t\t\t\t\tcsml\n# chemical/x-pdb\nchemical/x-xyz\t\t\t\t\txyz\nimage/bmp\t\t\t\t\tbmp\nimage/cgm\t\t\t\t\tcgm\n# image/example\n# image/fits\nimage/g3fax\t\t\t\t\tg3\nimage/gif\t\t\t\t\tgif\nimage/ief\t\t\t\t\tief\n# image/jp2\nimage/jpeg\t\t\t\t\tjpeg jpg jpe\n# image/jpm\n# image/jpx\nimage/ktx\t\t\t\t\tktx\n# image/naplps\nimage/png\t\t\t\t\tpng\nimage/prs.btif\t\t\t\t\tbtif\n# image/prs.pti\nimage/sgi\t\t\t\t\tsgi\nimage/svg+xml\t\t\t\t\tsvg svgz\n# image/t38\nimage/tiff\t\t\t\t\ttiff tif\n# image/tiff-fx\nimage/vnd.adobe.photoshop\t\t\tpsd\n# image/vnd.cns.inf2\nimage/vnd.dece.graphic\t\t\t\tuvi uvvi uvg uvvg\nimage/vnd.dvb.subtitle\t\t\t\tsub\nimage/vnd.djvu\t\t\t\t\tdjvu djv\nimage/vnd.dwg\t\t\t\t\tdwg\nimage/vnd.dxf\t\t\t\t\tdxf\nimage/vnd.fastbidsheet\t\t\t\tfbs\nimage/vnd.fpx\t\t\t\t\tfpx\nimage/vnd.fst\t\t\t\t\tfst\nimage/vnd.fujixerox.edmics-mmr\t\t\tmmr\nimage/vnd.fujixerox.edmics-rlc\t\t\trlc\n# image/vnd.globalgraphics.pgb\n# image/vnd.microsoft.icon\n# image/vnd.mix\nimage/vnd.ms-modi\t\t\t\tmdi\nimage/vnd.ms-photo\t\t\t\twdp\nimage/vnd.net-fpx\t\t\t\tnpx\n# image/vnd.radiance\n# image/vnd.sealed.png\n# image/vnd.sealedmedia.softseal.gif\n# image/vnd.sealedmedia.softseal.jpg\n# image/vnd.svf\nimage/vnd.wap.wbmp\t\t\t\twbmp\nimage/vnd.xiff\t\t\t\t\txif\nimage/webp\t\t\t\t\twebp\nimage/x-3ds\t\t\t\t\t3ds\nimage/x-cmu-raster\t\t\t\tras\nimage/x-cmx\t\t\t\t\tcmx\nimage/x-freehand\t\t\t\tfh fhc fh4 fh5 fh7\nimage/x-icon\t\t\t\t\tico\nimage/x-mrsid-image\t\t\t\tsid\nimage/x-pcx\t\t\t\t\tpcx\nimage/x-pict\t\t\t\t\tpic pct\nimage/x-portable-anymap\t\t\t\tpnm\nimage/x-portable-bitmap\t\t\t\tpbm\nimage/x-portable-graymap\t\t\tpgm\nimage/x-portable-pixmap\t\t\t\tppm\nimage/x-rgb\t\t\t\t\trgb\nimage/x-tga\t\t\t\t\ttga\nimage/x-xbitmap\t\t\t\t\txbm\nimage/x-xpixmap\t\t\t\t\txpm\nimage/x-xwindowdump\t\t\t\txwd\n# message/cpim\n# message/delivery-status\n# message/disposition-notification\n# message/example\n# message/external-body\n# message/feedback-report\n# message/global\n# message/global-delivery-status\n# message/global-disposition-notification\n# message/global-headers\n# message/http\n# message/imdn+xml\n# message/news\n# message/partial\nmessage/rfc822\t\t\t\t\teml mime\n# message/s-http\n# message/sip\n# message/sipfrag\n# message/tracking-status\n# message/vnd.si.simp\n# model/example\nmodel/iges\t\t\t\t\tigs iges\nmodel/mesh\t\t\t\t\tmsh mesh silo\nmodel/vnd.collada+xml\t\t\t\tdae\nmodel/vnd.dwf\t\t\t\t\tdwf\n# model/vnd.flatland.3dml\nmodel/vnd.gdl\t\t\t\t\tgdl\n# model/vnd.gs-gdl\n# model/vnd.gs.gdl\nmodel/vnd.gtw\t\t\t\t\tgtw\n# model/vnd.moml+xml\nmodel/vnd.mts\t\t\t\t\tmts\n# model/vnd.parasolid.transmit.binary\n# model/vnd.parasolid.transmit.text\nmodel/vnd.vtu\t\t\t\t\tvtu\nmodel/vrml\t\t\t\t\twrl vrml\nmodel/x3d+binary\t\t\t\tx3db x3dbz\nmodel/x3d+vrml\t\t\t\t\tx3dv x3dvz\nmodel/x3d+xml\t\t\t\t\tx3d x3dz\n# multipart/alternative\n# multipart/appledouble\n# multipart/byteranges\n# multipart/digest\n# multipart/encrypted\n# multipart/example\n# multipart/form-data\n# multipart/header-set\n# multipart/mixed\n# multipart/parallel\n# multipart/related\n# multipart/report\n# multipart/signed\n# multipart/voice-message\n# text/1d-interleaved-parityfec\ntext/cache-manifest\t\t\t\tappcache\ntext/calendar\t\t\t\t\tics ifb\ntext/css\t\t\t\t\tcss\ntext/csv\t\t\t\t\tcsv\n# text/directory\n# text/dns\n# text/ecmascript\n# text/enriched\n# text/example\n# text/fwdred\ntext/html\t\t\t\t\thtml htm\n# text/javascript\ntext/n3\t\t\t\t\t\tn3\n# text/parityfec\ntext/plain\t\t\t\t\ttxt text conf def list log in\n# text/prs.fallenstein.rst\ntext/prs.lines.tag\t\t\t\tdsc\n# text/vnd.radisys.msml-basic-layout\n# text/red\n# text/rfc822-headers\ntext/richtext\t\t\t\t\trtx\n# text/rtf\n# text/rtp-enc-aescm128\n# text/rtx\ntext/sgml\t\t\t\t\tsgml sgm\n# text/t140\ntext/tab-separated-values\t\t\ttsv\ntext/troff\t\t\t\t\tt tr roff man me ms\ntext/turtle\t\t\t\t\tttl\n# text/ulpfec\ntext/uri-list\t\t\t\t\turi uris urls\ntext/vcard\t\t\t\t\tvcard\n# text/vnd.abc\ntext/vnd.curl\t\t\t\t\tcurl\ntext/vnd.curl.dcurl\t\t\t\tdcurl\ntext/vnd.curl.scurl\t\t\t\tscurl\ntext/vnd.curl.mcurl\t\t\t\tmcurl\n# text/vnd.dmclientscript\ntext/vnd.dvb.subtitle\t\t\t\tsub\n# text/vnd.esmertec.theme-descriptor\ntext/vnd.fly\t\t\t\t\tfly\ntext/vnd.fmi.flexstor\t\t\t\tflx\ntext/vnd.graphviz\t\t\t\tgv\ntext/vnd.in3d.3dml\t\t\t\t3dml\ntext/vnd.in3d.spot\t\t\t\tspot\n# text/vnd.iptc.newsml\n# text/vnd.iptc.nitf\n# text/vnd.latex-z\n# text/vnd.motorola.reflex\n# text/vnd.ms-mediapackage\n# text/vnd.net2phone.commcenter.command\n# text/vnd.si.uricatalogue\ntext/vnd.sun.j2me.app-descriptor\t\tjad\n# text/vnd.trolltech.linguist\n# text/vnd.wap.si\n# text/vnd.wap.sl\ntext/vnd.wap.wml\t\t\t\twml\ntext/vnd.wap.wmlscript\t\t\t\twmls\ntext/x-asm\t\t\t\t\ts asm\ntext/x-c\t\t\t\t\tc cc cxx cpp h hh dic\ntext/x-fortran\t\t\t\t\tf for f77 f90\ntext/x-java-source\t\t\t\tjava\ntext/x-opml\t\t\t\t\topml\ntext/x-pascal\t\t\t\t\tp pas\ntext/x-nfo\t\t\t\t\tnfo\ntext/x-setext\t\t\t\t\tetx\ntext/x-sfv\t\t\t\t\tsfv\ntext/x-uuencode\t\t\t\t\tuu\ntext/x-vcalendar\t\t\t\tvcs\ntext/x-vcard\t\t\t\t\tvcf\n# text/xml\n# text/xml-external-parsed-entity\n# video/1d-interleaved-parityfec\nvideo/3gpp\t\t\t\t\t3gp\n# video/3gpp-tt\nvideo/3gpp2\t\t\t\t\t3g2\n# video/bmpeg\n# video/bt656\n# video/celb\n# video/dv\n# video/example\nvideo/h261\t\t\t\t\th261\nvideo/h263\t\t\t\t\th263\n# video/h263-1998\n# video/h263-2000\nvideo/h264\t\t\t\t\th264\n# video/h264-rcdo\n# video/h264-svc\nvideo/jpeg\t\t\t\t\tjpgv\n# video/jpeg2000\nvideo/jpm\t\t\t\t\tjpm jpgm\nvideo/mj2\t\t\t\t\tmj2 mjp2\n# video/mp1s\n# video/mp2p\n# video/mp2t\nvideo/mp4\t\t\t\t\tmp4 mp4v mpg4\n# video/mp4v-es\nvideo/mpeg\t\t\t\t\tmpeg mpg mpe m1v m2v\n# video/mpeg4-generic\n# video/mpv\n# video/nv\nvideo/ogg\t\t\t\t\togv\n# video/parityfec\n# video/pointer\nvideo/quicktime\t\t\t\t\tqt mov\n# video/raw\n# video/rtp-enc-aescm128\n# video/rtx\n# video/smpte292m\n# video/ulpfec\n# video/vc1\n# video/vnd.cctv\nvideo/vnd.dece.hd\t\t\t\tuvh uvvh\nvideo/vnd.dece.mobile\t\t\t\tuvm uvvm\n# video/vnd.dece.mp4\nvideo/vnd.dece.pd\t\t\t\tuvp uvvp\nvideo/vnd.dece.sd\t\t\t\tuvs uvvs\nvideo/vnd.dece.video\t\t\t\tuvv uvvv\n# video/vnd.directv.mpeg\n# video/vnd.directv.mpeg-tts\n# video/vnd.dlna.mpeg-tts\nvideo/vnd.dvb.file\t\t\t\tdvb\nvideo/vnd.fvt\t\t\t\t\tfvt\n# video/vnd.hns.video\n# video/vnd.iptvforum.1dparityfec-1010\n# video/vnd.iptvforum.1dparityfec-2005\n# video/vnd.iptvforum.2dparityfec-1010\n# video/vnd.iptvforum.2dparityfec-2005\n# video/vnd.iptvforum.ttsavc\n# video/vnd.iptvforum.ttsmpeg2\n# video/vnd.motorola.video\n# video/vnd.motorola.videop\nvideo/vnd.mpegurl\t\t\t\tmxu m4u\nvideo/vnd.ms-playready.media.pyv\t\tpyv\n# video/vnd.nokia.interleaved-multimedia\n# video/vnd.nokia.videovoip\n# video/vnd.objectvideo\n# video/vnd.sealed.mpeg1\n# video/vnd.sealed.mpeg4\n# video/vnd.sealed.swf\n# video/vnd.sealedmedia.softseal.mov\nvideo/vnd.uvvu.mp4\t\t\t\tuvu uvvu\nvideo/vnd.vivo\t\t\t\t\tviv\nvideo/webm\t\t\t\t\twebm\nvideo/x-f4v\t\t\t\t\tf4v\nvideo/x-fli\t\t\t\t\tfli\nvideo/x-flv\t\t\t\t\tflv\nvideo/x-m4v\t\t\t\t\tm4v\nvideo/x-matroska\t\t\t\tmkv mk3d mks\nvideo/x-mng\t\t\t\t\tmng\nvideo/x-ms-asf\t\t\t\t\tasf asx\nvideo/x-ms-vob\t\t\t\t\tvob\nvideo/x-ms-wm\t\t\t\t\twm\nvideo/x-ms-wmv\t\t\t\t\twmv\nvideo/x-ms-wmx\t\t\t\t\twmx\nvideo/x-ms-wvx\t\t\t\t\twvx\nvideo/x-msvideo\t\t\t\t\tavi\nvideo/x-sgi-movie\t\t\t\tmovie\nvideo/x-smv\t\t\t\t\tsmv\nx-conference/x-cooltalk\t\t\t\tice\n"
  },
  {
    "path": "mtproto-client.c",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Nikolay Durov, Andrey Lopatin 2012-2013\n              Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define        _FILE_OFFSET_BITS        64\n\n#include <assert.h>\n#include <errno.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <signal.h>\n#include <unistd.h>\n#include <fcntl.h>\n#include <sys/types.h>\n#ifdef WIN32\n#include <winsock2.h>\n#else\n#include <netdb.h>\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <netinet/tcp.h>\n#include <poll.h>\n#endif\n#include \"crypto/rand.h\"\n#include \"crypto/rsa_pem.h\"\n#include \"crypto/sha.h\"\n\n//#include \"telegram.h\"\n#include \"queries.h\"\n//#include \"loop.h\"\n#include \"tgl-structures.h\"\n#include \"tgl-binlog.h\"\n#include \"auto.h\"\n#include \"auto/auto-types.h\"\n#include \"auto/auto-skip.h\"\n#include \"tgl.h\"\n#include \"mtproto-client.h\"\n#include \"tools.h\"\n#include \"tree.h\"\n#include \"updates.h\"\n#include \"mtproto-utils.h\"\n#include \"auto.h\"\n#include \"tgl-methods-in.h\"\n\n#include \"mtproto-common.h\"\n\n#define MAX_NET_RES        (1L << 16)\n//extern int log_level;\n\nstatic long long generate_next_msg_id (struct tgl_state *TLS, struct tgl_dc *DC, struct tgl_session *S);\nstatic double get_server_time (struct tgl_dc *DC);\n\n// for statistic only\nstatic int total_packets_sent;\nstatic long long total_data_sent;\n\n\nstatic int rpc_execute (struct tgl_state *TLS, struct connection *c, int op, int len);\nstatic int rpc_becomes_ready (struct tgl_state *TLS, struct connection *c);\nstatic int rpc_close (struct tgl_state *TLS, struct connection *c);\n\nstatic double get_utime (int clock_id) {\n  struct timespec T;\n  tgl_my_clock_gettime (clock_id, &T);\n  return T.tv_sec + (double) T.tv_nsec * 1e-9;\n}\n\n\n#define MAX_RESPONSE_SIZE        (1L << 24)\n\nstatic TGLC_rsa *rsa_load_public_key (struct tgl_state *TLS, const char *public_key_name) {\n  FILE *f = fopen (public_key_name, \"r\");\n  if (f == NULL) {\n    vlogprintf (E_WARNING, \"Couldn't open public key file: %s\\n\", public_key_name);\n    return NULL;\n  }\n  TGLC_rsa *res = TGLC_pem_read_RSAPublicKey (f);\n  fclose (f);\n  if (res == NULL) {\n    vlogprintf (E_WARNING, \"TGLC_pem_read_RSAPublicKey returns NULL.\\n\");\n    return NULL;\n  }\n\n  vlogprintf (E_NOTICE, \"public key '%s' loaded successfully\\n\", public_key_name);\n\n  return res;\n}\n\n\n\n\n/*\n *\n *        UNAUTHORIZED (DH KEY EXCHANGE) PROTOCOL PART\n *\n */\n\n#define ENCRYPT_BUFFER_INTS        16384\nstatic int encrypt_buffer[ENCRYPT_BUFFER_INTS];\n\n#define DECRYPT_BUFFER_INTS        16384\nstatic int decrypt_buffer[ENCRYPT_BUFFER_INTS];\n\nstatic int encrypt_packet_buffer (struct tgl_state *TLS, struct tgl_dc *DC) {\n  TGLC_rsa *key = TLS->rsa_key_loaded[DC->rsa_key_idx];\n  return tgl_pad_rsa_encrypt (TLS, (char *) packet_buffer, (packet_ptr - packet_buffer) * 4, (char *) encrypt_buffer, ENCRYPT_BUFFER_INTS * 4, TGLC_rsa_n (key), TGLC_rsa_e (key));\n}\n\nstatic int encrypt_packet_buffer_aes_unauth (const char server_nonce[16], const char hidden_client_nonce[32]) {\n  tgl_init_aes_unauth (server_nonce, hidden_client_nonce, 1);\n  return tgl_pad_aes_encrypt ((char *) packet_buffer, (packet_ptr - packet_buffer) * 4, (char *) encrypt_buffer, ENCRYPT_BUFFER_INTS * 4);\n}\n\n//\n// Used in unauthorized part of protocol\n//\nstatic int rpc_send_packet (struct tgl_state *TLS, struct connection *c) {\n  static struct {\n    long long auth_key_id;\n    long long out_msg_id;\n    int msg_len;\n  } unenc_msg_header;\n\n  int len = (packet_ptr - packet_buffer) * 4;\n  TLS->net_methods->incr_out_packet_num (c);\n\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n\n  unenc_msg_header.out_msg_id = generate_next_msg_id (TLS, DC, S);\n  unenc_msg_header.msg_len = len;\n\n  int total_len = len + 20;\n  assert (total_len > 0 && !(total_len & 0xfc000003));\n  total_len >>= 2;\n  vlogprintf (E_DEBUG, \"writing packet: total_len = %d, len = %d\\n\", total_len, len);\n  if (total_len < 0x7f) {\n    assert (TLS->net_methods->write_out (c, &total_len, 1) == 1);\n  } else {\n    total_len = (total_len << 8) | 0x7f;\n    assert (TLS->net_methods->write_out (c, &total_len, 4) == 4);\n  }\n  TLS->net_methods->write_out (c, &unenc_msg_header, 20);\n  TLS->net_methods->write_out (c, packet_buffer, len);\n  TLS->net_methods->flush_out (c);\n\n  total_packets_sent ++;\n  total_data_sent += total_len;\n  return 1;\n}\n\nstatic int rpc_send_message (struct tgl_state *TLS, struct connection *c, void *data, int len) {\n  assert (len > 0 && !(len & 0xfc000003));\n\n  int total_len = len >> 2;\n  if (total_len < 0x7f) {\n    assert (TLS->net_methods->write_out (c, &total_len, 1) == 1);\n  } else {\n    total_len = (total_len << 8) | 0x7f;\n    assert (TLS->net_methods->write_out (c, &total_len, 4) == 4);\n  }\n\n  TLS->net_methods->incr_out_packet_num (c);\n  assert (TLS->net_methods->write_out (c, data, len) == len);\n  TLS->net_methods->flush_out (c);\n\n  total_packets_sent ++;\n  total_data_sent += total_len;\n  return 1;\n}\n\n//\n// State machine. See description at\n// https://core.telegram.org/mtproto/auth_key\n//\n\n\nstatic int check_unauthorized_header (struct tgl_state *TLS) {\n  long long auth_key_id = fetch_long ();\n  if (auth_key_id) {\n    vlogprintf (E_ERROR, \"ERROR: auth_key_id should be NULL\\n\");\n    return -1;\n  }\n  fetch_long (); // msg_id\n  int len = fetch_int ();\n  if (len != 4 * (in_end - in_ptr)) {\n    vlogprintf (E_ERROR, \"ERROR: length mismatch\\n\");\n    return -1;\n  }\n  return 0;\n}\n\n/* {{{ REQ_PQ */\n// req_pq#60469778 nonce:int128 = ResPQ\nstatic int send_req_pq_packet (struct tgl_state *TLS, struct connection *c) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  assert (DC->state == st_init);\n\n  tglt_secure_random (DC->nonce, 16);\n  clear_packet ();\n  out_int (CODE_req_pq);\n  out_ints ((int *)DC->nonce, 4);\n  rpc_send_packet (TLS, c);\n\n  DC->state = st_reqpq_sent;\n  return 1;\n}\n\n// req_pq#60469778 nonce:int128 = ResPQ\nstatic int send_req_pq_temp_packet (struct tgl_state *TLS, struct connection *c) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  assert (DC->state == st_authorized);\n\n  tglt_secure_random (DC->nonce, 16);\n  clear_packet ();\n  out_int (CODE_req_pq);\n  out_ints ((int *)DC->nonce, 4);\n  rpc_send_packet (TLS, c);\n\n  DC->state = st_reqpq_sent_temp;\n  return 1;\n}\n/* }}} */\n\n/* {{{ REQ DH */\n// req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;\n// p_q_inner_data#83c95aec pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data;\n// p_q_inner_data_temp#3c6a84d4 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data;\nstatic void send_req_dh_packet (struct tgl_state *TLS, struct connection *c, TGLC_bn *pq, int temp_key) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n\n  TGLC_bn *p = TGLC_bn_new ();\n  TGLC_bn *q = TGLC_bn_new ();\n  assert (bn_factorize (pq, p, q) >= 0);\n\n  clear_packet ();\n  packet_ptr += 5;\n  out_int (temp_key ? CODE_p_q_inner_data_temp : CODE_p_q_inner_data);\n\n  out_bignum (pq);\n  out_bignum (p);\n  out_bignum (q);\n\n  out_ints ((int *) DC->nonce, 4);\n  out_ints ((int *) DC->server_nonce, 4);\n  tglt_secure_random (DC->new_nonce, 32);\n  out_ints ((int *) DC->new_nonce, 8);\n  if (temp_key) {\n    out_int (TLS->temp_key_expire_time);\n  }\n  TGLC_sha1 ((unsigned char *) (packet_buffer + 5), (packet_ptr - packet_buffer - 5) * 4, (unsigned char *) packet_buffer);\n\n  int l = encrypt_packet_buffer (TLS, DC);\n\n  clear_packet ();\n  out_int (CODE_req_DH_params);\n  out_ints ((int *) DC->nonce, 4);\n  out_ints ((int *) DC->server_nonce, 4);\n  out_bignum (p);\n  out_bignum (q);\n\n  out_long (TLS->rsa_key_fingerprint[DC->rsa_key_idx]);\n  out_cstring ((char *) encrypt_buffer, l);\n\n  TGLC_bn_free (p);\n  TGLC_bn_free (q);\n  DC->state = temp_key ? st_reqdh_sent_temp : st_reqdh_sent;\n  rpc_send_packet (TLS, c);\n}\n/* }}} */\n\n/* {{{ SEND DH PARAMS */\n// set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;\n// client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data\nstatic void send_dh_params (struct tgl_state *TLS, struct connection *c, TGLC_bn *dh_prime, TGLC_bn *g_a, int g, int temp_key) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n\n  clear_packet ();\n  packet_ptr += 5;\n  out_int (CODE_client_DH_inner_data);\n  out_ints ((int *) DC->nonce, 4);\n  out_ints ((int *) DC->server_nonce, 4);\n  out_long (0);\n\n  TGLC_bn *dh_g = TGLC_bn_new ();\n  ensure (TGLC_bn_set_word (dh_g, g));\n\n  static unsigned char s_power[256];\n  tglt_secure_random (s_power, 256);\n  TGLC_bn *dh_power = TGLC_bn_bin2bn ((unsigned char *)s_power, 256, 0);\n  ensure_ptr (dh_power);\n\n  TGLC_bn *y = TGLC_bn_new ();\n  ensure_ptr (y);\n  ensure (TGLC_bn_mod_exp (y, dh_g, dh_power, dh_prime, TLS->TGLC_bn_ctx));\n  out_bignum (y);\n  TGLC_bn_free (y);\n\n  TGLC_bn *auth_key_num = TGLC_bn_new ();\n  ensure (TGLC_bn_mod_exp (auth_key_num, g_a, dh_power, dh_prime, TLS->TGLC_bn_ctx));\n  int l = TGLC_bn_num_bytes (auth_key_num);\n  assert (l >= 250 && l <= 256);\n  assert (TGLC_bn_bn2bin (auth_key_num, (unsigned char *)(temp_key ? DC->temp_auth_key : DC->auth_key)));\n  if (l < 256) {\n    char *key = temp_key ? DC->temp_auth_key : DC->auth_key;\n    memmove (key + 256 - l, key, l);\n    memset (key, 0, 256 - l);\n  }\n\n  TGLC_bn_free (dh_power);\n  TGLC_bn_free (auth_key_num);\n  TGLC_bn_free (dh_g);\n\n  TGLC_sha1 ((unsigned char *) (packet_buffer + 5), (packet_ptr - packet_buffer - 5) * 4, (unsigned char *) packet_buffer);\n\n  l = encrypt_packet_buffer_aes_unauth (DC->server_nonce, DC->new_nonce);\n\n  clear_packet ();\n  out_int (CODE_set_client_DH_params);\n  out_ints ((int *) DC->nonce, 4);\n  out_ints ((int *) DC->server_nonce, 4);\n  out_cstring ((char *) encrypt_buffer, l);\n\n  DC->state = temp_key ? st_client_dh_sent_temp : st_client_dh_sent;;\n  rpc_send_packet (TLS, c);\n}\n/* }}} */\n\n/* {{{ RECV RESPQ */\n// resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector long = ResPQ\nstatic int process_respq_answer (struct tgl_state *TLS, struct connection *c, char *packet, int len, int temp_key) {\n  assert (!(len & 3));\n  in_ptr = (int *)packet;\n  in_end = in_ptr + (len / 4);\n  if (check_unauthorized_header (TLS) < 0) {\n    return -1;\n  }\n\n  int *in_save = in_ptr;\n  if (skip_type_any (TYPE_TO_PARAM (res_p_q)) < 0 || in_ptr != in_end) {\n    vlogprintf (E_ERROR, \"can not parse req_p_q answer\\n\");\n    return -1;\n  }\n  in_ptr = in_save;\n\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n\n  assert (fetch_int() == CODE_res_p_q);\n\n  static int tmp[4];\n  fetch_ints (tmp, 4);\n  if (memcmp (tmp, DC->nonce, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  fetch_ints (DC->server_nonce, 4);\n\n  TGLC_bn *pq = TGLC_bn_new ();\n  assert (fetch_bignum (pq) >= 0);\n\n  assert (fetch_int ()  == CODE_vector);\n  int fingerprints_num = fetch_int ();\n  assert (fingerprints_num >= 0);\n  DC->rsa_key_idx = -1;\n\n  int i;\n  for (i = 0; i < fingerprints_num; i++) {\n    int j;\n    long long fprint = fetch_long ();\n    for (j = 0; j < TLS->rsa_key_num; j++) {\n      if (TLS->rsa_key_loaded[j]) {\n        if (fprint == TLS->rsa_key_fingerprint[j]) {\n          DC->rsa_key_idx = j;\n          break;\n        }\n      }\n    }\n  }\n  assert (in_ptr == in_end);\n  if (DC->rsa_key_idx == -1) {\n    vlogprintf (E_ERROR, \"fatal: don't have any matching keys\\n\");\n    return -1;\n  }\n\n  send_req_dh_packet (TLS, c, pq, temp_key);\n\n  TGLC_bn_free (pq);\n  return 1;\n}\n/* }}} */\n\n/* {{{ RECV DH */\n// server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params;\n// server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;\n// server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;\nstatic int process_dh_answer (struct tgl_state *TLS, struct connection *c, char *packet, int len, int temp_key) {\n  assert (!(len & 3));\n  in_ptr = (int *)packet;\n  in_end = in_ptr + (len / 4);\n  if (check_unauthorized_header (TLS) < 0) {\n    return -1;\n  }\n\n  int *in_save = in_ptr;\n  if (skip_type_any (TYPE_TO_PARAM (server_d_h_params)) < 0 || in_ptr != in_end) {\n    vlogprintf (E_ERROR, \"can not parse server_DH_params answer\\n\");\n    return -1;\n  }\n  in_ptr = in_save;\n\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n\n  unsigned op = fetch_int ();\n  assert (op == CODE_server__d_h_params_ok || op == CODE_server__d_h_params_fail);\n\n  int tmp[4];\n  fetch_ints (tmp, 4);\n  if (memcmp (tmp, DC->nonce, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  assert (!memcmp (tmp, DC->nonce, 16));\n  fetch_ints (tmp, 4);\n  if (memcmp (tmp, DC->server_nonce, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  assert (!memcmp (tmp, DC->server_nonce, 16));\n\n  if (op == CODE_server__d_h_params_fail) {\n    vlogprintf (E_ERROR, \"DH params fail\\n\");\n    return -1;\n  }\n\n  tgl_init_aes_unauth (DC->server_nonce, DC->new_nonce, 0);\n\n  int l = prefetch_strlen ();\n  assert (l >= 0);\n  if (!l) {\n    vlogprintf (E_ERROR, \"non-empty encrypted part expected\\n\");\n    return -1;\n  }\n  l = tgl_pad_aes_decrypt (fetch_str (l), l, (char *) decrypt_buffer, DECRYPT_BUFFER_INTS * 4 - 16);\n  assert (in_ptr == in_end);\n\n  in_ptr = decrypt_buffer + 5;\n  in_end = decrypt_buffer + (l >> 2);\n  if (skip_type_any (TYPE_TO_PARAM (server_d_h_inner_data)) < 0) {\n    vlogprintf (E_ERROR, \"can not parse server_DH_inner_data answer\\n\");\n    return -1;\n  }\n  in_ptr = decrypt_buffer + 5;\n\n  assert (fetch_int ()  == (int)CODE_server_DH_inner_data);\n  fetch_ints (tmp, 4);\n  if (memcmp (tmp, DC->nonce, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  assert (!memcmp (tmp, DC->nonce, 16));\n  fetch_ints (tmp, 4);\n  if (memcmp (tmp, DC->server_nonce, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  assert (!memcmp (tmp, DC->server_nonce, 16));\n  int g = fetch_int ();\n\n  TGLC_bn *dh_prime = TGLC_bn_new ();\n  TGLC_bn *g_a = TGLC_bn_new ();\n  assert (fetch_bignum (dh_prime) > 0);\n  assert (fetch_bignum (g_a) > 0);\n\n  if (tglmp_check_DH_params (TLS, dh_prime, g) < 0) {\n    vlogprintf (E_ERROR, \"bad DH params\\n\");\n    return -1;\n  }\n  if (tglmp_check_g_a (TLS, dh_prime, g_a) < 0) {\n    vlogprintf (E_ERROR, \"bad dh_prime\\n\");\n    return -1;\n  }\n\n  int server_time = fetch_int ();\n  assert (in_ptr <= in_end);\n\n  static char sha1_buffer[20];\n  TGLC_sha1 ((unsigned char *) decrypt_buffer + 20, (in_ptr - decrypt_buffer - 5) * 4, (unsigned char *) sha1_buffer);\n  if (memcmp (decrypt_buffer, sha1_buffer, 20)) {\n    vlogprintf (E_ERROR, \"bad encrypted message SHA1\\n\");\n    return -1;\n  }\n  if ((char *) in_end - (char *) in_ptr >= 16) {\n    vlogprintf (E_ERROR, \"too much padding\\n\");\n    return -1;\n  }\n\n  DC->server_time_delta = server_time - get_utime (CLOCK_REALTIME);\n  DC->server_time_udelta = server_time - get_utime (CLOCK_MONOTONIC);\n\n  send_dh_params (TLS, c, dh_prime, g_a, g, temp_key);\n\n  TGLC_bn_free (dh_prime);\n  TGLC_bn_free (g_a);\n\n  return 1;\n}\n/* }}} */\n\nstatic void create_temp_auth_key (struct tgl_state *TLS, struct connection *c) {\n  assert (TLS->enable_pfs);\n  send_req_pq_temp_packet (TLS, c);\n}\n\nint tglmp_encrypt_inner_temp (struct tgl_state *TLS, struct connection *c, int *msg, int msg_ints, int useful, void *data, long long msg_id);\nstatic long long msg_id_override;\nstatic void mpc_on_get_config (struct tgl_state *TLS, void *extra, int success);\nstatic void bind_temp_auth_key (struct tgl_state *TLS, struct connection *c);\n\n/* {{{ RECV AUTH COMPLETE */\n\n// dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;\n// dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer;\n// dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer;\nstatic int process_auth_complete (struct tgl_state *TLS, struct connection *c, char *packet, int len, int temp_key) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n\n  assert (!(len & 3));\n  in_ptr = (int *)packet;\n  in_end = in_ptr + (len / 4);\n  if (check_unauthorized_header (TLS) < 0) {\n    return -1;\n  }\n\n  int *in_save = in_ptr;\n  if (skip_type_any (TYPE_TO_PARAM (set_client_d_h_params_answer)) < 0 || in_ptr != in_end) {\n    vlogprintf (E_ERROR, \"can not parse server_DH_params answer\\n\");\n    return -1;\n  }\n  in_ptr = in_save;\n\n  unsigned op = fetch_int ();\n  assert (op == CODE_dh_gen_ok || op == CODE_dh_gen_retry || op == CODE_dh_gen_fail);\n\n  int tmp[4];\n  fetch_ints (tmp, 4);\n  if (memcmp (DC->nonce, tmp, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  fetch_ints (tmp, 4);\n  if (memcmp (DC->server_nonce, tmp, 16)) {\n    vlogprintf (E_ERROR, \"nonce mismatch\\n\");\n    return -1;\n  }\n  if (op != CODE_dh_gen_ok) {\n    vlogprintf (E_ERROR, \"something bad. Retry regen\\n\");\n    return -1;\n  }\n\n  fetch_ints (tmp, 4);\n\n  static unsigned char th[44], sha1_buffer[20];\n  memcpy (th, DC->new_nonce, 32);\n  th[32] = 1;\n  if (!temp_key) {\n    TGLC_sha1 ((unsigned char *)DC->auth_key, 256, sha1_buffer);\n  } else {\n    TGLC_sha1 ((unsigned char *)DC->temp_auth_key, 256, sha1_buffer);\n  }\n  memcpy (th + 33, sha1_buffer, 8);\n  TGLC_sha1 (th, 41, sha1_buffer);\n  if (memcmp (tmp, sha1_buffer + 4, 16)) {\n    vlogprintf (E_ERROR, \"hash mismatch\\n\");\n    return -1;\n  }\n\n  if (!temp_key) {\n    bl_do_set_auth_key (TLS, DC->id, (unsigned char *)DC->auth_key);\n    TGLC_sha1 ((unsigned char *)DC->auth_key, 256, sha1_buffer);\n  } else {\n    TGLC_sha1 ((unsigned char *)DC->temp_auth_key, 256, sha1_buffer);\n    DC->temp_auth_key_id = *(long long *)(sha1_buffer + 12);\n  }\n\n  DC->server_salt = *(long long *)DC->server_nonce ^ *(long long *)DC->new_nonce;\n\n  DC->state = st_authorized;\n\n  vlogprintf (E_DEBUG, \"Auth success\\n\");\n  if (temp_key) {\n    bind_temp_auth_key (TLS, c);\n  } else {\n    DC->flags |= 1;\n    if (TLS->enable_pfs) {\n      assert (TLS->enable_pfs);\n      create_temp_auth_key (TLS, c);\n    } else {\n      DC->temp_auth_key_id = DC->auth_key_id;\n      memcpy (DC->temp_auth_key, DC->auth_key, 256);\n      DC->flags |= 2;\n      if (!(DC->flags & 4)) {\n        tgl_do_help_get_config_dc (TLS, DC, mpc_on_get_config, DC);\n      }\n    }\n  }\n\n  return 1;\n}\n/* }}} */\n\nstatic void bind_temp_auth_key (struct tgl_state *TLS, struct connection *c) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  if (DC->temp_auth_key_bind_query_id) {\n    tglq_query_delete (TLS, DC->temp_auth_key_bind_query_id);\n  }\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n  long long msg_id = generate_next_msg_id (TLS, DC, S);\n\n  clear_packet ();\n  out_int (CODE_bind_auth_key_inner);\n  long long rand;\n  tglt_secure_random (&rand, 8);\n  out_long (rand);\n  out_long (DC->temp_auth_key_id);\n  out_long (DC->auth_key_id);\n\n  if (!S->session_id) {\n    tglt_secure_random (&S->session_id, 8);\n  }\n  out_long (S->session_id);\n  int expires = time (0) + DC->server_time_delta + TLS->temp_key_expire_time;\n  out_int (expires);\n\n  static int data[1000];\n  int len = tglmp_encrypt_inner_temp (TLS, c, packet_buffer, packet_ptr - packet_buffer, 0, data, msg_id);\n  msg_id_override = msg_id;\n  DC->temp_auth_key_bind_query_id = msg_id;\n  tgl_do_send_bind_temp_key (TLS, DC, rand, expires, (void *)data, len, msg_id);\n  msg_id_override = 0;\n}\n\n/*\n *\n *                AUTHORIZED (MAIN) PROTOCOL PART\n *\n */\n\nstatic struct encrypted_message enc_msg;\n\nstatic double get_server_time (struct tgl_dc *DC) {\n  //if (!DC->server_time_udelta) {\n  //  DC->server_time_udelta = get_utime (CLOCK_REALTIME) - get_utime (CLOCK_MONOTONIC);\n  //}\n  return get_utime (CLOCK_MONOTONIC) + DC->server_time_udelta;\n}\n\nstatic long long generate_next_msg_id (struct tgl_state *TLS, struct tgl_dc *DC, struct tgl_session *S) {\n  long long next_id = (long long) (get_server_time (DC) * (1LL << 32)) & -4;\n  if (next_id <= S->last_msg_id) {\n    next_id = S->last_msg_id  += 4;\n  } else {\n    S->last_msg_id = next_id;\n  }\n  return next_id;\n}\n\nstatic void init_enc_msg (struct tgl_state *TLS, struct tgl_session *S, int useful) {\n  struct tgl_dc *DC = S->dc;\n  assert (DC->state == st_authorized);\n  assert (DC->temp_auth_key_id);\n  vlogprintf (E_DEBUG, \"temp_auth_key_id = 0x%016\" INT64_PRINTF_MODIFIER \"x, auth_key_id = 0x%016\" INT64_PRINTF_MODIFIER \"x\\n\", DC->temp_auth_key_id, DC->auth_key_id);\n  enc_msg.auth_key_id = DC->temp_auth_key_id;\n  enc_msg.server_salt = DC->server_salt;\n  if (!S->session_id) {\n    tglt_secure_random (&S->session_id, 8);\n  }\n  enc_msg.session_id = S->session_id;\n  enc_msg.msg_id = msg_id_override ? msg_id_override : generate_next_msg_id (TLS, DC, S);\n  enc_msg.seq_no = S->seq_no;\n  if (useful) {\n    enc_msg.seq_no |= 1;\n  }\n  S->seq_no += 2;\n};\n\nstatic void init_enc_msg_inner_temp (struct tgl_dc *DC, long long msg_id) {\n  enc_msg.auth_key_id = DC->auth_key_id;\n  tglt_secure_random (&enc_msg.server_salt, 8);\n  tglt_secure_random (&enc_msg.session_id, 8);\n  enc_msg.msg_id = msg_id;\n  enc_msg.seq_no = 0;\n};\n\n\nstatic int aes_encrypt_message (struct tgl_state *TLS, char *key, struct encrypted_message *enc) {\n  unsigned char sha1_buffer[20];\n  const int MINSZ = offsetof (struct encrypted_message, message);\n  const int UNENCSZ = offsetof (struct encrypted_message, server_salt);\n\n  int enc_len = (MINSZ - UNENCSZ) + enc->msg_len;\n  assert (enc->msg_len >= 0 && enc->msg_len <= MAX_MESSAGE_INTS * 4 - 16 && !(enc->msg_len & 3));\n  TGLC_sha1 ((unsigned char *) &enc->server_salt, enc_len, sha1_buffer);\n  vlogprintf (E_DEBUG, \"sending message with sha1 %08x\\n\", *(int *)sha1_buffer);\n  memcpy (enc->msg_key, sha1_buffer + 4, 16);\n  tgl_init_aes_auth (key, enc->msg_key, 1);\n  return tgl_pad_aes_encrypt ((char *) &enc->server_salt, enc_len, (char *) &enc->server_salt, MAX_MESSAGE_INTS * 4 + (MINSZ - UNENCSZ));\n}\n\nlong long tglmp_encrypt_send_message (struct tgl_state *TLS, struct connection *c, int *msg, int msg_ints, int flags) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n  assert (S);\n  if (!(DC->flags & 4) && !(flags & 2)) {\n    return generate_next_msg_id (TLS, DC, S);\n  }\n\n  const int UNENCSZ = offsetof (struct encrypted_message, server_salt);\n  if (msg_ints <= 0 || msg_ints > MAX_MESSAGE_INTS - 4) {\n    return -1;\n  }\n  if (msg) {\n    memcpy (enc_msg.message, msg, msg_ints * 4);\n    enc_msg.msg_len = msg_ints * 4;\n  } else {\n    if ((enc_msg.msg_len & 0x80000003) || enc_msg.msg_len > MAX_MESSAGE_INTS * 4 - 16) {\n      return -1;\n    }\n  }\n  init_enc_msg (TLS, S, flags & 1);\n\n  int l = aes_encrypt_message (TLS, DC->temp_auth_key, &enc_msg);\n  assert (l > 0);\n  rpc_send_message (TLS, c, &enc_msg, l + UNENCSZ);\n\n  return S->last_msg_id;\n}\n\nint tglmp_encrypt_inner_temp (struct tgl_state *TLS, struct connection *c, int *msg, int msg_ints, int useful, void *data, long long msg_id) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n  assert (S);\n\n  const int UNENCSZ = offsetof (struct encrypted_message, server_salt);\n  if (msg_ints <= 0 || msg_ints > MAX_MESSAGE_INTS - 4) {\n    return -1;\n  }\n  memcpy (enc_msg.message, msg, msg_ints * 4);\n  enc_msg.msg_len = msg_ints * 4;\n\n  init_enc_msg_inner_temp (DC, msg_id);\n\n  int l = aes_encrypt_message (TLS, DC->auth_key, &enc_msg);\n  assert (l > 0);\n  //rpc_send_message (c, &enc_msg, l + UNENCSZ);\n  memcpy (data, &enc_msg, l + UNENCSZ);\n\n  return l + UNENCSZ;\n}\n\nstatic int rpc_execute_answer (struct tgl_state *TLS, struct connection *c, long long msg_id);\n\nstatic int work_container (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  vlogprintf (E_DEBUG, \"work_container: msg_id = %\" INT64_PRINTF_MODIFIER \"d\\n\", msg_id);\n  assert (fetch_int () == CODE_msg_container);\n  int n = fetch_int ();\n  int i;\n  for (i = 0; i < n; i++) {\n    long long id = fetch_long ();\n    //int seqno = fetch_int ();\n    fetch_int (); // seq_no\n    if (id & 1) {\n      tgln_insert_msg_id (TLS, TLS->net_methods->get_session (c), id);\n    }\n    int bytes = fetch_int ();\n    int *t = in_end;\n    in_end = in_ptr + (bytes / 4);\n    int r = rpc_execute_answer (TLS, c, id);\n    if (r < 0) { return -1; }\n    assert (in_ptr == in_end);\n    in_end = t;\n  }\n  return 0;\n}\n\nstatic int work_new_session_created (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  \n  vlogprintf (E_NOTICE, \"work_new_session_created: msg_id = %\" INT64_PRINTF_MODIFIER \"d, dc = %d\\n\", msg_id, DC->id);\n  assert (fetch_int () == (int)CODE_new_session_created);\n  fetch_long (); // first message id\n  fetch_long (); // unique_id\n  TLS->net_methods->get_dc (c)->server_salt = fetch_long ();\n\n  tglq_regen_queries_from_old_session (TLS, DC, S);\n\n  if (TLS->started && !(TLS->locks & TGL_LOCK_DIFF) && (TLS->DC_working->flags & TGLDCF_LOGGED_IN)) {\n    tgl_do_get_difference (TLS, 0, 0, 0);\n  }\n  return 0;\n}\n\nstatic int work_msgs_ack (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  vlogprintf (E_DEBUG, \"work_msgs_ack: msg_id = %\" INT64_PRINTF_MODIFIER \"d\\n\", msg_id);\n  assert (fetch_int () == CODE_msgs_ack);\n  assert (fetch_int () == CODE_vector);\n  int n = fetch_int ();\n  int i;\n  for (i = 0; i < n; i++) {\n    long long id = fetch_long ();\n    vlogprintf (E_DEBUG + 1, \"ack for %\" INT64_PRINTF_MODIFIER \"d\\n\", id);\n    tglq_query_ack (TLS, id);\n  }\n  return 0;\n}\n\nstatic int work_rpc_result (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  vlogprintf (E_DEBUG, \"work_rpc_result: msg_id = %\" INT64_PRINTF_MODIFIER \"d\\n\", msg_id);\n  assert (fetch_int () == (int)CODE_rpc_result);\n  long long id = fetch_long ();\n  int op = prefetch_int ();\n  if (op == CODE_rpc_error) {\n    return tglq_query_error (TLS, id);\n  } else {\n    return tglq_query_result (TLS, id);\n  }\n}\n\n#define MAX_PACKED_SIZE (1 << 24)\nstatic int work_packed (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  assert (fetch_int () == CODE_gzip_packed);\n  static int in_gzip;\n  static int buf[MAX_PACKED_SIZE >> 2];\n  assert (!in_gzip);\n  in_gzip = 1;\n\n  int l = prefetch_strlen ();\n  char *s = fetch_str (l);\n\n  int total_out = tgl_inflate (s, l, buf, MAX_PACKED_SIZE);\n  int *end = in_ptr;\n  int *eend = in_end;\n  //assert (total_out % 4 == 0);\n  in_ptr = buf;\n  in_end = in_ptr + total_out / 4;\n  int r = rpc_execute_answer (TLS, c, msg_id);\n  in_ptr = end;\n  in_end = eend;\n  in_gzip = 0;\n  return r;\n}\n\nstatic int work_bad_server_salt (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  assert (fetch_int () == (int)CODE_bad_server_salt);\n  long long id = fetch_long ();\n  fetch_int (); // seq_no\n  fetch_int (); // error_code\n  long long new_server_salt = fetch_long ();\n  TLS->net_methods->get_dc (c)->server_salt = new_server_salt;\n  tglq_query_restart (TLS, id);\n  return 0;\n}\n\nstatic int work_pong (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  assert (fetch_int () == CODE_pong);\n  fetch_long (); // msg_id\n  fetch_long (); // ping_id\n  return 0;\n}\n\nstatic int work_detailed_info (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  assert (fetch_int () == CODE_msg_detailed_info);\n  fetch_long (); // msg_id\n  fetch_long (); // answer_msg_id\n  fetch_int (); // bytes\n  fetch_int (); // status\n  return 0;\n}\n\nstatic int work_new_detailed_info (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  assert (fetch_int () == (int)CODE_msg_new_detailed_info);\n  fetch_long (); // answer_msg_id\n  fetch_int (); // bytes\n  fetch_int (); // status\n  return 0;\n}\n\nstatic int work_bad_msg_notification (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  assert (fetch_int () == (int)CODE_bad_msg_notification);\n  long long m1 = fetch_long ();\n  int s = fetch_int ();\n  int e = fetch_int ();\n  vlogprintf (E_NOTICE, \"bad_msg_notification: msg_id = %\" INT64_PRINTF_MODIFIER \"d, seq = %d, error = %d\\n\", m1, s, e);\n  switch (e) {\n  // Too low msg id\n  case 16:\n    tglq_regen_query (TLS, m1);\n    break;\n  // Too high msg id\n  case 17:\n    tglq_regen_query (TLS, m1);\n    break;\n  // Bad container\n  case 64:\n    vlogprintf (E_NOTICE, \"bad_msg_notification: msg_id = %\" INT64_PRINTF_MODIFIER \"d, seq = %d, error = %d\\n\", m1, s, e);\n    tglq_regen_query (TLS, m1);\n    break;\n  default:\n    vlogprintf (E_NOTICE, \"bad_msg_notification: msg_id = %\" INT64_PRINTF_MODIFIER \"d, seq = %d, error = %d\\n\", m1, s, e);\n    break;\n  }\n\n  return -1;\n}\n\nstatic int rpc_execute_answer (struct tgl_state *TLS, struct connection *c, long long msg_id) {\n  int op = prefetch_int ();\n  switch (op) {\n  case CODE_msg_container:\n    return work_container (TLS, c, msg_id);\n  case CODE_new_session_created:\n    return work_new_session_created (TLS, c, msg_id);\n  case CODE_msgs_ack:\n    return work_msgs_ack (TLS, c, msg_id);\n  case CODE_rpc_result:\n    return work_rpc_result (TLS, c, msg_id);\n  case CODE_update_short:\n  case CODE_updates:\n  case CODE_update_short_message:\n  case CODE_update_short_chat_message:\n  case CODE_updates_too_long:\n    tglu_work_any_updates_buf (TLS);\n    return 0;\n  case CODE_gzip_packed:\n    return work_packed (TLS, c, msg_id);\n  case CODE_bad_server_salt:\n    return work_bad_server_salt (TLS, c, msg_id);\n  case CODE_pong:\n    return work_pong (TLS, c, msg_id);\n  case CODE_msg_detailed_info:\n    return work_detailed_info (TLS, c, msg_id);\n  case CODE_msg_new_detailed_info:\n    return work_new_detailed_info (TLS, c, msg_id);\n  case CODE_bad_msg_notification:\n    return work_bad_msg_notification (TLS, c, msg_id);\n  }\n  vlogprintf (E_WARNING, \"Unknown message: %08x\\n\", op);\n  in_ptr = in_end; // Will not fail due to assertion in_ptr == in_end\n  return 0;\n}\n\nstatic struct mtproto_methods mtproto_methods;\nvoid tgls_free_session (struct tgl_state *TLS, struct tgl_session *S);\n/*\nstatic char *get_ipv6 (struct tgl_state *TLS, int num) {\n  static char res[1<< 10];\n  if (TLS->test_mode) {\n    switch (num) {\n      case 1:\n        strcpy (res, TG_SERVER_TEST_IPV6_1);\n        break;\n      case 2:\n        strcpy (res, TG_SERVER_TEST_IPV6_2);\n        break;\n      case 3:\n        strcpy (res, TG_SERVER_TEST_IPV6_3);\n        break;\n      default:\n        assert (0);\n    }\n  } else {\n    switch (num) {\n      case 1:\n        strcpy (res, TG_SERVER_IPV6_1);\n        break;\n      case 2:\n        strcpy (res, TG_SERVER_IPV6_2);\n        break;\n      case 3:\n        strcpy (res, TG_SERVER_IPV6_3);\n        break;\n      case 4:\n        strcpy (res, TG_SERVER_IPV6_4);\n        break;\n      case 5:\n        strcpy (res, TG_SERVER_IPV6_5);\n        break;\n      default:\n        assert (0);\n    }\n  }\n  return res;\n}\n*/\n\nstatic void create_session_connect (struct tgl_state *TLS, struct tgl_session *S) {\n  struct tgl_dc *DC = S->dc;\n\n  if (TLS->ipv6_enabled) {\n    S->c = TLS->net_methods->create_connection (TLS, DC->options[1]->ip, DC->options[1]->port, S, DC, &mtproto_methods);\n  } else {\n    S->c = TLS->net_methods->create_connection (TLS, DC->options[0]->ip, DC->options[0]->port, S, DC, &mtproto_methods);\n  }\n}\n\nstatic void fail_connection (struct tgl_state *TLS, struct connection *c) {\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n  TLS->net_methods->free (c);\n  create_session_connect (TLS, S);\n}\n\nstatic void fail_session (struct tgl_state *TLS, struct tgl_session *S) {\n  vlogprintf (E_NOTICE, \"failing session %\" INT64_PRINTF_MODIFIER \"d\\n\", S->session_id);\n  struct tgl_dc *DC = S->dc;\n  tgls_free_session (TLS, S);\n  DC->sessions[0] = NULL;\n  tglmp_dc_create_session (TLS, DC);\n}\n\nstatic int process_rpc_message (struct tgl_state *TLS, struct connection *c, struct encrypted_message *enc, int len) {\n  const int MINSZ = offsetof (struct encrypted_message, message);\n  const int UNENCSZ = offsetof (struct encrypted_message, server_salt);\n  vlogprintf (E_DEBUG, \"process_rpc_message(), len=%d\\n\", len);\n  if (len < MINSZ || (len & 15) != (UNENCSZ & 15)) {\n    vlogprintf (E_WARNING, \"Incorrect packet from server. Closing connection\\n\");\n    fail_connection (TLS, c);\n    return -1;\n  }\n  assert (len >= MINSZ && (len & 15) == (UNENCSZ & 15));\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  if (enc->auth_key_id != DC->temp_auth_key_id && enc->auth_key_id != DC->auth_key_id) {\n    vlogprintf (E_WARNING, \"received msg from dc %d with auth_key_id %\" INT64_PRINTF_MODIFIER \"d (perm_auth_key_id %\" INT64_PRINTF_MODIFIER \"d temp_auth_key_id %\" INT64_PRINTF_MODIFIER \"d). Dropping\\n\",\n    DC->id, enc->auth_key_id, DC->auth_key_id, DC->temp_auth_key_id);\n    return 0;\n  }\n  if (enc->auth_key_id == DC->temp_auth_key_id) {\n    assert (enc->auth_key_id == DC->temp_auth_key_id);\n    assert (DC->temp_auth_key_id);\n    tgl_init_aes_auth (DC->temp_auth_key + 8, enc->msg_key, 0);\n  } else {\n    assert (enc->auth_key_id == DC->auth_key_id);\n    assert (DC->auth_key_id);\n    tgl_init_aes_auth (DC->auth_key + 8, enc->msg_key, 0);\n  }\n\n  int l = tgl_pad_aes_decrypt ((char *)&enc->server_salt, len - UNENCSZ, (char *)&enc->server_salt, len - UNENCSZ);\n  assert (l == len - UNENCSZ);\n\n  if (!(!(enc->msg_len & 3) && enc->msg_len > 0 && enc->msg_len <= len - MINSZ && len - MINSZ - enc->msg_len <= 12)) {\n    vlogprintf (E_WARNING, \"Incorrect packet from server. Closing connection\\n\");\n    fail_connection (TLS, c);\n    return -1;\n  }\n  assert (!(enc->msg_len & 3) && enc->msg_len > 0 && enc->msg_len <= len - MINSZ && len - MINSZ - enc->msg_len <= 12);\n\n  struct tgl_session *S = TLS->net_methods->get_session (c);\n  if (!S || S->session_id != enc->session_id) {\n    vlogprintf (E_WARNING, \"Message to bad session. Drop.\\n\");\n    return 0;\n  }\n\n  static unsigned char sha1_buffer[20];\n  TGLC_sha1 ((void *)&enc->server_salt, enc->msg_len + (MINSZ - UNENCSZ), sha1_buffer);\n  if (memcmp (&enc->msg_key, sha1_buffer + 4, 16)) {\n    vlogprintf (E_WARNING, \"Incorrect packet from server. Closing connection\\n\");\n    fail_connection (TLS, c);\n    return -1;\n  }\n  assert (!memcmp (&enc->msg_key, sha1_buffer + 4, 16));\n\n  int this_server_time = enc->msg_id >> 32LL;\n  if (!S->received_messages) {\n    DC->server_time_delta = this_server_time - get_utime (CLOCK_REALTIME);\n    if (DC->server_time_udelta) {\n      vlogprintf (E_WARNING, \"adjusting CLOCK_MONOTONIC delta to %lf\\n\",\n          DC->server_time_udelta - this_server_time + get_utime (CLOCK_MONOTONIC));\n    }\n    DC->server_time_udelta = this_server_time - get_utime (CLOCK_MONOTONIC);\n  }\n\n  double st = get_server_time (DC);\n  if (this_server_time < st - 300 || this_server_time > st + 30) {\n    vlogprintf (E_WARNING, \"bad msg time: salt = %\" INT64_PRINTF_MODIFIER \"d, session_id = %\" INT64_PRINTF_MODIFIER \"d, msg_id = %\" INT64_PRINTF_MODIFIER \"d, seq_no = %d, st = %lf, now = %lf\\n\", enc->server_salt, enc->session_id, enc->msg_id, enc->seq_no, st, get_utime (CLOCK_REALTIME));\n    fail_session (TLS, S);\n    return -1;\n  }\n  S->received_messages ++;\n\n  if (DC->server_salt != enc->server_salt) {\n    DC->server_salt = enc->server_salt;\n  }\n\n  assert (this_server_time >= st - 300 && this_server_time <= st + 30);\n  //assert (enc->msg_id > server_last_msg_id && (enc->msg_id & 3) == 1);\n  vlogprintf (E_DEBUG, \"received mesage id %016\" INT64_PRINTF_MODIFIER \"x\\n\", enc->msg_id);\n  //server_last_msg_id = enc->msg_id;\n\n  //*(long long *)(longpoll_query + 3) = *(long long *)((char *)(&enc->msg_id) + 0x3c);\n  //*(long long *)(longpoll_query + 5) = *(long long *)((char *)(&enc->msg_id) + 0x3c);\n\n  assert (l >= (MINSZ - UNENCSZ) + 8);\n  //assert (enc->message[0] == CODE_rpc_result && *(long long *)(enc->message + 1) == client_last_msg_id);\n\n  in_ptr = enc->message;\n  in_end = in_ptr + (enc->msg_len / 4);\n\n  if (enc->msg_id & 1) {\n    tgln_insert_msg_id (TLS, S, enc->msg_id);\n  }\n  assert (S->session_id == enc->session_id);\n\n  if (rpc_execute_answer (TLS, c, enc->msg_id) < 0) {\n    fail_session (TLS, S);\n    return -1;\n  }\n  assert (in_ptr == in_end);\n  return 0;\n}\n\n\nstatic int rpc_execute (struct tgl_state *TLS, struct connection *c, int op, int len) {\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n\n  if (len >= MAX_RESPONSE_SIZE/* - 12*/ || len < 0/*12*/) {\n    vlogprintf (E_WARNING, \"answer too long (%d bytes), skipping\\n\", len);\n    return 0;\n  }\n\n  int Response_len = len;\n\n  static char Response[MAX_RESPONSE_SIZE];\n  vlogprintf (E_DEBUG, \"Response_len = %d\\n\", Response_len);\n  assert (TLS->net_methods->read_in (c, Response, Response_len) == Response_len);\n\n#if !defined(__MACH__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined (__CYGWIN__)\n//  setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4);\n#endif\n  int o = DC->state;\n  //if (DC->flags & 1) { o = st_authorized;}\n  if (o != st_authorized) {\n    vlogprintf (E_DEBUG, \"%s: state = %d\\n\", __func__, o);\n  }\n  switch (o) {\n  case st_reqpq_sent:\n    process_respq_answer (TLS, c, Response/* + 8*/, Response_len/* - 12*/, 0);\n    return 0;\n  case st_reqdh_sent:\n    process_dh_answer (TLS, c, Response/* + 8*/, Response_len/* - 12*/, 0);\n    return 0;\n  case st_client_dh_sent:\n    process_auth_complete (TLS, c, Response/* + 8*/, Response_len/* - 12*/, 0);\n    return 0;\n  case st_reqpq_sent_temp:\n    process_respq_answer (TLS, c, Response/* + 8*/, Response_len/* - 12*/, 1);\n    return 0;\n  case st_reqdh_sent_temp:\n    process_dh_answer (TLS, c, Response/* + 8*/, Response_len/* - 12*/, 1);\n    return 0;\n  case st_client_dh_sent_temp:\n    process_auth_complete (TLS, c, Response/* + 8*/, Response_len/* - 12*/, 1);\n    return 0;\n  case st_authorized:\n    if (op < 0 && op >= -999) {\n      vlogprintf (E_WARNING, \"Server error %d\\n\", op);\n    } else {\n      return process_rpc_message (TLS, c, (void *)(Response/* + 8*/), Response_len/* - 12*/);\n    }\n    return 0;\n  default:\n    vlogprintf (E_ERROR, \"fatal: cannot receive answer in state %d\\n\", DC->state);\n    exit (2);\n  }\n\n  return 0;\n}\n\n\nstatic int tc_close (struct tgl_state *TLS, struct connection *c, int who) {\n  vlogprintf (E_DEBUG, \"outbound rpc connection from dc #%d : closing by %d\\n\", TLS->net_methods->get_dc(c)->id, who);\n  return 0;\n}\n\nstatic void mpc_on_get_config (struct tgl_state *TLS, void *extra, int success) {\n  assert (success);\n  struct tgl_dc *DC = extra;\n  DC->flags |= 4;\n}\n\nstatic int tc_becomes_ready (struct tgl_state *TLS, struct connection *c) {\n  vlogprintf (E_NOTICE, \"outbound rpc connection from dc #%d becomed ready\\n\", TLS->net_methods->get_dc(c)->id);\n  //char byte = 0xef;\n  //assert (TLS->net_methods->write_out (c, &byte, 1) == 1);\n  //TLS->net_methods->flush_out (c);\n\n  struct tgl_dc *DC = TLS->net_methods->get_dc (c);\n  if (DC->flags & 1) { DC->state = st_authorized; }\n  int o = DC->state;\n  if (o == st_authorized && !TLS->enable_pfs) {\n    DC->temp_auth_key_id = DC->auth_key_id;\n    memcpy (DC->temp_auth_key, DC->auth_key, 256);\n    DC->flags |= 2;\n  }\n  switch (o) {\n  case st_init:\n    send_req_pq_packet (TLS, c);\n    break;\n  case st_authorized:\n    if (!(DC->flags & 2)) {\n      assert (TLS->enable_pfs);\n      if (!DC->temp_auth_key_id) {\n        assert (!DC->temp_auth_key_id);\n        assert (TLS->enable_pfs);\n        create_temp_auth_key (TLS, c);\n      } else {\n        bind_temp_auth_key (TLS, c);\n      }\n    } else if (!(DC->flags & 4)) {\n      tgl_do_help_get_config_dc (TLS, DC, mpc_on_get_config, DC);\n    }\n    break;\n  default:\n    vlogprintf (E_DEBUG, \"c_state = %d\\n\", DC->state);\n    DC->state = st_init; // previous connection was reset\n    send_req_pq_packet (TLS, c);\n    break;\n  }\n  return 0;\n}\n\nstatic int rpc_becomes_ready (struct tgl_state *TLS, struct connection *c) {\n  return tc_becomes_ready (TLS, c);\n}\n\nstatic int rpc_close (struct tgl_state *TLS, struct connection *c) {\n  return tc_close (TLS, c, 0);\n}\n\n\n#define RANDSEED_PASSWORD_FILENAME     NULL\n#define RANDSEED_PASSWORD_LENGTH       0\nint tglmp_on_start (struct tgl_state *TLS) {\n  tgl_prng_seed (TLS, RANDSEED_PASSWORD_FILENAME, RANDSEED_PASSWORD_LENGTH);\n\n  int i;\n  int ok = 0;\n  for (i = 0; i < TLS->rsa_key_num; i++) {\n    char *key = TLS->rsa_key_list[i];\n    if (!key) {\n      /* This key was provided using 'tgl_set_rsa_key_direct'. */\n      TGLC_rsa *rsa = TLS->rsa_key_loaded[i];\n      assert (rsa);\n      TLS->rsa_key_fingerprint[i] = tgl_do_compute_rsa_key_fingerprint (rsa);\n      vlogprintf (E_NOTICE, \"'direct' public key loaded successfully\\n\");\n      ok = 1;\n    } else {\n      TGLC_rsa *res = rsa_load_public_key (TLS, key);\n      if (!res) {\n        vlogprintf (E_WARNING, \"Can not load key %s\\n\", key);\n        TLS->rsa_key_loaded[i] = NULL;\n      } else {\n        ok = 1;\n        TLS->rsa_key_loaded[i] = res;\n        TLS->rsa_key_fingerprint[i] = tgl_do_compute_rsa_key_fingerprint (res);\n      }\n    }\n  }\n\n  if (!ok) {\n    vlogprintf (E_ERROR, \"No public keys found\\n\");\n    TLS->error = tstrdup (\"No public keys found\");\n    TLS->error_code = ENOTCONN;\n    return -1;\n  }\n  return 0;\n}\n\nvoid tgl_dc_authorize (struct tgl_state *TLS, struct tgl_dc *DC) {\n  //c_state = 0;\n  if (!DC->sessions[0]) {\n    tglmp_dc_create_session (TLS, DC);\n  }\n  vlogprintf (E_DEBUG, \"Starting authorization for DC #%d\\n\", DC->id);\n  //net_loop (0, auth_ok);\n}\n\n#define long_cmp(a,b) ((a) > (b) ? 1 : (a) == (b) ? 0 : -1)\nDEFINE_TREE(long,long long,long_cmp,0)\n\nstatic int send_all_acks (struct tgl_state *TLS, struct tgl_session *S) {\n  clear_packet ();\n  out_int (CODE_msgs_ack);\n  out_int (CODE_vector);\n  out_int (tree_count_long (S->ack_tree));\n  while (S->ack_tree) {\n    long long x = tree_get_min_long (S->ack_tree);\n    out_long (x);\n    S->ack_tree = tree_delete_long (S->ack_tree, x);\n  }\n  tglmp_encrypt_send_message (TLS, S->c, packet_buffer, packet_ptr - packet_buffer, 0);\n  return 0;\n}\n\nstatic void send_all_acks_gateway (struct tgl_state *TLS, void *arg) {\n  send_all_acks (TLS, arg);\n}\n\n\nvoid tgln_insert_msg_id (struct tgl_state *TLS, struct tgl_session *S, long long id) {\n  if (!S->ack_tree) {\n    TLS->timer_methods->insert (S->ev, ACK_TIMEOUT);\n  }\n  if (!tree_lookup_long (S->ack_tree, id)) {\n    S->ack_tree = tree_insert_long (S->ack_tree, id, rand ());\n  }\n}\n\n//extern struct tgl_dc *DC_list[];\n\n\nstatic void regen_temp_key_gw (struct tgl_state *TLS, void *arg) {\n  tglmp_regenerate_temp_auth_key (TLS, arg);\n}\n\nstruct tgl_dc *tglmp_alloc_dc (struct tgl_state *TLS, int flags, int id, char *ip, int port) {\n  //assert (!TLS->DC_list[id]);\n\n  if (!TLS->DC_list[id]) {\n    struct tgl_dc *DC = talloc0 (sizeof (*DC));\n    DC->id = id;\n    TLS->DC_list[id] = DC;\n    if (id > TLS->max_dc_num) {\n      TLS->max_dc_num = id;\n    }\n    if (TLS->enable_pfs) {\n      DC->ev = TLS->timer_methods->alloc (TLS, regen_temp_key_gw, DC);\n      TLS->timer_methods->insert (DC->ev, 0);\n    }\n  }\n\n  struct tgl_dc *DC = TLS->DC_list[id];\n\n  struct tgl_dc_option *O = DC->options[flags & 3];\n\n  struct tgl_dc_option *O2 = O;\n  while (O2) {\n    if (!strcmp (O2->ip, ip)) {\n      tfree_str (ip);\n      return DC;\n    }\n    O2 = O2->next;\n  }\n\n  struct tgl_dc_option *T = talloc (sizeof (*T));\n  T->ip = ip;\n  T->port = port;\n  T->next = O;\n  DC->options[flags & 3] = T;\n\n\n  return DC;\n}\n\nstatic struct mtproto_methods mtproto_methods = {\n  .execute = rpc_execute,\n  .ready = rpc_becomes_ready,\n  .close = rpc_close\n};\n\nvoid tglmp_dc_create_session (struct tgl_state *TLS, struct tgl_dc *DC) {\n  struct tgl_session *S = talloc0 (sizeof (*S));\n  assert (TGLC_rand_pseudo_bytes ((unsigned char *) &S->session_id, 8) >= 0);\n  S->dc = DC;\n  //S->c = TLS->net_methods->create_connection (TLS, DC->ip, DC->port, S, DC, &mtproto_methods);\n\n  create_session_connect (TLS, S);\n  S->ev = TLS->timer_methods->alloc (TLS, send_all_acks_gateway, S);\n  assert (!DC->sessions[0]);\n  DC->sessions[0] = S;\n}\n\nvoid tgl_do_send_ping (struct tgl_state *TLS, struct connection *c) {\n  int x[3];\n  x[0] = CODE_ping;\n  *(long long *)(x + 1) = rand () * (1ll << 32) + rand ();\n  tglmp_encrypt_send_message (TLS, c, x, 3, 0);\n}\n\nvoid tgl_dc_iterator (struct tgl_state *TLS, void (*iterator)(struct tgl_dc *DC)) {\n  int i;\n  for (i = 0; i <= TLS->max_dc_num; i++) {\n    iterator (TLS->DC_list[i]);\n  }\n}\n\nvoid tgl_dc_iterator_ex (struct tgl_state *TLS, void (*iterator)(struct tgl_dc *DC, void *extra), void *extra) {\n  int i;\n  for (i = 0; i <= TLS->max_dc_num; i++) {\n    iterator (TLS->DC_list[i], extra);\n  }\n}\n\n\nvoid tglmp_regenerate_temp_auth_key (struct tgl_state *TLS, struct tgl_dc *DC) {\n  DC->flags &= ~6;\n  DC->temp_auth_key_id = 0;\n  memset (DC->temp_auth_key, 0, 256);\n\n  if (!DC->sessions[0]) {\n    tgl_dc_authorize (TLS, DC);\n    return;\n  }\n\n  struct tgl_session *S = DC->sessions[0];\n  tglt_secure_random (&S->session_id, 8);\n  S->seq_no = 0;\n\n  TLS->timer_methods->remove (S->ev);\n  S->ack_tree = tree_clear_long (S->ack_tree);\n\n  if (DC->state != st_authorized) {\n    return;\n  }\n\n  if (!TLS->enable_pfs) {\n    return;\n  }\n\n  if (S->c) {\n    assert (TLS->enable_pfs);\n    create_temp_auth_key (TLS, S->c);\n  }\n}\n\nvoid tgls_free_session (struct tgl_state *TLS, struct tgl_session *S) {\n  S->ack_tree = tree_clear_long (S->ack_tree);\n  if (S->ev) { TLS->timer_methods->free (S->ev); }\n  if (S->c) {\n    TLS->net_methods->free (S->c);\n  }\n  tfree (S, sizeof (*S));\n}\n\nvoid tgls_free_dc (struct tgl_state *TLS, struct tgl_dc *DC) {\n  //if (DC->ip) { tfree_str (DC->ip); }\n\n  struct tgl_session *S = DC->sessions[0];\n  if (S) { tgls_free_session (TLS, S); }\n  \n  int i;\n  for (i = 0; i < 4; i++) {\n    struct tgl_dc_option *O = DC->options[i];\n    while (O) {\n      struct tgl_dc_option *N = O->next;\n      tfree_str (O->ip);\n      tfree (O, sizeof (*O));\n      O = N;\n    }\n  }\n\n  if (DC->ev) { TLS->timer_methods->free (DC->ev); }\n  tfree (DC, sizeof (*DC));\n}\n\nvoid tgls_free_pubkey (struct tgl_state *TLS) {\n  int i;\n  for (i = 0; i < TLS->rsa_key_num; i++) {\n    if (TLS->rsa_key_loaded[i]) {\n      TGLC_rsa_free (TLS->rsa_key_loaded[i]);\n      TLS->rsa_key_loaded[i] = NULL;\n    }\n  }\n}\n"
  },
  {
    "path": "mtproto-client.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Nikolay Durov, Andrey Lopatin 2012-2013\n              Vitaly Valtman 2013-2015\n*/\n#ifndef __MTPROTO_CLIENT_H__\n#define __MTPROTO_CLIENT_H__\n//#include \"net.h\"\n#include \"crypto/bn.h\"\n//void on_start (void);\n//..long long encrypt_send_message (struct connection *c, int *msg, int msg_ints, int useful);\n//void dc_authorize (struct tgl_dc *DC);\n//void work_update (struct connection *c, long long msg_id);\n//void work_update_binlog (void);\n//int check_g (unsigned char p[256], BIGNUM *g);\n//int check_g_bn (BIGNUM *p, BIGNUM *g);\n//int check_DH_params (BIGNUM *p, int g);\n//void secure_random (void *s, int l);\n\n#include \"tgl.h\"\n\nstruct connection;\nstruct tgl_dc;\n//#include \"queries.h\"\n#define TG_APP_HASH \"844584f2b1fd2daecee726166dcc1ef8\"\n#define TG_APP_ID 10534\n\n#define ACK_TIMEOUT 1\n#define MAX_DC_ID 10\n\nstruct connection;\n\nlong long tglmp_encrypt_send_message (struct tgl_state *TLS, struct connection *c, int *msg, int msg_ints, int flags);\nvoid tglmp_dc_create_session (struct tgl_state *TLS, struct tgl_dc *DC);\n//int tglmp_check_g (struct tgl_state *TLS, unsigned char p[256], BIGNUM *g);\n//int tglmp_check_DH_params (struct tgl_state *TLS, BIGNUM *p, int g);\nstruct tgl_dc *tglmp_alloc_dc (struct tgl_state *TLS, int flags, int id, char *ip, int port);\nvoid tglmp_regenerate_temp_auth_key (struct tgl_state *TLS, struct tgl_dc *D);\n\nvoid tgln_insert_msg_id (struct tgl_state *TLS, struct tgl_session *S, long long id);\nint tglmp_on_start (struct tgl_state *TLS);\nvoid tgl_dc_authorize (struct tgl_state *TLS, struct tgl_dc *DC);\nvoid tgls_free_dc (struct tgl_state *TLS, struct tgl_dc *DC);\nvoid tgls_free_pubkey (struct tgl_state *TLS);\nvoid tgl_do_send_ping (struct tgl_state *TLS, struct connection *c);\n#endif\n"
  },
  {
    "path": "mtproto-common.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Nikolay Durov, Andrey Lopatin 2012-2013\n              Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define\t_FILE_OFFSET_BITS\t64\n\n#include <assert.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <fcntl.h>\n#include <sys/types.h>\n#ifdef WIN32\n#include <winsock2.h>\n#else\n#include <netdb.h>\n#endif\n\n#include \"crypto/aes.h\"\n#include \"crypto/rand.h\"\n#include \"crypto/sha.h\"\n\n#include \"mtproto-common.h\"\n#include \"tools.h\"\n\n#ifdef __MACH__\n#include <mach/clock.h>\n#include <mach/mach.h>\n#endif\n\n#include <errno.h>\n\n#ifndef O_BINARY\n#define O_BINARY 0\n#endif\n\nstatic int __packet_buffer[PACKET_BUFFER_SIZE + 16];\nint *tgl_packet_ptr;\nint *tgl_packet_buffer = __packet_buffer + 16;\n\nstatic long long rsa_encrypted_chunks, rsa_decrypted_chunks;\n\n//int verbosity;\n\n#ifndef WIN32\nstatic int get_random_bytes (struct tgl_state *TLS, unsigned char *buf, int n) {\n  int r = 0, h = open (\"/dev/random\", O_RDONLY | O_NONBLOCK);\n  if (h >= 0) {\n    r = read (h, buf, n);\n    if (r > 0) {\n      vlogprintf (E_DEBUG, \"added %d bytes of real entropy to secure random numbers seed\\n\", r);\n    } else {\n      r = 0;\n    }\n    close (h);\n  }\n\n  if (r < n) {\n    h = open (\"/dev/urandom\", O_RDONLY);\n    if (h < 0) {\n      return r;\n    }\n    int s = read (h, buf + r, n - r);\n    close (h);\n    if (s > 0) {\n      r += s;\n    }\n  }\n\n  if (r >= (int) sizeof (long)) {\n    *(long *)buf ^= lrand48 ();\n    srand48 (*(long *)buf);\n  }\n\n  return r;\n}\n#else\nstatic HCRYPTPROV hCryptoServiceProvider = 0;\nstatic int get_random_bytes (struct tgl_state *TLS, unsigned char *buf, int n) {\n\tif (hCryptoServiceProvider == 0) {\n\t\t/* Crypto init */\n\t\tCryptAcquireContextA(&hCryptoServiceProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);\n\t}\n\t\n\tif (!CryptGenRandom(hCryptoServiceProvider, n, buf)) {\n\t\treturn -1;\n\t}\n    \n\t\n\treturn n;\n}\n#endif\n\n\n/* RDTSC */\n#if defined(__i386__)\n#define HAVE_RDTSC\nstatic __inline__ unsigned long long rdtsc (void) {\n  unsigned long long int x;\n  __asm__ volatile (\"rdtsc\" : \"=A\" (x));\n  return x;\n}\n#elif defined(__x86_64__)\n#define HAVE_RDTSC\nstatic __inline__ unsigned long long rdtsc (void) {\n  unsigned hi, lo;\n  __asm__ __volatile__ (\"rdtsc\" : \"=a\"(lo), \"=d\"(hi));\n  return ((unsigned long long) lo) | (((unsigned long long) hi) << 32);\n}\n#endif\n\nvoid tgl_prng_seed (struct tgl_state *TLS, const char *password_filename, int password_length) {\n  struct timespec T;\n  tgl_my_clock_gettime (CLOCK_REALTIME, &T);\n  TGLC_rand_add (&T, sizeof (T), 4.0);\n#ifdef HAVE_RDTSC\n  unsigned long long r = rdtsc ();\n  TGLC_rand_add (&r, 8, 4.0);\n#endif\n  unsigned short p = getpid ();\n  TGLC_rand_add (&p, sizeof (p), 0.0);\n#ifndef WIN32\n  p = getppid ();\n  TGLC_rand_add (&p, sizeof (p), 0.0);\n#endif\n  unsigned char rb[32];\n  int s = get_random_bytes (TLS, rb, 32);\n  if (s > 0) {\n    TGLC_rand_add (rb, s, s);\n  }\n  memset (rb, 0, sizeof (rb));\n  if (password_filename && password_length > 0) {\n    int fd = open (password_filename, O_RDONLY | O_BINARY);\n    if (fd < 0) {\n      vlogprintf (E_WARNING, \"Warning: fail to open password file - \\\"%s\\\", %s.\\n\", password_filename, strerror(errno));\n    } else {\n      unsigned char *a = talloc0 (password_length);\n      int l = read (fd, a, password_length);\n      if (l < 0) {\n        vlogprintf (E_WARNING, \"Warning: fail to read password file - \\\"%s\\\", %s.\\n\", password_filename, strerror(errno));\n      } else {\n        vlogprintf (E_DEBUG, \"read %d bytes from password file.\\n\", l);\n        TGLC_rand_add (a, l, l);\n      }\n      close (fd);\n      tfree_secure (a, password_length);\n    }\n  }\n  TLS->TGLC_bn_ctx = TGLC_bn_ctx_new ();\n  ensure_ptr (TLS->TGLC_bn_ctx);\n}\n\nint tgl_serialize_bignum (TGLC_bn *b, char *buffer, int maxlen) {\n  int itslen = TGLC_bn_num_bytes (b);\n  int reqlen;\n  if (itslen < 254) {\n    reqlen = itslen + 1;\n  } else {\n    reqlen = itslen + 4;\n  }\n  int newlen = (reqlen + 3) & -4;\n  int pad = newlen - reqlen;\n  reqlen = newlen;\n  if (reqlen > maxlen) {\n    return -reqlen;\n  }\n  if (itslen < 254) {\n    *buffer++ = itslen;\n  } else {\n    *(int *)buffer = (itslen << 8) + 0xfe;\n    buffer += 4;\n  }\n  int l = TGLC_bn_bn2bin (b, (unsigned char *)buffer);\n  assert (l == itslen);\n  buffer += l;\n  while (pad --> 0) {\n    *buffer++ = 0;\n  }\n  return reqlen;\n}\n\n\nlong long tgl_do_compute_rsa_key_fingerprint (TGLC_rsa *key) {\n  static char tempbuff[4096];\n  static unsigned char sha[20]; \n  assert (TGLC_rsa_n (key) && TGLC_rsa_e (key));\n  int l1 = tgl_serialize_bignum (TGLC_rsa_n (key), tempbuff, 4096);\n  assert (l1 > 0);\n  int l2 = tgl_serialize_bignum (TGLC_rsa_e (key), tempbuff + l1, 4096 - l1);\n  assert (l2 > 0 && l1 + l2 <= 4096);\n  TGLC_sha1 ((unsigned char *)tempbuff, l1 + l2, sha);\n  return *(long long *)(sha + 12);\n}\n\nvoid tgl_out_cstring (const char *str, long len) {\n  assert (len >= 0 && len < (1 << 24));\n  assert ((char *) packet_ptr + len + 8 < (char *) (packet_buffer + PACKET_BUFFER_SIZE));\n  char *dest = (char *) packet_ptr;\n  if (len < 254) {\n    *dest++ = len;\n  } else {\n    *packet_ptr = (len << 8) + 0xfe;\n    dest += 4;\n  }\n  memcpy (dest, str, len);\n  dest += len;\n  while ((long) dest & 3) {\n    *dest++ = 0;\n  }\n  packet_ptr = (int *) dest;\n}\n\nvoid tgl_out_cstring_careful (const char *str, long len) {\n  assert (len >= 0 && len < (1 << 24));\n  assert ((char *) packet_ptr + len + 8 < (char *) (packet_buffer + PACKET_BUFFER_SIZE));\n  char *dest = (char *) packet_ptr;\n  if (len < 254) {\n    dest++;\n    if (dest != str) {\n      memmove (dest, str, len);\n    }\n    dest[-1] = len;\n  } else {\n    dest += 4;\n    if (dest != str) {\n      memmove (dest, str, len);\n    }\n    *packet_ptr = (len << 8) + 0xfe;\n  }\n  dest += len;\n  while ((long) dest & 3) {\n    *dest++ = 0;\n  }\n  packet_ptr = (int *) dest;\n}\n\n\nvoid tgl_out_data (const void *data, long len) {\n  assert (len >= 0 && len < (1 << 24) && !(len & 3));\n  assert ((char *) packet_ptr + len + 8 < (char *) (packet_buffer + PACKET_BUFFER_SIZE));\n  memcpy (packet_ptr, data, len);\n  packet_ptr += len >> 2;\n}\n\nint *tgl_in_ptr, *tgl_in_end;\n\nint tgl_fetch_bignum (TGLC_bn *x) {\n  int l = prefetch_strlen ();\n  if (l < 0) {\n    return l;\n  }\n  char *str = fetch_str (l);\n  assert (TGLC_bn_bin2bn ((unsigned char *) str, l, x) == x);\n  return l;\n}\n\nint tgl_pad_rsa_encrypt (struct tgl_state *TLS, char *from, int from_len, char *to, int size, TGLC_bn *N, TGLC_bn *E) {\n  int pad = (255000 - from_len - 32) % 255 + 32;\n  int chunks = (from_len + pad) / 255;\n  int bits = TGLC_bn_num_bits (N);\n  assert (bits >= 2041 && bits <= 2048);\n  assert (from_len > 0 && from_len <= 2550);\n  assert (size >= chunks * 256);\n  assert (TGLC_rand_pseudo_bytes ((unsigned char *) from + from_len, pad) >= 0);\n  int i;\n  TGLC_bn *x = TGLC_bn_new ();\n  TGLC_bn *y = TGLC_bn_new ();\n  assert(x);\n  assert(y);\n  rsa_encrypted_chunks += chunks;\n  for (i = 0; i < chunks; i++) {\n    TGLC_bn_bin2bn ((unsigned char *) from, 255, x);\n    assert (TGLC_bn_mod_exp (y, x, E, N, TLS->TGLC_bn_ctx) == 1);\n    unsigned l = 256 - TGLC_bn_num_bytes (y);\n    assert (l <= 256);\n    memset (to, 0, l);\n    TGLC_bn_bn2bin (y, (unsigned char *) to + l);\n    to += 256;\n  }\n  TGLC_bn_free (x);\n  TGLC_bn_free (y);\n  return chunks * 256;\n}\n\nint tgl_pad_rsa_decrypt (struct tgl_state *TLS, char *from, int from_len, char *to, int size, TGLC_bn *N, TGLC_bn *D) {\n  if (from_len < 0 || from_len > 0x1000 || (from_len & 0xff)) {\n    return -1;\n  }\n  int chunks = (from_len >> 8);\n  int bits = TGLC_bn_num_bits (N);\n  assert (bits >= 2041 && bits <= 2048);\n  assert (size >= chunks * 255);\n  int i;\n  TGLC_bn *x = TGLC_bn_new ();\n  TGLC_bn *y = TGLC_bn_new ();\n  assert(x);\n  assert(y);\n  for (i = 0; i < chunks; i++) {\n    ++rsa_decrypted_chunks;\n    TGLC_bn_bin2bn ((unsigned char *) from, 256, x);\n    assert (TGLC_bn_mod_exp (y, x, D, N, TLS->TGLC_bn_ctx) == 1);\n    int l = TGLC_bn_num_bytes (y);\n    if (l > 255) {\n      TGLC_bn_free (x);\n      TGLC_bn_free (y);\n      return -1;\n    }\n    assert (l >= 0 && l <= 255);\n    memset (to, 0, 255 - l);\n    TGLC_bn_bn2bin (y, (unsigned char *) to + 255 - l);\n    to += 255;\n  }\n  TGLC_bn_free (x);\n  TGLC_bn_free (y);\n  return chunks * 255;\n}\n\nstatic unsigned char aes_key_raw[32], aes_iv[32];\nstatic TGLC_aes_key aes_key;\n\nvoid tgl_init_aes_unauth (const char server_nonce[16], const char hidden_client_nonce[32], int encrypt) {\n  static unsigned char buffer[64], hash[20];\n  memcpy (buffer, hidden_client_nonce, 32);\n  memcpy (buffer + 32, server_nonce, 16);\n  TGLC_sha1 (buffer, 48, aes_key_raw);\n  memcpy (buffer + 32, hidden_client_nonce, 32);\n  TGLC_sha1 (buffer, 64, aes_iv + 8);\n  memcpy (buffer, server_nonce, 16);\n  memcpy (buffer + 16, hidden_client_nonce, 32);\n  TGLC_sha1 (buffer, 48, hash);\n  memcpy (aes_key_raw + 20, hash, 12);\n  memcpy (aes_iv, hash + 12, 8);\n  memcpy (aes_iv + 28, hidden_client_nonce, 4);\n  if (encrypt) {\n    TGLC_aes_set_encrypt_key (aes_key_raw, 32*8, &aes_key);\n  } else {\n    TGLC_aes_set_decrypt_key (aes_key_raw, 32*8, &aes_key);\n  }\n  memset (aes_key_raw, 0, sizeof (aes_key_raw));\n}\n\nvoid tgl_init_aes_auth (char auth_key[192], char msg_key[16], int encrypt) {\n  static unsigned char buffer[48], hash[20];\n  //  sha1_a = SHA1 (msg_key + substr (auth_key, 0, 32));\n  //  sha1_b = SHA1 (substr (auth_key, 32, 16) + msg_key + substr (auth_key, 48, 16));\n  //  sha1_с = SHA1 (substr (auth_key, 64, 32) + msg_key);\n  //  sha1_d = SHA1 (msg_key + substr (auth_key, 96, 32));\n  //  aes_key = substr (sha1_a, 0, 8) + substr (sha1_b, 8, 12) + substr (sha1_c, 4, 12);\n  //  aes_iv = substr (sha1_a, 8, 12) + substr (sha1_b, 0, 8) + substr (sha1_c, 16, 4) + substr (sha1_d, 0, 8);\n  memcpy (buffer, msg_key, 16);\n  memcpy (buffer + 16, auth_key, 32);\n  TGLC_sha1 (buffer, 48, hash);\n  memcpy (aes_key_raw, hash, 8);\n  memcpy (aes_iv, hash + 8, 12);\n\n  memcpy (buffer, auth_key + 32, 16);\n  memcpy (buffer + 16, msg_key, 16);\n  memcpy (buffer + 32, auth_key + 48, 16);\n  TGLC_sha1 (buffer, 48, hash);\n  memcpy (aes_key_raw + 8, hash + 8, 12);\n  memcpy (aes_iv + 12, hash, 8);\n\n  memcpy (buffer, auth_key + 64, 32);\n  memcpy (buffer + 32, msg_key, 16);\n  TGLC_sha1 (buffer, 48, hash);\n  memcpy (aes_key_raw + 20, hash + 4, 12);\n  memcpy (aes_iv + 20, hash + 16, 4);\n\n  memcpy (buffer, msg_key, 16);\n  memcpy (buffer + 16, auth_key + 96, 32);\n  TGLC_sha1 (buffer, 48, hash);\n  memcpy (aes_iv + 24, hash, 8);\n  \n  if (encrypt) {\n    TGLC_aes_set_encrypt_key (aes_key_raw, 32*8, &aes_key);\n  } else {\n    TGLC_aes_set_decrypt_key (aes_key_raw, 32*8, &aes_key);\n  }\n  memset (aes_key_raw, 0, sizeof (aes_key_raw));\n}\n\nint tgl_pad_aes_encrypt (char *from, int from_len, char *to, int size) {\n  int padded_size = (from_len + 15) & -16;\n  assert (from_len > 0 && padded_size <= size);\n  if (from_len < padded_size) {\n    assert (TGLC_rand_pseudo_bytes ((unsigned char *) from + from_len, padded_size - from_len) >= 0);\n  }\n  TGLC_aes_ige_encrypt ((unsigned char *) from, (unsigned char *) to, padded_size, &aes_key, aes_iv, 1);\n  return padded_size;\n}\n\nint tgl_pad_aes_decrypt (char *from, int from_len, char *to, int size) {\n  if (from_len <= 0 || from_len > size || (from_len & 15)) {\n    return -1;\n  }\n  TGLC_aes_ige_encrypt ((unsigned char *) from, (unsigned char *) to, from_len, &aes_key, aes_iv, 0);\n  return from_len;\n}\n"
  },
  {
    "path": "mtproto-common.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Nikolay Durov, Andrey Lopatin 2012-2013\n              Vitaly Valtman 2013-2015\n*/\n#ifndef __MTPROTO_COMMON_H__\n#define __MTPROTO_COMMON_H__\n\n#include <string.h>\n#include \"crypto/rsa_pem.h\"\n#include \"crypto/bn.h\"\n#include <stdio.h>\n#include <assert.h>\n\n\n#if defined(_MSC_VER) || defined(__MINGW32__)\n#define INT64_PRINTF_MODIFIER \"I64\"\n#else\n#define INT64_PRINTF_MODIFIER \"ll\"\n#endif\n\n//#include \"interface.h\"\n#include \"tools.h\"\n#include \"auto/constants.h\"\n\n#include \"tgl.h\"\n#include \"tgl-inner.h\"\n/* DH key exchange protocol data structures */\n#define\tCODE_req_pq\t\t\t0x60469778\n#define CODE_resPQ\t\t\t0x05162463\n#define CODE_req_DH_params\t\t0xd712e4be\n#define CODE_p_q_inner_data\t\t0x83c95aec\n#define CODE_p_q_inner_data_temp\t\t0x3c6a84d4\n#define CODE_server_DH_inner_data\t0xb5890dba\n#define CODE_server_DH_params_fail\t0x79cb045d\n#define CODE_server_DH_params_ok\t0xd0e8075c\n#define CODE_set_client_DH_params\t0xf5045f1f\n#define CODE_client_DH_inner_data\t0x6643b654\n#define CODE_dh_gen_ok\t\t\t0x3bcbf734\n#define CODE_dh_gen_retry\t\t0x46dc1fb9\n#define CODE_dh_gen_fail\t\t0xa69dae02 \n\n#define CODE_bind_auth_key_inner 0x75a3f765\n\n/* service messages */\n#define CODE_rpc_result\t\t\t0xf35c6d01\n#define CODE_rpc_error\t\t\t0x2144ca19\n#define CODE_msg_container\t\t0x73f1f8dc\n#define CODE_msg_copy\t\t\t0xe06046b2\n#define CODE_msgs_ack\t\t\t0x62d6b459\n#define CODE_bad_msg_notification\t0xa7eff811\n#define\tCODE_bad_server_salt\t\t0xedab447b\n#define CODE_msgs_state_req\t\t0xda69fb52\n#define CODE_msgs_state_info\t\t0x04deb57d\n#define CODE_msgs_all_info\t\t0x8cc0d131\n#define CODE_new_session_created\t0x9ec20908\n#define CODE_msg_resend_req\t\t0x7d861a08\n#define CODE_ping\t\t\t0x7abe77ec\n#define CODE_pong\t\t\t0x347773c5\n#define CODE_destroy_session\t\t0xe7512126\n#define CODE_destroy_session_ok\t\t0xe22045fc\n#define CODE_destroy_session_none      \t0x62d350c9\n#define CODE_destroy_sessions\t\t0x9a6face8\n#define CODE_destroy_sessions_res\t0xa8164668\n#define\tCODE_get_future_salts\t\t0xb921bd04\n#define\tCODE_future_salt\t\t0x0949d9dc\n#define\tCODE_future_salts\t\t0xae500895\n#define\tCODE_rpc_drop_answer\t\t0x58e4a740\n#define CODE_rpc_answer_unknown\t\t0x5e2ad36e\n#define CODE_rpc_answer_dropped_running\t0xcd78e586\n#define CODE_rpc_answer_dropped\t\t0xa43ad8b7\n#define\tCODE_msg_detailed_info\t\t0x276d3ec6\n#define\tCODE_msg_new_detailed_info\t0x809db6df\n#define CODE_ping_delay_disconnect\t0xf3427b8c\n#define CODE_gzip_packed 0x3072cfa1\n\n#define CODE_input_peer_notify_settings_old 0x3cf4b1be\n#define CODE_peer_notify_settings_old 0xddbcd4a5\n#define CODE_user_profile_photo_old 0x990d1493\n#define CODE_config_old 0x232d5905\n\n#define CODE_msg_new_detailed_info 0x809db6df\n\n#define CODE_msg_detailed_info 0x276d3ec6\n/* not really a limit, for struct encrypted_message only */\n// #define MAX_MESSAGE_INTS\t16384\n#define MAX_MESSAGE_INTS\t1048576\n#define MAX_PROTO_MESSAGE_INTS\t1048576\n\n#define PACKET_BUFFER_SIZE\t(16384 * 100 + 16) // temp fix\n#pragma pack(push,4)\nstruct encrypted_message {\n  // unencrypted header\n  long long auth_key_id;\n  char msg_key[16];\n  // encrypted part, starts with encrypted header\n  long long server_salt;\n  long long session_id;\n  // long long auth_key_id2; // removed\n  // first message follows\n  long long msg_id;\n  int seq_no;\n  int msg_len;   // divisible by 4\n  int message[MAX_MESSAGE_INTS];\n};\n\n#pragma pack(pop)\n\n//TGLC_bn_ctx *bn_ctx;\n\nvoid tgl_prng_seed (struct tgl_state *TLS, const char *password_filename, int password_length);\nint tgl_serialize_bignum (TGLC_bn *b, char *buffer, int maxlen);\nlong long tgl_do_compute_rsa_key_fingerprint (TGLC_rsa *key);\n\n#define packet_buffer tgl_packet_buffer\n#define packet_ptr tgl_packet_ptr\n\nextern int *tgl_packet_buffer;\nextern int *tgl_packet_ptr;\n\nstatic inline void out_ints (const int *what, int len) {\n  assert (packet_ptr + len <= packet_buffer + PACKET_BUFFER_SIZE);\n  memcpy (packet_ptr, what, len * 4);\n  packet_ptr += len;\n}\n\n\nstatic inline void out_int (int x) {\n  assert (packet_ptr + 1 <= packet_buffer + PACKET_BUFFER_SIZE);\n  *packet_ptr++ = x;\n}\n\n\nstatic inline void out_long (long long x) {\n  assert (packet_ptr + 2 <= packet_buffer + PACKET_BUFFER_SIZE);\n  *(long long *)packet_ptr = x;\n  packet_ptr += 2;\n}\n\nstatic inline void out_double (double x) {\n  assert (packet_ptr + 2 <= packet_buffer + PACKET_BUFFER_SIZE);\n  *(double *)packet_ptr = x;\n  packet_ptr += 2;\n}\n\nstatic inline void clear_packet (void) {\n  packet_ptr = packet_buffer;\n}\n\nvoid tgl_out_cstring (const char *str, long len);\nvoid tgl_out_cstring_careful (const char *str, long len);\nvoid tgl_out_data (const void *data, long len);\n\n#define out_cstring tgl_out_cstring\n#define out_cstring_careful tgl_out_cstring_careful\n#define out_data tgl_out_data\n\nstatic inline void out_string (const char *str) {\n  out_cstring (str, strlen (str));\n}\n\nstatic inline void out_bignum (TGLC_bn *n) {\n  int l = tgl_serialize_bignum (n, (char *)packet_ptr, (PACKET_BUFFER_SIZE - (packet_ptr - packet_buffer)) * 4);\n  assert (l > 0);\n  packet_ptr += l >> 2;\n}\n\n#define in_ptr tgl_in_ptr\n#define in_end tgl_in_end\nextern int *tgl_in_ptr, *tgl_in_end;\n\n\n//void fetch_pts (void);\n//void fetch_qts (void);\n//void fetch_date (void);\n//void fetch_seq (void);\nstatic inline int prefetch_strlen (void) {\n  if (in_ptr >= in_end) { \n    return -1; \n  }\n  unsigned l = *in_ptr;\n  if ((l & 0xff) < 0xfe) { \n    l &= 0xff;\n    return (in_end >= in_ptr + (l >> 2) + 1) ? (int)l : -1;\n  } else if ((l & 0xff) == 0xfe) {\n    l >>= 8;\n    return (l >= 254 && in_end >= in_ptr + ((l + 7) >> 2)) ? (int)l : -1;\n  } else {\n    return -1;\n  }\n}\n\nstatic inline char *fetch_str (int len) {\n  assert (len >= 0);\n  if (len < 254) {\n    char *str = (char *) in_ptr + 1;\n    in_ptr += 1 + (len >> 2);\n    return str;\n  } else {\n    char *str = (char *) in_ptr + 4;\n    in_ptr += (len + 7) >> 2;\n    return str;\n  }\n} \n\nstatic inline char *fetch_str_dup (void) {\n  int l = prefetch_strlen ();\n  assert (l >= 0);\n  int i;\n  char *s = fetch_str (l);\n  for (i = 0; i < l; i++) {\n    if (!s[i]) { break; }\n  }\n  char *r = talloc (i + 1);\n  memcpy (r, s, i);\n  r[i] = 0;\n  return r;\n}\n\nstatic inline int fetch_update_str (char **s) {\n  if (!*s) {\n    *s = fetch_str_dup ();\n    return 1;\n  }\n  int l = prefetch_strlen ();\n  char *r = fetch_str (l);\n  if (memcmp (*s, r, l) || (*s)[l]) {\n    tfree_str (*s);\n    *s = talloc (l + 1);\n    memcpy (*s, r, l);\n    (*s)[l] = 0;\n    return 1;\n  }\n  return 0;\n}\n\nstatic inline int fetch_update_int (int *value) {\n  if (*value == *in_ptr) {\n    in_ptr ++;\n    return 0;\n  } else {\n    *value = *(in_ptr ++);\n    return 1;\n  }\n}\n\nstatic inline int fetch_update_long (long long *value) {\n  if (*value == *(long long *)in_ptr) {\n    in_ptr += 2;\n    return 0;\n  } else {\n    *value = *(long long *)(in_ptr);\n    in_ptr += 2;\n    return 1;\n  }\n}\n\nstatic inline int set_update_int (int *value, int new_value) {\n  if (*value == new_value) {\n    return 0;\n  } else {\n    *value = new_value;\n    return 1;\n  }\n}\n\nstatic inline void fetch_skip (int n) {\n  in_ptr += n;\n  assert (in_ptr <= in_end);\n}\n\nstatic inline void fetch_skip_str (void) {\n  int l = prefetch_strlen ();\n  assert (l >= 0);\n  fetch_str (l);\n}\n\nstatic inline long have_prefetch_ints (void) {\n  return in_end - in_ptr;\n}\n\nint tgl_fetch_bignum (TGLC_bn *x);\n#define fetch_bignum tgl_fetch_bignum\n\nstatic inline int fetch_int (void) {\n  assert (in_ptr + 1 <= in_end);\n  return *(in_ptr ++);\n}\n\nstatic inline int fetch_bool (void) {\n  assert (in_ptr + 1 <= in_end);\n  assert (*(in_ptr) == (int)CODE_bool_true || *(in_ptr) == (int)CODE_bool_false);\n  return *(in_ptr ++) == (int)CODE_bool_true;\n}\n\nstatic inline int prefetch_int (void) {\n  assert (in_ptr < in_end);\n  return *(in_ptr);\n}\n\nstatic inline void prefetch_data (void *data, int size) {\n  assert (in_ptr + (size >> 2) <= in_end);\n  memcpy (data, in_ptr, size);\n}\n\nstatic inline void fetch_data (void *data, int size) {\n  assert (in_ptr + (size >> 2) <= in_end);\n  memcpy (data, in_ptr, size);\n  assert (!(size & 3));\n  in_ptr += (size >> 2);\n}\n\nstatic inline long long fetch_long (void) {\n  assert (in_ptr + 2 <= in_end);\n  long long r = *(long long *)in_ptr;\n  in_ptr += 2;\n  return r;\n}\n\nstatic inline double fetch_double (void) {\n  assert (in_ptr + 2 <= in_end);\n  double r = *(double *)in_ptr;\n  in_ptr += 2;\n  return r;\n}\n\nstatic inline void fetch_ints (void *data, int count) {\n  assert (in_ptr + count <= in_end);\n  memcpy (data, in_ptr, 4 * count);\n  in_ptr += count;\n}\n    \nstatic inline void fetch256 (void *buf) {\n  int l = prefetch_strlen ();\n  assert (l >= 0);\n  char *s = fetch_str (l);\n  if (l < 256) {\n    memcpy (buf + 256 - l, s, l);\n    memset (buf, 0, 256 - l);\n  } else {\n    memcpy (buf, s + (l - 256), 256);\n  }\n}\n\nstatic inline int in_remaining (void) {\n  return 4 * (in_end - in_ptr);\n}\n\n//int get_random_bytes (unsigned char *buf, int n);\n\nint tgl_pad_rsa_encrypt (struct tgl_state *TLS, char *from, int from_len, char *to, int size, TGLC_bn *N, TGLC_bn *E);\nint tgl_pad_rsa_decrypt (struct tgl_state *TLS, char *from, int from_len, char *to, int size, TGLC_bn *N, TGLC_bn *D);\n\n//extern long long rsa_encrypted_chunks, rsa_decrypted_chunks;\n\n//extern unsigned char aes_key_raw[32], aes_iv[32];\n//extern TGLC_aes_key aes_key;\n\nvoid tgl_init_aes_unauth (const char server_nonce[16], const char hidden_client_nonce[32], int encrypt);\nvoid tgl_init_aes_auth (char auth_key[192], char msg_key[16], int encrypt);\nint tgl_pad_aes_encrypt (char *from, int from_len, char *to, int size);\nint tgl_pad_aes_decrypt (char *from, int from_len, char *to, int size);\n/*\nstatic inline void hexdump_in (void) {\n  hexdump (in_ptr, in_end);\n}\n\nstatic inline void hexdump_out (void) {\n  hexdump (packet_buffer, packet_ptr);\n}*/\n\n#ifndef CLOCK_REALTIME\n#define CLOCK_REALTIME 0\n#define CLOCK_MONOTONIC 1\n#endif\n#endif\n"
  },
  {
    "path": "mtproto-key.c",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2015\n*/\n\nconst unsigned char _mtproto_default_key[] = {\n  0xc1, 0x50, 0x02, 0x3e, 0x2f, 0x70, 0xdb, 0x79, 0x85, 0xde, 0xd0, 0x64,\n  0x75, 0x9c, 0xfe, 0xcf, 0x0a, 0xf3, 0x28, 0xe6, 0x9a, 0x41, 0xda, 0xf4,\n  0xd6, 0xf0, 0x1b, 0x53, 0x81, 0x35, 0xa6, 0xf9, 0x1f, 0x8f, 0x8b, 0x2a,\n  0x0e, 0xc9, 0xba, 0x97, 0x20, 0xce, 0x35, 0x2e, 0xfc, 0xf6, 0xc5, 0x68,\n  0x0f, 0xfc, 0x42, 0x4b, 0xd6, 0x34, 0x86, 0x49, 0x02, 0xde, 0x0b, 0x4b,\n  0xd6, 0xd4, 0x9f, 0x4e, 0x58, 0x02, 0x30, 0xe3, 0xae, 0x97, 0xd9, 0x5c,\n  0x8b, 0x19, 0x44, 0x2b, 0x3c, 0x0a, 0x10, 0xd8, 0xf5, 0x63, 0x3f, 0xec,\n  0xed, 0xd6, 0x92, 0x6a, 0x7f, 0x6d, 0xab, 0x0d, 0xdb, 0x7d, 0x45, 0x7f,\n  0x9e, 0xa8, 0x1b, 0x84, 0x65, 0xfc, 0xd6, 0xff, 0xfe, 0xed, 0x11, 0x40,\n  0x11, 0xdf, 0x91, 0xc0, 0x59, 0xca, 0xed, 0xaf, 0x97, 0x62, 0x5f, 0x6c,\n  0x96, 0xec, 0xc7, 0x47, 0x25, 0x55, 0x69, 0x34, 0xef, 0x78, 0x1d, 0x86,\n  0x6b, 0x34, 0xf0, 0x11, 0xfc, 0xe4, 0xd8, 0x35, 0xa0, 0x90, 0x19, 0x6e,\n  0x9a, 0x5f, 0x0e, 0x44, 0x49, 0xaf, 0x7e, 0xb6, 0x97, 0xdd, 0xb9, 0x07,\n  0x64, 0x94, 0xca, 0x5f, 0x81, 0x10, 0x4a, 0x30, 0x5b, 0x6d, 0xd2, 0x76,\n  0x65, 0x72, 0x2c, 0x46, 0xb6, 0x0e, 0x5d, 0xf6, 0x80, 0xfb, 0x16, 0xb2,\n  0x10, 0x60, 0x7e, 0xf2, 0x17, 0x65, 0x2e, 0x60, 0x23, 0x6c, 0x25, 0x5f,\n  0x6a, 0x28, 0x31, 0x5f, 0x40, 0x83, 0xa9, 0x67, 0x91, 0xd7, 0x21, 0x4b,\n  0xf6, 0x4c, 0x1d, 0xf4, 0xfd, 0x0d, 0xb1, 0x94, 0x4f, 0xb2, 0x6a, 0x2a,\n  0x57, 0x03, 0x1b, 0x32, 0xee, 0xe6, 0x4a, 0xd1, 0x5a, 0x8b, 0xa6, 0x88,\n  0x85, 0xcd, 0xe7, 0x4a, 0x5b, 0xfc, 0x92, 0x0f, 0x6a, 0xbf, 0x59, 0xba,\n  0x5c, 0x75, 0x50, 0x63, 0x73, 0xe7, 0x13, 0x0f, 0x90, 0x42, 0xda, 0x92,\n  0x21, 0x79, 0x25, 0x1f\n};\nconst unsigned int _mtproto_default_key_len = 256;\nconst long long _mtproto_default_e = 65537;\n\nconst unsigned char *tglmp_get_default_key (void) {\n  return _mtproto_default_key;\n}\nunsigned int tglmp_get_default_key_len (void) {\n  return _mtproto_default_key_len;\n}\nlong long tglmp_get_default_e (void) {\n  return _mtproto_default_e;\n}\n"
  },
  {
    "path": "mtproto-key.h",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2015\n*/\n\n#ifndef __MTPROTO_KEY_H__\n#define __MTPROTO_KEY_H__\n\nconst unsigned char *tglmp_get_default_key (void);\nunsigned int tglmp_get_default_key_len (void);\nlong long tglmp_get_default_e (void);\n\n#endif\n"
  },
  {
    "path": "mtproto-utils.c",
    "content": "#include \"config.h\"\n#include \"crypto/bn.h\"\n#include \"tl-parser/portable_endian.h\"\n#include \"tgl.h\"\n#include \"tools.h\"\n#include \"mtproto-utils.h\"\n\nstatic unsigned long long gcd (unsigned long long a, unsigned long long b) {\n  return b ? gcd (b, a % b) : a;\n}\n\nstatic int check_prime (struct tgl_state *TLS, TGLC_bn *p) {\n  int r = TGLC_bn_is_prime (p, /* \"use default\" */ 0, 0, TLS->TGLC_bn_ctx, 0);\n  ensure (r >= 0);\n  return r;\n}\n\n\n// Complete set of checks see at https://core.telegram.org/mtproto/security_guidelines\n\n\n// Checks that (p,g) is acceptable pair for DH\nint tglmp_check_DH_params (struct tgl_state *TLS, TGLC_bn *p, int g) {\n  if (g < 2 || g > 7) { return -1; }\n  if (TGLC_bn_num_bits (p) != 2048) { return -1; }\n  \n  TGLC_bn *t = TGLC_bn_new ();\n  \n  TGLC_bn *dh_g = TGLC_bn_new ();\n  \n  ensure (TGLC_bn_set_word (dh_g, 4 * g));\n  ensure (TGLC_bn_mod (t, p, dh_g, TLS->TGLC_bn_ctx));\n  int x = TGLC_bn_get_word (t);\n  assert (x >= 0 && x < 4 * g);\n\n  TGLC_bn_free (dh_g);\n\n  int res = 0;\n  switch (g) {\n  case 2:\n    if (x != 7) { res = -1; }\n    break;\n  case 3:\n    if (x % 3 != 2) { res = -1; }\n    break;\n  case 4:\n    break;\n  case 5:\n    if (x % 5 != 1 && x % 5 != 4) { res = -1; }\n    break;\n  case 6:\n    if (x != 19 && x != 23) { res = -1; }\n    break;\n  case 7:\n    if (x % 7 != 3 && x % 7 != 5 && x % 7 != 6) { res = -1; }\n    break;\n  }\n\n  if (res < 0 || !check_prime (TLS, p)) { \n    TGLC_bn_free (t);\n    return -1; \n  }\n\n  TGLC_bn *b = TGLC_bn_new ();\n  ensure (TGLC_bn_set_word (b, 2));\n  ensure (TGLC_bn_div (t, 0, p, b, TLS->TGLC_bn_ctx));\n  if (!check_prime (TLS, t)) { \n    res = -1;\n  }\n  TGLC_bn_free (b);\n  TGLC_bn_free (t);\n  return res;\n}\n\n// checks that g_a is acceptable for DH\nint tglmp_check_g_a (struct tgl_state *TLS, TGLC_bn *p, TGLC_bn *g_a) {\n  if (TGLC_bn_num_bytes (g_a) > 256) {\n    return -1;\n  }\n  if (TGLC_bn_num_bits (g_a) < 2048 - 64) {\n    return -1;\n  }\n  if (TGLC_bn_cmp (p, g_a) <= 0) {\n    return -1;\n  }\n  \n  TGLC_bn *dif = TGLC_bn_new ();\n  TGLC_bn_sub (dif, p, g_a);\n  if (TGLC_bn_num_bits (dif) < 2048 - 64) {\n    TGLC_bn_free (dif);\n    return -1;\n  }\n  TGLC_bn_free (dif);\n  return 0;\n}\n\nstatic unsigned long long BN2ull (TGLC_bn *b) {\n  if (sizeof (unsigned long) == 8) {\n    return TGLC_bn_get_word (b);\n  } else if (sizeof (unsigned long long) == 8) {\n    assert (0); // As long as nobody ever uses this code, assume it is broken.\n    unsigned long long tmp;\n    /* Here be dragons, but it should be okay due to be64toh */\n    TGLC_bn_bn2bin (b, (unsigned char *) &tmp);\n    return be64toh (tmp);\n  } else {\n    assert (0);\n  }\n}\n\nstatic void ull2BN (TGLC_bn *b, unsigned long long val) {\n  if (sizeof (unsigned long) == 8 || val < (1ll << 32)) {\n    TGLC_bn_set_word (b, val);\n  } else if (sizeof (unsigned long long) == 8) {\n    assert (0); // As long as nobody ever uses this code, assume it is broken.\n    htobe64(val);\n    /* Here be dragons, but it should be okay due to htobe64 */\n    TGLC_bn_bin2bn ((unsigned char *) &val, 8, b);\n  } else {\n    assert (0);\n  }\n}\n\nint bn_factorize (TGLC_bn *pq, TGLC_bn *p, TGLC_bn *q) {\n  // Should work in any case\n  // Rewrite this code\n  unsigned long long what = BN2ull (pq);\n\n  int it = 0;\n  \n  unsigned long long g = 0;\n  int i;\n  for (i = 0; i < 3 || it < 1000; i++) {\n    int q = ((rand() & 15) + 17) % what;\n    unsigned long long x = (long long)rand () % (what - 1) + 1, y = x;\n    int lim = 1 << (i + 18);\n    int j;\n    for (j = 1; j < lim; j++) {\n      ++it;\n      unsigned long long a = x, b = x, c = q;\n      while (b) {\n        if (b & 1) {\n          c += a;\n          if (c >= what) {\n            c -= what;\n          }\n        }\n        a += a;\n        if (a >= what) {\n          a -= what;\n        }\n        b >>= 1;\n      }\n      x = c;\n      unsigned long long z = x < y ? what + x - y : x - y;\n      g = gcd (z, what);\n      if (g != 1) {\n        break;\n      }\n      if (!(j & (j - 1))) {\n        y = x;\n      }\n    }\n    if (g > 1 && g < what) break;\n  }\n\n  assert (g > 1 && g < what);\n  unsigned long long p1 = g;\n  unsigned long long p2 = what / g;\n  if (p1 > p2) {\n    unsigned long long t = p1; p1 = p2; p2 = t;\n  }\n  ull2BN (p, p1);\n  ull2BN (q, p2);\n  return 0;\n}\n"
  },
  {
    "path": "mtproto-utils.h",
    "content": "#ifndef __MTPROTO_UTILS_H__\n#define __MTPROTO_UTILS_H__\n#include \"crypto/bn.h\"\nint tglmp_check_DH_params (struct tgl_state *TLS, TGLC_bn *p, int g);\nint tglmp_check_g_a (struct tgl_state *TLS, TGLC_bn *p, TGLC_bn *g_a);\nint bn_factorize (TGLC_bn *pq, TGLC_bn *p, TGLC_bn *q);\n#endif\n"
  },
  {
    "path": "mtproto.tl",
    "content": "---types---\nresPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:(Vector long) = ResPQ;\nserver_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params;\nserver_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;\n\np_q_inner_data#83c95aec pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data;\np_q_inner_data_temp#3c6a84d4 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data;\nclient_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;\n\ndh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;\ndh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer;\ndh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer;\n\nserver_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;\n\n---functions---\nreq_pq#60469778 nonce:int128 = ResPQ;\nreq_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;\nset_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;\n"
  },
  {
    "path": "no-preview.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n// Just sample jpg file 90x90\n\nint thumb_file_size = (82 * 6 - 2) * 4;\nint thumb_file [] = {\n0xe0ffd8ff, 0x464a1000, 0x01004649, 0x64000101, 0x00006400, 0xa002e2ff,\n0x5f434349, 0x464f5250, 0x00454c49, 0x00000101, 0x636c9002, 0x3004736d,\n0x6e6d0000, 0x47527274, 0x59582042, 0xdd07205a, 0x04000b00, 0x1b001600,\n0x63612400, 0x50417073, 0x00004c50, 0x00000000, 0x00000000, 0x00000000,\n0x00000000, 0x00000000, 0x00000000, 0x0100d6f6, 0x00000000, 0x636c2dd3,\n0x0000736d, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,\n0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,\n0x65640b00, 0x00006373, 0x00000801, 0x70633800, 0x00007472, 0x00004001,\n0x74774e00, 0x00007470, 0x00009001, 0x68631400, 0x00006461, 0x0000a401,\n0x58722c00, 0x00005a59, 0x0000d001, 0x58621400, 0x00005a59, 0x0000e401,\n0x58671400, 0x00005a59, 0x0000f801, 0x54721400, 0x00004352, 0x00000c02,\n0x54672000, 0x00004352, 0x00002c02, 0x54622000, 0x00004352, 0x00004c02,\n0x68632000, 0x00006d72, 0x00006c02, 0x6c6d2400, 0x00006375, 0x00000000,\n0x00000100, 0x6e650c00, 0x00005355, 0x00001c00, 0x73001c00, 0x47005200,\n0x20004200, 0x75006200, 0x6c006900, 0x2d007400, 0x6e006900, 0x6c6d0000,\n0x00006375, 0x00000000, 0x00000100, 0x6e650c00, 0x00005355, 0x00003200,\n0x4e001c00, 0x20006f00, 0x6f006300, 0x79007000, 0x69007200, 0x68006700,\n0x2c007400, 0x75002000, 0x65007300, 0x66002000, 0x65007200, 0x6c006500,\n0x00007900, 0x59580000, 0x0000205a, 0x00000000, 0x0100d6f6, 0x00000000,\n0x66732dd3, 0x00003233, 0x01000000, 0x00004a0c, 0xffffe305, 0x00002af3,\n0x00009b07, 0xffff87fd, 0xffffa2fb, 0x0000a3fd, 0x0000d803, 0x595894c0,\n0x0000205a, 0x00000000, 0x0000946f, 0x0000ee38, 0x59589003, 0x0000205a,\n0x00000000, 0x00009d24, 0x0000830f, 0x5958beb6, 0x0000205a, 0x00000000,\n0x0000a562, 0x000090b7, 0x6170de18, 0x00006172, 0x03000000, 0x02000000,\n0x00006666, 0x0000a7f2, 0x0000590d, 0x0000d013, 0x61705b0a, 0x00006172,\n0x03000000, 0x02000000, 0x00006666, 0x0000a7f2, 0x0000590d, 0x0000d013,\n0x61705b0a, 0x00006172, 0x03000000, 0x02000000, 0x00006666, 0x0000a7f2,\n0x0000590d, 0x0000d013, 0x68635b0a, 0x00006d72, 0x03000000, 0x00000000,\n0x0000d7a3, 0x00007b54, 0x0000cd4c, 0x00009a99, 0x00006626, 0xdbff5c0f,\n0x14004300, 0x0f120f0e, 0x1112140d, 0x14161712, 0x21331f18, 0x1f1c1c1f,\n0x252f2d3f, 0x4e414a33, 0x4841494d, 0x765c5246, 0x6f575264, 0x66484658,\n0x7a6f688c, 0x8485847d, 0x9b91634f, 0x769a808f, 0xff7f8481, 0x014300db,\n0x1f171716, 0x213c1f1b, 0x547f3c21, 0x7f7f5448, 0x7f7f7f7f, 0x7f7f7f7f,\n0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f,\n0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x1100c0ff, 0x005a0008,\n0x2201035a, 0x01110200, 0xff011103, 0x001900c4, 0x01010101, 0x00000101,\n0x00000000, 0x00000000, 0x02030400, 0xc4ff0605, 0x00103600, 0x02010401,\n0x06050304, 0x00000306, 0x01000000, 0x11030200, 0x05211204, 0x13514131,\n0x32146122, 0x23918171, 0x72423424, 0x432515a1, 0xa2827444, 0xc4fff0b3,\n0x01011400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1400c4ff,\n0x00000111, 0x00000000, 0x00000000, 0x00000000, 0xdaff0000, 0x01030c00,\n0x03110200, 0x003f0011, 0x404434fb, 0xbcb4875c, 0x006b38b0, 0x03dcdb12,\n0xf4637f74, 0xe519f153, 0x09d7c5c7, 0x47d29160, 0x20692f18, 0xd06d786a,\n0x53f7f922, 0x17b3e260, 0x2fe8668c, 0x1786a473, 0x9775efbd, 0xe917e43a,\n0x1d0a1bb0, 0x114d0f82, 0x14651110, 0x35f299ed, 0xe9b09680, 0xf5a4fc2f,\n0xe975bd03, 0xb506737b, 0x04444440, 0x5c444044, 0x8e8dedbd, 0xc61adc7b,\n0x689c738b, 0x92a0dc01, 0x58e2b77f, 0x7bfb37d1, 0xb5b5e79d, 0xdbf968cc,\n0xead3f48d, 0x38ed1313, 0xdea77c86, 0xae089963, 0xc743435a, 0x403fe4ce,\n0x392ee1b9, 0xed39e718, 0xd6517e2d, 0x7fc4aa03, 0xb7ad7590, 0x77e7e6ab,\n0x34bf705d, 0x7c77ca53, 0x3dea1299, 0x7fb0bcf4, 0x241fadc5, 0x95a7a816,\n0x13fbe6f3, 0x3182b135, 0xd1b4b224, 0x1b0d48a2, 0xbf9d26d8, 0x82dc3640,\n0x63569a2a, 0xbbd224c3, 0xb9b4714c, 0x1680aec6, 0x3d311856, 0x9b59be91,\n0x09876ca6, 0x61d86564, 0x5a9f06d2, 0x36f51b0d, 0x8682e476, 0xacb1b131,\n0xd1584363, 0x00456b4d, 0x22d2053b, 0x22202202, 0xf3f30222, 0xe3e513e5,\n0xf1e6e1f0, 0x2380496e, 0x5fdcdb68, 0x549b3a27, 0x825e6a6c, 0x6522028b,\n0xaf91ccc8, 0x341cf26b, 0x58dbc4b5, 0xf2289add, 0x0854ddbd, 0x0b9247d5,\n0xf02b5c54, 0x3f917f92, 0xaf56affd, 0xe3760637, 0x05cebde0, 0xed4c76ce,\n0x3cef1b63, 0x7fd8aff8, 0xa0c902ea, 0x7e730d0a, 0x435834f3, 0x26edbb76,\n0xd3ec00fd, 0x76d48efa, 0xa8560f2d, 0x0e766331, 0xd319993c, 0x20243209,\n0x61b7e6c8, 0x998331d0, 0x640ee802, 0x47a3d493, 0xfab99413, 0x4fd871f1,\n0xe9443792, 0x627e051c, 0xd8f3051c, 0x2f28f558, 0x64b51745, 0x1b2bfee3,\n0xb8783953, 0x9900fff6, 0xd8176a65, 0x5a3bf56a, 0x1b331fdb, 0x64b3572f,\n0xd59a3643, 0xaf3abce1, 0x11dd20bd, 0x01111110, 0x5c141011, 0xb3e3083f,\n0xd9b19cc4, 0x17edb20e, 0xa78e9aa1, 0x4ef4de06, 0x00c0bfe7, 0x7e1e442d,\n0x9221fe38, 0xedb5c7dc, 0x6338078a, 0x62495b8d, 0xc11d9b8c, 0x49e81b16,\n0x51d02bea, 0x3eb86d70, 0xc8bc4f13, 0xa10ec758, 0xd40751c0, 0x5ac94710,\n0xc4c8b080, 0x95492b83, 0x975ee696, 0xb7bd96b4, 0x17379cce, 0x82e856e8,\n0xe4c2c82a, 0x398e935f, 0x632437ea, 0x7c9c87d2, 0xdc1ddb7c, 0x65a80a48,\n0x2309f164, 0x51fab475, 0x081dc11d, 0xda45573b, 0x6622f3f3, 0x48f1b214,\n0x676c4edb, 0x243468c7, 0x00ffde60, 0xf1630350, 0xa0076c1d, 0x8f2c0c8b,\n0x2383c26b, 0x361a8f4e, 0xaceea6c9, 0x01dd5a5d, 0x11111011, 0xc3780c04,\n0xbf093ee2, 0xc7972c0b, 0x00d99040, 0xc0c20eb7, 0x659d3bd4, 0x269ab85e,\n0x468e114f, 0x11ad4fdb, 0x83d083d8, 0x8c52f4bd, 0x3c9664bf, 0xa4f9c77c,\n0x22a68876, 0xadb18784, 0xf480be83, 0x885a00ea, 0x220e0a88, 0xc303e4f6,\n0xc866e058, 0xdddbd661, 0xdf395db1, 0xbad64343, 0xe6e65b03, 0x668e81c3,\n0xad619e98, 0xeeb94563, 0xd4d19a3c, 0x3316ce95, 0x9d65f1e1, 0x3bf324fe,\n0x0e468f53, 0xc386068c, 0xa89e24f7, 0xf0c7c73b, 0xb60e391f, 0x1b8827cb,\n0x58601954, 0xc54f90f9, 0x80886ec5, 0x88088888, 0x1b7bb980, 0xb4c71c23,\n0xe6148e39, 0xb12358b8, 0xbd08225d, 0x0ffef085, 0x72b4f025, 0x635ce389,\n0xb90277e4, 0x0d05e000, 0x9bf9dbb9, 0x8e749fbc, 0x7ee6abbf, 0x4ddbf4af,\n0x728df7f3, 0x10b59adf, 0xe3c38f49, 0xb23c638a, 0xdb3d9349, 0x66899a64,\n0x00004dd5, 0xf51b5adf, 0x2220a255, 0xd9ff0f22};\n"
  },
  {
    "path": "queries-encrypted.c",
    "content": "\n/* {{{ Encrypt decrypted */\nstatic int *encr_extra;\nstatic int *encr_ptr;\nstatic int *encr_end;\n\nstatic char *encrypt_decrypted_message (struct tgl_secret_chat *E) {\n  static int msg_key[4];\n  static unsigned char sha1a_buffer[20];\n  static unsigned char sha1b_buffer[20];\n  static unsigned char sha1c_buffer[20];\n  static unsigned char sha1d_buffer[20];\n  int x = *(encr_ptr);  \n  assert (x >= 0 && !(x & 3));\n  TGLC_sha1 ((void *)encr_ptr, 4 + x, sha1a_buffer);\n  memcpy (msg_key, sha1a_buffer + 4, 16);\n \n  static unsigned char buf[64];\n  memcpy (buf, msg_key, 16);\n  memcpy (buf + 16, E->key, 32);\n  TGLC_sha1 (buf, 48, sha1a_buffer);\n  \n  memcpy (buf, E->key + 8, 16);\n  memcpy (buf + 16, msg_key, 16);\n  memcpy (buf + 32, E->key + 12, 16);\n  TGLC_sha1 (buf, 48, sha1b_buffer);\n  \n  memcpy (buf, E->key + 16, 32);\n  memcpy (buf + 32, msg_key, 16);\n  TGLC_sha1 (buf, 48, sha1c_buffer);\n  \n  memcpy (buf, msg_key, 16);\n  memcpy (buf + 16, E->key + 24, 32);\n  TGLC_sha1 (buf, 48, sha1d_buffer);\n\n  static unsigned char key[32];\n  memcpy (key, sha1a_buffer + 0, 8);\n  memcpy (key + 8, sha1b_buffer + 8, 12);\n  memcpy (key + 20, sha1c_buffer + 4, 12);\n\n  static unsigned char iv[32];\n  memcpy (iv, sha1a_buffer + 8, 12);\n  memcpy (iv + 12, sha1b_buffer + 0, 8);\n  memcpy (iv + 20, sha1c_buffer + 16, 4);\n  memcpy (iv + 24, sha1d_buffer + 0, 8);\n\n  TGLC_aes_key aes_key;\n  TGLC_aes_set_encrypt_key (key, 256, &aes_key);\n  TGLC_aes_ige_encrypt ((void *)encr_ptr, (void *)encr_ptr, 4 * (encr_end - encr_ptr), &aes_key, iv, 1);\n  memset (&aes_key, 0, sizeof (aes_key));\n\n  return (void *)msg_key;\n}\n\nstatic void encr_start (void) {\n  encr_extra = packet_ptr;\n  packet_ptr += 1; // str len\n  packet_ptr += 2; // fingerprint\n  packet_ptr += 4; // msg_key\n  packet_ptr += 1; // len\n}\n\n\nstatic void encr_finish (struct tgl_secret_chat *E) {\n  int l = packet_ptr - (encr_extra +  8);\n  while (((packet_ptr - encr_extra) - 3) & 3) {  \n    int t;\n    tglt_secure_random (&t, 4);\n    out_int (t);\n  }\n\n  *encr_extra = ((packet_ptr - encr_extra) - 1) * 4 * 256 + 0xfe;\n  encr_extra ++;\n  *(long long *)encr_extra = E->key_fingerprint;\n  encr_extra += 2;\n  encr_extra[4] = l * 4;\n  encr_ptr = encr_extra + 4;\n  encr_end = packet_ptr;\n  memcpy (encr_extra, encrypt_decrypted_message (E), 16);\n}\n/* }}} */\n\nvoid tgl_do_send_encr_action (struct tgl_state *TLS, struct tgl_secret_chat *E, struct tl_ds_decrypted_message_action *A) {\n  long long t;\n  tglt_secure_random (&t, 8);\n  int date = time (0);\n\n  struct tgl_message_id id = tgl_peer_id_to_random_msg_id (E->id);\n  \n  tgl_peer_id_t from_id = TLS->our_id;\n  bl_do_edit_message_encr (TLS, &id, &from_id, &E->id, &date, NULL, 0, NULL, A, NULL, TGLMF_PENDING | TGLMF_OUT | TGLMF_UNREAD | TGLMF_CREATE | TGLMF_CREATED | TGLMF_ENCRYPTED);\n\n  struct tgl_message *M = tgl_message_get (TLS, &id);\n  assert (M);\n  tgl_do_send_msg (TLS, M, 0, 0);\n}\n\nvoid tgl_do_send_encr_chat_layer (struct tgl_state *TLS, struct tgl_secret_chat *E) {\n  static struct tl_ds_decrypted_message_action A;\n  A.magic = CODE_decrypted_message_action_notify_layer;\n  int layer = TGL_ENCRYPTED_LAYER;\n  A.layer = &layer;\n\n  tgl_do_send_encr_action (TLS, E, &A);\n}\n\nvoid tgl_do_set_encr_chat_ttl (struct tgl_state *TLS, struct tgl_secret_chat *E, int ttl, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  static struct tl_ds_decrypted_message_action A;\n  A.magic = CODE_decrypted_message_action_set_message_t_t_l;\n  A.layer = &ttl;\n\n  tgl_do_send_encr_action (TLS, E, &A);\n}\n\n\n/* {{{ Seng msg (plain text, encrypted) */\nstatic int msg_send_encr_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_message *M = q->extra;\n  assert (M->flags & TGLMF_ENCRYPTED);\n  \n  if (M->flags & TGLMF_PENDING) {\n    bl_do_edit_message_encr (TLS, &M->permanent_id, NULL, NULL,  \n      &M->date,\n      NULL, 0, NULL, NULL, NULL, M->flags ^ TGLMF_PENDING);\n    \n    bl_do_msg_update (TLS, &M->permanent_id);\n  }\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 1, M);\n  }\n  return 0;\n}\n\nstatic int msg_send_encr_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  struct tgl_message *M = q->extra;\n  tgl_peer_t *P = tgl_peer_get (TLS, M->to_id);\n  if (P && P->encr_chat.state != sc_deleted && error_code == 400) {\n    if (strncmp (error, \"ENCRYPTION_DECLINED\", 19) == 0) {\n      bl_do_peer_delete (TLS, P->id);\n    }\n  }\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 0, M);\n  }\n  if (M) {\n    bl_do_message_delete (TLS, &M->permanent_id);\n  }\n  return 0;\n}\n\nstatic struct query_methods msg_send_encr_methods = {\n  .on_answer = msg_send_encr_on_answer,\n  .on_error = msg_send_encr_on_error,\n  .type = TYPE_TO_PARAM(messages_sent_encrypted_message),\n  .name = \"send encrypted (message)\",\n  .timeout = 0,\n};\n/* }}} */\n\nvoid tgl_do_send_encr_msg_action (struct tgl_state *TLS, struct tgl_message *M, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_peer_t *P = tgl_peer_get (TLS, M->to_id);\n  if (!P || P->encr_chat.state != sc_ok) { \n    vlogprintf (E_WARNING, \"Unknown encrypted chat\\n\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n \n  assert (M->flags & TGLMF_ENCRYPTED);\n  clear_packet ();\n  out_int (CODE_messages_send_encrypted_service);\n  out_int (CODE_input_encrypted_chat);\n  out_int (M->permanent_id.peer_id);\n  out_long (M->permanent_id.access_hash);\n  out_long (M->permanent_id.id);\n  encr_start ();\n  out_int (CODE_decrypted_message_layer);\n  out_random (15 + 4 * (rand () % 3));\n  out_int (TGL_ENCRYPTED_LAYER);\n  out_int (2 * P->encr_chat.in_seq_no + (P->encr_chat.admin_id != tgl_get_peer_id (TLS->our_id)));\n  out_int (2 * P->encr_chat.out_seq_no + (P->encr_chat.admin_id == tgl_get_peer_id (TLS->our_id)) - 2);\n  out_int (CODE_decrypted_message_service);\n  out_long (M->permanent_id.id);\n\n  switch (M->action.type) {\n  case tgl_message_action_notify_layer:\n    out_int (CODE_decrypted_message_action_notify_layer);\n    out_int (M->action.layer);\n    break;\n  case tgl_message_action_set_message_ttl:\n    out_int (CODE_decrypted_message_action_set_message_t_t_l);\n    out_int (M->action.ttl);\n    break;\n  case tgl_message_action_request_key:\n    out_int (CODE_decrypted_message_action_request_key);\n    out_long (M->action.exchange_id);\n    out_cstring ((void *)M->action.g_a, 256);\n    break;\n  case tgl_message_action_accept_key:\n    out_int (CODE_decrypted_message_action_accept_key);\n    out_long (M->action.exchange_id);\n    out_cstring ((void *)M->action.g_a, 256);    \n    out_long (M->action.key_fingerprint);\n    break;\n  case tgl_message_action_commit_key:\n    out_int (CODE_decrypted_message_action_commit_key);\n    out_long (M->action.exchange_id);\n    out_long (M->action.key_fingerprint);\n    break;\n  case tgl_message_action_abort_key:\n    out_int (CODE_decrypted_message_action_abort_key);\n    out_long (M->action.exchange_id);\n    break;\n  case tgl_message_action_noop:\n    out_int (CODE_decrypted_message_action_noop);\n    break;\n  default:\n    assert (0);\n  }\n  encr_finish (&P->encr_chat);\n  \n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &msg_send_encr_methods, M, callback, callback_extra);\n}\n\nvoid tgl_do_send_encr_msg (struct tgl_state *TLS, struct tgl_message *M, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (M->flags & TGLMF_SERVICE) {\n    tgl_do_send_encr_msg_action (TLS, M, callback, callback_extra);\n    return;\n  }\n  tgl_peer_t *P = tgl_peer_get (TLS, M->to_id);\n  if (!P || P->encr_chat.state != sc_ok) { \n    vlogprintf (E_WARNING, \"Unknown encrypted chat\\n\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, M);\n    }\n    return;\n  }\n  \n  assert (M->flags & TGLMF_ENCRYPTED);\n\n  clear_packet ();\n  out_int (CODE_messages_send_encrypted);\n  out_int (CODE_input_encrypted_chat);\n  out_int (tgl_get_peer_id (M->to_id));\n  out_long (P->encr_chat.access_hash);\n  out_long (M->permanent_id.id);\n  encr_start ();\n  out_int (CODE_decrypted_message_layer);\n  out_random (15 + 4 * (rand () % 3));\n  out_int (TGL_ENCRYPTED_LAYER);\n  out_int (2 * P->encr_chat.in_seq_no + (P->encr_chat.admin_id != tgl_get_peer_id (TLS->our_id)));\n  out_int (2 * P->encr_chat.out_seq_no + (P->encr_chat.admin_id == tgl_get_peer_id (TLS->our_id)) - 2);\n  out_int (CODE_decrypted_message);\n  out_long (M->permanent_id.id);\n  out_int (P->encr_chat.ttl);\n  out_cstring ((void *)M->message, M->message_len);\n  switch (M->media.type) {\n  case tgl_message_media_none:\n    out_int (CODE_decrypted_message_media_empty);\n    break;\n  case tgl_message_media_geo:\n    out_int (CODE_decrypted_message_media_geo_point);\n    out_double (M->media.geo.latitude);\n    out_double (M->media.geo.longitude);\n    break;\n  default:\n    assert (0);\n  }\n  encr_finish (&P->encr_chat);\n  \n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &msg_send_encr_methods, M, callback, callback_extra);\n}\n\nstatic int mark_read_encr_on_receive (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic int mark_read_encr_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_peer_t *P = q->extra;\n  if (P && P->encr_chat.state != sc_deleted && error_code == 400) {\n    if (strncmp (error, \"ENCRYPTION_DECLINED\", 19) == 0) {\n      bl_do_peer_delete (TLS, P->id);\n    }\n  }\n  return 0;\n}\n\nstatic struct query_methods mark_read_encr_methods = {\n  .on_answer = mark_read_encr_on_receive,\n  .on_error = mark_read_encr_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"read encrypted\",\n  .timeout = 0,\n};\n\nvoid tgl_do_messages_mark_read_encr (struct tgl_state *TLS, tgl_peer_id_t id, long long access_hash, int last_time, void (*callback)(struct tgl_state *TLS, void *callback_extra, int), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_read_encrypted_history);\n  out_int (CODE_input_encrypted_chat);\n  out_int (tgl_get_peer_id (id));\n  out_long (access_hash);\n  out_int (last_time);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &mark_read_encr_methods, tgl_peer_get (TLS, id), callback, callback_extra);\n}\n\nstatic int send_encr_file_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_sent_encrypted_message *DS_MSEM = D; \n  struct tgl_message *M = q->extra;\n\n  if (M->flags & TGLMF_PENDING) {\n    bl_do_edit_message_encr (TLS, &M->permanent_id, NULL, NULL, DS_MSEM->date, \n    NULL, 0, NULL, NULL, DS_MSEM->file, M->flags ^ TGLMF_PENDING);   \n    bl_do_msg_update (TLS, &M->permanent_id);\n  }\n  \n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_message *))q->callback)(TLS, q->callback_extra, 1, M);\n  }\n  return 0;\n}\n\nstatic struct query_methods send_encr_file_methods = {\n  .on_answer = send_encr_file_on_answer,\n  .on_error = msg_send_encr_on_error,\n  .type = TYPE_TO_PARAM(messages_sent_encrypted_message),\n  .name = \"send encrypted (file)\",\n  .timeout = 0,\n};\n\nstatic void send_file_encrypted_end (struct tgl_state *TLS, struct send_file *f, void *callback, void *callback_extra) {\n  out_int (CODE_messages_send_encrypted_file);\n  out_int (CODE_input_encrypted_chat);\n  out_int (tgl_get_peer_id (f->to_id));\n  tgl_peer_t *P = tgl_peer_get (TLS, f->to_id);\n  assert (P);\n  out_long (P->encr_chat.access_hash);\n  long long r;\n  tglt_secure_random (&r, 8);\n  out_long (r);\n  encr_start ();\n  out_int (CODE_decrypted_message_layer);\n  out_random (15 + 4 * (rand () % 3));\n  out_int (TGL_ENCRYPTED_LAYER);\n  out_int (2 * P->encr_chat.in_seq_no + (P->encr_chat.admin_id != tgl_get_peer_id (TLS->our_id)));\n  out_int (2 * P->encr_chat.out_seq_no + (P->encr_chat.admin_id == tgl_get_peer_id (TLS->our_id)));\n  out_int (CODE_decrypted_message);\n  out_long (r);\n  out_int (P->encr_chat.ttl);\n  out_string (\"\");\n  int *save_ptr = packet_ptr;\n  if (f->flags == -1) {\n    out_int (CODE_decrypted_message_media_photo);\n  } else if ((f->flags & TGLDF_VIDEO)) {\n    out_int (CODE_decrypted_message_media_video);\n  } else if ((f->flags & TGLDF_AUDIO)) {\n    out_int (CODE_decrypted_message_media_audio);\n  } else {\n    out_int (CODE_decrypted_message_media_document);\n  }\n  if (f->flags == -1 || !(f->flags & TGLDF_AUDIO)) {\n    out_cstring (\"\", 0);\n    out_int (90);\n    out_int (90);\n  }\n  \n  if (f->flags == -1) {\n    out_int (f->w);\n    out_int (f->h);\n  } else if (f->flags & TGLDF_VIDEO) {\n    out_int (f->duration);\n    out_string (tg_mime_by_filename (f->file_name));\n    out_int (f->w);\n    out_int (f->h);\n  } else if (f->flags & TGLDF_AUDIO) {\n    out_int (f->duration);\n    out_string (tg_mime_by_filename (f->file_name));\n  } else {\n    out_string (\"\");\n    out_string (tg_mime_by_filename (f->file_name));\n    // document\n  }\n  \n  out_int (f->size);\n  out_cstring ((void *)f->key, 32);\n  out_cstring ((void *)f->init_iv, 32);\n \n  int *save_in_ptr = in_ptr;\n  int *save_in_end = in_end;\n\n  in_ptr = save_ptr;\n  in_end = packet_ptr;\n\n  assert (skip_type_any (TYPE_TO_PARAM(decrypted_message_media)) >= 0);\n  assert (in_ptr == in_end);\n  \n  in_ptr = save_ptr;\n  in_end = packet_ptr;\n  \n  struct tl_ds_decrypted_message_media *DS_DMM = fetch_ds_type_decrypted_message_media (TYPE_TO_PARAM (decrypted_message_media));\n  in_end = save_in_ptr;\n  in_ptr = save_in_end;\n\n\n  int date = time (NULL);\n\n\n  encr_finish (&P->encr_chat);\n  if (f->size < (16 << 20)) {\n    out_int (CODE_input_encrypted_file_uploaded);\n  } else {\n    out_int (CODE_input_encrypted_file_big_uploaded);\n  }\n  out_long (f->id);\n  out_int (f->part_num);\n  if (f->size < (16 << 20)) {\n    out_string (\"\");\n  }\n\n  unsigned char md5[16];\n  unsigned char str[64];\n  memcpy (str, f->key, 32);\n  memcpy (str + 32, f->init_iv, 32);\n  TGLC_md5 (str, 64, md5);\n  out_int ((*(int *)md5) ^ (*(int *)(md5 + 4)));\n\n  tfree_secure (f->iv, 32);\n \n  tgl_peer_id_t from_id = TLS->our_id;\n  \n  struct tgl_message_id id = tgl_peer_id_to_msg_id (P->id, r);\n  bl_do_edit_message_encr (TLS, &id, &from_id, &f->to_id, &date, NULL, 0, DS_DMM, NULL, NULL, TGLMF_OUT | TGLMF_UNREAD | TGLMF_ENCRYPTED | TGLMF_CREATE | TGLMF_CREATED);\n\n  free_ds_type_decrypted_message_media (DS_DMM, TYPE_TO_PARAM (decrypted_message_media));\n  struct tgl_message *M = tgl_message_get (TLS, &id);\n  assert (M);\n      \n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_encr_file_methods, M, callback, callback_extra);\n  \n  tfree_str (f->file_name);\n  tfree (f, sizeof (*f));\n\n}\n\nvoid tgl_do_send_location_encr (struct tgl_state *TLS, tgl_peer_id_t peer_id, double latitude, double longitude, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  struct tl_ds_decrypted_message_media TDSM;\n  TDSM.magic = CODE_decrypted_message_media_geo_point;\n  TDSM.latitude = talloc (sizeof (double));\n  *TDSM.latitude = latitude;\n  TDSM.longitude = talloc (sizeof (double));\n  *TDSM.longitude = longitude;\n  \n  int date = time (0);\n\n  tgl_peer_id_t from_id = TLS->our_id;\n\n  tgl_peer_t *P = tgl_peer_get (TLS, peer_id);\n  \n  struct tgl_message_id id = tgl_peer_id_to_random_msg_id (P->id);;\n  bl_do_edit_message_encr (TLS, &id, &from_id, &peer_id, &date, NULL, 0, &TDSM, NULL, NULL, TGLMF_UNREAD | TGLMF_OUT | TGLMF_PENDING | TGLMF_CREATE | TGLMF_CREATED | TGLMF_ENCRYPTED);\n\n  tfree (TDSM.latitude, sizeof (double));\n  tfree (TDSM.longitude, sizeof (double));\n\n  struct tgl_message *M = tgl_message_get (TLS, &id);\n\n  tgl_do_send_encr_msg (TLS, M, callback, callback_extra);\n}\n\n/* {{{ Encr accept */\nstatic int send_encr_accept_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_secret_chat *E = tglf_fetch_alloc_encrypted_chat (TLS, D);\n\n  if (E->state == sc_ok) {\n    tgl_do_send_encr_chat_layer (TLS, E);\n  }\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_secret_chat *))q->callback) (TLS, q->callback_extra, E->state == sc_ok, E);\n  }\n  return 0;\n}\n\nstatic int send_encr_request_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_secret_chat *E = tglf_fetch_alloc_encrypted_chat (TLS, D);\n  \n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_secret_chat *))q->callback) (TLS, q->callback_extra, E->state != sc_deleted, E);\n  }\n  return 0;\n}\n\nstatic int encr_accept_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_peer_t *P = q->extra;\n  if (P && P->encr_chat.state != sc_deleted &&  error_code == 400) {\n    if (strncmp (error, \"ENCRYPTION_DECLINED\", 19) == 0) {\n      bl_do_peer_delete (TLS, P->id);\n    }\n  }\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_secret_chat *))q->callback) (TLS, q->callback_extra, 0, NULL);\n  }\n  return 0;\n}\n\nstatic struct query_methods send_encr_accept_methods  = {\n  .on_answer = send_encr_accept_on_answer,\n  .on_error = encr_accept_on_error,\n  .type = TYPE_TO_PARAM(encrypted_chat),\n  .name = \"send encrypted (chat accept)\",\n  .timeout = 0,\n};\n\nstatic struct query_methods send_encr_request_methods  = {\n  .on_answer = send_encr_request_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(encrypted_chat),\n  .name = \"send encrypted (chat request)\",\n  .timeout = 0,\n};\n\n//int encr_root;\n//unsigned char *encr_prime;\n//int encr_param_version;\n//static TGLC_bn_ctx *ctx;\n\nvoid tgl_do_send_accept_encr_chat (struct tgl_state *TLS, struct tgl_secret_chat *E, unsigned char *random, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra) {\n  int i;\n  int ok = 0;\n  for (i = 0; i < 64; i++) {\n    if (E->key[i]) {\n      ok = 1;\n      break;\n    }\n  }\n  if (ok) { \n    if (callback) {\n      callback (TLS, callback_extra, 1, E);\n    }\n    return; \n  } // Already generated key for this chat\n  assert (E->g_key);\n  assert (TLS->TGLC_bn_ctx);\n  unsigned char random_here[256];\n  tglt_secure_random (random_here, 256);\n  for (i = 0; i < 256; i++) {\n    random[i] ^= random_here[i];\n  }\n  TGLC_bn *b = TGLC_bn_bin2bn (random, 256, 0);\n  ensure_ptr (b);\n  TGLC_bn *g_a = TGLC_bn_bin2bn (E->g_key, 256, 0);\n  ensure_ptr (g_a);\n  assert (tglmp_check_g_a (TLS, TLS->encr_prime_bn, g_a) >= 0);\n  //if (!ctx) {\n  //  ctx = TGLC_bn_ctx_new ();\n  //  ensure_ptr (ctx);\n  //}\n  TGLC_bn *p = TLS->encr_prime_bn;\n  TGLC_bn *r = TGLC_bn_new ();\n  ensure_ptr (r);\n  ensure (TGLC_bn_mod_exp (r, g_a, b, p, TLS->TGLC_bn_ctx));\n  static unsigned char kk[256];\n  memset (kk, 0, sizeof (kk));\n  TGLC_bn_bn2bin (r, kk + (256 - TGLC_bn_num_bytes (r)));\n  static unsigned char sha_buffer[20];\n  TGLC_sha1 (kk, 256, sha_buffer);\n\n  long long fingerprint = *(long long *)(sha_buffer + 12);\n\n  //bl_do_encr_chat_set_key (TLS, E, kk, *(long long *)(sha_buffer + 12));\n  //bl_do_encr_chat_set_sha (TLS, E, sha_buffer);\n\n  int state = sc_ok;\n\n  bl_do_encr_chat (TLS, tgl_get_peer_id (E->id), \n    NULL, NULL, NULL, NULL, \n    kk, NULL, sha_buffer, &state, \n    NULL, NULL, NULL, NULL, NULL, \n    &fingerprint, \n    TGL_FLAGS_UNCHANGED,\n    NULL, 0\n  );\n\n  clear_packet ();\n  out_int (CODE_messages_accept_encryption);\n  out_int (CODE_input_encrypted_chat);\n  out_int (tgl_get_peer_id (E->id));\n  out_long (E->access_hash);\n  \n  ensure (TGLC_bn_set_word (g_a, TLS->encr_root));\n  ensure (TGLC_bn_mod_exp (r, g_a, b, p, TLS->TGLC_bn_ctx));\n  static unsigned char buf[256];\n  memset (buf, 0, sizeof (buf));\n  TGLC_bn_bn2bin (r, buf + (256 - TGLC_bn_num_bytes (r)));\n  out_cstring ((void *)buf, 256);\n\n  out_long (E->key_fingerprint);\n  TGLC_bn_clear_free (b);\n  TGLC_bn_clear_free (g_a);\n  TGLC_bn_clear_free (r);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_encr_accept_methods, E, callback, callback_extra);\n}\n\nvoid tgl_do_create_keys_end (struct tgl_state *TLS, struct tgl_secret_chat *U) {\n  assert (TLS->encr_prime);\n  TGLC_bn *g_b = TGLC_bn_bin2bn (U->g_key, 256, 0);\n  ensure_ptr (g_b);\n  assert (tglmp_check_g_a (TLS, TLS->encr_prime_bn, g_b) >= 0);\n  \n  TGLC_bn *p = TLS->encr_prime_bn;\n  ensure_ptr (p);\n  TGLC_bn *r = TGLC_bn_new ();\n  ensure_ptr (r);\n  TGLC_bn *a = TGLC_bn_bin2bn ((void *)U->key, 256, 0);\n  ensure_ptr (a);\n  ensure (TGLC_bn_mod_exp (r, g_b, a, p, TLS->TGLC_bn_ctx));\n\n  unsigned char *t = talloc (256);\n  memcpy (t, U->key, 256);\n  \n  memset (U->key, 0, sizeof (U->key));\n  TGLC_bn_bn2bin (r, (void *)(((char *)(U->key)) + (256 - TGLC_bn_num_bytes (r))));\n  \n  static unsigned char sha_buffer[20];\n  TGLC_sha1 ((void *)U->key, 256, sha_buffer);\n  long long k = *(long long *)(sha_buffer + 12);\n  if (k != U->key_fingerprint) {\n    vlogprintf (E_WARNING, \"Key fingerprint mismatch (my 0x%\" INT64_PRINTF_MODIFIER \"x 0x%\" INT64_PRINTF_MODIFIER \"x)\\n\", (unsigned long long)k, (unsigned long long)U->key_fingerprint);\n    U->state = sc_deleted;\n  }\n\n  memcpy (U->first_key_sha, sha_buffer, 20);\n  tfree_secure (t, 256);\n  \n  TGLC_bn_clear_free (g_b);\n  TGLC_bn_clear_free (r);\n  TGLC_bn_clear_free (a);\n}\n\nvoid tgl_do_send_create_encr_chat (struct tgl_state *TLS, void *x, unsigned char *random, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra) {\n  int user_id = (long)x;\n  int i;\n  unsigned char random_here[256];\n  tglt_secure_random (random_here, 256);\n  for (i = 0; i < 256; i++) {\n    random[i] ^= random_here[i];\n  }\n  TGLC_bn *a = TGLC_bn_bin2bn (random, 256, 0);\n  ensure_ptr (a);\n  TGLC_bn *p = TGLC_bn_bin2bn (TLS->encr_prime, 256, 0);\n  ensure_ptr (p);\n \n  TGLC_bn *g = TGLC_bn_new ();\n  ensure_ptr (g);\n\n  ensure (TGLC_bn_set_word (g, TLS->encr_root));\n\n  TGLC_bn *r = TGLC_bn_new ();\n  ensure_ptr (r);\n\n  ensure (TGLC_bn_mod_exp (r, g, a, p, TLS->TGLC_bn_ctx));\n\n  TGLC_bn_clear_free (a);\n\n  static char g_a[256];\n  memset (g_a, 0, 256);\n\n  TGLC_bn_bn2bin (r, (void *)(g_a + (256 - TGLC_bn_num_bytes (r))));\n  \n  int t = rand ();\n  while (tgl_peer_get (TLS, TGL_MK_ENCR_CHAT (t))) {\n    t = rand ();\n  }\n\n  //bl_do_encr_chat_init (TLS, t, user_id, (void *)random, (void *)g_a);\n  \n  int state = sc_waiting;\n  int our_id = tgl_get_peer_id (TLS->our_id);\n  bl_do_encr_chat (TLS, t, NULL, NULL, &our_id, &user_id, random, NULL, NULL, &state, NULL, NULL, NULL, NULL, NULL, NULL, TGLPF_CREATE | TGLPF_CREATED, NULL, 0);\n\n  \n  tgl_peer_t *_E = tgl_peer_get (TLS, TGL_MK_ENCR_CHAT (t));\n  assert (_E);\n  struct tgl_secret_chat *E = &_E->encr_chat;\n  \n  clear_packet ();\n  out_int (CODE_messages_request_encryption);\n  tgl_peer_t *U = tgl_peer_get (TLS, TGL_MK_USER (E->user_id));\n  assert (U);\n  \n  out_int (CODE_input_user);\n  out_int (E->user_id);\n  out_long (U ? U->user.access_hash : 0);\n\n  out_int (tgl_get_peer_id (E->id));\n  out_cstring (g_a, 256);\n  //write_secret_chat_file ();\n  \n  TGLC_bn_clear_free (g);\n  TGLC_bn_clear_free (p);\n  TGLC_bn_clear_free (r);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_encr_request_methods, E, callback, callback_extra);\n}\n\nstatic int send_encr_discard_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_secret_chat *E = q->extra;\n\n  bl_do_peer_delete (TLS, E->id);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_secret_chat *))q->callback) (TLS, q->callback_extra, 1, E);\n  }\n  return 0;\n}\n\nstatic struct query_methods send_encr_discard_methods  = {\n  .on_answer = send_encr_discard_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"send encrypted (chat discard)\",\n  .timeout = 0,\n};\n\nvoid tgl_do_discard_secret_chat (struct tgl_state *TLS, struct tgl_secret_chat *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra) {\n  assert (E);\n  assert (tgl_get_peer_id (E->id) > 0);\n\n  if (E->state == sc_deleted || E->state == sc_none) {\n    if (callback) {\n      callback (TLS, callback_extra, 0, E);\n    }\n    return;\n  }\n\n  clear_packet ();\n  out_int (CODE_messages_discard_encryption);\n  out_int (tgl_get_peer_id (E->id));\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_encr_discard_methods, E, callback, callback_extra);\n}\n\nstatic int get_dh_config_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_dh_config *DS_MDC = D;\n\n  if (DS_MDC->magic == CODE_messages_dh_config) {\n    assert (DS_MDC->p->len == 256);\n    bl_do_set_dh_params (TLS, DS_LVAL (DS_MDC->g), (void *)DS_MDC->p->data, DS_LVAL (DS_MDC->version));   \n  } else {\n    assert (TLS->encr_param_version);\n  }\n  unsigned char *random = talloc (256);\n  assert (DS_MDC->random->len == 256);\n  memcpy (random, DS_MDC->random->data, 256);\n  \n  if (q->extra) {\n    void **x = q->extra;\n    ((void (*)(struct tgl_state *, void *, void *, void *, void *))(*x))(TLS, x[1], random, q->callback, q->callback_extra);\n    tfree (x, 2 * sizeof (void *));\n    tfree_secure (random, 256);\n  } else {\n    tfree_secure (random, 256);\n  }\n  return 0;\n}\n\nstatic struct query_methods get_dh_config_methods  = {\n  .on_answer = get_dh_config_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(messages_dh_config),\n  .name = \"dh config\",\n  .timeout = 0,\n};\n\nvoid tgl_do_accept_encr_chat_request (struct tgl_state *TLS, struct tgl_secret_chat *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra) {\n  if (E->state != sc_request) {\n    if (callback) {\n      callback (TLS, callback_extra, 0, E);\n    }\n    return;\n  }\n  assert (E->state == sc_request);\n  \n  clear_packet ();\n  out_int (CODE_messages_get_dh_config);\n  out_int (TLS->encr_param_version);\n  out_int (256);\n  void **x = talloc (2 * sizeof (void *));\n  x[0] = tgl_do_send_accept_encr_chat;\n  x[1] = E;\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_dh_config_methods, x, callback, callback_extra);\n}\n\nvoid tgl_do_create_encr_chat_request (struct tgl_state *TLS, int user_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_get_dh_config);\n  out_int (TLS->encr_param_version);\n  out_int (256);\n  void **x = talloc (2 * sizeof (void *));\n  x[0] = tgl_do_send_create_encr_chat;\n  x[1] = (void *)(long)(user_id);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_dh_config_methods, x, callback, callback_extra);\n}\n/* }}} */\n"
  },
  {
    "path": "queries.c",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define _FILE_OFFSET_BITS 64\n#include <errno.h>\n#include <string.h>\n#include <memory.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#ifndef WIN32\n#include <sys/utsname.h>\n#endif\n\n#include \"mtproto-client.h\"\n#include \"queries.h\"\n#include \"tree.h\"\n#include \"mtproto-common.h\"\n//#include \"telegram.h\"\n#include \"tgl-structures.h\"\n//#include \"interface.h\"\n//#include \"net.h\"\n#include \"crypto/bn.h\"\n#include \"crypto/rand.h\"\n#include \"crypto/aes.h\"\n#include \"crypto/sha.h\"\n#include \"crypto/md5.h\"\n\n#include \"no-preview.h\"\n#include \"tgl-binlog.h\"\n#include \"updates.h\"\n#include \"auto.h\"\n#include \"auto/auto-types.h\"\n#include \"auto/auto-skip.h\"\n#include \"auto/auto-free-ds.h\"\n#include \"auto/auto-fetch-ds.h\"\n#include \"auto/auto-print-ds.h\"\n#include \"tgl.h\"\n#include \"tg-mime-types.h\"\n#include \"mtproto-utils.h\"\n#include \"tgl-methods-in.h\"\n#include \"tgl-queries.h\"\n\n#ifndef EPROTO\n// BSD doesn't define EPROTO, even though it is POSIX:\n// https://lists.freebsd.org/pipermail/freebsd-standards/2003-June/000124.html\n#define EPROTO EIO\n#endif\n\n#ifndef PATH_MAX\n#define PATH_MAX 4096\n#endif\n\n\n#ifndef O_BINARY\n#define O_BINARY 0\n#endif\n\nstatic void out_peer_id (struct tgl_state *TLS, tgl_peer_id_t id);\nstatic struct query_methods send_msgs_methods;\n\nstruct messages_send_extra {\n  int multi;\n  int count;\n  tgl_message_id_t id;\n  tgl_message_id_t *list;\n};\n#define QUERY_TIMEOUT 6.0\n\nstruct send_file {\n  int fd;\n  long long size;\n  long long offset;\n  int part_num;\n  int part_size;\n  long long id;\n  long long thumb_id;\n  tgl_peer_id_t to_id;\n  int flags;\n  char *file_name;\n  int encr;\n  //int avatar;\n  tgl_peer_id_t avatar;\n  int reply;\n  unsigned char *iv;\n  unsigned char *init_iv;\n  unsigned char *key;\n  int w;\n  int h;\n  int duration;\n  char *caption;\n  int channel;\n};\n\n#define memcmp8(a,b) memcmp ((a), (b), 8)\nDEFINE_TREE (query, struct query *, memcmp8, 0) ;\n\nstatic int mystreq1 (const char *a, const char *b, int l) {\n  if ((int)strlen (a) != l) { return 1; }\n  return memcmp (a, b, l);\n}\n\n/* {{{ COMMON */\n\nstruct query *tglq_query_get (struct tgl_state *TLS, long long id) {\n  return tree_lookup_query (TLS->queries_tree, (void *)&id);\n}\n\nstatic int alarm_query (struct tgl_state *TLS, struct query *q) {\n  assert (q);\n  vlogprintf (E_DEBUG - 2, \"Alarm query %\" INT64_PRINTF_MODIFIER \"d (type '%s')\\n\", q->msg_id, q->methods->name);\n\n  TLS->timer_methods->insert (q->ev, q->methods->timeout ? q->methods->timeout : QUERY_TIMEOUT);\n\n  if (q->session && q->session_id && q->DC && q->DC->sessions[0] == q->session && q->session->session_id == q->session_id) {\n    clear_packet ();\n    out_int (CODE_msg_container);\n    out_int (1);\n    out_long (q->msg_id);\n    out_int (q->seq_no);\n    out_int (4 * q->data_len);\n    out_ints (q->data, q->data_len);\n\n    tglmp_encrypt_send_message (TLS, q->session->c, packet_buffer, packet_ptr - packet_buffer, q->flags & QUERY_FORCE_SEND);\n  } else {\n    q->flags &= ~QUERY_ACK_RECEIVED;\n    if (tree_lookup_query (TLS->queries_tree, q)) {\n      TLS->queries_tree = tree_delete_query (TLS->queries_tree, q);\n    }\n    q->session = q->DC->sessions[0];\n    long long old_id = q->msg_id;\n    q->msg_id = tglmp_encrypt_send_message (TLS, q->session->c, q->data, q->data_len, (q->flags & QUERY_FORCE_SEND) | 1);\n    vlogprintf (E_NOTICE, \"Resent query #%\" INT64_PRINTF_MODIFIER \"d as #%\" INT64_PRINTF_MODIFIER \"d of size %d to DC %d\\n\", old_id, q->msg_id, 4 * q->data_len, q->DC->id);\n    TLS->queries_tree = tree_insert_query (TLS->queries_tree, q, rand ());\n    q->session_id = q->session->session_id;\n    if (!(q->session->dc->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) {\n      q->session_id = 0;\n    }\n  }\n  return 0;\n}\n\nvoid tglq_regen_query (struct tgl_state *TLS, long long id) {\n  struct query *q = tglq_query_get (TLS, id);\n  if (!q) { return; }\n  q->flags &= ~QUERY_ACK_RECEIVED;\n\n  if (!(q->session && q->session_id && q->DC && q->DC->sessions[0] == q->session && q->session->session_id == q->session_id)) {\n    q->session_id = 0;\n  } else {\n    if (!(q->session->dc->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) {\n      q->session_id = 0;\n    }\n  }\n  vlogprintf (E_NOTICE, \"regen query %\" INT64_PRINTF_MODIFIER \"d\\n\", id);\n  TLS->timer_methods->insert (q->ev, 0.001);\n}\n\nstruct regen_tmp_struct {\n  struct tgl_state *TLS;\n  struct tgl_dc *DC;\n  struct tgl_session *S;\n};\n\nvoid tglq_regen_query_from_old_session (struct query *q, void *ex) {\n  struct regen_tmp_struct *T = ex;\n  struct tgl_state *TLS = T->TLS;\n  if (q->DC == T->DC) {\n    if (!q->session || q->session_id != T->S->session_id || q->session != T->S) {\n      q->session_id = 0;\n      vlogprintf (E_NOTICE, \"regen query from old session %\" INT64_PRINTF_MODIFIER \"d\\n\", q->msg_id);\n      TLS->timer_methods->insert (q->ev, q->methods->timeout ? 0.001 : 0.1);\n    }\n  }\n}\n\nvoid tglq_regen_queries_from_old_session (struct tgl_state *TLS, struct tgl_dc *DC, struct tgl_session *S) {\n  struct regen_tmp_struct T;\n  T.TLS = TLS;\n  T.DC = DC;\n  T.S = S;\n  tree_act_ex_query (TLS->queries_tree, tglq_regen_query_from_old_session, &T);\n}\n\nvoid tglq_query_restart (struct tgl_state *TLS, long long id) {\n  struct query *q = tglq_query_get (TLS, id);\n  if (q) {\n    vlogprintf (E_NOTICE, \"restarting query %\" INT64_PRINTF_MODIFIER \"d\\n\", id);\n    TLS->timer_methods->remove (q->ev);\n    alarm_query (TLS, q);\n  }\n}\n\nstatic void alarm_query_gateway (struct tgl_state *TLS, void *arg) {\n  alarm_query (TLS, arg);\n}\n\n\nstruct query *tglq_send_query_ex (struct tgl_state *TLS, struct tgl_dc *DC, int ints, void *data, struct query_methods *methods, void *extra, void *callback, void *callback_extra, int flags) {\n  assert (DC);\n  assert (DC->auth_key_id);\n  if (!DC->sessions[0]) {\n    tglmp_dc_create_session (TLS, DC);\n  }\n  vlogprintf (E_DEBUG, \"Sending query of size %d to DC %d\\n\", 4 * ints, DC->id);\n  struct query *q = talloc0 (sizeof (*q));\n  q->data_len = ints;\n  q->data = talloc (4 * ints);\n  memcpy (q->data, data, 4 * ints);\n  q->msg_id = tglmp_encrypt_send_message (TLS, DC->sessions[0]->c, data, ints, 1 | (flags & QUERY_FORCE_SEND));\n  q->session = DC->sessions[0];\n  q->seq_no = q->session->seq_no - 1;\n  q->session_id = q->session->session_id;\n  if (!(DC->flags & 4) && !(flags & QUERY_FORCE_SEND)) {\n    q->session_id = 0;\n  }\n  vlogprintf (E_DEBUG, \"Msg_id is %\" INT64_PRINTF_MODIFIER \"d %p\\n\", q->msg_id, q);\n  vlogprintf (E_NOTICE, \"Sent query #%\" INT64_PRINTF_MODIFIER \"d of size %d to DC %d\\n\", q->msg_id, 4 * ints, DC->id);\n  q->methods = methods;\n  q->type = methods->type;\n  q->DC = DC;\n  q->flags = flags & QUERY_FORCE_SEND;\n  if (TLS->queries_tree) {\n    vlogprintf (E_DEBUG + 2, \"%\" INT64_PRINTF_MODIFIER \"d %\" INT64_PRINTF_MODIFIER \"d\\n\", q->msg_id, TLS->queries_tree->x->msg_id);\n  }\n  TLS->queries_tree = tree_insert_query (TLS->queries_tree, q, rand ());\n\n  q->ev = TLS->timer_methods->alloc (TLS, alarm_query_gateway, q);\n  TLS->timer_methods->insert (q->ev, q->methods->timeout ? q->methods->timeout : QUERY_TIMEOUT);  \n\n  q->extra = extra;\n  q->callback = callback;\n  q->callback_extra = callback_extra;\n  TLS->active_queries ++;\n  return q;\n}\n\nstruct query *tglq_send_query (struct tgl_state *TLS, struct tgl_dc *DC, int ints, void *data, struct query_methods *methods, void *extra, void *callback, void *callback_extra) {\n  return tglq_send_query_ex (TLS, DC, ints, data, methods, extra, callback, callback_extra, 0);\n}\n\nstatic int fail_on_error (struct tgl_state *TLS, struct query *q, int error_code, int l, const char *error) {\n  vlogprintf (E_ERROR, \"error #%d: %.*s\\n\", error_code, l, error);\n  assert (0);\n  return 0;\n}\n\nvoid tglq_query_ack (struct tgl_state *TLS, long long id) {\n  struct query *q = tglq_query_get (TLS, id);\n  if (q && !(q->flags & QUERY_ACK_RECEIVED)) {\n    assert (q->msg_id == id);\n    q->flags |= QUERY_ACK_RECEIVED;\n    TLS->timer_methods->remove (q->ev);\n  }\n}\n\nvoid tglq_query_delete (struct tgl_state *TLS, long long id) {\n  struct query *q = tglq_query_get (TLS, id);\n  if (!q) {\n    return;\n  }\n  if (!(q->flags & QUERY_ACK_RECEIVED)) {\n    TLS->timer_methods->remove (q->ev);\n  }\n  TLS->queries_tree = tree_delete_query (TLS->queries_tree, q);\n  tfree (q->data, q->data_len * 4);\n  TLS->timer_methods->free (q->ev);\n  TLS->active_queries --;\n}\n\nstatic void resend_query_cb (struct tgl_state *TLS, void *_q, int success);\n\nvoid tglq_free_query (struct query *q, void *extra) {\n  struct tgl_state *TLS = extra;\n  if (!(q->flags & QUERY_ACK_RECEIVED)) {\n    TLS->timer_methods->remove (q->ev);\n  }\n  tfree (q->data, q->data_len * 4);\n  TLS->timer_methods->free (q->ev);\n}\n\nvoid tglq_query_free_all (struct tgl_state *TLS) {\n  tree_act_ex_query (TLS->queries_tree, tglq_free_query, TLS);\n  TLS->queries_tree = tree_clear_query (TLS->queries_tree);\n}\n\nint tglq_query_error (struct tgl_state *TLS, long long id) {\n  assert (fetch_int () == CODE_rpc_error);\n  int error_code = fetch_int ();\n  int error_len = prefetch_strlen ();\n  char *error = fetch_str (error_len);\n  struct query *q = tglq_query_get (TLS, id);\n  if (!q) {\n    vlogprintf (E_WARNING, \"error for query '%s' #%\" INT64_PRINTF_MODIFIER \"d: #%d :%.*s\\n\", q->methods->name, id, error_code, error_len, error);\n    vlogprintf (E_WARNING, \"No such query\\n\");\n  } else {\n    if (!(q->flags & QUERY_ACK_RECEIVED)) {\n      TLS->timer_methods->remove (q->ev);\n    }\n    TLS->queries_tree = tree_delete_query (TLS->queries_tree, q);\n    int res = 0;\n\n    int error_handled = 0;\n\n    switch (error_code) {\n    case 303:\n      // migrate\n      {\n        int offset = -1;\n        if (error_len >= 15 && !memcmp (error, \"PHONE_MIGRATE_\", 14)) {\n          offset = 14;\n        }\n        if (error_len >= 17 && !memcmp (error, \"NETWORK_MIGRATE_\", 16)) {\n          offset = 16;\n        }\n        if (error_len >= 14 && !memcmp (error, \"USER_MIGRATE_\", 13)) {\n          offset = 13;\n        }\n        if (offset >= 0) {\n          int i = 0;\n          while (offset < error_len && error[offset] >= '0' && error[offset] <= '9') {\n            i = i * 10 + error[offset] - '0';\n            offset ++;\n          }\n          if (i > 0 && i < TGL_MAX_DC_NUM) {\n            bl_do_set_working_dc (TLS, i);\n            q->flags &= ~QUERY_ACK_RECEIVED;\n            //q->session_id = 0;\n            //struct tgl_dc *DC = q->DC;\n            //if (!(DC->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) {\n            q->session_id = 0;\n            //}\n            q->DC = TLS->DC_working;\n            TLS->timer_methods->insert (q->ev, 0);\n            error_handled = 1;\n            res = 1;\n          }\n        }\n      }\n      break;\n    case 400:\n      // nothing to handle\n      // bad user input probably\n      break;\n    case 401:\n      if (!mystreq1 (\"SESSION_PASSWORD_NEEDED\", error, error_len)) {\n        if (!(TLS->locks & TGL_LOCK_PASSWORD)) {\n          TLS->locks |= TGL_LOCK_PASSWORD;\n          tgl_do_check_password (TLS, resend_query_cb, q);\n        }\n        res = 1;\n        error_handled = 1;\n      }\n      break;\n    case 403:\n      // privacy violation\n      break;\n    case 404:\n      // not found\n      break;\n    case 420:\n      // flood\n    case 500:\n      // internal error\n    default:\n      // anything else. Treated as internal error\n      {\n        int wait;\n        if (strncmp (error, \"FLOOD_WAIT_\", 11)) {\n          if (error_code == 420) {\n            vlogprintf (E_ERROR, \"error = '%s'\\n\", error);\n          }\n          wait = 10;\n        } else {\n          wait = atoll (error + 11);\n        }\n        q->flags &= ~QUERY_ACK_RECEIVED;\n        TLS->timer_methods->insert (q->ev, wait);\n        struct tgl_dc *DC = q->DC;\n        if (!(DC->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) {\n          q->session_id = 0;\n        }\n        error_handled = 1;\n      }\n      break;\n    }\n\n    if (error_handled) {\n      vlogprintf (E_DEBUG - 2, \"error for query #%\" INT64_PRINTF_MODIFIER \"d: #%d %.*s (HANDLED)\\n\", id, error_code, error_len, error);\n    } else {\n      vlogprintf (E_WARNING, \"error for query '%s' #%\" INT64_PRINTF_MODIFIER \"d: #%d %.*s\\n\", q->methods->name, id, error_code, error_len, error);\n      if (q->methods && q->methods->on_error) {\n        res = q->methods->on_error (TLS, q, error_code, error_len, error);\n      }\n    }\n\n    if (res <= 0) {\n      tfree (q->data, q->data_len * 4);\n      TLS->timer_methods->free (q->ev);\n    }\n\n    if (res == -11) {\n      TLS->active_queries --;\n      return -1;\n\n    }\n  }\n  TLS->active_queries --;\n  return 0;\n}\n\n#define MAX_PACKED_SIZE (1 << 24)\nstatic int packed_buffer[MAX_PACKED_SIZE / 4];\n\nint tglq_query_result (struct tgl_state *TLS, long long id) {\n  vlogprintf (E_DEBUG, \"result for query #%\" INT64_PRINTF_MODIFIER \"d. Size %ld bytes\\n\", id, (long)4 * (in_end - in_ptr));\n  int op = prefetch_int ();\n  int *end = 0;\n  int *eend = 0;\n  if (op == CODE_gzip_packed) {\n    fetch_int ();\n    int l = prefetch_strlen ();\n    char *s = fetch_str (l);\n    int total_out = tgl_inflate (s, l, packed_buffer, MAX_PACKED_SIZE);\n    vlogprintf (E_DEBUG, \"inflated %d bytes\\n\", total_out);\n    end = in_ptr;\n    eend = in_end;\n    in_ptr = packed_buffer;\n    in_end = in_ptr + total_out / 4;\n  }\n  struct query *q = tglq_query_get (TLS, id);\n  if (!q) {\n    vlogprintf (E_WARNING, \"No such query\\n\");\n    in_ptr = in_end;\n  } else {\n    if (!(q->flags & QUERY_ACK_RECEIVED)) {\n      TLS->timer_methods->remove (q->ev);\n    }\n    TLS->queries_tree = tree_delete_query (TLS->queries_tree, q);\n    if (q->methods && q->methods->on_answer) {\n      assert (q->type);\n      int *save = in_ptr;\n      vlogprintf (E_DEBUG, \"in_ptr = %p, end_ptr = %p\\n\", in_ptr, in_end);\n      if (skip_type_any (q->type) < 0) {\n        vlogprintf (E_ERROR, \"Skipped %ld int out of %ld (type %s) (query type %s)\\n\", (long)(in_ptr - save), (long)(in_end - save), q->type->type->id, q->methods->name);\n        vlogprintf (E_ERROR, \"0x%08x 0x%08x 0x%08x 0x%08x\\n\", *(save - 1), *(save), *(save + 1), *(save + 2));\n        assert (0);\n      }\n\n      assert (in_ptr == in_end);\n      in_ptr = save;\n\n      void *DS = fetch_ds_type_any (q->type);\n      assert (DS);\n\n      q->methods->on_answer (TLS, q, DS);\n      free_ds_type_any (DS, q->type);\n\n      assert (in_ptr == in_end);\n    }\n    tfree (q->data, 4 * q->data_len);\n    TLS->timer_methods->free (q->ev);\n    tfree (q, sizeof (*q));\n\n  }\n  if (end) {\n    in_ptr = end;\n    in_end = eend;\n  }\n  TLS->active_queries --;\n  return 0;\n}\n\nstatic void out_random (int n) {\n  assert (n <= 32);\n  static char buf[32];\n  tglt_secure_random (buf, n);\n  out_cstring (buf, n);\n}\n\nint allow_send_linux_version;\nvoid tgl_do_insert_header (struct tgl_state *TLS) {\n  out_int (CODE_invoke_with_layer);\n  out_int (TGL_SCHEME_LAYER);\n  out_int (CODE_init_connection);\n  out_int (TLS->app_id);\n#ifndef WIN32\n  if (allow_send_linux_version) {\n    struct utsname st;\n    uname (&st);\n    out_string (st.machine);\n    static char buf[4096];\n    tsnprintf (buf, sizeof (buf) - 1, \"%.999s %.999s %.999s\", st.sysname, st.release, st.version);\n    out_string (buf);\n    tsnprintf (buf, sizeof (buf) - 1, \"%s (TGL %s)\", TLS->app_version, TGL_VERSION);\n    out_string (buf);\n    out_string (\"En\");\n  } else {\n    out_string (\"x86\");\n    out_string (\"Linux\");\n    static char buf[4096];\n    tsnprintf (buf, sizeof (buf) - 1, \"%s (TGL %s)\", TLS->app_version, TGL_VERSION);\n    out_string (buf);\n    out_string (\"en\");\n  }\n#else\n    out_string (\"x86\");\n    out_string (\"Windows\");\n    static char buf[4096];\n    tsnprintf (buf, sizeof (buf) - 1, \"%s (TGL %s)\", TLS->app_version, TGL_VERSION);\n    out_string (buf);\n    out_string (\"en\");\n#endif\n}\n\nvoid tgl_set_query_error (struct tgl_state *TLS, int error_code, const char *format, ...) __attribute__ ((format (printf, 3, 4)));\nvoid tgl_set_query_error (struct tgl_state *TLS, int error_code, const char *format, ...) {\n  static char s[1001];\n\n  va_list ap;\n  va_start (ap, format);\n  vsnprintf (s, 1000, format, ap);\n  va_end (ap);\n\n  if (TLS->error) {\n    tfree_str (TLS->error);\n  }\n  TLS->error = tstrdup (s);\n  TLS->error_code = error_code;\n}\n/* }}} */\n\n/* {{{ Default on error */\n\nstatic int q_void_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int))(q->callback))(TLS, q->callback_extra, 0);\n  }\n  return 0;\n}\n\nstatic int q_ptr_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int, void *))(q->callback))(TLS, q->callback_extra, 0, NULL);\n  }\n  return 0;\n}\n\nstatic int q_list_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int, int, void *))(q->callback))(TLS, q->callback_extra, 0, 0, NULL);\n  }\n  return 0;\n}\n/* }}} */\n\n#include \"queries-encrypted.c\"\n\nstatic void increase_ent (int *ent_size, int **ent, int s) {\n  *ent = trealloc (*ent, (*ent_size) * 4, (*ent_size) * 4 + 4 * s);\n  (*ent_size) +=s;\n}\n\nint utf8_len (const char *s, int len) {\n  int i;\n  int r = 0;\n  for (i = 0; i < len; i++) {\n    if ((s[i] & 0xc0) != 0x80) {\n      r ++;\n    }\n  }\n  return r;\n}\n\nstatic char *process_html_text (struct tgl_state *TLS, const char *text, int text_len, int *ent_size, int **ent) {\n  char *new_text = talloc (2 * text_len + 1);\n  int stpos[100];\n  int sttype[100];\n  int stp = 0;\n  int p;\n  int cur_p = 0;\n  *ent = talloc (8);\n  *ent_size = 2;\n  (*ent)[0] = CODE_vector;\n  (*ent)[1] = 0;\n  int total = 0;\n  for (p = 0; p < text_len; p++) {\n    assert (cur_p <= 2 * text_len);\n    if (text[p] == '<') {\n      if (stp == 99) {\n        tgl_set_query_error (TLS, EINVAL, \"Too nested tags...\");\n        tfree (new_text, 2 * text_len + 1);\n        return NULL;\n      }\n      int old_p = *ent_size;\n      if (text_len - p >= 3 && !memcmp (text + p, \"<b>\", 3)) {\n        increase_ent (ent_size, ent, 3);\n        total ++;\n        (*ent)[old_p] = CODE_message_entity_bold;\n        (*ent)[old_p + 1] = utf8_len (new_text, cur_p);\n        stpos[stp] = old_p + 2;\n        sttype[stp] = 0;\n        stp ++;\n        p += 2;\n        continue;\n      }\n      if (text_len - p >= 4 && !memcmp (text + p, \"</b>\", 4)) {\n        if (stp == 0 || sttype[stp - 1]  != 0) {\n          tgl_set_query_error (TLS, EINVAL, \"Invalid tag nest\");\n          tfree (new_text, 2 * text_len + 1);\n          return NULL;\n        }\n        (*ent)[stpos[stp - 1]] = utf8_len (new_text, cur_p) - (*ent)[stpos[stp - 1] - 1];\n        stp --;\n        p += 3;\n        continue;\n      }\n      if (text_len - p >= 3 && !memcmp (text + p, \"<i>\", 3)) {\n        increase_ent (ent_size, ent, 3);\n        total ++;\n        (*ent)[old_p] = CODE_message_entity_italic;\n        (*ent)[old_p + 1] = utf8_len (new_text, cur_p);\n        stpos[stp] = old_p + 2;\n        sttype[stp] = 1;\n        stp ++;\n        p += 2;\n        continue;\n      }\n      if (text_len - p >= 4 && !memcmp (text + p, \"</i>\", 4)) {\n        if (stp == 0 || sttype[stp - 1]  != 1) {\n          tgl_set_query_error (TLS, EINVAL, \"Invalid tag nest\");\n          tfree (new_text, 2 * text_len + 1);\n          return NULL;\n        }\n        (*ent)[stpos[stp - 1]] = utf8_len (new_text, cur_p) - (*ent)[stpos[stp - 1] - 1];\n        stp --;\n        p += 3;\n        continue;\n      }\n      if (text_len - p >= 6 && !memcmp (text + p, \"<code>\", 6)) {\n        increase_ent (ent_size, ent, 3);\n        total ++;\n        (*ent)[old_p] = CODE_message_entity_code;\n        (*ent)[old_p + 1] = utf8_len (new_text, cur_p);\n        stpos[stp] = old_p + 2;\n        sttype[stp] = 2;\n        stp ++;\n        p += 5;\n        continue;\n      }\n      if (text_len - p >= 7 && !memcmp (text + p, \"</code>\", 7)) {\n        if (stp == 0 || sttype[stp - 1]  != 2) {\n          tgl_set_query_error (TLS, EINVAL, \"Invalid tag nest\");\n          tfree (new_text, 2 * text_len + 1);\n          return NULL;\n        }\n        (*ent)[stpos[stp - 1]] = utf8_len (new_text, cur_p) - (*ent)[stpos[stp - 1] - 1];\n        stp --;\n        p += 6;\n        continue;\n      }\n      if (text_len - p >= 9 && !memcmp (text + p, \"<a href=\\\"\", 9)) {\n        int pp = p + 9;\n        while (pp < text_len && text[pp] != '\"') {\n          pp ++;\n        }\n        if (pp == text_len || pp == text_len - 1 || text[pp + 1] != '>') {\n          tgl_set_query_error (TLS, EINVAL, \"<a> tag did not close\");\n          tfree (new_text, 2 * text_len + 1);\n          return NULL;\n        }\n        int len = pp - p - 9;\n        assert (len >= 0);\n        if (len >= 250) {\n          tgl_set_query_error (TLS, EINVAL, \"too long link\");\n          tfree (new_text, 2 * text_len + 1);\n          return NULL;\n        }\n\n        increase_ent (ent_size, ent, 3 + (len + 1 + ((-len-1) & 3)) / 4);\n        total ++;\n        (*ent)[old_p] = CODE_message_entity_text_url;\n        (*ent)[old_p + 1] = utf8_len (new_text, cur_p);\n        stpos[stp] = old_p + 2;\n        sttype[stp] = 3;\n        stp ++;\n\n        unsigned char *r = (void *)((*ent) + old_p + 3);\n        r[0] = len;\n        memcpy (r + 1, text + p + 9, len);\n        memset (r + 1 + len, 0, (-len-1) & 3);\n\n        p = pp + 1;\n        continue;\n      }\n      if (text_len - p >= 4 && !memcmp (text + p, \"</a>\", 4)) {\n        if (stp == 0 || sttype[stp - 1]  != 3) {\n          tgl_set_query_error (TLS, EINVAL, \"Invalid tag nest\");\n          tfree (new_text, 2 * text_len + 1);\n          return NULL;\n        }\n        (*ent)[stpos[stp - 1]] = utf8_len (new_text, cur_p) - (*ent)[stpos[stp - 1] - 1];\n        stp --;\n        p += 3;\n        continue;\n      }\n      if (text_len - p >= 4 && !memcmp (text + p, \"<br>\", 4)) {\n        new_text[cur_p ++] = '\\n';\n        p += 3;\n        continue;\n      }\n      tgl_set_query_error (TLS, EINVAL, \"Unknown tag\");\n      tfree (new_text, 2 * text_len + 1);\n      return NULL;\n    } else if (text_len - p >= 4  && !memcmp (text + p, \"&gt;\", 4)) {\n      p += 3;\n      new_text[cur_p ++] = '>';\n    } else if (text_len - p >= 4  && !memcmp (text + p, \"&lt;\", 4)) {\n      p += 3;\n      new_text[cur_p ++] = '<';\n    } else if (text_len - p >= 5  && !memcmp (text + p, \"&amp;\", 5)) {\n      p += 4;\n      new_text[cur_p ++] = '&';\n    } else if (text_len - p >= 6  && !memcmp (text + p, \"&nbsp;\", 6)) {\n      p += 5;\n      new_text[cur_p ++] = 0xc2;\n      new_text[cur_p ++] = 0xa0;\n    } else if (text_len - p >= 3  && text[p] == '&' && text[p + 1] == '#') {\n      p += 2;\n      int num = 0;\n      int ok = 0;\n      while (p < text_len) {\n        if (text[p] >= '0' && text[p] <= '9') {\n          num = num * 10 + text[p] - '0';\n          if (num >= 127) {\n            tgl_set_query_error (TLS, EINVAL, \"Too big number in &-sequence\");\n            tfree (new_text, text_len + 1);\n            return NULL;\n          }\n          p ++;\n        } else if (text[p] == ';') {\n          new_text[cur_p ++] =  num;\n          ok = 1;\n          break;\n        } else {\n          tgl_set_query_error (TLS, EINVAL, \"Bad &-sequence\");\n          tfree (new_text, text_len + 1);\n          return NULL;\n        }\n      }\n      if (ok) { continue; }\n      tgl_set_query_error (TLS, EINVAL, \"Unterminated &-sequence\");\n      tfree (new_text, text_len + 1);\n      return NULL;\n    } else {\n      new_text[cur_p ++] = text[p];\n    }\n  }\n  if (stp != 0) {\n    tgl_set_query_error (TLS, EINVAL, \"Invalid tag nest\");\n    tfree (new_text, text_len + 1);\n    return NULL;\n  }\n  (*ent)[1] = total;\n  char *n = talloc (cur_p + 1);\n  memcpy (n, new_text, cur_p);\n  n[cur_p] = 0;\n  tfree (new_text, 2 * text_len + 1);\n  return n;\n}\n\n/* {{{ Get config */\n\nstatic void fetch_dc_option (struct tgl_state *TLS, struct tl_ds_dc_option *DS_DO) {\n  bl_do_dc_option (TLS, DS_LVAL (DS_DO->flags), DS_LVAL (DS_DO->id), NULL, 0, DS_STR (DS_DO->ip_address), DS_LVAL (DS_DO->port));\n}\n\nstatic int help_get_config_on_answer (struct tgl_state *TLS, struct query *q, void *DS) {\n  struct tl_ds_config *DS_C = DS;\n\n  int i;\n  for (i = 0; i < DS_LVAL (DS_C->dc_options->cnt); i++) {\n    fetch_dc_option (TLS, DS_C->dc_options->data[i]);\n  }\n\n  int max_chat_size = DS_LVAL (DS_C->chat_size_max);\n  int max_bcast_size = 0;//DS_LVAL (DS_C->broadcast_size_max);\n  vlogprintf (E_DEBUG, \"chat_size = %d, bcast_size = %d\\n\", max_chat_size, max_bcast_size);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int))(q->callback))(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods help_get_config_methods  = {\n  .on_answer = help_get_config_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(config),\n  .name = \"get config\",\n  .timeout = 1\n};\n\nvoid tgl_do_help_get_config (struct tgl_state *TLS, void (*callback)(struct tgl_state *,void *, int), void *callback_extra) {\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_help_get_config);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &help_get_config_methods, 0, callback, callback_extra);\n}\n\nvoid tgl_do_help_get_config_dc (struct tgl_state *TLS, struct tgl_dc *D, void (*callback)(struct tgl_state *, void *, int), void *callback_extra) {\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_help_get_config);\n  tglq_send_query_ex (TLS, D, packet_ptr - packet_buffer, packet_buffer, &help_get_config_methods, 0, callback, callback_extra, 2);\n}\n/* }}} */\n\n/* {{{ Send code */\nstatic int send_code_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_auth_sent_code *DS_ASC = D;\n\n  char *phone_code_hash = DS_STR_DUP (DS_ASC->phone_code_hash);\n  int registered = DS_BVAL (DS_ASC->phone_registered);;\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, int, const char *))(q->callback)) (TLS, q->callback_extra, 1, registered, phone_code_hash);\n  }\n  tfree_str (phone_code_hash);\n  return 0;\n}\n\nstatic struct query_methods send_code_methods  = {\n  .on_answer = send_code_on_answer,\n  .on_error = q_list_on_error,\n  .type = TYPE_TO_PARAM(auth_sent_code),\n  .name = \"send code\"\n};\n\nvoid tgl_do_send_code (struct tgl_state *TLS, const char *phone, int phone_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int registered, const char *hash), void *callback_extra) {\n  vlogprintf (E_DEBUG, \"sending code to dc %d\\n\", TLS->dc_working_num);\n\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_auth_send_code);\n  out_cstring (phone, phone_len);\n  out_int (0);\n  out_int (TLS->app_id);\n  out_string (TLS->app_hash);\n  out_string (\"en\");\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_code_methods, NULL, callback, callback_extra);\n}\n\n\nstatic int phone_call_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int))(q->callback))(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods phone_call_methods  = {\n  .on_answer = phone_call_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"phone call\"\n};\n\nvoid tgl_do_phone_call (struct tgl_state *TLS, const char *phone, int phone_len, const char *hash, int hash_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  vlogprintf (E_DEBUG, \"calling user\\n\");\n\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_auth_send_call);\n  out_cstring (phone, phone_len);\n  out_cstring (hash, hash_len);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &phone_call_methods, NULL, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Sign in / Sign up */\nstatic int sign_in_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_auth_authorization *DS_AA = D;\n  //vlogprintf (E_DEBUG, \"Expires in %d\\n\", DS_LVAL (DS_AA->expires));\n\n  struct tgl_user *U = tglf_fetch_alloc_user (TLS, DS_AA->user);\n\n  bl_do_dc_signed (TLS, TLS->DC_working->id);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int, struct tgl_user *))q->callback) (TLS, q->callback_extra, 1, U);\n  }\n\n  return 0;\n}\n\nstatic int sign_in_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_user *))q->callback) (TLS, q->callback_extra, 0, NULL);\n  }\n  return 0;\n}\n\nstatic struct query_methods sign_in_methods  = {\n  .on_answer = sign_in_on_answer,\n  .on_error = sign_in_on_error,\n  .type = TYPE_TO_PARAM(auth_authorization),\n  .name = \"sign in\"\n};\n\nint tgl_do_send_code_result (struct tgl_state *TLS, const char *phone, int phone_len, const char *hash, int hash_len, const char *code, int code_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *Self), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_auth_sign_in);\n  out_cstring (phone, phone_len);\n  out_cstring (hash, hash_len);\n  out_cstring (code, code_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &sign_in_methods, 0, callback, callback_extra);\n  return 0;\n}\n\nint tgl_do_send_code_result_auth (struct tgl_state *TLS, const char *phone, int phone_len, const char *hash, int hash_len, const char *code, int code_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *Self), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_auth_sign_up);\n  out_cstring (phone, phone_len);\n  out_cstring (hash, hash_len);\n  out_cstring (code, code_len);\n  out_cstring (first_name, first_name_len);\n  out_cstring (last_name, last_name_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &sign_in_methods, 0, callback, callback_extra);\n  return 0;\n}\n\nint tgl_do_send_bot_auth (struct tgl_state *TLS, const char *code, int code_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *Self), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_auth_import_bot_authorization);\n  out_int (0);\n  out_int (TLS->app_id);\n  out_string (TLS->app_hash);\n  out_cstring (code, code_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &sign_in_methods, 0, callback, callback_extra);\n  return 0;\n}\n/* }}} */\n\n/* {{{ Get contacts */\nstatic int get_contacts_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_contacts_contacts *DS_CC = D;\n\n  int n = DS_CC->users ? DS_LVAL (DS_CC->users->cnt) : 0;\n\n  int i;\n  struct tgl_user **list = talloc (sizeof (void *) * n);\n  for (i = 0; i < n; i++) {\n    list[i] = tglf_fetch_alloc_user (TLS, DS_CC->users->data[i]);\n  }\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int, int, struct tgl_user **))q->callback) (TLS, q->callback_extra, 1, n, list);\n  }\n  tfree (list, sizeof (void *) * n);\n  return 0;\n}\n\nstatic struct query_methods get_contacts_methods = {\n  .on_answer = get_contacts_on_answer,\n  .on_error = q_list_on_error,\n  .type = TYPE_TO_PARAM(contacts_contacts),\n  .name = \"get contacts\"\n};\n\n\nvoid tgl_do_update_contact_list (struct tgl_state *TLS, void (*callback) (struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *contacts[]), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_contacts_get_contacts);\n  out_string (\"\");\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_contacts_methods, NULL, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Send msg (plain text) */\nstatic int msg_send_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_updates *DS_U = D;\n\n  tgl_message_id_t id;\n  id.peer_type = TGL_PEER_RANDOM_ID;\n  id.id = *(long long *)q->extra;\n  tfree (q->extra, 8);\n\n  struct tgl_message *M = tgl_message_get (TLS, &id);\n\n  if (M && M->permanent_id.id == id.id) {\n    tglu_work_any_updates (TLS, 1, DS_U, M);\n    tglu_work_any_updates (TLS, 0, DS_U, M);\n  } else {\n    tglu_work_any_updates (TLS, 1, DS_U, NULL);\n    tglu_work_any_updates (TLS, 0, DS_U, NULL);\n  }\n\n  M = tgl_message_get (TLS, &id);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 1, M);\n  }\n  return 0;\n}\n\nstatic int msg_send_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  tgl_message_id_t id;\n  id.peer_type = TGL_PEER_RANDOM_ID;\n  id.id = *(long long *)q->extra;\n  tfree (q->extra, 8);\n\n  struct tgl_message *M = tgl_message_get (TLS, &id);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 0, M);\n  }\n  if (M) {\n    bl_do_message_delete (TLS, &M->permanent_id);\n  }\n  return 0;\n}\n\nstatic struct query_methods msg_send_methods = {\n  .on_answer = msg_send_on_answer,\n  .on_error = msg_send_on_error,\n  .type = TYPE_TO_PARAM(updates),\n  .name = \"send message\"\n};\n\nvoid tgl_do_send_msg (struct tgl_state *TLS, struct tgl_message *M, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (tgl_get_peer_type (M->to_id) == TGL_PEER_ENCR_CHAT) {\n    tgl_do_send_encr_msg (TLS, M, callback, callback_extra);\n    return;\n  }\n  clear_packet ();\n  out_int (CODE_messages_send_message);\n\n  unsigned f = ((M->flags & TGLMF_DISABLE_PREVIEW) ? 2 : 0) | (M->reply_id ? 1 : 0) | (M->reply_markup ? 4 : 0) | (M->entities_num > 0 ? 8 : 0);\n  if (tgl_get_peer_type (M->from_id) == TGL_PEER_CHANNEL) {\n    f |= 16;\n  }\n  out_int (f);\n  out_peer_id (TLS, M->to_id);\n  if (M->reply_id) {\n    out_int (M->reply_id);\n  }\n  out_cstring (M->message, M->message_len);\n  out_long (M->permanent_id.id);\n  long long *x = talloc (8);\n  *x = M->permanent_id.id;\n\n  if (M->reply_markup) {\n    if (M->reply_markup->rows) {\n      out_int (CODE_reply_keyboard_markup);\n      out_int (M->reply_markup->flags);\n      out_int (CODE_vector);\n      out_int (M->reply_markup->rows);\n      int i;\n      for (i = 0; i < M->reply_markup->rows; i++) {\n        out_int (CODE_keyboard_button_row);\n        out_int (CODE_vector);\n        out_int (M->reply_markup->row_start[i + 1] - M->reply_markup->row_start[i]);\n        int j;\n        for (j = 0; j < M->reply_markup->row_start[i + 1] - M->reply_markup->row_start[i]; j++) {\n          out_int (CODE_keyboard_button);\n          out_string (M->reply_markup->buttons[j + M->reply_markup->row_start[i]]);\n        }\n      }\n    } else {\n      out_int (CODE_reply_keyboard_hide);\n    }\n  }\n\n  if (M->entities_num > 0) {\n    out_int (CODE_vector);\n    out_int (M->entities_num);\n    int i;\n    for (i = 0; i < M->entities_num; i++) {\n      struct tgl_message_entity *E = &M->entities[i];\n      switch (E->type) {\n      case tgl_message_entity_bold:\n        out_int (CODE_message_entity_bold);\n        out_int (E->start);\n        out_int (E->length);\n        break;\n      case tgl_message_entity_italic:\n        out_int (CODE_message_entity_italic);\n        out_int (E->start);\n        out_int (E->length);\n        break;\n      case tgl_message_entity_code:\n        out_int (CODE_message_entity_code);\n        out_int (E->start);\n        out_int (E->length);\n        break;\n      case tgl_message_entity_text_url:\n        out_int (CODE_message_entity_text_url);\n        out_int (E->start);\n        out_int (E->length);\n        out_string (E->extra);\n        break;\n      default:\n        assert (0);\n      }\n    }\n  }\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &msg_send_methods, x, callback, callback_extra);\n}\n\nvoid tgl_do_send_message (struct tgl_state *TLS, tgl_peer_id_t peer_id, const char *text, int text_len, unsigned long long flags, struct tl_ds_reply_markup *reply_markup, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (tgl_get_peer_type (peer_id) == TGL_PEER_ENCR_CHAT) {\n    tgl_peer_t *P = tgl_peer_get (TLS, peer_id);\n    if (!P) {\n      tgl_set_query_error (TLS, EINVAL, \"unknown secret chat\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n      return;\n    }\n    if (P->encr_chat.state != sc_ok) {\n      tgl_set_query_error (TLS, EINVAL, \"secret chat not in ok state\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n      return;\n    }\n  }\n\n  int date = time (0);\n\n  struct tgl_message_id id = tgl_peer_id_to_random_msg_id (peer_id);\n\n  if (tgl_get_peer_type (peer_id) != TGL_PEER_ENCR_CHAT) {\n    int reply = (flags >> 32);\n    int disable_preview = flags & TGL_SEND_MSG_FLAG_DISABLE_PREVIEW;\n    if (!(flags & TGL_SEND_MSG_FLAG_ENABLE_PREVIEW) && TLS->disable_link_preview) {\n      disable_preview = 1;\n    }\n    if (disable_preview) {\n      disable_preview = TGLMF_DISABLE_PREVIEW;\n    }\n    struct tl_ds_message_media TDSM;\n    TDSM.magic = CODE_message_media_empty;\n\n    tgl_peer_id_t from_id;\n    if (flags & TGLMF_POST_AS_CHANNEL) {\n      from_id = peer_id;\n    } else {\n      from_id = TLS->our_id;\n    }\n\n    struct tl_ds_vector *EN = NULL;\n    char *new_text = NULL;\n\n    if (flags & TGLMF_HTML) {\n      int ent_size = 0;\n      int *ent = NULL;\n      text = new_text = process_html_text (TLS, text, text_len, &ent_size, &ent);\n      if (!text) {\n        tfree (ent, ent_size);\n        if (callback) {\n          callback (TLS, callback_extra, 0, 0);\n        }\n        return;    \n      }\n      text_len = strlen (new_text);\n      int *save_ptr = in_ptr;\n      int *save_end = in_end;\n      in_ptr = ent;\n      in_end = ent + ent_size;\n      EN = fetch_ds_type_any (TYPE_TO_PARAM_1 (vector, TYPE_TO_PARAM (message_entity)));\n      assert (EN);\n      vlogprintf (E_DEBUG, \"in_ptr = %p, in_end = %p\\n\", in_ptr, in_end);\n      assert (in_ptr == in_end);\n      in_ptr = save_ptr;\n      in_end = save_end;\n      tfree (ent, 4 * ent_size);\n    }\n\n      \n    bl_do_edit_message (TLS, &id, &from_id, &peer_id, NULL, NULL, &date, text, text_len, &TDSM, NULL, reply ? &reply : NULL, reply_markup, EN, TGLMF_UNREAD | TGLMF_OUT | TGLMF_PENDING | TGLMF_CREATE | TGLMF_CREATED | TGLMF_SESSION_OUTBOUND | disable_preview);\n    \n    if (flags & TGLMF_HTML) {\n      tfree_str (new_text);\n      free_ds_type_any (EN, TYPE_TO_PARAM_1 (vector, TYPE_TO_PARAM (message_entity)));\n    }\n  } else {\n    struct tl_ds_decrypted_message_media TDSM;\n    TDSM.magic = CODE_decrypted_message_media_empty;\n\n    tgl_peer_id_t from_id = TLS->our_id;\n    bl_do_edit_message_encr (TLS, &id, &from_id, &peer_id, &date, text, text_len, &TDSM, NULL, NULL, TGLMF_UNREAD | TGLMF_OUT | TGLMF_PENDING | TGLMF_CREATE | TGLMF_CREATED | TGLMF_SESSION_OUTBOUND | TGLMF_ENCRYPTED);\n  }\n\n  struct tgl_message *M = tgl_message_get (TLS, &id);\n  assert (M);\n  tgl_do_send_msg (TLS, M, callback, callback_extra);\n}\n\nvoid tgl_do_reply_message (struct tgl_state *TLS, tgl_message_id_t *_reply_id, const char *text, int text_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t reply_id = *_reply_id;\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    reply_id = tgl_convert_temp_msg_id (TLS, reply_id);\n  }\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (reply_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not reply on message from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  tgl_peer_id_t peer_id = tgl_msg_id_to_peer_id (reply_id);\n\n  tgl_do_send_message (TLS, peer_id, text, text_len, flags | TGL_SEND_MSG_FLAG_REPLY (reply_id.id), NULL, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Send text file */\nvoid tgl_do_send_text (struct tgl_state *TLS, tgl_peer_id_t id, const char *file_name, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  int fd = open (file_name, O_RDONLY | O_BINARY);\n  if (fd < 0) {\n    tgl_set_query_error (TLS, EBADF, \"Can not open file: %s\", strerror(errno));\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n  static char buf[(1 << 20) + 1];\n  int x = read (fd, buf, (1 << 20) + 1);\n  if (x < 0) {\n    tgl_set_query_error (TLS, EBADF, \"Can not read from file: %s\", strerror(errno));\n    close (fd);\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n\n  assert (x >= 0);\n  close (fd);\n  if (x == (1 << 20) + 1) {\n    tgl_set_query_error (TLS, E2BIG, \"text file is too big\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n  } else {\n    tgl_do_send_message (TLS, id, buf, x, flags, NULL, callback, callback_extra);\n  }\n}\n\nvoid tgl_do_reply_text (struct tgl_state *TLS, tgl_message_id_t *_reply_id, const char *file_name, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t reply_id = *_reply_id;\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    reply_id = tgl_convert_temp_msg_id (TLS, reply_id);\n  }\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (reply_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not reply on message from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  tgl_peer_id_t peer_id = tgl_msg_id_to_peer_id (reply_id);\n\n  tgl_do_send_text (TLS, peer_id, file_name, flags | TGL_SEND_MSG_FLAG_REPLY (reply_id.id), callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Mark read */\n\nstruct mark_read_extra {\n  tgl_peer_id_t id;\n  int max_id;\n};\n\nvoid tgl_do_messages_mark_read (struct tgl_state *TLS, tgl_peer_id_t id, int max_id, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int), void *callback_extra);\n\nstatic int mark_read_channels_on_receive (struct tgl_state *TLS, struct query *q, void *D) {\n  struct mark_read_extra *E = q->extra;\n\n  bl_do_channel (TLS, tgl_get_peer_id (E->id), NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL,\n    &E->max_id, TGL_FLAGS_UNCHANGED);\n  \n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  tfree (E, sizeof (*E));\n  return 0;\n}\n\nstatic int mark_read_on_receive (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_affected_messages *DS_MAM = D;\n\n  int r = tgl_check_pts_diff (TLS, DS_LVAL (DS_MAM->pts), DS_LVAL (DS_MAM->pts_count));\n\n  if (r > 0) {\n    bl_do_set_pts (TLS, DS_LVAL (DS_MAM->pts));\n  }\n\n  struct mark_read_extra *E = q->extra;\n\n  if (tgl_get_peer_type (E->id) == TGL_PEER_USER) {\n    bl_do_user (TLS, tgl_get_peer_id (E->id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, &E->max_id, NULL, NULL, TGL_FLAGS_UNCHANGED);\n  } else {\n    assert (tgl_get_peer_type (E->id) == TGL_PEER_CHAT);\n    bl_do_chat (TLS, tgl_get_peer_id (E->id), NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &E->max_id, NULL, TGL_FLAGS_UNCHANGED);\n  }\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  \n  tfree (E, sizeof (*E));\n  return 0;\n}\n\nstatic int mark_read_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n\n  struct mark_read_extra *E = q->extra;\n  tfree (E, sizeof (*E));\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 0);\n  }\n  return 0;\n}\n\nstatic struct query_methods mark_read_methods = {\n  .on_answer = mark_read_on_receive,\n  .on_error = mark_read_on_error,\n  .type = TYPE_TO_PARAM(messages_affected_messages),\n  .name = \"mark read\"\n};\n\nstatic struct query_methods mark_read_channels_methods = {\n  .on_answer = mark_read_channels_on_receive,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"mark read (channels)\"\n};\n\nvoid tgl_do_messages_mark_read (struct tgl_state *TLS, tgl_peer_id_t id, int max_id, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int), void *callback_extra) {\n  if (TLS->is_bot) { return; }\n  if (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT) {\n    tgl_do_mark_read (TLS, id, callback, callback_extra);\n    return;\n  }\n  clear_packet ();\n  if (tgl_get_peer_type (id) != TGL_PEER_CHANNEL) {\n    out_int (CODE_messages_read_history);\n    out_peer_id (TLS, id);\n    out_int (max_id);\n    //out_int (offset);\n\n    struct mark_read_extra *E = talloc (sizeof (*E));\n    E->id = id;\n    E->max_id = max_id;\n\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &mark_read_methods, E, callback, callback_extra);\n  } else {\n    out_int (CODE_channels_read_history);\n\n    out_int (CODE_input_channel);\n    out_int (tgl_get_peer_id (id));\n    out_long (id.access_hash);\n    \n    out_int (max_id);\n\n    struct mark_read_extra *E = talloc (sizeof (*E));\n    E->id = id;\n    E->max_id = max_id;\n    \n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &mark_read_channels_methods, E, callback, callback_extra);\n  }\n}\n\nvoid tgl_do_mark_read (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  if (tgl_get_peer_type (id) == TGL_PEER_USER || tgl_get_peer_type (id) == TGL_PEER_CHAT || tgl_get_peer_type (id) == TGL_PEER_CHANNEL) {\n    tgl_do_messages_mark_read (TLS, id, 0, 0, callback, callback_extra);\n    return;\n  }\n  assert (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT);\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n  if (P->last) {\n    tgl_do_messages_mark_read_encr (TLS, id, P->encr_chat.access_hash, P->last->date, callback, callback_extra);\n  } else {\n    tgl_do_messages_mark_read_encr (TLS, id, P->encr_chat.access_hash, time (0) - 10, callback, callback_extra);\n  }\n}\n/* }}} */\n\n/* {{{ Get history */\nstruct get_history_extra {\n  struct tgl_message **ML;\n  int list_offset;\n  int list_size;\n  tgl_peer_id_t id;\n  int limit;\n  int offset;\n  int max_id;\n};\n\nstatic void _tgl_do_get_history (struct tgl_state *TLS, struct get_history_extra *E, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra);\n\n\nstatic int get_history_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_messages *DS_MM = D;\n\n  int i;\n  for (i = 0; i < DS_LVAL (DS_MM->chats->cnt); i++) {\n    tglf_fetch_alloc_chat (TLS, DS_MM->chats->data[i]);\n  }\n\n  for (i = 0; i < DS_LVAL (DS_MM->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_MM->users->data[i]);\n  }\n\n  struct get_history_extra *E = q->extra;\n\n  int n = DS_LVAL (DS_MM->messages->cnt);\n\n  if (E->list_size - E->list_offset < n) {\n    int new_list_size = 2 * E->list_size;\n    if (new_list_size - E->list_offset < n) {\n      new_list_size = n + E->list_offset;\n    }\n    E->ML = trealloc (E->ML, E->list_size * sizeof (void *), new_list_size * sizeof (void *));\n    assert (E->ML);\n    E->list_size = new_list_size;\n  }\n\n  for (i = 0; i < n; i++) {\n    E->ML[i + E->list_offset] = tglf_fetch_alloc_message (TLS, DS_MM->messages->data[i], NULL);\n  }\n  E->list_offset += n;\n  E->offset += n;\n  E->limit -= n;\n\n  int count = DS_LVAL (DS_MM->count);\n  if (count >= 0 && E->limit + E->offset >= count) {\n    E->limit = count - E->offset;\n    if (E->limit < 0) { E->limit = 0; }\n  }\n  assert (E->limit >= 0);\n\n\n  if (E->limit <= 0 || DS_MM->magic == CODE_messages_messages || DS_MM->magic == CODE_messages_channel_messages) {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *TLS, void *, int, int, struct tgl_message **))q->callback) (TLS, q->callback_extra, 1, E->list_offset, E->ML);\n    }\n    /*if (E->list_offset > 0) {\n      tgl_do_messages_mark_read (TLS, E->id, E->ML[0]->id, 0, 0, 0);\n    }*/\n\n    tfree (E->ML, sizeof (void *) * E->list_size);\n    tfree (E, sizeof (*E));\n  } else {\n    E->offset = 0;\n    E->max_id = E->ML[E->list_offset - 1]->permanent_id.id;\n    _tgl_do_get_history (TLS, E, q->callback, q->callback_extra);\n  }\n  return 0;\n}\n\nstatic int get_history_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n\n  struct get_history_extra *E = q->extra;\n  tfree (E->ML, sizeof (void *) * E->list_size);\n  tfree (E, sizeof (*E));\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int, int, struct tgl_message **))q->callback) (TLS, q->callback_extra, 0, 0, NULL);\n  }\n  return 0;\n}\n\nstatic struct query_methods get_history_methods = {\n  .on_answer = get_history_on_answer,\n  .on_error = get_history_on_error,\n  .type = TYPE_TO_PARAM(messages_messages),\n  .name = \"get history\"\n};\n\nvoid tgl_do_get_local_history (struct tgl_state *TLS, tgl_peer_id_t id, int offset, int limit, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra) {\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P || !P->last) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown peer\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0, 0);\n    }\n    return;\n  }\n  struct tgl_message *M = P->last;\n  int count = 1;\n  assert (!M->prev);\n  while (count < limit + offset && M->next) {\n    M = M->next;\n    count ++;\n  }\n  if (count <= offset) {\n    if (callback) {\n      callback (TLS, callback_extra, 1, 0, 0);\n    }\n    return;\n  }\n  struct tgl_message **ML = talloc (sizeof (void *) * (count - offset));\n  M = P->last;\n  ML[0] = M;\n  count = 1;\n  while (count < limit && M->next) {\n    M = M->next;\n    if (count >= offset) {\n      ML[count - offset] = M;\n    }\n    count ++;\n  }\n\n  if (callback) {\n    callback (TLS, callback_extra, 1, count - offset, ML);\n  }\n  tfree (ML, sizeof (void *) * (count) - offset);\n}\n\nstatic void _tgl_do_get_history (struct tgl_state *TLS, struct get_history_extra *E, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra) {\n  clear_packet ();\n  tgl_peer_t *C = tgl_peer_get (TLS, E->id);\n  if (tgl_get_peer_type (E->id) != TGL_PEER_CHANNEL || (C && (C->flags & TGLCHF_MEGAGROUP))) {\n    out_int (CODE_messages_get_history);\n    out_peer_id (TLS, E->id);\n  } else {    \n    out_int (CODE_channels_get_important_history);\n    \n    out_int (CODE_input_channel);\n    out_int (tgl_get_peer_id (E->id));\n    out_long (E->id.access_hash);\n  }\n  out_int (E->max_id);\n  out_int (E->offset);\n  out_int (E->limit);\n  out_int (0);\n  out_int (0);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_history_methods, E, callback, callback_extra);\n}\n\nvoid tgl_do_get_history (struct tgl_state *TLS, tgl_peer_id_t id, int offset, int limit, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra) {\n  if (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT || offline_mode) {\n    tgl_do_get_local_history (TLS, id, offset, limit, callback, callback_extra);\n    //tgl_do_mark_read (TLS, id, 0, 0);\n    return;\n  }\n  struct get_history_extra *E = talloc0 (sizeof (*E));\n  E->id = id;\n  E->limit = limit;\n  E->offset = offset;\n  _tgl_do_get_history (TLS, E, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Get dialogs */\nstruct get_dialogs_extra {\n  tgl_peer_id_t *PL;\n  int *UC;\n  tgl_message_id_t **LM;\n  tgl_message_id_t *LMD;\n  int *LRM;\n\n  int list_offset;\n  int list_size;\n  int limit;\n  int offset;\n  int offset_date;\n  int max_id;\n  tgl_peer_id_t offset_peer;\n\n  int channels;\n};\n\nstatic void _tgl_do_get_dialog_list (struct tgl_state *TLS, struct get_dialogs_extra *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]), void *callback_extra);\n\nstatic int get_dialogs_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_dialogs *DS_MD = D;\n\n  struct get_dialogs_extra *E = q->extra;\n\n  int dl_size = DS_LVAL (DS_MD->dialogs->cnt);\n\n  int i;\n  for (i = 0; i < DS_LVAL (DS_MD->chats->cnt); i++) {\n    tglf_fetch_alloc_chat (TLS, DS_MD->chats->data[i]);\n  }\n\n  for (i = 0; i < DS_LVAL (DS_MD->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_MD->users->data[i]);\n  }\n\n  if (E->list_offset + dl_size > E->list_size) {\n    int new_list_size = E->list_size * 2;\n    if (new_list_size < E->list_offset + dl_size) {\n      new_list_size = E->list_offset + dl_size;\n    }\n\n    E->PL = trealloc (E->PL, E->list_size * sizeof (tgl_peer_id_t), new_list_size * sizeof (tgl_peer_id_t));\n    assert (E->PL);\n    E->UC = trealloc (E->UC, E->list_size * sizeof (int), new_list_size * sizeof (int));\n    assert (E->UC);\n    E->LM = trealloc (E->LM, E->list_size * sizeof (void *), new_list_size * sizeof (void *));\n    assert (E->LM);\n    E->LMD = trealloc (E->LMD, E->list_size * sizeof (tgl_message_id_t), new_list_size * sizeof (tgl_message_id_t));\n    assert (E->LMD);\n    E->LRM = trealloc (E->LRM, E->list_size * sizeof (int), new_list_size * sizeof (int));\n    assert (E->LRM);\n\n    E->list_size = new_list_size;\n\n    int i;\n    for (i = 0; i < E->list_offset; i++) {\n      E->LM[i] = &E->LMD[i];\n    }\n  }\n\n  for (i = 0; i < dl_size; i++) {\n    struct tl_ds_dialog *DS_D = DS_MD->dialogs->data[i];\n    tgl_peer_t *P = tgl_peer_get (TLS, tglf_fetch_peer_id (TLS, DS_D->peer));\n    assert (P);\n    E->PL[E->list_offset + i] = P->id;\n    E->LMD[E->list_offset + i] = tgl_peer_id_to_msg_id (E->PL[E->list_offset + i], DS_LVAL (DS_D->top_message));\n    E->LM[E->list_offset + i] = &E->LMD[E->list_offset + i];\n    E->UC[E->list_offset + i] = DS_LVAL (DS_D->unread_count);\n    E->LRM[E->list_offset + i] = DS_LVAL (DS_D->read_inbox_max_id);\n  }\n  E->list_offset += dl_size;\n\n  for (i = 0; i < DS_LVAL (DS_MD->messages->cnt); i++) {\n    tglf_fetch_alloc_message (TLS, DS_MD->messages->data[i], NULL);\n  }\n\n  vlogprintf (E_DEBUG, \"dl_size = %d, total = %d\\n\", dl_size, E->list_offset);\n  if (dl_size && E->list_offset < E->limit && DS_MD->magic == CODE_messages_dialogs_slice && E->list_offset < DS_LVAL (DS_MD->count)) {\n    E->offset += dl_size;\n    if (E->list_offset > 0) {\n      E->offset_peer = E->PL[E->list_offset - 1];\n    \n      int p = E->list_offset - 1;\n      while (p >= 0) {\n        struct tgl_message *M = tgl_message_get (TLS, E->LM[p]);\n        if (M) {\n          E->offset_date = M->date;\n          break;\n        }\n        p --;\n      }\n    }\n    _tgl_do_get_dialog_list (TLS, E, q->callback, q->callback_extra);\n  } else {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *TLS, void *, int, int, tgl_peer_id_t *, tgl_message_id_t **, int *))q->callback) (TLS, q->callback_extra, 1, E->list_offset, E->PL, E->LM, E->UC);\n    }\n    tfree (E->PL, sizeof (tgl_peer_id_t) * E->list_size);\n    tfree (E->UC, 4 * E->list_size);\n    tfree (E->LM, sizeof (void *) * E->list_size);\n    tfree (E->LMD, sizeof (tgl_message_id_t) * E->list_size);\n    tfree (E->LRM, 4 * E->list_size);\n    tfree (E, sizeof (*E));\n  }\n\n  return 0;\n}\n\nstatic int get_dialogs_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n\n  struct get_dialogs_extra *E = q->extra;\n  tfree (E->PL, sizeof (tgl_peer_id_t) * E->list_size);\n  tfree (E->UC, 4 * E->list_size);\n  tfree (E->LM, sizeof (void *) * E->list_size);\n  tfree (E->LMD, sizeof (tgl_message_id_t) * E->list_size);\n  tfree (E->LRM, 4 * E->list_size);\n  tfree (E, sizeof (*E));\n  if (q->callback) {\n    ((void (*)(struct tgl_state *TLS, void *, int, int, tgl_peer_id_t *, tgl_message_id_t **, int *))q->callback) (TLS, q->callback_extra, 0, 0, NULL, NULL, NULL);\n  }\n  return 0;\n}\n\nstatic struct query_methods get_dialogs_methods = {\n  .on_answer = get_dialogs_on_answer,\n  .on_error = get_dialogs_on_error,\n  .type = TYPE_TO_PARAM(messages_dialogs),\n  .name = \"get dialogs\"\n};\n\nstatic void _tgl_do_get_dialog_list (struct tgl_state *TLS, struct get_dialogs_extra *E,  void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]), void *callback_extra) {\n  clear_packet ();\n  if (E->channels) {\n    out_int (CODE_channels_get_dialogs);\n    out_int (E->offset);\n    out_int (E->limit - E->list_offset);\n  } else {\n    out_int (CODE_messages_get_dialogs);\n    out_int (E->offset_date);\n    out_int (E->offset);\n    //out_int (0);\n    if (E->offset_peer.peer_type) {\n      out_peer_id (TLS, E->offset_peer);\n    } else {\n      out_int (CODE_input_peer_empty);\n    }\n    out_int (E->limit - E->list_offset);\n  }\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_dialogs_methods, E, callback, callback_extra);\n}\n\nvoid tgl_do_get_dialog_list (struct tgl_state *TLS, int limit, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]), void *callback_extra) {\n  struct get_dialogs_extra *E = talloc0 (sizeof (*E));\n  E->limit = limit;\n  E->offset = offset;\n  E->channels = 0;\n  _tgl_do_get_dialog_list (TLS, E, callback, callback_extra);\n}\n\nvoid tgl_do_get_channels_dialog_list (struct tgl_state *TLS, int limit, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]), void *callback_extra) {\n  struct get_dialogs_extra *E = talloc0 (sizeof (*E));\n  E->limit = limit;\n  E->offset = offset;\n  E->channels = 1;\n  E->offset_date = 0;\n  E->offset_peer.peer_type = 0;\n  _tgl_do_get_dialog_list (TLS, E, callback, callback_extra);\n}\n/* }}} */\n\nint allow_send_linux_version = 1;\n\n/* {{{ Send document file */\n\nstatic void out_peer_id (struct tgl_state *TLS, tgl_peer_id_t id) {\n  switch (tgl_get_peer_type (id)) {\n  case TGL_PEER_CHAT:\n    out_int (CODE_input_peer_chat);\n    out_int (tgl_get_peer_id (id));\n    break;\n  case TGL_PEER_USER:\n    out_int (CODE_input_peer_user);\n    out_int (tgl_get_peer_id (id));\n    out_long (id.access_hash);\n    break;\n  case TGL_PEER_CHANNEL:\n    out_int (CODE_input_peer_channel);\n    out_int (tgl_get_peer_id (id));\n    out_long (id.access_hash);\n    break;\n  default:\n    assert (0);\n  }\n}\n\nstatic void send_part (struct tgl_state *TLS, struct send_file *f, void *callback, void *callback_extra);\nstatic int send_file_part_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  send_part (TLS, q->extra, q->callback, q->callback_extra);\n  return 0;\n}\n\nstatic int set_photo_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic int send_file_part_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n\n  struct send_file *f = q->extra;\n  tfree_str (f->file_name);\n  tfree_str (f->caption);\n  if (!f->avatar.peer_type) {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 0, 0);\n    }\n  } else {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 0);\n    }\n  }\n  tfree (f, sizeof (*f));\n  return 0;\n}\n\nstatic struct query_methods send_file_part_methods = {\n  .on_answer = send_file_part_on_answer,\n  .on_error = send_file_part_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"send file part\"\n};\n\nstatic struct query_methods set_photo_methods = {\n  .on_answer = set_photo_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(photos_photo),\n  .name = \"set photo\"\n};\n\nstatic void send_avatar_end (struct tgl_state *TLS, struct send_file *f, void *callback, void *callback_extra) {\n  switch (tgl_get_peer_type (f->avatar)) {\n  case TGL_PEER_CHAT:\n    out_int (CODE_messages_edit_chat_photo);\n    out_int (f->avatar.peer_id);\n    out_int (CODE_input_chat_uploaded_photo);\n    break;\n  case TGL_PEER_USER:\n    out_int (CODE_photos_upload_profile_photo);\n    out_int (CODE_photos_upload_profile_photo);\n    break;\n  case TGL_PEER_CHANNEL:\n    out_int (CODE_channels_edit_photo);\n    out_int (CODE_input_channel);\n    out_int (f->avatar.peer_id);\n    out_long (f->avatar.access_hash);\n    out_int (CODE_input_chat_uploaded_photo);\n    break;\n  default:\n    assert (0);\n  }\n\n  if (f->size < (16 << 20)) {\n    out_int (CODE_input_file);\n  } else {\n    out_int (CODE_input_file_big);\n  }\n  out_long (f->id);\n  out_int (f->part_num);\n\n  char *s = f->file_name + strlen (f->file_name);\n  while (s >= f->file_name && *s != '/') { s --;}\n  out_string (s + 1);\n  if (f->size < (16 << 20)) {\n    out_string (\"\");\n  }\n\n  if (f->avatar.peer_type != TGL_PEER_USER) {\n    out_int (CODE_input_photo_crop_auto);\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, NULL, callback, callback_extra);\n  } else {\n    out_string (\"profile photo\");\n    out_int (CODE_input_geo_point_empty);\n    out_int (CODE_input_photo_crop_auto);\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &set_photo_methods, 0, callback, callback_extra);\n  }\n}\n\n\nstatic void send_file_unencrypted_end (struct tgl_state *TLS, struct send_file *f, void *callback, void *callback_extra) {\n  out_int (CODE_messages_send_media);\n  out_int ((f->reply ? 1 : 0) | f->channel);\n  out_peer_id (TLS, f->to_id);\n  if (f->reply) {\n    out_int (f->reply);\n  }\n  if (f->flags & TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO) {\n    out_int (CODE_input_media_uploaded_photo);\n  } else {\n    if (f->thumb_id > 0) {\n      out_int (CODE_input_media_uploaded_thumb_document);\n    } else {\n      out_int (CODE_input_media_uploaded_document);\n    }\n  }\n\n  if (f->size < (16 << 20)) {\n    out_int (CODE_input_file);\n  } else {\n    out_int (CODE_input_file_big);\n  }\n\n  out_long (f->id);\n  out_int (f->part_num);\n  char *s = f->file_name + strlen (f->file_name);\n  while (s >= f->file_name && *s != '/') { s --;}\n  out_string (s + 1);\n  if (f->size < (16 << 20)) {\n    out_string (\"\");\n  }\n\n  if (!(f->flags & TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO)) {\n    out_string (tg_mime_by_filename (f->file_name));\n\n    out_int (CODE_vector);\n    if (f->flags & TGLDF_IMAGE) {\n      if (f->flags & TGLDF_ANIMATED) {\n        out_int (2);\n        out_int (CODE_document_attribute_image_size);\n        out_int (f->w);\n        out_int (f->h);\n        out_int (CODE_document_attribute_animated);\n      } else {\n        out_int (1);\n        out_int (CODE_document_attribute_image_size);\n        out_int (f->w);\n        out_int (f->h);\n      }\n    } else if (f->flags & TGLDF_AUDIO) {\n      out_int (2);\n      out_int (CODE_document_attribute_audio);\n      out_int (f->duration);\n      out_string (\"\");\n      out_string (\"\");\n      out_int (CODE_document_attribute_filename);\n      out_string (s + 1);\n    } else if (f->flags & TGLDF_VIDEO) {\n      out_int (2);\n      out_int (CODE_document_attribute_video);\n      out_int (f->duration);\n      out_int (f->w);\n      out_int (f->h);\n      out_int (CODE_document_attribute_filename);\n      out_string (s + 1);\n    } else if (f->flags & TGLDF_STICKER) {\n      out_int (1);\n      out_int (CODE_document_attribute_sticker);\n    } else {\n      out_int (1);\n      out_int (CODE_document_attribute_filename);\n      out_string (s + 1);\n    }\n\n    if (f->thumb_id > 0) {\n      out_int (CODE_input_file);\n      out_long (f->thumb_id);\n      out_int (1);\n      out_string (\"thumb.jpg\");\n      out_string (\"\");\n    }\n    \n    out_string (f->caption ? f->caption : \"\");\n  } else {\n    out_string (f->caption ? f->caption : \"\");\n  }\n\n\n  struct messages_send_extra *E = talloc0 (sizeof (*E));\n  E->id = tgl_peer_id_to_random_msg_id (f->to_id);\n  out_long (E->id.id);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n  tfree_str (f->file_name);\n  tfree_str (f->caption);\n  tfree (f, sizeof (*f));\n}\n\nstatic void send_file_end (struct tgl_state *TLS, struct send_file *f, void *callback, void *callback_extra) {\n  TLS->cur_uploaded_bytes -= f->size;\n  TLS->cur_uploading_bytes -= f->size;\n  clear_packet ();\n\n  if (f->avatar.peer_id) {\n    send_avatar_end (TLS, f, callback, callback_extra);\n    return;\n  }\n  if (!f->encr) {\n    send_file_unencrypted_end (TLS, f, callback, callback_extra);\n    return;\n  }\n  send_file_encrypted_end (TLS, f, callback, callback_extra);\n  return;\n}\n\nstatic void send_part (struct tgl_state *TLS, struct send_file *f, void *callback, void *callback_extra) {\n  if (f->fd >= 0) {\n    if (!f->part_num) {\n      TLS->cur_uploading_bytes += f->size;\n    }\n    clear_packet ();\n    if (f->size < (16 << 20)) {\n      out_int (CODE_upload_save_file_part);\n      out_long (f->id);\n      out_int (f->part_num ++);\n    } else {\n      out_int (CODE_upload_save_big_file_part);\n      out_long (f->id);\n      out_int (f->part_num ++);\n      out_int ((f->size + f->part_size - 1) / f->part_size);\n    }\n    static char buf[512 << 10];\n    int x = read (f->fd, buf, f->part_size);\n    assert (x > 0);\n    f->offset += x;\n    TLS->cur_uploaded_bytes += x;\n\n    if (f->encr) {\n      if (x & 15) {\n        assert (f->offset == f->size);\n        tglt_secure_random (buf + x, (-x) & 15);\n        x = (x + 15) & ~15;\n      }\n\n      TGLC_aes_key aes_key;\n      TGLC_aes_set_encrypt_key (f->key, 256, &aes_key);\n      TGLC_aes_ige_encrypt ((void *)buf, (void *)buf, x, &aes_key, f->iv, 1);\n      memset (&aes_key, 0, sizeof (aes_key));\n    }\n    out_cstring (buf, x);\n    vlogprintf (E_DEBUG, \"offset=%\" INT64_PRINTF_MODIFIER \"d size=%\" INT64_PRINTF_MODIFIER \"d\\n\", f->offset, f->size);\n    if (f->offset == f->size) {\n      close (f->fd);\n      f->fd = -1;\n    } else {\n      assert (f->part_size == x);\n    }\n    //update_prompt ();\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_file_part_methods, f, callback, callback_extra);\n  } else {\n    send_file_end (TLS, f, callback, callback_extra);\n  }\n}\n\nstatic void send_file_thumb (struct tgl_state *TLS, struct send_file *f, const void *thumb_data, int thumb_len, void *callback, void *callback_extra) {\n  clear_packet ();\n  tglt_secure_random (&f->thumb_id, 8);\n  out_int (CODE_upload_save_file_part);\n  out_long (f->thumb_id);\n  out_int (0);\n  out_cstring ((void *)thumb_data, thumb_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_file_part_methods, f, callback, callback_extra);\n}\n\n\nstatic void _tgl_do_send_photo (struct tgl_state *TLS, tgl_peer_id_t to_id, const char *file_name, tgl_peer_id_t avatar, int w, int h, int duration, const void *thumb_data, int thumb_len, const char *caption, int caption_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  int fd = open (file_name, O_RDONLY | O_BINARY);\n  if (fd < 0) {\n    tgl_set_query_error (TLS, EBADF, \"Can not open file: %s\", strerror(errno));\n    if (!avatar.peer_id) {\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n    } else {\n      if (callback) {\n        ((void (*)(struct tgl_state *, void *, int))callback) (TLS, callback_extra, 0);\n      }\n    }\n    return;\n  }\n  struct stat buf;\n  fstat (fd, &buf);\n  long long size = buf.st_size;\n  if (size <= 0) {\n    tgl_set_query_error (TLS, EBADF, \"File is empty\");\n    close (fd);\n    if (!avatar.peer_id) {\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n    } else {\n      if (callback) {\n        ((void (*)(struct tgl_state *, void *, int))callback) (TLS, callback_extra, 0);\n      }\n    }\n    return;\n  }\n  struct send_file *f = talloc0 (sizeof (*f));\n  f->fd = fd;\n  f->size = size;\n  f->offset = 0;\n  f->part_num = 0;\n  f->avatar = avatar;\n  f->reply = flags >> 32;\n  int tmp = ((size + 2999) / 3000);\n  f->part_size = (1 << 14);\n  while (f->part_size < tmp) {\n    f->part_size *= 2;\n  }\n  f->flags = flags;\n  f->channel = 0;\n  if (flags & TGLMF_POST_AS_CHANNEL) {\n    f->channel = 16;\n  }\n\n  if (f->part_size > (512 << 10)) {\n    close (fd);\n    tgl_set_query_error (TLS, E2BIG, \"File is too big\");\n    tfree (f, sizeof (*f));\n    if (!avatar.peer_id) {\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n    } else {\n      if (callback) {\n        ((void (*)(struct tgl_state *, void *, int))callback) (TLS, callback_extra, 0);\n      }\n    }\n    return;\n  }\n\n  tglt_secure_random (&f->id, 8);\n  f->to_id = to_id;\n  f->flags = flags;\n  f->file_name = tstrdup (file_name);\n  f->w = w;\n  f->h = h;\n  f->duration = duration;\n  f->caption = caption ? tstrdup (caption) : tstrdup (\"\");\n\n  if (tgl_get_peer_type (f->to_id) == TGL_PEER_ENCR_CHAT) {\n    f->encr = 1;\n    f->iv = talloc (32);\n    tglt_secure_random (f->iv, 32);\n    f->init_iv = talloc (32);\n    memcpy (f->init_iv, f->iv, 32);\n    f->key = talloc (32);\n    tglt_secure_random (f->key, 32);\n  }\n\n  if (!f->encr && f->flags != -1 && thumb_len > 0) {\n    send_file_thumb (TLS, f, thumb_data, thumb_len, callback, callback_extra);\n  } else {\n    send_part (TLS, f, callback, callback_extra);\n  }\n}\n\nvoid tgl_do_send_document (struct tgl_state *TLS, tgl_peer_id_t to_id, const char *file_name, const char *caption, int caption_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (flags & TGL_SEND_MSG_FLAG_DOCUMENT_AUTO) {\n    char *mime_type = tg_mime_by_filename (file_name);\n    if (strcmp (mime_type, \"image/gif\") == 0) {\n      flags |= TGL_SEND_MSG_FLAG_DOCUMENT_ANIMATED;\n    } else if (!memcmp (mime_type, \"image/\", 6)) {\n      flags |= TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO;\n    } else if (!memcmp (mime_type, \"video/\", 6)) {\n      flags |= TGLDF_VIDEO;\n    } else if (!memcmp (mime_type, \"audio/\", 6)) {\n      flags |= TGLDF_AUDIO;\n    }\n  }\n  tgl_peer_id_t x;\n  x.peer_id = 0;\n  _tgl_do_send_photo (TLS, to_id, file_name, x, 100, 100, 100, 0, 0, caption, caption_len, flags, callback, callback_extra);\n}\n\nvoid tgl_do_reply_document (struct tgl_state *TLS, tgl_message_id_t *_reply_id, const char *file_name, const char *caption, int caption_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t reply_id = *_reply_id;\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    reply_id = tgl_convert_temp_msg_id (TLS, reply_id);\n  }\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (reply_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not reply on message from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  tgl_peer_id_t peer_id = tgl_msg_id_to_peer_id (reply_id);\n\n  tgl_do_send_document (TLS, peer_id, file_name, caption, caption_len, flags | TGL_SEND_MSG_FLAG_REPLY (reply_id.id), callback, callback_extra);\n}\n\nvoid tgl_do_set_chat_photo (struct tgl_state *TLS, tgl_peer_id_t chat_id, const char *file_name, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success), void *callback_extra) {\n  assert (tgl_get_peer_type (chat_id) == TGL_PEER_CHAT);\n  _tgl_do_send_photo (TLS, chat_id, file_name, chat_id, 0, 0, 0, 0, 0, NULL, 0, TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO, (void *)callback, callback_extra);\n}\n\nvoid tgl_do_set_channel_photo (struct tgl_state *TLS, tgl_peer_id_t chat_id, const char *file_name, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success), void *callback_extra) {\n  assert (tgl_get_peer_type (chat_id) == TGL_PEER_CHANNEL);\n  _tgl_do_send_photo (TLS, chat_id, file_name, chat_id, 0, 0, 0, 0, 0, NULL, 0, TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO, (void *)callback, callback_extra);\n}\n\nvoid tgl_do_set_profile_photo (struct tgl_state *TLS, const char *file_name, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  _tgl_do_send_photo (TLS, TLS->our_id, file_name, TLS->our_id, 0, 0, 0, 0, 0, NULL, 0, TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO, (void *)callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Profile name */\n\nint set_profile_name_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_user *DS_U = D;\n  struct tgl_user *U = tglf_fetch_alloc_user (TLS, DS_U);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_user  *))q->callback) (TLS, q->callback_extra, 1, U);\n  }\n  return 0;\n}\n\nstatic struct query_methods set_profile_name_methods = {\n  .on_answer = set_profile_name_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(user),\n  .name = \"set profile name\"\n};\n\nvoid tgl_do_set_profile_name (struct tgl_state *TLS, const char *first_name, int first_name_len, const char *last_name, int last_name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_account_update_profile);\n  out_cstring (first_name, first_name_len);\n  out_cstring (last_name, last_name_len);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &set_profile_name_methods, 0, callback, callback_extra);\n}\n\nvoid tgl_do_set_username (struct tgl_state *TLS, const char *username, int username_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_account_update_username);\n  out_cstring (username, username_len);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &set_profile_name_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Contacts search */\n\nint contact_search_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_contacts_resolved_peer *DS_CRU = D;\n\n  tgl_peer_id_t peer_id = tglf_fetch_peer_id (TLS, DS_CRU->peer);\n\n  int i;\n  for (i = 0; i < DS_LVAL (DS_CRU->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_CRU->users->data[i]);\n  }\n  \n  for (i = 0; i < DS_LVAL (DS_CRU->chats->cnt); i++) {\n    tglf_fetch_alloc_chat (TLS, DS_CRU->chats->data[i]);\n  }\n\n  tgl_peer_t *P = tgl_peer_get (TLS, peer_id);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int, tgl_peer_t *))q->callback) (TLS, q->callback_extra, 1, P);\n  }\n\n  return 0;\n}\n\nstatic struct query_methods contact_search_methods = {\n  .on_answer = contact_search_on_answer,\n  .on_error = q_list_on_error,\n  .type = TYPE_TO_PARAM(contacts_resolved_peer),\n  .name = \"contacts search\"\n};\n\nvoid tgl_do_contact_search (struct tgl_state *TLS, const char *name, int name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, tgl_peer_t *U), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_contacts_resolve_username);\n  out_cstring (name, name_len);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &contact_search_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Forward */\n\nstatic int send_msgs_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct messages_send_extra *E = q->extra;\n\n  tglu_work_any_updates (TLS, 1, D, (!E || E->multi) ? NULL : tgl_message_get (TLS, &E->id));\n  tglu_work_any_updates (TLS, 0, D, (!E || E->multi) ? NULL : tgl_message_get (TLS, &E->id));\n\n\n  if (!E) {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n    }\n  } else if (E->multi) {\n    struct tgl_message **ML = talloc (sizeof (void *) * E->count);\n    int count = E->count;\n    int i;\n    for (i = 0; i < count; i++) {\n      struct tgl_message_id id;\n      id.peer_type = TGL_PEER_RANDOM_ID;\n      id.id = E->list[i].id;\n      ML[i] = tgl_message_get (TLS, &id);\n    }\n    tfree (E->list, sizeof (tgl_message_id_t) * count);\n    tfree (E, sizeof (*E));\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int, int, struct tgl_message **))q->callback) (TLS, q->callback_extra, 1, count, ML);\n    }\n    tfree (ML, sizeof (void *) * count);\n  } else {\n    struct tgl_message_id id;\n    id.peer_type = TGL_PEER_RANDOM_ID;\n    id.id = E->id.id;\n    struct tgl_message *M = tgl_message_get (TLS, &id);\n    tfree (E, sizeof (*E));\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 1, M);\n    }\n  }\n  return 0;\n}\n\nstatic int send_msgs_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  struct messages_send_extra *E = q->extra;\n\n  if (!E) {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 0);\n    }\n  } else if (E->multi) {\n    int count = E->count;\n    tfree (E->list, sizeof (tgl_message_id_t) * count);\n    tfree (E, sizeof (*E));\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int, int, struct tgl_message **))q->callback) (TLS, q->callback_extra, 0, 0, NULL);\n    }\n  } else {\n    tfree (E, sizeof (*E));\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int, struct tgl_message *))q->callback) (TLS, q->callback_extra, 0, NULL);\n    }\n  }\n  return 0;\n}\n\nstatic struct query_methods send_msgs_methods = {\n  .on_answer = send_msgs_on_answer,\n  .on_error = send_msgs_on_error,\n  .type = TYPE_TO_PARAM(updates),\n  .name = \"forward messages\"\n};\n\nvoid tgl_do_forward_messages (struct tgl_state *TLS, tgl_peer_id_t id, int n, const tgl_message_id_t *_ids[], unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int count, struct tgl_message *ML[]), void *callback_extra) {\n  if (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not forward messages to secret chats\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0, 0);\n    }\n    return;\n  }\n  tgl_peer_id_t from_id = TGL_MK_USER (0);\n  tgl_message_id_t *ids = talloc (sizeof (tgl_message_id_t) * n);\n  int i;\n  for (i = 0; i < n; i++) {\n    tgl_message_id_t msg_id = *_ids[i];\n    if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n      msg_id = tgl_convert_temp_msg_id (TLS, msg_id);\n    }\n    if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n      tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0, NULL);\n      }\n      tfree (ids, n * sizeof (tgl_message_id_t));\n      return;\n    }\n\n    if (msg_id.peer_type == TGL_PEER_ENCR_CHAT) {\n      tgl_set_query_error (TLS, EINVAL, \"can not forward message from secret chat\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0, NULL);\n      }\n      tfree (ids, n * sizeof (tgl_message_id_t));\n      return;\n    }\n\n    ids[i] = msg_id;\n\n    if (i == 0) {      \n      from_id = tgl_msg_id_to_peer_id (msg_id);\n    } else {\n      if (tgl_cmp_peer_id (from_id, tgl_msg_id_to_peer_id (msg_id))) {\n        tgl_set_query_error (TLS, EINVAL, \"can not forward messages from different dialogs\");\n        if (callback) {\n          callback (TLS, callback_extra, 0, 0, NULL);\n        }\n        tfree (ids, n * sizeof (tgl_message_id_t));\n        return;\n      }\n    }\n  }\n  \n  \n  clear_packet ();\n  out_int (CODE_messages_forward_messages);\n\n  unsigned f = 0;\n  if (flags & TGLMF_POST_AS_CHANNEL) {\n    f |= 16;\n  }\n  out_int (f);\n\n  out_peer_id (TLS, from_id);\n\n  out_int (CODE_vector);\n  out_int (n);\n  for (i = 0; i < n; i++) {\n    out_int (ids[i].id);\n  }\n\n  struct messages_send_extra *E = talloc0 (sizeof (*E));\n  E->multi = 1;\n  E->count = n;\n  E->list = talloc (sizeof (tgl_message_id_t) * n);\n  out_int (CODE_vector);\n  out_int (n);\n  for (i = 0; i < n; i++) {\n    E->list[i] = tgl_peer_id_to_random_msg_id (id);\n    assert (E->list[i].id);\n    out_long (E->list[i].id);\n  }\n\n  out_peer_id (TLS, id);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n        \n  tfree (ids, n * sizeof (tgl_message_id_t));\n}\n\nvoid tgl_do_forward_message (struct tgl_state *TLS, tgl_peer_id_t peer_id, tgl_message_id_t *_msg_id, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t msg_id = *_msg_id;\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    msg_id = tgl_convert_temp_msg_id (TLS, msg_id);\n  }\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (msg_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not forward messages from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (peer_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not forward messages to secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  \n  clear_packet ();\n  out_int (CODE_messages_forward_message);\n  tgl_peer_id_t from_peer = tgl_msg_id_to_peer_id (msg_id);\n  out_peer_id (TLS, from_peer);\n  out_int (msg_id.id);\n\n  struct messages_send_extra *E = talloc0 (sizeof (*E));\n  E->id = tgl_peer_id_to_random_msg_id (peer_id);\n  out_long (E->id.id);\n\n  out_peer_id (TLS, peer_id);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n}\n\nvoid tgl_do_send_contact (struct tgl_state *TLS, tgl_peer_id_t id, const char *phone, int phone_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not send contact to secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  int reply_id = flags >> 32;\n\n  clear_packet ();\n  out_int (CODE_messages_send_media);\n  out_int (reply_id ? 1 : 0);\n  if (reply_id) { out_int (reply_id); }\n  out_peer_id (TLS, id);\n  out_int (CODE_input_media_contact);\n  out_cstring (phone, phone_len);\n  out_cstring (first_name, first_name_len);\n  out_cstring (last_name, last_name_len);\n\n  struct messages_send_extra *E = talloc0 (sizeof (*E));\n  tglt_secure_random (&E->id, 8);\n  out_long (E->id.id);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n}\n\n\nvoid tgl_do_reply_contact (struct tgl_state *TLS, tgl_message_id_t *_reply_id, const char *phone, int phone_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t reply_id = *_reply_id;\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    reply_id = tgl_convert_temp_msg_id (TLS, reply_id);\n  }\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (reply_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not reply on message from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  tgl_peer_id_t peer_id = tgl_msg_id_to_peer_id (reply_id);\n\n  tgl_do_send_contact (TLS, peer_id, phone, phone_len, first_name, first_name_len, last_name, last_name_len, flags | TGL_SEND_MSG_FLAG_REPLY (reply_id.id), callback, callback_extra);\n}\n\nvoid tgl_do_forward_media (struct tgl_state *TLS, tgl_peer_id_t peer_id, tgl_message_id_t *_msg_id, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (tgl_get_peer_type (peer_id) == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not forward messages to secret chats\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  tgl_message_id_t msg_id = *_msg_id;\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    msg_id = tgl_convert_temp_msg_id (TLS, msg_id);\n  }\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (msg_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not forward message from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n  if (!M || !(M->flags & TGLMF_CREATED) || (M->flags & TGLMF_ENCRYPTED)) {\n    if (!M || !(M->flags & TGLMF_CREATED)) {\n      tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    } else {\n      tgl_set_query_error (TLS, EINVAL, \"can not forward message from secret chat\");\n    }\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (M->media.type != tgl_message_media_photo && M->media.type != tgl_message_media_document && M->media.type != tgl_message_media_audio && M->media.type != tgl_message_media_video) {\n    tgl_set_query_error (TLS, EINVAL, \"can only forward photo/document\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  clear_packet ();\n  out_int (CODE_messages_send_media);\n  int f = 0;\n  if (flags & TGLMF_POST_AS_CHANNEL) {\n    f |= 16;\n  }\n  out_int (f);\n  out_peer_id (TLS, peer_id);\n  switch (M->media.type) {\n  case tgl_message_media_photo:\n    assert (M->media.photo);\n    out_int (CODE_input_media_photo);\n    out_int (CODE_input_photo);\n    out_long (M->media.photo->id);\n    out_long (M->media.photo->access_hash);\n    out_string (\"\");\n    break;\n  case tgl_message_media_document:\n  case tgl_message_media_audio:\n  case tgl_message_media_video:\n    assert (M->media.document);\n    out_int (CODE_input_media_document);\n    out_int (CODE_input_document);\n    out_long (M->media.document->id);\n    out_long (M->media.document->access_hash);\n    out_string (\"\");\n    break;\n  default:\n    assert (0);\n  }\n\n  struct messages_send_extra *E = talloc0 (sizeof (*E));\n  E->id = tgl_peer_id_to_random_msg_id (peer_id);\n  out_long (E->id.id);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Send location */\n\nvoid tgl_do_send_location (struct tgl_state *TLS, tgl_peer_id_t peer_id, double latitude, double longitude, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  if (tgl_get_peer_type (peer_id) == TGL_PEER_ENCR_CHAT) {\n    tgl_do_send_location_encr (TLS, peer_id, latitude, longitude, flags, callback, callback_extra);\n  } else {\n    int reply_id = flags >> 32;\n    clear_packet ();\n    out_int (CODE_messages_send_media);\n    unsigned f = reply_id ? 1 : 0;\n    if (flags & TGLMF_POST_AS_CHANNEL) {\n      f |= 16;\n    }\n    out_int (f);\n    if (reply_id) { out_int (reply_id); }\n    out_peer_id (TLS, peer_id);\n    out_int (CODE_input_media_geo_point);\n    out_int (CODE_input_geo_point);\n    out_double (latitude);\n    out_double (longitude);\n\n    struct messages_send_extra *E = talloc0 (sizeof (*E));\n    E->id = tgl_peer_id_to_random_msg_id (peer_id);\n    out_long (E->id.id);\n\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n  }\n}\n\nvoid tgl_do_reply_location (struct tgl_state *TLS, tgl_message_id_t *_reply_id, double latitude, double longitude, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t reply_id = *_reply_id;\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    reply_id = tgl_convert_temp_msg_id (TLS, reply_id);\n  }\n  if (reply_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  if (reply_id.peer_type == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not reply on message from secret chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  tgl_peer_id_t peer_id = tgl_msg_id_to_peer_id (reply_id);\n\n  tgl_do_send_location (TLS, peer_id, latitude, longitude, flags | TGL_SEND_MSG_FLAG_REPLY (reply_id.id), callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Rename chat */\n\nvoid tgl_do_rename_chat (struct tgl_state *TLS, tgl_peer_id_t id, const char *name, int name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_edit_chat_title);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHAT);\n  out_int (tgl_get_peer_id (id));\n  out_cstring (name, name_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n /* {{{ Rename channel */\n\nvoid tgl_do_rename_channel (struct tgl_state *TLS, tgl_peer_id_t id, const char *name, int name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_edit_title);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  out_cstring (name, name_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n /* {{{ Join channel */\n\nvoid tgl_do_join_channel (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_join_channel);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Leave channel */\n\nvoid tgl_do_leave_channel (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_leave_channel);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ channel change about */\n\nstatic int channels_set_about_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods channels_set_about_methods = {\n  .on_answer = channels_set_about_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"channels set about\"\n};\n\nvoid tgl_do_channel_set_about (struct tgl_state *TLS, tgl_peer_id_t id, const char *about, int about_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_edit_about);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  out_cstring (about, about_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &channels_set_about_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Channel set username */\nvoid tgl_do_channel_set_username (struct tgl_state *TLS, tgl_peer_id_t id, const char *username, int username_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_update_username);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  out_cstring (username, username_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &channels_set_about_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Channel set admin */\nvoid tgl_do_channel_set_admin (struct tgl_state *TLS, tgl_peer_id_t channel_id, tgl_peer_id_t user_id, int type, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_edit_admin);\n  assert (tgl_get_peer_type (channel_id) == TGL_PEER_CHANNEL);\n  assert (tgl_get_peer_type (user_id) == TGL_PEER_USER);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (channel_id));\n  out_long (channel_id.access_hash);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (user_id));\n  out_long (user_id.access_hash);\n  switch (type) {\n  case 1:\n    out_int (CODE_channel_role_moderator);\n    break;\n  case 2:\n    out_int (CODE_channel_role_editor);\n    break;\n  default:\n    out_int (CODE_channel_role_empty);\n    break;\n  }\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Channel members */\nstruct channel_get_members_extra {\n  int size;\n  int count;\n  struct tgl_user **UL;\n  int type;\n  int offset;\n  int limit;\n  tgl_peer_id_t id;\n};\n\nvoid _tgl_do_channel_get_members  (struct tgl_state *TLS, struct channel_get_members_extra *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *UL[]), void *callback_extra);\n\nstatic int channels_get_members_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_channels_channel_participants *DS_CP = D;\n  \n  int count = DS_LVAL (DS_CP->participants->cnt);\n\n  struct channel_get_members_extra *E = q->extra;\n\n\n  if (E->count + count > E->size) {\n    E->UL = trealloc (E->UL, E->size * sizeof (void *), (E->count + count) * sizeof (void *));\n    E->size = E->count + count;\n  }\n  int i;\n  for (i = 0; i < DS_LVAL (DS_CP->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_CP->users->data[i]);\n  }\n  for (i = 0; i < count; i++) {\n    E->UL[E->count ++] = (void *)tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_CP->participants->data[i]->user_id)));\n  }\n  E->offset += count;\n  \n  if (!count || E->count == E->limit) {\n    ((void (*)(struct tgl_state *, void *, int, int, struct tgl_user **))q->callback)(TLS, q->callback_extra, 1, E->count, E->UL);\n    tfree (E->UL, E->size * sizeof (void *));\n    tfree (E, sizeof (*E));    \n    return 0;\n  }\n  _tgl_do_channel_get_members (TLS, E, q->callback, q->callback_extra);\n  return 0;\n}\n\nstatic int channels_get_members_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int, int, void *))(q->callback))(TLS, q->callback_extra, 0, 0, NULL);\n  }\n  \n  struct channel_get_members_extra *E = q->extra;\n  tfree (E->UL, E->size * sizeof (void *));\n  tfree (E, sizeof (*E));    \n\n  return 0;\n}\n\nstatic struct query_methods channels_get_members_methods = {\n  .on_answer = channels_get_members_on_answer,\n  .on_error = channels_get_members_on_error,\n  .type = TYPE_TO_PARAM(channels_channel_participants),\n  .name = \"channels get members\"\n};\n\nvoid _tgl_do_channel_get_members  (struct tgl_state *TLS, struct channel_get_members_extra *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *UL[]), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_get_participants);\n  assert (tgl_get_peer_type (E->id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (E->id.peer_id);\n  out_long (E->id.access_hash);\n\n  switch (E->type) {\n  case 1:\n  case 2:\n    out_int (CODE_channel_participants_admins);\n    break;\n  case 3:\n    out_int (CODE_channel_participants_kicked);\n    break;\n  default:\n    out_int (CODE_channel_participants_recent);\n    break;\n  }\n  out_int (E->offset);\n  out_int (E->limit);\n  \n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &channels_get_members_methods, E, callback, callback_extra);\n}\n\nvoid tgl_do_channel_get_members  (struct tgl_state *TLS, tgl_peer_id_t channel_id, int limit, int offset, int type, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *UL[]), void *callback_extra) {\n  struct channel_get_members_extra *E = talloc0 (sizeof (*E));\n  E->type = type;\n  E->id = channel_id;\n  E->limit = limit;\n  E->offset = offset;\n  _tgl_do_channel_get_members (TLS, E, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Chat info */\n\nstatic int chat_info_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_chat *C = tglf_fetch_alloc_chat_full (TLS, D);\n  //print_chat_info (C);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_chat *))q->callback) (TLS, q->callback_extra, 1, C);\n  }\n  return 0;\n}\n\nstatic struct query_methods chat_info_methods = {\n  .on_answer = chat_info_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(messages_chat_full),\n  .name = \"chat info\"\n};\n\nvoid tgl_do_get_chat_info (struct tgl_state *TLS, tgl_peer_id_t id, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_chat *C), void *callback_extra) {\n  if (offline_mode) {\n    tgl_peer_t *C = tgl_peer_get (TLS, id);\n    if (!C) {\n      tgl_set_query_error (TLS, EINVAL, \"unknown chat id\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n    } else {\n      if (callback) {\n        callback (TLS, callback_extra, 1, &C->chat);\n      }\n    }\n    return;\n  }\n  clear_packet ();\n  out_int (CODE_messages_get_full_chat);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHAT);\n  out_int (tgl_get_peer_id (id));\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &chat_info_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Channel info */\n\nstatic int channel_info_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_channel *C = tglf_fetch_alloc_channel_full (TLS, D);\n  //print_chat_info (C);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_channel *))q->callback) (TLS, q->callback_extra, 1, C);\n  }\n  return 0;\n}\n\nstatic struct query_methods channel_info_methods = {\n  .on_answer = channel_info_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(messages_chat_full),\n  .name = \"channel info\"\n};\n\nvoid tgl_do_get_channel_info (struct tgl_state *TLS, tgl_peer_id_t id, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_channel *C), void *callback_extra) {\n  if (offline_mode) {\n    tgl_peer_t *C = tgl_peer_get (TLS, id);\n    if (!C) {\n      tgl_set_query_error (TLS, EINVAL, \"unknown chat id\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n    } else {\n      if (callback) {\n        callback (TLS, callback_extra, 1, &C->channel);\n      }\n    }\n    return;\n  }\n  clear_packet ();\n  out_int (CODE_channels_get_full_channel);\n  assert (tgl_get_peer_type (id) == TGL_PEER_CHANNEL);\n  out_int (CODE_input_channel);\n  out_int (id.peer_id);\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &channel_info_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ User info */\n\nstatic int user_info_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_user *U = tglf_fetch_alloc_user_full (TLS, D);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_user *))q->callback) (TLS, q->callback_extra, 1, U);\n  }\n  return 0;\n}\n\nstatic struct query_methods user_info_methods = {\n  .on_answer = user_info_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(user_full),\n  .name = \"user info\"\n};\n\nvoid tgl_do_get_user_info (struct tgl_state *TLS, tgl_peer_id_t id, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_USER) {\n    tgl_set_query_error (TLS, EINVAL, \"id should be user id\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n  if (offline_mode) {\n    tgl_peer_t *C = tgl_peer_get (TLS, id);\n    if (!C) {\n      tgl_set_query_error (TLS, EINVAL, \"unknown user id\");\n      if (callback) {\n        callback (TLS, callback_extra, 0, 0);\n      }\n    } else {\n      if (callback) {\n        callback (TLS, callback_extra, 1, &C->user);\n      }\n    }\n    return;\n  }\n  clear_packet ();\n  out_int (CODE_users_get_full_user);\n  assert (tgl_get_peer_type (id) == TGL_PEER_USER);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &user_info_methods, 0, callback, callback_extra);\n}\n\nstatic void resend_query_cb (struct tgl_state *TLS, void *_q, int success) {\n  assert (success);\n\n  bl_do_dc_signed (TLS, TLS->DC_working->id);\n\n  struct query *q = _q;\n\n  clear_packet ();\n  out_int (CODE_users_get_full_user);\n  out_int (CODE_input_user_self);\n  tglq_send_query (TLS, q->DC, packet_ptr - packet_buffer, packet_buffer, &user_info_methods, 0, q->callback, q->callback_extra);\n\n  tfree (q->data, 4 * q->data_len);\n  TLS->timer_methods->free (q->ev);\n  tfree (q, sizeof (*q));\n}\n/* }}} */\n\n/* {{{ Load photo/video */\nstruct download {\n  int offset;\n  int size;\n  long long volume;\n  long long secret;\n  long long access_hash;\n  int local_id;\n  int dc;\n  int next;\n  int fd;\n  char *name;\n  char *ext;\n  long long id;\n  unsigned char *iv;\n  unsigned char *key;\n  int type;\n  int refcnt;\n};\n\n\nstatic void end_load (struct tgl_state *TLS, struct download *D, void *callback, void *callback_extra) {\n  TLS->cur_downloading_bytes -= D->size;\n  TLS->cur_downloaded_bytes -= D->size;\n\n  if (D->fd >= 0) {\n    close (D->fd);\n  }\n\n  if (callback) {\n    ((void (*)(struct tgl_state *, void *, int, char *))callback) (TLS, callback_extra, 1, D->name);\n  }\n\n  if (D->iv) {\n    tfree_secure (D->iv, 32);\n  }\n  tfree_str (D->name);\n  tfree (D, sizeof (*D));\n}\n\nstatic void load_next_part (struct tgl_state *TLS, struct download *D, void *callback, void *callback_extra);\nstatic int download_on_answer (struct tgl_state *TLS, struct query *q, void *DD) {\n  struct tl_ds_upload_file *DS_UF = DD;\n\n  struct download *D = q->extra;\n  if (D->fd == -1) {\n    D->fd = open (D->name, O_CREAT | O_WRONLY | O_BINARY, 0640);\n    if (D->fd < 0) {\n      tgl_set_query_error (TLS, EBADF, \"Can not open file for writing: %s\", strerror(errno));\n      if (q->callback) {\n        ((void (*)(struct tgl_state *, void *, int, char *))q->callback) (TLS, q->callback_extra, 0, NULL);\n      }\n\n      if (D->iv) {\n        tfree_secure (D->iv, 32);\n      }\n      tfree_str (D->name);\n      if (D->ext) {\n        tfree_str (D->ext);\n      }\n      tfree (D, sizeof (*D));\n      return 0;\n    }\n  }\n\n  int len = DS_UF->bytes->len;\n  TLS->cur_downloaded_bytes += len;\n  //update_prompt ();\n\n  if (D->iv) {\n    assert (!(len & 15));\n    void *ptr = DS_UF->bytes->data;\n\n    TGLC_aes_key aes_key;\n    TGLC_aes_set_decrypt_key (D->key, 256, &aes_key);\n    TGLC_aes_ige_encrypt (ptr, ptr, len, &aes_key, D->iv, 0);\n    memset (&aes_key, 0, sizeof (aes_key));\n    if (len > D->size - D->offset) {\n      len = D->size - D->offset;\n    }\n    assert (write (D->fd, ptr, len) == len);\n  } else {\n    assert (write (D->fd, DS_UF->bytes->data, len) == len);\n  }\n\n  D->offset += len;\n  D->refcnt --;\n  if (D->offset < D->size) {\n    load_next_part (TLS, D, q->callback, q->callback_extra);\n    return 0;\n  } else {\n    if (!D->refcnt) {\n      end_load (TLS, D, q->callback, q->callback_extra);\n    }\n    return 0;\n  }\n}\n\nstatic int download_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n\n  struct download *D = q->extra;\n  if (D->fd >= 0) {\n    close (D->fd);\n  }\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, char *))q->callback) (TLS, q->callback_extra, 0, NULL);\n  }\n\n  if (D->iv) {\n    tfree_secure (D->iv, 32);\n  }\n  tfree_str (D->name);\n  if (D->ext) {\n    tfree_str (D->ext);\n  }\n  tfree (D, sizeof (*D));\n  return 0;\n}\n\nstatic struct query_methods download_methods = {\n  .on_answer = download_on_answer,\n  .on_error = download_on_error,\n  .type = TYPE_TO_PARAM(upload_file),\n  .name = \"download part\"\n};\n\nstatic void load_next_part (struct tgl_state *TLS, struct download *D, void *callback, void *callback_extra) {\n  if (!D->offset) {\n    static char buf[PATH_MAX];\n    int l;\n    if (!D->id) {\n      l = tsnprintf (buf, sizeof (buf), \"%s/download_%\" INT64_PRINTF_MODIFIER \"d_%d.jpg\", TLS->downloads_directory, D->volume, D->local_id);\n    } else {\n      if (D->ext) {\n        l = tsnprintf (buf, sizeof (buf), \"%s/download_%\" INT64_PRINTF_MODIFIER \"d.%s\", TLS->downloads_directory, D->id, D->ext);\n      } else {\n        l = tsnprintf (buf, sizeof (buf), \"%s/download_%\" INT64_PRINTF_MODIFIER \"d\", TLS->downloads_directory, D->id);\n      }\n    }\n    if (l >= (int) sizeof (buf)) {\n      vlogprintf (E_ERROR, \"Download filename is too long\");\n      assert (0);\n    }\n    D->name = tstrdup (buf);\n    struct stat st;\n    if (stat (buf, &st) >= 0) {\n      D->offset = st.st_size;\n      if (D->offset >= D->size) {\n        TLS->cur_downloading_bytes += D->size;\n        TLS->cur_downloaded_bytes += D->offset;\n        vlogprintf (E_NOTICE, \"Already downloaded\\n\");\n        end_load (TLS, D, callback, callback_extra);\n        return;\n      }\n    }\n\n    TLS->cur_downloading_bytes += D->size;\n    TLS->cur_downloaded_bytes += D->offset;\n    //update_prompt ();\n  }\n  D->refcnt ++;\n  clear_packet ();\n  out_int (CODE_upload_get_file);\n  if (!D->id) {\n    out_int (CODE_input_file_location);\n    out_long (D->volume);\n    out_int (D->local_id);\n    out_long (D->secret);\n  } else {\n    if (D->iv) {\n      out_int (CODE_input_encrypted_file_location);\n    } else {\n      out_int (D->type);\n    }\n    out_long (D->id);\n    out_long (D->access_hash);\n  }\n  out_int (D->offset);\n  out_int (D->size ? (1 << 14) : (1 << 19));\n  tglq_send_query (TLS, TLS->DC_list[D->dc], packet_ptr - packet_buffer, packet_buffer, &download_methods, D, callback, callback_extra);\n  //tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &download_methods, D);\n}\n\nvoid tgl_do_load_photo_size (struct tgl_state *TLS, struct tgl_photo_size *P, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  if (!P->loc.dc) {\n    vlogprintf (E_WARNING, \"Bad video thumb\\n\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  assert (P);\n  struct download *D = talloc0 (sizeof (*D));\n  D->id = 0;\n  D->offset = 0;\n  D->size = P->size;\n  D->volume = P->loc.volume;\n  D->dc = P->loc.dc;\n  D->local_id = P->loc.local_id;\n  D->secret = P->loc.secret;\n  D->name = 0;\n  D->fd = -1;\n  load_next_part (TLS, D, callback, callback_extra);\n}\n\nvoid tgl_do_load_file_location (struct tgl_state *TLS, struct tgl_file_location *P, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  if (!P->dc) {\n    tgl_set_query_error (TLS, EINVAL, \"Bad file location\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n\n  assert (P);\n  struct download *D = talloc0 (sizeof (*D));\n  D->id = 0;\n  D->offset = 0;\n  D->size = 0;\n  D->volume = P->volume;\n  D->dc = P->dc;\n  D->local_id = P->local_id;\n  D->secret = P->secret;\n  D->name = 0;\n  D->fd = -1;\n  load_next_part (TLS, D, callback, callback_extra);\n}\n\nvoid tgl_do_load_photo (struct tgl_state *TLS, struct tgl_photo *photo, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  if (!photo->sizes_num) {\n    tgl_set_query_error (TLS, EINVAL, \"Bad photo (no photo sizes\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0);\n    }\n    return;\n  }\n  int max = -1;\n  int maxi = 0;\n  int i;\n  for (i = 0; i < photo->sizes_num; i++) {\n    if (photo->sizes[i].w + photo->sizes[i].h > max) {\n      max = photo->sizes[i].w + photo->sizes[i].h;\n      maxi = i;\n    }\n  }\n  tgl_do_load_photo_size (TLS, &photo->sizes[maxi], callback, callback_extra);\n}\n\nvoid tgl_do_load_document_thumb (struct tgl_state *TLS, struct tgl_document *video, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  tgl_do_load_photo_size (TLS, &video->thumb, callback, callback_extra);\n}\n\nstatic void _tgl_do_load_document (struct tgl_state *TLS, struct tgl_document *V, struct download *D, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  assert (V);\n  D->offset = 0;\n  D->size = V->size;\n  D->id = V->id;\n  D->access_hash = V->access_hash;\n  D->dc = V->dc_id;\n  D->name = 0;\n  D->fd = -1;\n  \n  if (V->mime_type) {\n    char *r = tg_extension_by_mime (V->mime_type);\n    if (r) {\n      D->ext = tstrdup (r);\n    }\n  }\n  load_next_part (TLS, D, callback, callback_extra);\n}\n\nvoid tgl_do_load_document (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  \n  struct download *D = talloc0 (sizeof (*D));\n  D->type = CODE_input_document_file_location;\n  \n  _tgl_do_load_document (TLS, V, D, callback, callback_extra);\n}\n\nvoid tgl_do_load_video (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n\n  struct download *D = talloc0 (sizeof (*D));\n  D->type = CODE_input_video_file_location;\n  \n  _tgl_do_load_document (TLS, V, D, callback, callback_extra);\n}\n\nvoid tgl_do_load_audio (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  \n  struct download *D = talloc0 (sizeof (*D));\n  D->type = CODE_input_audio_file_location;\n\n  _tgl_do_load_document (TLS, V, D, callback, callback_extra);\n}\n\nvoid tgl_do_load_encr_document (struct tgl_state *TLS, struct tgl_encr_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra) {\n  assert (V);\n  struct download *D = talloc0 (sizeof (*D));\n  D->offset = 0;\n  D->size = V->size;\n  D->id = V->id;\n  D->access_hash = V->access_hash;\n  D->dc = V->dc_id;\n  D->name = 0;\n  D->fd = -1;\n  D->key = V->key;\n  D->iv = talloc (32);\n  memcpy (D->iv, V->iv, 32);\n  if (V->mime_type) {\n    char *r = tg_extension_by_mime (V->mime_type);\n    if (r) {\n      D->ext = tstrdup (r);\n    }\n  }\n  load_next_part (TLS, D, callback, callback_extra);\n\n  unsigned char md5[16];\n  unsigned char str[64];\n  memcpy (str, V->key, 32);\n  memcpy (str + 32, V->iv, 32);\n  TGLC_md5 (str, 64, md5);\n  assert (V->key_fingerprint == ((*(int *)md5) ^ (*(int *)(md5 + 4))));\n}\n/* }}} */\n\n/* {{{ Export auth */\n\nstatic int import_auth_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_auth_authorization *DS_U = D;\n  tglf_fetch_alloc_user (TLS, DS_U->user);\n\n  bl_do_dc_signed (TLS, ((struct tgl_dc *)q->extra)->id);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods import_auth_methods = {\n  .on_answer = import_auth_on_answer,\n  .on_error = fail_on_error,\n  .type = TYPE_TO_PARAM(auth_authorization),\n  .name = \"import authorization\"\n};\n\nstatic int export_auth_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_auth_exported_authorization *DS_EA = D;\n\n  bl_do_set_our_id (TLS, TGL_MK_USER (DS_LVAL (DS_EA->id)));\n\n\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_auth_import_authorization);\n  out_int (tgl_get_peer_id (TLS->our_id));\n  out_cstring (DS_STR (DS_EA->bytes));\n  tglq_send_query (TLS, q->extra, packet_ptr - packet_buffer, packet_buffer, &import_auth_methods, q->extra, q->callback, q->callback_extra);\n  return 0;\n}\n\nstatic struct query_methods export_auth_methods = {\n  .on_answer = export_auth_on_answer,\n  .on_error = fail_on_error,\n  .type = TYPE_TO_PARAM(auth_exported_authorization),\n  .name = \"export authorization\"\n};\n\nvoid tgl_do_export_auth (struct tgl_state *TLS, int num, void (*callback) (struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_auth_export_authorization);\n  out_int (num);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &export_auth_methods, TLS->DC_list[num], callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Add contact */\nstatic int add_contact_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_contacts_imported_contacts *DS_CIC = D;\n\n  if (DS_LVAL (DS_CIC->imported->cnt) > 0) {\n    vlogprintf (E_DEBUG, \"Added successfully\");\n  } else {\n    vlogprintf (E_DEBUG, \"Not added\");\n  }\n\n  int n = DS_LVAL (DS_CIC->users->cnt);\n\n  struct tgl_user **UL = talloc (n * sizeof (void *));\n  int i;\n  for (i = 0; i < n; i++) {\n    UL[i] = tglf_fetch_alloc_user (TLS, DS_CIC->users->data[i]);\n  }\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, int, struct tgl_user **))q->callback) (TLS, q->callback_extra, 1, n, UL);\n  }\n  tfree (UL, n * sizeof (void *));\n  return 0;\n}\n\nstatic struct query_methods add_contact_methods = {\n  .on_answer = add_contact_on_answer,\n  .on_error = q_list_on_error,\n  .type = TYPE_TO_PARAM(contacts_imported_contacts),\n  .name = \"add contact\"\n};\n\nvoid tgl_do_add_contact (struct tgl_state *TLS, const char *phone, int phone_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, int force, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, int size, struct tgl_user *users[]), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_contacts_import_contacts);\n  out_int (CODE_vector);\n  out_int (1);\n  out_int (CODE_input_phone_contact);\n  long long r;\n  tglt_secure_random (&r, 8);\n  out_long (r);\n  out_cstring (phone, phone_len);\n  out_cstring (first_name, first_name_len);\n  out_cstring (last_name, last_name_len);\n  out_int (force ? CODE_bool_true : CODE_bool_false);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &add_contact_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Del contact */\nstatic int del_contact_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods del_contact_methods = {\n  .on_answer = del_contact_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(contacts_link),\n  .name = \"del contact\"\n};\n\nvoid tgl_do_del_contact (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_USER) {\n    tgl_set_query_error (TLS, EINVAL, \"id should be user id\");\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n  clear_packet ();\n  out_int (CODE_contacts_delete_contact);\n\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &del_contact_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Msg search */\n\nstruct msg_search_extra {\n  struct tgl_message **ML;\n  int list_offset;\n  int list_size;\n  tgl_peer_id_t id;\n  int limit;\n  int offset;\n  int from;\n  int to;\n  int max_id;\n  char *query;\n};\n\nstatic void _tgl_do_msg_search (struct tgl_state *TLS, struct msg_search_extra *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra);\n\nstatic int msg_search_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_messages *DS_MM = D;\n  \n  int i;\n  for (i = 0; i < DS_LVAL (DS_MM->chats->cnt); i++) {\n    tglf_fetch_alloc_chat (TLS, DS_MM->chats->data[i]);\n  }\n  for (i = 0; i < DS_LVAL (DS_MM->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_MM->users->data[i]);\n  }\n\n  struct msg_search_extra *E = q->extra;\n\n  int n = DS_LVAL (DS_MM->messages->cnt);\n\n  if (E->list_size - E->list_offset < n) {\n    int new_list_size = 2 * E->list_size;\n    if (new_list_size - E->list_offset < n) {\n      new_list_size = n + E->list_offset;\n    }\n    E->ML = trealloc (E->ML, E->list_size * sizeof (void *), new_list_size * sizeof (void *));\n    assert (E->ML);\n    E->list_size = new_list_size;\n  }\n\n  for (i = 0; i < n; i++) {\n    E->ML[i + E->list_offset] = tglf_fetch_alloc_message (TLS, DS_MM->messages->data[i], NULL);\n  }\n  E->list_offset += n;\n  E->offset += n;\n  E->limit -= n;\n  if (E->limit + E->offset >= DS_LVAL (DS_MM->count)) {\n    E->limit = DS_LVAL (DS_MM->count) - E->offset;\n    if (E->limit < 0) { E->limit = 0; }\n  }\n  assert (E->limit >= 0);\n\n  if (E->limit <= 0 || DS_MM->magic == CODE_messages_messages) {\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int, int, struct tgl_message **))q->callback) (TLS, q->callback_extra, 1, E->list_offset, E->ML);\n    }\n\n    tfree_str (E->query);\n    tfree (E->ML, sizeof (void *) * E->list_size);\n    tfree (E, sizeof (*E));\n  } else {\n    E->max_id = E->ML[E->list_offset - 1]->permanent_id.id;\n    E->offset = 0;\n    _tgl_do_msg_search (TLS, E, q->callback, q->callback_extra);\n  }\n  return 0;\n}\n\nstatic int msg_search_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n\n  struct msg_search_extra *E = q->extra;\n  tfree_str (E->query);\n  tfree (E->ML, sizeof (void *) * E->list_size);\n  tfree (E, sizeof (*E));\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, int, struct tgl_message **))q->callback) (TLS, q->callback_extra, 0, 0, NULL);\n  }\n  return 0;\n}\n\nstatic struct query_methods msg_search_methods = {\n  .on_answer = msg_search_on_answer,\n  .on_error = msg_search_on_error,\n  .type = TYPE_TO_PARAM(messages_messages),\n  .name = \"messages search\"\n};\n\nstatic void _tgl_do_msg_search (struct tgl_state *TLS, struct msg_search_extra *E, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra) {\n  clear_packet ();\n  if (tgl_get_peer_type (E->id) == TGL_PEER_UNKNOWN) {\n    out_int (CODE_messages_search_global);\n    out_string (E->query);\n    out_int (0);\n    out_int (CODE_input_peer_empty);\n    out_int (E->offset);\n    out_int (E->limit);\n  } else {\n    out_int (CODE_messages_search);\n    out_int (0);\n    out_peer_id (TLS, E->id);\n\n    out_string (E->query);\n    out_int (CODE_input_messages_filter_empty);\n    out_int (E->from);\n    out_int (E->to);\n    out_int (E->offset); // offset\n    out_int (E->max_id); // max_id\n    out_int (E->limit);\n  }\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &msg_search_methods, E, callback, callback_extra);\n}\n\nvoid tgl_do_msg_search (struct tgl_state *TLS, tgl_peer_id_t id, int from, int to, int limit, int offset, const char *pattern, int pattern_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra) {\n  if (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"can not search in secret chats\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, 0, 0);\n    }\n    return;\n  }\n  struct msg_search_extra *E = talloc0 (sizeof (*E));\n  E->id = id;\n  E->from = from;\n  E->to = to;\n  E->limit = limit;\n  E->offset = offset;\n  E->query = tstrndup (pattern, pattern_len);\n\n  _tgl_do_msg_search (TLS, E, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Get difference */\n\nstatic int get_state_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_updates_state *DS_US = D;\n\n  assert (TLS->locks & TGL_LOCK_DIFF);\n  TLS->locks ^= TGL_LOCK_DIFF;\n\n  bl_do_set_pts (TLS, DS_LVAL (DS_US->pts));\n  bl_do_set_qts (TLS, DS_LVAL (DS_US->qts));\n  bl_do_set_date (TLS, DS_LVAL (DS_US->date));\n  bl_do_set_seq (TLS, DS_LVAL (DS_US->seq));\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic int lookup_state_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_updates_state *DS_US = D;\n  int pts = DS_LVAL (DS_US->pts);\n  int qts = DS_LVAL (DS_US->qts);\n  int seq = DS_LVAL (DS_US->seq);\n\n  if (pts > TLS->pts || qts > TLS->qts || seq > TLS->seq) {\n    tgl_do_get_difference (TLS, 0, 0, 0);\n  }\n  return 0;\n}\n\n\n//int get_difference_active;\nstatic int get_difference_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_updates_difference *DS_UD = D;\n\n  assert (TLS->locks & TGL_LOCK_DIFF);\n  TLS->locks ^= TGL_LOCK_DIFF;\n\n  if (DS_UD->magic == CODE_updates_difference_empty) {\n    bl_do_set_date (TLS, DS_LVAL (DS_UD->date));\n    bl_do_set_seq (TLS, DS_LVAL (DS_UD->seq));\n\n    vlogprintf (E_DEBUG, \"Empty difference. Seq = %d\\n\", TLS->seq);\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n    }\n  } else {\n    int i;\n\n    for (i = 0; i < DS_LVAL (DS_UD->users->cnt); i++) {\n      tglf_fetch_alloc_user (TLS, DS_UD->users->data[i]);\n    }\n    for (i = 0; i < DS_LVAL (DS_UD->chats->cnt); i++) {\n      tglf_fetch_alloc_chat (TLS, DS_UD->chats->data[i]);\n    }\n\n    int ml_pos = DS_LVAL (DS_UD->new_messages->cnt);\n    struct tgl_message **ML = talloc (ml_pos * sizeof (void *));\n    for (i = 0; i < ml_pos; i++) {\n      ML[i] = tglf_fetch_alloc_message (TLS, DS_UD->new_messages->data[i], NULL);\n    }\n\n    int el_pos = DS_LVAL (DS_UD->new_encrypted_messages->cnt);\n    struct tgl_message **EL = talloc (el_pos * sizeof (void *));\n    for (i = 0; i < el_pos; i++) {\n      EL[i] = tglf_fetch_alloc_encrypted_message (TLS, DS_UD->new_encrypted_messages->data[i]);\n    }\n\n    for (i = 0; i < DS_LVAL (DS_UD->other_updates->cnt); i++) {\n      tglu_work_update (TLS, 1, DS_UD->other_updates->data[i]);\n    }\n\n    for (i = 0; i < DS_LVAL (DS_UD->other_updates->cnt); i++) {\n      tglu_work_update (TLS, -1, DS_UD->other_updates->data[i]);\n    }\n\n    for (i = 0; i < ml_pos; i++) {\n      bl_do_msg_update (TLS, &ML[i]->permanent_id);\n    }\n    for (i = 0; i < el_pos; i++) {\n      // messages to secret chats that no longer exist are not initialized and NULL\n      if (EL[i]) {\n        bl_do_msg_update (TLS, &EL[i]->permanent_id);\n      }\n    }\n\n    tfree (ML, ml_pos * sizeof (void *));\n    tfree (EL, el_pos * sizeof (void *));\n\n    if (DS_UD->state) {\n      bl_do_set_pts (TLS, DS_LVAL (DS_UD->state->pts));\n      bl_do_set_qts (TLS, DS_LVAL (DS_UD->state->qts));\n      bl_do_set_date (TLS, DS_LVAL (DS_UD->state->date));\n      bl_do_set_seq (TLS, DS_LVAL (DS_UD->state->seq));\n\n      if (q->callback) {\n        ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n      }\n    } else {\n      bl_do_set_pts (TLS, DS_LVAL (DS_UD->intermediate_state->pts));\n      bl_do_set_qts (TLS, DS_LVAL (DS_UD->intermediate_state->qts));\n      bl_do_set_date (TLS, DS_LVAL (DS_UD->intermediate_state->date));\n\n      tgl_do_get_difference (TLS, 0, q->callback, q->callback_extra);\n    }\n  }\n  return 0;\n}\n\nstatic struct query_methods lookup_state_methods = {\n  .on_answer = lookup_state_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(updates_state),\n  .name = \"lookup state\"\n};\n\nstatic struct query_methods get_state_methods = {\n  .on_answer = get_state_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(updates_state),\n  .name = \"get state\"\n};\n\nstatic struct query_methods get_difference_methods = {\n  .on_answer = get_difference_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(updates_difference),\n  .name = \"get difference\"\n};\n\nvoid tgl_do_lookup_state (struct tgl_state *TLS) {\n  if (TLS->locks & TGL_LOCK_DIFF) {\n    return;\n  }\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_updates_get_state);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &lookup_state_methods, 0, 0, 0);\n}\n\nvoid tgl_do_get_difference (struct tgl_state *TLS, int sync_from_start, void (*callback)(struct tgl_state *tls, void *callback_extra, int success), void *callback_extra) {\n  //get_difference_active = 1;\n  //difference_got = 0;\n  if (TLS->locks & TGL_LOCK_DIFF) {\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n  TLS->locks |= TGL_LOCK_DIFF;\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  if (TLS->pts > 0 || sync_from_start) {\n    if (TLS->pts == 0) { TLS->pts = 1; }\n    //if (TLS->qts == 0) { TLS->qts = 1; }\n    if (TLS->date == 0) { TLS->date = 1; }\n    out_int (CODE_updates_get_difference);\n    out_int (TLS->pts);\n    out_int (TLS->date);\n    out_int (TLS->qts);\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_difference_methods, 0, callback, callback_extra);\n  } else {\n    out_int (CODE_updates_get_state);\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_state_methods, 0, callback, callback_extra);\n  }\n}\n/* }}} */\n\n/* {{{ Get channel difference */\nvoid tgl_do_get_channel_difference (struct tgl_state *TLS, int id, void (*callback)(struct tgl_state *tls, void *callback_extra, int success), void *callback_extra);\n\nstatic int get_channel_difference_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_updates_channel_difference *DS_UD = D;\n\n  tgl_peer_t *E = q->extra;\n\n  assert (E->flags & TGLCHF_DIFF);\n  E->flags ^= TGLCHF_DIFF;\n\n  if (DS_UD->magic == CODE_updates_channel_difference_empty) {\n    bl_do_set_channel_pts (TLS, tgl_get_peer_id (E->id), DS_LVAL (DS_UD->channel_pts));\n\n    vlogprintf (E_DEBUG, \"Empty difference. Seq = %d\\n\", TLS->seq);\n    if (q->callback) {\n      ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n    }\n  } else {\n    int i;\n\n    for (i = 0; i < DS_LVAL (DS_UD->users->cnt); i++) {\n      tglf_fetch_alloc_user (TLS, DS_UD->users->data[i]);\n    }\n    for (i = 0; i < DS_LVAL (DS_UD->chats->cnt); i++) {\n      tglf_fetch_alloc_chat (TLS, DS_UD->chats->data[i]);\n    }\n\n    int ml_pos = DS_LVAL (DS_UD->new_messages->cnt);\n    struct tgl_message **ML = talloc (ml_pos * sizeof (void *));\n    for (i = 0; i < ml_pos; i++) {\n      ML[i] = tglf_fetch_alloc_message (TLS, DS_UD->new_messages->data[i], NULL);\n    }\n\n    for (i = 0; i < DS_LVAL (DS_UD->other_updates->cnt); i++) {\n      tglu_work_update (TLS, 1, DS_UD->other_updates->data[i]);\n    }\n\n    for (i = 0; i < DS_LVAL (DS_UD->other_updates->cnt); i++) {\n      tglu_work_update (TLS, -1, DS_UD->other_updates->data[i]);\n    }\n\n    for (i = 0; i < ml_pos; i++) {\n      bl_do_msg_update (TLS, &ML[i]->permanent_id);\n    }\n\n    tfree (ML, ml_pos * sizeof (void *));\n\n    bl_do_set_channel_pts (TLS, tgl_get_peer_id (E->id), DS_LVAL (DS_UD->channel_pts));\n    if (DS_UD->magic != CODE_updates_channel_difference_too_long) {\n      if (q->callback) {\n        ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n      }\n    } else {\n      tgl_do_get_channel_difference (TLS, tgl_get_peer_id (E->id), q->callback, q->callback_extra);\n    }\n  }\n  return 0;\n}\n\nstatic struct query_methods get_channel_difference_methods = {\n  .on_answer = get_channel_difference_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(updates_channel_difference),\n  .name = \"get channel difference\"\n};\n\nvoid tgl_do_get_channel_difference (struct tgl_state *TLS, int id, void (*callback)(struct tgl_state *tls, void *callback_extra, int success), void *callback_extra) {\n  tgl_peer_t *E = tgl_peer_get (TLS, TGL_MK_CHANNEL (id));\n\n  if (!E || !(E->flags & TGLPF_CREATED) || !E->channel.pts) { \n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n  //get_difference_active = 1;\n  //difference_got = 0;\n  if (E->flags & TGLCHF_DIFF) {\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n  E->flags |= TGLCHF_DIFF;\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n\n  out_int (CODE_updates_get_channel_difference);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (E->id));\n  out_long (E->channel.access_hash);\n\n  out_int (CODE_channel_messages_filter_empty);\n  out_int (E->channel.pts);\n  out_int (100);\n  \n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_channel_difference_methods, E, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Visualize key */\n\nint tgl_do_visualize_key (struct tgl_state *TLS, tgl_peer_id_t id, unsigned char buf[16]) {\n  assert (tgl_get_peer_type (id) == TGL_PEER_ENCR_CHAT);\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  assert (P);\n  if (P->encr_chat.state != sc_ok) {\n    vlogprintf (E_WARNING, \"Chat is not initialized yet\\n\");\n    return -1;\n  }\n  memcpy (buf, P->encr_chat.first_key_sha, 16);\n  return 0;\n}\n/* }}} */\n\n/* {{{ Add user to chat */\n\nvoid tgl_do_add_user_to_chat (struct tgl_state *TLS, tgl_peer_id_t chat_id, tgl_peer_id_t id, int limit, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_add_chat_user);\n  out_int (tgl_get_peer_id (chat_id));\n\n  assert (tgl_get_peer_type (id) == TGL_PEER_USER);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  out_int (limit);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\nvoid tgl_do_del_user_from_chat (struct tgl_state *TLS, tgl_peer_id_t chat_id, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_delete_chat_user);\n  out_int (tgl_get_peer_id (chat_id));\n\n  assert (tgl_get_peer_type (id) == TGL_PEER_USER);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\n/* }}} */\n\n/* {{{ Add user to channel */\n\nvoid tgl_do_channel_invite_user (struct tgl_state *TLS, tgl_peer_id_t channel_id, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_invite_to_channel);\n  out_int (CODE_input_channel);\n  out_int (channel_id.peer_id);\n  out_long (channel_id.access_hash);\n\n  out_int (CODE_vector);\n  out_int (1);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\nvoid tgl_do_channel_kick_user (struct tgl_state *TLS, tgl_peer_id_t channel_id, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_kick_from_channel);\n  out_int (CODE_input_channel);\n  out_int (channel_id.peer_id);\n  out_long (channel_id.access_hash);\n\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n\n  out_int (CODE_bool_true);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\n/* }}} */\n\n/* {{{ Create secret chat */\n\nvoid tgl_do_create_secret_chat (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra) {\n  assert (tgl_get_peer_type (id) == TGL_PEER_USER);\n  tgl_peer_t *U = tgl_peer_get (TLS, id);\n  if (!U) {\n    tgl_set_query_error (TLS, EINVAL, \"Can not create secret chat with unknown user\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n\n  tgl_do_create_encr_chat_request (TLS, tgl_get_peer_id (id), callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Create group chat */\n\nvoid tgl_do_create_group_chat (struct tgl_state *TLS, int users_num, tgl_peer_id_t ids[], const char *chat_topic, int chat_topic_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_create_chat);\n  out_int (CODE_vector);\n  out_int (users_num); // Number of users, currently we support only 1 user.\n  int i;\n  for (i = 0; i < users_num; i++) {\n    tgl_peer_id_t id = ids[i];\n    if (tgl_get_peer_type (id) != TGL_PEER_USER) {\n      tgl_set_query_error (TLS, EINVAL, \"Can not create chat with unknown user\");\n      if (callback) {\n        callback (TLS, callback_extra, 0);\n      }\n      return;\n    }\n    out_int (CODE_input_user);\n    out_int (tgl_get_peer_id (id));\n    out_long (id.access_hash);\n  }\n  out_cstring (chat_topic, chat_topic_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Create channel */\n\nvoid tgl_do_create_channel (struct tgl_state *TLS, int users_num, tgl_peer_id_t ids[], const char *chat_topic, int chat_topic_len, const char *about, int about_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_channels_create_channel);\n  out_int (flags); // looks like 2 is disable non-admin messages\n  out_cstring (chat_topic, chat_topic_len);\n  out_cstring (about, about_len);\n  //out_int (CODE_vector);\n  //out_int (users_num); \n  int i;\n  for (i = 0; i < users_num; i++) {\n    tgl_peer_id_t id = ids[i];\n    if (tgl_get_peer_type (id) != TGL_PEER_USER) {\n      tgl_set_query_error (TLS, EINVAL, \"Can not create chat with unknown user\");\n      if (callback) {\n        callback (TLS, callback_extra, 0);\n      }\n      return;\n    }\n    out_int (CODE_input_user);\n    out_int (tgl_get_peer_id (id));\n    out_long (id.access_hash);\n  }\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Delete msg */\n\nstatic int delete_msg_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_affected_messages *DS_MAM = D;\n\n  tgl_message_id_t *id = q->extra;\n  q->extra = NULL;\n\n  struct tgl_message *M = tgl_message_get (TLS, id);\n  if (M) {\n    bl_do_message_delete (TLS, &M->permanent_id);\n  }\n  tfree (id, sizeof (*id));\n\n  int r = tgl_check_pts_diff (TLS, DS_LVAL (DS_MAM->pts), DS_LVAL (DS_MAM->pts_count));\n\n  if (r > 0) {\n    bl_do_set_pts (TLS, DS_LVAL (DS_MAM->pts));\n  }\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic int delete_msg_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *,void *, int))(q->callback))(TLS, q->callback_extra, 0);\n  }\n  tfree (q->extra, sizeof (tgl_message_id_t));\n  return 0;\n}\n\n\nstatic struct query_methods delete_msg_methods = {\n  .on_answer = delete_msg_on_answer,\n  .on_error = delete_msg_on_error,\n  .type = TYPE_TO_PARAM(messages_affected_messages),\n  .name = \"delete message\"\n};\n\nvoid tgl_do_delete_msg (struct tgl_state *TLS, tgl_message_id_t *_msg_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  tgl_message_id_t msg_id = *_msg_id;\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    msg_id = tgl_convert_temp_msg_id (TLS, msg_id);\n  }\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n  clear_packet ();\n  if (msg_id.peer_type == TGL_PEER_CHANNEL) {\n    out_int (CODE_channels_delete_messages);\n    out_int (CODE_input_channel);\n    out_int (msg_id.peer_id);\n    out_long (msg_id.access_hash);\n\n    out_int (CODE_vector);\n    out_int (1);\n    out_int (msg_id.id);\n  } else {\n    out_int (CODE_messages_delete_messages);\n    out_int (CODE_vector);\n    out_int (1);\n    out_int (msg_id.id);\n  }\n\n  tgl_message_id_t *id = talloc (sizeof (*id));\n  *id = msg_id;\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &delete_msg_methods, id, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Export card */\n\nstatic int export_card_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_vector *DS_V = D;\n\n  int n = DS_LVAL (DS_V->f1);\n\n  int *r = talloc (4 * n);\n  int i;\n  for (i = 0; i < n; i++) {\n    r[i] = *(int *)DS_V->f2[i];\n  }\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, int, int *))q->callback) (TLS, q->callback_extra, 1, n, r);\n  }\n  tfree (r, 4 * n);\n  return 0;\n}\n\nstatic struct query_methods export_card_methods = {\n  .on_answer = export_card_on_answer,\n  .on_error = q_list_on_error,\n  .type = TYPE_TO_PARAM_1(vector, TYPE_TO_PARAM (bare_int)),\n  .name = \"export card\"\n};\n\nvoid tgl_do_export_card (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, int *card), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_contacts_export_card);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &export_card_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Import card */\n\nstatic int import_card_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_user *U = tglf_fetch_alloc_user (TLS, D);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, struct tgl_user *))q->callback) (TLS, q->callback_extra, 1, U);\n  }\n  return 0;\n}\n\nstatic struct query_methods import_card_methods = {\n  .on_answer = import_card_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM (user),\n  .name = \"import card\"\n};\n\nvoid tgl_do_import_card (struct tgl_state *TLS, int size, int *card, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_contacts_import_card);\n  out_int (CODE_vector);\n  out_int (size);\n  out_ints (card, size);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &import_card_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\nvoid tgl_do_start_bot (struct tgl_state *TLS, tgl_peer_id_t bot, tgl_peer_id_t chat, const char *str, int str_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_messages_start_bot);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (bot));\n  out_long (bot.access_hash);\n  out_int (tgl_get_peer_id (chat));\n  long long m;\n  tglt_secure_random (&m, 8);\n  out_long (m);\n  out_cstring (str, str_len);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\n/* {{{ Send typing */\nstatic int send_typing_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods send_typing_methods = {\n  .on_answer = send_typing_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"send typing\"\n};\n\nvoid tgl_do_send_typing (struct tgl_state *TLS, tgl_peer_id_t id, enum tgl_typing_status status, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_ENCR_CHAT) {\n    clear_packet ();\n    out_int (CODE_messages_set_typing);\n    out_peer_id (TLS, id);\n    switch (status) {\n    case tgl_typing_none:\n    case tgl_typing_typing:\n      out_int (CODE_send_message_typing_action);\n      break;\n    case tgl_typing_cancel:\n      out_int (CODE_send_message_cancel_action);\n      break;\n    case tgl_typing_record_video:\n      out_int (CODE_send_message_record_video_action);\n      break;\n    case tgl_typing_upload_video:\n      out_int (CODE_send_message_upload_video_action);\n      break;\n    case tgl_typing_record_audio:\n      out_int (CODE_send_message_record_audio_action);\n      break;\n    case tgl_typing_upload_audio:\n      out_int (CODE_send_message_upload_audio_action);\n      break;\n    case tgl_typing_upload_photo:\n      out_int (CODE_send_message_upload_photo_action);\n      break;\n    case tgl_typing_upload_document:\n      out_int (CODE_send_message_upload_document_action);\n      break;\n    case tgl_typing_geo:\n      out_int (CODE_send_message_geo_location_action);\n      break;\n    case tgl_typing_choose_contact:\n      out_int (CODE_send_message_choose_contact_action);\n      break;\n    }\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_typing_methods, 0, callback, callback_extra);\n  } else {\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n  }\n}\n/* }}} */\n\n/* {{{ Extd query */\n#ifndef DISABLE_EXTF\nchar *tglf_extf_print_ds (struct tgl_state *TLS, void *DS, struct paramed_type *T);\n\nstatic int ext_query_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    char *buf = tglf_extf_print_ds (TLS, D, q->type);\n    ((void (*)(struct tgl_state *, void *, int, char *))q->callback) (TLS, q->callback_extra, 1, buf);\n  }\n  tgl_paramed_type_free (q->type);\n  return 0;\n}\n\nstatic struct query_methods ext_query_methods = {\n  .on_answer = ext_query_on_answer,\n  .on_error = q_list_on_error,\n  .name = \"ext query\"\n};\n\nvoid tgl_do_send_extf (struct tgl_state *TLS, const char *data, int data_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *buf), void *callback_extra) {\n  clear_packet ();\n\n  ext_query_methods.type = tglf_extf_store (TLS, data, data_len);\n\n  if (ext_query_methods.type) {\n    tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &ext_query_methods, 0, callback, callback_extra);\n  }\n}\n#else\nvoid tgl_do_send_extf (struct tgl_state *TLS, const char *data, int data_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *buf), void *callback_extra) {\n  assert (0);\n}\n#endif\n/* }}} */\n\n/* {{{ get messages */\n\nstatic int get_messages_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_messages_messages *DS_MM = D;\n\n  int i;\n  for (i = 0; i < DS_LVAL (DS_MM->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_MM->users->data[i]);\n  }\n  for (i = 0; i < DS_LVAL (DS_MM->chats->cnt); i++) {\n    tglf_fetch_alloc_chat (TLS, DS_MM->chats->data[i]);\n  }\n\n  struct tgl_message **ML;\n  if (q->extra) {\n    ML = talloc0 (sizeof (void *) * DS_LVAL (DS_MM->messages->cnt));\n  } else {\n    static struct tgl_message *M;\n    M = NULL;\n    ML = &M;\n    assert (DS_LVAL (DS_MM->messages->cnt) <= 1);\n  }\n  for (i = 0; i < DS_LVAL (DS_MM->messages->cnt); i++) {\n    ML[i] = tglf_fetch_alloc_message (TLS, DS_MM->messages->data[i], NULL);\n  }\n  if (q->callback) {\n    if (q->extra) {\n      ((void (*)(struct tgl_state *, void *, int, int, struct tgl_message **))q->callback)(TLS, q->callback_extra, 1, DS_LVAL (DS_MM->messages->cnt), ML);\n    } else {\n      if (DS_LVAL (DS_MM->messages->cnt) > 0) {\n        ((void (*)(struct tgl_state *, void *, int, struct tgl_message *))q->callback)(TLS, q->callback_extra, 1, *ML);\n      } else {\n        tgl_set_query_error (TLS, ENOENT, \"no such message\");\n        ((void (*)(struct tgl_state *, void *, int, struct tgl_message *))q->callback)(TLS, q->callback_extra, 0, NULL);\n      }\n    }\n  }\n  if (q->extra) {\n    tfree (ML, sizeof (void *) * DS_LVAL (DS_MM->messages->cnt));\n  }\n  return 0;\n}\n\nstatic struct query_methods get_messages_methods = {\n  .on_answer = get_messages_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM (messages_messages),\n  .name = \"get messages\"\n};\n\nvoid tgl_do_get_message (struct tgl_state *TLS, tgl_message_id_t *_msg_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {\n  tgl_message_id_t msg_id = *_msg_id;\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    msg_id = tgl_convert_temp_msg_id (TLS, msg_id);\n  }\n  if (msg_id.peer_type == TGL_PEER_TEMP_ID) {\n    tgl_set_query_error (TLS, EINVAL, \"unknown message\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n\n  struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n  if (M) {\n    if (callback) {\n      callback (TLS, callback_extra, 1, M);\n    }\n    return;\n  }\n\n  clear_packet ();\n\n  vlogprintf (E_ERROR, \"id=%\" INT64_PRINTF_MODIFIER \"d\\n\", msg_id.id);\n  out_int (CODE_messages_get_messages);\n  out_int (CODE_vector);\n  out_int (1);\n  out_int (msg_id.id);\n\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_messages_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ Export/import chat link */\nstatic int export_chat_link_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_exported_chat_invite *DS_ECI = D;\n\n  char *s = DS_STR_DUP (DS_ECI->link);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, const char *))q->callback)(TLS, q->callback_extra, s ? 1 : 0, s);\n  }\n  tfree_str (s);\n  return 0;\n}\n\n\nstatic struct query_methods export_chat_link_methods = {\n  .on_answer = export_chat_link_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM(exported_chat_invite),\n  .name = \"export chat link\"\n};\n\nvoid tgl_do_export_chat_link (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *link), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_CHAT) {\n    tgl_set_query_error (TLS, EINVAL, \"Can only export chat link for chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n\n  clear_packet ();\n  out_int (CODE_messages_export_chat_invite);\n  out_int (tgl_get_peer_id (id));\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &export_chat_link_methods, 0, callback, callback_extra);\n}\n\nvoid tgl_do_import_chat_link (struct tgl_state *TLS, const char *link, int len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  const char *l = link + len - 1;\n  while (l >= link && *l != '/') {\n    l --;\n  }\n  l ++;\n\n  clear_packet ();\n  out_int (CODE_messages_import_chat_invite);\n  out_cstring (l, len - (l - link));\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\n/* }}} */\n\n/* {{{ Export/import channel link */\n\nvoid tgl_do_export_channel_link (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *link), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_CHANNEL) {\n    tgl_set_query_error (TLS, EINVAL, \"Can only export chat link for chat\");\n    if (callback) {\n      callback (TLS, callback_extra, 0, NULL);\n    }\n    return;\n  }\n\n  clear_packet ();\n  out_int (CODE_channels_export_invite);\n  out_int (CODE_input_channel);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &export_chat_link_methods, 0, callback, callback_extra);\n}\n\n/* }}} */\n\n/* {{{ set password */\nstatic int set_password_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic int set_password_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  if (error_code == 400) {\n    if (!strcmp (error, \"PASSWORD_HASH_INVALID\")) {\n      vlogprintf (E_WARNING, \"Bad old password\\n\");\n      if (q->callback) {\n        ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 0);\n      }\n      return 0;\n    }\n    if (!strcmp (error, \"NEW_PASSWORD_BAD\")) {\n      vlogprintf (E_WARNING, \"Bad new password (unchanged or equals hint)\\n\");\n      if (q->callback) {\n        ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 0);\n      }\n      return 0;\n    }\n    if (!strcmp (error, \"NEW_SALT_INVALID\")) {\n      vlogprintf (E_WARNING, \"Bad new salt\\n\");\n      if (q->callback) {\n        ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 0);\n      }\n      return 0;\n    }\n  }\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 0);\n  }\n  return 0;\n}\n\nstatic struct query_methods set_password_methods = {\n  .on_answer = set_password_on_answer,\n  .on_error = set_password_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"set password\"\n};\n\nstatic void tgl_do_act_set_password (struct tgl_state *TLS, const char *current_password, int current_password_len, const char *new_password, int new_password_len, const char *current_salt, int current_salt_len, const char *new_salt, int new_salt_len, const char *hint, int hint_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  static char s[512];\n  static unsigned char shab[32];\n\n  assert (current_salt_len <= 128);\n  assert (current_password_len <= 128);\n  assert (new_salt_len <= 128);\n  assert (new_password_len <= 128);\n\n  out_int (CODE_account_update_password_settings);\n\n  if (current_password_len && current_salt_len) {\n    memcpy (s, current_salt, current_salt_len);\n    memcpy (s + current_salt_len, current_password, current_password_len);\n    memcpy (s + current_salt_len + current_password_len, current_salt, current_salt_len);\n\n    TGLC_sha256 ((void *)s, 2 * current_salt_len + current_password_len, shab);\n    out_cstring ((void *)shab, 32);\n  } else {\n    out_string (\"\");\n  }\n\n  out_int (CODE_account_password_input_settings);\n  if (new_password_len) {\n    out_int (1);\n\n    static char d[256];\n    memcpy (d, new_salt, new_salt_len);\n\n    int l = new_salt_len;\n    tglt_secure_random (d + l, 16);\n    l += 16;\n    memcpy (s, d, l);\n\n    memcpy (s + l, new_password, new_password_len);\n    memcpy (s + l + new_password_len, d, l);\n\n    TGLC_sha256 ((void *)s, 2 * l + new_password_len, shab);\n\n    out_cstring (d, l);\n    out_cstring ((void *)shab, 32);\n    out_cstring (hint, hint_len);\n  } else {\n    out_int (0);\n  }\n\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &set_password_methods, 0, callback, callback_extra);\n}\n\nstruct change_password_extra {\n  char *current_password;\n  char *new_password;\n  char *current_salt;\n  char *new_salt;\n  char *hint;\n  int current_password_len;\n  int new_password_len;\n  int current_salt_len;\n  int new_salt_len;\n  int hint_len;\n  void (*callback)(struct tgl_state *, void *, int);\n  void *callback_extra;\n};\n\nvoid tgl_on_new_pwd (struct tgl_state *TLS, const char *pwd[], void *_T);\nvoid tgl_on_new2_pwd (struct tgl_state *TLS, const char *pwd, void *_T) {\n  struct change_password_extra *E = _T;\n  if (strlen (pwd) != (size_t)E->new_password_len || memcmp (E->new_password, pwd, E->new_password_len)) {\n    tfree (E->new_password, E->new_password_len);\n    E->new_password = NULL;\n    E->new_password_len = 0;\n    vlogprintf (E_ERROR, \"passwords do not match\\n\");\n    TLS->callback.get_values (TLS, tgl_new_password, \"new password: \", 2, tgl_on_new_pwd, E);\n    return;\n  }\n  tgl_do_act_set_password (TLS, E->current_password, E->current_password_len,\n                                E->new_password, E->new_password_len,\n                                E->current_salt, E->current_salt_len,\n                                E->new_salt, E->new_salt_len,\n                                E->hint, E->hint_len,\n                                E->callback, E->callback_extra);\n\n  tfree (E->current_password, E->current_password_len);\n  tfree (E->new_password, E->new_password_len);\n  tfree (E->current_salt, E->current_salt_len);\n  tfree (E->new_salt, E->new_salt_len);\n  tfree_str (E->hint);\n  tfree (E, sizeof (*E));\n}\n\nvoid tgl_on_new_pwd (struct tgl_state *TLS, const char *pwd[], void *_T) {\n  struct change_password_extra *E = _T;\n  E->new_password_len = strlen (pwd[0]);\n  E->new_password = tmemdup (pwd[0], E->new_password_len);\n  tgl_on_new2_pwd(TLS, pwd[1], E);\n}\n\nvoid tgl_on_old_pwd (struct tgl_state *TLS, const char *pwd[], void *_T) {\n  struct change_password_extra *E = _T;\n  E->current_password_len = strlen (pwd[0]);\n  E->current_password = tmemdup (pwd[0], E->current_password_len);\n  tgl_on_new_pwd(TLS, pwd + 1, E);\n}\n\nstatic int set_get_password_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_account_password *DS_AP = D;\n\n  char *new_hint = q->extra;\n\n  struct change_password_extra *E = talloc0 (sizeof (*E));\n\n  if (DS_AP->current_salt) {\n    E->current_salt_len = DS_AP->current_salt->len;\n    E->current_salt = tmemdup (DS_AP->current_salt->data, E->current_salt_len);\n  }\n  if (DS_AP->new_salt) {\n    E->new_salt_len = DS_AP->new_salt->len;\n    E->new_salt = tmemdup (DS_AP->new_salt->data, E->new_salt_len);\n  }\n\n  if (new_hint) {\n    E->hint_len = strlen (new_hint);\n    E->hint = new_hint;\n  }\n\n  E->callback = q->callback;\n  E->callback_extra = q->callback_extra;\n\n  if (DS_AP->magic == CODE_account_no_password) {\n    TLS->callback.get_values (TLS, tgl_new_password, \"new password: \", 2, tgl_on_new_pwd, E);\n  } else {\n    static char s[512];\n    snprintf (s, 511, \"old password (hint %.*s): \", DS_RSTR (DS_AP->hint));\n    TLS->callback.get_values (TLS, tgl_cur_and_new_password, s, 3, tgl_on_old_pwd, E);\n  }\n  return 0;\n}\n\nstatic struct query_methods set_get_password_methods = {\n  .on_answer = set_get_password_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(account_password),\n  .name = \"get password\"\n};\n\nvoid tgl_do_set_password (struct tgl_state *TLS, const char *hint, int hint_len, void (*callback)(struct tgl_state *TLS, void *extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_account_get_password);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &set_get_password_methods, hint ? tstrndup (hint, hint_len) : NULL, callback, callback_extra);\n}\n\n/* }}} */\n\n/* {{{ check password */\nstatic int check_password_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  if (error_code == 400) {\n    vlogprintf (E_ERROR, \"bad password\\n\");\n    tgl_do_check_password (TLS, q->callback, q->callback_extra);\n    return 0;\n  }\n  TLS->locks ^= TGL_LOCK_PASSWORD;\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 0);\n  }\n  return 0;\n}\n\nstatic int check_password_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  TLS->locks ^= TGL_LOCK_PASSWORD;\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods check_password_methods = {\n  .on_answer = check_password_on_answer,\n  .on_error = check_password_on_error,\n  .type = TYPE_TO_PARAM(auth_authorization),\n  .name = \"check password\"\n};\n\n\nstruct check_password_extra {\n  char *current_salt;\n  int current_salt_len;\n  void (*callback)(struct tgl_state *, void *, int);\n  void *callback_extra;\n};\n\nstatic void tgl_pwd_got (struct tgl_state *TLS, const char *pwd[], void *_T) {\n  struct check_password_extra *E = _T;\n\n  clear_packet ();\n  static char s[512];\n  static unsigned char shab[32];\n\n  assert (E->current_salt_len <= 128);\n  assert (strlen (pwd[0]) <= 128);\n\n  out_int (CODE_auth_check_password);\n\n  if (pwd[0] && E->current_salt_len) {\n    int l = E->current_salt_len;\n    memcpy (s, E->current_salt, l);\n\n    int r = strlen (pwd[0]);\n    strcpy (s + l, pwd[0]);\n\n    memcpy (s + l + r, E->current_salt, l);\n\n    TGLC_sha256 ((void *)s, 2 * l + r, shab);\n    out_cstring ((void *)shab, 32);\n  } else {\n    out_string (\"\");\n  }\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &check_password_methods, 0, E->callback, E->callback_extra);\n\n  tfree (E->current_salt, E->current_salt_len);\n  tfree (E, sizeof (*E));\n}\n\nstatic int check_get_password_on_error (struct tgl_state *TLS, struct query *q, int error_code, int error_len, const char *error) {\n  TLS->locks ^= TGL_LOCK_PASSWORD;\n  tgl_set_query_error (TLS, EPROTO, \"RPC_CALL_FAIL %d: %.*s\", error_code, error_len, error);\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 0);\n  }\n  return 0;\n}\n\nstatic int check_get_password_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_account_password *DS_AP = D;\n\n  if (DS_AP->magic == CODE_account_no_password) {\n    TLS->locks ^= TGL_LOCK_PASSWORD;\n    return 0;\n  }\n  static char s[512];\n  snprintf (s, 511, \"type password (hint %.*s): \", DS_RSTR (DS_AP->hint));\n\n  struct check_password_extra *E = talloc0 (sizeof (*E));\n\n  if (DS_AP->current_salt) {\n    E->current_salt_len = DS_AP->current_salt->len;\n    E->current_salt = tmemdup (DS_AP->current_salt->data, E->current_salt_len);\n  }\n\n  E->callback = q->callback;\n  E->callback_extra = q->callback_extra;\n\n  TLS->callback.get_values (TLS, tgl_cur_password, s, 1, tgl_pwd_got, E);\n  return 0;\n}\n\nstatic struct query_methods check_get_password_methods = {\n  .on_answer = check_get_password_on_answer,\n  .on_error = check_get_password_on_error,\n  .type = TYPE_TO_PARAM(account_password),\n  .name = \"get password\"\n};\n\nvoid tgl_do_check_password (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_account_get_password);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &check_get_password_methods, NULL, callback, callback_extra);\n}\n\n/* }}} */\n\n/* {{{ send broadcast */\nvoid tgl_do_send_broadcast (struct tgl_state *TLS, int num, tgl_peer_id_t peer_id[], const char *text, int text_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *extra, int success, int num, struct tgl_message *ML[]), void *callback_extra) {\n\n  assert (num <= 1000);\n\n  struct messages_send_extra *E = talloc0 (sizeof (*E));\n  E->multi = 1;\n  E->count = num;\n  E->list = talloc (sizeof (tgl_message_id_t) * num);\n\n  int date = time (0);\n  struct tl_ds_message_media TDSM;\n  TDSM.magic = CODE_message_media_empty;\n\n  int i;\n  for (i = 0; i < num; i++) {\n    assert (tgl_get_peer_type (peer_id[i]) == TGL_PEER_USER);\n\n    int disable_preview = flags & TGL_SEND_MSG_FLAG_DISABLE_PREVIEW;\n    if (!(flags & TGL_SEND_MSG_FLAG_ENABLE_PREVIEW) && TLS->disable_link_preview) {\n      disable_preview = 1;\n    }\n    if (disable_preview) {\n      disable_preview = TGLMF_DISABLE_PREVIEW;\n    }\n\n    struct tgl_message_id id = tgl_peer_id_to_random_msg_id (peer_id[i]);\n    E->list[i] = id;\n\n    tgl_peer_id_t from_id = TLS->our_id;\n    bl_do_edit_message (TLS, &id, &from_id, &peer_id[i], NULL, NULL, &date, text, text_len, &TDSM, NULL, NULL, NULL, NULL, TGLMF_UNREAD | TGLMF_OUT | TGLMF_PENDING | TGLMF_CREATE | TGLMF_CREATED | disable_preview);\n  }\n\n  clear_packet ();\n  out_int (CODE_messages_send_broadcast);\n  out_int (CODE_vector);\n  out_int (num);\n  for (i = 0; i < num; i++) {\n    assert (tgl_get_peer_type (peer_id[i]) == TGL_PEER_USER);\n\n    out_int (CODE_input_user);\n    out_int (tgl_get_peer_id (peer_id[i]));\n    out_long (peer_id[i].access_hash);\n  }\n\n  out_int (CODE_vector);\n  out_int (num);\n  for (i = 0; i < num; i++) {\n    out_long (E->list[i].id);\n  }\n  out_cstring (text, text_len);\n\n  out_int (CODE_message_media_empty);\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, E, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ block user */\nstatic int block_user_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback)(TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods block_user_methods = {\n  .on_answer = block_user_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM (bool),\n  .name = \"block user\"\n};\n\nvoid tgl_do_block_user (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_USER) {\n    tgl_set_query_error (TLS, EINVAL, \"id should be user id\");\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n\n  clear_packet ();\n\n  out_int (CODE_contacts_block);\n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &block_user_methods, 0, callback, callback_extra);\n}\n\nvoid tgl_do_unblock_user (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  if (tgl_get_peer_type (id) != TGL_PEER_USER) {\n    tgl_set_query_error (TLS, EINVAL, \"id should be user id\");\n    if (callback) {\n      callback (TLS, callback_extra, 0);\n    }\n    return;\n  }\n\n  clear_packet ();\n\n  out_int (CODE_contacts_unblock);\n  \n  out_int (CODE_input_user);\n  out_int (tgl_get_peer_id (id));\n  out_long (id.access_hash);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &block_user_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\n/* {{{ get terms of service */\nstatic int get_tos_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tl_ds_help_terms_of_service *DS_T = D;\n  int l = DS_T->text->len;\n  char *s = talloc (l + 1);\n  char *str = DS_T->text->data;\n  int p = 0;\n  int pp = 0;\n  while (p < l) {\n    if (*str == '\\\\' && p < l - 1) {\n      str ++;\n      p ++;\n      switch (*str) {\n      case 'n':\n        s[pp ++] = '\\n';\n        break;\n      case 't':\n        s[pp ++] = '\\t';\n        break;\n      case 'r':\n        s[pp ++] = '\\r';\n        break;\n      default:\n        s[pp ++] = *str;\n      }\n      str ++;\n      p ++;\n    } else {\n      s[pp ++] = *str;\n      str ++;\n      p ++;\n    }\n  }\n  s[pp] = 0;\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, char *))q->callback)(TLS, q->callback_extra, 1, s);\n  }\n  tfree (s, l + 1);\n  return 0;\n}\n\nstatic struct query_methods get_tos_methods = {\n  .on_answer = get_tos_on_answer,\n  .on_error = q_ptr_on_error,\n  .type = TYPE_TO_PARAM (help_terms_of_service),\n  .name = \"get tos\"\n};\n\nvoid tgl_do_get_terms_of_service (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *ans), void *callback_extra) {\n  clear_packet ();\n\n  out_int (CODE_help_get_terms_of_service);\n  out_string (\"\");\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &get_tos_methods, 0, callback, callback_extra);\n}\n/* }}} */\n\nvoid tgl_do_upgrade_group (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n\n  out_int (CODE_messages_migrate_chat);\n  out_int (tgl_get_peer_id (id));\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_msgs_methods, 0, callback, callback_extra);\n}\n\n\nstatic void set_flag_4 (struct tgl_state *TLS, void *_D, int success) {\n  struct tgl_dc *D = _D;\n  assert (success);\n  D->flags |= 4;\n\n  TLS->timer_methods->insert (D->ev, TLS->temp_key_expire_time * 0.9);\n}\n\nstatic int send_bind_temp_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  struct tgl_dc *DC = q->extra;\n  DC->flags |= 2;\n  tgl_do_help_get_config_dc (TLS, DC, set_flag_4, DC);\n  vlogprintf (E_DEBUG, \"Bind successful in dc %d\\n\", DC->id);\n  return 0;\n}\n\nstatic int send_bind_on_error (struct tgl_state *TLS, struct query *q, int error_code, int l, const char *error) {\n  vlogprintf (E_WARNING, \"bind: error %d: %.*s\\n\", error_code, l, error);\n  if (error_code == 400) {\n    return -11;\n  }\n  return 0;\n}\n\nstatic struct query_methods send_bind_temp_methods = {\n  .on_answer = send_bind_temp_on_answer,\n  .on_error = send_bind_on_error,\n  .type = TYPE_TO_PARAM (bool),\n  .name = \"bind temp auth key\"\n};\n\nvoid tgl_do_send_bind_temp_key (struct tgl_state *TLS, struct tgl_dc *D, long long nonce, int expires_at, void *data, int len, long long msg_id) {\n  clear_packet ();\n  out_int (CODE_auth_bind_temp_auth_key);\n  out_long (D->auth_key_id);\n  out_long (nonce);\n  out_int (expires_at);\n  out_cstring (data, len);\n  struct query *q = tglq_send_query_ex (TLS, D, packet_ptr - packet_buffer, packet_buffer, &send_bind_temp_methods, D, 0, 0, 2);\n  assert (q->msg_id == msg_id);\n}\n\nstatic int update_status_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int))q->callback) (TLS, q->callback_extra, 1);\n  }\n  return 0;\n}\n\nstatic struct query_methods update_status_methods = {\n  .on_answer = update_status_on_answer,\n  .on_error = q_void_on_error,\n  .type = TYPE_TO_PARAM(bool),\n  .name = \"update status\"\n};\n\nvoid tgl_do_update_status (struct tgl_state *TLS, int online, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  clear_packet ();\n  out_int (CODE_account_update_status);\n  out_int (online ? CODE_bool_false : CODE_bool_true);\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &update_status_methods, 0, callback, callback_extra);\n}\n\n\nvoid tgl_do_request_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E) {\n  assert (0);\n  exit (2);\n}\n\nvoid tgl_do_accept_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E, long long exchange_id, unsigned char ga[]) {\n  assert (0);\n  exit (2);\n}\n\nvoid tgl_do_confirm_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E, int sen_nop) {\n  assert (0);\n  exit (2);\n}\n\nvoid tgl_do_commit_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E, unsigned char gb[]) {\n  assert (0);\n  exit (2);\n}\n\nvoid tgl_do_abort_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E) {\n  assert (0);\n  exit (2);\n}\n\nvoid tgl_started_cb (struct tgl_state *TLS, void *arg, int success) {\n  if (!success) {\n    vlogprintf (E_ERROR, \"login problem: error #%d (%s)\\n\", TLS->error_code, TLS->error);\n    if (TLS->callback.on_failed_login) {\n      TLS->callback.on_failed_login (TLS);\n    } else {\n      assert (success);\n    }\n    return;\n  }\n  TLS->started = 1;\n  if (TLS->callback.started) {\n    TLS->callback.started (TLS);\n  }\n}\n\nvoid tgl_export_auth_callback (struct tgl_state *TLS, void *arg, int success) {\n  if (!success) {\n    vlogprintf (E_ERROR, \"login problem: error #%d (%s)\\n\", TLS->error_code, TLS->error);\n    if (TLS->callback.on_failed_login) {\n      TLS->callback.on_failed_login (TLS);\n    } else {\n      assert (success);\n    }\n    return;\n  }\n  int i;\n  for (i = 0; i <= TLS->max_dc_num; i++) if (TLS->DC_list[i] && !tgl_signed_dc (TLS, TLS->DC_list[i])) {\n    return;\n  }\n  if (TLS->callback.logged_in) {\n    TLS->callback.logged_in (TLS);\n  }\n\n  tglm_send_all_unsent (TLS);\n  tgl_do_get_difference (TLS, 0, tgl_started_cb, 0);\n}\n\nvoid tgl_export_all_auth (struct tgl_state *TLS) {\n  int i;\n  int ok = 1;\n  for (i = 0; i <= TLS->max_dc_num; i++) if (TLS->DC_list[i] && !tgl_signed_dc (TLS, TLS->DC_list[i])) {\n    tgl_do_export_auth (TLS, i, tgl_export_auth_callback, TLS->DC_list[i]);\n    ok = 0;\n  }\n  if (ok) {\n    if (TLS->callback.logged_in) {\n      TLS->callback.logged_in (TLS);\n    }\n\n    tglm_send_all_unsent (TLS);\n    tgl_do_get_difference (TLS, 0, tgl_started_cb, 0);\n  }\n}\n\nstruct sign_up_extra {\n  char *phone;\n  char *hash;\n  char *first_name;\n  char *last_name;\n  int phone_len;\n  int hash_len;\n  int first_name_len;\n  int last_name_len;\n};\n\nvoid tgl_sign_in_code (struct tgl_state *TLS, const char *code[], void *_T);\nvoid tgl_sign_in_result (struct tgl_state *TLS, void *_T, int success, struct tgl_user *U) {\n  struct sign_up_extra *E = _T;\n  if (success) {\n    tfree (E->phone, E->phone_len);\n    tfree (E->hash, E->hash_len);\n    tfree (E, sizeof (*E));\n  } else {\n    vlogprintf (E_ERROR, \"incorrect code\\n\");\n    TLS->callback.get_values (TLS, tgl_code, \"code ('call' for phone call):\", 1, tgl_sign_in_code, E);\n    return;\n  }\n  tgl_export_all_auth (TLS);\n}\n\nvoid tgl_sign_in_code (struct tgl_state *TLS, const char *code[], void *_T) {\n  struct sign_up_extra *E = _T;\n  if (!strcmp (code[0], \"call\")) {\n    tgl_do_phone_call (TLS, E->phone, E->phone_len, E->hash, E->hash_len, 0, 0);\n    TLS->callback.get_values (TLS, tgl_code, \"code ('call' for phone call):\", 1, tgl_sign_in_code, E);\n    return;\n  }\n\n  tgl_do_send_code_result (TLS, E->phone, E->phone_len, E->hash, E->hash_len, code[0], strlen (code[0]), tgl_sign_in_result, E);\n}\n\nvoid tgl_sign_up_code (struct tgl_state *TLS, const char *code[], void *_T);\nvoid tgl_sign_up_result (struct tgl_state *TLS, void *_T, int success, struct tgl_user *U) {\n  struct sign_up_extra *E = _T;\n  if (success) {\n    tfree (E->phone, E->phone_len);\n    tfree (E->hash, E->hash_len);\n    tfree (E->first_name, E->first_name_len);\n    tfree (E->last_name, E->last_name_len);\n    tfree (E, sizeof (*E));\n  } else {\n    vlogprintf (E_ERROR, \"incorrect code\\n\");\n    TLS->callback.get_values (TLS, tgl_code, \"code ('call' for phone call):\", 1, tgl_sign_up_code, E);\n    return;\n  }\n  tgl_export_all_auth (TLS);\n}\n\nvoid tgl_sign_up_code (struct tgl_state *TLS, const char *code[], void *_T) {\n  struct sign_up_extra *E = _T;\n  if (!strcmp (code[0], \"call\")) {\n    tgl_do_phone_call (TLS, E->phone, E->phone_len, E->hash, E->hash_len, 0, 0);\n    TLS->callback.get_values (TLS, tgl_code, \"code ('call' for phone call):\", 1, tgl_sign_up_code, E);\n    return;\n  }\n\n  tgl_do_send_code_result_auth (TLS, E->phone, E->phone_len, E->hash, E->hash_len, code[0], strlen (code[0]), E->first_name, E->first_name_len, E->last_name, E->last_name_len, tgl_sign_up_result, E);\n}\n\n\nvoid tgl_set_last_name (struct tgl_state *TLS, const char *last_name, struct sign_up_extra *E) {\n  E->last_name_len = strlen (last_name);\n  E->last_name = tmemdup (last_name, E->last_name_len);\n}\n\nint tgl_set_first_name (struct tgl_state *TLS, const char *first_name, struct sign_up_extra *E) {\n  if (strlen (first_name) < 1) {\n    return -1;\n  }\n\n  E->first_name_len = strlen (first_name);\n  E->first_name = tmemdup (first_name, E->first_name_len);\n  return 0;\n}\n\nvoid tgl_register_cb (struct tgl_state *TLS, const char *rinfo[], void *_T) {\n  struct sign_up_extra *E = _T;\n  const char *yn = rinfo[0];\n  if (strlen (yn) > 1) {\n    TLS->callback.get_values (TLS, tgl_register_info, \"registration info:\", 3, tgl_register_cb, E);\n  } else if (strlen (yn) == 0 || *yn == 'y' || *yn == 'Y') {\n    if (!tgl_set_first_name(TLS, rinfo[1], E)) {\n      tgl_set_last_name(TLS, rinfo[2], E);\n      TLS->callback.get_values (TLS, tgl_code, \"code ('call' for phone call):\", 1, tgl_sign_up_code, E);\n    }\n    else {\n      TLS->callback.get_values (TLS, tgl_register_info, \"registration info:\", 3, tgl_register_cb, E);\n    }\n  } else if (*yn == 'n' || *yn == 'N') {\n    vlogprintf (E_ERROR, \"stopping registration\");\n    tfree (E->phone, E->phone_len);\n    tfree (E->hash, E->hash_len);\n    tfree (E, sizeof (*E));\n    tgl_login (TLS);\n  } else {\n    TLS->callback.get_values (TLS, tgl_register_info, \"registration info:\", 3, tgl_register_cb, E);\n  }\n}\n\nvoid tgl_sign_in_phone (struct tgl_state *TLS, const char *phone[], void *arg);\nvoid tgl_sign_in_phone_cb (struct tgl_state *TLS, void *extra, int success, int registered, const char *mhash) {\n  struct sign_up_extra *E = extra;\n  if (!success) {\n    vlogprintf (E_ERROR, \"Incorrect phone number\\n\");\n\n    tfree (E->phone, E->phone_len);\n    tfree (E, sizeof (*E));\n    TLS->callback.get_values (TLS, tgl_phone_number, \"phone number:\", 1, tgl_sign_in_phone, NULL);\n    return;\n  }\n\n  E->hash_len = strlen (mhash);\n  E->hash = tmemdup (mhash, E->hash_len);\n\n  if (registered) {\n    TLS->callback.get_values (TLS, tgl_code, \"code ('call' for phone call):\", 1, tgl_sign_in_code, E);\n  } else {\n    TLS->callback.get_values (TLS, tgl_register_info, \"registration info:\", 3, tgl_register_cb, E);\n  }\n}\n\nvoid tgl_sign_in_phone (struct tgl_state *TLS, const char *phone[], void *arg) {\n  struct sign_up_extra *E = talloc0 (sizeof (*E));\n  E->phone_len = strlen (phone[0]);\n  E->phone = tmemdup (phone[0], E->phone_len);\n\n  tgl_do_send_code (TLS, E->phone, E->phone_len, tgl_sign_in_phone_cb, E);\n}\n\nvoid tgl_bot_hash_cb (struct tgl_state *TLS, const char *code[], void *arg);\n\nvoid tgl_sign_in_bot_cb (struct tgl_state *TLS, void *_T, int success, struct tgl_user *U) {\n  if (!success) {\n    vlogprintf (E_ERROR, \"incorrect bot hash\\n\");\n    TLS->callback.get_values (TLS, tgl_bot_hash, \"bot hash:\", 1, tgl_bot_hash_cb, NULL);\n    return;\n  }\n  tgl_export_all_auth (TLS);\n}\n\nvoid tgl_bot_hash_cb (struct tgl_state *TLS, const char *code[], void *arg) {\n  tgl_do_send_bot_auth (TLS, code[0], strlen (code[0]), tgl_sign_in_bot_cb, NULL);\n}\n\nvoid tgl_sign_in (struct tgl_state *TLS) {\n  if (!tgl_signed_dc (TLS, TLS->DC_working)) {\n    if (TLS->is_bot) {\n      TLS->callback.get_values (TLS, tgl_bot_hash, \"bot hash:\", 1, tgl_bot_hash_cb, NULL);\n    } else {\n      TLS->callback.get_values (TLS, tgl_phone_number, \"phone number:\", 1, tgl_sign_in_phone, NULL);\n    }\n  } else {\n    tgl_export_all_auth (TLS);\n  }\n}\n\nstatic void check_authorized (struct tgl_state *TLS, void *arg) {\n  int i;\n  int ok = 1;\n  for (i = 0; i <= TLS->max_dc_num; i++) {\n    if (TLS->DC_list[i]) {\n      tgl_dc_authorize (TLS, TLS->DC_list[i]);\n    }\n  }\n  for (i = 0; i <= TLS->max_dc_num; i++) {\n    if (TLS->DC_list[i] && !tgl_signed_dc (TLS, TLS->DC_list[i]) && !tgl_authorized_dc (TLS, TLS->DC_list[i])) {\n      ok = 0;\n      break;\n    }\n  }\n\n  if (ok) {\n    TLS->timer_methods->free (TLS->ev_login);\n    TLS->ev_login = NULL;\n    tgl_sign_in (TLS);\n  } else {\n    TLS->timer_methods->insert (TLS->ev_login, 0.1);\n  }\n}\n\nvoid tgl_login (struct tgl_state *TLS) {\n  int i;\n  int ok = 1;\n  for (i = 0; i <= TLS->max_dc_num; i++) {\n    if (TLS->DC_list[i] && !tgl_signed_dc (TLS, TLS->DC_list[i]) && !tgl_authorized_dc (TLS, TLS->DC_list[i])) {\n      ok = 0;\n      break;\n    }\n  }\n\n  if (!ok) {\n    TLS->ev_login = TLS->timer_methods->alloc (TLS, check_authorized, NULL);\n    TLS->timer_methods->insert (TLS->ev_login, 0.1);\n  } else {\n    tgl_sign_in (TLS);\n  }\n}\n\n\nstatic int callback (struct tgl_state *TLS, struct query *q, void *D) {\n   if (q->callback) {\n     ((void (*)(struct tgl_state *, void *))(q->callback)) (TLS, q->callback_extra);\n  }\n  return 0;\n}\n\nstatic int send_change_code_on_answer (struct tgl_state *TLS, struct query *q, void *D) {\n\n  struct tl_ds_account_sent_change_phone_code *DS_ASCPC= D;\n\n  char *phone_code_hash = DS_STR_DUP (DS_ASCPC->phone_code_hash);\n\n  if (q->callback) {\n    ((void (*)(struct tgl_state *, void *, int, const char *))(q->callback)) (TLS, q->callback_extra, 1, phone_code_hash);\n  }\n  tfree_str (phone_code_hash);\n  return 0;\n}\n\nstruct change_phone_extra {\n  char *phone;\n  char *hash;\n  char *first_name;\n  char *last_name;\n  int phone_len;\n  int hash_len;\n  int first_name_len;\n  int last_name_len;\n  void (*callback)(struct tgl_state *TLS, void *extra, int success);\n  void *callback_extra;\n};\n\n\nstatic struct query_methods set_phone_methods  = {\n  .on_answer = callback,\n  .on_error = sign_in_on_error,\n  .type = TYPE_TO_PARAM(user),\n  .name = \"set phone\"\n};\n\nstatic struct query_methods send_change_code_methods  = {\n  .on_answer = send_change_code_on_answer,\n  .on_error = q_list_on_error,\n  .type = TYPE_TO_PARAM(account_sent_change_phone_code),\n  .name = \"send change phone code\"\n};\n\nvoid tgl_set_number_code (struct tgl_state *TLS, const char *code[], void *_T);\nvoid tgl_set_number_result (struct tgl_state *TLS, void *_T, int success, struct tgl_user *U) {\n  struct change_phone_extra *E = _T;\n  if (success) {\n    if (E->callback) {\n      E->callback (TLS, E->callback_extra, 1);\n    }\n    tfree (E->phone, E->phone_len);\n    tfree (E->hash, E->hash_len);\n    tfree (E, sizeof (*E));\n  } else {\n    vlogprintf (E_ERROR, \"incorrect code\\n\");\n    TLS->callback.get_values (TLS, tgl_code, \"code:\", 1, tgl_set_number_code, E);\n  }\n}\n\nvoid tgl_set_number_code (struct tgl_state *TLS, const char *code[], void *_T) {\n  struct change_phone_extra *E = _T;\n\n  clear_packet ();\n  out_int (CODE_account_change_phone);\n  out_cstring (E->phone, E->phone_len);\n  out_cstring (E->hash, E->hash_len);\n  out_cstring (code[0], strlen (code[0]));\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &set_phone_methods, 0, tgl_set_number_result, E);\n}\n\n\nvoid tgl_set_phone_number_cb (struct tgl_state *TLS, void *extra, int success, const char *mhash) {\n  struct change_phone_extra *E = extra;\n  if (!success) {\n    vlogprintf (E_ERROR, \"Incorrect phone number\\n\");\n    if (E->callback) {\n      E->callback (TLS, E->callback_extra, 0);\n    }\n    tfree (E->phone, E->phone_len);\n    tfree (E, sizeof (*E));\n    return;\n  }\n\n  E->hash_len = strlen (mhash);\n  E->hash = tmemdup (mhash, E->hash_len);\n\n  TLS->callback.get_values (TLS, tgl_code, \"code:\", 1, tgl_set_number_code, E);\n}\n\nvoid tgl_do_set_phone_number (struct tgl_state *TLS, const char *phonenumber, int phonenumber_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra) {\n  struct change_phone_extra *E = talloc0 (sizeof (*E));\n  E->phone_len = phonenumber_len;\n  E->phone = tmemdup (phonenumber, E->phone_len);\n\n  clear_packet ();\n  tgl_do_insert_header (TLS);\n  out_int (CODE_account_send_change_phone_code);\n  out_cstring (E->phone, E->phone_len);\n  E->callback = callback;\n  E->callback_extra = callback_extra;\n\n  tglq_send_query (TLS, TLS->DC_working, packet_ptr - packet_buffer, packet_buffer, &send_change_code_methods, NULL, tgl_set_phone_number_cb, E);\n}\n"
  },
  {
    "path": "queries.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n//#include \"net.h\"\n#ifndef __QUERIES_H__\n#define __QUERIES_H__\n#include \"tgl-structures.h\"\n#include \"auto.h\"\n#include \"tgl-layout.h\"\n\n#define QUERY_ACK_RECEIVED 1\n#define QUERY_FORCE_SEND 2\n\nstruct query;\nstruct query_methods {\n  int (*on_answer)(struct tgl_state *TLS, struct query *q, void *DS);\n  int (*on_error)(struct tgl_state *TLS, struct query *q, int error_code, int len, const char *error);\n  int (*on_timeout)(struct tgl_state *TLS, struct query *q);\n  struct paramed_type *type;\n  char *name;\n  double timeout;\n};\n\nstruct query {\n  long long msg_id;\n  int data_len;\n  int flags;\n  int seq_no;\n  long long session_id;\n  void *data;\n  struct query_methods *methods;\n  struct tgl_timer *ev;\n  struct tgl_dc *DC;\n  struct tgl_session *session;\n  struct paramed_type *type;\n  void *extra;\n  void *callback;\n  void *callback_extra;\n};\n\n\nstruct query *tglq_send_query (struct tgl_state *TLS, struct tgl_dc *DC, int len, void *data, struct query_methods *methods, void *extra, void *callback, void *callback_extra);\nvoid tglq_query_ack (struct tgl_state *TLS, long long id);\nint tglq_query_error (struct tgl_state *TLS, long long id);\nint tglq_query_result (struct tgl_state *TLS, long long id);\nvoid tglq_query_restart (struct tgl_state *TLS, long long id);\n\n//double next_timer_in (void);\n//void work_timers (void);\n\n//extern struct query_methods help_get_config_methods;\n\ndouble get_double_time (void);\n\nvoid tgl_do_send_bind_temp_key (struct tgl_state *TLS, struct tgl_dc *D, long long nonce, int expires_at, void *data, int len, long long msg_id);\n\nvoid tgl_do_request_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E);\nvoid tgl_do_confirm_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E, int sen_nop);\nvoid tgl_do_accept_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E, long long exchange_id, unsigned char g_a[]);\nvoid tgl_do_commit_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E, unsigned char g_a[]);\nvoid tgl_do_abort_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E);\n\nvoid tglq_regen_query (struct tgl_state *TLS, long long id);\nvoid tglq_query_delete (struct tgl_state *TLS, long long id);\nvoid tglq_query_free_all (struct tgl_state *TLS);\nvoid tglq_regen_queries_from_old_session (struct tgl_state *TLS, struct tgl_dc *DC, struct tgl_session *S);\n// For binlog\n\n//int get_dh_config_on_answer (struct query *q);\n//void fetch_dc_option (void);\n#endif\n"
  },
  {
    "path": "scheme.tl",
    "content": "int ?= Int;\nlong ?= Long;\ndouble ?= Double;\nstring ?= String;\n\nbytes string = Bytes;\n\nint128 long long = Int128;\nint256 long long long long = Int256;\n\nboolFalse#bc799737 = Bool;\nboolTrue#997275b5 = Bool;\n\ntrue#3fedd339 = True;\n\nvector#1cb5c415 {t:Type} # [ t ] = Vector t;\n\nerror#c4b9f9bb code:int text:string = Error;\n\nnull#56730bcc = Null;\n\ninputPeerEmpty#7f3b18ea = InputPeer;\ninputPeerSelf#7da07ec9 = InputPeer;\ninputPeerChat#179be863 chat_id:int = InputPeer;\ninputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer;\ninputPeerChannel#20adaef8 channel_id:int access_hash:long = InputPeer;\n\ninputUserEmpty#b98886cf = InputUser;\ninputUserSelf#f7c1b13f = InputUser;\ninputUser#d8292816 user_id:int access_hash:long = InputUser;\n\ninputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact;\n\ninputFile#f52ff27f id:long parts:int name:string md5_checksum:string = InputFile;\ninputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile;\n\ninputMediaEmpty#9664f57f = InputMedia;\ninputMediaUploadedPhoto#f7aff1c0 file:InputFile caption:string = InputMedia;\ninputMediaPhoto#e9bfb4f3 id:InputPhoto caption:string = InputMedia;\ninputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia;\ninputMediaContact#a6e45987 phone_number:string first_name:string last_name:string = InputMedia;\ninputMediaUploadedVideo#82713fdf file:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia;\ninputMediaUploadedThumbVideo#7780ddf9 file:InputFile thumb:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia;\ninputMediaVideo#936a4ebd video:InputVideo caption:string = InputMedia;\ninputMediaUploadedAudio#4e498cab file:InputFile duration:int mime_type:string = InputMedia;\ninputMediaAudio#89938781 audio:InputAudio = InputMedia;\ninputMediaUploadedDocument#1d89306d file:InputFile mime_type:string attributes:Vector<DocumentAttribute> caption:string = InputMedia;\ninputMediaUploadedThumbDocument#ad613491 file:InputFile thumb:InputFile mime_type:string attributes:Vector<DocumentAttribute> caption:string = InputMedia;\ninputMediaDocument#1a77f29c document_id:InputDocument caption:string = InputMedia;\ninputMediaVenue#2827a81a geo_point:InputGeoPoint title:string address:string provider:string venue_id:string = InputMedia;\ninputMediaGifExternal#4843b0fd url:string q:string = InputMedia;\n\ninputChatPhotoEmpty#1ca48f57 = InputChatPhoto;\ninputChatUploadedPhoto#94254732 file:InputFile crop:InputPhotoCrop = InputChatPhoto;\ninputChatPhoto#b2e1bf08 id:InputPhoto crop:InputPhotoCrop = InputChatPhoto;\n\ninputGeoPointEmpty#e4c123d6 = InputGeoPoint;\ninputGeoPoint#f3b7acc9 latitude:double longitude:double = InputGeoPoint;\n\ninputPhotoEmpty#1cd7bf0d = InputPhoto;\ninputPhoto#fb95c6c4 id:long access_hash:long = InputPhoto;\n\ninputVideoEmpty#5508ec75 = InputVideo;\ninputVideo#ee579652 id:long access_hash:long = InputVideo;\n\ninputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation;\ninputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation;\ninputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation;\ninputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation;\ninputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation;\n\ninputPhotoCropAuto#ade6b004 = InputPhotoCrop;\ninputPhotoCrop#d9915325 crop_left:double crop_top:double crop_width:double = InputPhotoCrop;\n\ninputAppEvent#770656a8 time:double type:string peer:long data:string = InputAppEvent;\n\npeerUser#9db1bc6d user_id:int = Peer;\npeerChat#bad0e5bb chat_id:int = Peer;\npeerChannel#bddde532 channel_id:int = Peer;\n\nstorage.fileUnknown#aa963b05 = storage.FileType;\nstorage.fileJpeg#7efe0e = storage.FileType;\nstorage.fileGif#cae1aadf = storage.FileType;\nstorage.filePng#a4f63c0 = storage.FileType;\nstorage.filePdf#ae1e508d = storage.FileType;\nstorage.fileMp3#528a0677 = storage.FileType;\nstorage.fileMov#4b09ebbc = storage.FileType;\nstorage.filePartial#40bc6f52 = storage.FileType;\nstorage.fileMp4#b3cea0e4 = storage.FileType;\nstorage.fileWebp#1081464c = storage.FileType;\n\nfileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation;\nfileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation;\n\nuserEmpty#200250ba id:int = User;\nuser#d10d979a flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?string bot_inline_placeholder:flags.19?string = User;\n\nuserProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;\nuserProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto;\n\nuserStatusEmpty#9d05049 = UserStatus;\nuserStatusOnline#edb93949 expires:int = UserStatus;\nuserStatusOffline#8c703f was_online:int = UserStatus;\nuserStatusRecently#e26f42f1 = UserStatus;\nuserStatusLastWeek#7bf09fc = UserStatus;\nuserStatusLastMonth#77ebc742 = UserStatus;\n\nchatEmpty#9ba2d800 id:int = Chat;\nchat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat;\nchatForbidden#7328bdb id:int title:string = Chat;\nchannel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat;\nchannelForbidden#2d85832c id:int access_hash:long title:string = Chat;\n\nchatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> = ChatFull;\nchannelFull#9e341ddf flags:# can_view_participants:flags.3?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int read_inbox_max_id:int unread_count:int unread_important_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int = ChatFull;\n\nchatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;\nchatParticipantCreator#da13538a user_id:int = ChatParticipant;\nchatParticipantAdmin#e2d6e436 user_id:int inviter_id:int date:int = ChatParticipant;\n\nchatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?ChatParticipant = ChatParticipants;\nchatParticipants#3f460fed chat_id:int participants:Vector<ChatParticipant> version:int = ChatParticipants;\n\nchatPhotoEmpty#37c1011c = ChatPhoto;\nchatPhoto#6153276a photo_small:FileLocation photo_big:FileLocation = ChatPhoto;\n\nmessageEmpty#83e5de54 id:int = Message;\nmessage#c992e15c flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:flags.8?int to_id:Peer fwd_from_id:flags.2?Peer fwd_date:flags.2?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int = Message;\nmessageService#c06b9607 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:flags.8?int to_id:Peer date:int action:MessageAction = Message;\n\nmessageMediaEmpty#3ded6320 = MessageMedia;\nmessageMediaPhoto#3d8ce53d photo:Photo caption:string = MessageMedia;\nmessageMediaVideo#5bcf1675 video:Video caption:string = MessageMedia;\nmessageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;\nmessageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia;\nmessageMediaUnsupported#9f84f49e = MessageMedia;\nmessageMediaDocument#f3e02ea8 document:Document caption:string = MessageMedia;\nmessageMediaAudio#c6b68300 audio:Audio = MessageMedia;\nmessageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia;\nmessageMediaVenue#7912b71f geo:GeoPoint title:string address:string provider:string venue_id:string = MessageMedia;\n\nmessageActionEmpty#b6aef7b0 = MessageAction;\nmessageActionChatCreate#a6638b9a title:string users:Vector<int> = MessageAction;\nmessageActionChatEditTitle#b5a1ce5a title:string = MessageAction;\nmessageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction;\nmessageActionChatDeletePhoto#95e3fbef = MessageAction;\nmessageActionChatAddUser#488a7337 users:Vector<int> = MessageAction;\nmessageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction;\nmessageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction;\nmessageActionChannelCreate#95d2ac92 title:string = MessageAction;\nmessageActionChatMigrateTo#51bdb021 channel_id:int = MessageAction;\nmessageActionChannelMigrateFrom#b055eaee title:string chat_id:int = MessageAction;\n\ndialog#c1dd804a peer:Peer top_message:int read_inbox_max_id:int unread_count:int notify_settings:PeerNotifySettings = Dialog;\ndialogChannel#5b8496b2 peer:Peer top_message:int top_important_message:int read_inbox_max_id:int unread_count:int unread_important_count:int notify_settings:PeerNotifySettings pts:int = Dialog;\n\nphotoEmpty#2331b22d id:long = Photo;\nphoto#cded42fe id:long access_hash:long date:int sizes:Vector<PhotoSize> = Photo;\n\nphotoSizeEmpty#e17e23c type:string = PhotoSize;\nphotoSize#77bfb61b type:string location:FileLocation w:int h:int size:int = PhotoSize;\nphotoCachedSize#e9a734fa type:string location:FileLocation w:int h:int bytes:bytes = PhotoSize;\n\nvideoEmpty#c10658a8 id:long = Video;\nvideo#f72887d3 id:long access_hash:long date:int duration:int mime_type:string size:int thumb:PhotoSize dc_id:int w:int h:int = Video;\n\ngeoPointEmpty#1117dd5f = GeoPoint;\ngeoPoint#2049d70c longitude:double latitude:double = GeoPoint;\n\nauth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone;\n\nauth.sentCode#efed51d9 phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;\nauth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;\n\nauth.authorization#ff036af1 user:User = auth.Authorization;\n\nauth.exportedAuthorization#df969c2d id:int bytes:bytes = auth.ExportedAuthorization;\n\ninputNotifyPeer#b8bc5b0c peer:InputPeer = InputNotifyPeer;\ninputNotifyUsers#193b4417 = InputNotifyPeer;\ninputNotifyChats#4a95e84e = InputNotifyPeer;\ninputNotifyAll#a429b886 = InputNotifyPeer;\n\ninputPeerNotifyEventsEmpty#f03064d8 = InputPeerNotifyEvents;\ninputPeerNotifyEventsAll#e86a2c74 = InputPeerNotifyEvents;\n\ninputPeerNotifySettings#46a2ce98 mute_until:int sound:string show_previews:Bool events_mask:int = InputPeerNotifySettings;\n\npeerNotifyEventsEmpty#add53cb3 = PeerNotifyEvents;\npeerNotifyEventsAll#6d1ded88 = PeerNotifyEvents;\n\npeerNotifySettingsEmpty#70a68512 = PeerNotifySettings;\npeerNotifySettings#8d5e11ee mute_until:int sound:string show_previews:Bool events_mask:int = PeerNotifySettings;\n\nwallPaper#ccb03657 id:int title:string sizes:Vector<PhotoSize> color:int = WallPaper;\nwallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper;\n\ninputReportReasonSpam#58dbcab8 = ReportReason;\ninputReportReasonViolence#1e22c78d = ReportReason;\ninputReportReasonPornography#2e59d922 = ReportReason;\ninputReportReasonOther#e1746d0a text:string = ReportReason;\n\nuserFull#5a89ac5b user:User link:contacts.Link profile_photo:Photo notify_settings:PeerNotifySettings blocked:Bool bot_info:BotInfo = UserFull;\n\ncontact#f911c994 user_id:int mutual:Bool = Contact;\n\nimportedContact#d0028438 user_id:int client_id:long = ImportedContact;\n\ncontactBlocked#561bc879 user_id:int date:int = ContactBlocked;\n\ncontactSuggested#3de191a1 user_id:int mutual_contacts:int = ContactSuggested;\n\ncontactStatus#d3680c61 user_id:int status:UserStatus = ContactStatus;\n\ncontacts.link#3ace484c my_link:ContactLink foreign_link:ContactLink user:User = contacts.Link;\n\ncontacts.contactsNotModified#b74ba9d2 = contacts.Contacts;\ncontacts.contacts#6f8b8cb2 contacts:Vector<Contact> users:Vector<User> = contacts.Contacts;\n\ncontacts.importedContacts#ad524315 imported:Vector<ImportedContact> retry_contacts:Vector<long> users:Vector<User> = contacts.ImportedContacts;\n\ncontacts.blocked#1c138d15 blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked;\ncontacts.blockedSlice#900802a1 count:int blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked;\n\ncontacts.suggested#5649dcc5 results:Vector<ContactSuggested> users:Vector<User> = contacts.Suggested;\n\nmessages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;\nmessages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;\n\nmessages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;\nmessages.messagesSlice#b446ae3 count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;\nmessages.channelMessages#bc0f17bc flags:# pts:int count:int messages:Vector<Message> collapsed:flags.0?Vector<MessageGroup> chats:Vector<Chat> users:Vector<User> = messages.Messages;\n\nmessages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats;\n\nmessages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector<Chat> users:Vector<User> = messages.ChatFull;\n\nmessages.affectedHistory#b45c69d1 pts:int pts_count:int offset:int = messages.AffectedHistory;\n\ninputMessagesFilterEmpty#57e2f66c = MessagesFilter;\ninputMessagesFilterPhotos#9609a51c = MessagesFilter;\ninputMessagesFilterVideo#9fc00e65 = MessagesFilter;\ninputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter;\ninputMessagesFilterPhotoVideoDocuments#d95e73bb = MessagesFilter;\ninputMessagesFilterDocument#9eddf188 = MessagesFilter;\ninputMessagesFilterAudio#cfc87522 = MessagesFilter;\ninputMessagesFilterAudioDocuments#5afbf764 = MessagesFilter;\ninputMessagesFilterUrl#7ef0dd87 = MessagesFilter;\ninputMessagesFilterGif#ffc86587 = MessagesFilter;\n\nupdateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;\nupdateMessageID#4e90bfd6 id:int random_id:long = Update;\nupdateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update;\nupdateUserTyping#5c486927 user_id:int action:SendMessageAction = Update;\nupdateChatUserTyping#9a65ea1f chat_id:int user_id:int action:SendMessageAction = Update;\nupdateChatParticipants#7761198 participants:ChatParticipants = Update;\nupdateUserStatus#1bfbd823 user_id:int status:UserStatus = Update;\nupdateUserName#a7332b73 user_id:int first_name:string last_name:string username:string = Update;\nupdateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bool = Update;\nupdateContactRegistered#2575bbb9 user_id:int date:int = Update;\nupdateContactLink#9d2e67c5 user_id:int my_link:ContactLink foreign_link:ContactLink = Update;\nupdateNewAuthorization#8f06529a auth_key_id:long date:int device:string location:string = Update;\nupdateNewEncryptedMessage#12bcbd9a encr_message:EncryptedMessage qts:int = Update;\nupdateEncryptedChatTyping#1710f156 chat_id:int = Update;\nupdateEncryption#b4a2e88d encr_chat:EncryptedChat date:int = Update;\nupdateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update;\nupdateChatParticipantAdd#ea4b0e5c chat_id:int user_id:int inviter_id:int date:int version:int = Update;\nupdateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update;\nupdateDcOptions#8e5e9873 dc_options:Vector<DcOption> = Update;\nupdateUserBlocked#80ece81a user_id:int blocked:Bool = Update;\nupdateNotifySettings#bec268ef notify_peer:NotifyPeer notify_settings:PeerNotifySettings = Update;\nupdateServiceNotification#382dd3e4 type:string message_text:string media:MessageMedia popup:Bool = Update;\nupdatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;\nupdateUserPhone#12b9417b user_id:int phone:string = Update;\nupdateReadHistoryInbox#9961fd5c peer:Peer max_id:int pts:int pts_count:int = Update;\nupdateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;\nupdateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;\nupdateReadMessagesContents#68c13933 messages:Vector<int> pts:int pts_count:int = Update;\nupdateChannelTooLong#60946422 channel_id:int = Update;\nupdateChannel#b6d45656 channel_id:int = Update;\nupdateChannelGroup#c36c1e3c channel_id:int group:MessageGroup = Update;\nupdateNewChannelMessage#62ba04d9 message:Message channel_pts:int channel_pts_count:int = Update;\nupdateReadChannelInbox#4214f37f channel_id:int max_id:int = Update;\nupdateDeleteChannelMessages#c37521c9 channel_id:int messages:Vector<int> channel_pts:int channel_pts_count:int = Update;\nupdateChannelMessageViews#98a12b4b channel_id:int id:int views:int = Update;\nupdateChatAdmins#6e947941 chat_id:int enabled:Bool version:int = Update;\nupdateChatParticipantAdmin#b6901959 chat_id:int user_id:int is_admin:Bool version:int = Update;\nupdateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update;\nupdateStickerSetsOrder#f0dfb451 order:Vector<long> = Update;\nupdateStickerSets#43ae3dec = Update;\nupdateSavedGifs#9375341e = Update;\nupdateBotInlineQuery#c01eea08 query_id:long user_id:int query:string offset:string = Update;\n\nupdates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;\n\nupdates.differenceEmpty#5d75a138 date:int seq:int = updates.Difference;\nupdates.difference#f49ca0 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference;\nupdates.differenceSlice#a8fb1981 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> intermediate_state:updates.State = updates.Difference;\n\nupdatesTooLong#e317af7e = Updates;\nupdateShortMessage#13e4deaa flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector<MessageEntity> = Updates;\nupdateShortChatMessage#248afa62 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector<MessageEntity> = Updates;\nupdateShort#78d4dec1 update:Update date:int = Updates;\nupdatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;\nupdates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;\nupdateShortSentMessage#11f1331c flags:# unread:flags.0?true out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> = Updates;\n\nphotos.photos#8dca6aa5 photos:Vector<Photo> users:Vector<User> = photos.Photos;\nphotos.photosSlice#15051f54 count:int photos:Vector<Photo> users:Vector<User> = photos.Photos;\n\nphotos.photo#20212ca8 photo:Photo users:Vector<User> = photos.Photo;\n\nupload.file#96a18d5 type:storage.FileType mtime:int bytes:bytes = upload.File;\n\ndcOption#5d8c6cc flags:# ipv6:flags.0?true media_only:flags.1?true id:int ip_address:string port:int = DcOption;\n\nconfig#6bbc5f8 date:int expires:int test_mode:Bool this_dc:int dc_options:Vector<DcOption> chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int chat_big_size:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int disabled_features:Vector<DisabledFeature> = Config;\n\nnearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc;\n\nhelp.appUpdate#8987f311 id:int critical:Bool url:string text:string = help.AppUpdate;\nhelp.noAppUpdate#c45a6536 = help.AppUpdate;\n\nhelp.inviteText#18cb9f78 message:string = help.InviteText;\n\nencryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;\nencryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat;\nencryptedChatRequested#c878527e id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat;\nencryptedChat#fa56ce36 id:int access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long = EncryptedChat;\nencryptedChatDiscarded#13d6dd27 id:int = EncryptedChat;\n\ninputEncryptedChat#f141b5e1 chat_id:int access_hash:long = InputEncryptedChat;\n\nencryptedFileEmpty#c21f497e = EncryptedFile;\nencryptedFile#4a70994c id:long access_hash:long size:int dc_id:int key_fingerprint:int = EncryptedFile;\n\ninputEncryptedFileEmpty#1837c364 = InputEncryptedFile;\ninputEncryptedFileUploaded#64bd0306 id:long parts:int md5_checksum:string key_fingerprint:int = InputEncryptedFile;\ninputEncryptedFile#5a17b5e5 id:long access_hash:long = InputEncryptedFile;\ninputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile;\n\nencryptedMessage#ed18c118 random_id:long chat_id:int date:int bytes:bytes file:EncryptedFile = EncryptedMessage;\nencryptedMessageService#23734b06 random_id:long chat_id:int date:int bytes:bytes = EncryptedMessage;\n\nmessages.dhConfigNotModified#c0e24635 random:bytes = messages.DhConfig;\nmessages.dhConfig#2c221edd g:int p:bytes version:int random:bytes = messages.DhConfig;\n\nmessages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage;\nmessages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage;\n\ninputAudioEmpty#d95adc84 = InputAudio;\ninputAudio#77d440ff id:long access_hash:long = InputAudio;\n\ninputDocumentEmpty#72f0eaae = InputDocument;\ninputDocument#18798952 id:long access_hash:long = InputDocument;\n\naudioEmpty#586988d8 id:long = Audio;\naudio#f9e35055 id:long access_hash:long date:int duration:int mime_type:string size:int dc_id:int = Audio;\n\ndocumentEmpty#36f8c871 id:long = Document;\ndocument#f9a39f4f id:long access_hash:long date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector<DocumentAttribute> = Document;\n\nhelp.support#17c6b5f6 phone_number:string user:User = help.Support;\n\nnotifyPeer#9fd40bd8 peer:Peer = NotifyPeer;\nnotifyUsers#b4c83b4c = NotifyPeer;\nnotifyChats#c007cec3 = NotifyPeer;\nnotifyAll#74d07c60 = NotifyPeer;\n\nsendMessageTypingAction#16bf744e = SendMessageAction;\nsendMessageCancelAction#fd5ec8f5 = SendMessageAction;\nsendMessageRecordVideoAction#a187d66f = SendMessageAction;\nsendMessageUploadVideoAction#e9763aec progress:int = SendMessageAction;\nsendMessageRecordAudioAction#d52f73f7 = SendMessageAction;\nsendMessageUploadAudioAction#f351d7ab progress:int = SendMessageAction;\nsendMessageUploadPhotoAction#d1d34a26 progress:int = SendMessageAction;\nsendMessageUploadDocumentAction#aa0cd9e4 progress:int = SendMessageAction;\nsendMessageGeoLocationAction#176f8ba1 = SendMessageAction;\nsendMessageChooseContactAction#628cbc6f = SendMessageAction;\n\ncontacts.found#1aa1f784 results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found;\n\ninputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;\n\nprivacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;\n\ninputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;\ninputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;\ninputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule;\ninputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule;\ninputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule;\ninputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule;\n\nprivacyValueAllowContacts#fffe1bac = PrivacyRule;\nprivacyValueAllowAll#65427b82 = PrivacyRule;\nprivacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule;\nprivacyValueDisallowContacts#f888fa1a = PrivacyRule;\nprivacyValueDisallowAll#8b73e763 = PrivacyRule;\nprivacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule;\n\naccount.privacyRules#554abb6f rules:Vector<PrivacyRule> users:Vector<User> = account.PrivacyRules;\n\naccountDaysTTL#b8d0afdf days:int = AccountDaysTTL;\n\naccount.sentChangePhoneCode#a4f58c4c phone_code_hash:string send_call_timeout:int = account.SentChangePhoneCode;\n\ndocumentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;\ndocumentAttributeAnimated#11b58939 = DocumentAttribute;\ndocumentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = DocumentAttribute;\ndocumentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute;\ndocumentAttributeAudio#ded218e0 duration:int title:string performer:string = DocumentAttribute;\ndocumentAttributeFilename#15590068 file_name:string = DocumentAttribute;\n\nmessages.stickersNotModified#f1749a22 = messages.Stickers;\nmessages.stickers#8a8ecd32 hash:string stickers:Vector<Document> = messages.Stickers;\n\nstickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack;\n\nmessages.allStickersNotModified#e86602c3 = messages.AllStickers;\nmessages.allStickers#edfd405f hash:int sets:Vector<StickerSet> = messages.AllStickers;\n\ndisabledFeature#ae636f24 feature:string description:string = DisabledFeature;\n\nmessages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages;\n\ncontactLinkUnknown#5f4f9247 = ContactLink;\ncontactLinkNone#feedd3ad = ContactLink;\ncontactLinkHasPhone#268f3f59 = ContactLink;\ncontactLinkContact#d502c2d0 = ContactLink;\n\nwebPageEmpty#eb1477e8 id:long = WebPage;\nwebPagePending#c586da1c id:long date:int = WebPage;\nwebPage#ca820ed7 flags:# id:long url:string display_url:string type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document = WebPage;\n\nauthorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;\n\naccount.authorizations#1250abde authorizations:Vector<Authorization> = account.Authorizations;\n\naccount.noPassword#96dabc18 new_salt:bytes email_unconfirmed_pattern:string = account.Password;\naccount.password#7c18141c current_salt:bytes new_salt:bytes hint:string has_recovery:Bool email_unconfirmed_pattern:string = account.Password;\n\naccount.passwordSettings#b7b72ab3 email:string = account.PasswordSettings;\n\naccount.passwordInputSettings#bcfc532c flags:# new_salt:flags.0?bytes new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string = account.PasswordInputSettings;\n\nauth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery;\n\nreceivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage;\n\nchatInviteEmpty#69df3769 = ExportedChatInvite;\nchatInviteExported#fc2e05bc link:string = ExportedChatInvite;\n\nchatInviteAlready#5a686d7c chat:Chat = ChatInvite;\nchatInvite#93e99b60 flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string = ChatInvite;\n\ninputStickerSetEmpty#ffb62b95 = InputStickerSet;\ninputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;\ninputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;\n\nstickerSet#cd303b41 flags:# installed:flags.0?true disabled:flags.1?true official:flags.2?true id:long access_hash:long title:string short_name:string count:int hash:int = StickerSet;\n\nmessages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;\n\nbotCommand#c27ac8c7 command:string description:string = BotCommand;\n\nbotInfoEmpty#bb2e37ce = BotInfo;\nbotInfo#9cf585d user_id:int version:int share_text:string description:string commands:Vector<BotCommand> = BotInfo;\n\nkeyboardButton#a2fa4880 text:string = KeyboardButton;\n\nkeyboardButtonRow#77608b83 buttons:Vector<KeyboardButton> = KeyboardButtonRow;\n\nreplyKeyboardHide#a03e5b85 flags:# selective:flags.2?true = ReplyMarkup;\nreplyKeyboardForceReply#f4108aa0 flags:# single_use:flags.1?true selective:flags.2?true = ReplyMarkup;\nreplyKeyboardMarkup#3502758c flags:# resize:flags.0?true single_use:flags.1?true selective:flags.2?true rows:Vector<KeyboardButtonRow> = ReplyMarkup;\n\nhelp.appChangelogEmpty#af7e0394 = help.AppChangelog;\nhelp.appChangelog#4668e6bd text:string = help.AppChangelog;\n\nmessageEntityUnknown#bb92ba95 offset:int length:int = MessageEntity;\nmessageEntityMention#fa04579d offset:int length:int = MessageEntity;\nmessageEntityHashtag#6f635b0d offset:int length:int = MessageEntity;\nmessageEntityBotCommand#6cef8ac7 offset:int length:int = MessageEntity;\nmessageEntityUrl#6ed02538 offset:int length:int = MessageEntity;\nmessageEntityEmail#64e475c2 offset:int length:int = MessageEntity;\nmessageEntityBold#bd610bc9 offset:int length:int = MessageEntity;\nmessageEntityItalic#826f8b60 offset:int length:int = MessageEntity;\nmessageEntityCode#28a20571 offset:int length:int = MessageEntity;\nmessageEntityPre#73924be0 offset:int length:int language:string = MessageEntity;\nmessageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity;\n\ninputChannelEmpty#ee8c1e86 = InputChannel;\ninputChannel#afeb712e channel_id:int access_hash:long = InputChannel;\n\ncontacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector<Chat> users:Vector<User> = contacts.ResolvedPeer;\n\nmessageRange#ae30253 min_id:int max_id:int = MessageRange;\n\nmessageGroup#e8346f53 min_id:int max_id:int count:int date:int = MessageGroup;\n\nupdates.channelDifferenceEmpty#3e11affb flags:# final:flags.0?true channel_pts:int timeout:flags.1?int = updates.ChannelDifference;\nupdates.channelDifferenceTooLong#5e167646 flags:# final:flags.0?true channel_pts:int timeout:flags.1?int top_message:int top_important_message:int read_inbox_max_id:int unread_count:int unread_important_count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;\nupdates.channelDifference#2064674e flags:# final:flags.0?true channel_pts:int timeout:flags.1?int new_messages:Vector<Message> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;\n\nchannelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter;\nchannelMessagesFilter#cd77d957 flags:# important_only:flags.0?true exclude_new_messages:flags.1?true ranges:Vector<MessageRange> = ChannelMessagesFilter;\nchannelMessagesFilterCollapsed#fa01232e = ChannelMessagesFilter;\n\nchannelParticipant#15ebac1d user_id:int date:int = ChannelParticipant;\nchannelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant;\nchannelParticipantModerator#91057fef user_id:int inviter_id:int date:int = ChannelParticipant;\nchannelParticipantEditor#98192d61 user_id:int inviter_id:int date:int = ChannelParticipant;\nchannelParticipantKicked#8cc5e69a user_id:int kicked_by:int date:int = ChannelParticipant;\nchannelParticipantCreator#e3e2e1f9 user_id:int = ChannelParticipant;\n\nchannelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter;\nchannelParticipantsAdmins#b4608969 = ChannelParticipantsFilter;\nchannelParticipantsKicked#3c37bb7a = ChannelParticipantsFilter;\nchannelParticipantsBots#b0d1865b = ChannelParticipantsFilter;\n\nchannelRoleEmpty#b285a0c6 = ChannelParticipantRole;\nchannelRoleModerator#9618d975 = ChannelParticipantRole;\nchannelRoleEditor#820bfe8c = ChannelParticipantRole;\n\nchannels.channelParticipants#f56ee2a8 count:int participants:Vector<ChannelParticipant> users:Vector<User> = channels.ChannelParticipants;\n\nchannels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector<User> = channels.ChannelParticipant;\n\nhelp.termsOfService#f1ee3e90 text:string = help.TermsOfService;\n\nfoundGif#162ecc1f url:string thumb_url:string content_url:string content_type:string w:int h:int = FoundGif;\nfoundGifCached#9c750409 url:string photo:Photo document:Document = FoundGif;\n\nmessages.foundGifs#450a1c0a next_offset:int results:Vector<FoundGif> = messages.FoundGifs;\n\nmessages.savedGifsNotModified#e8025ca2 = messages.SavedGifs;\nmessages.savedGifs#2e0709a5 hash:int gifs:Vector<Document> = messages.SavedGifs;\n\ninputBotInlineMessageMediaAuto#2e43e587 caption:string = InputBotInlineMessage;\ninputBotInlineMessageText#adf0df71 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> = InputBotInlineMessage;\n\ninputBotInlineResult#2cbbe15a flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb_url:flags.4?string content_url:flags.5?string content_type:flags.5?string w:flags.6?int h:flags.6?int duration:flags.7?int send_message:InputBotInlineMessage = InputBotInlineResult;\n\nbotInlineMessageMediaAuto#fc56e87d caption:string = BotInlineMessage;\nbotInlineMessageText#a56197a9 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> = BotInlineMessage;\n\nbotInlineMediaResultDocument#f897d33e id:string type:string document:Document send_message:BotInlineMessage = BotInlineResult;\nbotInlineMediaResultPhoto#c5528587 id:string type:string photo:Photo send_message:BotInlineMessage = BotInlineResult;\nbotInlineResult#9bebaeb9 flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb_url:flags.4?string content_url:flags.5?string content_type:flags.5?string w:flags.6?int h:flags.6?int duration:flags.7?int send_message:BotInlineMessage = BotInlineResult;\n\nmessages.botResults#1170b0a3 flags:# gallery:flags.0?true query_id:long next_offset:flags.1?string results:Vector<BotInlineResult> = messages.BotResults;\n\n---functions---\n\ninvokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;\ninvokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X;\ninitConnection#69796de9 {X:Type} api_id:int device_model:string system_version:string app_version:string lang_code:string query:!X = X;\ninvokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;\ninvokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X;\n\nauth.checkPhone#6fe51dfb phone_number:string = auth.CheckedPhone;\nauth.sendCode#768d5f4d phone_number:string sms_type:int api_id:int api_hash:string lang_code:string = auth.SentCode;\nauth.sendCall#3c51564 phone_number:string phone_code_hash:string = Bool;\nauth.signUp#1b067634 phone_number:string phone_code_hash:string phone_code:string first_name:string last_name:string = auth.Authorization;\nauth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:string = auth.Authorization;\nauth.logOut#5717da40 = Bool;\nauth.resetAuthorizations#9fab0d1a = Bool;\nauth.sendInvites#771c1d97 phone_numbers:Vector<string> message:string = Bool;\nauth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;\nauth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization;\nauth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool;\nauth.sendSms#da9f3e8 phone_number:string phone_code_hash:string = Bool;\nauth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization;\nauth.checkPassword#a63011e password_hash:bytes = auth.Authorization;\nauth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery;\nauth.recoverPassword#4ea56e92 code:string = auth.Authorization;\n\naccount.registerDevice#446c712c token_type:int token:string device_model:string system_version:string app_version:string app_sandbox:Bool lang_code:string = Bool;\naccount.unregisterDevice#65c55b40 token_type:int token:string = Bool;\naccount.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool;\naccount.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings;\naccount.resetNotifySettings#db7e1747 = Bool;\naccount.updateProfile#f0888d68 first_name:string last_name:string = User;\naccount.updateStatus#6628562c offline:Bool = Bool;\naccount.getWallPapers#c04cfac2 = Vector<WallPaper>;\naccount.reportPeer#ae189d5f peer:InputPeer reason:ReportReason = Bool;\naccount.checkUsername#2714d86c username:string = Bool;\naccount.updateUsername#3e0bdd7c username:string = User;\naccount.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;\naccount.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;\naccount.deleteAccount#418d4e0b reason:string = Bool;\naccount.getAccountTTL#8fc711d = AccountDaysTTL;\naccount.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool;\naccount.sendChangePhoneCode#a407a8f4 phone_number:string = account.SentChangePhoneCode;\naccount.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User;\naccount.updateDeviceLocked#38df3532 period:int = Bool;\naccount.getAuthorizations#e320c158 = account.Authorizations;\naccount.resetAuthorization#df77f3bc hash:long = Bool;\naccount.getPassword#548a30f5 = account.Password;\naccount.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings;\naccount.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool;\n\nusers.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;\nusers.getFullUser#ca30a5b1 id:InputUser = UserFull;\n\ncontacts.getStatuses#c4a353ee = Vector<ContactStatus>;\ncontacts.getContacts#22c6aa08 hash:string = contacts.Contacts;\ncontacts.importContacts#da30b32d contacts:Vector<InputContact> replace:Bool = contacts.ImportedContacts;\ncontacts.getSuggested#cd773428 limit:int = contacts.Suggested;\ncontacts.deleteContact#8e953744 id:InputUser = contacts.Link;\ncontacts.deleteContacts#59ab389e id:Vector<InputUser> = Bool;\ncontacts.block#332b49fc id:InputUser = Bool;\ncontacts.unblock#e54100bd id:InputUser = Bool;\ncontacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked;\ncontacts.exportCard#84e53737 = Vector<int>;\ncontacts.importCard#4fe196fe export_card:Vector<int> = User;\ncontacts.search#11f812d8 q:string limit:int = contacts.Found;\ncontacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer;\n\nmessages.getMessages#4222fa74 id:Vector<int> = messages.Messages;\nmessages.getDialogs#6b47f94d offset_date:int offset_id:int offset_peer:InputPeer limit:int = messages.Dialogs;\nmessages.getHistory#8a8ec2da peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;\nmessages.search#d4569248 flags:# important_only:flags.0?true peer:InputPeer q:string filter:MessagesFilter min_date:int max_date:int offset:int max_id:int limit:int = messages.Messages;\nmessages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;\nmessages.deleteHistory#b7c13bd9 peer:InputPeer max_id:int = messages.AffectedHistory;\nmessages.deleteMessages#a5f18925 id:Vector<int> = messages.AffectedMessages;\nmessages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;\nmessages.setTyping#a3825e50 peer:InputPeer action:SendMessageAction = Bool;\nmessages.sendMessage#fa88427a flags:# no_webpage:flags.1?true broadcast:flags.4?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = Updates;\nmessages.sendMedia#c8f16791 flags:# broadcast:flags.4?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates;\nmessages.forwardMessages#708e0195 flags:# broadcast:flags.4?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer = Updates;\nmessages.reportSpam#cf1592db peer:InputPeer = Bool;\nmessages.getChats#3c6aa187 id:Vector<int> = messages.Chats;\nmessages.getFullChat#3b831c66 chat_id:int = messages.ChatFull;\nmessages.editChatTitle#dc452855 chat_id:int title:string = Updates;\nmessages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates;\nmessages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates;\nmessages.deleteChatUser#e0611f16 chat_id:int user_id:InputUser = Updates;\nmessages.createChat#9cb126e users:Vector<InputUser> title:string = Updates;\nmessages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;\nmessages.sendBroadcast#bf73f4da contacts:Vector<InputUser> random_id:Vector<long> message:string media:InputMedia = Updates;\nmessages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;\nmessages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;\nmessages.acceptEncryption#3dbc0415 peer:InputEncryptedChat g_b:bytes key_fingerprint:long = EncryptedChat;\nmessages.discardEncryption#edd923c5 chat_id:int = Bool;\nmessages.setEncryptedTyping#791451ed peer:InputEncryptedChat typing:Bool = Bool;\nmessages.readEncryptedHistory#7f4b690a peer:InputEncryptedChat max_date:int = Bool;\nmessages.sendEncrypted#a9776773 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage;\nmessages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage;\nmessages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage;\nmessages.receivedQueue#55a5bb66 max_qts:int = Vector<long>;\nmessages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages;\nmessages.getStickers#ae22e045 emoticon:string hash:string = messages.Stickers;\nmessages.getAllStickers#1c9618b1 hash:int = messages.AllStickers;\nmessages.getWebPagePreview#25223e24 message:string = MessageMedia;\nmessages.exportChatInvite#7d885289 chat_id:int = ExportedChatInvite;\nmessages.checkChatInvite#3eadb1bb hash:string = ChatInvite;\nmessages.importChatInvite#6c50051c hash:string = Updates;\nmessages.getStickerSet#2619a90e stickerset:InputStickerSet = messages.StickerSet;\nmessages.installStickerSet#7b30c3a6 stickerset:InputStickerSet disabled:Bool = Bool;\nmessages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;\nmessages.startBot#e6df7378 bot:InputUser peer:InputPeer random_id:long start_param:string = Updates;\nmessages.getMessagesViews#c4c8a55d peer:InputPeer id:Vector<int> increment:Bool = Vector<int>;\nmessages.toggleChatAdmins#ec8bd9e1 chat_id:int enabled:Bool = Updates;\nmessages.editChatAdmin#a9e69f2e chat_id:int user_id:InputUser is_admin:Bool = Bool;\nmessages.migrateChat#15a3b8e3 chat_id:int = Updates;\nmessages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;\nmessages.reorderStickerSets#9fcfbc30 order:Vector<long> = Bool;\nmessages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;\nmessages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs;\nmessages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs;\nmessages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;\nmessages.getInlineBotResults#9324600d bot:InputUser query:string offset:string = messages.BotResults;\nmessages.setInlineBotResults#3f23ec12 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector<InputBotInlineResult> cache_time:int next_offset:flags.2?string = Bool;\nmessages.sendInlineBotResult#b16e06fe flags:# broadcast:flags.4?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates;\n\nupdates.getState#edd4882a = updates.State;\nupdates.getDifference#a041495 pts:int date:int qts:int = updates.Difference;\nupdates.getChannelDifference#bb32d7c0 channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;\n\nphotos.updateProfilePhoto#eef579a0 id:InputPhoto crop:InputPhotoCrop = UserProfilePhoto;\nphotos.uploadProfilePhoto#d50f9c88 file:InputFile caption:string geo_point:InputGeoPoint crop:InputPhotoCrop = photos.Photo;\nphotos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;\nphotos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;\n\nupload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;\nupload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File;\nupload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool;\n\nhelp.getConfig#c4f9186b = Config;\nhelp.getNearestDc#1fb33026 = NearestDc;\nhelp.getAppUpdate#c812ac7e device_model:string system_version:string app_version:string lang_code:string = help.AppUpdate;\nhelp.saveAppLog#6f02f748 events:Vector<InputAppEvent> = Bool;\nhelp.getInviteText#a4a95186 lang_code:string = help.InviteText;\nhelp.getSupport#9cdf08cd = help.Support;\nhelp.getAppChangelog#5bab7fb2 device_model:string system_version:string app_version:string lang_code:string = help.AppChangelog;\nhelp.getTermsOfService#37d78f83 lang_code:string = help.TermsOfService;\n\nchannels.getDialogs#a9d3d249 offset:int limit:int = messages.Dialogs;\nchannels.getImportantHistory#ddb929cb channel:InputChannel offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;\nchannels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;\nchannels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages;\nchannels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory;\nchannels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool;\nchannels.getMessages#93d7b347 channel:InputChannel id:Vector<int> = messages.Messages;\nchannels.getParticipants#24d98f92 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int = channels.ChannelParticipants;\nchannels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant;\nchannels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats;\nchannels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;\nchannels.createChannel#f4893d7f flags:# broadcast:flags.0?true megagroup:flags.1?true title:string about:string = Updates;\nchannels.editAbout#13e27f1e channel:InputChannel about:string = Bool;\nchannels.editAdmin#eb7611d0 channel:InputChannel user_id:InputUser role:ChannelParticipantRole = Updates;\nchannels.editTitle#566decd0 channel:InputChannel title:string = Updates;\nchannels.editPhoto#f12e57c9 channel:InputChannel photo:InputChatPhoto = Updates;\nchannels.toggleComments#aaa29e88 channel:InputChannel enabled:Bool = Updates;\nchannels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool;\nchannels.updateUsername#3514b3de channel:InputChannel username:string = Bool;\nchannels.joinChannel#24b524c5 channel:InputChannel = Updates;\nchannels.leaveChannel#f836aa95 channel:InputChannel = Updates;\nchannels.inviteToChannel#199f3a6c channel:InputChannel users:Vector<InputUser> = Updates;\nchannels.kickFromChannel#a672de14 channel:InputChannel user_id:InputUser kicked:Bool = Updates;\nchannels.exportInvite#c7560885 channel:InputChannel = ExportedChatInvite;\nchannels.deleteChannel#c0111fe3 channel:InputChannel = Updates;\n"
  },
  {
    "path": "structures.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include <assert.h>\n#include <string.h>\n#include <strings.h>\n#include \"tgl-structures.h\"\n#include \"mtproto-common.h\"\n//#include \"telegram.h\"\n#include \"tree.h\"\n#include \"crypto/aes.h\"\n#include \"crypto/bn.h\"\n#include \"crypto/sha.h\"\n#include \"queries.h\"\n#include \"tgl-binlog.h\"\n#include \"tgl-methods-in.h\"\n#include \"updates.h\"\n#include \"mtproto-client.h\"\n\n#include \"tgl.h\"\n#include \"auto.h\"\n#include \"auto/auto-types.h\"\n#include \"auto/auto-skip.h\"\n#include \"auto/auto-fetch-ds.h\"\n#include \"auto/auto-free-ds.h\"\n\nstatic int id_cmp (struct tgl_message *M1, struct tgl_message *M2);\n#define peer_cmp(a,b) (tgl_cmp_peer_id (a->id, b->id))\n#define peer_cmp_name(a,b) (strcmp (a->print_name, b->print_name))\n\nstatic int random_id_cmp (struct tgl_message *L, struct tgl_message *R) {\n  if (L->random_id < R->random_id) { return -1; }\n  if (L->random_id > R->random_id) { return 1; }\n  return 0;\n}\n\nstatic int temp_id_cmp (struct tgl_message *L, struct tgl_message *R) {\n  if (L->temp_id < R->temp_id) { return -1; }\n  if (L->temp_id > R->temp_id) { return 1; }\n  return 0;\n}\n\nstatic int photo_id_cmp (struct tgl_photo *L, struct tgl_photo *R) {\n  if (L->id < R->id) { return -1; }\n  if (L->id > R->id) { return 1; }\n  return 0;\n}\n\nstatic int document_id_cmp (struct tgl_document *L, struct tgl_document *R) {\n  if (L->id < R->id) { return -1; }\n  if (L->id > R->id) { return 1; }\n  return 0;\n}\n\nstatic int webpage_id_cmp (struct tgl_webpage *L, struct tgl_webpage *R) {\n  if (L->id < R->id) { return -1; }\n  if (L->id > R->id) { return 1; }\n  return 0;\n}\n\nDEFINE_TREE(peer,tgl_peer_t *,peer_cmp,0)\nDEFINE_TREE(peer_by_name,tgl_peer_t *,peer_cmp_name,0)\nDEFINE_TREE(message,struct tgl_message *,id_cmp,0)\nDEFINE_TREE(random_id,struct tgl_message *, random_id_cmp,0)\nDEFINE_TREE(temp_id,struct tgl_message *, temp_id_cmp,0)\nDEFINE_TREE(photo,struct tgl_photo *,photo_id_cmp,0)\nDEFINE_TREE(document,struct tgl_document *,document_id_cmp,0)\nDEFINE_TREE(webpage,struct tgl_webpage *,webpage_id_cmp,0)\n\n\nstatic void increase_peer_size (struct tgl_state *TLS);\n\nchar *tgls_default_create_print_name (struct tgl_state *TLS, tgl_peer_id_t id, const char *a1, const char *a2, const char *a3, const char *a4) {\n  const char *d[4];\n  d[0] = a1; d[1] = a2; d[2] = a3; d[3] = a4;\n  static char buf[10000];\n  buf[0] = 0;\n  int i;\n  int p = 0;\n  for (i = 0; i < 4; i++) {\n    if (d[i] && strlen (d[i])) {\n      p += tsnprintf (buf + p, 9999 - p, \"%s%s\", p ? \"_\" : \"\", d[i]);\n      assert (p < 9990);\n    }\n  }\n  char *s = buf;\n  while (*s) {\n    if (((unsigned char)*s) <= ' ') { *s = '_'; }\n    if (*s == '#') { *s = '_'; }\n    if (*s == '$') { *s = '_'; }\n    if (*s == '@') { *s = '_'; }\n    s++;\n  }\n  s = buf;\n  int fl = strlen (s);\n  int cc = 0;\n  while (1) {\n    tgl_peer_t *P = tgl_peer_get_by_name (TLS, s);\n    if (!P || !tgl_cmp_peer_id (P->id, id)) {\n      break;\n    }\n    cc ++;\n    assert (cc <= 9999);\n    tsnprintf (s + fl, 9999 - fl, \"#%d\", cc);\n  }\n  return tstrdup (s);\n}\n\nenum tgl_typing_status tglf_fetch_typing (struct tl_ds_send_message_action *DS_SMA) {\n  if (!DS_SMA) { return 0; }\n  switch (DS_SMA->magic) {\n  case CODE_send_message_typing_action:\n    return tgl_typing_typing;\n  case CODE_send_message_cancel_action:\n    return tgl_typing_cancel;\n  case CODE_send_message_record_video_action:\n    return tgl_typing_record_video;\n  case CODE_send_message_upload_video_action:\n    return tgl_typing_upload_video;\n  case CODE_send_message_record_audio_action:\n    return tgl_typing_record_audio;\n  case CODE_send_message_upload_audio_action:\n    return tgl_typing_upload_audio;\n  case CODE_send_message_upload_photo_action:\n    return tgl_typing_upload_photo;\n  case CODE_send_message_upload_document_action:\n    return tgl_typing_upload_document;\n  case CODE_send_message_geo_location_action:\n    return tgl_typing_geo;\n  case CODE_send_message_choose_contact_action:\n    return tgl_typing_choose_contact;\n  default:\n    assert (0);\n    return tgl_typing_none;\n  }\n}\n\n/*enum tgl_typing_status tglf_fetch_typing (void) {\n  struct tl_ds_send_message_action *DS_SMA = fetch_ds_type_send_message_action (TYPE_TO_PARAM (send_message_action));\n  enum tgl_typing_status res = tglf_fetch_typing (DS_SMA);\n  free_ds_type_send_message_action (DS_SMA, TYPE_TO_PARAM (send_message_action));\n  return res;\n}*/\n\n/* {{{ Fetch */\n\ntgl_peer_id_t tglf_fetch_peer_id (struct tgl_state *TLS, struct tl_ds_peer *DS_P) {\n  switch (DS_P->magic) {\n  case CODE_peer_user:\n    return TGL_MK_USER (DS_LVAL (DS_P->user_id));\n  case CODE_peer_chat:\n    return TGL_MK_CHAT (DS_LVAL (DS_P->chat_id));\n  case CODE_peer_channel:\n    return TGL_MK_CHANNEL (DS_LVAL (DS_P->channel_id));\n  default: \n    assert (0);\n    exit (2);\n  }\n\n}\n\nint tglf_fetch_file_location (struct tgl_state *TLS, struct tgl_file_location *loc, struct tl_ds_file_location *DS_FL) {\n  if (!DS_FL) { return 0; }\n  loc->dc = DS_LVAL (DS_FL->dc_id);\n  loc->volume = DS_LVAL (DS_FL->volume_id);\n  loc->local_id = DS_LVAL (DS_FL->local_id);\n  loc->secret = DS_LVAL (DS_FL->secret);\n  return 0;\n}\n\nint tglf_fetch_user_status (struct tgl_state *TLS, struct tgl_user_status *S, struct tgl_user *U, struct tl_ds_user_status *DS_US) {\n  if (!DS_US) { return 0; }\n  switch (DS_US->magic) {\n  case CODE_user_status_empty:\n    if (S->online) {\n      tgl_insert_status_update (TLS, U);\n      if (S->online == 1) {\n        tgl_remove_status_expire (TLS, U);\n      }\n    }\n    S->online = 0;\n    S->when = 0;\n    break;\n  case CODE_user_status_online:\n    {\n      if (S->online != 1) {\n        S->when = DS_LVAL (DS_US->expires);\n        if (S->online) {\n          tgl_insert_status_update (TLS, U);\n        }\n        tgl_insert_status_expire (TLS, U);\n        S->online = 1;\n      } else {\n        if (DS_LVAL (DS_US->expires) != S->when) {\n          S->when = DS_LVAL (DS_US->expires);\n          tgl_remove_status_expire (TLS, U);\n          tgl_insert_status_expire (TLS, U);\n        }\n      }\n    }\n    break;\n  case CODE_user_status_offline:\n    if (S->online != -1) {\n      if (S->online) {\n        tgl_insert_status_update (TLS, U);\n      }\n      if (S->online == 1) {\n        tgl_remove_status_expire (TLS, U);\n      }\n    }\n    S->online = -1;\n    S->when = DS_LVAL (DS_US->was_online);\n    break;\n  case CODE_user_status_recently:\n    if (S->online != -2) {\n      if (S->online) {\n        tgl_insert_status_update (TLS, U);\n      }\n      if (S->online == 1) {\n        tgl_remove_status_expire (TLS, U);\n      }\n    }\n    S->online = -2;\n    break;\n  case CODE_user_status_last_week:\n    if (S->online != -3) {\n      if (S->online) {\n        tgl_insert_status_update (TLS, U);\n      }\n      if (S->online == 1) {\n        tgl_remove_status_expire (TLS, U);\n      }\n    }\n    S->online = -3;\n    break;\n  case CODE_user_status_last_month:\n    if (S->online != -4) {\n      if (S->online) {\n        tgl_insert_status_update (TLS, U);\n      }\n      if (S->online == 1) {\n        tgl_remove_status_expire (TLS, U);\n      }\n    }\n    S->online = -4;\n    break;\n  default:\n    assert (0);\n  }\n  return 0;\n}\n\nstruct tgl_user *tglf_fetch_alloc_user (struct tgl_state *TLS, struct tl_ds_user *DS_U) {\n  if (!DS_U) { return 0; }\n  if (DS_U->magic == CODE_user_empty) {\n    return 0;\n  } \n  \n  tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->id));  \n  user_id.access_hash = DS_LVAL (DS_U->access_hash);\n  \n  struct tgl_user *U = (struct tgl_user *)tgl_peer_get (TLS, user_id);\n  if (!U) {\n    TLS->users_allocated ++;\n    U = talloc0 (sizeof (tgl_peer_t));\n    U->id = user_id;\n    TLS->peer_tree = tree_insert_peer (TLS->peer_tree, (tgl_peer_t *)U, rand ());\n    increase_peer_size (TLS);\n    TLS->Peers[TLS->peer_num ++] = (tgl_peer_t *)U;\n  }\n  \n  int flags = U->flags;\n\n  if (DS_LVAL (DS_U->flags) & (1 << 10)) {\n    bl_do_set_our_id (TLS, U->id);\n    flags |= TGLUF_SELF;\n  } else {\n    flags &= ~TGLUF_SELF;\n  }\n  \n  if (DS_LVAL (DS_U->flags) & (1 << 11)) {\n    flags |= TGLUF_CONTACT;\n  } else {\n    flags &= ~TGLUF_CONTACT;\n  }\n  \n  if (DS_LVAL (DS_U->flags) & (1 << 12)) {\n    flags |= TGLUF_MUTUAL_CONTACT;\n  } else {\n    flags &= ~TGLUF_MUTUAL_CONTACT;\n  }\n  \n  \n  if (DS_LVAL (DS_U->flags) & (1 << 14)) {\n    flags |= TGLUF_BOT;\n  } else {\n    flags &= ~TGLUF_BOT;\n  }\n  /*\n  if (DS_LVAL (DS_U->flags) & (1 << 15)) {\n    flags |= TGLUF_BOT_FULL_ACCESS;\n  }\n  \n  if (DS_LVAL (DS_U->flags) & (1 << 16)) {\n    flags |= TGLUF_BOT_NO_GROUPS;\n  }*/\n  \n  if (DS_LVAL (DS_U->flags) & (1 << 17)) {\n    flags |= TGLUF_OFFICIAL;\n  } else {\n    flags &= ~TGLUF_OFFICIAL;\n  }\n\n  if (!(flags & TGLUF_CREATED)) {\n    flags |= TGLUF_CREATE | TGLUF_CREATED;\n  }\n\n  bl_do_user (TLS, tgl_get_peer_id (U->id), \n    DS_U->access_hash,\n    DS_STR (DS_U->first_name), \n    DS_STR (DS_U->last_name), \n    DS_STR (DS_U->phone),\n    DS_STR (DS_U->username),\n    NULL,\n    DS_U->photo,\n    NULL, NULL,\n    NULL,\n    flags\n  );\n  \n  if (DS_U->status) {\n    assert (tglf_fetch_user_status (TLS, &U->status, U, DS_U->status) >= 0);\n  }\n  \n  if (DS_LVAL (DS_U->flags) & (1 << 13)) {\n    if (!(U->flags & TGLUF_DELETED)) {\n      bl_do_peer_delete (TLS, U->id);\n    }\n  }\n  \n  return U;\n}\n\nstruct tgl_user *tglf_fetch_alloc_user_full (struct tgl_state *TLS, struct tl_ds_user_full *DS_UF) {\n  if (!DS_UF) { return NULL; }\n\n  struct tgl_user *U = tglf_fetch_alloc_user (TLS, DS_UF->user);\n  if (!U) { return NULL; }\n\n  int flags = U->flags;\n  \n  if (DS_BVAL (DS_UF->blocked)) {\n    flags |= TGLUF_BLOCKED;\n  } else {\n    flags &= ~TGLUF_BLOCKED;\n  }\n\n  bl_do_user (TLS, tgl_get_peer_id (U->id), \n    NULL,\n    NULL, 0, \n    NULL, 0,\n    NULL, 0,\n    NULL, 0,\n    DS_UF->profile_photo,\n    NULL,\n    NULL, NULL,\n    DS_UF->bot_info,\n    flags\n  );\n\n  return U;\n}\n\nvoid str_to_256 (unsigned char *dst, char *src, int src_len) {\n  if (src_len >= 256) {\n    memcpy (dst, src + src_len - 256, 256);\n  } else {\n    memset(dst, 0, 256 - src_len);\n    memcpy (dst + 256 - src_len, src, src_len);\n  }\n}\n\nvoid str_to_32 (unsigned char *dst, char *src, int src_len) {\n  if (src_len >= 32) {\n    memcpy (dst, src + src_len - 32, 32);\n  } else {\n    memset(dst, 0, 32 - src_len);\n    memcpy (dst + 32 - src_len, src, src_len);\n  }\n}\n\nstruct tgl_secret_chat *tglf_fetch_alloc_encrypted_chat (struct tgl_state *TLS, struct tl_ds_encrypted_chat *DS_EC) {\n  if (!DS_EC) { return NULL; }\n  if (DS_EC->magic == CODE_encrypted_chat_empty) {\n    return NULL;\n  }\n\n  tgl_peer_id_t chat_id = TGL_MK_ENCR_CHAT (DS_LVAL (DS_EC->id));  \n  chat_id.access_hash = DS_LVAL (DS_EC->access_hash);\n  \n  struct tgl_secret_chat *U = (void *)tgl_peer_get (TLS, chat_id);\n  if (!U) {\n    TLS->encr_chats_allocated ++;\n    U = talloc0 (sizeof (tgl_peer_t));\n    U->id = chat_id;\n    TLS->peer_tree = tree_insert_peer (TLS->peer_tree, (tgl_peer_t *)U, rand ());\n    increase_peer_size (TLS);\n    TLS->Peers[TLS->peer_num ++] = (tgl_peer_t *)U;\n  }\n  \n  int new = !(U->flags & TGLPF_CREATED);\n \n  if (DS_EC->magic == CODE_encrypted_chat_discarded) {\n    if (new) {\n      vlogprintf (E_WARNING, \"Unknown chat in deleted state. May be we forgot something...\\n\");\n      return U;\n    }\n    bl_do_peer_delete (TLS, U->id);\n    //write_secret_chat_file ();\n    return U;\n  }\n\n  static unsigned char g_key[256];\n  if (new) {\n    if (DS_EC->magic != CODE_encrypted_chat_requested) {\n      vlogprintf (E_WARNING, \"Unknown chat. May be we forgot something...\\n\");\n      return U;\n    }\n\n    str_to_256 (g_key, DS_STR (DS_EC->g_a));\n \n    int user_id =  DS_LVAL (DS_EC->participant_id) + DS_LVAL (DS_EC->admin_id) - tgl_get_peer_id (TLS->our_id);\n    int r = sc_request;\n    bl_do_encr_chat (TLS, tgl_get_peer_id (U->id), \n      DS_EC->access_hash,\n      DS_EC->date,\n      DS_EC->admin_id,\n      &user_id,\n      NULL, \n      (void *)g_key,\n      NULL,\n      &r, \n      NULL, NULL, NULL, NULL, NULL, \n      NULL, \n      TGLECF_CREATE | TGLECF_CREATED,\n      NULL, 0\n    );\n  } else {\n    if (DS_EC->magic == CODE_encrypted_chat_waiting) {\n      int r = sc_waiting;\n      bl_do_encr_chat (TLS, tgl_get_peer_id (U->id), \n        DS_EC->access_hash,\n        DS_EC->date,\n        NULL,\n        NULL,\n        NULL, \n        NULL,\n        NULL,\n        &r, \n        NULL, NULL, NULL, NULL, NULL, \n        NULL, \n        TGL_FLAGS_UNCHANGED,\n        NULL, 0\n      );\n      return U; // We needed only access hash from here\n    }\n    \n    str_to_256 (g_key, DS_STR (DS_EC->g_a_or_b));\n    \n    //write_secret_chat_file ();\n    int r = sc_ok;\n    bl_do_encr_chat (TLS, tgl_get_peer_id (U->id), \n      DS_EC->access_hash,\n      DS_EC->date,\n      NULL,\n      NULL,\n      NULL, \n      g_key,\n      NULL,\n      &r, \n      NULL, NULL, NULL, NULL, NULL, \n      DS_EC->key_fingerprint,\n      TGL_FLAGS_UNCHANGED,\n      NULL, 0\n    );\n  }\n\n  return U;\n}\n\nstruct tgl_chat *tglf_fetch_alloc_chat (struct tgl_state *TLS, struct tl_ds_chat *DS_C) {\n  if (!DS_C) { return NULL; }\n  if (DS_C->magic == CODE_chat_empty) { \n    return NULL;\n  }\n  if (DS_C->magic == CODE_channel || DS_C->magic == CODE_channel_forbidden) {\n    return (void *)tglf_fetch_alloc_channel (TLS, DS_C);\n  }\n  tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_C->id));  \n  chat_id.access_hash = 0; // chats don't have access hash\n  \n  struct tgl_chat *C = (void *)tgl_peer_get (TLS, chat_id);\n  if (!C) {\n    TLS->chats_allocated ++;\n    C = talloc0 (sizeof (tgl_peer_t));\n    C->id = chat_id;\n    TLS->peer_tree = tree_insert_peer (TLS->peer_tree, (tgl_peer_t *)C, rand ());\n    increase_peer_size (TLS);\n    TLS->Peers[TLS->peer_num ++] = (tgl_peer_t *)C;\n  }\n  \n  C->id = chat_id;\n  \n  int flags = C->flags;\n  if (!(flags & TGLCF_CREATED)) {\n    flags |= TGLCF_CREATE | TGLCF_CREATED;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 1) {\n    flags |= TGLCF_CREATOR;\n  } else {\n    flags &= ~TGLCF_CREATOR;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 2) {\n    flags |= TGLCF_KICKED;\n  } else {\n    flags &= ~TGLCF_KICKED;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 4) {\n    flags |= TGLCF_LEFT;\n  } else {\n    flags &= ~TGLCF_LEFT;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 8) {\n    flags |= TGLCF_ADMINS_ENABLED;\n  } else {\n    flags &= ~TGLCF_ADMINS_ENABLED;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 16) {\n    flags |= TGLCF_ADMIN;\n  } else {\n    flags &= ~TGLCF_ADMIN;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 32) {\n    flags |= TGLCF_DEACTIVATED;\n  } else {\n    flags &= ~TGLCF_DEACTIVATED;\n  }\n\n  bl_do_chat (TLS, tgl_get_peer_id (C->id),\n    DS_STR (DS_C->title),\n    DS_C->participants_count, \n    DS_C->date,\n    NULL,\n    NULL,\n    DS_C->photo,\n    NULL,\n    NULL,\n    NULL, NULL,\n    flags\n  );\n  return C;\n}\n\nstruct tgl_chat *tglf_fetch_alloc_chat_full (struct tgl_state *TLS, struct tl_ds_messages_chat_full *DS_MCF) {\n  if (!DS_MCF) { return NULL; }\n  if (DS_MCF->full_chat->magic == CODE_channel_full) {\n    return (void *)tglf_fetch_alloc_channel_full (TLS, DS_MCF);\n  }\n \n  if (DS_MCF->users) {\n    int i;\n    for (i = 0; i < DS_LVAL (DS_MCF->users->cnt); i++) {\n      tglf_fetch_alloc_user (TLS, DS_MCF->users->data[i]);\n    }\n  }\n\n  if (DS_MCF->chats) {\n    int i;\n    for (i = 0; i < DS_LVAL (DS_MCF->chats->cnt); i++) {\n      tglf_fetch_alloc_chat (TLS, DS_MCF->chats->data[i]);\n    }\n  }\n  \n  struct tl_ds_chat_full *DS_CF = DS_MCF->full_chat;\n\n  if (DS_CF->bot_info) {\n    int n = DS_LVAL (DS_CF->bot_info->cnt);\n    int i;\n    for (i = 0; i < n; i++) {\n      struct tl_ds_bot_info *DS_BI = DS_CF->bot_info->data[i];\n\n      tgl_peer_t *P = tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_BI->user_id)));\n      if (P && (P->flags & TGLCF_CREATED)) {\n        bl_do_user (TLS, tgl_get_peer_id (P->id), \n            NULL,\n            NULL, 0, \n            NULL, 0,\n            NULL, 0,\n            NULL, 0,\n            NULL,\n            NULL,\n            NULL, NULL,\n            DS_BI,\n            TGL_FLAGS_UNCHANGED\n            );\n      }\n    }\n  }\n\n  tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_CF->id));  \n  struct tgl_chat *C = (void *)tgl_peer_get (TLS, chat_id);\n  assert (C);\n\n  bl_do_chat (TLS, tgl_get_peer_id (C->id),\n    NULL, 0,\n    NULL, \n    NULL,\n    DS_CF->participants->version,\n    (struct tl_ds_vector *)DS_CF->participants->participants,\n    NULL,\n    DS_CF->chat_photo,\n    NULL,\n    //DS_CF->participants->admin_id,\n    NULL, NULL,\n    C->flags & 0xffff\n  );\n\n  return C;\n}\n\nstruct tgl_channel *tglf_fetch_alloc_channel (struct tgl_state *TLS, struct tl_ds_chat *DS_C) {\n  if (!DS_C) { return NULL; }\n  \n  tgl_peer_id_t chat_id = TGL_MK_CHANNEL (DS_LVAL (DS_C->id));  \n  chat_id.access_hash = DS_LVAL (DS_C->access_hash); \n\n  struct tgl_channel *C = (void *)tgl_peer_get (TLS, chat_id);\n  if (!C) {\n    TLS->channels_allocated ++;\n    C = talloc0 (sizeof (tgl_peer_t));\n    C->id = chat_id;\n    TLS->peer_tree = tree_insert_peer (TLS->peer_tree, (tgl_peer_t *)C, rand ());\n    increase_peer_size (TLS);\n    TLS->Peers[TLS->peer_num ++] = (tgl_peer_t *)C;\n  }\n  \n  C->id = chat_id;\n  \n  int flags = C->flags;\n  if (!(flags & TGLCHF_CREATED)) {\n    flags |= TGLCHF_CREATE | TGLCHF_CREATED;\n  }\n  \n  if (DS_LVAL (DS_C->flags) & 1) {\n    flags |= TGLCHF_CREATOR;\n  } else {\n    flags &= ~TGLCHF_CREATOR;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 2) {\n    flags |= TGLCHF_KICKED;\n  } else {\n    flags &= ~TGLCHF_KICKED;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 4) {\n    flags |= TGLCHF_LEFT;\n  } else {\n    flags &= ~TGLCHF_LEFT;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 8) {\n    flags |= TGLCHF_EDITOR;\n  } else {\n    flags &= ~TGLCHF_EDITOR;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 16) {\n    flags |= TGLCHF_MODERATOR;\n  } else {\n    flags &= ~TGLCHF_MODERATOR;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 32) {\n    flags |= TGLCHF_BROADCAST;\n  } else {\n    flags &= ~TGLCHF_BROADCAST;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 128) {\n    flags |= TGLCHF_OFFICIAL;\n  } else {\n    flags &= ~TGLCHF_OFFICIAL;\n  }\n\n  if (DS_LVAL (DS_C->flags) & 256) {\n    flags |= TGLCHF_MEGAGROUP;\n  } else {\n    flags &= ~TGLCHF_MEGAGROUP;\n  }\n\n  bl_do_channel (TLS, tgl_get_peer_id (C->id),\n    DS_C->access_hash,\n    DS_C->date,\n    DS_STR (DS_C->title),\n    DS_STR (DS_C->username),\n    DS_C->photo,\n    NULL,\n    NULL,\n    NULL, 0,\n    NULL, NULL, NULL, NULL,\n    flags\n  );\n\n  return C;\n}\n\nstruct tgl_channel *tglf_fetch_alloc_channel_full (struct tgl_state *TLS, struct tl_ds_messages_chat_full *DS_MCF) {\n  if (!DS_MCF) { return NULL; }\n  \n  if (DS_MCF->users) {\n    int i;\n    for (i = 0; i < DS_LVAL (DS_MCF->users->cnt); i++) {\n      tglf_fetch_alloc_user (TLS, DS_MCF->users->data[i]);\n    }\n  }\n\n  if (DS_MCF->chats) {\n    int i;\n    for (i = 0; i < DS_LVAL (DS_MCF->chats->cnt); i++) {\n      tglf_fetch_alloc_chat (TLS, DS_MCF->chats->data[i]);\n    }\n  }\n  struct tl_ds_chat_full *DS_CF = DS_MCF->full_chat;\n\n  tgl_peer_id_t chat_id = TGL_MK_CHANNEL (DS_LVAL (DS_CF->id));\n\n  struct tgl_channel *C = (void *)tgl_peer_get (TLS, chat_id);\n  assert (C);\n\n  bl_do_channel (TLS, tgl_get_peer_id (C->id),\n    NULL,\n    NULL,\n    NULL, 0,\n    NULL, 0,\n    NULL,\n    DS_CF->chat_photo,\n    NULL,\n    DS_STR (DS_CF->about),\n    DS_CF->participants_count,\n    DS_CF->admins_count,\n    DS_CF->kicked_count,\n    DS_CF->read_inbox_max_id,\n    TGL_FLAGS_UNCHANGED\n  );\n\n  return C;\n}\n\nvoid tglf_fetch_photo_size (struct tgl_state *TLS, struct tgl_photo_size *S, struct tl_ds_photo_size *DS_PS) {\n  memset (S, 0, sizeof (*S));\n\n  S->type = DS_STR_DUP (DS_PS->type);\n  S->w = DS_LVAL (DS_PS->w);\n  S->h = DS_LVAL (DS_PS->h);\n  S->size = DS_LVAL (DS_PS->size);\n  if (DS_PS->bytes) {\n    S->size = DS_PS->bytes->len;\n  }\n\n  tglf_fetch_file_location (TLS, &S->loc, DS_PS->location); \n}\n\nvoid tglf_fetch_geo (struct tgl_state *TLS, struct tgl_geo *G, struct tl_ds_geo_point *DS_GP) {\n  G->longitude = DS_LVAL (DS_GP->longitude);\n  G->latitude = DS_LVAL (DS_GP->latitude);\n}\n\nstruct tgl_photo *tglf_fetch_alloc_photo (struct tgl_state *TLS, struct tl_ds_photo *DS_P) {\n  if (!DS_P) { return NULL; }\n  if (DS_P->magic == CODE_photo_empty) { return NULL; }\n  \n  struct tgl_photo *P = tgl_photo_get (TLS, DS_LVAL (DS_P->id));\n  if (P) {\n    P->refcnt ++;\n    return P;\n  }\n\n\n  P = talloc0 (sizeof (*P));\n  P->id = DS_LVAL (DS_P->id);\n  P->refcnt = 1;\n  \n  tgl_photo_insert (TLS, P);\n\n  P->access_hash = DS_LVAL (DS_P->access_hash);\n  //P->user_id = DS_LVAL (DS_P->user_id);\n  P->date = DS_LVAL (DS_P->date);\n  P->caption = NULL;//DS_STR_DUP (DS_P->caption);\n  /*if (DS_P->geo) {\n    tglf_fetch_geo (TLS, &P->geo, DS_P->geo);\n  }*/\n  \n  P->sizes_num = DS_LVAL (DS_P->sizes->cnt);\n  P->sizes = talloc (sizeof (struct tgl_photo_size) * P->sizes_num);\n  int i;\n  for (i = 0; i < P->sizes_num; i++) {\n    tglf_fetch_photo_size (TLS, &P->sizes[i], DS_P->sizes->data[i]);\n  }\n\n  return P;\n}\n\nstruct tgl_document *tglf_fetch_alloc_video (struct tgl_state *TLS, struct tl_ds_video *DS_V) {\n  if (!DS_V) { return NULL; }\n  \n  if (DS_V->magic == CODE_video_empty) { return NULL; }\n  \n  struct tgl_document *D = tgl_document_get (TLS, DS_LVAL (DS_V->id));\n  if (D) {\n    D->refcnt ++;\n    return D;\n  }\n\n\n  D = talloc0 (sizeof (*D));\n  D->id = DS_LVAL (DS_V->id);\n  D->refcnt = 1;\n  \n  tgl_document_insert (TLS, D);\n\n  D->flags = TGLDF_VIDEO;\n\n  D->access_hash = DS_LVAL (DS_V->access_hash);\n  //D->user_id = DS_LVAL (DS_V->user_id);\n  D->date = DS_LVAL (DS_V->date);\n  D->caption = NULL;//DS_STR_DUP (DS_V->caption);\n  D->duration = DS_LVAL (DS_V->duration);\n  D->mime_type = tstrdup (\"video/\");//DS_STR_DUP (DS_V->mime_type);\n  D->size = DS_LVAL (DS_V->size);\n  tglf_fetch_photo_size (TLS, &D->thumb, DS_V->thumb);\n\n  D->dc_id = DS_LVAL (DS_V->dc_id);\n  D->w = DS_LVAL (DS_V->w);\n  D->h = DS_LVAL (DS_V->h);\n  return D;\n}\n\nstruct tgl_document *tglf_fetch_alloc_audio (struct tgl_state *TLS, struct tl_ds_audio *DS_A) {\n  if (!DS_A) { return NULL; }\n  \n  if (DS_A->magic == CODE_audio_empty) { return NULL; }\n  \n  struct tgl_document *D = tgl_document_get (TLS, DS_LVAL (DS_A->id));\n  if (D) {\n    D->refcnt ++;\n    return D;\n  }\n\n\n  D = talloc0 (sizeof (*D));\n  D->id = DS_LVAL (DS_A->id);\n  D->refcnt = 1;\n  \n  tgl_document_insert (TLS, D);\n  \n  D->flags = TGLDF_AUDIO;\n  \n  D->access_hash = DS_LVAL (DS_A->access_hash);\n  //D->user_id = DS_LVAL (DS_A->user_id);\n  D->date = DS_LVAL (DS_A->date);\n  D->duration = DS_LVAL (DS_A->duration);\n  D->mime_type = DS_STR_DUP (DS_A->mime_type);\n  D->size = DS_LVAL (DS_A->size);\n  D->dc_id = DS_LVAL (DS_A->dc_id);\n\n  return D;\n}\n\nvoid tglf_fetch_document_attribute (struct tgl_state *TLS, struct tgl_document *D, struct tl_ds_document_attribute *DS_DA) {\n  switch (DS_DA->magic) {\n  case CODE_document_attribute_image_size:\n    D->flags |= TGLDF_IMAGE;\n    D->w = DS_LVAL (DS_DA->w);\n    D->h = DS_LVAL (DS_DA->h);\n    return;\n  case CODE_document_attribute_animated:\n    D->flags |= TGLDF_ANIMATED;\n    return;\n  case CODE_document_attribute_sticker:\n    D->flags |= TGLDF_STICKER;\n    return;\n  case CODE_document_attribute_video:\n    D->flags |= TGLDF_VIDEO;\n    D->duration = DS_LVAL (DS_DA->duration);\n    D->w = DS_LVAL (DS_DA->w);\n    D->h = DS_LVAL (DS_DA->h);\n    return;\n  case CODE_document_attribute_audio:\n    D->flags |= TGLDF_AUDIO;\n    D->duration = DS_LVAL (DS_DA->duration);\n    return;\n  case CODE_document_attribute_filename:\n    D->caption = DS_STR_DUP (DS_DA->file_name);\n    return;\n  default:\n    assert (0);\n  }\n}\n\nstruct tgl_document *tglf_fetch_alloc_document (struct tgl_state *TLS, struct tl_ds_document *DS_D) {\n  if (!DS_D) { return NULL; }\n  \n  if (DS_D->magic == CODE_document_empty) { return NULL; }\n  \n  struct tgl_document *D = tgl_document_get (TLS, DS_LVAL (DS_D->id));\n  if (D) {\n    D->refcnt ++;\n    return D;\n  }\n\n\n  D = talloc0 (sizeof (*D));\n  D->id = DS_LVAL (DS_D->id);\n  D->refcnt = 1;\n  \n  tgl_document_insert (TLS, D);\n\n  D->access_hash = DS_LVAL (DS_D->access_hash);\n  //D->user_id = DS_LVAL (DS_D->user_id);\n  D->date = DS_LVAL (DS_D->date);\n  //D->caption = DS_STR_DUP (DS_D->file_name);\n  D->mime_type = DS_STR_DUP (DS_D->mime_type);\n  D->size = DS_LVAL (DS_D->size);\n  D->dc_id = DS_LVAL (DS_D->dc_id);\n\n  tglf_fetch_photo_size (TLS, &D->thumb, DS_D->thumb);\n\n  if (DS_D->attributes) {\n    int i;\n    for (i = 0; i < DS_LVAL (DS_D->attributes->cnt); i++) {\n      tglf_fetch_document_attribute (TLS, D, DS_D->attributes->data[i]);\n    }\n  }\n  return D;\n}\n\nstruct tgl_webpage *tglf_fetch_alloc_webpage (struct tgl_state *TLS, struct tl_ds_web_page *DS_W) {\n  if (!DS_W) { return NULL; }\n  \n  struct tgl_webpage *W = tgl_webpage_get (TLS, DS_LVAL (DS_W->id));\n  if (W) {\n    W->refcnt ++;\n  } else {\n    W = talloc0 (sizeof (*W));\n    W->id = DS_LVAL (DS_W->id);\n    W->refcnt = 1;\n  \n    tgl_webpage_insert (TLS, W);\n  }\n\n  if (!W->url) {\n    W->url = DS_STR_DUP (DS_W->url);\n  }\n\n  if (!W->display_url) {\n    W->display_url = DS_STR_DUP (DS_W->display_url);\n  }\n\n  if (!W->type) { \n    W->type = DS_STR_DUP (DS_W->type);\n  }\n\n  if (!W->site_name) {\n    W->site_name = DS_STR_DUP (DS_W->site_name);\n  }\n\n  if (!W->title) {\n    W->title = DS_STR_DUP (DS_W->title);\n  }\n\n  if (!W->photo) {\n    W->photo = tglf_fetch_alloc_photo (TLS, DS_W->photo);\n  }\n\n  if (!W->description) {\n    W->description = DS_STR_DUP (DS_W->description);\n  }\n\n  if (!W->embed_url) {\n    W->embed_url = DS_STR_DUP (DS_W->embed_url);\n  }\n\n  if (!W->embed_type) {\n    W->embed_type = DS_STR_DUP (DS_W->embed_type);\n  }\n\n  W->embed_width = DS_LVAL (DS_W->embed_width);\n\n  W->embed_height = DS_LVAL (DS_W->embed_height);\n\n  W->duration = DS_LVAL (DS_W->duration);\n\n  if (!W->author) {\n    W->author = DS_STR_DUP (DS_W->author);\n  }\n  return W;\n}\n\nvoid tglf_fetch_message_action (struct tgl_state *TLS, struct tgl_message_action *M, struct tl_ds_message_action *DS_MA) {\n  if (!DS_MA) { return; }\n  memset (M, 0, sizeof (*M));\n  \n  switch (DS_MA->magic) {\n  case CODE_message_action_empty:\n    M->type = tgl_message_action_none;\n    break;\n  /*case CODE_message_action_geo_chat_create:\n    {\n      M->type = tgl_message_action_geo_chat_create;\n      assert (0);\n    }\n    break;*/\n  /*case CODE_message_action_geo_chat_checkin:\n    M->type = tgl_message_action_geo_chat_checkin;\n    break;*/\n  case CODE_message_action_chat_create:\n    {\n      M->type = tgl_message_action_chat_create;\n      M->title = DS_STR_DUP (DS_MA->title);\n    \n      M->user_num = DS_LVAL (DS_MA->users->cnt);\n      M->users = talloc (M->user_num * 4);\n      int i;\n      for (i = 0; i < M->user_num; i++) {\n        M->users[i] = DS_LVAL (DS_MA->users->data[i]);\n      }\n    }\n    break;\n  case CODE_message_action_chat_edit_title:\n    M->type = tgl_message_action_chat_edit_title;\n    M->new_title = DS_STR_DUP (DS_MA->title);\n    break;\n  case CODE_message_action_chat_edit_photo:\n    M->type = tgl_message_action_chat_edit_photo;\n    M->photo = tglf_fetch_alloc_photo (TLS, DS_MA->photo);\n    break;\n  case CODE_message_action_chat_delete_photo:\n    M->type = tgl_message_action_chat_delete_photo;\n    break;\n  case CODE_message_action_chat_add_user:\n    M->type = tgl_message_action_chat_add_users;\n    M->user_num = DS_LVAL (DS_MA->users->cnt);\n    M->users = talloc (4 * M->user_num);\n    {\n      int i;\n      for (i = 0; i < M->user_num; i++) {\n        M->users[i] = DS_LVAL (DS_MA->users->data[i]);\n      }\n    }\n    break;\n  case CODE_message_action_chat_delete_user:\n    M->type = tgl_message_action_chat_delete_user;\n    M->user = DS_LVAL (DS_MA->user_id);\n    break;\n  case CODE_message_action_chat_joined_by_link:\n    M->type = tgl_message_action_chat_add_user_by_link;\n    M->user = DS_LVAL (DS_MA->inviter_id);\n    break;\n  case CODE_message_action_channel_create:\n    M->type = tgl_message_action_channel_create;\n    M->title = DS_STR_DUP (DS_MA->title);\n    break;\n  case CODE_message_action_chat_migrate_to:\n    M->type = tgl_message_action_migrated_to;\n    break;\n  case CODE_message_action_channel_migrate_from:\n    M->type = tgl_message_action_migrated_from;\n    M->title = DS_STR_DUP (DS_MA->title);\n    break;\n  default:\n    assert (0);\n  }\n}\n\nstruct tgl_message *tglf_fetch_alloc_message_short (struct tgl_state *TLS, struct tl_ds_updates *DS_U) {\n  tgl_peer_t *P = tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_U->user_id)));\n  if (!P || !(P->flags & TGLPF_CREATED)) {\n    tgl_do_get_difference (TLS, 0, 0, 0);\n    return NULL;\n  }\n  \n  tgl_message_id_t msg_id = tgl_peer_id_to_msg_id (P->id, DS_LVAL (DS_U->id));\n  struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n  if (!M) {\n    M = talloc0 (sizeof (*M));\n    M->permanent_id = msg_id;\n    tglm_message_insert_tree (TLS, M);\n    TLS->messages_allocated ++;\n\n    assert (tgl_message_get (TLS, &msg_id) == M);\n  }\n\n  int flags = M->flags & 0xffff;\n  \n  if (M->flags & TGLMF_PENDING) {\n    M->flags ^= TGLMF_PENDING;\n  }\n\n  if (!(flags & TGLMF_CREATED)) {\n    flags |= TGLMF_CREATE | TGLMF_CREATED;\n  }\n\n  int f = DS_LVAL (DS_U->flags);\n\n  if (f & 1) {\n    flags |= TGLMF_UNREAD;\n  }\n  if (f & 2) {\n    flags |= TGLMF_OUT;\n  }\n  if (f & 16) {\n    flags |= TGLMF_MENTION;\n  }\n\n  struct tl_ds_message_media A;\n  A.magic = CODE_message_media_empty;\n\n  tgl_peer_id_t our_id = TLS->our_id;\n  tgl_peer_id_t peer_id = P->id;\n\n  tgl_peer_id_t fwd_from_id;\n  if (DS_U->fwd_from_id) {\n    fwd_from_id = tglf_fetch_peer_id (TLS, DS_U->fwd_from_id);\n  } else {\n    fwd_from_id = TGL_MK_USER (0);\n  }\n\n  bl_do_edit_message (TLS, &msg_id, \n    (f & 2) ? &our_id : &peer_id,\n    (f & 2) ? &peer_id : &our_id,\n    DS_U->fwd_from_id ? &fwd_from_id : NULL,\n    DS_U->fwd_date,\n    DS_U->date,\n    DS_STR (DS_U->message),\n    &A,\n    NULL,\n    DS_U->reply_to_msg_id,\n    NULL, \n    (void *)DS_U->entities,\n    flags\n  );\n  return M;\n}\n\nstruct tgl_message *tglf_fetch_alloc_message_short_chat (struct tgl_state *TLS, struct tl_ds_updates *DS_U) {\n  tgl_peer_t *F = tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_U->from_id)));\n  if (!F || !(F->flags & TGLPF_CREATED)) {\n    tgl_do_get_difference (TLS, 0, 0, 0);\n    return NULL;\n  }\n  tgl_peer_t *T = tgl_peer_get (TLS, TGL_MK_CHAT (DS_LVAL (DS_U->chat_id)));\n  if (!T || !(T->flags & TGLPF_CREATED)) {\n    tgl_do_get_difference (TLS, 0, 0, 0);\n    return NULL;\n  }\n  \n  tgl_message_id_t msg_id = tgl_peer_id_to_msg_id (T->id, DS_LVAL (DS_U->id));\n  struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n  if (!M) {\n    M = talloc0 (sizeof (*M));\n    M->permanent_id = msg_id;\n    tglm_message_insert_tree (TLS, M);\n    TLS->messages_allocated ++;\n  }\n\n  int flags = M->flags & 0xffff;\n  \n  if (M->flags & TGLMF_PENDING) {\n    M->flags ^= TGLMF_PENDING;\n  }\n\n  if (!(flags & TGLMF_CREATED)) {\n    flags |= TGLMF_CREATE | TGLMF_CREATED;\n  }\n\n  int f = DS_LVAL (DS_U->flags);\n\n  if (f & 1) {\n    flags |= TGLMF_UNREAD;\n  }\n  if (f & 2) {\n    flags |= TGLMF_OUT;\n  }\n  if (f & 16) {\n    flags |= TGLMF_MENTION;\n  }\n\n  struct tl_ds_message_media A;\n  A.magic = CODE_message_media_empty;\n\n  tgl_peer_id_t from_id = F->id;\n  tgl_peer_id_t to_id = T->id;\n  tgl_peer_id_t fwd_from_id;\n  if (DS_U->fwd_from_id) {\n    fwd_from_id = tglf_fetch_peer_id (TLS, DS_U->fwd_from_id);\n  } else {\n    fwd_from_id = TGL_MK_USER (0);\n  }\n\n  bl_do_edit_message (TLS, &msg_id,\n    &from_id,\n    &to_id,\n    DS_U->fwd_from_id ? &fwd_from_id : NULL,\n    DS_U->fwd_date,\n    DS_U->date,\n    DS_STR (DS_U->message),\n    &A,\n    NULL,\n    DS_U->reply_to_msg_id,\n    NULL,\n    NULL,\n    flags\n  );\n  return M;\n}\n\n\nvoid tglf_fetch_message_media (struct tgl_state *TLS, struct tgl_message_media *M, struct tl_ds_message_media *DS_MM) {\n  if (!DS_MM) { return; }\n  memset (M, 0, sizeof (*M));\n  switch (DS_MM->magic) {\n  case CODE_message_media_empty:\n    M->type = tgl_message_media_none;\n    break;\n  case CODE_message_media_photo:\n  case CODE_message_media_photo_l27:\n    M->type = tgl_message_media_photo;\n    M->photo = tglf_fetch_alloc_photo (TLS, DS_MM->photo);\n    M->caption = DS_STR_DUP (DS_MM->caption);\n    break;\n  case CODE_message_media_video:\n  case CODE_message_media_video_l27:\n    M->type = tgl_message_media_video;\n    M->document = tglf_fetch_alloc_video (TLS, DS_MM->video);\n    M->caption = DS_STR_DUP (DS_MM->caption);\n    break;\n  case CODE_message_media_audio:\n    M->type = tgl_message_media_audio;\n    M->document = tglf_fetch_alloc_audio (TLS, DS_MM->audio);\n    M->caption = DS_STR_DUP (DS_MM->caption);\n    break;\n  case CODE_message_media_document:\n    M->type = tgl_message_media_document;\n    M->document = tglf_fetch_alloc_document (TLS, DS_MM->document);\n    M->caption = DS_STR_DUP (DS_MM->caption);\n    break;\n  case CODE_message_media_geo:\n    M->type = tgl_message_media_geo;\n    tglf_fetch_geo (TLS, &M->geo, DS_MM->geo);\n    break;\n  case CODE_message_media_contact:\n    M->type = tgl_message_media_contact;\n    M->phone = DS_STR_DUP (DS_MM->phone_number);\n    M->first_name = DS_STR_DUP (DS_MM->first_name);\n    M->last_name = DS_STR_DUP (DS_MM->last_name);\n    M->user_id = DS_LVAL (DS_MM->user_id);\n    break;\n  case CODE_message_media_web_page:\n    M->type = tgl_message_media_webpage;\n    M->webpage = tglf_fetch_alloc_webpage (TLS, DS_MM->webpage);\n    break;\n  case CODE_message_media_venue:\n    M->type = tgl_message_media_venue;\n    tglf_fetch_geo (TLS, &M->venue.geo, DS_MM->geo);\n    M->venue.title = DS_STR_DUP (DS_MM->title);\n    M->venue.address = DS_STR_DUP (DS_MM->address);\n    M->venue.provider = DS_STR_DUP (DS_MM->provider);\n    M->venue.venue_id = DS_STR_DUP (DS_MM->venue_id);   \n    break;\n  case CODE_message_media_unsupported:\n    M->type = tgl_message_media_unsupported;\n    break;\n  default:\n    assert (0);\n  }\n}\n\nvoid tglf_fetch_message_media_encrypted (struct tgl_state *TLS, struct tgl_message_media *M, struct tl_ds_decrypted_message_media *DS_DMM) {\n  if (!DS_DMM) { return; }\n\n  memset (M, 0, sizeof (*M));\n  switch (DS_DMM->magic) {\n  case CODE_decrypted_message_media_empty:\n    M->type = tgl_message_media_none;\n    //M->type = CODE_message_media_empty;\n    break;\n  case CODE_decrypted_message_media_photo:\n  case CODE_decrypted_message_media_video:\n  case CODE_decrypted_message_media_video_l12:\n  case CODE_decrypted_message_media_document:\n  case CODE_decrypted_message_media_audio:\n    //M->type = CODE_decrypted_message_media_video;\n    M->type = tgl_message_media_document_encr;\n    \n    M->encr_document = talloc0 (sizeof (*M->encr_document));\n  \n    switch (DS_DMM->magic) {\n    case CODE_decrypted_message_media_photo:\n      M->encr_document->flags = TGLDF_IMAGE;\n      break;\n    case CODE_decrypted_message_media_video:\n    case CODE_decrypted_message_media_video_l12:\n      M->encr_document->flags = TGLDF_VIDEO;\n      break;\n    case CODE_decrypted_message_media_document:\n      //M->encr_document->flags = TGLDF_DOCUMENT;\n      break;\n    case CODE_decrypted_message_media_audio:\n      M->encr_document->flags = TGLDF_AUDIO;\n      break;\n    }\n    \n    M->encr_document->w = DS_LVAL (DS_DMM->w);\n    M->encr_document->h = DS_LVAL (DS_DMM->h);\n    M->encr_document->size = DS_LVAL (DS_DMM->size);\n    M->encr_document->duration = DS_LVAL (DS_DMM->duration);\n    M->encr_document->mime_type = DS_STR_DUP (DS_DMM->mime_type);\n   \n    M->encr_document->key = talloc (32);\n    str_to_32 (M->encr_document->key, DS_STR (DS_DMM->key));\n    M->encr_document->iv = talloc (32);\n    str_to_32 (M->encr_document->iv, DS_STR (DS_DMM->iv));\n    break;\n  case CODE_decrypted_message_media_geo_point:\n    M->type = tgl_message_media_geo;\n    M->geo.latitude = DS_LVAL (DS_DMM->latitude);\n    M->geo.longitude = DS_LVAL (DS_DMM->longitude);\n    break;\n  case CODE_decrypted_message_media_contact:\n    M->type = tgl_message_media_contact;\n    M->phone = DS_STR_DUP (DS_DMM->phone_number);\n    M->first_name = DS_STR_DUP (DS_DMM->first_name);\n    M->last_name = DS_STR_DUP (DS_DMM->last_name);\n    M->user_id = DS_LVAL (DS_DMM->user_id);\n    break;\n  default:\n    assert (0);\n  }\n}\n\nvoid tglf_fetch_message_action_encrypted (struct tgl_state *TLS, struct tgl_message_action *M, struct tl_ds_decrypted_message_action *DS_DMA) {\n  if (!DS_DMA) { return; }\n  \n  switch (DS_DMA->magic) {\n  case CODE_decrypted_message_action_set_message_t_t_l:\n    M->type = tgl_message_action_set_message_ttl;\n    M->ttl = DS_LVAL (DS_DMA->ttl_seconds);\n    break;\n  case CODE_decrypted_message_action_read_messages: \n    M->type = tgl_message_action_read_messages;\n    { \n      M->read_cnt = DS_LVAL (DS_DMA->random_ids->cnt);\n      \n      int i;\n      for (i = 0; i < M->read_cnt; i++) {\n        tgl_message_id_t id;\n        id.peer_type = TGL_PEER_RANDOM_ID;\n        id.id = DS_LVAL (DS_DMA->random_ids->data[i]);\n        struct tgl_message *N = tgl_message_get (TLS, &id);\n        if (N) {\n          N->flags &= ~TGLMF_UNREAD;\n        }\n      }\n    }\n    break;\n  case CODE_decrypted_message_action_delete_messages: \n    M->type = tgl_message_action_delete_messages;\n    break;\n  case CODE_decrypted_message_action_screenshot_messages: \n    M->type = tgl_message_action_screenshot_messages;\n    { \n      M->screenshot_cnt = DS_LVAL (DS_DMA->random_ids->cnt);\n    }\n    break;\n  case CODE_decrypted_message_action_notify_layer: \n    M->type = tgl_message_action_notify_layer;\n    M->layer = DS_LVAL (DS_DMA->layer);\n    break;\n  case CODE_decrypted_message_action_flush_history:\n    M->type = tgl_message_action_flush_history;\n    break;\n  case CODE_decrypted_message_action_typing:\n    M->type = tgl_message_action_typing;\n    M->typing = tglf_fetch_typing (DS_DMA->action);\n    break;\n  case CODE_decrypted_message_action_resend:\n    M->type = tgl_message_action_resend;\n    M->start_seq_no = DS_LVAL (DS_DMA->start_seq_no);\n    M->end_seq_no = DS_LVAL (DS_DMA->end_seq_no);\n    break;\n  case CODE_decrypted_message_action_noop:\n    M->type = tgl_message_action_noop;\n    break;\n  case CODE_decrypted_message_action_request_key:\n    M->type = tgl_message_action_request_key;\n    \n    M->exchange_id = DS_LVAL (DS_DMA->exchange_id);\n    M->g_a = talloc (256);\n    str_to_256 (M->g_a, DS_STR (DS_DMA->g_a));\n    break;\n  case CODE_decrypted_message_action_accept_key:\n    M->type = tgl_message_action_accept_key;\n    \n    M->exchange_id = DS_LVAL (DS_DMA->exchange_id);\n    M->g_a = talloc (256);\n    str_to_256 (M->g_a, DS_STR (DS_DMA->g_b));\n    M->key_fingerprint = DS_LVAL (DS_DMA->key_fingerprint);\n    break;\n  case CODE_decrypted_message_action_commit_key:\n    M->type = tgl_message_action_commit_key;\n    \n    M->exchange_id = DS_LVAL (DS_DMA->exchange_id);\n    M->key_fingerprint = DS_LVAL (DS_DMA->key_fingerprint);\n    break;\n  case CODE_decrypted_message_action_abort_key:\n    M->type = tgl_message_action_abort_key;\n    \n    M->exchange_id = DS_LVAL (DS_DMA->exchange_id);\n    break;\n  default:\n    assert (0);\n  }\n}\n\nvoid tglf_fetch_message_entity (struct tgl_state *TLS, struct tgl_message_entity *E, struct tl_ds_message_entity *DS_ME) {\n  E->start = DS_LVAL (DS_ME->offset);\n  E->length = DS_LVAL (DS_ME->length);\n  switch (DS_ME->magic) {\n  case CODE_message_entity_unknown:\n    E->type = tgl_message_entity_unknown;\n    break;\n  case CODE_message_entity_mention:\n    E->type = tgl_message_entity_mention;\n    break;\n  case CODE_message_entity_hashtag:\n    E->type = tgl_message_entity_hashtag;\n    break;\n  case CODE_message_entity_bot_command:\n    E->type = tgl_message_entity_bot_command;\n    break;\n  case CODE_message_entity_url:\n    E->type = tgl_message_entity_url;\n    break;\n  case CODE_message_entity_email:\n    E->type = tgl_message_entity_email;\n    break;\n  case CODE_message_entity_bold:\n    E->type = tgl_message_entity_bold;\n    break;\n  case CODE_message_entity_italic:\n    E->type = tgl_message_entity_italic;\n    break;\n  case CODE_message_entity_code:\n    E->type = tgl_message_entity_code;\n    break;\n  case CODE_message_entity_pre:\n    E->type = tgl_message_entity_pre;\n    break;\n  case CODE_message_entity_text_url:\n    E->type = tgl_message_entity_text_url;\n    E->extra = DS_STR_DUP (DS_ME->url);\n    break;\n  default:\n    assert (0);\n  }\n}\n\nvoid tglf_fetch_message_entities (struct tgl_state *TLS, struct tgl_message *M, struct tl_ds_vector *DS) {\n  M->entities_num = DS_LVAL (DS->f1);\n  M->entities = talloc0 (M->entities_num * sizeof (struct tgl_message_entity));\n  int i;\n  for (i = 0; i < M->entities_num; i++) {\n    struct tl_ds_message_entity *D = DS->f2[i];\n    tglf_fetch_message_entity (TLS, &M->entities[i], D);\n  }\n}\n\nstruct tgl_message *tglf_fetch_alloc_message (struct tgl_state *TLS, struct tl_ds_message *DS_M, int *new_msg) {\n  if (new_msg) {\n    *new_msg = 0;\n  }\n  //assert (0);\n  if (!DS_M || DS_M->magic == CODE_message_empty) { \n    vlogprintf (E_NOTICE, \"empty message\\n\");\n    return NULL; \n  }\n  \n  tgl_peer_id_t to_id = tglf_fetch_peer_id (TLS, DS_M->to_id);\n  tgl_peer_t *T = tgl_peer_get (TLS, to_id);\n  if (!T || !(T->flags & TGLPF_CREATED)) {\n    tgl_do_get_difference (TLS, 0, 0, 0);\n    vlogprintf (E_NOTICE, \"unknown to_id\\n\");\n    return NULL;\n  }\n  tgl_peer_t *P = T;\n\n  tgl_peer_t *F = NULL;\n  if (DS_M->from_id) {\n    F = tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_M->from_id)));\n    if (!F || !(F->flags & TGLPF_CREATED)) {\n      tgl_do_get_difference (TLS, 0, 0, 0);\n      vlogprintf (E_NOTICE, \"unknown from_id %d\\n\", DS_LVAL (DS_M->from_id));\n      return NULL;\n    }\n    if (!tgl_cmp_peer_id (to_id, TLS->our_id)) {\n      P = F;\n    }\n  }\n  \n  tgl_peer_t *FF = NULL;\n\n  if (DS_M->fwd_from_id) {\n    tgl_peer_id_t FF_id = tglf_fetch_peer_id (TLS, DS_M->fwd_from_id); \n    FF = tgl_peer_get (TLS, FF_id);    \n    if (!FF) {\n      tgl_do_get_difference (TLS, 0, 0, 0);\n      vlogprintf (E_NOTICE, \"unknown fwd_id\\n\");\n      return NULL;\n    }\n  }\n\n  tgl_message_id_t msg_id = tgl_peer_id_to_msg_id (P->id, DS_LVAL (DS_M->id));\n  struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n\n  if (!M) {\n    M = talloc0 (sizeof (*M));\n    M->permanent_id = msg_id;\n    tglm_message_insert_tree (TLS, M);\n    TLS->messages_allocated ++;\n\n    assert (tgl_message_get (TLS, &msg_id) == M);\n  }\n  int new = !(M->flags & TGLMF_CREATED);\n\n  if (new_msg) {\n    *new_msg = new;\n  }\n  if (new) {\n    int flags = 0;\n    if (DS_LVAL (DS_M->flags) & 1) {\n      flags |= TGLMF_UNREAD;\n    }\n    if (DS_LVAL (DS_M->flags) & 2) {\n      flags |= TGLMF_OUT;\n    }\n    if (DS_LVAL (DS_M->flags) & 16) {\n      flags |= TGLMF_MENTION;\n    }\n  \n    tgl_peer_id_t from_id;\n    if (DS_M->from_id) {\n      from_id = F->id;\n    } else {\n      from_id = TGL_MK_USER (0);\n    }\n  \n    tgl_peer_id_t to_id = T->id;\n\n    tgl_peer_id_t fwd_from_id;\n    if (DS_M->fwd_from_id) {\n      fwd_from_id = FF->id;\n    } else {\n      fwd_from_id = TGL_MK_USER (0);\n    }\n\n    bl_do_edit_message (TLS, &msg_id,\n      DS_M->from_id ? &from_id : NULL,\n      &to_id,\n      DS_M->fwd_from_id ? &fwd_from_id : NULL,\n      DS_M->fwd_date,\n      DS_M->date,\n      DS_STR (DS_M->message),\n      DS_M->media,\n      DS_M->action,\n      DS_M->reply_to_msg_id,\n      DS_M->reply_markup,\n      (void *)DS_M->entities,\n      flags | TGLMF_CREATE | TGLMF_CREATED\n    );\n  }\n  return M;\n}\n\nstatic int *decr_ptr;\nstatic int *decr_end;\n\nstatic int decrypt_encrypted_message (struct tgl_secret_chat *E) {\n  int *msg_key = decr_ptr;\n  decr_ptr += 4;\n  assert (decr_ptr < decr_end);\n  static unsigned char sha1a_buffer[20];\n  static unsigned char sha1b_buffer[20];\n  static unsigned char sha1c_buffer[20];\n  static unsigned char sha1d_buffer[20];\n \n  static unsigned char buf[64];\n\n  int *e_key = E->exchange_state != tgl_sce_committed ? E->key : E->exchange_key;\n\n  memcpy (buf, msg_key, 16);\n  memcpy (buf + 16, e_key, 32);\n  TGLC_sha1 (buf, 48, sha1a_buffer);\n  \n  memcpy (buf, e_key + 8, 16);\n  memcpy (buf + 16, msg_key, 16);\n  memcpy (buf + 32, e_key + 12, 16);\n  TGLC_sha1 (buf, 48, sha1b_buffer);\n  \n  memcpy (buf, e_key + 16, 32);\n  memcpy (buf + 32, msg_key, 16);\n  TGLC_sha1 (buf, 48, sha1c_buffer);\n  \n  memcpy (buf, msg_key, 16);\n  memcpy (buf + 16, e_key + 24, 32);\n  TGLC_sha1 (buf, 48, sha1d_buffer);\n\n  static unsigned char key[32];\n  memcpy (key, sha1a_buffer + 0, 8);\n  memcpy (key + 8, sha1b_buffer + 8, 12);\n  memcpy (key + 20, sha1c_buffer + 4, 12);\n\n  static unsigned char iv[32];\n  memcpy (iv, sha1a_buffer + 8, 12);\n  memcpy (iv + 12, sha1b_buffer + 0, 8);\n  memcpy (iv + 20, sha1c_buffer + 16, 4);\n  memcpy (iv + 24, sha1d_buffer + 0, 8);\n\n  TGLC_aes_key aes_key;\n  TGLC_aes_set_decrypt_key (key, 256, &aes_key);\n  TGLC_aes_ige_encrypt ((void *)decr_ptr, (void *)decr_ptr, 4 * (decr_end - decr_ptr), &aes_key, iv, 0);\n  memset (&aes_key, 0, sizeof (aes_key));\n\n  int x = *(decr_ptr);\n  if (x < 0 || (x & 3)) {\n    return -1;\n  }\n  assert (x >= 0 && !(x & 3));\n  TGLC_sha1 ((void *)decr_ptr, 4 + x, sha1a_buffer);\n\n  if (memcmp (sha1a_buffer + 4, msg_key, 16)) {\n    return -1;\n  }\n  return 0;\n}\n\nstruct tgl_message *tglf_fetch_encrypted_message (struct tgl_state *TLS, struct tl_ds_encrypted_message *DS_EM) {\n  if (!DS_EM) { return NULL; }\n  \n  tgl_peer_t *P = tgl_peer_get (TLS, TGL_MK_ENCR_CHAT (DS_LVAL (DS_EM->chat_id)));\n  if (!P || P->encr_chat.state != sc_ok) {\n    vlogprintf (E_WARNING, \"Encrypted message to unknown chat. Dropping\\n\");\n    return NULL;\n  }\n\n  tgl_message_id_t msg_id = tgl_peer_id_to_msg_id (P->id, DS_LVAL (DS_EM->random_id));\n  struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n  if (!M) {\n    M = talloc0 (sizeof (*M));\n    M->permanent_id = msg_id;\n    tglm_message_insert_tree (TLS, M);\n    TLS->messages_allocated ++;\n    assert (tgl_message_get (TLS, &msg_id) == M);\n  }\n\n  int new = !(M->flags & TGLMF_CREATED);\n  if (!new) {\n    return M;\n  }\n\n  decr_ptr = (void *)DS_EM->bytes->data;\n  decr_end = decr_ptr + (DS_EM->bytes->len / 4);\n  \n  if (P->encr_chat.exchange_state == tgl_sce_committed && P->encr_chat.key_fingerprint == *(long long *)decr_ptr) {\n    tgl_do_confirm_exchange (TLS, (void *)P, 0);\n    assert (P->encr_chat.exchange_state == tgl_sce_none);\n  }\n  \n  long long key_fingerprint = P->encr_chat.exchange_state != tgl_sce_committed ? P->encr_chat.key_fingerprint : P->encr_chat.exchange_key_fingerprint;\n  if (*(long long *)decr_ptr != key_fingerprint) {\n    vlogprintf (E_WARNING, \"Encrypted message with bad fingerprint to chat %s\\n\", P->print_name);\n    return M;\n  }\n  \n  decr_ptr += 2;\n\n  if (decrypt_encrypted_message (&P->encr_chat) < 0) {\n    vlogprintf (E_WARNING, \"can not decrypt message\\n\");\n    return M;\n  }\n  \n  int *save_in_ptr = in_ptr;\n  int *save_in_end = in_end;\n    \n  in_ptr = decr_ptr;\n  int ll = *in_ptr;\n  in_end = in_ptr + ll / 4 + 1;  \n  assert (fetch_int () == ll);\n\n  if (skip_type_decrypted_message_layer (TYPE_TO_PARAM (decrypted_message_layer)) < 0 || in_ptr != in_end) {\n    vlogprintf (E_WARNING, \"can not fetch message\\n\");\n    in_ptr = save_in_ptr;\n    in_end = save_in_end;\n    return M;\n  }\n\n  in_ptr = decr_ptr;\n  assert (fetch_int () == ll);\n\n  struct tl_ds_decrypted_message_layer *DS_DML = fetch_ds_type_decrypted_message_layer (TYPE_TO_PARAM (decrypted_message_layer));\n  assert (DS_DML);\n\n  in_ptr = save_in_ptr;\n  in_end = save_in_end;\n\n  //bl_do_encr_chat_set_layer (TLS, (void *)P, DS_LVAL (DS_DML->layer));\n  bl_do_encr_chat (TLS, tgl_get_peer_id (P->id),\n    NULL, NULL, NULL, NULL,\n    NULL, NULL, NULL, NULL,\n    NULL, DS_DML->layer, NULL, NULL, NULL, NULL,\n    TGL_FLAGS_UNCHANGED,\n    NULL, 0\n  );\n\n  int in_seq_no = DS_LVAL (DS_DML->out_seq_no);\n  int out_seq_no = DS_LVAL (DS_DML->in_seq_no);\n\n  if (in_seq_no / 2 != P->encr_chat.in_seq_no) {\n    vlogprintf (E_WARNING, \"Hole in seq in secret chat. in_seq_no = %d, expect_seq_no = %d\\n\", in_seq_no / 2, P->encr_chat.in_seq_no);\n    free_ds_type_decrypted_message_layer (DS_DML, TYPE_TO_PARAM(decrypted_message_layer));\n    return M;\n  }\n  \n  if ((in_seq_no & 1)  != 1 - (P->encr_chat.admin_id == tgl_get_peer_id (TLS->our_id)) || \n      (out_seq_no & 1) != (P->encr_chat.admin_id == tgl_get_peer_id (TLS->our_id))) {\n    vlogprintf (E_WARNING, \"Bad msg admin\\n\");\n    free_ds_type_decrypted_message_layer (DS_DML, TYPE_TO_PARAM(decrypted_message_layer));\n    return M;\n  }\n  if (out_seq_no / 2 > P->encr_chat.out_seq_no) {\n    vlogprintf (E_WARNING, \"In seq no is bigger than our's out seq no (out_seq_no = %d, our_out_seq_no = %d). Drop\\n\", out_seq_no / 2, P->encr_chat.out_seq_no);\n    free_ds_type_decrypted_message_layer (DS_DML, TYPE_TO_PARAM(decrypted_message_layer));\n    return M;\n  }\n  if (out_seq_no / 2 < P->encr_chat.last_in_seq_no) {\n    vlogprintf (E_WARNING, \"Clients in_seq_no decreased (out_seq_no = %d, last_out_seq_no = %d). Drop\\n\", out_seq_no / 2, P->encr_chat.last_in_seq_no);\n    free_ds_type_decrypted_message_layer (DS_DML, TYPE_TO_PARAM(decrypted_message_layer));\n    return M;\n  }\n\n  struct tl_ds_decrypted_message *DS_DM = DS_DML->message;\n  if (M->permanent_id.id != DS_LVAL (DS_DM->random_id)) {\n    vlogprintf (E_ERROR, \"Incorrect message: id = %\" INT64_PRINTF_MODIFIER \"d, new_id = %\" INT64_PRINTF_MODIFIER \"d\\n\", M->permanent_id.id, DS_LVAL (DS_DM->random_id));\n    free_ds_type_decrypted_message_layer (DS_DML, TYPE_TO_PARAM(decrypted_message_layer));\n    return M;\n  }\n\n  tgl_peer_id_t from_id = TGL_MK_USER (P->encr_chat.user_id);\n  bl_do_edit_message_encr (TLS, &M->permanent_id, &from_id, &P->id, DS_EM->date, DS_STR (DS_DM->message), DS_DM->media, DS_DM->action, DS_EM->file, TGLMF_CREATE | TGLMF_CREATED | TGLMF_ENCRYPTED);\n\n  if (in_seq_no >= 0 && out_seq_no >= 0) {\n    //bl_do_encr_chat_update_seq (TLS, (void *)P, in_seq_no / 2 + 1, out_seq_no / 2);\n    in_seq_no = in_seq_no / 2 + 1;\n    out_seq_no = out_seq_no / 2;\n    bl_do_encr_chat (TLS, tgl_get_peer_id (P->id),\n      NULL, NULL, NULL, NULL,\n      NULL, NULL, NULL, NULL,\n      NULL, NULL, &in_seq_no, &out_seq_no, NULL, NULL,\n      TGL_FLAGS_UNCHANGED,\n      NULL, 0\n    );\n    assert (P->encr_chat.in_seq_no == in_seq_no);\n  }\n  \n  free_ds_type_decrypted_message_layer (DS_DML, TYPE_TO_PARAM(decrypted_message_layer));\n  return M;\n}\n\nvoid tglf_fetch_encrypted_message_file (struct tgl_state *TLS, struct tgl_message_media *M, struct tl_ds_encrypted_file *DS_EF) {\n  if (DS_EF->magic == CODE_encrypted_file_empty) {\n    assert (M->type != tgl_message_media_document_encr);\n  } else {\n    assert (M->type == tgl_message_media_document_encr);\n    assert (M->encr_document);\n\n    M->encr_document->id = DS_LVAL (DS_EF->id);\n    M->encr_document->access_hash = DS_LVAL (DS_EF->access_hash);\n    if (!M->encr_document->size) {\n      M->encr_document->size = DS_LVAL (DS_EF->size);\n    }\n    M->encr_document->dc_id = DS_LVAL (DS_EF->dc_id);\n    M->encr_document->key_fingerprint = DS_LVAL (DS_EF->key_fingerprint);\n  }\n}\n\nstatic int id_cmp (struct tgl_message *M1, struct tgl_message *M2) {\n  if (M1->permanent_id.peer_type < M2->permanent_id.peer_type) { return -1; }\n  if (M1->permanent_id.peer_type > M2->permanent_id.peer_type) { return 1; }\n  if (M1->permanent_id.peer_id < M2->permanent_id.peer_id) { return -1; }\n  if (M1->permanent_id.peer_id > M2->permanent_id.peer_id) { return 1; }\n  if (M1->permanent_id.id < M2->permanent_id.id) { return -1; }\n  if (M1->permanent_id.id > M2->permanent_id.id) { return 1; }\n  else { return 0; }\n}\n\nstatic void increase_peer_size (struct tgl_state *TLS) {\n  if (TLS->peer_num == TLS->peer_size) {\n    int new_size = TLS->peer_size ? 2 * TLS->peer_size : 10;\n    int old_size = TLS->peer_size;\n    if (old_size) {\n      TLS->Peers = trealloc (TLS->Peers, old_size * sizeof (void *), new_size * sizeof (void *));\n    } else {\n      TLS->Peers = talloc (new_size * sizeof (void *));\n    }\n    TLS->peer_size = new_size;\n  }\n}\n\nstruct tgl_message *tglf_fetch_alloc_encrypted_message (struct tgl_state *TLS, struct tl_ds_encrypted_message *DS_EM) {\n  struct tgl_message *M = tglf_fetch_encrypted_message (TLS, DS_EM);\n  if (!M) { return M; }\n\n  if (M->flags & TGLMF_CREATED) {\n    tgl_peer_t *_E = tgl_peer_get (TLS, M->to_id);\n    assert (_E);\n    struct tgl_secret_chat *E = &_E->encr_chat;\n    if (M->action.type == tgl_message_action_request_key) {\n      if (E->exchange_state == tgl_sce_none || (E->exchange_state == tgl_sce_requested && E->exchange_id > M->action.exchange_id )) {\n        tgl_do_accept_exchange (TLS, E, M->action.exchange_id, M->action.g_a);\n      } else {\n        vlogprintf (E_WARNING, \"Exchange: Incorrect state (received request, state = %d)\\n\", E->exchange_state);\n      }\n    }\n    if (M->action.type == tgl_message_action_accept_key) {\n      if (E->exchange_state == tgl_sce_requested && E->exchange_id == M->action.exchange_id) {\n        tgl_do_commit_exchange (TLS, E, M->action.g_a);\n      } else {\n        vlogprintf (E_WARNING, \"Exchange: Incorrect state (received accept, state = %d)\\n\", E->exchange_state);\n      }\n    }\n    if (M->action.type == tgl_message_action_commit_key) {\n      if (E->exchange_state == tgl_sce_accepted && E->exchange_id == M->action.exchange_id) {\n        tgl_do_confirm_exchange (TLS, E, 1);\n      } else {\n        vlogprintf (E_WARNING, \"Exchange: Incorrect state (received commit, state = %d)\\n\", E->exchange_state);\n      }\n    }\n    if (M->action.type == tgl_message_action_abort_key) {\n      if (E->exchange_state != tgl_sce_none && E->exchange_id == M->action.exchange_id) {\n        tgl_do_abort_exchange (TLS, E);\n      } else {\n        vlogprintf (E_WARNING, \"Exchange: Incorrect state (received abort, state = %d)\\n\", E->exchange_state);\n      }\n    }\n    if (M->action.type == tgl_message_action_notify_layer) {\n      bl_do_encr_chat (TLS, tgl_get_peer_id (E->id),\n        NULL, NULL, NULL, NULL,\n        NULL, NULL, NULL, NULL,\n        NULL, &M->action.layer, NULL, NULL, NULL, NULL,\n        TGL_FLAGS_UNCHANGED,\n        NULL, 0\n      );\n    }\n    if (M->action.type == tgl_message_action_set_message_ttl) {\n      //bl_do_encr_chat_set_ttl (TLS, E, M->action.ttl);      \n      bl_do_encr_chat (TLS, tgl_get_peer_id (E->id),\n        NULL, NULL, NULL, NULL,\n        NULL, NULL, NULL, NULL,\n        &M->action.ttl, NULL, NULL, NULL, NULL, NULL,\n        TGL_FLAGS_UNCHANGED,\n        NULL, 0\n      );\n    }\n  }\n  return M;\n}\n\nstruct tgl_bot_info *tglf_fetch_alloc_bot_info (struct tgl_state *TLS, struct tl_ds_bot_info *DS_BI) {\n  if (!DS_BI || DS_BI->magic == CODE_bot_info_empty) { return NULL; }\n  struct tgl_bot_info *B = talloc (sizeof (*B));\n  B->version = DS_LVAL (DS_BI->version);\n  B->share_text = DS_STR_DUP (DS_BI->share_text);\n  B->description = DS_STR_DUP (DS_BI->description);\n\n  B->commands_num = DS_LVAL (DS_BI->commands->cnt);\n  B->commands = talloc (sizeof (struct tgl_bot_command) * B->commands_num);\n  int i;\n  for (i = 0; i < B->commands_num; i++) {\n    struct tl_ds_bot_command *BC = DS_BI->commands->data[i];\n    B->commands[i].command = DS_STR_DUP (BC->command);\n    B->commands[i].description = DS_STR_DUP (BC->description);\n  }\n  return B;\n}\n\nstruct tgl_message_reply_markup *tglf_fetch_alloc_reply_markup (struct tgl_state *TLS, struct tgl_message *M, struct tl_ds_reply_markup *DS_RM) {\n  if (!DS_RM) { return NULL; }\n\n  struct tgl_message_reply_markup *R = talloc0 (sizeof (*R));\n  R->flags = DS_LVAL (DS_RM->flags);\n  R->refcnt = 1;\n\n  R->rows = DS_RM->rows ? DS_LVAL (DS_RM->rows->cnt) : 0;\n\n  int total = 0;\n  R->row_start = talloc ((R->rows + 1) * 4);\n  R->row_start[0] = 0;\n  int i;\n  for (i = 0; i < R->rows; i++) {\n    struct tl_ds_keyboard_button_row *DS_K = DS_RM->rows->data[i];\n    total += DS_LVAL (DS_K->buttons->cnt);\n    R->row_start[i + 1] = total;\n  }\n  R->buttons = talloc (sizeof (void *) * total);\n  int r = 0;\n  for (i = 0; i < R->rows; i++) {\n    struct tl_ds_keyboard_button_row *DS_K = DS_RM->rows->data[i];\n    int j;\n    for (j = 0; j < DS_LVAL (DS_K->buttons->cnt); j++) {\n      struct tl_ds_keyboard_button *DS_KB = DS_K->buttons->data[j];\n      R->buttons[r ++] = DS_STR_DUP (DS_KB->text);\n    }\n  }\n  assert (r == total);\n  return R;\n}\n/* }}} */\n\nvoid tglp_insert_encrypted_chat (struct tgl_state *TLS, tgl_peer_t *P) {\n  TLS->encr_chats_allocated ++;\n  TLS->peer_tree = tree_insert_peer (TLS->peer_tree, P, rand ());\n  increase_peer_size (TLS);\n  TLS->Peers[TLS->peer_num ++] = P;\n}\n\nvoid tglp_insert_user (struct tgl_state *TLS, tgl_peer_t *P) {\n  TLS->users_allocated ++;\n  TLS->peer_tree = tree_insert_peer (TLS->peer_tree, P, rand ());\n  increase_peer_size (TLS);\n  TLS->Peers[TLS->peer_num ++] = P;\n}\n\nvoid tglp_insert_chat (struct tgl_state *TLS, tgl_peer_t *P) {\n  TLS->chats_allocated ++;\n  TLS->peer_tree = tree_insert_peer (TLS->peer_tree, P, rand ());\n  increase_peer_size (TLS);\n  TLS->Peers[TLS->peer_num ++] = P;\n}\n\nvoid tglp_insert_channel (struct tgl_state *TLS, tgl_peer_t *P) {\n  TLS->channels_allocated ++;\n  TLS->peer_tree = tree_insert_peer (TLS->peer_tree, P, rand ());\n  increase_peer_size (TLS);\n  TLS->Peers[TLS->peer_num ++] = P;\n}\n\nvoid tgl_insert_empty_user (struct tgl_state *TLS, int uid) {\n  tgl_peer_id_t id = TGL_MK_USER (uid);\n  if (tgl_peer_get (TLS, id)) { return; }\n  tgl_peer_t *P = talloc0 (sizeof (*P));\n  P->id = id;\n  tglp_insert_user (TLS, P);\n}\n\nvoid tgl_insert_empty_chat (struct tgl_state *TLS, int cid) {\n  tgl_peer_id_t id = TGL_MK_CHAT (cid);\n  if (tgl_peer_get (TLS, id)) { return; }\n  tgl_peer_t *P = talloc0 (sizeof (*P));\n  P->id = id;\n  tglp_insert_chat (TLS, P);\n}\n\n/* {{{ Free */\n\nvoid tgls_free_photo_size (struct tgl_state *TLS, struct tgl_photo_size *S) {\n  tfree_str (S->type);\n  if (S->data) {\n    tfree (S->data, S->size);\n  }\n}\n\nvoid tgls_free_photo (struct tgl_state *TLS, struct tgl_photo *P) {\n  if (--P->refcnt) {\n    assert (P->refcnt > 0);\n    return;\n  }\n  if (P->caption) { tfree_str (P->caption); }\n  if (P->sizes) {\n    int i;\n    for (i = 0; i < P->sizes_num; i++) {\n      tgls_free_photo_size (TLS, &P->sizes[i]);\n    }\n    tfree (P->sizes, sizeof (struct tgl_photo_size) * P->sizes_num);\n  }\n  TLS->photo_tree = tree_delete_photo (TLS->photo_tree, P);\n  tfree (P, sizeof (*P));\n}\n\nvoid tgls_free_document (struct tgl_state *TLS, struct tgl_document *D) {\n  if (--D->refcnt) {\n    assert (D->refcnt);\n    return;\n  }\n  if (D->mime_type) { tfree_str (D->mime_type);}\n  if (D->caption) {tfree_str (D->caption);}\n  tgls_free_photo_size (TLS, &D->thumb);\n  \n  TLS->document_tree = tree_delete_document (TLS->document_tree, D);\n  tfree (D, sizeof (*D));\n}\n\nvoid tgls_free_webpage (struct tgl_state *TLS, struct tgl_webpage *W) {\n  if (--W->refcnt) {\n    assert (W->refcnt);\n    return;\n  }\n  if (W->url) { tfree_str (W->url); }\n  if (W->display_url) { tfree_str (W->display_url); }\n  if (W->title) { tfree_str (W->title); }\n  if (W->site_name) { tfree_str (W->site_name); }\n  if (W->type) { tfree_str (W->type); }\n  if (W->description) { tfree_str (W->description); }\n  if (W->photo) { tgls_free_photo (TLS, W->photo); }\n  if (W->embed_url) { tfree_str (W->embed_url); }\n  if (W->embed_type) { tfree_str (W->embed_type); }\n  if (W->author) { tfree_str (W->author); }\n  \n  TLS->webpage_tree = tree_delete_webpage (TLS->webpage_tree, W);\n  tfree (W, sizeof (*W));\n}\n\nvoid tgls_free_message_media (struct tgl_state *TLS, struct tgl_message_media *M) {\n  switch (M->type) {\n  case tgl_message_media_none:\n  case tgl_message_media_geo:\n    return;\n  case tgl_message_media_photo:\n    tgls_free_photo (TLS, M->photo);\n    if (M->caption) { tfree_str (M->caption); }\n    M->photo = NULL;\n    return;\n  case tgl_message_media_contact:\n    tfree_str (M->phone);\n    tfree_str (M->first_name);\n    tfree_str (M->last_name);\n    return;\n  case tgl_message_media_document:\n  case tgl_message_media_video:\n  case tgl_message_media_audio:\n    tgls_free_document (TLS, M->document);\n    if (M->caption) { tfree_str (M->caption); }\n    return;\n  case tgl_message_media_unsupported:\n    return;\n  case tgl_message_media_document_encr:\n    tfree_secure (M->encr_document->key, 32);\n    tfree_secure (M->encr_document->iv, 32);\n    tfree (M->encr_document, sizeof (*M->encr_document));\n    return;\n  case tgl_message_media_webpage:\n    tgls_free_webpage (TLS, M->webpage);\n    return;\n  case tgl_message_media_venue:\n    if (M->venue.title) { tfree_str (M->venue.title); }\n    if (M->venue.address) { tfree_str (M->venue.address); }\n    if (M->venue.provider) { tfree_str (M->venue.provider); }\n    if (M->venue.venue_id) { tfree_str (M->venue.venue_id); }\n    return;\n  default:\n    vlogprintf (E_ERROR, \"type = 0x%08x\\n\", M->type);\n    assert (0);\n  }\n}\n\nvoid tgls_free_message_action (struct tgl_state *TLS, struct tgl_message_action *M) {\n  switch (M->type) {\n  case tgl_message_action_none:\n    return;\n  case tgl_message_action_chat_create:\n    tfree_str (M->title);\n    tfree (M->users, M->user_num * 4);\n    return;\n  case tgl_message_action_chat_edit_title:\n    tfree_str (M->new_title);\n    return;\n  case tgl_message_action_chat_edit_photo:\n    tgls_free_photo (TLS, M->photo);\n    M->photo = NULL;\n    return;\n  case tgl_message_action_chat_add_users:\n    tfree (M->users, M->user_num * 4);\n    return;\n  case tgl_message_action_chat_delete_photo:\n  case tgl_message_action_chat_add_user_by_link:\n  case tgl_message_action_chat_delete_user:\n  case tgl_message_action_geo_chat_create:\n  case tgl_message_action_geo_chat_checkin:\n  case tgl_message_action_set_message_ttl:\n  case tgl_message_action_read_messages:\n  case tgl_message_action_delete_messages:\n  case tgl_message_action_screenshot_messages:\n  case tgl_message_action_flush_history:\n  case tgl_message_action_typing:\n  case tgl_message_action_resend:\n  case tgl_message_action_notify_layer:\n  case tgl_message_action_commit_key:\n  case tgl_message_action_abort_key:\n  case tgl_message_action_noop:\n  case tgl_message_action_migrated_to:\n    return;\n  case tgl_message_action_request_key:\n  case tgl_message_action_accept_key:\n    tfree (M->g_a, 256);\n    return;\n  case tgl_message_action_channel_create:\n  case tgl_message_action_migrated_from:\n    tfree_str (M->title);\n    return;\n/*  default:\n    vlogprintf (E_ERROR, \"type = 0x%08x\\n\", M->type);\n    assert (0);*/\n  }\n  vlogprintf (E_ERROR, \"type = 0x%08x\\n\", M->type);\n  assert (0);\n}\n\nvoid tgls_free_message_entity (struct tgl_state *TLS, struct tgl_message_entity *E) {\n  if (E->extra) {\n    tfree_str (E->extra);\n  }\n}\n\nvoid tgls_clear_message (struct tgl_state *TLS, struct tgl_message *M) {\n  if (!(M->flags & TGLMF_SERVICE)) {\n    if (M->message) { tfree (M->message, M->message_len + 1); }\n    tgls_free_message_media (TLS, &M->media);\n  } else {\n    tgls_free_message_action (TLS, &M->action);\n  }\n  int i;\n  for (i = 0; i < M->entities_num; i++) {\n    tgls_free_message_entity (TLS, &M->entities[i]);\n  }\n  tfree (M->entities, M->entities_num * sizeof (struct tgl_message_entity));\n}\n\nvoid tgls_free_reply_markup (struct tgl_state *TLS, struct tgl_message_reply_markup *R) { \n  if (!--R->refcnt) {\n    int i;\n    for (i = 0; i < R->row_start[R->rows]; i++) {\n      tfree_str (R->buttons[i]);\n    }\n    tfree (R->buttons, R->row_start[R->rows] * sizeof (void *));\n    tfree (R->row_start, 4 * (R->rows + 1));\n    tfree (R, sizeof (*R));\n  } else {\n    assert (R->refcnt > 0);\n  }\n}\n\nvoid tgls_free_message (struct tgl_state *TLS, struct tgl_message *M) {\n  tgls_clear_message (TLS, M);\n  if (M->reply_markup) {\n    tgls_free_reply_markup (TLS, M->reply_markup);\n  }\n  tfree (M, sizeof (*M));\n}\n\nvoid tgls_free_chat (struct tgl_state *TLS, struct tgl_chat *U) {\n  if (U->title) { tfree_str (U->title); }\n  if (U->print_title) { tfree_str (U->print_title); }\n  if (U->user_list) {\n    tfree (U->user_list, U->user_list_size * 12);\n  }\n  if (U->photo) { tgls_free_photo (TLS, U->photo); }\n  tfree (U, sizeof (tgl_peer_t));\n}\n\nvoid tgls_free_user (struct tgl_state *TLS, struct tgl_user *U) {\n  if (U->first_name) { tfree_str (U->first_name); }\n  if (U->last_name) { tfree_str (U->last_name); }\n  if (U->print_name) { tfree_str (U->print_name); }\n  if (U->phone) { tfree_str (U->phone); }\n  if (U->username) { tfree_str (U->username); }\n  if (U->real_first_name) { tfree_str (U->real_first_name); }\n  if (U->real_last_name) { tfree_str (U->real_last_name); }\n  if (U->status.ev) { tgl_remove_status_expire (TLS, U); }\n  if (U->photo) { tgls_free_photo (TLS, U->photo); }\n  if (U->bot_info) { tgls_free_bot_info (TLS, U->bot_info); }\n  tfree (U, sizeof (tgl_peer_t));\n}\n\nvoid tgls_free_encr_chat (struct tgl_state *TLS, struct tgl_secret_chat *U) {\n  if (U->print_name) { tfree_str (U->print_name); }\n  if (U->g_key) { tfree (U->g_key, 256); } \n  tfree (U, sizeof (tgl_peer_t));\n}\n\nvoid tgls_free_channel (struct tgl_state *TLS, struct tgl_channel *U) {\n  if (U->print_title) { tfree_str (U->print_title); }\n  if (U->username) { tfree_str (U->username); }\n  if (U->title) { tfree_str (U->title); }\n  if (U->about) { tfree_str (U->about); }\n  if (U->photo) { tgls_free_photo (TLS, U->photo); }\n  tfree (U, sizeof (tgl_peer_t));\n}\n\nvoid tgls_free_peer (struct tgl_state *TLS, tgl_peer_t *P) {\n  if (tgl_get_peer_type (P->id) == TGL_PEER_USER) {\n    tgls_free_user (TLS, (void *)P);\n  } else if (tgl_get_peer_type (P->id) == TGL_PEER_CHAT) {\n    tgls_free_chat (TLS, (void *)P);\n  } else if (tgl_get_peer_type (P->id) == TGL_PEER_ENCR_CHAT) {\n    tgls_free_encr_chat (TLS, (void *)P);\n  } else if (tgl_get_peer_type (P->id) == TGL_PEER_CHANNEL) {\n    tgls_free_channel (TLS, (void *)P);\n  } else {\n    assert (0);\n  }\n}\n\nvoid tgls_free_bot_info (struct tgl_state *TLS, struct tgl_bot_info *B) {\n  if (!B) { return; }\n  int i;\n  for (i = 0; i < B->commands_num; i++) {\n    tfree_str (B->commands[i].command);\n    tfree_str (B->commands[i].description);\n  }\n  tfree (B->commands, sizeof (struct tgl_bot_command) * B->commands_num);\n  tfree_str (B->share_text);\n  tfree_str (B->description);\n  tfree (B, sizeof (*B));\n}\n/* }}} */\n\n/* Messages {{{ */\n\nvoid tglm_message_del_use (struct tgl_state *TLS, struct tgl_message *M) {\n  M->next_use->prev_use = M->prev_use;\n  M->prev_use->next_use = M->next_use;\n}\n\nvoid tglm_message_add_use (struct tgl_state *TLS, struct tgl_message *M) {\n  M->next_use = TLS->message_list.next_use;\n  M->prev_use = &TLS->message_list;\n  M->next_use->prev_use = M;\n  M->prev_use->next_use = M;\n}\n\nvoid tglm_message_add_peer (struct tgl_state *TLS, struct tgl_message *M) {\n  tgl_peer_id_t id;\n  if (!tgl_cmp_peer_id (M->to_id, TLS->our_id)) {\n    id = M->from_id;\n  } else {\n    id = M->to_id;\n  }\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (!P) {\n    P = talloc0 (sizeof (*P));\n    P->id = id;\n    switch (tgl_get_peer_type (id)) {\n    case TGL_PEER_USER:\n      TLS->users_allocated ++;\n      break;\n    case TGL_PEER_CHAT:\n      TLS->chats_allocated ++;\n      break;\n    case TGL_PEER_GEO_CHAT:\n      TLS->geo_chats_allocated ++;\n      break;\n    case TGL_PEER_ENCR_CHAT:\n      TLS->encr_chats_allocated ++;\n      break;\n    }\n    TLS->peer_tree = tree_insert_peer (TLS->peer_tree, P, rand ());\n    increase_peer_size (TLS);\n    TLS->Peers[TLS->peer_num ++] = P;\n  }\n  if (!P->last) {\n    P->last = M;\n    M->prev = M->next = 0;\n  } else {\n    if (tgl_get_peer_type (P->id) != TGL_PEER_ENCR_CHAT) {\n      struct tgl_message *N = P->last;\n      struct tgl_message *NP = 0;\n      while (N && N->permanent_id.id > M->permanent_id.id) {\n        NP = N;\n        N = N->next;\n      }\n      if (N) {\n        assert (N->permanent_id.id < M->permanent_id.id); \n      }\n      M->next = N;\n      M->prev = NP;\n      if (N) { N->prev = M; }\n      if (NP) { NP->next = M; }\n      else { P->last = M; }\n    } else {\n      struct tgl_message *N = P->last;\n      struct tgl_message *NP = 0;\n      M->next = N;\n      M->prev = NP;\n      if (N) { N->prev = M; }\n      if (NP) { NP->next = M; }\n      else { P->last = M; }\n    }\n  }\n}\n\nvoid tglm_message_del_peer (struct tgl_state *TLS, struct tgl_message *M) {\n  tgl_peer_id_t id;\n  if (!tgl_cmp_peer_id (M->to_id, TLS->our_id)) {\n    id = M->from_id;\n  } else {\n    id = M->to_id;\n  }\n  tgl_peer_t *P = tgl_peer_get (TLS, id);\n  if (M->prev) {\n    M->prev->next = M->next;\n  }\n  if (M->next) {\n    M->next->prev = M->prev;\n  }\n  if (P && P->last == M) {\n    P->last = M->next;\n  }\n}\n\nstruct tgl_message *tglm_message_alloc (struct tgl_state *TLS, tgl_message_id_t *id) {\n  struct tgl_message *M = talloc0 (sizeof (*M));\n  M->permanent_id = *id;\n  tglm_message_insert_tree (TLS, M);\n  TLS->messages_allocated ++;\n  return M;\n}\n\nvoid tglm_message_insert_tree (struct tgl_state *TLS, struct tgl_message *M) {\n  assert (M->permanent_id.id);\n  TLS->message_tree = tree_insert_message (TLS->message_tree, M, rand ());\n}\n\nvoid tglm_message_remove_tree (struct tgl_state *TLS, struct tgl_message *M) {\n  assert (M->permanent_id.id);\n  TLS->message_tree = tree_delete_message (TLS->message_tree, M);\n}\n\nvoid tglm_message_insert (struct tgl_state *TLS, struct tgl_message *M) {\n  tglm_message_add_use (TLS, M);\n  tglm_message_add_peer (TLS, M);\n}\n\nvoid tglm_message_insert_unsent (struct tgl_state *TLS, struct tgl_message *M) {\n  TLS->message_unsent_tree = tree_insert_message (TLS->message_unsent_tree, M, rand ());\n}\n\nvoid tglm_message_remove_unsent (struct tgl_state *TLS, struct tgl_message *M) {\n  TLS->message_unsent_tree = tree_delete_message (TLS->message_unsent_tree, M);\n}\n\nstatic void __send_msg (struct tgl_message *M, void *_TLS) {\n  struct tgl_state *TLS = _TLS;\n  vlogprintf (E_NOTICE, \"Resending message...\\n\");\n  //print_message (M);\n\n  if (M->media.type != tgl_message_media_none) {\n    assert (M->flags & TGLMF_ENCRYPTED);\n    bl_do_message_delete (TLS, &M->permanent_id);\n  } else {\n    tgl_do_send_msg (TLS, M, 0, 0);\n  }\n}\n\nvoid tglm_send_all_unsent (struct tgl_state *TLS) {\n  tree_act_ex_message (TLS->message_unsent_tree, __send_msg, TLS);\n}\n/* }}} */\n\nstruct tgl_photo *tgl_photo_get (struct tgl_state *TLS, long long id) {\n  struct tgl_photo P;\n  P.id = id;\n  return tree_lookup_photo (TLS->photo_tree, &P);\n}\n\nvoid tgl_photo_insert (struct tgl_state *TLS, struct tgl_photo *P) {\n  TLS->photo_tree = tree_insert_photo (TLS->photo_tree, P, rand ());\n}\n\nstruct tgl_document *tgl_document_get (struct tgl_state *TLS, long long id) {\n  struct tgl_document P;\n  P.id = id;\n  return tree_lookup_document (TLS->document_tree, &P);\n}\n\nvoid tgl_document_insert (struct tgl_state *TLS, struct tgl_document *P) {\n  TLS->document_tree = tree_insert_document (TLS->document_tree, P, rand ());\n}\n\nstruct tgl_webpage *tgl_webpage_get (struct tgl_state *TLS, long long id) {\n  struct tgl_webpage P;\n  P.id = id;\n  return tree_lookup_webpage (TLS->webpage_tree, &P);\n}\n\nvoid tgl_webpage_insert (struct tgl_state *TLS, struct tgl_webpage *P) {\n  TLS->webpage_tree = tree_insert_webpage (TLS->webpage_tree, P, rand ());\n}\n\nvoid tglp_peer_insert_name (struct tgl_state *TLS, tgl_peer_t *P) {\n  TLS->peer_by_name_tree = tree_insert_peer_by_name (TLS->peer_by_name_tree, P, rand ());\n}\n\nvoid tglp_peer_delete_name (struct tgl_state *TLS, tgl_peer_t *P) {\n  TLS->peer_by_name_tree = tree_delete_peer_by_name (TLS->peer_by_name_tree, P);\n}\n\ntgl_peer_t *tgl_peer_get (struct tgl_state *TLS, tgl_peer_id_t id) {\n  static tgl_peer_t U;\n  U.id = id;\n  return tree_lookup_peer (TLS->peer_tree, &U);\n}\n\nstruct tgl_message *tgl_message_get (struct tgl_state *TLS, tgl_message_id_t *msg_id) {\n  struct tgl_message M;\n  if (msg_id->peer_type == TGL_PEER_RANDOM_ID) {\n    msg_id = tgls_get_local_by_random (TLS, msg_id->id);\n  } else if (msg_id->peer_type == TGL_PEER_TEMP_ID) {\n    msg_id = tgls_get_local_by_temp (TLS, msg_id->id);\n  }\n  if (!msg_id) {\n    return NULL;\n  }\n  M.permanent_id = *msg_id;\n  return tree_lookup_message (TLS->message_tree, &M);\n}\n\ntgl_peer_t *tgl_peer_get_by_name (struct tgl_state *TLS, const char *s) {\n  static tgl_peer_t P;\n  P.print_name = (void *)s;\n  tgl_peer_t *R = tree_lookup_peer_by_name (TLS->peer_by_name_tree, &P);\n  return R;\n}\n\nvoid tgl_peer_iterator_ex (struct tgl_state *TLS, void (*it)(tgl_peer_t *P, void *extra), void *extra) {\n  tree_act_ex_peer (TLS->peer_tree, it, extra);\n}\n\nint tgl_complete_user_list (struct tgl_state *TLS, int index, const char *text, int len, char **R) {\n  index ++;\n  while (index < TLS->peer_num && (!TLS->Peers[index]->print_name || strncmp (TLS->Peers[index]->print_name, text, len) || tgl_get_peer_type (TLS->Peers[index]->id) != TGL_PEER_USER)) {\n    index ++;\n  }\n  if (index < TLS->peer_num) {\n    *R = strdup (TLS->Peers[index]->print_name);\n    assert (*R);\n    return index;\n  } else {\n    return -1;\n  }\n}\n\nint tgl_complete_chat_list (struct tgl_state *TLS, int index, const char *text, int len, char **R) {\n  index ++;\n  while (index < TLS->peer_num && (!TLS->Peers[index]->print_name || strncmp (TLS->Peers[index]->print_name, text, len) || tgl_get_peer_type (TLS->Peers[index]->id) != TGL_PEER_CHAT)) {\n    index ++;\n  }\n  if (index < TLS->peer_num) {\n    *R = strdup (TLS->Peers[index]->print_name);\n    assert (*R);\n    return index;\n  } else {\n    return -1;\n  }\n}\n\nint tgl_complete_channel_list (struct tgl_state *TLS, int index, const char *text, int len, char **R) {\n  index ++;\n  while (index < TLS->peer_num && (!TLS->Peers[index]->print_name || strncmp (TLS->Peers[index]->print_name, text, len) || tgl_get_peer_type (TLS->Peers[index]->id) != TGL_PEER_CHANNEL)) {\n    index ++;\n  }\n  if (index < TLS->peer_num) {\n    *R = strdup (TLS->Peers[index]->print_name);\n    assert (*R);\n    return index;\n  } else {\n    return -1;\n  }\n}\n\nint tgl_complete_encr_chat_list (struct tgl_state *TLS, int index, const char *text, int len, char **R) {\n  index ++;\n  while (index < TLS->peer_num && (!TLS->Peers[index]->print_name || strncmp (TLS->Peers[index]->print_name, text, len) || tgl_get_peer_type (TLS->Peers[index]->id) != TGL_PEER_ENCR_CHAT)) {\n    index ++;\n  }\n  if (index < TLS->peer_num) {\n    *R = strdup (TLS->Peers[index]->print_name);\n    assert (*R);\n    return index;\n  } else {\n    return -1;\n  }\n}\n\nint tgl_complete_peer_list (struct tgl_state *TLS, int index, const char *text, int len, char **R) {\n  index ++;\n  while (index < TLS->peer_num && (!TLS->Peers[index]->print_name || strncmp (TLS->Peers[index]->print_name, text, len))) {\n    index ++;\n  }\n  if (index < TLS->peer_num) {\n    *R = strdup (TLS->Peers[index]->print_name);\n    assert (*R);\n    return index;\n  } else {\n    return -1;\n  }\n}\n\nint tgl_secret_chat_for_user (struct tgl_state *TLS, tgl_peer_id_t user_id) {\n  int index = 0;\n  while (index < TLS->peer_num && (tgl_get_peer_type (TLS->Peers[index]->id) != TGL_PEER_ENCR_CHAT || TLS->Peers[index]->encr_chat.user_id != tgl_get_peer_id (user_id) || TLS->Peers[index]->encr_chat.state != sc_ok)) {\n    index ++;\n  }\n  if (index < TLS->peer_num) {\n    return tgl_get_peer_id (TLS->Peers[index]->encr_chat.id);\n  } else {\n    return -1;\n  }\n}\n\nvoid tgls_free_peer_gw (tgl_peer_t *P, void *TLS) {\n  tgls_free_peer (TLS, P);\n}\n\nvoid tgls_free_message_gw (struct tgl_message *M, void *TLS) {\n  tgls_free_message (TLS, M);\n}\n\nvoid tgl_free_all (struct tgl_state *TLS) {\n  tree_act_ex_peer (TLS->peer_tree, tgls_free_peer_gw, TLS);\n  TLS->peer_tree = tree_clear_peer (TLS->peer_tree);\n  TLS->peer_by_name_tree = tree_clear_peer_by_name (TLS->peer_by_name_tree);\n  tree_act_ex_message (TLS->message_tree, tgls_free_message_gw, TLS);\n  TLS->message_tree = tree_clear_message (TLS->message_tree);\n  tree_act_ex_message (TLS->message_unsent_tree, tgls_free_message_gw, TLS);\n  TLS->message_unsent_tree = tree_clear_message (TLS->message_unsent_tree);\n  tglq_query_free_all (TLS);\n  TLS->random_id_tree = tree_clear_random_id (TLS->random_id_tree);\n  TLS->temp_id_tree = tree_clear_temp_id (TLS->temp_id_tree);\n\n  if (TLS->encr_prime) { tfree (TLS->encr_prime, 256); }\n\n\n  if (TLS->binlog_name) { tfree_str (TLS->binlog_name); }\n  if (TLS->auth_file) { tfree_str (TLS->auth_file); }\n  if (TLS->downloads_directory) { tfree_str (TLS->downloads_directory); }\n  if (TLS->app_hash) { tfree_str (TLS->app_hash); }\n  if (TLS->app_version) { tfree_str (TLS->app_version); }\n\n  if (TLS->error) {\n    tfree_str (TLS->error);\n  }\n  int i;\n  for (i = 0; i < TLS->rsa_key_num; i++) {\n    if (TLS->rsa_key_list[i]) {\n      tfree_str (TLS->rsa_key_list[i]);\n    }\n  }\n\n  for (i = 0; i <= TLS->max_dc_num; i++) if (TLS->DC_list[i]) {\n    tgls_free_dc (TLS, TLS->DC_list[i]);\n  }\n  TGLC_bn_ctx_free (TLS->TGLC_bn_ctx);\n  tgls_free_pubkey (TLS);\n\n  if (TLS->ev_login) { TLS->timer_methods->free (TLS->ev_login); }\n  if (TLS->online_updates_timer) { TLS->timer_methods->free (TLS->online_updates_timer); }\n\n  tfree (TLS->Peers, TLS->peer_size * sizeof (void *));\n  tfree (TLS, sizeof (*TLS));\n}\n\nint tgl_print_stat (struct tgl_state *TLS, char *s, int len) {\n  return tsnprintf (s, len, \n    \"users_allocated\\t%d\\n\"\n    \"chats_allocated\\t%d\\n\"\n    \"encr_chats_allocated\\t%d\\n\"\n    \"peer_num\\t%d\\n\"\n    \"messages_allocated\\t%d\\n\",\n    TLS->users_allocated,\n    TLS->chats_allocated,\n    TLS->encr_chats_allocated,\n    TLS->peer_num,\n    TLS->messages_allocated\n    );\n}\n\nvoid tglf_fetch_int_array (int *dst, struct tl_ds_vector *src, int len) {\n  int i;\n  assert (len <= *src->f1);\n  for (i = 0; i < len; i++) {\n    dst[i] = *(int *)src->f2[i];\n  }\n}\n\nvoid tglf_fetch_int_tuple (int *dst, int **src, int len) {\n  int i;\n  for (i = 0; i < len; i++) {\n    dst[i] = *src[i];\n  }\n}\n\n\nvoid tgls_messages_mark_read (struct tgl_state *TLS, struct tgl_message *M, int out, int seq) {\n  while (M && M->permanent_id.id > seq) { \n    if ((M->flags & TGLMF_OUT) == out) {\n      if (!(M->flags & TGLMF_UNREAD)) {\n        return;\n      }\n    }\n    M = M->next; \n  }\n  while (M) {\n    if ((M->flags & TGLMF_OUT) == out) {\n      if (M->flags & TGLMF_UNREAD) {\n        M->flags &= ~TGLMF_UNREAD;\n        TLS->callback.marked_read (TLS, 1, &M);\n      } else {\n        return;\n      }\n    }\n    M = M->next; \n  }\n}\n \n/*\nvoid tgls_insert_random2local (struct tgl_state *TLS, long long random_id, tgl_message_id_t *msg_id) {\n  struct random2local *X = talloc (sizeof (*X));\n  X->random_id = random_id;\n  X->local_id = *msg_id;\n\n  struct random2local *R = tree_lookup_random_id (TLS->random_id_tree, X);\n  assert (!R);\n  \n  TLS->random_id_tree = tree_insert_random_id (TLS->random_id_tree, X, rand ());\n}\n\ntgl_message_id_t *tgls_get_local_by_random (struct tgl_state *TLS, long long random_id) {\n  struct random2local X;\n  X.random_id = random_id;\n  struct random2local *Y = tree_lookup_random_id (TLS->random_id_tree, &X);\n  if (Y) { \n    //TLS->random_id_tree = tree_delete_random_id (TLS->random_id_tree, Y);\n    return &Y->local_id;\n  } else {\n    return NULL;\n  }\n}\n  \nvoid tgls_insert_temp2local (struct tgl_state *TLS, int temp_id, tgl_message_id_t *msg_id) {\n  struct random2local *X = talloc (sizeof (*X));\n  X->random_id = temp_id;\n  X->local_id = *msg_id;\n\n  struct random2local *R = tree_lookup_random_id (TLS->temp_id_tree, X);\n  assert (!R);\n  \n  TLS->temp_id_tree = tree_insert_random_id (TLS->temp_id_tree, X, rand ());\n}\n}*/\n\ntgl_message_id_t *tgls_get_local_by_random (struct tgl_state *TLS, long long random_id) {\n  struct tgl_message M;\n  M.random_id = random_id;\n  struct tgl_message *N = tree_lookup_random_id (TLS->random_id_tree, &M);\n  if (N) {\n    return &N->permanent_id;\n  } else {\n    return NULL;\n  }\n}\n\ntgl_message_id_t *tgls_get_local_by_temp (struct tgl_state *TLS, int temp_id) {\n  struct tgl_message M;\n  M.temp_id = temp_id;\n  struct tgl_message *N = tree_lookup_temp_id (TLS->temp_id_tree, &M);\n  if (N) {\n    return &N->permanent_id;\n  } else {\n    return NULL;\n  }\n}\n\ntgl_message_id_t tgl_convert_temp_msg_id (struct tgl_state *TLS, tgl_message_id_t msg_id) {\n  struct tgl_message M;\n  M.temp_id = msg_id.id;\n  struct tgl_message *N = tree_lookup_temp_id (TLS->temp_id_tree, &M);\n  if (N) {\n    return N->permanent_id;\n  } else {\n    return msg_id;\n  }\n}\n\nvoid tgls_message_change_temp_id (struct tgl_state *TLS, struct tgl_message *M, int temp_id) {\n  if (M->temp_id == temp_id) { return; }\n  assert (!M->temp_id);\n  M->temp_id = temp_id;\n  TLS->temp_id_tree = tree_insert_temp_id (TLS->temp_id_tree, M, rand ());\n}\n\nvoid tgls_message_change_random_id (struct tgl_state *TLS, struct tgl_message *M, long long random_id) {\n  if (M->random_id == random_id) { return; }\n  assert (!M->random_id);\n  M->random_id = random_id;\n  TLS->random_id_tree = tree_insert_random_id (TLS->random_id_tree, M, rand ());\n}\n\nvoid tglm_message_del_temp_id (struct tgl_state *TLS, struct tgl_message *M) {\n  if (M->temp_id) {\n    TLS->temp_id_tree = tree_delete_temp_id (TLS->temp_id_tree, M);\n  }\n}\n\nvoid tglm_message_del_random_id (struct tgl_state *TLS, struct tgl_message *M) {\n  if (M->random_id) {\n    TLS->random_id_tree = tree_delete_random_id (TLS->random_id_tree, M);\n  }\n}\n"
  },
  {
    "path": "tg-mime-types.c",
    "content": "#include <string.h>\n#include <assert.h>\n#define MAX_MIME_TYPES_NUM 10000\n\n#include \"mime-types.c\"\n  \nstatic int mime_initialized;\nstatic int mime_type_number;\nstatic char *mime_type_names[MAX_MIME_TYPES_NUM];\nstatic char *mime_type_extensions[MAX_MIME_TYPES_NUM];\n\nstatic void mime_init (void) {\n  char *start = (char *)mime_types;\n  char *end = start + mime_types_len;\n  mime_initialized = 1;\n  char *c = start;\n  while (c < end) {\n    if (*c == '#') {\n      while (c < end && *c != '\\n') {\n        c ++;\n      }\n      if (c < end) {\n        c ++;\n      }\n    } else {\n      while (*c <= ' ' && *c != '\\n' && c < end) {\n        c ++;\n      }\n      assert (*c > ' ' && *c != '\\n' && c < end);\n      char *name = c;\n      while (*c > ' ' && *c != '\\n' && c < end) {\n        c ++;\n      }\n      assert (*c <= ' ' && *c != '\\n' && c < end);\n      *c = 0;\n      c ++;\n      while (1) {\n        while (*c <= ' ' && *c != '\\n' && c < end) {\n          c ++;\n        }\n        if (*c == '\\n' || c == end) { \n          if (*c == '\\n') { c ++; }\n          break; \n        }\n        char *ext = c;\n        while (*c > ' ' && *c != '\\n' && c < end) {\n          c ++;\n        }\n        assert (c != end);\n        int br = (*c == '\\n');\n        *c = 0;\n        c ++;\n        assert (mime_type_number < MAX_MIME_TYPES_NUM);\n        mime_type_names[mime_type_number] = name;\n        mime_type_extensions[mime_type_number] = ext;\n        mime_type_number ++;\n        if (br) { break; }\n      }\n    }\n  }\n}\n\nchar *tg_extension_by_mime (const char *mime_type) {\n  if (!mime_initialized) {\n    mime_init ();\n  }\n  int i;\n  for (i = 0; i < mime_type_number; i++) {\n    if (!strcmp (mime_type_names[i], mime_type)) {\n      return mime_type_extensions[i];\n    }\n  }\n  return NULL;\n}\n\nchar *tg_mime_by_filename (const char *filename) {\n  int l = strlen (filename);\n  const char *p = filename - 1 + l;\n  while (p >= filename && *p != '.') {\n    p --;\n  }\n  p ++;\n\n  if (!mime_initialized) {\n    mime_init ();\n  }\n\n  static char *def = \"application/octet-stream\";\n  if (strlen (p) > 10) {\n    return def;\n  }\n  static char s[11];\n  strcpy (s, p);\n  char *q = s;\n  while (*q) {\n    if (*q >= 'A' && *p <= 'Z') {\n      *q = *q + 'z' - 'Z';\n    }\n    q ++;\n  }\n  int i;\n  for (i = 0; i < mime_type_number; i++) {\n    if (!strcmp (mime_type_extensions[i], s)) {\n      return mime_type_names[i];\n    }\n  }\n  return def;\n}\n"
  },
  {
    "path": "tg-mime-types.h",
    "content": "char *tg_mime_by_filename (const char *filename);\nchar *tg_extension_by_mime (const char *mime_type);\n\n"
  },
  {
    "path": "tgl-binlog.h",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#ifndef __BINLOG_H__\n#define __BINLOG_H__\n\n//#include \"structures.h\"\n#include \"tgl.h\"\n#include \"auto/auto-types.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nvoid bl_do_dc_option (struct tgl_state *TLS, int flags, int id, const char *name, int l1, const char *ip, int l2, int port);\n\nvoid bl_do_set_working_dc (struct tgl_state *TLS, int num);\nvoid bl_do_dc_signed (struct tgl_state *TLS, int id);\nvoid bl_do_set_our_id (struct tgl_state *TLS, tgl_peer_id_t id);\nvoid bl_do_set_dh_params (struct tgl_state *TLS, int root, unsigned char prime[], int version);\n\nvoid bl_do_set_pts (struct tgl_state *TLS, int pts);\nvoid bl_do_set_qts (struct tgl_state *TLS, int qts);\nvoid bl_do_set_date (struct tgl_state *TLS, int date);\nvoid bl_do_set_seq (struct tgl_state *TLS, int seq);\nvoid bl_do_set_channel_pts (struct tgl_state *TLS, int id, int pts);\n\nvoid bl_do_set_auth_key (struct tgl_state *TLS, int num, unsigned char *buf);\n\nvoid bl_do_set_msg_id (struct tgl_state *TLS, struct tgl_message_id *old_id, struct tgl_message_id *new_id);\nvoid bl_do_message_delete (struct tgl_state *TLS, struct tgl_message_id *id);\n\nvoid bl_do_peer_delete (struct tgl_state *TLS, tgl_peer_id_t id);\n\nvoid bl_do_chat_add_user (struct tgl_state *TLS, tgl_peer_id_t id, int version, int user, int inviter, int date);\nvoid bl_do_chat_del_user (struct tgl_state *TLS, tgl_peer_id_t id, int version, int user);\n\nvoid bl_do_msg_update (struct tgl_state *TLS, struct tgl_message_id *id);\nvoid bl_do_reset_authorization (struct tgl_state *TLS);\n\n\nvoid bl_do_edit_message (struct tgl_state *TLS, struct tgl_message_id *id, tgl_peer_id_t *from_id, tgl_peer_id_t *to_id, tgl_peer_id_t *fwd_from_id, int *fwd_date, int *date, const char *message, int message_len, struct tl_ds_message_media *media, struct tl_ds_message_action *action, int *reply_id, struct tl_ds_reply_markup *reply_markup, struct tl_ds_vector *entities, int flags);\nvoid bl_do_edit_message_encr (struct tgl_state *TLS, struct tgl_message_id *id, tgl_peer_id_t *from_id, tgl_peer_id_t *to_id, int *date, const char *message, int message_len, struct tl_ds_decrypted_message_media *media, struct tl_ds_decrypted_message_action *action, struct tl_ds_encrypted_file *file, int flags);\nvoid bl_do_encr_chat_exchange (struct tgl_state *TLS, tgl_peer_id_t id, long long *exchange_id, const void *key, int *state);\nvoid bl_do_user (struct tgl_state *TLS, int id, long long *access_hash, const char *first_name, int first_name_len, const char *last_name, int last_name_len, const char *phone, int phone_len, const char *username, int username_len, struct tl_ds_photo *photo, struct tl_ds_user_profile_photo *profile_photo, int *last_read_in, int *last_read_out, struct tl_ds_bot_info *bot_info, int flags);\nvoid bl_do_chat (struct tgl_state *TLS, int id, const char *title, int title_len, int *user_num, int *date, int *version, struct tl_ds_vector *participants, struct tl_ds_chat_photo *chat_photo, struct tl_ds_photo *photo, int *admin, int *last_read_in, int *last_read_out, int flags);\nvoid bl_do_encr_chat (struct tgl_state *TLS, int id, long long *access_hash, int *date, int *admin, int *user_id, void *key, void *g_key, void *first_key_id, int *state, int *ttl, int *layer, int *in_seq_no, int *last_in_seq_no, int *out_seq_no, long long *key_fingerprint, int flags, const char *print_name, int print_name_len);\nvoid bl_do_channel (struct tgl_state *TLS, int id, long long *access_hash, int *date, const char *title, int title_len, const char *username, int username_len, struct tl_ds_chat_photo *chat_photo, struct tl_ds_photo *photo, int *version, char *about, int about_len, int *participants_count, int *admins_count, int *kicked_count, int *last_read_in, int flags);\nvoid bl_do_peer_delete (struct tgl_state *TLS, tgl_peer_id_t id);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "tgl-fetch.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n#ifndef __TGL_FETCH_H__\n#define __TGL_FETCH_H__\n#include \"tgl.h\"\n#include \"auto/auto-types.h\"\n\nstruct tgl_user *tglf_fetch_alloc_user (struct tgl_state *TLS, struct tl_ds_user *DS_U);\nstruct tgl_user *tglf_fetch_alloc_user_full (struct tgl_state *TLS, struct tl_ds_user_full *DS_U);\nstruct tgl_chat *tglf_fetch_alloc_chat (struct tgl_state *TLS, struct tl_ds_chat *DS_C);\nstruct tgl_chat *tglf_fetch_alloc_chat_full (struct tgl_state *TLS, struct tl_ds_messages_chat_full *DS_MCF);\nstruct tgl_channel *tglf_fetch_alloc_channel (struct tgl_state *TLS, struct tl_ds_chat *DS_C);\nstruct tgl_channel *tglf_fetch_alloc_channel_full (struct tgl_state *TLS, struct tl_ds_messages_chat_full *DS_MCF);\nstruct tgl_secret_chat *tglf_fetch_alloc_encrypted_chat (struct tgl_state *TLS, struct tl_ds_encrypted_chat *DS_EC);\nstruct tgl_message *tglf_fetch_alloc_message (struct tgl_state *TLS, struct tl_ds_message *DS_M, int *new_msg);\nstruct tgl_message *tglf_fetch_alloc_message_short_buf (struct tgl_state *TLS);\nstruct tgl_message *tglf_fetch_alloc_message_short_chat_buf (struct tgl_state *TLS);\nstruct tgl_message *tglf_fetch_alloc_encrypted_message (struct tgl_state *TLS, struct tl_ds_encrypted_message *DS_EM);\ntgl_peer_id_t tglf_fetch_peer_id (struct tgl_state *TLS, struct tl_ds_peer *DS_P);\nlong long tglf_fetch_user_photo (struct tgl_state *TLS, struct tgl_user *U, struct tl_ds_user_profile_photo *DS_UPP);\n\nvoid tglf_fetch_message_media (struct tgl_state *TLS, struct tgl_message_media *M, struct tl_ds_message_media *DS_MM);\nvoid tglf_fetch_message_action (struct tgl_state *TLS, struct tgl_message_action *M, struct tl_ds_message_action *DS_MA);\n//void tglf_fetch_chat_full (struct tgl_state *TLS, struct tgl_chat *C);\n\nvoid tglf_fetch_encrypted_message_file (struct tgl_state *TLS, struct tgl_message_media *M, struct tl_ds_encrypted_file *DS_EF);\nvoid tglf_fetch_message_media_encrypted (struct tgl_state *TLS, struct tgl_message_media *M, struct tl_ds_decrypted_message_media *DS_DMM);\nvoid tglf_fetch_message_action_encrypted (struct tgl_state *TLS, struct tgl_message_action *M, struct tl_ds_decrypted_message_action *DS_DMA);\nint tglf_fetch_user_status (struct tgl_state *TLS, struct tgl_user_status *S, struct tgl_user *U, struct tl_ds_user_status *DS_US);\nenum tgl_typing_status tglf_fetch_typing (struct tl_ds_send_message_action *DS_SMA);\nvoid tglf_fetch_chat_participants (struct tgl_state *TLS, struct tgl_chat *C, struct tl_ds_chat_participants *DS_CP);\nvoid tglf_fetch_int_array (int *dst, struct tl_ds_vector *src, int len);\nvoid tglf_fetch_int_tuple (int *dst, int **src, int len);\nint tglf_fetch_file_location (struct tgl_state *TLS, struct tgl_file_location *loc, struct tl_ds_file_location *DS_FL);\n\nvoid tglf_fetch_message_short (struct tgl_state *TLS, struct tgl_message *M, struct tl_ds_updates *DS_U);\nvoid tglf_fetch_message_short_chat (struct tgl_state *TLS, struct tgl_message *M, struct tl_ds_updates *DS_U);\n\nstruct tgl_message *tglf_fetch_alloc_message_short (struct tgl_state *TLS, struct tl_ds_updates *DS_U);\nstruct tgl_message *tglf_fetch_alloc_message_short_chat (struct tgl_state *TLS, struct tl_ds_updates *DS_U);\nstruct tgl_photo *tglf_fetch_alloc_photo (struct tgl_state *TLS, struct tl_ds_photo *DS_P);\nstruct tgl_bot_info *tglf_fetch_alloc_bot_info (struct tgl_state *TLS, struct tl_ds_bot_info *DS_BI);\nstruct tgl_message_reply_markup *tglf_fetch_alloc_reply_markup (struct tgl_state *TLS, struct tgl_message *M, struct tl_ds_reply_markup *DS_RM);\nvoid tglf_fetch_message_entities (struct tgl_state *TLS, struct tgl_message *M, struct tl_ds_vector *DS);\n#endif\n"
  },
  {
    "path": "tgl-inner.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n\n#ifndef __TGL_INNER_H__\n#define __TGL_INNER_H__\n\n#ifndef vlogprintf\n#define vlogprintf(verbosity_level,...) \\\n  do { \\\n    if (TLS->verbosity >= verbosity_level) { \\\n      TLS->callback.logprintf (__VA_ARGS__); \\\n    } \\\n  } while (0)\n#endif\n\n#endif\n"
  },
  {
    "path": "tgl-layout.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n#ifndef __TGL_LAYOUT_H__\n#define __TGL_LAYOUT_H__\n\n#define TGLDF_IMAGE 1\n#define TGLDF_STICKER 2\n#define TGLDF_ANIMATED 4\n#define TGLDF_AUDIO 8\n#define TGLDF_VIDEO 16\n\n#define TGLMF_UNREAD 1\n#define TGLMF_OUT 2\n#define TGLMF_DISABLE_PREVIEW 4\n#define TGLMF_MENTION 16\n#define TGLMF_CREATED (1 << 8)\n#define TGLMF_PENDING (1 << 9)\n#define TGLMF_DELETED (1 << 10)\n#define TGLMF_ENCRYPTED (1 << 11)\n#define TGLMF_EMPTY (1 << 12)\n#define TGLMF_SERVICE (1 << 13)\n#define TGLMF_SESSION_OUTBOUND (1 << 14)\n#define TGLMF_POST_AS_CHANNEL (1 << 8)\n#define TGLMF_HTML (1 << 9)\n\n#define TGLMF_CREATE 0x10000\n\n\n#define TGLPF_CREATED (1 << 0)\n#define TGLPF_CREATE 0x80000000\n#define TGLPF_HAS_PHOTO (1 << 1)\n#define TGLPF_DELETED (1 << 2)\n#define TGLPF_OFFICIAL (1 << 3)\n#define TGLPF_KICKED (1 << 4)\n#define TGLPF_ADMIN (1 << 5)\n#define TGLPF_CREATOR (1 << 6)\n#define TGLPF_LEFT (1 << 7)\n#define TGLPF_DEACTIVATED (1 << 8)\n\n#define TGLUF_CONTACT (1 << 16)\n#define TGLUF_MUTUAL_CONTACT (1 << 17)\n#define TGLUF_BLOCKED (1 << 18)\n#define TGLUF_SELF (1 << 19)\n#define TGLUF_CREATED TGLPF_CREATED\n#define TGLUF_DELETED TGLPF_DELETED\n#define TGLUF_HAS_PHOTO TGLPF_HAS_PHOTO\n#define TGLUF_CREATE TGLPF_CREATE\n#define TGLUF_BOT (1 << 20)\n#define TGLUF_OFFICIAL TGLPF_OFFICIAL\n\n#define TGLUF_TYPE_MASK \\\n  (TGLUF_CONTACT | TGLUF_MUTUAL_CONTACT | TGLUF_BLOCKED | TGLUF_SELF | TGLUF_CREATED | TGLUF_DELETED | TGLUF_OFFICIAL)\n\n#define TGLCF_CREATED TGLPF_CREATED\n#define TGLCF_CREATE TGLPF_CREATE\n#define TGLCF_HAS_PHOTO TGLPF_HAS_PHOTO\n#define TGLCF_KICKED TGLPF_KICKED\n#define TGLCF_CREATOR TGLPF_CREATOR\n#define TGLCF_ADMIN TGLPF_ADMIN\n#define TGLCF_OFFICIAL TGLPF_OFFICIAL\n#define TGLCF_LEFT TGLPF_LEFT\n#define TGLCF_DEACTIVATED TGLPF_DEACTIVATED\n#define TGLCF_ADMINS_ENABLED (1 << 16)\n\n#define TGLCF_TYPE_MASK \\\n  (TGLCF_CREATED | TGLCF_KICKED | TGLCF_CREATOR | TGLCF_ADMIN | TGLCF_OFFICIAL | TGLCF_LEFT | TGLCF_DEACTIVATED | TGLCF_ADMINS_ENABLED)\n\n#define TGLECF_CREATED TGLPF_CREATED\n#define TGLECF_CREATE TGLPF_CREATE\n#define TGLECF_HAS_PHOTO TGLPF_HAS_PHOTO\n#define TGLECF_KICKED TGLPF_KICKED\n#define TGLECF_CREATOR TGLPF_CREATOR\n#define TGLECF_ADMIN TGLPF_ADMIN\n\n#define TGLECF_TYPE_MASK \\\n  (TGLECF_CREATED | TGLECF_KICKED | TGLECF_CREATOR | TGLECF_ADMIN)\n\n#define TGLCHF_CREATED TGLPF_CREATED\n#define TGLCHF_CREATE TGLPF_CREATE\n#define TGLCHF_HAS_PHOTO TGLPF_HAS_PHOTO\n#define TGLCHF_KICKED TGLPF_KICKED\n#define TGLCHF_CREATOR TGLPF_CREATOR\n#define TGLCHF_ADMIN TGLPF_ADMIN\n#define TGLCHF_OFFICIAL TGLPF_OFFICIAL\n#define TGLCHF_LEFT TGLPF_LEFT\n#define TGLCHF_DEACTIVATED TGLPF_DEACTIVATED\n#define TGLCHF_BROADCAST (1 << 16)\n#define TGLCHF_EDITOR (1 << 17)\n#define TGLCHF_MODERATOR (1 << 18)\n#define TGLCHF_MEGAGROUP (1 << 19)\n\n#define TGLCHF_TYPE_MASK \\\n  (TGLCHF_CREATED | TGLCHF_KICKED | TGLCHF_CREATOR | TGLCHF_ADMIN | TGLCHF_OFFICIAL | TGLCHF_LEFT | TGLCHF_DEACTIVATED | TGLCHF_BROADCAST | TGLCHF_EDITOR | TGLCHF_MODERATOR | TGLCHF_MEGAGROUP)\n\n\n#define TGLCHF_DIFF 0x20000000\n\n#define TGL_FLAGS_UNCHANGED 0x40000000\n\n#define TGLDCF_AUTHORIZED 1\n#define TGLDCF_LOGGED_IN 8\n\n#define TGL_PERMANENT_ID_SIZE 24\n#pragma pack(push,4)\n\ntypedef struct { \n  int peer_type; \n  int peer_id; \n  long long access_hash;\n} tgl_peer_id_t;\n\nenum tgl_dc_state {\n  st_init,\n  st_reqpq_sent,\n  st_reqdh_sent,\n  st_client_dh_sent,\n  st_init_temp,\n  st_reqpq_sent_temp,\n  st_reqdh_sent_temp,\n  st_client_dh_sent_temp,\n  st_authorized,\n  st_error\n};\n\n#define MAX_DC_SESSIONS 3\n\nstruct tgl_session {\n  struct tgl_dc *dc;\n  long long session_id;\n  long long last_msg_id;\n  int seq_no;\n  int received_messages;\n  struct connection *c;\n  struct tree_long *ack_tree;\n  struct tgl_timer *ev;\n};\n\nstruct tgl_dc_option {\n  struct tgl_dc_option *next;\n  char *ip;\n  int port;\n};\n\nstruct tgl_dc {\n  int id;\n  //int port;\n  int flags;\n  int rsa_key_idx;\n  enum tgl_dc_state state;\n  //char *ip;\n  //char *user;\n  struct tgl_session *sessions[MAX_DC_SESSIONS];\n  char auth_key[256];\n  char temp_auth_key[256];\n  char nonce[256];\n  char new_nonce[256];\n  char server_nonce[256];\n  long long auth_key_id;\n  long long temp_auth_key_id;\n  long long temp_auth_key_bind_query_id;\n\n  long long server_salt;\n  struct tgl_timer *ev;\n\n  int server_time_delta;\n  double server_time_udelta;\n\n  // ipv4, ipv6, ipv4_media, ipv6_media\n  struct tgl_dc_option *options[4];\n};\n\nenum tgl_message_entity_type {\ntgl_message_entity_unknown,\ntgl_message_entity_mention,\ntgl_message_entity_hashtag,\ntgl_message_entity_bot_command,\ntgl_message_entity_url,\ntgl_message_entity_email,\ntgl_message_entity_bold,\ntgl_message_entity_italic,\ntgl_message_entity_code,\ntgl_message_entity_pre,\ntgl_message_entity_text_url\n};\n\nstruct tgl_message_entity {\n  enum tgl_message_entity_type type;\n  int start;\n  int length;\n  char *extra;\n};\n\nenum tgl_message_media_type {\n  tgl_message_media_none,\n  tgl_message_media_photo,\n  tgl_message_media_document,\n  tgl_message_media_geo,\n  tgl_message_media_contact,\n  tgl_message_media_unsupported,\n  //tgl_message_media_photo_encr,\n  //tgl_message_media_video_encr,\n  //tgl_message_media_audio_encr,\n  tgl_message_media_document_encr,\n  tgl_message_media_webpage,\n  tgl_message_media_venue,\n  tgl_message_media_video,\n  tgl_message_media_audio\n};\n\nenum tgl_message_action_type {\n  tgl_message_action_none,\n  tgl_message_action_geo_chat_create,\n  tgl_message_action_geo_chat_checkin,\n  tgl_message_action_chat_create,\n  tgl_message_action_chat_edit_title,\n  tgl_message_action_chat_edit_photo,\n  tgl_message_action_chat_delete_photo,\n  tgl_message_action_chat_add_users,\n  tgl_message_action_chat_add_user_by_link,\n  tgl_message_action_chat_delete_user,\n  tgl_message_action_set_message_ttl,\n  tgl_message_action_read_messages,\n  tgl_message_action_delete_messages,\n  tgl_message_action_screenshot_messages,\n  tgl_message_action_flush_history,\n  tgl_message_action_resend,\n  tgl_message_action_notify_layer,\n  tgl_message_action_typing,\n  tgl_message_action_noop,\n  tgl_message_action_commit_key,\n  tgl_message_action_abort_key,\n  tgl_message_action_request_key,\n  tgl_message_action_accept_key,\n  tgl_message_action_channel_create,\n  tgl_message_action_migrated_to,\n  tgl_message_action_migrated_from\n};\n\nenum tgl_typing_status {\n  tgl_typing_none,\n  tgl_typing_typing,\n  tgl_typing_cancel,\n  tgl_typing_record_video,\n  tgl_typing_upload_video,\n  tgl_typing_record_audio,\n  tgl_typing_upload_audio,\n  tgl_typing_upload_photo,\n  tgl_typing_upload_document,\n  tgl_typing_geo,\n  tgl_typing_choose_contact\n};\n\nstruct tgl_file_location {\n  int dc;\n  long long volume;\n  int local_id;\n  long long secret;\n};\n\nstruct tgl_photo_size {\n  char *type;\n  struct tgl_file_location loc;\n  int w;\n  int h;\n  int size;\n  char *data;\n};\n\nstruct tgl_geo {\n  double longitude;\n  double latitude;\n};\n\nstruct tgl_photo {\n  long long id;\n  long long access_hash;\n  int refcnt;\n  //int user_id;\n  int date;\n  char *caption;\n  //struct tgl_geo geo;\n  int sizes_num;\n  struct tgl_photo_size *sizes;\n};\n\nstruct tgl_encr_document {\n  long long id;\n  long long access_hash;\n  int refcnt;\n\n  int dc_id;\n  int size;\n  int key_fingerprint;\n  int flags;\n  \n  unsigned char *key;\n  unsigned char *iv;\n  int w;\n  int h;\n  char *caption;\n  char *mime_type;\n  int duration;\n};\n\n\nstruct tgl_user_status {\n  int online;\n  int when;\n  struct tgl_timer *ev;\n};\n\nstruct tgl_bot_command {\n  char *command;\n  char *description;\n};\n\nstruct tgl_bot_info {\n  int version;\n  char *share_text;\n  char *description;\n  int commands_num;\n  struct tgl_bot_command *commands;\n};\n\nstruct tgl_user {\n  tgl_peer_id_t id;\n  int flags;\n  struct tgl_message *last;\n  char *print_name;\n  char *username;\n  int structure_version;\n  struct tgl_file_location photo_big;\n  struct tgl_file_location photo_small;\n  int last_read_in;\n  int last_read_out;\n  long long photo_id;\n  struct tgl_photo *photo;\n  void *extra;\n  char *first_name;\n  char *last_name;\n  char *phone;\n  long long access_hash;\n  struct tgl_user_status status;\n  int blocked;\n  char *real_first_name;\n  char *real_last_name;\n\n  struct tgl_bot_info *bot_info;\n};\n\nstruct tgl_channel {\n  tgl_peer_id_t id;\n  int flags;\n  struct tgl_message *last;\n  char *print_title;\n  char *username;\n  int structure_version;\n  struct tgl_file_location photo_big;\n  struct tgl_file_location photo_small;\n  int last_read_in;\n  int last_read_out;\n  long long photo_id;\n  struct tgl_photo *photo;\n  void *extra;\n\n  long long access_hash;\n  int date;\n  char *title;\n  int version;\n  char *about;\n  int participants_count;\n  int admins_count;\n  int kicked_count;\n\n  int pts;\n};\n\nstruct tgl_chat_user {\n  int user_id;\n  int inviter_id;\n  int date;\n};\n\nstruct tgl_chat {\n  tgl_peer_id_t id;\n  int flags;\n  struct tgl_message *last;\n  char *print_title;\n  char *username;\n  int structure_version;\n  struct tgl_file_location photo_big;\n  struct tgl_file_location photo_small;\n  int last_read_in;\n  int last_read_out;\n  long long pad;\n  struct tgl_photo *photo;\n  void *extra;\n  char *title;\n  int users_num;\n  int user_list_size;\n  int user_list_version;\n  struct tgl_chat_user *user_list;\n  int date;\n  int version;\n  int admin_id;\n};\n\nenum tgl_secret_chat_state {\n  sc_none,\n  sc_waiting,\n  sc_request,\n  sc_ok,\n  sc_deleted\n};\n\nenum tgl_secret_chat_exchange_state {\n  tgl_sce_none,\n  tgl_sce_requested,\n  tgl_sce_accepted,\n  tgl_sce_committed,\n  tgl_sce_confirmed,\n  tgl_sce_aborted\n};\n\nstruct tgl_secret_chat {\n  tgl_peer_id_t id;\n  int flags;\n  struct tgl_message *last;\n  char *print_name;\n  char *username;\n  int structure_version;\n  struct tgl_file_location photo_big;\n  struct tgl_file_location photo_small;\n  int pad1;\n  int pad2;\n  long long pad;\n  struct tgl_photo *photo;\n  void *extra;\n  int user_id;\n  int admin_id;\n  int date;\n  int ttl;\n  int layer;\n  int in_seq_no;\n  int out_seq_no;\n  int last_in_seq_no;\n  long long access_hash;\n  unsigned char *g_key;\n\n  enum tgl_secret_chat_state state;\n  int key[64];\n  long long key_fingerprint;\n  unsigned char first_key_sha[20];\n\n  long long exchange_id;\n  enum tgl_secret_chat_exchange_state exchange_state;\n  int exchange_key[64];\n  long long exchange_key_fingerprint;\n};\n\ntypedef union tgl_peer {\n  struct {\n    tgl_peer_id_t id;\n    int flags;\n    struct tgl_message *last;\n    char *print_name;\n    char *username;\n    int structure_version;\n    struct tgl_file_location photo_big;\n    struct tgl_file_location photo_small;\n    struct tgl_photo *photo;\n    int last_read_in;\n    int last_read_out;\n    long long photo_id;\n    void *extra;\n  };\n  struct tgl_user user;\n  struct tgl_chat chat;\n  struct tgl_channel channel;\n  struct tgl_secret_chat encr_chat;\n} tgl_peer_t;\n\nstruct tgl_document {\n  long long id;\n  long long access_hash;\n  int refcnt;\n  //int user_id;\n  int date;\n  int size;\n  int dc_id;\n  struct tgl_photo_size thumb;\n  char *caption;\n  char *mime_type;\n\n  int w;\n  int h;\n  int flags;\n  int duration;\n};\n\nstruct tgl_message_action {\n  enum tgl_message_action_type type;\n  union {\n    struct {\n      char *title;\n      int user_num;\n      int *users;\n    };\n    char *new_title;\n    struct tgl_photo *photo;\n    int user;\n    int ttl;\n    int layer;\n    int read_cnt;\n    int delete_cnt;\n    int screenshot_cnt;\n    enum tgl_typing_status typing;\n    struct {\n      int start_seq_no;\n      int end_seq_no;\n    };\n    struct {\n      unsigned char *g_a;\n      long long exchange_id;\n      long long key_fingerprint;\n    };\n  };\n};\n\n\nstruct tgl_webpage {\n  long long id;\n  int refcnt;\n  char *url;\n  char *display_url;\n  char *type;\n  char *site_name;\n  char *title;\n  char *description;\n  struct tgl_photo *photo;\n  char *embed_url;\n  char *embed_type;\n  int embed_width;\n  int embed_height;\n  int duration;\n  char *author;\n};\n\nstruct tgl_message_media {\n  enum tgl_message_media_type type;\n  union {\n    struct {\n      union {\n        struct tgl_photo *photo;\n        struct tgl_document *document;\n      };\n      char *caption;\n    };\n    \n    struct tgl_encr_document *encr_document;\n    struct tgl_webpage *webpage;\n\n    struct tgl_geo geo;\n    struct {\n      char *phone;\n      char *first_name;\n      char *last_name;\n      int user_id;\n    };\n    \n    struct {\n      void *data;\n      int data_size;\n    };\n    struct {\n      struct tgl_geo geo;\n      char *title;\n      char *address;\n      char *provider;\n      char *venue_id;\n    } venue;\n  };\n};\n\nstruct tgl_message_reply_markup {\n  int refcnt;\n  int flags;\n  int rows;\n  int *row_start;\n  char **buttons;\n};\n\ntypedef struct tgl_message_id {\n  unsigned peer_type;\n  unsigned peer_id;\n  long long id;\n  long long access_hash;\n} tgl_message_id_t;\n\nstruct tgl_message {\n  struct tgl_message *next_use, *prev_use;\n  struct tgl_message *next, *prev;\n  int temp_id;\n  long long server_id;\n  long long random_id;\n  struct tgl_message_id permanent_id;\n  int flags;\n  tgl_peer_id_t fwd_from_id;\n  int fwd_date;\n  int reply_id;\n  tgl_peer_id_t from_id;\n  tgl_peer_id_t to_id;\n  int date;\n  struct tgl_message_reply_markup *reply_markup;\n  int entities_num;\n  struct tgl_message_entity *entities;\n  union {\n    struct tgl_message_action action;\n    struct {\n      char *message;\n      int message_len;\n      struct tgl_message_media media;\n    };\n  };\n};\n#pragma pack(pop)\n#endif\n"
  },
  {
    "path": "tgl-methods-in.h",
    "content": "// normally you should not use these methods \n// use them with caution\n\n\n#ifndef __TGL_METHODS_IN_H__\n#define __TGL_METHODS_IN_H__\n\n/* {{{ AUTHORIZATION METHODS. NORMALLY YOU DON'T NEED THEM */\n\n// send query to updated DCs' ips\n// automatically renews data on update\nvoid tgl_do_help_get_config (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// requests server to send code to specified phone number\n// if user is logged in elsewhere message will first appear as telegram message\n// and SMS will be sent some time after\nvoid tgl_do_send_code (struct tgl_state *TLS, const char *phone, int phone_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int registered, const char *hash), void *callback_extra);\n\n// request server to send code via phone call\nvoid tgl_do_phone_call (struct tgl_state *TLS, const char *phone, int phone_len, const char *hash, int hash_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// sends code from SMS to server. This step should end authorization, unless user have password\nint tgl_do_send_code_result (struct tgl_state *TLS, const char *phone, int phone_len, const char *hash, int hash_len, const char *code, int code_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *Self), void *callback_extra);\n\n\n// sends code from SMS, username and lastname to server. This step should end new user registration\nint tgl_do_send_code_result_auth (struct tgl_state *TLS, const char *phone, int phone_len, const char *hash, int hash_len, const char *code, int code_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *Self), void *callback_extra);\n\n/* }}} */\n\nvoid tgl_do_send_msg (struct tgl_state *TLS, struct tgl_message *M, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\nvoid tgl_do_check_password (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *extra, int success), void *callback_extra);\n\nvoid tgl_do_export_auth (struct tgl_state *TLS, int num, void (*callback) (struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_create_secret_chat (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra);\n\nvoid tgl_do_get_difference (struct tgl_state *TLS, int sync_from_start, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_lookup_state (struct tgl_state *TLS);\n\nvoid tgl_do_help_get_config_dc (struct tgl_state *TLS, struct tgl_dc *D, void (*callback)(struct tgl_state *TLS, void *, int), void *callback_extra);\n\nvoid tgl_do_request_exchange (struct tgl_state *TLS, struct tgl_secret_chat *E);\n\nvoid tgl_do_create_keys_end (struct tgl_state *TLS, struct tgl_secret_chat *U);\n\nvoid tgl_do_send_encr_chat_layer (struct tgl_state *TLS, struct tgl_secret_chat *E);\n#endif\n"
  },
  {
    "path": "tgl-net-inner.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#ifndef __NET_H__\n#define __NET_H__\n\nstruct connection_buffer {\n  unsigned char *start;\n  unsigned char *end;\n  unsigned char *rptr;\n  unsigned char *wptr;\n  struct connection_buffer *next;\n};\n\nenum conn_state {\n  conn_none,\n  conn_connecting,\n  conn_ready,\n  conn_failed,\n  conn_stopped\n};\n\nstruct connection {\n  int fd;\n  char *ip;\n  int port;\n  int flags;\n  enum conn_state state;\n  int ipv6[4];\n  struct connection_buffer *in_head;\n  struct connection_buffer *in_tail;\n  struct connection_buffer *out_head;\n  struct connection_buffer *out_tail;\n  int in_bytes;\n  int out_bytes;\n  int packet_num;\n  int out_packet_num;\n  int last_connect_time;\n  int in_fail_timer;\n  struct mtproto_methods *methods;\n  struct tgl_state *TLS;\n  struct tgl_session *session;\n  struct tgl_dc *dc;\n  void *extra;\n  struct event *ping_ev;\n  struct event *fail_ev;\n  struct event *read_ev;\n  struct event *write_ev;\n  double last_receive_time;\n};\n\n//extern struct connection *Connections[];\n\nint tgln_write_out (struct connection *c, const void *data, int len);\nvoid tgln_flush_out (struct connection *c);\nint tgln_read_in (struct connection *c, void *data, int len);\nint tgln_read_in_lookup (struct connection *c, void *data, int len);\n\n//void tgln_insert_msg_id (struct tgl_session *S, long long id);\n\nextern struct tgl_net_methods tgl_conn_methods;\n\n//void create_all_outbound_connections (void);\n\n//struct connection *create_connection (const char *host, int port, struct tgl_session *session, struct connection_methods *methods);\n//struct tgl_dc *tgln_alloc_dc (int id, char *ip, int port);\n//void tgln_dc_create_session (struct tgl_dc *DC, struct mtproto_methods *methods);\nstruct connection *tgln_create_connection (struct tgl_state *TLS, const char *host, int port, struct tgl_session *session, struct tgl_dc *dc, struct mtproto_methods *methods);\n\n#define GET_DC(c) (c->session->dc)\n#endif\n"
  },
  {
    "path": "tgl-net.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define _GNU_SOURCE\n#include <string.h>\n#include <stdlib.h>\n#include <assert.h>\n#include <sys/types.h>\n#include <netdb.h>\n#include <netinet/in.h>\n#include <netinet/tcp.h>\n#include <fcntl.h>\n#include <sys/socket.h>\n#include <errno.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <poll.h>\n#include \"crypto/rand.h\"\n#include <arpa/inet.h>\n#ifdef EVENT_V2\n#include <event2/event.h>\n#else\n#include <event.h>\n#include \"event-old.h\"\n#endif\n#include <sys/time.h>\n#include <time.h>\n\n#include \"tgl-net-inner.h\"\n#include \"tgl-net.h\"\n#include \"tgl.h\"\n#include \"tgl-inner.h\"\n//#include \"mtproto-client.h\"\n//#include \"mtproto-common.h\"\n#include \"tree.h\"\n#include \"tools.h\"\n#include \"mtproto-client.h\"\n\n#ifndef POLLRDHUP\n#define POLLRDHUP 0\n#endif\n\n//double get_utime (int clock_id);\n\n//extern struct mtproto_methods auth_methods;\n\nstatic void fail_connection (struct connection *c);\n\n#define PING_TIMEOUT 10\n\nstatic void start_ping_timer (struct connection *c);\nstatic void ping_alarm (evutil_socket_t fd, short what, void *arg) {\n  struct connection *c = arg;\n  struct tgl_state *TLS = c->TLS;\n  vlogprintf (E_DEBUG + 2,\"ping alarm\\n\");\n  assert (c->state == conn_ready || c->state == conn_connecting);\n  if (tglt_get_double_time () - c->last_receive_time > 6 * PING_TIMEOUT) {\n    vlogprintf (E_WARNING, \"fail connection: reason: ping timeout\\n\");\n    c->state = conn_failed;\n    fail_connection (c);\n  } else if (tglt_get_double_time () - c->last_receive_time > 3 * PING_TIMEOUT && c->state == conn_ready) {\n    tgl_do_send_ping (c->TLS, c);\n    start_ping_timer (c);\n  } else {\n    start_ping_timer (c);\n  }\n}\n\nstatic void stop_ping_timer (struct connection *c) {\n  event_del (c->ping_ev);\n}\n\nstatic void start_ping_timer (struct connection *c) {\n  static struct timeval ptimeout = { PING_TIMEOUT, 0};\n  event_add (c->ping_ev, &ptimeout);\n}\n\nstatic void restart_connection (struct connection *c);\n\nstatic void fail_alarm (evutil_socket_t fd, short what, void *arg) {\n  struct connection *c = arg;\n  c->in_fail_timer = 0;\n  restart_connection (c);\n}\n\nstatic void start_fail_timer (struct connection *c) {\n  if (c->in_fail_timer) { return; }\n  c->in_fail_timer = 1;  \n\n  static struct timeval ptimeout = { 10, 0};\n  event_add (c->fail_ev, &ptimeout);\n}\n\nstatic struct connection_buffer *new_connection_buffer (int size) {\n  struct connection_buffer *b = talloc0 (sizeof (*b));\n  b->start = talloc (size);\n  b->end = b->start + size;\n  b->rptr = b->wptr = b->start;\n  return b;\n}\n\nstatic void delete_connection_buffer (struct connection_buffer *b) {\n  tfree (b->start, b->end - b->start);\n  tfree (b, sizeof (*b));\n}\n\nint tgln_write_out (struct connection *c, const void *_data, int len) {\n  struct tgl_state *TLS = c->TLS;\n  vlogprintf (E_DEBUG, \"write_out: %d bytes\\n\", len);\n  const unsigned char *data = _data;\n  if (!len) { return 0; }\n  assert (len > 0);\n  int x = 0;\n  if (!c->out_bytes) {\n    event_add (c->write_ev, 0);\n  }\n  if (!c->out_head) {\n    struct connection_buffer *b = new_connection_buffer (1 << 20);\n    c->out_head = c->out_tail = b;\n  }\n  while (len) {\n    if (c->out_tail->end - c->out_tail->wptr >= len) {\n      memcpy (c->out_tail->wptr, data, len);\n      c->out_tail->wptr += len;\n      c->out_bytes += len;\n      return x + len;\n    } else {\n      int y = c->out_tail->end - c->out_tail->wptr;\n      assert (y < len);\n      memcpy (c->out_tail->wptr, data, y);\n      x += y;\n      len -= y;\n      data += y;\n      struct connection_buffer *b = new_connection_buffer (1 << 20);\n      c->out_tail->next = b;\n      b->next = 0;\n      c->out_tail = b;\n      c->out_bytes += y;\n    }\n  }\n  return x;\n}\n\nint tgln_read_in (struct connection *c, void *_data, int len) {\n  unsigned char *data = _data;\n  if (!len) { return 0; }\n  assert (len > 0);\n  if (len > c->in_bytes) {\n    len = c->in_bytes;\n  }\n  int x = 0;\n  while (len) {\n    int y = c->in_head->wptr - c->in_head->rptr;\n    if (y > len) {\n      memcpy (data, c->in_head->rptr, len);\n      c->in_head->rptr += len;\n      c->in_bytes -= len;\n      return x + len;\n    } else {\n      memcpy (data, c->in_head->rptr, y);\n      c->in_bytes -= y;\n      x += y;\n      data += y;\n      len -= y;\n      void *old = c->in_head;\n      c->in_head = c->in_head->next;\n      if (!c->in_head) {\n        c->in_tail = 0;\n      }\n      delete_connection_buffer (old);\n    }\n  }\n  return x;\n}\n\nint tgln_read_in_lookup (struct connection *c, void *_data, int len) {\n  unsigned char *data = _data;\n  if (!len || !c->in_bytes) { return 0; }\n  assert (len > 0);\n  if (len > c->in_bytes) {\n    len = c->in_bytes;\n  }\n  int x = 0;\n  struct connection_buffer *b = c->in_head;\n  while (len) {\n    int y = b->wptr - b->rptr;\n    if (y >= len) {\n      memcpy (data, b->rptr, len);\n      return x + len;\n    } else {\n      memcpy (data, b->rptr, y);\n      x += y;\n      data += y;\n      len -= y;\n      b = b->next;\n    }\n  }\n  return x;\n}\n\nvoid tgln_flush_out (struct connection *c) {\n}\n\n#define MAX_CONNECTIONS 100\nstatic struct connection *Connections[MAX_CONNECTIONS];\nstatic int max_connection_fd;\n\nstatic void rotate_port (struct connection *c) {\n  switch (c->port) {\n  case 443:\n    c->port = 80;\n    break;\n  case 80:\n    c->port = 25;\n    break;\n  case 25:\n    c->port = 443;\n    break;\n  }\n}\n\nstatic void try_read (struct connection *c);\nstatic void try_write (struct connection *c);\n\nstatic void conn_try_read (evutil_socket_t fd, short what, void *arg) {\n  struct connection *c = arg;\n  struct tgl_state *TLS = c->TLS;\n  vlogprintf (E_DEBUG + 1, \"Try read. Fd = %d\\n\", c->fd);\n  try_read (c);\n}\nstatic void conn_try_write (evutil_socket_t fd, short what, void *arg) {\n  struct connection *c = arg;\n  struct tgl_state *TLS = c->TLS;\n  if (c->state == conn_connecting) {\n    c->state = conn_ready;\n    c->methods->ready (TLS, c);\n  }\n  try_write (c);\n  if (c->out_bytes) {\n    event_add (c->write_ev, 0);\n  }\n}\n  \nstatic int my_connect (struct connection *c, const char *host) {\n  struct tgl_state *TLS = c->TLS;\n  int v6 = TLS->ipv6_enabled;\n  int fd = socket (v6 ? AF_INET6 : AF_INET, SOCK_STREAM, 0);\n  if (fd < 0) {\n    vlogprintf (E_ERROR, \"Can not create socket: %s\\n\", strerror(errno));\n    start_fail_timer (c);\n    return -1;\n  }\n  assert (fd >= 0 && fd < MAX_CONNECTIONS);\n  if (fd > max_connection_fd) {\n    max_connection_fd = fd;\n  }\n  int flags = -1;\n  setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof (flags));\n  setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &flags, sizeof (flags));\n  setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags));\n\n  struct sockaddr_in addr;\n  struct sockaddr_in6 addr6;\n  memset (&addr, 0, sizeof (addr));\n  memset (&addr6, 0, sizeof (addr6));\n  if (v6) {\n    addr6.sin6_family = AF_INET6; \n    addr6.sin6_port = htons (c->port);\n    if (inet_pton (AF_INET6, host, &addr6.sin6_addr.s6_addr) != 1) {    \n      vlogprintf (E_ERROR, \"Bad ipv6 %s\\n\", host);\n      close (fd);\n      return -1;\n    }\n  } else {\n    addr.sin_family = AF_INET; \n    addr.sin_port = htons (c->port);\n    if (inet_pton (AF_INET, host, &addr.sin_addr.s_addr) != 1) {\n      vlogprintf (E_ERROR, \"Bad ipv4 %s\\n\", host);\n      close (fd);\n      return -1;\n    }\n  }\n\n  fcntl (fd, F_SETFL, O_NONBLOCK);\n\n  if (connect (fd, (struct sockaddr *) (v6 ? (void *)&addr6 : (void *)&addr), v6 ? sizeof (addr6) : sizeof (addr)) == -1) {\n    if (errno != EINPROGRESS) {\n      close (fd);\n      return -1;\n    }\n  }\n  return fd;\n}\n\nstruct connection *tgln_create_connection (struct tgl_state *TLS, const char *host, int port, struct tgl_session *session, struct tgl_dc *dc, struct mtproto_methods *methods) {\n  struct connection *c = talloc0 (sizeof (*c));\n  c->TLS = TLS;\n  c->ip = tstrdup (host);\n  c->port = port;\n  \n  int fd = my_connect (c, c->ip);\n  if (fd < 0) {\n    vlogprintf (E_ERROR, \"Can not connect to %s:%d %s\\n\", host, port, strerror(errno));\n    tfree (c, sizeof (*c));\n    return 0;\n  }\n\n  c->fd = fd;\n  c->state = conn_connecting;\n  c->last_receive_time = tglt_get_double_time ();\n  c->flags = 0;\n  assert (!Connections[fd]);\n  Connections[fd] = c;\n \n  c->ping_ev = evtimer_new (TLS->ev_base, ping_alarm, c);\n  c->fail_ev = evtimer_new (TLS->ev_base, fail_alarm, c);\n  c->write_ev = event_new (TLS->ev_base, c->fd, EV_WRITE, conn_try_write, c);\n\n  struct timeval tv = {5, 0};\n  c->read_ev = event_new (TLS->ev_base, c->fd, EV_READ | EV_PERSIST, conn_try_read, c);\n  event_add (c->read_ev, &tv);\n\n  start_ping_timer (c);\n\n  c->dc = dc;\n  c->session = session;\n  c->methods = methods;\n\n  char byte = 0xef;\n  assert (tgln_write_out (c, &byte, 1) == 1);\n  tgln_flush_out (c);\n\n  return c;\n}\n\nstatic void restart_connection (struct connection *c) {\n  struct tgl_state *TLS = c->TLS;\n  if (c->last_connect_time == time (0)) {\n    start_fail_timer (c);\n    return;\n  }\n  \n  /*if (strcmp (c->ip, c->dc->ip)) {\n    tfree_str (c->ip);\n    c->ip = tstrdup (c->dc->ip);\n  }*/\n  c->last_connect_time = time (0);\n  int fd = my_connect (c, c->ip);\n  if (fd < 0) {\n    vlogprintf (E_WARNING, \"Can not connect to %s:%d %s\\n\", c->ip, c->port, strerror(errno));\n    start_fail_timer (c);\n    return;\n  }\n\n  c->fd = fd;\n  c->state = conn_connecting;\n  c->last_receive_time = tglt_get_double_time ();\n  start_ping_timer (c);\n  Connections[fd] = c;\n  \n  c->write_ev = event_new (TLS->ev_base, c->fd, EV_WRITE, conn_try_write, c);\n\n  struct timeval tv = {5, 0};\n  c->read_ev = event_new (TLS->ev_base, c->fd, EV_READ | EV_PERSIST, conn_try_read, c);\n  event_add (c->read_ev, &tv);\n  \n  char byte = 0xef;\n  assert (tgln_write_out (c, &byte, 1) == 1);\n  tgln_flush_out (c);\n}\n\nstatic void fail_connection (struct connection *c) {\n  struct tgl_state *TLS = c->TLS;\n  if (c->state == conn_ready || c->state == conn_connecting) {\n    stop_ping_timer (c);\n  }\n  event_free (c->write_ev);\n  event_free (c->read_ev);\n  \n  rotate_port (c);\n  struct connection_buffer *b = c->out_head;\n  while (b) {\n    struct connection_buffer *d = b;\n    b = b->next;\n    delete_connection_buffer (d);\n  }\n  b = c->in_head;\n  while (b) {\n    struct connection_buffer *d = b;\n    b = b->next;\n    delete_connection_buffer (d);\n  }\n  c->out_head = c->out_tail = c->in_head = c->in_tail = 0;\n  c->state = conn_failed;\n  c->out_bytes = c->in_bytes = 0;\n  close (c->fd);\n  Connections[c->fd] = 0;\n  vlogprintf (E_NOTICE, \"Lost connection to server... %s:%d\\n\", c->ip, c->port);\n  restart_connection (c);\n}\n\n//extern FILE *log_net_f;\nstatic void try_write (struct connection *c) {\n  struct tgl_state *TLS = c->TLS;\n  vlogprintf (E_DEBUG, \"try write: fd = %d\\n\", c->fd);\n  int x = 0;\n  while (c->out_head) {\n    int r = write (c->fd, c->out_head->rptr, c->out_head->wptr - c->out_head->rptr);\n    if (r >= 0) {\n      x += r;\n      c->out_head->rptr += r;\n      if (c->out_head->rptr != c->out_head->wptr) {\n        break;\n      }\n      struct connection_buffer *b = c->out_head;\n      c->out_head = b->next;\n      if (!c->out_head) {\n        c->out_tail = 0;\n      }\n      delete_connection_buffer (b);\n    } else {\n      if (errno != EAGAIN && errno != EWOULDBLOCK) {\n        vlogprintf (E_NOTICE, \"fail_connection: write_error %s\\n\", strerror(errno));\n        fail_connection (c);\n        return;\n      } else {\n        break;\n      }\n    }\n  }\n  vlogprintf (E_DEBUG, \"Sent %d bytes to %d\\n\", x, c->fd);\n  c->out_bytes -= x;\n}\n\nstatic void try_rpc_read (struct connection *c) {\n  assert (c->in_head);\n  struct tgl_state *TLS = c->TLS;\n\n  while (1) {\n    if (c->in_bytes < 1) { return; }\n    unsigned len = 0;\n    unsigned t = 0;\n    assert (tgln_read_in_lookup (c, &len, 1) == 1);\n    if (len >= 1 && len <= 0x7e) {\n      if (c->in_bytes < (int)(1 + 4 * len)) { return; }\n    } else {\n      if (c->in_bytes < 4) { return; }\n      assert (tgln_read_in_lookup (c, &len, 4) == 4);\n      len = (len >> 8);\n      if (c->in_bytes < (int)(4 + 4 * len)) { return; }\n      len = 0x7f;\n    }\n\n    if (len >= 1 && len <= 0x7e) {\n      assert (tgln_read_in (c, &t, 1) == 1);    \n      assert (t == len);\n      assert (len >= 1);\n    } else {\n      assert (len == 0x7f);\n      assert (tgln_read_in (c, &len, 4) == 4);\n      len = (len >> 8);\n      assert (len >= 1);\n    }\n    len *= 4;\n    int op;\n    assert (tgln_read_in_lookup (c, &op, 4) == 4);\n    if (c->methods->execute (TLS, c, op, len) < 0) {\n      return;\n    }\n  }\n}\n\nstatic void try_read (struct connection *c) {\n  struct tgl_state *TLS = c->TLS;\n  vlogprintf (E_DEBUG, \"try read: fd = %d\\n\", c->fd);\n  if (!c->in_tail) {\n    c->in_head = c->in_tail = new_connection_buffer (1 << 20);\n  }\n  #ifdef EVENT_V1\n    struct timeval tv = {5, 0};\n    event_add (c->read_ev, &tv);\n  #endif\n  int x = 0;\n  while (1) {\n    int r = read (c->fd, c->in_tail->wptr, c->in_tail->end - c->in_tail->wptr);\n    if (r > 0) {\n      c->last_receive_time = tglt_get_double_time ();\n      stop_ping_timer (c);\n      start_ping_timer (c);\n    }\n    if (r >= 0) {\n      c->in_tail->wptr += r;\n      x += r;\n      if (c->in_tail->wptr != c->in_tail->end) {\n        break;\n      }\n      struct connection_buffer *b = new_connection_buffer (1 << 20);\n      c->in_tail->next = b;\n      c->in_tail = b;\n    } else {\n      if (errno != EAGAIN && errno != EWOULDBLOCK) {\n        vlogprintf (E_NOTICE, \"fail_connection: read_error %s\\n\", strerror(errno));\n        fail_connection (c);\n        return;\n      } else {\n        break;\n      }\n    }\n  }\n  vlogprintf (E_DEBUG, \"Received %d bytes from %d\\n\", x, c->fd);\n  c->in_bytes += x;\n  if (x) {\n    try_rpc_read (c);\n  }\n}\n\nstatic void incr_out_packet_num (struct connection *c) {\n  c->out_packet_num ++;\n}\n\nstatic struct tgl_dc *get_dc (struct connection *c) {\n  return c->dc;\n}\n\nstatic struct tgl_session *get_session (struct connection *c) {\n  return c->session;\n}\n\nstatic void tgln_free (struct connection *c) {\n  if (c->ip) { tfree_str (c->ip); }\n  if (c->ping_ev) { event_free (c->ping_ev); }\n  if (c->fail_ev) { event_free (c->fail_ev); }\n  if (c->read_ev) { event_free (c->read_ev); }\n  if (c->write_ev) { event_free (c->write_ev); }\n\n  struct connection_buffer *b = c->out_head;\n  while (b) {\n    struct connection_buffer *d = b;\n    b = b->next;\n    delete_connection_buffer (d);\n  }\n  b = c->in_head;\n  while (b) {\n    struct connection_buffer *d = b;\n    b = b->next;\n    delete_connection_buffer (d);\n  }\n\n  if (c->fd >= 0) { Connections[c->fd] = 0; close (c->fd); }\n  tfree (c, sizeof (*c));\n}\n\nstruct tgl_net_methods tgl_conn_methods = {\n  .write_out = tgln_write_out,\n  .read_in = tgln_read_in,\n  .read_in_lookup = tgln_read_in_lookup,\n  .flush_out = tgln_flush_out,\n  .incr_out_packet_num = incr_out_packet_num,\n  .get_dc = get_dc,\n  .get_session = get_session,\n  .create_connection = tgln_create_connection,\n  .free = tgln_free\n};\n"
  },
  {
    "path": "tgl-net.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#ifndef __NET_H__\n#define __NET_H__\n\nextern struct tgl_net_methods tgl_conn_methods;\n#endif\n"
  },
  {
    "path": "tgl-queries.h",
    "content": "#ifndef __TGL_QUERIES_H__\n#define __TGL_QUERIES_H__\n\n#include \"tgl.h\"\n\nvoid tgl_do_get_terms_of_service (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *ans), void *callback_extra);\n\n/* {{{ WORK WITH ACCOUNT */\n// sets account password\n// user will be requested to type his current password and new password (twice)\nvoid tgl_do_set_password (struct tgl_state *TLS, const char *hint, int hint_len, void (*callback)(struct tgl_state *TLS, void *extra, int success), void *extra);\n\nvoid tgl_do_set_phone_number (struct tgl_state *TLS, const char *phonenumber, int phonenumber_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n/* }}} */\n\n/* {{{ SENDING MESSAGES */\n\nstruct tl_ds_reply_markup;\n\n// send plain text message to peer id\n// flags is combination of TGL_SEND_MSG_FLAG_*\n// reply markup can be NULL\nvoid tgl_do_send_message (struct tgl_state *TLS, tgl_peer_id_t peer_id, const char *text, int text_len, unsigned long long flags, struct tl_ds_reply_markup *reply_markup, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// sends plain text reply on message *reply_id*\n// message *reply_id* should be cached\nvoid tgl_do_reply_message (struct tgl_state *TLS, tgl_message_id_t *msg_id, const char *text, int text_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// sends contents of text file *file_name* as plain text message\nvoid tgl_do_send_text (struct tgl_state *TLS, tgl_peer_id_t peer_id, const char *file_name, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\nvoid tgl_do_reply_text (struct tgl_state *TLS, tgl_message_id_t *msg_id, const char *file_name, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// send media from file *file_name* to peer *to_id*\n// if reply > 0 this message is sent as reply to message *reply*\n// *caption* is used only for photos\nvoid tgl_do_send_document (struct tgl_state *TLS, tgl_peer_id_t to_id, const char *file_name, const char *caption, int caption_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\nvoid tgl_do_reply_document (struct tgl_state *TLS, tgl_message_id_t *msg_id, const char *file_name, const char *caption, int caption_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// forward message *msg_id* to peer *id*\n// message can not be encrypted and peer can not be secret chat\nvoid tgl_do_forward_message (struct tgl_state *TLS, tgl_user_or_chat_id_t id, tgl_message_id_t *msg_id, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// forward messages *ids* to peer *id*\n// messages can not be encrypted and peer can not be secret chat\nvoid tgl_do_forward_messages (struct tgl_state *TLS, tgl_user_or_chat_id_t id, int size, const tgl_message_id_t *msg_ids[], unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int count, struct tgl_message *ML[]), void *callback_extra);\n\n// sends contact to another user.\n// This contact may be or may not be telegram user\nvoid tgl_do_send_contact (struct tgl_state *TLS, tgl_peer_id_t id, const char *phone, int phone_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// reply on message *reply_id* with contact\nvoid tgl_do_reply_contact (struct tgl_state *TLS, tgl_message_id_t *reply_id, const char *phone, int phone_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// sends media from message *msg_id* to another dialog\n// a bit different from forwarding message with media\n// secret message media can be forwarded to secret chats\n// and non-secret - to non-secret chats and users\nvoid tgl_do_forward_media (struct tgl_state *TLS, tgl_peer_id_t id, tgl_message_id_t *msg_id, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// sends location to chat *id*\nvoid tgl_do_send_location (struct tgl_state *TLS, tgl_peer_id_t id, double latitude, double longitude, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// replies on message *reply_id* with location\nvoid tgl_do_reply_location (struct tgl_state *TLS, tgl_message_id_t *reply_id, double latitude, double longitude, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// sends broadcast (i.e. message to several users at once)\n// flags are same as in tgl_do_send_message\nvoid tgl_do_send_broadcast (struct tgl_state *TLS, int num, tgl_user_id_t id[], const char *text, int text_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *extra, int success, int num, struct tgl_message *ML[]), void *callback_extra);\n\n/* }}} */\n\n/* {{{ EDITING SELF PROFILE */\n// sets self profile photo\n// server will cut central square from this photo\nvoid tgl_do_set_profile_photo (struct tgl_state *TLS, const char *file_name, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// rename self account\nvoid tgl_do_set_profile_name (struct tgl_state *TLS, const char *first_name, int first_name_len, const char *last_name, int last_name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra);\n\n// sets self username\nvoid tgl_do_set_username (struct tgl_state *TLS, const char *username, int username_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra);\n\n// updates online/offline status\nvoid tgl_do_update_status (struct tgl_state *TLS, int online, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// exports card. This card can be later be used by another user to add you to dialog list.\nvoid tgl_do_export_card (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, int *card), void *callback_extra);\n/* }}} */\n\n/* {{{ WORKING WITH GROUP CHATS */\n\n// sets chat photo\n// server will cut central square from this photo\nvoid tgl_do_set_chat_photo (struct tgl_state *TLS, tgl_chat_id_t chat_id, const char *file_name, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// sets chat title\nvoid tgl_do_rename_chat (struct tgl_state *TLS, tgl_chat_id_t id, const char *new_title, int new_title_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// requests full info about chat *id*.\n// if *offline_mode* is set no actual query is sent\nvoid tgl_do_get_chat_info (struct tgl_state *TLS, tgl_chat_id_t id, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_chat *C), void *callback_extra);\n\n// adds user *id* to chat *chat_id*\n// sends *limit* last messages from this chat to user\nvoid tgl_do_add_user_to_chat (struct tgl_state *TLS, tgl_chat_id_t chat_id, tgl_user_id_t id, int limit, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// deleted user *id* from chat *chat_id*\n// you can do it if you are admin (=creator) of chat or if you invited this user or if it is yourself\nvoid tgl_do_del_user_from_chat (struct tgl_state *TLS, tgl_chat_id_t chat_id, tgl_user_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// creates group chat with users ids\n// there should be at least one user other then you in chat\nvoid tgl_do_create_group_chat (struct tgl_state *TLS, int users_num, tgl_user_id_t ids[], const char *chat_topic, int chat_topic_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// receives invitation link to this chat\n// only chat admin can create one\n// prevoius link invalidated, if existed\nvoid tgl_do_export_chat_link (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *link), void *callback_extra);\n\n// joins to secret chat by link (or hash of this link)\nvoid tgl_do_import_chat_link (struct tgl_state *TLS, const char *link, int link_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// upgrades chat to channel. \nvoid tgl_do_upgrade_group (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n/* }}} */\n\n/* {{{ WORKING WITH USERS */\n\n// requests full info about user *id*.\n// if *offline_mode* is set no actual query is sent\nvoid tgl_do_get_user_info (struct tgl_state *TLS, tgl_user_id_t id, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra);\n\n// adds contact to contact list by phone number\n// user will be named  *first_name* *last_name* in contact list\n// force should be set to 0\nvoid tgl_do_add_contact (struct tgl_state *TLS, const char *phone, int phone_len, const char *first_name, int first_name_len, const char *last_name, int last_name_len, int force, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *users[]), void *callback_extra);\n\n// deletes user *id* from contact list\nvoid tgl_do_del_contact (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// imports card exported by another user\nvoid tgl_do_import_card (struct tgl_state *TLS, int size, int *card, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *U), void *callback_extra);\n\n// blocks user\nvoid tgl_do_block_user (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// unblocks blocked user\nvoid tgl_do_unblock_user (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n/* }}} */\n\n/* {{{ WORKING WITH SECRET CHATS */\n\n// requests creation of secret chat with user *user_id*\n//void tgl_do_create_encr_chat_request (struct tgl_state *TLS, int user_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra);\n\n// accepts secret chat request\n// method can fail if another device will be first to accept it\nvoid tgl_do_accept_encr_chat_request (struct tgl_state *TLS, struct tgl_secret_chat *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra);\n\n// sets ttl of secret chat\nvoid tgl_do_set_encr_chat_ttl (struct tgl_state *TLS, struct tgl_secret_chat *E, int ttl, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n// returns secret chat fingerprint\nint tgl_do_visualize_key (struct tgl_state *TLS, tgl_secret_chat_id_t id, unsigned char buf[16]);\n\n// requests creation of secret chat with user id\nvoid tgl_do_create_secret_chat (struct tgl_state *TLS, tgl_user_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra);\n\n// cancel a working secret chat\nvoid tgl_do_discard_secret_chat (struct tgl_state *TLS, struct tgl_secret_chat *E, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_secret_chat *E), void *callback_extra);\n\n/* }}} */\n\n/* {{{ WORKING WITH CHANNELS */\nvoid tgl_do_get_channels_dialog_list (struct tgl_state *TLS, int limit, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]), void *callback_extra);\n\nvoid tgl_do_get_channel_info (struct tgl_state *TLS, tgl_peer_id_t id, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_channel *C), void *callback_extra);\n\nvoid tgl_do_rename_channel (struct tgl_state *TLS, tgl_peer_id_t id, const char *name, int name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_set_channel_photo (struct tgl_state *TLS, tgl_peer_id_t chat_id, const char *file_name, void (*callback)(struct tgl_state *TLS,void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_channel_set_about (struct tgl_state *TLS, tgl_peer_id_t id, const char *about, int about_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_create_channel (struct tgl_state *TLS, int users_num, tgl_peer_id_t ids[], const char *chat_topic, int chat_topic_len, const char *about, int about_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_channel_set_username (struct tgl_state *TLS, tgl_peer_id_t id, const char *username, int username_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_join_channel (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_leave_channel (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_channel_invite_user (struct tgl_state *TLS, tgl_peer_id_t channel_id, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_channel_kick_user (struct tgl_state *TLS, tgl_peer_id_t channel_id, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_export_channel_link (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *link), void *callback_extra);\n\n// type:\n//   0 - none\n//   1 - moderator\n//   2 - editor\n//   3 - kicked\nvoid tgl_do_channel_set_admin (struct tgl_state *TLS, tgl_peer_id_t channel_id, tgl_peer_id_t user_id, int type, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nvoid tgl_do_channel_get_members  (struct tgl_state *TLS, tgl_peer_id_t channel_id, int limit, int offset, int type, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *UL[]), void *callback_extra);\n/* }}} */\n\n/* {{{ WORKING WITH DIALOG LIST */\n\n// receives all dialogs (except secret chats) from offset=*offset* with limit=*limit*\n// dialogs are sorted by last message received\n// if limit is > 100 there is a (small) chance of one dialog received twice\nvoid tgl_do_get_dialog_list (struct tgl_state *TLS, int limit, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]), void *callback_extra);\n\n// resolves username\nvoid tgl_do_contact_search (struct tgl_state *TLS, const char *name, int name_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, tgl_peer_t *U), void *callback_extra);\n\n// requests contact list\nvoid tgl_do_update_contact_list (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_user *contacts[]), void *callback_extra);\n\n/* }}} */\n\n/* {{{ WORKING WITH ONE DIALOG */\n\n// marks all inbound messages from peer id as read\nvoid tgl_do_mark_read (struct tgl_state *TLS, tgl_peer_id_t id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// extended mark read\nvoid tgl_do_messages_mark_read (struct tgl_state *TLS, tgl_peer_id_t id, int max_id, int offset, void (*callback)(struct tgl_state *TLS, void *callback_extra, int), void *callback_extra);\n\n// requests last *limit* from offset *offset* (offset = 0 means most recent) messages from dialog with peer id\n// if offline_mode=1 then no actual query is sent\n// only locally cached messages returned\n// also marks messages from this chat as read\nvoid tgl_do_get_history (struct tgl_state *TLS, tgl_peer_id_t id, int offset, int limit, int offline_mode, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra);\n\n// sends typing event to chat\n// set status=tgl_typing_typing for default typing event\nvoid tgl_do_send_typing (struct tgl_state *TLS, tgl_peer_id_t id, enum tgl_typing_status status, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n/* }}} */\n\n/* {{{ WORKING WITH MEDIA */\n\n// loads photo/document/document_thumb to downloads directory\n// if file is presented it is not redownloaded (but if it is shortened tail will be downloaded)\n// returns file name in callback\nvoid tgl_do_load_photo (struct tgl_state *TLS, struct tgl_photo *photo, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\nvoid tgl_do_load_encr_document (struct tgl_state *TLS, struct tgl_encr_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\nvoid tgl_do_load_document (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\nvoid tgl_do_load_video (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\nvoid tgl_do_load_audio (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\nvoid tgl_do_load_audio (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\nvoid tgl_do_load_document_thumb (struct tgl_state *TLS, struct tgl_document *video, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\n\n// loads file by location. Use only for small files!\nvoid tgl_do_load_file_location (struct tgl_state *TLS, struct tgl_file_location *FL, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);\n\n/* }}} */\n\n\n/* {{{ ANOTHER MESSAGES FUNCTIONS */\n// search messages with ids *from* .. *to* in dialog id\n// id type of id is UNKNOWN uses global search (in all dialogs) instead\n// if *from* or *to* is means *from*=0 and *to*=+INF\n// return up to *limit* entries from offset=*offset*\nvoid tgl_do_msg_search (struct tgl_state *TLS, tgl_user_or_chat_id_t id, int from, int to, int limit, int offset, const char *query, int query_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, struct tgl_message *list[]), void *callback_extra);\n\n// deletes message *id*\nvoid tgl_do_delete_msg (struct tgl_state *TLS, tgl_message_id_t *msg_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\n// gets message by *id*\nvoid tgl_do_get_message (struct tgl_state *TLS, tgl_message_id_t *msg_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra);\n\n/* }}} */\n\n\n/* {{{ EXTENDED QUERIES USE WITH CAUTION */\n//#ifndef DISABLE_EXTF\n// sends query with extended text syntax\n// use only for debug or when you known what are you doing\n// since answer is not interpreted by library in any way\nvoid tgl_do_send_extf (struct tgl_state *TLS, const char *data, int data_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *data), void *callback_extra);\nint tglf_extf_autocomplete (struct tgl_state *TLS, const char *text, int text_len, int index, char **R, char *data, int data_len);\nstruct paramed_type *tglf_extf_store (struct tgl_state *TLS, const char *data, int data_len);\nchar *tglf_extf_fetch (struct tgl_state *TLS, struct paramed_type *T);\n//#endif\n/* }}} */\n\n/* {{{ BOT */\nvoid tgl_do_start_bot (struct tgl_state *TLS, tgl_peer_id_t bot, tgl_peer_id_t chat, const char *str, int str_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n/* }}} */\n\n#endif\n"
  },
  {
    "path": "tgl-structures.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#ifndef __STRUCTURES_H__\n#define __STRUCTURES_H__\n\n#include <assert.h>\n#include \"tgl-layout.h\"\n#include \"tgl-fetch.h\"\n#include \"tgl.h\"\n\nchar *tgls_default_create_print_name (struct tgl_state *TLS, tgl_peer_id_t id, const char *a1, const char *a2, const char *a3, const char *a4);\n\n\nvoid tgls_free_user (struct tgl_state *TLS, struct tgl_user *U);\nvoid tgls_free_chat (struct tgl_state *TLS, struct tgl_chat *U);\nvoid tgls_free_photo (struct tgl_state *TLS, struct tgl_photo *P);\nvoid tgls_free_message (struct tgl_state *TLS, struct tgl_message *M);\nvoid tgls_free_bot_info (struct tgl_state *TLS, struct tgl_bot_info *B);\nvoid tgls_clear_message (struct tgl_state *TLS, struct tgl_message *M);\n\nstruct tgl_message *tglm_message_alloc (struct tgl_state *TLS, tgl_message_id_t *id);\nvoid tglm_message_insert_tree (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_update_message_id (struct tgl_state *TLS, struct tgl_message *M, long long id);\nvoid tglm_message_insert (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_insert_unsent (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_remove_unsent (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_send_all_unsent (struct tgl_state *TLS);\nvoid tglm_message_remove_tree (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_add_peer (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_del_peer (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_del_use (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_add_use (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_del_temp_id (struct tgl_state *TLS, struct tgl_message *M);\nvoid tglm_message_del_random_id (struct tgl_state *TLS, struct tgl_message *M);\n\nvoid tglp_peer_insert_name (struct tgl_state *TLS, tgl_peer_t *P);\nvoid tglp_peer_delete_name (struct tgl_state *TLS, tgl_peer_t *P);\nvoid tglp_insert_encrypted_chat (struct tgl_state *TLS, tgl_peer_t *P);\nvoid tglp_insert_user (struct tgl_state *TLS, tgl_peer_t *P);\nvoid tglp_insert_chat (struct tgl_state *TLS, tgl_peer_t *P);\nvoid tglp_insert_channel (struct tgl_state *TLS, tgl_peer_t *P);\n//enum tgl_typing_status tglf_fetch_typing_buf (void);\nvoid tgls_messages_mark_read (struct tgl_state *TLS, struct tgl_message *M, int out, int seq);\n\n//void tgls_insert_random2local (struct tgl_state *TLS, long long random_id, tgl_message_id_t *local_id);\n//void tgls_insert_temp2local (struct tgl_state *TLS, int temp_id, tgl_message_id_t *local_id);\ntgl_message_id_t *tgls_get_local_by_random (struct tgl_state *TLS, long long random_id);\ntgl_message_id_t *tgls_get_local_by_temp (struct tgl_state *TLS, int temp_id);\n\n\nvoid tgls_message_change_temp_id (struct tgl_state *TLS, struct tgl_message *M, int temp_id);\nvoid tgls_message_change_random_id (struct tgl_state *TLS, struct tgl_message *M, long long random_id);\n\n\nvoid tgl_photo_insert (struct tgl_state *TLS, struct tgl_photo *P);\nstruct tgl_photo *tgl_photo_get (struct tgl_state *TLS, long long id);\nstruct tgl_document *tgl_document_get (struct tgl_state *TLS, long long id);\nvoid tgl_document_insert (struct tgl_state *TLS, struct tgl_document *P);\nstruct tgl_webpage *tgl_webpage_get (struct tgl_state *TLS, long long id);\nvoid tgl_webpage_insert (struct tgl_state *TLS, struct tgl_webpage *P);\n\ntgl_message_id_t tgl_convert_temp_msg_id (struct tgl_state *TLS, tgl_message_id_t msg_id);\n\nstatic inline tgl_peer_id_t tgl_msg_id_to_peer_id (tgl_message_id_t msg_id) {\n  tgl_peer_id_t id;\n  id.peer_type = msg_id.peer_type;\n  id.peer_id = msg_id.peer_id;\n  id.access_hash = msg_id.access_hash;\n  return id;\n}\n\nstatic inline tgl_message_id_t tgl_peer_id_to_msg_id (tgl_peer_id_t peer_id, long long msg_id) {\n  tgl_message_id_t id;\n  id.peer_type = peer_id.peer_type;\n  id.peer_id = peer_id.peer_id;\n  id.access_hash = peer_id.access_hash;\n  id.id = msg_id;\n  return id;\n}\n\nstatic inline tgl_message_id_t tgl_peer_id_to_random_msg_id (tgl_peer_id_t peer_id) {\n  long long id;\n  tglt_secure_random (&id, 8);\n  return tgl_peer_id_to_msg_id (peer_id, id);\n}\n#endif\n"
  },
  {
    "path": "tgl-timers.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#include \"config.h\"\n#ifdef EVENT_V2\n#include <event2/event.h>\n#include <event2/bufferevent.h>\n#include <event2/buffer.h>\n#else\n#include <event.h>\n#include \"event-old.h\"\n#endif\n\n#include \"tgl.h\"\n#include <stdlib.h>\n\nstatic void timer_alarm (evutil_socket_t fd, short what, void *arg) {\n  void **p = arg;\n  ((void (*)(struct tgl_state *, void *))p[1]) (p[0], p[2]);\n}\n\nstruct tgl_timer *tgl_timer_alloc (struct tgl_state *TLS, void (*cb)(struct tgl_state *TLS, void *arg), void *arg) {\n  void **p = malloc (sizeof (void *) * 3);\n  p[0] = TLS;\n  p[1] = cb;\n  p[2] = arg;\n  return (void *)evtimer_new (TLS->ev_base, timer_alarm, p);\n}\n\nvoid tgl_timer_insert (struct tgl_timer *t, double p) {\n  if (p < 0) { p = 0; }\n  double e = p - (int)p;\n  if (e < 0) { e = 0; }\n  struct timeval pv = { (int)p, (int)(e * 1e6)};\n  event_add ((void *)t, &pv);\n}\n\nvoid tgl_timer_delete (struct tgl_timer *t) {\n  event_del ((void *)t);\n}\n\nvoid tgl_timer_free (struct tgl_timer *t) {\n  void *arg = event_get_callback_arg ((void *)t);\n  free (arg);\n  event_free ((void *)t);\n}\n\nstruct tgl_timer_methods tgl_libevent_timers = {\n  .alloc = tgl_timer_alloc, \n  .insert = tgl_timer_insert,\n  .remove = tgl_timer_delete,\n  .free = tgl_timer_free\n};\n"
  },
  {
    "path": "tgl-timers.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifndef __TGL_TIMERS_H__\n#define __TGL_TIMERS_H__\n\n#include \"tgl.h\"\nextern struct tgl_timer_methods tgl_libevent_timers;\n\n#endif\n"
  },
  {
    "path": "tgl.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"crypto/rsa_pem.h\"\n#include \"tgl.h\"\n#include \"tools.h\"\n#include \"mtproto-client.h\"\n#include \"tgl-structures.h\"\n//#include \"net.h\"\n\n#include <assert.h>\n\nstruct tgl_state tgl_state;\n\n    \nvoid tgl_set_binlog_mode (struct tgl_state *TLS, int mode) {\n  TLS->binlog_enabled = mode;\n}\n\nvoid tgl_set_binlog_path (struct tgl_state *TLS, const char *path) {\n  TLS->binlog_name = tstrdup (path);\n}\n    \nvoid tgl_set_auth_file_path (struct tgl_state *TLS, const char *path) {\n  TLS->auth_file = tstrdup (path);\n}\n\nvoid tgl_set_download_directory (struct tgl_state *TLS, const char *path) {\n  if (TLS->downloads_directory) {\n    tfree_str (TLS->downloads_directory);\n  }\n  TLS->downloads_directory = tstrdup (path);\n}\n\nvoid tgl_set_callback (struct tgl_state *TLS, struct tgl_update_callback *cb) {\n  TLS->callback = *cb;\n}\n\nvoid tgl_set_rsa_key (struct tgl_state *TLS, const char *key) {\n  assert (TLS->rsa_key_num < TGL_MAX_RSA_KEYS_NUM);\n  TLS->rsa_key_list[TLS->rsa_key_num ++] = tstrdup (key);\n}\n\nvoid tgl_set_rsa_key_direct (struct tgl_state *TLS, unsigned long e, int n_bytes, const unsigned char *n) {\n  assert (TLS->rsa_key_num < TGL_MAX_RSA_KEYS_NUM);\n  TLS->rsa_key_list[TLS->rsa_key_num] = NULL;\n  TLS->rsa_key_loaded[TLS->rsa_key_num] = TGLC_rsa_new (e, n_bytes, n);\n  TLS->rsa_key_num ++;\n}\n\nint tgl_init (struct tgl_state *TLS) {\n  assert (TLS->timer_methods);\n  assert (TLS->net_methods);\n  if (!TLS->callback.create_print_name) {\n    TLS->callback.create_print_name = tgls_default_create_print_name;\n  }\n  if (!TLS->temp_key_expire_time) {\n    TLS->temp_key_expire_time = 100000;\n  }\n\n  TLS->message_list.next_use = &TLS->message_list;\n  TLS->message_list.prev_use = &TLS->message_list;\n\n  if (tglmp_on_start (TLS) < 0) {\n    return -1;\n  }\n  \n  if (!TLS->app_id) {\n    TLS->app_id = TG_APP_ID;\n    TLS->app_hash = tstrdup (TG_APP_HASH);\n  }\n  return 0;\n}\n\nint tgl_authorized_dc (struct tgl_state *TLS, struct tgl_dc *DC) {\n  assert (DC);\n  return (DC->flags & 4) != 0;//DC->auth_key_id;\n}\n\nint tgl_signed_dc (struct tgl_state *TLS, struct tgl_dc *DC) {\n  assert (DC);\n  return (DC->flags & TGLDCF_LOGGED_IN) != 0;\n}\n\nvoid tgl_register_app_id (struct tgl_state *TLS, int app_id, const char *app_hash) {\n  TLS->app_id = app_id;\n  TLS->app_hash = tstrdup (app_hash);\n}\n\nstruct tgl_state *tgl_state_alloc (void) {\n  return (struct tgl_state *)talloc0 (sizeof (struct tgl_state));\n}\n\nvoid tgl_incr_verbosity (struct tgl_state *TLS) {\n  TLS->verbosity ++;\n}\n\nvoid tgl_set_verbosity (struct tgl_state *TLS, int val) {\n  TLS->verbosity = val;\n}\n\nvoid tgl_enable_pfs (struct tgl_state *TLS) {\n  TLS->enable_pfs = 1;\n}\n\nvoid tgl_set_test_mode (struct tgl_state *TLS) {\n  TLS->test_mode ++;\n}\n\nvoid tgl_set_net_methods (struct tgl_state *TLS, struct tgl_net_methods *methods) {\n  TLS->net_methods = methods;\n}\n\nvoid tgl_set_timer_methods (struct tgl_state *TLS, struct tgl_timer_methods *methods) {\n  TLS->timer_methods = methods;\n}\n\nvoid tgl_set_ev_base (struct tgl_state *TLS, void *ev_base) {\n  TLS->ev_base = ev_base;\n}\n\nvoid tgl_set_app_version (struct tgl_state *TLS, const char *app_version) {\n  if (TLS->app_version) {\n    tfree_str (TLS->app_version);\n  }\n  TLS->app_version = tstrdup (app_version);\n}\n\nvoid tgl_enable_ipv6 (struct tgl_state *TLS) {\n  TLS->ipv6_enabled = 1;\n}\n\nvoid tgl_disable_link_preview (struct tgl_state *TLS) {\n  TLS->disable_link_preview = 1;\n}\n\nvoid tgl_enable_bot (struct tgl_state *TLS) {\n  TLS->is_bot = 1;\n}\n"
  },
  {
    "path": "tgl.h",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2014-2015\n*/\n#ifndef __TGL_H__\n#define __TGL_H__\n\n#include \"crypto/bn.h\"\n#include \"tgl-layout.h\"\n#include <string.h>\n#include <stdlib.h>\n\n#define TGL_MAX_DC_NUM 100\n#define TG_SERVER_1 \"149.154.175.50\"\n#define TG_SERVER_2 \"149.154.167.51\"\n#define TG_SERVER_3 \"149.154.175.100\"\n#define TG_SERVER_4 \"149.154.167.91\"\n#define TG_SERVER_5 \"149.154.171.5\"\n#define TG_SERVER_IPV6_1 \"2001:b28:f23d:f001::a\"\n#define TG_SERVER_IPV6_2 \"2001:67c:4e8:f002::a\"\n#define TG_SERVER_IPV6_3 \"2001:b28:f23d:f003::a\"\n#define TG_SERVER_IPV6_4 \"2001:67c:4e8:f004::a\"\n#define TG_SERVER_IPV6_5 \"2001:b28:f23f:f005::a\"\n#define TG_SERVER_DEFAULT 2\n\n#define TG_SERVER_TEST_1 \"149.154.175.10\"\n#define TG_SERVER_TEST_2 \"149.154.167.40\"\n#define TG_SERVER_TEST_3 \"149.154.175.117\"\n#define TG_SERVER_TEST_IPV6_1 \"2001:b28:f23d:f001::e\"\n#define TG_SERVER_TEST_IPV6_2 \"2001:67c:4e8:f002::e\"\n#define TG_SERVER_TEST_IPV6_3 \"2001:b28:f23d:f003::e\"\n#define TG_SERVER_TEST_DEFAULT 2\n\n#define TGL_VERSION \"2.1.0\"\n\n#define TGL_ENCRYPTED_LAYER 17\n#define TGL_SCHEME_LAYER 45\n\nstruct connection;\nstruct mtproto_methods;\nstruct tgl_session;\nstruct tgl_dc;\n\n#define TGL_UPDATE_CREATED 1\n#define TGL_UPDATE_DELETED 2\n#define TGL_UPDATE_PHONE 4\n#define TGL_UPDATE_CONTACT 8\n#define TGL_UPDATE_PHOTO 16\n#define TGL_UPDATE_BLOCKED 32\n#define TGL_UPDATE_REAL_NAME 64\n#define TGL_UPDATE_NAME 128\n#define TGL_UPDATE_REQUESTED 256\n#define TGL_UPDATE_WORKING 512\n#define TGL_UPDATE_FLAGS 1024\n#define TGL_UPDATE_TITLE 2048\n#define TGL_UPDATE_ADMIN 4096\n#define TGL_UPDATE_MEMBERS 8192\n#define TGL_UPDATE_ACCESS_HASH 16384\n#define TGL_UPDATE_USERNAME (1 << 15)\n\n/*struct tgl_allocator {\n  void *(*alloc)(size_t size);\n  void *(*realloc)(void *ptr, size_t old_size, size_t size);\n  void (*free)(void *ptr, int size);\n  void (*check)(void);\n  void (*exists)(void *ptr, int size);\n};*/\nstruct tgl_allocator;\nextern struct tgl_allocator tgl_allocator_release;\nextern struct tgl_allocator tgl_allocator_debug;\nstruct tgl_state;\n\nenum tgl_value_type {\n    tgl_phone_number,           // user phone number\n    tgl_code,                   // telegram login code, or 'call' for phone call request\n    tgl_register_info,          // \"Y/n\" register?, first name, last name\n    tgl_new_password,           // new pass, confirm new pass\n    tgl_cur_and_new_password,   // curr pass, new pass, confirm new pass\n    tgl_cur_password,           // current pass\n    tgl_bot_hash\n};\n\nstruct tgl_update_callback {\n  void (*new_msg)(struct tgl_state *TLS, struct tgl_message *M);\n  void (*marked_read)(struct tgl_state *TLS, int num, struct tgl_message *list[]);\n  void (*logprintf)(const char *format, ...)  __attribute__ ((format (__printf__, 1, 2)));\n  void (*get_values)(struct tgl_state *TLS, enum tgl_value_type type, const char *prompt, int num_values,\n          void (*callback)(struct tgl_state *TLS, const char *string[], void *arg), void *arg);\n  void (*logged_in)(struct tgl_state *TLS);\n  void (*started)(struct tgl_state *TLS);\n  void (*type_notification)(struct tgl_state *TLS, struct tgl_user *U, enum tgl_typing_status status);\n  void (*type_in_chat_notification)(struct tgl_state *TLS, struct tgl_user *U, struct tgl_chat *C, enum tgl_typing_status status);\n  void (*type_in_secret_chat_notification)(struct tgl_state *TLS, struct tgl_secret_chat *E);\n  void (*status_notification)(struct tgl_state *TLS, struct tgl_user *U);\n  void (*user_registered)(struct tgl_state *TLS, struct tgl_user *U);\n  void (*user_activated)(struct tgl_state *TLS, struct tgl_user *U);\n  void (*new_authorization)(struct tgl_state *TLS, const char *device, const char *location);\n  void (*chat_update)(struct tgl_state *TLS, struct tgl_chat *C, unsigned flags);\n  void (*channel_update)(struct tgl_state *TLS, struct tgl_channel *C, unsigned flags);\n  void (*user_update)(struct tgl_state *TLS, struct tgl_user *C, unsigned flags);\n  void (*secret_chat_update)(struct tgl_state *TLS, struct tgl_secret_chat *C, unsigned flags);\n  void (*msg_receive)(struct tgl_state *TLS, struct tgl_message *M);\n  void (*our_id)(struct tgl_state *TLS, tgl_peer_id_t id);\n  void (*notification)(struct tgl_state *TLS, const char *type, const char *message);\n  void (*user_status_update)(struct tgl_state *TLS, struct tgl_user *U);\n  char *(*create_print_name) (struct tgl_state *TLS, tgl_peer_id_t id, const char *a1, const char *a2, const char *a3, const char *a4);\n  void (*on_failed_login) (struct tgl_state *TLS);\n};\n\nstruct tgl_net_methods {\n  int (*write_out) (struct connection *c, const void *data, int len);\n  int (*read_in) (struct connection *c, void *data, int len);\n  int (*read_in_lookup) (struct connection *c, void *data, int len);\n  void (*flush_out) (struct connection *c);\n  void (*incr_out_packet_num) (struct connection *c);\n  void (*free) (struct connection *c);\n  struct tgl_dc *(*get_dc) (struct connection *c);\n  struct tgl_session *(*get_session) (struct connection *c);\n\n  struct connection *(*create_connection) (struct tgl_state *TLS, const char *host, int port, struct tgl_session *session, struct tgl_dc *dc, struct mtproto_methods *methods);\n};\n\nstruct mtproto_methods {\n  int (*ready) (struct tgl_state *TLS, struct connection *c);\n  int (*close) (struct tgl_state *TLS, struct connection *c);\n  int (*execute) (struct tgl_state *TLS, struct connection *c, int op, int len);\n};\n\nstruct tgl_timer;\nstruct tree_random_id;\nstruct tree_temp_id;\n\nstruct tgl_timer_methods {\n  struct tgl_timer *(*alloc) (struct tgl_state *TLS, void (*cb)(struct tgl_state *TLS, void *arg), void *arg);\n  void (*insert) (struct tgl_timer *t, double timeout);\n  void (*remove) (struct tgl_timer *t);\n  void (*free) (struct tgl_timer *t);\n};\n\n#define E_ERROR 0\n#define E_WARNING 1\n#define E_NOTICE 2\n#define E_DEBUG 6\n\n#define TGL_LOCK_DIFF 1\n#define TGL_LOCK_PASSWORD 2\n\n#define TGL_MAX_RSA_KEYS_NUM 10\n// Do not modify this structure, unless you know what you do\n\n#pragma pack(push,4)\nstruct tgl_state {\n  tgl_peer_id_t our_id;\n  int encr_root;\n  unsigned char *encr_prime;\n  TGLC_bn *encr_prime_bn;\n  int encr_param_version;\n  int pts;\n  int qts;\n  int date;\n  int seq;\n  int binlog_enabled;\n  int test_mode;\n  int verbosity;\n  int unread_messages;\n  int active_queries;\n  int max_msg_id;\n  int started;\n  int disable_link_preview;\n\n  long long locks;\n  struct tgl_dc *DC_list[TGL_MAX_DC_NUM];\n  struct tgl_dc *DC_working;\n  int max_dc_num;\n  int dc_working_num;\n  int enable_pfs;\n  int temp_key_expire_time;\n\n  long long cur_uploading_bytes;\n  long long cur_uploaded_bytes;\n  long long cur_downloading_bytes;\n  long long cur_downloaded_bytes;\n\n  char *binlog_name;\n  char *auth_file;\n  char *downloads_directory;\n\n  struct tgl_update_callback callback;\n  struct tgl_net_methods *net_methods;\n  void *ev_base;\n\n  char *rsa_key_list[TGL_MAX_RSA_KEYS_NUM];\n  // (TGLC_rsa *)\n  void *rsa_key_loaded[TGL_MAX_RSA_KEYS_NUM];\n  long long rsa_key_fingerprint[TGL_MAX_RSA_KEYS_NUM];\n  int rsa_key_num;\n\n  TGLC_bn_ctx *TGLC_bn_ctx;\n\n  struct tgl_allocator *allocator;\n\n  struct tree_peer *peer_tree;\n  struct tree_peer_by_name *peer_by_name_tree;\n  struct tree_message *message_tree;\n  struct tree_message *message_unsent_tree;\n  struct tree_photo *photo_tree;\n  struct tree_document *document_tree;\n  struct tree_webpage *webpage_tree;\n  struct tree_encr_document *encr_document_tree;\n\n  int users_allocated;\n  int chats_allocated;\n  int messages_allocated;\n  int channels_allocated;\n  int peer_num;\n  int peer_size;\n  int encr_chats_allocated;\n  int geo_chats_allocated;\n\n  tgl_peer_t **Peers;\n  struct tgl_message message_list;\n\n  int binlog_fd;\n\n  struct tgl_timer_methods *timer_methods;\n\n  struct tree_query *queries_tree;\n\n  char *base_path;\n\n  struct tree_user *online_updates;\n\n  struct tgl_timer *online_updates_timer;\n\n  int app_id;\n  char *app_hash;\n\n  void *ev_login;\n\n  char *app_version;\n  int ipv6_enabled;\n\n  struct tree_random_id *random_id_tree;\n  struct tree_temp_id *temp_id_tree;\n\n  char *error;\n  int error_code;\n\n  int is_bot;\n\n  int last_temp_id;\n};\n#pragma pack(pop)\n//extern struct tgl_state tgl_state;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nvoid tgl_reopen_binlog_for_writing (struct tgl_state *TLS);\nvoid tgl_replay_log (struct tgl_state *TLS);\n\nint tgl_print_stat (struct tgl_state *TLS, char *s, int len);\ntgl_peer_t *tgl_peer_get (struct tgl_state *TLS, tgl_peer_id_t id);\ntgl_peer_t *tgl_peer_get_by_name (struct tgl_state *TLS, const char *s);\n\nstruct tgl_message *tgl_message_get (struct tgl_state *TLS, tgl_message_id_t *id);\nvoid tgl_peer_iterator_ex (struct tgl_state *TLS, void (*it)(tgl_peer_t *P, void *extra), void *extra);\n\nint tgl_complete_user_list (struct tgl_state *TLS, int index, const char *text, int len, char **R);\nint tgl_complete_chat_list (struct tgl_state *TLS, int index, const char *text, int len, char **R);\nint tgl_complete_encr_chat_list (struct tgl_state *TLS, int index, const char *text, int len, char **R);\nint tgl_complete_peer_list (struct tgl_state *TLS, int index, const char *text, int len, char **R);\nint tgl_complete_channel_list (struct tgl_state *TLS, int index, const char *text, int len, char **R);\nint tgl_secret_chat_for_user (struct tgl_state *TLS, tgl_peer_id_t user_id);\nint tgl_do_send_bot_auth (struct tgl_state *TLS, const char *code, int code_len, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_user *Self), void *callback_extra);\n\n#define TGL_PEER_USER 1\n#define TGL_PEER_CHAT 2\n#define TGL_PEER_GEO_CHAT 3\n#define TGL_PEER_ENCR_CHAT 4\n#define TGL_PEER_CHANNEL 5\n#define TGL_PEER_TEMP_ID 100\n#define TGL_PEER_RANDOM_ID 101\n#define TGL_PEER_UNKNOWN 0\n\n#define TGL_MK_USER(id) tgl_set_peer_id (TGL_PEER_USER,id)\n#define TGL_MK_CHAT(id) tgl_set_peer_id (TGL_PEER_CHAT,id)\n#define TGL_MK_CHANNEL(id) tgl_set_peer_id (TGL_PEER_CHANNEL,id)\n#define TGL_MK_GEO_CHAT(id) tgl_set_peer_id (TGL_PEER_GEO_CHAT,id)\n#define TGL_MK_ENCR_CHAT(id) tgl_set_peer_id (TGL_PEER_ENCR_CHAT,id)\n\nvoid tgl_set_binlog_mode (struct tgl_state *TLS, int mode);\nvoid tgl_set_binlog_path (struct tgl_state *TLS, const char *path);\nvoid tgl_set_auth_file_path (struct tgl_state *TLS, const char *path);\nvoid tgl_set_download_directory (struct tgl_state *TLS, const char *path);\nvoid tgl_set_callback (struct tgl_state *TLS, struct tgl_update_callback *cb);\nvoid tgl_set_rsa_key (struct tgl_state *TLS, const char *key);\nvoid tgl_set_rsa_key_direct (struct tgl_state *TLS, unsigned long e, int n_bytes, const unsigned char *n);\nvoid tgl_set_app_version (struct tgl_state *TLS, const char *app_version);\n\nstatic inline int tgl_get_peer_type (tgl_peer_id_t id) {\n  return id.peer_type;\n}\n\nstatic inline int tgl_get_peer_id (tgl_peer_id_t id) {\n  return id.peer_id;\n}\n\nstatic inline tgl_peer_id_t tgl_set_peer_id (int type, int id) {\n  tgl_peer_id_t ID;\n  ID.peer_id = id;\n  ID.peer_type = type;\n  ID.access_hash = 0;\n  return ID;\n}\n\nstatic inline int tgl_cmp_peer_id (tgl_peer_id_t a, tgl_peer_id_t b) {\n  return memcmp (&a, &b, 8);\n}\n\nvoid tgl_incr_verbosity (struct tgl_state *TLS);\nvoid tgl_set_verbosity (struct tgl_state *TLS, int val);\nvoid tgl_enable_pfs (struct tgl_state *TLS);\nvoid tgl_set_test_mode (struct tgl_state *TLS);\nvoid tgl_set_net_methods (struct tgl_state *TLS, struct tgl_net_methods *methods);\nvoid tgl_set_timer_methods (struct tgl_state *TLS, struct tgl_timer_methods *methods);\nvoid tgl_set_ev_base (struct tgl_state *TLS, void *ev_base);\n\nint tgl_authorized_dc (struct tgl_state *TLS, struct tgl_dc *DC);\nint tgl_signed_dc (struct tgl_state *TLS, struct tgl_dc *DC);\n\nint tgl_init (struct tgl_state *TLS);\nvoid tgl_dc_authorize (struct tgl_state *TLS, struct tgl_dc *DC);\n\nvoid tgl_dc_iterator (struct tgl_state *TLS, void (*iterator)(struct tgl_dc *DC));\nvoid tgl_dc_iterator_ex (struct tgl_state *TLS, void (*iterator)(struct tgl_dc *DC, void *extra), void *extra);\n\n#define TGL_SEND_MSG_FLAG_DISABLE_PREVIEW 1\n#define TGL_SEND_MSG_FLAG_ENABLE_PREVIEW 2\n\n#define TGL_SEND_MSG_FLAG_DOCUMENT_IMAGE TGLDF_IMAGE\n#define TGL_SEND_MSG_FLAG_DOCUMENT_STICKER TGLDF_STICKER\n#define TGL_SEND_MSG_FLAG_DOCUMENT_ANIMATED TGLDF_ANIMATED\n#define TGL_SEND_MSG_FLAG_DOCUMENT_AUDIO TGLDF_AUDIO\n#define TGL_SEND_MSG_FLAG_DOCUMENT_VIDEO TGLDF_VIDEO\n#define TGL_SEND_MSG_FLAG_DOCUMENT_AUTO 32\n#define TGL_SEND_MSG_FLAG_DOCUMENT_PHOTO 64\n\n#define TGL_SEND_MSG_FLAG_REPLY(x) (((unsigned long long)x) << 32)\n\ntypedef tgl_peer_id_t tgl_user_id_t;\ntypedef tgl_peer_id_t tgl_chat_id_t;\ntypedef tgl_peer_id_t tgl_secret_chat_id_t;\ntypedef tgl_peer_id_t tgl_user_or_chat_id_t;\n\nvoid tgl_insert_empty_user (struct tgl_state *TLS, int id);\nvoid tgl_insert_empty_chat (struct tgl_state *TLS, int id);\n\n\nvoid tgl_free_all (struct tgl_state *TLS);\nvoid tgl_register_app_id (struct tgl_state *TLS, int app_id, const char *app_hash);\n\nvoid tgl_login (struct tgl_state *TLS);\nvoid tgl_enable_ipv6 (struct tgl_state *TLS);\nvoid tgl_enable_bot (struct tgl_state *TLS);\n\nstruct tgl_state *tgl_state_alloc (void);\n\nvoid tgl_disable_link_preview (struct tgl_state *TLS);\nvoid tgl_do_lookup_state (struct tgl_state *TLS);\n\nlong long tgl_get_allocated_bytes (void);\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "tools.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#define _GNU_SOURCE\n\n#include <assert.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"crypto/rand.h\"\n#include <zlib.h>\n#include <time.h>\n#include <sys/time.h>\n\n//#include \"interface.h\"\n#include \"tools.h\"\n\n#ifdef __MACH__\n#include <mach/clock.h>\n#include <mach/mach.h>\n#endif\n\n#ifndef CLOCK_REALTIME\n#define CLOCK_REALTIME 0\n#define CLOCK_MONOTONIC 1\n#endif\n\n#ifdef WIN32\n#include <winsock2.h>\n#include <windows.h>\nint vasprintf(char ** __restrict__ ret,\n                      const char * __restrict__ format,\n                      va_list ap) {\n  int len;\n  /* Get Length */\n  len = _vsnprintf(NULL,0,format,ap);\n  if (len < 0) return -1;\n  /* +1 for \\0 terminator. */\n  *ret = malloc(len + 1);\n  /* Check malloc fail*/\n  if (!*ret) return -1;\n  /* Write String */\n  _vsnprintf(*ret,len+1,format,ap);\n  /* Terminate explicitly */\n  (*ret)[len] = '\\0';\n  return len;\n}\n\nint clock_gettime(int ignored, struct timespec *spec)      \n{\n  __int64 wintime;\n  GetSystemTimeAsFileTime((FILETIME*)&wintime);\n  wintime      -= 116444736000000000;  //1jan1601 to 1jan1970\n  spec->tv_sec  = wintime / 10000000;           //seconds\n  spec->tv_nsec = wintime % 10000000 *100;      //nano-seconds\n  return 0;\n}\n#endif\n\n#ifdef VALGRIND_FIXES\n#include \"valgrind/memcheck.h\"\n#endif\n\n#define RES_PRE 8\n#define RES_AFTER 8\n#define MAX_BLOCKS 1000000\nstatic void *blocks[MAX_BLOCKS];\nstatic void *free_blocks[MAX_BLOCKS];\nstatic int used_blocks;\nstatic int free_blocks_cnt;\n\nstatic long long total_allocated_bytes;\n\nvoid logprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2), weak));\nvoid logprintf (const char *format, ...) {\n  va_list ap;\n  va_start (ap, format);\n  vfprintf (stdout, format, ap);\n  va_end (ap);\n}\n\n//extern int verbosity;\n\n//static long long total_allocated_bytes;\n\nint tgl_snprintf (char *buf, int len, const char *format, ...) {\n  va_list ap;\n  va_start (ap, format);\n  int r = vsnprintf (buf, len, format, ap);\n  va_end (ap);\n  assert (r <= len && \"tsnprintf buffer overflow\");\n  return r;\n}\n\nint tgl_asprintf (char **res, const char *format, ...) {\n  va_list ap;\n  va_start (ap, format);\n  int r = vasprintf (res, format, ap);\n  assert (r >= 0);\n  va_end (ap);\n  void *rs = talloc (strlen (*res) + 1);\n  memcpy (rs, *res, strlen (*res) + 1);\n  free (*res);\n  *res = rs;\n  return r;\n}\n\nvoid tgl_free_debug (void *ptr, int size __attribute__ ((unused))) {\n  if (!ptr) {\n    assert (!size);\n    return;\n  }\n  total_allocated_bytes -= size;\n  ptr -= RES_PRE;\n  if (size != (int)((*(int *)ptr) ^ 0xbedabeda)) {\n    logprintf (\"size = %d, ptr = %d\\n\", size, (*(int *)ptr) ^ 0xbedabeda);\n  }\n  assert (*(int *)ptr == (int)((size) ^ 0xbedabeda));\n  assert (*(int *)(ptr + RES_PRE + size) == (int)((size) ^ 0x7bed7bed));\n  assert (*(int *)(ptr + 4) == size);\n  int block_num = *(int *)(ptr + 4 + RES_PRE + size);\n  if (block_num >= used_blocks) {\n    logprintf (\"block_num = %d, used = %d\\n\", block_num, used_blocks);\n  }\n  assert (block_num < used_blocks);\n  if (block_num < used_blocks - 1) {\n    void *p = blocks[used_blocks - 1];\n    int s = (*(int *)p) ^ 0xbedabeda;\n    *(int *)(p + 4 + RES_PRE + s) = block_num;\n    blocks[block_num] = p;\n  }\n  blocks[--used_blocks] = 0;\n  memset (ptr, 0, size + RES_PRE + RES_AFTER);\n  *(int *)ptr = size + 12;\n  free_blocks[free_blocks_cnt ++] = ptr;\n}\n\nvoid tgl_free_release (void *ptr, int size) {\n  total_allocated_bytes -= size;\n  memset (ptr, 0, size);\n  free (ptr);\n}\n\n\n\nvoid *tgl_realloc_debug (void *ptr, size_t old_size __attribute__ ((unused)), size_t size) {\n  void *p = talloc (size);\n  memcpy (p, ptr, size >= old_size ? old_size : size); \n  if (ptr) {\n    tfree (ptr, old_size);\n  } else {\n    assert (!old_size);\n  }\n  return p;\n}\n\nvoid *tgl_realloc_release (void *ptr, size_t old_size __attribute__ ((unused)), size_t size) {\n  total_allocated_bytes += (size - old_size);\n  void *p = realloc (ptr, size);\n  ensure_ptr (p);\n  return p;\n}\n\nvoid *tgl_alloc_debug (size_t size) {\n  total_allocated_bytes += size;\n  void *p = malloc (size + RES_PRE + RES_AFTER);\n  ensure_ptr (p);\n  *(int *)p = size ^ 0xbedabeda;\n  *(int *)(p + 4) = size;\n  *(int *)(p + RES_PRE + size) = size ^ 0x7bed7bed;\n  *(int *)(p + RES_AFTER + 4 + size) = used_blocks;\n  blocks[used_blocks ++] = p;\n\n  //tcheck ();\n  return p + 8;\n}\n\nvoid *tgl_alloc_release (size_t size) {\n  total_allocated_bytes += size;\n  void *p = malloc (size);\n  ensure_ptr (p);\n  return p;\n}\n\nvoid *tgl_alloc0 (size_t size) {\n  void *p = talloc (size);\n  memset (p, 0, size);\n  return p;\n}\n\nchar *tgl_strdup (const char *s) {\n  int l = strlen (s);\n  char *p = talloc (l + 1);\n  memcpy (p, s, l + 1);\n  return p;\n}\n\nchar *tgl_strndup (const char *s, size_t n) {\n  size_t l = 0;\n  for (l = 0; l < n && s[l]; l++) { }\n  char *p = talloc (l + 1);\n  memcpy (p, s, l);\n  p[l] = 0;\n  return p;\n}\n\nvoid *tgl_memdup (const void *s, size_t n) {\n  void *r = talloc (n);\n  memcpy (r, s, n);\n  return r;\n}\n\n\nint tgl_inflate (void *input, int ilen, void *output, int olen) {\n  z_stream strm;\n  memset (&strm, 0, sizeof (strm));\n  assert (inflateInit2 (&strm, 16 + MAX_WBITS) == Z_OK);\n  strm.avail_in = ilen;\n  strm.next_in = input;\n  strm.avail_out = olen ;\n  strm.next_out = output;\n  int err = inflate (&strm, Z_FINISH); \n  int total_out = strm.total_out;\n\n  if (err != Z_OK && err != Z_STREAM_END) {\n    logprintf ( \"inflate error = %d\\n\", err);\n    logprintf ( \"inflated %d bytes\\n\", (int) strm.total_out);\n    total_out = 0;\n  }\n  inflateEnd (&strm);\n  return total_out;\n}\n\nvoid tgl_check_debug (void) {\n  int i;\n  for (i = 0; i < used_blocks; i++) {\n    void *ptr = blocks[i];\n    int size = (*(int *)ptr) ^ 0xbedabeda;\n    if (!(*(int *)(ptr + 4) == size) || \n        !(*(int *)(ptr + RES_PRE + size) == (size ^ 0x7bed7bed)) ||\n        !(*(int *)(ptr + RES_PRE + 4 + size) == i)) {\n      logprintf (\"Bad block at address %p (size %d, num %d)\\n\", ptr, size, i);\n      assert (0 && \"Bad block\");\n    }\n  }\n  for (i = 0; i < free_blocks_cnt; i++) {\n    void *ptr = free_blocks[i];\n    int l = *(int *)ptr;\n    int j = 0;\n    for (j = 0; j < l; j++) {\n      if (*(char *)(ptr + 4 + j)) {\n        hexdump (ptr + 8, ptr + 8 + l + ((-l) & 3)); \n        logprintf (\"Used freed memory size = %d. ptr = %p\\n\", l + 4 - RES_PRE - RES_AFTER, ptr);\n        assert (0);\n      }\n    }\n  }\n  //logprintf (\"ok. Used_blocks = %d. Free blocks = %d\\n\", used_blocks, free_blocks_cnt);\n}\n\nvoid tgl_exists_debug (void *ptr, int size) {\n  ptr -= RES_PRE;\n  if (size != (int)((*(int *)ptr) ^ 0xbedabeda)) {\n    logprintf (\"size = %d, ptr = %d\\n\", size, (*(int *)ptr) ^ 0xbedabeda);\n  }\n  assert (*(int *)ptr == (int)((size) ^ 0xbedabeda));\n  assert (*(int *)(ptr + RES_PRE + size) == (int)((size) ^ 0x7bed7bed));\n  assert (*(int *)(ptr + 4) == size);\n  int block_num = *(int *)(ptr + 4 + RES_PRE + size);\n  if (block_num >= used_blocks) {\n    logprintf (\"block_num = %d, used = %d\\n\", block_num, used_blocks);\n  }\n  assert (block_num < used_blocks);\n}\n\nvoid tgl_exists_release (void *ptr, int size) {}\nvoid tgl_check_release (void) {}\n\nvoid tgl_my_clock_gettime (int clock_id, struct timespec *T) {\n#ifdef __MACH__\n  // We are ignoring MONOTONIC and hope time doesn't go back too often\n  clock_serv_t cclock;\n  mach_timespec_t mts;\n  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);\n  clock_get_time(cclock, &mts);\n  mach_port_deallocate(mach_task_self(), cclock);\n  T->tv_sec = mts.tv_sec;\n  T->tv_nsec = mts.tv_nsec;\n#else\n  assert (clock_gettime(clock_id, T) >= 0);\n#endif\n}\n\ndouble tglt_get_double_time (void) {\n  struct timespec tv;\n  tgl_my_clock_gettime (CLOCK_REALTIME, &tv);\n  return tv.tv_sec + 1e-9 * tv.tv_nsec;\n}\n\nvoid tglt_secure_random (void *s, int l) {\n  if (TGLC_rand_bytes (s, l) <= 0) {\n    /*if (allow_weak_random) {\n      TGLC_rand_pseudo_bytes (s, l);\n    } else {*/\n      assert (0 && \"End of random. If you want, you can start with -w\");\n    //}\n  } else {\n    #ifdef VALGRIND_FIXES\n      VALGRIND_MAKE_MEM_DEFINED (s, l);\n      VALGRIND_CHECK_MEM_IS_DEFINED (s, l);\n    #endif\n  }\n}\n\nstruct tgl_allocator tgl_allocator_debug = {\n  .alloc = tgl_alloc_debug,\n  .realloc = tgl_realloc_debug,\n  .free = tgl_free_debug,\n  .check = tgl_check_debug,\n  .exists = tgl_exists_debug\n};\n\nstruct tgl_allocator tgl_allocator_release = {\n  .alloc = tgl_alloc_release,\n  .realloc = tgl_realloc_release,\n  .free = tgl_free_release,\n  .check = tgl_check_release,\n  .exists = tgl_exists_release\n};\n\nlong long tgl_get_allocated_bytes (void) {\n  return total_allocated_bytes;\n}\nstruct tgl_allocator *tgl_allocator = &tgl_allocator_release;\n"
  },
  {
    "path": "tools.h",
    "content": "/*\n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifndef __TOOLS_H__\n#define __TOOLS_H__\n#include <time.h>\n#include <stdarg.h>\n#include <stdlib.h>\n#include <assert.h>\n#include <string.h>\n//#include \"tgl.h\"\n#include \"crypto/err.h\"\n#include \"crypto/rand.h\"\n\nstruct tgl_allocator {\n  void *(*alloc)(size_t size);\n  void *(*realloc)(void *ptr, size_t old_size, size_t size);\n  void (*free)(void *ptr, int size);\n  void (*check)(void);\n  void (*exists)(void *ptr, int size);\n};\n\n#define talloc tgl_allocator->alloc\n#define talloc0 tgl_alloc0\n#define tfree tgl_allocator->free\n#define tfree_str tgl_free_str\n#define tfree_secure tgl_free_secure\n#define trealloc tgl_allocator->realloc\n#define tcheck tgl_allocator->check\n#define texists tgl_allocator->exists\n#define tstrdup tgl_strdup\n#define tmemdup tgl_memdup\n#define tstrndup tgl_strndup\n#define tasprintf tgl_asprintf\n#define tsnprintf tgl_snprintf\n\n\nextern struct tgl_allocator *tgl_allocator;\ndouble tglt_get_double_time (void);\n\nint tgl_inflate (void *input, int ilen, void *output, int olen);\n//void ensure (int r);\n//void ensure_ptr (void *p);\n\nstatic inline void out_of_memory (void) {\n  fprintf (stderr, \"Out of memory\\n\");\n  exit (1);\n}\n\nstatic inline void ensure (int r) {\n  if (!r) {\n    fprintf (stderr, \"Crypto error\\n\");\n    TGLC_err_print_errors_fp (stderr);\n    assert (0);\n  }\n}\n\nstatic inline void ensure_ptr (void *p) {\n  if (p == NULL) {\n    out_of_memory ();\n  }\n}\n\nvoid *tgl_alloc_debug (size_t size);\nvoid *tgl_alloc_release (size_t size);\n\nvoid *tgl_realloc_debug (void *ptr, size_t old_size, size_t size);\nvoid *tgl_realloc_release (void *ptr, size_t old_size, size_t size);\n\nvoid *tgl_alloc0 (size_t size);\nchar *tgl_strdup (const char *s);\nchar *tgl_strndup (const char *s, size_t n);\n\nvoid tgl_free_debug (void *ptr, int size);\nvoid tgl_free_release (void *ptr, int size);\n//void tgl_free_str (void *ptr);\n//void tgl_free_secure (void *ptr, int size);\n\nvoid tgl_check_debug (void);\nvoid tgl_exists_debug (void *ptr, int size);\nvoid tgl_check_release (void);\nvoid tgl_exists_release (void *ptr, int size);\n\nvoid *tgl_memdup (const void *s, size_t n);\n\nint tgl_snprintf (char *buf, int len, const char *format, ...) __attribute__ ((format (__printf__, 3, 4)));\nint tgl_asprintf (char **res, const char *format, ...) __attribute__ ((format (__printf__, 2, 3)));\n\nvoid tglt_secure_random (void *s, int l);\nvoid tgl_my_clock_gettime (int clock_id, struct timespec *T);\n\nstatic inline void tgl_free_str (void *ptr) {\n  if (!ptr) { return; }\n  tfree (ptr, strlen ((const char *)ptr) + 1);\n}\n\nstatic inline void tgl_free_secure (void *ptr, int size) {\n  memset (ptr, 0, size);\n  tfree (ptr, size);\n}\n\nstatic inline void hexdump (void *ptr, void *end_ptr) {\n  int total = 0;\n  unsigned char *bptr = (unsigned char *)ptr;\n  while (bptr < (unsigned char *)end_ptr) {\n    fprintf (stderr, \"%02x\", (int)*bptr);\n    bptr ++;\n    total ++;\n    if (total == 16) {\n      fprintf (stderr, \"\\n\");\n      total = 0;\n    }\n  }\n  if (total) { fprintf (stderr, \"\\n\"); }\n}\n\n#endif\n"
  },
  {
    "path": "tree.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#ifndef __TREE_H__\n#define __TREE_H__\n#include <stdio.h>\n\n#include <memory.h>\n#include <assert.h>\n#include \"tools.h\"\n\n#pragma pack(push,4)\n#define DEFINE_TREE(X_NAME, X_TYPE, X_CMP, X_UNSET) \\\nstruct tree_ ## X_NAME { \\\n  struct tree_ ## X_NAME *left, *right;\\\n  X_TYPE x;\\\n  int y;\\\n};\\\n\\\nstatic struct tree_ ## X_NAME *new_tree_node_ ## X_NAME (X_TYPE x, int y) {\\\n  struct tree_ ## X_NAME *T = talloc (sizeof (*T));\\\n  T->x = x;\\\n  T->y = y;\\\n  T->left = T->right = 0;\\\n  return T;\\\n}\\\n\\\nstatic void delete_tree_node_ ## X_NAME (struct tree_ ## X_NAME *T) {\\\n  tfree (T, sizeof (*T));\\\n}\\\n\\\nstatic void tree_split_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x, struct tree_ ## X_NAME **L, struct tree_ ## X_NAME **R) {\\\n  if (!T) {\\\n    *L = *R = 0;\\\n  } else {\\\n    int c = X_CMP (x, T->x);\\\n    if (c < 0) {\\\n      tree_split_ ## X_NAME (T->left, x, L, &T->left);\\\n      *R = T;\\\n    } else {\\\n      tree_split_ ## X_NAME (T->right, x, &T->right, R);\\\n      *L = T;\\\n    }\\\n  }\\\n}\\\n\\\nstatic struct tree_ ## X_NAME *tree_insert_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x, int y) __attribute__ ((warn_unused_result,unused));\\\nstatic struct tree_ ## X_NAME *tree_insert_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x, int y) {\\\n  if (!T) {\\\n    return new_tree_node_ ## X_NAME  (x, y);\\\n  } else {\\\n    if (y > T->y) {\\\n      struct tree_ ## X_NAME *N = new_tree_node_ ## X_NAME (x, y);\\\n      tree_split_ ## X_NAME (T, x, &N->left, &N->right);\\\n      return N;\\\n    } else {\\\n      int c = X_CMP (x, T->x);\\\n      assert (c);\\\n      if (c < 0) { \\\n        T->left = tree_insert_ ## X_NAME (T->left, x, y);\\\n      } else { \\\n        T->right = tree_insert_ ## X_NAME (T->right, x, y);\\\n      } \\\n      return T; \\\n    }\\\n  }\\\n}\\\n\\\nstatic struct tree_ ## X_NAME *tree_merge_ ## X_NAME (struct tree_ ## X_NAME *L, struct tree_ ## X_NAME *R) {\\\n  if (!L || !R) {\\\n    return L ? L : R;\\\n  } else {\\\n    if (L->y > R->y) {\\\n      L->right = tree_merge_ ## X_NAME (L->right, R);\\\n      return L;\\\n    } else {\\\n      R->left = tree_merge_ ## X_NAME (L, R->left);\\\n      return R;\\\n    }\\\n  }\\\n}\\\n\\\nstatic struct tree_ ## X_NAME *tree_delete_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x) __attribute__ ((warn_unused_result,unused));\\\nstatic struct tree_ ## X_NAME *tree_delete_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x) {\\\n  assert (T);\\\n  int c = X_CMP (x, T->x);\\\n  if (!c) {\\\n    struct tree_ ## X_NAME *N = tree_merge_ ## X_NAME (T->left, T->right);\\\n    delete_tree_node_ ## X_NAME (T);\\\n    return N;\\\n  } else {\\\n    if (c < 0) { \\\n      T->left = tree_delete_ ## X_NAME (T->left, x); \\\n    } else { \\\n      T->right = tree_delete_ ## X_NAME (T->right, x); \\\n    } \\\n    return T; \\\n  }\\\n}\\\n\\\nstatic X_TYPE tree_get_min_ ## X_NAME (struct tree_ ## X_NAME *t) __attribute__ ((unused));\\\nstatic X_TYPE tree_get_min_ ## X_NAME (struct tree_ ## X_NAME *T) {\\\n  if (!T) { return X_UNSET; } \\\n  while (T->left) { T = T->left; }\\\n  return T->x; \\\n} \\\n\\\nstatic X_TYPE tree_lookup_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x) __attribute__ ((unused));\\\nstatic X_TYPE tree_lookup_ ## X_NAME (struct tree_ ## X_NAME *T, X_TYPE x) {\\\n  int c;\\\n  while (T && (c = X_CMP (x, T->x))) {\\\n    T = (c < 0 ? T->left : T->right);\\\n  }\\\n  return T ? T->x : X_UNSET;\\\n}\\\n\\\nstatic void tree_act_ ## X_NAME (struct tree_ ## X_NAME *T, void (*act)(X_TYPE)) __attribute__ ((unused));\\\nstatic void tree_act_ ## X_NAME (struct tree_ ## X_NAME *T, void (*act)(X_TYPE)) {\\\n  if (!T) { return; } \\\n  tree_act_ ## X_NAME (T->left, act); \\\n  act (T->x); \\\n  tree_act_ ## X_NAME (T->right, act); \\\n}\\\n\\\nstatic void tree_act_ex_ ## X_NAME (struct tree_ ## X_NAME *T, void (*act)(X_TYPE, void *), void *extra) __attribute__ ((unused));\\\nstatic void tree_act_ex_ ## X_NAME (struct tree_ ## X_NAME *T, void (*act)(X_TYPE, void *), void *extra) {\\\n  if (!T) { return; } \\\n  tree_act_ex_ ## X_NAME (T->left, act, extra); \\\n  act (T->x, extra); \\\n  tree_act_ex_ ## X_NAME (T->right, act, extra); \\\n}\\\n\\\nstatic int tree_count_ ## X_NAME (struct tree_ ## X_NAME *T) __attribute__ ((unused));\\\nstatic int tree_count_ ## X_NAME (struct tree_ ## X_NAME *T) { \\\n  if (!T) { return 0; }\\\n  return 1 + tree_count_ ## X_NAME (T->left) + tree_count_ ## X_NAME (T->right); \\\n}\\\nstatic void tree_check_ ## X_NAME (struct tree_ ## X_NAME *T) __attribute__ ((unused));\\\nstatic void tree_check_ ## X_NAME (struct tree_ ## X_NAME *T) { \\\n  if (!T) { return; }\\\n  if (T->left) { \\\n    assert (T->left->y <= T->y);\\\n    assert (X_CMP (T->left->x, T->x) < 0); \\\n  }\\\n  if (T->right) { \\\n    assert (T->right->y <= T->y);\\\n    assert (X_CMP (T->right->x, T->x) > 0); \\\n  }\\\n  tree_check_ ## X_NAME (T->left); \\\n  tree_check_ ## X_NAME (T->right); \\\n}\\\nstatic struct tree_ ## X_NAME *tree_clear_ ## X_NAME (struct tree_ ## X_NAME *T) __attribute__ ((unused));\\\nstatic struct tree_ ## X_NAME *tree_clear_ ## X_NAME (struct tree_ ## X_NAME *T) { \\\n  if (!T) { return 0; }\\\n  tree_clear_ ## X_NAME (T->left); \\\n  tree_clear_ ## X_NAME (T->right); \\\n  delete_tree_node_ ## X_NAME (T); \\\n  return 0; \\\n} \\\n\n#define int_cmp(a,b) ((a) - (b))\n#pragma pack(pop)\n#endif\n"
  },
  {
    "path": "updates.c",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n#include \"tgl.h\"\n#include \"updates.h\"\n#include \"mtproto-common.h\"\n#include \"tgl-binlog.h\"\n#include \"auto.h\"\n#include \"auto/auto-types.h\"\n#include \"auto/auto-skip.h\"\n#include \"auto/auto-fetch-ds.h\"\n#include \"auto/auto-free-ds.h\"\n#include \"tgl-structures.h\"\n#include \"tgl-methods-in.h\"\n#include \"tree.h\"\n\n#include <assert.h>\n\nvoid tgl_do_get_channel_difference (struct tgl_state *TLS, int channel_id, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success), void *callback_extra);\n\nstatic void fetch_dc_option (struct tgl_state *TLS, struct tl_ds_dc_option *DS_DO) {\n  vlogprintf (E_DEBUG, \"id = %d, %.*s:%d\\n\", DS_LVAL (DS_DO->id), DS_RSTR (DS_DO->ip_address), DS_LVAL (DS_DO->port));\n\n  bl_do_dc_option (TLS, DS_LVAL (DS_DO->flags), DS_LVAL (DS_DO->id), NULL, 0, DS_STR (DS_DO->ip_address), DS_LVAL (DS_DO->port));\n}\n\nint tgl_check_pts_diff (struct tgl_state *TLS, int pts, int pts_count) {\n  vlogprintf (E_DEBUG - 1, \"pts = %d, pts_count = %d\\n\", pts, pts_count);\n  if (!TLS->pts) {\n    return 1;\n  }\n  //assert (TLS->pts);\n  if (pts < TLS->pts + pts_count) {\n    vlogprintf (E_NOTICE, \"Duplicate message with pts=%d\\n\", pts);\n    return -1;\n  }\n  if (pts > TLS->pts + pts_count) {\n    vlogprintf (E_NOTICE, \"Hole in pts (pts = %d, count = %d, cur_pts = %d)\\n\", pts, pts_count, TLS->pts);\n    tgl_do_get_difference (TLS, 0, 0, 0);\n    return -1;\n  }\n  if (TLS->locks & TGL_LOCK_DIFF) {\n    vlogprintf (E_DEBUG, \"Update during get_difference. pts = %d\\n\", pts);\n    return -1;\n  }\n  vlogprintf (E_DEBUG, \"Ok update. pts = %d\\n\", pts);\n  return 1;\n}\n\nint tgl_check_qts_diff (struct tgl_state *TLS, int qts, int qts_count) {\n  vlogprintf (E_ERROR, \"qts = %d, qts_count = %d\\n\", qts, qts_count);\n  if (qts < TLS->qts + qts_count) {\n    vlogprintf (E_NOTICE, \"Duplicate message with qts=%d\\n\", qts);\n    return -1;\n  }\n  if (qts > TLS->qts + qts_count) {\n    vlogprintf (E_NOTICE, \"Hole in qts (qts = %d, count = %d, cur_qts = %d)\\n\", qts, qts_count, TLS->qts);\n    tgl_do_get_difference (TLS, 0, 0, 0);\n    return -1;\n  }\n  if (TLS->locks & TGL_LOCK_DIFF) {\n    vlogprintf (E_DEBUG, \"Update during get_difference. qts = %d\\n\", qts);\n    return -1;\n  }\n  vlogprintf (E_DEBUG, \"Ok update. qts = %d\\n\", qts);\n  return 1;\n}\n\nint tgl_check_channel_pts_diff (struct tgl_state *TLS, tgl_peer_t *_E, int pts, int pts_count) {\n  struct tgl_channel *E = &_E->channel;\n  vlogprintf (E_DEBUG - 1, \"channel %d: pts = %d, pts_count = %d, current_pts = %d\\n\", tgl_get_peer_id (E->id), pts, pts_count, E->pts);\n  if (!E->pts) {\n    return 1;\n  }\n  //assert (TLS->pts);\n  if (pts < E->pts + pts_count) {\n    vlogprintf (E_NOTICE, \"Duplicate message with pts=%d\\n\", pts);\n    return -1;\n  }\n  if (pts > E->pts + pts_count) {\n    vlogprintf (E_NOTICE, \"Hole in pts (pts = %d, count = %d, cur_pts = %d)\\n\", pts, pts_count, E->pts);\n    tgl_do_get_channel_difference (TLS, tgl_get_peer_id (E->id), 0, 0);\n    return -1;\n  }\n  if (E->flags & TGLCHF_DIFF) {\n    vlogprintf (E_DEBUG, \"Update during get_difference. pts = %d\\n\", pts);\n    return -1;\n  }\n  vlogprintf (E_DEBUG, \"Ok update. pts = %d\\n\", pts);\n  return 1;\n}\n  \nstatic int do_skip_seq (struct tgl_state *TLS, int seq) {\n  if (!seq) {\n    vlogprintf (E_DEBUG, \"Ok update. seq = %d\\n\", seq);\n    return 0;\n  }\n  if (TLS->seq) {\n    if (seq <= TLS->seq) {\n      vlogprintf (E_NOTICE, \"Duplicate message with seq=%d\\n\", seq);\n      return -1;\n    }\n    if (seq > TLS->seq + 1) {\n      vlogprintf (E_NOTICE, \"Hole in seq (seq = %d, cur_seq = %d)\\n\", seq, TLS->seq);\n      //vlogprintf (E_NOTICE, \"lock_diff = %s\\n\", (TLS->locks & TGL_LOCK_DIFF) ? \"true\" : \"false\");\n      tgl_do_get_difference (TLS, 0, 0, 0);\n      return -1;\n    }\n    if (TLS->locks & TGL_LOCK_DIFF) {\n      vlogprintf (E_DEBUG, \"Update during get_difference. seq = %d\\n\", seq);\n      return -1;\n    }\n    vlogprintf (E_DEBUG, \"Ok update. seq = %d\\n\", seq);\n    return 0;\n  } else {\n    return -1;\n  }\n}\n\nvoid tglu_work_update (struct tgl_state *TLS, int check_only, struct tl_ds_update *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    vlogprintf (E_DEBUG, \"Update during get_difference. DROP\\n\");\n    return;\n  }\n\n  if (DS_U->pts) {\n    assert (DS_U->pts_count);\n\n    if (!check_only && tgl_check_pts_diff (TLS, DS_LVAL (DS_U->pts), DS_LVAL (DS_U->pts_count)) <= 0) {\n      return;\n    }\n  }\n  \n  if (DS_U->qts) {\n    if (!check_only && tgl_check_qts_diff (TLS, DS_LVAL (DS_U->qts), 1) <= 0) {\n      return;\n    }\n  }\n\n  if (DS_U->channel_pts) {\n    assert (DS_U->channel_pts_count);\n    int channel_id;\n    if (DS_U->channel_id) {\n      channel_id = DS_LVAL (DS_U->channel_id);\n    } else {\n      assert (DS_U->message);\n      if (!DS_U->message->to_id) {\n        return;\n      }\n      assert (DS_U->message->to_id);\n      assert (DS_U->message->to_id->magic == CODE_peer_channel);\n      channel_id = DS_LVAL (DS_U->message->to_id->channel_id);\n    }    \n\n    tgl_peer_t *E = tgl_peer_get (TLS, TGL_MK_CHANNEL (channel_id));\n    if (!E) {\n      return;\n    }\n\n    if (!check_only && tgl_check_channel_pts_diff (TLS, E, DS_LVAL (DS_U->channel_pts), DS_LVAL (DS_U->channel_pts_count)) <= 0) {\n      return;\n    }\n  }\n\n  vlogprintf (E_NOTICE, \"update 0x%08x (check=%d)\\n\", DS_U->magic, check_only);\n  if (check_only > 0 && DS_U->magic != CODE_update_message_i_d) { return; }\n  switch (DS_U->magic) {\n  case CODE_update_new_message:\n    {\n      //struct tgl_message *N = tgl_message_get (TLS, DS_LVAL (DS_U->id));\n      //int new = (!N || !(N->flags & TGLMF_CREATED));\n      int new_msg = 0;\n      struct tgl_message *M = tglf_fetch_alloc_message (TLS, DS_U->message, &new_msg);\n      assert (M);\n      if (new_msg) {\n        bl_do_msg_update (TLS, &M->permanent_id);\n      }\n      break;\n    };\n  case CODE_update_message_i_d:\n    {\n      tgl_message_id_t msg_id;\n      msg_id.peer_type = TGL_PEER_RANDOM_ID;\n      msg_id.id = DS_LVAL (DS_U->random_id);\n      struct tgl_message *M = tgl_message_get (TLS, &msg_id);\n      if (M && (M->flags & TGLMF_PENDING)) {\n        msg_id = M->permanent_id;\n        msg_id.id = DS_LVAL (DS_U->id);\n        bl_do_set_msg_id (TLS, &M->permanent_id, &msg_id);\n        bl_do_msg_update (TLS, &msg_id);\n      }\n    }\n    break;\n/*  case CODE_update_read_messages:\n    {\n      int n = DS_LVAL (DS_U->messages->cnt);\n      \n      int i;\n      for (i = 0; i < n; i++) {\n        struct tgl_message *M = tgl_message_get (TLS, DS_LVAL (DS_U->messages->data[i]));\n        if (M) {\n          tgl_peer_t *P;\n          if (M->flags & TGLMF_OUT) {\n            P = tgl_peer_get (TLS, M->to_id);\n            if (P && (P->flags & TGLMF_CREATED)) {\n              if (tgl_get_peer_type (P->id) == TGL_PEER_USER) {\n                bl_do_user (TLS, tgl_get_peer_id (P->id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, 0, NULL, 0, NULL, NULL, (int *)&M->id, TGL_FLAGS_UNCHANGED);\n              } else {\n                bl_do_chat (TLS, tgl_get_peer_id (P->id), NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, (int *)&M->id, TGL_FLAGS_UNCHANGED);\n              }\n            }\n          } else {\n            if (tgl_get_peer_type (M->to_id) == TGL_PEER_USER) {\n              P = tgl_peer_get (TLS, M->from_id);\n            } else {\n              P = tgl_peer_get (TLS, M->to_id);\n            }\n            if (P && (P->flags & TGLMF_CREATED)) {\n              if (tgl_get_peer_type (P->id) == TGL_PEER_USER) {\n                bl_do_user (TLS, tgl_get_peer_id (P->id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, 0, NULL, 0, NULL, (int *)&M->id, NULL, TGL_FLAGS_UNCHANGED);\n              } else {\n                bl_do_chat (TLS, tgl_get_peer_id (P->id), NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, (int *)&M->id, NULL, TGL_FLAGS_UNCHANGED);\n              }\n            }\n          }\n        }\n      }\n    }\n    break;*/\n  case CODE_update_user_typing:\n    {\n      tgl_peer_id_t id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *U = tgl_peer_get (TLS, id);\n      enum tgl_typing_status status = tglf_fetch_typing (DS_U->action);\n\n      if (TLS->callback.type_notification && U) {\n        TLS->callback.type_notification (TLS, (void *)U, status);\n      }\n    }\n    break;\n  case CODE_update_chat_user_typing:\n    {\n      tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_U->chat_id));\n      tgl_peer_id_t id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *C = tgl_peer_get (TLS, chat_id);\n      tgl_peer_t *U = tgl_peer_get (TLS, id);\n      enum tgl_typing_status status = tglf_fetch_typing (DS_U->action);      \n      \n      if (U && C) {\n        if (TLS->callback.type_in_chat_notification) {\n          TLS->callback.type_in_chat_notification (TLS, (void *)U, (void *)C, status);\n        }\n      }\n    }\n    break;\n  case CODE_update_user_status:\n    {\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *U = tgl_peer_get (TLS, user_id);\n      if (U) {\n        tglf_fetch_user_status (TLS, &U->user.status, &U->user, DS_U->status);\n\n        if (TLS->callback.status_notification) {\n          TLS->callback.status_notification (TLS, (void *)U);\n        }\n      }\n    }\n    break;\n  case CODE_update_user_name:\n    {\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *UC = tgl_peer_get (TLS, user_id);\n      if (UC && (UC->flags & TGLPF_CREATED)) {\n        bl_do_user (TLS, tgl_get_peer_id (user_id), NULL, DS_STR (DS_U->first_name), DS_STR (DS_U->last_name), NULL, 0, DS_STR (DS_U->username), NULL, NULL, NULL, NULL, NULL, TGL_FLAGS_UNCHANGED);\n      }\n    }\n    break;\n  case CODE_update_user_photo:\n    {\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *UC = tgl_peer_get (TLS, user_id);\n      \n      if (UC && (UC->flags & TGLUF_CREATED)) {\n        bl_do_user (TLS, tgl_get_peer_id (user_id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, DS_U->photo, NULL, NULL, NULL, TGL_FLAGS_UNCHANGED);\n      }\n    }\n    break;\n  case CODE_update_delete_messages:\n    {\n    }\n    break;\n  case CODE_update_chat_participants:\n    {\n      tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_U->chat_id));\n      tgl_peer_t *C = tgl_peer_get (TLS, chat_id);\n      if (C && (C->flags & TGLPF_CREATED) && DS_U->participants->magic == CODE_chat_participants) {\n        bl_do_chat (TLS, tgl_get_peer_id (chat_id), NULL, 0, NULL, NULL, DS_U->participants->version, (struct tl_ds_vector *)DS_U->participants->participants, NULL, NULL, NULL, NULL, NULL, TGL_FLAGS_UNCHANGED);\n      }\n    }\n    break;\n  case CODE_update_contact_registered:\n    {\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *U = tgl_peer_get (TLS, user_id);\n      if (TLS->callback.user_registered && U) {\n        TLS->callback.user_registered (TLS, (void *)U);\n      }\n    }\n    break;\n  case CODE_update_contact_link:\n    {\n    }\n    break;\n  /*case CODE_update_activation:\n    {\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_t *U = tgl_peer_get (TLS, user_id);\n     \n      if (TLS->callback.user_activated && U) {\n        TLS->callback.user_activated (TLS, (void *)U);\n      }\n    }\n    break;*/\n  case CODE_update_new_authorization:\n    {\n      if (TLS->callback.new_authorization) {\n        TLS->callback.new_authorization (TLS, DS_U->device->data, DS_U->location->data);\n      }\n    }\n    break;\n  /*case CODE_update_new_geo_chat_message:\n    {\n    }\n    break;*/\n  case CODE_update_new_encrypted_message:\n    {\n      struct tgl_message *M = tglf_fetch_alloc_encrypted_message (TLS, DS_U->encr_message);\n      if (M) {\n        bl_do_msg_update (TLS, &M->permanent_id);\n      }\n    }\n    break;\n  case CODE_update_encryption:\n    {\n      struct tgl_secret_chat *E = tglf_fetch_alloc_encrypted_chat (TLS, DS_U->encr_chat);     \n      vlogprintf (E_DEBUG, \"Secret chat state = %d\\n\", E->state);\n      if (E->state == sc_ok) {\n        tgl_do_send_encr_chat_layer (TLS, E);\n      }\n    }\n    break;\n  case CODE_update_encrypted_chat_typing:\n    {\n      tgl_peer_id_t id = TGL_MK_ENCR_CHAT (DS_LVAL (DS_U->chat_id));\n      tgl_peer_t *P = tgl_peer_get (TLS, id);\n      \n      if (P) {\n        if (TLS->callback.type_in_secret_chat_notification) {\n          TLS->callback.type_in_secret_chat_notification (TLS, (void *)P);\n        }\n      }\n    }\n    break;\n  case CODE_update_encrypted_messages_read:\n    {\n      tgl_peer_id_t id = TGL_MK_ENCR_CHAT (DS_LVAL (DS_U->chat_id));\n      tgl_peer_t *P = tgl_peer_get (TLS, id);\n      \n      if (P && P->last) {\n        struct tgl_message *M = P->last;\n        while (M && (!(M->flags & TGLMF_OUT) || (M->flags & TGLMF_UNREAD))) {\n          if (M->flags & TGLMF_OUT) {\n            bl_do_edit_message_encr (TLS, &M->permanent_id, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, M->flags & ~TGLMF_UNREAD);\n          }\n          M = M->next;\n        }\n      }\n    }\n    break;\n  case CODE_update_chat_participant_add:\n    {\n      tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_U->chat_id));\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      tgl_peer_id_t inviter_id = TGL_MK_USER (DS_LVAL (DS_U->inviter_id));\n      int version = DS_LVAL (DS_U->version); \n      \n      tgl_peer_t *C = tgl_peer_get (TLS, chat_id);\n      if (C && (C->flags & TGLPF_CREATED)) {\n        bl_do_chat_add_user (TLS, C->id, version, tgl_get_peer_id (user_id), tgl_get_peer_id (inviter_id), time (0));\n      }\n    }\n    break;\n  case CODE_update_chat_participant_delete:\n    {\n      tgl_peer_id_t chat_id = TGL_MK_CHAT (DS_LVAL (DS_U->chat_id));\n      tgl_peer_id_t user_id = TGL_MK_USER (DS_LVAL (DS_U->user_id));\n      int version = DS_LVAL (DS_U->version); \n      \n      tgl_peer_t *C = tgl_peer_get (TLS, chat_id);\n      if (C && (C->flags & TGLPF_CREATED)) {\n        bl_do_chat_del_user (TLS, C->id, version, tgl_get_peer_id (user_id));\n      }\n    }\n    break;\n  case CODE_update_dc_options:\n    {\n      int i;\n      for (i = 0; i < DS_LVAL (DS_U->dc_options->cnt); i++) {\n        fetch_dc_option (TLS, DS_U->dc_options->data[i]);\n      }\n    }\n    break;\n  case CODE_update_user_blocked:\n    {\n      int blocked = DS_BVAL (DS_U->blocked);\n      tgl_peer_t *P = tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_U->user_id)));\n      if (P && (P->flags & TGLPF_CREATED)) {\n        int flags = P->flags & 0xffff; \n        if (blocked) {\n          flags |= TGLUF_BLOCKED;\n        } else {\n          flags &= ~TGLUF_BLOCKED;\n        }\n        bl_do_user (TLS, tgl_get_peer_id (P->id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, flags);\n      }\n    }\n    break;\n  case CODE_update_notify_settings:\n    {\n    }\n    break;\n  case CODE_update_service_notification:\n    {\n      vlogprintf (E_ERROR, \"Notification %.*s: %.*s\\n\", DS_RSTR (DS_U->type), DS_RSTR (DS_U->message_text));\n      if (TLS->callback.notification) {\n        TLS->callback.notification (TLS, DS_U->type->data, DS_U->message_text->data);\n      }\n    }\n    break;\n  case CODE_update_privacy:\n    vlogprintf (E_NOTICE, \"privacy change update\\n\");\n    break;\n  case CODE_update_user_phone:\n    {\n      tgl_peer_t *U = tgl_peer_get (TLS, TGL_MK_USER (DS_LVAL (DS_U->user_id)));\n      if (U && (U->flags & TGLPF_CREATED)) {\n        bl_do_user (TLS, tgl_get_peer_id (U->id), NULL, NULL, 0, NULL, 0, DS_STR (DS_U->phone), NULL, 0, NULL, NULL, NULL, NULL, NULL, TGL_FLAGS_UNCHANGED);\n      }\n    }\n    break;\n  case CODE_update_read_history_inbox:\n    {\n      tgl_peer_id_t id = tglf_fetch_peer_id (TLS, DS_U->peer);\n      tgl_peer_t *P = tgl_peer_get (TLS, id);\n      if (P && (P->flags & TGLPF_CREATED)) {\n        if (tgl_get_peer_type (P->id) == TGL_PEER_USER) {\n          bl_do_user (TLS, tgl_get_peer_id (P->id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, DS_U->max_id, NULL, NULL, TGL_FLAGS_UNCHANGED);\n        } else {\n          bl_do_chat (TLS, tgl_get_peer_id (P->id), NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, DS_U->max_id, NULL, TGL_FLAGS_UNCHANGED);\n        }\n      }\n    }\n    break;\n  case CODE_update_read_history_outbox:\n    {\n      tgl_peer_id_t id = tglf_fetch_peer_id (TLS, DS_U->peer);\n      tgl_peer_t *P = tgl_peer_get (TLS, id);\n      if (P && (P->flags & TGLPF_CREATED)) {\n        if (tgl_get_peer_type (P->id) == TGL_PEER_USER) {\n          bl_do_user (TLS, tgl_get_peer_id (P->id), NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, DS_U->max_id, NULL, TGL_FLAGS_UNCHANGED);\n        } else {\n          bl_do_chat (TLS, tgl_get_peer_id (P->id), NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, DS_U->max_id, TGL_FLAGS_UNCHANGED);\n        }\n      }\n    }\n    break;\n  case CODE_update_web_page:\n    {\n    }\n    break;\n  /*case CODE_update_msg_update:\n    {\n      struct tgl_message *M = tgl_message_get (TLS, DS_LVAL (DS_U->id));\n      if (M) {\n        bl_do_msg_update (TLS, M->id);\n      }\n    }\n    break;*/\n  case CODE_update_read_messages_contents:\n    break;\n  case CODE_update_channel_too_long:\n    {\n      tgl_do_get_channel_difference (TLS, DS_LVAL (DS_U->channel_id), NULL, NULL);\n    }\n    break;\n  case CODE_update_channel:\n    break;\n  case CODE_update_channel_group:\n    break;\n  case CODE_update_new_channel_message:\n    {\n      int new_msg = 0;\n      struct tgl_message *M = tglf_fetch_alloc_message (TLS, DS_U->message, &new_msg);\n      if (M && new_msg) {\n        bl_do_msg_update (TLS, &M->permanent_id);\n      }\n    }\n    break;\n  case CODE_update_read_channel_inbox:\n    break;\n  case CODE_update_delete_channel_messages:\n    break;\n  case CODE_update_channel_message_views:\n    break;\n  case CODE_update_chat_admins:\n    break;\n  case CODE_update_chat_participant_admin:\n    break;\n  case CODE_update_new_sticker_set:\n    break;\n  case CODE_update_sticker_sets_order:\n    break;\n  case CODE_update_sticker_sets:\n    break;\n  case CODE_update_saved_gifs:\n    break;\n  case CODE_update_bot_inline_query:\n    break;\n  default:\n    assert (0);\n  }\n  \n  if (check_only) { return; }\n\n  if (DS_U->pts) {\n    assert (DS_U->pts_count);\n\n    bl_do_set_pts (TLS, DS_LVAL (DS_U->pts));\n  }\n  if (DS_U->qts) {\n    bl_do_set_qts (TLS, DS_LVAL (DS_U->qts));\n  }\n  if (DS_U->channel_pts) {\n    assert (DS_U->channel_pts_count);\n    \n    int channel_id;\n    if (DS_U->channel_id) {\n      channel_id = DS_LVAL (DS_U->channel_id);\n    } else {\n      assert (DS_U->message);\n      assert (DS_U->message->to_id);\n      assert (DS_U->message->to_id->magic == CODE_peer_channel);\n      channel_id = DS_LVAL (DS_U->message->to_id->channel_id);\n    }    \n\n    bl_do_set_channel_pts (TLS, channel_id, DS_LVAL (DS_U->channel_pts));\n  }\n}\n\nvoid tglu_work_updates (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n\n  if (!check_only && do_skip_seq (TLS, DS_LVAL (DS_U->seq)) < 0) {\n    return;\n  }\n  int i;\n  if (DS_U->users) {\n    for (i = 0; i < DS_LVAL (DS_U->users->cnt); i++) {\n      tglf_fetch_alloc_user (TLS, DS_U->users->data[i]);    \n    }\n  }\n  if (DS_U->chats) {\n    for (i = 0; i < DS_LVAL (DS_U->chats->cnt); i++) {\n      tglf_fetch_alloc_chat (TLS, DS_U->chats->data[i]);\n    }\n  }\n  if (DS_U->updates) {\n    for (i = 0; i < DS_LVAL (DS_U->updates->cnt); i++) {\n      tglu_work_update (TLS, check_only, DS_U->updates->data[i]);\n    }\n  }\n\n  if (check_only) { return; }\n  bl_do_set_date (TLS, DS_LVAL (DS_U->date));\n  bl_do_set_seq (TLS, DS_LVAL (DS_U->seq));\n}\n\nvoid tglu_work_updates_combined (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n\n  if (!check_only && do_skip_seq (TLS, DS_LVAL (DS_U->seq_start)) < 0) {\n    return;\n  }\n  \n  int i;\n  for (i = 0; i < DS_LVAL (DS_U->users->cnt); i++) {\n    tglf_fetch_alloc_user (TLS, DS_U->users->data[i]);    \n  }\n  for (i = 0; i < DS_LVAL (DS_U->chats->cnt); i++) {\n    tglf_fetch_alloc_chat (TLS, DS_U->chats->data[i]);\n  }\n  for (i = 0; i < DS_LVAL (DS_U->updates->cnt); i++) {\n    tglu_work_update (TLS, check_only, DS_U->updates->data[i]);\n  }\n\n  if (check_only) { return; }\n  bl_do_set_date (TLS, DS_LVAL (DS_U->date));\n  bl_do_set_seq (TLS, DS_LVAL (DS_U->seq));\n}\n\nvoid tglu_work_update_short_message (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n\n  if (!check_only && tgl_check_pts_diff (TLS, DS_LVAL (DS_U->pts), DS_LVAL (DS_U->pts_count)) <= 0) {\n    return;\n  }\n  \n  if (check_only > 0) { return; }\n  \n  //struct tgl_message *N = tgl_message_get (TLS, DS_LVAL (DS_U->id));\n  //int new = (!N || !(N->flags & TGLMF_CREATED));\n  \n  struct tgl_message *M = tglf_fetch_alloc_message_short (TLS, DS_U);\n  \n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n  assert (M);\n\n  if (1) {\n    bl_do_msg_update (TLS, &M->permanent_id);\n  }\n  \n  if (check_only) { return; }\n  bl_do_set_pts (TLS, DS_LVAL (DS_U->pts));\n}\n\nvoid tglu_work_update_short_chat_message (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n\n  if (!check_only && tgl_check_pts_diff (TLS, DS_LVAL (DS_U->pts), DS_LVAL (DS_U->pts_count)) <= 0) {\n    return;\n  }\n  \n  if (check_only > 0) { return; }\n  \n  //struct tgl_message *N = tgl_message_get (TLS, DS_LVAL (DS_U->id));\n  //int new = (!N || !(N->flags & TGLMF_CREATED));\n  \n  struct tgl_message *M = tglf_fetch_alloc_message_short_chat (TLS, DS_U);\n  \n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n  \n  assert (M);\n\n  if (1) {\n    bl_do_msg_update (TLS, &M->permanent_id);\n  }\n\n  if (check_only) { return; }\n  bl_do_set_pts (TLS, DS_LVAL (DS_U->pts));\n}\n\nvoid tglu_work_updates_too_long (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n  vlogprintf (E_NOTICE, \"updates too long... Getting difference\\n\");\n  if (check_only) { return; }\n  tgl_do_get_difference (TLS, 0, 0, 0);\n}\n\nvoid tglu_work_update_short (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n  tglu_work_update (TLS, check_only, DS_U->update);\n}\n\nvoid tglu_work_update_short_sent_message (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U, void *extra) {\n  if (DS_U->pts) {\n    assert (DS_U->pts_count);\n\n    if (!check_only && tgl_check_pts_diff (TLS, DS_LVAL (DS_U->pts), DS_LVAL (DS_U->pts_count)) <= 0) {\n      return;\n    }\n  }\n  struct tgl_message *M = extra;\n\n  if (!M) { return; }\n  \n  //long long random_id = M->permanent_id.id;\n  tgl_message_id_t msg_id = M->permanent_id;\n  msg_id.id = DS_LVAL (DS_U->id);\n  bl_do_set_msg_id (TLS, &M->permanent_id, &msg_id);\n  //tgls_insert_random2local (TLS, random_id, &msg_id);\n\n  int f = DS_LVAL (DS_U->flags);\n\n  unsigned flags = M->flags;\n  if (f & 1) {\n    flags |= TGLMF_UNREAD;\n  }\n  if (f & 2) {\n    flags |= TGLMF_OUT;\n  }\n  if (f & 16) {\n    flags |= TGLMF_MENTION;\n  }\n\n  bl_do_edit_message (TLS, &M->permanent_id, \n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL,\n    NULL, 0,\n    DS_U->media,\n    NULL,\n    NULL,\n    NULL, \n    NULL,\n    flags);\n \n  if (check_only) { return; }\n  bl_do_msg_update (TLS, &M->permanent_id);\n  \n  if (DS_U->pts) {\n    bl_do_set_pts (TLS, DS_LVAL (DS_U->pts));\n  }\n}\n\nvoid tglu_work_any_updates (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U, void *extra) {\n  if (check_only > 0 || (TLS->locks & TGL_LOCK_DIFF)) {\n    return;\n  }\n  switch (DS_U->magic) {\n  case CODE_updates_too_long:\n    tglu_work_updates_too_long (TLS, check_only, DS_U);\n    return;\n  case CODE_update_short_message:\n    tglu_work_update_short_message (TLS, check_only, DS_U);\n    return;\n  case CODE_update_short_chat_message:\n    tglu_work_update_short_chat_message (TLS, check_only, DS_U);\n    return;\n  case CODE_update_short:\n    tglu_work_update_short (TLS, check_only, DS_U);\n    return;\n  case CODE_updates_combined:\n    tglu_work_updates_combined (TLS, check_only, DS_U);\n    return;\n  case CODE_updates:\n    tglu_work_updates (TLS, check_only, DS_U);    \n    return;\n  case CODE_update_short_sent_message:\n    tglu_work_update_short_sent_message (TLS, check_only, DS_U, extra);    \n    return;\n  default:\n    assert (0);\n  }\n}\n\nvoid tglu_work_any_updates_buf (struct tgl_state *TLS) {\n  struct tl_ds_updates *DS_U = fetch_ds_type_updates (TYPE_TO_PARAM (updates));\n  assert (DS_U);\n  tglu_work_any_updates (TLS, 1, DS_U, NULL);\n  tglu_work_any_updates (TLS, 0, DS_U, NULL);\n  free_ds_type_updates (DS_U, TYPE_TO_PARAM (updates)); \n}\n\n#define user_cmp(a,b) (tgl_get_peer_id ((a)->id) - tgl_get_peer_id ((b)->id))\nDEFINE_TREE(user, struct tgl_user *,user_cmp,0)\n\nstatic void notify_status (struct tgl_user *U, void *ex) {\n  struct tgl_state *TLS = ex;\n  if (TLS->callback.user_status_update) {\n    TLS->callback.user_status_update (TLS, U);\n  }\n}\n\nstatic void status_notify (struct tgl_state *TLS, void *arg) {\n  tree_act_ex_user (TLS->online_updates, notify_status, TLS);\n  tree_clear_user (TLS->online_updates);\n  TLS->online_updates = NULL;\n  TLS->timer_methods->free (TLS->online_updates_timer);\n  TLS->online_updates_timer = NULL;\n}\n\nvoid tgl_insert_status_update (struct tgl_state *TLS, struct tgl_user *U) {\n  if (!tree_lookup_user (TLS->online_updates, U)) {\n    TLS->online_updates = tree_insert_user (TLS->online_updates, U, rand ());\n  }\n  if (!TLS->online_updates_timer) {\n    TLS->online_updates_timer = TLS->timer_methods->alloc (TLS, status_notify, 0);\n    TLS->timer_methods->insert (TLS->online_updates_timer, 0);\n  }\n}\n\nstatic void user_expire (struct tgl_state *TLS, void *arg) {\n  struct tgl_user *U = arg;\n  TLS->timer_methods->free (U->status.ev);\n  U->status.ev = 0;\n  U->status.online = -1;\n  U->status.when = tglt_get_double_time ();\n  tgl_insert_status_update (TLS, U);\n}\n\nvoid tgl_insert_status_expire (struct tgl_state *TLS, struct tgl_user *U) {\n  assert (!U->status.ev);\n  U->status.ev = TLS->timer_methods->alloc (TLS, user_expire, U);\n  TLS->timer_methods->insert (U->status.ev, U->status.when - tglt_get_double_time ()); \n}\n\nvoid tgl_remove_status_expire (struct tgl_state *TLS, struct tgl_user *U) {\n  TLS->timer_methods->free (U->status.ev);\n  U->status.ev = 0;\n}\n"
  },
  {
    "path": "updates.h",
    "content": "/* \n    This file is part of tgl-library\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\n    Copyright Vitaly Valtman 2013-2015\n*/\n\n#ifndef __UPDATES_H__\n#define __UPDATES_H__\nstruct tl_ds_updates;\nstruct tl_ds_update;\nvoid tgl_insert_status_update (struct tgl_state *TLS, struct tgl_user *U);\nvoid tgl_insert_status_expire (struct tgl_state *TLS, struct tgl_user *U);\nvoid tgl_remove_status_expire (struct tgl_state *TLS, struct tgl_user *U);\n  \nint tgl_check_pts_diff (struct tgl_state *TLS, int pts, int pts_count);\nvoid tglu_work_update (struct tgl_state *TLS, int check_only, struct tl_ds_update *DS_U);\nvoid tglu_work_updates (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U);\nvoid tglu_work_any_updates_buf (struct tgl_state *TLS);\nvoid tglu_work_any_updates (struct tgl_state *TLS, int check_only, struct tl_ds_updates *DS_U, void *extra);\n#endif\n"
  }
]