From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Thu, 17 Oct 2019 18:12:35 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Thu_Oct_17_18:12:35_2019-1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="266831"; mail-complaints-to="usenet@blaine.gmane.org" To: 22873@debbugs.gnu.org,17684@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 18 03:13:28 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iLGpa-0014F0-2p for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Oct 2019 03:13:27 +0200 Original-Received: from localhost ([::1]:34526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLGpY-0007lU-5X for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 21:13:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51186) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLGpH-0007lC-Fx for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 21:13:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLGpF-0004Ts-Rk for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 21:13:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40251) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLGpD-0004TM-T7 for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 21:13:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iLGpD-00086h-It for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 21:13:03 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2019 01:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.157136116331135 (code B ref 17684); Fri, 18 Oct 2019 01:13:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 18 Oct 2019 01:12:43 +0000 Original-Received: from localhost ([127.0.0.1]:49073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iLGot-000867-Hd for submit@debbugs.gnu.org; Thu, 17 Oct 2019 21:12:43 -0400 Original-Received: from gateway23.websitewelcome.com ([192.185.50.120]:28548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iLGor-00085y-5A for 17684@debbugs.gnu.org; Thu, 17 Oct 2019 21:12:41 -0400 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway23.websitewelcome.com (Postfix) with ESMTP id BACE923456 for <17684@debbugs.gnu.org>; Thu, 17 Oct 2019 20:12:40 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id LGoqiwxonPUvSLGoqiTrt1; Thu, 17 Oct 2019 20:12:40 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C44tEBrjTXon1j9gP2S4zh1i4h92r1n+3XmcjDuEiqQ=; b=Sn+trgEvY6zL5qCB1njbSu8Hkn RtIqc4z76ErCw2cdQptuyHBzYYrpOZnuu/gZZpL4LTj8fXugFM9ZIN5dIHojfce5t9wN/2wa4jMNT PKPMNbEZy/VAN4WQDr/m0YV+soCoKRz0nQCy/YMA4yUfdh2aXC6aFP3zqL4BB+lrRyxt1omHRpn3Q O2HK9CX6ZOFi1P6zMTz/WZyjZRbSs/qP+69pwqBqNjmo3r+2O01zPoPkP7tNC3xNSv46Z55RJbpFJ hxfCEQL0wFzxuDnSEQklBKMmb9fFDgG5xVWj5EIkyCnpTz1xrVTQXjBAgMkN6sG7fd40T4/o9NFPU y5n2WfIg==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49273 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iLGom-000IYQ-Hp; Thu, 17 Oct 2019 20:12:39 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1iLGom-000IYQ-Hp X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:49273 X-Source-Auth: lawlist X-Email-Count: 1 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: 209.51.188.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:169624 Archived-At: --Multipart_Thu_Oct_17_18:12:35_2019-1 Content-Type: text/plain; charset=US-ASCII VERSION: 022.004 [10/17/2019] See previous post: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22873#170 The attached patch supersedes the patch attached to the previous post. This new patch contains the modification to display_and_set_cursor, which is described in the CHANGELOG section. --Multipart_Thu_Oct_17_18:12:35_2019-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2019_10_17__18_06_25_414.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5kMDlhMTMyCi0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTI4NCBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGxpYnJhcnkgd3JpdHRlbiBieSAgTWFnbmFyIFN2ZWVuLgorCisoZGVmdmFyIHBhY2thZ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y ZWQgbGF0ZXIuIgorICAgICh1bmxlc3MgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsCisgICAgICAo c2V0cSBtYy0tbWF4LWN1cnNvcnMtb3JpZ2luYWwgbWMvbWF4LWN1cnNvcnMpKQorICAgICh3aGVu IG1jL21heC1jdXJzb3JzCisgICAgICAodW5sZXNzICg8IChtYy9udW0tY3Vyc29ycykgbWMvbWF4 LWN1cnNvcnMpCisgICAgICAgIChpZiAoeWVzLW9yLW5vLXAgKGZvcm1hdCAiJWQgYWN0aXZlIGN1 cnNvcnMuIENvbnRpbnVlPyAiIChtYy9udW0tY3Vyc29ycykpKQorICAgICAgICAgICAgKHNldHEg bWMvbWF4LWN1cnNvcnMgKHJlYWQtbnVtYmVyICJFbnRlciBhIG5ldywgdGVtcG9yYXJ5IG1heGlt dW06ICIpKQorICAgICAgICAgIChtYy9yZW1vdmUtZmFrZS1jdXJzb3JzKQorICAgICAgICAgIChl cnJvciAiQWJvcnRlZDogdG9vIG1hbnkgY3Vyc29ycyIpKSkpCisgICAgKGxldCAoKG92ZXJsYXkK KyAgICAgICAgICAgIChpZiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAo bWFrZS1vdmVybGF5IChwb2ludCkgKHBvaW50KSkKKyAgICAgICAgICAgICAgKG1jL21ha2UtY3Vy c29yLW92ZXJsYXktYXQtcG9pbnQpKSkpCisgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAnbWMt aWQgKG9yIGlkIChtYy9jcmVhdGUtY3Vyc29yLWlkKSkpCisgICAgICAob3ZlcmxheS1wdXQgb3Zl cmxheSAndHlwZSAnZmFrZS1jdXJzb3IpCisgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncHJp b3JpdHkgMTAwKQorICAgICAgKG1jL3N0b3JlLWN1cnJlbnQtc3RhdGUtaW4tb3ZlcmxheSBvdmVy bGF5KQorICAgICAgKHdoZW4gKHVzZS1yZWdpb24tcCkKKyAgICAgIC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ZXJlIHRvCisgICAgICAgICAgICAgICAgOzsgbWFrZSB0aGUgY29tbWFu ZCBjb21wYXJhYmxlIGJ5IGBlcScuCisgICAgICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29t bWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAg ICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBzeW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9y b3VnaAorICAgICAgICAgICAgICAgIChpZiAoZ2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1 cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAgICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0 ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4g KGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg KG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1j L2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMv YWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2Nt ZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMv cHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29y cyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAgICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQt aW4tY3Vyc29ycworICAgICAgICAgICAgICAgIChzZXRxIG1jLWNvbmYKKyAgICAgICAgICAgICAg ICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoeCkg KGxpc3QgKG92ZXJsYXktc3RhcnQgeCkgImJhciIgbmlsKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgKG1jL2FsbC1mYWtlLWN1cnNvcnMpKSkpKSkpKSkpCisKKyAgKGRlZnVuIG1jL21hcmst bmV4dC1saWtlLXRoaXMtY3ljbGUtZm9yd2FyZCAoKQorICAiTWFya3MgbmV4dCBvY2N1cmVuY2Ug b2Ygd29yZCBsaWtlIHRoaXMgYW5kIGFkdmFuY2VzIGN1cnNvciB0byB0aGlzIG9jY3VycmVuY2Ui CisgIChpbnRlcmFjdGl2ZSkKKyAgICAobWMvbWFyay1uZXh0LWxpa2UtdGhpcyAxKSkKKworICAo ZGVmdW4gbWMvbWFyay1wcmV2aW91cy1saWtlLXRoaXMtY3ljbGUtZm9yd2FyZCAoKQorICAiTWFy a3MgbmV4dCBvY2N1cnJlbmNlIG9mIHdvcmQgbGlrZSB0aGlzIGFuZCBhZHZhbmNlcyBjdXJzb3Ig dG8gdGhpcyBvY2N1cnJlbmNlIgorICAoaW50ZXJhY3RpdmUpCisgICAgKG1jL21hcmstcHJ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KyAg JygodCAoOmZvcmVncm91bmQgImNoYXJ0cmV1c2UiKSkpCisgICJGYWNlIGZvciBgKy1mcmluZ2Ut ZmlsbGVkLXNxdWFyZS1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLWZy aW5nZS1ob3Jpem9udGFsLWJhci1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJjaGFydHJldXNl IikpKQorICAiRmFjZSBmb3IgYCstZnJpbmdlLWhvcml6b250YWwtYmFyLWZhY2UnLiIKKyAgOmdy b3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstZnJpbmdlLWVtcHR5LWxpbmUtZmFjZQorICAnKCh0 ICg6Zm9yZWdyb3VuZCAiRGFya0dyZWVuIikpKQorICAiRmFjZSBmb3IgYCstZnJpbmdlLWVtcHR5 LWxpbmUtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1wYXJlbnMtb25l LWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgIm1hZ2VudGEiKSkpCisgICJGYWNlIGZvciBgKy1w YXJlbnMtb25lLWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcGFyZW5z LXR3by1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJyZWQiKSkpCisgICJGYWNlIGZvciBgKy1w YXJlbnMtdHdvLWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcGFyZW5z LXRocmVlLWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgInllbGxvdyIpKSkKKyAgIkZhY2UgZm9y IGArLXBhcmVucy10aHJlZS1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSAr LXBhcmVucy1mb3VyLWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgImdyZWVuIikpKQorICAiRmFj ZSBmb3IgYCstcGFyZW5zLWZvdXItZmFjZScuIgorICA6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JywgYW5kIHRoZSBjb252ZXJzaW9uIGZy b20gTFNMIGlzIGRvbmUgaW50ZXJuYWxseSBieQorbXVsdGlwbHlpbmcgZWFjaCBlbGVtZW50IG9m IHRoZSBMU0wgY29sb3IgdmVjdG9yIGJ5IDI1NS4gIGB4dGVybS5jJyB1c2VzCitgeF9tYWtlX3Ry dWVjb2xvcl9waXhlbCcsIHdoaWNoIHVzZXMgMTYtYml0IFJHQiAtLSB0aGUgY29udmVyc2lvbiBm cm9tIExTTAoraGFwcGVucyBpbnRlcm5hbGx5IGJ5IG11bHRpcGx5aW5nIGVhY2ggZWxlbWVudCBv ZiB0aGUgTFNMIGNvbG9yIHZlY3RvciBieSA2NTUzNS4iCisoaW50ZXJhY3RpdmUpCisgIChsZXQg KChidWZmZXIgKGdldC1idWZmZXItY3JlYXRlICIqTUMtVEVTVCoiKSkpCisgICAgKHdpdGgtY3Vy cmVudC1idWZmZXIgYnVmZmVyCisgICAgICAoZXJhc2UtYnVmZmVyKQorICAgICAgKGluc2VydCAi VGhpcyBpcyBhIHRlc3QhIikKKyAgICAgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2Vu dGEiKQorICAgICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAgICAgICAg ICAgICAgICAgICAgICgzICJib3giICIjMDBGRjAwIikKKyAgICAgICAgICAgICAgICAgICAgICAo NCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAz KSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg2ICgiYmFyIiAzKSBbMC4w IDEuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQi KQorICAgICAgICAgICAgICAgICAgICAgICg4ICJib3giICJncmV5MjUiKQorICAgICAgICAgICAg ICAgICAgICAgICg5ICJib3giICJncmV5NzUiKSkpKQorICAgIChzZW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5pbCkpCisgICAgKHVubGVzcyAob3IgKG1lbXEgdGhpcy1jb21tYW5k ICstcGFyZW5zLWV4Y2x1c2lvbnMpCisgICAgICAgICAgICAgICAgKGFuZCAobnVsbCArLXBhcmVu cy1wKQorICAgICAgICAgICAgICAgICAgICAgKG51bGwgKy1wYXJlbnMtb3ZlcmxheXMtZXhpc3Qt cCkpKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisg ICAgICAocHJvZ24KKyAgICAgICAgKHdoZW4gKy1wYXJlbnMtcAorICAgICAgICAgICgrLXBhcmVu cy1mbikpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGltZXIgKy1p ZGxlLXRpbWVyLXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKyhkZWZ2YXIgZmMtbW9k ZSkKKworOzs7IyMjYXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJNaW5vciBt b2RlIGZvciBkaXNwbGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZhbHVlIG5p bAorICA6bGlnaHRlciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91 cCAnKy1tb2RlCisgIChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUnIGhhcyB0 aGUgYWJpbGl0eSB0byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3IuCisgICAg ICA7OzsgU2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hlbiBmYy1t b2RlCisgICAgICAgIChmYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFsLWVsZG9j LW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAg ICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAg KGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2stY29udGV4 dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQor ICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAg ICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAgKGNhbmNl bC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEgaml0LWxv Y2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxv Y2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1l ciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQor ICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAg ICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAg ICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpKQorICAg ICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAgICAgKGxh bWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1idWZmZXJz IChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFsZ2FtYXRl ICdpZ25vcmU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1vc3QgdXNlcnMgd2lsbCBwcm9iYWJseSBu b3Qgd2FudCB0aGlzIHBhcnRpY3VsYXIgc2V0dGluZy4KKyAgICAgICh1bmxlc3MgKG51bGwgYmlk aS1kaXNwbGF5LXJlb3JkZXJpbmcpCisgICAgICAgIChzZXRxIGJpZGktZGlzcGxheS1yZW9yZGVy aW5nIG5pbCkpCisgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICcrLS1zYXZlZC1zdGF0 ZSkgbmlsKQorICAgICAgKGRvbGlzdCAodmFyICcoYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAg ICAgICAgICAgICAgICAgIGZyaW5nZS1pbmRpY2F0b3ItYWxpc3QKKyAgICAgICAgICAgICAgICAg ICAgIHRhYi13aWR0aAorICAgICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3VhbAorICAg ICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgICAgICAgICAgICAgIHRy dW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cworICAgICAgICAgICAgICAgICAgICAgd29yZC13 cmFwKSkKKyAgICAgICAgKHdoZW4gKGxvY2FsLXZhcmlhYmxlLXAgdmFyKQorICAgICAgICAgIChw dXNoIChjb25zIHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICstLXNhdmVkLXN0YXRlKSkpCisgICAg ICAoc2V0cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgIChzZXRxIGRpc3BsYXktbGluZS1udW1iZXJz IHQpCisgICAgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQor ICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAoc2V0cSBidWZmZXItZGlz cGxheS10YWJsZSArLWJ1ZmZlci1kaXNwbGF5LXRhYmxlKQorICAgICAgKHNldHEgdGFiLXdpZHRo IDQpCisgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlzdWFsKSB0 KQorICAgICAgKHNldHEgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICAo KGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisgICAgICAgICAgICAg ICAgICBtb2RlKQorICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAgICAod2hp bGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAgICAgKHdoZW4gKGRlcml2ZWQt bW9kZS1wIG1vZGUpCisgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkpKSkKKyAg ICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVuY2F0ZS1saW5lcy1tYWpvci1tb2Rlcykp CisgICAgICAgICAgICh0CisgICAgICAgICAgICAgbmlsKSkpCisgICAgICAoc2V0IChtYWtlLWxv Y2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkKKyAgICAg IChzZXRxIHdvcmQtd3JhcCB0KQorICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGluZXMgdCkK KyAgICAgIChzZXRxIGluZGljYXRlLWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAgICAgKHNl dHEgZnJpbmdlLWluZGljYXRvci1hbGlzdAorICAgICAgICAgIDs7OyBoc2NsX2FsbF90ZW1wX3Ag fCBoc2NsX3RlbXBfcAorICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1s ZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLWxlZnQpKQorICAg ICAgICAgIDs7OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxsX3Blcm1fMV9wIHwgaHNjbF9h bGxfcGVybV8yX3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNp bmdsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1hbmdsZS11 cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLXRyaXBsZS1hbmdsZS11cAorICAgICAgICAg ICAgICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgKCstb3Zl cmxheS1hcnJvdyAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAgKHRydW5jYXRpb24gLiAo Ky1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJp Z2h0LWFycm93KSkKKyAgICAgICAgICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxlZnQtY3Vy bHktYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNoKSkKKyAgICAg ICAgICAob3ZlcmxheS1hcnJvdyAuICstZnJpbmdlLXJpZ2h0LXRyaWFuZ2xlKQorICAgICAgICAg ICh1cCAuICstZnJpbmdlLXVwLWFycm93KQorICAgICAgICAgIChkb3duIC4gKy1mcmluZ2UtZG93 bi1hcnJvdykKKyAgICAgICAgICAodG9wIC4gKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpCisgICAg ICAgICAgKGJvdHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAgICAgICAo dG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAg ICAgICArLWZyaW5nZS1yaWdodC1icmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgKy1m cmluZ2UtdG9wLXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2Ut dG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgIChlbXB0eS1saW5lIC4gKy1mcmluZ2UtZW1wdHkt bGluZSkKKyAgICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmspKSkKKyAg ICAgIChzZXRxIGZyaW5nZS1jdXJzb3ItYWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVmdC10cmlh bmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaG9sbG93IC4gKy1ob2xs b3ctcmVjdGFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChiYXIgLiAr LXZlcnRpY2FsLWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGJhciAu ICstZnJpbmdlLWhvcml6b250YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChob2xsb3ctc21hbGwgLiArLWZyaW5nZS1ob2xsb3ctc3F1YXJlKSkpCisgICAgICAoaWYg KG9yICstZm9ydGh3aXRoCisgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcg Jyg0KSkpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1mb3J0 aHdpdGggJ2FwcGVuZCAnbG9jYWwpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhv b2sgJystZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICh3aGVuICstZm9y dGh3aXRoCisgICAgICAgIChhZGQtaG9vayAnd2luZG93LWNvbmZpZ3VyYXRpb24tY2hhbmdlLWhv b2sgJystZHJhdy1mb3J0aHdpdGggbmlsICdsb2NhbCkpCisgICAgICAoYWRkLWhvb2sgJ2NoYW5n ZS1tYWpvci1tb2RlLWhvb2sgJ3R1cm4tb2ZmLSstbW9kZSBuaWwgJ2xvY2FsKQorICAgICAgOzs7 IE1hdGNoaW5nIHBhcmVudGhlc2VzIGRyYXdpbmcgZm9ydGh3aXRoIGludGVyZmVyZXMgd2l0aCB5 YXNuaXBwZXQuCisgICAgICAod2hlbiArLWZvcnRod2l0aAorICAgICAgICAoc2V0cSArLXBhcmVu cy1wIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAg ICAgICAoY29uZAorICAgICAgICAgICgrLWZvcnRod2l0aAorICAgICAgICAgICAgKG1lc3NhZ2Ug IlR1cm5lZCBPTiBgKy1tb2RlJyAtLSBEcmF3IG1hdGNoaW5nIHBhcmVudGhlc2VzIGltbWVkaWF0 ZWx5LiIpKQorICAgICAgICAgICgoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpCisgICAg ICAgICAgICA7OzsgTWF0Y2hpbmcgcGFyZW50aGVzZXMgd2lsbCBiZSBkcmF3biBpbW1lZGlhdGVs eS4KKyAgICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScgLS0gT3B0aW1pemVk IGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMuIikpCisgICAgICAgICAgKHQKKyAgICAgICAgICAgICht ZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScuIikpKSkpCisgICAgKHQKKyAgICAgIChraWxsLWxv Y2FsLXZhcmlhYmxlICdmaWxsLWNvbHVtbikKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdh dXRvLWhzY3JvbGwtbW9kZSkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdoc2Nyb2xsLXN0 ZXApCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnY3Jvc3NoYWlycykKKyAgICAgIChraWxs LWxvY2FsLXZhcmlhYmxlICdmYy12aXNpYmxlKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J2Rpc3BsYXktbGluZS1udW1iZXJzKQorICAgICAgKGtpbGwtbG9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N0cmluZy4iCisgIChsZXQqICgob3BvaW50 IChwb2ludCkpCisgICAgICAgICAoZnJvbSAoaWYgKy1wYXJlbnMtZnJvbS1mbgorICAgICAgICAg ICAgICAgICAoZnVuY2FsbCArLXBhcmVucy1mcm9tLWZuKQorICAgICAgICAgICAgICAgICAocG9p bnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxlY3RlZC13aW5kb3cpKQorICAgICAgICAgKGkg MCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAocHJlY2VkaW5nLWNoYXIpKQorICAgICAgICAg KG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisgICAgICAgICAocG9zMQorICAgICAgICAgICAo Y29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFyCisgICAgICAgICAgICAgICAgICAgKG9yIDs7 OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5pbmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAg ICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAgICAgICAgICAgICAgICAgICAgIDs7OyAoY2hh ci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1YXJlIGJyYWNrZXQKKyAgICAgICAgICAgICAg ICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10 by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkgYnJhY2tldAorICAgICAgICAgICAgICAgICAg ICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAgICAgICAgICAobWluICgxKyBvcG9pbnQpIChw b2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDEpID0+ IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFy IDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2lu ZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAgICAgICAgKD0gcHJlY2VkaW5nLWNoYXIgOTMp CisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyNSkgPT4gY2xvc2luZyB3 YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCisg ICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWluKSAoMS0gb3BvaW50KSkpCisgICAgICAgICAg ICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQpKSkKKyAgICAgICAgIHBvczIKKyAgICAgICAg IHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAoY29uZGl0aW9uLWNh c2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBwb3MxIChudGggMSAocGFyc2UtcGFydGlhbC1z ZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChzZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAx KSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAgICAgICAgICAgIChzZXRxIGkgMSkKKyAgICAg ICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAgICAgICAoc2V0cSBzZWxlY3RlZC1mYWNlIChj b25kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLW9uZS1mYWNlKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMt dGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtZm91ci1mYWNlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA1KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZlLWZhY2UpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0g aSA3KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1m YWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA4KQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1laWdodC1mYWNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChsZXQgKChvdiAobWFrZS1vdmVybGF5IHBvczEg KDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRv d3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAg ICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxlY3RlZC1mYWNlKSkKKyAgICAgICAgICAod2hl biBwb3MyCisgICAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSAoMS0gcG9zMikgcG9z MikpKQorICAgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAg ICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ3dpbmRvdyB3aW4pKQorICAgICAgICAgICAg ICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpKSkKKyAgICAgICAgKGVycm9y IG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAgdCkpKQorCisoZGVm dW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQgbmFtZSB2YWwpCisiUmVtb3ZlIHRoZSBvdmVy bGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXNgLgorSW5jbHVkZXMgYSB1 bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3ZlcmxheSB3aXRoIGFuIGAnYWZ0ZXItc3RyaW5nYCBw cm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9mIGEgbmFycm93ZWQtYnVmZmVyLiIKKyAgKGxl dCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisgICAgICAgICAocG9pbnQtbWluIChwb2ludC1t aW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1ZmZlci1uYXJyb3dlZC1wKSkKKyAgICAgICAg IChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkKKyAgICAgICAgIChlbmQKKyAgICAgICAgICAg KGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5hcnJvd2Vk LXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAgIGVuZCkKKyAgICAgICAg ICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAgICAgICAg ICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICBwb2ludC1tYXgpCisgICAgICAgICAg ICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAgICAgICBl bmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBvaW50LW1heCkpCisgICAgICAgICAgICAgICBl bmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAg ICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKD0gZW5kIHBvaW50LW1heCkpCisg ICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAg ICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAg ICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAgICAgIChvdmVybGF5cworICAgICAgICAgICAo cHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1yZWNlbnRlciBlbmQpCisgICAgICAgICAgICAg KG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAgKHdoZW4gKGFuZCBiZWcgZW5kIG5hbWUgdmFs KQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICAo KGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAgICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8g bmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVpdGhlciBwdXNoIHRoaXMgb3ZlcmxheSBvdXRz aWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsgb3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcu Li5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29u dGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAgICAgICAoaWYgKDwgKG92ZXJsYXktc3RhcnQg bykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAg ICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IChjb3B5LW92 ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAg ICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkpCisgICAgICAg ICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92ZXJsYXktc3RhcnQgbykgYmVnKSkKKyAgICAg ICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBvKSBlbmQpCisgICAgICAgICAgICAgICAgICAo bW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkKKyAgICAgICAgICAgICAgICAoZGVs ZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAoKGFuZCAobm90IChlcSBuYW1lICdmYWNlKSkK KyAgICAgICAgICAgICAgICAoZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXMgKG92ZXJsYXktZ2V0 IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIChkZWxldGUtb3ZlcmxheSBvKSkpKSkpKQorCiso ZGVmdW4gKy1kZWxldGUtcGFyZW5zLW92ZXJsYXlzICgpCisgICh3aGVuICstcGFyZW5zLW92ZXJs YXlzLWV4aXN0LXAKKyAgICAoZG9saXN0IChmYWNlICcoKy1wYXJlbnMtb25lLWZhY2UKKyAgICAg ICAgICAgICAgICAgICAgKy1wYXJlbnMtdHdvLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1w YXJlbnMtdGhyZWUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1mb3VyLWZhY2UK KyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZml2ZS1mYWNlCisgICAgICAgICAgICAgICAg ICAgICstcGFyZW5zLXNpeC1mYWNlCisgIC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G8gYWxzbyBk aXNwbGF5IGEgZmlsbCBjb2x1bW4gaW5kaWNhdG9yLgorICAgIDs7OyBTZWUgdGhlIHZhcmlhYmxl IGArLWZpbGwtY29sdW1uJy4KKyAgICAoKGFuZCBmYy1tb2RlICstbW9kZSkKKyAgICAgIChzZXRx IGZjLW1vZGUgbmlsKQorICAgICAgKG1lc3NhZ2UgIlR1cm5lZCBPRkYgYGZjLW1vZGUnICglcykg LS0gc2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkK KyAgICAoZmMtbW9kZQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAgICAg ICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAg ICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVsZG9j LW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAg ICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAg ICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1l cnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1s b2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRp bWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZv bnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAg ICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAg ICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1l cnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10 aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0ICd1 bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChhZGQt dG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQtYnVm ZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkpCisg ICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1vZGUg LTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21tYW5k LWhvb2spCisgICAgICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxpbmst Y3Vyc29yLWNoZWNrKSkpCisgICAgICAoc2V0cSBmYy12aXNpYmxlIHQpCisgICAgICA7OzsgYGF1 dG8tY29tcG9zaXRpb24tbW9kZScgaXMgbmVlZGVkIGZvciBjcm9zc2hhaXJzIHRvIHByb3Blcmx5 IGNhbGN1bGF0ZQorICAgICAgOzs7IGNvb3JkaW5hdGVzIG9mIGNvbXBvc2l0aW9uIGNoYXJhY3Rl cnMuICBBdXRvbWF0aWNhbGx5IGJlY29tZXMgcGVybWFuZW50bHkKKyAgICAgIDs7OyBidWZmZXIt bG9jYWwgd2hlbiBzZXQuCisgICAgICAodW5sZXNzIGF1dG8tY29tcG9zaXRpb24tbW9kZQorICAg ICAgICAoc2V0cSBhdXRvLWNvbXBvc2l0aW9uLW1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mFjZSArLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UKKyAgJygodCAoOmZvcmVncm91 bmQgImN5YW40IikpKQorICAiRmFjZSBmb3IgYCstcmV2ZXJzZWQtYmFyLXBvc3QtenYtZmFjZScu IgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1ldmVuLXByZS16di1mYWNlCisgICco KCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAg OmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4 KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJjeWFuMSIpCisgICAgKCgo Y2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZv cmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAo YmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJjeWFuMSIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAg ICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAg KHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2ZW4tcHJlLXp2LWZhY2Un LiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstZXZlbi1pbmFjdGl2ZS1wcmUtenYt ZmFjZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFy aykpCisgICAgIDpmb3JlZ3JvdW5kICIjZWVlOGFhIikKKyAgICAoKChjbGFzcyB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W5kIGRhcmspKQorICAgICA6Zm9yZWdy b3VuZCAiRGFya09saXZlR3JlZW40IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMg MTYpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgIlJveWFsQmx1ZSIpCisg ICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hp dGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVv IHQpCisgICAgKHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2ZW4taW5h Y3RpdmUtcG9zdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLW9k ZC1wcmUtenYtZmFjZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tn cm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJyZWQxIikKKyAgICAoKChjbGFzcyBjb2xv cikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQg InJlZDEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQg ZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJyZWQxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1p bi1jb2xvcnMgMTYpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInJlZDEi KQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQg IndoaXRlIikKKyAgICAoKCh0eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12 aWRlbyB0KQorICAgICh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hfdmVydGljYWxfcnVsZXIgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2Jq ZWN0IHZhbCkKK3sKKyAgYi0+Y2hfdmVydGljYWxfcnVsZXJfID0gdmFsOworfQorCitzdGF0aWMg dm9pZAorYnNldF9jaF9pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09i amVjdCB2YWwpCit7CisgIGItPmNoX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCitzdGF0 aWMgdm9pZAorYnNldF9mY192aXNpYmxlIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2 YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNldF9m Y19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPmZjX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiBlbmQgTVVMVElQTEUt Q1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RhdGljIHZvaWQKIGJz ZXRfYWJicmV2X21vZGUgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKIHsKQEAg LTUxNDUsNiArNTIwOCwyNCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICBic2V0X2xhc3Rf c2VsZWN0ZWRfd2luZG93ICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBtYWtlX2ZpeG51bSAoMCkpOwog CiAgIGlkeCA9IDE7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKyAgWFNFV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CBRbmlsKTsKKyAgYnNldF9m Y19pbmFjdGl2ZV93aW5kb3dzICgmYnVmZmVyX2RlZmF1bHRzLCBRdCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgYnNldF9tb2RlX2xpbmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1 bHRzLCBidWlsZF9wdXJlX2Nfc3RyaW5nICgiJS0iKSk7CiAgIGJzZXRfaGVhZGVyX2xpbmVfZm9y bWF0ICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKICAgYnNldF9hYmJyZXZfbW9kZSAoJmJ1ZmZl cl9kZWZhdWx0cywgUW5pbCk7CkBAIC01NDYxLDYgKzU1NjAsNTEgQEAgZGVmdmFyX3Blcl9idWZm ZXIgKHN0cnVjdCBMaXNwX0J1ZmZlcl9PYmpmd2QgKmJvX2Z3ZCwgY29uc3QgY2hhciAqbmFtZXN0 cmluZywKIHZvaWQKIHN5bXNfb2ZfYnVmZmVyICh2b2lkKQogeworCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIERFRlNZTSAoUW1jX3JlYWxf ZmFrZV9jdXJzb3IsICJtYy1yZWFsLWZha2UtY3Vyc29yIik7CisgIERFRlZBUl9QRVJfQlVGRkVS ICgibWMtcmVhbC1mYWtlLWN1cnNvciIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfcmVhbF9m YWtlX2N1cnNvciksIFFuaWwsCisgICAgZG9jOiAvKiBBIGJ1ZmVyLWxvY2FsIHZhcmlhYmxlIHRv IHNldCB0aGUgY3Vyc29yIHR5cGUgb2YgdGhlIHJlYWwgZmFrZSBjdXJzb3IuICovKTsKKworICBE RUZTWU0gKFFtY19jb25mLCAibWMtY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EVSX0JVRkZFUiAoImZjLWluYWN0aXZlLXdpbmRvd3MiLCAmQlZBUiAoY3VycmVudF9idWZm ZXIsIGZjX2luYWN0aXZlX3dpbmRvd3MpLCBRbmlsLAorICAgIGRvYzogLyogV2hlbiBub24tbmls LCBkcmF3IG11bHRpcGxlIGN1cnNvcnMgZmlsbCBjb2x1bW4gaW4gaW5hY3RpdmUgd2luZG93cy4g Ki8pOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0YXRpY3BybyAoJmxhc3Rf b3ZlcmxheV9tb2RpZmljYXRpb25faG9va3MpOwogICBsYXN0X292ZXJsYXlfbW9kaWZpY2F0aW9u X2hvb2tzID0gbWFrZV9uaWxfdmVjdG9yICgxMCk7CiAKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIu aCBiL3NyYy9idWZmZXIuaAppbmRleCAyMDgwYTZmLi4xYWRhOTNlIDEwMDY0NAotLS0gYS9zcmMv YnVmZmVyLmgKKysrIGIvc3JjL2J1ZmZlci5oCkBAIC03NDAsNiArNzQwLDQwIEBAIHN0cnVjdCBi dWZmZXIKICAgICAgaW4gdGhlIGRpc3BsYXkgb2YgdGhpcyBidWZmZXIuICAqLwogICBMaXNwX09i amVjdCBleHRyYV9saW5lX3NwYWNpbmdfOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIFRoZSBjdXJzb3IgdHlwZSBvZiB0aGUgcmVh bCBmYWtlIGN1cnNvci4gKi8KKyAgTGlzcF9PYmplY3QgbWNfcmVhbF9mYWtlX2N1cnNvcl87CisK KyAgLyogVGhlIG5hbWUgb2YgbGlzdCB1c2VkIGJ5IG11bHRpcGxlIGN1cnNvcnMgZm9yIG5leHQg cmVkaXNwbGF5LiAqLworICBMaXNwX09iamVjdCBtY19jb25mXzsKKworICAvKiBXaGV0aGVyIHRv IGRyYXcgbXVsdGlwbGUgY3Vyc29ycyBpbiBpbmFjdGl2ZSB3aW5kb3dzLiAqLworICBMaXNwX09i amVjdCBtY19pbmFjdGl2ZV93aW5kb3dzXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUgYnVmZmVy LWxvY2FsIHZhcmlhYmxlLiAqLworICBMaXNwX09iamVjdCBjcm9zc2hhaXJzXzsKKworICAvKiBU aGUgbmFtZSBvZiB0aGUgY3Jvc3NoYWlycyBob3Jpem9udGFsIHJ1bGVyLiAqLworICBMaXNwX09i amVjdCBjaF9ob3Jpem9udGFsX3J1bGVyXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUgY3Jvc3No YWlycyB2ZXJ0aWNhbCBydWxlci4gKi8KKyAgTGlzcF9PYmplY3QgY2hfdmVydGljYWxfcnVsZXJf OworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBjcm9zc2hhaXJzIGluIGluYWN0aXZlIHdpbmRvd3Mu ICovCisgIExpc3BfT2JqZWN0IGNoX2luYWN0aXZlX3dpbmRvd3NfOworCisgIC8qIFRoZSBuYW1l IG9mIHRoZSBidWZmZXItbG9jYWwgdmFyaWFibGUuICovCisgIExpc3BfT2JqZWN0IGZjX3Zpc2li bGVfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGZpbGwgY29sdW1u IGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IGZjX2luYWN0aXZlX3dpbmRv d3NfOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEN1cnNvciB0eXBlIHRv IGRpc3BsYXkgaW4gbm9uLXNlbGVjdGVkIHdpbmRvd3MuCiAgICAgIHQgbWVhbnMgdG8gdXNlIGhv bGxvdyBib3ggY3Vyc29yLgogICAgICBTZWUgYGN1cnNvci10eXBlJyBmb3Igb3RoZXIgdmFsdWVz LiAgKi8KQEAgLTc5MSwxNCArODI1LDIxIEBAIHN0cnVjdCBidWZmZXIKICAgICAgYW4gaW5kaXJl Y3QgYnVmZmVyIHNpbmNlIGl0IGNvdW50cyBhcyBpdHMgYmFzZSBidWZmZXIuICAqLwogICBpbnQg d2luZG93X2NvdW50OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCiAgIC8qIEEgbm9uLXplcm8gdmFsdWUgaW4gc2xvdCBJRFggbWVhbnMgdGhh dCBwZXItYnVmZmVyIHZhcmlhYmxlCiAgICAgIHdpdGggaW5kZXggSURYIGhhcyBhIGxvY2FsIHZh bHVlIGluIHRoaXMgYnVmZmVyLiAgVGhlIGluZGV4IElEWAogICAgICBmb3IgYSBidWZmZXItbG9j YWwgdmFyaWFibGUgaXMgc3RvcmVkIGluIHRoYXQgdmFyaWFibGUncyBzbG90CiAgICAgIGluIGJ1 ZmZlcl9sb2NhbF9mbGFncyBhcyBhIExpc3AgaW50ZWdlci4gIElmIHRoZSBpbmRleCBpcyAtMSwK ICAgICAgdGhpcyBtZWFucyB0aGUgdmFyaWFibGUgaXMgYWx3YXlzIGxvY2FsIGluIGFsbCBidWZm ZXJzLiAgKi8KLSNkZWZpbmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA1MAorI2RlZmluZSBNQVhfUEVS X0JVRkZFUl9WQVJTIDYwCiAgIGNoYXIgbG9jYWxfZmxhZ3NbTUFYX1BFUl9CVUZGRVJfVkFSU107 CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogU2V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RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCiti c2V0X2Jsdl9jcm9zc2hhaXJzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPmNyb3NzaGFpcnNfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfY2hf aG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQorewor ICBiLT5jaF9ob3Jpem9udGFsX3J1bGVyXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRf Ymx2X2NoX3ZlcnRpY2FsX3J1bGVyIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwp Cit7CisgIGItPmNoX3ZlcnRpY2FsX3J1bGVyXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2Jz ZXRfYmx2X2NoX2luYWN0aXZlX3dpbmRvd3MgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0 IHZhbCkKK3sKKyAgYi0+Y2hfaW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2 b2lkCitic2V0X2Jsdl9mY192aXNpYmxlIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2 YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9i bHZfZmNfaW5hY3RpdmVfd2luZG93cyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFs KQoreworICBiLT5mY19pbmFjdGl2ZV93aW5kb3dzXyA9IHZhbDsKK30KKworLyogZW5kIE1VTFRJ UExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIElOTElORSB2b2lk CiBic2V0X2JpZGlfcGFyYWdyYXBoX2RpcmVjdGlvbiAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9P YmplY3QgdmFsKQogewpkaWZmIC0tZ2l0IGEvc3JjL2Rpc3BleHRlcm4uaCBiL3NyYy9kaXNwZXh0 ZXJuLmgKaW5kZXggNGU5NDdkYS4uODZhZGVhMyAxMDA2NDQKLS0tIGEvc3JjL2Rpc3BleHRlcm4u aAorKysgYi9zcmMvZGlzcGV4dGVybi5oCkBAIC0xNDUsNiArMTQ1LDEzMSBAQCB0eXBlZGVmIHZv aWQgKkVtYWNzX0N1cnNvcjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2VuZGlmCiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICov CisKK2V4dGVybiBib29sIG1jX3N0ZGVycl9wIEVYVEVSTkFMTFlfVklTSUJMRTsKKworc3RydWN0 IGdseXBoOworCitzdHJ1Y3QgZ2x5cGhfcm93OworCitzdHJ1Y3QgZ2x5cGhfbWF0cml4OworCitl bnVtIGRyYXdfZ2x5cGhzX2ZhY2U7CisKK2VudW0gZ2x5cGhfcm93X2FyZWE7CisKK3N0cnVjdCBt Y19tYXRyaXg7CisKK2VudW0gbWNfY2FjaGVfdHlwZTsKKworZW51bSBtY19jdXJzb3JfdHlwZTsK KworZW51bSBtY19mbGF2b3I7CisKK3N0cnVjdCBtY19SR0I7CisKK3N0cnVjdCBtY19lc3NlbnRp YWxzOworCitlbnVtIG1jX2RyYXdfcm93X3R5cGU7CisKK2VudW0gbWNfZW5naW5lX3R5cGU7CisK K2VudW0gbWNfcm93X3Bvc2l0aW9uOworCitlbnVtIG1jX3JlZHJhd19yb3dfdHlwZTsKKworZW51 bSBkcmF3X2dseXBoX2FjdGlvbjsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2xpc3RuIChwdHJk aWZmX3QsIExpc3BfT2JqZWN0LCAuLi4pOworCitleHRlcm4gTGlzcF9PYmplY3QgbWNfbnRoIChp bnQsIExpc3BfT2JqZWN0KTsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2Fzc3EgKExpc3BfT2Jq ZWN0LCBMaXNwX09iamVjdCk7CisKK2V4dGVybiBlbnVtIG1jX3Jvd19wb3NpdGlvbiBtY19yb3df cG9zaXRpb24gKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqLCBp bnQpOworCitleHRlcm4gcHRyZGlmZl90IG1jX3JlZ2lvbl9saW1pdCAoYm9vbCk7CisKK2V4dGVy biBzdHJ1Y3QgZ2x5cGggKiBtY19nZXRfY3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICosIHN0 cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICosIGludCwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNf eHdfY29sb3JfdmFsdWVzIChzdHJ1Y3Qgd2luZG93ICosIExpc3BfT2JqZWN0LCBzdHJ1Y3QgbWNf UkdCICopOworCitleHRlcm4gYm9vbCBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHN0cnVjdCB3 aW5kb3cgKiwgYm9vbCk7CisKK2V4dGVybiBjaGFyICogbWNfd2luZG93IChzdHJ1Y3Qgd2luZG93 ICopOworCitleHRlcm4gY2hhciAqIG1jX2NoYXJfdG9fc3RyaW5nIChpbnQpOworCitleHRlcm4g Y2hhciAqIG1jX2N1cnNvcl90eXBlX3RvX3N0cmluZyAoZW51bSBtY19jdXJzb3JfdHlwZSk7CisK K2V4dGVybiBjaGFyICogbWNfZmxhdm9yX3RvX3N0cmluZyAoZW51bSBtY19mbGF2b3IpOworCitl eHRlcm4gY2hhciAqIG1jX2NhY2hlX3R5cGVfdG9fc3RyaW5nIChlbnVtIG1jX2NhY2hlX3R5cGUp OworCitleHRlcm4gY2hhciAqIG1jX3JlZHJhd19yb3dfdHlwZV90b19zdHJpbmcgKGVudW0gbWNf cmVkcmF3X3Jvd190eXBlKTsKKworZXh0ZXJuIHZvaWQgbWNfY2FjaGVfaW5zcGVjdG9yIChzdHJ1 Y3Qgd2luZG93ICosIHN0cnVjdCBtY19tYXRyaXgpOworCitleHRlcm4gYm9vbCBtY190cmF2ZXJz ZV9jYWNoZV9wIChzdHJ1Y3QgbWNfbWF0cml4LCBlbnVtIG1jX2NhY2hlX3R5cGUsIGludCwgaW50 KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICos IHN0cnVjdCBnbHlwaF9yb3cgKiwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBlbnVtIG1jX2N1cnNvcl90eXBlKTsKKworZXh0ZXJuIGludCBtY19nZXRfZnJpbmdlX2Jp dG1hcCAoc3RydWN0IHdpbmRvdyAqLCBMaXNwX09iamVjdCwgaW50LCBpbnQpOworCitleHRlcm4g dm9pZCBtY19lbmdpbmUgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBz dHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAq LCBpbnQsIGludCwgaW50LCBpbnQsIGludCwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICBl bnVtIG1jX2N1cnNvcl90eXBlLCBpbnQsIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IG1jX2Vzc2VudGlhbHMsIGVudW0gbWNfcm93X3Bvc2l0aW9u LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2VuZ2luZV90 eXBlLCBib29sLCBlbnVtIG1jX2RyYXdfcm93X3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAg IGVudW0gbWNfY2FjaGVfdHlwZSk7CisKK2V4dGVybiB2b2lkIG1jX3NldF9lc3NlbnRpYWxzIChz dHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBtY19lc3NlbnRpYWxzICopOworCitleHRlcm4gdm9pZCBt Y19kcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVj dCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKiwg aW50LCBpbnQsIGludCwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAg ICAgICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3NpdGlvbiwgYm9vbCwK KyAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5cGUpOworCitleHRl cm4gYm9vbCBtY19yZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRy aXggKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBnbHlwaF9yb3dfYXJlYSwgaW50LCBpbnQsIGludCwgYm9vbCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSwgZW51bSBtY19yZWRyYXdfcm93X3R5cGUp OworCitleHRlcm4gdm9pZCBtY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRvdyAqKTsKKworZXh0 ZXJuIHZvaWQgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGds eXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBn bHlwaF9yb3cgKiwgZW51bSBkcmF3X2dseXBoc19mYWNlLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGludCwgaW50LCBpbnQsIHN0cnVjdCBtY19SR0IsIGVudW0gbWNfZmxhdm9y LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUs IGludCwgYm9vbCwgYm9vbCk7CisKK2V4dGVybiB2b2lkIG1jX2VyYXNlX2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50LCBlbnVtIG1jX2Zs YXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSwg aW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHN0cnVjdCB3aW5kb3cg Kiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50LCBpbnQsIGludCwgaW50 LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3Jf dHlwZSwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGJvb2wsIGVudW0gbWNfZmxhdm9yLCBib29sKTsKKworZXh0ZXJuIGludCBtY19kcmF3X2ds eXBocyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlw aF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgZW51bSBnbHlwaF9yb3df YXJlYSwgcHRyZGlmZl90LCBwdHJkaWZmX3QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBl bnVtIGRyYXdfZ2x5cGhzX2ZhY2UsIGludCwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgZW51bSBtY19mbGF2b3IsIGVudW0gbWNfY3Vyc29yX3R5cGUsIGlu dCwgYm9vbCwgYm9vbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlw aF9hY3Rpb24sIGJvb2wpOworCitleHRlcm4gc3RydWN0IGdseXBoX21hdHJpeCAqIG1jX3NhdmVf Z2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCitleHRlcm4gdm9pZCBtY19y ZXN0b3JlX2dseXBoX21hdHJpeCAoc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICopOworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogLyogVGV4dCBjdXJzb3IgdHlwZXMuICAqLwogCiBlbnVtIHRleHRfY3Vy c29yX2tpbmRzCkBAIC00MDQsNiArNTI5LDE4IEBAIHN0cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1 Y3QgZ2x5cGgKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICBpbnQgcmVsYXRpdmVfeCwgaHBvczsKKworICBwdHJkaWZmX3QgYnl0ZXBv czsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBQb3NpdGlvbiBmcm9tIHdo aWNoIHRoaXMgZ2x5cGggd2FzIGRyYXduLiAgSWYgYG9iamVjdCcgYmVsb3cgaXMgYQogICAgICBM aXNwIHN0cmluZywgdGhpcyBpcyBhbiBpbmRleCBpbnRvIHRoYXQgc3RyaW5nLiAgSWYgaXQgaXMg YQogICAgICBidWZmZXIsIHRoaXMgaXMgYSBwb3NpdGlvbiBpbiB0aGF0IGJ1ZmZlci4gIEluIGFk ZGl0aW9uLCBzb21lCkBAIC0xMjcwLDYgKzE0MDcsMjggQEAgZW51bSBkcmF3X2dseXBoc19mYWNl CiAKIHN0cnVjdCBnbHlwaF9zdHJpbmcKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIGJvb2xfYmYgbGVmdF9vdmVyd3JpdHRlbl9w IDogMTsKKworICAgIGJvb2xfYmYgcmlnaHRfb3ZlcndyaXR0ZW5fcCA6IDE7CisKKyAgICBib29s X2JmIHJlY3RhbmdsZV9udWtlZF9wIDogMTsKKworICAgIGJvb2xfYmYgYmFja2dyb3VuZF9udWtl ZF9wIDogMTsKKworICAgIGVudW0gZHJhd19nbHlwaF9hY3Rpb24KKyAgICB7CisgICAgICBNQ19E UkFXX0dMWVBIX1NUUklORywKKyAgICAgIE1DX0VSQVNFX0dMWVBIX1NUUklORworICAgIH0gYWN0 aW9uX3R5cGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogWC1vcmlnaW4g b2YgdGhlIHN0cmluZy4gICovCiAgIGludCB4OwogCkBAI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cmF3X2dseXBoX3N0cmluZycgfCBgbWNfdzMyX2RyYXdfZ2x5cGhfc3RyaW5nJyB8 IGBtY194X2RyYXdfZ2x5cGhfc3RyaW5nJyAqLworICB2b2lkICgqbWNfc2NyaWJlX3N0cmluZykg KHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3Ry dWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19m bGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90 eXBlLCBpbnQgd2QsIGJvb2wgYWN0aXZlX3AsIGJvb2wgY3Vyc29yX2djX3ApOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEhhbmRsZXJzIGZvciBzZXR0aW5nIGZyYW1lIHBh cmFtZXRlcnMuICAqLwogICBmcmFtZV9wYXJtX2hhbmRsZXIgKmZyYW1lX3Bhcm1faGFuZGxlcnM7 CiAKZGlmZiAtLWdpdCBhL3NyYy9kaXNwbmV3LmMgYi9zcmMvZGlzcG5ldy5jCmluZGV4IDAxMzFi NjMuLjhhY2M4MWMgMTAwNjQ0Ci0tLSBhL3NyYy9kaXNwbmV3LmMKKysrIGIvc3JjL2Rpc3BuZXcu YwpAQCAtNTYsNiArNTYsMTc4MiBAQCBhbG9uZyB3aXRoIEdOVSBFbWFjcy4gIElmIG5vdCwgc2Vl IDxodHRwczovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uICAqLwogI2luY2x1ZGUgInczMi5oIgog I2VuZGlmCiAMCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdp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tPmhhc2ggPSBmcm9tLT5oYXNoOwor ICAgICAgdG8tPnggPSBmcm9tLT54OworICAgICAgdG8tPnkgPSBmcm9tLT55OworICAgICAgdG8t PnBpeGVsX3dpZHRoID0gZnJvbS0+cGl4ZWxfd2lkdGg7CisgICAgICB0by0+YXNjZW50ID0gZnJv bS0+YXNjZW50OworICAgICAgdG8tPmhlaWdodCA9IGZyb20tPmhlaWdodDsKKyAgICAgIHRvLT5w aHlzX2FzY2VudCA9IGZyb20tPnBoeXNfYXNjZW50OworICAgICAgdG8tPnBoeXNfaGVpZ2h0ID0g ZnJvbS0+cGh5c19oZWlnaHQ7CisgICAgICB0by0+dmlzaWJsZV9oZWlnaHQgPSBmcm9tLT52aXNp YmxlX2hlaWdodDsKKyAgICAgIHRvLT5leHRyYV9saW5lX3NwYWNpbmcgPSBmcm9tLT5leHRyYV9s aW5lX3NwYWNpbmc7CisgICAgICB0by0+c3RhcnQgPSBmcm9tLT5zdGFydDsKKyAgICAgIHRvLT5l bmQgPSBmcm9tLT5lbmQ7CisgICAgICB0by0+bWlucG9zID0gZnJvbS0+bWlucG9zOworICAgICAg dG8tPm1heHBvcyA9IGZyb20tPm1heHBvczsKKyAgICAgIHRvLT5vdmVybGF5X2Fycm93X2JpdG1h cCA9IGZyb20tPm92ZXJsYXlfYXJyb3dfYml0bWFwOworICAgICAgdG8tPmxlZnRfdXNlcl9mcmlu Z2VfYml0bWFwID0gZnJvbS0+bGVmdF91c2VyX2ZyaW5nZV9iaXRtYXA7CisgICAgICB0by0+cmln aHRfdXNlcl9mcmluZ2VfYml0bWFwID0gZnJvbS0+cmlnaHRfdXNlcl9mcmluZ2VfYml0bWFwOwor ICAgICAgdG8tPmxlZnRfZnJpbmdlX2JpdG1hcCA9IGZyb20tPmxlZnRfZnJpbmdlX2JpdG1hcDsK KyAgICAgIHRvLT5yaWdodF9mcmluZ2VfYml0bWFwID0gZnJvbS0+cmlnaHRfZnJpbmdlX2JpdG1h cDsKKyAgICAgIHRvLT5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cnQuICovCisgIGZvciAoaSA9IGhlYWRlcl9saW5lX3A7IGkgPCBjdXJyZW50 X21hdHJpeC0+bnJvd3MgLSAxOyArK2kpCisgICAgeworICAgICAgc3RydWN0IGdseXBoX3JvdyAq ZCA9IE1BVFJJWF9ST1cgKGRlc2lyZWRfbWF0cml4LCBpKTsKKyAgICAgIHN0cnVjdCBnbHlwaF9y b3cgKmMgPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaSk7CisgICAgICBpZiAoYy0+ZW5h YmxlZF9wCisgICAgICAgICAgJiYgZC0+ZW5hYmxlZF9wCisgICAgICAgICAgJiYgIWQtPnJlZHJh d19mcmluZ2VfYml0bWFwc19wCisgICAgICAgICAgJiYgYy0+eSA9PSBkLT55CisgICAgICAgICAg JiYgTUFUUklYX1JPV19CT1RUT01fWSAoYykgPD0geWIKKyAgICAgICAgICAmJiBNQVRSSVhfUk9X X0JPVFRPTV9ZIChkKSA8PSB5YgorICAgICAgICAgICYmIHJvd19lcXVhbF9wIChjLCBkLCAxKSkK KyAgICAgICAgeworICAgICAgICAgIGFzc2lnbl9yb3cgKGMsIGQpOworICAgICAgICAgIGQtPmVu YWJsZWRfcCA9IGZhbHNlOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBicmVh azsKKyAgICB9CisjaWZkZWYgSEFWRV9YV0lER0VUUworICAvKiBDdXJyZW50bHkgdGhpcyBzZWVt cyBuZWVkZWQgdG8gZGV0ZWN0IHh3aWRnZXQgbW92ZW1lbnQgcmVsaWFibHkuICovCisgICAgcmV0 dXJuIDA7CisjZW5kaWYKKyAgLyogR2l2ZSB1cCBpZiBzb21lIHJvd3MgaW4gdGhlIGRlc2lyZWQg bWF0cml4IGFyZSBub3QgZW5hYmxlZC4gKi8KKyAgaWYgKCEgTUFUUklYX1JPV19FTkFCTEVEX1Ag KGRlc2lyZWRfbWF0cml4LCBpKSkKKyAgICByZXR1cm4gLTE7CisgIGZpcnN0X29sZCA9IGZpcnN0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Pm5yb3dzIC0gMSkKKyAgICB7CisgICAg ICBpbnQgYm90dG9tID0gTUFUUklYX1JPV19CT1RUT01fWSAoTUFUUklYX1JPVyAoY3VycmVudF9t YXRyaXgsIGkpKTsKKyAgICAgIGlmIChib3R0b20gPD0geWIpCisgICAgICAgICsraTsKKyAgICAg IGlmIChib3R0b20gPj0geWIpCisgICAgICAgIGJyZWFrOworICAgIH0KKyAgbGFzdF9vbGQgPSBp OworICAvKiBTa2lwIG92ZXIgcm93cyBlcXVhbCBhdCB0aGUgYm90dG9tLiAqLworICBpID0gbGFz dF9uZXc7CisgIGogPSBsYXN0X29sZDsKKyAgd2hpbGUgKGkgLSAxID4gZmlyc3RfbmV3CisgICAg ICAgICAmJiBqIC0gMSA+IGZpcnN0X29sZAorICAgICAgICAgJiYgTUFUUklYX1JPV19FTkFCTEVE X1AgKGN1cnJlbnRfbWF0cml4LCBqIC0gMSkKKyAgICAgICAgICYmIChNQVRSSVhfUk9XIChjdXJy ZW50X21hdHJpeCwgaiAtIDEpLT55CisgICAgICAgICAgICAgPT0gTUFUUklYX1JPVyAoZGVzaXJl ZF9tYXRyaXgsIGkgLSAxKS0+eSkKKyAgICAgICAgICYmICFNQVRSSVhfUk9XIChkZXNpcmVkX21h dHJpeCwgaSAtIDEpLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcAorICAgICAgICAgJiYgcm93X2Vx dWFsX3AgKE1BVFJJWF9ST1cgKGRlc2lyZWRfbWF0cml4LCBpIC0gMSksCisgICAgICAgICAgICAg ICAgICAgICAgICAgTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGogLSAxKSwgMSkpCisgICAg LS1pLCAtLWo7CisgIGxhc3RfbmV3ID0gaTsKKyAgbGFzdF9vbGQgPSBqOworICAvKiBOb3RoaW5n IHRvIGRvIGlmIGFsbCByb3dzIGFyZSBlcXVhbC4gKi8KKyAgaWYgKGxhc3RfbmV3ID09IGZpcnN0 X25ldykKKyAgICByZXR1cm4gMDsKKyA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CisgICAgaWYgKGN1 cnJlbnRfbnJvd3NfbWF4IDwgY3VycmVudF9tYXRyaXgtPm5yb3dzKQorICAgICAgbWVtb3J5X2Z1 bGwgKFNJWkVfTUFYKTsKKyAgfQorICAvKiBSZWFsbG9jYXRlIHZlY3RvcnMsIHRhYmxlcyBldGMu IGlmIG5lY2Vzc2FyeS4gKi8KKyAgaWYgKGN1cnJlbnRfbWF0cml4LT5ucm93cyA+IG1jX29sZF9s aW5lc19zaXplKQorICAgIG1jX29sZF9saW5lcyA9IHhwYWxsb2MgKG1jX29sZF9saW5lcywgJm1j X29sZF9saW5lc19zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfbWF0cml4 LT5ucm93cyAtIG1jX29sZF9saW5lc19zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgIElO VF9NQVgsIHNpemVvZiAqbWNfb2xkX2xpbmVzKTsKKyAgaWYgKGRlc2lyZWRfbWF0cml4LT5ucm93 cyA+IG1jX25ld19saW5lc19zaXplKQorICAgIG1jX25ld19saW5lcyA9IHhwYWxsb2MgKG1jX25l d19saW5lcywgJm1jX25ld19saW5lc19zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgIGRl c2lyZWRfbWF0cml4LT5ucm93cyAtIG1jX25ld19saW5lc19zaXplLAorICAgICAgICAgICAgICAg ICAgICAgICAgIElOVF9NQVgsIHNpemVvZiAqbWNfbmV3X2xpbmVzKTsKKyAgbiA9IGRlc2lyZWRf bWF0cml4LT5ucm93czsKKyAgbiArPSBjdXJyZW50X21hdHJpeC0+bnJvd3M7CisgIGlmIChtY19y b3dfdGFibGVfc2l6ZSA8IDMgKiBuKQorICAgIHsKKyAgICAgIHB0cmRpZmZfdCBzaXplID0gbmV4 dF9hbG1vc3RfcHJpbWUgKDMgKiBuKTsKKyAgICAgIG1jX3Jvd190YWJsZSA9IHhucmVhbGxvYyAo bWNfcm93X3RhYmxlLCBzaXplLCBzaXplb2YgKm1jX3Jvd190YWJsZSk7C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KQorICAgIHsKKyAgICAgIGlmIChNQVRSSVhfUk9XX0VOQUJMRURf UCAoY3VycmVudF9tYXRyaXgsIGkpKQorICAgICAgICB7CisgICAgICAgICAgZW50cnkgPSBtY19h ZGRfcm93X2VudHJ5IChNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaSkpOworICAgICAgICAg IG1jX29sZF9saW5lc1tpXSA9IGVudHJ5OworICAgICAgICAgICsrZW50cnktPm9sZF91c2VzOwor ICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIG1jX29sZF9saW5lc1tpXSA9IE5VTEw7Cisg ICAgfQorICBmb3IgKGkgPSBmaXJzdF9uZXc7IGkgPCBsYXN0X25ldzsgKytpKQorICAgIHsKKyAg ICAgIGVhc3NlcnQgKE1BVFJJWF9ST1dfRU5BQkxFRF9QIChkZXNpcmVkX21hdHJpeCwgaSkpOwor ICAgICAgZW50cnkgPSBtY19hZGRfcm93X2VudHJ5IChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJp eCwgaSkpOworICAgICAgKytlbnRyeS0+bmV3X3VzZXM7CisgICAgICBlbnRyeS0+bmV3X2xpbmVf bnVtYmVyID0gaTsKKyAgICAgIG1jX25ld19saW5lc1tpXSA9IGVudHJ5OworICAgIH0KKyAgLyog SWRlbnRpZnkgbW92ZXMgYmFzZWQgb24gbGluZXMgdGhhdCBhcmUgdW5pcXVlIGFuZCBlcXVhbAor ICAgICBpbiBib3RoIG1hdHJpY2VzLiAqLworICBmb3IgKGkgPSBmaXJzdF9vbGQ7IGkgPCBsYXN0 X29sZDspCisgICAgaWYgKG1jX29sZF9saW5lc1tpXQorICAgICAgICAmJiBtY19vbGRfbGluZXNb aV0tPm9sZF91c2VzID09IDEKKyAgICAgICAgJiYgbWNfb2xkX2xpbmVzW2ldLT5uZXdfdXNlcyA9 PSAxKQorICAgICAgeworICAgICAgICBpbnQgcCwgcTsKKyAgICAgICAgaW50IG5ld19saW5lID0g bWNfb2xkX2xpbmVzW2ldLT5uZXdfbGluZV9udW1iZXI7CisgICAgICAgIHN0cnVjdCBydW4gKnJ1 biA9IG1jX3J1bl9wb29sICsgcnVuX2lkeCsrOworICAgICAgICAvKiBSZWNvcmQgbW92ZS4gKi8K KyAgICAgICAgcnVuLT5jdXJyZW50X3Zwb3MgPSBpOworICAgICAgICBydW4tPmN1cnJlbnRfeSA9 IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBpKS0+eTsKKyAgICAgICAgcnVuLT5kZXNpcmVk X3Zwb3MgPSBuZXdfbGluZTsKKyAgICAgICAgcnVuLT5kZXNpcmVkX3kgPSBNQVRSSVhfUk9XIChk ZXNpcmVkX21hdHJpeCwgbmV3X2xpbmUpLT55OworICAgICAgICBydW4tPm5yb3dzID0gMTsKKyAg ICAgICAgcnVuLT5oZWlnaHQgPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaSktPmhlaWdo dDsKKyAgICAgICAgLyogRXh0ZW5kIGJhY2t3YXJkLiAqLworICAgICAgICBwID0gaSAtIDE7Cisg ICAgICAgIHEgPSBuZXdfbGluZSAtIDE7CisgICAgICAgIHdoaWxlIChwID4gZmlyc3Rfb2xkCisg ICAgICAgICAgICAgICAmJiBxID4gZmlyc3RfbmV3CisgICAgICAgICAgICAgICAmJiBtY19vbGRf bGluZXNbcF0gPT0gbWNfbmV3X2xpbmVzW3FdKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGlu dCBoID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIHApLT5oZWlnaHQ7CisgICAgICAgICAg ICAtLXJ1bi0+Y3VycmVudF92cG9zOworICAgICAgICAgICAgLS1ydW4tPmRlc2lyZWRfdnBvczsK KyAgICAgICAgICAgICsrcnVuLT5ucm93czsKKyAgICAgICAgICAgIHJ1bi0+aGVpZ2h0ICs9IGg7 CisgICAgICAgICAgICBydW4tPmRlc2lyZWRfeSAtPSBoOworICAgICAgICAgICAgcnVuLT5jdXJy ZW50X3kgLT0gaDsKKyAgICAgICAgICAgIC0tcCwgLS1xOworICAgICAgICAgIH0KKyAgICAgICAg LyogRXh0ZW5kIGZvcndhcmQuICovCisgICAgICAgIHAgPSBpICsgMTsKKyAgICAgICAgcSA9IG5l d19saW5lICsgMTsKKyAgICAgICAgd2hpbGUgKHAgPCBsYXN0X29sZAorICAgICAgICAgICAgICAg JiYgcSA8IGxhc3RfbmV3CisgICAgICAgICAgICAgICAmJiBtY19vbGRfbGluZXNbcF0gPT0gbWNf bmV3X2xpbmVzW3FdKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGludCBoID0gTUFUUklYX1JP VyAoY3VycmVudF9tYXRyaXgsIHApLT5oZWlnaHQ7CisgICAgICAgICAgICArK3J1bi0+bnJvd3M7 CisgICAgICAgICAgICBydW4tPmhlaWdodCArPSBoOworICAgICAgICAgICAgKytwLCArK3E7Cisg ICAgICAgICAgfQorICAgICAgICAvKiBJbnNlcnQgcnVuIGludG8gbGlzdCBvZiBhbGwgcnVucy4g IE9yZGVyIHJ1bnMgYnkgY29waWVkCisgICAgICAgICAgIHBpeGVsIGxpbmVzLiAgTm90ZSB0aGF0 IHdlIHJlY29yZCBydW5zIHRoYXQgZG9uJ3QgaGF2ZSB0bworICAgICAgICAgICBiZSBjb3BpZWQg YmVjYXVzZSB0aGV5IGFyZSBhbHJlYWR5IGluIHBsYWNlLiAgVGhpcyBpcyBkb25lCisgICAgICAg ICAgIGJlY2F1c2Ugd2UgY2FuIGF2b2lkIGNhbGxpbmcgdXBkYXRlX3dpbmRvd19saW5lIGluIHRo aXMKKyAgICAgICAgICAgY2FzZS4gKi8KKyAgICAgICAgZm9yIChwID0gMDsgcCA8IG5ydW5zICYm IG1jX3J1bnNbcF0tPmhlaWdodCA+IHJ1bi0+aGVpZ2h0OyArK3ApCisgICAgICAgICAgOworICAg ICAgICBmb3IgKHEgPSBucnVuczsgcSA+IHA7IC0tcSkKKyAgICAgICAgICBtY19ydW5zW3FdID0g bWNfcnVuc1txIC0gMV07CisgICAgICAgIG1jX3J1bnNbcF0gPSBydW47CisgICAgICAgICsrbnJ1 bnM7CisgICAgICAgIGkgKz0gcnVuLT5ucm93czsKKyAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAg ICAgKytpOworICAvKiBEbyB0aGUgbW92ZXMuICBEbyBpdCBpbiBhIHdheSB0aGF0IHdlIGRvbid0 IG92ZXJ3cml0ZSBzb21ldGhpbmcKKyAgICAgd2Ugd2FudCB0byBjb3B5IGxhdGVyIG9uLiAgVGhp cyBpcyBub3Qgc29sdmFibGUgaW4gZ2VuZXJhbAorICAgICBiZWNhdXNlIHRoZXJlIGlzIG9ubHkg b25lIGRpc3BsYXkgYW5kIHdlIGRvbid0IGhhdmUgYSB3YXkgdG8KKyAgICAgZXhjaGFuZ2UgYXJl YXMgb24gdGhpcyBkaXNwbGF5LiAgRXhhbXBsZToKKyAgICAgICAgICArLS0tLS0tLS0tLS0rICAg ICAgICstLS0tLS0tLS0tLSsKKyAgICAgICAgICB8ICAgICBBICAgICB8ICAgICAgIHwgICAgIEIg ICAgIHwKKyAgICAgICAgICArLS0tLS0tLS0tLS0rICAtLT4gICstLS0tLS0tLS0tLSsKKyAgICAg ICAgICB8ICAgICBCICAgICB8ICAgICAgIHwgICAgIEEgICAgIHwKKyAgICAgICAgICArLS0tLS0t LS0tLS0rICAgICAgICstLS0tLS0tLS0tLSsKKyAgICAgSW5zdGVhZCwgcHJlZmVyIGJpZ2dlciBt b3ZlcywgYW5kIGludmFsaWRhdGUgbW92ZXMgdGhhdCB3b3VsZAorICAgICBjb3B5IGZyb20gd2hl cmUgd2UgY29waWVkIHRvLiAqLworICBmb3IgKGkgPSAwOyBpIDwgbnJ1bnM7ICsraSkKKyAgICBp ZiAobWNfcnVuc1tpXS0+bnJvd3MgPiAwKQorICAgICAgeworICAgICAgICBzdHJ1Y3QgcnVuICpy ID0gbWNfcnVuc1tpXTsKKyAgICAgICAgaWYgKHItPmN1cnJlbnRfeSAhPSByLT5kZXNpcmVkX3kp CisgICAgICAgICAgeworICAgICAgICAgICAgLy8gIGZwcmludGYgKHN0ZGVyciwgIiVzOiAgci0+ Y3VycmVudC9kZXNpcmVkX3Zwb3MgKCVkLyVkKSB8IHItPmN1cnJlbnQvZGVzaXJlZF95ICglZC8l ZClcbiIsCisgICAgICAgICAgICAvLyAgICAgICAgICAgci0+Y3VycmVudF95IDwgci0+ZGVzaXJl ZF95ID8gIuKGkyIgOiAi4oaRIiwKKyAgICAgICAgICAgIC8vICAgICAgICAgICByLT5jdXJyZW50 X3Zwb3MsIHItPmRlc2lyZWRfdnBvcywgci0+Y3VycmVudF95LCByLT5kZXNpcmVkX3kpOworICAg ICAgICAgICAgLy8gIHJpZi0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2UgKHcpOworICAgICAgICAg ICAgLy8gIHJpZi0+c2Nyb2xsX3J1bl9ob29rICh3LCByKTsKKyAgICAgICAgICB9CisgICAgICAg IC8qIFRydW5jYXRlIHJ1bnMgdGhhdCBjb3B5IHRvIHdoZXJlIHdlIGNvcGllZCB0bywgYW5kCisg ICAgICAgICAgIGludmFsaWRhdGUgcnVucyB0aGF0IGNvcHkgZnJvbSB3aGVyZSB3ZSBjb3BpZWQg dG8uICovCisgICAgICAgIGZvciAoaiA9IG5ydW5zIC0gMTsgaiA+IGk7IC0taikKKyAgICAgICAg ICB7CisgICAgICAgICAgICBzdHJ1Y3QgcnVuICpwID0gbWNfcnVuc1tqXTsKKyAgICAgICAgICAg IGJvb2wgdHJ1bmNhdGVkX3AgPSAwOworICAgICAgICAgICAgaWYgKHAtPm5yb3dzID4gMAorICAg ICAgICAgICAgICAgICYmIHAtPmRlc2lyZWRfeSA8IHItPmRlc2lyZWRfeSArIHItPmhlaWdodAor ICAgICAgICAgICAgICAgICYmIHAtPmRlc2lyZWRfeSArIHAtPmhlaWdodCA+IHItPmRlc2lyZWRf eSkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmIChwLT5kZXNpcmVkX3kgPCBy LT5kZXNpcmVkX3kpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIHAt Pm5yb3dzID0gci0+ZGVzaXJlZF92cG9zIC0gcC0+ZGVzaXJlZF92cG9zOworICAgICAgICAgICAg ICAgICAgICBwLT5oZWlnaHQgPSByLT5kZXNpcmVkX3kgLSBwLT5kZXNpcmVkX3k7CisgICAgICAg ICAgICAgICAgICAgIHRydW5jYXRlZF9wID0gMTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg IGludCBucm93c19jb3BpZWQgPSAoci0+ZGVzaXJlZF92cG9zICsgci0+bnJvd3MKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHAtPmRlc2lyZWRfdnBvcyk7CisgICAg ICAgICAgICAgICAgICAgIGlmIChwLT5ucm93cyA8PSBucm93c19jb3BpZWQpCisgICAgICAgICAg ICAgICAgICAgICAgcC0+bnJvd3MgPSAwOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhl aWdodF9jb3BpZWQgPSAoci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcC0+ZGVzaXJlZF95KTsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgcC0+Y3VycmVudF92cG9zICs9IG5yb3dzX2NvcGllZDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgcC0+ZGVzaXJlZF92cG9zICs9IG5yb3dzX2NvcGllZDsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgcC0+bnJvd3MgLT0gbnJvd3NfY29waWVkOworICAgICAg ICAgICAgICAgICAgICAgICAgICBwLT5jdXJyZW50X3kgKz0gaGVpZ2h0X2NvcGllZDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgcC0+ZGVzaXJlZF95ICs9IGhlaWdodF9jb3BpZWQ7CisgICAg ICAgICAgICAgICAgICAgICAgICAgIHAtPmhlaWdodCAtPSBoZWlnaHRfY29waWVkOworICAgICAg ICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZWRfcCA9IDE7CisgICAgICAgICAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGlmIChyLT5jdXJyZW50X3kgIT0gci0+ZGVzaXJlZF95CisgICAgICAgICAgICAgICAgLyogVGhl IGNvbmRpdGlvbiBiZWxvdyBpcyBlcXVpdmFsZW50IHRvCisgICAgICAgICAgICAgICAgICAgKChw LT5jdXJyZW50X3kgPj0gci0+ZGVzaXJlZF95CisgICAgICAgICAgICAgICAgICAgICAmJiBwLT5j dXJyZW50X3kgPCByLT5kZXNpcmVkX3kgKyByLT5oZWlnaHQpCisgICAgICAgICAgICAgICAgICAg IHx8IChwLT5jdXJyZW50X3kgKyBwLT5oZWlnaHQgPiByLT5kZXNpcmVkX3kKKyAgICAgICAgICAg ICAgICAgICAgICAgICYmIChwLT5jdXJyZW50X3kgKyBwLT5oZWlnaHQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICA8PSByLT5kZXNpcmVkX3kgKyByLT5oZWlnaHQpKSkKKyAgICAgICAgICAg ICAgICAgICBiZWNhdXNlIHdlIGhhdmUgMCA8IHAtPmhlaWdodCA8PSByLT5oZWlnaHQuICovCisg ICAgICAgICAgICAgICAgJiYgcC0+Y3VycmVudF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0 CisgICAgICAgICAgICAgICAgJiYgcC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJl ZF95KQorICAgICAgICAgICAgICBwLT5ucm93cyA9IDA7CisgICAgICAgICAgICAvKiBSZW9yZGVy IHJ1bnMgYnkgY29waWVkIHBpeGVsIGxpbmVzIGlmIHRydW5jYXRlZC4gKi8KKyAgICAgICAgICAg IGlmICh0cnVuY2F0ZWRfcCAmJiBwLT5ucm93cyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICBpbnQgayA9IG5ydW5zIC0gMTsKKyAgICAgICAgICAgICAgICB3aGlsZSAobWNf cnVuc1trXS0+bnJvd3MgPT0gMCB8fCBtY19ydW5zW2tdLT5oZWlnaHQgPCBwLT5oZWlnaHQpCisg ICAgICAgICAgICAgICAgICBrLS07CisgICAgICAgICAgICAgICAgbWVtbW92ZSAobWNfcnVucyAr IGosIG1jX3J1bnMgKyBqICsgMSwgKGsgLSBqKSAqIHNpemVvZiAoKm1jX3J1bnMpKTsKKyAgICAg ICAgICAgICAgICBtY19ydW5zW2tdID0gcDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0K KyAgICAgICAgLyogQXNzaWduIG1hdHJpeCByb3dzLiAqLworICAgICAgICBmb3IgKGogPSAwOyBq IDwgci0+bnJvd3M7ICsraikKKyAgICAgICAgICB7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhf cm93ICpmcm9tLCAqdG87CisgICAgICAgICAgICBib29sIHRvX292ZXJsYXBwZWRfcDsKKyAgICAg ICAgICAgIHRvID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIHItPmRlc2lyZWRfdnBvcyAr IGopOworICAgICAgICAgICAgZnJvbSA9IE1BVFJJWF9ST1cgKGRlc2lyZWRfbWF0cml4LCByLT5k ZXNpcmVkX3Zwb3MgKyBqKTsKKyAgICAgICAgICAgIHRvX292ZXJsYXBwZWRfcCA9IHRvLT5vdmVy bGFwcGVkX3A7CisgICAgICAgICAgICBmcm9tLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcCA9IGZy b20tPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcDsKKyAgICAgICAgICAgIGFzc2lnbl9yb3cgKHRv LCBmcm9tKTsKKy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v dyAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogLTE7CisgIGlu dCBwcmV2X21hdHJpeF9yb3dfZW5kX2J5dGVwb3MgPSAodnBvcyAhPSAwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9XX0VORF9CWVRFUE9TIChjdXJyZW50 X3JvdyAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0xOworICBp bnQgbWF0cml4X3Jvd19zdGFydF9ieXRlcG9zID0gTUFUUklYX1JPV19TVEFSVF9CWVRFUE9TIChk ZXNpcmVkX3Jvdyk7CisgIGludCBtYXRyaXhfcm93X2VuZF9ieXRlcG9zID0gTUFUUklYX1JPV19F TkRfQllURVBPUyAoZGVzaXJlZF9yb3cpOworICAvKiBUaGUgZmlyc3QgY29uZGl0aW9uIHRlc3Rz IGZvciBhIHNvbGl0YXJ5IHJvdyBjb250YWluaW5nIFpWLCBwcmVjZWRlZCBieSBhCisgIHJvdyBj b250YWluaW5nIGEgcGVudWx0aW1hdGUgZ2x5cGggd2l0aCBhIGNoYXJwb3Mgb2YgWlYgLSAxIGZv bGxvd2VkIGJ5IGFuIGVuZAorICBvZiByb3cgc3BhY2UgZ2x5cGggd2l0aCBhIGNoYXJwb3Mgb2Yg MC4gIFRoZSBvdGhlciBjb25kaXRpb25zIHRlc3QgZm9yIGFuIGVtcHR5CisgIGJ1ZmZlciAobm90 IG5hcnJvd2VkKSwgb3IgYW4gZW1wdHkgbmFycm93ZWQgYnVmZmVyLiAqLworICBib29sIHJvd19h dF96dl9wID0gKCh2cG9zICE9IDAKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgKGN1cnJlbnRf cm93IC0gMSktPnVzZWRbVEVYVF9BUkVBXSA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgJiYg cHJldl9tYXRyaXhfcm93X3N0YXJ0X2J5dGVwb3MgIT0gcHJldl9tYXRyaXhfcm93X2VuZF9ieXRl cG9zCisgICAgICAgICAgICAgICAgICAgICAgICYmICEoY3VycmVudF9yb3cgLSAxKS0+ZW5kc19h dF96dl9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIG1hdHJpeF9yb3dfc3RhcnRfYnl0ZXBv cyA9PSBtYXRyaXhfcm93X2VuZF9ieXRlcG9zCisgICAgICAgICAgICAgICAgICAgICAgICYmIGRl c2lyZWRfcm93LT5lbmRzX2F0X3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgfHwgKCgoaGVh ZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID09IDEpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICB8fCAoaGVhZGVyX2xpbmVfZm9ybWF0ID09IDAgJiYgdnBvcyA9PSAwKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgYnVmZmVyX25hcnJvd2VkX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgYm9iX3Jlc3BlY3RfbmFycm93ID09IGVvYl9yZXNwZWN0X25hcnJvdykKKyAg ICAgICAgICAgICAgICAgICAgICB8fCAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3Mg PT0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChoZWFkZXJfbGluZV9mb3JtYXQg PT0gMCAmJiB2cG9zID09IDApKQorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBib2JfZGlz cmVnYXJkX25hcnJvdyA9PSBlb2JfZGlzcmVnYXJkX25hcnJvdykpOworICAvKiBJZiBsaW5lLW51 bWJlcnMgYXJlIGFjdGl2ZSwgdGhlbiBzcGFjZSBnbHlwaCBwYWRkaW5nIGVxdWFsIHRvIGl0cyB3 aWR0aAorICBjb3VudGVkIGluIEhQT1MgYXJlIGZvbGxvd2VkIGJ5IGEgc2luZ2xlIHJvdyBlbmQg c3BhY2UgZ2x5cGguICBMaW5lIG51bWJlcgorICBwYWRkaW5nIHNwYWNlIGdseXBocyBoYXZlIGEg Y2hhcnBvcyBvZiAtMSwgd2hlcmVhcyB0aGUgZW5kIG9mIHJvdyBzcGFjZSBnbHlwaAorICBoYXMg YSBjaGFycG9zIG9mIDAuICBJZiBsaW5lIG51bWJlcnMgYXJlIGluYWN0aXZlLCB0aGVuIHRoZSBy b3cgd2lsbCBjb250YWluCisgIGEgc29saXRhcnkgc3BhY2UgZ2x5cGggd2l0aCBhIGNoYXJwb3Mg b2YgLTEuICovCisgIGJvb2wgcm93X2JleW9uZF96dl9wID0gKG1hdHJpeF9yb3dfc3RhcnRfYnl0 ZXBvcyA9PSBtYXRyaXhfcm93X2VuZF9ieXRlcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAg ICYmICFyb3dfYXRfenZfcCk7CisgIHJldHVybiAocm93X2F0X3p2X3ApCisgICAgICAgICAgID8g QVRfWlYKKyAgICAgICAgIDogKHJvd19iZXlvbmRfenZfcCkKKyAgICAgICAgICAgPyBQT1NUX1pW CisgICAgICAgICA6IFBSRV9aVjsKK30KKworLyogVXBkYXRlIHRoZSBkaXNwbGF5IG9mIHRoZSB0 ZXh0IGFyZWEgb2Ygcm93IFZQT1MgaW4gd2luZG93IFcuCisgICBWYWx1ZSBpcyB0cnVlIGlmIGRp c3BsYXkgaGFzIGNoYW5nZWQuICovCitzdGF0aWMgYm9vbAorbWNfdXBkYXRlX3RleHRfYXJlYSAo c3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqdXBkYXRlZF9yb3csIGludCB2cG9z LAorICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX21hdHJpeCAqY3Vyc29yX21hdHJp eCwKKyAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzIGVzc2VudGlhbHMs IGJvb2wgZHJhd19wKQoreworICBib29sIGRlYnVnX3AgPSBmYWxzZTsKKyAgc3RydWN0IGdseXBo X3JvdyAqY3VycmVudF9yb3cgPSBNQVRSSVhfUk9XICh3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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZGVzaXJlZF9yb3cKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiBjdXJyZW50X3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZGVzaXJlZF9yb3csIHZwb3MpOworICAvKiBJZiByb3dzIGFyZSBhdCBk aWZmZXJlbnQgWCBvciBZLCBvciByb3dzIGhhdmUgZGlmZmVyZW50IGhlaWdodCwKKyAgICAgb3Ig dGhlIGN1cnJlbnQgcm93IGlzIG1hcmtlZCBpbnZhbGlkLCB3cml0ZSB0aGUgZW50aXJlIGxpbmUu ICovCisgIGlmICghY3VycmVudF9yb3ctPmVuYWJsZWRfcAorICAgICAgfHwgZGVzaXJlZF9yb3ct PnkgIT0gY3VycmVudF9yb3ctPnkKKyAgICAgIHx8IGRlc2lyZWRfcm93LT5hc2NlbnQgIT0gY3Vy cmVudF9yb3ctPmFzY2VudAorICAgICAgfHwgZGVzaXJlZF9yb3ctPnBoeXNfYXNjZW50ICE9IGN1 cnJlbnRfcm93LT5waHlzX2FzY2VudAorICAgICAgfHwgZGVzaXJlZF9yb3ctPnBoeXNfaGVpZ2h0 ICE9IGN1cnJlbnRfcm93LT5waHlzX2hlaWdodAorICAgICAgfHwgZGVzaXJlZF9yb3ctPnZpc2li bGVfaGVpZ2h0ICE9IGN1cnJlbnRfcm93LT52aXNpYmxlX2hlaWdodAorICAgICAgfHwgY3VycmVu dF9yb3ctPm92ZXJsYXBwZWRfcAorICAgICAgLyogVGhpcyBuZXh0IGxpbmUgaXMgbmVjZXNzYXJ5 IGZvciBjb3JyZWN0bHkgcmVkcmF3aW5nCisgICAgICAgICBtb3VzZS1mYWNlIGFyZWFzIGFmdGVy IHNjcm9sbGluZyBhbmQgb3RoZXIgb3BlcmF0aW9ucy4KKyAgICAgICAgIEhvd2V2ZXI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VJFQV0pCisgICAgICAgIHsKKyAgICAgICAgICBibG9ja19pbnB1 dCAoKTsKKyAgICAgICAgICBpbnQgbGVuID0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXTsK KyAgICAgICAgICBpbnQgaHBvcyA9IGRlc2lyZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSAtIHVw ZGF0ZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29y LnggPQorICAgICAgICAgICAgbWNfZHJhd19nbHlwaHMgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRh dGVkX3Jvdywgdy0+b3V0cHV0X2N1cnNvci54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg IFRFWFRfQVJFQSwgaHBvcywgaHBvcyArIGxlbiwgRFJBV19OT1JNQUxfVEVYVCwgMCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5 cGUsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZlX3As IGN1cnNvcl9nY19wLCBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBkcmF3X3ApOworICAgICAgICAgIHctPm91dHB1dF9jdXJzb3IuaHBvcyArPSBsZW47 CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgfQorICAgICAgLyogQ2xlYXIg dG8gZW5kIG9mIHdpbmRvdy4gKi8KKyAgICAgIGlmIChkcmF3X3ApCisgICAgICAgIHJpZi0+Y2xl YXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRfcm93LCBURVhUX0FSRUEsIC0xKTsKKyAgICAgIGNo YW5nZWRfcCA9IDE7CisgICAgICAvKiBUaGlzIGVyYXNlcyB0aGUgY3Vyc29yLiAgV2UgZG8gdGhp cyBoZXJlI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tZGVzaXJlZF9zdG9wX3BvczsKKyAgICAgICAgc3RvcCA9IG1pbiAoY3VycmVudF9yb3ct PnVzZWRbVEVYVF9BUkVBXSwgZGVzaXJlZF9zdG9wX3Bvcyk7CisgICAgICAgIGkgPSAwOworICAg ICAgICB4ID0gZGVzaXJlZF9yb3ctPng7CisgICAgICAgIGludCBjbGVhcl90b194ID0gMDsKKwor ICAgICAgICAvKiBMb29wIG92ZXIgZ2x5cGhzIHRoYXQgY3VycmVudCBhbmQgZGVzaXJlZCByb3cg bWF5IGhhdmUgaW4gY29tbW9uLiAqLworICAgICAgICB3aGlsZSAoaSA8IHN0b3ApCisgICAgICAg ICAgeworICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZCA9IDA7CisgICAgICAg ICAgICBib29sIGNhbl9za2lwX3AgPSAhYWJvcnRfc2tpcHBpbmc7CisgICAgICAgICAgICAvKiBT a2lwIG92ZXIgZ2x5cGhzIHRoYXQgYm90aCByb3dzIGhhdmUgaW4gY29tbW9uLiAgVGhlc2UgZG9u J3QgaGF2ZQorICAgICAgICAgICAgdG8gYmUgd3JpdHRlbi4gIFdlIGNhbid0IHNraXAgaWYgdGhl IGxhc3QgY3VycmVudCBnbHlwaCBvdmVybGFwcyB0aGUKKyAgICAgICAgICAgIGdseXBoIHRvIGl0 cyByaWdodC4gIEZvciBleGFtcGxlLCBjb25zaWRlciBhIGN1cnJlbnQgcm93IG9mIGBpZicgd2l0 aAorICAgICAgICAgICAgdGhlIGBmJyBpbiBDb3VyaWVyIGJvbGQgc28gdGhhdCBpdCBvdmVybGFw cyB0aGUgYCAnIHRvIGl0cyByaWdodC4KKyAgICAgICAgICAgIElmIHRoZSBkZXNpcmVkIHJvdyBp cyBgICcsIHdlIHdvdWxkIHNraXAgb3ZlciB0aGUgc3BhY2UgYWZ0ZXIgdGhlCisgICAgICAgICAg ICBgaWYnIGFuZCB0aGVyZSB3b3VsZCByZW1haW4gYSBwaXhlbCBmcm9tIHRoZSBgZicgb24gdGhl IHNjcmVlbi4gKi8KKyAgICAgICAgICAgIGlmIChvdmVybGFwcGluZ19nbHlwaHNfcCAmJiBpID4g MCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGgg PSAmY3VycmVudF9yb3ctPmdseXBoc1tURVhUX0FSRUFdW2kgLSAxXTsKKyAgICAgICAgICAgICAg ICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAgICAgICAgICAgcmlmLT5nZXRfZ2x5cGhfb3Zlcmhh bmdzIChnbHlwaCwgWEZSQU1FICh3LT5mcmFtZSksICZsZWZ0LCAmcmlnaHQpOworICAgICAgICAg ICAgICAgIGNhbl9za2lwX3AgPSAocmlnaHQgPT0gMCAmJiAhYWJvcnRfc2tpcHBpbmcpOworICAg ICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoY2FuX3NraXBfcCkKKyAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgIGludCBzdGFydF9ocG9zID0gaTsKKyAgICAgICAgICAgICAgICB3 aGlsZSAoaSA8IHN0b3AKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgR0xZUEhfRVFVQUxfUCAo ZGVzaXJlZF9nbHlwaCwgY3VycmVudF9nbHlwaCkpCisgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgICsrYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZDsKKyAgICAgICAgICAg ICAgICAgICAgaWYgKGFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCA8IGFycmF5X2dseXBo c19za2lwcGVkLnVzZWQpCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICAgICAgaW50IG9sZF9hbGxvYyA9IGFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZDsK KyAgICAgICAgICAgICAgICAgICAgICAgIGludCBuZXdfZWx0cyA9IGFycmF5X2dseXBoc19za2lw cGVkLnVzZWQgLSBhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxvY2F0ZWQ7CisgICAgICAgICAgICAg ICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkID0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgeHBhbGxvYyAoYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmFycmF5X2dseXBoc19za2lwcGVkLmFsbG9j YXRlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2VsdHMsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElOVF9NQVgsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHNpemVvZiAqYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCk7 CisgICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQgKGFycmF5X2dseXBoc19za2lwcGVkLnNr aXBwZWQgKyBvbGRfYWxsb2MsIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo YXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkIC0gb2xkX2FsbG9jKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAqIHNpemVvZiAqYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tp cHBlZCk7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpbnQg bnRoID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZCAtIDE7CisgICAgICAgICAgICAgICAgICAg IGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbbnRoXS54ID0geDsKKyAgICAgICAgICAgICAg ICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmhwb3MgPSBpOworICAgICAg ICAgICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkW250aF0uZW5hYmxlZF9w ID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgICAgeCArPSBkZXNpcmVkX2dseXBoLT5waXhlbF93 aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgKytkZXNpcmVkX2dseXBoLCArK2N1cnJlbnRfZ2x5 cGgsICsraTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAvKiBDb25zaWRl ciB0aGUgY2FzZSB0aGF0IHRoZSBjdXJyZW50IHJvdyBjb250YWlucyAieHh4IHBwcCBnZ2ciIGlu CisgICAgICAgICAgICAgICAgaXRhbGljIENvdXJpZXIgZm9udCwgYW5kIHRoZSBkZXNpcmVkIHJv dyBpcyAieHh4IGdnZyIuICBUaGUgY2hhcmFjdGVyIGBwJworICAgICAgICAgICAgICAgIGhhcyBs YmVhcmluZywgYGcnIGhhcyBub3QuICBUaGUgbG9vcCBhYm92ZSB3aWxsIHN0b3AgaW4gZnJvbnQg b2YgdGhlCisgICAgICAgICAgICAgICAgZmlyc3QgYHAnIGluIHRoZSBjdXJyZW50IHJvdy4gIElm IHdlIHdvdWxkIHN0YXJ0IHdyaXRpbmcgZ2x5cGhzIHRoZXJlLCB3ZQorICAgICAgICAgICAgICAg IHdvdWxkbid0IGVyYXNlIHRoZSBsYmVhcmluZyBvZiB0aGUgYHAnLiAgVGhlIHJlc3Qgb2YgdGhl IGxiZWFyaW5nIHByb2JsZW0KKyAgICAgICAgICAgICAgICBpcyB0aGVuIHRha2VuIGNhcmUgb2Yg YnkgZHJhd19nbHlwaHMuICovCisgICAgICAgICAgICAgICAgaWYgKG92ZXJsYXBwaW5nX2dseXBo c19wCisgICAgICAgICAgICAgICAgICAgICYmIGkgPiAwCisgICAgICAgICAgICAgICAgICAgICYm IGkgPCBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICYm IChjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdICE9IGRlc2lyZWRfcm93LT51c2VkW1RFWFRf QVJFQV0pKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgbGVm dCwgcmlnaHQ7CisgICAgICAgICAgICAgICAgICAgIHJpZi0+Z2V0X2dseXBoX292ZXJoYW5ncyAo Y3VycmVudF9nbHlwaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBYRlJBTUUgKHctPmZy YW1lKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmbGVmdCwgJnJpZ2h0KTsKKyAgICAg ICAgICAgICAgICAgICAgd2hpbGUgKGxlZnQgPiAwICYmIGkgPiAwKQorICAgICAgICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIC0taSwgLS1kZXNpcmVkX2dseXBoLCAt LWN1cnJlbnRfZ2x5cGg7CisgICAgICAgICAgICAgICAgICAgICAgICB4IC09IGRlc2lyZWRfZ2x5 cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAgICAgbGVmdCAtPSBkZXNpcmVk X2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgICAgIC8qIEFib3J0IHRoZSBza2lwcGluZyBhbGdvcml0aG0gaWYgd2UgZW5kIHVwIGJl Zm9yZQorICAgICAgICAgICAgICAgICAgICAgICBvdXIgc3RhcnRpbmcgcG9pbnQsIHRvIGF2b2lk IGxvb3BpbmcgKGJ1ZyMxMDcwKS4KKyAgICAgICAgICAgICAgICAgICAgICAgVGhpcyBjYW4gaGFw cGVuIHdoZW4gdGhlIGxiZWFyaW5nIGlzIGxhcmdlciB0aGFuCisgICAgICAgICAgICAgICAgICAg ICAgIHRoZSBwaXhlbCB3aWR0aC4gKi8KKyAgICAgICAgICAgICAgICAgICAgYWJvcnRfc2tpcHBp bmcgPSAoaSA8IHN0YXJ0X2hwb3MpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAvKiBUcnkgdG8gYXZvaWQgd3JpdGluZyB0aGUgZW50aXJlIHJlc3Qg b2YgdGhlIGRlc2lyZWQgcm93CisgICAgICAgICAgICAgICBieSBsb29raW5nIGZvciBhIHJlc3lu YyBwb2ludC4gIFRoaXMgbWFpbmx5IHByZXZlbnRzCisgICAgICAgICAgICAgICBtb2RlIGxpbmUg ZmxpY2tlcmluZyBpbiB0aGUgY2FzZSB0aGUgbW9kZSBsaW5lIGlzIGluCisgICAgICAgICAgICAg ICBmaXhlZC1waXRjaCBmb250LCB3aGljaCBpdCB1c3VhbGx5IHdpbGwgYmUuICovCisgICAgICAg ICAgICBpZiAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICBpbnQgc3RhcnRfeCA9IHgsIHN0YXJ0X2hwb3MgPSBpOworICAg ICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqc3RhcnQgPSBkZXNpcmVkX2dseXBoOworICAgICAg ICAgICAgICAgIGludCBjdXJyZW50X3ggPSB4OworICAgICAgICAgICAgICAgIGJvb2wgc2tpcF9m aXJzdF9wID0gIWNhbl9za2lwX3A7CisgICAgICAgICAgICAgICAgLyogRmluZCB0aGUgbmV4dCBn bHlwaCB0aGF0J3MgZXF1YWwgYWdhaW4uICovCisgICAgICAgICAgICAgICAgd2hpbGUgKGkgPCBz dG9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIChza2lwX2ZpcnN0X3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgIHx8ICFHTFlQSF9FUVVBTF9QIChkZXNpcmVkX2dseXBoLCBjdXJyZW50 X2dseXBoKSkKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgeCA9PSBjdXJyZW50X3gpCisgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIHggKz0gZGVzaXJlZF9nbHlwaC0+ cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfeCArPSBjdXJyZW50X2ds eXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgKytkZXNpcmVkX2dseXBoLCAr K2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAgICAgICAgICAgICAgICAgc2tpcF9maXJzdF9wID0g MDsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBmb3IgKGludCBlbHQgPSAw OworICAgICAgICAgICAgICAgICAgICAgZWx0IDwgYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZDsK KyAgICAgICAgICAgICAgICAgICAgICsrZWx0KQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBpbnQgeCA9IGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbZWx0XS54 OworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IGFycmF5X2dseXBoc19za2lwcGVkLnNr aXBwZWRbZWx0XS5ocG9zOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnRhcmdl dF9nbHlwaCA9CisgICAgICAgICAgICAgICAgICAgICAgbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywg ZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBocG9zLCB2cG9zKTsKKyAgICAgICAgICAgICAg ICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJy LCAiU0tJUFBFRDogIHZwb3MgKCVkKSB8IGNoYXIgKCVkLyVzKSB8IHg6ICglZCkgfCBocG9zICgl ZC8lZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCB0 YXJnZXRfZ2x5cGgtPnUuY2gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtY19jaGFyX3RvX3N0cmluZyAodGFyZ2V0X2dseXBoLT51LmNoKSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHgsIGhwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRf QVJFQV0gLSAxKTsKKyAgICAgICAgICAgICAgICAgICAgbWNfZHJhd19yb3cgKHcsIGRlc2lyZWRf bWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCB4LCAxLCB2cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bv c2l0aW9uLCBkcmF3X3AsIFNLSVBQRUQpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgIGlmIChpID09IHN0YXJ0X2hwb3MgfHwgeCAhPSBjdXJyZW50X3gpCisgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGkgPSBzdGFydF9ocG9zOworICAgICAgICAg ICAgICAgICAgICB4ID0gc3RhcnRfeDsKKyAgICAgICAgICAgICAgICAgICAgZGVzaXJlZF9nbHlw aCA9IHN0YXJ0OworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9zLCBzdGFydF9ocG9z LCBkZXNpcmVkX3Jvdy0+eSwgc3RhcnRfeCk7CisgICAgICAgICAgICAgICAgLyogUmUtZHJhdyBh IHBvcnRpb24gb2YgdGhlIHJvdy4gKi8KKyAgICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAg ICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlJFRFJBVyBTRUdNRU5UOlxuXAorICAg ICAgICAgICAgICAgICAgICB2cG9zICglZCkgfCBjaGFyICglZC8lcykgfCB4OiAoJWQpIHwgaHBv cyAoJWQvJWQpIHwgbGVuZ3RoICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgIHZwb3MsIHN0 YXJ0LT51LmNoLCBtY19jaGFyX3RvX3N0cmluZyAoc3RhcnQtPnUuY2gpLAorICAgICAgICAgICAg ICAgICAgICBzdGFydF94LCBzdGFydF9ocG9zLCB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFd IC0gMSwgaSAtIHN0YXJ0X2hwb3MpOworICAgICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgpOwor ICAgICAgICAgICAgICAgIGludCBsZW4gPSBpIC0gc3RhcnRfaHBvczsKKyAgICAgICAgICAgICAg ICBpbnQgaHBvcyA9IHN0YXJ0IC0gdXBkYXRlZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAg ICAgICAgICAgICAgIHctPm91dHB1dF9jdXJzb3IueCA9CisgICAgICAgICAgICAgICAgICBtY19k cmF3X2dseXBocyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB3LT5vdXRwdXRfY3Vy c29yLngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVEVYVF9BUkVBLCBocG9z LCBocG9zICsgbGVuLCBEUkFXX05PUk1BTF9URVhULAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDAsIHZwb3MsIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgY3Vy c29yX2djX3AsIE1DX0RSQVdfR0xZUEhfU1RSSU5HLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGRyYXdfcCk7CisgICAgICAgICAgICAgICAgdy0+b3V0cHV0X2N1cnNvci5ocG9z ICs9IGxlbjsKKyAgICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAg ICAgIG1jX2RyYXdfcm93ICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHN0YXJ0LCBz dGFydF94LCBpIC0gc3RhcnRfaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBv cywgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFNDUklC RV9UV08pOworICAgICAgICAgICAgICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAgICAgICAgIH0K KyAgICAgICAgICB9CisKKyAgICAgICAgLyogV3JpdGUgdGhlIHJlc3QuICovCisgICAgICAgIGlm IChpIDwgZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9zLCBpLCBkZXNpcmVkX3Jvdy0+eSwgeCk7Cisg ICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAi RFJBVyBSRU1BSU5ERVIgT0YgVEhFIFJPVzpcblwKKyAgICAgICAgICAgICAgICB2cG9zICglZCkg fCBjaGFyICglZC8lcykgfCB4OiAoJWQpIHwgaHBvcyAoJWQvJWQpIHwgbGVuZ3RoICglZClcbiIs CisgICAgICAgICAgICAgICAgdnBvcywgZGVzaXJlZF9nbHlwaC0+dS5jaCwgbWNfY2hhcl90b19z dHJpbmcgKGRlc2lyZWRfZ2x5cGgtPnUuY2gpLAorICAgICAgICAgICAgICAgIHgsIGksIGRlc2ly ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxLCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFd IC0gaSk7CisgICAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgIGludCBsZW4g PSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gaTsKKyAgICAgICAgICAgIGludCBocG9z ID0gZGVzaXJlZF9nbHlwaCAtIHVwZGF0ZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAg ICAgICAgIHctPm91dHB1dF9jdXJzb3IueCA9CisgICAgICAgICAgICAgIG1jX2RyYXdfZ2x5cGhz ICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHctPm91dHB1dF9jdXJzb3IueCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRFWFRfQVJFQSwgaHBvcywgaHBvcyArIGxlbiwg RFJBV19OT1JNQUxfVEVYVCwgMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZwb3Ms IGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCwgTUNfRFJBV19HTFlQ SF9TVFJJTkcsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3X3ApOworICAgICAg ICAgICAgdy0+b3V0cHV0X2N1cnNvci5ocG9zICs9IGxlbjsKKyAgICAgICAgICAgIHVuYmxvY2tf aW5wdXQgKCk7CisgICAgICAgICAgICAvKiBGSVhNRTogIEFsdGhvdWdoIHdlIG5lZWQgdG8gdXBk YXRlIHRoZSBjYWNoZSBiZXR3ZWVuIHRoZSBlbmQgb2YKKyAgICAgICAgICAgIHVwZGF0ZWRfcm93 IGFuZCB0aGUgcmlnaHQgd2luZG93IGVkZ2UsIGl0IGlzIG5vdCBuZWNlc3NhcnkgdG8gZHJhdwor ICAgICAgICAgICAgdGhvc2UgZmFrZSBjdXJzb3JzLiBBbHRob3VnaCB3ZSBtYXkgbm90IGJlIGFi bGUgdG8gc2VlIGl0IHdpdGggdGhlCisgICAgICAgICAgICBuYWtlZCBleWUsIHRob3NlIGZha2Ug Y3Vyc29ycyBhcmUgYmVpbmcgc3VwZXJpbXBvc2VkIG9uIHRoZSBleGlzdGluZworICAgICAgICAg ICAgZmFrZSBjdXJzb3JzIHRoYXQgZG8gbm90IGdldCBlcmFzZW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mlnaHQgZWRnZSBvZiB0aGUgd2luZG93IHdpbGwgX25vdF8gYmUgY2xlYXJl ZC4gIFRoZXJlZm9yZSwgaXQgaXMgb2theSB0bworICAgICAgICAgIGRyYXcgdGhlIGZsb2F0aW5n IGdseXBocyBmb3IgdGhlIGhvcml6b250YWwvdmVydGljYWwgcnVsZXJzIGhlcmUuICovCisgICAg ICAgICAgZWxzZSBpZiAoY2hhbmdlZF9wCisgICAgICAgICAgICAgICAgICAgJiYgdy0+b3V0cHV0 X2N1cnNvci5ocG9zICE9IHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIGludCB4ID0gdy0+b3V0cHV0X2N1cnNvci54OworICAgICAgICAg ICAgICBpbnQgaHBvcyA9IHctPm91dHB1dF9jdXJzb3IuaHBvczsKKyAgICAgICAgICAgICAgc3Ry dWN0IGdseXBoICpzdGFydCA9IG1jX2dldF9jdXJzb3JfZ2x5cGggKHcsIGRlc2lyZWRfbWF0cml4 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdXBkYXRlZF9yb3csIGhwb3MsIHZwb3MpOworICAgICAgICAgICAgICBpZiAody0+b3V0cHV0 X2N1cnNvci54ID09IHVwZGF0ZWRfcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICB4 IC09IHN0YXJ0LT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAg ICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiUE9TVC1DSEFOR0VEOiAgdnBvcyAoJWQpIHwg eCAoJWQpIHwgaHBvcyAoJWQvJWQpIHwgY2hhciAoJWQvJXMpXG4iLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgdnBvcywgeCwgaHBvcywgdXBkYXRlZF9yb3ctPnVzZWRbVEVYVF9B UkVBXSAtIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydC0+dS5jaCwg bWNfY2hhcl90b19zdHJpbmcgKHN0YXJ0LT51LmNoKSk7CisgICAgICAgICAgICAgIG1jX2RyYXdf cm93ICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHN0YXJ0LCB4LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgdXBkYXRlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAtIGhwb3MsIHZw b3MsIGN1cnNvcl9tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxz LCByb3dfcG9zaXRpb24sIGRyYXdfcCwgUE9TVF9DSEFOR0VEKTsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIC8qIFRoZXJlIHdlcmUgbm8gY2hhbmdlcyBhbmQgaSA9PSBkZXNpcmVkX3Jvdy0+ dXNlZFtURVhUX0FSRUFdICovCisgICAgICAgICAgICBlbHNlIGlmICghY2hhbmdlZF9wKQorICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAg ICAgICBmcHJpbnRmIChzdGRlcnIsICJVTkNIQU5HRUQgLS0gV1JJVEUgRU5USVJFIExJTkU6ICB2 cG9zICglZCkgfCByb3ctPnVzZWQgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdnBvcywgdXBkYXRlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpOworICAgICAg ICAgICAgICAgIG1jX2RyYXdfcm93ICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIGRl c2lyZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZGVzaXJlZF9yb3ctPngsIGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0sIHZwb3MsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJv d19wb3NpdGlvbiwgZHJhd19wLCBVTkNIQU5HRUQpOworICAgICAgICAgICAgICB9CisKKyAgICAg ICAgLyogTWF5YmUgY2xlYXIgdG8gZW5kIG9mIGxpbmUuICovCisgICAgICAgIGlmIChNQVRSSVhf Uk9XX0VYVEVORFNfRkFDRV9QIChkZXNpcmVkX3JvdykpCisgICAgICAgICAgeworICAgICAgICAg ICAgLyogSWYgbmV3IHJvdyBleHRlbmRzIHRvIHRoZSBlbmQgb2YgdGhlIHRleHQgYXJlYSwgbm90 aGluZworICAgICAgICAgICAgICAgaGFzIHRvIGJlIGNsZWFyZWQsIGlmIGFuZCBvbmx5IGlmIHdl IGRpZCBhIHdyaXRlX2dseXBocworICAgICAgICAgICAgICAgYWJvdmUuICBUaGlzIGlzIG1hZGUg c3VyZSBieSBzZXR0aW5nIGRlc2lyZWRfc3RvcF9wb3MKKyAgICAgICAgICAgICAgIGFwcHJvcHJp YXRlbHkgYWJvdmUuICovCisgICAgICAgICAgICBlYXNzZXJ0IChpIDwgZGVzaXJlZF9yb3ctPnVz ZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgfHwgKChkZXNpcmVkX3Jvdy0+dXNl ZFtURVhUX0FSRUFdID09IGN1cnJlbnRfcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19FWFRFTkRTX0ZBQ0VfUCAoY3VycmVudF9yb3cp KSk7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKE1BVFJJWF9ST1dfRVhURU5EU19G QUNFX1AgKGN1cnJlbnRfcm93KSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogSWYg b2xkIHJvdyBleHRlbmRzIHRvIHRoZSBlbmQgb2YgdGhlIHRleHQgYXJlYSwgY2xlYXIuICovCisg ICAgICAgICAgICAgIGlmIChpID49IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAg ICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgaSwgZGVzaXJlZF9yb3ctPnks IGRlc2lyZWRfcm93LT5waXhlbF93aWR0aCk7CisgICAgICAgICAgICAgIGlmIChkcmF3X3ApCisg ICAgICAgICAgICAgICAgcmlmLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgdXBkYXRlZF9yb3csIFRF WFRfQVJFQSwgLTEpOworICAgICAgICAgICAgICBjbGVhcl90b194ID0gLTE7CisgICAgICAgICAg ICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChk ZXNpcmVkX3Jvdy0+cGl4ZWxfd2lkdGggPCBjdXJyZW50X3Jvdy0+cGl4ZWxfd2lkdGgpCisgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBPdGhlcndpc2UgY2xlYXIgdG8gdGhlIGVu ZCBvZiB0aGUgb2xkIHJvdy4gIEV2ZXJ5dGhpbmcKKyAgICAgICAgICAgICAgICAgICBhZnRlciB0 aGF0IHBvc2l0aW9uIHNob3VsZCBiZSBjbGVhciBhbHJlYWR5LiAqLworICAgICAgICAgICAgICAg IGludCB4bGltOworICAgICAgICAgICAgICAgIGlmIChpID49IGRlc2lyZWRfcm93LT51c2VkW1RF WFRfQVJFQV0pCisgICAgICAgICAgICAgICAgICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9zLCBp LCBkZXNpcmVkX3Jvdy0+eSwgZGVzaXJlZF9yb3ctPnBpeGVsX3dpZHRoKTsKKyAgICAgICAgICAg ICAgICAvKiBJZiBjdXJzb3IgaXMgZGlzcGxheWVkIGF0IHRoZSBlbmQgb2YgdGhlIGxpbmUsIG1h a2Ugc3VyZQorICAgICAgICAgICAgICAgICAgIGl0J3MgY2xlYXJlZC4gIE5vd2FkYXlzIHdlIGRv bid0IGhhdmUgYSBwaHlzX2N1cnNvcl9nbHlwaAorICAgICAgICAgICAgICAgICAgIHdpdGggd2hp Y2ggdG8gZXJhc2UgdGhlIGN1cnNvciAoYmVjYXVzZSB0aGlzIG1ldGhvZAorICAgICAgICAgICAg ICAgICAgIGRvZXNuJ3Qgd29yayB3aXRoIGxiZWFyaW5nL3JiZWFyaW5nKSwgc28gd2UgbXVzdCBk byBpdCB0aGlzIHdheS4gKi8KKyAgICAgICAgICAgICAgICBpZiAodnBvcyA9PSB3LT5waHlzX2N1 cnNvci52cG9zCisgICAgICAgICAgICAgICAgICAgICYmIChkZXNpcmVkX3Jvdy0+cmV2ZXJzZWRf cAorICAgICAgICAgICAgICAgICAgICAgICAgPyAody0+cGh5c19jdXJzb3IuaHBvcyA8IDApCisg ICAgICAgICAgICAgICAgICAgICAgICA6ICh3LT5waHlzX2N1cnNvci5ocG9zID49IGRlc2lyZWRf cm93LT51c2VkW1RFWFRfQVJFQV0pKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgICAgdy0+cGh5c19jdXJzb3Jfb25fcCA9IDA7CisgICAgICAgICAgICAgICAgICAgIHhs aW0gPSAtMTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICAgICAgeGxpbSA9IGN1cnJlbnRfcm93LT5waXhlbF93aWR0aDsKKyAgICAg ICAgICAgICAgICBpZiAoZHJhd19wKQorICAgICAgICAgICAgICAgICAgcmlmLT5jbGVhcl9lbmRf b2ZfbGluZSAodywgdXBkYXRlZF9yb3csIFRFWFRfQVJFQSwgeGxpbSk7CisgICAgICAgICAgICAg ICAgY2xlYXJfdG9feCA9IHhsaW07CisgICAgICAgICAgICAgICAgY2hhbmdlZF9wID0gMTsKKyAg ICAgICAgICAgICAgfQorCisgICAgICAgIGlmIChjaGFuZ2VkX3AKKyAgICAgICAgICAgICYmIGNs ZWFyX3RvX3ggIT0gMCkKKyAgICAgICAgICB7Cis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ocG9zID0gdXBkYXRlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDE7CisgICAgICAgICAg ICBpbnQgeF9saW1pdCA9IChjbGVhcl90b194ID09IC0xKQorICAgICAgICAgICAgICAgICAgICAg ICAgICA/IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICA6IGNsZWFy X3RvX3g7CisgICAgICAgICAgICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAody0+Y29udGVu dHMpOworICAgICAgICAgICAgYm9vbCBmaWxsX2NvbHVtbl90cnVtcHNfcCA9ICghTklMUCAoQlZB UiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID09IGVzc2VudGlhbHMu ZmNfeCk7CisgICAgICAgICAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICAgICAgICAgIGZwcmlu dGYgKHN0ZGVyciwgIm1jX3VwZGF0ZV90ZXh0X2FyZWEgKGZsb2F0aW5nKTogIHZwb3MgKCVkKSB8 IHhfbGltaXQgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCB4 X2xpbWl0KTsKKyAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAg ICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAg JiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRp YWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg ZmNfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAgICAgICAmJiB4IDwgdGV4dF9hcmVh X3dpZHRoCisgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHgKKyAgICAgICAg ICAgICAgICAmJiB0YXJnZXRfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICYmIGRyYXdf cCkKKyAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9y b3csIHRhcmdldF9nbHlwaCwgVEVYVF9BUkVBLAorICAgICAgICAgICAgICAgICAgICAgICAgIHgs IHhfbGltaXQsIHVwZGF0ZWRfcm93LT55LCBocG9zLCB2cG9zLCBNQ19CQVIsIDEsCisgICAgICAg ICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9u LAorICAgICAgICAgICAgICAgICAgICAgICAgIGRlYnVnX3AgPyBkZWJ1Z19mZyA6IGVzc2VudGlh bHMuZmNfZmdbcm93X3Bvc2l0aW9uXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NP TFVNTiwgZHJhd19wLCBOT1dIRVJFLCBOT19DQUNIRSk7CisgICAgICAgICAgICBpZiAoQlVGRkVS UCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNyb3Nz aGFpcnMpKQorICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9ob3Jpem9udGFs X3J1bGVyKSkKKyAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAg ICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAg ICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAmJiB2cG9z ID09IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9IE5V TEwKKyAgICAgICAgICAgICAgICAmJiBkcmF3X3ApCisgICAgICAgICAgICAgIG1jX2VuZ2luZSAo dywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwK KyAgICAgICAgICAgICAgICAgICAgICAgICB4LCB4X2xpbWl0LCB1cGRhdGVkX3Jvdy0+eSwgaHBv cywgdnBvcywgTUNfSEJBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0 cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAg ZGVidWdfcCA/IGRlYnVnX2ZnIDogZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25dLAorICAg ICAgICAgICAgICAgICAgICAgICAgIEhPUklaT05UQUxfUlVMRVIsIGRyYXdfcCwgTk9XSEVSRSwg Tk9fQ0FDSEUpOworICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAg ICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAg ICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50 aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIs IGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgJiYgIWZpbGxfY29sdW1u X3RydW1wc19wCisgICAgICAgICAgICAgICAgJiYgeCA8IHRleHRfYXJlYV93aWR0aAorICAgICAg ICAgICAgICAgICYmIHZwb3MgIT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgICAgICAmJiB3 LT5jdXJzb3IueCA+PSB4CisgICAgICAgICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9IE5VTEwK KyAgICAgICAgICAgICAgICAmJiBkcmF3X3ApCisgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywg ZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICB4LCB4X2xpbWl0LCB1cGRhdGVkX3Jvdy0+eSwgaHBvcywg dnBvcywgTUNfQkFSLCAxLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgs IGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1 Z19wID8gZGVidWdfZmcgOiBlc3NlbnRpYWxzLmNoX2ZnW3Jvd19wb3NpdGlvbl0sCisgICAgICAg ICAgICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVIsIGRyYXdfcCwgTk9XSEVSRSwgTk9fQ0FD SEUpOworICAgICAgICAgIH0KKworICAgICAgfQorICByZXR1cm4gY2hhbmdlZF9wOworfQorCisv KiBVcGRhdGUgcm93IFZQT1MgaW4gd2luZG93IFcuICBWYWx1ZSBpcyB0cnVlIGlmIGRpc3BsYXkg aGFzIGJlZW4gY2hhbmdlZC4gKi8KK3N0YXRpYyBib29sCittY191cGRhdGVfd2luZG93X2xpbmUg KHN0cnVjdCB3aW5kb3cgKncsIGludCB2cG9zLCBib29sICptb3VzZV9mYWNlX292ZXJ3cml0dGVu X3AsCisgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKmN1cnNvcl9t YXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19lc3NlbnR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JiB3LT5sZWZ0 X21hcmdpbl9jb2xzID4gMCkKKyAgICAgICAgeworICAgICAgICAgIGNoYW5nZWRfcCA9IDE7Cisg ICAgICAgICAgdXBkYXRlX21hcmdpbmFsX2FyZWEgKHcsIGRlc2lyZWRfcm93LCBMRUZUX01BUkdJ Tl9BUkVBLCB2cG9zKTsKKyAgICAgICAgICAvKiBTZXR0aW5nIHRoaXMgZmxhZyB3aWxsIGVuc3Vy ZSB0aGUgdmVydGljYWwgYm9yZGVyLCBpZgorICAgICAgICAgICAgIGFueSwgYmV0d2VlbiB0aGlz IHdpbmRvdyBhbmQgdGhlIG9uZSBvbiBpdHMgbGVmdCB3aWxsIGJlCisgICAgICAgICAgICAgcmVk cmF3bi4gIFRoaXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2UgdXBkYXRpbmcgdGhlIGxlZnQKKyAgICAg ICAgICAgICBtYXJnaW4gYXJlYSBjYW4gcG90ZW50aWFsbHkgZHJhdyBvdmVyIHRoZSBib3JkZXIu ICovCisgICAgICAgICAgY3VycmVudF9yb3ctPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsK KyAgICAgICAgfQorICAgICAgYm9vbCB1cGRhdGVkX3AgPSBtY191cGRhdGVfdGV4dF9hcmVhICh3 LCBkZXNpcmVkX3JvdywgdnBvcywgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgZHJhd19wKTsKKyAgICAgIC8qIFVw ZGF0ZSB0aGUgZGlzcGxheSBvZiB0aGUgdGV4dCBhcmVhLiAqLworICAgICAgaWYgKHVwZGF0ZWRf cCkKKyAgICAgICAgeworICAgICAgICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAgICAgaWYgKGN1 cnJlbnRfcm93LT5tb3VzZV9mYWNlX3ApCisgICAgICAgICAgICAqbW91c2VfZmFjZV9vdmVyd3Jp dHRlbl9wID0gMTsKKyAgICAgICAgfQorICAgICA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l X3AKKyAgICAgICAgICB8fCAoTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChkZXNpcmVk X3JvdykKKyAgICAgICAgICAgICAgIT0gTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChj dXJyZW50X3JvdykpKQorICAgICAgICByaWYtPmFmdGVyX3VwZGF0ZV93aW5kb3dfbGluZV9ob29r ICh3LCBkZXNpcmVkX3Jvdyk7CisgICAgfQorICAvKiBVcGRhdGUgY3VycmVudF9yb3cgZnJvbSBk ZXNpcmVkX3Jvdy4gKi8KKyAgbWFrZV9jdXJyZW50ICh3LT5kZXNpcmVkX21hdHJpeCwgdy0+Y3Vy cmVudF9tYXRyaXgsIHZwb3MpOworICByZXR1cm4gY2hhbmdlZF9wOworfQorCit2b2lkCittY191 cGRhdGVfd2luZG93X2VyYXNlIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgbWNfbWF0cml4IG9s ZF9tYXRyaXgpCit7CisgIGJvb2wgZGVidWdfcCA9IGZhbHNlOworICBib29sIGdvX29uZV9wID0g KG9sZF9tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICAg ICB8fCBvbGRfbWF0cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPiAwCisgICAgICAgICAgICAg ICAgICAgfHwgb2xkX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVdID4gMCk7CisgIGJvb2wg Z29fdHdvX3AgPSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgJiYg KCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAg ICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBm Y192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKSk7CisgIGJvb2wgdXBkYXRpbmdfZnJhbWVfcCA9 IGZhbHNlOworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgaWYgKFhG UkFNRSAody0+ZnJhbWUpICE9IGYtPm1jX3VwZGF0aW5nX2ZyYW1lCisgICAgICAmJiAoZ29fb25l X3AgfHwgZ29fdHdvX3ApKQorICAgIHsKKyAgICAgIHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOwor ICAgICAgdXBkYXRlX2JlZ2luIChmKTsKKyAgICB9CisgIGlmICh3LT5waHlzX2N1cnNvcl9vbl9w CisgICAgICAmJiBnb190d29fcCkKKyAgICBlcmFzZV9waHlzX2N1cnNvciAodyk7CisgIGZvciAo aW50IHZudGggPSAwOworICAgICAgIGdvX29uZV9wCisgICAgICAgJiYgdm50aCA8IHctPm1jX21h dHJpeC52cG9zX3VzZWQ7CisgICAgICAgKyt2bnRoKQorICAgIHsKKyAgICAgIGZvciAoZW51bSBt Y19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgY2FjaGVfdHlw ZSA8IE5PX0NBQ0hFOworICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgIGZvciAoaW50 IG50aF8wID0gMDsKKyAgICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wIChvbGRfbWF0cml4 LCBjYWNoZV90eXBlLCB2bnRoLCBudGhfMCk7CisgICAgICAgICAgICAgKytudGhfMCkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBib29sIHNhbWVfcCA9IGZhbHNlOworICAgICAgICAgICAgZm9y IChpbnQgd19udGggPSAwOyB3X250aCA8IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3Vz ZWRbY2FjaGVfdHlwZV07ICsrd19udGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICBzYW1lX3AgfD0gKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MF0uZ2x5cGgudHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgudHlwZQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgKChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmdseXBoLmJ5dGVwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhd LmdseXBoLmJ5dGVwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09 IEFUX1pWCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gQVRf WlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICgob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5jaGFycG9zCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5nbHlwaC5jaGFycG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlv biA9PSBBVF9aVgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09 IEFUX1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pW CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9aVikp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnUudmFsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRo XS5nbHlwaC51LnZhbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5mYWNlX2lkCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBo LnBhZGRpbmdfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgucGFkZGluZ19wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmdseXBoLmxlZnRfYm94X2xpbmVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3 X250aF0uZ2x5cGgubGVmdF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnJp Z2h0X2JveF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnJpZ2h0X2JveF9s aW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgudm9mZnNldAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVt3X250aF0uZ2x5cGgudm9mZnNldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5waXhlbF93 aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgucGl4ZWxfd2lkdGgKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuaW1nLngKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmds eXBoLnNsaWNlLmltZy54CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy55Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5zbGljZS5pbWcueQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5nbHlwaC5zbGljZS5pbWcud2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBo LnNsaWNlLmltZy53aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5zbGljZS5pbWcuaGVp Z2h0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5zbGljZS5pbWcuaGVpZ2h0CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmNtcC5mcm9tCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5nbHlwaC5zbGljZS5jbXAuZnJvbQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS54CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS54CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZ4CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5meAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS55CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZ5CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5m eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5ocG9z CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLnZwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnZwb3MK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMF0ud2QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLndkCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmgKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0uY3Vyc29yX3R5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmN1cnNvcl90eXBl CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmN1cnNvcl93aWR0aAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250 aF0uY3Vyc29yX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLnJlZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVt3X250aF0uZmcucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLmdyZWVuCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS5mZy5ncmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5ibHVlCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5mZy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJnLnJl ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uYmcucmVkCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJn LmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5iZy5ncmVlbgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5iZy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5iZy5ibHVlCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzBdLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5hY3RpdmVfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5nbHlwaF9mbGF2b3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmds eXBoX2ZsYXZvcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5lbmFibGVkX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bd19udGhdLmVuYWJsZWRfcCk7CisgICAgICAgICAgICAgICAgaWYgKHNhbWVfcCkKKyAgICAg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAg ICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiSElUICglcyk6ICB2cG9zICglZCkgfCBo cG9zICglZCkgfCBjaGFyICglcylcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoY2FjaGVfdHlwZSA9PSBNQ19DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyAiTUMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChjYWNoZV90eXBlID09IENIX0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/ICJDSCIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gRkNfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gIkZDIgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAiTk8iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnZwb3Ms CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uaHBvcywKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nICh3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgudS5jaCkpOworICAgICAgICAg ICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250 aF0uc2FtZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmIChkZWJ1Z19wKQorICAgICAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgaW50IG9sZF9jYWNoZV91c2VkID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAg ICAgICAgICAgICAgaW50IG5ld19jYWNoZV91c2VkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAgICAgICBmcHJpbnRmIChz dGRlcnIsICJNSVNTICglcyk6ICB2cG9zICglZCkgfCBocG9zICglZCB2LiAlZCkgfCBjaGFyICgl cyB2LiAlcykgfCBjYWNoZV91c2VkICglZCB2LiAlZClcbiIsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoY2FjaGVfdHlwZSA9PSBNQ19DQUNIRSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiTUMiCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChjYWNoZV90eXBlID09IENIX0NBQ0hFKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJDSCIKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gRkNfQ0FDSEUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gIkZDIgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAiTk8iLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b d19udGhdLnZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmhwb3MsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVt3X250aF0uaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnUuY2gpLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC51LmNoKSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG9sZF9jYWNoZV91c2VkLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhY2hlX3VzZWQpOworICAgICAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICghc2FtZV9wKQorICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogYG1hdHJpeF9yb3cnIGluIGBkaXNwbmV3LmNg IGNvbnRhaW5zIHRoZSBmb2xsb3dpbmcgdGVzdHMsCisgICAgICAgICAgICAgICAgZWFzc2VydCAo bWF0cml4ICYmIG1hdHJpeC0+cm93cyk7CisgICAgICAgICAgICAgICAgZWFzc2VydCAocm93ID49 IDAgJiYgcm93IDwgbWF0cml4LT5ucm93cyk7ICovCisgICAgICAgICAgICAgICAgYm9vbCBiYXJm X2NyYXNoX29uZSA9ICh3LT5jdXJyZW50X21hdHJpeCAmJiB3LT5jdXJyZW50X21hdHJpeC0+cm93 cykgPyBmYWxzZSA6IHRydWU7CisgICAgICAgICAgICAgICAgaWYgKGJhcmZfY3Jhc2hfb25lKQor ICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgYm9vbCBiYXJmX2Ny YXNoX3R3byA9ICh2bnRoID49IDAgJiYgdm50aCA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cykg PyBmYWxzZSA6IHRydWU7CisgICAgICAgICAgICAgICAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAg ICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3Jv dyAqdm50aF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgdm50aCk7CisgICAg ICAgICAgICAgICAgaW50IHhfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0ueDsKKyAgICAgICAgICAgICAgICBpbnQgZnhfMCA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZng7CisgICAgICAgICAgICAgICAgaW50 IHlfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ueTsK KyAgICAgICAgICAgICAgICBpbnQgZnlfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uZnk7CisgICAgICAgICAgICAgICAgaW50IGhwb3NfMCA9IG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvczsKKyAgICAgICAg ICAgICAgICBpbnQgdnBvc18wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS52cG9zOworICAgICAgICAgICAgICAgIGludCB3ZF8wID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS53ZDsKKyAgICAgICAgICAgICAgICBp bnQgaF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5o OworICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGVfMCA9IG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uY3Vyc29yX3R5cGU7 CisgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aF8wID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3Jfd2lkdGg7CisgICAgICAgICAgICAg ICAgLy8gIHN0cnVjdCBtY19SR0IgbHNsX2ZnXzAgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcucmVkLAorICAgICAgICAgICAgICAgIC8v ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgLy8g ICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLmJsdWV9OworICAgICAgICAgICAgICAgIHN0cnVj dCBtY19SR0IgbHNsX2JnXzAgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uYmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5iZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5iZy5ibHVlfTsKKyAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9wXzAgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmFjdGl2ZV9wOworICAgICAg ICAgICAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvcl8wID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAg ICAgICAgYm9vbCBlbmFibGVkX3BfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0uZW5hYmxlZF9wOworICAgICAgICAgICAgICAgIGlmICh2cG9zXzAgPT0g dm50aAorICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3JfMCA9PSBNQ19HTFlQSAor ICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3BfMAorICAgICAgICAgICAgICAgICAgICAm JiB2bnRoX3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBtY19lcmFzZV9jdXJzb3IgKHcsIHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3Jvdywg eF8wLCB5XzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHBvc18wLCB2 cG9zXzAsIGdseXBoX2ZsYXZvcl8wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGN1cnNvcl90eXBlXzAsIHdkXzApOworICAgICAgICAgICAgICAgICAgICBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRfcCA9IGZhbHNlOwor ICAgICAgICAgICAgICAgICAgICAtLW9sZF9tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVd OworICAgICAgICAgICAgICAgICAgICAvKiBJZiB3ZSBpbmFkdmVydGVudGx5IGVyYXNlZCBhbm90 aGVyIGZha2UgY3Vyc29yIGF0IHRoZSBzYW1lCisgICAgICAgICAgICAgICAgICAgIEhQT1MgdGhh dCBpcyBzdGlsbCBlbmFibGVkX3AgaW4gdGhlIGBvbGRfbWF0cml4YCwgdGhlbiByZWRyYXcgaXQu ICovCisgICAgICAgICAgICAgICAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5 cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9f Q0FDSEU7CisgICAgICAgICAgICAgICAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAgICAgICAg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaW50IG50aF8xID0g MDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAob2xk X21hdHJpeCwgY2FjaGVfdHlwZSwgdm50aCwgbnRoXzEpOworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICArK250aF8xKQorICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaW50IHhfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMV0ueDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgZnhf MSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZng7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHlfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0ueTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgZnlfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MV0uZnk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhwb3NfMSA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uaHBvczsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpbnQgdnBvc18xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8xXS52cG9zOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCB3ZF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS53 ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaF8xID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5oOworICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGVfMSA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uY3Vyc29yX3R5cGU7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aF8xID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5jdXJzb3Jfd2lkdGg7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmdfMSA9IHsucmVkID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5mZy5yZWQsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZnLmdyZWVuLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZnLmJsdWV9 OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICBzdHJ1Y3QgbWNfUkdCIGxzbF9iZ18x ID0gey5yZWQgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFd LmJnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzFdLmJnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAg ICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8xXS5iZy5ibHVlfTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICBib29sIGFjdGl2ZV9wXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzFdLmFjdGl2ZV9wOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNf Zmxhdm9yIGdseXBoX2ZsYXZvcl8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8xXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg Ym9vbCBlbmFibGVkX3BfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMV0uZW5hYmxlZF9wOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgZ29f cF8xID0gKGhwb3NfMCA9PSBocG9zXzEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBlbmFibGVkX3BfMSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg aWYgKCFnb19wXzEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wXzEgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgdy0+Y3VycmVu dF9tYXRyaXgsIHZudGhfcm93LCB4XzEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGZ4XzEsIHlfMSwgZnlfMSwgaHBvc18xLCB2cG9zXzEsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdkXzEsIGhfMSwg Y3Vyc29yX3R5cGVfMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX3dpZHRoXzEsIGxzbF9mZ18xLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVfcF8xLCBnbHlwaF9mbGF2b3JfMSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3Zl X3BfMSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICh2cG9z XzAgPT0gdm50aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wXzAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHZudGhfcm93LT5lbmFibGVkX3ApCisgICAgICAg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wXzAgPSB0 cnVlOworICAgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB3LT5j dXJyZW50X21hdHJpeCwgdm50aF9yb3csIHhfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZnhfMCwgeV8wLCBmeV8wLCBocG9zXzAsIHZwb3NfMCwgd2RfMCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaF8wLCBjdXJzb3Jf dHlwZV8wLCBjdXJzb3Jfd2lkdGhfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbHNsX2JnXzAsIGFjdGl2ZV9wXzAsIGdseXBoX2ZsYXZvcl8wLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVfcF8wKTsKKyAgICAg ICAgICAgICAgICAgICAgICBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzBdLmVuYWJsZWRfcCA9IGZhbHNlOworICAgICAgICAgICAgICAgICAgICAgIC0tb2xkX21h dHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAgICAgICAgICAgICAgLyog SWYgd2UgaW5hZHZlcnRlbnRseSBlcmFzZWQgYW5vdGhlciBmYWtlIGN1cnNvciBhdCB0aGUgc2Ft ZQorICAgICAgICAgICAgICAgICAgICAgIEhQT1MgdGhhdCBpcyBzdGlsbCBlbmFibGVkX3AgaW4g dGhlIGBvbGRfbWF0cml4YCwgdGhlbiByZWRyYXcgaXQuICovCisgICAgICAgICAgICAgICAgICAg ICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICAg ICAgICAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAgICAgICAgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGludCBudGhfMiA9IDA7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAob2xkX21hdHJpeCwgY2Fj aGVfdHlwZSwgdm50aCwgbnRoXzIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsr bnRoXzIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaW50IHhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMl0ueDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBmeF8yID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5meDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGludCB5XzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLnk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgZnlfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf Ml0uZnk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaHBvc18yID0gb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5ocG9zOworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaW50IHZwb3NfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMl0udnBvczsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGludCB3ZF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8yXS53ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBoXzIgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmg7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlXzIgPSBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmN1cnNvcl90eXBlOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aF8yID0gb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5jdXJzb3Jfd2lkdGg7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZ18yID0gey5y ZWQgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZnLnJl ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8y XS5mZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzJdLmZnLmJsdWV9OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIHN0 cnVjdCBtY19SR0IgbHNsX2JnXzIgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMl0uYmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5iZy5ncmVlbiwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5iZy5ibHVlfTsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgYWN0aXZlX3BfMiA9IG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uYWN0aXZlX3A7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3JfMiA9IG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZ2x5cGhfZmxhdm9yOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBlbmFibGVkX3BfMiA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZW5hYmxlZF9wOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBnb19wXzIgPSAoaHBvc18wID09IGhwb3NfMgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZnhfMCA8PSBm eF8yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmeF8w ICsgd2RfMCA+IGZ4XzIgKyB3ZF8yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBlbmFibGVkX3BfMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpZiAoIWdvX3BfMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wXzIgPSBmYWxzZTsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB3 LT5jdXJyZW50X21hdHJpeCwgdm50aF9yb3csIHhfMiwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmeF8yLCB5XzIsIGZ5XzIsIGhwb3NfMiwgdnBv c18yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHdkXzIsIGhfMiwgY3Vyc29yX3R5cGVfMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGhfMiwgbHNsX2ZnXzIsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX3BfMiwg Z2x5cGhfZmxhdm9yXzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgcmVtb3ZlX3BfMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICB9CisgIGlmICh1cGRhdGluZ19mcmFtZV9wKQor ICAgIHVwZGF0ZV9lbmQgKGYpOworfQorCit2b2lkCittY191cGRhdGVfd2luZG93X2RyeXJ1biAo c3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wLCBzdHJ1Y3QgbWNfZXNzZW50aWFscyBlc3Nl bnRpYWxzKQoreworICBpZiAoIUJVRkZFUlAgKHctPmNvbnRlbnRzKSkKKyAgICByZXR1cm47CisK KyAgaWYgKHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID09IDAKKyAgICAgICYm IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID09IDAKKyAgICAgICYmIHctPm1j X21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVdID09IDAKKyAgICAgICYmIE5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAmJiBOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYgTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgcmV0dXJuOworCisgIC8v IGNsb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ICAgaGVh ZGVyX2xpbmVfcm93ID0gTlVMTDsKKworICAgICAgLyogVXBkYXRlIHRoZSBtb2RlIGxpbmUsIGlm IG5lY2Vzc2FyeS4gKi8KKyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKm1vZGVfbGluZV9yb3cgPSBN QVRSSVhfTU9ERV9MSU5FX1JPVyAoZGVzaXJlZF9tYXRyaXgpOworICAgICAgaWYgKG1vZGVfbGlu ZV9yb3ctPm1vZGVfbGluZV9wICYmIG1vZGVfbGluZV9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAg eworICAgICAgICAgIG1vZGVfbGluZV9yb3ctPnkgPSB5YiArIFdJTkRPV19TQ1JPTExfQkFSX0FS RUFfSEVJR0hUICh3KTsKKyAgICAgICAgICB1cGRhdGVfd2luZG93X2xpbmUgKHcsIE1BVFJJWF9S T1dfVlBPUyAobW9kZV9saW5lX3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZGVzaXJlZF9tYXRyaXgpLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7CisgICAgICAgIH0KKworICAgICAg LyogRmluZCBmaXJzdCBlbmFibGVkIHJvdy4gIE9wdGltaXphdGlvbnMgaW4gcmVkaXNwbGF5X2lu dGVybmFsCisgICAgICAgICBtYXkgbGVhZCB0byBhbiB1cGRhdGUgd2l0aCBvbmx5IG9uZSByb3cg ZW5hYmxlZC4gIFRoZXJlIG1heQorICAgICAgICAgYmUgYWxzbyBjb21wbGV0ZWx5IGVtcHR5IG1h dHJpY2VzLiAqLworICAgICAgd2hpbGUgKHJvdyA8IGVuZCAmJiAhcm93LT5lbmFibGVkX3ApCisg ICAgICAgICsrcm93OworCisgICAgICAvKiBUcnkgcmV1c2luZyBwYXJ0IG9mIHRoZSBkaXNwbGF5 IGJ5IGNvcHlpbmcuICovCisgICAgICBpZiAocm93IDwgZW5kICYmICF3LT5kZXNpcmVkX21hdHJp eC0+bm9fc2Nyb2xsaW5nX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgcmMgPSBtY19zY3Jv bGxpbmdfd2luZG93ICh3LCBoZWFkZXJfbGluZV9yb3cgIT0gTlVMTCk7CisgICAgICAgICAgaWYg KHJjIDwgMCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogQWxsIHJvd3Mgd2VyZSBm b3VuZCB0byBiZSBlcXVhbC4gKi8KKyAgICAgICAgICAgICAgcGF1c2VkX3AgPSAwOworICAgICAg ICAgICAgICBnb3RvIHNldF9jdXJzb3I7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNl IGlmIChyYyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBXZSd2ZSBz Y3JvbGxlZCB0aGUgZGlzcGxheS4gKi8KKyAgICAgICAgICAgICAgICBmb3JjZV9wID0gMTsKKyAg ICAgICAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgICB9CisgICAgICAgIH0K KyAgICAgIC8qIFByb2Nlc3MgdGhlIGN1cnNvciByb3cgYXQgdGhlIG91dHNldCBpZiBpdCBpcyB3 aXRoaW4gYGRlc2lyZWRfbWF0cml4YC4KKyAgICAgIFdoZW4gcHJvY2Vzc2luZyBhbGwgb3RoZXIg cm93cywgd2Ugd2lsbCBxdWVyeSB0aGUgYHctPmN1cnJlbnRfbWF0cml4YCBmb3IgZGF0YQorICAg ICAgcmVsYXRpbmcgdG8gdGhlIGN1cnNvciByb3cuICBgbWFrZV9jdXJyZW50YCAod2l0aGluIGB1 cGRhdGVfd2luZG93X2xpbmUnKQorICAgICAgdXBkYXRlcyB0aGUgYHctPmN1cnJlbnRfbWF0cml4 YCBmb3IgdGhlIGFwcGxpY2FibGUgcm93LiAgSW4gZG9pbmcgc28sIGhvd2V2ZXIsCisgICAgICB0 aGUgYXBwbGljYWJsZSByb3cgaW4gdGhlIGRlc2lyZWQgbWF0cml4IGlzIGFsdGVyZWQgc3VjaCB0 aGF0IHdlIGNhbiBubyBsb25nZXIKKyAgICAgIHJlbHkgdXBvbiB0aGUgYWNjdXJhY3kgb2YgYFJP Vy0+dXNlZFtURVhUX0FSRUFdYC4gIFRoZXJlZm9yZSwgd2UgbXVzdCBub3cgcmVseQorICAgICAg ZXhjbHVzaXZlbHkgdXBvbiBgdy0+Y3VycmVudF9tYXRyaXgnIGZvciBjdXJzb3Igcm93IGJhc2Vk IGRlY2lzaW9ucy4gKi8KKyAgICAgIGZvciAoc3RydWN0IGdseXBoX3JvdyAqbWNfcm93ID0gcm93 OworICAgICAgICAgICBtY19yb3cgPCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcp OworICAgICAgICAgICArK21jX3JvdykKKyAgICAgICAgeworICAgICAgICAgIGludCB2cG9zID0g TUFUUklYX1JPV19WUE9TIChtY19yb3csIHctPmRlc2lyZWRfbWF0cml4KTsKKyAgICAgICAgICBp ZiAobWNfcm93LT5lbmFibGVkX3AKKyAgICAgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3Iu dnBvcykKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCA9IHctPmRl c2lyZWRfbWF0cml4OworICAgICAgICAgICAgICBpZiAoIWZvcmNlX3AgJiYgKytuX3VwZGF0ZWQg JSBwcmVlbXB0X2NvdW50ID09IDApCisgICAgICAgICAgICAgICAgZGV0ZWN0X2lucHV0X3BlbmRp bmdfaWdub3JlX3NxdWVlemFibGVzICgpOworICAgICAgICAgICAgICBjaGFuZ2VkX3AgfD0gbWNf dXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jf bWF0cml4LCBlc3NlbnRpYWxzLCBkcmF3X3ApOworICAgICAgICAgICAgICBpZiAoTUFUUklYX1JP V19CT1RUT01fWSAocm93KSA+PSB5YikKKyAgICAgICAgICAgICAgICBmb3IgKGludCBpID0gdnBv cyArIDE7IGkgPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MgLSAxOyArK2kpCisgICAgICAgICAg ICAgICAgICBTRVRfTUFUUklYX1JPV19FTkFCTEVEX1AgKHctPmN1cnJlbnRfbWF0cml4LCBpLCBm YWxzZSk7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICBjdXJzb3JfbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgICAgICAvKiBVcGRhdGUg dGhlIHJlc3Qgb2YgdGhlIGxpbmVzLiAqLworICAgICAgZm9yICg7IHJvdyA8IGVuZCAmJiAoZm9y Y2VfcCB8fCAhaW5wdXRfcGVuZGluZyk7ICsrcm93KQorICAgICAgICAvKiBzY3JvbGxpbmdfd2lu ZG93IHJlc2V0cyB0aGUgZW5hYmxlZF9wIGZsYWcgb2YgdGhlIHJvd3MgaXQgcmV1c2VzIGZyb20K KyAgICAgICAgY3VycmVudF9tYXRyaXguICovCisgICAgICAgIGlmIChyb3ctPmVuYWJsZWRfcCkK KyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93 LCB3LT5kZXNpcmVkX21hdHJpeCk7CisgICAgICAgICAgICAvKiBJZiB0aGUgYGN1cnNvcl9yb3dg IGlzIHdpdGhpbiB0aGUgYGRlc2lyZWRfbWF0cml4YCwgdGhlbiBpdCB3YXMKKyAgICAgICAgICAg IHByb2Nlc3NlZCBoZXJlaW5hYm92ZSBhbmQgc2hvdWxkIGJlIHNraXBwZWQgYXQgdGhpcyB0aW1l LiAqLworICAgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAg ICBjb250aW51ZTsKKyAgICAgICAgICAgIGludCBpOworICAgICAgICAgICAgLyogV2UnbGwgaGF2 ZSB0byBwbGF5IGEgbGl0dGxlIGJpdCB3aXRoIHdoZW4gdG8KKyAgICAgICAgICAgICAgIGRldGVj dF9pbnB1dF9wZW5kaW5nLiAgSWYgaXQncyBkb25lIHRvbyBvZnRlbiwKKyAgICAgICAgICAgICAg IHNjcm9sbGluZyBsYXJnZSB3aW5kb3dzIHdpdGggcmVwZWF0ZWQgc2Nyb2xsLXVwCisgICAgICAg ICAgICAgICBjb21tYW5kcyB3aWxsIHRvbyBxdWlja2x5IHBhdXNlIHJlZGlzcGxheS4gKi8KKyAg ICAgICAgICAgIGlmICghZm9yY2VfcCAmJiArK25fdXBkYXRlZCAlIHByZWVtcHRfY291bnQgPT0g MCkKKyAgICAgICAgICAgICAgZGV0ZWN0X2lucHV0X3BlbmRpbmdfaWdub3JlX3NxdWVlemFibGVz ICgpOworICAgICAgICAgICAgY2hhbmdlZF9wIHw9IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywg dnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIGRyYXdf cCk7CisgICAgICAgICAgICAvKiBNYXJrIGFsbCByb3dzIGJlbG93IHRoZSBsYXN0IHZpc2libGUg b25lIGluIHRoZSBjdXJyZW50CisgICAgICAgICAgICAgICBtYXRyaXggYXMgaW52YWxpZC4gIFRo aXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2Ugb2YKKyAgICAgICAgICAgICAgIHZhcmlhYmxlIGxpbmUg aGVpZ2h0cy4gIENvbnNpZGVyIHRoZSBjYXNlIG9mIHRocmVlCisgICAgICAgICAgICAgICBzdWNj ZXNzaXZlIHJlZGlzcGxheXMsIHdoZXJlIHRoZSBmaXJzdCBkaXNwbGF5cyA1CisgICAgICAgICAg ICAgICBsaW5lcywgdGhlIHNlY29uZCAzIGxpbmVzLCBhbmQgdGhlIHRoaXJkIDUgbGluZXMgYWdh aW4uCisgICAgICAgICAgICAgICBJZiB0aGUgc2Vjb25kIHJlZGlzcGxheSB3b3VsZG4ndCBtYXJr IHJvd3MgaW4gdGhlCisgICAgICAgICAgICAgICBjdXJyZW50IG1hdHJpeCBpbnZhbGlkLCB0aGUg dGhpcmQgcmVkaXNwbGF5IG1pZ2h0IGJlCisgICAgICAgICAgICAgICB0ZW1wdGVkIHRvIG9wdGlt aXplIHJlZGlzcGxheSBiYXNlZCBvbiBsaW5lcyBkaXNwbGF5ZWQKKyAgICAgICAgICAgICAgIGlu IHRoZSBmaXJzdCByZWRpc3BsYXkuICovCisgICAgICAgICAgICBpZiAoTUFUUklYX1JPV19CT1RU T01fWSAocm93KSA+PSB5YikKKyAgICAgICAgICAgICAgZm9yIChpID0gdnBvcyArIDE7IGkgPCB3 LT5jdXJyZW50X21hdHJpeC0+bnJvd3MgLSAxOyArK2kpCisgICAgICAgICAgICAgICAgU0VUX01B VFJJWF9ST1dfRU5BQkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwgaSwgZmFsc2UpOworICAgICAg ICAgIH0KKyAgICAgIC8qIFdhcyBkaXNwbGF5IHByZWVtcHRlZD8gKi8KKyAgICAgIHBhdXNlZF9w ID0gcm93IDwgZW5kOworICAgICAgc2V0X2N1cnNvcjoKKyAgICAgIC8qIElmIHdlIGp1bXBlZCBo ZXJlIGZyb20gYHNldF9jdXJzb3JgLCB0aGVuIHNldCB0aGUgYGN1cnNvcl9tYXRyaXhgLiAqLwor ICAgICAgaWYgKGN1cnNvcl9tYXRyaXggPT0gTlVMTCkKKyAgICAgICAgY3Vyc29yX21hdHJpeCA9 IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgLyogUmVzZXQgYHJvd2AgdG8gMCBzbyB0aGF0IGZh a2UgY3Vyc29ycyBjYW4gYmUgZHJhd24gb24gcm93cyBwcmVjZWRpbmcgdGhlCisgICAgICBmaXJz dCBgcm93LT5lbmFibGVkX3BgLiAgSnVzdCBwcmlvciB0byB0aGUgY2FsbCB0byBgc2Nyb2xsaW5n X3dpbmRvdycgYWJvdmUsCisgICAgICBgcm93YCB3YXMgYWR2YW5jZWQgdG8gdGhlIGZpcnN0IGBy b3ctPmVuYWJsZWRfcGAuICovCisgICAgICBmb3IgKHN0cnVjdCBnbHlwaF9yb3cgKmRlc2lyZWRf cm93ID0gTUFUUklYX1JPVyAody0+ZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAgICAgICBkZXNp cmVkX3JvdyA8IGVuZAorICAgICAgICAgICAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGluZykK KyAgICAgICAgICAgLyogVzMyIEVtYWNzIGNyYXNoZXMgb24gc3RhcnR1cCB3aXRob3V0IGEgQlVG RkVSUCBjaGVjay4gKi8KKyAgICAgICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAg ICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkK KyAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNy b3NzaGFpcnMpKQorICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgZmNfdmlzaWJsZSkpKTsKKyAgICAgICAgICAgKytkZXNpcmVkX3JvdykKKyAgICAg ICAgeworICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChkZXNpcmVkX3Jvdywg dy0+ZGVzaXJlZF9tYXRyaXgpOworICAgICAgICAgIGlmIChkZXNpcmVkX3Jvdy0+ZW5hYmxlZF9w KQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqY3Vy cmVudF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgdnBvcyk7CisgICAgICAg ICAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9uID0gbWNfcm93X3Bvc2l0aW9uICh3 LCBjdXJyZW50X3JvdywgY3VycmVudF9yb3csIHZwb3MpOworICAgICAgICAgIGlmIChjdXJyZW50 X3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgbWNfZHJhd19yb3cgKHcsIHctPmN1cnJlbnRf bWF0cml4LCBjdXJyZW50X3JvdywgY3VycmVudF9yb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfcm93LT54LCBjdXJyZW50X3Jvdy0+dXNlZFtU RVhUX0FSRUFdLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgs IGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgZHJhd19wLAorICAgICAgICAgICAgICAgICAgICAg ICAgIFNFVF9DVVJTT1JfT05FKTsKKyAgICAgICAgfQorCisgICAgICBtY19yZXN0b3JlX2dseXBo X21hdHJpeCAoc2F2ZWRfZGVzaXJlZCwgdy0+ZGVzaXJlZF9tYXRyaXgpOworICAgICAgbWNfcmVz dG9yZV9nbHlwaF9tYXRyaXggKHNhdmVkX2N1cnJlbnQsIHctPmN1cnJlbnRfbWF0cml4KTsKKwor ICAgICAgbWNfdXBkYXRlX3dpbmRvd19lcmFzZSAodywgb2xkX21hdHJpeCk7CisKKyAgICAgIG1j X3hmcmVlX2NhY2hlX21hdHJpeCAodywgJm9sZF9tYXRyaXgpOworCisgICAgfQorICAvLyBjbG9j a190IGNsb2NrX2VuZCA9IGNsb2NrKCk7CisgIC8vIGRvdWJsZSBjcHVfdGltZV91c2VkID0gKChk b3VibGUpIChjbG9ja19lbmQgLSBjbG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8v IGZwcmludGYgKHN0ZGVyciwgIm1jX3Njcm9sbGluZ193aW5kb3cgKCVzKTogIFRJTUUgKCVmKVxu IiwgbWNfd2luZG93ICh3KSwgY3B1X3RpbWVfdXNlZCk7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1D VVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBTdHJ1Y3R1cmUgdG8g cGFzcyBkaW1lbnNpb25zIGFyb3VuZC4gIFVzZWQgZm9yIGNoYXJhY3RlciBib3VuZGluZwogICAg Ym94ZXMsIGdseXBoIG1hdHJpeCBkaW1lbnNpb25zIGFuZCBhbGlrZS4gICovCiAKQEAgLTIyNDEs NiArNDAxNywxNiBAQCBmcmVlX3dpbmRvd19tYXRyaWNlcyAoc3RydWN0IHdpbmRvdyAqdykKIAkg IGZyZWVfZ2x5cGhfbWF0cml4ICh3LT5jdXJyZW50X21hdHJpeCk7CiAJICBmcmVlX2dseXBoX21h dHJpeCAody0+ZGVzaXJlZF9tYXRyaXgpOwogCSAgdy0+Y3VycmVudF9tYXRyaXggPSB3LT5kZXNp cmVkX21hdHJpeCA9IE5VTEw7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgbWNfeGZyZWVfY2FjaGVfbWF0cml4ICh3LCAmdy0+bWNfbWF0 cml4KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCX0KIAogICAgICAgLyogTmV4 dCB3aW5kb3cgb24gc2FtZSBsZXZlbC4gICovCkBAIC0zMzg3LDYgKzUxNzMsMjYgQEAgY2hlY2tf Y3VycmVudF9tYXRyaXhfZmxhZ3MgKHN0cnVjdCB3aW5kb3cgKncpCiBzdGF0aWMgYm9vbAogdXBk YXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogeworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmIChtY19z dGRlcnJfcCkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJ1cGRhdGVfd2luZG93ICglcylcbiIsIG1j X3dpbmRvdyAodykpOworCisgIHN0cnVjdCBtY19lc3NlbnRpYWxzIGVzc2VudGlhbHM7CisgIG1j X3NldF9lc3NlbnRpYWxzICh3LCAmZXNzZW50aWFscyk7CisKKyAgbWNfdXBkYXRlX3dpbmRvd19k cnlydW4gKHcsIGZvcmNlX3AsIGVzc2VudGlhbHMpOworCisgIHN0cnVjdCBnbHlwaF9tYXRyaXgg KmN1cnNvcl9tYXRyaXggPSBOVUxMOworCisgIGJvb2wgZHJhd19wID0gdHJ1ZTsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpkZXNpcmVkX21h dHJpeCA9IHctPmRlc2lyZWRfbWF0cml4OwogICBib29sIHBhdXNlZF9wOwogICBpbnQgcHJlZW1w dF9jb3VudCA9IGNsaXBfdG9fYm91bmRzICgxLCBiYXVkX3JhdGUgLyAyNDAwICsgMSwgSU5UX01B WCk7CkBAIC0zNDY0LDYgKzUyNzAsNDggQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAq dywgYm9vbCBmb3JjZV9wKQogCSAgICB9CiAJfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogKioqKioqKioqKioqKioqKio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Glm IChtY19yb3ctPmVuYWJsZWRfcAorICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3Mp CisgICAgICAgIHsKKyAgICAgICAgICBjdXJzb3JfbWF0cml4ID0gZGVzaXJlZF9tYXRyaXg7Cisg ICAgICAgICAgaWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVkICUgcHJlZW1wdF9jb3VudCA9PSAw KQorICAgICAgICAgICAgZGV0ZWN0X2lucHV0X3BlbmRpbmdfaWdub3JlX3NxdWVlemFibGVzICgp OworICAgICAgICAgIGNoYW5nZWRfcCB8PSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAg ICAgICAgICAgICAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg bWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgfHwgISBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUp KSkpCisgICAgICAgICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2 cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgZHJhd19w KQorICAgICAgICAgICAgICAgICAgICAgICA6IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywg Jm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7CisgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9U VE9NX1kgKHJvdykgPj0geWIpCisgICAgICAgICAgICBmb3IgKGludCBpID0gdnBvcyArIDE7IGkg PCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MgLSAxOyArK2kpCisgICAgICAgICAgICAgIFNFVF9N QVRSSVhfUk9XX0VOQUJMRURfUCAody0+Y3VycmVudF9tYXRyaXgsIGksIGZhbHNlKTsKKyAgICAg ICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKworICBjdXJzb3JfbWF0cml4ID0gdy0+Y3Vy cmVudF9tYXRyaXg7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIC8qIFVw ZGF0ZSB0aGUgcmVzdCBvZiB0aGUgbGluZXMuICAqLwogICAgICAgZm9yICg7IHJvdyA8IGVuZCAm JiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGluZyk7ICsrcm93KQogCS8qIHNjcm9sbGluZ193aW5k b3cgcmVzZXRzIHRoZSBlbmFibGVkX3AgZmxhZyBvZiB0aGUgcm93cyBpdApAQCAtMzQ3MSw2ICs1 MzE5LDE5IEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkK IAlpZiAocm93LT5lbmFibGVkX3ApCiAJICB7CiAJICAgIGludCB2cG9zID0gTUFUUklYX1JPV19W UE9TIChyb3csIGRlc2lyZWRfbWF0cml4KTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgICAgIC8qIElmIHRoZSBgY3Vyc29yX3Jv d2AgaXMgd2l0aGluIHRoZSBgZGVzaXJlZF9tYXRyaXhgLCB0aGVuIGl0IHdhcworICAgICAgICAg IHByb2Nlc3NlZCBoZXJlaW5hYm92ZSBhbmQgc2hvdWxkIGJlIHNraXBwZWQgYXQgdGhpcyB0aW1l LiAqLworICAgICAgICAgIGlmICh2cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICAgIGNv bnRpbnVlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgIGludCBpOwogCiAJ ICAgIC8qIFdlJ2xsIGhhdmUgdG8gcGxheSBhIGxpdHRsZSBiaXQgd2l0aCB3aGVuIHRvCkBAIC0z NDc5LDggKzUzNDAsMjEgQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBm b3JjZV9wKQogCSAgICAgICBjb21tYW5kcyB3aWxsIHRvbyBxdWlja2x5IHBhdXNlIHJlZGlzcGxh eS4gICovCiAJICAgIGlmICghZm9yY2VfcCAmJiArK25fdXBkYXRlZCAlIHByZWVtcHRfY291bnQg PT0gMCkKIAkgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7 Ci0JICAgIGNoYW5nZWRfcCB8PSB1cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsCi0JCQkJCSAg ICAgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgICAgICBjaGFuZ2VkX3AgfD0gKEJV RkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKCFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICEgTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpKQorICAgICAgICAgICAgICAgICAgICAgICA/ IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5f cCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNv cl9tYXRyaXgsIGVzc2VudGlhbHMsIGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgOiB1 cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAJICAgIC8qIE1hcmsgYWxsIHJvd3MgYmVs b3cgdGhlIGxhc3QgdmlzaWJsZSBvbmUgaW4gdGhlIGN1cnJlbnQKIAkgICAgICAgbWF0cml4IGFz IGludmFsaWQuICBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNhdXNlIG9mCkBAIC0zNTAxLDYgKzUzNzUs NDEgQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCiAg ICAgc2V0X2N1cnNvcjoKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICAvKiBJZiB3ZSBqdW1wZWQgaGVyZSBmcm9tIGBzZXRfY3Vyc29yYCwg dGhlbiBzZXQgdGhlIGBjdXJzb3JfbWF0cml4YC4gKi8KKyAgaWYgKGN1cnNvcl9tYXRyaXggPT0g TlVMTCkKKyAgICBjdXJzb3JfbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisKKyAgLyogUmVz ZXQgYHJvd2AgdG8gMCBzbyB0aGF0IGZha2UgY3Vyc29ycyBjYW4gYmUgZHJhd24gb24gcm93cyBw cmVjZWRpbmcgdGhlCisgIGZpcnN0IGByb3ctPmVuYWJsZWRfcGAuICBKdXN0IHByaW9yIHRvIHRo ZSBjYWxsIHRvIGBzY3JvbGxpbmdfd2luZG93JyBhYm92ZSwKKyAgYHJvd2Agd2FzIGFkdmFuY2Vk IHRvIHRoZSBmaXJzdCBgcm93LT5lbmFibGVkX3BgLiAqLworICBmb3IgKHN0cnVjdCBnbHlwaF9y b3cgKmRlc2lyZWRfcm93ID0gTUFUUklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAg IGRlc2lyZWRfcm93IDwgZW5kCisgICAgICAgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcp CisgICAgICAgLyogVzMyIEVtYWNzIGNyYXNoZXMgb24gc3RhcnR1cCB3aXRob3V0IGEgQlVGRkVS UCBjaGVjay4gKi8KKyAgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAmJiAo IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAg IHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAg ICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxl KSkpOworICAgICAgICsrZGVzaXJlZF9yb3cpCisgICAgeworICAgICAgaW50IHZwb3MgPSBNQVRS SVhfUk9XX1ZQT1MgKGRlc2lyZWRfcm93LCBkZXNpcmVkX21hdHJpeCk7CisgICAgICBpZiAoZGVz aXJlZF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgY29udGludWU7CisgICAgICBzdHJ1Y3QgZ2x5 cGhfcm93ICpjdX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ZWEpCiAJICAgIHsK LQkgICAgICByZWRyYXdfb3ZlcmxhcHBlZF9yb3dzICh3LCB5Yik7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIGByZWRyYXdfb3Zlcmxh cHBlZF9yb3dzJzogIFJlZHJhdyBsaW5lcyBmcm9tIHRoZSBjdXJyZW50IG1hdHJpeCBvZiB3aW5k b3cgVwordGhhdCBhcmUgb3ZlcmxhcHBlZCBieSBvdGhlciByb3dzLiAgWUIgaXMgYm90dG9tLW1v c3QgeS1wb3NpdGlvbiBpbiBXLiAgSWYgcm93cworb3ZlcmxhcHBpbmcgb3RoZXJzIGhhdmUgYmVl biBjaGFuZ2VkLCB0aGUgcm93cyBiZWluZyBvdmVybGFwcGVkIGhhdmUgdG8gYmUKK3JlZHJhd24u ICBUaGlzIHdvbid0IGRyYXcgbGluZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBkcmF3biBpbiB1 cGRhdGVfd2luZG93CitsaW5lIGJlY2F1c2Ugb3ZlcmxhcHBlZF9wIGluIGRlc2lyZWQgcm93cyBp cyAwLCBzbyBhZnRlciByb3cgYXNzaWdubWVudAorb3ZlcmxhcHBlZF9wIGluIGN1cnJlbnQgcm93 cyBpcyAwLiAqLworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykp OworICBmb3IgKGludCBpID0gMDsgaSA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93czsgKytpKQor ICAgIHsKKyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdyA9IHctPmN1cnJlbnRfbWF0cml4LT5y b3dzICsgaTsKKyAgICAgIGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgIGJyZWFrOworICAg ICAgICBlbHNlIGlmIChyb3ctPm1vZGVfbGluZV9wKQorICAgICAgICAgIGNvbnRpbnVlOworICAg ICAgaWYgKHJvdy0+b3ZlcmxhcHBlZF9wKQorICAgICAgICB7CisgICAgICAgICAgZm9yIChlbnVt IGdseXBoX3Jvd19hcmVhIGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVB OyArK2FyZWEpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG91dHB1dF9jdXJzb3JfdG8g KHcsIGksIDAsIHJvdy0+eSwgYXJlYSA9PSBURVhUX0FSRUEgPyByb3ctPnggOiAwKTsKKyAgICAg ICAgICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgcm93LCBh cmVhLCByb3ctPngsIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT51 c2VkW2FyZWFdLCB0cnVlLCBEUkFXX05PUk1BTF9URVhULAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFVQREFURV9XSU5ET1dfX1JFRFJBV19PVkVSTEFQUEVEX1JPV1MpCisgICAg ICAgICAgICAgICAgICAmJiByb3ctPnVzZWRbYXJlYV0pCisgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+d3JpdGVfZ2x5cGhzICh3LCByb3csIHJvdy0+ Z2x5cGhzW2FyZWFdLCBhcmVhLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICByb3ctPnVzZWRbYXJlYV0pOworICAgICAgICAgICAgICAgICAgRlJBTUVfUklG IChmKS0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHJvdywgYXJlYSwgLTEpOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICByb3ctPm92ZXJsYXBwZWRfcCA9IDA7Cisg ICAgICAgIH0KKyAgICAgIGlmIChNQVRSSVhfUk9XX0JPVFRPTV9ZIChyb3cpID49IHliKQorICAg ICAgICBicmVhazsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAg ICByZWRyYXdfb3ZlcmxhcHBpbmdfcm93cyAodywgeWIpOwogCSAgICB9CiAjZW5kaWYKQEAgLTM1 MzYsOCArNTQ4NywyMCBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZv cmNlX3ApCiAjZW5kaWYKIAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQorCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmIChCVUZGRVJQ ICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNyb3NzaGFpcnMpKSkKKyAgICBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHcsIDApOwor ICAgIGVsc2UKICAgICAgIHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgMCk7CiAKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgICAgIC8qIEVuZCB0aGUgdXBkYXRlIG9mIHdpbmRvdyBX LiAgRG9uJ3Qgc2V0IHRoZSBjdXJzb3IgaWYgd2UKICAgICAgICAgIHBhdXNlZCB1cGRhdGluZyB0 aGUgZGlzcGxheSBiZWNhdXNlIGluIHRoaXMgY2FzZSwKICAgICAgICAgIHNldF93aW5kb3dfY3Vy c29yX2FmdGVyX3VwZGF0ZSBoYXNuJ3QgYmVlbiBjYWxsZWQsIGFuZApkaWZmIC0tZ2l0IGEvc3Jj L2ZyYW1lLmggYi9zcmMvZnJhbWUuaAppbmRleCBmYTQ1YTMyLi41M2FkMTMxIDEwMDY0NAotLS0g YS9zcmMvZnJhbWUuaAorKysgYi9zcmMvZnJhbWUuaApAQCAtMjA1LDYgKzIwNSwxNiBAQCBzdHJ1 Y3QgZnJhbWUKICAgTGlzcF9PYmplY3QgdG9vbF9iYXJfaXRlbXM7CiAgIC8qIHRvb2xfYmFyX2l0 ZW1zIHNob3VsZCBiZSB0aGUgbGFzdCBMaXNwX09iamVjdCBtZW1iZXIuICAqLwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIE5vbi1u aWwgd2hlbiB0aGUgZnJhbWUgaXMgaW4gdGhlIHByb2Nlc3Mgb2YgYmVpbmcgdXBkYXRlZC4gKi8K KyAgc3RydWN0IGZyYW1lICptY191cGRhdGluZ19mcmFtZTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAvKiBDYWNoZSBvZiByZWFsaXplZCBmYWNlcy4gICovCiAgIHN0cnVjdCBm YWNlX2NhY2hlICpmYWNlX2NhY2hlOwogCmRpZmYgLS1naXQgYS9zcmMvZnJpbmdlLmMgYi9zcmMv ZnJpbmdlLmMKaW5kZXggZDBkNTk5Mi4uMjUyZWRhYyAxMDA2NDQKLS0tIGEvc3JjL2ZyaW5nZS5j CisrKyBiL3NyYy9mcmluZ2UuYwpAQCAtNDM3LDggKzQzNyw0NjIgQEAgc3RhdGljIHVuc2lnbmVk IHNob3J0IGVtcHR5X2xpbmVfYml0c1tdID0gewogI2RlZmluZSBTVEFOREFSRF9CSVRNQVBfSEVJ R0hUKGJpdHMpIChzaXplb2YgKGJpdHMpL0JZVEVTX1BFUl9CSVRNQVBfUk9XKQogI2RlZmluZSBG UkJJVFMoYml0cykgIGJpdHMsIFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGJpdHMpCiAKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8q IGArLWZyaW5nZS1oZWxwZXItZGVjaW1hbCcgZGVmaW5lZCBpbiBgY3Jvc3NoYWlycy5lbGAgKi8K KworLyogVE9ETzogIENvbnNpZGVyIGFkZGluZyB0aGUgZm9sbG93aW5nIGZyaW5nZSBiaXRtYXBz OgorICAoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJ2JyZWFrcG9pbnQgIlx4M2NceDdlXHhmZlx4ZmZc eGZmXHhmZlx4N2VceDNjIikKKyAgKGRlZmluZS1mcmluZ2UtYml0bWFwICdob2xsb3ctcmlnaHQt dHJpYW5nbGUgIlx4ZTBceDkwXHg4OFx4ODRceDg0XHg4OFx4OTBceGUwIikgKi8KKworLyogMjQK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAi eC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54 eHh4eHgiCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4ueHgu Li4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4i KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3df Yml0c1tdID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4OTgsIDB4OGMsIDB4ODYsIDB4YmYsCisg IDB4YmYsIDB4ODYsIDB4OGMsIDB4OTgsIDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAyNQorICAg ICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIu Li4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIueHguLi54eCIKKyAgICAgICIuLnh4 Li54eCIKKyAgICAgICIuLi54eC54eCIKKyAgICAgICJ4eHh4eHh4eCIKKyAgICAgICJ4eHh4eHh4 eCIKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIuLnh4Li54eCIKKyAgICAgICIueHguLi54eCIK KyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIpCisq Lworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcl9yaWdodF9h cnJvd19iaXRzW10gPXsKKyAgMHgzLCAweDMsIDB4MywgMHg2MywgMHgzMywgMHgxYiwgMHhmZiwg MHhmZiwgMHgxYiwgMHgzMywgMHg2MywgMHgzLCAweDMsIDB4M307CisKKy8qIDI2CisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4eHh4eHh4IgorICAgICAgInguLi4u Li54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLnh4Li54IgorICAgICAgInguLi54eC54 IgorICAgICAgInguLi4ueHh4IgorICAgICAgIngueHh4eHh4IgorICAgICAgIngueHh4eHh4Igor ICAgICAgInguLi4ueHh4IgorICAgICAgInguLi54eC54IgorICAgICAgInguLnh4Li54IgorICAg ICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInh4eHh4eHh4IikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvd19iaXRz W10gPXsKKyAgMHhmZiwgMHg4MSwgMHg4MSwgMHg5OSwgMHg4ZCwgMHg4NywgMHhiZiwKKyAgMHhi ZiwgMHg4NywgMHg4ZCwgMHg5OSwgMHg4MSwgMHg4MSwgMHhmZn07CisKKy8qIDI3CisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4eHh4eHh4IgorICAgICAgInguLi4u Lnh4IgorICAgICAgInguLi4uLnh4IgorICAgICAgIngueHguLnh4IgorICAgICAgInguLnh4Lnh4 IgorICAgICAgInguLi54eHh4IgorICAgICAgInh4eHh4eHh4IgorICAgICAgInh4eHh4eHh4Igor ICAgICAgInguLi54eHh4IgorICAgICAgInguLnh4Lnh4IgorICAgICAgIngueHguLnh4IgorICAg ICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IgorICAgICAgInh4eHh4eHh4IikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9h cnJvd19iaXRzW10gPXsKKyAgMHhmZiwgMHg4MSwgMHg4MSwgMHhiMSwgMHg5OSwgMHg4ZCwgMHhm ZiwKKyAgMHhmZiwgMHg4ZCwgMHg5OSwgMHhiMSwgMHg4MSwgMHg4MSwgMHhmZn07CisKKy8qIDI4 CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4eHh4eHh4IgorICAg ICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAg InguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgIngu Li4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4u Li54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInh4eHh4eHh4 IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfaG9sbG93X3JlY3RhbmdsZV9iaXRzW10g PXsKKyAgMHhmZiwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwKKyAgMHg4MSwg MHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHhmZn07CisKKy8qIDI5CisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4u IgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgor ICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAg ICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAg InguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIikKKyovCitzdGF0 aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX2JpdHNbXSA9eworICAweDgwLCAweDgw LCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLAorICAweDgwLCAweDgwLCAweDgwLCAweDgw LCAweDgwLCAweDgwLCAweDgwfTsKKworLyogMzAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4u eHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgi CisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisg ICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAg ICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY19yZXZlcnNlZF92ZXJ0aWNhbF9iYXJfYml0c1tdID17CisgIDB4MywgMHgzLCAweDMsIDB4 MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzfTsKKwor LyogMzEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHguLi4uLi4i CisgICAgICAieHguLi4uLi4iCisgICAgICAiIHh4Li4uLi4iCisgICAgICAiLnh4Li4uLi4iCisg ICAgICAiLi54eC4uLi4iCisgICAgICAiLi54eC4uLi4iCisgICAgICAiLi4ueHguLi4iCisgICAg ICAiLi4ueHguLi4iCisgICAgICAiLi4uLnh4Li4iCisgICAgICAiLi4uLnh4Li4iCisgICAgICAi Li4uLi54eC4iCisgICAgICAiLi4uLi54eC4iCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4u Li4ueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19iYWNrc2xhc2hfYml0c1tdID17 CisgIDB4YzAsIDB4YzAsIDB4ZTAsIDB4NjAsIDB4MzAsIDB4MzAsIDB4MTgsIDB4MTgsIDB4Yywg MHhjLCAweDYsIDB4NiwgMHgzLCAweDN9OworCisvKiAzMgorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICJ4 eHguLi4uLiIKKyAgICAgICJ4eHguLi4uLiIKKyAgICAgICJ4Lnh4Li4uLiIKKyAgICAgICJ4Lnh4 Li4uLiIKKyAgICAgICJ4Li54eC4uLiIKKyAgICAgICJ4Li54eC4uLiIKKyAgICAgICJ4Li4ueHgu LiIKKyAgICAgICJ4Li4ueHguLiIKKyAgICAgICJ4Li4uLnh4LiIKKyAgICAgICJ4Li4uLnh4LiIK KyAgICAgICJ4Li4uLi54eCIKKyAgICAgICJ4Li4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVk IHNob3J0IG1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2hfYml0c1tdID17CisgIDB4YzAsIDB4YzAs IDB4ZTAsIDB4ZTAsIDB4YjAsIDB4YjAsIDB4OTgsCisgIDB4OTgsIDB4OGMsIDB4OGMsIDB4ODYs IDB4ODYsIDB4ODMsIDB4ODN9OworCisvKiAzMworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRl Y2ltYWwKKyAgICAgICIueHh4eHh4LiIKKyAgICAgICJ4eHh4LnguLiIKKyAgICAgICJ4eHh4Lngu LiIKKyAgICAgICJ4eHh4LnguLiIKKyAgICAgICIueHh4LnguLiIKKyAgICAgICIuLi54LnguLiIK KyAgICAgICIuLi54LnguLiIKKyAgICAgICIuLi54LnguLiIKKyAgICAgICIuLi54LnguLiIKKyAg ICAgICIuLi54LnguLiIKKyAgICAgICIuLi54LnguLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNo b3J0IG1jX3BpbGNyb3dfYml0c1tdID17CisgIDB4N2UsIDB4ZjQsIDB4ZjQsIDB4ZjQsIDB4NzQs IDB4MTQsIDB4MTQsIDB4MTQsIDB4MTQsIDB4MTQsIDB4MTR9OworCisvKiAzNAorICAgICgrLWZy aW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLnh4eHguLiIKKyAgICAgICIueHh4eHh4 LiIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAgICJ4eHh4eHh4eCIK KyAgICAgICJ4eC4uLi54eCIKKyAgICAgICJ4eHguLnh4eCIKKyAgICAgICIueHh4eHh4LiIKKyAg ICAgICIuLnh4eHguLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NtaWxleV9mYWNl X2JpdHNbXSA9eworICAweDNjLCAweDdlLCAweDk5LCAweDk5LCAweGZmLCAweGMzLCAweGU3LCAw eDdlLCAweDNjfTsKKworLyogMzUKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAiLi54Li4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLnguLi4iCisgICAg ICAiLi4uLi54Li4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAi Li54Li4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfcmln aHRfYml0c1tdID17CisgIDB4MjAsIDB4MTAsIDB4OCwgMHg0LCAweDgsIDB4MTAsIDB4MjB9Owor CisvKiAzNgorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLngu LiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLnguLi4uLiIK KyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi4uLnguLiIpCisq Lworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9ewor ICAweDQsIDB4OCwgMHgxMCwgMHgyMCwgMHgxMCwgMHg4LCAweDR9OworCisvKiAzNworICAgICgr LWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC54eC4uLiIKKyAgICAgICIueHgu eHguLiIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIuLnh4Lnh4 LiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICJ4eC54eC4uLiIpCisqLworc3RhdGljIHVuc2ln bmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9yaWdodF9iaXRzW10gPXsKKyAgMHhkOCwgMHg2Yywg MHgzNiwgMHgxYiwgMHgzNiwgMHg2YywgMHhkOH07CisKKy8qIDM4CisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgueHguIgorICAg ICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54eC54eC4uIgorICAgICAg Ii4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfZG91YmxlX2FuZ2xlX2xlZnRfYml0c1tdID17CisgIDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDgs IDB4NmMsIDB4MzYsIDB4MWJ9OworCisvKiAzOQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRl Y2ltYWwKKyAgICAgICJ4LngueC4uLiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICIuLngueC54 LiIKKyAgICAgICIuLi54LngueCIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIueC54LnguLiIK KyAgICAgICJ4LngueC4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9h bmdsZV9yaWdodF9iaXRzW10gPXsKKyAgMHhhOCwgMHg1NCwgMHgyYSwgMHgxNSwgMHgyYSwgMHg1 NCwgMHhhOH07CisKKy8qIDQwCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgIi4uLngueC54IgorICAgICAgIi4ueC54LnguIgorICAgICAgIi54LngueC4uIgorICAgICAg IngueC54Li4uIgorICAgICAgIi54LngueC4uIgorICAgICAgIi4ueC54LnguIgorICAgICAgIi4u LngueC54IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX2xlZnRf Yml0c1tdID17CisgIDB4MTUsIDB4MmEsIDB4NTQsIDB4YTgsIDB4NTQsIDB4MmEsIDB4MTV9Owor CisvKiA0MQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4u LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAg ICAgICJ4Li4uLi54LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAg ICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0 IG1jX3NpbmdsZV9hbmdsZV91cF9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwg MHgxMCwgMHgyOCwgMHg0NCwgMHg4MiwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQy CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAg InguLi4uLnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi4u LnguLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4u Li4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2lu Z2xlX2FuZ2xlX2Rvd25fYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4ODIs IDB4NDQsIDB4MjgsIDB4MTAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiA0MworICAg ICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVk IHNob3J0IG1jX2RvdWJsZV9hbmdsZV91cF9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwg MHgxMCwgMHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwgMHg0NCwgMHg4MiwgMHgwMCwgMHgwMCwgMHgw MH07CisKKy8qIDQ0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgInguLi4u LnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgInguLnguLngu IgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi4uLnguLi4uIgor ICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX2Rvd25fYml0c1tdID17Cisg IDB4MDAsIDB4MDAsIDB4MDAsIDB4ODIsIDB4NDQsIDB4MjgsIDB4OTIsIDB4NDQsIDB4MjgsIDB4 MTAsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiA0NQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4 YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIuLi4uLi4uLiIpCisq Lworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV91cF9iaXRzW10gPXsKKyAg MHgwMCwgMHgxMCwgMHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwgMHg0 NCwgMHg4MiwgMHgwMH07CisKKy8qIDQ2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1h bAorICAgICAgIi4uLi4uLi4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi54Li4ueC4uIgor ICAgICAgIi4ueC54Li4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgIi4ueC54Li4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAg Ii4ueC54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0 aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1cGxlX2FuZ2xlX2Rvd25fYml0c1tdID17CisgIDB4 MDAsIDB4ODIsIDB4NDQsIDB4MjgsIDB4OTIsIDB4NDQsIDB4MjgsIDB4OTIsIDB4NDQsIDB4Mjgs IDB4MTAsIDB4MDB9OworCisvKiA0NworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAg ICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4 Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li4u Li54Li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N0IGJpdG1hcCwgaW50IHJpZ2h0X3As IGludCBwYXJ0aWFsX3ApCit7CisgIExpc3BfT2JqZWN0IGNtYXAsIGJtMSA9IFFuaWwsIGJtMiA9 IFFuaWwsIGJtOworICBFTUFDU19JTlQgbG4xID0gMCwgbG4yID0gMDsKKyAgaW50IGl4MSA9IHJp Z2h0X3A7CisgIGludCBpeDIgPSBpeDEgKyAocGFydGlhbF9wID8gMiA6IDApOworICBpZiAoKGNt YXAgPSBCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3Qp KSwgIU5JTFAgKGNtYXApKQorICAgIHsKKyAgICAgIGJtMSA9IG1jX2Fzc3EgKGJpdG1hcCwgY21h cCk7CisgICAgICBpZiAoQ09OU1AgKGJtMSkpCisgIHsKKyAgICBpZiAoKGJtMSA9IFhDRFIgKGJt MSkpLCBOSUxQIChibTEpKQorICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAg aWYgKENPTlNQIChibTEpKQorICAgICAgeworICAgICAgICBsbjEgPSBYRklYTlVNIChGbGVuZ3Ro IChibTEpKTsKKyAgICAgICAgaWYgKHBhcnRpYWxfcCkKKyAgICAgICAgICB7CisgICAgICAgICAg ICBpZiAobG4xID4gaXgyKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYm0gPSBt Y19udGggKGl4MiwgYm0xKTsKKyAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAg ICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0K KyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChsbjEgPiBp eDEpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgYm0gPSBtY19udGggKGl4 MSwgYm0xKTsKKyAgICAgICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAg ICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQor ICAgICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJtMSwgIUVRIChibSwgUXQpKSkKKyAgICAgIGdv dG8gZm91bmQ7CisgIH0KKyAgICB9CisgIGlmICghRVEgKGNtYXAsIEJWQVIgKCZidWZmZXJfZGVm YXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKCZi dWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKSkKKyAgICB7CisgICAgICBi bTIgPSBtY19hc3NxIChiaXRtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRp Y2F0b3JfYWxpc3QpKTsKKyAgICAgIGlmIChDT05TUCAoYm0yKSkKKyAgICAgICAgeworICAgICAg ICAgIGlmICgoYm0yID0gWENEUiAoYm0yKSksICFOSUxQIChibTIpKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBpZiAoQ09OU1AgKGJtMikpCisgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgbG4yID0gWEZJWE5VTSAoRmxlbmd0aCAoYm0yKSk7CisgICAgICAgICAgICAg ICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgICAgICAgaWYgKGxuMiA+IGl4MikKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgYm0gPSBtY19udGggKGl4MiwgYm0yKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgfQorICBpZiAobG4xID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJt MSk7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICBnb3RvIGZvdW5kOworICAgIH0K KyAgaWYgKGxuMiA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IG1jX250aCAoaXgxLCBibTIpOwor ICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgZ290byBmb3VuZDsKKyAgICAgIHJldHVy biBNQ19OT19GUklOR0VfQklUTUFQOworICAgIH0KKyAgICBlbHNlIGlmICgoYm0gPSBibTIsIE5J TFAgKGJtKSkpCisgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgZm91bmQ6Cisg IHJldHVybiBsb29rdXBfZnJpbmdlX2JpdG1hcCAoYm0pOworfQorCitzdGF0aWMgaW50CittY19n ZXRfbG9naWNhbF9jdXJzb3JfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCBj dXJzb3IpCit7CisgIExpc3BfT2JqZWN0IGNtYXAsIGJtID0gUW5pbDsKKyAgaWYgKChjbWFwID0g QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmcmluZ2VfY3Vyc29yX2FsaXN0KSksICFOSUxQ IChjbWFwKSkKKyAgICB7CisgICAgICBibSA9IG1jX2Fzc3EgKGN1cnNvciwgY21hcCk7CisgICAg ICBpZiAoQ09OU1AgKGJtKSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgoYm0gPSBYQ0RSIChi bSkpLCBOSUxQIChibSkpCisgICAgICAgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsK KyAgICAgICAgICByZXR1cm4gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJtKTsKKyAgICAgICAgfQor ICAgIH0KKyAgaWYgKEVRIChjbWFwLCBCVkFSICgmY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W5nIGlzIG5vdCBwcmVzZW50IG9yIHQs IHVzZSBnbG9iYWwgdmFsdWUuCisgICAgIElmIHBhcnRpYWwsIGxvb2t1cCBwYXJ0aWFsIGJpdG1h cCBpbiBkZWZhdWx0IHZhbHVlIGlmIG5vdCBmb3VuZCBoZXJlLgorICAgICBJZiBub3QgcGFydGlh bCwgb3Igbm8gcGFydGlhbCBzcGVjIGlzIHByZXNlbnQsIHVzZSBub24tcGFydGlhbCBiaXRtYXAu ICovCisgIGlmICgoY21hcCA9IEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZnJpbmdlX2lu ZGljYXRvcl9hbGlzdCkpLCAhTklMUCAoY21hcCkpCisgICAgeworICAgICAgYm0xID0gbWNfYXNz cSAoYml0bWFwLCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAgICAgICAgeworICAg ICAgICAgIGlmICgoYm0xID0gWENEUiAoYm0xKSksIE5JTFAgKGJtMSkpCisgICAgICAgICAgICBy ZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICBpZiAoQ09OU1AgKGJtMSkpCisg ICAgICAgICAgICB7CisgICAgICAgICAgICAgIGxuMSA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMSkp OworICAgICAgICAgICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgIGlmIChsbjEgPiBpeDIpCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgyLCBibTEpOworICAgICAgICAgICAgICAg ICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGZv dW5kOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYg KGxuMSA+IGl4MSkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg ICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOworICAgICAgICAgICAgICAgICAgICAgICAgaWYg KCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAg ICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 CisgICAgICAgICAgICBlbHNlIGlmICgoYm0gPSBibTEsICFFUSAoYm0sIFF0KSkpCisgICAgICAg ICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgIH0KKyAgICB9CisgIGlmICghRVEgKGNtYXAsIEJW QVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKQorICAgICAgJiYg IU5JTFAgKEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKSkK KyAgICB7CisgICAgICBibTIgPSBtY19hc3NxIChiaXRtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVs dHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsKKyAgICAgIGlmIChDT05TUCAoYm0yKSkKKyAg ICAgICAgeworICAgICAgICAgIGlmICgoYm0yID0gWENEUiAoYm0yKSksICFOSUxQIChibTIpKQor ICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoQ09OU1AgKGJtMikpCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgbG4yID0gWEZJWE5VTSAoRmxlbmd0aCAoYm0yKSk7 CisgICAgICAgICAgICAgICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICAgICAgaWYgKGxuMiA+IGl4MikKKyAgICAgICAgICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgYm0gPSBtY19udGggKGl4MiwgYm0y KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgfQorICBpZiAobG4xID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0g bWNfbnRoIChpeDEsIGJtMSk7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICBnb3Rv IGZvdW5kOworICAgIH0KKyAgaWYgKGxuMiA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IG1jX250 aCAoaXgxLCBibTIpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgZ290byBmb3Vu ZDsKKyAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICAgIH0KKyAgICBlbHNlIGlm ICgoYm0gPSBibTIsIE5JTFAgKGJtKSkpCisgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1B UDsKKyAgZm91bmQ6CisgIHJldHVybiBsb29rdXBfZnJpbmdlX2JpdG1hcCAoYm0pOworfQorCisv KiBSZWNhbGN1bGF0ZSB0aGUgYml0bWFwcyB0byBzaG93IGluIHRoZSBmcmluZ2VzIG9mIHdpbmRv dyBXLgorICAgT25seSBtYXJrIHJvd3Mgd2l0aCBtb2RpZmllZCBiaXRtYXBzIGZvciB1cGRhdGUg aW4gcmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AuCisgICBJZiBLRUVQX0NVUlJFTlRfUCBpcyAwLCB1 cGRhdGUgY3VycmVudF9tYXRyaXggdG9vLiAqLworYm9vbAorbWNfdXBkYXRlX3dpbmRvd19mcmlu Z2VzIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGtlZXBfY3VycmVudF9wKQoreworICBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3csICpjdXIgPSAwOworICBpbnQgeWIgPSB3aW5kb3dfdGV4dF9ib3R0b21f eSAodyk7CisgIGludCBybiwgbnJvd3MgPSB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3M7CisgIGlu dCB5OworICBib29sIHJlZHJhd19wID0gMDsKKyAgTGlzcF9PYmplY3QgYm91bmRhcnlfdG9wID0g UW5pbCwgYm91bmRhcnlfYm90ID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgYXJyb3dfdG9wID0gUW5p bCwgYXJyb3dfYm90ID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgZW1wdHlfcG9zOworICBMaXNwX09i amVjdCBpbmQgPSBRbmlsOworI2RlZmluZSBNQVhfQklUTUFQX0NBQ0hFICg4KjQpCisgIGludCBi aXRtYXBfY2FjaGVbTUFYX0JJVE1BUF9DQUNIRV07CisgIGludCB0b3BfaW5kX3JuLCBib3RfaW5k X3JuOworICBpbnQgdG9wX2luZF9taW5feSwgYm90X2luZF9tYXhfeTsKKyAgLyogdG9wX2luZF9y biBpcyBzZXQgdG8gYSBub25uZWdhdGl2ZSB2YWx1ZSB3aGVuZXZlcgorICAgICByb3ctPmluZGlj YXRlX2JvYl9wIGlzIHNldCwgc28gaXQncyBPSyB0aGF0IHRvcF9yb3dfZW5kc19hdF96dl9wCisg ICAgIGlzIG5vdCBpbml0aWFsaXplZCBoZXJlLiAgU2ltaWxhcmx5IGZvciBib3RfaW5kX3JuLAor ICAgICByb3ctPmluZGljYXRlX2VvYl9wIGFuZCBib3Rfcm93X2VuZHNfYXRfenZfcC4gKi8KKyAg aW50IHRvcF9yb3dfZW5kc19hdF96dl9wIE1DX0lGX0xJTlQgKD0gMCksIGJvdF9yb3dfZW5kc19h dF96dl9wIE1DX0lGX0xJTlQgKD0gMCk7CisgIGlmICh3LT5wc2V1ZG9fd2luZG93X3ApCisgICAg cmV0dXJuIDA7CisgIGlmICghTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmIChpbmQgPSBCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGluZGljYXRlX2J1ZmZlcl9ib3VuZGFyaWVzKSwgIU5J TFAgKGluZCkpKQorICAgIHsKKyAgICAgIGlmIChFUSAoaW5kLCBRbGVmdCkgfHwgRVEgKGluZCwg UXJpZ2h0KSkKKyAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90ID0gYXJyb3dfdG9w ID0gYXJyb3dfYm90ID0gaW5kOworICAgICAgICBlbHNlIGlmIChDT05TUCAoaW5kKQorICAgICAg ICAgICAgICAgICAmJiBDT05TUCAoWENBUiAoaW5kKSkpCisgICAgICAgIHsKKyAgICAgICAgICBM aXNwX09iamVjdCBwb3M7CisgICAgICAgICAgaWYgKHBvcyA9IG1jX2Fzc3EgKFF0LCBpbmQpLCAh TklMUCAocG9zKSkKKyAgICAgICAgICAgIGJvdW5kYXJ5X3RvcCA9IGJvdW5kYXJ5X2JvdCA9IGFy cm93X3RvcCA9IGFycm93X2JvdCA9IFhDRFIgKHBvcyk7CisgICAgICAgICAgaWYgKHBvcyA9IG1j X2Fzc3EgKFF0b3AsIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAgICAgYm91bmRhcnlfdG9w ID0gWENEUiAocG9zKTsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAoUWJvdHRvbSwgaW5k KSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBib3VuZGFyeV9ib3QgPSBYQ0RSIChwb3MpOwor ICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRdXAsIGluZCksICFOSUxQIChwb3MpKQorICAg ICAgICAgICAgYXJyb3dfdG9wID0gWENEUiAocG9zKTsKKyAgICAgICAgICBpZiAocG9zID0gbWNf YXNzcSAoUWRvd24sIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAgICAgYXJyb3dfYm90ID0g WENEUiAocG9zKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgLyogQW55dGhp bmcgZWxzZSBtZWFucyBib3VuZGFyeSBvbiBsZWZ0IGFuZCBubyBhcnJvd3MuICovCisgICAgICAg ICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90ID0gUWxlZnQ7CisgICAgfQorICB0b3BfaW5k X3JuID0gYm90X2luZF9ybiA9IC0xOworICBpZiAoIU5JTFAgKGluZCkpCisgICAgeworICAgICAg Zm9yICh5ID0gdy0+dnNjcm9sbCwgcm4gPSAwOworICAgICAgICAgICB5IDwgeWIgJiYgcm4gPCBu cm93czsKKyAgICAgICAgICAgeSArPSByb3ctPmhlaWdodCwgKytybikKKyAgICAgICAgeworICAg ICAgICAgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgaWYg KCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIHJvdyA9IHctPmN1cnJlbnRfbWF0cml4LT5y b3dzICsgcm47CisgICAgICAgICAgcm93LT5pbmRpY2F0ZV9ib2JfcCA9IHJvdy0+aW5kaWNhdGVf dG9wX2xpbmVfcCA9IDA7CisgICAgICAgICAgcm93LT5pbmRpY2F0ZV9lb2JfcCA9IHJvdy0+aW5k aWNhdGVfYm90dG9tX2xpbmVfcCA9IDA7CisgICAgICAgICAgaWYgKCFyb3ctPm1vZGVfbGluZV9w KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAodG9wX2luZF9ybiA8IDAgJiYgcm93 LT52aXNpYmxlX2hlaWdodCA+IDApCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgaWYgKE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KSA8PSBCVUZfQkVHViAoWEJVRkZF UiAody0+Y29udGVudHMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFNQVRSSVhfUk9XX1BB UlRJQUxMWV9WSVNJQkxFX0FUX1RPUF9QICh3LCByb3cpKQorICAgICAgICAgICAgICAgICAgICBy b3ctPmluZGljYXRlX2JvYl9wID0gIU5JTFAgKGJvdW5kYXJ5X3RvcCk7CisgICAgICAgICAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICByb3ctPmluZGljYXRlX3RvcF9saW5l X3AgPSAhTklMUCAoYXJyb3dfdG9wKTsKKyAgICAgICAgICAgICAgICAgIHRvcF9pbmRfcm4gPSBy bjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGlmIChib3RfaW5kX3JuIDwgMCkK KyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAoTUFUUklYX1JPV19FTkRf Q0hBUlBPUyAocm93KSA+PSBCVUZfWlYgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSkKKyAgICAgICAg ICAgICAgICAgICAgICAmJiAhTUFUUklYX1JPV19QQVJUSUFMTFlfVklTSUJMRV9BVF9CT1RUT01f UCAodywgcm93KSkKKyAgICAgICAgICAgICAgICAgICAgcm93LT5pbmRpY2F0ZV9lb2JfcCA9ICFO SUxQIChib3VuZGFyeV9ib3QpLCBib3RfaW5kX3JuID0gcm47CisgICAgICAgICAgICAgICAgICAg IGVsc2UgaWYgKHkgKyByb3ctPmhlaWdodCA+PSB5YikKKyAgICAgICAgICAgICAgICAgICAgICBy b3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3AgPSAhTklMUCAoYXJyb3dfYm90KSwgYm90X2luZF9y biA9IHJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg IH0KKyAgZW1wdHlfcG9zID0gQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBpbmRpY2F0ZV9l bXB0eV9saW5lcyk7CisgIGlmICghTklMUCAoZW1wdHlfcG9zKSAmJiAhRVEgKGVtcHR5X3Bvcywg UXJpZ2h0KSkKKyAgICBlbXB0eV9wb3MgPSBXSU5ET1dfTEVGVF9GUklOR0VfV0lEVEggKHcpID09 IDAgPyBRc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CisgICAgICBpbnQgYm4gPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgcm93ID0gdy0+ZGVz aXJlZF9tYXRyaXgtPnJvd3MgKyB0b3BfaW5kX3JuOworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRf cCkKKyAgICAgICAgcm93ID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyB0b3BfaW5kX3JuOwor ICAgICAgdG9wX3Jvd19lbmRzX2F0X3p2X3AgPSByb3ctPmVuZHNfYXRfenZfcDsKKyAgICAgIGlm IChyb3ctPmluZGljYXRlX2JvYl9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKEVRIChib3Vu ZGFyeV90b3AsIFFsZWZ0KSkKKyAgICAgICAgICAgIGJuID0gKChyb3ctPmluZGljYXRlX2VvYl9w ICYmIEVRIChib3VuZGFyeV9ib3QsIFFsZWZ0KSkKKyAgICAgICAgICAgICAgICAgID8gTUNfTEVG VF9GUklOR0UgKDEsIFF0b3BfYm90dG9tLCByb3ctPmVuZHNfYXRfenZfcCkKKyAgICAgICAgICAg ICAgICAgIDogTUNfTEVGVF9GUklOR0UgKDIsIFF0b3AsIDApKTsKKyAgICAgICAgICAgIGVsc2UK KyAgICAgICAgICAgICAgYm4gPSAoKHJvdy0+aW5kaWNhdGVfZW9iX3AgJiYgRVEgKGJvdW5kYXJ5 X2JvdCwgUXJpZ2h0KSkKKyAgICAgICAgICAgICAgICAgICAgPyBNQ19SSUdIVF9GUklOR0UgKDEs IFF0b3BfYm90dG9tLCByb3ctPmVuZHNfYXRfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgOiBN Q19SSUdIVF9GUklOR0UgKDIsIFF0b3AsIDApKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlm IChyb3ctPmluZGljYXRlX3RvcF9saW5lX3ApCisgICAgICAgICAgeworICAgICAgICAgICAgaWYg KEVRIChhcnJvd190b3AsIFFsZWZ0KSkKKyAgICAgICAgICAgICAgYm4gPSBNQ19MRUZUX0ZSSU5H RSAoNiwgUXVwLCAwKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGJuID0g TUNfUklHSFRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgIH0KKyAgICAgIGlmIChibiAh PSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGZyaW5n ZV9iaXRtYXAgKmZiID0gZ2V0X2ZyaW5nZV9iaXRtYXBfZGF0YSAoYm4pOworICAgICAgICAgIGlm IChmYi0+YWxpZ24gPT0gQUxJR05fQklUTUFQX1RPUCAmJiBmYi0+cGVyaW9kID09IDApCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdzE7CisgICAgICAg ICAgICAgIGludCB0b3BfaW5kX21heF95OworICAgICAgICAgICAgICB0b3BfaW5kX21pbl95ID0g V0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgICAgIHRvcF9pbmRfbWF4 X3kgPSB0b3BfaW5kX21pbl95ICsgZmItPmhlaWdodDsKKyAgICAgICAgICAgICAgaWYgKHRvcF9p bmRfbWF4X3kgPiB5YikKKyAgICAgICAgICAgICAgICB0b3BfaW5kX21heF95ID0geWI7CisgICAg ICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSArIHJvdy0+aGVpZ2h0LCBybiA9IHRvcF9pbmRfcm4g KyAxOworICAgICAgICAgICAgICAgICAgIHkgPCB0b3BfaW5kX21heF95ICYmIHJuIDwgbnJvd3M7 CisgICAgICAgICAgICAgICAgICAgeSArPSByb3cxLT5oZWlnaHQsIHJuKyspCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfcm4gPj0gMCAmJiBybiA+PSBi b3RfaW5kX3JuKQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAg IHJvdzEgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgICAgICAgICAg aWYgKCFyb3cxLT5lbmFibGVkX3ApCisgICAgICAgICAgICAgICAgICAgIHJvdzEgPSB3LT5jdXJy ZW50X21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgICAgICAgICAgcm93MS0+aW5kaWNhdGVf Ym9iX3AgPSByb3ctPmluZGljYXRlX2JvYl9wOworICAgICAgICAgICAgICAgICAgcm93MS0+aW5k aWNhdGVfdG9wX2xpbmVfcCA9IHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcDsKKyAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChib3RfaW5kX3Ju ID49IDApCisgICAgeworICAgICAgaW50IGJuID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAg IHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgYm90X2luZF9ybjsKKyAgICAgIGlmICgh cm93LT5lbmFibGVkX3ApCisgICAgICAgIHJvdyA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsg Ym90X2luZF9ybjsKKyAgICAgIGJvdF9yb3dfZW5kc19hdF96dl9wID0gcm93LT5lbmRzX2F0X3p2 X3A7CisgICAgICBpZiAocm93LT5pbmRpY2F0ZV9lb2JfcCkKKyAgICAgICAgeworICAgICAgICAg IGlmIChFUSAoYm91bmRhcnlfYm90LCBRbGVmdCkpCisgICAgICAgICAgICBibiA9IE1DX0xFRlRf RlJJTkdFICgzLCBRYm90dG9tLCByb3ctPmVuZHNfYXRfenZfcCk7CisgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgIGJuID0gTUNfUklHSFRfRlJJTkdFICgzLCBRYm90dG9tLCByb3ctPmVu ZHNfYXRfenZfcCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9i b3R0b21fbGluZV9wKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmIChFUSAoYXJyb3dfYm90 LCBRbGVmdCkpCisgICAgICAgICAgICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDcsIFFkb3duLCAw KTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGJuID0gTUNfUklHSFRfRlJJ TkdFICg3LCBRZG93biwgMCk7CisgICAgICAgICAgfQorICAgICAgaWYgKGJuICE9IE1DX05PX0ZS SU5HRV9CSVRNQVApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCAq ZmIgPSBnZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChibik7CisgICAgICAgICAgaWYgKGZiLT5hbGln biA9PSBBTElHTl9CSVRNQVBfQk9UVE9NICYmIGZiLT5wZXJpb2QgPT0gMCkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93MTsKKyAgICAgICAgICAgICAg aW50IGJvdF9pbmRfbWluX3k7CisgICAgICAgICAgICAgIGJvdF9pbmRfbWF4X3kgPSByb3ctPnkg KyByb3ctPnZpc2libGVfaGVpZ2h0OworICAgICAgICAgICAgICBib3RfaW5kX21pbl95ID0gYm90 X2luZF9tYXhfeSAtIGZiLT5oZWlnaHQ7CisgICAgICAgICAgICAgIGlmIChib3RfaW5kX21pbl95 IDwgV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodykpCisgICAgICAgICAgICAgICAgYm90X2lu ZF9taW5feSA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgICAgICAgICBm b3IgKHkgPSByb3ctPnksIHJuID0gYm90X2luZF9ybiAtIDE7CisgICAgICAgICAgICAgICAgICAg eSA+PSBib3RfaW5kX21pbl95ICYmIHJuID49IDA7CisgICAgICAgICAgICAgICAgICAgeSAtPSBy b3cxLT5oZWlnaHQsIHJuLS0pCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg aWYgKHRvcF9pbmRfcm4gPj0gMCAmJiBybiA8PSB0b3BfaW5kX3JuKQorICAgICAgICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgIHJvdzEgPSB3LT5kZXNpcmVkX21hdHJpeC0+ cm93cyArIHJuOworICAgICAgICAgICAgICAgICAgaWYgKCFyb3cxLT5lbmFibGVkX3ApCisgICAg ICAgICAgICAgICAgICAgIHJvdzEgPSB3LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHJuOworICAg ICAgICAgICAgICAgICAgcm93MS0+aW5kaWNhdGVfZW9iX3AgPSByb3ctPmluZGljYXRlX2VvYl9w OworICAgICAgICAgICAgICAgICAgcm93MS0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCA9IHJvdy0+ aW5kaWNhdGVfYm90dG9tX2xpbmVfcDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICB9CisgIGJvb2wgYXV0b19oc2Nyb2xsX21vZGVfcCA9IEVRIChGYnVm ZmVyX2xvY2FsX3ZhbHVlIChRYXV0b19oc2Nyb2xsX21vZGUsIHctPmNvbnRlbnRzKSwgUWN1cnJl bnRfbGluZSk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSkgKi8KKyAgYm9vbCBoc2Ns X2FsbF90ZW1wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5f aHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gbm90aGluZy4g Ki8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAg Qy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgZWxzZSBiZXNpZGVzIGhvcml6b250YWxseSBzY3Jv bGxpbmcgdGhlCisgICAgICAgICAgICAgICBjdXJyZW50IGxpbmUgZGlmZmVyZW50bHkuCisgICAg ICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRp ZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMV9wID0gKCF3LT5zdXNwZW5kX2F1 dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9t b2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3JvbGwpOworICAv KiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCAuLi4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGlu ZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wg aHNjbF9hbGxfcGVybV8yX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPT0gMAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1s ZWZ0IDUpOyBhbmQsIHRoZW4gcHJlc3MgdGhlIGxlZnQgYXJyb3cga2V5IG9uZSB0aW1lLgorICAg ICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZl cmVudGx5LiovCisgIGJvb2wgaHNjbF90ZW1wX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xs CisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAg ICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNv bWV0aGluZyB0aGF0IGNhdXNlcyB0aGUgY3VycmVudCBsaW5lIHRvIGJlCisgICAgICAgICAgICAg ICBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJy ZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJv b2wgaHNjbF9wZXJtX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAg ICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICYm IHctPmhzY3JvbGwgPiAwCisgICAgICAgICA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ZBQ0VfSUQsIHRy dWUpCisgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgPyBsb29rdXBfZGVy aXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctcHJlLXp2LWZhY2UiKSwg RlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAg ICAgICAgICBtY19sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRf RlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gb3Zl cmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICBpZiAody0+aHNjcm9sbCAhPSAwKQorICAgICAg ICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIr LW92ZXJsYXktYXJyb3ciKSwgZmFsc2UsIHRydWUpOworICAgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAo Iistb3ZlcmxheS1hcnJvdyIpLCB0cnVlLCB0cnVlKTsKKyAgICAgICAgICBtY19sZWZ0X2ZyaW5n ZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICB9 CisgICAgICAgIGVsc2UgaWYgKCh2cG9zID09IHZudGhfZG0gfHwgdnBvcyA9PSB2bnRoX2NtKQor ICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgPT0gTUNfT1ZFUkxBWV9BUlJPV19CSVRN QVAKKyAgICAgICAgICAgICAgICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICAgICAg ICAgICAgfHwgaHNjbF9hbGxfcGVybV8wX3AKKyAgICAgICAgICAgICAgICAgICAgIHx8IGhzY2xf YWxsX3Blcm1fMV9wCisgICAgICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAor ICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF90ZW1wX3AKKyAgICAgICAgICAgICAgICAgICAg IHx8IGhzY2xfcGVybV9wKQorICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAg ICAgeworICAgICAgICAgICAgaW50IGZyaW5nZV9iaXRtYXAgPSBNQ19OT19GUklOR0VfQklUTUFQ OworICAgICAgICAgICAgZW51bSBmYWNlX2lkIG92ZXJsYXlfYXJyb3dfZmFjZV9pZCA9CisgICAg ICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICAgICAgICAg PyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNj bC1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAg ICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1wcmUtenYtZmFjZSIpLCBGUklO R0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAg ICAgICAgICBtY19sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRf RlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBv dmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgICAgICBpZiAoaHNjbF9hbGxfcGVybV8wX3Ap CisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywg aW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICAgICAgZWxz ZSBpZiAoaHNjbF9hbGxfcGVybV8xX3ApCisgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9 IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCB0cnVlLCBm YWxzZSk7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9hbGxfcGVybV8yX3ApCisgICAg ICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGlu dGVybiAoIistaHNjbC1wZXJtIiksIGZhbHNlLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIGVs c2UgaWYgKGhzY2xfcGVybV9wKQorICAgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0g bWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUsIHRy dWUpOworICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF90ZW1wX3ApCisgICAg ICAgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3 LCBpbnRlcm4gKCIrLWhzY2wtdGVtcCIpLCBmYWxzZSwgZmFsc2UpOworICAgICAgICAgICAgICAg ICAgICAgIGVsc2UgaWYgKGhzY2xfdGVtcF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgZnJp bmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtdGVt cCIpLCB0cnVlLCBmYWxzZSk7CisgICAgICAgICAgICBtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAo Y3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICB9CisgICAg ICAgICAgZWxzZSBpZiAoKHZwb3MgPT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAg ICAgICAgICAgICAgICAgICYmIChnbHlwaF9mbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9S SUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisgICAgICAgICAg ICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FS Uk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJT RURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBn bHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICB8 fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAg ICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkK KyAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGdseXBoX2ZsYXZvciA9PSBNQ19I T0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBRbWNfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvdworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX2hvbGxvd19yZWN0YW5n bGVfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0g TUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19S RVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcl9yaWdodF9h cnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhf Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElD QUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFt Y19yZXZlcnNlZF92ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNh bF9iYXJfYmFja3NsYXNoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IFFuaWw7CisgICAgICAgICAgICAgIG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29y X3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfTk9fRlJJTkdFX0JJ VE1BUDsKKyAgICAgICAgICAgICAgbWNfcmlnaHRfZnJpbmdlX2ZhY2VfaWQgPQorICAgICAgICAg ICAgICAgIChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAgICAgICAg ICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYKKyAgICAgICAgICAgICAgICAgJiYgKGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisg ICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElD QUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3Ig PT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKSkKKyAgICAgICAgICAgICAgICAgID8gbG9va3Vw X2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2Ui KSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAgICAgOiAoY3Vyc29yX3R5cGUg PT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICYmIHJvd19wb3Np dGlvbiA9PSBBVF9aVgorICAgICAgICAgICAgICAgICAgICYmIChnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FS Uk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1hdC16di1mYWNlIiksIEZSSU5HRV9GQUNF X0lELCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZS SU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUE9TVF9a VgorICAgICAgICAgICAgICAgICAgICYmIChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9M TE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlw aF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRl cm4gKCIrLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUp CisgICAgICAgICAgICAgICAgOiAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1B UAorICAgICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYKKyAgICAgICAg ICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdM RV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19S RVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAmJiBn bHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAg ICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJhci1wcmUtenYtZmFj ZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlw ZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bv c2l0aW9uID09IEFUX1pWCisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1D X1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAg ICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJ Q0FMX0JBUikKKyAgICAgICAgICAgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy1iYXItYXQtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAg ICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAg ICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBPU1RfWlYKKyAgICAgICAgICAgICAg ICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdI VF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNF RF9WRVJUSUNBTF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vdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmNvbnRpbnVlZF9wKSkKKyAg ICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg0LCBRY29udGludWF0aW9uLCAwKTsKKyAgICAg IGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW1wdHlfbGluZV9wICYmIEVRIChlbXB0eV9wb3MsIFFs ZWZ0KSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg1LCBRZW1wdHlfbGluZSwgMCk7 CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9saW5lX3AgJiYgRVEgKGFycm93X3Rv cCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg2 LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5kX21pbl95ID49IDApCisgICAgICAgICAg ICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kgLSByb3ctPnk7CisgICAgICAgIH0KKyAgICAg IGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCAmJiBFUSAoYXJyb3dfYm90LCBR bGVmdCkpCisgICAgICAgIHsKKyAgICAgICAgICBsZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDcsIFFk b3duLCAwKTsKKyAgICAgICAgICBpZiAoYm90X2luZF9tYXhfeSA+PSAwKQorICAgICAgICAgICAg bGVmdF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWln aHQpOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIGxlZnQgPSBNQ19OT19GUklOR0Vf QklUTUFQOworICAgICAgLyogRGVjaWRlIHdoaWNoIGJpdG1hcCB0byBkcmF3IGluIHRoZSByaWdo dCBmcmluZ2UuICovCisgICAgICBpZiAoV0lORE9XX1JJR0hUX0ZSSU5HRV9XSURUSCAodykgPT0g MCkKKyAgICAgICAgcmlnaHQgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgZWxzZSBpZiAo cm93LT5yaWdodF91c2VyX2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAg ICAgICAgeworICAgICAgICAgIHJpZ2h0ID0gcm93LT5yaWdodF91c2VyX2ZyaW5nZV9iaXRtYXA7 CisgICAgICAgICAgcmlnaHRfZmFjZV9pZCA9IHJvdy0+cmlnaHRfdXNlcl9mcmluZ2VfZmFjZV9p ZDsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAoKCFyb3ctPnJldmVyc2VkX3AgJiYgcm93LT50 cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgIHx8IChyb3ctPnJldmVyc2VkX3Ag JiYgcm93LT50cnVuY2F0ZWRfb25fbGVmdF9wKSkKKyAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9G UklOR0UgKDAsIFF0cnVuY2F0aW9uLCAwKTsKKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVf Ym9iX3AgJiYgRVEgKGJvdW5kYXJ5X3RvcCwgUXJpZ2h0KSkKKyAgICAgICAgeworICAgICAgICAg IHJpZ2h0ID0gKChyb3ctPmluZGljYXRlX2VvYl9wICYmIEVRIChib3VuZGFyeV9ib3QsIFFyaWdo dCkpCisgICAgICAgICAgICAgPyBNQ19SSUdIVF9GUklOR0UgKDEsIFF0b3BfYm90dG9tLCB0b3Bf cm93X2VuZHNfYXRfenZfcCkKKyAgICAgICAgICAgICA6IE1DX1JJR0hUX0ZSSU5HRSAoMiwgUXRv cCwgMCkpOworICAgICAgICAgIGlmICh0b3BfaW5kX21pbl95ID49IDApCisgICAgICAgICAgICBy aWdodF9vZmZzZXQgPSB0b3BfaW5kX21pbl95IC0gcm93LT55OworICAgICAgICB9CisgICAgICBl bHNlIGlmIChyb3ctPmluZGljYXRlX2VvYl9wICYmIEVRIChib3VuZGFyeV9ib3QsIFFyaWdodCkp CisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hUX0ZSSU5HRSAoMywgUWJvdHRv bSwgYm90X3Jvd19lbmRzX2F0X3p2X3ApOworICAgICAgICAgIGlmIChib3RfaW5kX21heF95ID49 IDApCisgICAgICAgICAgICByaWdodF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSAr IHJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlIGlmICgoIXJvdy0+ cmV2ZXJzZWRfcCAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgfHwgKHJvdy0+ cmV2ZXJzZWRfcCAmJiBNQVRSSVhfUk9XX0NPTlRJTlVBVElPTl9MSU5FX1AgKHJvdykpKQorICAg ICAgICByaWdodCA9IE1DX1JJR0hUX0ZSSU5HRSAoNCwgUWNvbnRpbnVhdGlvbiwgMCk7CisgICAg ICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9saW5lX3AgJiYgRVEgKGFycm93X3RvcCwgUXJp Z2h0KSkKKyAgICAgICAgeworICAgICAgICAgIHJpZ2h0ID0gTUNfUklHSFRfRlJJTkdFICg2LCBR dXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5kX21pbl95ID49IDApCisgICAgICAgICAgICBy aWdodF9vZmZzZXQgPSB0b3BfaW5kX21pbl95IC0gcm93LT55OworICAgICAgICB9CisgICAgICBl bHNlIGlmIChyb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3AgJiYgRVEgKGFycm93X2JvdCwgUXJp Z2h0KSkKKyAgICAgICAgeworICAgICAgICAgIHJpZ2h0ID0gTUNfUklHSFRfRlJJTkdFICg3LCBR ZG93biwgMCk7CisgICAgICAgICAgaWYgKGJvdF9pbmRfbWF4X3kgPj0gMCkKKyAgICAgICAgICAg IHJpZ2h0X29mZnNldCA9IGJvdF9pbmRfbWF4X3kgLSAocm93LT55ICsgcm93LT52aXN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jdXItPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcAorICAgICAgICAgIHx8IGN1ci0+ cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3ApCisgICAgICAgIHsKKyAgICAgICAgICByZWRyYXdfcCA9 IDEsIHJvdy0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AgPSAxOworICAgICAgICAgIGlmICgha2Vl cF9jdXJyZW50X3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGN1ci0+cmVkcmF3X2Zy aW5nZV9iaXRtYXBzX3AgPSAxOworICAgICAgICAgICAgICBpZiAobWNfbGVmdF9mcmluZ2VfYml0 bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgIHx8IG1jX3JpZ2h0 X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBj dXItPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAgICAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wID0gcGVy aW9kaWNfcDsKKyAgICAgICAgICAgICAgaWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19O T19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2VfYml0bWFw ID0gbWNfbGVmdF9mcmluZ2VfYml0bWFwOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2VfYml0bWFwID0gbGVmdDsKKyAgICAgICAgICAgICAg aWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2VfZmFjZV9pZCA9IG1jX2xlZnRfZnJpbmdlX2ZhY2Vf aWQ7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3VyLT5sZWZ0X2Zy aW5nZV9mYWNlX2lkID0gbGVmdF9mYWNlX2lkOworICAgICAgICAgICAgICBpZiAobWNfbGVmdF9m cmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgY3Vy LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gbGVmdF9vZmZzZXQ7CisgICAgICAg ICAgICAgIGlmIChtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAp CisgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfYml0bWFwID0gbWNfcmlnaHRfZnJp bmdlX2JpdG1hcDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXIt PnJpZ2h0X2ZyaW5nZV9iaXRtYXAgPSByaWdodDsKKyAgICAgICAgICAgICAgaWYgKG1jX3JpZ2h0 X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBj dXItPnJpZ2h0X2ZyaW5nZV9mYWNlX2lkID0gbWNfcmlnaHRfZnJpbmdlX2ZhY2VfaWQ7CisgICAg ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfZmFj ZV9pZCA9IHJpZ2h0X2ZhY2VfaWQ7CisgICAgICAgICAgICAgIGlmIChtY19yaWdodF9mcmluZ2Vf Yml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgY3VyLT5yaWdo dF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg ICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9vZmZzZXQgPSByaWdodF9vZmZzZXQ7CisgICAgICAgICAg ICB9CisgICAgICAgIH0KKyAgICAgIGlmIChyb3ctPm92ZXJsYXlfYXJyb3dfYml0bWFwIDwgMCkK KyAgICAgICAgcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCA9IG1jX2dldF9sb2dpY2FsX2ZyaW5n ZV9iaXRtYXAgKHcsIFFvdmVybGF5X2Fycm93LCAwLCAwKTsKKyAgICAgIGlmIChyb3ctPm92ZXJs YXlfYXJyb3dfYml0bWFwICE9IGN1ci0+b3ZlcmxheV9hcnJvd19iaXRtYXApCisgICAgICAgIHsK KyAgICAgICAgICByZWRyYXdfcCA9IDEsIHJvdy0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AgPSAx OworICAgICAgICAgIGlmICgha2VlcF9jdXJyZW50X3ApCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIGN1ci0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AgPSAxOworICAgICAgICAgICAgICBj dXItPm92ZXJsYXlfYXJyb3dfYml0bWFwID0gcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcDsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAh PSBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAgICAgfHwgbWNfcmlnaHRfZnJpbmdlX2JpdG1h cCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVy aW9kaWNfcCA9IGZhbHNlOworICAgICAgICBlbHNlCisgICAgICAgICAgcm93LT5mcmluZ2VfYml0 bWFwX3BlcmlvZGljX3AgPSBwZXJpb2RpY19wOworICAgICAgaWYgKG1jX2xlZnRfZnJpbmdlX2Jp dG1hcCAhPSBNQ19OT19GUklOR0V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291bGQgYmUgd3Jvbmcgd2hlbiB3ZSBhbGxvdyB3aW5kb3cgbG9jYWwK KyAgICAgICAgICAgICAgIHJpZ2h0IGRpdmlkZXJzIC0gYnV0IHRoZSB3aW5kb3cgb24gdGhlIGxl ZnQgaXMgaGFyZAorICAgICAgICAgICAgICAgdG8gZ2V0LiAqLworICAgICAgICAgICAgJiYgIUZS QU1FX1JJR0hUX0RJVklERVJfV0lEVEggKGYpCisgICAgICAgICAgICAmJiAhV0lORE9XX0hBU19W RVJUSUNBTF9TQ1JPTExfQkFSICh3KQorICAgICAgICAgICAgLyogQnV0IGRvbid0IHJlZHVjZSB0 aGUgZnJpbmdlIHdpZHRoIGlmIHRoZSB3aW5kb3cKKyAgICAgICAgICAgICAgIGhhcyBhIGxlZnQg bWFyZ2luLCBiZWNhdXNlIHRoYXQgbWVhbnMgd2UgYXJlIG5vdAorICAgICAgICAgICAgICAgaW4g ZGFuZ2VyIG9mIGRyYXdpbmcgb3ZlciB0aGUgdmVydGljYWwgYm9yZGVyLAorICAgICAgICAgICAg ICAgYW5kIE9UT0ggbGVhdmluZyBvdXQgdGhhdCBvbmUgcGl4ZWwgbGVhdmVzIGJlaGluZAorICAg ICAgICAgICAgICAgdHJhY2VzIG9mIHRoZSBjdXJzb3IsIGlmIGl0IHdhcyBpbiBjb2x1bW4gemVy bworICAgICAgICAgICAgICAgYmVmb3JlIGRyYXdpbmcgbm9uLWVtcHR5IG1hcmdpbiBhcmVhLiAq LworICAgICAgICAgICAgJiYgdy0+bGVmdF9tYXJnaW5fY29scyA9PSAwKQorICAgICAgICAgICA/ IDEgOiAwKTsKKyAgICAgICAgICBwLmJ4ID0geCAtIHdkOworICAgICAgICAgIHAubnggPSB3ZDsK KyAgICAgICAgfQorICAgIH0KKyAgZWxzZQorICAgIHsKKyAgICAgIGludCB4ID0gd2luZG93X2Jv eF9yaWdodCAodywKKyAgICAgICAgKFdJTkRPV19IQVNfRlJJTkdFU19PVVRTSURFX01BUkdJTlMg KHcpCisgICAgICAgICA/IFJJR0hUX01BUkdJTl9BUkVBCisgICAgICAgICA6IFRFWFRfQVJFQSkp OworICAgICAgaW50IHdkID0gV0lORE9XX1JJR0hUX0ZSSU5HRV9XSURUSCAodyk7CisgICAgICBp ZiAocC53ZCA+IHdkKQorICAgICAgICBwLndkID0gd2Q7CisgICAgICBwLnggPSB4ICsgKHdkIC0g cC53ZCkgLyAyOworICAgICAgLyogQ2xlYXIgcmlnaHQgZnJpbmdlIGlmIG5vIGJpdG1hcCB0byBk cmF3IG9mIGlmIGJpdG1hcCBkb2Vzbid0IGZpbGwKKyAgIHRoZSBmcmluZ2UuICovCisgICAgICBp ZiAocC53ZCA8IHdkIHx8IHAueSA+IHAuYnkgfHwgcC55ICsgcC5oIDwgcC5ieSArIHAubnkpCisg ICAgICAgIHsKKyAgICAgICAgICBwLmJ4ID0geDsKKyAgICAgICAgICBwLm54ID0gd2Q7CisgICAg ICAgIH0KKyAgICB9CisgIGlmIChwLnggPj0gV0lORE9XX0JPWF9MRUZUX0VER0VfWCAodykKKyAg ICAgICYmIChwLnggKyBwLndkKSA8PSBXSU5ET1dfQk9YX0xFRlRfRURHRV9YICh3KSArIFdJTkRP V19QSVhFTF9XSURUSCAodykpCisgICAgRlJBTUVfUklGIChmKS0+ZHJhd19mcmluZ2VfYml0bWFw ICh3LCByb3csICZwKTsKK30KKwordm9pZAorbWNfZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1Y3Qg d2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCBsZWZ0X3AsIGVudW0gbWNfY3Vy c29yX3R5cGUgY3Vyc29yX3R5cGUpCit7CisgIGludCBvdmVybGF5ID0gMDsKKyAgaWYgKGxlZnRf cCA9PSByb3ctPnJldmVyc2VkX3AgJiYgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3ApCisgICAgewor ICAgICAgTGlzcF9PYmplY3QgY3Vyc29yID0gUW5pbDsKKyAgICAgIHN3aXRjaCAoY3Vyc29yX3R5 cGUpCisgICAgICAgIHsKKyAgICAgICAgY2FzZSBNQ19GUkFNRURfQk9YOgorICAgICAgICAgIGlm IChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGhvbGxvd19y ZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBjdXJzb3IgPSBRaG9sbG93OworICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3dfc21hbGw7CisgICAgICAgICAgYnJl YWs7CisgICAgICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICAgICAgICBpZiAocm93LT52aXNp YmxlX2hlaWdodCA+PSBTVEFOREFSRF9CSVRNQVBfSEVJR0hUIChob2xsb3dfcmVjdGFuZ2xlX2Jp dHMpKQorICAgICAgICAgICAgY3Vyc29yID0gUWhvbGxvdzsKKyAgICAgICAgICBlbHNlCisgICAg ICAgICAgICBjdXJzb3IgPSBRaG9sbG93X3NtYWxsOworICAgICAgICAgIGJyZWFrOworICAgICAg ICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgICAgY3Vyc29yID0gUWJveDsKKyAgICAgICAg ICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgICAgY3Vyc29yID0gUWJhcjsK KyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19IQkFSOgorICAgICAgICAgIGN1cnNv ciA9IFFoYmFyOworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9C SVRNQVA6CisgICAgICAgIGNhc2UgTUNfTk9fQ1VSU09SOgorICAgICAgICBjYXNlIE1DX1JJR0hU X0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAg ICAgICBkZWZhdWx0OgorICAgICAgICAgIHctPnBoeXNfY3Vyc29yX29uX3AgPSAwOworICAgICAg ICAgIHJvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gMDsKKyAgICAgICAgICBicmVhazsKKyAgICAg ICAgfQorICAgICAgaWYgKCFOSUxQIChjdXJzb3IpKQorICAgICAgICB7CisgICAgICAgICAgaW50 IGJtID0gbWNfZ2V0X2xvZ2ljYWxfY3Vyc29yX2JpdG1hcCAodywgY3Vyc29yKTsKKyAgICAgICAg ICBpZiAoYm0gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgbWNfZHJhd19mcmluZ2VfYml0bWFwXzEgKHcsIHJvdywgbGVmdF9wLCAyLCBibSk7Cisg ICAgICAgICAgICAgIG92ZXJsYXkgPSBFUSAoY3Vyc29yLCBRYm94KSA/IDMgOiAxOworICAgICAg ICAgICAgfQorICAgICAgICB9CisgICAgfQorICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywg cm93LCBsZWZ0X3AsIG92ZXJsYXksIE1DX05PX0ZSSU5HRV9CSVRNQVApOworICBpZiAobGVmdF9w ICYmIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAg ICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywgcm93LCAxLCAxLCByb3ctPm92ZXJsYXlfYXJy b3dfYml0bWFwKTsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICNkZWZpbmUgTk9fRlJJTkdFX0JJVE1BUCAwCiAjZGVmaW5lIFVO REVGX0ZSSU5HRV9CSVRNQVAgMQogI2RlZmluZSBNQVhfU1RBTkRBUkRfRlJJTkdFX0JJVE1BUFMg QVJSQVlFTFRTIChzdGFuZGFyZF9iaXRtYXBzKQpAQCAtMTY5OSw2ICszMjE3LDE2OCB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hZHJ1cGxlX2FuZ2xlX2Rvd24sICIrLXF1YWRydXBsZS1hbmdsZS1kb3du Iik7CisgIFZmcmluZ2VfYml0bWFwcyA9IEZjb25zIChRbWNfcXVhZHJ1cGxlX2FuZ2xlX2Rvd24s IFZmcmluZ2VfYml0bWFwcyk7CisgIEZwdXQgKFFtY19xdWFkcnVwbGVfYW5nbGVfZG93biwgUWZy aW5nZSwgbWFrZV9maXhudW0gKDQ4KSk7CisgIC8qIChnZXQgJystcXVhZHJ1cGxlLWFuZ2xlLWRv d24gJ2ZyaW5nZSkgPT4gNDggKi8KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgREVGU1lNIChRdHJ1bmNhdGlvbiwgInRydW5jYXRp b24iKTsKICAgREVGU1lNIChRY29udGludWF0aW9uLCAiY29udGludWF0aW9uIik7CiAgIERFRlNZ TSAoUW92ZXJsYXlfYXJyb3csICJvdmVybGF5LWFycm93Iik7CmRpZmYgLS1naXQgYS9zcmMvbnN0 ZXJtLmggYi9zcmMvbnN0ZXJtLmgKaW5kZXggOTc3M2ViMy4uZTM0YTExNiAxMDA2NDQKLS0tIGEv c3JjL25zdGVybS5oCisrKyBiL3NyYy9uc3Rlcm0uaApAQCAtNjYzLDYgKzY2MywxNiBAQCB0eXBl ZGVmIGlkIGluc3RhbmNldHlwZTsKIAogQGludGVyZmFjZSBFbWFjc1Njcm9sbGVyIDogTlNTY3Jv bGxlcgogICB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKyAgICBOU1JlY3QgbWNfcmVjdGFuZ2xlOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAgICBzdHJ1Y3Qgd2luZG93ICp3aW5kb3c7CiAgICBzdHJ1Y3QgZnJhbWUgKmZy YW1lOwogICAgTlNSZXNwb25kZXIgKnByZXZSZXNwb25kZXI7CkBAIC02ODMsNiArNjkzLDE4IEBA IHR5cGVkZWYgaWQgaW5zdGFuY2V0eXBlOwogICAgaW50IGVtX3dob2xlOwogICAgfQogCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCistICh2b2lk KW1jX3NldF9yZWN0YW5nbGU6IChOU1JlY3QpcmVjdDsKKy0gKE5TUmVjdCltY19nZXRfcmVjdGFu Z2xlOworLSAoc3RydWN0IHdpbmRvdyAqKW1jX2dldF93aW5kb3c7CistIChib29sKW1jX2p1ZGdl OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAtIChpbnN0YW5jZXR5cGUpIGluaXRG cmFtZTogKE5TUmVjdCApciB3aW5kb3c6IChMaXNwX09iamVjdCl3aW47CiAtICh2b2lkKXNldEZy YW1lOiAoTlNSZWN0KXI7CiAKZGlmZiAtLWdpdCBhL3NyYy9uc3Rlcm0ubSBiL3NyYy9uc3Rlcm0u bQppbmRleCAwMjMzMTgyLi5iNzA4ZTk0IDEwMDY0NAotLS0gYS9zcmMvbnN0ZXJtLm0KKysrIGIv c3JjL25zdGVybS5tCkBAIC03Niw2ICs3Niw5NzUgQEAgVXBkYXRlZCBieSBDaHJpc3RpYW4gTGlt cGFjaCAoY2hyaXNAbmljZS5jaCkKIHN0YXRpYyBFbWFjc01lbnUgKm1haW5NZW51OwogI2VuZGlm CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqK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gKmxz bCkKK3sKKyAgQ0hFQ0tfU1RSSU5HIChjb2xvcik7CisgIE5TQ29sb3IgKiBjb2w7CisgIEVtYWNz Q0dGbG9hdCByZWQsIGdyZWVuLCBibHVlLCBhbHBoYTsKKyAgY2hlY2tfd2luZG93X3N5c3RlbSAo TlVMTCk7CisgIGJsb2NrX2lucHV0ICgpOworICBpZiAobnNfbGlzcF90b19jb2xvciAoY29sb3Is ICZjb2wpKQorICAgIHsKKyAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICBsc2wtPnJlZCA9 IC0xLjA7CisgICAgICBsc2wtPmdyZWVuID0gLTEuMDsKKyAgICAgIGxzbC0+Ymx1ZSA9IC0xLjA7 CisgICAgfQorICBbW2NvbCBjb2xvclVzaW5nRGVmYXVsdENvbG9yU3BhY2VdCisgICAgICAgIGdl dFJlZDogJnJlZCBncmVlbjogJmdyZWVuIGJsdWU6ICZibHVlIGFscGhhOiAmYWxwaGFdOworICB1 bmJsb2NrX2lucHV0ICgpOworICBsc2wtPnJlZCA9IHJlZDsKKyAgbHNsLT5ncmVlbiA9IGdyZWVu OworICBsc2wtPmJsdWUgPSBibHVlOworfQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHJhd19vdmVy d3JpdHRlbiAoc3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0 cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBzdHJ1 Y3QgZ2x5cGggKmN1cnNvcl9nbHlwaCkKK3sKKyAgLy8gIGludCB2cG9zID0gTUFUUklYX1JPV19W UE9TIChyb3csIG1hdHJpeCk7CisgIC8vICBjbG9ja190IGNsb2NrX3N0YXJ0ID0gY2xvY2soKTsK KyAgLy8gbnNfZHJhd191bmRlcndhdmUgKHMsIHMtPndpZHRoLCBzLT54KTsKKyAgTlNDb2xvciAq aG9sbG93X2NvbG9yID0gRlJBTUVfQkFDS0dST1VORF9DT0xPUiAocy0+Zik7CisgIHN0cnVjdCBm YWNlICpmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBERUZBVUxUX0ZBQ0VfSUQpOworICBpbnQg dm50aCA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAvKiBTVFJFVENIX0dMWVBI IG1heSBjb250YWluIG1vcmUgdGhhbiBvbmUgZmFrZSBjdXJzb3IgYXQgdGhlIHNhbWUgSFBPUy4K KyAgTk9URTogIEEgZmFrZSBjdXJzb3IgZnJvbSBvbmUgY2FjaGUgbWF5IG92ZXJ3cml0ZSBhIGZh a2UgY3Vyc29yIGZyb20gYW5vdGhlcgorICBjYWNoZSAtLSB0aHVzLCB3ZSBtdXN0IGNoZWNrIHRo ZW0gYWxsIGZvciBvdmVyd3JpdHRlbiBmYWtlIGN1cnNvcnMuICovCisgIGZvciAoZW51bSBtY19j YWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICBjYWNoZV90eXBlIDwgTk9f Q0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAgICAgIGZvciAoaW50IG50aCA9 IDA7CisgICAgICAgICAgIHMKKyAgICAgICAgICAgJiYgbWNfdHJhdmVyc2VfY2FjaGVfcCAocy0+ dy0+bWNfbWF0cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGgpOworICAgICAgICAgICArK250aCkK KyAgICAgICAgeworICAgICAgICAgIC8vICBpbnQgeCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueDsKKyAgICAgICAgICBpbnQgZnggPSBzLT53LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZ4OworICAgICAgICAg IC8vICBpbnQgeSA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0ueTsKKyAgICAgICAgICBpbnQgZnkgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLmZ5OworICAgICAgICAgIGludCBocG9zID0gcy0+dy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5ocG9zOworICAgICAgICAg IGludCB2cG9zID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS52cG9zOworICAgICAgICAgIGludCB3ZCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0ud2Q7CisgICAgICAgICAgaW50IGggPSBzLT53LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmg7CisgICAgICAgICAgZW51 bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3R5cGU7CisgICAgICAgICAgLy8gIGludCBj dXJzb3Jfd2lkdGggPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZyA9IHsu cmVkID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5m Zy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gcy0+dy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ncmVlbiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHMtPnctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcuYmx1ZX07CisgICAgICAgICAgLy8g IHN0cnVjdCBtY19SR0IgbHNsX2JnID0gey5yZWQgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLnJlZCwKKyAgICAgICAgICAvLyAgICAgICAgICAg ICAgICAgICAgICAgICAgLmdyZWVuID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5iZy5ncmVlbiwKKyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAg ICAgICAgICAgLmJsdWUgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgICAgIGJvb2wgYWN0aXZlX3AgPSBzLT53LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmFjdGl2ZV9wOworICAgICAg ICAgIC8vICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSBzLT53LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICBi b29sIGVuYWJsZWRfcCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uZW5hYmxlZF9wOworICAgICAgICAgIGJvb2wgZ29fcCA9ICh2cG9zID09IHZudGgK KyAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA9PSBjdXJzb3JfZ2x5cGgtPmhwb3MKKyAg ICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wKTsKKyAgICAgICAgICBpZiAoIWdvX3Ap CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICBOU1JlY3QgcjsKKyAgICAgICAgICBy Lm9yaWdpbi54ID0gZng7CisgICAgICAgICAgci5vcmlnaW4ueSA9IGZ5OworICAgICAgICAgIHIu c2l6ZS5oZWlnaHQgPSBoOworICAgICAgICAgIHIuc2l6ZS53aWR0aCA9IHdkOworICAgICAgICAg IFtbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiBsc2xfZmcucmVkCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IGxzbF9mZy5ncmVlbgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBibHVlOiBsc2xfZmcuYmx1ZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdIHNldF07CisgICAgICBpZiAo Y3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWCkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVj dCBidWZmZXIgKmIgPSBYQlVGRkVSIChzLT53LT5jb250ZW50cyk7CisgICAgICAgICAgYm9vbCBy ZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJrX2FjdGl2ZSkp KTsKKyAgICAgICAgICBwdHJkaWZmX3QgcmVnaW9uX2JlZyA9IChyZWdpb25fYWN0aXZlX3ApID8g bWNfcmVnaW9uX2xpbWl0ICgxKSA6IC0xOworICAgICAgICAgIHB0cmRpZmZfdCByZWdpb25fZW5k ID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBtY19yZWdpb25fbGltaXQgKDApIDogLTE7CisgICAgICAg ICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAg ICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPT0gcmVnaW9uX2JlZykKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2Jl Z19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1hdC1yZWdpb24tcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAg ICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZSA9IEZBQ0VfRlJP TV9JRCAocy0+ZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25fYmVnX2ZhY2VfaWQpOworICAgICAgICAg ICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZWdfY29sb3IgPSBuc19sb29rdXBf aW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChob2xsb3dfYWN0aXZlX3JlZ2lvbl9i ZWdfZmFjZSksIHMtPmYpOworICAgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0 aXZlX3JlZ2lvbl9iZWdfY29sb3I7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlm IChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAg ICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPT0gcmVnaW9uX2VuZCkK KyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0 aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBp bnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQtcmVnaW9uLXByZS16di1mYWNlIiksIHRydWUp OworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlIC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gICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fY29s b3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChob2xsb3df YWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UpLCBzLT5mKTsKKyAgICAgICAgICAgICAgICAgIGhv bGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fY29sb3I7CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9wKQorICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2 ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAg c3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgaG9s bG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgTlNDb2xvciAqaG9sbG93 X2FjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9V TkQgKGhvbGxvd19hY3RpdmVfZmFjZSksIHMtPmYpOworICAgICAgICAgICAgICAgICAgICBob2xs b3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNl X2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVhbC1mYWtl LWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAg ICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMt PmYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICBOU0Nv bG9yICpob2xsb3dfaW5hY3RpdmVfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNf RkFDRV9CQUNLR1JPVU5EIChob2xsb3dfaW5hY3RpdmVfZmFjZSksIHMtPmYpOworICAgICAgICAg ICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19pbmFjdGl2ZV9jb2xvcjsKKyAgICAg ICAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGZhY2UgJiYgTlNf RkFDRV9CQUNLR1JPVU5EIChmYWNlKSA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NP TE9SIChzLT5mKSwgcy0+ZikpCisgICAgICAgICAgeworICAgICAgICAgICAgW25zX2xvb2t1cF9p bmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGZhY2UpLCBzLT5mKSBzZXRdOworICAg ICAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChzLT5mKTsKKyAgICAg ICAgICB9CisgICAgICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgY2FzZSBNQ19OT19GUklOR0VfQklUTUFQOgorICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX05PX0NVUlNPUjoKKyAgICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOgorICAgICAg ICAgICAgICBjYXNlIE1DX0xFRlRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgICAgICAgY2FzZSBN Q19GSUxMRURfQk9YOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAg ICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6CisgICAgICAg ICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAgICAgICAgW2hvbGxvd19jb2xvciBz ZXRdOworICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7 CisgICAgICAgICAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAocy0+Zikgc2V0XTsKKyAgICAg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAg ICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAgICAgIFtob2xsb3dfY29s b3Igc2V0XTsKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAociwgMSwg MSkpOworICAgICAgICAgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpIHNldF07Cisg ICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfSEJBUjoKKyAgICAg ICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7Cisg ICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgLyogSWYgYSBn bHlwaCBleGlzdHMgKHMtPmNoYXIyYiAhPS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gICAg ICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qg Zm9udCAqZm9udCA9IHMtPmZhY2UtPmZvbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICghZm9u dCkKKyAgICAgICAgICAgICAgICAgICAgICBmb250ID0gRlJBTUVfRk9OVCAocy0+Zik7CisgICAg ICAgICAgICAgICAgICAgIGJvb2wgd2l0aF9iZ19wID0gZmFsc2U7CisgICAgICAgICAgICAgICAg ICAgIGZvbnQtPmRyaXZlci0+ZHJhdyAocywgcy0+Y21wX2Zyb20sIHMtPm5jaGFycywgcy0+eCwg cy0+eWJhc2UsIHdpdGhfYmdfcCk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICB9CisgIC8vICBjbG9ja190IGNsb2NrX2VuZCA9IGNsb2NrKCk7Cisg IC8vICBkb3VibGUgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0gY2xvY2tf c3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibnNfZHJh d19vdmVyd3JpdHRlbiAoJWQpOiAgVElNRSAoJWYpXG4iLCB2cG9zLCBjcHVfdGltZV91c2VkKTsK K30KKworc3RhdGljIHZvaWQKK21jX25zX2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0IHdpbmRv dyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cs CisgICAgICAgICAgICAgICAgICBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5LCBpbnQgaHBv cywgaW50IHZwb3MsIGludCB3ZCwgaW50IGgsCisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNf UkdCIGxzbCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAg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GlzcF9PYmplY3QgYmFja2dyb3VuZCA9IGZhY2UtPmxmYWNlW0xGQUNFX0JBQ0tHUk9V TkRfSU5ERVhdOworICAgICBmcHJpbnRmIChzdGRlcnIsICJcbmZvcmVncm91bmQgKCVzKSB8IGJh Y2tncm91bmQgKCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAoIU5JTFAgKGZvcmVncm91 bmQpID8gU1NEQVRBIChmb3JlZ3JvdW5kKSA6ICJOSUxQIiksCisgICAgICAgICAgICAgICAgICAg ICAgKCFOSUxQIChiYWNrZ3JvdW5kKSA/IFNTREFUQSAoYmFja2dyb3VuZCkgOiAiTklMUCIpKTsK KyAgLSAgRVhBTVBMRSBPRiBIT1cgVE8gQ1JFQVRFIEEgQ09MT1IgV0lUSCBSR0IvTFNMIGZsb2F0 IHZhbHVlczoKKyAgICAgTlNDb2xvciAqbXlfY29sb3IgPSBbTlNDb2xvciBjb2xvcldpdGhDYWxp YnJhdGVkUmVkOiAxLjAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGdyZWVuOiAxLjAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBibHVlOiAxLjAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdOworICAtICBBTFRFUk5BVElWRSBFWEFN UExFOgorICAgICBlbnVtIGZhY2VfaWQgZGVidWdnaW5nX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRf ZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJuICgiKy1kZWJ1Z2dpbmctZmFjZSIpLCB0cnVlKTsKKyAg ICAgc3RydWN0IGZhY2UgKmRlYnVnZ2luZ19mYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBkZWJ1 Z2dpbmdfZmFjZV9pZCk7CisgICAgIE5TQ29sb3IgKmNvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRf Y29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZGVidWdnaW5nX2ZhY2UpLCBzLT5mKTsKKyAgICAg W2NvbG9yIHNldF07ICovCisgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MpCisgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENh bGlicmF0ZWRSZWQ6IGxzbC5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVl bjogbHNsLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IGxzbC5i bHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF0gc2V0XTsKKyAg ICBlbHNlCisgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworICBpZiAoY3Vyc29y X3R5cGUgPT0gTUNfRlJBTUVEX0JPWCkKKyAgICB7CisgICAgICBzdHJ1Y3QgYnVmZmVyICpiID0g WEJVRkZFUiAody0+Y29udGVudHMpOworICAgICAgYm9vbCByZWdpb25fYWN0aXZlX3AgPSAoIU5J TFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgIU5JTFAgKEJWQVIgKGIsIG1hcmtfYWN0aXZlKSkpOworICAgICAgcHRyZGlmZl90IHJlZ2lv bl9iZWcgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IG1jX3JlZ2lvbl9saW1pdCAoMSkgOiAtMTsKKyAg ICAgIHB0cmRpZmZfdCByZWdpb25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBtY19yZWdpb25f bGltaXQgKDApIDogLTE7CisgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgJiYg YWN0aXZlX3AKKyAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGg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ZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoaG9sbG93 X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlKSwgZik7CisgICAgICAgICAgICAgIGhvbGxvd19j b2xvciA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fY29sb3I7CisgICAgICAgICAgICB9 CisgICAgICAgICAgICBlbHNlIGlmIChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2Ug PSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAg ICAgTlNDb2xvciAqaG9sbG93X2FjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9y IChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19hY3RpdmVfZmFjZSksIGYpOworICAgICAgICAg ICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfY29sb3I7CisgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgLyogVGhlIHJlZ2lvbiBpcyBfbm90XyB2aXNpYmxlIGluIHRoZSBp bmFjdGl2ZSB3aW5kb3cgYmVjYXVzZSB0aGUgb3ZlcmxheSB3aW5kb3cgcHJvcGVydHkgaXMgdXNl ZC4gKi8KKyAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9p ZCA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dFX0JJVE1BUDoKKyAgICAgICAgYnJl YWs7CisgICAgICBjYXNlIE1DX0xFRlRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgYnJlYWs7Cisg ICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAg ICBicmVhazsKKyAgICAgIGNhc2UgTUNfRlJBTUVEX0JPWDoKKyAgICAgICAgTlNSZWN0RmlsbCAo cik7CisgICAgICAgIFtob2xsb3dfY29sb3Igc2V0XTsKKyAgICAgICAgTlNSZWN0RmlsbCAoTlNJ bnNldFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAoZikgc2V0 XTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0hPTExPV19CT1g6CisgICAgICAgIE5T UmVjdEZpbGwgKHIpOworICAgICAgICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAgIE5TUmVj dEZpbGwgKE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7CisgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09M T1IgKGYpIHNldF07CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19IQkFSOgorICAgICAg ICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0JBUjoKKyAg ICAgICAgcyA9IHI7CisgICAgICAgIC8qIEBsYXdsaXN0IGlzIGZvY3VzaW5nIHRoZSBpbml0aWFs IGRldmVsb3BtZW50IG9mIGZlYXR1cmUgcmVxdWVzdHMKKyAgICAgICAgIzE3Njg0IGFuZCAjMjI4 NzMgb24gTDJSIGxhbmd1YWdlcy4gKi8KKyAgICAgICAgaWYgKGdseXBoX2ZsYXZvciAhPSBNQ19H TFlQSAorICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBITEVTUykKKyAgICAg ICAgICB7CisgICAgICAgICAgICAv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mZvcl9vdmVybGFwcykKKyAgICByZXR1cm47CisgIC8q IERvIHVuZGVybGluZS4gKi8KKyAgaWYgKGZhY2UtPnVuZGVybGluZV9wKQorICAgIHsKKyAgICAg IGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX1dBVkUpCisgICAgICAg IHsKKyAgICAgICAgICBpZiAoZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAgICAgICAg ICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgW25z X2xvb2t1cF9pbmRleGVkX2NvbG9yIChmYWNlLT51bmRlcmxpbmVfY29sb3IsIHMtPmYpIHNldF07 CisgICAgICAgICAgbnNfZHJhd191bmRlcndhdmUgKHMsIHdpZHRoLCB4KTsKKyAgICAgICAgfQor ICAgICAgICBlbHNlIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJ TkUpCisgICAgICAgICAgeworICAgICAgICAgICAgTlNSZWN0IHI7CisgICAgICAgICAgICB1bnNp Z25lZCBsb25nIHRoaWNrbmVzcywgcG9zaXRpb247CisgICAgICAgICAgICAvKiBJZiB0aGUgcHJl diB3YXMgdW5kZXJsaW5lZCwgbWF0Y2ggaXRzIGFwcGVhcmFuY2UuICovCisgICAgICAgICAgICBp ZiAocy0+cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfcAorICAgICAgICAgICAgICAg ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORQorICAg ICAgICAgICAgICAgICYmIHMtPnByZXYtPnVuZGVybGluZV90aGlja25lc3MgPiAwKQorICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+cHJldi0+dW5kZXJsaW5l X3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPnByZXYtPnVuZGVybGlu ZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgc3RydWN0IGZvbnQgKmZvbnQ7CisgICAgICAg ICAgICAgICAgICB1bnNpZ25lZCBsb25nIGRlc2NlbnQ7CisgICAgICAgICAgICAgICAgICBmb250 PXMtPmZvbnQ7CisgICAgICAgICAgICAgICAgICBkZXNjZW50ID0gcy0+eSArIHMtPmhlaWdodCAt IHMtPnliYXNlOworICAgICAgICAgICAgICAgICAgLyogVXNlIHVuZGVybGluZSB0aGlja25lc3Mg b2YgZm9udCwgZGVmYXVsdGluZyB0byAxLiAqLworICAgICAgICAgICAgICAgICAgdGhpY2tuZXNz ID0gKGZvbnQgJiYgZm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IGZvbnQtPnVuZGVybGluZV90aGlja25lc3MKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogMTsKKyAgICAgICAgICAgICAgICAgIC8qIERldGVybWluZSB0 aGUgb2Zmc2V0IG9mIHVuZGVybGluaW5nIGZyb20gdGhlIGJhc2VsaW5lLiAqLworICAgICAgICAg ICAgICAgICAgaWYgKHhfdW5kZXJsaW5lX2F0X2Rlc2NlbnRfbGluZSkKKyAgICAgICAgICAgICAg ICAgICAgcG9zaXRpb24gPSBkZXNjZW50IC0gdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAg ICBlbHNlIGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRpb25fcHJvcGVydGllcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBmb250ICYmIGZvbnQtPnVuZGVybGluZV9wb3NpdGlvbiA+ PSAwKQorICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gZm9udC0+dW5kZXJsaW5lX3Bv c2l0aW9uOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGZvbnQpCisgICAgICAgICAg ICAgICAgICAgICAgICBwb3NpdGlvbiA9IGxyb3VuZCAoZm9udC0+ZGVzY2VudCAvIDIpOworICAg ICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgICBwb3Np dGlvbiA9IHVuZGVybGluZV9taW5pbXVtX29mZnNldDsKKyAgICAgICAgICAgICAgICAgIHBvc2l0 aW9uID0gbWF4IChwb3NpdGlvbiwgdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0KTsKKyAgICAgICAg ICAgICAgICAgIC8qIEVuc3VyZSB1bmRlcmxpbmluZyBpcyBub3QgY3JvcHBlZC4gKi8KKyAgICAg ICAgICAgICAgICAgIGlmIChkZXNjZW50IDw9IHBvc2l0aW9uKQorICAgICAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBkZXNjZW50IC0gMTsKKyAgICAg ICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAxOworICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRlc2NlbnQgPCBwb3NpdGlvbiArIHRoaWNrbmVz cykKKyAgICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAxOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgIHMtPnVuZGVybGluZV90aGlja25lc3MgPSB0aGlja25lc3M7CisgICAg ICAgICAgICBzLT51bmRlcmxpbmVfcG9zaXRpb24gPSBwb3NpdGlvbjsKKyAgICAgICAgICAgIHIg PSBOU01ha2VSZWN0ICh4LCBzLT55YmFzZSArIHBvc2l0aW9uLCB3aWR0aCwgdGhpY2tuZXNzKTsK KyAgICAgICAgICAgIGlmIChmYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAg ICAgIFtkZWZhdWx0Q29sIHNldF07CisgICAgICAgICAgICAgIGVsc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ICAgZWxzZQorICAgICAgICAg ZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+Ziwgcy0+Zmlyc3RfZ2x5cGgtPmZhY2VfaWQpOworICAg ICAgYmdDb2wgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChm YWNlKSwgcy0+Zik7CisgICAgICBmZ0NvbCA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19G QUNFX0ZPUkVHUk9VTkQgKGZhY2UpLCBzLT5mKTsKKyAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyAr K2kpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAoIXMtPnJvdy0+ZnVsbF93aWR0aF9wKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBpbnQgb3ZlcnJ1biwgbGVmdG92ZXJydW47CisgICAg ICAgICAgICAgIC8qIHRydW5jYXRlIHRvIGF2b2lkIG92ZXJ3cml0aW5nIGZyaW5nZSBhbmQvb3Ig c2Nyb2xsYmFyICovCisgICAgICAgICAgICAgIG92ZXJydW4gPSBtYXggKDAsIChzLT54ICsgcy0+ YmFja2dyb3VuZF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gKFdJ TkRPV19CT1hfUklHSFRfRURHRV9YIChzLT53KQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgLSBXSU5ET1dfUklHSFRfRlJJTkdFX1dJRFRIIChzLT53KSkpOworICAgICAgICAgICAgICAg ICAgICByW2ldLnNpemUud2lkdGggLT0gb3ZlcnJ1bjsKKyAgICAgICAgICAgICAgLyogdHJ1bmNh dGUgdG8gYXZvaWQgb3ZlcndyaXRpbmcgdG8gbGVmdCBvZiB0aGUgd2luZG93IGJveCAqLworICAg ICAgICAgICAgICBsZWZ0b3ZlcnJ1biA9IChXSU5ET1dfQk9YX0xFRlRfRURHRV9YIChzLT53KQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdJTkRPV19MRUZUX0ZSSU5HRV9XSURUSCAo cy0+dykpIC0gcy0+eDsKKyAgICAgICAgICAgICAgaWYgKGxlZnRvdmVycnVuID4gMCkKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICByW2ldLm9yaWdpbi54ICs9IGxlZnRvdmVy cnVuOworICAgICAgICAgICAgICAgICAgcltpXS5zaXplLndpZHRoIC09IGxlZnRvdmVycnVuOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgLyogWFhYOiBUcnkgdG8gd29yayBiZXR3 ZWVuIHByb2JsZW0gd2hlcmUgYSBzdHJldGNoIGdseXBoIG9uCisgICAgICAgICAgICAgICAgIGEg cGFydGlhbGx5LXZpc2libGUgYm90dG9tIHJvdyB3aWxsIGNsZWFyIHBhcnQgb2YgdGhlCisgICAg ICAgICAgICAgICAgIG1vZGVsaW5lLCBhbmQgYW5vdGhlciB3aGVyZSBsaXN0LWJ1ZmZlcnMgaGVh ZGVycyBhbmQgc2ltaWxhcgorICAgICAgICAgICAgICAgICByb3dzIGVycm9uZW91c2x5IGhhdmUg dmlzaWJsZV9oZWlnaHQgc2V0IHRvIDAuICBOb3Qgc3VyZQorICAgICAgICAgICAgICAgICB3aGVy ZSB0aGlzIGlzIGNvbWluZyBmcm9tIGFzIG90aGVyIHRlcm1zIHNlZW0gbm90IHRvIHNob3cuICov CisgICAgICAgICAgICAgIHJbaV0uc2l6ZS5oZWlnaHQgPSBtaW4gKHMtPmhlaWdodCwgcy0+cm93 LT52aXNpYmxlX2hlaWdodCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgW2JnQ29sIHNldF07 CisgICAgICAgICAgLyogTk9URTogdW5kZXIgTlMgdGhpcyBpcyBOT1QgdXNlZCB0byBkcmF3IGN1 cnNvcnMsIGJ1dCB3ZSBtdXN0IGF2b2lkCisgICAgICAgICAgICAgb3ZlcndyaXRpbmcgY3Vyc29y ICh1c3VhbGx5IHdoZW4gY3Vyc29yIG9uIGEgdGFiKSAqLworICAgICAgICAgIGlmIChzLT5obCA9 PSBEUkFXX0NVUlNPUikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogRklYTUU6ICBE byB3ZSBzdGlsbCBuZWVkIHRvIHByZXZlbnQgdGhpcyBzZWN0aW9uIG9mIGNvZGUgZnJvbQorICAg ICAgICAgICAgICBlcmFzaW5nIHRoZSBmYWtlIE1DX0hCQVIgdGhhdCBleHRlbmRzIHRoZSBlbnRp cmUgbGVuZ3RoIG9mIHRoZQorICAgICAgICAgICAgICBTVFJFVENIX0dMWVBIPyAgVGhpcyBtYXkg aGF2ZSBiZWVuIGRvbmUgcHJpb3IgdG8gdGhlIGZpeCByZWxhdGluZworICAgICAgICAgICAgICB0 byBsZWZ0L3JpZ2h0IG92ZXJ3cml0dGVuIGdseXBocy4gKi8KKyAgICAgICAgICAgICAgcltpXS5z aXplLmhlaWdodCAtPSAxOworICAgICAgICAgICAgICAvLyAgZW51bSBmYWNlX2lkIGRlYnVnZ2lu Z19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistZGVi dWdnaW5nLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgIC8vICBzdHJ1Y3QgZmFjZSAqZGVi dWdnaW5nX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGRlYnVnZ2luZ19mYWNlX2lkKTsKKyAg ICAgICAgICAgICAgLy8gIE5TQ29sb3IgKmNvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3Ig KE5TX0ZBQ0VfRk9SRUdST1VORCAoZGVidWdnaW5nX2ZhY2UpLCBzLT5mKTsKKyAgICAgICAgICAg ICAgLy8gIFtjb2xvciBzZXRdOworICAgICAgICAgICAgICBDR0Zsb2F0IHggPSByW2ldLm9yaWdp bi54OworICAgICAgICAgICAgICBDR0Zsb2F0IHdpZHRoID0gd2Q7CisgICAgICAgICAgICAgIHJb aV0uc2l6ZS53aWR0aCAtPSB3aWR0aDsKKyAgICAgICAgICAgICAgcltpXS5vcmlnaW4ueCArPSB3 aWR0aDsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocltpXSk7CisgICAgICAgICAgICAgIC8q IERyYXcgb3ZlcmxpbmluZywgZXRjLiBvbiB0aGUgY3Vyc29yLiAqLworICAgICAgICAgICAgICBp ZiAocy0+dy0+cGh5c19jdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgICAgICAg ICAgIG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChzLCBmYWNlLCBiZ0NvbCwgd2lkdGgsIHgp OworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIG1jX25zX2RyYXdfdGV4 dF9kZWNvcmF0aW9uIChzLCBmYWNlLCBmZ0NvbCwgd2lkdGgsIHgpOworICAgICAgICAgICAgfQor ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAgLy8gIGludCByeCA9IHJbaV0ub3JpZ2lu Lng7CisgIC8vICBpbnQgcnkgPSByW2ldLm9yaWdpbi55OworICAvLyAgaW50IHJ3ID0gcltpXS5z aXplLndpZHRoOworICAvLyAgaW50IHJoID0gcltpXS5zaXplLmhlaWdodDsKKyAgLy8gIGZwcmlu dGYgKHN0ZGVyciwgIm1jX25zX2R1bXBnbHlwaHNfc3RyZXRjaDogIHZwb3MgKCVkKSB8IHJ4ICgl ZCkgfCByeSAoJWQpIHwgcncgKCVkKSB8IHJoICglZClcbiIsCisgIC8vICAgICAgICAgICAgICAg ICAgIHMtPmZpcnN0X2dseXBoLT52cG9zLCByeCwgcnksIHJ3LCByaCk7CisgICAgICAgICAgICAg IE5TUmVjdEZpbGwgKHJbaV0pOworICAgICAgICAgICAgfQorICAgICAgICAgIC8qIERyYXcgb3Zl cmxpbmluZywgZXRjLiBvbiB0aGUgc3RyZXRjaCBnbHlwaCAob3IgdGhlIHBhcnQKKyAgICAgICAg ICAgICBvZiB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ICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSAxOworICAgIH0KKyAgICBlbHNl CisgICAgICBiciA9IE5TTWFrZVJlY3QgKHgsIHksIHMtPnNsaWNlLndpZHRoLCBzLT5zbGljZS5o ZWlnaHQpOworICBOU1JlY3RGaWxsIChicik7CisgIC8qIERyYXcgdGhlIGltYWdlLi4gZG8gd2Ug bmVlZCB0byBkcmF3IHBsYWNlaG9sZGVyIGlmIGltZyA9PW5pbD8gKi8KKyAgaWYgKGltZyAhPSBu aWwpCisgICAgeworI2lmZGVmIE5TX0lNUExfQ09DT0EKKyAgICAgIE5TUmVjdCBkciA9IE5TTWFr ZVJlY3QgKHgsIHksIHMtPnNsaWNlLndpZHRoLCBzLT5zbGljZS5oZWlnaHQpOworICAgICAgTlNS ZWN0IGlyID0gTlNNYWtlUmVjdCAocy0+c2xpY2UueCwgcy0+c2xpY2UueSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLndpZHRoLCBzLT5zbGljZS5oZWlnaHQpOworICAg ICAgW2ltZyBkcmF3SW5SZWN0OiBkcgorICAgICAgICAgICAgIGZyb21SZWN0OiBpcgorICAgICAg ICAgICAgIG9wZXJhdGlvbjogTlNDb21wb3NpdGVTb3VyY2VPdmVyCisgICAgICAgICAgICAgIGZy YWN0aW9uOiAxLjAKKyAgICAgICAgICAgcmVzcGVjdEZsaXBwZWQ6IFlFUworICAgICAgICAgICAg ICAgIGhpbnRzOiBuaWxdOworI2Vsc2UKKyAgICAgIFtpbWcgY29tcG9zaXRlVG9Qb2ludDogTlNN YWtlUG9pbnQgKHgsIHkgKyBzLT5zbGljZS5oZWlnaHQpCisgICAgICAgICAgICAgICAgICBvcGVy YXRpb246IE5TQ29tcG9zaXRlU291cmNlT3Zlcl07CisjZW5kaWYKKyAgICB9CisgIGlmIChzLT5o bCA9PSBEUkFXX0NVUlNPUikKKyAgICB7CisgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChzLT5m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9PURSQVdfSU1BR0VfU1VOS0VOKQorICAgIHsK KyAgICAgIGlmIChzLT5obCA9PSBEUkFXX0lNQUdFX1NVTktFTiB8fCBzLT5obCA9PSBEUkFXX0lN QUdFX1JBSVNFRCkKKyAgICAgICAgeworICAgICAgICAgIHRoID0gdG9vbF9iYXJfYnV0dG9uX3Jl bGllZiA+PSAwID8KKyAgICAgICAgICAgIHRvb2xfYmFyX2J1dHRvbl9yZWxpZWYgOiBERUZBVUxU X1RPT0xfQkFSX0JVVFRPTl9SRUxJRUY7CisgICAgICAgICAgcmFpc2VkX3AgPSAocy0+aGwgPT0g RFJBV19JTUFHRV9SQUlTRUQpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7 CisgICAgICAgICAgICB0aCA9IGFicyAocy0+aW1nLT5yZWxpZWYpOworICAgICAgICAgICAgcmFp c2VkX3AgPSAocy0+aW1nLT5yZWxpZWYgPiAwKTsKKyAgICAgICAgICB9CisgICAgICByLm9yaWdp bi54ID0geCAtIHRoOworICAgICAgci5vcmlnaW4ueSA9IHkgLSB0aDsKKyAgICAgIHIuc2l6ZS53 aWR0aCA9IHMtPnNsaWNlLndpZHRoICsgMip0aC0xOworICAgICAgci5zaXplLmhlaWdodCA9IHMt PnNsaWNlLmhlaWdodCArIDIqdGgtMTsKKyAgICAgIG5zX2RyYXdfcmVsaWVmIChyLCB0aCwgcmFp c2VkX3AsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueSA9PSAwLAorICAgICAgICAg ICAgICAgICAgICAgIHMtPnNsaWNlLnkgKyBzLT5zbGljZS5oZWlnaHQgPT0gcy0+aW1nLT5oZWln aHQsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueCA9PSAwLAorICAgICAgICAgICAg ICAgICAgICAgIHMtPnNsaWNlLnggKyBzLT5zbGljZS53aWR0aCA9PSBzLT5pbWctPndpZHRoLCBz KTsKKyAgICB9CisgIC8qIElmIHRoZXJlIGlzIG5vIG1hc2ssIHRoZSBiYWNrZ3JvdW5kIHdvbid0 IGJlIHNlZW4sCisgICAgIHNvIGRyYXcgYSByZWN0YW5nbGUgb24gdGhlIGltYWdlIGZvciB0aGUg Y3Vyc29yLgorICAgICBEbyB0aGlzIGZvciBhbGwgaW1hZ2VzLCBnZXR0aW5nIHRyYW5zcGFyZW5j eSByaWdodCBpcyBub3QgcmVsaWFibGUuICovCisgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUikK KyAgICB7CisgICAgICBpbnQgdGhpY2tuZXNzID0gYWJzIChzLT5pbWctPnJlbGllZik7CisgICAg ICBpZiAodGhpY2tuZXNzID09IDApIHRoaWNrbmVzcyA9IDE7CisgICAgaWYgKGdseXBoX2ZsYXZv ciA9PSBNQ19HTFlQSAorICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTKQor ICAgICAgeworICAgICAgICBOU0NvbG9yICpib3JkZXJfY29sb3IgPSBbTlNDb2xvciBjb2xvcldp dGhDYWxpYnJhdGVkUmVkOiBsc2wucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IGxzbC5ncmVlbgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBibHVlOiBsc2wu Ymx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGFscGhhOiAxLjBdOworICAgICAgICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywg Ym9yZGVyX2NvbG9yLCAxLCAxKTsKKyAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgbnNfZHJh d19ib3ggKGJyLCB0aGlja25lc3MsIEZSQU1FX0NVUlNPUl9DT0xPUiAocy0+ZiksIDEsIDEpOwor ICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX21heWJlX2R1bXBnbHlwa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YWNlX2ZhY2VfaWQpOworICAgICAgICAgICAgICBpZiAoIWZh Y2UpCisgICAgICAgICAgICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgTU9VU0VfRkFD RV9JRCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZh Y2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIHMtPmZpcnN0X2dseXBoLT5mYWNlX2lkKTsKKyAgICAg ICAgICBpZiAoIWZhY2UtPnN0aXBwbGUpCisgICAgICAgICAgICBbKE5TX0ZBQ0VfQkFDS0dST1VO RCAoZmFjZSkgIT0gMAorICAgICAgICAgICAgICA/IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChO U19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBzLT5mKQorICAgICAgICAgICAgICA6IEZSQU1FX0JB Q0tHUk9VTkRfQ09MT1IgKHMtPmYpKSBzZXRdOworICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgc3RydWN0IG5zX2Rpc3BsYXlfaW5mbyAqZHB5aW5mbyA9 IEZSQU1FX0RJU1BMQVlfSU5GTyAocy0+Zik7CisgICAgICAgICAgICAgICAgW1tkcHlpbmZvLT5i aXRtYXBzW2ZhY2UtPnN0aXBwbGUtMV0uaW1nIHN0aXBwbGVNYXNrXSBzZXRdOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgaWYgKHMtPmhsICE9IERSQVdfQ1VSU09SKQorICAgICAgICAgICAg eworICAgICAgICAgICAgICBzLT5yZWN0YW5nbGVfbnVrZWRfcCA9IHRydWU7CisgICAgICAgICAg ICAgIE5TUmVjdCByID0gTlNNYWtlUmVjdCAocy0+eCwgcy0+eSArIGJveF9saW5lX3dpZHRoLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+YmFja2dyb3VuZF93aWR0aCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPmhlaWdodC0yKmJveF9saW5l X3dpZHRoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICAgIH0KKyAgICB9Cit9 CisKK3N0YXRpYyB2b2lkCittY19uc19kcmF3X2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0 cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3csCisgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2wsIGVudW0gbWNf Zmxhdm9yIGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1 cnNvcl90eXBlIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgIGludCB3ZCwg Ym9vbCBhY3RpdmVfcCwgYm9vbCBjdXJzb3JfZ2NfcCkKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisg ICAgICBFeHRlcm5hbCAoUklGKTogTWFpbiBkcmF3LXRleHQgY2FsbC4KKyAgIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCit7CisgIE5TUmVjdCByWzJdOworICBpbnQgbjsKKyAgY2hhciBib3hfZHJhd25f cCA9IDA7CisgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgaWYgKCFmb250 KQorICAgIGZvbnQgPSBGUkFNRV9GT05UIChzLT5mKTsKKyAgTlNUUkFDRV9XSEVOIChOU1RSQUNF X0dST1VQX0dMWVBIUywgIm1jX25zX2RyYXdfZ2x5cGhfc3RyaW5nIik7CisgIGlmIChzLT5uZXh0 ICYmIHMtPnJpZ2h0X292ZXJoYW5nICYmICFzLT5mb3Jfb3ZlcmxhcHMpCisgICAgeworICAgICAg aW50IHdpZHRoOworICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgIGZvciAo d2lkdGggPSAwLCBuZXh0ID0gcy0+bmV4dDsKKyAgICAgICAgICAgbmV4dCAmJiB3aWR0aCA8IHMt PnJpZ2h0X292ZXJoYW5nOworICAgICAgICAgICB3aWR0aCArPSBuZXh0LT53aWR0aCwgbmV4dCA9 IG5leHQtPm5leHQpCisgICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSAhPSBJTUFH RV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5cGgt PnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg IG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocy0+bmV4dCwgcik7CisgICAgICAg ICAgICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAgICAgICAgICAg ICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFj a2dyb3VuZCAocy0+bmV4dCwgMSk7CisgICAgICAgICAgICAgICAgbnNfcmVzZXRfY2xpcHBpbmcg KHMtPmYpOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg ICAgICBtY19uc19kdW1wZ2x5cGhzX3N0cmV0Y2ggKHMtPm5leHQsIG1hdHJpeCwgcm93LCB3ZCk7 CisgICAgICAgICAgICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgIH0KKyAgICB9Cisg IGlmICghcy0+Zm9yX292ZXJsYXBzICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JPWAorICAg ICAgJiYgKHMtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgICB8fCBz LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpKQorICAgIHsKKyAgICAgIG4g PSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2Ns aXBfdG9fcmVjdCAocy0+ZiwgciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIG1jX25zX21h eWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZCAocywgMSk7CisgICAgICBuc19kdW1wZ2x5cGhzX2Jv eF9vcl9yZWxpZWYgKHMpOworICAgICAgbnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAg Ym94X2RyYXduX3AgPSAxOworICAgIH0KKyAgc3dpdGNoIChzLT5maXJzdF9nbHlwaC0+dHlwZSkK KyAgICB7CisgICAgY2FzZSBJTUFHRV9HTFlQSDoKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3Ry aW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+Ziwg ciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIG1jX25zX2R1bXBnbHlwaHNfaW1hZ2UgKHMs IHJbMF0sIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgYWN0aXZlX3ApOworICAgICAg bnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBTVFJFVENI X0dMWVBIOgorICAgICAgbWNfbnNfZHVtcGdseXBoc19zdHJldGNoIChzLCBtYXRyaXgsIHJvdywg d2QpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBDSEFSX0dMWVBIOgorICAgIGNhc2UgQ09NUE9T SVRFX0dMWVBIOgorICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCBy KTsKKyAgICAgIGlmICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0 dXJuOworICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcworICAgICAgICAgIHx8IChzLT5jbXBfZnJv bSA+IDAKKyAgICAgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGlj KSkKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICAgIGVsc2UKKyAg ICAgICAgICBtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91bmQgKHMsIHMtPmZpcnN0X2ds eXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCk7CisgICAgICBpbnQgZmxhZ3MgPSAocy0+aGwg PT0gRFJBV19DVVJTT1IpCisgICAgICAgICAgICAgICAgICAgID8gTlNfRFVNUEdMWVBIX0NVUlNP UgorICAgICAgICAgICAgICAgICAgOiAocy0+aGwgPT0gRFJBV19NT1VTRV9GQUNFKQorICAgICAg ICAgICAgICAgICAgICA/IE5TX0RVTVBHTFlQSF9NT1VTRUZBQ0UKKyAgICAgICAgICAgICAgICAg IDogKHMtPmZvcl9vdmVybGFwcykKKyAgICAgICAgICAgICAgICAgICAgPyBOU19EVU1QR0xZUEhf Rk9SRUdST1VORAorICAgICAgICAgICAgICAgICAgOiBOU19EVU1QR0xZUEhfTk9STUFMOworICAg ICAgdW5zaWduZWQgbG9uZyBzYXZlZF9mZyA9IE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSk7 CisgICAgICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IgJiYgY3Vyc29yX3R5cGUgPT0gTUNfRklM TEVEX0JPWCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdG1wID0gTlNfRkFD RV9CQUNLR1JPVU5EIChzLT5mYWNlKTsKKyAgICAgICAgICBOU19GQUNFX0JBQ0tHUk9VTkQgKHMt PmZhY2UpID0gTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKTsKKyAgICAgICAgICBOU19GQUNF X0ZPUkVHUk9VTkQgKHMtPmZhY2UpID0gdG1wOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYg KHMtPmhsID09IERSQVdfQ1VSU09SCisgICAgICAgICAgICAgICAgICYmIGN1cnNvcl90eXBlID09 IE1DX0ZSQU1FRF9CT1gKKyAgICAgICAgICAgICAgICAgJiYgYWN0aXZlX3ApCisgICAgICAgICAg eworICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfZmFjZV9pZCA9CisgICAg ICAgICAgICAgIGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBpbnRlcm4gKCIrLXJlYWwt ZmFrZS1jdXJzb3ItcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICBzdHJ1Y3QgZmFj ZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBob2xsb3dfYWN0aXZl X2ZhY2VfaWQpOworICAgICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9IE5T X0ZBQ0VfRk9SRUdST1VORCAoaG9sbG93X2FjdGl2ZV9mYWNlKTsKKyAgICAgICAgICB9CisgICAg ICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAgICAgICAgICAm JiBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisgICAgICAgICAgICAgICAgICAgJiYgYWN0 aXZlX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3df aW5hY3RpdmVfZmFjZV9pZCA9CisgICAgICAgICAgICAgICAgbG9va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/IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVH Uk9VTkQgKHMtPmZhY2UpLCBzLT5mKQorICAgICAgICAgICAgICAgICAgICAgOiBGUkFNRV9GT1JF R1JPVU5EX0NPTE9SIChzLT5mKSk7CisgICAgICBbY29sIHNldF07CisgICAgICAvKiBEcmF3IHVu ZGVybGluZSwgb3ZlcmxpbmUsIHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgbWNfbnNfZHJhd190 ZXh0X2RlY29yYXRpb24gKHMsIHMtPmZhY2UsIGNvbCwgcy0+d2lkdGgsIHMtPngpOworICAgICAg aWYgKHMtPmZpcnN0X2dseXBoLT50eXBlICE9IENPTVBPU0lURV9HTFlQSAorICAgICAgICAgICYm IChzLT5sZWZ0X292ZXJ3cml0dGVuX3AgfHwgcy0+cmlnaHRfb3ZlcndyaXR0ZW5fcCkKKyAgICAg ICAgICAmJiAocy0+YmFja2dyb3VuZF9udWtlZF9wIHx8IHMtPnJlY3RhbmdsZV9udWtlZF9wKQor ICAgICAgICAgICYmIChzLT5hY3Rpb25fdHlwZSA9PSBNQ19EUkFXX0dMWVBIX1NUUklOR3x8IHMt PmFjdGlvbl90eXBlID09IE1DX0VSQVNFX0dMWVBIX1NUUklORykpCisgICAgICAgIG1jX25zX2Ry YXdfb3ZlcndyaXR0ZW4gKHMsIG1hdHJpeCwgcm93LCBzLT5maXJzdF9nbHlwaCk7CisgICAgICBp ZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19G SUxMRURfQk9YKQorICAgICAgICB7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyB0bXAgPSBOU19G QUNFX0JBQ0tHUk9VTkQgKHMtPmZhY2UpOworICAgICAgICAgIE5TX0ZBQ0VfQkFDS0dST1VORCAo cy0+ZmFjZSkgPSBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpOworICAgICAgICAgIE5TX0ZB Q0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSB0bXA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBp ZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3R5cGUg PT0gTUNfRlJBTUVEX0JPWCkKKyAgICAgICAgICBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2Up ID0gc2F2ZWRfZmc7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBicmVh azsKKyAgICBjYXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3Ry aW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+Ziwg ciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMKKyAgICAg ICAgICB8fCAocy0+Y21wX2Zyb20gPiAwCisgICAgICAgICAgICAgICYmICEgcy0+Zmlyc3RfZ2x5 cGgtPnUuY21wLmF1dG9tYXRpYykpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSAx OworICAgICAgZWxzZQorICAgICAgICBtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91bmQg KHMsIHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCk7CisgICAgICBuc19y ZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAg ZW1hY3NfYWJvcnQgKCk7CisgICAgfQorICAvKiBEcmF3IGJveCBpZiBub3QgZG9uZSBhbHJlYWR5 LiAqLworICBpZiAoIXMtPmZvcl9vdmVybGFwcworICAgICAgJiYgIWJveF9kcmF3bl9wCisgICAg ICAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gpCisgICAgeworICAgICAgbiA9IG5zX2dl dF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICghbnNfY2xpcF90b19y ZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgbnNfZHVtcGdseXBoc19i b3hfb3JfcmVsaWVmIChzKTsKKyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICB9 CisgIHMtPm51bV9jbGlwcyA9IDA7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogCiAgICBO U1RSQUNFLCBUcmFjZSBzdXBwb3J0LgpAQCAtMTA3OSw2ICsyMDQ4LDE2IEBAIHN0YXRpYyBOU1Jl Y3QgY29uc3RyYWluX2ZyYW1lX3JlY3QoTlNSZWN0IGZyYW1lUmVjdCwgYm9vbCBpc0Z1bGxzY3Jl ZW4pCiAgICBleHRlcm5hbCAoUklGKSBjYWxsOyB3aG9sZSBmcmFtZSwgY2FsbGVkIGJlZm9yZSBn dWlfdXBkYXRlX3dpbmRvd19iZWdpbgogICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIHsKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5t Y191cGRhdGluZ19mcmFtZSA9IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNp ZmRlZiBOU19JTVBMX0NPQ09BCiAgIEVtYWNzVmlldyAqdmlldyA9IEZSQU1FX05TX1ZJRVcgKGYp OwogCkBAIC0xMTA5LDYgKzIwODgsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5fZnJhbWVf cmVjdChOU1JlY3QgZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKIAogLyogICBpZiAoZiA9 PSBNT1VTRV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9tb3VzZV9mcmFtZSkgKi8KICAgTU9VU0Vf SExfSU5GTyAoZiktPm1vdXNlX2ZhY2VfZGVmZXIgPSAwOworCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1l ID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTQ3NTks NiArNTc0OCwxNyBAQCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlkIGluY29taW5nIGV2ZW50 cykuCiAgICAgICBiYXIgPSBbW0VtYWNzU2Nyb2xsZXIgYWxsb2NdIGluaXRGcmFtZTogciB3aW5k b3c6IHdpbl07CiAgICAgICB3c2V0X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHdpbmRvdywgbWFrZV9t aW50X3B0ciAoYmFyKSk7CiAgICAgICB1cGRhdGVfcCA9IFlFUzsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgLyogVGhpcyBpcyBv bmx5IGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMuICovCisgICAgICBbYmFyIG1jX3NldF9yZWN0YW5n bGU6IHJdOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgfQogICBlbHNlCiAg ICAgewpAQCAtNDc2NiwxMiArNTc2NiwzMCBAQCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlk IGluY29taW5nIGV2ZW50cykuCiAgICAgICBiYXIgPSBYTlNfU0NST0xMX0JBUiAod2luZG93LT52 ZXJ0aWNhbF9zY3JvbGxfYmFyKTsKICAgICAgIG9sZFJlY3QgPSBbYmFyIGZyYW1lXTsKICAgICAg IHIuc2l6ZS53aWR0aCA9IG9sZFJlY3Quc2l6ZS53aWR0aDsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAgICAgaWYgKEZSQU1FX0xJVkVf UCAoZikgJiYgIU5TRXF1YWxSZWN0cyAob2xkUmVjdCwgcikpCiAgICAgICAgIHsKKyAgICAgICAg ICAvKiBUaGUgbWFpbiB3aW5kb3cgaGFzIHByb2JhYmx5IGJlZW4gcmVzaXplZC4gIEdyYWNpb3Vz bHkgZGVsZXRlIHRoZQorICAgICAgICAgIG9sZCBzY3JvbGwgYmFyIHdpdGhvdXQgcmVwYWludGlu ZyBpdHMgcmVjdGFuZ2xlOyBhbmQsIGNyZWF0ZSBhIG5ldworICAgICAgICAgIHNjcm9sbCBiYXIg ZWxzZXdoZXJlLiovCiAgICAgICAgICAgaWYgKG9sZFJlY3Qub3JpZ2luLnggIT0gci5vcmlnaW4u eCkKKyAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgbnNfY2xlYXJfZnJhbWVfYXJlYSAoZiwg bGVmdCwgdG9wLCB3aWR0aCwgaGVpZ2h0KTsKKyAgICAgICAgICAgICAgW2JhciBtY19qdWRnZV07 CisgICAgICAgICAgICAgIGJhciA9IFtbRW1hY3NTY3JvbGxlciBhbGxvY10gaW5pdEZyYW1lOiBy IHdpbmRvdzogd2luXTsKKyAgICAgICAgICAgICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyICh3 aW5kb3csIG1ha2VfbWludF9wdHIgKGJhcikpOworICAgICAgICAgICAgfQorICAgICAgICAgICAg ZWxzZQogICAgICAgICAgIFtiYXIgc2V0RnJhbWU6IHJdOwogICAgICAgICB9CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgICB9CiAKICAgaWYgKHVwZGF0ZV9wKQpAQCAtNDkzMSw5 ICs1OTQ5LDU3IEBAIGluIGNlcnRhaW4gc2l0dWF0aW9ucyAocmFwaWQgaW5jb21pbmcgZXZlbnRz KS4KICAgICB7CiAgICAgICB2aWV3ID0gW3N1YnZpZXdzIG9iamVjdEF0SW5kZXg6IGldOwogICAg ICAgaWYgKCFbdmlldyBpc0tpbmRPZkNsYXNzOiBbRW1hY3NTY3JvbGxlciBjbGFzc11dKSBjb250 aW51ZTsKLSAgICAgIGlmIChbdmlldyBqdWRnZV0pCisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogYFhTRVRXSU5ET1cnIHdpbGwgc29t ZXRpbWVzIGNhdXNlIEVtYWNzIHRvIGNyYXNoIHdoZW4gcnVubmluZyB1bmRlciBnZGIgZXZlbgor ICB0aG91Z2ggKHcgIT0gTlVMTCkuICBUaGVyZWZvcmUsIHdlIGNhbm5vdCByZWxpYWJseSB1c2Ug YFdJTkRPV19MSVZFX1AnLiAqLworICBzdHJ1Y3Qgd2luZG93ICp3ID0gW3ZpZXcgbWNfZ2V0X3dp bmRvd107CisgIGlmICh3ICE9IE5VTEwKKyAgICAgICYmIE5JTFAgKHctPmNvbnRlbnRzKSkKKyAg ICB7CisgICAgICBCT09MIGRlYnVnX3AgPSBmYWxzZTsKKyAgICAgIGlmIChkZWJ1Z19wCisgICAg ICAgICAgLyogYHdpbmRvd19ib3gnIGNhbGxzIGB3aW5kb3dfYm94X2hlaWdodCcsIHdoaWNoIHdp bGwgY2F1c2UgRW1hY3MgdG8KKyAgICAgICAgICBjcmFzaCBpZiBGUkFNRVAgKHctPmZyYW1lKSBp cyBub3Qgc2F0aXNmaWVkLiAqLworICAgICAgICAgICYmIEZSQU1FUCAody0+ZnJhbWUpKQorICAg ICAgICB7CisgICAgICAgICAgTlNSZWN0IHIwID0gW3ZpZXcgbWNfZ2V0X3JlY3RhbmdsZV07Cisg ICAgICAgICAgaW50IHgwID0gTlNNaW5YIChyMCk7CisgICAgICAgICAgaW50IHkwID0gTlNNaW5Z IChyMCk7CisgICAgICAgICAgaW50IHdkMCA9IE5TV2lkdGggKHIwKTsKKyAgICAgICAgICBpbnQg aDAgPSBOU0hlaWdodCAocjApOworICAgICAgICAgIGludCB3aW5kb3dfeSwgd2luZG93X2hlaWdo dDsKKyAgICAgICAgICB3aW5kb3dfYm94ICh3LCBBTllfQVJFQSwgMCwgJndpbmRvd195LCAwLCAm d2luZG93X2hlaWdodCk7CisgICAgICAgICAgaW50IHRvcCA9IHdpbmRvd195OworICAgICAgICAg IGludCBoZWlnaHQgPSB3aW5kb3dfaGVpZ2h0OworICAgICAgICAgIGludCB3aWR0aCA9IFdJTkRP V19DT05GSUdfU0NST0xMX0JBUl9DT0xTICh3KSAqIEZSQU1FX0NPTFVNTl9XSURUSCAoZik7Cisg ICAgICAgICAgaW50IGxlZnQgPSBXSU5ET1dfU0NST0xMX0JBUl9BUkVBX1ggKHcpOworICAgICAg ICAgIE5TUmVjdCByMSA9IE5TTWFrZVJlY3QgKGxlZnQsIHRvcCwgd2lkdGgsIGhlaWdodCk7Cisg ICAgICAgICAgLyogVGhlIHBhcmVudCB2aWV3IGlzIGZsaXBwZWQsIHNvIHdlIG5lZWQgdG8gZmxp cCB5IHZhbHVlLiAqLworICAgICAgICAgIEVtYWNzVmlldyAqZnJhbWVfdmlldyA9IEZSQU1FX05T X1ZJRVcgKGYpOworICAgICAgICAgIE5TUmVjdCB2ID0gW2ZyYW1lX3ZpZXcgZnJhbWVdOworICAg ICAgICAgIHIxLm9yaWdpbi55ID0gKHYuc2l6ZS5oZWlnaHQgLSByMS5zaXplLmhlaWdodCAtIHIx Lm9yaWdpbi55KTsKKyAgICAgICAgICBpbnQgeDEgPSBOU01pblggKHIxKTsKKyAgICAgICAgICBp bnQgeTEgPSBOU01pblkgKHIxKTsKKyAgICAgICAgICBpbnQgd2QxID0gTlNXaWR0aCAocjEpOwor ICAgICAgICAgIGludCBoMSA9IE5TSGVpZ2h0IChyMSk7CisgICAgICAgICAgZnByaW50ZiAoc3Rk ZXJyLCAiJXMgLS0gREVBRDpcblwKKyAgICAgICAgICB4MC94MSAoJWQvJWQpIHwgeTAveTEgKCVk LyVkKSB8IHdkMC93ZDEgKCVkLyVkKSB8IGgwL2gxICglZC8lZClcbiIsCisgICAgICAgICAgbWNf d2luZG93ICh3KSwgeDAsIHgxLCB5MCwgeTEsIHdkMCwgd2QxLCBoMCwgaDEpOworICAgICAgICB9 CisgICAgICBpZiAoW3ZpZXcgbWNfanVkZ2VdKQogICAgICAgICByZW1vdmVkID0gWUVTOwogICAg IH0KKyAgICBlbHNlIGlmIChbdmlldyBqdWRnZV0pCisgICAgICByZW1vdmVkID0gWUVTOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCisgICAgfQogCiAgIGlmIChyZW1vdmVkKQogICAg IFtldmlldyB1cGRhdGVGcmFtZVNpemU6IE5PXTsKQEAgLTUwNzQsNiArNjE0MCwyMCBAQCBzdGF0 aWMgTGlzcF9PYmplY3QgbnNfc3RyaW5nX3RvX2xpc3Btb2QgKGNvbnN0IGNoYXIgKnMpCiBleHRl cm4gZnJhbWVfcGFybV9oYW5kbGVyIG5zX2ZyYW1lX3Bhcm1faGFuZGxlcnNbXTsKIHN0YXRpYyBz dHJ1Y3QgcmVkaXNwbGF5X2ludGVyZmFjZSBuc19yZWRpc3BsYXlfaW50ZXJmYWNlID0KIHsKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyog YHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGBuc3Rlcm0ubWAgbXVzdCBiZSBpbiB0aGUgZXhhY3Qg c2FtZSBvcmRlciBhcyB0aGUKK2ByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4dGVybi5o YCEgKi8KKworICBtY19uc19kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1jX25zX2RyYXdfZ2x5cGhf c3RyaW5nLAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIG5zX2ZyYW1lX3Bhcm1f aGFuZGxlcnMsCiAgIGd1aV9wcm9kdWNlX2dseXBocywKICAgZ3VpX3dyaXRlX2dseXBocywKQEAg LTg3MTEsNiArOTc5MSw0OSBAQCAtIChCT09MKWNhbkJlY29tZU1haW5XaW5kb3cKIAogQGltcGxl bWVudGF0aW9uIEVtYWNzU2Nyb2xsZXIKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworLSAodm9pZCltY19zZXRfcmVjdGFuZ2xlOiAoTlNSZWN0 KXJlY3QKK3sKKyAgbWNfcmVjdGFuZ2xlID0gcmVjdDsKK30KKworLSAoTlNSZWN0KW1jX2dldF9y ZWN0YW5nbGUKK3sKKyAgcmV0dXJuIG1jX3JlY3RhbmdsZTsKK30KKworLSAoc3RydWN0IHdpbmRv dyAqKW1jX2dldF93aW5kb3cKK3sKKyAgcmV0dXJuIHdpbmRvdzsKK30KKworLSAoYm9vbCltY19q dWRnZQoreworICBOU1RSQUNFICgiW0VtYWNzU2Nyb2xsZXIgbWNfanVkZ2VdIik7CisgIGJvb2wg cmV0ID0gY29uZGVtbmVkOworICBibG9ja19pbnB1dCAoKTsKKyAgaWYgKGNvbmRlbW5lZCkKKyAg ICB7CisgICAgICAvKiBlbnN1cmUgb3RoZXIgc2Nyb2xsYmFyIHVwZGF0ZXMgYWZ0ZXIgZGVsZXRp b24gKi8KKyAgICAgIEVtYWNzVmlldyAqdmlldyA9IChFbWFjc1ZpZXcgKilGUkFNRV9OU19WSUVX IChmcmFtZSk7CisgICAgICBpZiAodmlldyAhPSBuaWwpCisgICAgICAgIHZpZXctPnNjcm9sbGJh cnNOZWVkaW5nVXBkYXRlKys7CisgICAgfQorICBpZiAod2luZG93KQorICAgIHdzZXRfdmVydGlj YWxfc2Nyb2xsX2JhciAod2luZG93LCBRbmlsKTsKKyAgd2luZG93ID0gMDsKKyAgW3NlbGYgcmVt b3ZlRnJvbVN1cGVydmlld1dpdGhvdXROZWVkaW5nRGlzcGxheV07CisgIFtzZWxmIHJlbGVhc2Vd OworICB1bmJsb2NrX2lucHV0ICgpOworICByZXR1cm4gcmV0OworfQorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAvKiBm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AorICAgICAgbWNfcHJvY2Vzc19xdWl0X2ZsYWcgKCk7CQkJ CVwKKyAgICBlbHNlIGlmIChwZW5kaW5nX3NpZ25hbHMpCQkJCVwKKyAgICAgIHByb2Nlc3NfcGVu ZGluZ19zaWduYWxzICgpOwkJCVwKKyAgfSB3aGlsZSAoZmFsc2UpCisKK3N0YXRpYyBMaXNwX09i amVjdAorbWNfdzMyX2NvbG9yX21hcF9sb29rdXAgKGNvbnN0IGNoYXIgKmNvbG9ybmFtZSkKK3sK KyAgTGlzcF9PYmplY3QgdGFpbCwgcmV0ID0gUW5pbDsKKyAgYmxvY2tfaW5wdXQgKCk7CisgIGZv ciAodGFpbCA9IFZ3MzJfY29sb3JfbWFwOyBDT05TUCAodGFpbCk7IHRhaWwgPSBYQ0RSICh0YWls KSkKKyAgICB7CisgICAgICByZWdpc3RlciBMaXNwX09iamVjdCBlbHQsIHRlbTsKKyAgICAgIGVs dCA9IFhDQVIgKHRhaWwpOworICAgICAgaWYgKCFDT05TUCAoZWx0KSkgY29udGludWU7CisgICAg ICB0ZW0gPSBYQ0FSIChlbHQpOworICAgICAgaWYgKGxzdHJjbXBpIChTU0RBVEEgKHRlbSksIGNv bG9ybmFtZSkgPT0gMCkKKyAgICAgICAgeworICAgICAgICAgIHJldCA9IEZjZHIgKGVsdCk7Cisg ICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIE1DX1FVSVQ7CisgICAgfQorICB1bmJs b2NrX2lucHV0ICgpOworICByZXR1cm4gcmV0OworfQorCitzdGF0aWMgTGlzcF9PYmplY3QKK21j X3hfdG9fdzMyX2NvbG9yIChjb25zdCBjaGFyICogY29sb3JuYW1lKQoreworICByZWdpc3RlciBM aXNwX09iamVjdCByZXQgPSBRbmlsOworICBibG9ja19pbnB1dCAoKTsKKyAgaWYgKGNvbG9ybmFt ZVswXSA9PSAnIycpCisgICAgeworICAgICAgLyogQ291bGQgYmUgYW4gb2xkLXN0eWxlIFJHQiBE ZXZpY2Ugc3BlY2lmaWNhdGlvbi4gKi8KKyAgICAgIGludCBzaXplID0gc3RybGVuIChjb2xvcm5h bWUgKyAxKTsKKyAgICAgIGNoYXIgKmNvbG9yID0gYWxsb2NhIChzaXplICsgMSk7CisgICAgICBz dHJjcHkgKGNvbG9yLCBjb2xvcm5hbWUgKyAxKTsKKyAgICAgIGlmIChzaXplID09IDMgfHwgc2l6 ZSA9PSA2IHx8IHNpemUgPT0gOSB8fCBzaXplID09IDEyKQorICAgICAgICB7CisgICAgICAgICAg VUlOVCBjb2xvcnZhbDsKKyAgICAgICAgICBpbnQgaSwgcG9zOworICAgICAgICAgIHBvcyA9IDA7 CisgICAgICAgICAgc2l6ZSAvPSAzOworICAgICAgICAgIGNvbG9ydmFsID0gMDsKKyAgICAgICAg ICBmb3IgKGkgPSAwOyBpIDwgMzsgaSsrKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBj aGFyICplbmQ7CisgICAgICAgICAgICAgIGNoYXIgdDsKKyAgICAgICAgICAgICAgdW5zaWduZWQg bG9uZyB2YWx1ZTsKKyAgICAgICAgICAgICAgLyogVGhlIGNoZWNrIGZvciAneCcgaW4gdGhlIGZv bGxvd2luZyBjb25kaXRpb25hbCB0YWtlcyBpbnRvCisgICAgICAgICAgICAgIGFjY291bnQgdGhl IGZhY3QgdGhhdCBzdHJ0b2wgYWxsb3dzIGEgIjB4IiBpbiBmcm9udCBvZgorICAgICAgICAgICAg ICBvdXIgbnVtYmVycywgYW5kIHdlIGRvbid0LiAqLworICAgICAgICAgICAgICBpZiAoIWlzeGRp Z2l0IChjb2xvclswXSkgfHwgY29sb3JbMV0gPT0gJ3gnKQorICAgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgICB0ID0gY29sb3Jbc2l6ZV07CisgICAgICAgICAgICAgIGNvbG9yW3Np emVdID0gJ1wwJzsKKyAgICAgICAgICAgICAgdmFsdWUgPSBzdHJ0b3VsIChjb2xvciwgJmVuZCwg MTYpOworICAgICAgICAgICAgICBjb2xvcltzaXplXSA9IHQ7CisgICAgICAgICAgICAgIGlmIChl cnJubyA9PSBFUkFOR0UgfHwgZW5kIC0gY29sb3IgIT0gc2l6ZSkKKyAgICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgICAgc3dpdGNoIChzaXplKQorICAgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICBjYXNlIDE6CisgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlICog MHgxMDsKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMjoK KyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMzoKKyAgICAg ICAgICAgICAgICAgIHZhbHVlIC89IDB4MTA7CisgICAgICAgICAgICAgICAgICBicmVhazsKKyAg ICAgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAgICAgICB2YWx1ZSAvPSAweDEwMDsK KyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgY29sb3J2YWwgfD0gKHZhbHVlIDw8IHBvcyk7CisgICAgICAgICAgICAgIHBvcyArPSAweDg7 CisgICAgICAgICAgICAgIGlmIChpID09IDIpCisgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgICAgIFhTRVRJTlQgKHJl dCwgY29sb3J2YWwpOworICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldDsKKyAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgIGNvbG9yID0gZW5kOworICAgICAgICAgICAgfQorICAgICAg ICB9CisgICAgfQorICBlbHNlIGlmIChzdHJuaWNtcCAoY29sb3JuYW1lLCAicmdiOiIsIDQpID09 IDApCisgICAgeworICAgICAgY29uc3QgY2hhciAqY29sb3I7CisgICAgICBVSU5UIGNvbG9ydmFs OworICAgICAgaW50IGksIHBvczsKKyAgICAgIHBvcyA9IDA7CisgICAgICBjb2xvcnZhbCA9IDA7 CisgICAgICBjb2xvciA9IGNvbG9ybmFtZSArIDQ7CisgICAgICBmb3IgKGkgPSAwOyBpIDwgMzsg aSsrKQorICAgICAgICB7CisgICAgICAgICAgY2hhciAqZW5kOworICAgICAgICAgIHVuc2lnbmVk IGxvbmcgdmFsdWU7CisgICAgICAgICAgLyogVGhlIGNoZWNrIGZvciAneCcgaW4gdGhlIGZvbGxv d2luZyBjb25kaXRpb25hbCB0YWtlcyBpbnRvCisgICAgICAgICAgICAgYWNjb3VudCB0aGUgZmFj dCB0aGF0IHN0cnRvbCBhbGxvd3MgYSAiMHgiIGluIGZyb250IG9mCisgICAgICAgICAgICAgb3Vy IG51bWJlcnMsIGFuZCB3ZSBkb24ndC4gKi8KKyAgICAgICAgICBpZiAoIWlzeGRpZ2l0IChjb2xv clswXSkgfHwgY29sb3JbMV0gPT0gJ3gnKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg dmFsdWUgPSBzdHJ0b3VsIChjb2xvciwgJmVuZCwgMTYpOworICAgICAgICAgIGlmIChlcnJubyA9 PSBFUkFOR0UpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICBzd2l0Y2ggKGVuZCAtIGNv bG9yKQorICAgICAgICAgICAgeworICAgICAgICAgICAgY2FzZSAxOgorICAgICAgICAgICAgICB2 YWx1ZSA9IHZhbHVlICogMHgxMCArIHZhbHVlOworICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgIGNhc2UgMjoKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDM6 CisgICAgICAgICAgICAgIHZhbHVlIC89IDB4MTA7CisgICAgICAgICAgICAgIGJyZWFrOworICAg ICAgICAgICAgY2FzZSA0OgorICAgICAgICAgICAgICB2YWx1ZSAvPSAweDEwMDsKKyAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICB2YWx1ZSA9 IFVMT05HX01BWDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBpZiAodmFsdWUgPT0gVUxPTkdf TUFYKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgY29sb3J2YWwgfD0gKHZhbHVlIDw8 IHBvcyk7CisgICAgICAgICAgcG9zICs9IDB4ODsKKyAgICAgICAgICBpZiAoaSA9PSAyKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoKmVuZCAhPSAnXDAnKQorICAgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAg ICBYU0VUSU5UIChyZXQsIGNvbG9ydmFsKTsKKyAgICAgICAgICAgICAgcmV0dXJuIHJldDsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgICBpZiAoKmVuZCAhPSAnLycpCisgICAgICAgICAgICBicmVh azsKKyAgICAgICAgICBjb2xvciA9IGVuZCArIDE7CisgICAgICAgIH0KKyAgICB9CisgICAgZWxz ZSBpZiAoc3RybmljbXAgKGNvbG9ybmFtZSwgInJnYmk6IiwgNSkgPT0gMCkKKyAgICAgIHsKKyAg ICAgICAgLyogVGhpcyBpcyBhbiBSR0IgSW50ZW5zaXR5IHNwZWNpZmljYXRpb24uICovCisgICAg ICAgIGNvbnN0IGNoYXIgKmNvbG9yOworICAgICAgICBVSU5UIGNvbG9ydmFsOworICAgICAgICBp bnQgaSwgcG9zOworICAgICAgICBwb3MgPSAwOworICAgICAgICBjb2xvcnZhbCA9IDA7CisgICAg ICAgIGNvbG9yID0gY29sb3JuYW1lICsgNTsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IDM7IGkr KykKKyAgICAgICAgICB7CisgICAgICAgICAgICBjaGFyICplbmQ7CisgICAgICAgICAgICBkb3Vi bGUgdmFsdWU7CisgICAgICAgICAgICBVSU5UIHZhbDsKKyAgICAgICAgICAgIHZhbHVlID0gc3Ry dG9kIChjb2xvciwgJmVuZCk7CisgICAgICAgICAgICBpZiAoZXJybm8gPT0gRVJBTkdFKQorICAg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGlmICh2YWx1ZSA8IDAuMCB8fCB2YWx1ZSA+ IDEuMCkKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB2YWwgPSAoVUlOVCkoMHgx MDAgKiB2YWx1ZSk7CisgICAgICAgICAgICAvKiBXZSB1c2VkIDB4MTAwIGluc3RlYWQgb2YgMHhG RiB0byBnaXZlIGEgY29udGludW91cworICAgICAgICAgICAgICAgcmFuZ2UgYmV0d2VlbiAwLjAg YW5kIDEuMCBpbmNsdXNpdmUuICBUaGUgbmV4dCBzdGF0ZW1lbnQKKyAgICAgICAgICAgICAgIGZp eGVzIHRoZSAxLjAgY2FzZS4gKi8KKyAgICAgICAgICAgIGlmICh2YWwgPT0gMHgxMDApCisgICAg ICAgICAgICAgIHZhbCA9IDB4RkY7CisgICAgICAgICAgICBjb2xvcnZhbCB8PSAodmFsIDw8IHBv cyk7CisgICAgICAgICAgICBwb3MgKz0gMHg4OworICAgICAgICAgICAgaWYgKGkgPT0gMikKKyAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmICgqZW5kICE9ICdcMCcpCisgICAgICAg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAg ICAgICAgICAgICAgIFhTRVRJTlQgKHJldCwgY29sb3J2YWwpOworICAgICAgICAgICAgICAgIHJl dHVybiByZXQ7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICgqZW5kICE9ICcvJykK KyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjb2xvciA9IGVuZCArIDE7CisgICAg ICAgICAgfQorICAgICAgfQorICAvKiBJIGFtIG5vdCBnb2luZyB0byBhdHRlbXB0IHRvIGhhbmRs ZSBhbnkgb2YgdGhlIENJRSBjb2xvciBzY2hlbWVzCisgICAgIG9yIFRla0hWQywgc2luY2UgSSBk b24ndCBrbm93IHRoZSBhbGdvcml0aG1zIGZvciBjb252ZXJzaW9uIHRvIFJHQi4KKyAgICAgSWYg d2UgZmFpbCB0byBsb29rdXAgdGhlIGNvbG9yIG5hbWUgaW4gdzMyX2NvbG9yX21hcCwgdGhlbiBj aGVjayB0aGUKKyAgICAgY29sb3JuYW1lIHRvIHNlZSBpZiBpdCBjYW4gYmUgY3J1ZGVseSBhcHBy b3hpbWF0ZWQ6IElmIHRoZSBYIGNvbG9yCisgICAgIGVuZHMgaW4gYSBudW1iZXIgKGUuZy4sICJk YXJrc2VhZ3JlZW4yIiksIHN0cmlwIHRoZSBudW1iZXIgYW5kCisgICAgIHJldHVybiB0aGUgcmVz dWx0IG9mIGxvb2tpbmcgdXAgdGhlIGJhc2UgY29sb3IgbmFtZS4gKi8KKyAgcmV0ID0gbWNfdzMy X2NvbG9yX21hcF9sb29rdXAgKGNvbG9ybmFtZSk7CisgIGlmIChOSUxQIChyZXQpKQorICAgIHsK KyAgICAgIGludCBsZW4gPSBzdHJsZW4gKGNvbG9ybmFtZSk7CisgICAgICBpZiAoaXNkaWdpdCAo Y29sb3JuYW1lW2xlbiAtIDFdKSkKKyAgICAgICAgeworICAgICAgICAgIGNoYXIgKnB0ciwgKmFw cHJveCA9IGFsbG9jYSAobGVuICsgMSk7CisgICAgICAgICAgc3RyY3B5IChhcHByb3gsIGNvbG9y bmFtZSk7CisgICAgICAgICAgcHRyID0gJmFwcHJveFtsZW4gLSAxXTsKKyAgICAgICAgICB3aGls ZSAocHRyID4gYXBwcm94ICYmIGlzZGlnaXQgKCpwdHIpKQorICAgICAgICAgICAgKnB0ci0tID0g J1wwJzsKKyAgICAgICAgICByZXQgPSBtY193MzJfY29sb3JfbWFwX2xvb2t1cCAoYXBwcm94KTsK KyAgICAgICAgfQorICAgIH0KKyAgdW5ibG9ja19pbnB1dCAoKTsKKyAgcmV0dXJuIHJldDsKK30K KworLyogRGVjaWRlIGlmIGNvbG9yIG5hbWVkIENPTE9SIGlzIHZhbGlkIGZvciB0aGUgZGlzcGxh eSBhc3NvY2lhdGVkIHdpdGgKKyAgIHRoZSBzZWxlY3RlZCBmcmFtZTsgaWYgc28sIHJldHVybiB0 aGUgcmdiIHZhbHVlcyBpbiBDT0xPUl9ERUYuCisgICBJZiBBTExPQyBpcyBub256ZXJvLCBhbGxv Y2F0ZSBhIG5ldyBjb2xvcm1hcCBjZWxsLiAqLworaW50CittY193MzJfZGVmaW5lZF9jb2xvciAo c3RydWN0IGZyYW1lICpmLCBjb25zdCBjaGFyICpjb2xvciwgbWNfWENvbG9yICpjb2xvcl9kZWYs IGJvb2wgYWxsb2NfcCkKK3sKKyAgcmVnaXN0ZXIgTGlzcF9PYmplY3QgdGVtOworICBDT0xPUlJF RiB3MzJfY29sb3JfcmVmOworICB0ZW0gPSBtY194X3RvX3czMl9jb2xvciAoY29sb3IpOworICBp ZiAoIU5JTFAgKHRlbSkpCisgICAgeworICAgICAgaWYgKGYpCisgICAgICAgIHsKKyAgICAgICAg ICAvKiBBcHBseSBnYW1tYSBjb3JyZWN0aW9uLiAqLworICAgICAgICAgIHczMl9jb2xvcl9yZWYg PSBYVUZJWE5VTV9SQVcgKHRlbSk7CisgICAgICAgICAgZ2FtbWFfY29ycmVjdCAoZiwgJnczMl9j b2xvcl9yZWYpOworICAgICAgICAgIFhTRVRJTlQgKHRlbSwgdzMyX2NvbG9yX3JlZik7CisgICAg ICAgIH0KKyAgICAgIC8qIE1hcCB0aGlzIGNvbG9yIHRvIHRoZSBwYWxldHRlIGlmIGl0IGlzIGVu YWJsZWQuICovCisgICAgICBpZiAoIU5JTFAgKFZ3MzJfZW5hYmxlX3BhbGV0dGUpKQorICAgICAg ICB7CisgICAgICAgICAgc3RydWN0IHczMl9wYWxldHRlX2VudHJ5ICogZW50cnkgPSBvbmVfdzMy X2Rpc3BsYXlfaW5mby5jb2xvcl9saXN0OworICAgICAgICAgIHN0cnVjdCB3MzJfcGFsZXR0ZV9l bnRyeSAqKiBwcmV2ID0gJm9uZV93MzJfZGlzcGxheV9pbmZvLmNvbG9yX2xpc3Q7CisgICAgICAg ICAgLyogY2hlY2sgaWYgY29sb3IgaXMgYWxyZWFkeSBtYXBwZWQgKi8KKyAgICAgICAgICB3aGls ZSAoZW50cnkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChNQ19XMzJfQ09MT1Ig KGVudHJ5LT5lbnRyeSkgPT0gWFVGSVhOVU1fUkFXICh0ZW0pKQorICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICAgICAgICBwcmV2ID0gJmVudHJ5LT5uZXh0OworICAgICAgICAgICAgICBl bnRyeSA9IGVudHJ5LT5uZXh0OworICAgICAgICAgICAgfQorICAgICAgICAgIGlmIChlbnRyeSA9 PSBOVUxMICYmIGFsbG9jX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIG5vdCBh bHJlYWR5IG1hcHBlZCwgc28gYWRkIHRvIGxpc3QgKi8KKyAgICAgICAgICAgICAgZW50cnkgPSB4 bWFsbG9jIChzaXplb2YgKHN0cnVjdCB3MzJfcGFsZXR0ZV9lbnRyeSkpOworICAgICAgICAgICAg ICBNQ19XMzJfU0VUX0NPTE9SIChlbnRyeS0+ZW50cnksIFhVRklYTlVNX1JBVyAodGVtKSk7Cisg ICAgICAgICAgICAgIGVudHJ5LT5uZXh0ID0gTlVMTDsKKyAgICAgICAgICAgICAgKnByZXYgPSBl bnRyeTsKKyAgICAgICAgICAgICAgb25lX3czMl9kaXNwbGF5X2luZm8ubnVtX2NvbG9ycysrOwor ICAgICAgICAgICAgICAvKiBzZXQgZmxhZyB0aGF0IHBhbGV0dGUgbXVzdCBiZSByZWdlbmVyYXRl ZCAqLworICAgICAgICAgICAgICBvbmVfdzMyX2Rpc3BsYXlfaW5mby5yZWdlbl9wYWxldHRlID0g VFJVRTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRW5zdXJlIENPTE9SUk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3ggPSB3aW5kb3df Ym94X2xlZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAgIGlmICh4IDwgbGVm dF94KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IGxl ZnRfeCAtIHg7CisgICAgICAgICAgICAgIHggPSBsZWZ0X3g7CisgICAgICAgICAgICB9CisgICAg ICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgeworICAgICAgICAgICAvKiBJbiBSMkwgcm93 cywgZHJhdyB0aGUgY3Vyc29yIG9uIHRoZSByaWdodCBlZGdlIG9mIHRoZQorICAgICAgICAgICAg ICBzdHJldGNoIGdseXBoLiAqLworICAgICAgICAgICBpbnQgcmlnaHRfeCA9IHdpbmRvd19ib3hf cmlnaHQgKHMtPncsIFRFWFRfQVJFQSk7CisgICAgICAgICAgIGlmICh4ICsgYmFja2dyb3VuZF93 aWR0aCA+IHJpZ2h0X3gpCisgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAtPSB4IC0gcmln aHRfeDsKKyAgICAgICAgICAgeCArPSBiYWNrZ3JvdW5kX3dpZHRoOworICAgICAgICAgfQorICAg ICAgd2lkdGggPSBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAocy0+ZiksIGJhY2tncm91bmRfd2lk dGgpOworICAgICAgaWYgKHMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeCAtPSB3aWR0aDsK KyAgICAgIC8qIERyYXcgY3Vyc29yLiAqLworICAgICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2Jn X3JlY3QgKHMsIHgsIHMtPnksIHdpZHRoLCBzLT5oZWlnaHQpOworICAgICAgLyogQ2xlYXIgcmVz dCB1c2luZyB0aGUgR0Mgb2YgdGhlIG9yaWdpbmFsIG5vbi1jdXJzb3IgZmFjZS4gKi8KKyAgICAg IGlmICh3aWR0aCA8IGJhY2tncm91bmRfd2lkdGgpCisgICAgICAgIHsKKyAgICAgICAgICBFbWFj c19HQyAqZ2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgICAgICBpbnQgeSA9IHMtPnk7CisgICAgICAg ICAgaW50IHcgPSBiYWNrZ3JvdW5kX3dpZHRoIC0gd2lkdGgsIGggPSBzLT5oZWlnaHQ7CisgICAg ICAgICAgUkVDVCByOworICAgICAgICAgIEhEQyBoZGMgPSBzLT5oZGM7CisgICAgICAgICAgaWYg KCFzLT5yb3ctPnJldmVyc2VkX3ApCisgICAgICAgICAgICB4ICs9IHdpZHRoOworICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICB4ID0gcy0+eDsKKyAgICAgICAgICBpZiAocy0+cm93LT5t b3VzZV9mYWNlX3AKKyAgICAgICAgICAgICAgJiYgY3Vyc29yX2luX21vdXNlX2ZhY2VfcCAocy0+ dykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHczMl9zZXRfbW91c2VfZmFjZV9nYyAo cyk7CisgICAgICAgICAgICAgIGdjID0gcy0+Z2M7CisgICAgICAgICAgICB9CisgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgIGdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICAgICAgZ2V0X2ds eXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsICZyKTsKKyAgICAgICAgICB3MzJfc2V0X2NsaXBfcmVj dGFuZ2xlIChoZGMsICZyKTsKKyNpZiAwIC8qIFRPRE86IHN0aXBwbGUgKi8KKyAgICAgICAgICBp ZiAocy0+ZmFjZS0+c3RpcHBsZSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogRmls bCBiYWNrZ3JvdW5kIHdpdGggYSBzdGlwcGxlIHBhdHRlcm4uICovCisgICAgICAgICAgICAgIFhT ZXRGaWxsU3R5bGUgKHMtPmRpc3BsYXksIGdjLCBGaWxsT3BhcXVlU3RpcHBsZWQpOworICAgICAg ICAgICAgICBYRmlsbFJlY3RhbmdsZSAocy0+ZGlzcGxheSwgcy0+d2luZG93LCBnYywgeCwgeSwg dywgaCk7CisgICAgICAgICAgICAgIFhTZXRGaWxsU3R5bGUgKHMtPmRpc3BsYXksIGdjLCBGaWxs U29saWQpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorI2VuZGlmCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIGdj LT5iYWNrZ3JvdW5kLCB4LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgfQorICAgIGVsc2UgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQorICAgICAgeworICAg ICAgICBpbnQgYmFja2dyb3VuZF93aWR0aCA9IHMtPmJhY2tncm91bmRfd2lkdGg7CisgICAgICAg IGludCB4ID0gcy0+eCwgbGVmdF94ID0gd2luZG93X2JveF9sZWZ0X29mZnNldCAocy0+dywgVEVY VF9BUkVBKTsKKyAgICAgICAgLyogRG9uJ3QgZHJhdyBpbnRvIGxlZnQgbWFyZ2luLCBmcmluZ2Ug b3Igc2Nyb2xsYmFyIGFyZWEKKyAgICAgICAgICAgZXhjZXB0IGZvciBoZWFkZXIgbGluZSBhbmQg bW9kZSBsaW5lLiAqLworICAgICAgICBpZiAoeCA8IGxlZnRfeCAmJiAhcy0+cm93LT5tb2RlX2xp bmVfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IGxlZnRf eCAtIHg7CisgICAgICAgICAgICB4ID0gbGVmdF94OworICAgICAgICAgIH0KKyAgICAgICAgaWYg KGJhY2tncm91bmRfd2lkdGggPiAwKQorICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19i Z19yZWN0IChzLCB4LCBzLT55LCBiYWNrZ3JvdW5kX3dpZHRoLCBzLT5oZWlnaHQpOworICAgICAg fQorICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gdHJ1ZTsKK30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YsIHMtPmZhY2Up OworICBpZiAocy0+aGwgPT0gRFJBV19OT1JNQUxfVEVYVCkKKyAgICB7CisgICAgICBzLT5nYyA9 IHMtPmZhY2UtPmdjOworICAgICAgcy0+c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUgIT0g MDsKKyAgICB9CisgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19JTlZFUlNFX1ZJREVPKQorICAg ICAgeworICAgICAgICB3MzJfc2V0X21vZGVfbGluZV9mYWNlX2djIChzKTsKKyAgICAgICAgcy0+ c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUgIT0gMDsKKyAgICAgIH0KKyAgICAgIGVsc2Ug aWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgICAgICB7CisgICAgICAgICAgbWNfdzMyX3Nl dF9jdXJzb3JfZ2MgKHMsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICBzLT5zdGlwcGxlZF9wID0g ZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19NT1VTRV9G QUNFKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHczMl9zZXRfbW91c2VfZmFjZV9nYyAocyk7 CisgICAgICAgICAgICBzLT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAwOworICAg ICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0lNQUdFX1JBSVNFRAor ICAgICAgICAgICAgICAgICAgIHx8IHMtPmhsID09IERSQVdfSU1BR0VfU1VOS0VOKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBzLT5nYyA9IHMtPmZhY2UtPmdjOworICAgICAgICAgICAg ICBzLT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAwOworICAgICAgICAgICAgfQor ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgLyogR0Mg bXVzdCBoYXZlIGJlZW4gc2V0LiAqLworICBlYXNzZXJ0IChzLT5nYyAhPSAwKTsKK30KKworLyog RHJhdyBhIGhvbGxvdyBib3ggY3Vyc29yIG9uIHdpbmRvdyBXIGluIGdseXBoIHJvdyBST1cuICov CitzdGF0aWMgdm9pZAorbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAq dywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5LAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGlu dCBoKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOwor ICBIREMgaGRjOworICBSRUNUIHJlY3Q7CisgIEhCUlVTSCBoYiA9IENyZWF0ZVNvbGlkQnJ1c2gg KGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsKTsKKyAgLyogR2V0IHRoZSBnbHlwaCB0 aGUgY3Vyc29yIGlzIG9uLiAgSWYgd2UgY2FuJ3QgdGVsbCBiZWNhdXNlCisgICAgIHRoZSBjdXJy ZW50IG1hdHJpeCBpcyBpbnZhbGlkIG9yIHN1Y2gsIGdpdmUgdXAuICovCisgIHN0cnVjdCBnbHlw aCAqY3Vyc29yX2dseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhw b3MsIHZwb3MpOworICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgeworICAgICAgRGVs ZXRlT2JqZWN0IChoYik7CisgICAgICByZXR1cm47CisgICAgfQorICBpbnQgcmwgPSBmeDsKKyAg aW50IHJ0ID0gZnk7CisgIGludCByciA9IHJsICsg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SVhFTF9YICh3LCB4KTsKKyAgICAgICAgaGRjID0g Z2V0X2ZyYW1lX2RjIChmKTsKKyAgICAgICAgdzMyX2NsaXBfdG9fcm93ICh3LCByb3csIFRFWFRf QVJFQSwgaGRjKTsKKyAgICAgICAgaW50IHJ4ID0gZng7CisgICAgICAgIGludCByeSA9IGZ5Owor ICAgICAgICBpbnQgcncgPSB3ZDsKKyAgICAgICAgaW50IHJoID0gaDsKKyAgICAgICAgLy8gIGZw cmludGYgKHN0ZGVyciwgIk1DX0hCQVI6ICBmeCAoJWQpIHwgZnkgKCVkKSB8IHdkICglZCkgfCBo ICglZClcbiIsCisgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIHJ4LCByeSwgcncsIHJoKTsK KyAgICAgICAgdzMyX2ZpbGxfYXJlYSAoZiwgaGRjLCBjdXJzb3JfY29sb3IsIHJ4LCByeSwgcncs IHJoKTsKKyAgICAgICAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAoaGRjLCBOVUxMKTsKKyAgICAg ICAgcmVsZWFzZV9mcmFtZV9kYyAoZiwgaGRjKTsKKyAgICAgIH0KK30KKworLyogUklGOiBEcmF3 IG9yIGNsZWFyIGN1cnNvciBvbiB3aW5kb3cgVy4gKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJh d193aW5kb3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpt YXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgICAgICAgIGludCB4LCBp bnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCwK KyAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2N1cnNvcl90eXBl IGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCwgZW51bSBt Y19mbGF2b3IgZ2x5cGhfZmxhdm9yLCBib29sIG9uX3AsIGJvb2wgYWN0aXZlX3ApCit7CisgIGlm IChvbl9wKQorICAgIHsKKyAgICAgIC8qIElmIHRoaXMgaXMgdGhlIGFjdGl2ZSBjdXJzb3IsIHdl IG5lZWQgdG8gdHJhY2sgaXQgd2l0aCB0aGUKKyAgICAgIHN5c3RlbSBjYXJldCwgc28gdGhpcmQg cGFydHkgc29mdHdhcmUgbGlrZSBzY3JlZW4gbWFnbmlmaWVycworICAgICAgYW5kIHNwZWVjaCBz eW50aGVzaXplcnMgY2FuIGZvbGxvdyB0aGUgY3Vyc29yLiAqLworICAgICAgaWYgKGFjdGl2ZV9w KQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1df RlJBTUUgKHcpKTsKKyAgICAgICAgICBIV05EIGh3bmQgPSBGUkFNRV9XMzJfV0lORE9XIChmKTsK KyAgICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X3gKKyAgICAgICAgICAgID0gV0lORE9XX1RFWFRf VE9fRlJBTUVfUElYRUxfWCAodywgeCk7CisgICAgICAgICAgLyogRklYTUU6ICBXaGF0IHNob3Vs ZCB3ZSB1c2UgaW5zdGVhZCBvZiBgdy0+cGh5c19jdXJzb3JfYXNjZW50Jz8gKi8KKyAgICAgICAg ICB3MzJfc3lzdGVtX2NhcmV0X3kKKyAgICAgICAgICAgID0gKFdJTkRPV19UT19GUkFNRV9QSVhF TF9ZICh3LCB5KQorICAgICAgICAgICAgICAgKyByb3ctPmFzY2VudCAtIHctPnBoeXNfY3Vyc29y X2FzY2VudCk7CisgICAgICAgICAgdzMyX3N5c3RlbV9jYXJldF93aW5kb3cgPSB3OworICAgICAg ICAgIHczMl9zeXN0ZW1fY2FyZXRfaGRyX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlH SFQgKHcpOworICAgICAgICAgIHczMl9zeXN0ZW1fY2FyZXRfbW9kZV9oZWlnaHQgPSBX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gICAgICAg ICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIGFj dGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPT0g cmVnaW9uX2VuZCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGVudW0gZmFjZV9p ZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3 LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQtcmVnaW9uLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lv bl9lbmRfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2Zh Y2VfaWQpOworICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2Vf aWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29y LXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xs b3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7 CisgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2Zh Y2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBo b2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25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Owor ICAgICAgICAgIG1jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53 MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAg ICAgICBlbHNlIGlmIChjdXJzb3JfZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEggJiYgbHNsLnJl ZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgICAgewor ICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9waXhlbCcuICovCisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9w aXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNv ciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAg ICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJz b3JfcGl4ZWw7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9nYycgYnkgYm9ycm93aW5nIHRoZQorICAgICAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9m IGB4X21ha2VfZ2MnIGluIHczMmZucy5jLiAqLworICAgICAgICAgICAgICBpZiAocmVnaW9uX2Fj dGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAg JiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID09IHJlZ2lvbl9iZWcpCisgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2Jl Z19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtl LWN1cnNvci1hdC1yZWdpb24tcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAg ICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fYmVnX2ZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlX2lkKTsKKyAgICAgICAgICAgICAg ICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUp OworICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZB Q0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAg IGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOwor ICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX3Jl Z2lvbl9iZWdfZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgZWxzZSBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAg JiYgYWN0aXZlX3AKKyAgICAgICAgICAg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naW9uX2JldHdlZW5fZmFjZS0+Zm9yZWdy b3VuZDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIGlm IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg ICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2Zh Y2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVl KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2Zh Y2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAg ICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19hY3RpdmVfZmFjZS0+ Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5k ID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBo b2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAg ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9 IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAg ICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19pbmFjdGl2ZV9mYWNl LT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dy b3VuZCA9IGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kOworICAgICAgICAgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9 IFhDcmVhdGVHQyAoTlVMTCwgRlJBTUVfVzMyX1dJTkRPVyAoZiksIG1hc2ssICZnY192YWx1ZXMp OworICAgICAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgLyogRm9yY2Ug YG1jX3czMl9zZXRfY3Vyc29yX2djJyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX2djJy4gKi8KKyAgICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7CisgICAg ICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgRFJBV19DVVJT T1IsIHgsIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBs c2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3Ap OworICAgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9IG9yaWdpbmFs X2N1cnNvcl9nYzsKKyAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAg ICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBm eSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAg fQorICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAw ICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAg ICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVs Jy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9y X3BpeGVsOworICAgICAgICAgIG1jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwg cm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICBmLT5vdXRw dXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAo dywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAg YnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICB7CisgICAgICBpZiAo bHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAg IHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+ Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgZnVuY3Rpb25hbGl0eSBvZiBg eF9tYWtlX2djJyBpbiB3MzJmbnMuYy4gKi8KKyAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAg ICAgICAgICBFbWFjc19HQyBnY192YWx1ZXM7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBtYXNr ID0gR0NGb3JlZ3JvdW5kIHwgR0NCYWNrZ3JvdW5kOworICAgICAgICAgIGdjX3ZhbHVlcy5mb3Jl Z3JvdW5kID0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAoZik7CisgICAgICAgICAgZ2NfdmFsdWVz LmJhY2tncm91bmQgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzIt PmN1cnNvcl9nYyA9IFhDcmVhdGVHQyAoTlVMTCwgRlJBTUVfVzMyX1dJTkRPVyAoZiksIG1hc2ss ICZnY192YWx1ZXMpOworICAgICAgICAgIC8qIEZvcmNlIGBtY193MzJfc2V0X2N1cnNvcl9nYycg dG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycuICovCisgICAgICAgICAg Ym9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7CisgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGgg KHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywgbHNsLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwg YWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9nYyA9IG9yaWdpbmFsX2N1cnNvcl9nYzsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgp OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29s IGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAo dywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2Qs IGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9nY19w KTsKKyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19CQVI6Cisg ICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1 ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5v dXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICovCisgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICBib29sIGN1cnNv cl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY193MzJfZHJhd19iYXJf Y3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1DX0JBUiwg Y3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAg ICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2li bGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY193MzJfZHJhd19iYXJfY3Vyc29yICh3 LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93aWR0aCwgTUNfQkFSLCBjdXJzb3Jf Z2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQor ICAgIGNhc2UgTUNfSEJBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5n cmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1w b3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAg ICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOwor ICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAgICAg ICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnks IGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1 cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAg ICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3Bp eGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBi b29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY193 MzJfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2 cG9zLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93 aW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bHlwaF9zdHJpbmcgKm5leHQ7CisgICAgICBmb3IgKHdp ZHRoID0gMCwgbmV4dCA9IHMtPm5leHQ7CisgICAgICAgICAgIG5leHQgJiYgd2lkdGggPCBzLT5y aWdodF9vdmVyaGFuZzsKKyAgICAgICAgICAgd2lkdGggKz0gbmV4dC0+d2lkdGgsIG5leHQgPSBu ZXh0LT5uZXh0KQorICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5cGgtPnR5cGUgIT0gSU1BR0Vf R0xZUEgpCisgICAgICAgICAgeworICAgICAgICAgICAgbWNfdzMyX3NldF9nbHlwaF9zdHJpbmdf Z2MgKG5leHQsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgIHczMl9zZXRfZ2x5cGhfc3RyaW5n X2NsaXBwaW5nIChuZXh0KTsKKyAgICAgICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlw ZSA9PSBTVFJFVENIX0dMWVBIKQorICAgICAgICAgICAgICBtY193MzJfZHJhd19zdHJldGNoX2ds eXBoX3N0cmluZyAobmV4dCk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB3 MzJfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAobmV4dCwgdHJ1ZSk7CisgICAgICAgICAg ICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgIH0KKyAgICB9CisgIC8qIFNldCB1cCBT LT5nYywgc2V0IGNsaXBwaW5nIGFuZCBkcmF3IFMuICovCisgIG1jX3czMl9zZXRfZ2x5cGhfc3Ry aW5nX2djIChzLCBjdXJzb3JfZ2NfcCk7CisgIC8qIERyYXcgcmVsaWVmIChpZiBhbnkpIGluIGFk dmFuY2UgZm9yIGNoYXIvY29tcG9zaXRpb24gc28gdGhhdCB0aGUKKyAgICAgZ2x5cGggc3RyaW5n IGNhbiBiZSBkcmF3biBvdmVyIGl0LiAqLworICBpZiAoIXMtPmZvcl9vdmVybGFwcworICAgICAg JiYgcy0+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JhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxzZQorICAgICAgICB3 MzJfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgZmFsc2UpOworICAgICAgdzMyX2Ry YXdfZ2x5cGhsZXNzX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgIGJyZWFrOwor ICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9CisgIGlmICghcy0+Zm9y X292ZXJsYXBzKQorICAgIHsKKyAgICAgIC8qIERyYXcgdW5kZXJsaW5lLiAqLworICAgICAgaWYg KHMtPmZhY2UtPnVuZGVybGluZV9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKHMtPmZhY2Ut PnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgQ09MT1JSRUYgY29sb3I7CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRl cmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICAgICAgY29sb3IgPSBzLT5nYy0+Zm9yZWdy b3VuZDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjb2xvciA9IHMt PmZhY2UtPnVuZGVybGluZV9jb2xvcjsKKyAgICAgICAgICAgICAgdzMyX2RyYXdfdW5kZXJ3YXZl IChzLCBjb2xvcik7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZSBpZiAocy0+ZmFjZS0+ dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICB1bnNpZ25lZCBsb25nIHRoaWNrbmVzcywgcG9zaXRpb247CisgICAgICAgICAgICAg IGludCB5OworICAgICAgICAgICAgICBpZiAocy0+cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51bmRl cmxpbmVfcAorICAgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5 cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgIC8qIFdlIHVzZSB0aGUgc2FtZSB1bmRlcmxpbmUgc3R5bGUgYXMgdGhlIHByZXZpb3VzIG9u ZS4gKi8KKyAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPnByZXYtPnVuZGVybGluZV90 aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPnByZXYtPnVuZGVybGlu ZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVybGluZSB0aGlj a25lc3MuICBEZWZhdWx0IGlzIDEgcGl4ZWwuICovCisgICAgICAgICAgICAgICAgICBpZiAocy0+ Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfdGhpY2tuZXNzID4gMCkKKyAgICAgICAgICAgICAg ICAgICAgdGhpY2tuZXNzID0gcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAg ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7Cisg ICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2VudF9saW5lKQorICAgICAg ICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSB0aGlja25lc3MpIC0gKHMtPnli YXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVybGluZSBwb3Np dGlvbi4gIFRoaXMgaXMgdGhlIHJlY29tbWVuZGVkCisgICAgICAgICAgICAgICAgICAgICAgICAg ICB2ZXJ0aWNhbCBvZmZzZXQgaW4gcGl4ZWxzIGZyb20gdGhlIGJhc2VsaW5lIHRvIHRoZSB0b3Ag b2YKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSB1bmRlcmxpbmUuICBUaGlzIGlzIGEg c2lnbmVkIHZhbHVlIGFjY29yZGluZyB0byB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IHNwZWNzLCBhbmQgaXRzIGRlZmF1bHQgaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIFJP VU5EICgobWF4aW11bV9kZXNjZW50KSAvIDIpLCB3aXRoCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBST1VORCAoeCkgPSBmbG9vciAoeCArIDAuNSkgICovCisgICAgICAgICAgICAgICAgICAg ICAgICBpZiAoeF91c2VfdW5kZXJsaW5lX3Bvc2l0aW9uX3Byb3BlcnRpZXMKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV9wb3NpdGlv biA+PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPmZvbnQtPnVu ZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHMtPmZv bnQpCisgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmZvbnQtPmRlc2Nl bnQgKyAxKSAvIDI7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAg cG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVfbWluaW11bV9vZmZzZXQpOworICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgLyogQ2hlY2sgdGhlIHNhbml0eSBvZiB0aGlj a25lc3MgYW5kIHBvc2l0aW9uLiAgV2Ugc2hvdWxkCisgICAgICAgICAgICAgICAgIGF2b2lkIGRy YXdpbmcgdW5kZXJsaW5lIG91dCBvZiB0aGUgY3VycmVudCBsaW5lIGFyZWEuICovCisgICAgICAg ICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDw9IHMtPnliYXNlICsgcG9zaXRpb24pCisgICAg ICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gMSkgLSAocy0+eWJhc2UgLSBzLT55 KTsKKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPCBzLT55YmFzZSArIHBvc2l0 aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IChzLT55ICsgcy0+ aGVpZ2h0KSAtIChzLT55YmFzZSArIHBvc2l0aW9uKTsKKyAgICAgICAgICAgICAgcy0+dW5kZXJs aW5lX3RoaWNrbmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Bv c2l0aW9uID1wb3NpdGlvbjsKKyAgICAgICAgICAgICAgeSA9IHMtPnliYXNlICsgcG9zaXRpb247 CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAg ICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9yZWdyb3Vu ZCwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5LCBzLT53aWR0aCwgMSk7 CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAo cy0+Ziwgcy0+aGRjLCBzLT5mYWNlLT51bmRlcmxpbmVfY29sb3IsIHMtPngsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB5LCBzLT53aWR0aCwgMSk7CisgICAgICAgICAgICB9Cisg ICAgICAgIH0KKyAgICAgIC8qIERyYXcgb3ZlcmxpbmUuICovCisgICAgICBpZiAocy0+ZmFjZS0+ b3ZlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZHkgPSAwLCBo ID0gMTsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+b3ZlcmxpbmVfY29sb3JfZGVmYXVsdGVkX3Ap CisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmdjLT5mb3JlZ3Jv dW5kLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+eSArIGR5LCBzLT53aWR0 aCwgaCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMt PmYsIHMtPmhkYywgcy0+ZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPngsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOworICAgICAgICB9CisgICAg ICAvKiBEcmF3IHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgaWYgKHMtPmZhY2UtPnN0cmlrZV90 aHJvdWdoX3AKKyAgICAgICAgICAmJiAhRk9OVF9URVhUTUVUUklDIChzLT5mb250KS50bVN0cnVj a091dCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgaCA9IDE7CisgICAgICAg ICAgdW5zaWduZWQgbG9uZyBkeSA9IChzLT5oZWlnaHQgLSBoKSAvIDI7CisgICAgICAgICAgaWYg KHMtPmZhY2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAg dzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9yZWdyb3VuZCwgcy0+eCwgcy0+ eSArIGR5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+d2lkdGgsIGgpOworICAgICAg ICAgICAgZWxzZQorICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMt PmZhY2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgfQorICAgICAgLyogRHJh dyByZWxpZWYgaWYgbm90IHlldCBkcmF3bi4gKi8KKyAgICAgIGlmICghcmVsaWVmX2RyYXduX3Ag JiYgcy0+ZmFjZS0+Ym94ICE9IEZBQ0VfTk9fQk9YKQorICAgICAgICB3MzJfZHJhd19nbHlwaF9z dHJpbmdfYm94IChzKTsKKyAgICAgIGlmIChzLT5wcmV2KQorICAgICAgICB7CisgICAgICAgICAg c3RydWN0IGdseXBoX3N0cmluZyAqcHJldjsKKyAgICAgICAgICBmb3IgKHByZXYgPSBzLT5wcmV2 OyBwcmV2OyBwcmV2ID0gcHJldi0+cHJldikKKyAgICAgICAgICAgIGlmIChwcmV2LT5obCAhPSBz LT5obAorICAgICAgICAgICAgICAgICYmIHByZXYtPnggKyBwcmV2LT53aWR0aCArIHByZXYtPnJp Z2h0X292ZXJoYW5nID4gcy0+eCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIC8q IEFzIHByZXYgd2FzIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLCB3ZQorICAg ICAgICAgICAgICAgICAgIG11c3QgZHJhdyB0aGUgcmlnaHRfb3ZlcmhhbmcgcGFydCB1c2luZyBz LT5obCBub3cuICovCisgICAgICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIHNhdmUg PSBwcmV2LT5obDsKKyAgICAgICAgICAgICAgICBwcmV2LT5obCA9IHMtPmhsOworICAgICAgICAg ICAgICAgIG1jX3czMl9zZXRfZ2x5cGhfc3RyaW5nX2djIChwcmV2LCBjdXJzb3JfZ2NfcCk7Cisg ICAgICAgICAgICAgICAgdzMyX3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywg cHJldik7CisgICAgICAgICAgICAgICAgaWYgKHByZXYtPmZpcnN0X2dseXBoLT50eXBlID09IENI QVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB3MzJfZHJhd19nbHlwaF9zdHJpbmdfZm9yZWdy b3VuZCAocHJldik7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAg IHczMl9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocHJldik7CisgICAg ICAgICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAocHJldi0+aGRjLCBOVUxMKTsKKyAg ICAgICAgICAgICAgICBwcmV2LT5obCA9IHNhdmU7CisgICAgICAgICAgICAgICAgcHJldi0+bnVt X2NsaXBzID0gMDsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocy0+bmV4 dCkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKm5leHQ7CisgICAg ICAgICAgZm9yIChuZXh0ID0gcy0+bmV4dDsgbmV4dDsgbmV4dCA9IG5leHQtPm5leHQpCisgICAg ICAgICAgICBpZiAobmV4dC0+aGwgIT0gcy0+aGwKKyAgICAgICAgICAgICAgICAmJiBuZXh0LT54 IC0gbmV4dC0+bGVmdF9vdmVyaGFuZyA8IHMtPnggKyBzLT53aWR0aCkKKyAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgIC8qIEFzIG5leHQgd2lsbCBiZSBkcmF3biB3aGlsZSBjbGlwcGVk IHRvIGl0cyBvd24gYXJlYSwKKyAgICAgICAgICAgICAgICAgICB3ZSBtdXN0IGRyYXcgdGhlIGxl ZnRfb3ZlcmhhbmcgcGFydCB1c2luZyBzLT5obCBub3cuICovCisgICAgICAgICAgICAgICAgZW51 bSBkcmF3X2dseXBoc19mYWNlIHNhdmUgPSBuZXh0LT5obDsKKyAgICAgICAgICAgICAgICBuZXh0 LT5obCA9IHMtPmhsOworICAgICAgICAgICAgICAgIG1jX3czMl9zZXRfZ2x5cGhfc3RyaW5nX2dj IChuZXh0LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgICAgdzMyX3NldF9nbHlwaF9zdHJp bmdfY2xpcHBpbmdfZXhhY3RseSAocywgbmV4dCk7CisgICAgICAgICAgICAgICAgaWYgKG5leHQt PmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB3MzJf ZHJhd19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAobmV4dCk7CisgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgIHczMl9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdf Zm9yZWdyb3VuZCAobmV4dCk7CisgICAgICAgICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3Rhbmds ZSAobmV4dC0+aGRjLCBOVUxMKTsKKyAgICAgICAgICAgICAgICBuZXh0LT5obCA9IHNhdmU7Cisg ICAgICAgICAgICAgICAgbmV4dC0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICAgICAgICBuZXh0 LT5jbGlwX2hlYWQgPSBzLT5uZXh0OworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9 CisgIC8qIFJlc2V0IGNsaXBwaW5nLiAqLworICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChzLT5o ZGMsIE5VTEwpOworICBzLT5udW1fY2xpcHMgPSAwOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyogRnJpbmdlIGJpdG1hcHMu ICAqLwogCiBzdGF0aWMgaW50IG1heF9mcmluZ2VfYm1wID0gMDsKQEAgLTU0Miw2ICsxNzAxLDE1 IEBAIHczMl91cGRhdGVfYmVnaW4gKHN0cnVjdCBmcmFtZSAqZikKICAgaWYgKCEgRlJBTUVfVzMy X1AgKGYpKQogICAgIHJldHVybjsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IGY7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgLyogUmVnZW5lcmF0ZSBkaXNwbGF5IHBhbGV0dGUg YmVmb3JlIGRyYXdpbmcgaWYgbGlzdCBvZiByZXF1ZXN0ZWQKICAgICAgY29sb3JzIGhhcyBjaGFu Z2VkLiAqLwogICBpZiAoZGlzcGxheV9pbmZvLT5yZWdlbl9wYWxldHRlKQpAQCAtNjc0LDYgKzE4 NDIsMTYgQEAgdzMyX3VwZGF0ZV9lbmQgKHN0cnVjdCBmcmFtZSAqZikKIAogICAvKiBNb3VzZSBo aWdobGlnaHQgbWF5IGJlIGRpc3BsYXllZCBhZ2Fpbi4gICovCiAgIE1PVVNFX0hMX0lORk8gKGYp LT5tb3VzZV9mYWNlX2RlZmVyID0gZmFsc2U7CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBOVUxM OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIApAQCAtNDAwMiwxMyArNTE4 MCw3NCBAQCB3MzJfc2V0X3ZlcnRpY2FsX3Njcm9sbF9iYXIg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Xcgb3ZlciBjaGlsZCBmcmFtZXMuICAqLwotCSAgU2V0V2luZG93UG9zIChod25kLCBIV05EX0JP VFRPTSwgbGVmdCwgdG9wLCB3aWR0aCwgbWF4IChoZWlnaHQsIDEpLAotICAgICAgICAgICAgICAg ICAgICAgICAgU1dQX0ZSQU1FQ0hBTkdFRCk7CisgICAgICAgICAgaWYgKGxlZnQgPD0gYmFyLT5s ZWZ0KQorICAgICAgICAgICAgbXlfc2hvd193aW5kb3cgKGYsIGh3bmQsIFNXX0hJREUpOworICAg ICAgICAgIE1vdmVXaW5kb3cgKGh3bmQsIGxlZnQsIHRvcCwgd2lkdGgsIG1heCAoaGVpZ2h0LCAx KSwgbGVmdCA8PSBiYXItPmxlZnQpOworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKIAogCSAgc2kuY2JTaXplID0gc2l6ZW9mIChzaSk7CiAJ ICBzaS5mTWFzayA9IFNJRl9SQU5HRTsKQEAgLTQyNzcsNiArNTUxNiwyMSBAQCB3MzJfanVkZ2Vf c2Nyb2xsX2JhcnMgKHN0cnVjdCBmcmFtZSAqZikKICAgICB7CiAgICAgICBzdHJ1Y3Qgc2Nyb2xs X2JhciAqYiA9IFhTQ1JPTExfQkFSIChiYXIpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICAvKiBgRGVzdHJveVdpbmRvdycgd2l0 aGluIGB4X3Njcm9sbF9iYXJfcmVtb3ZlJyByZXBhaW50cyB0aGUgcmVjdGFuZ2xlLgorICAgICAg VGhlcmVmb3JlLCB3ZSBmaXJzdCBzZW5kIGEgbWVzc2FnZSB0byBpbmhpYml0IHJlcGFpbnRpbmcu ICovCisgICAgICBpZiAoIVdJTkRPV19MSVZFX1AgKGItPndpbmRvdykpCisgICAgICAgIHsKKyAg ICAgICAgICBIV05EIGh3bmQgPSBTQ1JPTExfQkFSX1czMl9XSU5ET1cgKGIpOworICAgICAgICAg IFNlbmRNZXNzYWdlIChod25kLCBXTV9TRVRSRURSQVcsIGZhbHNlLCAwKTsKKyAgICAgICAgfQor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICB3MzJfc2Nyb2xsX2Jhcl9yZW1v dmUgKGIpOwogCiAgICAgICBuZXh0ID0gYi0+bmV4dDsKQEAgLTcwODgsNiArODM0MiwyMCBAQCBl eHRlcm4gZnJhbWVfcGFybV9oYW5kbGVyIHczMl9mcmFtZV9wYXJtX2hhbmRsZXJzW107CiAKIHN0 YXRpYyBzdHJ1Y3QgcmVkaXNwbGF5X2ludGVyZmFjZSB3MzJfcmVkaXNwbGF5X2ludGVyZmFjZSA9 CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgdzMydGVybS5jYCBtdXN0IGJlIGluIHRo ZSBleGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGBkaXNw ZXh0ZXJuLmhgISAqLworCisgIG1jX3czMl9kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1jX3czMl9k cmF3X2dseXBoX3N0cmluZywKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3MzJf ZnJhbWVfcGFybV9oYW5kbGVycywKICA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WzRdOworICAgIHN0 cnVjdCBtY19jb250ZW50cworICAgIHsKKyAgICAgIGJvb2xfYmYgc2FtZV9wIDogMTsKKyAgICAg IHN0cnVjdCBnbHlwaCBnbHlwaDsKKyAgICAgIGludCB4OworICAgICAgaW50IGZ4OworICAgICAg aW50IHk7CisgICAgICBpbnQgZnk7CisgICAgICBpbnQgaHBvczsKKyAgICAgIGludCB2cG9zOwor ICAgICAgaW50IHdkOworICAgICAgaW50IGg7CisgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlCisg ICAgICB7CisgICAgICAgIC8qIE5PVEU6ICBUaGUgZnJpbmdlIGJpdG1hcCBmcmFtZXdvcmsgcmVs aWVzIHVwb24gTUNfTk9fRlJJTkdFX0JJVE1BUAorICAgICAgICBoYXZpbmcgYSB2YWx1ZSBvZiB6 ZXJvICgwKS4gKi8KKyAgICAgICAgTUNfTk9fRlJJTkdFX0JJVE1BUCwKKyAgICAgICAgTUNfTk9f Q1VSU09SLAorICAgICAgICBNQ19SSUdIVF9GUklOR0VfQklUTUFQLAorICAgICAgICBNQ19MRUZU X0ZSSU5HRV9CSVRNQVAsCisgICAgICAgIE1DX0ZSQU1FRF9CT1gsCisgICAgICAgIE1DX0ZJTExF RF9CT1gsCisgICAgICAgIE1DX0hPTExPV19CT1gsCisgICAgICAgIE1DX0JBUiwKKyAgICAgICAg TUNfSEJBUgorICAgICAgfSBjdXJzb3JfdHlwZTsKKyAgICAgIGludCBjdXJzb3Jfd2lkdGg7Cisg ICAgICBzdHJ1Y3QgbWNfUkdCCisgICAgICB7CisgICAgICAgIGRvdWJsZSByZWQ7CisgICAgICAg IGRvdWJsZSBncmVlbjsKKyAgICAgICAgZG91YmxlIGJsdWU7CisgICAgICB9IGZnLCBiZzsKKyAg ICAgIGJvb2xfYmYgYWN0aXZlX3AgOiAxOworICAgICAgZW51bSBtY19mbGF2b3IKKyAgICAgIHsK KyAgICAgICAgTk9fRkxBVk9SLAorICAgICAgICBNQ19HTFlQSCwKKyAgICAgICAgTUNfR0xZUEhM RVNTLAorICAgICAgICBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUCwKKyAgICAgICAgTUNfUElMQ1JP VywKKyAgICAgICAgTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVywKKyAgICAgICAgTUNf UkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVywKKyAgICAgICAgTUNfSE9MTE9X X1JFQ1RBTkdMRSwKKyAgICAgICAgTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XLAorICAgICAg ICBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgICAgICAgIE1DX1ZFUlRJ Q0FMX0JBUiwKKyAgICAgICAgTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSLAorICAgICAgICBNQ19W RVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICB9IGdseXBoX2ZsYXZvcjsKKyAgICAgIGVudW0g bWNfcm93X3Bvc2l0aW9uCisgICAgICB7CisgICAgICAgIFBSRV9aViwKKyAgICAgICAgQVRfWlYs CisgICAgICAgIFBPU1RfWlYKKyAgICAgIH0gcm93X3Bvc2l0aW9uOworICAgICAgYm9vbF9iZiBl bmFibGVkX3AgOiAxOworICAgIH0gKmNhY2hlWzRdOworICB9ICp2cG9zOworICAvKiBVc2VkIGVs c2V3aGVyZS4gKi8KKyAgc3RydWN0IG1jX2Vzc2VudGlhbHMKKyAgeworICAgIGJvb2xfYmYgYWN0 aXZlX3AgOiAxOworICAgIHN0cnVjdCBtY19SR0IgY2hfZmdbM10sIGZjX2ZnWzNdLCBzcF9mZzsK KyAgICBpbnQgZmNfeDsKKyAgICBpbnQgenY7CisgICAgaW50IHp2X2J5dGU7CisgIH0gZXNzZW50 aWFsczsKKyAgLyogVXNlZCBlbHNld2hlcmUuICovCisgIGVudW0gbWNfZW5naW5lX3R5cGUKKyAg eworICAgIE1VTFRJUExFX0NVUlNPUlMsC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cmF3X3Jvd190 eXBlX19mcm9tX3doZXJlOworfSBtY19tYXRyaXg7CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JT ICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgLyogQ3Vyc29yIHR5cGUgb2Yg bGFzdCBjdXJzb3IgZHJhd24gb24gdGhlIHdpbmRvdy4gICovCiAgICAgZW51bSB0ZXh0X2N1cnNv cl9raW5kcyBwaHlzX2N1cnNvcl90eXBlOwogCmRpZmYgLS1naXQgYS9zcmMveGRpc3AuYyBiL3Ny Yy94ZGlzcC5jCmluZGV4IDUwZjY0NDMuLmUzMGNlMmEgMTAwNjQ0Ci0tLSBhL3NyYy94ZGlzcC5j CisrKyBiL3NyYy94ZGlzcC5jCkBAIC05NjIsNiArOTYyLDQ4ODYgQEAgc3RhdGljIHZvaWQgc2hv d19tb3VzZV9mYWNlIChNb3VzZV9ITEluZm8gKiwgZW51bSBkcmF3X2dseXBoc19mYWNlKTsKIHN0 YXRpYyBib29sIGNvb3Jkc19pbl9tb3VzZV9mYWNlX3AgKHN0cnVjdCB3aW5kb3cgKiwgaW50LCBp bnQpOwogCiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VS U09SUyAqLworCisvKiBNVUxUSVBMRS1DVVJTT1JTOiAgRW1hY3MgQnVnICMyMjg3MyAoZmVhdHVy ZSByZXF1ZXN0KQorCisgIENST1NTSEFJUlM6ICBFbWFjcyBCdWcgIzE3Njg0IChmZWF0dXJlIHJl cXVlc3QpCisKKworVkVSU0lPTjogMDIyLjAwNCBbMTAvMTcvMjAxOV0KKworCitDSEFOR0VMT0c6 CisKKy0gSE9SSVpPTlRBTF9SVUxFUjogIEZpeGVkIGEgYnV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HIChTVEFSVCwgRU5ELCBIRUFELCBUQUlMLAlcCisJCQkJCSAg SEwsIFgsIExBU1RfWCk7CQlcCisJICAgICAgYnJlYWs7CQkJCQkJCVwKKwkJCQkJCQkJCVwKKwkg ICAgY2FzZSBJTUFHRV9HTFlQSDoJCQkJCQlcCisJICAgICAgTUNfQlVJTERfSU1BR0VfR0xZUEhf U1RSSU5HIChTVEFSVCwgRU5ELCBIRUFELCBUQUlMLAkJXAorCQkJCQlITCwgWCwgTEFTVF9YKTsJ CQlcCisJICAgICAgYnJlYWs7CisKKyNkZWZpbmUgTUNfQlVJTERfR0xZUEhfU1RSSU5HU19YVyhT VEFSVCwgRU5ELCBIRUFELCBUQUlMLCBITCwgWCwgTEFTVF9YKQlcCisgICAgICAgICAgICBjYXNl IFhXSURHRVRfR0xZUEg6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc CisgICAgICAgICAgICAgIE1DX0JVSUxEX1hXSURHRVRfR0xZUEhfU1RSSU5HIChTVEFSVCwgRU5E LCBIRUFELCBUQUlMLCAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBITCwgWCwgTEFTVF9YKTsgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgIGJy ZWFrOworCisjZGVmaW5lIE1DX0JVSUxEX0dMWVBIX1NUUklOR1NfMihTVEFSVCwgRU5ELCBIRUFE LCBUQUlMLCBITCwgWCwgTEFTVF9YKQlcCisJICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgkJCQkJ XAorCSAgICAgIE1DX0JVSUxEX0dMWVBITEVTU19HTFlQSF9TVFJJTkcgKFNUQVJULCBFTkQsIEhF QUQsIFRBSUwsCVwKKwkJCQkJICAgIEhMLCBYLCBMQVNUX1gpOwkJXAorCSAgICAgIGJyZWFrOwkJ CQkJCQlcCisJCQkJCQkJCQlcCisJICAgIGRlZmF1bHQ6CQkJCQkJCVwKKwkgICAgICBlbWFjc19h Ym9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JnIChhcCwgTGlzcF9PYmplY3QpLCBRbmlsKTsK KyAgICAgIFhTRVRDRFIgKHRhaWwsIGVsZW0pOworICAgICAgdGFpbCA9IGVsZW07CisgICAgfQor ICB2YV9lbmQgKGFwKTsKKyAgcmV0dXJuIHZhbDsKK30KKworTGlzcF9PYmplY3QKK21jX21lbXEg KExpc3BfT2JqZWN0IGVsdCwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgd2hpbGUgKDEpCisgICAg eworICAgICAgaWYgKCFDT05TUCAobGlzdCkgfHwgRVEgKFhDQVIgKGxpc3QpLCBlbHQpKQorICAg ICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1Ag KGxpc3QpIHx8IEVRIChYQ0FSIChsaXN0KSwgZWx0KSkKKyAgICAgICAgYnJlYWs7CisgICAgICBs aXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KSB8fCBFUSAoWENBUiAo bGlzdCksIGVsdCkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOwor ICAgIH0KKyAgcmV0dXJuIGxpc3Q7Cit9CisKK0xpc3BfT2JqZWN0CittY19udGggKGludCBudW0s IExpc3BfT2JqZWN0IGxpc3QpCit7CisgIGZvciAoaW50IGkgPSAwOyBpIDwgbnVtICYmICFOSUxQ IChsaXN0KTsgaSsrKQorICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgaWYgKENPTlNQIChsaXN0 KSkKKyAgICByZXR1cm4gWENBUiAobGlzdCk7CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7 Cit9CisKK0xpc3BfT2JqZWN0CittY19hc3NxIChMaXNwX09iamVjdCBrZXksIExpc3BfT2JqZWN0 IGxpc3QpCit7CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisg ICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhD QVIgKFhDQVIgKGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhD RFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1Ag KFhDQVIgKGxpc3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBr ZXkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBp ZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAg ICAgICAgICAgICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVh azsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICB9CisgIGlmIChDT05TUCAobGlzdCkp CisgICAgcmV0dXJuIFhDQVIgKGxpc3QpOworICAgIGVsc2UKKyAgICAgIHJldHVybiBRbmlsOwor fQorCitMaXNwX09iamVjdAorbWNfYXNzb2MgKExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmplY3Qg bGlzdCkKK3sKKyAgTGlzcF9PYmplY3QgY2FyOworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBp ZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAg ICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAg ICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAg YnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0 KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChj YXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkp IHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBs aXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8 IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChYQ0FS IChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChGZXF1 YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlz dCk7CisgICAgfQorICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FSIChsaXN0KTsK KyAgICBlbHNlCisgICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QKK21jX3BsaXN0 X2dldCAoTGlzcF9PYmplY3QgcGxpc3QsIExpc3BfT2JqZWN0IHByb3ApCit7CisgIExpc3BfT2Jq ZWN0IHRhaWwsIGhhbGZ0YWlsOworICAvKiBoYWxmdGFpbCBpcyB1c2VkIHRvIGRldGVjdCBjaXJj dWxhciBsaXN0cy4gICovCisgIHRhaWwgPSBoYWxmdGFpbCA9IHBsaXN0OworICB3aGlsZSAoQ09O U1AgKHRhaWwpICYmIENPTlNQIChYQ0RSICh0YWlsKSkpCisgICAgeworICAgICAgaWYgKEVRIChw cm9wLCBYQ0FSICh0YWlsKSkpCisgICAgICAgIHJldHVybiBYQ0FSIChYQ0RSICh0YWlsKSk7Cisg ICAgICB0YWlsID0gWENEUiAoWENEUiAodGFpbCkpOworICAgICAgaGFsZnRhaWwgPSBYQ0RSICho YWxmdGFpbCk7CisgICAgICBpZiAoRVEgKHRhaWwsIGhhbGZ0YWlsKSkKKyAgICAgICAgYnJlYWs7 CisgICAgfQorICByZXR1cm4gUW5pbDsKK30KKworLyogUkVHSU9OIEJFR0lOOiAgbWNfcmVnaW9u X2xpbWl0ICgxKQorICAgUkVHSU9OIEVORDogIG1jX3JlZ2lvbl9saW1pdCAoMCkgKi8KK3B0cmRp ZmZfdAorbWNfcmVnaW9uX2xpbWl0IChib29sIGJlZ2luX3ApCit7CisgIGlmICghTklMUCAoVnRy YW5zaWVudF9tYXJrX21vZGUpCisgICAgICAmJiBOSUxQIChWbWFya19ldmVuX2lmX2luYWN0aXZl KQorICAgICAgJiYgTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1hcmtfYWN0aXZlKSkpCisg ICAgeHNpZ25hbDAgKFFtYXJrX2luYWN0aXZlKTsKKyAgTGlzcF9PYmplY3QgbWFya2VyID0gQlZB UiAoY3VycmVudF9idWZmZXIsIG1hcmspOworICBpbnQgbSA9IChYTUFSS0VSIChtYXJrZXIpLT5i dWZmZXIpCisgICAgICAgICAgPyBYTUFSS0VSIChtYXJrZXIpLT5jaGFycG9zCisgICAgICAgICAg OiAtMTsKKyAgcmV0dXJuIChtID09IC0xKQorICAgICAgICAgICA/IC0xCisgICAgICAgICA6IChQ VCA8IG0pID09IGJlZ2luX3AKKyAgICAgICAgICAgPyBQVAorICAgICAgICAgOiBjbGlwX3RvX2Jv dW5kcyAoQkVHViwgbSwgWlYpOworfQorCisvKiBDaGVjayB0aGUgcHJlc2VuY2Ugb2YgYSBkaXNw bGF5IHByb3BlcnR5IGFuZCBjb21wdXRlIGl0cyB3aWR0aC4KKyAgIElmIGEgcHJvcGVydHkgd2Fz IGZvdW5kIGFuZCBpdHMgd2lkdGggd2FzIGZvdW5kIGFzIHdlbGwsIHJldHVybgorICAgaXRzIHdp ZHRoICg+PSAwKSBhbmQgc2V0IHRoZSBwb3NpdGlvbiBvZiB0aGUgZW5kIG9mIHRoZSBwcm9wZXJ0 eQorICAgaW4gRU5EUE9TLgorICAgT3RoZXJ3aXNlIGp1c3QgcmV0dXJuIC0xLiAqLworc3RhdGlj IGludAorbWNfY2hlY2tfZGlzcGxheV93aWR0aCAocHRyZGlmZl90IHBvcywgcHRyZGlmZl90IGNv bCwgcHRyZGlmZl90ICplbmRwb3MpCit7CisgIExpc3BfT2JqZWN0IHZhbCwgb3ZlcmxheTsKKyAg aWYgKENPTlNQICh2YWwgPSBnZXRfY2hhcl9wcm9wZXJ0eV9hbmRfb3ZlcmxheQorICAgICAgICAg ICAgICAobWFrZV9maXhudW0gKHBvcyksIFFkaXNwbGF5LCBRbmlsLCAmb3ZlcmxheSkpCisgICAg ICAmJiBFUSAoUXNwYWNlLCBYQ0FSICh2YWwpKSkKKyAgICB7IC8qIEZJWE1FOiBVc2UgY2FsY19w aXhlbF93aWR0aF9vcl9oZWlnaHQuICovCisgICAgICBMaXNwX09iamVjdCBwbGlzdCA9IFhDRFIg KHZhbCksIHByb3A7CisgICAgICBpbnQgd2lkdGggPSAtMTsKKyAgICAgIEVNQUNTX0lOVCBhbGln bl90b19tYXggPSAoY29sIDwgTU9TVF9QT1NJVElWRV9GSVhOVU0gLSBJTlRfTUFYCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IChFTUFDU19JTlQpIElOVF9NQVggKyBjb2wKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTU9TVF9QT1NJVElWRV9GSVhOVU0pOwor ICAgICAgaWYgKChwcm9wID0gbWNfcGxpc3RfZ2V0IChwbGlzdCwgUUN3aWR0aCksIFJBTkdFRF9G SVhOVU1QICgwLCBwcm9wLCBJTlRfTUFYKSkKKyAgICAgICAgICB8fCAocHJvcCA9IG1jX3BsaXN0 X2dldCAocGxpc3QsIFFDcmVsYXRpdmVfd2lkdGgpLAorICAgICAgICAgICAgICBSQU5HRURfRklY TlVNUCAoMCwgcHJvcCwgSU5UX01BWCkpKQorICAgICAgICB3aWR0aCA9IFhGSVhOVU0gKHByb3Ap OworICAgICAgICBlbHNlIGlmIChGTE9BVFAgKHByb3ApICYmIDAgPD0gWEZMT0FUX0RBVEEgKHBy b3ApCisgICAgICAgICAgICAgICAgICYmIFhGTE9BVF9EQVRBIChwcm9wKSA8PSBJTlRfTUFYKQor ICAgICAgICAgIHdpZHRoID0gKGludCkoWEZMT0FUX0RBVEEgKHByb3ApICsgMC41KTsKKyAgICAg ICAgICBlbHNlIGlmICgocHJvcCA9IG1jX3BsaXN0X2dldCAocGxpc3QsIFFDYWxpZ25fdG8pLAor ICAgICAgICAgICAgICAgICAgICBSQU5HRURfRklYTlVNUCAoY29sLCBwcm9wLCBhbGlnbl90b19t YXgpKSkKKyAgICAgICAgICAgIHdpZHRoID0gWEZJWE5VTSAocHJvcCkgLSBjb2w7CisgICAgICAg ICAgICAgIGVsc2UgaWYgKEZMT0FUUCAocHJvcCkgJiYgY29sIDw9IFhGTE9BVF9EQVRBIChwcm9w KQorICAgICAgICAgICAgICAgICAgICAgICAmJiAoWEZMT0FUX0RBVEEgKHByb3ApIDw9IGFsaWdu X3RvX21heCkpCisgICAgICAgICAgICAgICAgd2lkdGggPSAoaW50KShYRkxPQVRfREFUQSAocHJv cCkgKyAwLjUpIC0gY29sOworICAgICAgaWYgKHdpZHRoID49IDApCisgICAgICAgIHsKKyAgICAg ICAgICBwdHJkaWZmX3Qgc3RhcnQ7CisgICAgICAgICAgaWYgKE9WRVJMQVlQIChvdmVybGF5KSkK KyAgICAgICAgICAgICplbmRwb3MgPSBPVkVSTEFZX1BPU0lUSU9OIChPVkVSTEFZX0VORCAob3Zl cmxheSkpOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBnZXRfcHJvcGVydHlfYW5k X3JhbmdlIChwb3MsIFFkaXNwbGF5LCAmdmFsLCAmc3RhcnQsIGVuZHBvcywgUW5pbCk7CisgICAg ICAgICAgLyogRm9yIDpyZWxhdGl2ZS13aWR0aCwgd2UgbmVlZCB0byBtdWx0aXBseSBieSB0aGUg Y29sdW1uCisgICAgICAgICA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bikgLSBjaGFycG9zOworICAgICAgZWxzZQor ICAgICAgICBsZW4gPSBzdHJpbmdfYnl0ZV90b19jaGFyIChzdHJpbmcsIGJ5dGVwb3MgKyBsZW4p IC0gY2hhcnBvczsKKyAgICB9CisgIGlmIChsZW4gPD0gMCkKKyAgICByZXR1cm4gdW5iaW5kX3Rv IChjb3VudCwgUW5pbCk7CisgIHRvID0gbGltaXQgPSBjaGFycG9zICsgbGVuOworI2lmZGVmIEhB VkVfV0lORE9XX1NZU1RFTQorICBpZiAoRlJBTUVfV0lORE9XX1AgKGYpKQorICAgIHsKKyAgICAg IGZvbnRfb2JqZWN0ID0gZm9udF9yYW5nZSAoY2hhcnBvcywgYnl0ZXBvcywgJnRvLCB3aW4sIGZh Y2UsIHN0cmluZyk7CisgICAgICBpZiAoISBGT05UX09CSkVDVF9QIChmb250X29iamVjdCkKKyAg ICAgICAgICB8fCAoISBOSUxQIChyZSkKKyAgICAgICAgICAgICAgJiYgdG8gPCBsaW1pdAorICAg ICAgICAgICAgICAmJiAoZmFzdF9sb29raW5nX2F0IChyZSwgY2hhcnBvcywgYnl0ZXBvcywgdG8s IC0xLCBzdHJpbmcpIDw9IDApKSkKKyAgICAgICAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIFFu aWwpOworICAgIH0KKyAgZWxzZQorI2VuZGlmICAgICAgICAvKiBub3QgSEFWRV9XSU5ET1dfU1lT VEVNICovCisgICAgZm9udF9vYmplY3QgPSB3aW4tPmZyYW1lOworICBsZ3N0cmluZyA9IEZjb21w b3NpdGlvbl9nZXRfZ3N0cmluZyAocG9zLCBtYWtlX2ZpeG51bSAodG8pLCBmb250X29iamVjdCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyk7CisgIGlmIChO SUxQIChMR1NUUklOR19JRCAobGdzdHJpbmcpKSkKKyAgICB7CisgICAgICAvKiBTYXZlIHBvaW50 IGFzIG1hcmtlciBiZWZvcmUgY2FsbGluZyBvdXQgdG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CAo aWQsIG5nbHlwaHMsCisgICBmcm9tLCB0bywgcmV2ZXJzZWRfcCksIGFuZCByZXR1cm4gdHJ1ZS4g IE90aGVyd2lzZSwgdXBkYXRlCisgICBDTVBfSVQtPnN0b3BfcG9zLCBhbmQgcmV0dXJuIGZhbHNl LiAgKi8KK2Jvb2wKK21jX2NvbXBvc2l0aW9uX3Jlc2VhdF9pdCAoc3RydWN0IGNvbXBvc2l0aW9u X2l0ICpjbXBfaXQsIHB0cmRpZmZfdCBjaGFycG9zLAorICAgICAgICAgICAgICAgICAgICAgICAg ICBwdHJkaWZmX3QgYnl0ZXBvcywgcHRyZGlmZl90IGVuZHBvcywgc3RydWN0IHdpbmRvdyAqdywK KyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmZhY2UsIExpc3BfT2JqZWN0 IHN0cmluZykKK3sKKyAgaWYgKGNtcF9pdC0+Y2ggPT0gLTIpCisgICAgeworICAgICAgY29tcG9z aXRpb25fY29tcHV0ZV9zdG9wX3BvcyAoY21wX2l0LCBjaGFycG9zLCBieXRlcG9zLCBlbmRwb3Ms IHN0cmluZyk7CisgICAgICBpZiAoY21wX2l0LT5jaCA9PSAtMiB8fCBjbXBfaXQtPnN0b3BfcG9z ICE9IGNoYXJwb3MpCisgICAgICAgIC8qIFRoZSBjdXJyZW50IHBvc2l0aW9uIGlzIG5vdCBjb21w b3NlZC4gICovCisgICAgICAgIHJldHVybiAwOworICAgIH0KKyAgaWYgKGVuZHBvcyA8IDApCisg ICAgZW5kcG9zID0gTklMUCAoc3RyaW5nKSA/IEJFR1YgOiAwOworICBpZiAoY21wX2l0LT5jaCA8 IDApCisgICAgeworICAgICAgLyogV2UgYXJlIGxvb2tpbmcgYXQgYSBzdGF0aWMgY29tcG9zaXRp b24uICAqLworICAgICAgcHRyZGlmZl90IHN0YXJ0LCBlbmQ7CisgICAgICBMaXNwX09iamVjdCBw cm9wOworICAgICAgZmluZF9jb21wb3NpdGlvbiAoY2hhcnBvcywgLTEsICZzdGFydCwgJmVuZCwg JnByb3AsIHN0cmluZyk7CisgICAgICBjbXBfaXQtPmlkID0gZ2V0X2NvbXBvc2l0aW9uX2lkIChj aGFycG9zLCBieXRlcG9zLCBlbmQgLSBzdGFydCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHByb3AsIHN0cmluZyk7CisgICAgICBpZiAoY21wX2l0LT5pZCA8IDApCisg ICAgICAgIGdvdG8gbm9fY29tcG9zaXRpb247CisgICAgICBjbXBfaXQtPm5jaGFycyA9IGVuZCAt IHN0YXJ0OworICAgICAgY21wX2l0LT5uZ2x5cGhzID0gY29tcG9zaXRpb25fdGFibGVbY21wX2l0 LT5pZF0tPmdseXBoX2xlbjsKKyAgICB9CisgIGVsc2UgaWYgKHcpCisgICAgeworICAgICAgTGlz cF9PYmplY3QgbGdzdHJpbmcgPSBRbmlsOworICAgICAgTGlzcF9PYmplY3QgdmFsLCBlbHQ7Cisg ICAgICBwdHJkaWZmX3QgaTsKKyAgICAgIHZhbCA9IENIQVJfVEFCTEVfUkVGIChWY29tcG9zaXRp b25fZnVuY3Rpb25fdGFibGUsIGNtcF9pdC0+Y2gpOworICAgICAgZm9yIChpID0gMDsgaSA8IGNt cF9pdC0+cnVsZV9pZHg7IGkrKywgdmFsID0gWENEUiAodmFsKSk7CisgICAgICBpZiAoY2hhcnBv cyA8IGVuZHBvcykKKyAgICAgICAgeworICAgICAgICAgIGZvciAoOyBDT05TUCAodmFsKTsgdmFs ID0gWENEUiAodmFsKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZWx0ID0gWENBUiAo dmFsKTsKKyAgICAgICAgICAgICAgaWYgKCEgVkVDVE9SUCAoZWx0KSB8fCBBU0laRSAoZWx0KSAh PSAzCisgICAgICAgICAgICAgICAgICB8fCAhIElOVEVHRVJQIChBUkVGIChlbHQsIDEpKSkKKyAg ICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgaWYgKFhGSVhOQVQgKEFSRUYg KGVsdCwgMSkpICE9IGNtcF9pdC0+bG9va2JhY2spCisgICAgICAgICAgICAgICAgZ290byBub19j b21wb3NpdGlvbjsKKyAgICAgICAgICAgICAgbGdzdHJpbmcgPSBtY19hdXRvY21wX2NoYXJzIChl bHQsIGNoYXJwb3MsIGJ5dGVwb3MsIGVuZHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB3LCBmYWNlLCBzdHJpbmcpOworICAgICAgICAgICAgICBpZiAoY29tcG9z aXRpb25fZ3N0cmluZ19wIChsZ3N0cmluZykpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICAgIGxnc3RyaW5nID0gUW5pbDsKKyAgICAgICAgICAgICAgLyogQ29tcG9zaXRpb24g ZmFpbGVkIHBlcmhhcHMgYmVjYXVzZSB0aGUgZm9udCBkb2Vzbid0CisgICAgICAgICAgICAgICAg IHN1cHBvcnQgc3VmZmljaWVudCByYW5nZSBvZiBjaGFyYWN0ZXJzLiAgVHJ5IHRoZQorICAgICAg ICAgICAgICAgICBvdGhlciBjb21wb3NpdGlvbiBydWxlcyBpZiBhbnkuICAqLworICAgICAgICAg ICAgfQorICAgICAgICAgIGNtcF9pdC0+cmV2ZXJzZWRfcCA9IDA7CisgICAgICAgIH0KKyAgICAg IGVsc2UKKyAgICAgICAgeworICAgICAgICAgIHB0cmRpZmZfdCBjcG9zID0gY2hhcnBvcywgYnBv cyA9IGJ5dGVwb3M7CisgICAgICAgICAgY21wX2l0LT5yZXZlcnNlZF9wID0gMTsKKyAgICAgICAg ICBlbHQgPSBYQ0FSICh2YWwpOworICAgICAgICAgIGlmIChjbXBfaXQtPmxvb2tiYWNrID4gMCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3BvcyA9IGNoYXJwb3MgLSBjbXBfaXQtPmxv b2tiYWNrOworICAgICAgICAgICAgICBpZiAoU1RSSU5HUCAoc3RyaW5nKSkKKyAgICAgICAgICAg ICAgICBicG9zID0gc3RyaW5nX2NoYXJfdG9fYnl0ZSAoc3RyaW5nLCBjcG9zKTsKKyAgICAgICAg ICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGJwb3MgPSBDSEFSX1RPX0JZVEUgKGNwb3MpOwor ICAgICAgICAgICAgfQorICAgICAgICAgIGxnc3RyaW5nID0gbWNfYXV0b2NtcF9jaGFycyAoZWx0 LCBjcG9zLCBicG9zLCBjaGFycG9zICsgMSwgdywgZmFjZSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHN0cmluZyk7CisgICAgICAgICAgaWYgKCEgY29tcG9zaXRpb25fZ3N0 cmluZ19wIChsZ3N0cmluZykKKyAgICAgICAgICAgICAgfHwgY3BvcyArIExHU1RSSU5HX0NIQVJf TEVOIChsZ3N0cmluZykgLSAxICE9IGNoYXJwb3MpCisgICAgICAgICAgICAvKiBDb21wb3NpdGlv biBmYWlsZWQgb3IgZGlkbid0IGNvdmVyIHRoZSBjdXJyZW50CisgICAgICAgICAgICAgICBjaGFy YWN0ZXIuICAqLworICAgICAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgICAgICAgfQor ICAgICAgaWYgKE5JTFAgKGxnc3RyaW5nKSkKKyAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsK KyAgICAgIGlmIChOSUxQIChMR1NUUklOR19JRCAobGdzdHJpbmcpKSkKKyAgICAgICAgbGdzdHJp bmcgPSBjb21wb3NpdGlvbl9nc3RyaW5nX3B1dF9jYWNoZSAobGdzdHJpbmcsIC0xKTsKKyAgICAg IGNtcF9pdC0+aWQgPSBYRklYTlVNIChMR1NUUklOR19JRCAobGdzdHJpbmcpKTsKKyAgICAgIGZv ciAoaSA9IDA7IGkgPCBMR1NUUklOR19HTFlQSF9MRU4gKGxnc3RyaW5nKTsgaSsrKQorICAgICAg ICBpZiAoTklMUCAoTEdTVFJJTkdfR0xZUEggKGxnc3RyaW5nLCBpKSkpCisgICAgICAgICAgYnJl YWs7CisgICAgICBjbXBfaXQtPm5nbHlwaHMgPSBpOworICAgICAgY21wX2l0LT5mcm9tID0gMDsK KyAgICAgIGNtcF9pdC0+dG8gPSBpOworICAgIH0KKyAgZWxzZQorICAgIGdvdG8gbm9fY29tcG9z aXRpb247CisgIHJldHVybiAxOworIG5vX2NvbXBvc2l0aW9uOgorICBpZiAoY2hhcnBvcyA9PSBl bmRwb3MpCisgICAgcmV0dXJuIDA7CisgIGlmIChjaGFycG9zIDwgZW5kcG9zKQorICAgIHsKKyAg ICAgIGNoYXJwb3MrKzsKKyAgICAgIGlmIChOSUxQIChzdHJpbmcpKQorICAgICAgICBJTkNfUE9T IChieXRlcG9zKTsKKyAgICAgIGVsc2UKKyAgICAgICAgYnl0ZXBvcyArPSBCWVRFU19CWV9DSEFS X0hFQUQgKCooU0RBVEEgKHN0cmluZykgKyBieXRlcG9zKSk7CisgICAgfQorICBlbHNlCisgICAg eworICAgICAgY2hhcnBvcy0tOworICAgICAgLyogQllURVBPUyBpcyBjYWxjdWxhdGVkIGluIGNv bXBvc2l0aW9uX2NvbXB1dGVfc3RvcF9wb3MgKi8KKyAgICAgIGJ5dGVwb3MgPSAtMTsKKyAgICB9 CisgIGlmIChjbXBfaXQtPnJldmVyc2VkX3ApCisgICAgZW5kcG9zID0gLTE7CisgIGNvbXBvc2l0 aW9uX2NvbXB1dGVfc3RvcF9wb3MgKGNtcF9pdCwgY2hhcnBvcywgYnl0ZXBvcywgZW5kcG9zLCBz dHJpbmcpOworICByZXR1cm4gMDsKK30KKworLyogU2Nhbm5pbmcgZnJvbSB0aGUgYmVnaW5uaW5n IG9mIHRoZSBjdXJyZW50IGxpbmUsIHN0b3AgYXQgdGhlIGJ1ZmZlcgorICAgcG9zaXRpb24gRU5E UE9TIG9yIGF0IHRoZSBjb2x1bW4gR09BTENPTCBvciBhdCB0aGUgZW5kIG9mIGxpbmUsIHdoaWNo ZXZlcgorICAgY29tZXMgZmlyc3QuCisgICBSZXR1cm4gd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ICAgICAgICAgIHdoZXJlIHdlIG1pZ2h0IG5lZWQgdG8gc2tpcCBtb3JlIGludmlzaWJsZSB0ZXh0 LiAqLworICAgICAgICAgIHNjYW4gPSBza2lwX2ludmlzaWJsZSAoc2NhbiwgJm5leHRfYm91bmRh cnksIGVuZCwgUW5pbCk7CisgICAgICAgICAgaWYgKHNjYW4gIT0gb2xkX3NjYW4pCisgICAgICAg ICAgICBzY2FuX2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOworICAgICAgICAgIGlmIChzY2Fu ID49IGVuZCkKKyAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgfQorICAgICAgLyog VGVzdCByZWFjaGluZyB0aGUgZ29hbCBjb2x1bW4uICBXZSBkbyB0aGlzIGFmdGVyIHNraXBwaW5n CisgICBpbnZpc2libGUgY2hhcmFjdGVycywgc28gdGhhdCB3ZSBwdXQgcG9pbnQgYmVmb3JlIHRo ZQorICAgY2hhcmFjdGVyIG9uIHdoaWNoIHRoZSBjdXJzb3Igd2lsbCBhcHBlYXIuICovCisgICAg ICBpZiAoY29sID49IGdvYWwpCisgICAgICAgIGJyZWFrOworICAgICAgcHJldl9jb2wgPSBjb2w7 CisgICAgICB7IC8qIENoZWNrIGRpc3BsYXkgcHJvcGVydHkuICovCisgICAgICAgIHB0cmRpZmZf dCBlbmRwOworICAgICAgICBpbnQgd2lkdGggPSBtY19jaGVja19kaXNwbGF5X3dpZHRoIChzY2Fu LCBjb2wsICZlbmRwKTsKKyAgICAgICAgaWYgKHdpZHRoID49IDApCisgICAgICAgICAgeworICAg ICAgICAgICAgY29sICs9IHdpZHRoOworICAgICAgICAgICAgaWYgKGVuZHAgPiBzY2FuKSAvKiBB dm9pZCBpbmZpbml0ZSBsb29wcyB3aXRoIDAtd2lkdGggb3ZlcmxheXMuICovCisgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICBzY2FuID0gZW5kcDsKKyAgICAgICAgICAgICAgICBzY2Fu X2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOworICAgICAgICAgICAgICAgIGNvbnRpbnVlOwor ICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorICAgICAgLyogQ2hlY2sgY29t cG9zaXRpb24gc2VxdWVuY2UuICovCisgICAgICBpZiAoY21wX2l0LmlkID49IDAKKyAgICAgICAg ICB8fCAoc2NhbiA9PSBjbXBfaXQuc3RvcF9wb3MKKyAgICAgICAgICAgICAgJiYgbWNfY29tcG9z aXRpb25fcmVzZWF0X2l0ICgmY21wX2l0LCBzY2FuLCBzY2FuX2J5dGUsIGVuZCwgdywgTlVMTCwg UW5pbCkpKQorICAgICAgICBjb21wb3NpdGlvbl91cGRhdGVfaXQgKCZjbXBfaXQsIHNjYW4sIHNj YW5fYnl0ZSwgUW5pbCk7CisgICAgICBpZiAoY21wX2l0LmlkID49IDApCisgICAgICAgIHsKKyAg ICAgICAgICBzY2FuICs9IGNtcF9pdC5uY2hhcnM7CisgICAgICAgICAgc2Nhbl9ieXRlICs9IGNt cF9pdC5uYnl0ZXM7CisgICAgICAgICAgaWYgKHNjYW4gPD0gZW5kKQorICAgICAgICAgICAgY29s ICs9IGNtcF9pdC53aWR0aDsKKyAgICAgICAgICBpZiAoY21wX2l0LnRvID09IGNtcF9pdC5uZ2x5 cGhzKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjbXBfaXQuaWQgPSAtMTsKKyAgICAg ICAgICAgICAgY29tcG9zaXRpb25fY29tcHV0ZV9zdG9wX3BvcyAoJmNtcF9pdCwgc2Nhbiwgc2Nh bl9ieXRlLCBlbmQsIFFuaWwpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICBjbXBfaXQuZnJvbSA9IGNtcF9pdC50bzsKKyAgICAgICAgICBjb250aW51ZTsK KyAgICAgICAgfQorICAgICAgYyA9IEZFVENIX0JZVEUgKHNjYW5fYnl0ZSk7CisgICAgICAvKiBT ZWUgaWYgdGhlcmUgaXMgYSBkaXNwbGF5IHRhYmxlIGFuZCBpdCByZWxhdGVzIHRvIHRoaXMgY2hh cmFjdGVyLiAqLworICAgICAgaWYgKGRwICE9IDAKKyAgICAgICAgICAmJiAhIChtdWx0aWJ5dGUg JiYgTEVBRElOR19DT0RFX1AgKGMpKQorICAgICAgICAgICYmIFZFQ1RPUlAgKERJU1BfQ0hBUl9W RUNUT1IgKGRwLCBjKSkpCisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBjaGFydmVj OworICAgICAgICAgIHB0cmRpZmZfdCBpLCBuOworICAgICAgICAgIC8qIFRoaXMgY2hhcmFjdGVy IGlzIGRpc3BsYXllZCB1c2luZyBhIHZlY3RvciBvZiBnbHlwaHMuCisgICAgICAgICAgICAgVXBk YXRlIHRoZSBjb2x1bW4vcG9zaXRpb24gYmFzZWQgb24gdGhvc2UgZ2x5cGhzLiAqLworICAgICAg ICAgIGNoYXJ2ZWMgPSBESVNQX0NIQVJfVkVDVE9SIChkcCwgYyk7CisgICAgICAgICAgbiA9IEFT SVpFIChjaGFydmVjKTsKKyAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgaSsrKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICAvKiBUaGlzIHNob3VsZCBiZSBoYW5kbGVkIHRoZSBzYW1l IGFzCisgICAgICAgICAgICAgIG5leHRfZWxlbWVudF9mcm9tX2Rpc3BsYXlfdmVjdG9yIGRvZXMg aXQuICovCisgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywg aSk7CisgICAgICAgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5KSkKKyAgICAgICAgICAg ICAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICBjID0gJyAnOworICAgICAgICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAg ICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1xyJyAm JiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQorICAg ICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1x0JykK KyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBjb2wgKz0gdGFiX3dpZHRoOwor ICAgICAgICAgICAgICAgICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAr K2NvbDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAg eworICAgICAgICAgICAgLyogVGhlIGRpc3BsYXkgdGFibGUgZG9lc24ndCBhZmZlY3QgdGhpcyBj aGFyYWN0ZXI7CisgICAgICAgICAgICAgICBpdCBkaXNwbGF5cyBhcyBpdHNlbGYuICovCisgICAg ICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgICAgICAgICAgICBnb3RvIGVuZGxvb3A7CisgICAg ICAgICAgICBpZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0 aXZlX2Rpc3BsYXkpLCBRdCkpCisgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAg ICAgIGlmIChjID09ICdcdCcpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBjb2wg Kz0gdGFiX3dpZHRoOworICAgICAgICAgICAgICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAqIHRh Yl93aWR0aDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChtdWx0aWJ5 dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgIC8qIFN0YXJ0IG9mIG11bHRpLWJ5dGUgZm9ybS4gKi8KKyAgICAgICAgICAgICAgICAg IHVuc2lnbmVkIGNoYXIgKnB0cjsKKyAgICAgICAgICAgICAgICAgIGludCBieXRlcywgd2lkdGg7 CisgICAgICAgICAgICAgICAgICBwdHIgPSBCWVRFX1BPU19BRERSIChzY2FuX2J5dGUpOworICAg ICAgICAgICAgICAgICAgTUNfTVVMVElCWVRFX0JZVEVTX1dJRFRIIChwdHIsIGRwLCBieXRlcywg d2lkdGgpOworICAgICAgICAgICAgICAgICAgLyogU3VidHJhY3Qgb25lIHRvIGNvbXBlbnNhdGUg Zm9yIHRoZSBpbmNyZW1lbnQKKyAgICAgICAgICAgICAgICAgIHRoYXQgaXMgZ29pbmcgdG8gaGFw cGVuIGJlbG93LiAqLworICAgICAgICAgICAgICAgICAgc2Nhbl9ieXRlICs9IGJ5dGVzIC0gMTsK KyAgICAgICAgICAgICAgICAgIGNvbCArPSB3aWR0aDsKKyAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgZWxzZSBpZiAoY3RsX2Fycm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3Nykp CisgICAgICAgICAgICAgICAgICBjb2wgKz0gMjsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYg KGMgPCAwNDAgfHwgYyA+PSAwMTc3KQorICAgICAgICAgICAgICAgICAgICBjb2wgKz0gNDsKKyAg ICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIGNvbCsrOworICAg ICAgICAgIH0KKyAgICAgIHNjYW4rKzsKKyAgICAgIHNjYW5fYnl0ZSsrOworICAgIH0KKyBlbmRs b29wOgorICBsYXN0X2tub3duX2NvbHVtbiA9IGNvbDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fcG9p bnQgPSBwdDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fbW9kaWZpZWQgPSBNT0RJRkY7CisgIGlmIChn b2FsY29sKQorICAgICpnb2FsY29sID0gY29sOworICBpZiAoZW5kcG9zKQorICAgICplbmRwb3Mg PSBzY2FuOworICBpZiAocHJldmNvbCkKKyAgICAqcHJldmNvbCA9IHByZXZfY29sOworfQorCitw dHJkaWZmX3QKK21jX2N1cnJlbnRfY29sdW1uIChzdHJ1Y3Qgd2luZG93ICp3LCBwdHJkaWZmX3Qg cHQpCit7CisgIC8qIGBidWZfY2hhcnBvc190b19ieXRlcG9zJzogIGVhc3NlcnQgKEJVRl9CRUcg KGIpIDw9IGNoYXJwb3MgJiYgY2hhcnBvcyA8PSBCVUZfWiAoYikpOyAqLworICBzdHJ1Y3QgYnVm ZmVyICpiID0gWEJVRkZFUiAody0+Y29udGVudHMpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVm ZmVyID0gTlVMTDsKKyAgaWYgKGIgIT0gY3VycmVudF9idWZmZXIpCisgICAgeworICAgICAgb2xk X2J1ZmZlciA9IGN1cnJlbnRfYnVmZmVyOworICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAoYik7 CisgICAgfQorICBib29sIGJhcmZfY3Jhc2ggPSAoQlVGX0JFRyAoYikgPD0gcHQgJiYgcHQgPD0g QlVGX1ogKGIpKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2gpCisgICAgeworICAg ICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZm ZXIpOworICAgICAgcmV0dXJuIDA7CisgICAgfQorICBFTUFDU19JTlQgbGFzdF9rbm93bl9jb2x1 bW5fbW9kaWZpZWQgPSAwOworICBwdHJkaWZmX3QgbGFzdF9rbm93bl9jb2x1bW4gPSAwOworICBw dHJkaWZmX3QgY29sOworICB1bnNpZ25lZCBjaGFyICpwdHIsICpzdG9wOworICBib29sIHRhYl9z ZWVuOworICBwdHJkaWZmX3QgcG9zdF90YW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mcm9tIHBvaW50IHRvIHRoZSBwcmV2aW91cyBuZXdsaW5lLAorICAgICBjb3VudGluZyB3aWR0 aC4gIFRhYiBjaGFyYWN0ZXJzIGFyZSB0aGUgb25seSBjb21wbGljYXRlZCBjYXNlLiAqLworICAv KiBNYWtlIGEgcG9pbnRlciBmb3IgZGVjcmVtZW50aW5nIHRocm91Z2ggdGhlIGNoYXJzIGJlZm9y ZSBwb2ludC4gKi8KKyAgcHRyID0gQllURV9QT1NfQUREUiAoQ0hBUl9UT19CWVRFIChwdCkgLSAx KSArIDE7CisgIC8qIE1ha2UgYSBwb2ludGVyIHRvIHdoZXJlIGNvbnNlY3V0aXZlIGNoYXJzIGxl YXZlIG9mZiwKKyAgICAgZ29pbmcgYmFja3dhcmRzIGZyb20gcG9pbnQuICovCisgIGlmIChwdCA9 PSBCRUdWKQorICAgIHN0b3AgPSBwdHI7CisgICAgZWxzZSBpZiAocHQgPD0gR1BUIHx8IEJFR1Yg PiBHUFQpCisgICAgICBzdG9wID0gQkVHVl9BRERSOworICAgICAgZWxzZQorICAgICAgICBzdG9w ID0gR0FQX0VORF9BRERSOworICBjb2wgPSAwLCB0YWJfc2VlbiA9IDAsIHBvc3RfdGFiID0gMDsK KyAgd2hpbGUgKDEpCisgICAgeworICAgICAgcHRyZGlmZl90IGksIG47CisgICAgICBMaXNwX09i amVjdCBjaGFydmVjOworICAgICAgaWYgKHB0ciA9PSBzdG9wKQorICAgICAgICB7CisgICAgICAg ICAgLyogV2Ugc3RvcHBlZCBlaXRoZXIgZm9yIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGJ1ZmZlcgor ICAgICAgICAgICAgIG9yIGZvciB0aGUgZ2FwLiAqLworICAgICAgICAgIGlmIChwdHIgPT0gQkVH Vl9BRERSKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgLyogSXQgd2FzIHRoZSBnYXAu ICBKdW1wIGJhY2sgb3ZlciBpdC4gKi8KKyAgICAgICAgICBzdG9wID0gQkVHVl9BRERSOworICAg ICAgICAgIHB0ciA9IEdQVF9BRERSOworICAgICAgICAgIC8qIENoZWNrIHdoZXRoZXIgdGhhdCBi cmluZ3MgdXMgdG8gYmVnaW5uaW5nIG9mIGJ1ZmZlci4gKi8KKyAgICAgICAgICBpZiAoQkVHViA+ PSBHUFQpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgYyA9ICotLXB0cjsK KyAgICAgIGlmIChkcCAmJiBWRUNUT1JQIChESVNQX0NIQVJfVkVDVE9SIChkcCwgYykpKQorICAg ICAgICB7CisgICAgICAgICAgY2hhcnZlYyA9IERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKTsKKyAg ICAgICAgICBuID0gQVNJWkUgKGNoYXJ2ZWMpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAg ICAgICAgICB7CisgICAgICAgICAgICBjaGFydmVjID0gUW5pbDsKKyAgICAgICAgICAgIG4gPSAx OworICAgICAgICAgIH0KKyAgICAgIGZvciAoaSA9IG4gLSAxOyBpID49IDA7IC0taSkKKyAgICAg ICAgeworICAgICAgICAgIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgLyogVGhpcyBzaG91bGQgYmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAgICAg ICAgICBuZXh0X2VsZW1lbnRfZnJvbV9kaXNwbGF5X3ZlY3RvciBkb2VzIGl0LiAqLworICAgICAg ICAgICAgICBMaXNwX09iamVjdCBlbnRyeSA9IEFSRUYgKGNoYXJ2ZWMsIGkpOworICAgICAgICAg ICAgICBpZiAoR0xZUEhfQ09ERV9QIChlbnRyeSkpCisgICAgICAgICAgICAgICAgYyA9IEdMWVBI X0NPREVfQ0hBUiAoZW50cnkpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICAgIGMgPSAnICc7CisgICAgICAgICAgICB9CisgICAgICAgICAgaWYgKGMgPj0gMDQwICYmIGMg PCAwMTc3KQorICAgICAgICAgICAgY29sKys7CisgICAgICAgICAgICBlbHNlIGlmIChjID09ICdc bicKKyAgICAgICAgICAgICAgICAgICAgIHx8IChjID09ICdccicKKyAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwg UXQpKSkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHB0cisrOworICAgICAgICAg ICAgICAgIGdvdG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICBlbHNlIGlmIChjID09ICdcdCcpCisgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgaWYgKHRhYl9zZWVuKQorICAgICAgICAgICAgICAgICAgICBjb2wgPSAoKGNvbCAr IHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICAgICAgICAgICAg cG9zdF90YWIgKz0gY29sOworICAgICAgICAgICAgICAgICAgY29sID0gMDsKKyAgICAgICAgICAg ICAgICAgIHRhYl9zZWVuID0gMTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg ZWxzZSBpZiAoVkVDVE9SUCAoY2hhcnZlYykpCisgICAgICAgICAgICAgICAgICAvKiBXaXRoIGEg ZGlzcGxheSB0YWJsZSBlbnRyeSwgQyBpcyBkaXNwbGF5ZWQgYXMgaXMsIGFuZAorICAgICAgICAg ICAgICAgICAgICAgbm90IGRpc3BsYXllZCBhcyBcTk5OIG9yIGFzIF5OLiAgSWYgQyBpcyBhIHNp bmdsZS1ieXRlCisgICAgICAgICAgICAgICAgICAgICBjaGFyYWN0ZXIsIGl0IHRha2VzIG9uZSBj b2x1bW4uICBJZiBDIGlzIG11bHRpLWJ5dGUgaW4KKyAgICAgICAgICAgICAgICAgICAgIGEgdW5p Ynl0ZSBidWZmZXIsIGl0J3MgdHJhbnNsYXRlZCB0byB1bmlieXRlLCBzbyBpdAorICAgICAgICAg ICAgICAgICAgICAgYWxzbyB0YWtlcyBvbmUgY29sdW1uLiAqLworICAgICAgICAgICAgICAgICAg Kytjb2w7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIGNvbCAr PSAoY3RsX2Fycm93ICYmIGMgPCAwMjAwKSA/IDIgOiA0OworICAgICAgICB9CisgICAgfQorIHN0 YXJ0X29mX2xpbmVfZm91bmQ6CisgIGlmICh0YWJfc2VlbikKKyAgICB7CisgICAgICBjb2wgPSAo KGNvbCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgY29sICs9 IHBvc3RfdGFiOworICAgIH0KKyAgbGFzdF9rbm93bl9jb2x1bW4gPSBjb2w7CisgIGxhc3Rfa25v d25fY29sdW1uX3BvaW50ID0gcHQ7CisgIGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkID0gTU9E SUZGOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVm ZmVyKTsKKyAgcmV0dXJuIGNvbDsKK30KKworREVGVU4gKCJtYy1jdXJyZW50LWNvbHVtbiIsIEZt Y19jdXJyZW50X2NvbHVtbiwgU21jX2N1cnJlbnRfY29sdW1uLCAyLCAyLCAwLAorICAgICAgIGRv YzogLyogUmV0dXJuIHRoZSBob3Jpem9udGFsIHBvc2l0aW9uIG9mIHBvaW50LiAgQmVnaW5uaW5n IG9mIGxpbmUgaXMgY29sdW1uIDAuCitUaGlzIGlzIGNhbGN1bGF0ZWQgYnkgYWRkaW5nIHRvZ2V0 aGVyIHRoZSB3aWR0aHMgb2YgYWxsIHRoZSBkaXNwbGF5ZWQKK3JlcHJlc2VudGF0aW9ucyBvZiB0 aGUgY2hhcmFjdGVyIGJldHdlZW4gdGhlIHN0YXJ0IG9mIHRoZSBwcmV2aW91cyBsaW5lCithbmQg cG9pbnQgKGUuZy4sIGNvb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IGZyYW1lOworICBYU0VURlJBTUUgKGZyYW1lLCBmKTsKKyAgcmV0 dXJuIFNTREFUQSAoRnByaW4xX3RvX3N0cmluZyAoZnJhbWUsIFFuaWwpKTsKK30KKworLyogVVNB R0U6ICBmcHJpbnRmIChzdGRlcnIsICJXSU5ET1cgKCVzKSIsIG1jX3dpbmRvdyAodykpOyAqLwor Y2hhciAqCittY193aW5kb3cgKHN0cnVjdCB3aW5kb3cgKncpCit7CisgIExpc3BfT2JqZWN0IHdp bmRvdzsKKyAgWFNFVFdJTkRPVyAod2luZG93LCB3KTsKKyAgcmV0dXJuIFNTREFUQSAoRnByaW4x X3RvX3N0cmluZyAod2luZG93LCBRbmlsKSk7Cit9CisKKy8qIFVTQUdFOiAgZnByaW50ZiAoc3Rk ZXJyLCAiQ0hBUkFDVEVSICglcykiLCBtY19jaGFyX3RvX3N0cmluZyAoZ2x5cGgtPnUuY2gpKTsg Ki8KK2NoYXIgKgorbWNfY2hhcl90b19zdHJpbmcgKGludCBhcmcpCit7CisgIExpc3BfT2JqZWN0 IGNoYXJhY3RlciA9ICgwIDw9IGFyZyAmJiBhcmcgPD0gTUFYX0NIQVIpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IEZjaGFyX3RvX3N0cmluZyAobWFrZV9maXhudW0gKGFyZykpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7CisgIGNoYXIgKiByZXN1bHQgPSAoIU5JTFAg KGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAmJiBhcmcgPT0gOSkKKyAgICAgICAgICAg ICAgICAgICAgPyAiXFx0IgorICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikK KyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyA9PSAxMCkKKyAgICAgICAgICAgICAgICAgICAg PyAiXFxuIgorICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAg ICAgICAgICAgICAgICYmIGFyZyA9PSAzMikKKyAgICAgICAgICAgICAgICAgICAgPyAiXFxzIgor ICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAg ICAgICYmIGFyZyAhPSA5CisgICAgICAgICAgICAgICAgICAgICAmJiBhcmcgIT0gMTAKKyAgICAg ICAgICAgICAgICAgICAgICYmIGFyZyAhPSAzMikKKyAgICAgICAgICAgICAgICAgICAgPyBTU0RB VEEgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgIDogIlxcPyI7CisgIHJldHVybiByZXN1 bHQ7Cit9CisKK2ludAorbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoTGlzcF9PYmplY3QgYXJnKQor eworICBjaGFyICpzdHI7CisgIGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N0cmluZykKKyAgICBz dHIgPSBTU0RBVEEgKGFyZyk7CisgICAgZWxzZSBpZiAoWFRZUEUgKGFyZykgPT0gTGlzcF9TeW1i b2wpCisgICAgICBzdHIgPSBTU0RBVEEgKFNZTUJPTF9OQU1FIChhcmcpKTsKKyAgICAgIGVsc2Ug cmV0dXJuIC0xOworICBpZiAoIXN0cmNtcCAoc3RyLCAibm8iKSkKKyAgICByZXR1cm4gTUNfTk9f Q1VSU09SOworICBpZiAoIXN0cmNtcCAoc3RyLCAibWMtbGVmdC1mcmluZ2UtYml0bWFwIikpCisg ICAgcmV0dXJuIE1DX0xFRlRfRlJJTkdFX0JJVE1BUDsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgIm1j LXJpZ2h0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTUNfUklHSFRfRlJJTkdFX0JJVE1B UDsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgImJveCIpKQorICAgIHJldHVybiBNQ19GSUxMRURfQk9Y OworICBpZiAoIXN0cmNtcCAoc3RyLCAiZnJhbWVkIikpCisgICAgcmV0dXJuIE1DX0ZSQU1FRF9C T1g7C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zZSBFWFBPU0VfQVJFQV9UV086IHJldHVybiAiRVhQT1NFX0FSRUFf VFdPIjsKKyAgICAgIGNhc2UgRVhQT1NFX0xJTkU6IHJldHVybiAiRVhQT1NFX0xJTkUiOworICAg ICAgZGVmYXVsdDoKKyAgICAgIHJldHVybiAiVU5LTk9XTiI7CisgICAgfQorfQorCit2b2lkCitt Y19jYWNoZV9pbnNwZWN0b3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBtY19tYXRyaXggbWF0 cml4KQoreworICBpbnQgdnBvc19hbGxvY2F0ZWQgPSB3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0 ZWQ7CisgIGludCB2cG9zX3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc191c2VkOworICBmcHJpbnRm IChzdGRlcnIsICIlczogIG1hdHJpeC52cG9zX2FsbG9jYXRlZCAoJWQpIHwgbWF0cml4LnZwb3Nf dXNlZCAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3NfYWxs b2NhdGVkLCB2cG9zX3VzZWQpOworICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBl ID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2Fj aGVfdHlwZSkKKyAgICB7CisgICAgICBpbnQgY3Vyc29yc191c2VkID0gdy0+bWNfbWF0cml4LmN1 cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgbWF0cml4 LmN1cnNvcnNfdXNlZFslc10gKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgbWNfY2Fj aGVfdHlwZV90b19zdHJpbmcgKGNhY2hlX3R5cGUpLCBjdXJzb3JzX3VzZWQpOworICAgIH0KKyAg Zm9yIChpbnQgdm50aCA9IDA7CisgICAgICAgdm50aCA8IHctPm1jX21hdHJpeC52cG9zX3VzZWQ7 CisgICAgICAgKyt2bnRoKQorICAgIHsKKyAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNh Y2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOwor ICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgY2FjaGVf YWxsb2NhdGVkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hl X3R5cGVdOworICAgICAgICAgIGludCBjYWNoZV91c2VkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIg ICAgdm50aCAoJWQpIHwgY2FjaGVfYWxsb2NhdGVkWyVzXSAoJWQpIHwgY2FjaGVfdXNlZFslc10g KCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHZudGgsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlwZSksCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBjYWNoZV9hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlwZSksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICBjYWNoZV91c2VkKTsKKyAgICAgICAgfQorICAgIH0KK30KKwor dm9pZAorbWNfc2V0X2xzbF9iZyAoc3RydWN0IHdpbmRvdyAqdywgZW51bSBmYWNlX2lkIGZhY2Vf aWQsIHN0cnVjdCBtY19SR0IgKmxzbCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3 LT5mcmFtZSk7CisgIHN0cnVjdCBmYWNlICpmYWNlOworICBpZiAoIU5JTFAgKFZmYWNlX3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ICAgICAgIHx8IGZhY2VfaWQgPT0gV0lORE9XX0RJVklERVJf TEFTVF9QSVhFTF9GQUNFX0lEIC8qIFF3aW5kb3dfZGl2aWRlcl9sYXN0X3BpeGVsICovCisgICAg ICAgICAgfHwgZmFjZV9pZCA9PSBWRVJUSUNBTF9CT1JERVJfRkFDRV9JRCAvKiBRdmVydGljYWxf Ym9yZGVyICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBJTlRFUk5BTF9CT1JERVJfRkFDRV9J RCkpIC8qIFFpbnRlcm5hbF9ib3JkZXIgKi8KKyAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChmLCBs b29rdXBfYmFzaWNfZmFjZSAodywgZiwgZmFjZV9pZCkpOworICAgIGVsc2UKKyAgICAgIGZhY2Ug PSBGQUNFX0ZST01fSUQgKGYsIGZhY2VfaWQpOworICBMaXNwX09iamVjdCBjb2xvciA9IChmYWNl ICE9IE5VTEwpCisgICAgICAgICAgICAgICAgICAgICAgPyBmYWNlLT5sZmFjZVtMRkFDRV9CQUNL R1JPVU5EX0lOREVYXQorICAgICAgICAgICAgICAgICAgICAgIDogYnVpbGRfc3RyaW5nICgiT3Jh bmdlUmVkIik7CisgIG1jX3h3X2NvbG9yX3ZhbHVlcyAodywgY29sb3IsIGxzbCk7Cit9CisKK3Zv aWQKK21jX3NldF9lc3NlbnRpYWxzIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgbWNfZXNzZW50 aWFscyAqZXNzZW50aWFscykKK3sKKyAgaWYgKCFCVUZGRVJQICh3LT5jb250ZW50cykpCisgICAg cmV0dXJuOworICBpZiAoTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25m KSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2li bGUpKSkKKyAgICByZXR1cm47CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUp OworICBlc3NlbnRpYWxzLT5hY3RpdmVfcCA9ICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVkX3dp bmRvdykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZiA9PSBGUkFNRV9ESVNQTEFZX0lO Rk8gKGYpLT5oaWdobGlnaHRfZnJhbWUpOworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAo dy0+Y29udGVudHMpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgcHRy ZGlmZl90IG9wb2ludCA9ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpCisgICAgICAg ICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICA6IFhGSVhOVU0gKEZtYXJr ZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOworICBwdHJkaWZmX3QgY3VycmVudF9jb2wgPSBtY19j dXJyZW50X2NvbHVtbiAodywgb3BvaW50KTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFN RV9DT0xVTU5fV0lEVEggKGYpOworICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAo YiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAoQlZBUiAoYiwgZmls bF9jb2x1bW4pKTsKKyAgaW50IGhzY2xfeCA9IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFyX3dpZHRo OworICBpZiAoYiAhPSBjdXJyZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVmZmVyID0g Y3VycmVudF9idWZmZXI7CisgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9Cisg IGVzc2VudGlhbHMtPnp2ID0gWlY7CisgIGVzc2VudGlhbHMtPnp2X2J5dGUgPSBaVl9CWVRFOwor ICBlc3NlbnRpYWxzLT5mY194ID0gKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAg ICAmJiAhTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgPyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoKSArIHctPm1jLmxudW1fcGl4ZWxfd2lk dGggLSBoc2NsX3gKKyAgICAgICAgICAgICAgICAgICAgIDogKGZpbGxfY29sdW1uX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisgICAg ICAgICAgICAgICAgICAgICAgID8gKGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0aCkgLSBoc2Ns X3gKKyAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAgc2V0 X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgIGVudW0gZmFjZV9pZCBmaWxsX2NvbHVt bl9wcmVfenZfZmFjZV9pZCA9CisgICAgKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY19pbmFjdGl2ZV93aW5kb3dzKSkK KyAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkp CisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1pbmFjdGl2ZS1w cmUtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAg ICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRv d3MpKQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVG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X3p2X2NvbG9yLCAmZmNfYXRfenZfZmcpOworICBlc3NlbnRp YWxzLT5mY19mZ1tBVF9aVl0ucmVkID0gZmNfYXRfenZfZmcucmVkOworICBlc3NlbnRpYWxzLT5m Y19mZ1tBVF9aVl0uZ3JlZW4gPSBmY19hdF96dl9mZy5ncmVlbjsKKyAgZXNzZW50aWFscy0+ZmNf ZmdbQVRfWlZdLmJsdWUgPSBmY19hdF96dl9mZy5ibHVlOworICBlbnVtIGZhY2VfaWQgZmlsbF9j b2x1bW5fcG9zdF96dl9mYWNlX2lkID0KKyAgICAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAg ICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRv d3MpKQorICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKSkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0 aXZlLXBvc3QtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAor ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZl X3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxl cikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8g bG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLW9wb2ludC1pbmFjdGl2ZS1wb3N0 LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6IChlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYm ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAg ICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vy c29yLnggPT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoImZjLW9wb2ludC1wb3N0LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6ICghZXNz ZW50aWFscy0+YWN0aXZlX3AKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBmY19pbmFjdGl2ZV93aW5kb3dzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAo YiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICYmIHctPmN1cnNvci54ICE9IGVzc2VudGlh bHMtPmZjX3gpCisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1p bmFjdGl2ZS1wb3N0LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6IChlc3NlbnRpYWxzLT5hY3RpdmVf cAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAg ICAgJiYgdy0+Y3Vyc29yLnggIT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLXBvc3QtenYtZmFjZSIpLCB0cnVlKQorICAgIDog bG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLXBvc3Q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1tQT1NUX1pWXS5ncmVlbiA9IHBvc3RfZmlsbF9wb3N0 X3p2X2ZnLmdyZWVuOworICAgICAgICAgIGVzc2VudGlhbHMtPmNoX2ZnW1BPU1RfWlZdLmJsdWUg PSBwb3N0X2ZpbGxfcG9zdF96dl9mZy5ibHVlOworICAgICAgICB9Cit9CisKK3ZvaWQKK21jX2Nv bG9yX3BpY2tlciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoICpnbHlwaCwgc3RydWN0 IG1jX2Vzc2VudGlhbHMgZXNzZW50aWFscywKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1j X1JHQiAqbHNsX2ZnLCBpbnQgcG9zaW50LCBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBl LAorICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX3Jvd19wb3NpdGlvbiByb3dfcG9zaXRpb24s IGVudW0gbWNfZW5naW5lX3R5cGUgYWN0aW9uX3R5cGUpCit7CisgIHN3aXRjaCAoYWN0aW9uX3R5 cGUpCisgIHsKKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgc3RydWN0 IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgICAgICBwdHJkaWZmX3QgY3VycmVudF9j b2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgcG9zaW50KTsKKyAgICAgIHN0cnVjdCBidWZmZXIg KmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgICAgICBib29sIGZpbGxfY29sdW1uX3AgPSAh TklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgICAgIGludCBmaWxsX2NvbCA9IChmaWxs X2NvbHVtbl9wKQorICAgICAgICAgICAgICAgICAgICAgPyBYRklYTlVNIChCVkFSIChiLCBmaWxs X2NvbHVtbikpCisgICAgICAgICAgICAgICAgICAgICA6IDA7CisgICAgICBlbnVtIGZhY2VfaWQg ZXZlbl9mYWNlX2l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ZCAqLworICAgICAg aWYgKCghZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAmJiBjdXJyZW50X2NvbCAlIDIgIT0gMAor ICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUFJFX1pWKQorICAgICAgICAgIHx8IChmaWxs X2NvbHVtbl9wCisgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAg ICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sCisgICAgICAgICAgICAgICYmIHJvd19w b3NpdGlvbiA9PSBQUkVfWlYpKQorICAgICAgICB7CisgICAgICAgICAgbHNsX2ZnLT5yZWQgPSBv ZGRfZm9yZWdyb3VuZC5yZWQ7CisgICAgICAgICAgbHNsX2ZnLT5ncmVlbiA9IG9kZF9mb3JlZ3Jv dW5kLmdyZWVuOworICAgICAgICAgIGxzbF9mZy0+Ymx1ZSA9IG9kZF9mb3JlZ3JvdW5kLmJsdWU7 CisgICAgICAgIH0KKyAgICAgICAgLyogeWVsbG93ICovCisgICAgICAgIGVsc2UgaWYgKCghZmls bF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgJSAyID09IDAKKyAg ICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgICAg ICAgIHx8IChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2Nv bCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmlsbF9j b2wKKyAgICAgICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXZlbl9mb3JlZ3JvdW5kLnJlZDsK KyAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBldmVuX2ZvcmVncm91bmQuZ3JlZW47CisgICAg ICAgICAgICBsc2xfZmctPmJsdWUgPSBldmVuX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgICB9 CisgICAgICAgICAgLyogZ3JlZW4gKi8KKyAgICAgICAgICBlbHNlIGlmIChmaWxsX2NvbHVtbl9w CisgICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgPiBmaWxsX2NvbAorICAgICAgICAg ICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgICB7CisgICAg ICAgICAgICAgIGxzbF9mZy0+cmVkID0gYmV5b25kX2ZpbGxfZm9yZWdyb3VuZC5yZWQ7CisgICAg ICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLmdyZWVuOwor ICAgICAgICAgICAgICBsc2xfZmctPmJsdWUgPSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLmJsdWU7 CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyb3dfcG9zaXRpb24gPT0gQVRf WlYpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBsc2xfZmctPnJlZCA9IGVzc2Vu dGlhbHMuc3BfZmcucmVkOworICAgICAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBlc3NlbnRp YWxzLnNwX2ZnLmdyZWVuOworICAgICAgICAgICAgICAgIGxzbF9mZy0+Ymx1ZSA9IGVzc2VudGlh bHMuc3BfZmcuYmx1ZTsKKyAgICAgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAg IGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBpZiAoZ2x5cGggIT0gTlVMTAor ICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDk1CisgICAgICAgICAgJiYgY3Vyc29yX3R5cGUg PT0gTUNfSEJBUikKKyAgICAgICAgeworICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXNz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ICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgQ1VSU09S X0lORElDQVRPUjoKKyAgICB7CisgICAgICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZy YW1lKTsKKyAgICAgIGVudW0gZmFjZV9pZCBjdXJzb3JfZmFjZV9pZCA9CisgICAgICAgICghZXNz ZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAgICAmJiByb3dfcG9zaXRpb24g PT0gUFJFX1pWKQorICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAo IistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAgICAg ICA6IChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQ UkVfWlYpCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1y ZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogKCFlc3NlbnRp YWxzLmFjdGl2ZV9wCisgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgICAgICAmJiByb3dfcG9zaXRpb24g PT0gQVRfWlYpCisgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtYXQtenYtZmFjZSIpLCB0cnVlKQorICAgICAg ICA6IChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBB VF9aVikKKyAgICAgICAgICA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QgdGhlIG1hY3JvCisgICAgIE1D X0JVSUxEX0dMWVBIX1NUUklOR1Mgd2lsbCBtb2RpZnkgaXRzIHN0YXJ0IHBhcmFtZXRlci4gIFRo YXQncworICAgICB0aGUgcmVhc29uIHdlIHVzZSBhIHNlcGFyYXRlIHZhcmlhYmxlIGBpJy4gKi8K KyAgaSA9IHN0YXJ0OworICBVU0VfU0FGRV9BTExPQ0E7CisgIE1DX0JVSUxEX0dMWVBIX1NUUklO R1MgKGksIGVuZCwgaGVhZCwgdGFpbCwgaGwsIHgsIGxhc3RfeCk7CisgIGlmICh0YWlsKQorICAg IHsKKyAgICAgIHMgPSBnbHlwaF9zdHJpbmdfY29udGFpbmluZ19iYWNrZ3JvdW5kX3dpZHRoICh0 YWlsKTsKKyAgICAgIHhfcmVhY2hlZCA9IHMtPnggKyBzLT5iYWNrZ3JvdW5kX3dpZHRoOworICAg IH0KKyAgICBlbHNlCisgICAgICB4X3JlYWNoZWQgPSB4OworICAvKiBJZiB0aGVyZSBhcmUgYW55 IGdseXBocyB3aXRoIGxiZWFyaW5nIDwgMCBvciByYmVhcmluZyA+IHdpZHRoIGluCisgICAgIHRo ZSByb3csIHJlZHJhdyBzb21lIGdseXBocyBpbiBmcm9udCBvciBmb2xsb3dpbmcgdGhlIGdseXBo CisgICAgIHN0cmluZ3MgYnVpbHQgYWJvdmUuICovCisgIGlmIChoZWFkICYmICFvdmVybGFwcyAm JiByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wKQorICAgIHsKKyAgICAgIHN0cnVj dCBnbHlwaF9zdHJpbmcgKmgsICp0OworICAgICAgTW91c2VfSExJbmZvICpobGluZm8gPSBNT1VT RV9ITF9JTkZPIChmKTsKKyAgICAgIGludCBtb3VzZV9iZWdfY29sIFVOSU5JVCwgbW91c2VfZW5k X2NvbCBVTklOSVQ7CisgICAgICBib29sIGNoZWNrX21vdXNlX2ZhY2UgPSBmYWxzZTsKKyAgICAg IGludCBkdW1teV94ID0gMDsKKyAgICAgIC8qIElmIG1vdXNlIGhpZ2hsaWdodGluZyBpcyBvbiwg d2UgbWF5IG5lZWQgdG8gZHJhdyBhZGphY2VudAorICAgZ2x5cGhzIHVzaW5nIG1vdXNlLWZhY2Ug aGlnaGxpZ2h0aW5nLiAqLworICAgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIHJvdy0+bW91 c2VfZmFjZV9wCisgICAgICAgICAgJiYgaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19yb3cgPj0gMAor ICAgICAgICAgICYmIGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93ID49IDApCisgICAgICAgIHsK KyAgICAgICAgICBwdHJkaWZmX3Qgcm93X3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+ Y3VycmVudF9tYXRyaXgpOworICAgICAgICAgIGlmIChyb3dfdnBvcyA+PSBobGluZm8tPm1vdXNl X2ZhY2VfYmVnX3JvdworICAgICAgICAgICAgICAmJiByb3dfdnBvcyA8PSBobGluZm8tPm1vdXNl X2ZhY2VfZW5kX3JvdykKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY2hlY2tfbW91c2Vf ZmFjZSA9IHRydWU7CisgICAgICAgICAgICAgIG1vdXNlX2JlZ19jb2wgPSAocm93X3Zwb3MgPT0g aGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19yb3cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfY29sCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IDA7CisgICAgICAgICAgICAgIG1vdXNlX2VuZF9jb2wgPSAocm93X3Zwb3MgPT0gaGxp bmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfY29sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IHJvdy0+dXN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AgZW5jb21wYXNzZXMgbW9y ZSB0aGFuIG9uZSBnbHlwaAorICAgICAgICAgICAgIGFuZCBtb3VzZS1oaWdobGlnaHQgc3BhbnMg b25seSBzb21lIG9mIHRoZXNlIGdseXBocy4KKyAgICAgICAgICAgICBIb3dldmVyLCBtYWtpbmcg aXQgd29yayBwZXJmZWN0bHkgaW52b2x2ZXMgYSBsb3QgbW9yZQorICAgICAgICAgICAgIGNvZGUs IGFuZCBJIGRvbid0IGtub3cgaWYgdGhlIHBhdGhvbG9naWNhbCBjYXNlIG9jY3VycyBpbgorICAg ICAgICAgICAgIHByYWN0aWNlLCBzbyB3ZSdsbCBzdGljayB0byB0aGlzIGZvciBub3cuICAtLS0g Y3lkICAqLworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNlCisgICAgICAgICAgICAgICYm IG1vdXNlX2JlZ19jb2wgPCBzdGFydCAmJiBtb3VzZV9lbmRfY29sID4gaSkKKyAgICAgICAgICAg IG92ZXJsYXBfaGwgPSBEUkFXX01PVVNFX0ZBQ0U7CisgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX05PUk1BTF9URVhUOworICAgICAgICAgIGlmIChobCAh PSBvdmVybGFwX2hsKQorICAgICAgICAgICAgY2xpcF9oZWFkID0gaGVhZDsKKyAgICAgICAgICBq ID0gaTsKKyAgICAgICAgICBNQ19CVUlMRF9HTFlQSF9TVFJJTkdTIChqLCBzdGFydCwgaCwgdCwg b3ZlcmxhcF9obCwgZHVtbXlfeCwgbGFzdF94KTsKKyAgICAgICAgICAvKiBUaGUgYGxlZnRfb3Zl cndyaXR0ZW5gIGJlaGF2aW9yIHRoYXQgZXJhc2VzIHRoZSBmYWtlIGN1cnNvcnMgdHJhY2VzIHRv CisgICAgICAgICAgYGZvbnQtPmRyaXZlci0+ZHJhd2AgaW4gYG5zX2RyYXdfZ2x5cGhfc3RyaW5n JzsgYW5kLCB0aGUgaGVpZ2h0IG9mIHRo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0X292 ZXJ3cml0dGVuX3AgPSB0cnVlOworICAgICAgICAgICAgICBzLT5hY3Rpb25fdHlwZSA9IGFjdGlv bl90eXBlOworICAgICAgICAgICAgICBsZW5ndGggKz0gcy0+Zmlyc3RfZ2x5cGgtPnBpeGVsX3dp ZHRoOworICAgICAgICAgICAgfQorICAgICAgICAgIHJlbGF0aXZlX3ggPSBzdGFydF94IC0gbGVu Z3RoOworICAgICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgICAg eworICAgICAgICAgICAgICBzLT5maXJzdF9nbHlwaC0+cmVsYXRpdmVfeCA9IHJlbGF0aXZlX3g7 CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gcy0+Zmlyc3RfZ2x5cGgtPnBpeGVsX3dpZHRo OworICAgICAgICAgICAgfQorICAgICAgICAgIHN0YXJ0ID0gaTsKKyAgICAgICAgICBjb21wdXRl X292ZXJoYW5nc19hbmRfeCAodCwgaGVhZC0+eCwgdHJ1ZSk7CisgICAgICAgICAgcHJlcGVuZF9n bHlwaF9zdHJpbmdfbGlzdHMgKCZoZWFkLCAmdGFpbCwgaCwgdCk7CisgICAgICAgICAgaWYgKGNs aXBfaGVhZCA9PSBOVUxMKQorICAgICAgICAgICAgY2xpcF9oZWFkID0gaGVhZDsKKyAgICAgICAg fQorICAgICAgLyogUHJlcGVuZCBnbHlwaCBzdHJpbmdzIGZvciBnbHlwaHMgaW4gZnJvbnQgb2Yg dGhlIGZpcnN0IGdseXBoCisgICAgICBzdHJpbmcgdGhhdCBvdmVyd3JpdGUgdGhhdCBnbHlwaCBz dHJpbmcgYmVjYXVzZSBvZiB0aGVpcgorICAgICAgcmlnaHQgb3ZlcmhhbmcuICBGb3IgdGhlc2Ug c3RyaW5ncywgb25seSB0aGUgZm9yZWdyb3VuZCBtdXN0CisgICAgICBiZSBkcmF3biwgYmVjYXVz ZSBpdCBkcmF3cyBvdmVyIHRoZSBnbHlwaCBzdHJpbmcgYXQgYGhlYWQnLgorICAgICAgVGhlIGJh Y2tncm91bmQgbXVzdCBub3QgYmUgZHJhd24gYmVjYXVzZSB0aGlzIHdvdWxkIG92ZXJ3cml0ZQor ICAgICAgcmlnaHQgb3ZlcmhhbmdzIG9mIHByZWNlZGluZyBnbHlwaHMgZm9yIHdoaWNoIG5vIGds eXBoCisgICAgICBzdHJpbmdzIGV4aXN0LiAqLworICAgICAgaSA9IGxlZnRfb3ZlcndyaXRpbmcg KGhlYWQpOworICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIGVudW0gZHJh d19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNl CisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBzdGFydCAmJiBtb3VzZV9lbmRfY29s ID4gaSkKKyAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01PVVNFX0ZBQ0U7CisgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX05PUk1BTF9URVhUOwor ICAgICAgICAgIGlmIChobCA9PSBvdmVybGFwX2hsIHx8IGNsaXBfaGVhZCA9PSBOVUxMKQorICAg ICAgICAgICAgY2xpcF9oZWFkID0gaGVhZDsKKyAgICAgICAgICBNQ19CVUlMRF9HTFlQSF9TVFJJ TkdTIChpLCBzdGFydCwgaCwgdCwgb3ZlcmxhcF9obCwgZHVtbXlfeCwgbGFzdF94KTsKKyAgICAg ICAgICBmb3IgKHMgPSBoOyBzOyBzID0gcy0+bmV4dCkKKyAgICAgICAgICAgIHMtPmJhY2tncm91 bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgICAgIGNvbXB1dGVfb3ZlcmhhbmdzX2FuZF94ICh0 LCBoZWFkLT54LCB0cnVlKTsKKyAgICAgICAgICBwcmVwZW5kX2dseXBoX3N0cmluZ19saXN0cyAo JmhlYWQsICZ0YWlsLCBoLCB0KTsKKyAgICAgICAgfQorICAgICAgLyogQXBwZW5kIGdseXBocyBz dHJpbmdzIGZvciBnbHlwaHMgZm9sbG93aW5nIHRoZSBsYXN0IGdseXBoCisgICAgICBzdHJpbmcg dGFpbCB0aGF0IGFyZSBvdmVyd3JpdHRlbiBieSB0YWlsLiAgVGhlIGJhY2tncm91bmQgb2YKKyAg ICAgIHRoZXNlIHN0cmluZ3MgaGFzIHRvIGJlIGRyYXduIGJlY2F1c2UgdGFpbCdzIGZvcmVncm91 bmQgZHJhd3MKKyAgICAgIG92ZXIgaXQuICovCisgICAgICBpID0gcmlnaHRfb3ZlcndyaXR0ZW4g KHRhaWwpOworICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIGVudW0gZHJh d19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNl CisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBpICYmIG1vdXNlX2VuZF9jb2wgPiBl bmQpCisgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19NT1VTRV9GQUNFOworICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAg ICAgICAgICBpZiAoaGwgIT0gb3ZlcmxhcF9obCkKKyAgICAgICAgICAgIGNsaXBfdGFpbCA9IHRh aWw7CisgICAgICAgICAgTUNfQlVJTERfR0xZUEhfU1RSSU5HUyAoZW5kLCBpLCBoLCB0LCBvdmVy bGFwX2hsLCB4LCBsYXN0X3gpOworICAgICAgICAvKiBUaGUgYHJpZ2h0X292ZXJ3cml0dGVuYCBi ZWhhdmlvciB0aGF0IGVyYXNlcyB0aGUgZmFrZSBjdXJzb3JzIHRyYWNlcyB0bworICAgICAgICBg Zm9udC0+ZHJpdmVyLT5kcmF3YCBpbiBgbnNfZHJhd19nbHlwaF9zdHJpbmcnOyBhbmQsIHRoZSBo ZWl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RhaWwtPnggKyB0YWlsLT53aWR0aCwgZmFsc2UpOwor ICAgICAgICAgIGFwcGVuZF9nbHlwaF9zdHJpbmdfbGlzdHMgKCZoZWFkLCAmdGFpbCwgaCwgdCk7 CisgICAgICAgICAgaWYgKGNsaXBfdGFpbCA9PSBOVUxMKQorICAgICAgICAgICAgY2xpcF90YWls ID0gdGFpbDsKKyAgICAgICAgfQorICAgICAgLyogQXBwZW5kIGdseXBoIHN0cmluZ3MgZm9yIGds eXBocyBmb2xsb3dpbmcgdGhlIGxhc3QgZ2x5cGgKKyAgICAgIHN0cmluZyB0YWlsIHRoYXQgb3Zl cndyaXRlIHRhaWwuICBUaGUgZm9yZWdyb3VuZCBvZiBzdWNoCisgICAgICBnbHlwaHMgaGFzIHRv IGJlIGRyYXduIGJlY2F1c2UgaXQgd3JpdGVzIGludG8gdGhlIGJhY2tncm91bmQKKyAgICAgIG9m IHRhaWwuICBUaGUgYmFja2dyb3VuZCBtdXN0IG5vdCBiZSBkcmF3biBiZWNhdXNlIGl0IGNvdWxk CisgICAgICBwYWludCBvdmVyIHRoZSBmb3JlZ3JvdW5kIG9mIGZvbGxvd2luZyBnbHlwaHMuICov CisgICAgICBpID0gcmlnaHRfb3ZlcndyaXRpbmcgKHRhaWwpOworICAgICAgaWYgKGkgPj0gMCkK KyAgICAgICAgeworICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOwor ICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNlCisgICAgICAgICAgICAgICYmIG1vdXNlX2Jl Z19jb2wgPCBpICYmIG1vdXNlX2VuZF9jb2wgPiBlbmQpCisgICAgICAgICAgICBvdmVybGFwX2hs ID0gRFJBV19NT1VTRV9GQUNFOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBvdmVy bGFwX2hsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAgICAgICAgICBpZiAoaGwgPT0gb3ZlcmxhcF9o bCB8fCBjbGlwX3Rh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UVfUklGIChmKS0+bWNfc2NyaWJl X3N0cmluZyAocywgbWF0cml4LCByb3csIGxzbCwgZ2x5cGhfZmxhdm9yLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsIGN1cnNv cl9nY19wKTsKKyNpZm5kZWYgSEFWRV9OUworICAvKiBXaGVuIGZvY3VzIGEgc29sZSBmcmFtZSBh bmQgbW92ZSBob3Jpem9udGFsbHksIHRoaXMgY2xlYXJzIG9uX3AKKyAgICAgY2F1c2luZyBhIGZh aWx1cmUgdG8gZXJhc2UgcHJldiBjdXJzb3IgcG9zaXRpb24uICovCisgIGlmIChhcmVhID09IFRF WFRfQVJFQQorICAgICAgJiYgIXJvdy0+ZnVsbF93aWR0aF9wCisgICAgICAvKiBXaGVuIGRyYXdp bmcgb3ZlcmxhcHBpbmcgcm93cywgb25seSB0aGUgZ2x5cGggc3RyaW5ncycKKyAgICAgIGZvcmVn cm91bmQgaXMgZHJhd24sIHdoaWNoIGRvZXNuJ3QgZXJhc2UgYSBjdXJzb3IgY29tcGxldGVseS4g Ki8KKyAgICAgICYmICFvdmVybGFwcykKKyAgICB7CisgICAgICBpbnQgeDAgPSBjbGlwX2hlYWQg PyBjbGlwX2hlYWQtPnggOiAoaGVhZCA/IGhlYWQtPnggOiB4KTsKKyAgICAgIGludCB4MSA9IChj bGlwX3RhaWwgPyBjbGlwX3RhaWwtPnggKyBjbGlwX3RhaWwtPmJhY2tncm91bmRfd2lkdGgKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAodGFpbCA/IHRhaWwtPnggKyB0YWlsLT5iYWNrZ3Jv dW5kX3dpZHRoIDogeCkpOworICAgICAgeDAgLT0gYXJlYV9sZWZ0OworICAgICAgeDEgLT0gYXJl YV9sZWZ0OworICAgICAgbm90aWNlX292ZXJ3cml0dGVuX2N1cnNvciAodywgVEVYVF9BUkVBLCB4 MCwgeDEsCisgICAgICAgICByb3ctP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0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAg ICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGludCB2 cG9zLCBpbnQgd2QsIGludCBoLAorICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29y X3R5cGUgY3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAg ICAgc3RydWN0IG1jX1JHQiBsc2wsIGJvb2wgYWN0aXZlX3AsIGVudW0gbWNfZmxhdm9yIGdseXBo X2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wKQoreworICAvKiBg bWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29udGFpbnMgdGhlIGZvbGxvd2luZyB0ZXN0cywK KyAgZWFzc2VydCAobWF0cml4ICYmIG1hdHJpeC0+cm93cyk7CisgIGVhc3NlcnQgKHJvdyA+PSAw ICYmIHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1h dHJpeCAmJiBtYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9v bmUpCisgICAgcmV0dXJuOworICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZwb3MgPj0gMCAmJiB2 cG9zIDwgbWF0cml4LT5ucm93cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX3R3 bykKKyAgICByZXR1cm47CisgIGlmICh4IDwgMAorICAgICAgfHwgeSA8IDAKKyAgICAgIHx8IGhw b3MgPCAwCisgICAgICB8fCB2cG9zIDwgMCkKKyAgICByZXR1cm47CisgIHN0cnVjdCBmcmFtZSAq ZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBib29sIGF1dG9faHNjcm9sbF9tb2RlX3AgPSBFUSAo RmJ1ZmZlcl9sb2NhbF92YWx1ZSAoUWF1dG9faHNjcm9sbF9tb2RlLCB3LT5jb250ZW50cyksIFFj dXJyZW50X2xpbmUpOworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpICovCisgIGJvb2wg aHNjbF9hbGxfdGVtcF9wID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIG5vdGhp bmcuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3Jv bGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBM RTogIEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIGVsc2UgYmVzaWRlcyBob3Jpem9udGFsbHkg c2Nyb2xsaW5nIHRoZQorICAgICAgICAgICAgICAgY3VycmVudCBsaW5lIGRpZmZlcmVudGx5Lgor ICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxl ZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzFfcCA9ICghdy0+c3VzcGVu ZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3Jv bGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsK KyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgLi4uCisgICAgICAgICAgICAgICBDdXJyZW50 IGxpbmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBi b29sIGhzY2xfYWxsX3Blcm1fMl9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID09IDAKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIChzY3Jv bGwtbGVmdCA1KTsgYW5kLCB0aGVuIHByZXNzIHRoZSBsZWZ0IGFycm93IGtleSBvbmUgdGltZS4K KyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBk aWZmZXJlbnRseS4qLworICBib29sIGhzY2xfdGVtcF9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNj cm9sbAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAg ICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBk byBzb21ldGhpbmcgdGhhdCBjYXVzZXMgdGhlIGN1cnJlbnQgbGluZSB0byBiZQorICAgICAgICAg ICAgICAgaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LgorICAgICAgICAgICAgICAg Q3VycmVudCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLwor ICBib29sIGhzY2xfcGVybV9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAg ICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Ny b2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhz Y3JvbGwpOworICBpbnQgZnJpbmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgIGlu dCBmYWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOworICBpZiAoIXJlbW92ZV9wCisgICAgICAmJiBn bHlwaF9mbGF2b3IgPT0gTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAKKyAgICAgICYmICFoc2NsX2Fs bF90ZW1wX3AKKyAgICAgICYmICFoc2NsX3RlbXBfcAorICAgICAgJiYgIWhzY2xfcGVybV9wCisg ICAgICAmJiAhaHNjbF9hbGxfcGVybV8wX3AKKyAgICAgICYmICFoc2NsX2FsbF9wZXJtXzFfcAor ICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMl9wK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VRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1h cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7 CisgICAgICByb3ctPmxlZnRfZnJpbmdlX2ZhY2VfaWQgPSBmYWNlX2lkOworICAgICAgcm93LT5s ZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgcm93LT5mcmluZ2VfYml0bWFwX3BlcmlvZGlj X3AgPSBmYWxzZTsKKyAgICB9CisgICAgZWxzZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAg JiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAgICAgICAg JiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBf cAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAgICAgICAg ICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3RlbXBfcAor ICAgICAgICAgICAgICAgICB8fCBoc2NsX3Blcm1fcCkpCisgICAgICB7CisgICAgICAgIGVudW0g ZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQgPQorICAgICAgICAgICghYWN0aXZlX3AKKyAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfaW5hY3Rp dmVfd2luZG93cykpKQorICAgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50 ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgRlJJTkdF X0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAgICAgICA/IGxv b2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLXBy ZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgIDogREVGQVVMVF9G QUNFX0lEOworICAgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdF X0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAg ICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgaWYgKGhzY2xfYWxsX3Bl cm1fMF9wKQorICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAo dywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICBlbHNl IGlmIChoc2NsX2FsbF9wZXJtXzFfcCkKKyAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19n ZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgZmFsc2Up OworICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9hbGxfcGVybV8yX3ApCisgICAgICAgICAgICAg IGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2Ns LXBlcm0iKSwgZmFsc2UsIHRydWUpOworICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX3Blcm1f cCkKKyAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAg KHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUsIHRydWUpOworICAgICAgICAgICAgICAg IGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRt YXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXRlbXAiKSwgZmFs c2UsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfdGVtcF9wKQorICAg ICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcs IGludGVybiAoIistaHNjbC10ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgcm93LT5sZWZ0 X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAg ICAgcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgICAgcm93LT5sZWZ0 X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNf cCA9IGZhbHNlOworICAgICAgfQorICAgICAgZWxzZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAg ICAgICAmJiAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9X X1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAg ICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAg ICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JB UgorICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJf QkFDS1NMQVNIKSkKKyAgICAgICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2 b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5n bGVfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Z2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRf aG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xl CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9 PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19W RVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBR bWNfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiBRbmlsOworICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSAo Y3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBsb29rdXBfZnJpbmdlX2JpdG1hcCAoYml0bWFwX2ZsYXZvcikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIGZhY2Vf aWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAg ICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xF X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09 IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAg ICAgICAgICAgICAgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgi Ky1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAg ICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAK KyAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX0hP TExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAg ICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxf QkFSKQorICAgICAgICAgICAgICAgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy1iYXItcHJlLXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAg ICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIHJvdy0+Y3Vyc29y X2luX2ZyaW5nZV9wID0gZmFsc2U7CisgICAgICAgICAgcm93LT5yaWdodF9mcmluZ2VfYml0bWFw ID0gZnJpbmdlX2JpdG1hcDsKKyAgICAgICAgICByb3ctPnJpZ2h0X2ZyaW5nZV9mYWNlX2lkID0g ZmFjZV9pZDsKKyAgICAgICAgICByb3ctPnJpZ2h0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAg ICAgIHJvdy0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wID0gZmFsc2U7CisgICAgICAgIH0KKyAg ICAgICAgZWxzZSBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgICAgICAgICAg IHx8IGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MpCisgICAgICAgICAgeworICAgICAgICAg ICAgYm9vbCBvbl9wID0gdHJ1ZTsKKyAgICAgICAgICAgIEZSQU1FX1JJRiAoZiktPm1jX3Njcmli ZV9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCB3ZCwgaCwgbHNsLCBjdXJz b3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1 cnNvcl93aWR0aCwgZ2x5cGhfZmxhdm9yLCBvbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX3ApOworICAgICAgICAgIH0KK30KKworLyogRHVt cCBjb250ZW50cyBvZiBnbHlwaCBHTFlQSCB0byBzdGRlcnIuICBST1cgYW5kIEFSRUEgYXJlCisg ICB0aGUgZ2x5cGggcm93IGFuZCBhcmVhIHdoZXJlIHRoZSBnbHlwaCBjb21lcyBmcm9tLiAqLwor dm9pZAorbWNfZHVtcF9nbHlwaCAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBzdHJ1Y3QgZ2x5cGgg KmdseXBoLCBpbnQgYXJlYSwKKyAgICAgICAgICAgICAgIGludCByZWxhdGl2ZV94LCBpbnQgdnBv cykKK3sKKyAgYm9vbCBnbHlwaF96dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNbYXJlYV0gPT0g cm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19F TkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBI CisgICAgICB8fCBnbHlwaC0+dHlwZSA9PSBHTFlQSExFU1NfR0xZUEgpCisgICAgeworICAgICAg ZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAl YyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0g MCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAg ICAgIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICA/ICdDJworICAgICAgICAg OiAnRycpLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBo LT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2Jq ZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAorICAg ICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT51LmNoLAorICAgICAgICBn bHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAg Z2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9w ID8gIlpWIiA6ICItLSIsCisgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChnbHlwaC0+dS5jaCkp OworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAl OSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQgICUzZCAlcyAlc1xuIiwKKyAgICAg ICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFth cmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVf eCwKKyAgICAgICAgJ1MnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZF UlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklO R1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAg KGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAor ICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIDB1LAorICAgICAgICBnbHlwaC0+ ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgt PnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpW IiA6ICItLSIsCisgICAgICAgICJcXFMiKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBl ID09IElNQUdFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAg IiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4x ZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0s CisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAt IDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5j aGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8g J0InCisgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8g J1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJzAn CisgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAg ICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9p ZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0 X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICIt LSIsCisgICAgICAgICcuJyk7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01Q T1NJVEVfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1 InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgZ2x5cGgg LSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAw KSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAg ICAgJysnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBn bHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5p ZCk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICBn bHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAg Z2x5cGgtPnJpZ2h0X2JveF9saW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0 aWMpCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgJTNkICVzIC4gWyVkLSVkXVxuIiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAi LS0iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5 cGgtPnNsaWNlLmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgZnByaW50ZiAoc3RkZXJy LCAiXG4iKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgp CisgICAgeworI2lmbmRlZiBIQVZFX1hXSURHRVRTCisgICAgICBlYXNzdW1lIChmYWxzZSk7Cisj ZWxzZQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICAlNWQvJS01ZCAlNWQgJTRj ICU2ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJWNcbiIsCisgICAgICAg IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJl YV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gs CisgICAgICAgICdYJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQ IChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAo Z2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICA6ICctJykpLAorICAg ICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAg ICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVf cCwKKyAgICAgICAgZ2x5cGgtPnUueHdpZGdldCwKKyAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBo X3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgJy4nKTsKKyNlbmRpZgorICAgIH0KK30KKwor LyogRHVtcCB0aGUgY29udGVudHMgb2YgZ2x5cGggcm93IGF0IFZQT1MgaW4gTUFUUklYIHRvIHN0 ZGVyci4KKyAgIEdMWVBIUyAwIG1lYW5zIGRvbid0IHNob3cgZ2x5cGggY29udGVudHMuCisgICBH TFlQSFMgMSBtZWFucyBzaG93IGdseXBocyBpbiBzaG9ydCBmb3JtCisgICBHTFlQSFMgPiAxIG1l YW5zIHNob3cgZ2x5cGhzIGluIGxvbmcgZm9ybS4gKi8KK3ZvaWQKK21jX2R1bXBfZ2x5cGhfcm93 IChzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB2cG9zLCBpbnQgZ2x5cGhzKQoreworICBpbnQg cmVsYXRpdmVfeCA9IDA7CisgIGlmIChnbHlwaHMgIT0gMSkKKyAgICB7CisgICAgICBmcHJpbnRm IChzdGRlcnIsICJcbkRVTVAgR0xZUEggUk9XXG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwg IlJvdyAgICAgU3RhcnQgICAgICAgRW5kIFVzZWQgb0U+PFxcQ1RaRmVzbSAgICAgWCAgICBZICAg IFcgICAgSCAgICBWICAgIEEgICAgUFxuIik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICI9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT1cbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiJTNkICU5InBE ImQgJTkicEQiZCAlNGQgJTEuMWQlMS4xZCUxLjFkJTEuMWRcCislMS4xZCUxLjFkJTEuMWQlMS4x ZCUxLjFkJTEuMWQlMS4xZCUxLjFkICAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZCAlNGRcbiIsCisg ICAgICAgICB2cG9zLAorICAgICAgICAgTUFUUklYX1JPV19TVEFSVF9DSEFSUE9TIChyb3cpLAor ICAgICAgICAgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSwKKyAgICAgICAgIHJvdy0+dXNl ZFtURVhUX0FSRUFdLAorICAgICAgICAgcm93LT5jb250YWluc19vdmVybGFwcGluZ19nbHlwaHNf cCwKKyAgICAgICAgIHJvdy0+ZW5hYmxlZF9wLAorICAgICAgICAgcm93LT50cnVuY2F0ZWRfb25f bGVmdF9wLAorICAgICAgICAgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCwKKyAgICAgICAgIHJv dy0+Y29udGludWVkX3AsCisgICAgICAgICBNQVRSSVhfUk9XX0NPTlRJTlVBVElPTl9MSU5FX1Ag KHJvdyksCisgICAgICAgICBNQVRSSVhfUk9XX0RJU1BMQVlTX1RFWFRfUCAocm93KSwKKyAgICAg ICAgIHJvdy0+ZW5kc19hdF96dl9wLAorICAgICAgICAgcm93LT5maWxsX2xpbmVfcCwKKyAgICAg ICAgIHJvdy0+ZW5kc19pbl9taWRkbGVfb2ZfY2hhcl9wLAorICAgICAgICAgcm93LT5zdGFydHNf aW5fbWlkZGxlX29mX2NoYXJfcCwKKyAgICAgICAgIHJvdy0+bW91c2VfZmFjZV9wLAorICAgICAg ICAgcm93LT54LAorICAgICAgICAgcm93LT55LAorICAgICAgICAgcm93LT5waXhlbF93aWR0aCwK KyAgICAgICAgIHJvdy0+aGVpZ2h0LAorICAgICAgICAgcm93LT52aXNpYmxlX2hlaWdodCwKKyAg ICAgICAgIHJvdy0+YXNjZW50LAorICAgICAgICAgcm93LT5waHlzX2FzY2VudCk7CisgICAgICAv KiBUaGUgbmV4dCAzIGxpbmVzIHNob3VsZCBhbGlnbiB0byAiU3RhcnQiIGluIHRoZSBoZWFkZXIu ICovCisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTkicEQiZCAlOSJwRCJkXHQlNWRcbiIs IHJvdy0+c3RhcnQub3ZlcmxheV9zdHJpbmdfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5vdmVy bGF5X3N0cmluZ19pbmRleCwKKyAgICAgICAgIHJvdy0+Y29udGludWF0aW9uX2xpbmVzX3dpZHRo KTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcbiIsCisgICAg ICAgICBDSEFSUE9TIChyb3ctPnN0YXJ0LnN0cmluZ19wb3MpLAorICAgICAgICAgQ0hBUlBPUyAo cm93LT5lbmQuc3RyaW5nX3BvcykpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAgICU5ZCAl OWRcbiIsIHJvdy0+c3RhcnQuZHB2ZWNfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5kcHZlY19p bmRleCk7CisgICAgfQorICBpZiAoZ2x5cGhzID4gMSkKKyAgICB7CisgICAgICBmb3IgKGludCBh cmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAg ICB7CisgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOwor ICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJl YV07CisgICAgICAgICAgLyogR2x5cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4gKi8KKyAgICAg ICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBo LT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgIGlmIChn bHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIkdseXBoIy9U b3RhbCBSZWwuWCBUICAgICAgIFBvcyBPICAgVyAgICAgQ29kZSBGYWNlIExSIEhQT1MgWlYgQ1xu Iik7CisgICAgICAgICAgZm9yICg7IGdseXBoIDwgZ2x5cGhfZW5kOyArK2dseXBoKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCBy ZWxhdGl2ZV94LCB2cG9zKTsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4 ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAo Z2x5cGhzID09IDEpCisgICAgICB7CisgICAgICAgIGNoYXIgc1tTSFJUX01BWCArIDRdOworICAg ICAgICBmb3IgKGludCBhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsg KythcmVhKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGludCBpOworICAgICAgICAgICAgZm9y IChpID0gMDsgaSA8IHJvdy0+dXNlZFthcmVhXTsgKytpKQorICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdICsgaTsK KyAgICAgICAgICAgICAgICBpZiAoaSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICYmIGFyZWEgPT0gVEVYVF9BUkVBCisgICAgICAgICAgICAgICAgICAgICYmIE5J TFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT50eXBlID09 IENIQVJfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gJyAnKQor ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBzdHJjcHkgKCZzW2ldLCAi W1xcbl0iKTsKKyAgICAgICAgICAgICAgICAgICAgaSArPSA0OworICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPCAweDgwCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA+PSAnICcpCisgICAgICAgICAgICAg ICAgICAgIHNbaV0gPSBnbHlwaC0+dS5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c2libGVfcCA9IHBvc192aXNpYmxlX3AgKHcsIFBULCAmZDEsICZkMiwgJmQzLCAmZDQsICZkNSwg Jnlwb3MpOworICAgICAgaW50IGhlYWRlcl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElO RV9IRUlHSFQgKHcpOworICAgICAgaW50IHZvZmZzZXQgPSAoaGVhZGVyX2xpbmVfaGVpZ2h0ID4g MAorICAgICAgICAgICAgICAgICAgICAgJiYgeXBvcyA+IDApCisgICAgICAgICAgICAgICAgICAg ICAgPyB5cG9zICsgMQorICAgICAgICAgICAgICAgICAgICAgIDogeXBvczsKKyAgICAgIGlmICh2 aXNpYmxlX3ApCisgICAgICAgIHZwb3MgPSB2b2Zmc2V0OworICAgICAgICBlbHNlCisgICAgICAg ICAgdnBvcyA9IDA7CisgICAgfQorICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgQ0hFQ0tfTlVN QkVSIChyb3cpOworICAgICAgICB2cG9zID0gWEZJWE5VTSAocm93KTsKKyAgICAgIH0KKyAgaWYg KHZwb3MgPj0gMCAmJiB2cG9zIDwgbWF0cml4LT5ucm93cykKKyAgICBtY19kdW1wX2dseXBoX3Jv dyAoTUFUUklYX1JPVyAobWF0cml4LCB2cG9zKSwKKyAgICAgICAgdnBvcywKKyAgICAgICAgVFlQ RV9SQU5HRURfRklYTlVNUCAoaW50LCBnbHlwaHMpID8gWEZJWE5VTSAoZ2x5cGhzKSA6IDIpOwor ICByZXR1cm4gUW5pbDsKK30KKwordm9pZAorbWNfZHVtcF9nbHlwaF9tYXRyaXggKHN0cnVjdCBn bHlwaF9tYXRyaXggKm1hdHJpeCwgaW50IGdseXBocykKK3sKKyAgaW50IGk7CisgIGZvciAoaSA9 IDA7IGkgPCBtYXRyaXgtPm5yb3dzOyArK2kpCisgICAgbWNfZHVtcF9nbHlwaF9yb3cgKE1BVFJJ WF9ST1cgKG1hdHJpeCwgaSksIGksIGdseXBocyk7Cit9CisKK0RFRlVOICgibWMtZHVtcC1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T5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MpOworICBmcHJpbnRmIChz dGRlcnIsICI9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIp OworICBtY19kdW1wX2dseXBoX21hdHJpeCAody0+Y3VycmVudF9tYXRyaXgsCisgICAgICAgICBU WVBFX1JBTkdFRF9GSVhOVU1QIChpbnQsIGdseXBocykgPyBYRklYTlVNIChnbHlwaHMpIDogMCk7 CisgIHJldHVybiBRbmlsOworfQorCitib29sCittY190cmF2ZXJzZV9jYWNoZV9wIChzdHJ1Y3Qg bWNfbWF0cml4IG1hdHJpeCwgZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUsCisgICAgICAg ICAgICAgICAgICAgICBpbnQgdm50aCwgaW50IG50aCkKK3sKKyAgaWYgKHZudGggPCBtYXRyaXgu dnBvc191c2VkCisgICAgICAmJiBtYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdID4gMAor ICAgICAgJiYgbnRoIDwgbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSkK KyAgICByZXR1cm4gdHJ1ZTsKKyAgICBlbHNlCisgICAgICByZXR1cm4gZmFsc2U7Cit9CisKK3Zv aWQKK21jX3Jlc2V0X2NhY2hlIChzdHJ1Y3Qgd2luZG93ICp3KQoreworICBpZiAoIUJVRkZFUlAg KHctPmNvbnRlbnRzKSkKKyAgICByZXR1cm47CisgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNh Y2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAg ICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAgICAgIGJvb2wgYnZhcl9hY3RpdmVfcDsKKyAgICAg IHN3aXRjaCAoY2FjaGVfdHlwZSkKKyAgICAgICAgeworICAgICAgICAgIGNhc2UgTk9fQ0FDSEU6 CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICBjYXNlIE1DX0NBQ0hFOgorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAo QlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAmJiBOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkKKyAgICAgICAgICAgICAgICBidmFyX2Fj dGl2ZV9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoQlVGRkVSUCAody0+Y29u dGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgbWNfY29uZikpKQorICAgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVf cCA9IHRydWU7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAg IGNhc2UgQ0hfQ0FDSEU6CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChCVUZGRVJQ ICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZl X3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChCVUZGRVJQICh3LT5jb250ZW50 cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9w ID0gdHJ1ZTsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAg Y2FzZSBGQ19DQUNIRToKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKEJVRkZFUlAg KHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVf cCA9IGZhbHNlOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRz KQorICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGZjX3Zpc2libGUpKSkKKyAgICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3Ag PSB0cnVlOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQor ICAgICAgaWYgKCFidmFyX2FjdGl2ZV9wKQorICAgICAgICB7CisgICAgICAgICAgLyogRGVjcmVh c2UgdGhlIHNpemUgb2YgdGhlIGFycmF5IHRvIGEgYmFyZSBtaW5pbXVtLiAqLworICAgICAgICAg IGZvciAoaW50IHZudGggPSAwOyB2bnRoIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZDsgKyt2bnRo KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAody0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdID4gMSkKKyAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XSA9CisgICAgICAgICAgICAgICAgICAgIHhucmVhbGxvYyAody0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV0sIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c2l6ZW9mICp3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXSk7CisgICAg ICAgIC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2UuaW1nLngKKyAgICAgICAgICAgICAm JiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLnNs aWNlLmltZy55ID09IGdseXBoLT5zbGljZS5pbWcueQorICAgICAgICAgICAgICYmIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGguc2xpY2UuaW1nLndp ZHRoID09IGdseXBoLT5zbGljZS5pbWcud2lkdGgKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLnNsaWNlLmltZy5oZWln aHQgPT0gZ2x5cGgtPnNsaWNlLmltZy5oZWlnaHQKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLnNsaWNlLmNtcC5mcm9t ID09IGdseXBoLT5zbGljZS5jbXAuZnJvbQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueCA9PSB4CisgICAgICAgICAgICAgJiYg dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meCA9PSBmeAor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0ueSA9PSB5CisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5meSA9PSBmeQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uaHBvcyA9PSBocG9zCisgICAgICAg ICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3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AgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBm b3JlZ3JvdW5kLCBhY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCByZW1vdmVfcCk7CisgICAgICByZXR1 cm47CisgICAgfQorICAgIGVsc2UgaWYgKGRyYXdfcAorICAgICAgICAgICAgICYmIChmcm9tX3do ZXJlID09IFNDUklCRV9PTkUKKyAgICAgICAgICAgICAgICAgfHwgZnJvbV93aGVyZSA9PSBTQ1JJ QkVfVFdPCisgICAgICAgICAgICAgICAgIHx8IGZyb21fd2hlcmUgPT0gU0NSSUJFX1RIUkVFCisg ICAgICAgICAgICAgICAgIHx8IGZyb21fd2hlcmUgPT0gTk9XSEVSRSkpCisgICAgICB7CisgICAg ICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBo cG9zLCB2cG9zLCB3ZCwgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLCBnbHlwaF9mbGF2b3IsIHJl bW92ZV9wKTsKKyAgICAgICAgcmV0dXJuOworICAgICAgfQorICBpZiAoY2FjaGVfdHlwZSA9PSBO T19DQUNIRSkKKyAgICByZXR1cm47CisgICsrdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNo ZV90eXBlXTsKKyAgaWYgKHZudGggPj0gdy0+bWNfbWF0cml4LnZwb3NfdXNlZCkKKyAgICB3LT5t Y19tYXRyaXgudnBvc191c2VkID0gdm50aCArIDE7CisgIGlmICh3LT5tY19tYXRyaXgudnBvc19h bGxvY2F0ZWQgPCB3LT5tY19tYXRyaXgudnBvc191c2VkKQorICAgIHsKKyAgICAgIGludCBvbGRf YWxsb2MgPSB3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQ7CisgICAgICBpbnQgbmV3X2VsdHMg PSB3LT5tY19tYXRyaXgudn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wKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2VsdHMsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IElOVF9NQVgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV0pOworICAgICAgbWVtc2V0ICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXSArIG9sZF9hbGxvYywgMCwKKyAgICAgICAgICAgICAgICh3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV0gLSBvbGRfYWxsb2MpCisgICAgICAg ICAgICAgICAgICogc2l6ZW9mICp3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXSk7CisgICAgfQorICBpbnQgbnRoID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVf dXNlZFtjYWNoZV90eXBlXSAtIDE7CisgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uc2FtZV9wID0gZmFsc2U7CisgIHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGgudHlwZSA9IGdseXBoLT50eXBlOworICB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLmJ5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Ag ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNld2hlcmU6ICBgdy0+Y3Vyc29yLnhg IC8gYG1jLmZjX3hgLiAqLwordm9pZAorbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAoc3RydWN0IHdp bmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAgICAgICAgICAgICAgICAg ICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgeCwgaW50ICpmeCwgaW50IHksCisgICAg ICAgICAgICAgICAgICAgICAgICBpbnQgKmZ5LCBpbnQgaHBvcywgaW50IHZwb3MsIGludCAqaCwK KyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUs IGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgKndkKQorewor ICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCBy b3csIGhwb3MsIHZwb3MpOworICBpZiAoZ2x5cGggPT0gTlVMTCkKKyAgICByZXR1cm47CisgIHN0 cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE9XX0ZSQU1FICh3KSk7CisgICpmeCA9IFdJTkRP V19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIHgpOworICAqaCA9IHJvdy0+dmlzaWJsZV9oZWln aHQ7CisgIC8qIERvbid0IGxldCB0aGUgY3Vyc29yIGV4Y2VlZCB0aGUgZGltZW5zaW9ucyBvZiB0 aGUgcm93LCBzbyB0aGF0CisgIHRoZSB1cHBlci9sb3dlciBzaWRlIG9mIHRoZSBib3ggYXJlbid0 IGNsaXBwZWQuICAqLworICBpbnQgd19oZWFkZXJfbGluZV9oZWlnaHQgPSBXSU5ET1dfSEVBREVS X0xJTkVfSEVJR0hUICh3KTsKKyAgaW50IHdfdGV4dF9ib3R0b21feSA9IHdpbmRvd190ZXh0X2Jv dHRvbV95ICh3KSAtICpoOworICBpZiAoeSA8IHdfaGVhZGVyX2xpbmVfaGVpZ2h0KQorICAgIHsK KyAgICAgICpoID0gbWF4ICgqaCAtICh3X2hlYWRlcl9saW5lX2hlaWdodCAtIHkpICsgMSwgKmgp OworICAgICAgeSA9IHdfaGVhZGVyX2xpbmVfaGVpZ2h0IC0gMTsKKyAgICAgIC8vIGZwcmludGYg KHN0ZGVyciwgIkNPTkRJVElPTiAjIDFcbiIpOworICAgIH0KKyAgIGVsc2UgaWYgKHkgPiB3X3Rl eHRfYm90dG9tX3kpCisgICAgIHsKKyAgICAgICAqaCArPSB5IC0gd190ZXh0X2JvdHRvbV95Owor ICAgICAgIHkgPSB3X3RleHRfYm90dG9tX3k7CisgICAgICAgLy8gZnByaW50ZiAoc3RkZXJyLCAi Q09ORElUSU9OICMgMlxuIik7CisgICAgIH0KKyAgKmZ5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVM X1kgKHcsIHkpOworICBzd2l0Y2ggKGN1cnNvcl90eXBlKQorICAgIHsKKyAgICAgIGNhc2UgTUNf QkFSOgorICAgICAgICB7CisgICAgICAgICAgaWYgKGN1cnNvcl93aWR0aCA8IDEpCisgICAgICAg ICAgICBjdXJzb3Jfd2lkdGggPSBtYXggKEZSQU1FX0NVUlNPUl9XSURUSCAoZiksIDEpOworICAg ICAgICAgIGlmIChjdXJzb3Jfd2lkdGggPCBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAg KndkID0gY3Vyc29yX3dpZHRoOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBj YXNlIE1DX0hCQVI6CisgICAgICAgIHsKKyAgICAgICAgICBpbnQgY3Vyc29yX2hlaWdodCA9IChj dXJzb3Jfd2lkdGggPCAxKSA/IGxyaW50ICgwLjI1ICogKmgpIDogY3Vyc29yX3dpZHRoOworICAg ICAgICAgIGlmIChjdXJzb3JfaGVpZ2h0ID4gcm93LT5oZWlnaHQpCisgICAgICAgICAgICBjdXJz b3JfaGVpZ2h0ID0gcm93LT5oZWlnaHQ7CisgICAgICAgICAgLyogQ3Vyc29yIHNtYWxsZXIgdGhh biBsaW5lIGhlaWdodCwgc28gbW92ZSBkb3duLiAqLworICAgICAgICAgIGlmICgqaCA+IGN1cnNv cl9oZWlnaHQpCisgICAgICAgICAgICAqZnkgKz0gKmggLSBjdXJzb3JfaGVpZ2h0OworICAgICAg ICAgICpoID0gY3Vyc29yX2hlaWdodDsKKyAgICAgICAgICAqd2QgPSBnbHlwaC0+cGl4ZWxfd2lk dGg7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNhc2UgTUNfUklHSFRfRlJJ TkdFX0JJVE1BUDoKKyAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAgICAgY2Fz ZSBNQ19OT19GUklOR0VfQklUTUFQOgorICAgICAgY2FzZSBNQ19OT19DVVJTT1I6CisgICAgICBj YXNlIE1DX0ZSQU1FRF9CT1g6CisgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICBjYXNl IE1DX0hPTExPV19CT1g6CisgICAgICBkZWZhdWx0OgorICAgICAgLyogQ29tcHV0ZSB0aGUgd2lk dGggb2YgdGhlIHJlY3RhbmdsZSB0byBkcmF3LiAgSWYgb24gYSBzdHJldGNoIGdseXBoLCBhbmQK KyAgICAgIGB4LXN0cmV0Y2gtY3Vyc29yJyBpcyBuaWwsIGRvbid0IGRyYXcgYSByZWN0YW5nbGUg YXMgd2lkZSBhcyB0aGUgZ2x5cGgsIGJ1dAorICAgICAgdXNlIGEgY2Fub25pY2FsIGNoYXJhY3Rl ciB3aWR0aCBpbnN0ZWFkLiAqLworICAgICAgKndkID0gKGdseXBoLT50eXBlID09IFNUUkVUQ0hf R0xZUEgKKyAgICAgICAgICAgICAmJiAheF9zdHJldGNoX2N1cnNvcl9wKQorICAgICAgICAgICAg PyBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAoZiksIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAg ICAgICAgIDogZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgIH0KKy8qCisgICAgICBmcHJpbnRmIChz dGRlcnIsICJjdXJzb3Jfd2lkdGg6ICglZCkgfCB4ICglZCkgfCAqZnggKCVkKSB8IHkgKCVkKSB8 ICpmeSAoJWQpLCAqd2QgKCVkKSB8ICpoICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAg IGN1cnNvcl93aWR0aCwgeCwgKmZ4LCB5LCAqZnksICp3ZCwgKmgpOworKi8KK30KKwordm9pZAor bWNfZW5naW5lIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgs IHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCwg aW50IGFyZWEsIGludCByZWxhdGl2ZV94LCBpbnQgeF9saW1pdCwgaW50IHksCisgICAgICAgICAg IGludCBocG9zLCBpbnQgdnBvcywgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50 IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgc3RydWN0IGdseXBoX21hdHJpeCAqY3Vyc29yX21h dHJpeCwgc3RydWN0IG1jX2Vzc2VudGlhbHMgZXNzZW50aWFscywKKyAgICAgICAgICAgZW51bSBt Y19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9uLCBzdHJ1Y3QgbWNfUkdCIGZvcmVncm91bmQsCisg ICAgICAgICAgIGVudW0gbWNfZW5naW5lX3R5cGUgYWN0aW9uX3R5cGUsIGJvb2wgZHJhd19wLAor ICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5cGUgZnJvbV93aGVyZSwgZW51bSBtY19jYWNo ZV90eXBlIGNhY2hlX3R5cGUpCit7CisgIGludCBvcG9pbnRfeCA9IHctPmN1cnNvci54OworICBp bnQgb3BvaW50X3kgPSB3LT5jdXJzb3IueTsKKyAgaW50IG9wb2ludF9ocG9zID0gdy0+Y3Vyc29y Lmhwb3M7CisgIGludCBvcG9pbnRfdnBvcyA9IHctPmN1cnNvci52cG9zOworICBpbnQgZngsIGZ5 LCBoLCB3ZDsKKyAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHJlbGF0 aXZlX3gsICZmeCwgeSwgJmZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJndkKTsKKyAgaW50IG9wb2ludF9meCA9 IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIG9wb2ludF94KTsKKyAgaW50IGZjX2Z4 ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgZXNzZW50aWFscy5mY194KTsKKyAg Ym9vbCBnbHlwaF96dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VORF9D SEFSUE9TIChyb3cpID09IFpWKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFt ZSk7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgIGludCB0 ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworICBzdHJ1 Y3QgZ2x5cGhfcm93ICpjdXJzb3Jfcm93ID0gKHctPmN1cnNvci52cG9zICE9IC0xKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9XIChjdXJzb3JfbWF0cml4LCB3 LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsK KyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSAody0+Y3Vyc29yLnZwb3MgIT0gLTEpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBj dXJzb3JfbWF0cml4LCBjdXJzb3Jfcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgYm9vbCBjdXJzb3JfYXRf ZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT5leGFjdF93aW5kb3dfd2lkdGhf bGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID09IHRl eHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3Iu eCA9PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7CisgIGJvb2wgY3Vyc29yX2JleW9uZF9mcmlu Z2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFjdXJzb3Jfcm93LT5leGFjdF93aW5k b3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5j dXJzb3IueCA+PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPmN1cnNvci54ID49IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRoKTsKKyAgaW50IGZy YW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBpbnQgdGVtcF9mYWNl X2lkID0gZ2x5cGgtPmZhY2VfaWQ7CisgIHN0cnVjdCBtY19SR0IgYmFja2dyb3VuZDsKKyAgbWNf c2V0X2xzbF9iZyAodywgdGVtcF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7CisgIGJvb2wgcmVhbF9m YWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0gaHBvcworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBvcG9pbnRfeSA9PSByb3ctPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcyk7CisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwor LyogICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19H TFlQSCAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgaWYg KGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGdseXBoLT50eXBlID09IEdMWVBI TEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZwcmludGYgKHN0 ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHgl MDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDog cm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgIChnbHlw aC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICA/ICdDJworICAgICAgICAgOiAnRycpLAor ICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICAgICAg ICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT51LmNoLAorICAgICAgICBnbHlw aC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5 cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8g IlpWIiA6ICItLSIsCisgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChnbHlwaC0+dS5ja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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgaWYgKHJlbGF0 aXZlX3ggPCByb3ctPnBpeGVsX3dpZHRoCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3Jf cCkKKyAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAg ICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3 X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5 cGUpOworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVz ZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAg ICB7CisgICAgICAgICAgaWYgKHJlbGF0aXZlX3ggPCByb3ctPnBpeGVsX3dpZHRoKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsK KyAgICAgICAgICAgICAgZnggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQor ICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICB4X2xpbWl0IC0gcmVs YXRpdmVfeCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLAorICAg ICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3Rp dmVfcCwgTUNfR0xZUEhMRVNTLAorICAgICAgICAgICAgICAgICAgICAgZHJhd19wLCBmcm9tX3do ZXJlLCBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICAgIH0KKyAgICAgIGJyZWFrOwor ICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICBWRVJUSUNB TF9SVUxFUjogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAgICov CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAg IHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdl X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1 cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9u ZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93 LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVY VF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh cm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9S SUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVS VElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJU SUNBTF9CQVIKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElD QUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA7Cisg ICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVs YXRpdmVfeCwgb3BvaW50X2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAg d2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5 cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5 cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICBGSUxMX0NPTFVNTjogIENIQVJfR0xZUEggfCBHTFlQ SExFU1NfR0xZUEggICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K KyAgICBjYXNlIEZJTExfQ09MVU1OOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBo X2ZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2Fy ZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlh bHMuZmNfeCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX3Zl cnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE1DX0dMWVBIOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJv dywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAg ICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwg Zm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3Rp dmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAg IGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgQ1VSU09SX0lORElDQVRPUjoKKyAgICB7CisgICAg ICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgfQorICB9CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICA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A/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwK KyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgt PmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBo LT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJa ViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsK Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICBNVUxU SVBMRV9DVVJTT1JTOiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgewor ICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBj dXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAg YmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93 aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAg YnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAg ICAgICAgICAgIEhPUklaT05UQUxfUlVMRVI6ICBTVFJFVENIX0dMWVBIICAgICAgICAgICAgICAg ICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9S VUxFUjoKKyAgICB7CisgICAgICBpZiAocmVsYXRpdmVfeCA8IHJvdy0+cGl4ZWxfd2lkdGgKKyAg ICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICBtY19oZWxwZXIgKHcsIG1h dHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAg ICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9z aXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50 aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAg ICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAoZ2x5cGggLSByb3ct PmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiBy ZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAocmVsYXRpdmVf eCA8IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHJlbGF0 aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICBmeCArPSBnbHlwaC0+ cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gKHJv dy0+ZmlsbF9saW5lX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBnbHlwaC0+ZmFjZV9p ZAorICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAg IHN0cnVjdCBtY19SR0IgYmFja2dyb3VuZDsKKyAgICAgICAgICBtY19zZXRfbHNsX2JnICh3LCB0 ZW1wX2ZhY2VfaWQsICZiYWNrZ3JvdW5kKTsKKyAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJp eCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAg ICAgICAgICAgICAgICAgeF9saW1pdCAtIHJlbGF0aXZlX3gsIGgsIGN1cnNvcl90eXBlLCB4X2xp bWl0IC0gcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgZm9y ZWdyb3VuZCwgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAg ICAgICAgIE1DX0dMWVBITEVTUywgZHJhd19wLCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLCBhY3Rp b25fdHlwZSk7CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAg U1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmIChyb3ctPmZp bGxfbGluZV9wCisgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09 IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gg KyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgIHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNl X2lkOworICAgICAgICBlbHNlIGlmICghcm93LT5maWxsX2xpbmVfcAorICAgICAgICAgICAgICAg ICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0g MQorICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4 ZWxfd2lkdGgpCisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOworICAg ICAgc3RydWN0IG1jX1JHQiBiYWNrZ3JvdW5kOworICAgICAgbWNfc2V0X2xzbF9iZyAodywgdGVt cF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2 b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0 ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJ R0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3Jf YmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAg 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S0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIElNQUdFX0dMWVBIICAgICAgICAgICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5 cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAg ICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBE ImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVjXG4iLAorICAgICAgICBn bHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFd ID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAor ICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAo Z2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSks CisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5 cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxl ZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJ VEVfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICB7CisgICAgICAgIGZw cmludGYgKHN0ZGVyciwKKyAgICAgICAgICAiXG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJk ICVjICUzZCAweCUwNngiLAorICAgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSwKKyAgICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJl YV0gLSAxKSwKKyAgICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAgICcrJywKKyAgICAgICAg ICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgPyAnQicKKyAgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkK KyAgICAgICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAg ICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBo LT51LmNtcC5pZCk7CisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAlNGQgJTEuMWQlMS4xZCIs CisgICAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xp bmVfcCwKKyAgICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCk7CisgICAgICBpZiAoZ2x5 cGgtPnUuY21wLmF1dG9tYXRpYykKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAlM2QgJXMg LiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5ocG9zLCBnbHlw aF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPnNs aWNlLmNtcC5mcm9tLCBnbHlwaC0+c2xpY2UuY21wLnRvKTsKKyAgICAgICAgZWxzZQorICAgICAg ICAgIGZwcmludGYgKHN0ZGVyciwgIlxuIik7CisgICAgICB9CisgIHN3aXRjaCAoYWN0aW9uX3R5 cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAg ICAgIE1VTFRJUExFX0NVUlNPUlM6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAg ICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6 CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZl X3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAg ICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdf cCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUp OworIC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d2hpbGUgKHJlbGF0aXZlX3ggPD0geF9s aW1pdCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bv c2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQs IGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19wLAorICAgICAgICAgICAg ICAgICAgICAgICAgIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAg ICAgICAgICAgcmVsYXRpdmVfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQor ICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K Ky8qICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAgQ09NUE9TSVRFX0dM WVBIICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAg Y2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9m bGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRf cCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9C QVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmlu Z2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVu Y2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFS X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJz b3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxf QkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2Zs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAg fHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8 fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxh dm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBN Q19SSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3 LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3Ms IHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQs IGVzc2VudGlhbHMuYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAor ICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsK KyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAg ICAgICBGSUxMX0NPTFVNTjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAq LworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7 CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBo c1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPiByZWxhdGl2ZV94KQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgd2QgPSAxOworICAgICAgbWNf aGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwg aHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dy b3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hl cmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJy ZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgQ1VSU09SX0lO RElDQVRPUjoKKyAgICB7CisgICAgICBicmVhazsKKyAgICB9CisvKiAt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BnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51 c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxh dGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAo QlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJ TkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogJy0n KSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQs CisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9i b3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+dS54d2lkZ2V0LAorICAgICAgICBnbHlwaC0+aHBv cywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworI2VuZGlmCisgIHN3 aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAg ICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgWFdJREdFVF9HTFlQSCAgICAg ICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1V TFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywg Z2x5cG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DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hl cmUsCisgICAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAg aWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAx CisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAgICB7CisgICAgICAg ICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHJl bGF0aXZlX3ggPD0geF9saW1pdCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVs cGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywg dnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNv cl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAg ICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19w LAorICAgICAgICAgICAgICAgICAgICAgICAgIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsIGFjdGlv bl90eXBlKTsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBmcmFtZV9jaGFyX3dpZHRoOwor ICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxF UjogIFhXSURHRVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1j X2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVl ZF9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVu Y2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3Jp Z2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJT RURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29u X3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVW RVJTRURfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93 LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBo X3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhM RVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAg ICAgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAg ICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FS Uk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1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IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPiByZWxhdGl2ZV94KQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgbWNfaGVscGVyICh3LCBtYXRy aXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAg ICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3Np dGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFs cy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsC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Nfcm93X3Bvc2l0aW9uIHJvd19wb3NpdGlvbiwgYm9vbCBkcmF3X3AsIGVudW0gbWNfZHJh d19yb3dfdHlwZSBmcm9tX3doZXJlKQoreworICAvLyAgY2xvY2tfdCBjbG9ja19zdGFydCA9IGNs b2NrKCk7CisgIC8qIFczMiBFbWFjcyBjcmFzaGVzIG9uIHN0YXJ0dXAgd2l0aG91dCBhIGBCVUZG RVJQJyBjaGVjayBpbiBgdXBkYXRlX3dpbmRvdycuICovCisgIGlmICghQlVGRkVSUCAody0+Y29u dGVudHMpKQorICAgIHJldHVybjsKKyAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNv bnRlbnRzKTsKKyAgaWYgKE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAo QlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAmJiBOSUxQIChCVkFSIChiLCBmY192aXNpYmxl KSkpCisgICAgcmV0dXJuOworICBzdHJ1Y3QgZ2x5cGhfcm93ICpib3R0b21fcm93ID0gTUFUUklY X0JPVFRPTV9URVhUX1JPVyAobWF0cml4LCB3KTsKKyAgaW50IGJvdHRvbV92cG9zID0gTUFUUklY X1JPV19WUE9TIChib3R0b21fcm93LCBtYXRyaXgpOworICBpZiAodnBvcyA9PSBib3R0b21fdnBv cykKKyAgICByZXR1cm47CisgIGlmICghcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgcmV0dXJu OworICBpbnQgaHBvc19zdGFydCA9IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAg aWYgKG1jX3N0ZGVycl9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX2RyYXdfcm93ICglZCk6 ICBkcmF3X3AgKCVzKSB8IGhwb3MgKCVkKSB8IGxlbiAoJWQpXG4iLAorICAgICAgICAgICAgICAg ICAgICAgdnBvcywgZHJhd19wID8gInkiIDogIm4iLCBocG9zX3N0YXJ0LCBocG9zX2xlbmd0aCk7 CisgIGludCBvcG9pbnRfZngsIG9wb2ludF9meSwgb3BvaW50X3dkLCBvcG9pbnRfaDsKKyAgaW50 IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgIGlu dCBoZWFkZXJfbGluZV9mb3JtYXQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAg c3RydWN0IGdseXBoX3JvdyAqY3Vyc29yX3JvdyA9ICh3LT5jdXJzb3IudnBvcyAhPSAtMSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPVyAoY3Vyc29yX21hdHJp eCwgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5V TEw7CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0gKHctPmN1cnNvci52cG9zICE9IC0x KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfZ2V0X2N1cnNvcl9nbHlwaCAo dywgY3Vyc29yX21hdHJpeCwgY3Vyc29yX3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBv cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgIGJvb2wgY3Vyc29y X2F0X2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxMCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93X3dp ZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9 PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vy c29yLnggPT0gY3Vyc29yX3Jvdy0+cGl4ZWxfd2lkdGgpOworICBib29sIGN1cnNvcl9iZXlvbmRf ZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFd CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhY3Vyc29yX3Jvdy0+ZXhhY3Rf d2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+Y3Vyc29yLnggPj0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7CisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgUkVQTEFDRSBU SEUgUkVBTCBDVVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBlbnVtIGZhY2VfaWQg YmdfZmFjZV9pZCA9IChjdXJzb3JfZ2x5cGggIT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IGN1cnNvcl9nbHlw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ZXJtaW5lIHRoZSBhcHBsaWNhYmxlIGZhY2VfaWQuICov CisgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZyA9IHsucmVkID0gLTEuMCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IC0xLjAsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAuYmx1ZSA9IC0xLjB9OworICAgICAgLyogV2UgdXNlIHRoZSBmaXJzdCBnbHlwaCBp biB0aGUgcm93LCB3aXRoIGFuIFggYW5kIEhQT1Mgb2YgemVyby4gKi8KKyAgICAgIG1jX2hlbHBl ciAodywgbWF0cml4LCByb3csIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sIDAsIC0xLCB3LT5jdXJz b3IueSwgLTEsCisgICAgICAgICAgICAgICAgIDAsIHctPmN1cnNvci52cG9zLCAtMSwgLTEsIE1D X0xFRlRfRlJJTkdFX0JJVE1BUCwgLTEsIHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAg bHNsX2ZnLCBjdXJzb3JfYmcsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX09WRVJMQVlfQVJST1df QklUTUFQLAorICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFLCBD VVJTT1JfSU5ESUNBVE9SKTsKKyAgICB9CisgIGlmIChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAg ICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICYmIHctPmN1cnNvci5ocG9zID49IGhw b3Nfc3RhcnQKKyAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGhwb3Nfc3RhcnQgKyBocG9zX2xl bmd0aAorICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgJiYgIU5J TFAgKEJWQVIgKGIsIGNoX2hvcml6b250YWxfcnVsZXIpKSkKKyAgICB7CisgICAgICBlbnVtIG1j X2ZsY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KyAgLyogRVhBTVBMRSAoYnVmZmVyLWxvY2FsKTogIChzZXRxIG1jLXJlYWwtZmFrZS1j dXJzb3IgbmlsLyduby8ibm8iKSAqLworICBlbHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisg ICAgICAgICAgICYmIGN1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICYmIGN1cnNvcl90 eXBlID09IE1DX05PX0NVUlNPUgorICAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9z CisgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAg JiYgdy0+Y3Vyc29yLmhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgpCisgICAgeworICAg ICAgLyogV2hlbiBhIHVzZXIgaGFzIG5vdCBzcGVjaWZpZWQgYSB2YWx1ZSBmb3IgYG1jLXJlYWwt ZmFrZS1jdXJzb3InLCBvciB0aGUKKyAgICAgIHZhbHVlIGlzIGBub2AgaW4gdGhlIGZvcm0gb2Yg YSBzeW1ib2wgb3Igc3RyaW5nLCB0aGVuIHRoZSBkZWZhdWx0IHdlIHVzZQorICAgICAgYW4gTUNf QkFSIGFuZCBhbiBNQ19IQkFSIC0tIGJvdGggaGF2aW5nIGEgY3Vyc29yX3dpZHRoIG9mIDEuICov CisgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29y LngsICZvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQ19CQVIsIDEsICZvcG9pbnRfd2QpOwor ICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3Iu eCwgb3BvaW50X2Z4LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3 LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAg ICAgICAgICAgICAgIE1DX0JBUiwgMSwgcm93X3Bvc2l0aW9uLCBjdXJzb3JfZmcsIGN1cnNvcl9i ZywgZXNzZW50aWFscy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgTUNfR0xZUEhMRVNTLCBk cmF3X3AsIGZyb21fd2hlcmUsIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSwg Q1VSU09SX0lORElDQVRPUik7CisgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRy aXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNv ci52cG9zLCAmb3BvaW50X2gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQ19IQkFS LCAxLCAmb3BvaW50X3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNv cl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAg ICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRf d2QsIG9wb2ludF9oLAorICAgICAgICAgICAgICAgICBNQ19IQkFSLCAxLCByb3dfcG9zaXRpb24s IGN1cnNvcl9mZywgY3Vyc29yX2JnLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLAorICAgICAgICAgICAg ICAgICBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLCBOSUxQIChCVkFSIChiLCBtY19jb25m KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBDSF9D QUNIRQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1D X0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICB9CisgIGVsc2UgaWYgKCFjdXJzb3JfYXRf ZnJpbmdlX3AKKyAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAg JiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA+ PSBocG9zX3N0YXJ0CisgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zIDwgaHBvc19zdGFydCAr IGhwb3NfbGVuZ3RoCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+dHlwZSAhPSBTVFJFVENI X0dMWVBIKQorICAgIHsKKyAgICAgIG1jX2dldF9jdXJzb3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwg cm93LCB3LT5jdXJzb3IueCwgJm9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZw b3MsICZvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsICZvcG9pbnRfd2QpOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwgb3BvaW50X2Z4LCB3LT5jdXJzb3IueSwK KyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZw b3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBj dXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgY3Vyc29yX2ZnLCBjdXJzb3JfYmcsCisgICAgICAg ICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hl cmUsCisgICAgICAgICAgICAgICAgIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAg ICAgICAgICA/IENIX0NBQ0hFCisgICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9J TkRJQ0FUT1IpOworICAgIH0KKyAgZWxzZSBpZiAoIWN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAg ICAgICAmJiBjdXJzb3JfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAmJiB2cG9zID09IHctPmN1 cnNvci52cG9zCisgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID49IGhwb3Nfc3RhcnQKKyAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAg ICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgICAgewor ICAgICAgLyogSWYgYSB1c2VyIGhhcyBzZXQgYHgtc3RyZXRjaC1jdXJzb3InIHRvIGEgbm9uLW5p bCB2YWx1ZSwgaGUvc2hlIGNob3NlIHRvCisgICAgICBoYXZlIGEgY3Vyc29yIHRoYXQgc3BhbnMg dGhlIGVudGlyZSBsZW5ndGggb2YgdGhlIFNUUkVUQ0hfR0xZUEguICovCisgICAgICBpZiAoIXhf c3RyZXRjaF9jdXJzb3JfcCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRoZSBNQ19IQkFSIHNo YWxsIGhhdmUgYSBgY3Vyc29yX3dpZHRoYCBvZiAxLiAqLworICAgICAgICAgIG1jX2dldF9jdXJz b3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwgcm93LCB3LT5jdXJzb3IueCwgJm9wb2ludF9meCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IueSwgJm9wb2ludF9meSwg dy0+Y3Vyc29yLmhwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vy c29yLnZwb3MsICZvcG9pbnRfaCwgTUNfSEJBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmb3BvaW50X3dkKTsKKyAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwg cm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9pbnRfZngsCisgICAgICAgICAgICAg ICAgICAgICB3LT5jdXJzb3IueSwgb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29y LnZwb3MsCisgICAgICAgICAgICAgICAgICAgICBvcG9pbnRfd2QsIG9wb2ludF9oLCBNQ19IQkFS LCAxLCByb3dfcG9zaXRpb24sIGN1cnNvcl9mZywKKyAgICAgICAgICAgICAgICAgICAgIGN1cnNv cl9iZywgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwK KyAgICAgICAgICAgICAgICAgICAgIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAg ICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSwg Q1VSU09SX0lORElDQVRPUik7CisgICAgICAgIH0KKyAgICAgIG1jX2dldF9jdXJzb3JfZ2VvbWV0 cnkgKHcsIG1hdHJpeCwgcm93LCB3LT5jdXJzb3IueCwgJm9wb2ludF9meCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci55LCAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci52cG9zLCAmb3BvaW50 X2gsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dp ZHRoLCAmb3BvaW50X3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNv cl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAg ICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRf d2QsIG9wb2ludF9oLAorICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCByb3dfcG9zaXRpb24sIGN1cnNvcl9mZywgY3Vyc29yX2JnLAorICAgICAgICAgICAgICAgICBl c3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAg ICAgICAgICAgICBOSUxQIChCVkFSIChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgPyBD SF9DQUNIRQorICAgICAgICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsK KyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgRFJBVyBBTkQgUkVDT1JEIEZBS0UgQ1VSU09SUworKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisgIGlmICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgJiYgTklMUCAoQlZBUiAoYiwgbWNf aW5hY3RpdmVfd2luZG93cykpCisgICAgICAmJiBOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93 aW5kb3dzKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKGIsIGZjX2luYWN0aXZlX3dpbmRvd3MpKSkK KyAgICByZXR1cm47CisgIGlmIChocG9zX2xlbmd0aCA9PSAxKQorICAgIHsKKyAgICAgIGlmICgh TklMUCAoQlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZl X3AKKyAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAg ICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWNfaW5hY3RpdmVfd2luZG93cykpKSkpCisgICAgICAg IHsKKyAgICAgICAgICAvKiBUaGUgc3BhY2UgYXBwZW5kZWQgdG8gYSByb3cgZW5kaW5nIHdpdGgg YSBuZXcgbGluZQorICAgICAgICAgIGRvZXMgbm90IGhhdmUgYSBgZ2x5cGgtPmNoYXJwb3NgICgt MSwgMCkgdGhhdCB3ZSBjYW4KKyAgICAgICAgICB1c2UgZm9yIHRoaXMgcGFydGljdWxhciBhcHBs aWNhdGlvbi4gIFdoZW4gdGhlcmUgaXMgYQorICAgICAgICAgIGBidWZmZXItZGlzcGxheS10YWJs ZScgZW50cnkgdGhhdCBhc3NpZ25zIGEgdmlzaWJsZQorICAgICAgICAgIGdseXBoIHRvIGEgbmV3 IGxpbmUsIHRoZXJlIGlzIG5vIHByb2JsZW0gYmVjYXVzZSB0aGF0CisgICAgICAgICAgZ2x5cGgg aGFzIGEgYGdseXBoLT5jaGFycG9zJyB0aGF0IHdlIGNhbiB1c2UuICBXaGVuCisgICAgICAgICAg bm8gdmlzaWJsZSBFT0wgZ2x5cGggZXhpc3RzLCB3ZSB1c2UgdGhlIGZvbGxvd2luZworICAgICAg ICAgIHRlc3Q6ICB0aGUgYXBwZW5kZWQgc3BhY2UgaGFzIGEgcG9zaXRpb24gdGhhdCBpcyBvbmUK KyAgICAgICAgICBsZXNzIHRoYW4gdGhlIGVuZCBvZiB0aGUgbWF0cml4IHJvdy4gKi8KKyAgICAg ICAgICBpbnQgaHBvcyA9IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAg ICBzdHJ1Y3QgZ2x5cGggKnByZXZpb3VzX2dseXBoID0gKDAgPD0gaHBvcyAtIDEgJiYgaHBvcyAt IDEgPCByb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgaHBvcyAtIDEKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBOVUxMOworICAgICAgICAgIC8vIHN0 cnVjdCBnbHlwaCAqbGFzdF9nbHlwaCA9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVz ZWRbVEVYVF9BUkVBXSAtIDE7CisgICAgICAgICAgYm9vbCBza2lwX3AgPSAocHJldmlvdXNfZ2x5 cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX2dseXBoLT5j aGFycG9zID09IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgc3RhcnQtPmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgICAgIC8q IFdoZW4gYSBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IGNvbnRhaW5zCisgICAgICAgICAg ICAgICAgICAgICAgICBhIHZpc2libGUgdGFiIGNoYXJhY3RlciAoIsK7IiksIHRoZSBzdWJzZXF1 ZW50CisgICAgICAgICAgICAgICAgICAgICAgICBTVFJFVENIX0dMWVBIIHdpbGwgaGF2ZSB0aGUg c2FtZSBzdGFydC0+Y2hhcnBvcworICAgICAgICAgICAgICAgICAgICAgICAgYXMgdGhlIGFmb3Jl bWVudGlvbmVkIHZpc2libGUgdGFiIGNoYXJhY3Rlci4gKi8KKyAgICAgICAgICAgICAgICAgICAg ICAgIDogKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHByZXZpb3VzX2dseXBoLT5jaGFycG9zID09IHN0YXJ0LT5jaGFycG9zKQorICAgICAgICAg ICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2U7 CisgICAgICAgICAgaW50IHBvc2ludCA9IChyb3dfcG9zaXRpb24gPT0gUE9TVF9aVikKKyAgICAg ICAgICAgICAgICAgICAgICAgICA/IC0xCisgICAgICAgICAgICAgICAgICAgICAgIDogKHJvd19w b3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBlc3NlbnRpYWxz Lnp2CisgICAgICAgICAgICAgICAgICAgICAgIDogKHN0YXJ0LT5ieXRlcG9zICE9IGVzc2VudGlh bHMuenZfYnl0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzdGFydCAtIHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAg ICAgICAgICAgICAgID8gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAg ICAgICAgICAgICAgICAgOiAoc3RhcnQtPmJ5dGVwb3MgPT0gZXNzZW50aWFscy56dl9ieXRlCisg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSA9PSByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAg PyBlc3NlbnRpYWxzLnp2CisgICAgICAgICAgICAgICAgICAgICAgIDogc3RhcnQtPmNoYXJwb3M7 CisgICAgICAgICAgTGlzcF9PYmplY3Qgc3BlY3MgPSBtY19hc3NvYyAobWFrZV9maXhudW0gKHBv c2ludCksIEJWQVIgKGIsIG1jX2NvbmYpKTsKKyAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9m b3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9y bWF0ID09IDApCisgICAgICAgICAgICAgICYmICFOSUxQIChzcGVjcykKKyAgICAgICAgICAgICAg JiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAmJiAh c2tpcF9wCisgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiAhPSBQT1NUX1pWKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBMaXNwX09iamVjdCBsaXNwX3R5cGUgPSBtY19udGggKDEs IHNwZWNzKTsKKyAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9 IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlz cF90b19jdXJzb3JfdHlwZSAobGlzcF90eXBlKTsKKyAgICAgICAgICAgICAgY3Vyc29yX3R5cGUg PSAoc3RhcnQtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3Jf dHlwZTsKKyAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCA9IChDT05TUCAobGlzcF90eXBl KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENE UiAobGlzcF90eXBlKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0xOwor ICAgICAgICAgICAgICBMaXNwX09iamVjdCBtY19mb3JlZ3JvdW5kID0gbWNfbnRoICgyLCBzcGVj cyk7CisgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICBp ZiAoU1RSSU5HUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgbWNfeHdfY29sb3Jf dmFsdWVzICh3LCBtY19mb3JlZ3JvdW5kLCAmbHNsX2ZnKTsKKyAgICAgICAgICAgICAgICBlbHNl IGlmIChWRUNUT1JQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgbHNsX2ZnLnJlZCA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3Jv dW5kLCAwKSk7CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5ncmVlbiA9IFhGTE9BVF9EQVRB IChBUkVGIChtY19mb3JlZ3JvdW5kLCAxKSk7CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5i bHVlID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDIpKTsKKyAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKE5JTFAgKG1jX2ZvcmVncm91bmQp KQorICAgICAgICAgICAgICAgICAgICBtY19jb2xvcl9waWNrZXIgKHcsIHN0YXJ0LCBlc3NlbnRp YWxzLCAmbHNsX2ZnLCBwb3NpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX3R5cGUsIHJvd19wb3NpdGlvbiwgTVVMVElQTEVfQ1VSU09SUyk7CisgICAgICAg ICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICAg ICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgICAgICBtY19l bmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0LCByb3ct PnksCisgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FS RUFdLCB2cG9zLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jf d2lkdGgsIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBsc2xfZmcsIE1VTFRJUExFX0NVUlNPUlMsIGRyYXdfcCwgZnJvbV93 aGVyZSwgTUNfQ0FDSEUpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAoIU5J TFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2 ZV9wCisgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAg ICAgLy8gJiYgZXNzZW50aWFscy5mY194IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYm IGVzc2VudGlhbHMuZmNfeCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmIGVzc2VudGlh bHMuZmNfeCA+PSB3LT5tYy5sbnVtX3BpeGVsX3dpZHRoKQorICAgICAgICB7CisgICAgICAgICAg aW50IHhfbGltaXQgPSB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoOworICAgICAgICAgIGJvb2wgcmVh bF9mYWtlX2N1cnNvcl9wID0gKHctPmN1cnNvci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci55ID09IHJvdy0+eQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09 IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAgIHN0cnVj dCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVz c2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19CQVIsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICByb3dfcG9zaXRpb24sIEZJTExfQ09MVU1OKTsKKyAgICAgICAgICBpZiAoeCA8IHRleHRfYXJl YV93aWR0aAorICAgICAgICAgICAgICAvLyB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoIDw9IHRleHRf YXJlYV93aWR0aAorICAgICAgICAgICAgICAmJiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYg dnBvcyA+IDApCisgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkK KyAgICAgICAgICAgICAgJiYgKChzdGFydCAhPSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93 LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5m Y194ID49IHgKKyAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPCB4ICsgc3Rh cnQtPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgfHwgKHN0YXJ0ID09IHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEKKyAgICAgICAgICAgICAg ICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0geCkpCisgICAgICAgICAgICAgICYmIHJvdy0+ eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgJiYgIXJlYWxfZmFr ZV9jdXJzb3JfcCkKKyAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0 LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAgICAgICAgICAgICAgICAg c3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBNQ19CQVIsIDEsCisgICAgICAg ICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwg bHNsX2ZnLAorICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NPTFVNTiwgZHJhd19wLCBmcm9t X3doZXJlLCBGQ19DQUNIRSk7CisgICAgICAgIH0KKyAgICAgIGlmICghTklMUCAoQlZBUiAoYiwg Y3Jvc3NoYWlycykpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2hvcml6b250YWxf cnVsZXIpKQorICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAg IHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJW QVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgJiYgdnBvcyA9PSB3LT5j dXJzb3IudnBvcykKKyAgICAgICAgeworICAgICAgICAgIGludCB4X2xpbWl0ID0gKHN0YXJ0ID09 IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAg ICAgICAgICAgICAgICAgICAgICA/IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAg ICAgICAgOiB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoOworICAgICAgICAgIHN0cnVjdCBtY19SR0Ig bHNsX2ZnOworICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMs ICZsc2xfZmcsIC0xLCBNQ19IQkFSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bv c2l0aW9uLCBIT1JJWk9OVEFMX1JVTEVSKTsKKyAgICAgICAgICAvKiBQcmVzZXJ2ZSBzdXBwb3J0 IGZvciBkZWZhdWx0IGJlaGF2aW9yIHN1Y2ggdGhhdCBhIHVzZXIgbWF5CisgICAgICAgICAgc3Bl Y2lmeSB0aGUgaGVpZ2h0IG9mIGFuIE1DX0hCQVIsIHdoaWNoIGJlZ2lucyBpdHMgam91cm5leQor ICAgICAgICAgIGFzIHRoZSBgY3Vyc29yX3dpZHRoJy4gIGBtY19nZXRfY3Vyc29yX2dlb21ldHJ5 JyByZWFkanVzdHMuICovCisgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3Rh cnQsIFRFWFRfQVJFQSwgeCwgeF9saW1pdCwgcm93LT55LAorICAgICAgICAgICAgICAgICAgICAg c3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBNQ19IQkFSLCAxLAorICAgICAg ICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBs c2xfZmcsCisgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3X3AsIGZy b21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgfQorICAgICAgaWYgKCFOSUxQIChCVkFSIChi LCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxf cnVsZXIpKQorICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAg IHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJW QVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgJiYgIWZpbGxfY29sdW1u X3RydW1wc19wKQorICAgICAgICB7CisgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoc3RhcnQtPnR5 cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0hPTExPV19C T1gKKyAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfQkFSOworICAgICAgICAgIGludCB4X2xp bWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9w ID0gKHctPmN1cnNvci55ID09IHJvdy0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAgIHN0cnVjdCBtY19S R0IgbHNsX2ZnOworICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlh bHMsICZsc2xfZmcsIC0xLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IHJvd19wb3NpdGlvbiwgVkVSVElDQUxfUlVMRVIpOworICAgICAgICAgIGlmICgoKGhlYWRlcl9s aW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGlu ZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgJiYgKChzdGFydCAhPSByb3ctPmdseXBoc1tU RVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAg JiYgdy0+Y3Vyc29yLnggPj0geAorICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54IDwg eCArIHN0YXJ0LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgIHx8IChzdGFydCA9PSBy b3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAg ICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0geCkpCisgICAgICAgICAgICAgICYmIHJv dy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgJiYgIXJlYWxf ZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0 YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAgICAgICAgICAgICAg ICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBjdXJzb3JfdHlwZSwgMSwK KyAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bv c2l0aW9uLCBsc2xfZmcsCisgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBk cmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNl CisgICAgICB7CisgICAgICAgIGludCByZWxhdGl2ZV94ID0gMDsKKyAgICAgICAgZm9yIChpbnQg YXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJl YV07CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51 c2VkW2FyZWFdOworICAgICAgICAgICAgLyogR2x5cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4g Ki8KKyAgICAgICAgICAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9l bmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAg ICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgIGlmICh2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAg ICAgICAgICAgICAgICYmIGdseXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAg ICAgJiYgZXNzZW50aWFscy5mY194IDwgcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAm JiB3LT5jdXJzb3IueCA8IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAo QlZBUiAoYiwgbWNfY29uZikpKQorICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg ICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAg JiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8ICghZXNz ZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChiLCBtY19pbmFjdGl2ZV93aW5kb3dzKSkpKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICAgICAgLyogVGhlIHNwYWNlIGFwcGVuZGVkIHRvIGEgcm93IGVuZGluZyB3 aXRoIGEgbmV3IGxpbmUgZG9lcworICAgICAgICAgICAgICAgICAgICBub3QgaGF2ZSBhIGBnbHlw aC0+Y2hhcnBvc2AgKC0xLCAwKSB0aGF0IHdlIGNhbiB1c2UgZm9yIHRoaXMKKyAgICAgICAgICAg ICAgICAgICAgcGFydGljdWxhciBhcHBsaWNhdGlvbi4gIFdoZW4gYSBgYnVmZmVyLWRpc3BsYXkt dGFibGUnIGVudHJ5CisgICAgICAgICAgICAgICAgICAgIGFzc2lnbnMgYSB2aXNpYmxlIGdseXBo IHRvIGEgbmV3IGxpbmUsIHRoZXJlIGlzIG5vIHByb2JsZW0KKyAgICAgICAgICAgICAgICAgICAg YmVjYXVzZSB0aGF0IGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBjYW4gdXNl LgorICAgICAgICAgICAgICAgICAgICBXaGVuIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywg d2UgdXNlIHRoZSBmb2xsb3dpbmcgdGVzdDoKKyAgICAgICAgICAgICAgICAgICAgdGhlIGFwcGVu ZGVkIHNwYWNlIGhhcyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lIGxlc3MgdGhhbiB0aGUKKyAgICAg ICAgICAgICAgICAgICAgZW5kIG9mIHRoZSBtYXRyaXggcm93LiAqLworICAgICAgICAgICAgICAg ICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAg ICAgICAgICAgICAgc3RydWN0IGdseXBoICpwcmV2aW91c19nbHlwaCA9ICgwIDw9IGhwb3MgLSAx ICYmIGhwb3MgLSAxIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0g KyBocG9zIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBOVUxMOworICAgICAgICAgICAgICAgICAgICAvLyBzdHJ1Y3QgZ2x5cGggKmxhc3Rf Z2x5cGggPSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAx OworICAgICAgICAgICAgICAgICAgICBib29sIHNraXBfcCA9IChwcmV2aW91c19nbHlwaCAhPSBO VUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX2dseXBo LT5jaGFycG9zID09IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT5ieXRlcG9zICE9IGVzc2VudGlhbHMu enZfYnl0ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFdoZW4gYSBgYnVmZmVyLWRpc3BsYXkt dGFibGUnIGVudHJ5IGNvbnRhaW5zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg YSB2aXNpYmxlIHRhYiBjaGFyYWN0ZXIgKCLCuyIpLCB0aGUgc3Vic2VxdWVudAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFNUUkVUQ0hfR0xZUEggd2lsbCBoYXZlIHRoZSBzYW1l IGdseXBoLT5jaGFycG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXMgdGhl IGFmb3JlbWVudGlvbmVkIHZpc2libGUgdGFiIGNoYXJhY3Rlci4gKi8KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChwcmV2aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0g Z2x5cGgtPmNoYXJwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRy dWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlOworICAgICAgICAg ICAgICAgICAgICBpbnQgcG9zaW50ID0gKHJvd19wb3NpdGlvbiA9PSBQT1NUX1pWKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IC0xCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IChyb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGdseXBoLT5ieXRlcG9zICE9IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdID09IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpIC0gMQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGgtPmJ5dGVwb3MgPT0gZXNzZW50aWFs cy56dl9ieXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogZ2x5cGgtPmNoYXJwb3M7CisgICAgICAgICAgICAg ICAgICAgIExpc3BfT2JqZWN0IHNwZWNzID0gbWNfYXNzb2MgKG1ha2VfZml4bnVtIChwb3NpbnQp LCBCVkFSIChiLCBtY19jb25mKSk7CisgICAgICAgICAgICAgICAgICAgIGlmICgoKGhlYWRlcl9s aW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwg aGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklM UCAoc3BlY3MpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3Rl eHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAhc2tpcF9wCisgICAg ICAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gIT0gUE9TVF9aVikKKyAgICAgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBMaXNwX09iamVjdCBsaXNw X3R5cGUgPSBtY19udGggKDEsIHNwZWNzKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0g bWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUgPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19s aXNwX3RvX2N1cnNvcl90eXBlIChYQ0FSIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJz b3JfdHlwZSAobGlzcF90eXBlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBl ID0gKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX0hPTExPV19CT1gKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBjdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBj dXJzb3Jfd2lkdGggPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBYRklYTlVNIChYQ0FSIChYQ0RSIChsaXNwX3R5cGUpKSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0xOworICAgICAg ICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3QgbWNfZm9yZWdyb3VuZCA9IG1jX250aCAoMiwg c3BlY3MpOworICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7Cisg ICAgICAgICAgICAgICAgICAgICAgICBpZiAoU1RSSU5HUCAobWNfZm9yZWdyb3VuZCkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgIG1jX3h3X2NvbG9yX3ZhbHVlcyAodywgbWNfZm9yZWdyb3Vu ZCwgJmxzbF9mZyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKFZFQ1RPUlAg KG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5yZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAobWNf Zm9yZWdyb3VuZCwgMCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLmdy ZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDEpKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGxzbF9mZy5ibHVlID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2Zv cmVncm91bmQsIDIpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoTklMUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBtY19jb2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRp YWxzLCAmbHNsX2ZnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBwb3NpbnQsIGN1cnNvcl90eXBlLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlMpOworICAgICAg ICAgICAgICAgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4 KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRo OworICAgICAgICAgICAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5 cGgsIGFyZWEsIHJlbGF0aXZlX3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHhfbGltaXQsIHJvdy0+eSwgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBl c3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUywgZHJhd19wLCBmcm9tX3doZXJlLCBNQ19DQUNI RSk7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgIGlmICghTklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAg ICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICB8 fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoYiwgZmNfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAgICAgICAg ICAgLy8gJiYgZXNzZW50aWFscy5mY194IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAg ICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAg ICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHctPm1jLmxudW1fcGl4ZWxfd2lkdGgpCisg ICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4 dF9hcmVhX3dpZHRoOworICAgICAgICAgICAgICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3Jf cCA9ICh3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxzLmZjX3gKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5o cG9zID09IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsK KyAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV07CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAg ICAgICAgICAgICAgICBtY19jb2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNs X2ZnLCAtMSwgTUNfQkFSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJv d19wb3NpdGlvbiwgRklMTF9DT0xVTU4pOworICAgICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+ PSBocG9zX3N0YXJ0CisgICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFy dCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICAgICAgICAgICAgICAvLyAmJiByZWxhdGl2ZV94 ICsgZ2x5cGgtPnBpeGVsX3dpZHRoIDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcmVsYXRpdmVfeCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAg ICAgICAgICAgJiYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAg ICAgICAgICAgICAgICAgICAgJiYgKChnbHlwaCAhPSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSByZWxhdGl2ZV94CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHJlbGF0aXZlX3gg KyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGds eXBoID09IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg ZXNzZW50aWFscy5mY194ID49IHJlbGF0aXZlX3gpKQorICAgICAgICAgICAgICAgICAgICAgICAg JiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19l bmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgeF9saW1pdCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+eSwgaHBvcywgdnBvcywgTUNf QkFSLCAxLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsIEZJTExfQ09MVU1OLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZHJhd19wLCBmcm9tX3doZXJlLCBGQ19DQUNIRSk7Cisg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBj cm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2hv cml6b250YWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3Rp dmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZl X3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZw b3MpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0 ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1j X1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5 cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19IQkFSLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgSE9SSVpPTlRBTF9SVUxFUik7CisgICAg ICAgICAgICAgICAgICAgIC8qIFByZXNlcnZlIHN1cHBvcnQgZm9yIGRlZmF1bHQgYmVoYXZpb3Ig c3VjaCB0aGF0IGEgdXNlciBtYXkKKyAgICAgICAgICAgICAgICAgICAgc3BlY2lmeSB0aGUgaGVp Z2h0IG9mIGFuIE1DX0hCQVIsIHdoaWNoIGJlZ2lucyBpdHMgam91cm5leQorICAgICAgICAgICAg ICAgICAgICBhcyB0aGUgYGN1cnNvcl93aWR0aCcuICBgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeScg cmVhZGp1c3RzLiAqLworICAgICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+PSBocG9zX3N0YXJ0 CisgICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVu Z3RoKQorICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIGds eXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBNQ19IQkFSLCAxLCBjdXJzb3JfbWF0cml4LAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9u LCBsc2xfZmcsIEhPUklaT05UQUxfUlVMRVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAg ICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAg ICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAg ICAgICAgICAgICAgICYmICFmaWxsX2NvbHVtbl90cnVtcHNfcCkKKyAgICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoZ2x5cGgtPnR5cGUgPT0gSU1B R0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19IT0xMT1df Qk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19CQVI7CisgICAgICAg ICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgICAg ICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueSA9PSByb3ctPnkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vy c29yLnZwb3MgPT0gdnBvcyk7CisgICAgICAgICAgICAgICAgICAgIGludCBocG9zID0gZ2x5cGgg LSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNf UkdCIGxzbF9mZzsKKyAgICAgICAgICAgICAgICAgICAgbWNfY29sb3JfcGlja2VyICh3LCBnbHlw aCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgVkVSVElDQUxfUlVMRVIpOworICAg ICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICAgICAg ICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICAg ICAgICAgICAgICAmJiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAg ICAgICAgICAgICAgICAgICAgICAmJiAoKGdseXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gcmVsYXRpdmVfeAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA8IHJlbGF0aXZlX3ggKyBnbHlw aC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGdseXBoID09 IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vy c29yLnggPj0gcmVsYXRpdmVfeCkpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnkg PD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAh cmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywg bWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBjdXJzb3JfdHlwZSwg MSwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2Vu dGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLCBWRVJUSUNBTF9SVUxFUiwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwgZnJvbV93aGVyZSwgQ0hfQ0FDSEUpOworICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBp eGVsX3dpZHRoOworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorICAvLyAg Y2xvY2tfdCBjbG9ja19lbmQgPSBjbG9jaygpOworICAvLyAgZG91YmxlIGNwdV90aW1lX3VzZWQg PSAoKGRvdWJsZSkgKGNsb2NrX2VuZCAtIGNsb2NrX3N0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsK KyAgLy8gIGZwcmludGYgKHN0ZGVyciwgIm1jX2RyYXdfcm93ICglcyk6ICBUSU1FICglZilcbiIs IG1jX3dpbmRvdyAodyksIGNwdV90aW1lX3VzZWQpOworfQorCitib29sCittY19yZWRyYXdfcm93 IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVjdCBn bHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgICAgIGVudW0gZ2x5cGhfcm93X2FyZWEgYXJlYSwg aW50IHN0YXJ0X3gsIGludCBzdGFydF9ocG9zLCBpbnQgZW5kX2hwb3MsCisgICAgICAgICAgICAg ICBib29sIGNsZWFyX2VvbF9wLCBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UgaGwsCisgICAgICAgICAg ICAgICBlbnVtIG1jX3JlZHJhd19yb3dfdHlwZSBmcm9tX3doZXJlKQoreworICBib29sIGdvX3Ag PSAoKHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID4gMAorICAgICAgICAgICAg ICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4gMAorICAgICAgICAg ICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVdID4gMCkKKyAgICAg ICAgICAgIC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YW4gb25lIGZh a2UgY3Vyc29yIGF0IHRoZSBzYW1lIEhQT1MuICovCisgIGZvciAoZW51bSBtY19jYWNoZV90eXBl IGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7Cisg ICAgICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAgICAgIGZvciAoaW50IG50aCA9IDA7CisgICAg ICAgICAgIG1jX3RyYXZlcnNlX2NhY2hlX3AgKHctPm1jX21hdHJpeCwgY2FjaGVfdHlwZSwgdm50 aCwgbnRoKTsKKyAgICAgICAgICAgKytudGgpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgeCA9 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueDsKKyAgICAg ICAgICBpbnQgZnggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmZ4OworICAgICAgICAgIGludCB5ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS55OworICAgICAgICAgIGludCBmeSA9IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAgaW50IGhwb3MgPSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmhwb3M7CisgICAg ICAgICAgaW50IHZwb3MgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLnZwb3M7CisgICAgICAgICAgaW50IHdkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZDsKKyAgICAgICAgICBpbnQgaCA9IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd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2ZV9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5hY3RpdmVfcDsKKyAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZv cjsKKyAgICAgICAgICBib29sIGVuYWJsZWRfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9wOworICAgICAgICAgIGlmICh2cG9zID09IHZu dGgKKyAgICAgICAgICAgICAgJiYgKChocG9zID49IHN0YXJ0X2hwb3MKKyAgICAgICAgICAgICAg ICAgICAmJiBocG9zIDwgZW5kX2hwb3MpCisgICAgICAgICAgICAgICAgICAvKiBBIGZsb2F0aW5n IGN1cnNvciBiZXlvbmQgdGhlIGVuZCBvZiB0aGUgZ2x5cGggcm93LiAqLworICAgICAgICAgICAg ICAgICAgfHwgKGhwb3MgKyAxID09IHN0YXJ0X2hwb3MKKyAgICAgICAgICAgICAgICAgICAgICAm JiBocG9zICsgMSA9PSBlbmRfaHBvcykpCisgICAgICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgYm9vbCByZW1vdmVfcCA9IGZhbHNlOworICAgICAg ICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBm eSwgaHBvcywgdnBvcywgd2QsIGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBsc2xfZmcsIGFjdGl2ZV9wLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCByZW1vdmVfcCk7CisgICAg ICAgICAgICB9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rY2FjaGVfdHlwZSkKKyAgICB7Cisg ICAgICBmb3IgKGludCBudGggPSAwOworICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wICh3 LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAgICAgICsrbnRoKQor ICAgICAgICB7CisgICAgICAgICAgaW50IHggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLng7CisgICAgICAgICAgaW50IGZ4ID0gdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meDsKKyAgICAgICAgICBpbnQgeSA9IHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueTsKKyAgICAgICAg ICBpbnQgZnkgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmZ5OworICAgICAgICAgIGludCBocG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5ocG9zOworICAgICAgICAgIGludCB2cG9zID0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS52cG9zOworICAgICAgICAgIGludCB3 ZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ud2Q7Cisg ICAgICAgICAgaW50IGggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmg7CisgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3R5cGU7 CisgICAgICAgICAgaW50IGN1cnNvcl93a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aGVb Y2FjaGVfdHlwZV1bbnRoXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgYm9vbCBlbmFibGVkX3Ag PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRf cDsKKyAgICAgICAgICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29udGFpbnMgdGhl IGZvbGxvd2luZyB0ZXN0cywKKyAgICAgICAgICBlYXNzZXJ0IChtYXRyaXggJiYgbWF0cml4LT5y b3dzKTsKKyAgICAgICAgICBlYXNzZXJ0IChyb3cgPj0gMCAmJiByb3cgPCBtYXRyaXgtPm5yb3dz KTsgKi8KKyAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJpeCAmJiBtYXRyaXgt PnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAgICAgICAgIGlmIChiYXJmX2NyYXNoX29uZSkKKyAg ICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAodnBv cyA+PSAwICYmIHZwb3MgPCBtYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgICAgICAg ICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICBp ZiAodnBvcyA9PSB2bnRoCisgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQ SAorICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIG1jX2VyYXNlX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIHksIGhwb3MsIHZwb3MsIGds eXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkKTsKKyAgICAgICAgICAgICAgdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3AgPSBmYWxzZTsKKyAg ICAgICAgICAgICAgLS13LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOworICAg ICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAodnBvcyA9PSB2bnRoCisgICAgICAgICAg ICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICBib29sIHJlbW92ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5 YnJpZCAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIGxzbF9iZywgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICAgICAgICAgICAgICAgIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9wID0gZmFsc2U7 CisgICAgICAgICAgICAgICAgLS13LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVd OworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0gPSAwOworICAgIH0KK30KKworLyogRXJhc2UgZmFr ZSBjdXJzb3JzIGZyb20gKG1pbiwgcnVuLmN1cnJlbnRfeSwgcnVuLmRlc2lyZWRfeSkgdG8gZW5k IG9mIHdpbmRvdy4KKyAgVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX0RPV046Cisg ICAgcnVuLmhlaWdodCA9IGl0Lmxhc3RfdmlzaWJsZV95IC0gcnVuLmRlc2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ICB8ICAgICAgICAgICAgIHwKKyAgfCAgICAgICAgICAgICB8 IDw9IHJ1bi5kZXNpcmVkX3kgPT0gODEwIFtkb3duICjihpMpXSA9PSBydW4uY3VycmVudF95ID4g cnVuLmRlc2lyZWRfeQorICB8ICAgICAgICAgICAgIHwgICAgcnVuLmhlaWdodCA9IGl0Lmxhc3Rf dmlzaWJsZV95IC0gcnVuLmRlc2lyZWRfeQorICB8ICAgICAgICAgICAgIHwgICAgcnVuLmhlaWdo dCA9PSAxMDgwIC0gODEwID09IDI3MAorICB8ICAgICAgICAgICAgIHwgICAgW1RvcCBwYXJ0IG9m IHRoZSBsb3dlciByZWN0YW5nbGUgZ2V0cyBjb3BpZWQgdG8gbG93ZXIgcnVuLmRlc2lyZWRfeS5d CisgIHwgICAgICAgICAgICAgfAorICArLS0tLS0tLS0tLS0tLSsgPD0gaXQubGFzdF92aXNpYmxl X3kgPT0gMTA4MCAqLwordm9pZAorbWNfcHJlX3Njcm9sbF9jbGVhbiAoc3RydWN0IHdpbmRvdyAq dywgc3RydWN0IHJ1biBydW4sIGludCBzdGFydF92cG9zLAorICAgICAgICAgICAgICAgICAgICAg aW50IG5yb3dzX3Njcm9sbGVkLCBlbnVtIG1jX3ByZV9zY3JvbGxfY2xlYW5fdHlwZSBmcm9tX3do ZXJlKQoreworICBpZiAoTUlOSV9XSU5ET1dfUCAodykpCisgICAgcmV0dXJuOworICBib29sIGdv X29uZV9wID0gKHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID4gMAorICAgICAg ICAgICAgICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4gMAor ICAgICAgICAgICAgICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVd ID4gMCk7CisgIGJvb2wgZ29fdHdvX3AgPSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAg ICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3Nz aGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKSk7CisgIGlmIChtY19z dGRlcnJfcCkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJtY19wcmVfc2Nyb2xsX2NsZWFuICglcyk6 XG5cCisgICVzIHwgZ29fb25lX3AgKCVzKSB8IGdvX3R3b19wICglcylcblwKKyAgc3RhcnRfdnBv cyAoJWQpIHwgbnJvd3Nfc2Nyb2xsZWQgKCVkKVxuXAorICAlczogIHJ1bi5jdXJyZW50L2Rlc2ly ZWRfeSAoJWQvJWQpIHwgcnVuLmhlaWdodCAoJWQpXG4iLAorICAgIG1jX3dpbmRvdyAodyksIChm cm9tX3doZXJlID09IFRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9ET1dOKQorICAg ICAgICAgICAgICAgICAgICAgPyAiVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX0RP V04iCisgICAgICAgICAgICAgICAgICAgOiAoZnJvbV93aGVyZSA9PSBUUllfV0lORE9XX1JFVVNJ TkdfQ1VSUkVOVF9NQVRSSVhfVVApCisgICAgICAgICAgICAgICAgICAgICA/ICJUUllfV0lORE9X X1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfVVAiCisgICAgICAgICAgICAgICAgICAgOiAoZnJvbV93 aGVyZSA9PSBUUllfV0lORE9XX0lEKQorICAgICAgICAgICAgICAgICAgICAgPyAiVFJZX1dJTkRP V19JRCIKKyAgICAgICAgICAgICAgICAgICA6ICJVTktOT1dOIiwKKyAgICBnb19vbmVfcCA/ICJ5 ZXMiIDogIm5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peCwgcm93KTsKKyAgICB9CisgIGlm ICh1cGRhdGluZ19mcmFtZV9wKQorICAgIHVwZGF0ZV9lbmQgKGYpOworICAvLyBtY19yZXNldF9j YWNoZSAodyk7Cit9CisKK0RFRlVOICgibWMtc3RkZXJyIiwgRm1jX3N0ZGVyciwgU21jX3N0ZGVy ciwgMCwgMSwgIlAiLAorICAgICAgIGRvYzogLyogVG9nZ2xlIHRyYWNpbmcgb2YgbXVsdGlwbGUg ZmFrZSBjdXJzb3JzLgorV2l0aCBBUkcsIHR1cm4gdHJhY2luZyBvbiBpZiBhbmQgb25seSBpZiBB UkcgaXMgcG9zaXRpdmUuICovKQorICAoTGlzcF9PYmplY3QgYXJnKQoreworICBpZiAoTklMUCAo YXJnKSkKKyAgICBtY19zdGRlcnJfcCA9ICFtY19zdGRlcnJfcDsKKyAgZWxzZQorICAgIHsKKyAg ICAgIGFyZyA9IEZwcmVmaXhfbnVtZXJpY192YWx1ZSAoYXJnKTsKKyAgICAgIG1jX3N0ZGVycl9w ID0gWEZJWE5VTSAoYXJnKSA+IDA7CisgICAgfQorICByZXR1cm4gUW5pbDsKK30KKworLyogZW5k IE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAwKIC8q KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKgogCQkgICAgICBXaW5kb3cgZGlzcGxheSBkaW1lbnNpb25zCkBAIC0xMzUx MSw2ICsxODM5MSw2OSBAQCBoc2Nyb2xsX3dpbmRvd190cmVlIChMaXNwX09iamVjdCB3aW5kb3cp CiAJICAgICAgZWxzZQogCQlwdCA9IGNsaXBfdG9fYm91bmRzIChCRUdWLCBtYXJrZXJfcG9zaXRp b24gKHctPnBvaW50bSksIFpWKTsKIAorCisvKiAqKioqKioqKioqKio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weDEyMTI0M2Q1MCkgYXQgeGRpc3Au Yzo4Mjk5CisjNiAgMHgwMDAwMDAwMTAwMDRkMzdlIGluIGluaXRfdG9fcm93X3N0YXJ0IChpdD0w eDdmZmY1ZmJmOWUzMCwgdz0weDExYmY3MmM5OCwKKyAgICByb3c9MHgxMjEyNDNkMDApIGF0IHhk aXNwLmM6ODQyMworIzcgIDB4MDAwMDAwMDEwMDA2YzNmNyBpbiBoc2Nyb2xsX3dpbmRvd190cmVl ICh3aW5kb3c9Li4uKSBhdCB4ZGlzcC5jOjE4NTQ2CisqLworCisgIC8qIGBpbml0X2l0ZXJhdG9y JzogIGVhc3NlcnQgKGNoYXJwb3MgPCAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHx8IChjaGFycG9zID49IEJVRl9CRUcgKGN1cnJlbnRfYnVmZmVyKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgY2hhcnBvcyA8PSBaVikpOyAqLworCisgIHN0cnVjdCBk aXNwbGF5X3BvcyAqcG9zID0gJmN1cnNvcl9yb3ctPnN0YXJ0OworICBwdHJkaWZmX3QgY2hhcnBv cyA9IENIQVJQT1MgKHBvcy0+cG9zKTsKKworICBib29sIGJhcmZfY3Jhc2hfb25lID0gKGNoYXJw b3MgPCAwCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGNoYXJwb3MgPj0gQlVGX0JFRyAo Y3VycmVudF9idWZmZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGNoYXJwb3Mg PD0gWlYpKQorICAgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQorICAgICAgICAgICAgICAg ICAgICAgICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgcmV0dXJuIGhzY3Jv bGxlZF9wOworCisgIC8qIGByZXNlYXRfMSc6ICBDSEFSUE9TIChwb3MpID49IEJFR1YgJiYgQ0hB UlBPUyAocG9zKSA8PSBaViAqLworICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKGNoYXJwb3MgPj0g QkVHViAmJiBjaGFycG9zIDw9IFpWKQorICAgICAgICAgICAgICAgICAgICAgICAgID8gZmFsc2UK KyAgICAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX3R3bykK KyAgICByZXR1cm4gaHNjcm9sbGVkX3A7CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAgLyogTW92ZSBpdGVyYXRvciB0byBw dCBzdGFydGluZyBhdCBjdXJzb3Jfcm93LT5zdGFydCBpbgogCQkgYSBsaW5lIHdpdGggaW5maW5p dGUgd2lkdGguICAqLwogCSAgICAgIGluaXRfdG9fcm93X3N0YXJ0ICgmaXQsIHcsIGN1cnNvcl9y b3cpOwpAQCAtMTQzOTcsOSArMTkzNDAsMjIgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQog CSAgICAgICp3LT5kZXNpcmVkX21hdHJpeC0+bWV0aG9kID0gMDsKIAkgICAgICBkZWJ1Z19tZXRo b2RfYWRkICh3LCAib3B0aW1pemF0aW9uIDEiKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAjaWZkZWYgSEFWRV9XSU5ET1df U1lTVEVNCisgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICBtY191cGRhdGVfd2lu ZG93X2ZyaW5nZXMgKHcsIGZhbHNlKTsKKyAgICBlbHNlCiAJICAgICAgdXBkYXRlX3dpbmRvd19m cmluZ2VzICh3LCBmYWxzZSk7CiAjZW5kaWYKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogCSAgICAgIGdvdG8gdXBkYXRlOwogCSAgICB9CiAJICBlbHNlCkBAIC0xNzc5MiwxMCArMjI3 NDgsMjIgQEAgcmVkaXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3Rf dGhpc19vbmVfcCkKICAgICB9CiAKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBib29sIGtl ZXBfY3VycmVudF9wID0gKGp1c3RfdGhpc19vbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAg IHx8ICghdXNlZF9jdXJyZW50X21hdHJpeF9wICYmICFvdmVybGF5X2Fycm93X3NlZW4pCisgICAg ICAgICAgICAgICAgICAgICAgICAgfHwgdy0+cHNldWRvX3dpbmRvd19wKTsKKworICBib29sIGZy aW5nZXNfdXBkYXRlZF9wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3Nz aGFpcnMpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19m cmluZ2VzICh3LCBrZWVwX2N1cnJlbnRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDog dXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBrZWVwX2N1cnJlbnRfcCk7CisKICAgaWYgKEZSQU1F X1dJTkRPV19QIChmKQotICAgICAgJiYgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCAoanVzdF90 aGlzX29uZV9wCi0JCQkJICAgIHx8ICghdXNlZF9jdXJyZW50X21hdHJpeF9wICYmICFvdmVybGF5 X2Fycm93X3NlZW4pCi0JCQkJICAgIHx8IHctPnBzZXVkb193aW5kb3dfcCkpKQorICAgICAgJiYg ZnJpbmdlc191cGRhdGVkX3ApCiAgICAgewogICAgICAgdXBkYXRlX2JlZ2luIChmKTsKICAgICAg IGJsb2NrX2lucHV0ICgpOwpAQCAtMTc4MTAsNiArMjI3NzgsOSBAQCByZWRpc3BsYXlfd2luZG93 IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQogICAgICAgdXBkYXRl X2VuZCAoZik7CiAgICAgfQogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGlmIChX SU5ET1dfQk9UVE9NX0RJVklERVJfV0lEVEggKHcpKQogICAgIGd1aV9kcmF3X2JvdHRvbV9kaXZp ZGVyICh3KTsKICNlbmRpZiAvKiBIQVZFX1dJTkRPV19TWVNURU0gKi8KQEAgLTE4MTI1LDYgKzIz MDk2LDE2IEBAIHRyeV93aW5kb3dfcmV1c2luZ19jdXJyZW50X21hdHJpeCAoc3RydWN0IHdpbmRv dyAqdykKIAkgICAgICB1cGRhdGVfYmVnaW4gKGYpOwogCSAgICAgIGd1aV91cGRhdGVfd2luZG93 X2JlZ2luICh3KTsKIAkgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVhcl93aW5kb3dfbW91c2VfZmFj ZSAodyk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKyAgICBtY19wcmVfc2Nyb2xsX2NsZWFuICh3LCBydW4sIHN0YXJ0X3Zwb3MsIG5yb3dz X3Njcm9sbGVkLCBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTik7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICBGUkFNRV9SSUYgKGYpLT5zY3JvbGxf cnVuX2hvb2sgKHcsICZydW4pOwogCSAgICAgIGd1aV91cGRhdGVfd2luZG93X2VuZCAodywgZmFs c2UsIGZhbHNlKTsKIAkgICAgICB1cGRhdGVfZW5kIChmKTsKQEAgLTE4MjkxLDYgKzIzMjcyLDE2 IEBAIHRyeV93aW5kb3dfcmV1c2luZ19jdXJyZW50X21hdHJpeCAoc3RydWN0IHdpbmRvdyAqdykK IAkgIHVwZGF0ZV9iZWdpbiAoZik7CiAJICBndWlfdXBkYXRlX3dpbmRvd19iZWdpbiAodyk7CiAJ ICBGUkFNRV9SSUYgKGYpLT5jbGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBtY19wcmVf c2Nyb2xsX2NsZWFuICh3LCBydW4sIHN0YXJ0X3Zwb3MsIG5yb3dzX3Njcm9sbGVkLCBUUllfV0lO RE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfVVApOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAJICBGUkFNRV9SSUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcsICZydW4pOwogCSAg Z3VpX3VwZGF0ZV93aW5kb3dfZW5kICh3LCBmYWxzZSwgZmFsc2UpOwogCSAgdXBkYXRlX2VuZCAo Zik7CkBAIC0xOTI0NSw2ICsyNDIzNiwxNiBAQCB0cnlfd2luZG93X2lkIChzdHJ1Y3Qgd2luZG93 ICp3KQogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogCSAgZ3VpX3VwZGF0ZV93aW5kb3dfYmVn aW4gKHcpOwogCSAgRlJBTUVfUklGIChmKS0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2UgKHcpOwor CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisg ICAgbWNfcHJlX3Njcm9sbF9jbGVhbiAodywgcnVuLCBmaXJzdF91bmNoYW5nZWRfYXRfZW5kX3Zw b3MsIGR2cG9zLCBUUllfV0lORE9XX0lEKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogCSAgRlJBTUVfUklGIChmKS0+c2Nyb2xsX3J1bl9ob29rICh3LCAmcnVuKTsKIAkgIGd1aV91 cGRhdGVfd2luZG93X2VuZCAodywgZmFsc2UsIGZhbHNlKTsKICNlbmRpZgpAQCAtMjE1MjgsNiAr MjY1MjksMTcgQEAgbWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKICAg ICAgIFNFVF9URVhUX1BPUyAodGVtX2l0LnBvc2l0aW9uLCAtMSwgLTEpOwogICAgICAgUFJPRFVD RV9HTFlQSFMgKCZ0ZW1faXQpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCisgICAgICAvKiBUaGlzIHBlcm1pdHMgdXMgdG8gaW5zcGVjdCB0 aGUgSFBPUyBvZiBsaW5lIG51bWJlciBnbHlwaHMgYW5kIHRoZSBzcGFjZQorICAgICAgcGFkZGlu ZyBiZWZvcmUvYWZ0ZXIgdGhlIGxpbmUgbnVtYmVycy4gIFdlIHNldCBgZ2x5cGgtPmhwb3NgIGVs c2V3aGVyZS4gKi8KKyAgICAgIHRlbV9pdC5ocG9zICs9IDE7CisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKICAgICAgIC8qIFN0b3AgcHJvZHVjaW5nIGdseXBocywgYW5kIHJlZnJhaW4g ZnJvbSBwcm9kdWNpbmcgdGhlIGxpbmUKIAkgbnVtYmVyLCBpZiB3ZSBkb24ndCBoYXZlIGVub3Vn aCBzcGFjZSBvbiB0aGlzIGxpbmUuICAqLwogICAgICAgaWYgKHRlbV9pdC5jdXJyZW50X3ggPj0g d2lkdGhfbGltaXQpCkBAIC0yMTUzOSw2ICsyNjU1MSwyOCBAQCBtYXliZV9wcm9kdWNlX2xpbmVf bnVtYmVyIChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICB9CiAKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgc3RydWN0IGJ1ZmZlciAqYiA9IFhC VUZGRVIgKGl0LT53LT5jb250ZW50cyk7CisgIHN0cnVjdCBidWZmZXIgKm9sZF9idWZmZXIgPSBO VUxMOworICAvKiBOZWVkZWQgc28gdGhhdCBidWZmZXItbG9jYWwgdmFsdWVzIGNhbiBiZSBkZXRl cm1pbmVkOyBlLmcuLCB3aGVuIHN3aXRjaGluZworICB0byB0aGUgbWluaWJ1ZmZlci4gKi8KKyAg aWYgKGIgIT0gY3VycmVudF9idWZmZXIpCisgICAgeworICAgICAgb2xkX2J1ZmZlciA9IGN1cnJl bnRfYnVmZmVyOworICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAoYik7CisgICAgfQorICBpdC0+ dy0+bWMubG51bV9waXhlbF93aWR0aCA9ICghTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRlbV9pdC5jdXJyZW50X3gKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgIGlmIChvbGRfYnVmZmVyKQorICAgIHNl dF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgIC8qIFJlY29yZCB0aGUgd2lkdGggaW4gcGl4ZWxzIHdlIG5lZWQgZm9yIHRoZSBs aW5lIG51bWJlciBkaXNwbGF5LiAgKi8KICAgaXQtPmxudW1fcGl4ZWxfd2lkdGggPSB0ZW1faXQu Y3VycmVudF94OwogICAvKiBDb3B5IHRoZSBwcm9kdWNlZCBnbHlwaHMgaW50byBJVCdzIGdseXBo X3Jvdy4gICovCkBAIC0yNzM2MCw2ICszMjM5NCwxNyBAQCBhcHBlbmRfZ2x5cGggKHN0cnVjdCBp dCAqaXQpCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5cGhz W2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5i eXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogICAgICAg Z2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAgICAgICBpZiAoaXQtPnBpeGVsX3dpZHRoID4g MCkKQEAgLTI3NDQyLDYgKzMyNDg3LDE3IEBAIGFwcGVuZF9jb21wb3NpdGVfZ2x5cGggKHN0cnVj dCBpdCAqaXQpCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5 cGhzW2l0LT5hcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBn bHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gaXQtPmNtcF9pdC5jaGFycG9zOwogICAg ICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAgICAgICBlYXNzZXJ0IChpdC0+cGl4ZWxf d2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjc2NTAsNiArMzI3MDYsMTcgQEAgcHJvZHVjZV9pbWFn ZV9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAl9CiAgICAgICBpZiAoZ2x5cGggPCBpdC0+Z2x5cGhf cm93LT5nbHlwaHNbYXJlYSArIDFdKQogCXsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsK KyAgICAgIGdseXBoLT5ieXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogCSAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRp b24pOwogCSAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAJICBnbHlwaC0+cGl4ZWxfd2lk dGggPSBjbGlwX3RvX2JvdW5kcyAoLTEsIGl0LT5waXhlbF93aWR0aCwgU0hSVF9NQVgpOwpAQCAt Mjc3NTMsNiArMzI4MjAsMTcgQEAgcHJvZHVjZV94d2lkZ2V0X2dseXBoIChzdHJ1Y3QgaXQgKml0 KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9yb3ctPmdseXBoc1thcmVhICsgMV0p CiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3Mg PSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBn bHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlwaC0+b2JqZWN0 ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9fYm91bmRzICgt MSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzgzOSw2ICszMjkxNywxNyBAQCBh cHBlbmRfc3RyZXRjaF9nbHlwaCAoc3RydWN0IGl0ICppdCwgTGlzcF9PYmplY3Qgb2JqZWN0LAog CSAgICB3aWR0aCAtPSBpdC0+Zmlyc3RfdmlzaWJsZV94IC0gaXQtPmN1cnJlbnRfeDsKIAkgIGVh c3NlcnQgKHdpZHRoID4gMCk7CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAg ICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlv bik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gb2JqZWN0OwogICAgICAgLyogRklYTUU6IEl0IHdv dWxkIGJlIGJldHRlciB0byB1c2UgVFlQRV9NQVggaGVyZSwgYnV0CkBAIC0yODI5Myw2ICszMzM4 MiwxNyBAQCBhcHBlbmRfZ2x5cGhsZXNzX2dseXBoIChzdHJ1Y3QgaXQgKml0LCBpbnQgZmFjZV9p ZCwgYm9vbCBmb3Jfbm9fZm9udCwgaW50IGxlbiwKIAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGgg PSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07CiAJfQorCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0 LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1Mg KGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAg IGVhc3NlcnQgKGl0LT5waXhlbF93aWR0aCA8PSBTSFJUX01BWCk7CkBAIC0yOTM0MywxMCArMzQ0 NDMsMjAgQEAgZ3VpX2luc2VydF9nbHlwaHMgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlw aF9yb3cgKnVwZGF0ZWRfcm93LAogCiAgIC8qIFdyaXRlIHRoZSBnbHlwaHMuICAqLwogICBocG9z ID0gc3RhcnQgLSByb3ctPmdseXBoc1t1cGRhdGVkX2FyZWFdOworCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmICghbWNfcmVkcmF3X3Jv dyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgdXBkYXRlZF9hcmVhLCB3LT5vdXRwdXRfY3Vy c29yLngsCisgICAgICAgICAgICAgICAgICAgICAgaHBvcywgaHBvcyArIGxlbiwgZmFsc2UsIERS QVdfTk9STUFMX1RFWFQsIEdVSV9JTlNFUlRfR0xZUEhTKSkKICAgZHJhd19nbHlwaHMgKHcsIHct Pm91dHB1dF9jdXJzb3IueCwgcm93LCB1cGRhdGVkX2FyZWEsCiAJICAgICAgIGhwb3MsIGhwb3Mg KyBsZW4sCiAJICAgICAgIERSQVdfTk9STUFMX1RFWFQsIDApOwogCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgIC8qIEFkdmFuY2UgdGhlIG91dHB1dCBjdXJzb3IuICAqLwogICB3LT5v dXRwdXRfY3Vyc29yLmhwb3MgKz0gbGVuOwogICB3LT5vdXRwdXRfY3Vyc29yLnggKz0gc2hpZnRf Ynlfd2lkdGg7CkBAIC0yOTc3Miw5ICszNDg4MiwxOSBAQCBndWlfZml4X292ZXJsYXBwaW5nX2Fy ZWEgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgIHdoaWxlIChp IDwgcm93LT51c2VkW2FyZWFdCiAJCSAmJiByb3ctPmdseXBoc1thcmVhXVtpXS5vdmVybGFwc192 ZXJ0aWNhbGx5X3ApOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisgICAgICBpZiAoIW1jX3JlZHJhd19yb3cgKHcsIHctPmN1cnJlbnRfbWF0 cml4LCByb3csIGFyZWEsIHN0YXJ0X3gsIHN0YXJ0LCBpLAorICAgICAgICAgIGZhbHNlLCBEUkFX X05PUk1BTF9URVhULCBHVUlfRklYX09WRVJMQVBQSU5HX0FSRUEpKQogCSAgZHJhd19nbHlwaHMg KHcsIHN0YXJ0X3gsIHJvdywgYXJlYSwKIAkJICAgICAgIHN0YXJ0LCBpLAogCQkgICAgICAgRFJB V19OT1JNQUxfVEVYVCwgb3ZlcmxhcHMpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJfQogICAgICAgZWxzZQogCXsKQEAgLTMwMDI1LDEwICszNTE0NSwyMCBAQCBkaXNwbGF5X2Fu ZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLAogICBuZXdfY3Vyc29yX3R5 cGUgPSBnZXRfd2luZG93X2N1cnNvcl90eXBlICh3LCBnbHlwaCwKIAkJCQkJICAgICZuZXdfY3Vy c29yX3dpZHRoLCAmYWN0aXZlX2N1cnNvcik7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgLyogSWYgY3Vyc29yIGlzIGN1cnJlbnRseSBi ZWluZyBzaG93biBhbmQgd2UgZG9uJ3Qgd2FudCBpdCB0byBiZSBvcgogICAgICBpdCBpcyBpbiB0 aGUgd3JvbmcgcGxhY2UsIG9yIHRoZSBjdXJzb3IgdHlwZSBpcyBub3Qgd2hhdCB3ZSB3YW50LAog ICAgICBlcmFzZSBpdC4gICovCiAgIGlmICh3LT5waHlzX2N1cnNvcl9vbl9wCisgICAgICAmJiBO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYg TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICYm IE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAmJiB3 LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19t YXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXgu Y3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA9PSAwCiAgICAgICAmJiAoIW9uCiAJICB8fCB3LT5waHlz X2N1cnNvci54ICE9IHgKIAkgIHx8IHctPnBoeXNfY3Vyc29yLnkgIT0geQpAQCAtMzAwNDEsNiAr MzUxNzEsOSBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBib29s IG9uLAogCSAgICAgICYmIG5ld19jdXJzb3Jfd2lkdGggIT0gdy0+cGh5c19jdXJzb3Jfd2lkdGgp KSkKICAgICBlcmFzZV9waHlzX2N1cnNvciAodyk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgLyogRG9uJ3QgY2hlY2sgcGh5c19jdXJzb3Jfb25fcCBoZXJlIGJlY2F1c2UgdGhh dCBmbGFnIGlzIG9ubHkgc2V0CiAgICAgIHRvIGZhbHNlIGluIHNvbWUgY2FzZXMgd2hlcmUgd2Ug a25vdyB0aGF0IHRoZSBjdXJzb3IgaGFzIGJlZW4KICAgICAgY29tcGxldGVseSBlcmFzZWQsIHRv IGF2b2lkIHRoZSBleHRyYSB3b3JrIG9mIGVyYXNpbmcgdGhlIGN1cnNvcgpAQCAtMzAwNTksOSAr MzUxOTIsMjMgQEAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgYm9v bCBvbiwKICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB2cG9zOwogICAgIH0KIAorCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpZiAoTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICYmIE5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAgICAmJiBO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAgICAgJiYgdy0+ bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPT0gMAorICAgICAgJiYgdy0+bWNfbWF0 cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPT0gMAorICAgICAgJiYgdy0+bWNfbWF0cml4LmN1 cnNvcnNfdXNlZFtGQ19DQUNIRV0gPT0gMCkKICAgRlJBTUVfUklGIChmKS0+ZHJhd193aW5kb3df Y3Vyc29yICh3LCBnbHlwaF9yb3csIHgsIHksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbmV3X2N1cnNvcl90eXBlLCBuZXdfY3Vyc29yX3dpZHRoLAogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG9uLCBhY3RpdmVfY3Vyc29yKTsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTMwMTU0LDcgKzM1MzAxLDE4IEBAIGRyYXdf cm93X3dpdGhfbW91c2VfZmFjZSAoc3RydWN0IHdpbmRvdyAqdywgaW50IHN0YXJ0X3gsIHN0cnVj dCBnbHlwaF9yb3cgKnJvdywKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KICAgaWYgKEZSQU1F X1dJTkRPV19QIChYRlJBTUUgKHctPmZyYW1lKSkpCiAgICAgeworCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBpZiAoIW1jX3JlZHJh d19yb3cgKHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIFRFWFRfQVJFQSwgc3RhcnRfeCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRfaHBvcywgZW5kX2hwb3MsIGZhbHNlLCBkcmF3 LCBEUkFXX1JPV19XSVRIX01PVVNFX0ZBQ0UpKQogICAgICAgZHJhd19nbHlwaHMgKHcsIHN0YXJ0 X3gsIHJvdywgVEVYVF9BUkVBLCBzdGFydF9ocG9zLCBlbmRfaHBvcywgZHJhdywgMCk7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIHJldHVybjsKICAgICB9CiAjZW5kaWYK QEAgLTMyMjE0LDExICszNzM3MiwyMyBAQCBleHBvc2VfYXJlYSAoc3RydWN0IHdpbmRvdyAqdywg c3RydWN0IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIsCiAgIHN0cnVj dCBnbHlwaCAqbGFzdDsKICAgaW50IGZpcnN0X3gsIHN0YXJ0X3gsIHg7CiAKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgaWYgKGFyZWEgPT0g VEVYVF9BUkVBICYmIHJvdy0+ZmlsbF9saW5lX3ApCisgICAgeworICAgICAgaWYgKCFtY19yZWRy YXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgcm93LCBhcmVhLCAwLCAwLCByb3ctPnVzZWRb YXJlYV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZhbHNlLCBEUkFXX05PUk1BTF9URVhU LCBFWFBPU0VfQVJFQV9PTkUpKQogICAgIC8qIElmIHJvdyBleHRlbmRzIGZhY2UgdG8gZW5kIG9m IGxpbmUgd3JpdGUgdGhlIHdob2xlIGxpbmUuICAqLwogICAgIGRyYXdfZ2x5cGhzICh3LCAwLCBy b3csIGFyZWEsCiAJCSAwLCByb3ctPnVzZWRbYXJlYV0sCiAJCSBEUkFXX05PUk1BTF9URVhULCAw KTsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgZWxzZQogICAgIHsK ICAgICAgIC8qIFNldCBTVEFSVF9YIHRvIHRoZSB3aW5kb3ctcmVsYXRpdmUgc3RhcnQgcG9zaXRp b24gZm9yIGRyYXdpbmcgZ2x5cGhzIG9mCkBAIC0zMjI1MCwxMSArMzc0MjAsMjMgQEAgZXhwb3Nl X2FyZWEgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgY29uc3QgRW1h Y3NfUmVjdGFuZ2xlICpyLAogCSAgKytsYXN0OwogCX0KIAorCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAgICAgLyogUmVwYWludC4gICovCi0g ICAgICBpZiAobGFzdCA+IGZpcnN0KQorICAgICAgLyogRmxvYXRpbmcgZmFrZSBjdXJzb3JzIHdp bGwgZXhpc3Qgd2hlbiAobGFzdCA9PSBmaXJzdCkuICovCisgICAgICBpZiAoIW1jX3JlZHJhd19y b3cgKHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIGFyZWEsIGZpcnN0X3ggLSBzdGFydF94LAor ICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdCAtIHJvdy0+Z2x5cGhzW2FyZWFdLCBsYXN0 IC0gcm93LT5nbHlwaHNbYXJlYV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZhbHNlLCBE UkFXX05PUk1BTF9URVhULCBFWFBPU0VfQVJFQV9UV08pCisgICAgICAgICAgJiYgbGFzdCA+IGZp cnN0KQogCWRyYXdfZ2x5cGhzICh3LCBmaXJzdF94IC0gc3RhcnRfeCwgcm93LCBhcmVhLAogCQkg ICAgIGZpcnN0IC0gcm93LT5nbHlwaHNbYXJlYV0sIGxhc3QgLSByb3ctPmdseXBoc1thcmVhXSwK IAkJICAgICBEUkFXX05PUk1BTF9URVhULCAwKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAgIH0KIH0KIApAQCAtMzIyNjgsMTAgKzM3NDUwLDIyIEBAIGV4cG9zZV9saW5lIChz dHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGNvbnN0IEVtYWNzX1JlY3Rh bmdsZSAqcikKIHsKICAgZWFzc2VydCAocm93LT5lbmFibGVkX3ApOwogCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAgIGlmIChyb3ctPm1vZGVf bGluZV9wIHx8IHctPnBzZXVkb193aW5kb3dfcCkKKyAgICB7CisgICAgICBpZiAoIW1jX3JlZHJh d19yb3cgKHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIFRFWFRfQVJFQSwgMCwgMCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgcm93LT51c2VkW1RFWFRfQVJFQV0sIGZhbHNlLCBEUkFXX05P Uk1BTF9URVhULCBFWFBPU0VfTElORSkpCiAgICAgZHJhd19nbHlwaHMgKHcsIDAsIHJvdywgVEVY VF9BUkVBLAogCQkgMCwgcm93LT51c2VkW1RFWFRfQVJFQV0sCiAJCSBEUkFXX05PUk1BTF9URVhU LCAwKTsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgZWxzZQogICAg IHsKICAgICAgIGlmIChyb3ctPnVzZWRbTEVGVF9NQVJHSU5fQVJFQV0pCkBAIC0zMjgxOSw2ICsz ODAxMywyMiBAQCBndWlfaW50ZXJzZWN0X3JlY3RhbmdsZXMgKGNvbnN0IEVtYWNzX1JlY3Rhbmds ZSAqcjEsIGNvbnN0IEVtYWNzX1JlY3RhbmdsZSAqcjIsCiB2b2lkCiBzeW1zX29mX3hkaXNwICh2 b2lkKQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgIGRlZnN1YnIgKCZTbWNfZHVtcF9nbHlwaF9yb3cpOworCisgIGRlZnN1YnIgKCZT bWNfZHVtcF9nbHlwaF9tYXRyaXgpOworCisgIGRlZnN1YnIgKCZTbWNfY3VycmVudF9jb2x1bW4p OworCisgIGRlZnN1YnIgKCZTbWNfc3RkZXJyKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICBWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IgPSBRbmlsOwogICBzdGF0aWNwcm8g KCZWd2l0aF9lY2hvX2FyZWFfc2F2ZV92ZWN0b3IpOwogCmRpZmYgLS1naXQgYS9zcmMveHRlcm0u YyBiL3NyYy94dGVybS5jCmluZGV4IGM5NmFhNzQuLjdmOGYxYTAgMTAwNjQ0Ci0tLSBhL3NyYy94 dGVybS5jCisrKyBiL3NyYy94dGVybS5jCkBAIC0xMzIsNiArMTMyLDkwNCBAQCBhbG9uZyB3aXRo IEdOVSBFbWFjcy4gIElmIG5vdCwgc2VlIDxodHRwczovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4u ICAqLwogI2luY2x1ZGUgPFgxMS9YS0JsaWIuaD4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yX2djID0gZ2M7CisgICAgICAgIH0K KyAgICAgIHhfY2xpcF90b19yb3cgKHcsIHJvdywgVEVYVF9BUkVBLCBnYyk7CisgICAgICB4X2Zp bGxfcmVjdGFuZ2xlIChmLCBnYywgZngsIGZ5LCB3ZCwgaCk7CisgICAgICB4X3Jlc2V0X2NsaXBf cmVjdGFuZ2xlcyAoZiwgZ2MpOworICAgIH0KK30KKworLyogUklGOiBEcmF3IGN1cnNvciBvbiB3 aW5kb3cgVy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGlu dCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsCisgICAgICAgICAgICAgICAgICAgICAg ICAgaW50IGgsIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90 eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGgsIGVudW0gbWNf Zmxhdm9yIGdseXBoX2ZsYXZvciwgYm9vbCBvbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAg IGJvb2wgYWN0aXZlX3ApCit7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE9XX0ZS QU1FICh3KSk7CisgIC8qIFRoZSBmcmluZ2UgYml0bWFwcyBhcmUgcHJlc2VudGx5IGhhbmRsZWQg ZWxzZXdoZXJlLCBidXQgY291bGQgc29tZWRheQorICBiZSBtYW5hZ2VkIChpbiBwYXJ0KSBhdCB0 aGlzIHNlY3Rpb24gb2YgY29kZS4gKi8KKyAgaWYgKG9uX3ApCisgICAgeworICAgICAgaWYgKHJv dy0+ZXhhY3Rfd2luZG93X3dp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29yX2dseXBoLT50eXBlID09IElNQUdFX0dMWVBIICYmIGxzbC5yZWQgPj0gMCAmJiBs c2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICAgIHsKKyAgICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4g Ki8KKyAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBp eGVsOworICAgICAgICAgICAgbWNfeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICAgIGYtPm91dHB1 dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAg ICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBUZW1w b3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycgYnkgYm9ycm93aW5n IHRoZQorICAgICAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHhmbnMu Yy4gKi8KKyAgICAgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBv cyA9PSByZWdpb25fYmVnKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCA9IGxvb2t1cF9uYW1l ZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQtcmVnaW9uLXByZS16 di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19h Y3RpdmVfcmVnaW9uX2JlZ19mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3Jl Z2lvbl9iZWdfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93 X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0 cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19h Y3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVf WF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZl X2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZS QU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2Fj dGl2ZV9yZWdpb25fYmVnX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9n bHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2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1BMQVkgKGYpLCBm LT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5f ZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICAgICAgZWxzZSBpZiAoYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfZmFjZV9pZCA9IGxv b2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcHJlLXp2 LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9s bG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQp OworICAgICAgICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExB WSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5m b3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFN RV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3Rp dmVfZmFjZS0+YmFja2dyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2 ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtl LWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lE IChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICAg IFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfZ2MsIGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91 dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQp OworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBibG9ja19pbnB1dCAo KTsKKyAgICAgICAgICAgICAgLyogRm9yY2UgYG1jX3hfc2V0X2N1cnNvcl9nYycgdG8gdXNlIGBz LT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgICAgICBib29sIGN1 cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcs IG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2Qs IGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX2dj X3ApOworICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwg Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAg ICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX2djLCB4Z2N2LmJhY2tncm91bmQpOworICAgICAgICAgICAgICB1bmJsb2NrX2lu cHV0ICgpOworICAgICAgICAgICAgICAvKiBEcmF3IHRoZSBmcmFtZSBhcm91bmQgdGhlIGJveC4g Ki8KKyAgICAgICAgICAgICAgbWNfeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICAgIH0KKyAgICAg IGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0hPTExPV19CT1g6CisgICAgeworICAgICAgaWYg KGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAg ICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhl bCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIG1jX3hfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBt YXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAg Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOwor ICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNv ciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAg ICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICB7CisgICAgICBp ZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAg ICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBi eSBib3Jyb3dpbmcgdGhlCisgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4g eGZucy5jLiAqLworICAgICAgICB7CisgICAgICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAg ICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngt PmN1cnNvcl9nYywgRlJBTUVfQkFDS0dST1VORF9QSVhFTCAoZikpOworICAgICAgICAgIFhTZXRC YWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf Z2MsIGNvbG9yLnBpeGVsKTsKKyAgICAgICAgICAvKiBGb3JjZSBgbWNfeF9zZXRfY3Vyc29yX2dj JyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycuICovCisgICAgICAgICAg Ym9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7CisgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGgg KHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywgbHNsLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwg YWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVf WF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCB4Z2N2LmZvcmVncm91 bmQpOworICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuYmFja2dyb3VuZCk7CisgICAgICAgICAgdW5i bG9ja19pbnB1dCAoKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAg ICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfZHJhd19j dXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywg bHNsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vy c29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAgIH0KKyAgICAg IGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0JBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJl ZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAg ICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9w aXhlbCcuICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gY29s b3IucGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IHRy dWU7CisgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjdXJzb3Jfd2lkdGgsIE1DX0JBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOwor ICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNv cl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAg ICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAg bWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93 aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgfQor ICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfSEJBUjoKKyAgICB7CisgICAgICBpZiAo bHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAg IHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9waXhlbCcuICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVs ID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlf cCA9IHRydWU7CisgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2th eV9wKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5h bF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSBmYWxzZTsKKyAgICAg ICAgICAgIG1jX3hfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5 LCBocG9zLCB2cG9zLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBj dXJzb3Jfd2lkdGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAg ICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fi b3J0ICgpOworICB9CisgICAgICAgIH0KKyNpZmRlZiBIQVZFX1hfSTE4TgorICBpZiAodyA9PSBY V0lORE9XIChmLT5zZWxlY3RlZF93aW5kb3cpKQorICAgIGlmIChGUkFNRV9YSUMgKGYpICYmIChG UkFNRV9YSUNfU1RZTEUgKGYpICYgWElNUHJlZWRpdFBvc2l0aW9uKSkKKyAgICAgIHhpY19zZXRf cHJlZWRpdGFyZWEgKHcsIHgsIHkpOworI2VuZGlmCisgICAgfQorICBYRmx1c2ggKEZSQU1FX1hf RElTUExBWSAoZikpOworfQorCisvKiBEcmF3IHN0cmV0Y2ggZ2x5cGggc3RyaW5nIFMuICovCitz dGF0aWMgdm9pZAorbWNfeF9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChzdHJ1Y3QgZ2x5cGhf c3RyaW5nICpzKQoreworICBlYXNzZXJ0IChzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBTVFJFVENI X0dMWVBIKTsKKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SCisgICAgICAmJiAheF9zdHJldGNo X2N1cnNvcl9wKQorICAgIHsKKyAgICAgIC8qIElmIGB4LXN0cmV0Y2gtY3Vyc29yJyBpcyBuaWws IGRvbid0IGRyYXcgYSBibG9jayBjdXJzb3IgYXMgd2lkZSBhcyB0aGUKKyAgICAgIHN0cmV0Y2gg Z2x5cGguICovCisgICAgICBpbnQgd2lkdGgsIGJhY2tncm91bmRfd2lkdGggPSBzLT5iYWNrZ3Jv dW5kX3dpZHRoOworICAgICAgaW50IHggPSBzLT54OworICAgICAgaWYgKCFzLT5yb3ctPnJldmVy c2VkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgbGVmdF94ID0gd2luZG93X2JveF9sZWZ0 X29mZnNldCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICBpZiAoeCA8IGxlZnRfeCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAtPSBsZWZ0X3ggLSB4 OworICAgICAgICAgICAgICB4ID0gbGVmdF94OworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBJbiBSMkwgcm93cywgZHJh dyB0aGUgY3Vyc29yIG9uIHRoZSByaWdodCBlZGdlIG9mIHRoZQorICAgICAgICAgICAgICAgc3Ry ZXRjaCBnbHlwaC4gKi8KKyAgICAgICAgICAgIGludCByaWdodF94ID0gd2luZG93X2JveF9yaWdo dCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgIGlmICh4ICsgYmFja2dyb3VuZF93aWR0 aCA+IHJpZ2h0X3gpCisgICAgICAgICAgICAgIGJhY2tncm91bmRfd2lkdGggLT0geCAtIHJpZ2h0 X3g7CisgICAgICAgICAgICB4ICs9IGJhY2tncm91bmRfd2lkdGg7CisgICAgICAgICAgfQorICAg ICAgd2lkdGggPSBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAocy0+ZiksIGJhY2tncm91bmRfd2lk dGgpOworICAgICAgaWYgKHMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeCAtPSB3aWR0aDsK KyAgICAgIC8qIERyYXcgY3Vyc29yLiAqLworICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19iZ19y ZWN0IChzLCB4LCBzLT55LCB3aWR0aCwgcy0+aGVpZ2h0KTsKKyAgICAgIC8qIENsZWFyIHJlc3Qg dXNpbmcgdGhlIEdDIG9mIHRoZSBvcmlnaW5hbCBub24tY3Vyc29yIGZhY2UuICovCisgICAgICBp ZiAod2lkdGggPCBiYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHkg PSBzLT55OworICAgICAgICAgIGludCB3ID0gYmFja2dyb3VuZF93aWR0aCAtIHdpZHRoLCBoID0g cy0+aGVpZ2h0OworICAgICAgICAgIFhSZWN0YW5nbGUgcjsKKyAgICAgICAgICBHQyBnYzsKKyAg ICAgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgICAgIHggKz0gd2lkdGg7 CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeCA9IHMtPng7CisgICAgICAgICAgaWYgKHMt PnJvdy0+bW91c2VfZmFjZV9wCisgICAgICAgICAgICAgICYmIGN1cnNvcl9pbl9tb3VzZV9mYWNl X3AgKHMtPncpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB4X3NldF9tb3VzZV9mYWNl X2djIChzKTsKKyAgICAgICAgICAgICAgZ2MgPSBzLT5nYzsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgICBlbHNlCisgICAgICAgICAgICBnYyA9IHMtPmZhY2UtPmdjOworICAgICAgICAgIGdldF9n bHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCAmcik7CisgICAgICAgICAgeF9zZXRfY2xpcF9yZWN0 YW5nbGVzIChzLT5mLCBnYywgJnIsIDEpOworICAgICAgICAgIGlmIChzLT5mYWNlLT5zdGlwcGxl KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBGaWxsIGJhY2tncm91bmQgd2l0aCBh IHN0aXBwbGUgcGF0dGVybi4gKi8KKyAgICAgICAgICAgICAgWFNldEZpbGxTdHlsZSAoRlJBTUVf WF9ESVNQTEFZIChzLT5mKSwgZ2MsIEZpbGxPcGFxdWVTdGlwcGxlZCk7CisgICAgICAgICAgICAg IHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIGdjLCB4LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAg WFNldEZpbGxTdHlsZSAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgZ2MsIEZpbGxTb2xpZCk7Cisg ICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBYR0NWYWx1ZXMgeGdjdjsKKyAgICAgICAgICAgICAgWEdldEdDVmFsdWVzIChGUkFNRV9YX0RJ U1BMQVkgKHMtPmYpLCBnYywgR0NGb3JlZ3JvdW5kIHwgR0NCYWNrZ3JvdW5kLCAmeGdjdik7Cisg ICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBnYywg eGdjdi5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAocy0+Ziwg Z2MsIHgsIHksIHcsIGgpOworICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9E SVNQTEFZIChzLT5mKSwgZ2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgICB9CisgICAg ICAgICAgeF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKHMtPmYsIGdjKTsKKyAgICAgICAgfQorICAg IH0KKyAgZWxzZSBpZiAoIXMtPmJhY2tncm91bmRfZmlsbGVkX3ApCisgICAgeworICAgICAgaW50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leHQp OworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2Jh Y2tncm91bmQgKG5leHQsIHRydWUpOworICAgICAgICAgICAgbmV4dC0+bnVtX2NsaXBzID0gMDsK KyAgICAgICAgICB9CisgICAgfQorICAvKiBTZXQgdXAgUy0+Z2MsIHNldCBjbGlwcGluZyBhbmQg ZHJhdyBTLiAqLworICBtY194X3NldF9nbHlwaF9zdHJpbmdfZ2MgKHMsIGN1cnNvcl9nY19wKTsK KyAgLyogRHJhdyByZWxpZWYgKGlmIGFueSkgaW4gYWR2YW5jZSBmb3IgY2hhci9jb21wb3NpdGlv biBzbyB0aGF0IHRoZQorICAgICBnbHlwaCBzdHJpbmcgY2FuIGJlIGRyYXduIG92ZXIgaXQuICov CisgIGlmICghcy0+Zm9yX292ZXJsYXBzCisgICAgICAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9O T19CT1gKKyAgICAgICYmIChzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAg ICAgICAgfHwgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKSkKKyAgICB7 CisgICAgICB4X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmcgKHMpOworICAgICAgeF9kcmF3X2ds eXBoX3N0cmluZ19iYWNrZ3JvdW5kIChzLCB0cnVlKTsKKyAgICAgIHhfZHJhd19nbHlwaF9zdHJp bmdfYm94IChzKTsKKyAgICAgIHhfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZyAocyk7CisgICAg ICByZWxpZWZfZHJhd25fcCA9IHRydWU7CisgICAgfQorICAgIGVsc2UgaWYgKCFzLT5jbGlwX2hl YWQgLyogZHJhd19nbHlwaHMgZGlkbid0IHNwZWNpZnkgYSBjbGlwIG1hc2suICovCisgICAgICAg ICAgICAgJiYgIXMtPmNsaXBfdGFpbAorICAgICAgICAgICAgICYmICgocy0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nX2JhY2tncm91bmQgKHMsIGZhbHNlKTsKKyAgICAgIHhfZHJh d19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENP TVBPU0lURV9HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMgfHwgKHMtPmNtcF9mcm9t ID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+ dS5jbXAuYXV0b21hdGljKSkKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7 CisgICAgICBlbHNlCisgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywg dHJ1ZSk7CisgICAgICB4X2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChz KTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgorICAgICAgaWYgKHMt PmZvcl9vdmVybGFwcykKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7Cisg ICAgICBlbHNlCisgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1 ZSk7CisgICAgICB4X2RyYXdfZ2x5cGhsZXNzX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsK KyAgICAgIGJyZWFrOworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9 CisgIGlmICghcy0+Zm9yX292ZXJsYXBzKQorICAgIHsKKyAgICAgIC8qIERyYXcgdW5kZXJsaW5l LiAqLworICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9wKQorICAgICAgICB7CisgICAgICAg ICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRf cCkKKyAgICAgICAgICAgICAgICB4X2RyYXdfdW5kZXJ3YXZlIChzKTsKKyAgICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2 OworICAgICAgICAgICAgICAgICAgWEdldEdDVmFsdWVzIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYp LCBzLT5nYywgR0NGb3JlZ3JvdW5kLCAmeGdjdik7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9y ZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIHMtPmZhY2UtPnVuZGVybGlu ZV9jb2xvcik7CisgICAgICAgICAgICAgICAgICB4X2RyYXdfdW5kZXJ3YXZlIChzKTsKKyAgICAg ICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBzLT5n YywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9Cisg ICAgICAgICAgZWxzZSBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9M SU5FKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHRoaWNrbmVz cywgcG9zaXRpb247CisgICAgICAgICAgICAgIGludCB5OworICAgICAgICAgICAgICBpZiAocy0+ cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfcAorICAgICAgICAgICAgICAgICAgJiYg cy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8qIFdlIHVzZSB0aGUgc2FtZSB1bmRlcmxp bmUgc3R5bGUgYXMgdGhlIHByZXZpb3VzIG9uZS4gKi8KKyAgICAgICAgICAgICAgICAgIHRoaWNr bmVzcyA9IHMtPnByZXYtPnVuZGVybGluZV90aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBw b3NpdGlvbiA9IHMtPnByZXYtPnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAvKiBHZXQgdGhlIHVuZGVybGluZSB0aGlja25lc3MuICBEZWZhdWx0IGlzIDEgcGl4ZWwuICov CisgICAgICAgICAgICAgICAgICBpZiAocy0+Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfdGhp Y2tuZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+Zm9udC0+dW5k ZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICAgICAgdGhpY2tuZXNzID0gMTsKKyAgICAgICAgICAgICAgICAgIGlmICh4X3VuZGVybGluZV9h dF9kZXNjZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhlaWdo dCAtIHRoaWNrbmVzcykgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIC8qIEdldCB0 aGUgdW5kZXJsaW5lIHBvc2l0aW9uLiAgVGhpcyBpcyB0aGUgcmVjb21tZW5kZWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICB2ZXJ0aWNhbCBvZmZzZXQgaW4gcGl4ZWxzIGZyb20gdGhlIGJhc2Vs aW5lIHRvIHRoZSB0b3Agb2YKKyAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgdW5kZXJsaW5l LiAgVGhpcyBpcyBhIHNpZ25lZCB2YWx1ZSBhY2NvcmRpbmcgdG8gdGhlCisgICAgICAgICAgICAg ICAgICAgICAgICAgc3BlY3MsIGFuZCBpdHMgZGVmYXVsdCBpcworICAgICAgICAgICAgICAgICAg ICAgICAgIFJPVU5EICgobWF4aW11bSBkZXNjZW50KSAvIDIpLCB3aXRoCisgICAgICAgICAgICAg ICAgICAgICAgICAgUk9VTkQoeCkgPSBmbG9vciAoeCArIDAuNSkgICovCisgICAgICAgICAgICAg ICAgICAgICAgaWYgKHhfdXNlX3VuZGVybGluZV9wb3NpdGlvbl9wcm9wZXJ0aWVzCisgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0 aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPmZvbnQtPnVu ZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChzLT5mb250 KQorICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+Zm9udC0+ZGVzY2VudCAr IDEpIC8gMjsKKyAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAg ICAgICBwb3NpdGlvbiA9IHVuZGVybGluZV9taW5pbXVtX29mZnNldDsKKyAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRl cmxpbmVfbWluaW11bV9vZmZzZXQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg LyogQ2hlY2sgdGhlIHNhbml0eSBvZiB0aGlja25lc3MgYW5kIHBvc2l0aW9uLiAgV2Ugc2hvdWxk CisgICAgICAgICAgICAgICAgIGF2b2lkIGRyYXdpbmcgdW5kZXJsaW5lIG91dCBvZiB0aGUgY3Vy cmVudCBsaW5lIGFyZWEuICovCisgICAgICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDw9 IHMtPnliYXNlICsgcG9zaXRpb24pCisgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVp Z2h0IC0gMSkgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBz LT5oZWlnaHQgPCBzLT55YmFzZSArIHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAg ICAgIHRoaWNrbmVzcyA9IChzLT55ICsgcy0+aGVpZ2h0KSAtIChzLT55YmFzZSArIHBvc2l0aW9u KTsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3RoaWNrbmVzcyA9IHRoaWNrbmVzczsKKyAg ICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Bvc2l0aW9uID0gcG9zaXRpb247CisgICAgICAgICAg ICAgIHkgPSBzLT55YmFzZSArIHBvc2l0aW9uOworICAgICAgICAgICAgICBpZiAocy0+ZmFjZS0+ dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUg KHMtPmYsIHMtPmdjLCBzLT54LCB5LCBzLT53aWR0aCwgdGhpY2tuZXNzKTsKKyAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4 Z2N2OworICAgICAgICAgICAgICAgICAgWEdldEdDVmFsdWVzIChGUkFNRV9YX0RJU1BMQVkgKHMt PmYpLCBzLT5nYywgR0NGb3JlZ3JvdW5kLCAmeGdjdik7CisgICAgICAgICAgICAgICAgICBYU2V0 Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIHMtPmZhY2UtPnVuZGVy bGluZV9jb2xvcik7CisgICAgICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBz LT5nYywgcy0+eCwgeSwgcy0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5nX2JveCAocyk7CisgICAgICBpZiAocy0+cHJldikKKyAgICAgICAg eworICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKnByZXY7CisgICAgICAgICAgZm9yIChw cmV2ID0gcy0+cHJldjsgcHJldjsgcHJldiA9IHByZXYtPnByZXYpCisgICAgICAgICAgICBpZiAo cHJldi0+aGwgIT0gcy0+aGwKKyAgICAgICAgICAgICAgICAmJiBwcmV2LT54ICsgcHJldi0+d2lk dGggKyBwcmV2LT5yaWdodF9vdmVyaGFuZyA+IHMtPngpCisgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAvKiBBcyBwcmV2IHdhcyBkcmF3biB3aGlsZSBjbGlwcGVkIHRvIGl0cyBvd24g YXJlYSwgd2UKKyAgICAgICAgICAgICAgICAgICBtdXN0IGRyYXcgdGhlIHJpZ2h0X292ZXJoYW5n IHBhcnQgdXNpbmcgcy0+aGwgbm93LiAqLworICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlw aHNfZmFjZSBzYXZlID0gcHJldi0+aGw7CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzLT5o bDsKKyAgICAgICAgICAgICAgICBtY194X3NldF9nbHlwaF9zdHJpbmdfZ2MgKHByZXYsIGN1cnNv cl9nY19wKTsKKyAgICAgICAgICAgICAgICB4X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhh Y3RseSAocywgcHJldik7CisgICAgICAgICAgICAgICAgaWYgKHByZXYtPmZpcnN0X2dseXBoLT50 eXBlID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5n X2ZvcmVncm91bmQgKHByZXYpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICAgIHhfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHByZXYpOworICAg ICAgICAgICAgICAgIHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChwcmV2LT5mLCBwcmV2LT5nYyk7 CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzYXZlOworICAgICAgICAgICAgICAgIHByZXYt Pm51bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKHMt Pm5leHQpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpuZXh0Owor ICAgICAgICAgIGZvciAobmV4dCA9IHMtPm5leHQ7IG5leHQ7IG5leHQgPSBuZXh0LT5uZXh0KQor ICAgICAgICAgICAgaWYgKG5leHQtPmhsICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgbmV4 dC0+eCAtIG5leHQtPmxlZnRfb3ZlcmhhbmcgPCBzLT54ICsgcy0+d2lkdGgpCisgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBuZXh0IHdpbGwgYmUgZHJhd24gd2hpbGUgY2xp cHBlZCB0byBpdHMgb3duIGFyZWEsCisgICAgICAgICAgICAgICAgICAgd2UgbXVzdCBkcmF3IHRo ZSBsZWZ0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwgbm93LiAqLworICAgICAgICAgICAgICAg IGVudW0gZHJhd19nbHlwaHNfZmFjZSBzYXZlID0gbmV4dC0+aGw7CisgICAgICAgICAgICAgICAg bmV4dC0+aGwgPSBzLT5obDsKKyAgICAgICAgICAgICAgICBtY194X3NldF9nbHlwaF9zdHJpbmdf Z2MgKG5leHQsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgICAgICB4X3NldF9nbHlwaF9zdHJp bmdfY2xpcHBpbmdfZXhhY3RseSAocywgbmV4dCk7CisgICAgICAgICAgICAgICAgaWYgKG5leHQt PmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB4X2Ry YXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQpOworICAgICAgICAgICAgICAgIGVsc2UK KyAgICAgICAgICAgICAgICAgIHhfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91 bmQgKG5leHQpOworICAgICAgICAgICAgICAgIHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChuZXh0 LT5mLCBuZXh0LT5nYyk7CisgICAgICAgICAgICAgICAgbmV4dC0+aGwgPSBzYXZlOworICAgICAg ICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgICAgbmV4dC0+Y2xp cF9oZWFkID0gcy0+bmV4dDsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICAv KiBSZXNldCBjbGlwcGluZy4gKi8KKyAgeF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKHMtPmYsIHMt PmdjKTsKKyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMg Ki8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIERlZmF1bHQgdG8gdXNpbmcgWElN IGlmIGF2YWlsYWJsZS4gICovCiAjaWZkZWYgVVNFX1hJTQogYm9vbCB1c2VfeGltID0gdHJ1ZTsK QEAgLTExMDksNiArMjAwNywxNiBAQCBzdGF0aWMgdm9pZAogeF91cGRhdGVfYmVnaW4gKHN0cnVj dCBmcmFtZSAqZikKIHsKICAgLyogTm90aGluZyB0byBkby4gICovCisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdf ZnJhbWUgPSBmOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIC8qIERyYXcg YSB2ZXJ0aWNhbCB3aW5kb3cgYm9yZGVyIGZyb20gKHgseTApIHRvICh4LHkxKSAgKi8KQEAgLTEy NTQsNiArMjE2MiwxNiBAQCB4X3VwZGF0ZV9lbmQgKHN0cnVjdCBmcmFtZSAqZikKICAgWEZsdXNo IChGUkFNRV9YX0RJU1BMQVkgKGYpKTsKICAgdW5ibG9ja19pbnB1dCAoKTsKICNlbmRpZgorCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYt Pm1jX3VwZGF0aW5nX2ZyYW1lID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogfQogCiAvKiBUaGlzIGZ1bmN0aW9uIGlzIGNhbGxlZCBmcm9tIHZhcmlvdXMgcGxhY2VzIGlu IHhkaXNwLmMKQEAgLTEzMjM4LDYgKzE0MTU2LDIwIEBAIGV4dGVybiBmcmFtZV9wYXJtX2hhbmRs ZXIgeF9mcmFtZV9wYXJtX2hhbmRsZXJzW107CiAKIHN0YXRpYyBzdHJ1Y3QgcmVkaXNwbGF5X2lu dGVyZmFjZSB4X3JlZGlzcGxheV9pbnRlcmZhY2UgPQogICB7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJm YWNlJyBpbiBgeHRlcm0uY2AgbXVzdCBiZSBpbiB0aGUgZXhhY3Qgc2FtZSBvcmRlciBhcyB0aGUK K2ByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4dGVybi5oYCEgKi8KKworICBtY194X2Ry YXdfd2luZG93X2N1cnNvciwKKyAgbWNfeF9kcmF3X2dseXBoX3N0cmluZywKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogICAgIHhfZnJhbWVfcGFybV9oYW5kbGVycywKICAgICBndWlf cHJvZHVjZV9nbHlwaHMsCiAgICAgZ3VpX3dyaXRlX2dseXBocywK --Multipart_Thu_Oct_17_18:12:35_2019-1--