From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Sun, 11 Nov 2018 08:51:54 -0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sun_Nov_11_08:51:54_2018-1" X-Trace: blaine.gmane.org 1541955014 32086 195.159.176.226 (11 Nov 2018 16:50:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2018 16:50:14 +0000 (UTC) Cc: 17684@debbugs.gnu.org, 22873@debbugs.gnu.org To: Eli Zaretskii , Marcin Borkowski , Richard Stallman , John Wiegley , Akio Burns , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 17:50:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLsw2-0008An-I6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 17:50:08 +0100 Original-Received: from localhost ([::1]:42900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLsy8-000356-UT for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 11:52:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLsxw-000350-VN for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:52:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLsxv-0002wZ-Ji for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:52:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLsxu-0002w4-JR for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:52:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gLsxu-0004ud-HM for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:52:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Nov 2018 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.154195512118870 (code B ref 17684); Sun, 11 Nov 2018 16:52:02 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 11 Nov 2018 16:52:01 +0000 Original-Received: from localhost ([127.0.0.1]:46636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLsxt-0004uH-Il for submit@debbugs.gnu.org; Sun, 11 Nov 2018 11:52:01 -0500 Original-Received: from gateway23.websitewelcome.com ([192.185.48.251]:13972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLsxr-0004u3-HY for 17684@debbugs.gnu.org; Sun, 11 Nov 2018 11:51:59 -0500 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway23.websitewelcome.com (Postfix) with ESMTP id A058DBF45 for <17684@debbugs.gnu.org>; Sun, 11 Nov 2018 10:51:58 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id Lsxpg3B5gRPojLsxqgEvjW; Sun, 11 Nov 2018 10:51:58 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=KumgPGVOwMFXa3vMU/V5hulPVRNV33tMt0vlx5+b1x4=; b=ReBh+TD1w/1b+PxgZE5smzeU1L sFVuaBCO17MzfUpIAt2XCqPKzalL/LIjx3vSS7O+aIRq1Xh6uqJzQQISoxPUU0YP9D5Xkp4yxa8dU rYyg/UwQqkV9BblWcEfyGgpNtAFVxRxkLeriutqA8GfLvOh2OtNx5Wb/WKndnIxrwVI/PTVJc1Q61 z2jSYLchiGQxtw5fqaPNccI/hbg1It6AJNaCcGWJFwurp9JrNeKwK4SiCh/q8Rxunm5SEacn/5SYZ 9zOV7xna7+FeOxVhoiDYsRCiqWSTVn6WIXPq/0/l79aVEbQJCNFLmDcfZmEU4R1HUCQjxyjfkrp1u lCOu7cVA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49469 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gLsxn-003slj-Ev; Sun, 11 Nov 2018 10:51:57 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1gLsxn-003slj-Ev X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:49469 X-Source-Auth: lawlist X-Email-Count: 2 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152301 Archived-At: --Multipart_Sun_Nov_11_08:51:54_2018-1 Content-Type: text/plain; charset=US-ASCII Proof concept patch version 015.001. Changes include, but are not limited to: - Fixed mc-test. [When switching over from the move IT method to the dump glyph matrix method, cursor_type inadvertently got hard-coded as a BAR_CURSOR instead of respecting the user-defined cursor type/width for multiple fake cursors.] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SETUP: Step 1: git clone -b master git://git.sv.gnu.org/emacs.git Step 2: In the new emacs folder, go back to an Emacs version from 07/07/2018: git reset --hard 98463bed07ecc9057094928ffdc2321eaaf3ab52 [Going back in time to 07/07/2018 saves @lawlist a couple of hours by not having to deal with unrelated recent changes to the master branch by the Emacs team.] Step 3: From within the new emacs folder created in Step 1, apply the patch: git apply /path/to/the/11_11_2018__08_30_42_690.diff [There should not be any error messages at this point; i.e, you should be returned to a new command prompt.] Step 4: ./autogen.sh Step 5: ./configure ... [your custom options] Step 6: make Step 7: make install - To try out built-in fake cursors with Magnar Sveen's library (multiple-cursors), install that package first. [If the multiple-cursors package is installed, an eval-after-load "multiple-cursors-core" statement within crosshairs.el will redefine a couple of functions and set up a few keyboard shortcuts.] If the multiple-cursors package by Magnar Sveen is not already installed, then there are two easy ways to install that package: Type: M-x mc-install OR, evaluate the following snippet: (progn (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'multiple-cursors)) - To try out the crosshairs feature, open a relatively simple buffer (e.g., just code or text) and type: M-x +-mode The default setting is on an idle timer, so just move around or type something to see how it works. - To see an example of a variety of built-in cursor styles and widths, type: M-x mc-test --Multipart_Sun_Nov_11_08:51:54_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="11_11_2018__08_30_42_690.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5lMmIxNmFkCi0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTI0OCBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGxpYnJhcnkgd3JpdHRlbiBieSAgTWFnbmFyIFN2ZWVuLgorCisoZGVmdmFyIHBhY2thZ2UtYXJj aGl2ZXMpCisKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBtYy9t YXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBt Yy9tYXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsKQorKGRlZnZhciBt Yy0tdGhp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GlmIGl0J3Mgc3VwcG9ydGVkIG9yIG5vdAorICAg ICAgICAgICAgICA7OyAtIHNvIGdvIGFoZWFkIGFuZCBhc3N1bWUgaXQncyBvaywgYmVjYXVzZSB3 ZSdyZSBqdXN0IG9wdGltaXN0aWMgbGlrZSB0aGF0CisgICAgICAgICAgICAgIChpZiAob3IgKG5v dCAoc3ltYm9scCBvcmlnaW5hbC1jb21tYW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICA7OyBs YW1iZGEgcmVnaXN0ZXJlZCBieSBzbWFydHJlcAorICAgICAgICAgICAgICAgICAgICAgIChzdHJp bmctcHJlZml4LXAgIigiIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAg ICAgICAgICAgICAobWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJzb3JzIG9yaWdp bmFsLWNvbW1hbmQpCisgICAgICAgICAgICAgICAgOzsgc21hcnRyZXAgYGludGVybidzIGNvbW1h bmRzIGludG8gb3duIG9iYXJyYXkgdG8gaGVscAorICAgICAgICAgICAgICAgIDs7IGBkZXNjcmli ZS1iaW5kaW5ncycuICBTbywgbGV0J3MgcmUtYGludGVybicgaGVyZSB0bworICAgICAgICAgICAg ICAgIDs7IG1ha2UgdGhlIGNvbW1hbmQgY29tcGFyYWJsZSBieSBgZXEnLgorICAgICAgICAgICAg ICAgIChzZXRxIG9yaWdpbmFsLWNvbW1hbmQgKGludGVybiAoc3ltYm9sLW5hbWUgb3JpZ2luYWwt Y29tbWFuZCkpKQorICAgICAgICAgICAgICAgIDs7IG90aGVyd2lzZSBpdCdzIGEgc3ltYm9sLCBh bmQgd2UgY2FuIGJlIG1vcmUgdGhvcm91Z2gKKyAgICAgICAgICAgICAgICAoaWYgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpCisgICAgICAgICAgICAgICAgICAgIChtZXNz YWdlICIlUyBpcyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgY3Vyc29ycyVzIgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChnZXQgb3JpZ2luYWwtY29tbWFuZCAnbWMtLXVuc3VwcG9ydGVkKSkKKyAg ICAgICAgICAgICAgICAgICh3aGVuIChhbmQgb3JpZ2luYWwtY29tbWFuZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAobm90IChtZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMtLWRlZmF1bHQt Y21kcy10by1ydW4tb25jZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1l bXEgb3JpZ2luYWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1bi1vbmNlKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKG9yIG1jL2Fsd2F5cy1ydW4tZm9yLWFsbAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRz LXRvLXJ1bi1mb3ItYWxsKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1lbXEg b3JpZ2luYWwtY29tbWFuZCBtYy9jbWRzLXRvLXJ1bi1mb3ItYWxsKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKG1jL3Byb21wdC1mb3ItaW5jbHVzaW9uLWluLXdoaXRlbGlzdCBv cmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAgICAgICAgICAgIChtYy9leGVjdXRlLWNvbW1h bmQtZm9yLWFsbC1mYWtlLWN1cnNvcnMgb3JpZ2luYWwtY29tbWFuZCkpKSkKKyAgICAgICAgICAg ICAgKHdoZW4gbWMvdXNlLWJ1aWx0LWluLWN1cnNvcnMKKyAgICAgICAgICAgICAgICAoc2V0cSBt dWx0aXBsZS1jdXJzb3JzLWNvbmYKKyAgICAgICAg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YHhf bWFrZV90cnVlY29sb3JfcGl4ZWwnLCB3aGljaCB1c2VzIDE2LWJpdCBSR0IgLS0gdGhlIGNvbnZl cnNpb24gZnJvbSBMU0wKK2hhcHBlbnMgaW50ZXJuYWxseSBieSBtdWx0aXBseWluZyBlYWNoIGVs ZW1lbnQgb2YgdGhlIExTTCBjb2xvciB2ZWN0b3IgYnkgNjU1MzUuIgorKGludGVyYWN0aXZlKQor ICAobGV0ICgoYnVmZmVyIChnZXQtYnVmZmVyLWNyZWF0ZSAiKk1DLVRFU1QqIikpKQorICAgICh3 aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZmZlcgorICAgICAgKGVyYXNlLWJ1ZmZlcikKKyAgICAgIChp bnNlcnQgIlRoaXMgaXMgYSB0ZXN0ISIpCisgICAgICAoc2V0cSBtdWx0aXBsZS1jdXJzb3JzLWNv bmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKDIgImJhciIgInB1cnBsZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoMyAiYm94IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoNSAoImhiYXIiIDMpIFsxLjAgMC4wIDEuMF0pCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkpKSkKKyAgICAoc2Vs ZWN0LXdpbmRvdyAoZGlzcGxheS1idWZmZXIgYnVmZmVyKSkKKyAgICA7OzsgVGhlIHRyaWdnZXIg aW4gYGtleWJvYXJkLmNgIGlzIG5vdCBhY3RpdmF0ZWQgaW4gdGhpcyBleGFtcGxlLCBzbyB3ZQor ICAgIDs7OyBmb3JjZSB0aGUgbXVsdGlwbGUgY3Vyc29ycyB0by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XBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisgICAgICAocHJv Z24KKyAgICAgICAgKCstcGFyZW5zLWZuKQorICAgICAgICAodW5sZXNzIGNyb3NzaGFpcnMtZHJh dy1mb3J0aHdpdGgKKyAgICAgICAgICAobWMtYWN0aXZhdGUtY3Jvc3NoYWlycyAoc2VsZWN0ZWQt d2luZG93KSkpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGltZXIg Ky1pZGxlLXRpbWVyLXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKzs7OyMjI2F1dG9s b2FkCisoZGVmaW5lLW1pbm9yLW1vZGUgKy1tb2RlCisiTWlub3IgbW9kZSBmb3IgZGlzcGxheWlu ZyBhIGhvcml6b250YWwgcnVsZXIuIgorICA6aW5pdC12YWx1ZSBuaWwKKyAgOmxpZ2h0ZXIgIiAr IgorICA6a2V5bWFwIG5pbAorICA6Z2xvYmFsIG5pbAorICA6Z3JvdXAgJystbW9kZQorICAoY29u ZAorICAgICgrLW1vZGUKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFsLWVsZG9jLW1vZGUKKyAgICAg ICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgICAgICAg ICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKGdsb2JhbC1lbGRv Yy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2stY29udGV4dC10aW1lcgorICAg ICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGlt ZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciBqaXQt bG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEgaml0LWxvY2stY29udGV4dC10 aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxvY2stY29udGV4dC1m b250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciBuaWwpKQorICAg ICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGlt ZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAgICAgIChjYW5jZWwt dGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpKQorICAgICAgICAoZnNldCAn dW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAgICAgKGxhbWJkYSAoKSAoYWRk LXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1idWZmZXJzIChjdXJyZW50LWJ1 ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFsZ2FtYXRlICdpZ25vcmUpKQor ICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAgICAgICAgKGJsaW5rLWN1cnNvci1tb2Rl IC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmstY3Vyc29yLWNoZWNrIHBvc3QtY29tbWFu ZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJ2JsaW5r LWN1cnNvci1jaGVjaykpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHkt cCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCk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pbCkpCisgICAgICAodW5sZXNzIChhbmQgKGNhbGxlZC1pbnRlcmFj dGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgt YXJnICcoNCkpKQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICcrLS1zYXZlZC1z dGF0ZSkgbmlsKQorICAgICAgICAoZG9saXN0ICh2YXIgJyhidWZmZXItZGlzcGxheS10YWJsZQor ICAgICAgICAgICAgICAgICAgICAgICBmcmluZ2UtaW5kaWNhdG9yLWFsaXN0CisgICAgICAgICAg ICAgICAgICAgICAgIHRhYi13aWR0aAorICAgICAgICAgICAgICAgICAgICAgICBsaW5lLW1vdmUt dmlzdWFsCisgICAgICAgICAgICAgICAgICAgICAgIHRydW5jYXRlLWxpbmVzCisgICAgICAgICAg ICAgICAgICAgICAgIHRydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cworICAgICAgICAgICAg ICAgICAgICAgICB3b3JkLXdyYXApKQorICAgICAgICAgICh3aGVuIChsb2NhbC12YXJpYWJsZS1w IHZhcikKKyAgICAgICAgICAgIChwdXNoIChjb25zIHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICst LXNhdmVkLXN0YXRlKSkpCisgICAgICAgIChzZXRxIGZpbGwtY29sdW1uIDgwKQorICAgICAgICAo c2V0cSBkaXNwbGF5LWxpbmUtbnVtYmVycyB0KQorICAgICAgICAoc2V0cS1sb2NhbCBhdXRvLWhz Y3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQorICAgICAgICAoc2V0cS1sb2NhbCBoc2Nyb2xsLXN0 ZXAgNSkKKyAgICAgICAgKHNldHEgYnVmZmVyLWRpc3BsYXktdGFibGUgKy1idWZmZXItZGlzcGxh eS10YWJsZSkKKyAgICAgICAgKHNldHEgdGFiLXdpZHRoIDQpCisgICAgICAgIChzZXQgKG1ha2Ut bG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpIHQpCisgICAgICAgIChzZXRxIHRydW5j YXRlLWxpbmVzCisgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICgobGV0ICgobHN0ICstdHJ1 bmNhdGUtbGluZXMtZGVyaXZlZC1tb2RlcykKKyAgICAgICAgICAgICAgICAgICAgbW9kZSkKKyAg ICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAgICAgICh3aGlsZSAoc2V0cSBt b2RlIChwb3AgbHN0KSkKKyAgICAgICAgICAgICAgICAgICh3aGVuIChkZXJpdmVkLW1vZGUtcCBt b2RlKQorICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkpKSkKKyAgICAgICAg ICAgICAoKG1lbXEgbWFqb3ItbW9kZSArLXRydW5jYXRlLWxpbmVzLW1ham9yLW1vZGVzKSkKKyAg ICAgICAgICAgICAodAorICAgICAgICAgICAgICAgbmlsKSkpCisgICAgICAgIChzZXQgKG1ha2Ut bG9jYWwtdmFyaWFibGUgJ3RydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cykgbmlsKQorICAg ICAgICAoc2V0cSB3b3JkLXdyYXAgdCkKKyAgICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGlu ZXMgdCkKKyAgICAgICAgKHNldHEgaW5kaWNhdGUtYnVmZmVyLWJvdW5kYXJpZXMgJ2xlZnQpCisg ICAgICAgIChzZXRxIGZyaW5nZS1pbmRpY2F0b3ItYWxpc3QKKyAgICAgICAgICAgIDs7OyBoc2Ns X2FsbF90ZW1wX3AgfCBoc2NsX3RlbXBfcAorICAgICAgICAgICcoKCstaHNjbC10ZW1wIC4gKCst c2luZ2xlLWFuZ2xlLWxlZnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1h bmdsZS1sZWZ0KSkKKyAgICAgICAgICAgIDs7OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxs X3Blcm1fMV9wIHwgaHNjbF9hbGxfcGVybV8yX3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICAg KCstaHNjbC1wZXJtIC4gKCstc2luZ2xlLWFuZ2xlLXVwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKy1kb3VibGUtYW5nbGUtdXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICArLXRy aXBsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICstcXVhZHJ1cGxlLWFu Z2xlLXVwKSkKKyAgICAgICAgICAgICgrLW92ZXJsYXktYXJyb3cgLiAoKy1mcmluZ2UtbGVmdC1h cnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJv dykpCisgICAgICAgICAgICAodHJ1bmNhdGlvbiAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAg ICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAg ICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxlZnQtY3VybHktYXJyb3cKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1iYWNrc2xhc2gpKQorICAgICAgICAgICAgKG92ZXJsYXktYXJy b3cgLiArLWZyaW5nZS1yaWdodC10cmlhbmdsZSkKKyAgICAgICAgICAgICh1cCAuICstZnJpbmdl LXVwLWFycm93KQorICAgICAgICAgICAgKGRvd24gLiArLWZyaW5nZS1kb3duLWFycm93KQorICAg ICAgICAgICAgKHRvcCAuICstZnJpbmdlLXRvcC1sZWZ0LWFuZ2xlKQorICAgICAgICAgICAgKGJv dHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAgICAgICAgICh0b3AtYm90 dG9tIC4gKCstZnJpbmdlLWxlZnQtYnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICAg Ky1mcmluZ2UtcmlnaHQtYnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmlu Z2UtdG9wLXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS10 b3AtbGVmdC1hbmdsZSkpCisgICAgICAgICAgICAoZW1wdHktbGluZSAuICstZnJpbmdlLWVtcHR5 LWxpbmUpCisgICAgICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmspKSkK KyAgICAgICAgKHNldHEgZnJpbmdlLWN1cnNvci1hbGlzdCAnKChib3ggLiArLWZyaW5nZS1sZWZ0 LXRyaWFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdyAu ICstaG9sbG93LXJlY3RhbmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChiYXIgLiArLXZlcnRpY2FsLWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChoYmFyIC4gKy1mcmluZ2UtaG9yaXpvbnRhbC1iYXIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoaG9sbG93LXNtYWxsIC4gKy1mcmluZ2UtaG9sbG93LXNxdWFyZSkp KQorICAgICAgICAoaWYgY3Jvc3NoYWlycy1kcmF3LWZvcnRod2l0aAorICAgICAgICAgIChhZGQt aG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1mb3J0aHdpdGggJ2FwcGVuZCAnbG9jYWwp CisgICAgICAgICAgKGFkZC1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnKy1kcmF3LWNyb3NzaGFp cnMgJ2FwcGVuZCAnbG9jYWwpKQorICAgICAgICAod2hlbiBjcm9zc2hhaXJzLWRyYXctZm9ydGh3 aXRoCisgICAgICAgICAgKGFkZC1ob29rICd3aW5kb3ctY29uZmlndXJhdGlvbi1jaGFuZ2UtaG9v ayAnKy1kcmF3LWZvcnRod2l0aCBuaWwgJ2xvY2FsKSkKKyAgICAgICAgKGFkZC1ob29rICdjaGFu Z2UtbWFqb3ItbW9kZS1ob29rICd0dXJuLW9mZi0rLW1vZGUgbmlsICdsb2NhbCkpCisgICAgICAo d2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAoaWYgKGVxdWFsIGN1 cnJlbnQtcHJlZml4LWFyZyAnKDQpKQorICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCst bW9kZScgLS0gZGVidWdnaW5nIG1vZGUuIikKKyAgICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9O IGArLW1vZGUnLiIpKSkpCisgICAgKHQKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdmaWxs LWNvbHVtbikKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdhdXRvLWhzY3JvbGwtbW9kZSkK KyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdoc2Nyb2xsLXN0ZXApCisgICAgICAoa2lsbC1s b2NhbC12YXJpYWJsZSAnY3Jvc3NoYWlycykKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdk aXNwbGF5LWxpbmUtbnVtYmVycykKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdkaXNwbGF5 LWxpbmUtbnVtYmVycy13aWR0aCkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdtdWx0aXBs ZS1jdXJzb3JzLWNvbmYpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnYnVmZmVyLWRpc3Bs YXktdGFibGUpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAndGFiLXdpZHRoKQorICAgICAg KGtpbGwtbG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpCisgICAgICAoa2lsbC1sb2Nh bC12YXJpYWJsZSAndHJ1bmNhdGUtbGluZXMpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAn dHJ1bmNhdGUtcGFydGlhbC13aWR0aC13aW5kb3dzKQorICAg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ICAgICAgKHJlbW92ZS1ob29rICdjaGFuZ2UtbWFqb3ItbW9kZS1ob29rICd0 dXJuLW9mZi0rLW1vZGUgJ2xvY2FsKQorICAgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgICAg KHNldHEgdGltZXItaWRsZS1saXN0IChkZWxxICstdGltZXItdmFyIHRpbWVyLWlkbGUtbGlzdCkp CisgICAgICAgIChzZXRxICstdGltZXItdmFyIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWlu dGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9GRiBgKy1tb2Rl Jy4iKSkpKSkKKworKGRlZnVuIHR1cm4tb2ZmLSstbW9kZSAoKQorICAoKy1tb2RlIC0xKSkKKwor Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7CisKKyhkZWZ1biArLXBhcmVucy1mbiAoKQorICAiRG9j LXN0cmluZy4iCisgIChsZXQqICgob3BvaW50IChwb2ludCkpCisgICAgICAgICAoZnJvbSAoaWYg Ky1wYXJlbnMtZnJvbS1mbgorICAgICAgICAgICAgICAgICAoZnVuY2FsbCArLXBhcmVucy1mcm9t LWZuKQorICAgICAgICAgICAgICAgICAocG9pbnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxl Y3RlZC13aW5kb3cpKQorICAgICAgICAgKGkgMCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAo cHJlY2VkaW5nLWNoYXIpKQorICAgICAgICAgKG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisg ICAgICAgICAocG9zMQorICAgICAgICAgICAoY29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFy CisgICAgICAgICAgICAgICAgICAgKG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5p bmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAg ICAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1 YXJlIGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAg ICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkg YnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAg ICAgICAgICAobWluICgxKyBvcG9pbnQpIChwb2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9y IDs7OyAoY2hhci10by1zdHJpbmcgNDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAg ICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChj aGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2luZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAg ICAgICAgKD0gcHJlY2VkaW5nLWNoYXIgOTMpCisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXIt dG8tc3RyaW5nIDEyNSkgPT4gY2xvc2luZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAg ICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCisgICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWlu KSAoMS0gb3BvaW50KSkpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQp KSkKKyAgICAgICAgIHBvczIKKyAgICAgICAgIHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhj dXJzaW9uCisgICAgICAoY29uZGl0aW9uLWNhc2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBw b3MxIChudGggMSAocGFyc2UtcGFydGlhbC1zZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChz ZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAxKSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAg ICAgICAgICAgIChzZXRxIGkgMSkKKyAgICAgICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAg ICAgICAoc2V0cSBzZWxlY3RlZC1mYWNlIChjb25kCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFy ZW5zLW9uZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZm91ci1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA1KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZl LWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA3KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKD0gaSA4KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy1laWdodC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2Up CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChs ZXQgKChvdiAobWFrZS1vdmVybGF5IHBvczEgKDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5s ZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0 IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxl Y3RlZC1mYWNlKSkKKyAgICAgICAgICAod2hlbiBwb3MyCisgICAgICAgICAgICAobGV0ICgob3Yg KG1ha2Utb3ZlcmxheSAoMS0gcG9zMikgcG9zMikpKQorICAgICAgICAgICAgICAodW5sZXNzICst cGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAgICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3Yg J3dpbmRvdyB3aW4pKQorICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0 ZWQtZmFjZSkpKSkKKyAgICAgICAgKGVycm9yIG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92 ZXJsYXlzLWV4aXN0LXAgdCkpKQorCisoZGVmdW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQg bmFtZSB2YWwpCisiUmVtb3ZlIHRoZSBvdmVybGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5n LXByb3BlcnRpZXNgLgorSW5jbHVkZXMgYSB1bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3Zlcmxh eSB3aXRoIGFuIGAnYWZ0ZXItc3RyaW5nYCBwcm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9m IGEgbmFycm93ZWQtYnVmZmVyLiIKKyAgKGxldCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisg ICAgICAgICAocG9pbnQtbWluIChwb2ludC1taW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1 ZmZlci1uYXJyb3dlZC1wKSkKKyAgICAgICAgIChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkK KyAgICAgICAgIChlbmQKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAg ICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAg ICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAo bm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAg ICAgICBwb2ludC1tYXgpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFy cm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBv aW50LW1heCkpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAg ICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAg ICAgICAgKD0gZW5kIHBvaW50LW1heCkpCisgICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAg ICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAg ICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAg ICAgIChvdmVybGF5cworICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1y ZWNlbnRlciBlbmQpCisgICAgICAgICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAg KHdoZW4gKGFuZCBiZWcgZW5kIG5hbWUgdmFsKQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykK KyAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAg ICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVp dGhlciBwdXNoIHRoaXMgb3ZlcmxheSBvdXRzaWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsg b3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0 ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAg ICAgICAoaWYgKDwgKG92ZXJsYXktc3RhcnQgbykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAg ICAgICAobW92ZS1vdmVybGF5IChjb3B5LW92ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChv dmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5k IChvdmVybGF5LWVuZCBvKSkpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92 ZXJsYXktc3RhcnQgbykgYmVnKSkKKyAgICAgICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBv KSBlbmQpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVu ZCBvKSkKKyAgICAgICAgICAgICAgICAoZ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mZlcl9kZWZhdWx0cywgUW5pbCk7CisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgYnNldF9tb2RlX2xpbmVfZm9ybWF0ICgm YnVmZmVyX2RlZmF1bHRzLCBidWlsZF9wdXJlX2Nfc3RyaW5nICgiJS0iKSk7CiAgIGJzZXRfaGVh ZGVyX2xpbmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKICAgYnNldF9hYmJyZXZf bW9kZSAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7CkBAIC01NDQ4LDYgKzU0ODYsMjQgQEAgc3lt c19vZl9idWZmZXIgKHZvaWQpCiAgIHN0YXRpY3BybyAoJlFTRnVuZGFtZW50YWwpOwogICBzdGF0 aWNwcm8gKCZWYnVmZmVyX2FsaXN0KTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICBERUZTWU0gKFFtY19yZWFsX2Zha2VfY3Vyc29yLCAi bWMtcmVhbC1mYWtlLWN1cnNvciIpOworICBERUZTWU0gKFFtdWx0aXBsZV9jdXJzb3JzX2NvbmYs ICJtdWx0aXBsZS1jdXJzb3JzLWNvbmYiKTsKKyAgREVGU1lNIChRbXVsdGlwbGVfY3Vyc29yc19k cmF3X2ZvcnRod2l0aCwgIm11bHRpcGxlLWN1cnNvcnMtZHJhdy1mb3J0aHdpdGgiKTsKKyAgREVG U1lNIChRbXVsdGlwbGVfY3Vyc29yc19pbmFjdGl2ZV93aW5kb3dzLCAibXVsdGlwbGUtY3Vyc29y cy1pbmFjdGl2ZS13aW5kb3dzIik7CisgIERFRlNZTSAoUWNyb3NzaGFpcnMsICJjcm9zc2hhaXJz Iik7CisgIERFRlNZTSAoUWNyb3NzaGFpcnNfaG9yaXpvbnRhbF9ydWxlciwgImNyb3NzaGFpcnMt aG9yaXpvbnRhbC1ydWxlciIpOworICBERUZTWU0gKFFjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVy LCAiY3Jvc3NoYWlycy12ZXJ0aWNhbC1ydWxlciIpOworICBERUZTWU0gKFFjcm9zc2hhaXJzX2Ry YXdfZm9ydGh3aXRoLCAiY3Jvc3NoYWlycy1kcmF3LWZvcnRod2l0aCIpOworICBERUZTWU0gKFFj cm9zc2hhaXJzX2luYWN0aXZlX3dpbmRvd3MsICJjcm9zc2hhaXJzLWluYWN0aXZlLXdpbmRvd3Mi KTsKKyAgREVGU1lNIChRbWNfc3RkZXJyLCAibWMtc3RkZXJyIik7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKICAgREVGU1lNIChRY2hvaWNlLCAiY2hvaWNlIik7CiAgIERFRlNZTSAo UWxlZnQsICJsZWZ0Iik7CiAgIERFRlNZTSAoUXJpZ2h0LCAicmlnaHQiKTsKQEAgLTU0ODUsNiAr NTU0MSw1MiBAQCBzeW1zX29mX2J1ZmZlciAodm9pZCkKICAgRnB1dCAoUXByb3RlY3RlZF9maWVs ZCwgUWVycm9yX21lc3NhZ2UsCiAJYnVpbGRfcHVyZV9jX3N0cmluZyAoIkF0dGVtcHQgdG8gbW9k aWZ5IGEgcHJvdGVjdGVkIGZpZWxkIikpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIERFRlZBUl9QRVJfQlVGRkVSICgibWMtcmVhbC1m YWtlLWN1cnNvciIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfcmVhbF9mYWtlX2N1cnNvciks IFFuaW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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBJZiB0aGUgd2lkdGgg cnVuIGNhY2hlIGlzIGVuYWJsZWQsIHRoaXMgdGFibGUgY29udGFpbnMgdGhlCiAgICAgIGNoYXJh Y3RlciB3aWR0aHMgd2lkdGhfcnVuX2NhY2hlIChzZWUgYWJvdmUpIGFzc3VtZXMuICBXaGVuIHdl CiAgICAgIGRvIGEgdGhvcm91Z2ggcmVkaXNwbGF5LCB3ZSBjb21wYXJlIHRoaXMgYWdhaW5zdCB0 aGUgYnVmZmVyJ3MKQEAgLTgxNCw5ICs4NTEsMTcgQEAgc3RydWN0IGJ1ZmZlcgogICAgICBmb3Ig YSBidWZmZXItbG9jYWwgdmFyaWFibGUgaXMgc3RvcmVkIGluIHRoYXQgdmFyaWFibGUncyBzbG90 CiAgICAgIGluIGJ1ZmZlcl9sb2NhbF9mbGFncyBhcyBhIExpc3AgaW50ZWdlci4gIElmIHRoZSBp bmRleCBpcyAtMSwKICAgICAgdGhpcyBtZWFucyB0aGUgdmFyaWFibGUgaXMgYWx3YXlzIGxvY2Fs IGluIGFsbCBidWZmZXJzLiAgKi8KLSNkZWZpbmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA1MAorCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisjZGVm aW5lIE1BWF9QRVJfQlVGRkVSX1ZBUlMgNjAKICAgY2hhciBsb2NhbF9mbGFnc1tNQVhfUEVSX0JV RkZFUl9WQVJTXTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBTZXQgdG8g dGhlIG1vZHRpbWUgb2YgdG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dCB2YWwpCit7CisgIGItPmNyb3Nz aGFpcnNfaW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Js dl9tY19zdGRlcnIgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+ bWNfc3RkZXJyXyA9IHZhbDsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogSU5M SU5FIHZvaWQKIGJzZXRfYmlkaV9wYXJhZ3JhcGhfZGlyZWN0aW9uIChzdHJ1Y3QgYnVmZmVyICpi LCBMaXNwX09iamVjdCB2YWwpCiB7CmRpZmYgLS1naXQgYS9zcmMvZGlzcGV4dGVybi5oIGIvc3Jj L2Rpc3BleHRlcm4uaAppbmRleCAyMTgwYzlhLi5iZDZhZmZiIDEwMDY0NAotLS0gYS9zcmMvZGlz cGV4dGVybi5oCisrKyBiL3NyYy9kaXNwZXh0ZXJuLmgKQEAgLTk0LDYgKzk0LDI4IEBAIHR5cGVk ZWYgaW50IEN1cnNvcjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2VuZGlmCiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKK2VudW0g bWNfdHlwZXMKK3sKKyAgTk9fRkxBVk9SLAorICBNQ19HTFlQSCwKKyAgTUNfR0xZUEhMRVNTLAor ICBNQ19HTFlQSF9UQUIsCisgIE1DX09WRVJMQVlfQVJST1dfQklUTUFQLAorICBNQ19QSUxDUk9X LAorICBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XLAorICBNQ19IT0xMT1dfUkVDVEFO R0xFLAorICBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgIE1DX1ZFUlRJQ0FMX0JBUiwK KyAgTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorfTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogLyogVGV4dCBjdXJzb3IgdHlwZXMuICAqLwogCiBlbnVtIHRleHRfY3Vyc29yX2tp bmRzCkBAIC0zNzYsNiArMzk4LDE4IEBAIHN0cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1Y3QgZ2x5 cGgKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMg Ki8KKworICBpbnQgeCwgeSwgaHBvcywgdnBvczsKKworICBib29sX2JmIHp2X3AgOiAxOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFBvc2l0aW9uIGZyb20gd2hpY2ggdGhp cyBnbHlwaCB3YXMgZHJhd24uICBJZiBgb2JqZWN0JyBiZWxvdyBpcyBhCiAgICAgIExpc3Agc3Ry aW5nLCB0aGlzIGlzIGFuIGluZGV4IGludG8gdGhhdCBzdHJpbmcuICBJZiBpdCBpcyBhCiAgICAg IGJ1ZmZlciwgdGhpcyBpcyBhIHBvc2l0aW9uIGluIHRoYXQgYnVmZmVyLiAgSW4gYWRkaXRpb24s IHNvbWUKQEAgLTIyMTAsNiArMjI0NCwxNiBAQCBzdHJ1Y3QgY29tcG9zaXRpb25faXQKIAogc3Ry dWN0IGl0CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgYm9vbF9iZiB6dl9wIDogMTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAvKiBUaGUgd2luZG93IGluIHdoaWNoIHdlIGl0ZXJhdGUgb3ZlciBjdXJyZW50X2J1 ZmZlciAob3IgYSBzdHJpbmcpLiAgKi8KICAgTGlzcF9PYmplY3Qgd2luZG93OwogICBzdHJ1Y3Qg d2luZG93ICp3OwpkaWZmIC0tZ2l0IGEvc3JjL2ZyaW5nZS5jIGIvc3JjL2ZyaW5nZS5jCmluZGV4 IDYwNjkxODQuLmI1YzJkYzIgMTAwNjQ0Ci0tLSBhL3NyYy9mcmluZ2UuYworKysgYi9zcmMvZnJp bmdlLmMKQEAgLTQzMyw2ICs0MzMsNDAyIEBAIHN0YXRpYyB1bnNpZ25lZCBzaG9ydCBlbXB0eV9s aW5lX2JpdHNbXSA9IHsKICAgMHgwMCwgMHgzYywgMHgwMCwgMHgwMCwgMHgzYywgMHgwMCwgMHgw MCwgMHgzYywgMHgwMH07CiAKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBN VUxUSVBMRSBDVVJTT1JTICovCisKKy8qIGArLWZyaW5nZS1oZWxwZXItZGVjaW1hbCcgZGVmaW5l ZCBpbiBgY3Jvc3NoYWlycy5lbGAgKi8KKworLyogMjQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54 eC4iCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eC4i CisgIC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oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAg ICAgInh4Li4uLi4uIgorICAgICAgIiB4eC4uLi4uIgorICAgICAgIi54eC4uLi4uIgorICAgICAg Ii4ueHguLi4uIgorICAgICAgIi4ueHguLi4uIgorICAgICAgIi4uLnh4Li4uIgorICAgICAgIi4u Lnh4Li4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi4u eHguIgorICAgICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4 IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfYmFja3NsYXNoX2JpdHNbXSA9eworICAw eGMwLCAweGMwLCAweGUwLCAweDYwLCAweDMwLCAweDMwLCAweDE4LCAweDE4LCAweGMsIDB4Yywg MHg2LCAweDYsIDB4MywgMHgzfTsKKworLyogMjkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAieHguLi4uLi4iCisgICAgICAieHguLi4uLi4iCisgICAgICAieHh4Li4u Li4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAieC54eC4uLi4iCisgICAgICAieC54eC4uLi4i CisgICAgICAieC4ueHguLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4iCisg ICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLi54eC4iCisgICAg ICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2JpdHNbXSA9eworICAweGMwLCAweGMwLCAweGUw LCAweGUwLCAweGIwLCAweGIwLCAweDk4LAorICAweDk4LCAweDhjLCAweDhjLCAweDg2LCAweDg2 LCAweDgzLCAweDgzfTsKKworLyogMzAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAiLnh4eHh4eC4iCisgICAgICAieHh4eC54Li4iCisgICAgICAieHh4eC54Li4iCisg ICAgICAieHh4eC54Li4iCisgICAgICAiLnh4eC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAg ICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAi Li4ueC54Li4iCisgICAgICAiLi4ueC54Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19waWxjcm93X2JpdHNbXSA9eworICAweDdlLCAweGY0LCAweGY0LCAweGY0LCAweDc0LCAweDE0 LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0fTsKKworLyogMzEKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54eHh4Li4iCisgICAgICAiLnh4eHh4eC4iCisg ICAgICAieC4ueHguLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieHh4eHh4eHgiCisgICAg ICAieHguLi4ueHgiCisgICAgICAieHh4Li54eHgiCisgICAgICAiLnh4eHh4eC4iCisgICAgICAi Li54eHh4Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zbWlsZXlfZmFjZV9iaXRz W10gPXsKKyAgMHgzYywgMHg3ZSwgMHg5OSwgMHg5OSwgMHhmZiwgMHhjMywgMHhlNywgMHg3ZSwg MHgzY307CisKKy8qIDMyCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAg Ii4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4u Li4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4u Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX3JpZ2h0X2Jp dHNbXSA9eworICAweDIwLCAweDEwLCAweDgsIDB4NCwgMHg4LCAweDEwLCAweDIwfTsKKworLyog MzMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi54Li4iCisg ICAgICAiLi4uLnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54Li4uLi4iCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4uLi54Li4iKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHg0 LCAweDgsIDB4MTAsIDB4MjAsIDB4MTAsIDB4OCwgMHg0fTsKKworLyogMzQKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4i CisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisg ICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0c1tdID17CisgIDB4ZDgsIDB4NmMsIDB4MzYs IDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDh9OworCisvKiAzNQorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIu eHgueHguLiIKKyAgICAgICJ4eC54eC4uLiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICIuLnh4 Lnh4LiIKKyAgICAgICIuLi54eC54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2Rv dWJsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDFiLCAweDM2LCAweDZjLCAweGQ4LCAweDZj LCAweDM2LCAweDFifTsKKworLyogMzYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4iCisg ICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisgICAg ICAieC54LnguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVf cmlnaHRfYml0c1tdID17CisgIDB4YTgsIDB4NTQsIDB4MmEsIDB4MTUsIDB4MmEsIDB4NTQsIDB4 YTh9OworCisvKiAzNworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIu Li54LngueCIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICJ4Lngu eC4uLiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIuLi54Lngu eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV9sZWZ0X2JpdHNb XSA9eworICAweDE1LCAweDJhLCAweDU0LCAweGE4LCAweDU0LCAweDJhLCAweDE1fTsKKworLyog MzgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi eC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19z aW5nbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MTAs IDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiAzOQorICAg ICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4u Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4u LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9h bmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDgyLCAweDQ0 LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDAKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY19kb3VibGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MTAs IDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDB9Owor CisvKiA0MQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4u LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAg ICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAg ICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3Rh dGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAw LCAweDAwLCAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEwLCAw eDAwLCAweDAwLCAweDAwfTsKKworLyogNDIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAs IDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4 ODIsIDB4MDB9OworCisvKiA0MworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAg ICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIu LngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVu c2lnbmVkIHNob3J0IG1jX3F1YWRydXBsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAw eDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEw LCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi eC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4u eC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4i KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfdXBfYml0c1td ID17CisgIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4 NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODJ9OworCisvKiA0NQorICAgICgrLWZyaW5nZS1oZWxw ZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIu LngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIuLi54Li4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBs ZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAw eDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEwfTsKKworLyogVE9E TzogIEFkZCB0aGUgZm9sbG93aW5nIGJpdG1hcHM6CisgIChkZWZpbmUtZnJpbmdlLWJpdG1hcCAn YnJlYWtwb2ludCAiXHgzY1x4N2VceGZmXHhmZlx4ZmZceGZmXHg3ZVx4M2MiKQorICAoZGVmaW5l LWZyaW5nZS1iaXRtYXAgJ2hvbGxvdy1yaWdodC10cmlhbmdsZSAiXHhlMFx4OTBceDg4XHg4NFx4 ODRceDg4XHg5MFx4ZTAiKSAqLworCisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBCWVRFU19QRVJfQklUTUFQX1JPVyAgKHNp emVvZiAodW5zaWduZWQgc2hvcnQpKQogI2RlZmluZSBTVEFOREFSRF9CSVRNQVBfSEVJR0hUKGJp dHMpIChzaXplb2YgKGJpdHMpL0JZVEVTX1BFUl9CSVRNQVBfUk9XKQogI2RlZmluZSBGUkJJVFMo Yml0cykgIGJpdHMsIFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGJpdHMpCkBAIC00NjYsNiArODYy LDU5IEBAIHN0YXRpYyBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCBzdGFuZGFyZF9iaXRtYXBzW10gPQog ICB7IEZSQklUUyAodmVydGljYWxfYmFyX2JpdHMpLCAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCiAgIHsgRlJCSVRTIChob3Jpem9udGFsX2Jhcl9iaXRzKSwgICAgIDgsIDAs IEFMSUdOX0JJVE1BUF9CT1RUT00sIDAgfSwKICAgeyBGUkJJVFMgKGVtcHR5X2xpbmVfYml0cyks ICAgICAgICAgOCwgMywgQUxJR05fQklUTUFQX1RPUCwgICAgMCB9LAorCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIC8qIDI0ICovCisgIHsg RlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3dfYml0cyksICAgICA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI1ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3df cmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHMpLCA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisgIC8qIDI2ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHMpLCAg ICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI3ICovCisg IHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYml0cyksICAgICAgICAgICAgICAgICA4LCAwLCBB TElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI4ICovCisgIHsgRlJCSVRTIChtY19iYWNr c2xhc2hfYml0cyksICAgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVS LCAwIH0sCisgIC8qIDI5ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNo X2JpdHMpLCAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMwICov CisgIHsgRlJCSVRTIChtY19waWxjcm93X2JpdHMpLCAgICAgICAgICAgICAgICAgICAgICA4LCAw LCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMxICovCisgIHsgRlJCSVRTIChtY19z bWlsZXlfZmFjZV9iaXRzKSwgICAgICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VO VEVSLCAwIH0sCisgIC8qIDMyICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfcmlnaHRf Yml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMz ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM0ICovCisgIHsgRlJCSVRTICht Y19kb3VibGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCisgIC8qIDM1ICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfbGVm dF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8q IDM2ICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAg ICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM3ICovCisgIHsgRlJCSVRT IChtY190cmlwbGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRN QVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM4ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVf dXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisg IC8qIDM5ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAg ICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQwICovCisgIHsgRlJC SVRTIChtY19kb3VibGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9C SVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQxICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5n bGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0s CisgIC8qIDQyICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfdXBfYml0cyksICAgICAg ICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQzICovCisgIHsg RlJCSVRTIChtY190cmlwbGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQ0ICovCisgIHsgRlJCSVRTIChtY19xdWFkcnVw bGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisgIC8qIDQ1ICovCisgIHsgRlJCSVRTIChtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRz KSwgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIH07CiAKICNkZWZpbmUgTk9fRlJJTkdFX0JJVE1BUCAwCkBAIC0x NzE1LDYgKzIxNjQsMTUwIEBAIElmIG5pbCwgYWxzbyBjb250aW51ZSBsaW5lcyB3aGljaCBhcmUg ZXhhY3RseSBhcyB3aWRlIGFzIHRoZSB3aW5kb3cuICAqLyk7CiAgIERFRlZBUl9MSVNQICgiZnJp bmdlLWJpdG1hcHMiLCBWZnJpbmdlX2JpdG1hcHMsCiAgICAgZG9jOiAvKiBMaXN0IG9mIGZyaW5n ZSBiaXRtYXAgc3ltYm9scy4gICovKTsKICAgVmZyaW5nZV9iaXRtYXBzID0gUW5pbDsKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFIENVUlNPUlMgKi8KKwor ICAvKiAoZ2V0ICdlbXB0eS1saW5lICdmcmluZ2UpID0+IDIzID0+IHRoZSBsYXN0IHN0YW5kYXJk LWJpdG1hcCBiZWZvcmUgdGhpcyBvbmUuCisgIFNlZSBgZnJpbmdlLmVsYC4gKi8KKworICAvKiAy NCAqLworICBERUZTWU0gKFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3csICIrLXZlcnRpY2Fs LWJhci1yaWdodC1hcnJvdyIpOworICBWZnJpbmdlX2JpdG1hcHMgPSBGY29ucyAoUW1jX3ZlcnRp Y2FsX2Jhcl9yaWdodF9hcnJvdywgVmZyaW5nZV9iaXRtYXBzKTsKKyAgRnB1dCAoUW1jX3ZlcnRp Y2FsX2Jhcl9yaWdodF9hcnJvdywgUWZyaW5nZSwgbWFrZV9udW1iZXIgKDI0KSk7CisgIC8qIChn ZXQgJystdmVydGljYWwtYmFyLXJpZ2h0LWFycm93ICdmcmluZ2UpID0+IDI0ICovCisKKyAgLyog MjUg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sKKyAgLyogKGdldCAnKy1xdWFkcnVw bGUtYW5nbGUtdXAgJ2ZyaW5nZSkgPT4gNDQgKi8KKworICAvKiA0NSAqLworICBERUZTWU0gKFFt Y19xdWFkcnVwbGVfYW5nbGVfZG93biwgIistcXVhZHJ1cGxlLWFuZ2xlLWRvd24iKTsKKyAgVmZy aW5nZV9iaXRtYXBzID0gRmNvbnMgKFFtY19xdWFkcnVwbGVfYW5nbGVfZG93biwgVmZyaW5nZV9i aXRtYXBzKTsKKyAgRnB1dCAoUW1jX3F1YWRydXBsZV9hbmdsZV9kb3duLCBRZnJpbmdlLCBtYWtl X251bWJlciAoNDUpKTsKKyAgLyogKGdldCAnKy1xdWFkcnVwbGUtYW5nbGUtZG93biAnZnJpbmdl KSA9PiA0NSAqLworCisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogfQogCiAvKiBHYXJiYWdlIGNvbGxlY3Rpb24gaG9vayAqLwpkaWZmIC0t Z2l0IGEvc3JjL2tleWJvYXJkLmMgYi9zcmMva2V5Ym9hcmQuYwppbmRleCBhYTU4ZTI2Li5kZWVk OTgxIDEwMDY0NAotLS0gYS9zcmMva2V5Ym9hcmQuYworKysgYi9zcmMva2V5Ym9hcmQuYwpAQCAt MTIyNCw2ICsxMjI0LDI5IEBAIHN0YXRpYyBpbnQgcmVhZF9rZXlfc2VxdWVuY2UgKExpc3BfT2Jq ZWN0ICosIExpc3BfT2JqZWN0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCwg Ym9vbCwgYm9vbCwgYm9vbCk7CiBzdGF0aWMgdm9pZCBhZGp1c3RfcG9pbnRfZm9yX3Byb3BlcnR5 IChwdHJkaWZmX3QsIGJvb2wpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCitzdGF0aWMgdm9pZAora2JkX21jX2FjdGl2YXRlX211bHRpcGxl X2N1cnNvcnMgKHZvaWQpCit7CisgIHN0cnVjdCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5k b3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHctPm1jLmRyYXdfbXVsdGlwbGVfY3Vyc29ycyA9IHRy dWU7CisgIHctPm1jLmVyYXNlX211bHRpcGxlX2N1cnNvcnMgPSB0cnVlOworfQorCitzdGF0aWMg dm9pZAora2JkX21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMgKHZvaWQpCit7CisgIHN0cnVjdCB3aW5k b3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHctPm1jLmRy YXdfY3Jvc3NoYWlycyA9IHRydWU7CisgIHctPm1jLmVyYXNlX2Nyb3NzaGFpcnMgPSB0cnVlOwor fQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBMaXNwX09iamVjdAogY29tbWFuZF9s b29wXzEgKHZvaWQpCiB7CkBAIC0xNDE5LDYgKzE0NDIsMTUgQEAgY29tbWFuZF9sb29wXzEgKHZv aWQpCiAgICAgICBWcmVhbF90aGlzX2NvbW1hbmQgPSBjbWQ7CiAgICAgICBzYWZlX3J1bl9ob29r cyAoUXByZV9jb21tYW5kX2hvb2spOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBrYmRfbWNfYWN0aXZhdGVfbXVsdGlwbGVfY3Vy c29ycyAoKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgYWxyZWFkeV9h ZGp1c3RlZCA9IDA7CiAKICAgICAgIGlmIChOSUxQIChWdGhpc19jb21tYW5kKSkKQEAgLTI0NDgs NyArMjQ4MCw3IEBAIHJlYWRfY2hhciAoaW50IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAs CiAJICBpZiAoaGVscF9lY2hvX3Nob3dpbmdfcCAmJiAhRVEgKHNlbGVjdGVkX3dpbmRvdywgbWlu aWJ1Zl93aW5kb3cpKQogCSAgICByZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhICg1KTsKIAkg IGVsc2UKLQkgICAgcmVkaXNwbGF5ICgpOworCSAgICByZWRpc3BsYXkgKDEpOwogCiAJICBpZiAo IWlucHV0X3BlbmRpbmcpCiAJICAgIC8qIE5vcm1hbCBjYXNlOiBubyBpbnB1dCBhcnJpdmVkIGR1 cmluZyByZWRpc3BsYXkuICAqLwpAQCAtMjYyOCw3ICsyNjYwLDcgQEAgcmVhZF9jaGFyIChpbnQg Y29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICB7CiAgICAgICBGZG9fYXV0b19zYXZl IChRbmlsLCBRbmlsKTsKICAgICAgIC8qIEhvb2tzIGNhbiBhY3R1YWxseSBjaGFuZ2Ugc29tZSBi dWZmZXJzIGluIGF1dG8gc2F2ZS4gICovCi0gICAgICByZWRpc3BsYXkgKCk7CisgICAgICByZWRp c3BsYXkgKDIpOwogICAgIH0KIAogICAvKiBUcnkgcmVhZGluZyB1c2luZyBhbiBYIG1lbnUuCkBA IC0yNjkyLDcgKzI3MjQsNyBAQCByZWFkX2NoYXIgKGludCBjb21tYW5kZmxhZywgTGlzcF9PYmpl Y3QgbWFwLAogCSAgICAgICYmICEgQ09OU1AgKFZ1bnJlYWRfY29tbWFuZF9ldmVudHMpKQogCSAg ICB7CiAJICAgICAgRm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0ZXJuIHZvaWQgdXBkYXRlX2VjaG9fYXJlYSAo dm9pZCk7CiBleHRlcm4gdm9pZCB0cnVuY2F0ZV9lY2hvX2FyZWEgKHB0cmRpZmZfdCk7Ci1leHRl cm4gdm9pZCByZWRpc3BsYXkgKHZvaWQpOworZXh0ZXJuIHZvaWQgcmVkaXNwbGF5IChpbnQpOwog CiB2b2lkIHNldF9mcmFtZV9jdXJzb3JfdHlwZXMgKHN0cnVjdCBmcmFtZSAqLCBMaXNwX09iamVj dCk7CiBleHRlcm4gdm9pZCBzeW1zX29mX3hkaXNwICh2b2lkKTsKZGlmZiAtLWdpdCBhL3NyYy9u c3Rlcm0ubSBiL3NyYy9uc3Rlcm0ubQppbmRleCBhMTU2ODRkLi43OGIyMWQyIDEwMDY0NAotLS0g YS9zcmMvbnN0ZXJtLm0KKysrIGIvc3JjL25zdGVybS5tCkBAIC0zMjQzLDIzICszMjQzLDExMiBA QCBOb3RlIHRoYXQgQ1VSU09SX1dJRFRIIGlzIG1lYW5pbmdmdWwgb25seSBmb3IgKGgpYmFyIGN1 cnNvcnMuCiAgICAgICBoID0gY3Vyc29yX2hlaWdodDsKICAgICB9CiAKLSAgci5vcmlnaW4ueCA9 IGZ4LCByLm9yaWdpbi55ID0gZnk7Ci0gIHIuc2l6ZS5oZWlnaHQgPSBoOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICByLm9yaWdpbi54ID0g KHctPm1jLmZ4ID4gMCkKKyAgICAgICAgICAgICAgID8gdy0+bWMuZngKKyAgICAgICAgICAgICAg IDogZng7CisgIHIub3JpZ2luLnkgPSAody0+bWMuZnkgPiAwKQorICAgICAgICAgICAgICAgPyB3 LT5tYy5meQorICAgICAgICAgICAgICAgOiBmeTsKKyAgci5zaXplLmhlaWdodCA9ICh3LT5tYy5o ID4gMCkKKyAgICAgICAgICAgICAgICAgID8gdy0+bWMuaAorICAgICAgICAgICAgICAgICAgOiBo OwogICByLnNpemUud2lkdGggPSB3LT5waHlzX2N1cnNvcl93aWR0aDsKIAorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICAvKiBQcmV2ZW50IHRoZSBjdXJzb3IgZnJvbSBiZWluZyBkcmF3 biBvdXRzaWRlIHRoZSB0ZXh0IGFyZWEuICAqLwogICBuc19jbGlwX3RvX3JvdyAodywgZ2x5cGhf cm93LCBURVhUX0FSRUEsIE5PKTsgLyogZG8gbnNfZm9jdXMoZiwgJnIsIDEpOyBpZiByZW1vdmUg Ki8KIAogCiAgIGZhY2UgPSBGQUNFX0ZST01fSURfT1JfTlVMTCAoZiwgcGh5c19jdXJzb3JfZ2x5 cGgtPmZhY2VfaWQpOwotICBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpCi0g ICAgICA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCi0gICAg ewotICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGZh Y2UpLCBmKSBzZXRdOwotICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChm KTsKLSAgICB9Ci0gIGVsc2UKLSAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUgQ1VSU09SUyAqLwor CisvKiBFWEFNUExFIE9GIEhPVyBUTyBMT09LLVVQIEEgQ09MT1I6CisgIGVudW0gZmFjZV9pZCBm YWNlX2lkID0gbG9va3V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QlVGRkVSIChidWYpOworICAgICAg c3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1Zik7CisgICAgICBib29sIHJlZ2lvbl9hY3Rp dmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICBwdHJk aWZmX3QgcmVnaW9uX2JlZ2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lv bl9iZWdpbm5pbmcgKCkpIDogLTE7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdp b25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lvbl9lbmQgKCkpIDogLTE7CisgICAgICBib29sIHJl Z2lvbl9pbl9ib3VuZHNfcCA9IChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPm1jLnBvc2ludCA+PSByZWdpb25fYmVnaW5uaW5nCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tYy5wb3NpbnQgPCByZWdpb25fZW5kKTsK KyAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAmJiByZWdpb25faW5fYm91bmRz X3AKKyAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAgeworICAgICAgICAgIGVudW0gZmFj ZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24tZmFjZSIpLCB0cnVlKTsKKyAg ICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZSA9IEZBQ0VfRlJP TV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9yZW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AgICBOU0NvbG9yICpob2xsb3dfaW5hY3RpdmVfY29sb3IgPSBuc19s b29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3dfaW5hY3RpdmVf ZmFjZSksIGYpOworICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19pbmFjdGl2 ZV9jb2xvcjsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChmYWNlICYm IE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSkgPT0gbnNfaW5kZXhfY29sb3IgKEZSQU1FX0NVUlNP Ul9DT0xPUiAoZiksIGYpKQorICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IEZSQU1FX0NV UlNPUl9DT0xPUiAoZik7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqZGVmYXVsdF9iZ19mYWNlID0gRkFD RV9GUk9NX0lEIChmLCBERUZBVUxUX0ZBQ0VfSUQpOworICAgICAgICAgICAgICAgICAgICBbbnNf bG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoZGVmYXVsdF9iZ19mYWNl KSwgZikgc2V0XTsKKyAgICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VS U09SX0NPTE9SIChmKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAo ZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFN RV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKyAgICAgIHsKKyAgICAgICAgW25zX2xvb2t1cF9pbmRl eGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGZhY2UpLCBmKSBzZXRdOworICAgICAgICBo b2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09MT1IgKGYpOworICAgICAgfQorICAgICAgZWxz ZQorICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworCisvKiBlbmQgTVVMVElQ TEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAogI2lmZGVmIE5TX0lN UExfQ09DT0EKICAgLyogVE9ETzogVGhpcyBtYWtlcyBkcmF3aW5nIG9mIGN1cnNvciBwbHVzIHRo YXQgb2YgcGh5c19jdXJzb3JfZ2x5cGgKQEAgLTMyODksMjEgKzMzNzgsNDUgQEAgTm90ZSB0aGF0 IENVUlNPUl9XSURUSCBpcyBtZWFuaW5nZnVsIG9ubHkgZm9yIChoKWJhciBjdXJzb3JzLgogICAg ICAgYnJlYWs7CiAgICAgY2FzZSBCQVJfQ1VSU09SOgogICAgICAgcyA9IHI7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBAbGF3 bGlzdCBpcyBmb2N1c2luZyB0aGUgaW5pdGlhbCBkZXZlbG9wbWVudCBvZiBmZWF0dXJlIHJlcXVl c3RzICMxNzY4NAorICAgIGFuZCAjMjI4NzMgb24gTDJSIGxhbmd1YWdlcy4gKi8KKyAgICBpZiAo dy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBICisgICAgICAgICYmIHctPm1jLmdseXBoX2Zs YXZvciAhPSBNQ19HTFlQSExFU1MKKyAgICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1D X0dMWVBIX1RBQikKKyAgICAgIHsKICAgICAgIC8qIElmIHRoZSBjaGFyYWN0ZXIgdW5kZXIgY3Vy c29yIGlzIFIyTCwgZHJhdyB0aGUgYmFyIGN1cnNvcgogICAgICAgICAgb24gdGhlIHJpZ2h0IG9m IGl0cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxlZnQuICAqLwogICAgICAgY3Vyc29yX2ds eXBoID0gZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3KTsKICAgICAgIGlmICgoY3Vyc29yX2dseXBo LT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAgICAgICAgIHMub3JpZ2luLnggKz0gY3Vyc29y X2dseXBoLT5waXhlbF93aWR0aCAtIHMuc2l6ZS53aWR0aDsKKyAgICAgIH0KKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKIAogICAgICAgTlNSZWN0RmlsbCAocyk7CiAgICAgICBicmVhazsK ICAgICB9CiAgIG5zX3VuZm9jdXMgKGYpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCiAgIC8qIGRyYXcgdGhlIGNoYXJhY3RlciB1bmRlciB0 aGUgY3Vyc29yICovCi0gIGlmIChjdXJzb3JfdHlwZSAhPSBOT19DVVJTT1IpCisgIGlmIChjdXJz b3JfdHlwZSAhPSBOT19DVVJTT1IKKyAgICAgICYmIHctPm1jLmdseXBoX2ZsYXZvciAhPSBNQ19H TFlQSExFU1MKKyAgICAgICYmIHctPm1jLmdseXBoX2ZsYXZvciAhPSBNQ19HTFlQSF9UQUIpCiAg ICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFXX0NVUlNPUik7CiAK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRlZiBOU19JTVBMX0NPQ09BCiAgIE5T RW5hYmxlU2NyZWVuVXBkYXRlcyAoKTsKICNlbmRpZgpkaWZmIC0tZ2l0IGEvc3JjL3czMnRlcm0u YyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggZmYwZDJiZi4uMDJmODcyOSAxMDA2NDQKLS0tIGEvc3Jj L3czMnRlcm0uYworKysgYi9zcmMvdzMydGVybS5jCkBAIC05NzMsNiArOTczLDIwIEBAIHN0YXRp YyB2b2lkIHczMl9kcmF3X2JveF9yZWN0IChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICosIGludCwgaW50 LCBpbnQsIGludCwKIHN0YXRpYyB2b2lkCiB4X3NldF9jdXJzb3JfZ2MgKHN0cnVjdCBnbHlwaF9z dHJpbmcgKnMpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBD VVJTT1JTICovCisKKyAgaWYgKHMtPnctPm1jLmN1cnNvcl9nY19kZWZhdWx0KQorICAgIHsKKyAg ICAgIHMtPmdjID0gcy0+Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2M7CisgICAgICByZXR1 cm47CisgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGlmIChzLT5mb250 ID09IEZSQU1FX0ZPTlQgKHMtPmYpCiAgICAgICAmJiBzLT5mYWNlLT5iYWNrZ3JvdW5kID09IEZS QU1FX0JBQ0tHUk9VTkRfUElYRUwgKHMtPmYpCiAgICAgICAmJiBzLT5mYWNlLT5mb3JlZ3JvdW5k ID09IEZSQU1FX0ZPUkVHUk9VTkRfUElYRUwgKHMtPmYpCkBAIC01NjkwLDYgKzU3MDQsMjYgQEAg eF9kcmF3X2hvbGxvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cg KnJvdykKIAogICAvKiBDb21wdXRlIGZyYW1lLXJlbGF0aXZlIGNvb3JkaW5hdGVzIGZvciBwaHlz IGN1cnNvci4gICovCiAgIGdldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCBjdXJzb3Jf Z2x5cGgsICZsZWZ0LCAmdG9wLCAmaCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9wIHkgPT0gV0lORE9X X1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkgPT0gV0lORE9XX1RP X0ZSQU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCistICBoIG9mIEhPTExP V19CT1hfQ1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMgYSB2aXNpYmxlIGdh cCBhYm92ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAgIGggPSByb3ctPmhl aWdodDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICByZWN0LmxlZnQgPSBsZWZ0 OwogICAvKiBXaGVuIG9uIFIyTCBjaGFyYWN0ZXIsIHNob3cgY3Vyc29yIGF0IHRoZSByaWdodCBl ZGdlIG9mIHRoZQogICAgICBnbHlwaCwgdW5sZXNzIHRoZSBjdXJzb3IgYm94IGlzIGFzIHdpZGUg YXMgdGhlIGdseXBoIG9yIHdpZGVyCkBAIC01NzUzLDcgKzU3ODcsMTcgQEAgeF9kcmF3X2Jhcl9j dXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgaW52aXNp YmxlLiAgVXNlIHRoZSBnbHlwaCdzIGZvcmVncm91bmQgY29sb3IgaW5zdGVhZCBpbiB0aGlzCiAJ IGNhc2UsIG9uIHRoZSBhc3N1bXB0aW9uIHRoYXQgdGhlIGdseXBoJ3MgY29sb3JzIGFyZSBjaG9z ZW4gc28KIAkgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICovCi0gICAgICBpZiAoZmFjZS0+ YmFja2dyb3VuZCA9PSBjdXJzb3JfY29sb3IpCisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09 IGN1cnNvcl9jb2xvcgorICAgICAgICAgICYmICF3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29r YXkpCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAljdXJzb3JfY29sb3IgPSBmYWNl LT5mb3JlZ3JvdW5kOwogCiAgICAgICB4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAo dywgdy0+cGh5c19jdXJzb3IueCk7CkBAIC01Nzc0LDYgKzU4MTgsMTcgQEAgeF9kcmF3X2Jhcl9j dXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgIGlmICgo Y3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAJICAgIHggKz0gY3Vyc29y X2dseXBoLT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogQWxpZ24gYWxsIGZha2UgQkFSX0NV UlNPUiBvZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBgb3BvaW50X3gnLiAqLworICAgIGlmICh3 LT5tYy5meCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIAkgIHczMl9maWxsX2FyZWEgKGYsIGhkYywgY3Vyc29yX2NvbG9yLCB4LAogCQkJ IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB3LT5waHlzX2N1cnNvci55KSwKIAkJCSB3aWR0 aCwgcm93LT5oZWlnaHQpOwpAQCAtNTg5NSwzMSArNTk1MCwxNTkgQEAgdzMyX2RyYXdfd2luZG93 X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93LAog CSAgcmV0dXJuOwogCX0KIAotICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKLQl7Ci0JY2FzZSBI T0xMT1dfQk9YX0NVUlNPUjoKLQkgIHhfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBnbHlwaF9yb3cp OwotCSAgYnJlYWs7CiAKLQljYXNlIEZJTExFRF9CT1hfQ1VSU09SOgotCSAgZHJhd19waHlzX2N1 cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFXX0NVUlNPUik7Ci0JICBicmVhazsKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUgQ1VSU09SUyAqLwogCi0JY2Fz ZSBCQVJfQ1VSU09SOgotCSAgeF9kcmF3X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B7CisgICAgICBpZiAody0+bWMucmVk ID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsK KyAgICAgICAgICBYR0NWYWx1ZXMgZ2NfdmFsdWVzOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcg bWFzayA9IEdDRm9udCB8IEdDRm9yZWdyb3VuZCB8IEdDQmFja2dyb3VuZDsKKyAgICAgICAgICBn Y192YWx1ZXMuZm9udCA9IEZSQU1FX0ZPTlQgKGYpOworICAgICAgICAgIHN0cnVjdCBmYWNlICpk ZWZhdWx0X2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIERFRkFVTFRfRkFDRV9JRCk7CisgICAgICAg ICAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgICAgICAgICAgQ0hFQ0tfQlVGRkVS IChidWYpOworICAgICAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAg ICAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9k ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg bWFya19hY3RpdmUpKSk7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAo cmVnaW9uX2FjdGl2ZV9wKSA/IFhJTlQgKEZyZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAg ICAgICAgIHB0cmRpZmZfdCByZWdpb25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBYSU5UIChG cmVnaW9uX2VuZCAoKSkgOiAtMTsKKyAgICAgICAgICBib29sIHJlZ2lvbl9pbl9ib3VuZHNfcCA9 IChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5tYy5wb3NpbnQgPj0gcmVnaW9uX2JlZ2lubmluZworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPm1jLnBvc2ludCA8IHJlZ2lvbl9lbmQpOworICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnIGJ5 IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGlu IHczMmZucy5jLiAgKi8KKyAgICAgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAg ICAgICYmIHJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVn aW9uX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZh a2UtY3Vyc29yLXJlZ2lvbi1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICBzdHJ1Y3QgZmFj ZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2Fj dGl2ZV9yZWdpb25fZmFjZV9pZCk7CisgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5k ID0gZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICBnY192YWx1ZXMuYmFj a2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAg ICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAg ICAgICAgICAgICYmICFyZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAgICAgICAgICAgICAgICYm IGFjdGl2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Pm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djJy4gICovCisgICAgICAgICAgdy0+ bWMuY3Vyc29yX2djX2RlZmF1bHQgPSB0cnVlOworICAgICAgICAgIGRyYXdfcGh5c19jdXJzb3Jf Z2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNv cl9nY19kZWZhdWx0ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJz b3JfZ2MgPSBvcmlnaW5hbF9jdXJzb3JfZ2M7CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsK KyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX3BpeGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4 ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICB4X2RyYXdfaG9sbG93X2N1cnNvciAodywgZ2x5 cGhfcm93KTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9y aWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAg eF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jvdyk7CisgICAgICBicmVhazsKKyAgICB9 CisgICAgY2FzZSBGSUxMRURfQk9YX0NVUlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVk ID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsK KyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgZnVuY3Rpb25hbGl0eSBvZiBgeF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N1 cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZp c2libGVfb2theSA9IHRydWU7CisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBo X3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAgICAgICAgdy0+bWMuY3Vyc29y X2djX2ludmlzaWJsZV9va2F5ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMy LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAg ICAgZWxzZQorICAgICAgICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNv cl93aWR0aCwgSEJBUl9DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTk9f Q1VSU09SOgorICAgICAgdy0+cGh5c19jdXJzb3Jfd2lkdGggPSAwOworICAgICAgYnJlYWs7Cisg ICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgpOworICB9CiAKLQljYXNlIEhCQVJfQ1VS U09SOgotCSAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBI QkFSX0NVUlNPUik7Ci0JICBicmVhazsKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KIAotCWNhc2UgTk9fQ1VSU09SOgotCSAgdy0+cGh5c19jdXJz b3Jfd2lkdGggPSAwOwotCSAgYnJlYWs7CiAKLQlkZWZhdWx0OgotCSAgZW1hY3NfYWJvcnQgKCk7 Ci0JfQogICAgIH0KIH0KIApkaWZmIC0tZ2l0IGEvc3JjL3dpbmRvdy5oI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0aW9uICh3aW5kb3cgcmVsYXRpdmUp IG9mIGhvcml6b250YWwvdmVydGljYWwgcnVsZXJzLiAqLworICBpbnQgZngsIGZ5LCBoOworCisg IC8qIFJlY29yZCBGUk9NX1dIRVJFIHdoZW4gYHJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEn IGlzIGNhbGxlZC4gKi8KKyAgaW50IHJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWE7Cit9Owor CisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK Kwogc3RydWN0IGN1cnNvcl9wb3MKIHsKICAgLyogUGl4ZWwgcG9zaXRpb24uICBUaGVzZSBhcmUg YWx3YXlzIHdpbmRvdyByZWxhdGl2ZS4gICovCkBAIC0xODEsNiArMjMxLDIyIEBAIHN0cnVjdCB3 aW5kb3cKICAgICAvKiBUaGUgaGVscCBlY2hvIHRleHQgZm9yIHRoaXMgd2luZG93LiAgUW5pbCBp ZiB0aGVyZSdzIG5vbmUuICAqLwogICAgIExpc3BfT2JqZWN0IG1vZGVfbGluZV9oZWxwX2VjaG87 CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisK KyAgICAvKiBUaGUgY2FjaGUgZm9yIG11bHRpcGxlIGdseXBoIGN1cnNvcnMuICBGb3IgYW4gZXhh bXBsZSBvZiB0aGUgc3RydWN0dXJlIG9mCisgICAgdGhlIGxpc3QsIHNlZSB0aGUgY29tbWVudHMg YXQgdGhlIGJlZ2lubmluZyBvZiBgbWNfY2FsYycgaW4geGRpc3AuYy4gICovCisgICAgTGlzcF9P YmplY3QgbXVsdGlwbGVfY3Vyc29yc19jYWNoZTsKKworICAgIC8qIFRoZSBjYWNoZSBmb3IgbXVs dGlwbGUgZ2x5cGgvZ2x5cGhsZXNzIGN1cnNvcnMgdGhhdCBmb3JtIGNyb3NzaGFpcnMuICBGb3Ig YW4KKyAgICBleGFtcGxlIG9mIHRoZSBzdHJ1Y3R1cmUgb2YgdGhlIGxpc3QsIHNlZSB0aGUgY29t bWVudHMgYXQgdGhlIGJlZ2lubmluZyBvZgorICAgIGBtY19jcm9zc2hhaXJzJyBpbiB4ZGlzcC5j LiAgKi8KKyAgICBMaXNwX09iamVjdCBjcm9zc2hhaXJzX2NhY2hlOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgICAgLyogTm8gTGlzcCBkYXRhIG1heSBmb2xsb3cgYmVsb3cgdGhp cyBwb2ludCB3aXRob3V0IGNoYW5naW5nCiAgICAgICAgbWFya19vYmplY3QgaW4gYWxsb2MuYy4g IFRoZSBtZW1iZXIgY3VycmVudF9tYXRyaXggbXVzdCBiZSB0aGUKICAgICAgICBmaXJzdCBub24t TGlzcCBtZW1iZXIuICAqLwpAQCAtMjgzLDYgKzM0OSwxNiBAQCBzdHJ1Y3Qgd2luZG93CiAKICNp ZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIFRoZSBwcmVmaXggZm9yIHdpbmRvdyBwb2lu dGVycyByZWxhdGluZyB0byBtdWx0aXBsZSBjdXJzb3JzLiAgKi8KKyAgICBzdHJ1Y3QgbXVsdGlw bGVfY3Vyc29ycyBtYzsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIC8qIEN1 cnNvciB0eXBlIG9mIGxhc3QgY3Vyc29yIGRyYXduIG9uIHRoZSB3aW5kb3cuICAqLwogICAgIGVu dW0gdGV4dF9jdXJzb3Jfa2luZHMgcGh5c19jdXJzb3JfdHlwZTsKIApAQCAtNDIxLDYgKzQ5Nywy NSBAQCBYV0lORE9XIChMaXNwX09iamVjdCBhKQogICByZXR1cm4gWFVOVEFHIChhLCBMaXNwX1Zl Y3Rvcmxpa2UsIHN0cnVjdCB3aW5kb3cpOwogfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitJTkxJTkUgdm9pZAord3NldF9tdWx0aXBsZV9j dXJzb3JzX2NhY2hlIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCB2YWwpCit7CisgIHct Pm11bHRpcGxlX2N1cnNvcnNfY2FjaGUgPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCit3c2V0X2Ny b3NzaGFpcnNfY2FjaGUgKHN0cnVjdCB3aW5kb3cgKncsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAg dy0+Y3Jvc3NoYWlyc19jYWNoZSA9IHZhbDsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogLyogTW9zdCBjb2RlIHNob3VsZCB1c2UgdGhlc2UgZnVuY3Rpb25zIHRvIHNldCBMaXNw IGZpZWxkcyBpbiBzdHJ1Y3QKICAgIHdpbmRvdy4gICovCiBJTkxJTkUgdm9pZApkaWZmIC0tZ2l0 IGEvc3JjL3hkaXNwLmMgYi9zcmMveGRpc3AuYwppbmRleCA5YjRmZWJkLi5lZjRhMDRlIDEwMDY0 NAotLS0gYS9zcmMveGRpc3AuYworKysgYi9zcmMveGRp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gKGZlYXR1cmUg cmVxdWVzdCkKKworCitQQVRDSCBWRVJTSU9OOiAgMDE0LjAwMCBbMDgvMjgvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDAxIFswOS8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDIg WzA5LzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwMyBbMDkvMDUvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDA0IFswOS8wOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDUg WzA5LzA5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwNiBbMDkvMDkvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDA3IFswOS8xMC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMDgg WzA5LzEwLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwOSBbMDkvMTEvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDEwIFswOS8xMy8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTEg WzA5LzE0LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxMiBbMDkvMTcvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDEzIFswOS8xOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTQg WzA5LzE5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxNSBbMDkvMjMvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDE2IFswOS8yNC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMTcg WzA5LzI1LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxOCBbMDkvMjYvMjAxOF0KKyAgICAg ICAgICAgICAgICAwMTQuMDE5IFsxMC8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4wMjAg WzEwLzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAyMSBbMTAvMDkvMjAxOF0KKyAgICAg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BldDoKKworICAocHJvZ24KKyAgICAocmVxdWlyZSAncGFja2Fn ZSkKKyAgICAoYWRkLXRvLWxpc3QgJ3BhY2thZ2UtYXJjaGl2ZXMgJygibWVscGEiIC4gImh0dHA6 Ly9tZWxwYS5taWxrYm94Lm5ldC9wYWNrYWdlcy8iKSB0KQorICAgIChwYWNrYWdlLWluaXRpYWxp emUpCisgICAgKHBhY2thZ2UtcmVmcmVzaC1jb250ZW50cykKKyAgICAocGFja2FnZS1pbnN0YWxs ICdtdWx0aXBsZS1jdXJzb3JzKSkKKworLSAgVG8gdHJ5IG91dCB0aGUgY3Jvc3NoYWlycyBmZWF0 dXJlLCBvcGVuIGEgcmVsYXRpdmVseSBzaW1wbGUgYnVmZmVyIChlLmcuLCBqdXN0IGNvZGUgb3Ig dGV4dCkgYW5kIHR5cGU6ICBNLXggKy1tb2RlCisKKy0gIFRvIHNlZSBhbiBleGFtcGxlIG9mIGEg dmFyaWV0eSBvZiBidWlsdC1pbiBjdXJzb3Igc3R5bGVzIGFuZCB3aWR0aHMsIHR5cGU6ICBNLXgg bWMtdGVzdAorCisKK0VYQU1QTEUgT0YgVVNJTkcgTVVMVElQTEUgRkFLRSBDVVJTT1JTOgorCisg IDs7OyAnKEJVRkZFUi1QT1NJVElPTiBDVVJTT1ItVFlQRSBDVVJTT1ItQ09MT1IpCisgIChzZXRx IG11bHRpcGxlLWN1cnNvcnMtY29uZiAnKCgxICJoYmFyIiAibWFnZW50YSIpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoMyAiYm94IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICg0ICJob2xsb3ciICIjMDAwMEZGIikKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAgICAg ICAgIC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gaW52aXNpYmxlIHRleHQuICAqLworICAg IHNjYW4gPSBza2lwX2ludmlzaWJsZSAoc2NhbiwgJm5leHRfYm91bmRhcnksIGVuZCwgUW5pbCk7 CisgICAgaWYgKHNjYW4gIT0gb2xkX3NjYW4pCisgICAgICBzY2FuX2J5dGUgPSBDSEFSX1RPX0JZ VEUgKHNjYW4pOworICAgIGlmIChzY2FuID49IGVuZCkKKyAgICAgIGdvdG8gZW5kbG9vcDsKKyAg fQorICAgICAgLyogVGVzdCByZWFjaGluZyB0aGUgZ29hbCBjb2x1bW4uICBXZSBkbyB0aGlzIGFm dGVyIHNraXBwaW5nCisgICBpbnZpc2libGUgY2hhcmFjdGVycywgc28gdGhhdCB3ZSBwdXQgcG9p bnQgYmVmb3JlIHRoZQorICAgY2hhcmFjdGVyIG9uIHdoaWNoIHRoZSBjdXJzb3Igd2lsbCBhcHBl YXIuICAqLworICAgICAgaWYgKGNvbCA+PSBnb2FsKQorICBicmVhazsKKyAgICAgIHByZXZfY29s ID0gY29sOworICAgICAgeyAvKiBDaGVjayBkaXNwbGF5IHByb3BlcnR5LiAgKi8KKyAgcHRyZGlm Zl90IGVuZHA7CisgIGludCB3aWR0aCA9IG1jX2NoZWNrX2Rpc3BsYXlfd2lkdGggKHNjYW4sIGNv bCwgJmVuZHApOworICBpZiAod2lkdGggPj0gMCkKKyAgICB7CisgICAgICBjb2wgKz0gd2lkdGg7 CisgICAgICBpZiAoZW5kcCA+IHNjYW4pIC8qIEF2b2lkIGluZmluaXRlIGxvb3BzIHdpdGggMC13 aWR0aCBvdmVybGF5cy4gICovCisgICAgICAgIHsKKyAgICBzY2FuID0gZW5kcDsKKyAgICBzY2Fu X2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOworICAgIGNvbnRpbnVlOworICAgICAgICB9Cisg ICAgfQorICAgICAgfQorICAgICAgLyogQ2hlY2sgY29tcG9zaXRpb24gc2VxdWVuY2UuICAqLwor ICAgICAgaWYgKGNtcF9pdC5pZCA+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B0aGlzIGNoYXJhY3RlcjsKKyAgICAgICBpdCBk aXNwbGF5cyBhcyBpdHNlbGYuICAqLworICAgIGlmIChjID09ICdcbicpCisgICAgICBnb3RvIGVu ZGxvb3A7CisgICAgaWYgKGMgPT0gJ1xyJyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNl bGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQorICAgICAgZ290byBlbmRsb29wOworICAgIGlmIChjID09 ICdcdCcpCisgICAgICB7CisgICAgICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAgICAgIGNvbCA9 IGNvbCAvIHRhYl93aWR0aCAqIHRhYl93aWR0aDsKKyAgICAgIH0KKyAgICBlbHNlIGlmIChtdWx0 aWJ5dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQorICAgICAgeworICAgICAgICAvKiBTdGFydCBv ZiBtdWx0aS1ieXRlIGZvcm0uICAqLworICAgICAgICB1bnNpZ25lZCBjaGFyICpwdHI7CisgICAg ICAgIGludCBieXRlcywgd2lkdGg7CisgICAgICAgIHB0ciA9IEJZVEVfUE9TX0FERFIgKHNjYW5f Ynl0ZSk7CisgICAgICAgIE1DX01VTFRJQllURV9CWVRFU19XSURUSCAocHRyLCBkcCwgYnl0ZXMs IHdpZHRoKTsKKyAgICAgICAgLyogU3VidHJhY3Qgb25lIHRvIGNvbXBlbnNhdGUgZm9yIHRoZSBp bmNyZW1lbnQKKyAgICAgdGhhdCBpcyBnb2luZyB0byBoYXBwZW4gYmVsb3cuICAqLworICAgICAg ICBzY2FuX2J5dGUgKz0gYnl0ZXMgLSAxOworICAgICAgICBjb2wgKz0gd2lkdGg7CisgICAgICB9 CisgICAgZWxzZSBpZiAoY3RsX2Fycm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3NykpCisgICAg ICBjb2wgKz0gMjsKKyAgICBlbHNlIGlmIChjIDwgMDQwIHx8IGMgPj0gMDE3NykKKyAgICAgIGNv bCArPSA0OworICAgIGVsc2UKKy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UiAoZHAsIGMpKSkKKyAgewor ICAgIGNoYXJ2ZWMgPSBESVNQX0NIQVJfVkVDVE9SIChkcCwgYyk7CisgICAgbiA9IEFTSVpFIChj aGFydmVjKTsKKyAgfQorICAgICAgZWxzZQorICB7CisgICAgY2hhcnZlYyA9IFFuaWw7CisgICAg biA9IDE7CisgIH0KKyAgICAgIGZvciAoaSA9IG4gLSAxOyBpID49IDA7IC0taSkKKyAgeworICAg IGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgIHsKKyAgICAgICAgLyogVGhpcyBzaG91bGQg YmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAgICBuZXh0X2VsZW1lbnRfZnJvbV9kaXNwbGF5X3Zl Y3RvciBkb2VzIGl0LiAgKi8KKyAgICAgICAgTGlzcF9PYmplY3QgZW50cnkgPSBBUkVGIChjaGFy dmVjLCBpKTsKKyAgICAgICAgaWYgKEdMWVBIX0NPREVfUCAoZW50cnkpKQorICAgIGMgPSBHTFlQ SF9DT0RFX0NIQVIgKGVudHJ5KTsKKyAgICAgICAgZWxzZQorICAgIGMgPSAnICc7CisgICAgICB9 CisgICAgaWYgKGMgPj0gMDQwICYmIGMgPCAwMTc3KQorICAgICAgY29sKys7CisgICAgZWxzZSBp ZiAoYyA9PSAnXG4nCisgICAgICAgfHwgKGMgPT0gJ1xyJworICAgICAgICAgICAmJiBFUSAoQlZB UiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKSkKKyAgICAgIHsKKyAg ICAgICAgcHRyKys7CisgICAgICAgIGdvdG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgIH0K KyAgICBlbHNlIGlmIChjID09ICdcdCcpCisgICAgICB7CisgICAgICAgIGlmICh0YWJfc2VlbikK KyAgICBjb2wgPSAoKGNvbCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOwor ICAgICAgICBwb3N0X3RhYiArPSBjb2w7CisgIC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ry ID0gU1NEQVRBIChhcmcpOworICBlbHNlIGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N5bWJvbCkK KyAgICBzdHIgPSBTU0RBVEEgKFNZTUJPTF9OQU1FIChhcmcpKTsKKyAgZWxzZSByZXR1cm4gLTE7 CisgIGlmICghc3RyY21wIChzdHIsICJib3giKSkKKyAgICByZXR1cm4gRklMTEVEX0JPWF9DVVJT T1I7CisgIGlmICghc3RyY21wIChzdHIsICJob2xsb3ciKSkKKyAgICByZXR1cm4gSE9MTE9XX0JP WF9DVVJTT1I7CisgIGlmICghc3RyY21wIChzdHIsICJoYmFyIikpCisgICAgcmV0dXJuIEhCQVJf Q1VSU09SOworICBpZiAoIXN0cmNtcCAoc3RyLCAiYmFyIikpCisgICAgcmV0dXJuIEJBUl9DVVJT T1I7CisgIGlmICghc3RyY21wIChzdHIsICJsZWZ0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1 cm4gTEVGVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAicmlnaHQtZnJpbmdl LWJpdG1hcCIpKQorICAgIHJldHVybiBSSUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNt cCAoc3RyLCAibm8iKSkKKyAgICByZXR1cm4gTk9fQ1VSU09SOworICByZXR1cm4gLTE7Cit9CisK K3N0YXRpYyBMaXNwX09iamVjdAorbWNfY3Vyc29yX3R5cGVfdG9fbGlzcCAoaW50IGFyZykKK3sK KyAgc3dpdGNoIChhcmcpCisgICAgeworICAgIGNhc2UgRklMTEVEX0JPWF9DVVJTT1I6IHJldHVy biBRYm94OworICAgIGNhc2UgSE9MTE9XX0JPWF9DVVJTT1I6IHJldHVybiBRaG9sbG93OworICAg IGNhc2UgSEJBUl9DVVJTT1I6IHJldHVybiBRaGJhcjsKKyAgICBjYXNlIEJBUl9DVVJTT1I6IHJl dHVybiBRYmFyOworICAgIGNhc2UgTEVGVF9GUklOR0VfQklUTUFQOiByZXR1cm4gaW50ZXJuICgi bGVmdC1mcmluZ2UtYml0bWFwIik7CisgICAgY2FzZSBSSUdIVF9GUklOR0VfQklUTUFQOiByZXR1 cm4gaW50ZXJuICgicmlnaHQtZnJpbmdlLWJpdG1hcCIpOworICAgIGNhc2UgTk9fQ1VSU09SOgor ICAgIGRlZmF1bHQ6IHJldHVybiBpbnRlcm4gKCJubyIpOworICAgIH0KK30KKworc3RhdGljIExp c3BfT2JqZWN0CittY19jb2xvcl92ZWN0b3JfY2FsYyAoc3RydWN0IHdpbmRvdyAqdywgTGlzcF9P YmplY3QgY29sb3IpCit7CisgIENIRUNLX1NUUklORyAoY29sb3IpOworICBMaXNwX09iamVjdCB0 YXJnZXRfZnJhbWUgPSB3LT5mcmFtZTsKKyAgTGlzcF9PYmplY3QgY29sb3JfdmFsdWVzOworICBk b3VibGUgdmFsbWF4ID0gWElOVCAoWENBUiAoRnh3X2NvbG9yX3ZhbHVlcyAoYnVpbGRfc3RyaW5n ICgiI2ZmZmZmZiIpLCB0YXJnZXRfZnJhbWUpKSk7CisgIExpc3BfT2JqZWN0IHZsaXN0OworICBw dHJkaWZmX3QgeDsKKyAgaW50IGkgPSAwOworICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAg TGlzcF9PYmplY3QgdmVjdG9yID0gKEZtYWtlX3ZlY3RvciAobWFrZV9udW1iZXIgKDMpLCBRbmls KSk7CisgIGlmICghTklMUCAoRm1lbXEgKChGZnJhbWVwICh0YXJnZXRfZnJhbWUpKSwgbGlzdG4g KENPTlNUWVBFX0hFQVAsIDMsIGludGVybiAoIngiKSwgaW50ZXJuICgidzMyIiksIGludGVybiAo Im5zIikpKSkpCisgICAgeworICAgICAgY29sb3JfdmFsdWVzID0gKEZ4d19jb2xvcl92YWx1ZXMg KGNvbG9yLCB0YXJnZXRfZnJhbWUpKTsKKyAgICAgIGZvciAodmxpc3QgPSBjb2xvcl92YWx1ZXM7 CisgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICA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FUiAody0+Y29udGVu dHMpLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSksICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAg ICBibTEgPSBGYXNzcSAoYml0bWFwLCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAg eworICAgIGlmICgoYm0xID0gWENEUiAoYm0xKSksIE5JTFAgKGJtMSkpCisgICAgICByZXR1cm4g Tk9fRlJJTkdFX0JJVE1BUDsKKyAgICBpZiAoQ09OU1AgKGJtMSkpCisgICAgICB7CisgICAgICAg IGxuMSA9IFhJTlQgKEZsZW5ndGggKGJtMSkpOworICAgICAgICBpZiAocGFydGlhbF9wKQorICAg IHsKKyAgICAgIGlmIChsbjEgPiBpeDIpCisgICAgICAgIHsKKyAgICAgICAgICBibSA9IEZudGgg KG1ha2VfbnVtYmVyIChpeDIpLCBibTEpOworICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisg ICAgICBnb3RvIGZvdW5kOworICAgICAgICB9CisgICAgfQorICAgICAgICBlbHNlCisgICAgewor ICAgICAgaWYgKGxuMSA+IGl4MSkKKyAgICAgICAgeworICAgICAgICAgIGJtID0gRm50aCAobWFr ZV9udW1iZXIgKGl4MSksIGJtMSk7CisgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAg IGdvdG8gZm91bmQ7CisgICAgICAgIH0KKyAgICB9CisgICAgICB9CisgICAgZWxzZSBpZiAoKGJt ID0gYm0xLCAhRVEgKGJtLCBRdCkpKQorICAgICAgZ290byBmb3VuZDsKKyAgfQorICAgIH0KKyAg aWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9h bGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2lu ZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IEZhc3NxIChiaXRtYXAsIEJWQVIg KCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsKKyAgICAgIGlmIChD T05TUCAoYm0yKSkKKyAgeworICAgIGlmICgoYm0yID0gWENEUiAoYm0yKSksICFOSUxQIChibTIp KQorICAgICAgeworICAgICAgICBpZiAoQ09OU1AgKGJtMikpCisgICAgeworICAgICAgbG4yID0g WElOVCAoRmxlbmd0aCAoYm0yKSk7CisgICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICB7Cisg ICAgICAgICAgaWYgKGxuMiA+IGl4MikKKyAgICAgIHsKKyAgICAgICAgYm0gPSBGbnRoIChtYWtl X251bWJlciAoaXgyKSwgYm0yKTsKKyAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAg ICBnb3RvIGZvdW5kOworICAgICAgfQorICAgICAgICB9CisgICAgfQorICAgICAgfQorICB9Cisg ICAgfQorICBpZiAobG4xID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gRm50aCAobWFrZV9udW1i ZXIgKGl4MSksIGJtMSk7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICBnb3RvIGZvdW5kOwor ICAgIH0KKyAgaWYgKGxuMiA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IEZudGggKG1ha2VfbnVt YmVyIChpeDEpLCBibTIpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgZ290byBmb3VuZDsK KyAgICAgIHJldHVybiBOT19GUklOR0VfQklUTUFQOworICAgIH0KKyAgZWxzZSBpZiAoKGJtID0g Ym0yLCBOSUxQIChibSkpKQorICAgIHJldHVybiBOT19GUklOR0VfQklUTUFQOworIGZvdW5kOgor ICByZXR1cm4gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJtKTsKK30KKwordm9pZAorbWNfZXJhc2Vf cGh5c19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGludCBmbGF2b3IpCit7CisgIHN0cnVjdCBm cmFt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gICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAg LyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gbm90aGluZy4gKi8KKyAgYm9vbCBoc2NsX2Fs bF9wZXJtXzBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct Pm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9o c2Nyb2xsID09IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBz b21ldGhpbmcgZWxzZSBiZXNpZGVzIGhvcml6b250YWxseSBzY3JvbGxpbmcgdGhlCisgICAgICAg ICAgICAgICBjdXJyZW50IGxpbmUgZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50 IGxpbmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBi b29sIGhzY2xfYWxsX3Blcm1fMV9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMt eCA8IGFuZCAuLi4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9u dGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8yX3Ag PSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct PmhzY3JvbGwgPT0gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Ny b2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9 IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpOyBhbmQsIHRoZW4g cHJlc3MgdGhlIGxlZnQgYXJyb3cga2V5IG9uZSB0aW1lLgorICAgICAgICAgICAgICAgQ3VycmVu dCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiovCisgIGJvb2wg aHNjbF90ZW1wX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAg ICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHct PmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0g MCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyB0aGF0IGNhdXNl cyB0aGUgY3VycmVudCBsaW5lIHRvIGJlCisgICAgICAgICAgICAgICBob3Jpem9udGFsbHkgc2Ny b2xsZWQgZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob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G8gc2VlIHRoYXQgYGdseXBoX3Jvdy0+ b3ZlcmxheV9hcnJvd19iaXRtYXBgIHNhdGlzZmllcyB0aGUgZmlyc3QgY29uZGl0aW9uCisgICAg ICBvZiAod2hpY2ggIT0gTk9fRlJJTkdFX0JJVE1BUCkuICBBdCB0aGlzIHRpbWUsIEBsYXdsaXN0 IHByZWZlcnMgbm90IHRvCisgICAgICByZWx5IHVwb24gYSBMaXNwIHNldHRpbmcgdXNpbmcgYHNl dC1mcmluZ2UtYml0bWFwLWZhY2UnLiAqLworICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5nZV9i aXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgIGds eXBoX3Jvdy0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgIGRyYXdfZnJpbmdlX2JpdG1h cCAodywgZ2x5cGhfcm93LCB0cnVlKTsKKyAgICB9CisgICAgZWxzZSBpZiAoIXJlbW92ZV9wCisg ICAgICAgICAgICAgJiYgZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAg ICAgICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9w ZXJtXzBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAg ICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3Rl bXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3Blcm1fcCkpCisgICAgICB7CisgICAgICAg IGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQgPQorICAgICAgICAgICghYWN0aXZl X2N1cnNvcl9wCisgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWluYWN0aXZlLWZh Y2UiKSwgdHJ1ZSkKKyAgICAgICAgICA6IChhY3RpdmVfY3Vyc29yX3AKKyAgICAgICAgICAgICAm JiBtaW5pbWFsX3ApCisgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRl cm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1taW5pbWFsLWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAg ICA6IChhY3RpdmVfY3Vyc29yX3AKKyAgICAgICAgICAgICAmJiAhbWluaW1hbF9wKQorICAgICAg ICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93 LWhzY2wtZmFjZSIpLCB0cnVlKQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAg ICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IExFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAg ICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgICA6IERF RkFVTFRfRkFDRV9JRDsKKyAgICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0g ZmFjZV9pZDsKKyAgICAgICAgaWYgKGhzY2xfYWxsX3Blcm1fMF9wKQorICAgICAgICAgIGZyaW5n ZV9iaXRtYXAgPSBtY19nZXRfbG9naWNhbF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhz Y2wtcGVybSIpLCBm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ICAgICAgICA/IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgZ2x5cGhfcm93 LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAgKHcs IGdseXBoX3JvdywgdHJ1ZSk7CisgICAgICB9CisgICAgICBlbHNlIGlmICghcmVtb3ZlX3AKKyAg ICAgICAgICAgICAgICYmIChmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJP VworICAgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisg ICAgICAgICAgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJP VworICAgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAg ICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkpCisg ICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGZsYXZvciA9 PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBNQ19IT0xMT1df UkVDVEFOR0xFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1j X2hvbGxvd19yZWN0YW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZF UlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFt Y192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7CisgICAgICAgICAgZnJpbmdl X2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICAgICAgICA/IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQor ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAg ZmFjZV9pZCA9IChjdXJzb3JfdHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXZlcnRpY2Fs LWJhci1mYWNlIiksIHRydWUpCisgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lE OworICAgICAgICAgIGdseXBoX3Jvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gZmFsc2U7CisgICAg ICAgICAgZ2x5cGhfcm93LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSAwOworICAgICAgICAg IGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAg ICAgZ2x5cGhfcm93LT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgICAg Z2x5cGhfcm93LT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICBkcmF3X2ZyaW5n ZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgZmFsc2UpOworICAgICAgICB9CisgICAgICAgIGVsc2Ug aWYgKGZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNf R0xZUEhMRVNTCisgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19HTFlQSF9UQUIpCisg ICAgICAgICAgeworICAgICAgICAgICAgdy0+bWMuaCA9IGg7CisgICAgICAgICAgICB3LT5tYy5m eCA9IGZ4OworICAgICAgICAgICAgdy0+bWMuZnkgPSBmeTsKKyAgICAgICAgICAgIHctPm1jLmds eXBoX2ZsYXZvciA9IGZsYXZvcjsKKyAgICAgICAgICAgIHctPm1jLnJlZCA9IFhGTE9BVF9EQVRB IChBUkVGIChjb2xvcl92ZWN0b3IsIDApKTsKKyAgICAgICAgICAgIHctPm1jLmdyZWVuID0gWEZM T0FUX0RBVEEgKEFSRUYgKGNvbG9yX3ZlY3RvciwgMSkpOworICAgICAgICAgICAgdy0+bWMuYmx1 ZSA9IFhGTE9BVF9EQVRBIChBUkVGIChjb2xvcl92ZWN0b3IsIDIpKTsKKyAgICAgICAgICAgIHct Pm1jLnBvc2ludCA9IHBvc2ludDsKKyAgICAgICAgICAgIC8qIFNvbWUgb2YgdGhlc2UgdmFsdWVz IGNvbWUgdGhyb3VnaCBhcyAxLjAwMzkwNiwgd2hpY2ggY2F1c2VzIGEgYnJlYWthZ2UKKyAgICAg ICAgICAgIG9mI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93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVh XSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hB Ul9HTFlQSAorICAgICAgICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgt PmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAn QicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdT JworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8g JzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRo LAorICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAg IGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9w LAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywg Z2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQor ICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gOSkKKyAgICAgICAgICAgPyAiXFx0IgorICAgICAg ICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEw KQorICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAg ICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAgICAgICAgID8gIlxccyIKKyAgICAg ICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5 CisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSAxMAorICAgICAgICAgICAgJiYgZ2x5cGgt PnUuY2ggIT0gMzIpCisgICAgICAgICAgID8gU1NEQVRBIChjaGFyYWN0ZXIpCisgICAgICAgICA6 ICJcXD8iKSk7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBTVFJFVENIX0dMWVBI KQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQg JTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAlNWQgJTRkICAlM2Qg ICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAor ICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAx KSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAgICBnbHlwaC0+Y2hh cnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdC JworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdT JworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICcwJwor ICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAg IDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xp bmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT54 LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIg OiAiLS0iLAorICAgICAgICAiXFxTIik7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9 PSBJTUFHRV9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICIg JTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQg JTVkICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51 c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdJJywKKyAgICAg ICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dp ZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5pbWdfaWQsCisgICAgICAgIGds eXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBn bHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlw aC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAg ICcuJyk7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgp CisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAl NWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBo c1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ct PnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJysnLAorICAg ICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAg ICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxf d2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5pZCk7CisgICAgICBm cHJpbnRmIChzdGRlcnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICBnbHlwaC0+ZmFjZV9p ZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0 X2JveF9saW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAg IGZwcmludGYgKHN0ZGVyciwgIiAlNWQgJTRkICAlM2QgICUzZCAlcyAuIFslZC0lZF1cbiIsCisg ICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywg Z2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICAgICAgICAg ICAgICAgICAgZ2x5cGgtPnNsaWNlLmNtcC5mcm9tLCBnbHlwaC0+c2xpY2UuY21wLnRvKTsKKyAg ICAgICAgZWxzZQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOworICAgIH0KKyAgZWxz ZSBpZiAoZ2x5cGgtPnR5cGUgPT0gWFdJREdFVF9HTFlQSCkKKyAgICB7CisjaWZuZGVmIEhBVkVf WFdJREdFVFMKKyAgICAgIGVhc3N1bWUgKGZhbHNlKTsKKyNlbHNlCisgICAgICBmcHJpbnRmIChz dGRlcnIsCisgICAgICAgICIgICU1ZC8lLTVkICU1ZCAlNGMgJTZkICVjICUzZCAweCUwNXggJTRk ICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkg PyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAg ICdYJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICA6ICctJykpLAorICAgICAgICBnbHlw aC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+ bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAg ICAgZ2x5cGgtPnUueHdpZGdldCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+ aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcu Jyk7CisjZW5kaWYKKyAgICB9Cit9CisKKy8qIER1bXAgdGhlIGNvbnRlbnRzIG9mIGdseXBoIHJv dyBhdCBWUE9TIGluIE1BVFJJWCB0byBzdGRlcnIuCisgICBHTFlQSFMgMCBtZWFucyBkb24ndCBz aG93IGdseXBoIGNvbnRlbnRzLgorICAgR0xZUEhTIDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4gc2hv cnQgZm9ybQorICAgR0xZUEhTID4gMSBtZWFucyBzaG93IGdseXBocyBpbiBsb25nIGZvcm0uICAq LworCit2b2lkCittY19kdW1wX2dseXBoX3JvdyAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQg dnBvcywgaW50IGdseXBocykKK3sKKyAgaW50IHJlbGF0aXZlX3ggPSAwOworICBpZiAoZ2x5cGhz ICE9IDEpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5EVU1QIEdMWVBIIFJPV1xu Iik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJSb3cgICAgIFN0YXJ0ICAgICAgIEVuZCBVc2Vk IG9FPjxcXENUWkZlc20gICAgIFggICAgWSAgICBXICAgIEggICAgViAgICBBICAgIFBcbiIpOwor ICAgICAgZnByaW50ZiAoc3RkZXJyLCAiPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4iKTsKKyAgICAg IGZwcmludGYgKHN0ZGVyciwgIiUzZCAlOSJwRCJkICU5InBEImQgJTRkICUxLjFkJTEuMWQlMS4x ZCUxLjFkXAorJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCAgJTRkICU0 ZCAlNGQgJTRkICU0ZCAlNGQgJTRkXG4iLAorICAgICAgICAgdnBvcywKKyAgICAgICAgIE1BVFJJ WF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KSwKKyAgICAgICAgIE1BVFJJWF9ST1dfRU5EX0NIQVJQ T1MgKHJvdyksCisgICAgICAgICByb3ctPnVzZWRbVEVYVF9BUkVBXSwKKyAgICAgICAgIHJvdy0+ Y29udGFpbnNfb3ZlcmxhcHBpbmdfZ2x5cGhzX3AsCisgICAgICAgICByb3ctPmVuYWJsZWRfcCwK KyAgICAgICAgIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCwKKyAgICAgICAgIHJvdy0+dHJ1bmNh dGVkX29uX3JpZ2h0X3AsCisgICAgICAgICByb3ctPmNvbnRpbnVlZF9wLAorICAgICAgICAgTUFU UklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChyb3cpLAorICAgICAgICAgTUFUUklYX1JPV19E SVNQTEFZU19URVhUX1AgKHJvdyksCisgICAgICAgICByb3ctPmVuZHNfYXRfenZfcCwKKyAgICAg ICAgIHJvdy0+ZmlsbF9saW5lX3AsCisgICAgICAgICByb3ctPmVuZHNfaW5fbWlkZGxlX29mX2No YXJfcCwKKyAgICAgICAgIHJvdy0+c3RhcnRzX2luX21pZGRsZV9vZl9jaGFyX3AsCisgICAgICAg ICByb3ctPm1vdXNlX2ZhY2VfcCwKKyAgICAgICAgIHJvdy0+eCwKKyAgICAgICAgIHJvdy0+eSwK KyAgICAgICAgIHJvdy0+cGl4ZWxfd2lkdGgsCisgICAgICAgICByb3ctPmhlaWdodCwKKyAgICAg ICAgIHJvdy0+dmlzaWJsZV9oZWlnaHQsCisgICAgICAgICByb3ctPmFzY2VudCwKKyAgICAgICAg IHJvdy0+cGh5c19hc2NlbnQpOworICAgICAgLyogVGhlIG5leHQgMyBsaW5lcyBzaG91bGQgYWxp Z24gdG8gIlN0YXJ0IiBpbiB0aGUgaGVhZGVyLiAgKi8KKyAgICAgIGZwcmludGYgKHN0ZGVyciwg IiAgICAlOSJwRCJkICU5InBEImRcdCU1ZFxuIiwgcm93LT5zdGFydC5vdmVybGF5X3N0cmluZ19p bmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLm92ZXJsYXlfc3RyaW5nX2luZGV4LAorICAgICAgICAg cm93LT5jb250aW51YXRpb25fbGluZXNfd2lkdGgpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAi ICAgICU5InBEImQgJTkicEQiZFxuIiwKKyAgICAgICAgIENIQVJQT1MgKHJvdy0+c3RhcnQuc3Ry aW5nX3BvcyksCisgICAgICAgICBDSEFSUE9TIChyb3ctPmVuZC5zdHJpbmdfcG9zKSk7CisgICAg ICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTlkICU5ZFxuIiwgcm93LT5zdGFydC5kcHZlY19pbmRl eCwKKyAgICAgICAgIHJvdy0+ZW5kLmRwdmVjX2luZGV4KTsKKyAgICB9CisgIGlmIChnbHlwaHMg PiAxKQorICAgIHsKKyAgICAgIGludCBhcmVhOworICAgICAgZm9yIChhcmVhID0gTEVGVF9NQVJH SU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICB7CisgICAgc3RydWN0IGdseXBo ICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGhfZW5k ID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgLyogR2x5cGggZm9yIGEgbGluZSBlbmQg aW4gdGV4dC4gICovCisgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGdseXBoID09IGdseXBo X2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICArK2dseXBoX2VuZDsKKyAgICBpZiAo Z2x5cGggPCBnbHlwaF9lbmQpCisgICAgICBmcHJpbnRmIChzdGRlcnIsICJHbHlwaCMvVG90YWwg UmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1Mg VlBPUyBaViBDXG4iKTsKKyAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgpCisg ICAgICB7CisgICAgICAgIG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZl X3gpOworICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgIH0K KyAgfQorICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGhzID09IDEpCisgICAgeworICAgICAgaW50IGFy ZWE7CisgICAgICBjaGFyIHNbU0hSVF9NQVggKyA0XTsKKyAgICAgIGZvciAoYXJlYSA9IExFRlRf TUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgeworICAgIGludCBpOwor ICAgIGZvciAoaSA9IDA7IGkgPCByb3ctPnVzZWRbYXJlYV07ICsraSkKKyAgICAgIHsKKyAgICAg ICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdICsgaTsKKyAgICAgICAg aWYgKGkgPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgJiYgYXJlYSA9PSBURVhUX0FSRUEK KyAgICAgICYmIE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAmJiBnbHlwaC0+dHlwZSA9PSBD SEFSX0dMWVBICisgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAnICcpCisgICAgeworICAgICAgc3Ry Y3B5ICgmc1tpXSwgIltcXG5dIik7CisgICAgICBpICs9IDQ7CisgICAgfQorICAgICAgICBlbHNl IGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgICYmIGdseXBoLT51LmNo IDwgMHg4MAorICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA+PSAnICcpCisgICAgc1tpXSA9IGds eXBoLT51LmNoOworICAgICAgICBlbHNlCisgICAgc1tpXSA9ICcuJzsKKyAgICAgIH0KKyAgICBz W2ldID0gJ1wwJzsKKyAgICBmcHJpbnRmIChzdGRlcnIsICIlM2Q6IC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ZWlnaHQgPiAwCisgICAgICAgICAgICAgICAgICAgICAmJiB5cG9zID4gMCkKKyAgICAg ICAgICAgICAgICAgICAgICA/IHlwb3MgKyAxCisgICAgICAgICAgICAgICAgICAgICAgOiB5cG9z OworICAgICAgaWYgKHZpc2libGVfcCkKKyAgICAgICAgdnBvcyA9IHZvZmZzZXQ7CisgICAgICAg IGVsc2UKKyAgICAgICAgICB2cG9zID0gMDsKKyAgICB9CisgICAgZWxzZQorICAgICAgeworICAg ICAgICBDSEVDS19OVU1CRVIgKHJvdyk7CisgICAgICAgIHZwb3MgPSBYSU5UIChyb3cpOworICAg ICAgfQorICBtYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgaWYgKHZwb3MgPj0gMCAmJiB2 cG9zIDwgbWF0cml4LT5ucm93cykKKyAgICBtY19kdW1wX2dseXBoX3JvdyAoTUFUUklYX1JPVyAo bWF0cml4LCB2cG9zKSwKKyAgICAgICAgdnBvcywKKyAgICAgICAgVFlQRV9SQU5HRURfSU5URUdF UlAgKGludCwgZ2x5cGhzKSA/IFhJTlQgKGdseXBocykgOiAyKTsKKyAgcmV0dXJuIFFuaWw7Cit9 CisKK3ZvaWQKK21jX2R1bXBfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRy aXgsIGludCBnbHlwaHMpCit7CisgIGludCBpOworICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5u cm93czsgKytpKQorICAgIG1jX2R1bXBfZ2x5cGhfcm93IChNQVRSSVhfUk9XIChtYXRyaXgsIGkp LCBpLCBnbHlwaHMpOworfQorCitERUZVTiAoIm1jLWR1bXAtZ2x5cGgtbWF0cml4IiwgRm1jX2R1 bXBfZ2x5cGhfbWF0cml4LAorICAgICAgIFNtY19kdW1wX2dseXBoX21hdHJpeCwgMCwgMSwgInAi LAorICAgICAgIGRvYzogLyogRHVtcCB0aGUgY3VycmVudCBtYXRyaXggb2YgdGhlIHNlbGVjdGVk IHdpbm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pbnQsCisgIHJl ZF9mZywgZ3JlZW5fZmcsIGJsdWVfZmcsIHJlZF9iZywgZ3JlZW5fYmcsIGJsdWVfYmcpOworICBi b29sIHJlbW92ZV9wID0gZmFsc2U7CisgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB4LCBmeCwg eSwgZnksIGhwb3MsIHZwb3MsIGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsIG1pbmltYWxfcCwK KyAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvciwgcG9zaW50LCByZW1vdmVfcCk7CisgIExp c3BfT2JqZWN0IGZpZnRlZW5fZWxlbWVudHMgPSBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMTUsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyICh4KSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKGZ4 KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIg KHkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJl ciAoZnkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251 bWJlciAoaHBvcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1h a2VfbnVtYmVyICh2cG9zKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbWFrZV9udW1iZXIgKGgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBtY19jdXJzb3JfdHlwZV90b19saXNwIChjdXJzb3JfdHlwZSksCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfbnVtYmVyIChjdXJzb3Jfd2lkdGgpLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5kLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAoYWN0aXZlX2N1 cnNvcl9wKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9u dW1iZXIgKG1pbmltYWxfcCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1ha2VfbnVtYmVyIChmbGF2b3IpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtYWtlX251bWJlciAocG9zaW50KSk7CisgICpyZXN1bHQgPSBGY29ucyAoZmlm dGVlbl9lbGVtZW50cywgKnJlc3VsdCk7Cit9CisKKy8qIFJldHVybiBhIHBvaW50ZXIgdG8gdGhl IGdseXBoIFcncyBwaHlzaWNhbCBjdXJzb3IgaXMgb24uICBWYWx1ZSBpcworICAgbnVsbCBpZiBX J3MgY3VycmVudCBtYXRyaXggaXMgaW52YWxpZCwgc28gdGhhdCBubyBtZWFuaW5nZnVsIGdseXBo CisgICBjYW4gYmUgcmV0dXJuZWQuICAqLworCitzdHJ1Y3QgZ2x5cGggKgorbWNfZ2V0X3BoeXNf Y3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgeCwgaW50IGhwb3MsIGludCB2cG9z KQoreworICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3c7CisgIHN0cnVjdCBnbHlwaCAqZ2x5cGg7Cisg IGlmICghKHZwb3MgPj0gMAorICAgICAgICAmJiB2cG9zIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5y b3dzKSkKKyAgICByZXR1cm4gTlVMTDsKKyAgcm93ID0gTUFUUklYX1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AgIFRoZSBmeCBjb29yZGluYXRlIGlzIHNldCBlbHNld2hlcmUgYmFzZWQgdXBvbiBvcG9p bnRfeC4gKi8KKwordm9pZAorbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5IChzdHJ1Y3Qgd2lu ZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlwaF9yb3csCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGludCB4LCBpbnQgKmZ4LCBpbnQgeSwgaW50ICpmeSwgaW50IGhwb3MsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9zLCBpbnQgKmgsIGVudW0gdGV4dF9jdXJz b3Jfa2luZHMgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBj dXJzb3Jfd2lkdGgsIGludCAqd2QpCit7CisgIHN0cnVjdCBnbHlwaCAqZmFrZV9waHlzX2N1cnNv cl9nbHlwaCA9IG1jX2dldF9waHlzX2N1cnNvcl9nbHlwaCAodywgeCwgaHBvcywgdnBvcyk7Cisg IGlmIChmYWtlX3BoeXNfY3Vyc29yX2dseXBoICE9IE5VTEwpCisgICAgeworICAgICAgc3RydWN0 IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKTsKKyAgICAgIGludCBoX3RlbXAs IGgwLCB5MCwgYXNjZW50OworICAgICAgLyogQ29tcHV0ZSB0aGUgd2lkdGggb2YgdGhlIHJlY3Rh bmdsZSB0byBkcmF3LiAgSWYgb24gYSBzdHJldGNoCisgICAgICAgICBnbHlwaCwgYW5kIGB4LXN0 cmV0Y2gtYmxvY2stY3Vyc29yJyBpcyBuaWwsIGRvbid0IGRyYXcgYQorICAgICAgICAgcmVjdGFu Z2xlIGFzIHdpZGUgYXMgdGhlIGdseXBoLCBidXQgdXNlIGEgY2Fub25pY2FsIGNoYXJhY3Rlcgor ICAgICAgICAgd2lkdGggaW5zdGVhZC4gICovCisgICAgICAqd2QgPSB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YXNjZW50ICsgc2NyYXRjaF9nbHlwaHMtPmRlc2NlbnQpOworICAgICAgeTAgPSBX SU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgIGlmICh5IDwgeTApCisgICAgICAg IHsKKyAgICAgICAgICBoX3RlbXAgPSBtYXggKGhfdGVtcCAtICh5MCAtIHkpICsgMSwgaDApOwor ICAgICAgICAgIHkgPSB5MCAtIDE7CisgICAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgewor ICAgICAgICAgIHkwID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpIC0gaDA7CisgICAgICAgICAg aWYgKHkgPiB5MCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaF90ZW1wICs9IHkgLSB5 MDsKKyAgICAgICAgICAgICAgeSA9IHkwOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAg ICAqZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB4KTsKKyAgICAgICpmeSA9 IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB5KTsKKyAgICAgICpoID0gaF90ZW1wOworICAg ICAgaWYgKGN1cnNvcl90eXBlID09IEhCQVJfQ1VSU09SKQorICAgICAgICB7CisgICAgICAgICAg aW50IGN1cnNvcl9oZWlnaHQgPSAoY3Vyc29yX3dpZHRoIDwgMSkgPyBscmludCAoMC4yNSAqICpo KSA6IGN1cnNvcl93aWR0aDsKKyAgICAgICAgICBpZiAoY3Vyc29yX2hlaWdodCA+IGdseXBoX3Jv dy0+aGVpZ2h0KQorICAgICAgICAgICAgY3Vyc29yX2hlaWdodCA9IGdseXBoX3Jvdy0+aGVpZ2h0 OworICAgICAgICAgIGlmICgqaCA+IGN1cnNvcl9oZWlnaHQpCisgICAgICAgICAgICAqZnkgKz0g KmggLSBjdXJzb3JfaGVpZ2h0OworICAgICAgICAgICpoID0gY3Vyc29yX2hlaWdodDsKKyAgICAg ICAgfQorICAgIH0KK30K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gICAgICAgICAg ICAgICAgICAgICAgIDogY2xpcF90b19ib3VuZHMgKEJFR1YsIFhGQVNUSU5UIChtKSwgWlYpKTsK KyAgICAgIGVsc2UKKyAgICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK3ZvaWQKK21jX2VuZ2luZSAo c3RydWN0IGdseXBoX3JvdyAqcm93LCBzdHJ1Y3QgZ2x5cGggKmdseXBoLCBpbnQgYXJlYSwgaW50 IHJlbGF0aXZlX3gsCisgICAgICAgICAgICBzdHJ1Y3Qgd2luZG93ICp3LCBwdHJkaWZmX3QgcG9z aW50LCBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgaW50 IGN1cnNvcl93aWR0aCwgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCwgYm9vbCBhY3RpdmVfY3Vyc29y X3AsCisgICAgICAgICAgICBib29sIG1pbmltYWxfcCwgZW51bSB0eXBlX29mX2FjdGlvbiBhY3Rp b25fdHlwZSwgTGlzcF9PYmplY3QgKnJlc3VsdCkKK3sKKyAgYm9vbCBtY19zdGRlcnJfcCA9ICFO SUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfc3RkZXJyKSk7CisgIGludCBvcG9pbnRfeCA9 IHctPm91dHB1dF9jdXJzb3IueDsKKyAgaW50IG9wb2ludF95ID0gdy0+b3V0cHV0X2N1cnNvci55 OworICBpbnQgb3BvaW50X2hwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLmhwb3M7CisgIGludCBvcG9p bnRfdnBvcyA9IHctPm91dHB1dF9jdXJzb3IudnBvczsKKyAgTGlzcF9PYmplY3QgY2hhcmFjdGVy ID0gKENIQVJBQ1RFUlAgKG1ha2VfbnVtYmVyIChnbHlwaC0+dS5jaCkpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICA/IEZjaGFyX3RvX3N0cmluZyAobWFrZV9udW1iZXIgKGdseXBoLT51LmNo KSkKKyAgICAgICAgICAgICAgICAgICAgICA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JwRCJkICVjICUzZCAweCUw NnggJTRkICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGds eXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0g PT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisg ICAgICAgIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICA/ICdDJworICAgICAg ICAgOiAnRycpLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGds eXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAor ICAgICAgICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT51LmNoLAor ICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwK KyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT54LCBnbHlw aC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0i LAorICAgICAgICAoKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAmJiBnbHlwaC0+dS5jaCA9 PSA5KQorICAgICAgICAgICA/ICJcXHQiCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQor ICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMTApCisgICAgICAg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fY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIGJyZWFrOworICAg IH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICBIT1JJWk9OVEFM X1JVTEVSOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICovCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAg eworICAgICAgaW50IHRlbXBfdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3LT5jdXJyZW50 X21hdHJpeCk7CisgICAgICBpbnQgdGVtcF9ocG9zID0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdOworICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3ggPT0gcmVs YXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3Mg PT0gdGVtcF9ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRf eSA9PSBnbHlwaC0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50 X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAg bWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnksIHRlbXBfaHBvcywgdGVt cF92cG9zLAorICAgICAgIC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BfaHBvcywg dGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9oLCBj dXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgICAgICB0ZW1wX3ggKz0gZ2x5 cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgIHdoaWxlICh0ZW1wX3ggPD0gdGV4dF9hcmVhX3dp ZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwg LTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAg ICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAorICAgICAg ICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1 cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhMRVNT LCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9j aGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9 CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgVkVSVElDQUxfUlVM RVI6ICBDSEFSX0dMWVBIIHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAgICAgICAqLworLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNB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AgICAgICAg ICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAg ID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgOiAoY3Vy c29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRf cCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAg ICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAg ICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisgICAgICAgICAgICAgICAgICAgICAg JiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUgorICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50 X3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAg ICAgICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQ SExFU1MKKyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaW50IHRlbXBfeCA9 IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQor ICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAg ICAgICAgICAgID8gb3BvaW50X3gKKyAgICAgICAgICAgICAgICAgICAgOiByZWxhdGl2ZV94Owor ICAgICAgaWYgKGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJ TkdFX0JJVE1BUDsKKyAgICAgIGludCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3Bo eXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmX2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElY RUxfWCAodywgb3BvaW50X3gpOworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIGZ4LCB0ZW1w X3ksIC0xLCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgaCwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgbWNfYmdf bHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAg IG1pbmltYWxfcCwgZmxhdm9yLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsK KyAgICB9CisgIH0KKyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAg ICAgICAgICAgICAgIEVORDogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAg ICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIFNUUkVUQ0hf R0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t ICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgIHsKKyAgICBp ZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJw RCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAlNWQg JTRkICAlM2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRb YXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAgICBn bHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt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wgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFs X3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9 CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgSE9S SVpPTlRBTF9SVUxFUjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsK KyAgICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+Y3VycmVudF9t YXRyaXgpOworICAgICAgaW50IHRlbXBfaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXTsKKyAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0 aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9ocG9zID09 IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kg PT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92 cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAgICAgIG1j X2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBf dnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9oLCBjdXJzb3JfdHlw ZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIGlmICh0ZW1wX3ggPD0gdGV4dF9hcmVhX3dp ZHRoCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgd2hpbGUgKHRl bXBfeCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgeworICAg ICAgICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3Ms IHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAo dywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAg ICBtaW5pbWFsX3AsIE1DX0dMWVBIX1RBQiwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAg ICAgICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgfQorICAgICAgICBl bHNlIGlmICh0ZW1wX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPCB0ZXh0X2FyZWFfd2lkdGgKKyAg ICAgICAgICAgICAgICAgJiYgcmVhbF9mYWtlX2N1cnNvcl9wCisgICAgICAgICAgICAgICAgICYm IGdseXBoLT5waXhlbF93aWR0aCA+IGZyYW1lX2NoYXJfd2lkdGgpCisgICAgICAgICAgeworICAg ICAgICAgICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB3aGlsZSAo dGVtcF94IDwgcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwg dGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAtMSwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSF9UQUIsIHRlbXBfY2hh cnBvcywgcmVzdWx0KTsKKyAgICAgICAgICAgICAgICB0ZW1wX3ggKz0gZnJhbWVfY2hhcl93aWR0 aDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgIC8qIEl0IGlzIHBvc3NpYmxl IHRvIHVzZSBNQ19HTFlQSCBhbmQgYWRqdXN0IHRoZSBmeCBjb29yZGluYXRlOyBob3dldmVyLAor ICAgICAgdGhlIG1pZGRsZS1kb3QgLyBzcGFjZSBnbHlwaCBvbiBhIHdvcmQtd3JhcHBlZCBsaW5l IHdpbGwgYmUgb3ZlcndyaXR0ZW4KKyAgICAgIG51bWVyb3VzIHRpbWVzIGFuZCBpcyB1bnNpZ2h0 bHkuICovCisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFthcmVhXSAtIDEpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93 ZDsKKyAgICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94 LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAm ZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgICAg ICAvKiB0ZW1wX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOyAqLworICAgICAgICAgIHdoaWxlICh0 ZW1wX3ggPD0gdGV4dF9hcmVhX3dpZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBt Y19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVt cF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1p bmltYWxfcCwgTUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAg ICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9 CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAg ICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFNUUkVUQ0hfR0xZUEggICAgICAg ICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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ZsYXZvciA9IChjdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElD QUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAg ICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAg ICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBI X1RBQjsKKyAgICAgIGludCB0ZW1wX3ggPSBvcG9pbnRfeDsKKyAgICAgIGlmIChmbGF2b3IgPT0g TUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZF UlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxf QkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICBp bnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAo dywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHRlbXBfeSwgJl9meSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAg ICAgIGludCBmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIG9wb2ludF94KTsK KyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0 ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgs IGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lk KSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwg dGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorICB9CisgIH0KKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg RU5EOiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAg ICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlw aC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAg IGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQi ZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4i LAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93 LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICBy ZWxhdGl2ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAg ICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChT VFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDog KE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAg ICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93a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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAg ICBIT1JJWk9OVEFMX1JVTEVSOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgKi8K Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAg ICB7CisgICAgICBpbnQgdGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIHctPmN1cnJl bnRfbWF0cml4KTsKKyAgICAgIGludCB0ZW1wX2hwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV07CisgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSBy ZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBv cyA9PSB0ZW1wX2hwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF95ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9p bnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAg ICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0 ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpZiAodGVtcF94IDw9IHRleHRfYXJl YV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hl bHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisg ICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91 bmQsCisgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3Rp dmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVt cF9jaGFycG9zLCByZXN1bHQpOworICAgICAgLyogSXQgaXMgcG9zc2libGUgdG8gdXNlIE1DX0dM WVBIIGFuZCBhZGp1c3QgdGhlIGZ4IGNvb3JkaW5hdGU7IGhvd2V2ZXIsCisgICAgICB0aGUgbWlk ZGxlLWRvdCAvIHNwYWNlIGdseXBoIG9uIGEgd29yZC13cmFwcGVkIGxpbmUgd2lsbCBiZSBvdmVy d3JpdHRlbgorICAgICAgbnVtZXJvdXMgdGltZXMgYW5kIGlzIHVuc2lnaHRseS4gKi8KKyAgICAg IGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0g MSkKKyAgICAgICAgeworICAgICAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAgICAg IG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmX2gs IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgICAgIHRlbXBfeCArPSBn bHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8PSB0ZXh0X2FyZWFf d2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94 LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAg ICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVf Y3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSExF U1MsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgICAgICAgICAgdGVtcF94ICs9IGZyYW1l X2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAg IH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAg ICBWRVJUSUNBTF9SVUxFUjogIElNQUdFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICovCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsK KyAgICAgIC8qIGBnbHlwaC0+Y2hhcnBvc2AgaXMgdW5yZWxpYWJsZSB3aGVuIHRlc3RpbmcgZm9y IFpWIC0tIHdpdGhvdXQgbGluZQorICAgICAgbnVtYmVycywgdGhlIHZhbHVlIGlzIC0xOyB3aXRo IGxpbmUgbnVtYmVycywgdGhlIHZhbHVlIGlzIF9zb21ldGltZXNfIFpWLgorICAgICAgYGdseXBo LT56dl9wYCBpcyByZWxpYWJsZSwgYnV0IHJlbGllcyB1cG9uIGEgZmV3IGNvcmUgbW9kaWZpY2F0 aW9uLgorICAgICAgYHp2X3BgIGVuY29tcGFzc2VzIGEgY291cGxlIG9mIHNpdHVhdGlvbnM6ICBh IGxpbmUgZW5kaW5nIGluIFpWLCBidXQKKyAgICAgICBjb250YWluaW5nIG9uZSBvciBtb3JlIGNo YXJhY3RlcnMgYmVmb3JlIFpWOyBhbmQsIGEgbGluZSBiZXlvbmQgWlYgdGhhdAorICAgICAgIG1h eSBjb25zaXN0IG9mIHNwYWNlcyBlcXVhbCB0byBgaXQtPmxudW1fcGl4ZWxfd2lkdGhgIC8gZnJh bWVfY2hhcl93aWR0aCwKKyAgICAgICBvciBqdXN0IG9uZSBzcGFjZSBpZiB0aGVyZSBhcmUgbm8g bGluZSBudW1iZXJzLiAqLworICAgICAgYm9vbCB6dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYg TUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgICAgICBib29sIGN1cnNvcl9p bl9mcmluZ2VfcCA9IG9wb2ludF94ICsgZnJhbWVfY2hhcl93aWR0aCA+PSB0ZXh0X2FyZWFfd2lk dGg7CisgICAgICBpbnQgZmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAg ICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAg ICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChj dXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisg ICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAg ICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAg ICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElD QUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9p bnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dM WVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAg ICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0 cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7 CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBvcG9pbnRf eCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBv cywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFj ZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2 b3IsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgfQorICB9 CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBFTkQ6ICBJTUFHRV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAg ICAgICAgICAgICAgICAgICAgICAgICAgQkVHSU46ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAg ICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAo Z2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKQorICB7CisgICAgaWYgKG1jX3N0ZGVycl9w KQorICAgICAgeworICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICAgIlxuICU1InBE ImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgICBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0g MCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgICAgcmVsYXRpdmVfeCwKKyAg ICAgICAgICAnKycsCisgICAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgICAgKEJVRkZF UlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgID8gJ0InCisgICAgICAgICAgIDogKFNUUklO R1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICAgIDog KE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAg ICAgICAgIDogJy0nKSkpLAorICAgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAg ICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5jbXAuaWQpOworICAgICAgICBmcHJpbnRmIChzdGRl cnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAg ICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9s aW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAgIGZwcmlu dGYgKHN0ZGVyciwgIiAlNWQgJTRkICAlM2QgICUzZCAlcyAuIFslZC0lZF1cbiIsCisgICAgICAg ICAgICAgICAgICAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgt PnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICAgICAgICAgICAgICAg ICAgZ2x5cGgtPnNsaWNlLmNtcC5mcm9tLCBnbHlwaC0+c2xpY2UuY21wLnRvKTsKKyAgICAgICAg ZWxzZQorICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuIik7CisgICAgICB9CisgIHN3aXRj aCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlM6ICBDT01QT1NJVEVfR0xZUEggICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJ UExFX0NVUlNPUlM6CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1w X3ksIC0xLCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgLTEsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2Jn X2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAg ICBtaW5pbWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVh azsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAg ICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAg ICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVS OgorICAgIHsKKyAgICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+ Y3VycmVudF9tYXRyaXgpOworICAgICAgaW50IHRlbXBfaHBvcyA9IGdseXBoIC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXTsKKyAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94 ID09IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF9ocG9zID09IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsK KyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LC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XNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1w X2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgICAgdGVtcF94 ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAodGVtcF94IDw9IHRleHRf YXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0 ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwK KyAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFj dGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dM WVBITEVTUywgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgICAgICAgICB0ZW1wX3ggKz0g ZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgYnJlYWs7 CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAg ICAgICBWRVJUSUNBTF9SVUxFUjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAg Ki8KKy8qIC0tLS0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tZV9jaGFyX3dpZHRoID49IHRleHRfYXJl YV93aWR0aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAg ICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg IDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29u dGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xB U0gKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAg ICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAg ICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19W RVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhM RVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8g TUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChm bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNf VkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7 CisgICAgICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9n ZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHRlbXBfeSwgJl9meSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICZoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAm X3dkKTsKKyAgICAgIGludCBmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIG9w b2ludF94KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVt cF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVt cF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3As IGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorICB9 CisgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBFTkQ6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICov CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisv KiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkVHSU46ICBYV0lER0VUX0dMWVBIICAgICAg ICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNl IGlmIChnbHlwaC0+dHlwZSA9PSBYV0lER0VUX0dMWVBIKQorICB7CisjaWZuZGVmIEhBVkVfWFdJ REdFVFMKKyAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQorICAgIGlmIChtY19zdGRlcnJfcCkK KyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICAlNWQvJS01ZCAlNWQgJTRjICU2 ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4i LAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93 LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICBy ZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAg ICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChT VFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDog Jy0nKSksCisgICAgICAgIGdseXBoLT5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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIEhPUklaT05UQUxf UlVMRVI6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBp bnQgdGVtcF92cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsK KyAgICAgIGludCB0ZW1wX2hwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07Cisg ICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSByZWxhdGl2ZV94Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSB0ZW1wX2hw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IGdseXBo LT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0 ZW1wX3Zwb3MpOworICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAgICBtY19nZXRfcGh5 c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNv cl93aWR0aCwgJl93ZCk7CisgICAgICBpZiAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aAorICAg ICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgdGVt cF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAg ICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAg ICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3As CisgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCBy ZXN1bHQpOworICAgICAgLyogSXQgaXMgcG9zc2libGUgdG8gdXNlIE1DX0dMWVBIIGFuZCBhZGp1 c3QgdGhlIGZ4IGNvb3JkaW5hdGU7IGhvd2V2ZXIsCisgICAgICB0aGUgbWlkZGxlLWRvdCAvIHNw YWNlIGdseXBoIG9uIGEgd29yZC13cmFwcGVkIGxpbmUgd2lsbCBiZSBvdmVyd3JpdHRlbgorICAg ICAgbnVtZXJvdXMgdGltZXMgYW5kIGlzIHVuc2lnaHRseS4gKi8KKyAgICAgIGlmIChnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMSkKKyAgICAgICAg eworICAgICAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAgICAgIG1jX2dldF9waHlz X2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3Ms CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5j b250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAg ICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0 aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAg ICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAg ICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwg X2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywg dGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ks ICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQg ZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBvcG9pbnRfeCk7CisgICAgICBt Y19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92cG9z LAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3Jv dW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFjdGl2 ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHRlbXBfY2hh cnBvcywgcmVzdWx0KTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgfQorICB9CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVORDogIFhX SURHRVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCit9CisKKy8qIE1VTFRJUExFX0NVUlNPUlNfQ0FDSEU6CistICBUaGUgZmlyc3Qg ZWxlbWVudCBpcyBjb21wYXJlZCB0byB0aGUgYG11bHRpcGxlLWN1cnNvcnMtY29uZicgdG8gZG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XR0aW5nbHkgY29tZSB1cCB3aXRoIHNvbWUgdW5hY2Nl cHRhYmxlIGZvcm0gb2YgdW5yZWNvZ25pemVkIGN1cnNvciB0eXBlLiAqLworICBMaXNwX09iamVj dCBjdXJzb3JfbGlzcF90eXBlID0gQlZBUiAoYiwgbWNfcmVhbF9mYWtlX2N1cnNvcik7CisgIGVu dW0gdGV4dF9jdXJzb3Jfa2luZHMgdGVtcF9jdXJzb3JfdHlwZSA9IChDT05TUCAoY3Vyc29yX2xp c3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIgKGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBtY19saXNwX3RvX2N1cnNv cl90eXBlIChjdXJzb3JfbGlzcF90eXBlKTsKKyAgaW50IHRlbXBfY3Vyc29yX3dpZHRoID0gKENP TlNQIChjdXJzb3JfbGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgID8gWElO VCAoWENBUiAoWENEUiAoY3Vyc29yX2xpc3BfdHlwZSkpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAxOworICBlbnVtIGZhY2VfaWQgY3Vyc29yX2ZhY2VfaWQgPQorICAgICghYWN0aXZl X2N1cnNvcl9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNy b3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpCisg ICAgOiBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29y LWZhY2UiKSwgdHJ1ZSk7CisgIHN0cnVjdCBmYWNlICpjdXJzb3JfZmFjZSA9IEZBQ0VfRlJPTV9J RCAoZiwgY3Vyc29yX2ZhY2VfaWQpOworICBMaXNwX09iamVjdCBjdXJzb3JfY29sb3IgPSBjdXJz b3JfZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgIENIRUNLX1NUUklORyAo Y3Vyc29yX2NvbG9yKTsKKyAgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgb3Bv aW50X3B0KTsKKyAgLyogcmVkICovCisgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAg JiYgIWZpbGxfY29sdW1uX3ApCisgICAgZm9yZWdyb3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7Cisg IC8qIHllbGxvdyAqLworICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICYmICFmaWxs X2NvbHVtbl9wKQorICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyogcmVk ICovCisgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgJiYgZmlsbF9jb2x1bW5fcAor ICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmlsbF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IG9kZF9j b2xvcl92ZWN0b3I7CisgIC8qIHllbGxvdyAqLworICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAK KyAgICAgICYmIGZpbGxfY29sdW1uX3AKKyAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29s KQorICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyogZ3JlZW4gKi8KKyAg aWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICYmIGN1cnJlbnRfY29sID4gZmlsbF9jb2wpCisgICAg Zm9yZWdyb3VuZCA9IGZpbGxfY29sb3JfdmVjdG9yOworICBMaXNwX09iamVjdCBjdXJzb3JfZmcg PSAoYWN0aXZlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICA/IGZvcmVncm91 bmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBtY19jb2xvcl92ZWN0b3JfY2FsYyAodywg Y3Vyc29yX2NvbG9yKTsKKyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPQorICAgICAgICAg ICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3LCBvcG9pbnRfeCwgb3BvaW50X2hwb3MsIG9w b2ludF92cG9zKTsKKyAgbWNfaGVscGVyICh3LCBvcG9pbnRfeCwgLTEsIG9wb2ludF95LCAtMSwg b3BvaW50X2hwb3MsIG9wb2ludF92cG9zLAorICAgICAgICAgICAgIC0xLCB0ZW1wX2N1cnNvcl90 eXBlLCB0ZW1wX2N1cnNvcl93aWR0aCwgY3Vyc29yX2ZnLAorICAgICAgICAgICAgIG1jX2JnX2xz bCAodywgY3Vyc29yX2dseXBoLT5mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAg ICAgIG1pbmltYWxfcCwgTUNfR0xZUEgsIG9wb2ludF9wdCwgJnJlc3VsdCk7CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgRFJBVyAvIFJFQ09SRCBN VUxUSVBMRSBDVVJTT1JTICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgIGZvciAodmxpc3QgPSBCVkFSIChiLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYp OworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisg ICAgeworICAgICAgc3BlY3MgPSBYQ0FSICh2bGlzdCk7CisgICAgICBwb3NpbnQgPSBYSU5UIChG bnRoIChtYWtlX251bWJlciAoMCksIHNwZWNzKSk7CisgICAgICBsaXNwX3R5cGUgPSBGbnRoICht YWtlX251bWJlciAoMSksIHNwZWNzKTsKKyAgICAgIGlmIChDT05TUCAobGlzcF90eXBlKSkKKyAg ICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChYQ0FSIChsaXNwX3R5 cGUpKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19j dXJzb3JfdHlwZSAobGlzcF90eXBlKTsKKyAgICAgIGlmIChDT05TUCAobGlzcF90eXBlKSkKKyAg ICAgICAgY3Vyc29yX3dpZHRoID0gWElOVCAoWENBUiAoWENEUiAobGlzcF90eXBlKSkpOworICAg ICAgICBlbHNlCisgICAgICAgICAgY3Vyc29yX3dpZHRoID0gMTsKKyAgICAgIGZvcmVncm91bmQg PSBGbnRoIChtYWtlX251bWJlciAoMiksIHNwZWNzKTsKKyAgICAgIGlmIChTVFJJTkdQIChmb3Jl Z3JvdW5kKSkKKyAgICAgICAgZm9yZWdyb3VuZCA9IG1jX2NvbG9yX3ZlY3Rvcl9jYWxjICh3LCBm b3JlZ3JvdW5kKTsKKyAgICAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJl bnRfbWF0cml4OworICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwgd2luZG93X3Jvd19zdGFy dCwgd2luZG93X3Jvd19lbmQ7CisgICAgICBpbnQgaTsKKyAgICAgIExpc3BfT2JqZWN0IHRlbXAg PSBRbmlsOworICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5pbDsKKyAgICAgIGZvciAoaSA9 IDA7IGkgPCBtYXRyaXgtPm5yb3dzOyArK2kpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIGkpOworICAgICAgICAgIHJvd19z dGFydCA9IE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KTsKKyAgICAgICAgICBpZiAoKGhl YWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgaSA9PSAxKQorICAgICAgICAgICAgICAgfHwgKGhlYWRl cl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0gMCkpCisgICAgICAgICAgICB3aW5kb3dfcm93X3N0 YXJ0ID0gcm93X3N0YXJ0OworICAgICAgICAgIGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIHdpbmRvd19yb3dfZW5kID0gcm93X2VuZDsKKyAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICByb3dfZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAo cm93KTsKKyAgICAgICAgICAgICAgICB0ZW1wID0gbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIG1h a2VfbnVtYmVyIChpKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG1ha2VfbnVtYmVyIChyb3dfc3RhcnQpLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9udW1iZXIgKHJvd19lbmQpKTsKKyAgICAgICAg ICAgICAgICB2c3BlY3MgPSBGY29ucyAodGVtcCwgdnNwZWNzKTsKKyAgICAgICAgICAgICAgfQor ICAgICAgICB9CisgICAgICBpZiAocG9zaW50ID49IHdpbmRvd19yb3dfc3RhcnQKKyAgICAgICAg ICAmJiBwb3NpbnQgPD0gd2luZG93X3Jvd19lbmQpCisgICAgICAgIHsKKyAgICAgICAgTGlzcF9P YmplY3Qgdmxpc3Q7CisgICAgICAgIGZvciAodmxpc3QgPSBGbnJldmVyc2UgKHZzcGVjcyk7Cisg ICAgICAgICAgICAgQ09OU1AgKHZsaXN0KTsKKyAgICAgICAgICAgICB2bGlzdCA9IFhDRFIgKHZs aXN0KSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgY291bnQgPSBYSU5UIChGbnRoICht YWtlX251bWJlciAoMCksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19zdGFy dCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgWENBUiAodmxpc3QpKSk7CisgICAgICAg ICAgICBpbnQgcG9zX2VuZCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgWENBUiAodmxp c3QpKSk7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XICh3 LT5jdXJyZW50X21hdHJpeCwgY291bnQpOworICAgICAgICAgICAgaW50IGFyZWE7CisgICAgICAg ICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICAgICAgICBmb3IgKGFyZWEgPSBMRUZUX01B UkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07Cisg ICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNl ZFthcmVhXTsKKyAgICAgICAgICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGgg PT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICsr Z2x5cGhfZW5kOworICAgICAgICAgICAgICAgIGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAg ICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYg KHN0ZGVyciwKKyJcbmNvdW50ICglZCkgfCB3aW5kb3dfcm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwg cm93X3N0YXJ0L2VuZCAoJWQvJWQpXG5cCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09IE1V TFRJUExFIENVUlNPUlMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlw aCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAg ICBZIEhQT1MgVlBPUyBaViBDXG4iLAorY291bnQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19y b3dfZW5kLCBwb3Nfc3RhcnQsIHBvc19lbmQpOworICAgICAgICAgICAgICAgIGZvciAoOyBnbHlw aCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiBjb3VudCA+IDApCisgICAg ICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAg ICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+Y2hhcnBvcyA9PSBwb3NpbnQKKyAgICAgICAgICAg ICAgICAgICAgICAgICYmIGdseXBoLT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KSkKKyAg ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X2Nv bCA9IG1jX2N1cnJlbnRfY29sdW1uICh3LCBwb3NpbnQpOworICAgICAgICAgICAgICAgICAgICAg ICAgaWYgKE5JTFAgKGZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcmVkICovCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgaWYgKGN1cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmICFmaWxsX2NvbHVtbl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZm9yZWdyb3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLyogeWVsbG93ICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJl bnRfY29sICUgMiA9PSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFmaWxs X2NvbHVtbl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCA9IGV2 ZW5fY29sb3JfdmVjdG9yOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJlZCAqLwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogeWVsbG93ICovCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaWYgKGN1cnJlbnRfY29sICUgMiA9PSAwCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmlsbF9jb2wpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBmb3JlZ3JvdW5kID0gZXZlbl9jb2xvcl92ZWN0b3I7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLyogZ3JlZW4gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAo ZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50 X2NvbCA+IGZpbGxfY29sKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3Vu ZCA9IGZpbGxfY29sb3JfdmVjdG9yOworICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZl X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1VTFRJUExFX0NVUlNPUlMs ICZyZXN1bHQpOworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1jX3N0ZGVycl9wKQor ICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwg cmVsYXRpdmVfeCk7CisgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBp eGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAg ICAgfQorICAgICAgICB9CisgICAgfQorLyogYHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUnIGlz IHNldCBmb3IgdGhlIHdpbmRvdywgbm90IGJ1ZmZlcit3aW5kb3cgLS0gaS5lLiwgY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Zl90aW1lLCAwLCAwLCBjcHVfdGltZV91c2VkKTsKKyAg ZGVidWdfbWV0aG9kX2FkZCAodywgIm1jX2RyYXdfbXVsdGlwbGVfY3Vyc29yczogIFRJTUUgKCVz KSIsIGJ1Zl90aW1lKTsKKyNlbmRpZgorKi8KK30KKwordm9pZAorbWNfcmVkcmF3X211bHRpcGxl X2N1cnNvcnMgKHN0cnVjdCB3aW5kb3cgKncpCit7CisvKgorI2lmZGVmIEdMWVBIX0RFQlVHCisg IGNsb2NrX3Qgc3RhcnQsIGVuZDsKKyAgZG91YmxlIGNwdV90aW1lX3VzZWQ7CisgIGNoYXIgYnVm X3RpbWVbREJMX0JVRlNJWkVfQk9VTkRdOworICBzdGFydCA9IGNsb2NrKCk7CisjZW5kaWYKKyov CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wICYmIEJVRkZFUlAg KHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKSkKKyAgICB7CisgICAgICBMaXNwX09i amVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9P YmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7Cisg ICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBm cHJpbnRmIChzdGRlcnIsICJtY19yZWRyYXdfbXVsdGlwbGVfY3Vyc29ycyAoJXMpXG4iLCB3aW5k b3dfY2hhcik7CisgICAgfQorI2VuZGlmCisgIExpc3BfT2JqZWN0IHZsaXN0ID0gUW5pbDsKKyAg TGlzcF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EZudGggKG1ha2VfbnVtYmVyICg2KSwg ZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNv cl90eXBlIChGbnRoIChtYWtlX251bWJlciAoNyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IGN1cnNvcl93aWR0aCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICg4KSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICg5KSwgZmlmdGVl bl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFrZV9udW1iZXIgKDEwKSwg ZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVfY3Vyc29yX3AgPSBYSU5UIChGbnRoICht YWtlX251bWJlciAoMTEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBtaW5pbWFsX3AgPSBY SU5UIChGbnRoIChtYWtlX251bWJlciAoMTIpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBm bGF2b3IgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTMpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICBwb3NpbnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMTQpLCBmaWZ0ZWVuX2Vs ZW1lbnRzKSk7CisgICAgICBib29sIHJlbW92ZV9wID0gZmFsc2U7CisgICAgICBtY19kcmF3X2Vy YXNlX2h5YnJpZCAodywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCBoLCBjdXJzb3JfdHlwZSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFj dGl2ZV9jdXJzb3JfcCwgbWluaW1hbF9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1D X0dMWVBILCBwb3NpbnQsIHJ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WENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIGZpZnRlZW5fZWxlbWVudHMg PSBYQ0FSICh2bGlzdCk7CisgICAgICB4ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBm aWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmeCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgx KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVy ICgyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZnkgPSBYSU5UIChGbnRoIChtYWtlX251 bWJlciAoMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGhwb3MgPSBYSU5UIChGbnRoICht YWtlX251bWJlciAoNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHZwb3MgPSBYSU5UIChG bnRoIChtYWtlX251bWJlciAoNSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGggPSBYSU5U IChGbnRoIChtYWtlX251bWJlciAoNiksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNv cl90eXBlID0gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoRm50aCAobWFrZV9udW1iZXIgKDcpLCBm aWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBjdXJzb3Jfd2lkdGggPSBYSU5UIChGbnRoIChtYWtl X251bWJlciAoOCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZvcmVncm91bmQgPSBGbnRo IChtYWtlX251bWJlciAoOSksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYmFja2dyb3VuZCA9 IEZudGggKG1ha2VfbnVtYmVyICgxMCksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYWN0aXZl X2N1cnNvcl9wID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDExKSwgZmlmdGVlbl9lbGVtZW50 cykpOworICAgICAgbWluaW1hbF9wID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEyKSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgZmxhdm9yID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIg KDEzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgcG9zaW50ID0gWElOVCAoRm50aCAobWFr ZV9udW1iZXIgKDE0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaWYgKGZsYXZvciA9PSBN Q19HTFlQSCkKKyAgICAgICAgbWNfZXJhc2VfZ2x5cGhfY3Vyc29ycyAodywgeCwgeSwgaHBvcywg dnBvcywgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZmxhdm9yKTsKKyAgICAgICAgZWxzZQor ICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3AgPSB0cnVlOworICAgICAgICAg ICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwg Y3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dp ZHRoLCBiYWNrZ3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHBvc2ludCwgcmVtb3ZlX3ApOworICAgICAg ICAgIH0KKyAgICB9CisgIGlmIChkZWxldGVfY2FjaGUpCisgICAgd3NldF9tdWx0aXBsZV9jdXJz b3JzX2NhY2hlICh3LCBRbmlsKTsKKyAgdy0+bWMuZXJhc2VfbXVsdGlwbGVfY3Vyc29ycyA9IGZh bHNlOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGlt ZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgI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XJzb3JfcCAoJWQpIHwgbWluaW1hbF9wICglZClc biIsCisgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hhciwgYWN0aXZlX2N1cnNvcl9w LCBtaW5pbWFsX3ApOworICAgIH0KKyNlbmRpZgorICBib29sIG1jX3N0ZGVycl9wID0gIU5JTFAg KEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBtY19zdGRlcnIpKTsKKyAgcHRyZGlmZl90IG9wb2ludF9w dCA9ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpCisgICAgICAgICAgICAgICAgICAg ICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICA6IFhJTlQgKEZtYXJrZXJfcG9zaXRp b24gKHctPnBvaW50bSkpOworICBpbnQgb3BvaW50X3ggPSB3LT5waHlzX2N1cnNvci54OworICBp bnQgb3BvaW50X3kgPSB3LT5waHlzX2N1cnNvci55OworICBpbnQgb3BvaW50X2hwb3MgPSB3LT5w aHlzX2N1cnNvci5ocG9zOworICBpbnQgb3BvaW50X3Zwb3MgPSB3LT5waHlzX2N1cnNvci52cG9z OworICBzdHJ1Y3QgZ2x5cGggKnJlYWxfcGh5c19jdXJzb3JfZ2x5cGggPQorICAgIG1jX2dldF9w aHlzX2N1cnNvcl9nbHlwaCAodywgb3BvaW50X3gsIG9wb2ludF9ocG9zLCBvcG9pbnRfdnBvcyk7 CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBMaXNwX09iamVjdCBi dWYgPSB3LT5jb250ZW50czsKKyAgQ0hFQ0tfQlVGRkVSIChidWYpOworICBzdHJ1Y3QgYnVmZmVy ICpiID0gWEJVRkZFUiAoYnVmKTsKKyAgc3RydWN0IGJ1ZmZlciAqb2xkX2J1ZmZlciA9IE5VTEw7 CisgIExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgLyog V2hlbiBzd2ljaGluZyB0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o YmFyZl9jcmFzaF90aHJlZSkKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAg c2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQor ICBib29sIGJhcmZfY3Jhc2hfZm91ciA9IChvcG9pbnRfdnBvcyA+PSAwICYmIG9wb2ludF92cG9z IDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZf Y3Jhc2hfZm91cikKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1 ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQorICBpZiAo IUJVRkZFUlAgKGJ1ZikpCisgICAgeworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNl dF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0KKyAg aWYgKE5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKSkKKyAgICB7CisgICAgICBpZiAob2xkX2J1 ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICBy ZXR1cm47CisgICAgfQorICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc19ob3Jpem9udGFs X3J1bGVyKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnNfdmVydGljYWxfcnVs ZXIpKSkKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9p bnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTiBKT1VSTkVZ IC4uLgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGludCBmcmFtZV9jaGFyX3dpZHRoID0g RlJBTUVfQ09MVU1OX1dJRFRIIChmKTsKKyAgaW50IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19i b3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgIGJvb2wgY3Vyc29yX2luX2ZyaW5nZV9wID0gdy0+ b3V0cHV0X2N1cnNvci54ICsgZnJhbWVfY2hhcl93aWR0aCA+PSB0ZXh0X2FyZWFfd2lkdGg7Cisg IHN0cnVjdCBnbHlwaF9yb3cgKmdseXBoX3JvdzsKKyAgaW50IGN1cnNvcl93aWR0aCA9IDE7Cisg IHB0cmRpZmZfdCBwb3NpbnQgPSAtMTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAg ICAgICAgICAgICAgICAgIFNUQVJUIERJU1BMQVkgQU5EIFBSSU1FIElUCisqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKyAgcHRyZGlmZl90IGN1cnJlbnRfY29sID0gbWNfY3VycmVudF9jb2x1bW4g KHcsIG9wb2ludF9wdCk7CisgIGJvb2wgZmlsbF9jb2x1bW5fcCA9ICFOSUxQIChCVkFSIChiLCBm aWxsX2NvbHVtbikpOworICBwdHJkaWZmX3QgZmlsbF9jb2wgPSBYSU5UIChCVkFSIChiLCBmaWxs X2NvbHVtbikpOworICBMaXNwX09iamVjdCByZXN1bHQgPSBRbmlsOworICBpbnQgZmxhdm9yOwor ICAvKiBWYWx1ZXMgZm9yIHRoZSBjdXJyZW50IGNvbHVtbiBvZiB0aGUgdmVydGljYWwgbGluZS4g Ki8KKyAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCA9IEZtYWtlX3ZlY3RvciAobWFrZV9udW1iZXIg KDMpLCBRbmlsKTsKKyAgZW51bSBmYWNlX2lkIGZhY2VfaWQ7CisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ09MT1IgT0YgQ1JPU1NIQUlSUwor KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisgIGVudW0gZmFjZV9pZCBldmVuX2ZhY2VfaWQgPQor ICAgICghYWN0aXZlX2N1cnNvcl9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistZXZlbi1udW1iZXJlZC1jb2x1bW4taW5hY3RpdmUt ZmFjZSIpLCB0cnVlKQorICAgIDogbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist ZXZlbi1udW1iZXJlZC1jb2x1bW4tZmFjZSIpLCB0cnVlKTsKKyAgc3RydWN0IGZhY2UgKmV2ZW5f ZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgZXZlbl9mYWNlX2lkKTsKKyAgTGlzcF9PYmplY3QgZXZl bl9jb2xvciA9IGV2ZW5fZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgIENI RUNLX1NUUklORyAoZXZlbl9jb2xvcik7CisgIExpc3BfT2JqZWN0IGV2ZW5fY29sb3JfdmVjdG9y ID0gbWNfY29sb3JfdmVjdG9y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mFzbXVjaCBhcyBgZXJhc2VfcGh5 c19jdXJzb3InIHVwZGF0ZXMgbW9yZSB0aGFuCittZXJlbHkgdGhlIGFmb3JlbWVudGlvbmVkIGNv b3JkaW5hdGVzLCByZXNldHRpbmcgdGhvc2UgY29vcmRpbmF0ZXMgYWZ0ZXIgdGhlIGZhY3QKK2lz IGluc3VmZmljaWVudCB0byBmaXggdGhlIHByb2JsZW0uICBXZSB1c2UgYHctPm91dHB1dF9jdXJz b3IueC95L2hwb3MvdnBvc2AKK2JlY2F1c2UgdGhvc2UgY29vcmRpbmF0ZXMgYXJlIGNvcnJlY3Qu ICBXZSBmaXggYHctPnBoeXNfY3Vyc29yLngveS9ocG9zL3Zwb3NgCitCRUZPUkUgY2FsbGluZyBg ZXJhc2VfcGh5c19jdXJzb3InIHNvIHRoYXQgb3RoZXIgZ29vZGllcyBhcmUgdXBkYXRlZC4gKi8K KyAgaWYgKHctPmhzY3JvbGwgPiAwKQorICAgIHsKKyAgICAgIHctPnBoeXNfY3Vyc29yLnggPSB3 LT5vdXRwdXRfY3Vyc29yLng7CisgICAgICB3LT5waHlzX2N1cnNvci55ID0gdy0+b3V0cHV0X2N1 cnNvci55OworICAgICAgdy0+cGh5c19jdXJzb3IuaHBvcyA9IHctPm91dHB1dF9jdXJzb3IuaHBv czsKKyAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLnZwb3M7Cisg ICAgfQorICBpZiAoIW1pbmltYWxfcCkKKyAgICBlcmFzZV9waHlzX2N1cnNvciAodyk7CisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgUkVQTEFDRSBU SEUgUkVBTCBDVVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBnbHlwaF9yb3cgPSBN QVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3BvaW50X3Zwb3MpOworICBpZiAoIWN1cnNv cl9pbl9mcmluZ2VfcCkKKyAgICBmbGF2b3IgPSBNQ19HTFlQSDsKKyAgICAvKiBUaGlzIGNvbmRp dGlvbiBwcm9iYWJseSBkb2VzIG5vdCBleGlzdCBmb3IgdGhlIHJlYWwgZmFrZSBjdXJzb3IuICov CisgICAgZWxzZSBpZiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgJiYgZ2x5cGhf cm93LT5jb250aW51ZWRfcCkKKyAgICAgIGZsYXZvciA9IE1DX1BJTENST1c7CisgICAgICBlbHNl IGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICYmIGdseXBoX3Jvdy0+dHJ1 bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgIGZsYXZvciA9IE1DX0hPTExPV19SRUNUQU5HTEVf UklHSFRfQVJST1c7CisgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAmJiAhZ2x5cGhfcm93LT5jb250aW51ZWRfcAorICAgICAgICAgICAgICAgICAm JiAhZ2x5cGhfcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICBmbGF2b3IgPSBN Q19IT0xMT1dfUkVDVEFOR0xFOworICBmYWNlX2lkID0gKHJlYWxfcGh5c19jdXJzb3JfZ2x5cGgg PT0gTlVMTCkKKyAgICAgICAgICAgICAgPyBERUZBVUxUX0ZBQ0VfSUQKKyAgICAgICAgICAgICAg OiByZWFsX3BoeXNfY3Vyc29yX2dseXBoLT5mYWNlX2lkOworICBpbnQgb3BvaW50X2Z4ID0gLTE7 CisgIGludCBvcG9pbnRfZnkgPSAtMTsKKyAgaW50IG9wb2ludF9oID0gLTE7CisgIC8qIEZJWE1F OiAgUHV0IGluIHNvbWUgY29kZSB0byBkZWZhdWx0IHRvIEhPTExPV19CT1hfQ1VSU09SIGlmIHRo ZSB1c2VyIGhhcworICB1bndpdHRpbmdseSBjb21lIHVwIHdpdGggc29tZSB1bmFjY2VwdGFibGUg Zm9ybSBvZiB1bnJlY29nbml6ZWQgY3Vyc29yIHR5cGUuICovCisgIExpc3BfT2JqZWN0IGN1cnNv cl9saXNwX3R5cGUgPSBCVkFSIChiLCBtY19yZWFsX2Zha2VfY3Vyc29yKTsKKyAgZW51bSB0ZXh0 X2N1cnNvcl9raW5kcyB0ZW1wX2N1cnNvcl90eXBlID0gKENPTlNQIChjdXJzb3JfbGlzcF90eXBl KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfbGlz cF90b19jdXJzb3JfdHlwZSAoWENBUiAoY3Vyc29yX2xpc3BfdHlwZSkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUg KGN1cnNvcl9saXNwX3R5cGUpOworICBpZiAoZmxhdm9yID09IE1DX1BJTENST1cKKyAgICAgIHx8 IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICB8fCBmbGF2 b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRSkKKyAgICB0ZW1wX2N1cnNvcl90eXBlID0gUklHSFRf RlJJTkdFX0JJVE1BUDsKKyAgaW50IGluaXRpYWxfY3Vyc29yX3dpZHRoID0gKENPTlNQIChjdXJz b3JfbGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gWElOVCAoWENB UiAoWENEUiAoY3Vyc29yX2xpc3BfdHlwZSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiAxOworICBlbnVtIGZhY2VfaWQgY3Vyc29yX2ZhY2VfaWQgPQorICAgICghYWN0aXZlX2N1 cn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GxpdHRsZSB0aGlja2VyIHRoYW4gYXMgd291bGQg bm9ybWFsbHkgYmUgdGhlIGNhc2UuICovCisgIGlmICh0ZW1wX2N1cnNvcl90eXBlID09IE5PX0NV UlNPUgorICAgICAgJiYgIW1pbmltYWxfcCkKKyAgICB7CisgICAgICBpbnQgX3dkOworICAgICAg aWYgKGZsYXZvciA9PSBNQ19HTFlQSCkKKyAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21l dHJ5ICh3LCBnbHlwaF9yb3csIG9wb2ludF94LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG9wb2ludF95LCAmb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywg b3BvaW50X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2lu dF9oLCBIQkFSX0NVUlNPUiwgaW5pdGlhbF9jdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgbWNf aGVscGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9pbnRfeSwgb3BvaW50X2Z5LCBvcG9p bnRfaHBvcywKKyAgICAgICAgICAgICAgICAgb3BvaW50X3Zwb3MsIG9wb2ludF9oLCBIQkFSX0NV UlNPUiwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xz bCAodywgZmFjZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwgbWluaW1hbF9wLCBmbGF2b3IsCisgICAg ICAgICAgICAgICAgIG9wb2ludF9wdCwgJnJlc3VsdCk7CisgICAgICBpZiAoZmxhdm9yID09IE1D X0dMWVBIKQorICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIGdseXBoX3Jv dywgb3BvaW50X3gsICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgb3BvaW50X3ksICZvcG9pbnRfZnksIG9wb2ludF9ocG9zLCBvcG9pbnRfdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3BvaW50X2gsIEJBUl9DVVJTT1Is IGluaXRpYWxfY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgb3BvaW50 X3gsIG9wb2ludF9meCwgb3BvaW50X3ksIG9wb2ludF9meSwgb3BvaW50X2hwb3MsCisgICAgICAg ICAgICAgICAgIG9wb2ludF92cG9zLCBvcG9pbnRfaCwgQkFSX0NVUlNPUiwgY3Vyc29yX3dpZHRo LCBjdXJzb3JfZmcsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgZmFjZV9pZCksIGFj dGl2ZV9jdXJzb3JfcCwgbWluaW1hbF9wLCBmbGF2b3IsCisgICAgICAgICAgICAgICAgIG9wb2lu dF9wdCwgJnJlc3VsdCk7CisgICAgfQorICAgIGVsc2UgaWYgKCFtaW5pbWFsX3ApCisgICAgICB7 CisgICAgICAgIGludCBfd2Q7CisgICAgICAgIGlmIChmbGF2b3IgPT0gTUNfR0xZUEgpCisgICAg ICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCBnbHlwaF9yb3csIG9wb2ludF94 LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3Bv aW50X3ksICZvcG9pbnRfZnksIG9wb2ludF9ocG9zLCBvcG9pbnRfdnBvcywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfaCwgdGVtcF9jdXJzb3JfdHlwZSwg aW5pdGlhbF9jdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgICBtY19oZWxwZXIgKHcsIG9wb2lu dF94LCBvcG9pbnRfZngsIG9wb2ludF95LCBvcG9pbnRfZnksIG9wb2ludF9ocG9zLAorICAgICAg ICAgICAgICAgICAgIG9wb2ludF92cG9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3RpdmVfY3Vyc29y X3AsIG1pbmltYWxfcCwKKyAgICAgICAgICAgICBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUCwgb3Bv aW50X3B0LCAmcmVzdWx0KTsKKyAgaWYgKG1pbmltYWxfcCkKKyAgICBnb3RvIGNyb3NzaGFpcnNf ZmluaXNoOworICBpZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc19ob3Jpem9udGFsX3J1bGVy KSkpCisgICAgZ290byB2ZXJ0aWNhbF9ydWxlcjsKKyAgICBlbHNlCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioKKyAgICAgICAgICAgICAgICBIT1JJWk9OVEFMIFJVTEVSOiAgRklSU1QgWCA9PiBF T0wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kCisgICAgICAgSE9SSVpPTlRB TCBSVUxFUjogIERSQVcgRkxPQVRJTkcgR0xZUEhMRVNTIExJTkUgKEVPTCBUTyBGUklOR0UpCisq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3BvaW50X3Zwb3MpOworICAgICAg aW50IGFyZWE7CisgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICBmb3IgKGFyZWEgPSBM RUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgIHsKKyAg ICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAg ICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAg ICAgICAgICAvKiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAgKi8KKyAgICAgICAgICBp ZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFy cG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgIGlmIChtY19zdGRl cnJfcAorICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgIGZw cmludGYgKHN0ZGVyciwKKyJcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT0gSE9SSVpPTlRB TCBSVUxFUiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90 YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQ T1MgVlBPUyBaViBDXG4iKTsKKyAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsr Z2x5cGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2VuZ2luZSAocm93LCBnbHlw aCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICB3LCBwb3NpbnQs IEhCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9jdXJzb3JfcCwK KyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIEhPUklaT05UQUxfUlVMRVIsICZy ZXN1bHQpOworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsK KyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KgorICAgICAgICAgICBWRVJUSUNBTCBSVUxFUjogIENPTUJJTkFUSU9OIE9GIEdMWVBIICYgR0xZ UEhMRVNTIENVUlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICB2ZXJ0aWNhbF9ydWxl cjoKKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnNfdmVydGljYWxfcnVsZXIpKSkKKyAg ICBnb3RvIGNyb3NzaGFpcnNfZmluaXNoOworICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgaW50 IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAg ICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAg ICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwgd2luZG93X3Jvd19zdGFydCwgd2luZG93X3Jv d19lbmQ7CisgICAgICAgIGludCBpOworICAgICAgICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsK KyAgICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5pbDsKKyAgICAgICAgZm9yIChpID0gMDsg aSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIGkpOworICAgICAgICAgICAgcm93 X3N0YXJ0ID0gTUFUUklYX1JPV19TVEFSVF9DSEFSUE9TIChyb3cpOworICAgICAgICAgICAgaWYg KChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkgPT0gMSkKKyAgICAgICAgICAgICAgICAgfHwg KGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0gMCkpCisgICAgICAgICAgICAgIHdpbmRv d19yb3dfc3RhcnQgPSByb3dfc3RhcnQ7CisgICAgICAgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9w KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgd2luZG93X3Jvd19lbmQgPSByb3df ZW5kOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICByb3dfZW5kID0g TUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KTsKKyAgICAgICAgICAgICAgICAgIHRlbXAgPSBs aXN0biAoQ09OU1RZUEVfSEVBUCwgMywgbWFrZV9udW1iZXIgKGkpLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX251bWJlciAocm93X3N0YXJ0 KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFr ZV9udW1iZXIgKHJvd19lbmQpKTsKKyAgICAgICAgICAgICAgICAgIHZzcGVjcyA9IEZjb25zICh0 ZW1wLCB2c3BlY3MpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisgICAgICAgIExp c3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3IgKHZsaXN0ID0gRm5yZXZlcnNlICh2c3BlY3Mp OworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgICAgICAgdmxpc3QgPSBYQ0RS ICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IGNvdW50ID0gWElOVCAoRm50 aCAobWFrZV9udW1iZXIgKDApLCBYQ0FSICh2bGlzdCkpKTsKKyAgICAgICAgICAgIGludCBwb3Nf c3RhcnQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMSksIFhDQVIgKHZsaXN0KSkpOworICAg ICAgICAgICAgaW50IHBvc19lbmQgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMiksIFhDQVIg KHZsaXN0KSkpOworICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JP VyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50KTsKKyAgICAgICAgICAgIGludCB0ZW1wX3Zwb3Mg PSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgICAgICAgICAg aW50IGFyZWE7CisgICAgICAgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICAgICAgICBm b3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93 LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQg PSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAgICAgICBpZiAoYXJlYSA9PSBU RVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAg ICAgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgICAgICAgIGlmIChtY19zdGRl cnJfcAorICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAg ICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbmNvdW50ICglZCkgfCB3aW5kb3dfcm93X3N0 YXJ0L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2VuZCAoJWQvJWQpXG5cCis9PT09PT09PT09PT09 PT09PT09PT09PT09PT09PSBWRVJUSUNBTCBSVUxFUiA9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENv ZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBaViBDXG4iLAorY291bnQsIHdpbmRvd19y b3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nfc3RhcnQsIHBvc19lbmQpOworICAgICAgICAg ICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3Bv aW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAgICAgICAgICAgICAg ICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiBjb3VudCA+IDApCisgICAgICAgICAg ICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAg ICAgICAgICAgICAmJiAocmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCA+IG9wb2ludF94 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMSkK KyAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT55IDw9IHdpbmRvd190ZXh0X2JvdHRv bV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkK KyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBtY19lbmdp bmUgKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHcsIHBvc2ludCwgQkFSX0NVUlNPUiwgY3Vyc29yX3dpZHRoLCBmb3JlZ3Jv dW5kLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1pbmltYWxfcCwgVkVSVElDQUxfUlVMRVIsICZyZXN1bHQpOworICAgICAgICAgICAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAg ICAgIGVsc2UgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHVt cF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCk7CisgICAgICAgICAgICAgICAg ICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNFVCBUSEUgQ0FDSEUK KyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworICBjcm9zc2hhaXJzX2ZpbmlzaDoKKyAgaWYgKCFO SUxQIChyZXN1bHQpKQorICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNoZSAodywgbGlzdG4gKENPTlNU WVBFX0hFQVAsIDMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJldmVy c2UgKHJlc3VsdCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNvbnMg KHdpbmRvdywgUW5pbCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNv bnMgKHctPmNvbnRlbnRzLCBRbmlsKSkpOworICB3LT5tYy5kcmF3X2Nyb3NzaGFpcnMgPSBmYWxz ZTsKKyAgaWY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ICAgICAgICAgICAgdy0+cGh5c19jdXJzb3IudnBvcywgdy0+cGh5 c19jdXJzb3JfdHlwZSwgdy0+cGh5c19jdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAg ICAgICAgIGZsYXZvcik7CisgIGZvciAodmxpc3QgPSBYQ0FSICh3LT5jcm9zc2hhaXJzX2NhY2hl KTsKKyAgICAgICBDT05TUCAodmxpc3QpOworICAgICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQor ICAgIHsKKyAgICAgIGZpZnRlZW5fZWxlbWVudHMgPSBYQ0FSICh2bGlzdCk7CisgICAgICB4ID0g WElOVCAoRm50aCAobWFrZV9udW1iZXIgKDApLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBm eCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAg ICAgeSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgZmlmdGVlbl9lbGVtZW50cykpOwor ICAgICAgZnkgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoMyksIGZpZnRlZW5fZWxlbWVudHMp KTsKKyAgICAgIGhwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNCksIGZpZnRlZW5fZWxl bWVudHMpKTsKKyAgICAgIHZwb3MgPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNSksIGZpZnRl ZW5fZWxlbWVudHMpKTsKKyAgICAgIGggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNiksIGZp ZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJzb3Jf dHlwZSAoRm50aCAobWFrZV9udW1iZXIgKDcpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBj dXJzb3Jfd2lkdGggPSBYSU5UIChGbnRoIChtYWtlX251bWJlciAoOCksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGZvcmVncm91bmQgPSBGbnRoIChtYWtlX251bWJlciAoOSksIGZpZnRlZW5f ZWxlbWVudHMpOworICAgICAgYmFja2dyb3VuZCA9IEZudGggKG1ha2VfbnVtYmVyICgxMCksIGZp ZnRlZW5fZWxlbWVudHMpOworICAgICAgYWN0aXZlX2N1cnNvcl9wID0gWElOVCAoRm50aCAobWFr ZV9udW1iZXIgKDExKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgbWluaW1hbF9wID0gWElO VCAoRm50aCAobWFrZV9udW1iZXIgKDEyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZmxh dm9yID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDEzKSwgZmlmdGVlbl9lbGVtZW50cykpOwor ICAgICAgcG9zaW50ID0gWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDE0KSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgaWYgKGZsYXZvciA9PSBNQ19HTFlQSCkKKyAgICAgICAgbWNfZXJhc2Vf Z2x5cGhfY3Vyc29ycyAodywgeCwgeSwgaHBvcywgdnBvcywgY3Vyc29yX3R5cGUsIGN1cnNvcl93 aWR0aCwgZmxhdm9yKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJv b2wgcmVtb3ZlX3AgPSB0cnVlOworICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcs IHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBiYWNrZ3JvdW5kLCBhY3RpdmVfY3Vy c29yX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2 b3IsIHBvc2ludCwgcmVtb3ZlX3ApOworICAgICAgICAgIH0KKyAgICB9CisgIGlmIChkZWxldGVf Y2FjaGUpCisgICAgd3NldF9jcm9zc2hhaXJzX2NhY2hlICh3LCBRbmlsKTsKKyAgdy0+bWMuZXJh c2VfY3Jvc3NoYWlycyA9IGZhbHNlOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBj bG9jaygpOworICBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xP Q0tTX1BFUl9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAs IGNwdV90aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZXJhc2VfY3Jvc3No YWlyczogIFRJTUUgKCVzKSIsIGJ1Zl90aW1lKTsKKyNlbmRpZgorKi8KK30KKwordm9pZAorbWNf cmVtb3ZlX211bHRpcGxlX2N1cnNvcnMgKHN0cnVjdCB3aW5kb3cgKncpCit7CisgIHN0cnVjdCBm cmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBib29sIGRlbGV0ZV9jYWNoZSA9ICh3LT5t Yy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID09IDgKKyAgICAgICAgICAgICAgICAgICAg ICAgfHwgbWNfcmVkaXNwbGF5ID09IDMpCisgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQor ICAgICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyNpZmRlZiBHTFlQSF9ERUJVRworICBpZiAo dHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAoIU5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19jb25mKSkK KyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkpKQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvdzsK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AoRm50aCAobWFrZV9udW1iZXIgKDIpLCB3LT5tdWx0aXBsZV9jdXJz b3JzX2NhY2hlKSkpKQorICAgIHsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CisgICAgICBibG9j a19pbnB1dCAoKTsKKyAgICAgIG1jX2VyYXNlX211bHRpcGxlX2N1cnNvcnMgKHcsIGRlbGV0ZV9j YWNoZSk7CisgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgdXBkYXRlX2VuZCAoZik7Cisg ICAgfQorfQorCit2b2lkCittY19yZW1vdmVfY3Jvc3NoYWlycyAoc3RydWN0IHdpbmRvdyAqdykK K3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGJvb2wgZGVsZXRl X2NhY2hlID0gKCh3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID09IDgKKyAgICAg ICAgICAgICAgICAgICAgICAgIHx8IG1jX3JlZGlzcGxheSA9PSAzKQorICAgICAgICAgICAgICAg ICAgICAgICAmJiAhdy0+bWMuZHJhd19jcm9zc2hhaXJzCisgICAgICAgICAgICAgICAgICAgICAg ICYmICF3LT5tYy5lcmFzZV9jcm9zc2hhaXJzKQorICAgICAgICAgICAgICAgICAgICAgID8gZmFs c2UKKyAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7CisjaWZkZWYgR0xZUEhfREVCVUcKKyAg aWYgKHRyYWNlX3JlZGlzcGxheV9wICYmIEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYg KCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29u ZikpCisgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jv c3NoYWlycykpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VU V0lORE9XICh3aW5kb3csIHc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ICB7CisgICAg ICB1cGRhdGVfYmVnaW4gKGYpOworICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICBtY19lcmFz ZV9jcm9zc2hhaXJzICh3LCBkZWxldGVfY2FjaGUpOworICAgICAgdW5ibG9ja19pbnB1dCAoKTsK KyAgICAgIHVwZGF0ZV9lbmQgKGYpOworICAgIH0KK30KKwordm9pZAorbWNfbXVsdGlwbGVfY3Vy c29yc19wb3J0YWwgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sIGJvb2wgYWN0aXZlX2N1cnNv cl9wKQoreworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCAmJiBC VUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKQorICAgICAgICAgIHx8ICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkpCisgICAgeworICAgICAg TGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgICAg IExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFu aWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOwor ICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfbXVsdGlwbGVfY3Vyc29yc19wb3J0YWwgKCVzKTog IG9uICglZCkgfCBhY3RpdmVfY3Vyc29yX3AgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAg ICAgIHdpbmRvd19jaGFyLCBvbiwgYWN0aXZlX2N1cnNvcl9wKTsKKyAgICB9CisjZW5kaWYKKyAg Ym9vbCBtaW5pbWFsX3AgPSAoIXctPm1jLmRyYXdfbXVsdGl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ZSB1c2VsZXNzLiAqLworICBpZiAoIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAmJiAh TklMUCAody0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkKKyAgICAgICYmIFdJTkRPV1AgKFhDQVIg KEZudGggKG1ha2VfbnVtYmVyICgxKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAg ICAgJiYgdyA9PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPm11bHRp cGxlX2N1cnNvcnNfY2FjaGUpKSkKKyAgICAgICYmICFFUSAody0+Y29udGVudHMsIFhDQVIgKEZu dGggKG1ha2VfbnVtYmVyICgyKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKSkKKyAgICB7 CisgICAgICB3c2V0X211bHRpcGxlX2N1cnNvcnNfY2FjaGUgKHcsIFFuaWwpOworICAgICAgdy0+ bWMuZXJhc2VfbXVsdGlwbGVfY3Vyc29ycyA9IGZhbHNlOworICAgIH0KKyAgaWYgKG9uCisgICAg ICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICh3ID09IFhXSU5ET1cgKHNlbGVjdGVk X3dpbmRvdykKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtdWx0aXBsZV9jdXJzb3JzX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICYmIE5JTFAgKHct Pm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKSkKKyAgICBtY19kcmF3X211bHRp cGxlX2N1cnNvcnMgKHcsIGFjdGl2ZV9jdXJzb3JfcCwgbWluaW1hbF9wKTsKKyAgICBlbHNlIGlm IChvbgorICAgICAgICAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQorICAgICA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isg ICAgICAgICAgICAgICAgICAgICYmIG1jX3JlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgIT0g OAorICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3BsYXkgIT0gMworICAgICAgICAgICAg ICAgICAgICAmJiB3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAgICAgICAgICAgICAg ICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX2Ry YXdfZm9ydGh3aXRoKSkpOworICBpZiAody0+bWMuZXJhc2VfY3Jvc3NoYWlycyAmJiB3LT5tYy5k cmF3X2Nyb3NzaGFpcnMKKyAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgIU5J TFAgKHctPmNyb3NzaGFpcnNfY2FjaGUpCisgICAgICAmJiBXSU5ET1dQIChYQ0FSIChGbnRoICht YWtlX251bWJlciAoMSksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkKKyAgICAgICYmIHcgPT0gWFdJ TkRPVyAoWENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkp CisgICAgICAmJiBFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgyKSwg dy0+Y3Jvc3NoYWlyc19jYWNoZSkpKSkKKyAgICBtY19lcmFzZV9jcm9zc2hhaXJzICh3LCB0cnVl KTsKKyAgLyogYHctPmNyb3NzaGFpcnNfY2FjaGVgIGJlbG9uZ3MgdG8gdGhlIHdpbmRvdywgbm90 IHRoZSBidWZmZXIuICBTd2l0Y2hpbmcKKyAgYnVmZmVycyB3aXRoaW4gdGhlIHNhbWUgd2luZG93 IHJlbmRlcnMgdGhlIGNhY2hlIHVzZWxlc3MuICovCisgIGlmICghTUlOSV9XSU5ET1dfUCAodykK KyAgICAgICYmICFOSUxQICh3LT5jcm9zc2hhaXJzX2NhY2hlKQorICAgICAgJiYgV0lORE9XUCAo WENBUiAoRm50aCAobWFrZV9udW1iZXIgKDEpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAg ICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgdy0+Y3Jvc3No YWlyc19jYWNoZSkpKQorICAgICAgJiYgIUVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFr ZV9udW1iZXIgKDIpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpKQorICAgIHsKKyAgICAgIHdzZXRf Y3Jvc3NoYWlyc19jYWNoZSAodywgUW5pbCk7CisgICAgICB3LT5tYy5lcmFzZV9jcm9zc2hhaXJz ID0gZmFsc2U7CisgICAgfQorICBpZiAob24KKyAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQor ICAgICAgJiYgKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KQorICAgICAgICAgIHx8ICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2lu ZG93cykpKQorICAgICAgJiYgTklMUCAody0+Y3Jvc3NoYWlyc19jYWNoZSkKKyAgICAgICYmICgh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpKQorICAgIG1j X2RyYXdfY3Jvc3NoYWlycyAodywgYWN0aXZlX2N1cnNvcl9wLCBtaW5pbWFsX3ApOworICAgIGVs c2UgaWYgKG9uCisgICAgICAgICAgICAgJiYgIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAgICAg ICAgJiYgIU5JTFAgKHctPmNyb3NzaGFpcnNfY2FjaGUpCisgICAgICAgICAgICAgJiYgIU5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAg JiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFr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9zZV93aW5kb3cnLCBhbmQgYHVwZGF0ZV93aW5kb3dfY3Vyc29yJy4gKi8KKyAgaWYg KCFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgIXctPm1jLmRyYXdfY3Jvc3NoYWlycworICAg ICAgJiYgIU5JTFAgKHctPmNyb3NzaGFpcnNfY2FjaGUpCisgICAgICAmJiAhTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICYmIFdJTkRPV1AgKFhD QVIgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAg JiYgdyA9PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtlX251bWJlciAoMSksIHctPmNyb3NzaGFp cnNfY2FjaGUpKSkKKyAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9u dW1iZXIgKDIpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpKQorICAgIHJldHVybiB0cnVlOworICAg IC8qIFRoaXMgaXMgYSBzaXR1YXRpb24gd2hlcmVieSBgcmVkaXNwbGF5X2ludGVybmFsJyB3b3Vs ZCBub3JtYWxseSBnbyB0bworICAgIGBlbmRfb2ZfcmVkaXNwbGF5YCAtLSBgZGlzcGxheV9hbmRf c2V0X2N1cnNvcicgd291bGQgbm90IGJlIGNhbGxlZCBpbiB0aGF0CisgICAgc2l0dWF0aW9uLiAg VGhlcmVmb3JlLCB3ZSBtdXN0IGZvcmNlIGNhbGwgYGRpc3BsYXlfYW5kX3NldF9jdXJzb3InLiAq LworICAgIGVsc2UgaWYgKCFNSU5JX1dJTkRPV19QICh3KQorICAgICAgICAgICAgICYmIHctPm1j LmRyYXdfY3Jvc3NoYWlycworICAgICAgICAgICAgICYmIHctPmN1cnNvcl9vZmZfcCA9PSB3LT5s YXN0X2N1cnNvcl9vZmZfcAorICAgICAgICAgICAgICYmICFOSUxQICh3LT5jcm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VRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAg fHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKSkKKyAg ICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAo d2luZG93LCBRbmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3df c3RyaW5nKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxubWMtYWN0aXZhdGUtbXVsdGlwbGUt Y3Vyc29ycyAoJXMpXG4iLCB3aW5kb3dfY2hhcik7CisgICAgfQorI2VuZGlmCisgIHctPm1jLmRy YXdfbXVsdGlwbGVfY3Vyc29ycyA9IHRydWU7CisgIHctPm1jLmVyYXNlX211bHRpcGxlX2N1cnNv cnMgPSB0cnVlOworICByZXR1cm4gUW5pbDsKK30KKworREVGVU4gKCJtYy1hY3RpdmF0ZS1jcm9z c2hhaXJzIiwgRm1jX2FjdGl2YXRlX2Nyb3NzaGFpcnMsIFNtY19hY3RpdmF0ZV9jcm9zc2hhaXJz LCAxLCAxLCAwLAorICAgICAgIGRvYzogLyogRG9jLXN0cmluZy4gKi8pCisgIChMaXNwX09iamVj dCB3aW5kb3cpCit7CisgIHN0cnVjdCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHdp bmRvdyk7CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wICYmIEJV RkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAgfHwg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GcHJlZml4X251bWVyaWNfdmFsdWUgKGFyZyk7CisgICAgICBtY19z dGRlcnJfcCA9IFhJTlQgKGFyZykgPiAwOworICAgIH0KKyAgaWYgKG1jX3N0ZGVycl9wKQorICAg IGJzZXRfYmx2X21jX3N0ZGVyciAoYiwgUXQpOworICAgIGVsc2UKKyAgICAgIGJzZXRfYmx2X21j X3N0ZGVyciAoYiwgUW5pbCk7CisgIHJldHVybiBRbmlsOworfQorCisvKiAgKGZ1bmRhbWVudGFs LW1vZGUpCisgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkKKyAgICAoc2V0cSBidWZm ZXItZGlzcGxheS10YWJsZSAobWFrZS1kaXNwbGF5LXRhYmxlKSkKKyAgICAoYXNldCBidWZmZXIt ZGlzcGxheS10YWJsZQorICAgICAgICAgID9cdAorICAgICAgICAgICh2ZWN0b3IgKG1ha2UtZ2x5 cGgtY29kZSA/XHUwMEJCICdmb250LWxvY2std2FybmluZy1mYWNlKQorICAgICAgICAgICAgICAg ICAgKG1ha2UtZ2x5cGgtY29kZSA/XHQgJ2hpZ2hsaWdodCkpKQorICAgIChhc2V0IGJ1ZmZlci1k aXNwbGF5LXRhYmxlCisgICAgICAgICAgP1xuCisgICAgICAgICAgKHZlY3RvciAobWFrZS1nbHlw aC1jb2RlID9cdTAwQjYgJ2ZvbnQtbG9jay1jb21tZW50LWZhY2UpCisgICAgICAgICAgICAgICAg ICA/XG4pKQorICAgIChzZXRxIHRhYi13aWR0aCA4KQorICAgIChzZXRxLWxvY2FsIGF1dG8taHNj cm9sbC1tb2RlICdjdXJyZW50LWxpbmUpICovCisKK0RFRlVOICgibWMtZGVidWciLCBGbWNfZGVi dWcsIFNtY19kZWJ1ZywgMCwgMCwgIiIsCisgICAgICAgZG9jOiAvKiBUaGlzIGZ1bmN0aW9uIHVz ZWQgZm9yIGRlYnVnZ2luZy4gKi8pCisgICh2b2lkKQoreworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqCisgICAgICAgICAgICAgICAgICAgICAgUFJFTElNSU5BUlkgU1RVRkYKKyoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93IChz ZWxlY3RlZF93aW5kb3cpOworICBzdHJ1Y3QgaXQgaXQ7CisgIHZvaWQgKml0ZGF0YSA9IGJpZGlf c2hlbHZlX2NhY2hlICgpOworICBzdHJ1Y3QgaXQgaXQyOworICB2b2lkICppdDJkYXRhID0gTlVM TDsKKyAgc3RydWN0IGl0IGl0MzsKKyAgdm9pZCAqaXQzZGF0YSA9IE5VTEw7CisgIGVudW0gbW92 ZV9pdF9yZXN1bHQgcmMgPSBNT1ZFX1hfUkVBQ0hFRDsKKyAgc3RydWN0IHRleHRfcG9zIHN0YXJ0 X3RleHRfcG9zaXRpb247CisgIGludCBjb3VudCA9IDA7CisgIGludCBuZXdfeCA9IDA7CisgIGlu dCBwcmV2aW91c19pdF9jID0gMDsKKyAgaW50IHByZXZpb3VzX2l0X2ZldGNoYnl0ZSA9IDA7Cisg IGludCBwcmV2aW91c19pdF9jdXJyZW50X3ggPSAwOworICBpbnQgcHJldmlvdXNfaXRfY2hhcnBv cyA9IDA7CisgIGludCBwcmV2aW91c19pdF9waXhlbF93aWR0aCA9IDA7CisgIGJvb2wgZmluYWxf bG9vcF9wID0gZmFsc2U7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRo ICh3LCBURVhUX0FSRUEpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAg ICAgICAgICAgU1RBUlQgRElTUExBWSAtLSB3LT5zdGFydAorKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisgIC8qIEJlZ2luIHRoZSBqb3VybmV5IGF0IHctPnN0YXJ0LiAqLworICBTRVRfVEVYVF9Q T1NfRlJPTV9NQVJLRVIgKHN0YXJ0X3RleHRfcG9zaXRpb24sIHctPnN0YXJ0KTsKKyAgc3RhcnRf ZGlzcGxheSAoJml0LCB3LCBzdGFydF90ZXh0X3Bvc2l0aW9uKTsKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKgorICAgICAgICAgICAgICAgIEdPIFRPIFRIRSBCRUdJTk5JTkcgT0YgVEhFIENVUlJF TlQgTElORS4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICAvKiBQbGFjZSB0aGUgSVQgb24g dGhlIGN1cnJlbnQgbGluZSBjb250YWluaW5nIFBULiAqLworICBpbnQgdm9mZnNldCA9IChXSU5E T1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KSA+IDAKKyAgICAgICAgICAgICAgICAgJiYgdy0+b3V0 cHV0X2N1cnNvci52cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgID8gdy0+b3V0cHV0X2N1cnNv ci52cG9zIC0gMQorICAgICAgICAgICAgICAgICAgOiB3LT5vdXRwdXRfY3Vyc29yLnZwb3M7Cisg IGlmICh2b2Zmc2V0ID4gMCkKKyAgICBtb3ZlX2l0X2J5X2xpbmVzICgmaXQsIHZvZmZzZXQpOwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgIE1PVkUgSVQ6 ICBJTkNSRU1FTlQgPT0gMSBwaXhlbAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGZwcmlu dGYgKHN0ZGVyciwgIlxuaXQuZmlyc3RfdmlzaWJsZV94ICglZClcbiIsIGl0LmZpcnN0X3Zpc2li bGVfeCk7CisgIHdoaWxlICghZmluYWxfbG9vcF9wKQorICAgIHsKKyAgICAgIG1jX2RlYnVnX3Ag PSB0cnVlOworICAgICAgZmluYWxfbG9vcF9wID0gKElUX0NIQVJQT1MgKGl0KSA9PSBaVikKKyAg ICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICA6IChGRVRD SF9CWVRFIChJVF9CWVRFUE9TIChpdCkpID09ICdcbicKKyAgICAgICAgICAgICAgICAgICAgICAg ICYmIGl0LmMgIT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAg ICAgICAgICAgICA6IChyYyA9PSBNT1ZFX0xJTkVfQ09OVElOVUVEKQorICAgICAgICAgICAgICAg ICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgIDogKHJjID09IE1PVkVfTElORV9U UlVOQ0FURUQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmN1cnJlbnRfeCAtIGl0LmZp cnN0X3Zpc2libGVfeCA+IHRleHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAg PyB0cnVlCisgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlOworICAgICAgaWYgKGl0LmN1cnJl bnRfeCA+IHByZXZpb3VzX2l0X2N1cnJlbnRfeAorICAgICAgICAgIHx8IElUX0NIQVJQT1MgKGl0 KSA+IHByZXZpb3VzX2l0X2NoYXJwb3MKKyAgICAgICAgICB8fCBpdC5jICE9IHByZXZpb3VzX2l0 X2MKKyAgICAgICAgICB8fCBpdC5jID09IDAKKyAgICAgICAgICB8fCBpdC5jID09IDEwKQorICAg ICAgICB7CisgICAgICAgICAgTGlzcF9PYmplY3QgY2hhcmFjdGVyID0gRmNoYXJfdG9fc3RyaW5n IChtYWtlX251bWJlciAoaXQuYykpOworICAgICAgICAgIGludCBjaGFycG9zID0gSVRfQ0hBUlBP UyAoaXQpOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuY2hhcnBvcyAoJWQvJWQvJWQp IHwgZmlyc3RfeCAoJWQpIHwgcHJldmlvdXNfeCAoJWQpIHwgeCAoJWQpIHwgYyAoJXMpIHwgcHcg KCVkKSB8IGhwb3MgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYXJwb3Ms IHByZXZpb3VzX2l0X2NoYXJwb3MsIEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKGl0KSksCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBpdC5maXJzdF92aXNpYmxlX3gsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICBwcmV2aW91c19pdF9jdXJyZW50X3gsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICBpdC5jdXJyZW50X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCFOSUxQ IChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGl0LmMgPT0gOSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHQiCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGl0LmMgPT0gMTApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyAiXFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVy KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBpdC5jICE9IDkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyAhPSAxMCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6ICI/IiksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5waXhlbF93aWR0 aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0Lmhwb3MpOworICAgICAgICAgIHByZXZp b3VzX2l0X2MgPSBpdC5jOworICAgICAgICAgIHByZXZpb3VzX2l0X2N1cnJlbnRfeCA9IGl0LmN1 cnJlbnRfeDsKKyAgICAgICAgICBwcmV2aW91c19pdF9jaGFycG9zID0gSVRfQ0hBUlBPUyAoaXQp OworICAgICAgICAgIHByZXZpb3VzX2l0X2ZldGNoYnl0ZSA9IEZFVENIX0JZVEUgKElUX0JZVEVQ T1MgKGl0KSk7CisgICAgICAgICAgcHJldmlvdXNfaXRfcGl4ZWxfd2lkdGggPSBpdC5waXhlbF93 aWR0aDsKKyAgICAgICAgICBjb3VudCArPSAxOworICAgICAgICB9CisgICAgICBuZXdfeCArPSAx OworICAgICAgU0FWRV9JVCAoaXQyLCBpdCwgaXQyZGF0YSk7CisgICAgICByYyA9IG1vdmVfaXRf aW5fZGlzcGxheV9saW5lX3RvICgmaXQsIFpWLCBuZXdfeCwgTU9WRV9UT19QT1MgfCBNT1ZFX1RP X1gpOworICAgICAgU0FWRV9JVCAoaXQzLCBpdCwgaXQzZGF0YSk7CisgICAgfQorLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUSEUgRU5E CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgbWNfZGVidWdfcCA9IGZhbHNlOworICBiaWRp X3Vuc2hlbHZlX2NhY2hlIChpdGRhdGEsIGZhbHNlKTsKKyAgcmV0dXJuIFFuaWw7Cit9CisKKy8q IGVuZCBNVUxUSVBMRSBDVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAM CiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioKIAkJICAgICAgV2luZG93IGRpc3BsYXkgZGltZW5zaW9ucwpAQCAt MTEyMDAsNyArMTU1NTUsOSBAQCByZXNpemVfZWNob19hcmVhX2V4YWN0bHkgKHZvaWQpCiAJewog CSAgd2luZG93c19vcl9idWZmZXJzX2NoYW5nZWQgPSA0MjsKIAkgIHVwZGF0ZV9tb2RlX2xpbmVz ID0gMzA7Ci0JICByZWRpc3BsYXlfaW50ZXJuYWwgKCk7CisgICAgICBtY19yZWRpc3BsYXlfaW50 ZXJuYWwgPSAxOworICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgxKTsKKyAgICAgIG1jX3JlZGlz cGxheV9pbnRlcm5hbCA9IDA7CiAJfQogICAgIH0KIH0KQEAgLTExNjg3LDcgKzE2MDQ0LDkgQEAg ZWNob19hcmVhX2Rpc3BsYXkgKGJvb2wgdXBkYXRlX2ZyYW1lX3ApCiAJICAgICAgcHRyZGlmZl90 IGNvdW50ID0gU1BFQ1BETF9JTkRFWCAoKTsKIAkgICAgICBzcGVjYmluZCAoUXJlZGlzcGxheV9k b250X3BhdXNlLCBRdCk7CiAJICAgICAgZnNldF9yZWRpc3BsYXkgKGYpOwotCSAgICAgIHJlZGlz cGxheV9pbnRlcm5hbCAoKTsKKyAgICAgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAyOwor ICAgICAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoMik7CisgICAgICAgICAgbWNfcmVkaXNwbGF5 X2ludGVybmFsID0gMDsKIAkgICAgICB1bmJpbmRfdG8gKGNvdW50LCBRbmlsKTsKIAkgICAgfQog CSAgZWxzZSBpZiAoRlJBTUVfV0lORE9XX1AgKGYpICYmIG4gPT0gMCkKQEAgLTEzMzY2LDYgKzE3 NzI1LDE5IEBAIGhzY3JvbGxfd2luZG93X3RyZWUgKExpc3BfT2JqZWN0IHdpbmRvdykKIAkgICAg ICBlbHNlCiAJCXB0ID0gY2xpcF90b19ib3VuZHMgKEJFR1YsIG1hcmtlcl9wb3NpdGlvbiAody0+ cG9pbnRtKSwgWlYpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisgIHN0cnVjdCBkaXNwbGF5X3BvcyAqcG9zID0gJmN1cnNvcl9yb3ctPnN0 YXJ0OworICBwdHJkaWZmX3QgY2hhcnBvcyA9IENIQVJQT1MgKHBvcy0+cG9zKTsKKyAgYm9vbCBi YXJmX2NyYXNoID0gKGNoYXJwb3MgPCAwIHx8IChjaGFycG9zID49IEJVRl9CRUcgKGN1cnJlbnRf YnVmZmVyKSAmJiBjaGFycG9zIDw9IFpWKSkgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2Ny YXNoKQorICAgIHJldHVybiBoc2Nyb2xsZWRfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogCSAgICAgIC8qIE1vdmUgaXRlcmF0b3IgdG8gcHQgc3RhcnRpbmcgYXQgY3Vyc29yX3Jv dy0+c3RhcnQgaW4KIAkJIGEgbGluZSB3aXRoIGluZmluaXRlIHdpZHRoLiAgKi8KIAkgICAgICBp bml0X3RvX3Jvd19zdGFydCAoJml0LCB3LCBjdXJzb3Jfcm93KTsKQEAgLTEzNjA3LDkgKzE3OTc5 LDE3IE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zdHJ1Y3Qgd2luZG93ICpzdzsKICAgc3RydWN0 IGZyYW1lICpmcjsKQEAgLTE0MjgxLDYgKzE4NjY1LDIzIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAo dm9pZCkKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAkgICAgICB1cGRhdGVfd2luZG93X2Zy aW5nZXMgKHcsIGZhbHNlKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10aW1lciBmdW5jdGlv biBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5kb3cnLgorICAgYHct Pm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1jLWFjdGl2YXRlLWNy b3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3Ig bW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRpbWl6YXRpb24gM2Ag KGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBsaW5lcyBzdWJzZXF1 ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGByZWRpc3BsYXlfd2lu ZG93Jy4gKi8KKworICAgICAgbWNfcmVtb3ZlX211bHRpcGxlX2N1cnNvcnMgKHcpOworICAgICAg bWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJICAgICAgZ290byB1cGRhdGU7CiAJICAgIH0KIAkgIGVsc2UKQEAgLTE0MzAzLDYgKzE4NzA0 LDIyIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKIAkJICAmJiAodyA9IFhXSU5ET1cgKHNl bGVjdGVkX3dpbmRvdykpICE9IHN3KQogCQlnb3RvIHJldHJ5OwogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10 aW1lciBmdW5jdGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5k b3cnLgorICAgYHctPm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1j LWFjdGl2YXRlLWNyb3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9y aWdodCBjdXJzb3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRp bWl6YXRpb24gM2AgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBs aW5lcyBzdWJzZXF1ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGBy ZWRpc3BsYXlfd2luZG93Jy4gKi8KKworICAgIGlmICh3LT5tdXN0X2JlX3VwZGF0ZWRfcCkKKyAg ICAgIGdvdG8gdXBkYXRlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAg LyogV2UgdXNlZCB0byBhbHdheXMgZ290byBlbmRfb2ZfcmVkaXNwbGF5IGhlcmUsIGJ1dC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ICh3KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCQkgIGdv dG8gdXBkYXRlOwogCQl9CiAJICAgICAgZWxzZQpAQCAtMTQ3MjQsMTYgKzE5MTU4LDM2IEBAIHJl ZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgKGludCBmcm9tX3doZXJlKQogICBibG9ja19idWZm ZXJfZmxpcHMgKCk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgc3RydWN0IHdpbmRvdyAqdyA9IGRl Y29kZV9saXZlX3dpbmRvdyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgdy0+bWMucmVkaXNwbGF5X3By ZXNlcnZlX2VjaG9fYXJlYSA9IGZyb21fd2hlcmU7CisgIG1jX3JlZGlzcGxheV9wcmVzZXJ2ZV9l Y2hvX2FyZWEgPSBmcm9tX3doZXJlOworCiAgIGlmICghTklMUCAoZWNob19hcmVhX2J1ZmZlclsx XSkpCiAgICAgewogICAgICAgLyogV2UgaGF2ZSBhIHByZXZpb3VzbHkgZGlzcGxheWVkIG1lc3Nh Z2UsIGJ1dCBubyBjdXJyZW50CiAJIG1lc3NhZ2UuICBSZWRpc3BsYXkgdGhlIHByZXZpb3VzIG1l c3NhZ2UuICAqLwogICAgICAgZGlzcGxheV9sYXN0X2Rpc3BsYXllZF9tZXNzYWdlX3AgPSB0cnVl OwotICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgpOworICAgICAgbWNfcmVkaXNwbGF5X2ludGVy bmFsID0gNDsKKyAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoNCk7CisgICAgICBtY19yZWRpc3Bs YXlfaW50ZXJuYWwgPSAwOwogICAgICAgZGlzcGxheV9sYXN0X2Rpc3BsYXllZF9tZXNzYWdlX3Ag PSBmYWxzZTsKICAgICB9CiAgIGVsc2UKLSAgICByZWRpc3BsYXlfaW50ZXJuYWwgKCk7CisgICAg eworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gNTsKKyAgICAgIHJlZGlzcGxheV9pbnRl cm5hbCAoNSk7CisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAwOworICAgIH0KKworICB3 LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID0gMDsKKyAgbWNfcmVkaXNwbGF5X3By ZXNlcnZlX2VjaG9fYXJlYSA9IDA7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKICAg Zmx1c2hfZnJhbWUgKFNFTEVDVEVEX0ZSQU1FICgpKTsKICAgdW5iaW5kX3RvIChjb3VudCwgUW5p bCk7CkBAIC0xNzI1OSw2ICsyMTcxMywxNiBAQCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVj dCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQogICBkZWJ1Z19tZXRob2RfYWRkICh3LCAi cmVjZW50ZXIiKTsKICNlbmRpZgogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCisgIG1jX3JlbW92ZV9tdWx0aXBsZV9jdXJzb3JzICh3KTsKKyAg bWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIC8qIEZvcmdldCBhbnkgcHJldmlvdXNseSByZW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KKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgc2V0X2J1ZmZlcl9pbnRlcm5hbF8xIChvbGQp OwogICAvKiBBdm9pZCBhbiBhYm9ydCBpbiBURU1QX1NFVF9QVF9CT1RIIGlmIHRoZSBidWZmZXIg aGFzIGJlY29tZQogICAgICBzaG9ydGVyLiAgVGhpcyBjYW4gYmUgY2F1c2VkIGJ5IGxvZyB0cnVu Y2F0aW9uIGluICpNZXNzYWdlcyouICAqLwpAQCAtMjAwNzgsNiArMjQ1NTgsMTcgQEAgYXBwZW5k X3NwYWNlX2Zvcl9uZXdsaW5lIChzdHJ1Y3QgaXQgKml0LCBib29sIGRlZmF1bHRfZmFjZV9wKQog CSAgbWVtc2V0ICgmaXQtPnBvc2l0aW9uLCAwLCBzaXplb2YgaXQtPnBvc2l0aW9uKTsKIAkgIGl0 LT5vYmplY3QgPSBRbmlsOwogCSAgaXQtPmMgPSBpdC0+Y2hhcl90b19kaXNwbGF5ID0gJyAnOwor CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisg ICAgICBpZiAoSVRfQllURVBPUyAoKml0KSA+PSBaVl9CWVRFKQorICAgICAgICBpdC0+enZfcCA9 IHRydWU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGl0LT5sZW4gPSAxOwog CiAJICAvKiBJZiB0aGUgZGVmYXVsdCBmYWNlIHdhcyByZW1hcHBlZCwgYmUgc3VyZSB0byB1c2Ug dGhlCkBAIC0yMTA0MSw2ICsyNTUzMiwyMSBAQCBkaXNwbGF5X2NvdW50X2xpbmVzX3Zpc3VhbGx5 IChzdHJ1Y3QgaXQgKml0KQogc3RhdGljIHZvaWQKIG1heWJlX3Byb2R1Y2VfbGluZV9udW1iZXIg KHN0cnVjdCBpdCAqaXQpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKyAgYm9vbCBiYXJmX2NyYXNoID0gKGl0LT5nbHlwaF9yb3cgPT0g TlVMTAorICAgICAgICAgICAgICAgICAgICAgfHwgaXQtPmdseXBoX3Jvdy0+dXNlZFtURVhUX0FS RUFdID09IDApCisgICAgICAgICAgICAgICAgICAgID8gZmFsc2UKKyAgICAgICAgICAgICAgICAg ICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaCkKKyAgICByZXR1cm47CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgcHRyZGlmZl90IGxhc3RfbGluZSA9IGl0LT5sbnVtOwogICBw dHJkaWZmX3Qgc3RhcnRfZnJvbSwgYnl0ZXBvczsKICAgcHRyZGlmZl90IHRoaXNfbGluZTsKQEAg LTIxMTg1LDggKzI1NjkxLDEyIEBAIG1heWJlX3Byb2R1Y2VfbGluZV9udW1iZXIgKHN0cnVjdCBp dCAqaXQpCiAgICAgIGFuIEwyUiBwYXJhZ3JhcGguICAqLwogICB0ZW1faXQuYmlkaV9pdC5yZXNv bHZlZF9sZXZlbCA9IDI7CiAKKyAgLyogV2UgbXVzdCBsZWF2ZSBzcGFjZSBmb3IgMiBnbHlwaHMg Zm9yIGNvbnRpbnVhdGlvbiBhbmQgdHJ1bmNhdGlvbiwKKyAgICAgYW5kIGF0IGxlYXN0IG9uZSBn bHlwaCBmb3IgYnVmZmVyIHRleHQuICAqLworICBpbnQgd2lkdGhfbGltaXQgPQorICAgIHRlbV9p dC5sYXN0X3Zpc2libGVfeCAtIHRlbV9pdC5maXJzdF92aXNpYmxlX3gKKyAgICAtIDMgKiBGUkFN RV9DT0xVTU5fV0lEVEggKGl0LT5mKTsKICAgLyogUHJvZHVjZSBnbHlwaHMgZm9yIHRoZSBsaW5l IG51bWJlciBpbiBhIHNjcmF0Y2ggZ2x5cGhfcm93LiAgKi8KLSAgaW50IG5fZ2x5cGhzX2JlZm9y ZTsKICAgZm9yIChjb25zdCBjaGFyICpwID0gbG51bV9idWY7ICpwOyBwKyspCiAgICAgewogICAg ICAgLyogRm9yIGNvbnRpbnVhdGlvbiBsaW5lcyBhbmQgbGluZXMgYWZ0ZXIgWlYsIGluc3RlYWQg b2YgYSBsaW5lCkBAIC0yMTIxMCwxOCArMjU3MjAsMzEgQEAgbWF5YmVfcHJvZHVjZV9saW5lX251 bWJlciAoc3RydWN0IGl0ICppdCkKICAgICAgIGVsc2UKIAl0ZW1faXQuYyA9IHRlbV9pdC5jaGFy X3RvX2Rpc3BsYXkgPSAqcDsKICAgICAgIHRlbV9pdC5sZW4gPSAxOwotICAgICAgbl9nbHlwaHNf YmVmb3JlID0gc2NyYXRjaF9nbHlwaF9yb3cudXNlZFtURVhUX0FSRUFdOworCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBpZiAoYmV5 b25kX3p2KQorICAgICAgICB0ZW1faXQuenZfcCA9IHRydWU7CisgICAgICB0ZW1faXQuY3VycmVu dF95ID0gaXQtPmN1cnJlbnRfeTsKKyAgICAgIHRlbV9pdC52cG9zID0gaXQtPnZwb3M7CiAgICAg ICAvKiBNYWtlIHN1cmUgdGhlc2UgZ2x5cGhzIHdpbGwgaGF2ZSBhICJwb3NpdGlvbiIgb2YgLTEu ICAqLwogICAgICAgU0VUX1RFWFRfUE9TICh0ZW1faXQucG9zaXRp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+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07CiAJfQorCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+eCA9 IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKworICAg ICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBv czsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24p OwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAgICAgICBpZiAoaXQtPnBpeGVs X3dpZHRoID4gMCkKQEAgLTI3MDgwLDYgKzMxNjIxLDI0IEBAIGFwcGVuZF9jb21wb3NpdGVfZ2x5 cGggKHN0cnVjdCBpdCAqaXQpCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBo X3Jvdy0+Z2x5cGhzW2l0LT5hcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRf eDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBv cyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBn bHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg ICAgICBnbHlwaC0+Y2hhcnBvcyA9IGl0LT5jbXBfaXQuY2hhcnBvczsKICAgICAgIGdseXBoLT5v YmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNI UlRfTUFYKTsKQEAgLTI3Mjg4LDYgKzMxODQ3LDI0IEBAIHByb2R1Y2VfaW1hZ2VfZ2x5cGggKHN0 cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhz W2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAg Z2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9z OworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9 IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBnbHlwaC0+Y2hh cnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9i amVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9fYm91bmRzICgtMSwgaXQtPnBp eGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzM5MSw2ICszMTk2OCwyNCBAQCBwcm9kdWNlX3h3 aWRnZXRfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmds eXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJl bnRfeDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+ aHBvcyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAg ICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlwaC0+ b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9fYm91 bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzQ3Nyw2ICszMjA3Miwy NCBAQCBhcHBlbmRfc3RyZXRjaF9nbHlwaCAoc3RydWN0IGl0ICppdCwgTGlzcF9PYmplY3Qgb2Jq ZWN0LAogCSAgICB3aWR0aCAtPSBpdC0+Zmlyc3RfdmlzaWJsZV94IC0gaXQtPmN1cnJlbnRfeDsK IAkgIGVhc3NlcnQgKHdpZHRoID4gMCk7CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50 X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhw b3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAg Z2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5 cGgtPm9iamVjdCA9IG9iamVjdDsKICAgICAgIC8qIEZJWE1FOiBJdCB3b3VsZCBiZSBiZXR0ZXIg dG8gdXNlIFRZUEVfTUFYIGhlcmUsIGJ1dApAQCAtMjc5MjYsNiArMzI1MzksMjQgQEAgYXBwZW5k X2dseXBobGVzc19nbHlwaCAoc3RydWN0IGl0ICppdCwgaW50IGZhY2VfaWQsIGJvb2wgZm9yX25v X2ZvbnQsIGludCBsZW4sCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jv dy0+Z2x5cGhzW2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisg ICAgICBnbHlwaC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQt Pmhwb3M7CisKKyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56 dl9wID0gaXQtPnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGds eXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmpl Y3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNIUlRf TUFYKTsKQEAgLTI5NjkyLDkgKzM0MzIzLDMyIEBAIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHN0 cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgICAgICB3LT5waHlzX2N1cnNvci52cG9zID0gdnBv czsKICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgdy0+bWMuaCA9IC0xOworICB3LT5tYy5meCA9IC0xOworICB3LT5tYy5meSA9 IC0xOworICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBOT19GTEFWT1I7CisgIHctPm1jLnJlZCA9IC0x LjA7CisgIHctPm1jLmdyZWVuID0gLTEuMDsKKyAgdy0+bWMuYmx1ZSA9IC0xLjA7CisgIHctPm1j LnBvc2ludCA9IC0xOworCiAgIEZSQU1FX1JJRiAoZiktPmRyYXdfd2luZG93X2N1cnNvciAodywg Z2x5cGhfcm93LCB4LCB5LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5l d19jdXJzb3JfdHlwZSwgbmV3X2N1cnNvcl93aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBvbiwgYWN0aXZlX2N1cnNvcik7CisKKyAgbWNfbXVsdGlwbGVfY3Vyc29y c19wb3J0YWwgKHcsIG9uLCBhY3RpdmVfY3Vyc29yKTsKKworICAvKiBUaGUgcmVhbCBjdXJzb3Ig KGRyYXduIGFib3ZlKSBpcyBnZXRzIHJlbW92ZWQgYnkgY3Jvc3NoYWlycy4KKyAgYG1jX2RyYXdf Y3Jvc3NoYWlycycgcmVsaWVzIHVwb24gYHctPnBoeXNfY3Vyc29yLngveS9ocG9zL3Zwb3MnIHdo ZW4gT04uICovCisgIG1jX2Nyb3NzaGFpcnNfcG9ydGFsICh3LCBvbiwgYWN0aXZlX2N1cnNvcik7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC0yOTcyNiwxMCArMzQz ODAsMjUgQEAgdXBkYXRlX3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24p CiAgICAgICBpZiAocm93LT5yZXZlcnNlZF9wICYmIGhwb3MgPj0gcm93LT51c2VkW1RFWFRfQVJF QV0pCiAJaHBvcyA9IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsKIAorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgLyogRklYTUU6ICBU aGVzZSByZXN0cmljdGlvbnMgYXJlIGxpa2VseSB0aGUgcmVhc29ucyB0aGF0IGNyb3NzaGFpcnMg YW5kCisgICAgICBtdWx0aXBsZSBmYWtlIGN1cnNvcnMgYXJlIG5vdCB3b3JraW5nIG9uIE1hY09T IE1vamF2ZS4gIEBsYXdsaXN0IGRvZXMgbm90CisgICAgICBwcmVzZW50bHkgaGF2ZSBhY2Nlc3Mg dG8gYSBjb21wdXRlciB3aXRoIHRoYXQgdmVyc2lvbiBvZiB0aGUgT1MuICovCisgICAgICBpZiAo IW1jX2Nyb3NzaGFpcnNfcCAodykKKyAgICAgICAgICAmJiAhbWNfbXVsdGlwbGVfY3Vyc29yc19w ICh3KSkKKyAgICAgICAgewogICAgICAgYmxvY2tfaW5wdXQgKCk7CiAgICAgICBkaXNwbGF5X2Fu ZF9zZXRfY3Vyc29yICh3LCBvbiwgaHBvcywgdnBvcywKIAkJCSAgICAgIHctPnBoeXNfY3Vyc29y LngsIHctPnBoeXNfY3Vyc29yLnkpOwogICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAg fQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgfQogfQogCkBAIC0zMjQzNiw2 ICszNzEwNSwyNiBAQCB4X2ludGVyc2VjdF9yZWN0YW5nbGVzIChYUmVjdGFuZ2xlICpyMSwgWFJl Y3RhbmdsZSAqcjIsIFhSZWN0YW5nbGUgKnJlc3VsdCkKIHZvaWQKIHN5bXNfb2ZfeGRpc3AgKHZv aWQpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX3Jvdyk7CisKKyAgZGVmc3ViciAoJlNt Y19kdW1wX2dseXBoX21hdHJpeCk7CisKKyAgZGVmc3ViciAoJlNtY19hY3RpdmF0ZV9tdWx0aXBs ZV9jdXJzb3JzKTsKKworICBkZWZzdWJyICgmU21jX2FjdGl2YXRlX2Nyb3NzaGFpcnMpOworCisg IGRlZnN1YnIgKCZTbWNfc3RkZXJyKTsKKworICBkZWZzdWJyICgmU21jX2RlYnVnKTsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICBWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3Ig PSBRbmlsOwogICBzdGF0aWNwcm8gKCZWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IpOwogCmRp ZmYgLS1naXQgYS9zcmMveHRlcm0uYyBiL3NyYy94dGVybS5jCmluZGV4IGFmMjhkYWIuLmQ5OWI5 ZTcgMTAwNjQ0Ci0tLSBhL3NyYy94dGVybS5jCisrKyBiL3NyYy94dGVybS5jCkBAIC0xNTMwLDYg KzE1MzAsMjAgQEAgc3RhdGljIHZvaWQgeF9jaGVja19mb250IChzdHJ1Y3QgZnJhbWUgKiwgc3Ry dWN0IGZvbnQgKik7CiBzdGF0aWMgdm9pZAogeF9zZXRfY3Vyc29yX2djIChzdHJ1Y3QgZ2x5cGhf c3RyaW5nICpzKQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisgIGlmIChzLT53LT5tYy5jdXJzb3JfZ2NfZGVmYXVsdCkKKyAgICB7Cisg ICAgICBzLT5nYyA9IHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYzsKKyAgICAgIHJldHVy bjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKHMtPmZvbnQg PT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmJhY2tncm91bmQgPT0gRlJB TUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmZvcmVncm91bmQg PT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTkyNTIsNiArOTI2NiwyNiBAQCB4 X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAq cm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29vcmRpbmF0ZXMgZm9yIHBoeXMg Y3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIGN1cnNvcl9n bHlwaCwgJngsICZ5LCAmaCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9wIHkgPT0gV0lORE9XX1RPX0ZS QU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkgPT0gV0lORE9XX1RPX0ZSQU1F X1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCistICBoIG9mIEhPTExPV19CT1hf Q1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMgYSB2aXNpYmxlIGdhcCBhYm92 ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAgIGggPSByb3ctPmhlaWdodDsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3ZCA9IHctPnBoeXNfY3Vyc29yX3dp ZHRoIC0gMTsKIAogICAvKiBUaGUgZm9yZWdyb3VuZCBvZiBjdXJzb3JfZ2MgaXMgdHlwaWNhbGx5 IHRoZSBzYW1lIGFzIHRoZSBub3JtYWwKQEAgLTkzMjgsNyArOTM2MiwxOCBAQCB4X2RyYXdfYmFy X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgd2lk dGgsIGVudW0gdGV4dAogCSBpbnZpc2libGUuICBVc2UgdGhlIGdseXBoJ3MgZm9yZWdyb3VuZCBj b2xvciBpbnN0ZWFkIGluIHRoaXMKIAkgY2FzZSwgb24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUg Z2x5cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbwogCSB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxl LiAgKi8KLSAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9waXhlbCkKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tncm91bmQgPT0gZi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX3BpeGVsCisgICAgICAgICAgJiYgIXctPm1jLmN1cnNvcl9nY19pbnZpc2libGVf b2theSkKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJeGdjdi5iYWNrZ3JvdW5k ID0geGdjdi5mb3JlZ3JvdW5kID0gZmFjZS0+Zm9yZWdyb3VuZDsKICAgICAgIGVsc2UKIAl4Z2N2 LmJhY2tncm91bmQgPSB4Z2N2LmZvcmVncm91bmQgPSBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf cGl4ZWw7CkBAIC05MzU5LDYgKzk0MDQsMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVjdCB3 aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHdpZHRoLCBlbnVtIHRleHQKIAkg IGlmICgoY3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAJICAgIHggKz0g Y3Vyc29yX2dseXBoLT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogQWxpZ24gYWxsIGZha2Ug QkFSX0NVUlNPUiBvZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBgb3BvaW50X3gnLiAqLworICAg IGlmICh3LT5tYy5meCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIAkgIHhfZmlsbF9yZWN0YW5nbGUgKGYsIGdjLCB4LAogCQkJICBXSU5E T1dfVE9fRlJBTUVfUElYRUxfWSAodywgdy0+cGh5c19jdXJzb3IueSksCiAJCQkgIHdpZHRoLCBy b3ctPmhlaWdodCk7CkBAIC05NDM1LDMxICs5NDkxLDE2MyBAQCB4X2RyYXdfd2luZG93X2N1cnNv ciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93LCBpbnQgeCwK IAl9CiAgICAgICBlbHNlCiAJewotCSAgc3dpdGNoIChjdXJzb3JfdHlwZSkKLQkgICAgewotCSAg ICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgotCSAgICAgIHhfZHJhd19ob2xsb3dfY3Vyc29yICh3 LCBnbHlwaF9yb3cpOwotCSAgICAgIGJyZWFrOwogCi0JICAgIGNhc2UgRklMTEVEX0JPWF9DVVJT T1I6Ci0JICAgICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFXX0NV UlNPUik7Ci0JICAgICAgYnJlYWs7CiAKLQ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KG1ha2VfZmxvYXQg KHRlcm1fcmVkKSwgUW5pbCkpOworICBpbnQgaW50X2dyZWVuID0gWElOVCAoRnRydW5jYXRlICht YWtlX2Zsb2F0ICh0ZXJtX2dyZWVuKSwgUW5pbCkpOzsKKyAgaW50IGludF9ibHVlID0gWElOVCAo RnRydW5jYXRlIChtYWtlX2Zsb2F0ICh0ZXJtX2JsdWUpLCBRbmlsKSk7OworICBYQ29sb3IgY29s b3I7CisgIGNvbG9yLnJlZCA9IGludF9yZWQ7CisgIGNvbG9yLmdyZWVuID0gaW50X2dyZWVuOwor ICBjb2xvci5ibHVlID0gaW50X2JsdWU7CisgIC8qIGB4X2FsbG9jX25lYXJlc3RfY29sb3InIHNl dHMgdGhlIGBjb2xvci5waXhlbGAuICovCisgIHhfYWxsb2NfbmVhcmVzdF9jb2xvciAoZiwgY21h cCwgJmNvbG9yKTsKKyAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgeworICAgIGNhc2UgSE9MTE9X X0JPWF9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJs dWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0 IGZhY2UgKmRlZmF1bHRfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgREVGQVVMVF9GQUNFX0lEKTsK KyAgICAgICAgICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgICAgICAgICBDSEVD S19CVUZGRVIgKGJ1Zik7CisgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1 Zik7CisgICAgICAgICAgYm9vbCByZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRf bWFya19tb2RlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChiLCBtYXJrX2FjdGl2ZSkpKTsKKyAgICAgICAgICBwdHJkaWZmX3QgcmVnaW9uX2JlZ2lu bmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWElOVCAoRnJlZ2lvbl9iZWdpbm5pbmcgKCkpIDog LTE7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/ IFhJTlQgKEZyZWdpb25fZW5kICgpKSA6IC0xOworICAgICAgICAgIGJvb2wgcmVnaW9uX2luX2Jv dW5kc19wID0gKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPm1jLnBvc2ludCA+PSByZWdpb25fYmVnaW5uaW5nCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWMucG9zaW50IDwgcmVnaW9uX2VuZCk7Cisg ICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf Z2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2Vf Z2MnIGluIHhmbnMuYy4gICovCisgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAg ICAgICAgICAmJiByZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAgICAgICAgJiYgYWN0aXZlX3Ap CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZl X3JlZ2lvbl9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1yZWdpb24tZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgc3RydWN0 IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxv d19hY3RpdmVfcmVnaW9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LngtPmN1cnNvcl9nYywgaG9s bG93X2FjdGl2ZV9yZWdpb25fb3V0X2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgIGVsc2UgaWYgKCFyZWdpb25fYWN0aXZlX3AgJiYgYWN0aXZlX3ApCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19h Y3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwt ZmFrZS1jdXJzb3ItZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNl ICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFj ZV9pZCk7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZ IChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBkZWZhdWx0X2ZhY2UtPmZvcmVncm91 bmQpOworICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAo ZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNr Z3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgLyogVGhlIHJlZ2lv biBpcyBfbm90XyB2aXNpYmxlIGluIHRoZSBpbmFjdGl2ZSB3aW5kb3cgYmVjYXVzZSB0aGUgb3Zl cmxheSB3aW5kb3cgcHJvcGVydHkgaXMgdXNlZC4gKi8KKyAgICAgICAgICAgICAgICBlbHNlIGlm ICghYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfaW5hY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hCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNp YmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4 ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAg ICAgICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgSEJB Ul9DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTk9fQ1VSU09SOgorICAg ICAgdy0+cGh5c19jdXJzb3Jfd2lkdGggPSAwOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoK KyAgICAgIGVtYWNzX2Fib3J0ICgpOworICB9CisKKy8qIGVuZCBNVUxUSVBMRSBDVVJTT1JTICov CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KIAotCSAgICBjYXNlIE5PX0NVUlNPUjoKLQkgICAg ICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7Ci0JICAgICAgYnJlYWs7CiAKLQkgICAgZGVmYXVs dDoKLQkgICAgICBlbWFjc19hYm9ydCAoKTsKLQkgICAgfQogCX0KIAogI2lmZGVmIEhBVkVfWF9J MThOCg== --Multipart_Sun_Nov_11_08:51:54_2018-1--