From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Tue, 20 Nov 2018 20:53:56 -0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Tue_Nov_20_20:53:56_2018-1" X-Trace: blaine.gmane.org 1542776002 17596 195.159.176.226 (21 Nov 2018 04:53:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2018 04:53:22 +0000 (UTC) Cc: 17684@debbugs.gnu.org, 22873@debbugs.gnu.org To: Eli Zaretskii , Marcin Borkowski , Richard Stallman , John Wiegley , Akio Burns , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 21 05:53:21 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPKVn-0004MO-Bl for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Nov 2018 05:53:20 +0100 Original-Received: from localhost ([::1]:37204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPKXt-0000Tc-5B for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Nov 2018 23:55:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPKXf-0000Qb-QE for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 23:55:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPKXZ-0004So-QF for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 23:55:11 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPKXV-0004N9-Ur for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 23:55:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gPKXV-0007Vn-Mf for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 23:55:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Nov 2018 04:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.154277604728795 (code B ref 17684); Wed, 21 Nov 2018 04:55:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 21 Nov 2018 04:54:07 +0000 Original-Received: from localhost ([127.0.0.1]:37704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPKWd-0007UN-1a for submit@debbugs.gnu.org; Tue, 20 Nov 2018 23:54:07 -0500 Original-Received: from gateway21.websitewelcome.com ([192.185.45.36]:14671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPKWa-0007UH-QW for 17684@debbugs.gnu.org; Tue, 20 Nov 2018 23:54:05 -0500 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 19C1E400D8726 for <17684@debbugs.gnu.org>; Tue, 20 Nov 2018 22:54:01 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id PKWWgkznfBcCXPKWWgs5Ks; Tue, 20 Nov 2018 22:54:01 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JA7oqSYBqTlXttK75weSyLDbxvwnsm1hxG6bqK3FIio=; b=BJPWFuhOwBbOyVnejA8s+/FU4J P8CggoXzcPMXVmRwFrRs0ts8JCyLqz/4ZdDn5dpb+wPYcDkoPBBQhOFLhLR80mNhjGHc57t7IOJm5 YhtEndiRPS05eCTpD7ODq2xNMC1q9I0KS9lkOk9sQK3PNLu3wO4oPgyKudQnK7ouqwsjk8+PUNKb+ s1dxdmmS/Bz7VvjErGgwup+Xw9/Wd2JfRbu7KSWQOzucFjxcmPQHhd2F8DA0ekO5nlfsyGL9RySUD fi5U+U/rZ7Q54B9Ld9JlNAlxPcCvsGMdMr+wqGDXbspRne8DCS3wmR/W0SXgzewdH11MSMdIgz3hv FT0s1lkg==; Original-Received: from cpe-98-146-201-115.natnow.res.rr.com ([98.146.201.115]:38411 helo=MBP.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gPKWU-003vvV-Dx; Tue, 20 Nov 2018 22:53:59 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 98.146.201.115 X-Source-L: No X-Exim-ID: 1gPKWU-003vvV-Dx X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-98-146-201-115.natnow.res.rr.com (MBP.local) [98.146.201.115]:38411 X-Source-Auth: lawlist X-Email-Count: 2 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152616 Archived-At: --Multipart_Tue_Nov_20_20:53:56_2018-1 Content-Type: text/plain; charset=US-ASCII Version 016.000 [11/20/2018] CHANGELOG: - The area of code that prevented crosshairs and other fake cursors from working on MacOS Mojave has been fixed. - New Feature: This is the first implementation of a visible fill column using fake cursors, which has similar abilities to crosshairs; e.g., draw forthwith whenever the real cursor gets drawn; draw on an idle timer; fill column indicator in inactive/active windows have different colors; suppress display of fill column indicator in inactive windows (if so desired); color of the fill column indicator in active/inactive windows is a different color when the cursor is lined up with the fill column and crosshairs is active. Crosshairs incorporates the fill column indicator if the variable `+-fill-column' is non-nil; or, there is a separate minor-mode called `mc-fill-column-mode' (if so desired). - Floating horizontal ruler now increments by glyph->pixel_width instead of frame-char-width. [This avoids visible gaps.] - Multiple fake cursors can now be placed at the end of a line when there is no `buffer-display-table' entry for a visible EOL glyph. - Crosshairs now use the line height instead of the glyph height. [This avoids visible gaps in the vertical ruler of crosshairs.] - The border color for images with a fake cursor now match the fake cursor color. - With the gracious assistance of Eli Z., a test now exists for the situation when `draw_glyphs' redraws a tab stretch due to a subsequent character with a left overhang. Additional work needs to be done ... [infra]. - Only call `update_begin' / `update_end' when the frame was not already in the process of being updated. - Miscellaneous bug fixes. SETUP: Step 1: git clone -b master git://git.sv.gnu.org/emacs.git Step 2: In the new emacs folder, go back to an Emacs version from 11/16/2018: git reset --hard 644a308b4e1513e04be9360e1586e14b32ec0159 Step 3: From within the new emacs folder created in Step 1, apply the patch: git apply /path/to/the/11_20_2018__18_16_28_577.diff [There should not be any error messages at this point; i.e, you should be returned to a new command prompt.] Step 4: ./autogen.sh Step 5: ./configure ... [your custom options] Step 6: make Step 7: make install - To try out built-in fake cursors with Magnar Sveen's library (multiple-cursors), install that package first. [If the multiple-cursors package is installed, an eval-after-load "multiple-cursors-core" statement within crosshairs.el will redefine a couple of functions and set up a few keyboard shortcuts.] If the multiple-cursors package by Magnar Sveen is not already installed, then there are two easy ways to install that package: Type: M-x mc-install OR, evaluate the following snippet: (progn (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'multiple-cursors)) - To try out crosshairs and the visible fill column, type: M-x +-mode - To try out only the visible fill column, type: M-x mc-fill-column-mode - To learn how to use the multiple fake cursors feature, examine the interactive function `mc-test'. TODO: - Crosshairs in the inactive windows is causing cursors in the active windows to be erased (when the active window drew prior thereto). - Face of tab stretch gets extended to window edge on NS, but not on X11 or NT platforms: https://lists.gnu.org/archive/html/emacs-devel/2018-11/msg00316.html - Continue working on the section of code within `draw_glyphs' that is responsible for redrawing a stretch tab (erasing a fake cursor) when the next character has a left overhang. " A". A temporary fix has been instituted that simply bypasses the section of code at issue; however, the optimal solution will be to let `draw_glyphs' do its thing and then redraw the fake cursors along the stretch tab subsequent thereto. - Multiple Cursors: If point is in the middle of a composite character, then select a fully composed character so that the fake cursor is visible. - Fake cursors are being redrawn too often when non-selected visible windows have an ongoing process that require frequent redisplay updates (e.g., an eshell buffer. @lawlist may have already corrected the frequent redisplay issue as to mouse-overs, but will need to check this once again to be sure. --Multipart_Tue_Nov_20_20:53:56_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="11_20_2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ybWF0ICIlZCBhY3RpdmUgY3Vyc29ycy4gQ29udGludWU/ICIgKG1jL251bS1jdXJz b3JzKSkpCisgICAgICAgICAgICAoc2V0cSBtYy9tYXgtY3Vyc29ycyAocmVhZC1udW1iZXIgIkVu dGVyIGEgbmV3LCB0ZW1wb3JhcnkgbWF4aW11bTogIikpCisgICAgICAgICAgKG1jL3JlbW92ZS1m YWtlLWN1cnNvcnMpCisgICAgICAgICAgKGVycm9yICJBYm9ydGVkOiB0b28gbWFueSBjdXJzb3Jz IikpKSkKKyAgICAobGV0ICgob3ZlcmxheQorICAgICAgICAgICAgKGlmIG1jL3VzZS1idWlsdC1p bi1jdXJzb3JzCisgICAgICAgICAgICAgIChtYWtlLW92ZXJsYXkgKHBvaW50KSAocG9pbnQpKQor ICAgICAgICAgICAgICAobWMvbWFrZS1jdXJzb3Itb3ZlcmxheS1hdC1wb2ludCkpKSkKKyAgICAg IChvdmVybGF5LXB1dCBvdmVybGF5ICdtYy1pZCAob3IgaWQgKG1jL2NyZWF0ZS1jdXJzb3ItaWQp KSkKKyAgICAgIChvdmVybGF5LXB1dCBvdmVybGF5ICd0eXBlICdmYWtlLWN1cnNvcikKKyAgICAg IChvdmVybGF5LXB1dCBvdmVybGF5ICdwcmlvcml0eSAxMDApCisgICAgICAobWMvc3RvcmUtY3Vy cmVudC1zdGF0ZS1pbi1vdmVybGF5IG92ZXJsYXkpCisgICAgICAod2hlbiAodXNlLXJlZ2lvbi1w KQorICAgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncmVnaW9uLW92ZXJsYXkKKyAgICAgICAg ICAgICAgICAgICAgIChtYy9tYWtlLXJlZ2lvbi1vdmVybGF5LWJldHdlZW4tcG9pbnQtYW5kLW1h cmspKSkKKyAgICAgIG92ZXJsYXkpKQorCisgIChkZWZ1biBtYy9leGVjdXRlLXRoaXMtY29tbWFu ZC1mb3ItYWxsLWN1cnNvcnMtMSAoKQorICAgICJVc2VkIHdpdGggcG9zdC1jb21tYW5kLW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ICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29tbWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBv cmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAgICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBz eW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9yb3VnaAorICAgICAgICAgICAgICAgIChpZiAo Z2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAg ICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMi CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmlnaW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0 ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4gKGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0t ZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZh dWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvcHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hp dGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1 dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29ycyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAg ICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAg IChzZXRxIG11bHRpcGxlLWN1cnNvcnMtY29uZgorICAgICAgICAgICAgICAgICAgICAgICAgKG1h cGNhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmRhICh4KSAobGlzdCAob3Zlcmxh eS1zdGFydCB4KSAiYmFyIiBuaWwpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvYWxs LWZha2UtY3Vyc29ycykpKSkpKSkpKSkKKworICAoZGVmdW4gbWMvbWFyay1uZXh0LWxpa2UtdGhp cy1jeWNsZS1mb3J3YXJkICgpCisgICJNYXJrcyBuZXh0IG9jY3VyZW5jZSBvZiB3b3JkIGxpa2Ug dGhpcyBhbmQgYWR2YW5jZXMgY3Vyc29yIHRvIHRoaXMgb2NjdXJyZW5jZSIKKyAgKGludGVyYWN0 aXZlKQorICAgIChtYy9tYXJrLW5leHQtbGlrZS10aGlzIDEpKQorCisgIChkZWZ1biBtYy9tYXJr LXByZXZpb3VzLWxpa2UtdGhpcy1jeWNsZS1mb3J3YXJkICgpCisgICJNYXJrcyBuZXh0IG9jY3Vy cmVuY2Ugb2Ygd29yZCBsaWtlIHRoaXMgYW5kIGFkdmFuY2VzIGN1cnNvciB0byB0aGlzIG9jY3Vy cmVuY2UiCisgIChpbnRlcmFjdGl2ZSkKKyAgICAobWMvbWFyay1wcmV2aW91cy1saWtlLXRoaXMg MSkpCisKKyAgKGFkZC10by1saXN0ICdtYy0tZGVmYXVsdC1jbWRzLXR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Y2VzIGZvciB0aGUgdmVydGlj YWwgcnVsZXIuIgorICA6Z3JvdXAgJ2NvbnZlbmllbmNlKQorCisoZGVmZmFjZSArLWZvcm0tZmVl ZC1mYWNlCisgIChjb25kCisgICAgKChlcSBzeXN0ZW0tdHlwZSAnZGFyd2luKQorICAgICAgJygo dCAoOmZvcmVncm91bmQgIm1hZ2VudGEiKSkpKQorICAgICgoZXEgc3lzdGVtLXR5cGUgJ3dpbmRv d3MtbnQpCisgICAgICAnKCh0ICg6Zm9yZWdyb3VuZCAibWFnZW50YSIpKSkpKQorICAiRmFjZSBm b3IgYCstZm9ybS1mZWVkLWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICst bmV3bGluZS1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICIjNTU1NTU1IikpKQorICAiRmFjZSBm b3IgYCstbmV3bGluZS1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLXNw YWNlLWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgIkRhcmtSZWQiKSkpCisgICJGYWNlIGZvciBg Ky1zcGFjZS1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLXRhYi1mYWNl CisgICcoKHQgKDpmb3JlZ3JvdW5kICJjeWFuIikpKQorICAiRmFjZSBmb3IgYCstdGFiLWZhY2Un LiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstdGFiLXNwYWNlci1mYWNlCisgICco KHQgKDpiYWNrZ3JvdW5kICJncmV5MjUiKSkpCisgICJGYWNlIGZvciBgKy10YWItc3BhY2VyLWZh Y2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstbGVmdC1mcmluZ2UtY3VycmVu dC1saW5lLWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgImdyZWVuIikpKQorICAiRmFjZSBmb3Ig YCstbGVmdC1mcmluZ2UtY3Vycm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FRoZSBMaW5kZW4gU2NyaXB0aW5nIExhbmd1YWdlKS4KK2Buc3Rlcm0ubScg dXNlcyBgTlNDb2xvcicsIHdoaWNoIHdvcmtzIHdlbGwgd2l0aCBMU0wuICBgdzMydGVybS5jJyB1 c2VzCitgUEFMRVRURVJHQicgb3IgYFJHQicsIGFuZCB0aGUgY29udmVyc2lvbiBmcm9tIExTTCBp cyBkb25lIGludGVybmFsbHkgYnkKK211bHRpcGx5aW5nIGVhY2ggZWxlbWVudCBvZiB0aGUgTFNM IGNvbG9yIHZlY3RvciBieSAyNTUuICBgeHRlcm0uYycgdXNlcworYHhfbWFrZV90cnVlY29sb3Jf cGl4ZWwnLCB3aGljaCB1c2VzIDE2LWJpdCBSR0IgLS0gdGhlIGNvbnZlcnNpb24gZnJvbSBMU0wK K2hhcHBlbnMgaW50ZXJuYWxseSBieSBtdWx0aXBseWluZyBlYWNoIGVsZW1lbnQgb2YgdGhlIExT TCBjb2xvciB2ZWN0b3IgYnkgNjU1MzUuIgorKGludGVyYWN0aXZlKQorICAobGV0ICgoYnVmZmVy IChnZXQtYnVmZmVyLWNyZWF0ZSAiKk1DLVRFU1QqIikpKQorICAgICh3aXRoLWN1cnJlbnQtYnVm ZmVyIGJ1ZmZlcgorICAgICAgKGVyYXNlLWJ1ZmZlcikKKyAgICAgIChpbnNlcnQgIlRoaXMgaXMg YSB0ZXN0ISIpCisgICAgICAoc2V0cSBtdWx0aXBsZS1jdXJzb3JzLWNvbmYgJygoMSAiaGJhciIg Im1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDIgImJhciIg InB1cnBsZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyAiYm94IiAi IzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93 IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSAoImhi YXIi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xlY3RlZC13aW5kb3cpKSkpKQorCisoZGVmdW4g Ky1kcmF3LWZvcnRod2l0aCAoKQorICAiRm9yY2UgYm90aCBydWxlcnMgdG8gYmUgZHJhd24vcmVk cmF3bi4iCisgICgrLWRyYXctY3Jvc3NoYWlycyAnZm9yY2UpKQorCisoZGVmdW4gKy1kcmF3LWNy b3NzaGFpcnMgKCZvcHRpb25hbCBmb3JjZSkKKyAgKHdoZW4gKy1tb2RlCisgICAgKHdoZW4gKy10 aW1lci12YXIKKyAgICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVscSArLXRpbWVyLXZhciB0 aW1lci1pZGxlLWxpc3QpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgbmlsKSkKKyAgICAodW5s ZXNzIChtZW1xIHRoaXMtY29tbWFuZCArLXBhcmVucy1leGNsdXNpb25zKQorICAgICAgKCstZGVs ZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisgICAgICAocHJvZ24KKyAgICAg ICAgKCstcGFyZW5zLWZuKQorICAgICAgICAodW5sZXNzIGNyb3NzaGFpcnMtZHJhdy1mb3J0aHdp dGgKKyAgICAgICAgICAobWMtYWN0aXZhdGUtY3Jvc3NoYWlycyAoc2VsZWN0ZWQtd2luZG93KSkp CisgICAgICAgICh3aGVuIChhbmQgKy1maWxsLWNvbHVtbiAobnVsbCBtYy1maWxsLWNvbHVtbi1k cmF3LWZvcnRod2l0aCkpCisgICAgICAgICAgKG1jLWFjdGl2YXRlLWZpbGwtY29sdW1uIChzZWxl Y3RlZC13aW5kb3cpKSkpCisgICAgICAoc2V0cSArLXRpbWVyLXZhciAocnVuLXdpdGgtaWRsZS10 aW1lciArLWlkbGUtdGltZXItc2Vjb25kcyBuaWwgIycrLXRpbWVyLWZuKSkpKSkKKworOzs7IyMj YXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJNaW5vciBtb2RlIGZvciBkaXNw bGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZhbHVlIG5pbAorICA6bGlnaHRl ciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91cCAnKy1tb2RlCisg IChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUnIGhhcyB0aGUgYWJpbGl0eSB0 byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3IuCisgICAgICA7OzsgU2VlIHRo ZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hlbiBtYy1maWxsLWNvbHVtbi1t b2RlCisgICAgICAgIChtYy1maWxsLWNvbHVtbi1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQg Z2xvYmFsLWVsZG9jLW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5 LXAgJ2FueSkKKyAgICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQp KSkKKyAgICAgICAgKGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0 LWxvY2stY29udGV4dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAg ICAgICAgKGNhbmNlbC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsg KHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3Jl cGVhdCAnaml0LWxvY2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2st Y29udGV4dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRp bWVyKQorICAgICAgICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnkt dGltZXIpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAg ICAgICAgICAgKGxhbWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hh bmdlZC1idWZmZXJzIChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0 by1hbWFsZ2FtYXRlICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAg ICAgICAgKGJsaW5rLWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmst Y3Vyc29yLWNoZWNrIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAn cG9zdC1jb21tYW5kLWhvb2sgJ2JsaW5rLWN1cnNvci1jaGVjaykpKQorICAgICAgKHdoZW4gKGFu ZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwg Y3VycmVudC1wcmVmaXgtYXJnICcoNCkpCisgICAgICAgICAgICAgICAgIChudWxsIGNyb3NzaGFp cnMtZHJhdy1mb3J0aHdpdGgpKQorICAgICAgICAoc2V0cSBjcm9zc2hhaXJzLWRyYXctZm9ydGh3 aXRoIHQpKQorICAgICAgKHNldHEgY3Jvc3NoYWlycyB0KQorICAgICAgKHdoZW4gKy1maWxsLWNv bHVtbgorICAgIC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yAnKDQpKSkKKyAgICAgICAgKHNldCAobWFr ZS1sb2NhbC12YXJpYWJsZSAnKy0tc2F2ZWQtc3RhdGUpIG5pbCkKKyAgICAgICAgKGRvbGlzdCAo dmFyICcoYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAgICAgICAgICAgICAgICAgICAgZnJpbmdl LWluZGljYXRvci1hbGlzdAorICAgICAgICAgICAgICAgICAgICAgICB0YWItd2lkdGgKKyAgICAg ICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3VhbAorICAgICAgICAgICAgICAgICAgICAg ICB0cnVuY2F0ZS1saW5lcworICAgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1wYXJ0aWFs LXdpZHRoLXdpbmRvd3MKKyAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwKSkKKyAgICAg ICAgICAod2hlbiAobG9jYWwtdmFyaWFibGUtcCB2YXIpCisgICAgICAgICAgICAocHVzaCAoY29u cyB2YXIgKHN5bWJvbC12YWx1ZSB2YXIpKSArLS1zYXZlZC1zdGF0ZSkpKQorICAgICAgICAoc2V0 cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkK KyAgICAgICAgKHNldHEtbG9jYWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJlbnQtbGluZSkKKyAg ICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAgIChzZXRxIGJ1ZmZlci1k aXNwbGF5LXRhYmxlICstYnVmZmVyLWRpc3BsYXktdGFibGUpCisgICAgICAgIChzZXRxIHRhYi13 aWR0aCA0KQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlz dWFsKSB0KQorICAgICAgICAoc2V0cSB0cnVuY2F0ZS1saW5lcworICAgICAgICAgIChjb25kCisg ICAgICAgICAgICAoKGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisg ICAgICAgICAgICAgICAgICAgIG1vZGUpCisgICAgICAgICAgICAgIChjYXRjaCAnZm91bmQKKyAg ICAgICAgICAgICAgICAod2hpbGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAg ICAgICAod2hlbiAoZGVyaXZlZC1tb2RlLXAgbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgKHRo cm93ICdmb3VuZCB0KSkpKSkpCisgICAgICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVu Y2F0ZS1saW5lcy1tYWpvci1tb2RlcykpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAg IG5pbCkpKQorICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0 aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkKKyAgICAgICAgKHNldHEgd29yZC13cmFwIHQpCisgICAg ICAgIChzZXRxIGluZGljYXRlLWVtcHR5LWxpbmVzIHQpCisgICAgICAgIChzZXRxIGluZGljYXRl LWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAgICAgICAoc2V0cSBmcmluZ2UtaW5kaWNhdG9y LWFsaXN0CisgICAgICAgICAgICA7OzsgaHNjbF9hbGxfdGVtcF9wIHwgaHNjbF90ZW1wX3AKKyAg ICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1sZWZ0CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1kb3VibGUtYW5nbGUtbGVmdCkpCisgICAgICAgICAgICA7Ozsg aHNjbF9hbGxfcGVybV8wX3AgfCBoc2NsX2FsbF9wZXJtXzFfcCB8IGhzY2xfYWxsX3Blcm1fMl9w IHwgaHNjbF9wZXJtX3AKKyAgICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNpbmdsZS1hbmds ZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLXVwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKy10cmlwbGUtYW5nbGUtdXAKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgICAoKy1vdmVy bGF5LWFycm93IC4gKCstZnJpbmdlLWxlZnQtYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKHRydW5jYXRpb24g LiAoKy1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmlu Z2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKGNvbnRpbnVhdGlvbiAuICgrLWZyaW5nZS1s ZWZ0LWN1cmx5LWFycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNo KSkKKyAgICAgICAgICAgIChvdmVybGF5LWFycm93IC4gKy1mcmluZ2UtcmlnaHQtdHJpYW5nbGUp CisgICAgICAgICAgICAodXAgLiArLWZyaW5nZS11cC1hcnJvdykKKyAgICAgICAgICAgIChkb3du IC4gKy1mcmluZ2UtZG93bi1hcnJvdykKKyAgICAgICAgICAgICh0b3AgLiArLWZyaW5nZS10b3At bGVmdC1hbmdsZSkKKyAgICAgICAgICAgIChib3R0b20gLiArLWZyaW5nZS1ib3R0b20tcmlnaHQt YW5nbGUpCisgICAgICAgICAgICAodG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWJyYWNrZXQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXRvcC1yaWdodC1hbmdsZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgICAg KGVtcHR5LWxpbmUgLiArLWZyaW5nZS1lbXB0eS1saW5lKQorICAgICAgICAgICAgKHVua25vd24g LiArLWZyaW5nZS1xdWVzdGlvbi1tYXJrKSkpCisgICAgICAgIChzZXRxIGZyaW5nZS1jdXJzb3It YWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVmdC10cmlhbmdsZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChob2xsb3cgLiArLWhvbGxvdy1yZWN0YW5nbGUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYmFyIC4gKy12ZXJ0aWNhbC1iYXIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGJhciAuICstZnJpbmdlLWhvcml6b250 YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdy1zbWFs bCAuICstZnJpbmdlLWhvbGxvdy1zcXVhcmUpKSkKKyAgICAgICAgKGlmIGNyb3NzaGFpcnMtZHJh dy1mb3J0aHdpdGgKKyAgICAgICAgICAoYWRkLWhvb2sgJ3Bvc3QtY29tbWFuZC1ob29rICcrLWRy YXctZm9ydGh3aXRoICdhcHBlbmQgJ2xvY2FsKQorICAgICAgICAgIChhZGQtaG9vayAncG9zdC1j b21tYW5kLWhvb2sgJystZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICAg KHdoZW4gY3Jvc3NoYWlycy1kcmF3LWZvcnRod2l0aAorICAgICAgICAgIChhZGQtaG9vayAnd2lu ZG93LWNvbmZpZ3VyYXRpb24tY2hhbmdlLWhvb2sgJystZHJhdy1mb3J0aHdpdGggbmlsICdsb2Nh bCkpCisgICAgICAgIChhZGQtaG9vayAnY2hhbmdlLW1ham9yLW1vZGUtaG9vayAndHVybi1vZmYt Ky1tb2RlIG5pbCAnbG9jYWwpKQorICAgICAgKHdoZW4gKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAg J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GVuaW5nIHBhcmVudGhlc2lzCisgICAgICAgICAgICAgICAgICAgICAgICg9 IG9jaGFyIDQwKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDkx KSA9PiBvcGVuaW5nIHNxdWFyZSBicmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICg9IG9j aGFyIDkxKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyMykg PT4gb3BlbmluZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIg MTIzKSkpCisgICAgICAgICAgICAgICAgKG1pbiAoMSsgb3BvaW50KSAocG9pbnQtbWF4KSkpCisg ICAgICAgICAgICAgKChvciA7OzsgKGNoYXItdG8tc3RyaW5nIDQxKSA9PiBjbG9zaW5nIHBhcmVu dGhlc2lzCisgICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKKyAgICAgICAg ICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTMpID0+IGNsb3Npbmcgc3F1YXJlIGJyYWNr ZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDkzKQorICAgICAgICAgICAg ICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFja2V0Cisg ICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciAxMjUpKQorICAgICAgICAgICAgICAg IChtYXggKHBvaW50LW1pbikgKDEtIG9wb2ludCkpKQorICAgICAgICAgICAgICh0CisgICAgICAg ICAgICAgICAgb3BvaW50KSkpCisgICAgICAgICBwb3MyCisgICAgICAgICBzZWxlY3RlZC1mYWNl KQorICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgKGNvbmRpdGlvbi1jYXNlIG5pbAorICAgICAg ICAod2hpbGUgKHNldHEgcG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9tIHBvczEp KSkKKyAgICAgICAgICAoc2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEgMSkpCisgICAgICAgICAg KGlmICg9IGkgMTApCisgICAgICAgICAgICAoc2V0cSBpIDEpCisgICAgICAgICAgICAoc2V0cSBp ICgxKyBpKSkpCisgICAgICAgICAgKHNldHEgc2VsZWN0ZWQtZmFjZSAoY29uZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1vbmUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKCg9IGkgMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJl bnMtdHdvLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDMpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXRocmVlLWZhY2UpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDQpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJystcGFyZW5zLWZvdXItZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZml2ZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA2KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zaXgt ZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtc2V2ZW4tZmFjZSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgOCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAnKy1wYXJlbnMtZWlnaHQtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKCg9IGkgOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtbmluZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAx MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGVuLWZhY2Up KSkKKyAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBwb3MxKSkpKQor ICAgICAgICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAg ICAgIChvdmVybGF5LXB1dCBvdiAnd2luZG93IHdpbikpCisgICAgICAgICAgICAob3ZlcmxheS1w dXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpCisgICAgICAgICAgKHdoZW4gcG9zMgorICAgICAg ICAgICAgKGxldCAoKG92IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIpKSkKKyAgICAgICAg ICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAgICAg KG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0 IG92ICdmYWNlIHNlbGVjdGVkLWZhY2UpKSkpCisgICAgICAgIChlcnJvciBuaWwpKSkKKyAgICAo c2V0cSArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wIHQpKSkKKworKGRlZnVuICstcmVtb3ZlLW92 ZXJsYXlzIChiZWcgZW5kIG5hbWUgdmFsKQorIlJlbW92ZSB0aGUgb3ZlcmxheXMgdGhhdCBhcmUg YGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzYC4KK0luY2x1ZGVzIGEgdW5pcXVlIHNpdHVhdGlv biB3aGVuIGFuIG92ZXJsYXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVydHkKK2lzIGF0 IHRoZSB2ZXJ5IGVuZCBvZiBhIG5hcnJvd2VkLWJ1ZmZlci4iCisgIChsZXQqICgocG9pbnQtbWF4 IChwb2ludC1tYXgpKQorICAgICAgICAgKHBvaW50LW1pbiAocG9pbnQtbWluKSkKKyAgICAgICAg IChuYXJyb3dlZC1wIChidWZmZXItbmFycm93ZWQtcCkpCisgICAgICAgICAoYmVnIChpZiBiZWcg YmVnIHBvaW50LW1pbikpCisgICAgICAgICAoZW5kCisgICAgICAgICAgIChjb25kCisgICAgICAg ICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAg ICAgICAgICBlbmQpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAg ICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICAobnVsbCBl bmQpKQorICAgICAgICAgICAgICAgcG9pbnQtbWF4KQorICAgICAgICAgICAgICgoYW5kCisgICAg ICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAgICAgICAg ICAgICAgICg8IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgZW5kKQorICAgICAgICAg ICAgICgoYW5kCisgICAgICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAg ZW5kCisgICAgICAgICAgICAgICAgICg9IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAg KDErIGVuZCkpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQt cAorICAgICAgICAgICAgICAgICAobnVsbCBlbmQpKQorICAgICAgICAgICAgICAgKDErIHBvaW50 LW1heCkpICkpCisgICAgICAgICAob3ZlcmxheXMKKyAgICAgICAgICAgKHByb2duCisgICAgICAg ICAgICAgKG92ZXJsYXktcmVjZW50ZXIgZW5kKQorICAgICAgICAgICAgIChvdmVybGF5cy1pbiBi ZWcgZW5kKSkpKQorICAgICh3aGVuIChhbmQgYmVnIGVuZCBuYW1lIHZhbCkKKyAgICAgIChkb2xp c3QgKG8gb3ZlcmxheXMpCisgICAgICAgIChjb25kCisgICAgICAgICAgKChhbmQgKGVxIG5hbWUg J2ZhY2UpCisgICAgICAgICAgICAgICAgKGVxIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisg ICAgICAgICAgICA7OyBFaXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0c2lkZSBiZWcuLi5lbmQK KyAgICAgICAgICAgIDs7IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCisgICAgICAg ICAgICA7OyBvciBkZWxldGUgaXQgZW50aXJlbHkgKGlmIGl0IGlzIGNvbnRhaW5lZCBpbiBiZWcu Li5lbmQpLgorICAgICAgICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAg ICAgICAgICAgICAoaWYgKD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKKyAgICAgICAgICAgICAgKHBy b2duCisgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5IG8pCisgICAg ICAgICAgICAgICAgICAob3ZlcmxheS1zdGFydCBvKSBiZWcpCisgICAgICAgICAgICAgICAgKG1v dmUtb3ZlcmxheSBvIGVuZCAob3ZlcmxheS1lbmQgbykpKQorICAgICAgICAgICAgICAgICAgKG1v dmUtb3ZlcmxheSBvIChvdmVybGF5LXN0YXJ0IG8pIGJlZykpCisgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBv IGVuZCAob3ZlcmxheS1lbmQgbykpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVybGF5IG8p KSkpCisgICAgICAgICAgKChhbmQgKG5vdCAoZXEgbmFtZSAnZmFjZSkpCisgICAgICAgICAgICAg ICAgKGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkp CisgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkpKSkKKworKGRlZnVuICstZGVsZXRl LXBhcmVucy1vdmVybGF5cyAoKQorICAod2hlbiArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wCisg ICAgKGRvbGlzdCAoZmFjZSAnKCstcGFyZW5zLW9uZS1mYWNlCisgICAgICAgICAgICAgICAgICAg ICstcGFyZW5zLXR3by1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRocmVlLWZh Y2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZm91ci1mYWNlCisgICAgICAgICAgICAg ICAgICAgICstcGFyZW5zLWZpdmUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1z aXgtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1zZXZlbi1mYWNlCisgICAgICAg ICAgICAgICAgICAgICstcGFyZW5zLWVpZ2h0LWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1w YXJlbnMtbmluZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRlbi1mYWNlKSkK KyAgICAgICgrLXJlbW92ZS1vdmVybGF5cyBuaWwgbmlsICdmYWNlIGZhY2UpKQorICAgIChzZXRx ICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAgbmlsKSkpCisKKzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7OworCis7OzsgQVVUSE9SOiAgTm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YWwgbmlsCisgIDpncm91cCAnbWMt ZmlsbC1jb2x1bW4tbW9kZQorICAoY29uZAorICAgIDs7OyBgKy1tb2RlJyBoYXMgdGhlIGFiaWxp dHkgdG8gYWxzbyBkaXNwbGF5IGEgZmlsbCBjb2x1bW4gaW5kaWNhdG9yLgorICAgIDs7OyBTZWUg dGhlIHZhcmlhYmxlIGArLWZpbGwtY29sdW1uJy4KKyAgICAoKGFuZCBtYy1maWxsLWNvbHVtbi1t b2RlICstbW9kZSkKKyAgICAgIChzZXRxIG1jLWZpbGwtY29sdW1uLW1vZGUgbmlsKQorICAgICAg KG1lc3NhZ2UgIlR1cm5lZCBPRkYgYG1jLWZpbGwtY29sdW1uLW1vZGUnICglcykgLS0gc2VlIHRo ZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkKKyAgICAobWMt ZmlsbC1jb2x1bW4tbW9kZQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAg ICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVs ZG9jLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisg ICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGpp dC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0 LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0 LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisg ICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNl bC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0 ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChh ZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQt YnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkp CisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1v ZGUgLTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21t YW5kLWhvb2spCisgICAgICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxp bmstY3Vyc29yLWNoZWNrKSkpCisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVs eS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0 KSkKKyAgICAgICAgICAgICAgICAgKG51bGwgbWMtZmlsbC1jb2x1bW4tZHJhdy1mb3J0aHdpdGgp KQorICAgICAgICAoc2V0cSBtY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XN0IG5pbCkpCi0JICAgKDp3aWR0aAor CSAgIChgOndpZHRoCiAJICAgIChtYXBjYXIgIycobGFtYmRhICh4KSAoY29ucyAoc3ltYm9sLW5h bWUgKGFyZWYgeCAxKSkgKGFyZWYgeCAxKSkpCiAJCSAgICBmb250LXdpZHRoLXRhYmxlKSkKLSAg ICAgICAgICAgKDp3ZWlnaHQKKyAgICAgICAgICAgKGA6d2VpZ2h0CiAJICAgIChtYXBjYXIgIyco bGFtYmRhICh4KSAoY29ucyAoc3ltYm9sLW5hbWUgKGFyZWYgeCAxKSkgKGFyZWYgeCAxKSkpCiAJ CSAgICBmb250LXdlaWdodC10YWJsZSkpCi0JICAgKDpzbGFudAorCSAgIChgOnNsYW50CiAJICAg IChtYXBjYXIgIycobGFtYmRhICh4KSAoY29ucyAoc3ltYm9sLW5hbWUgKGFyZWYgeCAxKSkgKGFy ZWYgeCAxKSkpCiAJCSAgICBmb250LXNsYW50LXRhYmxlKSkKLQkgICAoOmludmVyc2UtdmlkZW8K KwkgICAoYDppbnZlcnNlLXZpZGVvCiAJICAgIChtYXBjYXIgIycobGFtYmRhICh4KSAoY29ucyAo c3ltYm9sLW5hbWUgeCkgeCkpCiAJCSAgICAoaW50ZXJuYWwtbGlzcC1mYWNlLWF0dHJpYnV0ZS12 YWx1ZXMgYXR0cmlidXRlKSkpCi0gICAgICAgICAgICgob3IgOnVuZGVybGluZSA6b3ZlcmxpbmUg OnN0cmlrZS10aHJvdWdoIDpib3gpCisgICAgICAgICAgICgob3IgYDp1bmRlcmxpbmUgYDpvdmVy bGluZSBgOnN0cmlrZS10aHJvdWdoIGA6Ym94KQogICAgICAgICAgICAgKGlmICh3aW5kb3ctc3lz dGVtIGZyYW1lKQogICAgICAgICAgICAgICAgIChuY29uYyAobWFwY2FyICMnKGxhbWJkYSAoeCkg KGNvbnMgKHN5bWJvbC1uYW1lIHgpIHgpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChpbnRlcm5hbC1saXNwLWZhY2UtYXR0cmlidXRlLXZhbHVlcyBhdHRyaWJ1dGUpKQpAQCAtMTEx MiwxMiArMTExMiwxMiBAQCBhbiBpbnRlZ2VyIHZhbHVlLiIKICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoZGVmaW5lZC1jb2xvcnMgZnJhbWUpKSkKIAkgICAgICAobWFwY2FyICMnKGxh bWJkYSAoeCkgKGNvbnMgKHN5bWJvbC1uYW1lIHgpIHgpKQogCQkgICAgICAoaW50ZXJuYWwtbGlz cC1mYWNlLWF0dHJpYnV0ZS12YWx1ZXMgYXR0cmlidXRlKSkpKQotICAgICAgICAgICAoKG9yIDpm b3JlZ3JvdW5kIDpiYWNrZ3JvdW5kKQorICAgICAgICAgICAoKG9yIGA6Zm9yZWdyb3VuZCBgOmJh Y2tncm91bmQpCiAgICAgICAgICAgICAobWFwY2FyICMnKGxhbWJkYSAoYykgKGNvbnMgYyBjKSkK ICAgICAgICAgICAgICAgICAgICAgKGRlZmluZWQtY29sb3JzIGZyYW1lKSkpCi0gICAgICAgICAg ICg6aGVpZ2h0CisgICAgICAgICAgIChgOmhlaWdodAogICAgICAgICAgICAgJ2ludGVnZXJwKQot ICAgICAgICAgICAoOnN0aXBwbGUKKyAgICAgICAgICAgKGA6c3RpcHBsZQogICAgICAgICAgICAg KGFuZCAobWVtcSAod2luZG93LXN5c3RlbSBmcmFtZSkgJyh4IG5zKSkgOyBObyBzdGlwcGxlIG9u IHczMgogICAgICAgICAgICAgICAgICAobWFwY2FyICMnbGlzdAogICAgICAgICAgICAgICAgICAg ICAgICAgIChhcHBseSAjJ25jb25jCkBAIC0xMTI2LDcgKzExMjYsNyBAQCBhbiBpbnRlZ2VyIHZh bHVlLiIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZp bGUtZGlyZWN0b3J5LXAgZGlyKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoZGlyZWN0b3J5LWZp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fZHJhd19mb3J0aHdpdGggKCZidWZmZXJfZGVmYXVs dHMsIFFuaWwpOworICBic2V0X2Jsdl9jcm9zc2hhaXJzX2luYWN0aXZlX3dpbmRvd3MgKCZidWZm ZXJfZGVmYXVsdHMsIFF0KTsKKyAgYnNldF9ibHZfbWNfc3RkZXJyICgmYnVmZmVyX2RlZmF1bHRz LCBRbmlsKTsKKyAgYnNldF9ibHZfbWNfZmlsbF9jb2x1bW4gKCZidWZmZXJfZGVmYXVsdHMsIFFu aWwpOworICBic2V0X2Jsdl9tY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aCAoJmJ1ZmZlcl9k ZWZhdWx0cywgUW5pbCk7CisgIGJzZXRfYmx2X21jX2ZpbGxfY29sdW1uX2luYWN0aXZlX3dpbmRv d3MgKCZidWZmZXJfZGVmYXVsdHMsIFF0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICBic2V0X21vZGVfbGluZV9mb3JtYXQgKCZidWZmZXJfZGVmYXVsdHMsIGJ1aWxkX3B1cmVf Y19zdHJpbmcgKCIlLSIpKTsKICAgYnNldF9oZWFkZXJfbGluZV9mb3JtYXQgKCZidWZmZXJfZGVm YXVsdHMsIFFuaWwpOwogICBic2V0X2FiYnJldl9tb2RlICgmYnVmZmVyX2RlZmF1bHRzLCBRbmls KTsKQEAgLTU0MTYsNiArNTQ2MCwyNyBAQCBzeW1zX29mX2J1ZmZlciAodm9pZCkKICAgc3RhdGlj cHJvICgmUVNGdW5kYW1lbnRhbCk7CiAgIHN0YXRpY3BybyAoJlZidWZmZXJfYWxpc3QpOwogCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIERF RlNZTSAoUW1jX3JlYWxfZmF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RvdyIpOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgIERFRlNZTSAoUWNob2ljZSwgImNob2ljZSIpOwogICBERUZT WU0gKFFsZWZ0LCAibGVmdCIpOwogICBERUZTWU0gKFFyaWdodCwgInJpZ2h0Iik7CkBAIC01NDUz LDYgKzU1MTgsNjUgQEAgc3ltc19vZl9idWZmZXIgKHZvaWQpCiAgIEZwdXQgKFFwcm90ZWN0ZWRf ZmllbGQsIFFlcnJvcl9tZXNzYWdlLAogCWJ1aWxkX3B1cmVfY19zdHJpbmcgKCJBdHRlbXB0IHRv IG1vZGlmeSBhIHByb3RlY3RlZCBmaWVsZCIpKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBERUZWQVJfUEVSX0JVRkZFUiAoIm1jLXJl YWwtZmFrZS1jdXJzb3IiLCAmQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3JlYWxfZmFrZV9jdXJz b3IpLCBRbmlsLAorICAgIGRvYzogLyogQSBidWZlci1sb2NhbCB2YXJpYWJsZSB0byBzZXQgdGhl IGN1cnNvciB0eXBlIG9mIHRoZSByZWFsIGZha2UgY3Vyc29yLiAqLyk7CisKKyAgREVGVkFSX1BF Ul9CVUZGRVIgKCJtdWx0aXBsZS1jdXJzb3JzLWNvbmYiLCAmQlZBUiAoY3VycmVudF9idWZmZXIs IG11bHRpcGxlX2N1cnNvcnNfY29uZiksIFFuaWwsCisgICAgZG9jOiAvKiBBIGJ1ZmVyLWxvY2Fs IHZhcmlhYmxlIHRvIHN0b3JlIHRoZSB2YWx1ZSBvZiB0aGUgbXVsdGlwbGUgY3Vyc29ycyB0byBi ZSBkaXNwbGF5ZWQKK2R1cmluZyB0a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biBhbiBpZGxlLXRpbWVy LiAqLworICBMaXNwX09iamVjdCBtY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aF87CisKKyAg LyogV2hldGhlciB0byBkcmF3IG11bHRpcGxlIGN1cnNvcnMgZmlsbCBjb2x1bW4gaW4gaW5hY3Rp dmUgd2luZG93cy4gKi8KKyAgTGlzcF9PYmplY3QgbWNfZmlsbF9jb2x1bW5faW5hY3RpdmVfd2lu ZG93c187CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogSWYgdGhlIHdpZHRo IHJ1biBjYWNoZSBpcyBlbmFibGVkLCB0aGlzIHRhYmxlIGNvbnRhaW5zIHRoZQogICAgICBjaGFy YWN0ZXIgd2lkdGhzIHdpZHRoX3J1bl9jYWNoZSAoc2VlIGFib3ZlKSBhc3N1bWVzLiAgV2hlbiB3 ZQogICAgICBkbyBhIHRob3JvdWdoIHJlZGlzcGxheSwgd2UgY29tcGFyZSB0aGlzIGFnYWluc3Qg dGhlIGJ1ZmZlcidzCkBAIC03OTIsOSArODM4LDE3IEBAIHN0cnVjdCBidWZmZXIKICAgICAgZm9y IGEgYnVmZmVyLWxvY2FsIHZhcmlhYmxlIGlzIHN0b3JlZCBpbiB0aGF0IHZhcmlhYmxlJ3Mgc2xv dAogICAgICBpbiBidWZmZXJfbG9jYWxfZmxhZ3MgYXMgYSBMaXNwIGludGVnZXIuICBJZiB0aGUg aW5kZXggaXMgLTEsCiAgICAgIHRoaXMgbWVhbnMgdGhlIHZhcmlhYmxlIGlzIGFsd2F5cyBsb2Nh bCBpbiBhbGwgYnVmZmVycy4gICovCi0jZGVmaW5lIE1BWF9QRVJfQlVGRkVSX1ZBUlMgNTAKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworI2Rl ZmluZSBNQVhfUEVSX0JVRkZFUl9WQVJTIDYwCiAgIGNoYXIgbG9jYWxfZmxhZ3NbTUFYX1BFUl9C VUZGRVJfVkFSU107CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogU2V0IHRv IHRoZSBtb2R0aW1lIG9mIHRoZSB2aXNpdGVkIGZpbGUgd2hlbiByZWFkIG9yIHdyaXR0ZW4uCiAg ICAgIG1vZHRpbWUudHZfbnNlYyA9PSBOT05FWElTVEVOVF9NT0RUSU1FX05TRUNTIG1lYW5zCiAg ICAgIHZpc2l0ZWQgZmlsZSB3YXMgbm9uZXhpc3RlbnQuICBtb2R0aW1lLnR2X25zZWMgPT0KQEAg LTg5Niw2ICs5NTAsOTIgQEAgWEJVRkZFUiAoTGlzcF9PYmplY3QgYSkKIC8qIE1vc3QgY29kZSBz aG91bGQgdXNlIHRoZXNlIGZ1bmN0aW9ucyB0byBzZXQgTGlzcCBmaWVsZHMgaW4gc3RydWN0CiAg ICBidWZmZXIuICAoU29tZSBzZXR0ZXJzIHRoYXQgYXJlIHByaXZhdGUgdG8gYSBzaW5nbGUgLmMg ZmlsZSBhcmUKICAgIGRlZmluZWQgYXMgc3RhdGljIGluIHRob3NlIGZpbGVzLikgICovCisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKK0lOTElO RSB2b2lkCitic2V0X2Jsdl9tY19yZWFsX2Zha2VfY3Vyc29yIChzdHJ1Y3QgYnVmZmVyICpiLCBM aXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX3JlYWxfZmFrZV9jdXJzb3JfID0gdmFsOworfQor CitJTkxJTkUgdm9pZAorY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Rod2l0aCAoc3RydWN0IGJ1ZmZl ciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hhaXJzX2RyYXdfZm9ydGh3aXRo XyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2X2Nyb3NzaGFpcnNfaW5hY3RpdmVf d2luZG93cyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9z c2hhaXJzX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9i bHZfbWNfc3RkZXJyIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGIt Pm1jX3N0ZGVycl8gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19maWxsX2Nv bHVtbiAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5tY19maWxs X2NvbHVtbl8gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19maWxsX2NvbHVt bl9kcmF3X2ZvcnRod2l0aCAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQorewor ICBiLT5tY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aF8gPSB2YWw7Cit9CisKK0lOTElORSB2 b2lkCitic2V0X2Jsdl9tY19maWxsX2NvbHVtbl9pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVm ZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX2ZpbGxfY29sdW1uX2luYWN0aXZl X3dpbmRvd3NfID0gdmFsOworfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBJTkxJ TkUgdm9pZAogYnNldF9iaWRpX3BhcmFncmFwaF9kaXJlY3Rpb24gKHN0cnVjdCBidWZmZXIgKmIs IExpc3BfT2JqZWN0IHZhbCkKIHsKZGlmZiAtLWdpdCBhL3NyYy9kaXNwZXh0ZXJuLmggYi9zcmMv ZGlzcGV4dGVybi5oCmluZGV4IDU3OTY2NWMuLmI1ZWUxMzUgMTAwNjQ0Ci0tLSBhL3NyYy9kaXNw ZXh0ZXJuLmgKKysrIGIvc3JjL2Rpc3BleHRlcm4uaApAQCAtOTQsNiArOTQsMjggQEAgdHlwZWRl ZiBpbnQgQ3Vyc29yOwogI2RlZmluZSBOYXRpdmVSZWN0YW5nbGUgaW50CiAjZW5kaWYKIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworZW51bSBt Y190eXBlcworeworICBOT19GTEFWT1IsCisgIE1DX0dMWVBILAorICBNQ19HTFlQSExFU1MsCisg IE1DX0dMWVBIX1RBQiwKKyAgTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAsCisgIE1DX1BJTENST1cs CisgIE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1csCisgIE1DX0hPTExPV19SRUNUQU5H TEUsCisgIE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVywKKyAgTUNfVkVSVElDQUxfQkFSLAor ICBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICit9OworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAvKiBUZXh0IGN1cnNvciB0eXBlcy4gICovCiAKIGVudW0gdGV4dF9jdXJzb3Jfa2lu ZHMKQEAgLTM3Niw2ICszOTgsMTggQEAgc3RydWN0IGdseXBoX3NsaWNlCiAKIHN0cnVjdCBnbHlw aAogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAq LworCisgIGludCB4LCB5LCBocG9zLCB2cG9zOworCisgIGJvb2xfYmYgenZfcCA6IDE7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogUG9zaXRpb24gZnJvbSB3aGljaCB0aGlz IGdseXBoIHdhcyBkcmF3bi4gIElmIGBvYmplY3QnIGJlbG93IGlzIGEKICAgICAgTGlzcCBzdHJp bmcsIHRoaXMgaXMgYW4gaW5kZXggaW50byB0aGF0IHN0cmluZy4gIElmIGl0IGlzIGEKICAgICAg YnVmZmVyLCB0aGlzIGlzIGEgcG9zaXRpb24gaW4gdGhhdCBidWZmZXIuICBJbiBhZGRpdGlvbiwg c29tZQpAQCAtMjIxMCw2ICsyMjQ0LDE2IEBAIHN0cnVjdCBjb21wb3NpdGlvbl9pdAogCiBzdHJ1 Y3QgaXQKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNP UlMgKi8KKworICBib29sX2JmIHp2X3AgOiAxOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgIC8qIFRoZSB3aW5kb3cgaW4gd2hpY2ggd2UgaXRlcmF0ZSBvdmVyIGN1cnJlbnRfYnVm ZmVyIChvciBhIHN0cmluZykuICAqLwogICBMaXNwX09iamVjdCB3aW5kb3c7CiAgIHN0cnVjdCB3 aW5kb3cgKnc7CmRpZmYgLS1naXQgYS9zcmMvZnJhbWUuaCBiL3NyYy9mcmFtZS5oCmluZGV4IGFk NzM3NmEuLjMxZDk1MjcgMTAwNjQ0Ci0tLSBhL3NyYy9mcmFtZS5oCisrKyBiL3NyYy9mcmFtZS5o CkBAIC0yMDIsNiArMjAyLDE2IEBAIHN0cnVjdCBmcmFtZQogCiAgIC8qIEJleW9uZCBoZXJlLCB0 aGVyZSBzaG91bGQgYmUgbm8gbW9yZSBMaXNwX09iamVjdCBjb21wb25lbnRzLiAgKi8KIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAvKiBO b24tbmlsIHdoZW4gdGhlIGZyYW1lIGlzIGluIHRoZSBwcm9jZXNzIG9mIGJlaW5nIHVwZGF0ZWQu ICovCisgIHN0cnVjdCBmcmFtZSAqbWNfdXBkYXRpbmdfZnJhbWU7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKICAgLyogQ2FjaGUgb2YgcmVhbGl6ZWQgZmFjZXMuICAqLwogICBzdHJ1 Y3QgZmFjZV9jYWNoZSAqZmFjZV9jYWNoZTsKIApkaWZmIC0tZ2l0IGEvc3JjL2ZyaW5nZS5jIGIv c3JjL2ZyaW5nZS5jCmluZGV4IGExMDE2YWQuLjJhNTU3M2EgMTAwNjQ0Ci0tLSBhL3NyYy9mcmlu Z2UuYworKysgYi9zcmMvZnJpbmdlLmMKQEAgLTQzMyw2ICs0MzMsNDAyIEBAIHN0YXRpYyB1bnNp Z25lZCBzaG9ydCBlbXB0eV9saW5lX2JpdHNbXSA9IHsKICAgMHgwMCwgMHgzYywgMHgwMCwgMHgw MCwgMHgzYywgMHgwMCwgMHgwMCwgMHgzYywgMHgwMH07CiAKIAorLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIGArLWZyaW5nZS1oZWxw ZXItZGVjaW1hbCcgZGVmaW5lZCBpbiBgY3Jvc3NoYWlycy5lbGAgKi8KKworLyogMjQKKyAgICAo Ky1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4 Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgi CisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4ueHguLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3dfYml0c1td ID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4OTgsIDB4OGMsIDB4ODYsIDB4YmYsCisgIDB4YmYs IDB4ODYsIDB4OGMsIDB4OTgsIDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAyNQorICAgICgrLWZy aW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eHh4eHh4eCIKKyAgICAgICJ4Li4uLi4u eCIKKyAgICAgICJ4Li4uLi4ueCIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAgICJ4Li4ueHgueCIK KyAgICAgICJ4Li4uLnh4eCIKKyAgICAgICJ4Lnh4eHh4eCIKKyAgICAgICJ4Lnh4eHh4eCIKKyAg ICAgICJ4Li4uLnh4eCIKKyAgICAgICJ4Li4ueHgueCIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAg ICJ4Li4uLi4ueCIKKyAgICAgICJ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gICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4u LiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIK KyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVk IHNob3J0IG1jX3ZlcnRpY2FsX2Jhcl9iaXRzW10gPXsKKyAgMHg4MCwgMHg4MCwgMHg4MCwgMHg4 MCwgMHg4MCwgMHg4MCwgMHg4MCwKKyAgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4MCwgMHg4 MCwgMHg4MH07CisKKy8qIDI4CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgInh4Li4uLi4uIgorICAgICAgInh4Li4uLi4uIgorICAgICAgIiB4eC4uLi4uIgorICAgICAg Ii54eC4uLi4uIgorICAgICAgIi4ueHguLi4uIgorICAgICAgIi4ueHguLi4uIgorICAgICAgIi4u Lnh4Li4uIgorICAgICAgIi4uLnh4Li4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi54 eC4uIgorICAgICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4uLnh4 IgorICAgICAgIi4uLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfYmFja3Ns YXNoX2JpdHNbXSA9eworICAweGMwLCAweGMwLCAweGUwLCAweDYwLCAweDMwLCAweDMwLCAweDE4 LCAweDE4LCAweGMsIDB4YywgMHg2LCAweDYsIDB4MywgMHgzfTsKKworLyogMjkKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHguLi4uLi4iCisgICAgICAieHguLi4u Li4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAieC54eC4uLi4i CisgICAgICAieC54eC4uLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4ueHguLi4iCisg ICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAg ICAieC4uLi54eC4iCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2JpdHNbXSA9ewor ICAweGMwLCAweGMwLCAweGUwLCAweGUwLCAweGIwLCAweGIwLCAweDk4LAorICAweDk4LCAweDhj LCAweDhjLCAweDg2LCAweDg2LCAweDgzLCAweDgzfTsKKworLyogMzAKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLnh4eHh4eC4iCisgICAgICAieHh4eC54Li4iCisg ICAgICAieHh4eC54Li4iCisgICAgICAieHh4eC54Li4iCisgICAgICAiLnh4eC54Li4iCisgICAg ICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAi Li4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iKQorKi8KK3N0YXRp YyB1bnNpZ25lZCBzaG9ydCBtY19waWxjcm93X2JpdHNbXSA9eworICAweDdlLCAweGY0LCAweGY0 LCAweGY0LCAweDc0LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0fTsKKworLyog MzEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54eHh4Li4iCisg ICAgICAiLnh4eHh4eC4iCisgICAgICAieC4ueHguLngiCisgICAgICAieC4ueHguLngiCisgICAg ICAieHh4eHh4eHgiCisgICAgICAieHguLi4ueHgiCisgICAgICAieHh4Li54eHgiCisgICAgICAi Lnh4eHh4eC4iCisgICAgICAiLi54eHh4Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19zbWlsZXlfZmFjZV9iaXRzW10gPXsKKyAgMHgzYywgMHg3ZSwgMHg5OSwgMHg5OSwgMHhmZiwg MHhjMywgMHhlNywgMHg3ZSwgMHgzY307CisKKy8qIDMyCisgICAgKCstZnJpbmdlLWhlbHBlci1o ZXhhZGVjaW1hbAorICAgICAgIi4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4u Li54Li4uIgorICAgICAgIi4uLi4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLngu Li4uIgorICAgICAgIi4ueC4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2lu Z2xlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweDIwLCAweDEwLCAweDgsIDB4NCwgMHg4LCAw eDEwLCAweDIwfTsKKworLyogMzMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAiLi4uLi54Li4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAg ICAiLi54Li4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAi Li4uLi54Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfbGVm dF9iaXRzW10gPXsKKyAgMHg0LCAweDgsIDB4MTAsIDB4MjAsIDB4MTAsIDB4OCwgMHg0fTsKKwor LyogMzQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHgueHguLi4i CisgICAgICAiLnh4Lnh4Li4iCisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiCisg ICAgICAiLi54eC54eC4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0c1tdID17Cisg IDB4ZDgsIDB4NmMsIDB4MzYsIDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDh9OworCisvKiAzNQorICAg ICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIu Lnh4Lnh4LiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICJ4eC54eC4uLiIKKyAgICAgICIueHgu eHguLiIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIuLi54eC54eCIpCisqLworc3RhdGljIHVu c2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDFiLCAweDM2 LCAweDZjLCAweGQ4LCAweDZjLCAweDM2LCAweDFifTsKKworLyogMzYKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisg ICAgICAiLi54LngueC4iCisgICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAg ICAiLngueC54Li4iCisgICAgICAieC54LnguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY190cmlwbGVfYW5nbGVfcmlnaHRfYml0c1tdID17CisgIDB4YTgsIDB4NTQsIDB4MmEsIDB4 MTUsIDB4MmEsIDB4NTQsIDB4YTh9OworCisvKiAzNworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4 YWRlY2ltYWwKKyAgICAgICIuLi54LngueCIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIueC54 LnguLiIKKyAgICAgICJ4LngueC4uLiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICIuLngueC54 LiIKKyAgICAgICIuLi54LngueCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBs ZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDE1LCAweDJhLCAweDU0LCAweGE4LCAweDU0LCAw eDJhLCAweDE1fTsKKworLyogMzgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAi LnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1 bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAs IDB4MDAsIDB4MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDAsIDB4 MDB9OworCisvKiAzOQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4u Li4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVk IHNob3J0IG1jX3NpbmdsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAw LCAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsK KworLyogNDAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4i CisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAs IDB4MDAsIDB4MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODIsIDB4 MDAsIDB4MDAsIDB4MDB9OworCisvKiA0MQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2lt YWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIK KyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAg ICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAg ICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9kb3du X2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAw eDQ0LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDIKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4i CisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAi Li4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfdXBf Yml0c1tdID17CisgIDB4MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4 OTIsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDB9OworCisvKiA0MworICAgICgrLWZyaW5nZS1oZWxw ZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAg ICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIu eC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4u LnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4u LiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3F1YWRydXBsZV9hbmdsZV9kb3duX2Jp dHNbXSA9eworICAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDky LCAweDQ0LCAweDI4LCAweDEwLCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmluZ2UtaGVscGVy LWhleGFkZWNpbWFsCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAi LnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLngu Li54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54 Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4i CisgICAgICAieC4uLi4ueC4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVw bGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4 NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODJ9OworCisvKiA0NQor ICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4Li4uLi54LiIKKyAgICAg ICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIu eC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4u LnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLngu LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIpCisqLworc3RhdGljIHVuc2ln bmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDgyLCAweDQ0LCAw eDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4 LCAweDEwfTsKKworLyogVE9ETzogIEFkZCB0aGUgZm9sbG93aW5nIGJpdG1hcHM6CisgIChkZWZp bmUtZnJpbmdlLWJpdG1hcCAnYnJlYWtwb2ludCAiXHgzY1x4N2VceGZmXHhmZlx4ZmZceGZmXHg3 ZVx4M2MiKQorICAoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJ2hvbGxvdy1yaWdodC10cmlhbmdsZSAi XHhlMFx4OTBceDg4XHg4NFx4ODRceDg4XHg5MFx4ZTAiKSAqLworCisvKiBlbmQgTVVMVElQTEUg Q1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBCWVRFU19Q RVJfQklUTUFQX1JPVyAgKHNpemVvZiAodW5zaWduZWQgc2hvcnQpKQogI2RlZmluZSBTVEFOREFS RF9CSVRNQVBfSEVJR0hUKGJpdHMpIChzaXplb2YgKGJpdHMpL0JZVEVTX1BFUl9CSVRNQVBfUk9X KQogI2RlZmluZSBGUkJJVFMoYml0cykgIGJpdHMsIFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGJp dHMpCkBAIC00NjYsNiArODYyLDU5IEBAIHN0YXRpYyBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCBzdGFu ZGFyZF9iaXRtYXBzW10gPQogICB7IEZSQklUUyAodmVydGljYWxfYmFyX2JpdHMpLCAgICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCiAgIHsgRlJCSVRTIChob3Jpem9udGFsX2Jh cl9iaXRzKSwgICAgIDgsIDAsIEFMSUdOX0JJVE1BUF9CT1RUT00sIDAgfSwKICAgeyBGUkJJVFMg KGVtcHR5X2xpbmVfYml0cyksICAgICAgICAgOCwgMywgQUxJR05fQklUTUFQX1RPUCwgICAgMCB9 LAorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLwor CisgIC8qIDI0ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3dfYml0 cyksICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI1ICovCisgIHsg RlJCSVRTIChtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHMpLCA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI2ICovCisgIHsgRlJCSVRTIChtY19ob2xsb3df cmVjdGFuZ2xlX2JpdHMpLCAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisgIC8qIDI3ICovCisgIHsgRlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfYml0cyksICAgICAg ICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI4ICovCisg IHsgRlJCSVRTIChtY19iYWNrc2xhc2hfYml0cyksICAgICAgICAgICAgICAgICAgICA4LCAwLCBB TElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDI5ICovCisgIHsgRlJCSVRTIChtY192ZXJ0 aWNhbF9iYXJfYmFja3NsYXNoX2JpdHMpLCAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVS LCAwIH0sCisgIC8qIDMwICovCisgIHsgRlJCSVRTIChtY19waWxjcm93X2JpdHMpLCAgICAgICAg ICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMxICov CisgIHsgRlJCSVRTIChtY19zbWlsZXlfZmFjZV9iaXRzKSwgICAgICAgICAgICAgICAgICA4LCAw LCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDMyICovCisgIHsgRlJCSVRTIChtY19z aW5nbGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VO VEVSLCAwIH0sCisgIC8qIDMzICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVfbGVmdF9i aXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM0 ICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0cyksICAgICAgICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM1ICovCisgIHsgRlJCSVRTICht Y19kb3VibGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBf Q0VOVEVSLCAwIH0sCisgIC8qIDM2ICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfcmln aHRfYml0cyksICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8q IDM3ICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfbGVmdF9iaXRzKSwgICAgICAgICAg ICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM4ICovCisgIHsgRlJCSVRT IChtY19zaW5nbGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRN QVBfQ0VOVEVSLCAwIH0sCisgIC8qIDM5ICovCisgIHsgRlJCSVRTIChtY19zaW5nbGVfYW5nbGVf ZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisg IC8qIDQwICovCisgIHsgRlJCSVRTIChtY19kb3VibGVfYW5nbGVfdXBfYml0cyksICAgICAgICAg ICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQxICovCisgIHsgRlJC SVRTIChtY19kb3VibGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICAgICA4LCAwLCBBTElHTl9C SVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQyICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5n bGVfdXBfYml0cyksICAgICAgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0s CisgIC8qIDQzICovCisgIHsgRlJCSVRTIChtY190cmlwbGVfYW5nbGVfZG93bl9iaXRzKSwgICAg ICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQ0ICovCisgIHsg RlJCSVRTIChtY19xdWFkcnVwbGVfYW5nbGVfdXBfYml0cyksICAgICAgICAgICA4LCAwLCBBTElH Tl9CSVRNQVBfQ0VOVEVSLCAwIH0sCisgIC8qIDQ1ICovCisgIHsgRlJCSVRTIChtY19xdWFkcnVw bGVfYW5nbGVfZG93bl9iaXRzKSwgICAgICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQ0VOVEVSLCAw IH0sCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH07CiAKICNkZWZpbmUgTk9fRlJJ TkdFX0JJVE1BUCAwCkBAIC0xNzIzLDYgKzIxNzIsMTUwIEBAIElmIG5pbCwgYWxzbyBjb250aW51 ZSBsaW5lcyB3aGljaCBhcmUgZXhhY3RseSBhcyB3aWRlIGFzIHRoZSB3aW5kb3cuICAqLyk7CiAg IERFRlZBUl9MSVNQICgiZnJpbmdlLWJpdG1hcHMiLCBWZnJpbmdlX2JpdG1hcHMsCiAgICAgZG9j OiAvKiBMaXN0IG9mIGZyaW5nZSBiaXRtYXAgc3ltYm9scy4gICovKTsKICAgVmZyaW5nZV9iaXRt YXBzID0gUW5pbDsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJ UExFIENVUlNPUlMgKi8KKworICAvKiAoZ2V0ICdlbXB0eS1saW5lICdmcmluZ2UpID0+IDIzID0+ IHRoZSBsYXN0IHN0YW5kYXJkLWJpdG1hcCBiZWZvcmUgdGhpcyBvbmUuCisgIFNlZSBgZ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IGEvc3JjL2tleWJvYXJkLmMgYi9zcmMva2V5Ym9hcmQuYwpp bmRleCBiZTcyN2E2Li4wMTgwZDFhIDEwMDY0NAotLS0gYS9zcmMva2V5Ym9hcmQuYworKysgYi9z cmMva2V5Ym9hcmQuYwpAQCAtMTIyNCw2ICsxMjI0LDgwIEBAIHN0YXRpYyBpbnQgcmVhZF9rZXlf c2VxdWVuY2UgKExpc3BfT2JqZWN0ICosIExpc3BfT2JqZWN0LAogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgYm9vbCwgYm9vbCwgYm9vbCwgYm9vbCk7CiBzdGF0aWMgdm9pZCBhZGp1c3Rf cG9pbnRfZm9yX3Byb3BlcnR5IChwdHJkaWZmX3QsIGJvb2wpOwogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitzdGF0aWMgdm9pZAorbWNfc3dp dGNoZXNfbXVsdGlwbGVfY3Vyc29ycyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCB0cnVlX29yX2Zh bHNlX3ApCit7CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wICYm IEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAgfHwgIU5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgfHwg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZmlsbF9jb2x1bW4pKSkpCisg ICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93 LCB3KTsKK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X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAg ICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJp bnRmIChzdGRlcnIsICJcbm1jX3N3aXRjaGVzX2ZpbGxfY29sdW1uICglcyk6ICAlc1xuIiwKKyAg ICAgICAgICAgICAgIHdpbmRvd19jaGFyLCB0cnVlX29yX2ZhbHNlX3AgPyAidHJ1ZSIgOiAiZmFs c2UiKTsKKyAgICB9CisjZW5kaWYKKyAgdy0+bWMuZHJhd19maWxsX2NvbHVtbiA9IHRydWVfb3Jf ZmFsc2VfcDsKKyAgdy0+bWMuZXJhc2VfZmlsbF9jb2x1bW4gPSB0cnVlX29yX2ZhbHNlX3A7Cisg IGlmICh0cnVlX29yX2ZhbHNlX3ApCisgICAgdy0+bXVzdF9iZV91cGRhdGVkX3AgPSB0cnVlOwor fQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBMaXNwX09iamVjdAogY29tbWFuZF9s b29wXzEgKHZvaWQpCiB7CkBAIC0xNDE5LDYgKzE0OTMsMTYgQEAgY29tbWFuZF9sb29wXzEgKHZv aWQpCiAgICAgICBWcmVhbF90aGlzX2NvbW1hbmQgPSBjbWQ7CiAgICAgICBzYWZlX3J1bl9ob29r cyAoUXByZV9jb21tYW5kX2hvb2spOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBzdHJ1Y3Qgd2luZG93ICp3ID0gWFdJTkRPVyAo c2VsZWN0ZWRfd2luZG93KTsKKyAgICAgIG1jX3N3aXRjaGVzX211bHRpcGxlX2N1cnNvcnMgKHcs IHRydWUpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBhbHJlYWR5X2Fk anVzdGVkID0gMDsKIAogICAgICAgaWYgKE5JTFAgKFZ0aGlzX2NvbW1hbmQpKQpAQCAtMTU2NSw2 ICsxNjQ5LDE4IEBAIGNvbW1hbmRfbG9vcF8xICh2b2lkKQogICAgICAgaWYgKCFOSUxQIChLVkFS IChjdXJyZW50X2tib2FyZCwgZGVmaW5pbmdfa2JkX21hY3JvKSkKIAkgICYmIE5JTFAgKEtWQVIg KGN1cnJlbnRfa2JvYXJkLCBWcHJlZml4X2FyZykpKQogCWZpbmFsaXplX2tiZF9tYWNyb19jaGFy cyAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMg Ki8KKworICAgICAgbWNfc3dpdGNoZXNfbXVsdGlwbGVfY3Vyc29ycyAodywgZmFsc2UpOworICAg ICAgbWNfc3dpdGNoZXNfY3Jvc3NoYWlycyAodywgZmFsc2UpOworICAgICAgbWNfc3dpdGNoZXNf ZmlsbF9jb2x1bW4gKHcsIGZhbHNlKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAgIH0KIH0KIApAQCAtMjQ0OCw3ICsyNTQ0LDE1IEBAIHJlYWRfY2hhciAoaW50IGNvbW1hbmRm bGFnLCBMaXNwX09iamVjdCBtYXAsCiAJICBpZiAoaGVscF9lY2hvX3Nob3dpbmdfcCAmJiAhRVEg KHNlbGVjdGVkX3dpbmRvdywgbWluaWJ1Zl93aW5kb3cpKQogCSAgICByZWRpc3BsYXlfcHJlc2Vy dmVfZWNob19hcmVhICg1KTsKIAkgIGVsc2UKLQkgICAgcmVkaXNwbGF5ICgpOworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisJICAgIHJlZGlz cGxheSAoMSk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIAkgIGlmICghaW5wdXRf cGVuZGluZykKIAkgICAgLyogTm9ybWFsIGNhc2U6IG5vIGlucHV0IGFycml2ZWQgZHVyaW5nIHJl ZGlzcGxheS4gICovCkBAIC0yNjI4LDcgKzI3MzIsMTYgQEAgcmVhZF9jaGFyIChpbnQgY29tbWFu ZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICB7CiAgICAgICBGZG9fYXV0b19zYXZlIChhdXRv X3NhdmVfbm9fbWVzc2FnZSA/IFF0IDogUW5pbCwgUW5pbCk7CiAgICAgICAvKiBIb29rcyBjYW4g YWN0dWFsbHkgY2hhbmdlIHNvbWUgYnVmZmVycyBpbiBhdXRvIHNhdmUuICAqLwotICAgICAgcmVk aXNwbGF5ICgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VS U09SUyAqLworCisgICAgICByZWRpc3BsYXkgKDIpOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgICAgfQogCiAgIC8qIFRyeSByZWFkaW5nIHVzaW5nIGFuIFggbWVudS4KQEAgLTI2 OTIsNyArMjgwNSwxNiBAQCByZWFkX2NoYXIgKGludCBjb21tYW5kZmxhZywgTGlzcF9PYmplY3Qg bWFwLAogCSAgICAgICYmICEgQ09OU1AgKFZ1bnJlYWRfY29tbWFuZF9ldmVudHMpKQogCSAgICB7 CiAJICAgICAgRmRvX2F1dG9fc2F2ZSAoYXV0b19zYXZlX25vX21lc3NhZ2UgPyBRdCA6IFFuaWws IFFuaWwpOwotCSAgICAgIHJlZGlzcGxheSAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworCSAgICAgIHJlZGlzcGxheSAoMyk7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgfQogCX0KIApAQCAtMjc5NSw3ICsyOTE3 LDE1IEBAIHJlYWRfY2hhciAoaW50IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAsCiAgICAg ewogICAgICAgaWYgKGNvbW1hbmRmbGFnID49IDAKIAkgICYmICFpbnB1dF9wZW5kaW5nICYmICFk ZXRlY3RfaW5wdXRfcGVuZGluZ19ydW5fdGltZXJzICgwKSkKLQlyZWRpc3BsYXkgKCk7CisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKwlyZWRp c3BsYXkgKDQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAgICAgICBnb3RvIHdy b25nX2tib2FyZDsKICAgICB9CkBAIC0zMDkzLDcgKzMyMjMsMTUgQEAgcmVhZF9jaGFyIChpbnQg Y29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1hcCwKICAgICAgIC8qIFJlbW92ZSB0aGUgaGVscCBm cm9tIHRoZSBmcmFtZS4gICovCiAgICAgICB1bmJpbmRfdG8gKGNvdW50LCBRbmlsKTsKIAotICAg ICAgcmVkaXNwbGF5ICgpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF IENVUlNPUlMgKi8KKworICAgICAgcmVkaXNwbGF5ICg1KTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAgICAgaWYgKEVRIChjLCBtYWtlX2ZpeG51bSAoMDQwKSkpCiAJewogCSAg Y2FuY2VsX2VjaG9pbmcgKCk7CmRpZmYgLS1naXQgYS9zcmMvbGlzcC5oIGIvc3JjL2xpc3AuaApp bmRleCA3ZTdkYmE2Li40NmQ5MjMxIDEwMDY0NAotLS0gYS9zcmMvbGlzcC5oCisrKyBiL3NyYy9s aXNwLmgKQEAgLTM1NzksNyArMzU3OSwxNSBAQCBleHRlcm4gdm9pZCBtZXNzYWdlX3dpdGhfc3Ry aW5nIChjb25zdCBjaGFyICosIExpc3BfT2JqZWN0LCBib29sKTsKIGV4dGVybiB2b2lkIG1lc3Nh Z2VfbG9nX21heWJlX25ld2xpbmUgKHZvaWQpOwogZXh0ZXJuIHZvaWQgdXBkYXRlX2VjaG9fYXJl YSAodm9pZCk7CiBleHRlcm4gdm9pZCB0cnVuY2F0ZV9lY2hvX2FyZWEgKHB0cmRpZmZfdCk7Ci1l eHRlcm4gdm9pZCByZWRpc3BsYXkgKHZvaWQpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitleHRlcm4gdm9pZCByZWRpc3BsYXkgKGludCk7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIHZvaWQgc2V0X2ZyYW1lX2N1cnNvcl90 eXBlcyAoc3RydWN0IGZyYW1lICosIExpc3BfT2JqZWN0KTsKIGV4dGVybiB2b2lkIHN5bXNfb2Zf eGRpc3AgKHZvaWQpOwpkaWZmIC0tZ2l0IGEvc3JjL25zdGVybS5tIGIvc3JjL25zdGVybS5tCmlu ZGV4IGJjYzIzZmYuLjU0YWRjNzQgMTAwNjQ0Ci0tLSBhL3NyYy9uc3Rlcm0ubQorKysgYi9zcmMv bnN0ZXJtLm0KQEAgLTEwODcsNiArMTA4NywxNiBAQCBzdGF0aWMgTlNSZWN0IGNvbnN0cmFpbl9m cmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNGdWxsc2NyZWVuKQogICAgZXh0ZXJu YWwgKFJJRikgY2FsbDsgd2hvbGUgZnJhbWUsIGNhbGxlZCBiZWZvcmUgdXBkYXRlX3dpbmRvd19i ZWdpbgogICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIHsKKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9 IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRlZiBOU19JTVBMX0NPQ09B CiAgIEVtYWNzVmlldyAqdmlldyA9IEZSQU1FX05TX1ZJRVcgKGYpOwogCkBAIC0xMjEwLDYgKzEy MjAsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5fZnJhbWVfcmVjdChOU1JlY3QgZnJhbWVS ZWN0LCBib29sIGlzRnVsbHNjcmVlbikKIAogLyogICBpZiAoZiA9PSBNT1VTRV9ITF9JTkZPIChm KS0+bW91c2VfZmFjZV9tb3VzZV9mcmFtZSkgKi8KICAgTU9VU0VfSExfSU5GTyAoZiktPm1vdXNl X2ZhY2VfZGVmZXIgPSAwOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gTlVMTDsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTE5NzMsNyArMTk5Myw3IEBAIHNvIHNv bWUga2V5IHByZXNzZXMgKFRBQikgYXJlIHN3YWxsb3dlZCBieSB0aGUgc3lzdGVtLiAgKi8KICAg ICAgICAgICBbW2NoaWxkIHBhcmVudFdpbmRvd10gcmVtb3ZlQ2hpbGRXaW5kb3c6Y2hpbGRdOwog I2lmIGRlZmluZWQgKE5TX0lNUExfQ09DT0EpICYmIE1BQ19PU19YX1ZFUlNJT05fTUFYX0FMTE9X RUQgPj0gMTAxMDAwCiAjaWYgTUFDX09TX1hfVkVSU0lPTl9NSU5fUkVRVUlSRUQgPCAxMDEwMDAK LSAgICAgICAgICBpZiAoW2NoaWxkIHJlc3BvbmRzVG9TZWxlY3RvcjpAc2VsZWN0b3Ioc2V0QWNj ZXNzaWJpbGl0eVN1YnJvbGU6KV0KKyAgICAgICAgICBpZiAoW2NoaWxkIHJlc3BvbmRzVG9TZWxl Y3RvcjpAc2VsZWN0b3Ioc2V0QWNjZXNzaWJpbGl0eV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qKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICByLm9yaWdpbi54ID0gKHctPm1jLmZ4ID4g MCkKKyAgICAgICAgICAgICAgID8gdy0+bWMuZngKKyAgICAgICAgICAgICAgIDogZng7CisgIHIu b3JpZ2luLnkgPSAody0+bWMuZnkgPiAwKQorICAgICAgICAgICAgICAgPyB3LT5tYy5meQorICAg ICAgICAgICAgICAgOiBmeTsKKyAgci5zaXplLmhlaWdodCA9ICh3LT5tYy5oID4gMCkKKyAgICAg ICAgICAgICAgICAgID8gdy0+bWMuaAorICAgICAgICAgICAgICAgICAgOiBoOwogICByLnNpemUu d2lkdGggPSB3LT5waHlzX2N1cnNvcl93aWR0aDsKIAorLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAvKiBQcmV2ZW50IHRoZSBjdXJzb3IgZnJvbSBiZWluZyBkcmF3biBvdXRzaWRlIHRo ZSB0ZXh0IGFyZWEuICAqLwogICBpZiAobnNfY2xpcF90b19yb3cgKHcsIGdseXBoX3JvdywgVEVY VF9BUkVBLCBOTykpCiAgICAgewogICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRF9PUl9OVUxMIChm LCBwaHlzX2N1cnNvcl9nbHlwaC0+ZmFjZV9pZCk7Ci0gICAgICBpZiAoZmFjZSAmJiBOU19GQUNF X0JBQ0tHUk9VTkQgKGZhY2UpCi0gICAgICAgICAgPT0gbnNfaW5kZXhfY29sb3IgKEZSQU1FX0NV UlNPUl9DT0xPUiAoZiksIGYpKQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVn aW4gTVVMVElQTEUgQ1VSU09SUyAqLworCisvK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MtPnctPm1jLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgYmx1ZTogcy0+dy0+bWMuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07ICovCisKKyAgaWYgKHctPm1jLmdseXBo X2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgfHwgdy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dM WVBITEVTUworICAgICAgfHwgdy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBIX1RBQikKKyAg ICB7CisgICAgICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogdy0+bWMucmVkIGdy ZWVuOiB3LT5tYy5ncmVlbiBibHVlOiB3LT5tYy5ibHVlIGFscGhhOiAxLjBdIHNldF07CisgICAg ICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgICAgIENIRUNLX0JVRkZFUiAoYnVm KTsKKyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAgICAgYm9vbCBy ZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1hcmtfYWN0aXZlKSkpOwor ICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhG SVhOVU0gKEZyZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAgICAgcHRyZGlmZl90IHJlZ2lv bl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhGSVhOVU0gKEZyZWdpb25fZW5kICgpKSA6IC0x OworICAgICAgYm9vbCByZWdpb25faW5fYm91bmRzX3AgPSAocmVnaW9uX2FjdGl2ZV9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vd19hY3Rp dmVfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EICho b2xsb3dfYWN0aXZlX2ZhY2UpLCBmKTsKKyAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9s bG93X2FjdGl2ZV9jb2xvcjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8qIFRoZSByZWdp b24gaXMgX25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1c2UgdGhlIG92 ZXJsYXkgd2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICBlbHNlIGlmICgh YWN0aXZlX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJu ICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAg ICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChm LCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgTlNDb2xvciAqaG9s bG93X2luYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFD S0dST1VORCAoaG9sbG93X2luYWN0aXZlX2ZhY2UpLCBmKTsKKyAgICAgICAgICAgICAgICBob2xs b3dfY29sb3IgPSBob2xsb3dfaW5hY3RpdmVfY29sb3I7CisgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgZWxzZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5z X2luZGV4X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKyAgICAgICAgICAgICAg ICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09MT1IgKGYpOworICAgICAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZh Y2UgKmRlZmF1bHRfYmdfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgREVGQVVMVF9GQUNFX0lEKTsK KyAgICAgICAgICAgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JB Q0tHUk9VTkQgKGRlZmF1bHRfYmdfZmFjZSksIGYpIHNldF07CisgICAgICAgICAgICAgICAgICAg IGhvbGxvd19jb2xvciA9IEZSQU1FX0NVUlNPUl9DT0xPUiAoZik7CisgICAgICAgICAgICAgICAg ICB9CisgICAgfQorICAgIGVsc2UgaWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNl KSA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCisgICAgICB7 CisgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChm YWNlKSwgZikgc2V0XTsKKyAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9S IChmKTsKKyAgICAgIH0KICAgICAgIGVsc2UKICAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAo Zikgc2V0XTsKIAorLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKICAgICAgIHN3aXRjaCAoY3Vyc29yX3R5cGUpCiAgICAgICAgIHsKICAgICAg ICAgY2FzZSBERUZBVUxUX0NVUlNPUjoKQEAgLTMyNDYsMjAgKzMzNjMsNDggQEAgTm90ZSB0aGF0 IENVUlNPUl9XSURUSCBpcyBtZWFuaW5nZnVsIG9ubHkgZm9yIChoKWJhciBjdXJzb3JzLgogICAg ICAgICAgIGJyZWFrOwogICAgICAgICBjYXNlIEJBUl9DVVJTT1I6CiAgICAgICAgICAgcyA9IHI7 Ci0gICAgICAgICAgLyogSWYgdGhlIGNoYXJhY3RlciB1bmRlciBjdXJzb3IgaXMgUjJMLCBkcmF3 IHRoZSBiYXIgY3Vyc29yCi0gICAgICAgICAgICAgb24gdGhlIHJpZ2h0IG9mIGl0cyBnbHlwaCwg cmF0aGVyIHRoYW4gb24gdGhlIGxlZnQuICAqLwotICAgICAgICAgIGN1cnNvcl9nbHlwaCA9IGdl dF9waHlzX2N1cnNvcl9nbHlwaCAodyk7Ci0gICAgICAgICAgaWYgKChjdXJzb3JfZ2x5cGgtPnJl c29sdmVkX2xldmVsICYgMSkgIT0gMCkKLSAgICAgICAgICAgIHMub3JpZ2luLnggKz0gY3Vyc29y X2dseXBoLT5waXhlbF93aWR0aCAtIHMuc2l6ZS53aWR0aDsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIEBsYXdsaXN0IGlzIGZv Y3VzaW5nIHRoZSBpbml0aWFsIGRldmVsb3BtZW50IG9mIGZlYXR1cmUgcmVxdWVzdHMgIzE3Njg0 CisgICAgYW5kICMyMjg3MyBvbiBMMlIgbGFuZ3VhZ2VzLiAqLworICAgIGlmICh3LT5tYy5nbHlw aF9mbGF2b3IgIT0gTUNfR0xZUEgKKyAgICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1D X0dMWVBITEVTUworICAgICAgICAmJiB3LT5tYy5nbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEhfVEFC KQorICAgICAgeworICAgICAgLyogSWYgdGhlIGNoYXJhY3RlciB1bmRlciBjdXJzb3IgaXMgUjJM LCBkcmF3IHRoZSBiYXIgY3Vyc29yCisgICAgICAgICBvbiB0aGUgcmlnaHQgb2YgaXRzIGdseXBo LCByYXRoZXIgdGhhbiBvbiB0aGUgbGVmdC4gICovCisgICAgICBjdXJzb3JfZ2x5cGggPSBnZXRf cGh5c19jdXJzb3JfZ2x5cGggKHcpOworICAgICAgaWYgKChjdXJzb3JfZ2x5cGgtPnJlc29sdmVk X2xldmVsICYgMSkgIT0gMCkKKyAgICAgICAgcy5vcmlnaW4ueCArPSBjdXJzb3JfZ2x5cGgtPnBp eGVsX3dpZHRoIC0gcy5zaXplLndpZHRoOworICAgICAgfQorCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKwogCiAgICAgICAgICAgTlNSZWN0RmlsbCAocyk7CiAgICAgICAgICAgYnJlYWs7CiAg ICAgICAgIH0KICAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChmKTsKIAotICAgICAgLyogZHJhdyB0 aGUgY2hhcmFjdGVyIHVuZGVyIHRoZSBjdXJzb3IgKi8KLSAgICAgIGlmIChjdXJzb3JfdHlwZSAh PSBOT19DVVJTT1IpCi0gICAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3Jv dywgRFJBV19DVVJTT1IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF IENVUlNPUlMgKi8KKworICAvKiBkcmF3IHRoZSBjaGFyYWN0ZXIgdW5kZXIgdGhlIGN1cnNvciAq LworICBpZiAoY3Vyc29yX3R5cGUgIT0gTk9fQ1VSU09SCisgICAgICAmJiB3LT5tYy5nbHlwaF9m bGF2b3IgIT0gTUNfR0xZUEhMRVNTCisgICAgICAmJiB3LT5tYy5nbHlwaF9mbGF2b3IgIT0gTUNf R0xZUEhfVEFCKQorICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJB V19DVVJTT1IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCisjaWZkZWYgTlNfSU1Q TF9DT0NPQQorICAgICAgTlNFbmFibGVTY3JlZW5VcGRhdGVzICgpOworI2VuZGlmCiAgICAgfQog fQogCkBAIC0zOTI2LDcgKzQwNzEsMjcgQEAgRnVuY3Rpb24gbW9kZWxlZCBhZnRlciB4X2RyYXdf Z2x5cGhfc3RyaW5nX2JveCAoKS4KICAgICB7CiAgICAgICBpbnQgdGhpY2tuZXNzID0gYWJzIChz LT5pbWctPnJlbGllZik7CiAgICAgICBpZiAodGhpY2tuZXNzID09IDApIHRoaWNrbmVzcyA9IDE7 Ci0gICAgICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywgRlJBTUVfQ1VSU09SX0NPTE9SIChz LT5mKSwgMSwgMSk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBD VVJTT1JTICovCisKKyAgICBpZiAocy0+dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisg ICAgICAgIHx8IHMtPnctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MKKyAgICAgICAg fHwgcy0+dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBIX1RBQikKKyAgICAgIHsKKyAgICAg ICAgTlNDb2xvciAqYm9yZGVyX2NvbG9yID0gW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJl ZDogcy0+dy0+bWMucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZ3JlZW46IHMtPnctPm1jLmdyZWVuCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IHMtPnctPm1j LmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBhbHBoYTogMS4wXTsKKyAgICAgICAgbnNfZHJhd19ib3ggKGJyLCB0aGlja25lc3Ms IGJvcmRlcl9jb2xvciwgMSwgMSk7CisgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIG5zX2Ry YXdfYm94IChiciwgdGhpY2tuZXNzLCBGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpLCAxLCAxKTsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KIH0KIApkaWZmIC0tZ2l0IGEv c3JjL3czMnRlcm0uYyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggOGQxODlhZS4uZTdmYjhhMyAxMDA2 NDQKLS0tIGEvc3JjL3czMnRlcm0uYworKysgYi9zcmMvdzMydGVybS5jCkBAIC01NDUsNiArNTQ1 LDE1IEBAIHhfdXBkYXRlX2JlZ2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmICghIEZSQU1FX1cz Ml9QIChmKSkKICAgICByZXR1cm47CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBmOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFJlZ2VuZXJhdGUgZGlzcGxheSBwYWxldHRl IGJlZm9yZSBkcmF3aW5nIGlmIGxpc3Qgb2YgcmVxdWVzdGVkCiAgICAgIGNvbG9ycyBoYXMgY2hh bmdlZC4gKi8KICAgaWYgKGRpc3BsYXlfaW5mby0+cmVnZW5fcGFsZXR0ZSkKQEAgLTc1NCw2ICs3 NjMsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAKICAgLyogTW91c2UgaGln aGxpZ2h0IG1heSBiZSBkaXNwbGF5ZWQgYWdhaW4uICAqLwogICBNT1VTRV9ITF9JTkZPIChmKS0+ bW91c2VfZmFjZV9kZWZlciA9IGZhbHNlOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gTlVMTDsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTk3Myw2ICs5OTIsMjAg QEAgc3RhdGljIHZvaWQgdzMyX2RyYXdfYm94X3JlY3QgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKiwg aW50LCBpbnQsIGludCwgaW50LAogc3RhdGljIHZvaWQKIHhfc2V0X2N1cnNvcl9nYyAoc3RydWN0 IGdseXBoX3N0cmluZyAqcykKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworICBpZiAocy0+dy0+bWMuY3Vyc29yX2djX2RlZmF1bHQpCisg ICAgeworICAgICAgcy0+Z2MgPSBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYzsKKyAg ICAgIHJldHVybjsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYg KHMtPmZvbnQgPT0gRlJBTUVfRk9OVCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmJhY2tncm91 bmQgPT0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAocy0+ZikKICAgICAgICYmIHMtPmZhY2UtPmZv cmVncm91bmQgPT0gRlJBTUVfRk9SRUdST1VORF9QSVhFTCAocy0+ZikKQEAgLTU2OTAsNiArNTcy MywyNiBAQCB4X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGds eXBoX3JvdyAqcm93KQogCiAgIC8qIENvbXB1dGUgZnJhbWUtcmVsYXRpdmUgY29vcmRpbmF0ZXMg Zm9yIHBoeXMgY3Vyc29yLiAgKi8KICAgZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3cs IGN1cnNvcl9nbHlwaCwgJmxlZnQsICZ0b3AsICZoKTsKKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTEVHRU5EOgorCistICB0b3AgeSA9 PSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgcm93LT55KQorCistICBib3R0b20geSA9PSBX SU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgcm93LT55KSAtIHJvdy0+aGVpZ2h0CisKKy0gIGgg b2YgSE9MTE9XX0JPWF9DVVJTT1IgPT0gcm93LT5oZWlnaHQKKyAgIFtUaGlzIGF2b2lkcyBhIHZp c2libGUgZ2FwIGFib3ZlL2JlbG93Ll0gKi8KKworICBpZiAody0+bWMuaCA+IDApCisgICAgaCA9 IHJvdy0+aGVpZ2h0OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHJlY3QubGVm dCA9IGxlZnQ7CiAgIC8qIFdoZW4gb24gUjJMIGNoYXJhY3Rlciwgc2hvdyBjdXJzb3IgYXQgdGhl IHJpZ2h0IGVkZ2Ugb2YgdGhlCiAgICAgIGdseXBoLCB1bmxlc3MgdGhlIGN1cnNvciBib3ggaXMg YXMgd2lkZSBhcyB0aGUgZ2x5cGggb3Igd2lkZXIKQEAgLTU3NTMsNyArNTgwNiwxNyBAQCB4X2Ry YXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAog CSBpbnZpc2libGUuICBVc2UgdGhlIGdseXBoJ3MgZm9yZWdyb3VuZCBjb2xvciBpbnN0ZWFkIGlu IHRoaXMKIAkgY2FzZSwgb24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUgZ2x5cGgncyBjb2xvcnMg YXJlIGNob3NlbiBzbwogCSB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxlLiAgKi8KLSAgICAgIGlm IChmYWNlLT5iYWNrZ3JvdW5kID09IGN1cnNvcl9jb2xvcikKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKGZhY2UtPmJhY2tn cm91bmQgPT0gY3Vyc29yX2NvbG9yCisgICAgICAgICAgJiYgIXctPm1jLmN1cnNvcl9nY19pbnZp c2libGVfb2theSkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCWN1cnNvcl9jb2xv ciA9IGZhY2UtPmZvcmVncm91bmQ7CiAKICAgICAgIHggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9Q SVhFTF9YICh3LCB3LT5waHlzX2N1cnNvci54KTsKQEAgLTU3NzQsNiArNTgzNywxNyBAQCB4X2Ry YXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAog CSAgaWYgKChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKIAkgICAgeCAr PSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gd2lkdGg7CiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBBbGlnbiBhbGwgZmFr ZSBCQVJfQ1VSU09SIG9mIHRoZSBWRVJUSUNBTF9SVUxFUiB3aXRoIGBvcG9pbnRfeCcuICovCisg ICAgaWYgKHctPm1jLmZ4ID4gMCkKKyAgICAgIHggPSB3LT5tYy5meDsKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogCSAgdzMyX2ZpbGxfYXJlYSAoZiwgaGRjLCBjdXJzb3JfY29sb3Is IHgsCiAJCQkgV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHctPnBoeXNfY3Vyc29yLnkpLAog CQkJIHdpZHRoLCByb3ctPmhlaWdodCk7CkBAIC01ODk1LDMxICs1OTY5LDE2OSBAQCB3MzJfZHJh d193aW5kb3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlw aF9yb3csCiAJICByZXR1cm47CiAJfQogCi0gICAgICB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19CVUZGRVIgKGJ1Zik7CisgICAgICAgICAgc3RydWN0 IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1Zik7CisgICAgICAgICAgYm9vbCByZWdpb25fYWN0aXZl X3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJrX2FjdGl2ZSkpKTsKKyAgICAgICAg ICBwdHJkaWZmX3QgcmVnaW9uX2JlZ2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWEZJWE5V TSAoRnJlZ2lvbl9iZWdpbm5pbmcgKCkpIDogLTE7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lv bl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhGSVhOVU0gKEZyZWdpb25fZW5kICgpKSA6IC0x OworICAgICAgICAgIGJvb2wgcmVnaW9uX2luX2JvdW5kc19wID0gKHJlZ2lvbl9hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jLnBvc2ludCA+PSBy ZWdpb25fYmVnaW5uaW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+bWMucG9zaW50IDwgcmVnaW9uX2VuZCk7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlq YWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycgYnkgYm9ycm93aW5nIHRoZQorICAg ICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4gdzMyZm5zLmMuICAqLworICAg ICAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgJiYgcmVnaW9uX2luX2Jv dW5kc19wCisgICAgICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBlbnVtIGZhY2VfaWQgaG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dW5kOworICAgICAgICAgICAg ICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fb3V0X2ZhY2Ut PmZvcmVncm91bmQ7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZSBpZiAoIXJl Z2lvbl9hY3RpdmVfcCAmJiBhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVk X2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiksIHRydWUpOwor ICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0Vf RlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgIGdj X3ZhbHVlcy5mb3JlZ3JvdW5kID0gZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAg ICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tn cm91bmQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8qIFRoZSByZWdpb24g aXMgX25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1c2UgdGhlIG92ZXJs YXkgd2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICAgICAgZWxzZSBpZiAo IWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBlbnVt IGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywg ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3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gKi8KKyAg ICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOwor ICAgICAgICAgIHhfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBnbHlwaF9yb3cpOworICAgICAgICAg IGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVs OworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBI ICYmIHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAw KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0 cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAgICAgICAgICAgIGYtPm91dHB1dF9k YXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgICB4X2RyYXdf aG9sbG93X2N1cnNvciAodywgZ2x5cGhfcm93KTsKKyAgICAgICAgICAgIGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICAgIH0K KyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB4X2RyYXdfaG9sbG93X2N1cnNvciAodywgZ2x5 cGhfcm93KTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIEZJTExFRF9CT1hfQ1VSU09S OgorICAgIHsKKyAgICAgIGlmICh3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5ibHVlID49IDAgJiYg dy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhp amFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2M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cmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09SKTsKKyAg ICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYg KHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQor ICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0 YS53MzItPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+ Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2lu dmlzaWJsZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5 cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNv cl9nY19pbnZpc2libGVfb2theSA9IGZhbHNlOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAg ICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJz b3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgSEJB Ul9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHctPm1jLmJsdWUg Pj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9y YXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICAqLworICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7Cisg ICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAg ICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VS U09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSBmYWxzZTsK KyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1 cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3X2Jh cl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAg ICBicmVhazsKKyAgICB9CisgICAgY2FzZSBOT19DVVJTT1I6CisgICAgICB3LT5waHlzX2N1cnNv cl93aWR0aCA9IDA7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJv cnQgKCk7CisgIH0KIAotCWNhc2UgSEJBUl9DVVJTT1I6Ci0JICB4X2RyYXdfYmFyX2N1cnNvciAo dywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKLQkgIGJyZWFrOworLyog ZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogCi0JY2Fz ZSBOT19DVVJTT1I6Ci0JICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7Ci0JICBicmVhazsKIAot CWRlZmF1bHQ6Ci0JICBlbWFjc19hYm9ydCAoKTsKLQl9CiAgICAgfQogfQogCmRpZmYgLS1naXQg YS9zcmMvd2luZG93LmggYi9zcmMvd2luZG93LmgKaW5kZXggY2MwYjZiNi4uNDBmOGE4NSAxMDA2 NDQKLS0tIGEvc3JjL3dpbmRvdy5oCisrKyBiL3NyYy93aW5kb3cuaApAQCAtNzYsNiArNzYsNjIg QEAgb25lIGFuZCB0aGUgc2FtZSwgc28gaXRzIHByZXYgYW5kIG5leHQgbWVtYmVycyBhcmUgbmls LgogCiBBIGRlYWQgd2luZG93IGhhcyBpdHMgY29udGVudHMgZmllbGQgc2V0IHRvIG5pbC4gICov CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKy8qIFN1ZmZpeGVzIGZvciB0aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBwcmVmaXguICov CitzdHJ1Y3QgbXVsdGlwbGVfY3Vyc29ycworeworICAvKiBWYWx1ZXMgZm9yIHByZXZpb3VzIGFu ZCBjdXJyZW50IGB3aW5kb3ctc3RhcnQnIGFuZCBgd2luZG93LWVuZCcuICovCisgIEVNQUNTX0lO VCBjdXJyZW50X3N0YXJ0LCBjdXJyZW50X2VuZCwgcHJldmlvdXNfc3RhcnQsIHByZXZpb3VzX2Vu ZCwgY3VycmVudF94LCBwcmV2aW91c194OworCisgIC8qIFRydWUgbWVhbnMgdG8gZm9yY2UgYHhf c2V0X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycK KyAgaW4gdzMydGVybS5jIG9yIGBzLT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnIGluIHh0 ZXJtLmMuICovCisgIGJvb2xfYmYgY3Vyc29yX2djX2RlZmF1bHQgOiAxOworCisgIC8qIFRydWUg bWVhbnMgYHhfc2V0X2N1cnN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ovCisgIGludCBwb3NpbnQ7CisKKyAgLyogUGl4 ZWwgcG9zaXRpb24gKHdpbmRvdyByZWxhdGl2ZSkgb2YgaG9yaXpvbnRhbC92ZXJ0aWNhbCBydWxl cnMuICovCisgIGludCBmeCwgZnksIGg7CisKKyAgLyogUmVjb3JkIEZST01fV0hFUkUgd2hlbiBg cmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYScgaXMgY2FsbGVkLiAqLworICBpbnQgcmVkaXNw bGF5X3ByZXNlcnZlX2VjaG9fYXJlYTsKKworICAvKiBUcnVlIG1lYW5zIHRoZSB2aXNpYmxlIGZp bGwgY29sdW1uIGhhcyBub3QgeWV0IGJlZW4gZHJhd24uICovCisgIGJvb2xfYmYgZHJhd19maWxs X2NvbHVtbiA6IDE7CisKKyAgLyogVHJ1ZSBtZWFucyB0aGUgdmlzaWJsZSBmaWxsIGNvbHVtbiBo YXMgbm90IHlldCBiZWVuIGVyYXNlZC4gKi8KKyAgYm9vbF9iZiBlcmFzZV9maWxsX2NvbHVtbiA6 IDE7Cit9OworCisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogc3RydWN0IGN1cnNvcl9wb3MKIHsKICAgLyogUGl4ZWwgcG9zaXRpb24uICBU aGVzZSBhcmUgYWx3YXlzIHdpbmRvdyByZWxhdGl2ZS4gICovCkBAIC0xODEsNiArMjM3LDI4IEBA IHN0cnVjdCB3aW5kb3cKICAgICAvKiBUaGUgaGVscCBlY2hvIHRleHQgZm9yIHRoaXMgd2luZG93 LiAgUW5pbCBpZiB0aGVyZSdzIG5vbmUuICAqLwogICAgIExpc3BfT2JqZWN0IG1vZGVfbGluZV9o ZWxwX2VjaG87CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioq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ioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgLyogTm8gTGlzcCBk YXRhIG1heSBmb2xsb3cgYmVsb3cgdGhpcyBwb2ludCB3aXRob3V0IGNoYW5naW5nCiAgICAgICAg bWFya19vYmplY3QgaW4gYWxsb2MuYy4gIFRoZSBtZW1iZXIgY3VycmVudF9tYXRyaXggbXVzdCBi ZSB0aGUKICAgICAgICBmaXJzdCBub24tTGlzcCBtZW1iZXIuICAqLwpAQCAtMjgzLDYgKzM2MSwx NiBAQCBzdHJ1Y3Qgd2luZG93CiAKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAorCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgIC8qIFRo ZSBwcmVmaXggZm9yIHdpbmRvdyBwb2ludGVycyByZWxhdGluZyB0byBtdWx0aXBsZSBjdXJzb3Jz LiAgKi8KKyAgICBzdHJ1Y3QgbXVsdGlwbGVfY3Vyc29ycyBtYzsKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICAgIC8qIEN1cnNvciB0eXBlIG9mIGxhc3QgY3Vyc29yIGRyYXduIG9u IHRoZSB3aW5kb3cuICAqLwogICAgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgcGh5c19jdXJzb3Jf dHlwZTsKIApAQCAtNDIxLDYgKzUwOSwzMSBAQCBYV0lORE9XIChMaXNwX09iamVjdCBhKQogICBy ZXR1cm4gWFVOVEFHIChhLCBMaXNwX1ZlY3Rvcmxpa2UsIHN0cnVjdCB3aW5kb3cpOwogfQogCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioq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0X3BvcyAqKTsKIHN0YXRpYyB2b2lkIGl0ZXJh dGVfb3V0X29mX2Rpc3BsYXlfcHJvcGVydHkgKHN0cnVjdCBpdCAqKTsKIHN0YXRpYyB2b2lkIHBv cF9pdCAoc3RydWN0IGl0ICopOwotc3RhdGljIHZvaWQgcmVkaXNwbGF5X2ludGVybmFsICh2b2lk KTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8K Kworc3RhdGljIHZvaWQgcmVkaXNwbGF5X2ludGVybmFsIChpbnQpOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiBzdGF0aWMgdm9pZCBlY2hvX2FyZWFfZGlzcGxheSAoYm9vbCk7CiBz dGF0aWMgdm9pZCBibG9ja19idWZmZXJfZmxpcHMgKHZvaWQpOwogc3RhdGljIHZvaWQgdW5ibG9j a19idWZmZXJfZmxpcHMgKHZvaWQpOwpAQCAtOTIxLDYgKzkzMCw1MTE3IEBAIHN0YXRpYyB2b2lk IHNob3dfbW91c2VfZmFjZSAoTW91c2VfSExJbmZvICosIGVudW0gZHJhd19nbHlwaHNfZmFjZSk7 CiBzdGF0aWMgYm9vbCBjb29yZHNfaW5fbW91c2VfZmFjZV9wIChzdHJ1Y3Qgd2luZG93ICosIGlu dCwgaW50KTsKIAogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExF IENVUlNPUlMgKi8KKworLyogTVVMVElQTEUgQ1VSU09SUzogIEVtYWNzIEJ1ZyAjMjI4NzMgKGZl YXR1cmUgcmVxdWVzdCkKKworICAgQ1JPU1NIQUlSUzogIEVtYWNzIEJ1ZyAjMTc2ODQgKGZlYXR1 cmUgcmVxdWVzdCkKKworCitQQVRDSCBWRVJTSU9OOiAgMDE0LjAwMCBbMDgvMjgvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDAxIFswOS8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MDIgWzA5LzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwMyBbMDkvMDUvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDA0IFswOS8wOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MDUgWzA5LzA5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwNiBbMDkvMDkvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDA3IFswOS8xMC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MDggWzA5LzEwLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwOSBbMDkvMTEvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDEwIFswOS8xMy8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MTEgWzA5LzE0LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxMiBbMDkvMTcvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDEzIFswOS8xOC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MTQgWzA5LzE5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxNSBbMDkvMjMvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDE2IFswOS8yNC8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MTcgWzA5LzI1LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxOCBbMDkvMjYvMjAxOF0KKyAg ICAgICAgICAgICAgICAwMTQuMDE5IFsxMC8wMS8yMDE4XQorICAgICAgICAgICAgICAgIDAxNC4w MjAgWzEwLzAyLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAyMSBbMTA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B0 byBpbnN0YWxsIHRoYXQgcGFja2FnZToKKworICAgVHlwZTogIE0teCBtYy1pbnN0YWxsCisKKyAg IE9SLCBldmFsdWF0ZSB0aGUgZm9sbG93aW5nIHNuaXBwZXQ6CisKKyAgKHByb2duCisgICAgKHJl cXVpcmUgJ3BhY2thZ2UpCisgICAgKGFkZC10by1saXN0ICdwYWNrYWdlLWFyY2hpdmVzICcoIm1l bHBhIiAuICJodHRwOi8vbWVscGEubWlsa2JveC5uZXQvcGFja2FnZXMvIikgdCkKKyAgICAocGFj a2FnZS1pbml0aWFsaXplKQorICAgIChwYWNrYWdlLXJlZnJlc2gtY29udGVudHMpCisgICAgKHBh Y2thZ2UtaW5zdGFsbCAnbXVsdGlwbGUtY3Vyc29ycykpCisKKy0gIFRvIHRyeSBvdXQgY3Jvc3No YWlycyBhbmQgdGhlIHZpc2libGUgZmlsbCBjb2x1bW4sIHR5cGU6ICBNLXggKy1tb2RlCisKKy0g IFRvIHRyeSBvdXQgb25seSB0aGUgdmlzaWJsZSBmaWxsIGNvbHVtbiwgdHlwZTogIE0teCBtYy1m aWxsLWNvbHVtbi1tb2RlCisKKy0gIFRvIGxlYXJuIGhvdyB0byB1c2UgdGhlIG11bHRpcGxlIGZh a2UgY3Vyc29ycyBmZWF0dXJlLCBleGFtaW5lIHRoZQorICAgaW50ZXJhY3RpdmUgZnVuY3Rpb24g YG1jLXRlc3QnLgorCisKK0VYQU1QTEUgT0YgVVNJTkcgTVVMVElQTEUgRkFLRSBDVVJTT1JTOgor CisgIDs7OyAnKEJVRkZFUi1QT1NJVElPTiBDVVJTT1ItVFlQRSBDVVJTT1ItQ09MT1IpCisgIDs7 OworICAoc2V0cSBtdWx0aXBsZS1jdXJzb3JzLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMiAiYmFyIiAicHVycGxlIikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKDMgImJveCI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jg3MworCitDUkVBVEUgUEFUQ0hFUzogIGdpdCBmb3JtYXQtcGF0Y2ggLTEgU0hBCisgICAg ICAgICAgICAgICAgIGdpdCBmb3JtYXQtcGF0Y2ggLTEgLW8gL3BhdGgvdG8vb3V0cHV0L2RpcmVj dG9yeSBTSEEKKworTEVHRU5EOgorCittYWtlX251bWJlciA9PiBtYWtlX2ZpeG51bQorCitYSU5U ID0+IFhGSVhOVU0KKworUkFOR0VEX0lOVEVHRVJQID0+IFJBTkdFRF9GSVhOVU1QCisKK1RZUEVf UkFOR0VEX0lOVEVHRVJQID0+IFRZUEVfUkFOR0VEX0ZJWE5VTVAKKworWEZBU1RJTlQgPT4gWEZJ WE5BVAorCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wICYmIEJV RkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAgICAgICAgfHwgIU5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgfHwgIU5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZmlsbF9jb2x1bW4pKSkpCisgICAg eworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRPVyAod2luZG93LCB3 KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFfdG9fc3RyaW5nICh3 aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RBVEEgKHdpbmRvd19z dHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG53aW5kb3cgKCVzKVxuIiwgd2luZG93 X2NoYXIpOworICAgIH0KKyNlbmRpZgorCisjaWZkZWYgR0xZUEhfRE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gICBpZiAoc2NhbiAhPSBvbGRfc2Nh bikKKyAgICAgIHNjYW5fYnl0ZSA9IENIQVJfVE9fQllURSAoc2Nhbik7CisgICAgaWYgKHNjYW4g Pj0gZW5kKQorICAgICAgZ290byBlbmRsb29wOworICB9CisgICAgICAvKiBUZXN0IHJlYWNoaW5n IHRoZSBnb2FsIGNvbHVtbi4gIFdlIGRvIHRoaXMgYWZ0ZXIgc2tpcHBpbmcKKyAgIGludmlzaWJs ZSBjaGFyYWN0ZXJzLCBzbyB0aGF0IHdlIHB1dCBwb2ludCBiZWZvcmUgdGhlCisgICBjaGFyYWN0 ZXIgb24gd2hpY2ggdGhlIGN1cnNvciB3aWxsIGFwcGVhci4gICovCisgICAgICBpZiAoY29sID49 IGdvYWwpCisgIGJyZWFrOworICAgICAgcHJldl9jb2wgPSBjb2w7CisgICAgICB7IC8qIENoZWNr IGRpc3BsYXkgcHJvcGVydHkuICAqLworICBwdHJkaWZmX3QgZW5kcDsKKyAgaW50IHdpZHRoID0g bWNfY2hlY2tfZGlzcGxheV93aWR0aCAoc2NhbiwgY29sLCAmZW5kcCk7CisgIGlmICh3aWR0aCA+ PSAwKQorICAgIHsKKyAgICAgIGNvbCArPSB3aWR0aDsKKyAgICAgIGlmIChlbmRwID4gc2Nhbikg LyogQXZvaWQgaW5maW5pdGUgbG9vcHMgd2l0aCAwLXdpZHRoIG92ZXJsYXlzLiAgKi8KKyAgICAg ICAgeworICAgIHNjYW4gPSBlbmRwOworICAgIHNjYW5fYnl0ZSA9IENIQVJfVE9fQllURSAoc2Nh bik7CisgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICB9CisgICAgICB9CisgICAgICAvKiBD aGVjayBjb21wb3NpdGlvbiBzZXF1ZW5jZS4gICovCisgICAgICBpZiAoY21wX2l0LmlkID49IDAK KyAgICB8fCAoc2NhbiA9PSBjbXBfaXQuc3RvcF9wb3MKKyAgICAgICAgJiYgY29tcG9zaXRpb25f cmVzZWF0X2l0ICgmY21wX2l0LCB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ICAg VXBkYXRlIHRoZSBjb2x1bW4vcG9zaXRpb24gYmFzZWQgb24gdGhvc2UgZ2x5cGhzLiAgKi8KKyAg ICBjaGFydmVjID0gRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpOworICAgIG4gPSBBU0laRSAoY2hh cnZlYyk7CisgICAgZm9yIChpID0gMDsgaSA8IG47IGkrKykKKyAgICAgIHsKKyAgICAgICAgLyog VGhpcyBzaG91bGQgYmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAgICBuZXh0X2VsZW1lbnRfZnJv bV9kaXNwbGF5X3ZlY3RvciBkb2VzIGl0LiAgKi8KKyAgICAgICAgTGlzcF9PYmplY3QgZW50cnkg PSBBUkVGIChjaGFydmVjLCBpKTsKKyAgICAgICAgaWYgKEdMWVBIX0NPREVfUCAoZW50cnkpKQor ICAgIGMgPSBHTFlQSF9DT0RFX0NIQVIgKGVudHJ5KTsKKyAgICAgICAgZWxzZQorICAgIGMgPSAn ICc7CisgICAgICAgIGlmIChjID09ICdcbicpCisgICAgZ290byBlbmRsb29wOworICAgICAgICBp ZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3Bs YXkpLCBRdCkpCisgICAgZ290byBlbmRsb29wOworICAgICAgICBpZiAoYyA9PSAnXHQnKQorICAg IHsKKyAgICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAgICBjb2wgPSBjb2wgLyB0YWJfd2lkdGgg KiB0YWJfd2lkdGg7CisgICAgfQorICAgICAgICBlbHNlCisgICAgKytjb2w7CisgICAgICB9Cisg IH0KKyAgICAgIGVsc2UKKyAgeworICAgIC8qIFRoZSBkaXNwbGF5IHRhYmxlIGRvZXNuJ3QgYWZm ZWN0IHRoaXMgY2hhcmFjdGVyOworICAgICAgIGl0IGRpc3BsYXlzIGFzIGl0c2VsZi4gICovCisg ICAgaWYgKGMgPT0gJ1xuJykKKyAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICBpZiAoYyA9PSAnXHIn ICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3BsYXkpLCBRdCkpCisg ICAgICBnb3RvIGVuZGxvb3A7CisgICAgaWYgKGMgPT0gJ1x0JykKKyAgICAgIHsKKyAgICAgICAg Y29sICs9IHRhYl93aWR0aDsKKyAgICAgICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dp ZHRoOworICAgICAgfQorICAgIGVsc2UgaWYgKG11bHRpYnl0ZSAmJiBMRUFESU5HX0NPREVfUCAo YykpCisgICAgICB7CisgICAgICAgIC8qIFN0YXJ0IG9mIG11bHRpLWJ5dGUgZm9ybS4gICovCisg ICAgICAgIHVuc2lnbmVkIGNoYXIgKnB0cjsKKyAgICAgICAgaW50IGJ5dGVzLCB3aWR0aDsKKyAg ICAgICAgcHRyID0gQllURV9QT1NfQUREUiAoc2Nhbl9ieXRlKTsKKyAgICAgICAgTUNfTVVMVElC WVRFX0JZVEVTX1dJRFRIIChwdHIsIGRwLCBieXRlcywgd2lkdGgpOworICAgICAgICAvKiBTdWJ0 cmFjdCBvbmUgdG8gY29tcGVuc2F0ZSBmb3IgdGhlIGluY3JlbWVudAorICAgICB0aGF0IGlzIGdv aW5nIHRvIGhhcHBlbiBiZWxvdy4gICovCisgICAgICAgIHNjYW5fYnl0ZSArPSBieXRlcyAtIDE7 CisgICAgICAgIGNvbCArPSB3aWR0aDsKKyAgICAgIH0KKyAgICBlbHNlIGlmIChjdGxfYXJyb3cg JiYgKGMgPCAwNDAgfHwgYyA9PSAwMTc3KSkKKyAgICAgIGNvbCArPSAyOworICAgIGVsc2UgaWYg KGMgPCAwNDAgfHwgYyA+PSAwMTc3KQorICAgICAgY29sICs9IDQ7CisgICAgZWxzZQorICAgICAg Y29sKys7CisgIH0KKyAgICAgIHNjYW4rKzsKKyAgICAgIHNjYW5fYnl0ZSsrOworICAgIH0KKyBl bmRsb29wOgorICBsYXN0X2tub3duX2NvbHVtbiA9IGNvbDsKKyAgbGFzdF9rbm93bl9jb2x1bW5f cG9pbnQgPSBwdDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fbW9kaWZpZWQgPSBNT0RJRkY7CisgIGlm IChnb2FsY29sKQorICAgICpnb2FsY29sID0gY29sOworICBpZiAoZW5kcG9zKQorICAgICplbmRw b3MgPSBzY2FuOworICBpZiAocHJldmNvbCkKKyAgICAqcHJldmNvbCA9IHByZXZfY29sOworfQor CitwdHJkaWZmX3QKK21jX2N1cnJlbnRfY29sdW1uIChzdHJ1Y3Qgd2luZG93ICp3LCBwdHJkaWZm X3QgcHQpCit7CisgIC8qIGBidWZfY2hhcnBvc190b19ieXRlcG9zJzogIGVhc3NlcnQgKEJVRl9C RUcgKGIpIDw9IGNoYXJwb3MgJiYgY2hhcnBvcyA8PSBCVUZfWiAoYikpOyAqLworICBMaXNwX09i amVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgQ0hFQ0tfQlVGRkVSIChidWYpOworICBzdHJ1Y3Qg YnVmZmVyICpiID0gWEJVRkZFUiAoYnVmKTsKKyAgYm9vbCBiYXJmX2NyYXNoID0gKEJVRl9CRUcg KGIpIDw9IHB0ICYmIHB0IDw9IEJVRl9aIChiKSkgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJm X2NyYXNoKQorICAgIHJldHVybiAwOworICBFTUFDU19JTlQgbGFzdF9rbm93bl9jb2x1bW5fbW9k aWZpZWQgPSAwOworICBwdHJkaWZmX3QgbGFzdF9rbm93bl9jb2x1bW4gPSAwOworICBwdHJkaWZm X3QgY29sOworICB1bnNpZ25lZCBjaGFyICpwdHIsICpzdG9wOworICBib29sIHRhYl9zZWVuOwor ICBwdHJkaWZmX3QgcG9zdF90YWI7CisgIGludCBjOworICBpbnQgdGFiX3dpZHRoID0gU0FORV9U QUJfV0lEVEggKGN1cnJlbnRfYnVmZmVyKTsKKyAgYm9vbCBjdGxfYXJyb3cgPSAhTklMUCAoQlZB UiAoY3Vyc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2hlcmUgY29uc2VjdXRpdmUgY2hhcnMgbGVhdmUg b2ZmLAorICAgICBnb2luZyBiYWNrd2FyZHMgZnJvbSBwb2ludC4gICovCisgIGlmIChwdCA9PSBC RUdWKQorICAgIHN0b3AgPSBwdHI7CisgIGVsc2UgaWYgKHB0IDw9IEdQVCB8fCBCRUdWID4gR1BU KQorICAgIHN0b3AgPSBCRUdWX0FERFI7CisgIGVsc2UKKyAgICBzdG9wID0gR0FQX0VORF9BRERS OworICBjb2wgPSAwLCB0YWJfc2VlbiA9IDAsIHBvc3RfdGFiID0gMDsKKyAgd2hpbGUgKDEpCisg ICAgeworICAgICAgcHRyZGlmZl90IGksIG47CisgICAgICBMaXNwX09iamVjdCBjaGFydmVjOwor ICAgICAgaWYgKHB0ciA9PSBzdG9wKQorICB7CisgICAgLyogV2Ugc3RvcHBlZCBlaXRoZXIgZm9y IHRoZSBiZWdpbm5pbmcgb2YgdGhlIGJ1ZmZlcgorICAgICAgIG9yIGZvciB0aGUgZ2FwLiAgKi8K KyAgICBpZiAocHRyID09IEJFR1ZfQUREUikKKyAgICAgIGJyZWFrOworICAgIC8qIEl0IHdhcyB0 aGUgZ2FwLiAgSnVtcCBiYWNrIG92ZXIgaXQuICAqLworICAgIHN0b3AgPSBCRUdWX0FERFI7Cisg ICAgcHRyID0gR1BUX0FERFI7CisgICAgLyogQ2hlY2sgd2hldGhlciB0aGF0IGJyaW5ncyB1cyB0 byBiZWdpbm5pbmcgb2YgYnVmZmVyLiAgKi8KKyAgICBpZiAoQkVHViA+PSBHUFQpCisgICAgICBi cmVhazsKKyAgfQorICAgICAgYyA9ICotLXB0cjsKKyAgICAgIGlmIChkcCAmJiBWRUNUT1JQIChE SVNQX0NIQVJfVkVDVE9SIChkcCwgYykpKQorICB7CisgICAgY2hhcnZlYyA9IERJU1BfQ0hBUl9W RUNUT1IgKGRwLCBjKTsKKyAgICBuID0gQVNJWkUgKGNoYXJ2ZWMpOworICB9CisgICAgICBlbHNl CisgIHsKKyAgICBjaGFydmVjID0gUW5pbDsKKyAgICBuID0gMTsKKyAgfQorICAgICAgZm9yIChp ID0gbiAtIDE7IGkgPj0gMDsgLS1pKQorICB7CisgICAgaWYgKFZFQ1RPUlAgKGNoYXJ2ZWMpKQor ICAgICAgeworICAgICAgICAvKiBUaGlzIHNob3VsZCBiZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisg ICAgIG5leHRfZWxlbWVudF9mcm9tX2Rpc3BsYXlfdmVjdG9yIGRvZXMgaXQuICAqLworICAgICAg ICBMaXNwX09iamVjdCBlbnRyeSA9IEFSRUYgKGNoYXJ2ZWMsIGkpOworICAgICAgICBpZiAoR0xZ UEhfQ09ERV9QIChlbnRyeSkpCisgICAgYyA9IEdMWVBIX0NPREVfQ0hBUiAoZW50cnkpOworICAg ICAgICBlbHNlCisgICAgYyA9ICcgJzsKKyAgICAgIH0KKyAgICBpZiAoYyA+PSAwNDAgJiYgYyA8 IDAxNzcpCisgICAgICBjb2wrKzsKKyAgICBlbHNlIGlmIChjID09ICdcbicKKyAgICAgICB8fCAo YyA9PSAnXHInCisgICAgICAgICAgICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0 aXZlX2Rpc3BsYXkpLCBRdCkpKQorICAgICAgeworICAgICAgICBwdHIrKzsKKyAgICAgICAgZ290 byBzdGFydF9vZl9saW5lX2ZvdW5kOworICAgICAgfQorICAgIGVsc2UgaWYgKGMgPT0gJ1x0JykK KyAgICAgIHsKKyAgICAgICAgaWYgKHRhYl9zZWVuKQorICAgIGNvbCA9ICgoY29sICsgdGFiX3dp ZHRoKSAvIHRhYl93aWR0aCkgKiB0YWJfd2lkdGg7CisgICAgICAgIHBvc3RfdGFiICs9IGNvbDsK KyAgICAgICAgY29sID0gMDsKKyAgICAgICAgdGFiX3NlZW4gPSAxOworICAgICAgfQorICAgIGVs c2UgaWYgKFZFQ1RPUlAgKGNoYXJ2ZWMpKQorICAgICAgLyogV2l0aCBhIGRpc3BsYXkgdGFibGUg ZW50cnksIEMgaXMgZGlzcGxheWVkIGFzIGlzLCBhbmQKKyAgICAgICAgIG5vdCBkaXNwbGF5ZWQg YXMgXE5OTiBvciBhcyBeTi4gIElmIEMgaXMgYSBzaW5nbGUtYnl0ZQorICAgICAgICAgY2hhcmFj dGVyLCBpdCB0YWtlcyBvbmUgY29sdW1uLiAgSWYgQyBpcyBtdWx0aS1ieXRlIGluCisgICAgICAg ICBhIHVuaWJ5dGUgYnVmZmVyLCBpdCdzIHRyYW5zbGF0ZWQgdG8gdW5pYnl0ZSwgc28gaXQKKyAg ICAgICAgIGFsc28gdGFrZXMgb25lIGNvbHVtbi4gICovCisgICAgICArK2NvbDsKKyAgICBlbHNl CisgICAgICBjb2wgKz0gKGN0bF9hcnJvdyAmJiBjIDwgMDIwMCkgPyAyIDogNDsKKyAgfQorICAg IH0KKyBzdGFydF9vZl9saW5lX2ZvdW5kOgorICBpZiAodGFiX3NlZW4pCisgICAgeworICAgICAg Y29sID0gKChjb2wgKyB0YWJfd2lkdGgpIC8gdGFiX3dpZHRoKSAqIHRhYl93aWR0aDsKKyAgICAg IGNvbCArPSBwb3N0X3RhYjsKKyAgICB9CisgIGxhc3Rfa25vd25fY29sdW1uID0gY29sOworICBs YXN0X2tub3duX2NvbHVtbl9wb2ludCA9IHB0OworICBsYXN0X2tub3duX2NvbHVtbl9tb2RpZmll ZCA9IE1PRElGRjsKKyAgcmV0dXJuIGNvbDsKK30KKworc3RhdGljIGludAorbWNfbGlzcF90b19j dXJzb3JfdHlwZSAoTGlzcF9PYmplY3QgYXJnKQoreworICBjaGFyICpzdHI7CisgIGlmIChYVFlQ RSAoYXJnKSA9PSBMaXNwX1N0cmluZykKKyAgICBzdHIgPSBTU0RBVEEgKGFyZyk7CisgIGVsc2Ug aWYgKFhUWVBFIChhcmcpID09IExpc3BfU3ltYm9sKQorICAgIHN0ciA9IFNTREFUQSAoU1lNQk9M X05BTUUgKGFyZykpOworICBlbHNlIHJldHVybiAtMTsKKyAg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NtYXApKQorICAgIHsKKyAgICAgIGJtMSA9IEZhc3NxIChiaXRt YXAsIGNtYXApOworICAgICAgaWYgKENPTlNQIChibTEpKQorICB7CisgICAgaWYgKChibTEgPSBY Q0RSIChibTEpKSwgTklMUCAoYm0xKSkKKyAgICAgIHJldHVybiBOT19GUklOR0VfQklUTUFQOwor ICAgIGlmIChDT05TUCAoYm0xKSkKKyAgICAgIHsKKyAgICAgICAgbG4xID0gWEZJWE5VTSAoRmxl bmd0aCAoYm0xKSk7CisgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgeworICAgICAgaWYgKGxu MSA+IGl4MikKKyAgICAgICAgeworICAgICAgICAgIGJtID0gRm50aCAobWFrZV9maXhudW0gKGl4 MiksIGJtMSk7CisgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgIGdvdG8gZm91bmQ7 CisgICAgICAgIH0KKyAgICB9CisgICAgICAgIGVsc2UKKyAgICB7CisgICAgICBpZiAobG4xID4g aXgxKQorICAgICAgICB7CisgICAgICAgICAgYm0gPSBGbnRoIChtYWtlX2ZpeG51bSAoaXgxKSwg Ym0xKTsKKyAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgZ290byBmb3VuZDsKKyAg ICAgICAgfQorICAgIH0KKyAgICAgIH0KKyAgICBlbHNlIGlmICgoYm0gPSBibTEsICFFUSAoYm0s IFF0KSkpCisgICAgICBnb3RvIGZvdW5kOworICB9CisgICAgfQorICBpZiAoIUVRIChjbWFwLCBC VkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkKKyAgICAgICYm ICFOSUxQIChCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkp CisgICAgeworICAgICAgYm0yID0gRmFzc3EgKGJpdG1hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0 cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpOworICAgICAgaWYgKENPTlNQIChibTIpKQorICB7 CisgICAgaWYgKChibTIgPSBYQ0RSIChibTIpKSwgIU5JTFAgKGJtMikpCisgICAgICB7CisgICAg ICAgIGlmIChDT05TUCAoYm0yKSkKKyAgICB7CisgICAgICBsbjIgPSBYRklYTlVNIChGbGVuZ3Ro IChibTIpKTsKKyAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAo bG4yID4gaXgyKQorICAgICAgeworICAgICAgICBibSA9IEZudGggKG1ha2VfZml4bnVtIChpeDIp LCBibTIpOworICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgIGdvdG8gZm91bmQ7 CisgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgICB9CisgIH0KKyAgICB9CisgIGlmIChs bjEgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBGbnRoIChtYWtlX2ZpeG51bSAoaXgxKSwgYm0x KTsKKyAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAo bG4yID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gRm50aCAobWFrZV9maXhudW0gKGl4MSksIGJt Mik7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJu IE5PX0ZSSU5HRV9CSVRNQVA7CisgICAgfQorICBlbHNlIGlmICgoYm0gPSBibTIsIE5JTFAgKGJt KSkpCisgICAgcmV0dXJuIE5PX0ZSSU5HRV9CSVRNQVA7CisgZm91bmQ6CisgIHJldHVybiBsb29r dXBfZnJpbmdlX2JpdG1hcCAoYm0pOworfQorCit2b2lkCittY19lcmFzZV9waHlzX2N1cnNvciAo c3RydWN0IHdpbmRvdyAqdywgaW50IGZsYXZvcikKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZS QU1FICh3LT5mcmFtZSk7CisgIE1vdXNlX0hMSW5mbyAqaGxpbmZvID0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cnMuICovCisKK3N0YXRpYyB2b2lkCittY19kcmF3X2VyYXNlX2h5 YnJpZCAoc3RydWN0IHdpbmRvdyAqdywgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50 IGhwb3MsIGludCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgIGludCBoLCBlbnVtIHRleHRf Y3Vyc29yX2tpbmRzIGN1cnNvcl90eXBlLCBpbnQgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICAg ICAgICAgICAgIExpc3BfT2JqZWN0IGNvbG9yX3ZlY3RvciwgYm9vbCBhY3RpdmVfY3Vyc29yX3As IGJvb2wgbWluaW1hbF9wLAorICAgICAgICAgICAgICAgICAgICAgIGludCBmbGF2b3IsIGludCBw b3NpbnQsIGJvb2wgcmVtb3ZlX3ApCit7CisgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5j YCBjb250YWlucyB0aGUgZm9sbG93aW5nIHRlc3RzLAorICBlYXNzZXJ0IChtYXRyaXggJiYgbWF0 cml4LT5yb3dzKTsKKyAgZWFzc2VydCAocm93ID49IDAgJiYgcm93IDwgbWF0cml4LT5ucm93cyk7 ICovCisgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAody0+Y3VycmVudF9tYXRyaXggJiYgdy0+Y3Vy cmVudF9tYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUp CisgICAgcmV0dXJuOworICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZwb3MgPj0gMCAmJiB2cG9z IDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZf Y3Jhc2hfdHdvKQorICAgIHJldHVybjsKKyAgaWYgKHggPCAwCisgICAgICB8fCB5IDwgMAorICAg ICAgfHwgaHBvcyA8IDAKKyAgICAgIHx8IHZwb3MgPCAwKQorICAgIHJldHVybjsKKyAgTGlzcF9P YmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgIENIRUNLX0JVRkZFUiAoYnVmKTsKKyAgYm9vbCBh dXRvX2hzY3JvbGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRvX2hzY3Jv bGxfbW9kZSwgYnVmKSwgUWN1cnJlbnRfbGluZSk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxl ZnQgNSkgKi8KKyAgYm9vbCBoc2NsX2FsbF90ZW1wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3Jv bGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBD LXggPCBhbmQgZG8gbm90aGluZy4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzBfcCA9ICh3LT5z dXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9f aHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xs ID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3Jv bGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgZWxzZSBiZXNp ZGVzIGhvcml6b250YWxseSBzY3JvbGxpbmcgdGhlCisgICAgICAgICAgICAgICBjdXJyZW50IGxp bmUgZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9y aXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1f MV9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9o c2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xs ID09IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCAuLi4KKyAgICAg ICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlm ZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8yX3AgPSAoIXctPnN1c3BlbmRfYXV0 b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21v ZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPT0gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwpOworICAv KiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpOyBhbmQsIHRoZW4gcHJlc3MgdGhlIGxlZnQgYXJy b3cga2V5IG9uZSB0aW1lLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18gaG9yaXpv bnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiovCisgIGJvb2wgaHNjbF90ZW1wX3AgPSAoIXct PnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Ny b2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6 ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyB0aGF0IGNhdXNlcyB0aGUgY3VycmVudCBsaW5l IHRvIGJlCisgICAgICAgICAgICAgICBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHku CisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Nyb2xsZWQg ZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9wZXJtX3AgPSAoIXctPnN1c3BlbmRfYXV0b19o c2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAg ICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAg ICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWlu X2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ ZnJhbWUpOworICAvKiBSZWNvcmQgc29tZSBvZiB0aGUgY3VycmVudCB2YWx1ZXMgZm9yIHRoZSBj dXJzb3IgYW5kIGdseXBoX3Jvdy4gKi8KKyAgYm9vbCBwaHlzX2N1cnNvcl9vbl9wID0gdy0+cGh5 c19jdXJzb3Jfb25fcDsKKyAgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93ID0gTUFUUklYX1JP VyAody0+Y3VycmVudF9tYXRyaXgsIHZwb3MpOworICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA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92ZV9wCisgICAgICAgICAgICAgJiYgZmxh dm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAgICAgICAgJiYgKGhzY2xfYWxs X3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAg ICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2Fs bF9wZXJtXzJfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAg ICAgICB8fCBoc2NsX3Blcm1fcCkpCisgICAgICB7CisgICAgICAgIGVudW0gZmFjZV9pZCBvdmVy bGF5X2Fycm93X2ZhY2VfaWQgPQorICAgICAgICAgICghYWN0aXZlX2N1cnNvcl9wCisgICAgICAg ICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5h Y3RpdmVfd2luZG93cykpKQorICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAgICAg ICAgICA6IChhY3RpdmVfY3Vyc29yX3AKKyAgICAgICAgICAgICAmJiBtaW5pbWFsX3ApCisgICAg ICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJy b3ctaHNjbC1taW5pbWFsLWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICA6IChhY3RpdmVfY3Vyc29y X3AKKyAgICAgICAgICAgICAmJiAhbWluaW1hbF9wKQorICAgICAgICAgICAgPyBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtZmFjZSIpLCB0cnVl KQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAg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m93X2JpdG1hcGAgc2F0aXNmaWVzIHRoZSBm aXJzdCBjb25kaXRpb24KKyAgICAgICAgb2YgKHdoaWNoICE9IE5PX0ZSSU5HRV9CSVRNQVApLiAg QXQgdGhpcyB0aW1lLCBAbGF3bGlzdCBwcmVmZXJzIG5vdCB0bworICAgICAgICByZWx5IHVwb24g YSBMaXNwIHNldHRpbmcgdXNpbmcgYHNldC1mcmluZ2UtYml0bWFwLWZhY2UnLiAqLworICAgICAg ICBnbHlwaF9yb3ctPmxlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBMRUZUX0ZS SU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgZ2x5cGhfcm93LT5sZWZ0X2ZyaW5nZV9vZmZz ZXQgPSAwOworICAgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgdHJ1ZSk7 CisgICAgICB9CisgICAgICBlbHNlIGlmICghcmVtb3ZlX3AKKyAgICAgICAgICAgICAgICYmIChm bGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisgICAgICAgICAgICAgICAgICAg fHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICB8fCBm bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkpCisgICAgICAgIHsKKyAgICAgICAg ICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFO R0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZF UlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBRbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IFFuaWw7CisgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IChjdXJzb3Jf dHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICA/ IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQorICAgICAgICAgICAgICAgICAg ICAgICAgICA6IE5PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgZmFjZV9pZCA9IChjdXJzb3Jf dHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICA/IGxvb2t1 cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXZlcnRpY2FsLWJhci1mYWNlIiksIHRydWUp CisgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIGdseXBo X3Jvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gZmFsc2U7CisgICAgICAgICAgZ2x5cGhfcm93LT5m cmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSAwOworICAgICAgICAgIGdseXBoX3Jvdy0+cmlnaHRf ZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgZ2x5cGhfcm93LT5yaWdo dF9mcmluZ2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgICAgZ2x5cGhfcm93LT5yaWdodF9m cmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIGdseXBo X3JvdywgZmFsc2UpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGZsYXZvciA9PSBNQ19H TFlQSAorICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfR0xZUEhMRVNTCisgICAgICAg ICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19HTFlQSF9UQUIpCisgICAgICAgICAgeworICAgICAg ICAgICAgdy0+bWMuaCA9IGg7CisgICAgICAgICAgICB3LT5tYy5meCA9IGZ4OworICAgICAgICAg ICAgdy0+bWMuZnkgPSBmeTsKKyAgICAgICAgICAgIHctPm1jLmdseXBoX2ZsYXZvciA9IGZsYXZv cjsKKyAgICAgICAgICAgIHctPm1jLnJlZCA9IFhGTE9BVF9EQVRBIChBUkVGIChjb2xvcl92ZWN0 b3IsIDApKTsKKyAgICAgICAgICAgIHctPm1jLmdyZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKGNv bG9yX3ZlY3RvciwgMSkpOworICAgICAgICAgICAgdy0+bWMuYmx1ZSA9IFhGTE9BVF9EQVRBIChB UkVGIChjb2xvcl92ZWN0b3IsIDIpKTsKKyAgICAgICAgICAgIHctPm1jLnBvc2ludCA9IHBvc2lu dDsKKyAgICAgICAgICAgIC8qIFNvbWUgb2YgdGhlc2UgdmFsdWVzIGNvbWUgdGhyb3VnaCBhcyAx LjAwMzkwNiwgd2hpY2ggY2F1c2VzIGEgYnJlYWthZ2UKKyAgICAgICAgICAgIG9mIHRoZSBjb2xv cnMgaW4gdGhhdCBtdWx0aXBsaWNhdGlvbiBieSB0aGUgYmFzZSB3aWxsIGV4Y2VlZCB0aGUgYmFz ZS4gKi8KKyAgICAgICAgICAgIGlmICh3LT5tYy5yZWQgPiAxLjApCisgICAgICAgICAgICAgIHct Pm1jLnJlZCA9IDEuMDsKKyAgICAgICAgICAgIGlmICh3LT5tYy5ncmVlbiA+IDEuMCkKKyAgICAg ICAgICAgICAgdy0+bWMuZ3JlZW4gPSAxLjA7CisgICAgICAgICAgICBpZiAody0+bWMuYmx1ZSA+ IDEuMCkKKyAgICAgICAgICAgICAgdy0+bWMuYmx1ZSA9IDEuMDsKKyAgICAgICAgICAgIEZSQU1F X1JJRiAoZiktPmRyYXdfd2luZG93X2N1cnNvciAodywgZ2x5cGhfcm93LCB4LCB5LCBjdXJzb3Jf dHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3dpZHRoLCB0cnVlLCBhY3RpdmVfY3Vyc29yX3ApOworICAgICAgICAgICAgdy0+bWMuaCA9 IC0xOworICAgICAgICAgICAgdy0+bWMuZnggPSAtMTsKKyAgICAgICAgICAgIHctPm1jLmZ5ID0g LTE7CisgICAgICAgICAgICB3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GFyZWEgd2hlcmUgdGhlIGdseXBoIGNvbWVz IGZyb20uICAqLworCit2b2lkCittY19kdW1wX2dseXBoIChzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cs IHN0cnVjdCBnbHlwaCAqZ2x5cGgsIGludCBhcmVhLCBpbnQgcmVsYXRpdmVfeCkKK3sKKyAgTGlz cF9PYmplY3QgY2hhcmFjdGVyID0gKENIQVJBQ1RFUlAgKG1ha2VfZml4bnVtIChnbHlwaC0+dS5j aCkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICA/IEZjaGFyX3RvX3N0cmluZyAobWFrZV9m aXhudW0gKGdseXBoLT51LmNoKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBRbmlsOwor ICBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgfHwgZ2x5cGgtPnR5cGUgPT0g R0xZUEhMRVNTX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAg IiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4x ZCAlNWQgJTRkICAlM2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBo c1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ct PnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgKGdseXBoLT50 eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgID8gJ0MnCisgICAgICAgICA6ICdHJyksCisgICAg ICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5w aXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPnUuY2gsCisgICAgICAgIGdseXBoLT5mYWNlX2lk LAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRf Ym94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5 cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICgoIU5JTFAgKGNo YXJhY3RlcikKKyAgICAgICAgICYmIGdseXBoLT51LmNoID09IDkpCisgICAgICAgICAgID8gIlxc dCIKKyAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAmJiBnbHlwaC0+ dS5jaCA9PSAxMCkKKyAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgOiAoIU5JTFAgKGNoYXJh Y3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDMyKQorICAgICAgICAgICA/ICJc XHMiCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgJiYgZ2x5cGgt PnUuY2ggIT0gOQorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMTAKKyAgICAgICAgICAg ICYmIGdseXBoLT51LmNoICE9IDMyKQorICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQor ICAgICAgICAgOiAiXFw/IikpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gU1RS RVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICIgJTUi cEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQgJTVk ICU0ZCAgJTNkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2Vk W2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAgICAg Z2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAg ICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRo LAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2 X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5 cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAor ICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAl MS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8g MCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAn SScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVj dCkKKyAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBo LT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lkLAor ICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwK KyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT54LCBnbHlw aC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0i LAorICAgICAgICAnLicpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ09NUE9T SVRFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJw RCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisgICAgICAgIGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkg PyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAg ICcrJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2Jq ZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5 cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5jbXAuaWQp OworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAgZ2x5 cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGds eXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+dS5jbXAuYXV0b21hdGlj KQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVkICU0ZCAgJTNkICAlM2QgJXMgLiBbJWQt JWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT54LCBnbHlwaC0+eSwgZ2x5 cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAorICAgICAg ICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNt cC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG4iKTsKKyAg ICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgpCisgICAgeworI2lm bmRlZiBIQVZFX1hXSURHRVRTCisgICAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQorICAgICAg ZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAlM2Qg MHglMDV4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAgICAg ICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2Fy ZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94 LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVS UCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1Ag KGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgOiAnLScpKSwKKyAg ICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAg ICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5l X3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisgICAgICAgIGdseXBoLT54LCBnbHlwaC0+ eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAor ICAgICAgICAnLicpOworI2VuZGlmCisgICAgfQorfQorCisvKiBEdW1wIHRoZSBjb250ZW50cyBv ZiBnbHlwaCByb3cgYXQgVlBPUyBpbiBNQVRSSVggdG8gc3RkZXJyLgorICAgR0xZUEhTIDAgbWVh bnMgZG9uJ3Qgc2hvdyBnbHlwaCBjb250ZW50cy4KKyAgIEdMWVBIUyAxIG1lYW5zIHNob3cgZ2x5 cGhzIGluIHNob3J0IGZvcm0KKyAgIEdMWVBIUyA+IDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4gbG9u ZyBmb3JtLiAgKi8KKwordm9pZAorbWNfZHVtcF9nbHlwaF9yb3cgKHN0cnVjdCBnbHlwaF9yb3cg KnJvdywgaW50IHZwb3MsIGludCBnbHlwaHMpCit7CisgIGludCByZWxhdGl2ZV94ID0gMDsKKyAg aWYgKGdseXBocyAhPSAxKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuRFVNUCBH TFlQSCBST1dcbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiUm93ICAgICBTdGFydCAgICAg ICBFbmQgVXNlZCBvRT48XFxDVFpGZXNtICAgICBYICAgIFkgICAgVyAgICBIICAgIFYgICAgQSAg ICBQXG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxu Iik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIlM2QgJTkicEQiZCAlOSJwRCJkICU0ZCAlMS4x ZCUxLjFkJTEuMWQlMS4xZFwKKyUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEu MWQgICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZFxuIiwKKyAgICAgICAgIHZwb3MsCisgICAg ICAgICBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyksCisgICAgICAgICBNQVRSSVhfUk9X X0VORF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgcm93LT51c2VkW1RFWFRfQVJFQV0sCisgICAg ICAgICByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wLAorICAgICAgICAgcm93LT5l bmFibGVkX3AsCisgICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9sZWZ0X3AsCisgICAgICAgICBy b3ctPnRydW5jYXRlZF9vbl9yaWdodF9wLAorICAgICAgICAgcm93LT5jb250aW51ZWRfcCwKKyAg ICAgICAgIE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAocm93KSwKKyAgICAgICAgIE1B VFJJWF9ST1dfRElTUExBWVNfVEVYVF9QIChyb3cpLAorICAgICAgICAgcm93LT5lbmRzX2F0X3p2 X3AsCisgICAgICAgICByb3ctPmZpbGxfbGluZV9wLAorICAgICAgICAgcm93LT5lbmRzX2luX21p ZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPnN0YXJ0c19pbl9taWRkbGVfb2ZfY2hhcl9w LAorICAgICAgICAgcm93LT5tb3VzZV9mYWNlX3AsCisgICAgICAgICByb3ctPngsCisgICAgICAg ICByb3ctPnksCisgICAgICAgICByb3ctPnBpeGVsX3dpZHRoLAorICAgICAgICAgcm93LT5oZWln aHQsCisgICAgICAgICByb3ctPnZpc2libGVfaGVpZ2h0LAorICAgICAgICAgcm93LT5hc2NlbnQs CisgICAgICAgICByb3ctPnBoeXNfYXNjZW50KTsKKyAgICAgIC8qIFRoZSBuZXh0IDMgbGluZXMg c2hvdWxkIGFsaWduIHRvICJTdGFydCIgaW4gdGhlIGhlYWRlci4gICovCisgICAgICBmcHJpbnRm IChzdGRlcnIsICIgICAgJTkicEQiZCAlOSJwRCJkXHQlNWRcbiIsIHJvdy0+c3RhcnQub3Zlcmxh eV9zdHJpbmdfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5vdmVybGF5X3N0cmluZ19pbmRleCwK KyAgICAgICAgIHJvdy0+Y29udGludWF0aW9uX2xpbmVzX3dpZHRoKTsKKyAgICAgIGZwcmludGYg KHN0ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcbiIsCisgICAgICAgICBDSEFSUE9TIChyb3ct PnN0YXJ0LnN0cmluZ19wb3MpLAorICAgICAgICAgQ0hBUlBPUyAocm93LT5lbmQuc3RyaW5nX3Bv cykpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAgICU5ZCAlOWRcbiIsIHJvdy0+c3RhcnQu ZHB2ZWNfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5kcHZlY19pbmRleCk7CisgICAgfQorICBp ZiAoZ2x5cGhzID4gMSkKKyAgICB7CisgICAgICBpbnQgYXJlYTsKKyAgICAgIGZvciAoYXJlYSA9 IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgeworICAgIHN0 cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICBzdHJ1Y3QgZ2x5cGgg KmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgIC8qIEdseXBoIGZvciBh IGxpbmUgZW5kIGluIHRleHQuICAqLworICAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiBnbHlw aCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgKytnbHlwaF9lbmQ7 CisgICAgaWYgKGdseXBoIDwgZ2x5cGhfZW5kKQorICAgICAgZnByaW50ZiAoc3RkZXJyLCAiR2x5 cGgjL1RvdGFsIFJlbC5YIFQgICAgICAgUG9zIE8gICBXICAgICBDb2RlIEZhY2UgTFIgICAgIFgg ICAgWSBIUE9TIFZQT1MgWlYgQ1xuIik7CisgICAgZm9yICg7IGdseXBoIDwgZ2x5cGhfZW5kOyAr K2dseXBoKQorICAgICAgeworICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVh LCByZWxhdGl2ZV94KTsKKyAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7 CisgICAgICB9CisgIH0KKyAgICB9CisgIGVsc2UgaWYgKGdseXBocyA9PSAxKQorICAgIHsKKyAg ICAgIGludCBhcmVhOworICAgICAgY2hhciBzW1NIUlRfTUFYICsgNF07CisgICAgICBmb3IgKGFy ZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2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oZSByb3cgd2hpY2ggZGlzcGxheXMgcG9pbnQuCitPcHRpb25hbCBh cmd1bWVudCBHTFlQSFMgMCBtZWFucyBkb24ndCBkdW1wIGdseXBocy4KK0dMWVBIUyAxIG1lYW5z IGR1bXAgZ2x5cGhzIGluIHNob3J0IGZvcm0uCitHTFlQSFMgPiAxIG9yIG9taXR0ZWQgbWVhbnMg ZHVtcCBnbHlwaHMgaW4gbG9uZyBmb3JtLiAgKi8pCisgIChMaXNwX09iamVjdCByb3csIExpc3Bf T2JqZWN0IGdseXBocykKK3sKKyAgc3RydWN0IHdpbmRvdyAqdyA9IFhXSU5ET1cgKHNlbGVjdGVk X3dpbmRvdyk7CisgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeDsKKyAgRU1BQ1NfSU5UIHZw b3M7CisgIGlmIChOSUxQIChyb3cpKQorICAgIHsKKyAgICAgIGludCBkMSwgZDIsIGQzLCBkNCwg ZDUsIHlwb3M7CisgICAgICBib29sIHZpc2libGVfcCA9IHBvc192aXNpYmxlX3AgKHcsIFBULCAm ZDEsICZkMiwgJmQzLCAmZDQsICZkNSwgJnlwb3MpOworICAgICAgaW50IGhlYWRlcl9saW5lX2hl aWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgaW50IHZvZmZzZXQg PSAoaGVhZGVyX2xpbmVfaGVpZ2h0ID4gMAorICAgICAgICAgICAgICAgICAgICAgJiYgeXBvcyA+ IDApCisgICAgICAgICAgICAgICAgICAgICAgPyB5cG9zICsgMQorICAgICAgICAgICAgICAgICAg ICAgIDogeXBvczsKKyAgICAgIGlmICh2aXNpYmxlX3ApCisgICAgICAgIHZwb3MgPSB2b2Zmc2V0 OworICAgICAgICBlbHNlCisgICAgICAgICAgdnBvcyA9IDA7CisgICAgfQorICAgIGVsc2UKKyAg ICAgIHsKKyAgICAgICAgQ0hFQ0tfTlVNQkVSIChyb3cpOworICAgICAgICB2cG9zID0gWEZJWE5V TSAocm93KTsK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3JfcCwgbWluaW1hbF9wLAorICAgICAgICAgICAgICAgICAgICAgICAgZmxhdm9yLCBwb3NpbnQs IHJlbW92ZV9wKTsKKyAgTGlzcF9PYmplY3QgZmlmdGVlbl9lbGVtZW50cyA9IGxpc3RuIChDT05T VFlQRV9IRUFQLCAxNSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg bWFrZV9maXhudW0gKHgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtYWtlX2ZpeG51bSAoZngpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBtYWtlX2ZpeG51bSAoeSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG1ha2VfZml4bnVtIChmeSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1ha2VfZml4bnVtIChocG9zKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKHZwb3MpLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAoaCksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG1jX2N1cnNvcl90eXBlX3RvX2xpc3AgKGN1cnNvcl90eXBl KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0g KGN1cnNvcl93aWR0aCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJh Y2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2Vf Zml4bnVtIChhY3RpdmVfY3Vyc29yX3ApLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtYWtlX2ZpeG51bSAobWluaW1hbF9wKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKGZsYXZvciksCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfZml4bnVtIChwb3NpbnQpKTsKKyAgKnJl c3VsdCA9IEZjb25zIChmaWZ0ZWVuX2VsZW1lbnRzLCAqcmVzdWx0KTsKK30KKworLyogUmV0dXJu IGEgcG9pbnRlciB0byB0aGUgZ2x5cGggVydzIHBoeXNpY2FsIGN1cnNvciBpcyBvbi4gIFZhbHVl IGlzCisgICBudWxsIGlmIFcncyBjdXJyZW50IG1hdHJpeCBpcyBpbnZhbGlkLCBzbyB0aGF0IG5v IG1lYW5pbmdmdWwgZ2x5cGgKKyAgIGNhbiBiZSByZXR1cm5lZC4gICovCisKK3N0cnVjdCBnbHlw aCAqCittY19nZXRfcGh5c19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cgKncsIGludCB4LCBp bnQgaHBvcywgaW50IHZwb3MpCit7CisgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdzsKKyAgc3RydWN0 IGdseXBoICpnbHlwaDsKKyAgaWYgKCEodnBvcyA+PSAwCisgICAgICAgICYmIHZwb3MgPCB3LT5j dXJyZW50X21hdHJpeC0+bnJvd3MpKQorICAgIHJldHVybiBOVUxMOworICByb3cgPSBNQVRSSVhf Uk9XICh3LT5jdXJyZW50X21hdHJpeCwgdnBvcyk7CisgIGlmICghcm93LT5lbmFibGVkX3ApCisg ICAgcmV0dXJuIE5VTEw7CisgIGlmICh3LT5oc2Nyb2xsKQorICAgIHsKKyAgICAgIC8qIFdoZW4g dGhlIHdpbmRvdyBpcyBoc2Nyb2xsZWQsIGN1cnNvciBocG9zIGNhbiBsZWdpdGltYXRlbHkgYmUK KyAgICAgIG91dCBvZiBib3VuZHMsIGJ1dCB3ZSBkcmF3IHRoZSBjdXJzb3IgYXQgdGhlIGNv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LSB5KSArIDEsIGgwKTsKKyAgICAgICAgICB5ID0geTAg LSAxOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICB5MCA9IHdp bmRvd190ZXh0X2JvdHRvbV95ICh3KSAtIGgwOworICAgICAgICAgIGlmICh5ID4geTApCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIGhfdGVtcCArPSB5IC0geTA7CisgICAgICAgICAgICAg IHkgPSB5MDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgKmZ4ID0gV0lORE9XX1RF WFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7CisgICAgICAqZnkgPSBXSU5ET1dfVE9fRlJBTUVf UElYRUxfWSAodywgeSk7CisgICAgICAqaCA9IGhfdGVtcDsKKyAgICAgIGlmIChjdXJzb3JfdHlw ZSA9PSBIQkFSX0NVUlNPUikKKyAgICAgICAgeworICAgICAgICAgIGludCBjdXJzb3JfaGVpZ2h0 ID0gKGN1cnNvcl93aWR0aCA8IDEpID8gbHJpbnQgKDAuMjUgKiAqaCkgOiBjdXJzb3Jfd2lkdGg7 CisgICAgICAgICAgaWYgKGN1cnNvcl9oZWlnaHQgPiBnbHlwaF9yb3ctPmhlaWdodCkKKyAgICAg ICAgICAgIGN1cnNvcl9oZWlnaHQgPSBnbHlwaF9yb3ctPmhlaWdodDsKKyAgICAgICAgICBpZiAo KmggPiBjdXJzb3JfaGVpZ2h0KQorICAgICAgICAgICAgKmZ5ICs9ICpoIC0gY3Vyc29yX2hlaWdo dDsKKyAgICAgICAgICAqaCA9IGN1cnNvcl9oZWlnaHQ7CisgICAgICAgIH0KKyAgICB9Cit9CisK Ky8qIFJldHVybiB0aGUgc3RhcnQgb3IgZW5kIHBvc2l0aW9uIG9mIHRoZSByZWdpb24uCisgICBC RUdJTk5JTkdQIG1lYW5zIHJldHVybiB0aGUgc3RhcnQuCisgICBJZiB0aGVyZSBpcyBubyByZWdp b24gYWN0aXZlLCBzaWduYWwgYW4gZXJyb3IuCisgICBFWEFNUExFIChyZWdpb24tYmVnaW5uaW5n KTogIHJlZ2lvbl9saW1pdCAoMSkKKyAgIEVYQU1QTEUgKHJlZ2lvbi1lbmQpOiAgcmVnaW9uX2xp bWl0ICgwKSAqLworCitzdGF0aWMgTGlzcF9PYmplY3QKK21jX3JlZ2lvbl9saW1pdCAoYm9vbCBi ZWdpbm5pbmdwKQoreworICBMaXNwX09iamVjdCBtOworICBpZiAoIU5JTFAgKFZ0cmFuc2llbnRf bWFya19tb2RlKQorICAgICAgJiYgTklMUCAoVm1hcmtfZXZlbl9pZl9pbmFjdGl2ZSkKKyAgICAg ICYmIE5JTFAgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBtYXJrX2FjdGl2ZSkpKQorICAgIHJldHVy biBRbmlsOworICBtID0gRm1hcmtlcl9wb3NpdGlvbiAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1h cmspKTsKKyAgaWYgKE5JTFAgKG0pKQorICAgIHJldHVybiBRbmlsOworICAvKiBTZWUgYHJlZ2lv bi1hY3RpdmUtcCcgYW5kIGByZWRpc3BsYXktLXVwZGF0ZS1yZWdpb24taGlnaGxpZ2h0Jy4gKi8K KyAgaWYgKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICYmICFOSUxQIChCVkFS IChjdXJyZW50X2J1ZmZlciwgbWFya19hY3RpdmUpKQorICAgICAgJiYgIU5JTFAgKG0pKQorICAg IHJldHVybiBtYWtlX2ZpeG51bSAoKFBUIDwgWEZJWE5BVCAobSkpID09IGJlZ2lubmluZ3AKKyAg ICAgICAgICAgICAgICAgICAgICAgID8gUFQKKyAgICAgICAgICAgICAgICAgICAgICAgIDogY2xp cF90b19ib3VuZHMgKEJFR1YsIFhGSVhOQVQgKG0pLCBaVikpOworICAgICAgZWxzZQorICAgICAg ICByZXR1cm4gUW5pbDsKK30KKwordm9pZAorbWNfZW5naW5lIChzdHJ1Y3QgZ2x5cGhfcm93ICpy b3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YgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGdseXBo LT50eXBlID09IEdMWVBITEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAg ICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTki cEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVz XG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgo cm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAg ICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAg ICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAg ICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDog KFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAg OiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAg ICAgICA6ICctJykpKSwKKyAgICAgICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAg ICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2 X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggPT0gOSkKKyAgICAgICAgICAgPyAiXFx0IgorICAgICAgICAgOiAoIU5J TFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwKQorICAgICAg ICAgICA/ICJcXG4iCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAgICAgICAgID8gIlxccyIKKyAgICAgICAgIDogKCFO SUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAgICAg ICAgICAmJiBnbHlwaC0+dS5jaCAhPSAxMAorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0g MzIpCisgICAgICAgICAgID8gU1NEQVRBIChjaGFyYWN0ZXIpCisgICAgICAgICA6ICJcXD8iKSk7 CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwor LyogICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVT U19HTFlQSCAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBj YXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gs IC0xLCB0ZW1wX3ksIC0xLCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAg LTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAg ICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAg ICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7Cisg ICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAg ICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAg ICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9O VEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2lu dF94ID09IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9w b2ludF9ocG9zID09IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93 ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZf ZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSw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ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0 ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgICAgdGVt cF94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAodGVtcF94IDw9IHRl eHRfYXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3 LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCks IGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1D X0dMWVBITEVTUywgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgICAgICAgICAvKiBgdy0+ cGh5c19jdXJzb3Jfd2lkdGhgIGlzIGRldGVybWluZWQgYnkgYGdseXBoLT5waXhlbF93aWR0aGAs CisgICAgICAgICAgICAgIGFuZCB0aGUgc3BhY2UgYXBwZW5kZWQgdG8gYSBsaW5lIGVuZGluZyBp biBFT0wgaXMgbm90IG5lY2Vzc2FyaWx5CisgICAgICAgICAgICAgIHRoZSBzYW1lIGFzIHRoZSBm cmFtZS1jaGFyLXdpZHRoOyBlLmcuLCB2YXJpYWJsZSB3aXRoIGZvbnQuICBUaHVzLAorICAgICAg ICAgICAgICB3ZSBtdXN0IHVzZSB0aGUgYGdseXBoLT5waXhlbF93aWR0aGAgdG8gYXZvaWQgYmxh bm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mV5b25kIFpWIHRoYXQKKyAgICAgICBtYXkgY29uc2lzdCBvZiBz cGFjZXMgZXF1YWwgdG8gYGl0LT5sbnVtX3BpeGVsX3dpZHRoYCAvIGZyYW1lX2NoYXJfd2lkdGgs CisgICAgICAgb3IganVzdCBvbmUgc3BhY2UgaWYgdGhlcmUgYXJlIG5vIGxpbmUgbnVtYmVycy4g Ki8KKyAgICAgIGJvb2wgenZfcCA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0g cm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICYmIE1BVFJJWF9ST1dfRU5E X0NIQVJQT1MgKHJvdykgPT0gWlYpOworICAgICAgYm9vbCBjdXJzb3JfaW5fZnJpbmdlX3AgPSBv cG9pbnRfeCArIGdseXBoLT5waXhlbF93aWR0aCA+PSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICBp bnQgZmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAmJiBy b3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5j b250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAg ICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0 aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAg ICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpbnQgdGVtcF94ID0gKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAg PyBvcG9pbnRfeAorICAgICAgICAgICAgICAgICAgICA6IHJlbGF0aXZlX3g7CisgICAgICBpZiAo Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1D X1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQ OworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3Jf Z2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg Jl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5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gICAg YHp2X3BgIGVuY29tcGFzc2VzIGEgY291cGxlIG9mIHNpdHVhdGlvbnM6ICBhIGxpbmUgZW5kaW5n IGluIFpWLCBidXQKKyAgICAgICBjb250YWluaW5nIG9uZSBvciBtb3JlIGNoYXJhY3RlcnMgYmVm b3JlIFpWOyBhbmQsIGEgbGluZSBiZXlvbmQgWlYgdGhhdAorICAgICAgIG1heSBjb25zaXN0IG9m IHNwYWNlcyBlcXVhbCB0byBgaXQtPmxudW1fcGl4ZWxfd2lkdGhgIC8gZnJhbWVfY2hhcl93aWR0 aCwKKyAgICAgICBvciBqdXN0IG9uZSBzcGFjZSBpZiB0aGVyZSBhcmUgbm8gbGluZSBudW1iZXJz LiAqLworICAgICAgYm9vbCB6dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9 PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19F TkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgICAgICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA9 IG9wb2ludF94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAg IGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICYm IHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZF UlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9m cmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAg ICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAh cm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ct PmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAg ICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93 LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIGZpbGxfY29sdW1uX3gg PiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAg ICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExF U1MKKyAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisg ICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X3kgPT0gdGVtcF95CisgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3Mg PT0gdGVtcF92cG9zKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAg ICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaW50IHRlbXBfeCA9IChnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAg ICAgICAgICAmJiBmaWxsX2NvbHVtbl94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAg ICAgPyBmaWxsX2NvbHVtbl94CisgICAgICAgICAgICAgICAgICAgIDogcmVsYXRpdmVfeDsKKyAg ICAgIGl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0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgICAgICAgICAgIEVORDogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAg ICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIFNUUkVU Q0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgIHsKKyAg ICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAl NSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAl NWQgJTRkICAlM2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVz ZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAg ICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAg ICAgICA/ICdCJworICA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JnX2xzbCAo dywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICBtaW5p bWFsX3AsIE1DX0dMWVBILCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAg ICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAg SE9SSVpPTlRBTF9SVUxFUjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAg IHsKKyAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0aXZl X3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9ocG9zID09IHRl bXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0g Z2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9z ID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAgICAgIG1jX2dl dF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9oLCBjdXJzb3JfdHlwZSwg Y3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIGlmICh0ZW1wX3ggPD0gdGV4dF9hcmVhX3dpZHRo CisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgd2hpbGUgKHRlbXBf eCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgeworICAgICAg ICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRl bXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywg dGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICBt aW5pbWFsX3AsIE1DX0dMWVBIX1RBQiwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgICAg ICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgfQorICAgICAgICBlbHNl IGlmICh0ZW1wX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAg ICAgICAgICAgICAgJiYgcmVhbF9mYWtlX2N1cnNvcl9wCisgICAgICAgICAgICAgICAgICYmIGds eXBoLT5waXhlbF93aWR0aCA+IGZyYW1lX2NoYXJfd2lkdGgpCisgICAgICAgICAgeworICAgICAg ICAgICAgdGVtcF94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB3aGlsZSAodGVt cF94IDwgcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVt cF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAtMSwgY3Vyc29y X3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSF9UQUIsIHRlbXBfY2hhcnBv cywgcmVzdWx0KTsKKyAgICAgICAgICAgICAgICB0ZW1wX3ggKz0gZnJhbWVfY2hhcl93aWR0aDsK KyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgIC8qIEl0IGlzIHBvc3NpYmxlIHRv IHVzZSBNQ19HTFlQSCBhbmQgYWRqdXN0IHRoZSBmeCBjb29yZGluYXRlOyBob3dldmVyLAorICAg ICAgdGhlIG1pZGRsZS1kb3QgLyBzcGFjZSBnbHlwaCBvbiBhIHdvcmQtd3JhcHBlZCBsaW5lIHdp bGwgYmUgb3ZlcndyaXR0ZW4KKyAgICAgIG51bWVyb3VzIHRpbWVzIGFuZCBpcyB1bnNpZ2h0bHku ICovCisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNl ZFthcmVhXSAtIDEpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsK KyAgICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAm X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnks IHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgICAgICAv KiB0ZW1wX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOyAqLworICAgICAgICAgIHdoaWxlICh0ZW1w X3ggPD0gdGV4dF9hcmVhX3dpZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19o ZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBm b3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9m YWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmlt YWxfcCwgTUNfR0xZUEhMRVNTLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAg IHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAg ICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAg ICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNB TF9SVUxFUjoKKyAgICB7CisgICAgICAvKiBgZ2x5cGgtPmNoYXJwb3NgIGlzIHVucmVsaWFibGUg d2hlbiB0ZXN0aW5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19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAg ICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNB TF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9w CisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAg ICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAg ICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAg ICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAg ICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEhf VEFCOworICAgICAgaW50IHRlbXBfeCA9IG9wb2ludF94OworICAgICAgaWYgKGZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVS VElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgICAgIGlu dCBfZngsIF9meSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vy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AgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJf UklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAg ICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAo Y3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNh dGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRf cCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVh XSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl94ID4gcmVsYXRpdmVf eCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAg ICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnNfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09 IHRlbXBfeQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBv cykKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhfVEFCCisgICAgICAgICAgICAgICAg ICAgOiBNQ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S0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBFTkQ6ICBTVFJFVENIX0dMWVBIICAgICAgICAgICAgICAg ICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkVHSU46ICBJTUFH RV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBIKQorICB7CisgICAg aWYgKG1jX3N0ZGVycl9wKQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiXG4gJTUi cEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQgJTVk ICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2Vk W2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdJJywKKyAgICAgICAg Z2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAg ICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg ICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVs X3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5pbWdfaWQsCisgICAgICAg IGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBn bHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAg ICAgICcuJyk7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUzogIElN QUdFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgY3Vyc29yX3R5cGUg PSBIT0xMT1dfQk9YX0NVUlNPUjsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVt cF95LCAtMSwgdGVtc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tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IENP TVBPU0lURV9HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIHsKKyAgICAg ICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5 InBEImQgJWMgJTNkIDB4JTA2eCIsCisgICAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdLAorICAgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNl ZFthcmVhXSAtIDEpLAorICAgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICAgJysnLAorICAg ICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICA/ICdCJworICAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2Jq ZWN0KQorICAgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgICA6ICctJykpKSwK KyAgICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICAgKHVuc2lnbmVkIGludCkg Z2x5cGgtPnUuY21wLmlkKTsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUx LjFkIiwKKyAgICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgICBnbHlwaC0+bGVmdF9i b3hfbGluZV9wLAorICAgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlm IChnbHlwaC0+dS5jbXAuYXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVk ICU0ZCAgJTNkICAlM2QgJXMgLiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAg IGdseXBoLT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZf cCA/ICJaViIgOiAiLS0iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5j bXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBm cHJpbnRmIChzdGRlcnIsICJcbiIpOworICAgICAgfQorICBzd2l0Y2ggKGFjdGlvbl90eXBlKQor ICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBN VUxUSVBMRV9DVVJTT1JTOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAqLwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAg IHsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCAtMSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFj ZV9pZCksIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19H TFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9S VUxFUjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBi b29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSByZWxhdGl2ZV94CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSB0ZW1wX2hwb3MKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IGdseXBoLT55Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zw b3MpOworICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJz b3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgJl93ZCk7CisgICAgICBpZiAodGVtcF94IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAg ICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAt MSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAg LTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAg ICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsCisgICAg ICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwgdGVtcF9jaGFycG9zLCByZXN1bHQp OworICAgICAgLyogSXQgaXMgcG9zc2libGUgdG8gdXNlIE1DX0dMWVBIIGFuZCBhZGp1c3QgdGhl IGZ4IGNvb3JkaW5hdGU7IGhvd2V2ZXIsCisgICAgICB0aGUgbWlkZGxlLWRvdCAvIHNwYWNlIGds eXBoIG9uIGEgd29yZC13cmFwcGVkIGxpbmUgd2lsbCBiZSBvdmVyd3JpdHRlbgorICAgICAgbnVt ZXJvdXMgdGltZXMgYW5kIGlzIHVuc2lnaHRseS4gKi8KKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMSkKKyAgICAgICAgeworICAg ICAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAgICAgIG1jX2dldF9waHlzX2N1cnNv cl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmX2gsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsICZfd2QpOworICAgICAgICAgIHRlbXBfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7 CisgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8PSB0ZX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F9zb21ldGltZXNfIFpWLgorICAgICAgYGdseXBoLT56dl9wYCBpcyByZWxpYWJs ZSwgYnV0IHJlbGllcyB1cG9uIGEgZmV3IGNvcmUgbW9kaWZpY2F0aW9uLgorICAgICAgYHp2X3Bg IGVuY29tcGFzc2VzIGEgY291cGxlIG9mIHNpdHVhdGlvbnM6ICBhIGxpbmUgZW5kaW5nIGluIFpW LCBidXQKKyAgICAgICBjb250YWluaW5nIG9uZSBvciBtb3JlIGNoYXJhY3RlcnMgYmVmb3JlIFpW OyBhbmQsIGEgbGluZSBiZXlvbmQgWlYgdGhhdAorICAgICAgIG1heSBjb25zaXN0IG9mIHNwYWNl cyBlcXVhbCB0byBgaXQtPmxudW1fcGl4ZWxfd2lkdGhgIC8gZnJhbWVfY2hhcl93aWR0aCwKKyAg ICAgICBvciBqdXN0IG9uZSBzcGFjZSBpZiB0aGVyZSBhcmUgbm8gbGluZSBudW1iZXJzLiAqLwor ICAgICAgYm9vbCB6dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19FTkRfQ0hB UlBPUyAocm93KSA9PSBaVik7CisgICAgICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA9IG9wb2lu dF94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAgIGludCBm bGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+ dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAg ICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAg ICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50 cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRp bnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAg ICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2Vk W2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94ID4gcmVsYXRpdmVf eCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAg ICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChmbGF2b3IgPT0gTUNfVkVSVElDQUxf QkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9C QUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAg ICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICBpbnQgX2Z4LCBfZnks IGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1w X3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJl9m eSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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JlbGlhYmxlLCBidXQgcmVsaWVzIHVw b24gYSBmZXcgY29yZSBtb2RpZmljYXRpb24uCisgICAgICBgenZfcGAgZW5jb21wYXNzZXMgYSBj b3VwbGUgb2Ygc2l0dWF0aW9uczogIGEgbGluZSBlbmRpbmcgaW4gWlYsIGJ1dAorICAgICAgIGNv bnRhaW5pbmcgb25lIG9yIG1vcmUgY2hhcmFjdGVycyBiZWZvcmUgWlY7IGFuZCwgYSBsaW5lIGJl eW9uZCBaViB0aGF0CisgICAgICAgbWF5IGNvbnNpc3Qgb2Ygc3BhY2VzIGVxdWFsIHRvIGBpdC0+ bG51bV9waXhlbF93aWR0aGAgLyBmcmFtZV9jaGFyX3dpZHRoLAorICAgICAgIG9yIGp1c3Qgb25l IHNwYWNlIGlmIHRoZXJlIGFyZSBubyBsaW5lIG51bWJlcnMuICovCisgICAgICBib29sIHp2X3Ag PSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEK KyAgICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID09IFpW KTsKKyAgICAgIGJvb2wgY3Vyc29yX2luX2ZyaW5nZV9wID0gb3BvaW50X3ggKyBnbHlwaC0+cGl4 ZWxfd2lkdGggPj0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgaW50IGZsYXZvciA9IChjdXJzb3Jf aW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmln aHRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAg ICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf VkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9m cmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdo dF9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3ApCisgICAgICAg ICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIDogKGds eXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAg ICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5feCA+IHJlbGF0aXZlX3gpCisgICAgICAg ICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2X3Ap CisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAg IDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAm JiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzX3ZlcnRpY2Fs X3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB0ZW1wX3kKKyAg ICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpCisgICAgICAg ICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZ UEg7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAg ICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAg fHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdI VF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19n ZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92 cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUs IGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFN RV9QSVhFTF9YICh3LCBmaWxsX2NvbHVtbl94KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94 LCBmeCwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAg IGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAg ICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAg ICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAg ICAgYnJlYWs7CisgICAgfQorICB9CisgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFTkQ6ICBDT01QT1NJVEVfR0xZUEggICAgICAg ICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkVHSU46 ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBYV0lER0VUX0dMWVBIKQor ICB7CisjaWZuZGVmIEhBVkVfWFdJREdFVFMKKyAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQor ICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxu ICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICU1ZCAl NGQgICUzZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFth cmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGds eXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAg ID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAg PyAnUycKKyAgICAgICAgICAgIDogJy0nKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwK KyAgICAgICAgZ2x5cGgtPmZhY2Vfa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t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAg ICAgICAgICAgIEhPUklaT05UQUxfUlVMRVI6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAg ICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9S VUxFUjoKKyAgICB7CisgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9 PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRf aHBvcyA9PSB0ZW1wX2hwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9w b2ludF95ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBv cG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7Cisg ICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZfaCwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpZiAodGVtcF94IDw9IHRleHRf YXJlYV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1j X2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3Ms CisgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVn cm91bmQsCisgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBh Y3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwg dGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgLyogSXQgaXMgcG9zc2libGUgdG8gdXNlIE1D X0dMWVBIIGFuZCBhZGp1c3QgdGhlIGZ4IGNvb3JkaW5hdGU7IGhvd2V2ZXIsCisgICAgICB0aGUg bWlkZGxlLWRvdCAvIHNwYWNlIGdseXBoIG9uIGEgd29yZC13cmFwcGVkIGxpbmUgd2lsbCBiZSBv dmVyd3JpdHRlbgorICAgICAgbnVtZXJvdXMgdGltZXMgYW5kIGlzIHVuc2lnaHRseS4gKi8KKyAg ICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFd IC0gMSkKKyAgICAgICAgeworICAgICAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAg ICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9o cG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm X2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgICAgIHRlbXBfeCAr PSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8PSB0ZXh0X2Fy ZWFfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2hl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pYWJsZSwgYnV0IHJlbGllcyB1cG9uIGEgZmV3IGNvcmUgbW9kaWZp Y2F0aW9uLgorICAgICAgYHp2X3BgIGVuY29tcGFzc2VzIGEgY291cGxlIG9mIHNpdHVhdGlvbnM6 ICBhIGxpbmUgZW5kaW5nIGluIFpWLCBidXQKKyAgICAgICBjb250YWluaW5nIG9uZSBvciBtb3Jl IGNoYXJhY3RlcnMgYmVmb3JlIFpWOyBhbmQsIGEgbGluZSBiZXlvbmQgWlYgdGhhdAorICAgICAg IG1heSBjb25zaXN0IG9mIHNwYWNlcyBlcXVhbCB0byBgaXQtPmxudW1fcGl4ZWxfd2lkdGhgIC8g ZnJhbWVfY2hhcl93aWR0aCwKKyAgICAgICBvciBqdXN0IG9uZSBzcGFjZSBpZiB0aGVyZSBhcmUg bm8gbGluZSBudW1iZXJzLiAqLworICAgICAgYm9vbCB6dl9wID0gKGdseXBoIC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAg JiYgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgICAgICBib29sIGN1cnNv cl9pbl9mcmluZ2VfcCA9IG9wb2ludF94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID49IHRleHRfYXJl YV93aWR0aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAg ICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg IDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29u dGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xB U0gKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAg ICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAg ICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19W RVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhM RVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8g TUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChm bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNf VkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7 CisgICAgICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9n ZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHRlbXBfeSwgJl9meSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICZoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAm X3dkKTsKKyAgICAgIGludCBmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIG9w b2ludF94KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVt cF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVt cF9mYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3As IGZsYXZvciwgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgRklMTF9D T0xVTU46ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworICAgIGNhc2UgRklMTF9DT0xVTU46CisgICAgeworICAgICAgLyogYGds eXBoLT5jaGFycG9zYCBpcyB1bnJlbGlhYmxlIHdoZW4gdGVzdGluZyBmb3IgWlYgLS0gd2l0aG91 dCBsaW5lCisgICAgICBudW1iZXJzLCB0aGUgdmFsdWUgaXMgLTE7IHdpdGggbGluZSBudW1iZXJz LCB0aGUgdmFsdWUgaXMgX3NvbWV0aW1lc18gWlYuCisgICAgICBgZ2x5cGgtPnp2X3BgIGlzIHJl bGlhYmxlLCBidXQgcmVsaWVzIHVwb24gYSBmZXcgY29yZSBtb2RpZmljYXRpb24uCisgICAgICBg enZfcGAgZW5jb21wYXNzZXMgYSBjb3VwbGUgb2Ygc2l0dWF0aW9uczogIGEgbGluZSBlbmRpbmcg aW4gWlYsIGJ1dAorICAgICAgIGNvbnRhaW5pbmcgb25lIG9yIG1vcmUgY2hhcmFjdGVycyBiZWZv cmUgWlY7IGFuZCwgYSBsaW5lIGJleW9uZCBaViB0aGF0CisgICAgICAgbWF5IGNvbnNpc3Qgb2Yg c3BhY2VzIGVxdWFsIHRvIGBpdC0+bG51bV9waXhlbF93aWR0aGAgLyBmcmFtZV9jaGFyX3dpZHRo LAorICAgICAgIG9yIGp1c3Qgb25lIHNwYWNlIGlmIHRoZXJlIGFyZSBubyBsaW5lIG51bWJlcnMu ICovCisgICAgICBib29sIHp2X3AgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09 IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VO RF9DSEFSUE9TIChyb3cpID09IFpWKTsKKyAgICAgIGJvb2wgY3Vyc29yX2luX2ZyaW5nZV9wID0g b3BvaW50X3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPj0gdGV4dF9hcmVhX3dpZHRoOworICAgICAg aW50IGZsYXZvciA9IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgJiYg cm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVS VElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAg ICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAg ICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFy b3ctPnRydW5jYXRlZF9vbl9yaWdodF9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+ Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAg ICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5feCA+ IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAg ICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVT UworICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAg ICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiBv cG9pbnRfeSA9PSB0ZW1wX3kKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9 PSB0ZW1wX3Zwb3MpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAg ICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJf QkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAg ICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50IF9meCwgX2Z5 LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVt cF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZf ZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpbnQgZngg PSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBmaWxsX2NvbHVtbl94KTsKKyAgICAg IG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zw b3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVn cm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0 aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9j aGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorICB9CisgIH0KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5EOiAg WFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KK30KKworLyogTVVMVElQTEVfQ1VSU09SU19DQUNIRToKKy0g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KKyAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBILCBvcG9p bnRfcHQsICZyZXN1bHQpOworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAg ICAgICAgICAgICAgIERSQVcgLyBSRUNPUkQgTVVMVElQTEUgQ1VSU09SUyAgICAgICAgICAgICAg ICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBmb3IgKHZsaXN0ID0gQlZB UiAoYiwgbXVsdGlwbGVfY3Vyc29yc19jb25mKTsKKyAgICAgICBDT05TUCAodmxpc3QpOworICAg ICAgIHZsaXN0ID0gWENEUiAodmxpc3QpKQorICAgIHsKKyAgICAgIHNwZWNzID0gWENBUiAodmxp c3QpOworICAgICAgcG9zaW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDApLCBzcGVj cykpOworICAgICAgbGlzcF90eXBlID0gRm50aCAobWFrZV9maXhudW0gKDEpLCBzcGVjcyk7Cisg ICAgICBpZiAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlz cF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSk7CisgICAgICAgIGVsc2UKKyAgICAg ICAgICBjdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7Cisg ICAgICBpZiAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgIGN1cnNvcl93aWR0aCA9IFhGSVhO VU0gKFhDQVIgKFhDRFIgKGxpc3BfdHlwZSkpKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIGN1 cnNvcl93aWR0aCA9IDE7CisgICAgICBmb3JlZ3JvdW5kID0gRm50aCAobWFrZV9maXhudW0gKDIp LCBzcGVjcyk7CisgICAgICBpZiAoU1RSSU5HUCAoZm9yZWdyb3VuZCkpCisgICAgICAgIGZvcmVn cm91bmQgPSBtY19jb2xvcl92ZWN0b3JfY2FsYyAodywgZm9yZWdyb3VuZCk7CisgICAgICBzdHJ1 Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgIGludCBy b3dfc3RhcnQsIHJvd19lbmQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kOworICAg ICAgaW50IGk7CisgICAgICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgICAgIExpc3BfT2Jq ZWN0IHZzcGVjcyA9IFFuaWw7CisgICAgICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsg KytpKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklY X1JPVyAobWF0cml4LCBpKTsKKyAgICAgICAgICByb3dfc3RhcnQgPSBNQVRSSVhfUk9XX1NUQVJU X0NIQVJQT1MgKHJvdyk7CisgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYm IGkgPT0gMSkKKyAgICAgICAgICAgICAgIHx8IChoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCAmJiBp ID09IDApKQorICAgICAgICAgICAgd2luZG93X3Jvd19zdGFydCA9IHJvd19zdGFydDsKKyAgICAg ICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB3 aW5kb3dfcm93X2VuZCA9IHJvd19lbmQ7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAg ICAgfQorICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg cm93X2VuZCA9IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdyk7CisgICAgICAgICAgICAgICAg dGVtcCA9IGxpc3RuIChDT05TVFlQRV9IRUFQLCAzLCBtYWtlX2ZpeG51bSAoaSksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAocm93 X3N0YXJ0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1ha2VfZml4bnVtIChyb3dfZW5kKSk7CisgICAgICAgICAgICAgICAgdnNwZWNzID0gRmNvbnMg KHRlbXAsIHZzcGVjcyk7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKHBv c2ludCA+PSB3aW5kb3dfcm93X3N0YXJ0CisgICAgICAgICAgJiYgcG9zaW50IDw9IHdpbmRvd19y b3dfZW5kKQorICAgICAgICB7CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBm b3IgKHZsaXN0ID0gRm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlz dCk7CisgICAgICAgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAg ICAgICAgICAgaW50IGNvdW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDApLCBYQ0FS ICh2bGlzdCkpKTsKKyAgICAgICAgICAgIGludCBwb3Nfc3RhcnQgPSBYRklYTlVNIChGbnRoICht YWtlX2ZpeG51bSAoMSksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQg PSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAg ICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRy aXgsIGNvdW50KTsKKyAgICAgICAgICAgIGludCBhcmVhOworICAgICAgICAgICAgaW50IHJlbGF0 aXZlX3ggPSAwOworICAgICAgICAgICAgZm9yIChhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJl YSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg c3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgICAgICAg IHN0cnVjdCBnbHlwaCAqZ2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAg ICAgICAgICAgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAm JiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICAgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAg ICAgICAgICAgICAgICBpZiAobWNfc3RkZXJyX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGggPCBnbHlwaF9lbmQpCisgICAgICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisiXG5j b3VudCAoJWQpIHwgd2luZG93X3Jvd19zdGFydC9lbmQgKCVkLyVkKSB8IHJvd19zdGFydC9lbmQg KCVkLyVkKVxuXAorPT09PT09PT09PT09PT09PT09PT09PT09PT09PSBNVUxUSVBMRSBDVVJTT1JT ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXAorR2x5cGgjL1RvdGFsIFJlbC5Y IFQgICAgICAgUG9zIE8gICBXICAgICBDb2RlIEZhY2UgTFIgICAgIFggICAgWSBIUE9TIFZQT1Mg WlYgQ1xuIiwKK2NvdW50LCB3aW5kb3dfcm93X3N0YXJ0LCB3aW5kb3dfcm93X2VuZCwgcG9zX3N0 YXJ0LCBwb3NfZW5kKTsKKyAgICAgICAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7 ICsrZ2x5cGgpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICgo KGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgY291bnQgPiAwKQorICAgICAgICAgICAgICAgICAg ICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAg ICAgJiYgKGdseXBoLT5jaGFycG9zID09IHBvc2ludAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgIC8qIFRoZSBzcGFjZSBhcHBlbmRlZCB0byBhIHJvdyBlbmRpbmcgd2l0aCBhIG5ldyBsaW5l CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9lcyBub3QgaGF2ZSBhIGBnbHlwaC0+Y2hh cnBvc2AgKC0xLCAwKSB0aGF0IHdlIGNhbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVz ZSBmb3IgdGhpcyBwYXJ0aWN1bGFyIGFwcGxpY2F0aW9uLiAgV2hlbiB0aGVyZSBpcyBhCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeSB0aGF0 IGFzc2lnbnMgYSB2aXNpYmxlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGggdG8g YSBuZXcgbGluZSwgdGhlcmUgaXMgbm8gcHJvYmxlbSBiZWNhdXNlIHRoYXQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBnbHlwaCBoYXMgYSBgZ2x5cGgtPmNoYXJwb3MnIHRoYXQgd2UgY2Fu IHVzZS4gIFdoZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBubyB2aXNpYmxlIEVPTCBn bHlwaCBleGlzdHMsIHdlIHVzZSB0aGUgZm9sbG93aW5nCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdGVzdDogIHRoZSBhcHBlbmRlZCBzcGFjZSBoYXMgYSBwb3NpdGlvbiB0aGF0IGlzIG9u ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlc3MgdGhhbiB0aGUgZW5kIG9mIHRoZSBt YXRyaXggcm93LiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBwb3NpbnQgPT0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAo cm93KSAtIDEpKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnkgPD0gd2luZG93 X3RleHRfYm90dG9tX3kgKHcpKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgICAgICAgIGN1cnJlbnRfY29sID0gbWNfY3VycmVudF9jb2x1bW4gKHcsIHBvc2ludCk7 CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoTklMUCAoZm9yZWdyb3VuZCkpCisgICAgICAg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiByZWQg Ki8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAyICE9IDAK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWZpbGxfY29sdW1uX3ApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5kID0gb2RkX2NvbG9yX3ZlY3RvcjsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB5ZWxsb3cgKi8KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgIWZpbGxfY29sdW1uX3ApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBmb3JlZ3JvdW5kID0gZXZlbl9jb2xvcl92ZWN0b3I7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLyogcmVkICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1 cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZp bGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9j b2wgPD0gZmlsbF9jb2wpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5k ID0gb2RkX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB5ZWxs b3cgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAyID09 IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5fcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3Zl Y3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBncmVlbiAqLworICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGlmIChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sID4gZmlsbF9jb2wpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBmb3JlZ3JvdW5kID0gZmlsbF9jb2xvcl92ZWN0b3I7CisgICAgICAgICAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAocm93 LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdywgcG9zaW50LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBh Y3RpdmVfY3Vyc29yX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmlt YWxfcCwgTVVMVElQTEVfQ1VSU09SUywgJnJlc3VsdCk7CisgICAgICAgICAgICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAg ZWxzZSBpZiAobWNfc3RkZXJyX3ApCisgICAgICAgICAgICAgICAgICAgICAgICBtY19kdW1wX2ds eXBoIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94KTsKKyAgICAgICAgICAgICAgICAgICAg cmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmICh1cGRh dGluZ19mcmFtZV9wKQorICAgIHVwZGF0ZV9lbmQgKFhGUkFNRSAody0+ZnJhbWUpKTsKKy8qIGB3 LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlJyBpcyBzZXQgZm9yIHRoZSB3aW5kb3csIG5vdCBidWZm ZXIrd2luZG93IC0tIGkuZS4sIGFsbCBidWZmZXJzIGFwcGVhcmluZworaW4gdGhlIHNhbWUgd2lu ZG93IHZpYSBgc3dpdGNoLXRvLWJ1ZmZlcicgd2lsbCBoYXZlIGB3LT5tdWx0aXBsZV9jdXJzb3Jz X2NhY2hlJy4gIFRoaXMgYmVoYXZpb3IKK2lzIGNvbnNpc3RlbnQgd2l0aCBmdW5jdGlvbnMgc3Vj aCBhcyBgc2V0LXdpbmRvdy1kaXNwbGF5LXRhYmxlJy4gIFdlIGRlYWwgd2l0aCB0aGlzIGluCitg bnN0ZXJtLm0nIC8gYHczMnRlcm0uYycgLyBgeHRlcm0uYycgYnkgY29tcGFyaW5nIGB3LT5jb250 ZW50cycgdG8gdGhlIHZhbHVlIG9mIHRoZSBgYnVmJworc3Rv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NlOworICBib29sIG1pbmlt YWxfcCA9IGZhbHNlOworICBpbnQgZmxhdm9yOworICBwdHJkaWZmX3QgcG9zaW50OworICBib29s IHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgaWYgKFhGUkFNRSAody0+ZnJhbWUpICE9IFhG UkFNRSAody0+ZnJhbWUpLT5tY191cGRhdGluZ19mcmFtZSkKKyAgICB7CisgICAgICB1cGRhdGlu Z19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoWEZSQU1FICh3LT5mcmFtZSkp OworICAgIH0KKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUp OworICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisg ICAgeworICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHggPSBY RklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IGZ4ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICB5ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDIpLCBmaWZ0ZWVuX2VsZW1l bnRzKSk7CisgICAgICBmeSA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgzKSwgZmlmdGVl bl9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg0 KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2Vf Zml4bnVtICg1KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhGSVhOVU0gKEZudGgg KG1ha2VfZml4bnVtICg2KSwgZmlmdGV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ovCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNl X3JlZGlzcGxheV9wICYmIEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgKCFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpCisgICAg ICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykp CisgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZmls bF9jb2x1bW4pKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNF VFdJTkRPVyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBG cHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIg PSBTU0RBVEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJh d19jcm9zc2hhaXJzICglcyk6ICBhY3RpdmVfY3Vyc29yX3AgKCVkKSB8IG1pbmltYWxfcCAoJWQp XG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93X2NoYXIsIGFjdGl2ZV9jdXJzb3Jf cCwgbWluaW1hbF9wKTsKKyAgICB9CisjZW5kaWYKKyAgYm9vbCBtY19zdGRlcnJfcCA9ICFOSUxQ IChCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfc3RkZXJyKSk7CisgIHB0cmRpZmZfdCBvcG9pbnRf cHQgPSAodyA9PSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpKQorICAgICAgICAgICAgICAgICAg ICAgICAgPyBQVAorICAgICAgICAgICAgICAgICAgICAgICAgOiBYRklYTlVNIChGbWFya2VyX3Bv c2l0aW9uICh3LT5wb2ludG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ZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0KKyAg aWYgKCFCVUZGRVJQIChidWYpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAg ICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9 CisgIGlmIChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkpCisgICAgeworICAgICAgaWYgKG9s ZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAg ICAgcmV0dXJuOworICAgIH0KKyAgaWYgKE5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnNfaG9yaXpv bnRhbF9ydWxlcikpCisgICAgICAmJiBOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzX3ZlcnRpY2Fs X3J1bGVyKSkpCisgICAgeworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZm ZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0KKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkVHSU4gSk9V Uk5FWSAuLi4KKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBpbnQgZnJhbWVfY2hhcl93aWR0 aCA9IEZSQU1FX0NPTFVNTl9XSURUSCAoZik7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5k b3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA9 IHctPm91dHB1dF9jdXJzb3IueCArIGZyYW1lX2NoYXJfd2lkdGggPj0gdGV4dF9hcmVhX3dpZHRo OworICBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlwaF9yb3c7CisgIGludCBjdXJzb3Jfd2lkdGggPSAx OworICBwdHJkaWZmX3QgcG9zaW50ID0gLTE7CisgIHB0cmRpZmZfdCBjdXJyZW50X2NvbCA9IG1j X2N1cnJlbnRfY29sdW1uICh3LCBvcG9pbnRfcHQpOworICBib29sIGZpbGxfY29sdW1uX3AgPSAh TklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAo QlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sdW1uX3ggPSAoZmlsbF9jb2x1 bW5fcCkKKyAgICAgICAgICAgICAgICAgICAgICA/IGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0 aAorICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgTGlzcF9PYmplY3QgcmVzdWx0ID0gUW5p bDsKKyAgaW50IGZsYXZvcjsKKyAgLyogVmFsdWVzIGZvciB0aGUgY3VycmVudCBjb2x1bW4gb2Yg dGhlIHZlcnRpY2FsIGxpbmUuICovCisgIExpc3BfT2JqZWN0IGZvcmVncm91bmQgPSBGbWFrZV92 ZWN0b3IgKG1ha2VfZml4bnVtICgzKSwgUW5pbCk7CisgIGVudW0gZmFjZV9pZCBmYWNlX2lkOwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENP TE9SIE9GIENST1NTSEFJUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBlbnVtIGZhY2Vf aWQgZXZlbl9mYWNlX2lkID0KKyAgICAoIWFjdGl2ZV9jdXJzb3JfcAorICAgICAmJiAhTklMUCAo QlZ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isgIC8qIHllbGxvdyAqLworICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAg ICAgICYmICFmaWxsX2NvbHVtbl9wKQorICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3Rv cjsKKyAgLyogcmVkICovCisgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgJiYgZmls bF9jb2x1bW5fcAorICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmlsbF9jb2wpCisgICAgZm9yZWdy b3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7CisgIC8qIHllbGxvdyAqLworICBpZiAoY3VycmVudF9j b2wgJSAyID09IDAKKyAgICAgICYmIGZpbGxfY29sdW1uX3AKKyAgICAgICYmIGN1cnJlbnRfY29s IDw9IGZpbGxfY29sKQorICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyog Z3JlZW4gKi8KKyAgaWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICYmIGN1cnJlbnRfY29sID4gZmls bF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IGZpbGxfY29sb3JfdmVjdG9yOworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICBFUkFTRSBUSEUgUkVBTCBD VVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYHctPnBoeXNfY3Vyc29yLngveS9o cG9zL3Zwb3NgIGFyZSBpbmNvcnJlY3QgYWZ0ZXIgZXZhbHVhdGluZyAoc2Nyb2xsLWxlZnQgMSkK K2EgY291cGxlIG9mIHRpbWVzLiAgUmVkaXNwbGF5IGVyYXNlcyB0aGUgcmVhbCBjdXJzb3IgYWxt b3N0IGltbWVkaWF0ZWx5IGFmdG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WQuICovCisgIGlmICh3LT5oc2Nyb2xsID4gMCkKKyAgICB7CisgICAgICB3 LT5waHlzX2N1cnNvci54ID0gdy0+b3V0cHV0X2N1cnNvci54OworICAgICAgdy0+cGh5c19jdXJz b3IueSA9IHctPm91dHB1dF9jdXJzb3IueTsKKyAgICAgIHctPnBoeXNfY3Vyc29yLmhwb3MgPSB3 LT5vdXRwdXRfY3Vyc29yLmhwb3M7CisgICAgICB3LT5waHlzX2N1cnNvci52cG9zID0gdy0+b3V0 cHV0X2N1cnNvci52cG9zOworICAgIH0KKyAgaWYgKCFtaW5pbWFsX3ApCisgICAgZXJhc2VfcGh5 c19jdXJzb3IgKHcpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAg ICAgICAgICAgIFJFUExBQ0UgVEhFIFJFQUwgQ1VSU09SCisqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKyAgZ2x5cGhfcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIG9wb2ludF92 cG9zKTsKKyAgaWYgKCFjdXJzb3JfaW5fZnJpbmdlX3ApCisgICAgZmxhdm9yID0gTUNfR0xZUEg7 CisgICAgLyogVGhpcyBjb25kaXRpb24gcHJvYmFibHkgZG9lcyBub3QgZXhpc3QgZm9yIHRoZSBy ZWFsIGZha2UgY3Vyc29yLiAqLworICAgIGVsc2UgaWYgKGN1cnNvcl9pbl9mcmluZ2VfcAorICAg ICAgICAgICAgICYmIGdseXBoX3Jvdy0+Y29udGludWVkX3ApCisgICAgICBmbGF2b3IgPSBNQ19Q SUxDUk9XOworICAgICAgZWxzZSBpZiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAg ICAmJiBnbHlwaF9yb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICBmbGF2b3IgPSBN Q19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XOworICAgICAgICBlbHNlIGlmIChjdXJzb3Jf aW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgJiYgIWdseXBoX3Jvdy0+Y29udGludWVkX3AK KyAgICAgICAgICAgICAgICAgJiYgIWdseXBoX3Jvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisg ICAgICAgICAgZmxhdm9yID0gTUNfSE9MTE9XX1JFQ1RBTkdMRTsKKyAgZmFjZV9pZCA9IChyZWFs X3BoeXNfY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgICAgICAgICAgID8gREVGQVVMVF9GQUNF X0lECisgICAgICAgICAgICAgIDogcmVhbF9waHlzX2N1cnNvcl9nbHlwaC0+ZmFjZV9pZDsKKyAg aW50IG9wb2ludF9meCA9IC0xOworICBpbnQgb3BvaW50X2Z5ID0gLTE7CisgIGludCBvcG9pbnRf aCA9IC0xOworICAvKiBGSVhNRTogIFB1dCBpbiBzb21lIGNvZGUgdG8gZGVmYXVsdCB0byBIT0xM T1dfQk9YX0NVUlNPUiBpZiB0aGUgdXNlciBoYXMKKyAgdW53aXR0aW5nbHkgY29tZSB1cCB3aXRo IHNvbWUgdW5hY2NlcHRhYmxlIGZvcm0gb2YgdW5yZWNvZ25pemVkIGN1cnNvciB0eXBlLiAqLwor ICBMaXNwX09iamVjdCBjdXJzb3JfbGlzcF90eXBlID0gQlZBUiAoYiwgbWNfcmVhbF9mYWtlX2N1 cnNvcik7CisgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgdGVtcF9jdXJzb3JfdHlwZSA9IChDT05T UCAoY3Vyc29yX2xpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIgKGN1cnNvcl9saXNwX3R5 cGUpKQor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B1cGRhdGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVw ZGF0ZV9iZWdpbiAoWEZSQU1FICh3LT5mcmFtZSkpOworICAgIH0KKyAgaWYgKHRlbXBfY3Vyc29y X3R5cGUgPT0gTk9fQ1VSU09SCisgICAgICAmJiAhbWluaW1hbF9wKQorICAgIHsKKyAgICAgIGlu dCBfd2Q7CisgICAgICBpZiAoZmxhdm9yID09IE1DX0dMWVBIKQorICAgICAgICBtY19nZXRfcGh5 c19jdXJzb3JfZ2VvbWV0cnkgKHcsIGdseXBoX3Jvdywgb3BvaW50X3gsICZvcG9pbnRfZngsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BvaW50X3ksICZvcG9pbnRfZnks IG9wb2ludF9ocG9zLCBvcG9pbnRfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmb3BvaW50X2gsIEhCQVJfQ1VSU09SLCBpbml0aWFsX2N1cnNvcl93aWR0aCwgJl93 ZCk7CisgICAgICBtY19oZWxwZXIgKHcsIG9wb2ludF94LCBvcG9pbnRfZngsIG9wb2ludF95LCBv cG9pbnRfZnksIG9wb2ludF9ocG9zLAorICAgICAgICAgICAgICAgICBvcG9pbnRfdnBvcywgb3Bv aW50X2gsIEhCQVJfQ1VSU09SLCBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9mZywKKyAgICAgICAgICAg ICAgICAgbWNfYmdfbHNsICh3LCBmYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLCBtaW5pbWFsX3As IGZsYXZvciwKKyAgICAgICAgICAgICAgICAgb3BvaW50X3B0LCAmcmVzdWx0KTsKKyAgICAgIGlm IChmbGF2b3IgPT0gTUNfR0xZUEgpCisgICAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRy eSAodywgZ2x5cGhfcm93LCBvcG9pbnRfeCwgJm9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBvcG9pbnRfeSwgJm9wb2ludF9meSwgb3BvaW50X2hwb3MsIG9w b2ludF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRf aCwgQkFSX0NVUlNPUiwgaW5pdGlhbF9jdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgbWNfaGVs cGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9pbnRfeSwgb3BvaW50X2Z5LCBvcG9pbnRf aHBvcywKKyAgICAgICAgICAgICAgICAgb3BvaW50X3Zwb3MsIG9wb2ludF9oLCBCQVJfQ1VSU09S LCBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9mZywKKyAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3 LCBmYWNlX2lkKSwgYWN0aXZlX2N1cnNvcl9wLCBtaW5pbWFsX3AsIGZsYXZvciwKKyAgICAgICAg ICAgICAgICAgb3BvaW50X3B0LCAmcmVzdWx0KTsKKyAgICB9CisgICAgZWxzZSBpZiAoIW1pbmlt YWxfcCkKKyAgICAgIHsKKyAgICAgICAgaW50IF93ZDsKKyAgICAgICAgaWYgKGZsYXZvciA9PSBN Q19HTFlQSCkKKyAgICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIGdseXBo X3Jvdywgb3BvaW50X3gsICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBvcG9pbnRfeSwgJm9wb2ludF9meSwgb3BvaW50X2hwb3MsIG9wb2ludF92cG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9oLCB0ZW1w X2N1cnNvcl90eXBlLCBpbml0aWFsX2N1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgIG1jX2hl bHBlciAodywgb3BvaW50X3gsIG9wb2ludF9meCwgb3BvaW50X3ksIG9wb2ludF9meSwgb3BvaW50 X2hwb3MsCisgICAgICAgICAgICAgICAgICAgb3BvaW50X3Zwb3MsIG9wb2ludF9oLCB0ZW1wX2N1 cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgY3Vyc29yX2ZnLCBt Y19iZ19sc2wgKHcsIGZhY2VfaWQpLCBhY3RpdmVfY3Vyc29yX3AsIG1pbmltYWxfcCwKKyAgICAg ICAgICAgICAgICAgICBmbGF2b3IsIG9wb2ludF9wdCwgJnJlc3VsdCk7CisgICAgICB9CisgIGlm IChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXIpKSkKKyAgICBnb3Rv IHZlcnRpY2FsX3J1bGVyOworICAgIGVsc2UKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAg ICAgICAgICAgICAgIEhPUklaT05UQUwgUlVMRVI6ICBGSVJTVCBYID0+IEVPTAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBhbmQKKyAgICAgICBIT1JJWk9OVEFMIFJVTEVSOiAgRFJB VyBGTE9BVElORyBHTFlQSExFU1MgTElORSAoRU9MIFRPIEZSSU5HRSkKKyoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworICAgIHsKKyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdyA9IE1BVFJJWF9S T1cgKHctPmN1cnJlbnRfbWF0cml4LCBvcG9pbnRfdnBvcyk7CisgICAgICBpbnQgYXJlYTsKKyAg ICAgIGludCByZWxhdGl2ZV94ID0gMDsKKyAgICAgIGZvciAoYXJlYSA9IExFRlRfTUFSR0lOX0FS RUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVj dCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5 cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgICAgICAgIC8qIEds eXBoIGZvciBhIGxpbmUgZW5kIGluIHRleHQuICAqLworICAgICAgICAgIGlmIChhcmVhID09IFRF WFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAg ICAgICAgICAgKytnbHlwaF9lbmQ7CisgICAgICAgICAgaWYgKG1jX3N0ZGVycl9wCisgICAgICAg ICAgICAgICYmIGdseXBoIDwgZ2x5cGhfZW5kKQorICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJy LAorIlxuPT09PT09PT09PT09PT09PT09PT09PT09PT09PSBIT1JJWk9OVEFMIFJVTEVSID09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblwKK0dseXBoIy9Ub3RhbCBSZWwuWCBUICAg ICAgIFBvcyBPICAgVyAgICAgQ29kZSBGYWNlIExSICAgICBYICAgIFkgSFBPUyBWUE9TIFpWIENc biIpOworICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfZW5naW5lIChyb3csIGdseXBoLCBhcmVhLCByZWxh dGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgSEJBUl9DVVJTT1Is IGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAg ICAgICAgICAgICAgIG1pbmltYWxfcCwgSE9SSVpPTlRBTF9SVUxFUiwgJnJlc3VsdCk7CisgICAg ICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAg IFZFUlRJQ0FMIFJVTEVSOiAgQ09NQklOQVRJT04gT0YgR0xZUEggJiBHTFlQSExFU1MgQ1VSU09S UworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisgIHZlcnRpY2FsX3J1bGVyOgorICBpZiAoTklM UCAoQlZBUiAoYiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpCisgICAgICB8fCBmaWxsX2Nv bHVtbl90cnVtcHNfcCkKKyAgICBnb3RvIGNyb3NzaGFpcnNfZmluaXNoOworICAgIGVsc2UKKyAg ICAgIHsKKyAgICAgICAgaW50IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJTkRPV19IRUFERVJfTElO RV9IRUlHSFQgKHcpOworICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5j dXJyZW50X21hdHJpeDsKKyAgICAgICAgaW50IHJvd19zdGFydCwgcm93X2VuZCwgd2luZG93X3Jv d19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgICAgICAgIGludCBpOworICAgICAgICBMaXNwX09i amVjdCB0ZW1wID0gUW5pbDsKKyAgICAgICAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5pbDsKKyAg ICAgICAgZm9yIChpID0gMDsgaSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICAgICAgICB7Cisg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIGkp OworICAgICAgICAgICAgcm93X3N0YXJ0ID0gTUFUUklYX1JPV19TVEFSVF9DSEFSUE9TIChyb3cp OworICAgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkgPT0gMSkKKyAg ICAgICAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIGkgPT0gMCkpCisg ICAgICAgICAgICAgIHdpbmRvd19yb3dfc3RhcnQgPSByb3dfc3RhcnQ7CisgICAgICAgICAgICBp ZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgd2lu ZG93X3Jvd19lbmQgPSByb3dfZW5kOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICByb3dfZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KTsKKyAgICAgICAg ICAgICAgICAgIHRlbXAgPSBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywgbWFrZV9maXhudW0gKGkp LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtl X2ZpeG51bSAocm93X3N0YXJ0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKHJvd19lbmQpKTsKKyAgICAgICAgICAgICAgICAg IHZzcGVjcyA9IEZjb25zICh0ZW1wLCB2c3BlY3MpOworICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICB9CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3IgKHZsaXN0ID0g Rm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAgICAg ICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAgICAgICAgaW50 IGNvdW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDApLCBYQ0FSICh2bGlzdCkpKTsK KyAgICAgICAgICAgIGludCBwb3Nfc3RhcnQgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAo MSksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQgPSBYRklYTlVNIChG bnRoIChtYWtlX2ZpeG51bSAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgc3RydWN0 IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50KTsK KyAgICAgICAgICAgIGludCB0ZW1wX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+Y3Vy cmVudF9tYXRyaXgpOworICAgICAgICAgICAgaW50IGFyZWE7CisgICAgICAgICAgICBpbnQgcmVs YXRpdmVfeCA9IDA7CisgICAgICAgICAgICBmb3IgKGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBh cmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICAg ICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAg ICAgICAgICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5k ICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOwor ICAgICAgICAgICAgICAgIGlmIChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAgICAgICAmJiBn bHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJc bmNvdW50ICglZCkgfCB3aW5kb3dfcm93X3N0YXJ0L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2Vu ZCAoJWQvJWQpXG5cCis9PT09PT09PT09PT09PT09PT09PT09PT09PT09PSBWRVJUSUNBTCBSVUxF UiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVs LlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBP UyBaViBDXG4iLAorY291bnQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nf c3RhcnQsIHBvc19lbmQpOworICAgICAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2Vu ZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgYm9v bCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVt cF92cG9zKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4g MCAmJiBjb3VudCA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVf Zm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAocmVsYXRpdmVfeCArIGds eXBoLT5waXhlbF93aWR0aCA+IG9wb2ludF94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg fHwgZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGds eXBoLT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAg ICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZl X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgQkFSX0NV UlNPUiwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgVkVSVElDQUxfUlVMRVIsICZy ZXN1bHQpOworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG1jX3N0ZGVycl9wKQorICAg ICAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwgcmVs YXRpdmVfeCk7CisgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVs X3dpZHRoOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAg fQorICAgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFNFVCBUSEUgQ0FDSEUKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBj cm9zc2hhaXJzX2ZpbmlzaDoKKyAgaWYgKCFtaW5pbWFsX3AKKyAgICAgICYmIHVwZGF0aW5nX2Zy YW1lX3ApCisgICAgdXBkYXRlX2VuZCAoWEZSQU1FICh3LT5mcmFtZSkpOworICBpZiAoIU5JTFAg KHJlc3VsdCkpCisgICAgd3NldF9jcm9zc2hhaXJzX2NhY2hlICh3LCBsaXN0biAoQ09OU1RZUEVf SEVBUCwgMywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGcmV2ZXJzZSAo cmVzdWx0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGY29ucyAod2lu ZG93LCBRbmlsKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGY29ucyAo dy0+Y29udGVudHMsIFFuaWwpKSk7CisgIHctPm1jLmRyYXdfY3Jvc3NoYWlycyA9IGZhbHNlOwor ICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsK KworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGltZV91 c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIGR0b2Fz dHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3VzZWQpOworICBk ZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZHJhd19jcm9zc2hhaXJzOiAgVElNRSAoJXMpIiwgYnVm X3RpbWUpOworI2VuZGlmCisqLworfQorCit2b2lkCittY19yZWRyYXdfY3Jvc3NoYWlycyAoc3Ry dWN0IHdpbmRvdyAqdykKK3sKKy8qCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgY2xvY2tfdCBzdGFy dCwgZW5kOworICBkb3VibGUgY3B1X3RpbWVfdXNlZDsKKyAgY2hhciBidWZfdGltZVtEQkxfQlVG U0laRV9CT1VORF07CisgIHN0YXJ0ID0gY2xvY2soKTsKKyNlbmRpZgorKi8KKyNpZmRlZiBHTFlQ SF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+Y29udGVudHMp CisgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVsdGlwbGVf Y3Vyc29yc19jb25mKSkK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ZWxlbWVudHMpKTsKKyAgICAgIGZvcmVncm91bmQgPSBGbnRo IChtYWtlX2ZpeG51bSAoOSksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYmFja2dyb3VuZCA9 IEZudGggKG1ha2VfZml4bnVtICgxMCksIGZpZnRlZW5fZWxlbWVudHMpOworICAgICAgYWN0aXZl X2N1cnNvcl9wID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDExKSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgbWluaW1hbF9wID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEy KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZmxhdm9yID0gWEZJWE5VTSAoRm50aCAobWFr ZV9maXhudW0gKDEzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgcG9zaW50ID0gWEZJWE5V TSAoRm50aCAobWFrZV9maXhudW0gKDE0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgYm9v bCByZW1vdmVfcCA9IGZhbHNlOworICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHgsIGZ4 LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfY3Vyc29yX3AsIG1pbmlt YWxfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGF2b3IsIHBvc2ludCwgcmVtb3Zl X3ApOworICAgIH0KKyAgaWYgKHVwZGF0aW5nX2ZyYW1lX3ApCisgICAgdXBkYXRlX2VuZCAoWEZS QU1FICh3LT5mcmFtZSkpOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygp OworICBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BF Ul9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90 aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfcmVkcmF3X2Nyb3NzaGFpcnM6 ICBUSU1FICglcykiLCBidWZfdGltZSk7CisjZW5kaWYKKyovCit9CisKK3ZvaWQKK21jX2VyYXNl X2Nyb3NzaGFpcnMgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZGVsZXRlX2NhY2hlLCBib29sIG1p bmltYWxfcCkKK3sKKy8qCisjaWZkZWYgR0xZUEhfREVCVUcKKyAgY2xvY2tfdCBzdGFydCwgZW5k OworICBkb3VibGUgY3B1X3RpbWVfdXNlZDsKKyAgY2hhciBidWZfdGltZVtEQkxfQlVGU0laRV9C T1VORF07CisgIHN0YXJ0ID0gY2xvY2soKTsKKyNlbmRpZgorKi8KKyNpZmRlZiBHTFlQSF9ERUJV RworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAg ICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29y c19jb25mKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBtY19maWxsX2NvbHVtbikpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5k b3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2lu ZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFy ICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmI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CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg Zmxhdm9yKTsKKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPmNyb3NzaGFpcnNfY2FjaGUpOworICAg ICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgewor ICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHggPSBYRklYTlVN IChGbnRoIChtYWtlX2ZpeG51bSAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZ4ID0g WEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAg ICB5ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDIpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICBmeSA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgzKSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgaHBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg0KSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVt ICg1KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhGSVhOVU0gKEZudGggKG1ha2Vf Zml4bnVtICg2KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19s aXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX2ZpeG51bSAoNyksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGN1cnNvcl93aWR0aCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg4 KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfZml4 bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFr ZV9maXhudW0gKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVfY3Vyc29yX3Ag PSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMTEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7Cisg ICAgICBtaW5pbWFsX3AgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMTIpLCBmaWZ0ZWVu X2VsZW1lbnRzKSk7CisgICAgICBmbGF2b3IgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAo MTMpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBwb3NpbnQgPSBYRklYTlVNIChGbnRoICht YWtlX2ZpeG51bSAoMTQpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBpZiAoZmxhdm9yID09 IE1DX0dMWVBIKQorICAgICAgICBtY19lcmFzZV9nbHlwaF9jdXJzb3JzICh3LCB4LCB5LCBocG9z LCB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmbGF2b3IpOworICAgICAgICBlbHNl CisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCByZW1vdmVfcCA9IHRydWU7CisgICAgICAg ICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCBo LCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jf d2lkdGgsIGJhY2tncm91bmQsIGFjdGl2ZV9jdXJzb3JfcCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgcG9zaW50LCByZW1vdmVfcCk7CisgICAg ICAgICAgfQorICAgIH0KKyAgaWYgKHVwZGF0aW5nX2ZyYW1lX3ApCisgICAgdXBk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AhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxs X2NvbHVtbikpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VU V0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZw cmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9 IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19kcmF3 X2ZpbGxfY29sdW1uICglcyk6ICBhY3RpdmVfY3Vyc29yX3AgKCVkKSB8IG1pbmltYWxfcCAoJWQp XG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93X2NoYXIsIGFjdGl2ZV9jdXJzb3Jf cCwgbWluaW1hbF9wKTsKKyAgICB9CisjZW5kaWYKKyAgYm9vbCBtY19zdGRlcnJfcCA9ICFOSUxQ IChCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfc3RkZXJyKSk7CisgIGludCBvcG9pbnRfeCA9IHct PnBoeXNfY3Vyc29yLng7CisgIGludCBvcG9pbnRfeSA9IHctPnBoeXNfY3Vyc29yLnk7CisgIGlu dCBvcG9pbnRfaHBvcyA9IHctPnBoeXNfY3Vyc29yLmhwb3M7CisgIGludCBvcG9pbnRfdnBvcyA9 IHctPnBoeXNfY3Vyc29yLnZwb3M7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJh bWUpOworICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgQ0hFQ0tfQlVGRkVSIChi dWYpOworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVmKTsKKyAgc3RydWN0IGJ1ZmZl ciAqb2xkX2J1ZmZlciA9IE5VTEw7CisgIExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgWFNFV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0+Y3VycmVudF9tYXRyaXgtPnJvd3MpID8g ZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90aHJlZSkKKyAgICB7CisgICAgICBpZiAo b2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7Cisg ICAgICByZXR1cm47CisgICAgfQorICBib29sIGJhcmZfY3Jhc2hfZm91ciA9IChvcG9pbnRfdnBv cyA+PSAwICYmIG9wb2ludF92cG9zIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNl IDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfZm91cikKKyAgICB7CisgICAgICBpZiAob2xkX2J1 ZmZlcikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICBy ZXR1cm47CisgICAgfQorICBpZiAoIUJVRkZFUlAgKGJ1ZikpCisgICAgeworICAgICAgaWYgKG9s ZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAg ICAgcmV0dXJuOworICAgIH0KKyAgaWYgKE5JTFAgKEJWQVIgKGIsIG1jX2ZpbGxfY29sdW1uKSkp CisgICAgeworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJu YWwgKG9sZF9idWZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0KKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQkVHSU4gSk9VUk5FWSAuLi4K KyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworICBpbnQgZnJhbWVfY2hhcl93aWR0aCA9IEZSQU1F X0NPTFVNTl9XSURUSCAoZik7CisgIGludCBjdXJzb3Jfd2lkdGggPSAxOworICBwdHJkaWZmX3Qg cG9zaW50ID0gLTE7CisgIGJvb2wgZmlsbF9jb2x1bW5fcCA9ICFOSUxQIChCVkFSIChiLCBmaWxs X2NvbHVtbikpOworICBpbnQgZmlsbF9jb2wgPSBYRklYTlVNIChCVkFSIChiLCBmaWxsX2NvbHVt bikpOworICBpbnQgZmlsbF9jb2x1bW5feCA9IChmaWxsX2NvbHVtbl9wKQorICAgICAgICAgICAg ICAgICAgICAgID8gZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoCisgICAgICAgICAgICAgICAg ICAgICAgOiAwOworICBMaXNwX09iamVjdCByZXN1bHQgPSBRbmlsOworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENPTE9SIE9GIEZJTEwgQ09M VU1OCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgZW51bSBmYWNlX2lkIGZpbGxfY29sdW1u X2ZhY2VfaWQgPQorICAgICghYWN0aXZlX2N1cnNvcl9wCisgICAgICYmICFOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29sdW1uX2luYWN0aXZlX3dpbmRvd3MpKQor ICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkK KyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIm1jLWZpbGwtY29sdW1u LWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAgICA6ICghYWN0aXZlX2N1cnNvcl9wCisgICAgICAg JiYgIU5JTFAgKEJWQVIgKF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AgICB7CisgICAgICB1cGRhdGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9i ZWdpbiAoWEZSQU1FICh3LT5mcmFtZSkpOworICAgIH0KKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KgorICAgICAgICAgICBGSUxMIENPTFVNTjogIENPTUJJTkFUSU9OIE9GIEdMWVBIICYgR0xZUEhM RVNTIENVUlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBpbnQgaGVhZGVyX2xpbmVf Zm9ybWF0ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgIHN0cnVjdCBnbHlwaF9t YXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICBpbnQgcm93X3N0YXJ0LCByb3df ZW5kLCB3aW5kb3dfcm93X3N0YXJ0LCB3aW5kb3dfcm93X2VuZDsKKyAgaW50IGk7CisgIExpc3Bf T2JqZWN0IHRlbXAgPSBRbmlsOworICBMaXNwX09iamVjdCB2c3BlY3MgPSBRbmlsOworICBmb3Ig KGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsgKytpKQorICAgIHsKKyAgICAgIHN0cnVjdCBnbHlw aF9yb3cgKnJvdyA9IE1BVFJJWF9ST1cgKG1hdHJpeCwgaSk7CisgICAgICByb3dfc3RhcnQgPSBN QVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyk7CisgICAgICBpZiAoKGhlYWRlcl9saW5lX2Zv cm1hdCA+IDAgJiYgaSA9PSAxKQorICAgICAgICAgICB8fCAoaGVhZGVyX2xpbmVfZm9ybWF0ID09 IDAgJiYgaSA9PSAwKSkKKyAgICAgICAgd2luZG93X3Jvd19zdGFydCA9IHJvd19zdGFydDsKKyAg ICAgIGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgIHsKKyAgICAgICAgICB3aW5kb3dfcm93 X2VuZCA9IHJvd19lbmQ7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgZWxz ZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHJvd19lbmQgPSBNQVRSSVhfUk9XX0VORF9DSEFS UE9TIChyb3cpOworICAgICAgICAgICAgdGVtcCA9IGxpc3RuIChDT05TVFlQRV9IRUFQLCAzLCBt YWtlX2ZpeG51bSAoaSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1ha2VfZml4bnVtIChyb3dfc3RhcnQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAocm93X2VuZCkpOworICAgICAgICAgICAgdnNw ZWNzID0gRmNvbnMgKHRlbXAsIHZzcGVjcyk7CisgICAgICAgICAgfQorICAgIH0KKyAgTGlzcF9P YmplY3Qgdmxpc3Q7CisgIGZvciAodmxpc3QgPSBGbnJldmVyc2UgKHZzcGVjcyk7CisgICAgICAg Q09OU1AgKHZsaXN0KTsKKyAgICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICB7CisgICAg ICBpbnQgY291bnQgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMCksIFhDQVIgKHZsaXN0 KSkpOworICAgICAgaW50IHBvc19zdGFydCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgx KSwgWENBUiAodmxpc3QpKSk7CisgICAgICBpbnQgcG9zX2VuZCA9IFhGSVhOVU0gKEZudGggKG1h a2VfZml4bnVtICgyKSwgWENBUiAodmxpc3QpKSk7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgY291bnQpOworICAgICAgaW50IHRl bXBfdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3LT5jdXJyZW50X21hdHJpeCk7CisgICAg ICBpbnQgYXJlYTsKKyAgICAgIGludCByZWxhdGl2ZV94ID0gMDsKKyAgICAgIGZvciAoYXJlYSA9 IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgewor ICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAg ICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOwor ICAgICAgICAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYg Z2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgICAgICAgKytnbHlwaF9lbmQ7CisgICAgICAgICAg aWYgKG1jX3N0ZGVycl9wCisgICAgICAgICAgICAgICYmIGdseXBoIDwgZ2x5cGhfZW5kKQorICAg ICAgICAgICAgZnByaW50ZiAoc3RkZXJyLAorIlxuY291bnQgKCVkKSB8IHdpbmRvd19yb3dfc3Rh cnQvZW5kICglZC8lZCkgfCByb3dfc3RhcnQvZW5kICglZC8lZClcblwKKz09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09IEZJTEwgQ09MVU1OID09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT1cblwKK0dseXBoIy9Ub3RhbCBSZWwuWCBUICAgICAgIFBvcyBPICAgVyAgICAgQ29k ZSBGYWNlIExSICAgICBYICAgIFkgSFBPUyBWUE9TIFpWIENcbiIsCitjb3VudCwgd2luZG93X3Jv d19zdGFydCwgd2luZG93X3Jvd19lbmQsIHBvc19zdGFydCwgcG9zX2VuZCk7CisgICAgICAgICAg Zm9yICg7IGdseXBoIDwgZ2x5cGhfZW5kOyArK2dseXBoKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSBmaWxsX2NvbHVt bl94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95 ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF9ocG9zID09IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zw b3MpOworICAgICAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGNvdW50 ID4gMCkKKyAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAg ICAgICAgICAgICAgICAgICYmIChyZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID4gZmls bF9jb2x1bW5feAorICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoID09IGdseXBoX2VuZCAt IDEpCisgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21f eSAodykKKyAgICAgICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgbWNfZW5naW5lIChyb3csIGdseXBoLCBhcmVh LCByZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LCBwb3NpbnQsIEJB Ul9DVVJTT1IsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX2N1cnNvcl9wLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIEZJTExfQ09MVU1OLCAmcmVzdWx0 KTsKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICBlbHNlIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgY291bnQgPiAwKQor ICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAocmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0 aCA+IGZpbGxfY29sdW1uX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGgg PT0gZ2x5cGhfZW5kIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+eSA8 PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBy ZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcblJFQUwgRkFLRSBDVVJTT1JcbiIpOwor ICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJlYSwg cmVsYXRpdmVfeCk7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYg KG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGds eXBoLCBhcmVhLCByZWxhdGl2ZV94KTsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlw aC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU0VUIFRI RSBDQUNIRQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIG1jX2ZpbGxfY29sdW1uX2Zpbmlz aDoKKyAgaWYgKCFtaW5pbWFsX3AKKyAgICAgICYmIHVwZGF0aW5nX2ZyYW1lX3ApCisgICAgdXBk YXRlX2VuZCAoWEZSQU1FICh3LT5mcmFtZSkpOworICBpZiAoIU5JTFAgKHJlc3VsdCkpCisgICAg d3NldF9tY19maWxsX2NvbHVtbl9jYWNoZSAodywgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJldmVyc2UgKHJlc3VsdCksCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNvbnMgKHdpbmRvdywgUW5pbCks CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNvbnMgKHctPmNvbnRlbnRz LCBRbmlsKSkpOworICB3LT5tYy5kcmF3X2ZpbGxfY29sdW1uID0gZmFsc2U7CisgIGlmIChvbGRf YnVmZmVyKQorICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworLyoKKyNpZmRl ZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBjcHVfdGltZV91c2VkID0gKChkb3Vi bGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIGR0b2FzdHIgKGJ1Zl90aW1l LCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3VzZWQpOworICBkZWJ1Z19tZXRob2Rf YWRkICh3LCAibWNfZHJhd19maWxsX2NvbHVtbjogIFRJTUUgKCVzKSIsIGJ1Zl90aW1lKTsKKyNl bmRpZgorKi8KK30KKwordm9pZAorbWNfcmVkcmF3X2ZpbGxfY29sdW1uIChzdHJ1Y3Qgd2luZG93 ICp3KQoreworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBjbG9ja190IHN0YXJ0LCBlbmQ7Cisg IGRvdWJsZSBjcHVfdGltZV91c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9CVUZTSVpFX0JPVU5E XTsKKyAgc3RhcnQgPSBjbG9jaygpOworI2VuZGlmCisqLworI2lmZGVmIEdMWVBIX0RFQlVHCisg IGlmICh0cmFjZV9yZWRpc3BsYXlfcCAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYm ICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2Nv bmYpKQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNy b3NzaGFpcnMpKQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIG1jX2ZpbGxfY29sdW1uKSkpKQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvdzsK KyAgICAgIFhTRVRXSU5ET1cgKHdpbmRvdywgdyk7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3df c3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2luZG93LCBRbmlsKTsKKyAgICAgIGNoYXIgKndp bmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3dfc3RyaW5nKTsKKyAgICAgIGZwcmludGYgKHN0ZGVy ciwgIm1jX3JlZHJhd19maWxsX2NvbHVtbiAoJXMpXG4iLCB3aW5kb3dfY2hhcik7CisgICAgfQor I2VuZGlmCisgIExpc3BfT2JqZWN0IHZsaXN0ID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgZmlmdGVl bl9lbGVtZW50cyA9IFFuaWw7CisgIGludCB4L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GN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNv cl93aWR0aCwgYmFja2dyb3VuZCwgYWN0aXZlX2N1cnNvcl9wLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgZmxhdm9yLCBwb3NpbnQsIHJlbW92ZV9wKTsKKyAg ICAgICAgICB9CisgICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5k IChYRlJBTUUgKHctPmZyYW1lKSk7CisgIGlmIChkZWxldGVfY2FjaGUpCisgICAgd3NldF9tY19m aWxsX2NvbHVtbl9jYWNoZSAodywgUW5pbCk7CisgIHctPm1jLmVyYXNlX2ZpbGxfY29sdW1uID0g ZmFsc2U7CisvKgorI2lmZGVmIEdMWVBIX0RFQlVHCisgIGVuZCA9IGNsb2NrKCk7CisgIGNwdV90 aW1lX3VzZWQgPSAoKGRvdWJsZSkgKGVuZCAtIHN0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsKKyAg ZHRvYXN0ciAoYnVmX3RpbWUsIHNpemVvZiBidWZfdGltZSwgMCwgMCwgY3B1X3RpbWVfdXNlZCk7 CisgIGRlYnVnX21ldGhvZF9hZGQgKHcsICJtY19lcmFzZV9maWxsX2NvbHVtbjogIFRJTUUgKCVz KSIsIGJ1Zl90aW1lKTsKKyNlbmRpZgorKi8KK30KKwordm9pZAorbWNfcmVtb3ZlX211bHRpcGxl X2N1cnNvcnMgKHN0cnVjdCB3aW5kb3cgKncpCit7CisgIGJvb2wgZGVsZXRlX2NhY2hlID0gKHct Pm1jLnJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPT0gOAorICAgICAgICAgICAgICAgICAg ICAgICB8fCBtY19yZWRpc3BsYXkgPT0gMykKKyAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNl CisgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworI2lmZGVmIEdMWV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pb25zLiAqLworICBpZiAoIXctPnBzZXVkb193aW5kb3dfcAorICAgICAg JiYgIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAmJiAhTklMUCAody0+bXVsdGlwbGVfY3Vyc29y c19jYWNoZSkKKyAgICAgICYmIFdJTkRPV1AgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwg dy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAgICAgJiYgdyA9PSBYV0lORE9XIChYQ0FS IChGbnRoIChtYWtlX2ZpeG51bSAoMSksIHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpKSkKKyAg ICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0gKDIpLCB3LT5t dWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkpKQorICAgIG1jX2VyYXNlX211bHRpcGxlX2N1cnNvcnMg KHcsIGRlbGV0ZV9jYWNoZSk7Cit9CisKK3ZvaWQKK21jX3JlbW92ZV9jcm9zc2hhaXJzIChzdHJ1 Y3Qgd2luZG93ICp3KQoreworICBib29sIGRlbGV0ZV9jYWNoZSA9ICgody0+bWMucmVkaXNwbGF5 X3ByZXNlcnZlX2VjaG9fYXJlYSA9PSA4CisgICAgICAgICAgICAgICAgICAgICAgICB8fCBtY19y ZWRpc3BsYXkgPT0gMykKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgIXctPm1jLmRyYXdfY3Jv c3NoYWlycworICAgICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZXJhc2VfY3Jvc3NoYWly cykKKyAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAgICAg OiB0cnVlOworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCAmJiBC VUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBtdW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KFhDQVIgKEZu dGggKG1ha2VfZml4bnVtICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAgJiYgdyA9 PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMSksIHctPmNyb3NzaGFpcnNfY2Fj aGUpKSkKKyAgICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0g KDIpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpKQorICAgIHsKKyAgICAgIGJvb2wgbWluaW1hbF9w ID0gZmFsc2U7CisgICAgICBtY19lcmFzZV9jcm9zc2hhaXJzICh3LCBkZWxldGVfY2FjaGUsIG1p bmltYWxfcCk7CisgICAgfQorfQorCit2b2lkCittY19yZW1vdmVfZmlsbF9jb2x1bW4gKHN0cnVj dCB3aW5kb3cgKncpCit7CisgIGJvb2wgZGVsZXRlX2NhY2hlID0gKCh3LT5tYy5yZWRpc3BsYXlf cHJlc2VydmVfZWNob19hcmVhID09IDgKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IG1jX3Jl ZGlzcGxheSA9PSAzKQorICAgICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZHJhd19maWxs X2NvbHVtbgorICAgICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZXJhc2VfZmlsbF9jb2x1 bW4pCisgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQorICAgICAgICAgICAgICAgICAgICAg IDogdHJ1ZTsKKyNpZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYg QlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19jb25mKSkKKyAgICAgICAgICB8fCAhTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICB8fCAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbikpKSkKKyAg ICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3cs IHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcg KHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93 X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19yZW1vdmVfZmlsbF9jb2x1bW4g KCVzKTogIGRlbGV0ZV9jYWNoZSAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgd2lu ZG93X2NoYXIsIGRlbGV0ZV9jYWNoZSk7CisgICAgfQorI2VuZGlmCisgIC8qIFJlbW92ZSBmYWtl IGN1cnNvcnMuICBJZiB3ZSByZWx5IHVwb24gYHVwZGF0ZV9mcmFtZScgdG8gcmVtb3ZlIGZha2Ug Y3Vyc29ycywKKyAgdGhlbiBpdCB3b3VsZCBiZSB0b28gbGF0ZSB0byByZW1vdmUgZmFrZSBjdXJz b3JzIGZyb20gYWxsIGFyZWFzIG9mIHRoZSB2aXNpYmxlCisgIHdpbmRvdyB3aGVuIGN1dHRpbmcv cGFzdGluZyB0ZXh0IGFuZCBwZXJoYXBzIGEgZmV3IG90aGVyIHNpdHVhdGlvbnMuICovCisgIGlm ICghdy0+cHNldWRvX3dpbmRvd19wCisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAg ICYmICFOSUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkKKyAgICAgICYmIFdJTkRPV1AgKFhD QVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkKKyAg ICAgICYmIHcgPT0gWFdJTkRPVyAoW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TsKKyAgLyogYHctPmNyb3NzaGFp cnNfY2FjaGVgIGJlbG9uZ3MgdG8gdGhlIHdpbmRvdywgbm90IHRoZSBidWZmZXIuICBTd2l0Y2hp bmcKKyAgYnVmZmVycyB3aXRoaW4gdGhlIHNhbWUgd2luZG93IHJlbmRlcnMgdGhlIGNhY2hlIHVz ZWxlc3MuICovCisgIGlmICghTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQICh3LT5j cm9zc2hhaXJzX2NhY2hlKQorICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9maXhu dW0gKDEpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5ET1cgKFhD QVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAg JiYgIUVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0gKDIpLCB3LT5jcm9z c2hhaXJzX2NhY2hlKSkpKQorICAgIHsKKyAgICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNoZSAodywg UW5pbCk7CisgICAgICB3LT5tYy5lcmFzZV9jcm9zc2hhaXJzID0gZmFsc2U7CisgICAgfQorICBp ZiAob24KKyAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgKHcgPT0gWFdJTkRP VyAoc2VsZWN0ZWRfd2luZG93KQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgJiYgTklM UCAody0+Y3Jvc3NoYWlyc19jYWNoZSkKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpKQorICAgIG1jX2RyYXdfY3Jvc3NoYWlycyAodywg YWN0aXZlX2N1cnNvcl9wLCBtaW5p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pXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93X2NoYXIsIG9uLCBh Y3RpdmVfY3Vyc29yX3ApOworICAgIH0KKyNlbmRpZgorICBib29sIG1pbmltYWxfcCA9ICghdy0+ bWMuZHJhd19maWxsX2NvbHVtbgorICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3BsYXlf cHJlc2VydmVfZWNob19hcmVhICE9IDgKKyAgICAgICAgICAgICAgICAgICAgJiYgbWNfcmVkaXNw bGF5ICE9IDMKKyAgICAgICAgICAgICAgICAgICAgJiYgdyA9PSBYV0lORE9XIChzZWxlY3RlZF93 aW5kb3cpCisgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgbWNfZmlsbF9jb2x1bW5fZHJhd19mb3J0aHdpdGgpKSk7CisgIGlmICh3LT5tYy5l cmFzZV9maWxsX2NvbHVtbiAmJiB3LT5tYy5kcmF3X2ZpbGxfY29sdW1uCisgICAgICAmJiAhTUlO SV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkK KyAgICAgICYmIFdJTkRPV1AgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmls bF9jb2x1bW5fY2FjaGUpKSkKKyAgICAgICYmIHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAobWFr ZV9maXhudW0gKDEpLCB3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkpKQorICAgICAgJiYgRVEgKHct PmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMiksIHctPm1jX2ZpbGxfY29sdW1u X2NhY2hlKSkpKQorICAgIG1jX2VyYXNlX2ZpbGxfY29sdW1uICh3LCB0cnVlKTsKKyAgLyogYHct Pm1jX2ZpbGxfY29sdW1uX2NhY2hlYCBiZWxvbmdzIHRvIHRoZSB3aW5kb3csIG5vdCB0aGUgYnVm ZmVyLiAgU3dpdGNoaW5nCisgIGJ1ZmZlcnMgd2l0aGluIHRoZSBzYW1lIHdpbmRvdyByZW5kZXJz IHRoZSBjYWNoZSB1c2VsZXNzLiAqLworICBpZiAoIU1JTklfV0lORE9XX1AgKHcpCisgICAgICAm JiAhTklMUCAody0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpCisgICAgICAmJiBXSU5ET1dQIChYQ0FS IChGbnRoIChtYWtlX2ZpeG51bSAoMSksIHctPm1jX2ZpbGxfY29sdW1uX2NhY2hlKSkpCisgICAg ICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmls bF9jb2x1bW5fY2FjaGUpKSkKKyAgICAgICYmICFFUSAody0+Y29udGVudHMsIFhDQVIgKEZudGgg KG1ha2VfZml4bnVtICgyKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkpCisgICAgeworICAg ICAgd3NldF9tY19maWxsX2NvbHVtbl9jYWNoZSAodywgUW5pbCk7CisgICAgICB3LT5tYy5lcmFz ZV9maWxsX2NvbHVtbiA9IGZhbHNlOworICAgIH0KKyAgaWYgKG9uCisgICAgICAmJiAhTUlOSV9X SU5ET1dfUCAodykKKyAgICAgICYmICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAg ICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2Nv bHVtbl9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAmJiBOSUxQICh3LT5tY19maWxsX2NvbHVt bl9jYWNoZSkKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBt Y19maWxsX2NvbHVtbikpKSkKKyAgICBtY19kcmF3X2ZpbGxfY29sdW1uICh3LCBhY3RpdmVfY3Vy c29yX3AsIG1pbmltYWxfcCk7CisgICAgZWxzZSBpZiAob24KKyAgICAgICAgICAgICAmJiAhTUlO SV9XSU5ET1dfUCAodykKKyAgICAgICAgICAgICAmJiAhTklMUCAody0+bWNfZmlsbF9jb2x1bW5f Y2FjaGUpCisgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgbWNfZmlsbF9jb2x1bW4pKQorICAgICAgICAgICAgICYmIFdJTkRPV1AgKFhDQVIgKEZudGgg KG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkKKyAgICAgICAgICAg ICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmls bF9jb2x1bW5fY2FjaGUpKSkKKyAgICAgICAgICAgICAmJiBFUSAody0+Y29udGVudHMsIFhDQVIg KEZudGggKG1ha2VfZml4bnVtICgyKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkpCisgICAg ICB7CisgICAgICAgIG1jX2VyYXNlX2ZpbGxfY29sdW1uICh3LCBmYWxzZSk7CisgICAgICAgIG1j X3JlZHJhd19maWxsX2NvbHVtbiAodyk7CisgICAgICB9Cit9CisKK0RFRlVOICgibWMtYWN0aXZh dGUtZmlsbC1jb2x1bW4iLCBGbWNfYWN0aXZhdGVfZmlsbF9jb2x1bW4sIFNtY19hY3RpdmF0ZV9m aWxsX2NvbHVtbiwgMSwgMSwgMCwKKyAgICAgICBkb2M6IC8qIERvYy1zdHJpbmcuICovKQorICAo TGlzcF9PYmplY3Qgd2luZG93KQoreworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2RlX2xpdmVf d2luZG93ICh3aW5kb3cpOworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3Bs YXlfcCAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBt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CBhcmcpCit7CisgIHN0cnVj dCBidWZmZXIgKmIgPSBjdXJyZW50X2J1ZmZlcjsKKyAgYm9vbCBtY19zdGRlcnJfcCA9ICghTklM UCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX3N0ZGVycikpKQorICAgICAgICAgICAgICAgICAg ID8gdHJ1ZQorICAgICAgICAgICAgICAgICAgIDogZmFsc2U7CisgIGlmIChOSUxQIChhcmcpKQor ICAgIG1jX3N0ZGVycl9wID0gIW1jX3N0ZGVycl9wOworICBlbHNlCisgICAgeworICAgICAgYXJn ID0gRnByZWZpeF9udW1lcmljX3ZhbHVlIChhcmcpOworICAgICAgbWNfc3RkZXJyX3AgPSBYRklY TlVNIChhcmcpID4gMDsKKyAgICB9CisgIGlmIChtY19zdGRlcnJfcCkKKyAgICBic2V0X2Jsdl9t Y19zdGRlcnIgKGIsIFF0KTsKKyAgICBlbHNlCisgICAgICBic2V0X2Jsdl9tY19zdGRlcnIgKGIs IFFuaWwpOworICByZXR1cm4gUW5pbDsKK30KKworLyogIChmdW5kYW1lbnRhbC1tb2RlKQorICAg IChzZXRxIGRpc3BsYXktbGluZS1udW1iZXJzIHQpCisgICAgKHNldHEgYnVmZmVyLWRpc3BsYXkt dGFibGUgKG1ha2UtZGlzcGxheS10YWJsZSkpCisgICAgKGFzZXQgYnVmZmVyLWRpc3BsYXktdGFi bGUKKyAgICAgICAgICA/XHQKKyAgICAgICAgICAodmVjdG9yIChtYWtlLWdseXBoLWNvZGUgP1x1 MDBCQiAnZm9udC1sb2NrLXdhcm5pbmctZmFjZSkKKyAgICAgICAgICAgICAgICAgIChtYWtlLWds eXBoLWNvZGUgP1x0ICdoaWdobGlnaHQpKSkKKyAgICAoYXNldCBidWZmZXItZGlzcGxheS10YWJs ZQorICAgICAgICAgID9cbgorICAgICAgICAgICh2ZWN0b3IgKG1ha2UtZ2x5cGgtY29kZSA/XHUw MEI2ICdmb250LWxvY2stY29tbWVudC1mYWNlKQorICAgICAgICAgICAgICAgICAgP1xuKSkKKyAg ICAoc2V0cSB0YWItd2lkdGggOCkKKyAgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAn Y3VycmVudC1saW5lKSAqLworCitERUZVTiAoIm1jLWRlYnVnIiwgRm1jX2RlYnVnLCBTbWNfZGVi dWcsIDAsIDAsICIiLAorICAgICAgIGRvYzogLyogVGhpcyBmdW5jdGlvbiB1c2VkIGZvciBkZWJ1 Z2dpbmcuICovKQorICAodm9pZCkKK3sKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAg ICAgICAgICAgICAgICAgIFBSRUxJTUlOQVJZIFNUVUZGCisqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKyAgc3RydWN0IHdpbmRvdyAqdyA9IGRlY29kZV9saXZlX3dpbmRvdyAoc2VsZWN0ZWRfd2lu ZG93KTsKKyAgc3RydWN0IGl0IGl0OworICB2b2lkICppdGRhdGEgPSBiaWRpX3NoZWx2ZV9jYWNo ZSAoKTsKKyAgc3RydWN0IGl0IGl0MjsKKyAgdm9pZCAqaXQyZGF0YSA9IE5VTEw7CisgIHN0cnVj dCBpdCBpdDM7CisgIHZvaWQgKml0M2RhdGEgPSBOVUxMOworICBlbnVtIG1vdmVfaXRfcmVzdWx0 IHJjID0gTU9WRV9YX1JFQUNIRUQ7CisgIHN0cnVjdCB0ZXh0X3BvcyBzdGFydF90ZXh0X3Bvc2l0 aW9uOworICBpbnQgY291bnQgPSAwOworICBpbnQgbmV3X3ggPSAwOworICBpbnQgcHJldmlvdXNf aXRfYyA9IDA7CisgIGludCBwcmV2aW91c19pdF9mZXRjaGJ5dGUgPSAwOworICBpbnQgcHJldmlv dXNfaXRfY3VycmVudF94ID0gMDsKKyAgaW50IHByZXZpb3VzX2l0X2NoYXJwb3MgPSAwOworICBp bnQgcHJldmlvdXNfaXRfcGl4ZWxfd2lkdGggPSAwOworICBib29sIGZpbmFsX2xvb3BfcCA9IGZh bHNlOworICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0aCAodywgVEVYVF9B UkVBKTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgIFNU QVJUIERJU1BMQVkgLS0gdy0+c3RhcnQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICAvKiBC ZWdpbiB0aGUgam91cm5leSBhdCB3LT5zdGFydC4gKi8KKyAgU0VUX1RFWFRfUE9TX0ZST01fTUFS S0VSIChzdGFydF90ZXh0X3Bvc2l0aW9uLCB3LT5zdGFydCk7CisgIHN0YXJ0X2Rpc3BsYXkgKCZp dCwgdywgc3RhcnRfdGV4dF9wb3NpdGlvbik7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAg ICAgICAgICAgICAgICBHTyBUTyBUSEUgQkVHSU5OSU5HIE9GIFRIRSBDVVJSRU5UIExJTkUuCisq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKyAgLyogUGxhY2UgdGhlIElUIG9uIHRoZSBjdXJyZW50 IGxpbmUgY29udGFpbmluZyBQVC4gKi8KKyAgaW50IHZvZmZzZXQgPSAoV0lORE9XX0hFQURFUl9M SU5FX0hFSUdIVCAodykgPiAwCisgICAgICAgICAgICAgICAgICYmIHctPm91dHB1dF9jdXJzb3Iu dnBvcyA+IDApCisgICAgICAgICAgICAgICAgICA/IHctPm91dHB1dF9jdXJzb3IudnBvcyAtIDEK KyAgICAgICAgICAgICAgICAgIDogdy0+b3V0cHV0X2N1cnNvci52cG9zOworICBpZiAodm9mZnNl dCA+IDApCisgICAgbW92ZV9pdF9ieV9saW5lcyAoJml0LCB2b2Zmc2V0KTsKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICBNT1ZFIElUOiAgSU5DUkVNRU5U ID09IDEgcGl4ZWwKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBmcHJpbnRmIChzdGRlcnIs ICJcbml0LmZpcnN0X3Zpc2libGVfeCAoJWQpXG4iLCBpdC5maXJzdF92aXNpYmxlX3gpOworICB3 aGlsZSAoIWZpbmFsX2xvb3BfcCkKKyAgICB7CisgICAgICBtY19kZWJ1Z19wID0gdHJ1ZTsKKyAg ICAgIGZpbmFsX2xvb3BfcCA9IChJVF9DSEFSUE9TIChpdCkgPT0gWlYpCisgICAgICAgICAgICAg ICAgICAgICAgID8gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgOiAoRkVUQ0hfQllURSAoSVRf QllURVBPUyAoaXQpKSA9PSAnXG4nCisgICAgICAgICAgICAgICAgICAgICAgICAmJiBpdC5jICE9 IDApCisgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAg OiAocmMgPT0gTU9WRV9MSU5FX0NPTlRJTlVFRCkKKyAgICAgICAgICAgICAgICAgICAgICAgPyB0 cnVlCisgICAgICAgICAgICAgICAgICAgICA6IChyYyA9PSBNT1ZFX0xJTkVfVFJVTkNBVEVECisg ICAgICAgICAgICAgICAgICAgICAgICAmJiBpdC5jdXJyZW50X3ggLSBpdC5maXJzdF92aXNpYmxl X3ggPiB0ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAg ICAgICAgICAgICAgICAgICAgOiBmYWxzZTsKKyAgICAgIGlmIChpdC5jdXJyZW50X3ggPiBwcmV2 aW91c19pdF9jdXJyZW50X3gKKyAgICAgICAgICB8fCBJVF9DSEFSUE9TIChpdCkgPiBwcmV2aW91 c19pdF9jaGFycG9zCisgICAgICAgICAgfHwgaXQuYyAhPSBwcmV2aW91c19pdF9jCisgICAgICAg ICAgfHwgaXQuYyA9PSAwCisgICAgICAgICAgfHwgaXQuYyA9PSAxMCkKKyAgICAgICAgeworICAg ICAgICAgIExpc3BfT2JqZWN0IGNoYXJhY3RlciA9IEZjaGFyX3RvX3N0cmluZyAobWFrZV9maXhu dW0gKGl0LmMpKTsKKyAgICAgICAgICBpbnQgY2hhcnBvcyA9IElUX0NIQVJQT1MgKGl0KTsKKyAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbmNoYXJwb3MgKCVkLyVkLyVkKSB8IGZpcnN0X3gg KCVkKSB8IHByZXZpb3VzX3ggKCVkKSB8IHggKCVkKSB8IGMgKCVzKSB8IHB3ICglZCkgfCBocG9z ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFycG9zLCBwcmV2aW91c19p dF9jaGFycG9zLCBGRVRDSF9CWVRFIChJVF9CWVRFUE9TIChpdCkpLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgaXQuZmlyc3RfdmlzaWJsZV94LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgcHJldmlvdXNfaXRfY3VycmVudF94LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgaXQu Y3VycmVudF94LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKCghTklMUCAoY2hhcmFjdGVy KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBpdC5jID09IDkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyAiXFx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBpdC5jID09IDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gIlxcbiIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyAhPSA5CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGl0LmMgIT0gMTApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBTU0RBVEEgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAi PyIpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgaXQucGl4ZWxfd2lkdGgsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICBpdC5ocG9zKTsKKyAgICAgICAgICBwcmV2aW91c19pdF9jID0g aXQuYzsKKyAgICAgICAgICBwcmV2aW91c19pdF9jdXJyZW50X3ggPSBpdC5jdXJyZW50X3g7Cisg ICAgICAgICAgcHJldmlvdXNfaXRfY2hhcnBvcyA9IElUX0NIQVJQT1MgKGl0KTsKKyAgICAgICAg ICBwcmV2aW91c19pdF9mZXRjaGJ5dGUgPSBGRVRDSF9CWVRFIChJVF9CWVRFUE9TIChpdCkpOwor ICAgICAgICAgIHByZXZpb3VzX2l0X3BpeGVsX3dpZHRoID0gaXQucGl4ZWxfd2lkdGg7CisgICAg ICAgICAgY291bnQgKz0gMTsKKyAgICAgICAgfQorICAgICAgbmV3X3ggKz0gMTsKKyAgICAgIFNB VkVfSVQgKGl0MiwgaXQsIGl0MmRhdGEpOworICAgICAgcmMgPSBtb3ZlX2l0X2luX2Rpc3BsYXlf bGluZV90byAoJml0LCBaViwgbmV3X3gsIE1PVkVfVE9fUE9TIHwgTU9WRV9UT19YKTsKKyAgICAg IFNBVkVfSVQgKGl0MywgaXQsIGl0M2RhdGEpOworICAgIH0KKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVEhFIEVORAorKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisgIG1jX2RlYnVnX3AgPSBmYWxzZTsKKyAgYmlkaV91bnNoZWx2ZV9j YWNoZSAoaXRkYXRhLCBmYWxzZSk7CisgIHJldHVybiBRbmlsOworfQorCisvKiBlbmQgTVVMVElQ TEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogDAogLyoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqCiAJCSAgICAgIFdpbmRvdyBkaXNwbGF5IGRpbWVuc2lvbnMKQEAgLTExMjE0LDcgKzE2 MzM0LDE4IEBAIHJlc2l6ZV9lY2hvX2FyZWFfZXhhY3RseSAodm9pZCkKIAl7CiAJICB3aW5kb3dz X29yX2J1ZmZlcnNfY2hhbmdlZCA9IDQyOwogCSAgdXBkYXRlX21vZGVfbGluZXMgPSAzMDsKLQkg IHJlZGlzcGxheV9pbnRlcm5hbCAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMTsK KyAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoMSk7CisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJu YWwgPSAwOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJfQogICAgIH0KIH0KQEAg LTExNzAxLDcgKzE2ODMyLDE4IEBAIGVjaG9fYXJlYV9kaXNwbGF5IChib29sIHVwZGF0ZV9mcmFt ZV9wKQogCSAgICAgIHB0cmRpZmZfdCBjb3VudCA9IFNQRUNQRExfSU5ERVggKCk7CiAJICAgICAg c3BlY2JpbmQgKFFyZWRpc3BsYXlfZG9udF9wYXVzZSwgUXQpOwogCSAgICAgIGZzZXRfcmVkaXNw bGF5IChmKTsKLQkgICAgICByZWRpc3BsYXlfaW50ZXJuYWwgKCk7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgICAgICBtY19yZWRp c3BsYXlfaW50ZXJuYWwgPSAyOworICAgICAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoMik7Cisg ICAgICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogCSAgICAgIHVuYmluZF90byAoY291bnQsIFFuaWwpOwogCSAgICB9CiAJICBl bHNlIGlmIChGUkFNRV9XSU5ET1dfUCAoZikgJiYgbiA9PSAwKQpAQCAtMTMzODAsNiArMTg1MjIs MTkgQEAgaHNjcm9sbF93aW5kb3dfdHJlZSAoTGlzcF9PYmplY3Qgd2luZG93KQogCSAgICAgIGVs c2UKIAkJcHQgPSBjbGlwX3RvX2JvdW5kcyAoQkVHViwgbWFya2VyX3Bvc2l0aW9uICh3LT5wb2lu dG0pLCBaVik7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgc3RydWN0IGRpc3BsYXlfcG9zICpwb3MgPSAmY3Vyc29yX3Jvdy0+c3RhcnQ7 CisgIHB0cmRpZmZfdCBjaGFycG9zID0gQ0hBUlBPUyAocG9zLT5wb3MpOworICBib29sIGJhcmZf Y3Jhc2ggPSAoY2hhcnBvcyA8IDAgfHwgKGNoYXJwb3MgPj0gQlVGX0JFRyAoY3VycmVudF9idWZm ZXIpICYmIGNoYXJwb3MgPD0gWlYpKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2gp CisgICAgcmV0dXJuIGhzY3JvbGxlZF9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJICAgICAgLyogTW92ZSBpdGVyYXRvciB0byBwdCBzdGFydGluZyBhdCBjdXJzb3Jfcm93LT5z dGFydCBpbgogCQkgYSBsaW5lIHdpdGggaW5maW5pdGUgd2lkdGguICAqLwogCSAgICAgIGluaXRf dG9fcm93X3N0YXJ0ICgmaXQsIHcsIGN1cnNvcl9yb3cpOwpAQCAtMTM2MjAsMTIgKzE4Nzc1LDI2 IEBAIHRleHRfb3V0c2lkZV9saW5lX3VuY2hhbmdlZF9wIChzdHJ1Y3Qgd2luZG93ICp3LAogICAg aXMgbm8gbG9uZ2VyIHJlcXVlc3RlZCwgd2UgY2xlYXIgdGhlIGVjaG8gYXJlYSBvciBicmluZyBi YWNrIHRoZQogICAgbWluaS1idWZmZXIgaWYgdGhhdCBpcyBpbiB1c2UuICAqLwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCiB2b2lkCi1yZWRp c3BsYXkgKHZvaWQpCityZWRpc3BsYXkgKGludCBmcm9tX3doZXJlKQogewotICByZWRpc3BsYXlf aW50ZXJuYWwgKCk7CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9w KQorICAgIGZwcmludGYgKHN0ZGVyciwgIlxucmVkaXNwbGF5ICglZClcbiIsIGZyb21fd2hlcmUp OworI2VuZGlmCisgIG1jX3JlZGlzcGxheSA9IGZyb21fd2hlcmU7CisgIG1jX3JlZGlzcGxheV9p bnRlcm5hbCA9IDM7CisgIHJlZGlzcGxheV9pbnRlcm5hbCAoMyk7CisgIG1jX3JlZGlzcGxheV9p bnRlcm5hbCA9IDA7CisgIG1jX3JlZGlzcGxheSA9IDA7CiB9CiAKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCiAKIHN0YXRpYyBMaXNwX09iamVjdAogb3ZlcmxheV9hcnJvd19zdHJpbmdfb3Jf cHJvcGVydHkgKExpc3BfT2JqZWN0IHZhcikKQEAgLTEzODkxLDkgKzE5MDYwLDIxIEBAIGRvIHsg aWYgKHBvbGxpbmdfc3RvcHBlZF9oZXJlKSBzdGFydF9wb2xsaW5nICgpOwlcCiAvKiBQZXJoYXBz IGluIHRoZSBmdXR1cmUgYXZvaWQgcmVjZW50ZXJpbmcgd2luZG93cyBpZiBpdAogICAgaXMgbm90 IG5lY2Vzc2FyeTsgY3VycmVudGx5IHRoYXQgY2F1c2VzIHNvbWUgcHJvYmxlbXMuICAqLwogCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCiBzdGF0 aWMgdm9pZAotcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQorcmVkaXNwbGF5X2ludGVybmFsIChp bnQgZnJvbV93aGVyZSkKIHsKKyNpZmRlZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNw bGF5X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5yZWRpc3BsYXlfaW50ZXJuYWwgKCVkKVxu IiwgZnJvbV93aGVyZSk7CisjZW5kaWYKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICBzdHJ1Y3Qgd2luZG93ICp3ID0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKICAgc3RydWN0 IHdpbmRvdyAqc3c7CiAgIHN0cnVjdCBmcmFtZSAqZnI7CkBAIC0xNDI5NSw2ICsxOTQ3NiwyNiBA QCByZWRpc3BsYXlfaW50ZXJuYWwgKHZvaWQpCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAJ ICAgICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBmYWxzZSk7CiAjZW5kaWYKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTk9URTog IEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2VyIGByZWRp c3BsYXlfd2luZG93Jy4KKyAgIGB3LT5tdXN0X2JlX3VwZGF0ZWRfcCcgaXMgc2V0IHRvIHRydWUg d2l0aGluIGBtYy1hY3RpdmF0ZS1jcm9zc2hhaXJzJy4KKy0gIGBvcHRpbWl6YXRpb24gMWAgKGUu Zy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4gbGluZSku CistICBgb3B0aW1pemF0aW9uIDNgIChlLmcuLCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBv biBzY3JlZW4gbGluZXMgc3Vic2VxdWVudAorICAgIHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSks IGJ5cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgYmxvY2tfaW5wdXQgKCk7CisgIG1j X3JlbW92ZV9tdWx0aXBsZV9jdXJzb3JzICh3KTsKKyAgbWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcp OworICBtY19yZW1vdmVfZmlsbF9jb2x1bW4gKHcpOworICB1bmJsb2NrX2lucHV0ICgpOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAgZ290byB1cGRhdGU7CiAJICAgIH0K IAkgIGVsc2UKQEAgLTE0MzE3LDYgKzE5NTE4LDIyIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9p ZCkKIAkJICAmJiAodyA9IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpICE9IHN3KQogCQlnb3Rv IHJldHJ5OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09S UyAqLworCisvKiBOT1RFOiAgQW4gaWRsZS10aW1lciBmdW5jdGlvbiBtYXkgbm90IG5lY2Vzc2Fy aWx5IHRyaWdnZXIgYHJlZGlzcGxheV93aW5kb3cnLgorICAgYHctPm11c3RfYmVfdXBkYXRlZF9w JyBpcyBzZXQgdG8gdHJ1ZSB3aXRoaW4gYG1jLWFjdGl2YXRlLWNyb3NzaGFpcnMnLgorLSAgYG9w dGltaXphdGlvbiAxYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gdGhlIGZp cnN0IHNjcmVlbiBsaW5lKS4KKy0gIGBvcHRpbWl6YXRpb24gM2AgKGUuZy4sIGxlZnQvcmlnaHQg Y3Vyc29yIG1vdmVtZW50IG9uIHNjcmVlbiBsaW5lcyBzdWJzZXF1ZW50CisgICAgdG8gdGhlIGZp cnN0IHNjcmVlbiBsaW5lKSwgYnlwYXNzIGByZWRpc3BsYXlfd2luZG93Jy4gKi8KKworICAgIGlm ICh3LT5tdXN0X2JlX3VwZGF0ZWRfcCkKKyAgICAgIGdvdG8gdXBkYXRlOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAJICAgICAgLyogV2UgdXNlZCB0byBhbHdheXMgZ290byBlbmRf b2ZfcmVkaXNwbGF5IGhlcmUsIGJ1dCB0aGlzCiAJCSBpc24ndCBlbm91Z2ggaWYgd2UgaGF2ZSBh IGJsaW5raW5nIGN1cnNvci4gICovCiAJICAgICAgaWYgKHctPmN1cnNvcl9vZmZfcCA9PSB3LT5s YXN0X2N1cnNvcl9vZmZfcCkKQEAgLTE0MzU4LDYgKzE5NTc1LDI2IEBAIHJlZGlzcGxheV9pbnRl cm5hbCAodm9pZCkKIAkJICAqdy0+ZGVzaXJlZF9tYXRyaXgtPm1ldGhvZCA9IDA7CiAJCSAgZGVi dWdfbWV0aG9kX2FkZCAodywgIm9wdGltaXphdGlvbiAzIik7CiAjZW5kaWYKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTk9URTogIEFu IGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2VyIGByZWRpc3Bs YXlfd2luZG93Jy4KKyAgIGB3LT5tdXN0X2JlX3VwZGF0ZWRfcCcgaXMgc2V0IHRvIHRydWUgd2l0 aGluIGBtYy1hY3RpdmF0ZS1jcm9zc2hhaXJzJy4KKy0gIGBvcHRpbWl6YXRpb24gMWAgKGUuZy4s IGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4gbGluZSkuCist ICBgb3B0aW1pemF0aW9uIDNgIChlLmcuLCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBvbiBz Y3JlZW4gbGluZXMgc3Vic2VxdWVudAorICAgIHRvIHRoZSBmaXJzdCBzY3JlZW4gbGluZSksIGJ5 cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgYmxvY2tfaW5wdXQgKCk7CisgIG1jX3Jl bW92ZV9tdWx0aXBsZV9jdXJzb3JzICh3KTsKKyAgbWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHcpOwor ICBtY19yZW1vdmVfZmlsbF9jb2x1bW4gKHcpOworICB1bmJsb2NrX2lucHV0ICgpOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAJCSAgZ290byB1cGRhdGU7CiAJCX0KIAkgICAgICBl bHNlCkBAIC0xNDczOCwxNiArMTk5NzUsNTggQEAgcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJl YSAoaW50IGZyb21fd2hlcmUpCiAgIGJsb2NrX2J1ZmZlcl9mbGlwcyAoKTsKICAgdW5ibG9ja19p bnB1dCAoKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNP UlMgKi8KKworICBzdHJ1Y3Qgd2luZG93ICp3ID0gZGVjb2RlX2xpdmVfd2luZG93IChzZWxlY3Rl ZF93aW5kb3cpOworICB3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID0gZnJvbV93 aGVyZTsKKyAgbWNfcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IGZyb21fd2hlcmU7CisK ICAgaWYgKCFOSUxQIChlY2hvX2FyZWFfYnVmZmVyWzFdKSkKICAgICB7CiAgICAgICAvKiBXZSBo YXZlIGEgcHJldmlvdXNseSBkaXNwbGF5ZWQgbWVzc2FnZSwgYnV0IG5vIGN1cnJlbnQKIAkgbWVz c2FnZS4gIFJlZGlzcGxheSB0aGUgcHJldmlvdXMgbWVzc2FnZS4gICovCiAgICAgICBkaXNwbGF5 X2xhc3RfZGlzcGxheWVkX21lc3NhZ2VfcCA9IHRydWU7Ci0gICAgICByZWRpc3BsYXlfaW50ZXJu YWwgKCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDQ7CisgICAgICByZWRpc3BsYXlf aW50ZXJuYWwgKDQpOworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogICAgICAgZGlzcGxheV9sYXN0X2Rpc3BsYXllZF9tZXNz YWdlX3AgPSBmYWxzZTsKICAgICB9CiAgIGVsc2UKLSAgICByZWRpc3BsYXlfaW50ZXJuYWwgKCk7 CisgICAgeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09S UyAqLworCisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSA1OworICAgICAgcmVkaXNwbGF5 X2ludGVybmFsICg1KTsKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDA7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKKyAgICB9CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgdy0+bWMucmVkaXNwbGF5X3ByZXNlcnZl X2VjaG9fYXJlYSA9IDA7CisgIG1jX3JlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPSAwOwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAgIGZsdXNoX2ZyYW1lIChTRUxFQ1RFRF9G UkFNRSAoKSk7CiAgIHVuYmluZF90byAoY291bnQsIFFuaWwpOwpAQCAtMTczMDIsNiArMjI1ODEs MjUgQEAgcmVkaXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3RfdGhp c19vbmVfcCkKICAgZGVidWdfbWV0aG9kX2FkZCAodywgInJlY2VudGVyIik7CiAjZW5kaWYKIAor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworLyog Tk9URTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0cmlnZ2Vy IGByZWRpc3BsYXlfd2luZG93Jy4KKyAgIGB3LT5tdXN0X2JlX3VwZGF0ZWRfcCcgaXMgc2V0IHRv IHRydWUgd2l0aGluIGBtYy1hY3RpdmF0ZS1jcm9zc2hhaXJzJy4KKy0gIGBvcHRpbWl6YXRpb24g MWAgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3JlZW4g bGluZSkuCistICBgb3B0aW1pemF0aW9uIDNgIChlLmcuLCBsZWZ0L3JpZ2h0IGN1cnNvciBtb3Zl bWVudCBvbiBzY3JlZW4gbGluZXMgc3Vic2VxdWVudAorICAgIHRvIHRoZSBmaXJzdCBzY3JlZW4g bGluZSksIGJ5cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgYmxvY2tfaW5wdXQgKCk7 CisgIG1jX3JlbW92ZV9tdWx0aXBsZV9jdXJzb3JzICh3KTsKKyAgbWNfcmVtb3ZlX2Nyb3NzaGFp cnMgKHcpOworICBtY19yZW1vdmVfZmlsbF9jb2x1bW4gKHcpOworICB1bmJsb2NrX2lucHV0ICgp OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEZvcmdldCBhbnkgcHJldmlv dXNseSByZWNvcmRlZCBiYXNlIGxpbmUgZm9yIGxpbmUgbnVtYmVyIGRpc3BsYXkuICAqLwogICBp ZiAoIWJ1ZmZlcl91bmNoYW5nZWRfcCkKICAgICB3LT5iYXNlX2xpbmVfbnVtYmVyID0gMDsKQEAg LTE3NzMyLDYgKzIzMDMwLDI1IEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3BfT2JqZWN0IHdpbmRv dywgYm9vbCBqdXN0X3RoaXNfb25lX3ApCiAgIGVsc2UKICAgICBURU1QX1NFVF9QVF9CT1RIIChD SEFSUE9TIChvcG9pbnQpLCBCWVRFUE9TIChvcG9pbnQpKTsKIAorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8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DM5LDE3IEBAIGFwcGVuZF9zcGFjZV9mb3Jf bmV3bGluZSAoc3RydWN0IGl0ICppdCwgYm9vbCBkZWZhdWx0X2ZhY2VfcCkKIAkgIG1lbXNldCAo Jml0LT5wb3NpdGlvbiwgMCwgc2l6ZW9mIGl0LT5wb3NpdGlvbik7CiAJICBpdC0+b2JqZWN0ID0g UW5pbDsKIAkgIGl0LT5jID0gaXQtPmNoYXJfdG9fZGlzcGxheSA9ICcgJzsKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgaWYgKElU X0JZVEVQT1MgKCppdCkgPj0gWlZfQllURSkKKyAgICAgICAgaXQtPnp2X3AgPSB0cnVlOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBpdC0+bGVuID0gMTsKIAogCSAgLyogSWYg dGhlIGRlZmF1bHQgZmFjZSB3YXMgcmVtYXBwZWQsIGJlIHN1cmUgdG8gdXNlIHRoZQpAQCAtMjEw ODUsNiArMjY0MTMsMjEgQEAgZGlzcGxheV9jb3VudF9saW5lc192aXN1YWxseSAoc3RydWN0IGl0 ICppdCkKIHN0YXRpYyB2b2lkCiBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChzdHJ1Y3QgaXQg Kml0KQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09S UyAqLworCisgIGJvb2wgYmFyZl9jcmFzaCA9IChpdC0+Z2x5cGhfcm93ID09IE5VTEwKKyAgICAg ICAgICAgICAgICAgICAgIHx8IGl0LT5nbHlwaF9yb3ctPnVzZWRbVEVYVF9BUkVBXSA9PSAwKQor ICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsK KyAgaWYgKGJhcmZfY3Jhc2gpCisgICAgcmV0dXJuOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgIHB0cmRpZmZfdCBsYXN0X2xpbmUgPSBpdC0+bG51bTsKICAgcHRyZGlmZl90IHN0 YXJ0X2Zyb20sIGJ5dGVwb3M7CiAgIHB0cmRpZmZfdCB0aGlzX2xpbmU7CkBAIC0yMTI1NSw5ICsy NjU5OCwyMiBAQCBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChzdHJ1Y3QgaXQgKml0KQogICAg ICAgZWxzZQogCXRlbV9pdC5jID0gdGVtX2l0LmNoYXJfdG9fZGlzcGxheSA9ICpwOwogICAgICAg dGVtX2l0LmxlbiA9IDE7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RSBDVVJTT1JTICovCisKKyAgICAgIGlmIChiZXlvbmRfenYpCisgICAgICAgIHRlbV9pdC56dl9w ID0gdHJ1ZTsKKyAgICAgIHRlbV9pdC5jdXJyZW50X3kgPSBpdC0+Y3VycmVudF95OworICAgICAg dGVtX2l0LnZwb3MgPSBpdC0+dnBvczsKICAgICAgIC8qIE1ha2Ugc3VyZSB0aGVzZSBnbHlwaHMg d2lsbCBoYXZlIGEgInBvc2l0aW9uIiBvZiAtMS4gICovCiAgICAgICBTRVRfVEVYVF9QT1MgKHRl bV9pdC5wb3NpdGlvbiwgLTEsIC0xKTsKICAgICAgIFBST0RVQ0VfR0xZUEhTICgmdGVtX2l0KTsK KyAgICAgIHRlbV9pdC5ocG9zICs9IDE7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAK ICAgICAgIC8qIFN0b3AgcHJvZHVjaW5nIGdseXBocywgYW5kIHJlZnJhaW4gZnJvbSBwcm9kdWNp bmcgdGhlIGxpbmUKIAkgbnVtYmVyLCBpZiB3ZSBkb24ndCBoYXZlIGVub3VnaCBzcGFjZSBvbiB0 aGlzIGxpbmUuICAqLwpAQCAtMjY4NDEsNyArMzIxOTcsNjggQEAgZHJhd19nbHlwaHMgKHN0cnVj dCB3aW5kb3cgKncsIGludCB4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCiAJIHByZXBlbmRlZCBt dXN0IGJlIGRyYXduIGJlY2F1c2UgdGhlIGZpcnN0IGdseXBoIHN0cmluZwogCSBkcmF3cyBvdmVy IGl0LiAgKi8KICAgICAgIGkgPSBsZWZ0X292ZXJ3cml0dGVuIChoZWFkKTsKLSAgICAgIGlmIChp ID49IDApCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKyAgICAgIGJvb2wgc2tpcF9wID0gZmFsc2U7CisgICAgICBpbnQgYmVnID0gaTsKKwor ICAgICAgaWYgKGkgPj0gMAorICAgICAgICAgICYmIGhsID09IERSQVdfQ1VSU09SCisgICAgICAg ICAgJiYgKHctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICAgICAgICB8fCB3 LT5tYy5nbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgIHx8IHctPm1j LmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSF9UQUIpKQorICAgICAgICB3aGlsZSAoYmVnIDwgc3Rh cnQpCisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IChyb3cp LT5nbHlwaHNbYXJlYV0gKyBiZWc7CisgICAgICAgICAgICBzd2l0Y2ggKGdseXBoLT50eXBlKQor ICAgICAgICAgICAgeworICAgICAgICAgICAgICBjYXNlIENIQVJfR0xZUEg6CisgICAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgQ09NUE9TSVRFX0dMWVBIOgorICAgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CisgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3QgY2hhcmFjdGVyID0g KENIQVJBQ1RFUlAgKG1ha2VfZml4bnVtIChnbHlwaC0+dS5jaCkpKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gRmNoYXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51 bSAoZ2x5cGgtPnUuY2gpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogUW5pbDsKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuY2hhcmFj dGVyICglZCB8ICVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5 cGgtPnUuY2gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoIU5JTFAgKGNo YXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+ dS5jaCA9PSAxMDQ4NTk2KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyAiXFxUIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChj aGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGgtPnUuY2ggPT0gMTApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ ICJcXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNo YXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlw aC0+dS5jaCA9PSAxMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g IlxcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hh cmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBo LT51LmNoID09IDMyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAi XFxzIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFy YWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgt PnUuY2ggIT0gOQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGds eXBoLT51LmNoICE9IDEwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggIT0gMzIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogIlxcPyIpKTsKKyAgICAgICAgICAgICAgICAgIHNraXBfcCA9IHRydWU7CisgICAg ICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGNh c2UgSU1BR0VfR0xZUEg6CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgICBiZWcgKz0gMTsKKyAgICAgICAgICB9CisKKyAgICAgIGlmIChpID49IDAKKyAg ICAgICAgICAmJiAhc2tpcF9wKQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJewog CSAgZW51bSBkcmF3X2dseXBoc19mYWNlIG92ZXJsYXBfaGw7CiAKQEAgLTI3MDY5LDYgKzMyNDg2 LDI0IEBAIGFwcGVuZF9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAkgICAgZ1sxXSA9ICpnOwogCSAg Z2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07CiAJfQorCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+eCA9 IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKworICAg ICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBv czsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24p OwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAgICAgICBpZiAoaXQtPnBpeGVs X3dpZHRoID4gMCkKQEAgLTI3MTUyLDYgKzMyNTg3LDI0IEBAIGFwcGVuZF9jb21wb3NpdGVfZ2x5 cGggKHN0cnVjdCBpdCAqaXQpCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBo X3Jvdy0+Z2x5cGhzW2l0LT5hcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRf eDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBv cyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBn bHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg ICAgICBnbHlwaC0+Y2hhcnBvcyA9IGl0LT5jbXBfaXQuY2hhcnBvczsKICAgICAgIGdseXBoLT5v YmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNI UlRfTUFYKTsKQEAgLTI3MzYwLDYgKzMyODEzLDI0IEBAIHByb2R1Y2VfaW1hZ2VfZ2x5cGggKHN0 cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhz W2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAg Z2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9z OworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9 IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBnbHlwaC0+Y2hh cnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9i amVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9fYm91bmRzICgtMSwgaXQtPnBp eGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzQ2Myw2ICszMjkzNCwyNCBAQCBwcm9kdWNlX3h3 aWRnZXRfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmds eXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJl bnRfeDsKKworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+ aHBvcyA9IGl0LT5ocG9zOworCisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAg ICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlwaC0+ b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9fYm91 bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzU0OSw2ICszMzAzOCwy NCBAQCBhcHBlbmRfc3RyZXRjaF9nbHlwaCAoc3RydWN0IGl0ICppdCwgTGlzcF9PYmplY3Qgb2Jq ZWN0LAogCSAgICB3aWR0aCAtPSBpdC0+Zmlyc3RfdmlzaWJsZV94IC0gaXQtPmN1cnJlbnRfeDsK IAkgIGVhc3NlcnQgKHdpZHRoID4gMCk7CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50 X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhw b3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAg Z2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5 cGgtPm9iamVjdCA9IG9iamVjdDsKICAgICAgIC8qIEZJWE1FOiBJdCB3b3VsZCBiZSBiZXR0ZXIg dG8gdXNlIFRZUEVfTUFYIGhlcmUsIGJ1dApAQCAtMjgwMDMsNiArMzM1MTAsMjQgQEAgYXBwZW5k X2dseXBobGVzc19nbHlwaCAoc3RydWN0IGl0ICppdCwgaW50IGZhY2VfaWQsIGJvb2wgZm9yX25v X2ZvbnQsIGludCBsZW4sCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jv dy0+Z2x5cGhzW2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisg ICAgICBnbHlwaC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQt Pmhwb3M7CisKKyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56 dl9wID0gaXQtPnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGds eXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmpl Y3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNIUlRf TUFYKTsKQEAgLTI5NzY5LDkgKzM1Mjk0LDMyIEBAIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHN0 cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgICAgICB3LT5waHlzX2N1cnNvci52cG9zID0gdnBv czsKICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJT T1JTICovCisKKyAgdy0+bWMuaCA9IC0xOworICB3LT5tYy5meCA9IC0xOworICB3LT5tYy5meSA9 IC0xOworICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBOT19GTEFWT1I7CisgIHctPm1jLnJlZCA9IC0x LjA7CisgIHctPm1jLmdyZWVuID0gLTEuMDsKKyAgdy0+bWMuYmx1ZSA9IC0xLjA7CisgIHctPm1j LnBvc2ludCA9IC0xOworCiAgIEZSQU1FX1JJRiAoZiktPmRyYXdfd2luZG93X2N1cnNvciAodywg Z2x5cGhfcm93LCB4LCB5LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5l d19jdXJzb3JfdHlwZSwgbmV3X2N1cnNvcl93aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBvbiwgYWN0aXZlX2N1cnNvcik7CisKKyAgbWNfbXVsdGlwbGVfY3Vyc29y c19wb3J0YWwgKHcsIG9uLCBhY3RpdmVfY3Vyc29yKTsKKworICBtY19jcm9zc2hhaXJzX3BvcnRh bCAodywgb24sIGFjdGl2ZV9jdXJzb3IpOworCisgIG1jX2ZpbGxfY29sdW1uX3BvcnRhbCAodywg b24sIGFjdGl2ZV9jdXJzb3IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAK IApAQCAtMzI1MjgsNiArMzgwNzYsMjggQEAgeF9pbnRlcnNlY3RfcmVjdGFuZ2xlcyAoWFJlY3Rh bmdsZSAqcjEsIFhSZWN0YW5nbGUgKnIyLCBYUmVjdGFuZ2xlICpyZXN1bHQpCiB2b2lkCiBzeW1z X29mX3hkaXNwICh2b2lkKQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUgQ1VSU09SUyAqLworCisgIGRlZnN1YnIgKCZTbWNfZHVtcF9nbHlwaF9yb3cpOworCisg IGRlZnN1YnIgKCZTbWNfZHVtcF9nbHlwaF9tYXRyaXgpOworCisgIGRlZnN1YnIgKCZTbWNfYWN0 aXZhdGVfbXVsdGlwbGVfY3Vyc29ycyk7CisKKyAgZGVmc3ViciAoJlNtY19hY3RpdmF0ZV9jcm9z c2hhaXJzKTsKKworICBkZWZzdWJyICgmU21jX3N0ZGVycik7CisKKyAgZGVmc3ViciAoJlNtY19k ZWJ1Zyk7CisKKyAgZGVmc3ViciAoJlNtY19hY3RpdmF0ZV9maWxsX2NvbHVtbik7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgVndpdGhfZWNob19hcmVhX3NhdmVfdmVjdG9yID0g UW5pbDsKICAgc3RhdGljcHJvICgmVndpdGhfZWNob19hcmVhX3NhdmVfdmVjdG9yKTsKIApkaWZm IC0tZ2l0IGEvc3JjL3h0ZXJtLmMgYi9zcmMveHRlcm0uYwppbmRleCAzYTdlMzFlLi4xZTk0OTJi IDEwMDY0NAotLS0gYS9zcmMveHRlcm0uYworKysgYi9zcmMveHRlcm0uYwpAQCAtOTkyLDYgKzk5 MiwxNSBAQCB4X3VwZGF0ZV9iZWdpbiAoc3RydWN0IGZyYW1lICpmKQogICBpZiAoRlJBTUVfVE9P TFRJUF9QIChmKSAmJiAhRlJBTUVfVklTSUJMRV9QIChmKSkKICAgICByZXR1cm47CiAKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgZi0+bWNf dXBkYXRpbmdfZnJhbWUgPSBmOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGlm ICghIEZSQU1FX0NSX1NVUkZBQ0UgKGYpKQogICAgIHsKICAgICAgIGludCB3aWR0aCwgaGVpZ2h0 OwpAQCAtMTI1OCw2ICsxMjY3LDE2IEBAIHhfdXBkYXRlX2VuZCAoc3RydWN0IGZyYW1lICpmKQog ICBYRmx1c2ggKEZSQU1FX1hfRElTUExBWSAoZikpOwogICB1bmJsb2NrX2lucHV0ICgpOwogI2Vu ZGlmCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBOVUxMOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiB9CiAKIC8qIFRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIGZyb20gdmFyaW91cyBw bGFjZXMgaW4geGRpc3AuYwpAQCAtMTUzMCw2ICsxNTQ5LDIwIEBAIHN0YXRpYyB2b2lkIHhfY2hl Y2tfZm9udCAoc3RydWN0IGZyYW1lICosIHN0cnVjdCBmb250ICopOwogc3RhdGljIHZvaWQKIHhf c2V0X2N1cnNvcl9nYyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKIHsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBpZiAocy0+dy0+bWMu Y3Vyc29yX2djX2RlZmF1bHQpCisgICAgeworICAgICAgcy0+Z2MgPSBzLT5mLT5vdXRwdXRfZGF0 YS54LT5jdXJzb3JfZ2M7CisgICAgICByZXR1cm47CisgICAgfQorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgIGlmIChzLT5mb250ID09IEZSQU1FX0ZPTlQgKHMtPmYpCiAgICAgICAm JiBzLT5mYWNlLT5iYWNrZ3JvdW5kID09IEZSQU1FX0JBQ0tHUk9VTkRfUElYRUwgKHMtPmYpCiAg ICAgICAmJiBzLT5mYWNlLT5mb3JlZ3JvdW5kID09IEZSQU1FX0ZPUkVHUk9VTkRfUElYRUwgKHMt PmYpCkBAIC05MjUyLDYgKzkyODUsMjYgQEAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHN0cnVjdCB3 aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdykKIAogICAvKiBDb21wdXRlIGZyYW1lLXJl bGF0aXZlIGNvb3JkaW5hdGVzIGZvciBwaHlzIGN1cnNvci4gICovCiAgIGdldF9waHlzX2N1cnNv cl9nZW9tZXRyeSAodywgcm93LCBjdXJzb3JfZ2x5cGgsICZ4LCAmeSwgJmgpOworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBMRUdFTkQ6 CisKKy0gIHRvcCB5ID09IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpCisKKy0g IGJvdHRvbSB5ID09IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpIC0gcm93LT5o ZWlnaHQKKworLSAgaCBvZiBIT0xMT1dfQk9YX0NVUlNPUiA9PSByb3ctPmhlaWdodAorICAgW1Ro aXMgYXZvaWRzIGEgdmlzaWJsZSBnYXAgYWJvdmUvYmVsb3cuXSAqLworCisgIGlmICh3LT5tYy5o ID4gMCkKKyAgICBoID0gcm93LT5oZWlnaHQ7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICAgd2QgPSB3LT5waHlzX2N1cnNvcl93aWR0aCAtIDE7CiAKICAgLyogVGhlIGZvcmVncm91 bmQgb2YgY3Vyc29yX2djIGlzIHR5cGljYWxseSB0aGUgc2FtZSBhcyB0aGUgbm9ybWFsCkBAIC05 MzI4LDcgKzkzODEsMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0 cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHdpZHRoLCBlbnVtIHRleHQKIAkgaW52aXNpYmxlLiAg VXNlIHRoZSBnbHlwaCdzIGZvcmVncm91bmQgY29sb3IgaW5zdGVhZCBpbiB0aGlzCiAJIGNhc2Us IG9uIHRoZSBhc3N1bXB0aW9uIHRoYXQgdGhlIGdseXBoJ3MgY29sb3JzIGFyZSBjaG9zZW4gc28K IAkgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICovCi0gICAgICBpZiAoZmFjZS0+YmFja2dy b3VuZCA9PSBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwpCisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGlmIChmYWNlLT5i YWNrZ3JvdW5kID09IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbAorICAgICAgICAgICYm ICF3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkpCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIAl4Z2N2LmJhY2tncm91bmQgPSB4Z2N2LmZvcmVncm91bmQgPSBmYWNlLT5mb3Jl Z3JvdW5kOwogICAgICAgZWxzZQogCXhnY3YuYmFja2dyb3VuZCA9IHhnY3YuZm9yZWdyb3VuZCA9 IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbDsKQEAgLTkzNTksNiArOTQyMiwxNyBAQCB4 X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93 LCBpbnQgd2lkdGgsIGVudW0gdGV4dAogCSAgaWYgKChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xl dmVsICYgMSkgIT0gMCkKIAkgICAgeCArPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gd2lk dGg7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKKyAgICAvKiBBbGlnbiBhbGwgZmFrZSBCQVJfQ1VSU09SIG9mIHRoZSBWRVJUSUNBTF9SVUxF UiB3aXRoIGBvcG9pbnRfeCcuICovCisgICAgaWYgKHctPm1jLmZ4ID4gMCkKKyAgICAgIHggPSB3 LT5tYy5meDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgeF9maWxsX3JlY3Rh bmdsZSAoZiwgZ2MsIHgsCiAJCQkgIFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB3LT5waHlz X2N1cnNvci55KSwKIAkJCSAgd2lkdGgsIHJvdy0+aGVpZ2h0KTsKQEAgLTk0MzUsMzEgKzk1MDks MTczIEBAIHhfZHJhd193aW5kb3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5 cGhfcm93ICpnbHlwaF9yb3csIGludCB4LAogCX0KICAgICAgIGVsc2UKIAl7Ci0JICBzd2l0Y2gg KGN1cnNvcl90eXBlKQotCSAgICB7Ci0JICAgIGNhc2UgSE9MTE9XX0JPWF9DVVJTT1I6Ci0JICAg ICAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jvdyk7Ci0JICAgICAgYnJlYWs7CiAK LQk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BVUxUX0ZBQ0VfSUQpOworICAgICAg ICAgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOworICAgICAgICAgIENIRUNLX0JVRkZF UiAoYnVmKTsKKyAgICAgICAgICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVmKTsKKyAg ICAgICAgICBib29sIHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21v ZGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIs IG1hcmtfYWN0aXZlKSkpOworICAgICAgICAgIHB0cmRpZmZfdCByZWdpb25fYmVnaW5uaW5nID0g KHJlZ2lvbl9hY3RpdmVfcCkgPyBYRklYTlVNIChGcmVnaW9uX2JlZ2lubmluZyAoKSkgOiAtMTsK KyAgICAgICAgICBwdHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdpb25fYWN0aXZlX3ApID8gWEZJ WE5VTSAoRnJlZ2lvbl9lbmQgKCkpIDogLTE7CisgICAgICAgICAgYm9vbCByZWdpb25faW5fYm91 bmRzX3AgPSAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+bWMucG9zaW50ID49IHJlZ2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tYy5wb3NpbnQgPCByZWdpb25fZW5kKTsKKyAg ICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9n YycgYnkgYm9ycm93aW5nIHRoZQorICAgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9n YycgaW4geGZucy5jLiAgKi8KKyAgICAgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAg ICAgICAgICYmIHJlZ2lvbl9pbl9ib3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2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tn cm91bmQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAvKiBUaGUgcmVnaW9u IGlzIF9ub3RfIHZpc2libGUgaW4gdGhlIGluYWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRoZSBvdmVy bGF5IHdpbmRvdyBwcm9wZXJ0eSBpcyB1c2VkLiAqLworICAgICAgICAgICAgICAgIGVsc2UgaWYg KCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgZW51 bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpOwor ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBG QUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAg ICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9nYywgZGVmYXVsdF9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAg ICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQpOworICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgIC8qIEZv cmNlIGB4X3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29y X2djJy4gICovCisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2RlZmF1bHQgPSB0cnVlOworICAg ICAgICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1Ip OworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19kZWZhdWx0ID0gZmFsc2U7CisgICAgICAgICAg Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAgICAg ICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBm LT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAgICAgICAgICBmLT5vdXRwdXRf ZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICB4X2RyYXdfaG9s bG93X2N1cnNvciAodywgZ2x5cGhfcm93KTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAg ZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEggJiYgdy0+bWMucmVkID49IDAgJiYg dy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgICAgeworICAgICAg ICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4 ZWwnLiAgKi8KKyAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNv bG9yLnBpeGVsOworICAgICAgICAgICAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jv dyk7CisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5h bF9jdXJzb3JfcGl4ZWw7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg IHhfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBnbHlwaF9yb3cpOworICAgICAgYnJlYWs7CisgICAg fQorICAgIGNhc2UgRklMTEVEX0JPWF9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJl ZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycgYnkgYm9y cm93aW5nIHRoZQorICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHhmbnMu Yy4gICovCisgICAgICAgIHsKKyAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICBY R0NWYWx1ZXMgZ2NfdmFsdWVzOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgbWFzayA9IEdDRm9y ZWdyb3VuZCB8IEdDQmFja2dyb3VuZCB8IEdDRmlsbFN0eWxlIHwgR0NMaW5lV2lkdGg7CisgICAg ICAgICAgZ2NfdmFsdWVzLmxpbmVfd2lkdGggPSAwOyAgLyogTWVhbnMgMSB1c2luZyBmYXN0IGFs Z29yaXRobS4gICovCisgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBGUkFNRV9CQUNL R1JPVU5EX1BJWEVMIChmKTsKKyAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IHhfbWFr ZV90cnVlY29sb3JfcGl4ZWwgKGRweWluZm8sIGludF9yZWQsIGludF9ncmVlbiwgaW50X2JsdWUp OworICAgICAgICAgIGdjX3ZhbHVlcy5maWxsX3N0eWxlID0gRmlsbE9wYXF1ZVN0aXBwbGVkOwor ICAgICAgICAgIGYtPm91dHB1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Y3Vyc29y ICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgQkFSX0NVUlNPUik7CisgICAgICAgICAgdy0+ bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gZmFsc2U7CisgICAgICAgICAgZi0+b3V0cHV0 X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9 CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93 LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNh c2UgSEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1jLnJlZCA+PSAwICYmIHctPm1j LmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyog VGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAgKi8K KyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsK KyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkgPSB0cnVlOworICAgICAg ICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgSEJBUl9D VVJTT1IpOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IGZhbHNl OworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1 cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeF9kcmF3X2Jh cl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7CisgICAg ICBicmVhazsKKyAgICB9CisgICAgY2FzZSBOT19DVVJTT1I6CisgICAgICB3LT5waHlzX2N1cnNv cl93aWR0aCA9IDA7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJv cnQgKCk7CisgIH0KKworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLwogCi0JICAgIGNhc2UgTk9fQ1VSU09SOgotCSAgICAgIHctPnBoeXNfY3Vyc29y X3dpZHRoID0gMDsKLQkgICAgICBicmVhazsKIAotCSAgICBkZWZhdWx0OgotCSAgICAgIGVtYWNz X2Fib3J0ICgpOwotCSAgICB9CiAJfQogCiAjaWZkZWYgSEFWRV9YX0kxOE4KQEAgLTEwNjQ0LDcg KzEwODYwLDcgQEAgZ2V0X2N1cnJlbnRfd21fc3RhdGUgKHN0cnVjdCBmcmFtZSAqZiwKICAgaW50 IHJjLCBhY3R1YWxfZm9ybWF0OwogICBBdG9tIGFjdHVhbF90eXBlOwogICB1bnNpZ25lZCBjaGFy ICp0bXBfZGF0YSA9IE5VTEw7Ci0gIEF0b20gKnJlcGx5X2RhdGEgVU5JTklUOworICBBdG9tICpy ZXBseV9kYXRhOwogI2VuZGlmCiAKICAgKnN0aWNreSA9IGZhbHNlOwo= --Multipart_Tue_Nov_20_20:53:56_2018-1--