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#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Tue, 28 Aug 2018 23:39:25 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Tue_Aug_28_23:39:25_2018-1" X-Trace: blaine.gmane.org 1535525431 16439 195.159.176.226 (29 Aug 2018 06:50:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Aug 2018 06:50:31 +0000 (UTC) Cc: 17684@debbugs.gnu.org, 22873@debbugs.gnu.org To: Eli Zaretskii , Marcin Borkowski , Richard Stallman , John Wiegley , Akio Burns Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 29 08:50:26 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 1fuuJ6-00045A-PT for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Aug 2018 08:50:26 +0200 Original-Received: from localhost ([::1]:41451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuuLD-00082p-0l for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Aug 2018 02:52:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuuKt-0007Xs-Cy for bug-gnu-emacs@gnu.org; Wed, 29 Aug 2018 02:52:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuuA3-0006RL-GE for bug-gnu-emacs@gnu.org; Wed, 29 Aug 2018 02:41:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fuuA2-0006Pp-OP for bug-gnu-emacs@gnu.org; Wed, 29 Aug 2018 02:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fuuA2-0007bf-L9 for bug-gnu-emacs@gnu.org; Wed, 29 Aug 2018 02:41:02 -0400 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: Wed, 29 Aug 2018 06:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22873 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22873-submit@debbugs.gnu.org id=B22873.153552485929216 (code B ref 22873); Wed, 29 Aug 2018 06:41:02 +0000 Original-Received: (at 22873) by debbugs.gnu.org; 29 Aug 2018 06:40:59 +0000 Original-Received: from localhost ([127.0.0.1]:36312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fuu9z-0007bA-4H for submit@debbugs.gnu.org; Wed, 29 Aug 2018 02:40:59 -0400 Original-Received: from gateway22.websitewelcome.com ([192.185.47.179]:14487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fuu9w-0007au-H2 for 22873@debbugs.gnu.org; Wed, 29 Aug 2018 02:40:56 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway22.websitewelcome.com (Postfix) with ESMTP id E6F2F6B93 for <22873@debbugs.gnu.org>; Wed, 29 Aug 2018 01:40:54 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id uu8Xfd9isBcCXuu8kf7RFy; Wed, 29 Aug 2018 01:40:53 -0500 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=iGmVNKQhxJ3fuZW4ooR8ZDyNrn6YPaHBKYqEHTuMBd8=; b=h75n88EYTw7ARBHvsI9V9NEK47 +Z7vlL37X1UER35jSgBw/TqPmJaZO8S5YNSRu8nQ86kJn9Se9cQQtwOP96QgtSXSCNunx/nFbtK49 QwA+ntrWfoyCNOWGLH65idGYptqlLrhC+oLiDQU23wdMfTBBVPMoEGPAUlsKbltglykf745FIxpM/ imyaxUXfuu7svWR+nK1EOrQcWjNa4bDZrP2KpwbyutX5Ho7jygQu2qAiHae0HvK+AvVIbkkrHiiH4 LInIyA2D/e/04JUXkPRhTrjb9si9DLz+1jsr0dW9GdPmk2oiOJLm3zN1Zc7C/wfNFoUL9KVwwOp7F 7FZQ5R0Q==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:53587 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1fuu8V-001I30-7V; Wed, 29 Aug 2018 01:39:28 -0500 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: 1fuu8V-001I30-7V 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]:53587 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:149827 Archived-At: --Multipart_Tue_Aug_28_23:39:25_2018-1 Content-Type: text/plain; charset=US-ASCII Proof concept patch version 014. Changes include, but are not limited to: - Crosshairs now attempts to deal with variable pitch and nonstandard width characters. This is accomplished by permitting the vertical ruler to intersect a character anywhere along the X axis (vertically aligned with the left of point). The horizontal ruler now also plays nicer with nonstandard width characters. - Debugging messages to stderr are turned on/off with: M-x mc-stderr. - Bug fixes (elimination of an infinite loop; drawing multiple fake cursors only if they are within the bounds of the visible window; miscellaneous others...). - Reduced footprint of revisions to core Emacs code, which is now possible by using a few new window pointers: w->mc.[red, green, blue, fx, fy, h]. INSTALLATION: 1. Download a current version of Emacs master branch. 2. Reset the repository to 07/07/2018: git reset --hard 98463bed07ecc9057094928ffdc2321eaaf3ab52 3. Apply the attached patch from the root repository directory. 4. Build a GUI version of Emacs: X11, NS, or Windows. 5. To try out built-in fake cursors with Magnar Sveen's library (multiple-cursors), install that package first. (progn (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'multiple-cursors)) 6. Load or evaluate the contents of crosshairs.el (attached), which includes code modifying a couple of functions used by Magnar Sveen's library. 7. To try out the crosshairs feature, open a simple buffer (nothing fancy, just code or text) and type: M-x +-mode 8. To see an example of crosshairs playing nicely with tab stretches, open up something like simple.el and type: M-x +-mode. 9. To see an example of a variety of built-in cursor styles and widths, type: M-x mc-test This is still a work in progress ... --Multipart_Tue_Aug_28_23:39:25_2018-1 Content-Type: application/el; type=lawlist-elisp Content-Disposition: attachment; filename="crosshairs.el" Content-Transfer-Encoding: base64 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Cjs7OyBCRUdJTiBtb2RpZmljYXRpb24gb2YgdGhlIE11 bHRpcGxlIEN1cnNvcnMgbGlicmFyeSB3cml0dGVuIGJ5ICBNYWduYXIgU3ZlZW4uCgo7OzsgKHBy b2duCjs7OyAgIChyZXF1aXJlICdwYWNrYWdlKQo7OzsgICAoYWRkLXRvLWxpc3QgJ3BhY2thZ2Ut YXJjaGl2ZXMgJygibWVscGEiIC4gImh0dHA6Ly9tZWxwYS5taWxrYm94Lm5ldC9wYWNrYWdlcy8i KSB0KQo7OzsgICAocGFja2FnZS1pbml0aWFsaXplKQo7OzsgICAocGFja2FnZS1yZWZyZXNoLWNv bnRlbnRzKQo7OzsgICAocGFja2FnZS1pbnN0YWxsICdtdWx0aXBsZS1jdXJzb3JzKSkKOzs7Cjs7 OyBUbyB1c2UgbXVsdGlwbGUtY3Vyc29ycyBhZnRlciByZXN0YXJ0aW5nIEVtYWNzLCBtYWtlIHN1 cmUgdGhhdCB0aGUgZm9sbG93aW5nIGxpbmUKOzs7IGFwcGVhcnMgc29tZXdoZXJlIGluIHRoZSAu ZW1hY3MvaW5pdC5lbDogIChwYWNrYWdlLWluaXRpYWxpemUpCgood2hlbiAocmVxdWlyZSAnbXVs dGlwbGUtY3Vyc29ycy1jb3JlIG5pbCAnbm9lcnJvcikKCiAgKGRlZnZhciBtYy0tbWF4LWN1cnNv cn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gcG9zc2libHkgYSBmYWtlIGFjdGl2ZSByZWdpb24gb3ZlcmxheSBiYXNlZCBv biBwb2ludCBhbmQgbWFyay4KICBTYXZlcyB0aGUgY3VycmVudCBzdGF0ZSBpbiB0aGUgb3Zlcmxh eSB0byBiZSByZXN0b3JlZCBsYXRlci4iCiAgICAodW5sZXNzIG1jLS1tYXgtY3Vyc29ycy1vcmln aW5hbAogICAgICAoc2V0cSBtYy0tbWF4LWN1cnNvcnMtb3JpZ2luYWwgbWMvbWF4LWN1cnNvcnMp KQogICAgKHdoZW4gbWMvbWF4LWN1cnNvcnMKICAgICAgKHVubGVzcyAoPCAobWMvbnVtLWN1cnNv cnMpIG1jL21heC1jdXJzb3JzKQogICAgICAgIChpZiAoeWVzLW9yLW5vLXAgKGZvcm1hdCAiJWQg YWN0aXZlIGN1cnNvcnMuIENvbnRpbnVlPyAiIChtYy9udW0tY3Vyc29ycykpKQogICAgICAgICAg ICAoc2V0cSBtYy9tYXgtY3Vyc29ycyAocmVhZC1udW1iZXIgIkVudGVyIGEgbmV3LCB0ZW1wb3Jh cnkgbWF4aW11bTogIikpCiAgICAgICAgICAobWMvcmVtb3ZlLWZha2UtY3Vyc29ycykKICAgICAg ICAgIChlcnJvciAiQWJvcnRlZDogdG9vIG1hbnkgY3Vyc29ycyIpKSkpCiAgICAobGV0ICgob3Zl cmxheQogICAgICAgICAgICAoaWYgbWMvdXNlLWJ1aWx0LWluLWN1cnNvcnMKICAgICAgICAgICAg ICAobWFrZS1vdmVybGF5IChwb2ludCkgKHBvaW50KSkKICAgICAgICAgICAgICAobWMvbWFrZS1j dXJzb3Itb3ZlcmxheS1hdC1wb2ludCkpKSkKICAgICAgKG92ZXJsYXktcHV0IG92ZXJsYXkgJ21j LWlkIChvciBpZCAobWMvY3JlYXRlLWN1cnNvci1pZCkpKQogICAgICAob3ZlcmxheS1wdXQgb3Zl cmxheSAndHlwZSAnZmFrZS1jdXJzb3IpCiAgICAgIChvdmVybGF5LXB1dCBvdmVyb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3JpZ2luYWwtY29tbWFuZCkp KQogICAgICAgICAgICAgICAgICAobWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJz b3JzIG9yaWdpbmFsLWNvbW1hbmQpCiAgICAgICAgICAgICAgICA7OyBzbWFydHJlcCBgaW50ZXJu J3MgY29tbWFuZHMgaW50byBvd24gb2JhcnJheSB0byBoZWxwCiAgICAgICAgICAgICAgICA7OyBg ZGVzY3JpYmUtYmluZGluZ3MnLiAgU28sIGxldCdzIHJlLWBpbnRlcm4nIGhlcmUgdG8KICAgICAg ICAgICAgICAgIDs7IG1ha2UgdGhlIGNvbW1hbmQgY29tcGFyYWJsZSBieSBgZXEnLgogICAgICAg ICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29tbWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBvcmln aW5hbC1jb21tYW5kKSkpCiAgICAgICAgICAgICAgICA7OyBvdGhlcndpc2UgaXQncyBhIHN5bWJv bCwgYW5kIHdlIGNhbiBiZSBtb3JlIHRob3JvdWdoCiAgICAgICAgICAgICAgICAoaWYgKGdldCBv cmlnaW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpCiAgICAgICAgICAgICAgICAgICAgKG1l c3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMiCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWwtY29tbWFuZAogICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChnZXQgb3JpZ2luYWwtY29tbWFuZCAnbWMtLXVuc3VwcG9ydGVkKSkKICAg ICAgICAgICAgICAgICAgKHdoZW4gKGFuZCBvcmlnaW5hbC1jb21tYW5kCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNt ZHMtdG8tcnVuLW9uY2UpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1lbXEg b3JpZ2luYWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1bi1vbmNlKSkKICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAob3IgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChtZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMtLWRlZmF1bHQtY21kcy10by1y dW4tZm9yLWFsbCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1lbXEgb3JpZ2lu YWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1bi1mb3ItYWxsKQogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAobWMvcHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFs LWNvbW1hbmQpKSkKICAgICAgICAgICAgICAgICAgICAobWMvZXhlY3V0ZS1jb21tYW5kLWZvci1h bGwtZmFrZS1jdXJzb3JzIG9yaWdpbmFsLWNvbW1hbmQpKSkpKSkKICAgICAgICAgICAgICAod2hl biBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycwogICAgICAgICAgICAgICAgKGxldCogKCh3aW4gKHNl bGVjdGVkLXdpbmRvdykpCiAgICAgICAgICAgICAgICAgICAgICAgKHdpbmRvdy1zdGFydCAod2lu ZG93LXN0YXJ0IHdpbikpCiAgICAgICAgICAgICAgICAgICAgICAgKHdpbmRvdy1lbmQgKHdpbmRv dy1lbmQgd2luKSkKICAgICAgICAgICAgICAgICAgICAgICAob3ZlcmxheXMgKG1jL2FsbC1mYWtl LWN1cnNvcnMpKQogICAgICAgICAgICAgICAgICAgICAgIChsc3QKICAgICAgICAgICAgICAgICAg ICAgICAgIChtYXBjYXIKICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoeCkKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobGV0KiAoKHBvcyAob3ZlcmxheS1zdGFydCB4KSkK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnQtY29sdW1uCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChhbmQgKD49IHBvcyB3aW5kb3ct c3RhcnQpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDw9 IHBvcyB3aW5kb3ctZW5kKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChzYXZlLWV4Y3Vyc2lvbgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoZ290by1jaGFyIHBvcykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGN1cnJlbnQtY29sdW1uKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDApKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb25kCiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICgobWMtb2RkcCBjdXJyZW50LWNvbHVtbikKICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobGlzdCBwb3MgImJhciIgIiNGRjAwMDAiKSkgOzsg cmVkIG9yIFsxLjAgMC4wIDAuMF0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCht Yy1ldmVucCBjdXJyZW50LWNvbHVtbikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobGlzdCBwb3MgImJhciIgInllbGxvdyIpKSkpKSA7OyAjRkZGRjAwIG9yIFsxLjAgMS4wIDAu MF0KICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmxheXMpKSkKICAgICAgICAgICAgICAg ICAgKHNldHEgbWMtZ2x5cGgtbGlzdCBsc3QpKSkpKSkpCgogIChkZWZ1biBtYy9tYXJrLW5leHQt bGlrZS10aGlzLWN5Y2xlLWZvcndhcmQgKCkKICAiTWFya3MgbmV4dCBvY2N1cm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IGByZWRpc3BsYXlfb3RoZXJfd2luZG93cycgaW4gdGhhdCBzaXR1YXRp b24sIGFuZCB0aGF0IHNsb3dzIHVzIGRvd24uCiAgICAgIChpZiAobm90IChhbmQgKGVvYnApIChi b2xwKSkpCiAgICAgICAgKHNldHEgb3ZlcmxheS1hcnJvdy1wb3NpdGlvbiAoY29weS1tYXJrZXIg KGxpbmUtYmVnaW5uaW5nLXBvc2l0aW9uKSkpCiAgICAgICAgKHNldHEgb3ZlcmxheS1hcnJvdy1w b3NpdGlvbiBuaWwpKQogICAgICAod2hlbiB2ci10aW1lcgogICAgICAgIChzZXRxIHRpbWVyLWlk bGUtbGlzdCAoZGVscSB2ci10aW1lciB0aW1lci1pZGxlLWxpc3QpKQogICAgICAgIChzZXRxIHZy LXRpbWVyIG5pbCkpCiAgICAgICh1bmxlc3MgKG1lbXEgdGhpcy1jb21tYW5kICcobXdoZWVsLXNj cm9sbCkpCiAgICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCiAgICAgIChpZiBmb3Jj ZQogICAgICAgIChwcm9nbgogICAgICAgICAgKCstcGFyZW5zLWZuKQogICAgICAgICAgKG1jLWFj dGl2YXRlLWNyb3NzaGFpcnMgKHNlbGVjdGVkLXdpbmRvdykpKQogICAgICAgIChzZXRxIHZyLXRp bWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDAuNSBuaWwgIycrLXRpbWVyLWZuKSkpKSkpCgooZGVm aW5lLW1pbm9yLW1vZGUgKy1tb2RlCiJNaW5vciBtb2RlIGZvciBkaXNwbGF5aW5nIGEgaG9yaXpv bnRhbCBydWxlci4iCiAgOmluaXQtdmFsdWUgbmlsCiAgOmxpZ2h0ZXIgIiArIgogIDprZXltYXAg bmlsCiAgOmdsb2JhbCBuaWwKICA6Z3JvdXAgJystbW9kZQogIChjb25kCiAgICAoKy1tb2RlCiAg ICAgIChpZiBibGluay1jdXJzb3ItbW9kZQogICAgICAgIChibGluay1jdXJzb3ItbW9kZSAtMSkp CiAgICAgIChzZXRxIGNyb3NzaGFpcnMgdCkKICAgICAgOzs7IFJFTUlOREVSOiAgVGhlIHVzZXIg Y2FuIHN1cHByZXNzIGVpdGhlciBvciBib3RoIG9mIHRoZSBydWxlcnMuCiAgICAgIDs7IChzZXRx IGNyb3NzaGFpcnMtaG9yaXpvbnRhbC1ydWxlciBuaWwpCiAgICAgIDs7IChzZXRxIGNyb3NzaGFp cnMtdmVydGljYWwtcnVsZXIgbmlsKQogICAgICA7OzsgREVCVUdHSU5HOiAgVG8gZ2VuZXJhdGUg aGVscGZ1bCBtZXNzYWdlcyBvdXRwdXQgdG8gc3RkZXJyLgogICAgICA7OyAoc2V0cSBtYy1zdGRl cnIgbmlsKQogICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICcrLS1zYXZlZC1zdGF0ZSkg bmlsKQogICAgICA7OyBTYXZlIHRoZSBsb2NhbCB2YWx1ZXMgb2Ygc29tZSB2YXJpYWJsZXMsIHRv IGJlIHJlc3RvcmVkIGlmIHZsLW1vZGUgaXMgdHVybmVkIG9mZi4KICAgICAgKGRvbGlzdCAodmFy ICcoYnVmZmVyLWRpc3BsYXktdGFibGUKICAgICAgICAgICAgICAgICAgICAgZnJpbmdlLWluZGlj YXRvci1hbGlzdAogICAgICAgICAgICAgICAgICAgICB0YWItd2lkdGgKICAgICAgICAgICAgICAg ICAgICAgbGluZS1tb3ZlLXZpc3VhbAogICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1wYXJ0 aWFsLXdpZHRoLXdpbmRvd3MKICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtbGluZXMKICAg ICAgICAgICAgICAgICAgICAgd29yZC13cmFwKSkKICAgICAgICAod2hlbiAobG9jYWwtdmFyaWFi bGUtcCB2YXIpCiAgICAgICAgICAocHVzaCAoY29ucyB2YXIgKHN5bWJvbC12YWx1ZSB2YXIpKSAr LS1zYXZlZC1zdGF0ZSkpKQogICAgICAoc2V0cSBkaXNwbGF5LWxpbmUtbnVtYmVycyB0KQogICAg ICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQogICAgICAoc2V0 cS1sb2NhbCBoc2Nyb2xsLXN0ZXAgNSkKICAgICAgKHNldHEgYnVmZmVyLWRpc3BsYXktdGFibGUg Ky1idWZmZXItZGlzcGxheS10YWJsZSkKICAgICAgKHNldHEgdGFiLXdpZHRoIDQpCiAgICAgIChz ZXQgKG1ha2UtbG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpIHQpCiAgICAgIChzZXQg KG1ha2UtbG9jYWwtdmFyaWFibGUgJ3RydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cykgbmls KQogICAgICAoc2V0cSB0cnVuY2F0ZS1saW5lcyBuaWwpCiAgICAgIChzZXRxIHdvcmQtd3JhcCB0 KQogICAgICAoc2V0cSBpbmRpY2F0ZS1lbXB0eS1saW5lcyB0KQogICAgICAoc2V0cSBpbmRpY2F0 ZS1idWZmZXItYm91bmRhcmllcyAnbGVmdCkKICAgICAgKHNldHEgZnJpbmdlLWluZGljYXRvci1h bGlzdCAnKAogICAgICAgICh0cnVuY2F0aW9uIC4gKCstZnJpbmdlLWxlZnQtYXJyb3cgKy1mcmlu Z2UtcmlnaHQtYXJyb3cpKQogICAgICAgIChjb250aW51YXRpb24gLiAoKy1mcmluZ2UtbGVmdC1j dXJseS1hcnJvdyArLWJhY2tzbGFzaCkpCiAgICAgICAgKG92ZXJsYXktYXJyb3cgLiArLWZyaW5n ZS1yaWdodC10cmlhbmdsZSkKICAgICAgICAodXAgLiArLWZyaW5nZS11cC1hcnJvdykKICAgICAg ICAoZG93biAuICstZnJpbmdlLWRvd24tYXJyb3cpCiAgICAgICAgKHRvcCAuICstZnJpbmdlLXRv cC1sZWZ0LWFuZ2xlKQogICAgICAgIChib3R0b20gLiArLWZyaW5nZS1ib3R0b20tcmlnaHQtYW5n bGUpCiAgICAgICAgKHRvcC1ib3R0b20gLiAoKy1mcmluZ2UtbGVmdC1icmFja2V0CiAgICAgICAg ICAgICAgICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYnJhY2tldAogICAgICAgICAgICAgICAgICAg ICAgICstZnJpbmdlLXRvcC1yaWdodC1hbmdsZQogICAgICAgICAgICAgICAgICAgICAgICstZnJp bmdlLXRvcC1sZWZ0LWFuZ2xlKSkKICAgICAgICAoZW1wdHktbGluZSAuICstZnJpbmdlLWVtcHR5 LWxpbmUpCiAgICAgICAgKHVua25vd24gLiArLWZyaW5nZS1xdWVzdGlvbi1tYXJrKSkpCiAgICAg IDs7OyBSRU1BUCBERUZBVUxUIEJFSEFWSU9SIChpZiB0aGUgdXNlciB3YW50cyBzb21ldGhpbmcg ZGlmZmVyZW50KS4KICAgICAgKHNldHEgZnJpbmdlLWN1cnNvci1hbGlzdCAnKChib3ggLiArLWZy aW5nZS1sZWZ0LXRyaWFuZ2xlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhv bGxvdyAuICstaG9sbG93LXJlY3RhbmdsZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChiYXIgLiArLXZlcnRpY2FsLWJhcikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChoYmFyIC4gKy1mcmluZ2UtaG9yaXpvbnRhbC1iYXIpCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoaG9sbG93LXNtYWxsIC4gKy1mcmluZ2UtaG9sbG93LXNxdWFyZSkpKQog ICAgICAoc2V0cSBmaWxsLWNvbHVtbiA4MCkKICAgICAgKGFkZC1ob29rICdwb3N0LWNvbW1hbmQt aG9vayAnKy1kcmF3LWhvcml6b250YWwtcnVsZXIgJ2FwcGVuZCAnbG9jYWwpCiAgICAgIChhZGQt aG9vayAnd2luZG93LWNvbmZpZ3VyYXRpb24tY2hhbmdlLWhvb2sgJystcmVkcmF3LWZvcnRod2l0 aCBuaWwgJ2xvY2FsKQogICAgICA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AgICAgICAgICAgICAgKG1p biAoMSsgb3BvaW50KSAocG9pbnQtbWF4KSkpCiAgICAgICAgICAgICAoKG9yIDs7OyAoY2hhci10 by1zdHJpbmcgNDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKICAgICAgICAgICAgICAgICAgKD0g cHJlY2VkaW5nLWNoYXIgNDEpCiAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcg OTMpID0+IGNsb3Npbmcgc3F1YXJlIGJyYWNrZXQKICAgICAgICAgICAgICAgICAgKD0gcHJlY2Vk aW5nLWNoYXIgOTMpCiAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgMTI1KSA9 PiBjbG9zaW5nIHdhdnkgYnJhY2tldAogICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hh ciAxMjUpKQogICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWluKSAoMS0gb3BvaW50KSkpCiAg ICAgICAgICAgICAodAogICAgICAgICAgICAgICAgb3BvaW50KSkpCiAgICAgICAgIHBvczIKICAg ICAgICAgc2VsZWN0ZWQtZmFjZSkKICAgIChzYXZlLWV4Y3Vyc2lvbgogICAgICAoY29uZGl0aW9u LWNhc2UgbmlsCiAgICAgICAgKHdoaWxlIChzZXRxIHBvczEgKG50aCAxIChwYXJzZS1wYXJ0aWFs LXNleHAgZnJvbSBwb3MxKSkpCiAgICAgICAgICAoc2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEg MSkpCiAgICAgICAgICAoaWYgKD0gaSAxMCkKICAgICAgICAgICAgKHNldHEgaSAxKQogICAgICAg ICAgICAoaW5jZiBpKSkKICAgICAgICAgIChzZXRxIHNlbGVjdGVkLWZhY2UgKGNvbmQKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxKQogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJystcGFyZW5zLW9uZS1mYWNlKQogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJl bnMtdHdvLWZhY2UpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMykKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10aHJlZS1mYWNlKQogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDQpCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAnKy1wYXJlbnMtZm91ci1mYWNlKQogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICgoPSBpIDUpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtZml2ZS1mYWNlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDYp CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtc2l4LWZhY2UpCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1mYWNlKQogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICgoPSBpIDgpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn Ky1wYXJlbnMtZWlnaHQtZmFjZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0g aSA5KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLW5pbmUtZmFj ZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxMCkKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10ZW4tZmFjZSkpKQogICAgICAgICAgKGxl dCAoKG92IChtYWtlLW92ZXJsYXkgcG9zMSAoMSsgcG9zMSkpKSkKICAgICAgICAgICAgKG92ZXJs YXktcHV0IG92ICd3aW5kb3cgd2luKQogICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ug c2VsZWN0ZWQtZmFjZSkpCiAgICAgICAgICAod2hlbiBwb3MyCiAgICAgICAgICAgIChsZXQgKChv diAobWFrZS1vdmVybGF5ICgxLSBwb3MyKSBwb3MyKSkpCiAgICAgICAgICAgICAgKG92ZXJsYXkt cHV0IG92ICd3aW5kb3cgd2luKQogICAgICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBz ZWxlY3RlZC1mYWNlKSkpKQogICAgICAgIChlcnJvciBuaWwpKSkKICAgIChzZXRxICstcGFyZW5z LW92ZXJsYXlzLWV4aXN0LXAgdCkpKQoKKGRlZnVuICstcmVtb3ZlLW92ZXJsYXlzIChiZWcgZW5k IG5hbWUgdmFsKQoiUmVtb3ZlIHRoZSBvdmVybGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5n LXByb3BlcnRpZXNgLgpJbmNsdWRlcyBhIHVuaXF1ZSBzaXR1YXRpb24gd2hlbiBhbiBvdmVybGF5 IHdpdGggYW4gYCdhZnRlci1zdHJpbmdgIHByb3BlcnR5CmlzIGF0IHRoZSB2ZXJ5IGVuZCBvZiBh IG5hcnJvd2VkLWJ1ZmZlci4iCiAgKGxldCogKAogICAgICAocG9pbnQtbWF4IChwb2ludC1tYXgp KQogICAgICAocG9pbnQtbWluIChwb2ludC1taW4pKQogICAgICAobmFycm93ZWQtcCAoYnVmZmVy LW5hcnJvd2VkLXApKQogICAgICAoYmVnIChpZiBiZWcgYmVnIHBvaW50LW1pbikpCiAgICAgIChl bmQKICAgICAgICAoY29uZAogICAgICAgICAgKChhbmQKICAgICAgICAgICAgICAobm90IG5hcnJv d2VkLXApCiAgICAgICAgICAgICAgZW5kKQogICAgICAgICAgICBlbmQpCiAgICAgICAgICAoKGFu ZAogICAgICAgICAgICAgIChub3QgbmFycm93ZWQtcCkKICAgICAgICAgICAgICAobnVsbCBlbmQp KQogICAgICAgICAgICBwb2ludC1tYXgpCiAgICAgICAgICAoKGFuZAogICAgICAgICAgICAgIG5h cnJvd2VkLXAKICAgICAgICAgICAgICBlbmQKICAgICAgICAgICAgICAoPCBlbmQgcG9pbnQtbWF4 KSkKICAgICAgICAgICAgZW5kKQogICAgICAgICAgKChhbmQKICAgICAgICAgICAgICBuYXJyb3dl ZC1wCiAgICAgICAgICAgICAgZW5kCiAgICAgICAgICAgICAgKD0gZW5kIHBvaW50LW1heCkpCiAg ICAgICAgICAgICgxKyBlbmQpKQogICAgICAgICAgKChhbmQKICAgICAgICAgICAgICBuYXJyb3dl ZC1wCiAgICAgICAgICAgICAgKG51bGwgZW5kKSkKICAgICAgICAgICAgKDErIHBvaW50LW1heCkp ICkpCiAgICAgIChvdmVybGF5cwogICAgICAgIChwcm9nbgogICAgICAgICAgKG92ZXJsYXktcmVj ZW50ZXIgZW5kKQogICAgICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkgKQogICAgKHdoZW4g KGFuZCBiZWcgZW5kIG5hbWUgdmFsKQogICAgICAoZG9saXN0IChvIG92ZXJsYXlzKQogICAgICAg IChjb25kCiAgICAgICAgICAoKGFuZAogICAgICAgICAgICAgICAgKGVxIG5hbWUgJ2ZhY2UpCiAg ICAgICAgICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKICAgICAgICAgICAg OzsgRWl0aGVyIHB1c2ggdGhpcyBvdmVybGF5IG91dHNpZGUgYmVnLi4uZW5kCiAgICAgICAgICAg IDs7IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCiAgICAgICAgICAgIDs7IG9yIGRl bGV0ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCiAgICAg ICAgICAgIChpZiAoPCAob3ZlcmxheS1zdGFydCBvKSBiZWcpCiAgICAgICAgICAgICAgICAoaWYg KD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKICAgICAgICAgICAgICAocHJvZ24KICAgICAgICAgICAg ICAgIChtb3ZlLW92ZXJsYXkgKGNvcHktb3ZlcmxheSBvKQogICAgICAgICAgICAgICAgICAob3Zl cmxheS1zdGFydCBvKSBiZWcpCiAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChv dmVybGF5LWVuZCBvKSkpCiAgICAgICAgICAgICAgICAgIChtb3ZlLW92ZXJsYXkgbyAob3Zlcmxh eS1zdGFydCBvKSBiZWcpKQogICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5k KQogICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkK ICAgICAgICAgICAgICAgIChkZWxldGUtb3ZlcmxheSBvKSkpKQogICAgICAgICAgKChhbmQKICAg ICAgICAgICAgICAgIChub3QgKGVxIG5hbWUgJ2ZhY2UpKQogICAgICAgICAgICAgICAgKGVxdWFs LWluY2x1ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCiAgICAgICAg ICAgIChkZWxldGUtb3ZlcmxheSBvKSkpKSkpKQoKKGRlZnVuICstZGVsZXRlLXBhcmVucy1vdmVy bGF5cyAoKQogICh3aGVuICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAKICAgIChkb2xpc3QgKGZh Y2UgJygKICAgICAgICArLXBhcmVucy1vbmUtZmFjZQogICAgICAgICstcGFyZW5zLXR3by1mYWNl CiAgICAgICAgKy1wYXJlbnMtdGhyZWUtZmFjZQogICAgICAgICstcGFyZW5zLWZvdXItZmFjZQog ICAgICAgICstcGFyZW5zLWZpdmUtZmFjZQogICAgICAgICstcGFyZW5zLXNpeC1mYWNlCiAgICAg ICAgKy1wYXJlbnMtc2V2ZW4tZmFjZQogICAgICAgICstcGFyZW5zLWVpZ2h0LWZhY2UKICAgICAg ICArLXBhcmVucy1uaW5lLWZhY2UKICAgICAgICArLXB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ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7CgoocHJvdmlkZSAnY3Jvc3NoYWlycyk= --Multipart_Tue_Aug_28_23:39:25_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvZmFjZXMuZWwgYi9saXNwL2ZhY2VzLmVsCmluZGV4IDE4YjgyMWEu LjYxNDIwNWIgMTAwNjQ0Ci0tLSBhL2xpc3AvZmFjZXMuZWwKKysrIGIvbGlzcC9mYWNlcy5lbApA QCAtMjUwMiw2ICsyNTAyLDMzIEBAIHVud2FudGVkIGVmZmVjdHMuIgogICA6Z3JvdXAgJ2Jhc2lj LWZhY2VzCiAgIDpncm91cCAnZGlzcGxheS1saW5lLW51bWJlcnMpCiAKKworOzs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Cis7OzsgTXVsdGlwbGUgQ3Vyc29ycworCisoZGVmZmFjZSArLXZlcnRpY2Fs LWJhci1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJjeWFuIikpKQorICAiRmFjZSBmb3IgYCst dmVydGljYWwtYmFyLWZhY2UnLiAgVXNlZCBpbiBgeGRpc3AuYycuIgorICA6Z3JvdXAgJystbW9k ZSkKKworKGRlZmZhY2UgKy1ldmVuLW51bWJlcmVkLWNvbHVtbi1mYWNlCisgICcoKHQgKDpmb3Jl Z3JvdW5kICJ5ZWxsb3ciKSkpCisgICJGYWNlIGZvciBgKy1ldmVuLW51bWJlcmVkLWNvbHVtbi1m YWNlJy4gIFVzZWQgaW4gYHhkaXNwLmMnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNl ICstb2RkLW51bWJlcmVkLWNvbHVtbi1mYWNlCisgICcoKHQgKDpmb3J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2V0dXAgaXMgZG9uZSBpbiBiaW5kaW5ncy5lbCAqLworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGJzZXRfYmx2X21jX2dseXBoX2xpc3Qg KCZidWZmZXJfZGVmYXVsdHMsIFFuaWwpOworICBic2V0X2Jsdl9jcm9zc2hhaXJzICgmYnVmZmVy X2RlZmF1bHRzLCBRbmlsKTsKKyAgYnNldF9ibHZfY3Jvc3NoYWlyc19ob3Jpem9udGFsX3J1bGVy ICgmYnVmZmVyX2RlZmF1bHRzLCBRdCk7CisgIGJzZXRfYmx2X2Nyb3NzaGFpcnNfdmVydGljYWxf cnVsZXIgKCZidWZmZXJfZGVmYXVsdHMsIFF0KTsKKyAgYnNldF9ibHZfbWNfc3RkZXJyICgmYnVm ZmVyX2RlZmF1bHRzLCBRbmlsKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBi c2V0X21vZGVfbGluZV9mb3JtYXQgKCZidWZmZXJfZGVmYXVsdHMsIGJ1aWxkX3B1cmVfY19zdHJp bmcgKCIlLSIpKTsKICAgYnNldF9oZWFkZXJfbGluZV9mb3JtYXQgKCZidWZmZXJfZGVmYXVsdHMs IFFuaWwpOwogICBic2V0X2FiYnJldl9tb2RlICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKQEAg LTU0NDgsNiArNTQ3NiwxOSBAQCBzeW1zX29mX2J1ZmZlciAodm9pZCkKICAgc3RhdGljcHJvICgm UVNGdW5kYW1lbnRhbCk7CiAgIHN0YXRpY3BybyAoJlZidWZmZXJfYWxpc3QpOwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIERFRlNZTSAo UW1jX2dseXBoX2xpc3QsICJtYy1nbHlwaC1saXN0Iik7CisgIERFRlNZTSAoUWNyb3NzaGFpcnMs ICJjcm9zc2hhaXJzIik7CisgIERFRlNZTSAoUWNyb3NzaGFpcnNfaG9yaXpvbnRhbF9ydWxlciwg ImNyb3NzaGFpcnMtaG9yaXpvbnRhbC1ydWxlciIpOworICBERUZTWU0gKFFjcm9zc2hhaXJzX3Zl cnRpY2FsX3J1bGVyLCAiY3Jvc3NoYWlycy12ZXJ0aWNhbC1ydWxlciIpOworICBERUZTWU0gKFFt Y19zdGRlcnIsICJtYy1zdGRlcnIiKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICBERUZTWU0gKFFjaG9pY2UsICJjaG9pY2UiKTsKICAgREVGU1lNIChRbGVmdCwgImxlZnQiKTsK ICAgREVGU1lNIChRcmlnaHQsICJyaWdodCIpOwpAQCAtNTQ4NSw2ICs1NTI2LDI5IEBAIHN5bXNf b2ZfYnVmZmVyICh2b2lkKQogICBGcHV0IChRcHJvdGVjdGVkX2ZpZWxkLCBRZXJyb3JfbWVzc2Fn ZSwKIAlidWlsZF9wdXJlX2Nfc3RyaW5nICgiQXR0ZW1wdCB0byBtb2RpZnkgYSBwcm90ZWN0ZWQg ZmllbGQiKSk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgREVGVkFSX1BFUl9CVUZGRVIgKCJtYy1nbHlwaC1saXN0IiwgJkJWQVIgKGN1 cnJlbnRfYnVmZmVyLCBtY19nbHlwaF9saXN0KSwgUW5pbCwKKyAgICBkb2M6IC8qIEEgYnVmZXIt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RlYWN0aXZhdGUgZGVidWdnaW5nIG1lc3NhZ2VzIHRvIHN0ZGVyci4gKi8pOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIERFRlZBUl9QRVJfQlVGRkVSICgiaGVhZGVy LWxpbmUtZm9ybWF0IiwKIAkJICAgICAmQlZBUiAoY3VycmVudF9idWZmZXIsIGhlYWRlcl9saW5l X2Zvcm1hdCksCiAJCSAgICAgUW5pbCwKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuaCBiL3NyYy9i dWZmZXIuaAppbmRleCA4NWI1NjMxLi43ZTAzYmU0IDEwMDY0NAotLS0gYS9zcmMvYnVmZmVyLmgK KysrIGIvc3JjL2J1ZmZlci5oCkBAIC02NTgsNiArNjU4LDI4IEBAIHN0cnVjdCBidWZmZXIKICAg ICAgY2FjaGUgYXJlIGVuYWJsZWQuICBTZWUgc2VhcmNoLmMsIGluZGVudC5jIGFuZCBiaWRpLmMg Zm9yIGRldGFpbHMuICAqLwogICBMaXNwX09iamVjdCBjYWNoZV9sb25nX3NjYW5zXzsKIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAvKiBU aGUgbmFtZSBvZiBsaXN0IHVzZWQgYnkgbXVsdGlwbGUgY3Vyc29ycyBmb3IgbmV4dCByZWRpc3Bs YXkuICovCisgIExpc3BfT2JqZWN0IG1jX2dseXBoX2xpc3RfOworCisgIC8qIFRoZSBuYW1lIG9m IGxpc3QuICovCisgIExpc3BfT2JqZWN0IGNyb3NzaGFpcnNfOworCisgIC8qIFRoZSBuYW1lIG9m IHRoZSBjcm9zc2hhaXJzIGhvcml6b250YWwgcnVsZXIuICovCisgIExpc3BfT2JqZWN0IGNyb3Nz aGFpcnNfaG9yaXpvbnRhbF9ydWxlcl87CisKKyAgLyogVGhlIG5hbWUgb2YgdGhlIGNyb3NzaGFp cnMgdmVydGljYWwgcnVsZXIuICovCisgIExpc3BfT2JqZWN0IGNyb3NzaGFpcnNfdmVydGljYWxf cnVsZXJfOworCisgIC8qIFVzZWQgaW4gY29uanVuY3Rpb24gd2l0aCBnZW5lcmF0aW5nIHN0ZGVy ciBkZWJ1Z2dpbmcgbWVzc2FnZS4gKi8KKyAgTGlzcF9PYmplY3QgbWNfc3RkZXJyXzsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBJZiB0aGUgd2lkdGggcnVuIGNhY2hlIGlz IGVuYWJsZWQsIHRoaXMgdGFibGUgY29udGFpbnMgdGhlCiAgICAgIGNoYXJhY3RlciB3aWR0aHMg d2lkdGhfcnVuX2NhY2hlIChzZWUgYWJvdmUpIGFzc3VtZXMuICBXaGVuIHdlCiAgICAgIGRvIGEg dGhvcm91Z2ggcmVkaXNwbGF5LCB3ZSBjb21wYXJlIHRoaXMgYWdhaW5zdCB0aGUgYnVmZmVyJ3MK QEAgLTkxOCw2ICs5NDAsNDQgQEAgWEJVRkZFUiAoTGlzcF9PYmplY3QgYSkKIC8qIE1vc3QgY29k ZSBzaG91bGQgdXNlIHRoZXNlIGZ1bmN0aW9ucyB0byBzZXQgTGlzcCBmaWVsZHMgaW4gc3RydWN0 CiAgICBidWZmZXIuICAoU29tZSBzZXR0ZXJzIHRoYXQgYXJlIHByaXZhdGUgdG8gYSBzaW5nbGUg LmMgZmlsZSBhcmUKICAgIGRlZmluZWQgYXMgc3RhdGljIGluIHRob3NlIGZpbGVzLikgICovCisK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKK0lO TElORSB2b2lkCitic2V0X2Jsdl9tY19nbHlwaF9saXN0IChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNw X09iamVjdCB2YWwpCit7CisgIGItPm1jX2dseXBoX2xpc3RfID0gdmFsOworfQorCitJTkxJTkUg dm9pZAorYnNldF9ibHZfY3Jvc3NoYWlycyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3Qg dmFsKQoreworICBiLT5jcm9zc2hhaXJzXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRf Ymx2X2Nyb3NzaGFpcnNfaG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9P YmplY3QgdmFsKQoreworICBiLT5jcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXJfID0gdmFsOwor fQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlciAoc3Ry dWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hhaXJzX3ZlcnRp Y2FsX3J1bGVyXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2X21jX3N0ZGVyciAo c3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5tY19zdGRlcnJfID0g dmFsOworfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBJTkxJTkUgdm9pZAogYnNl dF9iaWRpX3BhcmFncmFwaF9kaXJlY3Rpb24gKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0 IHZhbCkKIHsKZGlmZiAtLWdpdCBhL3NyYy9kaXNwZXh0ZXJuLmggYi9zcmMvZGlzcGV4dGVybi5o CmluZGV4IDIxODBjOWEuLmYwYjEwYzUgMTAwNjQ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0IG1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hbmdsZV9iaXRzW10gPXsKKyAgMHg4MCwgMHg4 MCwgMHg4MCwgMHg5OCwgMHg4YywgMHg4NiwgMHhiZiwKKyAgMHhiZiwgMHg4NiwgMHg4YywgMHg5 OCwgMHg4MCwgMHg4MCwgMHg4MH07CisKKy8qIDI1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhh ZGVjaW1hbAorICAgICAgInh4eHh4eHh4IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4u Li54IgorICAgICAgInguLnh4Li54IgorICAgICAgInguLi54eC54IgorICAgICAgInguLi4ueHh4 IgorICAgICAgIngueHh4eHh4IgorICAgICAgIngueHh4eHh4IgorICAgICAgInguLi4ueHh4Igor ICAgICAgInguLi54eC54IgorICAgICAgInguLnh4Li54IgorICAgICAgInguLi4uLi54IgorICAg ICAgInguLi4uLi54IgorICAgICAgInh4eHh4eHh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hbmdsZV9iaXRzW10gPXsKKyAgMHhmZiwgMHg4 MSwgMHg4MSwgMHg5OSwgMHg4ZCwgMHg4NywgMHhiZiwKKyAgMHhiZiwgMHg4NywgMHg4ZCwgMHg5 OSwgMHg4MSwgMHg4MSwgMHhmZn07CisKKy8qIDI2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhh ZGVjaW1hbAorICAgICAgInh4eHh4eHh4IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4u Li54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54 IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54Igor ICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAg ICAgInguLi4uLi54IgorICAgICAgInh4eHh4eHh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfaG9sbG93X3JlY3RhbmdsZV9iaXRzW10gPXsKKyAgMHhmZiwgMHg4MSwgMHg4MSwgMHg4 MSwgMHg4MSwgMHg4MSwgMHg4MSwKKyAgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4 MSwgMHhmZn07CisKKy8qIDI3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAg InguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgIngu Li4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4u Li4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4u IgorICAgICAgInguLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGlj YWxfYmFyX2JpdHNbXSA9eworICAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAw eDgwLAorICAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwfTsKKworLyog MjgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHguLi4uLi4iCisg ICAgICAiLnh4Li4uLi4iCisgICAgICAiLi54eC4uLi4iCisgICAgICAiLi4ueHguLi4iCisgICAg ICAiLi4uLnh4Li4iCisgICAgICAiLi4uLi54eC4iCisgICAgICAiLi4uLi4ueHgiCisgICAgICAi Li4uLi54eC4iCisgICAgICAiLi4uLnh4Li4iCisgICAgICAiLi4ueHguLi4iCisgICAgICAiLi54 eC4uLi4iCisgICAgICAiLnh4Li4uLi4iCisgICAgICAieHguLi4uLi4iKQorKi8KK3N0YXRpYyB1 bnNpZ25lZCBzaG9ydCBtY19yaWdodF9hbmdsZV9iaXRzW10gPXsKKyAgMHhjMCwgMHg2MCwgMHgz MCwgMHgxOCwgMHhjLCAweDYsIDB4MywgMHg2LCAweGMsIDB4MTgsIDB4MzAsIDB4NjAsIDB4YzB9 OworCisvKiAyOQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4u Li4uLiIKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAgICAgICIueHguLi4u LiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIK KyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4ueHguLiIKKyAg ICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAg ICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2JhY2tzbGFzaF9iaXRz W10gPXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwgMHgxOCwgMHgxOCwg MHhjLCAweGMsIDB4NiwgMHg2LCAweDMsIDB4M307CisKKy8qIDMwCisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4uLi4uIgorICAg ICAgInh4eC4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAg IngueHguLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgIngu Li54eC4uIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4u eHguIgorICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwg MHhjMCwgMHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwgMHg4YywgMHg4Yywg MHg4NiwgMHg4NiwgMHg4MywgMHg4M307CisKKy8qIDMxCisgICAgKCstZnJpbmdlLWhlbHBlci1o ZXhhZGVjaW1hbAorICAgICAgIi54eHh4eHguIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4 eHgueC4uIgorICAgICAgInh4eHgueC4uIgorICAgICAgIi54eHgueC4uIgorICAgICAgIi4uLngu eC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4u IgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfcGlsY3Jvd19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwgMHhmNCwgMHhmNCwg MHg3NCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisKKy8qIDMyCisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54 eC54eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgu eHguIgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfcmlnaHRfZG91YmxlX2FuZ2xlX2JpdHNbXSA9eworICAweGQ4LCAweDZj LCAweDM2LCAweDFiLCAweDM2LCAweDZjLCAweGQ4fTsKKworLyogMzMKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54eHh4Li4iCisgICAgICAiLnh4eHh4eC4iCisg ICAgICAieC4ueHguLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieH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0sCiAgIHsgRlJCSVRTIChob3Jpem9udGFsX2Jhcl9iaXRzKSwg ICAgIDgsIDAsIEFMSUdOX0JJVE1BUF9CT1RUT00sIDAgfSwKICAgeyBGUkJJVFMgKGVtcHR5X2xp bmVfYml0cyksICAgICAgICAgOCwgMywgQUxJR05fQklUTUFQX1RPUCwgICAgMCB9LAorCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIC8qIDI0 ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYW5nbGVfYml0cyksICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI1ICovCisgIHsgRlJCSVRTICht Y19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2FuZ2xlX2JpdHMpLCA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCisgIC8qIDI2ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3dfcmVjdGFuZ2xl X2JpdHMpLCAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8q IDI3ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYml0cyksICAgICAgICAgICAgICAg ICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI4ICovCisgIHsgRlJCSVRT IChtY19yaWdodF9hbmdsZV9iaXRzKSwgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRN QVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI5ICovCisgIHsgRlJCSVRTIChtY19iYWNrc2xhc2hfYml0 cyksICAgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisg IC8qIDMwICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2JpdHMpLCAg ICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMxICovCisgIHsgRlJC SVRTIChtY19waWxjcm93X2JpdHMpLCAgICAgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9C SVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMyICovCisgIHsgRlJCSVRTIChtY19yaWdodF9kb3Vi bGVfYW5nbGVfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0s CisgIC8qIDMzICovCisgIHsgRlJCSVRTIChtY19zbWlsZXlfZmFjZV9iaXRzKSwgICAgICAgICAg ICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIH07CiAKICNkZWZpbmUgTk9fRlJJTkdFX0JJVE1BUCAwCkBAIC0xNzE1 LDYgKzE5NjksNzcgQEAgSWYgbmlsLCBhbHNvIGNvbnRpbnVlIGxpbmVzIHdoaWNoIGFyZSBleGFj dGx5IGFzIHdpZGUgYXMgdGhlIHdpbmRvdy4gICovKTsKICAgREVGVkFSX0xJU1AgKCJmcmluZ2Ut Yml0bWFwcyIsIFZmcmluZ2VfYml0bWFwcywKICAgICBkb2M6IC8qIExpc3Qgb2YgZnJpbmdlIGJp dG1hcCBzeW1ib2xzLiAgKi8pOwogICBWZnJpbmdlX2JpdG1hcHMgPSBRbmlsOworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIC8qIChnZXQg J2VtcHR5LWxpb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G1hcHMpOworICBG cHV0IChRbWNfc21pbGV5X2ZhY2UsIFFmcmluZ2UsIG1ha2VfbnVtYmVyICgzMykpOworICAvKiAo Z2V0ICcrLXNtaWxleS1mYWNlICdmcmluZ2UpID0+IDMzICovCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKIH0KIAogLyogR2FyYmFnZSBjb2xsZWN0aW9uIGhvb2sgKi8KZGlmZiAtLWdp dCBhL3NyYy9rZXlib2FyZC5jIGIvc3JjL2tleWJvYXJkLmMKaW5kZXggYWE1OGUyNi4uOGZkM2Fj OCAxMDA2NDQKLS0tIGEvc3JjL2tleWJvYXJkLmMKKysrIGIvc3JjL2tleWJvYXJkLmMKQEAgLTEy MjQsNiArMTIyNCwyOSBAQCBzdGF0aWMgaW50IHJlYWRfa2V5X3NlcXVlbmNlIChMaXNwX09iamVj dCAqLCBMaXNwX09iamVjdCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wsIGJv b2wsIGJvb2wsIGJvb2wpOwogc3RhdGljIHZvaWQgYWRqdXN0X3BvaW50X2Zvcl9wcm9wZXJ0eSAo cHRyZGlmZl90LCBib29sKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFIENVUlNPUlMgKi8KKworc3RhdGljIHZvaWQKK2tiZF9tY19hY3RpdmF0ZV9jdXJzb3JzICh2 b2lkKQoreworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93IChzZWxlY3Rl ZF93aW5kb3cpOworICB3LT5tYy5kcmF3X2dseXBoX2N1cnNvciA9IHRydWU7CisgIHctPm1jLmVy YXNlX2dseXBoX2N1cnNvciA9IHRydWU7Cit9CisKK3N0YXRpYyB2b2lkCitrYmRfbWNfYWN0aXZh dGVfY3Jvc3NoYWlycyAodm9pZCkKK3sKKyAgc3RydWN0IHdpbmRvdyAqdyA9IGRlY29kZV9saXZl X3dpbmRvdyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgdy0+bWMuZHJhd19jcm9zc2hhaXJzID0gdHJ1 ZTsKKyAgdy0+bWMuZXJhc2VfY3Jvc3NoYWlycyA9IHRydWU7Cit9CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIExpc3BfT2JqZWN0CiBjb21tYW5kX2xvb3BfMSAodm9pZCkKIHsKQEAg LTE0MTksNiArMTQ0MiwxNSBAQCBjb21tYW5kX2xvb3BfMSAodm9pZCkKICAgICAgIFZyZWFsX3Ro aXNfY29tbWFuZCA9IGNtZDsKICAgICAgIHNhZmVfcnVuX2hvb2tzIChRcHJlX2NvbW1hbmRfaG9v ayk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKKyAgICAgIGtiZF9tY19hY3RpdmF0ZV9jdXJzb3JzICgpOworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgICAgICBhbHJlYWR5X2FkanVzdGVkID0gMDsKIAogICAgICAgaWYgKE5J TFAgKFZ0aGlzX2NvbW1hbmQpKQpkaWZmIC0tZ2l0IGEvc3JjL25zdGVybS5tIGIvc3JjL25zdGVy bS5tCmluZGV4IGExNTY4NGQuLjI2MDI5MjAgMTAwNjQ0Ci0tLSBhL3NyYy9uc3Rlcm0ubQorKysg Yi9zcmMvbnN0ZXJtLm0KQEAgLTExODgsMTAgKzExODgsMTQgQEAgc3RhdGljIE5TUmVjdCBjb25z dHJhaW5fZnJhbWVfcmVjdChOU1JlY3QgZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKICAg ICB7CiAgICAgICBibG9ja19pbnB1dCAoKTsKIAotICAgICAgaWYgKGN1cnNvcl9vbl9wKQotCWRp c3BsYXlfYW5kX3NldF9jdXJzb3IgKHcsIDEsCi0JCQkJdy0+b3V0cHV0X2N1cnNvci5ocG9zLCB3 LT5vdXRwdXRfY3Vyc29yLnZwb3MsCi0JCQkJdy0+b3V0cHV0X2N1cnNvci54LCB3LT5vdXRwdXRf Y3Vyc29yLnkpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNP UlMgKi8KKworICAgICAgbWNfcG9ydGFsICh3LCBjdXJzb3Jfb25fcCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCiAKICAgICAgIGlmIChkcmF3X3dpbmRvd19mcmluZ2VzICh3LCAxKSkK IAl7CkBAIC0zMjA2LDggKzMyMTAsMjkgQEAgTm90ZSB0aGF0IENVUlNPUl9XSURUSCBpcyBtZWFu aW5nZnVsIG9ubHkgZm9yIChoKWJhciBjdXJzb3JzLgogCiAgIGlmICgocGh5c19jdXJzb3JfZ2x5 cGggPSBnZXRfcGh5c19jdXJzb3JfZ2x5cGggKHcpKSA9PSBOVUxMKQogICAgIHsKLSAgICAgIGlm IChnbHlwaF9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKLSAgICAgICAgICAmJiB3LT5w aHlzX2N1cnNvci5ocG9zID49IGdseXBoX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKio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X2FyZWFfd2lkdGg7CisgICAgICBpZiAoKGdseXBoX3Jvdy0+ZXhhY3Rfd2lu ZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgJiYgdy0+cGh5c19jdXJzb3IuaHBvcyA+PSBn bHlwaF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICB8fCBjdXJzb3JfaW5fZnJpbmdl X3ApCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgICAgewogICAgICAgICAg IGdseXBoX3Jvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gMTsKICAgICAgICAgICBkcmF3X2ZyaW5n ZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgMCk7CkBAIC0zMjQzLDE3ICszMjY4LDY4IEBAIE5vdGUg dGhhdCBDVVJTT1JfV0lEVEggaXMgbWVhbmluZ2Z1bCBvbmx5IGZvciAoaCliYXIgY3Vyc29ycy4K ICAgICAgIGggPSBjdXJzb3JfaGVpZ2h0OwogICAgIH0KIAotICByLm9yaWdpbi54ID0gZngsIHIu b3JpZ2luLnkgPSBmeTsKLSAgci5zaXplLmhlaWdodCA9IGg7CisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIHIub3JpZ2luLnggPSAody0+bWMu ZnggPiAwKQorICAgICAgICAgICAgICAgPyB3LT5tYy5meAorICAgICAgICAgICAgICAgOiBmeDsK KyAgci5vcmlnaW4ueSA9ICh3LT5tYy5meSA+IDApCisgICAgICAgICAgICAgICA/IHctPm1jLmZ5 CisgICAgICAgICAgICAgICA6IGZ5OworICByLnNpemUuaGVpZ2h0ID0gKHctPm1jLmggPiAwKQor ICAgICAgICAgICAgICAgICAgPyB3LT5tYy5oCisgICAgICAgICAgICAgICAgICA6IGg7CiAgIHIu c2l6ZS53aWR0aCA9IHctPnBoeXNfY3Vyc29yX3dpZHRoOwogCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAgIC8qIFByZXZlbnQgdGhlIGN1cnNvciBmcm9tIGJlaW5nIGRyYXduIG91dHNp ZGUgdGhlIHRleHQgYXJlYS4gICovCiAgIG5zX2NsaXBfdG9fcm93ICh3LCBnbHlwaF9yb3csIFRF WFRfQVJFQSwgTk8pOyAvKiBkbyBuc19mb2N1cyhmLCAmciwgMSk7IGlmIHJlbW92ZSAqLwogCiAK ICAgZmFjZSA9IEZBQ0VfRlJPTV9JRF9PUl9OVUxMIChmLCBwaHlzX2N1cnNvcl9nbHlwaC0+ZmFj ZV9pZCk7Ci0gIGlmIChmYWNlICYmIE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSkKLSAgICAgID09 IG5zX2luZGV4X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogRVhBTVBMRSBP RiBIT1cgVE8gTE9PSy1VUCBBIENPTE9SOgorICBlbnVtIGZhY2VfaWQgZmFjZV9pZCA9IGxvb2t1 cF9uYW1lZF9mYWNlIChmLCBpbnRlcm4gKCIrLXZlcnRpY2FsLWJhci1mYWNlIiksIHRydWUpOwor ICBzdHJ1Y3QgZmFjZSAqZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgZmFjZV9pZCk7CisgIE5TQ29s b3IgKmNvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAo ZmFjZSksIGYpOworKi8KKworICBpZiAody0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisg ICAgICB8fCB3LT5tYy5nbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTCisgICAgICB8fCB3LT5t Yy5nbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhfVEFCKQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0 IGJ1ZiA9IHctPmNvbnRlbnRzOworICAgICAgQ0hFQ0tfQlVGRkVSIChidWYpOworICAgICAgc3Ry dWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1Zik7CisgICAgICBib29sIHJlZ2lvbl9hY3RpdmVf cCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICBwdHJkaWZm X3QgcmVnaW9uX2JlZ2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lvbl9i ZWdpbm5pbmcgKCkpIDogLTE7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdpb25f YWN0aXZlX3ApID8gWElOVCAoRnJlZ2lvbl9lbmQgKCkpIDogLTE7CisgICAgICBib29sIHJlZ2lv bl9wID0gKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAmJiBQVCA+PSBy ZWdpb25fYmVnaW5uaW5nCisgICAgICAgICAgICAgICAgICAgICAgICYmIFBUIDwgcmVnaW9uX2Vu ZCk7CisgICAgICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogdy0+bWMucmVkIGdy ZWVuOiB3LT5tYy5ncmVlbiBibHVlOiB3LT5tYy5ibHVlIGFscGhhOiAxLjBdIHNldF07CisgICAg ICBpZiAocmVnaW9uX3ApCisgICAgICAgIGhvbGxvd19jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVk X2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBmKTsKKyAgICAgICAgZWxzZSBpZiAo ZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFN RV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKyAgICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9D VVJTT1JfQ09MT1IgKGYpOworICAgICAgLyogRklYTUU6ICBBZGQgYSBjb25kaXRpb24gZm9yIGBo b2xsb3dfY29sb3JgIGlmIHRoZSByZWdpb24gZm9yZWdyb3VuZCBpcyB0aGUKKyAgICAgIHNhbWUg YXMgdGhlIGRlZmF1bHQgYmFja2dyb3VuZCBhbmQgY2hvb3NlIGFuIGFwcHJvcHJpYXRlIGNvbG9y IGlmIHNvLiAqLworICAgIH0KKyAgZWxzZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQg KGZhY2UpCisgICAgICAgICAgID09IG5zX2luZGV4X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09MT1Ig KGYpLCBmKSkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIHsKICAgICAgIFtu c19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgZikgc2V0 XTsKICAgICAgIGhvbGxvd19jb2xvciA9IEZSQU1FX0NVUlNPUl9DT0xPUiAoZik7CkBAIC0zMzAw LDEwICszMzc2LDE5IEBAIE5vdGUgdGhhdCBDVVJTT1JfV0lEVEggaXMgbWVhbmluZ2Z1bCBvbmx5 IGZvciAoaCliYXIgY3Vyc29ycy4KICAgICB9CiAgIG5zX3VuZm9jdXMgKGYpOwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCiAgIC8qIGRyYXcg dGhlIGNoYXJhY3RlciB1bmRlciB0aGUgY3Vyc29yICovCi0gIGlmIChjdXJzb3JfdHlwZSAhPSBO T19DVVJTT1IpCisgIGlmIChjdXJzb3JfdHlwZSAhPSBOT19DVVJTT1IKKyAgICAgICYmIHctPm1j LmdseXBoX2ZsYXZvciAhPSBNQ19HTFlQSExFU1MKKyAgICAgICYmIHctPm1jLmdseXBoX2ZsYXZv ciAhPSBNQ19HTFlQSF9UQUIpCiAgICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhf cm93LCBEUkFXX0NVUlNPUik7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRl ZiBOU19JTVBMX0NPQ09BCiAgIE5TRW5hYmxlU2NyZWVuVXBkYXRlcyAoKTsKICNlbmRpZgpkaWZm IC0tZ2l0IGEvc3JjL3czMnRlcm0uYyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggZmYwZDJiZi4uODQw MDQyNiAxMDA2NDQKLS0tIGEvc3JjL3czMnRlcm0uYworKysgYi9zcmMvdzMydGVybS5jCkBAIC03 MDUsMTAgKzcwNSwxNCBAQCB4X3VwZGF0ZV93aW5kb3dfZW5kIChzdHJ1Y3Qgd2luZG93ICp3LCBi b29sIGN1cnNvcl9vbl9wLAogICAgIHsKICAgICAgIGJsb2NrX2lucHV0ICgpOwogCi0gICAgICBp ZiAoY3Vyc29yX29uX3ApCi0JZGlzcGxheV9hbmRfc2V0X2N1cnNvciAodywgdHJ1ZSwKLQkJCQl3 LT5vdXRwdXRfY3Vyc29yLmhwb3MsIHctPm91dHB1dF9jdXJzb3IudnBvcywKLQkJCQl3LT5vdXRw dXRfY3Vyc29yLngsIHctPm91dHB1dF9jdXJzb3IueSk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBtY19wb3J0YWwgKHcsIGN1cnNv cl9vbl9wKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogICAgICAgaWYgKGRyYXdf d2luZG93X2ZyaW5nZXMgKHcsIHRydWUpKQogCXsKQEAgLTk3Myw3ICs5NzcsMTMgQEAgc3RhdGlj IHZvaWQgdzMyX2RyYXdfYm94X3JlY3QgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKiwgaW50LCBpbnQs IGludCwgaW50LAogc3RhdGljIHZvaWQKIHhfc2V0X2N1cnNvcl9nYyAoc3RydWN0IGdseXBoX3N0 cmluZyAqcykKIHsKLSAgaWYgKHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBzdHJ1Y3Qg d2luZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93IChzZWxlY3RlZF93aW5kb3cpOworICBpZiAo KHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmJhY2tncm91 bmQgPT0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmZv cmVncm91bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKICAgICAgIC8qIFNvbWV0 aW1lcyB3ZSBhcmUgbm90IGNhbGxlZCBmb3IgZWFjaCBjaGFuZ2UgaW4gdGhlIGRlZmF1bHQKQEAg LTk4MSw2ICs5OTEsMTEgQEAgeF9zZXRfY3Vyc29yX2djIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpz KQogCSB0ZXN0IGluIHRoZSBuZXh0IGxpbmUgZ2l2ZXMgdXMgYSBjaGFuY2UgdG8gcmVzeW5jLiAg Ki8KICAgICAgICYmIHMtPmYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djLT5mb3JlZ3JvdW5k ID09IHMtPmZhY2UtPmJhY2tncm91bmQKICAgICAgICYmICFzLT5jbXApCisgICAgICB8fCB3LT5t Yy5jdXJzb3JfZ2NfZGVmYXVsdCkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAg IHMtPmdjID0gcy0+Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2M7CiAgIGVsc2UKICAgICB7 CkBAIC01NjkwLDYgKzU3MDUsMjYgQEAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHN0cnVjdCB3aW5k b3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdykKIAogICAvKiBDb21wdXRlIGZyYW1lLXJlbGF0 aXZlIGNvb3JkaW5hdGVzIGZvciBwaHlzIGN1cnNvci4gICovCiAgIGdldF9waHlzX2N1cnNvcl9n ZW9tZXRyeSAodywgcm93LCBjdXJzb3JfZ2x5cGgsICZsZWZ0LCAmdG9wLCAmaCk7CisKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VO RDoKKworLSAgdG9wIHkgPT0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKwor LSAgYm90dG9tIHkgPT0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ct PmhlaWdodAorCistICBoIG9mIEhPTExPV19CT1hfQ1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBb VGhpcyBhdm9pZHMgYSB2aXNpYmxlIGdhcCBhYm92ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1j LmggPiAwKQorICAgIGggPSByb3ctPmhlaWdodDsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICByZWN0LmxlZnQgPSBsZWZ0OwogICAvKiBXaGVuIG9uIFIyTCBjaGFyYWN0ZXIsIHNo b3cgY3Vyc29yIGF0IHRoZSByaWdodCBlZGdlIG9mIHRoZQogICAgICBnbHlwaCwgdW5sZXNzIHRo ZSBjdXJzb3IgYm94IGlzIGFzIHdpZGUgYXMgdGhlIGdseXBoIG9yIHdpZGVyCkBAIC01NzUzLDcg KzU3ODgsMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBn bHlwaF9yb3cgKnJvdywKIAkgaW52aXNpYmxlLiAgVXNlIHRoZSBnbHlwaCdzIGZvcmVncm91bmQg Y29sb3IgaW5zdGVhZCBpbiB0aGlzCiAJIGNhc2UsIG9uIHRoZSBhc3N1bXB0aW9uIHRoYXQgdGhl IGdseXBoJ3MgY29sb3JzIGFyZSBjaG9zZW4gc28KIAkgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJs ZS4gICovCi0gICAgICBpZiAoZmFjZS0+YmFja2dyb3VuZCA9PSBjdXJzb3JfY29sb3IpCisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAg IGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGN1cnNvcl9jb2xvcgorICAgICAgICAgICYmICF3LT5t Yy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkpCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIAljdXJzb3JfY29sb3IgPSBmYWNlLT5mb3JlZ3JvdW5kOwogCiAgICAgICB4ID0gV0lORE9X X1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgdy0+cGh5c19jdXJzb3IueCk7CkBAIC01Nzc0LDYg KzU4MTksMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBn bHlwaF9yb3cgKnJvdywKIAkgIGlmICgoY3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEp ICE9IDApCiAJICAgIHggKz0gY3Vyc29yX2dseXBoLT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAg LyogQWxpZ24gYWxsIGZha2UgQkFSX0NVUlNPUiBvZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBg b3BvaW50X3gnLiAqLworICAgIGlmICh3LT5tYy5meCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIHczMl9maWxsX2FyZWEgKGYsIGhk YywgY3Vyc29yX2NvbG9yLCB4LAogCQkJIFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB3LT5w aHlzX2N1cnNvci55KSwKIAkJCSB3aWR0aCwgcm93LT5oZWlnaHQpO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NhdGUgKG1ha2VfZmxvYXQgKHRlcm1fcmVkKSwgUW5pbCkpOworICBpbnQgaW50X2dy ZWVuID0gWElOVCAoRnRydW5jYXRlIChtYWtlX2Zsb2F0ICh0ZXJtX2dyZWVuKSwgUW5pbCkpOzsK KyAgaW50IGludF9ibHVlID0gWElOVCAoRnRydW5jYXRlIChtYWtlX2Zsb2F0ICh0ZXJtX2JsdWUp LCBRbmlsKSk7OworICBDT0xPUlJFRiBjb2xvcl9waXhlbCA9IFBBTEVUVEVSR0IgKGludF9yZWQs IGludF9ncmVlbiwgaW50X2JsdWUpOworICBzd2l0Y2ggKGN1cnNvcl90eXBlKQorICB7CisgICAg Y2FzZSBIT0xMT1dfQk9YX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAg JiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsKKyAgICAg ICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3Bp eGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBj b2xvcl9waXhlbDsKKyAgICAgICAgICB4X2RyYXdfaG9sbG93X2N1cnNvciAodywgZ2x5cGhfcm93 KTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFs X2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3 X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jvdyk7CisgICAgICBicmVhazsKKyAgICB9CisgICAg Y2FzZSBGSUxMRURfQk9YX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAg JiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsKK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hdWx0ID0gdHJ1ZTsKKyAgICAgICAgICBkcmF3 X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsKKyAgICAgICAg ICB3LT5tYy5jdXJzb3JfZ2NfZGVmYXVsdCA9IGZhbHNlOworICAgICAgICAgIGdjX3ZhbHVlcy5m b250ID0gRlJBTUVfRk9OVCAoZik7CisgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBm cmFtZV9iZ19waXhlbDsKKyAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IG9yaWdpbmFs X2N1cnNvcl9waXhlbDsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYwor ICAgICAgICAgICAgPSBYQ3JlYXRlR0MgKE5VTEwsIEZSQU1FX1czMl9XSU5ET1cgKGYpLCBtYXNr LCAmZ2NfdmFsdWVzKTsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICB9Cisg ICAgICAgIGVsc2UKKyAgICAgICAgICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9y b3csIERSQVdfQ1VSU09SKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIEJBUl9DVVJT T1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAm JiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkg aGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAg IGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAg ICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2Ry YXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOwor ICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IGZhbHNlOworICAgICAg ICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3Bp eGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNv ciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgYnJlYWs7 CisgICAgfQorICAgIGNhc2UgSEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJl ZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICB7 CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3Bp eGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9v a2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBj dXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52 aXNpYmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNv cl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNl CisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRo LCBIQkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBOT19DVVJTT1I6 CisgICAgICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7CisgICAgICBicmVhazsKKyAgICBkZWZh dWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KIAotCWNhc2UgSEJBUl9DVVJTT1I6Ci0J ICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VS U09SKTsKLQkgIGJyZWFrOworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLwogCi0JY2FzZSBOT19DVVJTT1I6Ci0JICB3LT5waHlzX2N1cnNvcl93aWR0 aCA9IDA7Ci0JICBicmVhazsKIAotCWRlZmF1bHQ6Ci0JICBlbWFjc19hYm9ydCAoKTsKLQl9CiAg ICAgfQogfQogCmRpZmYgLS1naXQgYS9zcmMvd2luZG93LmMgYi9zcmMvd2luZG93LmMKaW5kZXgg NDIyYjA2YS4uNmYzZTU5ZCAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5jCisrKyBiL3NyYy93aW5k b3cuYwpAQCAtNjgxMCw2ICs2ODEwLDI5IEBAIGdldF9waHlzX2N1cnNvcl9nbHlwaCAoc3RydWN0 IHdpbmRvdyAqdykKICAgc3RydWN0IGdseXBoICpnbHlwaDsKICAgaW50IGhwb3MgPSB3LT5waHlz X2N1cnNvci5ocG9zOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisvKiBUaGlzIG1vZGlmaWNhdGlvbiBlbmFibGVzIHBsYW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ioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYg KCEody0+cGh5c19jdXJzb3IudnBvcyA+PSAwCiAJJiYgdy0+cGh5c19jdXJzb3IudnBvcyA8IHct PmN1cnJlbnRfbWF0cml4LT5ucm93cykpCiAgICAgcmV0dXJuIE5VTEw7CmRpZmYgLS1naXQgYS9z cmMvd2luZG93LmggYi9zcmMvd2luZG93LmgKaW5kZXggMDEzMDgzZS4uOTU4ZWNlZiAxMDA2NDQK LS0tIGEvc3JjL3dpbmRvdy5oCisrKyBiL3NyYy93aW5kb3cuaApAQCAtNzYsNiArNzYsNTAgQEAg b25lIGFuZCB0aGUgc2FtZSwgc28gaXRzIHByZXYgYW5kIG5leHQgbWVtYmVycyBhcmUgbmlsLgog CiBBIGRlYWQgd2luZG93IGhhcyBpdHMgY29udGVudHMgZmllbGQgc2V0IHRvIG5pbC4gICovCiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JTICov CisKKy8qIFN1ZmZpeGVzIGZvciB0aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBwcmVmaXguICovCitz dHJ1Y3QgbXVsdGlwbGVfY3Vyc29ycworeworICAvKiBWYWx1ZXMgZm9yIHByZXZpb3VzIGFuZCBj dXJyZW50IGB3aW5kb3ctc3RhcnQnIGFuZCBgd2luZG93LWVuZCcuICovCisgIEVNQUNTX0lOVCBj dXJyZW50X3N0YXJ0LCBjdXJyZW50X2VuZCwgcHJldmlvdXNfc3RhcnQsIHByZXZpb3VzX2VuZCwg Y3VycmVudF94LCBwcmV2aW91c194OworCisgIC8qIFRydWUgbWVhbnMgdG8gZm9yY2UgYHhfc2V0 X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNv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Bjb2xvcnMuICovCisgIGRvdWJsZSByZWQsIGdyZWVuLCBibHVlOworCisgIC8qIFBpeGVs IHBvc2l0aW9uICh3aW5kb3cgcmVsYXRpdmUpIG9mIGhvcml6b250YWwvdmVydGljYWwgcnVsZXJz LiAqLworICBpbnQgZngsIGZ5LCBoOworfTsKKworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8K Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIHN0cnVjdCBjdXJzb3JfcG9zCiB7CiAgIC8q IFBpeGVsIHBvc2l0aW9uLiAgVGhlc2UgYXJlIGFsd2F5cyB3aW5kb3cgcmVsYXRpdmUuICAqLwpA QCAtMTgxLDYgKzIyNSwyMiBAQCBzdHJ1Y3Qgd2luZG93CiAgICAgLyogVGhlIGhlbHAgZWNobyB0 ZXh0IGZvciB0aGlzIHdpbmRvdy4gIFFuaWwgaWYgdGhlcmUncyBub25lLiAgKi8KICAgICBMaXNw X09iamVjdCBtb2RlX2xpbmVfaGVscF9lY2hvOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogVGhlIGNhY2hlIGZvciBtdWx0aXBs ZSBnbHlwaCBjdXJzb3JzLiAgRm9yIGFuIGV4YW1wbGUgb2YgdGhlIHN0cnVjdHVyZSBvZgorICAg IHRoZSBsaXN0LCBzZWUgdGhlIGNvbW1lbnRzIGF0IHRoZSBiZWdpbm5pbmcgb2YgYG1jX2NhbGMn IGluIHhkaXNwLmMuICAqLworICAgIExpc3BfT2JqZWN0IG11bHRpcGxlX2N1cnNvcnNfY2FjaGU7 CisKKyAgICAvKiBUaGUgY2FjaGUgZm9yIG11bHRpcGxlIGdseXBoL2dseXBobGVzcyBjdXJzb3Jz IHRoYXQgZm9ybSBjcm9zc2hhaXJzLiAgRm9yIGFuCisgICAgZXhhbXBsZSBvZiB0aGUgc3RydWN0 dXJlIG9mIHRoZSBsaXN0LCBzZWUgdGhlIGNvbW1lbnRzIGF0IHRoZSBiZWdpbm5pbmcgb2YKKyAg ICBgbWNfY3Jvc3NoYWlycycgaW4geGRpc3AuYy4gICovCisgICAgTGlzcF9PYmplY3QgY3Jvc3No YWlyc19jYWNoZTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIC8qIE5vIExp c3AgZGF0YSBtYXkgZm9sbG93IGJlbG93IHRoaXMgcG9pbnQgd2l0aG91dCBjaGFuZ2luZwogICAg ICAgIG1hcmtfb2JqZWN0IGluIGFsbG9jLmMuICBUaGUgbWVtYmVyIGN1cnJlbnRfbWF0cml4IG11 c3QgYmUgdGhlCiAgICAgICAgZmlyc3Qgbm9uLUxpc3AgbWVtYmVyLiAgKi8KQEAgLTI4Myw2ICsz NDMsMTYgQEAgc3RydWN0IHdpbmRvdwogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAv KiBUaGUgcHJlZml4IGZvciB3aW5kb3cgcG9pbnRlcnMgcmVsYXRpbmcgdG8gbXVsdGlwbGUgY3Vy c29ycy4gICovCisgICAgc3RydWN0IG11bHRpcGxlX2N1cnNvcnMgbWM7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgICAvKiBDdXJzb3IgdHlwZSBvZiBsYXN0IGN1cnNvciBkcmF3 biBvbiB0aGUgd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WFibGVfbGlzdDsKKyAgICAgICAgICAgQ09OU1AgKHZsaXN0KTsKKyAgICAgICAg ICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVj dCB2YXIgPSBYQ0FSICh2bGlzdCk7CisgICAgICAgICAgTGlzcF9PYmplY3QgdmFsOworICAgICAg ICAgIGlmICghU1lNQk9MUCAodmFyKSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAg IHZhbCA9IGZpbmRfc3ltYm9sX3ZhbHVlICh2YXIpOworICAgICAgICAgIGlmICh2YWwgPSBGZ2V0 ICh2YXIsIFFvdmVybGF5X2Fycm93X2JpdG1hcCksIFNZTUJPTFAgKHZhbCkpCisgICAgICAgICAg ICBmcmluZ2VfYml0bWFwID0gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKHZhbCk7CisgICAgICAgIH0K KyAgICAgIGdseXBoX3Jvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgPSAoY3Vyc29yX3R5cGUgIT0g Tk9fQ1VSU09SKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJp bmdlX2JpdG1hcCAvKiBsb29rdXBfZnJpbmdlX2JpdG1hcCAoZmxhdm9yKSAqLworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAg IGRyYXdfZnJpbmdlX2JpdG1hcCAodywgZ2x5cGhfcm93LCB0cnVlKTsKKyAgICAgIC8qIG9wdGlt aXphdGlvbiAzOiAgRFJBVyB0aGUgYG92ZXJsYXktYXJyb3ctYml0bWFwJyBpZiB0aGVyZSBpcyBh IG1hcmtlci4gKi8KKyAgICAgIGlmIChNQVJLRVJQIChtYXJrZXIpCisgICAgICAgICAgJiYgWE1B UktFUiAobWFya2VyKS0+YnVmZmVyCisgICAgICAgICAgJiYgQlVGRkVSX0xJVkVfUCAoWE1BUktF UiAobWFya2VyKS0+YnVmZmVyKSkKKyAgICAgICAgeworICAgICAgICAgIGdseXBoX3Jvdy0+b3Zl cmxheV9hcnJvd19iaXRtYXAgPSBmcmluZ2VfYml0bWFwOworICAgICAgICAgIGRyYXdfZnJpbmdl X2JpdG1hcCAodywgZ2x5cGhfcm93LCB0cnVlKTsKKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNl IGlmIChmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BTkdMRQorICAgICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisgICAgICAgICAgICAgfHwgZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BTkdMRQorICAgICAgICAgICAgIHx8IGZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElD QUxfQkFSX0JBQ0tTTEFTSCkKKyAgICAgIHsKKyAgICAgICAgTGlzcF9PYmplY3QgYml0bWFwX2Zs YXZvciA9IChmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BTkdMRSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGVfcmln aHRfYW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGZsYXZvciA9 PSBNQ19IT0xMT1dfUkVDVEFOR0xFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FOR0xFKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRf YW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g UW1jX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsKKyAgICAgICAgZnJpbmdlX2JpdG1h cCA9IChjdXJzb3JfdHlwZSAhPSBOT19DVVJTT1IpCisgICAgICAgICAgICAgICAgICAgICAgICA/ IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQorICAgICAgICAgICAgICAgICAg ICAgICAgOiBOT19GUklOR0VfQklUTUFQOworICAgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBl ICE9IE5PX0NVUlNPUikKKyAgICAgICAgICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistdmVydGljYWwtYmFyLWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAg ICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICBnbHlwaF9yb3ctPmN1cnNvcl9pbl9mcmlu Z2VfcCA9IGZhbHNlOworICAgICAgICBnbHlwaF9yb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNf cCA9IDA7CisgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9i aXRtYXA7CisgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQgPSBmYWNlX2lk OworICAgICAgICBnbHlwaF9yb3ctPnJpZ2h0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICBk cmF3X2ZyaW5nZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgZmFsc2UpOworICAgICAgfQorICAgICAg ZWxzZSBpZiAoZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0g TUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfR0xZUEhfVEFCKQor ICAgICAgICB7CisgICAgICAgICAgdy0+bWMuaCA9IGg7CisgICAgICAgICAgdy0+bWMuZnggPSBm eDsKKyAgICAgICAgICB3LT5tYy5meSA9IGZ5OworICAgICAgICAgIHctPm1jLmdseXBoX2ZsYXZv ciA9IGZsYXZvcjsKKyAgICAgICAgICB3LT5tYy5yZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAoY29s b3JfdmVjdG9yLCAwKSk7CisgICAgICAgICAgdy0+bWMuZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJF RiAoY29sb3JfdmVjdG9yLCAxKSk7CisgICAgICAgICAgdy0+bWMuYmx1ZSA9IFhGTE9BVF9EQVRB IChBUkVGIChjb2xvcl92ZWN0b3IsIDIpKTsKKyAgICAgICAgICAvKiBTb21lIG9mIHRoZXNlIHZh bHVlcyBjb21lIHRocm91Z2ggYXMgMS4wMDM5MDYsIHdoaWNoIGNhdXNlcyBhIGJyZWFrYWdlCisg ICAgICAgICAgb2YgdGhlIGNvbG9ycyBpbiB0aGF0IG11bHRpcGxpY2F0aW9uIGJ5IHRoZSBiYXNl IHdpbGwgZXhjZWVkIHRoZSBiYXNlLiAqLworICAgICAgICAgIGlmICh3LT5tYy5yZWQgPiAxLjAp CisgICAgICAgICAgICB3LT5tYy5yZWQgPSAxLjA7CisgICAgICAgICAgaWYgKHctPm1jLmdyZWVu ID4gMS4wKQorICAgICAgICAgICAgdy0+bWMuZ3JlZW4gPSAxLjA7CisgICAgICAgIC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c3BfU3RyaW5nKQorICAgIHN0ciA9IFNTREFUQSAoYXJnKTsK KyAgZWxzZSBpZiAoWFRZUEUgKGFyZykgPT0gTGlzcF9TeW1ib2wpCisgICAgc3RyID0gU1NEQVRB IChTWU1CT0xfTkFNRSAoYXJnKSk7CisgIGVsc2UgcmV0dXJuIC0xOworICBpZiAoIXN0cmNtcCAo c3RyLCAiYm94IikpCisgICAgcmV0dXJuIEZJTExFRF9CT1hfQ1VSU09SOworICBpZiAoIXN0cmNt cCAoc3RyLCAiaG9sbG93IikpCisgICAgcmV0dXJuIEhPTExPV19CT1hfQ1VSU09SOworICBpZiAo IXN0cmNtcCAoc3RyLCAiaGJhciIpKQorICAgIHJldHVybiBIQkFSX0NVUlNPUjsKKyAgaWYgKCFz dHJjbXAgKHN0ciwgImJhciIpKQorICAgIHJldHVybiBCQVJfQ1VSU09SOworICBpZiAoIXN0cmNt cCAoc3RyLCAibm8iKSkKKyAgICByZXR1cm4gTk9fQ1VSU09SOworICByZXR1cm4gLTE7Cit9CisK K3N0YXRpYyBMaXNwX09iamVjdAorbWNfY3Vyc29yX3R5cGVfdG9fbGlzcCAoaW50IGFyZykKK3sK KyAgc3dpdGNoIChhcmcpCisgICAgeworICAgIGNhc2UgRklMTEVEX0JPWF9DVVJTT1I6IHJldHVy biBRYm94OworICAgIGNhc2UgSE9MTE9XX0JPWF9DVVJTT1I6IHJldHVybiBRaG9sbG93OworICAg IGNhc2UgSEJBUl9DVVJTT1I6IHJldHVybiBRaGJhcjsKKyAgICBjYXNlIEJBUl9DVVJTT1I6IHJl dHVybiBRYmFyOworICAgIGNhc2UgTk9fQ1VSU09SOgorICAgIGRlZmF1bHQ6IHJldHVybiBpbnRl cm4gKCJubyIpOworICAgIH0KK30KKworc3RhdGljIExpc3BfT2JqZWN0CittY19jb2xvcl92ZWN0 b3JfY2FsYyAoc3RydWN0IHdpbmRvdyAqdywgTGlzcF9PYmplY3QgY29sb3IpCit7CisgIENIRUNL X1NUUklORyAoY29sb3IpOworICBMaXNwX09iamVjdCB0YXJnZXRfZnJhbWUgPSB3LT5mcmFtZTsK KyAgTGlzcF9PYmplY3QgY29sb3JfdmFsdWVzOworICBkb3VibGUgdmFsbWF4ID0gWElOVCAoWENB UiAoRnh3X2NvbG9yX3ZhbHVlcyAoYnVpbGRfc3RyaW5nICgiI2ZmZmZmZiIpLCB0YXJnZXRfZnJh bWUpKSk7CisgIExpc3BfT2JqZWN0IHZsaXN0OworICBwdHJkaWZmX3QgeDsKKyAgaW50IGkgPSAw OworICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgdmVjdG9yID0gKEZt YWtlX3ZlY3RvciAobWFrZV9udW1iZXIgKDMpLCBRbmlsKSk7CisgIGlmICghTklMUCAoRm1lbXEg KChGZnJhbWVwICh0YXJnZXRfZnJhbWUpKSwgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIGludGVy biAoIngiKSwgaW50ZXJuICgidzMyIiksIGludGVybiAoIm5zIikpKSkpCisgICAgeworICAgICAg Y29sb3JfdmFsdWVzID0gKEZ4d19jb2xvcl92YWx1ZXMgKGNvbG9yLCB0YXJnZXRfZnJhbWUpKTsK KyAgICAgIGZvciAodmxpc3QgPSBjb2xvcl92YWx1ZXM7CisgICAgICAgICAgIENPTlNQICh2bGlz dCk7CisgICAgICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgICAgICB7CisgICAgICAg ICAgeCA9IFhJTlQgKFhDQVIgKHZsaXN0KSk7CisgICAgICAgICAgdGVtcCA9IG1ha2VfZmxvYXQg KHggLyB2YWxtYXgpOworICAgICAgICAgIEFTRVQgKHZlY3RvciwgaSwgdGVtcCk7CisgICAgICAg ICAgaSA9IGkgKyAxOworICAgICAgICB9CisgICAgfQorICByZXR1cm4gdmVjdG9yOworfQorCisv KiBZb3Ugb25seSBuZWVkIHRvIGNhbGwgbG9va3VwX2Jhc2ljX2ZhY2UgaWYgaXQuZmFjZV9pZCBp cyBh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gKi8KKyAgICAgICAgICB8 fCBmYWNlX2lkID09IE1PREVfTElORV9JTkFDVElWRV9GQUNFX0lEIC8qIFFtb2RlX2xpbmVfaW5h Y3RpdmUgKi8KKyAgICAgICAgICB8fCBmYWNlX2lkID09IEhFQURFUl9MSU5FX0ZBQ0VfSUQgLyog UWhlYWRlcl9saW5lICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBUT09MX0JBUl9GQUNFX0lE IC8qIFF0b29sX2JhciAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gRlJJTkdFX0ZBQ0VfSUQg LyogUWZyaW5nZSAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gU0NST0xMX0JBUl9GQUNFX0lE IC8qIFFzY3JvbGxfYmFyICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBCT1JERVJfRkFDRV9J RCAvKiBRYm9yZGVyICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBDVVJTT1JfRkFDRV9JRCAv KiBRY3Vyc29yICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBNT1VTRV9GQUNFX0lEIC8qIFFt b3VzZSAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gTUVOVV9GQUNFX0lEIC8qIFFtZW51ICov CisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBXSU5ET1dfRElWSURFUl9GQUNFX0lEIC8qIFF3aW5k b3dfZGl2aWRlciAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gV0lORE9XX0RJVklERVJfRklS U1RfUElYRUxfRkFDRV9JRCAvKiBRd2luZG93X2RpdmlkZXJfZmlyc3RfcGl4ZWwgKi8KKyAgICAg ICAgICB8fCBmYWNlX2lkID09IFdJTkRPV19ESVZJREVSX0xBU1RfUElYRUxfRkFDRV9JRCAvKiBR d2luZG93X2RpdmlkZXJfbGFzdF9waXhlbCAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gVkVS VElDQUxfQk9SREVSX0ZBQ0VfSUQgLy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CisgICAgSVRfQ0hBUlBPUyAoJWQpXG5c CisgICAgdy0+aHNjcm9sbCAoJWQpXG5cCisgICAgdy0+bWluX2hzY3JvbGwgKCVkKVxuXAorICAg IGhzY2xfdGVtcG9yYXJ5ICglcylcblwKKyAgICBoc2NsX3Blcm1hbmVudCAoJXMpXG5cCisgICAg aXQtPmhwb3MgKCVkKVxuXAorICAgIGl0LT52cG9zICglZClcblwKKyAgICBpdC0+Y3VycmVudF94 ICglZClcblwKKyAgICBuZXdfeCAoJWQpXG5cCisgICAgZm9udC0+c3BhY2Vfd2lkdGggKCVkKVxu XAorICAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoICglZClcblwKKyAgICBpdC0+bG51bV93aWR0aCAo JWQpXG5cCisgICAgaXQtPnBpeGVsX3dpZHRoICglZClcblwKKyAgICBpdC0+Zmlyc3RfdmlzaWJs ZV94ICglZClcblwKKyAgICBpdC0+bGFzdF92aXNpYmxlX3ggKCVkKVxuXAorICAgIHJlbGF0aXZl X3ggKCVkKVxuXAorICAgIGl0LT5mYWNlX2lkICglZClcblwKKyAgICBmb3JlZ3JvdW5kX2ZhY2Ug KCVzKVxuXAorICAgIGJhY2tncm91bmRfZmFjZSAoJXMpXG5cCisgICAgcHJldmlvdXMgY2hhcmFj dGVyICglcylcblwKKyAgICBwcmV2aW91c19ocG9zICglZClcblwKKyAgICBpc3N1ZV8zMTcxNl9w ICglcylcblwKKyAgICBmaW5hbF9sb29wX3AgKCVzKVxuXAorICAgIGxwd19yZWFjaGVkX3AgKCVz KVxuXAorICAgIGdyZWVuX2xpZ2h0X3AgKCVzKVxuXAorICAgIGFkdmFuY2VfaHBvc19wICglcylc blwKKyAgICBnaG9zdF9jaHJpc3RtYXNfZnV0dXJlX3AgKCVzKVxuXAorICAgIHJjICglcylcbiIs CisgICAgICBjb3VudCwKKyAgICAgIChpdC0+YyA9PSAwCisgICAgICAgID8gIk5PVEhJTkciCisg ICAgICAgIDogaXQtPmMgPT0gMTg3CisgICAgICAgICAgPyAiVEFCIENIQVJBQ1RFUiIKKyAgICAg ICAgOiBpdC0+YyA9PSAnXHQnCisgICAgICAgICAgPyAiVEFCIFNUUkVUQ0giCisgICAgICAgIDog IlRFWFQiKSwKKyAgICAgIChyZWxhdGl2ZV94ID09IGl0LT5sbnVtX3BpeGVsX3dpZHRoCisgICAg ICAgID8gIiAtLSBUSEUgRlVOIFNUQVJUUyBIRVJFIgorICAgICAgICA6ICIiKSwKKyAgICAgIChh Y3Rpb25fdHlwZSA9PSBNVUxUSVBMRV9DVVJTT1JTCisgICAgICAgPyAiTVVMVElQTEVfQ1VSU09S UyIKKyAgICAgICA6IGFjdGlvbl90eXBlID09IEhPUklaT05UQUxfUlVMRVIKKyAgICAgICAgID8g IkhPUklaT05UQUxfUlVMRVIiCisgICAgICAgOiBhY3Rpb25fdHlwZSA9PSBWRVJUSUNBTF9SVUxF UgorICAgICAgICAgPyAiVkVSVElDQUxfUlVMRVIiCisgICAgICAgOiAiT09QUyIpLAorICAgICAg aXQtPmMsCisgICAgICBGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSwKKyAgICAgICghTklM UCAoRmNoYXJfdG9fc3RyaW5nIChtYWtlX251bWJlciAoaXQtPmMpKSkKKyAgICAgICAgPyBTU0RB VEEgKEZjaGFyX3RvX3N0cmluZyAobWFrZV9udW1iZXIgKGl0LT5jKSkpCisgICAgICAgIDogIk5J TFAgLS0gaXQtPmMgYXMgYSBzdHJpbmciKSwKKyAgICAgIGl0X2NoYXJwb3MsCisgICAgICAvKiBX aGVuIGBpdC0+dy0+aHNjcm9sbGAgaXMgc2V0IHRvIGFuIGBpbnRgLCBnZGIgcmVwb3J0cyB0aGUg dmFsdWUKKyAgICAgIGFzIGJlaW5nOiAgPHZhcmlhYmxlIG9wdGltaXplZCBhd2F5IGJ5IGNvbXBp bGVyPiAqLworICAgICAgd19oc2Nyb2xsLAorICAgICAgd19taW5faHNjcm9sbCwKKyAgICAgICho c2NsX3RlbXBvcmFyeSA/ICJ0cnVlIiA6ICJmYWxzZSIpLAorICAgICAgKGhzY2xfcGVybWFuZW50 ID8gInRydWUiIDogImZhbHNlIiksCisgICAgICBpdC0+aHBvcywKKyAgICAgIGl0LT52cG9zLAor ICAgICAgaXQtPmN1cnJlbnRfeCwKKyAgICAgIG5ld194LAorICAgICAgLyogQ2Fubm90IGFjY2Vz cyBtZW1vcnkgYXQgYWRkcmVzcyAweGEwLiAgVGhpcyBjYW1lIGFib3V0IGJ5IHVzaW5nCisgICAg ICBgP1xVMDAwMUQ0RDVgIHRvIGNyZWF0ZSBhIGZhbmN5IGZvcm0gZmVlZCBjaGFyYWN0ZXIgdGhh dCB3YXMgbm90CisgICAgICByZWNvZ25pemVkIGJ5IHRoZSBmb250IGNob3NlbiBvbiBYMTEuICov CisgICAgICAoZm9udCA9PSBOVUxMCisgICAgICAgPyAwCisgICAgICAgOiBmb250LT5zcGFjZV93 aWR0aCksCisgICAgICBpdC0+bG51bV9waXhlbF93aWR0aCwKKyAgICAgIGl0LT5sbnVtX3dpZHRo LAorICAgICAgaXQtPnBpeGVsX3dpZHRoLAorICAgICAgaXQtPmZpcnN0X3Zpc2libGVfeCwKKyAg ICAgIGl0LT5sYXN0X3Zpc2libGVfeCwKKyAgICAgIHJlbGF0aXZlX3gsCisgICAgICBpdC0+ZmFj ZV9pZCwKKyAgICAgICghTklMUCAoZm9yZWdyb3VuZF9mYWNlKQorICAgICAgICA/IFNTREFUQSAo Zm9yZWdyb3VuZF9mYWNlKQorICAgICAgICA6ICJOSUxQIGZvcmVncm91bmRfZmFjZSIpLAorICAg ICAgKCFOSUxQIChiYWNrZ3JvdW5kX2ZhY2UpCisgICAgICAgID8gU1NEQVRBIChiYWNrZ3JvdW5k X2ZhY2UpCisgICAgICAgIDogIk5JTFAgYmFja2dyb3VuZF9mYWNlIiksCisgICAgICAoIU5JTFAg KEZjaGFyX3RvX3N0cmluZyAobWFrZV9udW1iZXIgKHByZXZpb3VzX2NoYXJhY3RlcikpKQorICAg ICAgICA/IFNTREFUQSAoRmNoYXJfdG9fc3RyaW5nIChtYWtlX251bWJlciAocHJldmlvdXNfY2hh cmFjdGVyKSkpCisgICAgICAgIDogIk5JTFAgLS0gcHJldmlvdXNfY2hhcmFjdGVyIGFzIGEgc3Ry aW5nIiksCisgICAgICBwcmV2aW91c19ocG9zLAorICAgICAgKGlzc3VlXzMxNzE2X3AgPyAidHJ1 ZSIgOiAiZmFsc2UiKSwKKyAgICAgIChmaW5hbF9sb29wX3AgPyAidHJ1ZSIgOiAiZmFsc2UiKSwK KyAgICAgIChscHdfcmVhY2hlZF9wID8gInRydWUiIDogImZhbHNlIiksCisgICAgICAoZ3JlZW5f bGlnaHRfcCA/ICJ0cnVlIiA6ICJmYWxzZSIpLAorICAgICAgKGFkdmFuY2VfaHBvc19wID8gInRy dWUiIDogImZhbHNlIiksCisgICAgICAoZ2hvc3RfY2hyaXN0bWFzX2Z1dHVyZV9wID8gInRydWUi IDogImZhbHNlIiksCisgICAgICAocmMgPT0gTU9WRV9VTkRFRklORUQKKyAgICAgICAgPyAiTU9W RV9VTkRFRklORUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9QT1NfTUFUQ0hfT1JfWlYKKyAgICAg ICAgICA/ICJNT1ZFX1BPU19NQVRDSF9PUl9aViIKKyAgICAgICAgOiByYyA9PSBNT1ZFX1hfUkVB Q0hFRAorICAgICAgICAgID8gIk1PVkVfWF9SRUFDSEVEIgorICAgICAgICA6IHJjID09IE1PVkVf TElORV9DT05USU5VRUQKKyAgICAgICAgICA/ICJNT1ZFX0xJTkVfQ09OVElOVUVEIgorICAgICAg ICA6IHJjID09IE1PVkVfTElORV9UUlVOQ0FURUQKKyAgICAgICAgICA/ICJNT1ZFX0xJTkVfVFJV TkNBVEVEIgorICAgICAgICA6IHJjID09IE1PVkVfTkVXTElORV9PUl9DUgorICAgICAgICAgID8g Ik1PVkVfTkVXTElORV9PUl9DUiIKKyAgICAgICAgOiAiT09QUyIpKTsKK30KKworc3RhdGljIHZv aWQKK21jX2Nyb3NzaGFpcnNfaGVscGVyIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgeCwgaW50IGZ4 LCBpbnQgeSwgaW50IGZ5LCBpbnQgaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICBpbnQgdnBv cywgaW50IGgsIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgdHlwZSwgaW50IHdpZHRoLAorICAgICAg ICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGZvcmVncm91bmQsIExpc3BfT2JqZWN0IGJhY2tn cm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgaW50IGZsYXZvciwgcHRyZGlmZl90IHBvcywg TGlzcF9PYmplY3QgKnJlc3VsdCkKK3sKKyAgTGlzcF9PYmplY3QgdGhpcnRlZW5fZWxlbWVudHM7 CisgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIGgs IHR5cGUsIHdpZHRoLCBmb3JlZ3JvdW5kLCBmbGF2b3IpOworICB0aGlydGVlbl9lbGVtZW50cyA9 IGxpc3RuIChDT05TVFlQRV9IRUFQLCAxMywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1h a2VfbnVtYmVyICh4KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChm eCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoeSksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoZnkpLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgbWFrZV9udW1iZXIgKGhwb3MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg bWFrZV9udW1iZXIgKHZwb3MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1i ZXIgKGgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfY3Vyc29yX3R5cGVfdG9fbGlz cCAodHlwZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAod2lkdGgp LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtl X251bWJlciAoZmxhdm9yKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVy IChwb3MpKTsKKyAgKnJlc3VsdCA9IEZjb25zICh0aGlydGVlbl9lbGVtZW50cywgKnJlc3VsdCk7 Cit9CisKK3N0YXRpYyB2b2lkCittY19jYWxjX2hlbHBlciAoc3RydWN0IHdpbmRvdyAqdywgaW50 IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsCisgICAgICAgICAgICAgICAgaW50 IHZwb3MsIGludCBoLCBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIHR5cGUsIGludCB3aWR0aCwKKyAg ICAgICAgICAgICAgICBMaXNwX09iamVjdCBmb3JlZ3JvdW5kLCBMaXNwX09iamVjdCBiYWNrZ3Jv dW5kLCBpbnQgZmxhdm9yLAorICAgICAgICAgICAgICAgIHB0cmRpZmZfdCBwb3MsIExpc3BfT2Jq ZWN0IHNwZWNzLCBMaXNwX09iamVjdCAqcmVzdWx0KQoreworICBMaXNwX09iamVjdCB0aGlydGVl bl9lbGVtZW50czsKKyAgTGlzcF9PYmplY3QgdGVtcDsKKyAgbWNfZHJhd19lcmFzZV9oeWJyaWQg KHcsIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgdHlwZSwgd2lkdGgsIGZvcmVncm91bmQs IGZsYXZvcik7CisgIHRoaXJ0ZWVuX2VsZW1lbnRzID0gbGlzdG4gKENPTlNUWVBFX0hFQVAsIDEz LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHgpLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKGZ4KSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIG1ha2VfbnVtYmVyICh5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2Vf bnVtYmVyIChmeSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoaHBv cyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAodnBvcyksCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoaCksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBtY19jdXJzb3JfdHlwZV90b19saXNwICh0eXBlKSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIG1ha2VfbnVtYmVyICh3aWR0aCksCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChmbGF2b3IpLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHBvcykpOworICB0ZW1wID0gRmNvbnMg KHNwZWNzLCBGY29ucyAodGhpcnRlZW5fZWxlbWVudHMsIFFuaWwpKTsKKyAgKnJlc3VsdCA9IEZj b25zICh0ZW1wLCAqcmVzdWx0KTsKK30KKworc3RhdGljIHZvaWQKK21jX2dldF9waHlzX2N1cnNv cl9nZW9tZXRyeSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgeCwgaW50ICpmeCwgaW50IHksIGlu dCAqZnksIGludCBocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdnBvcywg aW50ICpoLCBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIHR5cGUsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGludCBj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dpb25fbGltaXQg KDEpCisgICBFWEFNUExFIChyZWdpb24tZW5kKTogIHJlZ2lvbl9saW1pdCAoMCkgKi8KKworc3Rh dGljIExpc3BfT2JqZWN0CittY19yZWdpb25fbGltaXQgKGJvb2wgYmVnaW5uaW5ncCkKK3sKKyAg TGlzcF9PYmplY3QgbTsKKyAgaWYgKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAg ICYmIE5JTFAgKFZtYXJrX2V2ZW5faWZfaW5hY3RpdmUpCisgICAgICAmJiBOSUxQIChCVkFSIChj dXJyZW50X2J1ZmZlciwgbWFya19hY3RpdmUpKSkKKyAgICByZXR1cm4gUW5pbDsKKyAgbSA9IEZt YXJrZXJfcG9zaXRpb24gKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBtYXJrKSk7CisgIGlmIChOSUxQ IChtKSkKKyAgICByZXR1cm4gUW5pbDsKKyAgLyogU2VlIGByZWdpb24tYWN0aXZlLXAnIGFuZCBg cmVkaXNwbGF5LS11cGRhdGUtcmVnaW9uLWhpZ2hsaWdodCcuICovCisgIGlmICghTklMUCAoVnRy YW5zaWVudF9tYXJrX21vZGUpCisgICAgICAmJiAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIs IG1hcmtfYWN0aXZlKSkKKyAgICAgICYmICFOSUxQIChtKSkKKyAgICByZXR1cm4gbWFrZV9udW1i ZXIgKChQVCA8IFhGQVNUSU5UIChtKSkgPT0gYmVnaW5uaW5ncAorICAgICAgICAgICAgICAgICAg ICAgICAgPyBQVAorICAgICAgICAgICAgICAgICAgICAgICAgOiBjbGlwX3RvX2JvdW5kcyAoQkVH ViwgWEZBU1RJTlQgKG0pLCBaVikpOworICAgICAgZWxzZQorICAgICAgICByZXR1cm4gUW5pbDsK K30KKworLyogU1BFQ1Mgd2lsbCBiZSBhbiBMU0wgY29sb3IgdmVjdG9yIGlmIGNvbWluZyBmcm9t IGBtY19kcmF3X2Nyb3NzaGFpcnMnLgorU1BFQ1Mgd2lsbCBiZSBhIGNvbnNwIGxpc3QgaWYgY29t aW5nIGZyb20gYG1jX2NhbGMnLiAqLworCitzdGF0aWMgdm9pZAorbWNfbW92ZV9pdCAoc3RydWN0 IGl0ICppdCwgZW51bSB0eXBlX29mX2FjdGlvbiBhY3Rpb25fdHlwZSwgTGlzcF9PYmplY3Qgc3Bl Y3MsIExpc3BfT2JqZWN0ICpyZXN1bHQpCit7CisgIHB0cmRpZmZfdCBwb3NpbnQgPSAoVkVDVE9S UCAoc3BlY3MpKQorICAgICAgICAgICAgICAgICAgICAgPyAtMQorICAgICAgICAgICAgICAgICAg ICAgOiBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIHNwZWNzKSk7CisgIExpc3BfT2JqZWN0 IGxpc3BfdHlwZSA9IChWRUNUT1JQIChzcGVjcykpCisgICAgICAgICAgICAgICAgICAgICAgICAg ID8gUW5pbAorICAgICAgICAgICAgICAgICAgICAgICAgICA6IEZudGggKG1ha2VfbnVtYmVyICgx KSwgc3BlY3MpOworICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1cnNvcl90eXBlID0gKFZFQ1RP UlAgKHNwZWNzKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGFj dGlvbl90eXBlID09IEhPUklaT05UQUxfUlVMRVIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IEhCQVJfQ1VSU09SCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6ICAoVkVDVE9SUCAoc3BlY3MpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgYWN0aW9uX3R5cGUgPT0gVkVSVElDQUxfUlVMRVIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gQkFSX0NVUlNPUgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoQ09OU1AgKGxpc3BfdHlwZSkpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vy c29yX3R5cGUgKFhDQVIgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgIGludCBj dXJzb3Jfd2lkdGggPSAoVkVDVE9SUCAoc3BlY3MpKQorICAgICAgICAgICAgICAgICAgICAgPyAx CisgICAgICAgICAgICAgICAgICAgICA6IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgID8gWElOVCAoWENBUiAoWENEUiAobGlzcF90eXBlKSkpCisgICAgICAgICAg ICAgICAgICAgICA6IDE7CisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSAoVkVDVE9SUCAoc3Bl Y3MpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBzcGVjcworICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBGbnRoIChtYWtlX251bWJlciAoMiksIHNwZWNzKTsKKyAgaWYgKFNUUklO R1AgKGZvcmVncm91bmQpKQorICAgIGZvcmVncm91bmQgPSBtY19jb2xvcl92ZWN0b3JfY2FsYyAo aXQtPncsIGZvcmVncm91bmQpOworICBpbnQgb3BvaW50X3ggPSBpdC0+dy0+b3V0cHV0X2N1cnNv ci54OworICBpbnQgb3BvaW50X3kgPSBpdC0+dy0+b3V0cHV0X2N1cnNvci55OworICBpbnQgb3Bv aW50X2hwb3MgPSBpdC0+dy0+b3V0cHV0X2N1cnNvci5ocG9zOworICBpbnQgb3BvaW50X3Zwb3Mg PSBpdC0+dy0+b3V0cHV0X2N1cnNvci52cG9zOworICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgIGlu dCBwcmlvcl9wcmV2aW91c19ocG9zID0gLTE7CisgIGludCBwcmV2aW91c19ocG9zID0gLTE7Cisg IGVudW0gbW92ZV9pdF9yZ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3N0X2NocmlzdG1hc19mdXR1cmVfcmVs YXRpdmVfeCA9IDA7CisgIGludCBnaG9zdF9jaHJpc3RtYXNfZnV0dXJlX2hwb3MgPSAwOworICBp bnQgZ2hvc3RfY2hyaXN0bWFzX2Z1dHVyZV9mYWNlX2lkID0gMDsKKyAgTGlzcF9PYmplY3QgcmVn aW9uX2xpbWl0X3RydWUgPSBtY19yZWdpb25fbGltaXQgKHRydWUpOworICBwdHJkaWZmX3QgcmVn aW9uX2JlZ2lubmluZyA9ICghTklMUCAocmVnaW9uX2xpbWl0X3RydWUpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gWElOVCAocmVnaW9uX2xpbWl0X3RydWUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAwOworICBMaXNwX09iamVjdCByZWdpb25fbGltaXRfZmFs c2UgPSBtY19yZWdpb25fbGltaXQgKGZhbHNlKTsKKyAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAo IU5JTFAgKHJlZ2lvbl9saW1pdF9mYWxzZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBY SU5UIChyZWdpb25fbGltaXRfZmFsc2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgOiAwOwor ICBzdHJ1Y3QgZ2x5cGggKnJlYWxfcGh5c19jdXJzb3JfZ2x5cGggPSBnZXRfcGh5c19jdXJzb3Jf Z2x5cGggKGl0LT53KTsKKyAgYm9vbCByZWdpb25fYWN0aXZlX3AgPSAocmVnaW9uX2JlZ2lubmlu ZyAhPSByZWdpb25fZW5kKTsKKyAgd2hpbGUgKHRydWUpCisgICAgeworICAgICAgY291bnQgKz0g MTsKKyAgICAgIHN0cnVjdCBmYWNlICpmYWNlID0gbWNfbG9va3VwX2ZhY2UgKGl0KTsKKyAgICAg IHN0cnVjdCBmb250ICpmb250ID0gZmFjZS0+Zm9udDsKKyAgICAgIGludCBmb250X3NwYWNlX3dp ZHRoID0gKGZvbnQgPT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBmcmFt ZV9jaGFyX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGZvbnQtPnNwYWNl X3dpZHRoKTsKKyAgICAgIGlmIChoZWFkZXJfbGluZV9oZWlnaHQgPiAwKQorICAgICAgICB2cG9z ID0gaXQtPnZwb3MgKyAxOworICAgICAgICBlbHNlCisgICAgICAgICAgdnBvcyA9IGl0LT52cG9z OworICAgICAgYm9vbCBoc2NsX3RlbXBvcmFyeSA9ICghaXQtPnctPnN1c3BlbmRfYXV0b19oc2Ny b2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIEVRIChGYnVmZmVyX2xvY2FsX3Zh bHVlIChRYXV0b19oc2Nyb2xsX21vZGUsIGJ1ZiksIFFjdXJyZW50X2xpbmUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGl0LT53LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBpdC0+dy0+bWluX2hzY3JvbGwgPT0gMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSBpdC0+Y3VycmVudF95CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpOworICAgICAgYm9vbCBoc2Ns X3Blcm1hbmVudCA9ICghaXQtPnctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIEVRIChGYnVmZmVyX2xvY2FsX3ZhbHVlIChRYXV0b19oc2Nyb2xs X21vZGUsIGJ1ZiksIFFjdXJyZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIGl0LT53LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBp dC0+dy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG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ICAgICAgICBoc2NsX3RlbXBvcmFyeSAoZmFsc2UpCisgICAgICAgICAgaXQtPmhwb3MgKDUp CisgICAgICAgICAgaXQtPmN1cnJlbnRfeCAoMTMyKQorICAgICAgICAgIG5ld194ICg4OCkKKyAg ICAgICAgICBmb250X3NwYWNlX3dpZHRoICgxMSkKKyAgICAgICAgICBpdC0+bG51bV9waXhlbF93 aWR0aCAoNDQpCisgICAgICAgICAgcmVsYXRpdmVfeCAoNDQpCisgICAgICAgICAgcmMgKE1PVkVf WF9SRUFDSEVEKQorICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICAgICAg Ny4gIFRBQiBTVFJFVENICisgICAgICAgICAgaXQtPmMgKDkpCisgICAgICAgICAgY2hhciAoCSkK KyAgICAgICAgICBpdC0+dy0+aHNjcm9sbCAoMikKKyAgICAgICAgICBoc2NsX3RlbXBvcmFyeSAo ZmFsc2UpCisgICAgICAgICAgaXQtPmhwb3MgKDApCisgICAgICAgICAgaXQtPmN1cnJlbnRfeCAo MTEpCisgICAgICAgICAgbmV3X3ggKDc3KQorICAgICAgICAgIGZvbnRfc3BhY2Vfd2lkdGggKDEx KQorICAgICAgICAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoICg0NCkKKyAgICAgICAgICByZWxhdGl2 ZV94ICg1NSkKKyAgICAgICAgICByYyAoTU9WRV9YX1JFQUNIRUQpCisgICAgICAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICA4LiAgVEVYVAorICAgICAgICAgIGl0LT5jICg3 MikKKyAgICAgICAgICBjaGFyIChIKQorICAgICAgICAgIGl0LT53LT5oc2Nyb2xsICgyKQorICAg ICAgICAgIGhzY2xfdGVtcG9yYXJ5IChmYWxzZSkKKyAgICAgICAgICBpdC0+aHBvcyAoNSkKKyAg ICAgICAgICBpdC0+Y3VycmVudF94ICgxMzIpCisgICAgICAgICAgbmV3X3ggKDg4KQorICAgICAg ICAgIGZvbnRfc3BhY2Vfd2lkdGggKDExKQorICAgICAgICAgIGl0LT5sbnVtX3BpeGVsX3dpZHRo ICg0NCkKKyAgICAgICAgICByZWxhdGl2ZV94ICg2NikKKyAgICAgICAgICByYyAoTU9WRV9YX1JF QUNIRUQpICovCisgICAgICBib29sIGlzc3VlXzMxNzE2X3AgPSAoIWhzY2xfdGVtcG9yYXJ5Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWhzY2xfcGVybWFuZW50CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgaXQtPnctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgcHJpb3JfcHJldmlvdXNfaHBvcyA9PSAtMQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHByZXZpb3VzX2NoYXJhY3RlciA9PSAnXHQnCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgaXQtPmhwb3MgPiBpdC0+bG51bV9waXhlbF93aWR0aCAvIGZvbnRf c3BhY2Vfd2lkdGgpOworICAgICAgaW50IGhzY2xfeCA9IChoc2NsX3RlbXBvcmFyeQorICAgICAg ICAgICAgICAgICAgICB8fCBoc2NsX3Blcm1hbmVudCkKKyAgICAgICAgICAgICAgICAgICAgPyBp dC0+Y3VycmVudF94IC0gKGhzY2xfZmlyc3RfaHBvcyAqIGZyYW1lX2NoYXJfd2lkdGgpCisgICAg ICAgICAgICAgICAgICAgIDogaXQtPmN1cnJlbnRfeCAtIGl0LT5maXJzdF92aXNpYmxlX3g7Cisg ICAgICBib29sIGZpbmFsX2xvb3BfcCA9ICghaHNjbF90ZW1wb3JhcnkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFoc2NsX3Blcm1hbmVudCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgPyAoKEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKCppdCkpID09ICdcbicKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGl0LT5jICE9IDAKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC8qIFdlIGtlZXAgZ29pbmcgdW50aWwgYHJlbGF0aXZlX3hgIGNhdGNoZXMgdXAgd2l0 aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYGl0LT5jdXJyZW50X3hgIGZvciBhIHNp dHVhdGlvbiBzdWNoIGFzIGEgbGluZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29u dGFpbmluZyBvbmx5IGEgdGFiIGZvbGxlZCBieSBhIG5ldyBsaW5lOyBlLmcuLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaXNzdWVfMzE3MTZfcCBmb2xsb3dlZCBieSBhIEdob3N0IG9m IENocmlzdG1hcyBmdXR1cmUuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXZSB1c2Ug Pj0gYmVjYXVzZSB0aGVyZSBpcyBubyBndWFyYW50ZWUgdGhhdCBhbGwgb2YKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGNoYXJhY3RlcnMgd2lsbCBiZSBleGFjdGx5IGBmb250X2NoYXJf d2lkdGgnLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgKHJlbGF0aXZlX3gg Pj0gaXQtPmN1cnJlbnRfeCAtIGl0LT5maXJzdF92aXNpYmxlX3gKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAvKiBQZXJtYW5lbnRseSBoLXNjcm9sbGVkIGFuZCBvbmx5IGEgbmV3 IGxpbmUuICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaXQtPmN1cnJl bnRfeCA9PSAwKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogfHwgSVRFUkFUT1Jf QVRfRU5EX09GX0xJTkVfUCAoaXQpICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8 IHJjID09IE1PVkVfUE9TX01BVENIX09SX1pWCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHx8IHJjID09IE1PVkVfTElORV9DT05USU5VRUQKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgfHwgaHNjbF94ICsgZnJhbWVfY2hhcl93aWR0aCA+PSB0ZXh0X2FyZWFfd2lkdGgpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAg ID8gKGhzY2xfdGVtcG9yYXJ5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGhzY2xf cGVybWFuZW50KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKChGRVRDSF9CWVRFIChJ VF9CWVRFUE9TICgqaXQpKSA9PSAnXG4nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIGl0LT5jICE9IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogV2Uga2Vl cCBnb2luZyB1bnRpbCBgcmVsYXRpdmVfeGAgY2F0Y2hlcyB1cCB3aXRoCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGBpdC0+Y3VycmVudF94YCBmb3IgYSBzaXR1YXRpb24gc3VjaCBh cyBhIGxpbmUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmluZyBvbmx5 IGEgdGFiIGZvbGxlZCBieSBhIG5ldyBsaW5lOyBlLmcuLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBpc3N1ZV8zMTcxNl9wIGZvbGxvd2VkIGJ5IGEgR2hvc3Qgb2YgQ2hyaXN0bWFz IGZ1dHVyZS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV2UgdXNlID49IGJlY2F1 c2UgdGhlcmUgaXMgbm8gZ3VhcmFudGVlIHRoYXQgYWxsIG9mCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGNoYXJhY3RlcnMgd2lsbCBiZSBleGFjdGx5IGBmb250X2NoYXJfd2lkdGgn LiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByZWxhdGl2ZV94ID49IGl0 LT5jdXJyZW50X3ggLSAoaHNjbF9maXJzdF9ocG9zICogZnJhbWVfY2hhcl93aWR0aCkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogfHwgSVRFUkFUT1JfQVRfRU5EX09GX0xJTkVf UCAoaXQpICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgcmMgPT0gTU9WRV9Q T1NfTUFUQ0hfT1JfWlYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCByYyA9PSBN T1ZFX0xJTkVfQ09OVElOVUVECisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaHNj bF94ICsgZnJhbWVfY2hhcl93aWR0aCA+PSB0ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IHRydWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBmYWxz ZTsKKyAgICAgIGJvb2wgbHB3X3JlYWNoZWRfcCA9IChwcmV2aW91c19yZWxhdGl2ZV94ID49IGl0 LT5sbnVtX3BpeGVsX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaXNzdWVf MzE3MTZfcCk7CisgICAgICBib29sIGdyZWVuX2xpZ2h0X3AgPSAoaXQtPmN1cnJlbnRfeCA+IHNh dmVkX2N1cnJlbnRfeCkgPyB0cnVlIDogZmFsc2U7CisgICAgICBib29sIGFkdmFuY2VfaHBvc19w ID0gKGdyZWVuX2xpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgbHB3X3Jl YWNoZWRfcCk7CisgICAgICBpZiAoYWR2YW5jZV9ocG9zX3ApCisgICAgICAgIHByZXZpb3VzX2hw b3MgKz0gKHByZXZpb3VzX2hwb3MgPT0gLTEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm ICFOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhRVEgKFZkaXNwbGF5X2xpbmVfbnVtYmVycywgUXZpc3VhbCkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgID8gKGl0LT5sbnVtX3BpeGVsX3dpZHRoIC8gZm9udF9zcGFjZV93aWR0aCkg KyAxCisgICAgICAgICAgICAgICAgICAgICAgICAgIDogKHJlbGF0aXZlX3ggPiAwKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog MDsKKyAgICAgICAgZWxzZSBpZiAoZmluYWxfbG9vcF9wCisgICAgICAgICAgICAgICAgICYmIHBy ZXZpb3VzX2hwb3MgPT0gLTEpCisgICAgICAgICAgcHJldmlvdXNfaHBvcyA9IDA7CisgICAgICAv KiBpdC0+YyA9PSAnXHQnIHdoZW4gSVQgaXMgYXQgYSB0YWItd2lkdGggc3BhY2VyIGZvbGxvd2lu ZyBhCisgICAgICBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGdseXBoIHN1Y2ggYXMgwrsuICovCisg ICAgICBib29sIHRhYl9pbnZpc2libGVfcCA9IHByZXZpb3VzX2NoYXJhY3RlciA9PSAnXHQnOwor ICAgICAgYm9vbCB0YWJfdmlzaWJsZV9wID0gKHByZXZpb3VzX2NoYXJhY3RlciAhPSAnXHQnCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmV0Y2hfYnl0ZV9wcmV2aW91c19jaGFyYWN0 ZXIgPT0gJ1x0Jyk7CisgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChhY3Rpb25fdHlw ZSA9PSBWRVJUSUNBTF9SVUxFUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAo b3BvaW50X3kgPT0gaXQtPmN1cnJlbnRfeQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IChvcG9pbnRfeCA9PSBwcmV2aW91c19yZWxhdGl2ZV94CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IGl0LT5jdXJyZW50X3kKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0gcHJldmlvdXNfaHBv cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2 cG9zKTsKKyAgICAgIGlmICghTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3N0ZGVycikp KQorICAgICAgICBtY19zdGRlcnIgKGl0LCBjb3VudCwgbmV3X3gsIHJlbGF0aXZlX3gsIHByZXZp b3VzX2NoYXJhY3RlciwKKyAgICAgICAgICAgICAgICAgICBwcmV2aW91c19ocG9zLCBpc3N1ZV8z MTcxNl9wLCBmaW5hbF9sb29wX3AsIGxwd19yZWFjaGVkX3AsCisgICAgICAgICAgICAgICAgICAg Z3JlZW5fbGlnaHRfcCwgYWR2YW5jZV9ocG9zX3AsIGdob3N0X2NocmlzdG1hc19mdXR1cmVfcCwK KyAgICAgICAgICAgICAgICAgICBoc2NsX3RlbXBvcmFyeSwgaHNjbF9wZXJtYW5lbnQsIHJjLCBh Y3Rpb25fdHlwZSk7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExFIENV UlNPUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgaWYgKChncmVl bl9saWdodF9wCisgICAgICAgICAgLyogV09SRF9XUkFQOiAgV2hlbiBwb3NpbnQgaXMgb24gdGhl IHNwYWNlIGNoYXJhY3RlciBhdCB0aGUgZW5kIG9mIGEKKyAgICAgICAgICBXT1JEX1dSQVAgbGlu ZSwgYGdyZWVuX2xpZ2h0X3AnIGFuZCBgYWR2YW5jZV9ocG9zX3AnIGFyZSBib3RoIGBmYWxzZWAu CisgICAgICAgICAgSW4gY2FzZSB3ZSBuZWVkIHRvIGFkZCBtb3JlIGNvbmRpdGlvbnMsIGByY2Ag PWlzIE1PVkVfTElORV9DT05USU5VRUQuICovCisgICAgICAgICAgfHwgZmluYWxfbG9vcF9wKQor ICAgICAgICAgICYmIChwcmV2aW91c19wdCA9PSBwb3NpbnQKKyAgICAgICAgICAgICAgfHwgRkVU Q0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0gJ1xuJykpCisgICAgICAgIHsKKyAgICAgICAg ICBlbnVtIGZhY2VfaWQgdGVtcF9mYWNlX2lkID0gcHJldmlvdXNfZmFjZV9pZDsKKyAgICAgICAg ICBpbnQgdGVtcF94ID0gcmVsYXRpdmVfeDsKKyAgICAgICAgICBpbnQgdGVtcF9ocG9zID0gcHJl dmlvdXNfaHBvczsKKyAgICAgICAgICAvKiBBcyB0byBgbWNfY2FsYycsIHdlIGFyZSBpbnRlcmVz dGVkIGluIHRoZSBjdXJyZW50IEhQT1MgYW5kIHRoZSBjdXJyZW50CisgICAgICAgICAgYHJlbGF0 aXZlX3hgLiAgVGhlIGluY29taW5nIGFyZ3VtZW50IGZvciBwcmV2aW91c19ocG9zIGlzIGFjdHVh bGx5IGhwb3MsCisgICAgICAgICAgd2hpY2ggZ2V0cyBtb2RpZmllZCBhY2NvcmRpbmdseSBoZXJl IChldmVuIHRob3VnaCBhIGRpZmZlcmVudCBuYW1lKS4gKi8KKyAgICAgICAgICBpZiAocHJldmlv dXNfcHQgPT0gcG9zaW50KQorICAgICAgICAgICAgLyogV2UgY291bGQsIGJ1dCBhcmUgbm90IG1v ZGlmeWluZyB0aGUgZ2xvYmFsIHByZXZpb3VzX3JlbGF0aXZlX3guICovCisgICAgICAgICAgICB0 ZW1wX3ggPSBwcmV2aW91c19yZWxhdGl2ZV94OworICAgICAgICAgICAgLyogV2UgYXJlIGF0IHRo ZSBlbmQgb2YgdGhlIGxpbmUuICovCisgICAgICAgICAgICBlbHNlIGlmIChJVF9DSEFSUE9TICgq aXQpID09IHBvc2ludAorICAgICAgICAgICAgICAgICAgICAgJiYgKElURVJBVE9SX0FUX0VORF9P Rl9MSU5FX1AgKGl0KQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8IEZFVENIX0JZVEUgKElU X0JZVEVQT1MgKCppdCkpID09ICdcbicpKQorICAgICAgICAgICAgICAvKiBgcmVsYXRpdmVfeGAg aXMgYWxyZWFkeSBjb3JyZWN0LiAqLworICAgICAgICAgICAgICB0ZW1wX2hwb3MgPSBwcmV2aW91 c19ocG9zICsgMTsKKyAgICAgICAgICBpZiAocmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRCkKKyAg ICAgICAgICAgIHRlbXBfaHBvcyA9IHByZXZpb3VzX2hwb3MgKyAxOworICAgICAgICAgIGludCBm bGF2b3I7CisgICAgICAgICAgaWYgKElUX0NIQVJQT1MgKCppdCkgPT0gcG9zaW50CisgICAgICAg ICAgICAgICYmIChJVEVSQVRPUl9BVF9FTkRfT0ZfTElORV9QIChpdCkKKyAgICAgICAgICAgICAg ICAgIHx8IEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKCppdCkpID09ICdcbicpKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBmbGF2b3IgPSBNQ19HTFlQSExFU1M7CisgICAgICAgICAgICAg IHRlbXBfZmFjZV9pZCA9IGl0LT5mYWNlX2lkOworICAgICAgICAgICAgfQorICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgZmxhdm9yID0gTUNfR0xZUEg7CisgICAgICAgICAgbWNf Y2FsY19oZWxwZXIgKGl0LT53LCB0ZW1wX3gsIC0xLCBpdC0+Y3VycmVudF95LCAtMSwgdGVtcF9o cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCAtMSwgY3Vyc29yX3R5cGUsIGN1 cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfYmdf bHNsIChpdC0+dywgdGVtcF9mYWNlX2lkKSwgZmxhdm9yLCBwb3NpbnQsCisgICAgICAgICAgICAg ICAgICAgICAgICAgIHNwZWNzLCByZXN1bHQpOworICAgICAgICAgIHJldHVybjsKKyAgICAgICAg fQorICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTCBSVUxFUiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9S SVpPTlRBTF9SVUxFUjoKKyAgICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQ19HTFlQSCAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgICBpZiAoKGdy ZWVuX2xpZ2h0X3AKKyAgICAgICAgICAgLyogUGxhY2UgYW4gTUNfR0xZUEggb24gdGhlIGxhc3Qg c3BhY2Ugb2YgYSB3cmFwcGVkIGxpbmUuICovCisgICAgICAgICAgIHx8IHJjID09IE1PVkVfTElO RV9DT05USU5VRUQpCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcAorICAgICAgICAg ICYmIGxwd19yZWFjaGVkX3AKKyAgICAgICAgICAmJiAhdGFiX2ludmlzaWJsZV9wKQorICAgICAg ICB7CisgICAgICAgICAgZW51bSBmYWNlX2lkIHRlbXBfZmFjZV9pZCA9IChyYyA9PSBNT1ZFX0xJ TkVfQ09OVElOVUVEKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGl0 LT5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogcHJldmlv dXNfZmFjZV9pZDsKKyAgICAgICAgICBpbnQgdGVtcF94ID0gcHJldmlvdXNfcmVsYXRpdmVfeDsK KyAgICAgICAgICBwdHJkaWZmX3QgaXRfY2hhcnBvcyA9IChyYyA9PSBNT1ZFX0xJTkVfQ09OVElO VUVEKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gSVRfQ0hBUlBPUyAoKml0 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogSVRfQ0hBUlBPUyAoKml0KSAt IDE7CisgICAgICAgICAgaW50IHRlbXBfaHBvcyA9IChyYyA9PSBNT1ZFX0xJTkVfQ09OVElOVUVE KQorICAgICAgICAgICAgICAgICAgICAgICAgICA/IHByZXZpb3VzX2hwb3MgKyAxCisgICAgICAg ICAgICAgICAgICAgICAgICAgIDogcHJldmlvdXNfaHBvczsKKyAgICAgICAgICAvKiBSZWNvcmQg c29tZSBvZiB0aGUgY3VycmVudCB2YWx1ZXMgZm9yIHRoZSBjdXJzb3IgYW5kIGdseXBoX3Jvdy4g Ki8KKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlwaF9yb3cgPSAgTUFUUklYX1JPVyAo aXQtPnctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgICAgICAgICBpbnQgZngsIGZ5LCBoOwor ICAgICAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAoaXQtPncsIGdseXBoX3Jvdywg dGVtcF94LCAmZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlw aF9yb3ctPnksICZmeSwgdGVtcF9ocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgpOworICAgICAgICAg IG1jX2Nyb3NzaGFpcnNfaGVscGVyIChpdC0+dywgdGVtcF94LCAtMSwgaXQtPmN1cnJlbnRfeSwg ZnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfaHBvcywgdnBvcywgLTEs IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGZvcmVncm91bmQsIG1jX2JnX2xzbCAoaXQtPncsIHRlbXBfZmFjZV9pZCksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIE1DX0dMWVBILCBpdF9jaGFycG9zLCByZXN1bHQpOwor ICAgICAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBNQ19HTFlQSF9UQUIgICAgICAgICAgICAgICAgICAgICAgICAgIC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ICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3AKKyAgICAgICAgICAmJiBscHdfcmVhY2hlZF9wCisg ICAgICAgICAgJiYgdGFiX2ludmlzaWJsZV9wKQorICAgICAgICB7CisgICAgICAgICAgaW50IGk7 CisgICAgICAgICAgaW50IHRlbXBfeCA9IChzYXZlZF9yZWxhdGl2ZV94X2Zvcl90YWIgPCBpdC0+ bG51bV9waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gaXQtPmxudW1fcGl4 ZWxfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgIDogc2F2ZWRfcmVsYXRpdmVfeF9mb3Jf dGFiOworICAgICAgICAgIGludCBjb3VudCA9IChyZWxhdGl2ZV94IC0gdGVtcF94KSAvIGZvbnRf c3BhY2Vfd2lkdGg7CisgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvdW50OyBpKyspCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2Nyb3NzaGFpcnNfaGVscGVyIChpdC0+dywgdGVt cF94LCAtMSwgaXQtPmN1cnJlbnRfeSwgLTEsIHByZXZpb3VzX2hwb3MsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2Jn X2xzbCAoaXQtPncsIHByZXZpb3VzX2ZhY2VfaWQpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgTUNfR0xZUEhfVEFCLCBJVF9DSEFSUE9TICgqaXQpIC0gMSwgcmVzdWx0KTsK KyAgICAgICAgICAgICAgdGVtcF94ICs9IGZvbnRfc3BhY2Vfd2lkdGg7CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAg ICAgR2hvc3Qgb2YgQ2hyaXN0bWFzIEZ1dHVyZSAtLSBNQ19HTFlQSF9UQUIgICAgICAgICAgICAg ICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICAgIGlmIChncmVlbl9saWdodF9w CisgICAgICAgICAgJiYgZ2hvc3RfY2hyaXN0bWFzX2Z1dHVyZV9wCisgICAgICAgICAgJiYgbHB3 X3JlYWNoZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIGludCBpOworICAgICAgICAgIGludCB0 ZW1wX3ggPSAoZ2hvc3RfY2hyaXN0bWFzX2Z1dHVyZV9yZWxhdGl2ZV94IDwgaXQtPmxudW1fcGl4 ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICA/IGl0LT5sbnVtX3BpeGVsX3dpZHRo CisgICAgICAgICAgICAgICAgICAgICAgICA6IGdob3N0X2NocmlzdG1hc19mdXR1cmVfcmVsYXRp dmVfeDsKKyAgICAgICAgICBpbnQgY291bnQgPSAocHJldmlvdXNfcmVsYXRpdmVfeCAtIHRlbXBf eCkgLyBmb250X3NwYWNlX3dpZHRoOworICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudDsg aSsrKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19jcm9zc2hhaXJzX2hlbHBlciAo aXQtPncsIHRlbXBfeCwgLTEsIGl0LT5jdXJyZW50X3ksIC0xLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZ2hvc3RfY2hyaXN0bWFzX2Z1dHVyZV9ocG9zLCB2cG9zLCAtMSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBt Y19iZ19sc2wgKGl0LT53LCBnaG9zdF9jaHJpc3RtYXNfZnV0dXJlX2ZhY2VfaWQpLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUNfR0xZUEhfVEFCLCBJVF9DSEFSUE9TICgq aXQpIC0gMiwgcmVzdWx0KTsKKyAgICAgICAgICAgICAgdGVtcF94ICs9IGZvbnRfc3BhY2Vfd2lk dGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwor LyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQ19HTFlQSExFU1MgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICAg IGlmIChmaW5hbF9sb29wX3ApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBXZSB3YW50IHRvIHN0 YXJ0IGRyYXdpbmcgdGhlIGZsb2F0aW5nIGhvcml6b250YWwgbGluZSBmcm9tIElUCisgICAgICAg ICAgKGxpbmUgZmVlZDsgWlY7IG9yIHNwYWNlLXdvcmRfd3JhcCkgdW50aWwgdGhlIHJpZ2h0IGZy aW5nZS4KKyAgICAgICAgICBJZiB0aGUgbGluZSBpcyBlbXB0eSBvciBoaWRkZW4gYnkgaG9yaXpv bnRhbCBzY3JvbGxpbmcsIHRoZW4gYGl0LmN1cnJlbnRfeGAKKyAgICAgICAgICBtYXkgYmUgc29t ZXdoZXJlIGJlZm9yZSBgbG51bV9waXhlbF93aWR0aGAuICBUaGUgcmVhbCBjdXJzb3Igd2lsbCBi ZSB0byB0aGUKKyAgICAgICAgICBsZWZ0IG9mIGBsbnVtX3BpeGVsX3dpZHRoYCBpZiB3ZSBhcmUg aG9yaXpvbnRhbCBzY3JvbGxpbmcgYW5kIHBvaW50IGlzCisgICAgICAgICAgaGlkZGVuIHNvbWV3 aGVyZSB0byB0aGUgbGVmdCB0aGVyZW9mLiAqLworICAgICAgICAgIGVudW0gZmFjZV9pZCB0ZW1w X2ZhY2VfaWQgPSAocmVhbF9waHlzX2N1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBERUZBVUxUX0ZBQ0VfSUQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKElUX0NIQVJQT1MgKCppdCkgPj0gcmVnaW9u X2VuZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgcmVnaW9u X2JlZ2lubmluZyA9PSByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IERFRkFVTFRfRkFDRV9JRAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IHJlYWxfcGh5c19jdXJzb3JfZ2x5cGgtPmZhY2VfaWQ7CisgICAgICAg ICAgLyogQW4gZW1wdHkgbmV3IGxpbmUgLS0gbG9vcCBpbiBwcmV2aW91cyBzZWN0aW9uIGJyb2tl IGltbWVkaWF0ZWx5LiAqLworICAgICAgICAgIGludCB0ZW1wX2hwb3MgPSAocmVsYXRpdmVfeCA9 PSBpdC0+bG51bV9waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaXQt PmxudW1fcGl4ZWxfd2lkdGggLyBmcmFtZV9jaGFyX3dpZHRoCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAvKiBObyBuZWVkIHRvIHJlYWRqdXN0IGJlY2F1c2UgaXQgd2FzIGRvbmUgYWJvdmUu ICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHJjID09IE1PVkVfTElORV9DT05USU5V RUQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBwcmV2aW91c19ocG9zCisgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IHByZXZpb3VzX2hwb3MgKyAxOworICAgICAgICAgIC8qIEFu IGVtcHR5IG5ldyBsaW5lIC0tIGxvb3AgaW4gcHJldmlvdXMgc2VjdGlvbiBicm9rZSBpbW1lZGlh dGVseS4gKi8KKyAgICAgICAgICBpbnQgdGVtcF94ID0gKHJlbGF0aXZlX3ggPCBpdC0+bG51bV9w aXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgPyBpdC0+bG51bV9waXhlbF93aWR0 aAorICAgICAgICAgICAgICAgICAgICAgICA6IHJlbGF0aXZlX3g7CisgICAgICAgICAgd2hpbGUg KHRlbXBfeCArIGZyYW1lX2NoYXJfd2lkdGggPCB0ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIG1jX2Nyb3NzaGFpcnNfaGVscGVyIChpdC0+dywgdGVtcF94LCAt MSwgaXQtPmN1cnJlbnRfeSwgLTEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB0ZW1wX2hwb3MsIHZwb3MsIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgbWNfYmdfbHNsIChpdC0+ dywgdGVtcF9mYWNlX2lkKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1D X0dMWVBITEVTUywgSVRfQ0hBUlBPUyAoKml0KSwgcmVzdWx0KTsKKyAgICAgICAgICAgICAgdGVt cF94ID0gdGVtcF94ICsgZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICByZXR1cm47CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTCBSVUxF UiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmICgoIWZpbmFs X2xvb3BfcAorICAgICAgICAgICAvKiBXaGVuIHRoZSBjdXJyZW50IGxpbmUgY29udGFpbnMgc3Bl Y2lhbCBjaGFyYWN0ZXJzIGxpa2UgSmFwYW5lc2UsCisgICAgICAgICAgIHRoZW4gb3BvaW50X3gg YW5kIHByZXZpb3VzX3JlbGF0aXZlX3ggbWF5IG5vdCBuZWNlc3NhcmlseSBiZSB0aGUgc2FtZS4K KyAgICAgICAgICAgV2Ugd2FudCB0byBzdG9wIG9uIHRoZSBjaGFyYWN0ZXIgX2NvbnRhaW5pbmdf IGBvcG9pbnRfeGAuICovCisgICAgICAgICAgICYmIHByZXZpb3VzX3JlbGF0aXZlX3ggPj0gb3Bv aW50X3gpCisgICAgICAgICAgfHwgZmluYWxfbG9vcF9wKQorICAgICAgICB7CisgICAgICAgICAg c3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93ID0gIE1BVFJJWF9ST1cgKGl0LT53LT5jdXJyZW50 X21hdHJpeCwgdnBvcyk7CisgICAgICAgICAgaW50IGZsYXZvcjsKKyAgICAgICAgICBlbnVtIGZh Y2VfaWQgdGVtcF9iZ19mYWNlX2lkID0gcHJldmlvdXNfZmFjZV9pZDsKKyAgICAgICAgICBpbnQg dGVtcF94OworICAgICAgICAgIGludCB0ZW1wX2hwb3MgPSBwcmV2aW91c19ocG9zOworICAgICAg ICAgIC8qIFNraXAgdGhpcyBsaW5lLiAqLworICAgICAgICAgIGlmIChyZWFsX2Zha2VfY3Vyc29y X3ApCisgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgLyogSWYgcG9pbnQgaXMgdG8gdGhl IGxlZnQgb2YgdGhlIGxpbmUgbnVtYmVycyB3aGVuIHNjcm9sbGluZworICAgICAgICAgIGhvcml6 b250YWxseSwgdGhlbiB3ZSB3YW50IHRoZSB2ZXJ0aWNhbCBsaW5lIHRvIGFsaWduIHdpdGggcmln aHQgZWRnZQorICAgICAgICAgIG9mIHRoZSBsaW5lIG51bWJlcnMuICovCisgICAgICAgICAgaWYg KGl0LT53LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAmJiBwcmV2aW91c19yZWxhdGl2ZV94 ID09IG9wb2ludF94CisgICAgICAgICAgICAgICYmIG9wb2ludF94IDwgaXQtPmxudW1fcGl4ZWxf d2lkdGgKKyAgICAgICAgICAgICAgJiYgcHJldmlvdXNfaHBvcyA9PSAtMSkKKyAgICAgICAgICAg IHRlbXBfaHBvcyA9IChpdC0+bG51bV9waXhlbF93aWR0aCAvIGZvbnRfc3BhY2Vfd2lkdGgpIC0g MTsKKyAgICAgICAgICAgIGVsc2UgaWYgKGZpbmFsX2xvb3BfcAorICAgICAgICAgICAgICAgICAg ICAgJiYgcHJldmlvdXNfaHBvcyAhPSAwCisgICAgICAgICAgICAgICAgICAgICAmJiByYyA9PSBN T1ZFX0xJTkVfQ09OVElOVUVEKQorICAgICAgICAgICAgICB0ZW1wX2hwb3MgPSBwcmV2aW91c19o cG9zICsgMTsKKyAgICAgICAgICBpZiAoKGl0LT53LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAg ICAgJiYgcHJldmlvdXNfcmVsYXRpdmVfeCA9PSBvcG9pbnRfeAorICAgICAgICAgICAgICAgJiYg b3BvaW50X3ggPCBpdC0+bG51bV9waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgfHwgSVRfQ0hB UlBPUyAoKml0KSA9PSBaVikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZmxhdm9yID0g TUNfR0xZUEhMRVNTOworICAgICAgICAgICAgICB0ZW1wX2JnX2ZhY2VfaWQgPSBERUZBVUxUX0ZB Q0VfSUQ7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChnaG9zdF9jaHJpc3Rt YXNfZnV0dXJlX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX3JlbGF0aXZlX3gg PT0gb3BvaW50X3gpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBmbGF2b3IgPSBN Q19HTFlQSF9UQUI7CisgICAgICAgICAgICAgICAgdGVtcF9iZ19mYWNlX2lkID0gZ2hvc3RfY2hy aXN0bWFzX2Z1dHVyZV9mYWNlX2lkOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVs c2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlw aF9yb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgIGZsYXZvciA9IE1D X1ZFUlRJQ0FMX0JBUl9SSUdIVF9BTkdMRTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChjdXJz b3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9yb3ctPmNv bnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgZmxhdm9yID0gTUNfVkVSVElDQUxfQkFSX0JB Q0tTTEFTSDsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWdseXBoX3Jvdy0+dHJ1bmNhdGVkX29uX3Jp Z2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFnbHlwaF9yb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICBmbGF2b3IgPSBNQ19WRVJUSUNBTF9CQVI7CisgICAg ICAgICAgICAgICAgICAgIC8qIFdoZW4gSVQgaXMgYXQgdGhlIGVuZCBvZiBhIGxpbmUsIHVzZSBg TUNfR0xZUEhMRVNTJy4KKyAgICAgICAgICAgICAgICAgICAgSG93ZXZlciwgaXQgaXMgb2theSB0 byB1c2UgTUNfR0xZUEggZm9yIGEgd29yZC13cmFwcGVkIGxpbmUuICovCisgICAgICAgICAgICAg ICAgICAgIGVsc2UgaWYgKCFJVEVSQVRPUl9BVF9FTkRfT0ZfTElORV9QIChpdCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgIT0g J1xuJworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBGRVRDSF9CWVRFIChJVF9CWVRF UE9TICgqaXQpKSAhPSAnXGYnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGl0LT5j ID09ICdcdCcgd2hlbiBJVCBpcyBhdCBhIHRhYi13aWR0aCBzcGFjZXIgZm9sbG93aW5nIGEKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBnbHlwaCBz dWNoIGFzIMK7LiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBwcmV2aW91c19j aGFyYWN0ZXIgIT0gJ1x0JworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByYyAhPSBN T1ZFX1BPU19NQVRDSF9PUl9aVgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByYyAh PSBNT1ZFX0xJTkVfQ09OVElOVUVECisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJl bGF0aXZlX3ggPj0gaXQtPmxudW1fcGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAg Zmxhdm9yID0gTUNfR0xZUEg7CisgICAgICAgICAgICAgICAgICAgICAgLyogSXQgaXMgb2theSB0 byB1c2UgTUNfR0xZUEggZm9yIGEgd29yZC13cmFwcGVkIGxpbmUuICovCisgICAgICAgICAgICAg ICAgICAgICAgZWxzZSBpZiAocmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKCppdCkpID09ICcg JworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX3JlbGF0aXZlX3gg PT0gb3BvaW50X3gpCisgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3IgPSBNQ19HTFlQSDsK KyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHByZXZpb3VzX2NoYXJhY3RlciA9PSAn XHQnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBwcmV2aW91c19yZWxhdGl2 ZV94ID09IG9wb2ludF94KQorICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZmxhdm9yID0gTUNfR0xZUEhfVEFCOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHRlbXBfYmdfZmFjZV9pZCA9IHByZXZpb3VzX2ZhY2VfaWQ7CisgICAgICAg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAo ZmluYWxfbG9vcF9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIChwcmV2 aW91c19yZWxhdGl2ZV94ID49IG9wb2ludF94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB8fCBvcG9pbnRfeCA8IHJlbGF0aXZlX3gpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGZsYXZvciA9IE1DX0dMWVBIOworICAgICAgICAgICAgICAgICAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZmxhdm9yID0gTUNfR0xZUEhMRVNTOworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB0ZW1wX2JnX2ZhY2VfaWQgPSBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgLyogQ09STkVSIENBU0VTOgorICAg ICAgICAgIC0gIFdoZW4gdGhlIHZlcnRpY2FsIGxpbmUgaXMgdG8gdGhlIGxlZnQgb2YgdGhlIHRl eHQgYW5kIGp1c3QgdG8gdGhlCisgICAgICAgICAgICAgcmlnaHQgb2YgdGhlIGxpbmUgbnVtYmVy cywgd2Ugd2FudCB0aGUgZGVmYXVsdCBmYWNlLgorICAgICAgICAgIC0gIFdoZW4gdGhlcmUgaXMg YW4gaW1hZ2luYXJ5IGVtcHR5IGxpbmUgYXQgdGhlIGVuZCBvZiB0aGUgYnVmZmVyIHdpdGgKKyAg ICAgICAgICAgICBub3RoaW5nIG90aGVyIHRoYW4gWlYsIHdlIHdhbnQgdG8gdXNlIHRoZSBmcmFt ZSBkZWZhdWx0IGZhY2UgaWYgWlYKKyAgICAgICAgICAgICBpcyBhdCB0aGUgZW5kIG9mIGFuIGFj dGl2ZSByZWdpb24uICovCisgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcCkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgLyogU3Vic2VxdWVudCB0byBgcmVnaW9uX2VuZGAgYW5kIGF0 IHRoZSBlbmQgb2YgYSBsaW5lLiAqLworICAgICAgICAgICAgICBpZiAoSVRfQ0hBUlBPUyAoKml0 KSA+PSByZWdpb25fZW5kCisgICAgICAgICAgICAgICAgICAmJiAoSVRFUkFUT1JfQVRfRU5EX09G X0xJTkVfUCAoaXQpCisgICAgICAgICAgICAgICAgICAgICAgfHwgRkVUQ0hfQllURSAoSVRfQllU RVBPUyAoKml0KSkgPT0gJ1xuJykpCisgICAgICAgICAgICAgICAgdGVtcF9iZ19mYWNlX2lkID0g REVGQVVMVF9GQUNFX0lEOworICAgICAgICAgICAgICAgIC8qIFByaW9yIHRvIGByZWdpb25fYmVn aW5uaW5nYCBhbmQgYXQgdGhlIGVuZCBvZiBhIGxpbmUuICovCisgICAgICAgICAgICAgICAgZWxz ZSBpZiAoSVRfQ0hBUlBPUyAoKml0KSA8IHJlZ2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAoSVRFUkFUT1JfQVRfRU5EX09GX0xJTkVfUCAoaXQpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHx8IEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKCppdCkpID09ICdc bicpKQorICAgICAgICAgICAgICAgICAgdGVtcF9iZ19mYWNlX2lkID0gREVGQVVMVF9GQUNFX0lE OworICAgICAgICAgICAgICAgICAgLyogLSAgV2l0aGluIHRoZSByZWdpb24uCisgICAgICAgICAg ICAgICAgICAgICAtICBgcmVhbF9waHlzX2N1cnNvcl9nbHlwaGAgaXMgTlVMTC4gKi8KKyAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKElUX0NIQVJQT1MgKCppdCkgPj0gcmVnaW9uX2JlZ2lubmlu ZworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgSVRfQ0hBUlBPUyAoKml0KSA8IHJlZ2lv bl9lbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJlYWxfcGh5c19jdXJzb3JfZ2x5 cGggPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgdGVtcF9iZ19mYWNlX2lkID0gcHJldmlv dXNfZmFjZV9pZDsKKyAgICAgICAgICAgICAgICAgICAgLyogLSAgV2l0aGluIHRoZSByZWdpb24u CisgICAgICAgICAgICAgICAgICAgICAgIC0gIGByZWFsX3BoeXNfY3Vyc29yX2dseXBoYCBpcyBu b24tTlVMTC4KKyAgICAgICAgICAgICAgICAgICAgICAgLSAgQXQgdGhlIGVuZCBvZiB0aGUgbGlu ZS4KKyAgICAgICAgICAgICAgICAgICAgICAgLSAgUFQgaXMgYXQgYHJlZ2lvbl9iZWdpbm5pbmdg LiAqLworICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChJVF9DSEFSUE9TICgqaXQpID49IHJl Z2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgSVRfQ0hBUlBP UyAoKml0KSA8IHJlZ2lvbl9lbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgKElU RVJBVE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgfHwgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0gJ1xuJykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgcmVhbF9waHlzX2N1cnNvcl9nbHlwaCAhPSBOVUxMCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIFBUID09IHJlZ2lvbl9iZWdpbm5pbmcpCisg ICAgICAgICAgICAgICAgICAgICAgdGVtcF9iZ19mYWNlX2lkID0gcmVhbF9waHlzX2N1cnNvcl9n bHlwaC0+ZmFjZV9pZDsKKyAgICAgICAgICAgICAgICAgICAgICAvKiAtICBXaXRoaW4gdGhlIHJl Z2lvbi4KKyAgICAgICAgICAgICAgICAgICAgICAgICAtICBgcmVhbF9waHlzX2N1cnNvcl9nbHlw aGAgaXMgbm9uLU5VTEwuCisgICAgICAgICAgICAgICAgICAgICAgICAgLSAgQXQgdGhlIGVuZCBv ZiB0aGUgbGluZS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAtICBQVCBpcyBhdCBgcmVnaW9u X3JlZ2lvbl9lbmRgLiAqLworICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKElUX0NIQVJQ T1MgKCppdCkgPj0gcmVnaW9uX2JlZ2lubmluZworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIElUX0NIQVJQT1MgKCppdCkgPCByZWdpb25fZW5kCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgKElURVJBVE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQp KSA9PSAnXG4nKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJlYWxfcGh5c19j dXJzb3JfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIFBU ID09IHJlZ2lvbl9lbmQpCisgICAgICAgICAgICAgICAgICAgICAgICAvKiB0ZW1wX2JnX2ZhY2Vf aWQgPSByZWFsX3BoeXNfY3Vyc29yX2dseXBoLT5mYWNlX2lkOyAqLworICAgICAgICAgICAgICAg ICAgICAgICAgLyogdGVtcF9iZ19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKGl0LT5mLCBp bnRlcm4gKCJyZWdpb24iKSwgdHJ1ZSk7ICovCisgICAgICAgICAgICAgICAgICAgICAgICB0ZW1w X2JnX2ZhY2VfaWQgPSBpdC0+ZmFjZV9pZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIC0g IFdpdGhpbiB0aGUgcmVnaW9uLgorICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAgYHJlYWxf cGh5c19jdXJzb3JfZ2x5cGhgIGlzIG5vbi1OVUxMLgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgLSAgTm90IGF0IHRoZSBlbmQgb2YgdGhlIGxpbmUuICovCisgICAgICAgICAgICAgICAgICAg ICAgICBlbHNlIGlmIChJVF9DSEFSUE9TICgqaXQpID49IHJlZ2lvbl9iZWdpbm5pbmcKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIElUX0NIQVJQT1MgKCppdCkgPCByZWdpb25f ZW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAoIUlURVJBVE9SX0FUX0VO RF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8 IEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKCppdCkpICE9ICdcbicpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiByZWFsX3BoeXNfY3Vyc29yX2dseXBoICE9IE5VTEwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgIHRlbXBfYmdfZmFjZV9pZCA9IHByZXZpb3VzX2ZhY2VfaWQ7 CisgICAgICAgICAgICB9CisgIGRvdWJsZSByZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAoZm9yZWdy b3VuZCwgMCkpOworICBkb3VibGUgZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJFRiAoZm9yZWdyb3Vu ZCwgMSkpOworICBkb3VibGUgYmx1ZSA9IFhGTE9BVF9EQVRBIChBUkVGIChmb3JlZ3JvdW5kLCAy KSk7CisgIC8qIFNvbWUgb2YgdGhlc2UgdmFsdWVzIGNvbWUgdGhyb3VnaCBhcyAxLjAwMzkwNiwg d2hpY2ggY2F1c2VzIGEgYnJlYWthZ2UKKyAgb2YgdGhlIGNvbG9ycyBpbiB0aGF0IG11bHRpcGxp Y2F0aW9uIGJ5IHRoZSBiYXNlIHdpbGwgZXhjZWVkIHRoZSBiYXNlLiAqLworICBpZiAocmVkID4g MS4wKQorICAgIHJlZCA9IDEuMDsKKyAgaWYgKGdyZWVuID4gMS4wKQorICAgIGdyZWVuID0gMS4w OworICBpZiAoYmx1ZSA+IDEuMCkKKyAgICBibHVlID0gMS4wOworICBpZiAoIU5JTFAgKEJWQVIg KGN1cnJlbnRfYnVmZmVyLCBtY19zdGRlcnIpKSkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJcblwK KyAgICBWRVJUSUNBTCBSVUxFUiAtLSBTUEVDUzpcblwKKyAgICB4L29wb2ludF94ICglZClcblwK KyAgICB5ICglZClcblwKKyAgICBocG9zICglZClcblwKKyAgICB2cG9zICglZClcblwKKyAgICBm b3JlZ3JvdW5kOiAgUiAoJWYpIHwgRyAoJWYpIHwgQiAoJWYpXG5cCisgICAgYmFja2dyb3VuZCAo JXMpXG5cCisgICAgZmxhdm9yICglcylcbiIsCisgICAgb3BvaW50X3gsCisgICAgaXQtPmN1cnJl bnRfeSwKKyAgICB0ZW1wX2hwb3MsCisgICAgdnBvcywKKyAgICByZWQsIGdyZWVuLCBibHVlLAor ICAgIFNTREFUQSAobWNfYmdfZmFjZSAoaXQtPncsIHRlbXBfYmdfZmFjZV9pZCkpLAorICAgIChm bGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgID8gIk1DX0dMWVBIIgorICAgICAgOiBmbGF2b3IgPT0g TUNfR0xZUEhfVEFCCisgICAgICAgID8gIk1DX0dMWVBIX1RBQiIKKyAgICAgIDogZmxhdm9yID09 IE1DX0dMWVBITEVTUworICAgICAgICA/ICJNQ19HTFlQSExFU1MiCisgICAgICA6IGZsYXZvciA9 PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQU5HTEUKKyAgICAgICAgPyAiTUNfVkVSVElDQUxfQkFS X1JJR0hUX0FOR0xFIgorICAgICAgOiBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFT SAorICAgICAgICA/ICJNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIIgorICAgICAgOiBmbGF2b3Ig PT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgID8gIk1DX1ZFUlRJQ0FMX0JBUiIKKyAgICAgIDog Ik9PUFMiKSk7CisgICAgICAgICAgaWYgKGZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICAgICAg ICAmJiBwcmV2aW91c19yZWxhdGl2ZV94ID4gb3BvaW50X3gpCisgICAgICAgICAgICB7CisgICAg ICAgICAgICAgIHRlbXBfeCA9IHByaW9yX3ByZXZpb3VzX3JlbGF0aXZlX3g7CisgICAgICAgICAg ICAgIHRlbXBfaHBvcyA9IHByaW9yX3ByZXZpb3VzX2hwb3M7CisgICAgICAgICAgICB9CisgICAg ICAgICAgICBlbHNlIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAg ICYmIGZpbmFsX2xvb3BfcAorICAgICAgICAgICAgICAgICAgICAgJiYgcmMgIT0gTU9WRV9MSU5F X0NPTlRJTlVFRAorICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPCByZWxhdGl2ZV94 KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgdGVtcF94ID0gcHJldmlvdXNfcmVs YXRpdmVfeDsKKyAgICAgICAgICAgICAgICB0ZW1wX2hwb3MgPSBwcmV2aW91c19ocG9zOworICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB0ZW1wX3gg PSBvcG9pbnRfeDsKKyAgICAgICAgICBpbnQgZngsIGZ5LCBoOworICAgICAgICAgIG1jX2dldF9w aHlzX2N1cnNvcl9nZW9tZXRyeSAoaXQtPncsIGdseXBoX3JvdywgdGVtcF94LCAmZngsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9yb3ctPnksICZmeSwgdGVt cF9ocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgs IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgpOworICAgICAgICAgIGZ4ID0gV0lORE9XX1RFWFRf VE9fRlJBTUVfUElYRUxfWCAoaXQtPncsIG9wb2ludF94KTsKKyAgICAgICAgICBtY19jcm9zc2hh aXJzX2hlbHBlciAoaXQtPncsIHRlbXBfeCwgZngsIGl0LT5jdXJyZW50X3ksIC0xLCB0ZW1wX2hw b3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZwb3MsIGgsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1jX2JnX2xzbCAoaXQtPncsIHRlbXBfYmdfZmFjZV9pZCksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGZsYXZvciwgSVRfQ0hBUlBPUyAoKml0KSAtMSwgcmVzdWx0KTsKKyAg ICAgICAgICByZXR1cm47CisgICAgICAgICAgLyogRG8gTk9UIHJlbW92ZSB0aGlzIGBicmVha2Ag dW5kZXIgYW55IGNpcmN1bXN0YW5jZXMhISEgIFdpdGhvdXQgdGhpcworICAgICAgICAgIGBicmVh a2AsIHRoZSBsb29wIGNvbnRpbnVlcyB1bnRpbCBgZmluYWxfbG9vcF9wYCBhbmQgcGxhY2VzIGFu CisgICAgICAgICAgZXJyb25lb3VzIHNlY29uZCBmYWtlIGN1cnNvciBvdmVyIHRoZSBmaXJzdCBv bmUuICBUaGF0IGVycm9yIGlzIHZpc2libGUKKyAgICAgICAgICB3aGVuIGRlYWxpbmcgd2l0aCBg TUNfR0xZUEhfVEFCYCBiZWNhdXNlIHRoZSB3cm9uZyBmYWNlX2lkIGlzIHVzZWQuCisgICAgICAg ICAgVGhlIGVycm9yIGlzIGRpZmZpY3VsdCB0byBkZWJ1ZyBiZWNhdXNlIGBvcG9pbnRfeGAgaXMg Y29ycmVjdC4gKi8KKyAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICB9CisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBTdG9yZSBWYWx1 ZXMgZm9yIE5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X3ByZXZpb3VzX2NoYXJh Y3RlciA9IChpdC0+YyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAwOworICAgICAgcHJpb3JfcHJldmlvdXNfY2hhcmFjdGVyID0gcHJl dmlvdXNfY2hhcmFjdGVyOworICAgICAgcHJldmlvdXNfY2hhcmFjdGVyID0gaXQtPmM7CisgICAg ICBwcmV2aW91c19wdCA9IElUX0NIQVJQT1MgKCppdCk7CisgICAgICBwcmV2aW91c19mYWNlX2lk ID0gaXQtPmZhY2VfaWQ7CisgICAgICBwcmlvcl9wcmV2aW91c19yZWxhdGl2ZV94ID0gcHJldmlv dXNfcmVsYXRpdmVfeDsKKyAgICAgIHByZXZpb3VzX3JlbGF0aXZlX3ggPSByZWxhdGl2ZV94Owor ICAgICAgaWYgKGdyZWVuX2xpZ2h0X3ApCisgICAgICAgIHsKKyAgICAgICAgICBzYXZlZF9jdXJy ZW50X3ggPSBpdC0+Y3VycmVudF94OworICAgICAgICAgIHNhdmVkX3JlbGF0aXZlX3hfZm9yX3Rh YiA9IHJlbGF0aXZlX3g7CisgICAgICAgIH0KKyAgICAgIHByaW9yX3ByZXZpb3VzX2hwb3MgPSBw cmV2aW91c19ocG9zOworICAgICAgLyogU29tZSBjaGFyYWN0ZXJzLCBlLmcuLCBhIGBidWZmZXIt ZGlzcGxheS10YWJsZScgY2hhcmFjdGVyIG9mIPCdk5UgaGF2ZSBhCisgICAgICBgZm9udC0+c3Bh Y2Vfd2lkdGhgIHRoYXQgaXMgbGVzcyB0aGFuIHRoZSBgZnJhbWVfY2hhcl93aWR0aGAuCisgICAg ICAtICAjMzAyMjYuICBCb3R0b20gbGluZTogdG8gZ2V0IGFjY3VyYXRlIHZhbHVlcyBvZiBwaXhl bCB3aWR0aCwgeW91IG5lZWQKKyAgICAgIHRvIHN1YnRyYWN0IGl0LT5jdXJyZW50X3ggdmFsdWUg YXQgc29tZSBwb3NpdGlvbiBmcm9tIGN1cnJlbnRfeCBhdCB0aGUKKyAgICAgIG5leHQgZ2x5cGgg cG9zaXRpb24uICBUaGlzIGlzIHRoZSBvbmx5IHJlbGlhYmxlIHdheSB0byBvYnRhaW4gYWNjdXJh dGUKKyAgICAgIHBpeGVsIHdpZHRoIHZhbHVlcyB3aGVuIHVzaW5nIHRoZSBtb3ZlX2l0XyogZnVu Y3Rpb25zLiAqLworICAgICAgaW50IGluY3JlbWVudCA9IChpdC0+cGl4ZWxfd2lkdGggPiAwCisg ICAgICAgICAgICAgICAgICAgICAgICYmIGl0LT5jICE9ICdcdCcKKyAgICAgICAgICAgICAgICAg ICAgICAgJiYgaXQtPmMgIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICA/IGl0LT5waXhlbF93 aWR0aAorICAgICAgICAgICAgICAgICAgICAgIDogKGZvbnRfc3BhY2Vfd2lkdGggIT0gZnJhbWVf Y2hhcl93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gZnJhbWVfY2hhcl93aWR0aAor ICAgICAgICAgICAgICAgICAgICAgICAgOiBmb250X3NwYWNlX3dpZHRoOworICAgICAgbmV3X3gg Kz0gaW5jcmVtZW50OworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIE1vdmUgdG8gWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgICAgcmMgPSAoSVRfQ0hBUlBP UyAoKml0KSA9PSBaVikKKyAgICAgICAgICAgICA/IE1PVkVfUE9TX01BVENIX09SX1pWCisgICAg ICAgICAgICAgOiBNT1ZFX1hfUkVBQ0hFRDsKKyAgICAgIC8qIFdoZW4gYGF1dG8taHNjcm9sbC1t b2RlJyBpcyBzZXQgdG8gYGN1cnJlbnQtbGluZWAgYW5kIHdlIGFyZSBob3Jpem9udGFsIHNjcm9s bGluZworICAgICAgYSBsb25nIGxpbmUgdGhhdCBhcHByb2FjaGVzIG9yIGV4Y2VlZHMgYW4gYGl0 LmN1cnJlbnQueGAgb2YgYXBwcm94aW1hdGVseSAxMDAwLCBgcmNgCisgICAgICB3aWxsIGVycm9u ZW91c2x5IHJldHVybiBlYXJseSB3aXRoIGEgTU9WRV9MSU5FX1RSVU5DQVRFRCBpbmRpY2F0b3Ig IHdpdGhvdXQgcHVzaGluZworICAgICAgZm9yd2FyZHMgdW50aWwgSVQgcmVhY2hlcyB0aGUgbmV3 X3guICBBcyBhIHdvcmthcm91bmQsIGlnbm9yZSBNT1ZFX0xJTkVfVFJVTkNBVEVELiAqLworICAg ICAgaWYgKElUX0NIQVJQT1MgKCppdCkgIT0gWlYKKyAgICAgICAgICAvKiBgSVRFUkFUT1JfQVRf RU5EX09GX0xJTkVfUGAgbWF5IGJlIGB0cnVlYCB3aGVuIElUIGlzIGF0IHRoZSBiZWdpbm5pbmcg b2YgYSBsaW5lLiAqLworICAgICAgICAgIC8qICYmICFJVEVSQVRPUl9BVF9FTkRfT0ZfTElORV9Q IChpdCkgKi8KKyAgICAgICAgICAmJiAoRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgIT0g J1xuJworICAgICAgICAgICAgICB8fCAoRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0g J1xuJworICAgICAgICAgICAgICAgICAgJiYgaXQtPmMgPT0gMCkpCisgICAgICAgICAgJiYgaXQt PmN1cnJlbnRfeCArIGZvbnRfc3BhY2Vfd2lkdGggPD0gbmV3X3gKKyAgICAgICAgICAmJiAocmMg PT0gTU9WRV9YX1JFQUNIRUQKKyAgICAgICAgICAgICAgfHwgcmMgPT0gTU9WRV9MSU5FX1RSVU5D QVRFRAorICAgICAgICAgICAgICB8fCAoaXQtPmxpbmVfd3JhcCA9PSBXT1JEX1dSQVAKKyAgICAg ICAgICAgICAgICAgICYmIHJjID09IE1PVkVfUE9TX01BVENIX09SX1pWKSkpCisgICAgICAgIHsK KyAgICAgICAgICBzdHJ1Y3QgaXQgc2F2ZWRfaXQ7CisgICAgICAgICAgdm9pZCAqc2F2ZWRfaXRk YXRhID0gYmlkaV9zaGVsdmVfY2FjaGUgKCk7CisgICAgICAgICAgaW50IHByZXZfeDsKKyAgICAg ICAgICBTQVZFX0lUIChzYXZlZF9pdCwgKml0LCBzYXZlZF9pdGRhdGEpOworICAgICAgICAgIHJj ID0gbW92ZV9pdF9pbl9kaXNwbGF5X2xpbmVfdG8gKGl0LCBaViwgbmV3X3gsIE1PVkVfVE9fUE9T IHwgTU9WRV9UT19YKTsKKyAgICAgICAgICAvKiBXaGVuIHdvcmQtd3JhcCBpcyBvbiwgVE9fWCBt YXkgbGllIHBhc3QgdGhlIGVuZCBvZiBhIHdyYXBwZWQgbGluZS4KKyAgICAgICAgICBUaGVuIGl0 LT5jdXJyZW50IGlzIHRoZSBjaGFyYWN0ZXIgb24gdGhlIG5leHQgbGluZSwgc28gYmFja3RyYWNr IHRvIHRoZQorICAgICAgICAgIHNwYWNlIGJlZm9yZSB0aGUgd3JhcCBwb2ludC4gICovCisgICAg ICAgICAgaWYgKGl0LT5saW5lX3dyYXAgPT0gV09SRF9XUkFQCisgICAgICAgICAgICAgICYmIHJj ID09IE1PVkVfTElORV9DT05USU5VRUQpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHBy ZXZfeCA9IG1heCAoaXQtPmN1cnJlbnRfeCAtIDEsIDApOworICAgICAgICAgICAgICBSRVNUT1JF X0lUIChpdCwgJnNhdmVkX2l0LCBzYXZlZF9pdGRhdGEpOworICAgICAgIC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XNpYmxlX3g7CisgIGl0X3N0YXJ0ID0gSVRfQ0hBUlBPUyAoaXQpOworICBTQVZFX0lUIChz YXZlZF9pdF9mb3Jfd2luZG93X3N0YXJ0LCBpdCwgc2F2ZWRfaXRkYXRhX2Zvcl93aW5kb3dfc3Rh cnQpOworICAvKiBGaW5pc2ggcHJpbWluZyB0aGUgSVQgZm9yIHBvdGVudGlhbCBsaW5lIG51bWJl cnMuICovCisgIGlmICghTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKQorICAgICAgJiYgIUVR IChWZGlzcGxheV9saW5lX251bWJlcnMsIFF2aXN1YWwpKQorICAgIHsKKyAgICAgIGl0LmZpcnN0 X3Zpc2libGVfeCA9IDA7CisgICAgICBtb3ZlX2l0X2J5X2xpbmVzICgmaXQsIDEpOworICAgICAg bG51bV93aWR0aCA9IGl0LmxudW1fd2lkdGg7CisgICAgICBsbnVtX3BpeGVsX3dpZHRoID0gaXQu bG51bV9waXhlbF93aWR0aDsKKyAgICAgIFJFU1RPUkVfSVQgKCZpdCwgJnNhdmVkX2l0X2Zvcl93 aW5kb3dfc3RhcnQsIHNhdmVkX2l0ZGF0YV9mb3Jfd2luZG93X3N0YXJ0KTsKKyAgICAgIGl0LmZp cnN0X3Zpc2libGVfeCA9IGZpcnN0X3g7CisgICAgICBpdC5sYXN0X3Zpc2libGVfeCA9IGxhc3Rf eDsKKyAgICAgIGl0LmxudW1fd2lkdGggPSBsbnVtX3dpZHRoOworICAgICAgaXQubG51bV9waXhl bF93aWR0aCA9IGxudW1fcGl4ZWxfd2lkdGg7CisgICAgICBTQVZFX0lUIChzYXZlZF9pdF9mb3Jf d2luZG93X3N0YXJ0LCBpdCwgc2F2ZWRfaXRkYXRhX2Zvcl93aW5kb3dfc3RhcnQpOworICAgIH0K Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg UkVNT1ZFIEdMWVBIIENVUlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICAvKiBSZW1v dmUgdGhlIGN1cnNvcnMgdXNpbmcgdGhlIGNhY2hlIGlmIHRoZSBjb25kaXRpb25zIGFyZSBzYXRp c2ZpZWQuICovCisgIGlmICgocmVtb3ZlICYmICFOSUxQICh3LT5tdWx0aXBsZV9jdXJzb3JzX2Nh Y2hlKSAmJiBOSUxQIChCVkFSIChiLCBtY19nbHlwaF9saXN0KSkpCisgICAgICB8fCAoIU5JTFAg KHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpICYmICFOSUxQIChCVkFSIChiLCBtY19nbHlwaF9s aXN0KSkgJiYgKHJlbW92ZSB8fCB3ICE9IHN3KSkpCisgICAgeworICAgICAgLyogRXJhc2UgdGhl IHJlYWwgY3Vyc29yIHNvIHRoYXQgdGhlIHdob2xlIHZlcnRpY2FsIGxpbmUgZ2V0cyByZW1vdmVk LCBub3QganVzdCB0aGUgZmFrZSBjdXJzb3JzLiAqLworICAgICAgbWNfZXJhc2VfZ2x5cGhfY3Vy c29yICh3LCB3LT5waHlzX2N1cnNvci54LCB3LT5waHlzX2N1cnNvci55LCB3LT5waHlzX2N1cnNv ci5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5waHlzX2N1cnNvci52cG9z LCB3LT5waHlzX2N1cnNvcl90eXBlKTsKKyAgICAgIC8qIFByb2Nlc3MgdGhlIE1DX0dMWVBIX0NB Q0hFLiAqLworICAgICAgaWYgKCFOSUxQICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkKKyAg ICAgICAgeworICAgICAgICAgIGZvciAodmxpc3QgPSBYQ0FSIChYQ0RSICh3LT5tdWx0aXBsZV9j dXJzb3JzX2NhY2hlKSk7CisgICAgICAgICAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgICAg ICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IHRoaXJ0ZWVuX2VsZW1lbnRzID0gWENBUiAoWENEUiAoWENBUiAodmxpc3QpKSk7CisgICAgICAg ICAgICAgIHggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIHRoaXJ0ZWVuX2VsZW1lbnRz KSk7CisgICAgICAgICAgICAgIGZ4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB0aGly dGVlbl9lbGVtZW50cykpOworICAgICAgICAgICAgICB5ID0gWElOVCAoRm50aCAobWFrZV9udW1i ZXIgKDIpLCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAgICAgICAgICBmeSA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICgzKSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICAgICAg aHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg0KSwgdGhpcnRlZW5fZWxlbWVudHMpKTsK KyAgICAgICAgICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwgdGhpcnRl ZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICAgICAgaCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICg2KSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSBt Y19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX251bWJlciAoNyksIHRoaXJ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2Vf bnVtYmVyICg4KSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICAgICAgZm9yZWdyb3Vu ZCA9IEZudGggKG1ha2VfbnVtYmVyICg5KSwgdGhpcnRlZW5fZWxlbWVudHMpOworICAgICAgICAg ICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDEwKSwgdGhpcnRlZW5fZWxlbWVu dHMpOworICAgICAgICAgICAgICBmbGF2b3IgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTEp LCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAgICAgICAgICBwb3NpbnQgPSBYSU5UIChGbnRo IChtYWtlX251bWJlciAoMTIpLCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAgICAgICAgICBp ZiAoZmxhdm9yID09IE1DX0dMWVBITEVTUykKKyAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNl X2h5YnJpZCAodywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCBoLCBjdXJzb3JfdHlwZSwgY3Vy c29yX3dpZHRoLCBiYWNrZ3JvdW5kLCBmbGF2b3IpOworICAgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICAgIG1jX2VyYXNlX2dseXBoX2N1cnNvciAodywgeCwgeSwgaHBvcywgdnBv cywgY3Vyc29yX3R5cGUpOworICAgICAgICAgICAgfQorICAgICAgICAgIGlmIChOSUxQIChCVkFS IChiLCBtY19nbHlwaF9saXN0KSkpCisgICAgICAgICAgICB3c2V0X211bHRpcGxlX2N1cnNvcnNf Y2FjaGUgKHcsIFFuaWwpOworICAgICAgICB9CisgICAgICB3LT5tYy5lcmFzZV9nbHlwaF9jdXJz b3IgPSBmYWxzZTsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFJFRFJBVyBHTFlQSCBDVVJTT1JTCisqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKyAgLyogSWY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AgICAgICAgICB2bGlzdCA9IFhD RFIgKHZsaXN0KSkKKyAgICAgICAgeworICAgICAgICAgIHRoaXJ0ZWVuX2VsZW1lbnRzID0gWENB UiAoWENEUiAoWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgeCA9IFhJTlQgKEZudGggKG1ha2Vf bnVtYmVyICgwKSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICBmeCA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICgxKSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICB5ID0g WElOVCAoRm50aCAobWFrZV9udW1iZXIgKDIpLCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAg ICAgIGZ5ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDMpLCB0aGlydGVlbl9lbGVtZW50cykp OworICAgICAgICAgIGhwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNCksIHRoaXJ0ZWVu X2VsZW1lbnRzKSk7CisgICAgICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1 KSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICBoID0gWElOVCAoRm50aCAobWFrZV9u dW1iZXIgKDYpLCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAgICAgIGN1cnNvcl90eXBlID0g bWNfbGlzcF90b19jdXJzb3JfdHlwZSAoRm50aCAobWFrZV9udW1iZXIgKDcpLCB0aGlydGVlbl9l bGVtZW50cykpOworICAgICAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVt YmVyICg4KSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICBmb3JlZ3JvdW5kID0gRm50 aCAobWFrZV9udW1iZXIgKDkpLCB0aGlydGVlbl9lbGVtZW50cyk7CisgICAgICAgICAgYmFja2dy b3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICgxMCksIHRoaXJ0ZWVuX2VsZW1lbnRzKTsKKyAgICAg ICAgICBmbGF2b3IgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTEpLCB0aGlydGVlbl9lbGVt ZW50cykpOworICAgICAgICAgIHBvc2ludCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxMiks IHRoaXJ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcs IHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg Zm9yZWdyb3VuZCwgTUNfR0xZUEgpOworICAgICAgICB9CisgICAgICB3LT5tYy5kcmF3X2dseXBo X2N1cnNvciA9IGZhbHNlOworICAgIH0KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBEUkFXIEdMWVBIIENVUlNPUlMgQU5FVworKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisgICAgLyogRHJhdyB0aGUgY3Vyc29ycyBhbmV3IGJlY2F1c2Ugc29t ZXRoaW5nIGhhcyBjaGFuZ2VkLCBlLmcuLCB0aGUgZmlyc3QgZWxlbWVudCBvZgorICAgICAgIHct Pm11bHRpcGxlX2N1cnNvcnNfY2FjaGUgaXMgTk9UIHRoZSBzYW1lIGFzIHRoZSBsb2NhbCB2YXJp YWJsZSBtY19nbHlwaF9saXN0OyBhbmQvb3IsIHRoZSBwcmV2aW91cy8KKyAgICAgICBjdXJyZW50 IHdpbmRvdy1zdGFydC93aW5kb3ctZW5kIGFyZSBOT1QgdGhlIHNhbWUgKGUuZy4sIHNjcm9sbGlu ZyBoYXMgb2NjdXJyZWQpLgorICAgICAgIFNlbWktZXhwZW5zaXZlIGNhbGN1bGF0aW9uIG9mIGNv b3JkaW5hdGVzIGlzIHJlcXVpcmVkLiAqLworICAgIGVsc2UgaWYgKCFyZW1vdmUKKyAgICAgICAg ICAgICAmJiB3ID09IHN3CisgICAgICAgICAgICAgJiYgdy0+bWMuY3VycmVudF9zdGFydAorICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtY19nbHlwaF9saXN0KSkpCisgICAgICB7Cisg ICAgICAgIGZvciAodmxpc3QgPSBCVkFSIChiLCBtY19nbHlwaF9saXN0KTsKKyAgICAgICAgICAg ICBDT05TUCAodmxpc3QpOworICAgICAgICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIHNwZWNzID0gWENBUiAodmxpc3QpOworICAgICAgICAgICAg cG9zaW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBzcGVjcykpOworICAgICAgICAg ICAgbGlzcF90eXBlID0gRm50aCAobWFrZV9udW1iZXIgKDEpLCBzcGVjcyk7CisgICAgICAgICAg ICBpZiAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gbWNf bGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSk7CisgICAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUg KGxpc3BfdHlwZSk7CisgICAgICAgICAgICBpZiAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAg ICAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKFhDQVIgKFhDRFIgKGxpc3BfdHlwZSkpKTsKKyAg ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCA9IDE7CisgICAg ICAgICAgICBmb3JlZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDIpLCBzcGVjcyk7CisgICAg ICAgICAgICBpZiAoU1RSSU5HUCAoZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgIGZvcmVncm91 bmQgPSBtY19jb2xvcl92ZWN0b3JfY2FsYyAodywgZm9yZWdyb3VuZCk7CisgICAgICAgICAgICBp ZiAocG9zaW50ID49IHctPm1jLmN1cnJlbnRfc3RhcnQKKyAgICAgICAgICAgICAgICAmJiBwb3Np bnQgPD0gdy0+bWMuY3VycmVudF9lbmQpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICBSRVNUT1JFX0lUICgmaXQsICZzYXZlZF9pdF9mb3Jfd2luZG93X3N0YXJ0LCBzYXZlZF9pdGRh dGFfZm9yX3dpbmRvd19zdGFydCk7CisgICAgICAgICAgICAgICAgbW92ZV9pdF90byAoJml0LCBw b3NpbnQsIGl0Lmxhc3RfdmlzaWJsZV94LCBpdC5sYXN0X3Zpc2libGVfeSAtIDEsIC0xLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgIE1PVkVfVE9fUE9TIHwgTU9WRV9UT19YIHwgTU9WRV9U T19ZKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKElUX0NIQVJQT1MgKGl0KSA9 PSBwb3NpbnQpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgdm9mZnNldCA9 IGl0LnZwb3M7CisgICAgICAgICAgICAgICAgUkVTVE9SRV9JVCAoJml0LCAmc2F2ZWRfaXRfZm9y X3dpbmRvd19zdGFydCwgc2F2ZWRfaXRkYXRhX2Zvcl93aW5kb3dfc3RhcnQpOworICAgICAgICAg ICAgICAgIG1vdmVfaXRfYnlfbGluZXMgKCZpdCwgdm9mZnNldCk7CisgICAgICAgICAgICAgICAg bWNfbW92ZV9pdCAoJml0LCBNVUxUSVBMRV9DVVJTT1JTLCBzcGVjcywgJnJlc3VsdCk7CisgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgIHggPSAtMTsKKyAgICAgICAgICAgICAgICAgIGZ4ID0gLTE7CisgICAgICAg ICAgICAgICAgICB5ID0gLTE7CisgICAgICAgICAgICAgICAgICBmeSA9IC0xOworICAgICAgICAg ICAgICAgICAgaHBvcyA9IC0xOworICAgICAgICAgICAgICAgICAgdnBvcyA9IC0xOworICAgICAg ICAgICAgICAgICAgaCA9IC0xOworICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCA9IG1jX2Jn X2xzbCAoaXQudywgREVGQVVMVF9GQUNFX0lEKTsKKyAgICAgICAgICAgICAgICAgIGZsYXZvciA9 IE1DX0dMWVBIOworICAgICAgICAgICAgICAgICAgdGhpcnRlZW5fZWxlbWVudHMgPSBsaXN0biAo Q09OU1RZUEVfSEVBUCwgMTMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbWFrZV9udW1iZXIgKHgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1ha2VfbnVtYmVyIChmeCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHkpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChmeSksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKGhwb3MpLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyICh2cG9zKSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoaCksCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfY3Vyc29yX3R5cGVf dG9fbGlzcCAoY3Vyc29yX3R5cGUpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1ha2VfbnVtYmVyIChjdXJzb3Jfd2lkdGgpLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoZmxhdm9yKSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAocG9zaW50KSk7Cisg ICAgICAgICAgICAgICAgICB0ZW1wID0gRmNvbnMgKHNwZWNzLCBGY29ucyAodGhpcnRlZW5fZWxl bWVudHMsIFFuaWwpKTsKKyAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IEZjb25zICh0ZW1wLCBy ZXN1bHQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisvKiBgdy0+bXVsdGlwbGVf Y3Vyc29yc19jYWNoZScgaXMgc2V0IGZvciB0aGUgd2luZG93LCBub3QgYnVmZmVyK3dpbmRvdyAt LSBpLmUuLCBhbGwgYnVmZmVycyBhcHBlYXJpbmcKK2luIHRoZSBzYW1lIHdpbmRvdyB2aWEgYHN3 aXRjaC10by1idWZmZXInIHdpbGwgaGF2ZSBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZScuICBU aGlzIGJlaGF2aW9yCitpcyBjb25zaXN0ZW50IHdpdGggZnVuY3Rpb25zIHN1Y2ggYXMgYHNldC13 aW5kb3ctZGlzcGxheS10YWJsZScuICBXZSBkZWFsIHdpdGggdGhpcyBpbgorYG5zdGVybS5tJyAv IGB3MzJ0ZXJtLmMnIC8gYHh0ZXJtLmMnIGJ5IGNvbXBhcmluZyBgdy0+Y29udGVudHMnIHRvIHRo ZSB2YWx1ZSBvZiB0aGUgYGJ1ZicKK3N0b3JlZCBpbiBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNo ZSc6ICAoRVEgKHctPmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMiksIHctPm11 bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkpICovCisgICAgICAgIGlmICghTklMUCAocmVzdWx0KSkK KyAgICAgICAgICB3c2V0X211bHRpcGxlX2N1cnNvcnNfY2FjaGUgKHcsIGxpc3RuIChDT05TVFlQ RV9IRUFQLCAzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlZBUiAo YiwgbWNfZ2x5cGhfbGlzdCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBGcmV2ZXJzZSAocmVzdWx0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEZjb25zIChidWYsIFFuaWwpKSk7CisgICAgICAgIHctPm1jLmRyYXdfZ2x5cGhfY3Vyc29y ID0gZmFsc2U7CisgICAgICB9CisgIGJpZGlfdW5zaGVsdmVfY2FjaGUgKGl0ZGF0YSwgZmFsc2Up OworfQorCit2b2lkCittY19kcmF3X2Nyb3NzaGFpcnMgKHN0cnVjdCB3aW5kb3cgKncpCit7Cisg IC8qIEVsaSBaLjogIFRoaXMgZG9lc24ndCBmZWVsIHJlbGV2YW50LiAgWW91IGNhbiBhbHdheXMg cmVkaXNwbGF5IGEgd2luZG93IHRoYXQgaXMKKyAgbm90IHRoZSBzZWxlY3RlZCB3aW5kb3csIHBy b3ZpZGVkIHRoYXQgeW91IHRha2UgY2FyZSB0byBzd2l0Y2ggdG8gaXRzIGJ1ZmZlcgorICAocmVk aXNwbGF5IGRvZXMgdGhhdCBhbHJlYWR5KS4gKi8KKyAgaWYgKHcgIT0gWFdJTkRPVyAoc2VsZWN0 ZWRfd2luZG93KSkKKyAgICByZXR1cm47CisgIC8qIEVsaSBaLjogIEhvdyBkaWQgeW91IGdldCBp bnRvIHRoaXMgc2l0dWF0aW9uPyAgSXQgc2hvdWxkbid0IGhhcHB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1cm47 CisgIC8qIEVsaSBaLjogIExpa2V3aXNlLiAgTWFya2VycyBhcmUgdXBkYXRlZCB3aGVuIGEgYnVm ZmVyIGlzIG1vZGlmaWVkLCBzbyB0aGlzCisgIHNob3VsZCBuZXZlciBoYXBwZW4uICovCisgIGJv b2wgYmFyZl9jcmFzaF90d28gPSAoY2hhcnBvcyA9PSBCWVRFX1RPX0NIQVIgKGJ5dGVwb3MpKSA/ IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAgIHJldHVybjsKKyAgaWYg KCFCVUZGRVJQIChidWYpKQorICAgIHJldHVybjsKKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3Nz aGFpcnMpKSkKKyAgICByZXR1cm47CisgIGlmIChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzX2hv cml6b250YWxfcnVsZXIpKQorICAgICAgJiYgTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc192ZXJ0 aWNhbF9ydWxlcikpKQorICAgIHJldHVybjsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgU1RBUlQgVEhFIFRJTUVSCisqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgY2xvY2tfdCBzdGFydCwgZW5k OworICBkb3VibGUgY3B1X3RpbWVfdXNlZDsKKyAgY2hhciBidWZfdGltZVtEQkxfQlVGU0laRV9C T1VORF07CisgIHN0YXJ0ID0gY2xvY2soKTsKKyNlbmRpZgorKi8KKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKgorICAgICAg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dCBvcG9pbnRfcHQgPSBQ VDsKKyAgaW50IHJlbGF0aXZlX3ggPSAwOworICBpbnQgcHJldmlvdXNfaHBvcyA9IC0xOworICBp bnQgb3BvaW50X3ggPSB3LT5vdXRwdXRfY3Vyc29yLng7CisgIGludCBvcG9pbnRfeSA9IHctPm91 dHB1dF9jdXJzb3IueTsKKyAgaW50IG9wb2ludF9ocG9zID0gdy0+b3V0cHV0X2N1cnNvci5ocG9z OworICBpbnQgb3BvaW50X3Zwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLnZwb3M7CisgIHB0cmRpZmZf dCBjdXJyZW50X2NvbCA9IGN1cnJlbnRfY29sdW1uICgpOworICBib29sIGZpbGxfY29sdW1uX3Ag PSAhTklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgcHRyZGlmZl90IGZpbGxfY29sID0g WElOVCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgTGlzcF9PYmplY3QgcmVzdWx0ID0gUW5p bDsKKyAgaW50IGZsYXZvcjsKKyAgLyogVmFsdWVzIGZvciB0aGUgY3VycmVudCBjb2x1bW4gb2Yg dGhlIHZlcnRpY2FsIGxpbmUuICovCisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBGbWFrZV92 ZWN0b3IgKG1ha2VfbnVtYmVyICgzKSwgUW5pbCk7CisgIGVudW0gZmFjZV9pZCBmYWNlX2lkOwor ICBzdHJ1Y3QgZ2x5cGggKnBoeXNfY3Vyc29yX2dseXBoOworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENPTE9SIE9GIENST1NTSEFJUlMKKyoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworICBlbnVtIGZhY2VfaWQgZXZlbl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fZmFj ZV9pZCk7CisgIExpc3BfT2JqZWN0IGZpbGxfY29sb3IgPSBmaWxsX2ZhY2UtPmxmYWNlW0xGQUNF X0ZPUkVHUk9VTkRfSU5ERVhdOworICBDSEVDS19TVFJJTkcgKGZpbGxfY29sb3IpOworICBMaXNw X09iamVjdCBmaWxsX2NvbG9yX3ZlY3RvciA9IG1jX2NvbG9yX3ZlY3Rvcl9jYWxjICh3LCBmaWxs X2NvbG9yKTsKKyAgLyogcmVkICovCisgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAg JiYgIWZpbGxfY29sdW1uX3ApCisgICAgZm9yZWdyb3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7Cisg IC8qIHllbGxvdyAqLworICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICYmICFmaWxs X2NvbHVtbl9wKQorICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyogcmVk ICovCisgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgJiYgZmlsbF9jb2x1bW5fcAor ICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmlsbF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IG9kZF9j b2xvcl92ZWN0b3I7CisgIC8qIHllbGxvdyAqLworICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAK KyAgICAgICYmIGZpbGxfY29sdW1uX3AKKyAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29s KQorICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyogZ3JlZW4gKi8KKyAg aWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICYmIGN1cnJlbnRfY29sID4gZmlsbF9jb2wpCisgICAg Zm9yZWdyb3VuZCA9IGZpbGxfY29sb3JfdmVjdG9yOworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq CisgICAgICAgICAgICAgICAgICAgICAgU1RBUlQgRElTUExBWSBBTkQgUFJJTUUgSVQKKyoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworICAvKiBCZWdpbiB0aGUgam91cm5leSBhdCB3LT5zdGFydC4g Ki8KKyAgU0VUX1RFWFRfUE9TX0ZST01fTUFSS0VSIChzdGFydF90ZXh0X3Bvc2l0aW9uLCB3LT5z dGFydCk7CisgIHN0YXJ0X2Rpc3BsYXkgKCZpdCwgdywgc3RhcnRfdGV4dF9wb3NpdGlvbik7Cisg IGZpcnN0X3ggPSBpdC5maXJzdF92aXNpYmxlX3g7CisgIGxhc3RfeCA9IGl0Lmxhc3RfdmlzaWJs ZV94OworICBpdF9zdGFydCA9IElUX0NIQVJQT1MgKGl0KTsKKyAgU0FWRV9JVCAoc2F2ZWRfaXRf Zm9yX3dpbmRvd19zdGFydCwgaXQsIHNhdmVkX2l0ZGF0YV9mb3Jfd2luZG93X3N0YXJ0KTsKKyAg LyogRmluaXNoIHByaW1pbmcgdGhlIElUIGZvciBwb3RlbnRpYWwgbGluZSBudW1iZXJzLiAqLwor ICBpZiAoIU5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykKKyAgICAgICYmICFFUSAoVmRpc3Bs YXlfbGluZV9udW1iZXJzLCBRdmlzdWFsKSkKKyAgICB7CisgICAgICBpdC5maXJzdF92aXNpYmxl X3ggPSAwOworICAgICAgbW92ZV9pdF9ieV9saW5lcyAoJml0LCAxKTsKKyAgICAgIGxudW1fd2lk dGggPSBpdC5sbnVtX3dpZHRoOworICAgICAgbG51bV9waXhlbF93aWR0aCA9IGl0LmxudW1fcGl4 ZWxfd2lkdGg7CisgICAgICBSRVNUT1JFX0lUICgmaXQsICZzYXZlZF9pdF9mb3Jfd2luZG93X3N0 YXJ0LCBzYXZlZF9pdGRhdGFfZm9yX3dpbmRvd19zdGFydCk7CisgICAgICBpdC5maXJzdF92aXNp YmxlX3ggPSBmaXJzdF94OworICAgICAgaXQubGFzdF92aXNpYmxlX3ggPSBsYXN0X3g7CisgICAg ICBpdC5sbnVtX3dpZHRoID0gbG51bV93aWR0aDsKKyAgICAgIGl0LmxudW1fcGl4ZWxfd2lkdGgg PSBsbnVtX3BpeGVsX3dpZHRoOworICAgICAgU0FWRV9JVCAoc2F2ZWRfaXRfZm9yX3dpbmRvd19z dGFydCwgaXQsIHNhdmVkX2l0ZGF0YV9mb3Jfd2luZG93X3N0YXJ0KTsKKyAgICB9CisgIC8qIFRo aXMgbWlnaHQgaGFwcGVuIG9uIE9TWCAxMC4xMSB3aGVuIHJlc3RvcmluZyBkZXNrdG9wIGF0IHRo ZSBiZWdpbm5pbmcKKyAgb2YgYSBuZXcgc2Vzc2lvbj8gKi8KKyAgaWYgKGl0X3N0YXJ0ID4gb3Bv aW50X3B0KQorICAgIHJldHVybjsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgRVJBU0UgVEhFIFJFQUwgQ1VSU09SCisqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIGB3LT5waHlzX2N1cnNvci54L3kvaHBvcy92cG9zYCBhcmUgaW5jb3JyZWN0 IGFmdGVyIGV2YWx1YXRpbmcgKHNjcm9sbC1sZWZ0IDEpCithIGNvdXBsZSBvZiB0aW1lcy4gIFJl ZGlzcGxheSBlcmFzZXMgdGhlIHJlYWwgY3Vyc29yIGFsbW9zdCBpbW1lZGlhdGVseSBhZnRlcgor YG1jX2RyYXdfY3Jvc3NoYWlycycgcnVucyBpdHMgY291cnNlIC0tIGFsbW9zdCB0b28gcXVpY2ts eSB0byBzZWUgaXQgaGFwc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3IuaHBvcyA9IG9wb2ludF9ocG9zOworICB3LT5waHlzX2N1cnNv ci52cG9zID0gb3BvaW50X3Zwb3M7CisgIGVyYXNlX3BoeXNfY3Vyc29yICh3KTsKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICBSRVBMQUNFIFRIRSBS RUFMIENVUlNPUgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGdseXBoX3JvdyA9IE1BVFJJ WF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCBvcG9pbnRfdnBvcyk7CisgIGlmICghY3Vyc29yX2lu X2ZyaW5nZV9wKQorICAgIGZsYXZvciA9IE1DX0dMWVBIOworICAgIC8qIFRoaXMgY29uZGl0aW9u IHByb2JhYmx5IGRvZXMgbm90IGV4aXN0IGZvciB0aGUgcmVhbCBmYWtlIGN1cnNvci4gKi8KKyAg ICBlbHNlIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAmJiBnbHlwaF9yb3ct PmNvbnRpbnVlZF9wKQorICAgICAgZmxhdm9yID0gTUNfUElMQ1JPVzsKKyAgICAgIGVsc2UgaWYg KGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgJiYgZ2x5cGhfcm93LT50cnVuY2F0 ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgZmxhdm9yID0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdI VF9BTkdMRTsKKyAgICAgICAgZWxzZSBpZiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAg ICAgICAgICYmICFnbHlwaF9yb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICYmICFn bHlwaF9yb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgIGZsYXZvciA9IE1DX0hP TExPV19SRUNUQU5HTEU7CisgIGZhY2VfaWQgPSAoKHBoeXNfY3Vyc29yX2dseXBoID0gZ2V0X3Bo eXNfY3Vyc29yX2dseXBoICh3KSkgPT0gTlVMTCkKKyAgICAgICAgICAgICAgPyBERUZBVUxUX0ZB Q0VfSUQKKyAgICAgICAgICAgICAgOiBwaHlzX2N1cnNvcl9nbHlwaC0+ZmFjZV9pZDsKKyAgaW50 IG9wb2ludF9meCA9IC0xOworICBpbnQgb3BvaW50X2Z5ID0gLTE7CisgIGludCBvcG9pbnRfaCA9 IC0xOworICBpZiAoZmxhdm9yID09IE1DX0dMWVBIKQorICAgIG1jX2dldF9waHlzX2N1cnNvcl9n ZW9tZXRyeSAodywgZ2x5cGhfcm93LCBvcG9pbnRfeCwgJm9wb2ludF9meCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG9wb2ludF95LCAmb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywg b3BvaW50X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3BvaW50X2gs IEhPTExPV19CT1hfQ1VSU09SLCBjdXJzb3Jfd2lkdGgpOworICBtY19jcm9zc2hhaXJzX2hlbHBl ciAodywgb3BvaW50X3gsIG9wb2ludF9meCwgb3BvaW50X3ksIG9wb2ludF9meSwKKyAgICAgICAg ICAgICAgICAgICAgICAgIG9wb2ludF9ocG9zLCBvcG9pbnRfdnBvcywgb3BvaW50X2gsCisgICAg ICAgICAgICAgICAgICAgICAgICBIT0xMT1dfQk9YX0NVUlNPUiwgY3Vyc29yX3dpZHRoLAorICAg ICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgbWNfYmdfbHNsICh3LCBmYWNlX2lkKSwK KyAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvciwgb3BvaW50X3B0LCAmcmVzdWx0KTsKKyAg bWNfY3Jvc3NoYWlyc19oZWxwZXIgKHcsIG9wb2ludF94LCBvcG9pbnRfZngsIG9wb2ludF95LCBv cG9pbnRfZnksCisgICAgICAgICAgICAgICAgICAgICAgICBvcG9pbnRfaHBvcywgb3BvaW50X3Zw b3MsIG9wb2ludF9oLAorICAgICAgICAgICAgICAgICAgICAgICAgSE9MTE9XX0JPWF9DVVJTT1Is IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQsIG1jX2Jn X2xzbCAodywgZmFjZV9pZCksCisgICAgICAgICAgICAgICAgICAgICAgICBPVkVSTEFZX0FSUk9X X0JJVE1BUCwgb3BvaW50X3B0LCAmcmVzdWx0KTsKKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3Nz aGFpcnNfaG9yaXpvbnRhbF9ydWxlcikpKQorICAgIGdvdG8gdmVydGljYWxfcnVsZXI7CisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICBIT1JJWk9OVEFMIFJVTEVSOiAg RklSU1QgWCA9PiBFT0wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kCisgICAg ICAgSE9SSVpPTlRBTCBSVUxFUjogIERSQVcgRkxPQVRJTkcgR0xZUEhMRVNTIExJTkUgKEVPTCBU TyBGUklOR0UpCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgLyogUGxhY2UgdGhlIElUIG9u IHRoZSBjdXJyZW50IGxpbmUgY29udGFpbmluZyBQVC4gKi8KKyAgaW50IHZvZmZzZXQgPSAoaGVh ZGVyX2xpbmVfaGVpZ2h0ID4gMAorICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA+IDAp CisgICAgICAgICAgICAgICAgICA/IG9wb2ludF92cG9zIC0gMQorICAgICAgICAgICAgICAgICAg OiBvcG9pbnRfdnBvczsKKyAgaWYgKHZvZmZzZXQgPiAwKQorICAgIG1vdmVfaXRfYnlfbGluZXMg KCZpdCwgdm9mZnNldCk7CisgIG1jX21vdmVfaXQgKCZpdCwgSE9SSVpPTlRBTF9SVUxFUiwgZm9y ZWdyb3VuZCwgJnJlc3VsdCk7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAg VkVSVElDQUwgUlVMRVI6ICBDT01CSU5BVElPTiBPRiBHTFlQSCAmIEdMWVBITEVTUyBDVVJTT1JT CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgdmVydGljYWxfcnVsZXI6CisgIGlmIChOSUxQ IChCVkFSIChiLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkpCisgICAgZ290byBjcm9zc2hh aXJzX2ZpbmlzaDsKKyAgUkVTVE9SRV9JVCAoJml0LCAmc2F2ZWRfaXRfZm9yX3dpbmRvd19zdGFy dCwgc2F2ZWRfaXRkYXRhX2Zvcl93aW5kb3dfc3RhcnQpOworICB3aGlsZSAodHJ1ZSkKKyAgICB7 CisgICAgICBtY19tb3ZlX2l0ICgmaXQsIFZFUlRJQ0FMX1JVTEVSLCBmb3JlZ3JvdW5kLCAmcmVz dWx0KTsKKyAgICAgIC8qIFRoaXMgY29tYmluYXRpb24gb2YgYSBaViBjaGVjayBiZWZvcmUgYG1v dmVfaXRfYnlfbGluZXMnIGZvbGxvd2VkIGJ5IGEKKyAgICAgIFkgY2hlY2sgc3Vic2VxdWVudCB0 aGVyZXRvIGdpdmVzIHVzIHRoZSBGRUFUVVJFIG9mIGhhdmluZyBhIHZlcnRpY2FsIGxpbmUKKyAg ICAgIGZvbGxvd2luZyBhIGxpbmUgdGVybWluYXRpbmcgd2l0aCBaVi4gIFdoZXJlYXMgYGRpc3Bs YXktbGluZS1udW1iZXJzLW1vZGUnCisgICAgICBoYXMgYSBGRUFUVVJFIG9mIHN1cHByZXNzaW5n IHRoZSBsaW5lIG51bWJlcnMgaW4gdGhpcyBzaXR1YXRpb24sIHdlIGRyYXcKKyAgICAgIGNyb3Nz aGFpcnMgaW4gdGhhdCBzaXR1YXRpb24uICBgbWNfbW92ZV9pdCcgaGFzIGJlZW4KKyAgICAgIGVx dWlwcGVkIHdpdGggYSBjb25kaXRpb24gdG8gdGVzdCBmb3IgWlYgYXQgdGhlIG91dHNldCBhbmQg cmV0dXJuIGlmIHRydWUsCisgICAgICB3aGljaCBwcmV2ZW50cyBFbWFjcyBmcm9tIGNyYXNoaW5n LiAqLworICAgICAgaWYgKElUX0NIQVJQT1MgKGl0KSA9PSBaVikKKyAgICAgICAgYnJlYWs7Cisg ICAgICBtb3ZlX2l0X2J5X2xpbmVzICgmaXQsIDEpOworICAgICAgaWYgKGl0LmN1cnJlbnRfeSA+ PSBpdC5sYXN0X3Zpc2libGVfeSkKKyAgICAgICAgYnJlYWs7CisgICAgfQorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNFVCBUSEUgQ0FD SEUKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBjcm9zc2hhaXJzX2ZpbmlzaDoKKyAgaWYg KCFOSUxQIChyZXN1bHQpKQorICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNoZSAodywgbGlzdG4gKENP TlNUWVBFX0hFQVAsIDMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJl dmVyc2UgKHJlc3VsdCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNv bnMgKHNlbGVjdGVkX3dpbmRvdywgUW5pbCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgRmNvbnMgKGJ1ZiwgUW5pbCkpKTsKKyAgdy0+bWMuZHJhd19jcm9zc2hhaXJzID0g ZmFsc2U7CisgIGJpZGlfdW5zaGVsdmVfY2FjaGUgKGl0ZGF0YSwgZmFsc2UpOworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNUT1AgVEhF IFRJTUVSCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qCisjaWZkZWYgR0xZUEhfREVCVUcK KyAgZW5kID0gY2xvY2soKTsKKyAgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoZW5kIC0gc3Rh cnQpKSAvIENMT0NLU19QRVJfU0VDOworICBkdG9hc3RyIChidWZfdGltZSwgc2l6ZW9mIGJ1Zl90 aW1lLCAwLCAwLCBjcHVfdGltZV91c2VkKTsKKyAgZGVidWdfbWV0aG9kX2FkZCAodywgIm1jX2Ry YXdfY3Jvc3NoYWlyczogIFRJTUUgKCVzKSIsIGJ1Zl90aW1lKTsKKyNlbmRpZgorKi8KK312b2lk CisKK21jX3JlZHJhd19jcm9zc2hhaXJzIChzdHJ1Y3Qgd2luZG93ICp3KQoreworLyoKKyNpZmRl ZiBHTFlQSF9ERUJVRworICBjbG9ja190IHN0YXJ0LCBlbmQ7CisgIGRvdWJsZSBjcHVfdGltZV91 c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9CVUZTSVpFX0JPVU5EXTsKKyAgc3RhcnQgPSBjbG9j aygpOworI2VuZGlmCisqLworICBMaXNwX09iamVjdCB2bGlzdCA9IFFuaWw7Cis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ocG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MsIHctPnBoeXNfY3Vyc29yX3R5cGUp OworICBmb3IgKHZsaXN0ID0gWENBUiAody0+Y3Jvc3NoYWlyc19jYWNoZSk7CisgICAgICAgQ09O U1AgKHZsaXN0KTsKKyAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICB7CisgICAgICB0 aGlydGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHggPSBYSU5UIChGbnRoICht YWtlX251bWJlciAoMCksIHRoaXJ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeCA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICgxKSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHkgPSBYSU5U IChGbnRoIChtYWtlX251bWJlciAoMiksIHRoaXJ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeSA9 IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgdGhpcnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IGhwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNCksIHRoaXJ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICB2cG9zID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDUpLCB0aGlydGVlbl9lbGVt ZW50cykpOworICAgICAgaCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg2KSwgdGhpcnRlZW5f ZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAo Rm50aCAobWFrZV9udW1iZXIgKDcpLCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29y X3dpZHRoID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDgpLCB0aGlydGVlbl9lbGVtZW50cykp OworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICg5KSwgdGhpcnRlZW5fZWxl bWVudHMpOworICAgICAgYmFja2dyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICgxMCksIHRoaXJ0 ZWVuX2VsZW1lbnRzKTsKKyAgICAgIGZsYXZvciA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgx MSksIHRoaXJ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBwb3MgPSBYSU5UIChGbnRoIChtYWtlX251 bWJlciAoMTIpLCB0aGlydGVlbl9lbGVtZW50cykpOworICAgICAgaWYgKGZsYXZvciA9PSBNQ19H TFlQSCkKKyAgICAgICAgbWNfZXJhc2VfZ2x5cGhfY3Vyc29yICh3LCB4LCB5LCBocG9zLCB2cG9z LCBjdXJzb3JfdHlwZSk7CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBpZiAoZmxhdm9yID09IE9WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAgICAgICAgICAg ICB8fCBmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BTkdMRQorICAgICAgICAg ICAgICAgICAgfHwgZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAgICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQU5HTEUKKyAgICAgICAgICAg ICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgIHx8 IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAgICAgICAgICAgIGN1 cnNvcl90eXBlID0gTk9fQ1VSU09SOworICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJp ZCAodywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCBiYWNrZ3JvdW5kLCBmbGF2b3IpOworICAgICAgICAgICAgfQorICAgIH0KKyAgaWYgKGRl bGV0ZV9jYWNoZSkKKyAgICB3c2V0X2Nyb3NzaGFpcnNfY2FjaGUgKHcsIFFuaWwpOworICB3LT5t Yy5lcmFzZV9jcm9zc2hhaXJzID0gZmFsc2U7CisvKgorI2lmZGVmIEdMWVBIX0RFQlVHCisgIGVu ZCA9IGNsb2NrKCk7CisgIGNwdV90aW1lX3VzZWQgPSAoKGRvdWJsZSkgKGVuZCAtIHN0YXJ0KSkg LyBDTE9DS1NfUEVSX1NFQzsKKyAgZHRvYXN0ciAoYnVmX3RpbWUsIHNpemVvZiBidWZfdGltZSwg MCwgMCwgY3B1X3RpbWVfdXNlZCk7CisgIGRlYnVnX21ldGhvZF9hZGQgKHcsICJtY19lcmFzZV9j cm9zc2hhaXJzOiAgVElNRSAoJXMpIiwgYnVmX3RpbWUpOworI2VuZGlmCisqLworfQorCit2b2lk CittY19wb3J0YWwgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgY3Vyc29yX29uX3ApCit7CisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJ UExFIENVUlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBpZiAoIU1JTklfV0lORE9X X1AgKHcpCisgICAgICAmJiB3LT5tYy5lcmFzZV9nbHlwaF9jdXJzb3IKKyAgICAgICYmICFOSUxQ ICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKQorICAgICAgJiYgRVEgKHctPmNvbnRlbnRzLCBY Q0FSIChGbnRoIChtYWtlX251bWJlciAoMiksIHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkp CisgICAgbWNfY2FsYyAodywgMSk7CisgIGlmICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRv dykKKyAgICAgICYmIFdJTkRPV19WQUxJRF9QIChzZWxlY3RlZF93aW5kb3cpCisgICAgICAmJiAh TUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmIHctPm1jLmRyYXdfZ2x5cGhfY3Vyc29yCisgICAg ICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19nbHlwaF9saXN0KSkp CisgICAgLyogRHJhdyBmYWtlIGN1cnNvcnMgKi8KKyAgICBtY19jYWxjICh3LCAwKTsKKyAgICAv KiBGaXJzdCBhdHRlbXB0IGF0IGRlYWxpbmcgd2l0aCBhIGByZWRpc3BsYXlfcHJlc2VydmVfZWNo b19hcmVhJyBzaXR1YXRpb24uICovCisgICAgZWxzZSBpZiAoIU1JTklfV0lORE9XX1AgKHcpCisg ICAgICAgICAgICAgJiYgIXctPm1jLmRyYXdfZ2x5cGhfY3Vyc29yCisgICAgICAgICAgICAgJiYg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZ2x5cGhfbGlzdCkpCisgICAg ICAgICAgICAgJiYgIU5JTFAgKHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpCisgICAgICAgICAg ICAgJiYgRVEgKHctPmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMiksIHctPm11 bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkpCisgICAgICB7CisgICAgICAgIC8qIFJlbW92ZSBmYWtl IGN1cnNvcnMuICovCisgICAgICAgIG1jX2NhbGMgKHcsIDEpOworICAgICAgICAvKiBEcmF3IGZh a2UgY3Vyc29ycyAqLworICAgICAgICBtY19jYWxjICh3LCAwKTsKKyAgICAgIH0KKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKgorIC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X2VjaG9fYXJlYScuICovCisgICAgZWxzZSBpZiAoIU1J TklfV0lORE9XX1AgKHcpCisgICAgICAgICAgICAgJiYgIXctPm1jLmRyYXdfY3Jvc3NoYWlycwor ICAgICAgICAgICAgICYmICFOSUxQICh3LT5jcm9zc2hhaXJzX2NhY2hlKQorICAgICAgICAgICAg ICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAg ICAgICAgICAgICYmIHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB3 LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAgICAgICAgJiYgRVEgKHctPmNvbnRlbnRzLCBY Q0FSIChGbnRoIChtYWtlX251bWJlciAoMiksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkpCisgICAg ICB7CisgICAgICAgIC8qIFJlbW92ZSBjcm9zc2hhaXJzLCBidXQgZG8gTk9UIGRlbGV0ZSB0aGUg Y2FjaGUuICovCisgICAgICAgIG1jX2VyYXNlX2Nyb3NzaGFpcnMgKHcsIGZhbHNlKTsKKyAgICAg ICAgLyogUmVkcmF3IHRoZSBjcm9zc2hhaXJzIHVzaW5nIHRoZSBjYWNoZS4gKi8KKyAgICAgICAg bWNfcmVkcmF3X2Nyb3NzaGFpcnMgKHcpOworICAgICAgfQorICAgICAgLyogQ0FUQ0hBTEw6ICBE UkFXIFRIRSBSRUFMIENVUlNPUiAobWF5YmUpISAqLworICAgICAgZWxzZSBpZiAoY3Vyc29yX29u X3ApCisgICAgICAgIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHcsIHRydWUsIHctPm91dHB1dF9j dXJzb3IuaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+ b3V0cHV0X2N1cnNvci52cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB3LT5vdXRwdXRfY3Vyc29yL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lvbiB1c2VkIGZvciBkZWJ1Z2dpbmcuICovKQorICAodm9pZCkKK3sKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgIFBSRUxJTUlOQVJZ IFNUVUZGCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgc3RydWN0IHdpbmRvdyAqdyA9IGRl Y29kZV9saXZlX3dpbmRvdyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgc3RydWN0IGZyYW1lICpmID0g WEZSQU1FICh3LT5mcmFtZSk7CisgIHN0cnVjdCBpdCBpdDsKKyAgdm9pZCAqaXRkYXRhID0gYmlk aV9zaGVsdmVfY2FjaGUgKCk7CisgIGVudW0gbW92ZV9pdF9yZXN1bHQgcmMgPSBNT1ZFX1hfUkVB Q0hFRDsKKyAgc3RydWN0IHRleHRfcG9zIHN0YXJ0X3RleHRfcG9zaXRpb247CisgIGludCBjb3Vu dCA9IDA7CisgIGludCBuZXdfeCA9IDA7CisgIGludCByZWxhdGl2ZV94ID0gMDsKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgIFNUQVJUIERJU1BMQVkgLS0g dy0+c3RhcnQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICAvKiBCZWdpbiB0aGUgam91cm5l eSBhdCB3LT5zdGFydC4gKi8KKyAgU0VUX1RFWFRfUE9TX0ZST01fTUFSS0VSIChzdGFydF90ZXh0 X3Bvc2l0aW9uLCB3LT5zdGFydCk7CisgIHN0YXJ0X2Rpc3BsYXkgKCZpdCwgdywgc3RhcnRfdGV4 dF9wb3NpdGlvbik7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICBH TyBUTyBUSEUgQkVHSU5OSU5HIE9GIFRIRSBDVVJSRU5UIExJTkUuCisqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKyAgLyogUGxhY2UgdGhlIElUIG9uIHRoZSBjdXJyZW50IGxpbmUgY29udGFpbmlu ZyBQVC4gKi8KKyAgaW50IHZvZmZzZXQgPSAoV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodykg PiAwCisgICAgICAgICAgICAgICAgICYmIHctPm91dHB1dF9jdXJzb3IudnBvcyA+IDApCisgICAg ICAgICAgICAgICAgICA/IHctPm91dHB1dF9jdXJzb3IudnBvcyAtIDEKKyAgICAgICAgICAgICAg ICAgIDogdy0+b3V0cHV0X2N1cnNvci52cG9zOworICBpZiAodm9mZnNldCA+IDApCisgICAgbW92 ZV9pdF9ieV9saW5lcyAoJml0LCB2b2Zmc2V0KTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgor ICAgICAgICAgICAgIE1PVkUgSVQgT1ZFUiBFQUNIIENIQVJBQ1RFUiBPTiBUSEUgQ1VSUkVOVCBM SU5FLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIHdoaWxlICh0cnVlKQorICAgIHsKKyAg ICAgIGNvdW50ICs9IDE7CisgICAgICBpZiAobmV3X3ggPiAwKQorICAgICAgICByZWxhdGl2ZV94 ID0gbmV3X3ggLSBpdC5maXJzdF92aXNpYmxlX3g7CisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK KyAgICAgICAgICAgICAgICAgICAgICAgRFVNUCBSRUxFVkFOVCBHTFlQSCBJTkZPUk1BVElPTgor KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisgIGludCB3X2hzY3JvbGwgPSBpdC53LT5oc2Nyb2xs OworICBpbnQgd19taW5faHNjcm9sbCA9IGl0LnctPm1pbl9oc2Nyb2xsOworICBpbnQgaXRfY2hh cnBvcyA9IElUX0NIQVJQT1MgKGl0KTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9D T0xVTU5fV0lEVEggKGYpOworICBzdHJ1Y3QgZmFjZSAqZmFjZSA9IG1jX2xvb2t1cF9mYWNlICgm aXQpOworICBzdHJ1Y3QgZm9udCAqZm9udCA9IGZhY2UtPmZvbnQ7CisgIGludCBmb250X3NwYWNl X3dpZHRoID0gKGZvbnQgPT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICA/IGZyYW1l X2NoYXJfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBmb250LT5zcGFjZV93aWR0 aCk7CisgIExpc3BfT2JqZWN0IGZvcmVncm91bmRfZmFjZSA9IGZhY2UtPmxmYWNlW0xGQUNFX0ZP UkVHUk9VTkRfSU5ERVhdOworICBMaXNwX09iamVjdCBiYWNrZ3JvdW5kX2ZhY2UgPSBmYWNlLT5s ZmFjZVtMRkFDRV9CQUNLR1JPVU5EX0lOREVYXTsKKyAgTGlzcF9PYmplY3QgYnVmID0gaXQudy0+ Y29udGVudHM7CisgIGJvb2wgaHNjbCA9ICghaXQudy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAg ICAgICAgICAgICAgICYmIEVRIChGYnVmZmVyX2xvY2FsX3ZhbHVlIChRYXV0b19oc2Nyb2xsX21v ZGUsIGJ1ZiksIFFjdXJyZW50X2xpbmUpCisgICAgICAgICAgICAgICAmJiBpdC53LT5oc2Nyb2xs ID4gMCk7CisgIGZwcmludGYgKHN0ZGVyciwgIlxuJWQuICAlcyVzXG5cCisgICAgaXQuYyAoJWQp XG5cCisgICAgZmV0Y2hfYnl0ZSAoJWQpXG5cCisgICAgY2hhcmFjdGVyICglcylcblwKKyAgICBJ VF9DSEFSUE9TICglZClcblwKKyAgICB3LT5oc2Nyb2xsICglZClcblwKKyAgICBoc2NsICglcylc blwKKyAgICB3LT5taW5faHNjcm9sbCAoJWQpXG5cCisgICAgaXQuaHBvcyAoJWQpXG5cCisgICAg aXQudnBvcyAoJWQpXG5cCisgICAgaXQuY3VycmVudF94ICglZClcblwKKyAgICBuZXdfeCAoJWQp XG5cCisgICAgZm9udC0+c3BhY2Vfd2lkdGggKCVkKVxuXAorICAgIGl0LmxudW1fcGl4ZWxfd2lk dGggKCVkKVxuXAorICAgIGl0LmxudW1fd2lkdGggKCVkKVxuXAorICAgIGl0LmZpcnN0X3Zpc2li bGVfeCAoJWQpXG5cCisgICAgcmVsYXRpdmVfeCAoJWQpXG5cCisgICAgaXQuZmFjZV9pZCAoJWQp XG5cCisgICAgZm9yZWdyb3VuZF9mYWNlICglcylcblwKKyAgICBiYWNrZ3JvdW5kX2ZhY2UgKCVz KVxuXAorICAgIHJjICglcylcbiIsCisgICAgICBjb3VudCwKKyAgICAgIChpdC5jID09IDAKKyAg ICAgICAgPyAiTk9USElORyIKKyAgICAgICAgOiBpdC5jID09IDE4NworICAgICAgICAgID8gIlRB QiBDSEFSQUNURVIiCisgICAgICAgIDogaXQuYyA9PSAnXHQnCisgICAgICAgICAgPyAiVEFCIFNU UkVUQ0giCisgICAgICAgIDogIlRFWFQiKSwKKyAgICAgIChyZWxhdGl2ZV94ID09IGl0LmxudW1f cGl4ZWxfd2lkdGgKKyAgICAgICAgPyAiIC0tIFRIRSBGVU4gU1RBUlRTIEhFUkUiCisgICAgICAg IDogIiIpLAorICAgICAgaXQuYywKKyAgICAgIEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKGl0KSks CisgICAgICAoIU5JTFAgKEZjaGFyX3RvX3N0cmluZyAobWFrZV9udW1iZXIgKGl0LmMpKSkKKyAg ICAgICAgPyBTU0RBVEEgKEZjaGFyX3RvX3N0cmluZyAobWFrZV9udW1iZXIgKGl0LmMpKSkKKyAg ICAgICAgOiAiTklMUCAtLSBpdC5jIGFzIGEgc3RyaW5nIiksCisgICAgICBpdF9jaGFycG9zLAor ICAgICAgLyogV2hlbiBgaXQudy0+aHNjcm9sbGAgaXMgc2V0IHRvIGFuIGBpbnRgLCBnZGIgcmVw b3J0cyB0aGUgdmFsdWUKKyAgICAgIGFzIGJlaW5nOiAgPHZhcmlhYmxlIG9wdGltaXplZCBhd2F5 IGJ5IGNvbXBpbGVyPiAqLworICAgICAgd19oc2Nyb2xsLAorICAgICAgKGhzY2wgPyAidHJ1ZSIg OiAiZmFsc2UiKSwKKyAgICAgIHdfbWluX2hzY3JvbGwsCisgICAgICBpdC5ocG9zLAorICAgICAg aXQudnBvcywKKyAgICAgIGl0LmN1cnJlbnRfeCwKKyAgICAgIG5ld194LAorICAgICAgLyogQ2Fu bm90IGFjY2VzcyBtZW1vcnkgYXQgYWRkcmVzcyAweGEwLiAgVGhpcyBjYW1lIGFib3V0IGJ5IHVz aW5nCisgICAgICBgP1xVMDAwMUQ0RDVgIHRvIGNyZWF0ZSBhIGZhbmN5IGZvcm0gZmVlZCBjaGFy YWN0ZXIgdGhhdCB3YXMgbm90CisgICAgICByZWNvZ25pemVkIGJ5IHRoZSBmb250IGNob3NlbiBv biBYMTEuICovCisgICAgICAoZm9udCA9PSBOVUxMCisgICAgICAgPyAwCisgICAgICAgOiBmb250 LT5zcGFjZV93aWR0aCksCisgICAgICBpdC5sbnVtX3BpeGVsX3dpZHRoLAorICAgICAgaXQubG51 bV93aWR0aCwKKyAgICAgIGl0LmZpcnN0X3Zpc2libGVfeCwKKyAgICAgIHJlbGF0aXZlX3gsCisg ICAgICBpdC5mYWNlX2lkLAorICAgICAgKCFOSUxQIChmb3JlZ3JvdW5kX2ZhY2UpCisgICAgICAg ID8gU1NEQVRBIChmb3JlZ3JvdW5kX2ZhY2UpCisgICAgICAgIDogIk5JTFAgZm9yZWdyb3VuZF9m YWNlIiksCisgICAgICAoIU5JTFAgKGJhY2tncm91bmRfZmFjZSkKKyAgICAgICAgPyBTU0RBVEEg KGJhY2tncm91bmRfZmFjZSkKKyAgICAgICAgOiAiTklMUCBiYWNrZ3JvdW5kX2ZhY2UiKSwKKyAg ICAgIChyYyA9PSBNT1ZFX1VOREVGSU5FRAorICAgICAgICA/ICJNT1ZFX1VOREVGSU5FRCIKKyAg ICAgICAgOiByYyA9PSBNT1ZFX1BPU19NQVRDSF9PUl9aVgorICAgICAgICAgID8gIk1PVkVfUE9T X01BVENIX09SX1pWIgorICAgICAgICA6IHJjID09IE1PVkVfWF9SRUFDSEVECisgICAgICAgICAg PyAiTU9WRV9YX1JFQUNIRUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRAor ICAgICAgICAgID8gIk1PVkVfTElORV9DT05USU5VRUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9M SU5FX1RSVU5DQVRFRAorICAgICAgICAgID8gIk1PVkVfTElORV9UUlVOQ0FURUQiCisgICAgICAg IDogcmMgPT0gTU9WRV9ORVdMSU5FX09SX0NSCisgICAgICAgICAgPyAiTU9WRV9ORVdMSU5FX09S X0NSIgorICAgICAgICA6ICJPT1BTIikpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAg ICAgICAgICAgICAgICAgICAgIE1PVkUgSVQ6ICBJTkNSRU1FTlQgPT0gRk9OVC5TUEFDRV9XSURU SAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisgICAgICBpZiAoKEZFVENIX0JZVEUgKElUX0JZ VEVQT1MgKGl0KSkgPT0gJ1xuJworICAgICAgICAgICAmJiBpdC5jICE9IDApCisgICAgICAgICAg LyogfHwgSVRFUkFUT1JfQVRfRU5EX09GX0xJTkVfUCAoJml0KSAqLworICAgICAgICAgIHx8IHJj ID09IE1PVkVfUE9TX01BVENIX09SX1pWKQorICAgICAgICBicmVhazsKKyAgICAgIG5ld194ICs9 IGZvbnRfc3BhY2Vfd2lkdGg7CisgICAgICByYyA9IG1vdmVfaXRfaW5fZGlzcGxheV9saW5lX3Rv ICgmaXQsIFpWLCBuZXdfeCwgTU9WRV9UT19QT1MgfCBNT1ZFX1RPX1gpOworICAgICAgaWYgKHJj ID09IE1PVkVfTElORV9DT05USU5VRUQpCisgICAgICAgIGJyZWFrOworICAgICAgaWYgKGl0LmN1 cnJlbnRfeCAtIGl0LmZpcnN0X3Zpc2libGVfeCArIGZvbnRfc3BhY2Vfd2lkdGggPj0KKyAgICAg ICAgICB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpKQorICAgICAgICBicmVhazsKKyAg ICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICBS RURJU1BMQVkgQU5EIERVTVBfR0xQWUhfUk9XCisqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAg cmVkaXNwbGF5X2ludGVybmFsICgpOworICBpbnQgdnBvcyA9IChXSU5ET1dfSEVBREVSX0xJTkVf SEVJR0hUIChpdC53KSA+IDApCisgICAgICAgICAgICAgPyBpdC52cG9zICsgMQorICAgICAgICAg ICAgIDogaXQudnBvczsKKyAgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93ID0gTUFUUklYX1JP VyAody0+Y3VycmVudF9tYXRyaXgsIHZwb3MpOworICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOwor ICBkdW1wX2dseXBoX3JvdyAoZ2x5cGhfcm93LCB2cG9zLCAyKTsKKyAgYmlkaV91bnNoZWx2ZV9j YWNoZSAoaXRkYXRhLCBmYWxzZSk7CisgIHJldHVybiBRbmlsOworfQorCisvKiBlbmQgTVVMVElQ TEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogDAogLyoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqCiAJCSAgICAgIFdpbmRvdyBkaXNwbGF5IGRpbWVuc2lvbnMKQEAgLTEzMzY2LDkgKzE2 MDMzLDIzIEBAIGhzY3JvbGxfd2luZG93X3RyZWUgKExpc3BfT2JqZWN0IHdpbmRvdykKIAkgICAg ICBlbHNlCiAJCXB0ID0gY2xpcF90b19ib3VuZHMgKEJFR1YsIG1hcmtlcl9wb3NpdGlvbiAody0+ cG9pbnRtKSwgWlYpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisgIHN0cnVjdCBkaXNwbGF5X3BvcyAqcG9zID0gJmN1cnNvcl9yb3ctPnN0 YXJ0OworICBwdHJkaWZmX3QgY2hhcnBvcyA9IENIQVJQT1MgKHBvcy0+cG9zKTsKKyAgYm9vbCBi YXJmX2NyYXNoID0gKGNoYXJwb3MgPCAwIHx8IChjaGFycG9zID49IEJVRl9CRUcgKGN1cnJlbnRf YnVmZmVyKSAmJiBjaGFycG9zIDw9IFpWKSkgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2Ny YXNoKQorICAgIHJldHVybiBoc2Nyb2xsZWRfcDsKKyAgICBlbHNlCiAJICAgICAgLyogTW92ZSBp dGVyYXRvciB0byBwdCBzdGFydGluZyBhdCBjdXJzb3Jfcm93LT5zdGFydCBpbgogCQkgYSBsaW5l IHdpdGggaW5maW5pdGUgd2lkdGguICAqLwogCSAgICAgIGluaXRfdG9fcm93X3N0YXJ0ICgmaXQs IHcsIGN1cnNvcl9yb3cpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAg aWYgKGhzY2wpCiAJCWl0LmZpcnN0X3Zpc2libGVfeCA9IHdpbmRvd19oc2Nyb2xsX2xpbWl0ZWQg KHcsIGl0LmYpCiAJCQkJICAgICAqIEZSQU1FX0NPTFVNTl9XSURUSCAoaXQuZik7CkBAIC0xMzY3 NywyMCArMTYzNTgsMzYgQEAgb3ZlcmxheV9hcnJvd3NfY2hhbmdlZF9wIChib29sIHNldF9yZWRp c3BsYXkpCiAJCUZnZXQgKHZhciwgUWxhc3RfYXJyb3dfcG9zaXRpb24pKQogCSAgfHwgISAocHN0 ciA9IG92ZXJsYXlfYXJyb3dfc3RyaW5nX29yX3Byb3BlcnR5ICh2YXIpLAogCQlFUSAocHN0ciwg RmdldCAodmFyLCBRbGFzdF9hcnJvd19zdHJpbmcpKSkpCisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIEBsYXdsaXN0IGFkZGVkIGNoZWNr cyBmb3IgYSB2YWxpZCBtYXJrZXIgYW5kIGEgbGl2ZSBidWZmZXIgdG8gYXZvaWQgY3Jhc2hpbmc7 CithbmQsIGhlIG9wdGVkIHRvIGJ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ioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogfQogCiAvKiBNYXJrIG92ZXJsYXkgYXJyb3dzIHRvIGJlIHVwZGF0ZWQgb24gbmV4dCBy ZWRpc3BsYXkuICAqLwpAQCAtMTQyODEsNiArMTY5NzgsMjEgQEAgcmVkaXNwbGF5X2ludGVybmFs ICh2b2lkKQogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogCSAgICAgIHVwZGF0ZV93aW5kb3df ZnJpbmdlcyAodywgZmFsc2UpOwogI2VuZGlmCisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIE5PVEU6ICBBbiBpZGxlLXRpbWVyIGZ1bmN0 aW9uIG1heSBub3QgbmVjZXNzYXJpbHkgdHJpZ2dlciBgcmVkaXNwbGF5X3dpbmRvdycuCitgb3B0 aW1pemF0aW9uIDFgICh3aGljaCBpbmNsdWRlcyBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBv biB0aGUgZmlyc3Qgc2NyZWVuCitsaW5lKSwgYW5kIGBvcHRpbWl6YXRpb24gM2AgKHdoaWNoIGlu Y2x1ZGVzIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbgorbGluZXMgc3Vic2Vx dWVudCB0byB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUpLCBieXBhc3MgYHJlZGlzcGxheV93aW5kb3cn LiAqLworCisgICAgICBtY19yZW1vdmVfZXZlcnl0aGluZyAodyk7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIAkgICAgICBnb3RvIHVwZGF0ZTsKIAkgICAgfQogCSAgZWxzZQpAQCAt MTQzMDMsNiArMTcwMTUsMTYgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQogCQkgICYmICh3 ID0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KSkgIT0gc3cpCiAJCWdvdG8gcmV0cnk7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAg ICBpZiAobWNfd2l0aG91dF91cGRhdGVfZnJhbWUgKHcpKQorICAgICAgICAgZ290byBlbmRfb2Zf cmVkaXNwbGF5OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAgLyogV2Ug dXNlZCB0byBhbHdheXMgZ290byBlbmRfb2ZfcmVkaXNwbGF5IGhlcmUsIGJ1dCB0aGlzCiAJCSBp c24ndCBlbm91Z2ggaWYgd2UgaGF2ZSBhIGJsaW5raW5nIGN1cnNvci4gICovCiAJICAgICAgaWYg KHctPmN1cnNvcl9vZmZfcCA9PSB3LT5sYXN0X2N1cnNvcl9vZmZfcCkKQEAgLTE0MzQ0LDYgKzE3 MDY2LDIxIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKIAkJICAqdy0+ZGVzaXJlZF9tYXRy aXgtPm1ldGhvZCA9IDA7CiAJCSAgZGVidWdfbWV0aG9kX2FkZCAodywgIm9wdGltaXphdGlvbiAz Iik7CiAjZW5kaWYKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworLyogTk9URTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNl c3NhcmlseSB0cmlnZ2VyIGByZWRpc3BsYXlfd2luZG93Jy4KK2BvcHRpbWl6YXRpb24gMWAgKHdo aWNoIGluY2x1ZGVzIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3Jl ZW4KK2xpbmUpLCBhbmQgYG9wdGltaXphdGlvbiAzYCAod2hpY2ggaW5jbHVkZXMgbGVmdC9yaWdo dCBjdXJzb3IgbW92ZW1lbnQgb24gc2NyZWVuCitsaW5lcyBzdWJzZXF1ZW50IHRvIHRoZSBmaXJz dCBzY3JlZW4gbGluZSksIGJ5cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgICAgIG1j X3JlbW92ZV9ldmVyeXRoaW5nICh3KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog CQkgIGdvdG8gdXBkYXRlOwogCQl9CiAJICAgICAgZWxzZQpAQCAtMTQ0NzcsNiArMTcyMTQsMjAg QEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQogCQkgICAgdW5yZXF1ZXN0X3NpZ2lvICgpOwog CQkgIFNUT1BfUE9MTElORzsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFIENVUlNPUlMgKi8KKworICAgIC8qIE9uIEVtYWNzIGZvciBXaW5kb3dzLCBjcm9zc2hhaXJz IHdpbGwgbm90IGRyYXcgYXQgdGhlIGJlZ2lubmluZyBvZiB0aGUgYnVmZmVyCisgICAgd2l0aG91 dCB0aGlzIGNvbmRpdGlvbiB3aGVuIHRoZSBpZGxlLXRpbWVyIHN3aXRjaGVzIGFyZSB0b2dnbGVk LiAgVGhpcyBtYXkgaGF2ZQorICAgIGJlZW4gZHVlIHRvIHRoZSBwY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50IG9uIHRoZSBmaXJzdCBzY3JlZW4KK2xpbmUpLCBhbmQgYG9wdGltaXph dGlvbiAzYCAod2hpY2ggaW5jbHVkZXMgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gc2Ny ZWVuCitsaW5lcyBzdWJzZXF1ZW50IHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSksIGJ5cGFzcyBg cmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgbWNfcmVjb3JkX3dpbmRvd19ib3VuZHMgKHcpOwor CisgIG1jX3JlbW92ZV9ldmVyeXRoaW5nICh3KTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICBzZXRfYnVmZmVyX2ludGVybmFsXzEgKG9sZCk7CiAgIC8qIEF2b2lkIGFuIGFib3J0 IGluIFRFTVBfU0VUX1BUX0JPVEggaWYgdGhlIGJ1ZmZlciBoYXMgYmVjb21lCiAgICAgIHNob3J0 ZXIuICBUaGlzIGNhbiBiZSBjYXVzZWQgYnkgbG9nIHRydW5jYXRpb24gaW4gKk1lc3NhZ2VzKi4g ICovCkBAIC0yMTA0MSw2ICsyMzg1OCwzMCBAQCBkaXNwbGF5X2NvdW50X2xpbmVzX3Zpc3VhbGx5 IChzdHJ1Y3QgaXQgKml0KQogc3RhdGljIHZvaWQKIG1heWJlX3Byb2R1Y2VfbGluZV9udW1iZXIg KHN0cnVjdCBpdCAqaXQpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKyAgYm9vbCBiYXJmX2NyYXNoID0gKGl0LT5nbHlwaF9yb3cgPT0g TlVMTAorICAgICAgICAgICAgICAgICAgICAgfHwgaXQtPmdseXBoX3Jvdy0+dXNlZFtURVhUX0FS RUFdID09IDApCisgICAgICAgICAgICAgICAgICAgID8gZmFsc2UKKyAgICAgICAgICAgICAgICAg ICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaCkKKyAgIHJldHVybjsKKworICAvKiBUaGlzIGNv ZGUgd2lsbCBiZSByZXBsYWNlZCB3aXRoOgorICBjb21taXQgZmUwNmZjYzU5NTU3MzFiMTM3M2Fh NzRhNTg2ZGEwNGY1YzJjMTFmNworICBBdXRob3I6IEVsaSBaYXJldHNraWkgPGVsaXpAZ251Lm9y Zz4KKyAgRGF0ZTogICBUdWUgQXVnIDI4IDE0OjExOjEyIDIwMTggKzAzMDAgKi8KKyAgaW50IHRl eHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKGl0LT53LCBURVhUX0FSRUEpOworICBp ZiAoIU5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykKKyAgICAgICYmIHRleHRfYXJlYV93aWR0 aCA8IGl0LT5sbnVtX3BpeGVsX3dpZHRoKQorICAgIHJldHVybjsKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICBwdHJkaWZmX3QgbGFzdF9saW5lID0gaXQtPmxudW07CiAgIHB0cmRp ZmZfdCBzdGFydF9mcm9tLCBieXRlcG9zOwogICBwdHJkaWZmX3QgdGhpc19saW5lOwpAQCAtMjk2 OTIsOSArMzI1NTQsMjQgQEAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0IHdpbmRvdyAq dywgYm9vbCBvbiwKICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB2cG9zOwogICAgIH0KIAor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICB3 LT5tYy5oID0gLTE7CisgIHctPm1jLmZ4ID0gLTE7CisgIHctPm1jLmZ5ID0gLTE7CisgIHctPm1j LmdseXBoX2ZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgdy0+bWMucmVkID0gLTEuMDsKKyAgdy0+bWMu Z3JlZW4gPSAtMS4wOworICB3LT5tYy5ibHVlID0gLTEuMDsKICAgRlJBTUVfUklGIChmKS0+ZHJh d193aW5kb3dfY3Vyc29yICh3LCBnbHlwaF9yb3csIHgsIHksCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbmV3X2N1cnNvcl90eXBlLCBuZXdfY3Vyc29yX3dpZHRoLAogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uLCBhY3RpdmVfY3Vyc29yKTsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTI5NzI2LDEwICszMjYwMywz MCBAQCB1cGRhdGVfd2luZG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBvbikKICAg ICAgIGlmIChyb3ctPnJldmVyc2VkX3AgJiYgaHBvcyA+PSByb3ctPnVzZWRbVEVYVF9BUkVBXSkK IAlocG9zID0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOwogCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICAvKiBNb3ZpbmcgdGhlIG1v dXNlIHRyaWdnZXJzIGB1cGRhdGVfd2luZG93X2N1cnNvcicgd2hpY2ggY2FsbHMKKyAgICAgIGBk aXNwbGF5X2FuZF9zZXRfY3Vyc29yJyB0aGF0IHdvdWxkIG90aGVyd2lzZSByZW1vdmUgYSBwb3J0 aW9uIG9mIHRoZQorICAgICAgaG9yaXpvbnRhbCBydWxlciBmcm9tIHBvaW50IGF0IGVuZCBvZiB2 aXN1YWwgbGluZSB0byB3aW5kb3cgZWRnZS4gKi8KKyAgICAgIGJvb2wgY3Jvc3NoYWlyc19wID0g KCFNSU5JX1dJTkRPV19QICh3KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXctPm1j LmRyYXdfY3Jvc3NoYWlycworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKHct PmNyb3NzaGFpcnNfY2FjaGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEp LCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBF USAody0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgdy0+Y3Jvc3NoYWly c19jYWNoZSkpKSk7CisgICAgICBpZiAoIWNyb3NzaGFpcnNfcCkKKyAgICAgICAgewogICAgICAg YmxvY2tfaW5wdXQgKCk7CiAgICAgICBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yICh3LCBvbiwgaHBv cywgdnBvcywKIAkJCSAgICAgIHctPnBoeXNfY3Vyc29yLngsIHctPnBoeXNfY3Vyc29yLnkpOwog ICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgfQorCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAgICAgfQogfQogCkBAIC0zMjQzNiw2ICszNTMzMywyMiBAQCB4X2ludGVyc2Vj dF9yZWN0YW5nbGVzIChYUmVjdGFuZ2xlICpyMSwgWFJlY3RhbmdsZSAqcjIsIFhSZWN0YW5nbGUg KnJlc3VsdCkKIHZvaWQKIHN5bXNfb2ZfeGRpc3AgKHZvaWQpCiB7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgZGVmc3ViciAoJlNtY19h Y3RpdmF0ZV9jdXJzb3JzKTsKKworICBkZWZzdWJyICgmU21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMp OworCisgIGRlZnN1YnIgKCZTbWNfc3RkZXJyKTsKKworICBkZWZzdWJyICgmU2RlYnVnZ2luZyk7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgVndpdGhfZWNob19hcmVhX3NhdmVf dmVjdG9yID0gUW5pbDsKICAgc3RhdGljcHJvICgmVndpdGhfZWNob19hcmVhX3NhdmVfdmVjdG9y KTsKIApkaWZmIC0tZ2l0IGEvc3JjL3h0ZXJtLmMgYi9zcmMveHRlcm0uYwppbmRleCBhZjI4ZGFi Li5kM2Y1ZTlhIDEwMDY0NAotLS0gYS9zcmMveHRlcm0uYworKysgYi9zcmMveHRlcm0uYwpAQCAt MTE1MSwxMCArMTE1MSwxNCBAQCB4X3VwZGF0ZV93aW5kb3dfZW5kIChzdHJ1Y3Qgd2luZG93ICp3 LCBib29sIGN1cnNvcl9vbl9wLAogICAgIHsKICAgICAgIGJsb2NrX2lucHV0ICgpOwogCi0gICAg ICBpZiAoY3Vyc29yX29uX3ApCi0JZGlzcGxheV9hbmRfc2V0X2N1cnNvciAodywgdHJ1ZSwKLQkJ CQl3LT5vdXRwdXRfY3Vyc29yLmhwb3MsIHctPm91dHB1dF9jdXJzb3IudnBvcywKLQkJCQl3LT5v dXRwdXRfY3Vyc29yLngsIHctPm91dHB1dF9jdXJzb3IueSk7CisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBtY19wb3J0YWwgKHcsIGN1 cnNvcl9vbl9wKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogICAgICAgaWYgKGRy YXdfd2luZG93X2ZyaW5nZXMgKHcsIHRydWUpKQogCXsKQEAgLTE1MzAsMTAgKzE1MzQsMjEgQEAg c3RhdGljIHZvaWQgeF9jaGVja19mb250IChzdHJ1Y3QgZnJhbWUgKiwgc3RydWN0IGZvbnQgKik7 CiBzdGF0aWMgdm9pZAogeF9zZXRfY3Vyc29yX2djIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzKQog ewotICBpZiAocy0+Zm9udCA9PSBGUkFNRV9GT05UIChzLT5mKQorCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIHN0cnVjdCB3aW5kb3cgKncg PSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIGlmICgocy0+Zm9udCA9 PSBGUkFNRV9GT05UIChzLT5mKQogICAgICAgJiYgcy0+ZmFjZS0+YmFja2dyb3VuZCA9PSBGUkFN RV9CQUNLR1JPVU5EX1BJWEVMIChzLT5mKQogICAgICAgJiYgcy0+ZmFjZS0+Zm9yZWdyb3VuZCA9 PSBGUkFNRV9GT1JFR1JPVU5EX1BJWEVMIChzLT5mKQogICAgICAgJiYgIXMtPmNtcCkKKyAgICAg IHx8IHctPm1jLmN1cnNvcl9nY19kZWZhdWx0KQorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgICAgcy0+Z2MgPSBzLT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2M7CiAgIGVsc2UK ICAgICB7CkBAIC05MjUyLDYgKzkyNjcsMjYgQEAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHN0cnVj dCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdykKIAogICAvKiBDb21wdXRlIGZyYW1l LXJlbGF0aXZlIGNvb3JkaW5hdGVzIGZvciBwaHlzIGN1cnNvci4gICovCiAgIGdldF9waHlzX2N1 cnNvcl9nZW9tZXRyeSAodywgcm93LCBjdXJzb3JfZ2x5cGgsICZ4LCAmeSwgJmgpOworCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBMRUdF TkQ6CisKKy0gIHRvcCB5ID09IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpCisK Ky0gIGJvdHRvbSB5ID09IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpIC0gcm93 LT5oZWlnaHQKKworLSAgaCBvZiBIT0xMT1dfQk9YX0NVUlNPUiA9PSByb3ctPmhlaWdodAorICAg W1RoaXMgYXZvaWRzIGEgdmlzaWJsZSBnYXAgYWJvdmUvYmVsb3cuXSAqLworCisgIGlmICh3LT5t Yy5oID4gMCkKKyAgICBoID0gcm93LT5oZWlnaHQ7CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgd2QgPSB3LT5waHlzX2N1cnNvcl93aWR0aCAtIDE7CiAKICAgLyogVGhlIGZvcmVn cm91bmQgb2YgY3Vyc29yX2djIGlzIHR5cGljYWxseSB0aGUgc2FtZSBhcyB0aGUgbm9ybWFsCkBA IC05MzI4LDcgKzkzNjMsMTggQEAgeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncs IHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHdpZHRoLCBlbnVtIHRleHQKIAkgaW52aXNpYmxl LiAgVXNlIHRoZSBnbHlwaCdzIGZvcmVncm91bmQgY29sb3IgaW5zdGVhZCBpbiB0aGlzCiAJIGNh c2UsIG9uIHRoZSBhc3N1bXB0aW9uIHRoYXQgdGhlIGdseXBoJ3MgY29sb3JzIGFyZSBjaG9zZW4g c28KIAkgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICovCi0gICAgICBpZiAoZmFjZS0+YmFj a2dyb3VuZCA9PSBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwpCisKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGlmIChmYWNl LT5iYWNrZ3JvdW5kID09IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbAorICAgICAgICAg ICYmICF3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkpCisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogCXhnY3YuYmFja2dyb3VuZCA9IHhnY3YuZm9yZWdyb3VuZCA9IGZhY2Ut PmZvcmVncm91bmQ7CiAgICAgICBlbHNlCiAJeGdjdi5iYWNrZ3JvdW5kID0geGdjdi5mb3JlZ3Jv dW5kID0gZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsOwpAQCAtOTM1OSw2ICs5NDA1LDE3 IEBAIHhfZHJhd19iYXJfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csIGludCB3aWR0aCwgZW51bSB0ZXh0CiAJICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2 ZWRfbGV2ZWwgJiAxKSAhPSAwKQogCSAgICB4ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGgg LSB3aWR0aDsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNP UlMgKi8KKworICAgIC8qIEFsaWduIGFsbCBmYWtlIEJBUl9DVVJTT1Igb2YgdGhlIFZFUlRJQ0FM X1JVTEVSIHdpdGggYG9wb2ludF94Jy4gKi8KKyAgICBpZiAody0+bWMuZnggPiAwKQorICAgICAg eCA9IHctPm1jLmZ4OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICB4X2ZpbGxf cmVjdGFuZ2xlIChmLCBnYywgeCwKIAkJCSAgV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHct PnBoeXNfY3Vyc29yLnkpLAogCQkJICB3aWR0aCwgcm93LT5oZWlnaHQpOwpAQCAtOTQzNSwzMSAr OTQ5MiwxMTYgQEAgeF9kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVj dCBnbHlwaF9yb3cgKmdseXBoX3JvdywgaW50IHgsCiAJfQogICAgICAgZWxzZQogCXsKLQkgIHN3 aXRjaCAoY3Vyc29yX3R5cGUpCi0JICAgIHsKLQkgICAgY2FzZSBIT0xMT1dfQk9YX0NVUlNPUjoK LQkgICAgICB4X2RyYXdfaG9sbG93X2N1cnNvciAodywgZ2x5cGhfcm93KTsKLQkgICAgICBicmVh azsKIAotCSAgICBjYXNlIEZJTExFRF9CT1hfQ1VSU09SOgotCSAgICAgIGRyYXdfcGh5c19jdXJz b3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOwotCSAgICAgIGJyZWFrOwogCi0J ICAgIGNhc2UgQkFSX0NVUlNPUjoKLQkgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhf cm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOwotCSAgICAgIGJyZWFrOworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JTICovCiAKLQkgICAgY2Fz ZSBIQkFSX0NVUlNPUjoKLQkgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBj dXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKLQkgICAgICBicmVhazsKKyAgc3RydWN0IHhfZGlz cGxheV9pbmZvICpkcHlpbmZvID0gRlJBTUVfRElTUExBWV9JTkZPIChmKTsKKyAgQ29sb3JtYXAg Y21hcCA9IEZSQU1FX1hfQ09MT1JNQVAgKGYpOworICB1bnNpZ25lZCBsb25nIG9yaWdpbmFsX2N1 cnNvcl9waXhlbCA9IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbDsKKyAgZG91YmxlIGJh c2UgPSA2NTUzNS4wOworICBkb3VibGUgdGVybV9yZWQgPSBiYXNlICogdy0+bWMucmVkOworICBk b3VibGUgdGVybV9ncmVlbiA9IGJhc2UgKiB3LT5tYy5ncmVlbjsKKyAgZG91YmxlIHRlcm1fYmx1 ZSA9IGJhc2UgKiB3LT5tYy5ibHVlOworICBpbnQgaW50X3JlZCA9IFhJTlQgKEZ0cnVuY2F0ZSAo bWFrZV9mbG9hdCAodG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zb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICB3LT5tYy5j dXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSB0cnVlOworICAgICAgICAgIHhfZHJhd19iYXJfY3Vy c29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgSEJBUl9DVVJTT1IpOworICAgICAgICAg IHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IGZhbHNlOworICAgICAgICAgIGYtPm91 dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBo X3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9Cisg ICAgY2FzZSBOT19DVVJTT1I6CisgICAgICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7CisgICAg ICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KKworLyog ZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogCi0JICAg IGNhc2UgTk9fQ1VSU09SOgotCSAgICAgIHctPnBoeXNfY3Vyc29yX3dpZHRoID0gMDsKLQkgICAg ICBicmVhazsKIAotCSAgICBkZWZhdWx0OgotCSAgICAgIGVtYWNzX2Fib3J0ICgpOwotCSAgICB9 CiAJfQogCiAjaWZkZWYgSEFWRV9YX0kxOE4K --Multipart_Tue_Aug_28_23:39:25_2018-1--