From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Sat, 10 Nov 2018 19:36:17 -0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sat_Nov_10_19:36:17_2018-1" X-Trace: blaine.gmane.org 1541907319 30891 195.159.176.226 (11 Nov 2018 03:35:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2018 03:35:19 +0000 (UTC) Cc: 17684@debbugs.gnu.org, 22873@debbugs.gnu.org To: Eli Zaretskii , Marcin Borkowski , Richard Stallman , John Wiegley , Akio Burns , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 04:35:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLgWl-0007r5-FO for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 04:35:13 +0100 Original-Received: from localhost ([::1]:40774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLgYr-0002wa-N7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Nov 2018 22:37:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLgYc-0002wO-9M for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2018 22:37:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLgYY-00051y-Ro for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2018 22:37:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLgYX-0004xY-Qh for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2018 22:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gLgYX-0006Wz-LZ for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2018 22:37:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Nov 2018 03:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.154190738625063 (code B ref 17684); Sun, 11 Nov 2018 03:37:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 11 Nov 2018 03:36:26 +0000 Original-Received: from localhost ([127.0.0.1]:45224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLgXy-0006WA-3p for submit@debbugs.gnu.org; Sat, 10 Nov 2018 22:36:26 -0500 Original-Received: from gateway33.websitewelcome.com ([192.185.146.21]:26917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLgXv-0006Vp-MM for 17684@debbugs.gnu.org; Sat, 10 Nov 2018 22:36:24 -0500 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 7B84D17DCD for <17684@debbugs.gnu.org>; Sat, 10 Nov 2018 21:36:22 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id LgXtgvwTERPojLgXug7naj; Sat, 10 Nov 2018 21:36:22 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Z34wTUNCMb9TdQ9TWp0lWN4nN4RN4AAs/x63M2+rMqY=; b=gK9jMXa0mqeHfKrNYzFSXNxzPi d73ywq9QtnVJguH5J8UdTFl7EsoBfC1a6aW1gQnPxy7djBZywaKRE95lPKge3v73Fo5JaSoRqYI4x zsUoNF6E6f6as1edr0tKKZOtXGoNjDA+XisSa6a1rL2t5/ZhbFPlaipjFUG4GQqndVfrOtmcPscGN jDHJyiOeqXtd/8P/pQlHjvOCC09OXCUE8GvHFEa/J/ol8zHLUUQDMa0Kicf7B7J2B3jeSa7CYOzD9 HHoJMazrjcIpmHLZ4Ey6hSam4mUfb/Z2sq2P31u3i1VC2ccCnPkgg0f0gz04JP3DI4WktWFOVm1le dLl6R8Cw==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:55387 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gLgXq-000nU9-DR; Sat, 10 Nov 2018 21:36:21 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1gLgXq-000nU9-DR X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:55387 X-Source-Auth: lawlist X-Email-Count: 2 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152285 Archived-At: --Multipart_Sat_Nov_10_19:36:17_2018-1 Content-Type: text/plain; charset=US-ASCII Proof concept patch version 015. Changes include, but are not limited to: - Coordinates for the fake cursors are now obtained by effectively dumping the glyph matrix and looking for the desired glyph; e.g., based upon a particular character position in the buffer, or a particular window relative X. [The previous versions relied upon moving IT.] - Multiple fake cursors and crosshairs are now supported in the inactive window. - The foreground filled color of a hollow cursor is now configurable, including, but not limited to when the region inactive, and active region beginning and/or the active region end. - Colors of fake cursors in inactive window can be customized to be different than the active window. - New fringe indicators when engaging different forms of horizontal scrolling. - New fringe indicators when the idle timer for crosshairs is pending. - Other miscellaneous new stuff, but not too significant. - Miscellaneous bug fixes. There are miscellaneous changes to the core of Emacs to facilitate generate tracing/debugging information. Said modifications will eventually be removed. Due to the fact that I do not presently have a computer set up with MacOS Mojave, I cannot test a current version of Emacs master branch that includes the Mojave changes to nsterm.m made by Alan Third some time ago. Based upon the help I received from Alan on the Emacs Devel mailing list, it would appear that simply restoring update_window_cursor to its unmodified state will permit drawing crosshairs and multiple fake cursors on a platform of Emacs for MacOS Mojave. My recollection is that those restrictions were instituted to prevent redisplaying the crosshairs in certain mouseover situations. SETUP: Step 1: git clone -b master git://git.sv.gnu.org/emacs.git Step 2: In the new emacs folder, go back to an Emacs version from 07/07/2018: git reset --hard 98463bed07ecc9057094928ffdc2321eaaf3ab52 [Going back in time to 07/07/2018 saves @lawlist a couple of hours by not having to deal with unrelated recent changes to the master branch by the Emacs team.] Step 3: From within the new emacs folder created in Step 1, apply the patch: git apply /path/to/the/11_10_2018__18_53_09_703.diff [There should not be any error messages at this point; i.e, you should be returned to a new command prompt.] Step 4: ./autogen.sh Step 5: ./configure ... [your custom options] Step 6: make Step 7: make install - To try out built-in fake cursors with Magnar Sveen's library (multiple-cursors), install that package first. If the multiple-cursors package by Magnar Sveen is not already installed, then there are two easy ways to install that package: Type: M-x mc-install OR, evaluate the following snippet: (progn (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'multiple-cursors)) - To try out the crosshairs feature, open a relatively simple buffer (e.g., just code or text) and type: M-x +-mode The default setting is on an idle timer, so just move around or type something to see how it works. - To see an example of a variety of built-in cursor styles and widths, type: M-x mc-test --Multipart_Sat_Nov_10_19:36:17_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="11_10_2018__18_53_09_703.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5lMmIxNmFkCi0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTI0OCBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGx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vYXJkIG1hY3Jvcywgc2luY2UgdGhleSB3aWxsIGdlbmVyYXRlIGFjdHVh bCBjb21tYW5kcyB0aGF0IGFyZQorICAgICAgICAgICAgOzsgYWxzbyBydW4gaW4gdGhlIGNvbW1h bmQgbG9vcCAtIHdlJ2xsIGhhbmRsZSB0aG9zZSBsYXRlciBpbnN0ZWFkLgorICAgICAgICAgICAg KHdoZW4gKGZ1bmN0aW9ucCBvcmlnaW5hbC1jb21tYW5kKQorICAgICAgICAgICAgICA7OyBpZiBp dCdzIGEgbGFtYmRhLCB3ZSBjYW4ndCBrbm93IGlmIGl0J3Mgc3VwcG9ydGVkIG9yIG5vdAorICAg ICAgICAgICAgICA7OyAtIHNvIGdvIGFoZWFkIGFuZCBhc3N1bWUgaXQncyBvaywgYmVjYXVzZSB3 ZSdyZSBqdXN0IG9wdGltaXN0aWMgbGlrZSB0aGF0CisgICAgICAgICAgICAgIChpZiAob3IgKG5v dCAoc3ltYm9scCBvcmlnaW5hbC1jb21tYW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICA7OyBs YW1iZGEgcmVnaXN0ZXJlZCBieSBzbWFydHJlcAorICAgICAgICAgICAgICAgICAgICAgIChzdHJp bmctcHJlZml4LXAgIigiIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAg ICAgICAgICAgICAobWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJzb3JzIG9yaWdp bmFsLWNvbW1hbmQpCisgICAgICAgICAgICAgICAgOzsgc21hcnRyZXAgYGludGVybidzIGNvbW1h bmRzIGludG8gb3duIG9iYXJyYXkgdG8gaGVscAorICAgICAgICAgICAgICAgIDs7IGBkZXNjcmli ZS1iaW5kaW5ncycuICBTbywgbGV0J3MgcmUtYGludGVybicgaGVyZSB0bworICAgICAgICAgICAg ICAgIDs7IG1ha2UgdGhlIGNvbW1hbmQgY29tcGFyYWJsZSBieSBgZXEnLgorICAgICAgICAgICAg ICAgIChzZXRxIG9yaWdpbmFsLWNvbW1hbmQgKGludGVybiAoc3ltYm9sLW5hbWUgb3JpZ2luYWwt Y29tbWFuZCkpKQorICAgICAgICAgICAgICAgIDs7IG90aGVyd2lzZSBpdCdzIGEgc3ltYm9sLCBh bmQgd2UgY2FuIGJlIG1vcmUgdGhvcm91Z2gKKyAgICAgICAgICAgICAgICAoaWYgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpCisgICAgICAgICAgICAgICAgICAgIChtZXNz YWdlICIlUyBpcyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgY3Vyc29ycyVzIgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChnZXQgb3JpZ2luYWwtY29tbWFuZCAnbWMtLXVuc3VwcG9ydGVkKSkKKyAg ICAgICAgICAgICAgICAgICh3aGVuIChhbmQgb3JpZ2luYWwtY29tbWFuZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAobm90IChtZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMtLWRlZmF1bHQt Y21kcy10by1ydW4tb25jZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1l bXEgb3JpZ2luYWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1bi1vbmNlKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKG9yIG1jL2Fsd2F5cy1ydW4tZm9yLWFsbAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRz LXRvLXJ1bi1mb3ItYWxsKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1lbXEg b3JpZ2luYWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1bi1mb3ItYWxsKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAg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W4gU2NyaXB0aW5nIExhbmd1YWdl KS4KK2Buc3Rlcm0ubScgdXNlcyBgTlNDb2xvcicsIHdoaWNoIHdvcmtzIHdlbGwgd2l0aCBMU0wu ICBgdzMydGVybS5jJyB1c2VzCitgUEFMRVRURVJHQicgb3IgYFJHQicsIGFuZCB0aGUgY29udmVy c2lvbiBmcm9tIExTTCBpcyBkb25lIGludGVybmFsbHkgYnkKK211bHRpcGx5aW5nIGVhY2ggZWxl bWVudCBvZiB0aGUgTFNMIGNvbG9yIHZlY3RvciBieSAyNTUuICBgeHRlcm0uYycgdXNlcworYHhf bWFrZV90cnVlY29sb3JfcGl4ZWwnLCB3aGljaCB1c2VzIDE2LWJpdCBSR0IgLS0gdGhlIGNvbnZl cnNpb24gZnJvbSBMU0wKK2hhcHBlbnMgaW50ZXJuYWxseSBieSBtdWx0aXBseWluZyBlYWNoIGVs ZW1lbnQgb2YgdGhlIExTTCBjb2xvciB2ZWN0b3IgYnkgNjU1MzUuIgorKGludGVyYWN0aXZlKQor ICAobGV0ICgoYnVmZmVyIChnZXQtYnVmZmVyLWNyZWF0ZSAiKk1DLVRFU1QqIikpKQorICAgICh3 aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZmZlcgorICAgICAgKGVyYXNlLWJ1ZmZlcikKKyAgICAgIChp bnNlcnQgIlRoaXMgaXMgYSB0ZXN0ISIpCisgICAgICAoc2V0cSBtdWx0aXBsZS1jdXJzb3JzLWNv bmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKDIgImJhciIgInB1cnBsZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoMyAiYm94IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoNSAoImhiYXIiIDMpIFsx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CisoZGVmdW4g Ky1kcmF3LWNyb3NzaGFpcnMgKCZvcHRpb25hbCBmb3JjZSkKKyAgKHdoZW4gKy1tb2RlCisgICAg KHdoZW4gKy10aW1lci12YXIKKyAgICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVscSArLXRp bWVyLXZhciB0aW1lci1pZGxlLWxpc3QpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgbmlsKSkK KyAgICAodW5sZXNzIChtZW1xIHRoaXMtY29tbWFuZCArLXBhcmVucy1leGNsdXNpb25zKQorICAg ICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisgICAgICAocHJv Z24KKyAgICAgICAgKCstcGFyZW5zLWZuKQorICAgICAgICAodW5sZXNzIGNyb3NzaGFpcnMtZHJh dy1mb3J0aHdpdGgKKyAgICAgICAgICAobWMtYWN0aXZhdGUtY3Jvc3NoYWlycyAoc2VsZWN0ZWQt d2luZG93KSkpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGltZXIg Ky1pZGxlLXRpbWVyLXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKzs7OyMjI2F1dG9s b2FkCisoZGVmaW5lLW1pbm9yLW1vZGUgKy1tb2RlCisiTWlub3IgbW9kZSBmb3IgZGlzcGxheWlu ZyBhIGhvcml6b250YWwgcnVsZXIuIgorICA6aW5pdC12YWx1ZSBuaWwKKyAgOmxpZ2h0ZXIgIiAr IgorICA6a2V5bWFwIG5pbAorICA6Z2xvYmFsIG5pbAorICA6Z3JvdXAgJystbW9kZQorICAoY29u ZAorICAgICgrLW1vZGUKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFsLWVsZG9jLW1vZGUKKyAgICAg ICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgICAgICAg ICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKGdsb2JhbC1lbGRv Yy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2stY29udGV4dC10aW1lcgorICAg ICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGlt ZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciBqaXQt bG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEgaml0LWxvY2stY29udGV4dC10 aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxvY2stY29udGV4dC1m b250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciBuaWwpKQorICAg ICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGlt ZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAgICAgIChjYW5jZWwt dGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpKQorICAgICAgICAoZnNldCAn dW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAgICAgKGxhbWJkYSAoKSAoYWRk LXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1idWZmZXJzIChjdXJyZW50LWJ1 ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFsZ2FtYXRlICdpZ25vcmUpKQor ICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKK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Ds7OyBib2dzIEVtYWNzIGRvd24gdW5sZXNzIGBiaWRpLWRpc3BsYXktcmVvcmRlcmluZycg aXMgc2V0IHRvIGEgbmlsIHZhbHVlLgorICAgICAgOzs7IEhvd2V2ZXIsIG1vc3QgdXNlcnMgd2ls bCBwcm9iYWJseSBub3Qgd2FudCB0aGlzIHBhcnRpY3VsYXIgc2V0dGluZy4KKyAgICAgICh1bmxl c3MgKG51bGwgYmlkaS1kaXNwbGF5LXJlb3JkZXJpbmcpCisgICAgICAgIChzZXRxIGJpZGktZGlz cGxheS1yZW9yZGVyaW5nIG5pbCkpCisgICAgICAodW5sZXNzIChhbmQgKGNhbGxlZC1pbnRlcmFj dGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgt YXJnICcoNCkpKQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICcrLS1zYXZlZC1z dGF0ZSkgbmlsKQorICAgICAgICAoZG9saXN0ICh2YXIgJyhidWZmZXItZGlzcGxheS10YWJsZQor ICAgICAgICAgICAgICAgICAgICAgICBmcmluZ2UtaW5kaWNhdG9yLWFsaXN0CisgICAgICAgICAg ICAgICAgICAgICAgIHRhYi13aWR0aAorICAgICAgICAgICAgICAgICAgICAgICBsaW5lLW1vdmUt dmlzdWFsCisgICAgICAgICAgICAgICAgICAgICAgIHRydW5jYXRlLWxpbmVzCisgICAgICAgICAg ICAgICAgICAgICAgIHRydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cworICAgICAgICAgICAg ICAgICAgICAgICB3b3JkLXdyYXApKQorICAgICAgICAgICh3aGVuIChsb2NhbC12YXJpYWJsZS1w IHZhcikKKyAgICAgICAgICAgIChwdXNoIChjb25zIHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICst LXNhdmVkLXN0YXRlKSkpCisgICAgICAgIChzZXRxIGZpbGwtY29sdW1uIDgwKQorICAgICAgICAo c2V0cSBkaXNwbGF5LWxpbmUtbnVtYmVycyB0KQorICAgICAgICAoc2V0cS1sb2NhbCBhdXRvLWhz Y3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQorICAgICAgICAoc2V0cS1sb2NhbCBoc2Nyb2xsLXN0 ZXAgNSkKKyAgICAgICAgKHNldHEgYnVmZmVyLWRpc3BsYXktdGFibGUgKy1idWZmZXItZGlzcGxh eS10YWJsZSkKKyAgICAgICAgKHNldHEgdGFiLXdpZHRoIDQpCisgICAgICAgIChzZXQgKG1ha2Ut bG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpIHQpCisgICAgICAgIChzZXRxIHRydW5j YXRlLWxpbmVzCisgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICgobGV0ICgobHN0ICstdHJ1 bmNhdGUtbGluZXMtZGVyaXZlZC1tb2RlcykKKyAgICAgICAgICAgICAgICAgICAgbW9kZSkKKyAg ICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAgICAgICh3aGlsZSAoc2V0cSBt b2RlIChwb3AgbHN0KSkKKyAgICAgICAgICAgICAgICAgICh3aGVuIChkZXJpdmVkLW1vZGUtcCBt b2RlKQorICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkpKSkKKyAgICAgICAg ICAgICAoKG1lbXEgbWFqb3ItbW9kZSArLXRydW5jYXRlLWxpbmVzLW1ham9yLW1vZGVzKSkKKyAg ICAgICAgICAgICAodAorICAgICAgICAgICAgICAgbmlsKSkpCisgICAgICAgIChzZXQgKG1ha2Ut bG9jYWwtdmFyaWFibGUgJ3RydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cykgbmlsKQorICAg ICAgICAoc2V0cSB3b3JkLXdyYXAgdCkKKyAgICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGlu ZXMgdCkKKyAgICAgICAgKHNldHEgaW5kaWNhdGUtYnVmZmVyLWJvdW5kYXJpZXMgJ2xlZnQpCisg ICAgICAgIChzZXRxIGZyaW5nZS1pbmRpY2F0b3ItYWxpc3QKKyAgICAgICAgICAgIDs7OyBoc2Ns X2FsbF90ZW1wX3AgfCBoc2NsX3RlbXBfcAorICAgICAgICAgICcoKCstaHNjbC10ZW1wIC4gKCst c2luZ2xlLWFuZ2xlLWxlZnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1h bmdsZS1sZWZ0KSkKKyAgICAgICAgICAgIDs7OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxs X3Blcm1fMV9wIHwgaHNjbF9hbGxfcGVybV8yX3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICAg KCstaHNjbC1wZXJtIC4gKCstc2luZ2xlLWFuZ2xlLXVwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKy1kb3VibGUtYW5nbGUtdXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICArLXRy aXBsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICstcXVhZHJ1cGxlLWFu Z2xlLXVwKSkKKyAgICAgICAgICAgICgrLW92ZXJsYXktYXJyb3cgLiAoKy1mcmluZ2UtbGVmdC1h cnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJv dykpCisgICAgICAgICAgICAodHJ1bmNhdGlvbiAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAg ICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAg ICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxlZnQtY3VybHktYXJyb3cKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1iYWNrc2xhc2gpKQorICAgICAgICAgICAgKG92ZXJsYXktYXJy b3cgLiArLWZyaW5nZS1yaWdodC10cmlhbmdsZSkKKyAgICAgICAgICAgICh1cCAuICstZnJpbmdl LXVwLWFycm93KQorICAgICAgICAgICAgKGRvd24gLiArLWZyaW5nZS1kb3duLWFycm93KQorICAg ICAgICAgICAgKHRvcCAuICstZnJpbmdlLXRvcC1sZWZ0LWFuZ2xlKQorICAgICAgICAgICAgKGJv dHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAgICAgICAgICh0b3AtYm90 dG9tIC4gKCstZnJpbmdlLWxlZnQtYnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICAg Ky1mcmluZ2UtcmlnaHQtYnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmlu Z2UtdG9wLXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS10 b3AtbGVmdC1hbmdsZSkpCisgICAgICAgICAgICAoZW1wdHktbGluZSAuICstZnJpbmdlLWVtcHR5 LWxpbmUpCisgICAgICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmspKSkK KyAgICAgICAgKHNldHEgZnJpbmdlLWN1cnNvci1hbGlzdCAnKChib3ggLiArLWZyaW5nZS1sZWZ0 LXRyaWFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdyAu ICstaG9sbG93LXJlY3RhbmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChiYXIgLiArLXZlcnRpY2FsLWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChoYmFyIC4gKy1mcmluZ2UtaG9yaXpvbnRhbC1iYXIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoaG9sbG93LXNtYWxsIC4gKy1mcmluZ2UtaG9sbG93LXNxdWFyZSkp KQorICAgICAgICAoaWYgY3Jvc3NoYWlycy1kcmF3LWZvcnRod2l0aAorICAgICAgICAgIChhZGQt aG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1mb3J0aHdpdG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AgICAgICAocG9pbnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxl Y3RlZC13aW5kb3cpKQorICAgICAgICAgKGkgMCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAo cHJlY2VkaW5nLWNoYXIpKQorICAgICAgICAgKG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisg ICAgICAgICAocG9zMQorICAgICAgICAgICAoY29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFy CisgICAgICAgICAgICAgICAgICAgKG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5p bmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAg ICAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1 YXJlIGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAg ICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkg YnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAg ICAgICAgICAobWluICgxKyBvcG9pbnQpIChwb2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9y IDs7OyAoY2hhci10by1zdHJpbmcgNDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAg ICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChj aGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2luZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAg ICAgICAgKD0gcHJlY2VkaW5nLWNoYXIgOTMpCisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXIt dG8tc3RyaW5nIDEyNSkgPT4gY2xvc2luZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAg ICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCisgICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWlu KSAoMS0gb3BvaW50KSkpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQp KSkKKyAgICAgICAgIHBvczIKKyAgICAgICAgIHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhj dXJzaW9uCisgICAgICAoY29uZGl0aW9uLWNhc2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBw b3MxIChudGggMSAocGFyc2UtcGFydGlhbC1zZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChz ZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAxKSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAg ICAgICAgICAgIChzZXRxIGkgMSkKKyAgICAgICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAg ICAgICAoc2V0cSBzZWxlY3RlZC1mYWNlIChjb25kCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFy ZW5zLW9uZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZm91ci1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA1KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZl LWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA3KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKD0gaSA4KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy1laWdodC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2Up CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChs ZXQgKChvdiAobWFrZS1vdmVybGF5IHBvczEgKDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5s ZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0 IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxl Y3RlZC1mYWNlKSkKKyAgICAgICAgICAod2hlbiBwb3MyCisgICAgICAgICAgICAobGV0ICgob3Yg KG1ha2Utb3ZlcmxheSAoMS0gcG9zMikgcG9zMikpKQorICAgICAgICAgICAgICAodW5sZXNzICst cGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAgICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3Yg J3dpbmRvdyB3aW4pKQorICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0 ZWQtZmFjZSkpKSkKKyAgICAgICAgKGVycm9yIG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92 ZXJsYXlzLWV4aXN0LXAgdCkpKQorCisoZGVmdW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQg bmFtZSB2YWwpCisiUmVtb3ZlIHRoZSBvdmVybGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5n LXByb3BlcnRpZXNgLgorSW5jbHVkZXMgYSB1bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3Zlcmxh eSB3aXRoIGFuIGAnYWZ0ZXItc3RyaW5nYCBwcm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9m IGEgbmFycm93ZWQtYnVmZmVyLiIKKyAgKGxldCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisg ICAgICAgICAocG9pbnQtbWluIChwb2ludC1taW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1 ZmZlci1uYXJyb3dlZC1wKSkKKyAgICAgICAgIChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkK KyAgICAgICAgIChlbmQKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAg ICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAg ICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAo bm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAg ICAgICBwb2ludC1tYXgpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFy cm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBv aW50LW1heCkpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAg ICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAg ICAgICAgKD0gZW5kIHBvaW50LW1heCkpCisgICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAg ICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAg ICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAg ICAgIChvdmVybGF5cworICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1y ZWNlbnRlciBlbmQpCisgICAgICAgICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAg KHdoZW4gKGFuZCBiZWcgZW5kIG5hbWUgdmFsKQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykK KyAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAg ICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVp dGhlciBwdXNoIHRoaXMgb3ZlcmxheSBvdXRzaWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsg b3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0 ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAg ICAgICAoaWYgKDwgKG92ZXJsYXktc3RhcnQgbykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAg ICAgICAobW92ZS1vdmVybGF5IChjb3B5LW92ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChv dmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5k IChvdmVybGF5LWVuZCBvKSkpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92 ZXJsYXktc3RhcnQgbykgYmVnKSkKKyAgICAgICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBv KSBlbmQpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVu ZCBvKSkKKyAgICAgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAo KGFuZCAobm90IChlcSBuYW1lICdmYWNlKSkKKyAgICAgICAgICAgICAgICAoZXF1YWwtaW5jbHVk aW5nLXByb3BlcnRpZXMgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIChk ZWxldGUtb3ZlcmxheSBvKSkpKSkpKQorCisoZGVmdW4gKy1kZWxldGUtcGFyZW5zLW92ZXJsYXlz ICgpCisgICh3aGVuICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAKKyAgICAoZG9saXN0IChmYWNl ICcoKy1wYXJlbnMtb25lLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtdHdvLWZh Y2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtdGhyZWUtZmFjZQorICAgICAgICAgICAg ICAgICAgICArLXBhcmVucy1mb3VyLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMt Zml2ZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXNpeC1mYWNlCisgICAgICAg ICAgICAgICAgICAgICstcGFyZW5zLXNldmVuLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1w YXJlbnMtZWlnaHQtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1uaW5lLWZhY2UK KyAgICA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XIgcmV0YWlucyBpdHMgb3duIGZvcmVncm91bmQgY29sb3IgYW5kIGlzIHVuYWZmZWN0ZWQgYnkg dGhpcworcGFydGljdWxhciBmYWNlLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICst b3ZlcmxheS1hcnJvdy1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJyZWQiKSkpCisgICJGYWNl IGZvciBgKy1vdmVybGF5LWFycm93LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZm YWNlICstb3ZlcmxheS1hcnJvdy1taW5pbWFsLWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgImJs dWUiKSkpCisgICJGYWNlIGZvciBgKy1vdmVybGF5LWFycm93LW1pbmltYWwtZmFjZScuIgorICA6 Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1vdmVybGF5LWFycm93LWluYWN0aXZlLWZhY2UK KyAgJygodCAoOmZvcmVncm91bmQgIkRhcmtTbGF0ZUdyZXkiKSkpCisgICJGYWNlIGZvciBgKy1v dmVybGF5LWFycm93LWluYWN0aXZlLWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZm YWNlICstb3ZlcmxheS1hcnJvdy1oc2NsLWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgIkRhcmtH cmVlbiIpKSkKKyAgIkZhY2UgZm9yIGArLW92ZXJsYXktYXJyb3ctaHNjbC1mYWNlJy4iCisgIDpn cm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLW92ZXJsYXktYXJyb3ctaHNjbC1taW5pbWFsLWZh Y2UKKyAgJygodCAoOmZvcmVncm91bmQgIlNhZGRsZUJyb3duIikpKQorICAiRmFjZSBmb3IgYCst b3ZlcmxheS1hcnJvdy1oc2NsLW1pbmltYWwtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKwor KGRlZmZhY2UgKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3RpdmUt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KioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisjZGVm aW5lIE1BWF9QRVJfQlVGRkVSX1ZBUlMgNjAKICAgY2hhciBsb2NhbF9mbGFnc1tNQVhfUEVSX0JV RkZFUl9WQVJTXTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBTZXQgdG8g dGhlIG1vZHRpbWUgb2YgdGhlIHZpc2l0ZWQgZmlsZSB3aGVuIHJlYWQgb3Igd3JpdHRlbi4KICAg ICAgbW9kdGltZS50dl9uc2VjID09IE5PTkVYSVNURU5UX01PRFRJTUVfTlNFQ1MgbWVhbnMKICAg ICAgdmlzaXRlZCBmaWxlIHdhcyBub25leGlzdGVudC4gIG1vZHRpbWUudHZfbnNlYyA9PQpAQCAt OTE4LDYgKzk2Myw3NCBAQCBYQlVGRkVSIChMaXNwX09iamVjdCBhKQogLyogTW9zdCBjb2RlIHNo b3VsZCB1c2UgdGhlc2UgZnVuY3Rpb25zIHRvIHNldCBMaXNwIGZpZWxkcyBpbiBzdHJ1Y3QKICAg IGJ1ZmZlci4gIChTb21lIHNldHRlcnMgdGhhdCBhcmUgcHJpdmF0ZSB0byBhIHNpbmdsZSAuYyBm aWxlIGFyZQogICAgZGVmaW5lZCBhcyBzdGF0aWMgaW4gdGhvc2UgZmlsZXMuKSAgKi8KKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworSU5MSU5F IHZvaWQKK2JzZXRfYmx2X21jX3JlYWxfZmFrZV9jdXJzb3IgKHN0cnVjdCBidWZmZXIgKmIsIExp c3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+bWNfcm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0aWNhbF9ydWxlcl8gPSB2YWw7Cit9CisKK0lOTElO RSB2b2lkCitic2V0X2Jsdl9jcm9zc2hhaXJzX2RyYXdfZm9ydGh3aXRoIChzdHJ1Y3QgYnVmZmVy ICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmNyb3NzaGFpcnNfZHJhd19mb3J0aHdpdGhf ID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfY3Jvc3NoYWlyc19pbmFjdGl2ZV93 aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmNyb3Nz aGFpcnNfaW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Js dl9tY19zdGRlcnIgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+ bWNfc3RkZXJyXyA9IHZhbDsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogSU5M SU5FIHZvaWQKIGJzZXRfYmlkaV9wYXJhZ3JhcGhfZGlyZWN0aW9uIChzdHJ1Y3QgYnVmZmVyICpi LCBMaXNwX09iamVjdCB2YWwpCiB7CmRpZmYgLS1naXQgYS9zcmMvZGlzcGV4dGVybi5oIGIvc3Jj L2Rpc3BleHRlcm4uaAppbmRleCAyMTgwYzlhLi5iZDZhZmZiIDEwMDY0NAotLS0gYS9zcmMvZGlz cGV4dGVybi5oCisrKyBiL3NyYy9kaXNwZXh0ZXJuLmgKQEAgLTk0LDYgKzk0LDI4IEBAIHR5cGVk ZWYgaW50IEN1cnNvcjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2VuZGlmCiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKK2VudW0g bWNfdHlwZXMKK3sKKyAgTk9fRkxBVk9SLAorICBNQ19HTFlQSCwKKyAgTUNfR0xZUEhMRVNTLAor ICBNQ19HTFlQSF9UQUIsCisgIE1DX09WRVJMQVlfQVJST1dfQklUTUFQLAorICBNQ19QSUxDUk9X LAorICBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XLAorICBNQ19IT0xMT1dfUkVDVEFO R0xFLAorICBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgIE1DX1ZFUlRJQ0FMX0JBUiwK KyAgTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorfTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogLyogVGV4dCBjdXJzb3IgdHlwZXMuICAqLwogCiBlbnVtIHRleHRfY3Vyc29yX2tp bmRzCkBAIC0zNzYsNiArMzk4LDE4IEBAIHN0cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1Y3QgZ2x5 cGgKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMg Ki8KKworICBpbnQgeCwgeSwgaHBvcywgdnBvczsKKworICBib29sX2JmIHp2X3AgOiAxOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFBvc2l0aW9uIGZyb20gd2hpY2ggdGhp cyBnbHlwaCB3YXMgZHJhd24uICBJZiBgb2JqZWN0JyBiZWxvdyBpcyBhCiAgICAgIExpc3Agc3Ry aW5nLCB0aGlzIGlzIGFuIGluZGV4IGludG8gdGhhdCBzdHJpbmcuICBJZiBpdCBpcyBhCiAgICAg IGJ1ZmZlciwgdGhpcyBpcyBhIHBvc2l0aW9uIGluIHRoYXQgYnVmZmVyLiAgSW4gYWRkaXRpb24s IHNvbWUKQEAgLTIyMTAsNiArMjI0NCwxNiBAQCBzdHJ1Y3QgY29tcG9zaXRpb25faXQKIAogc3Ry dWN0IGl0CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgYm9vbF9iZiB6dl9wIDogMTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAvKiBUaGUgd2luZG93IGluIHdoaWNoIHdlIGl0ZXJhdGUgb3ZlciBjdXJyZW50X2J1 ZmZlciAob3IgYSBzdHJpbmcpLiAgKi8KICAgTGlzcF9PYmplY3Qgd2luZG93OwogICBzdHJ1Y3Qg d2luZG93ICp3OwpkaWZmIC0tZ2l0IGEvc3JjL2ZyaW5nZS5jIGIvc3JjL2ZyaW5nZS5jCmluZGV4 IDYwNjkxODQuLmI1YzJkYzIgMTAwNjQ0Ci0tLSBhL3NyYy9mcmluZ2UuYworKysgYi9zcmMvZnJp bmdlLmMKQEAgLTQzMyw2ICs0MzMsNDAyIEBAIHN0YXRpYyB1bnNpZ25lZCBzaG9ydCBlbXB0eV9s aW5lX2JpdHNbXSA9IHsKICAgMHgwMCwgMHgzYywgMHgwMCwgMHgwMCwgMHgzYywgMHgwMCwgMHgw MCwgMHgzYywgMHgwMH07CiAKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBN VUxUSVBMRSBDVVJTT1JTICovCisKKy8qIGArLWZyaW5nZS1oZWxwZXItZGVjaW1hbCcgZGVmaW5l ZCBpbiBgY3Jvc3NoYWlycy5lbGAgKi8KKworLyogMjQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54 eC4iCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eC4i CisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3dfYml0c1tdID17CisgIDB4ODAsIDB4ODAs IDB4ODAsIDB4OTgsIDB4OGMsIDB4ODYsIDB4YmYsCisgIDB4YmYsIDB4ODYsIDB4OGMsIDB4OTgs IDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAyNQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRl Y2ltYWwKKyAgICAgICJ4eHh4eHh4eCIKKyAgICAgICJ4Li4uLi4ueCIKKyAgICAgICJ4Li4uLi4u eCIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAgICJ4Li4ueHgueCIKKyAgICAgICJ4Li4uLnh4eCIK KyAgICAgICJ4Lnh4eHh4eCIKKyAgICAgICJ4Lnh4eHh4eCIKKyAgICAgICJ4Li4uLnh4eCIKKyAg ICAgICJ4Li4ueHgueCIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAgICJ4Li4uLi4ueCIKKyAgICAg ICJ4Li4uLi4ueCIKKyAgICAgICJ4eHh4eHh4eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0 IG1jX2hvbGxvd19y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4uLiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIK KyAgICAgICJ4Li4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3ZlcnRpY2Fs X2Jhcl9iaXRzW10gPXsKKyAgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4 MCwKKyAgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MH07CisKKy8qIDI4 CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAg ICAgInh4Li4uLi4uIgorICAgICAgIiB4eC4uLi4uIgorICAgICAgIi54eC4uLi4uIgorICAgICAg Ii4ueHguLi4uIgorICAgICAgIi4ueHguLi4uIgorICAgICAgIi4uLnh4Li4uIgorICAgICAgIi4u Lnh4Li4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi4u eHguIgorICAgICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4 IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfYmFja3NsYXNoX2JpdHNbXSA9eworICAw eGMwLCAweGMwLCAweGUwLCAweDYwLCAweDMwLCAweDMwLCAweDE4LCAweDE4LCAweGMsIDB4Yywg MHg2LCAweDYsIDB4MywgMHgzfTsKKworLyogMjkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAieHguLi4uLi4iCisgICAgICAieHguLi4uLi4iCisgICAgICAieHh4Li4u Li4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAieC54eC4uLi4iCisgICAgICAieC54eC4uLi4i CisgICAgICAieC4ueHguLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4iCisg ICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLi54eC4iCisgICAg ICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2JpdHNbXSA9eworICAweGMwLCAweGMwLCAweGUw LCAweGUwLCAweGIwLCAweGIwLCAweDk4LAorICAweDk4LCAweDhjLCAweDhjLCAweDg2LCAweDg2 LCAweDgzLCAweDgzfTsKKworLyogMzAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAiLnh4eHh4eC4iCisgICAgICAieHh4eC54Li4iCisgICAgICAieHh4eC54Li4iCisg ICAgICAieHh4eC54Li4iCisgICAgICAiLnh4eC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAg ICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAi Li4ueC54Li4iCisgICAgICAiLi4ueC54Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19waWxjcm93X2JpdHNbXSA9eworICAweDdlLCAweGY0LCAweGY0LCAweGY0LCAweDc0LCAweDE0 LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0fTsKKworLyogMzEKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54eHh4Li4iCisgICAgICAiLnh4eHh4eC4iCisg ICAgICAieC4ueHguLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieHh4eHh4eHgiCisgICAg ICAieHguLi4ueHgiCisgICAgICAieHh4Li54eHgiCisgICAgICAiLnh4eHh4eC4iCisgICAgICAi Li54eHh4Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zbWlsZXlfZmFjZV9iaXRz W10gPXsKKyAgMHgzYywgMHg3ZSwgMHg5OSwgMHg5OSwgMHhmZiwgMHhjMywgMHhlNywgMHg3ZSwg MHgzY307CisKKy8qIDMyCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAg Ii4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4u Li4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4u Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX3JpZ2h0X2Jp dHNbXSA9eworICAweDIwLCAweDEwLCAweDgsIDB4NCwgMHg4LCAweDEwLCAweDIwfTsKKworLyog MzMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi54Li4iCisg ICAgICAiLi4uLnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54Li4uLi4iCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4uLi54Li4iKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHg0 LCAweDgsIDB4MTAsIDB4MjAsIDB4MTAsIDB4OCwgMHg0fTsKKworLyogMzQKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4i CisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisg ICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0c1tdID17CisgIDB4ZDgsIDB4NmMsIDB4MzYs IDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDh9OworCisvKiAzNQorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIu eHgueHguLiIKKyAgICAgICJ4eC54eC4uLiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICIuLnh4 Lnh4LiIKKyAgICAgICIuLi54eC54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2Rv dWJsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDFiLCAweDM2LCAweDZjLCAweGQ4LCAweDZj LCAweDM2LCAweDFifTsKKworLyogMzYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4iCisg ICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisgICAg ICAieC54LnguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVf cmlnaHRfYml0c1tdID17CisgIDB4YTgsIDB4NTQsIDB4MmEsIDB4MTUsIDB4MmEsIDB4NTQsIDB4 YTh9OworCisvKiAzNworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIu Li54LngueCIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICJ4Lngu eC4uLiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIuLi54Lngu eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV9sZWZ0X2JpdHNb XSA9eworICAweDE1LCAweDJhLCAweDU0LCAweGE4LCAweDU0LCAweDJhLCAweDE1fTsKKworLyog MzgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi eC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19z aW5nbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MTAs IDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiAzOQorICAg ICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4u Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4u LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9h bmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDgyLCAweDQ0 LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDAKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY19kb3VibGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MTAs IDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDB9Owor CisvKiA0MQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4u LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAg ICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAg ICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3Rh dGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAw LCAweDAwLCAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEwLCAw eDAwLCAweDAwLCAweDAwfTsKKworLyogNDIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAs IDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4 ODIsIDB4MDB9OworCisvKiA0MworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAg ICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIu LngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVu c2lnbmVkIHNob3J0IG1jX3F1YWRydXBsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAw eDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEw LCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi eC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4u eC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4i KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfdXBfYml0c1td ID17CisgIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4 NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODJ9OworCisvKiA0NQorICAgICgrLWZyaW5nZS1oZWxw ZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIu LngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIuLi54Li4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBs ZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAw eDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEwfTsKKworLyogVE9E TzogIEFkZCB0aGUgZm9sbG93aW5nIGJpdG1hcHM6CisgIChkZWZpbmUtZnJpbmdlLWJpdG1hcCAn YnJlYWtwb2ludCAiXHgzY1x4N2VceGZmXHhmZlx4ZmZceGZmXHg3ZVx4M2MiKQorICAoZGVmaW5l LWZyaW5nZS1iaXRtYXAgJ2hvbGxvdy1yaWdodC10cmlhbmdsZSAiXHhlMFx4OTBceDg4XHg4NFx4 ODRceDg4XHg5MFx4ZTAiKSAqLworCisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBCWVRFU19QRVJfQklUTUFQX1JPVyAgKHNp emVvZiAodW5zaWduZWQgc2hvcnQpKQogI2RlZmluZSBTVEFOREFSRF9CSVRNQVBfSEVJR0hUKGJp dHMpIChzaXplb2YgKGJpdHMpL0JZVEVTX1BFUl9CSVRNQVBfUk9XKQogI2RlZmluZSBGUkJJVFMo Yml0cykgIGJpdHMsIFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGJpdHMpCkBAIC00NjYsNiArODYy LDU5IEBAIHN0YXRpYyBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCBzdGFuZGFyZF9iaXRtYXBzW10gPQog ICB7IEZSQklUUyAodmVydGljYWxfYmFyX2JpdHMpLCAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCiAgIHsgRlJCSVRTIChob3Jpem9udGFsX2Jhcl9iaXRzKSwgICAgIDgsIDAs IEFMSUdOX0JJVE1BUF9CT1RUT00sIDAgfSwKICAgeyBGUkJJVFMgKGVtcHR5X2xpbmVfYml0cyks ICAgICAgICAgOCwgMywgQUxJR05fQklUTUFQX1RPUCwgICAgMCB9LAorCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIC8qIDI0ICovCisgIHsg RlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3dfYml0cyksICAgICA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI1ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3df cmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHMpLCA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisgIC8qIDI2ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHMpLCAg ICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI3ICovCisg IHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYml0cyksICAgICAgICAgICAgICAgICA4LCAwLCBB TElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI4ICovCisgIHsgRlJCSVRTIChtY19iYWNr c2xhc2hfYml0cyksICAgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVS LCAwIH0sCisgIC8qIDI5ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNo X2JpdHMpLCAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMwICov CisgIHsgRlJCSVRTIChtY19waWxjcm93X2JpdHMpLCAgICAgICAgICAgICAgICAgICAgICA4LCAw LCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMxICovCisgIHsgRlJCSVRTIChtY19z bWlsZXlfZmFjZV9iaXRzKSwgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VO VEVSLCAwIH0sCisgIC8qIDMyICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfcmlnaHRf Yml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMz ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM0ICovCisgIHsgRlJCSVRTICht Y19kb3VibGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCisgIC8qIDM1ICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfbGVm dF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8q IDM2ICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAg ICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM3ICovCisgIHsgRlJCSVRT IChtY190cmlwbGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRN QVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM4ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVf dXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisg IC8qIDM5ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAg ICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQwICovCisgIHsgRlJC SVRTIChtY19kb3VibGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9C SVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQxICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5n bGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0s CisgIC8qIDQyICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfdXBfYml0cyksICAgICAg ICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQzICovCisgIHsg RlJCSVRTIChtY190cmlwbGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQ0ICovCisgIHsgRlJCSVRTIChtY19xdWFkcnVw bGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisgIC8qIDQ1ICovCisgIHsgRlJCSVRTIChtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRz KSwgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIH07CiAKICNkZWZpbmUgTk9fRlJJTkdFX0JJVE1BUCAwCkBAIC0x NzE1LDYgKzIxNjQsMTUwIEBAIElmIG5pbCwgYWxzbyBjb250aW51ZSBsaW5lcyB3aGljaCBhcmUg ZXhhY3RseSBhcyB3aWRlIGFzIHRoZSB3aW5kb3cuICAqLyk7CiAgIERFRlZBUl9MSVNQICgiZnJp bmdlLWJpdG1hcHMiLCBWZnJpbmdlX2JpdG1hcHMsCiAgICAgZG9jOiAvKiBMaXN0IG9mIGZyaW5n ZSBiaXRtYXAgc3ltYm9scy4gICovKTsKICAgVmZyaW5nZV9iaXRtYXBzID0gUW5pbDsKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAvKiAoZ2V0ICdlbXB0eS1saW5lICdmcmluZ2UpID0+IDIzID0+IHRoZSBsYXN0IHN0YW5kYXJk LWJpdG1hcCBiZWZvcmUgdGhpcyBvbmUuCisgIFNlZSBgZnJpbmdlLmVsYC4gKi8KKworICAvKiAy NCAqLworICBERUZTWU0gKFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3csICIrLXZ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CAt MTIyNCw2ICsxMjI0LDI5IEBAIHN0YXRpYyBpbnQgcmVhZF9rZXlfc2VxdWVuY2UgKExpc3BfT2Jq ZWN0ICosIExpc3BfT2JqZWN0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCwg Ym9vbCwgYm9vbCwgYm9vbCk7CiBzdGF0aWMgdm9pZCBhZGp1c3RfcG9pbnRfZm9yX3Byb3BlcnR5 IChwdHJkaWZmX3QsIGJvb2wpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCitzdGF0aWMgdm9pZAora2JkX21jX2FjdGl2YXRlX211bHRpcGxl X2N1cnNvcnMgKHZvaWQpCit7CisgIHN0cnVjdCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5k b3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHctPm1jLmRyYXdfbXVsdGlwbGVfY3Vyc29ycyA9IHRy dWU7CisgIHctPm1jLmVyYXNlX211bHRpcGxlX2N1cnNvcnMgPSB0cnVlOworfQorCitzdGF0aWMg dm9pZAora2JkX21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMgKHZvaWQpCit7CisgIHN0cnVjdCB3aW5k b3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHctPm1jLmRy YXdfY3Jvc3NoYWlycyA9IHRydWU7CisgIHctPm1jLmVyYXNlX2Nyb3NzaGFpcnMgPSB0cnVlOwor fQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBMaXNwX09iamVjdAogY29tbWFuZF9s b29wXzEgKHZvaWQpCiB7CkBAIC0xNDE5LDYgKzE0NDIsMTUgQEAgY29tbWFuZF9sb29wXzEgKHZv aWQpCiAgICAgICBWcmVhbF90aGlzX2NvbW1hbmQgPSBjbWQ7CiAgICAgICBzYWZlX3J1bl9ob29r cyAoUXByZV9jb21tYW5kX2hvb2spOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBrYmRfbWNfYWN0aXZhdGVfbXVsdGlwbGVfY3Vy c29ycyAoKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgYWxyZWFkeV9h ZGp1c3RlZCA9IDA7CiAKICAgICAgIGlmIChOSUxQIChWdGhpc19jb21tYW5kKSkKQEAgLTI0NDgs NyArMjQ4MCw3IEBAIHJlYWRfY2hhciAoaW50IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAs CiAJICBpZiAoaGVscF9lY2hvX3Nob3dpbmdfcCAmJiAhRVEgKHNlbGVjdGVkX3dpbmRvdywgbWlu aWJ1Zl93aW5kb3cpKQogCSAgICByZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhICg1KTsKIAkg IGVsc2UKLQkgICAgcmVkaXNwbGF5ICgpOworCSAgICByZWRpc3BsYXkgKDEpOwogCiAJICBpZiAo IWlucHV0X3BlbmRpbmcpCiAJICAgIC8qIE5vcm1hbCBjYXNlOiBubyBpbnB1dCBhcnJpdmVkIGR1 cmluZyByZWRpc3BsYXkuICAqLwpAQCAtMjYyOCw3ICsyNjYwLDcgQEAgcmVhZF9jaGFyIChpbnQg Y29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICB7CiAgICAgICBGZG9fYXV0b19zYXZl IChRbmlsLCBRbmlsKTsKICAgICAgIC8qIEhvb2tzIGNhbiBhY3R1YWxseSBjaGFuZ2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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICByLm9yaWdpbi54ID0g KHctPm1jLmZ4ID4gMCkKKyAgICAgICAgICAgICAgID8gdy0+bWMuZngKKyAgICAgICAgICAgICAg IDogZng7CisgIHIub3JpZ2luLnkgPSAody0+bWMuZnkgPiAwKQorICAgICAgICAgICAgICAgPyB3 LT5tYy5meQorICAgICAgICAgICAgICAgOiBmeTsKKyAgci5zaXplLmhlaWdodCA9ICh3LT5tYy5o ID4gMCkKKyAgICAgICAgICAgICAgICAgID8gdy0+bWMuaAorICAgICAgICAgICAgICAgICAgOiBo OwogICByLnNpemUud2lkdGggPSB3LT5waHlzX2N1cnNvcl93aWR0aDsKIAorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICAvKiBQcmV2ZW50IHRoZSBjdXJzb3IgZnJvbSBiZWluZyBkcmF3 biBvdXRzaWRlIHRoZSB0ZXh0IGFyZWEuICAqLwogICBuc19jbGlwX3RvX3JvdyAodywgZ2x5cGhf cm93LCBURVhUX0FSRUEsIE5PKTsgLyogZG8gbnNfZm9jdXMoZiwgJnIsIDEpOyBpZiByZW1vdmUg Ki8KIAogCiAgIGZhY2UgPSBGQUNFX0ZST01fSURfT1JfTlVMTCAoZiwgcGh5c19jdXJzb3JfZ2x5 cGgtPmZhY2VfaWQpOwotICBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpCi0g ICAgICA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCi0gICAg ewotICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGZh Y2UpLCBmKSBzZXRdOwotICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChm KTsKLSAgICB9Ci0gIGVsc2UKLSAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUgQ1VSU09SUyAqLwor CisvKiBFWEFNUExFIE9GIEhPVyBUTyBMT09LLVVQIEEgQ09MT1I6CisgIGVudW0gZmFjZV9pZCBm YWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistdmVydGljYWwtYmFy LWZhY2UiKSwgdHJ1ZSk7CisgIHN0cnVjdCBmYWNlICpmYWNlID0gRkFDRV9GUk9NX0lEIChmLCBm YWNlX2lkKTsKKyAgTlNDb2xvciAqY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNf RkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgZik7CisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBm YWNlLT5sZmFjZVtMRkFDRV9GT1JFR1JPVU5EX0lOREVYXTsKKyAgTGlzcF9PYmplY3QgYmFja2dy b3VuZCA9IGZhY2UtPmxmYWNlW0xGQUNFX0JBQ0tHUk9VTkRfSU5ERVhdOworICBmcHJpbnRmIChz dGRlcnIsICJcbmZvcmVncm91bmQgKCVzKSB8IGJhY2tncm91bmQgKCVzKVxuIiwKKyAgICAgICAg ICAgICAgICAgICAoIU5JTFAgKGZvcmVncm91bmQpID8gU1NEQVRBIChmb3JlZ3JvdW5kKSA6ICJO SUxQIiksCisgICAgICAgICAgICAgICAgICAgKCFOSUxQIChiYWNrZ3JvdW5kKSA/IFNTREFUQSAo YmFja2dyb3VuZCkgOiAiTklMUCIpKTsgKi8KKworICBpZiAody0+bWMuZ2x5cGhfZmxhdm9yID09 IE1DX0dMWVBICisgICAgICB8fCB3LT5tYy5nbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTCisg ICAgICB8fCB3LT5tYy5nbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhfVEFCKQorICAgIHsKKyAgICAg IFtbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiB3LT5tYy5yZWQgZ3JlZW46IHctPm1j LmdyZWVuIGJsdWU6IHctPm1jLmJsdWUgYWxwaGE6IDEuMF0gc2V0XTsKKyAgICAgIExpc3BfT2Jq ZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOworICAgICAgQ0hFQ0tfQlVGRkVSIChidWYpOworICAgICAg c3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1Zik7CisgICAgICBib29sIHJlZ2lvbl9hY3Rp dmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICBwdHJk aWZmX3QgcmVnaW9uX2JlZ2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lv bl9iZWdpbm5pbmcgKCkpIDogLTE7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdp b25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lvbl9lbmQgKCkpIDogLTE7CisgICAgICBib29sIHJl Z2lvbl9pbl9ib3VuZHNfcCA9IChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPm1jLnBvc2ludCA+PSByZWdpb25fYmVnaW5uaW5nCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tYy5wb3NpbnQgPCByZWdpb25fZW5kKTsK KyAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAmJiByZWdpb25faW5fYm91bmRz X3AKKyAgICAgICAgICA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gICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9 IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5h Y3RpdmUtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93 X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lk KTsKKyAgICAgICAgICAgICAgICBOU0NvbG9yICpob2xsb3dfaW5hY3RpdmVfY29sb3IgPSBuc19s b29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3dfaW5hY3RpdmVf ZmFjZSksIGYpOworICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19pbmFjdGl2 ZV9jb2xvcjsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChmYWNlICYm IE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSkgPT0gbnNfaW5kZXhfY29sb3IgKEZSQU1FX0NVUlNP Ul9DT0xPUiAoZiksIGYpKQorICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IEZSQU1FX0NV UlNPUl9DT0xPUiAoZik7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqZGVmYXVsdF9iZ19mYWNlID0gRkFD RV9GUk9NX0lEIChmLCBERUZBVUxUX0ZBQ0VfSUQpOworICAgICAgICAgICAgICAgICAgICBbbnNf bG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoZGVmYXVsdF9iZ19mYWNl KSwgZikgc2V0XTsKKyAgICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VS U09SX0NPTE9SIChmKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAo ZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFN RV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKyAgICAgIHsKKyAgICAgICAgW25zX2xvb2t1cF9pbmRl eGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGZhY2UpLCBmKSBzZXRdOworICAgICAgICBo b2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09MT1IgKGYpOworICAgICAgfQorICAgICAgZWxz ZQorICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworCisvKiBlbmQgTVVMVElQ TEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogI2lmZGVmIE5TX0lN UExfQ09DT0EKICAgLyogVE9ETzogVGhpcyBtYWtlcyBkcmF3aW5nIG9mIGN1cnNvciBwbHVzIHRo YXQgb2YgcGh5c19jdXJzb3JfZ2x5cGgKQEAgLTMyODksMjEgKzMzNzgsNDUgQEAgTm90ZSB0aGF0 IENVUlNPUl9XSURUSCBpcyBtZWFuaW5nZnVsIG9ubHkgZm9yIChoKWJhciBjdXJzb3JzLgogICAg ICAgYnJlYWs7CiAgICAgY2FzZSBCQVJfQ1VSU09SOgogICAgICAgcyA9IHI7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBAbGF3 bGlzdCBpcyBmb2N1c2luZyB0aGUgaW5pdGlhbCBkZXZlbG9wbWVudCBvZiBmZWF0dXJlIHJlcXVl c3RzICMxNzY4NAorICAgIGFuZCAjMjI4NzMgb24gTDJSIGxhbmd1YWdlcy4gKi8KKyAgICBpZiAo dy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBICisgICAgICAgICYmIHctPm1jLmdseXBoX2Zs YXZvciAhPSBNQ19HTFlQSExFU1MKKyAgICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1D X0dMWVBIX1RBQikKKyAgICAgIHsKICAgICAgIC8qIElmIHRoZSBjaGFyYWN0ZXIgdW5kZXIgY3Vy c29yIGlzIFIyTCwgZHJhdyB0aGUgYmFyIGN1cnNvcgogICAgICAgICAgb24gdGhlIHJpZ2h0IG9m IGl0cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxlZnQuICAqLwogICAgICAgY3Vyc29yX2ds eXBoID0gZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3KTsKICAgICAgIGlmICgoY3Vyc29yX2dseXBo LT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAgICAgICAgIHMub3JpZ2luLnggKz0gY3Vyc29y X2dseXBoLT5waXhlbF93aWR0aCAtIHMuc2l6ZS53aWR0aDsKKyAgICAgIH0KKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKIAogICAgICAgTlNSZWN0RmlsbCAocyk7CiAgICAgICBicmVhazsK ICAgICB9CiAgIG5zX3VuZm9jdXMgKGYpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCiAgIC8qIGRyYXcgdGhlIGNoYXJhY3RlciB1bmRlciB0 aGUgY3Vyc29yICovCi0gIGlmIChjdXJzb3JfdHlwZSAhPSBOT19DVVJTT1IpCisgIGlmIChjdXJz b3JfdHlwZSAhPSBOT19DVVJTT1IKKyAgICAgICYmIHctPm1jLmdseXBoX2ZsYXZvciAhPSBNQ19H TFlQSExFU1MKKyAgICAgICYmIHctPm1jLmdseXBoX2ZsYXZvciAhPSBNQ19HTFlQSF9UQUIpCiAg ICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFXX0NVUlNPUik7CiAK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRlZiBOU19JTVBMX0NPQ09BCiAgIE5T RW5hYmxlU2NyZWVuVXBkYXRlcyAoKTsKICNlbmRpZgpkaWZmIC0tZ2l0IGEvc3JjL3czMnRlcm0u YyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggZmYwZDJiZi4uMDJmODcyOSAxMDA2NDQKLS0tIGEvc3Jj L3czMnRlcm0uYworKysgYi9zcmMvdzMydGVybS5jCkBAIC05NzMsNiArOTczLDIwIEBAIHN0YXRp YyB2b2lkIHczMl9kcmF3X2JveF9yZWN0IChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICosIGludCwgaW50 LCBpbnQsIGludCwKIHN0YXRpYyB2b2lkCiB4X3NldF9jdXJzb3JfZ2MgKHN0cnVjdCBnbHlwaF9z dHJpbmcgKnMpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBD VVJTT1JTICovCisKKyAgaWYgKHMtPnctPm1jLmN1cnNvcl9nY19kZWZhdWx0KQorICAgIHsKKyAg ICAgIHMtPmdjID0gcy0+Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2M7CisgICAgICByZXR1 cm47CisgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGlmIChzLT5mb250 ID09IEZSQU1FX0ZPTlQgKHMtPmYpCiAgICAgICAmJiBzLT5mYWNlLT5iYWNrZ3JvdW5kID09IEZS QU1FX0JBQ0tHUk9VTkRfUElYRUwgKHMtPmYpCiAgICAgICAmJiBzLT5mYWNlLT5mb3JlZ3JvdW5k ID09IEZSQU1FX0ZPUkVHUk9VTkRfUElYRUwgKHMtPmYpCkBAIC01NjkwLDYgKzU3MDQsMjYgQEAg eF9kcmF3X2hvbGxvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cg KnJvdykKIAogICAvKiBDb21wdXRlIGZyYW1lLXJlbGF0aXZlIGNvb3JkaW5hdGVzIGZvciBwaHlz IGN1cnNvci4gICovCiAgIGdldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCBjdXJzb3Jf Z2x5cGgsICZsZWZ0LCAmdG9wLCAmaCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9wIHkgPT0gV0lORE9X X1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkgPT0gV0lORE9XX1RP X0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCistICBoIG9mIEhPTExP V19CT1hfQ1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMgYSB2aXNpYmxlIGdh cCBhYm92ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAgIGggPSByb3ctPmhl aWdodDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICByZWN0LmxlZnQgPSBsZWZ0 OwogICAvKiBXaGVuIG9uIFIyTCBjaGFyYWN0ZXIsIHNob3cgY3Vyc29yIGF0IHRoZSByaWdodCBl ZGdlIG9mIHRoZQogICAgICBnbHlwaCwgdW5sZXNzIHRoZSBjdXJzb3IgYm94IGlzIGFzIHdpZGUg YXMgdGhlIGdseXBoIG9yIHdpZGVyCkBAIC01NzUzLDcgKzU3ODcsMTcgQEAgeF9kcmF3X2Jhcl9j dXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgaW52aXNp YmxlLiAgVXNlIHRoZSBnbHlwaCdzIGZvcmVncm91bmQgY29sb3IgaW5zdGVhZCBpbiB0aGlzCiAJ IGNhc2UsIG9uIHRoZSBhc3N1bXB0aW9uIHRoYXQgdGhlIGdseXBoJ3MgY29sb3JzIGFyZSBjaG9z ZW4gc28KIAkgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICovCi0gICAgICBpZiAoZmFjZS0+ YmFja2dyb3VuZCA9PSBjdXJzb3JfY29sb3IpCisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09 IGN1cnNvcl9jb2xvcgorICAgICAgICAgICYmICF3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29r YXkpCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAljdXJzb3JfY29sb3IgPSBmYWNl LT5mb3JlZ3JvdW5kOwogCiAgICAgICB4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAo dywgdy0+cGh5c19jdXJzb3IueCk7CkBAIC01Nzc0LDYgKzU4MTgsMTcgQEAgeF9kcmF3X2Jhcl9j dXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgIGlmICgo Y3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAJICAgIHggKz0gY3Vyc29y X2dseXBoLT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogQWxpZ24gYWxsIGZha2UgQkFSX0NV UlNPUiBvZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBgb3BvaW50X3gnLiAqLworICAgIGlmICh3 LT5tYy5meCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIAkgIHczMl9maWxsX2FyZWEgKGYsIGhkYywgY3Vyc29yX2NvbG9yLCB4LAogCQkJ IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB3LT5waHlzX2N1cnNvci55KSwKIAkJCSB3aWR0 aCwgcm93LT5oZWlnaHQpOwpAQCAtNTg5NSwzMSArNTk1MCwxNTkgQEAgdzMyX2RyYXdfd2luZG93 X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93LAog CSAgcmV0dXJuOwogCX0KIAotICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKLQl7Ci0JY2FzZSBI T0xMT1dfQk9YX0NVUlNPUjoKLQkgIHhfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBnbHlwaF9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W5jYXRlIChtYWtlX2Zsb2F0ICh0ZXJtX2dyZWVuKSwgUW5p bCkpOzsKKyAgaW50IGludF9ibHVlID0gWElOVCAoRnRydW5jYXRlIChtYWtlX2Zsb2F0ICh0ZXJt X2JsdWUpLCBRbmlsKSk7OworICBDT0xPUlJFRiBjb2xvcl9waXhlbCA9IFBBTEVUVEVSR0IgKGlu dF9yZWQsIGludF9ncmVlbiwgaW50X2JsdWUpOworICBzd2l0Y2ggKGN1cnNvcl90eXBlKQorICB7 CisgICAgY2FzZSBIT0xMT1dfQk9YX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVk ID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsK KyAgICAgICAgICBYR0NWYWx1ZXMgZ2NfdmFsdWVzOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcg bWFzayA9IEdDRm9udCB8IEdDRm9yZWdyb3VuZCB8IEdDQmFja2dyb3VuZDsKKyAgICAgICAgICBn Y192YWx1ZXMuZm9udCA9IEZSQU1FX0ZPTlQgKGYpOworICAgICAgICAgIHN0cnVjdCBmYWNlICpk ZWZhdWx0X2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIERFRkFVTFRfRkFDRV9JRCk7CisgICAgICAg ICAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgICAgICAgICAgQ0hFQ0tfQlVGRkVS IChidWYpOworICAgICAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAg ICAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9k ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg bWFya19hY3RpdmUpKSk7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAo cmVnaW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X3ZhbHVlcy5mb3JlZ3JvdW5k ID0gZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICBnY192YWx1ZXMuYmFj a2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAg ICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAg ICAgICAgICAgICYmICFyZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAgICAgICAgICAgICAgICYm IGFjdGl2ZV9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lk IGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24tZmFjZSIpLCB0cnVlKTsKKyAg ICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fb3V0X2ZhY2Ug PSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlX2lkKTsKKyAg ICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGRlZmF1bHRfZmFjZS0+Zm9yZWdy b3VuZDsKKyAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19hY3Rp dmVfcmVnaW9uX291dF9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIGVsc2UgaWYgKCFyZWdpb25fYWN0aXZlX3AgJiYgYWN0aXZlX3ApCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfZmFj ZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LC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sIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19k ZWZhdWx0ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2Mg PSBvcmlnaW5hbF9jdXJzb3JfZ2M7CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywg Z2x5cGhfcm93LCBEUkFXX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBC QVJfQ1VSU09SOgorICAgIHsKKyAgICAgIGlmICh3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVl ID49IDAgJiYgdy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBv cmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAg ICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOwor ICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IHRydWU7CisgICAgICAg ICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBCQVJfQ1VS U09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSBmYWxzZTsK KyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1 cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3X2Jh cl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBCQV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icmVhazsKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KIAotCWNhc2UgTk9fQ1VSU09SOgotCSAgdy0+cGh5c19jdXJz b3Jfd2lkdGggPSAwOwotCSAgYnJlYWs7CiAKLQlkZWZhdWx0OgotCSAgZW1hY3NfYWJvcnQgKCk7 Ci0JfQogICAgIH0KIH0KIApkaWZmIC0tZ2l0IGEvc3JjL3dpbmRvdy5oIGIvc3JjL3dpbmRvdy5o CmluZGV4IDAxMzA4M2UuLjU3M2UzNTkgMTAwNjQ0Ci0tLSBhL3NyYy93aW5kb3cuaAorKysgYi9z cmMvd2luZG93LmgKQEAgLTc2LDYgKzc2LDU2IEBAIG9uZSBhbmQgdGhlIHNhbWUsIHNvIGl0cyBw cmV2IGFuZCBuZXh0IG1lbWJlcnMgYXJlIG5pbC4KIAogQSBkZWFkIHdpbmRvdyBoYXMgaXRzIGNv bnRlbnRzIGZpZWxkIHNldCB0byBuaWwuICAqLwogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogYmVnaW4gTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBTdWZmaXhlcyBmb3IgdGhlIGBt Y2Agd2luZG93IHBvaW50ZXIgcHJlZml4LiAqLworc3RydWN0IG11bHRpcGxlX2N1cnNvcnMKK3sK KyAgLyogVmFsdWVzIGZvciBwcmV2aW91cyBhbmQgY3VycmVudCBgd2luZG93LXN0YXJ0JyBhbmQg YHdpbmRvdy1lbmQnLiAqLworICBFTUFDU19JTlQgY3VycmVudF9zdGFydCwgY3VycmVudF9lbmQs IHByZXZpb3VzX3N0YXJ0LCBwcmV2aW91c19lbmQsIGN1cnJlbnRfeCwgcHJldmlvdXNfeDsKKwor ICAvKiBUc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Nyb3NzaGFpcnMgOiAxOworCisgIC8qIFRoZSBmbGF2b3Igb2Yg dGhlIGdseXBoIHVzZWQgYnkgYGRyYXdfd2luZG93X2N1cnNvcicuICovCisgIGludCBnbHlwaF9m bGF2b3I7CisKKyAgLyogTC5TLkwuIGNvbG9ycy4gKi8KKyAgZG91YmxlIHJlZCwgZ3JlZW4sIGJs dWU7CisKKyAgLyogVGhlIGJ1ZmZlciBwb3NpdGlvbiBwb2ludCBvZiBhIGZha2UgY3Vyc29yLiAq LworICBpbnQgcG9zaW50OworCisgIC8qIFBpeGVsIHBvc2l0aW9uICh3aW5kb3cgcmVsYXRpdmUp IG9mIGhvcml6b250YWwvdmVydGljYWwgcnVsZXJzLiAqLworICBpbnQgZngsIGZ5LCBoOworCisg IC8qIFJlY29yZCBGUk9NX1dIRVJFIHdoZW4gYHJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEn IGlzIGNhbGxlZC4gKi8KKyAgaW50IHJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWE7Cit9Owor CisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK Kwogc3RydWN0IGN1cnNvcl9wb3MKIHsKICAgLyogUGl4ZWwgcG9zaXRpb24uICBUaGVzZSBhcmUg YWx3YXlzIHdpbmRvdyByZWxhdGl2ZS4gICovCkBAIC0xODEsNiArMjMxLDIyIEBAIHN0cnVjdCB3 aW5kb3cKICAgICAvKiBUaGUgaGVscCBlY2hvIHRleHQgZm9yIHRoaXMgd2luZG93LiAgUW5pbCBp ZiB0aGVyZSdzIG5vbmUuICAqLwogICAgIExpc3BfT2JqZWN0IG1vZGVfbGluZV9oZWxwX2VjaG87 CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisK KyAgICAvKiBUaGUgY2FjaGUgZm9yIG11bHRpcGxlIGdseXBoIGN1cnNvcnMuICBGb3IgYW4gZXhh bXBsZSBvZiB0aGUgc3RydWN0dXJlIG9mCisgICAgdGhlIGxpc3QsIHNlZSB0aGUgY29tbWVudHMg YXQgdGhlIGJlZ2lubmluZyBvZiBgbWNfY2FsYycgaW4geGRpc3AuYy4gICovCisgICAgTGlzcF9P YmplY3QgbXVsdGlwbGVfY3Vyc29yc19jYWNoZTsKKworICAgIC8qIFRoZSBjYWNoZSBmb3IgbXVs dGlwbGUgZ2x5cGgvZ2x5cGhsZXNzIGN1cnNvcnMgdGhhdCBmb3JtIGNyb3NzaGFpcnMuICBGb3Ig YW4KKyAgICBleGFtcGxlIG9mIHRoZSBzdHJ1Y3R1cmUgb2YgdGhlIGxpc3QsIHNlZSB0aGUgY29t bWVudHMgYXQgdGhlIGJlZ2lubmluZyBvZgorICAgIGBtY19jcm9zc2hhaXJzJyBpbiB4ZGlzcC5j LiAgKi8KKyAgICBMaXNwX09iamVjdCBjcm9zc2hhaXJzX2NhY2hlOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgICAgLyogTm8gTGlzcCBkYXRhIG1heSBmb2xsb3cgYmVsb3cgdGhp cyBwb2ludCB3aXRob3V0IGNoYW5naW5nCiAgICAgICAgbWFya19vYmplY3QgaW4gYWxsb2MuYy4g IFRoZSBtZW1iZXIgY3VycmVudF9tYXRyaXggbXVzdCBiZSB0aGUKICAgICAgICBmaXJzdCBub24t TGlzcCBtZW1iZXIuICAqLwpAQCAtMjgzLDYgKzM0OSwxNiBAQCBzdHJ1Y3Qgd2luZG93CiAKICNp ZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIFRoZSBwcmVmaXggZm9yIHdpbmRvdyBwb2lu dGVycyByZWxhdGluZyB0byBtdWx0aXBsZSBjdXJzb3JzLiAgKi8KKyAgICBzdHJ1Y3QgbXVsdGlw bGVfY3Vyc29ycyBtYzsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIC8qIEN1 cnNvciB0eXBlIG9mIGxhc3QgY3Vyc29yIGRyYXduIG9uIHRoZSB3aW5kb3cuICAqLwogICAgIGVu dW0gdGV4dF9jdXJzb3Jfa2luZHMgcGh5c19jdXJzb3JfdHlwZTsKIApAQCAtNDIxLDYgKzQ5Nywy NSBAQCBYV0lORE9XIChMaXNwX09iamVjdCBhKQogICByZXR1cm4gWFVOVEFHIChhLCBMaXNwX1Zl Y3Rvcmxpa2UsIHN0cnVjdCB3aW5kb3cpOwogfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitJTkxJTkUgdm9pZAord3NldF9tdWx0aXBsZV9j dXJzb3JzX2NhY2hlIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCB2YWwpCit7CisgIHct Pm11bHRpcGxlX2N1cnNvcnNfY2FjaGUgPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCit3c2V0X2Ny b3NzaGFpcnNfY2FjaGUgKHN0cnVjdCB3aW5kb3cgKncsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAg dy0+Y3Jvc3NoYWlyc19jYWNoZSA9IHZhbDsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioq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bW91c2VfZmFjZV9wIChzdHJ1Y3Qgd2luZG93ICosIGludCwg aW50KTsKIAogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFIENV UlNPUlMgKi8KKworLyogTVVMVElQTEUgQ1VSU09SUzogIEVtYWNzIEJ1ZyAjMjI4NzMgKGZlYXR1 cmUgcmVxdWVzdCkKKworICAgQ1JPU1NIQUlSUzogIEVtYWNzIEJ1ZyAjMTc2ODQgKGZlYXR1cmUg cmVxdWVzdCkKKworCitQQVRDSCBWRVJTSU9OOiAgMDE0LjAwMCBbMDgvMjgvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDAxIFswOS8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDIg WzA5LzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwMyBbMDkvMDUvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDA0IFswOS8wOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDUg WzA5LzA5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwNiBbMDkvMDkvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDA3IFswOS8xMC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDgg WzA5LzEwLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwOSBbMDkvMTEvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDEwIFswOS8xMy8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTEg WzA5LzE0LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxMiBbMDkvMTcvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDEzIFswOS8xOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTQg WzA5LzE5LzIwMThdCisgICAgICAgICAgICAgICAgMD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gICAgICAgICAgICAoMiAiYmFyIiAicHVycGxl IikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDMgImJveCIgIiMwMEZGMDAiKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg1ICgiaGJhciIgMykgWzEuMCAwLjAgMS4w XSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDYgKCJiYXIiIDMpIFswLjAgMS4w IDEuMF0pKSkKKworICA7OzsgVFVSTiBPRkYuCisgIChzZXRxIG11bHRpcGxlLWN1cnNvcnMtY29u ZiBuaWwpCisKKworVE9ETzoKKworLSAgTXVsdGlwbGUgQ3Vyc29yczogIElmIHBvaW50IGlzIGlu IHRoZSBtaWRkbGUgb2YgYSBjb21wb3NpdGUgY2hhcmFjdGVyLCB0aGVuCisgICBrZWVwIGdvaW5n IHVudGlsIHRoZSBuZXh0IGZ1bGwgY2hhcmFjdGVyLgorCistICBXb3JrIG9uIGNvbXBhdGFiaWxp dHkgd2l0aCBNYWNPUyBNb2phdmUuICBbSXNzdWUgIyA0MC5dCisKKy0gIEhvcml6b250YWwgUnVs ZXI6ICBEZXBlbmRpbmcgdXBvbiB0aGUgZm9udCwgY2VydGFpbiBsZXR0ZXJzIHRoYXQgZm9sbG93 IGEgdGFiCisgICBTVFJFVENIIGNhdXNlIHRoZSBwcmVjZWRpbmcgaG9yaXpvbnRhbCBoYmFyIHRv IGJlIGVyYXNlZDsgZS5nLiwgIkEiLgorICAgW0lzc3VlICMgMzAuXQorCistICBGYWtlIGN1cnNv cnMgYXJlIGJlaW5nIHJlZHJhd24gdG9vIG9mdGVuIHdoZW4gbm9uLXNlbGVjdGVkIHZpc2libGUg d2luZG93cworICAgaGF2ZSBhbiBvbmdvaW5nIHByb2Nlc3MgdGhhdCByZXF1aXJlIGZyZXF1ZW50 IHJlZGlzcGxheSB1cGRhdGV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GFpcnMpKSkp CisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2lu ZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3Ry aW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdp bmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG53aW5kb3cgKCVzKVxuIiwg d2luZG93X2NoYXIpOworICAgIH0KKyNlbmRpZgorCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgc3Ry dWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGludCB0ZW1wX2Z4ID0gV0lORE9X X1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgdy0+cGh5c19jdXJzb3IueCk7CisgIGludCB0ZW1w X2Z5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHctPnBoeXNfY3Vyc29yLnkpOworICBl bnVtIHdpbmRvd19wYXJ0IHBhcnQgPSBPTl9OT1RISU5HOworICBMaXNwX09iamVjdCB3aW5kb3cg PSB3aW5kb3dfZnJvbV9jb29yZGluYXRlcyAoZiwgdGVtcF9meCwgdGVtcF9meSwgJnBhcnQsIGZh bHNlKTsKKyAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdp bmRvdywgUW5pbCk7CisgIGRlYnVnX21ldGhvZF9hZGQgKHcsICJ3aW5kb3cgKCVzKSIsIFNTREFU QSAod2luZG93X3N0cmluZykpOworI2VuZGlmCisKK2NoYXIgKndfY29udGVudHMgPSAoQlVGRkVS UCAody0+Y29udGVudHMpICYmIFNUUklOR1AgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg bmFtZSkpKQorICAgICAgICAgICAgICAgICAgID8gU1NEQVRBI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eGVsX3dpZHRoX29y X2hlaWdodC4gICovCisgICAgICBMaXNwX09iamVjdCBwbGlzdCA9IFhDRFIgKHZhbCksIHByb3A7 CisgICAgICBpbnQgd2lkdGggPSAtMTsKKyAgICAgIEVNQUNTX0lOVCBhbGlnbl90b19tYXggPQor ICAoY29sIDwgTU9TVF9QT1NJVElWRV9GSVhOVU0gLSBJTlRfTUFYCisgICA/IChFTUFDU19JTlQp IElOVF9NQVggKyBjb2wKKyAgIDogTU9TVF9QT1NJVElWRV9GSVhOVU0pOworICAgICAgaWYgKChw cm9wID0gRnBsaXN0X2dldCAocGxpc3QsIFFDd2lkdGgpLAorICAgICBSQU5HRURfSU5URUdFUlAg KDAsIHByb3AsIElOVF9NQVgpKQorICAgIHx8IChwcm9wID0gRnBsaXN0X2dldCAocGxpc3QsIFFD cmVsYXRpdmVfd2lkdGgpLAorICAgICAgICBSQU5HRURfSU5URUdFUlAgKDAsIHByb3AsIElOVF9N QVgpKSkKKyAgd2lkdGggPSBYSU5UIChwcm9wKTsKKyAgICAgIGVsc2UgaWYgKEZMT0FUUCAocHJv cCkgJiYgMCA8PSBYRkxPQVRfREFUQSAocHJvcCkKKyAgICAgICAgICYmIFhGTE9BVF9EQVRBIChw cm9wKSA8PSBJTlRfTUFYKQorICB3aWR0aCA9IChpbnQpKFhGTE9BVF9EQVRBIChwcm9wKSArIDAu NSk7CisgICAgICBlbHNlIGlmICgocHJvcCA9IEZwbGlzdF9nZXQgKHBsaXN0LCBRQ2FsaWduX3Rv KSwKKyAgICBSQU5HRURfSU5URUdFUlAgKGNvbCwgcHJvcCwgYWxpZ25fdG9fbWF4KSkpCisgIHdp ZHRoID0gWElOVCAocHJvcCkgLSBjb2w7CisgICAgICBlbHNlIGlmIChGTE9BVFAgKHByb3ApICYm IGNvbCA8PSBYRkxPQVRfREFUQSAocHJvcCkKKyAgICAgICAgICYmIChYRkxPQVRfREFUQSAocHJv cCkgPD0gYWxpZ25fdG9fbWF4KSkKKyAgd2lkdGggPS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pZiAoZHAg IT0gMAorICAgICYmICEgKG11bHRpYnl0ZSAmJiBMRUFESU5HX0NPREVfUCAoYykpCisgICAgJiYg VkVDVE9SUCAoRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpKSkKKyAgeworICAgIExpc3BfT2JqZWN0 IGNoYXJ2ZWM7CisgICAgcHRyZGlmZl90IGksIG47CisgICAgLyogVGhpcyBjaGFyYWN0ZXIgaXMg ZGlzcGxheWVkIHVzaW5nIGEgdmVjdG9yIG9mIGdseXBocy4KKyAgICAgICBVcGRhdGUgdGhlIGNv bHVtbi9wb3NpdGlvbiBiYXNlZCBvbiB0aG9zZSBnbHlwaHMuICAqLworICAgIGNoYXJ2ZWMgPSBE SVNQX0NIQVJfVkVDVE9SIChkcCwgYyk7CisgICAgbiA9IEFTSVpFIChjaGFydmVjKTsKKyAgICBm b3IgKGkgPSAwOyBpIDwgbjsgaSsrKQorICAgICAgeworICAgICAgICAvKiBUaGlzIHNob3VsZCBi ZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisgICAgIG5leHRfZWxlbWVudF9mcm9tX2Rpc3BsYXlfdmVj dG9yIGRvZXMgaXQuICAqLworICAgICAgICBMaXNwX09iamVjdCBlbnRyeSA9IEFSRUYgKGNoYXJ2 ZWMsIGkpOworICAgICAgICBpZiAoR0xZUEhfQ09ERV9QIChlbnRyeSkpCisgICAgYyA9IEdMWVBI X0NPREVfQ0hBUiAoZW50cnkpOworICAgICAgICBlbHNlCisgICAgYyA9ICcgJzsKKyAgICAgICAg aWYgKGMgPT0gJ1xuJykKKyAgICBnb3RvIGVuZGxvb3A7CisgICAgICAgIGlmIChjID09ICdccicg JiYgRVEgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBzZWxlY3RpdmVfZGlzcGxheSksIFF0KSkKKyAg ICBnb3RvIGVuZGxvb3A7CisgICAgICAgIGlmIChjID09ICdcdCcpCisgICAgeworICAgICAgY29s ICs9IHRhYl93aWR0aDsKKyAgICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAqIHRhYl93aWR0aDsK KyAgICB9CisgICAgICAgIGVsc2UKKyAgICArK2NvbDsKKyAgICAgIH0KKyAgfQorICAgICAgZWxz ZQorICB7CisgICAgLyogVGhlIGRpc3BsYXkgdGFibGUgZG9lc24ndCBhZmZlY3QgdGhpcyBjaGFy YWN0ZXI7CisgICAgICAgaXQgZGlzcGxheXMgYXMgaXRzZWxmLiAgKi8KKyAgICBpZiAoYyA9PSAn XG4nKQorICAgICAgZ290byBlbmRsb29wOworICAgIGlmIChjID09ICdccicgJiYgRVEgKEJWQVIg KGN1cnJlbnRfYnVmZmVyLCBzZWxlY3RpdmVfZGlzcGxheSksIFF0KSkKKyAgICAgIGdvdG8gZW5k bG9vcDsKKyAgICBpZiAoYyA9PSAnXHQnKQorICAgICAgeworICAgICAgICBjb2wgKz0gdGFiX3dp ZHRoOworICAgICAgICBjb2wgPSBjb2wgLyB0YWJfd2lkdGggKiB0YWJfd2lkdGg7CisgICAgICB9 CisgICAgZWxzZSBpZiAobXVsdGlieXRlICYmIExFQURJTkdfQ09ERV9QIChjKSkKKyAgICAgIHsK KyAgICAgICAgLyogU3RhcnQgb2YgbXVsdGktYnl0ZSBmb3JtLiAgKi8KKyAgICAgICAgdW5zaWdu ZWQgY2hhciAqcHRyOworICAgICAgICBpbnQgYnl0ZXMsIHdpZHRoOworICAgICAgICBwdHIgPSBC WVRFX1BPU19BRERSIChzY2FuX2J5dGUpOworICAgICAgICBNQ19NVUxUSUJZVEVfQllURVNfV0lE VEggKHB0ciwgZHAsIGJ5dGVzLCB3aWR0aCk7CisgICAgICAgIC8qIFN1YnRyYWN0IG9uZSB0byBj b21wZW5zYXRlIGZvciB0aGUgaW5jcmVtZW50CisgICAgIHRoYXQgaXMgZ29pbmcgdG8gaGFwcGVu IGJlbG93LiAgKi8KKyAgICAgICAgc2Nhbl9ieXRlICs9IGJ5dGVzIC0gMTsKKyAgICAgICAgY29s ICs9IHdpZHRoOworICAgICAgfQorICA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Cisg IHB0cmRpZmZfdCBsYXN0X2tub3duX2NvbHVtbiA9IDA7CisgIHB0cmRpZmZfdCBjb2w7CisgIHVu c2lnbmVkIGNoYXIgKnB0ciwgKnN0b3A7CisgIGJvb2wgdGFiX3NlZW47CisgIHB0cmRpZmZfdCBw b3N0X3RhYjsKKyAgaW50IGM7CisgIGludCB0YWJfd2lkdGggPSBTQU5FX1RBQl9XSURUSCAoY3Vy cmVudF9idWZmZXIpOworICBib29sIGN0bF9hcnJvdyA9ICFOSUxQIChCVkFSIChjdXJyZW50X2J1 ZmZlciwgY3RsX2Fycm93KSk7CisgIHN0cnVjdCBMaXNwX0NoYXJfVGFibGUgKmRwID0gYnVmZmVy X2Rpc3BsYXlfdGFibGUgKCk7CisgIGlmIChwdCA9PSBsYXN0X2tub3duX2NvbHVtbl9wb2ludAor ICAgICAgJiYgTU9ESUZGID09IGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkKQorICAgIHJldHVy biBsYXN0X2tub3duX2NvbHVtbjsKKyAgLyogSWYgdGhlIGJ1ZmZlciBoYXMgb3ZlcmxheXMsIHRl eHQgcHJvcGVydGllcywKKyAgICAgb3IgbXVsdGlieXRlIGNoYXJhY3RlcnMsIHVzZSBhIG1vcmUg Z2VuZXJhbCBhbGdvcml0aG0uICAqLworICBpZiAoYnVmZmVyX2ludGVydmFscyAoY3VycmVudF9i dWZmZXIpCisgICAgICB8fCBidWZmZXJfaGFzX292ZXJsYXlzICgpCisgICAgICB8fCBaICE9IFpf QllURSkKKyAgICB7CisgICAgICBFTUFDU19JTlQgY29sID0gTU9TVF9QT1NJVElWRV9GSVhOVU07 CisgICAgICBtY19zY2FuX2Zvcl9jb2x1bW4gKCZwdCwgJmNvbCwgTlVMTCwgcHQpOworICAgICAg cmV0dXJuIGNvbDsKKyAgICB9CisgIC8qIFNjYW4gYmFja3dhcmRzIGZyb20gcG9pbnQgdG8gdGhl IHByZXZpb3VzIG5ld2xpbmUsCisgICAgIGNvdW50aW5nIHdp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idWZmZXIuICAqLworICAgIGlmIChCRUdWID49IEdQVCkKKyAgICAgIGJyZWFrOworICB9Cisg ICAgICBjID0gKi0tcHRyOworICAgICAgaWYgKGRwICYmIFZFQ1RPUlAgKERJU1BfQ0hBUl9WRUNU T1IgKGRwLCBjKSkpCisgIHsKKyAgICBjaGFydmVjID0gRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMp OworICAgIG4gPSBBU0laRSAoY2hhcnZlYyk7CisgIH0KKyAgICAgIGVsc2UKKyAgeworICAgIGNo YXJ2ZWMgPSBRbmlsOworICAgIG4gPSAxOworICB9CisgICAgICBmb3IgKGkgPSBuIC0gMTsgaSA+ PSAwOyAtLWkpCisgIHsKKyAgICBpZiAoVkVDVE9SUCAoY2hhcnZlYykpCisgICAgICB7CisgICAg ICAgIC8qIFRoaXMgc2hvdWxkIGJlIGhhbmRsZWQgdGhlIHNhbWUgYXMKKyAgICAgbmV4dF9lbGVt ZW50X2Zyb21fZGlzcGxheV92ZWN0b3IgZG9lcyBpdC4gICovCisgICAgICAgIExpc3BfT2JqZWN0 IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7CisgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVu dHJ5KSkKKyAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgIGVsc2UKKyAg ICBjID0gJyAnOworICAgICAgfQorICAgIGlmIChjID49IDA0MCAmJiBjIDwgMDE3NykKKyAgICAg IGNvbCsrOworICAgIGVsc2UgaWYgKGMgPT0gJ1xuJworICAgICAgIHx8IChjID09ICdccicKKyAg ICAgICAgICAgJiYgRVEgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBzZWxlY3RpdmVfZGlzcGxheSks IFF0KSkpCisgICAgICB7CisgICAgICAgIHB0cisrOworICAgICAgICBnb3RvIHN0YXJ0X29mX2xp bmVfZm91bmQ7CisgICAgICB9CisgICAgZWxzZSBpZiAoYyA9PSAnXHQnKQorICAgICAgeworICAg ICAgICBpZiAodGFiX3NlZW4pCisgICAgY29sID0gKChjb2wgKyB0YWJfd2lkdGgpIC8gdGFiX3dp ZHRoKSAqIHRhYl93aWR0aDsKKyAgICAgICAgcG9zdF90YWIgKz0gY29sOworICAgICAgICBjb2wg PSAwOworICAgICAgICB0YWJfc2VlbiA9IDE7CisgICAgICB9CisgICAgZWxzZSBpZiAoVkVDVE9S UCAoY2hhcnZlYykpCisgICAgICAvKiBXaXRoIGEgZGlzcGxheSB0YWJsZSBlbnRyeSwgQyBpcyBk aXNwbGF5ZWQgYXMgaXMsIGFuZAorICAgICAgICAgbm90IGRpc3BsYXllZCBhcyBcTk5OIG9yIGFz IF5OLiAgSWYgQyBpcyBhIHNpbmdsZS1ieXRlCisgICAgICAgICBjaGFyYWN0ZXIsIGl0IHRha2Vz IG9uZSBjb2x1bW4uICBJZiBDIGlzIG11bHRpLWJ5dGUgaW4KKyAgICAgICAgIGEgdW5pYnl0ZSBi dWZmZXIsIGl0J3MgdHJhbnNsYXRlZCB0byB1bmlieXRlLCBzbyBpdAorICAgICAgICAgYWxzbyB0 YWtlcyBvbmUgY29sdW1uLiAgKi8KKyAgICAgICsrY29sOworICAgIGVsc2UKKyAgICAgIGNvbCAr PSAoY3RsX2Fycm93ICYmIGMgPCAwMjAwKSA/IDIgOiA0OworICB9CisgICAgfQorIHN0YXJ0X29m X2xpbmVfZm91bmQ6CisgIGlmICh0YWJfc2VlbikKKyAgICB7CisgICAgICBjb2wgPSAoKGNvbCAr IHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgY29sICs9IHBvc3Rf dGFiOworICAgIH0KKyAgbGFzdF9rbm93bl9jb2x1bW4gPSBjb2w7CisgIGxhc3Rfa25vd25fY29s dW1uX3BvaW50ID0gcHQ7CisgIGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkID0gTU9ESUZGOwor ICByZXR1cm4gY29sOworfQorCitzdGF0aWMgaW50CittY19saXNwX3RvX2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QorICAgIHsKKyAgICAgIGNvbG9yX3ZhbHVlcyA9 IChGeHdfY29sb3JfdmFsdWVzIChjb2xvciwgdGFyZ2V0X2ZyYW1lKSk7CisgICAgICBmb3IgKHZs aXN0ID0gY29sb3JfdmFsdWVzOworICAgICAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgICAg ICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICAgICAgeworICAgICAgICAgIHggPSBYSU5UIChY Q0FSICh2bGlzdCkpOworICAgICAgICAgIHRlbXAgPSBtYWtlX2Zsb2F0ICh4IC8gdmFsbWF4KTsK KyAgICAgICAgICBBU0VUICh2ZWN0b3IsIGksIHRlbXApOworICAgICAgICAgIGkgPSBpICsgMTsK KyAgICAgICAgfQorICAgIH0KKyAgcmV0dXJuIHZlY3RvcjsKK30KKworc3RhdGljIExpc3BfT2Jq ZWN0CittY19iZ19sc2wgKHN0cnVjdCB3aW5kb3cgKncsIGVudW0gZmFjZV9pZCBmYWNlX2lkKQor eworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgc3RydWN0IGZhY2Ug KmZhY2U7CisgIExpc3BfT2JqZWN0IGNvbG9yLCBjb2xvcl92ZWN0b3I7CisgIGlmICghTklMUCAo VmZhY2VfcmVtYXBwaW5nX2FsaXN0KQorICAgICAgJiYgKGZhY2VfaWQgPT0gREVGQVVMVF9GQUNF X0lEIC8qIFFkZWZhdWx0ICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBNT0RFX0xJTkVfRkFD RV9JRCAvKiBRbW9kZV9saW5lICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBNT0RFX0xJTkVf SU5BQ1RJVkVfRkFDRV9JRCAvKiBRbW9kZV9saW5lX2luYWN0aXZlICovCisgICAgICAgICAgfHwg ZmFjZV9pZCA9PSBIRUFERVJfTElORV9GQUNFX0lEIC8qIFFoZWFkZXJfbGluZSAqLworICAgICAg ICAgIHx8IGZhY2Vf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Y21hcCwgYm0xID0gUW5pbCwgYm0yID0gUW5pbCwgYm07 CisgIEVNQUNTX0lOVCBsbjEgPSAwLCBsbjIgPSAwOworICBpbnQgaXgxID0gcmlnaHRfcDsKKyAg aW50IGl4MiA9IGl4MSArIChwYXJ0aWFsX3AgPyAyIDogMCk7CisgIGlmICgoY21hcCA9IEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpLCAhTklMUCAo Y21hcCkpCisgICAgeworICAgICAgYm0xID0gRmFzc3EgKGJpdG1hcCwgY21hcCk7CisgICAgICBp ZiAoQ09OU1AgKGJtMSkpCisgIHsKKyAgICBpZiAoKGJtMSA9IFhDRFIgKGJtMSkpLCBOSUxQIChi bTEpKQorICAgICAgcmV0dXJuIE5PX0ZSSU5HRV9CSVRNQVA7CisgICAgaWYgKENPTlNQIChibTEp KQorICAgICAgeworICAgICAgICBsbjEgPSBYSU5UIChGbGVuZ3RoIChibTEpKTsKKyAgICAgICAg aWYgKHBhcnRpYWxfcCkKKyAgICB7CisgICAgICBpZiAobG4xID4gaXgyKQorICAgICAgICB7Cisg ICAgICAgICAgYm0gPSBGbnRoIChtYWtlX251bWJlciAoaXgyKSwgYm0xKTsKKyAgICAgICAgICBp ZiAoIUVRIChibSwgUXQpKQorICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAg ICAgICAgZWxzZQorICAgIHsKKyAgICAgIGlmIChsbjEgPiBpeDEpCisgICAgICAgIHsKKyAgICAg ICAgICBibSA9IEZudGggKG1ha2VfbnVtYmVyIChpeDEpLCBibTEpOworICAgICAgICAgIGlmICgh RVEgKGJtLCBRdCkpCisgICAgICBnb3RvIGZvdW5kOworICAgICAgICB9CisgICAgfQorICAgICAg fQorICAgIGVsc2UgaWYgKChibSA9IGJtMSwgIUVRIChibSwgUXQpKSkKKyAgICAgIGdvdG8gZm91 bmQ7CisgIH0KKyAgICB9CisgIGlmICghRVEgKGNtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMs IGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKCZidWZmZXJf ZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKSkKKyAgICB7CisgICAgICBibTIgPSBG YXNzcSAoYml0bWFwLCBCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2Fs aXN0KSk7CisgICAgICBpZiAoQ09OU1AgKGJtMikpCisgIHsKKyAgICBpZiAoKGJtMiA9IFhDRFIg KGJtMikpLCAhTklMUCAoYm0yKSkKKyAgICAgIHsKKyAgICAgICAgaWYgKENPTlNQIChibTIpKQor ICAgIHsKKyAgICAgIGxuMiA9IFhJTlQgKEZsZW5ndGggKGJtMikpOworICAgICAgaWYgKHBhcnRp YWxfcCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChsbjIgPiBpeDIpCisgICAgICB7CisgICAg ICAgIGJtID0gRm50aCAobWFrZV9udW1iZXIgKGl4MiksIGJtMik7CisgICAgICAgIGlmICghRVEg KGJtLCBRdCkpCisgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgIH0KKyAgICAgICAgfQorICAg IH0KKyAgICAgIH0KKyAgfQorICAgIH0KKyAgaWYgKGxuMSA+IGl4MSkKKyAgICB7CisgICAgICBi bSA9IEZudGggKG1ha2VfbnVtYmVyIChpeDEpLCBibTEpOworICAgICAgaWYgKCFFUSAoYm0sIFF0 KSkKKyAgZ290byBmb3VuZDsKKyAgICB9CisgIGlmIChsbjIgPiBpeDEpCisgICAgeworICAgICAg Ym0gPSBGbnRoIChtYWtlX251bWJlciAoaXgxKSwgYm0yKTsKKyAgICAgIGlmICghRVEgKGJtLCBR dCkpCisgIGdvdG8gZm91bmQ7CisgICAgICByZXR1cm4gTk9fRlJJTkdFX0JJVE1BUDsKKyAgICB9 CisgIGVsc2UgaWYgKChibSA9IGJtMi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ZW50X2xpbmUpOworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpICovCisgIGJvb2wgaHNj bF9hbGxfdGVtcF9wID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWlu X2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIG5vdGhpbmcu ICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3JvbGwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTog IEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIGVsc2UgYmVzaWRlcyBob3Jpem9udGFsbHkgc2Ny b2xsaW5nIHRoZQorICAgICAgICAgICAgICAgY3VycmVudCBsaW5lIGRpZmZlcmVudGx5LgorICAg ICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBk aWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzFfcCA9ICghdy0+c3VzcGVuZF9h dXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxf bW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAg LyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgLi4uCisgICAgICAgICAgICAgICBDdXJyZW50IGxp bmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29s IGhzY2xfYWxsX3Blcm1fMl9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID09IDAKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwt bGVmdCA1KTsgYW5kLCB0aGVuIHByZXNzIHRoZSBsZWZ0IGFycm93IGtleSBvbmUgdGltZS4KKyAg ICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZm ZXJlbnRseS4qLworICBib29sIGhzY2xfdGVtcF9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9s bAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYm IHctPm1pbl9oc2Ny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gZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAmJiAhaHNjbF9h bGxfdGVtcF9wCisgICAgICAmJiAhaHNjbF90ZW1wX3AKKyAgICAgICYmICFoc2NsX3Blcm1fcAor ICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMF9wCisgICAgICAmJiAhaHNjbF9hbGxfcGVybV8xX3AK KyAgICAgICYmICFoc2NsX2FsbF9wZXJtXzJfcCkKKyAgICB7CisgICAgICBlbnVtIGZhY2VfaWQg b3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgKCFhY3RpdmVfY3Vyc29yX3AKKyAgICAg ICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5h Y3RpdmVfd2luZG93cykpKQorICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRl cm4gKCIrLW92ZXJsYXktYXJyb3ctaW5hY3RpdmUtZmFjZSIpLCB0cnVlKQorICAgICAgICA6IChh Y3RpdmVfY3Vyc29yX3AKKyAgICAgICAgICAgJiYgbWluaW1hbF9wKQorICAgICAgICAgID8gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1taW5pbWFsLWZh Y2UiKSwgdHJ1ZSkKKyAgICAgICAgOiAoYWN0aXZlX2N1cnNvcl9wCisgICAgICAgICAgICYmICFt aW5pbWFsX3ApCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgi Ky1vdmVybGF5LWFycm93LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7 CisgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IExFRlRfRlJJTkdFX0JJVE1BUCkKKyAg ICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAgICAgIC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ybV8wX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxf cGVybV8xX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8yX3AKKyAgICAgICAg ICAgICAgICAgfHwgaHNjbF90ZW1wX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJtX3Ap KQorICAgICAgeworICAgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0K KyAgICAgICAgICAoIWFjdGl2ZV9jdXJzb3JfcAorICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAg ICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJy b3ctaHNjbC1pbmFjdGl2ZS1mYWNlIiksIHRydWUpCisgICAgICAgICAgOiAoYWN0aXZlX2N1cnNv cl9wCisgICAgICAgICAgICAgJiYgbWluaW1hbF9wKQorICAgICAgICAgICAgPyBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtbWluaW1hbC1mYWNl IiksIHRydWUpCisgICAgICAgICAgOiAoYWN0aXZlX2N1cnNvcl9wCisgICAgICAgICAgICAgJiYg IW1pbmltYWxfcCkKKyAgICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVy biAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICA6IERFRkFV TFRfRkFDRV9JRDsKKyAgICAgICAgZmFjZV9pZCA9IChjdXJzb3JfdHlwZSA9PSBMRUZUX0ZSSU5H RV9CSVRNQVApCisgICAgICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAg ICAgICAgICAgICAgICAgOi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SwgQGxhd2xp c3QgcHJlZmVycyBub3QgdG8KKyAgICAgICAgcmVseSB1cG9uIGEgTGlzcCBzZXR0aW5nIHVzaW5n IGBzZXQtZnJpbmdlLWJpdG1hcC1mYWNlJy4gKi8KKyAgICAgICAgZ2x5cGhfcm93LT5sZWZ0X2Zy aW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5PX0ZSSU5HRV9CSVRNQVA7 CisgICAgICAgIGdseXBoX3Jvdy0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgZHJh d19mcmluZ2VfYml0bWFwICh3LCBnbHlwaF9yb3csIHRydWUpOworICAgICAgfQorICAgICAgZWxz ZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgICAmJiAoZmxhdm9yID09IE1DX0hPTExPV19S RUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNf SE9MTE9XX1JFQ1RBTkdMRQorICAgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNf VkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FM X0JBUl9CQUNLU0xBU0gpKQorICAgICAgICB7CisgICAgICAgICAgTGlzcF9PYmplY3QgYml0bWFw X2ZsYXZvciA9IChmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfaG9sbG93X3JlY3Rhbmds ZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChm bGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGlj YWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jh cl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBRbmls OworICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gUklHSFRfRlJJTkdF X0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZnJpbmdlX2JpdG1h cCAoYml0bWFwX2ZsYXZvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBOT19GUklOR0Vf QklUTUFQOworICAgICAgICAgIGZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gUklHSFRfRlJJTkdF X0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy12ZXJ0aWNhbC1iYXItZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgICAg ICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICBnbHlwaF9yb3ctPmN1cnNvcl9pbl9mcmlu Z2VfcCA9IGZhbHNlOworICAgICAgICAgIGdseXBoX3Jvdy0+ZnJpbmdlX2JpdG1hcF9wZXJpb2Rp Y19wID0gMDsKKyAgICAgICAgICBnbHlwaF9yb3ctPnJpZ2h0X2ZyaW5nZV9iaXRtYXAgPSBmcmlu Z2VfYml0bWFwOworICAgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQgPSBm YWNlX2lkOworICAgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX29mZnNldCA9IDA7Cisg ICAgICAgICAgZHJhd19mcmluZ2VfYml0bWFwICh3LCBnbHlwaF9yb3csIGZhbHNlKTsKKyAgICAg ICAgfQorICAgICAgICBlbHNlIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgICAgICAg ICAgfHwgZmxhdm9yID09IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICB8fCBmbGF2b3Ig PT0gTUNfR0xZUEhfVEFCKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHctPm1jLmggPSBoOwor ICAgICAgICAgICAgdy0+bWMuZnggPSBmeDsKKyAgICAgICAgICAgIHctPm1jLmZ5ID0gZnk7Cisg ICAgICAgICAgICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBmbGF2b3I7CisgICAgICAgICAgICB3LT5t Yy5yZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAoY29sb3JfdmVjdG9yLCAwKSk7CisgICAgICAgICAg ICB3LT5tYy5ncmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGIChjb2xvcl92ZWN0b3IsIDEpKTsKKyAg ICAgICAgICAgIHctPm1jLmJsdWUgPSBYRkxPQVRfREFUQSAoQVJFRiAoY29sb3JfdmVjdG9yLCAy KSk7CisgICAgICAgICAgICB3LT5tYy5wb3NpbnQgPSBwb3NpbnQ7CisgICAgICAgICAgICAvKiBT b21lIG9mIHRoZXNlIHZhbHVlcyBjb21lIHRocm91Z2ggYXMgMS4wMDM5MDYsIHdoaWNoIGNhdXNl cyBhIGJyZWFrYWdlCisgICAgICAgICAgICBvZiB0aGUgY29sb3JzIGluIHRoYXQgbXVsdGlwbGlj YXRpb24gYnkgdGhlIGJhc2Ugd2lsbCBleGNlZWQgdGhlIGJhc2UuICovCisgICAgICAgICAgICBp ZiAody0+bWMucmVkID4gMS4wKQorICAgICAgICAgICAgICB3LT5tYy5yZWQgPSAxLjA7CisgICAg ICAgICAgICBpZiAody0+bWMuZ3JlZW4gPiAxLjApCisgICAgICAgICAgICAgIHctPm1jLmdyZWVu ID0gMS4wOworICAgICAgICAgICAgaWYgKHctPm1jLmJsdWUgPiAxLjApCisgICAgICAgICAgICAg IHctPm1jLmJsdWUgPSAxLjA7CisgICAgICAgICAgICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRv d19jdXJzb3IgKHcsIGdseXBoX3JvdywgeCwgeSwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgdHJ1ZSwgYWN0 aXZlX2N1cnNvcl9wKTsKKyAgICAgICAgICB9CisgIC8qIFJlc3RvcmUgdGhlIHByZXZpb3VzIHZh bHVlcyBmb3Igdy0+cGh5c19jdXJzb3IgYW5kIGdseXBoX3Jvdy4gKi8KKyAgdy0+cGh5c19jdXJz b3Jfb25fcCA9IHBoeXNfY3Vyc29yX29uX3A7CisgIHctPnBoeXNfY3Vyc29yLnggPSBwaHlzX2N1 cnNvcl94OworICB3LT5waHlzX2N1cnNvci55ID0gcGh5c19jdXJzb3JfeTsKKyAgdy0+cGh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hMRVNTX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwK KyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQg JTEuMWQlMS4xZCAlNWQgJTRkICAlM2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/ IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAg KGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgID8gJ0MnCisgICAgICAgICA6ICdH JyksCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAg IGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPnUuY2gsCisgICAgICAgIGdseXBo LT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlw aC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+ aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICgo IU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICYmIGdseXBoLT51LmNoID09IDkpCisgICAgICAg ICAgID8gIlxcdCIKKyAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAm JiBnbHlwaC0+dS5jaCA9PSAxMCkKKyAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgOiAoIU5J TFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDMyKQorICAgICAg ICAgICA/ICJcXHMiCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggIT0gOQorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMTAKKyAg ICAgICAgICAgICYmIGdseXBoLT51LmNoICE9IDMyKQorICAgICAgICAgICA/IFNTREFUQSAoY2hh cmFjdGVyKQorICAgICAgICAgOiAiXFw/IikpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5 cGUgPT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAg ICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFk JTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDog cm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywK KyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBp eGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAg IGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9w LAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywg Z2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIpOworICAgIH0KKyAgZWxz ZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAo c3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHgl MDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAgICAgICBn bHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFd ID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAor ICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAo Z2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAoU1RSSU5HUCAo Z2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5 cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScpKSksCisgICAg ICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUu aW1nX2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94 X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBo LT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJa ViIgOiAiLS0iLAorICAgICAgICAnLicpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUg PT0gQ09NUE9TSVRFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAg ICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisgICAgICAg IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJl YV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gs CisgICAgICAgICcrJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQ IChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQ IChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChn bHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAg ICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+ dS5jbXAuaWQpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAg ICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisg ICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+dS5jbXAu YXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVkICU0ZCAgJTNkICAlM2Qg JXMgLiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT54LCBnbHlw aC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0i LAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgt PnNsaWNlLmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAi XG4iKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgpCisg ICAgeworI2lmbmRlZiBIQVZFX1hXSURHRVRTCisgICAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxz ZQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICAlNWQvJS01ZCAlNWQgJTRjICU2 ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4i LAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93 LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICBy ZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAg ICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicKKyAgICAgICAgIDog KFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgOiAn LScpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+ZmFjZV9p ZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0 X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisgICAgICAgIGdseXBoLT54 LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIg OiAiLS0iLAorICAgICAgICAnLicpOworI2VuZGlmCisgICAgfQorfQorCisvKiBEdW1wIHRoZSBj b250ZW50cyBvZiBnbHlwaCByb3cgYXQgVlBPUyBpbiBNQVRSSVggdG8gc3RkZXJyLgorICAgR0xZ UEhTIDAgbWVhbnMgZG9uJ3Qgc2hvdyBnbHlwaCBjb250ZW50cy4KKyAgIEdMWVBIUyAxIG1lYW5z IHNob3cgZ2x5cGhzIGluIHNob3J0IGZvcm0KKyAgIEdMWVBIUyA+IDEgbWVhbnMgc2hvdyBnbHlw aHMgaW4gbG9uZyBmb3JtLiAgKi8KKwordm9pZAorbWNfZHVtcF9nbHlwaF9yb3cgKHN0cnVjdCBn bHlwaF9yb3cgKnJvdywgaW50IHZwb3MsIGludCBnbHlwaHMpCit7CisgIGludCByZWxhdGl2ZV94 ID0gMDsKKyAgaWYgKGdseXBocyAhPSAxKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwg IlxuRFVNUCBHTFlQSCBST1dcbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiUm93ICAgICBT dGFydCAgICAgICBFbmQgVXNlZCBvRT48XFxDVFpGZXNtICAgICBYICAgIFkgICAgVyAgICBIICAg IFYgICAgQSAgICBQXG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIj09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PVxuIik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIlM2QgJTkicEQiZCAlOSJwRCJk ICU0ZCAlMS4xZCUxLjFkJTEuMWQlMS4xZFwKKyUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4x ZCUxLjFkJTEuMWQgICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZFxuIiwKKyAgICAgICAgIHZw b3MsCisgICAgICAgICBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyksCisgICAgICAgICBN QVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgcm93LT51c2VkW1RFWFRfQVJF QV0sCisgICAgICAgICByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wLAorICAgICAg ICAgcm93LT5lbmFibGVkX3AsCisgICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9sZWZ0X3AsCisg ICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wLAorICAgICAgICAgcm93LT5jb250aW51 ZWRfcCwKKyAgICAgICAgIE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAocm93KSwKKyAg ICAgICAgIE1BVFJJWF9ST1dfRElTUExBWVNfVEVYVF9QIChyb3cpLAorICAgICAgICAgcm93LT5l bmRzX2F0X3p2X3AsCisgICAgICAgICByb3ctPmZpbGxfbGluZV9wLAorICAgICAgICAgcm93LT5l bmRzX2luX21pZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPnN0YXJ0c19pbl9taWRkbGVf b2ZfY2hhcl9wLAorICAgICAgICAgcm93LT5tb3VzZV9mYWNlX3AsCisgICAgICAgICByb3ctPngs CisgICAgICAgICByb3ctPnksCisgICAgICAgICByb3ctPnBpeGVsX3dpZHRoLAorICAgICAgICAg cm93LT5oZWlnaHQsCisgICAgICAgICByb3ctPnZpc2libGVfaGVpZ2h0LAorICAgICAgICAgcm93 LT5hc2NlbnQsCisgICAgICAgICByb3ctPnBoeXNfYXNjZW50KTsKKyAgICAgIC8qIFRoZSBuZXh0 IDMgbGluZXMgc2hvdWxkIGFsaWduIHRvICJTdGFydCIgaW4gdGhlIGhlYWRlci4gICovCisgICAg ICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTkicEQiZCAlOSJwRCJkXHQlNWRcbiIsIHJvdy0+c3Rh cnQub3ZlcmxheV9zdHJpbmdfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5vdmVybGF5X3N0cmlu Z19pbmRleCwKKyAgICAgICAgIHJvdy0+Y29udGludWF0aW9uX2xpbmVzX3dpZHRoKTsKKyAgICAg IGZwcmludGYgKHN0ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcbiIsCisgICAgICAgICBDSEFS UE9TIChyb3ctPnN0YXJ0LnN0cmluZ19wb3MpLAorICAgICAgICAgQ0hBUlBPUyAocm93LT5lbmQu c3RyaW5nX3BvcykpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAgICU5ZCAlOWRcbiIsIHJv dy0+c3RhcnQuZHB2ZWNfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5kcHZlY19pbmRleCk7Cisg ICAgfQorICBpZiAoZ2x5cGhzID4gMSkKKyAgICB7CisgICAgICBpbnQgYXJlYTsKKyAgICAgIGZv ciAoYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAg eworICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICBzdHJ1 Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgIC8qIEds eXBoIGZvciBhIGxpbmUgZW5kIGluIHRleHQuICAqLworICAgIGlmIChhcmVhID09IFRFWFRfQVJF QSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgKytn bHlwaF9lbmQ7CisgICAgaWYgKGdseXBoIDwgZ2x5cGhfZW5kKQorICAgICAgZnByaW50ZiAoc3Rk ZXJyLCAiR2x5cGgjL1RvdGFsIFJlbC5YIFQgICAgICAgUG9zIE8gICBXICAgICBDb2RlIEZhY2Ug TFIgICAgIFggICAgWSBIUE9TIFZQT1MgWlYgQ1xuIik7CisgICAgZm9yICg7IGdseXBoIDwgZ2x5 cGhfZW5kOyArK2dseXBoKQorICAgICAgeworICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGds eXBoLCBhcmVhLCByZWxhdGl2ZV94KTsKKyAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4 ZWxfd2lkdGg7CisgICAgICB9CisgIH0KKyAgICB9CisgIGVsc2UgaWYgKGdseXBocyA9PSAxKQor ICAgIHsKKyAgICAgIGludCBhcmVhOworICAgICAgY2hhciBzW1NIUlRfTUFYICsgNF07CisgICAg ICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEp CisgIHsKKyAgICBpbnQgaTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgcm93LT51c2VkW2FyZWFdOyAr K2kpCisgICAgICB7CisgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1th cmVhXSArIGk7CisgICAgICAgIGlmIChpID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICYm IGFyZWEgPT0gVEVYVF9BUkVBCisgICAgICAmJiBOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAg JiYgZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gJyAn KQorICAgIHsKKyAgICAgIHN0cmNweSAoJnNbaV0sICJbXFxuXSIpOworICAgICAgaSArPSA0Owor ICAgIH0KKyAgICAgICAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0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zLCBkNCwgZDUsIHlwb3M7CisgICAgICBib29sIHZpc2libGVfcCA9IHBvc192aXNpYmxlX3Ag KHcsIFBULCAmZDEsICZkMiwgJmQzLCAmZDQsICZkNSwgJnlwb3MpOworICAgICAgaW50IGhlYWRl cl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgaW50 IHZvZmZzZXQgPSAoaGVhZGVyX2xpbmVfaGVpZ2h0ID4gMAorICAgICAgICAgICAgICAgICAgICAg JiYgeXBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgPyB5cG9zICsgMQorICAgICAgICAg ICAgICAgICAgICAgIDogeXBvczsKKyAgICAgIGlmICh2aXNpYmxlX3ApCisgICAgICAgIHZwb3Mg PSB2b2Zmc2V0OworICAgICAgICBlbHNlCisgICAgICAgICAgdnBvcyA9IDA7CisgICAgfQorICAg IGVsc2UKKyAgICAgIHsKKyAgICAgICAgQ0hFQ0tfTlVNQkVSIChyb3cpOworICAgICAgICB2cG9z ID0gWElOVCAocm93KTsKKyAgICAgIH0KKyAgbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7Cisg IGlmICh2cG9zID49IDAgJiYgdnBvcyA8IG1hdHJpeC0+bnJvd3MpCisgICAgbWNfZHVtcF9nbHlw aF9yb3cgKE1BVFJJWF9ST1cgKG1hdHJpeCwgdnBvcyksCisgICAgICAgIHZwb3MsCisgICAgICAg IFRZUEVfUkFOR0VEX0lOVEVHRVJQIChpbnQsIGdseXBocykgPyBYSU5UIChnbHlwaHMpIDogMik7 CisgIHJldHVybiBRbmlsOworfQorCit2b2lkCittY19kdW1wX2dseXBoX21hdHJpeCAoc3RydWN0 IGdseXBoX21hdHJpeCAqbWF0cml4LCBpbnQgZ2x5cGhzKQoreworICBpbnQgaTsKKyAgZm9yIChp ID0gMDsgaSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICBtY19kdW1wX2dseXBoX3JvdyAoTUFU UklYX1JPVy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G9zID0gJWQsIHZwb3MgPSAlZFxuIiwKKwkgICB3LT5jdXJzb3IueCwg dy0+Y3Vyc29yLnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcyk7CisgIGZwcmludGYg KHN0ZGVyciwgIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxu Iik7CisgIG1jX2R1bXBfZ2x5cGhfbWF0cml4ICh3LT5jdXJyZW50X21hdHJpeCwKKwkJICAgICBU WVBFX1JBTkdFRF9JTlRFR0VSUCAoaW50LCBnbHlwaHMpID8gWElOVCAoZ2x5cGhzKSA6IDApOwor ICByZXR1cm4gUW5pbDsKK30KKworc3RhdGljIHZvaWQKK21jX2hlbHBlciAoc3RydWN0IHdpbmRv dyAqdywgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsCisgICAgICAgICAg IGludCB2cG9zLCBpbnQgaCwgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3JfdHlwZSwgaW50 IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCwgTGlzcF9P YmplY3QgYmFja2dyb3VuZCwgYm9vbCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgIGJvb2wg bWluaW1hbF9wLCBpbnQgZmxhdm9yLCBpbnQgcG9zaW50LCBMaXNwX09iamVjdCAqcmVzdWx0KQor eworICBib29sIG1jX3N0ZGVycl9wID0gIU5JTFAgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBtY19z dGRlcnIpKTsKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5kb3csIHcp OworICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2luZG93 LCBRbmlsKTsKKyAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOwor ICBkb3Vib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ludCAoJWQpXG5cCisgIEZHLVJHQiAoJWYv JWYvJWYpIHwgQkctUkdCICglZi8lZi8lZilcbiIsCisgIHdpbmRvd19jaGFyLAorICB4LCBmeCwg eSwgZnksIGhwb3MsIHZwb3MsIGgsCisgIFNTREFUQSAoRnByaW4xX3RvX3N0cmluZyAobWNfY3Vy c29yX3R5cGVfdG9fbGlzcCAoY3Vyc29yX3R5cGUpLCBRbmlsKSksCisgIGN1cnNvcl93aWR0aCwK KyAgKGFjdGl2ZV9jdXJzb3JfcCA/ICJ0cnVlIiA6ICJmYWxzZSIpLAorICAobWluaW1hbF9wID8g InRydWUiIDogImZhbHNlIiksCisgIChmbGF2b3IgPT0gTk9fRkxBVk9SCisgICAgICA/ICJOT19G TEFWT1IiCisgICAgOiBmbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgID8gIk1DX0dMWVBIIgorICAg IDogZmxhdm9yID09IE1DX0dMWVBITEVTUworICAgICAgPyAiTUNfR0xZUEhMRVNTIgorICAgIDog Zmxhdm9yID09IE1DX0dMWVBIX1RBQgorICAgICAgPyAiTUNfR0xZUEhfVEFCIgorICAgIDogZmxh dm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICA/ICJNQ19PVkVSTEFZX0FSUk9X X0JJVE1BUCIKKyAgICA6IGZsYXZvciA9PSBNQ19QSUxDUk9XCisgICAgICA/ICJNQ19QSUxDUk9X IgorICAgIDogZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAg ID8gIk1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1ciCisgICAgOiBmbGF2b3IgPT0gTUNf SE9MTE9XX1JFQ1RBTkdMRQorICAgICAgPyAiTUNfSE9MTE9XX1JFQ1RBTkdMRSIKKyAgICA6IGZs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgID8gIk1DX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVyIKKyAgICA6IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAg ID8gIk1DX1ZFUlRJQ0FMX0JBUiIKKyAgICA6IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFD S1NMQVNICisgICAgICA/ICJNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIIgorICAgIDogIk9PUFMi KSwKKyAgcG9zaW50LAorICByZWRfZmcsIGdyZWVuX2ZnLCBibHVlX2ZnLCByZWRfYmcsIGdyZWVu X2JnLCBibHVlX2JnKTsKKyAgYm9vbCByZW1vdmVfcCA9IGZhbHNlOworICBtY19kcmF3X2VyYXNl X2h5YnJpZCAodywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCBoLCBjdXJzb3JfdHlwZSwKKyAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX2N1 cnNvcl9wLCBtaW5pbWFsX3AsCisgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3IsIHBvc2lu dCwgcmVtb3ZlX3ApOworICBMaXNwX09iamVjdCBmaWZ0ZWVuX2VsZW1lbnRzID0gbGlzdG4gKENP TlNUWVBFX0hFQVAsIDE1LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtYWtlX251bWJlciAoeCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1ha2VfbnVtYmVyIChmeCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG1ha2VfbnVtYmVyICh5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbWFrZV9udW1iZXIgKGZ5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbWFrZV9udW1iZXIgKGhwb3MpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAodnBvcyksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChoKSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWNfY3Vyc29yX3R5cGVfdG9fbGlzcCAoY3Vyc29yX3R5 cGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJl ciAoY3Vyc29yX3dpZHRoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg YmFja2dyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFr ZV9udW1iZXIgKGFjdGl2ZV9jdXJzb3JfcCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChtaW5pbWFsX3ApLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoZmxhdm9yKSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHBvc2ludCkpOworICAq cmVzdWx0ID0gRmNvbnMgKGZpZnRlZW5fZWxlbWVudHMsICpyZXN1bHQpOworfQorCisvKiBSZXR1 cm4gYSBwb2ludGVyIHRvIHRoZSBnbHlwaCBXJ3MgcGh5c2ljYWwgY3Vyc29yIGlzIG9uLiAgVmFs dWUgaXMKKyAgIG51bGwgaWYgVydzIGN1cnJlbnQgbWF0cml4IGlzIGludmFsaWQsIHNvIHRoYXQg bm8gbWVhbmluZ2Z1bCBnbHlwaAorICAgY2FuIGJlIHJldHVybmVkLiAgKi8KKworc3RydWN0IGds eXBoICoKK21jX2dldF9waHlzX2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqdywgaW50IHgs IGludCBocG9zLCBpbnQgdnBvcykKK3sKKyAgc3RydWN0IGdseXBoX3JvdyAqcm93OworICBzdHJ1 Y3QgZ2x5cGggKmdseXBoOworICBpZiAoISh2cG9zID49IDAKKyAgICAgICAgJiYgdnBvcyA8IHct PmN1cnJlbnRfbWF0cml4LT5ucm93cykpCisgICAgcmV0dXJuIE5VTEw7CisgIHJvdyA9IE1BVFJJ WF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgaWYgKCFyb3ctPmVuYWJsZWRfcCkK KyAgICByZXR1cm4gTlVMTDsKKyAgaWYgKHctPmhzY3JvbGwpCisgICAgeworICAgICAgLyogV2hl biB0aGUgd2luZG93IGlzIGhzY3JvbGxlZCwgY3Vyc29yIGhwb3MgY2FuIGxlZ2l0aW1hdGVseSBi ZQorICAgICAgb3V0IG9mIGJvdW5kcywgYnV0IHdlIGRyYXcgdGhlIGN1cnNvciBhdCB0aGUgY29y cmVzcG9uZGluZworICAgICAgd2luZG93IG1hcmdpbiBpbiB0aGF0IGNhc2UuICAqLworICAgICAg aWYgKCFyb3ctPnJldmVyc2VkX3AgJiYgaHBvcyA8IDApCisgICAgICAgIGhwb3MgPSAwOworICAg ICAgaWYgKHJvdy0+cmV2ZXJzZWRfcCAmJiBocG9zID49IHJvdy0+dXNlZFtURVhUX0FSRUFdKQor ICAgICAgICBocG9zID0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgIH0KKyAgaWYgKDAg PD0gaHBvcyAmJiBocG9zIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgZ2x5cGggPSByb3ct PmdseXBoc1tURVhUX0FSRUFdICsgaHBvczsKKyAgICBlbHNlCisgICAgICBnbHlwaCA9IE5VTEw7 CisgIHJldHVybiBnbHlwaDsKK30KKworLyogTVVMVElQTEVfQ1VSU09SUzogIFdlIGRvIG5vdCB1 c2UgdGhpcyBmdW5jdGlvbi4KKyAgIEhPUklaT05UQUxfUlVMRVI6ICB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HJldGNoLWJsb2NrLWN1cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3 IGEKKyAgICAgICAgIHJlY3RhbmdsZSBhcyB3aWRlIGFzIHRoZSBnbHlwaCwgYnV0IHVzZSBhIGNh bm9uaWNhbCBjaGFyYWN0ZXIKKyAgICAgICAgIHdpZHRoIGluc3RlYWQuICAqLworICAgICAgKndk ID0gc2NyYXRjaF9nbHlwaHMtPnBpeGVsX3dpZHRoOworICAgICAgaWYgKHggPCAwKQorICAgICAg ICB7CisgICAgICAgICAgKndkICs9IHg7CisgICAgICAgICAgeCA9IDA7CisgICAgICAgIH0KKyAg ICAgIGlmIChzY3JhdGNoX2dseXBocy0+dHlwZSA9PSBTVFJFVENIX0dMWVBICisgICAgICAgICAg JiYgIXhfc3RyZXRjaF9jdXJzb3JfcCkKKyAgICAgICAgKndkID0gbWluIChGUkFNRV9DT0xVTU5f V0lEVEggKGYpLCAqd2QpOworICAgICAgLyogRG9uJ3QgbGV0IHRoZSBob2xsb3cgY3Vyc29yIGds eXBoIGRlc2NlbmQgYmVsb3cgdGhlIGdseXBoIHJvdydzCisgICAgICAgICBhc2NlbnQgdmFsdWUs IGxlc3QgdGhlIGhvbGxvdyBjdXJzb3IgbG9va3MgZnVubnkuICAqLworICAgICAgYXNjZW50ID0g Z2x5cGhfcm93LT5hc2NlbnQ7CisgICAgICBpZiAoZ2x5cGhfcm93LT5hc2NlbnQgPCBzY3JhdGNo X2dseXBocy0+YXNjZW50KQorICAgICAgICB7CisgICAgICAgICAgeSAtPSBzY3JhdGNoX2dseXBo cy0+YXNjZW50IC0gZ2x5cGhfcm93LT5hc2NlbnQ7CisgICAgICAgICAgYXNjZW50ID0gc2NyYXRj aF9nbHlwaHMtPmFzY2VudDsKKyAgICAgICAgfQorICAgICAgLyogSWYgeSBpcyBiZWxvdyB3aW5k b3cgYm90dG9tLCBlbnN1cmUgdGhhdCB3ZSBzdGlsbCBzZWUgYSBjdXJzb3IuICAqLworICAgICAg aDAgPSBtaW4gKEZSQU1FX0xJTkVfSEVJR0hUIChmKSwgZ2x5cGhfcm93LT52aXNpYmxlX2hlaWdo dCk7CisgICAgICBoX3RlbXAgPSBtYXggKGgwLCBhc2NlbnQgKyBzY3JhdGNoX2dseXBocy0+ZGVz Y2VudCk7CisgICAgICBoMCA9IG1pbiAoaDAsIGFzY2VudCArIHNjcmF0Y2hfZ2x5cGhzLT5kZXNj ZW50KTsKKyAgICAgIHkwID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICBp ZiAoeSA8IHkwKQorICAgICAgICB7CisgICAgICAgICAgaF90ZW1wID0gbWF4IChoX3RlbXAgLSAo eTAgLSB5KSArIDEsIGgwKTsKKyAgICAgICAgICB5ID0geTAgLSAxOworICAgICAgICB9CisgICAg ICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICB5MCA9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3 KSAtIGgwOworICAgICAgICAgIGlmICh5ID4geTApCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIGhfdGVtcCArPSB5IC0geTA7CisgICAgICAgICAgICAgIHkgPSB5MDsKKyAgICAgICAgICAg IH0KKyAgICAgICAgfQorICAgICAgKmZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAo dywgeCk7CisgICAgICAqZnkgPSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgeSk7CisgICAg ICAqaCA9IGhfdGVtcDsKKyAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBIQkFSX0NVUlNPUikKKyAg ICAgICAgeworICAgICAgICAgIGludCBjdXJzb3JfaGVpZ2h0ID0gKGN1cnNvcl93aWR0aCA8IDEp ID8gbHJpbnQgKDAuMjUgKiAqaCkgOiBjdXJzb3Jfd2lkdGg7CisgICAgICAgICAgaWYgKGN1cnNv cl9oZWlnaHQgPiBnbHlwaF9yb3ctPmhlaWdodCkKKyAgICAgICAgICAgIGN1cnNvcl9oZWlnaHQ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OSUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwgbWFy a19hY3RpdmUpKQorICAgICAgJiYgIU5JTFAgKG0pKQorICAgIHJldHVybiBtYWtlX251bWJlciAo KFBUIDwgWEZBU1RJTlQgKG0pKSA9PSBiZWdpbm5pbmdwCisgICAgICAgICAgICAgICAgICAgICAg ICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICA6IGNsaXBfdG9fYm91bmRzIChCRUdWLCBY RkFTVElOVCAobSksIFpWKSk7CisgICAgICBlbHNlCisgICAgICAgIHJldHVybiBRbmlsOworfQor Cit2b2lkCittY19lbmdpbmUgKHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgc3RydWN0IGdseXBoICpn bHlwaCwgaW50IGFyZWEsIGludCByZWxhdGl2ZV94LAorICAgICAgICAgICAgc3RydWN0IHdpbmRv dyAqdywgcHRyZGlmZl90IHBvc2ludCwgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3JfdHlw ZSwKKyAgICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGgsIExpc3BfT2JqZWN0IGZvcmVncm91bmQs IGJvb2wgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgYm9vbCBtaW5pbWFsX3AsIGVudW0g dHlwZV9vZl9hY3Rpb24gYWN0aW9uX3R5cGUsIExpc3BfT2JqZWN0ICpyZXN1bHQpCit7CisgIGJv b2wgbWNfc3RkZXJyX3AgPSAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3N0ZGVycikp OworICBpbnQgb3BvaW50X3ggPSB3LT5vdXRwdXRfY3Vyc29yLng7CisgIGludCBvcG9pbnRfeSA9 IHctPm91dHB1dF9jdXJzb3IueTsKKyAgaW50IG9wb2ludF9ocG9zID0gdy0+b3V0cHV0X2N1cnNv ci5ocG9zOworICBpbnQgb3BvaW50X3Zwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLnZwb3M7CisgIExp c3BfT2JqZWN0IGNoYXJhY3RlciA9IChDSEFSQUNURVJQIChtYWtlX251bWJlciAoZ2x5cGgtPnUu Y2gpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBGY2hhcl90b19zdHJpbmcgKG1ha2Vf bnVtYmVyIChnbHlwaC0+dS5jaCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsK KyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGludCB0ZXh0X2FyZWFf d2lkdGggPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworICBpbnQgZnJhbWVfY2hh cl93aWR0aCA9IEZSQU1FX0NPTFVNTl9XSURUSCAoZik7CisgIGludCB0ZW1wX3ggPSByZWxhdGl2 ZV94OworICBpbnQgdGVtcF95ID0gcm93LT55OworICBpbnQgdGVtcF9ocG9zID0gZ2x5cGggLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdOworICBpbnQgdGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9T IChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgaW50IHRlbXBfZmFjZV9pZCA9IGdseXBoLT5m YWNlX2lkOworICBpbnQgdGVtcF9jaGFycG9zID0gZ2x5cGgtPmNoYXJwb3M7CisKKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgQ0hBUl9H TFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKyAgaWYgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGds eXBoLT50eXBlID09IEdMWVBITEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkK KyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMg JTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVz ICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAg ICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAg ICAgICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAg ICAgICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisg ICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAg IDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAg ICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAg ICAgICAgICA6ICctJykpKSwKKyAgICAgICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAg ICAgICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBo LT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAg ICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgt Pnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAgICAg ICAgJi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91bmQsCisgICAgICAgICAg ICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAg ICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7 CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAg ICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEgg ICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJ Wk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQ T1MgKHJvdywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgICAgaW50IHRlbXBfaHBvcyA9IGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9w ID0gKG9wb2ludF94ID09IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIG9wb2ludF9ocG9zID09IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBm eSwgX2gsIF93ZDsKKyAgICAgIG1jX2d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9o LCBfd2Q7CisgICAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRl bXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBf eSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAg ICAgICAgdGVtcF94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAodGVt cF94IDw9IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNf aGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywK KyAgICAgICAgICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg Zm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBf ZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5p bWFsX3AsIE1DX0dMWVBITEVTUywgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgICAgICAg ICB0ZW1wX3ggKz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQor ICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAgQ0hBUl9HTFlQSCB8IEdMWVBIT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yc29yX2luX2ZyaW5nZV9wID0gb3BvaW50X3ggKyBmcmFtZV9jaGFyX3dpZHRo ID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5n ZV9wCisgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisg ICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAg ICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAg ICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AK KyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAg ICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAg ICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAg ID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAg ICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsK KyAgICAgIGludCB0ZW1wX3ggPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJv dy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPiByZWxh dGl2ZV94KQorICAgICAgICAgICAgICAgICAgICA/IG9wb2ludF94CisgICAgICAgICAgICAgICAg ICAgIDogcmVsYXRpdmVfeDsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJ R0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xB U0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJz b3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICBpbnQgX2Z4LCBfZnksIGgsIF93 ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZf ZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJl9meSwgdGVt cF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZo LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIGludCBmeCA9IFdJTkRP V19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIG9wb2ludF94KTsKKyAgICAgIG1jX2hlbHBlciAo dywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAg ICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAg ICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9w LAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1 bHQpOworICAgICAgYnJ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sCisgICAg ICAgICdTJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAg ICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZh Y2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5y aWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9z LCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIp OworICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K Ky8qICAgICAgICAgICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUzogIFNUUkVUQ0hfR0xZ UEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAg Y2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94 LCAtMSwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAg IC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAg ICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAg ICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQpOwor ICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgICAgICAgICAgIEhPUklaT05UQUxfUlVMRVI6ICBTVFJFVENIX0dMWVBIICAgICAgICAg ICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpP TlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBpbnQgdGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9T IChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgICAgIGludCB0ZW1wX2hwb3MgPSBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9 IChvcG9pbnRfeCA9PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBvcG9pbnRfaHBvcyA9PSB0ZW1wX2hwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9wb2ludF95ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAgaW50IF9meCwgZnks IF9oLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVt cF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZm eSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpZiAodGVt cF94IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3Ap CisgICAgICAgIHdoaWxlICh0ZW1wX3ggPCByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRo KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVt cF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgIC0x LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAg ICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAg ICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSF9UQUIsIHRlbXBfY2hhcnBv cywgcmVzdWx0KTsKKyAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAg ICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAodGVtcF94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoIDwg dGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICYmIHJlYWxfZmFrZV9jdXJzb3JfcAor ICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+cGl4ZWxfd2lkdGggPiBmcmFtZV9jaGFyX3dpZHRo KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOwor ICAgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lk dGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIHRlbXBf eCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFj dGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNf R0xZUEhfVEFCLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgICAgdGVtcF94 ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisgICAg ICAvKiBJdCBpcyBwb3NzaWJsZSB0byB1c2UgTUNfR0xZUEggYW5kIGFkanVzdCB0aGUgZnggY29v cmRpbmF0ZTsgaG93ZXZlciwKKyAgICAgIHRoZSBtaWRkbGUtZG90IC8gc3BhY2UgZ2x5cGggb24g YSB3b3JkLXdyYXBwZWQgbGluZSB3aWxsIGJlIG92ZXJ3cml0dGVuCisgICAgICBudW1lcm91cyB0 aW1lcyBhbmQgaXMgdW5zaWdodGx5LiAqLworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxKQorICAgICAgICB7CisgICAgICAgICAg aW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21l dHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgJl93ZCk7CisgICAgICAgICAgLyogdGVtcF94ICs9IGdseXBoLT5waXhlbF93aWR0aDsgKi8K KyAgICAgICAgICB3aGlsZSAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0 ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAtMSwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBITEVTUywgdGVtcF9jaGFycG9zLCBy ZXN1bHQpOworICAgICAgICAgICAgICB0ZW1wX3ggKz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVI6ICBT VF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Y3Vyc29yX2luX2ZyaW5nZV9wID0gb3BvaW50 X3ggKyBmcmFtZV9jaGFyX3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAgIGludCBmbGF2 b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1 bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JB Ul9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAor ICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICA6 IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVu Y2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAg ICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2Fy ZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94ID4gcmVsYXRpdmVfeCkK KyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAg OiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAg ICAgICAgICAgOiBNQ19HTFlQSF9UQUI7CisgICAgICBpbnQgdGVtcF94ID0gb3BvaW50X3g7Cisg ICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAg IHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklO R0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5 c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNv cl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhF TF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBf eSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jf dHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19s c2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAg bWluaW1hbF9wLCBmbGF2b3IsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIGJyZWFrOwor ICAgIH0KKyAgfQorICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIEVORDogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAg ICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisKKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIElNQUdFX0dM WVBIICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgIHsKKyAgICBpZiAo bWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJk LyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAlNWQgJTRk ICAlM2QgICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJl YV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ0knLAorICAgICAgICBnbHlw aC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8g J1MnCis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Y3RpdmVfY3Vyc29yX3AsCisg ICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEgsIHRlbXBfY2hhcnBvcywgcmVzdWx0 KTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAg ICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIElNQUdFX0dMWVBIICAgICAg ICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhP UklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgaW50IHRlbXBfdnBvcyA9IE1BVFJJWF9ST1df VlBPUyAocm93LCB3LT5jdXJyZW50X21hdHJpeCk7CisgICAgICBpbnQgdGVtcF9ocG9zID0gZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29y X3AgPSAob3BvaW50X3ggPT0gcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgb3BvaW50X2hwb3MgPT0gdGVtcF9ocG9zCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAgIGludCBfZngs IGZ5LCBfaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3cs IHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICA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X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVt cF95LCAmZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAg ICAgICAgICB0ZW1wX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgIHdoaWxlICh0 ZW1wX3ggPD0gdGV4dF9hcmVhX3dpZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBt Y19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVt cF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1p bmltYWxfcCwgTUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAg ICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9 CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAg ICAgICAgICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVI6ICBJTUFHRV9HTFlQSCAgICAgICAg ICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0t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hX3dpZHRoOworICAgICAgaW50IGZsYXZvciA9IChjdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElD QUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAg ICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAg ICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBI OworICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAg ICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8 IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRf RlJJTkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0 X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBj dXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVf UElYRUxfWCAodywgb3BvaW50X3gpOworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIGZ4LCB0 ZW1wX3ksIC0xLCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgaCwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNf YmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAg ICAgIG1pbmltYWxfcCwgZmxhdm9yLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVh azsKKyAgICB9CisgIH0KKyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgRU5EOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAg ICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgQ09NUE9T SVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCkKKyAgewor ICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIHsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLAor ICAgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIs CisgICAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAgICgo cm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAg ICAgIHJlbGF0aXZlX3gsCisgICAgICAgICAgJysnLAorICAgICAgICAgIGdseXBoLT5jaGFycG9z LAorICAgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICA/ICdCJwor ICAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICA/ICdT JworICAgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAg ICA/ICcwJworICAgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgICBnbHlwaC0+cGl4 ZWxfd2lkdGgsCisgICAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuY21wLmlkKTsKKyAg ICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAgICBnbHlw aC0+ZmFjZV9pZCwKKyAgICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICAg IGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+dS5jbXAuYXV0b21h dGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVkICU0ZCAgJTNkICAlM2QgJXMgLiBb JWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT54LCBnbHlwaC0+eSwg Z2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAorICAg ICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNl LmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIp OworICAgICAgfQorICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgQ09N UE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t ICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAo dywgdGVtcF94LCAtMSwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAg ICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAg ICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3Jf cCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCBy ZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisv KiAgICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIENPTVBPU0lURV9HTFlQ SCAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNh c2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBpbnQgdGVtcF92cG9zID0gTUFUUklY X1JPV19WUE9TIChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgICAgIGludCB0ZW1wX2hwb3Mg PSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICBib29sIHJlYWxfZmFrZV9j dXJzb3JfcCA9IChvcG9pbnRfeCA9PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSB0ZW1wX2hwb3MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAgaW50 IF9meCwgZnksIF9oLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcs IHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAg ICBpZiAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2Vf Y3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwg dGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNs ICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAg bWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgLyogSXQg aXMgcG9zc2libGUgdG8gdXNlIE1DX0dMWVBIIGFuZCBhZGp1c3QgdGhlIGZ4IGNvb3JkaW5hdGU7 IGhvd2V2ZXIsCisgICAgICB0aGUgbWlkZGxlLWRvdCAvIHNwYWNlIGdseXBoIG9uIGEgd29yZC13 cmFwcGVkIGxpbmUgd2lsbCBiZSBvdmVyd3JpdHRlbgorICAgICAgbnVtZXJvdXMgdGltZXMgYW5k IGlzIHVuc2lnaHRseS4gKi8KKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMSkKKyAgICAgICAgeworICAgICAgICAgIGludCBfZngs IGZ5LCBfaCwgX3dkOworICAgICAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywg cm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmX2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2Qp OworICAgICAgICAgIHRlbXBfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hp bGUgKHRlbXBfeCA8PSB0ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1w X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3 LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgICAg ICAgbWluaW1hbF9wLCBNQ19HTFlQSExFU1MsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAg ICAgICAgICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAg ICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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SAx CisgICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBa Vik7CisgICAgICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA9IG9wb2ludF94ICsgZnJhbWVfY2hh cl93aWR0aCA+PSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICBpbnQgZmxhdm9yID0gKGN1cnNvcl9p bl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdo dF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19W RVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0 X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAg ICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAg ICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAg ICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNf R0xZUEg7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVwor ICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAg ICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBS SUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBt Y19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVt cF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5 cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19G UkFNRV9QSVhFTF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwg ZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBo LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAg ICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAg ICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAg IGJyZWFrOworICAgIH0KKyAgfQorICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAg IC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BoLT5vYmplY3QpCisgICAgICAgICA/ ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8g J1MnCisgICAgICAgICAgICA6ICctJykpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisg ICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAor ICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnUueHdpZGdl dCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3Ms IGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisjZW5kaWYKKyAgc3dp dGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAg ICAgICAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlM6ICBYV0lER0VUX0dMWVBIICAgICAg ICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgTVVM VElQTEVfQ1VSU09SUzoKKyAgICB7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRl bXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAtMSwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNf YmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAg ICAgIG1pbmltYWxfcCwgTUNfR0xZUEgsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIGJy ZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAg ICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgWFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAg ICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVM RVI6CisgICAgeworICAgICAgaW50IHRlbXBfdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3 LT5jdXJyZW50X21hdHJpeCk7CisgICAgICBpbnQgdGVtcF9ocG9zID0gZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdOworICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50 X3ggPT0gcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3Bv aW50X2hwb3MgPT0gdGVtcF9ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBvcG9pbnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dk OworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9m eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnksIHRlbXBf aHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmX2gs IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaWYgKHRlbXBfeCA8PSB0 ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAg ICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92 cG9zLAorICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBm b3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lk KSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZ UEgsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIC8qIEl0IGlzIHBvc3NpYmxlIHRvIHVz ZSBNQ19HTFlQSCBhbmQgYWRqdXN0IHRoZSBmeCBjb29yZGluYXRlOyBob3dldmVyLAorICAgICAg dGhlIG1pZGRsZS1kb3QgLyBzcGFjZSBnbHlwaCBvbiBhIHdvcmQtd3JhcHBlZCBsaW5lIHdpbGwg YmUgb3ZlcndyaXR0ZW4KKyAgICAgIG51bWVyb3VzIHRpbWVzIGFuZCBpcyB1bnNpZ2h0bHkuICov CisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFth cmVhXSAtIDEpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAg ICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnksIHRl bXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgICAgICB0ZW1w X3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgIHdoaWxlICh0ZW1wX3ggPD0gdGV4 dF9hcmVhX3dpZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcs IHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5k LAorICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwg YWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNf R0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHRlbXBfeCAr PSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVh azsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAg ICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFhXSURHRVRfR0xZUEggICAgICAgICAgICAgICAgICAg ICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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V4dF9h cmVhX3dpZHRoOworICAgICAgaW50IGZsYXZvciA9IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAg ICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAg ICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAg ICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5j b250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tT TEFTSAorICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAg ICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisgICAgICAgICAgICAg ICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1D X1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAg JiYgb3BvaW50X3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQ SExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAgICAgICAgICAgICAg PyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYg KGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBmbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJTkdFX0JJVE1B UDsKKyAgICAgIGludCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29y X2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgs ICZfd2QpOworICAgICAgaW50IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywg b3BvaW50X3gpOworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIGZ4LCB0ZW1wX3ksIC0xLCB0 ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3R5cGUsIGN1 cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0 ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgIG1pbmltYWxf cCwgZmxhdm9yLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9Cisg IH0KKyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBFTkQ6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAg Ki8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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Ag KHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKSkKKyAgICB7CisgICAgICBMaXNwX09i amVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9P YmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7Cisg ICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBm cHJpbnRmIChzdGRlcnIsICJtY19kcmF3X211bHRpcGxlX2N1cnNvcnMgKCVzKVxuIiwgd2luZG93 X2NoYXIpOworICAgIH0KKyNlbmRpZgorICBib29sIG1jX3N0ZGVycl9wID0gIU5JTFAgKEJWQVIg KGN1cnJlbnRfYnVmZmVyLCBtY19zdGRlcnIpKTsKKyAgcHRyZGlmZl90IG9wb2ludF9wdCA9IFBU OworICBpbnQgb3BvaW50X3ggPSB3LT5waHlzX2N1cnNvci54OworICBpbnQgb3BvaW50X3kgPSB3 LT5waHlzX2N1cnNvci55OworICBpbnQgb3BvaW50X2hwb3MgPSB3LT5waHlzX2N1cnNvci5ocG9z OworICBpbnQgb3BvaW50X3Zwb3MgPSB3LT5waHlzX2N1cnNvci52cG9zOworICBzdHJ1Y3QgZnJh bWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVu dHM7CisgIENIRUNLX0JVRkZFUiAoYnVmKTsKKyAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIg KGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKm9sZF9idWZmZXIgPSBOVUxMOworICBM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KKyAg c3RydWN0IHRleHRfcG9zIHN0YXJ0X3RleHRfcG9zaXRpb247CisgIFNFVF9URVhUX1BPU19GUk9N X01BUktFUiAoc3RhcnRfdGV4dF9wb3NpdGlvbiwgdy0+c3RhcnQpOworICBwdHJkaWZmX3QgYnl0 ZXBvcyA9IEJZVEVQT1MgKHN0YXJ0X3RleHRfcG9zaXRpb24pOworICBib29sIGJhcmZfY3Jhc2hf b25lID0gKGNoYXJwb3MgPCAwIHx8IChjaGFycG9zID49IEJVRl9CRUcgKGN1cnJlbnRfYnVmZmVy KSAmJiBjaGFycG9zIDw9IFpWKSkgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX29u ZSkKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRl cm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQorICBib29sIGJhcmZfY3Jh c2hfdHdvID0gKGNoYXJwb3MgPT0gQllURV9UT19DSEFSIChieXRlcG9zKSkgPyBmYWxzZSA6IHRy dWU7CisgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikK KyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47 CisgICAgfQorICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29udGFpbnMgdGhlIGZv bGxvd2luZyB0ZXN0cywKKyAgZWFzc2VydCAobWF0cml4ICYmIG1hdHJpeC0+cm93cyk7CisgIGVh c3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICBib29sIGJhcmZf Y3Jhc2hfdGhyZWUgPSAody0+Y3VycmVudF9tYXRyaXggJiYgdy0+Y3VycmVudF9tYXRyaXgtPnJv d3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9j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y8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBmb3IgKHZsaXN0ID0gQlZBUiAoYiwgbXVs dGlwbGVfY3Vyc29yc19jb25mKTsKKyAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgIHZsaXN0 ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIHNwZWNzID0gWENBUiAodmxpc3QpOworICAg ICAgcG9zaW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBzcGVjcykpOworICAgICAg bGlzcF90eXBlID0gRm50aCAobWFrZV9udW1iZXIgKDEpLCBzcGVjcyk7CisgICAgICBpZiAoQ09O U1AgKGxpc3BfdHlwZSkpCisgICAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJzb3Jf dHlwZSAoWENBUiAobGlzcF90eXBlKSk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBjdXJzb3Jf dHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgICAgICBpZiAoQ09O U1AgKGxpc3BfdHlwZSkpCisgICAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKFhDQVIgKFhDRFIg KGxpc3BfdHlwZSkpKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIGN1cnNvcl93aWR0aCA9IDE7 CisgICAgICBmb3JlZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDIpLCBzcGVjcyk7CisgICAg ICBpZiAoU1RSSU5HUCAoZm9yZWdyb3VuZCkpCisgICAgICAgIGZvcmVncm91bmQgPSBtY19jb2xv cl92ZWN0b3JfY2FsYyAodywgZm9yZWdyb3VuZCk7CisgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4 ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgIGludCByb3dfc3RhcnQsIHJvd19l bmQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kOworICAgICAgaW50IGk7CisgICAg ICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgICAgIExpc3BfT2JqZWN0IHZzcGVjcyA9IFFu aWw7CisgICAgICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsgKytpKQorICAgICAgICB7 CisgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAobWF0cml4LCBp KTsKKyAgICAgICAgICByb3dfc3RhcnQgPSBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyk7 CisgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkgPT0gMSkKKyAgICAg ICAgICAgICAgIHx8IChoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCAmJiBpID09IDApKQorICAgICAg ICAgICAgd2luZG93X3Jvd19zdGFydCA9IHJvd19zdGFydDsKKyAgICAgICAgICBpZiAoIXJvdy0+ ZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB3aW5kb3dfcm93X2VuZCA9 IHJvd19lbmQ7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgcm93X2VuZCA9IE1BVFJJ WF9ST1dfRU5EX0NIQVJQT1MgKHJvdyk7CisgICAgICAgICAgICAgICAgdGVtcCA9IGxpc3RuIChD T05TVFlQRV9IRUFQLCAzLCBtYWtlX251bWJlciAoaSksCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAocm93X3N0YXJ0KSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChy b3dfZW5kKSk7CisgICAgICAgICAgICAgICAgdnNwZWNzID0gRmNvbnMgKHRlbXAsIHZzcGVjcyk7 CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKHBvc2ludCA+PSB3aW5kb3df cm93X3N0YXJ0CisgICAgICAgICAgJiYgcG9zaW50IDw9IHdpbmRvd19yb3dfZW5kKQorICAgICAg ICB7CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3IgKHZsaXN0ID0gRm5y ZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgICAg ICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IGNv dW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBYQ0FSICh2bGlzdCkpKTsKKyAgICAg ICAgICAgIGludCBwb3Nfc3RhcnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMSksIFhDQVIg KHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQgPSBYSU5UIChGbnRoIChtYWtlX251 bWJlciAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAq cm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50KTsKKyAgICAgICAgICAg IGludCBhcmVhOworICAgICAgICAgICAgaW50IHJlbGF0aXZlX3ggPSAwOworICAgICAgICAgICAg Zm9yIChhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQor ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJv dy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGhfZW5k ID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgICAgICAgaWYgKGFyZWEgPT0g VEVYVF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisg ICAgICAgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAgICAgICAgICAgICAgICBpZiAobWNfc3Rk ZXJyX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGggPCBnbHlwaF9lbmQpCisgICAgICAg ICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisiXG5jb3VudCAoJWQpIHwgd2luZG93X3Jvd19z dGFydC9lbmQgKCVkLyVkKSB8IHJvd19zdGFydC9lbmQgKCVkLyVkKVxuXAorPT09PT09PT09PT09 PT09PT09PT09PT09PT09PSBNVUxUSVBMRSBDVVJTT1JTID09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PVxuXAorR2x5cGgjL1RvdGFsIFJlbC5YIFQgICAgICAgUG9zIE8gICBXICAgICBD b2RlIEZhY2UgTFIgICAgIFggICAgWSBIUE9TIFZQT1MgWlYgQ1xuIiwKK2NvdW50LCB3aW5kb3df cm93X3N0YXJ0LCB3aW5kb3dfcm93X2VuZCwgcG9zX3N0YXJ0LCBwb3NfZW5kKTsKKyAgICAgICAg ICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgpCisgICAgICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAg JiYgY291bnQgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zv cm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPmNoYXJwb3MgPT0g cG9zaW50CisgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+eSA8PSB3aW5kb3dfdGV4 dF9ib3R0b21feSAodykpCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICAgICAgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgcG9zaW50KTsKKyAg ICAgICAgICAgICAgICAgICAgICAgIGlmIChOSUxQIChmb3JlZ3JvdW5kKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJlZCAqLwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQgPSBvZGRfY29sb3JfdmVjdG9yOworICAg ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHllbGxvdyAqLworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAvKiByZWQgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVu dF9jb2wgJSAyICE9IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9j b2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8 PSBmaWxsX2NvbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQgPSBv ZGRfY29sb3JfdmVjdG9yOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHllbGxvdyAq LworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgPT0gMAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCA9IGV2ZW5fY29sb3JfdmVjdG9y OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGdyZWVuICovCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgY3VycmVudF9jb2wgPiBmaWxsX2NvbCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGZvcmVncm91bmQgPSBmaWxsX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgbWNfZW5naW5lIChyb3csIGds eXBoLCBhcmVhLCByZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB3LCBwb3NpbnQsIEJBUl9DVVJTT1IsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZl X2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3As IE1VTFRJUExFX0NVUlNPUlMsICZyZXN1bHQpOworICAgICAgICAgICAgICAgICAgICAgICAgYnJl YWs7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2Ug aWYgKG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAo cm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCk7CisgICAgICAgICAgICAgICAgICAgIHJlbGF0 aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorLyogYHctPm11bHRpcGxl X2N1cnNvcnNfY2FjaGUnIGlzIHNldCBmb3IgdGhlIHdpbmRvdywgbm90IGJ1ZmZlcit3aW5kb3cg LS0gaS5lLiwgYWxsIGJ1ZmZlcnMgYXBwZWFyaW5nCitpbiB0aGUgc2FtZSB3aW5kb3cgdmlhIGBz d2l0Y2gtdG8tYnVmZmVyJyB3aWxsIGhhdmUgYHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUnLiAg VGhpcyBiZWhhdmlvcgoraXMgY29uc2lzdGVudCB3aXRoIGZ1bmN0aW9ucyBzdWNoIGFzIGBzZXQt d2luZG93LWRpc3BsYXktdGFibGUnLiAgV2UgZGVhbCB3aXRoIHRoaXMgaW4KK2Buc3Rlcm0ubScg LyBgdzMydGVybS5jJyAvIGB4dGVybS5jJyBieSBjb21wYXJpbmcgYHctPmNvbnRlbnRzJyB0byB0 aGUgdmFsdWUgb2YgdGhlIGBidWYnCitzdG9yZWQgaW4gYHctPm11bHRpcGxlX2N1cnNvcnNfY2Fj aGUnLiAqLworICBpZiAoIU5JTFAgKHJlc3VsdCkpCisgICAgd3NldF9tdWx0aXBsZV9jdXJzb3Jz X2NhY2hlICh3LCBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEZyZXZlcnNlIChyZXN1bHQpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgRmNvbnMgKHdpbmRvdywgUW5pbCksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBGY29ucyAody0+Y29udGVudHMsIFFuaWwpKSk7CisgIHctPm1jLmRyYXdfbXVsdGlw bGVfY3Vyc29ycyA9IGZhbHNlOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2lu dGVybmFsIChvbGRfYn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9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVt YmVyICg0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1h a2VfbnVtYmVyICg1KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhJTlQgKEZudGgg KG1ha2VfbnVtYmVyICg2KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5cGUg PSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX251bWJlciAoNyksIGZpZnRlZW5f ZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2Vf bnVtYmVyICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAo bWFrZV9udW1iZXIgKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVfY3Vyc29y X3AgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7Cisg ICAgICBtaW5pbWFsX3AgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTIpLCBmaWZ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICBmbGF2b3IgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTMpLCBm aWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBwb3NpbnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJl ciAoMTQpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBib29sIHJlbW92ZV9wID0gZmFsc2U7 CisgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgeCwgZngsIHksIGZ5LCBocG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19jdXJzb3JfdHlwZSwgdy0+ cGh5c19jdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvcik7Cisg IGZvciAodmxpc3QgPSBYQ0FSICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKTsKKyAgICAgICBD T05TUCAodmxpc3QpOworICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAg IGZpZnRlZW5fZWxlbWVudHMgPSBYQ0FSICh2bGlzdCk7CisgICAgICB4ID0gWElOVCAoRm50aCAo bWFrZV9udW1iZXIgKDApLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeCA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICgxKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgeSA9IFhJTlQg KEZudGggKG1ha2VfbnVtYmVyICgyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZnkgPSBY SU5UIChGbnRoIChtYWtlX251bWJlciAoMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGhw b3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAg ICAgIHZwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNSksIGZpZnRlZW5fZWxlbWVudHMp KTsKKyAgICAgIGggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNiksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoRm50aCAo bWFrZV9udW1iZXIgKDcpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBjdXJzb3Jfd2lkdGgg PSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoOCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IGZvcmVncm91bmQgPSBGbnRoIChtYWtlX251bWJlciAoOSksIGZpZnRlZW5fZWxlbWVudHMpOwor ICAgICAgYmFja2dyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICgxMCksIGZpZnRlZW5fZWxlbWVu dHMpOworICAgICAgYWN0aXZlX2N1cnNvcl9wID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEx KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgbWluaW1hbF9wID0gWElOVCAoRm50aCAobWFr ZV9udW1iZXIgKDEyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZmxhdm9yID0gWElOVCAo Rm50aCAobWFrZV9udW1iZXIgKDEzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgcG9zaW50 ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDE0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAg ICAgaWYgKGZsYXZvciA9PSBNQ19HTFlQSCkKKyAgICAgICAgbWNfZXJhc2VfZ2x5cGhfY3Vyc29y cyAodywgeCwgeSwgaHBvcywgdnBvcywgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZmxhdm9y KTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3Ag PSB0cnVlOworICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHgsIGZ4LCB5LCBm eSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX3dpZHRoLCBiYWNrZ3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHBvc2ludCwg cmVtb3ZlX3ApOworICAgICAgICAgIH0KKyAgICB9CisgIGlmIChkZWxldGVfY2FjaGUpCisgICAg d3NldF9tdWx0aXBsZV9jdXJzb3JzX2NhY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mplY3Qg d2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBj aGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRm IChzdGRlcnIsICJtY19kcmF3X2Nyb3NzaGFpcnMgKCVzKTogIGFjdGl2ZV9jdXJzb3JfcCAoJWQp IHwgbWluaW1hbF9wICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hh ciwgYWN0aXZlX2N1cnNvcl9wLCBtaW5pbWFsX3ApOworICAgIH0KKyNlbmRpZgorICBib29sIG1j X3N0ZGVycl9wID0gIU5JTFAgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBtY19zdGRlcnIpKTsKKyAg cHRyZGlmZl90IG9wb2ludF9wdCA9ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpCisg ICAgICAgICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICA6IFhJ TlQgKEZtYXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOworICBpbnQgb3BvaW50X3ggPSB3LT5w aHlzX2N1cnNvci54OworICBpbnQgb3BvaW50X3kgPSB3LT5waHlzX2N1cnNvci55OworICBpbnQg b3BvaW50X2hwb3MgPSB3LT5waHlzX2N1cnNvci5ocG9zOworICBpbnQgb3BvaW50X3Zwb3MgPSB3 LT5waHlzX2N1cnNvci52cG9zOworICBzdHJ1Y3QgZ2x5cGggKnJlYWxfcGh5c19jdXJzb3JfZ2x5 cGggPQorICAgIG1jX2dldF9waHlzX2N1cnNvcl9nbHlwaCAodywgb3BvaW50X3gsIG9wb2ludF9o cG9zLCBvcG9pbnRfdnBvcyk7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUp OworICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgQ0hFQ0tfQl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ICYmIG1hdHJpeC0+cm93cyk7CisgIGVhc3NlcnQgKHJv dyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICBib29sIGJhcmZfY3Jhc2hfdGhy ZWUgPSAody0+Y3VycmVudF9tYXRyaXggJiYgdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MpID8gZmFs c2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90aHJlZSkKKyAgICB7CisgICAgICBpZiAob2xk X2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAg ICByZXR1cm47CisgICAgfQorICBib29sIGJhcmZfY3Jhc2hfZm91ciA9IChvcG9pbnRfdnBvcyA+ PSAwICYmIG9wb2ludF92cG9zIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDog dHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfZm91cikKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZl cikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1 cm47CisgICAgfQorICBpZiAoIUJVRkZFUlAgKGJ1ZikpCisgICAgeworICAgICAgaWYgKG9sZF9i dWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAgICAg cmV0dXJuOworICAgIH0KKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKSkKKyAgICB7 CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xk X2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQorICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jv c3NoYWlyc19ob3Jpem9udGFsX3J1bGVyKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKGIsIGNyb3Nz aGFpcnNfdmVydGljYWxfcnVsZXIpKSkKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAg ICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47Cisg ICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBCRUdJTiBKT1VSTkVZIC4uLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGludCBm cmFtZV9jaGFyX3dpZHRoID0gRlJBTUVfQ09MVU1OX1dJRFRIIChmKTsKKyAgaW50IHRleHRfYXJl YV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgIGJvb2wgY3Vyc29y X2luX2ZyaW5nZV9wID0gdy0+b3V0cHV0X2N1cnNvci54ICsgZnJhbWVfY2hhcl93aWR0aCA+PSB0 ZXh0X2FyZWFfd2lkdGg7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmdseXBoX3JvdzsKKyAgaW50IGN1 cnNvcl93aWR0aCA9IDE7CisgIHB0cmRpZmZfdCBwb3NpbnQgPSAtMTsKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgIFNUQVJUIERJU1BMQVkgQU5EIFBSSU1F IElUCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgcHRyZGlmZl90IGN1cnJlbnRfY29sID0g bWNfY3VycmVudF9jb2x1bW4gKHcsIG9wb2ludF9wdCk7CisgIGJvb2wgZmlsbF9jb2x1bW5fcCA9 ICFOSUxQIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBwdHJkaWZmX3QgZmlsbF9jb2wgPSBY SU5UIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBMaXNwX09iamVjdCByZXN1bHQgPSBRbmls OworICBpbnQgZmxhdm9yOworICAvKiBWYWx1ZXMgZm9yIHRoZSBjdXJyZW50IGNvbHVtbiBvZiB0 aGUgdmVydGljYWwgbGluZS4gKi8KKyAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCA9IEZtYWtlX3Zl Y3RvciAobWFrZV9udW1iZXIgKDMpLCBRbmlsKTsKKyAgZW51bSBmYWNlX2lkIGZhY2VfaWQ7Cisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ09M T1IgT0YgQ1JPU1NIQUlSUworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGVudW0gZmFjZV9p ZCBldmVuX2ZhY2VfaWQgPQorICAgICghYWN0aXZlX2N1cnNvcl9wCisgICAgICYmICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykp KQorICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistZXZlbi1udW1iZXJl ZC1jb2x1bW4taW5hY3RpdmUtZmFjZSIpLCB0cnVlKQorICAgIDogbG9va3VwX25hbWVkX2ZhY2Ug KHcsIGYsIGludGVybiAoIistZXZlbi1udW1iZXJlZC1jb2x1bW4tZmFjZSIpLCB0cnVlKTsKKyAg c3RydWN0IGZhY2UgKmV2ZW5fZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgZXZlbl9m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9jb2x1bW5fcAorICAgICAgJiYgY3VycmVudF9jb2wg PD0gZmlsbF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IGV2ZW5fY29sb3JfdmVjdG9yOworICAvKiBn cmVlbiAqLworICBpZiAoZmlsbF9jb2x1bW5fcAorICAgICAgJiYgY3VycmVudF9jb2wgPiBmaWxs X2NvbCkKKyAgICBmb3JlZ3JvdW5kID0gZmlsbF9jb2xvcl92ZWN0b3I7CisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIEVSQVNFIFRIRSBSRUFMIENV UlNPUgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBgdy0+cGh5c19jdXJzb3IueC95L2hw b3MvdnBvc2AgYXJlIGluY29ycmVjdCBhZnRlciBldmFsdWF0aW5nIChzY3JvbGwtbGVmdCAxKQor YSBjb3VwbGUgb2YgdGltZXMuICBSZWRpc3BsYXkgZXJhc2VzIHRoZSByZWFsIGN1cnNvciBhbG1v c3QgaW1tZWRpYXRlbHkgYWZ0ZXIKK2BtY19kcmF3X2Nyb3NzaGFpcnMnIHJ1bnMgaXRzIGNvdXJz ZSAtLSBhbG1vc3QgdG9vIHF1aWNrbHkgdG8gc2VlIGl0IGhhcHBlbmluZy4KK1RoZSBjaGFyYWN0 ZXIgd2hlcmUgRW1hY3MgdGhpbmtzIHRoZSByZWFsIGN1cnNvciBpcyBsb2NhdGVkIGdldHMgcmVk cmF3biwgYWxiaWV0Cit3aXRob3V0IHRoZSByZWFsIGN1cnNvci4gIEVtYWNzIHRoaW5rcyB0aGUg cmVhbCBjdXJzb3IgaXMgb25lIGNoYXJhY3RlciB0byB0aGUKK3JpZ2h0IG9mIHdoZXJlIGl0IHNo b3VsZCBiZSAtLSB0aGlz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KioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgUkVQTEFDRSBUSEUgUkVBTCBDVVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworICBnbHlwaF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3BvaW50X3Zw b3MpOworICBpZiAoIWN1cnNvcl9pbl9mcmluZ2VfcCkKKyAgICBmbGF2b3IgPSBNQ19HTFlQSDsK KyAgICAvKiBUaGlzIGNvbmRpdGlvbiBwcm9iYWJseSBkb2VzIG5vdCBleGlzdCBmb3IgdGhlIHJl YWwgZmFrZSBjdXJzb3IuICovCisgICAgZWxzZSBpZiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAg ICAgICAgICAgJiYgZ2x5cGhfcm93LT5jb250aW51ZWRfcCkKKyAgICAgIGZsYXZvciA9IE1DX1BJ TENST1c7CisgICAgICBlbHNlIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICYmIGdseXBoX3Jvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgIGZsYXZvciA9IE1D X0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1c7CisgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9p bl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAmJiAhZ2x5cGhfcm93LT5jb250aW51ZWRfcAor ICAgICAgICAgICAgICAgICAmJiAhZ2x5cGhfcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAg ICAgICAgICBmbGF2b3IgPSBNQ19IT0xMT1dfUkVDVEFOR0xFOworICBmYWNlX2lkID0gKHJlYWxf cGh5c19jdXJzb3JfZ2x5cGggPT0gTlVMTCkKKyAgICAgICAgICAgICAgPyBERUZBVUxUX0ZBQ0Vf SUQKKyAgICAgICAgICAgICAgOiByZWFsX3BoeXNfY3Vyc29yX2dseXBoLT5mYWNlX2lkOworICBp bnQgb3BvaW50X2Z4ID0gLTE7CisgIGludCBvcG9pbnRfZnkgPSAtMTsKKyAgaW50IG9wb2ludF9o ID0gLTE7CisgIC8qIEZJWE1FOiAgUHV0IGluIHNvbWUgY29kZSB0byBkZWZhdWx0IHRvIEhPTExP V19CT1hfQ1VSU09SIGlmIHRoZSB1c2VyIGhhcworICB1bndpdHRpbmdseSBjb21lIHVwIHdpdGgg c29tZSB1bmFjY2VwdGFibGUgZm9ybSBvZiB1bnJlY29nbml6ZWQgY3Vyc29yIHR5cGUuICovCisg IExpc3BfT2JqZWN0IGN1cnNvcl9saXNwX3R5cGUgPSBCVkFSIChiLCBtY19yZWFsX2Zha2VfY3Vy c29yKTsKKyAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyB0ZW1wX2N1cnNvcl90eXBlID0gKENPTlNQ IChjdXJzb3JfbGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAoY3Vyc29yX2xpc3BfdHlw ZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1jX2xp c3BfdG9fY3Vyc29yX3R5cGUgKGN1cnNvcl9saXNwX3R5cGUpOworICBpZiAoZmxhdm9yID09IE1D X1BJTENST1cKKyAgICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FS Uk9XCisgICAgICB8fCBmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRSkKKyAgICB0ZW1wX2N1 cnNvcl90eXBlID0gUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgaW50IGluaXRpYWxfY3Vyc29yX3dp ZHRoID0gKENPTlNQIChjdXJzb3JfbGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gWElOVCAoWENBUiAoWENEUiAoY3Vyc29yX2xpc3BfdHlwZSkpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAxOworICBlbnVtIGZhY2VfaWQgY3Vyc29yX2ZhY2VfaWQg PQorICAgICghYWN0aXZlX2N1cnNvcl9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgID8gbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1m YWNlIiksIHRydWUpCisgICAgOiBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1y ZWFsLWZha2UtY3Vyc29yLWZhY2UiKSwgdHJ1ZSk7CisgIHN0cnVjdCBmYWNlICpjdXJzb3JfZmFj ZSA9IEZBQ0VfRlJPTV9JRCAoZiwgY3Vyc29yX2ZhY2VfaWQpOworICBMaXNwX09iamVjdCBjdXJz b3JfY29sb3IgPSBjdXJzb3JfZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07Cisg IENIRUNLX1NUUklORyAoY3Vyc29yX2NvbG9yKTsKKyAgTGlzcF9PYmplY3QgY3Vyc29yX2ZnID0g KHRlbXBfY3Vyc29yX3R5cGUgPT0gTk9fQ1VSU09SKQorICAgICAgICAgICAgICAgICAgICAgICAg ICA/IGZvcmVncm91bmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBtY19jb2xvcl92ZWN0 b3JfY2FsYyAodywgY3Vyc29yX2NvbG9yKTsKKyAgLyogRklYTUU6ICBUaGlzIGNyZWF0ZXMgdHdv IE1DX0dMWVBIIGF0IHRoZSBzYW1lIGxvY2F0aW9uIGFuZCBuZWVkcyB0byBiZQorICByZWR1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IG9wb2ludF9wdCwgJnJlc3VsdCk7CisgICAg ICBpZiAoZmxhdm9yID09IE1DX0dMWVBIKQorICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2Vv bWV0cnkgKHcsIGdseXBoX3Jvdywgb3BvaW50X3gsICZvcG9pbnRfZngsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgb3BvaW50X3ksICZvcG9pbnRfZnksIG9wb2ludF9ocG9z LCBvcG9pbnRfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3Bv aW50X2gsIEJBUl9DVVJTT1IsIGluaXRpYWxfY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIG1j X2hlbHBlciAodywgb3BvaW50X3gsIG9wb2ludF9meCwgb3BvaW50X3ksIG9wb2ludF9meSwgb3Bv aW50X2hwb3MsCisgICAgICAgICAgICAgICAgIG9wb2ludF92cG9zLCBvcG9pbnRfaCwgQkFSX0NV UlNPUiwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xz bCAodywgZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwgbWluaW1hbF9wLCBmbGF2b3IsCisgICAg ICAgICAgICAgICAgIG9wb2ludF9wdCwgJnJlc3VsdCk7CisgICAgfQorICAgIGVsc2UgaWYgKCFt aW5pbWFsX3ApCisgICAgICB7CisgICAgICAgIGludCBfd2Q7CisgICAgICAgIGlmIChmbGF2b3Ig PT0gTUNfR0xZUEgpCisgICAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCBn bHlwaF9yb3csIG9wb2ludF94LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgb3BvaW50X3ksICZvcG9pbnRfZnksIG9wb2ludF9ocG9zLCBvcG9pbnRf dnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA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meCwgb3BvaW50X3ksIG9wb2ludF9meSwgb3BvaW50X2hwb3MsCisgICAgICAgICAgICAg b3BvaW50X3Zwb3MsIG9wb2ludF9oLCBMRUZUX0ZSSU5HRV9CSVRNQVAsIGluaXRpYWxfY3Vyc29y X3dpZHRoLAorICAgICAgICAgICAgIGZvcmVncm91bmRfbHNsLCBtY19iZ19sc2wgKHcsIGZhY2Vf aWQpLCBhY3RpdmVfY3Vyc29yX3AsIG1pbmltYWxfcCwKKyAgICAgICAgICAgICBNQ19PVkVSTEFZ X0FSUk9XX0JJVE1BUCwgb3BvaW50X3B0LCAmcmVzdWx0KTsKKyAgaWYgKG1pbmltYWxfcCkKKyAg ICBnb3RvIGNyb3NzaGFpcnNfZmluaXNoOworICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWly c19ob3Jpem9udGFsX3J1bGVyKSkpCisgICAgZ290byB2ZXJ0aWNhbF9ydWxlcjsKKyAgICBlbHNl CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICBIT1JJWk9OVEFMIFJV TEVSOiAgRklSU1QgWCA9PiBFT0wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5k CisgICAgICAgSE9SSVpPTlRBTCBSVUxFUjogIERSQVcgRkxPQVRJTkcgR0xZUEhMRVNTIExJTkUg KEVPTCBUTyBGUklOR0UpCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgICB7CisgICAgICBz dHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3Bv aW50X3Zwb3MpOworICAgICAgaW50IGFyZWE7CisgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7Cisg ICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2Fy ZWEpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlw aHNbYXJlYV07CisgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJv dy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAvKiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0 LiAgKi8KKyAgICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhf ZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAg ICAgICAgIGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2Vu ZCkKKyAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbj09PT09PT09PT09PT09PT09PT09 PT09PT09PT0gSE9SSVpPTlRBTCBSVUxFUiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFj ZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBaViBDXG4iKTsKKyAgICAgICAgICBmb3IgKDsgZ2x5 cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1j X2VuZ2luZSAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICB3LCBwb3NpbnQsIEhCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQs IGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIEhP UklaT05UQUxfUlVMRVIsICZyZXN1bHQpOworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGds eXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICBWRVJUSUNBTCBSVUxFUjogIENPTUJJTkFU SU9OIE9GIEdMWVBIICYgR0xZUEhMRVNTIENVUlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworICB2ZXJ0aWNhbF9ydWxlcjoKKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnNfdmVy dGljYWxfcnVsZXIpKSkKKyAgICBnb3RvIGNyb3NzaGFpcnNfZmluaXNoOworICAgIGVsc2UKKyAg ICAgIHsKKyAgICAgICAgaW50IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJTkRPV19IRUFERVJfTElO RV9IRUlHSFQgKHcpOworICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5j dXJyZW50X21hdHJpeDsKKyAgICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwgd2luZG93X3Jv d19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgICAgICAgIGludCBpOworICAgICAgICBMaXNwX09i amVjdCB0ZW1wID0gUW5pbDsKKyAgICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5pbDsKKyAg ICAgICAgZm9yIChpID0gMDsgaSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICAgICAgICB7Cisg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIGkp OworICAgICAgICAgICAgcm93X3N0YXJ0ID0gTUFUUklYX1JPV19TVEFSVF9DSEFSUE9TIChyb3cp OworICAgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkgPT0gMSkKKyAg ICAgICAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0gMCkpCisg ICAgICAgICAgICAgIHdpbmRvd19yb3dfc3RhcnQgPSByb3dfc3RhcnQ7CisgICAgICAgICAgICBp ZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgd2lu ZG93X3Jvd19lbmQgPSByb3dfZW5kOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICByb3dfZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KTsKKyAgICAgICAg ICAgICAgICAgIHRlbXAgPSBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywgbWFrZV9udW1iZXIgKGkp LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtl X251bWJlciAocm93X3N0YXJ0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHJvd19lbmQpKTsKKyAgICAgICAgICAgICAgICAg IHZzcGVjcyA9IEZjb25zICh0ZW1wLCB2c3BlY3MpOworICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICB9CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3IgKHZsaXN0ID0g Rm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAg ICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAgICAgICAgaW50 IGNvdW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBYQ0FSICh2bGlzdCkpKTsKKyAg ICAgICAgICAgIGludCBwb3Nfc3RhcnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMSksIFhD QVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQgPSBYSU5UIChGbnRoIChtYWtl X251bWJlciAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgc3RydWN0IGdseXBoX3Jv dyAqcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50KTsKKyAgICAgICAg ICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+Y3VycmVudF9tYXRy aXgpOworICAgICAgICAgICAgaW50IGFyZWE7CisgICAgICAgICAgICBpbnQgcmVsYXRpdmVfeCA9 IDA7CisgICAgICAgICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFT VF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICAgICAgc3RydWN0 IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAg ICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBo LT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAg ICAgICAgIGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCA8IGds eXBoX2VuZCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbmNvdW50ICgl ZCkgfCB3aW5kb3dfcm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2VuZCAoJWQvJWQp XG5cCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PSBWRVJUSUNBTCBSVUxFUiA9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlggVCAgICAg ICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBaViBDXG4i LAorY291bnQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nfc3RhcnQsIHBv c19lbmQpOworICAgICAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlw aCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCByZWFsX2Zh a2VfY3Vyc29yX3AgPSAob3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsK KyAgICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiBjb3Vu dCA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09 IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAocmVsYXRpdmVfeCArIGdseXBoLT5waXhl bF93aWR0aCA+IG9wb2ludF94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGgg PT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT55IDw9 IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJl YWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgICAgICAgICBtY19lbmdpbmUgKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgQkFSX0NVUlNPUiwgY3Vy c29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgVkVSVElDQUxfUlVMRVIsICZyZXN1bHQpOwor ICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgICAgICAg ICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCk7 CisgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOwor ICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAg fQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIFNFVCBUSEUgQ0FDSEUKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBjcm9zc2hhaXJz X2ZpbmlzaDoKKyAgaWYgKCFOSUxQIChyZXN1bHQpKQorICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNo ZSAodywgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsCisgICAgICAgICAgICAgICAgICAgICAgIC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KKyAgICAgICAgICB8fCAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpKQorICAgIHsKKyAgICAgIExp c3BfT2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdpbmRvdywgdyk7CisgICAgICBM aXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2luZG93LCBRbmls KTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3dfc3RyaW5nKTsKKyAg ICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX3JlZHJhd19jcm9zc2hhaXJzICglcylcbiIsIHdpbmRv d19jaGFyKTsKKyAgICB9CisjZW5kaWYKKyAgTGlzcF9PYmplY3Qgdmxpc3QgPSBRbmlsOworICBM aXNwX09iamVjdCBmaWZ0ZWVuX2VsZW1lbnRzID0gUW5pbDsKKyAgaW50IHgsIGZ4LCB5LCBmeSwg aHBvcywgdnBvcywgaDsKKyAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3JfdHlwZTsKKyAg aW50IGN1cnNvcl93aWR0aDsKKyAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCA9IFFuaWw7CisgIExp c3BfT2JqZWN0IGJhY2tncm91bmQgPSBRbmlsOworICBib29sIGFjdGl2ZV9jdXJzb3JfcCA9IGZh bHNlOworICBib29sIG1pbmltYWxfcCA9IGZhbHNlOworICBpbnQgZmxhdm9yOworICBwdHJkaWZm X3QgcG9zaW50OworICBmb3IgKHZsaXN0ID0gWENBUiAody0+Y3Jvc3NoYWlyc19jYWNoZSk7Cisg ICAgICAgQ09OU1AgKHZsaXN0KTsKKyAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICB7 CisgICAgICBmaWZ0ZWVuX2VsZW1lbnRzID0gWENBUiAodmxpc3QpOworICAgICAgeCA9IFhJTlQg KEZudGggKG1ha2Vf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dOwor ICBzdGFydCA9IGNsb2NrKCk7CisjZW5kaWYKKyovCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYg KHRyYWNlX3JlZGlzcGxheV9wICYmIEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikp CisgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3No YWlycykpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lO RE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmlu MV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNT REFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9j cm9zc2hhaXJzICglcyk6ICBkZWxldGVfY2FjaGUgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICAgd2luZG93X2NoYXIsIGRlbGV0ZV9jYWNoZSk7CisgICAgfQorI2VuZGlmCisgIExpc3Bf T2JqZWN0IHZsaXN0ID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgZmlmdGVlbl9lbGVtZW50cyA9IFFu aWw7CisgIGludCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIGg7CisgIGVudW0gdGV4dF9jdXJz b3Jfa2luZHMgY3Vyc29yX3R5cGU7CisgIGludCBjdXJzb3Jfd2lkdGg7CisgIExpc3BfT2JqZWN0 IGZvcmVncm91bmQgPSBRbmlsOworICBMaXNwX09iamVjdCBiYWNrZ3JvdW5kID0gUW5pbDsKKyAg Ym9vbCBhY3RpdmVfY3Vyc29yX3AgPSBmYWxzZTsKKyAgYm9vbCBtaW5pbWFsX3AgPSBmYWxzZTsK KyAgaW50IGZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgcHRyZGlmZl90IHBvc2ludDsKKyAgbWNfZXJh c2VfZ2x5cGhfY3Vyc29ycyAodywgdy0+cGh5c19jdXJzb3IueCwgdy0+cGh5c19jdXJzb3IueSwg dy0+cGh5c19jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+cGh5c19j dXJzb3IudnBvcywgdy0+cGh5c19jdXJzb3JfdHlwZSwgdy0+cGh5c19jdXJzb3Jfd2lkdGgsCisg ICAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvcik7CisgIGZvciAodmxpc3QgPSBYQ0FSICh3 LT5jcm9zc2hhaXJzX2NhY2hlKTsKKyAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgIHZsaXN0 ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIGZpZnRlZW5fZWxlbWVudHMgPSBYQ0FSICh2 bGlzdCk7CisgICAgICB4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBmaWZ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICBmeCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgZmlmdGVl bl9lbGVtZW50cykpOworICAgICAgeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgZnkgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMyks IGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGhwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJl ciAoNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHZwb3MgPSBYSU5UIChGbnRoIChtYWtl X251bWJlciAoNSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGggPSBYSU5UIChGbnRoICht YWtlX251bWJlciAoNiksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl90eXBlID0g bWNfbGlzcF90b19jdXJzb3JfdHlwZSAoRm50aCAobWFrZV9udW1iZXIgKDcpLCBmaWZ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICBjdXJzb3Jfd2lkdGggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAo OCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZvcmVncm91bmQgPSBGbnRoIChtYWtlX251 bWJlciAoOSksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYmFja2dyb3VuZCA9IEZudGggKG1h a2VfbnVtYmVyICgxMCksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYWN0aXZlX2N1cnNvcl9w ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDExKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAg ICAgbWluaW1hbF9wID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEyKSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgZmxhdm9yID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEzKSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgcG9zaW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIg KDE0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaWYgKGZsYXZvciA9PSBNQ19HTFlQSCkK KyAgICAgICAgbWNfZXJhc2VfZ2x5cGhfY3Vyc29ycyAodywgeCwgeSwgaHBvcywgdnBvcywgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZmxhdm9yKTsKKyAgICAgICAgZWxzZQorICAgICAgICAg IHsKKyAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3AgPSB0cnVlOworICAgICAgICAgICAgbWNfZHJh d19lcmFzZV9oeWJyaWQgKHcsIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5 cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBiYWNr Z3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbWluaW1hbF9wLCBmbGF2b3IsIHBvc2ludCwgcmVtb3ZlX3ApOworICAgICAgICAgIH0KKyAg ICB9CisgIGlmIChkZWxldGVfY2FjaGUpCisgICAgd3NldF9jcm9zc2hhaXJzX2NhY2hlICh3LCBR bmlsKTsKKyAgdy0+bWMuZXJhc2VfY3Jvc3NoYWlycyA9IGZhbHNlOworLyoKKyNpZmRlZiBHTFlQ SF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChl bmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXpl b2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3 LCAibWNfZXJhc2VfY3Jvc3NoYWlyczogIFRJTUUgKCVzKSIsIGJ1Zl90aW1lKTsKKyNlbmRpZgor Ki8KK30KKwordm9pZAorbWNfcmVtb3ZlX211bHRpcGxlX2N1cnNvcnMgKHN0cnVjdCB3aW5kb3cg KncpCit7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBib29sIGRl bGV0ZV9jYWNoZSA9ICh3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID09IDgKKyAg ICAgICAgICAgICAgICAgICAgICAgfHwgbWNfcmVkaXNwbGF5ID09IDMpCisgICAgICAgICAgICAg ICAgICAgICAgPyBmYWxzZQorICAgICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyNpZmRlZiBH TFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+Y29udGVu dHMpC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AgKFhDQVIgKEZudGggKG1ha2VfbnVtYmVy ICgxKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAgICAgJiYgdyA9PSBYV0lORE9X IChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUp KSkKKyAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDIp LCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkpKQorICAgIHsKKyAgICAgIHVwZGF0ZV9iZWdp biAoZik7CisgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgIG1jX2VyYXNlX211bHRpcGxlX2N1 cnNvcnMgKHcsIGRlbGV0ZV9jYWNoZSk7CisgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAg dXBkYXRlX2VuZCAoZik7CisgICAgfQorfQorCit2b2lkCittY19yZW1vdmVfY3Jvc3NoYWlycyAo c3RydWN0IHdpbmRvdyAqdykKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFt ZSk7CisgIGJvb2wgZGVsZXRlX2NhY2hlID0gKCh3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNo b19hcmVhID09IDgKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IG1jX3JlZGlzcGxheSA9PSAz KQorICAgICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZHJhd19jcm9zc2hhaXJzCisgICAg ICAgICAgICAgICAgICAgICAgICYmICF3LT5tYy5lcmFzZV9jcm9zc2hhaXJzKQorICAgICAgICAg ICAgICAgICAgICAgID8gZmFsc2UKKyAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7CisjaWZk ZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wICYmIEJVRkZFUlAgKHctPmNv bnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG11 bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3 aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qg d2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBj aGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRm IChzdGRlcnIsICJtY19yZW1vdmVfY3Jvc3NoYWlycyAoJXMpOiAgZGVsZXRlX2NhY2hlICglZClc biIsCisgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hhciwgZGVsZXRlX2NhY2hlKTsK KyAgICB9CisjZW5kaWYKKyAgLyogUmVtb3ZlIGZha2UgY3Vyc29ycy4gIElmIHdlIHJlbHkgdXBv biBgdXBkYXRlX2ZyYW1lJyB0byByZW1vdmUgZmFrZSBjdXJzb3JzLAorICB0aGVuIGl0IHdvdWxk IGJlIHRvbyBsYXRlIHRvIHJlbW92ZSBmYWtlIGN1cnNvcnMgZnJvbSBhbGwgYXJlYXMgb2YgdGhl IHZpc2libGUKKyAgd2luZG93IHdoZW4gY3V0dGluZy9wYXN0aW5nIHRleHQgYW5kIHBlcmhhcHMg YSBmZXcgb3RoZXIgc2l0dWF0aW9ucy4gKi8KKyAgaWYgKCF3LT5wc2V1ZG9fd2luZG93X3AKKyAg ICAgICYmICFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgIU5JTFAgKHctPmNyb3NzaGFpcnNf Y2FjaGUpCisgICAgICAmJiBXSU5ET1dQIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHct PmNyb3NzaGFpcnNfY2FjaGUpKSkKKyAgICAgICYmIHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAo bWFrZV9udW1iZXIgKDEpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAmJiBFUSAody0+ Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgdy0+Y3Jvc3NoYWlyc19jYWNo ZSkpKSkKKyAgICB7CisgICAgICB1cGRhdGVfYmVnaW4gKGYpOworICAgICAgYmxvY2tfaW5wdXQg KCk7CisgICAgICBtY19lcmFzZV9jcm9zc2hhaXJzICh3LCBkZWxldGVfY2FjaGUpOworICAgICAg dW5ibG9ja19pbnB1dCAoKTsKKyAgICAgIHVwZGF0ZV9lbmQgKGYpOworICAgIH0KK30KKwordm9p ZAorbWNfbXVsdGlwbGVfY3Vyc29yc19wb3J0YWwgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24s IGJvb2wgYWN0aXZlX2N1cnNvcl9wKQoreworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFj ZV9yZWRpc3BsYXlfcCAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICghTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKQorICAg ICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMp KSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAo d2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9f c3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEg KHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfbXVsdGlwbGVfY3Vy c29yc19wb3J0YWwgKCVzKTogIG9uICglZCkgfCBhY3RpdmVfY3Vyc29yX3AgKCVkKVxuIiwKKyAg ICAgICAgICAgICAgICAgICAgICAgIHdpbmRvd19jaGFyLCBvbiwgYWN0aXZlX2N1cnNvcl9wKTsK KyAgICB9CisjZW5kaWYKKyAgYm9vbCBtaW5pbWFsX3AgPSAoIXctPm1jLmRyYXdfbXVsdGlwbGVf Y3Vyc29ycworICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3BsYXlfcHJlc2VydmVfZWNo b19hcmVhICE9IDgKKyAgICAgICAgICAgICAgICAgICAgJiYgbWNfcmVkaXNwbGF5ICE9IDMKKyAg ICAgICAgICAgICAgICAgICAgJiYgdyA9PSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpCisgICAg ICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVs dGlwbGVfY3Vyc29yc19kcmF3X2ZvcnRod2l0aCkpKTsKKyAgaWYgKHctPm1jLmVyYXNlX211bHRp cGxlX2N1cnNvcnMgJiYgdy0+bWMuZHJhd19tdWx0aXBsZV9jdXJzb3JzCisgICAgICAmJiAhTUlO SV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hl KQorICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB3LT5tdWx0 aXBsZV9jdXJzb3JzX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGgg KG1ha2VfbnVtYmVyICgxKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAgICAgJiYg RVEgKHctPmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMiksIHctPm11bHRpcGxl X2N1cnNvcnNfY2FjaGUpKSkpCisgICAgbWNfZXJhc2VfbXVsdGlwb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RkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkK KyAgICBtY19kcmF3X211bHRpcGxlX2N1cnNvcnMgKHcsIGFjdGl2ZV9jdXJzb3JfcCwgbWluaW1h bF9wKTsKKyAgICBlbHNlIGlmIChvbgorICAgICAgICAgICAgICYmICFNSU5JX1dJTkRPV19QICh3 KQorICAgICAgICAgICAgICYmICFOSUxQICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKQorICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG11bHRpcGxl X2N1cnNvcnNfY29uZikpCisgICAgICAgICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFr ZV9udW1iZXIgKDEpLCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkpCisgICAgICAgICAgICAg JiYgdyA9PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPm11bHRpcGxl X2N1cnNvcnNfY2FjaGUpKSkKKyAgICAgICAgICAgICAmJiBFUSAody0+Y29udGVudHMsIFhDQVIg KEZudGggKG1ha2VfbnVtYmVyICgyKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKSkKKyAg ICAgIHsKKyAgICAgICAgbWNfZXJhc2VfbXVsdGlwbGVfY3Vyc29ycyAodywgZmFsc2UpOworICAg ICAgICBtY19yZWRyYXdfbXVsdGlwbGVfY3Vyc29ycyAodyk7CisgICAgICB9Cit9CisKK3ZvaWQK K21jX2Nyb3NzaGFpcnNfcG9ydGFsIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLCBib29sIGFj dGl2ZV9jdXJzb3JfcCkKK3sKKyAgLyogUmVtb3ZlIGNyb3NzaGFpcnMgYW5kIGRlbGV0ZSB0aGUg Y2FjaGUsIGJ1dCBPTkxZIGlmIHdlIHBsYW4gb24gcmVkcmF3aW5nIHRoZW0uCisgIElu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X3BvcnRhbCAoJXMpOiAgb24gKCVkKSB8IGFjdGl2ZV9jdXJzb3Jf cCAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93X2NoYXIsIG9uLCBhY3Rp dmVfY3Vyc29yX3ApOworICAgIH0KKyNlbmRpZgorICBib29sIG1pbmltYWxfcCA9ICghdy0+bWMu ZHJhd19jcm9zc2hhaXJzCisgICAgICAgICAgICAgICAgICAgICYmIG1jX3JlZGlzcGxheV9wcmVz ZXJ2ZV9lY2hvX2FyZWEgIT0gOAorICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3BsYXkg IT0gMworICAgICAgICAgICAgICAgICAgICAmJiB3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRv dykKKyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBjcm9zc2hhaXJzX2RyYXdfZm9ydGh3aXRoKSkpOworICBpZiAody0+bWMuZXJhc2VfY3Jv c3NoYWlycyAmJiB3LT5tYy5kcmF3X2Nyb3NzaGFpcnMKKyAgICAgICYmICFNSU5JX1dJTkRPV19Q ICh3KQorICAgICAgJiYgIU5JTFAgKHctPmNyb3NzaGFpcnNfY2FjaGUpCisgICAgICAmJiBXSU5E T1dQIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkK KyAgICAgICYmIHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB3LT5j cm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAmJiBFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGgg KG1ha2VfbnVtYmVyICgyKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKSkKKyAgICBtY19lcmFzZV9j cm9zc2hhaXJzICh3LCB0cnVlKTsKKyAgLyogYHctPmNyb3NzaGFpcnNfY2FjaGVgIGJlbG9uZ3Mg dG8gdGhlIHdpbmRvdywgbm90IHRoZSBidWZmZXIuICBTd2l0Y2hpbmcKKyAgYnVmZmVycyB3aXRo aW4gdGhlIHNhbWUgd2luZG93IHJlbmRlcnMgdGhlIGNhY2hlIHVzZWxlc3MuICovCisgIGlmICgh TUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQICh3LT5jcm9zc2hhaXJzX2NhY2hlKQor ICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB3LT5jcm9zc2hh aXJzX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfbnVt YmVyICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAgJiYgIUVRICh3LT5jb250ZW50 cywgWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDIpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpKQor ICAgIHsKKyAgICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNoZSAodywgUW5pbCk7CisgICAgICB3LT5t Yy5lcmFzZV9jcm9zc2hhaXJzID0gZmFsc2U7CisgICAgfQorICBpZiAob24KKyAgICAgICYmICFN SU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93 KQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3Nz aGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgJiYgTklMUCAody0+Y3Jvc3NoYWlyc19j YWNoZSkKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9z c2hhaXJzKSkpKQorICAgIG1jX2RyYXdfY3Jvc3NoYWlycyAodywgYWN0aXZlX2N1cnNvcl9wLCBt aW5pbWFsX3ApOworICAgIGVsc2UgaWYgKG9uCisgICAgICAgICAgICAgJiYgIU1JTklfV0lORE9X X1AgKHcpCisgICAgICAgICAgICAgJiYgIU5JTFAgKHctPmNyb3NzaGFpcnNfY2FjaGUpCisgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpCisgICAgICAgICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEp LCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAgICAgICAgJiYgdyA9PSBYV0lORE9XIChY Q0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkKKyAgICAg ICAgICAgICAmJiBFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgyKSwg dy0+Y3Jvc3NoYWlyc19jYWNoZSkpKSkKKyAgICAgIHsKKyAgICAgICAgbWNfZXJhc2VfY3Jvc3No YWlycyAodywgZmFsc2UpOworICAgICAgICBtY19yZWRyYXdfY3Jvc3NoYWlycyAodyk7CisgICAg ICB9Cit9CisKK2Jvb2wKK21jX211bHRpcGxlX2N1cnNvcnNfcCAoc3RydWN0IHdpbmRvdyAqdykK K3sKKyNpZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVS UCAody0+Y29udGVudHMpCisgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgbXVsdGlwbGVfY3Vyc29yc19jb25mKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpKQorICAgIHsKKyAgICAgIExpc3Bf T2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdpbmRvdywgdyk7CisgICAgICBMaXNw X09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3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oMSks IHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkKKyAgICAgICYmIEVRICh3LT5jb250ZW50cywg WENBUiAoRm50aCAobWFrZV9udW1iZXIgKDIpLCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkp KQorICAgIHJldHVybiB0cnVlOworICAgIGVsc2UKKyAgICAgIHJldHVybiBmYWxzZTsKK30KKwor Ym9vbAorbWNfY3Jvc3NoYWlyc19wIChzdHJ1Y3Qgd2luZG93ICp3KQoreworI2lmZGVmIEdMWVBI X0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCAmJiBCVUZGRVJQICh3LT5jb250ZW50cykK KyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9j dXJzb3JzX2NvbmYpKQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGNyb3NzaGFpcnMpKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93Owor ICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19z dHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2lu ZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJy LCAibWNfY3Jvc3NoYWlyc19wICglcylcbiIsIHdpbmRvd19jaGFyKTsKKyAgICB9CisjZW5kaWYK Ky8qIE1vdmluZyB0aGUgbW91c2UgdHJpZ2dlcnMgYHVwZGF0ZV93aW5kb3dfY3Vyc29yJyB3aGlj aCBjYWxscworYGRpc3BsYXlfYW5kX3NldF9jdXJzb3InIHRoYXQgd291bGQgb3RoZXJ3aXNlIHJl bW92ZSBhIHBvcnRpb24gb2YgdGhlCitob3Jpem9udGFsIHJ1bGVy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UxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwg bWNfc3RkZXJyKSkpCisgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAg ICAgOiBmYWxzZTsKKyAgaWYgKE5JTFAgKGFyZykpCisgICAgbWNfc3RkZXJyX3AgPSAhbWNfc3Rk ZXJyX3A7CisgIGVsc2UKKyAgICB7CisgICAgICBhcmcgPSBGcHJlZml4X251bWVyaWNfdmFsdWUg KGFyZyk7CisgICAgICBtY19zdGRlcnJfcCA9IFhJTlQgKGFyZykgPiAwOworICAgIH0KKyAgaWYg KG1jX3N0ZGVycl9wKQorICAgIGJzZXRfYmx2X21jX3N0ZGVyciAoYiwgUXQpOworICAgIGVsc2UK KyAgICAgIGJzZXRfYmx2X21jX3N0ZGVyciAoYiwgUW5pbCk7CisgIHJldHVybiBRbmlsOworfQor CisvKiAgKGZ1bmRhbWVudGFsLW1vZGUpCisgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMg dCkKKyAgICAoc2V0cSBidWZmZXItZGlzcGxheS10YWJsZSAobWFrZS1kaXNwbGF5LXRhYmxlKSkK KyAgICAoYXNldCBidWZmZXItZGlzcGxheS10YWJsZQorICAgICAgICAgID9cdAorICAgICAgICAg ICh2ZWN0b3IgKG1ha2UtZ2x5cGgtY29kZSA/XHUwMEJCICdmb250LWxvY2std2FybmluZy1mYWNl KQorICAgICAgICAgICAgICAgICAgKG1ha2UtZ2x5cGgtY29kZSA/XHQgJ2hpZ2hsaWdodCkpKQor ICAgIChhc2V0IGJ1ZmZlci1kaXNwbGF5LXRhYmxlCisgICAgICAgICAgP1xuCisgICAgICAgICAg KHZlY3RvciAobWFrZS1nbHlwaC1jb2RlID9cdTAwQjYgJ2ZvbnQtbG9jay1jb21tZW50LWZhY2Up CisgICAgICAgICAgICAgICAgICA/XG4pKQorICAgIChzZXRxIHRhYi13aWR0aCA4KQorICAgIChz ZXRxLWxvY2FsIGF1dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUpICovCisKK0RFRlVOICgi bWMtZGVidWciLCBGbWNfZGVidWcsIFNtY19kZWJ1ZywgMCwgMCwgIiIsCisgICAgICAgZG9jOiAv KiBUaGlzIGZ1bmN0aW9uIHVzZWQgZm9yIGRlYnVnZ2luZy4gKi8pCisgICh2b2lkKQoreworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgUFJFTElNSU5BUlkg U1RVRkYKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVj b2RlX2xpdmVfd2luZG93IChzZWxlY3RlZF93aW5kb3cpOworICBzdHJ1Y3QgaXQgaXQ7CisgIHZv aWQgKml0ZGF0YSA9IGJpZGlfc2hlbHZlX2NhY2hlICgpOworICBzdHJ1Y3QgaXQgaXQyOworICB2 b2lkICppdDJkYXRhID0gTlVMTDsKKyAgc3RydWN0IGl0IGl0MzsKKyAgdm9pZCAqaXQzZGF0YSA9 IE5VTEw7CisgIGVudW0gbW92ZV9pdF9yZXN1bHQgcmMgPSBNT1ZFX1hfUkVBQ0hFRDsKKyAgc3Ry dWN0IHRleHRfcG9zIHN0YXJ0X3RleHRfcG9zaXRpb247CisgIGludCBjb3VudCA9IDA7CisgIGlu dCBuZXdfeCA9IDA7CisgIGludCBwcmV2aW91c19pdF9jID0gMDsKKyAgaW50IHByZXZpb3VzX2l0 X2ZldGNoYnl0ZSA9IDA7CisgIGludCBwcmV2aW91c19pdF9jdXJyZW50X3ggPSAwOworICBpbnQg cHJldmlvdXNfaXRfY2hhcnBvcyA9IDA7CisgIGludCBwcmV2aW91c19pdF9waXhlbF93aWR0aCA9 IDA7CisgIGJvb2wgZmluYWxfbG9vcF9wID0gZmFsc2U7CisgIGludCB0ZXh0X2FyZWFfd2lkdGgg PSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqCisgICAgICAgICAgICAgICAgICAgICAgU1RBUlQgRElTUExBWSAtLSB3LT5zdGFydAorKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisgIC8qIEJlZ2luIHRoZSBqb3VybmV5IGF0IHctPnN0YXJ0 LiAqLworICBTRVRfVEVYVF9QT1NfRlJPTV9NQVJLRVIgKHN0YXJ0X3RleHRfcG9zaXRpb24sIHct PnN0YXJ0KTsKKyAgc3RhcnRfZGlzcGxheSAoJml0LCB3LCBzdGFydF90ZXh0X3Bvc2l0aW9uKTsK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgIEdPIFRPIFRIRSBCRUdJ Tk5JTkcgT0YgVEhFIENVUlJFTlQgTElORS4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICAv KiBQbGFjZSB0aGUgSVQgb24gdGhlIGN1cnJlbnQgbGluZSBjb250YWluaW5nIFBULiAqLworICBp bnQgdm9mZnNldCA9IChXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KSA+IDAKKyAgICAgICAg ICAgICAgICAgJiYgdy0+b3V0cHV0X2N1cnNvci52cG9zID4gMCkKKyAgICAgICAgICAgICAgICAg ID8gdy0+b3V0cHV0X2N1cnNvci52cG9zIC0gMQorICAgICAgICAgICAgICAgICAgOiB3LT5vdXRw dXRfY3Vyc29yLnZwb3M7CisgIGlmICh2b2Zmc2V0ID4gMCkKKyAgICBtb3ZlX2l0X2J5X2xpbmVz ICgmaXQsIHZvZmZzZXQpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAg ICAgICAgICAgIE1PVkUgSVQ6ICBJTkNSRU1FTlQgPT0gMSBwaXhlbAorKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisgIGZwcmludGYgKHN0ZGVyciwgIlxuaXQuZmlyc3RfdmlzaWJsZV94ICglZClc biIsIGl0LmZpcnN0X3Zpc2libGVfeCk7CisgIHdoaWxlICghZmluYWxfbG9vcF9wKQorICAgIHsK KyAgICAgIG1jX2RlYnVnX3AgPSB0cnVlOworICAgICAgZmluYWxfbG9vcF9wID0gKElUX0NIQVJQ T1MgKGl0KSA9PSBaVikKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAg ICAgICAgICAgICA6IChGRVRDSF9CWVRFIChJVF9CWVRFUE9TIChpdCkpID09ICdcbicKKyAgICAg ICAgICAgICAgICAgICAgICAgICYmIGl0LmMgIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAg PyB0cnVlCisgICAgICAgICAgICAgICAgICAgICA6IChyYyA9PSBNT1ZFX0xJTkVfQ09OVElOVUVE KQorICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgIDog KHJjID09IE1PVkVfTElORV9UUlVOQ0FURUQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0 LmN1cnJlbnRfeCAtIGl0LmZpcnN0X3Zpc2libGVfeCA+IHRleHRfYXJlYV93aWR0aCkKKyAgICAg ICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlOwor ICAgICAgaWYgKGl0LmN1cnJlbnRfeCA+IHByZXZpb3VzX2l0X2N1cnJlbnRfeAorICAgICAgICAg IHx8IElUX0NIQVJQT1MgKGl0KSA+IHByZXZpb3VzX2l0X2NoYXJwb3MKKyAgICAgICAgICB8fCBp dC5jICE9IHByZXZpb3VzX2l0X2MKKyAgICAgICAgICB8fCBpdC5jID09IDAKKyAgICAgICAgICB8 fCBpdC5jID09IDEwKQorICAgICAgICB7CisgICAgICAgICAgTGlzcF9PYmplY3QgY2hhcmFjdGVy ID0gRmNoYXJfdG9fc3RyaW5nIChtYWtlX251bWJlciAoaXQuYykpOworICAgICAgICAgIGludCBj aGFycG9zID0gSVRfQ0hBUlBPUyAoaXQpOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxu Y2hhcnBvcyAoJWQvJWQvJWQpIHwgZmlyc3RfeCAoJWQpIHwgcHJldmlvdXNfeCAoJWQpIHwgeCAo JWQpIHwgYyAoJXMpIHwgcHcgKCVkKSB8IGhwb3MgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIGNoYXJwb3MsIHByZXZpb3VzX2l0X2NoYXJwb3MsIEZFVENIX0JZVEUgKElUX0JZ VEVQT1MgKGl0KSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5maXJzdF92aXNpYmxl X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c19pdF9jdXJyZW50X3gsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5jdXJyZW50X3gsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAoKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIGl0LmMgPT0gOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHQi CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmMgPT0gMTApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBp dC5jICE9IDkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyAhPSAxMCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6ICI/IiksCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBpdC5waXhlbF93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0Lmhwb3Mp OworICAgICAgICAgIHByZXZpb3VzX2l0X2MgPSBpdC5jOworICAgICAgICAgIHByZXZpb3VzX2l0 X2N1cnJlbnRfeCA9IGl0LmN1cnJlbnRfeDsKKyAgICAgICAgICBwcmV2aW91c19pdF9jaGFycG9z ID0gSVRfQ0hBUlBPUyAoaXQpOworICAgICAgICAgIHByZXZpb3VzX2l0X2ZldGNoYnl0ZSA9IEZF VENIX0JZVEUgKElUX0JZVEVQT1MgKGl0KSk7CisgICAgICAgICAgcHJldmlvdXNfaXRfcGl4ZWxf d2lkdGggPSBpdC5waXhlbF93aWR0aDsKKyAgICAgICAgICBjb3VudCArPSAxOworICAgICAgICB9 CisgICAgICBuZXdfeCArPSAxOworICAgICAgU0FWRV9JVCAoaXQyLCBpdCwgaXQyZGF0YSk7Cisg ICAgICByYyA9IG1vdmVfaXRfaW5fZGlzcGxheV9saW5lX3RvICgmaXQsIFpWLCBuZXdfeCwgTU9W RV9UT19QT1MgfCBNT1ZFX1RPX1gpOworICAgICAgU0FWRV9JVCAoaXQzLCBpdCwgaXQzZGF0YSk7 CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBUSEUgRU5ECisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgbWNfZGVidWdf cCA9IGZhbHNlOworICBiaWRpX3Vuc2hlbHZlX2NhY2hlIChpdGRhdGEsIGZhbHNlKTsKKyAgcmV0 dXJuIFFuaWw7Cit9CisKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAMCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKIAkJICAgICAgV2luZG93IGRpc3Bs YXkgZGltZW5zaW9ucwpAQCAtMTEyMDAsNyArMTU1NTQsOSBAQCByZXNpemVfZWNob19hcmVhX2V4 YWN0bHkgKHZvaWQpCiAJewogCSAgd2luZG93c19vcl9idWZmZXJzX2NoYW5nZWQgPSA0MjsKIAkg IHVwZGF0ZV9tb2RlX2xpbmVzID0gMzA7Ci0JICByZWRpc3BsYXlfaW50ZXJuYWwgKCk7CisgICAg ICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAxOworICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgx KTsKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDA7CiAJfQogICAgIH0KIH0KQEAgLTEx Njg3LDcgKzE2MDQzLDkgQEAgZWNob19hcmVhX2Rpc3BsYXkgKGJvb2wgdXBkYXRlX2ZyYW1lX3Ap CiAJICAgICAgcHRyZGlmZl90IGNvdW50ID0gU1BFQ1BETF9JTkRFWCAoKTsKIAkgICAgICBzcGVj YmluZCAoUXJlZGlzcGxheV9kb250X3BhdXNlLCBRdCk7CiAJICAgICAgZnNldF9yZWRpc3BsYXkg KGYpOwotCSAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKyAgICAgICAgICBtY19yZWRpc3Bs YXlfaW50ZXJuYWwgPSAyOworICAgICAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoMik7CisgICAg ICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKIAkgICAgICB1bmJpbmRfdG8gKGNvdW50 LCBRbmlsKTsKIAkgICAgfQogCSAgZWxzZSBpZiAoRlJBTUVfV0lORE9XX1AgKGYpICYmIG4gPT0g MCkKQEAgLTEzMzY2LDYgKzE3NzI0LDE5IEBAIGhzY3JvbGxfd2luZG93X3RyZWUgKExpc3BfT2Jq ZWN0IHdpbmRvdykKIAkgICAgICBlbHNlCiAJCXB0ID0gY2xpcF90b19ib3VuZHMgKEJFR1YsIG1h cmtlcl9wb3NpdGlvbiAody0+cG9pbnRtKSwgWlYpOwogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIHN0cnVjdCBkaXNwbGF5X3BvcyAqcG9z ID0gJmN1cnNvcl9yb3ctPnN0YXJ0OworICBwdHJkaWZmX3QgY2hhcnBvcyA9IENIQVJQT1MgKHBv cy0+cG9zKTsKKyAgYm9vbCBiYXJmX2NyYXNoID0gKGNoYXJwb3MgPCAwIHx8IChjaGFycG9zID49 IEJVRl9CRUcgKGN1cnJlbnRfYnVmZmVyKSAmJiBjaGFycG9zIDw9IFpWKSkgPyBmYWxzZSA6IHRy dWU7CisgIGlmIChiYXJmX2NyYXNoKQorICAgIHJldHVybiBoc2Nyb2xsZWRfcDsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogCSAgICAg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lfd2luZG93Jy4gKi8KKworICAgICAgbWNfcmVtb3ZlX211bHRpcGxlX2N1 cnNvcnMgKHcpOworICAgICAgbWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcpOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAJICAgICAgZ290byB1cGRhdGU7CiAJICAgIH0KIAkgIGVsc2UK QEAgLTE0MzAzLDYgKzE4NzAzLDIyIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKIAkJICAm JiAodyA9IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpICE9IHN3KQogCQlnb3RvIHJldHJ5Owog CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisv KiBOT1RFOiAgQW4gaWRsZS10aW1lciBmdW5jdGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdn ZXIgYHJlZGlzcGxheV93aW5kb3cnLgorICAgYHctPm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQg dG8gdHJ1ZSB3aXRoaW4gYG1jLWFjdGl2YXRlLWNyb3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlv biAxYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVl biBsaW5lKS4KKy0gIGBvcHRpbWl6YXRpb24gM2AgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1v dmVtZW50IG9uIHNjcmVlbiBsaW5lcyBzdWJzZXF1ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVl biBsaW5lKSwgYnlwYXNzIGByZWRpc3BsYXlfd2luZG93Jy4gKi8KKworICAgIGlmICh3LT5tdXN0 X2JlX3VwZGF0ZWRfcCkKKyAgICAgIGdvdG8gdXBkYXRlOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAJICAgICAgLyogV2UgdXNlZCB0byBhbHdheXMgZ290byBlbmRfb2ZfcmVkaXNw bGF5IGhlcmUsIGJ1dCB0aGlzCiAJCSBpc24ndCBlbm91Z2ggaWYgd2UgaGF2ZSBhIGJsaW5raW5n IGN1cnNvci4gICovCiAJICAgICAgaWYgKHctPmN1cnNvcl9vZmZfcCA9PSB3LT5sYXN0X2N1cnNv cl9vZmZfcCkKQEAgLTE0MzQ0LDYgKzE4NzYwLDIzIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9p ZCkKIAkJICAqdy0+ZGVzaXJlZF9tYXRyaXgtPm1ldGhvZCA9IDA7CiAJCSAgZGVidWdfbWV0aG9k X2FkZCAodywgIm9wdGltaXphdGlvbiAzIik7CiAjZW5kaWYKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTk9URTogIEFuIGlkbGUtdGlt ZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2VyIGByZWRpc3BsYXlfd2luZG93 Jy4KKyAgIGB3LT5tdXN0X2JlX3VwZGF0ZWRfcCcgaXMgc2V0IHRvIHRydWUgd2l0aGluIGBtYy1h Y3RpdmF0ZS1jcm9zc2hhaXJzJy4KKy0gIGBvcHRpbWl6YXRpb24gMWAgKGUuZy4sIGxlZnQvcmln aHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4gbGluZSkuCistICBgb3B0aW1p emF0aW9uIDNgIChlLmcuLCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBvbiBzY3JlZW4gbGlu ZXMgc3Vic2VxdWVudAorICAgIHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSksIGJ5cGFzcyBgcmVk aXNwbGF5X3dpbmRvdycuICovCisKKyAgICAgIG1jX3JlbW92ZV9tdWx0aXBsZV9jdXJzb3JzICh3 KTsKKyAgICAgIG1jX3JlbW92ZV9jcm9zc2hhaXJzICh3KTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogCQkgIGdvdG8gdXBkYXRlOwogCQl9CiAJICAgICAgZWxzZQpAQCAtMTQ3MjQs MTYgKzE5MTU3LDM2IEBAIHJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgKGludCBmcm9tX3do ZXJlKQogICBibG9ja19idWZmZXJfZmxpcHMgKCk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgc3Ry dWN0IHdpbmRvdyAqdyA9IGRlY29kZV9saXZlX3dpbmRvdyAoc2VsZWN0ZWRfd2luZG93KTsKKyAg dy0+bWMucmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IGZyb21fd2hlcmU7CisgIG1jX3Jl ZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPSBmcm9tX3doZXJlOworCiAgIGlmICghTklMUCAo ZWNob19hcmVhX2J1ZmZlclsxXSkpCiAgICAgewogICAgICAgLyogV2UgaGF2ZSBhIHByZXZpb3Vz bHkgZGlzcGxheWVkIG1lc3NhZ2UsIGJ1dCBubyBjdXJyZW50CiAJIG1lc3NhZ2UuICBSZWRpc3Bs YXkgdGhlIHByZXZpb3VzIG1lc3NhZ2UuICAqLwogICAgICAgZGlzcGxheV9sYXN0X2Rpc3BsYXll ZF9tZXNzYWdlX3AgPSB0cnVlOwotICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgpOworICAgICAg bWNfcmVkaXNwbGF5X2ludGVybmFsID0gNDsKKyAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoNCk7 CisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAwOwogICAgICAgZGlzcGxheV9sYXN0X2Rp c3BsYXllZF9tZXNzYWdlX3AgPSBmYWxzZTsKICAgICB9CiAgIGVsc2UKLSAgICByZWRpc3BsYXlf aW50ZXJuYWwgKCk7CisgICAgeworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gNTsKKyAg ICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoNSk7CisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwg PSAwOworICAgIH0KKworICB3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID0gMDsK KyAgbWNfcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IDA7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCiAKICAgZmx1c2hfZnJhbWUgKFNFTEVDVEVEX0ZSQU1FICgpKTsKICAgdW5i aW5kX3RvIChjb3VudCwgUW5pbCk7CkBAIC0xNzI1OSw2ICsyMTcxMiwxNiBAQCByZWRpc3BsYXlf d2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQogICBkZWJ1 Z19tZXRob2RfYWRkICh3LCAicmVjZW50ZXIiKTsKICNlbmRpZgogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIG1jX3JlbW92ZV9tdWx0aXBs ZV9jdXJzb3JzICh3KTsKKyAgbWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcpOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgIC8qIEZvcmdldCBhbnkgcHJldmlvdXNseSByZWNvcmRlZCBi YXNlIGxpbmUgZm9yIGxpbmUgbnVtYmVyIGRpc3BsYXkuICAqLwogICBpZiAoIWJ1ZmZlcl91bmNo YW5nZWRfcCkKICAgICB3LT5iYXNlX2xpbmVfbnVtYmVyID0gMDsKQEAgLTE3Njg5LDYgKzIyMTUy LDIyIEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3BfT2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3Ro aXNfb25lX3ApCiAgIGVsc2UKICAgICBURU1QX1NFVF9QVF9CT1RIIChDSEFSUE9TIChvcG9pbnQp LCBCWVRFUE9TIChvcG9pbnQpKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworLyogTk9URTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5 IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2VyIGByZWRpc3BsYXlfd2luZG93Jy4KKyAgIGB3LT5tdXN0 X2JlX3VwZGF0ZWRfcCcgaXMgc2V0IHRvIHRydWUgd2l0aGluIGBtYy1hY3RpdmF0ZS1jcm9zc2hh aXJzJy4KKy0gIGBvcHRpbWl6YXRpb24gMWAgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVt ZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4gbGluZSkuCistICBgb3B0aW1pemF0aW9uIDNgIChlLmcu LCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBvbiBzY3JlZW4gbGluZXMgc3Vic2VxdWVudAor ICAgIHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSksIGJ5cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycu ICovCisKKyAgbWNfcmVtb3ZlX211bHRpcGxlX2N1cnNvcnMgKHcpOworICBtY19yZW1vdmVfY3Jv c3NoYWlycyAodyk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgc2V0X2J1ZmZl cl9pbnRlcm5hbF8xIChvbGQpOwogICAvKiBBdm9pZCBhbiBhYm9ydCBpbiBURU1QX1NFVF9QVF9C T1RIIGlmIHRoZSBidWZmZXIgaGFzIGJlY29tZQogICAgICBzaG9ydGVyLiAgVGhpcyBjYW4gYmUg Y2F1c2VkIGJ5IGxvZyB0cnVuY2F0aW9uIGluICpNZXNzYWdlcyouICAqLwpAQCAtMjAwNzgsNiAr MjQ1NTcsMTcgQEAgYXBwZW5kX3NwYWNlX2Zvcl9uZXdsaW5lIChzdHJ1Y3QgaXQgKml0LCBib29s IGRlZmF1bHRfZmFjZV9wKQogCSAgbWVtc2V0ICgmaXQtPnBvc2l0aW9uLCAwLCBzaXplb2YgaXQt PnBvc2l0aW9uKTsKIAkgIGl0LT5vYmplY3QgPSBRbmlsOwogCSAgaXQtPmMgPSBpdC0+Y2hhcl90 b19kaXNwbGF5ID0gJyAnOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUgQ1VSU09SUyAqLworCisgICAgICBpZiAoSVRfQllURVBPUyAoKml0KSA+PSBaVl9CWVRFKQor ICAgICAgICBpdC0+enZfcCA9IHRydWU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAkgIGl0LT5sZW4gPSAxOwogCiAJICAvKiBJZiB0aGUgZGVmYXVsdCBmYWNlIHdhcyByZW1hcHBl ZCwgYmUgc3VyZSB0byB1c2UgdGhlCkBAIC0yMTA0MSw2ICsyNTUzMSwyMSBAQCBkaXNwbGF5X2Nv dW50X2xpbmVzX3Zpc3VhbGx5IChzdHJ1Y3QgaXQgKml0KQogc3RhdGljIHZvaWQKIG1heWJlX3By b2R1Y2VfbGluZV9udW1iZXIgKHN0cnVjdCBpdCAqaXQpCiB7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgYm9vbCBiYXJmX2NyYXNoID0g KGl0LT5nbHlwaF9yb3cgPT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgfHwgaXQtPmdseXBo X3Jvdy0+dXNlZFtURVhUX0FSRUFdID09IDApCisgICAgICAgICAgICAgICAgICAgID8gZmFsc2UK KyAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaCkKKyAgICByZXR1 cm47CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgcHRyZGlmZl90IGxhc3RfbGlu ZSA9IGl0LT5sbnVtOwogICBwdHJkaWZmX3Qgc3RhcnRfZnJvbSwgYnl0ZXBvczsKICAgcHRyZGlm Zl90IHRoaXNfbGluZTsKQEAgLTIxMTg1LDggKzI1NjkwLDEyIEBAIG1heWJlX3Byb2R1Y2VfbGlu ZV9udW1iZXIgKHN0cnVjdCBpdCAqaXQpCiAgICAgIGFuIEwyUiBwYXJhZ3JhcGguICAqLwogICB0 ZW1faXQuYmlkaV9pdC5yZXNvbHZlZF9sZXZlbCA9IDI7CiAKKyAgLyogV2UgbXVzdCBsZWF2ZSBz cGFjZSBmb3IgMiBnbHlwaHMgZm9yIGNvbnRpbnVhdGlvbiBhbmQgdHJ1bmNhdGlvbiwKKyAgICAg YW5kIGF0IGxlYXN0IG9uZSBnbHlwaCBmb3IgYnVmZmVyIHRleHQuICAqLworICBpbnQgd2lkdGhf bGltaXQgPQorICAgIHRlbV9pdC5sYXN0X3Zpc2libGVfeCAtIHRlbV9pdC5maXJzdF92aXNpYmxl X3gKKyAgICAtIDMgKiBGUkFNRV9DT0xVTU5fV0lEVEggKGl0LT5mKTsKICAgLyogUHJvZHVjZSBn bHlwaHMgZm9yIHRoZSBsaW5lIG51bWJlciBpbiBhIHNjcmF0Y2ggZ2x5cGhfcm93LiAgKi8KLSAg aW50IG5fZ2x5cGhzX2JlZm9yZTsKICAgZm9yIChjb25zdCBjaGFyICpwID0gbG51bV9idWY7ICpw OyBwKyspCiAgICAgewogICAgICAgLyogRm9yIGNvbnRpbnVhdGlvbiBsaW5lcyBhbmQgbGluZXMg YWZ0ZXIgWlYsIGluc3RlYWQgb2YgYSBsaW5lCkBAIC0yMTIxMCwxOCArMjU3MTksMzEgQEAgbWF5 YmVfcHJvZHVjZV9saW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKICAgICAgIGVsc2UKIAl0ZW1f aXQuYyA9IHRlbV9pdC5jaGFyX3RvX2Rpc3BsYXkgPSAqcDsKICAgICAgIHRlbV9pdC5sZW4gPSAx OwotICAgICAgbl9nbHlwaHNfYmVmb3JlID0gc2NyYXRjaF9nbHlwaF9yb3cudXNlZFtURVhUX0FS RUFdOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAq LworCisgICAgICBpZiAoYmV5b25kX3p2KQorICAgICAgICB0ZW1faXQuenZfcCA9IHRydWU7Cisg ICAgICB0ZW1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ZHRoID0gMDsKKwkgIGJpZGlf dW5zaGVsdmVfY2FjaGUgKGl0ZGF0YSwgZmFsc2UpOworCSAgcmV0dXJuOwogCX0KICAgICB9CiAK QEAgLTI2OTk3LDYgKzMxNTE5LDI0IEBAIGFwcGVuZF9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAkg ICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07CiAJ fQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLwor CisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQt PmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5 cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFS UE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAg ICAgICBpZiAoaXQtPnBpeGVsX3dpZHRoID4gMCkKQEAgLTI3MDgwLDYgKzMxNjIwLDI0IEBAIGFw cGVuZF9jb21wb3NpdGVfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJICAgIGdbMV0gPSAqZzsKIAkg IGdseXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2l0LT5hcmVhXTsKIAl9CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBo LT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95Owor CisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0 LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IGl0LT5jbXBfaXQuY2hhcnBv czsKICAgICAgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQt PnBpeGVsX3dpZHRoIDw9IFNIUlRfTUFYKTsKQEAgLTI3Mjg4LDYgKzMxODQ2LDI0IEBAIHByb2R1 Y2VfaW1hZ2VfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQt PmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1 cnJlbnRfeDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlw aC0+aHBvcyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisg ICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlw aC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9f Ym91bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzM5MSw2ICszMTk2 NywyNCBAQCBwcm9kdWNlX3h3aWRnZXRfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAg aWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGds eXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95 OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9 IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3Np dGlvbik7CiAJICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93 aWR0aCA9IGNsaXBfdG9fYm91bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBA IC0yNzQ3Nyw2ICszMjA3MSwyNCBAQCBhcHBlbmRfc3RyZXRjaF9nbHlwaCAoc3RydWN0IGl0ICpp dCwgTGlzcF9PYmplY3Qgb2JqZWN0LAogCSAgICB3aWR0aCAtPSBpdC0+Zmlyc3RfdmlzaWJsZV94 IC0gaXQtPmN1cnJlbnRfeDsKIAkgIGVhc3NlcnQgKHdpZHRoID4gMCk7CiAJfQorCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBnbHlw aC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsK KworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5cGgtPnZwb3MgPSBp dC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9z aXRpb24pOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IG9iamVjdDsKICAgICAgIC8qIEZJWE1FOiBJ dCB3b3VsZCBiZSBiZXR0ZXIgdG8gdXNlIFRZUEVfTUFYIGhlcmUsIGJ1dApAQCAtMjc5MjYsNiAr MzI1MzgsMjQgQEAgYXBwZW5kX2dseXBobGVzc19nbHlwaCAoc3RydWN0IGl0ICppdCwgaW50IGZh Y2VfaWQsIGJvb2wgZm9yX25vX2ZvbnQsIGludCBsZW4sCiAJICAgIGdbMV0gPSAqZzsKIAkgIGds eXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBp dC0+Y3VycmVudF94OworCisgICAgICBnbHlwaC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAg IGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisKKyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7 CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQtPnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsK ICAgICAgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBp eGVsX3dpZHRoIDw9IFNIUlRfTUFYKTsKQEAgLTI5NjkyLDkgKzM0MzIyLDMyIEBAIGRpc3BsYXlf YW5kX3NldF9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgICAgICB3LT5waHlz X2N1cnNvci52cG9zID0gdnBvczsKICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgdy0+bWMuaCA9IC0xOworICB3LT5tYy5meCA9 IC0xOworICB3LT5tYy5meSA9IC0xOworICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBOT19GTEFWT1I7 CisgIHctPm1jLnJlZCA9IC0xLjA7CisgIHctPm1jLmdyZWVuID0gLTEuMDsKKyAgdy0+bWMuYmx1 ZSA9IC0xLjA7CisgIHctPm1jLnBvc2ludCA9IC0xOworCiAgIEZSQU1FX1JJRiAoZiktPmRyYXdf d2luZG93X2N1cnNvciAodywgZ2x5cGhfcm93LCB4LCB5LAogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG5ld19jdXJzb3JfdHlwZSwgbmV3X2N1cnNvcl93aWR0aCwKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbiwgYWN0aXZlX2N1cnNvcik7CisKKyAg bWNfbXVsdGlwbGVfY3Vyc29yc19wb3J0YWwgKHcsIG9uLCBhY3RpdmVfY3Vyc29yKTsKKworICAv KiBUaGUgcmVhbCBjdXJzb3IgKGRyYXduIGFib3ZlKSBpcyBnZXRzIHJlbW92ZWQgYnkgY3Jvc3No YWlycy4KKyAgYG1jX2RyYXdfY3Jvc3NoYWlycycgcmVsaWVzIHVwb24gYHctPnBoeXNfY3Vyc29y LngveS9ocG9zL3Zwb3MnIHdoZW4gT04uICovCisgIG1jX2Nyb3NzaGFpcnNfcG9ydGFsICh3LCBv biwgYWN0aXZlX2N1cnNvcik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAog CkBAIC0yOTcyNiwxMCArMzQzNzksMjUgQEAgdXBkYXRlX3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3 aW5kb3cgKncsIGJvb2wgb24pCiAgICAgICBpZiAocm93LT5yZXZlcnNlZF9wICYmIGhwb3MgPj0g cm93LT51c2VkW1RFWFRfQVJFQV0pCiAJaHBvcyA9IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsK IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAgICAgLyogRklYTUU6ICBUaGVzZSByZXN0cmljdGlvbnMgYXJlIGxpa2VseSB0aGUgcmVhc29u cyB0aGF0IGNyb3NzaGFpcnMgYW5kCisgICAgICBtdWx0aXBsZSBmYWtlIGN1cnNvcnMgYXJlIG5v dCB3b3JraW5nIG9uIE1hY09TIE1vamF2ZS4gIEBsYXdsaXN0IGRvZXMgbm90CisgICAgICBwcmVz ZW50bHkgaGF2ZSBhY2Nlc3MgdG8gYSBjb21wdXRlciB3aXRoIHRoYXQgdmVyc2lvbiBvZiB0aGUg T1MuICovCisgICAgICBpZiAoIW1jX2Nyb3NzaGFpcnNfcCAodykKKyAgICAgICAgICAmJiAhbWNf bXVsdGlwbGVfY3Vyc29yc19wICh3KSkKKyAgICAgICAgewogICAgICAgYmxvY2tfaW5wdXQgKCk7 CiAgICAgICBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yICh3LCBvbiwgaHBvcywgdnBvcywKIAkJCSAg ICAgIHctPnBoeXNfY3Vyc29yLngsIHctPnBoeXNfY3Vyc29yLnkpOwogICAgICAgdW5ibG9ja19p bnB1dCAoKTsKKyAgICAgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAg fQogfQogCkBAIC0zMjQzNiw2ICszNzEwNCwyNiBAQCB4X2ludGVyc2VjdF9yZWN0YW5nbGVzIChY UmVjdGFuZ2xlICpyMSwgWFJlY3RhbmdsZSAqcjIsIFhSZWN0YW5nbGUgKnJlc3VsdCkKIHZvaWQK IHN5bXNfb2ZfeGRpc3AgKHZvaWQpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX3Jvdyk7 CisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX21hdHJpeCk7CisKKyAgZGVmc3ViciAoJlNt Y19hY3RpdmF0ZV9tdWx0aXBsZV9jdXJzb3JzKTsKKworICBkZWZzdWJyICgmU21jX2FjdGl2YXRl X2Nyb3NzaGFpcnMpOworCisgIGRlZnN1YnIgKCZTbWNfc3RkZXJyKTsKKworICBkZWZzdWJyICgm U21jX2RlYnVnKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBWd2l0aF9lY2hv X2FyZWFfc2F2ZV92ZWN0b3IgPSBRbmlsOwogICBzdGF0aWNwcm8gKCZWd2l0aF9lY2hvX2FyZWFf c2F2ZV92ZWN0b3IpOwogCmRpZmYgLS1naXQgYS9zcmMveHRlcm0uYyBiL3NyYy94dGVybS5jCmlu ZGV4IGFmMjhkYWIuLmQ5OWI5ZTcgMTAwNjQ0Ci0tLSBhL3NyYy94dGVybS5jCisrKyBiL3NyYy94 dGVybS5jCkBAIC0xNTMwLDYgKzE1MzAsMjAgQEAgc3RhdGljIHZvaWQgeF9jaGVja19mb250IChz dHJ1Y3QgZnJhbWUgKiwgc3RydWN0IGZvbnQgKik7CiBzdGF0aWMgdm9pZAogeF9zZXRfY3Vyc29y X2djIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzKQogeworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGlmIChzLT53LT5tYy5jdXJzb3JfZ2Nf ZGVmYXVsdCkKKyAgICB7CisgICAgICBzLT5nYyA9IHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9nYzsKKyAgICAgIHJldHVybjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICAgaWYgKHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2Ut PmJhY2tncm91bmQgPT0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMt PmZhY2UtPmZvcmVncm91bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTky NTIsNiArOTI2NiwyNiBAQCB4X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywg c3RydWN0IGdseXBoX3JvdyAqcm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29v cmRpbmF0ZXMgZm9yIHBoeXMgY3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5 ICh3LCByb3csIGN1cnNvcl9nbHlwaCwgJngsICZ5LCAmaCk7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9w IHkgPT0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkg PT0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCist ICBoIG9mIEhPTExPV19CT1hfQ1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMg YSB2aXNpYmxlIGdhcCBhYm92ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAg IGggPSByb3ctPmhlaWdodDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3ZCA9 IHctPnBoeXNfY3Vyc29yX3dpZHRoIC0gMTsKIAogICAvKiBUaGUgZm9yZWdyb3VuZCBvZiBjdXJz b3JfZ2MgaXMgdHlwaWNhbGx5IHRoZSBzYW1lIGFzIHRoZSBub3JtYWwKQEAgLTkzMjgsNyArOTM2 MiwxOCBAQCB4X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBo X3JvdyAqcm93LCBpbnQgd2lkdGgsIGVudW0gdGV4dAogCSBpbnZpc2libGUuICBVc2UgdGhlIGds eXBoJ3MgZm9yZWdyb3VuZCBjb2xvciBpbnN0ZWFkIGluIHRoaXMKIAkgY2FzZSwgb24gdGhlIGFz c3VtcHRpb24gdGhhdCB0aGUgZ2x5cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbwogCSB0aGF0IHRo ZSBnbHlwaCBpcyBsZWdpYmxlLiAgKi8KLSAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGYt Pm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCkKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tncm91bmQg PT0gZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsCisgICAgICAgICAgJiYgIXctPm1jLmN1 cnNvcl9nY19pbnZpc2libGVfb2theSkKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJeGdjdi5iYWNrZ3JvdW5kID0geGdjdi5mb3JlZ3JvdW5kID0gZmFjZS0+Zm9yZWdyb3VuZDsK ICAgICAgIGVsc2UKIAl4Z2N2LmJhY2tncm91bmQgPSB4Z2N2LmZvcmVncm91bmQgPSBmLT5vdXRw dXRfZGF0YS54LT5jdXJzb3JfcGl4ZWw7CkBAIC05MzU5LDYgKzk0MDQsMTcgQEAgeF9kcmF3X2Jh cl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHdp ZHRoLCBlbnVtIHRleHQKIAkgIGlmICgoY3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEp ICE9IDApCiAJICAgIHggKz0gY3Vyc29yX2dseXBoLT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAg LyogQWxpZ24gYWxsIGZha2UgQkFSX0NVUlNPUiBvZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBg b3BvaW50X3gnLiAqLworICAgIGlmICh3LT5tYy5meCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIHhfZmlsbF9yZWN0YW5nbGUgKGYs IGdjLCB4LAogCQkJICBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgdy0+cGh5c19jdXJzb3Iu eSksCiAJCQkgIHdpZHRoLCByb3ctPmhlaWdodCk7CkBAIC05NDM1LDMxICs5NDkxLDE2MyBAQCB4 X2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAq Z2x5cGhfcm93LCBpbnQgeCwKIAl9CiAgICAgICBlbHNlCiAJewotCSAgc3dpdGNoIChjdXJzb3Jf dHlwZSkKLQkgICAgewotCSAgICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgotCSAgICAgIHhf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1ZmZl ciAqYiA9IFhCVUZGRVIgKGJ1Zik7CisgICAgICAgICAgYm9vbCByZWdpb25fYWN0aXZlX3AgPSAo IU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJrX2FjdGl2ZSkpKTsKKyAgICAgICAgICBwdHJk aWZmX3QgcmVnaW9uX2JlZ2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lv bl9iZWdpbm5pbmcgKCkpIDogLTE7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAo cmVnaW9uX2FjdGl2ZV9wKSA/IFhJTlQgKEZyZWdpb25fZW5kICgpKSA6IC0xOworICAgICAgICAg IGJvb2wgcmVnaW9uX2luX2JvdW5kc19wID0gKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jLnBvc2ludCA+PSByZWdpb25fYmVnaW5u aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWMucG9zaW50 IDwgcmVnaW9uX2VuZCk7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRw dXRfZGF0YS54LT5jdXJzb3JfZ2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICBmdW5jdGlv bmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHhmbnMuYy4gICovCisgICAgICAgICAgaWYgKHJlZ2lv bl9hY3RpdmVfcAorICAgICAgICAgICAgICAmJiByZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAg ICAgICAgJiYgYWN0aXZlX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVudW0gZmFj ZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlX2lkID0gbG9va3VwX25hbWVkX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cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFXX0NVUlNPUik7CisgICAgICBicmVhazsK KyAgICB9CisgICAgY2FzZSBCQVJfQ1VSU09SOgorICAgIHsKKyAgICAgIGlmICh3LT5tYy5yZWQg Pj0gMCAmJiB3LT5tYy5ibHVlID49IDAgJiYgdy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAgICAgewor ICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29y X3BpeGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0g Y29sb3IucGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0g dHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jf d2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVf b2theSA9IGZhbHNlOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9 IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAg ICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBCQVJfQ1VS U09SKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIEhCQVJfQ1VSU09SOgorICAgIHsK KyAgICAgIGlmICh3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVlID49IDAgJiYgdy0+bWMuZ3Jl ZW4gPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+ b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX3BpeGVsID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29y X2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAo dywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5t Yy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRf ZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0K KyAgICAgICAgZWxzZQorICAgICAgICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3cs IGN1cnNvcl93aWR0aCwgSEJBUl9DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNh c2UgTk9fQ1VSU09SOgorICAgICAgdy0+cGh5c19jdXJzb3Jfd2lkdGggPSAwOworICAgICAgYnJl YWs7CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgpOworICB9CisKKy8qIGVuZCBN VUxUSVBMRSBDVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KIAotCSAgICBjYXNl IE5PX0NVUlNPUjoKLQkgICAgICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7Ci0JICAgICAgYnJl YWs7CiAKLQkgICAgZGVmYXVsdDoKLQkgICAgICBlbWFjc19hYm9ydCAoKTsKLQkgICAgfQogCX0K IAogI2lmZGVmIEhBVkVfWF9JMThOCg== --Multipart_Sat_Nov_10_19:36:17_2018-1--