From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Sun, 08 Jul 2018 22:28:33 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sun_Jul__8_22:28:32_2018-1" X-Trace: blaine.gmane.org 1531114097 20984 195.159.176.226 (9 Jul 2018 05:28:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2018 05:28:17 +0000 (UTC) Cc: John Wiegley , Marcin Borkowski , Richard Stallman To: 22873@debbugs.gnu.org,17684@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 07:28:12 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 1fcOiY-0005Jv-Tc for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2018 07:28:12 +0200 Original-Received: from localhost ([::1]:39314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcOkg-0002wU-3n for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2018 01:30:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcOkQ-0002wF-VQ for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 01:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcOkN-0001Q3-Nz for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 01:30:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcOkM-0001OG-UN for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 01:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fcOkM-0007lT-EH for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 01:30: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: Mon, 09 Jul 2018 05:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.153111416029759 (code B ref 17684); Mon, 09 Jul 2018 05:30:02 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 9 Jul 2018 05:29:20 +0000 Original-Received: from localhost ([127.0.0.1]:51640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcOjg-0007ju-7t for submit@debbugs.gnu.org; Mon, 09 Jul 2018 01:29:20 -0400 Original-Received: from gateway21.websitewelcome.com ([192.185.45.133]:16861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcOjd-0007je-SR for 17684@debbugs.gnu.org; Mon, 09 Jul 2018 01:29:18 -0400 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 1C509400D73E1 for <17684@debbugs.gnu.org>; Mon, 9 Jul 2018 00:29:17 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id cOixfY7WXRPojcOj5f7pUs; Mon, 09 Jul 2018 00:29:16 -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=szxpmwUAdW3KDhBl+d93w4Rzxm1qdgFYukJ05yqeL3Y=; b=hd5nxeNhspyfxoRFTG7MsjQB4L sOB8oL56QwllZjDTfBMga3xzcSPxPq0J6VYHcmZpPc+wAzna9KXEQju+6QQ3WTXDuI0FDBrDNUk9z Dpwu7TibkiGT8VDJVcN9zwEiLoPLt/0lVDcJiBixwPhcwwQcDyyU/5gHJ8YQ72lvx7JVxVGc8OKw5 Skg1oAO8PeFPTHiF/pin4JELwYHvDAQa/cK4s+eDHg+DXYIa8mPqXnJk8iadsDgGHRT5qmZ96DyPE QCcF7yzqYOs8au7Vhl0A2U+L83Y8wiC1bIycV5Qq7vXSzfMhCe+JyvRBsdUOrMBDmGYIv4bf9jxHi AlBzVaCA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:57117 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1fcOiw-001Ia0-0L; Mon, 09 Jul 2018 00:28:35 -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: 1fcOiw-001Ia0-0L 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]:57117 X-Source-Auth: lawlist X-Email-Count: 5 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:148369 Archived-At: --Multipart_Sun_Jul__8_22:28:32_2018-1 Content-Type: text/plain; charset=US-ASCII I am now at proof concept patch version 012. The patch applies to the master branch as of yesterday (07/07/2018). Multiple fake cursors and crosshairs now use the same function (mc_move_it) to obtain the relevant X/HPOS coordinates. This version provides better compatibility with horizontal scrolling. Crosshairs now works with X11 and Windows. 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 real fake cursors with Magnar Sveen's library (multiple-fake-cursors), install that package first. 6. Open crosshairs.el (attached) and evaluate the buffer. 7. To play with crosshairs, type: M-x +-mode 8. To see an example of crosshairs playing nicely with tab stretches, open up something like simple.el and enable +-mode. 9. To see an example of a variety of cursor styles and widths, type: M-x mc-test X11 and NS are much quicker than Windows. At some point in the future, I will work on more efficient means of calculating X and HPOS and other ways to speed this up. Before moving on to more complicated aspects, I will continue working on compatibility with horizontal scrolling, tab stretches, and word-wrap/window-wrap/truncate. Keith --Multipart_Sun_Jul__8_22:28:32_2018-1 Content-Type: application/el; type=lawlist-elisp Content-Disposition: attachment; filename="crosshairs.el" Content-Transfer-Encoding: base64 Oz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gbWMvbWF4LWN1cnNv cnMKICAgICAgKHVubGVzcyAoPCAobWMvbnVtLWN1cnNvcnMpIG1jL21heC1jdXJzb3JzKQogICAg ICAgIChpZiAoeWVzLW9yLW5vLXAgKGZvcm1hdCAiJWQgYWN0aXZlIGN1cnNvcnMuIENvbnRpbnVl PyAiIChtYy9udW0tY3Vyc29ycykpKQogICAgICAgICAgICAoc2V0cSBtYy9tYXgtY3Vyc29ycyAo cmVhZC1udW1iZXIgIkVudGVyIGEgbmV3LCB0ZW1wb3JhcnkgbWF4aW11bTogIikpCiAgICAgICAg ICAobWMvcmVtb3ZlLWZha2UtY3Vyc29ycykKICAgICAgICAgIChlcnJvciAiQWJvcnRlZDogdG9v IG1hbnkgY3Vyc29ycyIpKSkpCiAgICAobGV0ICgob3ZlcmxheQogICAgICAgICAgICAoaWYgbWMv dXNlLWJ1aWx0LWluLWN1cnNvcnMKICAgICAgICAgICAgICAobWFrZS1vdmVybGF5IChwb2ludCkg KHBvaW50KSkKICAgICAgICAgICAgICAobWMvbWFrZS1jdXJzb3Itb3ZlcmxheS1hdC1wb2ludCkp KSkKICAgICAgKG92ZXJsYXktcHV0IG92ZXJsYXkgJ21jLWlkIChvciBpZCAobWMvY3JlYXRlLWN1 cnNvci1pZCkpKQogICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAndHlwZSAnZmFrZS1jdXJzb3Ip CiAgICAgIChvdmVybGF5LXB1dCBvdmVybGF5ICdwcmlvcml0eSAxMDApCiAgICAgIChtYy9zdG9y ZS1jdXJyZW50LXN0YXRlLWluLW92ZXJsYXkgb3ZlcmxheSkKICAgICAgKHdoZW4gKHVzZS1yZWdp b24tcCkKICAgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncmVnaW9uLW92ZXJsYXkKICAgICAg ICAgICAgICAgICAgICAgKG1jL21ha2UtcmVnaW9uLW92ZXJsYXktYmV0d2Vlbi1wb2ludC1hbmQt bWFyaykpKQogICAgICBvdmVybGF5KSkKCiAgKGRl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8KICAgICAgICAgICAgICAgIDs7IG1ha2UgdGhlIGNv bW1hbmQgY29tcGFyYWJsZSBieSBgZXEnLgogICAgICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwt Y29tbWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCiAgICAgICAg ICAgICAgICA7OyBvdGhlcndpc2UgaXQncyBhIHN5bWJvbCwgYW5kIHdlIGNhbiBiZSBtb3JlIHRo b3JvdWdoCiAgICAgICAgICAgICAgICAoaWYgKGdldCBvcmlnaW5hbC1jb21tYW5kICdtYy0tdW5z dXBwb3J0ZWQpCiAgICAgICAgICAgICAgICAgICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0 ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg b3JpZ2luYWwtY29tbWFuZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIChnZXQgb3JpZ2lu YWwtY29tbWFuZCAnbWMtLXVuc3VwcG9ydGVkKSkKICAgICAgICAgICAgICAgICAgKHdoZW4gKGFu ZCBvcmlnaW5hbC1jb21tYW5kCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLW9uY2UpKQogICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy9jbWRz LXRvLXJ1bi1vbmNlKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMvYWx3YXlz LXJ1bi1mb3ItYWxsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtZW1xIG9yaWdp bmFsLWNvbW1hbmQgbWMtLWRlZmF1bHQtY21kcy10by1ydW4tZm9yLWFsbCkKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1 bi1mb3ItYWxsKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvcHJvbXB0LWZv ci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKICAgICAgICAgICAg ICAgICAgICAobWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJzb3JzIG9yaWdpbmFs LWNvbW1hbmQpKSkpKSkKICAgICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQtaW4tY3Vyc29y cwogICAgICAgICAgICAgICAgKGxldCogKCh3aW4gKHNlbGVjdGVkLXdpbmRvdykpCiAgICAgICAg ICAgICAgICAgICAgICAgKHdpbmRvdy1zdGFydCAod2luZG93LXN0YXJ0IHdpbikpCiAgICAgICAg ICAgICAgICAgICAgICAgKHdpbmRvdy1lbmQgKHdpbmRvdy1lbmQgd2luKSkKICAgICAgICAgICAg ICAgICAgICAgICAob3ZlcmxheXMgKG1jL2FsbC1mYWtlLWN1cnNvcnMpKQogICAgICAgICAgICAg ICAgICAgICAgIChsc3QKICAgICAgICAgICAgICAgICAgICAgICAgIChtYXBjYXIKICAgICAgICAg ICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoeCkKICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobGV0KiAoKHBvcyAob3ZlcmxheS1zdGFydCB4KSkKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKGN1cnJlbnQtY29sdW1uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGlmIChhbmQgKD49IHBvcyB3aW5kb3ctc3RhcnQpCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDw9IHBvcyB3aW5kb3ctZW5kKSkKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbgogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ290by1jaGFyIHBvcykKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnQtY29sdW1uKSkKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSkKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChjb25kCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgo bWMtb2RkcCBjdXJyZW50LWNvbHVtbikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobGlzdCBwb3MgImJhciIgIiNGRjAwMDAiKSkgOzsgcmVkIG9yIFsxLjAgMC4wIDAuMF0KICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChtYy1ldmVucCBjdXJyZW50LWNvbHVtbikK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGlzdCBwb3MgImJhciIgInllbGxv dyIpKSkpKSA7OyAjRkZGRjAwIG9yIFsxLjAgMS4wIDAuMF0KICAgICAgICAgICAgICAgICAgICAg ICAgICAgb3ZlcmxheXMpKSkKICAgICAgICAgICAgICAgICAgKHNldHEgbWMtZ2x5cGgtbGlzdCBs c3QpKSkpKSkpCgogIChkZWZ1biBtYy9tYXJrLW5leHQtbGlrZS10aGlzLWN5Y2xlLWZvcndhcmQg KCkKICAiTWFya3MgbmV4dCBvY2N1cmVuY2Ugb2Ygd29yZCBsaWtlIHRoaXMgYW5kIGFkdmFuY2Vz IGN1cnNvciB0byB0aGlzIG9jY3VycmVuY2UiCiAgKGludGVyYWN0aXZlKQogICAgKG1jL21hcmst bmV4dC1saWtlLXRoaXMgMSkpCgogIChkZWZ1biBtYy9tYXJrLXByZXZpb3VzLWxpa2UtdGhpcy1j eWNsZS1mb3J3YXJkICgpCiAgIk1hcmtzIG5leHQgb2NjdXJyZW5jZSBvZiB3b3JkIGxpa2UgdGhp cyBhbmQgYWR2YW5jZXMgY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ICcoKDEgImhiYXIiICJtYWdlbnRhIikKICAg ICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQogICAgICAgICAgICAgICAgICAg ICAgKDMgImJveCIgIiMwMEZGMDAiKQogICAgICAgICAgICAgICAgICAgICAgKDQgImhvbGxvdyIg IiMwMDAwRkYiKQogICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAuMCAx LjBdKQogICAgICAgICAgICAgICAgICAgICAgKDYgKCJiYXIiIDMpIFswLjAgMS4wIDEuMF0pKSkp CiAgICAoc2VsZWN0LXdpbmRvdyAoZGlzcGxheS1idWZmZXIgYnVmZmVyKSkKICAgIDs7OyBUaGUg dHJpZ2dlciBpbiBga2V5Ym9hcmQuY2AgaXMgbm90IGFjdGl2YXRlZCBpbiB0aGlzIGV4YW1wbGUs IHNvIHdlCiAgICA7OzsgZm9yY2UgdGhlIG11bHRpcGxlIGN1cnNvcnMgdG8gYmUgZHJhd24uCiAg ICAobWMtYWN0aXZhdGUtY3Vyc29ycyAoc2VsZWN0ZWQtd2luZG93KSkpKQoKKGRlZnVuICstdGlt ZXItZm4gKCkKIlNpbmNlIHRoaXMgZmlyZXMgZ2xvYmFsbHksIHdlIG11c3QgY29udHJvbCB3aGlj aCBidWZmZXJzIGNyb3NzaGFpcnMgYXBwZWFyIGluLiIKICAod2hlbiArLW1vZGUKICAgIChzZXRx IG92ZXJsYXktYXJyb3ctcG9zaXRpb24gbmlsKQogICAgOzs7IEF2b2lkIHBvdGVudGlhbCBjb25m bGljdHMgd2l0aCB1c2VyLWRlZmluZWQgYGZhY2UtcmVtYXBwaW5nLWFsaXN0Jy4KICAgICh3aGVu IChudWxsIChkZWZhdWx0LXZhbHVlICdmYWNlLXJlbWFwcGluZy1hbGlzdCkpCiAgICAgIChzZXRx LWxvY2FsIGZhY2UtcmVtYXBwaW5nLWFsaXN0ICcoKCstb3ZlcmxheS1hcnJvdy1mYWNlICstbGVm dC1mcmluZ2Ut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biB2ci10aW1lcgogICAgICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVscSB2ci10aW1lciB0 aW1lci1pZGxlLWxpc3QpKQogICAgICAgIChzZXRxIHZyLXRpbWVyIG5pbCkpCiAgICAgICh1bmxl c3MgKG1lbXEgdGhpcy1jb21tYW5kICcobXdoZWVsLXNjcm9sbCkpCiAgICAgICAgKCstZGVsZXRl LXBhcmVucy1vdmVybGF5cykpCiAgICAgIChpZiBmb3JjZQogICAgICAgIChwcm9nbgogICAgICAg ICAgKCstcGFyZW5zLWZuKQogICAgICAgICAgKG1jLWFjdGl2YXRlLWNyb3NzaGFpcnMgKHNlbGVj dGVkLXdpbmRvdykpKQogICAgICAgIChzZXRxIHZyLXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVy IDAuNSBuaWwgIycrLXRpbWVyLWZuKSkpKSkpCgooZGVmaW5lLW1pbm9yLW1vZGUgKy1tb2RlCiJN aW5vciBtb2RlIGZvciBkaXNwbGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCiAgOmluaXQtdmFs dWUgbmlsCiAgOmxpZ2h0ZXIgIiArIgogIDprZXltYXAgbmlsCiAgOmdsb2JhbCBuaWwKICA6Z3Jv dXAgJystbW9kZQogIChjb25kCiAgICAoKy1tb2RlCiAgICAgIChpZiBibGluay1jdXJzb3ItbW9k ZQogICAgICAgIChibGluay1jdXJzb3ItbW9kZSAtMSkpCiAgICAgIChzZXRxIGNyb3NzaGFpcnMg dCkKICAgICAgOzs7IFJFTUlOREVSOiAgVGhlIHVzZXIgY2FuIHN1cHByZXNzIGVpdGhlciBvciBi b3RoIG9mIHRoZSBydWxlcnM6CiAgICAgIDs7IChzZXRxIGNyb3NzaGFpcnMtaG9yaXpvbnRhbC1y dWxlciBuaWwpCiAgICAgIDs7IChzZXRxIGNyb3NzaGFpcnMtdmVydGljYWwtcnVsZXIgbmlsKQog ICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICcrLS1zYXZlZC1zdGF0ZSkgbmlsKQogICAg ICA7OyBTYXZlIHRoZSBsb2NhbCB2YWx1ZXMgb2Ygc29tZSB2YXJpYWJsZXMsIHRvIGJlIHJlc3Rv cmVkIGlmIHZsLW1vZGUgaXMgdHVybmVkIG9mZi4KICAgICAgKGRvbGlzdCAodmFyICcoYnVmZmVy LWRpc3BsYXktdGFibGUKICAgICAgICAgICAgICAgICAgICAgZnJpbmdlLWluZGljYXRvci1hbGlz dAogICAgICAgICAgICAgICAgICAgICB0YWItd2lkdGgKICAgICAgICAgICAgICAgICAgICAgbGlu ZS1tb3ZlLXZpc3VhbAogICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRo LXdpbmRvd3MKICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtbGluZXMKICAgICAgICAgICAg ICAgICAgICAgd29yZC13cmFwKSkKICAgICAgICAod2hlbiAobG9jYWwtdmFyaWFibGUtcCB2YXIp CiAgICAgICAgICAocHVzaCAoY29ucyB2YXIgKHN5bWJvbC12YWx1ZSB2YXIpKSArLS1zYXZlZC1z dGF0ZSkpKQogICAgICAoc2V0cSBkaXNwbGF5LWxpbmUtbnVtYmVycyB0KQogICAgICAoc2V0cS1s b2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQogICAgICAoc2V0cS1sb2NhbCBo c2Nyb2xsLXN0ZXAgNSkKICAgICAgKHNldHEgYnVmZmVyLWRpc3BsYXktdGFibGUgKy1idWZmZXIt ZGlzcGxheS10YWJsZSkKICAgICAgKHNldHEgdGFiLXdpZHRoIDQpCiAgICAgIChzZXRxLWxvY2Fs IHRhYi1zdG9wLWxpc3QgKG51bWJlci1zZXF1ZW5jZSAwIDEwMDAgNCkpCiAgICAgIChzZXQgKG1h a2UtbG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpIHQpCiAgICAgIChzZXQgKG1ha2Ut bG9jYWwtdmFyaWFibGUgJ3RydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cykgbmlsKQogICAg ICAoc2V0cSB0cnVuY2F0ZS1saW5lcyBuaWwpCiAgICAgIChzZXRxIHdvcmQtd3JhcCB0KQogICAg ICAoc2V0cSBpbmRpY2F0ZS1lbXB0eS1saW5lcyB0KQogICAgICAoc2V0cSBpbmRpY2F0ZS1idWZm ZXItYm91bmRhcmllcyAnbGVmdCkKICAgICAgKHNldHEgZnJpbmdlLWluZGljYXRvci1hbGlzdCAn KAogICAgICAgICh0cnVuY2F0aW9uIC4gKCstZnJpbmdlLWxlZnQtYXJyb3cgKy1mcmluZ2Utcmln aHQtYXJyb3cpKQogICAgICAgIChjb250aW51YXRpb24gLiAoKy1mcmluZ2UtbGVmdC1jdXJseS1h cnJvdyArLWJhY2tzbGFzaCkpCiAgICAgICAgKG92ZXJsYXktYXJyb3cgLiArLWZyaW5nZS1yaWdo dC10cmlhbmdsZSkKICAgICAgICAodXAgLiArLWZyaW5nZS11cC1hcnJvdykKICAgICAgICAoZG93 biAuICstZnJpbmdlLWRvd24tYXJyb3cpCiAgICAgICAgKHRvcCAuICstZnJpbmdlLXRvcC1sZWZ0 LWFuZ2xlKQogICAgICAgIChib3R0b20gLiArLWZyaW5nZS1ib3R0b20tcmlnaHQtYW5nbGUpCiAg ICAgICAgKHRvcC1ib3R0b20gLiAoKy1mcmluZ2UtbGVmdC1icmFja2V0CiAgICAgICAgICAgICAg ICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYnJhY2tldAogICAgICAgICAgICAgICAgICAgICAgICst ZnJpbmdlLXRvcC1yaWdodC1hbmdsZQogICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXRv cC1sZWZ0LWFuZ2xlKSkKICAgICAgICAoZW1wdHktbGluZSAuICstZnJpbmdlLWVtcHR5LWxpbmUp CiAgICAgICAgKHVua25vd24gLiArLWZyaW5nZS1xdWVzdGlvbi1tYXJrKSkpCiAgICAgIDs7OyBS RU1BUCBERUZBVUxUIEJFSEFWSU9SIChpZiB0aGUgdXNlciB3YW50cyBzb21ldGhpbmcgZGlmZmVy ZW50KS4KICAgICAgKHNldHEgZnJpbmdlLWN1cnNvci1hbGlzdCAnKChib3ggLiArLWZyaW5nZS1s ZWZ0LXRyaWFuZ2xlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdyAu ICstaG9sbG93LXJlY3RhbmdsZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChi YXIgLiArLXZlcnRpY2FsLWJhcikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICho YmFyIC4gKy1mcmluZ2UtaG9yaXpvbnRhbC1iYXIpCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoaG9sbG93LXNtYWxsIC4gKy1mcmluZ2UtaG9sbG93LXNxdWFyZSkpKQogICAgICAo c2V0cSBmaWxsLWNvbHVtbiA4MCkKICAgICAgKGFkZC1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAn Ky1kcmF3LWhvcml6b250YWwtcnVsZXIgJ2FwcGVuZCAnbG9jYWwpCiAgICAgIChhZGQtaG9vayAn d2luZG93LWNvbmZpZ3VyYXRpb24tY2hhbmdlLWhvb2sgJystcmVkcmF3LWZvcnRod2l0aCBuaWwg J2xvY2FsKQogICAgICAoYWRkLWhvb2sgJ2NoYW5nZS1tYWpvci1tb2RlLWhvb2sgJ3R1cm4tb2Zm LSstbW9kZSBuaWwgJ2xvY2FsKQogICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAn YW55KQogICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScuIikpKQogICAgKHQKICAg ICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ2Nyb3NzaGFpcnMpCiAgICAgIChraWxsLWxvY2FsLXZh cmlhYmxlICdkaXNwbGF5LWxpbmUtbnVtYmVycykKICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J2Rpc3B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hcikpCiAgICAgICAgIChvY2hh ciAoY2hhci1hZnRlciBvcG9pbnQpKQogICAgICAgICAocG9zMQogICAgICAgICAgIChjb25kCiAg ICAgICAgICAgICAoKGFuZCBvY2hhcgogICAgICAgICAgICAgICAgICAgKG9yIDs7OyAoY2hhci10 by1zdHJpbmcgNDApID0+IG9wZW5pbmcgcGFyZW50aGVzaXMKICAgICAgICAgICAgICAgICAgICAg ICAoPSBvY2hhciA0MCkKICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5n IDkxKSA9PiBvcGVuaW5nIHNxdWFyZSBicmFja2V0CiAgICAgICAgICAgICAgICAgICAgICAgKD0g b2NoYXIgOTEpCiAgICAgICAgICAgICAgICAgICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyAxMjMp ID0+IG9wZW5pbmcgd2F2eSBicmFja2V0CiAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIg MTIzKSkpCiAgICAgICAgICAgICAgICAobWluICgxKyBvcG9pbnQpIChwb2ludC1tYXgpKSkKICAg ICAgICAgICAgICgob3IgOzs7IChjaGFyLXRvLXN0cmluZyA0MSkgPT4gY2xvc2luZyBwYXJlbnRo ZXNpcwogICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKICAgICAgICAgICAg ICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2luZyBzcXVhcmUgYnJhY2tldAog ICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA5MykKICAgICAgICAgICAgICAgICAg Ozs7IChjaGFyLXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFja2V0CiAgICAgICAg ICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCiAgICAgICAgICAgICAgICAobWF4IChw b2ludC1taW4pICgxLSBvcG9pbnQpKSkKICAgICAgICAgICAgICh0CiAgICAgICAgICAgICAgICBv cG9pbnQpKSkKICAgICAgICAgcG9zMgogICAgICAgICBzZWxlY3RlZC1mYWNlKQogICAgKHNhdmUt ZXhjdXJzaW9uCiAgICAgIChjb25kaXRpb24tY2FzZSBuaWwKICAgICAgICAod2hpbGUgKHNldHEg cG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9tIHBvczEpKSkKICAgICAgICAgIChz ZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAxKSkKICAgICAgICAgIChpZiAoPSBpIDEwKQogICAg ICAgICAgICAoc2V0cSBpIDEpCiAgICAgICAgICAgIChpbmNmIGkpKQogICAgICAgICAgKHNldHEg c2VsZWN0ZWQtZmFjZSAoY29uZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBp IDEpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtb25lLWZhY2Up CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMikKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoKD0gaSAzKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JystcGFyZW5zLXRocmVlLWZhY2UpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9 IGkgNCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1mb3VyLWZh Y2UpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNSkKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZlLWZhY2UpCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKCg9IGkgNikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICcrLXBhcmVucy1zaXgtZmFjZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA3KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXNldmVu LWZhY2UpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgOCkKICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1laWdodC1mYWNlKQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDkpCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAnKy1wYXJlbnMtbmluZS1mYWNlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICgoPSBpIDEwKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5z LXRlbi1mYWNlKSkpCiAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBw b3MxKSkpKQogICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ3dpbmRvdyB3aW4pCiAgICAgICAg ICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxlY3RlZC1mYWNlKSkKICAgICAgICAgICh3aGVu IHBvczIKICAgICAgICAgICAgKGxldCAoKG92IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIp KSkKICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ3dpbmRvdyB3aW4pCiAgICAgICAgICAg ICAgKG92ZXJsYXktcHV0IG92ICdmYWNlIHNlbGVjdGVkLWZhY2UpKSkpCiAgICAgICAgKGVycm9y IG5pbCkpKQogICAgKHNldHEgKy1wYXJlbnMtb3ZlcmxheXMtZXhpc3QtcCB0KSkpCgooZGVmdW4g Ky1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQgbmFtZSB2YWwpCiJSZW1vdmUgdGhlIG92ZXJsYXlz IHRoYXQgYXJlIGBlcXVhbC1pbmNsdWRpbmctcHJvcGVydGllc2AuCkluY2x1ZGVzIGEgdW5pcXVl IHNpdHVhdGlvbiB3aGVuIGFuIG92ZXJsYXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVy dHkKaXMgYXQgdGhlIHZlcnkgZW5kIG9mIGEgbmFycm93ZWQtYnVmZmVyLiIKICAobGV0KiAoCiAg ICAgIChwb2ludC1tYXggKHBvaW50LW1heCkpCiAgICAgIChwb2ludC1taW4gKHBvaW50LW1pbikp CiAgICAgIChuYXJyb3dlZC1wIChidWZmZXItbmFycm93ZWQtcCkpCiAgICAgIChiZWcgKGlmIGJl ZyBiZWcgcG9pbnQtbWluKSkKICAgICAgKGVuZAogICAgICAgIChjb25kCiAgICAgICAgICAoKGFu ZAogICAgICAgICAgICAgIChub3QgbmFycm93ZWQtcCkKICAgICAgICAgICAgICBlbmQpCiAgICAg ICAgICAgIGVuZCkKICAgICAgICAgICgoYW5kCiAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1w KQogICAgICAgICAgICAgIChudWxsIGVuZCkpCiAgICAgICAgICAgIHBvaW50LW1heCkKICAgICAg ICAgICgoYW5kCiAgICAgICAgICAgICAgbmFycm93ZWQtcAogICAgICAgICAgICAgIGVuZAogICAg ICAgICAgICAgICg8IGVuZCBwb2ludC1tYXgpKQogICAgICAgICAgICBlbmQpCiAgICAgICAgICAo KGFuZAogICAgICAgICAgICAgIG5hcnJvd2VkLXAKICAgICAgICAgICAgICBlbmQKICAgICAgICAg ICAgICAoPSBlbmQgcG9pbnQtbWF4KSkKICAgICAgICAgICAgKDErIGVuZCkpCiAgICAgICAgICAo KGFuZAogICAgICAgICAgICAgIG5hcnJvd2VkLXAKICAgICAgICAgICAgICAobnVsbCBlbmQpKQog ICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKICAgICAgKG92ZXJsYXlzCiAgICAgICAgKHBy b2duCiAgICAgICAgICAob3ZlcmxheS1yZWNlbnRlciBlbmQpCiAgICAgICAgICAob3ZlcmxheXMt aW4gYmVnIGVuZCkpKSApCiAgICAod2hlbiAoYW5kIGJlZyBlbmQgbmFtZSB2YWwpCiAgICAgIChk b2xpc3QgKG8gb3ZlcmxheXMpCiAgICAgICAgKGNvbmQKICAgICAgICAgICgoYW5kCiAgICAgICAg ICAgICAgICAoZXEgbmFtZSAnZmFjZSkKICAgICAgICAgICAgICAgIChlcSAob3ZlcmxheS1nZXQg byBuYW1lKSB2YWwpKQogICAgICAgICAgICA7OyBFaXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0 c2lkZSBiZWcuLi5lbmQKICAgICAgICAgICAgOzsgb3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcu Li5lbmQKICAgICAgICAgICAgOzsgb3IgZGVsZXRlIGl0IGVudGlyZWx5IChpZiBpdCBpcyBjb250 YWluZWQgaW4gYmVnLi4uZW5kKS4KICAgICAgICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8p IGJlZykKICAgICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5kKQogICAgICAg ICAgICAgIChwcm9nbgogICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5 IG8pCiAgICAgICAgICAgICAgICAgIChvdmVybGF5LXN0YXJ0IG8pIGJlZykKICAgICAgICAgICAg ICAgIChtb3ZlLW92ZXJsYXkgbyBlbmQgKG92ZXJsYXktZW5kIG8pKSkKICAgICAgICAgICAgICAg ICAgKG1vdmUtb3ZlcmxheSBvIChvdmVybGF5LXN0YXJ0IG8pIGJlZykpCiAgICAgICAgICAgICAg KGlmICg+IChvdmVybGF5LWVuZCBvKSBlbmQpCiAgICAgICAgICAgICAgICAgIChtb3ZlLW92ZXJs YXkgbyBlbmQgKG92ZXJsYXktZW5kIG8pKQogICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVybGF5 IG8pKSkpCiAgICAgICAgICAoKGFuZAogICAgICAgICAgICAgICAgKG5vdCAoZXEgbmFtZSAnZmFj ZSkpCiAgICAgICAgICAgICAgICAoZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXM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ky1mcmluZ2UtaG9yaXpvbnRhbC1iYXIgJystZnJpbmdlLWhvcml6b250YWwtYmFyLWZhY2UpCgoK KGRlZmluZS1mcmluZ2UtYml0bWFwICcrLWZyaW5nZS1lbXB0eS1saW5lICgrLWZyaW5nZS1oZWxw ZXItZGVjaW1hbAoiLi4uLi4uLi4iCiIuLnh4eHguLiIKIi4uLi4uLi4uIgoiLi4uLi4uLi4iCiIu Lnh4eHguLiIKIi4uLi4uLi4uIikgbmlsIG5pbCAnKHRvcCB0KSkKCihkZWZmYWNlICstZnJpbmdl LWVtcHR5LWxpbmUtZmFjZQogICcoKHQgKDpmb3JlZ3JvdW5kICJEYXJrR3JlZW4iKSkpCiAgIkZh Y2UgZm9yIGArLWZyaW5nZS1lbXB0eS1saW5lLWZhY2UnLiIKICA6Z3JvdXAgJystbW9kZSkKCihz ZXQtZnJpbmdlLWJpdG1hcC1mYWNlICcrLWZyaW5nZS1lbXB0eS1saW5lICcrLWZyaW5nZS1lbXB0 eS1saW5lLWZhY2UpCgo7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsKCihwcm92aWRlICdjcm9zc2hh aXJzKQ== --Multipart_Sun_Jul__8_22:28:32_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="patch_012.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvZmFjZXMuZWwgYi9saXNwL2ZhY2VzLmVsCmluZGV4IDE4YjgyMWEu LjYxNDIwNWIgMTAwNjQ0Ci0tLSBhL2xpc3AvZmFjZXMuZWwKKysrIGIvbGlzcC9mYWNlcy5lbApA QCAtMjUwMiw2ICsyNTAyLDMzIEBAIHVud2FudGVkIGVmZmVjdHMuIgogICA6Z3JvdXAgJ2Jhc2lj LWZhY2VzCiAgIDpncm91cCAnZG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KSwgaWR4KTsgKytpZHg7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogICBYU0VURkFT VElOVCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgbW9kZV9saW5lX2Zvcm1hdCksIGlkeCk7 ICsraWR4OwogICBYU0VURkFTVElOVCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgYWJicmV2 X21vZGUpLCBpZHgpOyArK2lkeDsKICAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxf ZmxhZ3MsIG92ZXJ3cml0ZV9tb2RlKSwgaWR4KTsgKytpZHg7CkBAIC01MjAwLDYgKzUyMDksMTUg QEAgaW5pdF9idWZmZXJfb25jZSAodm9pZCkKICAgLyogTXVzdCBkbyB0aGVzZSBiZWZvcmUgbWFr aW5nIHRoZSBmaXJzdCBidWZmZXIhICovCiAKICAgLyogcmVhbCBzZXR1cCBpcyBkb25lIGluIGJp bmRpbmdzLmVsICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxlIGN1cnNv cnMgKi8KKworICBic2V0X2Jsdl9tY19nbHlwaF9saXN0ICgmYnVmZmVyX2RlZmF1bHRzLCBRbmls KTsKKyAgYnNldF9ibHZfY3Jvc3NoYWlycyAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7CisgIGJz ZXRfYmx2X2Nyb3NzaGFpcnNfaG9yaXpvbnRhbF9ydWxlciAoJmJ1ZmZlcl9kZWZhdWx0cywgUXQp OworICBic2V0X2Jsdl9jcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyICgmYnVmZmVyX2RlZmF1bHRz LCBRdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogICBic2V0X21vZGVfbGluZV9mb3Jt YXQgKCZidWZmZXJfZGVmYXVsdHMsIGJ1aWxkX3B1cmVfY19zdHJpbmcgKCIlLSIpKTsKICAgYnNl dF9oZWFkZXJfbGluZV9mb3JtYXQgKCZidWZmZXJfZGVmYXVsdHMsIFFuaWwpOwogICBic2V0X2Fi YnJldl9tb2RlICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKQEAgLTU0NDgsNiArNTQ2NiwxNiBA QCBzeW1zX29mX2J1ZmZlciAodm9pZCkKICAgc3RhdGljcHJvICgmUVNGdW5kYW1lbnRhbCk7CiAg IHN0YXRpY3BybyAoJlZidWZmZXJfYWxpc3QpOwogCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKworICBERUZTWU0gKFFtY19nbHlwaF9saXN0LCAibWMt Z2x5cGgtbGlzdCIpOworICBERUZTWU0gKFFjcm9zc2hhaXJzLCAiY3Jvc3NoYWlycyIpOworICBE RUZTWU0gKFFjcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXIsICJjcm9zc2hhaXJzLWhvcml6b250 YWwtcnVsZXIiKTsKKyAgREVGU1lNIChRY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlciwgImNyb3Nz aGFpcnMtdmVydGljYWwtcnVsZXIiKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKICAg REVGU1lNIChRY2hvaWNlLCAiY2hvaWNlIik7CiAgIERFRlNZTSAoUWxlZnQsICJsZWZ0Iik7CiAg IERFRlNZTSAoUXJpZ2h0LCAicmlnaHQiKTsKQEAgLTU0ODUsNiArNTUxMywyNCBAQCBzeW1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FRlZBUl9QRVJfQlVGRkVSICgiY3Jvc3NoYWlycy12ZXJ0 aWNhbC1ydWxlciIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9y dWxlciksIFFuaWwsCisgICAgZG9jOiAvKiBBIGJ1ZmVyLWxvY2FsIHZhcmlhYmxlIHRvIGFjdGl2 YXRlL2RlYWN0aXZhdGUgdGhlIGNyb3NzaGFpcnMgdmVydGljYWwgcnVsZXIuICAqLyk7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCiAgIERFRlZBUl9QRVJfQlVGRkVSICgiaGVhZGVyLWxp bmUtZm9ybWF0IiwKIAkJICAgICAmQlZBUiAoY3VycmVudF9idWZmZXIsIGhlYWRlcl9saW5lX2Zv cm1hdCksCiAJCSAgICAgUW5pbCwKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuaCBiL3NyYy9idWZm ZXIuaAppbmRleCA4NWI1NjMxLi5kMzRkNTQ0IDEwMDY0NAotLS0gYS9zcmMvYnVmZmVyLmgKKysr IGIvc3JjL2J1ZmZlci5oCkBAIC02NTgsNiArNjU4LDIzIEBAIHN0cnVjdCBidWZmZXIKICAgICAg Y2FjaGUgYXJlIGVuYWJsZWQuICBTZWUgc2VhcmNoLmMsIGluZGVudC5jIGFuZCBiaWRpLmMgZm9y IGRldGFpbHMuICAqLwogICBMaXNwX09iamVjdCBjYWNoZV9sb25nX3NjYW5zXzsKIAorLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBtdWx0aXBsZSBjdXJzb3JzICovCisKKyAgLyogVGhlIG5h bWUgb2YgbGlzdCB1c2VkIGJ5IG11bHRpcGxlIGN1cnNvcnMgZm9yIG5leHQgcmVkaXNwbGF5LiAg Ki8KKyAgT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qKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBtdWx0aXBsZSBjdXJzb3Jz ICovCisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19nbHlwaF9saXN0IChzdHJ1Y3QgYnVmZmVy ICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX2dseXBoX2xpc3RfID0gdmFsOworfQor CitJTkxJTkUgdm9pZAorYnNldF9ibHZfY3Jvc3NoYWlycyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlz cF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hhaXJzXyA9IHZhbDsKK30KKworSU5MSU5FIHZv aWQKK2JzZXRfYmx2X2Nyb3NzaGFpcnNfaG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZlciAq YiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXJf ID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfY3Jvc3NoYWlyc192ZXJ0aWNhbF9y dWxlciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hh aXJzX3ZlcnRpY2FsX3J1bGVyXyA9IHZhbDsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKIElOTElORSB2b2lkCiBic2V0X2JpZGlfcGFyYWdyYXBoX2RpcmVjdGlvbiAoc3RydWN0IGJ1 ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQogewpkaWZmIC0tZ2l0IGEvc3JjL2Rpc3BleHRlcm4u aCBiL3NyYy9kaXNwZXh0ZXJuLmgKaW5kZXggMjE4MGM5YS4uNTA5NzBiMiAxMDA2NDQKLS0tIGEv c3JjL2Rpc3BleHRlcm4uaAorKysgYi9zcmMvZGlzcGV4dGVybi5oCkBAIC0yODk5LDcgKzI4OTks MTMgQEAgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2UKIAkJCSAgICAgIHN0cnVjdCBnbHlwaF9y b3cgKmdseXBoX3JvdywKIAkJCSAgICAgIGludCB4LCBpbnQgeSwKIAkJCSAgICAgIGVudW0gdGV4 dF9jdXJzb3Jfa2luZHMgY3Vyc29yX3R5cGUsCi0JCQkgICAgICBpbnQgY3Vyc29yX3dpZHRoLCBi b29sIG9uX3AsIGJvb2wgYWN0aXZlX3ApOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBt dWx0aXBsZSBjdXJzb3JzICovCisKKyAgICAgICAgIGludCBjdXJzb3Jfd2lkdGgsIGJvb2wgb25f cCwgYm9vbCBhY3RpdmVfcCwKKyAgICAgICAgIExpc3BfT2JqZWN0IGNvbG9yX3ZlY3RvciwgTGlz cF9PYmplY3QgZmxhdm9yKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCiAKICAgLyogRHJh dyB2ZXJ0aWNhbCBib3JkZXIgZm9yIHdpbmRvdyBXIGZyb20gKFgsWV8wKSB0byAoWCxZXzEpLiAg Ki8KICAgdm9pZCAoKmRyYXdfdmVydGljYWxfd2luZG93X2JvcmRlcikgKHN0cnVjdCB3aW5kb3cg KncsCkBAIC0zMjg0LDYgKzMyOTAsMTMgQEAgZXh0ZXJuIHZvaWQgZ2V0X2ZvbnRfYXNjZW50X2Rl c2NlbnQgKHN0cnVjdCBmb250ICosIGludCAqLCBpbnQgKik7CiAKICNpZmRlZiBIQVZFX1dJTkRP V19TWVNURU0KIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKi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Zm9yIGBkZWZpbmUtZnJpbmdlLWJpdG1hcCcuCisgICAgRWFjaCBz dHJpbmcgaW4gU1RSSU5HUyByZXByZXNlbnRzIGEgbGluZSBvZiB0aGUgZnJpbmdlIGJpdG1hcC4K KyAgICBQZXJpb2RzICguKSBhcmUgYmFja2dyb3VuZC1jb2xvcmVkIHBpeGVsOyBYcyBhcmUgZm9y ZWdyb3VuZC1jb2xvcmVkLiBUaGUKKyAgICBmcmluZ2UgYml0bWFwIGFsd2F5cyBpcyBhbGlnbmVk IHRvIHRoZSByaWdodC4gSWYgdGhlIGZyaW5nZSBoYXMgaGFsZgorICAgIHdpZHRoLCBvbmx5IHRo ZSBsZWZ0IDQgcGl4ZWxzIG9mIGFuIDggcGl4ZWwgYml0bWFwIHdpbGwgYmUgc2hvd24uCisgICAg Rm9yIGV4YW1wbGUsIHRoZSBmb2xsb3dpbmcgY29kZSBkZWZpbmVzIGEgZGlhZ29uYWwgbGluZS4K KyAgICBcKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgIFwiWFguLi4uLi5cIgorICAg IFwiLi5YWC4uLi5cIgorICAgIFwiLi4uLlhYLi5cIgorICAgIFwiLi4uLi4uWFhcIlwpIgorICAg ICAgKHVubGVzcyAoY2RyIHN0cmluZ3MpCisgICAgICAgIChzZXRxIHN0cmluZ3MgKHNwbGl0LXN0 cmluZyAoY2FyIHN0cmluZ3MpICJcbiIpKSkKKyAgICAgIChhcHBseSAndmVjdG9yCisgICAgICAg IChtYXBjYXIKKyAgICAgICAgICAobGFtYmRhIChzdHIpCisgICAgICAgICAgICAobGV0ICgobnVt IDApKQorICAgICAgICAgICAgICAoZG9saXN0IChjIChzdHJpbmctdG8tbGlzdCBzdHIpKQorICAg ICAgICAgICAgICAgIChzZXRxIG51bSAoKyAoKiBudW0gMikgKGlmIChlcSBjID8uKSAwIDEpKSkp CisgICAgICAgICAgICAgIChmb3JtYXQgIiUjLXgiIG51bSkpKQorICAgICAgICAgIHN0cmluZ3Mp KSkKKyovCisKKy8qIDI0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAg InguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgIngu Lnh4Li4uIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgIngueHh4 eHh4IgorICAgICAgIngueHh4eHh4IgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi54eC4u IgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgor ICAgICAgInguLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxf YmFyX3JpZ2h0X2FuZ2xlX2JpdHNbXSA9eworICAweDgwLCAweDgwLCAweDgwLCAweDk4LCAweDhj LCAweDg2LCAweGJmLAorICAweGJmLCAweDg2LCAweDhjLCAweDk4LCAweDgwLCAweDgwLCAweDgw fTsKKworLyogMjUKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4 eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4ueHgu LngiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4uLi54eHgiCisgICAgICAieC54eHh4eHgi CisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eHgiCisgICAgICAieC4uLnh4LngiCisg ICAgICAieC4ueHguLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAg ICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFu Z2xlX3JpZ2h0X2FuZ2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDk5LCAweDhk LCAweDg3LCAweGJmLAorICAweGJmLCAweDg3LCAweDhkLCAweDk5LCAweDgxLCAweDgxLCAweGZm fTsKKworLyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4 eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAg ICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFu Z2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgx LAorICAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjcK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4u Li4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4i KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfYml0c1tdID17Cisg IDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsCisgIDB4ODAsIDB4ODAs IDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAyOAorICAgICgrLWZyaW5nZS1o ZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIueHguLi4uLiIKKyAg ICAgICIuLnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAg ICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIu Li4ueHguLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIueHgu Li4uLiIKKyAgICAgICJ4eC4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Jp Z2h0X2FuZ2xlX2JpdHNbXSA9eworICAweGMwLCAweDYwLCAweDMwLCAweDE4LCAweGMsIDB4Niwg MHgzLCAweDYsIDB4YywgMHgxOCwgMHgzMCwgMHg2MCwgMHhjMH07CisKKy8qIDI5CisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4u Li4uIgorICAgICAgIiB4eC4uLi4uIgorICAgICAgIi54eC4uLi4uIgorICAgICAgIi4ueHguLi4u IgorICAgICAgIi4ueHguLi4uIgorICAgICAgIi4uLnh4Li4uIgorICAgICAgIi4uLnh4Li4uIgor ICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi4ueHguIgorICAg ICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfYmFja3NsYXNoX2JpdHNbXSA9eworICAweGMwLCAweGMw LCAweGUwLCAweDYwLCAweDMwLCAweDMwLCAweDE4LCAweDE4LCAweGMsIDB4YywgMHg2LCAweDYs IDB4MywgMHgzfTsKKworLyogMzAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAieHguLi4uLi4iCisgICAgICAieHguLi4uLi4iCisgICAgICAieHh4Li4uLi4iCisgICAg ICAieHh4Li4uLi4iCisgICAgICAieC54eC4uLi4iCisgICAgICAieC54eC4uLi4iCisgICAgICAi eC4ueHguLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4u Lnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLi4u eHgiCisgICAgICAieC4uLi4ueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0 aWNhbF9iYXJfYmFja3NsYXNoX2JpdHNbXSA9eworICAweGMwLCAweGMwLCAweGUwLCAweGUwLCAw eGIwLCAweGIwLCAweDk4LAorICAweDk4LCAweDhjLCAweDhjLCAweDg2LCAweDg2LCAweDgzLCAw eDgzfTsKKworLyogMzEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAi Lnh4eHh4eC4iCisgICAgICAieHh4eC54Li4iCisgICAgICAieHh4eC54Li4iCisgICAgICAieHh4 eC54Li4iCisgICAgICAiLnh4eC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54 Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4i CisgICAgICAiLi4ueC54Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19waWxjcm93 X2JpdHNbXSA9eworICAweDdlLCAweGY0LCAweGY0LCAweGY0LCAweDc0LCAweDE0LCAweDE0LCAw eDE0LCAweDE0LCAweDE0LCAweDE0fTsKKworLyogMzIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAiLi54 eC54eC4iCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisgICAgICAiLnh4Lnh4 Li4iCisgICAgICAieHgueHguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19yaWdo dF9kb3VibGVfYW5nbGVfYml0c1tdID17CisgIDB4ZDgsIDB4NmMsIDB4MzYsIDB4MWIsIDB4MzYs IDB4NmMsIDB4ZDh9OworCisvKiAzMworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLnh4eHguLiIKKyAgICAgICIueHh4eHh4LiIKKyAgICAgICJ4Li54eC4ueCIKKyAg ICAgICJ4Li54eC4ueCIKKyAgICAgICJ4eHh4eHh4eCIKKyAgICAgICJ4eC4uLi54eCIKKyAgICAg ICJ4eHguLnh4eCIKKyAgICAgICIueHh4eHh4LiIKKyAgICAgICIuLnh4eHguLiIpCisqLworc3Rh dGljIHVuc2lnbmVkIHNob3J0IG1jX3NtaWxleV9mYWNlX2JpdHNbXSA9eworICAweDNjLCAweDdl LCAweDk5LCAweDk5LCAweGZmLCAweGMzLCAweGU3LCAweDdlLCAweDNjfTsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCiAKICNkZWZpbmUgQllURVNfUEVSX0JJVE1BUF9ST1cgIChzaXplb2Yg KHVuc2lnbmVkIHNob3J0KSkKICNkZWZpbmUgU1RBTkRBUkRfQklUTUFQX0hFSUdIVChiaXRzKSAo c2l6ZW9mIChiaXRzKS9CWVRFU19QRVJfQklUTUFQX1JPVykKQEAgLTQ2Niw2ICs2ODQsMzEgQEAg c3RhdGljIHN0cnVjdCBmcmluZ2VfYml0bWFwIHN0YW5kYXJkX2JpdG1hcHNbXSA9CiAgIHsgRlJC SVRTICh2ZXJ0aWNhbF9iYXJfYml0cyksICAgICAgIDgsIDAsIEFMSUdOX0JJVE1BUF9DRU5URVIs IDAgfSwKICAgeyBGUkJJVFMgKGhvcml6b250YWxfYmFyX2JpdHMpLCAgICAgOCwgMCwgQUxJR05f QklUTUFQX0JPVFRPTSwgMCB9LAogICB7IEZSQklUUyAoZW1wdHlfbGluZV9iaXRzKSwgICAgICAg ICA4LCAzLCBBTElHTl9CSVRNQVBfVE9QLCAgICAwIH0sCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKworICAvKiAyNCAqLworICB7IEZSQklUUyAobWNf dmVydGljYWxfYmFyX3JpZ2h0X2FuZ2xlX2JpdHMpLCAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NF TlRFUiwgMCB9LAorICAvKiAyNSAqLworICB7IEZSQklUUyAobWNfaG9sbG93X3JlY3RhbmdsZV9y aWdodF9hbmdsZV9iaXRzKSwgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAy NiAqLworICB7IEZSQklUUyAobWNfaG9sbG93X3JlY3RhbmdsZV9iaXRzKSwgICAgICAgICAgICAg OCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAyNyAqLworICB7IEZSQklUUyAo bWNfdmVydGljYWxfYmFyX2JpdHMpLCAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQ X0NFTlRFUiwgMCB9LAorICAvKiAyOCAqLworICB7IEZSQklUUyAobWNfcmlnaHRfYW5nbGVfYml0 cyksICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAv KiAyOSAqLworICB7IEZSQklUUyAobWNfYmFja3NsYXNoX2JpdHMpLCAgICAgICAgICAgICAgICAg ICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzMCAqLworICB7IEZSQklU UyAobWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzKSwgICAgICAgOCwgMCwgQUxJR05fQklU TUFQX0NFTlRFUiwgMCB9LAorICAvKiAzMSAqLworICB7IEZSQklUUyAobWNfcGlsY3Jvd19iaXRz KSwgICAgICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAor ICAvKiAzMiAqLworICB7IEZSQklUUyAobWNfcmlnaHRfZG91YmxlX2FuZ2xlX2JpdHMpLCAgICAg ICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzMyAqLworICB7IEZS QklUUyAobWNfc21pbGV5X2ZhY2VfYml0cyksICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05f QklUTUFQX0NFTlRFUiwgMCB9LAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KIH07CiAKICNk ZWZpbmUgTk9fRlJJTkdFX0JJVE1BUCAwCkBAIC0xNzE1LDYgKzE5NTgsNzYgQEAgSWYgbmlsLCBh bHNvIGNvbnRpbnVlIGxpbmVzIHdoaWNoIGFyZSBleGFjdGx5IGFzIHdpZGUgYXMgdGhlIHdpbmRv dy4gICovKTsKICAgREVGVkFSX0xJU1AgKCJmcmluZ2UtYml0bWFwcyIsIFZmcmluZ2VfYml0bWFw cywKICAgICBkb2M6IC8qIExpc3Qgb2YgZnJpbmdlIGJpdG1hcCBzeW1ib2xzLiAgKi8pOwogICBW ZnJpbmdlX2JpdG1hcHMgPSBRbmlsOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog bXVsdGlwbGUgY3Vyc29ycyAqLworCisgIC8qIChnZXQgJ2VtcHR5LWxpbmUgJ2ZyaW5nZSkgPT4g MjMgPT4gdGhlIGxhc3Qgc3Rh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1ha2VfbnVtYmVyICgzMykpOworICAvKiAoZ2V0ICcrLXNtaWxleS1mYWNlICdmcmlu Z2UpID0+IDMzICovCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiB9CiAKIC8qIEdhcmJh Z2UgY29sbGVjdGlvbiBob29rICovCmRpZmYgLS1naXQgYS9zcmMva2V5Ym9hcmQuYyBiL3NyYy9r ZXlib2FyZC5jCmluZGV4IGFhNThlMjYuLjg1Y2EwMDkgMTAwNjQ0Ci0tLSBhL3NyYy9rZXlib2Fy ZC5jCisrKyBiL3NyYy9rZXlib2FyZC5jCkBAIC0xMjI0LDYgKzEyMjQsMjcgQEAgc3RhdGljIGlu dCByZWFkX2tleV9zZXF1ZW5jZSAoTGlzcF9PYmplY3QgKiwgTGlzcF9PYmplY3QsCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBib29sLCBib29sLCBib29sLCBib29sKTsKIHN0YXRpYyB2 b2lkIGFkanVzdF9wb2ludF9mb3JfcHJvcGVydHkgKHB0cmRpZmZfdCwgYm9vbCk7CiAKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAqLworCitzdGF0aWMgdm9p ZAora2JkX21jX2FjdGl2YXRlX2N1cnNvcnMgKHZvaWQpCit7CisgIHN0cnVjdCB3aW5kb3cgKncg PSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHctPm1jLmRyYXdfZ2x5 cGhfY3Vyc29yID0gdHJ1ZTsKKyAgdy0+bWMuZXJhc2VfZ2x5cGhfY3Vyc29yID0gdHJ1ZTsKK30K Kworc3RhdGljIHZvaWQKK2tiZF9tY19hY3RpdmF0ZV9jcm9zc2hhaXJzICh2b2lkKQoreworICBz dHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93IChzZWxlY3RlZF93aW5kb3cpOwor ICB3LT5tYy5kcmF3X2Nyb3NzaGFpcnMgPSB0cnVlOworICB3LT5tYy5lcmFzZV9jcm9zc2hhaXJz ID0gdHJ1ZTsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIExpc3BfT2JqZWN0CiBj b21tYW5kX2xvb3BfMSAodm9pZCkKIHsKQEAgLTE0MTksNiArMTQ0MCwxMyBAQCBjb21tYW5kX2xv b3BfMSAodm9pZCkKICAgICAgIFZyZWFsX3RoaXNfY29tbWFuZCA9IGNtZDsKICAgICAgIHNhZmVf cnVuX2hvb2tzIChRcHJlX2NvbW1hbmRfaG9vayk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogbXVsdGlwbGUgY3Vyc29ycyAqLworCisgICAgICBrYmRfbWNfYWN0aXZhdGVfY3Vyc29y cyAoKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKICAgICAgIGFscmVhZHlfYWRqdXN0 ZWQgPSAwOwogCiAgICAgICBpZiAoTklMUCAoVnRoaXNfY29tbWFuZCkpCmRpZmYgLS1naXQgYS9z cmMvbnN0ZXJtLm0gYi9zcmMvbnN0ZXJtLm0KaW5kZXggYTE1Njg0ZC4uMmI3MDA2ZiAxMDA2NDQK LS0tIGEvc3JjL25zdGVybS5tCisrKyBiL3NyYy9uc3Rlcm0ubQpAQCAtMTE4OCwxMCArMTE4OCwx MiBAQCBzdGF0aWMgTlNSZWN0IGNvbnN0cmFpbl9mcmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3Qs IGJvb2wgaXNGdWxsc2NyZWVuKQogICAgIHsKICAgICAgIGJsb2NrX2lucHV0ICgpOwogCi0gICAg ICBpZiAoY3Vyc29yX29uX3ApCi0JZGlzcGxheV9hbmRfc2V0X2N1cnNvciAodywgMSwKLQkJCQl3 LT5vdXRwdXRfY3Vyc29yLmhwb3MsIHctPm91dHB1dF9jdXJzb3IudnBvcywKLQkJCQl3LT5vdXRw dXRfY3Vyc29yLngsIHctPm91dHB1dF9jdXJzb3IueSk7CisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKworICAgICAgbWNfcG9ydGFsICh3LCBjdXJzb3Jf b25fcCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogCiAgICAgICBpZiAoZHJhd193aW5k b3dfZnJpbmdlcyAodywgMSkpCiAJewpAQCAtMzE3Miw3ICszMTc0LDEzIEBAIHNvIHNvbWUga2V5 IHByZXNzZXMgKFRBQikgYXJlIHN3YWxsb3dlZCBieSB0aGUgc3lzdGVtLiAgKi8KIHN0YXRpYyB2 b2lkCiBuc19kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlw aF9yb3cgKmdseXBoX3JvdywKIAkJICAgICAgIGludCB4LCBpbnQgeSwgZW51bSB0ZXh0X2N1cnNv cl9raW5kcyBjdXJzb3JfdHlwZSwKLQkJICAgICAgIGludCBjdXJzb3Jfd2lkdGgsIGJvb2wgb25f cCwgYm9vbCBhY3RpdmVfcCkKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUg Y3Vyc29ycyAqLworCisgIGludCBjdXJzb3Jfd2lkdGgsIGJvb2wgb25fcCwgYm9vbCBhY3RpdmVf cCwKKyAgTGlzcF9PYmplY3QgY29sb3JfdmVjdG9yLCBMaXNwX09iamVjdCBmbGF2b3IpCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLwogLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgICAgRXh0ZXJu YWwgY2FsbCAoUklGKTogZHJhdyBjdXJzb3IuCiAgICAgIE5vdGUgdGhhdCBDVVJTT1JfV0lEVEgg aXMgbWVhbmluZ2Z1bCBvbmx5IGZvciAoaCliYXIgY3Vyc29ycy4KQEAgLTMyMDYsOCArMzIxNCwy OSBAQCBOb3RlIHRoYXQgQ1VSU09SX1dJRFRIIGlzIG1lYW5pbmdmdWwgb25seSBmb3IgKGgpYmFy IGN1cnNvcnMuCiAKICAgaWYgKChwaHlzX2N1cnNvcl9nbHlwaCA9IGdldF9waHlzX2N1cnNvcl9n bHlwaCAodykpID09IE5VTEwpCiAgICAgewotICAgICAgaWYgKGdseXBoX3Jvdy0+ZXhhY3Rfd2lu ZG93X3dpZHRoX2xpbmVfcAotICAgICAgICAgICYmIHctPnBoeXNfY3Vyc29yLmhwb3MgPj0gZ2x5 cGhfcm93LT51c2VkW1RFWFRfQVJFQV0pCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBtdWx0aXBsZSBjdXJzb3JzICovCisKKyAgICAgIC8qIFRoaXMgbW9kaWZpY2F0aW9uIGVuYWJs ZXMgcGxhY2VtZW50IG9mIHRoZSBjdXJzb3ItaW4tZnJpbmdlIGJpdG1hcCB3aGVuCisgICAgIC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1cnNvcl9pbl9mcmluZ2VfcCkKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICAgICAgICB7CiAgICAgICAgICAgZ2x5cGhfcm93LT5jdXJzb3JfaW5f ZnJpbmdlX3AgPSAxOwogICAgICAgICAgIGRyYXdfZnJpbmdlX2JpdG1hcCAodywgZ2x5cGhfcm93 LCAwKTsKQEAgLTMyNTIsOCArMzI4MSw0OCBAQCBOb3RlIHRoYXQgQ1VSU09SX1dJRFRIIGlzIG1l YW5pbmdmdWwgb25seSBmb3IgKGgpYmFyIGN1cnNvcnMuCiAKIAogICBmYWNlID0gRkFDRV9GUk9N X0lEX09SX05VTEwgKGYsIHBoeXNfY3Vyc29yX2dseXBoLT5mYWNlX2lkKTsKLSAgaWYgKGZhY2Ug JiYgTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKQotICAgICAgPT0gbnNfaW5kZXhfY29sb3IgKEZS QU1FX0NVUlNPUl9DT0xPUiAoZiksIGYpKQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogbXVsdGlwbGUgY3Vyc29ycyAqLworCisvKiBFWEFNUExFIE9GIEhPVyBUTyBMT09LLVVQIEEg Q09MT1I6CisgIGVudW0gZmFjZV9pZCBmYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKGYsIGlu dGVybiAoIistdmVydGljYWwtYmFyLWZhY2UiKSwgdHJ1ZSk7CisgIHN0cnVjdCBmYWNlICpmYWNl ID0gRkFDRV9GUk9NX0lEIChmLCBmYWNlX2lkKTsKKyAgTlNDb2xvciAqY29sb3IgPSBuc19sb29r dXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgZik7CisqLworCisg IGlmIChFUSAoZmxhdm9yLCB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IHRoYXQgQ1VSU09SX1dJRFRIIGlzIG1lYW5pbmdmdWwgb25s eSBmb3IgKGgpYmFyIGN1cnNvcnMuCiAgICAgfQogICBuc191bmZvY3VzIChmKTsKIAotICAvKiBk cmF3IHRoZSBjaGFyYWN0ZXIgdW5kZXIgdGhlIGN1cnNvciAqLwotICBpZiAoY3Vyc29yX3R5cGUg IT0gTk9fQ1VSU09SKQotICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3Jvdywg RFJBV19DVVJTT1IpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBtdWx0aXBsZSBjdXJz b3JzICovCisKKyAgIC8qIGRyYXcgdGhlIGNoYXJhY3RlciB1bmRlciB0aGUgY3Vyc29yICovCisg IGlmIChjdXJzb3JfdHlwZSAhPSBOT19DVVJTT1IKKyAgICAgICYmICFFUSAoZmxhdm9yLCBRbWNf Z2x5cGhsZXNzKQorICAgICAgJiYgIUVRIChmbGF2b3IsIFFtY19nbHlwaF90YWIpKQorICAgICBk cmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCiAKICNpZmRlZiBOU19JTVBMX0NPQ09BCiAgIE5TRW5hYmxl U2NyZWVuVXBkYXRlcyAoKTsKZGlmZiAtLWdpdCBhL3NyYy93MzJ0ZXJtLmMgYi9zcmMvdzMydGVy bS5jCmluZGV4IGZmMGQyYmYuLjE0MDA2ZWIgMTAwNjQ0Ci0tLSBhL3NyYy93MzJ0ZXJtLmMKKysr IGIvc3JjL3czMnRlcm0uYwpAQCAtNzA1LDEwICs3MDUsMTIgQEAgeF91cGRhdGVfd2luZG93X2Vu ZCAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBjdXJzb3Jfb25fcCwKICAgICB7CiAgICAgICBibG9j a19pbnB1dCAoKTsKIAotICAgICAgaWYgKGN1cnNvcl9vbl9wKQotCWRpc3BsYXlfYW5kX3NldF9j dXJzb3IgKHcsIHRydWUsCi0JCQkJdy0+b3V0cHV0X2N1cnNvci5ocG9zLCB3LT5vdXRwdXRfY3Vy c29yLnZwb3MsCi0JCQkJdy0+b3V0cHV0X2N1cnNvci54LCB3LT5vdXRwdXRfY3Vyc29yLnkpOwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBtdWx0aXBsZSBjdXJzb3JzICovCisKKyAgICAg IG1jX3BvcnRhbCAodywgY3Vyc29yX29uX3ApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K IAogICAgICAgaWYgKGRyYXdfd2luZG93X2ZyaW5nZXMgKHcsIHRydWUpKQogCXsKQEAgLTk3Myw3 ICs5NzUsMTEgQEAgc3RhdGljIHZvaWQgdzMyX2RyYXdfYm94X3JlY3QgKHN0cnVjdCBnbHlwaF9z dHJpbmcgKiwgaW50LCBpbnQsIGludCwgaW50LAogc3RhdGljIHZvaWQKIHhfc2V0X2N1cnNvcl9n YyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKIHsKLSAgaWYgKHMtPmZvbnQgPT0gRlJBTUVfRk9O VCAocy0+ZikKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAq LworCisgIHN0cnVjdCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dp bmRvdyk7CisgIGlmICgocy0+Zm9udCA9PSBG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aG9zZW4gc28KIAkgdGhh dCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICovCi0gICAgICBpZiAoZmFjZS0+YmFja2dyb3VuZCA9 PSBjdXJzb3JfY29sb3IpCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxlIGN1 cnNvcnMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tncm91bmQgPT0gY3Vyc29yX2NvbG9yCisg ICAgICAgICAgJiYgIXctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSkKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCiAJY3Vyc29yX2NvbG9yID0gZmFjZS0+Zm9yZWdyb3VuZDsKIAogICAg ICAgeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIHctPnBoeXNfY3Vyc29yLngp OwpAQCAtNTgzMCw3ICs1ODQ1LDEzIEBAIHczMl9jbGVhcl9mcmFtZV9hcmVhIChzdHJ1Y3QgZnJh bWUgKmYsIGludCB4LCBpbnQgeSwgaW50IHdpZHRoLCBpbnQgaGVpZ2h0KQogc3RhdGljIHZvaWQK IHczMl9kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9y b3cgKmdseXBoX3JvdywKIAkJCWludCB4LCBpbnQgeSwgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBj dXJzb3JfdHlwZSwKLQkJCWludCBjdXJzb3Jfd2lkdGgsIGJvb2wgb25fcCwgYm9vbCBhY3RpdmVf cCkKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAqLworCisg IGludCBjdXJzb3Jfd2lkdGgsIGJvb2wgb25fcCwgYm9vbCBhY3RpdmVfcCwKKyAgTGlzcF9PYmpl Y3QgY29sb3JfdmVjdG9yLCBMaXNwX09iamVjdCBmbGF2b3IpCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLwogewogICBpZiAob25fcCkKICAgICB7CkBAIC01ODk1LDMxICs1OTE2LDExOCBAQCB3 MzJfZHJhd193aW5kb3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93 ICpnbHlwaF9yb3csCiAJICByZXR1cm47CiAJfQogCi0gICAgICBzd2l0Y2ggKGN1cnNvcl90eXBl KQotCXsKLQljYXNlIEhPTExPV19CT1hfQ1VSU09SOgotCSAgeF9kcmF3X2hvbGxvd19jdXJzb3Ig KHcsIGdseXBoX3Jvdyk7Ci0JICBicmVhazsKIAotCWNhc2UgRklMTEVEX0JPWF9DVVJTT1I6Ci0J ICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsKLQkg IGJyZWFrOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBCRUdJTiBtdWx0aXBsZSBjdXJz b3JzICovCiAKLQljYXNlIEJBUl9DVVJTT1I6Ci0JICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5 cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOwotCSAgYnJlYWs7Ci0KLQljYXNlIEhC QVJfQ1VSU09SOgotCSAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dp ZHRoLCBIQkFSX0NVUlNPUik7Ci0JICBicmVhazsKKyAgc3Ryd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mFs dWVzLmZvbnQgPSBGUkFNRV9GT05UIChmKTsKKyAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3Vu ZCA9IGZyYW1lX2JnX3BpeGVsOworICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gb3Jp Z2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X2djCisgICAgICAgICAgICA9IFhDcmVhdGVHQyAoTlVMTCwgRlJBTUVfVzMyX1dJTkRPVyAoZiks IG1hc2ssICZnY192YWx1ZXMpOworICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAg IH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGds eXBoX3JvdywgRFJBV19DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgQkFS X0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAocmVkID49IDAgJiYgYmx1ZSA+PSAwICYmIGdyZWVu ID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91 dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICB3LT5tYy5jdXJz b3JfZ2NfaW52aXNpYmxlX29rYXkgPSB0cnVlOworICAgICAgICAgIHhfZHJhd19iYXJfY3Vyc29y ICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgQkFSX0NVUlNPUik7CisgICAgICAgICAgdy0+ bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0 X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAg IH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9y b3csIGN1cnNvcl93aWR0aCwgQkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAg Y2FzZSBIQkFSX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAocmVkID49IDAgJiYgYmx1ZSA+PSAw ICYmIGdyZWVuID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWph Y2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gICovCisgICAgICAgICAgZi0+ b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICB3 LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSB0cnVlOworICAgICAgICAgIHhfZHJhd19i YXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgSEJBUl9DVVJTT1IpOworICAg ICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IGZhbHNlOworICAgICAgICAg IGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVs OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAo dywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgIGJyZWFrOwor ICAgIH0KKyAgICBjYXNlIE5PX0NVUlNPUjoKKyAgICAgIHctPnBoeXNfY3Vyc29yX3dpZHRoID0g MDsKKyAgICAgIGJyZWFrOworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAg fQorLyogRU5EIG11bHRpcGxlIGN1cnNvcnMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwog Ci0JY2FzZSBOT19DVVJTT1I6Ci0JICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7Ci0JICBicmVh azsKIAotCWRlZmF1bHQ6Ci0JICBlbWFjc19hYm9ydCAoKTsKLQl9CiAgICAgfQogfQogCmRpZmYg LS1naXQgYS9zcmMvd2luZG93LmMgYi9zcmMvd2luZG93LmMKaW5kZXggNDIyYjA2YS4uY2QwZDlh ZSAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5jCisrKyBiL3NyYy93aW5kb3cuYwpAQCAtNjgxMCw2 ICs2ODEwLDI3IEBAIGdldF9waHlzX2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqdykKICAg c3RydWN0IGdseXBoICpnbHlwaDsKICAgaW50IGhwb3MgPSB3LT5waHlzX2N1cnNvci5ocG9zOwog CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKworLyog VGhpcyBtb2RpZmljYXRpb24gZW5hYmxlcyBwbGFjZW1lbnQgb2YgdGhlIGN1cnNvci1pbi1mcmlu Z2UgYml0bWFwIHdoZW4KK3RoZSB3aW5kb3ctd2lkdGggaXMgc2xpZ2h0bHkgbGVzcyB0aGFuIGBn bHlwaF9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3BgLgorVGhpcyBtb2RpZmljYXRpb24g YWxzbyBwcmV2ZW50cyBkcmF3aW5nIHRoZSByZWFsIGN1cnNvciBvbiB0aGUgZnJpbmdlIChpbnN0 ZWFkCitvZiB1c2luZyB0aGUgY3Vyc29yLWluLWZyaW5nZSBiaXRtYXApIGluIHRoZSBhYm92ZS1t ZW50aW9uZWQgY2ly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gcmVzdWx0LiAqLworICBib29sX2JmIGN1cnNvcl9nY19pbnZpc2libGVfb2theSA6IDE7CisK KyAgLyogVHJ1ZSBtZWFucyBgbWNfY2FsYycgaGFzIG5vdCBydW4geWV0IGRyYXduIGdseXBoIGZh a2UgY3Vyc29ycy4gKi8KKyAgYm9vbF9iZiBkcmF3X2dseXBoX2N1cnNvciA6IDE7CisKKyAgLyog VHJ1ZSBtZWFucyBgbWNfY2FsYycgaGFzIG5vdCBydW4geWV0IGVyYXNlZCBnbHlwaCBmYWtlIGN1 cnNvcnMuICovCisgIGJvb2xfYmYgZXJhc2VfZ2x5cGhfY3Vyc29yIDogMTsKKworICAvKiBUcnVl IG1lYW5zIGNyb3NzaGFpcnMgaGF2ZSBub3QgeWV0IGJlZW4gZHJhd24uICovCisgIGJvb2xfYmYg ZHJhd19jcm9zc2hhaXJzIDogMTsKKworICAvKiBUcnVlIG1lYW5zIGNyb3NzaGFpcnMgaGF2ZSBu b3QgeWV0IGJlZW4gZXJhc2VkLiAqLworICBib29sX2JmIGVyYXNlX2Nyb3NzaGFpcnMgOiAxOwor fTsKKworLyogRU5EIG11bHRpcGxlIGN1cnNvcnMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKIHN0cnVjdCBjdXJzb3JfcG9zCiB7CiAgIC8qIFBpeGVsIHBvc2l0aW9uLiAgVGhlc2Ug YXJlIGFsd2F5cyB3aW5kb3cgcmVsYXRpdmUuICAqLwpAQCAtMTgxLDYgKzIxNiwyMCBAQCBzdHJ1 Y3Qgd2luZG93CiAgICAgLyogVGhlIGhlbHAgZWNobyB0ZXh0IGZvciB0aGlzIHdpbmRvdy4gIFFu aWwgaWYgdGhlcmUncyBub25lLiAgKi8KICAgICBMaXNwX09iamVjdCBtb2RlX2xpbmVfaGVscF9l Y2hvOwogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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VEVNCiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUg Y3Vyc29ycyAqLworCisgICAgLyogVGhlIHByZWZpeCBmb3Igd2luZG93IHBvaW50ZXJzIHJlbGF0 aW5nIHRvIG11bHRpcGxlIGN1cnNvcnMuICAqLworICAgIHN0cnVjdCBtdWx0aXBsZV9jdXJzb3Jz IG1jOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogICAgIC8qIEN1cnNvciB0eXBlIG9m IGxhc3QgY3Vyc29yIGRyYXduIG9uIHRoZSB3aW5kb3cuICAqLwogICAgIGVudW0gdGV4dF9jdXJz b3Jfa2luZHMgcGh5c19jdXJzb3JfdHlwZTsKIApAQCAtNDIxLDYgKzQ3OCwyMyBAQCBYV0lORE9X IChMaXNwX09iamVjdCBhKQogICByZXR1cm4gWFVOVEFHIChhLCBMaXNwX1ZlY3Rvcmxpa2UsIHN0 cnVjdCB3aW5kb3cpOwogfQogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxl IGN1cnNvcnMgKi8KKworSU5MSU5FIHZvaWQKK3dzZXRfbWNfZ2x5cGhfY2FjaGUgKHN0cnVjdCB3 aW5kb3cgKncsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgdy0+bWNfZ2x5cGhfY2FjaGUgPSB2YWw7 Cit9CisKK0lOTElORSB2b2lkCit3c2V0X2Nyb3NzaGFpcnNfY2FjaGUgKHN0cnVjdCB3aW5kb3cg KncsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgdy0+Y3Jvc3NoYWlyc19jYWNoZSA9IHZhbDsKK30K KworLyogKioqKioqKioq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bCA3IDA5OjU5 OjUzIDIwMTggLTA3MDAKKyAgICAgICAgICAgIDogR2xlbm4gTW9ycmlzIDxyZ21AZ251Lm9yZz4K KyAgICAgICAgICAgIDogOTg0NjNiZWQwN2VjYzkwNTcwOTQ5MjhmZmRjMjMyMWVhYWYzYWI1Mgor ICAgICAgICAgICAgOiAqIGxpc3AvaW1lbnUuZWw6IFJlcXVpcmUgY2wtbGliLCBub3QgaW50ZXJu YWwgY29tcG9uZW50cyBvZiBzYW1lLgorCitFWEFNUExFICMxOiAgKHNldHEgbWMtZ2x5cGgtbGlz dCAnKCgxICJoYmFyIiAibWFnZW50YSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgy ICJiYXIiICJwdXJwbGUiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyAiYm94IiAi IzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg0ICJob2xsb3ciICIjMDAw MEZGIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAu MCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNiAoImJhciIgMykgWzAuMCAx LjAgMS4wXSkpKQorCitFWEFNUExFICMyOiAgKHNldHEgbWMtZ2x5cGgtbGlzdCBuaWwpCisKK1RP RE86CisKKy0gIFdoZW4gY2hvb3NpbmcgbXVsdGlwbGUgbGluZXMgZnJvbSB0aGUgYnJvd3NlLWtp bGwtcmluZyBzZWxlY3Rpb24sIHRoZSBwcm9wb3NlZAorICAgaW5zZXJ0aW9uIChpbiB0aGUgZm9y bSBvZiBvdmVybGF5cyBpbiB0aGUgdGFyZ2V0IGJ1ZmZlcikgY3JlYXRlcyBtdWx0aXBsZQorICAg Z3JlZW4gc21pbGV5IGZhY2VzIGluIHRoZSBmcmluZ2UuCisKKy0gIFNldCB1cCBhIHVzZXIgb3B0 aW9uIHNpbWlsYXIgdG8gYGN1cnNvci1pbi1ub24tc2VsZW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GlzcGxheS10YWJsZQorICAg ICAgICAgP1x0CisgICAgICAgICAodmVjdG9yIChtYWtlLWdseXBoLWNvZGUgP1x1MDBCQiAnZm9u dC1sb2NrLXdhcm5pbmctZmFjZSkKKyAgICAgICAgICAgICAgICAgKG1ha2UtZ2x5cGgtY29kZSA/ XHQgJ2hpZ2hsaWdodCkpKQorICAgKGFzZXQgYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAgICAg ID9cbgorICAgICAgICAgKHZlY3RvciAobWFrZS1nbHlwaC1jb2RlID9cdTAwQjYgJ2ZvbnQtbG9j ay1jb21tZW50LWZhY2UpCisgICAgICAgICAgICAgICAgID9cbikpCisgICAoc2V0cSB0YWItd2lk dGggOCkKKyAgIChzZXRxLWxvY2FsIGF1dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUpCisK Ky0gIE5vIExpbmUgTnVtYmVycworCitMRUdFTkQKKworZnByaW50ZiAoc3RkZXJyLCAiTXkgbGlz cCBvYmplY3Q6ICAlc1xuIiwgU1NEQVRBIChGY2hhcl90b19zdHJpbmcgKG1ha2VfbnVtYmVyICgx MDEpKSkpOworCitmcHJpbnRmIChzdGRlcnIsICJzdHJpbmc6ICVzIHwgaW50OiAlZFxuIiwgU1NE QVRBIChidWlsZF9zdHJpbmcgKCJmb28iKSksIDY5KTsKKworaWYgKEJVRkZFUlAgKHctPmNvbnRl bnRzKSAmJiBTVFJJTkdQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG5hbWUpKSkKKyAg ZnByaW50ZiAoc3RkZXJyLCAibnNfdXBkYXRlX3dpbmRvd19lbmQ6ICAlc1xuIiwgU1NEQVRBIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG5hbWUpKSk7CisKK0FVVE9fU1RSSU5HIChteV9z dHJpbmdfb25lLCAiVGhpcyBpcyB0aGUgdmFsdWUgb2YgYG15X29iamVjdF9vbmUnOiAgJXMiKTsK K0xpc3BfT2JqZWN0IG15X29iamVjdF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0aW9uIiksIFFvdmVybGF5X2Fy cm93X2JpdG1hcCk7ICovCisgIExpc3BfT2JqZWN0IG1hcmtlciA9IGZpbmRfc3ltYm9sX3ZhbHVl IChpbnRlcm4gKCJvdmVybGF5LWFycm93LXBvc2l0aW9uIikpOworICBpbnQgZnJpbmdlX2JpdG1h cCA9IE5PX0ZSSU5HRV9CSVRNQVA7CisgIGludCBmYWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOwor ICBpZiAoRVEgKGZsYXZvciwgUW92ZXJsYXlfYXJyb3dfYml0bWFwKSkKKyAgICB7CisgICAgICBM aXNwX09iamVjdCB2bGlzdDsKKyAgICAgIGZvciAodmxpc3QgPSBWb3ZlcmxheV9hcnJvd192YXJp YWJsZV9saXN0OworICAgICAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgICAgICB2bGlzdCA9 IFhDRFIgKHZsaXN0KSkKKyAgICAgICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IHZhciA9IFhD QVIgKHZsaXN0KTsKKyAgICAgICAgICBMaXNwX09iamVjdCB2YWw7CisgICAgICAgICAgaWYgKCFT WU1CT0xQICh2YXIpKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgdmFsID0gZmlu ZF9zeW1ib2xfdmFsdWUgKHZhcik7CisgICAgICAgICAgaWYgKHZhbCA9IEZnZXQgKHZhciwgUW92 ZXJsYXlfYXJyb3dfYml0bWFwKSwgU1lNQk9MUCAodmFsKSkKKyAgICAgICAgICAgIGZyaW5nZV9i aXRtYXAgPSBsb29rdXBfZnJpbmdlX2JpdG1hcCAodmFsKTsKKyAgICAgICAgfQorICAgICAgZ2x5 cGhfcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCA9IChjdXJzb3JfdHlwZSAhPSBOT19DVVJTT1Ip CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBmcmluZ2VfYml0bWFw IC8qIGxvb2t1cF9mcmluZ2VfYml0bWFwIChmbGF2b3IpICovCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiBOT19GUklOR0VfQklUTUFQOworICAgICAgZHJhd19mcmlu Z2VfYml0bWFwICh3LCBnbHlwaF9yb3csIHRydWUpOworICAgICAgLyogb3B0aW1pemF0aW9uIDM6 ICBEUkFXIHRoZSBgb3ZlcmxheS1hcnJvdy1iaXRtYXAnIGlmIHRoZXJlIGlzIGEgbWFya2VyLiAq LworICAgICAgaWYgKE1BUktFUlAgKG1hcmtlcikKKyAgICAgICAgICAmJiBYTUFSS0VSIChtYXJr ZXIpLT5idWZmZXIKKyAgICAgICAgICAmJiBCVUZGRVJfTElWRV9QIChYTUFSS0VSIChtYXJrZXIp LT5idWZmZXIpKQorICAgICAgICB7CisgICAgICAgICAgZ2x5cGhfcm93LT5vdmVybGF5X2Fycm93 X2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgZHJhd19mcmluZ2VfYml0bWFwICh3 LCBnbHlwaF9yb3csIHRydWUpOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UgaWYgKEVRIChm bGF2b3IsIFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2FuZ2xlKQorICAgICAgICAgICAgIHx8 IEVRIChmbGF2b3IsIFFtY19ob2xsb3dfcmVjdGFuZ2xlKQorICAgICAgICAgICAgIHx8IEVRIChm bGF2b3IsIFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYW5nbGUpCisgICAgICAgICAgICAgfHwgRVEg KGZsYXZvciwgUW1jX3ZlcnRpY2FsX2JhcikKKyAgICAgICAgICAgICB8fCBFUSAoZmxhdm9yLCBR bWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaCkpCisgICAgICB7CisgICAgICAgIGZyaW5nZV9iaXRt YXAgPSAoY3Vyc29yX3R5cGUgIT0gTk9fQ1VSU09SKQorICAgICAgICAgICAgICAgICAgICAgICAg PyBsb29rdXBfZnJpbmdlX2JpdG1hcCAoZmxhdm9yKQorICAgICAgICAgICAgICAgICAgICAgICAg OiBOT19GUklOR0VfQklUTUFQOworICAgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlICE9IE5P X0NVUlNPUikKKyAgICAgICAgICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistdmVydGljYWwtYmFyLWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICAgIDog REVGQVVMVF9GQUNFX0lEOworICAgICAgICBnbHlwaF9yb3ctPmN1cnNvcl9pbl9mcmluZ2VfcCA9 IGZhbHNlOworICAgICAgICBnbHlwaF9yb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IDA7 CisgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7 CisgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQgPSBmYWNlX2lkOworICAg ICAgICBnbHlwaF9yb3ctPnJpZ2h0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICBkcmF3X2Zy aW5nZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgZmFsc2UpOworICAgICAgfQorICAgICAgZWxzZSBp ZiAoRVEgKGZsYXZvciwgUW1jX2dseXBoKQorICAgICAgICAgICAgICAgfHwgRVEgKGZsYXZvciwg UW1jX2dseXBobGVzcykKKyAgICAgICAgICAgICAgIHx8IEVRIChmbGF2b3IsIFFtY19nbHlwaF90 YWIpKQorICAgICAgICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGdseXBo X3JvdywgeCwgeSwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCB0cnVlLCBmYWxzZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcl92Z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0dXJuIEhP TExPV19CT1hfQ1VSU09SOworICBpZiAoIXN0cmNtcCAoc3RyLCAiaGJhciIpKQorICAgIHJldHVy biBIQkFSX0NVUlNPUjsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgImJhciIpKQorICAgIHJldHVybiBC QVJfQ1VSU09SOworICBpZiAoIXN0cmNtcCAoc3RyLCAibm8iKSkKKyAgICByZXR1cm4gTk9fQ1VS U09SOworICByZXR1cm4gLTE7Cit9CisKK3N0YXRpYyBMaXNwX09iamVjdAorbWNfY3Vyc29yX3R5 cGVfdG9fbGlzcCAoaW50IGFyZykKK3sKKyAgc3dpdGNoIChhcmcpCisgICAgeworICAgIGNhc2Ug RklMTEVEX0JPWF9DVVJTT1I6IHJldHVybiBRYm94OworICAgIGNhc2UgSE9MTE9XX0JPWF9DVVJT T1I6IHJldHVybiBRaG9sbG93OworICAgIGNhc2UgSEJBUl9DVVJTT1I6IHJldHVybiBRaGJhcjsK KyAgICBjYXNlIEJBUl9DVVJTT1I6IHJldHVybiBRYmFyOworICAgIGNhc2UgTk9fQ1VSU09SOgor ICAgIGRlZmF1bHQ6IHJldHVybiBpbnRlcm4gKCJubyIpOworICAgIH0KK30KKworc3RhdGljIExp c3BfT2JqZWN0CittY19jb2xvcl92ZWN0b3JfY2FsYyAoc3RydWN0IHdpbmRvdyAqdywgTGlzcF9P YmplY3QgY29sb3IpCit7CisgIENIRUNLX1NUUklORyAoY29sb3IpOworICBMaXNwX09iamVjdCB0 YXJnZXRfZnJhbWUgPSB3LT5mcmFtZTsKKyAgTGlzcF9PYmplY3QgY29sb3JfdmFsdWVzOworICBk b3VibGUgdmFsbWF4ID0gWElOVCAoWENBUiAoRnh3X2NvbG9yX3ZhbHVlcyAoYnVpbGRfc3RyaW5n ICgiI2ZmZmZmZiIpLCB0YXJnZXRfZnJhbWUpKSk7CisgIExpc3BfT2JqZWN0IHZsaXN0OworICBw dHJkaWZmX3QgeDsKKyAgaW50IGkgPSAwOworICBMaXNwX09iamVjd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Nyb2xsKTsKKyAg ZnByaW50ZiAoc3RkZXJyLCAiXG4lZC4gICVzJXMgLS0gKCVzKVxuXAorICAgIGl0LT5jICglZClc blwKKyAgICBmZXRjaF9ieXRlICglZClcblwKKyAgICBjaGFyYWN0ZXIgKCVzKVxuXAorICAgIElU X0NIQVJQT1MgKCVkKVxuXAorICAgIHctPmhzY3JvbGwgKCVkKVxuXAorICAgIHctPm1pbl9oc2Ny b2xsICglZClcblwKKyAgICBoc2NsX3RlbXBvcmFyeSAoJXMpXG5cCisgICAgaHNjbF9wZXJtYW5l bnQgKCVzKVxuXAorICAgIGl0LT5ocG9zICglZClcblwKKyAgICBpdC0+dnBvcyAoJWQpXG5cCisg ICAgaXQtPmN1cnJlbnRfeCAoJWQpXG5cCisgICAgbmV3X3ggKCVkKVxuXAorICAgIGZvbnQtPnNw YWNlX3dpZHRoICglZClcblwKKyAgICBpdC0+bG51bV9waXhlbF93aWR0aCAoJWQpXG5cCisgICAg aXQtPmxudW1fd2lkdGggKCVkKVxuXAorICAgIGl0LT5maXJzdF92aXNpYmxlX3ggKCVkKVxuXAor ICAgIGl0LT5sYXN0X3Zpc2libGVfeCAoJWQpXG5cCisgICAgcmVsYXRpdmVfeCAoJWQpXG5cCisg ICAgaXQtPmZhY2VfaWQgKCVkKVxuXAorICAgIGZvcmVncm91bmRfZmFjZSAoJXMpXG5cCisgICAg YmFja2dyb3VuZF9mYWNlICglcylcblwKKyAgICByYyAoJXMpXG4iLAorICAgICAgY291bnQsCisg ICAgICAoaXQtPmMgPT0gMAorICAgICAgICA/ICJOT1RISU5HIgorICAgICAgICA6IGl0LT5jID09 IDE4NworICAgICAgICAgID8gIlRBQiBDSEFSQUNURVIiCisgICAgICAgIDogaXQtPmMgPT0gJ1x0 JworICAgICAgICAgID8gIlRBQiBTVFJFVENIIgorICAgICAgICA6ICJURVhUIiksCisgICAgICAo cmVsYXRpdmVfeCA9PSBpdC0+bG51bV9waXhlbF93aWR0aAorICAgICAgICA/ICIgLS0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TEwKKyAgICAgICA/IDAKKyAgICAgICA6IGZvbnQt PnNwYWNlX3dpZHRoKSwKKyAgICAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoLAorICAgICAgaXQtPmxu dW1fd2lkdGgsCisgICAgICBpdC0+Zmlyc3RfdmlzaWJsZV94LAorICAgICAgaXQtPmxhc3Rfdmlz aWJsZV94LAorICAgICAgcmVsYXRpdmVfeCwKKyAgICAgIGl0LT5mYWNlX2lkLAorICAgICAgKCFO SUxQIChmb3JlZ3JvdW5kX2ZhY2UpCisgICAgICAgID8gU1NEQVRBIChmb3JlZ3JvdW5kX2ZhY2Up CisgICAgICAgIDogIk5JTFAgZm9yZWdyb3VuZF9mYWNlIiksCisgICAgICAoIU5JTFAgKGJhY2tn cm91bmRfZmFjZSkKKyAgICAgICAgPyBTU0RBVEEgKGJhY2tncm91bmRfZmFjZSkKKyAgICAgICAg OiAiTklMUCBiYWNrZ3JvdW5kX2ZhY2UiKSwKKyAgICAgIChyYyA9PSBNT1ZFX1VOREVGSU5FRAor ICAgICAgICA/ICJNT1ZFX1VOREVGSU5FRCIKKyAgICAgICAgOiByYyA9PSBNT1ZFX1BPU19NQVRD SF9PUl9aVgorICAgICAgICAgID8gIk1PVkVfUE9TX01BVENIX09SX1pWIgorICAgICAgICA6IHJj ID09IE1PVkVfWF9SRUFDSEVECisgICAgICAgICAgPyAiTU9WRV9YX1JFQUNIRUQiCisgICAgICAg IDogcmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRAorICAgICAgICAgID8gIk1PVkVfTElORV9DT05U SU5VRUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9MSU5FX1RSVU5DQVRFRAorICAgICAgICAgID8g Ik1PVkVfTElORV9UUlVOQ0FURUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9ORVdMSU5FX09SX0NS CisgICAgICAgICAgPyAiTU9WRV9ORVdMSU5FX09SX0NSIgorICAgICAgICA6ICJPT1BTIikpOwor fQorCitzdGF0aWMgdm9pZAorbWNfY3Jvc3NoYWlyc19oZWxwZXIgKHN0cnVjdCB3aW5kb3cgKncs IHB0cmRpZmZfdCB4LCBwdHJkaWZmX3QgeSwgcHRyZGlmZl90IGhwb3MsCisgICAgICAgICAgICAg ICAgICAgICAgcHRyZGlmZl90IHZwb3MsIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgdHlwZSwgaW50 IHdpZHRoLAorICAgICAgICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGZvcmVncm91bmQsIExp c3BfT2JqZWN0IGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3Qg Zmxhdm9yLCBwdHJkaWZmX3QgcG9zLCBMaXNwX09iamVjdCAqcmVzdWx0KQoreworICBMaXNwX09i amVjdCB0ZW1wOworICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgeCwgeSwgaHBvcywgdnBvcywg dHlwZSwgd2lkdGgsIGZvcmVncm91bmQsIGZsYXZvcik7CisgIHRlbXAgPSBsaXN0biAoQ09OU1RZ UEVfSEVBUCwgMTAsCisgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHgpLAorICAgICAgICAg ICAgICAgIG1ha2VfbnVtYmVyICh5KSwKKyAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoaHBv cyksCisgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHZwb3MpLAorICAgICAgICAgICAgICAg IG1jX2N1cnNvcl90eXBlX3RvX2xpc3AgKHR5cGUpLAorICAgICAgICAgICAgICAgIG1ha2VfbnVt YmVyICh3aWR0aCksCisgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAg ICBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgIGZsYXZvciwKKyAgICAgICAgICAgICAgICBt YWtlX251bWJlciAocG9zKSk7CisgICpyZXN1bHQgPSBGY29ucyAodGVtcCwgKnJlc3VsdCk7Cit9 CisKK3N0YXRpYyB2b2lkCittY19jYWxjX2hlbHBlciAoc3RydWN0IHdpbmRvdyAqdywgcHRyZGlm Zl90IHgsIHB0cmRpZmZfdCB5LCBwdHJkaWZmX3QgaHBvcywKKyAgICAgICAgICAgICAgICBwdHJk aWZmX3QgdnBvcywgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyB0eXBlLCBpbnQgd2lkdGgsCisgICAg ICAgICAgICAgICAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCwgTGlzcF9PYmplY3QgYmFja2dyb3Vu ZCwgTGlzcF9PYmplY3QgZmxhdm9yLAorICAgICAgICAgICAgICAgIHB0cmRpZmZfdCBwb3MsIExp c3BfT2JqZWN0IHNwZWNzLCBMaXNwX09iamVjdCAqcmVzdWx0KQoreworICBMaXNwX09iamVjdCB0 ZW5fZWxlbWVudHM7CisgIExpc3BfT2JqZWN0IHRlbXA7CisgIG1jX2RyYXdfZXJhc2VfaHlicmlk ICh3LCB4LCB5LCBocG9zLCB2cG9zLCB0eXBlLCB3aWR0aCwgZm9yZWdyb3VuZCwgZmxhdm9yKTsK KyAgdGVuX2VsZW1lbnRzID0gbGlzdG4gKENPTlNUWVBFX0hFQVAsIDEwLAorICAgICAgICAgICAg ICAgICAgICAgICAgbWFrZV9udW1iZXIgKHgpLAorICAgICAgICAgICAgICAgICAgICAgICAgbWFr ZV9udW1iZXIgKHkpLAorICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKGhwb3Mp LAorICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHZwb3MpLAorICAgICAgICAg ICAgICAgICAgICAgICAgbWNfY3Vyc29yX3R5cGVfdG9fbGlzcCAodHlwZSksCisgICAgICAgICAg ICAgICAgICAgICAgICBtYWtlX251bWJlciAod2lkdGgpLAorICAgICAgICAgICAgICAgICAgICAg ICAgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsCisgICAg ICAgICAgICAgICAgICAgICAgICBmbGF2b3IsCisgICAg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X2J1ZmZlciwgbWFya19hY3RpdmUpKQorICAgICAgJiYgIU5JTFAgKG0pKQorICAgIHJldHVy biBtYWtlX251bWJlciAoKFBUIDwgWEZBU1RJTlQgKG0pKSA9PSBiZWdpbm5pbmdwCisgICAgICAg ICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICA6IGNsaXBfdG9f Ym91bmRzIChCRUdWLCBYRkFTVElOVCAobSksIFpWKSk7CisgICAgICBlbHNlCisgICAgICAgIHJl dHVybiBRbmlsOworfQorCisvKiBTUEVDUyB3aWxsIGJlIGFuIExTTCBjb2xvciB2ZWN0b3IgaWYg Y29taW5nIGZyb20gYG1jX2RyYXdfY3Jvc3NoYWlycycuCitTUEVDUyB3aWxsIGJlIGEgY29uc3Ag bGlzdCBpZiBjb21pbmcgZnJvbSBgbWNfY2FsYycuICovCitzdGF0aWMgdm9pZAorbWNfbW92ZV9p dCAoc3RydWN0IGl0ICppdCwgTGlzcF9PYmplY3QgZGlyZWN0aW9uLCBMaXNwX09iamVjdCBzcGVj cywgTGlzcF9PYmplY3QgKnJlc3VsdCkKK3sKKyAgcHRyZGlmZl90IHBvc2ludCA9IChWRUNUT1JQ IChzcGVjcykpCisgICAgICAgICAgICAgICAgICAgICA/IC0xCisgICAgICAgICAgICAgICAgICAg ICA6IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgwKSwgc3BlY3MpKTsKKyAgTGlzcF9PYmplY3Qg bGlzcF90eXBlID0gKFZFQ1RPUlAgKHNwZWNzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg PyBRbmlsCisgICAgICAgICAgICAgICAgICAgICAgICAgIDogRm50aCAobWFrZV9udW1iZXIgKDEp LCBzcGVjcyk7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgY3Vyc29yX3R5cGUgPSAoVkVDVE9S UCAoc3BlY3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXN0 cmNtcCAoU1NEQVRBIChkaXJlY3Rpb24pLCAiSG9yaXpvbnRhbCBSdWxlciIpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBIQkFSX0NVUlNPUgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAgKFZFQ1RPUlAgKHNwZWNzKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFzdHJjbXAgKFNTREFUQSAoZGly ZWN0aW9uKSwgIlZlcnRpY2FsIFJ1bGVyIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gQkFSX0NVUlNPUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIgKGxpc3BfdHlw ZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1jX2xpc3BfdG9f Y3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgIGludCBjdXJzb3Jfd2lkdGggPSAoVkVDVE9SUCAo c3BlY3MpKQorICAgICAgICAgICAgICAgICAgICAgPyAxCisgICAgICAgICAgICAgICAgICAgICA6 IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gWElOVCAoWENB UiAoWENEUiAobGlzcF90eXBlKSkpCisgICAgICAgICAgICAgICAgICAgICA6IDE7CisgIExpc3Bf T2JqZWN0IGZvcmVncm91bmQgPSAoVkVDVE9SUCAoc3BlY3MpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBzcGVjcworICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBGbnRoIChtYWtl X251bWJlciAoMiksIHNwZWNzKTsKKyAgaWYgKFNUUklOR1AgKGZvcmVncm91bmQp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X3ggPSAw OworICBpbnQgZ2hvc3Rfb2ZfY2hyaXN0bWFzX2Z1dHVyZV9ocG9zID0gMDsKKyAgaW50IGdob3N0 X29mX2NocmlzdG1hc19mdXR1cmVfZmFjZV9pZCA9IDA7CisgIExpc3BfT2JqZWN0IHJlZ2lvbl9s aW1pdF90cnVlID0gbWNfcmVnaW9uX2xpbWl0ICh0cnVlKTsKKyAgcHRyZGlmZl90IHJlZ2lvbl9i ZWdpbm5pbmcgPSAoIU5JTFAgKHJlZ2lvbl9saW1pdF90cnVlKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IFhJTlQgKHJlZ2lvbl9saW1pdF90cnVlKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogMDsKKyAgTGlzcF9PYmplY3QgcmVnaW9uX2xpbWl0X2ZhbHNlID0g bWNfcmVnaW9uX2xpbWl0IChmYWxzZSk7CisgIHB0cmRpZmZfdCByZWdpb25fZW5kID0gKCFOSUxQ IChyZWdpb25fbGltaXRfZmFsc2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgID8gWElOVCAo cmVnaW9uX2xpbWl0X2ZhbHNlKQorICAgICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgc3Ry dWN0IGdseXBoICpwaHlzX2N1cnNvcl9nbHlwaCA9IGdldF9waHlzX2N1cnNvcl9nbHlwaCAoaXQt PncpOworICBib29sIHJlZ2lvbl9hY3RpdmVfcCA9IChyZWdpb25fYmVnaW5uaW5nICE9IHJlZ2lv bl9lbmQpOworICB3aGlsZSAodHJ1ZSkKKyAgICB7CisgICAgICBjb3VudCArPSAxOworICAgICAg c3RydWN0IGZhY2UgKmZhY2UgPSBtY19sb29rdXBfZmFjZSAoaXQpOworICAgICAgc3RydWN0IGZv bnQgKmZvbnQgPSBmYWNlLT5mb250OworICAgICAgaW50IGZvbnRfc3BhY2Vfd2lkdGggPSAoZm9u dCA9PSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/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uZCwgdGhlIG5leHQg ZGlzcGxheSBlbGVtZW50IGlzCisgICAgICBzdWJzZXF1ZW50IHRoZXJldG8uCisgICAgICAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICA3LiAgVEFCIFNUUkVUQ0gKKyAgICAg ICAgICBpdC0+YyAoOSkKKyAgICAgICAgICBjaGFyICgJKQorICAgICAgICAgIGl0LT53LT5oc2Ny b2xsICg0KQorICAgICAgICAgIGhzY2xfdGVtcG9yYXJ5IChmYWxzZSkKKyAgICAgICAgICBpdC0+ aHBvcyAoMCkKKyAgICAgICAgICBpdC0+Y3VycmVudF94ICgxMSkKKyAgICAgICAgICBuZXdfeCAo NzcpCisgICAgICAgICAgZm9udF9zcGFjZV93aWR0aCAoMTEpCisgICAgICAgICAgaXQtPmxudW1f cGl4ZWxfd2lkdGggKDQ0KQorICAgICAgICAgIHJlbGF0aXZlX3ggKDMzKQorICAgICAgICAgIHJj IChNT1ZFX1hfUkVBQ0hFRCkKKyAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0K KyAgICAgIDguICBURVhUIC0tIFRIRSBGVU4gU1RBUlRTIEhFUkUKKyAgICAgICAgICBpdC0+YyAo NzIpCisgICAgICAgICAgY2hhciAoSCkKKyAgICAgICAgICBpdC0+dy0+aHNjcm9sbCAoNCkKKyAg ICAgICAgICBoc2NsX3RlbXBvcmFyeSAoZmFsc2UpCisgICAgICAgICAgaXQtPmhwb3MgKDUpCisg ICAgICAgICAgaXQtPmN1cnJlbnRfeCAoMTMyKQorICAgICAgICAgIG5ld194ICg4OCkKKyAgICAg ICAgICBmb250X3NwYWNlX3dpZHRoICgxMSkKKyAgICAgICAgICBpdC0+bG51bV9waXhlbF93aWR0 aCAoNDQpCisgICAgICAgICAgcmVsYXRpdmVfeCAoNDQpCisgICAgICAgICAgcmMgKE1PVkVfWF9S RUFDSEVEKQorICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICAgICAgNy4g IFRBQiBTVFJFVENICisgICAgICAgICAgaXQtPmMgKDkpCisgICAgICAgICAgY2hhciAoCSkKKyAg ICAgICAgICBpdC0+dy0+aHNjcm9sbCAoMikKKyAgICAgICAgICBoc2NsX3RlbXBvcmFyeSAoZmFs c2UpCisgICAgICAgICAgaXQtPmhwb3MgKDApCisgICAgICAgICAgaXQtPmN1cnJlbnRfeCAoMTEp CisgICAgICAgICAgbmV3X3ggKDc3KQorICAgICAgICAgIGZvbnRfc3BhY2Vfd2lkdGggKDExKQor ICAgICAgICAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoICg0NCkKKyAgICAgICAgICByZWxhdGl2ZV94 ICg1NSkKKyAgICAgICAgICByYyAoTU9WRV9YX1JFQUNIRUQpCisgICAgICAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICA4LiAgVEVYVAorICAgICAgICAgIGl0LT5jICg3MikK KyAgICAgICAgICBjaGFyIChIKQorICAgICAgICAgIGl0LT53LT5oc2Nyb2xsICgyKQorICAgICAg ICAgIGhzY2xfdGVtcG9yYXJ5IChmYWxzZSkKKyAgICAgICAgICBpdC0+aHBvcyAoNSkKKyAgICAg ICAgICBpdC0+Y3VycmVudF94ICgxMzIpCisgICAgICAgICAgbmV3X3ggKDg4KQorICAgICAgICAg IGZvbnRfc3BhY2Vfd2lkdGggKDExKQorICAgICAgICAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoICg0 NCkKKyAgICAgICAgICByZWxhdGl2ZV94ICg2NikKKyAgICAgICAgICByYyAoTU9WRV9YX1JFQUNI RUQpICovCisgICAgICBib29sIGlzc3VlXzMxNzE2X3AgPSAoIWhzY2xfdGVtcG9yYXJ5CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWhzY2xfcGVybWFuZW50CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgaXQtPnctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcHJldmlvdXNfaHBvcyA9PSAtMQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHByZXZpb3VzX2NoYXJhY3RlciA9PSAnXHQnCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgaXQtPmhwb3MgPiBpdC0+bG51bV9waXhlbF93aWR0aCAvIGZvbnRfc3BhY2Vfd2lk dGgpOworICAgICAgYm9vbCBscHdfcmVhY2hlZF9wID0gKHByZXZpb3VzX3JlbGF0aXZlX3ggPj0g aXQtPmxudW1fcGl4ZWxfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBpc3N1 ZV8zMTcxNl9wKTsKKyAgICAgIGludCB4ID0gKGhzY2xfdGVtcG9yYXJ5CisgICAgICAgICAgICAg ICB8fCBoc2NsX3Blcm1hbmVudCkKKyAgICAgICAgICAgICAgID8gaXQtPmN1cnJlbnRfeCAtICho c2NsX2ZpcnN0X2hwb3MgKiBmcmFtZV9jaGFyX3dpZHRoKQorICAgICAgICAgICAgICAgOiBpdC0+ Y3VycmVudF94IC0gaXQtPmZpcnN0X3Zpc2libGVfeDsKKyAgICAgIGJvb2wgZmluYWxfbG9vcF9w ID0gKChGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSA9PSAnXG4nCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgaXQtPmMgIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IC8qIHx8IElURVJBVE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KSAqLworICAgICAgICAgICAgICAg ICAgICAgICAgICAgfHwgcmMgPT0gTU9WRV9QT1NfTUFUQ0hfT1JfWlYKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIHx8IHJjID09IE1PVkVfTElORV9DT05USU5VRUQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIHx8IHggKyBmcmFtZV9jaGFyX3dpZHRoID49IHRleHRfYXJlYV93aWR0aCk7 CisgICAgICBib29sIGFkdmFuY2VfaHBvc19wID0gKGdyZWVuX2xpZ2h0X3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgbHB3X3JlYWNoZWRfcCk7CisgICAgICBpZiAoYWR2YW5jZV9o cG9zX3ApCisgICAgICAgIHByZXZpb3VzX2hwb3MgKz0gKHByZXZpb3VzX2hwb3MgPT0gLTEKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhRVEgKFZkaXNwbGF5X2xpbmVfbnVtYmVy cywgUXZpc3VhbCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gKGl0LT5sbnVtX3BpeGVs X3dpZHRoIC8gZm9udF9zcGFjZV93aWR0aCkgKyAxCisgICAgICAgICAgICAgICAgICAgICAgICAg IDogKHJlbGF0aXZlX3ggPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gMQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgICAgICAgZWxzZSBpZiAoZmluYWxfbG9v cF9wCisgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX2hwb3MgPT0gLTEpCisgICAgICAgICAg cHJldmlvdXNfaHBvcyA9IDA7CisgICAgICBib29sIHRhYl9pbnZpc2libGVfcCA9IHByZXZpb3Vz X2NoYXJhY3RlciA9PSAnXHQnOworICAgICAgYm9vbCB0YWJfdmlzaWJsZV9wID0gKHByZXZpb3Vz X2NoYXJhY3RlciAhPSAnXHQnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmV0Y2hf Ynl0ZV9wcmV2aW91c19jaGFyYWN0ZXIgPT0gJ1x0Jyk7CisgICAgICBib29sIHJlYWxfZmFrZV9j dXJzb3JfcCA9ICghc3RyY21wIChTU0RBVEEgKGRpcmVjdGlvbiksICJWZXJ0aWNhbCBSdWxlciIp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChvcG9pbnRfeSA9PSBpdC0+Y3Vy cmVudF95CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHZwb3MgPT0gb3Bv aW50X3Zwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKG9wb2ludF94ID09 IHByZXZpb3VzX3JlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb3BvaW50X3kgPT0gaXQtPmN1cnJlbnRfeQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSBwcmV2aW91c19ocG9zCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpOworICAgICAgLyogaXQt PmMgPT0gJ1x0JyB3aGVuIElUIGlzIGF0IGEgdGFiLXdpZHRoIHNwYWNlciBmb2xsb3dpbmcgYQor ICAgICAgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBnbHlwaCBzdWNoIGFzIMK7LiAgQW5vdGhlciB3 YXkgdG8gdGVzdAorICAgICAgZm9yIHRoaXMgY29uZGl0aW9uIGlzIHdoZW4gaXQtPmMgPT0gRkVU Q0hfQllURSAoSVRfQllURVBPUyAoKml0KSkuICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K Ky8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkVSVElDQUwgUlVMRVIgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAg ICBpZiAoIXN0cmNtcCAoU1NEQVRBIChkaXJlY3Rpb24pLCAiVmVydGljYWwgUnVsZXIiKQorICAg ICAgICAgICYmIChwcmV2aW91c19yZWxhdGl2ZV94ID09IG9wb2ludF94CisgICAgICAgICAgICAg IHx8IGZpbmFsX2xvb3BfcCkpCisgICAgICAgIHsKKyAgICAgICAgICAvKiBTa2lwIHRoaXMgbGlu ZS4gKi8KKyAgICAgICAgICBpZiAocmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgYnJl YWs7CisgICAgICAgICAgLyogSWYgcG9pbnQgaXMgdG8gdGhlIGxlZnQgb2YgdGhlIGxpbmUgbnVt YmVycyB3aGVuIHNjcm9sbGluZworICAgICAgICAgIGhvcml6b250YWxseSwgdGhlbiB3ZSB3YW50 IHRoZSB2ZXJ0aWNhbCBsaW5lIHRvIGFsaWduIHdpdGggcmlnaHQgZWRnZQorICAgICAgICAgIG9m IHRoZSBsaW5lIG51bWJlcnMuICovCisgICAgICAgICAgaWYgKGl0LT53LT5oc2Nyb2xsID4gMAor ICAgICAgICAgICAgICAmJiBwcmV2aW91c19yZWxhdGl2ZV94ID09IG9wb2ludF94CisgICAgICAg ICAgICAgICYmIG9wb2ludF94IDwgaXQtPmxudW1fcGl4ZWxfd2lkdGgKKyAgICAgICAgICAgICAg JiYgcHJldmlvdXNfaHBvcyA9PSAtMSkKKyAgICAgICAgICAgIHByZXZpb3VzX2hwb3MgPSAoaXQt PmxudW1fcGl4ZWxfd2lkdGggLyBmb250X3NwYWNlX3dpZHRoKSAtIDE7CisgICAgICAgICAgICBl bHNlIGlmIChmaW5hbF9sb29wX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX2hw b3MgIT0gMAorICAgICAgICAgICAgICAgICAgICAgJiYgcmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVF RCkKKyAgICAgICAgICAgICAgcHJldmlvdXNfaHBvcyArPSAxOworICAgICAgICAgIExpc3BfT2Jq ZWN0IGZsYXZvciA9IFFuaWw7CisgICAgICAgICAgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAg ICAgICAgICAgICAmJiBnbHlwaF9yb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAg ICAgZmxhdm9yID0gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hbmdsZTsKKyAgICAgICAgICAgIGVs c2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhf cm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgZmxhdm9yID0gUW1jX3ZlcnRpY2FsX2Jh cl9iYWNrc2xhc2g7CisgICAgICAgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAor ICAgICAgICAgICAgICAgICAgICAgICAmJiAhZ2x5cGhfcm93LT50cnVuY2F0ZWRfb25fcmlnaHRf cAorICAgICAgICAgICAgICAgICAgICAgICAmJiAhZ2x5cGhfcm93LT5jb250aW51ZWRfcCkKKyAg ICAgICAgICAgICAgICBmbGF2b3IgPSBRbWNfdmVydGljYWxfYmFyOworICAgICAgICAgICAgICAg IC8qIFdoZW4gSVQgaXMgYXQgdGhlIGVuZCBvZiBhIGxpbmUsIHVzZSBgUW1jX2dseXBobGVzcycu CisgICAgICAgICAgICAgICAgSG93ZXZlciwgaXQgaXMgb2theSB0byB1c2UgUW1jX2dseXBoIGZv ciBhIHdvcmQtd3JhcHBlZCBsaW5lLiAqLworICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFJVEVS QVRPUl9BVF9FTkRfT0ZfTElORV9QIChpdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBG RVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSAhPSAnXG4nCisgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgIT0gJ1xmJworICAgICAgICAg ICAgICAgICAgICAgICAgIC8qIGl0LT5jID09ICdcdCcgd2hlbiBJVCBpcyBhdCBhIHRhYi13aWR0 aCBzcGFjZXIgZm9sbG93aW5nIGEKKyAgICAgICAgICAgICAgICAgICAgICAgICBgYnVmZmVyLWRp c3BsYXktdGFibGUnIGdseXBoIHN1Y2ggYXMgwrsuICBBbm90aGVyIHdheSB0byB0ZXN0CisgICAg ICAgICAgICAgICAgICAgICAgICAgZm9yIHRoaXMgY29uZGl0aW9uIGlzIHdoZW4gaXQtPmMgPT0g RkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkuICovCisgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgcHJldmlvdXNfY2hhcmFjdGVyICE9ICdcdCcKKyAgICAgICAgICAgICAgICAgICAgICAg ICAmJiByYyAhPSBNT1ZFX1BPU19NQVRDSF9PUl9aVgorICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHJjICE9IE1PVkVfTElORV9DT05USU5VRUQKKyAgICAgICAgICAgICAgICAgICAgICAgICAm JiAhcmVhbF9mYWtlX2N1cnNvcl9wCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcmVsYXRp dmVfeCAvIGZyYW1lX2NoYXJfd2lkdGggPj0gaXQtPmxudW1fcGl4ZWxfd2lkdGgpCisgICAgICAg ICAgICAgICAgICBmbGF2b3IgPSBRbWNfZ2x5cGg7CisgICAgICAgICAgICAgICAgICAvKiBJdCBp cyBva2F5IHRvIHVzZSBRbWNfZ2x5cGggZm9yIGEgd29yZC13cmFwcGVkIGxpbmUuICovCisgICAg ICAgICAgICAgICAgICBlbHNlIGlmIChyYyA9PSBNT1ZFX0xJTkVfQ09OVElOVUVECisgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSA9PSAn ICcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX3JlbGF0aXZlX3ggPT0g b3BvaW50X3gpCisgICAgICAgICAgICAgICAgICAgIGZsYXZvciA9IFFtY19nbHlwaDsKKyAgICAg ICAgICAgICAgICAgICAgZWxzZSBpZiAocHJldmlvdXNfY2hhcmFjdGVyID09ICdcdCcpCisgICAg ICAgICAgICAgICAgICAgICAgZmxhdm9yID0gUW1jX2dseXBoX3RhYjsKKyAgICAgICAgICAgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhdm9yID0gUW1jX2ds eXBobGVzczsKKyAgZnByaW50ZiAoc3RkZXJyLCAiXG5cCisgICAgVFlQRSBPRiBHTFlQSCBUTyBE UkFXOlxuXAorICAgIHZwb3MgKCVkKVxuXAorICAgIGZsYXZvciAoJXMpXG5cCisgICAgb3BvaW50 X3ggKCVkKVxuXAorICAgIHByZXZpb3VzX2hwb3MgKCVkKVxuXAorICAgIGN1cnJlbnQgY2hhcmFj dGVyICglcylcbiIsCisgICAgdnBvcywKKyAgICAoRVEgKGZsYXZvciwgUW1jX2dseXBoKQorICAg ICAgPyAiUW1jX2dseXBoIgorICAgICAgOiBFUSAoZmxhdm9yLCBRbWNfZ2x5cGhfdGFiKQorICAg ICAgICA/ICJRbWNfZ2x5cGhfdGFiIgorICAgICAgOiBFUSAoZmxhdm9yLCBRbWNfZ2x5cGhsZXNz KQorICAgICAgICA/ICJRbWNfZ2x5cGhsZXNzIgorICAgICAgOiBFUSAoZmxhdm9yLCBRbWNfdmVy dGljYWxfYmFyX3JpZ2h0X2FuZ2xlKQorICAgICAgICA/ICJRbWNfdmVydGljYWxfYmFyX3JpZ2h0 X2FuZ2xlIgorICAgICAgOiBFUSAoZmxhdm9yLCBRbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaCkK KyAgICAgICAgPyAiUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2giCisgICAgICA6IEVRIChmbGF2 b3IsIFFtY192ZXJ0aWNhbF9iYXIpCisgICAgICAgID8gIlFtY192ZXJ0aWNhbF9iYXIiCisgICAg ICA6ICJPT1BTIiksCisgICAgb3BvaW50X3gsCisgICAgcHJldmlv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J1xuJykpCisgICAgICAgICAgICAgICAgcHJldmlvdXNfZmFjZV9pZCA9 IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAgICAgICAvKiBQcmlvciB0byBgcmVnaW9uX2Jl Z2lubmluZ2AgYW5kIGF0IHRoZSBlbmQgb2YgYSBsaW5lLiAqLworICAgICAgICAgICAgICAgIGVs c2UgaWYgKElUX0NIQVJQT1MgKCppdCkgPCByZWdpb25fYmVnaW5uaW5nCisgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgKElURVJBVE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB8fCBGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSA9PSAn XG4nKSkKKyAgICAgICAgICAgICAgICAgIHByZXZpb3VzX2ZhY2VfaWQgPSBERUZBVUxUX0ZBQ0Vf SUQ7CisgICAgICAgICAgICAgICAgICAvKiAtICBXaXRoaW4gdGhlIHJlZ2lvbi4KKyAgICAgICAg ICAgICAgICAgICAgIC0gIGBwaHlzX2N1cnNvcl9nbHlwaGAgaXMgTlVMTC4gKi8KKyAgICAgICAg ICAgICAgICAgIGVsc2UgaWYgKElUX0NIQVJQT1MgKCppdCkgPj0gcmVnaW9uX2JlZ2lubmluZwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgSVRfQ0hBUlBPUyAoKml0KSA8IHJlZ2lvbl9l bmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHBoeXNfY3Vyc29yX2dseXBoID09IE5V TEwpCisgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzX2ZhY2VfaWQgPSBwcmV2aW91c19mYWNl X2lkOworICAgICAgICAgICAgICAgICAgICAvKiAtICBXaXRoaW4gdGhlIHJlZ2lvbi4KKyAgICAg ICAgICAgICAgICAgICAgICAgLSAgYHBoeXNfY3Vyc29yX2dseXBoYCBpcyBub24tTlVMTC4KKyAg ICAgICAgICAgICAgICAgICAgICAgLSAgQXQgdGhlIGVuZCBvZiB0aGUgbGluZS4KKyAgICAgICAg ICAgICAgICAgICAgICAgLSAgUFQgaXMgYXQgYHJlZ2lvbl9iZWdpbm5pbmdgLiAqLworICAgICAg ICAgICAgICAgICAgICBlbHNlIGlmIChJVF9DSEFSUE9TICgqaXQpID49IHJlZ2lvbl9iZWdpbm5p bmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgSVRfQ0hBUlBPUyAoKml0KSA8IHJl Z2lvbl9lbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgKElURVJBVE9SX0FUX0VO RF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgRkVU Q0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0gJ1xuJykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcGh5c19jdXJzb3JfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBQVCA9PSByZWdpb25fYmVnaW5uaW5nKQorICAgICAgICAgICAgICAgICAg ICAgIHByZXZpb3VzX2ZhY2VfaWQgPSBwaHlzX2N1cnNvcl9nbHlwaC0+ZmFjZV9pZDsKKyAgICAg ICAgICAgICAgICAgICAgICAvKiAtICBXaXRoaW4gdGhlIHJlZ2lvbi4KKyAgICAgICAgICAgICAg ICAgICAgICAgICAtICBgcGh5c19jdXJzb3JfZ2x5cGhgIGlzIG5vbi1OVUxMLgorICAgICAgICAg ICAgICAgICAgICAgICAgIC0gIEF0IHRoZSBlbmQgb2YgdGhlIGxpbmUuCisgICAgICAgICAgICAg ICAgICAgICAgICAgLSAgUFQgaXMgYXQgYHJlZ2lvbl9yZWdpb25fZW5kYC4gKi8KKyAgICAgICAg ICAgICAgICAgICAgICBlbHNlIGlmIChJVF9DSEFSUE9TICgqaXQpID49IHJlZ2lvbl9iZWdpbm5p bmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBJVF9DSEFSUE9TICgqaXQpIDwg cmVnaW9uX2VuZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIChJVEVSQVRPUl9B VF9FTkRfT0ZfTElORV9QIChpdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg fHwgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0gJ1xuJykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBwaHlzX2N1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgUFQgPT0gcmVnaW9uX2VuZCkKKyAgICAgICAgICAgICAg ICAgICAgICAgIC8qIHByZXZpb3VzX2ZhY2VfaWQgPSBwaHlzX2N1cnNvcl9nbHlwaC0+ZmFjZV9p ZDsgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHByZXZpb3VzX2ZhY2VfaWQgPSBsb29r dXBfbmFtZWRfZmFjZSAoaXQtPmYsIGludGVybiAoInJlZ2lvbiIpLCB0cnVlKTsgKi8KKyAgICAg ICAgICAgICAgICAgICAgICAgIHByZXZpb3VzX2ZhY2VfaWQgPSBpdC0+ZmFjZV9pZDsKKyAgICAg ICAgICAgICAgICAgICAgICAgIC8qIC0gIFdpdGhpbiB0aGUgcmVnaW9uLgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgLSAgYHBoeXNfY3Vyc29yX2dseXBoYCBpcyBub24tTlVMTC4KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIC0gIE5vdCBhdCB0aGUgZW5kIG9mIHRoZSBsaW5lLiAqLwor ICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoSVRfQ0hBUlBPUyAoKml0KSA+PSByZWdp b25fYmVnaW5uaW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBJVF9DSEFS UE9TICgqaXQpIDwgcmVnaW9uX2VuZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgKCFJVEVSQVRPUl9BVF9FTkRfT0ZfTElORV9QIChpdCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB8fCBGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSAhPSAnXG4n KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcGh5c19jdXJzb3JfZ2x5cGgg IT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNfZmFjZV9pZCA9IHBy ZXZpb3VzX2ZhY2VfaWQ7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmICgoaXQt PnctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYgcHJldmlvdXNfcmVsYXRp dmVfeCA9PSBvcG9pbnRfeAorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94IDwgaXQt PmxudW1fcGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICB8fCBJVF9DSEFSUE9TICgq aXQpID09IFpWKQorICAgICAgICAgICAgICBwcmV2aW91c19mYWNlX2lkID0gREVGQVVMVF9GQUNF X0lEOworICAgICAgICAgICAgICBlbHNlIGlmIChJVEVSQVRPUl9BVF9FTkRfT0ZfTElORV9QIChp dCkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0 KSkgPT0gJ1xuJykKKyAgICAgICAgICAgICAgICBwcmV2aW91c19mYWNlX2lkID0gaXQtPmZhY2Vf aWQ7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoZ2hvc3Rfb2ZfY2hyaXN0bWFzX2Z1dHVyZV9w KQorICAgICAgICAgICAgICAgICAgcHJldmlvdXNfZmFjZV9pZCA9IGdob3N0X29mX2NocmlzdG1h c19mdXR1cmVfZmFjZV9pZDsKKyAgICAgICAgICBtY19jcm9zc2hhaXJzX2hlbHBlciAoaXQtPncs IG9wb2ludF94LCBpdC0+Y3VycmVudF95LCBwcmV2aW91c19ocG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3Jv dW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19iYWNrZ3JvdW5kIChpdC0+ dywgcHJldmlvdXNfZmFjZV9pZCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZs YXZvciwgSVRfQ0hBUlBPUyAoKml0KSAtMSwgcmVzdWx0KTsKKyAgICAgICAgICBicmVhazsKKyAg ICAgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgUW1jX2dseXBoICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Ki8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgICAgaWYgKCFzdHJjbXAgKFNTREFUQSAo ZGlyZWN0aW9uKSwgIkhvcml6b250YWwgUnVsZXIiKQorICAgICAgICAgICYmIChncmVlbl9saWdo dF9wCisgICAgICAgICAgICAgIC8qIFBsYWNlIGFuIFFtY19nbHlwaCBvbiB0aGUgbGFzdCBzcGFj ZSBvZiBhIHdyYXBwZWQgbGluZS4gKi8KKyAgICAgICAgICAgICAgfHwgcmMgPT0gTU9WRV9MSU5F X0NPTlRJTlVFRCkKKyAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wCisgICAgICAgICAg JiYgbHB3X3JlYWNoZWRfcAorICAgICAgICAgICYmICF0YWJfaW52aXNpYmxlX3ApCisgICAgICAg IHsKKyAgICAgICAgICBwdHJkaWZmX3QgaXRfY2hhcnBvcyA9IChyYyA9PSBNT1ZFX0xJTkVfQ09O VElOVUVEKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gSVRfQ0hBUlBPUyAo Kml0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogSVRfQ0hBUlBPUyAoKml0 KSAtIDE7CisgICAgICAgICAgaWYgKHJjID09IE1PVkVfTElORV9DT05USU5VRUQpCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIHByZXZpb3VzX2hwb3MgPSBwcmV2aW91c19ocG9zICsgMTsK KyAgICAgICAgICAgICAgcHJldmlvdXNfZmFjZV9pZCA9IGl0LT5mYWNlX2lkOworICAgICAgICAg ICAgfQorICAgICAgICAgIG1jX2Nyb3NzaGFpcnNfaGVscGVyIChpdC0+dywgcHJldmlvdXNfcmVs YXRpdmVfeCwgaXQtPmN1cnJlbnRfeSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg cHJldmlvdXNfaHBvcywgdnBvcywgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgbWNfYmFja2dyb3VuZCAoaXQtPncs IHByZXZpb3VzX2ZhY2VfaWQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRbWNf Z2x5cGgsIGl0X2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFFtY19nbHlwaF90YWIg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tL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AgICAgICAgICAmJiBncmVlbl9saWdodF9wCisgICAgICAgICAgJiYgIXJlYWxfZmFr ZV9jdXJzb3JfcAorICAgICAgICAgICYmIGxwd19yZWFjaGVkX3AKKyAgICAgICAgICAmJiB0YWJf aW52aXNpYmxlX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgaTsKKyAgICAgICAgICBpbnQg eCA9IChzYXZlZF9yZWxhdGl2ZV94X2Zvcl90YWIgPCBpdC0+bG51bV9waXhlbF93aWR0aCkKKyAg ICAgICAgICAgICAgICAgID8gaXQtPmxudW1fcGl4ZWxfd2lkdGgKKyAgICAgICAgICAgICAgICAg IDogc2F2ZWRfcmVsYXRpdmVfeF9mb3JfdGFiOworICAgICAgICAgIGludCBjb3VudCA9IChyZWxh dGl2ZV94IC0geCkgLyBmb250X3NwYWNlX3dpZHRoOworICAgICAgICAgIGZvciAoaSA9IDA7IGkg PCBjb3VudDsgaSsrKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19jcm9zc2hhaXJz X2hlbHBlciAoaXQtPncsIHgsIGl0LT5jdXJyZW50X3ksIHByZXZpb3VzX2hwb3MsIHZwb3MsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgbWNf YmFja2dyb3VuZCAoaXQtPncsIHByZXZpb3VzX2ZhY2VfaWQpLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgUW1jX2dseXBoX3RhYiwgSVRfQ0hBUlBPUyAoKml0KSAtIDEsIHJl c3VsdCk7CisgICAgICAgICAgICAgIHggKz0gZm9udF9zcGFjZV93aWR0aDsKKyAgICAgICAgICAg IH0KKyAgICAgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS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gICA/IGl0LT5sbnVtX3BpeGVsX3dpZHRoCisgICAgICAgICAgICAgICAgICA6IGdo b3N0X29mX2NocmlzdG1hc19mdXR1cmVfcmVsYXRpdmVfeDsKKyAgICAgICAgICBpbnQgY291bnQg PSAocHJldmlvdXNfcmVsYXRpdmVfeCAtIHgpIC8gZm9udF9zcGFjZV93aWR0aDsKKyAgICAgICAg ICBmb3IgKGkgPSAwOyBpIDwgY291bnQ7IGkrKykKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgbWNfY3Jvc3NoYWlyc19oZWxwZXIgKGl0LT53LCB4LCBpdC0+Y3VycmVudF95LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2hvc3Rfb2ZfY2hyaXN0bWFzX2Z1dHVyZV9o cG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5 cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1jX2JhY2tncm91bmQgKGl0LT53LCBnaG9zdF9vZl9jaHJpc3RtYXNfZnV0dXJl X2ZhY2VfaWQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUW1jX2dseXBo X3RhYiwgSVRfQ0hBUlBPUyAoKml0KSAtIDIsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHggKz0g Zm9udF9zcGFjZV93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBnaG9zdF9vZl9jaHJp c3RtYXNfZnV0dXJlX3AgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmICgoIXN0 cmNtcCAoU1NEQVRBIChkaXJlY3Rpb24pLCAiVmVydGljYWwgUnVsZXIiKQorICAgICAgICAgICAg ICAgICAgfHwgIXN0cmNtcCAoU1NEQVRBIChkaXJlY3Rpb24pLCAiTXVsdGlwbGUgQ3Vyc29ycyIp KQorICAgICAgICAgICAgICAgICAmJiBncmVlbl9saWdodF9wCisgICAgICAgICAgICAgICAgICYm IGdob3N0X29mX2NocmlzdG1hc19mdXR1cmVfcAorICAgICAgICAgICAgICAgICAmJiBscHdfcmVh Y2hlZF9wKQorICAgICAgICAgIGdob3N0X29mX2NocmlzdG1hc19mdXR1cmVfcCA9IGZhbHNlOwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZmluYWxfbG9vcF9wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgSE9S SVpPTlRBTCBSVUxFUjogIERSQVcgRkxPQVRJTkcgR0xZUEhMRVNTIExJTkUgKEVPTCBUTyBGUklO R0UpICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgICAgaWYgKCFzdHJj bXAgKFNTREFUQSAoZGlyZWN0aW9uKSwgIkhvcml6b250YWwgUnVsZXIiKQorICAgICAgICAgICYm IGZpbmFsX2xvb3BfcCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFdlIHdhbnQgdG8gc3RhcnQg ZHJhd2luZyB0aGUgZmxvYXRpbmcgaG9yaXpvbnRhbCBsaW5lIGZyb20gSVQKKyAgICAgICAgICAo bGluZSBmZWVkOyBaVjsgb3Igc3BhY2Utd29yZF93cmFwKSB1bnRpbCB0aGUgcmlnaHQgZnJpbmdl LgorICAgICAgICAgIElmIHRoZSBsaW5lIGlzIGVtcHR5IG9yIGhpZGRlbiBieSBob3Jpem9udGFs IHNjcm9sbGluZywgdGhlbiBgaXQuY3VycmVudF94YAorICAgICAgICAgIG1heSBiZSBzb21ld2hl cmUgYmVmb3JlIGBsbnVtX3BpeGVsX3dpZHRoYC4gIFRoZSByZWFsIGN1cnNvciB3aWxsIGJlIHRv IHRoZQorICAgICAgICAgIGxlZnQgb2YgYGxudW1fcGl4ZWxfd2lkdGhgIGlmIHdlIGFyZSBob3Jp em9udGFsIHNjcm9sbGluZyBhbmQgcG9pbnQgaXMKKyAgICAgICAgICBoaWRkZW4gc29tZXdoZXJl IHRvIHRoZSBsZWZ0IHRoZXJlb2YuICovCisgICAgICAgICAgcHJldmlvdXNfZmFjZV9pZCA9ICgo cGh5c19jdXJzb3JfZ2x5cGggPSBnZXRfcGh5c19jdXJzb3JfZ2x5cGggKGl0LT53KSkgPT0gTlVM TCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gREVGQVVMVF9GQUNFX0lECisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IChJVF9DSEFSUE9TICgqaXQpID49IHJlZ2lvbl9l bmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IHJlZ2lvbl9iZWdpbm5pbmcg PT0gcmVnaW9uX2VuZCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBERUZBVUxU X0ZBQ0VfSUQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBwaHlzX2N1cnNvcl9n bHlwaC0+ZmFjZV9pZDsKKyAgICAgICAgICAvKiBBbiBlbXB0eSBuZXcgbGluZSAtLSBsb29wIGlu IHByZXZpb3VzIHNlY3Rpb24gYnJva2UgaW1tZWRpYXRlbHkuICovCisgICAgICAgICAgcHJldmlv dXNfaHBvcyA9IChyZWxhdGl2ZV94ID09IGl0LT5sbnVtX3BpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gaXQtPmxudW1fcGl4ZWxfd2lkdGggLyBmcmFtZV9jaGFyX3dp ZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTm8gbmVlZCB0byByZWFkanVzdCBi ZWNhdXNlIGl0IHdhcyBkb25lIGFib3ZlLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogcmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBwcmV2aW91c19ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBwcmV2aW91 c19ocG9zICsgMTsKKyAgICAgICAgICAvKiBBbiBlbXB0eSBuZXcgbGluZSAtLSBsb29wIGluIHBy ZXZpb3VzIHNlY3Rpb24gYnJva2UgaW1tZWRpYXRlbHkuICovCisgICAgICAgICAgcmVsYXRpdmVf eCA9IChyZWxhdGl2ZV94IDwgaXQtPmxudW1fcGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAg ICAgICAgID8gaXQtPmxudW1fcGl4ZWxfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgOiBy ZWxhdGl2ZV94OworICAgICAgICAgIHdoaWxlIChyZWxhdGl2ZV94ICsgZnJhbWVfY2hhcl93aWR0 aCA8IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfY3Jv c3NoYWlyc19oZWxwZXIgKGl0LT53LCByZWxhdGl2ZV94LCBpdC0+Y3VycmVudF95LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNfaHBvcywgdnBvcywgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGZvcmVncm91bmQsIG1jX2JhY2tncm91bmQgKGl0LT53LCBwcmV2aW91c19mYWNlX2lkKSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFFtY19nbHlwaGxlc3MsIElUX0NIQVJQ T1MgKCppdCksIHJlc3VsdCk7CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggPSByZWxhdGl2ZV94 ICsgZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYg KCghc3RyY21wIChTU0RBVEEgKGRpcmVjdGlvbiksICJIb3Jpem9udGFsIFJ1bGVyIikKKyAgICAg ICAgICAgfHwgIXN0cmNtcCAoU1NEQVRBIChkaXJlY3Rpb24pLCAiVmVydGljYWwgUnVsZXIiKSkK KyAgICAgICAgICAmJiBmaW5hbF9sb29wX3ApCisgICAgICAgIGJyZWFrOworICAgICAgICBlbHNl IGlmICghc3RyY21wIChTU0RBVEEgKGRpcmVjdGlvbiksICJNdWx0aXBsZSBDdXJzb3JzIikKKyAg ICAgICAgICAgICAgICAgJiYgKHByZXZpb3VzX3B0ID09IHBvc2ludAorICAgICAgICAgICAgICAg ICAgICAgfHwgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0gJ1xuJykpCisgICAgICAg ICAgeworICAgICAgICAgICAgLyogQXMgdG8gYG1jX2NhbGMnLCB3ZSBhcmUgaW50ZXJlc3RlZCBp biB0aGUgY3VycmVudCBIUE9TIGFuZCB0aGUgY3VycmVudAorICAgICAgICAgICAgYHJlbGF0aXZl X3hgLiAgVGhlIGluY29taW5nIGFyZ3VtZW50IGZvciBwcmV2aW91c19ocG9zIGlzIGFjdHVhbGx5 IGhwb3MsCisgICAgICAgICAgICB3aGljaCBnZXRzIG1vZGlmaWVkIGFjY29yZGluZ2x5IGhlcmUg KGV2ZW4gdGhvdWdoIGEgZGlmZmVyZW50IG5hbWUpLiAqLworICAgICAgICAgICAgaWYgKHByZXZp b3VzX3B0ID09IHBvc2ludCkKKyAgICAgICAgICAgICAgLyogV2UgY291bGQsIGJ1dCBhcmUgbm90 IG1vZGlmeWluZyB0aGUgZ2xvYmFsIHByZXZpb3VzX3JlbGF0aXZlX3guICovCisgICAgICAgICAg ICAgIHJlbGF0aXZlX3ggPSBwcmV2aW91c19yZWxhdGl2ZV94OworICAgICAgICAgICAgICAvKiBX ZSBhcmUgYXQgdGhlIGVuZCBvZiB0aGUgbGluZS4gKi8KKyAgICAgICAgICAgICAgZWxzZSBpZiAo KElURVJBVE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAgICAgICAgICAgICAgICAg fHwgRkVUQ0hfQllURSAoSVRfQllURVBPUyAoKml0KSkgPT0gJ1xuJykKKyAgICAgICAgICAgICAg ICAgICAgICAgJiYgSVRfQ0hBUlBPUyAoKml0KSA9PSBwb3NpbnQpCisgICAgICAgICAgICAgICAg LyogYHJlbGF0aXZlX3hgIGlzIGFscmVhZHkgY29ycmVjdC4gKi8KKyAgICAgICAgICAgICAgICBw cmV2aW91c19ocG9zICs9IDE7CisgICAgICAgICAgICBMaXNwX09iamVjdCBmbGF2b3IgPSBRbmls OworICAgICAgICAgICAgaWYgKElUX0NIQVJQT1MgKCppdCkgPT0gcG9zaW50CisgICAgICAgICAg ICAgICAgJiYgKElURVJBVE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KQorICAgICAgICAgICAgICAg ICAgICB8fCBGRVRDSF9CWVRFIChJVF9CWVRFUE9TICgqaXQpKSA9PSAnXG4nKSkKKyAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgIGZsYXZvciA9IFFtY19nbHlwaGxlc3M7CisgICAgICAg ICAgICAgICAgcHJldmlvdXNfZmFjZV9pZCA9IGl0LT5mYWNlX2lkOworICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgZmxhdm9yID0gUW1jX2ds eXBoOworICAgICAgICAgICAgaWYgKHJjID09IE1PVkVfTElORV9DT05USU5VRUQpCisgICAgICAg ICAgICAgIHByZXZpb3VzX2hwb3MgKz0gMTsKKyAgICAgICAgICAgIG1jX2NhbGNfaGVscGVyIChp dC0+dywgcmVsYXRpdmVfeCwgaXQtPmN1cnJlbnRfeSwgcHJldmlvdXNfaHBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3Jl Z3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JhY2tncm91bmQgKGl0LT53 LCBwcmV2aW91c19mYWNlX2lkKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3Is IHBvc2ludCwgc3BlY3MsIHJlc3VsdCk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICB9 CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgU3RvcmUg VmFsdWVzIGZvciBOZXh0IENvbW1hbmQgTG9vcCAgICAgICAgICAgICAgICAgICAgICAqLworLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgICAvKiBAbGF3bGlzdCBwcmV2aW91c2x5IGVuY291 bnRlcmVkIGEgY3Jhc2ggdGhhdCB3YXMgcHJvYmFibHkgY2F1c2VkIGJ5CisgICAgICBGRVRDSF9C WVRFIChJVF9CWVRFUE9TICgqaXQpIC0gMSkgbm90IGZpbmRpbmcgYW55dGhpbmcgYXQgdGhpcyBs b2NhdGlvbi4gKi8KKyAgICAgIGZldGNoX2J5dGVfcHJldmlvdXNfY2hhcmFjdGVyID0gKGl0LT5j ID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBGRVRDSF9CWVRF IChJVF9CWVRFUE9TICgqaXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IDA7CisgICAgICBwcmV2aW91c19jaGFyYWN0ZXIgPSBpdC0+YzsKKyAgICAgIHByZXZpb3Vz X3B0ID0gSVRfQ0hBUlBPUyAoKml0KTsKKyAgICAgIHByZXZpb3VzX3JlbGF0aXZlX3ggPSByZWxh dGl2ZV94OworICAgICAgcHJldmlvdXNfZmFjZV9pZCA9IGl0LT5mYWNlX2lkOworICAgICAgLyog U29tZSBjaGFyYWN0ZXJzLCBlLmcuLCBhIGBidWZmZXItZGlzcGxheS10YWJsZScgY2hhcmFjdGVy IG9mIPCdk5UgaGF2ZSBhCisgICAgICBgZm9udC0+c3BhY2Vfd2lkdGhgIHRoYXQgaXMgbGVzcyB0 aGFuIHRoZSBgZnJhbWVfY2hhcl93aWR0aGAuICovCisgICAgICBpbnQgaW5jcmVtZW50ID0gKGZv bnRfc3BhY2Vfd2lkdGggIT0gZnJhbWVfY2hhcl93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAg ICA/IGZyYW1lX2NoYXJfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICA6IGZvbnRfc3BhY2Vf d2lkdGg7CisgICAgICBuZXdfeCArPSBpbmNyZW1lbnQ7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTW92ZSB0byBYICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisg ICAgICByYyA9IChJVF9DSEFSUE9TICgqaXQpID09IFpWKQorICAgICAgICAgICAgID8gTU9WRV9Q T1NfTUFUQ0hfT1JfWlYKKyAgICAgICAgICAgICA6IE1PVkVfWF9SRUFDSEVEOworICAgICAgLyog V2hlbiBgYXV0by1oc2Nyb2xsLW1vZGUnIGlzIHNldCB0byBgY3VycmVudC1saW5lYCBhbmQgd2Ug YXJlIGhvcml6b250YWwgc2Nyb2xsaW5nCisgICAgICBhIGxvbmcgbGluZSB0aGF0IGFwcHJvYWNo ZXMgb3IgZXhjZWVkcyBhbiBgaXQuY3VycmVudC54YCBvZiBhcHByb3hpbWF0ZWx5IDEwMDAsIGBy Y2AKKyAgICAgIHdpbGwgZXJyb25lb3VzbHkgcmV0dXJuIGVhcmx5IHdpdGggYSBNT1ZFX0xJTkVf VFJVTkNBVEVEIGluZGljYXRvciAgd2l0aG91dCBwdXNoaW5nCisgICAgICBmb3J3YXJkcyB1bnRp bCBJVCByZWFjaGVzIHRoZSBuZXdfeC4gIEFzIGEgd29ya2Fyb3VuZCwgaWdub3JlIE1PVkVfTElO RV9UUlVOQ0FURUQuICovCisgICAgICBpZiAoSVRfQ0hBUlBPUyAoKml0KSAhPSBaVgorICAgICAg ICAgIC8qIGBJVEVSQVRPUl9BVF9FTkRfT0ZfTElORV9QYCBtYXkgYmUgYHRydWVgIHdoZW4gSVQg aXMgYXQgdGhlIGJlZ2lubmluZyBvZiBhIGxpbmUuICovCisgICAgICAgICAgLyogJiYgIUlURVJB VE9SX0FUX0VORF9PRl9MSU5FX1AgKGl0KSAqLworICAgICAgICAgICYmIChGRVRDSF9CWVRFIChJ VF9CWVRFUE9TICgqaXQpKSAhPSAnXG4nCisgICAgICAgICAgICAgIHx8IChGRVRDSF9CWVRFIChJ VF9CWVRFUE9TICgqaXQpKSA9PSAnXG4nCisgICAgICAgICAgICAgICAgICAmJiBpdC0+YyA9PSAw KSkKKyAgICAgICAgICAmJiBpdC0+Y3VycmVudF94ICsgZm9udF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lkdGggPSBsbnVtX3BpeGVsX3dpZHRoOworICAgICAgU0FWRV9JVCAoc2F2 ZWRfaXRfZm9yX3dpbmRvd19zdGFydCwgaXQsIHNhdmVkX2l0ZGF0YV9mb3Jfd2luZG93X3N0YXJ0 KTsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIFJFTU9WRSBHTFlQSCBDVVJTT1JTCisqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KyAgLyogUmVtb3ZlIHRoZSBjdXJzb3JzIHVzaW5nIHRoZSBjYWNoZSBpZiB0aGUgY29uZGl0aW9u cyBhcmUgc2F0aXNmaWVkLiAqLworICBpZiAoKHJlbW92ZSAmJiAhTklMUCAody0+bWNfZ2x5cGhf Y2FjaGUpICYmIE5JTFAgKEJWQVIgKGIsIG1jX2dseXBoX2xpc3QpKSkKKyAgICAgIHx8ICghTklM UCAody0+bWNfZ2x5cGhfY2FjaGUpICYmICFOSUxQIChCVkFSIChiLCBtY19nbHlwaF9saXN0KSkg JiYgKHJlbW92ZSB8fCB3ICE9IHN3KSkpCisgICAgeworICAgICAgLyogRXJhc2UgdGhlIHJlYWwg Y3Vyc29yIHNvIHRoYXQgdGhlIHdob2xlIHZlcnRpY2FsIGxpbmUgZ2V0cyByZW1vdmVkLCBub3Qg anVzdCB0aGUgZmFrZSBjdXJzb3JzLiAqLworICAgICAgbWNfZXJhc2VfZ2x5cGhfY3Vyc29yICh3 LCB3LT5waHlzX2N1cnNvci54LCB3LT5waHlzX2N1cnNvci55LCB3LT5waHlzX2N1cnNvci5ocG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5waHlzX2N1cnNvci52cG9zLCB3LT5w aHlzX2N1cnNvcl90eXBlKTsKKyAgICAgIC8qIFByb2Nlc3MgdGhlIE1DX0dMWVBIX0NBQ0hFLiAq LworICAgICAgaWYgKCFOSUxQICh3LT5tY19nbHlwaF9jYWNoZSkpCisgICAgICAgIHsKKyAgICAg ICAgICBmb3IgKHZsaXN0ID0gWENBUiAoWENEUiAody0+bWNfZ2x5cGhfY2FjaGUpKTsKKyAgICAg ICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgICAgICAgICB2bGlzdCA9IFhDRFIgKHZs aXN0KSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgdGVuX2VsZW1lbnRzID0gWENBUiAo WENEUiAoWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgICAgIHggPSBYSU5UIChGbnRoIChtYWtl X251bWJlciAoMCksIHRlbl9lbGVtZW50cykpOworICAgICAgICAgICAgICB5ID0gWElOVCAoRm50 aCAobWFrZV9udW1iZXIgKDEpLCB0ZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICAgICAgaHBvcyA9 IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAg ICAgIHZwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMyksIHRlbl9lbGVtZW50cykpOwor ICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKEZudGgg KG1ha2VfbnVtYmVyICg0KSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgICAgIGN1cnNvcl93 aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwgdGVuX2VsZW1lbnRzKSk7CisgICAg ICAgICAgICAgIGZvcmVncm91bmQgPSBGbnRoIChtYWtlX251bWJlciAoNiksIHRlbl9lbGVtZW50 cyk7CisgICAgICAgICAgICAgIGJhY2tncm91bmQgPSBGbnRoIChtYWtlX251bWJlciAoNyksIHRl bl9lbGVtZW50cyk7CisgICAgICAgICAgICAgIGZsYXZvciA9IEZudGggKG1ha2VfbnVtYmVyICg4 KSwgdGVuX2VsZW1lbnRzKTsKKyAgICAgICAgICAgICAgcG9zaW50ID0gWElOVCAoRm50aCAobWFr ZV9udW1iZXIgKDkpLCB0ZW5fZWxlbWVudHMpKTsKKyAgICAgICAgICAgICAgaWYgKEVRIChmbGF2 b3IsIFFtY19nbHlwaGxlc3MpKQorICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlk ICh3LCB4LCB5LCBocG9zLCB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBiYWNrZ3Jv dW5kLCBmbGF2b3IpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIG1j X2VyYXNlX2dseXBoX2N1cnNvciAodywgeCwgeSwgaHBvcywgdnBvcywgY3Vyc29yX3R5cGUpOwor ICAgICAgICAgICAgfQorICAgICAgICAgIGlmIChOSUxQIChCVkFSIChiLCBtY19nbHlwaF9saXN0 KSkpCisgICAgICAgICAgICB3c2V0X21jX2dseXBoX2NhY2hlICh3LCBRbmlsKTsKKyAgICAgICAg fQorICAgICAgdy0+bWMuZXJhc2VfZ2x5cGhfY3Vyc29yID0gZmFsc2U7CisgICAgfQorLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSRURSQVcg R0xZUEggQ1VSU09SUworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIC8qIElmIHRoZSBmaXJz dCBlbGVtZW50IG9mIHctPm1jX2dseXBoX2NhY2hlIGlzIHRoZSBzYW1lIGFzIHRoZSBsb2NhbCB2 YXJpYWJsZSBtY19nbHlwaF9saXN0LAorICAgICBhbmQgdGhlIHByZXZpb3VzL2N1cnJlbnQgd2lu ZG93LXN0YXJ0L3dpbmRvdy1lbmQgYXJlIHRoZSBzYW1lIChlLmcuLCBubyBzY3JvbGxpbmcpLAor ICAgICB0aGVuIHJlZHJhdyB0aGUgY3Vyc29ycyB1c2luZyB0aGUgY2FjaGUuICBUaGlzIGF2b2lk cyByZWNhbGN1bGF0aW5nIGNvb3JkaW5hdGVzLiAqLworICBpZiAoIXJlbW92ZQorICAgICAgJiYg dyA9PSBzdworICAgICAgJiYgdy0+bWMuY3VycmVudF9zdGFydAorICAgICAgJiYgdy0+bWMuY3Vy cmVudF9lbmQKKyAgICAgICYmIHctPm1jLnByZXZpb3VzX3N0YXJ0CisgICAgICAmJiB3LT5tYy5w cmV2aW91c19lbmQKKyAgICAgICYmIHctPm1jLmN1cnJlbnRfc3RhcnQgPT0gdy0+bWMucHJldmlv dXNfc3RhcnQKKyAgICAgICYmIHctPm1jLmN1cnJlbnRfZW5kID09IHctPm1jLnByZXZpb3VzX2Vu ZAorICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1jX2dseXBoX2xpc3QpKQorICAgICAgJiYgIU5J TFAgKHctPm1jX2dseXBoX2NhY2hlKQorICAgICAgJiYgIU5JTFAgKEZlcXVhbCAoRm50aCAobWFr ZV9udW1iZXIgKDApLCB3LT5tY19nbHlwaF9jYWNoZSksIEJWQVIgKGIsIG1jX2dseXBoX2xpc3Qp KSkpCisgICAgeworICAgICAgZm9yICh2bGlzdCA9IFhDQVIgKFhDRFIgKHctPm1jX2dseXBoX2Nh Y2hlKSk7CisgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgICAgIHZsaXN0ID0gWENE UiAodmxpc3QpKQorICAgICAgICB7CisgICAgICAgICAgdGVuX2VsZW1lbnRzID0gWENBUiAoWENE UiAoWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgeCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICgwKSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgeSA9IFhJTlQgKEZudGggKG1ha2VfbnVt YmVyICgxKSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgaHBvcyA9IFhJTlQgKEZudGggKG1h a2VfbnVtYmVyICgyKSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgdnBvcyA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICgzKSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgY3Vyc29yX3R5 cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX251bWJlciAoNCksIHRlbl9l bGVtZW50cykpOworICAgICAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVt YmVyICg1KSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1h a2VfbnVtYmVyICg2KSwgdGVuX2VsZW1lbnRzKTsKKyAgICAgICAgICBiYWNrZ3JvdW5kID0gRm50 aCAobWFrZV9udW1iZXIgKDcpLCB0ZW5fZWxlbWVudHMpOworICAgICAgICAgIGZsYXZvciA9IEZu dGggKG1ha2VfbnVtYmVyICg4KSwgdGVuX2VsZW1lbnRzKTsKKyAgICAgICAgICBwb3NpbnQgPSBY SU5UIChGbnRoIChtYWtlX251bWJlciAoOSksIHRlbl9lbGVtZW50cykpOworICAgICAgICAgIG1j X2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCB5LCBocG9zLCB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vy c29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBRbWNfZ2x5cGgpOworICAgICAgICB9CisgICAgICB3LT5t Yy5kcmF3X2dseXBoX2N1cnNvciA9IGZhbHNlOworICAgIH0KKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXIEdMWVBIIENVUlNPUlMgQU5F VworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisgICAgLyogRHJhdyB0aGUgY3Vyc29ycyBhbmV3 IGJlY2F1c2Ugc29tZXRoaW5nIGhhcyBjaGFuZ2VkLCBlLmcuLCB0aGUgZmlyc3QgZWxlbWVudCBv ZgorICAgICAgIHctPm1jX2dseXBoX2NhY2hlIGlzIE5PVCB0aGUgc2FtZSBhcyB0aGUgbG9jYWwg dmFyaWFibGUgbWNfZ2x5cGhfbGlzdDsgYW5kL29yLCB0aGUgcHJldmlvdXMvCisgICAgICAgY3Vy cmVudCB3aW5kb3ctc3RhcnQvd2luZG93LWVuZCBhcmUgTk9UIHRoZSBzYW1lIChlLmcuLCBzY3Jv bGxpbmcgaGFzIG9jY3VycmVkKS4KKyAgICAgICBTZW1pLWV4cGVuc2l2ZSBjYWxjdWxhdGlvbiBv ZiBjb29yZGluYXRlcyBpcyByZXF1aXJlZC4gKi8KKyAgICBlbHNlIGlmICghcmVtb3ZlCisgICAg ICAgICAgICAgJiYgdyA9PSBzdworICAgICAgICAgICAgICYmIHctPm1jLmN1cnJlbnRfc3RhcnQK KyAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWNfZ2x5cGhfbGlzdCkpKQorICAgICAg eworICAgICAgICBmb3IgKHZsaXN0ID0gQlZBUiAoYiwgbWNfZ2x5cGhfbGlzdCk7CisgICAgICAg ICAgICAgQ09OU1AgKHZsaXN0KTsKKyAgICAgICAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkK KyAgICAgICAgICB7CisgICAgICAgICAgICBzcGVjcyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgICAg ICAgIHBvc2ludCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgwKSwgc3BlY3MpKTsKKyAgICAg ICAgICAgIGxpc3BfdHlwZSA9IEZudGggKG1ha2VfbnVtYmVyICgxKSwgc3BlY3MpOworICAgICAg ICAgICAgaWYgKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9 IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIgKGxpc3BfdHlwZSkpOworICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90 eXBlIChsaXNwX3R5cGUpOworICAgICAgICAgICAgaWYgKENPTlNQIChsaXNwX3R5cGUpKQorICAg ICAgICAgICAgICBjdXJzb3Jfd2lkdGggPSBYSU5UIChYQ0FSIChYQ0RSIChsaXNwX3R5cGUpKSk7 CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGggPSAxOwor ICAgICAgICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICgyKSwgc3BlY3MpOwor ICAgICAgICAgICAgaWYgKFNUUklOR1AgKGZvcmVncm91bmQpKQorICAgICAgICAgICAgICBmb3Jl Z3JvdW5kID0gbWNfY29sb3JfdmVjdG9yX2NhbGMgKHcsIGZvcmVncm91bmQpOworICAgICAgICAg ICAgUkVTVE9SRV9JVCAoJml0LCAmc2F2ZWRfaXRfZm9yX3dpbmRvd19zdGFydCwgc2F2ZWRfaXRk YXRhX2Zvcl93aW5kb3dfc3RhcnQpOworICAgICAgICAgICAgbW92ZV9pdF90byAoJml0LCBwb3Np bnQsIGl0Lmxhc3RfdmlzaWJsZV94LCBpdC5sYXN0X3Zpc2libGVfeSAtIDEsIC0xLAorICAgICAg ICAgICAgICAgICAgICAgICAgTU9WRV9UT19QT1MgfCBNT1ZFX1RPX1ggfCBNT1ZFX1RPX1kpOwor ICAgICAgICAgICAgaWYgKElUX0NIQVJQT1MgKGl0KSA9PSBwb3NpbnQpCisgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICBtb3ZlX2l0X2J5X2xpbmVzICgmaXQsIDApOworICAgICAgICAg ICAgICAgIExpc3BfT2JqZWN0IGRpcmVjdGlvbiA9IGJ1aWxkX3N0cmluZyAoIk11bHRpcGxlIEN1 cnNvcnMiKTsKKyAgICAgICAgICAgICAgICBtY19tb3ZlX2l0ICgmaXQsIGRpcmVjdGlvbiwgc3Bl Y3MsICZyZXN1bHQpOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICB4ID0gLTE7CisgICAgICAgICAgICAgICAg ICB5ID0gLTE7CisgICAgICAgICAgICAgICAgICBocG9zID0gLTE7CisgICAgICAgICAgICAgICAg ICB2cG9zID0gLTE7CisgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kID0gbWNfYmFja2dyb3Vu ZCAoaXQudywgREVGQVVMVF9GQUNFX0lEKTsKKyAgICAgICAgICAgICAgICAgIGZsYXZvciA9IFFt Y19nbHlwaDsKKyAgICAgICAgICAgICAgICAgIHRlbl9lbGVtZW50cyA9IGxpc3RuIChDT05TVFlQ RV9IRUFQLCAxMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFr ZV9udW1iZXIgKHgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBt YWtlX251bWJlciAoeSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1ha2VfbnVtYmVyIChocG9zKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbWFrZV9udW1iZXIgKHZwb3MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtY19jdXJzb3JfdHlwZV90b19saXNwIChjdXJzb3JfdHlwZSksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChjdXJzb3Jfd2lk dGgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5k LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3IsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChwb3NpbnQpKTsK KyAgICAgICAgICAgICAgICAgIHRlbXAgPSBGY29ucyAoc3BlY3MsIEZjb25zICh0ZW5fZWxlbWVu dHMsIFFuaWwpKTsKKyAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IEZjb25zICh0ZW1wLCByZXN1 bHQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisvKiBgdy0+bWNfZ2x5cGhfY2Fj aGUnIGlzIHNldCBmb3IgdGhlIHdpbmRvdywgbm90IGJ1ZmZlcit3aW5kb3cgLS0gaS5lLiwgYWxs IGJ1ZmZlcnMgYXBwZWFyaW5nCitpbiB0aGUgc2FtZSB3aW5kb3cgdmlhIGBzd2l0Y2gtdG8tYnVm ZmVyJyB3aWxsIGhhdmUgYHctPm1jX2dseXBoX2NhY2hlJy4gIFRoaXMgYmVoYXZpb3IKK2lzIGNv bnNpc3RlbnQgd2l0aCBmdW5jdGlvbnMgc3VjaCBhcyBgc2V0LXdpbmRvdy1kaXNwbGF5LXRhYmxl Jy4gIFdlIGRlYWwgd2l0aCB0aGlzIGluCitgbnN0ZXJtLm0nIC8gYHczMnRlcm0uYycgLyBgeHRl cm0uYycgYnkgY29tcGFyaW5nIGB3LT5jb250ZW50cycgdG8gdGhlIHZhbHVlIG9mIHRoZSBgYnVm Jworc3RvcmVkIGluIGB3LT5tY19nbHlwaF9jYWNoZSc6ICAoRVEgKHctPmNvbnRlbnRzLCBYQ0FS IChGbnRoIChtYWtlX251bWJlciAoMiksIHctPm1jX2dseXBoX2NhY2hlKSkpKSAqLworICAgICAg ICBpZiAoIU5JTFAgKHJlc3VsdCkpCisgICAgICAgICAgd3NldF9tY19nbHlwaF9jYWNoZSAodywg bGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgQlZBUiAoYiwgbWNfZ2x5cGhfbGlzdCksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgRnJldmVyc2UgKHJlc3VsdCksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgRmNvbnMgKGJ1ZiwgUW5pbCkpKTsKKyAgICAgICAgdy0+bWMuZHJhd19nbHlw aF9jdXJzb3IgPSBmYWxzZTsKKyAgICAgIH0KKyAgYmlkaV91bnNoZWx2ZV9jYWNoZSAoaXRkYXRh LCBmYWxzZSk7Cit9CisKK3ZvaWQKK21jX2RyYXdfY3Jvc3NoYWlycyAoc3RydWN0IHdpbmRvdyAq dykKK3sKKyAgLyogRWxpIFouOiAgVGhpcyBkb2Vzbid0IGZlZWwgcmVsZXZhbnQuICBZb3UgY2Fu IGFsd2F5cyByZWRpc3BsYXkgYSB3aW5kb3cgdGhhdCBpcworICBub3QgdGhlIHNlbGVjdGVkIHdp bmRvdywgcHJvdmlkZWQgdGhhdCB5b3UgdGFrZSBjYXJlIHRvIHN3aXRjaCB0byBpdHMgYnVmZmVy CisgIChyZWRpc3BsYXkgZG9lcyB0aGF0IGFscmVhZHkpLiAqLworICBpZiAodyAhPSBYV0lORE9X IChzZWxlY3RlZF93aW5kb3cpKQorICAgIHJldHVybjsKKyAgLyogRWxpIFouOiAgSG93IGRpZCB5 b3UgZ2V0IGludG8gdGhpcyBzaXR1YXRpb24/ICBJdCBzaG91bGRuJ3QgaGFwcGVuIGR1cmluZyBy ZWRpc3BsYXkuICovCisgIGlmICghV0lORE9XX1ZBTElEX1AgKHNlbGVjdGVkX3dpbmRvdykpCisg ICAgcmV0dXJuOworICBzdHJ1Y3QgZnJhbWUgKmYgPS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vdWxkIG5ldmVyIGhhcHBlbi4g Ki8KKyAgYm9vbCBiYXJmX2NyYXNoX3R3byA9IChjaGFycG9zID09IEJZVEVfVE9fQ0hBUiAoYnl0 ZXBvcykpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgcmV0dXJu OworICBpZiAoIUJVRkZFUlAgKGJ1ZikpCisgICAgcmV0dXJuOworICBpZiAoTklMUCAoQlZBUiAo YiwgY3Jvc3NoYWlycykpKQorICAgIHJldHVybjsKKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3Nz aGFpcnNfaG9yaXpvbnRhbF9ydWxlcikpCisgICAgICAmJiBOSUxQIChCVkFSIChiLCBjcm9zc2hh aXJzX3ZlcnRpY2FsX3J1bGVyKSkpCisgICAgcmV0dXJuOworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVEFSVCBUSEUgVElNRVIKKyoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBjbG9ja190IHN0 YXJ0LCBlbmQ7CisgIGRvdWJsZSBjcHVfdGltZV91c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9C VUZTSVpFX0JPVU5EXTsKKyAgc3RhcnQgPSBjbG9jaygpOworI2VuZGlmCisqLworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTiBKT1VS TkVZIC4uLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioq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AgaW50IG9wb2ludF95 ID0gdy0+b3V0cHV0X2N1cnNvci55OworICBpbnQgb3BvaW50X2hwb3MgPSB3LT5vdXRwdXRfY3Vy c29yLmhwb3M7CisgIGludCBvcG9pbnRfdnBvcyA9IHctPm91dHB1dF9jdXJzb3IudnBvczsKKyAg cHRyZGlmZl90IGN1cnJlbnRfY29sID0gY3VycmVudF9jb2x1bW4gKCk7CisgIGJvb2wgZmlsbF9j b2x1bW5fcCA9ICFOSUxQIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBwdHJkaWZmX3QgZmls bF9jb2wgPSBYSU5UIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBMaXNwX09iamVjdCByZXN1 bHQgPSBRbmlsOworICBMaXNwX09iamVjdCBmbGF2b3IgPSBRbmlsOworICAvKiBWYWx1ZXMgZm9y IHRoZSBjdXJyZW50IGNvbHVtbiBvZiB0aGUgdmVydGljYWwgbGluZS4gKi8KKyAgTGlzcF9PYmpl Y3QgZm9yZWdyb3VuZCA9IEZtYWtlX3ZlY3RvciAobWFrZV9udW1iZXIgKDMpLCBRbmlsKTsKKyAg ZW51bSBmYWNlX2lkIGZhY2VfaWQ7CisgIHN0cnVjdCBnbHlwaCAqcGh5c19jdXJzb3JfZ2x5cGg7 CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Q09MT1IgT0YgQ1JPU1NIQUlSUworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGVudW0gZmFj ZV9pZCBldmVuX2ZhY2VfaWQgPQorICAgIGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLWV2ZW4tbnVtYmVyZWQtY29sdW1uLWZhY2UiKSwgdHJ1ZSk7CisgI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RFWF07CisgIENIRUNLX1NUUklO RyAoZmlsbF9jb2xvcik7CisgIExpc3BfT2JqZWN0IGZpbGxfY29sb3JfdmVjdG9yID0gbWNfY29s b3JfdmVjdG9yX2NhbGMgKHcsIGZpbGxfY29sb3IpOworICAvKiByZWQgKi8KKyAgaWYgKGN1cnJl bnRfY29sICUgMiAhPSAwCisgICAgICAmJiAhZmlsbF9jb2x1bW5fcCkKKyAgICBmb3JlZ3JvdW5k ID0gb2RkX2NvbG9yX3ZlY3RvcjsKKyAgLyogeWVsbG93ICovCisgIGlmIChjdXJyZW50X2NvbCAl IDIgPT0gMAorICAgICAgJiYgIWZpbGxfY29sdW1uX3ApCisgICAgZm9yZWdyb3VuZCA9IGV2ZW5f Y29sb3JfdmVjdG9yOworICAvKiByZWQgKi8KKyAgaWYgKGN1cnJlbnRfY29sICUgMiAhPSAwCisg ICAgICAmJiBmaWxsX2NvbHVtbl9wCisgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbCkK KyAgICBmb3JlZ3JvdW5kID0gb2RkX2NvbG9yX3ZlY3RvcjsKKyAgLyogeWVsbG93ICovCisgIGlm IChjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgJiYgZmlsbF9jb2x1bW5fcAorICAgICAgJiYg Y3VycmVudF9jb2wgPD0gZmlsbF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IGV2ZW5fY29sb3JfdmVj dG9yOworICAvKiBncmVlbiAqLworICBpZiAoZmlsbF9jb2x1bW5fcAorICAgICAgJiYgY3VycmVu dF9jb2wgPiBmaWxsX2NvbCkKKyAgICBmb3JlZ3JvdW5kID0gZmlsbF9jb2xvcl92ZWN0b3I7Cisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICBTVEFSVCBESVNQ TEFZIEFORCBQUklNRSBJVAorKioqKioqKioqKioqKioq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A9IGxhc3RfeDsKKyAgICAgIGl0LmxudW1fd2lkdGggPSBsbnVtX3dpZHRoOworICAg ICAgaXQubG51bV9waXhlbF93aWR0aCA9IGxudW1fcGl4ZWxfd2lkdGg7CisgICAgICBTQVZFX0lU IChzYXZlZF9pdF9mb3Jfd2luZG93X3N0YXJ0LCBpdCwgc2F2ZWRfaXRkYXRhX2Zvcl93aW5kb3df c3RhcnQpOworICAgIH0KKyAgLyogVGhpcyBtaWdodCBoYXBwZW4gb24gT1NYIDEwLjExIHdoZW4g cmVzdG9yaW5nIGRlc2t0b3AgYXQgdGhlIGJlZ2lubmluZworICBvZiBhIG5ldyBzZXNzaW9uPyAq LworICBpZiAoaXRfc3RhcnQgPiBvcG9pbnRfcHQpCisgICAgcmV0dXJuOworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICBFUkFTRSBUSEUgUkVBTCBD VVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYHctPnBoeXNfY3Vyc29yLngveS9o cG9zL3Zwb3NgIGFyZSBpbmNvcnJlY3QgYWZ0ZXIgZXZhbHVhdGluZyAoc2Nyb2xsLWxlZnQgMSkK K2EgY291cGxlIG9mIHRpbWVzLiAgUmVkaXNwbGF5IGVyYXNlcyB0aGUgcmVhbCBjdXJzb3IgYWxt b3N0IGltbWVkaWF0ZWx5IGFmdGVyCitgbWNfZHJhd19jcm9zc2hhaXJzJyBydW5zIGl0cyBjb3Vy c2UgLS0gYWxtb3N0IHRvbyBxdWlja2x5IHRvIHNlZSBpdCBoYXBwZW5pbmcuCitUaGUgY2hhcmFj dGVyIHdoZXJlIEVtYWNzIHRoaW5rcyB0aGUgcmVhbCBjdXJzb3IgaXMgbG9jYXRlZCBnZXRzI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c19jdXJzb3IgKHcpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAg ICAgICAgICAgIFJFUExBQ0UgVEhFIFJFQUwgQ1VSU09SCisqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKyAgZ2x5cGhfcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIG9wb2ludF92 cG9zKTsKKyAgaWYgKCFjdXJzb3JfaW5fZnJpbmdlX3ApCisgICAgZmxhdm9yID0gUW1jX2dseXBo OworICAgIC8qIFRoaXMgY29uZGl0aW9uIHByb2JhYmx5IGRvZXMgbm90IGV4aXN0IGZvciB0aGUg cmVhbCBmYWtlIGN1cnNvci4gKi8KKyAgICBlbHNlIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAg ICAgICAgICAgICAmJiBnbHlwaF9yb3ctPmNvbnRpbnVlZF9wKQorICAgICAgZmxhdm9yID0gUW1j X3BpbGNyb3c7CisgICAgICBlbHNlIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAg ICAgICYmIGdseXBoX3Jvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgIGZsYXZvciA9 IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2FuZ2xlOworICAgICAgICBlbHNlIGlmIChjdXJz b3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgJiYgIWdseXBoX3Jvdy0+Y29udGludWVk X3AKKyAgICAgICAgICAgICAgICAgJiYgIWdseXBoX3Jvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3Ap CisgICAgICAgICAgZmxhdm9yID0gUW1jX2hvbGxvd19yZWN0YW5nbGU7CisgIGZhY2VfaWQgPSAo KHBoeXNfY3Vyc29yX2dseXBoID0gZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3KSkgPT0gTlVMTCkK KyAgICAgICAgICAgICAgPyBERUZBVUxUX0ZBQ0VfSUQKKyAgICAgICAgICAgICAgOiBwaHlzX2N1 cnNvcl9nbHlwaC0+ZmFjZV9pZDsKKyAgbWNfY3Jvc3NoYWlyc19oZWxwZXIgKHcsIG9wb2ludF94 LCBvcG9pbnRfeSwgb3BvaW50X2hwb3MsIG9wb2ludF92cG9zLAorICAgICAgICAgICAgICAgICAg ICAgICAgSE9MTE9XX0JPWF9DVVJTT1IsIGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAgICAg ICAgICAgIGZvcmVncm91bmQsIG1jX2JhY2tncm91bmQgKHcsIGZhY2VfaWQpLAorICAgICAgICAg ICAgICAgICAgICAgICAgZmxhdm9yLCBvcG9pbnRfcHQsICZyZXN1bHQpOworICBtY19jcm9zc2hh aXJzX2hlbHBlciAodywgb3BvaW50X3gsIG9wb2ludF95LCBvcG9pbnRfaHBvcywgb3BvaW50X3Zw b3MsCisgICAgICAgICAgICAgICAgICAgICAgICBIT0xMT1dfQk9YX0NVUlNPUiwgY3Vyc29yX3dp ZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgbWNfYmFja2dyb3VuZCAo dywgZmFjZV9pZCksCisgICAgICAgICAgICAgICAgICAgICAgICBRb3ZlcmxheV9hcnJvd19iaXRt YXAsIG9wb2ludF9wdCwgJnJlc3VsdCk7CisgIGlmIChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJz X2hvcml6b250YWxfcnVsZXIpKSkKKyAgICBnb3RvIHZlcnRpY2FsX3J1bGVyOworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgSE9SSVpPTlRBTCBSVUxFUjogIEZJUlNU IFggPT4gRU9MCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZAorICAgICAgIEhP UklaT05UQUwgUlVMRVI6ICBEUkFXIEZMT0FUSU5HIEdMWVBITEVTUyBMSU5FIChFT0wgVE8gRlJJ TkdFKQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIC8qIFBsYWNlIHRoZSBJVCBvbiB0aGUg Y3VycmVudCBsaW5lIGNvbnRhaW5pbmcgUFQuICovCisgIGludCB2b2Zmc2V0ID0gKGhlYWRlcl9s aW5lX2hlaWdodCA+IDAKKyAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPiAwKQorICAg ICAgICAgICAgICAgICAgPyBvcG9pbnRfdnBvcyAtIDEKKyAgICAgICAgICAgICAgICAgIDogb3Bv aW50X3Zwb3M7CisgIGlmICh2b2Zmc2V0ID4gMCkKKyAgICBtb3ZlX2l0X2J5X2xpbmVzICgmaXQs IHZvZmZzZXQpOworICBtY19tb3ZlX2l0ICgmaXQsIGJ1aWxkX3N0cmluZyAoIkhvcml6b250YWwg UnVsZXIiKSwgZm9yZWdyb3VuZCwgJnJlc3VsdCk7CisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK KyAgICAgICAgICAgVkVSVElDQUwgUlVMRVI6ICBDT01CSU5BVElPTiBPRiBHTFlQSCAmIEdMWVBI TEVTUyBDVVJTT1JTCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgdmVydGljYWxfcnVsZXI6 CisgIGlmIChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkpCisgICAg Z290byBjcm9zc2hhaXJzX2ZpbmlzaDsKKyAgUkVTVE9SR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orICAgICAg ICBicmVhazsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgU0VUIFRIRSBDQUNIRQorKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisgIGNyb3NzaGFpcnNfZmluaXNoOgorICBpZiAoIU5JTFAgKHJlc3VsdCkpCisgICAgd3NldF9j cm9zc2hhaXJzX2NhY2hlICh3LCBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBGcmV2ZXJzZSAocmVzdWx0KSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBGY29ucyAoc2VsZWN0ZWRfd2luZG93LCBRbmlsKSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGY29ucyAoYnVmLCBRbmlsKSkp OworICB3LT5tYy5kcmF3X2Nyb3NzaGFpcnMgPSBmYWxzZTsKKyAgYmlkaV91bnNoZWx2ZV9jYWNo ZSAoaXRkYXRhLCBmYWxzZSk7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgU1RPUCBUSEUgVElNRVIKKyoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGlt ZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM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AobWFrZV9udW1iZXIgKDEpLCB0ZW5fZWxlbWVudHMpKTsKKyAgICAg IGhwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMiksIHRlbl9lbGVtZW50cykpOworICAg ICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgdGVuX2VsZW1lbnRzKSk7Cisg ICAgICBjdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKEZudGggKG1ha2VfbnVt YmVyICg0KSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICBjdXJzb3Jfd2lkdGggPSBYSU5UIChGbnRo IChtYWtlX251bWJlciAoNSksIHRlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZu dGggKG1ha2VfbnVtYmVyICg2KSwgdGVuX2VsZW1lbnRzKTsKKyAgICAgIGJhY2tncm91bmQgPSBG bnRoIChtYWtlX251bWJlciAoNyksIHRlbl9lbGVtZW50cyk7CisgICAgICBmbGF2b3IgPSBGbnRo IChtYWtlX251bWJlciAoOCksIHRlbl9lbGVtZW50cyk7CisgICAgICBwb3MgPSBYSU5UIChGbnRo IChtYWtlX251bWJlciAoOSksIHRlbl9lbGVtZW50cykpOworICAgICAgbWNfZHJhd19lcmFzZV9o eWJyaWQgKHcsIHgsIHksIGhwb3MsIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZv cmVncm91bmQsIGZsYXZvcik7CisgICAgfQorLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQg PSBjbG9jaygpOworICBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8g Q0xPQ0tTX1BFUl9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAs IDAsIGNwdV90aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfcmVkcmF3X2Ny b3N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Jhc2VfZ2x5cGhfY3Vyc29yICh3LCB3LT5waHlzX2N1cnNvci54 LCB3LT5waHlzX2N1cnNvci55LCB3LT5waHlzX2N1cnNvci5ocG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MsIHctPnBoeXNfY3Vyc29yX3R5cGUpOworICBm b3IgKHZsaXN0ID0gWENBUiAody0+Y3Jvc3NoYWlyc19jYWNoZSk7CisgICAgICAgQ09OU1AgKHZs aXN0KTsKKyAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICB7CisgICAgICB0ZW5fZWxl bWVudHMgPSBYQ0FSICh2bGlzdCk7CisgICAgICB4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIg KDApLCB0ZW5fZWxlbWVudHMpKTsKKyAgICAgIHkgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAo MSksIHRlbl9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICgyKSwgdGVuX2VsZW1lbnRzKSk7CisgICAgICB2cG9zID0gWElOVCAoRm50aCAobWFrZV9udW1i ZXIgKDMpLCB0ZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19j dXJzb3JfdHlwZSAoRm50aCAobWFrZV9udW1iZXIgKDQpLCB0ZW5fZWxlbWVudHMpKTsKKyAgICAg IGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwgdGVuX2VsZW1lbnRz KSk7CisgICAgICBmb3JlZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDYpLCB0ZW5fZWxlbWVu dHMpOworICAgICAgYmFja2dyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICg3KSwgdGVuX2VsZW1l bnRzKTsKKyAgICAgIGZsYXZvciA9IEZudGggKG1ha2VfbnVtYmVyICg4KSwgdGVuX2VsZW1lbnRz KTsKKyAgICAgIHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg5KSwgdGVuX2VsZW1lbnRz KSk7CisgICAgICBpZiAoRVEgKGZsYXZvciwgUW1jX2dseXBoKSkKKyAgICAgICAgbWNfZXJhc2Vf Z2x5cGhfY3Vyc29yICh3LCB4LCB5LCBocG9zLCB2cG9zLCBjdXJzb3JfdHlwZSk7CisgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoRVEgKGZsYXZvciwgUW92 ZXJsYXlfYXJyb3dfYml0bWFwKQorICAgICAgICAgICAgICAgICAgfHwgRVEgKGZsYXZvciwgUW1j X2hvbGxvd19yZWN0YW5nbGVfcmlnaHRfYW5nbGUpCisgICAgICAgICAgICAgICAgICB8fCBFUSAo Zmxhdm9yLCBRbWNfaG9sbG93X3JlY3RhbmdsZSkKKyAgICAgICAgICAgICAgICAgIHx8IEVRIChm bGF2b3IsIFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYW5nbGUpCisgICAgICAgICAgICAgICAgICB8 fCBFUSAoZmxhdm9yLCBRbWNfdmVydGljYWxfYmFyKQorICAgICAgICAgICAgICAgICAgfHwgRVEg KGZsYXZvciwgUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2gpKQorICAgICAgICAgICAgICAgIGN1 cnNvcl90eXBlID0gTk9fQ1VSU09SOworICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJp ZCAodywgeCwgeSwgaHBvcywgdnBvcywgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgYmFja2dy b3VuZCwgZmxhdm9yKTsKKyAgICAgICAgICAgIH0KKyAgICB9CisgIGlmIChkZWxldGVfY2FjaGUp CisgICAgd3NldF9jcm9zc2hhaXJzX2NhY2hlICh3LCBRbmlsKTsKKyAgdy0+bWMuZXJhc2VfY3Jv c3NoYWlycyA9IGZhbHNlOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygp OworICBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BF Ul9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90 aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZXJhc2VfY3Jvc3NoYWlyczog IFRJTUUgKCVzKSIsIGJ1Zl90aW1lKTsKKyNlbmRpZgorKi8KK30KKwordm9pZAorbWNfcG9ydGFs IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGN1cnNvcl9vbl9wKQoreworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRSBDVVJTT1JT CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgaWYgKCFNSU5JX1dJTkRPV19QICh3KQorICAg ICAgJiYgdy0+bWMuZXJhc2VfZ2x5cGhfY3Vyc29yCisgICAgICAmJiAhTklMUCAody0+bWNfZ2x5 cGhfY2FjaGUpCisgICAgICAmJiBFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVt YmVyICgyKSwgdy0+bWNfZ2x5cGhfY2FjaGUpKSkpCisgICAgbWNfY2FsYyAodywgMSk7CisgIGlm ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAgICAgICYmIFdJTkRPV19WQUxJRF9Q IChzZWxlY3RlZF93aW5kb3cpCisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYm IHctPm1jLmRyYXdfZ2x5cGhfY3Vyc29yCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBtY19nbHlwaF9saXN0KSkpCisgICAgLyogRHJhdyBmYWtlIGN1cnNvcnMg Ki8KKyAgICBtY19jYWxjICh3LCAwKTsKKyAgICAvKiBGaXJzdCBhdHRlbXB0IGF0IGRlYWxpbmcg d2l0aCBhIGByZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhJyBzaXR1YXRpb24uICovCisgICAg ZWxzZSBpZiAoIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAgICAgICAgJiYgIXctPm1jLmRyYXdf Z2x5cGhfY3Vyc29yCisgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgbWNfZ2x5cGhfbGlzdCkpCisgICAgICAgICAgICAgJiYgIU5JTFAgKHctPm1jX2ds eXBoX2NhY2hlKQorICAgICAgICAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAo bWFrZV9udW1iZXIgKDIpLCB3LT5tY19nbHlwaF9jYWNoZSkpKSkKKyAgICAgIHsKKyAgICAgICAg LyogUmVtb3ZlIGZha2UgY3Vyc29ycy4gKi8KKyAgICAgICAgbWNfY2FsYyAodywgMSk7CisgICAg ICAgIC8qIERyYXcgZmFrZSBjdXJzb3JzICovCisgICAgICAgIG1jX2NhbGMgKHcsIDApOworICAg ICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBDUk9TU0hBSVJTCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgLyogUmVtb3ZlIGNy b3NzaGFpcnMgYW5kIGRlbGV0ZSB0aGUgY2FjaGUsIGJ1dCBPTkxZIGlmIHdlIHBsYW4gb24gcmVk cmF3aW5nIHRoZW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gY3Jv c3NoYWlycykpCisgICAgICAgICAgICAgJiYgdyA9PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtl X251bWJlciAoMSksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkKKyAgICAgICAgICAgICAmJiBFUSAo dy0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgdy0+Y3Jvc3NoYWlyc19j YWNoZSkpKSkKKyAgICAgIHsKKyAgICAgICAgLyogUmVtb3ZlIGNyb3NzaGFpcnMsIGJ1dCBkbyBO T1QgZGVsZXRlIHRoZSBjYWNoZS4gKi8KKyAgICAgICAgbWNfZXJhc2VfY3Jvc3NoYWlycyAodywg ZmFsc2UpOworICAgICAgICAvKiBSZWRyYXcgdGhlIGNyb3NzaGFpcnMgdXNpbmcgdGhlIGNhY2hl LiAqLworICAgICAgICBtY19yZWRyYXdfY3Jvc3NoYWlycyAodyk7CisgICAgICB9CisgICAgICAv KiBDQVRDSEFMTDogIERSQVcgVEhFIFJFQUwgQ1VSU09SIChtYXliZSkhICovCisgICAgICBlbHNl IGlmIChjdXJzb3Jfb25fcCkKKyAgICAgICAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAodywgdHJ1 ZSwgdy0+b3V0cHV0X2N1cnNvci5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLnZwb3MsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHctPm91dHB1dF9jdXJzb3IueCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdy0+b3V0cHV0X2N1cnNvci55KTsKK30KKwordm9pZAor bWNfcmVjb3JkX3hfd3N0YXJ0X3dlbmQgKHN0cnVjdCB3aW5kb3cgKncpCit7CisgIC8qIFJlY29y ZCBwcmlvciB2YWx1ZXMgZm9yIGN1cnNvciBYLCB3aW5kb3ctc3RhcnQgYW5kIHdpb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WN0 aXZhdGVfY3Vyc29ycycgaW4gYGtleWJvYXJkLmMnIGlzIG5vdCBjYWxsZWQuCitUaGVyZSBhcmUg YWxzbyBzb21lIG90aGVyIGNpcmN1bXN0YW5jZXMgd2hlcmUgYG1jLWFjdGl2YXRlLWN1cnNvcnMn IGlzIGhlbHBmdWwuICovKQorICAoTGlzcF9PYmplY3Qgd2luZG93KQoreworICBzdHJ1Y3Qgd2lu ZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93ICh3aW5kb3cpOworICB3LT5tYy5kcmF3X2dseXBo X2N1cnNvciA9IHRydWU7CisgIHctPm1jLmVyYXNlX2dseXBoX2N1cnNvciA9IHRydWU7CisgIHJl dHVybiBRbmlsOworfQorCisvKiAgKGZ1bmRhbWVudGFsLW1vZGUpCisgICAgKHNldHEgZGlzcGxh eS1saW5lLW51bWJlcnMgdCkKKyAgICAoc2V0cSBidWZmZXItZGlzcGxheS10YWJsZSAobWFrZS1k aXNwbGF5LXRhYmxlKSkKKyAgICAoYXNldCBidWZmZXItZGlzcGxheS10YWJsZQorICAgICAgICAg ID9cdAorICAgICAgICAgICh2ZWN0b3IgKG1ha2UtZ2x5cGgtY29kZSA/XHUwMEJCICdmb250LWxv Y2std2FybmluZy1mYWNlKQorICAgICAgICAgICAgICAgICAgKG1ha2UtZ2x5cGgtY29kZSA/XHQg J2hpZ2hsaWdodCkpKQorICAgIChhc2V0IGJ1ZmZlci1kaXNwbGF5LXRhYmxlCisgICAgICAgICAg P1xuCisgICAgICAgICAgKHZlY3RvciAobWFrZS1nbHlwaC1jb2RlID9cdTAwQjYgJ2ZvbnQtbG9j ay1jb21tZW50LWZhY2UpCisgICAgICAgICAgICAgICAgICA/XG4pKQorICAgIChzZXRxIHRhYi13 aWR0aCA4KQorICAgIChzZXRxLWxvY2FsIGF1dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUp ICovCisKK0RFRlVOICgiZGVidWdnaW5nIiwgRmRlYnVnZ2luZywgU2RlYnVnZ2luZywgMCwgMCwg MCwKKyAgICAgICBkb2M6IC8qIFRoaXMgaXMgYW4gZXhhbXBsZSBmdW5jdGlvbiB1c2VkIGZvciBk ZWJ1Z2dpbmcuICovKQorICAodm9pZCkKK3sKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAg ICAgICAgICAgICAgICAgICAgIFBSRUxJTUlOQVJZIFNUVUZGCisqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKyAgc3RydWN0IHdpbmRvdyAqdyA9IGRlY29kZV9saXZlX3dpbmRvdyAoc2VsZWN0ZWRf d2luZG93KTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIHN0cnVj dCBpdCBpdDsKKyAgdm9pZCAqaXRkYXRhID0gYmlkaV9zaGVsdmVfY2FjaGUgKCk7CisgIGVudW0g bW92ZV9pdF9yZXN1bHQgcmMgPSBNT1ZFX1hfUkVBQ0hFRDsKKyAgc3RydWN0IHRleHRfcG9zIHN0 YXJ0X3RleHRfcG9zaXRpb247CisgIGludCBjb3VudCA9IDA7CisgIGludCBuZXdfeCA9IDA7Cisg IGludCByZWxhdGl2ZV94ID0gMDsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAg ICAgICAgICAgICAgIFNUQVJUIERJU1BMQVkgLS0gdy0+c3RhcnQKKyoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworICAvKiBCZWdpbiB0aGUgam91cm5leSBhdCB3LT5zdGFydC4gKi8KKyAgU0VUX1RF WFRfUE9TX0ZST01fTUFSS0VSIChzdGFydF90ZXh0X3Bvc2l0aW9uLCB3LT5zdGFydCk7CisgIHN0 YXJ0X2Rpc3BsYXkgKCZpdCwgdywgc3RhcnRfdGV4dF9wb3NpdGlvbik7CisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKKyAgICAgICAgICAgICAgICBHTyBUTyBUSEUgQkVHSU5OSU5HIE9GIFRIRSBD VVJSRU5UIExJTkUuCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgLyogUGxhY2UgdGhlIElU IG9uIHRoZSBjdXJyZW50IGxpbmUgY29udGFpbmluZyBQVC4gKi8KKyAgaW50IHZvZmZzZXQgPSAo V0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodykgPiAwCisgICAgICAgICAgICAgICAgICYmIHct Pm91dHB1dF9jdXJzb3IudnBvcyA+IDApCisgICAgICAgICAgICAgICAgICA/IHctPm91dHB1dF9j dXJzb3IudnBvcyAtIDEKKyAgICAgICAgICAgICAgICAgIDogdy0+b3V0cHV0X2N1cnNvci52cG9z OworICBpZiAodm9mZnNldCA+IDApCisgICAgbW92ZV9pdF9ieV9saW5lcyAoJml0LCB2b2Zmc2V0 KTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgIE1PVkUgSVQgT1ZFUiBF QUNIIENIQVJBQ1RFUiBPTiBUSEUgQ1VSUkVOVCBMSU5FLgorKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisgIHdoaWxlICh0cnVlKQorICAgIHsKKyAgICAgIGNvdW50ICs9IDE7CisgICAgICBpZiAo bmV3X3ggPiAwKQorICAgICAgICByZWxhdGl2ZV94ID0gbmV3X3ggLSBpdC5maXJzdF92aXNpYmxl X3g7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgRFVN UCBSRUxFVkFOVCBHTFlQSCBJTkZPUk1BVElPTgorKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisg IGludCB3X2hzY3JvbGwgPSBpdC53LT5oc2Nyb2xsOworICBpbnQgd19taW5faHNjcm9sbCA9IGl0 LnctPm1pbl9oc2Nyb2xsOworICBpbnQgaXRfY2hhcnBvcyA9IElUX0NIQVJQT1MgKGl0KTsKKyAg aW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBzdHJ1Y3Qg ZmFjZSAqZmFjZSA9IG1jX2xvb2t1cF9mYWNlICgmaXQpOworICBzdHJ1Y3QgZm9udCAqZm9udCA9 IGZhY2UtPmZvbnQ7CisgIGludCBmb250X3NwYWNlX3dpZHRoID0gKGZvbnQgPT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICA/IGZyYW1lX2NoYXJfd2lkdGgKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBmb250LT5zcGFjZV93aWR0aCk7CisgIExpc3BfT2JqZWN0IGZvcmVncm91 bmRfZmFjZSA9IGZhY2UtPmxmYWNlW0xGQUNFX0ZPUkVHUk9VTkRfSU5ERVhdOworICBMaXNwX09i amVjdCBiYWNrZ3JvdW5kX2ZhY2UgPSBmYWNlLT5sZmFjZVtMRkFDRV9CQUNLR1JPVU5EX0lOREVY XTsKKyAgTGlzcF9PYmplY3QgYnVmID0gaXQudy0+Y29udGVudHM7CisgIGJvb2wgaHNjbCA9ICgh aXQudy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICYmIEVRIChGYnVmZmVy X2xvY2FsX3ZhbHVlIChRYXV0b19oc2Nyb2xsX21vZGUsIGJ1ZiksIFFjdXJyZW50X2xpbmUpCisg ICAgICAgICAgICAgICAmJiBpdC53LT5oc2Nyb2xsID4gMCk7CisgIGZwcmludGYgKHN0ZGVyciwg IlxuJWQuICAlcyVzXG5cCisgICAgaXQuYyAoJWQpXG5cCisgICAgZmV0Y2hfYnl0ZSAoJWQpXG5c CisgICAgY2hhcmFjdGVyICglcylcblwKKyAgICBJVF9DSEFSUE9TICglZClcblwKKyAgICB3LT5o c2Nyb2xsICglZClcblwKKyAgICBoc2NsICglcylcblwKKyAgICB3LT5taW5faHNjcm9sbCAoJWQp XG5cCisgICAgaXQuaHBvcyAoJWQpXG5cCisgICAgaXQudnBvcyAoJWQpXG5cCisgICAgaXQuY3Vy cmVudF94ICglZClcblwKKyAgICBuZXdfeCAoJWQpXG5cCisgICAgZm9udC0+c3BhY2Vfd2lkdGgg KCVkKVxuXAorICAgIGl0LmxudW1fcGl4ZWxfd2lkdGggKCVkKVxuXAorICAgIGl0LmxudW1fd2lk dGggKCVkKVxuXAorICAgIGl0LmZpcnN0X3Zpc2libGVfeCAoJWQpXG5cCisgICAgcmVsYXRpdmVf eCAoJWQpXG5cCisgICAgaXQuZmFjZV9pZCAoJWQpXG5cCisgICAgZm9yZWdyb3VuZF9mYWNlICgl cylcblwKKyAgICBiYWNrZ3JvdW5kX2ZhY2UgKCVzKVxuXAorICAgIHJjICglcylcbiIsCisgICAg ICBjb3VudCwKKyAgICAgIChpdC5jID09IDAKKyAgICAgICAgPyAiTk9USElORyIKKyAgICAgICAg OiBpdC5jID09IDE4NworICAgICAgICAgID8gIlRBQiBDSEFSQUNURVIiCisgICAgICAgIDogaXQu YyA9PSAnXHQnCisgICAgICAgICAgPyAiVEFCIFNUUkVUQ0giCisgICAgICAgIDogIlRFWFQiKSwK KyAgICAgIChyZWx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CisgICAgICBpdC5s bnVtX3BpeGVsX3dpZHRoLAorICAgICAgaXQubG51bV93aWR0aCwKKyAgICAgIGl0LmZpcnN0X3Zp c2libGVfeCwKKyAgICAgIHJlbGF0aXZlX3gsCisgICAgICBpdC5mYWNlX2lkLAorICAgICAgKCFO SUxQIChmb3JlZ3JvdW5kX2ZhY2UpCisgICAgICAgID8gU1NEQVRBIChmb3JlZ3JvdW5kX2ZhY2Up CisgICAgICAgIDogIk5JTFAgZm9yZWdyb3VuZF9mYWNlIiksCisgICAgICAoIU5JTFAgKGJhY2tn cm91bmRfZmFjZSkKKyAgICAgICAgPyBTU0RBVEEgKGJhY2tncm91bmRfZmFjZSkKKyAgICAgICAg OiAiTklMUCBiYWNrZ3JvdW5kX2ZhY2UiKSwKKyAgICAgIChyYyA9PSBNT1ZFX1VOREVGSU5FRAor ICAgICAgICA/ICJNT1ZFX1VOREVGSU5FRCIKKyAgICAgICAgOiByYyA9PSBNT1ZFX1BPU19NQVRD SF9PUl9aVgorICAgICAgICAgID8gIk1PVkVfUE9TX01BVENIX09SX1pWIgorICAgICAgICA6IHJj ID09IE1PVkVfWF9SRUFDSEVECisgICAgICAgICAgPyAiTU9WRV9YX1JFQUNIRUQiCisgICAgICAg IDogcmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRAorICAgICAgICAgID8gIk1PVkVfTElORV9DT05U SU5VRUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9MSU5FX1RSVU5DQVRFRAorICAgICAgICAgID8g Ik1PVkVfTElORV9UUlVOQ0FURUQiCisgICAgICAgIDogcmMgPT0gTU9WRV9ORVdMSU5FX09SX0NS CisgICAgICAgICAgPyAiTU9WRV9ORVdMSU5FX09SX0NSIgorICAgICAgICA6ICJPT1BTIikpOwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgIE1PVkUgSVQ6 ICBJTkNSRU1FTlQgPT0gRk9OVC5TUEFDRV9XSURUSAorKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisgICAgICBpZiAoKEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKGl0KSkgPT0gJ1xuJworICAgICAg ICAgICAmJiBpdC5jICE9IDApCisgICAgICAgICAgLyogfHwgSVRFUkFUT1JfQVRfRU5EX09GX0xJ TkVfUCAoJml0KSAqLworICAgICAgICAgIHx8IHJjID09IE1PVkVfUE9TX01BVENIX09SX1pWKQor ICAgICAgICBicmVhazsKKyAgICAgIG5ld194ICs9IGZvbnRfc3BhY2Vfd2lkdGg7CisgICAgICBy YyA9IG1vdmVfaXRfaW5fZGlzcGxheV9saW5lX3RvICgmaXQsIFpWLCBuZXdfeCwgTU9WRV9UT19Q T1MgfCBNT1ZFX1RPX1gpOworICAgICAgaWYgKHJjID09IE1PVkVfTElORV9DT05USU5VRUQpCisg ICAgICAgIGJyZWFrOworICAgICAgaWYgKGl0LmN1cnJlbnRfeCAtIGl0LmZpcnN0X3Zpc2libGVf eCArIGZvbnRfc3BhY2Vfd2lkdGggPj0KKyAgICAgICAgICB3aW5kb3dfYm94X3dpZHRoICh3LCBU RVhUX0FSRUEpKQorICAgICAgICBicmVhazsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioKKyAgICAgICAgICAgICAgICAgICAgICAgICBSRURJU1BMQVkgQU5EIERVTVBfR0xQWUhfUk9X CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgcmVkaXNwbGF5X2ludGVybmFsICgpOworICBp bnQgdnBvcyA9IChXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUIChpdC53KSA+IDApCisgICAgICAg ICAgICAgPyBpdC52cG9zICsgMQorICAgICAgICAgICAgIDogaXQudnBvczsKKyAgc3RydWN0IGds eXBoX3JvdyAqZ2x5cGhfcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIHZwb3Mp OworICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOworICBkdW1wX2dseXBoX3JvdyAoZ2x5cGhfcm93 LCB2cG9zLCAyKTsKKyAgYmlkaV91bnNoZWx2ZV9jYWNoZSAoaXRkYXRhLCBmYWxzZSk7CisgIHJl dHVybiBRbmlsOworfQorCisvKiBFTkQgbXVsdGlwbGUgY3Vyc29ycyAqLworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogDAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAJCSAgICAgIFdpbmRvdyBkaXNw bGF5IGRpbWVuc2lvbnMKQEAgLTEzNjc3LDIwICsxNjAwMywzNiBAQCBvdmVybGF5X2Fycm93c19j aGFuZ2VkX3AgKGJvb2wgc2V0X3JlZGlzcGxheSkKIAkJRmdldCAodmFyLCBRbGFzdF9hcnJvd19w b3NpdGlvbikpCiAJICB8fCAhIChwc3RyID0gb3ZlcmxheV9hcnJvd19zdHJpbmdfb3JfcHJvcGVy dHkgKHZhciksCiAJCUVRIChwc3RyLCBGZ2V0ICh2YXIsIFFsYXN0X2Fycm93X3N0cmluZykpKSkK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKwor LyogQGxhd2xpc3QgYWRkZWQgY2hlY2tzIGZvciBhIHZhbGlkIG1hcmtlciBhbmQgYSBsaXZlIGJ1 ZmZ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AgICB9CiAgIHJldHVybiBjaGFuZ2VkOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIC8qIE1hcmsgb3ZlcmxheSBhcnJvd3Mg dG8gYmUgdXBkYXRlZCBvbiBuZXh0IHJlZGlzcGxheS4gICovCkBAIC0xNDI4MSw2ICsxNjYyMywy MSBAQCByZWRpc3BsYXlfaW50ZXJuYWwgKHZvaWQpCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVN CiAJICAgICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBmYWxzZSk7CiAjZW5kaWYKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKworLyogTk9U RTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2VyIGBy ZWRpc3BsYXlfd2luZG93Jy4KK2BvcHRpbWl6YXRpb24gMWAgKHdoaWNoIGluY2x1ZGVzIGxlZnQv cmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4KK2xpbmUpLCBhbmQgYG9w dGltaXphdGlvbiAzYCAod2hpY2ggaW5jbHVkZXMgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQg b24gc2NyZWVuCitsaW5lcyBzdWJzZXF1ZW50IHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSksIGJ5 cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgICAgIG1jX3JlbW92ZV9ldmVyeXRoaW5n ICh3KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIGdvdG8gdXBkYXRl OwogCSAgICB9CiAJICBlbHNlCkBAIC0xNDMwMyw2ICsxNjY2MCwxNiBAQCByZWRpc3BsYXlfaW50 ZXJuYWwgKHZvaWQpCiAJCSAgJiYgKHcgPSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpKSAhPSBz dykKIAkJZ290byByZXRyeTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRp cGxlIGN1cnNvcnMgKi8KKworICAgICAgIGlmIChtY193aXRob3V0X3VwZGF0ZV9mcmFtZSAodykp CisgICAgICAgICBnb3RvIGVuZF9vZl9yZWRpc3BsYXk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIAkgICAgICAvKiBXZSB1c2VkIHRvIGFsd2F5cyBnb3RvIGVuZF9vZl9yZWRpc3Bs YXkgaGVyZSwgYnV0IHRoaXMKIAkJIGlzbid0IGVub3VnaCBpZiB3ZSBoYXZlIGEgYmxpbmtpbmcg Y3Vyc29yLiAgKi8KIAkgICAgICBpZiAody0+Y3Vyc29yX29mZl9wID09IHctPmxhc3RfY3Vyc29y X29mZl9wKQpAQCAtMTQzNDQsNiArMTY3MTEsMjEgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lk KQogCQkgICp3LT5kZXNpcmVkX21hdHJpeC0+bWV0aG9kID0gMDsKIAkJICBkZWJ1Z19tZXRob2Rf YWRkICh3LCAib3B0aW1pemF0aW9uIDMiKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAqLworCisvKiBOT1RFOiAg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ZWQuICBUaGlzIG1heSBoYXZlCisgICAgYmVlbiBkdWUgdG8g dGhlIHBhcmVudGhlc2VzIG92ZXJsYXlzIHRoYXQgd2VyZSByZW1vdmVkIGFuZCBkaWQgbm90IG5l ZWQgdG8gYmUKKyAgICByZWRyYXduIHNpbmNlIG9wZW5pbmcgcGFyZW50aGVzZXMgYXQgdGhlIGJl Z2lubmluZyBvZiB0aGUgYnVmZmVyIGFyZSBub3QgaGlnaGxpZ2h0ZWQuICovCisgICAgaWYgKHct Pm1jLmRyYXdfY3Jvc3NoYWlycykKKyAgICAgIHctPm11c3RfYmVfdXBkYXRlZF9wID0gdHJ1ZTsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCQkgIHBlbmRpbmcgfD0gdXBkYXRlX2Zy YW1lIChmLCBmYWxzZSwgZmFsc2UpOwogCQkgIGYtPmN1cnNvcl90eXBlX2NoYW5nZWQgPSBmYWxz ZTsKIAkJICBmLT51cGRhdGVkX3AgPSB0cnVlOwpAQCAtMTY2NTgsNiArMTkwNTQsMTggQEAgcmVk aXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3RfdGhpc19vbmVfcCkK ICAgYm9vbCB1c2VfZGVzaXJlZF9tYXRyaXg7CiAgIHZvaWQgKml0ZGF0YSA9IE5VTEw7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBGZWF0dXJlIFJlcXVlc3QgIyAxNjQ3NQorICAg UmVtb3ZlIHZlcnRpY2FsIHNjcm9sbCBiYXIgYXV0b21hdGljYWxseSB3aGVuIG5vdCBuZWVkZWQu ICovCisKKyAgcHRyZGlmZl90IGJvYl9kaXNyZWdhcmRfbmFycm93LCBlb2JfZGlzcmVnYXJkX25h cnJvdywgYm9iX3Jlc3BlY3RfbmFycm93LAorICAgICAgICAgICAgZW9iX3Jlc3BlY3RfbmFycm93 LCB3aW5kb3dfc3RhcnQsIHdpbmRvd19lbmQsIGJ1ZmZlcl9zaXplLCBidWZmZXJfbmFycm93ZWRf cDsKKyAgYm9vbCB3aW5kb3dfY29udGVudHNfdmlzaWJsZV9wOworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgIFNFVF9URVhUX1BPUyAobHBvaW50LCBQVCwgUFRfQllURSk7CiAgIG9w b2ludCA9IGxwb2ludDsKIApAQCAtMTc2ODksNiArMjAxMzMsMjIgQEAgcmVkaXNwbGF5X3dpbmRv dyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3RfdGhpc19vbmVfcCkKICAgZWxzZQogICAg IFRFTVBfU0VUX1BUX0JPVEggKENIQVJQT1MgKG9wb2ludCksIEJZVEVQT1MgKG9wb2ludCkpOwog CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAqLworCisv KiBOT1RFOiAgQW4gaWRsZS10aW1lciBmdW5jdGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdn ZXIgYHJlZGlzcGxheV93aW5kb3cnLgorYG9wdGltaXphdGlvbiAxYCAod2hpY2ggaW5jbHVkZXMg bGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbgorbGluZSksIGFu ZCBgb3B0aW1pemF0aW9uIDNgICh3aGljaCBpbmNsdWRlcyBsZWZ0L3JpZ2h0IGN1cnNvciBtb3Zl bWVudCBvbiBzY3JlZW4KK2xpbmVzIHN1YnNlcXVlbnQgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5l KSwgYnlwYXNzIGByZWRpc3BsYXlfd2luZG93Jy4gKi8KKworICBtY19yZWNvcmRfeF93c3RhcnRf d2VuZCAodyk7CisKKyAgbWNfcmVtb3ZlX2V2ZXJ5dGhpbmcgKHcpOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgIHNldF9idWZmZXJfaW50ZXJuYWxfMSAob2xkKTsKICAgLyogQXZv aWQgYW4gYWJvcnQgaW4gVEVNUF9TRVRfUFRfQk9USCBpZiB0aGUgYnVmZmVyIGhhcyBiZWNvbWUK ICAgICAgc2hvcnRlci4gIFRoaXMgY2FuIGJlIGNhdXNlZCBieSBsb2cgdHJ1bmNhdGlvbiBpbiAq TWVzc2FnZXMqLiAgKi8KQEAgLTIxMDQxLDYgKzIzNTAxLDIxIEBAIGRpc3BsYXlfY291bnRfbGlu ZXNfdmlzdWFsbHkgKHN0cnVjdCBpdCAqaXQpCiBzdGF0aWMgdm9pZAogbWF5YmVfcHJvZHVjZV9s aW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8KKworICBib29sIGJhcmZfY3Jhc2ggPSAoaXQtPmds eXBoX3JvdyA9PSBOVUxMCisgICAgICAgICAgICAgICAgICAgICB8fCBpdC0+Z2x5cGhfcm93LT51 c2VkW1RFWFRfQVJFQV0gPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQorICAgICAg ICAgICAgICAgICAgICA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoKQorICAgcmV0dXJuOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHB0cmRpZmZfdCBsYXN0X2xpbmUgPSBpdC0+ bG51bTsKICAgcHRyZGlmZl90IHN0YXJ0X2Zyb20sIGJ5dGVwb3M7CiAgIHB0cmRpZmZfdCB0aGlz X2xpbmU7CkBAIC0yOTY5Miw5ICszMjE4OCwyMSBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yIChz dHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLAogICAgICAgdy0+cGh5c19jdXJzb3IudnBvcyA9IHZw b3M7CiAgICAgfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vy c29ycyAqLworCisgIExpc3BfT2JqZWN0IGNvbG9yX3ZlY3RvciA9IChGbWFrZV92ZWN0b3IgKG1h a2VfbnVtYmVyICgzKSwgUW5pbCkpOworICBBU0VUIChjb2xvcl92ZWN0b3IsIDAsIG1ha2VfZmxv YXQgKC0xLjApKTsKKyAgQVNFVCAoY29sb3JfdmVjdG9yLCAxLCBtYWtlX2Zsb2F0ICgtMS4wKSk7 CisgIEFTRVQgKGNvbG9yX3ZlY3RvciwgMiwgbWFrZV9mbG9hdCAoLTEuMCkpOwogICBGUkFNRV9S SUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGdseXBoX3JvdywgeCwgeSwKICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY3Vyc29yX3R5cGUsIG5ld19jdXJzb3Jf d2lkdGgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb24sIGFjdGl2ZV9j dXJzb3IpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uLCBhY3RpdmVf Y3Vyc29yLCBjb2xvcl92ZWN0b3IsIFFuaWwpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiB9CiAKIApAQCAtMjk3MjYsMTAgKzMyMjM0LDMwIEBAIHVwZGF0ZV93aW5kb3dfY3Vyc29y IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uKQogICAgICAgaWYgKHJvdy0+cmV2ZXJzZWRfcCAm JiBocG9zID49IHJvdy0+dXNlZFtURVhUX0FSRUFdKQogCWhwb3MgPSByb3ctPnVzZWRbVEVYVF9B UkVBXSAtIDE7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBtdWx0aXBsZSBjdXJz b3JzICovCisKKyAgICAgIC8qIE1vdmluZyB0aGUgbW91c2UgdHJpZ2dlcnMgYHVwZGF0ZV93aW5k b3dfY3Vyc29yJyB3aGljaCBjYWxscworICAgICAgYGRpc3BsYXlfYW5kX3NldF9jdXJzb3InIHRo YXQgd291bGQgb3RoZXJ3aXNlIHJlbW92ZSBhIHBvcnRpb24gb2YgdGhlCisgICAgICBob3Jpem9u dGFsIHJ1bGVyIGZyb20gcG9pbnQgYXQgZW5kIG9mIHZpc3VhbCBsaW5lIHRvIHdpbmRvdyBlZGdl LiAqLworICAgICAgYm9vbCBjcm9zc2hhaXJzX3AgPSAoIU1JTklfV0lORE9XX1AgKHcpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZHJhd19jcm9zc2hhaXJzCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAody0+Y3Jvc3NoYWlyc19jYWNoZSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdyA9PSBYV0lO RE9XIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50 aCAobWFrZV9udW1iZXIgKDIpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpKTsKKyAgICAgIGlmICgh Y3Jvc3NoYWlyc19wKQorICAgICAgICB7CiAgICAgICBibG9ja19pbnB1dCAoKTsKICAgICAgIGRp c3BsYXlfYW5kX3NldF9jdXJzb3IgKHcsIG9uLCBocG9zLCB2cG9zLAogCQkJICAgICAgdy0+cGh5 c19jdXJzb3IueCwgdy0+cGh5c19jdXJzb3IueSk7CiAgICAgICB1bmJsb2NrX2lucHV0ICgpOwor ICAgICAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB9CiB9CiAKQEAg LTMyNDM2LDYgKzM0OTY0LDI0IEBAIHhfaW50ZXJzZWN0X3JlY3RhbmdsZXMgKFhSZWN0YW5nbGUg KnIxLCBYUmVjdGFuZ2xlICpyMiwgWFJlY3RhbmdsZSAqcmVzdWx0KQogdm9pZAogc3ltc19vZl94 ZGlzcCAodm9pZCkKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxl IGN1cnNvcnMgKi8KKworICBERUZTWU0gKFFtY19nbHlwaCwgIm1jLWdseXBoLWN1cnNvciIpOwor ICBERUZTWU0gKFFtY19nbHlwaGxlc3MsICJtYy1nbHlwbGVzcy1jdXJzb3IiKTsKKyAgREVGU1lN IChRbWNfZ2x5cGhfdGFiLCAibWMtZ2x5cGgtdGFiIik7CisKKyAgZGVmc3ViciAoJlNtY19hY3Rp dmF0ZV9jdXJzb3JzKTsKKworICBkZWZzdWJyICgmU21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMpOwor CisgIGRlZnN1YnIgKCZTZGVidWdnaW5nKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICBWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IgPSBRbmlsOwogICBzdGF0aWNwcm8gKCZW d2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IpOwogCmRpZmYgLS1naXQgYS9zcmMveHRlcm0uYyBi L3NyYy94dGVybS5jCmluZGV4IGFmMjhkYWIuLmViOTJjYmQgMTAwNjQ0Ci0tLSBhL3NyYy94dGVy bS5jCisrKyBiL3NyYy94dGVybS5jCkBAIC0xMTUxLDEwICsxMTUxLDEyIEBAIHhfdXBkYXRlX3dp bmRvd19lbmQgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgY3Vyc29yX29uX3AsCiAgICAgewogICAg ICAgYmxvY2tfaW5wdXQgKCk7CiAKLSAgICAgIGlmIChjdXJzb3Jfb25fcCkKLQlkaXNwbGF5X2Fu ZF9zZXRfY3Vyc29yICh3LCB0cnVlLAotCQkJCXctPm91dHB1dF9jdXJzb3IuaHBvcywgdy0+b3V0 cHV0X2N1cnNvci52cG9zLAotCQkJCXctPm91dHB1dF9jdXJzb3IueCwgdy0+b3V0cHV0X2N1cnNv ci55KTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAqLwor CisgICAgICBtY19wb3J0YWwgKHcsIGN1cnNvcl9vbl9wKTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCiAKICAgICAgIGlmIChkcmF3X3dpbmRvd19mcmluZ2VzICh3LCB0cnVlKSkKIAl7CkBA IC0xNTMwLDEwICsxNTMyLDE3IEBAIHN0YXRpYyB2b2lkIHhfY2hlY2tfZm9udCAoc3RydWN0IGZy YW1lICosIHN0cnVjdCBmb250ICopOwogc3RhdGljIHZvaWQKIHhfc2V0X2N1cnNvcl9nYyAoc3Ry dWN0IGdseXBoX3N0cmluZyAqcykKIHsKLSAgaWYgKHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ ZikKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogbXVsdGlwbGUgY3Vyc29ycyAqLworCisg IHN0cnVjdCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7 CisgIGlmICgocy0+Zm9udCA9PSBGUkFNRV9GT05UIChzLT5mKQogICAgICAgJiYgcy0+ZmFjZS0+ YmFja2dyb3VuZCA9PSBGUkFNRV9CQUNLR1JPVU5EX1BJWEVMIChzLT5mKQogICAgICAgJiYgcy0+ ZmFjZS0+Zm9yZWdyb3VuZCA9PSBGUkFNRV9GT1JFR1JPVU5EX1BJWEVMIChzLT5mKQogICAgICAg JiYgIXMtPmNtcCkKKyAgICAgIHx8IHctPm1jLmN1cnNvcl9nY19kZWZhdWx0KQorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KICAgICBzLT5nYyA9IHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9nYzsKICAgZWxzZQogICAgIHsKQEAgLTkzMjgsNyArOTMzNywxNiBAQCB4X2RyYXdfYmFyX2N1 cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgd2lkdGgs IGVudW0gdGV4dAogCSBpbnZpc2libGUuICBVc2UgdGhlIGdseXBoJ3MgZm9yZWdyb3VuZCBjb2xv ciBpbnN0ZWFkIGluIHRoaXMKIAkgY2FzZSwgb24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUgZ2x5 cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbwogCSB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxlLiAg Ki8KLSAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9waXhlbCkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBtdWx0aXBsZSBjdXJzb3Jz ICovCisKKyAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9waXhlbAorICAgICAgICAgICYmICF3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkp CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAl4Z2N2LmJhY2tncm91bmQgPSB4Z2N2 LmZvcmVncm91bmQgPSBmYWNlLT5mb3JlZ3JvdW5kOwogICAgICAgZWxzZQogCXhnY3YuYmFja2dy b3VuZCA9IHhnY3YuZm9yZWdyb3VuZCA9IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbDsK QEAgLTk0MTYsNyArOTQzNCwxMyBAQCB4X2NsZWFyX2ZyYW1lX2FyZWEgKHN0cnVjdCBmcmFtZSAq ZiwgaW50IHgsIGludCB5LCBpbnQgd2lkdGgsIGludCBoZWlnaHQpCiBzdGF0aWMgdm9pZAogeF9k cmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKmds eXBoX3JvdywgaW50IHgsCiAJCSAgICAgIGludCB5LCBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1 cnNvcl90eXBlLAotCQkgICAgICBpbnQgY3Vyc29yX3dpZHRoLCBib29sIG9uX3AsIGJvb2wgYWN0 aXZlX3ApCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIG11bHRpcGxlIGN1cnNvcnMgKi8K KworICBpbnQgY3Vyc29yX3dpZHRoLCBib29sIG9uX3AsIGJvb2wgYWN0aXZlX3AsCisgIExpc3Bf T2JqZWN0IGNvbG9yX3ZlY3RvciwgTGlzcF9PYmplY3QgZmxhdm9yKQorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KIHsKICAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUg KHcpKTsKIApAQCAtOTQzNSwzMSArOTQ1OSwxMjcgQEAgeF9kcmF3X3dpbmRvd19jdXJzb3IgKHN0 cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKmdseXBoX3JvdywgaW50IHgsCiAJfQog ICAgICAgZWxzZQogCXsKLQkgIHN3aXRjaCAoY3Vyc29yX3R5cGUpCi0JICAgIHsKLQkgICAgY2Fz ZSBIT0xMT1dfQk9YX0NVUlNPUjoKLQkgICAgICB4X2RyYXdfaG9sbG93X2N1cnNvciAodywgZ2x5 cGhfcm93KTsKLQkgICAgICBicmVhazsKIAotCSAgICBjYXNlIEZJTExFRF9CT1hfQ1VSU09SOgot CSAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1Ip OwotCSAgICAgIGJyZWFrOwogCi0JICAgIGNhc2UgQkFSX0NVUlNPUjoKLQkgICAgICB4X2RyYXdf YmFyX2N1cnNvciAodywgZ2x5c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FhDcmVhdGVHQyAoRlJBTUVfWF9ESVNQTEFZIChm KSwgRlJBTUVfWF9XSU5ET1cgKGYpLCBtYXNrLCAmZ2NfdmFsdWVzKTsKKyAgICAgICAgICB1bmJs b2NrX2lucHV0ICgpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBkcmF3X3Bo eXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsKKyAgICAgIGJyZWFr OworICAgIH0KKyAgICBjYXNlIEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHJlZCA+PSAw ICYmIGJsdWUgPj0gMCAmJiBncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVt cG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAg ICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAg ICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSB0cnVlOworICAgICAgICAg IHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgQkFSX0NVUlNP Uik7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gZmFsc2U7Cisg ICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29y X3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1 cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgYnJl YWs7CisgICAgfQorICAgIGNhc2UgSEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHJlZCA+ PSAwICYmIGJsdWUgPj0gMCAmJiBncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyog VGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAgKi8K KyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsK KyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSB0cnVlOworICAgICAg ICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgSEJBUl9D VVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IGZhbHNl OworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1 cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3X2Jh cl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAg ICBicmVhazsKKyAgICB9CisgICAgY2FzZSBOT19DVVJTT1I6CisgICAgICB3LT5waHlzX2N1cnNv cl93aWR0aCA9IDA7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJv cnQgKCk7CisgIH0KKy8qIEVORCBtdWx0aXBsZSBjdXJzb3JzICovCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KIAotCSAgICBjYXNlIE5PX0NVUlNPUjoKLQkgICAgICB3LT5waHlzX2N1cnNvcl93 aWR0aCA9IDA7Ci0JICAgICAgYnJlYWs7CiAKLQkgICAgZGVmYXVsdDoKLQkgICAgICBlbWFjc19h Ym9ydCAoKTsKLQkgICAgfQogCX0KIAogI2lmZGVmIEhBVkVfWF9JMThOCg== --Multipart_Sun_Jul__8_22:28:32_2018-1--