From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22873: Can we support multiple Cursors? Date: Thu, 10 Mar 2016 23:18:41 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: multipart/mixed; boundary="Multipart_Thu_Mar_10_23:18:39_2016-1" X-Trace: ger.gmane.org 1457680769 14800 80.91.229.3 (11 Mar 2016 07:19:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2016 07:19:29 +0000 (UTC) Cc: jwiegley@gmail.com, mbork@mbork.pl, rms@gnu.org, 22873@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 11 08:19:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aeHLw-00050v-QD for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2016 08:19:17 +0100 Original-Received: from localhost ([::1]:53147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeHLs-0004zq-Qh for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2016 02:19:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeHLn-0004z9-KB for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 02:19:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeHLi-0005CE-GG for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 02:19:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeHLi-0005CA-Bt for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 02:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aeHLi-0001Ul-5k for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 02:19:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Mar 2016 07:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22873 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22873-submit@debbugs.gnu.org id=B22873.14576807335732 (code B ref 22873); Fri, 11 Mar 2016 07:19:02 +0000 Original-Received: (at 22873) by debbugs.gnu.org; 11 Mar 2016 07:18:53 +0000 Original-Received: from localhost ([127.0.0.1]:44244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aeHLZ-0001UO-4j for submit@debbugs.gnu.org; Fri, 11 Mar 2016 02:18:53 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:39932) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aeHLX-0001UB-Gu for 22873@debbugs.gnu.org; Fri, 11 Mar 2016 02:18:52 -0500 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; bh=hPdwjv/l+PycsWiRgTlwqwSlZp6vp+R4/spxTNn4+MY=; b=mvgqsX+m3hwCXehYamenfzVidpfxE+APTODG4iOSXF8sR+3JIRAo3B/9aFilwbVN/vTmLiiCOVQmrc+4OVSSFaVLGk1HbCeku3nLS91mZOPnTYwh5/7SWHsg3b+SGWTf; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:56561 helo=server.private.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1aeHLM-0005Xx-LQ; Fri, 11 Mar 2016 02:18:41 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.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-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114738 Archived-At: --Multipart_Thu_Mar_10_23:18:39_2016-1 Content-Type: text/plain; charset=US-ASCII Attached is the third draft, multiple_cursors_003.diff, which applies to the master branch as of commit "ea626c72e590aa7a45fd26df42240854e4225cef" on March 10, 2015. Different colors for each fake cursor are now supported on Emacs for Windows (XP SP-3) and OSX (10.6.8). The next phase will be to separate the custom feature called `window-start-end-hook` from this new fake cursor feature 22873. Currently, I am using the existence of a definitive window-start and window-end derived from the `window-start-end-hook` as a guide and condition precedent to placing the fake cursors. Given that fake cursors are placed late in the stage of the redisplay process, I suspect that I can rely on other methods to extract the correct window-start and window-end. The other unrelated features that were present in my first couple of drafts have been removed from this third draft. The fake cursors feature works as follows -- to erase everything or change anything, just modify the `mc-list': (defun mc-test (&optional list) "Draw fake cursors at all POS defined in the `mc-list'. Color vector is LSL (The Linden Scripting Language), rather than standard RGB. `nsterm.m' uses `NSColor', which works well with LSL. `w32term.c' uses `PALETTERGB' or `RGB', and the conversion from LSL is done internally by multiplying each element of the LSL color vector by 255." (interactive) (setq mc-list '( (3 "hbar" [1.0 0.0 0.0]) (4 "bar" [0.0 1.0 0.0]) (5 "box" [0.0 0.0 1.0]) (6 "hollow" [0.8 0.4 0.2]) (7 ("hbar" 3) [1.0 0.0 1.0]) (8 ("bar" 3) [0.0 1.0 1.0])))) (global-set-key [f1] 'mc-test) --Multipart_Thu_Mar_10_23:18:39_2016-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="multiple_cursors_003.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuYyBiL3NyYy9idWZmZXIuYwppbmRleCA5OGI2MWMzLi40 NTQ0NTdhIDEwMDY0NAotLS0gYS9zcmMvYnVmZmVyLmMKKysrIGIvc3JjL2J1ZmZlci5jCkBAIC01 MDczLDYgKzUwNzMsOCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICBYU0VURkFTVElOVCAo QlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgZGlzcGxheV90YWJsZSksIGlkeCk7ICsraWR4Owog ICBYU0VURkFTVElOVCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgc3ludGF4X3RhYmxlKSwg aWR4KTsgKytpZHg7CiAgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBj YWNoZV9sb25nX3NjYW5zKSwgaWR4KTsgKytpZHg7CisgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVm ZmVyX2xvY2FsX2ZsYWdzLCB3aW5kb3dfc3RhcnRfZW5kX2hvb2spLCBpZHgpOyArK2lkeDsKKyAg WFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIG1jX2xpc3QpLCBpZHgpOyAr K2lkeDsKICAgW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GVyZmFjZQog CQkJICAgICAgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93LAogCQkJICAgICAgaW50IHgsIGlu dCB5LAogCQkJICAgICAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3JfdHlwZSwKLQkJCSAg ICAgIGludCBjdXJzb3Jfd2lkdGgsIGJvb2wgb25fcCwgYm9vbCBhY3RpdmVfcCk7CisJCQkgICAg ICBpbnQgY3Vyc29yX3dpZHRoLCBib29sIG9uX3AsIGJvb2wgYWN0aXZlX3AsCisJCQkgICAgICBk b3VibGUgcmVkLCBkb3VibGUgZ3JlZW4sIGRvdWJsZSBibHVlKTsKIAogICAvKiBEcmF3IHZlcnRp Y2FsIGJvcmRlciBmb3Igd2luZG93IFcgZnJvbSAoWCxZXzApIHRvIChYLFlfMSkuICAqLwogICB2 b2lkICgqZHJhd192ZXJ0aWNhbF93aW5kb3dfYm9yZGVyKSAoc3RydWN0IHdpbmRvdyAqdywKQEAg LTMyODcsMTEgKzMyODgsMTEgQEAgZXh0ZXJuIHZvaWQgeF9maXhfb3ZlcmxhcHBpbmdfYXJlYSAo c3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBlbnVtIGdseXBoX3Jvd19hcmVhLCBpbnQpOwogZXh0ZXJuIHZvaWQg ZHJhd19waHlzX2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqLAogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqLAotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSwgY2hhciAqKTsK IGV4dGVybiB2b2lkIGdldF9waHlzX2N1cnNvcl9nZW9tZ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3RydWN0IGJ1ZmZlciAqYjsKKyAgYnVmID0gdy0+Y29udGVudHM7CisgIENIRUNLX0JVRkZF UiAoYnVmKTsKKyAgYiA9IFhCVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKm9sZF9idWZm ZXIgPSBOVUxMOworICB2b2lkICppdGRhdGEgPSBOVUxMOworICBib29sIGZ1bGx5X3AgPSBmYWxz ZTsKKyAgaW50IHgsIHksIHJ0b3AsIHJib3QsIHJvd2gsIHZwb3MsIHN0YXJ0cF9pbnRlZ2VyLCBl bmRwLCBwYm9sX3N0YXJ0cCwgcGVvbF9lbmRwOworICBzdGFydHBfaW50ZWdlciA9IENIQVJQT1Mg KHN0YXJ0cCk7CisgIGlmIChiICE9IGN1cnJlbnRfYnVmZmVyKQorICAgIHsKKyAgICAgIG9sZF9i dWZmZXIgPSBjdXJyZW50X2J1ZmZlcjsKKyAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKGIpOwor ICAgIH0KKyAgaWYgKHctPndpbmRvd19zdGFydF9lbmRfaG9va19wZW5kaW5nCisgICAgICAgICYm ICghTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIHdpbmRvd19zdGFydF9lbmRfaG9vaykpCisg ICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX2xpc3QpKQorICAg ICAgICAgICAgfHwgdy0+bWNfY2FjaGUpKQorICAgIHsKKyAgICAgIGlmICgoKHBvc2ludCA+PSBD SEFSUE9TIChzdGFydHApICYmIHBvc2ludCA8PSBCVUZfWlYgKGIpKQorICAgICAgICAgICAgJiYg Q0hBUlBPUyAoc3RhcnRwKSA+PSBCVUZfQkVHViAoYikKKyAgICAgICAgICAgICYmIENIQVJQT1Mg KHN0YXJ0cCkgPD0gQlVGX1pWIChiKQorICAgICAgICAgICAgJiYgcG9zX3Zpc2libGVfcCAodywg cG9zaW50LCAmeCwgJnksICZydG9wLCAmcmJvdCwgJnJvd2gsICZ2cG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gICAgICAgIHNhZmVfY2Fs bCAoOCwKKyAgICAgICAgICAgICAgUXJ1bl9ob29rX3dpdGhfYXJncywKKyAgICAgICAgICAgICAg UXdpbmRvd19zdGFydF9lbmRfaG9vaywKKyAgICAgICAgICAgICAgd2luZG93LAorICAgICAgICAg ICAgICBtYWtlX251bWJlciAoc3RhcnRwX2ludGVnZXIpLAorICAgICAgICAgICAgICBtYWtlX251 bWJlciAoZW5kcCksCisgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChwYm9sX3N0YXJ0cCksCisg ICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChwZW9sX2VuZHApLAorICAgICAgICAgICAgICBmdWxs eV9wID8gUXQgOiBRbmlsKTsKKyAgICAgICAgICAvKiBBdCB0aGUgY2F0Y2gtYWxsIHdoZW4gc2Ny b2xsaW5nIHdpdGggdGhlIG1vdXNlIHdoZWVsLCB0aGlzIG5leHQgc2VjdGlvbiBjYXVzZXMgYSB2 aXN1YWwgZmxhc2gKKyAgICAgICAgICBvZiBjdXJzb3IgaW4gdGhlIHdyb25nIHBvc2l0aW9uIGR1 ZSB0byBTRVRfUFQgYWJvdmUuICAqLworICAgICAgICAgIGlmIChmb3JjZSkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgY2xlYXJfZ2x5cGhfbWF0cml4ICh3LT5kZXNpcmVkX21hdHJpeCk7 CisgICAgICAgICAgICAgIHRyeV93aW5kb3cgKHdpbmRvdywgc3RhcnRwLCAwKTsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworI2lmZGVmIEdMWVBI X0RFQlVHCisgICAgICAgICAgICAvKiBTZWUgdGhlIGRvYy1zdHJpbmcgZm9yIGBwb3MtdmlzaWJs ZS1pbi13aW5kb3ctcCcuICAqLworICAgICAgICAgICAgZGVidWdfbWV0aG9kX2FkZCAodywgIiVz IC0tIHg6ICVkIHwgeTogJWQgfCBydG9wOiAlZCB8IHJib3QgJWQgfC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mcm96ZW5fcCAodykpCiAgICAgICAmJiBDSEFS UE9TIChzdGFydHApID49IEJFR1YKICAgICAgICYmIENIQVJQT1MgKHN0YXJ0cCkgPD0gWlYpCiAg ICAgeworCisgICAgICBpZiAody0+d2luZG93X3N0YXJ0X2VuZF9ob29rX2ZvcmNlICYmICF3LT5v cHRpb25hbF9uZXdfc3RhcnQgJiYgIXdpbmRvd19mcm96ZW5fcCAodykgJiYgIXctPmZvcmNlX3N0 YXJ0KQorICAgICAgICB3aW5kb3dfc3RhcnRfZW5kX2hvb2tfc3VwcHJlc3Nfd3NmID0gdHJ1ZTsK KwogICAgICAgcHRyZGlmZl90IGl0X2NoYXJwb3M7CiAKLSAgICAgIHctPm9wdGlvbmFsX25ld19z dGFydCA9IGZhbHNlOwogICAgICAgc3RhcnRfZGlzcGxheSAoJml0LCB3LCBzdGFydHApOwogICAg ICAgbW92ZV9pdF90byAoJml0LCBQVCwgMCwgaXQubGFzdF92aXNpYmxlX3ksIC0xLAogCQkgIE1P VkVfVE9fUE9TIHwgTU9WRV9UT19YIHwgTU9WRV9UT19ZKTsKQEAgLTE2MjcwLDE0ICsxNjM2NCwy OCBAQCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlz X29uZV9wKQogCSAgICB3LT5mb3JjZV9zdGFydCA9IHRydWU7CiAjaWZkZWYgR0xZUEhfREVCVUcK IAkgIGlmICh3LT5mb3JjZV9zdGFydCkKLQkgICAgewotCSAgICAgIGlmICh3aW5kb3dfZnJvemVu X3AgKHcpKQotCQlkZWJ1Z19tZXRob2RfYWRkICh3LCAic2V0IGZvcmNlX3N0YXJ0IGZyb20gZnJv emVuIHdpbmRvdyBzdGFydCIpOwotCSAgICAgIGVsc2UKLQkJZGVidWdfbWV0aG9kX2FkZCAodywg InNldCBmb3JjZV9zdGFydCBmcm9tIG9wdGlvbmFsX25ld19zdGFydCIpOwotCSAgICB9CisgICAg eworICAgICAgaWYgKHdpbmRvd19mcm96ZW5fcCAodykpCisgICAgICAgIHsKKyAgICAgICAgZGVi dWdfbWV0aG9kX2FkZCAodywgInJlZGlzcGxheV93aW5kb3cgKGZvcmNlX3N0YXJ0KTogIHdpbmRv d19mcm96ZW5fcCAodykiKTsKKyAgICAgIH0KKyAgICAgIGVsc2UgaWYgKHctPm9wdGlvbmFsX25l d19zdGFydCkKKyAgICAgICAgeworICAgICAgICBkZWJ1Z19tZXRob2RfYWRkICh3LCAicmVkaXNw bGF5X3dpbmRvdyAoZm9yY2Vfc3RhcnQpOiAgdy0+b3B0aW9uYWxfbmV3X3N0YXJ0Iik7CisgICAg ICB9CisgICAgICBlbHNlIGlmICh3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfZm9yY2UpCisgICAg ICAgIHsKKyAgICAgICAgZGVidWdfbWV0aG9kX2FkZCAodywgInJlZGlzcGxheV93aW5kb3cgKGZv cmNlX3N0YXJ0KTogIHctPndpbmRvd19zdGFydF9lbmRfaG9va19mb3JjZSIpOworICAgICAgfQor ICAgICAgZWxzZQorICAgICAgICB7CisgICAgICAgIGRlYnVnX21ldGhvZF9hZGQgKHcsICJyZWRp c3BsYXlfd2luZG93IChmb3JjZV9zdGFydCk6ICBUaGlzIHNpdHVhdGlvbiBpcyBub3QgeWV0IGNv bnRlbXBsYXRlZC4iKTsKKyAgICAgIH0KKyAgICB9CiAjZW5kaWYKIAl9CisgICAgICB3LT5vcHRp b25hbF9uZXdfc3RhcnQgPSBmYWxzZTsKKyAgICAgIHctPndpbmRvd19zdGFydF9lbmRfaG9va19m b3JjZSA9IGZhbHNlOwogICAgIH0KIAogIGZvcmNlX3N0YXJ0OgpAQCAtMTYzMDUsMTEgKzE2NDEz LDE4IEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3BfT2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3Ro aXNfb25lX3ApCiAJIHRoYW4gdG8gZ2V0IGludG8gYW4gaW5maW5pdGUgbG9vcCBjYWxsaW5nIHRo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GggPSB4MSAtIHg7CisgICAgICAgICAgICBpZiAoY3Vy c29yX3JvdyA+IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzCisgICAgICAgICAgICAgICAgJiYgTUFU UklYX1JPV19PVkVSTEFQU19TVUNDX1AgKGN1cnNvcl9yb3cgLSAxKSkKKyAgICAgICAgICAgICAg eF9maXhfb3ZlcmxhcHBpbmdfYXJlYSAodywgY3Vyc29yX3JvdyAtIDEsIFRFWFRfQVJFQSwKKyAg ICAgICAgICAgICAgICAgICAgT1ZFUkxBUFNfRVJBU0VEX0NVUlNPUik7CisgICAgICAgICAgICBp ZiAoTUFUUklYX1JPV19CT1RUT01fWSAoY3Vyc29yX3JvdykgPCB3aW5kb3dfdGV4dF9ib3R0b21f eSAodykKKyAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX09WRVJMQVBTX1BSRURfUCAoY3Vy c29yX3JvdyArIDEpKQorICAgICAgICAgICAgICB4X2ZpeF9vdmVybGFwcGluZ19hcmVhICh3LCBj dXJzb3Jfcm93ICsgMSwgVEVYVF9BUkVBLAorICAgICAgICAgICAgICAgICAgICBPVkVSTEFQU19F UkFTRURfQ1VSU09SKTsKKyAgICAgICAgICB9CisgICAgfQorICBtYXJrX2N1cnNvcl9vZmY6Cisg IFFuaWw7Cit9CisKK3ZvaWQKK21jX2RyYXcgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sIEVN QUNTX0lOVCB4LCBFTUFDU19JTlQgeSwgRU1BQ1NfSU5UIGhwb3MsIEVNQUNTX0lOVCB2cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3Jf dHlwZSwgaW50IGN1cnNvcl93aWR0aCwgZG91YmxlIHJlZCwgZG91YmxlIGdyZWVuLCBkb3VibGUg Ymx1ZSkKK3sKKworICBpbnQgaGVhZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5F X0hFSUdI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X2hvb2tfaW50X3dpbmRvd19zdGFydAorICAgICAgJiYgcG9zaW50IDw9IHctPndpbmRvd19z dGFydF9lbmRfaG9va19pbnRfd2luZG93X2VuZCkKKyAgICB7CisgICAgICBTRVRfVEVYVF9QT1Nf RlJPTV9NQVJLRVIgKHB0LCB3LT5zdGFydCk7CisgICAgICBzdGFydF9kaXNwbGF5ICgmaXQsIHcs IHB0KTsKKyAgICAgIG1vdmVfaXRfdG8gKCZpdCwgcG9zaW50LCAtMSwgLTEsIC0xLCBNT1ZFX1RP X1BPUyk7CisgICAgICBwb3MgPSBpdC5jdXJyZW50LnBvczsKKyAgICAgIHggPSBpdC5jdXJyZW50 X3g7CisgICAgICB5ID0gaXQuY3VycmVudF95OworICAgICAgaHBvcyA9IGl0Lmhwb3M7CisgICAg ICB2cG9zID0gaXQudnBvczsKKyAgICAgIGJpZGlfdW5zaGVsdmVfY2FjaGUgKGl0ZGF0YSwgZmFs c2UpOworICAgIH0KKyAgICBlbHNlCisgICAgICB7CisgICAgICAgIHggPSAtMTsKKyAgICAgICAg eSA9IC0xOworICAgICAgICBocG9zID0gLTE7CisgICAgICAgIHZwb3MgPSAtMTsKKyAgICAgIH0K KyAgcmV0dXJuIGxpc3RuIChDT05TVFlQRV9QVVJFLCA0LCBtYWtlX251bWJlciAoeCksIG1ha2Vf bnVtYmVyICh5KSwgbWFrZV9udW1iZXIgKGhwb3MpLCBtYWtlX251bWJlciAodnBvcykpOworfQor CitpbnQKK21jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKExpc3BfT2JqZWN0IGFyZykKK3sKKyAgY2hh ciAqc3RyOworICBpZiAoWFRZUEUgKGFyZykgPT0gTGlzcF9TdHJpbmcpCisgICAgc3RyID0gU1NE QVRBIChhcmcpOworICBlbHNlIGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N5bWJvbCkKKyAgICBz dHIgPSBTU0RBVEEgKFNZTUJPTF9OQU1FIChhcmcpKTsKKyAgZWxzZSByZXR1cm4gLTE7CisgIGlm ICghc3RyY21wIChzdHIsICJib3giKSkKKyAgICByZXR1cm4gRklMTEVEX0JPWF9DVVJTT1I7Cisg IGlmICghc3RyY21wIChzdHIsICJob2xsb3ciKSkKKyAgICByZXR1cm4gSE9MTE9XX0JPWF9DVVJT T1I7CisgIGlmICghc3RyY21wIChzdHIsICJoYmFyIikpCisgICAgcmV0dXJuIEhCQVJfQ1VSU09S OworICBpZiAoIXN0cmNtcCAoc3RyLCAiYmFyIikpCisgICAgcmV0dXJuIEJBUl9DVVJTT1I7Cisg IGlmICghc3RyY21wIChzdHIsICJubyIpKQorICAgIHJldHVybiBOT19DVVJTT1I7CisgIHJldHVy biAtMTsKK30KKworLyogRVhBTVBMRSAjMToKKyAgICAoc2V0cSBtYy1saXN0ICcoCisgICAgICAo MyAiaGJhciIgWzEuMCAwLjAgMC4wXSkKKyAgICAgICg0ICJiYXIiIFswLjAgMS4wIDAuMF0pCisg ICAgICAoNSAiYm94IiBbMC4wIDAuMCAxLjBdKQorICAgICAgKDYgImhvbGxvdyIgWzAuOCAwLjQg MC4yXSkKKyAgICAgICg3ICgiaGJhciIgMykgWzEuMCAwLjAgMS4wXSkKKyAgICAgICg4ICgiYmFy IiAzKSBbMC4wIDEuMCAxLjBdKSkpCisgICBFWEFNUExFICMyOiAgKHNldHEgbWMtbGlzdCBuaWwp CitUaGUgYG1jX2NhY2hlJyBpcyBrZXB0IGluIHRoZSBmb2xsb3dpbmcgZXhhbXBsZSBmb3JtYXQ6 CisgICgoCisgICAgKDMgaGJhciBbMS4wIDAuMCAwLjBdKQorICAgICg0IGJhciBbMC4wIDEuMCAw LjBdKQorICAgICg1IGJveCBbMC4wIDAuMCAxLjBdKQorICAgICg2IGhvbGxvdyBbMC44IDAuNCAw LjJdKQorICAgICg3IChoYmFyIDMpIFsxLjAgMC4wIDEuMF0pCisgICAgKDggKGJhciAzKSBbMC4w IDEuMCAxLjBdKSkKKyAgICgKKyAgICAoKDMgaGJhciBbMS4wIDAuMCAwLj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cnJlbnRfYnVmZmVyLCBtY19saXN0 KSkpCisgICAgICAgICAgfHwgdyAhPSBzdykpCisgICAgeworI2lmZGVmIEdMWVBIX0RFQlVHCisg IGRlYnVnX21ldGhvZF9hZGQgKHcsICJtY19jYWxjOiAgcmVtb3ZlIGN1cnNvcnMgdXNpbmcgY2Fj aGUiKTsKKyNlbmRpZgorICAgICAgZm9yICh2bGlzdCA9IFhDQVIgKFhDRFIgKHctPm1jX2NhY2hl KSk7CisgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgICAgIHZsaXN0ID0gWENEUiAo dmxpc3QpKQorICAgICAgICB7CisgICAgICAgICAgY3Vyc29yX3NwZWNfbGlzdCA9IFhDQVIgKFhD QVIgKHZsaXN0KSk7CisgICAgICAgICAgcG9zaW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIg KDApLCBjdXJzb3Jfc3BlY19saXN0KSk7CisgICAgICAgICAgY3Vyc29yX3NwZWNfdHlwZSA9IEZu dGggKG1ha2VfbnVtYmVyICgxKSwgY3Vyc29yX3NwZWNfbGlzdCk7CisgICAgICAgICAgaWYgKENP TlNQIChjdXJzb3Jfc3BlY190eXBlKSkKKyAgICAgICAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlz cF90b19jdXJzb3JfdHlwZSAoWENBUiAoY3Vyc29yX3NwZWNfdHlwZSkpOworICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUg KGN1cnNvcl9zcGVjX3R5cGUpOworICAgICAgICAgIGlmIChDT05TUCAoY3Vyc29yX3NwZWNfdHlw ZSkpCisgICAgICAgICAgICBjdXJzb3Jfd2lkdGggPSBYSU5UIChYQ0FSIChYQ0RSIChjdXJzb3Jf c3BlY190eXBlKSkpOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBjdXJzb3Jfd2lk dGggPSAxOworICAgICAgICAgIGN1cnNvcl9jb2xvcl92ZWN0b3IgPSBGbnRoIChtYWtlX251bWJl ciAoMiksIGN1cnNvcl9zcGVjX2xpc3QpOworICAgICAgICAgIHJlZCA9IFhGTE9BVF9EQVRBIChB UkVGIChjdXJzb3JfY29sb3JfdmVjdG9yLCAwKSk7CisgICAgICAgICAgZ3JlZW4gPSBYRkxPQVRf REFUQSAoQVJFRiAoY3Vyc29yX2NvbG9yX3ZlY3RvciwgMSkpOworICAgICAgICAgIGJsdWUgPSBY RkxPQVRfREFUQSAoQVJFRiAoY3Vyc29yX2NvbG9yX3ZlY3RvciwgMikpOworICAgICAgICAgIGlm IChwb3NpbnQKKyAgICAgICAgICAgICAgJiYgdy0+d2luZG93X3N0YXJ0X2VuZF9ob29rX2ludF93 aW5kb3dfc3RhcnQKKyAgICAgICAgICAgICAgJiYgdy0+d2luZG93X3N0YXJ0X2VuZF9ob29rX2lu dF93aW5kb3dfZW5kCisgICAgICAgICAgICAgICYmIHBvc2ludCA+PSB3LT53aW5kb3dfc3RhcnRf ZW5kX2hvb2tfaW50X3dpbmRvd19zdGFydAorICAgICAgICAgICAgICAmJiBwb3NpbnQgPD0gdy0+ d2luZG93X3N0YXJ0X2VuZF9ob29rX2ludF93aW5kb3dfZW5kKQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICB4X3lfaHBvc192cG9zX2xpc3QgPSBYQ0FSIChYQ0RSIChYQ0FSICh2bGlzdCkp KTsKKyAgICAgICAgICAgICAgeCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgwKSwgeF95X2hw b3NfdnBvc19saXN0KSk7CisgICAgICAgICAgICAgIHkgPSBYSU5UIChGbnRoIChtYWtlX251bWJl ciAoMSksIHhfeV9ocG9zX3Zwb3NfbGlzdCkpOworICAgICAgICAgICAgICBocG9zID0gWElOVCAo Rm50aCAobWFrZV9udW1iZXIgKDIpLCB4X3lfaHBvc192cG9zX2xpc3QpKTsKKyAgICAgICAgICAg ICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgeF95X2hwb3NfdnBvc19saXN0 KSk7CisgICAgICAgICAgICAgIG1jX2VyYXNlICh3LCB4LCB5LCBocG9zLCB2cG9zLCBjdXJzb3Jf dHlwZSwgY3Vyc29yX3dpZHRoLCByZWQsIGdyZWVuLCBibHVlKTsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgfQorICAgICAgdy0+bWNfY2FjaGUgPSBRbmlsOworICAgIH0KKyAgICBlbHNlIGlmICh3 ID09IHN3CisgICAgICAgICAgICAmJiB3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfaW50X3dpbmRv d19zdGFydAorICAgICAgICAgICAgJiYgdy0+d2luZG93X3N0YXJ0X2VuZF9ob29rX2ludF93aW5k b3dfZW5kCisgICAgICAgICAgICAmJiB3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfaW50X3ByZXZp b3VzX3dpbmRvd19zdGFydAorICAgICAgICAgICAgJiYgdy0+d2luZG93X3N0YXJ0X2VuZF9ob29r X2ludF9wcmV2aW91c193aW5kb3dfZW5kCisgICAgICAgICAgICAmJiB3LT53aW5kb3dfc3RhcnRf ZW5kX2hvb2tfaW50X3dpbmRvd19zdGFydCA9PSB3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfaW50 X3ByZXZpb3VzX3dpbmRvd19zdGFydAorICAgICAgICAgICAgJiYgdy0+d2luZG93X3N0YXJ0X2Vu ZF9ob29rX2ludF93aW5kb3dfZW5kID09IHctPndpbmRvd19zdGFydF9lbmRfaG9va19pbnRfcHJl dmlvdXNfd2luZG93X2VuZAorICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGN1cnJlbnRfYnVm ZmVyLCBtY19saXN0KSkKKyAgICAgICAgICAgICYmIHctPm1jX2NhY2hlCisgICAgICAgICAgICAm JiAhTklMUCAoRmVxdWFsIChGbnRoIChtYWtlX251bWJlciAoMCksIHctPm1jX2NhY2hlKSwgQlZB UiAoY3VycmVudF9idWZmZXIsIG1jX2xpc3QpKSkpCisgICAgICB7CisjaWZkZWYgR0xZUEhfREVC VUcKKyAgZGVidWdfbWV0aG9kX2FkZCAodywgIm1jX2NhbGM6ICBkcmF3IGN1cnNvcnMgdXNpbmcg Y2FjaGUiKTsKKyNlbmRpZgorICAgICAgICBmb3IgKHZsaXN0ID0gWENBUiAoWENEUiAody0+bWNf Y2FjaGUpKTsKKyAgICAgICAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgICAgICAgIHZsaXN0 ID0gWENEUiAodmxpc3QpKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGN1cnNvcl9zcGVjX2xp c3QgPSBYQ0FSIChYQ0FSICh2bGlzdCkpOworICAgICAgICAgICAgcG9zaW50ID0gWElOVCAoRm50 aCAobWFrZV9udW1iZXIgKDApLCBjdXJzb3Jfc3BlY19saXN0KSk7CisgICAgICAgICAgICBjdXJz b3Jfc3BlY190eXBlID0gRm50aCAobWFrZV9udW1iZXIgKDEpLCBjdXJzb3Jfc3BlY19saXN0KTsK KyAgICAgICAgICAgIGlmIChDT05TUCAoY3Vyc29yX3NwZWNfdHlwZSkpCisgICAgICAgICAgICAg IGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAoY3Vyc29yX3NwZWNf dHlwZSkpOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUg PSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChjdXJzb3Jfc3BlY190eXBlKTsKKyAgICAgICAgICAg IGlmIChDT05TUCAoY3Vyc29yX3NwZWNfdHlwZSkpCisgICAgICAgICAgICAgIGN1cnNvcl93aWR0 aCA9IFhJTlQgKFhDQVIgKFhDRFIgKGN1cnNvcl9zcGVjX3R5cGUpKSk7CisgICAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGggPSAxOworICAgICAgICAgICAgY3Vy c29yX2NvbG9yX3ZlY3RvciA9IEZudGggKG1ha2VfbnVtYmVyICgyKSwgY3Vyc29yX3NwZWNfbGlz dCk7CisgICAgICAgICAgICByZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAoY3Vyc29yX2NvbG9yX3Zl Y3RvciwgMCkpOworICAgICAgICAgICAgZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJFRiAoY3Vyc29y X2NvbG9yX3ZlY3RvciwgMSkpOworICAgICAgICAgICAgYmx1ZSA9IFhGTE9BVF9EQVRBIChBUkVG IChjdXJzb3JfY29sb3JfdmVjdG9yLCAyKSk7CisgICAgICAgICAgICBpZiAocG9zaW50CisgICAg ICAgICAgICAgICAgJiYgdy0+d2luZG93X3N0YXJ0X2VuZF9ob29rX2ludF93aW5kb3dfc3RhcnQK KyAgICAgICAgICAgICAgICAmJiB3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfaW50X3dpbmRvd19l bmQKKyAgICAgICAgICAgICAgICAmJiBwb3NpbnQgPj0gdy0+d2luZG93X3N0YXJ0X2VuZF9ob29r X2ludF93aW5kb3dfc3RhcnQKKyAgICAgICAgICAgICAgICAmJiBwb3NpbnQgPD0gdy0+d2luZG93 X3N0YXJ0X2VuZF9ob29rX2ludF93aW5kb3dfZW5kKQorICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgeF95X2hwb3NfdnBvc19saXN0ID0gWENBUiAoWENEUiAoWENBUiAodmxpc3QpKSk7 CisgICAgICAgICAgICAgICAgeCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgwKSwgeF95X2hw b3NfdnBvc19saXN0KSk7CisgICAgICAgICAgICAgICAgeSA9IFhJTlQgKEZudGggKG1ha2VfbnVt YmVyICgxKSwgeF95X2hwb3NfdnBvc19saXN0KSk7CisgICAgICAgICAgICAgICAgaHBvcyA9IFhJ TlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgeF95X2hwb3NfdnBvc19saXN0KSk7CisgICAgICAg ICAgICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgeF95X2hwb3NfdnBv c19saXN0KSk7CisgICAgICAgICAgICAgICAgbWNfZHJhdyAodywgMSwgeCwgeSwgaHBvcywgdnBv cywgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcmVkLCBncmVlbiwgYmx1ZSk7CisgICAgICAg ICAgICAgIH0KKyAgICAgICAgICB9CisgICAgICB9CisgICAgICBlbHNlIGlmICh3ID09IHN3Cisg ICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX2xpc3QpKSkK KyAgICAgICAgeworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGRlYnVnX21ldGhvZF9hZGQgKHcsICJt Y19jYWxjOiAgZHJhdyBjdXJzb3JzIGFuZXciKTsKKyNlbmRpZgorICAgICAgICAgIGZvciAodmxp c3QgPSBCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfbGlzdCk7CisgICAgICAgICAgICAgICBDT05T UCAodmxpc3QpOworICAgICAgICAgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIGN1cnNvcl9zcGVjX2xpc3QgPSBYQ0FSICh2bGlzdCk7Cisg ICAgICAgICAgICAgIHBvc2ludCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgwKSwgY3Vyc29y X3NwZWNfbGlzdCkpOworICAgICAgICAgICAgICBjdXJzb3Jfc3BlY190eXBlID0gRm50aCAobWFr ZV9udW1iZXIgKDEpLCBjdXJzb3Jfc3BlY19saXN0KTsKKyAgICAgICAgICAgICAgaWYgKENPTlNQ IChjdXJzb3Jfc3BlY190eXBlKSkKKyAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IG1jX2xp c3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIgKGN1cnNvcl9zcGVjX3R5cGUpKTsKKyAgICAgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vy c29yX3R5cGUgKGN1cnNvcl9zcGVjX3R5cGUpOworICAgICAgICAgICAgICBpZiAoQ09OU1AgKGN1 cnNvcl9zcGVjX3R5cGUpKQorICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKFhD QVIgKFhDRFIgKGN1cnNvcl9zcGVjX3R5cGUpKSk7CisgICAgICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoID0gMTsKKyAgICAgICAgICAgICAgY3Vyc29yX2Nv bG9yX3ZlY3RvciA9IEZudGggKG1ha2VfbnVtYmVyICgyKSwgY3Vyc29yX3NwZWNfbGlzdCk7Cisg ICAgICAgICAgICAgIHJlZCA9IFhGTE9BVF9EQVRBIChBUkVGIChjdXJzb3JfY29sb3JfdmVjdG9y LCAwKSk7CisgICAgICAgICAgICAgIGdyZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKGN1cnNvcl9j b2xvcl92ZWN0b3IsIDEpKTsKKyAgICAgICAgICAgICAgYmx1ZSA9IFhGTE9BVF9EQVRBIChBUkVG IChjdXJzb3JfY29sb3JfdmVjdG9yLCAyKSk7CisgICAgICAgICAgICAgIGlmIChwb3NpbnQpCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgeF95X2hwb3NfdnBvc19saXN0ID0g bWNfeF95X2hwb3NfdnBvcyAodywgcG9zaW50KTsKKyAgICAgICAgICAgICAgICAgIHRlbXAgPSBG Y29ucyAoY3Vyc29yX3NwZWNfbGlzdCwgRmNvbnMgKHhfeV9ocG9zX3Zwb3NfbGlzdCwgUW5pbCkp OworICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gRmNvbnMgKHRlbXAsIHJlc3VsdCk7CisgICAg ICAgICAgICAgICAgICB4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCB4X3lfaHBvc192 cG9zX2xpc3QpKTsKKyAgICAgICAgICAgICAgICAgIHkgPSBYSU5UIChGbnRoIChtYWtlX251bWJl ciAoMSksIHhfeV9ocG9zX3Zwb3NfbGlzdCkpOworICAgICAgICAgICAgICAgICAgaHBvcyA9IFhJ TlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgeF95X2hwb3NfdnBvc19saXN0KSk7CisgICAgICAg ICAgICAgICAgICB2cG9zID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDMpLCB4X3lfaHBvc192 cG9zX2xpc3QpKTsKKyAgICAgICAgICAgICAgICAgIGlmICh3LT53aW5kb3dfc3RhcnRfZW5kX2hv b2tfaW50X3dpbmRvd19zdGFydAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPndpbmRvd19z dGFydF9lbmRfaG9va19pbnRfd2luZG93X2VuZAorICAgICAgICAgICAgICAgICAgICAgICYmIHBv c2ludCA+PSB3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfaW50X3dpbmRvd19zdGFydAorICAgICAg ICAgICAgICAgICAgICAgICYmIHBvc2ludCA8PSB3LT53aW5kb3dfc3RhcnRfZW5kX2hvb2tfaW50 X3dpbmRvd19lbmQpCisgICAgICAgICAgICAgICAgICAgIG1jX2RyYXcgKHcsIDEsIHgsIHksIGhw b3MsIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJlZCwgZ3JlZW4sIGJsdWUpOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICB3LT5tY19jYWNoZSA9 IEZjb25zIChCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfbGlzdCksIEZjb25zIChGcmV2ZXJzZSAo cmVzdWx0KSwgUW5pbCkpOworICAgICAgICB9CisgIGRvbmU6CisgIGlmIChvbGRfYnVmZmVyKQor ICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworfQogCiAvKiBEaXNwbGF5IG9y IGNsZWFyIGN1cnNvciBvZiB3aW5kb3cgVy4gIElmICFP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