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.devel Subject: nsterm.m: How to prevent _inactive_ window update from overreaching. Date: Thu, 22 Nov 2018 11:07:26 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Thu_Nov_22_11:07:26_2018-1" X-Trace: blaine.gmane.org 1542914465 4710 195.159.176.226 (22 Nov 2018 19:21:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2018 19:21:05 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 22 20:18:03 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gPuUC-000637-Bc for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2018 20:18:03 +0100 Original-Received: from localhost ([::1]:49023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPuWI-0001gT-5q for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2018 14:20:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPuKN-0005sU-0K for emacs-devel@gnu.org; Thu, 22 Nov 2018 14:07:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPuKJ-0000Sp-42 for emacs-devel@gnu.org; Thu, 22 Nov 2018 14:07:51 -0500 Original-Received: from gateway33.websitewelcome.com ([192.185.145.87]:32409) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gPuKG-0000BH-Fs for emacs-devel@gnu.org; Thu, 22 Nov 2018 14:07:47 -0500 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 87DCB4117F00 for ; Thu, 22 Nov 2018 13:07:30 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id PuK1gKiNQSjJAPuK2gjDAc; Thu, 22 Nov 2018 13:07:30 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc: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=VtBB804CvbJuLhXQCD4fGIvcGt1+kTPka0lkWm0ndMc=; b=B3JsxzuB/HmIpXoNJfiWVKukLC ZsO0VtPKVdMmgj9k0Dsj/FCJn5L77yuEfgb/q0qITT9RJzIg+B174IWPP4UyjOfoEmZC0huZGxwT1 2KTI48uH4YIi2Bfgm98W5UlkwqdwnW6Eqgpqp1fp9+ky9w1qZePSlQZ7RB9CqJCXwqUpDhh8/ETuG XN2CahzrgAxuI2bcUPmHMYXzfXUqI6rNS4IGhlkJhKxQE1feYDdrh+UN9Ot3850g30ULiBSvIcqGZ 1o3gcJo3pDX+LZjR7ZTnJaMwq/5jEMzaIj9VpV6+2b6bNcWOkDHzMOvIHabnFkKmpKyxkkSK96Dkp Yof41AlA==; Original-Received: from cpe-98-146-201-115.natnow.res.rr.com ([98.146.201.115]:45796 helo=MBP.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gPuK0-002lMl-92 for emacs-devel@gnu.org; Thu, 22 Nov 2018 13:07:29 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - 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: 98.146.201.115 X-Source-L: No X-Exim-ID: 1gPuK0-002lMl-92 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-98-146-201-115.natnow.res.rr.com (MBP.local) [98.146.201.115]:45796 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.145.87 X-Mailman-Approved-At: Thu, 22 Nov 2018 14:19:54 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231306 Archived-At: --Multipart_Thu_Nov_22_11:07:26_2018-1 Content-Type: text/plain; charset=US-ASCII In working on feature requests #17684 (crosshairs / visible fill column) and #22873 (multiple fake cursors), I have come across a situation where nsterm.m updates a portion of the _active_ window when updating the _inactive_ window. Although this is the case as of 11/16/2018, it was not the case back on 07/07/2018. The change occurred sometime between 07/07/2018 and 11/16/2018. In the following examples, the _active_ window on the right gets updated first in time. Using a version of Emacs from 07/07/2018, updating the _inactive_ window does not cause the active window to be modified. Using a version of Emacs from 11/16/2018, updating the _inactive_ window updates a portion of the _active_ window. The update happens from the top of the window to the X axis of the cursor in the _inactive_ window. In the 07/07/2018 screenshot, the crosshairs and visible fill column in the _active_ window are not touched by updates to the _inactive_ window. In the 11/16/2018 screenshot, the crosshairs and visible fill column in the _active_ window are partially erased by updates to the _inactive_ window. https://www.lawlist.com/images/nsterm_07_07_2018_a.png https://www.lawlist.com/images/nsterm_11_16_2018_a.png The 07/07/2018 example was made with OSX (10.6.8) using Emacs master branch bearing commit 98463bed07ecc9057094928ffdc2321eaaf3ab52 and applying the attached patch (98463bed07ecc9057094928ffdc2321eaaf3ab52__2018_07_07.diff). The 11/16/2018 example was made with OSX (10.6.8) using Emacs master branch bearing commit 644a308b4e1513e04be9360e1586e14b32ec0159 and applying the attached patch (644a308b4e1513e04be9360e1586e14b32ec0159__2018_11_16.diff). QUESTION: When updating the _inactive_ window, how can I prevent the current version of nsterm.m from updating a portion of the _active_ window (from the top of the window to the X axis of the cursor in the _inactive_ window)? STEP 1: Apply the relevant patch to the applicable Emacs versions from either 07/07/2018 or 11/16/2018, and build Emacs --with-ns. STEP 2: From the *GNU Emacs* screen, type: M-F10 (toggle-frame-maximized) M-x split-window-horizontally C-x o (other-window) M-x +-mode Move the cursor in the _active_ window (on the right side of the frame) to the letter "i" in "Darwin", which is the third line from the bottom. The results should be the same as in the screenshots above. --Multipart_Thu_Nov_22_11:07:26_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="644a308b4e1513e04be9360e1586e14b32ec0159__2018_11_16.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDc1NQppbmRleCAwMDAwMDAwLi5iZWMwNzkwCi0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTMwMyBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVH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ICAgICAgICAgIG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmlnaW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0 ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4gKGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0t ZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZh dWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvcHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hp dGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1 dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29ycyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAg ICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAg IChzZXRxIG11bHRpcGxlLWN1cnNvcnMtY29uZgorICAgICAgICAgICAgICAgICAgICAgICAgKG1h cGNhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmR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0gdGhlIGNvbnZlcnNpb24gZnJvbSBMU0wK K2hhcHBlbnMgaW50ZXJuYWxseSBieSBtdWx0aXBseWluZyBlYWNoIGVsZW1lbnQgb2YgdGhlIExT TCBjb2xvciB2ZWN0b3IgYnkgNjU1MzUuIgorKGludGVyYWN0aXZlKQorICAobGV0ICgoYnVmZmVy IChnZXQtYnVmZmVyLWNyZWF0ZSAiKk1DLVRFU1QqIikpKQorICAgICh3aXRoLWN1cnJlbnQtYnVm ZmVyIGJ1ZmZlcgorICAgICAgKGVyYXNlLWJ1ZmZlcikKKyAgICAgIChpbnNlcnQgIlRoaXMgaXMg YSB0ZXN0ISIpCisgICAgICAoc2V0cSBtdWx0aXBsZS1jdXJzb3JzLWNvbmYgJygoMSAiaGJhciIg Im1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDIgImJhciIg InB1cnBsZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyAiYm94IiAi IzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93 IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSAoImhi YXIiIDMpIFsxLjAgMC4wIDEuMF0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkpKSkKKyAgICAoc2VsZWN0LXdpbmRvdyAoZGlz cGxheS1idWZmZXIgYnVmZmVyKSkKKyAgICA7OzsgVGhlIHRyaWdnZXIgaW4gYGtleWJvYXJkLmNg IGlzIG5vdCBhY3RpdmF0ZWQgaW4gdGhpcyBleGFtcGxlLCBzbyB3ZQorICAgIDs7OyBmb3JjZSB0 aGUgbXVsdGlwbGUgY3Vyc29ycyB0byBiZSBkcmF3bi4KKyAgICAobWMtYWN0aXZhdGUtbXVsdGlw bGUtY3Vyc29ycyAoc2VsZWN0ZW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ICAodW5s ZXNzIChtZW1xIHRoaXMtY29tbWFuZCArLXBhcmVucy1leGNsdXNpb25zKQorICAgICAgKCstZGVs ZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisgICAgICAocHJvZ24KKyAgICAg ICAgKCstcGFyZW5zLWZuKQorICAgICAgICAodW5sZXNzIGNyb3NzaGFpcnMtZHJhdy1mb3J0aHdp dGgKKyAgICAgICAgICAobWMtYWN0aXZhdGUtY3Jvc3NoYWlycyAoc2VsZWN0ZWQtd2luZG93KSkp CisgICAgICAgICh3aGVuIChhbmQgKy1maWxsLWNvbHVtbiAobnVsbCBtYy1maWxsLWNvbHVtbi1k cmF3LWZvcnRod2l0aCkpCisgICAgICAgICAgKG1jLWFjdGl2YXRlLWZpbGwtY29sdW1uIChzZWxl Y3RlZC13aW5kb3cpKSkpCisgICAgICAoc2V0cSArLXRpbWVyLXZhciAocnVuLXdpdGgtaWRsZS10 aW1lciArLWlkbGUtdGltZXItc2Vjb25kcyBuaWwgIycrLXRpbWVyLWZuKSkpKSkKKworOzs7IyMj YXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJNaW5vciBtb2RlIGZvciBkaXNw bGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZhbHVlIG5pbAorICA6bGlnaHRl ciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91cCAnKy1tb2RlCisg IChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUnIGhhcyB0aGUgYWJpbGl0eSB0 byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3IuCisgICAgICA7OzsgU2VlIHRo ZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hlbiBtYy1maWxsLWNvbHVtbi1t b2RlCisgICAgICAgIChtYy1maWxsLWNvbHVtbi1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQg Z2xvYmFsLWVsZG9jLW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5 LXAgJ2FueSkKKyAgICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQp KSkKKyAgICAgICAgKGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0 LWxvY2stY29udGV4dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAg ICAgICAgKGNhbmNlbC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsg KHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3Jl cGVhdCAnaml0LWxvY2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2st Y29udGV4dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRp bWVyKQorICAgICAgICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnkt dGltZXIpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAg ICAgICAgICAgKGxhbWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hh bmdlZC1idWZmZXJzIChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0 by1hbWFsZ2FtYXRlICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAg ICAgICAgKGJsaW5rLWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmst Y3Vyc29yLWNoZWNrIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAn cG9zdC1jb21tYW5kLWhvb2sgJ2JsaW5rLWN1cnNvci1jaGVjaykpKQorICAgICAgKHdoZW4gKGFu ZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwg Y3VycmVudC1wcmVmaXgtYXJnICcoNCkpCisgICAgICAgICAgICAgICAgIChudWxsIGNyb3NzaGFp cnMtZHJhdy1mb3J0aHdpdGgpKQorICAgICAgICAoc2V0cSBjcm9zc2hhaXJzLWRyYXctZm9ydGh3 aXRoIHQpKQorICAgICAgKHNldHEgY3Jvc3NoYWlycyB0KQorICAgICAgKHdoZW4gKy1maWxsLWNv bHVtbgorICAgICAgICAoc2V0cSBtYy1maWxsLWNvbHVtbiB0KSkKKyAgICAgIDs7OyBgYXV0by1j b21wb3NpdGlvbi1tb2RlJyBpcyBuZWVkZWQgZm9yIGNyb3NzaGFpcnMgdG8gcHJvcGVybHkgY2Fs Y3VsYXRlCisgICAgICA7OzsgY29vcmRpbmF0ZXMgb2YgY29tcG9zaXRpb24gY2hhcmFjdGVycy4g IEF1dG9tYXRpY2FsbHkgYmVjb21lcyBwZXJtYW5lbnRseQorICAgICAgOzs7IGJ1ZmZlci1sb2Nh bCB3aGVuIHNldC4KKyAgICAgICh1bmxlc3MgYXV0by1jb21wb3NpdGlvbi1tb2RlCisgICAgICAg IChzZXRxIGF1dG8tY29tcG9zaXRpb24tbW9kZSB0KSkKKyAgICAgIDs7OyBAbGF3bGlzdCBpcyBm b2N1c2luZyB0aGUgaW5pdGlhbCBkZXZlbG9wbWVudCBvZiBmZWF0dXJlIHJlcXVlc3RzICMxNzY4 NAorICAgICAgOzs7IGFuZCAjMjI4NzMgb24gTDJSIGxhbmd1YWdlcy4gIFRoZSBmZWF0dXJlIHRl c3QgZmlsZSB1c2VkIGJ5IEBsYXdsaXN0CisgICAgICA7OzsgYm9ncyBFbWFjcyBkb3duIHVubGVz cyBgYmlkaS1kaXNwbGF5LXJlb3JkZXJpbmcnIGlzIHNldCB0byBhIG5pbCB2YWx1ZS4KKyAgICAg IDs7OyBIb3dldmVyLCBtb3N0IHVzZXJzIHdpbGwgcHJvYmFibHkgbm90IHdhbnQgdGhpcyBwYXJ0 aWN1bGFyIHNldHRpbmcuCisgICAgICAodW5sZXNzIChudWxsIGJpZGktZGlzcGxheS1yZW9yZGVy aW5nKQorICAgICAgICAoc2V0cSBiaWRpLWRpc3BsYXktcmVvcmRlcmluZyBuaWwpKQorICAgICAg KHVubGVzcyAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAg ICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKHNldCAobWFr ZS1sb2NhbC12YXJpYWJsZSAnKy0tc2F2ZWQtc3RhdGUpIG5pbCkKKyAgICAgICAgKGRvbGlzdCAo dmFyICcoYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAgICAgICAgICAgICAgICAgICAgZnJpbmdl LWluZGljYXRvci1hbGlzdAorICAgICAgICAgICAgICAgICAgICAgICB0YWItd2lkdGgKKyAgICAg ICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3VhbAorICAgICAgICAgICAgICAgICAgICAg ICB0cnVuY2F0ZS1saW5lcworICAgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1wYXJ0aWFs LXdpZHRoLXdpbmRvd3MKKyAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwKSkKKyAgICAg ICAgICAod2hlbiAobG9jYWwtdmFyaWFibGUtcCB2YXIpCisgICAgICAgICAgICAocHVzaCAoY29u cyB2YXIgKHN5bWJvbC12YWx1ZSB2YXIpKSArLS1zYXZlZC1zdGF0ZSkpKQorICAgICAgICAoc2V0 cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkK KyAgICAgICAgKHNldHEtbG9jYWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJlbnQtbGluZSkKKyAg ICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAgIChzZXRxIGJ1ZmZlci1k aXNwbGF5LXRhYmxlICstYnVmZmVyLWRpc3BsYXktdGFibGUpCisgICAgICAgIChzZXRxIHRhYi13 aWR0aCA0KQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlz dWFsKSB0KQorICAgICAgICAoc2V0cSB0cnVuY2F0ZS1saW5lcworICAgICAgICAgIChjb25kCisg ICAgICAgICAgICAoKGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisg ICAgICAgICAgICAgICAgICAgIG1vZGUpCisgICAgICAgICAgICAgIChjYXRjaCAnZm91bmQKKyAg ICAgICAgICAgICAgICAod2hpbGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAg ICAgICAod2hlbiAoZGVyaXZlZC1tb2RlLXAgbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgKHRo cm93ICdmb3VuZCB0KSkpKSkpCisgICAgICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVu Y2F0ZS1saW5lcy1tYWpvci1tb2RlcykpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAg IG5pbCkpKQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0 aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkKKyAgICAgICAgKHNldHEgd29yZC13cmFwIHQpCisgICAg ICAgIChzZXRxIGluZGljYXRlLWVtcHR5LWxpbmVzIHQpCisgICAgICAgIChzZXRxIGluZGljYXRl LWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAgICAgICAoc2V0cSBmcmluZ2UtaW5kaWNhdG9y LWFsaXN0CisgICAgICAgICAgICA7OzsgaHNjbF9hbGxfdGVtcF9wIHwgaHNjbF90ZW1wX3AKKyAg ICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1sZWZ0CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1kb3VibGUtYW5nbGUtbGVmdCkpCisgICAgICAgICAgICA7Ozsg aHNjbF9hbGxfcGVybV8wX3AgfCBoc2NsX2FsbF9wZXJtXzFfcCB8IGhzY2xfYWxsX3Blcm1fMl9w IHwgaHNjbF9wZXJtX3AKKyAgICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNpbmdsZS1hbmds ZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLXVwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKy10cmlwbGUtYW5nbGUtdXAKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgICAoKy1vdmVy bGF5LWFycm93IC4gKCstZnJpbmdlLWxlZnQtYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKHRydW5jYXRpb24g LiAoKy1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmlu Z2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKGNvbnRpbnVhdGlvbiAuICgrLWZyaW5nZS1s ZWZ0LWN1cmx5LWFycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNo KSkKKyAgICAgICAgICAgIChvdmVybGF5LWFycm93IC4gKy1mcmluZ2UtcmlnaHQtdHJpYW5nbGUp CisgICAgICAgICAgICAodXAgLiArLWZyaW5nZS11cC1hcnJvdykKKyAgICAgICAgICAgIChkb3du IC4gKy1mcmluZ2UtZG93bi1hcnJvdykKKyAgICAgICAgICAgICh0b3AgLiArLWZyaW5nZS10b3At bGVmdC1hbmdsZSkKKyAgICAgICAgICAgIChib3R0b20gLiArLWZyaW5nZS1ib3R0b20tcmlnaHQt YW5nbGUpCisgICAgICAgICAgICAodG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWJyYWNrZXQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXRvcC1yaWdodC1hbmdsZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgICAg KGVtcHR5LWxpbmUgLiArLWZyaW5nZS1lbXB0eS1saW5lKQorICAgICAgICAgICAgKHVua25vd24g LiArLWZyaW5nZS1xdWVzdGlvbi1tYXJrKSkpCisgICAgICAgIChzZXRxIGZyaW5nZS1jdXJzb3It YWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVmdC10cmlhbmdsZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChob2xsb3cgLiArLWhvbGxvdy1yZWN0YW5nbGUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYmFyIC4gKy12ZXJ0aWNhbC1iYXIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGJhciAuICstZnJpb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isKKzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OworCisoZGVmdW4gKy1wYXJl bnMtZm4gKCkKKyAgIkRvYy1zdHJpbmcuIgorICAobGV0KiAoKG9wb2ludCAocG9pbnQpKQorICAg ICAgICAgKGZyb20gKGlmICstcGFyZW5zLWZyb20tZm4KKyAgICAgICAgICAgICAgICAgKGZ1bmNh bGwgKy1wYXJlbnMtZnJvbS1mbikKKyAgICAgICAgICAgICAgICAgKHBvaW50LW1pbikpKQorICAg ICAgICAgKHdpbiAoc2VsZWN0ZWQtd2luZG93KSkKKyAgICAgICAgIChpIDApCisgICAgICAgICAo cHJlY2VkaW5nLWNoYXIgKHByZWNlZGluZy1jaGFyKSkKKyAgICAgICAgIChvY2hhciAoY2hhci1h ZnRlciBvcG9pbnQpKQorICAgICAgICAgKHBvczEKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAg ICAgICAoKGFuZCBvY2hhcgorICAgICAgICAgICAgICAgICAgIChvciA7OzsgKGNoYXItdG8tc3Ry aW5nIDQwKSA9PiBvcGVuaW5nIHBhcmVudGhlc2lzCisgICAgICAgICAgICAgICAgICAgICAgICg9 IG9jaGFyIDQwKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDkx KSA9PiBvcGVuaW5nIHNxdWFyZSBicmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICg9IG9j aGFyIDkxKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyMykg PT4gb3BlbmluZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIg MTIzKSkpCisgICAgICAgICAgICAgICAgKG1pbiAoMSsgb3BvaW50KSAocG9pbnQtbWF4KSkpCisg ICAgICAgICAgICAgKChvciA7OzsgKGNoYXItdG8tc3RyaW5nIDQxKSA9PiBjbG9zaW5nIHBhcmVu dGhlc2lzCisgICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKKyAgICAgICAg ICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTMpID0+IGNsb3Npbmcgc3F1YXJlIGJyYWNr ZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDkzKQorICAgICAgICAgICAg ICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFja2V0Cisg ICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciAxMjUpKQorICAgICAgICAgICAgICAg IChtYXggKHBvaW50LW1pbikgKDEtIG9wb2ludCkpKQorICAgICAgICAgICAgICh0CisgICAgICAg ICAgICAgICAgb3BvaW50KSkpCisgICAgICAgICBwb3MyCisgICAgICAgICBzZWxlY3RlZC1mYWNl KQorICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgKGNvbmRpdGlvbi1jYXNlIG5pbAorICAgICAg ICAod2hpbGUgKHNldHEgcG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9tIHBvczEp KSkKKyAgICAgICAgICAoc2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEgMSkpCisgICAgICAgICAg KGlmICg9IGkgMTApCisgICAgICAgICAgICAoc2V0cSBpIDEpCisgICAgICAgICAgICAoc2V0cSBp ICgxKyBpKSkpCisgICAgICAgICAgKHNldHEgc2VsZWN0ZWQtZmFjZSAoY29uZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1vbmUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKCg9IGkgMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJl bnMtdHdvLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDMpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXRocmVlLWZhY2UpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDQpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJystcGFyZW5zLWZvdXItZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZml2ZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA2KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zaXgt ZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtc2V2ZW4tZmFjZSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgOCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAnKy1wYXJlbnMtZWlnaHQtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKCg9IGkgOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtbmluZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAx MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGVuLWZhY2Up KSkKKyAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBwb3MxKSkpKQor ICAgICAgICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAg ICAgIChvdmVybGF5LXB1dCBvdiAnd2luZG93IHdpbikpCisgICAgICAgICAgICAob3ZlcmxheS1w dXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpCisgICAgICAgICAgKHdoZW4gcG9zMgorICAgICAg ICAgICAgKGxldCAoKG92IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIpKSkKKyAgICAgICAg ICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAgICAg KG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0 IG92ICdmYWNlIHNlbGVjdGVkLWZhY2UpKSkpCisgICAgICAgIChlcnJvciBuaWwpKSkKKyAgICAo c2V0cSArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wIHQpKSkKKworKGRlZnVuICstcmVtb3ZlLW92 ZXJsYXlzIChiZWcgZW5kIG5hbWUgdmFsKQorIlJlbW92ZSB0aGUgb3ZlcmxheXMgdGhhdCBhcmUg YGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzYC4KK0luY2x1ZGVzIGEgdW5pcXVlIHNpdHVhdGlv biB3aGVuIGFuIG92ZXJsYXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVydHkKK2lzIGF0 IHRoZSB2ZXJ5IGVuZCBvZiBhIG5hcnJvd2VkLWJ1ZmZlci4iCisgIChsZXQqICgocG9pbnQtbWF4 IChwb2ludC1tYXgpKQorICAgICAgICAgKHBvaW50LW1pbiAocG9pbnQtbWluKSkKKyAgICAgICAg IChuYXJyb3dlZC1wIChidWZmZXItbmFycm93ZWQtcCkpCisgICAgICAgICAoYmVnIChpZiBiZWcg YmVnIHBvaW50LW1pbikpCisgICAgICAgICAoZW5kCisgICAgICAgICAgIChjb25kCisgICAgICAg ICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAg ICAgICAgICBlbmQpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAg ICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICAobnVsbCBl bmQpKQorICAgICAgICAgICAgICAgcG9pbnQtbWF4KQorICAgICAgICAgICAgICgoYW5kCisgICAg ICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAgICAgICAg ICAgICAgICg8IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgZW5kKQorICAgICAgICAg ICAgICgoYW5kCisgICAgICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAg ZW5kCisgICAgICAgICAgICAgICAgICg9IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAg KDErIGVuZCkpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQt cAorICAgICAgICAgICAgICAgICAobnVsbCBlbmQpKQorICAgICAgICAgICAgICAgKDErIHBvaW50 LW1heCkpICkpCisgICAgICAgICAob3ZlcmxheXMKKyAgICAgICAgICAgKHByb2duCisgICAgICAg ICAgICAgKG92ZXJsYXktcmVjZW50ZXIgZW5kKQorICAgICAgICAgICAgIChvdmVybGF5cy1pbiBi ZWcgZW5kKSkpKQorICAgICh3aGVuIChhbmQgYmVnIGVuZCBuYW1lIHZhbCkKKyAgICAgIChkb2xp c3QgKG8gb3ZlcmxheXMpCisgICAgICAgIChjb25kCisgICAgICAgICAgKChhbmQgKGVxIG5hbWUg J2ZhY2UpCisgICAgICAgICAgICAgICAgKGVxIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisg ICAgICAgICAgICA7OyBFaXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0c2lkZSBiZWcuLi5lbmQK KyAgICAgICAgICAgIDs7IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCisgICAgICAg ICAgICA7OyBvciBkZWxldGUgaXQgZW50aXJlbHkgKGlmIGl0IGlzIGNvbnRhaW5lZCBpbiBiZWcu Li5lbmQpLgorICAgICAgICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAg ICAgICAgICAgICAoaWYgKD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKKyAgICAgICAgICAgICAgKHBy b2duCisgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5IG8pCisgICAg ICAgICAgICAgICAgICAob3ZlcmxheS1zdGFydCBvKSBiZWcpCisgICAgICAgICAgICAgICAgKG1v dmUtb3ZlcmxheSBvIGVuZCAob3ZlcmxheS1lbmQgbykpKQorICAgICAgICAgICAgICAgICAgKG1v dmUtb3ZlcmxheSBvIChvdmVybGF5LXN0YXJ0IG8pIGJlZykpCisgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBv IGVuZCAob3ZlcmxheS1lbmQgbykpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVybGF5IG8p KSkpCisgICAgICAgICAgKChhbmQgKG5vdCAoZXEgbmFtZSAnZmFjZSkpCisgICAgICAgICAgICAg ICAgKGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkp CisgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkpKSkKKworKGRlZnVuICstZGVsZXRl LXBhcmVucy1vdmVybGF5cyAoKQorICAod2hlbiArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wCisg ICAgKGRvbGlzdCAoZmFjZSAnKCstcGFyZW5zLW9uZS1mYWNlCisgICAgICAgICAgICAgICAgICAg ICstcGFyZW5zLXR3by1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oZGVmaW5l LWZyaW5nZS1iaXRtYXAgJystZnJpbmdlLWZpbGxlZC1yZWN0YW5nbGUgKCstZnJpbmdlLWhlbHBl ci1kZWNpbWFsCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4i CisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4 eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iKSBuaWwg bmlsICdjZW50ZXIpCisKKyhkZWZpbmUtZnJpbmdlLWJpdG1hcCAnKy1mcmluZ2UtaG9sbG93LXNx dWFyZSAoKy1mcmluZ2UtaGVscGVyLWRlY2ltYWwKKyIueHh4eHh4LiIKKyIueC4uLi54LiIKKyIu eC4uLi54LiIKKyIueC4uLi54LiIKKyIueC4uLi54LiIKKyIueHh4eHh4LiIpIG5pbCBuaWwgJ2Nl bnRlcikKKworKGRlZmluZS1mcmluZ2UtYml0bWFwICcrLWZyaW5nZS1maWxsZWQtc3F1YXJlICgr LWZyaW5nZS1oZWxwZXItZGVjaW1hbAorIi54eHh4eHguIgorIi54eHh4eHguIgorIi54eHh4eHgu IgorIi54eHh4eHguIgorIi54eHh4eHguIgorIi54eHh4eHguIikgbmlsIG5pbCAnY2VudGVyKQor CisoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJystZnJpbmdlLWhvcml6b250YWwtYmFyICgrLWZyaW5n ZS1oZWxwZXItZGVjaW1hbAorInh4eHh4eHguIgorInh4eHh4eHguIikgbmlsIG5pbCAnYm90dG9t KQorCisoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJystZnJpbmdlLWVtcHR5LWxpbmUgKCstZnJpbmdl LWhlbHBlci1kZWNpbWFsCisiLi4uLi4uLi4iCisiLi54eHh4Li4iCisiLi4uLi4uLi4iCisiLi4u Li4uLi4iCisiLi54eHh4Li4iCisiLi4uLi4uLi4iKSBuaWwg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IHRo ZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkKKyAgICAobWMt ZmlsbC1jb2x1bW4tbW9kZQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAg ICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVs ZG9jLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisg ICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGpp dC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0 LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0 LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisg ICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNl bC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0 ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChh ZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQt YnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkp CisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1v ZGUgLTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21t YW5kLWhvb2spCisgICAgICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxp bmstY3Vyc29yLWNoZWNrKSkpCisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVs eS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0 KSkKKyAgICAgICAgICAgICAgICAgKG51bGwgbWMtZmlsbC1jb2x1bW4tZHJhdy1mb3J0aHdpdGgp KQorICAgICAgICAoc2V0cSBtYy1maWxsLWNvbHVtbi1kcmF3LWZvcnRod2l0aCB0KSkKKyAgICAg IChzZXRxIG1jLWZpbGwtY29sdW1uIHQpCisgICAgICA7OzsgYGF1dG8tY29tcG9zaXRpb24tbW9k ZScgaXMgbmVlZGVkIGZvciBjcm9zc2hhaXJzIHRvIHByb3Blcmx5IGNhbGN1bGF0ZQorICAgICAg Ozs7IGNvb3JkaW5hdGVzIG9mIGNvbXBvc2l0aW9uIGNoYXJhY3RlcnMuICBBdXRvbWF0aWNhbGx5 IGJlY29tZXMgcGVybWFuZW50bHkKKyAgICAgIDs7OyBidWZmZXItbG9jYWwgd2hlbiBzZXQuCisg ICAgICAodW5sZXNzIGF1dG8tY29tcG9zaXRpb24tbW9kZQorICA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b3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJncmVlbiIpCisgICAgKCgoY2xhc3Mg Y29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91 bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dy b3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJvcmFuZ2UiKQorICAgICgoKGNsYXNzIGNv bG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAgICAoKCh0 eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0IDpm b3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1iZXlvbmQtZmlsbC1jb2x1bW4tZmFj ZScuICBVc2VkIGluIGB4ZGlzcC5jJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisKKyhkZWZmYWNl ICstYmV5b25kLWZpbGwtY29sdW1uLWluYWN0aXZlLWZhY2UKKyAgJygoKChjbGFzcyBjb2xvcikg KG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGRhcmspKQorICAgICA6Zm9yZWdyb3VuZCAiIzJl OGI1NyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBs aWdodCkgKHR5cGUgZ3RrKSkKKyAgICAgOmZvcmVncm91bmQgImd0a19zZWxlY3Rpb25fZmdfY29s b3IiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGln aHQpICh0eXBlIG5zKSkKKyAgICAgOmZvcmVncm91bmQgIiMyZThiNTciKQorICAgICgoKGNsYXNz IGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQ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bGxfY29sdW1uKSwgaWR4KTsgKytpZHg7CisgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVm ZmVyX2xvY2FsX2ZsYWdzLCBtY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aCksIGlkeCk7ICsr aWR4OworICBYU0VURkFTVElOVCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgbWNfZmlsbF9j b2x1bW5faW5hY3RpdmVfd2luZG93cyksIGlkeCk7ICsraWR4OworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBt b2RlX2xpbmVfZm9ybWF0KSwgaWR4KTsgKytpZHg7CiAgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVm ZmVyX2xvY2FsX2ZsYWdzLCBhYmJyZXZfbW9kZSksIGlkeCk7ICsraWR4OwogICBYU0VURkFTVElO VCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgb3ZlcndyaXRlX21vZGUpLCBpZHgpOyArK2lk eDsKQEAgLTUxNzgsNiArNTIwMCwyOCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICAvKiBN dXN0IGRvIHRoZXNlIGJlZm9yZSBtYWtpbmcgdGhlIGZpcnN0IGJ1ZmZlciEgKi8KIAogICAvKiBy ZWFsIHNldHVwIGlzIGRvbmUgaW4gYmluZGluZ3MuZWwgKi8KKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBic2V0X2Jsdl9tY19yZWFsX2Zh a2VfY3Vyc29yICgmYnVmZmVyX2RlZmF1bHRzLCBRaG9sbG93KTsKKyAgYnNldF9ibH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XIsICJjcm9zc2hhaXJzLXZlcnRp Y2FsLXJ1bGVyIik7CisgIERFRlNZTSAoUWNyb3NzaGFpcnNfZHJhd19mb3J0aHdpdGgsICJjcm9z c2hhaXJzLWRyYXctZm9ydGh3aXRoIik7CisgIERFRlNZTSAoUWNyb3NzaGFpcnNfaW5hY3RpdmVf d2luZG93cywgImNyb3NzaGFpcnMtaW5hY3RpdmUtd2luZG93cyIpOworICBERUZTWU0gKFFtY19z dGRlcnIsICJtYy1zdGRlcnIiKTsKKyAgREVGU1lNIChRbWNfZmlsbF9jb2x1bW4sICJtYy1maWxs LWNvbHVtbiIpOworICBERUZTWU0gKFFtY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aCwgIm1j LWZpbGwtY29sdW1uLWRyYXctZm9ydGh3aXRoIik7CisgIERFRlNZTSAoUW1jX2ZpbGxfY29sdW1u X2luYWN0aXZlX3dpbmRvdywgIm1jLWZpbGwtY29sdW1uLWluYWN0aXZlLXdpbmRvdyIpOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIERFRlNZTSAoUWNob2ljZSwgImNob2ljZSIp OwogICBERUZTWU0gKFFsZWZ0LCAibGVmdCIpOwogICBERUZTWU0gKFFyaWdodCwgInJpZ2h0Iik7 CkBAIC01NDUzLDYgKzU1MTgsNjUgQEAgc3ltc19vZl9idWZmZXIgKHZvaWQpCiAgIEZwdXQgKFFw cm90ZWN0ZWRfZmllbGQsIFFlcnJvcl9tZXNzYWdlLAogCWJ1aWxkX3B1cmVfY19zdHJpbmcgKCJB dHRlbXB0IHRvIG1vZGlmeSBhIHByb3RlY3RlZCBmaWVsZCIpKTsKIAorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi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VybiBvZmYvb24KK2Bt Yy1maWxsLWNvbHVtbi1tb2RlJyB0byByZXNldCBmdW5jdGlvbnMgYXR0YWNoZWQgdG8gdGhlIGBw b3N0LWNvbW1hbmQtaG9vaycuICovKTsKKworICBERUZWQVJfUEVSX0JVRkZFUiAoIm1jLWZpbGwt Y29sdW1uLWluYWN0aXZlLXdpbmRvd3MiLCAmQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX2ZpbGxf Y29sdW1uX2luYWN0aXZlX3dpbmRvd3MpLCBRbmlsLAorICAgIGRvYzogLyogV2hlbiBub24tbmls LCBkcmF3IG11bHRpcGxlIGN1cnNvcnMgZmlsbCBjb2x1bW4gaW4gaW5hY3RpdmUgd2luZG93cy4g Ki8pOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIERFRlZBUl9QRVJfQlVGRkVS ICgiaGVhZGVyLWxpbmUtZm9ybWF0IiwKIAkJICAgICAmQlZBUiAoY3VycmVudF9idWZmZXIsIGhl YWRlcl9saW5lX2Zvcm1hdCksCiAJCSAgICAgUW5pbCwKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIu aCBiL3NyYy9idWZmZXIuaAppbmRleCA0ZWE3ZmE2Li4yMzA1ZjQ3IDEwMDY0NAotLS0gYS9zcmMv YnVmZmVyLmgKKysrIGIvc3JjL2J1ZmZlci5oCkBAIC02MzYsNiArNjM2LDUyIEBAIHN0cnVjdCBi dWZmZXIKICAgICAgY2FjaGUgYXJlIGVuYWJsZWQuICBTZWUgc2VhcmNoLmMsIGluZGVudC5jIGFu ZCBiaWRpLmMgZm9yIGRldGFpbHMuICAqLwogICBMaXNwX09iamVjdCBjYWNoZV9sb25nX3NjYW5z XzsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy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Y29kZSBzaG91bGQgdXNlIHRoZXNlIGZ1bmN0aW9ucyB0byBzZXQgTGlzcCBmaWVsZHMgaW4g c3RydWN0CiAgICBidWZmZXIuICAoU29tZSBzZXR0ZXJzIHRoYXQgYXJlIHByaXZhdGUgdG8gYSBz aW5nbGUgLmMgZmlsZSBhcmUKICAgIGRlZmluZWQgYXMgc3RhdGljIGluIHRob3NlIGZpbGVzLikg ICovCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19yZWFsX2Zha2VfY3Vyc29yIChzdHJ1Y3QgYnVm ZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX3JlYWxfZmFrZV9jdXJzb3JfID0g dmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfbXVsdGlwbGVfY3Vyc29yc19jb25mIChz dHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm11bHRpcGxlX2N1cnNv cnNfY29uZl8gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tdWx0aXBsZV9jdXJz b3JzX2RyYXdfZm9ydGh3aXRoIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPm11bHRpcGxlX2N1cnNvcnNfZHJhd19mb3J0aHdpdGhfID0gdmFsOworfQorCitJTkxJ TkUgdm9pZAorYnNldF9ibHZfbXVsdGlwbGVfY3Vyc29yc19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1 Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm11bHRpcGxlX2N1cnNvcnNf aW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2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NvbHVtbl8gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19m aWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aCAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3Qg dmFsKQoreworICBiLT5tY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aF8gPSB2YWw7Cit9CisK K0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19maWxsX2NvbHVtbl9pbmFjdGl2ZV93aW5kb3dzIChz dHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX2ZpbGxfY29sdW1u X2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiBJTkxJTkUgdm9pZAogYnNldF9iaWRpX3BhcmFncmFwaF9kaXJlY3Rpb24gKHN0cnVjdCBi dWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKIHsKZGlmZiAtLWdpdCBhL3NyYy9kaXNwZXh0ZXJu LmggYi9zcmMvZGlzcGV4dGVybi5oCmluZGV4IDU3OTY2NWMuLmI1ZWUxMzUgMTAwNjQ0Ci0tLSBh L3NyYy9kaXNwZXh0ZXJuLmgKKysrIGIvc3JjL2Rpc3BleHRlcm4uaApAQCAtOTQsNiArOTQsMjgg QEAgdHlwZWRlZiBpbnQgQ3Vyc29yOwogI2RlZmluZSBOYXRpdmVSZWN0YW5nbGUgaW50CiAjZW5k aWYKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8K KworZW51bSBtY190eXBlcworeworICBOT19GTEFWT1IsCisgIE1DX0dMWVBILAorICBNQ19HTFlQ SExFU1MsCisgIE1DX0dMWVBIX1RBQiwKKyAgTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAsCisgIE1D X1BJTENST1csCisgIE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1csCisgIE1DX0hPTExP V19SRUNUQU5HTEUsCisgIE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVywKKyAgTUNfVkVSVElD QUxfQkFSLAorICBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICit9OworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAvKiBUZXh0IGN1cnNvciB0eXBlcy4gICovCiAKIGVudW0gdGV4dF9j dXJzb3Jfa2luZHMKQEAgLTM3Niw2ICszOTgsMTggQEAgc3RydWN0IGdseXBoX3NsaWNlCiAKIHN0 cnVjdCBnbHlwaAogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisgIGludCB4LCB5LCBocG9zLCB2cG9zOworCisgIGJvb2xfYmYgenZfcCA6 IDE7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogUG9zaXRpb24gZnJvbSB3 aGljaCB0aGlzIGdseXBoIHdhcyBkcmF3bi4gIElmIGBvYmplY3QnIGJlbG93IGlzIGEKICAgICAg TGlzcCBzdHJpbmcsIHRoaXMgaXMgYW4gaW5kZXggaW50byB0aGF0IHN0cmluZy4gIElmIGl0IGlz IGEKICAgICAgYnVmZmVyLCB0aGlzIGlzIGEgcG9zaXRpb24gaW4gdGhhdCBidWZmZXIuICBJbiBh ZGRpdGlvbiwgc29tZQpAQCAtMjIxMCw2ICsyMjQ0LDE2IEBAIHN0cnVjdCBjb21wb3NpdGlvbl9p dAogCiBzdHJ1Y3QgaXQKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFIENVUlNPUlMgKi8KKworICBib29sX2JmIHp2X3AgOiAxOworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgIC8qIFRoZSB3aW5kb3cgaW4gd2hpY2ggd2UgaXRlcmF0ZSBvdmVyIGN1 cnJlbnRfYnVmZmVyIChvciBhIHN0cmluZykuICAqLwogICBMaXNwX09iamVjdCB3aW5kb3c7CiAg IHN0cnVjdCB3aW5kb3cgKnc7CmRpZmYgLS1naXQgYS9zcmMvZnJhbWUuaCBiL3NyYy9mcmFtZS5o CmluZGV4IGFkNzM3NmEuLjMxZDk1MjcgMTAwNjQ0Ci0tLSBhL3NyYy9mcmFtZS5oCisrKyBiL3Ny Yy9mcmFtZS5oCkBAIC0yMDIsNiArMjAyLDE2IEBAIHN0cnVjdCBmcmFtZQogCiAgIC8qIEJleW9u ZCBoZXJlLCB0aGVyZSBzaG91bGQgYmUgbm8gbW9yZSBMaXNwX09iamVjdCBjb21wb25lbnRzLiAg Ki8KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8K KworICAvKiBOb24tbmlsIHdoZW4gdGhlIGZyYW1lIGlzIGluIHRoZSBwcm9jZXNzIG9mIGJlaW5n IHVwZGF0ZWQuICovCisgIHN0cnVjdCBmcmFtZSAqbWNfdXBkYXRpbmdfZnJhbWU7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgLyogQ2FjaGUgb2YgcmVhbGl6ZWQgZmFjZXMuICAq LwogICBzdHJ1Y3QgZmFjZV9jYWNoZSAqZmFjZV9jYWNoZTsKIApkaWZmIC0tZ2l0IGEvc3JjL2Zy aW5nZS5jIGIvc3JjL2ZyaW5nZS5jCmluZGV4IGExMDE2YWQuLjJhNTU3M2EgMTAwNjQ0Ci0tLSBh L3NyYy9mcmluZ2UuYworKysgYi9zcmMvZnJpbmdlLmMKQEAgLTQzMyw2ICs0MzMsNDAyIEBAIHN0 YXRpYyB1bnNpZ25lZCBzaG9ydCBlbXB0eV9saW5lX2JpdHNbXSA9IHsKICAgMHgwMCwgMHgzYywg MHgwMCwgMHgwMCwgMHgzYywgMHgwMCwgMHgwMCwgMHgzYywgMHgwMH07CiAKIAorLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIGArLWZy aW5nZS1oZWxwZXItZGVjaW1hbCcgZGVmaW5lZCBpbiBgY3Jvc3NoYWlycy5lbGAgKi8KKworLyog MjQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAg ICAieC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC54eHh4eHgiCisgICAgICAi eC54eHh4eHgiCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4u eHguLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4u Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ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gICAgIi4uLnh4Li4uIgorICAgICAgIi4uLnh4Li4uIgorICAgICAgIi4uLi54eC4uIgorICAg ICAgIi4uLi54eC4uIgorICAgICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4ueHguIgorICAgICAg Ii4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfYmFja3NsYXNoX2JpdHNbXSA9eworICAweGMwLCAweGMwLCAweGUwLCAweDYwLCAweDMwLCAw eDMwLCAweDE4LCAweDE4LCAweGMsIDB4YywgMHg2LCAweDYsIDB4MywgMHgzfTsKKworLyogMjkK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHguLi4uLi4iCisgICAg ICAieHguLi4uLi4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAi eC54eC4uLi4iCisgICAgICAieC54eC4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4u eHguLi4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54 eC4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgi KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2Jp dHNbXSA9eworICAweGMwLCAweGMwLCAweGUwLCAweGUwLCAweGIwLCAweGIwLCAweDk4LAorICAw eDk4LCAweDhjLCAweDhjLCAweDg2LCAweDg2LCAweDgzLCAweDgzfTsKKworLyogMzAKKyAgICAo Ky1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLnh4eHh4eC4iCisgICAgICAieHh4 eC54Li4iCisgICAgICAieHh4eC54Li4iCisgICAgICAieHh4eC54Li4iCisgICAgICAiLnh4eC54 Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4i CisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iKQor Ki8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19waWxjcm93X2JpdHNbXSA9eworICAweDdlLCAw eGY0LCAweGY0LCAweGY0LCAweDc0LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0 fTsKKworLyogMzEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54 eHh4Li4iCisgICAgICAiLnh4eHh4eC4iCisgICAgICAieC4ueHguLngiCisgICAgICAieC4ueHgu LngiCisgICAgICAieHh4eHh4eHgiCisgICAgICAieHguLi4ueHgiCisgICAgICAieHh4Li54eHgi CisgICAgICAiLnh4eHh4eC4iCisgICAgICAiLi54eHh4Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19zbWlsZXlfZmFjZV9iaXRzW10gPXsKKyAgMHgzYywgMHg3ZSwgMHg5OSwgMHg5 OSwgMHhmZiwgMHhjMywgMHhlNywgMHg3ZSwgMHgzY307CisKKy8qIDMyCisgICAgKCstZnJpbmdl LWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgor ICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLi4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAg ICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfc2luZ2xlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweDIwLCAweDEwLCAweDgsIDB4 NCwgMHg4LCAweDEwLCAweDIwfTsKKworLyogMzMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAiLi4uLi54Li4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4ueC4u Li4iCisgICAgICAiLi54Li4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLnguLi4i CisgICAgICAiLi4uLi54Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVf YW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHg0LCAweDgsIDB4MTAsIDB4MjAsIDB4MTAsIDB4OCwg MHg0fTsKKworLyogMzQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAi eHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4u eHgueHgiCisgICAgICAiLi54eC54eC4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHgu Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0 c1tdID17CisgIDB4ZDgsIDB4NmMsIDB4MzYsIDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDh9OworCisv KiAzNQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi54eC54eCIK KyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICJ4eC54eC4uLiIKKyAg ICAgICIueHgueHguLiIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIuLi54eC54eCIpCisqLwor c3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAw eDFiLCAweDM2LCAweDZjLCAweGQ4LCAweDZjLCAweDM2LCAweDFifTsKKworLyogMzYKKyAgICAo Ky1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC54LnguLi4iCisgICAgICAiLngu eC54Li4iCisgICAgICAiLi54LngueC4iCisgICAgICAiLi4ueC54LngiCisgICAgICAiLi54Lngu eC4iCisgICAgICAiLngueC54Li4iCisgICAgICAieC54LnguLi4iKQorKi8KK3N0YXRpYyB1bnNp Z25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfcmlnaHRfYml0c1tdID17CisgIDB4YTgsIDB4NTQs IDB4MmEsIDB4MTUsIDB4MmEsIDB4NTQsIDB4YTh9OworCisvKiAzNworICAgICgrLWZyaW5nZS1o ZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi54LngueCIKKyAgICAgICIuLngueC54LiIKKyAg ICAgICIueC54LnguLiIKKyAgICAgICJ4LngueC4uLiIKKyAgICAgICIueC54LnguLiIKKyAgICAg ICIuLngueC54LiIKKyAgICAgICIuLi54LngueCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0 IG1jX3RyaXBsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDE1LCAweDJhLCAweDU0LCAweGE4 LCAweDU0LCAweDJhLCAweDE1fTsKKworLyogMzgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4 MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAs IDB4MDAsIDB4MDB9OworCisvKiAzOQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAg ICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGlj IHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAw eDAwLCAweDAwLCAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAw LCAweDAwfTsKKworLyogNDAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4u eC4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4i KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfdXBfYml0c1tdID17 CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQs IDB4ODIsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiA0MQorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9h bmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDgyLCAweDQ0LCAweDI4 LCAweDkyLCAweDQ0LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDIKKyAg ICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4u eC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4i CisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVf YW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4Mjgs IDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDB9OworCisvKiA0MworICAgICgrLWZy aW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54 LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAg ICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAg ICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3F1YWRydXBsZV9hbmds ZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAw eDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEwLCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAi LnguLi54Li4iCisgICAgICAieC4uLi4ueC4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19xdWFkcnVwbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIs IDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODJ9Owor CisvKiA0NQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4Li4uLi54 LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAg ICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAg ICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIpCisqLworc3Rh dGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDgy LCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAw eDQ0LCAweDI4LCAweDEwfTsKKworLyogVE9ETzogIEFkZCB0aGUgZm9sbG93aW5nIGJpdG1hcHM6 CisgIChkZWZpbmUtZnJpbmdlLWJpdG1hcCAnYnJlYWtwb2ludCAiXHgzY1x4N2VceGZmXHhmZlx4 ZmZceGZmXHg3ZVx4M2MiKQorICAoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJ2hvbGxvdy1yaWdodC10 cmlhbmdsZSAiXHhlMFx4OTBceDg4XHg4NFx4ODRceDg4XHg5MFx4ZTAiKSAqLworCisvKiBlbmQg TVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmlu ZSBCWVRFU19QRVJfQklUTUFQX1JPVyAgKHNpemVvZiAodW5zaWduZWQgc2hvcnQpKQogI2RlZmlu ZSBTVEFOREFSRF9CSVRNQVBfSEVJR0hUKGJpdHMpIChzaXplb2YgKGJpdHMpL0JZVEVTX1BFUl9C SVRNQVBfUk9XKQogI2RlZmluZSBGUkJJVFMoYml0cykgIGJpdHMsIFNUQU5EQVJEX0JJVE1BUF9I RUlHSFQgKGJpdHMpCkBAIC00NjYsNiArODYyLDU5IEBAIHN0YXRpYyBzdHJ1Y3QgZnJpbmdlX2Jp dG1hcCBzdGFuZGFyZF9iaXRtYXBzW10gPQogICB7IEZSQklUUyAodmVydGljYWxfYmFyX2JpdHMp LCAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCiAgIHsgRlJCSVRTIChob3Jp em9udGFsX2Jhcl9iaXRzKSwgICAgIDgsIDAsIEFMSUdOX0JJVE1BUF9CT1RUT00sIDAgfSwKICAg eyBGUkJJVFMgKGVtcHR5X2xpbmVfYml0cyksICAgICAgICAgOCwgMywgQUxJR05fQklUTUFQX1RP UCwgICAgMCB9LAorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VS U09SUyAqLworCisgIC8qIDI0ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfcmlnaHRf YXJyb3dfYml0cyksICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI1 ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHMpLCA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI2ICovCisgIHsgRlJCSVRTICht Y19ob2xsb3dfcmVjdGFuZ2xlX2JpdHMpLCAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCisgIC8qIDI3ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYml0 cyksICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8q IDI4ICovCisgIHsgRlJCSVRTIChtY19iYWNrc2xhc2hfYml0cyksICAgICAgICAgICAgICAgICAg ICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI5ICovCisgIHsgRlJCSVRT IChtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2JpdHMpLCAgICAgICA4LCAwLCBBTElHTl9CSVRN QVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMwICovCisgIHsgRlJCSVRTIChtY19waWxjcm93X2JpdHMp LCAgICAgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisg IC8qIDMxICovCisgIHsgRlJCSVRTIChtY19zbWlsZXlfZmFjZV9iaXRzKSwgICAgICAgICAgICAg ICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMyICovCisgIHsgRlJC SVRTIChtY19zaW5nbGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9C SVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMzICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5n bGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0s CisgIC8qIDM0ICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0cyksICAg ICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM1ICovCisgIHsg RlJCSVRTIChtY19kb3VibGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM2ICovCisgIHsgRlJCSVRTIChtY190cmlwbGVf YW5nbGVfcmlnaHRfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisgIC8qIDM3ICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfbGVmdF9iaXRzKSwg ICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM4ICovCisg IHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBB TElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM5ICovCisgIHsgRlJCSVRTIChtY19zaW5n bGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVS LCAwIH0sCisgIC8qIDQwICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfdXBfYml0cyks ICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQxICov CisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAw LCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQyICovCisgIHsgRlJCSVRTIChtY190 cmlwbGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VO VEVSLCAwIH0sCisgIC8qIDQzICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfZG93bl9i aXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQ0 ICovCisgIHsgRlJCSVRTIChtY19xdWFkcnVwbGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQ1ICovCisgIHsgRlJCSVRTICht Y19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH07CiAKICNkZWZp bmUgTk9fRlJJTkdFX0JJVE1BUCAwCkBAIC0xNzIzLDYgKzIxNzIsMTUwIEBAIElmI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LworICBERUZTWU0gKFFtY19xdWFkcnVwbGVfYW5nbGVfZG93biwgIistcXVh ZHJ1cGxlLWFuZ2xlLWRvd24iKTsKKyAgVmZyaW5nZV9iaXRtYXBzID0gRmNvbnMgKFFtY19xdWFk cnVwbGVfYW5nbGVfZG93biwgVmZyaW5nZV9iaXRtYXBzKTsKKyAgRnB1dCAoUW1jX3F1YWRydXBs ZV9hbmdsZV9kb3duLCBRZnJpbmdlLCBtYWtlX2ZpeG51bSAoNDUpKTsKKyAgLyogKGdldCAnKy1x dWFkcnVwbGUtYW5nbGUtZG93biAnZnJpbmdlKSA9PiA0NSAqLworCisvKiBlbmQgTVVMVElQTEUg Q1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAvKiBHYXJiYWdl IGNvbGxlY3Rpb24gaG9vayAqLwpkaWZmIC0tZ2l0IGEvc3JjL2tleWJvYXJkLmMgYi9zcmMva2V5 Ym9hcmQuYwppbmRleCBiZTcyN2E2Li4wMTgwZDFhIDEwMDY0NAotLS0gYS9zcmMva2V5Ym9hcmQu YworKysgYi9zcmMva2V5Ym9hcmQuYwpAQCAtMTIyNCw2ICsxMjI0LDgwIEBAIHN0YXRpYyBpbnQg cmVhZF9rZXlfc2VxdWVuY2UgKExpc3BfT2JqZWN0ICosIExpc3BfT2JqZWN0LAogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYm9vbCwgYm9vbCwgYm9vbCwgYm9vbCk7CiBzdGF0aWMgdm9p ZCBhZGp1c3RfcG9pbnRfZm9yX3Byb3BlcnR5IChwdHJkaWZmX3QsIGJvb2wpOwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitzdGF0aWMgdm9p ZAorbW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29sdW1uIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIHRydWVfb3JfZmFsc2VfcCkKK3sKKyNp ZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+ Y29udGVudHMpCisgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg bXVsdGlwbGVfY3Vyc29yc19jb25mKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbikpKSkKKyAgICB7CisgICAgICBM aXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAg TGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5p bCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7Cisg ICAgICBmcHJpbnRmIChzdGRlcnIsICJcbm1jX3N3aXRjaGVzX2ZpbGxfY29sdW1uICglcyk6ICAl c1xuIiwKKyAgICAgICAgICAgICAgIHdpbmRvd19jaGFyLCB0cnVlX29yX2ZhbHNlX3AgPyAidHJ1 ZSIgOiAiZmFsc2UiKTsKKyAgICB9CisjZW5kaWYKKyAgdy0+bWMuZHJhd19maWxsX2NvbHVtbiA9 IHRydWVfb3JfZmFsc2VfcDsKKyAgdy0+bWMuZXJhc2VfZmlsbF9jb2x1bW4gPSB0cnVlX29yX2Zh bHNlX3A7CisgIGlmICh0cnVlX29yX2ZhbHNlX3ApCisgICAgdy0+bXVzdF9iZV91cGRhdGVkX3Ag PSB0cnVlOworfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBMaXNwX09iamVjdAog Y29tbWFuZF9sb29wXzEgKHZvaWQpCiB7CkBAIC0xNDE5LDYgKzE0OTMsMTYgQEAgY29tbWFuZF9s b29wXzEgKHZvaWQpCiAgICAgICBWcmVhbF90aGlzX2NvbW1hbmQgPSBjbWQ7CiAgICAgICBzYWZl X3J1bl9ob29rcyAoUXByZV9jb21tYW5kX2hvb2spOwogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBzdHJ1Y3Qgd2luZG93ICp3ID0g WFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgICAgIG1jX3N3aXRjaGVzX211bHRpcGxlX2N1 cnNvcnMgKHcsIHRydWUpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBh bHJlYWR5X2FkanVzdGVkID0gMDsKIAogICAgICAgaWYgKE5JTFAgKFZ0aGlzX2NvbW1hbmQpKQpA QCAtMTU2NSw2ICsxNjQ5LDE4IEBAIGNvbW1hbmRfbG9vcF8xICh2b2lkKQogICAgICAgaWYgKCFO SUxQIChLVkFSIChjdXJyZW50X2tib2FyZCwgZGVmaW5pbmdfa2JkX21hY3JvKSkKIAkgICYmIE5J TFAgKEtWQVIgKGN1cnJlbnRfa2JvYXJkLCBWcHJlZml4X2FyZykpKQogCWZpbmFsaXplX2tiZF9t YWNyb19jaGFycyAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF IENVUlNPUlMgKi8KKworICAgICAgbWNfc3dpdGNoZXNfbXVsdGlwbGVfY3Vyc29ycyAodywgZmFs c2UpOworICAgICAgbWNfc3dpdGNoZXNfY3Jvc3NoYWlycyAodywgZmFsc2UpOworICAgICAgbWNf c3dpdGNoZXNfZmlsbF9jb2x1bW4gKHcsIGZhbHNlKTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogICAgIH0KIH0KIApAQCAtMjQ0OCw3ICsyNTQ0LDE1IEBAIHJlYWRfY2hhciAoaW50 IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAsCiAJICBpZiAoaGVscF9lY2hvX3Nob3dpbmdf cCAmJiAhRVEgKHNlbGVjdGVkX3dpbmRvdywgbWluaWJ1Zl93aW5kb3cpKQogCSAgICByZWRpc3Bs YXlfcHJlc2VydmVfZWNob19hcmVhICg1KTsKIAkgIGVsc2UKLQkgICAgcmVkaXNwbGF5ICgpOwor CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisJ ICAgIHJlZGlzcGxheSAoMSk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIAkgIGlm ICghaW5wdXRfcGVuZGluZykKIAkgICAgLyogTm9ybWFsIGNhc2U6IG5vIGlucHV0IGFycml2ZWQg ZHVyaW5nIHJlZGlzcGxheS4gICovCkBAIC0yNjI4LDcgKzI3MzIsMTYgQEAgcmVhZF9jaGFyIChp bnQgY29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICB7CiAgICAgICBGZG9fYXV0b19z YXZlIChhdXRvX3NhdmVfbm9fbWVzc2FnZSA/IFF0IDogUW5pbCwgUW5pbCk7CiAgICAgICAvKiBI b29rcyBjYW4gYWN0dWFsbHkgY2hhbmdlIHNvbWUgYnVmZmVycyBpbiBhdXRvIHNhdmUuICAqLwot ICAgICAgcmVkaXNwbGF5ICgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCisgICAgICByZWRpc3BsYXkgKDIpOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgICAgfQogCiAgIC8qIFRyeSByZWFkaW5nIHVzaW5nIGFuIFggbWVu dS4KQEAgLTI2OTIsNyArMjgwNSwxNiBAQCByZWFkX2NoYXIgKGludCBjb21tYW5kZmxhZywgTGlz cF9PYmplY3QgbWFwLAogCSAgICAgICYmICEgQ09OU1AgKFZ1bnJlYWRfY29tbWFuZF9ldmVudHMp KQogCSAgICB7CiAJICAgICAgRmRvX2F1dG9fc2F2ZSAoYXV0b19zYXZlX25vX21lc3NhZ2UgPyBR dCA6IFFuaWwsIFFuaWwpOwotCSAgICAgIHJlZGlzcGxheSAoKTsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworCSAgICAgIHJlZGlzcGxheSAo Myk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgfQogCX0KIApAQCAtMjc5 NSw3ICsyOTE3LDE1IEBAIHJlYWRfY2hhciAoaW50IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBt YXAsCiAgICAgewogICAgICAgaWYgKGNvbW1hbmRmbGFnID49IDAKIAkgICYmICFpbnB1dF9wZW5k aW5nICYmICFkZXRlY3RfaW5wdXRfcGVuZGluZ19ydW5fdGltZXJzICgwKSkKLQlyZWRpc3BsYXkg KCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKKwlyZWRpc3BsYXkgKDQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAgICAg ICBnb3RvIHdyb25nX2tib2FyZDsKICAgICB9CkBAIC0zMDkzLDcgKzMyMjMsMTUgQEAgcmVhZF9j aGFyIChpbnQgY29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICAgIC8qIFJlbW92ZSB0 aGUgaGVscCBmcm9tIHRoZSBmcmFtZS4gICovCiAgICAgICB1bmJpbmRfdG8gKGNvdW50LCBRbmls KTsKIAotICAgICAgcmVkaXNwbGF5ICgpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgcmVkaXNwbGF5ICg1KTsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogICAgICAgaWYgKEVRIChjLCBtYWtlX2ZpeG51bSAoMDQwKSkp CiAJewogCSAgY2FuY2VsX2VjaG9pbmcgKCk7CmRpZmYgLS1naXQgYS9zcmMvbGlzcC5oIGIvc3Jj L2xpc3AuaAppbmRleCA3ZTdkYmE2Li40NmQ5MjMxIDEwMDY0NAotLS0gYS9zcmMvbGlzcC5oCisr KyBiL3NyYy9saXNwLmgKQEAgLTM1NzksNyArMzU3OSwxNSBAQCBleHRlcm4gdm9pZCBtZXNzYWdl X3dpdGhfc3RyaW5nIChjb25zdCBjaGFyICosIExpc3BfT2JqZWN0LCBib29sKTsKIGV4dGVybiB2 b2lkIG1lc3NhZ2VfbG9nX21heWJlX25ld2xpbmUgKHZvaWQpOwogZXh0ZXJuIHZvaWQgdXBkYXRl X2VjaG9fYXJlYSAodm9pZCk7CiBleHRlcm4gdm9pZCB0cnVuY2F0ZV9lY2hvX2FyZWEgKHB0cmRp ZmZfdCk7Ci1leHRlcm4gdm9pZCByZWRpc3BsYXkgKHZvaWQpOworCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitleHRlcm4gdm9pZCByZWRpc3Bs YXkgKGludCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIHZvaWQgc2V0X2ZyYW1l X2N1cnNvcl90eXBlcyAoc3RydWN0IGZyYW1lICosIExpc3BfT2JqZWN0KTsKIGV4dGVybiB2b2lk IHN5bXNfb2ZfeGRpc3AgKHZvaWQpOwpkaWZmIC0tZ2l0IGEvc3JjL25zdGVybS5tIGIvc3JjL25z dGVybS5tCmluZGV4IGJjYzIzZmYuLjU0YWRjNzQgMTAwNjQ0Ci0tLSBhL3NyYy9uc3Rlcm0ubQor KysgYi9zcmMvbnN0ZXJtLm0KQEAgLTEwODcsNiArMTA4NywxNiBAQCBzdGF0aWMgTlNSZWN0IGNv bnN0cmFpbl9mcmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNGdWxsc2NyZWVuKQog ICAgZXh0ZXJuYWwgKFJJRikgY2FsbDsgd2hvbGUgZnJhbWUsIGNhbGxlZCBiZWZvcmUgdXBkYXRl X3dpbmRvd19iZWdpbgogICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIHsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGlu Z19mcmFtZSA9IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRlZiBOU19J TVBMX0NPQ09BCiAgIEVtYWNzVmlldyAqdmlldyA9IEZSQU1FX05TX1ZJRVcgKGYpOwogCkBAIC0x MjEwLDYgKzEyMjAsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5fZnJhbWVfcmVjdChOU1Jl Y3QgZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKIAogLyogICBpZiAoZiA9PSBNT1VTRV9I TF9JTkZPIChmKS0+bW91c2VfZmFjZV9tb3VzZV9mcmFtZSkgKi8KICAgTU9VU0VfSExfSU5GTyAo ZiktPm1vdXNlX2ZhY2VfZGVmZXIgPSAwOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gTlVMTDsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTE5NzMsNyArMTk5Myw3 IEBAIHNvI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dWJyb2xlOildCisgICAgICAgICAgaWYgKFtjaGlsZCByZXNwb25kc1RvU2Vs ZWN0b3I6QHNlbGVjdG9yKHNldEFjY2Vzc2liaWxpdHlTdWJyb2xlOildKQogI2VuZGlmCiAgICAg ICAgICAgICAgIFtjaGlsZCBzZXRBY2Nlc3NpYmlsaXR5U3Vicm9sZTpOU0FjY2Vzc2liaWxpdHlG bG9hdGluZ1dpbmRvd1N1YnJvbGVdOwogI2VuZGlmCkBAIC0zMjEwLDIzICszMjMwLDEyMCBAQCBO b3RlIHRoYXQgQ1VSU09SX1dJRFRIIGlzIG1lYW5pbmdmdWwgb25seSBmb3IgKGgpYmFyIGN1cnNv cnMuCiAgICAgICBoID0gY3Vyc29yX2hlaWdodDsKICAgICB9CiAKLSAgci5vcmlnaW4ueCA9IGZ4 LCByLm9yaWdpbi55ID0gZnk7Ci0gIHIuc2l6ZS5oZWlnaHQgPSBoOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICByLm9yaWdpbi54ID0gKHct Pm1jLmZ4ID4gMCkKKyAgICAgICAgICAgICAgID8gdy0+bWMuZngKKyAgICAgICAgICAgICAgIDog Zng7CisgIHIub3JpZ2luLnkgPSAody0+bWMuZnkgPiAwKQorICAgICAgICAgICAgICAgPyB3LT5t Yy5meQorICAgICAgICAgICAgICAgOiBmeTsKKyAgci5zaXplLmhlaWdodCA9ICh3LT5tYy5oID4g MCkKKyAgICAgICAgICAgICAgICAgID8gdy0+bWMuaAorICAgICAgICAgICAgICAgICAgOiBoOwog ICByLnNpemUud2lkdGggPSB3LT5waHlzX2N1cnNvcl93aWR0aDsKIAorLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICAvKiBQcmV2ZW50IHR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fSU5ERVhdOworICBmcHJpbnRmIChzdGRlcnIsICJcbmZvcmVncm91bmQgKCVzKSB8IGJhY2tn cm91bmQgKCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAoIU5JTFAgKGZvcmVncm91bmQpID8g U1NEQVRBIChmb3JlZ3JvdW5kKSA6ICJOSUxQIiksCisgICAgICAgICAgICAgICAgICAgKCFOSUxQ IChiYWNrZ3JvdW5kKSA/IFNTREFUQSAoYmFja2dyb3VuZCkgOiAiTklMUCIpKTsKKworICBFWEFN UExFIE9GIEhPVyBUTyBDUkVBVEUgQSBDT0xPUiBXSVRIIFJHQi9MU0wgZmxvYXQgdmFsdWVzOgor ICBOU0NvbG9yICpteV9jb2xvciA9IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IHMt PnctPm1jLnJlZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZ3JlZW46IHMtPnctPm1jLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgYmx1ZTogcy0+dy0+bWMuYmx1ZQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07ICovCisKKyAgaWYgKHct Pm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgfHwgdy0+bWMuZ2x5cGhfZmxhdm9y ID09IE1DX0dMWVBITEVTUworICAgICAgfHwgdy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBI X1RBQikKKyAgICB7CisgICAgICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogdy0+ bWMucmVkIGdyZWVuOiB3LT5tYy5ncmVlbiBibHVlOiB3LT5tYy5ibHVlIGFscGhhOiAxLjBdIHNl dF07CisgICAgICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgICAgIENIRUNLX0JV RkZFUiAoYnVmKTsKKyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAg ICAgYm9vbCByZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1hcmtfYWN0 aXZlKSkpOworICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAocmVnaW9uX2FjdGl2 ZV9wKSA/IFhGSVhOVU0gKEZyZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAgICAgcHRyZGlm Zl90IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhGSVhOVU0gKEZyZWdpb25fZW5k ICgpKSA6IC0xOworICAgICAgYm9vbCByZWdpb25faW5fYm91bmRzX3AgPSAocmVnaW9uX2FjdGl2 ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tYy5wb3NpbnQgPj0g cmVnaW9uX2JlZ2lubmluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ bWMucG9zaW50IDwgcmVnaW9uX2VuZCk7CisgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAg ICAgICAgJiYgcmVnaW9uX2luX2JvdW5kc19wCisgICAgICAgICAgJiYgYWN0aXZlX3ApCiAgICAg ICAgIHsKLSAgICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdS T1VORCAoZmFjZSksIGYpIHNldF07Ci0gICAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VS U09SX0NPTE9SIChmKTsKKyAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdp b25fZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm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fcmVnaW9uX291dF9mYWNlKSwgZik7CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xs b3dfYWN0aXZlX3JlZ2lvbl9vdXRfY29sb3I7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2Ug aWYgKCFyZWdpb25fYWN0aXZlX3AgJiYgYWN0aXZlX3ApCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRf ZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWZhY2UiKSwgdHJ1ZSk7Cisg ICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgIE5TQ29sb3IgKmhv bGxvd19hY3RpdmVfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNL R1JPVU5EIChob2xsb3dfYWN0aXZlX2ZhY2UpLCBmKTsKKyAgICAgICAgICAgICAgaG9sbG93X2Nv bG9yID0gaG9sbG93X2FjdGl2ZV9jb2xvcjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8q IFRoZSByZWdpb24gaXMgX25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1 c2UgdGhlIG92ZXJsYXkgd2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICBl bHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBlbnVt IGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywg ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSk7Cisg ICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgTlND b2xvciAqaG9sbG93X2luYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5T X0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2luYWN0aXZlX2ZhY2UpLCBmKTsKKyAgICAgICAgICAg ICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfaW5hY3RpdmVfY29sb3I7CisgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgZWxzZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZh Y2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKyAgICAg ICAgICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09MT1IgKGYpOworICAgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg c3RydWN0IGZhY2UgKmRlZmF1bHRfYmdfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgREVGQVVMVF9G QUNFX0lEKTsKKyAgICAgICAgICAgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChO U19GQUNFX0JBQ0tHUk9VTkQgKGRlZmF1bHRfYmdfZmFjZSksIGYpIHNldF07CisgICAgICAgICAg ICAgICAgICAgIGhvbGxvd19jb2xvciA9IEZSQU1FX0NVUlNPUl9DT0xPUiAoZik7CisgICAgICAg ICAgICAgICAgICB9CisgICAgfQorICAgIGVsc2UgaWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JP VU5EIChmYWNlKSA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikp CisgICAgICB7CisgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JF R1JPVU5EIChmYWNlKSwgZikgc2V0XTsKKyAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VS U09SX0NPTE9SIChmKTsKKyAgICAgIH0KICAgICAgIGVsc2UKICAgICAgICAgW0ZSQU1FX0NVUlNP Ul9DT0xPUiAoZikgc2V0XTsKIAorLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgICAgIHN3aXRjaCAoY3Vyc29yX3R5cGUpCiAgICAgICAg IHsKICAgICAgICAgY2FzZSBERUZBVUxUX0NVUlNPUjoKQEAgLTMyNDYsMjAgKzMzNjMsNDggQEAg Tm90ZSB0aGF0IENVUlNPUl9XSURUSCBpcyBtZWFuaW5nZnVsIG9ubHkgZm9yIChoKWJhciBjdXJz b3JzLgogICAgICAgICAgIGJyZWFrOwogICAgICAgICBjYXNlIEJBUl9DVVJTT1I6CiAgICAgICAg ICAgcyA9IHI7Ci0gICAgICAgICAgLyogSWYgdGhlIGNoYXJhY3RlciB1bmRlciBjdXJzb3IgaXMg UjJMLCBkcmF3IHRoZSBiYXIgY3Vyc29yCi0gICAgICAgICAgICAgb24gdGhlIHJpZ2h0IG9mIGl0 cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxlZnQuICAqLwotICAgICAgICAgIGN1cnNvcl9n bHlwaCA9IGdldF9waHlzX2N1cnNvcl9nbHlwaCAodyk7Ci0gICAgICAgICAgaWYgKChjdXJzb3Jf Z2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKLSAgICAgICAgICAgIHMub3JpZ2luLngg Kz0gY3Vyc29yX2dseXBoLT5waXhlbF93aWR0aCAtIHMuc2l6ZS53aWR0aDsKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIEBsYXds aXN0IGlzIGZvY3VzaW5nIHRoZSBpbml0aWFsIGRldmVsb3BtZW50IG9mIGZlYXR1cmUgcmVxdWVz dHMgIzE3Njg0CisgICAgYW5kICMyMjg3MyBvbiBMMlIgbGFuZ3VhZ2VzLiAqLworICAgIGlmICh3 LT5tYy5nbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEgKKyAgICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxh dm9yICE9IE1DX0dMWVBITEVTUworICAgICAgICAmJiB3LT5tYy5nbHlwaF9mbGF2b3IgIT0gTUNf R0xZUEhfVEFCKQorICAgICAgeworICAgICAgLyogSWYgdGhlIGNoYXJhY3RlciB1bmRlciBjdXJz b3IgaXMgUjJMLCBkcmF3IHRoZSBiYXIgY3Vyc29yCisgICAgICAgICBvbiB0aGUgcmlnaHQgb2Yg aXRzIGdseXBoLCByYXRoZXIgdGhhbiBvbiB0aGUgbGVmdC4gICovCisgICAgICBjdXJzb3JfZ2x5 cGggPSBnZXRfcGh5c19jdXJzb3JfZ2x5cGggKHcpOworICAgICAgaWYgKChjdXJzb3JfZ2x5cGgt PnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKKyAgICAgICAgcy5vcmlnaW4ueCArPSBjdXJzb3Jf Z2x5cGgtPnBpeGVsX3dpZHRoIC0gcy5zaXplLndpZHRoOworICAgICAgfQorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKwogCiAgICAgICAgICAgTlNSZWN0RmlsbCAocyk7CiAgICAgICAgICAg YnJlYWs7CiAgICAgICAgIH0KICAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChmKTsKIAotICAgICAg LyogZHJhdyB0aGUgY2hhcmFjdGVyIHVuZGVyIHRoZSBjdXJzb3IgKi8KLSAgICAgIGlmIChjdXJz b3JfdHlwZSAhPSBOT19DVVJTT1IpCi0gICAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcs IGdseXBoX3JvdywgRFJBV19DVVJTT1IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAvKiBkcmF3IHRoZSBjaGFyYWN0ZXIgdW5kZXIgdGhl IGN1cnNvciAqLworICBpZiAoY3Vyc29yX3R5cGUgIT0gTk9fQ1VSU09SCisgICAgICAmJiB3LT5t Yy5nbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEhMRVNTCisgICAgICAmJiB3LT5tYy5nbHlwaF9mbGF2 b3IgIT0gTUNfR0xZUEhfVEFCKQorICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBo X3JvdywgRFJBV19DVVJTT1IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCisjaWZk ZWYgTlNfSU1QTF9DT0NPQQorICAgICAgTlNFbmFibGVTY3JlZW5VcGRhdGVzICgpOworI2VuZGlm CiAgICAgfQogfQogCkBAIC0zOTI2LDcgKzQwNzEsMjcgQEAgRnVuY3Rpb24gbW9kZWxlZCBhZnRl ciB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JveCAoKS4KICAgICB7CiAgICAgICBpbnQgdGhpY2tuZXNz ID0gYWJzIChzLT5pbWctPnJlbGllZik7CiAgICAgICBpZiAodGhpY2tuZXNzID09IDApIHRoaWNr bmVzcyA9IDE7Ci0gICAgICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywgRlJBTUVfQ1VSU09S X0NPTE9SIChzLT5mKSwgMSwgMSk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKKyAgICBpZiAocy0+dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1D X0dMWVBICisgICAgICAgIHx8IHMtPnctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MK KyAgICAgICAgfHwgcy0+dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBIX1RBQikKKyAgICAg IHsKKyAgICAgICAgTlNDb2xvciAqYm9yZGVyX2NvbG9yID0gW05TQ29sb3IgY29sb3JXaXRoQ2Fs aWJyYXRlZFJlZDogcy0+dy0+bWMucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IHMtPnctPm1jLmdyZWVuCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6 IHMtPnctPm1jLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBhbHBoYTogMS4wXTsKKyAgICAgICAgbnNfZHJhd19ib3ggKGJyLCB0 aGlja25lc3MsIGJvcmRlcl9jb2xvciwgMSwgMSk7CisgICAgICB9CisgICAgICBlbHNlCisgICAg ICAgIG5zX2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYp LCAxLCAxKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KIH0KIApkaWZm IC0tZ2l0IGEvc3JjL3czMnRlcm0uYyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggOGQxODlhZS4uZTdm YjhhMyAxMDA2NDQKLS0tIGEvc3JjL3czMnRlcm0uYworKysgYi9zcmMvdzMydGVybS5jCkBAIC01 NDUsNiArNTQ1LDE1IEBAIHhfdXBkYXRlX2JlZ2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmICgh IEZSQU1FX1czMl9QIChmKSkKICAgICByZXR1cm47CiAKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBm OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFJlZ2VuZXJhdGUgZGlzcGxh eSBwYWxldHRlIGJlZm9yZSBkcmF3aW5nIGlmIGxpc3Qgb2YgcmVxdWVzdGVkCiAgICAgIGNvbG9y cyBoYXMgY2hhbmdlZC4gKi8KICAgaWYgKGRpc3BsYXlfaW5mby0+cmVnZW5fcGFsZXR0ZSkKQEAg LTc1NCw2ICs3NjMsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAKICAgLyog TW91c2UgaGlnaGxpZ2h0IG1heSBiZSBkaXNwbGF5ZWQgYWdhaW4uICAqLwogICBNT1VTRV9ITF9J TkZPIChmKS0+bW91c2VfZmFjZV9kZWZlciA9IGZhbHNlOworCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1l ID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTk3Myw2 ICs5OTIsMjAgQEAgc3RhdGljIHZvaWQgdzMyX2RyYXdfYm94X3JlY3QgKHN0cnVjdCBnbHlwaF9z dHJpbmcgKiwgaW50LCBpbnQsIGludCwgaW50LAogc3RhdGljIHZvaWQKIHhfc2V0X2N1cnNvcl9n YyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBpZiAocy0+dy0+bWMuY3Vyc29yX2djX2Rl ZmF1bHQpCisgICAgeworICAgICAgcy0+Z2MgPSBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNv cl9nYzsKKyAgICAgIHJldHVybjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICAgaWYgKHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2Ut PmJhY2tncm91bmQgPT0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMt PmZhY2UtPmZvcmVncm91bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTU2 OTAsNiArNTcyMywyNiBAQCB4X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywg c3RydWN0IGdseXBoX3JvdyAqcm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29v cmRpbmF0ZXMgZm9yIHBoeXMgY3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5 ICh3LCByb3csIGN1cnNvcl9nbHlwaCwgJmxlZnQsICZ0b3AsICZoKTsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTEVHRU5EOgorCist ICB0b3AgeSA9PSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgcm93LT55KQorCistICBib3R0 b20geSA9PSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgcm93LT55KSAtIHJvdy0+aGVpZ2h0 CisKKy0gIGggb2YgSE9MTE9XX0JPWF9DVVJTT1IgPT0gcm93LT5oZWlnaHQKKyAgIFtUaGlzIGF2 b2lkcyBhIHZpc2libGUgZ2FwIGFib3ZlL2JlbG93Ll0gKi8KKworICBpZiAody0+bWMuaCA+IDAp CisgICAgaCA9IHJvdy0+aGVpZ2h0OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg IHJlY3QubGVmdCA9IGxlZnQ7CiAgIC8qIFdoZW4gb24gUjJMIGNoYXJhY3Rlciwgc2hvdyBjdXJz b3IgYXQgdGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlCiAgICAgIGdseXBoLCB1bmxlc3MgdGhlIGN1cnNv ciBib3ggaXMgYXMgd2lkZSBhcyB0aGUgZ2x5cGggb3Igd2lkZXIKQEAgLTU3NTMsNyArNTgwNiwx NyBAQCB4X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3Jv dyAqcm93LAogCSBpbnZpc2libGUuICBVc2UgdGhlIGdseXBoJ3MgZm9yZWdyb3VuZCBjb2xvciBp bnN0ZWFkIGluIHRoaXMKIAkgY2FzZSwgb24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUgZ2x5cGgn cyBjb2xvcnMgYXJlIGNob3NlbiBzbwogCSB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxlLiAgKi8K LSAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGN1cnNvcl9jb2xvcikKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKGZh Y2UtPmJhY2tncm91bmQgPT0gY3Vyc29yX2NvbG9yCisgICAgICAgICAgJiYgIXctPm1jLmN1cnNv cl9nY19pbnZpc2libGVfb2theSkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCWN1 cnNvcl9jb2xvciA9IGZhY2UtPmZvcmVncm91bmQ7CiAKICAgICAgIHggPSBXSU5ET1dfVEVYVF9U T19GUkFNRV9QSVhFTF9YICh3LCB3LT5waHlzX2N1cnNvci54KTsKQEAgLTU3NzQsNiArNTgzNywx NyBAQCB4X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3Jv dyAqcm93LAogCSAgaWYgKChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkK IAkgICAgeCArPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gd2lkdGg7CiAKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBBbGln biBhbGwgZmFrZSBCQVJfQ1VSU09SIG9mIHRoZSBWRVJUSUNBTF9SVUxFUiB3aXRoIGBvcG9pbnRf eCcuICovCisgICAgaWYgKHctPm1jLmZ4ID4gMCkKKyAgICAgIHggPSB3LT5tYy5meDsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogCSAgdzMyX2ZpbGxfYXJlYSAoZiwgaGRjLCBjdXJz b3JfY29sb3IsIHgsCiAJCQkgV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHctPnBoeXNfY3Vy c29yLnkpLAogCQkJIHdpZHRoLCByb3ctPmhlaWdodCk7CkBAIC01ODk1LDMxICs1OTY5LDE2OSBA QCB3MzJfZHJhd193aW5kb3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhf cm93ICpnbHlwaF9yb3csCiAJICByZXR1cm47CiAJfQogCi0gICAgICBzd2l0Y2ggKGN1cnNvcl90 eXBlKQotCXsKLQljYXNlIEhPTExPV19CT1hfQ1VSU09SOgotCSAgeF9kcmF3X2hvbGxvd19jdXJz b3IgKHcsIGdseXBoX3Jvdyk7Ci0JICBicmVhazsKIAotCWNhc2UgRklMTEVEX0JPWF9DVVJTT1I6 Ci0JICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsK LQkgIGJyZWFrOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBD VVJTT1JTICovCiAKLQljYXNlIEJBUl9DVVJTT1I6Ci0JICB4X2RyYXdfYmFyX2N1cnNvciAodywg Z2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOwotCSAgYnJlYWs7CisgIHN0cnVj dCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jLnBv c2ludCA+PSByZWdpb25fYmVnaW5uaW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+bWMucG9zaW50IDwgcmVnaW9uX2VuZCk7CisgICAgICAgICAgLyogVGVtcG9y YXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycgYnkgYm9ycm93aW5n IHRoZQorICAgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4gdzMyZm5zLmMu ICAqLworICAgICAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgJiYgcmVn aW9uX2luX2JvdW5kc19wCisgICAgICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAg eworICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZV9p ZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3It cmVnaW9uLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3df YWN0aXZlX3JlZ2lvbl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lv bl9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBkZWZhdWx0 X2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0g aG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIGVsc2UgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAg J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W5kID0gZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5kOwor ICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX2Zh Y2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8qIFRo ZSByZWdpb24gaXMgX25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1c2Ug dGhlIG92ZXJsYXkgd2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICAgICAg ZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRf ZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLWZhY2UiKSwg dHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVf ZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAg ICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGRlZmF1bHRfZmFjZS0+Zm9yZWdy b3VuZDsKKyAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3df aW5hY3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9IFhDcmVhdGVHQyAoTlVMTCwgRlJBTUVf VzMyX1dJTkRPVyAoZiksIG1hc2ssICZnY192YWx1ZXMpOworICAgICAgICAgIGJsb2NrX2lucHV0 ICgpOworICAgIC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yX1dJTkRPVyAoZiksIG1hc2ssICZnY192YWx1ZXMpOworICAgICAgICAg IC8qIEZvcmNlIGB4X3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEudzMy LT5jdXJzb3JfZ2MnLiAgKi8KKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfZGVmYXVsdCA9IHRy dWU7CisgICAgICAgICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFX X0NVUlNPUik7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2RlZmF1bHQgPSBmYWxzZTsKKyAg ICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9IG9yaWdpbmFsX2N1cnNvcl9n YzsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICB9CisgICAgICAgIGVsc2UK KyAgICAgICAgICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VS U09SKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIEJBUl9DVVJTT1I6CisgICAgewor ICAgICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVl biA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5v dXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9k YXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vy c29yX2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNv ciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgICAgIHct Pm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IGZhbHNlOworICAgICAgICAgIGYtPm91dHB1 dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAg ICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhf cm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAg IGNhc2UgSEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHct Pm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAg LyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcu ICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3Jf cGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsK KyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgs IEhCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkg PSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9y aWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAg eF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNP Uik7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBOT19DVVJTT1I6CisgICAgICB3LT5w aHlzX2N1cnNvcl93aWR0aCA9IDA7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAg ZW1hY3NfYWJvcnQgKCk7CisgIH0KIAotCWNhc2UgSEJBUl9DVVJTT1I6Ci0JICB4X2RyYXdfYmFy X2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKLQkgIGJy ZWFrOworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LwogCi0JY2FzZSBOT19DVVJTT1I6Ci0JICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7Ci0JICBi cmVhazsKIAotCWRlZmF1bHQ6Ci0JICBlbWFjc19hYm9ydCAoKTsKLQl9CiAgICAgfQogfQogCmRp ZmYgLS1naXQgYS9zcmMvd2luZG93LmggYi9zcmMvd2luZG93LmgKaW5kZXggY2MwYjZiNi4uNDBm OGE4NSAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5oCisrKyBiL3NyYy93aW5kb3cuaApAQCAtNzYs NiArNzYsNjIgQEAgb25lIGFuZCB0aGUgc2FtZSwgc28gaXRzIHByZXYgYW5kIG5leHQgbWVtYmVy cyBhcmUgbmlsLgogCiBBIGRlYWQgd2luZG93IGhhcyBpdHMgY29udGVudHMgZmllbGQgc2V0IHRv IG5pbC4gICovCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBM RSBDVVJTT1JTICovCisKKy8qIFN1ZmZpeGVzIGZvciB0aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBw cmVmaXguICovCitzdHJ1Y3QgbXVsdGlwbGVfY3Vyc29ycworeworICAvKi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Cit9OworCisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogc3RydWN0IGN1cnNvcl9wb3MKIHsKICAgLyogUGl4ZWwgcG9z aXRpb24uICBUaGVzZSBhcmUgYWx3YXlzIHdpbmRvdyByZWxhdGl2ZS4gICovCkBAIC0xODEsNiAr MjM3LDI4IEBAIHN0cnVjdCB3aW5kb3cKICAgICAvKiBUaGUgaGVscCBlY2hvIHRleHQgZm9yIHRo aXMgd2luZG93LiAgUW5pbCBpZiB0aGVyZSdzIG5vbmUuICAqLwogICAgIExpc3BfT2JqZWN0IG1v ZGVfbGluZV9oZWxwX2VjaG87CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBUaGUgY2FjaGUgZm9yIG11bHRpcGxlIGdseXBoIGN1 cnNvcnMuICBGb3IgYW4gZXhhbXBsZSBvZiB0aGUgc3RydWN0dXJlIG9mCisgICAgdGhlIGxpc3Qs IHNlZSB0aGUgY29tbWVudHMgYXQgdGhlIGJlZ2lubmluZyBvZiBgbWNfZHJhd19tdWx0aXBsZV9j dXJzb3JzJyBpbgorICAgIHhkaXNwLmMuICAqLworICAgIExpc3BfT2JqZWN0IG11bHRpcGxlX2N1 cnNvcnNfY2FjaGU7CisKKyAgICAvKiBUaGUgY2FjaGUgZm9yIG11bHRpcGxlIGdseXBoL2dseXBo bGVzcyBjdXJzb3JzIHRoYXQgZm9ybSBjcm9zc2hhaXJzLiAgRm9yIGFuCisgICAgZXhhbXBsZSBv ZiB0aGUgc3RydWN0dXJlIG9mIHRoZSBsaXN0LCBzZWUgdGhlIGNvbW1lbnRzIGF0IHRoZSBiZWdp bm5pbmcgb2YKKyAgICBgbWNfZHJhd19tdWx0aXBsZV9jdXJzb3JzJyBpbiB4ZGlzcC5jLiAgKi8K KyAgICBMaXNwX09iamVjdCBjcm9zc2hhaXJzX2NhY2hlOworCisgICAgLyogVGhlIGNhY2hlIGZv ciBtdWx0aXBsZSBnbHlwaC9nbHlwaGxlc3MgY3Vyc29ycyB0aGF0IGZvcm0gdGhlIHZpc2libGUg ZmlsbAorICAgIGNvbHVtbi4gIEZvciBhbiBleGFtcGxlIG9mIHRoZSBzdHJ1Y3R1cmUgb2YgdGhl IGxpc3QsIHNlZSB0aGUgY29tbWVudHMgYXQgdGhlCisgICAgYmVnaW5uaW5nIG9mIGBtY19kcmF3 X211bHRpcGxlX2N1cnNvcnMnIGluIHhkaXNwLmMuICAqLworICAgIExpc3BfT2JqZWN0IG1jX2Zp bGxfY29sdW1uX2NhY2hlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgLyog Tm8gTGlzcCBkYXRhIG1heSBmb2xsb3cgYmVsb3cgdGhpcyBwb2ludCB3aXRob3V0IGNoYW5naW5n CiAgICAgICAgbWFya19vYmplY3QgaW4gYWxsb2MuYy4gIFRoZSBtZW1iZXIgY3VycmVudF9tYXRy aXggbXVzdCBiZSB0aGUKICAgICAgICBmaXJzdCBub24tTGlzcCBtZW1iZXIuICAqLwpAQCAtMjgz LDYgKzM2MSwxNiBAQCBzdHJ1Y3Qgd2luZG93CiAKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0K IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAgIC8qIFRoZSBwcmVmaXggZm9yIHdpbmRvdyBwb2ludGVycyByZWxhdGluZyB0byBtdWx0aXBs ZSBjdXJzb3JzLiAgKi8KKyAgICBzdHJ1Y3QgbXVsdGlwbGVfY3Vyc29ycyBtYzsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogICAgIC8qIEN1cnNvciB0eXBlIG9mIGxhc3QgY3Vyc29y IGRyYXduIG9uIHRoZSB3aW5kb3cuICAqLwogICAgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgcGh5 c19jdXJzb3JfdHlwZTsKIApAQCAtNDIxLDYgKzUwOSwzMSBAQCBYV0lORE9XIChMaXNwX09iamVj dCBhKQogICByZXR1cm4gWFVOVEFHIChhLCBMaXNwX1ZlY3Rvcmxpa2UsIHN0cnVjdCB3aW5kb3cp OwogfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAq LworCitJTkxJTkUgdm9pZAord3NldF9tdWx0aXBsZV9jdXJzb3JzX2NhY2hlIChzdHJ1Y3Qgd2lu ZG93ICp3LCBMaXNwX09iamVjdCB2YWwpCit7CisgIHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUg PSB2YWw7Cit9CisKK0lOTElORSB2b2lkCit3c2V0X2Nyb3NzaGFpcnNfY2FjaGUgKHN0cnVjdCB3 aW5kb3cgKncsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgdy0+Y3Jvc3NoYWlyc19jYWNoZSA9IHZh bDsKK30KKworSU5MSU5FIHZvaWQKK3dzZXRfbWNfZmlsbF9jb2x1bW5fY2FjaGUgKHN0cnVjdCB3 aW5kb3cgKncsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUg PSB2YWw7Cit9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIE1vc3QgY29kZSBz aG91bGQgdXNlIHRoZXNlIGZ1bmN0aW9ucyB0byBzZXQgTGlzcCBmaWVsZHMgaW4gc3RydWN0CiAg ICB3aW5kb3cuICAqLwogSU5MSU5FIHZvaWQKZGlmZiAtLWdpdCBhL3NyYy94ZGlzcC5jIGIvc3Jj L3hkaXNwLmMKaW5kZXggZmE3NjkxYy4uMjFmMjJmYSAxMDA2NDQKLS0tIGEvc3JjL3hkaXNwLmMK KysrIGIvc3JjL3hkaXNwLmMKQEAgLTgzMCw3ICs4MzAsMTYgQEAgc3RhdGljIGludG1heF90IG1l c3NhZ2VfbG9nX2NoZWNrX2R1cGxpY2F0ZSAocHRyZGlmZl90LCBwdHJkaWZmX3QpOwogc3RhdGlj IHZvaWQgcHVzaF9pdCAoc3RydWN0IGl0ICosIHN0cnVjdCB0ZXh0X3BvcyAqKTsKIHN0YXRpYyB2 b2lkIGl0ZXJhdGVfb3V0X29mX2Rpc3BsYXlfcHJvcGVydHkgKHN0cnVjdCBpdCAqKTsKIHN0YXRp YyB2b2lkIHBvcF9pdCAoc3RydWN0IGl0ICopOwotc3RhdGljIHZvaWQgcmVkaXNwbGF5X2ludGVy bmFsICh2b2lkKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworc3RhdGljIHZvaWQgcmVkaXNwbGF5X2ludGVybmFsIChpbnQpOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiBzdGF0aWMgdm9pZCBlY2hvX2FyZWFfZGlzcGxheSAo Ym9vbCk7CiBzdGF0aWMgdm9pZCBibG9ja19idWZmZXJfZmxpcHMgKHZvaWQpOwogc3RhdGljIHZv aWQgdW5ibG9ja19idWZmZXJfZmxpcHMgKHZvaWQpOwpAQCAtOTIxLDYgKzkzMCw1MDk3IEBAIHN0 YXRpYyB2b2lkIHNob3dfbW91c2VfZmFjZSAoTW91c2VfSExJbmZvICosIGVudW0gZHJhd19nbHlw aHNfZmFjZSk7CiBzdGF0aWMgYm9vbCBjb29yZHNfaW5fbW91c2VfZmFjZV9wIChzdHJ1Y3Qgd2lu ZG93ICosIGludCwgaW50KTsKIAogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2lu IE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTVVMVElQTEUgQ1VSU09SUzogIEVtYWNzIEJ1ZyAj MjI4NzMgKGZlYXR1cmUgcmVxdWVzdCkKKworICAgQ1JPU1NIQUlSUzogIEVtYWNzIEJ1ZyAjMTc2 ODQgKGZlYXR1cmUgcmVxdWVzdCkKKworCitQQVRDSCBWRVJTSU9OOiAgMDE0LjAwMCBbMDgvMjgv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDAxIFswOS8wMS8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMDIgWzA5LzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwMyBbMDkvMDUv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDA0IFswOS8wOC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMDUgWzA5LzA5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwNiBbMDkvMDkv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDA3IFswOS8xMC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMDggWzA5LzEwLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwOSBbMDkvMTEv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDEwIFswOS8xMy8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMTEgWzA5LzE0LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxMiBbMDkvMTcv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDEzIFswOS8xOC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMTQgWzA5LzE5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxNSBbMDkvMjMv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDE2IFswOS8yNC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMTcgWzA5LzI1LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxOCBbMDkvMjYv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDE5IFsxMC8wMS8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMjAgWzEwLzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAyMSBbMTAvMDkv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDIyIFsxMC8xMC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMjMgWzEwLzEwLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAyNCBbMTAvMTMv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDI1IFsxMS8xMC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNS4wMDAgWzExLzEwLzIwMThdCisgICAgICAgICAgICAgICAgMDE1LjAwMSBbMTEvMTEv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTYuMDAwIFsxMS8yMC8yMDE4XQorCitBcHBseSBwYXRj aCB0byBtYXN0ZXIgYnJhbmNoOiAgU2F0IEp1bCA3IDA5OjU5OjUzIDIwMTggLTA3MDAKK2dpdCBy ZXNldCAtLWhhcmQgOTg0NjNiZWQwN2VjYzkwNTcwOTQ5MjhmZmRjMjMyMWVhYWYzYWI1MgorCitM YXN0IENvbW1pdCA6IFNhdCBKdWwgNyAwOTo1OTo1MyAyMDE4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gdHlwZTog IE0teCBtYy1maWxsLWNvbHVtbi1tb2RlCisKKy0gIFRvIGxlYXJuIGhvdyB0byB1c2UgdGhlIG11 bHRpcGxlIGZha2UgY3Vyc29ycyBmZWF0dXJlLCBleGFtaW5lIHRoZQorICAgaW50ZXJhY3RpdmUg ZnVuY3Rpb24gYG1jLXRlc3QnLgorCistICBFWEFNUExFIE9GIEhPVyBUTyBVU0UgTVVMVElQTEUg RkFLRSBDVVJTT1JTOgorCisgIDs7OyAoQlVGRkVSLVBPU0lUSU9OIENVUlNPUi1UWVBFIENVUlNP Ui1DT0xPUikKKyAgOzs7CisgIChzZXRxIG11bHRpcGxlLWN1cnNvcnMtY29uZiAnKCgxICJoYmFy IiAibWFnZW50YSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJw dXJwbGUiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyAiYm94IiAiIzAwRkYw MCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg0ICJob2xsb3ciICIjMDAwMEZG IikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAu MCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNiAoImJhciIgMykgWzAu MCAxLjAgMS4wXSkpKQorCisgIDs7OyBUVVJOIE9GRi4KKyAgOzs7CisgIChzZXRxIG11bHRpcGxl LWN1cnNvcnMtY29uZiBuaWwpCisKKworQ0hBTkdFTE9HOgorCistICBUaGUgYXJlYSBvZiBjb2Rl IHRoYXQgcHJldmVudGVkIGNyb3NzaGFpcnMgYW5kIG90aGVyIGZha2UgY3Vyc29ycyBmcm9tCisg ICB3b3JraW5nIG9uIE1hY09TIE1vamF2ZSBoYXMgYmVlbiBmaXhlZC4KKworLSAgTmV3IEZlYXR1 cmU6ICBUaGlzIGlzIHRoZSBmaXJzdCBpbXBsZW1lbnRhdGlvbiBvZiBhIHZpc2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klMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAg ICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2Nv bHVtbikpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lO RE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmlu MV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNT REFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbndpbmRvdyAo JXMpXG4iLCB3aW5kb3dfY2hhcik7CisgICAgfQorI2VuZGlmCisKKyNpZmRlZiBHTFlQSF9ERUJV RworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgaW50IHRlbXBfZngg PSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB3LT5waHlzX2N1cnNvci54KTsKKyAg aW50IHRlbXBfZnkgPSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgdy0+cGh5c19jdXJzb3Iu eSk7CisgIGVudW0gd2luZG93X3BhcnQgcGFydCA9IE9OX05PVEhJTkc7CisgIExpc3BfT2JqZWN0 IHdpbmRvdyA9IHdpbmRvd19mcm9tX2Nvb3JkaW5hdGVzIChmLCB0ZW1wX2Z4LCB0ZW1wX2Z5LCAm cGFydCwgZmFsc2UpOworICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0 cmluZyAod2luZG93LCBRbmlsKTsKKyAgZGVidWdfbWV0aG9kX2FkZCAodywgIndpbmRvdyAoJXMp IiwgU1NEQVRBICh3aW5kb3dfc3RyaW5nKSk7CisjZW5kaWYKKworY2hhciAqd19jb250ZW50cyA9 IChCVUZGRVJQICh3LT5jb250ZW50cykgJiYgU1RSSU5HUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBuYW1lKSkpCisgICAgICAgICAgICAgICAgICAgPyBTU0RBVEEgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgbmFtZSkpCisgICAgICAgICAgICAgICAgICAgOiAibmlsIjsKK2Zw cmludGYgKHN0ZGVyciwgIlxuQnVmZmVyICglcylcbiIsIHdfY29udGVudHMpOworCitzdHJ1Y3Qg ZmFjZSAqZmFjZSA9IG1jX2xvb2t1cF9mYWNlIChpdCk7CitMaXNwX09iamVjdCBmb3JlZ3JvdW5k ID0gZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CitMaXNwX09iamVjdCBiYWNr Z3JvdW5kID0gZmFjZS0+bGZhY2VbTEZBQ0VfQkFDS0dST1VORF9JTkRFWF07CitmcHJpbnRmIChz dGRlcnIsICJcbmZvcmVncm91bmQgKCVzKSB8IGJhY2tncm91bmQgKCVzKVxuIiwKKyAgICAgICAg ICAgICAgICAgKCFOSUxQIChmb3JlZ3JvdW5kKSA/IFNTREFUQSAoZm9yZWdyb3VuZCkgOiAiTklM UCIpLAorICAgICAgICAgICAgICAgICAoIU5JTFAgKGJhY2tncm91bmQpID8gU1NEQVRBIChiYWNr Z3JvdW5kKSA6ICJOSUxQIikpOworCitmcHJpbnRmIChzdGRlcnIsICJNeSBsaXNwIG9iamVjdDog ICVzXG4iLCBTU0RBVEEgKEZjaGFyX3RvX3N0cmluZyAobWFrZV9maXhudW0gKDEwMSkpKSk7CisK K2ZwcmludGYgKHN0ZGVyciwgInN0cmluZzogJXMgfCBpbnQ6ICVkXG4iLCBTU0RBVEEgKGJ1aWxk X3N0cmluZyAoImZvbyIpKSwgNjkpOworCitpZiAoQlVGRkVSUCAody0+Y29udGVudHMpICYmIFNU UklOR1AgKEJWQVIgKFhCVUZGRVIgKHctPmNvbn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ChtYWtlX2ZpeG51bSAocG9zKSwgUWRpc3BsYXksIFFuaWwsICZvdmVy bGF5KSkKKyAgICAgICYmIEVRIChRc3BhY2UsIFhDQVIgKHZhbCkpKQorICAgIHsgLyogRklYTUU6 IFVzZSBjYWxjX3BpeGVsX3dpZHRoX29yX2hlaWdodC4gICovCisgICAgICBMaXNwX09iamVjdCBw bGlzdCA9IFhDRFIgKHZhbCksIHByb3A7CisgICAgICBpbnQgd2lkdGggPSAtMTsKKyAgICAgIEVN QUNTX0lOVCBhbGlnbl90b19tYXggPQorICAoY29sIDwgTU9TVF9QT1NJVElWRV9GSVhOVU0gLSBJ TlRfTUFYCisgICA/IChFTUFDU19JTlQpIElOVF9NQVggKyBjb2wKKyAgIDogTU9TVF9QT1NJVElW RV9GSVhOVU0pOworICAgICAgaWYgKChwcm9wID0gRnBsaXN0X2dldCAocGxpc3QsIFFDd2lkdGgp LAorICAgICBSQU5HRURfRklYTlVNUCAoMCwgcHJvcCwgSU5UX01BWCkpCisgICAgfHwgKHByb3Ag PSBGcGxpc3RfZ2V0IChwbGlzdCwgUUNyZWxhdGl2ZV93aWR0aCksCisgICAgICAgIFJBTkdFRF9G SVhOVU1QICgwLCBwcm9wLCBJTlRfTUFYKSkpCisgIHdpZHRoID0gWEZJWE5VTSAocHJvcCk7Cisg ICAgICBlbHNlIGlmIChGTE9BVFAgKHByb3ApICYmIDAgPD0gWEZMT0FUX0RBVEEgKHByb3ApCisg ICAgICAgICAmJiBYRkxPQVRfREFUQSAocHJvcCkgPD0gSU5UX01BWCkKKyAgd2lkdGggPSAoaW50 KShYRkxPQVRfREFUQSAocHJvcCkgKyAwLjUpOworICAgICAgZWxzZSBpZiAoKHByb3AgPSBGcGxp c3RfZ2V0IChwbGlzdCwgUUNhbGlnbl90byksCisgICAgUkFOR0VEX0ZJWE5VTVAgKGNvbCwgcHJv cCwgYWxpZ25fdG9fbWF4KSkpCisgIHdpZHRoID0gWEZJWE5VTSAocHJvcCkgLSBjb2w7CisgIC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AgICAgY29sICs9IHdpZHRoOworICAgICAgaWYg KGVuZHAgPiBzY2FuKSAvKiBBdm9pZCBpbmZpbml0ZSBsb29wcyB3aXRoIDAtd2lkdGggb3Zlcmxh eXMuICAqLworICAgICAgICB7CisgICAgc2NhbiA9IGVuZHA7CisgICAgc2Nhbl9ieXRlID0gQ0hB Ul9UT19CWVRFIChzY2FuKTsKKyAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgIH0KKyAgICAg IH0KKyAgICAgIC8qIENoZWNrIGNvbXBvc2l0aW9uIHNlcXVlbmNlLiAgKi8KKyAgICAgIGlmIChj bXBfaXQuaWQgPj0gMAorICAgIHx8IChzY2FuID09IGNtcF9pdC5zdG9wX3BvcworICAgICAgICAm JiBjb21wb3NpdGlvbl9yZXNlYXRfaXQgKCZjbXBfaXQsIHNjYW4sIHNjYW5fYnl0ZSwgZW5kLAor ICAgICAgICAgIHcsIE5VTEwsIFFuaWwpKSkKKyAgY29tcG9zaXRpb25fdXBkYXRlX2l0ICgmY21w X2l0LCBzY2FuLCBzY2FuX2J5dGUsIFFuaWwpOworICAgICAgaWYgKGNtcF9pdC5pZCA+PSAwKQor ICB7CisgICAgc2NhbiArPSBjbXBfaXQubmNoYXJzOworICAgIHNjYW5fYnl0ZSArPSBjbXBfaXQu bmJ5dGVzOworICAgIGlmIChzY2FuIDw9IGVuZCkKKyAgICAgIGNvbCArPSBjbXBfaXQud2lkdGg7 CisgICAgaWYgKGNtcF9pdC50byA9PSBjbXBfaXQubmdseXBocykKKyAgICAgIHsKKyAgICAgICAg Y21wX2l0LmlkID0gLTE7CisgICAgICAgIGNvbXBvc2l0aW9uX2NvbXB1dGVfc3RvcF9wb3MgKCZj bXBfaXQsIHNjYW4sIHNjYW5fYnl0ZSwgZW5kLAorICAgICAgICAgICAgICBRbmlsKTsKKyAgICAg IH0KKyAgICBlbHNlCisgICAgICBjbXBfaXQuZnJvbSA9IGNtcF9pdC50bzsKKyAgICBjb250aW51 ZTsKKyAgfQorICA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fYnVmZmVyLCBz ZWxlY3RpdmVfZGlzcGxheSksIFF0KSkKKyAgICBnb3RvIGVuZGxvb3A7CisgICAgICAgIGlmIChj ID09ICdcdCcpCisgICAgeworICAgICAgY29sICs9IHRhYl93aWR0aDsKKyAgICAgIGNvbCA9IGNv bCAvIHRhYl93aWR0aCAqIHRhYl93aWR0aDsKKyAgICB9CisgICAgICAgIGVsc2UKKyAgICArK2Nv bDsKKyAgICAgIH0KKyAgfQorICAgICAgZWxzZQorICB7CisgICAgLyogVGhlIGRpc3BsYXkgdGFi bGUgZG9lc24ndCBhZmZlY3QgdGhpcyBjaGFyYWN0ZXI7CisgICAgICAgaXQgZGlzcGxheXMgYXMg aXRzZWxmLiAgKi8KKyAgICBpZiAoYyA9PSAnXG4nKQorICAgICAgZ290byBlbmRsb29wOworICAg IGlmIChjID09ICdccicgJiYgRVEgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBzZWxlY3RpdmVfZGlz cGxheSksIFF0KSkKKyAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICBpZiAoYyA9PSAnXHQnKQorICAg ICAgeworICAgICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgICBjb2wgPSBjb2wgLyB0YWJf d2lkdGggKiB0YWJfd2lkdGg7CisgICAgICB9CisgICAgZWxzZSBpZiAobXVsdGlieXRlICYmIExF QURJTkdfQ09ERV9QIChjKSkKKyAgICAgIHsKKyAgICAgICAgLyogU3RhcnQgb2YgbXVsdGktYnl0 ZSBmb3JtLiAgKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAqcHRyOworICAgICAgICBpbnQgYnl0 ZXMsIHdpZHRoOworICAgICAgICBwdHIgPSBCWVRFX1BPU19BRERSIChzY2FuX2J5dGUpOworICAg ICAgICBNQ19NVUxUSUJZVEVfQllURVNfV0lEVEggKHB0ciwgZHAsIGJ5dGVzLCB3aWR0aCk7Cisg ICAgICAgIC8qIFN1YnRyYWN0IG9uZSB0byBjb21wZW5zYXRlIGZvciB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nYXAuICBKdW1wIGJhY2sgb3ZlciBpdC4gICovCisgICAgc3RvcCA9 IEJFR1ZfQUREUjsKKyAgICBwdHIgPSBHUFRfQUREUjsKKyAgICAvKiBDaGVjayB3aGV0aGVyIHRo YXQgYnJpbmdzIHVzIHRvIGJlZ2lubmluZyBvZiBidWZmZXIuICAqLworICAgIGlmIChCRUdWID49 IEdQVCkKKyAgICAgIGJyZWFrOworICB9CisgICAgICBjID0gKi0tcHRyOworICAgICAgaWYgKGRw ICYmIFZFQ1RPUlAgKERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKSkpCisgIHsKKyAgICBjaGFydmVj ID0gRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpOworICAgIG4gPSBBU0laRSAoY2hhcnZlYyk7Cisg IH0KKyAgICAgIGVsc2UKKyAgeworICAgIGNoYXJ2ZWMgPSBRbmlsOworICAgIG4gPSAxOworICB9 CisgICAgICBmb3IgKGkgPSBuIC0gMTsgaSA+PSAwOyAtLWkpCisgIHsKKyAgICBpZiAoVkVDVE9S UCAoY2hhcnZlYykpCisgICAgICB7CisgICAgICAgIC8qIFRoaXMgc2hvdWxkIGJlIGhhbmRsZWQg dGhlIHNhbWUgYXMKKyAgICAgbmV4dF9lbGVtZW50X2Zyb21fZGlzcGxheV92ZWN0b3IgZG9lcyBp dC4gICovCisgICAgICAgIExpc3BfT2JqZWN0IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7Cisg ICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5KSkKKyAgICBjID0gR0xZUEhfQ09ERV9DSEFS IChlbnRyeSk7CisgICAgICAgIGVsc2UKKyAgICBjID0gJyAnOworICAgICAgfQorICAgIGlmIChj ID49IDA0MCAmJiBjIDwgMDE3NykKKyAgICAgIGNvbCsrOworICAgIGVsc2UgaWYgKGMgPT0gJ1xu JworICAgICAgIHx8IChjID09ICdccicKKyAgICAgICAgICAgJiYgRVEgKEJWQVIgKGN1cnJlbnRf YnVmZmVyLCBzZWxlY3RpdmVfZGlzcGxheSksIFF0KSkpCisgICAgICB7CisgICAgICAgIHB0cisr OworICAgICAgICBnb3RvIHN0YXJ0X29mX2xpbmVfZm91bmQ7CisgICAgICB9CisgICAgZWxzZSBp ZiAoYyA9PSAnXHQnKQorICAgICAgeworICAgICAgICBpZiAodGFiX3NlZW4pCisgICAgY29sID0g KChjb2wgKyB0YWJfd2lkdGgpIC8gdGFiX3dpZHRoKSAqIHRhYl93aWR0aDsKKyAgICAgICAgcG9z dF90YWIgKz0gY29sOworICAgICAgICBjb2wgPSAwOworICAgICAgICB0YWJfc2VlbiA9IDE7Cisg ICAgICB9CisgICAgZWxzZSBpZiAoVkVDVE9SUCAoY2hhcnZlYykpCisgICAgICAvKiBXaXRoIGEg ZGlzcGxheSB0YWJsZSBlbnRyeSwgQyBpcyBkaXNwbGF5ZWQgYXMgaXMsIGFuZAorICAgICAgICAg bm90IGRpc3BsYXllZCBhcyBcTk5OIG9yIGFzIF5OLiAgSWYgQyBpcyBhIHNpbmdsZS1ieXRlCisg ICAgICAgICBjaGFyYWN0ZXIsIGl0IHRha2VzIG9uZSBjb2x1bW4uICBJZiBDIGlzIG11bHRpLWJ5 dGUgaW4KKyAgICAgICAgIGEgdW5pYnl0ZSBidWZmZXIsIGl0J3MgdHJhbnNsYXRlZCB0byB1bmli eXRlLCBzbyBpdAorICAgICAgICAgYWxzbyB0YWtlcyBvbmUgY29sdW1uLiAgKi8KKyAgICAgICsr Y29sOworICAgIGVsc2UKKyAgICAgIGNvbCArPSAoY3RsX2Fycm93ICYmIGMgPCAwMjAwKSA/IDIg OiA0OworICB9CisgICAgfQorIHN0YXJ0X29mX2xpbmVfZm91bmQ6CisgIGlmICh0YWJfc2VlbikK KyAgICB7CisgICAgICBjb2wgPSAoKGNvbCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFi X3dpZHRoOworICAgICAgY29sICs9IHBvc3RfdGFiOworICAgIH0KKyAgbGFzdF9rbm93b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W5pbCkpOworICBp ZiAoIU5JTFAgKEZtZW1xICgoRmZyYW1lcCAodGFyZ2V0X2ZyYW1lKSksIGxpc3RuIChDT05TVFlQ RV9IRUFQLCAzLCBpbnRlcm4gKCJ4IiksIGludGVybiAoInczMiIpLCBpbnRlcm4gKCJucyIpKSkp KQorICAgIHsKKyAgICAgIGNvbG9yX3ZhbHVlcyA9IChGeHdfY29sb3JfdmFsdWVzIChjb2xvciwg dGFyZ2V0X2ZyYW1lKSk7CisgICAgICBmb3IgKHZsaXN0ID0gY29sb3JfdmFsdWVzOworICAgICAg ICAgICBDT05TUCAodmxpc3QpOworICAgICAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAg ICAgICAgeworICAgICAgICAgIHggPSBYRklYTlVNIChYQ0FSICh2bGlzdCkpOworICAgICAgICAg IHRlbXAgPSBtYWtlX2Zsb2F0ICh4IC8gdmFsbWF4KTsKKyAgICAgICAgICBBU0VUICh2ZWN0b3Is IGksIHRlbXApOworICAgICAgICAgIGkgPSBpICsgMTsKKyAgICAgICAgfQorICAgIH0KKyAgcmV0 dXJuIHZlY3RvcjsKK30KKworc3RhdGljIExpc3BfT2JqZWN0CittY19iZ19sc2wgKHN0cnVjdCB3 aW5kb3cgKncsIGVudW0gZmFjZV9pZCBmYWNlX2lkKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBY RlJBTUUgKHctPmZyYW1lKTsKKyAgc3RydWN0IGZhY2UgKmZhY2U7CisgIExpc3BfT2JqZWN0IGNv bG9yLCBjb2xvcl92ZWN0b3I7CisgIGlmICghTklMUCAoVmZhY2VfcmVtYXBwaW5nX2FsaXN0KQor ICAgICAgJiYgKGZhY2VfaWQgPT0gREVGQVVMVF9GQUNFX0lEIC8qIFFkZWZhdWx0ICovCisgICAg ICAgICAgfHwgZmFjZV9pZCA9PSBNT0RFX0xJTkVfRkFDRV9JRCAvKiBRbW9kZV9saW5lICovCisg ICAgICAgICAgfHwgZmFjZV9pZCA9PSBNT0R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i8KKworc3RhdGljIGludAor bWNfZ2V0X2xvZ2ljYWxfZnJpbmdlX2JpdG1hcCAoc3RydWN0IHdpbmRvdyAqdywgTGlzcF9PYmpl Y3QgYml0bWFwLCBpbnQgcmlnaHRfcCwgaW50IHBhcnRpYWxfcCkKK3sKKyAgTGlzcF9PYmplY3Qg Y21hcCwgYm0xID0gUW5pbCwgYm0yID0gUW5pbCwgYm07CisgIEVNQUNTX0lOVCBsbjEgPSAwLCBs bjIgPSAwOworICBpbnQgaXgxID0gcmlnaHRfcDsKKyAgaW50IGl4MiA9IGl4MSArIChwYXJ0aWFs X3AgPyAyIDogMCk7CisgIGlmICgoY21hcCA9IEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg ZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpLCAhTklMUCAoY21hcCkpCisgICAgeworICAgICAgYm0x ID0gRmFzc3EgKGJpdG1hcCwgY21hcCk7CisgICAgICBpZiAoQ09OU1AgKGJtMSkpCisgIHsKKyAg ICBpZiAoKGJtMSA9IFhDRFIgKGJtMSkpLCBOSUxQIChibTEpKQorICAgICAgcmV0dXJuIE5PX0ZS SU5HRV9CSVRNQVA7CisgICAgaWYgKENPTlNQIChibTEpKQorICAgICAgeworICAgICAgICBsbjEg PSBYRklYTlVNIChGbGVuZ3RoIChibTEpKTsKKyAgICAgICAgaWYgKHBhcnRpYWxfcCkKKyAgICB7 CisgICAgICBpZiAobG4xID4gaXgyKQorICAgICAgICB7CisgICAgICAgICAgYm0gPSBGbnRoICht YWtlX2ZpeG51bSAoaXgyKSwgYm0xKTsKKyAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAg ICAgZ290byBmb3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAgICAgICAgZWxzZQorICAgIHsKKyAg ICAgIGlmIChsbjEgPiBpeDEpCisgICAgICAgIHsKKyAgICAgICAgICBibSA9IEZudGggKG1ha2Vf Zml4bnVtIChpeDEpLCBibTEpOworICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICBn b3RvIGZvdW5kOworICAgICAgICB9CisgICAgfQorICAgICAgfQorICAgIGVsc2UgaWYgKChibSA9 IGJtMSwgIUVRIChibSwgUXQpKSkKKyAgICAgIGdvdG8gZm91bmQ7CisgIH0KKyAgICB9CisgIGlm ICghRVEgKGNtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxp c3QpKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRp Y2F0b3JfYWxpc3QpKSkKKyAgICB7CisgICAgICBibTIgPSBGYXNzcSAoYml0bWFwLCBCVkFSICgm YnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSk7CisgICAgICBpZiAoQ09O U1AgKGJtMikpCisgIHsKKyAgICBpZiAoKGJtMiA9IFhDRFIgKGJtMikpLCAhTklMUCAoYm0yKSkK KyAgICAgIHsKKyAgICAgICAgaWYgKENPTlNQIChibTIpKQorICAgIHsKKyAgICAgIGxuMiA9IFhG SVhOVU0gKEZsZW5ndGggKGJtMikpOworICAgICAgaWYgKHBhcnRpYWxfcCkKKyAgICAgICAgewor ICAgICAgICAgIGlmIChsbjIgPiBpeDIpCisgICAgICB7CisgICAgICAgIGJtID0gRm50aCAobWFr ZV9maXhudW0gKGl4MiksIGJtMik7CisgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAg ICAgZ290byBmb3VuZDsKKyAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgICAgIH0KKyAgfQor ICAgIH0KKyAgaWYgKGxuMSA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IEZudGggKG1ha2VfZml4 bnVtIChpeDEpLCBibTEpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgZ290byBmb3VuZDsK KyAgICB9CisgIGlmIChsbjIgPiBpeDEpCisgICAgewor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B0cnVlOworICAvKiBNYXli ZSBjbGVhciB0aGUgZGlzcGxheSB1bmRlciB0aGUgY3Vyc29yLiAgKi8KKyAgaWYgKHctPnBoeXNf Y3Vyc29yX3R5cGUgPT0gSE9MTE9XX0JPWF9DVVJTT1IpCisgICAgeworICAgICAgaW50IHgsIHk7 CisgICAgICBpbnQgaGVhZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdI VCAodyk7CisgICAgICBpbnQgd2lkdGg7CisgICAgICBjdXJzb3JfZ2x5cGggPSBnZXRfcGh5c19j dXJzb3JfZ2x5cGggKHcpOworICAgICAgaWYgKGN1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgICAg ICBnb3RvIG1hcmtfY3Vyc29yX29mZjsKKyAgICAgIHdpZHRoID0gY3Vyc29yX2dseXBoLT5waXhl bF93aWR0aDsKKyAgICAgIHggPSB3LT5waHlzX2N1cnNvci54OworICAgICAgaWYgKHggPCAwKQor ICAgICAgICB7CisgICAgICAgICAgd2lkdGggKz0geDsKKyAgICAgICAgICB4ID0gMDsKKyAgICAg ICAgfQorICAgICAgd2lkdGggPSBtaW4gKHdpZHRoLCB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhU X0FSRUEpIC0geCk7CisgICAgICB5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIG1heCAo aGVhZGVyX2xpbmVfaGVpZ2h0LCBjdXJzb3Jfcm93LT55KSk7CisgICAgICB4ID0gV0lORE9XX1RF WFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7CisgICAgICBpZiAod2lkdGggPiAwKQorICBGUkFN RV9SSUYgKGYpLT5jbGVhcl9mcmFtZV9hcmVhIChmLCB4LCB5LCB3aWR0aCwgY3Vyc29yX3Jvdy0+ dmlzaWJsZV9oZWlnaHQpOworICAgIH0KKyAgLyogRXJhc2UgdGhlIGN1cnNvciBieSByZWRyYXdp bmcgdGhlIGNoYXJhY3RlciB1bmRlcm5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KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9s bCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3 LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIGVs c2UgYmVzaWRlcyBob3Jpem9udGFsbHkgc2Nyb2xsaW5nIHRoZQorICAgICAgICAgICAgICAgY3Vy cmVudCBsaW5lIGRpZmZlcmVudGx5LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9u b3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2Fs bF9wZXJtXzFfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5f aHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgLi4u CisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9s bGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMl9wID0gKCF3LT5zdXNw ZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNj cm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID09 IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xs KTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1KTsgYW5kLCB0aGVuIHByZXNzIHRoZSBs ZWZ0IGFycm93IGtleSBvbmUgdGltZS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNf IGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4qLworICBib29sIGhzY2xfdGVtcF9w ID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1 dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBF WEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgdGhhdCBjYXVzZXMgdGhlIGN1cnJl bnQgbGluZSB0byBiZQorICAgICAgICAgICAgICAgaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZl cmVudGx5LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNj cm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfcGVybV9wID0gKCF3LT5zdXNwZW5k X2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2Rl X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAor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kb3dzKSkpCisgICAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1pbmFjdGl2ZS1mYWNlIiks IHRydWUpCisgICAgICAgIDogKGFjdGl2ZV9wCisgICAgICAgICAgICYmIG1pbmltYWxfcCkKKyAg ICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJy b3ctbWluaW1hbC1mYWNlIiksIHRydWUpCisgICAgICAgIDogKGFjdGl2ZV9wCisgICAgICAgICAg ICYmICFtaW5pbWFsX3ApCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50 ZXJuICgiKy1vdmVybGF5LWFycm93LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgOiBERUZBVUxUX0ZB Q0VfSUQ7CisgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IExFRlRfRlJJTkdFX0JJVE1B UCkKKyAgICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAgICAgICAgICAg ICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5nZV9mYWNl X2lkID0gZmFjZV9pZDsKKyAgICAgIC8qIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfbG9naWNhbF9m cmluZ2VfYml0bWFwICh3LCBRb3ZlcmxheV9hcnJvdywgZmFsc2UsIGZhbHNlKTsgKi8KKyAgICAg IGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfbG9n aWNhbF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ciKSwgZmFsc2Us IHRydWUpOworICAgICAgICBlbHNlCisgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9s b2dpY2FsX2ZyaW5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XR0aW5nIHVzaW5nIGBzZXQtZnJpbmdlLWJpdG1hcC1mYWNlJy4gKi8KKyAgICAg IGdseXBoX3Jvdy0+bGVmdF9mcmluZ2VfYml0bWFwID0gKGN1cnNvcl90eXBlID09IExFRlRfRlJJ TkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGZy aW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5P X0ZSSU5HRV9CSVRNQVA7CisgICAgICBnbHlwaF9yb3ctPmxlZnRfZnJpbmdlX29mZnNldCA9IDA7 CisgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgdHJ1ZSk7CisgICAgfQor ICAgIGVsc2UgaWYgKCFyZW1vdmVfcAorICAgICAgICAgICAgICYmIGZsYXZvciA9PSBNQ19PVkVS TEFZX0FSUk9XX0JJVE1BUAorICAgICAgICAgICAgICYmIChoc2NsX2FsbF90ZW1wX3AKKyAgICAg ICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8wX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNj bF9hbGxfcGVybV8xX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8yX3AKKyAg ICAgICAgICAgICAgICAgfHwgaHNjbF90ZW1wX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9w ZXJtX3ApKQorICAgICAgeworICAgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNl X2lkID0KKyAgICAgICAgICAoIWFjdGl2ZV9wCisgICAgICAgICAgICYmICFOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAg ICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJv dy1oc2NsLWluYW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ICAgICAgZWxzZSBpZiAoIXJlbW92ZV9w CisgICAgICAgICAgICAgICAmJiAoZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRf QVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdM RQorICAgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisg ICAgICAgICAgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gp KQorICAgICAgICB7CisgICAgICAgICAgTGlzcF9PYmplY3QgYml0bWFwX2ZsYXZvciA9IChmbGF2 b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBRbWNfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvdwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChmbGF2b3IgPT0gTUNfSE9M TE9XX1JFQ1RBTkdMRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fy cm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBRbWNfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBRbmlsOworICAgICAgICAgIGZy aW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gUklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZnJpbmdlX2JpdG1hcCAoYml0bWFwX2ZsYXZv cikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBOT19GUklOR0VfQklUTUFQOworICAgICAg ICAgIGZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gUklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAg ICAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy12ZXJ0 aWNhbC1iYXItZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFD RV9JRDsKKyAgICAgICAgICBnbHlwaF9yb3ctPmN1cnNvcl9pbl9mcmluZ2VfcCA9IGZhbHNlOwor ICAgICAgICAgIGdseXBoX3Jvdy0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wID0gMDsKKyAgICAg ICAgICBnbHlwaF9yb3ctPnJpZ2h0X2ZyaW5nZV9iaXRtYXAgPSBmcmluZ2VfYml0bWFwOworICAg ICAgICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQgPSBmYWNlX2lkOworICAgICAg ICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICAgICAgZHJhd19m cmluZ2VfYml0bWFwICh3LCBnbHlwaF9yb3csIGZhbHNlKTsKKyAgICAgICAgfQorICAgICAgICBl bHNlIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgICAgICAgICAgfHwgZmxhdm9yID09 IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfR0xZUEhfVEFC KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHctPm1jLmggPSBoOworICAgICAgICAgICAgdy0+ bWMuZnggPSBmeDsKKyAgICAgICAgICAgIHctPm1jLmZ5ID0gZnk7CisgICAgICAgICAgICB3LT5t Yy5nbHlwaF9mbGF2b3IgPSBmbGF2b3I7CisgICAgICAgICAgICB3LT5tYy5yZWQgPSBYRkxPQVRf REFUQSAoQVJFRiAoY29sb3JfdmVjdG9yLCAwKSk7CisgICAgICAgICAgICB3LT5tYy5ncmVlbiA9 IFhGTE9BVF9EQVRBIChBUkVGIChjb2xvcl92ZWN0b3IsIDEpKTsKKyAgICAgICAgICAgIHctPm1j LmJsdWUgPSBYRkxPQVRfREFUQSAoQVJFRiAoY29sb3JfdmVjdG9yLCAyKSk7CisgICAgICAgICAg ICB3LT5tYy5wb3NpbnQgPSBwb3NpbnQ7CisgICAgICAgICAgICAvKiBTb21lIG9mIHRoZXNlIHZh bHVlcyBjb21lIHRocm91Z2ggYXMgMS4wMDM5MDYsIHdoaWNoIGNhdXNlcyBhIGJyZWFrYWdlCisg ICAgICAgICAgICBvZiB0aGUgY29sb3JzIGluIHRoYXQgbXVsdGlwbGljYXRpb24gYnkgdGhlIGJh c2Ugd2lsbCBleGNlZWQgdGhlIGJhc2UuICovCisgICAgICAgICAgICBpZiAody0+bWMucmVkID4g MS4wKQorICAgICAgICAgICAgICB3LT5tYy5yZWQgPSAxLjA7CisgICAgICAgICAgICBpZiAody0+ bWMuZ3JlZW4gPiAxLjApCisgICAgICAgICAgICAgIHctPm1jLmdyZWVuID0gMS4wOworICAgICAg ICAgICAgaWYgKHctPm1jLmJsdWUgPiAxLjApCisgICAgICAgICAgICAgIHctPm1jLmJsdWUgPSAx LjA7CisgICAgICAgICAgICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGds eXBoX3JvdywgeCwgeSwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgdHJ1ZSwgYWN0aXZlX3ApOworICAgICAg ICAgICAgdy0+bWMuaCA9IC0xOworICAgICAgICAgICAgdy0+bWMuZnggPSAtMTsKKyAgICAgICAg ICAgIHctPm1jLmZ5ID0gLTE7CisgICAgICAgICAgICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBOT19G TEFWT1I7CisgICAgICAgICAgICB3LT5tYy5yZWQgPSAtMS4wOworICAgICAgICAgICAgdy0+bWMu Z3JlZW4gPSAtMS4wOworICAgICAgICAgICAgdy0+bWMuYmx1ZSA9IC0xLjA7CisgICAgICAgICAg ICB3LT5tYy5wb3NpbnQgPSAtMTsKKyAgICAgICAgICB9CisgIC8qIFJlc3RvcmUgdGhlIHByZXZp b3VzIHZhbHVlcyBmb3Igdy0+cGh5c19jdXJzb3IgYW5kIGdseXBoX3Jvdy4gKi8KKyAgdy0+cGh5 c19jdXJzb3Jfb25fcCA9IHBoeXNfY3Vyc29yX29uX3A7CisgIHctPnBoeXNfY3Vyc29yLnggPSBw aHlzX2N1cnNvcl94OworICB3LT5waHlzX2N1cnNvci55ID0gcGh5c19jdXJzb3JfeTsKKyAgdy0+ cGh5c19jdXJzb3IuaHBvcyA9IHBoeXNfY3Vyc29yX2hwb3M7CisgIHctPnBoeXNfY3Vyc29yLnZw b3MgPSBwaHlzX2N1cnNvcl92cG9zOworICB3LT5waHlzX2N1cnNvcl90eXBlID0gcGh5c19jdXJz b3JfdHlwZTsKKyAgZ2x5cGhfcm93LT5jdXJzb3JfaW5fZnJpbmdlX3Ag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ggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9 PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAg ICAgICAgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgID8gJ0MnCisgICAgICAg ICA6ICdHJyksCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5 cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisg ICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPnUuY2gsCisgICAgICAg IGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBn bHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAg ICAgICgoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICYmIGdseXBoLT51LmNoID09IDkpCisg ICAgICAgICAgID8gIlxcdCIKKyAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAg ICAgICAmJiBnbHlwaC0+dS5jaCA9PSAxMCkKKyAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAg OiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDMyKQor ICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAg ICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gOQorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0g MTAKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoICE9IDMyKQorICAgICAgICAgICA/IFNTREFU QSAoY2hhcmFjdGVyKQorICAgICAgICAgOiAiXFw/IikpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5 cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIs CisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRk ICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkg PyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAg ICdTJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2Jq ZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5 cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisg ICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hf bGluZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+ dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIpOworICAgIH0K KyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgeworICAgICAgZnBy aW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAl M2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAg ICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2Vk W2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2 ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVG RkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAoU1RS SU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAoTklM UCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScpKSks CisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5 cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxl ZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAg IGdseXBoLT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZf cCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgt PnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwK KyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisg ICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVz ZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0 aXZlX3gsCisgICAgICAgICcrJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChC VUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChT VFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChO SUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykp KSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBn bHlwaC0+dS5jbXAuaWQpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFk IiwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5l X3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+ dS5jbXAuYXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVkICU0ZCAgJTNk ICAlM2QgJXMgLiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT54 LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIg OiAiLS0iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwg Z2x5cGgtPnNsaWNlLmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgZnByaW50ZiAoc3Rk ZXJyLCAiXG4iKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZ UEgpCisgICAgeworI2lmbmRlZiBIQVZFX1hXSURHRVRTCisgICAgICBlYXNzdW1lIChmYWxzZSk7 CisjZWxzZQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICAlNWQvJS01ZCAlNWQg JTRjICU2ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVz ICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAg ICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAg ICAgICByZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAor ICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicKKyAgICAg ICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAg ICAgOiAnLScpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+ ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgt PnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisgICAgICAgIGds eXBoLT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworI2VuZGlmCisgICAgfQorfQorCisvKiBEdW1w IHRoZSBjb250ZW50cyBvZiBnbHlwaCByb3cgYXQgVlBPUyBpbiBNQVRSSVggdG8gc3RkZXJyLgor ICAgR0xZUEhTIDAgbWVhbnMgZG9uJ3Qgc2hvdyBnbHlwaCBjb250ZW50cy4KKyAgIEdMWVBIUyAx IG1lYW5zIHNob3cgZ2x5cGhzIGluIHNob3J0IGZvcm0KKyAgIEdMWVBIUyA+IDEgbWVhbnMgc2hv dyBnbHlwaHMgaW4gbG9uZyBmb3JtLiAgKi8KKwordm9pZAorbWNfZHVtcF9nbHlwaF9yb3cgKHN0 cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHZwb3MsIGludCBnbHlwaHMpCit7CisgIGludCByZWxh dGl2ZV94ID0gMDsKKyAgaWYgKGdseXBocyAhPSAxKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0 ZGVyciwgIlxuRFVNUCBHTFlQSCBST1dcbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiUm93 ICAgICBTdGFydCAgICAgICBFbmQgVXNlZCBvRT48XFxDVFpGZXNtICAgICBYICAgIFkgICAgVyAg ICBIICAgIFYgICAgQSAgICBQXG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIj09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PVxuIik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIlM2QgJTkicEQiZCAl OSJwRCJkICU0ZCAlMS4xZCUxLjFkJTEuMWQlMS4xZFwKKyUxLjFkJTEuMWQlMS4xZCUxLjFkJTEu MWQlMS4xZCUxLjFkJTEuMWQgICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZFxuIiwKKyAgICAg ICAgIHZwb3MsCisgICAgICAgICBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyksCisgICAg ICAgICBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgcm93LT51c2VkW1RF WFRfQVJFQV0sCisgICAgICAgICByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wLAor ICAgICAgICAgcm93LT5lbmFibGVkX3AsCisgICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9sZWZ0 X3AsCisgICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wLAorICAgICAgICAgcm93LT5j b250aW51ZWRfcCwKKyAgICAgICAgIE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAocm93 KSwKKyAgICAgICAgIE1BVFJJWF9ST1dfRElTUExBWVNfVEVYVF9QIChyb3cpLAorICAgICAgICAg cm93LT5lbmRzX2F0X3p2X3AsCisgICAgICAgICByb3ctPmZpbGxfbGluZV9wLAorICAgICAgICAg cm93LT5lbmRzX2luX21pZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPnN0YXJ0c19pbl9t aWRkbGVfb2ZfY2hhcl9wLAorICAgICAgICAgcm93LT5tb3VzZV9mYWNlX3AsCisgICAgICAgICBy b3ctPngsCisgICAgICAgICByb3ctPnksCisgICAgICAgICByb3ctPnBpeGVsX3dpZHRoLAorICAg ICAgICAgcm93LT5oZWlnaHQsCisgICAgICAgICByb3ctPnZpc2libGVfaGVpZ2h0LAorICAgICAg ICAgcm93LT5hc2NlbnQsCisgICAgICAgICByb3ctPnBoeXNfYXNjZW50KTsKKyAgICAgIC8qIFRo ZSBuZXh0IDMgbGluZXMgc2hvdWxkIGFsaWduIHRvICJTdGFydCIgaW4gdGhlIGhlYWRlci4gICov CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTkicEQiZCAlOSJwRCJkXHQlNWRcbiI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YgQ1xuIik7CisgICAgZm9yICg7IGdseXBo IDwgZ2x5cGhfZW5kOyArK2dseXBoKQorICAgICAgeworICAgICAgICBtY19kdW1wX2dseXBoIChy b3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94KTsKKyAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlw aC0+cGl4ZWxfd2lkdGg7CisgICAgICB9CisgIH0KKyAgICB9CisgIGVsc2UgaWYgKGdseXBocyA9 PSAxKQorICAgIHsKKyAgICAgIGludCBhcmVhOworICAgICAgY2hhciBzW1NIUlRfTUFYICsgNF07 CisgICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyAr K2FyZWEpCisgIHsKKyAgICBpbnQgaTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgcm93LT51c2VkW2Fy ZWFdOyArK2kpCisgICAgICB7CisgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmds eXBoc1thcmVhXSArIGk7CisgICAgICAgIGlmIChpID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAg ICAgICYmIGFyZWEgPT0gVEVYVF9BUkVBCisgICAgICAmJiBOSUxQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgJiYgZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgJiYgZ2x5cGgtPnUuY2gg PT0gJyAnKQorICAgIHsKKyAgICAgIHN0cmNweSAoJnNbaV0sICJbXFxuXSIpOworICAgICAgaSAr PSA0OworICAgIH0KKyAgICAgICAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAor ICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA8IDB4ODAKKyAgICAgICAgICAgJiYgZ2x5cGgtPnUu Y2ggPj0gJyAnKQorICAgIHNbaV0gPSBnbHlwaC0+dS5jaDsKKyAgICAgICAgZWxzZQorICAgIHNb aV0gPSAnLic7CisgICAgICB9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QgKHcpOworICAg ICAgaW50IHZvZmZzZXQgPSAoaGVhZGVyX2xpbmVfaGVpZ2h0ID4gMAorICAgICAgICAgICAgICAg ICAgICAgJiYgeXBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgPyB5cG9zICsgMQorICAg ICAgICAgICAgICAgICAgICAgIDogeXBvczsKKyAgICAgIGlmICh2aXNpYmxlX3ApCisgICAgICAg IHZwb3MgPSB2b2Zmc2V0OworICAgICAgICBlbHNlCisgICAgICAgICAgdnBvcyA9IDA7CisgICAg fQorICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgQ0hFQ0tfTlVNQkVSIChyb3cpOworICAgICAg ICB2cG9zID0gWEZJWE5VTSAocm93KTsKKyAgICAgIH0KKyAgbWF0cml4ID0gdy0+Y3VycmVudF9t YXRyaXg7CisgIGlmICh2cG9zID49IDAgJiYgdnBvcyA8IG1hdHJpeC0+bnJvd3MpCisgICAgbWNf ZHVtcF9nbHlwaF9yb3cgKE1BVFJJWF9ST1cgKG1hdHJpeCwgdnBvcyksCisgICAgICAgIHZwb3Ms CisgICAgICAgIFRZUEVfUkFOR0VEX0ZJWE5VTVAgKGludCwgZ2x5cGhzKSA/IFhGSVhOVU0gKGds eXBocykgOiAyKTsKKyAgcmV0dXJuIFFuaWw7Cit9CisKK3ZvaWQKK21jX2R1bXBfZ2x5cGhfbWF0 cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIGludCBnbHlwaHMpCit7CisgIGludCBp OworICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsgKytpKQorICAgIG1jX2R1bXBfZ2x5 cGhfcm93IChNQVRSSVhfUk9XIChtYXRyaXgsIGkpLCBpLCBnbHlwaHMpOworfQorCitERUZVTiAo Im1jLWR1bXAtZ2x5cGgtbWF0cml4IiwgRm1jX2R1bXBfZ2x5cGhfbWF0cml4LAorICAgICAgIFNt Y19kdW1wX2dseXBoX21hdHJpeCwgMCwgMSwgInAiLAorICA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09PT09PT09XG4iKTsKKyAgbWNfZHVtcF9nbHlwaF9tYXRyaXggKHctPmN1cnJlbnRfbWF0cml4 LAorCQkgICAgIFRZUEVfUkFOR0VEX0ZJWE5VTVAgKGludCwgZ2x5cGhzKSA/IFhGSVhOVU0gKGds eXBocykgOiAwKTsKKyAgcmV0dXJuIFFuaWw7Cit9CisKK3N0YXRpYyB2b2lkCittY19oZWxwZXIg KHN0cnVjdCB3aW5kb3cgKncsIGludCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9z LAorICAgICAgICAgICBpbnQgdnBvcywgaW50IGgsIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgY3Vy c29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgIExpc3BfT2JqZWN0IGZvcmVn cm91bmQsIExpc3BfT2JqZWN0IGJhY2tncm91bmQsIGJvb2wgYWN0aXZlX3AsCisgICAgICAgICAg IGJvb2wgbWluaW1hbF9wLCBpbnQgZmxhdm9yLCBpbnQgcG9zaW50LCBMaXNwX09iamVjdCAqcmVz dWx0KQoreworICBib29sIG1jX3N0ZGVycl9wID0gIU5JTFAgKEJWQVIgKGN1cnJlbnRfYnVmZmVy LCBtY19zdGRlcnIpKTsKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5k b3csIHcpOworICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAo d2luZG93LCBRbmlsKTsKKyAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJp bmcpOworICBkb3VibGUgcmVkX2ZnID0gWEZMT0FUX0RBVEEgKEFSRUYgKGZvcmVncm91bmQsIDAp KTsKKyAgZG91YmxlIGdyZWVuX2ZnID0gWEZMT0FUX0RBVEEgKEFSRUYgKGZvcmVncm91bmQsIDEp KTsKKyAgZG91YmxlIGJsdWVfZmcgPSBYRkxPQVRfREFUQSAoQVJFR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SCIKKyAgICA6ICJPT1BTIiksCisgIHBv c2ludCwKKyAgcmVkX2ZnLCBncmVlbl9mZywgYmx1ZV9mZywgcmVkX2JnLCBncmVlbl9iZywgYmx1 ZV9iZyk7CisgIGJvb2wgcmVtb3ZlX3AgPSBmYWxzZTsKKyAgbWNfZHJhd19lcmFzZV9oeWJyaWQg KHcsIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAg ICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLCBtaW5pbWFs X3AsCisgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3IsIHBvc2ludCwgcmVtb3ZlX3ApOwor ICBMaXNwX09iamVjdCBmaWZ0ZWVuX2VsZW1lbnRzID0gbGlzdG4gKENPTlNUWVBFX0hFQVAsIDE1 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAo eCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfZml4bnVt IChmeCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfZml4 bnVtICh5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9m aXhudW0gKGZ5KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFr ZV9maXhudW0gKGhwb3MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtYWtlX2ZpeG51bSAodnBvcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG1ha2VfZml4bnVtIChoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbWNfY3Vyc29yX3R5cGVfdG9fbGlzcCAoY3Vyc29yX3R5cGUpLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAoY3Vyc29yX3dpZHRo KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKGFjdGl2 ZV9wKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhu dW0gKG1pbmltYWxfcCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1ha2VfZml4bnVtIChmbGF2b3IpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBtYWtlX2ZpeG51bSAocG9zaW50KSk7CisgICpyZXN1bHQgPSBGY29ucyAoZmlmdGVl bl9lbGVtZW50cywgKnJlc3VsdCk7Cit9CisKKy8qIFJldHVybiBhIHBvaW50ZXIgdG8gdGhlIGds eXBoIFcncyBwaHlzaWNhbCBjdXJzb3IgaXMgb24uICBWYWx1ZSBpcworICAgbnVsbCBpZiBXJ3Mg Y3VycmVudCBtYXRyaXggaXMgaW52YWxpZCwgc28gdGhhdCBubyBtZWFuaW5nZnVsIGdseXBoCisg ICBjYW4gYmUgcmV0dXJuZWQuICAqLworCitzdHJ1Y3QgZ2x5cGggKgorbWNfZ2V0X3BoeXNfY3Vy c29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgeCwgaW50IGhwb3MsIGludCB2cG9zKQor eworICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3c7CisgIHN0cnVjdCBnbHlwaCAqZ2x5cGg7CisgIGlm ICghKHZwb3MgPj0gMAorICAgICAgICAmJiB2cG9zIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dz KSkKKyAgICByZXR1c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GxpbmUuCisgICAgICAgICAgICAgICAg ICAgIFRoZSBmeCBjb29yZGluYXRlIGlzIHNldCBlbHNld2hlcmUgYmFzZWQgdXBvbiBvcG9pbnRf eC4gKi8KKwordm9pZAorbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5IChzdHJ1Y3Qgd2luZG93 ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlwaF9yb3csCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGludCB4LCBpbnQgKmZ4LCBpbnQgeSwgaW50ICpmeSwgaW50IGhwb3MsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9zLCBpbnQgKmgsIGVudW0gdGV4dF9jdXJzb3Jf a2luZHMgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBjdXJz b3Jfd2lkdGgsIGludCAqd2QpCit7CisgIHN0cnVjdCBnbHlwaCAqZmFrZV9waHlzX2N1cnNvcl9n bHlwaCA9IG1jX2dldF9waHlzX2N1cnNvcl9nbHlwaCAodywgeCwgaHBvcywgdnBvcyk7CisgIGlm IChmYWtlX3BoeXNfY3Vyc29yX2dseXBoICE9IE5VTEwpCisgICAgeworICAgICAgc3RydWN0IGZy YW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKTsKKyAgICAgIGludCBoX3RlbXAsIGgw LCB5MCwgYXNjZW50OworICAgICAgLyogQ29tcHV0ZSB0aGUgd2lkdGggb2YgdGhlIHJlY3Rhbmds ZSB0byBkcmF3LiAgSWYgb24gYSBzdHJldGNoCisgICAgICAgICBnbHlwaCwgYW5kIGB4LXN0cmV0 Y2gtYmxvY2stY3Vyc29yJyBpcyBuaWwsIGRvbid0IGRyYXcgYQorICAgICAgICAgcmVjdGFuZ2xl IGFzIHdpZGUgYXMgdGhlIGdseXBoLCBidXQgdXNlIGEgY2Fub25pY2FsIGNoYXJhY3RlcgorICAg ICAgICAgd2lkdGggaW5zdGV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0+dmlzaWJsZV9oZWln aHQpOworICAgICAgaF90ZW1wID0gbWF4IChoMCwgYXNjZW50ICsgc2NyYXRjaF9nbHlwaHMtPmRl c2NlbnQpOworICAgICAgaDAgPSBtaW4gKGgwLCBhc2NlbnQgKyBzY3JhdGNoX2dseXBocy0+ZGVz Y2VudCk7CisgICAgICB5MCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAg aWYgKHkgPCB5MCkKKyAgICAgICAgeworICAgICAgICAgIGhfdGVtcCA9IG1heCAoaF90ZW1wIC0g KHkwIC0geSkgKyAxLCBoMCk7CisgICAgICAgICAgeSA9IHkwIC0gMTsKKyAgICAgICAgfQorICAg ICAgZWxzZQorICAgICAgICB7CisgICAgICAgICAgeTAgPSB3aW5kb3dfdGV4dF9ib3R0b21feSAo dykgLSBoMDsKKyAgICAgICAgICBpZiAoeSA+IHkwKQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBoX3RlbXAgKz0geSAtIHkwOworICAgICAgICAgICAgICB5ID0geTA7CisgICAgICAgICAg ICB9CisgICAgICAgIH0KKyAgICAgICpmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1gg KHcsIHgpOworICAgICAgKmZ5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHkpOworICAg ICAgKmggPSBoX3RlbXA7CisgICAgICBpZiAoY3Vyc29yX3R5cGUgPT0gSEJBUl9DVVJTT1IpCisg ICAgICAgIHsKKyAgICAgICAgICBpbnQgY3Vyc29yX2hlaWdodCA9IChjdXJzb3Jfd2lkdGggPCAx KSA/IGxyaW50ICgwLjI1ICogKmgpIDogY3Vyc29yX3dpZHRoOworICAgICAgICAgIGlmIChjdXJz b3JfaGVpZ2h0ID4gZ2x5cGhfcm93LT5oZWlnaHQpCisgICAgICAgICAgICBjdXJzb3JfaGVpZ2h0 ID0gZ2x5cGhfcm93LT5oZWlnaHQ7CisgICAgICAgICAgaWYgKCpoID4gY3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mICFOSUxQIChtKSkKKyAgICByZXR1cm4gbWFrZV9maXhudW0g KChQVCA8IFhGSVhOQVQgKG0pKSA9PSBiZWdpbm5pbmdwCisgICAgICAgICAgICAgICAgICAgICAg ICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICA6IGNsaXBfdG9fYm91bmRzIChCRUdWLCBY RklYTkFUIChtKSwgWlYpKTsKKyAgICAgIGVsc2UKKyAgICAgICAgcmV0dXJuIFFuaWw7Cit9CisK K3ZvaWQKK21jX2VuZ2luZSAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBzdHJ1Y3QgZ2x5cGggKmds eXBoLCBpbnQgYXJlYSwgaW50IHJlbGF0aXZlX3gsCisgICAgICAgICAgICBzdHJ1Y3Qgd2luZG93 ICp3LCBwdHJkaWZmX3QgcG9zaW50LCBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1cnNvcl90eXBl LAorICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCwgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCwg Ym9vbCBhY3RpdmVfcCwKKyAgICAgICAgICAgIGJvb2wgbWluaW1hbF9wLCBlbnVtIHR5cGVfb2Zf YWN0aW9uIGFjdGlvbl90eXBlLCBMaXNwX09iamVjdCAqcmVzdWx0KQoreworICBib29sIG1jX3N0 ZGVycl9wID0gIU5JTFAgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBtY19zdGRlcnIpKTsKKyAgaW50 IG9wb2ludF94ID0gdy0+b3V0cHV0X2N1cnNvci54OworICBpbnQgb3BvaW50X3kgPSB3LT5vdXRw dXRfY3Vyc29yLnk7CisgIGludCBvcG9pbnRfaHBvcyA9IHctPm91dHB1dF9jdXJzb3IuaHBvczsK KyAgaW50IG9wb2ludF92cG9zID0gdy0+b3V0cHV0X2N1cnNvci52cG9zOworICBMaXNwX09iamVj dCBjaGFyYWN0ZXIgPSAoQ0hBUkFDVEVSUCAobWFrZV9maXhudW0gKGdseXBoLT51LmNoKSkpCisg ICAgICAgICAgICAgICAgICAgICAgICAgID8gRmNoYXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51bSAo Z2x5cGgtPnUuY2gpKQorICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7CisgIHN0cnVj dCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBMaXNwX09iamVjdCBidWYgPSB3LT5j b250ZW50czsKKyAgQ0hFQ0tfQlVGRkVSIChidWYpOworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJV RkZFUiAoYnVmKTsKKyAgaW50IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcs IFRFWFRfQVJFQSk7CisgIGludCBmcmFtZV9jaGFyX3dpZHRoID0gRlJBTUVfQ09MVU1OX1dJRFRI IChmKTsKKyAgYm9vbCBmaWxsX2NvbHVtbl9wID0gIU5JTFAgKEJWQVIgKGIsIGZpbGxfY29sdW1u KSk7CisgIGludCBmaWxsX2NvbCA9IFhGSVhOVU0gKEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7Cisg IGludCBmaWxsX2NvbHVtbl94ID0gKGZpbGxfY29sdW1uX3ApCisgICAgICAgICAgICAgICAgICAg ICAgPyBmaWxsX2NvbCAqIGZyYW1lX2NoYXJfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICA6 IDA7CisgIGludCB0ZW1wX3ggPSByZWxhdGl2ZV94OworICBpbnQgdGVtcF95ID0gcm93LT55Owor ICBpbnQgdGVtcF9ocG9zID0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICBpbnQg dGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAg aW50IHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNlX2lkOworICBpbnQgdGVtcF9jaGFycG9zID0g Z2x5cGgtPmNoYXJwb3M7CisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAg ICAgICAgICAgICAgIEJFR0lOOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAg ICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgaWYgKGdseXBoLT50eXBl ID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGdseXBoLT50eXBlID09IEdMWVBITEVTU19HTFlQSCkK KyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAg ICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4x ZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6 IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5 cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwK KyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgICAg ICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5 cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGds eXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBo LT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAg KCghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gOSkKKyAgICAg ICAgICAgPyAiXFx0IgorICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAg ICYmIGdseXBoLT51LmNoID09IDEwKQorICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICA6ICgh TklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAg ICAgICAgID8gIlxccyIKKyAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAg ICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSAxMAor ICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMzIpCisgICAgICAgICAgID8gU1NEQVRBIChj aGFyYWN0ZXIpCisgICAgICAgICA6ICJcXD8iKSk7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisg IHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICBNVUxUSVBMRV9D VVJTT1JTOiAgQ0hBUl9HTFlQSCB8I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g ICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAg ICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21l dHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdGVtcF95LCAmZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmX2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2Qp OworICAgICAgaWYgKHRlbXBfeCA8PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAmJiAhcmVh bF9mYWtlX2N1cnNvcl9wKQorICAgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBf eSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgIC0xLCBjdXJz b3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgIG1j X2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAg bWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgLyogSXQg aXMgcG9zc2libGUgdG8gdXNlIE1DX0dMWVBIIGFuZCBhZGp1c3QgdGhlIGZ4IGNvb3JkaW5hdGU7 IGhvd2V2ZXIsCisgICAgICB0aGUgbWlkZGxlLWRvdCAvIHNwYWNlIGdseXBoIG9uIGEgd29yZC13 cmFwcGVkIGxpbmUgd2lsbCBiZSBvdmVyd3JpdHRlbgorICAgICAgbnVtZXJvdXMgdGltZXMgYW5k IGlzIHVuc2lnaHRseS4gKi8KKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMSkKKyAgICAgICAgeworICAgICAgICAgIGludCBfZngs IGZ5LCBfaCwgX3dkOworICAgICAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywg cm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmX2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2Qp OworICAgICAgICAgIHRlbXBfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hp bGUgKHRlbXBfeCA8PSB0ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1w X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3 LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5p bWFsX3AsIE1DX0dMWVBITEVTUywgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgICAgICAg ICAvKiBgdy0+cGh5c19jdXJzb3Jfd2lkdGhgIGlzIGRldGVybWluZWQgYnkgYGdseXBoLT5waXhl bF93aWR0aGAsCisgICAgICAgICAgICAgIGFuZCB0aGUgc3BhY2UgYXBwZW5kZWQ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NMQVNICisgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAm JiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxf QkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFd ID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRf eCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBI TEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpbnQgdGVtcF94ID0g KGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAg ICAgICAgICAgPyBvcG9pbnRfeAorICAgICAgICAgICAgICAgICAgICA6IHJlbGF0aXZlX3g7Cisg ICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAg IHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklO R0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5 c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNv cl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhF TF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBf eSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jf dHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19s c2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFs X3AsIGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAg Q0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgRklMTF9DT0xVTU46CisgICAgeworICAgICAgLyog YGdseXBoLT5jaGFycG9zYCBpcyB1bnJlbGlhYmxlIHdoZW4gdGVzdGluZyBmb3IgWlYgL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CisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2lu X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAg ICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAg ICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYm ICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgor ICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSBy b3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5f eCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBI TEVTUworICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkK KyAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAm JiBvcG9pbnRfeSA9PSB0ZW1wX3kKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBv cyA9PSB0ZW1wX3Zwb3MpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpbnQgdGVtcF94ID0gKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICYmIGZpbGxfY29sdW1uX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAg ICAgICA/IGZpbGxfY29sdW1uX3gKKyAgICAgICAgICAgICAgICAgICAgOiByZWxhdGl2ZV94Owor ICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJ TkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3Bo eXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElY RUxfWCAodywgZmlsbF9jb2x1bW5feCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngs IHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBj dXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBt Y19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgIC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ZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2Fy ZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAgICAgZ2x5 cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAg PyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAg ID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dp ZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBo LT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAg ICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgt Pnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIpOworICBzd2l0Y2ggKGFjdGlvbl90 eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAg ICAgICAgTVVMVElQTEVfQ1VSU09SUzogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAg ICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JT OgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCAtMSwgdGVt cF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vy c29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRl bXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dM WVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9S VUxFUjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGJv b2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0aXZlX3gKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9ocG9zID09IHRlbXBfaHBvcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBv cyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNv cl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCAmX3dkKTsKKyAgICAgIGlmICh0ZW1wX3ggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAg JiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgd2hpbGUgKHRlbXBfeCA8IHJlbGF0aXZl X3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgeworICAgICAgICAgICAgbWNfaGVs cGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVn cm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lk KSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhf VEFCLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICB0ZW1wX3ggKz0gZnJhbWVf Y2hhcl93aWR0aDsKKyAgICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHRlbXBfeCArIGdseXBo LT5waXhlbF93aWR0aCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAmJiByZWFs X2Zha2VfY3Vyc29yX3AKKyAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnBpeGVsX3dpZHRoID4g ZnJhbWVfY2hhcl93aWR0aCkKKyAgICAgICAgICB7CisgICAgICAgICAgICB0ZW1w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bXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1 cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgICAgLyogdGVtcF94ICs9IGdseXBoLT5waXhlbF93 aWR0aDsgKi8KKyAgICAgICAgICB3aGlsZSAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1w X3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAt MSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAg ICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3Ms IHJlc3VsdCk7CisgICAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAg ICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjog IFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tL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PSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICBpbnQg Zmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAmJiByb3ct PnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdl X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAg ICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAg ICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+ dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250 aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAg ICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNl ZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZl X3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAg ICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAg ICAgICAgICAgICAgIDogTUNfR0xZUEhfVEFCOworICAgICAgaW50IHRlbXBfeCA9IG9wb2ludF94 OworICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAg ICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8 IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRf RlJJTkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0 X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBj dXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVf UElYRUxfWCAodywgb3BvaW50X3gpOworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIGZ4LCB0 ZW1wX3ksIC0xLCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgaCwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNf YmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgbWlu aW1hbF9wLCBmbGF2b3IsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIGJyZWFrOworICAg IH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAg IEZJTExfQ09MVU1OOiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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aDsK KyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAg ICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICA/ IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1cnNv cl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3Ap CisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAg ICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAgICYm ICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9C QVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0g PT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIGZpbGxfY29s dW1uX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MK KyAgICAgICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19H TFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWly cykpCisgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAg ICAgJiYgb3BvaW50X3kgPT0gdGVtcF95CisgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50 X3Zwb3MgPT0gdGVtcF92cG9zKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSF9UQUIK KyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIX1RBQjsKKyAgICAgIGludCB0ZW1wX3ggPSBm aWxsX2NvbHVtbl94OworICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAor ICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90 eXBlID0gUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngsIF9meSwgaCwgX3dkOwor ICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hw b3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1 cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4ID0gV0lORE9XX1RF WFRfVE9fRlJBTUVfUElYRUxfWCAodywgZmlsbF9jb2x1bW5feCk7CisgICAgICBtY19oZWxwZXIg KHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAg ICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAg ICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAg ICAgICAgICAg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FdID09IDApID8gMCA6 IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnSScs CisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVj dCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGds eXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lk LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVf cCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT54LCBn bHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAi LS0iLAorICAgICAgICAnLicpOworICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExFX0NV UlNPUlM6ICBJTUFHRV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICA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gICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEgsIHRlbXBfY2hh cnBvcywgcmVzdWx0KTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIElNQUdF X0dMWVBIICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K KyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGN1cnNvcl90eXBlID0gSE9M TE9XX0JPWF9DVVJTT1I7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwg LTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5 cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNfYmdfbHNs ICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9w LCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJ TExfQ09MVU1OOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0t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AgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCkKKyAg eworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIHsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJy LAorICAgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2 eCIsCisgICAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAg ICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAg ICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICAgJysnLAorICAgICAgICAgIGdseXBoLT5jaGFy cG9zLAorICAgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICA/ICdC JworICAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICA/ ICdTJworICAgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAg ICAgICA/ICcwJworICAgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgICBnbHlwaC0+ cGl4ZWxfd2lkdGgsCisgICAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuY21wLmlkKTsK KyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAgICBn bHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAg ICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+dS5jbXAuYXV0 b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVkICU0ZCAgJTNkICAlM2QgJXMg LiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT54LCBnbHlwaC0+ eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAor ICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNs aWNlLmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJc biIpOworICAgICAgfQorICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAg Q09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBl ciAodywgdGVtcF94LCAtMSwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAg ICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAor ICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAor ICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3Vs dCk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAg ICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgQ09NUE9TSVRFX0dMWVBIICAg ICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBI T1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0g KG9wb2ludF94ID09IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIG9wb2ludF9ocG9zID09IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwg X2gsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1w X3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5 LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIGlmICh0ZW1w X3ggPD0gdGV4dF9hcmVh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AgICAgICB0ZW1w X3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgIHdoaWxlICh0ZW1wX3ggPD0gdGV4 dF9hcmVhX3dpZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcs IHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5k LAorICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwg YWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSExF U1MsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgICAgICAgICAgdGVtcF94ICs9IGZyYW1l X2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAg IH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAg VkVSVElDQUxfUlVMRVI6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAgICovCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsK KyAgICAgIC8qIGBnbHlwaC0+Y2hhcnBvc2AgaXMgdW5yZWxpYWJsZSB3aGVuIHRlc3RpbmcgZm9y IFpWIC0tIHdpdGhvdXQgbGluZQorICAgICAgbnVtYmVycywgdGhlIHZhbHVlIGlzIC0xOyB3aXRo IGxpbmUgbnVtYmVycywgdGhlIHZhbHVlIGlzIF9zb21ldGltZXNfIFpWLgorICAgICAgYGdseXBo LT56dl9wYCBpcyByZWxpYWJsZSwgYnV0IHJlbGllcyB1cG9uIGEgZmV3IGNvcmUgbW9kaWZpY2F0 aW9uLgorICAgICAgYHp2X3BgIGVuY29tcGFzc2VzIGEgY291cGxlIG9mIHNpdHVhdGlvbnM6ICBh IGxpbmUgZW5kaW5nIGluIFpWLCBidXQKKyAgICAgICBjb250YWluaW5nIG9uZSBvciBtb3JlIGNo YXJhY3RlcnMgYmVmb3JlIFpWOyBhbmQsIGEgbGluZSBiZXlvbmQgWlYgdGhhdAorICAgICAgIG1h eSBjb25zaXN0IG9mIHNwYWNlcyBlcXVhbCB0byBgaXQtPmxudW1fcGl4ZWxfd2lkdGhgIC8gZnJh bWVfY2hhcl93aWR0aCwKKyAgICAgICBvciBqdXN0IG9uZSBzcGFjZSBpZiB0aGVyZSBhcmUgbm8g bGluZSBudW1iZXJzLiAqLworICAgICAgYm9vbCB6dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYg TUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgICAgICBib29sIGN1cnNvcl9p bl9mcmluZ2VfcCA9IG9wb2ludF94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID49IHRleHRfYXJlYV93 aWR0aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAg ICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAg ICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGlu dWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gK KyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAg ICAgICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJU SUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIG9w b2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNT CisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf R0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChmbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09 IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVS VElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7Cisg ICAgICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9t ZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHRlbXBfeSwgJl9meS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AgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAg ICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAo Y3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNh dGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRf cCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVh XSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl94ID4gcmVsYXRpdmVf eCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAg ICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnNfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09 IHRlbXBfeQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBv cykKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hU X0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ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9iamVjdCkKKyAgICAgICAg ICAgID8gJ1MnCisgICAgICAgICAgICA6ICctJykpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lk dGgsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGlu ZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnUu eHdpZGdldCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgt PnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisjZW5kaWYK KyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisv KiAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlM6ICBYV0lER0VUX0dMWVBI ICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNh c2UgTVVMVElQTEVfQ1VSU09SUzoKKyAgICB7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwg LTEsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAt MSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAg ICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAg ICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJl YWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAg ICAgICAgIEhPUklaT05UQUxfUlVMRVI6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAg ICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxF UjoKKyAgICB7CisgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSBy ZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBv cyA9PSB0ZW1wX2hwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF95ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9p bnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAg ICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0 ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpZiAodGVtcF94IDw9IHRleHRfYXJl YV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hl bHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisg ICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91 bmQsCisgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3Rp dmVfcCwKKyAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJw b3MsIHJlc3VsdCk7CisgICAgICAvKiBJdCBpcyBwb3NzaWJsZSB0byB1c2UgTUNfR0xZUEggYW5k IGFkanVzdCB0aGUgZnggY29vcmRpbmF0ZTsgaG93ZXZlciwKKyAgICAgIHRoZSBtaWRkbGUtZG90 IC8gc3BhY2UgZ2x5cGggb24gYSB3b3JkLXdyYXBwZWQgbGluZSB3aWxsIGJlIG92ZXJ3cml0dGVu CisgICAgICBudW1lcm91cyB0aW1lcyBhbmQgaXMgdW5zaWdodGx5LiAqLworICAgICAgaWYgKGds eXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxKQorICAg ICAgICB7CisgICAgICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAgICAgICAgbWNfZ2V0 X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBf dnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgICAgdGVtcF94ICs9IGdseXBoLT5w aXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0 ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAg ICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJw b3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOwor ICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxF UjogIFhXSURHRVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICAvKiBgZ2x5 cGgtPmNoYXJwb3NgIGlzIHVucmVsaWFibGUgd2hlbiB0ZXN0aW5nIGZvciBaViAtLSB3aXRob3V0 IGxpbmUKKyAgICAgIG51bWJlcnMsIHRoZSB2YWx1ZSBpcyAtMTsgd2l0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AgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5j b250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAg ICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0 aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAg ICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAg ICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwg X2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywg dGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ks ICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQg ZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBt Y19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9z LAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3Jv dW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2 ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9jaGFycG9zLCBy ZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisv KiAgICAgICAgICAgICAgICAgICAgICAgICAgRklMTF9DT0xVTU46ICBYV0lER0VUX0dMWVBIICAg ICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2Ug RklMTF9DT0xVTU46CisgICAgeworICAgICAgLyogYGdseXBoLT5jaGFycG9zYCBpcyB1bnJlbGlh YmxlIHdoZW4gdGVzdGluZyBmb3IgWlYgLS0gd2l0aG91dCBsaW5lCisgICAgICBudW1iZXJzLCB0 aGUgdmFsdWUgaXMgLTE7IHdpdGggbGluZSBudW1iZXJzLCB0aGUgdmFsdWUgaXMgX3NvbWV0aW1l c18gWlYuCisgICAgICBgZ2x5cGgtPnp2X3BgIGlzIHJlbGlhYmxlLCBidXQgcmVsaWVzIHVwb24g YSBmZXcgY29yZSBtb2RpZmljYXRpb24uCisgICAgICBgenZfcGAgZW5jb21wYXNzZXMgYSBjb3Vw bGUgb2Ygc2l0dWF0aW9uczogIGEgbGluZSBlbmRpbmcgaW4gWlYsIGJ1dAorICAgICAgIGNvbnRh aW5pbmcgb25lIG9yIG1vcmUgY2hhcmFjdGVycyBiZWZvcmUgWlY7IGFuZCwgYSBsaW5lIGJleW9u ZCBaViB0aGF0CisgICAgICAgbWF5IGNvbnNpc3Qgb2Ygc3BhY2VzIGVxdWFsIHRvIGBpdC0+bG51 bV9waXhlbF93aWR0aGAgLyBmcmFtZV9jaGFyX3dpZHRoLAorICAgICAgIG9yIGp1c3Qgb25lIHNw YWNlIGlmIHRoZXJlIGFyZSBubyBsaW5lIG51bWJlcnMuICovCisgICAgICBib29sIHp2X3AgPSAo Z2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAg ICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID09IFpWKTsK KyAgICAgIGJvb2wgY3Vyc29yX2luX2ZyaW5nZV9wID0gb3BvaW50X3ggKyBnbHlwaC0+cGl4ZWxf d2lkdGggPj0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgaW50IGZsYXZvciA9IChjdXJzb3JfaW5f ZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRf cCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisg ICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAg ICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVS VElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmlu Z2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9w CisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAg ICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIDogKGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAg ICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5feCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAg ICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisg ICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDog KCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1 bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB0ZW1wX3kKKyAgICAg ICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpCisgICAgICAgICAg ICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7 CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwg Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9G UklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRf cGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1 cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9Q SVhFTF9YICh3LCBmaWxsX2NvbHVtbl94KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBm eCwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgs IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAg IG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAg IG1pbmltYWxfcCwgZmxhdm9yLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsK KyAgICB9CisgIH0KKyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBFTkQ6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAg ICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0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hCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19jb25mKSkpCisgICAg eworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3 KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3 aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19z dHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJhd19tdWx0aXBsZV9jdXJzb3Jz ICglcylcbiIsIHdpbmRvd19jaGFyKTsKKyAgICB9CisjZW5kaWYKKyAgYm9vbCBtY19zdGRlcnJf cCA9ICFOSUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfc3RkZXJyKSk7CisgIHB0cmRpZmZf dCBvcG9pbnRfcHQgPSBQVDsKKyAgaW50IG9wb2ludF94ID0gdy0+cGh5c19jdXJzb3IueDsKKyAg aW50IG9wb2ludF95ID0gdy0+cGh5c19jdXJzb3IueTsKKyAgaW50IG9wb2ludF9ocG9zID0gdy0+ cGh5c19jdXJzb3IuaHBvczsKKyAgaW50IG9wb2ludF92cG9zID0gdy0+cGh5c19jdXJzb3IudnBv czsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIExpc3BfT2JqZWN0 IGJ1ZiA9IHctPmNvbnRlbnRzOworICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZm ZXIgKmIgPSBYQlVGRkVSIChidWYpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVM TDsKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAv KiBXaGVuIHN3aWNoaW5nIHRvIGFub3RoZXIgYnVmZmVyIChlLmcuLCBhIG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klORyAoZmlsbF9j b2xvcik7CisgIExpc3BfT2JqZWN0IGZpbGxfY29sb3JfdmVjdG9yID0gbWNfY29sb3JfdmVjdG9y X2NhbGMgKHcsIGZpbGxfY29sb3IpOworICAvKiBGSVhNRTogIFB1dCBpbiBzb21lIGNvZGUgdG8g ZGVmYXVsdCB0byBIT0xMT1dfQk9YX0NVUlNPUiBpZiB0aGUgdXNlciBoYXMKKyAgdW53aXR0aW5n bHkgY29tZSB1cCB3aXRoIHNvbWUgdW5hY2NlcHRhYmxlIGZvcm0gb2YgdW5yZWNvZ25pemVkIGN1 cnNvciB0eXBlLiAqLworICBMaXNwX09iamVjdCBjdXJzb3JfbGlzcF90eXBlID0gQlZBUiAoYiwg bWNfcmVhbF9mYWtlX2N1cnNvcik7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgdGVtcF9jdXJz b3JfdHlwZSA9IChDT05TUCAoY3Vyc29yX2xpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIg KGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiBtY19saXNwX3RvX2N1cnNvcl90eXBlIChjdXJzb3JfbGlzcF90eXBlKTsKKyAg aW50IHRlbXBfY3Vyc29yX3dpZHRoID0gKENPTlNQIChjdXJzb3JfbGlzcF90eXBlKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENEUiAoY3Vyc29yX2xpc3Bf dHlwZSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAxOworICBlbnVtIGZhY2VfaWQg Y3Vyc29yX2ZhY2VfaWQgPQorICAgICghYWN0aXZlX3AKKyAgICAgJiYgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlyc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MRSBDVVJTT1JTICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgIGZvciAodmxpc3QgPSBCVkFSIChiLCBtdWx0aXBsZV9jdXJz b3JzX2NvbmYpOworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2 bGlzdCkpCisgICAgeworICAgICAgc3BlY3MgPSBYQ0FSICh2bGlzdCk7CisgICAgICBwb3NpbnQg PSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMCksIHNwZWNzKSk7CisgICAgICBsaXNwX3R5 cGUgPSBGbnRoIChtYWtlX2ZpeG51bSAoMSksIHNwZWNzKTsKKyAgICAgIGlmIChDT05TUCAobGlz cF90eXBlKSkKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChY Q0FSIChsaXNwX3R5cGUpKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIGN1cnNvcl90eXBlID0g bWNfbGlzcF90b19jdXJzb3JfdHlwZSAobGlzcF90eXBlKTsKKyAgICAgIGlmIChDT05TUCAobGlz cF90eXBlKSkKKyAgICAgICAgY3Vyc29yX3dpZHRoID0gWEZJWE5VTSAoWENBUiAoWENEUiAobGlz cF90eXBlKSkpOworICAgICAgICBlbHNlCisgICAgICAgICAgY3Vyc29yX3dpZHRoID0gMTsKKyAg ICAgIGZvcmVncm91bmQgPSBGbnRoIChtYWtlX2ZpeG51bSAoMiksIHNwZWNzKTsKKyAgICAgIGlm IChTVFJJTkdQIChmb3JlZ3JvdW5kKSkKKyAgICAgICAgZm9yZWdyb3VuZCA9IG1jX2NvbG9yX3Zl Y3Rvcl9jYWxjICh3LCBmb3JlZ3JvdW5kKTsKKyAgICAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1h dHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwg d2luZG93X3Jvd19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgICAgICBpbnQgaTsKKyAgICAgIExp c3BfT2JqZWN0IHRlbXAgPSBRbmlsOworICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5pbDsK KyAgICAgIGZvciAoaSA9IDA7IGkgPCBtYXRyaXgtPm5yb3dzOyArK2kpCisgICAgICAgIHsKKyAg ICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIGkpOwor ICAgICAgICAgIHJvd19zdGFydCA9IE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KTsKKyAg ICAgICAgICBpZiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgaSA9PSAxKQorICAgICAgICAg ICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0gMCkpCisgICAgICAgICAg ICB3aW5kb3dfcm93X3N0YXJ0ID0gcm93X3N0YXJ0OworICAgICAgICAgIGlmICghcm93LT5lbmFi bGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHdpbmRvd19yb3dfZW5kID0gcm93 X2VuZDsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICByb3dfZW5kID0gTUFUUklYX1JP V19FTkRfQ0hBUlBPUyAocm93KTsKKyAgICAgICAgICAgICAgICB0ZW1wID0gbGlzdG4gKENPTlNU WVBFX0hFQVAsIDMsIG1ha2VfZml4bnVtIChpKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1ha2VfZml4bnVtIChyb3dfc3RhcnQpLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKHJvd19l bmQpKTsKKyAgICAgICAgICAgICAgICB2c3BlY3MgPSBGY29ucyAodGVtcCwgdnNwZWNzKTsKKyAg ICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocG9zaW50ID49IHdpbmRvd19yb3df c3RhcnQKKyAgICAgICAgICAmJiBwb3NpbnQgPD0gd2luZG93X3Jvd19lbmQpCisgICAgICAgIHsK KyAgICAgICAgTGlzcF9PYmplY3Qgdmxpc3Q7CisgICAgICAgIGZvciAodmxpc3QgPSBGbnJldmVy c2UgKHZzcGVjcyk7CisgICAgICAgICAgICAgQ09OU1AgKHZsaXN0KTsKKyAgICAgICAgICAgICB2 bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgY291bnQg PSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMCksIFhDQVIgKHZsaXN0KSkpOworICAgICAg ICAgICAgaW50IHBvc19zdGFydCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxKSwgWENB UiAodmxpc3QpKSk7CisgICAgICAgICAgICBpbnQgcG9zX2VuZCA9IFhGSVhOVU0gKEZudGggKG1h a2VfZml4bnVtICgyKSwgWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhf cm93ICpyb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgY291bnQpOworICAgICAg ICAgICAgaW50IGFyZWE7CisgICAgICAgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICAg ICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2Fy ZWEpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBo ID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlw aF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAgICAgICBpZiAoYXJl YSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4g MCkKKyAgICAgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgICAgICAgIGlmICht Y19zdGRlcnJfcAorICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAg ICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbmNvdW50ICglZCkgfCB3aW5kb3df cm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2VuZCAoJWQvJWQpXG5cCis9PT09PT09 PT09PT09PT09PT09PT09PT09PT09IE1VTFRJUExFIENVUlNPUlMgPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcg ICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBaViBDXG4iLAorY291bnQsIHdp bmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nfc3RhcnQsIHBvc19lbmQpOworICAg ICAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0 ID4gMCAmJiBjb3VudCA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xp bmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoZ2x5cGgtPmNoYXJw b3MgPT0gcG9zaW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVGhlIHNwYWNlIGFw cGVuZGVkIHRvIGEgcm93IGVuZGluZyB3aXRoIGEgbmV3IGxpbmUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICBkb2VzIG5vdCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDApIHRoYXQg d2UgY2FuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlIGZvciB0aGlzIHBhcnRpY3Vs YXIgYXBwbGljYXRpb24uICBXaGVuIHRoZXJlIGlzIGEKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IHRoYXQgYXNzaWducyBhIHZpc2libGUK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaCB0byBhIG5ldyBsaW5lLCB0aGVyZSBp cyBubyBwcm9ibGVtIGJlY2F1c2UgdGhhdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGds eXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBjYW4gdXNlLiAgV2hlbgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywgd2UgdXNl IHRoZSBmb2xsb3dpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXN0OiAgdGhlIGFw cGVuZGVkIHNwYWNlIGhhcyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbGVzcyB0aGFuIHRoZSBlbmQgb2YgdGhlIG1hdHJpeCByb3cuICovCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHBvc2ludCA9PSBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpIC0gMSkpCisgICAgICAg ICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykp CisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVu dF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgcG9zaW50KTsKKyAgICAgICAgICAgICAgICAg ICAgICAgIGlmIChOSUxQIChmb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJlZCAqLworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGZvcmVncm91bmQgPSBvZGRfY29sb3JfdmVjdG9yOworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIC8qIHllbGxvdyAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChj dXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh ZmlsbF9jb2x1bW5fcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQg PSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiByZWQg Ki8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAyICE9IDAK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5fcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQgPSBvZGRfY29sb3JfdmVjdG9y OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHllbGxvdyAqLworICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZm9yZWdyb3VuZCA9IGV2ZW5fY29sb3JfdmVjdG9yOworICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8qIGdyZWVuICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg aWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vy cmVudF9jb2wgPiBmaWxsX2NvbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVn cm91bmQgPSBmaWxsX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICAgICAgICAgICAgbWNfZW5naW5lIChyb3csIGdseXBoLCBhcmVhLCByZWxh dGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LCBwb3NpbnQsIGN1 cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1VTFRJUExFX0NVUlNPUlMsICZy ZXN1bHQpOworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1jX3N0ZGVycl9wKQorICAg ICAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwgcmVs YXRpdmVfeCk7CisgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVs X3dpZHRoOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAg fQorICAgICAgICB9CisgICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVf ZW5kIChYRlJBTUUgKHctPmZyYW1lKSk7CisvKiBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZScg aXMgc2V0IGZvciB0aGUgd2luZG93LCBub3QgYnVmZmVyK3dpbmRvdyAtLSBpLmUuLCBhbGwgYnVm ZmVycyBhcHBlYXJpbmcKK2luIHRoZSBzYW1lIHdpbmRvdyB2aWEgYHN3aXRjaC10by1idWZmZXIn IHdpbGwgaGF2ZSBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZScuICBUaGlzIGJlaGF2aW9yCitp cyBjb25zaXN0ZW50IHdpdGggZnVuY3Rpb25zIHN1Y2ggYXMgYHNldC13aW5kb3ctZGlzcGxheS10 YWJsZScuICBXZSBkZWFsIHdpdGggdGhpcyBpbgorYG5zdGVybS5tJyAvIGB3MzJ0ZXJtLmMnIC8g YHh0ZXJtLmMnIGJ5IGNvbXBhcmluZyBgdy0+Y29udGVudHMnIHRvIHRoZSB2YWx1ZSBvZiB0aGUg YGJ1ZicKK3N0b3JlZCBpbiBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZScuICovCisgIGlmICgh TklMUCAocmVzdWx0KSkKKyAgICB3c2V0X211bHRpcGxlX2N1cnNvcnNfY2FjaGUgKHcsIGxpc3Ru IChDT05TVFlQRV9IRUFQLCAzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJl dmVyc2UgKHJlc3VsdCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGY29ucyAo d2luZG93LCBRbmlsKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25zICh3 LT5jb250ZW50cywgUW5pbCkpKTsKKyAgdy0+bWMuZHJhd19tdWx0aXBsZV9jdXJzb3JzID0gZmFs c2U7CisgIGlmIChvbGRfYnVmZmVyKQorICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZm ZXIpOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGlt ZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIGR0 b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3VzZWQpOwor ICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZHJhd19tdWx0aXBsZV9jdXJzb3JzOiAgVElNRSAo JXMpIiwgYnVmX3RpbWUpOworI2VuZGlmCisqLworfQorCit2b2lkCittY19kcmF3X2Nyb3NzaGFp cnMgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgYWN0aXZlX3AsIGJvb2wgbWluaW1hbF9wKQorewor LyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBjbG9ja190IHN0YXJ0LCBlbmQ7CisgIGRvdWJsZSBj cHVfdGltZV91c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9CVUZTSVpFX0JPVU5EXTsKKyAgc3Rh cnQgPSBjbG9jaygpOworI2VuZGlmCisqLworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFj ZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgewor ICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsK KyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5k b3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJp bmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJhd19jcm9zc2hhaXJzICglcyk6ICBh Y3RpdmVfcCAoJWQpIHwgbWluaW1hbF9wICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAg ICB3aW5kb3dfY2hhciwgYWN0aXZlX3AsIG1pbmltYWxfcCk7CisgICAgfQorI2VuZGlmCisgIGJv b2wgbWNfc3RkZXJyX3AgPSAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3N0ZGVycikp OworICBwdHJkaWZmX3Qgb3BvaW50X3B0ID0gKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93 KSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gUFQKKyAgICAgICAgICAgICAgICAgICAgICAg IDogWEZJWE5VTSAoRm1hcmtlcl9wb3NpdGlvbiAody0+cG9pbnRtKSk7CisgIGludCBvcG9pbnRf eCA9IHctPnBoeXNfY3Vyc29yLng7CisgIGludCBvcG9pbnRfeSA9IHctPnBoeXNfY3Vyc29yLnk7 CisgIGludCBvcG9pbnRfaHBvcyA9IHctPnBoeXNfY3Vyc29yLmhwb3M7CisgIGludCBvcG9pbnRf dnBvcyA9IHctPnBoeXNfY3Vyc29yLnZwb3M7CisgIHN0cnVjdCBnbHlwaCAqcmVhbF9waHlzX2N1 cnNvcl9nbHlwaCA9CisgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3LCBvcG9pbnRfeCwg b3BvaW50X2hwb3MsIG9wb2ludF92cG9zKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3 LT5mcmFtZSk7CisgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOwor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gbWF0cml4LT5yb3dzKTsKKyAgZWFz c2VydCAocm93ID49IDAgJiYgcm93IDwgbWF0cml4LT5ucm93cyk7ICovCisgIGJvb2wgYmFyZl9j cmFzaF90aHJlZSA9ICh3LT5jdXJyZW50X21hdHJpeCAmJiB3LT5jdXJyZW50X21hdHJpeC0+cm93 cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX3RocmVlKQorICAgIHsKKyAgICAg IGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVy KTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGJvb2wgYmFyZl9jcmFzaF9mb3VyID0gKG9wb2lu dF92cG9zID49IDAgJiYgb3BvaW50X3Zwb3MgPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MpID8g ZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9mb3VyKQorICAgIHsKKyAgICAgIGlmIChv bGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAg ICAgIHJldHVybjsKKyAgICB9CisgIGlmICghQlVGRkVSUCAoYnVmKSkKKyAgICB7CisgICAgICBp ZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7 CisgICAgICByZXR1cm47CisgICAgfQorICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykp KQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVy bmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGlmIChOSUxQIChCVkFS IChiLCBjcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXIpKQorICAgICAgJiYgTklMUCAoQlZBUiAo YiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVm ZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJl dHVybjsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEJFR0lOIEpPVVJORVkgLi4uCisqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBpbnQg dGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgYm9v bCBjdXJzb3JfaW5fZnJpbmdlX3AgPSB3LT5vdXRwdXRfY3Vyc29yLnggKyBmcmFtZV9jaGFyX3dp ZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93Owor ICBpbnQgY3Vyc29yX3dpZHRoID0gMTsKKyAgcHRyZGlmZl90IHBvc2ludCA9IC0xOworICBwdHJk aWZmX3QgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgb3BvaW50X3B0KTsKKyAg Ym9vbCBmaWxsX2NvbHVtbl9wID0gIU5JTFAgKEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7CisgIGlu dCBmaWxsX2NvbCA9IFhGSVhOVU0gKEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7CisgIGludCBmaWxs X2NvbHVtbl94ID0gKGZpbGxfY29sdW1uX3ApCisgICAgICAgICAgICAgICAgICAgICAgPyBmaWxs X2NvbCAqIGZyYW1lX2NoYXJfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgIExp c3BfT2JqZWN0IHJlc3VsdCA9IFFuaWw7CisgIGludCBmbGF2b3I7CisgIC8qIFZhbHVlcyBmb3Ig dGhlIGN1cnJlbnQgY29sdW1uIG9mIHRoZSB2ZXJ0aWNhbCBsaW5lLiAqLworICBMaXNwX09iamVj dCBmb3JlZ3JvdW5kID0gRm1ha2VfdmVjdG9yIChtYWtlX2ZpeG51bSAoMyksIFFuaWwpOworICBl bnVtIGZhY2VfaWQgZmFjZV9pZDsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBDT0xPUiBPRiBDUk9TU0hBSVJTCisqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKyAgZW51bSBmYWNlX2lkIGV2ZW5fZmFjZV9pZCA9CisgICAgKCFhY3RpdmVfcAor ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX2lu YWN0aXZlX3dpbmRvd3MpKSkKKyAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLWV2ZW4tbnVtYmVyZWQtY29sdW1uLWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAgICA6IGxv b2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWV2ZW4tbnVtYmVyZWQtY29sdW1uLWZh Y2UiKSwgdHJ1ZSk7CisgIHN0cnVjdCBmYWNlICpldmVuX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYs IGV2ZW5fZmFjZV9pZCk7CisgIExpc3BfT2JqZWN0IGV2ZW5fY29sb3IgPSBldmVuX2ZhY2UtPmxm YWNlW0xGQUNFX0ZPUkVHUk9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WVuICovCisgIGlmIChmaWxsX2NvbHVtbl9wCisgICAgICAmJiBjdXJyZW50X2NvbCA+IGZp bGxfY29sKQorICAgIGZvcmVncm91bmQgPSBmaWxsX2NvbG9yX3ZlY3RvcjsKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgRVJBU0UgVEhFIFJFQUwg Q1VSU09SCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGB3LT5waHlzX2N1cnNvci54L3kv aHBvcy92cG9zYCBhcmUgaW5jb3JyZWN0IGFmdGVyIGV2YWx1YXRpbmcgKHNjcm9sbC1sZWZ0IDEp CithIGNvdXBsZSBvZiB0aW1lcy4gIFJlZGlzcGxheSBlcmFzZXMgdGhlIHJlYWwgY3Vyc29yIGFs bW9zdCBpbW1lZGlhdGVseSBhZnRlcgorYG1jX2RyYXdfY3Jvc3NoYWlycycgcnVucyBpdHMgY291 cnNlIC0tIGFsbW9zdCB0b28gcXVpY2tseSB0byBzZWUgaXQgaGFwcGVuaW5nLgorVGhlIGNoYXJh Y3RlciB3aGVyZSBFbWFjcyB0aGlua3MgdGhlIHJlYWwgY3Vyc29yIGlzIGxvY2F0ZWQgZ2V0cyBy ZWRyYXduLCBhbGJpZXQKK3dpdGhvdXQgdGhlIHJlYWwgY3Vyc29yLiAgRW1hY3MgdGhpbmtzIHRo ZSByZWFsIGN1cnNvciBpcyBvbmUgY2hhcmFjdGVyIHRvIHRoZQorcmlnaHQgb2Ygd2hlcmUgaXQg c2hvdWxkIGJlIC0tIHRoaXMgaXMgbW9zdCBsaWtlbHkgZHVlIHRvIGFuIGluY29ycmVjdCBIUE9T LgorVGhpcyBwaGVub21lbmEgZG9lcyBub3Qgb2NjdXIgd2hlbiAoc2Nyb2xsLWxlZnQgMSkgaXMg Y2FsbGVkIGludGVyYWN0aXZlbHk7IGUuZy4sCitob3Jpem9udGFsIHNjcm9sbCB3aGVlbC4gIElu YXNtdWNoIGFzIGBlcmFzZV9waHlzX2N1cnNvcicgdXBkYXRlcyBtb3JlIHRoYW4KK21lcmVseSB0 aGUgYWZvcmVtZW50aW9uZWQgY29vcmRpbmF0ZXMsIHJlc2V0dGluZyB0aG9zZSBjb29yZGluYXRl cyBhZnRlciB0aGUgZmFjdAoraXMgaW5zdWZmaWNpZW50IHRvIGZpeCB0aGUgcHJvYmxlbS4gIFdl IHVzZSBgdy0+b3V0cHV0X2N1cnNvci54L3kvaHBvcy92cG9zYAorYmVjYXVzZSB0aG9zZSBjb29y ZGluYXRlcyBhcmUgY29ycmVjdC4gIFdlIGZpeCBgdy0+cGh5c19jdXJzb3IueC95L2hwb3MvdnBv c2AKK0JFRk9SRSBjYWxsaW5nIGBlcmFzZV9waHlzX2N1cnNvcicgc28gdGhhdCBvdGhlciBnb29k aWVzIGFyZSB1cGRhdGVkLiAqLworICBpZiAody0+aHNjcm9sbCA+IDApCisgICAgeworICAgICAg dy0+cGh5c19jdXJzb3IueCA9IHctPm91dHB1dF9jdXJzb3IueDsKKyAgICAgIHctPnBoeXNfY3Vy c29yLnkgPSB3LT5vdXRwdXRfY3Vyc29yLnk7CisgICAgICB3LT5waHlzX2N1cnNvci5ocG9zID0g dy0+b3V0cHV0X2N1cnNvci5ocG9zOworICAgICAgdy0+cGh5c19jdXJzb3IudnBvcyA9IHctPm91 dHB1dF9jdXJzb3IudnBvczsKKyAgICB9CisgIGlmICghbWluaW1hbF9wKQorICAgIGVyYXNlX3Bo eXNfY3Vyc29yICh3KTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAg ICAgICAgICAgICBSRVBMQUNFIFRIRSBSRUFMIENVUlNPUgorKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisgIGdseXBoX3JvdyA9IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCBvcG9pbnRf dnBvcyk7CisgIGlmICghY3Vyc29yX2luX2ZyaW5nZV9wKQorICAgIGZsYXZvciA9IE1DX0dMWVBI OworICAgIC8qIFRoaXMgY29uZGl0aW9uIHByb2JhYmx5IGRvZXMgbm90IGV4aXN0IGZvciB0aGUg cmVhbCBmYWtlIGN1cnNvci4gKi8KKyAgICBlbHNlIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAg ICAgICAgICAgICAmJiBnbHlwaF9yb3ctPmNvbnRpbnVlZF9wKQorICAgICAgZmxhdm9yID0gTUNf UElMQ1JPVzsKKyAgICAgIGVsc2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAg ICAgJiYgZ2x5cGhfcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgZmxhdm9yID0g TUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVzsKKyAgICAgICAgZWxzZSBpZiAoY3Vyc29y X2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICYmICFnbHlwaF9yb3ctPmNvbnRpbnVlZF9w CisgICAgICAgICAgICAgICAgICYmICFnbHlwaF9yb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQor ICAgICAgICAgIGZsYXZvciA9IE1DX0hPTExPV19SRUNUQU5HTEU7CisgIGZhY2VfaWQgPSAocmVh bF9waHlzX2N1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgICAgICAgICAgICA/IERFRkFVTFRfRkFD RV9JRAorICAgICAgICAgICAgICA6IHJlYWxfcGh5c19jdXJzb3JfZ2x5cGgtPmZhY2VfaWQ7Cisg IGludCBvcG9pbnRfZnggPSAtMTsKKyAgaW50IG9wb2ludF9meSA9IC0xOworICBpbnQgb3BvaW50 X2ggPSAtMTsKKyAgLyogRklYTUU6ICBQdXQgaW4gc29tZSBjb2RlIHRvIGRlZmF1bHQgdG8gSE9M TE9XX0JPWF9DVVJTT1IgaWYgdGhlIHVzZXIgaGFzCisgIHVud2l0dGluZ2x5IGNvbWUgdXAgd2l0 aCBzb21lIHVuYWNjZXB0YWJsZSBmb3JtIG9mIHVucmVjb2duaXplZCBjdXJzb3IgdHlwZS4gKi8K KyAgTGlzcF9PYmplY3QgY3Vyc29yX2xpc3BfdHlwZSA9IEJWQVIgKGIsIG1jX3JlYWxfZmFrZV9j dXJzb3IpOworICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIHRlbXBfY3Vyc29yX3R5cGUgPSAoQ09O U1AgKGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBtY19saXNwX3RvX2N1cnNvcl90eXBlIChYQ0FSIChjdXJzb3JfbGlzcF90 eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNf bGlzcF90b19jdXJzb3JfdHlwZSAoY3Vyc29yX2xpc3BfdHlwZSk7CisgIGlmIChmbGF2b3IgPT0g TUNfUElMQ1JPVworICAgICAgfHwgZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRf QVJST1cKKyAgICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFKQorICAgIHRlbXBf Y3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICBpbnQgaW5pdGlhbF9jdXJzb3Jf d2lkdGggPSAoQ09OU1AgKGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBYRklYTlVNIChYQ0FSIChYQ0RSIChjdXJzb3JfbGlzcF90eXBlKSkpCisgICAg ICAgICAgICAgICAgICAgICA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b2ludF9ocG9zLAorICAgICAgICAgICAgIG9wb2ludF92cG9zLCBvcG9pbnRfaCwg TEVGVF9GUklOR0VfQklUTUFQLCBpbml0aWFsX2N1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICBm b3JlZ3JvdW5kX2xzbCwgbWNfYmdfbHNsICh3LCBmYWNlX2lkKSwgYWN0aXZlX3AsIG1pbmltYWxf cCwKKyAgICAgICAgICAgICBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUCwgb3BvaW50X3B0LCAmcmVz dWx0KTsKKyAgYm9vbCB1cGRhdGluZ19mcmFtZV9wID0gZmFsc2U7CisgIGlmIChtaW5pbWFsX3Ap CisgICAgZ290byBjcm9zc2hhaXJzX2ZpbmlzaDsKKyAgICBlbHNlIGlmIChYRlJBTUUgKHctPmZy YW1lKSAhPSBYRlJBTUUgKHctPmZyYW1lKS0+bWNfdXBkYXRpbmdfZnJhbWUpCisgICAgeworICAg ICAgdXBkYXRpbmdfZnJhbWVfcCA9IHRydWU7CisgICAgICB1cGRhdGVfYmVnaW4gKFhGUkFNRSAo dy0+ZnJhbWUpKTsKKyAgICB9CisgIGlmICh0ZW1wX2N1cnNvcl90eXBlID09IE5PX0NVUlNPUgor ICAgICAgJiYgIW1pbmltYWxfcCkKKyAgICB7CisgICAgICBpbnQgX3dkOworICAgICAgaWYgKGZs YXZvciA9PSBNQ19HTFlQSCkKKyAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3 LCBnbHlwaF9yb3csIG9wb2ludF94LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG9wb2ludF95LCAmb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywgb3BvaW50 X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9oLCBI QkFSX0NVUlNPUiwgaW5pdGlhbF9jdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgbWNfaGVscGVy ICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9pbnRfeSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBv cywKKyAgICAgICAgICAgICAgICAgb3BvaW50X3Zwb3MsIG9wb2ludF9oLCBIQkFSX0NVUlNPUiwg Y3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywg ZmFjZV9pZCksIGFjdGl2ZV9wLCBtaW5pbWFsX3AsIGZsYXZvciwKKyAgICAgICAgICAgICAgICAg b3BvaW50X3B0LCAmcmVzdWx0KTsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgpCisgICAg ICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgZ2x5cGhfcm93LCBvcG9pbnRfeCwg Jm9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcG9pbnRf eSwgJm9wb2ludF9meSwgb3BvaW50X2hwb3MsIG9wb2ludF92cG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfaCwgQkFSX0NVUlNPUiwgaW5pdGlhbF9jdXJz b3Jfd2lkdGgsICZfd2QpOworICAgICAgbWNfaGVscGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4 LCBvcG9pbnRfeSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywKKyAgICAgICAgICAgICAgICAgb3Bv aW50X3Zwb3MsIG9wb2ludF9oLCBCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9mZywK KyAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCBmYWNlX2lkKSwgYWN0aXZlX3AsIG1pbmlt YWxfcCwgZmxhdm9yLAorICAgICAgICAgICAgICAgICBvcG9pbnRfcHQsICZyZXN1bHQpOworICAg IH0KKyAgICBlbHNlIGlmICghbWluaW1hbF9wKQorICAgICAgeworICAgICAgICBpbnQgX3dkOwor ICAgICAgICBpZiAoZmxhdm9yID09IE1DX0dMWVBIKQorICAgICAgICAgIG1jX2dldF9waHlzX2N1 cnNvcl9nZW9tZXRyeSAodywgZ2x5cGhfcm93LCBvcG9pbnRfeCwgJm9wb2ludF9meCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wb2ludF95LCAmb3BvaW50X2Z5LCBv cG9pbnRfaHBvcywgb3BvaW50X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmb3BvaW50X2gsIHRlbXBfY3Vyc29yX3R5cGUsIGluaXRpYWxfY3Vyc29yX3dpZHRo LCAmX3dkKTsKKyAgICAgICAgbWNfaGVscGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9p bnRfeSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywKKyAgICAgICAgICAgICAgICAgICBvcG9pbnRf dnBvcywgb3BvaW50X2gsIHRlbXBfY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwKKyAgICAgICAg ICAgICAgICAgICBjdXJzb3JfZmcsIG1jX2JnX2xzbCAodywgZmFjZV9pZCksIGFjdGl2ZV9wLCBt aW5pbWFsX3AsCisgICAgICAgICAgICAgICAgICAgZmxhdm9yLCBvcG9pbnRfcHQsICZyZXN1bHQp OworICAgICAgfQorICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc19ob3Jpem9udGFsX3J1 bGVyKSkpCisgICAgZ290byB2ZXJ0aWNhbF9ydWxlcjsKKyAgICBlbHNlCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKKyAgICAgICAgICAgICAgICBIT1JJWk9OVEFMIFJVTEVSOiAgRklSU1QgWCA9 PiBFT0wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kCisgICAgICAgSE9SSVpP TlRBTCBSVUxFUjogIERSQVcgRkxPQVRJTkcgR0xZUEhMRVNTIExJTkUgKEVPTCBUTyBGUklOR0Up CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3BvaW50X3Zwb3MpOworICAg ICAgaW50IGFyZWE7CisgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICBmb3IgKGFyZWEg PSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgIHsK KyAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAg ICAgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsK KyAgICAgICAgICAvKiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAgKi8KKyAgICAgICAg ICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5j aGFycG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgIGlmIChtY19z dGRlcnJfcAorICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAg IGZwcmludGYgKHN0ZGVyciwKKyJcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT0gSE9SSVpP TlRBTCBSVUxFUiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMv VG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZ IEhQT1MgVlBPUyBaViBDXG4iKTsKKyAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7 ICsrZ2x5cGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2VuZ2luZSAocm93LCBn bHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICB3LCBwb3Np bnQsIEhCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLAorICAg ICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgSE9SSVpPTlRBTF9SVUxFUiwgJnJlc3Vs dCk7CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAg ICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisg ICAgICAgICAgIFZFUlRJQ0FMIFJVTEVSOiAgQ09NQklOQVRJT04gT0YgR0xZUEggJiBHTFlQSExF U1MgQ1VSU09SUworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIHZlcnRpY2FsX3J1bGVyOgor ICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpCisgICAgICB8 fCBmaWxsX2NvbHVtbl90cnVtcHNfcCkKKyAgICBnb3RvIGNyb3NzaGFpcnNfZmluaXNoOworICAg IGVsc2UKKyAgICAgIHsKKyAgICAgICAgaW50IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJTkRPV19I RUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRy aXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwg d2luZG93X3Jvd19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgICAgICAgIGludCBpOworICAgICAg ICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0g UW5pbDsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XICht YXRyaXgsIGkpOworICAgICAgICAgICAgcm93X3N0YXJ0ID0gTUFUUklYX1JPV19TVEFSVF9DSEFS UE9TIChyb3cpOworICAgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkg PT0gMSkKKyAgICAgICAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkg PT0gMCkpCisgICAgICAgICAgICAgIHdpbmRvd19yb3dfc3RhcnQgPSByb3dfc3RhcnQ7CisgICAg ICAgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgd2luZG93X3Jvd19lbmQgPSByb3dfZW5kOworICAgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICByb3dfZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KTsK KyAgICAgICAgICAgICAgICAgIHRlbXAgPSBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywgbWFrZV9m aXhudW0gKGkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBtYWtlX2ZpeG51bSAocm93X3N0YXJ0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKHJvd19lbmQpKTsKKyAgICAgICAg ICAgICAgICAgIHZzcGVjcyA9IEZjb25zICh0ZW1wLCB2c3BlY3MpOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICB9CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3Ig KHZsaXN0ID0gRm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7 CisgICAgICAgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAg ICAgICAgaW50IGNvdW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDApLCBYQ0FSICh2 bGlzdCkpKTsKKyAgICAgICAgICAgIGludCBwb3Nfc3RhcnQgPSBYRklYTlVNIChGbnRoIChtYWtl X2ZpeG51bSAoMSksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQgPSBY RklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAg ICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgs IGNvdW50KTsKKyAgICAgICAgICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJv dywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgICAgICAgICAgaW50IGFyZWE7CisgICAgICAgICAg ICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICAgICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJ Tl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAg ICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFth cmVhXTsKKyAgICAgICAgICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0g Z2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICsrZ2x5 cGhfZW5kOworICAgICAgICAgICAgICAgIGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAg ICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0 ZGVyciwKKyJcbmNvdW50ICglZCkgfCB3aW5kb3dfcm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwgcm93 X3N0YXJ0L2VuZCAoJWQvJWQpXG5cCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PSBWRVJU SUNBTCBSVUxFUiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMv VG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZ IEhQT1MgVlBPUyBaViBDXG4iLAorY291bnQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3df ZW5kLCBwb3Nfc3RhcnQsIHBvc19lbmQpOworICAgICAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8 IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zw b3MgPT0gdGVtcF92cG9zKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVf Zm9ybWF0ID4gMCAmJiBjb3VudCA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVh ZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAocmVsYXRp dmVfeCArIGdseXBoLT5waXhlbF93aWR0aCA+IG9wb2ludF94CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgfHwgZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICYmIGdseXBoLT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAg ICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHJvdywgZ2x5cGgsIGFyZWEs IHJlbGF0aXZlX3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2lu dCwgQkFSX0NVUlNPUiwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBWRVJUSUNBTF9SVUxFUiwg JnJlc3VsdCk7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAobWNfc3RkZXJyX3ApCisg ICAgICAgICAgICAgICAgICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCBy ZWxhdGl2ZV94KTsKKyAgICAgICAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4 ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIH0KKyAgICAgICAg ICB9CisgICAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgU0VUIFRIRSBDQUNIRQorKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisg IGNyb3NzaGFpcnNfZmluaXNoOgorICBpZiAoIW1pbmltYWxfcAorICAgICAgJiYgdXBkYXRpbmdf ZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChYRlJBTUUgKHctPmZyYW1lKSk7CisgIGlmICghTklM UCAocmVzdWx0KSkKKyAgICB3c2V0X2Nyb3NzaGFpcnNfY2FjaGUgKHcsIGxpc3RuIChDT05TVFlQ RV9IRUFQLCAzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyZXZlcnNl IChyZXN1bHQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25zICh3 aW5kb3csIFFuaWwpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25z ICh3LT5jb250ZW50cywgUW5pbCkpKTsKKyAgdy0+bWMuZHJhd19jcm9zc2hhaXJzID0gZmFsc2U7 CisgIGlmIChvbGRfYnVmZmVyKQorICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIp OworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGltZV91 c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIGR0b2Fz dHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3VzZWQpOworICBk ZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZHJhd19jcm9zc2hhaXJzOiAgVElNRSAoJXMpIiwgYnVm X3RpbWUpOworI2VuZGlmCisqLworfQorCit2b2lkCittY19kcmF3X2ZpbGxfY29sdW1uIChzdHJ1 Y3Qgd2luZG93ICp3LCBib29sIGFjdGl2ZV9wLCBib29sIG1pbmltYWxfcCkKK3sKKy8qCisjaWZk ZWYgR0xZUEhfREVCVUcKKyAgY2xvY2tfdCBzdGFydCwgZW5kOworICBkb3VibGUgY3B1X3RpbWVf dXNlZDsKKyAgY2hhciBidWZfdGltZVtEQkxfQlVGU0laRV9CT1VORF07CisgIHN0YXJ0ID0gY2xv Y2soKTsKKyNlbmRpZgorKi8KKyNpZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNw bGF5X3AKKyAgICAgICYmIEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgIU5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZmlsbF9jb2x1bW4pKSkKKyAgICB7CisgICAg ICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAg ICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywg UW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19kcmF3X2ZpbGxfY29sdW1uICglcyk6ICBhY3Rp dmVfcCAoJWQpIHwgbWluaW1hbF9wICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICB3 aW5kb3dfY2hhciwgYWN0aXZlX3AsIG1pbmltYWxfcCk7CisgICAgfQorI2VuZGlmCisgIGJvb2wg bWNfc3RkZXJyX3AgPSAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3N0ZGVycikpOwor ICBpbnQgb3BvaW50X3ggPSB3LT5waHlzX2N1cnNv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2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgeworICAgICAgaWYg KG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOwor ICAgICAgcmV0dXJuOworICAgIH0KKyAgLyogYG1hdHJpeF9yb3cnIGluIGBkaXNwbmV3LmNgIGNv bnRhaW5zIHRoZSBmb2xsb3dpbmcgdGVzdHMsCisgIGVhc3NlcnQgKG1hdHJpeCAmJiBtYXRyaXgt PnJvd3MpOworICBlYXNzZXJ0IChyb3cgPj0gMCAmJiByb3cgPCBtYXRyaXgtPm5yb3dzKTsgKi8K KyAgYm9vbCBiYXJmX2NyYXNoX3RocmVlID0gKHctPmN1cnJlbnRfbWF0cml4ICYmIHctPmN1cnJl bnRfbWF0cml4LT5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdGhyZWUp CisgICAgeworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJu YWwgKG9sZF9idWZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0KKyAgYm9vbCBiYXJmX2NyYXNo X2ZvdXIgPSAob3BvaW50X3Zwb3MgPj0gMCAmJiBvcG9pbnRfdnBvcyA8IHctPmN1cnJlbnRfbWF0 cml4LT5ucm93cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX2ZvdXIpCisgICAg eworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9s ZF9idWZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0KKyAgaWYgKCFCVUZGRVJQIChidWYpKQor ICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFs IChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGlmIChOSUxQIChCVkFSIChi LCBtY19maWxsX2NvbHVtbikpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAg ICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9 CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IEJFR0lOIEpPVVJORVkgLi4uCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgaW50IGZyYW1l X2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBpbnQgY3Vyc29yX3dpZHRo ID0gMTsKKyAgcHRyZGlmZl90IHBvc2ludCA9IC0xOworICBib29sIGZpbGxfY29sdW1uX3AgPSAh TklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAo QlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sdW1uX3ggPSAoZmlsbF9jb2x1 bW5fcCkKKyAgICAgICAgICAgICAgICAgICAgICA/IGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0 aAorICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgTGlzcF9PYmplY3QgcmVzdWx0ID0gUW5p bDsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBDT0xPUiBPRiBGSUxMIENPTFVNTgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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2VbTEZBQ0VfRk9SRUdST1VORF9JTkRF WF07CisgIENIRUNLX1NUUklORyAoZmlsbF9jb2x1bW5fY29sb3IpOworICBMaXNwX09iamVjdCBm b3JlZ3JvdW5kID0gbWNfY29sb3JfdmVjdG9yX2NhbGMgKHcsIGZpbGxfY29sdW1uX2NvbG9yKTsK KyAgYm9vbCB1cGRhdGluZ19mcmFtZV9wID0gZmFsc2U7CisgIGlmIChtaW5pbWFsX3ApCisgICAg Z290byBtY19maWxsX2NvbHVtbl9maW5pc2g7CisgICAgZWxzZSBpZiAoWEZSQU1FICh3LT5mcmFt ZSkgIT0gWEZSQU1FICh3LT5mcmFtZSktPm1jX3VwZGF0aW5nX2ZyYW1lKQorICAgIHsKKyAgICAg IHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOworICAgICAgdXBkYXRlX2JlZ2luIChYRlJBTUUgKHct PmZyYW1lKSk7CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgIEZJ TEwgQ09MVU1OOiAgQ09NQklOQVRJT04gT0YgR0xZUEggJiBHTFlQSExFU1MgQ1VSU09SUworKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisgIGludCBoZWFkZXJfbGluZV9mb3JtYXQgPSBXSU5ET1df SEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4ID0g dy0+Y3VycmVudF9tYXRyaXg7CisgIGludCByb3dfc3RhcnQsIHJvd19lbmQsIHdpbmRvd19yb3df c3RhcnQsIHdpbmRvd19yb3dfZW5kOworICBpbnQgaTsKKyAgTGlzcF9PYmplY3QgdGVtcCA9IFFu aWw7CisgIExpc3BfT2JqZWN0IHZzcGVjcyA9IFFuaWw7CisgIGZvciAoaSA9IDA7IGkgPCBtYXRy aXgtPm5yb3dzOyArK2kpCisgICAgeworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFU UklYX1JPVyAobWF0cml4LCBpKTsKKyAgICAgIHJvd19zdGFydCA9IE1BVFJJWF9ST1dfU1RBUlRf Q0hBUlBPUyAocm93KTsKKyAgICAgIGlmICgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiBpID09 IDEpCisgICAgICAgICAgIHx8IChoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCAmJiBpID09IDApKQor ICAgICAgICB3aW5kb3dfcm93X3N0YXJ0ID0gcm93X3N0YXJ0OworICAgICAgaWYgKCFyb3ctPmVu YWJsZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIHdpbmRvd19yb3dfZW5kID0gcm93X2VuZDsK KyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgewor ICAgICAgICAgICAgcm93X2VuZCA9IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdyk7CisgICAg ICAgICAgICB0ZW1wID0gbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIG1ha2VfZml4bnVtIChpKSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0g KHJvd19zdGFydCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1ha2VfZml4bnVtIChyb3dfZW5kKSk7CisgICAgICAgICAgICB2c3BlY3MgPSBGY29ucyAodGVt cCwgdnNwZWNzKTsKKyAgICAgICAgICB9CisgICAgfQorICBMaXNwX09iamVjdCB2bGlzdDsKKyAg Zm9yICh2bGlzdCA9IEZucmV2ZXJzZSAodnNwZWNzKTsKKyAgICAgICBDT05TUCAodmxpc3QpOwor ICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIGludCBjb3VudCA9IFhG SVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgwKSwgWENBUiAodmxpc3QpKSk7CisgICAgICBpbnQg cG9zX3N0YXJ0ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEpLCBYQ0FSICh2bGlzdCkp KTsKKyAgICAgIGludCBwb3NfZW5kID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDIpLCBY Q0FSICh2bGlzdCkpKTsKKyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdyA9IE1BVFJJWF9ST1cg KHctPmN1cnJlbnRfbWF0cml4LCBjb3VudCk7CisgICAgICBpbnQgdGVtcF92cG9zID0gTUFUUklY X1JPV19WUE9TIChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgICAgIGludCBhcmVhOworICAg ICAgaW50IHJlbGF0aXZlX3ggPSAwOworICAgICAgZm9yIChhcmVhID0gTEVGVF9NQVJHSU5fQVJF QTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0 IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgIHN0cnVjdCBnbHlw aCAqZ2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgaWYgKGFy ZWEgPT0gVEVYVF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+ IDApCisgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAgICAgICAgICBpZiAobWNfc3RkZXJyX3AK KyAgICAgICAgICAgICAgJiYgZ2x5cGggPCBnbHlwaF9lbmQpCisgICAgICAgICAgICBmcHJpbnRm IChzdGRlcnIsCisiXG5jb3VudCAoJWQpIHwgd2luZG93X3Jvd19zdGFydC9lbmQgKCVkLyVkKSB8 IHJvd19zdGFydC9lbmQgKCVkLyVkKVxuXAorPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT0gRklMTCBDT0xVTU4gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXAorR2x5 cGgjL1RvdGFsIFJlbC5YIFQgICAgICAgUG9zIE8gICBXICAgICBDb2RlIEZhY2UgTFIgICAgIFgg ICAgWSBIUE9TIFZQT1MgWlYgQ1xuIiwKK2NvdW50LCB3aW5kb3dfcm93X3N0YXJ0LCB3aW5kb3df cm93X2VuZCwgcG9zX3N0YXJ0LCBwb3NfZW5kKTsKKyAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBn bHlwaF9lbmQ7ICsrZ2x5cGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGJvb2wgcmVh bF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IGZpbGxfY29sdW1uX3gKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0g Z2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICAgICAg ICAgIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgY291bnQgPiAwKQorICAgICAgICAg ICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAg JiYgKHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPiBmaWxsX2NvbHVtbl94CisgICAg ICAgICAgICAgICAgICAgICAgfHwgZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAg ICAgICAgICYmIGdseXBoLT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAg ICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICBtY19lbmdpbmUgKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgQkFSX0NVUlNPUiwgY3Vyc29y X3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbWluaW1hbF9wLCBGSUxMX0NPTFVNTiwgJnJlc3VsdCk7CisgICAgICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoKChoZWFk ZXJfbGluZV9mb3JtYXQgPiAwICYmIGNvdW50ID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAg JiYgKHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPiBmaWxsX2NvbHVtbl94CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoID09IGdseXBoX2VuZCAtIDEpCisgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kg KHcpCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcmVhbF9mYWtlX2N1cnNvcl9wKQorICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAobWNfc3RkZXJyX3ApCisg ICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZiAo c3RkZXJyLCAiXG5SRUFMIEZBS0UgQ1VSU09SXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgICAg IG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gpOworICAgICAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtY19zdGRlcnJfcCkKKyAgICAgICAg ICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCk7 CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAg ICAgICAgfQorICAgICAgICB9CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNFVCBUSEUgQ0FDSEUKKyoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworICBtY19maWxsX2NvbHVtbl9maW5pc2g6CisgIGlmICghbWluaW1hbF9wCisg ICAgICAmJiB1cGRhdGluZ19mcmFtZV9wKQorICAgIHVwZGF0ZV9lbmQgKFhGUkFNRSAody0+ZnJh bWUpKTsKKyAgaWYgKCFOSUxQIChyZXN1bHQpKQorICAgIHdzZXRfbWNfZmlsbF9jb2x1bW5fY2Fj aGUgKHcsIGxpc3RuIChDT05TVFlQRV9IRUFQLCAzLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEZyZXZlcnNlIChyZXN1bHQpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIEZjb25zICh3aW5kb3csIFFuaWwpLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEZjb25zICh3LT5jb250ZW50cywgUW5pbCkpKTsKKyAgdy0+bWMuZHJh d19maWxsX2NvbHVtbiA9IGZhbHNlOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVy X2ludGVybmFsIChvbGRfYnVmZmVyKTsKKy8qCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgZW5kID0g Y2xvY2soKTsKKyAgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoZW5kIC0gc3RhcnQpKSAvIENM T0NLU19QRVJfU0VDOworICBkdG9hc3RyIChidWZfdGltZSwgc2l6ZW9mIGJ1Zl90aW1lLCAwLCAw LCBjcHVfdGltZV91c2VkKTsKKyAgZGVidWdfbWV0aG9kX2FkZCAodywgIm1jX2RyYXdfZmlsbF9j b2x1bW46ICBUSU1FICglcykiLCBidWZfdGltZSk7CisjZW5kaWYKKyovCit9CisKK3ZvaWQKK21j X3JlZHJhd19tdWx0aXBsZV9jdXJzb3JzIChzdHJ1Y3Qgd2luZG93ICp3KQoreworLyoKKyNpZmRl ZiBHTFlQSF9ERUJVRworICBjbG9ja190IHN0YXJ0LCBlbmQ7CisgIGRvdWJsZSBjcHVfdGltZV91 c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9CVUZTSVpFX0JPVU5EXTsKKyAgc3RhcnQgPSBjbG9j aygpOworI2VuZGlmCisqLworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3Bs YXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICB7 CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcp OworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdp bmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0 cmluZy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WEZJWE5VTSAoRm50aCAobWFrZV9maXhu dW0gKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICB5ID0gWEZJWE5VTSAoRm50aCAobWFr ZV9maXhudW0gKDIpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeSA9IFhGSVhOVU0gKEZu dGggKG1ha2VfZml4bnVtICgzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhG SVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAg dnBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg1KSwgZmlmdGVlbl9lbGVtZW50cykp OworICAgICAgaCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg2KSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRo IChtYWtlX2ZpeG51bSAoNyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl93aWR0 aCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOwor ICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfZml4bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50 cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFrZV9maXhudW0gKDEwKSwgZmlmdGVlbl9l bGVtZW50cyk7CisgICAgICBhY3RpdmVfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgx MSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIG1pbmltYWxfcCA9IFhGSVhOVU0gKEZudGgg KG1ha2VfZml4bnVtICgxMiksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZvciA9IFhG SVhOVU0gKEZudGggKG1ha2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JWkVfQk9VTkRdOworICBzdGFydCA9 IGNsb2NrKCk7CisjZW5kaWYKKyovCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3Jl ZGlzcGxheV9wCisgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICB7CisgICAg ICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAg ICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywg UW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19yZWRyYXdfY3Jvc3NoYWlycyAoJXMpXG4iLCB3 aW5kb3dfY2hhcik7CisgICAgfQorI2VuZGlmCisgIExpc3BfT2JqZWN0IHZsaXN0ID0gUW5pbDsK KyAgTGlzcF9PYmplY3QgZmlmdGVlbl9lbGVtZW50cyA9IFFuaWw7CisgIGludCB4LCBmeCwgeSwg ZnksIGhwb3MsIHZwb3MsIGg7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgY3Vyc29yX3R5cGU7 CisgIGludCBjdXJzb3Jfd2lkdGg7CisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBRbmlsOwor ICBMaXNwX09iamVjdCBiYWNrZ3JvdW5kID0gUW5pbDsKKyAgYm9vbCBhY3RpdmVfcCA9IGZhbHNl OworICBib29sIG1pbmltYWxfcCA9IGZhbHNlOworICBpbnQgZmxhdm9yOworICBwdHJkaWZmX3Qg cG9zaW50OworICBib29sIHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgaWYgKFhGUkFNRSAo dy0+ZnJhbWUpICE9IFhGUkFN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udGgg KG1ha2VfZml4bnVtICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9 IEZudGggKG1ha2VfZml4bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3Jv dW5kID0gRm50aCAobWFrZV9maXhudW0gKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBh Y3RpdmVfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMSksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIG1pbmltYWxfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMiks IGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZvciA9IFhGSVhOVU0gKEZudGggKG1ha2Vf Zml4bnVtICgxMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHBvc2ludCA9IFhGSVhOVU0g KEZudGggKG1ha2VfZml4bnVtICgxNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGJvb2wg cmVtb3ZlX3AgPSBmYWxzZTsKKyAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCBmeCwg eSwgZnksIGhwb3MsIHZwb3MsIGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX3AsIG1pbmltYWxfcCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3IsIHBvc2ludCwgcmVtb3ZlX3ApOworICAg IH0KKyAgaWYgKHVwZGF0aW5nX2ZyYW1lX3ApCisgICAgdXBkYXRlX2VuZCAoWEZSQU1FICh3LT5m cmFtZSkpOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVf dGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpI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JVRkZFUiAo dy0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICB7CisgICAgICBMaXNw X09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlz cF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7 CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAg ICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9tdWx0aXBsZV9jdXJzb3JzICglcyk6ICBkZWxl dGVfY2FjaGUgKCVkKVxuIiwgd2luZG93X2NoYXIsIGRlbGV0ZV9jYWNoZSk7CisgICAgfQorI2Vu ZGlmCisgIExpc3BfT2JqZWN0IHZsaXN0ID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgZmlmdGVlbl9l bGVtZW50cyA9IFFuaWw7CisgIGludCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIGg7CisgIGVu dW0gdGV4dF9jdXJzb3Jfa2luZHMgY3Vyc29yX3R5cGU7CisgIGludCBjdXJzb3Jfd2lkdGg7Cisg IExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBRbmlsOworICBMaXNwX09iamVjdCBiYWNrZ3JvdW5k ID0gUW5pbDsKKyAgYm9vbCBhY3RpdmVfcCA9IGZhbHNlOworICBib29sIG1pbmltYWxfcCA9IGZh bHNlOworICBpbnQgZmxhdm9yID0gTk9fRkxBVk9SOworICBwdHJkaWZmX3QgcG9zaW50OworICBi b29sIHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgaWYgKFhGUkFNRSAody0+ZnJhbWUpICE9 IFhGUkFNRSAody0+ZnJhbWUpLT5tY191cGRhdGluZ19mcmFtZSkKKyAgICB7CisgICAgICB1cGRh dGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoWEZSQU1FICh3LT5mcmFt ZSkpOworICAgIH0KKyAgbWNfZXJhc2VfZ2x5cGhfY3Vyc29ycyAodywgdy0+cGh5c19jdXJzb3Iu eCwgdy0+cGh5c19jdXJzb3IueSwgdy0+cGh5c19jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgdy0+cGh5c19jdXJzb3IudnBvcywgdy0+cGh5c19jdXJzb3JfdHlwZSwgdy0+ cGh5c19jdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvcik7Cisg IGZvciAodmxpc3QgPSBYQ0FSICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKTsKKyAgICAgICBD T05TUCAodmxpc3QpOworICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAg IGZpZnRlZW5fZWxlbWVudHMgPSBYQ0FSICh2bGlzdCk7CisgICAgICB4ID0gWEZJWE5VTSAoRm50 aCAobWFrZV9maXhudW0gKDApLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeCA9IFhGSVhO VU0gKEZudGggKG1ha2VfZml4bnVtICgxKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgeSA9 IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAg ICAgZnkgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMyksIGZpZnRlZW5fZWxlbWVudHMp KTsKKyAgICAgIGhwb3MgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoNCksIGZpZnRlZW5f ZWxlbWVudHMpKTsKKyAgICAgIHZwb3MgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoNSks IGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGggPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51 bSAoNiksIGZp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worI2VuZGlmCisqLworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRp c3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgeworICAgICAg TGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgICAg IExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFu aWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOwor ICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2VfY3Jvc3NoYWlycyAoJXMpOiAgZGVsZXRl X2NhY2hlICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvd19jaGFyLCBkZWxl dGVfY2FjaGUpOworICAgIH0KKyNlbmRpZgorICBMaXNwX09iamVjdCB2bGlzdCA9IFFuaWw7Cisg IExpc3BfT2JqZWN0IGZpZnRlZW5fZWxlbWVudHMgPSBRbmlsOworICBpbnQgeCwgZngsIHksIGZ5 LCBocG9zLCB2cG9zLCBoOworICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1cnNvcl90eXBlOwor ICBpbnQgY3Vyc29yX3dpZHRoOworICBMaXNwX09iamVjdCBmb3JlZ3JvdW5kID0gUW5pbDsKKyAg TGlzcF9PYmplY3QgYmFja2dyb3VuZCA9IFFuaWw7CisgIGJvb2wgYWN0aXZlX3AgPSBmYWxzZTsK KyAgaW50IGZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgcHRyZGlmZl90IHBvc2ludDsKKyAgYm9vbCB1 cGRhdGluZ19mcmFtZV9wID0gZmFsc2U7CisgIGlmIChYRlJBTUUgKHctPmZyYW1lKSAhPSBYRlJB TUUgKHctPmZyYW1lKS0+bWNfdXBkYXRpbmdfZnJhbWUpCisgICAgeworICAgICAgdXBkYXRpbmdf ZnJhbWVfcCA9IHRydWU7CisgICAgICB1cGRhdGVfYmVnaW4gKFhGUkFNRSAody0+ZnJhbWUpKTsK KyAgICB9CisgIGlmICghbWluaW1hbF9wKQorICAgIG1jX2VyYXNlX2dseXBoX2N1cnNvcnMgKHcs IHctPnBoeXNfY3Vyc29yLngsIHctPnBoeXNfY3Vyc29yLnksIHctPnBoeXNfY3Vyc29yLmhwb3Ms CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+cGh5c19jdXJzb3IudnBvcywgdy0+cGh5 c19jdXJzb3JfdHlwZSwgdy0+cGh5c19jdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZmxhdm9yKTsKKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPmNyb3NzaGFpcnNfY2Fj aGUpOworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkp CisgICAgeworICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHgg PSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAg ICAgIGZ4ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEpLCBmaWZ0ZWVuX2VsZW1lbnRz KSk7CisgICAgICB5ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDIpLCBmaWZ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICBmeSA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgzKSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVt ICg0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhGSVhOVU0gKEZudGggKG1h a2VfZml4bnVtICg1KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhGSVhOVU0gKEZu dGggKG1ha2VfZml4bnVtICg2KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5 cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX2ZpeG51bSAoNyksIGZpZnRl ZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl93aWR0aCA9IFhGSVhOVU0gKEZudGggKG1ha2Vf Zml4bnVtICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGgg KG1ha2VfZml4bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0g Rm50aCAobWFrZV9maXhudW0gKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVf cCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMSksIGZpZnRlZW5fZWxlbWVudHMpKTsK KyAgICAgIG1pbmltYWxfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMiksIGZpZnRl ZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZvciA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVt ICgxMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHBvc2ludCA9IFhGSVhOVU0gKEZudGgg KG1ha2VfZml4bnVtICgxNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGlmIChmbGF2b3Ig PT0gTUNfR0xZUEgpCisgICAgICAgIG1jX2VyYXNlX2dseXBoX2N1cnNvcnMgKHcsIHgsIHksIGhw b3MsIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZsYXZvcik7CisgICAgICAgIGVs c2UKKyAgICAgICAgICB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7CisgIGNoYXIgYnVm X3RpbWVbREJMX0JVRlNJWkVfQk9VTkRdOworICBzdGFydCA9IGNsb2NrKCk7CisjZW5kaWYKKyov CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wCisgICAgICAmJiBC VUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIG1jX2ZpbGxfY29sdW1uKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2lu ZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdp bmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hh ciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAo c3RkZXJyLCAibWNfZXJhc2VfZmlsbF9jb2x1bW4gKCVzKTogIGRlbGV0ZV9jYWNoZSAoJWQpXG4i LAorICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hhciwgZGVsZXRlX2NhY2hlKTsKKyAg ICB9CisjZW5kaWYKKyAgTGlzcF9PYmplY3Qgdmxpc3QgPSBRbmlsOworICBMaXNwX09iamVjdCBm aWZ0ZWVuX2VsZW1lbnRzID0gUW5pbDsKKyAgaW50IHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg aDsKKyAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3JfdHlwZTsKKyAgaW50IGN1cnNvcl93 aWR0aDsKKyAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCA9IFFuaWw7CisgIExpc3BfT2JqZWN0IGJh Y2tncm91bmQgPSBRbmlsOworICBib29sIGFjdGl2ZV9wID0gZmFsc2U7CisgIGJvb2wgbWluaW1h bF9wID0gZmFsc2U7CisgIGludCBmbGF2b3I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X3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX2ZpeG51bSAoNyks IGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl93aWR0aCA9IFhGSVhOVU0gKEZudGgg KG1ha2VfZml4bnVtICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9 IEZudGggKG1ha2VfZml4bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3Jv dW5kID0gRm50aCAobWFrZV9maXhudW0gKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBh Y3RpdmVfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMSksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIG1pbmltYWxfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMiks IGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZvciA9IFhGSVhOVU0gKEZudGggKG1ha2Vf Zml4bnVtICgxMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHBvc2ludCA9IFhGSVhOVU0g KEZudGggKG1ha2VfZml4bnVtICgxNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGlmIChm bGF2b3IgPT0gTUNfR0xZUEgpCisgICAgICAgIG1jX2VyYXNlX2dseXBoX2N1cnNvcnMgKHcsIHgs IHksIGhwb3MsIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZsYXZvcik7CisgICAg ICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIHJlbW92ZV9wID0gdHJ1ZTsK KyAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsIGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGN1cnNvcl93aWR0aCwgYmFja2dyb3VuZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHBvc2ludCwgcmVtb3ZlX3ApOworICAg ICAgICAgIH0KKyAgICB9CisgIGlmICh1cGRhdGluZ19mcmFtZV9wKQorICAgIHVwZGF0ZV9lbmQg KFhGUkFNRSAody0+ZnJhbWUpKTsKKyAgaWYgKGRlbGV0ZV9jYWNoZSkKKyAgICB3c2V0X21jX2Zp bGxfY29sdW1uX2NhY2hlICh3LCBRbmlsKTsKKyAgdy0+bWMuZXJhc2VfZmlsbF9jb2x1bW4gPSBm YWxzZTsKKy8qCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgZW5kID0gY2xvY2soKTsKKyAgY3B1X3Rp bWVfdXNlZCA9ICgoZG91YmxlKSAoZW5kIC0gc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICBk dG9hc3RyIChidWZfdGltZSwgc2l6ZW9mIGJ1Zl90aW1lLCAwLCAwLCBjcHVfdGltZV91c2VkKTsK KyAgZGVidWdfbWV0aG9kX2FkZCAodywgIm1jX2VyYXNlX2ZpbGxfY29sdW1uOiAgVElNRSAoJXMp IiwgYnVmX3RpbWUpOworI2VuZGlmCisqLworfQorCit2b2lkCittY19yZW1vdmVfbXVsdGlwbGVf Y3Vyc29ycyAoc3RydWN0IHdpbmRvdyAqdykKK3sKKyAgYm9vbCBkZWxldGVfY2FjaGUgPSAody0+ bWMucmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9PSA4CisgICAgICAgICAgICAgICAgICAg ICAgIHx8IG1jX3JlZGlzcGxheSA9PSAzKQorICAgICAgICAgICAgICAgICAgICAgID8gZmFsc2UK KyAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYg KHRyYWNlX3JlZGlzcGxheV9wCisg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GVf Y3Vyc29yc19jYWNoZSkpKQorICAgICAgJiYgdyA9PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtl X2ZpeG51bSAoMSksIHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkKKyAgICAgICYmIEVRICh3 LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0gKDIpLCB3LT5tdWx0aXBsZV9jdXJz b3JzX2NhY2hlKSkpKQorICAgIG1jX2VyYXNlX211bHRpcGxlX2N1cnNvcnMgKHcsIGRlbGV0ZV9j YWNoZSk7Cit9CisKK3ZvaWQKK21jX3JlbW92ZV9jcm9zc2hhaXJzIChzdHJ1Y3Qgd2luZG93ICp3 KQoreworICBib29sIGRlbGV0ZV9jYWNoZSA9ICgody0+bWMucmVkaXNwbGF5X3ByZXNlcnZlX2Vj aG9fYXJlYSA9PSA4CisgICAgICAgICAgICAgICAgICAgICAgICB8fCBtY19yZWRpc3BsYXkgPT0g MykKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgIXctPm1jLmRyYXdfY3Jvc3NoYWlycworICAg ICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZXJhc2VfY3Jvc3NoYWlycykKKyAgICAgICAg ICAgICAgICAgICAgICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworI2lm ZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVS UCAody0+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBjcm9zc2hhaXJzKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAg ICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJp bmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2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jYWNoZSwgbWluaW1hbF9wKTsKKyAgICB9Cit9CisKK3ZvaWQKK21jX3Jl bW92ZV9maWxsX2NvbHVtbiAoc3RydWN0IHdpbmRvdyAqdykKK3sKKyAgYm9vbCBkZWxldGVfY2Fj aGUgPSAoKHctPm1jLnJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPT0gOAorICAgICAgICAg ICAgICAgICAgICAgICAgfHwgbWNfcmVkaXNwbGF5ID09IDMpCisgICAgICAgICAgICAgICAgICAg ICAgICYmICF3LT5tYy5kcmF3X2ZpbGxfY29sdW1uCisgICAgICAgICAgICAgICAgICAgICAgICYm ICF3LT5tYy5lcmFzZV9maWxsX2NvbHVtbikKKyAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNl CisgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlm ICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAg ICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbikp KQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdp bmRvdywgdyk7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0 cmluZyAod2luZG93LCBRbmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3 aW5kb3dfc3RyaW5nKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX3JlbW92ZV9maWxsX2Nv bHVtbiAoJXMpOiAgZGVsZXRlX2NhY2hlICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAg ICB3aW5kb3dfY2hhciwgZGVsZXRlX2NhY2hlKTsKKyAgICB9CisjZW5kaWYKKyAgLyogUmVtb3Zl IGZha2UgY3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XJzb3JzX2NvbmYpKSkKKyAgICB7CisgICAg ICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAg ICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywg UW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19tdWx0aXBsZV9jdXJzb3JzX3BvcnRhbCAoJXMp OiAgb24gKCVkKSB8IGFjdGl2ZV9wICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICB3 aW5kb3dfY2hhciwgb24sIGFjdGl2ZV9wKTsKKyAgICB9CisjZW5kaWYKKyAgYm9vbCBtaW5pbWFs X3AgPSAoIXctPm1jLmRyYXdfbXVsdGlwbGVfY3Vyc29ycworICAgICAgICAgICAgICAgICAgICAm JiBtY19yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhICE9IDgKKyAgICAgICAgICAgICAgICAg ICAgJiYgbWNfcmVkaXNwbGF5ICE9IDMKKyAgICAgICAgICAgICAgICAgICAgJiYgdyA9PSBYV0lO RE9XIChzZWxlY3RlZF93aW5kb3cpCisgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19kcmF3X2ZvcnRod2l0aCkp KTsKKyAgaWYgKHctPm1jLmVyYXNlX211bHRpcGxlX2N1cnNvcnMgJiYgdy0+bWMuZHJhd19tdWx0 aXBsZV9jdXJzb3JzCisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQ ICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKQorICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50 aCAobWFrZV9maXhudW0gKDEpLCB3LT5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ICAmJiAhTUlOSV9X SU5ET1dfUCAodykKKyAgICAgICYmICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAg ICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9j dXJzb3JzX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICYmIE5JTFAgKHctPm11bHRpcGxlX2N1 cnNvcnNfY2FjaGUpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICBtY19kcmF3X211bHRpcGxlX2N1cnNvcnMg KHcsIGFjdGl2ZV9wLCBtaW5pbWFsX3ApOworICAgIGVsc2UgaWYgKG9uCisgICAgICAgICAgICAg JiYgIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAgICAgICAgJiYgIU5JTFAgKHctPm11bHRpcGxl X2N1cnNvcnNfY2FjaGUpCisgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19jb25mKSkKKyAgICAgICAgICAgICAmJiBXSU5E T1dQIChYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMSksIHctPm11bHRpcGxlX2N1cnNvcnNfY2Fj aGUpKSkKKyAgICAgICAgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfZml4 bnVtICgxKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAgICAgICAgICAgICYmIEVR ICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0gKDIpLCB3LT5tdWx0aXBsZV9j dXJzb3JzX2NhY2hlKSkpKQorICAgICAgeworICAgICAgICBtY19lcmFzZV9tdWx0aXBsZV9jdXJz b3JzICh3LCBmYWxzZSk7CisgICAgICAgIG1jX3JlZHJ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qZWN0IHdpbmRv d19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAq d2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3Rk ZXJyLCAibWNfY3Jvc3NoYWlyc19wb3J0YWwgKCVzKTogIG9uICglZCkgfCBhY3RpdmVfcCAoJWQp XG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93X2NoYXIsIG9uLCBhY3RpdmVfcCk7 CisgICAgfQorI2VuZGlmCisgIGJvb2wgbWluaW1hbF9wID0gKCF3LT5tYy5kcmF3X2Nyb3NzaGFp cnMKKyAgICAgICAgICAgICAgICAgICAgJiYgbWNfcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJl YSAhPSA4CisgICAgICAgICAgICAgICAgICAgICYmIG1jX3JlZGlzcGxheSAhPSAzCisgICAgICAg ICAgICAgICAgICAgICYmIHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KQorICAgICAgICAg ICAgICAgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnNfZHJhd19mb3J0aHdpdGgpKSk7CisgIGlmICh3LT5tYy5lcmFzZV9jcm9zc2hhaXJzICYmIHct Pm1jLmRyYXdfY3Jvc3NoYWlycworICAgICAgJiYgIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAm JiAhTklMUCAody0+Y3Jvc3NoYWlyc19jYWNoZSkKKyAgICAgICYmIFdJTkRPV1AgKFhDQVIgKEZu dGggKG1ha2VfZml4bnVtICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAgJiYgdyA9 PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMSksIHctPmNyb3NzaGFpcnNfY2Fj aGUpKSkKKyAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENB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dpbmRvdyByZW5kZXJzIHRoZSBjYWNo ZSB1c2VsZXNzLiAqLworICBpZiAoIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAmJiAhTklMUCAo dy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpCisgICAgICAmJiBXSU5ET1dQIChYQ0FSIChGbnRoICht YWtlX2ZpeG51bSAoMSksIHctPm1jX2ZpbGxfY29sdW1uX2NhY2hlKSkpCisgICAgICAmJiB3ID09 IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmlsbF9jb2x1bW5f Y2FjaGUpKSkKKyAgICAgICYmICFFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfZml4 bnVtICgyKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkpCisgICAgeworICAgICAgd3NldF9t Y19maWxsX2NvbHVtbl9jYWNoZSAodywgUW5pbCk7CisgICAgICB3LT5tYy5lcmFzZV9maWxsX2Nv bHVtbiA9IGZhbHNlOworICAgIH0KKyAgaWYgKG9uCisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAo dykKKyAgICAgICYmICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAgICAgICAgICB8 fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbl9pbmFj dGl2ZV93aW5kb3dzKSkpCisgICAgICAmJiBOSUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkK KyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2Nv bHVtbikpKSkKKyAgICBtY19kcmF3X2ZpbGxfY29sdW1uICh3LCBhY3RpdmVfcCwgbWluaW1hbF9w KTsKKyAgICBlbHNlIGlmIChvbgorICAgICAgICAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQor ICAgICAgICAgICAgICYmICFOSUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkKKyAgICAgICAg ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVt bikpCisgICAgICAgICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9maXhudW0gKDEp LCB3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkpKQorICAgICAgICAgICAgICYmIHcgPT0gWFdJTkRP VyAoWENBUiAoRm50aCAobWFrZV9maXhudW0gKDEpLCB3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkp KQorICAgICAgICAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhu dW0gKDIpLCB3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkpKSkKKyAgICAgIHsKKyAgICAgICAgbWNf ZXJhc2VfZmlsbF9jb2x1bW4gKHcsIGZhbHNlKTsKKyAgICAgICAgbWNfcmVkcmF3X2ZpbGxfY29s dW1uICh3KTsKKyAgICAgIH0KK30KKworREVGVU4gKCJtYy1hY3RpdmF0ZS1tdWx0aXBsZS1jdXJz b3JzIiwgRm1jX2FjdGl2YXRlX211bHRpcGxlX2N1cnNvcnMsIFNtY19hY3RpdmF0ZV9tdWx0aXBs ZV9jdXJzb3JzLCAxLCAxLCAwLAorICAgICAgIGRvYzogLyogV2hlbiB1c2luZyBhIHRpbWVyLCBg bWNfc3dpdGNoZXNfbXVsdGlwbGVfY3Vyc29ycycgaW4gYGtleWJvYXJkLmMnIGlzIG5vdCBjYWxs ZWQuCitUaGVyZSBhcmUgYWxzbyBzb21lIG90aGVyIGNpcmN1bXN0YW5jZXMgd2hlcmUgYG1jLWFj dGl2YXRlLW11bHRpcGxlLWN1cnNvcnMnIGlzIGhlbHBmdWwuICovKQorICAoTGlzcF9PYmplY3Qg d2luZG93KQoreworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93ICh3aW5k b3cpOworI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HEgZGlzcGxheS1s aW5lLW51bWJlcnMgdCkKKyAgICAoc2V0cSBidWZmZXItZGlzcGxheS10YWJsZSAobWFrZS1kaXNw bGF5LXRhYmxlKSkKKyAgICAoYXNldCBidWZmZXItZGlzcGxheS10YWJsZQorICAgICAgICAgID9c dAorICAgICAgICAgICh2ZWN0b3IgKG1ha2UtZ2x5cGgtY29kZSA/XHUwMEJCICdmb250LWxvY2st d2FybmluZy1mYWNlKQorICAgICAgICAgICAgICAgICAgKG1ha2UtZ2x5cGgtY29kZSA/XHQgJ2hp Z2hsaWdodCkpKQorICAgIChhc2V0IGJ1ZmZlci1kaXNwbGF5LXRhYmxlCisgICAgICAgICAgP1xu CisgICAgICAgICAgKHZlY3RvciAobWFrZS1nbHlwaC1jb2RlID9cdTAwQjYgJ2ZvbnQtbG9jay1j b21tZW50LWZhY2UpCisgICAgICAgICAgICAgICAgICA/XG4pKQorICAgIChzZXRxIHRhYi13aWR0 aCA4KQorICAgIChzZXRxLWxvY2FsIGF1dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUpICov CisKK0RFRlVOICgibWMtZGVidWciLCBGbWNfZGVidWcsIFNtY19kZWJ1ZywgMCwgMCwgIiIsCisg ICAgICAgZG9jOiAvKiBUaGlzIGZ1bmN0aW9uIHVzZWQgZm9yIGRlYnVnZ2luZy4gKi8pCisgICh2 b2lkKQoreworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAg UFJFTElNSU5BUlkgU1RVRkYKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBzdHJ1Y3Qgd2lu ZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93IChzZWxlY3RlZF93aW5kb3cpOworICBzdHJ1Y3Qg aXQgaXQ7CisgIHZvaWQgKml0ZGF0YSA9IGJpZGlfc2hlbHZlX2NhY2hlICgpOworICBzdHJ1Y3Qg aXQgaXQyOworICB2b2lkICppdDJkYXRhID0gTlVMTDsKKyAgc3RydWN0IGl0IGl0MzsKKyAgdm9p ZCAqaXQzZGF0YSA9IE5VTEw7CisgIGVudW0gbW92ZV9pdF9yZXN1bHQgcmMgPSBNT1ZFX1hfUkVB Q0hFRDsKKyAgc3RydWN0IHRleHRfcG9zIHN0YXJ0X3RleHRfcG9zaXRpb247CisgIGludCBjb3Vu dCA9IDA7CisgIGludCBuZXdfeCA9IDA7CisgIGludCBwcmV2aW91c19pdF9jID0gMDsKKyAgaW50 IHByZXZpb3VzX2l0X2ZldGNoYnl0ZSA9IDA7CisgIGludCBwcmV2aW91c19pdF9jdXJyZW50X3gg PSAwOworICBpbnQgcHJldmlvdXNfaXRfY2hhcnBvcyA9IDA7CisgIGludCBwcmV2aW91c19pdF9w aXhlbF93aWR0aCA9IDA7CisgIGJvb2wgZmluYWxfbG9vcF9wID0gZmFsc2U7CisgIGludCB0ZXh0 X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgU1RBUlQgRElTUExBWSAtLSB3 LT5zdGFydAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIC8qIEJlZ2luIHRoZSBqb3VybmV5 IGF0IHctPnN0YXJ0LiAqLworICBTRVRfVEVYVF9QT1NfRlJPTV9NQVJLRVIgKHN0YXJ0X3RleHRf cG9zaXRpb24sIHctPnN0YXJ0KTsKKyAgc3RhcnRfZGlzcGxheSAoJml0LCB3LCBzdGFydF90ZXh0 X3Bvc2l0aW9uKTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgIEdP IFRPIFRIRSBCRUdJTk5JTkcgT0YgVEhFIENVUlJFTlQgTElORS4KKyoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworICAvKiBQbGFjZSB0aGUgSVQgb24gdGhlIGN1cnJlbnQgbGluZSBjb250YWluaW5n IFBULiAqLworICBpbnQgdm9mZnNldCA9IChXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KSA+ IDAKKyAgICAgICAgICAgICAgICAgJiYgdy0+b3V0cHV0X2N1cnNvci52cG9zID4gMCkKKyAgICAg ICAgICAgICAgICAgID8gdy0+b3V0cHV0X2N1cnNvci52cG9zIC0gMQorICAgICAgICAgICAgICAg ICAgOiB3LT5vdXRwdXRfY3Vyc29yLnZwb3M7CisgIGlmICh2b2Zmc2V0ID4gMCkKKyAgICBtb3Zl X2l0X2J5X2xpbmVzICgmaXQsIHZvZmZzZXQpOworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisg ICAgICAgICAgICAgICAgICAgICAgIE1PVkUgSVQ6ICBJTkNSRU1FTlQgPT0gMSBwaXhlbAorKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisgIGZwcmludGYgKHN0ZGVyciwgIlxuaXQuZmlyc3Rfdmlz aWJsZV94ICglZClcbiIsIGl0LmZpcnN0X3Zpc2libGVfeCk7CisgIHdoaWxlICghZmluYWxfbG9v cF9wKQorICAgIHsKKyAgICAgIG1jX2RlYnVnX3AgPSB0cnVlOworICAgICAgZmluYWxfbG9vcF9w ID0gKElUX0NIQVJQT1MgKGl0KSA9PSBaVikKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVl CisgICAgICAgICAgICAgICAgICAgICA6IChGRVRDSF9CWVRFIChJVF9CWVRFUE9TIChpdCkpID09 ICdcbicKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmMgIT0gMCkKKyAgICAgICAgICAg ICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICA6IChyYyA9PSBNT1ZFX0xJ TkVfQ09OVElOVUVEKQorICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAg ICAgICAgICAgIDogKHJjID09IE1PVkVfTElORV9UUlVOQ0FURUQKKyAgICAgICAgICAgICAgICAg ICAgICAgICYmIGl0LmN1cnJlbnRfeCAtIGl0LmZpcnN0X3Zpc2libGVfeCA+IHRleHRfYXJlYV93 aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAg ICA6IGZhbHNlOworICAgICAgaWYgKGl0LmN1cnJlbnRfeCA+IHByZXZpb3VzX2l0X2N1cnJlbnRf eAorICAgICAgICAgIHx8IElUX0NIQVJQT1MgKGl0KSA+IHByZXZpb3VzX2l0X2NoYXJwb3MKKyAg ICAgICAgICB8fCBpdC5jICE9IHByZXZpb3VzX2l0X2MKKyAgICAgICAgICB8fCBpdC5jID09IDAK KyAgICAgICAgICB8fCBpdC5jID09IDEwKQorICAgICAgICB7CisgICAgICAgICAgTGlzcF9PYmpl Y3QgY2hhcmFjdGVyID0gRmNoYXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51bSAoaXQuYykpOworICAg ICAgICAgIGludCBjaGFycG9zID0gSVRfQ0hBUlBPUyAoaXQpOworICAgICAgICAgIGZwcmludGYg KHN0ZGVyciwgIlxuY2hhcnBvcyAoJWQvJWQvJWQpIHwgZmlyc3RfeCAoJWQpIHwgcHJldmlvdXNf eCAoJWQpIHwgeCAoJWQpIHwgYyAoJXMpIHwgcHcgKCVkKSB8IGhwb3MgKCVkKVxuIiwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIGNoYXJwb3MsIHByZXZpb3VzX2l0X2NoYXJwb3MsIEZFVENI X0JZVEUgKElUX0JZVEVQT1MgKGl0KSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5m aXJzdF92aXNpYmxlX3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c19pdF9j dXJyZW50X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5jdXJyZW50X3gsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGl0LmMgPT0gOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/ICJcXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFy YWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmMgPT0gMTApCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBpdC5jICE9IDkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg aXQuYyAhPSAxMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoY2hh cmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICI/IiksCisgICAgICAgICAg ICAgICAgICAgICAgICAgICBpdC5waXhlbF93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIGl0Lmhwb3MpOworICAgICAgICAgIHByZXZpb3VzX2l0X2MgPSBpdC5jOworICAgICAgICAg IHByZXZpb3VzX2l0X2N1cnJlbnRfeCA9IGl0LmN1cnJlbnRfeDsKKyAgICAgICAgICBwcmV2aW91 c19pdF9jaGFycG9zID0gSVRfQ0hBUlBPUyAoaXQpOworICAgICAgICAgIHByZXZpb3VzX2l0X2Zl dGNoYnl0ZSA9IEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKGl0KSk7CisgICAgICAgICAgcHJldmlv dXNfaXRfcGl4ZWxfd2lkdGggPSBpdC5waXhlbF93aWR0aDsKKyAgICAgICAgICBjb3VudCArPSAx OworICAgICAgICB9CisgICAgICBuZXdfeCArPSAxOworICAgICAgU0FWRV9JVCAoaXQyLCBpdCwg aXQyZGF0YSk7CisgICAgICByYyA9IG1vdmVfaXRfaW5fZGlzcGxheV9saW5lX3RvICgmaXQsIFpW LCBuZXdfeCwgTU9WRV9UT19QT1MgfCBNT1ZFX1RPX1gpOworICAgICAgU0FWRV9JVCAoaXQzLCBp dCwgaXQzZGF0YSk7CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBUSEUgRU5ECisqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KyAgbWNfZGVidWdfcCA9IGZhbHNlOworICBiaWRpX3Vuc2hlbHZlX2NhY2hlIChpdGRhdGEsIGZh bHNlKTsKKyAgcmV0dXJuIFFuaWw7Cit9CisKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAMCiAvKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKIAkJICAgICAg V2luZG93IGRpc3BsYXkgZGltZW5zaW9ucwpAQCAtMTEyMTQsNyArMTYzMTQsMTggQEAgcmVzaXpl X2VjaG9fYXJlYV9leGFjdGx5ICh2b2lkKQogCXsKIAkgIHdpbmRvd3Nfb3JfYnVmZmVyc19jaGFu Z2VkID0gNDI7CiAJICB1cGRhdGVfbW9kZV9saW5lcyA9IDMwOwotCSAgcmVkaXNwbGF5X2ludGVy bmFsICgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09S UyAqLworCisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAxOworICAgICAgcmVkaXNwbGF5 X2ludGVybmFsICgxKTsKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDA7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKIAl9CiAgICAgfQogfQpAQCAtMTE3MDEsNyArMTY4MTIs MTggQEAgZWNob19hcmVhX2Rpc3BsYXkgKGJvb2wgdXBkYXRlX2ZyYW1lX3ApCiAJICAgICAgcHRy ZGlmZl90IGNvdW50ID0gU1BFQ1BETF9JTkRFWCAoKTsKIAkgICAgICBzcGVjYmluZCAoUXJlZGlz cGxheV9kb250X3BhdXNlLCBRdCk7CiAJICAgICAgZnNldF9yZWRpc3BsYXkgKGYpOwotCSAgICAg IHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9 IDI7CisgICAgICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgyKTsKKyAgICAgICAgICBtY19yZWRp c3BsYXlfaW50ZXJuYWwgPSAwOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAg ICAgdW5iaW5kX3RvIChjb3VudCwgUW5pbCk7CiAJICAgIH0KIAkgIGVsc2UgaWYgKEZSQU1FX1dJ TkRPV19QIChmKSAmJiBuID09IDApCkBAIC0xMzM4MCw2ICsxODUwMiwxOSBAQCBoc2Nyb2xsX3dp bmRvd190cmVlIChMaXNwX09iamVjdCB3aW5kb3cpCiAJICAgICAgZWxzZQogCQlwdCA9IGNsaXBf dG9fYm91bmRzIChCRUdWLCBtYXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSksIFpWKTsKIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBzdHJ1 Y3QgZGlzcGxheV9wb3MgKnBvcyA9ICZjdXJzb3Jfcm93LT5zdGFydDsKKyAgcHRyZGlmZl90IGNo YXJwb3MgPSBDSEFSUE9TIChwb3MtPnBvcyk7CisgIGJvb2wgYmFyZl9jcmFzaCA9IChjaGFycG9z IDwgMCB8fCAoY2hhcnBvcyA+PSBCVUZfQkVHIChjdXJyZW50X2J1ZmZlcikgJiYgY2hhcnBvcyA8 PSBaVikpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaCkKKyAgICByZXR1cm4gaHNj cm9sbGVkX3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICAvKiBNb3Zl IGl0ZXJhdG9yIHRvIHB0IHN0YXJ0aW5nIGF0IGN1cnNvcl9yb3ctPnN0YXJ0IGluCiAJCSBhIGxp bmUgd2l0aCBpbmZpbml0ZSB3aWR0aC4gICovCiAJICAgICAgaW5pdF90b19yb3dfc3RhcnQgKCZp dCwgdywgY3Vyc29yX3Jvdyk7CkBAIC0xMzYyMCwxMiArMTg3NTUsMjYgQEAgdGV4dF9vdXRzaWRl X2xpbmVfdW5jaGFuZ2VkX3AgKHN0cnVjdCB3aW5kb3cgKncsCiAgICBpcyBubyBsb25nZXIgcmVx dWVzdGVkLCB3ZSBjbGVhciB0aGUgZWNobyBhcmVhIG9yIGJyaW5nIGJhY2sgdGhlCiAgICBtaW5p LWJ1ZmZlciBpZiB0aGF0IGlzIGluIHVzZS4gICovCiAKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKIHZvaWQKLXJlZGlzcGxheSAodm9pZCkKK3Jl ZGlzcGxheSAoaW50IGZyb21fd2hlcmUpCiB7Ci0gIHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKyNp ZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnByaW50ZiAo c3RkZXJyLCAiXG5yZWRpc3BsYXkgKCVkKVxuIiwgZnJvbV93aGVyZSk7CisjZW5kaWYKKyAgbWNf cmVkaXNwbGF5ID0gZnJvbV93aGVyZTsKKyAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMzsKKyAg cmVkaXNwbGF5X2ludGVybmFsICgzKTsKKyAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKyAg bWNfcmVkaXNwbGF5ID0gMDsKIH0KIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogc3Rh dGljIExpc3BfT2JqZWN0CiBvdmVybGF5X2Fycm93X3N0cmluZ19vcl9wcm9wZXJ0eSAoTGlzcF9P YmplY3QgdmFyKQpAQCAtMTM4OTEsOSArMTkwNDAsMjEgQEAgZG8geyBpZiAocG9sbGluZ19zdG9w cGVkX2hlcmUpIHN0YXJ0X3BvbGxpbmcgKCk7CVwKIC8qIFBlcmhhcHMgaW4gdGhlIGZ1dHVyZSBh dm9pZCByZWNlbnRlcmluZyB3aW5kb3dzIGlmIGl0CiAgICBpcyBub3QgbmVjZXNzYXJ5OyBjdXJy ZW50bHkgdGhhdCBjYXVzZXMgc29tZSBwcm9ibGVtcy4gICovCiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKIHN0YXRpYyB2b2lkCi1yZWRpc3Bs YXlfaW50ZXJuYWwgKHZvaWQpCityZWRpc3BsYXlfaW50ZXJuYWwgKGludCBmcm9tX3doZXJlKQog eworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCkKKyAgICBmcHJp bnRmIChzdGRlcnIsICJcbnJlZGlzcGxheV9pbnRlcm5hbCAoJWQpXG4iLCBmcm9tX3doZXJlKTsK KyNlbmRpZgorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0cnVjdCB3aW5kb3cg KncgPSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpOwogICBzdHJ1Y3Qgd2luZG93ICpzdzsKICAg c3RydWN0IGZyYW1lICpmcjsKQEAgLTE0Mjk1LDYgKzE5NDU2LDI2IEBAIHJlZGlzcGxheV9pbnRl cm5hbCAodm9pZCkKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAkgICAgICB1cGRhdGVfd2lu ZG93X2ZyaW5nZXMgKHcsIGZhbHNlKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10aW1lciBm dW5jdGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5kb3cnLgor ICAgYHctPm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1jLWFjdGl2 YXRlLWNyb3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9yaWdodCBj dXJzb3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRpbWl6YXRp b24gM2AgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBsaW5lcyBz dWJzZXF1ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGByZWRpc3Bs YXlfd2luZG93Jy4gKi8KKworICBibG9ja19pbnB1dCAoKTsKKyAgbWNfcmVtb3ZlX211bHRpcGxl X2N1cnNvcnMgKHcpOworICBtY19yZW1vdmVfY3Jvc3NoYWlycyAodyk7CisgIG1jX3JlbW92ZV9m aWxsX2NvbHVtbiAodyk7CisgIHVuYmxvY2tfaW5wdXQgKCk7CisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKIAkgICAgICBnb3RvIHVwZGF0ZTsKIAkgICAgfQogCSAgZWxzZQpAQCAtMTQz MTcsNiArMTk0OTgsMjIgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQogCQkgICYmICh3ID0g WFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KSkgIT0gc3cpCiAJCWdvdG8gcmV0cnk7CiAKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIE5PVEU6 ICBBbiBpZGxlLXRpbWVyIGZ1bmN0aW9uIG1heSBub3QgbmVjZXNzYXJpbHkgdHJpZ2dlciBgcmVk aXNwbGF5X3dpbmRvdycuCisgICBgdy0+bXVzdF9iZV91cGRhdGVkX3AnIGlzIHNldCB0byB0cnVl IHdpdGhpbiBgbWMtYWN0aXZhdGUtY3Jvc3NoYWlycycuCistICBgb3B0aW1pemF0aW9uIDFgIChl LmcuLCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBvbiB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUp LgorLSAgYG9wdGltaXphdGlvbiAzYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQg b24gc2NyZWVuIGxpbmVzIHN1YnNlcXVlbnQKKyAgICB0byB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUp LCBieXBhc3MgYHJlZGlzcGxheV93aW5kb3cnLiAqLworCisgICAgaWYgKHctPm11c3RfYmVfdXBk YXRlZF9wKQorICAgICAgZ290byB1cGRhdGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIAkgICAgICAvKiBXZSB1c2VkIHRvIGFsd2F5cyBnb3RvIGVuZF9vZl9yZWRpc3BsYXkgaGVy ZSwgYnV0IHRoaXMKIAkJIGlzbid0IGVub3VnaCBpZiB3ZSBoYXZlIGEgYmxpbmtpbmcgY3Vyc29y LiAgKi8KIAkgICAgICBpZiAody0+Y3Vyc29yX29mZl9wID09IHctPmxhc3RfY3Vyc29yX29mZl9w KQpAQCAtMTQzNTgsNiArMTk1NTUsMjYgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQogCQkg ICp3LT5kZXNpcmVkX21hdHJpeC0+bWV0aG9kID0gMDsKIAkJICBkZWJ1Z19tZXRob2RfYWRkICh3 LCAib3B0aW1pemF0aW9uIDMiKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10aW1lciBmdW5j dGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5kb3cnLgorICAg YHctPm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1jLWFjdGl2YXRl LWNyb3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJz b3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRpbWl6YXRpb24g M2AgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBsaW5lcyBzdWJz ZXF1ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGByZWRpc3BsYXlf d2luZG93Jy4gKi8KKworICBibG9ja19pbnB1dCAoKTsKKyAgbWNfcmVtb3ZlX211bHRpcGxlX2N1 cnNvcnMgKHcpOworICBtY19yZW1vdmVfY3Jvc3NoYWlycyAodyk7CisgIG1jX3JlbW92ZV9maWxs X2NvbHVtbiAodyk7CisgIHVuYmxvY2tfaW5wdXQgKCk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIAkJICBnb3RvIHVwZGF0ZTsKIAkJfQogCSAgICAgIGVsc2UKQEAgLTE0NzM4LDE2 ICsxOTk1NSw1OCBAQCByZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhIChpbnQgZnJvbV93aGVy ZSkKICAgYmxvY2tfYnVmZmVyX2ZsaXBzICgpOwogICB1bmJsb2NrX2lucHV0ICgpOwogCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIHN0cnVj dCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHct Pm1jLnJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPSBmcm9tX3doZXJlOworICBtY19yZWRp c3BsYXlfcHJlc2VydmVfZWNob19hcmVhID0gZnJvbV93aGVyZTsKKwogICBpZiAoIU5JTFAgKGVj aG9fYXJlYV9idWZmZXJbMV0pKQogICAgIHsKICAgICAgIC8qIFdlIGhhdmUgYSBwcmV2aW91c2x5 IGRpc3BsYXllZCBtZXNzYWdlLCBidXQgbm8gY3VycmVudAogCSBtZXNzYWdlLiAgUmVkaXNwbGF5 IHRoZSBwcmV2aW91cyBtZXNzYWdlLiAgKi8KICAgICAgIGRpc3BsYXlfbGFzdF9kaXNwbGF5ZWRf bWVzc2FnZV9wID0gdHJ1ZTsKLSAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgbWNf cmVkaXNwbGF5X2ludGVybmFsID0gNDsKKyAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoNCk7Cisg ICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAwOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgICAgICBkaXNwbGF5X2xhc3RfZGlzcGxheWVkX21lc3NhZ2VfcCA9IGZhbHNlOwog ICAgIH0KICAgZWxzZQotICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKyAgICB7CisKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIG1j X3JlZGlzcGxheV9pbnRlcm5hbCA9IDU7CisgICAgICByZWRpc3BsYXlfaW50ZXJuYWwgKDUpOwor ICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKworICAgIH0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF IENVUlNPUlMgKi8KKworICB3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID0gMDsK KyAgbWNfcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IDA7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCiAKICAgZmx1c2hfZnJhbWUgKFNFTEVDVEVEX0ZSQU1FICgpKTsKICAgdW5i aW5kX3RvIChjb3VudCwgUW5pbCk7CkBAIC0xNzMwMiw2ICsyMjU2MSwyNSBAQCByZWRpc3BsYXlf d2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQogICBkZWJ1 Z19tZXRob2RfYWRkICh3LCAicmVjZW50ZXIiKTsKICNlbmRpZgogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10 aW1lciBmdW5jdGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5k b3cnLgorICAgYHctPm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1j LWFjdGl2YXRlLWNyb3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9y aWdodCBjdXJzb3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRp bWl6YXRpb24gM2AgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBs aW5lcyBzdWJzZXF1ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGBy ZWRpc3BsYXlfd2luZG93Jy4gKi8KKworICBibG9ja19pbnB1dCAoKTsKKyAgbWNfcmVtb3ZlX211 bHRpcGxlX2N1cnNvcnMgKHcpOworICBtY19yZW1vdmVfY3Jvc3NoYWlycyAodyk7CisgIG1jX3Jl bW92ZV9maWxsX2NvbHVtbiAodyk7CisgIHVuYmxvY2tfaW5wdXQgKCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgLyogRm9yZ2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Y19yZW1vdmVfY3Jvc3NoYWlycyAodyk7CisgIG1jX3JlbW92ZV9maWxsX2NvbHVtbiAo dyk7CisgIHVuYmxvY2tfaW5wdXQgKCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgc2V0X2J1ZmZlcl9pbnRlcm5hbF8xIChvbGQpOwogICAvKiBBdm9pZCBhbiBhYm9ydCBpbiBU RU1QX1NFVF9QVF9CT1RIIGlmIHRoZSBidWZmZXIgaGFzIGJlY29tZQogICAgICBzaG9ydGVyLiAg VGhpcyBjYW4gYmUgY2F1c2VkIGJ5IGxvZyB0cnVuY2F0aW9uIGluICpNZXNzYWdlcyouICAqLwpA QCAtMjAxMjIsNiArMjU0MTksMTcgQEAgYXBwZW5kX3NwYWNlX2Zvcl9uZXdsaW5lIChzdHJ1Y3Qg aXQgKml0LCBib29sIGRlZmF1bHRfZmFjZV9wKQogCSAgbWVtc2V0ICgmaXQtPnBvc2l0aW9uLCAw LCBzaXplb2YgaXQtPnBvc2l0aW9uKTsKIAkgIGl0LT5vYmplY3QgPSBRbmlsOwogCSAgaXQtPmMg PSBpdC0+Y2hhcl90b19kaXNwbGF5ID0gJyAnOworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBpZiAoSVRfQllURVBPUyAoKml0KSA+ PSBaVl9CWVRFKQorICAgICAgICBpdC0+enZfcCA9IHRydWU7CisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKIAkgIGl0LT5sZW4gPSAxOwogCiAJICAvKiBJZiB0aGUgZGVmYXVsdCBmYWNl IHdhcyByZW1hcHBlZCwgYmUgc3VyZSB0byB1c2UgdGhlCkBAIC0yMTA4NSw2ICsyNjM5MywyMSBA QCBkaXNwbGF5X2NvdW50X2xpbmVzX3Zpc3VhbGx5IChzdHJ1Y3QgaXQgKml0KQogc3RhdGljIHZv aWQKIG1heWJlX3Byb2R1Y2VfbGluZV9udW1iZXIgKHN0cnVjdCBpdCAqaXQpCiB7CisKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgYm9vbCBi YXJmX2NyYXNoID0gKGl0LT5nbHlwaF9yb3cgPT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAg fHwgaXQtPmdseXBoX3Jvdy0+dXNlZFtURVhUX0FSRUFdID09IDApCisgICAgICAgICAgICAgICAg ICAgID8gZmFsc2UKKyAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFz aCkKKyAgICByZXR1cm47CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgcHRyZGlm Zl90IGxhc3RfbGluZSA9IGl0LT5sbnVtOwogICBwdHJkaWZmX3Qgc3RhcnRfZnJvbSwgYnl0ZXBv czsKICAgcHRyZGlmZl90IHRoaXNfbGluZTsKQEAgLTIxMjU1LDkgKzI2NTc4LDIyIEBAIG1heWJl X3Byb2R1Y2VfbGluZV9udW1iZXIgKHN0cnVjdCBpdCAqaXQpCiAgICAgICBlbHNlCiAJdGVtX2l0 LmMgPSB0ZW1faXQuY2hhcl90b19kaXNwbGF5ID0gKnA7CiAgICAgICB0ZW1faXQubGVuID0gMTsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAgICAgaWYgKGJleW9uZF96dikKKyAgICAgICAgdGVtX2l0Lnp2X3AgPSB0cnVlOworICAgICAg dGVtX2l0LmN1cnJlbnRfeSA9IGl0LT5jdXJyZW50X3k7CisgICAgICB0ZW1faXQudnBvcyA9IGl0 LT52cG9zOwogICAgICAgLyogTWFrZSBzdXJlIHRoZXNlIGdseXBocyB3aWxsIGhhdmUgYSAicG9z aXRpb24iIG9mIC0xLiAgKi8KICAgICAgIFNFVF9URVhUX1BPUyAodGVtX2l0LnBvc2l0aW9uLCAt MSwgLTEpOwogICAgICAgUFJPRFVDRV9HTFlQSFMgKCZ0ZW1faXQpOworICAgICAgdGVtX2l0Lmhw b3MgKz0gMTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogICAgICAgLyogU3RvcCBw cm9kdWNpbmcgZ2x5cGhzLCBhbmQgcmVmcmFpbiBmcm9tIHByb2R1Y2luZyB0aGUgbGluZQogCSBu dW1iZXIsIGlmIHdlIGRvbid0IGhhdmUgZW5vdWdoIHNwYWNlIG9uIHRoaXMgbGluZS4gICovCkBA IC0yNjg0MSw3ICszMjE3Nyw2OCBAQCBkcmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywgaW50 IHgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgcHJlcGVuZGVkIG11c3QgYmUgZHJhd24gYmVj YXVzZSB0aGUgZmlyc3QgZ2x5cGggc3RyaW5nCiAJIGRyYXdzIG92ZXIgaXQuICAqLwogICAgICAg aSA9IGxlZnRfb3ZlcndyaXR0ZW4gKGhlYWQpOwotICAgICAgaWYgKGkgPj0gMCkKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgYm9v bCBza2lwX3AgPSBmYWxzZTsKKyAgICAgIGludCBiZWcgPSBpOworCisgICAgICBpZiAoaSA+PSAw CisgICAgICAgICAgJiYgaGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAmJiAody0+bWMuZ2x5 cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgICAgICAgIHx8IHctPm1jLmdseXBoX2ZsYXZv ciA9PSBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgfHwgdy0+bWMuZ2x5cGhfZmxhdm9yID09 IE1DX0dMWVBIX1RBQikpCisgICAgICAgIHdoaWxlIChiZWcgPCBzdGFydCkKKyAgICAgICAgICB7 CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gKHJvdyktPmdseXBoc1thcmVhXSAr IGJlZzsKKyAgICAgICAgICAgIHN3aXRjaCAoZ2x5cGgtPnR5cGUpCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIGNhc2UgQ0hBUl9HTFlQSDoKKyAgICAgICAgICAgICAgICBicmVhazsKKyAg ICAgICAgICAgICAgY2FzZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgICAgIGNhc2UgU1RSRVRDSF9HTFlQSDoKKyAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICBMaXNwX09iamVjdCBjaGFyYWN0ZXIgPSAoQ0hBUkFDVEVSUCAobWFr ZV9maXhudW0gKGdseXBoLT51LmNoKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBGY2hhcl90b19zdHJpbmcgKG1ha2VfZml4bnVtIChnbHlwaC0+dS5jaCkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBRbmlsOworICAg ICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5jaGFyYWN0ZXIgKCVkIHwgJXMpXG4i LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwNDg1OTYp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXFQiCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAxMCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gIlxcdCIKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMTAK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAh PSAzMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gU1NEQVRBIChj aGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiXFw/Iikp OworICAgICAgICAgICAgICAgICAgc2tpcF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgY2FzZSBJTUFHRV9HTFlQSDoK KyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGJlZyAr PSAxOworICAgICAgICAgIH0KKworICAgICAgaWYgKGkgPj0gMAorICAgICAgICAgICYmICFza2lw X3ApCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAl7CiAJICBlbnVtIGRyYXdfZ2x5 cGhzX2ZhY2Ugb3ZlcmxhcF9obDsKIApAQCAtMjcwNjksNiArMzI0NjYsMjQgQEAgYXBwZW5kX2ds eXBoIChzdHJ1Y3QgaXQgKml0KQogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlw aF9yb3ctPmdseXBoc1thcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsK KworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9 IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlw aC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAg ICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+ b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGlmIChpdC0+cGl4ZWxfd2lkdGggPiAwKQpAQCAt MjcxNTIsNiArMzI1NjcsMjQgQEAgYXBwZW5kX2NvbXBvc2l0ZV9nbHlwaCAoc3RydWN0IGl0ICpp dCkKIAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbaXQt PmFyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBnbHlw aC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisK KyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQt Pnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGdseXBoLT5jaGFy cG9zID0gaXQtPmNtcF9pdC5jaGFycG9zOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmpl Y3Q7CiAgICAgICBlYXNzZXJ0IChpdC0+cGl4ZWxfd2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjcz NjAsNiArMzI3OTMsMjQgQEAgcHJvZHVjZV9pbWFnZV9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAl9 CiAgICAgICBpZiAoZ2x5cGggPCBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYSArIDFdKQogCXsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBnbHlwaC0+eSA9IGl0LT5j dXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisKKyAgICAgIGdseXBo LT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQtPnp2X3A7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAo aXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogCSAgZ2x5cGgt PnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+cGl4ZWxfd2lkdGgsIFNIUlRf TUFYKTsKQEAgLTI3NDYzLDYgKzMyOTE0LDI0IEBAIHByb2R1Y2VfeHdpZGdldF9nbHlwaCAoc3Ry dWN0IGl0ICppdCkKIAl9CiAgICAgICBpZiAoZ2x5cGggPCBpdC0+Z2x5cGhfcm93LT5nbHlwaHNb YXJlYSArIDFdKQogCXsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF IENVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBn bHlwaC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7 CisKKyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0g aXQtPnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBoLT5jaGFy cG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+b2Jq ZWN0OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+cGl4 ZWxfd2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3NTQ5LDYgKzMzMDE4LDI0IEBAIGFwcGVuZF9zdHJl dGNoX2dseXBoIChzdHJ1Y3QgaXQgKml0LCBMaXNwX09iamVjdCBvYmplY3QsCiAJICAgIHdpZHRo IC09IGl0LT5maXJzdF92aXNpYmxlX3ggLSBpdC0+Y3VycmVudF94OwogCSAgZWFzc2VydCAod2lk dGggPiAwKTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBD VVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAgZ2x5 cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOwor CisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9IGl0 LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hh cnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gb2Jq ZWN0OwogICAgICAgLyogRklYTUU6IEl0IHdvdWxkIGJlIGJldHRlciB0byB1c2UgVFlQRV9NQVgg aGVyZSwgYnV0CkBAIC0yODAwMyw2ICszMzQ5MCwyNCBAQCBhcHBlbmRfZ2x5cGhsZXNzX2dseXBo IChzdHJ1Y3QgaXQgKml0LCBpbnQgZmFjZV9pZCwgYm9vbCBmb3Jfbm9fZm9udCwgaW50IGxlbiwK IAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07 CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAq LworCisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0g aXQtPmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAg Z2x5cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBD SEFSUE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7 CiAgICAgICBlYXNzZXJ0IChpdC0+cGl4ZWxfd2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjk3Njks OSArMzUyNzQsMzIgQEAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywg Ym9vbCBvbiwKICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB2cG9zOwogICAgIH0KIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICB3LT5t Yy5oID0gLTE7CisgIHctPm1jLmZ4ID0gLTE7CisgIHctPm1jLmZ5ID0gLTE7CisgIHctPm1jLmds eXBoX2ZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgdy0+bWMucmVkID0gLTEuMDsKKyAgdy0+bWMuZ3Jl ZW4gPSAtMS4wOworICB3LT5tYy5ibHVlID0gLTEuMDsKKyAgdy0+bWMucG9zaW50ID0gLTE7CisK ICAgRlJBTUVfUklGIChmKS0+ZHJhd193aW5kb3dfY3Vyc29yICh3LCBnbHlwaF9yb3csIHgsIHks CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2N1cnNvcl90eXBlLCBu ZXdfY3Vyc29yX3dpZHRoLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9u LCBhY3RpdmVfY3Vyc29yKTsKKworICBtY19tdWx0aXBsZV9jdXJzb3JzX3BvcnRhbCAodywgb24s IGFjdGl2ZV9jdXJzb3IpOworCisgIG1jX2Nyb3NzaGFpcnNfcG9ydGFsICh3LCBvbiwgYWN0aXZl X2N1cnNvcik7CisKKyAgbWNfZmlsbF9jb2x1bW5fcG9ydGFsICh3LCBvbiwgYWN0aXZlX2N1cnNv cik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC0zMjUyOCw2ICsz ODA1NiwyOCBAQCB4X2ludGVyc2VjdF9yZWN0YW5nbGVzIChYUmVjdGFuZ2xlICpyMSwgWFJlY3Rh bmdsZSAqcjIsIFhSZWN0YW5nbGUgKnJlc3VsdCkKIHZvaWQKIHN5bXNfb2ZfeGRpc3AgKHZvaWQp CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX3Jvdyk7CisKKyAgZGVmc3ViciAoJlNtY19k dW1wX2dseXBoX21hdHJpeCk7CisKKyAgZGVmc3ViciAoJlNtY19hY3RpdmF0ZV9tdWx0aXBsZV9j dXJzb3JzKTsKKworICBkZWZzdWJyICgmU21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMpOworCisgIGRl ZnN1YnIgKCZTbWNfc3RkZXJyKTsKKworICBkZWZzdWJyICgmU21jX2RlYnVnKTsKKworICBkZWZz dWJyICgmU21jX2FjdGl2YXRlX2ZpbGxfY29sdW1uKTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogICBWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IgPSBRbmlsOwogICBzdGF0aWNw cm8gKCZWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IpOwogCmRpZmYgLS1naXQgYS9zcmMveHRl cm0uYyBiL3NyYy94dGVybS5jCmluZGV4IDNhN2UzMWUuLjFlOTQ5MmIgMTAwNjQ0Ci0tLSBhL3Ny Yy94dGVybS5jCisrKyBiL3NyYy94dGVybS5jCkBAIC05OTIsNiArOTkyLDE1IEBAIHhfdXBkYXRl X2JlZ2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmIChGUkFNRV9UT09MVElQX1AgKGYpICYmICFG UkFNRV9WSVNJQkxFX1AgKGYpKQogICAgIHJldHVybjsKIAorCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9 IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKCEgRlJBTUVfQ1JfU1VS RkFDRSAoZikpCiAgICAgewogICAgICAgaW50IHdpZHRoLCBoZWlnaHQ7CkBAIC0xMjU4LDYgKzEy NjcsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIFhGbHVzaCAoRlJBTUVf WF9ESVNQTEFZIChmKSk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5kaWYKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRh dGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAog LyogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBsYWNlcyBpbiB4ZGlzcC5j CkBAIC0xNTMwLDYgKzE1NDksMjAgQEAgc3RhdGljIHZvaWQgeF9jaGVja19mb250IChzdHJ1Y3Qg ZnJhbWUgKiwgc3RydWN0IGZvbnQgKik7CiBzdGF0aWMgdm9pZAogeF9zZXRfY3Vyc29yX2djIChz dHJ1Y3QgZ2x5cGhfc3RyaW5nICpzKQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGlmIChzLT53LT5tYy5jdXJzb3JfZ2NfZGVmYXVs dCkKKyAgICB7CisgICAgICBzLT5nYyA9IHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYzsK KyAgICAgIHJldHVybjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg aWYgKHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmJhY2tn cm91bmQgPT0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMtPmZhY2Ut PmZvcmVncm91bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTkyNTIsNiAr OTI4NSwyNiBAQCB4X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX3JvdyAqcm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29vcmRpbmF0 ZXMgZm9yIHBoeXMgY3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCBy b3csIGN1cnNvcl9nbHlwaCwgJngsICZ5LCAmaCk7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9wIHkgPT0g V0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkgPT0gV0lO RE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCistICBoIG9m IEhPTExPV19CT1hfQ1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMgYSB2aXNp YmxlIGdhcCBhYm92ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAgIGggPSBy b3ctPmhlaWdodDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3ZCA9IHctPnBo eXNfY3Vyc29yX3dpZHRoIC0gMTsKIAogICAvKiBUaGUgZm9yZWdyb3VuZCBvZiBjdXJzb3JfZ2Mg aXMgdHlwaWNhbGx5IHRoZSBzYW1lIGFzIHRoZSBub3JtYWwKQEAgLTkzMjgsNyArOTM4MSwxNyBA QCB4X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAq cm93LCBpbnQgd2lkdGgsIGVudW0gdGV4dAogCSBpbnZpc2libGUuICBVc2UgdGhlIGdseXBoJ3Mg Zm9yZWdyb3VuZCBjb2xvciBpbnN0ZWFkIGluIHRoaXMKIAkgY2FzZSwgb24gdGhlIGFzc3VtcHRp b24gdGhhdCB0aGUgZ2x5cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbwogCSB0aGF0IHRoZSBnbHlw aCBpcyBsZWdpYmxlLiAgKi8KLSAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGYtPm91dHB1 dF9kYXRhLngtPmN1cnNvcl9waXhlbCkKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tncm91bmQgPT0gZi0+ b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsCisgICAgICAgICAgJiYgIXctPm1jLmN1cnNvcl9n Y19pbnZpc2libGVfb2theSkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCXhnY3Yu YmFja2dyb3VuZCA9IHhnY3YuZm9yZWdyb3VuZCA9IGZhY2UtPmZvcmVncm91bmQ7CiAgICAgICBl bHNlCiAJeGdjdi5iYWNrZ3JvdW5kID0geGdjdi5mb3JlZ3JvdW5kID0gZi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX3BpeGVsOwpAQCAtOTM1OSw2ICs5NDIyLDE3IEBAIHhfZHJhd19iYXJfY3Vyc29y IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB3aWR0aCwgZW51 bSB0ZXh0CiAJICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2ZWRfbGV2ZWwgJiAxKSAhPSAwKQog CSAgICB4ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGggLSB3aWR0aDsKIAorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIEFsaWdu IGFsbCBmYWtlIEJBUl9DVVJTT1Igb2YgdGhlIFZFUlRJQ0FMX1JVTEVSIHdpdGggYG9wb2ludF94 Jy4gKi8KKyAgICBpZiAody0+bWMuZnggPiAwKQorICAgICAgeCA9IHctPm1jLmZ4OworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAJIC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jb2xvcik7CisgIHN3aXRjaCAoY3Vyc29yX3R5cGUpCisg IHsKKyAgICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgorICAgIHsKKyAgICAgIHN0cnVjdCBnbHlw aCAqZ2x5cGggPSBnZXRfcGh5c19jdXJzb3JfZ2x5cGggKHcpOworICAgICAgaWYgKGdseXBoID09 IE5VTEwpCisgICAgICAgIHJldHVybjsKKyAgICAgIGlmIChnbHlwaC0+dHlwZSAhPSBJTUFHRV9H TFlQSCAmJiB3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVlID49IDAgJiYgdy0+bWMuZ3JlZW4g Pj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBmYWNlICpkZWZhdWx0X2ZhY2UgPSBG QUNFX0ZST01fSUQgKGYsIERFRkFVTFRfRkFDRV9JRCk7CisgICAgICAgICAgTGlzcF9PYmplY3Qg YnVmID0gdy0+Y29udGVudHM7CisgICAgICAgICAgQ0hFQ0tfQlVGRkVSIChidWYpOworICAgICAg ICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAgICAgICAgIGJvb2wgcmVn aW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7 CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAocmVnaW9uX2FjdGl2ZV9w KSA/IFhGSVhOVU0gKEZyZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAgICAgICAgIHB0cmRp ZmZfdCByZWdpb25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBYRklYTlVNIChGcmVnaW9uX2Vu ZCAoKSkgOiAtMTsKKyAgICAgICAgICBib29sIHJlZ2lvbl9pbl9ib3VuZHNfcCA9IChyZWdpb25f YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tYy5w b3NpbnQgPj0gcmVnaW9uX2JlZ2lubmluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPm1jLnBvc2ludCA8IHJlZ2lvbl9lbmQpOworICAgICAgICAgIC8qIFRlbXBv cmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcg dGhlCisgICAgICAgICAgZnVuY3Rpb25hbGl0eSBvZiBgeF9tYWtlX2djJyBpbiB4Zm5zLmMuICAq LworICAgICAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgJiYgcmVnaW9u X2luX2JvdW5kc19wCisgICAgICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZV9pZCA9 IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcmVn aW9uLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0 aXZlX3JlZ2lvbl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9m YWNlX2lkKTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAo ZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5k KTsKKyAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYt Pm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZS0+YmFj a2dyb3VuZCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0 aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICYmICFyZWdpb25faW5fYm91bmRzX3AKKyAgICAg ICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlX2lkID0gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24t ZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2 ZV9yZWdpb25fb3V0X2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9u X291dF9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9E SVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBkZWZhdWx0X2ZhY2UtPmZv cmVncm91bmQpOworICAgICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BM QVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfcmVnaW9u X291dF9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBl bHNlIGlmICghcmVnaW9uX2FjdGl2ZV9wICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBs b29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy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GlmIChnbHlwaC0+ dHlwZSA9PSBJTUFHRV9HTFlQSCAmJiB3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVlID49IDAg JiYgdy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBUZW1wb3Jh cmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAg ICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gY29sb3IucGl4ZWw7CisgICAg ICAgICAgICB4X2RyYXdfaG9sbG93X2N1cnNvciAodywgZ2x5cGhfcm93KTsKKyAgICAgICAgICAg IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsK KyAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeF9kcmF3X2hvbGxvd19j dXJzb3IgKHcsIGdseXBoX3Jvdyk7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBGSUxM RURfQk9YX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAgJiYgdy0+bWMu Ymx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhp amFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAg ICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4geGZucy5jLiAgKi8KKyAgICAgICAg eworICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgIFhHQ1ZhbHVlcyBnY192YWx1 ZXM7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBtYXNrID0gR0NGb3JlZ3JvdW5kIHwgR0NCYWNr Z3JvdW5kIHwgR0NGaWxsU3R5bGUgfCBHQ0xpbmVX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YWs7CisgICAgfQorICAgIGNhc2UgQkFSX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+ bWMucmVkID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAg ICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngt PmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9w aXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVf b2theSA9IHRydWU7CisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3Jvdywg Y3Vyc29yX3dpZHRoLCBCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52 aXNpYmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf cGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQor ICAgICAgICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwg QkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBIQkFSX0NVUlNPUjoK KyAgICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHct Pm1jLmdyZWVuID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWph Y2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91 dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIHctPm1j LmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IHRydWU7CisgICAgICAgICAgeF9kcmF3X2Jhcl9j dXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAgICAg ICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gZmFsc2U7CisgICAgICAgICAgZi0+ b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAg ICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5 cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgIGJyZWFrOworICAgIH0K KyAgICBjYXNlIE5PX0NVUlNPUjoKKyAgICAgIHctPnBoeXNfY3Vyc29yX3dpZHRoID0gMDsKKyAg ICAgIGJyZWFrOworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgfQorCisv KiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCiAKLQkg ICAgY2FzZSBOT19DVVJTT1I6Ci0JICAgICAgdy0+cGh5c19jdXJzb3Jfd2lkdGggPSAwOwotCSAg ICAgIGJyZWFrOwogCi0JICAgIGRlZmF1bHQ6Ci0JICAgICAgZW1hY3NfYWJvcnQgKCk7Ci0JICAg IH0KIAl9CiAKICNpZmRlZiBIQVZFX1hfSTE4TgpAQCAtMTA2NDQsNyArMTA4NjAsNyBAQCBnZXRf Y3VycmVudF93bV9zdGF0ZSAoc3RydWN0IGZyYW1lICpmLAogICBpbnQgcmMsIGFjdHVhbF9mb3Jt YXQ7CiAgIEF0b20gYWN0dWFsX3R5cGU7CiAgIHVuc2lnbmVkIGNoYXIgKnRtcF9kYXRhID0gTlVM TDsKLSAgQXRvbSAqcmVwbHlfZGF0YSBVTklOSVQ7CisgIEF0b20gKnJlcGx5X2RhdGE7CiAjZW5k aWYKIAogICAqc3RpY2t5ID0gZmFsc2U7Cg== --Multipart_Thu_Nov_22_11:07:26_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="98463bed07ecc9057094928ffdc2321eaaf3ab52__2018_07_07.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5iZWMwNzkwCi0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTMwMyBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGxpYnJhcnkgd3JpdHRlbiBieSAgTWFnbmFyIFN2ZWVuLgorCisoZGVmdmFyIHBhY2thZ2UtYXJj aGl2ZXMpCisKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBtYy9t YXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBt Yy9tYXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsKQorKGRlZnZhciBt Yy0tdGhpcy1jb21tYW5kKQorKGRlZnZhciBtYy9jbWRzLXRvLXJ1bi1vbmNlKQorKGRlZnZhciBt Yy0tZG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pZ2luYWwKKyAgICAgIChzZXRxIG1jLS1tYXgtY3Vyc29ycy1vcmlnaW5hbCBt Yy9tYXgtY3Vyc29ycykpCisgICAgKHdoZW4gbWMvbWF4LWN1cnNvcnMKKyAgICAgICh1bmxlc3Mg KDwgKG1jL251bS1jdXJzb3JzKSBtYy9tYXgtY3Vyc29ycykKKyAgICAgICAgKGlmICh5ZXMtb3It bm8tcCAoZm9ybWF0ICIlZCBhY3RpdmUgY3Vyc29ycy4gQ29udGludWU/ICIgKG1jL251bS1jdXJz b3JzKSkpCisgICAgICAgICAgICAoc2V0cSBtYy9tYXgtY3Vyc29ycyAocmVhZC1udW1iZXIgIkVu dGVyIGEgbmV3LCB0ZW1wb3JhcnkgbWF4aW11bTogIikpCisgICAgICAgICAgKG1jL3JlbW92ZS1m YWtlLWN1cnNvcnMpCisgICAgICAgICAgKGVycm9yICJBYm9ydGVkOiB0b28gbWFueSBjdXJzb3Jz IikpKSkKKyAgICAobGV0ICgob3ZlcmxheQorICAgICAgICAgICAgKGlmIG1jL3VzZS1idWlsdC1p bi1jdXJzb3JzCisgICAgICAgICAgICAgIChtYWtlLW92ZXJsYXkgKHBvaW50KSAocG9pbnQpKQor ICAgICAgICAgICAgICAobWMvbWFrZS1jdXJzb3Itb3ZlcmxheS1hdC1wb2ludCkpKSkKKyAgICAg IChvdmVybGF5LXB1dCBvdmVybGF5ICdtYy1pZCAob3IgaWQgKG1jL2NyZWF0ZS1jdXJzb3ItaWQp KSkKKyAgICAgIChvdmVybGF5LXB1dCBvdmVybGF5ICd0eXBlICdmYWtlLWN1cnNvcikKKyAgICAg IChvdmVybGF5LXB1dCBvdmVybGF5ICdwcmlvcml0eSAxMDApCisgICAgICAobWMvc3RvcmUtY3Vy cmVudC1zdGF0ZS1pbi1vdmVybGF5IG92ZXJsYXkpCisgICAgICAod2hlbiAodXNlLXJlZ2lvbi1w KQorICAgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncmVnaW9uLW92ZXJsYXkKKy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aXMtY29tbWFuZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoY29tbWFuZC1yZW1hcHBpbmcgdGhpcy1vcmlnaW5hbC1jb21tYW5kKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLW9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgIDs7IHNraXAga2V5Ym9hcmQgbWFjcm9zLCBzaW5jZSB0aGV5IHdpbGwgZ2VuZXJh dGUgYWN0dWFsIGNvbW1hbmRzIHRoYXQgYXJlCisgICAgICAgICAgICA7OyBhbHNvIHJ1biBpbiB0 aGUgY29tbWFuZCBsb29wIC0gd2UnbGwgaGFuZGxlIHRob3NlIGxhdGVyIGluc3RlYWQuCisgICAg ICAgICAgICAod2hlbiAoZnVuY3Rpb25wIG9yaWdpbmFsLWNvbW1hbmQpCisgICAgICAgICAgICAg IDs7IGlmIGl0J3MgYSBsYW1iZGEsIHdlIGNhbid0IGtub3cgaWYgaXQncyBzdXBwb3J0ZWQgb3Ig bm90CisgICAgICAgICAgICAgIDs7IC0gc28gZ28gYWhlYWQgYW5kIGFzc3VtZSBpdCdzIG9rLCBi ZWNhdXNlIHdlJ3JlIGp1c3Qgb3B0aW1pc3RpYyBsaWtlIHRoYXQKKyAgICAgICAgICAgICAgKGlm IChvciAobm90IChzeW1ib2xwIG9yaWdpbmFsLWNvbW1hbmQpKQorICAgICAgICAgICAgICAgICAg ICAgIDs7IGxhbWJkYSByZWdpc3RlcmVkIGJ5IHNtYXJ0cmVwCisgICAgICAgICAgICAgICAgICAg ICAgKHN0cmluZy1wcmVmaXgtcCAiKCIgKHN5bWJvbC1uYW1lIG9yaWdpbmFsLWNvbW1hbmQpKSkK KyAgICAgICAgICAgICAgICAgIChtYy9leGVjdXRlLWNvbW1hbmQtZm9yLWFsbC1mYWtlLWN1cnNv cnMgb3JpZ2luYWwtY29tbWFuZCkKKyAgICAgICAgICAgICAgICA7OyBzbWFydHJlcCBgaW50ZXJu J3MgY29tbWFuZHMgaW50byBvd24gb2JhcnJheSB0byBoZWxwCisgICAgICAgICAgICAgICAgOzsg YGRlc2NyaWJlLWJpbmRpbmdzJy4gIFNvLCBsZXQncyByZS1gaW50ZXJuJyBoZXJlIHRvCisgICAg ICAgICAgICAgICAgOzsgbWFrZSB0aGUgY29tbWFuZCBjb21wYXJhYmxlIGJ5IGBlcScuCisgICAg ICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29tbWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBv cmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAgICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBz eW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9yb3VnaAorICAgICAgICAgICAgICAgIChpZiAo Z2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAg ICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMi CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmlnaW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0 ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4gKGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0t ZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZh dWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvcHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hp dGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1 dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29ycyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAg ICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAg IChzZXRxIG11bHRpcGxlLWN1cnNvcnMtY29uZgorICAgICAgICAgICAgICAgICAgICAgICAgKG1h cGNhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmRhICh4KSAobGlzdCAob3Zlcmxh eS1zdGFydCB4KSAiYmFyIiBuaWwpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvYWxs LWZha2UtY3Vyc29ycykpKSkpKSkpKSkKKworICAoZGVmdW4gbWMvbWFyay1uZXh0LWxpa2UtdGhp cy1jeWNsZS1mb3J3YXJkICgpCisgICJNYXJrcyBuZXh0IG9jY3VyZW5jZSBvZiB3b3JkIGxpa2Ug dGhpcyBhbmQgYWR2YW5jZXMgY3Vyc29yIHRvIHRoaXMgb2NjdXJyZW5jZSIKKyAgKGludGVyYWN0 aXZlKQorICAgIChtYy9tYXJrLW5leHQtbGlrZS10aGlzIDEpKQorCisgIChkZWZ1biBtYy9tYXJr LXByZXZpb3VzLWxpa2UtdGhpcy1jeWNsZS1mb3J3YXJkICgpCisgICJNYXJr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AgICAgICAgICAgICAgKDIgImJhciIg InB1cnBsZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyAiYm94IiAi IzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93 IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSAoImhi YXIiIDMpIFsxLjAgMC4wIDEuMF0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkpKSkKKyAgICAoc2VsZWN0LXdpbmRvdyAoZGlz cGxheS1idWZmZXIgYnVmZmVyKSkKKyAgICA7OzsgVGhlIHRyaWdnZXIgaW4gYGtleWJvYXJkLmNg IGlzIG5vdCBhY3RpdmF0ZWQgaW4gdGhpcyBleGFtcGxlLCBzbyB3ZQorICAgIDs7OyBmb3JjZSB0 aGUgbXVsdGlwbGUgY3Vyc29ycyB0byBiZSBkcmF3bi4KKyAgICAobWMtYWN0aXZhdGUtbXVsdGlw bGUtY3Vyc29ycyAoc2VsZWN0ZWQtd2luZG93KSkpKQorCisoZGVmdW4gKy10aW1lci1mbiAoKQor IlNpbmNlIHRoaXMgZmlyZXMgZ2xvYmFsbHksIHdlIG11c3QgY29udHJvbCB3aGljaCBidWZmZXJz IGNyb3NzaGFpcnMgYXBwZWFyIGluLiIKKyAgKHdoZW4gKy1tb2RlCisgICAgKHVubGVzcyAobWVt cSBsYXN0LWNvbW1hbmQgKy1wYXJlbnMtZXhjbHVzaW9ucykKKyAgICAgICgrLXBhcmVucy1mbikp CisgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVs cSArLXRpbWVyLXZhciB0aW1lci1pZGxlLWxpc3QpKQorICAgICAgKHNldHEgKy10aW1lci12YXIg bmlsKSkKKyAgICAodW5sZXNzIGNyb3NzaGFpcnMtZ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b3cpKSkpCisgICAgICAoc2V0cSArLXRpbWVyLXZhciAocnVuLXdpdGgtaWRsZS10 aW1lciArLWlkbGUtdGltZXItc2Vjb25kcyBuaWwgIycrLXRpbWVyLWZuKSkpKSkKKworOzs7IyMj YXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJNaW5vciBtb2RlIGZvciBkaXNw bGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZhbHVlIG5pbAorICA6bGlnaHRl ciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91cCAnKy1tb2RlCisg IChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUnIGhhcyB0aGUgYWJpbGl0eSB0 byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3IuCisgICAgICA7OzsgU2VlIHRo ZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hlbiBtYy1maWxsLWNvbHVtbi1t b2RlCisgICAgICAgIChtYy1maWxsLWNvbHVtbi1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQg Z2xvYmFsLWVsZG9jLW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5 LXAgJ2FueSkKKyAgICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQp KSkKKyAgICAgICAgKGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0 LWxvY2stY29udGV4dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAg ICAgICAgKGNhbmNlbC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsg KHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3Jl cGVhdCAnaml0LWxvY2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2st Y29udGV4dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRp bWVyKQorICAgICAgICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnkt dGltZXIpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAg ICAgICAgICAgKGxhbWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hh bmdlZC1idWZmZXJzIChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0 by1hbWFsZ2FtYXRlICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAg ICAgICAgKGJsaW5rLWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmst Y3Vyc29yLWNoZWNrIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAn cG9zdC1jb21tYW5kLWhvb2sgJ2JsaW5rLWN1cnNvci1jaGVjaykpKQorICAgICAgKHdoZW4gKGFu ZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwg Y3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AodW5sZXNzIChudWxsIGJpZGktZGlzcGxheS1yZW9yZGVy aW5nKQorICAgICAgICAoc2V0cSBiaWRpLWRpc3BsYXktcmVvcmRlcmluZyBuaWwpKQorICAgICAg KHVubGVzcyAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAg ICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKHNldCAobWFr ZS1sb2NhbC12YXJpYWJsZSAnKy0tc2F2ZWQtc3RhdGUpIG5pbCkKKyAgICAgICAgKGRvbGlzdCAo dmFyICcoYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAgICAgICAgICAgICAgICAgICAgZnJpbmdl LWluZGljYXRvci1hbGlzdAorICAgICAgICAgICAgICAgICAgICAgICB0YWItd2lkdGgKKyAgICAg ICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3VhbAorICAgICAgICAgICAgICAgICAgICAg ICB0cnVuY2F0ZS1saW5lcworICAgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1wYXJ0aWFs LXdpZHRoLXdpbmRvd3MKKyAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwKSkKKyAgICAg ICAgICAod2hlbiAobG9jYWwtdmFyaWFibGUtcCB2YXIpCisgICAgICAgICAgICAocHVzaCAoY29u cyB2YXIgKHN5bWJvbC12YWx1ZSB2YXIpKSArLS1zYXZlZC1zdGF0ZSkpKQorICAgICAgICAoc2V0 cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkK KyAgICAgICAgKHNldHEtbG9jYWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJlbnQtbGluZSkKKyAg ICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAgIChzZXRxIGJ1ZmZlci1k aXNwbGF5LXRhYmxlICstYnVmZmVyLWRpc3BsYXktdGFibGUpCisgICAgICAgIChzZXRxIHRhYi13 aWR0aCA0KQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlz dWFsKSB0KQorICAgICAgICAoc2V0cSB0cnVuY2F0ZS1saW5lcworICAgICAgICAgIChjb25kCisg ICAgICAgICAgICAoKGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisg ICAgICAgICAgICAgICAgICAgIG1vZGUpCisgICAgICAgICAgICAgIChjYXRjaCAnZm91bmQKKyAg ICAgICAgICAgICAgICAod2hpbGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAg ICAgICAod2hlbiAoZGVyaXZlZC1tb2RlLXAgbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgKHRo cm93ICdmb3VuZCB0KSkpKSkpCisgICAgICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVu Y2F0ZS1saW5lcy1tYWpvci1tb2RlcykpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAg IG5pbCkpKQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0 aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkKKyAgICAgICAgKHNldHEgd29yZC13cmFwIHQpCisgICAg ICAgIChzZXRxIGluZGljYXRlLWVtcHR5LWxpbmVzIHQpCisgICAgICAgIChzZXRxIGluZGljYXRl LWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAgICAgICAoc2V0cSBmcmluZ2UtaW5kaWNhdG9y LWFsaXN0CisgICAgICAgICAgICA7OzsgaHNjbF9hbGxfdGVtcF9wIHwgaHNjbF90ZW1wX3AKKyAg ICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1sZWZ0CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1kb3VibGUtYW5nbGUtbGVmdCkpCisgICAgICAgICAgICA7Ozsg aHNjbF9hbGxfcGVybV8wX3AgfCBoc2NsX2FsbF9wZXJtXzFfcCB8IGhzY2xfYWxsX3Blcm1fMl9w IHwgaHNjbF9wZXJtX3AKKyAgICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNpbmdsZS1hbmds ZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLXVwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKy10cmlwbGUtYW5nbGUtdXAKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgICAoKy1vdmVy bGF5LWFycm93IC4gKCstZnJpbmdlLWxlZnQtYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKHRydW5jYXRpb24g LiAoKy1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmlu Z2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKGNvbnRpbnVhdGlvbiAuICgrLWZyaW5nZS1s ZWZ0LWN1cmx5LWFycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNo KSkKKyAgICAgICAgICAgIChvdmVybGF5LWFycm93IC4gKy1mcmluZ2UtcmlnaHQtdHJpYW5nbGUp CisgICAgICAgICAgICAodXAgLiArLWZyaW5nZS11cC1hcnJvdykKKyAgICAgICAgICAgIChkb3du IC4gKy1mcmluZ2UtZG93bi1hcnJvdykKKyAgICAgICAgICAgICh0b3AgLiArLWZyaW5nZS10b3At bGVmdC1hbmdsZSkKKyAgICAgICAgICAgIChib3R0b20gLiArLWZyaW5nZS1ib3R0b20tcmlnaHQt YW5nbGUpCisgICAgICAgICAgICAodG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWJyYWNrZXQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXRvcC1yaWdodC1hbmdsZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgICAg KGVtcHR5LWxpbmUgLiArLWZyaW5nZS1lbXB0eS1saW5lKQorICAgICAgICAgICAgKHVua25vd24g LiArLWZyaW5nZS1xdWVzdGlvbi1tYXJrKSkpCisgICAgICAgIChzZXRxIGZyaW5nZS1jdXJzb3It YWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVmdC10cmlhbmdsZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChob2xsb3cgLiArLWhvbGxvdy1yZWN0YW5nbGUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYmFyIC4gKy12ZXJ0aWNhbC1iYXIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGJhciAuICstZnJpbmdlLWhvcml6b250 YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdy1zbWFs bCAuICstZnJpbmdlLWhvbGxvdy1zcXVhcmUpKSkKKyAgICAgICAgKGlmIGNyb3NzaGFpcnMtZHJh dy1mb3J0aHdpdGgKKyAgICAgICAgICAoYWRkLWhvb2sgJ3Bvc3QtY29tbWFuZC1ob29rICcrLWRy YXctZm9ydGh3aXRoICdhcHBlbmQgJ2xvY2FsKQorICAgICAgICAgIChhZGQtaG9vayAncG9zdC1j b21tYW5kLWhvb2sgJystZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICAg KHdoZW4gY3Jvc3NoYWlycy1kcmF3LWZvcnRod2l0aAorICAgICAgICAgIChhZGQtaG9vayAnd2lu Z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Y2VkaW5nLWNoYXIgKHByZWNlZGluZy1jaGFyKSkKKyAgICAgICAgIChvY2hhciAoY2hhci1h ZnRlciBvcG9pbnQpKQorICAgICAgICAgKHBvczEKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAg ICAgICAoKGFuZCBvY2hhcgorICAgICAgICAgICAgICAgICAgIChvciA7OzsgKGNoYXItdG8tc3Ry aW5nIDQwKSA9PiBvcGVuaW5nIHBhcmVudGhlc2lzCisgICAgICAgICAgICAgICAgICAgICAgICg9 IG9jaGFyIDQwKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDkx KSA9PiBvcGVuaW5nIHNxdWFyZSBicmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICg9IG9j aGFyIDkxKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyMykg PT4gb3BlbmluZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIg MTIzKSkpCisgICAgICAgICAgICAgICAgKG1pbiAoMSsgb3BvaW50KSAocG9pbnQtbWF4KSkpCisg ICAgICAgICAgICAgKChvciA7OzsgKGNoYXItdG8tc3RyaW5nIDQxKSA9PiBjbG9zaW5nIHBhcmVu dGhlc2lzCisgICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKKyAgICAgICAg ICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTMpID0+IGNsb3Npbmcgc3F1YXJlIGJyYWNr ZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDkzKQorICAgICAgICAgICAg ICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFja2V0Cisg ICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciAxMjUpKQorICAgICAgICAgICAgICAg IChtYXggKHBvaW50LW1pbikgKDEtIG9wb2ludCkpKQorICAgICAgICAgICAgICh0CisgICAgICAg ICAgICAgICAgb3BvaW50KSkpCisgICAgICAgICBwb3MyCisgICAgICAgICBzZWxlY3RlZC1mYWNl KQorICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgKGNvbmRpdGlvbi1jYXNlIG5pbAorICAgICAg ICAod2hpbGUgKHNldHEgcG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9tIHBvczEp KSkKKyAgICAgICAgICAoc2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEgMSkpCisgICAgICAgICAg KGlmICg9IGkgMTApCisgICAgICAgICAgICAoc2V0cSBpIDEpCisgICAgICAgICAgICAoc2V0cSBp ICgxKyBpKSkpCisgICAgICAgICAgKHNldHEgc2VsZWN0ZWQtZmFjZSAoY29uZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1vbmUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKCg9IGkgMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJl bnMtdHdvLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDMpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXRocmVlLWZhY2UpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDQpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJystcGFyZW5zLWZvdXItZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZml2ZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA2KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zaXgt ZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtc2V2ZW4tZmFjZSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgOCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAnKy1wYXJlbnMtZWlnaHQtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKCg9IGkgOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtbmluZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAx MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGVuLWZhY2Up KSkKKyAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBwb3MxKSkpKQor ICAgICAgICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAg ICAgIChvdmVybGF5LXB1dCBvdiAnd2luZG93IHdpbikpCisgICAgICAgICAgICAob3ZlcmxheS1w dXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpCisgICAgICAgICAgKHdoZW4gcG9zMgorICAgICAg ICAgICAgKGxldCAoKG92IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIpKSkKKyAgICAgICAg ICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAgICAg KG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0 IG92ICdmYWNlIHNlbGVjdGVkLWZhY2UpKSkpCisgICAgICAgIChlcnJvciBuaWwpKSkKKyAgICAo c2V0cSArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wIHQpKSkKKworKGRlZnVuICstcmVtb3ZlLW92 ZXJsYXlzIChiZWcgZW5kIG5hbWUgdmFsKQorIlJlbW92ZSB0aGUgb3ZlcmxheXMgdGhhdCBhcmUg YGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzYC4KK0luY2x1ZGVzIGEgdW5pcXVlIHNpdHVhdGlv biB3aGVuIGFuIG92ZXJsYXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVydHkKK2lzIGF0 IHRoZSB2ZXJ5IGVuZCBvZiBhIG5hcnJvd2VkLWJ1ZmZlci4iCisgIChsZXQqICgocG9pbnQtbWF4 IChwb2ludC1tYXgpKQorICAgICAgICAgKHBvaW50LW1pbiAocG9pbnQtbWluKSkKKyAgICAgICAg IChuYXJyb3dlZC1wIChidWZmZXItbmFycm93ZWQtcCkpCisgICAgICAgICAoYmVnIChpZiBiZWcg YmVnIHBvaW50LW1pbikpCisgICAgICAgICAoZW5kCisgICAgICAgICAgIChjb25kCisgICAgICAg ICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAg ICAgICAgICBlbmQpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAg ICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICAobnVsbCBl bmQpKQorICAgICAgICAgICAgICAgcG9pbnQtbWF4KQorICAgICAgICAgICAgICgoYW5kCisgICAg ICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAgICAgICAg ICAgICAgICg8IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgZW5kKQorICAgICAgICAg ICAgICgoYW5kCisgICAgICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAg ZW5kCisgICAgICAgICAgICAgICAgICg9IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAg KDErIGVuZCkpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQt cAorICAgICAgICAgICAgICAgICAobnVsbCBlbmQpKQorICAgICAgICAgICAgICAgKDErIHBvaW50 LW1heCkpICkpCisgICAgICAgICAob3ZlcmxheXMKKyAgICAgICAgICAgKHByb2duCisgICAgICAg ICAgICAgKG92ZXJsYXktcmVjZW50ZXIgZW5kKQorICAgICAgICAgICAgIChvdmVybGF5cy1pbiBi ZWcgZW5kKSkpKQorICAgICh3aGVuIChhbmQgYmVnIGVuZCBuYW1lIHZhbCkKKyAgICAgIChkb2xp c3QgKG8gb3ZlcmxheXMpCisgICAgICAgIChjb25kCisgICAgICAgICAgKChhbmQgKGVxIG5hbWUg J2ZhY2UpCisgICAgICAgICAgICAgICAgKGVxIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisg ICAgICAgICAgICA7OyBFaXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0c2lkZSBiZWcuLi5lbmQK KyAgICAgICAgICAgIDs7IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCisgICAgICAg ICAgICA7OyBvciBkZWxldGUgaXQgZW50aXJlbHkgKGlmIGl0IGlzIGNvbnRhaW5lZCBpbiBiZWcu Li5lbmQpLgorICAgICAgICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAg ICAgICAgICAgICAoaWYgKD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKKyAgICAgICAgICAgICAgKHBy b2duCisgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5IG8pCisgICAg ICAgICAgICAgICAgICAob3ZlcmxheS1zdGFydCBvKSBiZWcpCisgICAgICAgICAgICAgICAgKG1v dmUtb3ZlcmxheSBvIGVuZCAob3ZlcmxheS1lbmQgbykpKQorICAgICAgICAgICAgICAgICAgKG1v dmUtb3ZlcmxheSBvIChvdmVybGF5LXN0YXJ0IG8pIGJlZykpCisgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBv IGVuZCAob3ZlcmxheS1lbmQgbykpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVybGF5IG8p KSkpCisgICAgICAgICAgKChhbmQgKG5vdCAoZXEgbmFtZSAnZmFjZSkpCisgICAgICAgICAgICAg ICAgKGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkp CisgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkpKSkKKworKGRlZnVuICstZGVsZXRl LXBhcmVucy1vdmVybGF5cyAoKQorICAod2hlbiArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wCisg ICAgKGRvbGlzdCAoZmFjZSAnKCstcGFyZW5zLW9uZS1mYWNlCisgICAgICAgICAgICAgICAgICAg ICstcGFyZW5zLXR3by1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRocmVlLWZh Y2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZm91ci1mYWNlCisgICAgICAgICAgICAg ICAgICAgICstcGFyZW5zLWZpdmUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1z aXgtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1zZXZlbi1mYWNlCisgICAgICAg ICAgICAgICAgICAgICstcGFyZW5zLWVpZ2h0LWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1w YXJlbnMtbmluZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRlbi1mYWNlKSkK KyAgICAgICgrLXJlbW92ZS1vdmVybGF5cyBuaWwgbmlsICdmYWNlIGZhY2UpKQorIC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pKSkpKQorCis7OzsjIyNhdXRvbG9hZAor KGRlZmluZS1taW5vci1tb2RlIG1jLWZpbGwtY29sdW1uLW1vZGUKKyJNaW5vciBtb2RlIGZvciBk aXNwbGF5aW5nIGEgdmlzdWFsIGZpbGwgY29sdW1uLiIKKyAgOmluaXQtdmFsdWUgbmlsCisgIDps aWdodGVyICIgRkMiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91cCAnbWMt ZmlsbC1jb2x1bW4tbW9kZQorICAoY29uZAorICAgIDs7OyBgKy1tb2RlJyBoYXMgdGhlIGFiaWxp dHkgdG8gYWxzbyBkaXNwbGF5IGEgZmlsbCBjb2x1bW4gaW5kaWNhdG9yLgorICAgIDs7OyBTZWUg dGhlIHZhcmlhYmxlIGArLWZpbGwtY29sdW1uJy4KKyAgICAoKGFuZCBtYy1maWxsLWNvbHVtbi1t b2RlICstbW9kZSkKKyAgICAgIChzZXRxIG1jLWZpbGwtY29sdW1uLW1vZGUgbmlsKQorICAgICAg KG1lc3NhZ2UgIlR1cm5lZCBPRkYgYG1jLWZpbGwtY29sdW1uLW1vZGUnICglcykgLS0gc2VlIHRo ZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkKKyAgICAobWMt ZmlsbC1jb2x1bW4tbW9kZQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAg ICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVs ZG9jLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisg ICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGpp dC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0 LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0 LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisg ICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNl bC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0 ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChh ZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQt YnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkp CisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1v ZGUgLTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21t YW5kLWhvb2spCisgICAgICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxp bmstY3Vyc29yLWN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zIHggeCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAoZm9u dC1mYW1pbHktbGlzdCkpCiAJICAgICAgOzsgT25seSBvbmUgZm9udCBvbiBUVFlzLgogCSAgICAg IChsaXN0IChjb25zICJkZWZhdWx0IiAiZGVmYXVsdCIpKSkpCi0gICAgICAgICAgIChgOmZvdW5k cnkKKyAgICAgICAgICAgKDpmb3VuZHJ5CiAJICAgIChsaXN0IG5pbCkpCi0JICAgKGA6d2lkdGgK KwkgICAoOndpZHRoCiAJICAgIChtYXBjYXIgIycobGFtYmRhICh4KSAoY29ucyAoc3ltYm9sLW5h bWUgKGFyZWYgeCAxKSkgKGFyZWYgeCAxKSkpCiAJCSAgICBmb250LXdpZHRoLXRhYmxlKSkKLSAg ICAgICAgICAgKGA6d2VpZ2h0CisgICAgICAgICAgICg6d2VpZ2h0CiAJICAgIChtYXBjYXIgIyco bGFtYmRhICh4KSAoY29ucyAoc3ltYm9sLW5hbWUgKGFyZWYgeCAxKSkgKGFyZWYgeCAxKSkpCiAJ CSAgICBmb250LXdlaWdodC10YWJsZSkpCi0JICAgKGA6c2xhbnQKKwkgICAoOnNsYW50CiAJICAg IChtYXBjYXIgIycobGFtYmRhICh4KSAoY29ucyAoc3ltYm9sLW5hbWUgKGFyZWYgeCAxKSkgKGFy ZWYgeCAxKSkpCiAJCSAgICBmb250LXNsYW50LXRhYmxlKSkKLQkgICAoYDppbnZlcnNlLXZpZGVv CisJICAgKDppbnZlcnNlLXZpZGVvCiAJICAgIChtYXBjYXIgIycobGFtYmRhICh4KSAoY29ucyAo c3ltYm9sLW5hbWUgeCkgeCkpCiAJCSAgICAoaW50ZXJuYWwtbGlzcC1mYWNlLWF0dHJpYnV0ZS12 YWx1ZXMgYXR0cmlidXRlKSkpCi0gICAgICAgICAgICgob3IgYDp1bmRlcmxpbmUgYDpvdmVybGlu ZSBgOnN0cmlrZS10aHJvdWdoIGA6Ym94KQorICAgICAgICAgICAoKG9yIDp1bmRlcmxpbmUgOm92 ZXJsaW5lIDpzdHJpa2UtdGhyb3VnaCA6Ym94KQogICAgICAgICAgICAgKGlmICh3aW5kb3ctc3lz dGVtIGZyYW1lKQogICAgICAgICAgICAgICAgIChuY29uYyAobWFwY2FyICMnKGxhbWJkYSAoeCkg KGNvbnMgKHN5bWJvbC1uYW1lIHgpIHgpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChpbnRlcm5hbC1saXNwLWZhY2UtYXR0cmlidXRlLXZhbHVlcyBhdHRyaWJ1dGUpKQpAQCAtMTEx MiwxMiArMTExMiwxMiBAQCBhbiBpbnRlZ2VyIHZhbHVlLiIKICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoZGVmaW5lZC1jb2xvcnMgZnJhbWUpKSkKIAkgICAgICAobWFwY2FyICMnKGxh bWJkYSAoeCkgKGNvbnMgKHN5bWJvbC1uYW1lIHgpIHgpKQogCQkgICAgICAoaW50ZXJuYWwtbGlz cC1mYWNlLWF0dHJpYnV0ZS12YWx1ZXMgYXR0cmlidXRlKSkpKQotICAgICAgICAgICAoKG9yIGA6 Zm9yZWdyb3VuZCBgOmJhY2tncm91bmQpCisgICAgICAgICAgICgob3IgOmZvcmVncm91bmQgOmJh Y2tncm91bmQpCiAgICAgICAgICAgICAobWFwY2FyICMnKGxhbWJkYSAoYykgKGNvbnMgYyBjKSkK ICAgICAgICAgICAgICAgICAgICAgKGRlZmluZWQtY29sb3JzIGZyYW1lKSkpCi0gICAgICAgICAg IChgOmhlaWdodAorICAgICAgICAgICAoOmhlaWdodAogICAgICAgICAgICAgJ2ludGVnZXJwKQot ICAgICAgICAgICAoYDpzdGlwcGxlCisgICAgICAgICAgICg6c3RpcHBsZQogICAgICAgICAgICAg KGFuZCAobWVtcSAod2luZG93LXN5c3RlbSBmcmFtZSkgJyh4IG5zKSkgOyBObyBzdGlwcGxlIG9u IHczMgogICAgICAgICAgICAgICAgICAobWFwY2FyICMnbGlzdAogICAgICAgICAgICAgICAgICAg ICAgICAgIChhc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kLWNvbHVtbi1mYWNl CisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkK KyAgICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29s b3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkgKHR5cGUgZ3RrKSkKKyAgICAgOmZvcmVncm91bmQg Imd0a19zZWxlY3Rpb25fZmdfY29sb3IiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9y cyA4OCkgKGJhY2tncm91bmQgbGlnaHQpICh0eXBlIG5zKSkKKyAgICAgOmZvcmVncm91bmQgInB1 cnBsZSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBs aWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJwdXJwbGUiKQorICAgICgoKGNsYXNzIGNvbG9yKSAo bWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJ5ZWxs b3ciKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGln aHQpKQorICAgICA6Zm9yZWdyb3VuZCAib3JhbmdlIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1p bi1jb2xvcnMgOCkpCisgICAgIDpmb3JlZ3JvdW5kICJ3aGl0ZSIpCisgICAgKCgodHlwZSB0dHkp IChjbGFzcyBtb25vKSkKKyAgICAgOmludmVyc2UtdmlkZW8gdCkKKyAgICAodCA6Zm9yZWdyb3Vu ZCAicGluayIpKQorICAiRmFjZSBmb3IgYCstZXZlbi1udW1iZXJlZC1jb2x1bW4tZmFjZScuICBV c2VkIGluIGB4ZGlzcC5jJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLW9kZC1u dW1iZXJlZC1jb2x1bW4tZmFjZQorICAnK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VyX2RlZmF1bHRz LCBRdCk7CisgIGJzZXRfYmx2X21jX3N0ZGVyciAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7Cisg IGJzZXRfYmx2X21jX2ZpbGxfY29sdW1uICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKKyAgYnNl dF9ibHZfbWNfZmlsbF9jb2x1bW5fZHJhd19mb3J0aHdpdGggKCZidWZmZXJfZGVmYXVsdHMsIFFu aWwpOworICBic2V0X2Jsdl9tY19maWxsX2NvbHVtbl9pbmFjdGl2ZV93aW5kb3dzICgmYnVmZmVy X2RlZmF1bHRzLCBRdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgYnNldF9t b2RlX2xpbmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1bHRzLCBidWlsZF9wdXJlX2Nfc3RyaW5nICgi JS0iKSk7CiAgIGJzZXRfaGVhZGVyX2xpbmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1bHRzLCBRbmls KTsKICAgYnNldF9hYmJyZXZfbW9kZSAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7CkBAIC01NDQ4 LDYgKzU0OTIsMjcgQEAgc3ltc19vZl9idWZmZXIgKHZvaWQpCiAgIHN0YXRpY3BybyAoJlFTRnVu ZGFtZW50YWwpOwogICBzdGF0aWNwcm8gKCZWYnVmZmVyX2FsaXN0KTsKIAorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBERUZTWU0gKFFtY19y ZWFsX2Zha2VfY3Vyc29yLCAibWMtcmVhbC1mYWtlLWN1cnNvciIpOworICBERUZTWU0gKFFtdWx0 aXBsZV9jdXJzb3JzX2NvbmYsICJtdWx0aXB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3JtYXQpLAog CQkgICAgIFFuaWwsCmRpZmYgLS1naXQgYS9zcmMvYnVmZmVyLmggYi9zcmMvYnVmZmVyLmgKaW5k ZXggODViNTYzMS4uNTY4MGI5ZiAxMDA2NDQKLS0tIGEvc3JjL2J1ZmZlci5oCisrKyBiL3NyYy9i dWZmZXIuaApAQCAtNjU4LDYgKzY1OCw1MiBAQCBzdHJ1Y3QgYnVmZmVyCiAgICAgIGNhY2hlIGFy ZSBlbmFibGVkLiAgU2VlIHNlYXJjaC5jLCBpbmRlbnQuYyBhbmQgYmlkaS5jIGZvciBkZXRhaWxz LiAgKi8KICAgTGlzcF9PYmplY3QgY2FjaGVfbG9uZ19zY2Fuc187CiAKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgLyogVGhlIGN1cnNvciB0 eXBlIG9mIHRoZSByZWFsIGZha2UgY3Vyc29yLiAqLworICBMaXNwX09iamVjdCBtY19yZWFsX2Zh a2VfY3Vyc29yXzsKKworICAvKiBUaGUgbmFtZSBvZiBsaXN0IHVzZWQgYnkgbXVsdGlwbGUgY3Vy c29ycyBmb3IgbmV4dCByZWRpc3BsYXkuICovCisgIExpc3BfT2JqZWN0IG11bHRpcGxlX2N1cnNv cnNfY29uZl87CisKKyAgLyogV2hldGhlciB0byBkcmF3IG11bHRpcGxlIGN1cnNvcnMgaW1tZWRp YXRlbHksIG9yIG9uIGFuIGlkbGUtdGltZXIuICovCisgIExpc3BfT2JqZWN0IG11bHRpcGxlX2N1 cnNvcnNfZHJhd19mb3J0aHdpdGhfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBj dXJzb3JzIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IG11bHRpcGxlX2N1 cnNvcnNfaW5hY3RpdmVfd2luZG93c187CisKKyA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isgIC8qIFdoZXRoZXIg dG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGZpbGwgY29sdW1uIGluIGluYWN0aXZlIHdpbmRvd3Mu ICovCisgIExpc3BfT2JqZWN0IG1jX2ZpbGxfY29sdW1uX2luYWN0aXZlX3dpbmRvd3NfOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIElmIHRoZSB3aWR0aCBydW4gY2FjaGUg aXMgZW5hYmxlZCwgdGhpcyB0YWJsZSBjb250YWlucyB0aGUKICAgICAgY2hhcmFjdGVyIHdpZHRo cyB3aWR0aF9ydW5fY2FjaGUgKHNlZSBhYm92ZSkgYXNzdW1lcy4gIFdoZW4gd2UKICAgICAgZG8g YSB0aG9yb3VnaCByZWRpc3BsYXksIHdlIGNvbXBhcmUgdGhpcyBhZ2FpbnN0IHRoZSBidWZmZXIn cwpAQCAtODE0LDkgKzg2MCwxNyBAQCBzdHJ1Y3QgYnVmZmVyCiAgICAgIGZvciBhIGJ1ZmZlci1s b2NhbCB2YXJpYWJsZSBpcyBzdG9yZWQgaW4gdGhhdCB2YXJpYWJsZSdzIHNsb3QKICAgICAgaW4g YnVmZmVyX2xvY2FsX2ZsYWdzIGFzIGEgTGlzcCBpbnRlZ2VyLiAgSWYgdGhlIGluZGV4IGlzIC0x LAogICAgICB0aGlzIG1lYW5zIHRoZSB2YXJpYWJsZSBpcyBhbHdheXMgbG9jYWwgaW4gYWxsIGJ1 ZmZlcnMuICAqLwotI2RlZmluZSBNQVhfUEVSX0JVRkZFUl9WQVJTIDUwCisKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyNkZWZpbmUgTUFYX1BF Ul9CVUZGRVJfVkFSUyA2MAogICBjaGFyIGxvY2FsX2ZsYWdzW01BWF9QRVJfQlVGRkVSX1ZBUlNd OwogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFNldCB0byB0aGUgbW9kdGlt ZSBvZiB0aGUgdmlzaXRlZCBmaWxlIHdoZW4gcmVhZCBvciB3cml0dGVuLgogICAgICBtb2R0aW1l LnR2X25zZWMgPT0gTk9ORVhJU1RFTlRfTU9EVElNRV9OU0VDUyBtZWFucwogICAgICB2aXNpdGVk IGZpbGUgd2FzIG5vbmV4aXN0ZW50LiAgbW9kdGltZS50dl9uc2VjID09CkBAIC05MTgsNiArOTcy LDkyIEBAIFhCVUZGRVIgKExpc3BfT2JqZWN0IGEpCiAvKiBNb3N0IGNvZGUgc2hvdWxkIHVzZSB0 aGVzZSBmdW5jdGlvbnMgdG8gc2V0IExpc3AgZmllbGRzIGluIHN0cnVjdAogICAgYnVmZmVyLiAg KFNvbWUgc2V0dGVycyB0aGF0IGFyZSBwcml2YXRlIHRvIGEgc2luZ2xlIC5jIGZpbGUgYXJlCiAg ICBkZWZpbmVkIGFzIHN0YXRpYyBpbiB0aG9zZSBmaWxlcy4pICAqLworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitJTkxJTkUgdm9pZAorYnNl dF9ibHZfbWNfcmVhbF9mYWtlX2N1cnNvciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3Qg dmFsKQoreworICBiLT5tY19yZWFsX2Zha2VfY3Vyc29yXyA9IHZhbDsKK30KKworSU5MSU5FIHZv aWQKK2JzZXRfYmx2X211bHRpcGxlX2N1cnNvcnNfY29uZiAoc3RydWN0IGJ1ZmZlciAqYiwgTGlz cF9PYmplY3QgdmFsK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2YWwpCiB7CmRpZmYgLS1naXQgYS9zcmMvZGlzcGV4dGVybi5oIGIvc3JjL2Rpc3BleHRlcm4u aAppbmRleCAyMTgwYzlhLi5iZDZhZmZiIDEwMDY0NAotLS0gYS9zcmMvZGlzcGV4dGVybi5oCisr KyBiL3NyYy9kaXNwZXh0ZXJuLmgKQEAgLTk0LDYgKzk0LDI4IEBAIHR5cGVkZWYgaW50IEN1cnNv cjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2VuZGlmCiAKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKK2VudW0gbWNfdHlwZXMKK3sK KyAgTk9fRkxBVk9SLAorICBNQ19HTFlQSCwKKyAgTUNfR0xZUEhMRVNTLAorICBNQ19HTFlQSF9U QUIsCisgIE1DX09WRVJMQVlfQVJST1dfQklUTUFQLAorICBNQ19QSUxDUk9XLAorICBNQ19IT0xM T1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XLAorICBNQ19IT0xMT1dfUkVDVEFOR0xFLAorICBNQ19W RVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgIE1DX1ZFUlRJQ0FMX0JBUiwKKyAgTUNfVkVSVElD QUxfQkFSX0JBQ0tTTEFTSAorfTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyog VGV4dCBjdXJzb3IgdHlwZXMuICAqLwogCiBlbnVtIHRleHRfY3Vyc29yX2tpbmRzCkBAIC0zNzYs NiArMzk4LDE4IEBAIHN0cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1Y3QgZ2x5cGgKIHsKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBpbnQg eCwgeSwgaHBvcywgdnBvczsKKworICBib29sX2JmIHp2X3AgOiAxOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgIC8qIFBvc2l0aW9uIGZyb20gd2hpY2ggdGhpcyBnbHlwaCB3YXMg ZHJhd24uICBJZiBgb2JqZWN0JyBiZWxvdyBpcyBhCiAgICAgIExpc3Agc3RyaW5nLCB0aGlzIGlz IGFuIGluZGV4IGludG8gdGhhdCBzdHJpbmcuICBJZiBpdCBpcyBhCiAgICAgIGJ1ZmZlciwgdGhp cyBpcyBhIHBvc2l0aW9uIGluIHRoYXQgYnVmZmVyLiAgSW4gYWRkaXRpb24sIHNvbWUKQEAgLTIy MTAsNiArMjI0NCwxNiBAQCBzdHJ1Y3QgY29tcG9zaXRpb25faXQKIAogc3RydWN0IGl0CiB7CisK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAg Ym9vbF9iZiB6dl9wIDogMTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBU aGUgd2luZG93IGluIHdoaWNoIHdlIGl0ZXJhdGUgb3ZlciBjdXJyZW50X2J1ZmZlciAob3IgYSBz dHJpbmcpLiAgKi8KICAgTGlzcF9PYmplY3Qgd2luZG93OwogICBzdHJ1Y3Qgd2luZG93ICp3Owpk aWZmIC0tZ2l0IGEvc3JjL2ZyYW1lLmggYi9zcmMvZnJhbWUuaAppbmRleCAxZjQzOGQzLi5hZjY2 MTIyIDEwMDY0NAotLS0gYS9zcmMvZnJhbWUuaAorKysgYi9zcmMvZnJhbWUuaApAQCAtMjAyLDYg KzIwMiwxNiBAQCBzdHJ1Y3QgZnJhbWUKIAogICAvKiBCZXlvbmQgaGVyZSwgdGhlcmUgc2hvdWxk IGJlIG5vIG1vcmUgTGlzcF9PYmplY3QgY29tcG9uZW50cy4gICovCiAKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgLyogTm9uLW5pbCB3aGVu IHRoZSBmcmFtZSBpcyBpbiB0aGUgcHJvY2VzcyBvZiBiZWluZyB1cGRhdGVkLiAqLworICBzdHJ1 Y3QgZnJhbWUgKm1jX3VwZGF0aW5nX2ZyYW1lOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgIC8qIENhY2hlIG9mIHJlYWxpemVkIGZhY2VzLiAgKi8KICAgc3RydWN0IGZhY2VfY2Fj aGUgKmZhY2VfY2FjaGU7CiAKZGlmZiAtLWdpdCBhL3NyYy9mcmluZ2UuYyBiL3NyYy9mcmluZ2Uu YwppbmRleCA2MDY5MTg0Li5iNWMyZGMyIDEwMDY0NAotLS0gYS9zcmMvZnJpbmdlLmMKKysrIGIv c3JjL2ZyaW5nZS5jCkBAIC00MzMsNiArNDMzLDQwMiBAQCBzdGF0aWMgdW5zaWduZWQgc2hvcnQg ZW1wdHlfbGluZV9iaXRzW10gPSB7CiAgIDB4MDAsIDB4M2MsIDB4MDAsIDB4MDAsIDB4M2MsIDB4 MDAsIDB4MDAsIDB4M2MsIDB4MDB9OwogCiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog YmVnaW4gTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBgKy1mcmluZ2UtaGVscGVyLWRlY2ltYWwn IGRlZmluZWQgaW4gYGNyb3NzaGFpcnMuZWxgICovCisKKy8qIDI0CisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAg ICAgInguLi4uLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54eC4uIgorICAgICAg InguLi4ueHguIgorICAgICAgIngueHh4eHh4IgorICAgICAgIngueHh4eHh4IgorICAgICAgIngu Li4ueHguIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi4u Li4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweDgw LCAweDgwLCAweDgwLCAweDk4LCAweDhjLCAweDg2LCAweGJmLAorICAweGJmLCAweDg2LCAweDhj LCAweDk4LCAweDgwLCAweDgwLCAweDgwfTsKKworLyogMjUKKyAgICAoKy1mcmluZ2UtaGVscGVy LWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eC4uLi4uLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4u Li54eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54 eHgiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZm LCAweDgxLCAweDgxLCAweDk5LCAweDhkLCAweDg3LCAweGJmLAorICAweGJmLCAweDg3LCAweDhk LCAweDk5LCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVy LWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgx LCAweDgxLCAweDgxLCAweDgxLCAweDgxLAorICAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgx LCAweDgxLCAweGZmfTsKKworLyogMjcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192 ZXJ0aWNhbF9iYXJfYml0c1tdID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4 ODAsIDB4ODAsCisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODB9Owor CisvKiAyOAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4u LiIKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAgICAgICIueHguLi4uLiIK KyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAg ICAgICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAg ICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIu Li4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2JhY2tzbGFzaF9iaXRzW10g PXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwgMHgxOCwgMHgxOCwgMHhj LCAweGMsIDB4NiwgMHg2LCAweDMsIDB4M307CisKKy8qIDI5CisgICAgKCstZnJpbmdlLWhlbHBl ci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4uLi4uIgorICAgICAg Inh4eC4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAgIngu eHguLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54 eC4uIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4ueHgu IgorICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhj MCwgMHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwgMHg4YywgMHg4YywgMHg4 NiwgMHg4NiwgMHg4MywgMHg4M307CisKKy8qIDMwCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhh ZGVjaW1hbAorICAgICAgIi54eHh4eHguIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgu eC4uIgorICAgICAgInh4eHgueC4uIgorICAgICAgIi54eHgueC4uIgorICAgICAgIi4uLngueC4u IgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgor ICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfcGlsY3Jvd19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwgMHhmNCwgMHhmNCwgMHg3 NCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisKKy8qIDMxCisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4ueHh4eC4uIgorICAgICAgIi54eHh4 eHguIgorICAgICAgInguLnh4Li54IgorICAgICAgInguLnh4Li54IgorICAgICAgInh4eHh4eHh4 IgorICAgICAgInh4Li4uLnh4IgorICAgICAgInh4eC4ueHh4IgorICAgICAgIi54eHh4eHguIgor ICAgICAgIi4ueHh4eC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc21pbGV5X2Zh Y2VfYml0c1tdID17CisgIDB4M2MsIDB4N2UsIDB4OTksIDB4OTksIDB4ZmYsIDB4YzMsIDB4ZTcs IDB4N2UsIDB4M2N9OworCisvKiAzMgorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLnguLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4ueC4uLiIKKyAg ICAgICIuLi4uLnguLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAg ICIuLnguLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9y aWdodF9iaXRzW10gPXsKKyAgMHgyMCwgMHgxMCwgMHg4LCAweDQsIDB4OCwgMHgxMCwgMHgyMH07 CisKKy8qIDMzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4u eC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4uLi4u IgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLi4ueC4uIikK KyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0c1tdID17 CisgIDB4NCwgMHg4LCAweDEwLCAweDIwLCAweDEwLCAweDgsIDB4NH07CisKKy8qIDM0CisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54 eC54eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgu eHguIgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGQ4LCAweDZj LCAweDM2LCAweDFiLCAweDM2LCAweDZjLCAweGQ4fTsKKworLyogMzUKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisg ICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAg ICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY19kb3VibGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxYiwgMHgzNiwgMHg2YywgMHhk OCwgMHg2YywgMHgzNiwgMHgxYn07CisKKy8qIDM2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhh ZGVjaW1hbAorICAgICAgIngueC54Li4uIgorICAgICAgIi54LngueC4uIgorICAgICAgIi4ueC54 LnguIgorICAgICAgIi4uLngueC54IgorICAgICAgIi4ueC54LnguIgorICAgICAgIi54LngueC4u IgorICAgICAgIngueC54Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxl X2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGE4LCAweDU0LCAweDJhLCAweDE1LCAweDJhLCAw eDU0LCAweGE4fTsKKworLyogMzcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisgICAg ICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4iCisgICAgICAi Li4ueC54LngiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfbGVm dF9iaXRzW10gPXsKKyAgMHgxNSwgMHgyYSwgMHg1NCwgMHhhOCwgMHg1NCwgMHgyYSwgMHgxNX07 CisKKy8qIDM4CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4u Li4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgor ICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfc2luZ2xlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAw LCAweDEwLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyog MzkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAi Li4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19z aW5nbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHg4 MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQwCisg ICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAg Ii4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4u eC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAw LCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAw eDAwfTsKKworLyogNDEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAi Li4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4u Li4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4u eC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4i CisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQor Ki8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfZG93bl9iaXRzW10gPXsK KyAgMHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwg MHgxMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQyCisgICAgKCstZnJpbmdlLWhlbHBlci1o ZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4u eC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4u IgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIikK KyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHNbXSA9ewor ICAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAw eDQ0LCAweDgyLCAweDAwfTsKKworLyogNDMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4i CisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAg MHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgy OCwgMHgxMCwgMHgwMH07CisKKy8qIDQ0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1h bAorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgor ICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAg InguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIngu Li4uLnguIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1cGxlX2FuZ2xlX3Vw X2JpdHNbXSA9eworICAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAw eDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyfTsKKworLyogNDUKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4i CisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi Li54LnguLi4iCisgICAgICAiLi4ueC4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y190cmlwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHg4MiwgMHg0NCwgMHgyOCwgMHg5Miwg MHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMH07CisK Ky8qIFRPRE86ICBBZGQgdGhlIGZvbGxvd2luZyBiaXRtYXBzOgorICAoZGVmaW5lLWZyaW5nZS1i aXRtYXAgJ2JyZWFrcG9pbnQgIlx4M2NceDdlXHhmZlx4ZmZceGZmXHhmZlx4N2VceDNjIikKKyAg KGRlZmluZS1mcmluZ2UtYml0bWFwICdob2xsb3ctcmlnaHQtdHJpYW5nbGUgIlx4ZTBceDkwXHg4 OFx4ODRceDg0XHg4OFx4OTBceGUwIikgKi8KKworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8K Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNkZWZpbmUgQllURVNfUEVSX0JJVE1BUF9S T1cgIChzaXplb2YgKHVuc2lnbmVkIHNob3J0KSkKICNkZWZpbmUgU1RBTkRBUkRfQklUTUFQX0hF SUdIVChiaXRzKSAoc2l6ZW9mIChiaXRzKS9CWVRFU19QRVJfQklUTUFQX1JPVykKICNkZWZpbmUg RlJCSVRTKGJpdHMpICBiaXRzLCBTVEFOREFSRF9CSVRNQVBfSEVJR0hUIChiaXRzKQpAQCAtNDY2 LDYgKzg2Miw1OSBAQCBzdGF0aWMgc3RydWN0IGZyaW5nZV9iaXRtYXAgc3RhbmRhcmRfYml0bWFw c1tdID0KICAgeyBGUkJJVFMgKHZlcnRpY2FsX2Jhcl9iaXRzKSwgICAgICAgOCwgMCwgQUxJR05f QklUTUFQX0NFTlRFUiwgMCB9LAogICB7IEZSQklUUyAoaG9yaXpvbnRhbF9iYXJfYml0cyksICAg ICA4LCAwLCBBTElHTl9CSVRNQVBfQk9UVE9NLCAwIH0sCiAgIHsgRlJCSVRTIChlbXB0eV9saW5l X2JpdHMpLCAgICAgICAgIDgsIDMsIEFMSUdOX0JJVE1BUF9UT1AsICAgIDAgfSwKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAvKiAyNCAq LworICB7IEZSQklUUyAobWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHMpLCAgICAgOCwg MCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAyNSAqLworICB7IEZSQklUUyAobWNf aG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvd19iaXRzKSwgOCwgMCwgQUxJR05fQklUTUFQX0NF TlRFUiwgMCB9LAorICAvKiAyNiAqLworICB7IEZSQklUUyAobWNfaG9sbG93X3JlY3RhbmdsZV9i aXRzKSwgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAy NyAqLworICB7IEZSQklUUyAobWNfdmVydGljYWxfYmFyX2JpdHMpLCAgICAgICAgICAgICAgICAg OCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAyOCAqLworICB7IEZSQklUUyAo bWNfYmFja3NsYXNoX2JpdHMpLCAgICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQ X0NFTlRFUiwgMCB9LAorICAvKiAyOSAqLworICB7IEZSQklUUyAobWNfdmVydGljYWxfYmFyX2Jh Y2tzbGFzaF9iaXRzKSwgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAv KiAzMCAqLworICB7IEZSQklUUyAobWNfcGlsY3Jvd19iaXRzKSwgICAgICAgICAgICAgICAgICAg ICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzMSAqLworICB7IEZSQklU UyAobWNfc21pbGV5X2ZhY2VfYml0cyksICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklU TUFQX0NFTlRFUiwgMCB9LAorICAvKiAzMiAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2FuZ2xl X3JpZ2h0X2JpdHMpLCAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAor ICAvKiAzMyAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0cyksICAgICAg ICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzNCAqLworICB7IEZS QklUUyAobWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHMpLCAgICAgICAgICAgOCwgMCwgQUxJR05f QklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzNSAqLworICB7IEZSQklUUyAobWNfZG91YmxlX2Fu Z2xlX2xlZnRfYml0cyksICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9 LAorICAvKiAzNiAqLworICB7IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX3JpZ2h0X2JpdHMpLCAg ICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzNyAqLworICB7 IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX2xlZnRfYml0cyksICAgICAgICAgICAgOCwgMCwgQUxJ R05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzOCAqLworICB7IEZSQklUUyAobWNfc2luZ2xl X2FuZ2xlX3VwX2JpdHMpLCAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwg MCB9LAorICAvKiAzOSAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2FuZ2xlX2Rvd25fYml0cyks ICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0MCAqLwor ICB7IEZSQklUUyAobWNfZG91YmxlX2FuZ2xlX3VwX2JpdHMpLCAgICAgICAgICAgICAgOCwgMCwg QUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0MSAqLworICB7IEZSQklUUyAobWNfZG91 YmxlX2FuZ2xlX2Rvd25fYml0cyksICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRF UiwgMCB9LAorICAvKiA0MiAqLworICB7IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHMp LCAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0MyAq LworICB7IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX2Rvd25fYml0cyksICAgICAgICAgICAgOCwg MCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0NCAqLworICB7IEZSQklUUyAobWNf cXVhZHJ1cGxlX2FuZ2xlX3VwX2JpdHMpLCAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NF TlRFUiwgMCB9LAorICAvKiA0NSAqLworICB7IEZSQklUUyAobWNfcXVhZHJ1cGxlX2FuZ2xlX2Rv d25fYml0cyksICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiB9OwogCiAjZGVmaW5lIE5PX0ZSSU5HRV9CSVRNQVAg MApAQCAtMTcxNSw2ICsyMTY0LDE1MCBAQCBJZiBuaWwsIGFsc28gY29udGludWUgbGluZXMgd2hp Y2ggYXJlIGV4YWN0bHkgYXMgd2lkZSBhcyB0aGUgd2luZG93LiAgKi8pOwogICBERUZWQVJfTElT UCAoImZyaW5nZS1iaXRtYXBzIiwgVmZyaW5nZV9iaXRtYXBzLAogICAgIGRvYzogLyogTGlzdCBv ZiBmcmluZ2UgYml0bWFwIHN5bWJvbHMuICAqLyk7CiAgIFZmcmluZ2VfYml0bWFwcyA9IFFuaWw7 CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKyAgLyogKGdldCAnZW1wdHktbGluZSAnZnJpbmdlKSA9PiAyMyA9PiB0aGUgbGFzdCBz dGFuZGFyZC1iaXRtYXAgYmVmb3JlIHRoaXMgb25lLgorICBTZWUgYGZyaW5nZS5lbGAuICovCisK KyAgLyogMjQgKi8KKyAgREVGU1lNIChRbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93LCAiKy12 ZXJ0aWNhbC1iYXItcmlnaHQtYXJyb3ciKTsKKyAgVmZyaW5nZV9iaXRtYXBzID0gRmNvbnMgKFFt Y192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3csIFZmcmluZ2VfYml0bWFwcyk7CisgIEZwdXQgKFFt Y192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3csIFFmcmluZ2UsIG1ha2VfbnVtYmVyICgyNCkpOwor ICAvKiAoZ2V0ICcrLXZl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ioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworc3RhdGljIHZvaWQKK21jX3N3aXRjaGVzX211bHRp cGxlX2N1cnNvcnMgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgdHJ1ZV9vcl9mYWxzZV9wKQorewor I2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCAmJiBCVUZGRVJQICh3 LT5jb250ZW50cykKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgIHx8ICFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29sdW1uKSkpKQorICAgIHsKKyAgICAg IExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdpbmRvdywgdyk7CisgICAg ICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2luZG93LCBR bmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3dfc3RyaW5nKTsK KyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxubWNfc3dpdGNoZXNfbXVsdGlwbGVfY3Vyc29ycyAo JXMpOiAgJXNcbiIsCisgICAgICAgICAgICAgICB3aW5kb3dfY2hhciwgdHJ1ZV9vcl9mYWxzZV9w ID8gInRydWUiIDogImZhbHNlIik7CisgICAgfQorI2VuZGlmCisgIHctPm1jLmRyYXdfbXVsdGlw bGVfY3Vyc29ycyA9IHRydWVfb3JfZmFsc2VfcDsKKy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zZV9wOworICBpZiAodHJ1ZV9v cl9mYWxzZV9wKQorICAgIHctPm11c3RfYmVfdXBkYXRlZF9wID0gdHJ1ZTsKK30KKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogTGlzcF9PYmplY3QKIGNvbW1hbmRfbG9vcF8xICh2b2lk KQogewpAQCAtMTQxOSw2ICsxNDkzLDE2IEBAIGNvbW1hbmRfbG9vcF8xICh2b2lkKQogICAgICAg VnJlYWxfdGhpc19jb21tYW5kID0gY21kOwogICAgICAgc2FmZV9ydW5faG9va3MgKFFwcmVfY29t bWFuZF9ob29rKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgc3RydWN0IHdpbmRvdyAqdyA9IFhXSU5ET1cgKHNlbGVjdGVkX3dp bmRvdyk7CisgICAgICBtY19zd2l0Y2hlc19tdWx0aXBsZV9jdXJzb3JzICh3LCB0cnVlKTsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgYWxyZWFkeV9hZGp1c3RlZCA9IDA7 CiAKICAgICAgIGlmIChOSUxQIChWdGhpc19jb21tYW5kKSkKQEAgLTE1NjUsNiArMTY0OSwxOCBA QCBjb21tYW5kX2xvb3BfMSAodm9pZCkKICAgICAgIGlmICghTklMUCAoS1ZBUiAoY3VycmVudF9r Ym9hcmQsIGRlZmluaW5nX2tiZF9tYWNybykpCiAJICAmJiBOSUxQIChLVkFSIChjdXJyZW50X2ti b2FyZCwgVnByZWZpeF9hcmcpKSkKIAlmaW5hbGl6ZV9rYmRfbWFjcm9fY2hhcnMgKCk7CisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAg IG1jX3N3aXRjaGVzX211bHRpcGxlX2N1cnNvcnMgKHcsIGZhbHNlKTsKKyAgICAgIG1jX3N3aXRj aGVzX2Nyb3NzaGFpcnMgKHcsIGZhbHNlKTsKKyAgICAgIG1jX3N3aXRjaGVzX2ZpbGxfY29sdW1u ICh3LCBmYWxzZSk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB9CiB9CiAK QEAgLTI0NDgsNyArMjU0NCwxNSBAQCByZWFkX2NoYXIgKGludCBjb21tYW5kZmxhZywgTGlzcF9P YmplY3QgbWFwLAogCSAgaWYgKGhlbHBfZWNob19zaG93aW5nX3AgJiYgIUVRIChzZWxlY3RlZF93 aW5kb3csIG1pbmlidWZfd2luZG93KSkKIAkgICAgcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJl YSAoNSk7CiAJICBlbHNlCi0JICAgIHJlZGlzcGxheSAoKTsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworCSAgICByZWRpc3BsYXkgKDEpOwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAJICBpZiAoIWlucHV0X3BlbmRpbmcpCiAJ ICAgIC8qIE5vcm1hbCBjYXNlOiBubyBpbnB1dCBhcnJpdmVkIGR1cmluZyByZWRpc3BsYXkuICAq LwpAQCAtMjYyOCw3ICsyNzMyLDE2IEBAIHJlYWRfY2hhciAoaW50IGNvbW1hbmRmbGFnLCBMaXNw X09iamVjdCBtYXAsCiAgICAgewogICAgICAgRmRvX2F1dG9fc2F2ZSAoUW5pbCwgUW5pbCk7CiAg ICAgICAvKiBIb29rcyBjYW4gYWN0dWFsbHkgY2hhbmdlIHNvbWUgYnVmZmVycyBpbiBhdXRvIHNh dmUuICAqLwotICAgICAgcmVkaXNwbGF5ICgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICByZWRpc3BsYXkgKDIpOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgfQogCiAgIC8qIFRyeSByZWFkaW5nIHVzaW5n IGFuIFggbWVudS4KQEAgLTI2OTIsNyArMjgwNSwxNiBAQCByZWFkX2NoYXIgKGludCBjb21tYW5k ZmxhZywgTGlzcF9PYmplY3QgbWFwLAogCSAgICAgICYmICEgQ09OU1AgKFZ1bnJlYWRfY29tbWFu ZF9ldmVudHMpKQogCSAgICB7CiAJICAgICAgRmRvX2F1dG9fc2F2ZSAoUW5pbCwgUW5pbCk7Ci0J ICAgICAgcmVkaXNwbGF5ICgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCisJICAgICAgcmVkaXNwbGF5ICgzKTsKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogCSAgICB9CiAJfQogCkBAIC0yNzk1LDcgKzI5MTcsMTUgQEAgcmVh ZF9jaGFyIChpbnQgY29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICB7CiAgICAgICBp ZiAoY29tbWFuZGZsYWcgPj0gMAogCSAgJiYgIWlucHV0X3BlbmRpbmcgJiYgIWRldGVjdF9pbnB1 dF9wZW5kaW5nX3J1bl90aW1lcnMgKDApKQotCXJlZGlzcGxheSAoKTsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworCXJlZGlzcGxheSAoNCk7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKICAgICAgIGdvdG8gd3Jvbmdfa2JvYXJk OwogICAgIH0KQEAgLTMwOTAsNyArMzIyMCwxNSBAQCByZWFkX2NoYXIgKGludCBjb21tYW5kZmxh ZywgTGlzcF9PYmplY3QgbWFwLAogICAgICAgLyogUmVtb3ZlIHRoZSBoZWxwIGZyb20gdGhlIGZy YW1lLiAgKi8KICAgICAgIHVuYmluZF90byAoY291bnQsIFFuaWwpOwogCi0gICAgICByZWRpc3Bs YXkgKCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAq LworCisgICAgICByZWRpc3BsYXkgKDUpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgICAgICBpZiAoRVEgKGMsIG1ha2VfbnVtYmVyICgwNDApKSkKIAl7CiAJICBjYW5jZWxfZWNo b2luZyAoKTsKZGlmZiAtLWdpdCBhL3NyYy9saXNwLmggYi9zcmMvbGlzcC5oCmluZGV4IDczMWE0 NWQuL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4pCiAgICBleHRlcm5hbCAoUklGKSBj YWxsOyB3aG9sZSBmcmFtZSwgY2FsbGVkIGJlZm9yZSB1cGRhdGVfd2luZG93X2JlZ2luCiAgICAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLwogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICBFbWFjc1ZpZXcgKnZpZXcgPSBGUkFNRV9OU19W SUVXIChmKTsKICAgTlNUUkFDRV9XSEVOIChOU1RSQUNFX0dST1VQX1VQREFURVMsICJuc191cGRh dGVfYmVnaW4iKTsKIApAQCAtMTIzMiw2ICsxMjQyLDE2IEBAIHN0YXRpYyBOU1JlY3QgY29uc3Ry YWluX2ZyYW1lX3JlY3QoTlNSZWN0IGZyYW1lUmVjdCwgYm9vbCBpc0Z1bGxzY3JlZW4pCiAKICAg dW5ibG9ja19pbnB1dCAoKTsKICAgbnNfdXBkYXRpbmdfZnJhbWUgPSBOVUxMOworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3Vw ZGF0aW5nX2ZyYW1lID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQog CiBzdGF0aWMgdm9pZApAQCAtMzI0MywyMyArMzI2MywxMjAgQEAgTm90ZSB0aGF0IENVUlNPUl9X SURUSCBpcyBtZWFuaW5nZnVsIG9ubHkgZm9yIChoKWJhciBjdXJzb3JzLgogICAgICAgaCA9IGN1 cnNvcl9oZWlnaHQ7CiAgICAgfQogCi0gIHIub3JpZ2luLnggPSBmeCwgci5vcmlnaW4ueSA9IGZ5 OwotICByLnNpemUuaGVpZ2h0ID0gaDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKKyAgci5vcmlnaW4ueCA9ICh3LT5tYy5meCA+IDApCisgICAg ICAgICAgICAgICA/IHctPm1jLmZ4CisgICAgICAgICAgICAgICA6IGZ4OworICByLm9yaWdpbi55 ID0gKHctPm1jLmZ5ID4gMCkKKyAgICAgICAgICAgICAgID8gdy0+bWMuZnkKKyAgICAgICAgICAg ICAgIDogZnk7CisgIHIuc2l6ZS5oZWlnaHQgPSAody0+bWMuaCA+IDApCisgICAgICAgICAgICAg ICAgICA/IHctPm1jLmgKKyAgICAgICAgICAgICAgICAgIDogaDsKICAgci5zaXplLndpZHRoID0g dy0+cGh5c19jdXJzb3Jfd2lkdGg7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg LyogUHJldmVudCB0aGUgY3Vyc29yIGZyb20gYmVpbmcgZHJhd24gb3V0c2lkZSB0aGUgdGV4dCBh cmVhLiAgKi8KICAgbnNfY2xpcF90b19yb3cgKHcsIGdseXBoX3JvdywgVEVYVF9BUkVBLCBOTyk7 IC8qIGRvIG5zX2ZvY3VzKGYsICZyLCAxKTsgaWYgcmVtb3ZlICovCiAKIAogICBmYWNlID0gRkFD RV9GUk9NX0lEX09SX05VTEwgKGYsIHB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DRV9CQUNL R1JPVU5EX0lOREVYXTsKKyAgZnByaW50ZiAoc3RkZXJyLCAiXG5mb3JlZ3JvdW5kICglcykgfCBi YWNrZ3JvdW5kICglcylcbiIsCisgICAgICAgICAgICAgICAgICAgKCFOSUxQIChmb3JlZ3JvdW5k KSA/IFNTREFUQSAoZm9yZWdyb3VuZCkgOiAiTklMUCIpLAorICAgICAgICAgICAgICAgICAgICgh TklMUCAoYmFja2dyb3VuZCkgPyBTU0RBVEEgKGJhY2tncm91bmQpIDogIk5JTFAiKSk7CisKKyAg RVhBTVBMRSBPRiBIT1cgVE8gQ1JFQVRFIEEgQ09MT1IgV0lUSCBSR0IvTFNMIGZsb2F0IHZhbHVl czoKKyAgTlNDb2xvciAqbXlfY29sb3IgPSBbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVk OiBzLT53LT5tYy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGdyZWVuOiBzLT53LT5tYy5ncmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IHMtPnctPm1jLmJsdWUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdOyAqLworCisgIGlm ICh3LT5tYy5nbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgIHx8IHctPm1jLmdseXBoX2Zs YXZvciA9PSBNQ19HTFlQSExFU1MKKyAgICAgIHx8IHctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19H TFlQSF9UQUIpCisgICAgeworICAgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6 IHctPm1jLnJlZCBncmVlbjogdy0+bWMuZ3JlZW4gYmx1ZTogdy0+bWMuYmx1ZSBhbHBoYTogMS4w XSBzZXRdOworICAgICAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgICAgICBDSEVD S19CVUZGRVIgKGJ1Zik7CisgICAgICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVmKTsK KyAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9k ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJr X2FjdGl2ZSkpKTsKKyAgICAgIHB0cmRpZmZfdCByZWdpb25fYmVnaW5uaW5nID0gKHJlZ2lvbl9h Y3RpdmVfcCkgPyBYSU5UIChGcmVnaW9uX2JlZ2lubmluZyAoKSkgOiAtMTsKKyAgICAgIHB0cmRp ZmZfdCByZWdpb25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBYSU5UIChGcmVnaW9uX2VuZCAo KSkgOiAtMTsKKyAgICAgIGJvb2wgcmVnaW9uX2luX2JvdW5kc19wID0gKHJlZ2lvbl9hY3RpdmVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWMucG9zaW50ID49IHJl Z2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1j LnBvc2ludCA8IHJlZ2lvbl9lbmQpOworICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAg ICAgICYmIHJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAg ICB7CisgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2VfaWQg PSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXJl Z2lvbi1mYWNlIiksIHRydWUpOworICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZl X3JlZ2lvbl9mYWNlID0gRkFDRV9GU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W9u X2FjdGl2ZV9wICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVt IGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYs IGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiksIHRydWUpOworICAgICAgICAgICAg ICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xs b3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZl X2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9s bG93X2FjdGl2ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxv d19hY3RpdmVfY29sb3I7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvKiBUaGUgcmVnaW9u IGlzIF9ub3RfIHZpc2libGUgaW4gdGhlIGluYWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRoZSBvdmVy bGF5IHdpbmRvdyBwcm9wZXJ0eSBpcyB1c2VkLiAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWFj dGl2ZV9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhv bGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAo IistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpOworICAgICAgICAgICAg ICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwg aG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxv d19pbmFjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tH Uk9VTkQgKGhvbGxvd19pbmFjdGl2ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgICAgaG9sbG93 X2NvbG9yID0gaG9sbG93X2luYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIGVsc2UgaWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSA9PSBuc19p bmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCisgICAgICAgICAgICAgICAg aG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChmKTsKKyAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNl ICpkZWZhdWx0X2JnX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIERFRkFVTFRfRkFDRV9JRCk7Cisg ICAgICAgICAgICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNL R1JPVU5EIChkZWZhdWx0X2JnX2ZhY2UpLCBmKSBzZXRdOworICAgICAgICAgICAgICAgICAgICBo b2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09MT1IgKGYpOworICAgICAgICAgICAgICAgICAg fQorICAgIH0KKyAgICBlbHNlIGlmIChmYWNlICYmIE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSkg PT0gbnNfaW5kZXhfY29sb3IgKEZSQU1FX0NVUlNPUl9DT0xPUiAoZiksIGYpKQorICAgICAgewor ICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFj ZSksIGYpIHNldF07CisgICAgICAgIGhvbGxvd19jb2xvciA9IEZSQU1FX0NVUlNPUl9DT0xPUiAo Zik7CisgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKGYp IHNldF07CisKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKwogCiAjaWZkZWYgTlNfSU1QTF9DT0NPQQogICAvKiBUT0RPOiBUaGlzIG1ha2VzIGRy YXdpbmcgb2YgY3Vyc29yIHBsdXMgdGhhdCBvZiBwaHlzX2N1cnNvcl9nbHlwaApAQCAtMzI4OSwy MSArMzQwNiw0NSBAQCBOb3RlIHRoYXQgQ1VSU09SX1dJRFRIIGlzIG1lYW5pbmdmdWwgb25seSBm b3IgKGgpYmFyIGN1cnNvcnMuCiAgICAgICBicmVhazsKICAgICBjYXNlIEJBUl9DVVJTT1I6CiAg ICAgICBzID0gcjsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgIC8qIEBsYXdsaXN0IGlzIGZvY3VzaW5nIHRoZSBpbml0aWFsIGRldmVs b3BtZW50IG9mIGZlYXR1cmUgcmVxdWVzdHMgIzE3Njg0CisgICAgYW5kICMyMjg3MyBvbiBMMlIg bGFuZ3VhZ2VzLiAqLworICAgIGlmICh3LT5tYy5nbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEgKKyAg ICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBITEVTUworICAgICAgICAmJiB3 LT5tYy5nbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEhfVEFCKQorICAgICAgewogICAgICAgLyogSWYg dGhlIGNoYXJhY3RlciB1bmRlciBjdXJzb3IgaXMgUjJMLCBkcmF3IHRoZSBiYXIgY3Vyc29yCiAg ICAgICAgICBvbiB0aGUgcmlnaHQgb2YgaXRzIGdseXBoLCByYXRoZXIgdGhhbiBvbiB0aGUgbGVm dC4gICovCiAgICAgICBjdXJzb3JfZ2x5cGggPSBnZXRfcGh5c19jdXJzb3JfZ2x5cGggKHcpOwog ICAgICAgaWYgKChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKICAgICAg ICAgcy5vcmlnaW4ueCArPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gcy5zaXplLndpZHRo OworICAgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAgICAgICBOU1JlY3RG aWxsIChzKTsKICAgICAgIGJyZWFrOwogICAgIH0KICAgbnNfdW5mb2N1cyAoZik7CiAKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKICAgLyogZHJh dyB0aGUgY2hhcmFjdGVyIHVuZGVyIHRoZSBjdXJzb3IgKi8KLSAgaWYgKGN1cnNvcl90eXBlICE9 IE5PX0NVUlNPUikKKyAgaWYgKGN1cnNvcl90eXBlICE9IE5PX0NVUlNPUgorICAgICAgJiYgdy0+ bWMuZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBITEVTUworICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxh dm9yICE9IE1DX0dMWVBIX1RBQikKICAgICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlw aF9yb3csIERSQVdfQ1VSU09SKTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2lm ZGVmIE5TX0lNUExfQ09DT0EKICAgTlNFbmFibGVTY3JlZW5VcGRhdGVzICgpOwogI2VuZGlmCkBA IC0zOTcwLDcgKzQxMTEsMjcgQEAgRnVuY3Rpb24gbW9kZWxlZCBhZnRlciB4X2RyYXdfZ2x5cGhf c3RyaW5nX2JveCAoKS4KICAgICB7CiAgICAgICBpbnQgdGhpY2tuZXNzID0gYWJzIChzLT5pbWct PnJlbGllZik7CiAgICAgICBpZiAodGhpY2tuZXNzID09IDApIHRoaWNrbmVzcyA9IDE7Ci0gICAg ICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywgRlJBTUVfQ1VSU09SX0NPTE9SIChzLT5mKSwg MSwgMSk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKyAgICBpZiAocy0+dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAg IHx8IHMtPnctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MKKyAgICAgICAgfHwgcy0+ dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBIX1RBQikKKyAgICAgIHsKKyAgICAgICAgTlND b2xvciAqYm9yZGVyX2NvbG9yID0gW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogcy0+ dy0+bWMucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZ3JlZW46IHMtPnctPm1jLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IHMtPnctPm1jLmJsdWUK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBhbHBoYTogMS4wXTsKKyAgICAgICAgbnNfZHJhd19ib3ggKGJyLCB0aGlja25lc3MsIGJvcmRl cl9jb2xvciwgMSwgMSk7CisgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIG5zX2RyYXdfYm94 IChiciwgdGhpY2tuZXNzLCBGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpLCAxLCAxKTsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KIH0KIApkaWZmIC0tZ2l0IGEvc3JjL3cz MnRlcm0uYyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggZmYwZDJiZi4uMmEzOTgzYiAxMDA2NDQKLS0t IGEvc3JjL3czMnRlcm0uYworKysgYi9zcmMvdzMydGVybS5jCkBAIC01NDUsNiArNTQ1LDE1IEBA IHhfdXBkYXRlX2JlZ2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmICghIEZSQU1FX1czMl9QIChm KSkKICAgICByZXR1cm47CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RSBDVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBmOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgIC8qIFJlZ2VuZXJhdGUgZGlzcGxheSBwYWxldHRlIGJlZm9y ZSBkcmF3aW5nIGlmIGxpc3Qgb2YgcmVxdWVzdGVkCiAgICAgIGNvbG9ycyBoYXMgY2hhbmdlZC4g Ki8KICAgaWYgKGRpc3BsYXlfaW5mby0+cmVnZW5fcGFsZXR0ZSkKQEAgLTc1NCw2ICs3NjMsMTYg QEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAKICAgLyogTW91c2UgaGlnaGxpZ2h0 IG1heSBiZSBkaXNwbGF5ZWQgYWdhaW4uICAqLwogICBNT1VTRV9ITF9JTkZPIChmKS0+bW91c2Vf ZmFjZV9kZWZlciA9IGZhbHNlOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gTlVMTDsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTk3Myw2ICs5OTIsMjAgQEAgc3Rh dGljIHZvaWQgdzMyX2RyYXdfYm94X3JlY3QgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKiwgaW50LCBp bnQsIGludCwgaW50LAogc3RhdGljIHZvaWQKIHhfc2V0X2N1cnNvcl9nYyAoc3RydWN0IGdseXBo X3N0cmluZyAqcykKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF IENVUlNPUlMgKi8KKworICBpZiAocy0+dy0+bWMuY3Vyc29yX2djX2RlZmF1bHQpCisgICAgewor ICAgICAgcy0+Z2MgPSBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYzsKKyAgICAgIHJl dHVybjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKHMtPmZv bnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmJhY2tncm91bmQgPT0g RlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmZvcmVncm91 bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTU2OTAsNiArNTcyMywyNiBA QCB4X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3Jv dyAqcm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29vcmRpbmF0ZXMgZm9yIHBo eXMgY3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIGN1cnNv cl9nbHlwaCwgJmxlZnQsICZ0b3AsICZoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTEVHRU5EOgorCistICB0b3AgeSA9PSBXSU5E T1dfVE9fRlJBTUVfUElYRUxfWSAodywgcm93LT55KQorCistICBib3R0b20geSA9PSBXSU5ET1df VE9fRlJBTUVfUElYRUxfWSAodywgcm93LT55KSAtIHJvdy0+aGVpZ2h0CisKKy0gIGggb2YgSE9M TE9XX0JPWF9DVVJTT1IgPT0gcm93LT5oZWlnaHQKKyAgIFtUaGlzIGF2b2lkcyBhIHZpc2libGUg Z2FwIGFib3ZlL2JlbG93Ll0gKi8KKworICBpZiAody0+bWMuaCA+IDApCisgICAgaCA9IHJvdy0+ aGVpZ2h0OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHJlY3QubGVmdCA9IGxl ZnQ7CiAgIC8qIFdoZW4gb24gUjJMIGNoYXJhY3Rlciwgc2hvdyBjdXJzb3IgYXQgdGhlIHJpZ2h0 IGVkZ2Ugb2YgdGhlCiAgICAgIGdseXBoLCB1bmxlc3MgdGhlIGN1cnNvciBib3ggaXMgYXMgd2lk ZSBhcyB0aGUgZ2x5cGggb3Igd2lkZXIKQEAgLTU3NTMsNyArNTgwNiwxNyBAQCB4X2RyYXdfYmFy X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAogCSBpbnZp c2libGUuICBVc2UgdGhlIGdseXBoJ3MgZm9yZWdyb3VuZCBjb2xvciBpbnN0ZWFkIGluIHRoaXMK IAkgY2FzZSwgb24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUgZ2x5cGgncyBjb2xvcnMgYXJlIGNo b3NlbiBzbwogCSB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxlLiAgKi8KLSAgICAgIGlmIChmYWNl LT5iYWNrZ3JvdW5kID09IGN1cnNvcl9jb2xvcikKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tncm91bmQg PT0gY3Vyc29yX2NvbG9yCisgICAgICAgICAgJiYgIXctPm1jLmN1cnNvcl9nY19pbnZpc2libGVf b2theSkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCWN1cnNvcl9jb2xvciA9IGZh Y2UtPmZvcmVncm91bmQ7CiAKICAgICAgIHggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9Y ICh3LCB3LT5waHlzX2N1cnNvci54KTsKQEAgLTU3NzQsNiArNTgzNywxNyBAQCB4X2RyYXdfYmFy X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAogCSAgaWYg KChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKIAkgICAgeCArPSBjdXJz b3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gd2lkdGg7CiAKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBBbGlnbiBhbGwgZmFrZSBCQVJf Q1VSU09SIG9mIHRoZSBWRVJUSUNBTF9SVUxFUiB3aXRoIGBvcG9pbnRfeCcuICovCisgICAgaWYg KHctPm1jLmZ4ID4gMCkKKyAgICAgIHggPSB3LT5tYy5meDsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogCSAgdzMyX2ZpbGxfYXJlYSAoZiwgaGRjLCBjdXJzb3JfY29sb3IsIHgsCiAJ CQkgV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHctPnBoeXNfY3Vyc29yLnkpLAogCQkJIHdp ZHRoLCByb3ctPmhlaWdodCk7CkBAIC01ODk1LDMxICs1OTY5LDE2OSBAQCB3MzJfZHJhd193aW5k b3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlwaF9yb3cs CiAJICByZXR1cm47CiAJfQogCi0gICAgICBzd2l0Y2ggKGN1cnNvcl90eXBlKQotCXsKLQljYXNl IEhPTExPV19CT1hfQ1VSU09SOgotCSAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jv dyk7Ci0JICBicmVhazsKIAotCWNhc2UgRklMTEVEX0JPWF9DVVJTT1I6Ci0JICBkcmF3X3BoeXNf Y3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsKLQkg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HJkaWZmX3QgcmVn aW9uX2JlZ2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lvbl9iZWdpbm5p bmcgKCkpIDogLTE7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2Fj dGl2ZV9wKSA/IFhJTlQgKEZyZWdpb25fZW5kICgpKSA6IC0xOworICAgICAgICAgIGJvb2wgcmVn aW9uX2luX2JvdW5kc19wID0gKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPm1jLnBvc2ludCA+PSByZWdpb25fYmVnaW5uaW5nCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWMucG9zaW50IDwgcmVnaW9u X2VuZCk7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53 MzItPmN1cnNvcl9nYycgYnkgYm9ycm93aW5nIHRoZQorICAgICAgICAgIGZ1bmN0aW9uYWxpdHkg b2YgYHhfbWFrZV9nYycgaW4gdzMyZm5zLmMuICAqLworICAgICAgICAgIGlmIChyZWdpb25fYWN0 aXZlX3AKKyAgICAgICAgICAgICAgJiYgcmVnaW9uX2luX2JvdW5kc19wCisgICAgICAgICAgICAg ICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBp bnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcmVnaW9uLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAg ICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlID0gRkFDRV9GUk9N X0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mY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IGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcu ICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3Jf cGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsK KyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgs IEJBUl9DVVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9 IGZhbHNlOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3Jp Z2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4 X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1Ip OworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgSEJBUl9DVVJTT1I6CisgICAgeworICAg ICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+ PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRw dXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29y X2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAo dywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5t Yy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRf ZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAg fQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3Jv dywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAg Y2FzZSBOT19DVVJTT1I6CisgICAgICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7CisgICAgICBi cmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KIAotCWNhc2Ug SEJBUl9DVVJTT1I6Ci0JICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jf d2lkdGgsIEhCQVJfQ1VSU09SKTsKLQkgIGJyZWFrOworLyogZW5kIE1VTFRJUExFIENVUlNPUlMg Ki8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogCi0JY2FzZSBOT19DVVJTT1I6Ci0JICB3LT5w aHlzX2N1cnNvcl93aWR0aCA9IDA7Ci0JICBicmVhazsKIAotCWRlZmF1bHQ6Ci0JICBlbWFjc19h Ym9ydCAoKTsKLQl9CiAgICAgfQogfQogCmRpZmYgLS1naXQgYS9zcmMvd2luZG93LmggYi9zcmMv d2luZG93LmgKaW5kZXggMDEzMDgzZS4uYjk4YjE2OSAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5o CisrKyBiL3NyYy93aW5kb3cuaApAQCAtNzYsNiArNzYsNjIgQEAgb25lIGFuZCB0aGUgc2FtZSwg c28gaXRzIHByZXYgYW5kIG5leHQgbWVtYmVycyBhcmUgbmlsLgogCiBBIGRlYWQgd2luZG93IGhh cyBpdHMgY29udGVudHMgZmllbGQgc2V0IHRvIG5pbC4gICovCiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIFN1ZmZpeGVzIGZv ciB0aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBwcmVmaXguICovCitzdHJ1Y3QgbXVsdGlwbGVfY3Vy c29ycworeworICAvKiBWYWx1ZXMgZm9yIHByZXZpb3VzIGFuZCBjdXJyZW50IGB3aW5kb3ctc3Rh cnQnIGFuZCBgd2luZG93LWVuZCcuICovCisgIEVNQUNTX0lOVCBjdXJyZW50X3N0YXJ0LCBjdXJy ZW50X2VuZCwgcHJldmlvdXNfc3RhcnQsIHByZXZpb3VzX2VuZCwgY3VycmVudF94LCBwcmV2aW91 c194OworCisgIC8qIFRydWUgbWVhbnMgdG8gZm9yY2UgYHhfc2V0X2N1cnNvcl9nYycgdG8gdXNl IGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycKKyAgaW4gdzMydGVybS5jIG9yIGBz LT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnIGluIHh0ZXJtLmMuICovCisgIGJvb2xfYmYg Y3Vyc29yX2djX2RlZmF1bHQgOiAxOworCisgIC8qIFRydWUgbWVhbnMgYHhfc2V0X2N1cnNvcl9n Yycgc2hvdWxkIHBlcm1pdCB0aGUgZm9yZWdyb3VuZCBhbmQgYmFja2dyb3VuZAorICBjb2xvcnMg dG8gYmUgdGhlIHNhbWUuICBUaGUgZGVmYXVsdCBiZWhhdmlvciBkaXNhbGxvd3MgYW4gaW52aXNp YmxlIHJlc3VsdC4gKi8KKyAgYm9vbF9iZiBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgOiAxOwor CisgIC8qIFRydWUgbWVhbnMgYG1jX2Ry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XNlcnZlX2VjaG9fYXJl YTsKKworICAvKiBUcnVlIG1lYW5zIHRoZSB2aXNpYmxlIGZpbGwgY29sdW1uIGhhcyBub3QgeWV0 IGJlZW4gZHJhd24uICovCisgIGJvb2xfYmYgZHJhd19maWxsX2NvbHVtbiA6IDE7CisKKyAgLyog VHJ1ZSBtZWFucyB0aGUgdmlzaWJsZSBmaWxsIGNvbHVtbiBoYXMgbm90IHlldCBiZWVuIGVyYXNl ZC4gKi8KKyAgYm9vbF9iZiBlcmFzZV9maWxsX2NvbHVtbiA6IDE7Cit9OworCisvKiBlbmQgTVVM VElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RydWN0IGN1 cnNvcl9wb3MKIHsKICAgLyogUGl4ZWwgcG9zaXRpb24uICBUaGVzZSBhcmUgYWx3YXlzIHdpbmRv dyByZWxhdGl2ZS4gICovCkBAIC0xODEsNiArMjM3LDI4IEBAIHN0cnVjdCB3aW5kb3cKICAgICAv KiBUaGUgaGVscCBlY2hvIHRleHQgZm9yIHRoaXMgd2luZG93LiAgUW5pbCBpZiB0aGVyZSdzIG5v bmUuICAqLwogICAgIExpc3BfT2JqZWN0IG1vZGVfbGluZV9oZWxwX2VjaG87CiAKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBUaGUg Y2FjaGUgZm9yIG11bHRpcGxlIGdseXBoIGN1cnNvcnMuICBGb3IgYW4gZXhhbXBsZSBvZiB0aGUg c3RydWN0dXJlIG9mCisgICAgdGhlIGxpc3QsIHNlZSB0aGUgY29tbWVudHMgYXQgdGhlIGJlZ2lu bmluZyBvZiBgbWNfZHJhd19tdWx0aXBsZV9jdXJzb3JzJyBpbgorIC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IuICAqLwpAQCAtMjgzLDYgKzM2MSwxNiBAQCBzdHJ1Y3Qgd2luZG93CiAK ICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIFRoZSBwcmVmaXggZm9yIHdpbmRvdyBw b2ludGVycyByZWxhdGluZyB0byBtdWx0aXBsZSBjdXJzb3JzLiAgKi8KKyAgICBzdHJ1Y3QgbXVs dGlwbGVfY3Vyc29ycyBtYzsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIC8q IEN1cnNvciB0eXBlIG9mIGxhc3QgY3Vyc29yIGRyYXduIG9uIHRoZSB3aW5kb3cuICAqLwogICAg IGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgcGh5c19jdXJzb3JfdHlwZTsKIApAQCAtNDIxLDYgKzUw OSwzMSBAQCBYV0lORE9XIChMaXNwX09iamVjdCBhKQogICByZXR1cm4gWFVOVEFHIChhLCBMaXNw X1ZlY3Rvcmxpa2UsIHN0cnVjdCB3aW5kb3cpOwogfQogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitJTkxJTkUgdm9pZAord3NldF9tdWx0aXBs ZV9jdXJzb3JzX2NhY2hlIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCB2YWwpCit7Cisg IHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUgPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCit3c2V0 X2Nyb3NzaGFpcnNfY2FjaGUgKHN0cnV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qKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworc3RhdGljIHZvaWQgcmVkaXNw bGF5X2ludGVybmFsIChpbnQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBzdGF0 aWMgdm9pZCBlY2hvX2FyZWFfZGlzcGxheSAoYm9vbCk7CiBzdGF0aWMgdm9pZCBibG9ja19idWZm ZXJfZmxpcHMgKHZvaWQpOwogc3RhdGljIHZvaWQgdW5ibG9ja19idWZmZXJfZmxpcHMgKHZvaWQp OwpAQCAtOTIxLDYgKzkzMCw1MDY3IEBAIHN0YXRpYyB2b2lkIHNob3dfbW91c2VfZmFjZSAoTW91 c2VfSExJbmZvICosIGVudW0gZHJhd19nbHlwaHNfZmFjZSk7CiBzdGF0aWMgYm9vbCBjb29yZHNf aW5fbW91c2VfZmFjZV9wIChzdHJ1Y3Qgd2luZG93ICosIGludCwgaW50KTsKIAogCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTVVM VElQTEUgQ1VSU09SUzogIEVtYWNzIEJ1ZyAjMjI4NzMgKGZlYXR1cmUgcmVxdWVzdCkKKworICAg Q1JPU1NIQUlSUzogIEVtYWNzIEJ1ZyAjMTc2ODQgKGZlYXR1cmUgcmVxdWVzdCkKKworCitQQVRD SCBWRVJTSU9OOiAgMDE0LjAwMCBbMDgvMjgvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDAx IFswOS8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDIgWzA5LzAyLzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAwMyBbMDkvMDUvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDA0 IFswOS8wOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDUgWzA5LzA5LzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAwNiBbMDkvMDkvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDA3 IFswOS8xMC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDggWzA5LzEwLzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAwOSBbMDkvMTEvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDEw IFswOS8xMy8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTEgWzA5LzE0LzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAxMiBbMDkvMTcvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDEz IFswOS8xOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTQgWzA5LzE5LzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAxNSBbMDkvMjMvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDE2 IFswOS8yNC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTcgWzA5LzI1LzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAxOCBbMDkvMjYvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDE5 IFsxMC8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMjAgWzEwLzAyLzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAyMSBbMTAvMDkvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDIy IFsxMC8xMC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMjMgWzEwLzEwLzIwMThdCisgICAg ICAgICAgICAgICAgMDE0LjAyNCBbMTAvMTMvMjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDI1 IFsxMS8xMC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNS4wMDAgWzExLzEwLzIwMThdCisgICAg ICAgICAg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C5uZXQvcGFja2FnZXMvIikgdCkKKyAgICAocGFja2FnZS1pbml0aWFsaXplKQorICAg IChwYWNrYWdlLXJlZnJlc2gtY29udGVudHMpCisgICAgKHBhY2thZ2UtaW5zdGFsbCAnbXVsdGlw bGUtY3Vyc29ycykpCisKKy0gIFRvIHRyeSBvdXQgY3Jvc3NoYWlycyBhbmQgdGhlIHZpc2libGUg ZmlsbCBjb2x1bW4sIHR5cGU6ICBNLXggKy1tb2RlCisKKy0gIFRvIHRyeSBvdXQgb25seSB0aGUg dmlzaWJsZSBmaWxsIGNvbHVtbiwgdHlwZTogIE0teCBtYy1maWxsLWNvbHVtbi1tb2RlCisKKy0g IFRvIGxlYXJuIGhvdyB0byB1c2UgdGhlIG11bHRpcGxlIGZha2UgY3Vyc29ycyBmZWF0dXJlLCBl eGFtaW5lIHRoZQorICAgaW50ZXJhY3RpdmUgZnVuY3Rpb24gYG1jLXRlc3QnLgorCistICBFWEFN UExFIE9GIEhPVyBUTyBVU0UgTVVMVElQTEUgRkFLRSBDVVJTT1JTOgorCisgIDs7OyAoQlVGRkVS LVBPU0lUSU9OIENVUlNPUi1UWVBFIENVUlNPUi1DT0xPUikKKyAgOzs7CisgIChzZXRxIG11bHRp cGxlLWN1cnNvcnMtY29uZiAnKCgxICJoYmFyIiAibWFnZW50YSIpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoMyAiYm94IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICg0ICJob2xsb3ciICIjMDAwMEZGIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkpKQorCisgIDs7OyBUVVJOIE9G Ri4KK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CisKKy0gIEhvcml6b250YWwgU2Nyb2xsaW5nIC0tIFRlbXBvcmFyeTogIChz Y3JvbGwtbGVmdCAxKQorCisgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVu dC1saW5lKQorCistICBIb3Jpem9udGFsIFNjcm9sbGluZyAtLSBQZXJtYW5lbnQ6ICAoc2Nyb2xs LWxlZnQgMSB0KQorCisgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1s aW5lKQorCistICAoZnVuZGFtZW50YWwtbW9kZSkKKyAgIChzZXRxIGRpc3BsYXktbGluZS1udW1i ZXJzIHQpCisgICAoc2V0cSBidWZmZXItZGlzcGxheS10YWJsZSAobWFrZS1kaXNwbGF5LXRhYmxl KSkKKyAgIChhc2V0IGJ1ZmZlci1kaXNwbGF5LXRhYmxlCisgICAgICAgICA/XHQKKyAgICAgICAg ICh2ZWN0b3IgKG1ha2UtZ2x5cGgtY29kZSA/XHUwMEJCICdmb250LWxvY2std2FybmluZy1mYWNl KQorICAgICAgICAgICAgICAgICAobWFrZS1nbHlwaC1jb2RlID9cdCAnaGlnaGxpZ2h0KSkpCisg ICAoYXNldCBidWZmZXItZGlzcGxheS10YWJsZQorICAgICAgICAgP1xuCisgICAgICAgICAodmVj dG9yIChtYWtlLWdseXBoLWNvZGUgP1x1MDBCNiAnZm9udC1sb2NrLWNvbW1lbnQtZmFjZSkKKyAg ICAgICAgICAgICAgICAgP1xuKSkKKyAgIChzZXRxIHRhYi13aWR0aCA4KQorICAgKHNldHEtbG9j YWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJlbnQtbGluZSkKKworLSAgTm8gTGluZSBOdW1iZXJz CisKKworQ1JFQVRJT04gT0YgUkVQT1NJVE9SWToKKworICBta2RpciBESVJFQ1RPUlkKKworICBj ZCBESVJFQ1RPUlkKKworICBnaXQgaW5pdAorCisgIGdpdCByZW1vdGUgYWRkIG9yaWdpbiBodHRw cz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RFR0VSUCA9PiBSQU5HRURfRklYTlVNUAor CitUWVBFX1JBTkdFRF9JTlRFR0VSUCA9PiBUWVBFX1JBTkdFRF9GSVhOVU1QCisKK1hGQVNUSU5U ID0+IFhGSVhOQVQKKworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlf cCAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKQorICAgICAgICAgIHx8ICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAg IHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29sdW1uKSkp KQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdp bmRvdywgdyk7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0 cmluZyAod2luZG93LCBRbmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3 aW5kb3dfc3RyaW5nKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxud2luZG93ICglcylcbiIs IHdpbmRvd19jaGFyKTsKKyAgICB9CisjZW5kaWYKKworI2lmZGVmIEdMWVBIX0RFQlVHCisgIHN0 cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBpbnQgdGVtcF9meCA9IFdJTkRP V19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIHctPnBoeXNfY3Vyc29yLngpOworICBpbnQgdGVt cF9meSA9IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB3LT5waHlzX2N1cnNvci55KTsKKyAg ZW51bSB3aW5kb3dfcG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Y2tncm91bmQp IDogIk5JTFAiKSk7CisKK2ZwcmludGYgKHN0ZGVyciwgIk15IGxpc3Agb2JqZWN0OiAgJXNcbiIs IFNTREFUQSAoRmNoYXJfdG9fc3RyaW5nIChtYWtlX251bWJlciAoMTAxKSkpKTsKKworZnByaW50 ZiAoc3RkZXJyLCAic3RyaW5nOiAlcyB8IGludDogJWRcbiIsIFNTREFUQSAoYnVpbGRfc3RyaW5n ICgiZm9vIikpLCA2OSk7CisKK2lmIChCVUZGRVJQICh3LT5jb250ZW50cykgJiYgU1RSSU5HUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBuYW1lKSkpCisgIGZwcmludGYgKHN0ZGVyciwg Im5zX3VwZGF0ZV93aW5kb3dfZW5kOiAgJXNcbiIsIFNTREFUQSAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBuYW1lKSkpOworCitBVVRPX1NUUklORyAobXlfc3RyaW5nX29uZSwgIlRoaXMg aXMgdGhlIHZhbHVlIG9mIGBteV9vYmplY3Rfb25lJzogICVzIik7CitMaXNwX09iamVjdCBteV9v YmplY3Rfb25lID0gbWFrZV9mbG9hdCAoMC4xKTsKK0NBTExOIChGbWVzc2FnZSwgbXlfc3RyaW5n X29uZSwgbXlfb2JqZWN0X29uZSk7CisKK0FVVE9fU1RSSU5HIChteV9zdHJpbmdfdHdvLCAiVGhp cyBpcyB0aGUgdmFsdWUgb2YgYG15X29iamVjdF90d28nOiAgJXMiKTsKK0xpc3BfT2JqZWN0IG15 X29iamVjdF90d28gPSBtYWtlX251bWJlciAoNzc3KTsKK0NBTExOIChGbWVzc2FnZSwgbXlfc3Ry aW5nX3R3bywgbXlfb2JqZWN0X3R3byk7CisKK1dJTkRPVzogIHctPmNvbnRlbnRzCisKK0JVRkZF UjogIFhCVUZGRVIgKHctPmNvbnRlbnRzKQorCitCVUZGRVIgTE9DQUwgVkFSSUFCTEU6ICBCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIHZhc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B3ZSBwdXQgcG9pbnQgYmVmb3JlIHRoZQorICAgY2hh cmFjdGVyIG9uIHdoaWNoIHRoZSBjdXJzb3Igd2lsbCBhcHBlYXIuICAqLworICAgICAgaWYgKGNv bCA+PSBnb2FsKQorICBicmVhazsKKyAgICAgIHByZXZfY29sID0gY29sOworICAgICAgeyAvKiBD aGVjayBkaXNwbGF5IHByb3BlcnR5LiAgKi8KKyAgcHRyZGlmZl90IGVuZHA7CisgIGludCB3aWR0 aCA9IG1jX2NoZWNrX2Rpc3BsYXlfd2lkdGggKHNjYW4sIGNvbCwgJmVuZHApOworICBpZiAod2lk dGggPj0gMCkKKyAgICB7CisgICAgICBjb2wgKz0gd2lkdGg7CisgICAgICBpZiAoZW5kcCA+IHNj YW4pIC8qIEF2b2lkIGluZmluaXRlIGxvb3BzIHdpdGggMC13aWR0aCBvdmVybGF5cy4gICovCisg ICAgICAgIHsKKyAgICBzY2FuID0gZW5kcDsKKyAgICBzY2FuX2J5dGUgPSBDSEFSX1RPX0JZVEUg KHNjYW4pOworICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgfQorICAgICAgfQorICAgICAg LyogQ2hlY2sgY29tcG9zaXRpb24gc2VxdWVuY2UuICAqLworICAgICAgaWYgKGNtcF9pdC5pZCA+ PSAwCisgICAgfHwgKHNjYW4gPT0gY21wX2l0LnN0b3BfcG9zCisgICAgICAgICYmIGNvbXBvc2l0 aW9uX3Jlc2VhdF9pdCAoJmNtcF9pdCwgc2Nhbiwgc2Nhbl9ieXRlLCBlbmQsCisgICAgICAgICAg dywgTlVMTCwgUW5pbCkpKQorICBjb21wb3NpdGlvbl91cGRhdGVfaXQgKCZjbXBfaXQsIHNjYW4s IHNjYW5fYnl0ZSwgUW5pbCk7CisgICAgICBpZiAoY21wX2l0LmlkID49IDApCisgIHsKKyAgICBz Y2FuICs9IGNtcF9pdC5uY2hhcnM7CisgICAgc2Nhbl9ieXRlICs9IGNtcF9pdC5uYnl0ZXM7Cisg ICAgaWYgKH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MKKyAgICAgbmV4dF9lbGVtZW50 X2Zyb21fZGlzcGxheV92ZWN0b3IgZG9lcyBpdC4gICovCisgICAgICAgIExpc3BfT2JqZWN0IGVu dHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7CisgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5 KSkKKyAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgIGVsc2UKKyAgICBj ID0gJyAnOworICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgIGdvdG8gZW5kbG9vcDsKKyAgICAg ICAgaWYgKGMgPT0gJ1xyJyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9k aXNwbGF5KSwgUXQpKQorICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgaWYgKGMgPT0gJ1x0JykK KyAgICB7CisgICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgY29sID0gY29sIC8gdGFiX3dp ZHRoICogdGFiX3dpZHRoOworICAgIH0KKyAgICAgICAgZWxzZQorICAgICsrY29sOworICAgICAg fQorICB9CisgICAgICBlbHNlCisgIHsKKyAgICAvKiBUaGUgZGlzcGxheSB0YWJsZSBkb2Vzbid0 IGFmZmVjdCB0aGlzIGNoYXJhY3RlcjsKKyAgICAgICBpdCBkaXNwbGF5cyBhcyBpdHNlbGYuICAq LworICAgIGlmIChjID09ICdcbicpCisgICAgICBnb3RvIGVuZGxvb3A7CisgICAgaWYgKGMgPT0g J1xyJyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQp KQorICAgICAgZ290byBlbmRsb29wOworICAgIGlmIChjID09ICdcdCcpCisgICAgICB7CisgICAg ICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAgICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAqIHRh Yl93aWR0aDsKKyAgICAgIH0KKyAgICBlbHNlIGlmIChtdWx0aWJ5dGUgJiYgTEVBRElOR19DT0RF X1AgKGMpKQorICAgICAgeworICAgICAgICAvKiBTdGFydCBvZiBtdWx0aS1ieXRlIGZvcm0uICAq LworICAgICAgICB1bnNpZ25lZCBjaGFyICpwdHI7CisgICAgICAgIGludCBieXRlcywgd2lkdGg7 CisgICAgICAgIHB0ciA9IEJZVEVfUE9TX0FERFIgKHNjYW5fYnl0ZSk7CisgICAgICAgIE1DX01V TFRJQllURV9CWVRFU19XSURUSCAocHRyLCBkcCwgYnl0ZXMsIHdpZHRoKTsKKyAgICAgICAgLyog U3VidHJhY3Qgb25lIHRvIGNvbXBlbnNhdGUgZm9yIHRoZSBpbmNyZW1lbnQKKyAgICAgdGhhdCBp cyBnb2luZyB0byBoYXBwZW4gYmVsb3cuICAqLworICAgICAgICBzY2FuX2J5dGUgKz0gYnl0ZXMg LSAxOworICAgICAgICBjb2wgKz0gd2lkdGg7CisgICAgICB9CisgICAgZWxzZSBpZiAoY3RsX2Fy cm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3NykpCisgICAgICBjb2wgKz0gMjsKKyAgICBlbHNl IGlmIChjIDwgMDQwIHx8IGMgPj0gMDE3NykKKyAgICAgIGNvbCArPSA0OworICAgIGVsc2UKKyAg ICAgIGNvbCsrOworICB9CisgICAgICBzY2FuKys7CisgICAgICBzY2FuX2J5dGUrKzsKKyAgICB9 CisgZW5kbG9vcDoKKyAgbGFzdF9rbm93bl9jb2x1bW4gPSBjb2w7CisgIGxhc3Rfa25vd25fY29s dW1uX3BvaW50ID0gcHQ7CisgIGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkID0gTU9ESUZGOwor ICBpZiAoZ29hbGNvbCkKKyAgICAqZ29hbGNvbCA9IGNvbDsKKyAgaWYgKGVuZHBvcykKKyAgICAq ZW5kcG9zID0gc2NhbjsKKyAgaWYgKHByZXZjb2wpCisgICAgKnByZXZjb2wgPSBwcmV2X2NvbDsK K30KKworcHRyZGlmZl90CittY19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ZlY3RvciBkb2VzIGl0LiAgKi8KKyAg ICAgICAgTGlzcF9PYmplY3QgZW50cnkgPSBBUkVGIChjaGFydmVjLCBpKTsKKyAgICAgICAgaWYg KEdMWVBIX0NPREVfUCAoZW50cnkpKQorICAgIGMgPSBHTFlQSF9DT0RFX0NIQVIgKGVudHJ5KTsK KyAgICAgICAgZWxzZQorICAgIGMgPSAnICc7CisgICAgICB9CisgICAgaWYgKGMgPj0gMDQwICYm IGMgPCAwMTc3KQorICAgICAgY29sKys7CisgICAgZWxzZSBpZiAoYyA9PSAnXG4nCisgICAgICAg fHwgKGMgPT0gJ1xyJworICAgICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNl bGVjdGl2ZV9kaXNwbGF5KSwgUXQpKSkKKyAgICAgIHsKKyAgICAgICAgcHRyKys7CisgICAgICAg IGdvdG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgIH0KKyAgICBlbHNlIGlmIChjID09ICdc dCcpCisgICAgICB7CisgICAgICAgIGlmICh0YWJfc2VlbikKKyAgICBjb2wgPSAoKGNvbCArIHRh Yl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICBwb3N0X3RhYiArPSBj b2w7CisgICAgICAgIGNvbCA9IDA7CisgICAgICAgIHRhYl9zZWVuID0gMTsKKyAgICAgIH0KKyAg ICBlbHNlIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgIC8qIFdpdGggYSBkaXNwbGF5IHRh YmxlIGVudHJ5LCBDIGlzIGRpc3BsYXllZCBhcyBpcywgYW5kCisgICAgICAgICBub3QgZGlzcGxh eWVkIGFzIFxOTk4gb3IgYXMgXk4uICBJZiBDIGlzIGEgc2luZ2xlLWJ5dGUKKyAgICAgICAgIGNo YXJhY3RlciwgaXQgdGFrZXMgb25lIGNvbHVtbi4gIElmIEMgaXMgbXVsdGktYnl0ZSBpbgorICAg ICAgICAgYSB1bmlieXRlIGJ1ZmZ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mNt cCAoc3RyLCAiYmFyIikpCisgICAgcmV0dXJuIEJBUl9DVVJTT1I7CisgIGlmICghc3RyY21wIChz dHIsICJsZWZ0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTEVGVF9GUklOR0VfQklUTUFQ OworICBpZiAoIXN0cmNtcCAoc3RyLCAicmlnaHQtZnJpbmdlLWJpdG1hcCIpKQorICAgIHJldHVy biBSSUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAibm8iKSkKKyAgICBy ZXR1cm4gTk9fQ1VSU09SOworICByZXR1cm4gLTE7Cit9CisKK3N0YXRpYyBMaXNwX09iamVjdAor bWNfY3Vyc29yX3R5cGVfdG9fbGlzcCAoaW50IGFyZykKK3sKKyAgc3dpdGNoIChhcmcpCisgICAg eworICAgIGNhc2UgRklMTEVEX0JPWF9DVVJTT1I6IHJldHVybiBRYm94OworICAgIGNhc2UgSE9M TE9XX0JPWF9DVVJTT1I6IHJldHVybiBRaG9sbG93OworICAgIGNhc2UgSEJBUl9DVVJTT1I6IHJl dHVybiBRaGJhcjsKKyAgICBjYXNlIEJBUl9DVVJTT1I6IHJldHVybiBRYmFyOworICAgIGNhc2Ug TEVGVF9GUklOR0VfQklUTUFQOiByZXR1cm4gaW50ZXJuICgibGVmdC1mcmluZ2UtYml0bWFwIik7 CisgICAgY2FzZSBSSUdIVF9GUklOR0VfQklUTUFQOiByZXR1cm4gaW50ZXJuICgicmlnaHQtZnJp bmdlLWJpdG1hcCIpOworICAgIGNhc2UgTk9fQ1VSU09SOgorICAgIGRlZmF1bHQ6IHJldHVybiBp bnRlcm4gKCJubyIpOworICAgIH0KK30KKworc3RhdGljIExpc3BfT2JqZWN0CittY19jb2xvcl92 ZWN0b3JfY2FsYyAoc3RydWN0IHdpbmRvdyAqdywgTGlzcF9PYmplY3QgY29sb3IpCit7CisgIENI RUNLX1NUUklORyAoY29sb3IpOworICBMaXNwX09iamVjdCB0YXJnZXRfZnJhbWUgPSB3LT5mcmFt ZTsKKyAgTGlzcF9PYmplY3QgY29sb3JfdmFsdWVzOworICBkb3VibGUgdmFsbWF4ID0gWElOVCAo WENBUiAoRnh3X2NvbG9yX3ZhbHVlcyAoYnVpbGRfc3RyaW5nICgiI2ZmZmZmZiIpLCB0YXJnZXRf ZnJhbWUpKSk7CisgIExpc3BfT2JqZWN0IHZsaXN0OworICBwdHJkaWZmX3QgeDsKKyAgaW50IGkg PSAwOworICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgdmVjdG9yID0g KEZtYWtlX3ZlY3RvciAobWFrZV9udW1iZXIgKDMpLCBRbmlsKSk7CisgIGlmICghTklMUCAoRm1l bXEgKChGZnJhbWVwICh0YXJnZXRfZnJhbWUpKSwgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIGlu dGVybiAoIngiKSwgaW50ZXJuICgidzMyIiksIGludGVybiAoIm5zIikpKSkpCisgICAgeworICAg ICAgY29sb3JfdmFsdWVzID0gKEZ4d19jb2xvcl92YWx1ZXMgKGNvbG9yLCB0YXJnZXRfZnJhbWUp KTsKKyAgICAgIGZvciAodmxpc3QgPSBjb2xvcl92YWx1ZXM7CisgICAgICAgICAgIENPTlNQICh2 bGlzdCk7CisgICAgICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgICAgICB7CisgICAg ICAgICAgeCA9IFhJTlQgKFhDQVIgKHZsaXN0KSk7CisgICAgICAgICAgdGVtcCA9IG1ha2VfZmxv YXQgKHggLyB2YWxtYXgpOworICAgICAgICAgIEFTRVQgKHZlY3RvciwgaSwgdGVtcCk7CisgICAg ICAgICAgaSA9IGkgKyAxOworICAgICAgICB9CisgICAgfQorICByZXR1cm4gdmVjdG9yOworfQor CitzdGF0aWMgTGlzcF9PYmplY3QKK21jX2JnX2xzbCAoc3RydWN0IHdpbmRvdyAqdywgZW51bSBm YWNlX2lkIGZhY2VfaWQpCit7CisgIHN0cnVjdCBmcmFtZ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h0IHBh cnRpYWwtbGVmdCBwYXJ0aWFsLXJpZ2h0CisgIElmIGFueSB2YWx1ZSBpbiBsb2NhbCBiaW5kaW5n IGlzIG5vdCBwcmVzZW50IG9yIHQsIHVzZSBnbG9iYWwgdmFsdWUuCisgICAgIElmIHBhcnRpYWws IGxvb2t1cCBwYXJ0aWFsIGJpdG1hcCBpbiBkZWZhdWx0IHZhbHVlIGlmIG5vdCBmb3VuZCBoZXJl LgorICAgICBJZiBub3QgcGFydGlhbCwgb3Igbm8gcGFydGlhbCBzcGVjIGlzIHByZXNlbnQsIHVz ZSBub24tcGFydGlhbCBiaXRtYXAuICAqLworCitzdGF0aWMgaW50CittY19nZXRfbG9naWNhbF9m cmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCBiaXRtYXAsIGludCBy aWdodF9wLCBpbnQgcGFydGlhbF9wKQoreworICBMaXNwX09iamVjdCBjbWFwLCBibTEgPSBRbmls LCBibTIgPSBRbmlsLCBibTsKKyAgRU1BQ1NfSU5UIGxuMSA9IDAsIGxuMiA9IDA7CisgIGludCBp eDEgPSByaWdodF9wOworICBpbnQgaXgyID0gaXgxICsgKHBhcnRpYWxfcCA/IDIgOiAwKTsKKyAg aWYgKChjbWFwID0gQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmcmluZ2VfaW5kaWNhdG9y X2FsaXN0KSksICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAgICBibTEgPSBGYXNzcSAoYml0bWFw LCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAgeworICAgIGlmICgoYm0xID0gWENE UiAoYm0xKSksIE5JTFAgKGJtMSkpCisgICAgICByZXR1cm4gTk9fRlJJTkdFX0JJVE1BUDsKKyAg ICBpZiAoQ09OU1AgKGJtMSkpCisgICAgICB7CisgICAgICAgIGxuMSA9IFhJTlQgKEZsZW5ndGgg KGJtMSkpOworICAgICAgICBpZiAocGFydGlhbF9wKQorICAgIHsKKyAgICAgIGlmIChsbjEgPiBp eDIpCisgICAgICAgIHsKKyAgICAgICAgICBibSA9IEZudGggKG1ha2VfbnVtYmVyIChpeDIpLCBi bTEpOworICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICBnb3RvIGZvdW5kOworICAg ICAgICB9CisgICAgfQorICAgICAgICBlbHNlCisgICAgeworICAgICAgaWYgKGxuMSA+IGl4MSkK KyAgICAgICAgeworICAgICAgICAgIGJtID0gRm50aCAobWFrZV9udW1iZXIgKGl4MSksIGJtMSk7 CisgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgIGdvdG8gZm91bmQ7CisgICAgICAg IH0KKyAgICB9CisgICAgICB9CisgICAgZWxzZSBpZiAoKGJtID0gYm0xLCAhRVEgKGJtLCBRdCkp KQorICAgICAgZ290byBmb3VuZDsKKyAgfQorICAgIH0KKyAgaWYgKCFFUSAoY21hcCwgQlZBUiAo JmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpCisgICAgICAmJiAhTklM UCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpKQorICAg IHsKKyAgICAgIGJtMiA9IEZhc3NxIChiaXRtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZy aW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsKKyAgICAgIGlmIChDT05TUCAoYm0yKSkKKyAgeworICAg IGlmICgoYm0yID0gWENEUiAoYm0yKSksICFOSUxQIChibTIpKQorICAgICAgeworICAgICAgICBp ZiAoQ09OU1AgKGJtMikpCisgICAgeworICAgICAgbG4yID0gWElOVCAoRmxlbmd0aCAoYm0yKSk7 CisgICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKGxuMiA+IGl4 MikKKyAgICAgIHsKKyAgICAgICAgYm0gPSBGbnRoIChtYWtlX251bWJlciAoaXgyKSwgYm0yKTsK KyAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAg fQorICAgICAgICB9CisgICAgfQorICAgICAgfQorICB9CisgICAgfQorICBpZiAobG4xID4gaXgx KQorICAgIHsKKyAgICAgIGJtID0gRm50aCAobWFrZV9udW1iZXIgKGl4MSksIGJtMSk7CisgICAg ICBpZiAoIUVRIChibSwgUXQpKQorICBnb3RvIGZvdW5kOworICAgIH0KKyAgaWYgKGxuMiA+IGl4 MSkKKyAgICB7CisgICAgICBibSA9IEZudGggKG1ha2VfbnVtYmVyIChpeDEpLCBibTIpOworICAg ICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgZ290byBmb3VuZDsKKyAgICAgIHJldHVybiBOT19GUklO R0VfQklUTUFQOworICAgIH0KKyAgZWxzZSBpZiAoKGJtID0gYm0yLCBOSUxQIChibSkpKQorICAg IHJldHVybiBOT19GUklOR0VfQklUTUFQOworIGZvdW5kOgorICByZXR1cm4gbG9va3VwX2ZyaW5n ZV9iaXRtYXAgKGJtKTsKK30KKwordm9pZAorbWNfZXJhc2VfcGh5c19jdXJzb3IgKHN0cnVjdCB3 aW5kb3cgKncsIGludCBmbGF2b3IpCit7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ ZnJhbWUpOworICBNb3VzZV9ITEluZm8gKmhsaW5mbyA9IE1PVVNFX0hMX0lORk8gKGYpOworICBp bnQgaHBvcyA9IHctPnBoeXNfY3Vyc29yLmhwb3M7CisgIGludCB2cG9zID0gdy0+cGh5c19jdXJz b3IudnBvczsKKyAgYm9vbCBtb3VzZV9mYWNlX2hlcmVfcCA9IGZhbHNlOworICBzdHJ1Y3QgZ2x5 cGhfbWF0cml4ICphY3RpdmVfZ2x5cGhzID0gdy0+Y3VycmVudF9tYXRyaXg7CisgIHN0cnVjdCBn bHlwaF9yb3cgKmN1cnNvcl9yb3c7CisgIHN0cnVjdCBnbHlwaCAqY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XJzb3IncyBzcG90IGluIG1vdXNlIGZhY2UgaWYgaXQgaXMgYXQg dGhlCisgICBlbmQgb2YgYSBsaW5lIChvbiBhIG5ld2xpbmUpLiAgVGhlIGN1cnNvciBhcHBlYXJz IHRoZXJlLCBidXQKKyAgIG1vdXNlIGhpZ2hsaWdodGluZyBkb2VzIG5vdC4gICovCisgICAgICAm JiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gPiBocG9zICYmIGhwb3MgPj0gMCkKKyAgICBt b3VzZV9mYWNlX2hlcmVfcCA9IHRydWU7CisgIC8qIE1heWJlIGNsZWFyIHRoZSBkaXNwbGF5IHVu ZGVyIHRoZSBjdXJzb3IuICAqLworICBpZiAody0+cGh5c19jdXJzb3JfdHlwZSA9PSBIT0xMT1df Qk9YX0NVUlNPUikKKyAgICB7CisgICAgICBpbnQgeCwgeTsKKyAgICAgIGludCBoZWFkZXJfbGlu ZV9oZWlnaHQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgIGludCB3aWR0 aDsKKyAgICAgIGN1cnNvcl9nbHlwaCA9IGdldF9waHlzX2N1cnNvcl9nbHlwaCAodyk7CisgICAg ICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgICAgIGdvdG8gbWFya19jdXJzb3Jfb2Zm OworICAgICAgd2lkdGggPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgeCA9IHct PnBoeXNfY3Vyc29yLng7CisgICAgICBpZiAoeCA8IDApCisgICAgICAgIHsKKyAgICAgICAgICB3 aWR0aCArPSB4OworICAgICAgICAgIHggPSAwOworICAgICAgICB9CisgICAgICB3aWR0aCA9IG1p biAod2lkdGgsIHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSkgLSB4KTsKKyAgICAgIHkg PSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgbWF4IChoZWFkZXJfbGluZV9oZWlnaHQsIGN1 cn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JvbGwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gbm90 aGluZy4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNj cm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3JvbGwpOworICAvKiBFWEFN UExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgZWxzZSBiZXNpZGVzIGhvcml6b250YWxs eSBzY3JvbGxpbmcgdGhlCisgICAgICAgICAgICAgICBjdXJyZW50IGxpbmUgZGlmZmVyZW50bHku CisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9s bGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMV9wID0gKCF3LT5zdXNw ZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNj cm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3JvbGwp OworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCAuLi4KKyAgICAgICAgICAgICAgIEN1cnJl bnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisg IGJvb2wgaHNjbF9hbGxfcGVybV8yX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPT0gMAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgKHNj cm9sbC1sZWZ0IDUpOyBhbmQsIHRoZW4gcHJlc3MgdGhlIGxlZnQgYXJyb3cga2V5IG9uZSB0aW1l LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNjcm9sbGVk IGRpZmZlcmVudGx5LiovCisgIGJvb2wgaHNjbF90ZW1wX3AgPSAoIXctPnN1c3BlbmRfYXV0b19o c2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAg ICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAg ICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5k IGRvIHNvbWV0aGluZyB0aGF0IGNhdXNlcyB0aGUgY3VycmVudCBsaW5lIHRvIGJlCisgICAgICAg ICAgICAgICBob3Jpem9ud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bmcg YW5kIHJlcXVpcmVkIHN0ZGVyciBtZXNzYWdlcworICAgICAgdG8gc2VlIHRoYXQgYGdseXBoX3Jv dy0+b3ZlcmxheV9hcnJvd19iaXRtYXBgIHNhdGlzZmllcyB0aGUgZmlyc3QgY29uZGl0aW9uCisg ICAgICBvZiAod2hpY2ggIT0gTk9fRlJJTkdFX0JJVE1BUCkuICBBdCB0aGlzIHRpbWUsIEBsYXds aXN0IHByZWZlcnMgbm90IHRvCisgICAgICByZWx5IHVwb24gYSBMaXNwIHNldHRpbmcgdXNpbmcg YHNldC1mcmluZ2UtYml0bWFwLWZhY2UnLiAqLworICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5n ZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAg IGdseXBoX3Jvdy0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgIGRyYXdfZnJpbmdlX2Jp dG1hcCAodywgZ2x5cGhfcm93LCB0cnVlKTsKKyAgICB9CisgICAgZWxzZSBpZiAoIXJlbW92ZV9w CisgICAgICAgICAgICAgJiYgZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAg ICAgICAgICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2Fs bF9wZXJtXzBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzFfcAorICAgICAg ICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICAgICAgICB8fCBoc2Ns X3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3Blcm1fcCkpCisgICAgICB7CisgICAg ICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQgPQorICAgICAgICAgICghYWN0 aXZlX3AKKyAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg Y3Jvc3NoYWlyc19pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRf ZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3RpdmUtZmFjZSIp LCB0cnVlKQorICAgICAgICAgIDogKGFjdGl2ZV9wCisgICAgICAgICAgICAgJiYgbWluaW1hbF9w KQorICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVy bGF5LWFycm93LWhzY2wtbWluaW1hbC1mYWNlIiksIHRydWUpCisgICAgICAgICAgOiAoYWN0aXZl X3AKKyAgICAgICAgICAgICAmJiAhbWluaW1hbF9wKQorICAgICAgICAgICAgPyBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtZmFjZSIpLCB0cnVl KQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICBmYWNlX2lkID0gKGN1cnNv cl90eXBlID09IExFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgID8gb3Zlcmxh eV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAg ICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgICAg aWYgKGhzY2xfYWxsX3Blcm1fMF9wKQorICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRf bG9naWNhbF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhz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AgICAgICAgICAgICAgICAgICAgICAgICA/ IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5nZV9vZmZz ZXQgPSAwOworICAgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgdHJ1ZSk7 CisgICAgICB9CisgICAgICBlbHNlIGlmICghcmVtb3ZlX3AKKyAgICAgICAgICAgICAgICYmIChm bGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisgICAgICAgICAgICAgICAgICAg fHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICB8fCBm bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkpCisgICAgICAgIHsKKyAgICAgICAg ICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFO R0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZF UlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBRbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IFFuaWw7CisgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IChjdXJzb3Jf dHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICA/ IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQorICAgICAgICAgICAgICAgICAg ICAgICAgICA6IE5PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgZmFjZV9pZCA9IChjdXJzb3Jf dHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICA/IGxvb2t1 cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXZlcnRpY2FsLWJhci1mYWNlIiksIHRydWUp CisgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIGdseXBo X3Jvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gZmFsc2U7CisgICAgICAgICAgZ2x5cGhfcm93LT5m cmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSAwOworICAgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRf ZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgZ2x5cGhfcm93LT5yaWdo dF9mcmluZ2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgICAgZ2x5cGhfcm93LT5yaWdodF9m cmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIGdseXBo X3JvdywgZmFsc2UpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGZsYXZvciA9PSBNQ19H TFlQSAorICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfR0xZUEhMRVNTCisgICAgICAg ICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19HTFlQSF9UQUIpCisgICAgICAgICAgeworICAgICAg ICAgICAgdy0+bWMuaCA9IGg7CisgICAgICAgICAgICB3LT5tYy5meCA9IGZ4OworICAgICAgICAg ICAgdy0+bWMuZnkgPSBmeTsKKyAgICAgICAgICAgIHctPm1jLmdseXBoX2ZsYXZvciA9IGZsYXZv cjsKKyAgICAgICAgICAgIHctPm1jLnJlZCA9IFhGTE9BVF9EQVRBIChBUkVGIChjb2xvcl92ZWN0 b3IsIDApKTsKKyAgICAgICAgICAgIHctPm1jLmdyZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKGNv bG9yX3ZlY3RvciwgMSkpOworICAgICAgICAgICAgdy0+bWMuYmx1ZSA9IFhGTE9BVF9EQVRBIChB UkVGIChjb2xvcl92ZWN0b3IsIDIpKTsKKyAgICAgICAgICAgIHctPm1jLnBvc2ludCA9IHBvc2lu dDsKKyAgICAgICAgICAgIC8qIFNvbWUgb2YgdGhlc2UgdmFsdWVzIGNvbWUgdGhyb3VnaCBhcyAx LjAwMzkwNiwgd2hpY2ggY2F1c2VzIGEgYnJlYWthZ2UKKyAgICAgICAgICAgIG9mIHRoZSBjb2xv cnMgaW4gdGhhdCBtdWx0aXBsaWNhdGlvbiBieSB0aGUgYmFzZSB3aWxsIGV4Y2VlZCB0aGUgYmFz ZS4gKi8KKyAgICAgICAgICAgIGlmICh3LT5tYy5yZWQgPiAxLjApCisgICAgICAgICAgICAgIHct Pm1jLnJlZCA9IDEuMDsKKyAgICAgICAgICAgIGlmICh3LT5tYy5ncmVlbiA+IDEuMCkKKyAgICAg ICAgICAgICAgdy0+bWMuZ3JlZW4gPSAxLjA7CisgICAgICAgICAgICBpZiAody0+bWMuYmx1ZSA+ IDEuMCkKKyAgICAgICAgICAgICAgdy0+bWMuYmx1ZSA9IDEuMDsKKyAgICAgICAgICAgIEZSQU1F X1JJRiAoZiktPmRyYXdfd2luZG93X2N1cnNvciAodywgZ2x5cGhfcm93LCB4LCB5LCBjdXJzb3Jf dHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3dpZHRoLCB0cnVlLCBhY3RpdmVfcCk7CisgICAgICAgICAgICB3LT5tYy5oID0gLTE7Cisg ICAgICAgICAgICB3LT5tYy5meCA9IC0xOworICAgICAgICAgICAgdy0+bWMuZnkgPSAtMTsKKyAg ICAgICAgICAgIHctPm1jLmdseXBoX2ZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgICAgICAgICAgIHct Pm1jLnJlZCA9IC0xLjA7CisgICAgICAgICAgICB3LT5tYy5ncmVlbiA9IC0xLjA7CisgICAgICAg ICAgICB3LT5tYy5ibHVlID0gLTEuMDsKKyAgICAgICAgICAgIHctPm1jLnBvc2ludCA9IC0xOwor ICAgICAgICAgIH0KKyAgLyogUmVzdG9yZSB0aGUgcHJldmlvdXMgdmFsdWVzIGZvciB3LT5waHlz X2N1cnNvciBhbmQgZ2x5cGhfcm93LiAqLworICB3LT5waHlzX2N1cnNvcl9vbl9wID0gcGh5c19j dXJzb3Jfb25fcDsKKyAgdy0+cGh5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CisgIGlmIChn bHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICB8fCBnbHlwaC0+dHlwZSA9PSBHTFlQSExF U1NfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBE ImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAl NGQgICUzZCAgJTNkICVzICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFth cmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0g Q0hBUl9HTFlQSAorICAgICAgICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5 cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAg PyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAg ID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dp ZHRoLAorICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAg ICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGlu ZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBv cywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgKCghTklMUCAoY2hhcmFjdGVy KQorICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gOSkKKyAgICAgICAgICAgPyAiXFx0IgorICAg ICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09 IDEwKQorICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQor ICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAgICAgICAgID8gIlxccyIKKyAg ICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAh PSA5CisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSAxMAorICAgICAgICAgICAgJiYgZ2x5 cGgtPnUuY2ggIT0gMzIpCisgICAgICAgICAgID8gU1NEQVRBIChjaGFyYWN0ZXIpCisgICAgICAg ICA6ICJcXD8iKSk7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBTVFJFVENIX0dM WVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJwRCJkLyUt NWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAlNWQgJTRkICAl M2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFd LAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0g LSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAgICBnbHlwaC0+ Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICcw JworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAg ICAgIDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94 X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBo LT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJa ViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlw ZSA9PSBJTUFHRV9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAg ICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEu MWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93 LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdJJywKKyAg ICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVs X3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5pbWdfaWQsCisgICAgICAg IGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBn bHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAg ICAgICcuJyk7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZ UEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01 ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiBy b3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJysnLAor ICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4 ZWxfd2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5pZCk7CisgICAg ICBmcHJpbnRmIChzdGRlcnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICBnbHlwaC0+ZmFj ZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJp Z2h0X2JveF9saW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAg ICAgIGZwcmludGYgKHN0ZGVyciwgIiAlNWQgJTRkICAlM2QgICUzZCAlcyAuIFslZC0lZF1cbiIs CisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBv cywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICAgICAg ICAgICAgICAgICAgZ2x5cGgtPnNsaWNlLmNtcC5mcm9tLCBnbHlwaC0+c2xpY2UuY21wLnRvKTsK KyAgICAgICAgZWxzZQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOworICAgIH0KKyAg ZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gWFdJREdFVF9HTFlQSCkKKyAgICB7CisjaWZuZGVmIEhB VkVfWFdJREdFVFMKKyAgICAgIGVhc3N1bWUgKGZhbHNlKTsKKyNlbHNlCisgICAgICBmcHJpbnRm IChzdGRlcnIsCisgICAgICAgICIgICU1ZC8lLTVkICU1ZCAlNGMgJTZkICVjICUzZCAweCUwNXgg JTRkICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0g MCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAg ICAgICdYJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICA6ICctJykpLAorICAgICAgICBn bHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlw aC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAg ICAgICAgZ2x5cGgtPnUueHdpZGdldCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlw aC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAg ICcuJyk7CisjZW5kaWYKKyAgICB9Cit9CisKKy8qIER1bXAgdGhlIGNvbnRlbnRzIG9mIGdseXBo IHJvdyBhdCBWUE9TIGluIE1BVFJJWCB0byBzdGRlcnIuCisgICBHTFlQSFMgMCBtZWFucyBkb24n dCBzaG93IGdseXBoIGNvbnRlbnRzLgorICAgR0xZUEhTIDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4g c2hvcnQgZm9ybQorICAgR0xZUEhTID4gMSBtZWFucyBzaG93IGdseXBocyBpbiBsb25nIGZvcm0u ICAqLworCit2b2lkCittY19kdW1wX2dseXBoX3JvdyAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBp bnQgdnBvcywgaW50IGdseXBocykKK3sKKyAgaW50IHJlbGF0aXZlX3ggPSAwOworICBpZiAoZ2x5 cGhzICE9IDEpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5EVU1QIEdMWVBIIFJP V1xuIik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJSb3cgICAgIFN0YXJ0ICAgICAgIEVuZCBV c2VkIG9FPjxcXENUWkZlc20gICAgIFggICAgWSAgICBXICAgIEggICAgViAgICBBICAgIFBcbiIp OworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4iKTsKKyAg ICAgIGZwcmludGYgKHN0ZGVyciwgIiUzZCAlOSJwRCJkICU5InBEImQgJTRkICUxLjFkJTEuMWQl MS4xZCUxLjFkXAorJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCAgJTRk ICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkXG4iLAorICAgICAgICAgdnBvcywKKyAgICAgICAgIE1B VFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KSwKKyAgICAgICAgIE1BVFJJWF9ST1dfRU5EX0NI QVJQT1MgKHJvdyksCisgICAgICAgICByb3ctPnVzZWRbVEVYVF9BUkVBXSwKKyAgICAgICAgIHJv dy0+Y29udGFpbnNfb3ZlcmxhcHBpbmdfZ2x5cGhzX3AsCisgICAgICAgICByb3ctPmVuYWJsZWRf cCwKKyAgICAgICAgIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCwKKyAgICAgICAgIHJvdy0+dHJ1 bmNhdGVkX29uX3JpZ2h0X3AsCisgICAgICAgICByb3ctPmNvbnRpbnVlZF9wLAorICAgICAgICAg TUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChyb3cpLAorICAgICAgICAgTUFUUklYX1JP V19ESVNQTEFZU19URVhUX1AgKHJvdyksCisgICAgICAgICByb3ctPmVuZHNfYXRfenZfcCwKKyAg ICAgICAgIHJvdy0+ZmlsbF9saW5lX3AsCisgICAgICAgICByb3ctPmVuZHNfaW5fbWlkZGxlX29m X2NoYXJfcCwKKyAgICAgICAgIHJvdy0+c3RhcnRzX2luX21pZGRsZV9vZl9jaGFyX3AsCisgICAg ICAgICByb3ctPm1vdXNlX2ZhY2VfcCwKKyAgICAgICAgIHJvdy0+eCwKKyAgICAgICAgIHJvdy0+ eSwKKyAgICAgICAgIHJvdy0+cGl4ZWxfd2lkdGgsCisgICAgICAgICByb3ctPmhlaWdodCwKKyAg ICAgICAgIHJvdy0+dmlzaWJsZV9oZWlnaHQsCisgICAgICAgICByb3ctPmFzY2VudCwKKyAgICAg ICAgIHJvdy0+cGh5c19hc2NlbnQpOworICAgICAgLyogVGhlIG5leHQgMyBsaW5lcyBzaG91bGQg YWxpZ24gdG8gIlN0YXJ0IiBpbiB0aGUgaGVhZGVyLiAgKi8KKyAgICAgIGZwcmludGYgKHN0ZGVy ciwgIiAgICAlOSJwRCJkICU5InBEImRcdCU1ZFxuIiwgcm93LT5zdGFydC5vdmVybGF5X3N0cmlu Z19pbmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLm92ZXJsYXlfc3RyaW5nX2luZGV4LAorICAgICAg ICAgcm93LT5jb250aW51YXRpb25fbGluZXNfd2lkdGgpOworICAgICAgZnByaW50ZiAoc3RkZXJy LCAiICAgICU5InBEImQgJTkicEQiZFxuIiwKKyAgICAgICAgIENIQVJQT1MgKHJvdy0+c3RhcnQu c3RyaW5nX3BvcyksCisgICAgICAgICBDSEFSUE9TIChyb3ctPmVuZC5zdHJpbmdfcG9zKSk7Cisg ICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTlkICU5ZFxuIiwgcm93LT5zdGFydC5kcHZlY19p bmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLmRwdmVjX2luZGV4KTsKKyAgICB9CisgIGlmIChnbHlw aHMgPiAxKQorICAgIHsKKyAgICAgIGludCBhcmVhOworICAgICAgZm9yIChhcmVhID0gTEVGVF9N QVJHSU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICB7CisgICAgc3RydWN0IGds eXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGhf ZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgLyogR2x5cGggZm9yIGEgbGluZSBl bmQgaW4gdGV4dC4gICovCisgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGdseXBoID09IGds eXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICArK2dseXBoX2VuZDsKKyAgICBp ZiAoZ2x5cGggPCBnbHlwaF9lbmQpCisgICAgICBmcHJpbnRmIChzdGRlcnIsICJHbHlwaCMvVG90 YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQ T1MgVlBPUyBaViBDXG4iKTsKKyAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgp CisgICAgICB7CisgICAgICAgIG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0 aXZlX3gpOworICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAg IH0KKyAgfQorICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGhzID09IDEpCisgICAgeworICAgICAgaW50 IGFyZWE7CisgICAgICBjaGFyIHNbU0hSVF9NQVggKyA0XTsKKyAgICAgIGZvciAoYXJlYSA9IExF RlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgeworICAgIGludCBp OworICAgIGZvciAoaSA9IDA7IGkgPCByb3ctPnVzZWRbYXJlYV07ICsraSkKKyAgICAgIHsKKyAg ICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdICsgaTsKKyAgICAg ICAgaWYgKGkgPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgJiYgYXJlYSA9PSBURVhUX0FS RUEKKyAgICAgICYmIE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAmJiBnbHlwaC0+dHlwZSA9 PSBDSEFSX0dMWVBICisgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAnICcpCisgICAgeworICAgICAg c3Ry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4OworICBFTUFDU19JTlQgdnBvczsKKyAg aWYgKE5JTFAgKHJvdykpCisgICAgeworICAgICAgaW50IGQxLCBkMiwgZDMsIGQ0LCBkNSwgeXBv czsKKyAgICAgIGJvb2wgdmlzaWJsZV9wID0gcG9zX3Zpc2libGVfcCAodywgUFQsICZkMSwgJmQy LCAmZDMsICZkNCwgJmQ1LCAmeXBvcyk7CisgICAgICBpbnQgaGVhZGVyX2xpbmVfaGVpZ2h0ID0g V0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICBpbnQgdm9mZnNldCA9IChoZWFk ZXJfbGluZV9oZWlnaHQgPiAwCisgICAgICAgICAgICAgICAgICAgICAmJiB5cG9zID4gMCkKKyAg ICAgICAgICAgICAgICAgICAgICA/IHlwb3MgKyAxCisgICAgICAgICAgICAgICAgICAgICAgOiB5 cG9zOworICAgICAgaWYgKHZpc2libGVfcCkKKyAgICAgICAgdnBvcyA9IHZvZmZzZXQ7CisgICAg ICAgIGVsc2UKKyAgICAgICAgICB2cG9zID0gMDsKKyAgICB9CisgICAgZWxzZQorICAgICAgewor ICAgICAgICBDSEVDS19OVU1CRVIgKHJvdyk7CisgICAgICAgIHZwb3MgPSBYSU5UIChyb3cpOwor ICAgICAgfQorICBtYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgaWYgKHZwb3MgPj0gMCAm JiB2cG9zIDwgbWF0cml4LT5ucm93cykKKyAgICBtY19kdW1wX2dseXBoX3JvdyAoTUFUUklYX1JP VyAobWF0cml4LCB2cG9zKSwKKyAgICAgICAgdnBvcywKKyAgICAgICAgVFlQRV9SQU5HRURfSU5U RUdFUlAgKGludCwgZ2x5cGhzKSA/IFhJTlQgKGdseXBocykgOiAyKTsKKyAgcmV0dXJuIFFuaWw7 Cit9CisKK3ZvaWQKK21jX2R1bXBfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpt YXRyaXgsIGludCBnbHlwaHMpCit7CisgIGlud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xFIgorICAgIDogZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVwor ICAgICAgPyAiTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XIgorICAgIDogZmxhdm9yID09IE1D X1ZFUlRJQ0FMX0JBUgorICAgICAgPyAiTUNfVkVSVElDQUxfQkFSIgorICAgIDogZmxhdm9yID09 IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgID8gIk1DX1ZFUlRJQ0FMX0JBUl9CQUNL U0xBU0giCisgICAgOiAiT09QUyIpLAorICBwb3NpbnQsCisgIHJlZF9mZywgZ3JlZW5fZmcsIGJs dWVfZmcsIHJlZF9iZywgZ3JlZW5fYmcsIGJsdWVfYmcpOworICBib29sIHJlbW92ZV9wID0gZmFs c2U7CisgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3Ms IGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBm b3JlZ3JvdW5kLCBhY3RpdmVfcCwgbWluaW1hbF9wLAorICAgICAgICAgICAgICAgICAgICAgICAg Zmxhdm9yLCBwb3NpbnQsIHJlbW92ZV9wKTsKKyAgTGlzcF9PYmplY3QgZmlmdGVlbl9lbGVtZW50 cyA9IGxpc3RuIChDT05TVFlQRV9IRUFQLCAxNSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHgpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoZngpLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoeSksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChmeSksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChocG9zKSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHZwb3MpLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoaCksCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2N1cnNvcl90eXBlX3RvX2xp c3AgKGN1cnNvcl90eXBlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbWFrZV9udW1iZXIgKGN1cnNvcl93aWR0aCksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1ha2VfbnVtYmVyIChhY3RpdmVfcCksCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChtaW5pbWFsX3ApLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoZmxhdm9yKSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHBvc2ludCkp OworICAqcmVzdWx0ID0gRmNvbnMgKGZpZnRlZW5fZWxlbWVudHMsICpyZXN1bHQpOworfQorCisv KiBSZXR1cm4gYSBwb2ludGVyIHRvIHRoZSBnbHlwaCBXJ3MgcGh5c2ljYWwgY3Vyc29yIGlzIG9u LiAgVmFsdWUgaXMKKyAgIG51bGwgaWYgVydzIGN1cnJlbnQgbWF0cml4IGlzIGludmFsaWQsIHNv IHRoYXQgbm8gbWVhbmluZ2Z1bCBnbHlwaAorICAgY2FuIGJlIHJldHVybmVkLiAgKi8KKworc3Ry dWN0IGdseXBoICoKK21jX2dldF9waHlzX2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqdywg aW50IHgsIGludCBocG9zLCBpbnQgdnBvcykKK3sKKyAgc3RydWN0IGdseXBoX3JvdyAqcm93Owor ICBzdHJ1Y3QgZ2x5cGggKmdseXBoOworICBpZiAoISh2cG9zID49IDAKKyAgICAgICAgJiYgdnBv cyA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cykpCisgICAgcmV0dXJuIE5VTEw7CisgIHJvdyA9 IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgaWYgKCFyb3ctPmVuYWJs ZWRfcCkKKyAgICByZXR1cm4gTlVMTDsKKyAgaWYgKHctPmhzY3JvbGwpCisgICAgeworICAgICAg LyogV2hlbiB0aGUgd2luZG93IGlzIGhzY3JvbGxlZCwgY3Vyc29yIGhwb3MgY2FuIGxlZ2l0aW1h dGVseSBiZQorICAgICAgb3V0IG9mIGJvdW5kcywgYnV0IHdlIGRyYXcgdGhlIGN1cnNvciBhdCB0 aGUgY29ycmVzcG9uZGluZworICAgICAgd2luZG93IG1hcmdpbiBpbiB0aGF0IGNhc2UuICAqLwor ICAgICAgaWYgKCFyb3ctPnJldmVyc2VkX3AgJiYgaHBvcyA8IDApCisgICAgICAgIGhwb3MgPSAw OworICAgICAgaWYgKHJvdy0+cmV2ZXJzZWRfcCAmJiBocG9zID49IHJvdy0+dXNlZFtURVhUX0FS RUFdKQorICAgICAgICBocG9zID0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgIH0KKyAg aWYgKDAgPD0gaHBvcyAmJiBocG9zIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgZ2x5cGgg PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgaHBvczsKKyAgICBlbHNlCisgICAgICBnbHlwaCA9 IE5VTEw7CisgIHJldHVybiBnbHlwaDsKK30KKworLyogTVVMVElQTEVfQ1VSU09SUzogIFdlIGRv IG5vdCB1c2UgdGhpcyBmdW5jdGlvbi4KKyAgIEhPUklaT05UQUxfUlVMRVI6ICBXZSB3YW50IGEg dW5pdmVyc2FsIGZ5IGNvb3JkaW5hdGUgZm9yIGEgbGV2ZWwgcnVsZXIuCisgICBWRVJUSUNBTF9S VUxFUjogIFdlIHdhbnQgYW4gaCB0aGF0IGVuc3VyZXMgbm8gZ2FwIGJldHdlZW4gcHJldmlvdXMv bmV4dCBsaW5lLgorICAgICAgICAgICAgICAgICAgICBUaGUgZnggY29vcmRpbmF0ZSBpcyBzZXQg ZWxzZXdoZXJlIGJhc2VkIHVwb24gb3BvaW50X3guICovCisKK3ZvaWQKK21jX2dldF9waHlzX2N1 cnNvcl9nZW9tZXRyeSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhf cm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgeCwgaW50ICpmeCwgaW50IHks IGludCAqZnksIGludCBocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdnBv cywgaW50ICpoLCBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1cnNvcl90eXBlLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoLCBpbnQgKndkKQoreworICBzdHJ1 Y3QgZ2x5cGggKmZha2VfcGh5c19jdXJzb3JfZ2x5cGggPSBtY19nZXRfcGh5c19jdXJzb3JfZ2x5 cGggKHcsIHgsIGhwb3MsIHZwb3MpOworICBpZiAoZmFrZV9waHlzX2N1cnNvcl9nbHlwaCAhPSBO VUxMKQorICAgIHsKKyAgICAgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE9XX0ZSQU1F ICh3KSk7CisgICAgICBpbnQgaF90ZW1wLCBoMCwgeTAsIGFzY2VudDsKKyAgICAgIC8qIENvbXB1 dGUgdGhlIHdpZHRoIG9mIHRoZSByZWN0YW5nbGUgdG8gZHJhdy4gIElmIG9uIGEgc3RyZXRjaAor ICAgICAgICAgZ2x5cGgsIGFuZCBgeC1zdHJldGNoLWJsb2NrLWN1cnNvcicgaXMgbmlsLCBkb24n dCBkcmF3IGEKKyAgICAgICAgIHJlY3RhbmdsZSBhcyB3aWRlIGFzIHRoZSBnbHlwaCwgYnV0IHVz ZSBhIGNhbm9uaWNhbCBjaGFyYWN0ZXIKKyAgICAgICAgIHdpZHRoIGluc3RlYWQuICAqLworICAg ICAgKndkID0gc2NyYXRjaF9nbHlwaHMtPnBpeGVsX3dpZHRoOworICAgICAgaWYgKHggPCAwKQor ICAgICAgICB7CisgICAgICAgICAgKndkICs9IHg7CisgICAgICAgICAgeCA9IDA7CisgICAgICAg IH0KKyAgICAgIGlmIChzY3JhdGNoX2dseXBocy0+dHlwZSA9PSBTVFJFVENIX0dMWVBICisgICAg ICAgICAgJiYgIXhfc3RyZXRjaF9jdXJzb3JfcCkKKyAgICAgICAgKndkID0gbWluIChGUkFNRV9D T0xVTU5fV0lEVEggKGYpLCAqd2QpOworICAgICAgLyogRG9uJ3QgbGV0IHRoZSBob2xsb3cgY3Vy c29yIGdseXBoIGRlc2NlbmQgYmVsb3cgdGhlIGdseXBoIHJvdydzCisgICAgICAgICBhc2NlbnQg dmFsdWUsIGxlc3QgdGhlIGhvbGxvdyBjdXJzb3IgbG9va3MgZnVubnkuICAqLworICAgICAgYXNj ZW50ID0gZ2x5cGhfcm93LT5hc2NlbnQ7CisgICAgICBpZiAoZ2x5cGhfcm93LT5hc2NlbnQgPCBz Y3JhdGNoX2dseXBocy0+YXNjZW50KQorICAgICAgICB7CisgICAgICAgICAgeSAtPSBzY3JhdGNo X2dseXBocy0+YXNjZW50IC0gZ2x5cGhfcm93LT5hc2NlbnQ7CisgICAgICAgICAgYXNjZW50ID0g c2NyYXRjaF9nbHlwaHMtPmFzY2VudDsKKyAgICAgICAgfQorICAgICAgLyogSWYgeSBpcyBiZWxv dyB3aW5kb3cgYm90dG9tLCBlbnN1cmUgdGhhdCB3ZSBzdGlsbCBzZWUgYSBjdXJzb3IuCisgICAg ICBBcyB0byBGUkFNRV9MSU5FX0hFSUdIVCB2ZXJzdXMgZ2x5cGhfcm93LT52aXNpYmxlX2hlaWdo dCwgcHJlZmVyIHRoZSBNQVguICovCisgICAgICBoMCA9IG1heCAoRlJBTUVfTElORV9IRUlHSFQg KGYpLCBnbHlwaF9yb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgIGhfdGVtcCA9IG1heCAoaDAs IGFzY2VudCArIHNjcmF0Y2hfZ2x5cGhzLT5kZXNjZW50KTsKKyAgICAgIGgwID0gbWluIChoMCwg YXNjZW50ICsgc2NyYXRjaF9nbHlwaHMtPmRlc2NlbnQpOworICAgICAgeTAgPSBXSU5ET1dfSEVB REVSX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgIGlmICh5IDwgeTApCisgICAgICAgIHsKKyAgICAg ICAgICBoX3RlbXAgPSBtYXggKGhfdGVtcCAtICh5MCAtIHkpICsgMSwgaDApOworICAgICAgICAg IHkgPSB5MCAtIDE7CisgICAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAg IHkwID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpIC0gaDA7CisgICAgICAgICAgaWYgKHkgPiB5 MCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaF90ZW1wICs9IHkgLSB5MDsKKyAgICAg ICAgICAgICAgeSA9IHkwOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAqZnggPSBX SU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB4KTsKKyAgICAgICpmeSA9IFdJTkRPV19U T19GUkFNRV9QSVhFTF9ZICh3LCB5KTsKKyAgICAgICpoID0gaF90ZW1wOworICAgICAgaWYgKGN1 cnNvcl90eXBlID09IEhCQVJfQ1VSU09SKQorICAgICAgICB7CisgICAgICAgICAgaW50IGN1cnNv cl9oZWlnaHQgPSAoY3Vyc29yX3dpZHRoIDwgMSkgPyBscmludCAoMC4yNSAqICpoKSA6IGN1cnNv cl93aWR0aDsKKyAgICAgICAgICBpZiAoY3Vyc29yX2hlaWdodCA+IGdseXBoX3Jvdy0+aGVpZ2h0 KQorICAgICAgICAgICAgY3Vyc29yX2hlaWdodCA9IGdseXBoX3Jvdy0+aGVpZ2h0OworICAgICAg ICAgIGlmICgqaCA+IGN1cnNvcl9oZWlnaHQpCisgICAgICAgICAgICAqZnkgKz0gKmggLSBjdXJz b3JfaGVpZ2h0OworICAgICAgICAgICpoID0gY3Vyc29yX2hlaWdodDsKKyAgICAgICAgfQorICAg IH0KK30KKworLyogUmV0dXJuIHRoZSBzdGFydCBvciBlbmQgcG9zaXRpb24gb2YgdGhlIHJlZ2lv bi4KKyAgIEJFR0lOTklOR1AgbWVhbnMgcmV0dXJuIHRoZSBzdGFydC4KKyAgIElmIHRoZXJlIGlz IG5vIHJlZ2lvbiBhY3RpdmUsIHNpZ25hbCBhbiBlcnJvci4KKyAgIEVYQU1QTEUgKHJlZ2lvbi1i ZWdpbm5pbmcpOiAgcmVnaW9uX2xpbWl0ICgxKQorICAgRVhBTVBMRSAocmVnaW9uLWVuZCk6ICBy ZWdpb25fbGltaXQgKDApICovCisKK3N0YXRpYyBMaXNwX09iamVjdAorbWNfcmVnaW9uX2xpbWl0 IChib29sIGJlZ2lubmluZ3ApCit7CisgIExpc3BfT2JqZWN0IG07CisgIGlmICghTklMUCAoVnRy YW5zaWVudF9tYXJrX21vZGUpCisgICAgICAmJiBOSUxQIChWbWFya19ldmVuX2lmX2luYWN0aXZl KQorICAgICAgJiYgTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1hcmtfYWN0aXZlKSkpCisg ICAgcmV0dXJuIFFuaWw7CisgIG0gPSBGbWFya2VyX3Bvc2l0aW9uIChCVkFSIChjdXJyZW50X2J1 ZmZlciwgbWFyaykpOworICBpZiAoTklMUCAobSkpCisgICAgcmV0dXJuIFFua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X3kgPSB3LT5vdXRwdXRfY3Vyc29yLnk7CisgIGludCBvcG9pbnRf aHBvcyA9IHctPm91dHB1dF9jdXJzb3IuaHBvczsKKyAgaW50IG9wb2ludF92cG9zID0gdy0+b3V0 cHV0X2N1cnNvci52cG9zOworICBMaXNwX09iamVjdCBjaGFyYWN0ZXIgPSAoQ0hBUkFDVEVSUCAo bWFrZV9udW1iZXIgKGdseXBoLT51LmNoKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8g RmNoYXJfdG9fc3RyaW5nIChtYWtlX251bWJlciAoZ2x5cGgtPnUuY2gpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICA6IFFuaWw7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJh bWUpOworICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgQ0hFQ0tfQlVGRkVSIChi dWYpOworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVmKTsKKyAgaW50IHRleHRfYXJl YV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgIGludCBmcmFtZV9j aGFyX3dpZHRoID0gRlJBTUVfQ09MVU1OX1dJRFRIIChmKTsKKyAgYm9vbCBmaWxsX2NvbHVtbl9w ID0gIU5JTFAgKEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7CisgIGludCBmaWxsX2NvbCA9IFhJTlQg KEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7CisgIGludCBmaWxsX2NvbHVtbl94ID0gKGZpbGxfY29s dW1uX3ApCisgICAgICAgICAgICAgICAgICAgICAgPyBmaWxsX2NvbCAqIGZyYW1lX2NoYXJfd2lk dGgKKyAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgIGludCB0ZW1wX3ggPSByZWxhdGl2ZV94 OworICBpbnQgdGVtcF95ID0gcm93LT55OworICBpbnQgdGVtcF9ocG9zID0gZ2x5cGggLSByb3ct PmdseXBoc1tURVhUX0FSRUFdOworICBpbnQgdGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9TIChy b3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgaW50IHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNl X2lkOworICBpbnQgdGVtcF9jaGFycG9zID0gZ2x5cGgtPmNoYXJwb3M7CisKKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgQ0hBUl9HTFlQ SCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKyAgaWYgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGdseXBo LT50eXBlID09IEdMWVBITEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAg ICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTki cEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVz XG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgo cm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAg ICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAg ICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAg ICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDog KFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAg OiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAg ICAgICA6ICctJykpKSwKKyAgICAgICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAg ICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2 X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggPT0gOSkKKyAgICAgICAgICAgPyAiXFx0IgorICAgICAgICAgOiAoIU5J TFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwKQorICAgICAg ICAgICA/ICJcXG4iCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAgICAgICAgID8gIlxccyIKKyAgICAgICAgIDogKCFO SUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAgICAg ICAgICAmJiBnbHlwaC0+dS5jaCAhPSAxMAorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0g MzIpCisgICAgICAgICAgID8gU1NEQVRBIChjaGFyYWN0ZXIpCisgICAgICAgICA6ICJcXD8i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tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVM RVI6CisgICAgeworICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3ggPT0g cmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X2hw b3MgPT0gdGVtcF9ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9p bnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3Bv aW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAg ICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnksIHRlbXBfaHBvcywg dGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmX2gsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaWYgKHRlbXBfeCA8PSB0ZXh0X2Fy ZWFfd2lkdGgKKyAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICBtY19o ZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAor ICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3Jv dW5kLAorICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0 aXZlX3AsCisgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFy cG9zLCByZXN1bHQpOworICAgICAgLyogSXQgaXMgcG9zc2libGUgdG8gdXNlIE1DX0dMWVBIIGFu ZCBhZGp1c3QgdGhlIGZ4IGNvb3JkaW5hdGU7IGhvd2V2ZXIsCisgICAgICB0aGUgbWlkZGxlLWRv dCAvIHNwYWNlIGdseXBoIG9uIGEgd29yZC13cmFwcGVkIGxpbmUgd2lsbCBiZSBvdmVyd3JpdHRl bgorICAgICAgbnVtZXJvdXMgdGltZXMgYW5kIGlzIHVuc2lnaHRseS4gKi8KKyAgICAgIGlmIChn bHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMSkKKyAg ICAgICAgeworICAgICAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAgICAgIG1jX2dl dF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1w X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmX2gsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgICAgIHRlbXBfeCArPSBnbHlwaC0+ cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8PSB0ZXh0X2FyZWFfd2lkdGgp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwg dGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAg ICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAg ICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAg ICA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vbl9yaWdo dF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19W RVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0 X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAg ICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAg ICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAg ICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNf R0xZUEg7CisgICAgICBpbnQgdGVtcF94ID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94 ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgPyBvcG9pbnRfeAorICAgICAgICAg ICAgICAgICAgICA6IHJlbGF0aXZlX3g7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJf QkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAg ICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5 LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVt cF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZf ZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZngg PSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBtY19o ZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAor ICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5k LAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9w LAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1 bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAg ICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAg ICAgICAg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vaW50X3ggKyBnbHlwaC0+cGl4ZWxfd2lk dGggPj0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgaW50IGZsYXZvciA9IChjdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElD QUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5feCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAg ICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKCFO SUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVy KSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB0ZW1wX3kKKyAgICAgICAg ICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7Cisg ICAgICBpbnQgdGVtcF94ID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICYmIGZpbGxfY29sdW1uX3ggPiBy ZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICA/IGZpbGxfY29sdW1uX3gKKyAgICAgICAg ICAgICAgICAgICAgOiByZWxhdGl2ZV94OworICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFS X0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAg ICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngsIF9m eSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRl bXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAm X2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4 ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgZmlsbF9jb2x1bW5feCk7CisgICA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GVycl9wKQorICAgICAgZnByaW50ZiAo c3RkZXJyLAorICAgICAgICAiXG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAw eCUwNnggJTRkICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJXNcbiIsCisgICAgICAg IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJl YV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gs CisgICAgICAgICdTJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQ IChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGds eXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5 cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykp KSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5 cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGds eXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBo LT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAg IlxcUyIpOworICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgIC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G9zID09IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93 ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZf ZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1w X2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9o LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIGlmICh0ZW1wX3ggPD0g dGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAg ICAgd2hpbGUgKHRlbXBfeCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAg ICAgICAgeworICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5 LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAg IG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAg ICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhfVEFCLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7Cisg ICAgICAgICAgICB0ZW1wX3ggKz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICB9CisgICAg ICAgIGVsc2UgaWYgKHRlbXBfeCArIGdseXBoLT5waXhlbF93aWR0aCA8IHRleHRfYXJlYV93aWR0 aAorICAgICAgICAgICAgICAgICAmJiByZWFsX2Zha2VfY3Vyc29yX3AKKyAgICAgICAgICAgICAg ICAgJiYgZ2x5cGgtPnBpeGVsX3dpZHRoID4gZnJhbWVfY2hhcl93aWR0aCkKKyAgICAgICAgICB7 CisgICAgICAgICAgICB0ZW1wX3ggKz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIHdo aWxlICh0ZW1wX3ggPCByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ks IGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIC0x LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhfVEFCLCB0ZW1wX2NoYXJw b3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7 CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisgICAgICAvKiBJdCBpcyBwb3NzaWJsZSB0 byB1c2UgTUNfR0xZUEggYW5kIGFkanVzdCB0aGUgZnggY29vcmRpbmF0ZTsgaG93ZXZlciwKKyAg ICAgIHRoZSBtaWRkbGUtZG90IC8gc3BhY2UgZ2x5cGggb24gYSB3b3JkLXdyYXBwZWQgbGluZSB3 aWxsIGJlIG92ZXJ3cml0dGVuCisgICAgICBudW1lcm91cyB0aW1lcyBhbmQgaXMgdW5zaWdodGx5 LiAqLworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVz ZWRbYXJlYV0gLSAxKQorICAgICAgICB7CisgICAgICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7 CisgICAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwg Jl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5 LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgICAg LyogdGVtcF94ICs9IGdseXBoLT5waXhlbF93aWR0aDsgKi8KKyAgICAgICAgICB3aGlsZSAodGVt cF94IDw9IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNf aGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywK KyAgICAgICAgICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg Zm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBf ZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwg TUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHRlbXBf eCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBi cmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tL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genZfcCA9IChnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAg ICAgICAgICYmIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPT0gWlYpOworICAgICAgYm9v bCBjdXJzb3JfaW5fZnJpbmdlX3AgPSBvcG9pbnRfeCArIGdseXBoLT5waXhlbF93aWR0aCA+PSB0 ZXh0X2FyZWFfd2lkdGg7CisgICAgICBpbnQgZmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2VfcAor ICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiBy b3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJf QkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAg ICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAg ICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAg ID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAg ICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1D X0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAg ICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEhfVEFCOwor ICAgICAgaW50IHRlbXBfeCA9IG9wb2ludF94OworICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxf QkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisg ICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngs IF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3cs IHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95 LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50 IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgb3BvaW50X3gpOworICAgICAg bWNfaGVscGVyICh3LCB0ZW1wX3gsIGZ4LCB0ZW1wX3ksIC0xLCB0ZW1wX2hwb3MsIHRlbXBfdnBv cywKKyAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdy b3VuZCwKKyAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3Rp dmVfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHRlbXBfY2hhcnBvcywg cmVzdWx0KTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0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dseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisg ICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7 CisgICAgICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA9IG9wb2ludF94ICsgZ2x5cGgtPnBpeGVs X3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2lu X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0 X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVwor ICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAg ICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZF UlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRf cAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAg ICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlw aCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAg ICAgICAgICAgICAgICAgICYmIGZpbGxfY29sdW1uX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAg ICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICh6dl9wKQor ICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6 ICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgJiYg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9y dWxlcikpCisgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0gdGVtcF95CisgICAg ICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKQorICAgICAgICAg ICAgICAgICAgICAgPyBNQ19HTFlQSF9UQUIKKyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBI X1RBQjsKKyAgICAgIGludCB0ZW1wX3ggPSBmaWxsX2NvbHVtbl94OworICAgICAgaWYgKGZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBmbGF2b3IgPT0g TUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJU SUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAg ICAgIGludCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21l dHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2Qp OworICAgICAgaW50IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgZmlsbF9j b2x1bW5feCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRl bXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vy c29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRl bXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZv ciwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorICB9CisgIH0K Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgRU5EOiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAg ICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChn bHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAg ICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTki cEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVj XG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgo cm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAg ICByZWxhdGl2ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAg ICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6 IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAg IDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAg ICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVu c2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAg ICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9s aW5lX3AsCisgICAgICAgIGdseXBoLT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52 cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworICBzd2l0Y2gg KGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gK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FycG9zLCByZXN1 bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAg ICAgICAgICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAgSU1BR0VfR0xZUEggICAgICAg ICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgRklM TF9DT0xVTU46CisgICAgeworICAgICAgY3Vyc29yX3R5cGUgPSBIT0xMT1dfQk9YX0NVUlNPUjsK KyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0 ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9p ZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBILCB0ZW1w X2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9CisgIH0KKyAgfQorLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5E OiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEJFR0lOOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAg ICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50 eXBlID09IENPTVBPU0lURV9HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAg IHsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAgICJcbiAlNSJwRCJkLyUtNWQg JTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisgICAgICAgICAgZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdLAorICAgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6 IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICAg JysnLAorICAgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAgIChCVUZGRVJQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICA/ICdCJworICAgICAgICAgICA6IChTVFJJTkdQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgICA6IChOSUxQIChn bHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgICA6 ICctJykpKSwKKyAgICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICAgKHVuc2ln bmVkIGludCkgZ2x5cGgtPnUuY21wLmlkKTsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0 ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgICBnbHlw aC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsK KyAgICAgIGlmIChnbHlwaC0+dS5jbXAuYXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRl cnIsICIgJTVkICU0ZCAgJTNkICAlM2QgJXMgLiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAg ICAgICAgICAgIGdseXBoLT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBn bHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBo LT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNtcC50byk7CisgICAgICAgIGVsc2UKKyAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOworICAgICAgfQorICBzd2l0Y2ggKGFjdGlv bl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAg ICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAg ICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJT T1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCAtMSwg dGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwg Y3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcs IHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1D X0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFM X1JVTEVSOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAg IGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0aXZlX3gKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9ocG9zID09IHRlbXBfaHBvcwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBf dnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1 cnNvcl9nZW9tZXRyeSAodyw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fcGh5c19jdXJzb3JfZ2Vv bWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgdGVtcF95LCAmZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCAmX3dkKTsKKyAgICAgICAgICB0ZW1wX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAg ICAgICAgIHdoaWxlICh0ZW1wX3ggPD0gdGV4dF9hcmVhX3dpZHRoKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBf aHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlw ZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1j X2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAg ICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSExFU1MsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAg ICAgICAgICAgICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9Cisg ICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwor LyogICAgICAgICAgICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVI6ICBDT01QT1NJVEVfR0xZ UEggICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0t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PnBpeGVsX3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vy c29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29u X3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAg ICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/ IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3Jf aW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25f cmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAg ICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICA6 IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQor ICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAg ICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkK KyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAg OiBNQ19HTFlQSDsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FS Uk9XCisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAg ICAgICAgICB8fC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X2Fy ZWFfd2lkdGg7CisgICAgICBpbnQgZmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAg ICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAg ICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNv bnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NM QVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAg ICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAg ICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf VkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAm JiBmaWxsX2NvbHVtbl94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf R0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAg ICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIs IGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAg ICAgICAgICAgICAgICYmIG9wb2ludF95ID09IHRlbXBfeQorICAgICAgICAgICAgICAgICAgICAg ICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcykKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf R0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChmbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09 IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVS VElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7Cisg ICAgICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9t ZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHRlbXBfeSwgJl9meSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICZoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dk KTsKKyAgICAgIGludCBmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIGZpbGxf Y29sdW1uX3gpOworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIGZ4LCB0ZW1wX3ksIC0xLCB0 ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3R5cGUsIGN1 cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0 ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2 b3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VhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNl ZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRp dmVfeCwKKyAgICAgICAgJ1gnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJV RkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5H UCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6ICctJykp LAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAor ICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94 X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnUueHdpZGdldCwKKyAgICAgICAgZ2x5cGgtPngsIGds eXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICIt LSIsCisgICAgICAgICcuJyk7CisjZW5kaWYKKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgewor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJ UExFX0NVUlNPUlM6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgTVVMVElQTEVfQ1VSU09SUzoKKyAgICB7Cisg ICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVt cF92cG9zLAorICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg Zm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQp LCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9j aGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIEhPUklaT05UQUxfUlVMRVI6ICBYV0lE R0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAq LworICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBib29sIHJlYWxfZmFr ZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSB0ZW1wX2hwb3MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IGdseXBoLT55CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAg aW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkg KHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7Cisg ICAgICBpZiAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zh a2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBm eSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90 eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgbWNfYmdf bHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICBtaW5p bWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAvKiBJdCBpcyBw b3NzaWJsZSB0byB1c2UgTUNfR0xZUEggYW5kIGFkanVzdCB0aGUgZnggY29vcmRpbmF0ZTsgaG93 ZXZlciwKKyAgICAgIHRoZSBtaWRkbGUtZG90IC8gc3BhY2UgZ2x5cGggb24gYSB3b3JkLXdyYXBw ZWQgbGluZSB3aWxsIGJlIG92ZXJ3cml0dGVuCisgICAgICBudW1lcm91cyB0aW1lcyBhbmQgaXMg dW5zaWdodGx5LiAqLworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9 PSByb3ctPnVzZWRbYXJlYV0gLSAxKQorICAgICAgICB7CisgICAgICAgICAgaW50IF9meCwgZnks IF9oLCBfd2Q7CisgICAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3cs IHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRl bXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7Cisg ICAgICAgICAgdGVtcF94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAo dGVtcF94IDw9IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg bWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRl bXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxf cCwgTUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHRl bXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAg ICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAg ICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFhXSURHRVRfR0xZUEggICAgICAgICAgICAg ICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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93aWR0aCA+ PSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICBpbnQgZmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAg ICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAm JiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAg ICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAg ICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ct PmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAg ICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/ IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7Cisg ICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAg IHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklO R0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5 c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNv cl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhF TF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBf eSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jf dHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19s c2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFs X3AsIGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgRklM TF9DT0xVTU46ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0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mdlX3AKKyAgICAgICAgICAgICAgICAgICAg JiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf VkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2lu X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAg ICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAg ICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYm ICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgor ICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSBy b3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5f eCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBI TEVTUworICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkK KyAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAm JiBvcG9pbnRfeSA9PSB0ZW1wX3kKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBv cyA9PSB0ZW1wX3Zwb3MpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAg ICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwg X2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywg dGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ks ICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQg ZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBmaWxsX2NvbHVtbl94KTsKKyAg ICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1w X3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZv cmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwg YWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgZmxhdm9yLCB0ZW1wX2NoYXJw b3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9CisgIH0KKyAgfQorLyogLS0t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nNvcl9nbHlwaC0+ ZmFjZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEgsIG9w b2ludF9wdCwgJnJlc3VsdCk7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAg ICAgICAgICAgICAgICAgRFJBVyAvIFJFQ09SRCBNVUxUSVBMRSBDVVJTT1JTICAgICAgICAgICAg ICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIGZvciAodmxpc3QgPSBC VkFSIChiLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpOworICAgICAgIENPTlNQICh2bGlzdCk7Cisg ICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgeworICAgICAgc3BlY3MgPSBYQ0FSICh2 bGlzdCk7CisgICAgICBwb3NpbnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIHNwZWNz KSk7CisgICAgICBsaXNwX3R5cGUgPSBGbnRoIChtYWtlX251bWJlciAoMSksIHNwZWNzKTsKKyAg ICAgIGlmIChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNw X3RvX2N1cnNvcl90eXBlIChYQ0FSIChsaXNwX3R5cGUpKTsKKyAgICAgICAgZWxzZQorICAgICAg ICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAobGlzcF90eXBlKTsKKyAg ICAgIGlmIChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgY3Vyc29yX3dpZHRoID0gWElOVCAo WENBUiAoWENEUiAobGlzcF90eXBlKSkpOworICAgICAgICBlbHNlCisgICAgICAgICAgY3Vyc29y X3dpZHRoID0gMTsKKyAgICAgIGZvcmVncm91bmQgPSBGbnRoIChtYWtlX251bWJlciAoMiksIHNw ZWNzKTsKKyAgICAgIGlmIChTVFJJTkdQIChmb3JlZ3JvdW5kKSkKKyAgICAgICAgZm9yZWdyb3Vu ZCA9IG1jX2NvbG9yX3ZlY3Rvcl9jYWxjICh3LCBmb3JlZ3JvdW5kKTsKKyAgICAgIHN0cnVjdCBn bHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgaW50IHJvd19z dGFydCwgcm93X2VuZCwgd2luZG93X3Jvd19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgICAgICBp bnQgaTsKKyAgICAgIExpc3BfT2JqZWN0IHRlbXAgPSBRbmlsOworICAgICAgTGlzcF9PYmplY3Qg dnNwZWNzID0gUW5pbDsKKyAgICAgIGZvciAoaSA9IDA7IGkgPCBtYXRyaXgtPm5yb3dzOyArK2kp CisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9X IChtYXRyaXgsIGkpOworICAgICAgICAgIHJvd19zdGFydCA9IE1BVFJJWF9ST1dfU1RBUlRfQ0hB UlBPUyAocm93KTsKKyAgICAgICAgICBpZiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgaSA9 PSAxKQorICAgICAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0g MCkpCisgICAgICAgICAgICB3aW5kb3dfcm93X3N0YXJ0ID0gcm93X3N0YXJ0OworICAgICAgICAg IGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHdpbmRv d19yb3dfZW5kID0gcm93X2VuZDsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9 CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICByb3df ZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KTsKKyAgICAgICAgICAgICAgICB0ZW1w ID0gbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIG1ha2VfbnVtYmVyIChpKSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChyb3dfc3Rh cnQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFr ZV9udW1iZXIgKHJvd19lbmQpKTsKKyAgICAgICAgICAgICAgICB2c3BlY3MgPSBGY29ucyAodGVt cCwgdnNwZWNzKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocG9zaW50 ID49IHdpbmRvd19yb3dfc3RhcnQKKyAgICAgICAgICAmJiBwb3NpbnQgPD0gd2luZG93X3Jvd19l bmQpCisgICAgICAgIHsKKyAgICAgICAgTGlzcF9PYmplY3Qgdmxpc3Q7CisgICAgICAgIGZvciAo dmxpc3QgPSBGbnJldmVyc2UgKHZzcGVjcyk7CisgICAgICAgICAgICAgQ09OU1AgKHZsaXN0KTsK KyAgICAgICAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBpbnQgY291bnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIFhDQVIgKHZsaXN0 KSkpOworICAgICAgICAgICAgaW50IHBvc19zdGFydCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICgxKSwgWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgICBpbnQgcG9zX2VuZCA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICgyKSwgWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgY291bnQpOwor ICAgICAgICAgICAgaW50IGFyZWE7CisgICAgICAgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7Cisg ICAgICAgICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVB OyArK2FyZWEpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGgg KmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBo ICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAgICAgICBp ZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFy cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgICAgICAg IGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2Vu ZCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbmNvdW50ICglZCkgfCB3 aW5kb3dfcm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2VuZCAoJWQvJWQpXG5cCis9 PT09PT09PT09PT09PT09PT09PT09PT09PT09IE1VTFRJUExFIENVUlNPUlMgPT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3Mg TyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBaViBDXG4iLAorY291 bnQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nfc3RhcnQsIHBvc19lbmQp OworICAgICAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVf Zm9ybWF0ID4gMCAmJiBjb3VudCA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVh ZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoZ2x5cGgt PmNoYXJwb3MgPT0gcG9zaW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVGhlIHNw YWNlIGFwcGVuZGVkIHRvIGEgcm93IGVuZGluZyB3aXRoIGEgbmV3IGxpbmUKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBkb2VzIG5vdCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDAp IHRoYXQgd2UgY2FuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlIGZvciB0aGlzIHBh cnRpY3VsYXIgYXBwbGljYXRpb24uICBXaGVuIHRoZXJlIGlzIGEKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IHRoYXQgYXNzaWducyBhIHZp c2libGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaCB0byBhIG5ldyBsaW5lLCB0 aGVyZSBpcyBubyBwcm9ibGVtIGJlY2F1c2UgdGhhdAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBjYW4gdXNlLiAgV2hlbgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywg d2UgdXNlIHRoZSBmb2xsb3dpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXN0OiAg dGhlIGFwcGVuZGVkIHNwYWNlIGhhcyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbGVzcyB0aGFuIHRoZSBlbmQgb2YgdGhlIG1hdHJpeCByb3cuICov CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHBvc2ludCA9PSBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpIC0gMSkpCisg ICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21f eSAodykpCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAg Y3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgcG9zaW50KTsKKyAgICAgICAgICAg ICAgICAgICAgICAgIGlmIChOSUxQIChmb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJlZCAqLworICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fcCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGZvcmVncm91bmQgPSBvZGRfY29sb3JfdmVjdG9yOworICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8qIHllbGxvdyAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAg IGlmIChjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhZmlsbF9jb2x1bW5fcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVn cm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAv KiByZWQgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAy ICE9IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5fcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2Nv bCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQgPSBvZGRfY29sb3Jf dmVjdG9yOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHllbGxvdyAqLworICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCA9IGV2ZW5fY29sb3JfdmVjdG9yOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgIC8qIGdyZWVuICovCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgaWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgY3VycmVudF9jb2wgPiBmaWxsX2NvbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGZvcmVncm91bmQgPSBmaWxsX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgbWNfZW5naW5lIChyb3csIGdseXBoLCBhcmVh LCByZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LCBwb3Np bnQsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1VTFRJUExFX0NVUlNP UlMsICZyZXN1bHQpOworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1jX3N0ZGVycl9w KQorICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJl YSwgcmVsYXRpdmVfeCk7CisgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgt PnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAg ICAgICAgfQorICAgICAgICB9CisgICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1 cGRhdGVfZW5kIChYRlJBTUUgKHctPmZyYW1lKSk7CisvKiBgdy0+bXVsdGlwbGVfY3Vyc29yc19j YWNoZScgaXMgc2V0IGZvciB0aGUgd2luZG93LCBub3QgYnVmZmVyK3dpbmRvdyAtLSBpLmUuLCBh bGwgYnVmZmVycyBhcHBlYXJpbmcKK2luIHRoZSBzYW1lIHdpbmRvdyB2aWEgYHN3aXRjaC10by1i dWZmZXInIHdpbGwgaGF2ZSBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZScuICBUaGlzIGJlaGF2 aW9yCitpcyBjb25zaXN0ZW50IHdpdGggZnVuY3Rpb25zIHN1Y2ggYXMgYHNldC13aW5kb3ctZGlz cGxheS10YWJsZScuICBXZSBkZWFsIHdpdGggdGhpcyBpbgorYG5zdGVybS5tJyAvIGB3MzJ0ZXJt LmMnIC8gYHh0ZXJtLmMnIGJ5IGNvbXBhcmluZyBgdy0+Y29udGVudHMnIHRvIHRoZSB2YWx1ZSBv ZiB0aGUgYGJ1ZicKK3N0b3JlZCBpbiBgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZScuICovCisg IGlmICghTklMUCAocmVzdWx0KSkKKyAgICB3c2V0X211bHRpcGxlX2N1cnNvcnNfY2FjaGUgKHcs IGxpc3RuIChDT05TVFlQRV9IRUFQLCAzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgRnJldmVyc2UgKHJlc3VsdCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBG Y29ucyAod2luZG93LCBRbmlsKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZj b25zICh3LT5jb250ZW50cywgUW5pbCkpKTsKKyAgdy0+bWMuZHJhd19tdWx0aXBsZV9jdXJzb3Jz ID0gZmFsc2U7CisgIGlmIChvbGRfYnVmZmVyKQorICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9s ZF9idWZmZXIpOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBj cHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7 CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3Vz ZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZHJhd19tdWx0aXBsZV9jdXJzb3JzOiAg VElNRSAoJXMpIiwgYnVmX3RpbWUpOworI2VuZGlmCisqLworfQorCit2b2lkCittY19kcmF3X2Ny b3NzaGFpcnMgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgYWN0aXZlX3AsIGJvb2wgbWluaW1hbF9w KQoreworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBjbG9ja190IHN0YXJ0LCBlbmQ7CisgIGRv dWJsZSBjcHVfdGltZV91c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9CVUZTSVpFX0JPVU5EXTsK KyAgc3RhcnQgPSBjbG9jaygpOworI2VuZGlmCisqLworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlm ICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAg ICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisg ICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93 LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5n ICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRv d19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJhd19jcm9zc2hhaXJzICgl cyk6ICBhY3RpdmVfcCAoJWQpIHwgbWluaW1hbF9wICglZClcbiIsCisgICAgICAgICAgICAgICAg ICAgICAgICB3aW5kb3dfY2hhciwgYWN0aXZlX3AsIG1pbmltYWxfcCk7CisgICAgfQorI2VuZGlm CisgIGJvb2wgbWNfc3RkZXJyX3AgPSAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3N0 ZGVycikpOworICBwdHJkaWZmX3Qgb3BvaW50X3B0ID0gKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRf d2luZG93KSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gUFQKKyAgICAgICAgICAgICAgICAg ICAgICAgIDogWElOVCAoRm1hcmtlcl9wb3NpdGlvbiAody0+cG9pbnRtKSk7CisgIGludCBvcG9p bnRfeCA9IHctPnBoeXNfY3Vyc29yLng7CisgIGludCBvcG9pbnRfeSA9IHctPnBoeXNfY3Vyc29y Lnk7CisgIGludCBvcG9pbnRfaHBvcyA9IHctPnBoeXNfY3Vyc29yLmhwb3M7CisgIGludCBvcG9p bnRfdnBvcyA9IHctP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NlIDog dHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVy KQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVy bjsKKyAgICB9CisgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5jYCBjb250YWlucyB0aGUg Zm9sbG93aW5nIHRlc3RzLAorICBlYXNzZXJ0IChtYXRyaXggJiYgbWF0cml4LT5yb3dzKTsKKyAg ZWFzc2VydCAocm93ID49IDAgJiYgcm93IDwgbWF0cml4LT5ucm93cyk7ICovCisgIGJvb2wgYmFy Zl9jcmFzaF90aHJlZSA9ICh3LT5jdXJyZW50X21hdHJpeCAmJiB3LT5jdXJyZW50X21hdHJpeC0+ cm93cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX3RocmVlKQorICAgIHsKKyAg ICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVm ZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGJvb2wgYmFyZl9jcmFzaF9mb3VyID0gKG9w b2ludF92cG9zID49IDAgJiYgb3BvaW50X3Zwb3MgPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3Mp ID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9mb3VyKQorICAgIHsKKyAgICAgIGlm IChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsK KyAgICAgIHJldHVybjsKKyAgICB9CisgIGlmICghQlVGRkVSUCAoYnVmKSkKKyAgICB7CisgICAg ICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZl cik7CisgICAgICByZXR1cm47CisgICAgfQorICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWly cykpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2lu dGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGlmIChOSUxQIChC VkFSIChiLCBjcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXIpKQorICAgICAgJiYgTklMUCAoQlZB UiAoYiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpKQorICAgIHsKKyAgICAgIGlmIChvbGRf YnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAg IHJldHVybjsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEJFR0lOIEpPVVJORVkgLi4uCisqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBp bnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAg Ym9vbCBjdXJzb3JfaW5fZnJpbmdlX3AgPSB3LT5vdXRwdXRfY3Vyc29yLnggKyBmcmFtZV9jaGFy X3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93 OworICBpbnQgY3Vyc29yX3dpZHRoID0gMTsKKyAgcHRyZGlmZl90IHBvc2ludCA9IC0xOworICBw dHJkaWZmX3QgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgb3BvaW50X3B0KTsK KyAgYm9vbCBmaWxsX2NvbHVtbl9wID0gIU5JTFAgKEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7Cisg IGludCBmaWxsX2NvbCA9IFhJTlQgKEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7CisgIGludCBmaWxs X2NvbHVtbl94ID0gKGZpbGxfY29sdW1uX3ApCisgICAgICAgICAgICAgICAgICAgICAgPyBmaWxs X2NvbCAqIGZyYW1lX2NoYXJfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgIExp c3BfT2JqZWN0IHJlc3VsdCA9IFFuaWw7CisgIGludCBmbGF2b3I7CisgIC8qIFZhbHVlcyBmb3Ig dGhlIGN1cnJlbnQgY29sdW1uIG9mIHRoZSB2ZXJ0aWNhbCBsaW5lLiAqLworICBMaXNwX09iamVj dCBmb3JlZ3JvdW5kID0gRm1ha2VfdmVjdG9yIChtYWtlX251bWJlciAoMyksIFFuaWwpOworICBl bnVtIGZhY2VfaWQgZmFjZV9pZDsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBDT0xPUiBPRiBDUk9TU0hBSVJTCisqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKyAgZW51bSBmYWNlX2lkIGV2ZW5fZmFjZV9pZCA9CisgICAgKCFhY3RpdmVfcAor ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX2lu YWN0aXZlX3dpbmRvd3MpKSkKKyAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLWV2ZW4tbnVtYmVyZWQtY29sdW1uLWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAgIC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bnRfY29sIDw9IGZpbGxfY29sKQorICAgIGZvcmVn cm91bmQgPSBvZGRfY29sb3JfdmVjdG9yOworICAvKiB5ZWxsb3cgKi8KKyAgaWYgKGN1cnJlbnRf Y29sICUgMiA9PSAwCisgICAgICAmJiBmaWxsX2NvbHVtbl9wCisgICAgICAmJiBjdXJyZW50X2Nv bCA8PSBmaWxsX2NvbCkKKyAgICBmb3JlZ3JvdW5kID0gZXZlbl9jb2xvcl92ZWN0b3I7CisgIC8q IGdyZWVuICovCisgIGlmIChmaWxsX2NvbHVtbl9wCisgICAgICAmJiBjdXJyZW50X2NvbCA+IGZp bGxfY29sKQorICAgIGZvcmVncm91bmQgPSBmaWxsX2NvbG9yX3ZlY3RvcjsKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgRVJBU0UgVEhFIFJFQUwg Q1VSU09SCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGB3LT5waHlzX2N1cnNvci54L3kv aHBvcy92cG9zYCBhcmUgaW5jb3JyZWN0IGFmdGVyIGV2YWx1YXRpbmcgKHNjcm9sbC1sZWZ0IDEp CithIGNvdXBsZSBvZiB0aW1lcy4gIFJlZGlzcGxheSBlcmFzZXMgdGhlIHJlYWwgY3Vyc29yIGFs bW9zdCBpbW1lZGlhdGVseSBhZnRlcgorYG1jX2RyYXdfY3Jvc3NoYWlycycgcnVucyBpdHMgY291 cnNlIC0tIGFsbW9zdCB0b28gcXVpY2tseSB0byBzZWUgaXQgaGFwcGVuaW5nLgorVGhlIGNoYXJh Y3RlciB3aGVyZSBFbWFjcyB0aGlua3MgdGhlIHJlYWwgY3Vyc29yIGlzIGxvY2F0ZWQgZ2V0cyBy ZWRyYXduLCBhbGJpZXQKK3dpdG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jdXJzb3IudnBvcyA9IHctPm91 dHB1dF9jdXJzb3IudnBvczsKKyAgICB9CisgIGlmICghbWluaW1hbF9wKQorICAgIGVyYXNlX3Bo eXNfY3Vyc29yICh3KTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAg ICAgICAgICAgICBSRVBMQUNFIFRIRSBSRUFMIENVUlNPUgorKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisgIGdseXBoX3JvdyA9IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCBvcG9pbnRf dnBvcyk7CisgIGlmICghY3Vyc29yX2luX2ZyaW5nZV9wKQorICAgIGZsYXZvciA9IE1DX0dMWVBI OworICAgIC8qIFRoaXMgY29uZGl0aW9uIHByb2JhYmx5IGRvZXMgbm90IGV4aXN0IGZvciB0aGUg cmVhbCBmYWtlIGN1cnNvci4gKi8KKyAgICBlbHNlIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAg ICAgICAgICAgICAmJiBnbHlwaF9yb3ctPmNvbnRpbnVlZF9wKQorICAgICAgZmxhdm9yID0gTUNf UElMQ1JPVzsKKyAgICAgIGVsc2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAg ICAgJiYgZ2x5cGhfcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgZmxhdm9yID0g TUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVzsKKyAgICAgICAgZWxzZSBpZiAoY3Vyc29y X2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICYmICFnbHlwaF9yb3ctPmNvbnRpbnVlZF9w CisgICAgICAgICAgICAgICAgICYmICFnbHlwaF9yb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQor ICAgICAgICAgIGZsYXZvciA9IE1DX0hPTExPV19SRUNUQU5HTEU7CisgIGZhY2VfaWQgPSAocmVh bF9waHlzX2N1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgICAgICAgICAgICA/IERFRkFVTFRfRkFD RV9JRAorICAgICAgICAgICAgICA6IHJlYWxfcGh5c19jdXJzb3JfZ2x5cGgtPmZhY2VfaWQ7Cisg IGludCBvcG9pbnRfZnggPSAtMTsKKyAgaW50IG9wb2ludF9meSA9IC0xOworICBpbnQgb3BvaW50 X2ggPSAtMTsKKyAgLyogRklYTUU6ICBQdXQgaW4gc29tZSBjb2RlIHRvIGRlZmF1bHQgdG8gSE9M TE9XX0JPWF9DVVJTT1IgaWYgdGhlIHVzZXIgaGFzCisgIHVud2l0dGluZ2x5IGNvbWUgdXAgd2l0 aCBzb21lIHVuYWNjZXB0YWJsZSBmb3JtIG9mIHVucmVjb2duaXplZCBjdXJzb3IgdHlwZS4gKi8K KyAgTGlzcF9PYmplY3QgY3Vyc29yX2xpc3BfdHlwZSA9IEJWQVIgKGIsIG1jX3JlYWxfZmFrZV9j dXJzb3IpOworICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIHRlbXBfY3Vyc29yX3R5cGUgPSAoQ09O U1AgKGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBtY19saXNwX3RvX2N1cnNvcl90eXBlIChYQ0FSIChjdXJzb3JfbGlzcF90 eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNf bGlzcF90b19jdXJzb3JfdHlwZSAoY3Vyc29yX2xpc3BfdHlwZSk7CisgIGlmIChmbGF2b3IgPT0g TUNfUElMQ1JPVworICAgICAgfHwgZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRf QVJST1cKKyAgICAgIHx8IGZsYXZvciA9PSBNQ19IT0xM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CBn bHlwaF9yb3csIG9wb2ludF94LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG9wb2ludF95LCAmb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywgb3BvaW50X3Zw b3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9oLCBIQkFS X0NVUlNPUiwgaW5pdGlhbF9jdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgbWNfaGVscGVyICh3 LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9pbnRfeSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywK KyAgICAgICAgICAgICAgICAgb3BvaW50X3Zwb3MsIG9wb2ludF9oLCBIQkFSX0NVUlNPUiwgY3Vy c29yX3dpZHRoLCBjdXJzb3JfZmcsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgZmFj ZV9pZCksIGFjdGl2ZV9wLCBtaW5pbWFsX3AsIGZsYXZvciwKKyAgICAgICAgICAgICAgICAgb3Bv aW50X3B0LCAmcmVzdWx0KTsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgpCisgICAgICAg IG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgZ2x5cGhfcm93LCBvcG9pbnRfeCwgJm9w b2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcG9pbnRfeSwg Jm9wb2ludF9meSwgb3BvaW50X2hwb3MsIG9wb2ludF92cG9zLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICZvcG9pbnRfaCwgQkFSX0NVUlNPUiwgaW5pdGlhbF9jdXJzb3Jf d2lkdGgsICZfd2QpOworICAgICAgbWNfaGVscGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBv cG9pbnRfeSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywKKyAgICAgICAgICAgICAgICAgb3BvaW50 X3Zwb3MsIG9wb2ludF9oLCBCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9mZywKKyAg ICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCBmYWNlX2lkKSwgYWN0aXZlX3AsIG1pbmltYWxf cCwgZmxhdm9yLAorICAgICAgICAgICAgICAgICBvcG9pbnRfcHQsICZyZXN1bHQpOworICAgIH0K KyAgICBlbHNlIGlmICghbWluaW1hbF9wKQorICAgICAgeworICAgICAgICBpbnQgX3dkOworICAg ICAgICBpZiAoZmxhdm9yID09IE1DX0dMWVBIKQorICAgICAgICAgIG1jX2dldF9waHlzX2N1cnNv cl9nZW9tZXRyeSAodywgZ2x5cGhfcm93LCBvcG9pbnRfeCwgJm9wb2ludF9meCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wb2ludF95LCAmb3BvaW50X2Z5LCBvcG9p bnRfaHBvcywgb3BvaW50X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmb3BvaW50X2gsIHRlbXBfY3Vyc29yX3R5cGUsIGluaXRpYWxfY3Vyc29yX3dpZHRoLCAm X3dkKTsKKyAgICAgICAgbWNfaGVscGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9pbnRf eSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywKKyAgICAgICAgICAgICAgICAgICBvcG9pbnRfdnBv cywgb3BvaW50X2gsIHRlbXBfY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAg ICAgICAgICBjdXJzb3JfZmcsIG1jX2JnX2xzbCAodywgZmFjZV9pZCksIGFjdGl2ZV9wLCBtaW5p bWFsX3AsCisgICAgICAgICAgICAgICAgICAgZmxhdm9yLCBvcG9pbnRfcHQsICZyZXN1bHQpOwor ICAgICAgfQorICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc19ob3Jpem9udGFsX3J1bGVy KSkpCisgICAgZ290byB2ZXJ0aWNhbF9ydWxlcjsKKyAgICBlbHNlCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioKKyAgICAgICAgICAgICAgICBIT1JJWk9OVEFMIFJVTEVSOiAgRklSU1QgWCA9PiBF T0wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kCisgICAgICAgSE9SSVpPTlRB TCBSVUxFUjogIERSQVcgRkxPQVRJTkcgR0xZUEhMRVNTIExJTkUgKEVPTCBUTyBGUklOR0UpCisq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3BvaW50X3Zwb3MpOworICAgICAg aW50IGFyZWE7CisgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICBmb3IgKGFyZWEgPSBM RUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgIHsKKyAg ICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAg ICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAg ICAgICAgICAvKiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAgKi8KKyAgICAgICAgICBp ZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFy cG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgIGlmIChtY19zdGRl cnJfcAorICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgIGZw cmludGYgKHN0ZGVyciwKKyJcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT0gSE9SSVpPTlRB TCBSVUxFUiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90 YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQ T1MgVlBPUyBaViBDXG4iKTsKKyAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsr Z2x5cGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2VuZ2luZSAocm93LCBnbHlw aCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICB3LCBwb3NpbnQs IEhCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLAorICAgICAg ICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgSE9SSVpPTlRBTF9SVUxFUiwgJnJlc3VsdCk7 CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAg ICAgICAgfQorICAgICAgICB9CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAg ICAgICAgIFZFUlRJQ0FMIFJVTEVSOiAgQ09NQklOQVRJT04gT0YgR0xZUEggJiBHTFlQSExFU1Mg Q1VSU09SUworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIHZlcnRpY2FsX3J1bGVyOgorICBp ZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpCisgICAgICB8fCBm aWxsX2NvbHVtbl90cnVtcHNfcCkKKyAgICBnb3RvIGNyb3NzaGFpcnNfZmluaXNoOworICAgIGVs c2UKKyAgICAgIHsKKyAgICAgICAgaW50IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJTkRPV19IRUFE RVJfTElORV9IRUlHSFQgKHcpOworICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgg PSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwgd2lu ZG93X3Jvd19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgICAgICAgIGludCBpOworICAgICAgICBM aXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5p bDsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICAgICAg ICB7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRy aXgsIGkpOworICAgICAgICAgICAgcm93X3N0YXJ0ID0gTUFUUklYX1JPV19TVEFSVF9DSEFSUE9T IChyb3cpOworICAgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkgPT0g MSkKKyAgICAgICAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0g MCkpCisgICAgICAgICAgICAgIHdpbmRvd19yb3dfc3RhcnQgPSByb3dfc3RhcnQ7CisgICAgICAg ICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgd2luZG93X3Jvd19lbmQgPSByb3dfZW5kOworICAgICAgICAgICAgICAgIGJyZWFrOworICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICByb3dfZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KTsKKyAg ICAgICAgICAgICAgICAgIHRlbXAgPSBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywgbWFrZV9udW1i ZXIgKGkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtYWtlX251bWJlciAocm93X3N0YXJ0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHJvd19lbmQpKTsKKyAgICAgICAgICAg ICAgICAgIHZzcGVjcyA9IEZjb25zICh0ZW1wLCB2c3BlY3MpOworICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICB9CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3IgKHZs aXN0ID0gRm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7Cisg ICAgICAgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAgICAg ICAgaW50IGNvdW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBYQ0FSICh2bGlzdCkp KTsKKyAgICAgICAgICAgIGludCBwb3Nfc3RhcnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAo MSksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQgPSBYSU5UIChGbnRo IChtYWtlX251bWJlciAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgc3RydWN0IGds eXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50KTsKKyAg ICAgICAgICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+Y3VycmVu dF9tYXRyaXgpOworICAgICAgICAgICAgaW50IGFyZWE7CisgICAgICAgICAgICBpbnQgcmVsYXRp dmVfeCA9IDA7CisgICAgICAgICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVh IDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBz dHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICAgICAg c3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAg ICAgICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYm IGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAg ICAgICAgICAgICAgIGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAgICAgICAmJiBnbHlw aCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbmNv dW50ICglZCkgfCB3aW5kb3dfcm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2VuZCAo JWQvJWQpXG5cCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PSBWRVJUSUNBTCBSVUxFUiA9 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlgg VCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBa ViBDXG4iLAorY291bnQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nfc3Rh cnQsIHBvc19lbmQpOworICAgICAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsg KytnbHlwaCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCBy ZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92 cG9zKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAm JiBjb3VudCA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9y bWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAocmVsYXRpdmVfeCArIGdseXBo LT5waXhlbF93aWR0aCA+IG9wb2ludF94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwg Z2x5cGggPT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBo LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAg JiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgQkFSX0NVUlNP UiwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBWRVJUSUNBTF9SVUxFUiwgJnJlc3VsdCk7Cisg ICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAobWNfc3RkZXJyX3ApCisgICAgICAgICAgICAg ICAgICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94KTsK KyAgICAgICAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7Cisg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisgICAgICB9 CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgU0VUIFRIRSBDQUNIRQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGNyb3NzaGFpcnNf ZmluaXNoOgorICBpZiAoIW1pbmltYWxfcAorICAgICAgJiYgdXBkYXRpbmdfZnJhbWVfcCkKKyAg ICB1cGRhdGVfZW5kIChYRlJBTUUgKHctPmZyYW1lKSk7CisgIGlmICghTklMUCAocmVzdWx0KSkK KyAgICB3c2V0X2Nyb3NzaGFpcnNfY2FjaGUgKHcsIGxpc3RuIChDT05TVFlQRV9IRUFQLCAzLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyZXZlcnNlIChyZXN1bHQpLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25zICh3aW5kb3csIFFuaWwp LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25zICh3LT5jb250ZW50 cywgUW5pbCkpKTsKKyAgdy0+bWMuZHJhd19jcm9zc2hhaXJzID0gZmFsc2U7CisgIGlmIChvbGRf YnVmZmVyKQorICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworLyoKKyNpZmRl ZiBHTFlQSF9ERUJVRwor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gICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOwor ICAgICAgcmV0dXJuOworICAgIH0KKyAgaWYgKCFCVUZGRVJQIChidWYpKQorICAgIHsKKyAgICAg IGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVy KTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGlmIChOSUxQIChCVkFSIChiLCBtY19maWxsX2Nv bHVtbikpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVy X2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJFR0lOIEpPVVJO RVkgLi4uCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgaW50IGZyYW1lX2NoYXJfd2lkdGgg PSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBpbnQgY3Vyc29yX3dpZHRoID0gMTsKKyAgcHRy ZGlmZl90IHBvc2ludCA9IC0xOworICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAo YiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWElOVCAoQlZBUiAoYiwgZmlsbF9j b2x1bW4pKTsKKyAgaW50IGZpbGxfY29sdW1uX3ggPSAoZmlsbF9jb2x1bW5fcCkKKyAgICAgICAg ICAgICAgICAgICAgICA/IGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0aAorICAgICAgICAgICAg ICAgICAgICAgIDogMDsKKyAgTGlzcF9PYmplY3QgcmVzdWx0ID0gUW5pbDsKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDT0xPUiBPRiBGSUxM IENPTFVNTgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGVudW0gZmFjZV9pZCBmaWxsX2Nv bHVtbl9mYWNlX2lkID0KKyAgICAoIWFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29sdW1uX2luYWN0aXZlX3dpbmRvd3MpKQorICAg ICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAg ICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIm1jLWZpbGwtY29sdW1uLWlu YWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAgICA6ICghYWN0aXZlX3AKKyAgICAgICAmJiAhTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbl9pbmFjdGl2ZV93aW5k b3dzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9z c2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9y dWxlcikpCisgICAgICAgJiYgb3BvaW50X3ggPT0gZmlsbF9jb2x1bW5feCkKKyAgICAgID8gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIm1jLWZpbGwtY29sdW1uLW9wb2ludC1pbmFj dGl2ZS1mYWNlIiksIHRydWUpCisgICAgOiAoYWN0aXZlX3AKKyAgICAgICAmJiAhTklM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pbnRlcm4gKCJtYy1maWxsLWNvbHVtbi1mYWNlIiksIHRydWUp OworICBzdHJ1Y3QgZmFjZSAqZmlsbF9jb2x1bW5fZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgZmls bF9jb2x1bW5fZmFjZV9pZCk7CisgIExpc3BfT2JqZWN0IGZpbGxfY29sdW1uX2NvbG9yID0gZmls bF9jb2x1bW5fZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgIENIRUNLX1NU UklORyAoZmlsbF9jb2x1bW5fY29sb3IpOworICBMaXNwX09iamVjdCBmb3JlZ3JvdW5kID0gbWNf Y29sb3JfdmVjdG9yX2NhbGMgKHcsIGZpbGxfY29sdW1uX2NvbG9yKTsKKyAgYm9vbCB1cGRhdGlu Z19mcmFtZV9wID0gZmFsc2U7CisgIGlmIChtaW5pbWFsX3ApCisgICAgZ290byBtY19maWxsX2Nv bHVtbl9maW5pc2g7CisgICAgZWxzZSBpZiAoWEZSQU1FICh3LT5mcmFtZSkgIT0gWEZSQU1FICh3 LT5mcmFtZSktPm1jX3VwZGF0aW5nX2ZyYW1lKQorICAgIHsKKyAgICAgIHVwZGF0aW5nX2ZyYW1l X3AgPSB0cnVlOworICAgICAgdXBkYXRlX2JlZ2luIChYRlJBTUUgKHctPmZyYW1lKSk7CisgICAg fQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgIEZJTEwgQ09MVU1OOiAgQ09N QklOQVRJT04gT0YgR0xZUEggJiBHTFlQSExFU1MgQ1VSU09SUworKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisgIGludCBoZWFkZXJfbGluZV9mb3JtYXQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJ R0hUICh3KTsKKyAgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4ID0gdy0+Y3VycmVudF9tYXRy aXg7CisgIGludCByb3dfc3RhcnQsIHJvd19lbmQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19y b3dfZW5kOworICBpbnQgaTsKKyAgTGlzcF9PYmplY3QgdGVtcCA9IFFuaWw7CisgIExpc3BfT2Jq ZWN0IHZzcGVjcyA9IFFuaWw7CisgIGZvciAoaSA9IDA7IGkgPCBtYXRyaXgtPm5yb3dzOyArK2kp CisgICAgeworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAobWF0cml4 LCBpKTsKKyAgICAgIHJvd19zdGFydCA9IE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KTsK KyAgICAgIGlmICgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiBpID09IDEpCisgICAgICAgICAg IHx8IChoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCAmJiBpID09IDApKQorICAgICAgICB3aW5kb3df cm93X3N0YXJ0ID0gcm93X3N0YXJ0OworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAg ICAgeworICAgICAgICAgIHdpbmRvd19yb3dfZW5kID0gcm93X2VuZDsKKyAgICAgICAgICBicmVh azsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgcm93 X2VuZCA9IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdyk7CisgICAgICAgICAgICB0ZW1wID0g bGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIG1ha2VfbnVtYmVyIChpKSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHJvd19zdGFydCksCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChy b3dfZW5kKSk7CisgICAgICAgICAgICB2c3BlY3MgPSBGY29ucyAodGVtcCwgdnNwZWNzKTsKKyAg ICAgICAgICB9CisgICAgfQorICBMaXNwX09iamVjdCB2bGlzdDsKKyAgZm9yICh2bGlzdCA9IEZu cmV2ZXJzZSAodnNwZWNzKTsKKyAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgIHZsaXN0ID0g WENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIGludCBjb3VudCA9IFhJTlQgKEZudGggKG1ha2Vf bnVtYmVyICgwKSwgWENBUiAodmxpc3QpKSk7CisgICAgICBpbnQgcG9zX3N0YXJ0ID0gWElOVCAo Rm50aCAobWFrZV9udW1iZXIgKDEpLCBYQ0FSICh2bGlzdCkpKTsKKyAgICAgIGludCBwb3NfZW5k ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDIpLCBYQ0FSICh2bGlzdCkpKTsKKyAgICAgIHN0 cnVjdCBnbHlwaF9yb3cgKnJvdyA9IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCBjb3Vu dCk7CisgICAgICBpbnQgdGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIHctPmN1cnJl bnRfbWF0cml4KTsKKyAgICAgIGludCBhcmVhOworICAgICAgaW50IHJlbGF0aXZlX3ggPSAwOwor ICAgICAgZm9yIChhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKyth cmVhKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5 cGhzW2FyZWFdOworICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGhfZW5kID0gZ2x5cGggKyBy b3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGdseXBo ID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICAgICAgICArK2dseXBo X2VuZDsKKyAgICAgICAgICBpZiAobWNfc3RkZXJyX3AKKyAgICAgICAgICAgICAgJiYgZ2x5cGgg PCBnbHlwaF9lbmQpCisgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisiXG5jb3VudCAoJWQp IHwgd2luZG93X3Jvd19zdGFydC9lbmQgKCVkLyVkKSB8IHJvd19zdGFydC9lbmQgKCVkLyVkKVxu XAorPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gRklMTCBDT0xVTU4gPT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PVxuXAorR2x5cGgjL1RvdGFsIFJlbC5YIFQgICAgICAg UG9zIE8gICBXICAgICBDb2RlIEZhY2UgTFIgICAgIFggICAgWSBIUE9TIFZQT1MgWlYgQ1xuIiwK K2NvdW50LCB3aW5kb3dfcm93X3N0YXJ0LCB3aW5kb3dfcm93X2VuZCwgcG9zX3N0YXJ0LCBwb3Nf ZW5kKTsKKyAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgpCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2lu dF94ID09IGZpbGxfY29sdW1uX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICAgICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zv cm1hdCA+IDAgJiYgY291bnQgPiAwKQorICAgICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5l X2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgJiYgKHJlbGF0aXZlX3ggKyBnbHlwaC0+ cGl4ZWxfd2lkdGggPiBmaWxsX2NvbHVtbl94CisgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5 cGggPT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAgICAgICAgICYmIGdseXBoLT55IDw9IHdp bmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9j dXJzb3JfcCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBtY19lbmdpbmUg KHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHcsIHBvc2ludCwgQkFSX0NVUlNPUiwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3Rp dmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBGSUxMX0NPTFVN TiwgJnJlc3VsdCk7CisgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGNv dW50ID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0 ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgKHJlbGF0aXZlX3ggKyBnbHlwaC0+ cGl4ZWxfd2lkdGggPiBmaWxsX2NvbHVtbl94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHx8IGdseXBoID09IGdseXBoX2VuZCAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYg Z2x5cGgtPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICAgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5SRUFMIEZBS0UgQ1VS U09SXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5 cGgsIGFyZWEsIHJlbGF0aXZlX3gpOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg ICBlbHNlIGlmIChtY19zdGRlcnJfcCkKKyAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlw aCAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCk7CisgICAgICAgICAgICAgIHJlbGF0aXZl X3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAg fQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIFNFVCBUSEUgQ0FDSEUKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBtY19maWxsX2Nv bHVtbl9maW5pc2g6CisgIGlmICghbWluaW1hbF9wCisgICAgICAmJiB1cGRhdGluZ19mcmFtZV9w KQorICAgIHVwZGF0ZV9lbmQgKFhGUkFNRSAody0+ZnJhbWUpKTsKKyAgaWYgKCFOSUxQIChyZXN1 bHQpKQorICAgIHdzZXRfbWNfZmlsbF9jb2x1bW5fY2FjaGUgKHcsIGxpc3RuIChDT05TVFlQRV9I RUFQLCAzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZyZXZlcnNlIChy ZXN1bHQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25zICh3aW5k b3csIFFuaWwpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZjb25zICh3 LT5jb250ZW50cywgUW5pbCkpKTsKKyAgdy0+bWMuZHJhd19maWxsX2NvbHVtbiA9IGZhbHNlOwor ICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsK Ky8qCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgZW5kID0gY2xvY2soKTsKKyAgY3B1X3RpbWVfdXNl ZCA9ICgoZG91YmxlKSAoZW5kIC0gc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICBkdG9hc3Ry IChidWZfdGltZSwgc2l6ZW9mIGJ1Zl90aW1lLCAwLCAwLCBjcHVfdGltZV91c2VkKTsKKyAgZGVi dWdfbWV0aG9kX2FkZCAodywgIm1jX2RyYXdfZmlsbF9jb2x1bW46ICBUSU1FICglcykiLCBidWZf dGltZSk7CisjZW5kaWYKKyovCit9CisKK3ZvaWQKK21jX3JlZHJhd19tdWx0aXBsZV9jdXJzb3Jz IChzdHJ1Y3Qgd2luZG93ICp3KQoreworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBjbG9ja190 IHN0YXJ0LCBlbmQ7CisgIGRvdWJsZSBjcHVfdGltZV91c2VkOworICBjaGFyIGJ1Zl90aW1lW0RC TF9CVUZTSVpFX0JPVU5EXTsKKyAgc3RhcnQgPSBjbG9jaygpOworI2VuZGlmCisqLworI2lmZGVm IEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAo dy0+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5k b3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2lu ZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFy ICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChz dGRlcnIsICJtY19yZWRyYXdfbXVsdGlwbGVfY3Vyc29ycyAoJXMpXG4iLCB3aW5kb3dfY2hhcik7 CisgICAgfQorI2VuZGlmCisgIExpc3BfT2JqZWN0IHZsaXN0ID0gUW5pbDsKKyAgTGlzcF9PYmpl Y3QgZmlmdGVlbl9lbGVtZW50cyA9IFFuaWw7CisgIGludCB4LCBmeCwgeSwgZnksIGhwb3MsIHZw b3MsIGg7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgY3Vyc29yX3R5cGU7CisgIGludCBjdXJz b3Jfd2lkdGg7CisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBRbmlsOworICBMaXNwX09iamVj dCBiYWNrZ3JvdW5kID0gUW5pbDsKKyAgYm9vbCBhY3RpdmVfcCA9IGZhbHNlOworICBib29sIG1p bmltYWxfcCA9IGZhbHNlOworICBpbnQgZmxhdm9yOworICBwdHJkaWZmX3QgcG9zaW50OworICBi b29sIHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgaWYgKFhGUkFNRSAody0+ZnJhbWUpICE9 IFhGUkFNRSAody0+ZnJhbWUpLT5tY191cGRhdGluZ19mcmFtZSkKKyAgICB7CisgICAgICB1cGRh dGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoWEZSQU1FICh3LT5mcmFt ZSkpOworICAgIH0KKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPm11bHRpcGxlX2N1cnNvcnNfY2Fj aGUpOworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkp CisgICAgeworICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHgg PSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IGZ4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7Cisg ICAgICB5ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDIpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICBmeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgZmlmdGVlbl9lbGVtZW50 cykpOworICAgICAgaHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg0KSwgZmlmdGVlbl9l bGVtZW50cykpOworICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg2KSwg ZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNv cl90eXBlIChGbnRoIChtYWtlX251bWJlciAoNyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg4KSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICg5KSwgZmlmdGVl bl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDEwKSwg ZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVfcCA9IFhJTl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fcmVkcmF3X2Nyb3NzaGFpcnMgKHN0cnVjdCB3aW5kb3cgKncpCit7CisvKgorI2lm ZGVmIEdMWVBIX0RFQlVHCisgIGNsb2NrX3Qgc3RhcnQsIGVuZDsKKyAgZG91YmxlIGNwdV90aW1l X3VzZWQ7CisgIGNoYXIgYnVmX3RpbWVbREJMX0JVRlNJWkVfQk9VTkRdOworICBzdGFydCA9IGNs b2NrKCk7CisjZW5kaWYKKyovCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlz cGxheV9wCisgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICB7CisgICAgICBM aXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAg TGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5p bCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7Cisg ICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19yZWRyYXdfY3Jvc3NoYWlycyAoJXMpXG4iLCB3aW5k b3dfY2hhcik7CisgICAgfQorI2VuZGlmCisgIExpc3BfT2JqZWN0IHZsaXN0ID0gUW5pbDsKKyAg TGlzcF9PYmplY3QgZmlmdGVlbl9lbGVtZW50cyA9IFFuaWw7CisgIGludCB4LCBmeCwgeSwgZnks IGhwb3MsIHZwb3MsIGg7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgY3Vyc29yX3R5cGU7Cisg IGludCBjdXJzb3Jfd2lkdGg7CisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBRbmlsOworICBM aXNwX09iamVjdCBiYWNrZ3JvdW5kID0gUW5pbDsKKyAgYm9vbCBhY3RpdmVfcCA9IGZhbHNlOwor ICBib29sIG1pbmltYWxfcCA9IGZhbHNlOworICBpbnQgZmxhdm9yOworICBwdHJkaWZmX3QgcG9z aW50OworICBib29sIHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgaWYgKFhGUkFNRSAody0+ ZnJhbWUpICE9IFhGUkFNRSAody0+ZnJhbWUpLT5tY191cGRhdGluZ19mcmFtZSkKKyAgICB7Cisg ICAgICB1cGRhdGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoWEZSQU1F ICh3LT5mcmFtZSkpOworICAgIH0KKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPmNyb3NzaGFpcnNf Y2FjaGUpOworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlz dCkpCisgICAgeworICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAg IHggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAg ICAgIGZ4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICB5ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDIpLCBmaWZ0ZWVuX2VsZW1lbnRz KSk7CisgICAgICBmeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgaHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg0KSwgZmlmdGVl bl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwg ZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg2 KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgIC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ZCAoWEZSQU1FICh3LT5mcmFtZSkpOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQg PSBjbG9jaygpOworICBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8g Q0xPQ0tTX1BFUl9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAs IDAsIGNwdV90aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfcmVkcmF3X2Ny b3NzaGFpcnM6ICBUSU1FICglcykiLCBidWZfdGltZSk7CisjZW5kaWYKKyovCit9CisKK3ZvaWQK K21jX3JlZHJhd19maWxsX2NvbHVtbiAoc3RydWN0IHdpbmRvdyAqdykKK3sKKy8qCisjaWZkZWYg R0xZUEhfREVCVUcKKyAgY2xvY2tfdCBzdGFydCwgZW5kOworICBkb3VibGUgY3B1X3RpbWVfdXNl ZDsKKyAgY2hhciBidWZfdGltZVtEQkxfQlVGU0laRV9CT1VORF07CisgIHN0YXJ0ID0gY2xvY2so KTsKKyNlbmRpZgorKi8KKyNpZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5 X3AKKyAgICAgICYmIEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgIU5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZmlsbF9jb2x1bW4pKSkKKyAgICB7CisgICAgICBM aXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAg TGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5p bCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7Cisg ICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19yZWRyYXdfZmlsbF9jb2x1bW4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BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29u dGVudHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0 aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7Cisg ICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0 cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5k b3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIs ICJtY19lcmFzZV9tdWx0aXBsZV9jdXJzb3JzICglcyk6ICBkZWxldGVfY2FjaGUgKCVkKVxuIiwg d2luZG93X2NoYXIsIGRlbGV0ZV9jYWNoZSk7CisgICAgfQorI2VuZGlmCisgIExpc3BfT2JqZWN0 IHZsaXN0ID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgZmlmdGVlbl9lbGVtZW50cyA9IFFuaWw7Cisg IGludCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIGg7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2lu ZHMgY3Vyc29yX3R5cGU7CisgIGludCBjdXJzb3Jfd2lkdGg7CisgIExpc3BfT2JqZWN0IGZvcmVn cm91bmQgPSBRbmlsOworICBMaXNwX09iamVjdCBiYWNrZ3JvdW5kID0gUW5pbDsKKyAgYm9vbCBh Y3RpdmVfcCA9IGZhbHNlOworICBib29sIG1pbmltYWxfcCA9IGZhbHNlOworICBpbnQgZmxhdm9y ID0gTk9fRkxBVk9SOworICBwdHJkaWZmX3QgcG9zaW50OworICBib29sIHVwZGF0aW5nX2ZyYW1l X3AgPSBmYWxzZTsKKyAgaWYgKFhGUkFNRSAody0+ZnJhbWUpICE9IFhGUkFNRSAody0+ZnJhbWUp LT5tY191cGRhdGluZ19mcmFtZSkKKyAgICB7CisgICAgICB1cGRhdGluZ19mcmFtZV9wID0gdHJ1 ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoWEZSQU1FICh3LT5mcmFtZSkpOworICAgIH0KKyAgbWNf ZXJhc2VfZ2x5cGhfY3Vyc29ycyAodywgdy0+cGh5c19jdXJzb3IueCwgdy0+cGh5c19jdXJzb3Iu eSwgdy0+cGh5c19jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+cGh5 c19jdXJzb3IudnBvcywgdy0+cGh5c19jdXJzb3JfdHlwZSwgdy0+cGh5c19jdXJzb3Jfd2lkdGgs CisgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvcik7CisgIGZvciAodmxpc3QgPSBYQ0FS ICh3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKTsKKyAgICAgICBDT05TUCAodmxpc3QpOworICAg ICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIGZpZnRlZW5fZWxlbWVudHMg PSBYQ0FSICh2bGlzdCk7CisgICAgICB4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBm aWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgx KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICgyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZnkgPSBYSU5UIChGbnRoIChtYWtlX251 bWJlciAoMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGhwb3MgPSBYSU5UIChGbnRoICht YWtlX251bWJlciAoNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHZwb3MgPSBYSU5UIChG bnRoIChtYWtlX251bWJlciAoNSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGggPSBYSU5U IChGbnRoIChtYWtlX251bWJlciAoNiksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNv cl90eXBlID0gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoRm50aCAobWFrZV9udW1iZXIgKDcpLCBm aWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBjdXJzb3Jfd2lkdGggPSBYSU5UIChGbnRoIChtYWtl X251bWJlciAoOCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZvcmVncm91bmQgPSBGbnRo IChtYWtlX251bWJlciAoOSksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYmFja2dyb3VuZCA9 IEZudGggKG1ha2VfbnVtYmVyICgxMCksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYWN0aXZl X3AgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7Cisg ICAgICBtaW5pbWFsX3AgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTIpLCBmaWZ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICBmbGF2b3IgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTMpLCBm aWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBwb3NpbnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJl ciAoMTQpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBpZiAoZmxhdm9yID09IE1DX0dMWVBI KQorICAgICAgICBtY19lcmFzZV9nbHlwaF9jdXJzb3JzICh3LCB4LCB5LCBocG9zLCB2cG9zLCBj dXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmbGF2b3IpOworICAgICAgICBlbHNlCisgICAgICAg ICAgeworICAgICAgICAgICAgYm9vbCByZW1vdmVfcCA9IHRydWU7CisgICAgICAgICAgICBtY19k cmF3X2VyYXNlX2h5YnJpZCAodywgeCwgZngsIHksIGZ5LCBocG9z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OworI2VuZGlmCisqLworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9y ZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAhTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgeworICAg ICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAg ICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3cs IFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcp OworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2VfY3Jvc3NoYWlycyAoJXMpOiAgZGVs ZXRlX2NhY2hlICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvd19jaGFyLCBk ZWxldGVfY2FjaGUpOworICAgIH0KKyNlbmRpZgorICBMaXNwX09iamVjdCB2bGlzdCA9IFFuaWw7 CisgIExpc3BfT2JqZWN0IGZpZnRlZW5fZWxlbWVudHMgPSBRbmlsOworICBpbnQgeCwgZngsIHks IGZ5LCBocG9zLCB2cG9zLCBoOworICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1cnNvcl90eXBl OworICBpbnQgY3Vyc29yX3dpZHRoOworICBMaXNwX09iamVjdCBmb3JlZ3JvdW5kID0gUW5pbDsK KyAgTGlzcF9PYmplY3QgYmFja2dyb3VuZCA9IFFuaWw7CisgIGJvb2wgYWN0aXZlX3AgPSBmYWxz ZTsKKyAgaW50IGZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgcHRyZGlmZl90IHBvc2ludDsKKyAgYm9v bCB1cGRhdGluZ19mcmFtZV9wID0gZmFsc2U7CisgIGlmIChYRlJBTUUgKHctPmZyYW1lKSAhPSBY RlJBTUUgKHctPmZyYW1lKS0+bWNfdXBkYXRpbmdfZnJhbWUpCisgICAgeworICAgICAgdXBkYXRp bmdfZnJhbWVfcCA9IHRydWU7CisgICAgICB1cGRhdGVfYmVnaW4gKFhGUkFNRSAody0+ZnJhbWUp KTsKKyAgICB9CisgIGlmICghbWluaW1hbF9wKQorICAgIG1jX2VyYXNlX2dseXBoX2N1cnNvcnMg KHcsIHctPnBoeXNfY3Vyc29yLngsIHctPnBoeXNfY3Vyc29yLnksIHctPnBoeXNfY3Vyc29yLmhw b3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+cGh5c19jdXJzb3IudnBvcywgdy0+ cGh5c19jdXJzb3JfdHlwZSwgdy0+cGh5c19jdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZmxhdm9yKTsKKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPmNyb3NzaGFpcnNf Y2FjaGUpOworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlz dCkpCisgICAgeworICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAg IHggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAg ICAgIGZ4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICB5ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDIpLCBmaWZ0ZWVuX2VsZW1lbnRz KSk7CisgICAgICBmeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgzKSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgaHBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg0KSwgZmlmdGVl bl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwg ZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg2 KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1 cnNvcl90eXBlIChGbnRoIChtYWtlX251bWJlciAoNyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAg ICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg4KSwgZmlmdGVlbl9l bGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICg5KSwgZmlm dGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDEw KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVfcCA9IFhJTlQgKEZudGggKG1ha2Vf bnVtYmVyICgxMSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIG1pbmltYWxfcCA9IFhJTlQg KEZudGggKG1ha2VfbnVtYmVyICgxMiksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZv ciA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAg ICAgIHBvc2ludCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxNCksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgpCisgICAgICAgIG1jX2VyYXNlX2ds eXBoX2N1cnNvcnMgKHcsIHgsIHksIGhwb3MsIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZsYXZvcik7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29s IHJlbW92ZV9wID0gdHJ1ZTsKKyAg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9VTkRdOworICBzdGFy dCA9IGNsb2NrKCk7CisjZW5kaWYKKyovCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNl X3JlZGlzcGxheV9wCisgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29sdW1uKSkpCisgICAg eworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3 KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3 aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19z dHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2VfZmlsbF9jb2x1bW4gKCVz KTogIGRlbGV0ZV9jYWNoZSAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3df Y2hhciwgZGVsZXRlX2NhY2hlKTsKKyAgICB9CisjZW5kaWYKKyAgTGlzcF9PYmplY3Qgdmxpc3Qg PSBRbmlsOworICBMaXNwX09iamVjdCBmaWZ0ZWVuX2VsZW1lbnRzID0gUW5pbDsKKyAgaW50IHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaDsKKyAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyBjdXJz b3JfdHlwZTsKKyAgaW50IGN1cnNvcl93aWR0aDsKKyAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCA9 IFFuaWw7CisgIExpc3BfT2JqZWN0IGJhY2tncm91bmQgPSBRbmlsOworICBib29sIGFjdGl2ZV9w ID0gZmFsc2U7CisgIGJvb2wgbWluaW1hbF9wID0gZmFsc2U7CisgIGludCBmbGF2b3IgPSBOT19G TEFWT1I7CisgIHB0cmRpZmZfdCBwb3NpbnQ7CisgIGJvb2wgdXBkYXRpbmdfZnJhbWVfcCA9IGZh bHNlOworICBpZiAoWEZSQU1FICh3LT5mcmFtZSkgIT0gWEZSQU1FICh3LT5mcmFtZSktPm1jX3Vw ZGF0aW5nX2ZyYW1lKQorICAgIHsKKyAgICAgIHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOworICAg ICAgdXBkYXRlX2JlZ2luIChYRlJBTUUgKHctPmZyYW1lKSk7CisgICAgfQorICBmb3IgKHZsaXN0 ID0gWENBUiAody0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpOworICAgICAgIENPTlNQICh2bGlzdCk7 CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgeworICAgICAgZmlmdGVlbl9lbGVt ZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAo MCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZ4ID0gWElOVCAoRm50aCAobWFrZV9udW1i ZXIgKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICB5ID0gWElOVCAoRm50aCAobWFrZV9u dW1iZXIgKDIpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeSA9IFhJTlQgKEZudGggKG1h a2VfbnVtYmVyICgzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhJTlQgKEZu dGggKG1ha2VfbnVtYmVyICg0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhJ TlQgKEZudGggKG1ha2VfbnVtYmVyICg1KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9 IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg2KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAg Y3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX251bWJlciAo NyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGgg KG1ha2VfbnVtYmVyICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9 IEZudGggKG1ha2VfbnVtYmVyICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3Jv dW5kID0gRm50aCAobWFrZV9udW1iZXIgKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBh Y3RpdmVfcCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxMSksIGZpZnRlZW5fZWxlbWVudHMp KTsKKyAgICAgIG1pbmltYWxfcCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxMiksIGZpZnRl ZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZvciA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgx MyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHBvc2ludCA9IFhJTlQgKEZudGggKG1ha2Vf bnVtYmVyICgxNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNf R0xZUEgpCisgICAgICAgIG1jX2VyYXNlX2dseXBoX2N1cnNvcnMgKHcsIHgsIHksIGhwb3MsIHZw b3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZsYXZvcik7CisgICAgICAgIGVsc2UKKyAg ICAgICAgICB7CisgICAgICAgICAgICBib29sIHJlbW92ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAg IG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIGgsIGN1 cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0 aCwgYmFja2dyb3VuZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAg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X251bWJlciAoMSks IHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkKKyAgICAgICYmIEVRICh3LT5jb250ZW50cywg WENBUiAoRm50aCAobWFrZV9udW1iZXIgKDIpLCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkp KQorICAgIG1jX2VyYXNlX211bHRpcGxlX2N1cnNvcnMgKHcsIGRlbGV0ZV9jYWNoZSk7Cit9CisK K3ZvaWQKK21jX3JlbW92ZV9jcm9zc2hhaXJzIChzdHJ1Y3Qgd2luZG93ICp3KQoreworICBib29s IGRlbGV0ZV9jYWNoZSA9ICgody0+bWMucmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9PSA4 CisgICAgICAgICAgICAgICAgICAgICAgICB8fCBtY19yZWRpc3BsYXkgPT0gMykKKyAgICAgICAg ICAgICAgICAgICAgICAgJiYgIXctPm1jLmRyYXdfY3Jvc3NoYWlycworICAgICAgICAgICAgICAg ICAgICAgICAmJiAhdy0+bWMuZXJhc2VfY3Jvc3NoYWlycykKKyAgICAgICAgICAgICAgICAgICAg ICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworI2lmZGVmIEdMWVBIX0RF QlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVu dHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRP VyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFf dG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RB VEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfc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WN0IHdpbmRvdyAqdykKK3sKKyAgYm9vbCBkZWxldGVfY2FjaGUgPSAoKHctPm1j LnJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPT0gOAorICAgICAgICAgICAgICAgICAgICAg ICAgfHwgbWNfcmVkaXNwbGF5ID09IDMpCisgICAgICAgICAgICAgICAgICAgICAgICYmICF3LT5t Yy5kcmF3X2ZpbGxfY29sdW1uCisgICAgICAgICAgICAgICAgICAgICAgICYmICF3LT5tYy5lcmFz ZV9maWxsX2NvbHVtbikKKyAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisgICAgICAgICAg ICAgICAgICAgICAgOiB0cnVlOworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRp c3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbikpKQorICAgIHsKKyAg ICAgIExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdpbmRvdywgdyk7Cisg ICAgICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2luZG93 LCBRbmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3dfc3RyaW5n KTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX3JlbW92ZV9maWxsX2NvbHVtbiAoJXMpOiAg ZGVsZXRlX2NhY2hlICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hh ciwgZGVsZXRlX2NhY2hlKTsKKyAgICB9CisjZW5kaWYKKyAgLyogUmVtb3ZlIGZha2UgY3Vyc29y cy4gIElmIHdlIHJlbHkgdXBvbiBgdXBkYXRlX2ZyYW1lJyB0byByZW1vdmUgZmFrZSBjdXJzb3Jz L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csIHcpOworICAgICAgTGlzcF9PYmpl Y3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAg ICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJp bnRmIChzdGRlcnIsICJtY19tdWx0aXBsZV9jdXJzb3JzX3BvcnRhbCAoJXMpOiAgb24gKCVkKSB8 IGFjdGl2ZV9wICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hhciwg b24sIGFjdGl2ZV9wKTsKKyAgICB9CisjZW5kaWYKKyAgYm9vbCBtaW5pbWFsX3AgPSAoIXctPm1j LmRyYXdfbXVsdGlwbGVfY3Vyc29ycworICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3Bs YXlfcHJlc2VydmVfZWNob19hcmVhICE9IDgKKyAgICAgICAgICAgICAgICAgICAgJiYgbWNfcmVk aXNwbGF5ICE9IDMKKyAgICAgICAgICAgICAgICAgICAgJiYgdyA9PSBYV0lORE9XIChzZWxlY3Rl ZF93aW5kb3cpCisgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19kcmF3X2ZvcnRod2l0aCkpKTsKKyAgaWYgKHct Pm1jLmVyYXNlX211bHRpcGxlX2N1cnNvcnMgJiYgdy0+bWMuZHJhd19tdWx0aXBsZV9jdXJzb3Jz CisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQICh3LT5tdWx0aXBs ZV9jdXJzb3JzX2NhY2hlKQorICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9udW1i ZXIgKDEpLCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5E T1cgKFhDQVIgKEZudGggKG1ha2Vfb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gICB8fCAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2luYWN0 aXZlX3dpbmRvd3MpKSkKKyAgICAgICYmIE5JTFAgKHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUp CisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9j dXJzb3JzX2NvbmYpKSkKKyAgICBtY19kcmF3X211bHRpcGxlX2N1cnNvcnMgKHcsIGFjdGl2ZV9w LCBtaW5pbWFsX3ApOworICAgIGVsc2UgaWYgKG9uCisgICAgICAgICAgICAgJiYgIU1JTklfV0lO RE9XX1AgKHcpCisgICAgICAgICAgICAgJiYgIU5JTFAgKHctPm11bHRpcGxlX2N1cnNvcnNfY2Fj aGUpCisgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg bXVsdGlwbGVfY3Vyc29yc19jb25mKSkKKyAgICAgICAgICAgICAmJiBXSU5ET1dQIChYQ0FSIChG bnRoIChtYWtlX251bWJlciAoMSksIHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkKKyAgICAg ICAgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgdy0+ bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAgICAgICAgICAgICYmIEVRICh3LT5jb250ZW50 cywgWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDIpLCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hl KSkpKQorICAgICAgeworICAgICAgICBtY19lcmFzZV9tdWx0aXBsZV9jdXJzb3JzICh3LCBmYWxz ZSk7CisgICAgICAgIG1jX3JlZHJhd19tdWx0aXBsZV9jdXJzb3JzICh3KTsKKyAgICAgIH0KK30K Kwordm9pZAorbWNfY3Jvc3NoYWlyc19wb3J0YWwgKHN0c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X2NoYXIg PSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfY3Jv c3NoYWlyc19wb3J0YWwgKCVzKTogIG9uICglZCkgfCBhY3RpdmVfcCAoJWQpXG4iLAorICAgICAg ICAgICAgICAgICAgICAgICAgd2luZG93X2NoYXIsIG9uLCBhY3RpdmVfcCk7CisgICAgfQorI2Vu ZGlmCisgIGJvb2wgbWluaW1hbF9wID0gKCF3LT5tYy5kcmF3X2Nyb3NzaGFpcnMKKyAgICAgICAg ICAgICAgICAgICAgJiYgbWNfcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSAhPSA4CisgICAg ICAgICAgICAgICAgICAgICYmIG1jX3JlZGlzcGxheSAhPSAzCisgICAgICAgICAgICAgICAgICAg ICYmIHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KQorICAgICAgICAgICAgICAgICAgICAm JiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfZHJhd19mb3J0 aHdpdGgpKSk7CisgIGlmICh3LT5tYy5lcmFzZV9jcm9zc2hhaXJzICYmIHctPm1jLmRyYXdfY3Jv c3NoYWlycworICAgICAgJiYgIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAmJiAhTklMUCAody0+ Y3Jvc3NoYWlyc19jYWNoZSkKKyAgICAgICYmIFdJTkRPV1AgKFhDQVIgKEZudGggKG1ha2VfbnVt YmVyICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAgJiYgdyA9PSBYV0lORE9XIChY Q0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkKKyAgICAg ICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDIpLCB3LT5jcm9z c2hhaXJzX2NhY2hlKSkpKQorICAgIG1jX2VyYXNlX2Nyb3Nza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AgICAmJiAhTklMUCAody0+bWNfZmlsbF9j b2x1bW5fY2FjaGUpCisgICAgICAmJiBXSU5ET1dQIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAo MSksIHctPm1jX2ZpbGxfY29sdW1uX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5ET1cgKFhD QVIgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkKKyAg ICAgICYmICFFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgdy0+ bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkpCisgICAgeworICAgICAgd3NldF9tY19maWxsX2NvbHVt bl9jYWNoZSAodywgUW5pbCk7CisgICAgICB3LT5tYy5lcmFzZV9maWxsX2NvbHVtbiA9IGZhbHNl OworICAgIH0KKyAgaWYgKG9uCisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYm ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAgICAgICAgICB8fCAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbl9pbmFjdGl2ZV93aW5kb3dz KSkpCisgICAgICAmJiBOSUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkKKyAgICAgICYmICgh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbikpKSkKKyAg ICBtY19kcmF3X2ZpbGxfY29sdW1uICh3LCBhY3RpdmVfcCwgbWluaW1hbF9wKTsKKyAgICBlbHNl IGlmIChvbgorICAgICAgICAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQorICAgICAgICAgICAg ICYmICFOSUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkKKyAgICAgICAgICAgICAmJiAhTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpL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+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5k b3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2luZG93LCBRbmlsKTsKKyAgICAgIGNoYXIg KndpbmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3dfc3RyaW5nKTsKKyAgICAgIGZwcmludGYgKHN0 ZGVyciwgIm1jLWFjdGl2YXRlLW11bHRpcGxlLWN1cnNvcnMgKCVzKVxuIiwgd2luZG93X2NoYXIp OworICAgIH0KKyNlbmRpZgorICB3LT5tYy5kcmF3X211bHRpcGxlX2N1cnNvcnMgPSB0cnVlOwor ICB3LT5tYy5lcmFzZV9tdWx0aXBsZV9jdXJzb3JzID0gdHJ1ZTsKKyAgcmV0dXJuIFFuaWw7Cit9 CisKK0RFRlVOICgibWMtYWN0aXZhdGUtY3Jvc3NoYWlycyIsIEZtY19hY3RpdmF0ZV9jcm9zc2hh aXJzLCBTbWNfYWN0aXZhdGVfY3Jvc3NoYWlycywgMSwgMSwgMCwKKyAgICAgICBkb2M6IC8qIERv Yy1zdHJpbmcuICovKQorICAoTGlzcF9PYmplY3Qgd2luZG93KQoreworICBzdHJ1Y3Qgd2luZG93 ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93ICh3aW5kb3cpOworI2lmZGVmIEdMWVBIX0RFQlVHCisg IGlmICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisg ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkp CisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJp bmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3df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XRhYmxlKSkKKyAg ICAoYXNldCBidWZmZXItZGlzcGxheS10YWJsZQorICAgICAgICAgID9cdAorICAgICAgICAgICh2 ZWN0b3IgKG1ha2UtZ2x5cGgtY29kZSA/XHUwMEJCICdmb250LWxvY2std2FybmluZy1mYWNlKQor ICAgICAgICAgICAgICAgICAgKG1ha2UtZ2x5cGgtY29kZSA/XHQgJ2hpZ2hsaWdodCkpKQorICAg IChhc2V0IGJ1ZmZlci1kaXNwbGF5LXRhYmxlCisgICAgICAgICAgP1xuCisgICAgICAgICAgKHZl Y3RvciAobWFrZS1nbHlwaC1jb2RlID9cdTAwQjYgJ2ZvbnQtbG9jay1jb21tZW50LWZhY2UpCisg ICAgICAgICAgICAgICAgICA/XG4pKQorICAgIChzZXRxIHRhYi13aWR0aCA4KQorICAgIChzZXRx LWxvY2FsIGF1dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUpICovCisKK0RFRlVOICgibWMt ZGVidWciLCBGbWNfZGVidWcsIFNtY19kZWJ1ZywgMCwgMCwgIiIsCisgICAgICAgZG9jOiAvKiBU aGlzIGZ1bmN0aW9uIHVzZWQgZm9yIGRlYnVnZ2luZy4gKi8pCisgICh2b2lkKQoreworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgUFJFTElNSU5BUlkgU1RV RkYKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2Rl X2xpdmVfd2luZG93IChzZWxlY3RlZF93aW5kb3cpOworICBzdHJ1Y3QgaXQgaXQ7CisgIHZvaWQg Kml0ZGF0YSA9IGJpZGlfc2hlbHZlX2NhY2hlICgpOworICBzdHJ1Y3QgaXQgaXQyOworICB2b2lk ICppdDJkYXRhID0gTlVMTDsKKyAgc3RydWN0IGl0IGl0MzsKKyAgdm9pZCAqaXQzZGF0YSA9IE5V TEw7CisgIGVudW0gbW92ZV9pdF9yZXN1bHQgcmMgPSBNT1ZFX1hfUkVBQ0hFRDsKKyAgc3RydWN0 IHRleHRfcG9zIHN0YXJ0X3RleHRfcG9zaXRpb247CisgIGludCBjb3VudCA9IDA7CisgIGludCBu ZXdfeCA9IDA7CisgIGludCBwcmV2aW91c19pdF9jID0gMDsKKyAgaW50IHByZXZpb3VzX2l0X2Zl dGNoYnl0ZSA9IDA7CisgIGludCBwcmV2aW91c19pdF9jdXJyZW50X3ggPSAwOworICBpbnQgcHJl dmlvdXNfaXRfY2hhcnBvcyA9IDA7CisgIGludCBwcmV2aW91c19pdF9waXhlbF93aWR0aCA9IDA7 CisgIGJvb2wgZmluYWxfbG9vcF9wID0gZmFsc2U7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3 aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq CisgICAgICAgICAgICAgICAgICAgICAgU1RBUlQgRElTUExBWSAtLSB3LT5zdGFydAorKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisgIC8qIEJlZ2luIHRoZSBqb3VybmV5IGF0IHctPnN0YXJ0LiAq LworICBTRVRfVEVYVF9QT1NfRlJPTV9NQVJLRVIgKHN0YXJ0X3RleHRfcG9zaXRpb24sIHctPnN0 YXJ0KTsKKyAgc3RhcnRfZGlzcGxheSAoJml0LCB3LCBzdGFydF90ZXh0X3Bvc2l0aW9uKTsKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgIEdPIFRPIFRIRSBCRUdJTk5J TkcgT0YgVEhFIENVUlJFTlQgTElORS4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICAvKiBQ bGFjZSB0aGUgSVQgb24gdGhlIGN1cnJlbnQgbGluZSBjb250YWluaW5nIFBULiAqLworICBpbnQg dm9mZnNldCA9IChXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KSA+IDAKKyAgICAgICAgICAg ICAgICAgJiYgdy0+b3V0cHV0X2N1cnNvci52cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgID8g dy0+b3V0cHV0X2N1cnNvci52cG9zIC0gMQorICAgICAgICAgICAgICAgICAgOiB3LT5vdXRwdXRf Y3Vyc29yLnZwb3M7CisgIGlmICh2b2Zmc2V0ID4gMCkKKyAgICBtb3ZlX2l0X2J5X2xpbmVzICgm aXQsIHZvZmZzZXQpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAg ICAgICAgIE1PVkUgSVQ6ICBJTkNSRU1FTlQgPT0gMSBwaXhlbAorKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisgIGZwcmludGYgKHN0ZGVyciwgIlxuaXQuZmlyc3RfdmlzaWJsZV94ICglZClcbiIs IGl0LmZpcnN0X3Zpc2libGVfeCk7CisgIHdoaWxlICghZmluYWxfbG9vcF9wKQorICAgIHsKKyAg ICAgIG1jX2RlYnVnX3AgPSB0cnVlOworICAgICAgZmluYWxfbG9vcF9wID0gKElUX0NIQVJQT1Mg KGl0KSA9PSBaVikKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAg ICAgICAgICA6IChGRVRDSF9CWVRFIChJVF9CWVRFUE9TIChpdCkpID09ICdcbicKKyAgICAgICAg ICAgICAgICAgICAgICAgICYmIGl0LmMgIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0 cnVlCisgICAgICAgICAgICAgICAgICAgICA6IChyYyA9PSBNT1ZFX0xJTkVfQ09OVElOVUVEKQor ICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgIDogKHJj ID09IE1PVkVfTElORV9UUlVOQ0FURUQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmN1 cnJlbnRfeCAtIGl0LmZpcnN0X3Zpc2libGVfeCA+IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAg ICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlOworICAg ICAgaWYgKGl0LmN1cnJlbnRfeCA+IHByZXZpb3VzX2l0X2N1cnJlbnRfeAorICAgICAgICAgIHx8 IElUX0NIQVJQT1MgKGl0KSA+IHByZXZpb3VzX2l0X2NoYXJwb3MKKyAgICAgICAgICB8fCBpdC5j ICE9IHByZXZpb3VzX2l0X2MKKyAgICAgICAgICB8fCBpdC5jID09IDAKKyAgICAgICAgICB8fCBp dC5jID09IDEwKQorICAgICAgICB7CisgICAgICAgICAgTGlzcF9PYmplY3QgY2hhcmFjdGVyID0g RmNoYXJfdG9fc3RyaW5nIChtYWtlX251bWJlciAoaXQuYykpOworICAgICAgICAgIGludCBjaGFy cG9zID0gSVRfQ0hBUlBPUyAoaXQpOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuY2hh cnBvcyAoJWQvJWQvJWQpIHwgZmlyc3RfeCAoJWQpIHwgcHJldmlvdXNfeCAoJWQpIHwgeCAoJWQp IHwgYyAoJXMpIHwgcHcgKCVkKSB8IGhwb3MgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIGNoYXJwb3MsIHByZXZpb3VzX2l0X2NoYXJwb3MsIEZFVENIX0JZVEUgKElUX0JZVEVQ T1MgKGl0KSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5maXJzdF92aXNpYmxlX3gs CisgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c19pdF9jdXJyZW50X3gsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBpdC5jdXJyZW50X3gsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIGl0LmMgPT0gOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHQiCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmMgPT0gMTApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICgh TklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBpdC5j ICE9IDkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyAhPSAxMCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6ICI/IiksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICBpdC5waXhlbF93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0Lmhwb3MpOwor ICAgICAgICAgIHByZXZpb3VzX2l0X2MgPSBpdC5jOworICAgICAgICAgIHByZXZpb3VzX2l0X2N1 cnJlbnRfeCA9IGl0LmN1cnJlbnRfeDsKKyAgICAgICAgICBwcmV2aW91c19pdF9jaGFycG9zID0g SVRfQ0hBUlBPUyAoaXQpOworICAgICAgICAgIHByZXZpb3VzX2l0X2ZldGNoYnl0ZSA9IEZFVENI X0JZVEUgKElUX0JZVEVQT1MgKGl0KSk7CisgICAgICAgICAgcHJldmlvdXNfaXRfcGl4ZWxfd2lk dGggPSBpdC5waXhlbF93aWR0aDsKKyAgICAgICAgICBjb3VudCArPSAxOworICAgICAgICB9Cisg ICAgICBuZXdfeCArPSAxOworICAgICAgU0FWRV9JVCAoaXQyLCBpdCwgaXQyZGF0YSk7CisgICAg ICByYyA9IG1vdmVfaXRfaW5fZGlzcGxheV9saW5lX3RvICgmaXQsIFpWLCBuZXdfeCwgTU9WRV9U T19QT1MgfCBNT1ZFX1RPX1gpOworICAgICAgU0FWRV9JVCAoaXQzLCBpdCwgaXQzZGF0YSk7Cisg ICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBUSEUgRU5ECisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgbWNfZGVidWdfcCA9 IGZhbHNlOworICBiaWRpX3Vuc2hlbHZlX2NhY2hlIChpdGRhdGEsIGZhbHNlKTsKKyAgcmV0dXJu IFFuaWw7Cit9CisKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAMCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKIAkJICAgICAgV2luZG93IGRpc3BsYXkg ZGltZW5zaW9ucwpAQCAtMTEyMDAsNyArMTYyNzAsMTggQEAgcmVzaXplX2VjaG9fYXJlYV9leGFj dGx5ICh2b2lkKQogCXsKIAkgIHdpbmRvd3Nfb3JfYnVmZmVyc19jaGFuZ2VkID0gNDI7CiAJICB1 cGRhdGVfbW9kZV9saW5lcyA9IDMwOwotCSAgcmVkaXNwbGF5X2ludGVybmFsICgpOworCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBt Y19yZWRpc3BsYXlfaW50ZXJuYWwgPSAxOworICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgxKTsK KyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDA7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIAl9CiAgICAgfQogfQpAQCAtMTE2ODcsNyArMTY3NjgsMTggQEAgZWNob19hcmVh X2Rpc3BsYXkgKGJvb2wgdXBkYXRlX2ZyYW1lX3ApCiAJICAgICAgcHRyZGlmZl90IGNvdW50ID0g U1BFQ1BETF9JTkRFWCAoKTsKIAkgICAgICBzcGVjYmluZCAoUXJlZGlzcGxheV9kb250X3BhdXNl LCBRdCk7CiAJICAgICAgZnNldF9yZWRpc3BsYXkgKGYpOwotCSAgICAgIHJlZGlzcGxheV9pbnRl cm5hbCAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNP UlMgKi8KKworICAgICAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDI7CisgICAgICAgICAg cmVkaXNwbGF5X2ludGVybmFsICgyKTsKKyAgICAgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwg PSAwOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAgdW5iaW5kX3RvIChj b3VudCwgUW5pbCk7CiAJICAgIH0KIAkgIGVsc2UgaWYgKEZSQU1FX1dJTkRPV19QIChmKSAmJiBu ID09IDApCkBAIC0xMzM2Niw2ICsxODQ1OCwxOSBAQCBoc2Nyb2xsX3dpbmRvd190cmVlIChMaXNw X09iamVjdCB3aW5kb3cpCiAJICAgICAgZWxzZQogCQlwdCA9IGNsaXBfdG9fYm91bmRzIChCRUdW LCBtYXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSksIFpWKTsKIAorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBzdHJ1Y3QgZGlzcGxheV9wb3Mg KnBvcyA9ICZjdXJzb3Jfcm93LT5zdGFydDsKKyAgcHRyZGlmZl90IGNoYXJwb3MgPSBDSEFSUE9T IChwb3MtPnBvcyk7CisgIGJvb2wgYmFyZl9jcmFzaCA9IChjaGFycG9zIDwgMCB8fCAoY2hhcnBv cyA+PSBCVUZfQkVHIChjdXJyZW50X2J1ZmZlcikgJiYgY2hhcnBvcyA8PSBaVikpID8gZmFsc2Ug OiB0cnVlOworICBpZiAoYmFyZl9jcmFzaCkKKyAgICByZXR1cm4gaHNjcm9sbGVkX3A7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICAvKiBNb3ZlIGl0ZXJhdG9yIHRvIHB0 IHN0YXJ0aW5nIGF0IGN1cnNvcl9yb3ctPnN0YXJ0IGluCiAJCSBhIGxpbmUgd2l0aCBpbmZpbml0 ZSB3aWR0aC4gICovCiAJICAgICAgaW5pdF90b19yb3dfc3RhcnQgKCZpdCwgdywgY3Vyc29yX3Jv dyk7CkBAIC0xMzYwNiwxMiArMTg3MTEsMjYgQEAgdGV4dF9vdXRzaWRlX2xpbmVfdW5jaGFuZ2Vk X3AgKHN0cnVjdCB3aW5kb3cgKncsCiAgICBpcyBubyBsb25nZXIgcmVxdWVzdGVkLCB3ZSBjbGVh ciB0aGUgZWNobyBhcmVhIG9yIGJyaW5nIGJhY2sgdGhlCiAgICBtaW5pLWJ1ZmZlciBpZiB0aGF0 IGlzIGluIHVzZS4gICovCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RSBDVVJTT1JTICovCisKIHZvaWQKLXJlZGlzcGxheSAodm9pZCkKK3JlZGlzcGxheSAoaW50IGZy b21fd2hlcmUpCiB7Ci0gIHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKyNpZmRlZiBHTFlQSF9ERUJV RworICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5yZWRp c3BsYXkgKCVkKVxuIiwgZnJvbV93aGVyZSk7CisjZW5kaWYKKyAgbWNfcmVkaXNwbGF5ID0gZnJv bV93aGVyZTsKKyAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMzsKKyAgcmVkaXNwbGF5X2ludGVy bmFsICgzKTsKKyAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKyAgbWNfcmVkaXNwbGF5ID0g MDsKIH0KIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogc3RhdGljIExpc3BfT2JqZWN0 CiBvdmVybGF5X2Fycm93X3N0cmluZ19vcl9wcm9wZXJ0eSAoTGlzcF9PYmplY3QgdmFyKQpAQCAt MTM4NzcsOSArMTg5OTYsMjEgQEAgZG8geyBpZiAocG9sbGluZ19zdG9wcGVkX2hlcmUpIHN0YXJ0 X3BvbGxpbmcgKCk7CVwKIC8qIFBlcmhhcHMgaW4gdGhlIGZ1dHVyZSBhdm9pZCByZWNlbnRlcmlu ZyB3aW5kb3dzIGlmIGl0CiAgICBpcyBub3QgbmVjZXNzYXJ5OyBjdXJyZW50bHkgdGhhdCBjYXVz ZXMgc29tZSBwcm9ibGVtcy4gICovCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKIHN0YXRpYyB2b2lkCi1yZWRpc3BsYXlfaW50ZXJuYWwgKHZv aWQpCityZWRpc3BsYXlfaW50ZXJuYWwgKGludCBmcm9tX3doZXJlKQogeworI2lmZGVmIEdMWVBI X0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJc bnJlZGlzcGxheV9pbnRlcm5hbCAoJWQpXG4iLCBmcm9tX3doZXJlKTsKKyNlbmRpZgorCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0cnVjdCB3aW5kb3cgKncgPSBYV0lORE9XIChz ZWxlY3RlZF93aW5kb3cpOwogICBzdHJ1Y3Qgd2luZG93ICpzdzsKICAgc3RydWN0IGZyYW1lICpm cjsKQEAgLTE0MjgxLDYgKzE5NDEyLDI2IEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKICNp ZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAkgICAgICB1cGRhdGVfd2luZG93X2ZyaW5nZXMgKHcs IGZhbHNlKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKio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Kioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIE5PVEU6ICBBbiBpZGxlLXRpbWVy IGZ1bmN0aW9uIG1heSBub3QgbmVjZXNzYXJpbHkgdHJpZ2dlciBgcmVkaXNwbGF5X3dpbmRvdycu CisgICBgdy0+bXVzdF9iZV91cGRhdGVkX3AnIGlzIHNldCB0byB0cnVlIHdpdGhpbiBgbWMtYWN0 aXZhdGUtY3Jvc3NoYWlycycuCistICBgb3B0aW1pemF0aW9uIDFgIChlLmcuLCBsZWZ0L3JpZ2h0 IGN1cnNvciBtb3ZlbWVudCBvbiB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUpLgorLSAgYG9wdGltaXph dGlvbiAzYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gc2NyZWVuIGxpbmVz IHN1YnNlcXVlbnQKKyAgICB0byB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUpLCBieXBhc3MgYHJlZGlz cGxheV93aW5kb3cnLiAqLworCisgICAgaWYgKHctPm11c3RfYmVfdXBkYXRlZF9wKQorICAgICAg Z290byB1cGRhdGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICAvKiBX ZSB1c2VkIHRvIGFsd2F5cyBnb3RvIGVuZF9vZl9yZWRpc3BsYXkgaGVyZSwgYnV0IHRoaXMKIAkJ IGlzbid0IGVub3VnaCBpZiB3ZSBoYXZlIGEgYmxpbmtpbmcgY3Vyc29yLiAgKi8KIAkgICAgICBp ZiAody0+Y3Vyc29yX29mZl9wID09IHctPmxhc3RfY3Vyc29yX29mZl9wKQpAQCAtMTQzNDQsNiAr MTk1MTEsMjYgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQogCQkgICp3LT5kZXNpcmVkX21h dHJpeC0+bWV0aG9kID0gMDsKIAkJICBkZWJ1Z19tZXRob2RfYWRkICh3LCAib3B0aW1pemF0aW9u IDMiKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10aW1lciBmdW5jdGlvbiBtYXkgbm90IG5l Y2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5kb3cnLgorICAgYHctPm11c3RfYmVfdXBk YXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1jLWFjdGl2YXRlLWNyb3NzaGFpcnMnLgor LSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24g dGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRpbWl6YXRpb24gM2AgKGUuZy4sIGxlZnQv cmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBsaW5lcyBzdWJzZXF1ZW50CisgICAgdG8g dGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGByZWRpc3BsYXlfd2luZG93Jy4gKi8KKwor ICBibG9ja19pbnB1dCAoKTsKKyAgbWNfcmVtb3ZlX211bHRpcGxlX2N1cnNvcnMgKHcpOworICBt Y19yZW1vdmVfY3Jvc3NoYWlycyAodyk7CisgIG1jX3JlbW92ZV9maWxsX2NvbHVtbiAodyk7Cisg IHVuYmxvY2tfaW5wdXQgKCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkJICBn b3RvIHVwZGF0ZTsKIAkJfQogCSAgICAgIGVsc2UKQEAgLTE0NzI0LDE2ICsxOTkxMSwzNiBAQCBy ZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhIChpbnQgZnJvbV93aGVyZSkKICAgYmxvY2tfYnVm ZmVyX2ZsaXBzICgpOwogICB1bmJsb2NrX2lucHV0ICgpOwogCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIHN0cnVjdCB3aW5kb3cgKncgPSBk ZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHctPm1jLnJlZGlzcGxheV9w cmVzZXJ2ZV9lY2hvX2FyZWEgPSBmcm9tX3doZXJlOworICBtY19yZWRpc3BsYXlfcHJlc2VydmVf ZWNob19hcmVhID0gZnJvbV93aGVyZTsKKwogICBpZiAoIU5JTFAgKGVjaG9fYXJlYV9idWZmZXJb MV0pKQogICAgIHsKICAgICAgIC8qIFdlIGhhdmUgYSBwcmV2aW91c2x5IGRpc3BsYXllZCBtZXNz YWdlLCBidXQgbm8gY3VycmVudAogCSBtZXNzYWdlLiAgUmVkaXNwbGF5IHRoZSBwcmV2aW91cyBt ZXNzYWdlLiAgKi8KICAgICAgIGRpc3BsYXlfbGFzdF9kaXNwbGF5ZWRfbWVzc2FnZV9wID0gdHJ1 ZTsKLSAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRl cm5hbCA9IDQ7CisgICAgICByZWRpc3BsYXlfaW50ZXJuYWwgKDQpOworICAgICAgbWNfcmVkaXNw bGF5X2ludGVybmFsID0gMDsKICAgICAgIGRpc3BsYXlfbGFzdF9kaXNwbGF5ZWRfbWVzc2FnZV9w ID0gZmFsc2U7CiAgICAgfQogICBlbHNlCi0gICAgcmVkaXNwbGF5X2ludGVybmFsICgpOworICAg IHsKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDU7CisgICAgICByZWRpc3BsYXlfaW50 ZXJuYWwgKDUpOworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKyAgICB9CisKKyAg dy0+bWMucmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IDA7CisgIG1jX3JlZGlzcGxheV9w cmVzZXJ2ZV9lY2hvX2FyZWEgPSAwOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAg IGZsdXNoX2ZyYW1lIChTRUxFQ1RFRF9GUkFNRSAoKSk7CiAgIHVuYmluZF90byAoY291bnQsIFFu aWwpOwpAQCAtMTcyNTksNiArMjI0NjYsMjUgQEAgcmVkaXNwbGF5X3dpbmRvdyAoTGlzcF9PYmpl Y3Qgd2luZG93LCBib29sIGp1c3RfdGhpc19vbmVfcCkKICAgZGVidWdfbWV0aG9kX2FkZCAodywg InJlY2VudGVyIik7CiAjZW5kaWYKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworLyogTk9URTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5 IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2VyIGByZWRpc3BsYXlfd2luZG93Jy4KKyAgIGB3LT5tdXN0 X2JlX3VwZGF0ZWRfcCcgaXMgc2V0IHRvIHRydWUgd2l0aGluIGBtYy1hY3RpdmF0ZS1jcm9zc2hh aXJzJy4KKy0gIGBvcHRpbWl6YXRpb24gMWAgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVt ZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4gbGluZSkuCistICBgb3B0aW1pemF0aW9uIDNgIChlLmcu LCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBvbiBzY3JlZW4gbGluZXMgc3Vic2VxdWVudAor ICAgIHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSksIGJ5cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycu ICovCisKKyAgYmxvY2tfaW5wdXQgKCk7CisgIG1jX3JlbW92ZV9tdWx0aXBsZV9jdXJzb3JzICh3 KTsKKyAgbWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcpOworICBtY19yZW1vdmVfZmlsbF9jb2x1bW4g KHcpOworICB1bmJsb2NrX2lucHV0ICgpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIC8qIEZvcmdldCBhbnkgcHJldmlvdXNseSByZWNvcmRlZCBiYXNlIGxpbmUgZm9yIGxpbmUg bnVtYmVyIGRpc3BsYXkuICAqLwogICBpZiAoIWJ1ZmZlcl91bmNoYW5nZWRfcCkKICAgICB3LT5i YXNlX2xpbmVfbnVtYmVyID0gMDsKQEAgLTE3Njg5LDYgKzIyOTE1LDI1IEBAIHJlZGlzcGxheV93 aW5kb3cgKExpc3BfT2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3RoaXNfb25lX3ApCiAgIGVsc2UK ICAgICBURU1QX1NFVF9QVF9CT1RIIChDSEFSUE9TIChvcG9pbnQpLCBCWVRFUE9TIChvcG9pbnQp KTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8K KworLyogTk9URTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0 cmlnZ2VyIGByZWRpc3BsYXlfd2luZG93Jy4KKyAgIGB3LT5tdXN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T5wb3Np dGlvbik7CiAJICBpdC0+b2JqZWN0ID0gUW5pbDsKIAkgIGl0LT5jID0gaXQtPmNoYXJfdG9fZGlz cGxheSA9ICcgJzsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgaWYgKElUX0JZVEVQT1MgKCppdCkgPj0gWlZfQllURSkKKyAgICAg ICAgaXQtPnp2X3AgPSB0cnVlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBp dC0+bGVuID0gMTsKIAogCSAgLyogSWYgdGhlIGRlZmF1bHQgZmFjZSB3YXMgcmVtYXBwZWQsIGJl IHN1cmUgdG8gdXNlIHRoZQpAQCAtMjEwNDEsNiArMjYyOTcsMjEgQEAgZGlzcGxheV9jb3VudF9s aW5lc192aXN1YWxseSAoc3RydWN0IGl0ICppdCkKIHN0YXRpYyB2b2lkCiBtYXliZV9wcm9kdWNl X2xpbmVfbnVtYmVyIChzdHJ1Y3QgaXQgKml0KQogeworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGJvb2wgYmFyZl9jcmFzaCA9IChpdC0+ Z2x5cGhfcm93ID09IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgIHx8IGl0LT5nbHlwaF9yb3ct PnVzZWRbVEVYVF9BUkVBXSA9PSAwKQorICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisgICAg ICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2gpCisgICAgcmV0dXJuOwor CisvKiAqKioqKioqKioqKioqKio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ICBlbHNlCiAJdGVtX2l0LmMg PSB0ZW1faXQuY2hhcl90b19kaXNwbGF5ID0gKnA7CiAgICAgICB0ZW1faXQubGVuID0gMTsKLSAg ICAgIG5fZ2x5cGhzX2JlZm9yZSA9IHNjcmF0Y2hfZ2x5cGhfcm93LnVzZWRbVEVYVF9BUkVBXTsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAgICAgaWYgKGJleW9uZF96dikKKyAgICAgICAgdGVtX2l0Lnp2X3AgPSB0cnVlOworICAgICAg dGVtX2l0LmN1cnJlbnRfeSA9IGl0LT5jdXJyZW50X3k7CisgICAgICB0ZW1faXQudnBvcyA9IGl0 LT52cG9zOwogICAgICAgLyogTWFrZSBzdXJlIHRoZXNlIGdseXBocyB3aWxsIGhhdmUgYSAicG9z aXRpb24iIG9mIC0xLiAgKi8KICAgICAgIFNFVF9URVhUX1BPUyAodGVtX2l0LnBvc2l0aW9uLCAt MSwgLTEpOwogICAgICAgUFJPRFVDRV9HTFlQSFMgKCZ0ZW1faXQpOworICAgICAgdGVtX2l0Lmhw b3MgKz0gMTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAotICAgICAgLyogU3RvcCBw cm9kdWNpbmcgZ2x5cGhzIGlmIHdlIGRvbid0IGhhdmUgZW5vdWdoIHNwYWNlIG9uCi0JIHRoaXMg bGluZS4gIEZJWE1FOiBzaG91bGQgd2UgcmVmcmFpbiBmcm9tIHByb2R1Y2luZyB0aGUKLQkgbGlu ZSBudW1iZXIgYXQgYWxsIGluIHRoYXQgY2FzZT8gICovCi0gICAgICBpZiAodGVtX2l0LmN1cnJl bnRfeCA+IHRlbV9pdC5sYXN0X3Zpc2libGVfeCkKKyAgICAgIC8qIFN0b3AgcHJvZHVjaW5nIGds eXBocywgYW5kIHJlZnJhaW4gZnJvbSBwcm9kdWNpbmcgdGhlIGxpbmUKKwkgbnVtYmVyLCBpZiB3 ZSBkb24ndCBoYXZlIGVub3VnaCBzcGFjZSBvbiB0aGlzIGxpbmUuICAqLworICAgICAgaWYgKHRl bV9pdC5jdXJyZW50X3ggPj0gd2lkdGhfbGltaXQpCiAJewotCSAgc2NyYXRjaF9nbHlwaF9yb3cu dXNlZFtURVhUX0FSRUFdID0gbl9nbHlwaHNfYmVmb3JlOwotCSAgYnJlYWs7CisJICBpdC0+bG51 bV93aWR0aCA9IDA7CisJICBpdC0+bG51bV9waXhlbF93aWR0aCA9IDA7CisJICBiaWRpX3Vuc2hl bHZlX2NhY2hlIChpdGRhdGEsIGZhbHNlKTsKKwkgIHJldHVybjsKIAl9CiAgICAgfQogCkBAIC0y Njc2OSw3ICszMjA1Nyw2OCBAQCBkcmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywgaW50IHgs IHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgcHJlcGVuZGVkIG11c3QgYmUgZHJhd24gYmVjYXVz ZSB0aGUgZmlyc3QgZ2x5cGggc3RyaW5nCiAJIGRyYXdzIG92ZXIgaXQuICAqLwogICAgICAgaSA9 IGxlZnRfb3ZlcndyaXR0ZW4gKGhlYWQpOwotICAgICAgaWYgKGkgPj0gMCkKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgYm9vbCBz a2lwX3AgPSBmYWxzZTsKKyAgICAgIGludCBiZWcgPSBpOworCisgICAgICBpZiAoaSA+PSAwCisg ICAgICAgICAgJiYgaGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAmJiAody0+bWMuZ2x5cGhf Zmxhdm9yID09IE1DX0dMWVBICisgICAgICAgICAgICAgIHx8IHctPm1jLmdseXBoX2ZsYXZvciA9 PSBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgfHwgdy0+bWMuZ2x5cGhfZmxhdm9yID09IE1D X0dMWVBIX1RBQikpCisgICAgICAgIHdoaWxlIChiZWcgPCBzdGFydCkKKyAgICAgICAgICB7Cisg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gKHJvdyktPmdseXBoc1thcmVhXSArIGJl ZzsKKyAgICAgICAgICAgIHN3aXRjaCAoZ2x5cGgtPnR5cGUpCisgICAgICAgICAgICB7CisgICAg ICAgICAgICAgIGNhc2UgQ0hBUl9HTFlQSDoKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgICAgY2FzZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICAgIGNhc2UgU1RSRVRDSF9HTFlQSDoKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICBMaXNwX09iamVjdCBjaGFyYWN0ZXIgPSAoQ0hBUkFDVEVSUCAobWFrZV9u dW1iZXIgKGdseXBoLT51LmNoKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBGY2hhcl90b19zdHJpbmcgKG1ha2VfbnVtYmVyIChnbHlwaC0+dS5jaCkpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBRbmlsOworICAgICAg ICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5jaGFyYWN0ZXIgKCVkIHwgJXMpXG4iLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwNDg1OTYpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXFQiCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAxMCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gIlxcdCIKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMTAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSAz MikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gU1NEQVRBIChjaGFy YWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiXFw/IikpOwor ICAgICAgICAgICAgICAgICAgc2tpcF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgY2FzZSBJTUFHRV9HTFlQSDoKKyAg ICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGJlZyArPSAx OworICAgICAgICAgIH0KKworICAgICAgaWYgKGkgPj0gMAorICAgICAgICAgICYmICFza2lwX3Ap CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAl7CiAJICBlbnVtIGRyYXdfZ2x5cGhz X2ZhY2Ugb3ZlcmxhcF9obDsKIApAQCAtMjY5OTcsNiArMzIzNDYsMjQgQEAgYXBwZW5kX2dseXBo IChzdHJ1Y3QgaXQgKml0KQogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9y b3ctPmdseXBoc1thcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKwor ICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0 LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+ enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBn bHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2Jq ZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGlmIChpdC0+cGl4ZWxfd2lkdGggPiAwKQpAQCAtMjcw ODAsNiArMzI0NDcsMjQgQEAgYXBwZW5kX2NvbXBvc2l0ZV9nbHlwaCAoc3RydWN0IGl0ICppdCkK IAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbaXQtPmFy ZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNP UlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBnbHlwaC0+ eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisKKyAg ICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQtPnp2 X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9z ID0gaXQtPmNtcF9pdC5jaGFycG9zOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7 CiAgICAgICBlYXNzZXJ0IChpdC0+cGl4ZWxfd2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjcyODgs NiArMzI2NzMsMjQgQEAgcHJvZHVjZV9pbWFnZV9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAl9CiAg ICAgICBpZiAoZ2x5cGggPCBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYSArIDFdKQogCXsKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAg ICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBnbHlwaC0+eSA9IGl0LT5jdXJy ZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisKKyAgICAgIGdseXBoLT52 cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQtPnp2X3A7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQt PnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogCSAgZ2x5cGgtPnBp eGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+cGl4ZWxfd2lkdGgsIFNIUlRfTUFY KTsKQEAgLTI3MzkxLDYgKzMyNzk0LDI0IEBAIHByb2R1Y2VfeHdpZGdldF9nbHlwaCAoc3RydWN0 IGl0ICppdCkKIAl9CiAgICAgICBpZiAoZ2x5cGggPCBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJl YSArIDFdKQogCXsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBnbHlw aC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisK KyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQt Pnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBoLT5jaGFycG9z ID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0 OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+cGl4ZWxf d2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3NDc3LDYgKzMyODk4LDI0IEBAIGFwcGVuZF9zdHJldGNo X2dseXBoIChzdHJ1Y3QgaXQgKml0LCBMaXNwX09iamVjdCBvYmplY3QsCiAJICAgIHdpZHRoIC09 IGl0LT5maXJzdF92aXNpYmxlX3ggLSBpdC0+Y3VycmVudF94OwogCSAgZWFzc2VydCAod2lkdGgg PiAwKTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAgZ2x5cGgt PnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworCisg ICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9IGl0LT56 dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBv cyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gb2JqZWN0 OwogICAgICAgLyogRklYTUU6IEl0IHdvdWxkIGJlIGJldHRlciB0byB1c2UgVFlQRV9NQVggaGVy ZSwgYnV0CkBAIC0yNzkyNiw2ICszMzM2NSwyNCBAQCBhcHBlbmRfZ2x5cGhsZXNzX2dseXBoIChz dHJ1Y3QgaXQgKml0LCBpbnQgZmFjZV9pZCwgYm9vbCBmb3Jfbm9fZm9udCwgaW50IGxlbiwKIAkg ICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07CiAJ fQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLwor CisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQt PmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5 cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFS UE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAg ICAgICBlYXNzZXJ0IChpdC0+cGl4ZWxfd2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjk2OTIsOSAr MzUxNDksMzIgQEAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgYm9v bCBvbiwKICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB2cG9zOwogICAgIH0KIAorCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICB3LT5tYy5o ID0gLTE7CisgIHctPm1jLmZ4ID0gLTE7CisgIHctPm1jLmZ5ID0gLTE7CisgIHctPm1jLmdseXBo X2ZsYXZvciA9IE5PX0ZMQVZPUjsKKyAgdy0+bWMucmVkID0gLTEuMDsKKyAgdy0+bWMuZ3JlZW4g PSAtMS4wOworICB3LT5tYy5ibHVlID0gLTEuMDsKKyAgdy0+bWMucG9zaW50ID0gLTE7CisKICAg RlJBTUVfUklGIChmKS0+ZHJhd193aW5kb3dfY3Vyc29yICh3LCBnbHlwaF9yb3csIHgsIHksCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2N1cnNvcl90eXBlLCBuZXdf Y3Vyc29yX3dpZHRoLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uLCBh Y3RpdmVfY3Vyc29yKTsKKworICBtY19tdWx0aXBsZV9jdXJzb3JzX3BvcnRhbCAodywgb24sIGFj dGl2ZV9jdXJzb3IpOworCisgIG1jX2Nyb3NzaGFpcnNfcG9ydGFsICh3LCBvbiwgYWN0aXZlX2N1 cnNvcik7CisKKyAgbWNfZmlsbF9jb2x1bW5fcG9ydGFsICh3LCBvbiwgYWN0aXZlX2N1cnNvcik7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC0zMjQzNiw2ICszNzkx NiwyOCBAQCB4X2ludGVyc2VjdF9yZWN0YW5nbGVzIChYUmVjdGFuZ2xlICpyMSwgWFJlY3Rhbmds ZSAqcjIsIFhSZWN0YW5nbGUgKnJlc3VsdCkKIHZvaWQKIHN5bXNfb2ZfeGRpc3AgKHZvaWQpCiB7 CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisK KyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX3Jvdyk7CisKKyAgZGVmc3ViciAoJlNtY19kdW1w X2dseXBoX21hdHJpeCk7CisKKyAgZGVmc3ViciAoJlNtY19hY3RpdmF0ZV9tdWx0aXBsZV9jdXJz b3JzKTsKKworICBkZWZzdWJyICgmU21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMpOworCisgIGRlZnN1 YnIgKCZTbWNfc3RkZXJyKTsKKworICBkZWZzdWJyICgmU21jX2RlYnVnKTsKKworICBkZWZzdWJy ICgmU21jX2FjdGl2YXRlX2ZpbGxfY29sdW1uKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICBWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IgPSBRbmlsOwogICBzdGF0aWNwcm8g KCZWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IpOwogCmRpZmYgLS1naXQgYS9zcmMveHRlcm0u YyBiL3NyYy94dGVybS5jCmluZGV4IGFmMjhkYWIuLjZjM2M1YjIgMTAwNjQ0Ci0tLSBhL3NyYy94 dGVybS5jCisrKyBiL3NyYy94dGVybS5jCkBAIC05OTIsNiArOTkyLDE1IEBAIHhfdXBkYXRlX2Jl Z2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmIChGUkFNRV9UT09MVElQX1AgKGYpICYmICFGUkFN RV9WSVNJQkxFX1AgKGYpKQogICAgIHJldHVybjsKIAorCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IGY7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKCEgRlJBTUVfQ1JfU1VSRkFD RSAoZikpCiAgICAgewogICAgICAgaW50IHdpZHRoLCBoZWlnaHQ7CkBAIC0xMjU4LDYgKzEyNjcs MTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIFhGbHVzaCAoRlJBTUVfWF9E SVNQTEFZIChmKSk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5kaWYKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGlu Z19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogLyog VGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBsYWNlcyBpbiB4ZGlzcC5jCkBA IC0xNTMwLDYgKzE1NDksMjAgQEAgc3RhdGljIHZvaWQgeF9jaGVja19mb250IChzdHJ1Y3QgZnJh bWUgKiwgc3RydWN0IGZvbnQgKik7CiBzdGF0aWMgdm9pZAogeF9zZXRfY3Vyc29yX2djIChzdHJ1 Y3QgZ2x5cGhfc3RyaW5nICpzKQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUgQ1VSU09SUyAqLworCisgIGlmIChzLT53LT5tYy5jdXJzb3JfZ2NfZGVmYXVsdCkK KyAgICB7CisgICAgICBzLT5nYyA9IHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYzsKKyAg ICAgIHJldHVybjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYg KHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmJhY2tncm91 bmQgPT0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmZv cmVncm91bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTkyNTIsNiArOTI4 NSwyNiBAQCB4X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGds eXBoX3JvdyAqcm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29vcmRpbmF0ZXMg Zm9yIHBoeXMgY3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3cs IGN1cnNvcl9nbHlwaCwgJngsICZ5LCAmaCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9wIHkgPT0gV0lO RE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkgPT0gV0lORE9X X1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCistICBoIG9mIEhP TExPV19CT1hfQ1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMgYSB2aXNpYmxl IGdhcCBhYm92ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAgIGggPSByb3ct PmhlaWdodDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3ZCA9IHctPnBoeXNf Y3Vyc29yX3dpZHRoIC0gMTsKIAogICAvKiBUaGUgZm9yZWdyb3VuZCBvZiBjdXJzb3JfZ2MgaXMg dHlwaWNhbGx5IHRoZSBzYW1lIGFzIHRoZSBub3JtYWwKQEAgLTkzMjgsNyArOTM4MSwxNyBAQCB4 X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93 LCBpbnQgd2lkdGgsIGVudW0gdGV4dAogCSBpbnZpc2libGUuICBVc2UgdGhlIGdseXBoJ3MgZm9y ZWdyb3VuZCBjb2xvciBpbnN0ZWFkIGluIHRoaXMKIAkgY2FzZSwgb24gdGhlIGFzc3VtcHRpb24g dGhhdCB0aGUgZ2x5cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbwogCSB0aGF0IHRoZSBnbHlwaCBp cyBsZWdpYmxlLiAgKi8KLSAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9waXhlbCkKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tncm91bmQgPT0gZi0+b3V0 cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsCisgICAgICAgICAgJiYgIXctPm1jLmN1cnNvcl9nY19p bnZpc2libGVfb2theSkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCXhnY3YuYmFj a2dyb3VuZCA9IHhnY3YuZm9yZWdyb3VuZCA9IGZhY2UtPmZvcmVncm91bmQ7CiAgICAgICBlbHNl CiAJeGdjdi5iYWNrZ3JvdW5kID0geGdjdi5mb3JlZ3JvdW5kID0gZi0+b3V0cHV0X2RhdGEueC0+ Y3Vyc29yX3BpeGVsOwpAQCAtOTM1OSw2ICs5NDIyLDE3IEBAIHhfZHJhd19iYXJfY3Vyc29yIChz dHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB3aWR0aCwgZW51bSB0 ZXh0CiAJICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2ZWRfbGV2ZWwgJiAxKSAhPSAwKQogCSAg ICB4ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGggLSB3aWR0aDsKIAorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIEFsaWduIGFs bCBmYWtlIEJBUl9DVVJTT1Igb2YgdGhlIFZFUlRJQ0FMX1JVTEVSIHdpdGggYG9wb2ludF94Jy4g Ki8KKyAgICBpZiAody0+bWMuZnggPiAwKQorICAgICAgeCA9IHctPm1jLmZ4OworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAJICB4X2ZpbGxfcmVjdGFuZ2xlIChmLCBnYywgeCwKIAkJ CSAgV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHctPnBoeXNfY3Vyc29yLnkpLAogCQkJICB3 aWR0aCwgcm93LT5oZWlnaHQpOwpAQCAtOTQzNSwzMSArOTUwOSwxNzMgQEAgeF9kcmF3X3dpbmRv d19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKmdseXBoX3Jvdywg aW50IHgsCiAJfQogICAgICAgZWxzZQogCXsKLQkgIHN3aXRjaCAoY3Vyc29yX3R5cGUpCi0JICAg IHsKLQkgICAgY2FzZSBIT0xMT1dfQk9YX0NVUlNPUjoKLQkgICAgICB4X2RyYXdfaG9sbG93X2N1 cnNvciAodywgZ2x5cGhfcm93KTsKLQkgICAgICBicmVhazsKIAotCSAgICBjYXNlIEZJTExFRF9C T1hfQ1VSU09SOgotCSAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3Jvdywg RFJBV19DVVJTT1IpOwotCSAgICAgIGJyZWFrOwogCi0JICAgIGNhc2UgQkFSX0NVUlNPUjoKLQkg ICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9D VVJTT1IpOwotCSAgICAgIGJyZWFrOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdp biBNVUxUSVBMRSBDVVJTT1JTICovCiAKLQkgICAgY2FzZSBIQkFSX0NVUlNPUjoKLQkgICAgICB4 X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09S KTsKLQkgICAgICBicmVhazsKKyAgc3RydWN0IHhfZGlzcGxheV9pbmZvICpkcHlpbmZvID0gRlJB TUVfRElTUExBWV9JTkZPIChmKTsKKyAgQ29sb3JtYXAgY21hcCA9IEZSQU1FX1hfQ09MT1JNQVAg KGYpOworICB1bnNpZ25lZCBsb25nIG9yaWdpbmFsX2N1cnNvcl9waXhlbCA9IGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9waXhlbDsKKyAgLyogeHRlcm0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Ag ICAgIHJldHVybjsKKyAgICAgIGlmIChnbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCAmJiB3LT5t Yy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVlID49IDAgJiYgdy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAg ICAgeworICAgICAgICAgIHN0cnVjdCBmYWNlICpkZWZhdWx0X2ZhY2UgPSBGQUNFX0ZST01fSUQg KGYsIERFRkFVTFRfRkFDRV9JRCk7CisgICAgICAgICAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29u dGVudHM7CisgICAgICAgICAgQ0hFQ0tfQlVGRkVSIChidWYpOworICAgICAgICAgIHN0cnVjdCBi dWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAgICAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9w ID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICAgICAg cHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhJTlQgKEZy ZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAgICAgICAgIHB0cmRpZmZfdCByZWdpb25fZW5k ID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBYSU5UIChGcmVnaW9uX2VuZCAoKSkgOiAtMTsKKyAgICAg ICAgICBib29sIHJlZ2lvbl9pbl9ib3VuZHNfcCA9IChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tYy5wb3NpbnQgPj0gcmVnaW9uX2Jl Z2lubmluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jLnBv c2ludCA8IHJlZ2lvbl9lbmQpOworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+ b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgZnVu Y3Rpb25hbGl0eSBvZiBgeF9tYWtlX2djJyBpbiB4Zm5zLmMuICAqLworICAgICAgICAgIGlmIChy ZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgJiYgcmVnaW9uX2luX2JvdW5kc19wCisgICAg ICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVt IGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcmVnaW9uLWZhY2UiKSwgdHJ1ZSk7 CisgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlID0g RkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlX2lkKTsKKyAgICAgICAg ICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9nYywgZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAg WFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZS0+YmFja2dyb3VuZCk7CisgICAgICAg ICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAg ICAgICAgICAgICYmICFyZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAgICAgICAgICAgICAgICYm IGFjdGl2ZV9wKQorICAgICAgICAgICAgICB7CisgIC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vyc29yX2djLCBob2xsb3dfaW5hY3RpdmVfZmFj ZS0+YmFja2dyb3VuZCk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgYmxvY2tfaW5w dXQgKCk7CisgICAgICAgICAgLyogRm9yY2UgYHhfc2V0X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5m LT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAgKi8KKyAgICAgICAgICB3LT5tYy5jdXJzb3Jf Z2NfZGVmYXVsdCA9IHRydWU7CisgICAgICAgICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywg Z2x5cGhfcm93LCBEUkFXX0NVUlNPUik7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2RlZmF1 bHQgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MgPSBvcmln aW5hbF9jdXJzb3JfZ2M7CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAq LworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVs OworICAgICAgICAgIHhfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBnbHlwaF9yb3cpOworICAgICAg ICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhl bDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQ SCAmJiB3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVlID49IDAgJiYgdy0+bWMuZ3JlZW4gPj0g MCkKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91 dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX3BpeGVsID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgICB4X2RyYXdfaG9s bG93X2N1cnNvciAodywgZ2x5cGhfcm93KTsKKyAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngt PmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgICB9CisgICAg ICAgICAgZWxzZQorICAgICAgICAgICAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jv dyk7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBGSUxMRURfQk9YX0NVUlNPUjoKKyAg ICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1j LmdyZWVuID49IDApCisgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgIGZ1bmN0aW9uYWxpdHkg b2YgYHhfbWFrZV9nYycgaW4geGZucy5jLiAgKi8KKyAgICAgICAgeworICAgICAgICAgIGJsb2Nr X2lucHV0ICgpOworICAgICAgICAgIFhHQ1ZhbHVlcyBnY192YWx1ZXM7CisgICAgICAgICAgdW5z aWduZWQgbG9uZyBtYXNrID0gR0NGb3JlZ3JvdW5kIHwgR0NCYWNrZ3JvdW5kIHwgR0NGaWxsU3R5 bGUgfCBHQ0xpbmVXaWR0aDsKKyAgICAgICAgICBnY192YWx1ZXMubGluZV93aWR0aCA9IDA7ICAv KiBNZWFucyAxIHVzaW5nIGZhc3QgYWxnb3JpdGhtLiAgKi8KKyAgICAgICAgICBnY192YWx1ZXMu Zm9yZWdyb3VuZCA9IEZSQU1FX0JBQ0tHUk9VTkRfUElYRUwgKGYpOworICAgICAgICAgIGdjX3Zh bHVlcy5iYWNrZ3JvdW5kID0geF9tYWtlX3RydWVjb2xvcl9waXhlbCAoZHB5aW5mbywgaW50X3Jl ZCwgaW50X2dyZWVuLCBpbnRfYmx1ZSk7CisgICAgICAgICAgZ2NfdmFsdWVzLmZpbGxfc3R5bGUg PSBGaWxsT3BhcXVlU3RpcHBsZWQ7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29y X2djID0gWENyZWF0ZUdDIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBGUkFNRV9YX1dJTkRPVyAoZiks IG1hc2ssICZnY192YWx1ZXMpOworICAgICAgICAgIC8qIEZvcmNlIGB4X3NldF9jdXJzb3JfZ2Mn IHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJy4gICovCisgICAgICAgICAg dy0+bWMuY3Vyc29yX2djX2RlZmF1bHQgPSB0cnVlOworICAgICAgICAgIGRyYXdfcGh5c19jdXJz b3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOworICAgICAgICAgIHctPm1jLmN1 cnNvcl9nY19kZWZhdWx0ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vy c29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7 CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5 cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAg IGNhc2UgQkFSX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAgJiYgdy0+ bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAq LworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVs OworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IHRydWU7CisgICAg ICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBCQVJf Q1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSBmYWxz ZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9j dXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHhfZHJhd19i YXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgQkFSX0NVUlNPUik7CisgICAg ICBicmVhazsKKyAgICB9CisgICAgY2FzZSBIQkFSX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAo dy0+bWMucmVkID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisg ICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2li bGVfb2theSA9IHRydWU7CisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3Jv dywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2dj X2ludmlzaWJsZV9va2F5ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vy c29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVs c2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lk dGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIE5PX0NVUlNP UjoKKyAgICAgIHctPnBoeXNfY3Vyc29yX3dpZHRoID0gMDsKKyAgICAgIGJyZWFrOworICAgIGRl ZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgfQorCisvKiBlbmQgTVVMVElQTEUgQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCiAKLQkgICAgY2FzZSBOT19DVVJTT1I6 Ci0JICAgICAgdy0+cGh5c19jdXJzb3Jfd2lkdGggPSAwOwotCSAgICAgIGJyZWFrOwogCi0JICAg IGRlZmF1bHQ6Ci0JICAgICAgZW1hY3NfYWJvcnQgKCk7Ci0JICAgIH0KIAl9CiAKICNpZmRlZiBI QVZFX1hfSTE4Tgo= --Multipart_Thu_Nov_22_11:07:26_2018-1--