From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Mon, 06 May 2019 11:39:10 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Mon_May__6_11:39:09_2019-1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="47035"; mail-complaints-to="usenet@blaine.gmane.org" To: 22873@debbugs.gnu.org,17684@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 06 20:40:31 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNiXK-0008rK-6z for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 May 2019 20:40:28 +0200 Original-Received: from localhost ([127.0.0.1]:60762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNiXJ-0003hd-3G for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 May 2019 14:40:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNiX2-0003hR-4I for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 14:40:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNiWz-0002CM-Ff for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 14:40:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43841) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNiWw-00029k-H2 for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 14:40:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNiWw-0006dF-9M for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 14:40:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2019 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22873 X-GNU-PR-Package: emacs Original-Received: via spool by 22873-submit@debbugs.gnu.org id=B22873.155716795725417 (code B ref 22873); Mon, 06 May 2019 18:40:02 +0000 Original-Received: (at 22873) by debbugs.gnu.org; 6 May 2019 18:39:17 +0000 Original-Received: from localhost ([127.0.0.1]:57382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNiWD-0006bt-0Y for submit@debbugs.gnu.org; Mon, 06 May 2019 14:39:17 -0400 Original-Received: from gateway32.websitewelcome.com ([192.185.145.123]:28791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNiWA-0006be-N0 for 22873@debbugs.gnu.org; Mon, 06 May 2019 14:39:15 -0400 Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 1AA7028A49 for <22873@debbugs.gnu.org>; Mon, 6 May 2019 13:39:14 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id NiW9hl3T74FKpNiW9hAZXF; Mon, 06 May 2019 13:39:14 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Q9PtWQjAkPIPlvwJsQXKYD1jZ0RXA1F7bUwwNH5nx10=; b=iBPv2KEUn/Pj5GgfMzndh9xJon 9pdOQ1GRHD0nZD4p+zjFn9QWqSxI+wjNgCwD12Q4/nkKTaF2h5vUY4f24WQ7gT6MG6z3YXUTvQFPh xquxK9YGiK0ySPzpy6lRWJlXvZs0q0CGGsJQgCGiYdqj2J0k6wnDmy4yczsts9piImnXKj/YvkO7m R2GoLuVx7vfF+/8yZ0aFjgFbi1/QWq3slWN1NDk/AFvYXW0pyf3BLZ6cNZ4DK2J9e0P58gtcNXa/o fJZ/jXk0mqMU+DB9BH0wKY5HvB6eCXZGd3fLNM0j9LQYQog1y1MRd33kXwkm2p/xxgp+HyUkA7e7w a5tjipvw==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50229 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1hNiW6-0025wG-Gd; Mon, 06 May 2019 13:39:13 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1hNiW6-0025wG-Gd X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:50229 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: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158838 Archived-At: --Multipart_Mon_May__6_11:39:09_2019-1 Content-Type: text/plain; charset=US-ASCII VERSION: 019.003 [05/06/2019] CHANGELOG: - Reduced the number of entry points in dispnew.c to just `update_window'. 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 04/08/2019: git reset --hard a038df77de7b1aa2d73a6478493b8838b59e4982 Step 3: From within the new emacs folder created in Step 1, apply the patch: git apply /path/to/the/patch.diff Step 4: ./autogen.sh Step 5: ./configure ... [your custom options] Step 6: make Step 7: make install USAGE: - For a minimal working example of built-in fake cursors, type: M-x mc-test ;;; TURN ON FAKE CURSORS (buffer position, cursor-type, cursor color): (setq mc-conf '((1 "hbar" "magenta") (2 "bar" "purple") (3 "box" "#00FF00") (4 "hollow" "#0000FF") (5 ("hbar" 3) [1.0 0.0 1.0]) (6 ("bar" 3) [0.0 1.0 1.0]) (7 "framed" "OrangeRed")))) ;;; TURN OFF FAKE CURSORS: (setq mc-conf nil) - To try out the crosshairs feature, type: M-x +-mode - To try out built-in fake cursors with Magnar Sveen's multiple-cursors package, 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 here 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)) TODO: - Add support for `ch_inactive_windows' and `fc_inactive_windows'. - When using the multiple fake cursors feature, a fake cursor does not show up at zv_p. - Deal with left/right overwritten glyphs in the w32 and X ports of Emacs. - Reduce the removal of fake cursors to the bare minimum when scrolling the text on the glass directly, and whenever `update_window' is called. - When an idle-timer fires and point is at the end of a horizontally scrolled line in a narrow window, the temporary horizontal scroll is canceled. Create an minimal working example and file a bug report. - There is a bug affecting an older version of Emacs for the NS port that causes partial line flickering when the same characters are grouped together (;;;;;;) and MC_GLYPHLESS cursors are above or below -- having the same background color as the frame; e.g., black on black (used to erase a glyphless cursor). The partial flickering is only noticeable with rapid fire; e.g., holding down the right/left arrow key. When changing the color of the glyphless cursor, the issue is not present. [@lawlist has verified that the X and HPOS coordinates are accurate.] - There is a bug affecting the recorded `w->mc.lnum_pixel_width` that is observable when not running under gdb, but disappears when running under gdb. While viewing a folded org-mode buffer, the non-gdb instance had a visible line number pixel-width of 44, but Emacs treated it as fluctuating between 44 and 55 as the cursor was moved to the end of line. In the gdb instance, the visible line number pixel width was 55 with no fluctuation under the same conditions as the non-gdb instance. This appears to be a different bug than bug#32177 (current line number shifts one column to the left) because the line number of the current line does not shift left, and changing the bidi settings did not correct the issue. - The current test for `auto_hscroll_mode_p' only looks for `current_line` and all five related tests are based upon that assumption, which may not be true. - 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. - Implement functionality similar to the Lisp multiple-cursors by Magnar Sveen. - Follow up with the Emacs team re bug#32177; i.e., (Current line number shifts one column to the left.) - Follow up with the Emacs team re bug#32060; i.e., Horizontal Scrolling (Current Line): Wrong line gets h-scrolled. - Determine if bug #28936 needs to be fixed and help the Emacs team re same. --Multipart_Mon_May__6_11:39:09_2019-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2019_05_06__11_31_31_427.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3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xlc3MgbWMtLWV4ZWN1dGluZy1jb21t YW5kLWZvci1mYWtlLWN1cnNvcgorICAgICAgKGlmIChlcSAxIChtYy9udW0tY3Vyc29ycykpIDs7 IG5vIGZha2UgY3Vyc29ycz8gZGlzYWJsZSBtYy1tb2RlCisgICAgICAgICAgKG11bHRpcGxlLWN1 cnNvcnMtbW9kZSAwKQorICAgICAgICAod2hlbiB0aGlzLW9yaWdpbmFsLWNvbW1hbmQKKyAgICAg ICAgICAobGV0ICgob3JpZ2luYWwtY29tbWFuZCAob3IgbWMtLXRoaXMtY29tbWFuZAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29tbWFuZC1yZW1hcHBpbmcgdGhpcy1v cmlnaW5hbC1jb21tYW5kKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 aGlzLW9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgIDs7IHNraXAga2V5Ym9hcmQgbWFj cm9zLCBzaW5jZSB0aGV5IHdpbGwgZ2VuZXJhdGUgYWN0dWFsIGNvbW1hbmRzIHRoYXQgYXJlCisg ICAgICAgICAgICA7OyBhbHNvIHJ1biBpbiB0aGUgY29tbWFuZCBsb29wIC0gd2UnbGwgaGFuZGxl IHRob3NlIGxhdGVyIGluc3RlYWQuCisgICAgICAgICAgICAod2hlbiAoZnVuY3Rpb25wIG9yaWdp bmFsLWNvbW1hbmQpCisgICAgICAgICAgICAgIDs7IGlmIGl0J3MgYSBsYW1iZGEsIHdlIGNhbid0 IGtub3cgaWYgaXQncyBzdXBwb3J0ZWQgb3Igbm90CisgICAgICAgICAgICAgIDs7IC0gc28gZ28g YWhlYWQgYW5kIGFzc3VtZSBpdCdzIG9rLCBiZWNhdXNlIHdlJ3JlIGp1c3Qgb3B0aW1pc3RpYyBs aWtlIHRoYXQKKyAgICAgICAgICAgICAgKGlmIChvciAobm90IChzeW1ib2xwIG9yaWdpbmFsLWNv bW1hbmQpKQorICAgICAgICAgICAgICAgICAgICAgIDs7IGxhbWJkYSByZWdpc3RlcmVkIGJ5IHNt YXJ0cmVwCisgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1wcmVmaXgtcCAiKCIgKHN5bWJv bC1uYW1lIG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgIChtYy9leGVjdXRl LWNvbW1hbmQtZm9yLWFsbC1mYWtlLWN1cnNvcnMgb3JpZ2luYWwtY29tbWFuZCkKKyAgICAgICAg ICAgICAgICA7OyBzbWFydHJlcCBgaW50ZXJuJ3MgY29tbWFuZHMgaW50byBvd24gb2JhcnJheSB0 byBoZWxwCisgICAgICAgICAgICAgICAgOzsgYGRlc2NyaWJlLWJpbmRpbmdzJy4gIFNvLCBsZXQn cyByZS1gaW50ZXJuJyBoZXJlIHRvCisgICAgICAgICAgICAgICAgOzsgbWFrZSB0aGUgY29tbWFu ZCBjb21wYXJhYmxlIGJ5IGBlcScuCisgICAgICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29t bWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAg ICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBzeW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9y b3VnaAorICAgICAgICAgICAgICAgIChpZiAoZ2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1 cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAgICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0 ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4g KGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg KG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1j L2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMv YWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2Nt ZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMv cHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29y cyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAgICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQt aW4tY3Vyc29ycworICAgICAgICAgICAgICAgIChzZXRxIG1jLWNvbmYKKyAgICAgICAgICAgICAg ICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoeCkg KGxpc3QgKG92ZXJsYXktc3RhcnQgeCkgImJhciIgbmlsKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgKG1jL2FsbC1mYWtlLWN1cnNvcnMpKSkpKSkpKSkpCisKKyAgKGRlZnVuIG1jL21hcmst bmV4dC1saWtlLXR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XRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQorICAg ICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAgICAgICAgICAgICAgICAg ICAgICgzICJib3giICIjMDBGRjAwIikKKyAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93 IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAu MCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg2ICgiYmFyIiAzKSBbMC4wIDEuMCAxLjBd KQorICAgICAgICAgICAgICAgICAgICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQiKQorICAgICAg ICAgICAgICAgICAgICAgICg4ICJib3giICJncmV5MjUiKQorICAgICAgICAgICAgICAgICAgICAg ICg5ICJib3giICJncmV5NzUiKSkpKQorICAgIChzZWxlY3Qtd2luZG93IChkaXNwbGF5LWJ1ZmZl ciBidWZmZXIpKSkpCisKKyhkZWZ1biArLXRpbWVyLWZuICgpCisiU2luY2UgdGhpcyBmaXJlcyBn bG9iYWxseSwgd2UgbXVzdCBjb250cm9sIHdoaWNoIGJ1ZmZlcnMgY3Jvc3NoYWlycyBhcHBlYXIg aW4uIgorICAod2hlbiArLW1vZGUKKyAgICAodW5sZXNzIChvciAobWVtcSBsYXN0LWNvbW1hbmQg Ky1wYXJlbnMtZXhjbHVzaW9ucykKKyAgICAgICAgICAgICAgICAobnVsbCArLXBhcmVucy1wKSkK KyAgICAgICgrLXBhcmVucy1mbikpCisgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgIChzZXRx IHRpbWVyLWlkbGUtbGlzdCAoZGVscSArLXRpbWVyLXZhciB0aW1lci1pZGxlLWxpc3QpKQorICAg ICAgKHNldHEgKy10aW1lci12YXIgbmlsKSkpKQorCisoZGVmdW4gKy1kcmF3LWZvcnRod2l0aCAo KQorIkltbWVkaWF0ZWx5IGRlbGV0ZS9kcmF3IG1hdGNoaW5nIHBhcmVudGhlc2VzLiIKKyAgKCst ZHJhdy1jcm9zc2hhaXJzICdmb3JjZSkpCisKKyhkZWZ1biArLWRyYXctY3Jvc3NoYWlycyAoJm9w dGlvbmFsIGZvcmNlKQorIkltbWVkaWF0ZWx5IGRlbGV0ZSBtYXRjaGluZyBwYXJlbnRoZXNlcy4g IElmIEZPUkNFIGlzIG5vbi1uaWwsIHRoZW4gaW1tZWRpYXRlbHkKK2RyYXcgbWF0Y2hpbmcgcGFy ZW50aGVzaXM7IG90aGVyd2lzZSwgZHJhdyB0aGVtIG9uIGFuIGlkbGUtdGllci4iCisgICh3aGVu ICstbW9kZQorICAgICh3aGVuICstdGltZXItdmFyCisgICAgICAoc2V0cSB0aW1lci1pZGxlLWxp c3QgKGRlbHEgKy10aW1lci12YXIgdGltZXItaWRsZS1saXN0KSkKKyAgICAgIChzZXRxICstdGlt ZXItdmFyIG5pbCkpCisgICAgKHVubGVzcyAob3IgKG1lbXEgdGhpcy1jb21tYW5kICstcGFyZW5z LWV4Y2x1c2lvbnMpCisgICAgICAgICAgICAgICAgKGFuZCAobnVsbCArLXBhcmVucy1wKQorICAg ICAgICAgICAgICAgICAgICAgKG51bGwgKy1wYXJlbnMtb3ZlcmxheXMtZXhpc3QtcCkpKQorICAg ICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisgICAgICAocHJv Z24KKyAgICAgICAgKHdoZW4gKy1wYXJlbnMtcAorICAgICAgICAgICgrLXBhcmVucy1mbikpKQor ICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGltZXIgKy1pZGxlLXRpbWVy LXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKyhkZWZ2YXIgZmMtbW9kZSkKKworOzs7 IyMjYXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJNaW5vciBtb2RlIGZvciBk aXNwbGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZhbHVlIG5pbAorICA6bGln aHRlciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91cCAnKy1tb2Rl CisgIChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUnIGhhcyB0aGUgYWJpbGl0 eSB0byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3IuCisgICAgICA7OzsgU2Vl IHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hlbiBmYy1tb2RlCisgICAg ICAgIChmYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFsLWVsZG9jLW1vZGUKKyAg ICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgICAg ICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKGdsb2JhbC1l bGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2stY29udGV4dC10aW1lcgor ICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAg ICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAo dGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciBq aXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEgaml0LWxvY2stY29udGV4 dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxvY2stY29udGV4 dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciBuaWwpKQor ICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAg ICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAo dGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAgICAgIChjYW5j ZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpKQorICAgICAgICAoZnNl dCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAgICAgKGxhbWJkYSAoKSAo YWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1idWZmZXJzIChjdXJyZW50 LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFsZ2FtYXRlICdpZ25vcmUp KQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAgICAgICAgKGJsaW5rLWN1cnNvci1t b2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmstY3Vyc29yLWNoZWNrIHBvc3QtY29t bWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJ2Js aW5rLWN1cnNvci1jaGVjaykpKQorICAgICAgKHNldHEgY3Jvc3NoYWlycyB0KQorICAgICAgKHdo ZW4gKy1maWxsLWNvbHVtbgorICAgICAgICAoc2V0cSBmYy12aXNpYmxlIHQpKQorICAgICAgOzs7 IGBhdXRvLWNvbXBvc2l0aW9uLW1vZGUnIGlzIG5lZWRlZCBmb3IgY3Jvc3NoYWlycyB0byBwcm9w ZXJseSBjYWxjdWxhdGUKKyAgICAgIDs7OyBjb29yZGluYXRlcyBvZiBjb21wb3NpdGlvbiBjaGFy YWN0ZXJzLiAgQXV0b21hdGljYWxseSBiZWNvbWVzIHBlcm1hbmVudGx5CisgICAgICA7OzsgYnVm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gICAgICAgd29yZC13cmFwKSkKKyAg ICAgICAgKHdoZW4gKGxvY2FsLXZhcmlhYmxlLXAgdmFyKQorICAgICAgICAgIChwdXNoIChjb25z IHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICstLXNhdmVkLXN0YXRlKSkpCisgICAgICAoc2V0cSBm aWxsLWNvbHVtbiA4MCkKKyAgICAgIChzZXRxIGRpc3BsYXktbGluZS1udW1iZXJzIHQpCisgICAg ICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQorICAgICAgKHNl dHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAoc2V0cSBidWZmZXItZGlzcGxheS10YWJs ZSArLWJ1ZmZlci1kaXNwbGF5LXRhYmxlKQorICAgICAgKHNldHEgdGFiLXdpZHRoIDQpCisgICAg ICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlzdWFsKSB0KQorICAgICAg KHNldHEgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKGxldCAoKGxz dCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisgICAgICAgICAgICAgICAgICBtb2Rl KQorICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAgICAod2hpbGUgKHNldHEg bW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAgICAgKHdoZW4gKGRlcml2ZWQtbW9kZS1wIG1v ZGUpCisgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkpKSkKKyAgICAgICAgICAg KChtZW1xIG1ham9yLW1vZGUgKy10cnVuY2F0ZS1saW5lcy1tYWpvci1tb2RlcykpCisgICAgICAg ICAgICh0CisgICAgICAgICAgICAgbmlsKSkpCisgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlh YmxlICd0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkKKyAgICAgIChzZXRxIHdv cmQtd3JhcCB0KQorICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGluZXMgdCkKKyAgICAgIChz ZXRxIGluZGljYXRlLWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAgICAgKHNldHEgZnJpbmdl LWluZGljYXRvci1hbGlzdAorICAgICAgICAgIDs7OyBoc2NsX2FsbF90ZW1wX3AgfCBoc2NsX3Rl bXBfcAorICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1sZWZ0CisgICAg ICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLWxlZnQpKQorICAgICAgICAgIDs7 OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxsX3Blcm1fMV9wIHwgaHNjbF9hbGxfcGVybV8y X3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNpbmdsZS1hbmds ZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1hbmdsZS11cAorICAgICAg ICAgICAgICAgICAgICAgICAgICArLXRyaXBsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAg ICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgKCstb3ZlcmxheS1hcnJv dyAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAr LWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAgKHRydW5jYXRpb24gLiAoKy1mcmluZ2Ut bGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWFycm93 KSkKKyAgICAgICAgICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxlZnQtY3VybHktYXJyb3cK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNoKSkKKyAgICAgICAgICAob3Zl cmxheS1hcnJvdyAuICstZnJpbmdlLXJpZ2h0LXRyaWFuZ2xlKQorICAgICAgICAgICh1cCAuICst ZnJpbmdlLXVwLWFycm93KQorICAgICAgICAgIChkb3duIC4gKy1mcmluZ2UtZG93bi1hcnJvdykK KyAgICAgICAgICAodG9wIC4gKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpCisgICAgICAgICAgKGJv dHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAgICAgICAodG9wLWJvdHRv bSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICArLWZy aW5nZS1yaWdodC1icmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtdG9w LXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtdG9wLWxlZnQt YW5nbGUpKQorICAgICAgICAgIChlbXB0eS1saW5lIC4gKy1mcmluZ2UtZW1wdHktbGluZSkKKyAg ICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmspKSkKKyAgICAgIChzZXRx IGZyaW5nZS1jdXJzb3ItYWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVmdC10cmlhbmdsZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaG9sbG93IC4gKy1ob2xsb3ctcmVjdGFu Z2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChiYXIgLiArLXZlcnRpY2Fs LWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGJhciAuICstZnJpbmdl LWhvcml6b250YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChob2xs b3ctc21hbGwgLiArLWZyaW5nZS1ob2xsb3ctc3F1YXJlKSkpCisgICAgICAoaWYgKG9yICstZm9y dGh3aXRoCisgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisg ICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1mb3J0aHdpdGggJ2Fw cGVuZCAnbG9jYWwpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJh dy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICh3aGVuICstZm9ydGh3aXRoCisg ICAgICAgIChhZGQtaG9vayAnd2luZG93LWNvbmZpZ3VyYXRpb24tY2hhbmdlLWhvb2sgJystZHJh dy1mb3J0aHdpdGggbmlsICdsb2NhbCkpCisgICAgICAoYWRkLWhvb2sgJ2NoYW5nZS1tYWpvci1t b2RlLWhvb2sgJ3R1cm4tb2ZmLSstbW9kZSBuaWwgJ2xvY2FsKQorICAgICAgKHdoZW4gKGNhbGxl ZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKy1mb3J0 aHdpdGgKKyAgICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScgLS0gRHJhdyBt YXRjaGluZyBwYXJlbnRoZXNlcyBpbW1lZGlhdGVseS4iKSkKKyAgICAgICAgICAoKGVxdWFsIGN1 cnJlbnQtcHJlZml4LWFyZyAnKDQpKQorICAgICAgICAgICAgOzs7IE1hdGNoaW5nIHBhcmVudGhl c2VzIHdpbGwgYmUgZHJhd24gaW1tZWRpYXRlbHkuCisgICAgICAgICAgICAobWVzc2FnZSAiVHVy bmVkIE9OIGArLW1vZGUnIC0tIE9wdGltaXplZCBmb3IgZGVidWdnaW5nIHB1cnBvc2VzLiIpKQor ICAgICAgICAgICh0CisgICAgICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9OIGArLW1vZGUnLiIp KSkpKQorICAgICh0CisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnZmlsbC1jb2x1bW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AgKGtpbGwtbG9jYWwtdmFyaWFibGUgJytmb3J0aHdpdGgpCisg ICAgICAoZG9saXN0IChzYXZlZCArLS1zYXZlZC1zdGF0ZSkKKyAgICAgICAgKHNldCAobWFrZS1s b2NhbC12YXJpYWJsZSAoY2FyIHNhdmVkKSkgKGNkciBzYXZlZCkpKQorICAgICAgKGtpbGwtbG9j YWwtdmFyaWFibGUgJystLXNhdmVkLXN0YXRlKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVy bGF5cykKKyAgICAgICh3aGVuIChtZW1xICcrLWRyYXctZm9ydGh3aXRoIHBvc3QtY29tbWFuZC1o b29rKQorICAgICAgICAocmVtb3ZlLWhvb2sgJ3Bvc3QtY29tbWFuZC1ob29rICcrLWRyYXctZm9y dGh3aXRoICdsb2NhbCkpCisgICAgICAod2hlbiAobWVtcSAnKy1kcmF3LWNyb3NzaGFpcnMgcG9z dC1jb21tYW5kLWhvb2spCisgICAgICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sg JystZHJhdy1jcm9zc2hhaXJzICdsb2NhbCkpCisgICAgICAod2hlbiAobWVtcSAnKy1kcmF3LWZv cnRod2l0aCB3aW5kb3ctY29uZmlndXJhdGlvbi1jaGFuZ2UtaG9vaykKKyAgICAgICAgKHJlbW92 ZS1ob29rICd3aW5kb3ctY29uZmlndXJhdGlvbi1jaGFuZ2UtaG9vayAnKy1kcmF3LWZvcnRod2l0 aCAnbG9jYWwpKQorICAgICAgKHJlbW92ZS1ob29rICdjaGFuZ2UtbWFqb3ItbW9kZS1ob29rICd0 dXJuLW9mZi0rLW1vZGUgJ2xvY2FsKQorICAgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgICAg KHNldHEgdGltZXItaWRsZS1saXN0IChkZWxxICstdGltZXItdmFyIHRpbWVyLWlkbGUtbGlzdCkp CisgICAgICAgIChzZXRxICstdGltZXItdmFyIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWlu dGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9GRiBgKy1tb2Rl Jy4iKSkpKSkKKworKGRlZnVuIHR1cm4tb2ZmLSstbW9kZSAoKQorICAoKy1tb2RlIC0xKSkKKwor Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7CisKKyhkZWZ1biArLXBhcmVucy1mbiAoKQorICAiRG9j LXN0cmluZy4iCisgIChsZXQqICgob3BvaW50IChwb2ludCkpCisgICAgICAgICAoZnJvbSAoaWYg Ky1wYXJlbnMtZnJvbS1mbgorICAgICAgICAgICAgICAgICAoZnVuY2FsbCArLXBhcmVucy1mcm9t LWZuKQorICAgICAgICAgICAgICAgICAocG9pbnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxl Y3RlZC13aW5kb3cpKQorICAgICAgICAgKGkgMCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAo cHJlY2VkaW5nLWNoYXIpKQorICAgICAgICAgKG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisg ICAgICAgICAocG9zMQorICAgICAgICAgICAoY29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFy CisgICAgICAgICAgICAgICAgICAgKG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5p bmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAg ICAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1 YXJlIGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAg ICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkg YnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAg ICAgICAgICAobWluICgxKyBvcG9pbnQpIChwb2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9y IDs7OyAoY2hhci10by1zdHJpbmcgNDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAg ICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChj aGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2luZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAg ICAgICAgKD0gcHJlY2VkaW5nLWNoYXIgOTMpCisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXIt dG8tc3RyaW5nIDEyNSkgPT4gY2xvc2luZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAg ICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCisgICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWlu KSAoMS0gb3BvaW50KSkpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQp KSkKKyAgICAgICAgIHBvczIKKyAgICAgICAgIHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhj dXJzaW9uCisgICAgICAoY29uZGl0aW9uLWNhc2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBw b3MxIChudGggMSAocGFyc2UtcGFydGlhbC1zZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChz ZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAxKSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAg ICAgICAgICAgIChzZXRxIGkgMSkKKyAgICAgICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAg ICAgICAoc2V0cSBzZWxlY3RlZC1mYWNlIChjb25kCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFy ZW5zLW9uZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZm91ci1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA1KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZl LWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA3KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKD0gaSA4KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy1laWdodC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2Up CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10ZW4tZmFjZSkpKQorICAg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ICAgIChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkK KyAgICAgICAgIChlbmQKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAg ICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAg ICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAo bm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAg ICAgICBwb2ludC1tYXgpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFy cm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBv aW50LW1heCkpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAg ICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAg ICAgICAgKD0gZW5kIHBvaW50LW1heCkpCisgICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAg ICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAg ICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAg ICAgIChvdmVybGF5cworICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1y ZWNlbnRlciBlbmQpCisgICAgICAgICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAg KHdoZW4gKGFuZCBiZWcgZW5kIG5hbWUgdmFsKQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykK KyAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAg ICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVp dGhlciBwdXNoIHRoaXMgb3ZlcmxheSBvdXRzaWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsg b3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0 ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAg ICAgICAoaWYgKDwgKG92ZXJsYXktc3RhcnQgbykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAg ICAgICAobW92ZS1vdmVybGF5IChjb3B5LW92ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChv dmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5k IChvdmVybGF5LWVuZCBvKSkpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92 ZXJsYXktc3RhcnQgbykgYmVnKSkKKyAgICAgICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBv KSBlbmQpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVu ZCBvKSkKKyAgICAgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAo KGFuZCAobm90IChlcSBuYW1lICdmYWNlKSkKKyAgICAgICAgICAgICAgICAoZXF1YWwtaW5jbHVk aW5nLXByb3BlcnRpZXMgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIChk ZWxldGUtb3ZlcmxheSBvKSkpKSkpKQorCisoZGVmdW4gKy1kZWxldGUtcGFyZW5zLW92ZXJsYXlz ICgpCisgICh3aGVuICstc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2x1bW4gd2hlbmV2 ZXIgRW1hY3MgaXMgaWRsZS4iKQorCis7OzsjIyNhdXRvbG9hZAorKGRlZmluZS1taW5vci1tb2Rl IGZjLW1vZGUKKyJNaW5vciBtb2RlIGZvciBkaXNwbGF5aW5nIGEgdmlzdWFsIGZpbGwgY29sdW1u LiIKKyAgOmluaXQtdmFsdWUgbmlsCisgIDpsaWdodGVyICIgRkMiCisgIDprZXltYXAgbmlsCisg IDpnbG9iYWwgbmlsCisgIDpncm91cCAnZmMtbW9kZQorICAoY29uZAorICAgIDs7OyBgKy1tb2Rl JyBoYXMgdGhlIGFiaWxpdHkgdG8gYWxzbyBkaXNwbGF5IGEgZmlsbCBjb2x1bW4gaW5kaWNhdG9y LgorICAgIDs7OyBTZWUgdGhlIHZhcmlhYmxlIGArLWZpbGwtY29sdW1uJy4KKyAgICAoKGFuZCBm Yy1tb2RlICstbW9kZSkKKyAgICAgIChzZXRxIGZjLW1vZGUgbmlsKQorICAgICAgKG1lc3NhZ2Ug IlR1cm5lZCBPRkYgYGZjLW1vZGUnICglcykgLS0gc2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNv bHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkKKyAgICAoZmMtbW9kZQorICAgICAgKHdoZW4gKGFu ZCBnbG9iYWwtZWxkb2MtbW9kZQorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICco NCkpKQorICAgICAgICAoZ2xvYmFsLWVsZG9jLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBq aXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3Rp dmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcg Jyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAg ICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7 OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAn cmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9j ay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3Rp dmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcg Jyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnkt dGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFy eS10aW1lcikpCisgICAgICAgIChmc2V0ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAg ICAgICAgICAgICAobGFtYmRhICgpIChhZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1j aGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQtYnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1h dXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkpCisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQor ICAgICAgICAoYmxpbmstY3Vyc29yLW1vZGUgLTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGlu ay1jdXJzb3ItY2hlY2sgcG9zdC1jb21tYW5kLWhvb2spCisgICAgICAgICAgKHJlbW92ZS1ob29r ICdwb3N0LWNvbW1hbmQtaG9vayAnYmxpbmstY3Vyc29yLWNoZWNrKSkpCisgICAgICAoc2V0cSBm Yy12aXNpYmxlIHQpCisgICAgICA7Ozs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KQorCisoZGVmZmFjZSArLW92ZXJsYXktYXJyb3ctaHNjbC1pbmFjdGl2ZS1mYWNlCisgICco KHQgKDpmb3JlZ3JvdW5kICJEYXJrU2xhdGVHcmV5IikpKQorICAiRmFjZSBmb3IgYCstb3Zlcmxh eS1hcnJvdy1oc2NsLWluYWN0aXZlLWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZm YWNlIGZjLWZhY2UKKyAgJygoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3Jv dW5kIGRhcmspICh0eXBlIG5zKSkKKyAgICAgOmZvcmVncm91bmQgImdyZXkxNSIpCisgICAgKCgo Y2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSAodHlwZSBndGsp KQorICAgICAgICAgOmZvcmVncm91bmQgImdyZXkxNSIpCisgICAgKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSAodHlwZSB3MzIpKQorICAgICAgICAgOmZv cmVncm91bmQgImdyZXkyNSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAo YmFja2dyb3VuZCBsaWdodCkgKHR5cGUgZ3RrKSkKKyAgICAgOmZvcmVncm91bmQgInB1cnBsZSIp CisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkg KHR5cGUgbnMpKQorICAgICA6Zm9yZWdyb3VuZCAicHVycGxlIikKKyAgICAoKChjbGFzcyBjb2xv cikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQg InB1cnBsZSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3Vu ZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgIC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gWFNFVEZBU1RJTlQg KEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIGZjX2luYWN0aXZlX3dpbmRvd3MpLCBpZHgpOyAr K2lkeDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBYU0VURkFTVElOVCAoQlZB UiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgbW9kZV9saW5lX2Zvcm1hdCksIGlkeCk7ICsraWR4Owog ICBYU0VURkFTVElOVCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgYWJicmV2X21vZGUpLCBp ZHgpOyArK2lkeDsKICAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIG92 ZXJ3cml0ZV9tb2RlKSwgaWR4KTsgKytpZHg7CkBAIC01MjI4LDYgKzUzMDksMjQgQEAgaW5pdF9i dWZmZXJfb25jZSAodm9pZCkKICAgLyogTXVzdCBkbyB0aGVzZSBiZWZvcmUgbWFraW5nIHRoZSBm aXJzdCBidWZmZXIhICovCiAKICAgLyogcmVhbCBzZXR1cCBpcyBkb25lIGluIGJpbmRpbmdzLmVs ICovCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKyAgYnNldF9tY19yZWFsX2Zha2VfY3Vyc29yICgmYnVmZmVyX2RlZmF1bHRzLCBRaG9sbG93 KTsKKyAgYnNldF9tY19jb25mICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKKyAgYnNldF9tY19p bmFjdGl2ZV93aW5kb3dzICgmYnVmZmVyX2RlZmF1bHRzLCBRdCk7CisgIGJzZXRfY3Jvc3NoYWly cyAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7CisgIGJzZXRfY2hfaG9yaXpvbnRhbF9ydWxlciAo JmJ1ZmZlcl9kZWZhdWx0cywgUXQpOworICBic2V0X2NoX3ZlcnRpY2FsX3J1bGVyICgmYnVmZmVy X2RlZmF1bHRzLCBRdCk7CisgIGJzZXRfY2hfaW5hY3RpdmVfd2luZG93cyAoJmJ1ZmZlcl9kZWZh dWx0cywgUXQpOworICBic2V0X2ZjX3Zpc2libGUgKCZidWZmZXJfZGVmYXVsdHMsIFFuaWwpOwor ICBic2V0X2ZjX2luYWN0aXZlX3dpbmRvd3MgKCZidWZmZXJfZGVmYXVsdHMsIFF0KTsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICBic2V0X21vZGVfbGluZV9mb3JtYXQgKCZidWZm ZXJfZGVmYXVsdHMsIGJ1aWxkX3B1cmVfY19zdHJpbmcgKCIlLSIpKTsKICAgYnNldF9oZWFkZXJf bGluZV9mb3JtYXQgKCZidWZmZXJfZGVmYXVsdHMsIFFuaWwpOwogICBic2V0X2FiYnJldl9tb2Rl ICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKQEAgLTU0NTgsNiArNTU1Nyw1MSBAQCBkZWZ2YXJf cGVyX2J1ZmZlciAoc3RydWN0IExpc3BfQnVmZmVyX09iamZ3ZCAqYm9fZndkLCBjb25zdCBjaGFy ICpuYW1lc3RyaW5nLAogdm9pZAogc3ltc19vZl9idWZmZXIgKHZvaWQpCiB7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgREVGU1lNIChR bWNfcmVhbF9mYWtlX2N1cnNvciwgIm1jLXJlYWwtZmFrZS1jdXJzb3IiKTsKKyAgREVGVkFSX1BF Ul9CVUZGRVIgKCJtYy1yZWFsLWZha2UtY3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IGZj X3Zpc2libGUpLCBRbmlsLAorICAgIGRvYzogLyogQSBidWZlci1sb2NhbCB2YXJpYWJsZSB0byB0 dXJuIG9uL29mZiB0aGUgbXVsdGlwbGUgY3Vyc29ycyBmaWxsIGNvbHVtbi4gKi8pOworCisgIERF RlNZTSAoUWZjX3Zpc2libGVfaW5hY3RpdmVfd2luZG93LCAiZmMtaW5hY3RpdmUtd2luZG93Iik7 CisgIERFRlZBUl9QRVJfQlVGRkVSICgiZmMtaW5hY3RpdmUtd2luZG93cyIsICZCVkFSIChjdXJy ZW50X2J1ZmZlciwgZmNfaW5hY3RpdmVfd2luZG93cyksIFFuaWwsCisgICAgZG9jOiAvKiBXaGVu IG5vbi1uaWwsIGRyYXcgbXVsdGlwbGUgY3Vyc29ycyBmaWxsIGNvbHVtbiBpbiBpbmFjdGl2ZSB3 aW5kb3dzLiAqLyk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgc3RhdGljcHJv ICgmbGFzdF9vdmVybGF5X21vZGlmaWNhdGlvbl9ob29rcyk7CiAgIGxhc3Rfb3ZlcmxheV9tb2Rp ZmljYXRpb25faG9va3MgPSBtYWtlX25pbF92ZWN0b3IgKDEwKTsKIApkaWZmIC0tZ2l0IGEvc3Jj L2J1ZmZlci5oIGIvc3JjL2J1ZmZlci5oCmluZGV4IGY0MmMzZTkuLjE4OWZhYzUgMTAwNjQ0Ci0t LSBhL3NyYy9idWZmZXIuaAorKysgYi9zcmMvYnVmZmVyLmgKQEAgLTczNiw2ICs3MzYsNDAgQEAg c3RydWN0IGJ1ZmZlcgogICAgICBpbiB0aGUgZGlzcGxheSBvZiB0aGlzIGJ1ZmZlci4gICovCiAg IExpc3BfT2JqZWN0IGV4dHJhX2xpbmVfc3BhY2luZ187CiAKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogVGhlIGN1cnNvciB0eXBlIG9m IHRoZSByZWFsIGZha2UgY3Vyc29yLiAqLworICBMaXNwX09iamVjdCBtY19yZWFsX2Zha2VfY3Vy c29yXzsKKworICAvKiBUaGUgbmFtZSBvZiBsaXN0IHVzZWQgYnkgbXVsdGlwbGUgY3Vyc29ycyBm b3IgbmV4dCByZWRpc3BsYXkuICovCisgIExpc3BfT2JqZWN0IG1jX2NvbmZfOworCisgIC8qIFdo ZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisg IExpc3BfT2JqZWN0IG1jX2luYWN0aXZlX3dpbmRvd3NfOworCisgIC8qIFRoZSBuYW1lIG9mIHRo ZSBidWZmZXItbG9jYWwgdmFyaWFibGUuICovCisgIExpc3BfT2JqZWN0IGNyb3NzaGFpcnNfOwor CisgIC8qIFRoZSBuYW1lIG9mIHRoZSBjcm9zc2hhaXJzIGhvcml6b250YWwgcnVsZXIuICovCisg IExpc3BfT2JqZWN0IGNoX2hvcml6b250YWxfcnVsZXJfOworCisgIC8qIFRoZSBuYW1lIG9mIHRo ZSBjcm9zc2hhaXJzIHZlcnRpY2FsIHJ1bGVyLiAqLworICBMaXNwX09iamVjdCBjaF92ZXJ0aWNh bF9ydWxlcl87CisKKyAgLyogV2hldGhlciB0byBkcmF3IGNyb3NzaGFpcnMgaW4gaW5hY3RpdmUg d2luZG93cy4gKi8KKyAgTGlzcF9PYmplY3QgY2hfaW5hY3RpdmVfd2luZG93c187CisKKyAgLyog VGhlIG5hbWUgb2YgdGhlIGJ1ZmZlci1sb2NhbCB2YXJpYWJsZS4gKi8KKyAgTGlzcF9PYmplY3Qg ZmNfdmlzaWJsZV87CisKKyAgLyogV2hldGhlciB0byBkcmF3IG11bHRpcGxlIGN1cnNvcnMgZmls bCBjb2x1bW4gaW4gaW5hY3RpdmUgd2luZG93cy4gKi8KKyAgTGlzcF9PYmplY3QgZmNfaW5hY3Rp dmVfd2luZG93c187CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogQ3Vyc29y IHR5cGUgdG8gZGlzcGxheSBpbiBub24tc2VsZWN0ZWQgd2luZG93cy4KICAgICAgdCBtZWFucyB0 byB1c2UgaG9sbG93IGJveCBjdXJzb3IuCiAgICAgIFNlZSBgY3Vyc29yLXR5cGUnIGZvciBvdGhl ciB2YWx1ZXMuICAqLwpAQCAtNzg3LDE0ICs4MjEsMjEgQEAgc3RydWN0IGJ1ZmZlcgogICAgICBh biBpbmRpcmVjdCBidWZmZXIgc2luY2UgaXQgY291bnRzIGFzIGl0cyBiYXNlIGJ1ZmZlci4gICov CiAgIGludCB3aW5kb3dfY291bnQ7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKICAgLyogQSBub24temVybyB2YWx1ZSBpbiBzbG90IElEWCBt ZWFucyB0aGF0IHBlci1idWZmZXIgdmFyaWFibGUKICAgICAgd2l0aCBpbmRleCBJRFggaGFzIGEg bG9jYWwgdmFsdWUgaW4gdGhpcyBidWZmZXIuICBUaGUgaW5kZXggSURYCiAgICAgIGZvciBhIGJ1 ZmZlci1sb2NhbCB2YXJpYWJsZSBpcyBzdG9yZWQgaW4gdGhhdCB2YXJpYWJsZSdzIHNsb3QKICAg ICAgaW4gYnVmZmVyX2xvY2FsX2ZsYWdzIGFzIGEgTGlzcCBpbnRlZ2VyLiAgSWYgdGhlIGluZGV4 IGlzIC0xLAogICAgICB0aGlzIG1lYW5zIHRoZSB2YXJpYWJsZSBpcyBhbHdheXMgbG9jYWwgaW4g YWxsIGJ1ZmZlcnMuICAqLwotI2RlZmluZSBNQVhfUEVSX0JVRkZFUl9WQVJTIDUwCisjZGVmaW5l IE1BWF9QRVJfQlVGRkVSX1ZBUlMgNjAKICAgY2hhciBsb2NhbF9mbGFnc1tNQVhfUEVSX0JVRkZF Ul9WQVJTXTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBTZXQgdG8gdGhl IG1vZHRpbWUgb2YgdGhlIHZpc2l0ZWQgZmlsZSB3aGVuIHJlYWQgb3Igd3JpdHRlbi4KICAgICAg bW9kdGltZS50dl9uc2VjID09IE5PTkVYSVNURU5UX01PRFRJTUVfTlNFQ1MgbWVhbnMKICAgICAg dmlzaXRlZCBmaWxlIHdhcyBub25leGlzdGVudC4gIG1vZHRpbWUudHZfbnNlYyA9PQpAQCAtOTAz LDYgKzk0NCw2OSBAQCBYQlVGRkVSIChMaXNwX09iamVjdCBhKQogLyogTW9zdCBjb2RlIHNob3Vs ZCB1c2UgdGhlc2UgZnVuY3Rpb25zIHRvIHNldCBMaXNwIGZpZWxkcyBpbiBzdHJ1Y3QKICAgIGJ1 ZmZlci4gIChTb21lIHNldHRlcnMgdGhhdCBhcmUgcHJpdmF0ZSB0byBhIHNpbmdsZSAuYyBmaWxl IGFyZQogICAgZGVmaW5lZCBhcyBzdGF0aWMgaW4gdGhvc2UgZmlsZXMuKSAgKi8KKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8KKworSU5M SU5FIHZvaWQKK2JzZXRfYmx2X21jX3JlYWxfZmFrZV9jdXJzb3IgKHN0cnVjdCBidWZmZXIgKmIs IExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+bWNfcmVhbF9mYWtlX2N1cnNvcl8gP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9mY19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09i amVjdCB2YWwpCit7CisgIGItPmZjX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiBl bmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogSU5M SU5FIHZvaWQKIGJzZXRfYmlkaV9wYXJhZ3JhcGhfZGlyZWN0aW9uIChzdHJ1Y3QgYnVmZmVyICpi LCBMaXNwX09iamVjdCB2YWwpCiB7CmRpZmYgLS1naXQgYS9zcmMvZGlzcGV4dGVybi5oIGIvc3Jj L2Rpc3BleHRlcm4uaAppbmRleCAxYTUzNjU2Li5kNjg5YTJkIDEwMDY0NAotLS0gYS9zcmMvZGlz cGV4dGVybi5oCisrKyBiL3NyYy9kaXNwZXh0ZXJuLmgKQEAgLTEwMCw2ICsxMDAsMzYgQEAgdHlw ZWRlZiBpbnQgQ3Vyc29yOwogI2RlZmluZSBOYXRpdmVSZWN0YW5nbGUgaW50CiAjZW5kaWYKIAor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8K KworLyogRm9yd2FyZCBwcm90b3R5cGUgZGVmaW5pdGlvbnMuICovCitlbnVtIHR5cGVfb2ZfY2Fj aGU7CisKK2VudW0gdHlwZV9vZl9jdXJzb3I7CisKK2VudW0gbWNfZmxhdm9yOworCitlbnVtIHR5 cGVfb2ZfYWN0aW9uCit7CisgIE1VTFRJUExFX0NVUlNPUlMsCisgIEhPUklaT05UQUxfUlVMRVIs CisgIFZFUlRJQ0FMX1JVTEVSLAorICBGSUxMX0NPTFVNTgorfTsKKworc3RydWN0IG1jX1JHQgor eworICBkb3VibGUgcmVkOworICBkb3VibGUgZ3JlZW47CisgIGRvdWJsZSBibHVlOworfTsKKwor LyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IC8qIFRleHQgY3Vyc29yIHR5cGVzLiAgKi8KIAogZW51bSB0ZXh0X2N1cnNvcl9raW5kcwpAQCAt MzgyLDYgKzQxMiwyMCBAQCBzdHJ1Y3QgZ2x5cGhfc2xpY2UKIAogc3RydWN0IGdseXBoCiB7CisK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAg aW50IHgsIHksIGhwb3MsIHZwb3M7CisKKyAgaW50IHJlbGF0aXZlX3g7CisKKyAgYm9vbF9iZiB6 dl9wIDogMTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBQb3NpdGlvbiBm cm9tIHdoaWNoIHRoaXMgZ2x5cGggd2FzIGRyYXduLiAgSWYgYG9iamVjdCcgYmVsb3cgaXMgYQog ICAgICBMaXNwIHN0cmluZywgdGhpcyBpcyBhbiBpbmRleCBpbnRvIHRoYXQgc3RyaW5nLiAgSWYg aXQgaXMgYQogICAgICBidWZmZXIsIHRoaXMgaXMgYSBwb3NpdGlvbiBpbiB0aGF0IGJ1ZmZlci4g IEluIGFkZGl0aW9uLCBzb21lCkBAIC0xMjQ4LDYgKzEyOTIsMjggQEAgZW51bSBkcmF3X2dseXBo c19mYWNlCiAKIHN0cnVjdCBnbHlwaF9zdHJpbmcKIHsKKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIGJvb2xfYmYgbGVmdF9vdmVyd3Jp dHRlbl9wIDogMTsKKworICAgIGJvb2xfYmYgcmlnaHRfb3ZlcndyaXR0ZW5fcCA6IDE7CisKKyAg ICBib29sX2JmIHJlY3RhbmdsZV9udWtlZF9wIDogMTsKKworICAgIGJvb2xfYmYgYmFja2dyb3Vu ZF9udWtlZF9wIDogMTsKKworICAgIGVudW0gZHJhd19nbHlwaF9hY3Rpb24KKyAgICB7CisgICAg ICBNQ19EUkFXX0dMWVBILAorICAgICAgTUNfRVJBU0VfR0xZUEgKKyAgICB9IGFjdGlvbl90eXBl OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFgtb3JpZ2luIG9mIHRoZSBz dHJpbmcuICAqLwogICBpbnQgeDsKIApAQCAtMjIxNiw2ICsyMjgyLDE2IEBAIHN0cnVjdCBjb21w b3NpdGlvbl9pdAogCiBzdHJ1Y3QgaXQKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBib29sX2JmIHp2X3AgOiAxOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFRoZSB3aW5kb3cgaW4gd2hpY2ggd2UgaXRlcmF0 ZSBvdmVyIGN1cnJlbnRfYnVmZmVyIChvciBhIHN0cmluZykuICAqLwogICBMaXNwX09iamVjdCB3 aW5kb3c7CiAgIHN0cnVjdCB3aW5kb3cgKnc7CkBAIC0yODEyLDYgKzI4ODgsMzEg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ludCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBo cG9zLAorICAgICAgICBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCwgc3RydWN0IG1jX1JHQiBsc2ws IGVudW0gdHlwZV9vZl9jdXJzb3IgY3Vyc29yX3R5cGUsCisgICAgICAgIGludCBjdXJzb3Jfd2lk dGgsIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwgYm9vbCBvbl9wLCBib29sIGFjdGl2ZV9w KTsKKworICB2b2lkICgqbWNfc2NyaWJlX3N0cmluZykgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMs IHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAg ICAgICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAg ICAgICBlbnVtIHR5cGVfb2ZfY3Vyc29yIGN1cnNvcl90eXBlLCBpbnQgd2QsIGJvb2wgYWN0aXZl X3AsIGJvb2wgY3Vyc29yX2djX3ApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg IC8qIEhhbmRsZXJzIGZvciBzZXR0aW5nIGZyYW1lIHBhcmFtZXRlcnMuICAqLwogICBmcmFtZV9w YXJtX2hhbmRsZXIgKmZyYW1lX3Bhcm1faGFuZGxlcnM7CiAKQEAgLTMyNzAsNiArMzM3MSw2NyBA QCBleHRlcm4gdm9pZCBnZXRfZm9udF9hc2NlbnRfZGVzY2VudCAoc3RydWN0IGZvbnQgKiwgaW50 ICosIGludCAqKTsKIAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCitleHRlcm4gTGlz cF9PYmplY3QgbWNfbGlzdG4gKHB0cmRpZmZfdCwgTGlzcF9PYmplY3QsIC4uLik7CisKK2V4dGVy biBMaXNwX09iamVjdCBtY19udGggKGludCwgTGlzcF9PYmplY3QpOworCitleHRlcm4gTGlzcF9P YmplY3QgbWNfYXNzcSAoTGlzcF9PYmplY3QsIExpc3BfT2JqZWN0KTsKKworZXh0ZXJuIHZvaWQg bWNfeHdfY29sb3JfdmFsdWVzIChzdHJ1Y3Qgd2luZG93ICosIExpc3BfT2JqZWN0LCBzdHJ1Y3Qg bWNfUkdCICopOworCitleHRlcm4gYm9vbCBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHN0cnVj dCB3aW5kb3cgKiwgYm9vbCk7CisKK2V4dGVybiBjaGFyICogbWNfd2luZG93IChzdHJ1Y3Qgd2lu ZG93ICopOworCitleHRlcm4gY2hhciAqIG1jX2NoYXJfdG9fc3RyaW5nIChpbnQpOworCitleHRl cm4gY2hhciAqIG1jX2N1cnNvcl90eXBlX3RvX3N0cmluZyAoZW51bSB0eXBlX29mX2N1cnNvcik7 CisKK2V4dGVybiBjaGFyICogbWNfZmxhdm9yX3RvX3N0cmluZyAoZW51bSBtY19mbGF2b3IpOwor CitleHRlcm4gdm9pZCBtY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHN0cnVjdCB3aW5kb3cgKiwgc3Ry dWN0IGdseXBoX3JvdyAqLCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGVudW0gdHlwZV9vZl9jdXJzb3IpOworCitleHRlcm4gaW50IG1jX2dldF9mcmluZ2VfYml0bWFw IChzdHJ1Y3Qgd2luZG93ICosIExpc3BfT2JqZWN0LCBpbnQsIGludCk7CisKK2V4dGVybiB2b2lk IG1jX2VuZ2luZSAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVj dCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICosIGlu dCwgaW50LCBpbnQsIGludCwgaW50LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgIGVudW0g dHlwZV9vZl9jdXJzb3IsIGludCwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBpbnQsCisgICAgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IsIGJvb2wsIGVudW0gdHlwZV9vZl9hY3Rpb24s IGJvb2wsCisgICAgICAgICAgICAgICAgICAgICAgIGVudW0gdHlwZV9vZl9jYWNoZSk7CisKK2V4 dGVybiB2b2lkIG1jX3NldF9lc3NlbnRpYWxzIChzdHJ1Y3Qgd2luZG93ICosIGJvb2wsIHN0cnVj dCBtY19SR0IgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdC ICosIGludCAqKTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19yb3cgKHN0cnVjdCB3aW5kb3cgKiwg c3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAg ICAgICAgICAgICAgc3RydWN0IGdseXBoICosIGludCwgaW50LCBpbnQsIGludCwgYm9vbCwgc3Ry dWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgc3RydWN0 IG1jX1JHQiwgc3RydWN0IG1jX1JHQiwgYm9vbCk7CisKK2V4dGVybiB2b2lkIG1jX3JlZHJhd19y b3cgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhf cm93ICosCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQsIGludCwgaW50LCBib29sLCBl bnVtIGRyYXdfZ2x5cGhzX2ZhY2UpOworCitleHRlcm4gdm9pZCBtY19yZXNldF9jYWNoZSAoc3Ry dWN0IHdpbmRvdyAqLCBlbnVtIHR5cGVfb2ZfY2FjaGUpOworCitleHRlcm4gdm9pZCBtY19wcmVf c2Nyb2xsX2NsZWFuIChzdHJ1Y3Qgd2luZG93ICopOworCitleHRlcm4gdm9pZCBtY19kcmF3X2N1 cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqLCBlbnVtIGRy YXdfZ2x5cGhzX2ZhY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBp bnQsIGludCwgc3RydWN0IG1jX1JHQiwgZW51bSBtY19mbGF2b3IsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZW51bSB0eXBlX29mX2N1cnNvciwgaW50LCBib29sLCBib29sKTsK KworZXh0ZXJuIHZvaWQgbWNfeF93cml0ZV9nbHlwaHMgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0 IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgc3RydWN0IGdseXBoICosIGVudW0gZ2x5cGhfcm93X2FyZWEsIGludCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQsIGludCwgc3RydWN0IG1jX1JHQiwgZW51 bSBtY19mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSB0eXBlX29m X2N1cnNvciwgaW50LCBib29sLCBib29sKTsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8K Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRlZiBHTFlQSF9ERUJVRwogZXh0ZXJu IHZvaWQgZHVtcF9nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKikgRVhURVJOQUxM WV9WSVNJQkxFOwogI2VuZGlmCmRpZmYgLS1naXQgYS9zcmMvZGlzcG5ldy5jIGIvc3JjL2Rpc3Bu ZXcuYwppbmRleCBjY2IwOGVjLi40NDI3MDIyIDEwMDY0NAotLS0gYS9zcmMvZGlzcG5ldy5jCisr KyBiL3NyYy9kaXNwbmV3LmMKQEAgLTU2LDYgKzU2LDUzMiBAQCBhbG9uZyB3aXRoIEdOVSBFbWFj cy4gIElmIG5vdCwgc2VlIDxodHRwczovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uICAqLwogI2lu Y2x1ZGUgInczMi5oIgogI2VuZGlmCiAMCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK3N0cnVjdCBnbHlwaHNfc2tpcHBlZAorewor ICBwdHJkaWZmX3QgYWxsb2NhdGVkOworICBwdHJkaWZmX3QgdXNlZDsKKyAgc3RydWN0IHNraXBw ZWRfaXRlbXMKKyAgICB7CisgICAgICBpbnQgeDsKKyAgICAgIGludCBocG9zOworICAgICAgYm9v bCBlbmFibGVkX3A7CisgICAgfSAqc2tpcHBlZDsKK307CisKK3N0cnVjdCBnbHlwaHNfc2tpcHBl ZCBhcnJheV9nbHlwaHNfc2tpcHBlZDsKKworc3RhdGljIHZvaWQgdXBkYXRlX21hcmdpbmFsX2Fy ZWEgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGVudW0gZ2x5cGhfcm93X2FyZWEsIGludCk7CisKK3N0YXRpYyB2 b2lkIG1ha2VfY3VycmVudCAoc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4IC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gPSBOT19GTEFWT1I7CisgIGVudW0gdHlwZV9vZl9jdXJzb3IgY3Vyc29y X3R5cGUgPSBOT19DVVJTT1I7CisgIGludCB3ZCA9IC0xOworICBib29sIGFjdGl2ZV9wID0gKHcg PT0gWFdJTkRPVyAoZi0+c2VsZWN0ZWRfd2luZG93KQorICAgICAgICAgICAgICAgICAgICYmIGYg PT0gRlJBTUVfRElTUExBWV9JTkZPIChmKS0+eF9oaWdobGlnaHRfZnJhbWUpOworICBib29sIGN1 cnNvcl9nY19wID0gZmFsc2U7CisgIHN0cnVjdCBnbHlwaF9tYXRyaXggKmRlc2lyZWRfbWF0cml4 ID0gdy0+ZGVzaXJlZF9tYXRyaXg7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmJvdHRvbV9yb3cgPSBN QVRSSVhfQk9UVE9NX1RFWFRfUk9XIChkZXNpcmVkX21hdHJpeCwgdyk7CisgIGludCBib3R0b21f dnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAoYm90dG9tX3JvdywgZGVzaXJlZF9tYXRyaXgpOworICBp ZiAoZGVidWdfcAorICAgICAgJiYgdnBvcyAhPSBib3R0b21fdnBvcykKKyAgICBmcHJpbnRmIChz dGRlcnIsICJtY191cGRhdGVfdGV4dF9hcmVhICglcyk6ICB2cG9zICglZCkgfCBib3R0b21fdnBv cyAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3MsIGJv dHRvbV92cG9zKTsKKworICAvKiBJZiByb3dzIGFyZSBhdCBkaWZmZXJlbnQgWCBvciBZLCBvciBy b3dzIGhhdmUgZGlmZmVyZW50IGhlaWdodCwKKyAgICAgb3IgdGhlIGN1cnJlbnQgcm93IGlzIG1h cmtlZCBpbnZhbGlkLCB3cml0ZSB0aGUgZW50aXJlIGxpbmUuICovCisgIGlmICghY3VycmVudF9y b3ctPmVuYWJsZWRfcAorICAgICAgfHwgZGVzaXJlZF9yb3ctPnkgIT0gY3VycmVudF9yb3ctPn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ICAgICAgYWZ0ZXIg dGhlIGBpZicgYW5kIHRoZXJlIHdvdWxkIHJlbWFpbiBhIHBpeGVsIGZyb20gdGhlCisgICAgICAg YGYnIG9uIHRoZSBzY3JlZW4uICovCisgICAgaWYgKG92ZXJsYXBwaW5nX2dseXBoc19wICYmIGkg PiAwKQorICAgICAgeworICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gJmN1cnJlbnRfcm93 LT5nbHlwaHNbVEVYVF9BUkVBXVtpIC0gMV07CisgICAgICAgIGludCBsZWZ0LCByaWdodDsKKyAg ICAgICAgcmlmLT5nZXRfZ2x5cGhfb3ZlcmhhbmdzIChnbHlwaCwgWEZSQU1FICh3LT5mcmFtZSks ICZsZWZ0LCAmcmlnaHQpOworICAgICAgICBjYW5fc2tpcF9wID0gKHJpZ2h0ID09IDAgJiYgIWFi b3J0X3NraXBwaW5nKTsKKyAgICAgIH0KKworICAgIGlmIChjYW5fc2tpcF9wKQorICAgICAgewor ICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IGk7CisKKyAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisg ICAgICAgICAgICAgICAmJiBHTFlQSF9FUVVBTF9QIChkZXNpcmVkX2dseXBoLCBjdXJyZW50X2ds eXBoKSkKKyAgICAgICAgICB7CisgICAgICAgICAgICArK2FycmF5X2dseXBoc19za2lwcGVkLnVz ZWQ7CisgICAgICAgICAgICBpZiAoYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkIDwgYXJy YXlfZ2x5cGhzX3NraXBwZWQudXNlZCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg IGludCBvbGRfYWxsb2MgPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxvY2F0ZWQ7CisgICAgICAg ICAgICAgICAgaW50IG5ld19lbHRzID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZCAtIGFycmF5 X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZDsKKyAgICAgICAgICAgICAgICBhcnJheV9nbHlwaHNf c2tpcHBlZC5za2lwcGVkID0KKyAgICAgICAgICAgICAgICAgIHhwYWxsb2MgKGFycmF5X2dseXBo c19za2lwcGVkLnNraXBwZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmYXJyYXlfZ2x5 cGhzX3NraXBwZWQuYWxsb2NhdGVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2Vs dHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgc2l6ZW9mICphcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkKTsKKyAgICAg ICAgICAgICAgICBtZW1zZXQgKGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWQgKyBvbGRfYWxs b2MsIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgKGFycmF5X2dseXBoc19za2lwcGVkLmFs bG9jYXRlZCAtIG9sZF9hbGxvYykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICogc2l6ZW9m ICphcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkKTsKKyAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgaW50IG50aCA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSAxOworICAgICAgICAg ICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLnggPSB4OworICAgICAgICAgICAg YXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmhwb3MgPSBpOworICAgICAgICAgICAg YXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmVuYWJsZWRfcCA9IHRydWU7CisgICAg ICAgICAgICB4ICs9IGRlc2lyZWRfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgKytk ZXNpcmVkX2dseXBoLCArK2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAgICAgICB9CisKKyAgICAg ICAgLyogQ29uc2lkZXIgdGhlIGNhc2UgdGhhdCB0aGUgY3VycmVudCByb3cgY29udGFpbnMgInh4 eAorICAgICBwcHAgZ2dnIiBpbiBpdGFsaWMgQ291cmllciBmb250LCBhbmQgdGhlIGRlc2lyZWQg cm93CisgICAgIGlzICJ4eHggZ2dnIi4gIFRoZSBjaGFyYWN0ZXIgYHAnIGhhcyBsYmVhcmluZywg YGcnCisgICAgIGhhcyBub3QuICBUaGUgbG9vcCBhYm92ZSB3aWxsIHN0b3AgaW4gZnJvbnQgb2Yg dGhlCisgICAgIGZpcnN0IGBwJyBpbiB0aGUgY3VycmVudCByb3cuICBJZiB3ZSB3b3VsZCBzdGFy dAorICAgICB3cml0aW5nIGdseXBocyB0aGVyZSwgd2Ugd291bGRuJ3QgZXJhc2UgdGhlIGxiZWFy aW5nCisgICAgIG9mIHRoZSBgcCcuICBUaGUgcmVzdCBvZiB0aGUgbGJlYXJpbmcgcHJvYmxlbSBp cyB0aGVuCisgICAgIHRha2VuIGNhcmUgb2YgYnkgZHJhd19nbHlwaHMuICovCisgICAgICAgIGlm IChvdmVybGFwcGluZ19nbHlwaHNfcAorICAgICAgICAgICAgJiYgaSA+IDAKKyAgICAgICAgICAg ICYmIGkgPCBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAmJiAoY3Vy cmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFd KSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAgICAg ICByaWYtPmdldF9nbHlwaF9vdmVyaGFuZ3MgKGN1cnJlbnRfZ2x5cGgsCisgICAgICAgICAgICAg ICAgICAgIFhGUkFNRSAody0+ZnJhbWUpLAorICAgICAgICAgICAgICAgICAgICAmbGVmdCwgJnJp Z2h0KTsKKyAgICAgICAgICAgIHdoaWxlIChsZWZ0ID4gMCAmJiBpID4gMCkKKyAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgIC0taSwgLS1kZXNpcmVkX2dseXBoLCAtLWN1cnJlbnRfZ2x5 cGg7CisgICAgICAgICAgICAgICAgeCAtPSBkZXNpcmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAg ICAgICAgICAgICAgICBsZWZ0IC09IGRlc2lyZWRfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAvKiBBYm9ydCB0aGUgc2tpcHBpbmcgYWxnb3JpdGhtIGlm IHdlIGVuZCB1cCBiZWZvcmUKKyAgICAgICAgICAgICAgIG91ciBzdGFydGluZyBwb2ludCwgdG8g YXZvaWQgbG9vcGluZyAoYnVnIzEwNzApLgorICAgICAgICAgICAgICAgVGhpcyBjYW4gaGFwcGVu IHdoZW4gdGhlIGxiZWFyaW5nIGlzIGxhcmdlciB0aGFuCisgICAgICAgICAgICAgICB0aGUgcGl4 ZWwgd2lkdGguICovCisgICAgICAgICAgICBhYm9ydF9za2lwcGluZyA9IChpIDwgc3RhcnRfaHBv cyk7CisgICAgICAgICAgfQorICAgICAgfQorCisgICAgLyogVHJ5IHRvIGF2b2lkIHdyaXRpbmcg dGhlIGVudGlyZSByZXN0IG9mIHRoZSBkZXNpcmVkIHJvdworICAgICAgIGJ5IGxvb2tpbmcgZm9y IGEgcmVzeW5jIHBvaW50LiAgVGhpcyBtYWlubHkgcHJldmVudHMKKyAgICAgICBtb2RlIGxpbmUg ZmxpY2tlcmluZyBpbiB0aGUgY2FzZSB0aGUgbW9kZSBsaW5lIGlzIGluCisgICAgICAgZml4ZWQt cGl0Y2ggZm9udCwgd2hpY2ggaXQgdXN1YWxseSB3aWxsIGJlLiAqLworICAgIGlmIChpIDwgZGVz aXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgIHsKKyAgICAgICAgaW50IHN0YXJ0X3gg PSB4LCBzdGFydF9ocG9zID0gaTsKKyAgICAgICAgc3RydWN0IGdseXBoICpzdGFydCA9IGRlc2ly ZWRfZ2x5cGg7CisgICAgICAgIGludCBjdXJyZW50X3ggPSB4OworICAgICAgICBib29sIHNraXBf Zmlyc3RfcCA9ICFjYW5fc2tpcF9wOworICAgICAgICAvKiBGaW5kIHRoZSBuZXh0IGdseXBoIHRo YXQncyBlcXVhbCBhZ2Fpbi4gKi8KKyAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAg ICAgICAmJiAoc2tpcF9maXJzdF9wCisgICAgICAgICAgICAgICAgICAgfHwgIUdMWVBIX0VRVUFM X1AgKGRlc2lyZWRfZ2x5cGgsIGN1cnJlbnRfZ2x5cGgpKQorICAgICAgICAgICAgICAgJiYgeCA9 PSBjdXJyZW50X3gpCisgICAgICAgICAgeworICAgICAgICAgICAgeCArPSBkZXNpcmVkX2dseXBo LT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgIGN1cnJlbnRfeCArPSBjdXJyZW50X2dseXBoLT5w aXhlbF93aWR0aDsKKyAgICAgICAgICAgICsrZGVzaXJlZF9nbHlwaCwgKytjdXJyZW50X2dseXBo LCArK2k7CisgICAgICAgICAgICBza2lwX2ZpcnN0X3AgPSAwOworICAgICAgICAgIH0KKworICBm b3IgKGludCBlbHQgPSAwOworICAgICAgIGVsdCA8IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQK KyAgICAgICAmJiB2cG9zICE9IGJvdHRvbV92cG9zOworICAgICAgICsrZWx0KQorICAgIHsKKyAg ICAgIGludCB4ID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtlbHRdLng7CisgICAgICBp bnQgaHBvcyA9IGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbZWx0XS5ocG9zOworICAgICAg c3RydWN0IGdseXBoICp0YXJnZXRfZ2x5cGggPQorICAgICAgICBtY19nZXRfY3Vyc29yX2dseXBo ICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIGhwb3MsIHZwb3MpOworICAgICAgaWYg KGRlYnVnX3ApCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlNLSVBQRUQ6ICBjaGFyICglZC8l cykgfCB4OiAoJWQpIHwgaHBvcyAoJWQpIHwgdnBvcyAoJWQpXG4iLAorICAgICAgICAgICAgICAg ICAgICAgICAgIHRhcmdldF9nbHlwaC0+dS5jaCwgbWNfY2hhcl90b19zdHJpbmcgKHRhcmdldF9n bHlwaC0+dS5jaCksCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgaHBvcywgdnBvcyk7Cisg ICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRf Z2x5cGgsIHgsIDEsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgYm90dG9tX3Zwb3MsIGFjdGl2 ZV9wLCBjdXJzb3JfbWF0cml4LCBmY194LCBjaF9mb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAg ICAgIGZjX2ZvcmVncm91bmQsIHRydWUpOworICAgIH0KKworICAgICAgICBpZiAoaSA9PSBzdGFy dF9ocG9zIHx8IHggIT0gY3VycmVudF94KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGkgPSBz dGFydF9ocG9zOworICAgICAgICAgICAgeCA9IHN0YXJ0X3g7CisgICAgICAgICAgICBkZXNpcmVk X2dseXBoID0gc3RhcnQ7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICB9CisKKyAgICAg ICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgc3RhcnRfaHBvcywgZGVzaXJlZF9yb3ctPnks IHN0YXJ0X3gpOworCisgIC8qIFJlLWRyYXcgYSBwb3J0aW9uIG9mIHRoZSByb3cuICovCisKKyAg aWYgKGRlYnVnX3AKKyAgICAgICYmIHZwb3MgIT0gYm90dG9tX3Zwb3MpCisgICAgeworICAgICAg ZnByaW50ZiAoc3RkZXJyLCAiUkVEUkFXIFNFR01FTlQ6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4LCB1cGRhdGVk X3Jvdywgc3RhcnQsIHgsCisgICAgICAgICAgICAgICAgICAgICB1cGRhdGVkX3Jvdy0+dXNlZFtU RVhUX0FSRUFdIC0gaHBvcywgdnBvcywgYm90dG9tX3Zwb3MsCisgICAgICAgICAgICAgICAgICAg ICBhY3RpdmVfcCwgY3Vyc29yX21hdHJpeCwgZmNfeCwgY2hfZm9yZWdyb3VuZCwgZmNfZm9yZWdy b3VuZCwKKyAgICAgICAgICAgICAgICAgICAgIHRydWUpOworICAgICAgfQorICAgICAgLyogVGhl cmUgd2VyZSBubyBjaGFuZ2VzIGFuZCBpID09IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0g Ki8KKyAgICAgIGVsc2UgaWYgKCFjaGFuZ2VkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAo ZGVidWdfcCkKKyAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlVOQ0hBTkdFRCAtLSBXUklU RSBFTlRJUkUgTElORS5cbiIpOworICAgICAgICAgIG1jX2RyYXdfcm93ICh3LCBkZXNpcmVkX21h dHJpeCwgdXBkYXRlZF9yb3csIGRlc2lyZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAg ICAgICAgICAgICAgICAgICAgZGVzaXJlZF9yb3ctPngsIGRlc2lyZWRfcm93LT51c2VkW1RFWFRf QVJFQV0sIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgIGJvdHRvbV92cG9zLCBhY3RpdmVf cCwgY3Vyc29yX21hdHJpeCwgZmNfeCwgY2hfZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAg ICAgICAgZmNfZm9yZWdyb3VuZCwgdHJ1ZSk7CisgICAgICAgIH0KKworICAgICAgLyogTWF5YmUg Y2xlYXIgdG8gZW5kIG9mIGxpbmUuICovCisgICAgICBpZiAoTUFUUklYX1JPV19FWFRFTkRTX0ZB Q0VfUCAoZGVzaXJlZF9yb3cpKQorICAgICAgICB7CisgICAgICAgICAgLyogSWYgbmV3IHJvdyBl eHRlbmRzIHRvIHRoZSBlbmQgb2YgdGhlIHRleHQgYXJlYSwgbm90aGluZworICAgICAgICAgICAg IGhhcyB0byBiZSBjbGVhcmVkLCBpZiBhbmQgb25seSBpZiB3ZSBkaWQgYSB3cml0ZV9nbHlwaHMK KyAgICAgICAgICAgICBhYm92ZS4gIFRoaXMgaXMgbWFkZSBzdXJlIGJ5IHNldHRpbmcgZGVzaXJl ZF9zdG9wX3BvcworICAgICAgICAgICAgIGFwcHJvcHJpYXRlbHkgYWJvdmUuICovCisgICAgICAg ICAgZWFzc2VydCAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAg ICAgICAgICB8fCAoKGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gPT0gY3VycmVudF9yb3ct PnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19F WFRFTkRTX0ZBQ0VfUCAoY3VycmVudF9yb3cpKSk7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYg KE1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1AgKGN1cnJlbnRfcm93KSkKKyAgICAgICAgeworICAg ICAgICAgIC8qIElmIG9sZCByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEs IGNsZWFyLiAqLworICAgICAgICAgIGlmIChpID49IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJF QV0pCisgICAgICAgICAgICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9zLCBpLCBkZXNpcmVkX3Jv dy0+eSwgZGVzaXJlZF9yb3ctPnBpeGVsX3dpZHRoKTsKKyAgICAgICAgICByaWYtPmNsZWFyX2Vu ZF9vZl9saW5lICh3LCB1cGRhdGVkX3JvdywgVEVYVF9BUkVBLCAtMSk7CisgICAgICAgICAgY2xl YXJfdG9feCA9IC0xOworICAgICAgICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAgIH0KKyAgICAg IGVsc2UgaWYgKGRlc2lyZWRfcm93LT5waXhlbF93aWR0aCA8IGN1cnJlbnRfcm93LT5waXhlbF93 aWR0aCkKKyAgICAgICAgeworICAgICAgICAgIC8qIE90aGVyd2lzZSBjbGVhciB0byB0aGUgZW5k IG9mIHRoZSBvbGQgcm93LiAgRXZlcnl0aGluZworICAgICAgICAgICAgIGFmdGVyIHRoYXQgcG9z aXRpb24gc2hvdWxkIGJlIGNsZWFyIGFscmVhZHkuICovCisgICAgICAgICAgaW50IHhsaW07Cisg ICAgICAgICAgaWYgKGkgPj0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAg ICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRfcm93LT55LCBkZXNpcmVk X3Jvdy0+cGl4ZWxfd2lkdGgpOworICAgICAgICAgIC8qIElmIGN1cnNvciBpcyBkaXNwbGF5ZWQg YXQgdGhlIGVuZCBvZiB0aGUgbGluZSwgbWFrZSBzdXJlCisgICAgICAgICAgICAgaXQncyBjbGVh cmVkLiAgTm93YWRheXMgd2UgZG9uJ3QgaGF2ZSBhIHBoeXNfY3Vyc29yX2dseXBoCisgICAgICAg ICAgICAgd2l0aCB3aGljaCB0byBlcmFzZSB0aGUgY3Vyc29yIChiZWNhdXNlIHRoaXMgbWV0aG9k CisgICAgICAgICAgICAgZG9lc24ndCB3b3JrIHdpdGggbGJlYXJpbmcvcmJlYXJpbmcpLCBzbyB3 ZSBtdXN0IGRvIGl0IHRoaXMgd2F5LiAqLworICAgICAgICAgIGlmICh2cG9zID09IHctPnBoeXNf Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgICAgJiYgKGRlc2lyZWRfcm93LT5yZXZlcnNlZF9wCisg ICAgICAgICAgICAgICAgICA/ICh3LT5waHlzX2N1cnNvci5ocG9zIDwgMCkKKyAgICAgICAgICAg ICAgICAgIDogKHctPnBoeXNfY3Vyc29yLmhwb3MgPj0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9B UkVBXSkpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB3LT5waHlzX2N1cnNvcl9vbl9w ID0gMDsKKyAgICAgICAgICAgICAgeGxpbSA9IC0xOworICAgICAgICAgICAgfQorICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgIHhsaW0gPSBjdXJyZW50X3Jvdy0+cGl4ZWxfd2lkdGg7CisgICAg ICAgICAgcmlmLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgdXBkYXRlZF9yb3csIFRFWFRfQVJFQSwg eGxpbSk7CisgICAgICAgICAgY2xlYXJfdG9feCA9IHhsaW07CisgICAgICAgICAgY2hhbmdlZF9w ID0gMTsKKyAgICAgICAgfQorCisgIGlmIChjaGFuZ2VkX3AKKyAgICAgICYmIGNsZWFyX3RvX3gg IT0gMCkKKyAgICB7CisgICAgICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0 aCAodywgVEVYVF9BUkVBKTsKKyAgICAgIHN0cnVjdCBtY19SR0IgZGVidWdfZmcgPSB7LnJlZCA9 IDAuODY3LCAuZ3JlZW4gPSAwLjg2NywgLmJsdWUgPSAwLjg2N307CisgICAgICBzdHJ1Y3QgZ2x5 cGggKnRhcmdldF9nbHlwaCA9IHVwZGF0ZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHVwZGF0 ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgLyogYG1jX2VuZ2luZScgb25seSBk cmF3cyBhbiBNQ19HTFlQSCB3aGVuIHggPCB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGguCisgICAg ICBUaGUgY3VycmVudCBkZXNpZ24gaW5oaWJpdHMgZHJhd2luZyBvdmVyIGFuIGV4aXN0aW5nIGds eXBoIGF0IHRoZSBlbmQgb2YgYQorICAgICAgd29yZC13cmFwcGVkIGxpbmUuICBTYWlkIGdseXBo IHJlY2VpdmVzIGEgZmFrZSBjdXJzb3IgaW4gZWl0aGVyIG9uZSBvZiB0aGUKKyAgICAgIHByZXZp b3VzIHNlY3Rpb25zIGFib3ZlLCBhbmQgc2hvdWxkIG5vdCBiZSBvdmVyd3JpdHRlbiB3aXRoIGFu b3RoZXIgb25lLgorICAgICAgVGhpcyBkZXNpZ24gaXMgbmVlZGVkIGJlY2F1c2UgYSB3b3JkLXdy YXBwZWQgbGluZSBkb2VzIG5vdCByZWNlaXZlIGFuIGV4dHJhCisgICAgICBzcGFjZSBsaWtlIG5v bi13b3JkLXdyYXBwZWQgbGluZXMgZG8uICovCisgICAgICBpbnQgeCA9IHVwZGF0ZWRfcm93LT5w aXhlbF93aWR0aDsKKyAgICAgIGludCBocG9zID0gdXBkYXRlZF9yb3ctPnVzZWRbVEVYVF9BUkVB XSAtIDE7CisgICAgICBpbnQgeF9saW1pdCA9IChjbGVhcl90b194ID09IC0xKQorICAgICAgICAg ICAgICAgICAgICA/IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICA6IGNsZWFy X3RvX3g7CisgICAgICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgICAgIGZwcmludGYgKHN0 ZGVyciwgIm1jX3VwZGF0ZV90ZXh0X2FyZWEgKGZsb2F0aW5nKTogIHZwb3MgKCVkKSB8IHhfbGlt aXQgKCVkKVxuIiwgdnBvcywgeF9saW1pdCk7CisKKyAgICAgIGlmIChCVUZGRVJQICh3LT5jb250 ZW50cykKKyAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj cm9zc2hhaXJzKSkKKyAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBjaF9ob3Jpem9udGFsX3J1bGVyKSkKKyAgICAgICAgICAmJiB4IDwgdGV4dF9hcmVhX3dp ZHRoCisgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICYmIHRh cmdldF9nbHlwaCAhPSBOVUxMKQorICAgICAgICBtY19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4 LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBURVhUX0FSRUEsIHgsIHhfbGltaXQsCisgICAg ICAgICAgICAgICAgICAgdXBkYXRlZF9yb3ctPnksIGhwb3MsIHZwb3MsIE1DX0hCQVIsIDEsIGN1 cnNvcl9tYXRyaXgsIGZjX3gsCisgICAgICAgICAgICAgICAgICAgZGVidWdfcCA/IGRlYnVnX2Zn IDogY2hfZm9yZWdyb3VuZCwgYWN0aXZlX3AsIEhPUklaT05UQUxfUlVMRVIsCisgICAgICAgICAg ICAgICAgICAgdHJ1ZSwgTk9fQ0FDSEUpOworCisgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVu dHMpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jv c3NoYWlycykpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFfd2lkdGgK KyAgICAgICAgICAmJiB2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAgICAgJiYgdy0+Y3Vy c29yLnggPj0geAorICAgICAgICAgICYmIHRhcmdldF9nbHlwaCAhPSBOVUxMKQorICAgICAgICBt Y19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBU RVhUX0FSRUEsIHgsIHhfbGltaXQsCisgICAgICAgICAgICAgICAgICAgdXBkYXRlZF9yb3ctPnks IGhwb3MsIHZwb3MsIE1DX0JBUiwgMSwgY3Vyc29yX21hdHJpeCwgZmNfeCwKKyAgICAgICAgICAg ICAgIC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kcmF3X2ZyaW5nZV9iaXRtYXBzX3AKKyAgICAgICAgICB8fCBkZXNpcmVkX3Jvdy0+bW9k ZV9saW5lX3AgIT0gY3VycmVudF9yb3ctPm1vZGVfbGluZV9wCisgICAgICAgICAgfHwgZGVzaXJl ZF9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AgIT0gY3VycmVudF9yb3ctPmV4YWN0X3dp bmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICB8fCAoTUFUUklYX1JPV19DT05USU5VQVRJT05f TElORV9QIChkZXNpcmVkX3JvdykKKyAgICAgICAgICAgICAgIT0gTUFUUklYX1JPV19DT05USU5V QVRJT05fTElORV9QIChjdXJyZW50X3JvdykpKQorICAgICAgICByaWYtPmFmdGVyX3VwZGF0ZV93 aW5kb3dfbGluZV9ob29rICh3LCBkZXNpcmVkX3Jvdyk7CisgICAgfQorICAvKiBVcGRhdGUgY3Vy cmVudF9yb3cgZnJvbSBkZXNpcmVkX3Jvdy4gKi8KKyAgbWFrZV9jdXJyZW50ICh3LT5kZXNpcmVk X21hdHJpeCwgdy0+Y3VycmVudF9tYXRyaXgsIHZwb3MpOworICByZXR1cm4gY2hhbmdlZF9wOwor fQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogLyogU3RydWN0dXJlIHRvIHBhc3MgZGltZW5zaW9ucyBhcm91bmQuICBVc2VkIGZvciBj aGFyYWN0ZXIgYm91bmRpbmcKICAgIGJveGVzLCBnbHlwaCBtYXRyaXggZGltZW5zaW9ucyBhbmQg YWxpa2UuICAqLwogCkBAIC0zMzg3LDYgKzM5MTMsMzYgQEAgY2hlY2tfY3VycmVudF9tYXRyaXhf ZmxhZ3MgKHN0cnVjdCB3aW5kb3cgKncpCiBzdGF0aWMgYm9vbAogdXBkYXRlX3dpbmRvdyAoc3Ry dWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogeworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCkK KyAgICBmcHJpbnRmIChzdGRlcnIsICJ1cGRhdGVfd2luZG93ICglcylcbiIsIG1jX3dpbmRvdyAo dykpOworCisgIGJvb2wgZHJhd19wID0gdHJ1ZTsKKworICBzdHJ1Y3QgbWNfUkdCIGNoX2ZvcmVn cm91bmQgPSB7LnJlZCA9IC0xLjAsIC5ncmVlbiA9IC0xLjAsIC5ibHVlID0gLTEuMH07CisKKyAg c3RydWN0IG1jX1JHQiBmY19mb3JlZ3JvdW5kID0gey5yZWQgPSAtMS4wLCAuZ3JlZW4gPSAtMS4w LCAuYmx1ZSA9IC0xLjB9OworCisgIGludCBmY194ID0gMDsKKworICBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICpjdXJzb3JfbWF0cml4ID0gTlVMTDsKKworICAvLyBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJB TUUgKHctPmZyYW1lKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUg KHcpKTsKKyAgYm9vbCBhY3RpdmVfcCA9ICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVkX3dpbmRv dykKKyAgICAgICAgICAgICAgICAgICAmJiBmID09IEZSQU1FX0RJU1BMQVlfSU5GTyAoZiktPnhf aGlnaGxpZ2h0X2ZyYW1lKTsKKworICBtY19zZXRfZXNzZW50aWFscyAodywgYWN0aXZlX3AsICZj aF9mb3JlZ3JvdW5kLCAmZmNfZm9yZWdyb3VuZCwgJmZjX3gpOworCisgIG1jX3ByZV9zY3JvbGxf Y2xlYW4gKHcpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqK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JhY3kgb2YgYFJPVy0+dXNlZFtURVhUX0FSRUFdYC4gIFRoZXJlZm9yZSwg d2UgbXVzdCBub3cgcmVseQorICBleGNsdXNpdmVseSB1cG9uIGB3LT5jdXJyZW50X21hdHJpeCcg Zm9yIGN1cnNvciByb3cgYmFzZWQgZGVjaXNpb25zLiAqLworICBmb3IgKHN0cnVjdCBnbHlwaF9y b3cgKm1jX3JvdyA9IHJvdzsKKyAgICAgICBtY19yb3cgPCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlu cHV0X3BlbmRpbmcpOworICAgICAgICsrbWNfcm93KQorICAgIHsKKyAgICAgIGludCB2cG9zID0g TUFUUklYX1JPV19WUE9TIChtY19yb3csIGRlc2lyZWRfbWF0cml4KTsKKyAgICAgIGlmIChtY19y b3ctPmVuYWJsZWRfcAorICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAg ICAgIHsKKyAgICAgICAgICBjdXJzb3JfbWF0cml4ID0gZGVzaXJlZF9tYXRyaXg7CisgICAgICAg ICAgaWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVkICUgcHJlZW1wdF9jb3VudCA9PSAwKQorICAg ICAgICAgICAgZGV0ZWN0X2lucHV0X3BlbmRpbmdfaWdub3JlX3NxdWVlemFibGVzICgpOworICAg ICAgICAgIGNoYW5nZWRfcCB8PSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAg ICAgICAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29u ZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg fHwgISBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkpCisg ICAgICAgICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAm bW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZmNfeCwgY2hfZm9yZWdyb3VuZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZjX2ZvcmVncm91 bmQsIGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgOiB1cGRhdGVfd2luZG93X2xpbmUg KHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOworICAgICAgICAgIGlmIChNQVRS SVhfUk9XX0JPVFRPTV9ZIChyb3cpID49IHliKQorICAgICAgICAgICAgZm9yIChpbnQgaSA9IHZw b3MgKyAxOyBpIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzIC0gMTsgKytpKQorICAgICAgICAg ICAgICBTRVRfTUFUUklYX1JPV19FTkFCTEVEX1AgKHctPmN1cnJlbnRfbWF0cml4LCBpLCBmYWxz ZSk7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisKKyAgY3Vyc29yX21hdHJp eCA9IHctPmN1cnJlbnRfbWF0cml4OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg ICAgICAvKiBVcGRhdGUgdGhlIHJlc3Qgb2YgdGhlIGxpbmVzLiAgKi8KICAgICAgIGZvciAoOyBy b3cgPCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpOyArK3JvdykKIAkvKiBzY3Jv bGxpbmdfd2luZG93IHJlc2V0cyB0aGUgZW5hYmxlZF9wIGZsYWcgb2YgdGhlIHJvd3MgaXQKQEAg LTM0NjcsNiArNDA2NSwxOSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29s IGZvcmNlX3ApCiAJaWYgKHJvdy0+ZW5hYmxlZF9wKQogCSAgewogCSAgICBpbnQgdnBvcyA9IE1B VFJJWF9ST1dfVlBPUyAocm93LCBkZXNpcmVkX21hdHJpeCk7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgICAgICAvKiBJZiB0aGUg YGN1cnNvcl9yb3dgIGlzIHdpdGhpbiB0aGUgYGRlc2lyZWRfbWF0cml4YCwgdGhlbiBpdCB3YXMK KyAgICAgICAgICBwcm9jZXNzZWQgaGVyZWluYWJvdmUgYW5kIHNob3VsZCBiZSBza2lwcGVkIGF0 IHRoaXMgdGltZS4gKi8KKyAgICAgICAgICBpZiAodnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAg ICAgICAgICBjb250aW51ZTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICBp bnQgaTsKIAogCSAgICAvKiBXZSdsbCBoYXZlIHRvIHBsYXkgYSBsaXR0bGUgYml0IHdpdGggd2hl biB0bwpAQCAtMzQ3NSw4ICs0MDg2LDIyIEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5kb3cg KncsIGJvb2wgZm9yY2VfcCkKIAkgICAgICAgY29tbWFuZHMgd2lsbCB0b28gcXVpY2tseSBwYXVz ZSByZWRpc3BsYXkuICAqLwogCSAgICBpZiAoIWZvcmNlX3AgJiYgKytuX3VwZGF0ZWQgJSBwcmVl bXB0X2NvdW50ID09IDApCiAJICAgICAgZGV0ZWN0X2lucHV0X3BlbmRpbmdfaWdub3JlX3NxdWVl emFibGVzICgpOwotCSAgICBjaGFuZ2VkX3AgfD0gdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9z LAotCQkJCQkgICAgICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICAgICAgY2hhbmdl ZF9wIHw9IChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICYm ICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAhIE5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgPyBtY191cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292 ZXJ3cml0dGVuX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjdXJzb3JfbWF0cml4LCBmY194LCBjaF9mb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmNfZm9yZWdyb3VuZCwgZHJhd19wKQor ICAgICAgICAgICAgICAgICAgICAgICA6IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1v dXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAK IAkgICAgLyogT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W1hY3MgY3Jhc2hlcyBv biBzdGFydHVwIHdpdGhvdXQgYSBCVUZGRVJQIGNoZWNrLiAqLworICAgICAgICYmIEJVRkZFUlAg KHctPmNvbnRlbnRzKQorICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBtY19jb25mKSkKKyAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSk7CisgICAgICAgKytkZXNpcmVkX3JvdykKKyAg IHsKKyAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGRlc2lyZWRfcm93LCBkZXNpcmVk X21hdHJpeCk7CisgICAgIGlmIChkZXNpcmVkX3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgIGNvbnRp bnVlOworICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpib3R0b21fcm93ID0gTUFUUklYX0JPVFRPTV9U RVhUX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIHcpOworICAgICBpbnQgYm90dG9tX3Zwb3MgPSBN QVRSSVhfUk9XX1ZQT1MgKGJvdHRvbV9yb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgICAgc3Ry dWN0IGdseXBoX3JvdyAqY3VycmVudF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJp eCwgdnBvcyk7CisgICAgIGlmIChjdXJyZW50X3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgIG1jX2Ry YXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgY3VycmVudF9yb3csIGN1cnJlbnRfcm93LT5n bHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudF9yb3ctPngsIGN1 cnJlbnRfcm93LT51c2VkW1RFWFRfQVJFQV0sIHZwb3MsCisgICAgICAgICAgICAgICAgICAgIGJv dHRvbV92cG9zLCBhY3RpdmVfcCwgY3Vyc29yX21hdHJpeCwgZmNfeCwgY2hfZm9yZWdyb3VuZCwK KyAgICAgICAgICAgICAgICAgICAgZmNfZm9yZWdyb3VuZCwgZHJhd19wKTsKKyAgIH0KKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgLyogVXBkYXRlIHRoZSBoZWFkZXIgbGlu ZSBhZnRlciBzY3JvbGxpbmcgYmVjYXVzZSBhIG5ldyBoZWFkZXIKIAkgbGluZSB3b3VsZCBvdGhl cndpc2Ugb3ZlcndyaXRlIGxpbmVzIGF0IHRoZSB0b3Agb2YgdGhlIHdpbmRvdwogCSB0aGF0IGNh biBiZSBzY3JvbGxlZC4gICovCkBAIC0zNTEyLDcgKzQxNzQsNTggQEAgdXBkYXRlX3dpbmRvdyAo c3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RF TQogCSAgaWYgKGNoYW5nZWRfcCAmJiByaWYtPmZpeF9vdmVybGFwcGluZ19hcmVhKQogCSAgICB7 Ci0JICAgICAgcmVkcmF3X292ZXJsYXBwZWRfcm93cyAodywgeWIpOworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBgcmVkcmF3X292ZXJs YXBwZWRfcm93cyc6ICBSZWRyYXcgbGluZXMgZnJvbSB0aGUgY3VycmVudCBtYXRyaXggb2Ygd2lu ZG93IFcKK3RoYXQgYXJlIG92ZXJsYXBwZWQgYnkgb3RoZXIgcm93cy4gIFlCIGlzIGJvdHRvbS1t b3N0IHktcG9zaXRpb24gaW4gVy4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AgICAgICYmIGFyZWEg PT0gVEVYVF9BUkVBCisgICAgICAgICAgICAgICAgICAmJiByb3ctPnVzZWRbYXJlYV0pCisgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0 cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgICAgICAgICAgICAgICAgICBpbnQgc3RhcnRfeCA9 IHJvdy0+eDsKKyAgICAgICAgICAgICAgICAgIGludCBzdGFydF9ocG9zID0gMDsKKyAgICAgICAg ICAgICAgICAgIGludCBlbmRfaHBvcyA9IHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAgICAg ICAgIGJvb2wgY2xlYXJfZW9sX3AgPSB0cnVlOworICAgICAgICAgICAgICAgICAgZW51bSBkcmF3 X2dseXBoc19mYWNlIGhsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAgICAgICAgICAgICAgICAgIG1j X3JlZHJhd19yb3cgKHcsIG1hdHJpeCwgcm93LCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRfaHBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyX2VvbF9wLCBobCk7Cisg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKHJvdy0+dXNlZFthcmVh XSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgRlJBTUVfUklGIChm KS0+d3JpdGVfZ2x5cGhzICh3LCByb3csIHJvdy0+Z2x5cGhzW2FyZWFdLCBhcmVhLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+dXNlZFthcmVh XSk7CisgICAgICAgICAgICAgICAgICAgIEZSQU1FX1JJRiAoZiktPmNsZWFyX2VuZF9vZl9saW5l ICh3LCByb3csIGFyZWEsIC0xKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0K KyAgICAgICAgICByb3ctPm92ZXJsYXBwZWRfcCA9IDA7CisgICAgICAgIH0KKyAgICAgIGlmIChN QVRSSVhfUk9XX0JPVFRPTV9ZIChyb3cpID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICByZWRyYXdfb3ZlcmxhcHBpbmdf cm93cyAodywgeWIpOwogCSAgICB9CiAjZW5kaWYKQEAgLTM1MzEsMTAgKzQyNDQsMjEgQEAgdXBk YXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogICAgICAgc3RyY3B5 ICh3LT5jdXJyZW50X21hdHJpeC0+bWV0aG9kLCB3LT5kZXNpcmVkX21hdHJpeC0+bWV0aG9kKTsK ICNlbmRpZgogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCisgIGlmIChCVUZGRVJQICh3LT5jb250 ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3Nz aGFpcnMpKSkKKyAgICBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHcsIDApOworICAgIGVsc2UK ICAgICAgIHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgMCk7CiAjZW5kaWYKIAorLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogICAgICAgLyogRW5kIHRoZSB1cGRhdGUgb2Ygd2luZG93IFcu ICBEb24ndCBzZXQgdGhlIGN1cnNvciBpZiB3ZQogICAgICAgICAgcGF1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yAgICAgICJ4Li54eC4u LiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIp CisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvd19i aXRzW10gPXsKKyAgMHg4MCwgMHg4MCwgMHg4MCwgMHg5OCwgMHg4YywgMHg4NiwgMHhiZiwKKyAg MHhiZiwgMHg4NiwgMHg4YywgMHg5OCwgMHg4MCwgMHg4MCwgMHg4MH07CisKKy8qIDI1CisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4u Li4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi54eC4uLnh4IgorICAgICAgIi4ueHgu Lnh4IgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgInh4eHh4eHh4IgorICAgICAgInh4eHh4eHh4 IgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHguLnh4IgorICAgICAgIi54eC4uLnh4Igor ICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fy cm93X2JpdHNbXSA9eworICAweDMsIDB4MywgMHgzLCAweDYzLCAweDMzLCAweDFiLCAweGZmLCAw eGZmLCAweDFiLCAweDMzLCAweDYzLCAweDMsIDB4MywgMHgzfTsKKworLyogMjYKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLnh4Lngi CisgICAgICAieC4uLi54eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisg ICAgICAieC4uLi54eHgiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4ueHguLngiCisgICAg ICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNb XSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDk5LCAweDhkLCAweDg3LCAweGJmLAorICAweGJm LCAweDg3LCAweDhkLCAweDk5LCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjcKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4u eHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC54eC4ueHgiCisgICAgICAieC4ueHgueHgi CisgICAgICAieC4uLnh4eHgiCisgICAgICAieHh4eHh4eHgiCisgICAgICAieHh4eHh4eHgiCisg ICAgICAieC4uLnh4eHgiCisgICAgICAieC4ueHgueHgiCisgICAgICAieC54eC4ueHgiCisgICAg ICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0 YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19yZXZlcnNlZF9ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fy cm93X2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweGIxLCAweDk5LCAweDhkLCAweGZm LAorICAweGZmLCAweDhkLCAweDk5LCAweGIxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjgK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAg ICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgi KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHNbXSA9 eworICAweGZmLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLAorICAweDgxLCAw eDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjkKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4i CisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRp YyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfYml0c1tdID17CisgIDB4ODAsIDB4ODAs IDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsCisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAs IDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAzMAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRl Y2ltYWwKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54 eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIK KyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAg ICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAg ICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0 IG1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcl9iaXRzW10gPXsKKyAgMHgzLCAweDMsIDB4MywgMHgz LCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDN9OworCisv KiAzMQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4uLiIK KyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAgICAgICIueHguLi4uLiIKKyAg ICAgICIuLnh4Li4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAg ICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIu Li4uLnh4LiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4u Li54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2JhY2tzbGFzaF9iaXRzW10gPXsK KyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwgMHgxOCwgMHgxOCwgMHhjLCAw eGMsIDB4NiwgMHg2LCAweDMsIDB4M307CisKKy8qIDMyCisgICAgKCstZnJpbmdlLWhlbHBlci1o ZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4 eC4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAgIngueHgu Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54eC4u IgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4ueHguIgor ICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwg MHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwgMHg4YywgMHg4YywgMHg4Niwg MHg4NiwgMHg4MywgMHg4M307CisKKy8qIDMzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIi54eHh4eHguIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4u IgorICAgICAgInh4eHgueC4uIgorICAgICAgIi54eHgueC4uIgorICAgICAgIi4uLngueC4uIgor ICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAg ICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfcGlsY3Jvd19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwgMHhmNCwgMHhmNCwgMHg3NCwg MHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisKKy8qIDM0CisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4ueHh4eC4uIgorICAgICAgIi54eHh4eHgu IgorICAgICAgInguLnh4Li54IgorICAgICAgInguLnh4Li54IgorICAgICAgInh4eHh4eHh4Igor ICAgICAgInh4Li4uLnh4IgorICAgICAgInh4eC4ueHh4IgorICAgICAgIi54eHh4eHguIgorICAg ICAgIi4ueHh4eC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc21pbGV5X2ZhY2Vf Yml0c1tdID17CisgIDB4M2MsIDB4N2UsIDB4OTksIDB4OTksIDB4ZmYsIDB4YzMsIDB4ZTcsIDB4 N2UsIDB4M2N9OworCisvKiAzNQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAg ICAgICIuLnguLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAg ICIuLi4uLnguLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIu LnguLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9yaWdo dF9iaXRzW10gPXsKKyAgMHgyMCwgMHgxMCwgMHg4LCAweDQsIDB4OCwgMHgxMCwgMHgyMH07CisK Ky8qIDM2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4ueC4u IgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4uLi4uIgor ICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLi4ueC4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0c1tdID17Cisg IDB4NCwgMHg4LCAweDEwLCAweDIwLCAweDEwLCAweDgsIDB4NH07CisKKy8qIDM3CisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54eC54 eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgueHgu IgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGQ4LCAweDZjLCAw eDM2LCAweDFiLCAweDM2LCAweDZjLCAweGQ4fTsKKworLyogMzgKKyAgICAoKy1mcmluZ2UtaGVs cGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisgICAg ICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAi Li54eC54eC4iCisgICAgICAiLi4ueHgueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19kb3VibGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxYiwgMHgzNiwgMHg2YywgMHhkOCwg MHg2YywgMHgzNiwgMHgxYn07CisKKy8qIDM5CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIngueC54Li4uIgorICAgICAgIi54LngueC4uIgorICAgICAgIi4ueC54Lngu IgorICAgICAgIi4uLngueC54IgorICAgICAgIi4ueC54LnguIgorICAgICAgIi54LngueC4uIgor ICAgICAgIngueC54Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2Fu Z2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGE4LCAweDU0LCAweDJhLCAweDE1LCAweDJhLCAweDU0 LCAweGE4fTsKKworLyogNDAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisgICAgICAi eC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4iCisgICAgICAiLi4u eC54LngiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfbGVmdF9i aXRzW10gPXsKKyAgMHgxNSwgMHgyYSwgMHg1NCwgMHhhOCwgMHg1NCwgMHgyYSwgMHgxNX07CisK Ky8qIDQxCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgor ICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAg Ii4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfc2luZ2xlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAw eDEwLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDIK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi eC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4u eC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5n bGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHg4Miwg MHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQzCisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4u IgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgor ICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfZG91YmxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAw eDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAw fTsKKworLyogNDQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4u eC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4i CisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAg MHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgx MCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQ1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhh ZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4u IgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgor ICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAw eDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0 LCAweDgyLCAweDAwfTsKKworLyogNDYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi Li54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRp YyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgw MCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwg MHgxMCwgMHgwMH07CisKKy8qIDQ3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAor ICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAg InguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIngu LnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4u LnguIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1cGxlX2FuZ2xlX3VwX2Jp dHNbXSA9eworICAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4 LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyfTsKKworLyogNDgKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi Li54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54 LnguLi4iCisgICAgICAiLi4ueC4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190 cmlwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0 NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMH07CisKIC8q IE5PVEU6ICBUaGUgb3JkZXIgb2YgdGhlc2UgYml0bWFwcyBtdXN0IG1hdGNoIHRoZSBzZXF1ZW5j ZQogICAgdXNlZCBpbiBmcmluZ2UuZWwgdG8gZGVmaW5lIHRoZSBjb3JyZXNwb25kaW5nIHN5bWJv bHMuICAqLwogCkBAIC00NjcsOCArOTIxLDEwNDQgQEAgc3RhdGljIHN0cnVjdCBmcmluZ2VfYml0 bWFwIHN0YW5kYXJkX2JpdG1hcHNb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Bp bnQgcGFydGlhbF9wKQoreworICBMaXNwX09iamVjdCBjbWFwLCBibTEgPSBRbmlsLCBibTIgPSBR bmlsLCBibTsKKyAgRU1BQ1NfSU5UIGxuMSA9IDAsIGxuMiA9IDA7CisgIGludCBpeDEgPSByaWdo dF9wOworICBpbnQgaXgyID0gaXgxICsgKHBhcnRpYWxfcCA/IDIgOiAwKTsKKyAgaWYgKChjbWFw ID0gQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSks ICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAgICBibTEgPSBtY19hc3NxIChiaXRtYXAsIGNtYXAp OworICAgICAgaWYgKENPTlNQIChibTEpKQorICB7CisgICAgaWYgKChibTEgPSBYQ0RSIChibTEp KSwgTklMUCAoYm0xKSkKKyAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICAgIGlm IChDT05TUCAoYm0xKSkKKyAgICAgIHsKKyAgICAgICAgbG4xID0gWEZJWE5VTSAoRmxlbmd0aCAo Ym0xKSk7CisgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgeworICAgICAgaWYgKGxuMSA+IGl4 MikKKyAgICAgICAgeworICAgICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMSk7CisgICAgICAg ICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgIH0KKyAgICB9 CisgICAgICAgIGVsc2UKKyAgICB7CisgICAgICBpZiAobG4xID4gaXgxKQorICAgICAgICB7Cisg ICAgICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgICAgICBpZiAoIUVRIChibSwg UXQpKQorICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAgICAgIH0KKyAgICBl bHNlIGlmICgoYm0gPSBibTEsICFFUSAoYm0sIFF0KSkpCisgICAgICBnb3RvIGZvdW5kOworICB9 CisgICAgfQorICBpZiAoIUVRIChjbWFwLCBCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2Vf aW5kaWNhdG9yX2FsaXN0KSkKKyAgICAgICYmICFOSUxQIChCVkFSICgmYnVmZmVyX2RlZmF1bHRz LCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkpCisgICAgeworICAgICAgYm0yID0gbWNfYXNzcSAo Yml0bWFwLCBCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSk7 CisgICAgICBpZiAoQ09OU1AgKGJtMikpCisgIHsKKyAgICBpZiAoKGJtMiA9IFhDRFIgKGJtMikp LCAhTklMUCAoYm0yKSkKKyAgICAgIHsKKyAgICAgICAgaWYgKENPTlNQIChibTIpKQorICAgIHsK KyAgICAgIGxuMiA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMikpOworICAgICAgaWYgKHBhcnRpYWxf cCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChsbjIgPiBpeDIpCisgICAgICB7CisgICAgICAg IGJtID0gbWNfbnRoIChpeDIsIGJtMik7CisgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAg ICAgICAgZ290byBmb3VuZDsKKyAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgICAgIH0KKyAg fQorICAgIH0KKyAgaWYgKGxuMSA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IG1jX250aCAoaXgx LCBibTEpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgZ290byBmb3VuZDsKKyAgICB9Cisg IGlmIChsbjIgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0yKTsKKyAg ICAgIGlmICghRVEgKGJtLCBRdCkpCisgIGdvdG8gZm91bmQ7CisgICAgICByZXR1cm4gTUNfTk9f RlJJTkdFX0JJVE1BUDsKKyAgICB9CisgIGVsc2UgaWYgKChibSA9IGJtMiwgTklMUCAoYm0pKSkK KyAgICBy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CBj bWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgo Ym0xID0gWENEUiAoYm0xKSksIE5JTFAgKGJtMSkpCisgICAgICAgICAgICByZXR1cm4gTUNfTk9f RlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICBpZiAoQ09OU1AgKGJtMSkpCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGxuMSA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMSkpOworICAgICAgICAg ICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg IGlmIChsbjEgPiBpeDIpCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg ICAgICBibSA9IG1jX250aCAoaXgyLCBibTEpOworICAgICAgICAgICAgICAgICAgICAgIGlmICgh RVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4MSkKKyAgICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMSk7 CisgICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAg ICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZSBpZiAoKGJtID0gYm0xLCAhRVEgKGJtLCBR dCkpKQorICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYgKCFF USAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkp CisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRv cl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IG1jX2Fzc3EgKGJpdG1hcCwgQlZBUiAoJmJ1 ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpOworICAgICAgaWYgKENPTlNQ IChibTIpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibTIgPSBYQ0RSIChibTIpKSwgIU5J TFAgKGJtMikpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChDT05TUCAoYm0yKSkK KyAgICAgICAgICB7CisgICAgICAgICAgICBsbjIgPSBYRklYTlVNIChGbGVuZ3RoIChibTIpKTsK KyAgICAgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICBpZiAobG4yID4gaXgyKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBibSA9IG1j X250aCAoaXgyLCBibTIpOworICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAg ICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChsbjEgPiBp eDEpCisgICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgIGlmICghRVEg KGJtLCBRdCkpCisgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAobG4yID4gaXgxKQorICAgIHsK KyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQor ICAgICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7Cisg ICAgfQorICAgIGVsc2UgaWYg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RfaW5kX21heF95Owor ICAvKiB0b3BfaW5kX3JuIGlzIHNldCB0byBhIG5vbm5lZ2F0aXZlIHZhbHVlIHdoZW5ldmVyCisg ICAgIHJvdy0+aW5kaWNhdGVfYm9iX3AgaXMgc2V0LCBzbyBpdCdzIE9LIHRoYXQgdG9wX3Jvd19l bmRzX2F0X3p2X3AKKyAgICAgaXMgbm90IGluaXRpYWxpemVkIGhlcmUuICBTaW1pbGFybHkgZm9y IGJvdF9pbmRfcm4sCisgICAgIHJvdy0+aW5kaWNhdGVfZW9iX3AgYW5kIGJvdF9yb3dfZW5kc19h dF96dl9wLiAgKi8KKyAgaW50IHRvcF9yb3dfZW5kc19hdF96dl9wIE1DX0lGX0xJTlQgKD0gMCks IGJvdF9yb3dfZW5kc19hdF96dl9wIE1DX0lGX0xJTlQgKD0gMCk7CisgIGlmICh3LT5wc2V1ZG9f d2luZG93X3ApCisgICAgcmV0dXJuIDA7CisgIGlmICghTUlOSV9XSU5ET1dfUCAodykKKyAgICAg ICYmIChpbmQgPSBCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGluZGljYXRlX2J1ZmZlcl9i b3VuZGFyaWVzKSwgIU5JTFAgKGluZCkpKQorICAgIHsKKyAgICAgIGlmIChFUSAoaW5kLCBRbGVm dCkgfHwgRVEgKGluZCwgUXJpZ2h0KSkKKyAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlf Ym90ID0gYXJyb3dfdG9wID0gYXJyb3dfYm90ID0gaW5kOworICAgICAgZWxzZSBpZiAoQ09OU1Ag KGluZCkKKyAgICAgICAgICAgICAgICYmIENPTlNQIChYQ0FSIChpbmQpKSkKKyAgICAgICAgewor ICAgICAgICAgIExpc3BfT2JqZWN0IHBvczsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAo UXQsIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRh cnlfYm90ID0gYXJyb3dfdG9wID0gYXJyb3dfYm90ID0gWENEUiAocG9zKTsKKyAgICAgICAgICBp ZiAocG9zID0gbWNfYXNzcSAoUXRvcCwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBi b3VuZGFyeV90b3AgPSBYQ0RSIChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChR Ym90dG9tLCBpbmQpLCAhTklMUCAocG9zKSkKKyAgICAgICAgICAgIGJvdW5kYXJ5X2JvdCA9IFhD RFIgKHBvcyk7CisgICAgICAgICAgaWYgKHBvcyA9IG1jX2Fzc3EgKFF1cCwgaW5kKSwgIU5JTFAg KHBvcykpCisgICAgICAgICAgICBhcnJvd190b3AgPSBYQ0RSIChwb3MpOworICAgICAgICAgIGlm IChwb3MgPSBtY19hc3NxIChRZG93biwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBh cnJvd19ib3QgPSBYQ0RSIChwb3MpOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIC8q IEFueXRoaW5nIGVsc2UgbWVhbnMgYm91bmRhcnkgb24gbGVmdCBhbmQgbm8gYXJyb3dzLiAgKi8K KyAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90ID0gUWxlZnQ7CisgICAgfQorICB0 b3BfaW5kX3JuID0gYm90X2luZF9ybiA9IC0xOworICBpZiAoIU5JTFAgKGluZCkpCisgICAgewor ICAgICAgZm9yICh5ID0gdy0+dnNjcm9sbCwgcm4gPSAwOworICAgICAgICAgICB5IDwgeWIgJiYg cm4gPCBucm93czsKKyAgICAgICAgICAgeSArPSByb3ctPmhlaWdodCwgKytybikKKyAgICAgICAg eworICAgICAgICAgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAg ICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIHJvdyA9IHctPmN1cnJlbnRfbWF0 cml4LT5yb3dzICsgcm47CisgICAgICAgICAgcm93LT5pbmRpY2F0ZV9ib2JfcCA9IHJvdy0+aW5k aWNhdGVfdG9wX2xpbmVfcCA9IDA7CisgICAgICAgICAgcm93LT5pbmRpY2F0ZV9lb2JfcCA9IHJv dy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCA9IDA7CisgICAgICAgICAgaWYgKCFyb3ctPm1vZGVf bGluZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAodG9wX2luZF9ybiA8IDAg JiYgcm93LT52aXNpYmxlX2hlaWdodCA+IDApCisgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgaWYgKE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KSA8PSBCVUZfQkVHViAo WEJVRkZFUiAody0+Y29udGVudHMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFNQVRSSVhf Uk9XX1BBUlRJQUxMWV9WSVNJQkxFX0FUX1RPUF9QICh3LCByb3cpKQorICAgICAgICAgICAgICAg ICAgICByb3ctPmluZGljYXRlX2JvYl9wID0gIU5JTFAgKGJvdW5kYXJ5X3RvcCk7CisgICAgICAg ICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5kaWNhdGVfdG9wX2xp bmVfcCA9ICFOSUxQIChhcnJvd190b3ApOworICAgICAgICAgICAgICAgICAgdG9wX2luZF9ybiA9 IHJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfcm4gPCAw KQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmIChNQVRSSVhfUk9XX0VO RF9DSEFSUE9TIChyb3cpID49IEJVRl9aViAoWEJVRkZFUiAody0+Y29udGVudHMpKQorICAgICAg ICAgICAgICAgICAgICAgICYmICFNQVRSSVhfUk9XX1BBUlRJQUxMWV9WSVNJQkxFX0FUX0JPVFRP TV9QICh3LCByb3cpKQorICAgICAgICAgICAgICAgICAgICByb3ctPmluZGljYXRlX2VvYl9wID0g I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0KzIrcGFydGlhbF9wXSA+PSAwCQkJXAorICAgPyBiaXRtYXBfY2Fj aGVbY2FjaGUqNCsyK3BhcnRpYWxfcF0JCQkJXAorICAgOiAoYml0bWFwX2NhY2hlW2NhY2hlKjQr MitwYXJ0aWFsX3BdID0JCQlcCisgICAgICBtY19nZXRfbG9naWNhbF9mcmluZ2VfYml0bWFwICh3 LCB3aGljaCwgMSwgcGFydGlhbF9wKSkpCisgIC8qIEV4dGVuZCB0b3AtYWxpZ25lZCB0b3AgaW5k aWNhdG9yIChvciBib3R0b20tYWxpZ25lZCBib3R0b20KKyAgICAgaW5kaWNhdG9yKSB0byBhZGph Y2VudCByb3dzIGlmIGl0IGRvZXNuJ3QgZml0IGluIG9uZSByb3cuICAqLworICB0b3BfaW5kX21p bl95ID0gYm90X2luZF9tYXhfeSA9IC0xOworICBpZiAodG9wX2luZF9ybiA+PSAwKQorICAgIHsK KyAgICAgIGludCBibiA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICByb3cgPSB3LT5kZXNp cmVkX21hdHJpeC0+cm93cyArIHRvcF9pbmRfcm47CisgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9w KQorICAgICAgICByb3cgPSB3LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHRvcF9pbmRfcm47Cisg ICAgICB0b3Bfcm93X2VuZHNfYXRfenZfcCA9IHJvdy0+ZW5kc19hdF96dl9wOworICAgICAgaWYg KHJvdy0+aW5kaWNhdGVfYm9iX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAoRVEgKGJvdW5k YXJ5X3RvcCwgUWxlZnQpKQorICAgICAgICAgICAgYm4gPSAoKHJvdy0+aW5kaWNhdGVfZW9iX3Ag JiYgRVEgKGJvdW5kYXJ5X2JvdCwgUWxlZnQpKQorICAgICAgICAgICAgPyBNQ19MRUZUX0ZSSU5H RSAoMSwgUXRvcF9ib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKQorICAgICAgICAgICAgOiBNQ19M RUZUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOworICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGJu ID0gKChyb3ctPmluZGljYXRlX2VvYl9wICYmIEVRIChib3VuZGFyeV9ib3QsIFFyaWdodCkpCisg ICAgICAgICAgICA/IE1DX1JJR0hUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20sIHJvdy0+ZW5kc19h dF96dl9wKQorICAgICAgICAgICAgOiBNQ19SSUdIVF9GUklOR0UgKDIsIFF0b3AsIDApKTsKKyAg ICAgICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV90b3BfbGluZV9wKQorICAgICAg ICB7CisgICAgICAgICAgaWYgKEVRIChhcnJvd190b3AsIFFsZWZ0KSkKKyAgICAgICAgICAgIGJu ID0gTUNfTEVGVF9GUklOR0UgKDYsIFF1cCwgMCk7CisgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDYsIFF1cCwgMCk7CisgICAgICAgIH0KKyAgICAgIGlm IChibiAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0 IGZyaW5nZV9iaXRtYXAgKmZiID0gZ2V0X2ZyaW5nZV9iaXRtYXBfZGF0YSAoYm4pOworICAgICAg ICAgIGlmIChmYi0+YWxpZ24gPT0gQUxJR05fQklUTUFQX1RPUCAmJiBmYi0+cGVyaW9kID09IDAp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdzE7Cisg ICAgICAgICAgICAgIGludCB0b3BfaW5kX21heF95OworICAgICAgICAgICAgICB0b3BfaW5kX21p bl95ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgICAgIHRvcF9p bmRfbWF4X3kgPSB0b3BfaW5kX21pbl95ICsgZmItPmhlaWdodDsKKyAgICAgICAgICAgICAgaWYg KHRvcF9pbmRfbWF4X3kgPiB5YikKKyAgICAgICAgICAgICAgICB0b3BfaW5kX21heF95ID0geWI7 CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSArIHJvdy0+aGVpZ2h0LCBybiA9IHRvcF9p bmRfcm4gKyAxOworICAgICAgICAgICAgICAgICAgIHkgPCB0b3BfaW5kX21heF95ICYmIHJuIDwg bnJvd3M7CisgICAgICAgICAgICAgICAgICAgeSArPSByb3cxLT5oZWlnaHQsIHJuKyspCisgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfcm4gPj0gMCAmJiBy biA+PSBib3RfaW5kX3JuKQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAg ICAgICAgIHJvdzEgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgICAg ICAgICAgaWYgKCFyb3cxLT5lbmFibGVkX3ApCisgICAgICAgICAgICAgICAgICAgIHJvdzEgPSB3 LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgICAgICAgICAgcm93MS0+aW5k aWNhdGVfYm9iX3AgPSByb3ctPmluZGljYXRlX2JvYl9wOworICAgICAgICAgICAgICAgICAgcm93 MS0+aW5kaWNhdGVfdG9wX2xpbmVfcCA9IHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcDsKKyAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChib3Rf aW5kX3JuID49IDApCisgICAgeworICAgICAgaW50IGJuID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsK KyAgICAgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgYm90X2luZF9ybjsKKyAgICAg IGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgIHJvdyA9IHctPmN1cnJlbnRfbWF0cml4LT5y b3dzICsgYm90X2luZF9ybjsKKyAgICAgIGJvdF9yb3dfZW5kc19hdF96dl9wID0gcm93LT5lbmRz X2F0X3p2X3A7CisgICAgICBpZiAocm93LT5pbmRpY2F0ZV9lb2JfcCkKKyAgICAgICAgeworICAg ICAgICAgIGlmIChFUSAoYm91bmRhcnlfYm90LCBRbGVmdCkpCisgICAgICAgICAgICBibiA9IE1D X0xFRlRfRlJJTkdFICgzLCBRYm90dG9tLCByb3ctPmVuZHNfYXRfenZfcCk7CisgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDMsIFFib3R0b20sIHJvdy0+ ZW5kc19hdF96dl9wKTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9i b3R0b21fbGluZV9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKEVRIChhcnJvd19ib3QsIFFs ZWZ0KSkKKyAgICAgICAgICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAg ICAgICAgICBlbHNlCisgICAgICAgICAgICBibiA9IE1DX1JJR0hUX0ZSSU5HRSAoNywgUWRvd24s IDApOworICAgICAgICB9CisgICAgICBpZiAoYm4gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAg ICAgICAgeworICAgICAgICAgIHN0cnVjdCBmcmluZ2VfYml0bWFwICpmYiA9IGdldF9mcmluZ2Vf Yml0bWFwX2RhdGEgKGJuKTsKKyAgICAgICAgICBpZiAoZmItPmFsaWduID09IEFMSUdOX0JJVE1B UF9CT1RUT00gJiYgZmItPnBlcmlvZCA9PSAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cxOworICAgICAgICAgICAgICBpbnQgYm90X2luZF9taW5f eTsKKyAgICAgICAgICAgICAgYm90X2luZF9tYXhfeSA9IHJvdy0+eSArIHJvdy0+dmlzaWJsZV9o ZWlnaHQ7CisgICAgICAgICAgICAgIGJvdF9pbmRfbWluX3kgPSBib3RfaW5kX21heF95IC0gZmIt PmhlaWdodDsKKyAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfbWluX3kgPCBXSU5ET1dfSEVBREVS X0xJTkVfSEVJR0hUICh3KSkKKyAgICAgICAgICBib3RfaW5kX21pbl95ID0gV0lORE9XX0hFQURF Ul9MSU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSwgcm4gPSBi b3RfaW5kX3JuIC0gMTsKKyAgICAgICAgICAgICB5ID49IGJvdF9pbmRfbWluX3kgJiYgcm4gPj0g MDsKKyAgICAgICAgICAgICB5IC09IHJvdzEtPmhlaWdodCwgcm4tLSkKKyAgICAgICAgICB7Cisg ICAgICAgICAgICBpZiAodG9wX2luZF9ybiA+PSAwICYmIHJuIDw9IHRvcF9pbmRfcm4pCisgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgcm93MSA9IHctPmRlc2lyZWRfbWF0cml4LT5y b3dzICsgcm47CisgICAgICAgICAgICBpZiAoIXJvdzEtPmVuYWJsZWRfcCkKKyAgICAgICAgICAg ICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICByb3cx LT5pbmRpY2F0ZV9lb2JfcCA9IHJvdy0+aW5kaWNhdGVfZW9iX3A7CisgICAgICAgICAgICByb3cx LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wID0gcm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wOwor ICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgTGlzcF9PYmpl Y3QgYnVmID0gdy0+Y29udGVudHM7CisgIENIRUNLX0JVRkZFUiAoYnVmKTsKKyAgYm9vbCBhdXRv X2hzY3JvbGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRvX2hzY3JvbGxf bW9kZSwgYnVmKSwgUWN1cnJlbnRfbGluZSk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQg NSkgKi8KKyAgYm9vbCBoc2NsX2FsbF90ZW1wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3JvbGwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXgg PCBhbmQgZG8gbm90aGluZy4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzBfcCA9ICh3LT5zdXNw ZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNj cm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHctPmhzY3JvbGwp OworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgZWxzZSBiZXNpZGVz IGhvcml6b250YWxseSBzY3JvbGxpbmcgdGhlCisgICAgICAgICAgICAgICBjdXJyZW50IGxpbmUg ZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9yaXpv bnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMV9w ID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Ny b2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09 IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCAuLi4KKyAgICAgICAg ICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVy ZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8yX3AgPSAoIXctPnN1c3BlbmRfYXV0b19o c2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPT0gMAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwpOworICAvKiBF WEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpOyBhbmQsIHRoZW4gcHJlc3MgdGhlIGxlZnQgYXJyb3cg a2V5IG9uZSB0aW1lLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18gaG9yaXpvbnRh bGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiovCisgIGJvb2wgaHNjbF90ZW1wX3AgPSAoIXctPnN1 c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xs X21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAg ICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6ICBD LXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyB0aGF0IGNhdXNlcyB0aGUgY3VycmVudCBsaW5lIHRv IGJlCisgICAgICAgICAgICAgICBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuCisg ICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlm ZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9wZXJtX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Ny b2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hz Y3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJh bWUpOworICBmb3IgKHkgPSB3LT52c2Nyb2xsLCBybiA9IDA7CisgICAgICAgeSA8IHliICYmIHJu IDwgbnJvd3M7CisgICAgICAgeSArPSByb3ctPmhlaWdodCwgcm4rKykKKyAgICB7CisgIGludCBs ZWZ0LCByaWdodDsKKyAgdW5zaWduZWQgbGVmdF9mYWNlX2lkLCByaWdodF9mYWNlX2lkOworICBp bnQgbGVmdF9vZmZzZXQsIHJpZ2h0X29mZnNldDsKKyAgYm9vbCBwZXJpb2RpY19wOworICByb3cg PSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJuOworICBjdXIgPSB3LT5jdXJyZW50X21hdHJp eC0+cm93cyArIHJuOworICBpbnQgdnBvc19kZXNpcmVkID0gTUFUUklYX1JPV19WUE9TICh3LT5k ZXNpcmVkX21hdHJpeC0+cm93cyArIHJuLCB3LT5kZXNpcmVkX21hdHJpeCk7CisgIGludCB2cG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tcF9wCisgICAgICAgICAgJiYgIWhzY2xf dGVtcF9wCisgICAgICAgICAgJiYgIWhzY2xfcGVybV9wCisgICAgICAgICAgJiYgIWhzY2xfYWxs X3Blcm1fMF9wCisgICAgICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMV9wCisgICAgICAgICAgJiYg IWhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgJiYgZW5hYmxlZF9wKQorICAgICAgICB7Cisg ICAgICAgICAgaW50IGZyaW5nZV9iaXRtYXAgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAg ICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQgPQorICAgICAgICAgICAgKCFh Y3RpdmVfcAorICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICAgICAgID8gbG9va3VwX25hbWVkX2Zh Y2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1pbmFjdGl2ZS1mYWNlIiksIHRydWUp CisgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRf ZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWZhY2UiKSwgdHJ1ZSkKKyAgICAg ICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2ZhY2Vf aWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAg IGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0 X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJvdyIpLCBmYWxzZSwgdHJ1 ZSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19n ZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFycm93IiksIHRydWUsIHRy dWUpOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBN Q19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1D X05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoKHZwb3MgPT0g dnBvc19kZXNpcmVkIHx8IHZwb3MgPT0gdnBvc19jdXJyZW50KQorICAgICAgICAgICAgICAgICAm JiBnbHlwaF9mbGF2b3IgPT0gTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAKKyAgICAgICAgICAgICAg ICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxf cGVybV8wX3AKKyAgICAgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMV9wCisgICAg ICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICAgICAgICAg ICAgfHwgaHNjbF90ZW1wX3AKKyAgICAgICAgICAgICAgICAgICAgIHx8IGhzY2xfcGVybV9wKQor ICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgeworICAgICAgICAgICAg aW50IGZyaW5nZV9iaXRtYXAgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgICAgZW51 bSBmYWNlX2lkIG92ZXJsYXlfYXJyb3dfZmFjZV9pZCA9CisgICAgICAgICAgICAgICghYWN0aXZl X3AKKyAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNoX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3RpdmUtZmFjZSIpLCB0 cnVlKQorICAgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICA/IGxvb2t1 cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1mYWNlIiks IHRydWUpCisgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgICAgbWNf bGVmdF9mcmluZ2VfZmFjZV9pZCA9IChjdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRN QVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gb3ZlcmxheV9hcnJv d19mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVM VF9GQUNFX0lEOworICAgICAgICAgICAgaWYgKGhzY2xfYWxsX3Blcm1fMF9wKQorICAgICAgICAg ICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIist aHNjbC1wZXJtIiksIGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xf YWxsX3Blcm1fMV9wKQorICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJp bmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgZmFsc2UpOworICAg ICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3Blcm1fMl9wKQorICAgICAgICAgICAgICAg ICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhz Y2wtcGVybSIpLCBmYWxzZSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICBlbHNlIGlmIChoc2Ns X3Blcm1fcCkKKyAgICAgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmlu Z2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCB0cnVlLCB0cnVlKTsKKyAgICAg ICAgICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9hbGxfdGVtcF9wKQorICAgICAgICAgICAgICAg ICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgi Ky1oc2NsLXRlbXAiKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICAgICAgICBlbHNl IGlmIChoc2NsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAg PSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXRlbXAiKSwgdHJ1ZSwg ZmFsc2UpOworICAgICAgICAgICAgbWNfbGVmdF9mcmluZ2VfYml0bWFwID0gKGN1cnNvcl90eXBl ID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2Ug aWYgKCh2cG9zID09IHZwb3NfZGVzaXJlZCB8fCB2cG9zID09IHZwb3NfY3VycmVudCkKKyAgICAg ICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJ R0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAgICAg ICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGds eXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAg ICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQor ICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1DX0hP TExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3Rhbmds ZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JF VkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fy cm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9m bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1j X3JldmVyc2VkX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2Fs X2Jhcl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogUW5pbDsKKyAgICAgICAgICAgICAgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3Jf dHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2b3IpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklU TUFQOworICAgICAgICAgICAgICBtY19yaWdodF9mcmluZ2VfZmFjZV9pZCA9CisgICAgICAgICAg ICAgICAgKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAg ICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJ R0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVW RVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICB8fCBn bHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKSkKKyAgICAgICAgICAgICAg ICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVyb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fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgeworICAgICAgICAgIGxlZnQgPSBy b3ctPmxlZnRfdXNlcl9mcmluZ2VfYml0bWFwOworICAgICAgICAgIGxlZnRfZmFjZV9pZCA9IHJv dy0+bGVmdF91c2VyX2ZyaW5nZV9mYWNlX2lkOworICAgICAgICB9CisgICAgICBlbHNlIGlmICgo IXJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPnRydW5jYXRlZF9vbl9sZWZ0X3ApCisgICAgICAgICAg ICAgICB8fCAocm93LT5yZXZlcnNlZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApKQor ICAgICAgICBsZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDAsIFF0cnVuY2F0aW9uLCAwKTsKKyAgICAg IGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm9iX3AgJiYgRVEgKGJvdW5kYXJ5X3RvcCwgUWxlZnQp KQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9ICgocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBF USAoYm91bmRhcnlfYm90LCBRbGVmdCkpCisgICAgICAgICAgICAgICAgID8gTUNfTEVGVF9GUklO R0UgKDEsIFF0b3BfYm90dG9tLCB0b3Bfcm93X2VuZHNfYXRfenZfcCkKKyAgICAgICAgICAgICAg ICAgOiBNQ19MRUZUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOworICAgICAgICAgIGlmICh0b3BfaW5k X21pbl95ID49IDApCisgICAgICAgICAgICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kgLSBy b3ctPnk7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW9iX3AgJiYg RVEgKGJvdW5kYXJ5X2JvdCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9IE1D X0xFRlRfRlJJTkdFICgzLCBRYm90dG9tLCBib3Rfcm93X2VuZHNfYXRfenZfcCk7CisgICAgICAg ICAgaWYgKGJvdF9pbmRfbWF4X3kgPj0gMCkKKyAgICAgICAgICAgIGxlZnRfb2Zmc2V0ID0gYm90 X2luZF9tYXhfeSAtIChyb3ctPnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQor ICAgICAgZWxzZSBpZiAoKCFyb3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJ T05fTElORV9QIChyb3cpKQorICAgICAgICAgICAgICAgfHwgKHJvdy0+cmV2ZXJzZWRfcCAmJiBy b3ctPmNvbnRpbnVlZF9wKSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg0LCBRY29u dGludWF0aW9uLCAwKTsKKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW1wdHlfbGluZV9w ICYmIEVRIChlbXB0eV9wb3MsIFFsZWZ0KSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdF ICg1LCBRZW1wdHlfbGluZSwgMCk7CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9s aW5lX3AgJiYgRVEgKGFycm93X3RvcCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVm dCA9IE1DX0xFRlRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5kX21p bl95ID49IDApCisgICAgICAgICAgICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kgLSByb3ct Pnk7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVf cCAmJiBFUSAoYXJyb3dfYm90LCBRbGVmdCkpCisgICAgICAgIHsKKyAgICAgICAgICBsZWZ0ID0g TUNfTEVGVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICBpZiAoYm90X2luZF9tYXhf eSA+PSAwKQorICAgICAgICAgICAgbGVmdF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+ eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAg IGxlZnQgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgLyogRGVjaWRlIHdoaWNoIGJpdG1h cCB0byBkcmF3IGluIHRoZSByaWdodCBmcmluZ2UuICAqLworICAgICAgaWYgKFdJTkRPV19SSUdI VF9GUklOR0VfV0lEVEggKHcpID09IDApCisgICAgICAgIHJpZ2h0ID0gTUNfTk9fRlJJTkdFX0JJ VE1BUDsKKyAgICAgIGVsc2UgaWYgKHJvdy0+cmlnaHRfdXNlcl9mcmluZ2VfYml0bWFwICE9IE1D X05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IHJvdy0+cmln aHRfdXNlcl9mcmluZ2VfYml0bWFwOworICAgICAgICAgIHJpZ2h0X2ZhY2VfaWQgPSByb3ctPnJp Z2h0X3VzZXJfZnJpbmdlX2ZhY2VfaWQ7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKCghcm93 LT5yZXZlcnNlZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAg ICB8fCAocm93LT5yZXZlcnNlZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCkpCisgICAg ICAgIHJpZ2h0ID0gTUNfUklHSFRfRlJJTkdFICgwLCBRdHJ1bmNhdGlvbiwgMCk7CisgICAgICBl bHNlIGlmIChyb3ctPmluZGljYXRlX2JvYl9wICYmIEVRIChib3VuZGFyeV90b3AsIFFyaWdodCkp CisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9ICgocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBF USAoYm91bmRhcnlfYm90LCBRcmlnaHQpKQorICAgICAgICAgICAgID8gTUNfUklHSFRfRlJJTkdF ICgxLCBRdG9wX2JvdHRvbSwgdG9wX3Jvd19lbmRzX2F0X3p2X3ApCisgICAgICAgICAgICAgOiBN Q19SSUdIVF9GUklOR0UgKDIsIFF0b3AsIDApKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5f eSA+PSAwKQorICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+ eTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAo Ym91bmRhcnlfYm90LCBRcmlnaHQpKQorICAgICAgICB7CisgICAgICAgICAgcmlnaHQgPSBNQ19S SUdIVF9GUklOR0UgKDMsIFFib3R0b20sIGJvdF9yb3dfZW5kc19hdF96dl9wKTsKKyAgICAgICAg ICBpZiAoYm90X2luZF9tYXhfeSA+PSAwKQorICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gYm90 X2luZF9tYXhfeSAtIChyb3ctPnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQor ICAgICAgZWxzZSBpZiAoKCFyb3ctPnJldmVyc2VkX3AgJiYgcm93LT5jb250aW51ZWRfcCkKKyAg ICAgICAgICAgICAgIHx8IChyb3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJ T05fTElORV9QIChyb3cpKSkKKyAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0UgKDQsIFFj b250aW51YXRpb24sIDApOworICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV90b3BfbGluZV9w ICYmIEVRIChhcnJvd190b3AsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9 IE1DX1JJR0hUX0ZSSU5HRSAoNiwgUXVwLCAwKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5f eSA+PSAwKQorICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+ eTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9w ICYmIEVRIChhcnJvd19ib3QsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9 IE1DX1JJR0hUX0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgIGlmIChib3RfaW5kX21h eF95ID49IDApCisgICAgICAgICAgICByaWdodF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJv dy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlIGlmIChy b3ctPmluZGljYXRlX2VtcHR5X2xpbmVfcCAmJiBFUSAoZW1wdHlfcG9zLCBRcmlnaHQpKQorICAg ICAgICByaWdodCA9IE1DX1JJR0hUX0ZSSU5HRSAoNSwgUWVtcHR5X2xpbmUsIDApOworICAgICAg ZWxzZQorICAgICAgICByaWdodCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICBwZXJpb2Rp Y19wID0gKGdldF9mcmluZ2VfYml0bWFwX2RhdGEgKGxlZnQpLT5wZXJpb2QgIT0gMAorICAgICAg ICAgICAgICAgICAgICB8fCBnZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChyaWdodCktPnBlcmlvZCAh PSAwKTsKKyAgICAgIGlmIChyb3ctPnkgIT0gY3VyLT55CisgICAgICAgICAgfHwgcm93LT52aXNp YmxlX2hlaWdodCAhPSBjdXItPnZpc2libGVfaGVpZ2h0CisgICAgICAgICAgfHwgcm93LT5lbmRz X2F0X3p2X3AgIT0gY3VyLT5lbmRzX2F0X3p2X3AKKyAgICAgICAgICB8fCBsZWZ0ICE9IGN1ci0+ bGVmdF9mcmluZ2VfYml0bWFwCisgICAgICAgICAgfHwgcmlnaHQgIT0gY3VyLT5yaWdodF9mcmlu Z2VfYml0bWFwCisgICAgICAgICAgfHwgbGVmdF9mYWNlX2lkICE9IGN1ci0+bGVmdF9mcmluZ2Vf ZmFjZV9pZAorICAgICAgICAgIHx8IHJpZ2h0X2ZhY2VfaWQgIT0gY3VyLT5yaWdodF9mcmluZ2Vf ZmFjZV9pZAorICAgICAgICAgIHx8IGxlZnRfb2Zmc2V0ICE9IGN1ci0+bGVmdF9mcmluZ2Vfb2Zm c2V0CisgICAgICAgICAgfHwgcmlnaHRfb2Zmc2V0ICE9IGN1ci0+cmlnaHRfZnJpbmdlX29mZnNl dAorICAgICAgICAgIHx8IHBlcmlvZGljX3AgIT0gY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGlj X3AKKyAgICAgICAgICB8fCBjdXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wKQorICAgICAgICB7 CisgICAgICAgICAgcmVkcmF3X3AgPSAxLCByb3ctPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0g MTsKKyAgICAgICAgICBpZiAoIWtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBjdXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICAgICAg aWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAg ICAgICAgICAgICB8fCBtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRN QVApCisgICAgICAgICAgICAgICAgY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxz ZTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmZyaW5nZV9i aXRtYXBfcGVyaW9kaWNfcCA9IHBlcmlvZGljX3A7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0 X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBj dXItPmxlZnRfZnJpbmdlX2JpdG1hcCA9IG1jX2xlZnRfZnJpbmdlX2JpdG1hcDsKKyAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2JpdG1hcCA9 IGxlZnQ7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9f RlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2ZhY2VfaWQg PSBtY19sZWZ0X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2VfZmFjZV9pZCA9IGxlZnRfZmFjZV9pZDsKKyAgICAg ICAgICAgICAgaWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQ KQorICAgICAgICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX29mZnNldCA9 IGxlZnRfb2Zmc2V0OworICAgICAgICAgICAgICBpZiAobWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAh PSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdl X2JpdG1hcCA9IG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfYml0bWFwID0gcmlnaHQ7CisgICAg ICAgICAgICAgIGlmIChtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRN QVApCisgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IG1jX3JpZ2h0 X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAg IGN1ci0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQgPSByaWdodF9mYWNlX2lkOworICAgICAgICAgICAg ICBpZiAobWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAg ICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gcmln aHRfb2Zmc2V0OworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocm93LT5vdmVy bGF5X2Fycm93X2JpdG1hcCA8IDApCisgICAgICAgIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAg PSBtY19nZXRfbG9naWNhbF9mcmluZ2VfYml0bWFwICh3LCBRb3ZlcmxheV9hcnJvdywgMCwgMCk7 CisgICAgICBpZiAocm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCAhPSBjdXItPm92ZXJsYXlfYXJy b3dfYml0bWFwKQorICAgICAgICB7CisgICAgICAgICAgcmVkcmF3X3AgPSAxLCByb3ctPnJlZHJh d19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICBpZiAoIWtlZXBfY3VycmVudF9wKQor ICAgICAgICAgICAgeworICAgICAgICAgICAgICBjdXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19w ID0gMTsKKyAgICAgICAgICAgICAgY3VyLT5vdmVybGF5X2Fycm93X2JpdG1hcCA9IHJvdy0+b3Zl cmxheV9hcnJvd19iaXRtYXA7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmICht Y19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUAorICAgICAgICAgIHx8 IG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1B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XksIGludCB3aGljaCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZS QU1FIChXSU5ET1dfRlJBTUUgKHcpKTsKKyAgc3RydWN0IGRyYXdfZnJpbmdlX2JpdG1hcF9wYXJh bXMgcDsKKyAgc3RydWN0IGZyaW5nZV9iaXRtYXAgKmZiOworICBpbnQgcGVyaW9kOworICBpbnQg ZmFjZV9pZCA9IERFRkFVTFRfRkFDRV9JRDsKKyAgaW50IG9mZnNldCwgaGVhZGVyX2xpbmVfaGVp Z2h0OworICBwLm92ZXJsYXlfcCA9IChvdmVybGF5ICYgMSkgPT0gMTsKKyAgcC5jdXJzb3JfcCA9 IChvdmVybGF5ICYgMikgPT0gMjsKKyAgaWYgKHdoaWNoICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAp CisgICAgeworICAgICAgb2Zmc2V0ID0gMDsKKyAgICB9CisgICAgZWxzZSBpZiAobGVmdF9wKQor ICAgICAgeworICAgICAgICB3aGljaCA9IHJvdy0+bGVmdF9mcmluZ2VfYml0bWFwOworICAgICAg ICBmYWNlX2lkID0gcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICBvZmZzZXQgPSBy b3ctPmxlZnRfZnJpbmdlX29mZnNldDsKKyAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgewor ICAgICAgICAgIHdoaWNoID0gcm93LT5yaWdodF9mcmluZ2VfYml0bWFwOworICAgICAgICAgIGZh Y2VfaWQgPSByb3ctPnJpZ2h0X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICAgIG9mZnNldCA9IHJv dy0+cmlnaHRfZnJpbmdlX29mZnNldDsKKyAgICAgICAgfQorICBpZiAoZmFjZV9pZCA9PSBERUZB VUxUX0ZBQ0VfSUQpCisgICAgeworICAgICAgTGlzcF9PYmplY3QgZmFjZSA9IGZyaW5nZV9mYWNl c1t3aGljaF07CisgICAgICBmYWNlX2lkID0gTklMUCAoZmFjZSkgPyBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgUWZyaW5nZSwgZmFsc2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBs b29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBmYWNlLCBGUklOR0VfRkFDRV9JRCwgMCk7CisgICAg ICBpZiAoZmFjZV9pZCA8IDApCisgICAgICAgIGZhY2VfaWQgPSBGUklOR0VfRkFDRV9JRDsKKyAg ICB9CisgIGZiID0gZ2V0X2ZyaW5nZV9iaXRtYXBfZGF0YSAod2hpY2gpOworICBwZXJpb2QgPSBm Yi0+cGVyaW9kOworICAvKiBDb252ZXJ0IHJvdyB0byBmcmFtZSBjb29yZGluYXRlcy4gICovCisg IHAueSA9IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpICsgb2Zmc2V0OworICBw LndoaWNoID0gd2hpY2g7CisgIHAuYml0cyA9IGZiLT5iaXRzOworICBwLndkID0gZmItPndpZHRo OworICBwLmggPSBmYi0+aGVpZ2h0OworICBwLmRoID0gKHBlcmlvZCA+IDAgPyAocC55ICUgcGVy aW9kKSA6IDApOworICBwLmggLT0gcC5kaDsKKyAgLyogQWRqdXN0IHkgdG8gdGhlIG9mZnNldCBp biB0aGUgcm93IHRvIHN0YXJ0IGRyYXdpbmcgdGhlIGJpdG1hcC4gICovCisgIHN3aXRjaCAoZmIt PmFsaWduKQorICAgIHsKKyAgICBjYXNlIEFMSUdOX0JJVE1BUF9DRU5URVI6CisgICAgICBwLnkg Kz0gKHJvdy0+aGVpZ2h0IC0gcC5oKSAvIDI7CisgICAgICBicmVhazsKKyAgICBjYXNlIEFMSUdO X0JJVE1BUF9CT1RUT006CisgICAgICBwLnkgKz0gKHJvdy0+dmlzaWJsZV9oZWlnaHQgLSBwLmgp OworICAgICAgYnJlYWs7CisgICAgY2FzZSBBTElHTl9CSVRNQVBfVE9QOgorICAgICAgYnJlYWs7 CisgICAgfQorICBwLmZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGZhY2VfaWQpOworICBpZiAocC5m YWNlID09IE5VTEwpCisgICAgeworICAgICAgLyogVGhpcyBjb3VsZCBoYXBwZW4gYWZ0ZXIgY2xl YXJpbmcgZmFjZSBjYWNoZS4KKyAgIEJ1dCBpdCBzaG91bGRuJ3QgaGFwcGVuIGFueW1vcmUuICAr K2tmcyAqLworICAgICAgcmV0dXJuOworICAgIH0KKyAgcHJlcGFyZV9mYWNlX2Zvcl9kaXNwbGF5 IChmLCBwLmZhY2UpOworICAvKiBDbGVhciBsZWZ0IGZyaW5nZSBpZiBubyBiaXRtYXAgdG8gZHJh dyBvciBpZiBiaXRtYXAgZG9lc24ndCBmaWxsCisgICAgIHRoZSBmcmluZ2UuICAqLworICBwLmJ4 ID0gLTE7CisgIGhlYWRlcl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQg KHcpOworICBwLmJ5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIG1heCAoaGVhZGVyX2xp bmVfaGVpZ2h0LCByb3ctPnkpKTsKKyAgcC5ueSA9IHJvdy0+dmlzaWJsZV9oZWlnaHQ7CisgIGlm IChsZWZ0X3ApCisgICAgeworICAgICAgaW50IHdkID0gV0lORE9XX0xFRlRfRlJJTkdFX1dJRFRI ICh3KTsKKyAgICAgIGludCB4ID0gd2luZG93X2JveF9sZWZ0ICh3LCAoV0lORE9XX0hBU19GUklO R0VTX09VVFNJREVfTUFSR0lOUyAodykKKyAgICAgICAgICAgPyBMRUZUX01BUkdJTl9BUkVBCisg ICAgICAgICAgIDogVEVYVF9BUkVBKSk7CisgICAgICBpZiAocC53ZCA+IHdkKQorICAgICAgICBw LndkID0gd2Q7CisgICAgICBwLnggPSB4IC0gcC53ZCAtICh3ZCAtIHAud2QpIC8gMjsKKyAgICAg IGlmIChwLndkIDwgd2QgfHwgcC55ID4gcC5ieSB8fCBwLnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkK KyAgICAgICAgeworICAgICAgICAgIC8qIElmIFcgaGFzIGEgdmVydGljYWwgYm9yZGVyIHRvIGl0 cyBsZWZ0LCBkb24ndCBkcmF3IG92ZXIgaXQuICAqLworICAgICAgICAgIHdkIC09ICgoIVdJTkRP V19MRUZUTU9TVF9QICh3KQorICAgICAgICAgICAgLyogVGhpcyBjb3VsZCBiZSB3cm9uZyB3aGVu IHdlIGFsbG93IHdpbmRvdyBsb2NhbAorICAgICAgICAgICAgICAgcmlnaHQgZGl2aWRlcnMgLSBi dXQgdGhlIHdpbmRvdyBvbiB0aGUgbGVmdCBpcyBoYXJkCisgICAgICAgICAgICAgICB0byBnZXQu ICAqLworICAgICAgICAgICAgJiYgIUZSQU1FX1JJR0hUX0RJVklERVJfV0lEVEggKGYpCisgICAg ICAgICAgICAmJiAhV0lORE9XX0hBU19WRVJUSUNBTF9TQ1JPTExfQkFSICh3KQorICAgICAgICAg ICAgLyogQnV0IGRvbid0IHJlZHVjZSB0aGUgZnJpbmdlIHdpZHRoIGlmIHRoZSB3aW5kb3cKKyAg ICAgICAgICAgICAgIGhhcyBhIGxlZnQgbWFyZ2luLCBiZWNhdXNlIHRoYXQgbWVhbnMgd2UgYXJl IG5vdAorICAgICAgICAgICAgICAgaW4gZGFuZ2VyIG9mIGRyYXdpbmcgb3ZlciB0aGUgdmVydGlj YWwgYm9yZGVyLAorICAgICAgICAgICAgICAgYW5kIE9UT0ggbGVhdmluZyBvdXQgdGhhdCBvbmUg cGl4ZWwgbGVhdmVzIGJlaGluZAorICAgICAgICAgICAgICAgdHJhY2VzIG9mIHRoZSBjdXJzb3Is IGlmIGl0IHdhcyBpbiBjb2x1bW4gemVybworICAgICAgICAgICAgICAgYmVmb3JlIGRyYXdpbmcg bm9uLWVtcHR5IG1hcmdpbiBhcmVhLiAgKi8KKyAgICAgICAgICAgICYmIHctPmxlZnRfbWFyZ2lu X2NvbHMgPT0gMCkKKyAgICAgICAgICAgPyAxIDogMCk7CisgICAgICAgICAgcC5ieCA9IHggLSB3 ZDsKKyAgICAgICAgICBwLm54ID0gd2Q7CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UKKyAgICB7 CisgICAgICBpbnQgeCA9IHdpbmRvd19ib3hfcmlnaHQgKHcsCisgICAgICAgIChXSU5ET1dfSEFT X0ZSSU5HRVNfT1VUU0lERV9NQVJHSU5TICh3KQorICAgICAgICAgPyBSSUdIVF9NQVJHSU5fQVJF QQorICAgICAgICAgOiBURVhUX0FSRUEpKTsKKyAgICAgIGludCB3ZCA9IFdJTkRPV19SSUdIVF9G UklOR0VfV0lEVEggKHcpOworICAgICAgaWYgKHAud2QgPiB3ZCkKKyAgICAgICAgcC53ZCA9IHdk OworICAgICAgcC54ID0geCArICh3ZCAtIHAud2QpIC8gMjsKKyAgICAgIC8qIENsZWFyIHJpZ2h0 IGZyaW5nZSBpZiBubyBiaXRtYXAgdG8gZHJhdyBvZiBpZiBiaXRtYXAgZG9lc24ndCBmaWxsCisg ICB0aGUgZnJpbmdlLiAgKi8KKyAgICAgIGlmIChwLndkIDwgd2QgfHwgcC55ID4gcC5ieSB8fCBw LnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkKKyAgICAgICAgeworICAgICAgICAgIHAuYnggPSB4Owor ICAgICAgICAgIHAubnggPSB3ZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYgKHAueCA+PSBXSU5E T1dfQk9YX0xFRlRfRURHRV9YICh3KQorICAgICAgJiYgKHAueCArIHAud2QpIDw9IFdJTkRPV19C T1hfTEVGVF9FREdFX1ggKHcpICsgV0lORE9XX1BJWEVMX1dJRFRIICh3KSkKKyAgICBGUkFNRV9S SUYgKGYpLT5kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgJnApOworfQorCit2b2lkCittY19k cmF3X2ZyaW5nZV9iaXRtYXAgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJv dywgaW50IGxlZnRfcCwgZW51bSB0eXBlX29mX2N1cnNvciBjdXJzb3JfdHlwZSkKK3sKKyAgaW50 IG92ZXJsYXkgPSAwOworICBpZiAobGVmdF9wID09IHJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmN1 cnNvcl9pbl9mcmluZ2VfcCkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCBjdXJzb3IgPSBRbmls OworICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICAgICAgeworICAgICAgICBjYXNlIE1D X0ZSQU1FRF9CT1g6CisgICAgICAgICAgaWYgKHJvdy0+dmlzaWJsZV9oZWlnaHQgPj0gU1RBTkRB UkRfQklUTUFQX0hFSUdIVCAoaG9sbG93X3JlY3RhbmdsZV9iaXRzKSkKKyAgICAgICAgICAgIGN1 cnNvciA9IFFob2xsb3c7CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgY3Vyc29yID0gUWhv bGxvd19zbWFsbDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19IT0xMT1dfQk9Y OgorICAgICAgICAgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5EQVJEX0JJVE1BUF9I RUlHSFQgKGhvbGxvd19yZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBjdXJzb3IgPSBRaG9s bG93OworICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3dfc21hbGw7 CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAg ICBjdXJzb3IgPSBRYm94OworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0JBUjoK KyAgICAgICAgICBjdXJzb3IgPSBRYmFyOworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNl IE1DX0hCQVI6CisgICAgICAgICAgY3Vyc29yID0gUWhiYXI7CisgICAgICAgICAgYnJlYWs7Cisg ICAgICAgIGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19OT19DVVJT T1I6CisgICAgICAgIGNhc2UgTUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBN Q19MRUZUX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgdy0+cGh5 c19jdXJzb3Jfb25fcCA9IDA7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3AgPSAw OworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKGN1cnNvcikp CisgICAgICAgIHsKKyAgICAgICAgICBpbnQgYm0gPSBtY19nZXRfbG9naWNhbF9jdXJzb3JfYml0 bWFwICh3LCBjdXJzb3IpOworICAgICAgICAgIGlmIChibSAhPSBNQ19OT19GUklOR0VfQklUTUFQ KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAo dywgcm93LCBsZWZ0X3AsIDIsIGJtKTsKKyAgICAgICAgICAgICAgb3ZlcmxheSA9IEVRIChjdXJz b3IsIFFib3gpID8gMyA6IDE7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIG1j X2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIGxlZnRfcCwgb3ZlcmxheSwgTUNfTk9fRlJJ TkdFX0JJVE1BUCk7CisgIGlmIChsZWZ0X3AgJiYgcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCAh PSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCBy b3csIDEsIDEsIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXApOworfQorCisvKiBlbmQgTVVMVElQ TEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBOT19G UklOR0VfQklUTUFQIDAKIC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ZXIgOiBOU1Njcm9sbGVyCiAgIHsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIE5TUmVjdCBtY19yZWN0YW5n bGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgIHN0cnVjdCB3aW5kb3cgKndp bmRvdzsKICAgIHN0cnVjdCBmcmFtZSAqZnJhbWU7CiAgICBOU1Jlc3BvbmRlciAqcHJldlJlc3Bv bmRlcjsKQEAgLTY4MCw2ICs2OTAsMTggQEAgdHlwZWRlZiBpZCBpbnN0YW5jZXR5cGU7CiAgICBp bnQgZW1fd2hvbGU7CiAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5TUmVjdClyZWN0 OworLSAoTlNSZWN0KW1jX2dldF9yZWN0YW5nbGU7CistIChzdHJ1Y3Qgd2luZG93ICopbWNfZ2V0 X3dpbmRvdzsKKy0gKGJvb2wpbWNfanVkZ2U7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIC0gKGluc3RhbmNldHlwZSkgaW5pdEZyYW1lOiAoTlNSZWN0IClyIHdpbmRvdzogKExpc3Bf T2JqZWN0KXdpbjsKIC0gKHZvaWQpc2V0RnJhbWU6IChOU1JlY3QpcjsKIApkaWZmIC0tZ2l0IGEv c3JjL25zdGVybS5tIGIvc3JjL25zdGVybS5tCmluZGV4IDgxZD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S0tLQorICAgQ2xp cCB0aGUgZHJhd2luZyBhcmVhIHRvIHJlY3RhbmdsZSByIGluIGZyYW1lIGYuICBJZiBkcmF3aW5n IGlzIG5vdAorICAgY3VycmVudGx5IHBvc3NpYmxlIG1hcmsgciBhcyBkaXJ0eSBhbmQgcmV0dXJu IE5PLCBvdGhlcndpc2UgcmV0dXJuIFlFUy4KKyAgIFRha2UgaW50byBjb25zaWRlcmF0aW9uIGBy b3ctPmNsaXBgIGlmIGl0IHdhcyBzZXQgYnkgYGV4cG9zZV93aW5kb3cnLgorICAgLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KK3sKKyAgTlNUUkFDRV9XSEVOIChOU1RSQUNFX0dST1VQX0ZPQ1VTLCAibWNf bnNfY2xpcF90b19yZWN0Iik7CisgIGlmIChyKQorICAgIHsKKyAgICAgIE5TVFJBQ0VfUkVDVCAo InIiLCAqcik7CisgICAgICBpZiAoW05TVmlldyBmb2N1c1ZpZXddID09IEZSQU1FX05TX1ZJRVcg KGYpKQorICAgICAgICB7CisgICAgICAgICAgW1tOU0dyYXBoaWNzQ29udGV4dCBjdXJyZW50Q29u dGV4dF0gc2F2ZUdyYXBoaWNzU3RhdGVdOworICAgICAgICAgIGlmIChuID09IDIpCisgICAgICAg ICAgICBOU1JlY3RDbGlwTGlzdCAociwgMik7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICBpZiAocm93LT5jbGlwICE9IE5VTEwpCisgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIE5TUmVjdCByX2NsaXA7CisgICAgICAgICAg ICAgICAgICAgIHJfY2xpcC5vcmlnaW4ueCA9IHJvdy0+Y2xpcC0+eDsKKyAgICAgICAgICAgICAg ICAgICAgcl9jbGlwLm9yaWdpbi55ID0gcm93LT5jbGlwLT55OworICAgICAgICAgICAgICAgICAg ICByX2NsaXAuc2l6ZS53aWR0aCA9IHJvdy0+Y2xpcC0+d2lkdGg7CisgICAgICAgICAgICAgICAg ICAgIHJfY2xpcC5zaXplLmhlaWdodCA9IHJvdy0+Y2xpcC0+aGVpZ2h0OworICAgICAgICAgICAg ICAgICAgICBOU1JlY3Qgcl9zYXZlOworICAgICAgICAgICAgICAgICAgICByX3NhdmUub3JpZ2lu LnggPSByWzBdLm9yaWdpbi54OworICAgICAgICAgICAgICAgICAgICByX3NhdmUub3JpZ2luLnkg PSByWzBdLm9yaWdpbi55OworICAgICAgICAgICAgICAgICAgICByX3NhdmUuc2l6ZS53aWR0aCA9 IHJbMF0uc2l6ZS53aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgcl9zYXZlLnNpemUuaGVpZ2h0 ID0gclswXS5zaXplLmhlaWdodDsKKyAgICAgICAgICAgICAgICAgICAgbWNfbnNfaW50ZXJzZWN0 X3JlY3RhbmdsZXMgKCZyX3NhdmUsICZyX2NsaXAsICZyWzBdKTsKKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICBOU1JlY3RDbGlwICgqcik7CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgICByZXR1cm4gWUVTOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIHsKKyAg ICAgICAgICBOU1ZpZXcgKnZpZXcgPSBGUkFNRV9OU19WSUVXIChmKTsKKyAgICAgICAgICBpbnQg aTsKKyAgICAgICAgICBmb3IgKGkgPSAwIDsgaSA8IG4gOyBpKyspCisgICAgICAgICAgICBbdmll dyBzZXROZWVkc0Rpc3BsYXlJblJlY3Q6cltpXV07CisgICAgICAgIH0KKyAgICB9CisgIHJldHVy biBOTzsKK30KKworc3RhdGljIHZvaWQKK21jX25zX2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5c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ciwgIlxuZm9yZWdyb3VuZCAoJXMpIHwgYmFja2dyb3VuZCAoJXMpXG4iLAorICAg ICAgICAgICAgICAgICAgICAgICghTklMUCAoZm9yZWdyb3VuZCkgPyBTU0RBVEEgKGZvcmVncm91 bmQpIDogIk5JTFAiKSwKKyAgICAgICAgICAgICAgICAgICAgICAoIU5JTFAgKGJhY2tncm91bmQp ID8gU1NEQVRBIChiYWNrZ3JvdW5kKSA6ICJOSUxQIikpOworICAtICBFWEFNUExFIE9GIEhPVyBU TyBDUkVBVEUgQSBDT0xPUiBXSVRIIFJHQi9MU0wgZmxvYXQgdmFsdWVzOgorICAgICBOU0NvbG9y ICpteV9jb2xvciA9IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IDEuMAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IDEuMAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6 IDEuMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg YWxwaGE6IDEuMF07CisgIC0gIEFMVEVSTkFUSVZFIEVYQU1QTEU6CisgICAgIGVudW0gZmFjZV9p ZCBkZWJ1Z2dpbmdfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBpbnRl cm4gKCIrLWRlYnVnZ2luZy1mYWNlIiksIHRydWUpOworICAgICBzdHJ1Y3QgZmFjZSAqZGVidWdn aW5nX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGRlYnVnZ2luZ19mYWNlX2lkKTsKKyAgICAg TlNDb2xvciAqY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JP VU5EIChkZWJ1Z2dpbmdfZmFjZSksIHMtPmYpOworICAgICBbY29sb3Igc2V0XTsgKi8KKyAgaWYg KGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0dM WVBITEVTUykKKyAgICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyZWVuOiBsc2wuZ3JlZW4KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBhbHBoYTogMS4wXSBzZXRdOworICAgIGVsc2UKKyAgICAgIFtGUkFNRV9D VVJTT1JfQ09MT1IgKGYpIHNldF07CisgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9Y KQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOworICAgICAgQ0hF Q0tfQlVGRkVSIChidWYpOworICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1Zik7 CisgICAgICBib29sIHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21v ZGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFy a19hY3RpdmUpKSk7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2JlZ2lubmluZyA9IChyZWdpb25f YWN0aXZlX3ApID8gWEZJWE5VTSAoRnJlZ2lvbl9iZWdpbm5pbmcgKCkpIDogLTE7CisgICAgICBw dHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdpb25fYWN0aXZlX3ApID8gWEZJWE5VTSAoRnJlZ2lv bl9lbmQgKCkpIDogLTE7CisgICAgICBwdHJkaWZmX3Qgb3BvaW50X3B0ID0gKHcgPT0gWFdJTkRP VyAoc2VsZWN0ZWRfd2luZG93KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFBUCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBYRklYTlVNIChGbWFya2VyX3Bvc2l0aW9uICh3 LT5wb2ludG0pKTsKKyAgICAgIGJvb2wgcmVnaW9uX2luX2JvdW5kc19wID0gKHJlZ2lvbl9hY3Rp dmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3B0ID49IHJl Z2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF9wdCA8IHJlZ2lvbl9lbmQpOworICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAg ICYmIHJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICB7 CisgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2VfaWQgPSBs b29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXJlZ2lv bi1mYWNlIiksIHRydWUpOworICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3Jl Z2lvbl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlX2lk KTsKKyAgICAgICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9jb2xvciA9IG5zX2xv b2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19hY3RpdmVfcmVn aW9uX2ZhY2UpLCBmKTsKKyAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX3Jl Z2lvbl9jb2xvcjsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AK KyAgICAgICAgICAgICAgICAgJiYgIXJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICAgICAg ICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9s bG93X2FjdGl2ZV9yZWdpb25fb3V0X2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXJlZ2lvbi1mYWNlIiksIHRydWUpOworICAgICAg ICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfZmFjZV9pZCk7CisgICAgICAgICAg ICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfY29sb3IgPSBuc19sb29rdXBfaW5k ZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRf ZmFjZSksIGYpOworICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2FjdGl2ZV9yZWdp b25fb3V0X2NvbG9yOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmICghcmVnaW9uX2Fj dGl2ZV9wICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVtIGZh Y2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICBz dHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3df YWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX2Nv bG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93 X2FjdGl2ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19h Y3RpdmVfY29sb3I7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvKiBUaGUgcmVnaW9uIGlz IF9ub3RfIHZpc2libGUgaW4gdGhlIGluYWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRoZSBvdmVybGF5 IHdpbmRvdyBwcm9wZXJ0eSBpcyB1c2VkLiAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2 ZV9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxv d19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist cmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAg IHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9s bG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19p bmFjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9V TkQgKGhvbGxvd19pbmFjdGl2ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgICAgaG9sbG93X2Nv bG9yID0gaG9sbG93X2luYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICB9CisgICAgfQorICAg IGVsc2UgaWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSA9PSBuc19pbmRleF9j b2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCisgICAgICB7CisgICAgICAgIFtuc19s b29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgZikgc2V0XTsK KyAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChmKTsKKyAgICAgIH0K KyNpZmRlZiBOU19JTVBMX0NPQ09BCisgIE5TRGlzYWJsZVNjcmVlblVwZGF0ZXMgKCk7CisjZW5k aWYKKyAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICB7CisgICAgICBjYXNlIE1DX05PX0ZSSU5H RV9CSVRNQVA6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19OT19DVVJTT1I6CisgICAg ICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOgorICAgICAgICBi cmVhazsKKyAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAgICAgICBicmVhazsK KyAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAg ICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19GUkFNRURfQk9YOgorICAgICAgICBOU1JlY3RGaWxs IChyKTsKKyAgICAgICAgW2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICBOU1JlY3RGaWxsIChO U0luc2V0UmVjdCAociwgMSwgMSkpOworICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBz ZXRdOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICAgICAg TlNSZWN0RmlsbCAocik7CisgICAgICAgIFtob2xsb3dfY29sb3Igc2V0XTsKKyAgICAgICAgTlNS ZWN0RmlsbCAoTlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgW0ZSQU1FX0NVUlNPUl9D T0xPUiAoZikgc2V0XTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0hCQVI6CisgICAg ICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfQkFSOgor ICAgICAgICBzID0gcjsKKyAgICAgICAgLyogQGxhd2xpc3QgaXMgZm9jdXNpbmcgdGhlIGluaXRp YWwgZGV2ZWxvcG1lbnQgb2YgZmVhdHVyZSByZXF1ZXN0cworICAgICAgICAjMTc2ODQgYW5kICMy Mjg3MyBvbiBMMlIgbGFuZ3VhZ2VzLiAqLworICAgICAgICBpZiAoZ2x5cGhfZmxhdm9yICE9IE1D X0dMWVBICisgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEhMRVNTKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIC8qIElmIHRoZSBjaGFyYWN0ZXIgdW5kZXIgY3Vyc29yIGlz IFIyTCwgZHJhdyB0aGUgYmFyIGN1cnNvcgorICAgICAgICAgICAgICAgb24gdGhlIHJpZ2h0IG9m IGl0cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxlZnQuICAqLworICAgICAgICAgICAgaWYg KChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKKyAgICAgICAgICAgICAg cy5vcmlnaW4ueCArPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gcy5zaXplLndpZHRoOwor ICAgICAgICAgIH0KKyAgICAgICAgTlNSZWN0RmlsbCAocyk7CisgICAgICAgIGJyZWFrOworICAg IH0KKyAgbnNfcmVzZXRfY2xpcHBpbmcgKGYpOworICAvKiBkcmF3IHRoZSBjaGFyYWN0ZXIgdW5k ZXIgdGhlIGN1cnNvciAqLworICBpZiAoZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBITEVTUworICAg ICAgJiYgKGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gKKyAgICAgICAgICB8fCBjdXJzb3Jf dHlwZSA9PSBNQ19GSUxMRURfQk9YCisgICAgICAgIC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gICAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworeworICBpZiAocy0+Zm9yX292ZXJsYXBzKQorICAgIHJldHVybjsKKyAg LyogRG8gdW5kZXJsaW5lLiAqLworICBpZiAoZmFjZS0+dW5kZXJsaW5lX3ApCisgICAgeworICAg ICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAg ICAgeworICAgICAgICAgIGlmIChmYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAg ICAgICBbZGVmYXVsdENvbCBzZXRdOworICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIFtuc19s b29rdXBfaW5kZXhlZF9jb2xvciAoZmFjZS0+dW5kZXJsaW5lX2NvbG9yLCBzLT5mKSBzZXRdOwor ICAgICAgICAgIG5zX2RyYXdfdW5kZXJ3YXZlIChzLCB3aWR0aCwgeCk7CisgICAgICAgIH0KKyAg ICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkK KyAgICAgICAgeworICAgICAgICAgIE5TUmVjdCByOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcg dGhpY2tuZXNzLCBwb3NpdGlvbjsKKyAgICAgICAgICAvKiBJZiB0aGUgcHJldiB3YXMgdW5kZXJs aW5lZCwgbWF0Y2ggaXRzIGFwcGVhcmFuY2UuICovCisgICAgICAgICAgaWYgKHMtPnByZXYgJiYg cy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3AKKyAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFj ZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FCisgICAgICAgICAgICAgICYmIHMt PnByZXYtPnVuZGVybGluZV90aGlja25lc3MgPiAwKQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICB0aGlja25lc3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAg ICAgICBwb3NpdGlvbiA9IHMtPnByZXYtPnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHN0cnVjdCBm b250ICpmb250OworICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGRlc2NlbnQ7CisgICAgICAg ICAgICAgIGZvbnQ9cy0+Zm9udDsKKyAgICAgICAgICAgICAgZGVzY2VudCA9IHMtPnkgKyBzLT5o ZWlnaHQgLSBzLT55YmFzZTsKKyAgICAgICAgICAgICAgLyogVXNlIHVuZGVybGluZSB0aGlja25l c3Mgb2YgZm9udCwgZGVmYXVsdGluZyB0byAxLiAqLworICAgICAgICAgICAgICB0aGlja25lc3Mg PSAoZm9udCAmJiBmb250LT51bmRlcmxpbmVfdGhpY2tuZXNzID4gMCkKKyAgICAgICAgICAgICAg ICA/IGZvbnQtPnVuZGVybGluZV90aGlja25lc3MgOiAxOworICAgICAgICAgICAgICAvKiBEZXRl cm1pbmUgdGhlIG9mZnNldCBvZiB1bmRlcmxpbmluZyBmcm9tIHRoZSBiYXNlbGluZS4gKi8KKyAg ICAgICAgICAgICAgaWYgKHhfdW5kZXJsaW5lX2F0X2Rlc2NlbnRfbGluZSkKKyAgICAgICAgICAg ICAgICBwb3NpdGlvbiA9IGRlc2NlbnQgLSB0aGlja25lc3M7CisgICAgICAgICAgICAgIGVsc2Ug aWYgKHhfdXNlX3VuZGVybGluZV9wb3NpdGlvbl9wcm9wZXJ0aWVzCisgICAgICAgICAgICAgICAg ICAgICAgICYmIGZvbnQgJiYgZm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAg ICAgICAgICAgcG9zaXRpb24gPSBmb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAg ICAgIGVsc2UgaWYgKGZvbnQpCisgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBscm91bmQgKGZv bnQtPmRlc2NlbnQgLyAyKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHBv c2l0aW9uID0gdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0OworICAgICAgICAgICAgICBwb3NpdGlv biA9IG1heCAocG9zaXRpb24sIHVuZGVybGluZV9taW5pbXVtX29mZnNldCk7CisgICAgICAgICAg ICAgIC8qIEVuc3VyZSB1bmRlcmxpbmluZyBpcyBub3QgY3JvcHBlZC4gKi8KKyAgICAgICAgICAg ICAgaWYgKGRlc2NlbnQgPD0gcG9zaXRpb24pCisgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgcG9zaXRpb24gPSBkZXNjZW50IC0gMTsKKyAgICAgICAgICAgICAgICAgIHRoaWNr bmVzcyA9IDE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChkZXNj ZW50IDwgcG9zaXRpb24gKyB0aGlja25lc3MpCisgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0g MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBzLT51bmRlcmxpbmVfdGhpY2tuZXNzID0gdGhp Y2tuZXNzOworICAgICAgICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9IHBvc2l0aW9uOworICAg ICAgICAgIHIgPSBOU01ha2VSZWN0ICh4LCBzLT55YmFzZSArIHBvc2l0aW9uLCB3aWR0aCwgdGhp Y2tuZXNzKTsKKyAgICAgICAgICBpZiAoZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAg ICAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICBb bnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKGZhY2UtPnVuZGVybGluZV9jb2xvciwgcy0+Zikgc2V0 XTsKKyAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgfQorICAgIH0KKyAgLyogRG8g b3ZlcmxpbmUuIFdlIGZvbGxvdyBvdGhlciB0ZXJtcyBpbiB1c2luZyBhIHRoaWNrbmVzcyBvZiAx CisgICAgIGFuZCBpZ25vcmluZyBvdmVybGluZV9tYXJnaW4uICovCisgIGlmIChmYWNlLT5vdmVy bGluZV9wKQorICAgIHsKKyAgICAgIE5TUmVjdCByOworICAgICAgciA9IE5TTWFrZVJlY3QgKHgs IHMtPnksIHdpZHRoLCAxKTsKKyAgICAgIGlmIChmYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0 ZWRfcCkKKyAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgIGVsc2UKKyAgICAgICAgW25z X2xvb2t1cF9pbmRleGVkX2NvbG9yIChmYWNlLT5vdmVybGluZV9jb2xvciwgcy0+Zikgc2V0XTsK KyAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgIH0KKyAgLyogRG8gc3RyaWtlLXRocm91Z2guICBX ZSBmb2xsb3cgb3RoZXIgdGVybXMgZm9yIHRoaWNrbmVzcyBhbmQKKyAgICAgdmVydGljYWwgcG9z aXRpb24uKi8KKyAgaWYgKGZhY2UtPnN0cmlrZV90aHJvdWdoX3ApCisgICAgeworICAgICAgTlNS ZWN0IHI7CisgICAgICB1bnNpZ25lZCBsb25nIGR5OworICAgICAgZHkgPSBscmludCAoKHMtPmhl aWdodCAtIDEpIC8gMik7CisgICAgICByID0gTlNNYWtlUmVjdCAoeCwgcy0+eSArIGR5LCB3aWR0 aCwgMSk7CisgICAgICBpZiAoZmFjZS0+c3RyaWtlX3Rocm91Z2hfY29sb3JfZGVmYXVsdGVkX3Ap CisgICAgICAgIFtkZWZhdWx0Q29sIHNldF07CisgICAgICBlbHNlCisgICAgICAgIFtuc19sb29r dXBfaW5kZXhlZF9jb2xvciAoZmFjZS0+c3RyaWtlX3Rocm91Z2hfY29sb3IsIHMtPmYpIHNldF07 CisgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICB9Cit9CisKK3N0YXRpYyB2b2lkCittY19uc19k dW1wZ2x5cGhzX3N0cmV0Y2ggKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIGludCB3ZCwgc3RydWN0 IGdseXBoX3JvdyAqcm93KQoreworICBOU1JlY3QgclsyXTsKKyAgaW50IG4sIGk7CisgIHN0cnVj dCBmYWNlICpmYWNlOworICBOU0NvbG9yICpmZ0NvbCwgKmJnQ29sOworICBpZiAoIXMtPmJhY2tn cm91bmRfZmlsbGVkX3ApCisgICAgeworICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xp cF9yZWN0IChzLCByKTsKKyAgICAgICpyID0gTlNNYWtlUmVjdCAocy0+eCwgcy0+eSwgcy0+YmFj a2dyb3VuZF93aWR0aCwgcy0+aGVpZ2h0KTsKKyAgICAgIGlmICghbWNfbnNfY2xpcF90b19yZWN0 IChzLT5mLCByLCBuLCByb3cpKQorICAgICAgICByZXR1cm47CisgICAgICBpZiAocy0+aGwgPT0g RFJBV19NT1VTRV9GQUNFKQorICAgICAgIHsKKyAgICAgICAgIGZhY2UgPSBGQUNFX0ZST01fSUQg KHMtPmYsIE1PVVNFX0hMX0lORk8gKHMtPmYpLT5tb3VzZV9mYWNlX2ZhY2VfaWQpOworICAgICAg ICAgaWYgKCFmYWNlKQorICAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VT RV9GQUNFX0lEKTsKKyAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgZmFjZSA9IEZBQ0VfRlJP TV9JRCAocy0+Ziwgcy0+Zmlyc3RfZ2x5cGgtPmZhY2VfaWQpOworICAgICAgYmdDb2wgPSBuc19s b29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSwgcy0+Zik7Cisg ICAgICBmZ0NvbCA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQg KGZhY2UpLCBzLT5mKTsKKyAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpCisgICAgICAgIHsK KyAgICAgICAgICBpZiAoIXMtPnJvdy0+ZnVsbF93aWR0aF9wKQorICAgICAgICAgICAgeworICAg ICAgICBpbnQgb3ZlcnJ1biwgbGVmdG92ZXJydW47CisgICAgICAgICAgICAgIC8qIHRydW5jYXRl IHRvIGF2b2lkIG92ZXJ3cml0aW5nIGZyaW5nZSBhbmQvb3Igc2Nyb2xsYmFyICovCisgICAgICAg IG92ZXJydW4gPSBtYXggKDAsIChzLT54ICsgcy0+YmFja2dyb3VuZF93aWR0aCkKKyAgICAgICAg ICAgLSAoV0lORE9XX0JPWF9SSUdIVF9FREdFX1ggKHMtPncpCisgICAgICAgIC0gV0lORE9XX1JJ R0hUX0ZSSU5HRV9XSURUSCAocy0+dykpKTsKKyAgICAgICAgICAgICAgcltpXS5zaXplLndpZHRo IC09IG92ZXJydW47CisgICAgICAgIC8qIHRydW5jYXRlIHRvIGF2b2lkIG92ZXJ3cml0aW5nIHRv IGxlZnQgb2YgdGhlIHdpbmRvdyBib3ggKi8KKyAgICAgICAgbGVmdG92ZXJydW4gPSAoV0lORE9X X0JPWF9MRUZUX0VER0VfWCAocy0+dykKKyAgICAgICAgICAgKyBXSU5ET1dfTEVGVF9GUklOR0Vf V0lEVEggKHMtPncpKSAtIHMtPng7CisgICAgICAgIGlmIChsZWZ0b3ZlcnJ1biA+IDApCisgICAg ICAgICAgeworICAgICAgICAgICAgcltpXS5vcmlnaW4ueCArPSBsZWZ0b3ZlcnJ1bjsKKyAgICAg ICAgICAgIHJbaV0uc2l6ZS53aWR0aCAtPSBsZWZ0b3ZlcnJ1bjsKKyAgICAgICAgICB9CisgICAg ICAgICAgICAgIC8qIFhYWDogVHJ5IHRvIHdvcmsgYmV0d2VlbiBwcm9ibGVtIHdoZXJlIGEgc3Ry ZXRjaCBnbHlwaCBvbgorICAgICAgICAgICAgICAgICBhIHBhcnRpYWxseS12aXNpYmxlIGJvdHRv bSByb3cgd2lsbCBjbGVhciBwYXJ0IG9mIHRoZQorICAgICAgICAgICAgICAgICBtb2RlbGluZSwg YW5kIGFub3RoZXIgd2hlcmUgbGlzdC1idWZmZXJzIGhlYWRlcnMgYW5kIHNpbWlsYXIKKyAgICAg ICAgICAgICAgICAgcm93cyBlcnJvbmVvdXNseSBoYXZlIHZpc2libGVfaGVpZ2h0IHNldCB0byAw LiAgTm90IHN1cmUKKyAgICAgICAgICAgICAgICAgd2hlcmUgdGhpcyBpcyBjb21pbmcgZnJvbSBh cyBvdGhlciB0ZXJtcyBzZWVtIG5vdCB0byBzaG93LiAqLworICAgICAgICAgICAgICByW2ldLnNp emUuaGVpZ2h0ID0gbWluIChzLT5oZWlnaHQsIHMtPnJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAg ICAgICAgICAgfQorICAgICAgICAgIFtiZ0NvbCBzZXRdOworICAgICAgICAgIC8qIE5PVEU6IHVu ZGVyIE5TIHRoaXMgaXMgTk9UIHVzZWQgdG8gZHJhdyBjdXJzb3JzLCBidXQgd2UgbXVzdCBhdm9p ZAorICAgICAgICAgICAgIG92ZXJ3cml0aW5nIGN1cnNvciAodXN1YWxseSB3aGVuIGN1cnNvciBv biBhIHRhYikgKi8KKyAgICAgICAgICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IpCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIC8qIEZJWE1FOiAgRG8gd2Ugc3RpbGwgbmVlZCB0byBwcmV2 ZW50IHRoaXMgc2VjdGlvbiBvZiBjb2RlIGZyb20KKyAgICAgICAgICAgICAgZXJhc2luZyB0aGUg ZmFrZSBNQ19IQkFSIHRoYXQgZXh0ZW5kcyB0aGUgZW50aXJlIGxlbmd0aCBvZiB0aGUKKyAgICAg ICAgICAgICAgU1RSRVRDSF9HTFlQSD8gIFRoaXMgbWF5IGhhdmUgYmVlbiBkb25lIHByaW9yIHRv IHRoZSBmaXggcmVsYXRpbmcKKyAgICAgICAgICAgICAgdG8gbGVmdC9yaWdodCBvdmVyd3JpdHRl biBnbHlwaHMuICovCisgICAgICAgICAgICAgIHJbaV0uc2l6ZS5oZWlnaHQgLT0gMTsKKyAgICAg ICAgICAgICAgLy8gIGVudW0gZmFjZV9pZCBkZWJ1Z2dpbmdfZmFjZV9pZCA9IGxvb2t1cF9uYW1l ZF9mYWNlIChzLT53LCBzLT5mLCBpbnRlcm4gKCIrLWRlYnVnZ2luZy1mYWNlIiksIHRydWUpOwor ICAgICAgICAgICAgICAvLyAgc3RydWN0IGZhY2UgKmRlYnVnZ2luZ19mYWNlID0gRkFDRV9GUk9N X0lEIChzLT5mLCBkZWJ1Z2dpbmdfZmFjZV9pZCk7CisgICAgICAgICAgICAgIC8vICBOU0NvbG9y ICpjb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGRl YnVnZ2luZ19mYWNlKSwgcy0+Zik7CisgICAgICAgICAgICAgIC8vICBbY29sb3Igc2V0XTsKKyAg ICAgICAgICAgICAgQ0dGbG9hdCB4ID0gcltpXS5vcmlnaW4ueDsKKyAgICAgICAgICAgICAgQ0dG bG9hdCB3aWR0aCA9IHdkOworICAgICAgICAgICAgICByW2ldLnNpemUud2lkdGggLT0gd2lkdGg7 CisgICAgICAgICAgICAgIHJbaV0ub3JpZ2luLnggKz0gd2lkdGg7CisgICAgICAgICAgICAgIE5T UmVjdEZpbGwgKHJbaV0pOworICAgICAgICAgICAgICAvKiBEcmF3IG92ZXJsaW5pbmcsIGV0Yy4g b24gdGhlIGN1cnNvci4gKi8KKyAgICAgICAgICAgICAgaWYgKHMtPnctPnBoeXNfY3Vyc29yX3R5 cGUgPT0gTUNfRklMTEVEX0JPWCkKKyAgICAgICAgICAgICAgICBtY19uc19kcmF3X3RleHRfZGVj b3JhdGlvbiAocywgZmFjZSwgYmdDb2wsIHdpZHRoLCB4KTsKKyAgICAgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgICAgICBtY19uc19kcmF3X3RleHRfZGVjb3JhdGlvbiAocywgZmFjZSwg ZmdDb2wsIHdpZHRoLCB4KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAg ICAgICB7CisgIC8vICBpbnQgcnggPSByW2ldLm9yaWdpbi54OworICAvLyAgaW50IHJ5ID0gcltp XS5vcmlnaW4ueTsKKyAgLy8gIGludCBydyA9IHJbaV0uc2l6ZS53aWR0aDsKKyAgLy8gIGludCBy aCA9IHJbaV0uc2l6ZS5oZWlnaHQ7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJtY19uc19kdW1w Z2x5cGhzX3N0cmV0Y2g6ICB2cG9zICglZCkgfCByeCAoJWQpIHwgcnkgKCVkKSB8IHJ3ICglZCkg fCByaCAoJWQpXG4iLAorICAvLyAgICAgICAgICAgICAgICAgICBzLT5maXJzdF9nbHlwaC0+dnBv cywgcngsIHJ5LCBydywgcmgpOworICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyW2ldKTsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgICAvKiBEcmF3IG92ZXJsaW5pbmcsIGV0Yy4gb24gdGhlIHN0 cmV0Y2ggZ2x5cGggKG9yIHRoZSBwYXJ0CisgICAgICAgICAgICAgb2YgdGhlIHN0cmV0Y2ggZ2x5 cGggYWZ0ZXIgdGhlIGN1cnNvcikuICovCisgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29y YXRpb24gKHMsIGZhY2UsIGZnQ29sLCByW2ldLnNpemUud2lkdGgsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHJbaV0ub3JpZ2luLngpOworICAgICAgICB9CisgICAgICBu c19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0g MTsKKyAgICB9Cit9CisKK3N0YXRpYyB2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gIGZyb21SZWN0OiBpcgorICAgICAgICAgICAgIG9w ZXJhdGlvbjogTlNDb21wb3NpdGVTb3VyY2VPdmVyCisgICAgICAgICAgICAgIGZyYWN0aW9uOiAx LjAKKyAgICAgICAgICAgcmVzcGVjdEZsaXBwZWQ6IFlFUworICAgICAgICAgICAgICAgIGhpbnRz OiBuaWxdOworI2Vsc2UKKyAgICAgIFtpbWcgY29tcG9zaXRlVG9Qb2ludDogTlNNYWtlUG9pbnQg KHgsIHkgKyBzLT5zbGljZS5oZWlnaHQpCisgICAgICAgICAgICAgICAgICBvcGVyYXRpb246IE5T Q29tcG9zaXRlU291cmNlT3Zlcl07CisjZW5kaWYKKyAgICB9CisgIGlmIChzLT5obCA9PSBEUkFX X0NVUlNPUikKKyAgICB7CisgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAocy0+Zikgc2V0XTsKKyAg ICBpZiAocy0+dy0+cGh5c19jdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgdGRD b2wgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSwg cy0+Zik7CisgICAgZWxzZQorICAgICAgLyogQ3VycmVudGx5IG9uIE5TIGltZy0+bWFzayBpcyBh bHdheXMgMC4gU2luY2UKKyAgICAgICAgIGdldF93aW5kb3dfY3Vyc29yX3R5cGUgc3BlY2lmaWVz IGEgaG9sbG93IGJveCBjdXJzb3Igd2hlbiBvbgorICAgICAgICAgYSBub24tbWFza2VkIGltYWdl IHdlIG5ldmVyIHJlYWNoIHRoaXMgY2xhdXNlLiBCdXQgd2UgcHV0IGl0CisgICAgICAgICBpbiBp biBhbnRpY2lwYXRpb24gb2YgYmV0dGVyIHN1cHBvcnQgZm9yIGltYWdlIG1hc2tzIG9uCisgICAg ICAgICBOUy4gKi8KKyAgICAgIHRkQ29sID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZB Q0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYpOworICAgIH0KKyAgZWxzZQorICAgIHsKKyAgICAg IHRkQ29sID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFj ZSksIHMtPmYpOworICAgIH0KKyAgLyogRHJhdyB1bmRlcmxpbmUsIG92ZXJsaW5lLCBzdHJpa2Ut dGhyb3VnaC4gKi8KKyAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIHRkQ29s LCBici5zaXplLndpZHRoLCBici5vcmlnaW4ueCk7CisgIC8qIERyYXcgcmVsaWVmLCBpZiByZXF1 ZXN0ZWQgKi8KKyAgaWYgKHMtPmltZy0+cmVsaWVmIHx8IHMtPmhsID09RFJBV19JTUFHRV9SQUlT RUQgfHwgcy0+aGwgPT1EUkFXX0lNQUdFX1NVTktFTikKKyAgICB7CisgICAgICBpZiAocy0+aGwg PT0gRFJBV19JTUFHRV9TVU5LRU4gfHwgcy0+aGwgPT0gRFJBV19JTUFHRV9SQUlTRUQpCisgICAg ICAgIHsKKyAgICAgICAgICB0aCA9IHRvb2xfYmFyX2J1dHRvbl9yZWxpZWYgPj0gMCA/CisgICAg ICAgICAgICB0b29sX2Jhcl9idXR0b25fcmVsaWVmIDogREVGQVVMVF9UT09MX0JBUl9CVVRUT05f UkVMSUVGOworICAgICAgICAgIHJhaXNlZF9wID0gKHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VE KTsKKyAgICAgICAgfQorICAgICAgZWxzZQorICAgICAgICB7CisgICAgICAgICAgdGggPSBhYnMg KHMtPmltZy0+cmVsaWVmKTsKKyAgICAgICAgICByYWlzZWRfcCA9IChzLT5pbWctPnJlbGllZiA+ IDApOworICAgICAgICB9CisgICAgICByLm9yaWdpbi54ID0geCAtIHRoOworICAgICAgci5vcmln aW4ueSA9IHkgLSB0aDsKKyAgICAgIHIuc2l6ZS53aWR0aCA9IHMtPnNsaWNlLndpZHRoICsgMip0 aC0xOworICAgICAgci5zaXplLmhlaWdodCA9IHMtPnNsaWNlLmhlaWdodCArIDIqdGgtMTsKKyAg ICAgIG5zX2RyYXdfcmVsaWVmIChyLCB0aCwgcmFpc2VkX3AsCisgICAgICAgICAgICAgICAgICAg ICAgcy0+c2xpY2UueSA9PSAwLAorICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLnkgKyBz LT5zbGljZS5oZWlnaHQgPT0gcy0+aW1nLT5oZWlnaHQsCisgICAgICAgICAgICAgICAgICAgICAg cy0+c2xpY2UueCA9PSAwLAorICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLnggKyBzLT5z bGljZS53aWR0aCA9PSBzLT5pbWctPndpZHRoLCBzKTsKKyAgICB9CisgIC8qIElmIHRoZXJlIGlz IG5vIG1hc2ssIHRoZSBiYWNrZ3JvdW5kIHdvbid0IGJlIHNlZW4sCisgICAgIHNvIGRyYXcgYSBy ZWN0YW5nbGUgb24gdGhlIGltYWdlIGZvciB0aGUgY3Vyc29yLgorICAgICBEbyB0aGlzIGZvciBh bGwgaW1hZ2VzLCBnZXR0aW5nIHRyYW5zcGFyZW5jeSByaWdodCBpcyBub3QgcmVsaWFibGUuICAq LworICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IpCisgICAgeworICAgICAgaW50IHRoaWNrbmVz cyA9IGFicyAocy0+aW1nLT5yZWxpZWYpOworICAgICAgaWYgKHRoaWNrbmVzcyA9PSAwKSB0aGlj a25lc3MgPSAxOworICAgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgfHwg Z2x5cGhfZmxhdm9yID09IE1DX0dMWVBITEVTUykKKyAgICAgIHsKKyAgICAgICAgTlNDb2xvciAq Ym9yZGVyX2NvbG9yID0gW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGdyZWVuOiBsc2wuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHBoYTogMS4wXTsKKyAgICAg ICAgbnNfZHJhd19ib3ggKGJyLCB0aGlja25lc3MsIGJvcmRlcl9jb2xvciwgMSwgMSk7CisgICAg ICB9CisgICAgICBlbHNlCisgICAgICAgIG5zX2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBGUkFN RV9DVVJTT1JfQ09MT1IgKHMtPmYpLCAxLCAxKTsKKyAgICB9Cit9CisKK3N0YXRpYyB2b2lkCitt Y19uc19vdmVyd3JpdHRlbl9oZWxwZXIgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBn bHlwaF9tYXRyaXggKm1hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGds eXBoX3JvdyAqcm93LCBlbnVtIHR5cGVfb2ZfY2FjaGUgY2FjaGVfdHlwZSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCkKK3sKKyAgLy8gbnNfZHJhd191bmRl cndhdmUgKHMsIHMtPndpZHRoLCBzLT54KTsKKyAgTlNDb2xvciAqaG9sbG93X2NvbG9yID0gRlJB TUVfQkFDS0dST1VORF9DT0xPUiAocy0+Zik7CisgIHN0cnVjdCBmYWNlICpmYWNlID0gRkFDRV9G Uk9NX0lEIChzLT5mLCBERUZBVUxUX0ZBQ0VfSUQpOworICBpbnQgcm93X3Zwb3MgPSBNQVRSSVhf Uk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgc3RydWN0IG11bHRpcGxlX2N1cnNvcnNfY2FjaGUg Zm9vX2VsdHM7CisgIHN3aXRjaCAoY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBjYXNlIE5PX0NB Q0hFOgorICAgICAgICB7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNhc2Ug TUNfQ0FDSEU6CisgICAgICAgIHsKKyAgICAgICAgICBmb29fZWx0cy5jYWNoZXMgPSBzLT53LT5t Y19lbHRzLmNhY2hlczsKKyAgICAgICAgICBmb29fZWx0cy5hbGxvY2F0ZWQgPSBzLT53LT5tY19l bHRzLmFsbG9jYXRlZDsKKyAgICAgICAgICBmb29fZWx0cy51c2VkID0gcy0+dy0+bWNfZWx0cy51 c2VkOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBjYXNlIENIX0NBQ0hFOgor ICAgICAgICB7CisgICAgICAgICAgZm9vX2VsdHMuY2FjaGVzID0gcy0+dy0+Y2hfZWx0cy5jYWNo ZXM7CisgICAgICAgICAgZm9vX2VsdHMuYWxsb2NhdGVkID0gcy0+dy0+Y2hfZWx0cy5hbGxvY2F0 ZWQ7CisgICAgICAgICAgZm9vX2VsdHMudXNlZCA9IHMtPnctPmNoX2VsdHMudXNlZDsKKyAgICAg ICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgY2FzZSBGQ19DQUNIRToKKyAgICAgICAgewor ICAgICAgICAgIGZvb19lbHRzLmNhY2hlcyA9IHMtPnctPmZjX2VsdHMuY2FjaGVzOworICAgICAg ICAgIGZvb19lbHRzLmFsbG9jYXRlZCA9IHMtPnctPmZjX2VsdHMuYWxsb2NhdGVkOworICAgICAg ICAgIGZvb19lbHRzLnVzZWQgPSBzLT53LT5mY19lbHRzLnVzZWQ7CisgICAgICAgICAgYnJlYWs7 CisgICAgICAgIH0KKyAgICB9CisgIC8qIFNUUkVUQ0hfR0xZUEggbWF5IGNvbnRhaW4gbW9yZSB0 aGFuIG9uZSBmYWtlIGN1cnNvciBhdCB0aGUgc2FtZSBIUE9TLiAqLworICBmb3IgKGludCBlbHQg PSAwOyBlbHQgPCBmb29fZWx0cy51c2VkOyArK2VsdCkKK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hlc1tlbHRdLmJhY2tncm91bmQuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAuYmx1ZSA9IGZvb19lbHRzLmNhY2hlc1tlbHRdLmJhY2tncm91bmQuYmx1ZX07 CisgICAgICBib29sIGFjdGl2ZV9wID0gZm9vX2VsdHMuY2FjaGVzW2VsdF0uYWN0aXZlX3A7Cisg ICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSBmb29fZWx0cy5jYWNoZXNbZWx0XS5n bHlwaF9mbGF2b3I7CisgICAgICBib29sIGVuYWJsZWRfcCA9IGZvb19lbHRzLmNhY2hlc1tlbHRd LmVuYWJsZWRfcDsKKyAgICAgIGJvb2wgZ29fcCA9ICh2cG9zID09IHJvd192cG9zCisgICAgICAg ICAgICAgICAgICAgJiYgaHBvcyA9PSBnbHlwaC0+aHBvcworICAgICAgICAgICAgICAgICAgICYm IGVuYWJsZWRfcCk7CisgICAgICBpZiAoIWdvX3ApCisgICAgICAgIGNvbnRpbnVlOworICAgICAg TlNSZWN0IHI7CisgICAgICByLm9yaWdpbi54ID0gZng7CisgICAgICByLm9yaWdpbi55ID0gZnk7 CisgICAgICByLnNpemUuaGVpZ2h0ID0gaDsKKyAgICAgIHIuc2l6ZS53aWR0aCA9IHdkOworICAg ICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbF9mZy5yZWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGdyZWVuOiBsc2xfZmcuZ3JlZW4KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBibHVlOiBsc2xfZmcuYmx1ZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF0gc2V0XTsKKyAgaWYgKGN1cnNvcl90eXBlID09 IE1DX0ZSQU1FRF9CT1gpCisgICAgeworICAgICAgTGlzcF9PYmplY3QgYnVmID0gcy0+dy0+Y29u dGVudHM7CisgICAgICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgICAgICBzdHJ1Y3QgYnVmZmVyICpi ID0gWEJVRkZFUiAoYnVmKTsKKyAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChW dHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFO SUxQIChCVkFSIChiLCBtYXJrX2FjdGl2ZSkpKTsKKyAgICAgIHB0cmRpZmZfdCByZWdpb25fYmVn aW5uaW5nID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBYRklYTlVNIChGcmVnaW9uX2JlZ2lubmluZyAo KSkgOiAtMTsKKyAgICAgIHB0cmRpZmZfdCByZWdpb25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkg PyBYRklYTlVNIChGcmVnaW9uX2VuZCAoKSkgOiAtMTsKKyAgICAgIHB0cmRpZmZfdCBvcG9pbnRf cHQgPSAocy0+dyA9PSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gUFQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFhGSVhOVU0g KEZtYXJrZXJfcG9zaXRpb24gKHMtPnctPnBvaW50bSkpOworICAgICAgYm9vbCByZWdpb25faW5f Ym91bmRzX3AgPSAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvcG9pbnRfcHQgPj0gcmVnaW9uX2JlZ2lubmluZworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3B0IDwgcmVnaW9uX2VuZCk7CisgICAgICBpZiAocmVn aW9uX2FjdGl2ZV9wCisgICAgICAgICAgJiYgcmVnaW9uX2luX2JvdW5kc19wCisgICAgICAgICAg JiYgYWN0aXZlX3ApCisgICAgICAgIHsKKyAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2Fj dGl2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X291dF9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChO U19GQUNFX0ZPUkVHUk9VTkQgKGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlKSwgcy0+Zik7 CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfY29s b3I7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKCFyZWdpb25fYWN0aXZlX3AgJiYg YWN0aXZlX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xs b3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJu ICgiKy1yZWFsLWZha2UtY3Vyc29yLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgIHN0cnVj dCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19h Y3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19hY3RpdmVfY29s b3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3df YWN0aXZlX2ZhY2UpLCBzLT5mKTsKKyAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93 X2FjdGl2ZV9jb2xvcjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8qIFRoZSByZWdpb24g aXMgX25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1c2UgdGhlIG92ZXJs YXkgd2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICBlbHNlIGlmICghYWN0 aXZlX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9s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UTUFQOgorICAgICAgICAgIGNhc2Ug TUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAg ICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg Y2FzZSBNQ19GUkFNRURfQk9YOgorICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAg ICAgICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0 UmVjdCAociwgMSwgMSkpOworICAgICAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAocy0+Zikg c2V0XTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoK KyAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAgW2hvbGxvd19jb2xvciBz ZXRdOworICAgICAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAg ICAgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpIHNldF07CisgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICBjYXNlIE1DX0hCQVI6CisgICAgICAgICAgICBOU1JlY3RGaWxsIChy KTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIGNhc2UgTUNfQkFSOgorICAgICAgICAg ICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAg LyogSWYgYSBnbHlwaCBleGlzdHMgKHMtPmNoYXIyYiAhPSBOVUxMKSwgdGhlbiBkcmF3IHRoZSBn bHlwaCBvbiB0b3Agb2YgdGhlCisgICAgICBuZXdseSBkcmF3biByZWN0YW5nbGUgdGhhdCB3YXMg Y3JlYXRlZCBoZXJlaW5hYm92ZS4gIFRvIHRoZSBleHRlbnQgdGhhdCB3ZQorICAgICAgd2FudCB0 byBkb3VibGUtaW1wcmludCBnbHlwaHMgdG8gbWFrZSB0aGVtIGFwcGVhciB0byBiZSBzZW1pLWJv bGQsIGl0IGNhbgorICAgICAgYmUgZG9uZSBoZXJlIGZvciBhbGwgY3Vyc29yIHR5cGVzLiAgVGhl IGJveC1zdHlsZSBjdXJzb3JzIGFyZSBpbXByaW50ZWQKKyAgICAgIHdpdGggZ2x5cGhzIG9ubHkg b25lICgxKSB0aW1lLiAgVGhlIHNlbWktYm9sZCBhcHBlYXJhbmNlIGlzIGhlbHBmdWwgd2hlbgor ICAgICAgZGVidWdnaW5nIHRvIHNlZSB0aGF0IHRoZSBjb29yZGluYXRlcyBhcmUgY29ycmVjdC4g Ki8KKyAgICAgIGlmIChzLT5jaGFyMmIgIT0gTlVMTAorICAgICAgICAgICYmIChjdXJzb3JfdHlw ZSA9PSBNQ19GSUxMRURfQk9YCisgICAgICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0ZS QU1FRF9CT1gKKyAgICAgICAgICAgICAgfHwgY3Vyc29yX3R5cGUgPT0gTUNfSE9MTE9XX0JPWCkp CisgICAgICAgIHsKKyAgICAgICAgICBCT09MIGlzQ29tcG9zaXRlID0gcy0+Zmlyc3RfZ2x5cGgt PnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIOworICAgICAgICAgIGlmIChpc0NvbXBvc2l0ZSkKKyAg ICAgICAgICAgIG5zX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsK KyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0cnVj dCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgICAgICAgICAgICAgICBpZiAoIWZvbnQp CisgICAgICAgICAgICAgICAgICBmb250ID0gRlJBTUVfRk9OVCAocy0+Zik7CisgICAgICAgICAg ICAgICAgYm9vbCB3aXRoX2JnX3AgPSBmYWxzZT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b3VuZCAoc3RydWN0IGdseXBoX3N0cmluZyAqcywgY2hhciBmb3JjZV9wKQoreworICBOU1RS QUNFICgibWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIik7CisgIGlmICghcy0+YmFj a2dyb3VuZF9maWxsZWRfcC8qIHx8IHMtPmhsID09IERSQVdfTU9VU0VfRkFDRSovKQorICAgIHsK KyAgICAgIGludCBib3hfbGluZV93aWR0aCA9IG1heCAocy0+ZmFjZS0+Ym94X2xpbmVfd2lkdGgs IDApOworICAgICAgaWYgKEZPTlRfSEVJR0hUIChzLT5mb250KSA8IHMtPmhlaWdodCAtIDIgKiBi b3hfbGluZV93aWR0aAorICAgICAgICAgIC8qIFdoZW4geGRpc3AuYyBpZ25vcmVzIEZPTlRfSEVJ R0hULCB3ZSBjYW5ub3QgdHJ1c3QgZm9udAorICAgICAgICAgICAgIGRpbWVuc2lvbnMsIHNpbmNl IHRoZSBhY3R1YWwgZ2x5cGhzIG1pZ2h0IGJlIG11Y2gKKyAgICAgICAgICAgICBzbWFsbGVyLiAg U28gaW4gdGhhdCBjYXNlIHdlIGFsd2F5cyBjbGVhciB0aGUgcmVjdGFuZ2xlCisgICAgICAgICAg ICAgd2l0aCBiYWNrZ3JvdW5kIGNvbG9yLiAgKi8KKyAgICAgICAgICB8fCBGT05UX1RPT19ISUdI IChzLT5mb250KQorICAgICAgICAgIHx8IHMtPmZvbnRfbm90X2ZvdW5kX3AgfHwgcy0+ZXh0ZW5k c190b19lbmRfb2ZfbGluZV9wIHx8IGZvcmNlX3ApCisgICAgICB7CisgICAgICAgICAgc3RydWN0 IGZhY2UgKmZhY2U7CisgICAgICAgICAgaWYgKHMtPmhsID09IERSQVdfTU9VU0VfRkFDRSkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwKKyAg ICAgICAgICAgTU9VU0VfSExfSU5GTyAocy0+ZiktPm1vdXNlX2ZhY2VfZmFjZV9pZCk7CisgICAg ICAgICAgICAgIGlmICghZmFjZSkKKyAgICAgICAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lE IChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisg ICAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBzLT5maXJzdF9nbHlwaC0+ZmFj ZV9pZCk7CisgICAgICAgICAgaWYgKCFmYWNlLT5zdGlwcGxlKQorICAgICAgICAgICAgWyhOU19G QUNFX0JBQ0tHUk9VTkQgKGZhY2UpICE9IDAKKyAgICAgICAgICAgICAgPyBuc19sb29rdXBfaW5k ZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSwgcy0+ZikKKyAgICAgICAgICAg ICAgOiBGUkFNRV9CQUNLR1JPVU5EX0NPTE9SIChzLT5mKSkgc2V0XTsKKyAgICAgICAgICBlbHNl CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHN0cnVjdCBuc19kaXNwbGF5X2luZm8gKmRw eWluZm8gPSBGUkFNRV9ESVNQTEFZX0lORk8gKHMtPmYpOworICAgICAgICAgICAgICBbW2RweWlu Zm8tPmJpdG1hcHNbZmFjZS0+c3RpcHBsZS0xXS5pbWcgc3RpcHBsZU1hc2tdIHNldF07CisgICAg ICAgICAgICB9CisgICAgICAgICAgaWYgKHMtPmhsICE9IERSQVdfQ1VSU09SKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBzLT5yZWN0YW5nbGVfbnVrZWRfcCA9IHRydWU7CisgICAgICAg ICAgICAgIE5TUmVjdCByID0gTlNNYWtlUmVjdCAocy0+eCwgcy0+eSArIGJveF9saW5lX3dpZHRo LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+YmFja2dyb3VuZF93aWR0 aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPmhlaWdodC0yKmJveF9s aW5lX3dpZHRoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAgICB9 CisgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICB9CisgICAgfQorfQorCitz dGF0aWMgdm9pZAorbWNfbnNfZHJhd19nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcg KnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAor ICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2ZsYXZv ciBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSB0eXBlX29mX2N1 cnNvciBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgd2QsIGJvb2wg YWN0aXZlX3AsIGJvb2wgY3Vyc29yX2djX3ApCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAg RXh0ZXJuYWwgKFJJRik6IE1haW4gZHJhdy10ZXh0IGNhbGwuCisgICAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworeworICAvKiBUT0RPIChvcHRpbWl6ZSk6IGZvY3VzIGZvciBib3ggYW5kIGNvbnRlbnRz IGRyYXcgKi8KKyAgTlNSZWN0IHJbMl07CisgIGludCBuLCBmbGFnczsKKyAgY2hhciBib3hfZHJh d25fcCA9IDA7CisgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgaWYgKCFm b250KQorICAgIGZvbnQgPSBGUkFNRV9GT05UIChzLT5mKTsKKyAgTlNUUkFDRV9XSEVOIChOU1RS QUNFX0dST1VQX0dMWVBIUywgIm1jX25zX2RyYXdfZ2x5cGhfc3RyaW5nIik7CisgIGlmIChzLT5u ZXh0ICYmIHMtPnJpZ2h0X292ZXJoYW5nICYmICFzLT5mb3Jfb3ZlcmxhcHMpCisgICAgeworICAg ICAgaW50IHdpZHRoOworICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgIGZv ciAod2lkdGggPSAwLCBuZXh0ID0gcy0+bmV4dDsKKyAgICAgICAgICAgbmV4dCAmJiB3aWR0aCA8 IHMtPnJpZ2h0X292ZXJoYW5nOworICAgICAgICAgICB3aWR0aCArPSBuZXh0LT53aWR0aCwgbmV4 dCA9IG5leHQtPm5leHQpCisgICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSAhPSBJ TUFHRV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5 cGgtPnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocy0+bmV4dCwgcik7CisgICAg ICAgICAgICAgICAgaWYgKCFtY19uc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4sIHJvdykpCisg ICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgbWNfbnNfbWF5YmVfZHVt cGdseXBoc19iYWNrZ3JvdW5kIChzLT5uZXh0LCAxKTsKKyAgICAgICAgICAgICAgICBuc19yZXNl dF9jbGlwcGluZyAocy0+Zik7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1jX25zX2R1bXBnbHlwaHNfc3RyZXRjaCAo cy0+bmV4dCwgd2QsIHJvdyk7CisgICAg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3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFtY19uc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4s IHJvdykpCisgICAgICAgIHJldHVybjsKKyAgICAgIG1jX25zX2R1bXBnbHlwaHNfaW1hZ2UgKHMs IHJbMF0sIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgYWN0aXZlX3ApOworICAgICAg bnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBTVFJFVENI X0dMWVBIOgorICAgICAgbWNfbnNfZHVtcGdseXBoc19zdHJldGNoIChzLCB3ZCwgcm93KTsKKyAg ICAgIGlmICgocy0+bGVmdF9vdmVyd3JpdHRlbl9wIHx8IHMtPnJpZ2h0X292ZXJ3cml0dGVuX3Ap CisgICAgICAgICAgJiYgcy0+YWN0aW9uX3R5cGUgPT0gTUNfRFJBV19HTFlQSCkKKyAgICAgICAg bWNfbnNfZHJhd19vdmVyd3JpdHRlbiAocywgbWF0cml4LCByb3csIHMtPmZpcnN0X2dseXBoKTsK KyAgICAgIGJyZWFrOworICAgIGNhc2UgQ0hBUl9HTFlQSDoKKyAgICBjYXNlIENPTVBPU0lURV9H TFlQSDoKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7Cisg ICAgICBpZiAoIW1jX25zX2NsaXBfdG9fcmVjdCAocy0+Ziwgciwgbiwgcm93KSkKKyAgICAgICAg cmV0dXJuOworICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcworICAgICAgICAgIHx8IChzLT5jbXBf ZnJvbSA+IDAKKyAgICAgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21h dGljKSkKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICBlbHNlCisg ICAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZ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dfZm9yZWdyb3VuZCAo cyk7CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBib29sIHdp dGhfYmdfcCA9ICgoZmxhZ3MgPT0gTlNfRFVNUEdMWVBIX05PUk1BTCAmJiAhcy0+YmFja2dyb3Vu ZF9maWxsZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZmxhZ3MgPT0g TlNfRFVNUEdMWVBIX01PVVNFRkFDRSk7CisgICAgICAgICAgICAgIGlmICh3aXRoX2JnX3ApCisg ICAgICAgICAgICAgICAgcy0+YmFja2dyb3VuZF9udWtlZF9wID0gdHJ1ZTsKKyAgICAgICAgICAg ICAgZm9udC0+ZHJpdmVyLT5kcmF3IChzLCBzLT5jbXBfZnJvbSwgcy0+bmNoYXJzLCBzLT54LCBz LT55YmFzZSwgd2l0aF9iZ19wKTsKKyAgICAgICAgICAgIH0KKyAgICAgIH0KKyAgICAgIHsKKyAg ICAgICAgTlNDb2xvciAqY29sID0gKE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgIT0gMAor ICAgICAgICAgICAgICAgICAgICAgICAgPyBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFD RV9GT1JFR1JPVU5EIChzLT5mYWNlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHMtPmYpCisgICAgICAgICAgICAgICAgICAgICAgICA6IEZSQU1F X0ZPUkVHUk9VTkRfQ09MT1IgKHMtPmYpKTsKKyAgICAgICAgW2NvbCBzZXRdOworICAgICAgICAv KiBEcmF3IHVuZGVybGluZSwgb3ZlcmxpbmUsIHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgICBt Y19uc19kcmF3X3RleHRfZGVjb3JhdGlvbiAocywgcy0+ZmFjZSwgY29sLCBzLT53aWR0aCwgcy0+ eCk7CisgICAgICB9CisgICAgICB7CisgICAgICAgIGlmIChzLT5maXJzdF9nb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gICAgICBpZiAoIW1jX25zX2NsaXBfdG9fcmVjdCAocy0+Ziwg ciwgbiwgcm93KSkKKyAgICAgICAgcmV0dXJuOworICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcyB8 fCAocy0+Y21wX2Zyb20gPiAwCisgICAgICAgICAgICAmJiAhIHMtPmZpcnN0X2dseXBoLT51LmNt cC5hdXRvbWF0aWMpKQorICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gMTsKKyAgICAg IGVsc2UKKyAgICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLCBzLT5m aXJzdF9nbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpOworICAgICAgLyogLi4uICovCisg ICAgICAvKiBOb3QgeWV0IGltcGxlbWVudGVkLiAgKi8KKyAgICAgIC8qIC4uLiAqLworICAgICAg bnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAg ICAgIGVtYWNzX2Fib3J0ICgpOworICAgIH0KKyAgLyogRHJhdyBib3ggaWYgbm90IGRvbmUgYWxy ZWFkeS4gKi8KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMgJiYgIWJveF9kcmF3bl9wICYmIHMtPmZh Y2UtPmJveCAhPSBGQUNFX05PX0JPWCkKKyAgICB7CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0 cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFtY19uc19jbGlwX3RvX3JlY3QgKHMt PmYsIHIsIG4sIHJvdykpCisgICAgICAgIHJldHVybjsKKyAgICAgIG5zX2R1bXBnbHlwaHNfYm94 X29yX3JlbGllZiAocyk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgfQor ICBzLT5udW1fY2xpcHMgPSAwOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAogICAgTlNU UkFDRSwgVHJhY2Ugc3VwcG9ydC4KQEAgLTExMDksNiArMjE5NCwxNiBAQCBzdGF0aWMgTlNSZWN0 IGNvbnN0cmFpbl9mcmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNGdWxsc2NyZWVu KQogICAgZXh0ZXJuYWwgKFJJRikgY2FsbDsgd2hvbGUgZnJhbWUsIGNhbGxlZCBiZWZvcmUgdXBk YXRlX3dpbmRvd19iZWdpbgogICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIHsKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRh dGluZ19mcmFtZSA9IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNpZmRlZiBO U19JTVBMX0NPQ09BCiAgIEVtYWNzVmlldyAqdmlldyA9IEZSQU1FX05TX1ZJRVcgKGYpOwogCkBA IC0xMjA5LDYgKzIzMDQsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5fZnJhbWVfcmVjdChO U1JlY3QgZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKIAogLyogICBpZiAoZiA9PSBNT1VT RV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9tb3VzZV9mcmFtZSkgKi8KICAgTU9VU0VfSExfSU5G TyAoZiktPm1vdXNlX2ZhY2VfZGVmZXIgPSAwOworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gTlVM TDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTQ4MDMsNiArNTkw OCwxNyBAQCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlkIGluY29taW5nIGV2ZW50cykuCiAg ICAgICBiYXIgPSBbW0VtYWNzU2Nyb2xsZXIgYWxsb2NdIGluaXRGcmFtZTogciB3aW5kb3c6IHdp bl07CiAgICAgICB3c2V0X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHdpbmRvdywgbWFrZV9taW50X3B0 ciAoYmFyKSk7CiAgICAgICB1cGRhdGVfcCA9IFlFUzsKKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgLyogVGhpcyBpcyBvbmx5IGZv ciBkZWJ1Z2dpbmcgcHVycG9zZXMuICovCisgICAgICBbYmFyIG1jX3NldF9yZWN0YW5nbGU6IHJd OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgfQogICBlbHNlCiAgICAgewpA QCAtNDgxMCwxMiArNTkyNiwzMCBAQCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlkIGluY29t aW5nIGV2ZW50cykuCiAgICAgICBiYXIgPSBYTlNfU0NST0xMX0JBUiAod2luZG93LT52ZXJ0aWNh bF9zY3JvbGxfYmFyKTsKICAgICAgIG9sZFJlY3QgPSBbYmFyIGZyYW1lXTsKICAgICAgIHIuc2l6 ZS53aWR0aCA9IG9sZFJlY3Quc2l6ZS53aWR0aDsKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAgICAgaWYgKEZSQU1FX0xJVkVfUCAoZikg JiYgIU5TRXF1YWxSZWN0cyAob2xkUmVjdCwgcikpCiAgICAgICAgIHsKKyAgICAgICAgICAvKiBU aGUgbWFpbiB3aW5kb3cgaGFzIHByb2JhYmx5IGJlZW4gcmVzaXplZC4gIEdyYWNpb3VzbHkgZGVs ZXRlIHRoZQorICAgICAgICAgIG9sZCBzY3JvbGwgYmFyIHdpdGhvdXQgcmVwYWludGluZyBpdHMg cmVjdGFuZ2xlOyBhbmQsIGNyZWF0ZSBhIG5ldworICAgICAgICAgIHNjcm9sbCBiYXIgZWxzZXdo ZXJlLiovCiAgICAgICAgICAgaWYgKG9sZFJlY3Qub3JpZ2luLnggIT0gci5vcmlnaW4ueCkKKyAg ICAgICAgICAgIHsKICAgICAgICAgICAgICAgbnNfY2xlYXJfZnJhbWVfYXJlYSAoZiwgbGVmdCwg dG9wLCB3aWR0aCwgaGVpZ2h0KTsKKyAgICAgICAgICAgICAgW2JhciBtY19qdWRnZV07CisgICAg ICAgICAgICAgIGJhciA9IFtbRW1hY3NTY3JvbGxlciBhbGxvY10gaW5pdEZyYW1lOiByIHdpbmRv dzogd2luXTsKKyAgICAgICAgICAgICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyICh3aW5kb3cs IG1ha2VfbWludF9wdHIgKGJhcikpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQog ICAgICAgICAgIFtiYXIgc2V0RnJhbWU6IHJdOwogICAgICAgICB9CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKICAgICB9CiAKICAgaWYgKHVwZGF0ZV9wKQpAQCAtNDk3NSw5ICs2MTA5 LDU3IEBAIGluIGNlcnRhaW4gc2l0dWF0aW9ucyAocmFwaWQgaW5jb21pbmcgZXZlbnRzKS4KICAg ICB7CiAgICAgICB2aWV3ID0gW3N1YnZpZXdzIG9iamVjdEF0SW5kZXg6IGldOwogICAgICAgaWYg KCFbdmlldyBpc0tpbmRPZkNsYXNzOiBbRW1hY3NTY3JvbGxlciBjbGFzc11dKSBjb250aW51ZTsK LSAgICAgIGlmIChbdmlldyBqdWRnZV0pCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogYFhTRVRXSU5ET1cnIHdpbGwgc29tZXRpbWVz IGNhdXNlIEVtYWNzIHRvIGNyYXNoIHdoZW4gcnVubmluZyB1bmRlciBnZGIgZXZlbgorICB0aG91 Z2ggKHcgIT0gTlVMTCkuICBUaGVyZWZvcmUsIHdlIGNhbm5vdCByZWxpYWJseSB1c2UgYFdJTkRP V19MSVZFX1AnLiAqLworICBzdHJ1Y3Qgd2luZG93ICp3ID0gW3ZpZXcgbWNfZ2V0X3dpbmRvd107 CisgIGlmICh3ICE9IE5VTEwKKyAgICAgICYmIE5JTFAgKHctPmNvbnRlbnRzKSkKKyAgICB7Cisg ICAgICBCT09MIGRlYnVnX3AgPSBmYWxzZTsKKyAgICAgIGlmIChkZWJ1Z19wCisgICAgICAgICAg LyogYHdpbmRvd19ib3gnIGNhbGxzIGB3aW5kb3dfYm94X2hlaWdodCcsIHdoaWNoIHdpbGwgY2F1 c2UgRW1hY3MgdG8KKyAgICAgICAgICBjcmFzaCBpZiBGUkFNRVAgKHctPmZyYW1lKSBpcyBub3Qg c2F0aXNmaWVkLiAqLworICAgICAgICAgICYmIEZSQU1FUCAody0+ZnJhbWUpKQorICAgICAgICB7 CisgICAgICAgICAgTlNSZWN0IHIwID0gW3ZpZXcgbWNfZ2V0X3JlY3RhbmdsZV07CisgICAgICAg ICAgaW50IHgwID0gTlNNaW5YIChyMCk7CisgICAgICAgICAgaW50IHkwID0gTlNNaW5ZIChyMCk7 CisgICAgICAgICAgaW50IHdkMCA9IE5TV2lkdGggKHIwKTsKKyAgICAgICAgICBpbnQgaDAgPSBO U0hlaWdodCAocjApOworICAgICAgICAgIGludCB3aW5kb3dfeSwgd2luZG93X2hlaWdodDsKKyAg ICAgICAgICB3aW5kb3dfYm94ICh3LCBBTllfQVJFQSwgMCwgJndpbmRvd195LCAwLCAmd2luZG93 X2hlaWdodCk7CisgICAgICAgICAgaW50IHRvcCA9IHdpbmRvd195OworICAgICAgICAgIGludCBo ZWlnaHQgPSB3aW5kb3dfaGVpZ2h0OworICAgICAgICAgIGludCB3aWR0aCA9IFdJTkRPV19DT05G SUdfU0NST0xMX0JBUl9DT0xTICh3KSAqIEZSQU1FX0NPTFVNTl9XSURUSCAoZik7CisgICAgICAg ICAgaW50IGxlZnQgPSBXSU5ET1dfU0NST0xMX0JBUl9BUkVBX1ggKHcpOworICAgICAgICAgIE5T UmVjdCByMSA9IE5TTWFrZVJlY3QgKGxlZnQsIHRvcCwgd2lkdGgsIGhlaWdodCk7CisgICAgICAg ICAgLyogVGhlIHBhcmVudCB2aWV3IGlzIGZsaXBwZWQsIHNvIHdlIG5lZWQgdG8gZmxpcCB5IHZh bHVlLiAqLworICAgICAgICAgIEVtYWNzVmlldyAqZnJhbWVfdmlldyA9IEZSQU1FX05TX1ZJRVcg KGYpOworICAgICAgICAgIE5TUmVjdCB2ID0gW2ZyYW1lX3ZpZXcgZnJhbWVdOworICAgICAgICAg IHIxLm9yaWdpbi55ID0gKHYuc2l6ZS5oZWlnaHQgLSByMS5zaXplLmhlaWdodCAtIHIxLm9yaWdp bi55KTsKKyAgICAgICAgICBpbnQgeDEgPSBOU01pblggKHIxKTsKKyAgICAgICAgICBpbnQgeTEg PSBOU01pblkgKHIxKTsKKyAgICAgICAgICBpbnQgd2QxID0gTlNXaWR0aCAocjEpOworICAgICAg ICAgIGludCBoMSA9IE5TSGVpZ2h0IChyMSk7CisgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAi JXMgLS0gREVBRDpcblwKKyAgICAgICAgICB4MC94MSAoJWQvJWQpIHwgeTAveTEgKCVkLyVkKSB8 IHdkMC93ZDEgKCVkLyVkKSB8IGgwL2gxICglZC8lZClcbiIsCisgICAgICAgICAgbWNfd2luZG93 ICh3KSwgeDAsIHgxLCB5MCwgeTEsIHdkMCwgd2QxLCBoMCwgaDEpOworICAgICAgICB9CisgICAg ICBpZiAoW3ZpZXcgbWNfanVkZ2VdKQogICAgICAgICByZW1vdmVkID0gWUVTOwogICAgIH0KKyAg ICBlbHNlIGlmIChbdmlldyBqdWRnZV0pCisgICAgICByZW1vdmVkID0gWUVTOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCisgICAgfQogCiAgIGlmIChyZW1vdmVkKQogICAgIFtldmll dyB1cGRhdGVGcmFtZVNpemU6IE5PXTsKQEAgLTUxMDYsNiArNjI4OCwyMSBAQCBzdGF0aWMgTGlz cF9PYmplY3QgbnNfc3RyaW5nX3RvX2xpc3Btb2QgKGNvbnN0IGNoYXIgKnMpCiBleHRlcm4gZnJh bWVfcGFybV9oYW5kbGVyIG5zX2ZyYW1lX3Bhcm1faGFuZGxlcnNbXTsKIHN0YXRpYyBzdHJ1Y3Qg cmVkaXNwbGF5X2ludGVyZmFjZSBuc19yZWRpc3BsYXlfaW50ZXJmYWNlID0KIHsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogYHJlZGlz cGxheV9pbnRlcmZhY2UnIGluIGBuc3Rlcm0ubWAgbXVzdCBiZSBpbiB0aGUgZXhhY3Qgc2FtZSBv cmRlciBhcyB0aGUKK2ByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4dGVybi5oYCEgKi8K KworICBtY194X3dyaXRlX2dseXBocywKKyAgbWNfbnNfZHJhd193aW5kb3dfY3Vyc29yLAorICBt Y19uc19kcmF3X2dseXBoX3N0cmluZywKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICBuc19mcmFtZV9wYXJtX2hhbmRsZXJzLAogICB4X3Byb2R1Y2VfZ2x5cGhzLAogICB4X3dyaXRl X2dseXBocywKQEAgLTg3MjEsNiArOTkxOCw0OSBAQCAtIChCT09MKWNhbkJlY29tZU1haW5XaW5k b3cKIAogQGltcGxlbWVudGF0aW9uIEVtYWNzU2Nyb2xsZXIKIAorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLSAodm9pZCltY19zZXRfcmVjdGFu Z2xlOiAoTlNSZWN0KXJlY3QKK3sKKyAgbWNfcmVjdGFuZ2xlID0gcmVjdDsKK30KKworLSAoTlNS ZWN0KW1jX2dldF9yZWN0YW5nbGUKK3sKKyAgcmV0dXJuIG1jX3JlY3RhbmdsZTsKK30KKworLSAo c3RydWN0IHdpbmRvdyAqKW1jX2dldF93aW5kb3cKK3sKKyAgcmV0dXJuIHdpbmRvdzsKK30KKwor LSAoYm9vbCltY19qdWRnZQoreworICBOU1RSQUNFICgiW0VtYWNzU2Nyb2xsZXIgbWNfanVkZ2Vd Iik7CisgIGJvb2wgcmV0ID0gY29uZGVtbmVkOworICBibG9ja19pbnB1dCAoKTsKKyAgaWYgKGNv bmRlbW5lZCkKKyAgICB7CisgICAgICAvKiBlbnN1cmUgb3RoZXIgc2Nyb2xsYmFyIHVwZGF0ZXMg YWZ0ZXIgZGVsZXRpb24gKi8KKyAgICAgIEVtYWNzVmlldyAqdmlldyA9IChFbWFjc1ZpZXcgKilG UkFNRV9OU19WSUVXIChmcmFtZSk7CisgICAgICBpZiAodmlldyAhPSBuaWwpCisgICAgICAgIHZp ZXctPnNjcm9sbGJhcnNOZWVkaW5nVXBkYXRlKys7CisgICAgfQorICBpZiAod2luZG93KQorICAg IHdzZXRfdmVydGljYWxfc2Nyb2xsX2JhciAod2luZG93LCBRbmlsKTsKKyAgd2luZG93ID0gMDsK KyAgW3NlbGYgcmVtb3ZlRnJvbVN1cGVydmlld1dpdGhvdXROZWVkaW5nRGlzcGxheV07CisgIFtz ZWxmIHJlbGVhc2VdOworICB1bmJsb2NrX2lucHV0ICgpOworICByZXR1cm4gcmV0OworfQorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBmb3IgcmVwZWF0IGJ1dHRvbiBwdXNoICov CiAjZGVmaW5lIFNDUk9MTF9CQVJfRklSU1RfREVMQVkgMC41CiAjZGVmaW5lIFNDUk9MTF9CQVJf Q09OVElOVU9VU19ERUxBWSAoMS4wIC8gMTUpCmRpZmYgLS1naXQgYS9zcmMvcGR1bXBlci5jIGIv c3JjL3BkdW1wZXIuYwppbmRleCBjYjI5MTVjLi4zNmQ4YmZlIDEwMDY0NAotLS0gYS9zcmMvcGR1 bXBlci5jCisrKyBiL3NyYy9wZHVtcGVyLmMKQEAgLTI3NzAsNyArMjc3MCw3IEBAI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isgICAgICBsc2wtPmJsdWUgPSAoKEdldEJWYWx1ZSAodGVtcC5waXhlbCkgPDwgOCkg fCBHZXRCVmFsdWUgKHRlbXAucGl4ZWwpKSAvIDY1NTM1LjA7CisgICAgfQorICBlbHNlCisgICAg eworICAgICAgbHNsLT5yZWQgPSAtMS4wOworICAgICAgbHNsLT5ncmVlbiA9IC0xLjA7CisgICAg ICBsc2wtPmJsdWUgPSAtMS4wOworICAgIH0KK30KKworLyogRHJhdyBzdHJldGNoIGdseXBoIHN0 cmluZyBTLiAgKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJhd19zdHJldGNoX2dseXBoX3N0cmlu ZyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKK3sKKyAgZWFzc2VydCAocy0+Zmlyc3RfZ2x5cGgt PnR5cGUgPT0gU1RSRVRDSF9HTFlQSCk7CisgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAg ICAgJiYgIXhfc3RyZXRjaF9jdXJzb3JfcCkKKyAgICB7CisgICAgICAvKiBJZiBgeC1zdHJldGNo LWN1cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3IGEgYmxvY2sgY3Vyc29yIGFzCisgICB3aWRlIGFz IHRoZSBzdHJldGNoIGdseXBoLiAgKi8KKyAgICAgIGludCB3aWR0aCwgYmFja2dyb3VuZF93aWR0 aCA9IHMtPmJhY2tncm91bmRfd2lkdGg7CisgICAgICBpbnQgeCA9IHMtPng7CisgICAgICBpZiAo IXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgeworICAgIGludCBsZWZ0X3ggPSB3aW5kb3dfYm94X2xl ZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOworICAgIGlmICh4IDwgbGVmdF94KQorICAgICAg eworICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IGxlZnRfeCAtIHg7CisgICAgICAgIHggPSBs ZWZ0X3g7CisgICAgICB9CisgIH0KKyAgICAgIGVsc2UKKyAgeworICAgIC8qIEluIFI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gICAmJiAhY3Vyc29yX2djX2ludmlz aWJsZV9va2F5X3ApCisgICAgICAgIGN1cnNvcl9jb2xvciA9IGZhY2UtPmZvcmVncm91bmQ7Cisg ICAgICBpbnQgZGVmYXVsdF9meCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIHgp OworICAgICAgaGRjID0gZ2V0X2ZyYW1lX2RjIChmKTsKKyAgICAgIHczMl9jbGlwX3RvX3JvdyAo dywgcm93LCBURVhUX0FSRUEsIGhkYyk7CisgICAgICBpbnQgcnggPSBmeDsKKyAgICAgIGludCBy eSA9IGZ5OworICAgICAgaW50IHJ3ID0gd2Q7CisgICAgICBpbnQgcmggPSBoOworLyoKKyAgICBm cHJpbnRmIChzdGRlcnIsICJNQ19IQkFSOiAgZnggKCVkKSB8IGZ5ICglZCkgfCB3ZCAoJWQpIHwg aCAoJWQpXG4iLCByeCwgcnksIHJ3LCByaCk7CisqLworICAgICAgdzMyX2ZpbGxfYXJlYSAoZiwg aGRjLCBjdXJzb3JfY29sb3IsIHJ4LCByeSwgcncsIHJoKTsKKyAgICAgIHczMl9zZXRfY2xpcF9y ZWN0YW5nbGUgKGhkYywgTlVMTCk7CisgICAgICByZWxlYXNlX2ZyYW1lX2RjIChmLCBoZGMpOwor ICAgIH0KK30KKworLyogUklGOiBEcmF3IG9yIGNsZWFyIGN1cnNvciBvbiB3aW5kb3cgVy4gICov CitzdGF0aWMgdm9pZAorbWNfdzMyX2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAq dywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisg ICAgICAgICAgICAgICAgICBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5LCBpbnQgaHBvcywg aW50IHZwb3MsIGludCB3ZCwgaW50IGgsCisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdC IGxzbCwgZW51bSB0eXB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jYXJldF9oZHJfaGVpZ2h0 ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgdzMyX3N5c3RlbV9j YXJldF9tb2RlX2hlaWdodCA9IFdJTkRPV19NT0RFX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgICAg ICBQb3N0TWVzc2FnZSAoaHduZCwgV01fSU1FX1NUQVJUQ09NUE9TSVRJT04sIDAsIDApOworICAg ICAgICAgIC8qIElmIHRoZSBzaXplIG9mIHRoZSBhY3RpdmUgY3Vyc29yIGNoYW5nZWQsIGRlc3Ry b3kgdGhlIG9sZAorICAgICAgICAgICAgIHN5c3RlbSBjYXJldC4gICovCisgICAgICAgICAgaWYg KHczMl9zeXN0ZW1fY2FyZXRfaHduZAorICAgICAgICAgICAgICAmJiAodzMyX3N5c3RlbV9jYXJl dF9oZWlnaHQgIT0gaCkpCisgICAgICAgICAgICBQb3N0TWVzc2FnZSAoaHduZCwgV01fRU1BQ1Nf REVTVFJPWV9DQVJFVCwgMCwgMCk7CisgICAgICAgICAgdzMyX3N5c3RlbV9jYXJldF9oZWlnaHQg PSBoOworICAgICAgICAgIC8qIE1vdmUgdGhlIHN5c3RlbSBjYXJldC4gICovCisgICAgICAgICAg UG9zdE1lc3NhZ2UgKGh3bmQsIFdNX0VNQUNTX1RSQUNLX0NBUkVULCAwLCAwKTsKKyAgICAgICAg fQorICAgICAgLyogVGhlIGZyaW5nZSBiaXRtYXBzIGFyZSBwcmVzZW50bHkgaGFuZGxlZCBlbHNl d2hlcmUsIGJ1dCBjb3VsZCBzb21lZGF5CisgICAgICBiZSBtYW5hZ2VkIChpbiBwYXJ0KSBhdCB0 aGlzIHNlY3Rpb24gb2YgY29kZS4gKi8KKyAgICAgIGlmIChyb3ctPmV4YWN0X3dpbmRvd193aWR0 aF9saW5lX3AKKyAgICAgICAgICAmJiAocm93LT5yZXZlcnNlZF9wCisgICAgICAgICAgICAgPyAo aHBvcyA8IDApCisgICAgICAgICAgICAg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gWEZJWE5VTSAoRnJlZ2lvbl9lbmQgKCkpIDogLTE7CisgICAgICBwdHJk aWZmX3Qgb3BvaW50X3B0ID0gKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiBYRklYTlVNIChGbWFya2VyX3Bvc2l0aW9uICh3LT5wb2ludG0pKTsKKyAgICAgIGJvb2wgcmVn aW9uX2luX2JvdW5kc19wID0gKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X3B0ID49IHJlZ2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9wdCA8IHJlZ2lvbl9lbmQpOworICAgICAg aWYgKGN1cnNvcl9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCAmJiBsc2wucmVkID49IDAgJiYg bHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8q IFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnIGJ5IGJv cnJvd2luZyB0aGUKKyAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHcz MmZucy5jLiAgKi8KKyAgICAgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAg ICYmIHJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9u X2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2Ut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BpeGVsJy4gICovCisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0 YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgICAgbWNfdzMyX2Ry YXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBv cywgd2QsIGgpOworICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwg PSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRw dXRfZGF0YS53MzItPmN1cnNvcl9nYycgYnkgYm9ycm93aW5nIHRoZQorICAgICAgICAgICAgICBm dW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHczMmZucy5jLiAgKi8KKyAgICAgICAgICAg ICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgcmVnaW9uX2luX2Jv dW5kc19wCisgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFj ZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJz b3ItcmVnaW9uLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAq aG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2 ZV9yZWdpb25fZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93 X2Fj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WVkX2ZhY2UgKHcsIGYsIGludGVy biAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAg ICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xs b3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdy b3VuZCA9IGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfZmFjZS0+ Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2Ug aWYgKCFyZWdpb25fYWN0aXZlX3AgJiYgYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lk ID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1m YWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3df YWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7Cisg ICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZl X2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tn cm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICAgICAgL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isgICAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3AgPSB0cnVlOworICAgICAgICAgICAg ICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBo cG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlw aF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAg ICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MgPSBvcmlnaW5hbF9jdXJzb3Jf Z2M7CisgICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIG1jX3cz Ml9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBj YXNlIE1DX0hPTExPV19CT1g6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wu Z3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVt cG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICAqLwor ICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7 CisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICA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cnNvcl9nYycuICAqLworICAgICAgICAgIGJvb2wgY3Vy c29yX2djX3AgPSB0cnVlOworICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRy aXgsIHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsIGxzbCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9w LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2Mg PSBvcmlnaW5hbF9jdXJzb3JfZ2M7CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3Jf Z2NfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcsIG1hdHJp eCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVf cCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfZ2NfcCk7CisgICAg ICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfQkFSOgorICAgIHsKKyAg ICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkK KyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2Rh dGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzIt PmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2lu dmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3Ig KHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLCBjdXJzb3Jf d2lkdGgsIE1DX0JBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYt Pm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOwor ICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1 cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY193MzJfZHJh d19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3 ZCwgaCwgY3Vyc29yX3dpZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsK KyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IQkFSOgorICAg IHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUg Pj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0 cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0 YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgIGJvb2wgY3Vyc29y X2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9j dXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLCBj dXJzb3Jfd2lkdGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAg ICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9w aXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAg Ym9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNf dzMyX2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywg dnBvcywgd2QsIGgsIGN1cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9v a2F5X3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBkZWZhdWx0Ogor ICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KKyAgICB9Cit9CisKKy8qIERyYXcgZ2x5cGggc3Ry aW5nIFMuICAqLworc3RhdGljIHZvaWQKK21jX3czMl9kcmF3X2dseXBoX3N0cmluZyAoc3RydWN0 IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5 cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNs LCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAg IGVudW0gdHlwZV9vZl9jdXJzb3IgY3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAg ICAgICAgICAgICAgICAgICAgICAgIGJvb2wgYWN0aXZlX3AsIGJvb2wgY3Vyc29yX2djX3ApCit7 CisgIGJvb2wgcmVsaWVmX2RyYXduX3AgPSAwOworICAvKiBJZiBTIGRyYXdzIGludG8gdGhlIGJh Y2tncm91bmQgb2YgaXRzIHN1Y2Nlc3NvciwgZHJhdyB0aGUKKyAgICAgYmFja2dyb3VuZCBvZiB0 aGUgc3VjY2Vzc29yIGZpcnN0IHNvIHRoYXQgUyBjYW4gZHJhdyBpbnRvIGl0LgorICAgICBUaGlz IG1ha2VzIFMtPm5leHQgdXNlIFhEcmF3U3RyaW5nIGluc3RlYWQgb2YgWERyYXdJbWFnZVN0cmlu Zy4gICovCisgIGlmIChzLT5uZXh0ICYmIHMtPnJpZ2h0X292ZXJoYW5nICYmICFzLT5mb3Jfb3Zl cmxhcHMpCisgICAgeworICAgICAgaW50IHdpZHRoOworICAgICAgc3RydWN0IGdseXBoX3N0cmlu ZyAqbmV4dDsKKyAgICAgIGZvciAod2lkdGggPSAwLCBuZXh0ID0gcy0+bmV4dDsKKyAgICAgICAg ICAgbmV4dCAmJiB3aWR0aCA8IHMtPnJpZ2h0X292ZXJoYW5nOworICAgICAgICAgICB3aWR0aCAr PSBuZXh0LT53aWR0aCwgbmV4dCA9IG5leHQtPm5leHQpCisgICAgICAgIGlmIChuZXh0LT5maXJz dF9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBt Y193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAobmV4dCwgY3Vyc29yX2djX3ApOworICAgICAgICAg ICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBwaW5nIChuZXh0KTsKKyAgICAgICAgICAgIGlmIChu ZXh0LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBTVFJFVENIX0dMWVBIKQorICAgICAgICAgICAgICBt Y193MzJfZHJhd19zdHJldGNoX2dseXBoX3N0cmluZyAobmV4dCk7CisgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbm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Aocy0+Y21wX2Zyb20gPiAw CisgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkKKyAgICAg ICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICBlbHNlCisgICAgICAgIHhf ZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1ZSk7CisgICAgICB4X2RyYXdfY29t cG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgIGJyZWFrOworICAgIGNh c2UgR0xZUEhMRVNTX0dMWVBIOgorICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcykKKyAgICAgICAg cy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICBlbHNlCisgICAgICAgIHhfZHJh d19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgZmFsc2UpOworICAgICAgeF9kcmF3X2dseXBo bGVzc19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBkZWZh dWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgICAgfQorICBpZiAoIXMtPmZvcl9vdmVybGFw cykKKyAgICB7CisgICAgICAvKiBEcmF3IHVuZGVybGluZS4gICovCisgICAgICBpZiAocy0+ZmFj ZS0+dW5kZXJsaW5lX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJs aW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9XQVZFKQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBDT0xPUlJFRiBjb2xvcjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9k ZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICBjb2xvciA9IHMtPmdjLT5mb3JlZ3JvdW5kOwor ICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgY29sb3IgPSBzLT5mYWNlLT51bmRl cmxpbmVfY29sb3I7CisgICAgICAgICAgICAgIHczMl9kcmF3X3VuZGVyd2F2ZSAocywgY29sb3Ip OworICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90 eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgdW5z aWduZWQgbG9uZyB0aGlja25lc3MsIHBvc2l0aW9uOworICAgICAgICAgICAgICBpbnQgeTsKKyAg ICAgICAgICAgICAgaWYgKHMtPnByZXYgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3AKKyAg ICAgICAgICAgICAgICAgICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0Vf VU5ERVJfTElORSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAvKiBXZSB1 c2UgdGhlIHNhbWUgdW5kZXJsaW5lIHN0eWxlIGFzIHRoZSBwcmV2aW91cyBvbmUuICAqLworICAg ICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+cHJldi0+dW5kZXJsaW5lX3RoaWNrbmVzczsK KyAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9u OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHRoaWNrbmVzcy4gIERl ZmF1bHQgaXMgMSBwaXhlbC4gICovCisgICAgICAgICAgICAgICAgICBpZiAocy0+Zm9udCAmJiBz LT5mb250LT51bmRlcmxpbmVfdGhpY2tuZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgdGhp Y2tuZXNzID0gcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gMTsKKyAgICAgICAgICAgICAg ICAgIGlmICh4X3VuZGVybGluZV9hdF9kZXNjZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAg IHBvc2l0aW9uID0gKHMtPmhlaWdodCAtIHRoaWNrbmVzcykgLSAocy0+eWJhc2UgLSBzLT55KTsK KyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHBvc2l0aW9uLiAgVGhpcyBpcyB0aGUg cmVjb21tZW5kZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICB2ZXJ0aWNhbCBvZmZzZXQgaW4g cGl4ZWxzIGZyb20gdGhlIGJhc2VsaW5lIHRvIHRoZSB0b3Agb2YKKyAgICAgICAgICAgICAgICAg ICAgICAgICB0aGUgdW5kZXJsaW5lLiAgVGhpcyBpcyBhIHNpZ25lZCB2YWx1ZSBhY2NvcmRpbmcg dG8gdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY3MsIGFuZCBpdHMgZGVmYXVsdCBp cworICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EICgobWF4aW11bV9kZXNjZW50KSAvIDIp LCB3aXRoCisgICAgICAgICAgICAgICAgICAgICAgICAgUk9VTkQgKHgpID0gZmxvb3IgKHggKyAw LjUpICAqLworICAgICAgICAgICAgICAgICAgICAgIGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRp b25fcHJvcGVydGllcworICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzLT5mb250ICYmIHMt PmZvbnQtPnVuZGVybGluZV9wb3NpdGlvbiA+PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAg cG9zaXRpb24gPSBzLT5mb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAg ICAgICAgZWxzZSBpZiAocy0+Zm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9u ID0gKHMtPmZvbnQtPmRlc2NlbnQgKyAxKSAvIDI7CisgICAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbWF4IChwb3NpdGlvbiwgdW5kZXJsaW5lX21pbmlt dW1fb2Zmc2V0KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIC8qIENoZWNrIHRo ZSBzYW5pdHkgb2YgdGhpY2tuZXNzIGFuZCBwb3NpdGlvbi4gIFdlIHNob3VsZAorICAgICAgICAg ICAgICAgICBhdm9pZCBkcmF3aW5nIHVuZGVybGluZSBvdXQgb2YgdGhlIGN1cnJlbnQgbGluZSBh cmVhLiAgKi8KKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPD0gcy0+eWJhc2Ug KyBwb3NpdGlvbikKKyAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSAxKSAt IChzLT55YmFzZSAtIHMtPnkpOworICAgICAgICAgICAgICBpZiAocy0+eSArIHMtPmhlaWdodCA8 IHMtPnliYXNlICsgcG9zaXRpb24gKyB0aGlja25lc3MpCisgICAgICAgICAgICAgICAgdGhpY2tu ZXNzID0gKHMtPnkgKyBzLT5oZWlnaHQpIC0gKHMtPnliYXNlICsgcG9zaXRpb24pOworICAgICAg ICAgICAgICBzLT51bmRlcmxpbmVfdGhpY2tuZXNzID0gdGhpY2tuZXNzOworICAgICAgICAgICAg ICBzLT51bmRlcmxpbmVfcG9zaXRpb24gPXBvc2l0aW9uOworICAgICAgICAgICAgICB5ID0gcy0+ eWJhc2UgKyBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9k ZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMs IHMtPmdjLT5mb3JlZ3JvdW5kLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHksIHMtPndpZHRoLCAxKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHcz Ml9maWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yLCBzLT54 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHksIHMtPndpZHRoLCAxKTsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRHJhdyBvdmVybGluZS4gICovCisgICAgICBp ZiAocy0+ZmFjZS0+b3ZlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVkIGxv bmcgZHkgPSAwLCBoID0gMTsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+b3ZlcmxpbmVfY29sb3Jf ZGVmYXVsdGVkX3ApCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMt PmdjLT5mb3JlZ3JvdW5kLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+eSAr IGR5LCBzLT53aWR0aCwgaCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHczMl9m aWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPngsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOworICAg ICAgICB9CisgICAgICAvKiBEcmF3IHN0cmlrZS10aHJvdWdoLiAgKi8KKyAgICAgIGlmIChzLT5m YWNlLT5zdHJpa2VfdGhyb3VnaF9wCisgICAgICAgICAgJiYgIUZPTlRfVEVYVE1FVFJJQyAocy0+ Zm9udCkudG1TdHJ1Y2tPdXQpCisgICAgICAgIHsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGgg PSAxOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZHkgPSAocy0+aGVpZ2h0IC0gaCkgLyAyOwor ICAgICAgICAgIGlmIChzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvcl9kZWZhdWx0ZWRfcCkK KyAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+Z2MtPmZvcmVncm91 bmQsIHMtPngsIHMtPnkgKyBkeSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPndpZHRo LCBoKTsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBz LT5oZGMsIHMtPmZhY2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yLCBzLT54LAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgcy0+eSArIGR5LCBzLT53aWR0aCwgaCk7CisgICAgICAgIH0KKyAgICAg IC8qIERyYXcgcmVsaWVmIGlmIG5vdCB5ZXQgZHJhd24uICAqLworICAgICAgaWYgKCFyZWxpZWZf ZHJhd25fcCAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gpCisgICAgICAgIHhfZHJhd19n bHlwaF9zdHJpbmdfYm94IChzKTsKKyAgICAgIGlmIChzLT5wcmV2KQorICAgICAgICB7CisgICAg ICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqcHJldjsKKyAgICAgICAgICBmb3IgKHByZXYgPSBz LT5wcmV2OyBwcmV2OyBwcmV2ID0gcHJldi0+cHJldikKKyAgICAgICAgICAgIGlmIChwcmV2LT5o bCAhPSBzLT5obAorICAgICAgICAgICAgICAgICYmIHByZXYtPnggKyBwcmV2LT53aWR0aCArIHBy ZXYtPnJpZ2h0X292ZXJoYW5nID4gcy0+eCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgIC8qIEFzIHByZXYgd2FzIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLCB3 ZQorICAgICAgICAgICAgICAgICAgIG11c3QgZHJhdyB0aGUgcmlnaHRfb3ZlcmhhbmcgcGFydCB1 c2luZyBzLT5obCBub3cuICAqLworICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFj ZSBzYXZlID0gcHJldi0+aGw7CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzLT5obDsKKyAg ICAgICAgICAgICAgICBtY193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAocHJldiwgY3Vyc29yX2dj X3ApOworICAgICAgICAgICAgICAgIHhfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19leGFjdGx5 IChzLCBwcmV2KTsKKyAgICAgICAgICAgICAgICBpZiAocHJldi0+Zmlyc3RfZ2x5cGgtPnR5cGUg PT0gQ0hBUl9HTFlQSCkKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfZm9y ZWdyb3VuZCAocHJldik7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAg eF9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocHJldik7CisgICAgICAg ICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAocHJldi0+aGRjLCBOVUxMKTsKKyAgICAg ICAgICAgICAgICBwcmV2LT5obCA9IHNhdmU7CisgICAgICAgICAgICAgICAgcHJldi0+bnVtX2Ns aXBzID0gMDsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocy0+bmV4dCkK KyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKm5leHQ7CisgICAgICAg ICAgZm9yIChuZXh0ID0gcy0+bmV4dDsgbmV4dDsgbmV4dCA9IG5leHQtPm5leHQpCisgICAgICAg ICAgICBpZiAobmV4dC0+aGwgIT0gcy0+aGwKKyAgICAgICAgICAgICAgICAmJiBuZXh0LT54IC0g bmV4dC0+bGVmdF9vdmVyaGFuZyA8IHMtPnggKyBzLT53aWR0aCkKKyAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgIC8qIEFzIG5leHQgd2lsbCBiZSBkcmF3biB3aGlsZSBjbGlwcGVkIHRv IGl0cyBvd24gYXJlYSwKKyAgICAgICAgICAgICAgICAgICB3ZSBtdXN0IGRyYXcgdGhlIGxlZnRf b3ZlcmhhbmcgcGFydCB1c2luZyBzLT5obCBub3cuICAqLworICAgICAgICAgICAgICAgIGVudW0g ZHJhd19nbHlwaHNfZmFjZSBzYXZlID0gbmV4dC0+aGw7CisgICAgICAgICAgICAgICAgbmV4dC0+ aGwgPSBzLT5obDsKKyAgICAgICAgICAgICAgICBtY193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAo bmV4dCwgY3Vyc29yX2djX3ApOworICAgICAgICAgICAgICAgIHhfc2V0X2dseXBoX3N0cmluZ19j bGlwcGluZ19leGFjdGx5IChzLCBuZXh0KTsKKyAgICAgICAgICAgICAgICBpZiAobmV4dC0+Zmly c3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSCkKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19n bHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAobmV4dCk7CisgICAgICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICAgICAgeF9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAo bmV4dCk7CisgICAgICAgICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAobmV4dC0+aGRj LCBOVUxMKTsKKyAgICAgICAgICAgICAgICBuZXh0LT5obCA9IHNhdmU7CisgICAgICAgICAgICAg ICAgbmV4dC0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICAgICAgICBuZXh0LT5jbGlwX2hlYWQg PSBzLT5uZXh0OworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIC8qIFJlc2V0 IGNsaXBwaW5nLiAgKi8KKyAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAocy0+aGRjLCBOVUxMKTsK KyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIEZyaW5nZSBiaXRtYXBzLiAgKi8KIAogc3Rh dGljIGludCBtYXhfZnJpbmdlX2JtcCA9IDA7CkBAIC01NDUsNiArMTM5OCwxNSBAQCB4X3VwZGF0 ZV9iZWdpbiAoc3RydWN0IGZyYW1lICpmKQogICBpZiAoISBGUkFNRV9XMzJfUCAoZikpCiAgICAg cmV0dXJuOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAvKiBSZWdlbmVyYXRlIGRpc3BsYXkgcGFsZXR0ZSBiZWZvcmUgZHJhd2lu ZyBpZiBsaXN0IG9mIHJlcXVlc3RlZAogICAgICBjb2xvcnMgaGFzIGNoYW5nZWQuICovCiAgIGlm IChkaXNwbGF5X2luZm8tPnJlZ2VuX3BhbGV0dGUpCkBAIC03NTQsNiArMTYxNiwxNiBAQCB4X3Vw ZGF0ZV9lbmQgKHN0cnVjdCBmcmFtZSAqZikKIAogICAvKiBNb3VzZSBoaWdobGlnaHQgbWF5IGJl IGRpc3BsYXllZCBhZ2Fpbi4gICovCiAgIE1PVVNFX0hMX0lORk8gKGYpLT5tb3VzZV9mYWNlX2Rl ZmVyID0gZmFsc2U7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBOVUxMOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiB9CiAKIApAQCAtNDA0MSwxMyArNDkxMyw3NCBAQCB3MzJfc2V0 X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHN0cnVjdCB3aW5kb3cgKncsCiAJICAgICAgcmVsZWFzZV9m cmFtZV9kYyAoZiwgaGRjKTsKIAkgICAgICB4X2NsZWFyX3VuZGVyX2ludGVybmFsX2JvcmRlciAo Zik7CiAJICAgIH0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJ UExFLUNVUlNPUlMgKi8KKworLyogUkVQQUlOVElORyBXSEVOIFJFTU9WSU5HIFNDUk9MTCBCQVI6 CisKKy0gU2VxdWVuY2Ugb2YgRXZlbnRzOgorCisgIC4gYHJlZGlzcGxheV9pbnRlcm5hbCcgY2Fs bHMgdGhlIGBjb25kZW1uX3Njcm9sbF9iYXJzX2hvb2snLCB3aGljaCBtYXJrcyBhbGwKKyAgICBz Y3JvbGwgYmFycyBhcyBjYW5kaWRhdGVzIGZvciBkZWxldGlvbi4KKworICAuIFRoZW4gYHJlZGlz cGxheV9pbnRlcm5hbCcgY2FsbHMgYHJlZGlzcGxheV93aW5kb3dzJywgd2hpY2ggd2Fsa3MgdGhl CisgICAgd2luZG93LXRyZWUgYW5kIGV4YW1pbmVzIGVhY2ggd2luZG93LCB3aGVyZWJ5IGVhY2gg d2luZG93IHRoYXQgaXMgc3RpbGwgYWxpdmUKKyAgICBpbiB0aGUgd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ICAgICBhcmVhIG9mIHRoZSBwYXJlbnQgd2luZG93IG5vdyBleHBvc2VkIHdpbGwgYmUgcmVmcmVz aGVkLiAgKi8KLSAgICAgICAgICBteV9zaG93X3dpbmRvdyAoZiwgaHduZCwgU1dfSElERSk7Ci0v KiogICAgICAgICAgIE1vdmVXaW5kb3cgKGh3bmQsIGxlZnQsIHRvcCwgd2lkdGgsIG1heCAoaGVp Z2h0LCAxKSwgVFJVRSk7ICoqLwotCSAgLyogVHJ5IHRvIG5vdCBkcmF3IG92ZXIgY2hpbGQgZnJh bWVzLiAgKi8KLQkgIFNldFdpbmRvd1BvcyAoaHduZCwgSFdORF9CT1RUT00sIGxlZnQsIHRvcCwg d2lkdGgsIG1heCAoaGVpZ2h0LCAxKSwKLSAgICAgICAgICAgICAgICAgICAgICAgIFNXUF9GUkFN RUNIQU5HRUQpOworICAgICAgICAgIGlmIChsZWZ0IDw9IGJhci0+bGVmdCkKKyAgICAgICAgICAg IG15X3Nob3dfd2luZG93IChmLCBod25kLCBTV19ISURFKTsKKyAgICAgICAgICBNb3ZlV2luZG93 IChod25kLCBsZWZ0LCB0b3AsIHdpZHRoLCBtYXggKGhlaWdodCwgMSksIGxlZnQgPD0gYmFyLT5s ZWZ0KTsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCiAKIAkgIHNpLmNiU2l6ZSA9IHNpemVvZiAoc2kpOwogCSAgc2kuZk1hc2sgPSBTSUZf UkFOR0U7CkBAIC00MzE2LDYgKzUyNDksMjEgQEAgdzMyX2p1ZGdlX3Njcm9sbF9iYXJzIChzdHJ1 Y3QgZnJhbWUgKmYpCiAgICAgewogICAgICAgc3RydWN0IHNjcm9sbF9iYXIgKmIgPSBYU0NST0xM X0JBUiAoYmFyKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICAgICAgLyogYERlc3Ryb3lXaW5kb3cnIHdpdGhpbiBgeF9zY3JvbGxfYmFy X3JlbW92ZScgcmVwYWludHMgdGhlIHJlY3RhbmdsZS4KKyAgICAgIFRoZXJlZm9yZSwgd2UgZmly c3Qgc2VuZCBhIG1lc3NhZ2UgdG8gaW5oaWJpdCByZXBhaW50aW5nLiAqLworICAgICAgaWYgKCFX SU5ET1dfTElWRV9QIChiLT53aW5kb3cpKQorICAgICAgICB7CisgICAgICAgICAgSFdORCBod25k ID0gU0NST0xMX0JBUl9XMzJfV0lORE9XIChiKTsKKyAgICAgICAgICBTZW5kTWVzc2FnZSAoaHdu ZCwgV01fU0VUUkVEUkFXLCBmYWxzZSwgMCk7CisgICAgICAgIH0KKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICAgICAgeF9zY3JvbGxfYmFyX3JlbW92ZSAoYik7CiAKICAgICAgIG5l eHQgPSBiLT5uZXh0OwpAQCAtNzA5MSw2ICs4MDM5LDIxIEBAIGV4dGVybiBmcmFtZV9wYXJtX2hh bmRsZXIgdzMyX2ZyYW1lX3Bhcm1faGFuZGxlcnNbXTsKIAogc3RhdGljIHN0cnVjdCByZWRpc3Bs YXlfaW50ZXJmYWNlIHczMl9yZWRpc3BsYXlfaW50ZXJmYWNlID0KIHsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogYHJlZGlzcGxheV9p bnRlcmZhY2UnIGluIGB3MzJ0ZXJtLmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIg YXMgdGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAg bWNfeF93cml0ZV9nbHlwaHMsCisgIG1jX3czMl9kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1jX3cz Ml9kcmF3X2dseXBoX3N0cmluZywKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3 MzJfZnJhbWVfcGFybV9oYW5kbGVycywKICAgeF9wcm9kdWNlX2dseXBocywKICAgeF93cml0ZV9n bHlwaHMsCmRpZmYgLS1naXQgYS9zcmMvd2luZG93LmggYi9zcmMvd2luZG93LmgKaW5kZXggZmRl ZjQwNy4uZjI5NzViZSAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5oCisrKyBiL3NyYy93aW5kb3cu aApAQCAtODgsNiArODgsODQgQEAgZGlzcGxheSB0aGUgbWVudSBiYXIgb3IgdGhlIHRvb2wgYmFy ICh3aGVuIEVtYWNzIHVzZXMgdG9vbGtpdHMgdGhhdAogZG9uJ3QgZGlzcGxheSB0aGVpciBvd24g bWVudSBiYXIgYW5kIHRvb2wgYmFyKSBvciBhIHRvb2x0aXAgaW4gYQogdG9vbHRpcCBmcmFtZSAo d2hlbiB0b29sdGlwcyBhcmUgbm90IGRpc3BsYXkgYnkgdGhlIHRvb2xraXQpLiAgKi8KIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor LyogU3VmZml4ZXMgZm9yIHRoZSBgbWNgIHdpbmRvdyBwb2ludGVyIHByZWZpeC4gKi8KK3N0cnVj dCBtdWx0aXBsZV9jdXJzb3JzCit7CisgIC8qIFRoZSByZWNvcmRlZCBwaXhlbCB3aWR0aCBvZiB0 aGUgbGFzdCBsaW5lIG51bWJlciBkcmF3biBkdXJpbmcgcmVkaXNwbGF5ICovCisgIGludCBsbnVt X3BpeGVsX3dpZHRoOworfTsKKworc3RydWN0IG11bHRpcGxlX2N1cnNvcnNfY2FjaGUKK3sKKyAg cHRyZGlmZl90IGFsbG9jYXRlZDsKKyAgcHRyZGlmZl90IHVzZWQ7CisgIGVudW0gdHlwZV9vZl9j YWNoZQorICAgIHsKKyAgICAgIE5PX0NBQ0hFLAorICAgICAgTUNfQ0FDSEUsCisgICAgICBDSF9D QUNIRSwKKyAgICAgIEZDX0NBQ0hFCisgICAgfSBjYWNoZV90eXBlOworICBzdHJ1Y3QgaXRlbXNf aW5fY2FjaGUKKyAgICB7CisgICAgICBpbnQgeDsKKyAgICAgIGludCBmeDsKKyAgICAgIGludCB5 OworICAgICAgaW50IGZ5OworICAgICAgaW50IGhwb3M7CisgICAgICBpbnQgdnBvczsKKyAgICAg IGludCB3ZDsKKyAgICAgIGludCBoOworICAgICAgZW51bSB0eXBlX29mX2N1cnNvcgorICAgICAg ICB7CisgICAgICAgICAgLyogTk9URTogIFRoZSBmcmluZ2UgYml0bWFwIGZyYW1ld29yayByZWxp ZXMgdXBvbiBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAgICAgSEFWSU5HIEEgVkFMVUUgT0Yg WkVSTyAoMCkuICovCisgICAgICAgICAgTUNfTk9fRlJJTkdFX0JJVE1BUCwKKyAgICAgICAgICBN Q19OT19DVVJTT1IsCisgICAgICAgICAgTUNfUklHSFRfRlJJTkdFX0JJVE1BUCwKKyAgICAgICAg ICBNQ19MRUZUX0ZSSU5HRV9CSVRNQVAsCisgICAgICAgICAgTUNfRlJBTUVEX0JPWCwKKyAgICAg ICAgICBNQ19GSUxMRURfQk9YLAorICAgICAgICAgIE1DX0hPTExPV19CT1gsCisgICAgICAgICAg TUNfQkFSLAorICAgICAgICAgIE1DX0hCQVIKKyAgICAgICAgfSBjdXJzb3JfdHlwZTsKKyAgICAg IGludCBjdXJzb3Jfd2lkdGg7CisgICAgICBzdHJ1Y3QgUkdCCisgICAgICAgIHsKKyAgICAgICAg ICBkb3VibGUgcmVkOworICAgICAgICAgIGRvdWJsZSBncmVlbjsKKyAgICAgICAgICBkb3VibGUg Ymx1ZTsKKyAgICAgICAgfSBmb3JlZ3JvdW5kLCBiYWNrZ3JvdW5kOworICAgICAgYm9vbCBhY3Rp dmVfcDsKKyAgICAgIGVudW0gbWNfZmxhdm9yCisgICAgICAgIHsKKyAgICAgICAgICBOT19GTEFW T1IsCisgICAgICAgICAgTUNfR0xZUEgsCisgICAgICAgICAgTUNfR0xZUEhMRVNTLAorICAgICAg ICAgIE1DX09WRVJMQVlfQVJST1dfQklUTUFQLAorICAgICAgICAgIE1DX1BJTENST1csCisgICAg ICAgICAgTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVywKKyAgICAgICAgICBNQ19SRVZF UlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XLAorICAgICAgICAgIE1DX0hPTExPV19S RUNUQU5HTEUsCisgICAgICAgICAgTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XLAorICAgICAg ICAgIE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVywKKyAgICAgICAgICBNQ19W RVJUSUNBTF9CQVIsCisgICAgICAgICAgTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSLAorICAgICAg ICAgIE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgfSBnbHlwaF9mbGF2b3I7Cisg ICAgICBib29sIGVuYWJsZWRfcDsKKyAgICB9ICpjYWNoZXM7Cit9OworCisvKiBlbmQgTVVMVElQ TEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RydWN0IGN1cnNv cl9wb3MKIHsKICAgLyogUGl4ZWwgcG9zaXRpb24uICBUaGVzZSBhcmUgYWx3YXlzIHdpbmRvdyBy ZWxhdGl2ZS4gICovCkBAIC0zMjQsNiArNDAyLDIxIEBAIHN0cnVjdCB3aW5kb3cKIAogI2lmZGVm IEhBVkVfV0lORE9XX1NZU1RFTQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCisgICAgc3RydWN0IG11bHRpcGxlX2N1cnNvcnMgbWM7CisKKyAg ICBzdHJ1Y3QgbXVsdGlwbGVfY3Vyc29yc19jYWNoZSBtY19lbHRzOworCisgICAgc3RydWN0IG11 bHRpcGxlX2N1cnNvcnNfY2FjaGUgY2hfZWx0czsKKworICAgIHN0cnVjdCBtdWx0aXBsZV9jdXJz b3JzX2NhY2hlIGZjX2VsdHM7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAv KiBDdXJzb3IgdHlwZSBvZiBsYXN0IGN1cnNvciBkcmF3biBvbiB0aGUgd2luZG93LiAgKi8KICAg ICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIHBoeXNfY3Vyc29yX3R5cGU7CiAKQEAgLTExMjAsNiAr MTIxMywxNSBAQCBleHRlcm4gdm9pZCByZWRpc3BsYXlfb3RoZXJfd2luZG93cyAodm9pZCk7CiAK IHN0cnVjdCBnbHlwaCAqZ2V0X3BoeXNfY3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICp3KTsK IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor c3RydWN0IGdseXBoICptY19nZXRfY3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1 Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IGhwb3Ms IGludCB2cG9zKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyogVHJ1ZSBpZiBX SU5ET1cgaXMgYSB2YWxpZCB3aW5kb3cuICAqLwogI2RlZmluZSBXSU5ET1dfVkFMSURfUChXSU5E T1cpCQkJCQlcCiAgIChXSU5ET1dQIChXSU5ET1cpICYmICFOSUxQIChYV0lORE9XIChXSU5ET1cp LT5jb250ZW50cykpCVwKZGlmZiAtLWdpdCBhL3NyYy94ZGlzcC5jIGIvc3JjL3hkaXNwLmMKaW5k ZXggYTg4ZmM2OS4uODkyNDgxZiAxMDA2NDQKLS0tIGEvc3JjL3hkaXNwLmMKKysrIGIvc3JjL3hk aXNwLmMKQEAgLTkyMSw2ICs5MjEsNDA5MCBAQCBzdGF0aWMgdm9pZCBzaG93X21vdXNlX2ZhY2Ug KE1vdXNlX0hMSW5mbyAqLCBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UpOwogc3RhdGljIGJvb2wgY29v cmRzX2luX21vdXNlX2ZhY2VfcCAoc3RydWN0IHdpbmRvdyAqLCBpbnQsIGludCk7CiAKIAorLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8q IE1VTFRJUExFLUNVUlNPUlM6ICBFbWFjcyBCdWcgIzIyODczIChmZWF0dXJlIHJlcXVlc3QpCisK KyAgQ1JPU1NIQUlSUzogIEVtYWNzIEJ1ZyAjMTc2ODQgKGZlYXR1cmUgcmVxdWVzd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AgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9z dHJpbmcgKiwgc3RydWN0IGdseXBoX3N0cmluZyAqKTsKK3N0YXRpYyB2b2lkIGFwcGVuZF9nbHlw aF9zdHJpbmdfbGlzdHMgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKiosIHN0cnVjdCBnbHlwaF9zdHJp bmcgKiosCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5 cGhfc3RyaW5nICosIHN0cnVjdCBnbHlwaF9zdHJpbmcgKik7CitzdGF0aWMgdm9pZCBpbml0X2ds eXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0cmluZyAqLCBNQ19PUFRJT05BTF9IREMgKGhkYykg WENoYXIyYiAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCB3aW5kb3cg Kiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gZ2x5cGhfcm93X2FyZWEsIGludCwgZW51bSBkcmF3X2dseXBoc19mYWNlKTsKK3N0YXRpYyB2 b2lkIGNvbXB1dGVfb3ZlcmhhbmdzX2FuZF94IChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICosIGludCwg Ym9vbCk7CitzdGF0aWMgc3RydWN0IGdseXBoX3N0cmluZyAqIGdseXBoX3N0cmluZ19jb250YWlu aW5nX2JhY2tncm91bmRfd2lkdGggKHN0cnVjdCBnbHlwaF9zdHJpbmcgKik7CitzdGF0aWMgdm9p ZCBzZXRfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmRfd2lkdGggKHN0cnVjdCBnbHlwaF9zdHJpbmcg KiwgaW50LCBpbnQpOworc3RhdGljIGludCBmaWxsX2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBo X3N0cmluZyAqLCBpbnQsIGludCwgaW50LCBpbnQpOworc3RhdGljIGludCBmaWxsX2dzdHJpbmdf Z2x5cGhfc3R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QlcCisJCU1DX0JVSUxEX0NPTVBPU0lURV9HTFlQSF9TVFJJTkcgKFNUQVJULCBF TkQsIEhFQUQsIFRBSUwsCVwKKwkJCQkJICAgICAgSEwsIFgsIExBU1RfWCk7CQlcCisJICAgICAg YnJlYWs7CQkJCQkJCVwKKwkJCQkJCQkJCVwKKwkgICAgY2FzZSBTVFJFVENIX0dMWVBIOgkJCQkJ CVwKKwkgICAgICBNQ19CVUlMRF9TVFJFVENIX0dMWVBIX1NUUklORyAoU1RBUlQsIEVORCwgSEVB RCwgVEFJTCwJXAorCQkJCQkgIEhMLCBYLCBMQVNUX1gpOwkJXAorCSAgICAgIGJyZWFrOwkJCQkJ CQlcCisJCQkJCQkJCQlcCisJICAgIGNhc2UgSU1BR0VfR0xZUEg6CQkJCQkJXAorCSAgICAgIE1D X0JVSUxEX0lNQUdFX0dMWVBIX1NUUklORyAoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwJCVwKKwkJ CQkJSEwsIFgsIExBU1RfWCk7CQkJXAorCSAgICAgIGJyZWFrOworCisjZGVmaW5lIE1DX0JVSUxE X0dMWVBIX1NUUklOR1NfWFcoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwgSEwsIFgsIExBU1RfWCkJ XAorICAgICAgICAgICAgY2FzZSBYV0lER0VUX0dMWVBIOiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgICBNQ19CVUlMRF9YV0lER0VUX0dMWVBI X1NUUklORyAoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwgICAgICAgXAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgSEwsIFgsIExBU1RfWCk7ICAgICAgICAgICAgICAg XAorICAgICAgICAgICAgICBicmVhazsKKworI2RlZmluZSBNQ19CVUlMRF9HTFlQSF9TVFJJTkdT XzIoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwgSEwsIFgsIExBU1RfWCkJXAorCSAgICBjYX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PCBjb3VudCk7CisgIExpc3BfT2JqZWN0IHZhbCA9IEZjb25zIChh cmcsIFFuaWwpOworICBMaXNwX09iamVjdCB0YWlsID0gdmFsOworICB2YV9saXN0IGFwOworICB2 YV9zdGFydCAoYXAsIGFyZyk7CisgIGZvciAocHRyZGlmZl90IGkgPSAxOyBpIDwgY291bnQ7IGkr KykKKyAgICB7CisgICAgICBMaXNwX09iamVjdCBlbGVtID0gRmNvbnMgKHZhX2FyZyAoYXAsIExp c3BfT2JqZWN0KSwgUW5pbCk7CisgICAgICBYU0VUQ0RSICh0YWlsLCBlbGVtKTsKKyAgICAgIHRh aWwgPSBlbGVtOworICAgIH0KKyAgdmFfZW5kIChhcCk7CisgIHJldHVybiB2YWw7Cit9CisKK0xp c3BfT2JqZWN0CittY19tZW1xIChMaXNwX09iamVjdCBlbHQsIExpc3BfT2JqZWN0IGxpc3QpCit7 CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpIHx8IEVRIChYQ0FS IChsaXN0KSwgZWx0KSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7 CisgICAgICBpZiAoIUNPTlNQIChsaXN0KSB8fCBFUSAoWENBUiAobGlzdCksIGVsdCkpCisgICAg ICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAo bGlzdCkgfHwgRVEgKFhDQVIgKGxpc3QpLCBlbHQpKQorICAgICAgICBicmVhazsKKyAgICAgIGxp c3QgPSBYQ0RSIChsaXN0KTsKKyAgICB9CisgIHJldHVybiBsaXN0OworfQorCitMaXNwX09iamVj dAorbWNfbnRoIChpbnQgbnVtLCBMaXNwX09iamVjdCBsaXN0KQoreworICBmb3IgKGludCBpID0g MDsgaSA8IG51bSAmJiAhTklMUCAobGlzdCk7IGkrKykKKyAgICBsaXN0ID0gWENEUiAobGlzdCk7 CisgIGlmIChDT05TUCAobGlzdCkpCisgICAgcmV0dXJuIFhDQVIgKGxpc3QpOworICAgIGVsc2UK KyAgICAgIHJldHVybiBRbmlsOworfQorCitMaXNwX09iamVjdAorbWNfYXNzcSAoTGlzcF9PYmpl Y3Qga2V5LCBMaXNwX09iamVjdCBsaXN0KQoreworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBp ZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAg ICAgICAgICAgICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVh azsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisg ICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhD QVIgKFhDQVIgKGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhD RFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1Ag KFhDQVIgKGxpc3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBr ZXkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgfQor ICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FSIChsaXN0KTsKKyAgICBlbHNlCisg ICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QKK21jX2Fzc29jIChMaXNwX09iamVj dCBrZXksIExpc3BfT2JqZWN0IGxpc3QpCit7CisgIExpc3BfT2JqZWN0IGNhcjsKKyAgd2hpbGUg KDEpCisgICAgeworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1Ag KFhDQVIgKGxpc3QpKQorICAgICAgICAgICAgICAmJiAoY2FyID0gWENBUiAoWENBUiAobGlzdCkp LAorICAgICAgICAgICAgICAgICAgRVEgKGNhciwga2V5KSB8fCAhTklMUCAoRmVxdWFsIChjYXIs IGtleSkpKSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAg ICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1AgKFhDQVIgKGxpc3QpKQor ICAgICAgICAgICAgICAmJiAoY2FyID0gWENBUiAoWENBUiAobGlzdCkpLAorICAgICAgICAgICAg ICAgICAgRVEgKGNhciwga2V5KSB8fCAhTklMUCAoRmVxdWFsIChjYXIsIGtleSkpKSkpCisgICAg ICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAo bGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1AgKFhDQVIgKGxpc3QpKQorICAgICAgICAgICAgICAm JiAoY2FyID0gWENBUiAoWENBUiAobGlzdCkpLAorICAgICAgICAgICAgICAgICAgRVEgKGNhciwg a2V5KSB8fCAhTklMUCAoRmVxdWFsIChjYXIsIGtleSkpKSkpCisgICAgICAgIGJyZWFrOworICAg ICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAgIH0KKyAgaWYgKENPTlNQIChsaXN0KSkKKyAgICBy ZXR1cm4gWENBUiAobGlzdCk7CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK0xp c3BfT2JqZWN0CittY19wbGlzdF9nZXQgKExpc3BfT2JqZWN0IHBsaXN0LCBMaXNwX09iamVjdCBw cm9wKQoreworICBMaXNwX09iamVjdCB0YWlsLCBoYWxmdGFpbDsKKyAgLyogaGFsZnRhaWwgaXMg dXNlZCB0byBkZXRlY3QgY2lyY3VsYXIgbGlzdHMuICAqLworICB0YWlsID0gaGFsZnRhaWwgPSBw bGlzdDsKKyAgd2hpbGUgKENPTlNQICh0YWlsKSAmJiBDT05TUCAoWEN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yAgICAg IGlmICh3aWR0aCA+PSAwKQorICB7CisgICAgcHRyZGlmZl90IHN0YXJ0OworICAgIGlmIChPVkVS TEFZUCAob3ZlcmxheSkpCisgICAgICAqZW5kcG9zID0gT1ZFUkxBWV9QT1NJVElPTiAoT1ZFUkxB WV9FTkQgKG92ZXJsYXkpKTsKKyAgICBlbHNlCisgICAgICBnZXRfcHJvcGVydHlfYW5kX3Jhbmdl IChwb3MsIFFkaXNwbGF5LCAmdmFsLCAmc3RhcnQsIGVuZHBvcywgUW5pbCk7CisgICAgLyogRm9y IDpyZWxhdGl2ZS13aWR0aCwgd2UgbmVlZCB0byBtdWx0aXBseSBieSB0aGUgY29sdW1uCisgICAg ICAgd2lkdGggb2YgdGhlIGNoYXJhY3RlciBhdCBQT1MsIGlmIGl0IGlzIGdyZWF0ZXIgdGhhbiAx LiAqLworICAgIGlmICghTklMUCAobWNfcGxpc3RfZ2V0IChwbGlzdCwgUUNyZWxhdGl2ZV93aWR0 aCkpCisgICAgICAgICYmICFOSUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwgZW5hYmxlX211bHRp Ynl0ZV9jaGFyYWN0ZXJzKSkpCisgICAgICB7CisgICAgICAgIGludCBiLCB3ZDsKKyAgICAgICAg dW5zaWduZWQgY2hhciAqcCA9IEJZVEVfUE9TX0FERFIgKENIQVJfVE9fQllURSAocG9zKSk7Cisg ICAgICAgIE1DX01VTFRJQllURV9CWVRFU19XSURUSCAocCwgYnVmZmVyX2Rpc3BsYXlfdGFibGUg KCksIGIsIHdkKTsKKyAgICAgICAgd2lkdGggKj0gd2Q7CisgICAgICB9CisgICAgcmV0dXJuIHdp ZHRoOworICB9CisgICAgfQorICByZXR1cm4gLTE7Cit9CisKKy8qIFNjYW5uaW5nIGZyb20gdGhl IGJlZ2lubmluZyBvZiB0aGUgY3VycmVudCBsaW5lLCBzdG9wIGF0IHRoZSBidWZmZXIKKyAgIHBv c2l0aW9uIEVORFBPUyBvciBhdCB0aGUgY29sdW1uIEd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T0RFX1AgKGMpKQorICAgICYmIFZFQ1RPUlAgKERJU1BfQ0hBUl9WRUNUT1IgKGRw LCBjKSkpCisgIHsKKyAgICBMaXNwX09iamVjdCBjaGFydmVjOworICAgIHB0cmRpZmZfdCBpLCBu OworICAgIC8qIFRoaXMgY2hhcmFjdGVyIGlzIGRpc3BsYXllZCB1c2luZyBhIHZlY3RvciBvZiBn bHlwaHMuCisgICAgICAgVXBkYXRlIHRoZSBjb2x1bW4vcG9zaXRpb24gYmFzZWQgb24gdGhvc2Ug Z2x5cGhzLiAqLworICAgIGNoYXJ2ZWMgPSBESVNQX0NIQVJfVkVDVE9SIChkcCwgYyk7CisgICAg biA9IEFTSVpFIChjaGFydmVjKTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgbjsgaSsrKQorICAgICAg eworICAgICAgICAvKiBUaGlzIHNob3VsZCBiZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisgICAgIG5l eHRfZWxlbWVudF9mcm9tX2Rpc3BsYXlfdmVjdG9yIGRvZXMgaXQuICovCisgICAgICAgIExpc3Bf T2JqZWN0IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7CisgICAgICAgIGlmIChHTFlQSF9DT0RF X1AgKGVudHJ5KSkKKyAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgIGVs c2UKKyAgICBjID0gJyAnOworICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgIGdvdG8gZW5kbG9v cDsKKyAgICAgICAgaWYgKGMgPT0gJ1xyJyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNl bGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQorICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgaWYgKGMg PT0gJ1x0JykKKyAgICB7CisgICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgY29sID0gY29s IC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgIH0KKyAgICAgICAgZWxzZQorICAgICsrY29s OworICAgICAgfQorICB9CisgICAgICBlbHNlCisgIHsKKyAgICAvKiBUaGUgZGlzcGxheSB0YWJs ZSBkb2Vzbid0IGFmZmVjdCB0aGlzIGNoYXJhY3RlcjsKKyAgICAgICBpdCBkaXNwbGF5cyBhcyBp dHNlbGYuICovCisgICAgaWYgKGMgPT0gJ1xuJykKKyAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICBp ZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3Bs YXkpLCBRdCkpCisgICAgICBnb3RvIGVuZGxvb3A7CisgICAgaWYgKGMgPT0gJ1x0JykKKyAgICAg IHsKKyAgICAgICAgY29sICs9IHRhYl93aWR0aDsKKyAgICAgICAgY29sID0gY29sIC8gdGFiX3dp ZHRoICogdGFiX3dpZHRoOworICAgICAgfQorICAgIGVsc2UgaWYgKG11bHRpYnl0ZSAmJiBMRUFE SU5HX0NPREVfUCAoYykpCisgICAgICB7CisgICAgICAgIC8qIFN0YXJ0IG9mIG11bHRpLWJ5dGUg Zm9ybS4gKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAqcHRyOworICAgICAgICBpbnQgYnl0ZXMs IHdpZHRoOworICAgICAgICBwdHIgPSBCWVRFX1BPU19BRERSIChzY2FuX2J5dGUpOworICAgICAg ICBNQ19NVUxUSUJZVEVfQllURVNfV0lEVEggKHB0ciwgZHAsIGJ5dGVzLCB3aWR0aCk7CisgICAg ICAgIC8qIFN1YnRyYWN0IG9uZSB0byBjb21wZW5zYXRlIGZvciB0aGUgaW5jcmVtZW50CisgICAg IHRoYXQgaXMgZ29pbmcgdG8gaGFwcGVuIGJlbG93LiAqLworICAgICAgICBzY2FuX2J5dGUgKz0g Ynl0ZXMgLSAxOworICAgICAgICBjb2wgKz0gd2lkdGg7CisgICAgICB9CisgICAgZWxzZSBpZiAo Y3RsX2Fycm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3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HJkaWZmX3QgaSwgbjsKKyAgICAgIExpc3BfT2JqZWN0IGNo YXJ2ZWM7CisgICAgICBpZiAocHRyID09IHN0b3ApCisgIHsKKyAgICAvKiBXZSBzdG9wcGVkIGVp dGhlciBmb3IgdGhlIGJlZ2lubmluZyBvZiB0aGUgYnVmZmVyCisgICAgICAgb3IgZm9yIHRoZSBn YXAuICovCisgICAgaWYgKHB0ciA9PSBCRUdWX0FERFIpCisgICAgICBicmVhazsKKyAgICAvKiBJ dCB3YXMgdGhlIGdhcC4gIEp1bXAgYmFjayBvdmVyIGl0LiAqLworICAgIHN0b3AgPSBCRUdWX0FE RFI7CisgICAgcHRyID0gR1BUX0FERFI7CisgICAgLyogQ2hlY2sgd2hldGhlciB0aGF0IGJyaW5n cyB1cyB0byBiZWdpbm5pbmcgb2YgYnVmZmVyLiAqLworICAgIGlmIChCRUdWID49IEdQVCkKKyAg ICAgIGJyZWFrOworICB9CisgICAgICBjID0gKi0tcHRyOworICAgICAgaWYgKGRwICYmIFZFQ1RP UlAgKERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKSkpCisgIHsKKyAgICBjaGFydmVjID0gRElTUF9D SEFSX1ZFQ1RPUiAoZHAsIGMpOworICAgIG4gPSBBU0laRSAoY2hhcnZlYyk7CisgIH0KKyAgICAg IGVsc2UKKyAgeworICAgIGNoYXJ2ZWMgPSBRbmlsOworICAgIG4gPSAxOworICB9CisgICAgICBm b3IgKGkgPSBuIC0gMTsgaSA+PSAwOyAtLWkpCisgIHsKKyAgICBpZiAoVkVDVE9SUCAoY2hhcnZl YykpCisgICAgICB7CisgICAgICAgIC8qIFRoaXMgc2hvdWxkIGJlIGhhbmRsZWQgdGhlIHNhbWUg YXMKKyAgICAgbmV4dF9lbGVtZW50X2Zyb21fZGlzcGxheV92ZWN0b3IgZG9lcyBpdC4gKi8KKyAg ICAgICAgTGlzcF9PYmplY3QgZW50cnkgPSBBUkVGIChjaGFydmVjLCBpKTsKKyAgICAgICAgaWYg KEdMWVBIX0NPREVfUCAoZW50cnkpKQorICAgIGMgPSBHTFlQSF9DT0RFX0NIQVIgKGVudHJ5KTsK KyAgICAgICAgZWxzZQorICAgIGMgPSAnICc7CisgICAgICB9CisgICAgaWYgKGMgPj0gMDQwICYm IGMgPCAwMTc3KQorICAgICAgY29sKys7CisgICAgZWxzZSBpZiAoYyA9PSAnXG4nCisgICAgICAg fHwgKGMgPT0gJ1xyJworICAgICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNl bGVjdGl2ZV9kaXNwbGF5KSwgUXQpKSkKKyAgICAgIHsKKyAgICAgICAgcHRyKys7CisgICAgICAg IGdvdG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgIH0KKyAgICBlbHNlIGlmIChjID09ICdc dCcpCisgICAgICB7CisgICAgICAgIGlmICh0YWJfc2VlbikKKyAgICBjb2wgPSAoKGNvbCArIHRh Yl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICBwb3N0X3RhYiArPSBj b2w7CisgICAgICAgIGNvbCA9IDA7CisgICAgICAgIHRhYl9zZWVuID0gMTsKKyAgICAgIH0KKyAg ICBlbHNlIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgIC8qIFdpdGggYSBkaXNwbGF5IHRh YmxlIGVudHJ5LCBDIGlzIGRpc3BsYXllZCBhcyBpcywgYW5kCisgICAgICAgICBub3QgZGlzcGxh eWVkIGFzIFxOTk4gb3IgYXMgXk4uICBJZiBDIGlzIGEgc2luZ2xlLWJ5dGUKKyAgICAgICAgIGNo YXJhY3RlciwgaXQgdGFrZXMgb25lIGNvbHVtbi4gIElmIEMgaXMgbXVsdGktYnl0ZSBpbgorICAg ICAgICAgYSB1bmlieXRlIGJ1ZmZlciwgaXQncyB0cmFuc2xhdGVkIHRvIHVuaWJ5dGUsIHNvIGl0 CisgICAgICAgICBhbHNvIHRha2VzIG9uZSBjb2x1bW4uICovCisgICAgICArK2Nv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TkRPVyAoJXMpIiwgbWNfd2luZG93ICh3 KSk7ICovCitjaGFyICoKK21jX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdykKK3sKKyAgTGlzcF9P YmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICByZXR1cm4gU1NEQVRB IChGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpKTsKK30KKworLyogVVNBR0U6ICBmcHJp bnRmIChzdGRlcnIsICJDSEFSQUNURVIgKCVzKSIsIG1jX2NoYXJfdG9fc3RyaW5nIChnbHlwaC0+ dS5jaCkpOyAqLworY2hhciAqCittY19jaGFyX3RvX3N0cmluZyAoaW50IGFyZykKK3sKKyAgTGlz cF9PYmplY3QgY2hhcmFjdGVyID0gKDAgPD0gYXJnICYmIGFyZyA8PSBNQVhfQ0hBUikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gRmNoYXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51bSAoYXJn KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsKKyAgY2hhciAqIHJlc3VsdCA9 ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICYmIGFyZyA9PSA5KQorICAg ICAgICAgICAgICAgICAgICA/ICJcXHQiCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hh cmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnID09IDEwKQorICAgICAgICAgICAg ICAgICAgICA/ICJcXG4iCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQor ICAgICAgICAgICAgICAgICAgICAgJiYgYXJnID09IDMyKQorICAgICAgICAgICAgICAgICAgICA/ ICJcXHMiCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAg ICAgICAgICAgICAgJiYgYXJnICE9IDkKKyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyAhPSAx MAorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9IDMyKQorICAgICAgICAgICAgICAgICAg ICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgOiAiXFw/IjsKKyAgcmV0 dXJuIHJlc3VsdDsKK30KKworaW50CittY19saXNwX3RvX2N1cnNvcl90eXBlIChMaXNwX09iamVj dCBhcmcpCit7CisgIGNoYXIgKnN0cjsKKyAgaWYgKFhUWVBFIChhcmcpID09IExpc3BfU3RyaW5n KQorICAgIHN0ciA9IFNTREFUQSAoYXJnKTsKKyAgICBlbHNlIGlmIChYVFlQRSAoYXJnKSA9PSBM aXNwX1N5bWJvbCkKKyAgICAgIHN0ciA9IFNTREFUQSAoU1lNQk9MX05BTUUgKGFyZykpOworICAg ICAgZWxzZSByZXR1cm4gLTE7CisgIGlmICghc3RyY21wIChzdHIsICJubyIpKQorICAgIHJldHVy biBNQ19OT19DVVJTT1I7CisgIGlmICghc3RyY21wIChzdHIsICJtYy1sZWZ0LWZyaW5nZS1iaXRt YXAiKSkKKyAgICByZXR1cm4gTUNfTEVGVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAo c3RyLCAibWMtcmlnaHQtZnJpbmdlLWJpdG1hcCIpKQorICAgIHJldHVybiBNQ19SSUdIVF9GUklO R0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAiYm94IikpCisgICAgcmV0dXJuIE1DX0ZJ TExFRF9CT1g7CisgIGlmICghc3RyY21wIChzdHIsICJmcmFtZWQiKSkKKyAgICByZXR1cm4gTUNf RlJBTUVEX0JPWDsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgImhvbGxvdyIpKQorICAgIHJldHVybiBN Q19IT0xMT1dfQk9YOworICBpZiAoIXN0cmNtcCAoc3RyLCAiYmFyIikpCisgICAgcmV0dXJuIE1D X0JBUjsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgImhiYXIiKSkKKyAgICByZXR1cm4gTUNfSEJBUjsK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B0aGF0IHRoZSBtYWNybworICAgICBNQ19CVUlMRF9HTFlQSF9TVFJJTkdTIHdp bGwgbW9kaWZ5IGl0cyBzdGFydCBwYXJhbWV0ZXIuICBUaGF0J3MKKyAgICAgdGhlIHJlYXNvbiB3 ZSB1c2UgYSBzZXBhcmF0ZSB2YXJpYWJsZSBgaScuICovCisgIGkgPSBzdGFydDsKKyAgVVNFX1NB RkVfQUxMT0NBOworICBNQ19CVUlMRF9HTFlQSF9TVFJJTkdTIChpLCBlbmQsIGhlYWQsIHRhaWws IGhsLCB4LCBsYXN0X3gpOworICBpZiAodGFpbCkKKyAgICB7CisgICAgICBzID0gZ2x5cGhfc3Ry aW5nX2NvbnRhaW5pbmdfYmFja2dyb3VuZF93aWR0aCAodGFpbCk7CisgICAgICB4X3JlYWNoZWQg PSBzLT54ICsgcy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICB9CisgIGVsc2UKKyAgICB4X3JlYWNo ZWQgPSB4OworICAvKiBJZiB0aGVyZSBhcmUgYW55IGdseXBocyB3aXRoIGxiZWFyaW5nIDwgMCBv ciByYmVhcmluZyA+IHdpZHRoIGluCisgICAgIHRoZSByb3csIHJlZHJhdyBzb21lIGdseXBocyBp biBmcm9udCBvciBmb2xsb3dpbmcgdGhlIGdseXBoCisgICAgIHN0cmluZ3MgYnVpbHQgYWJvdmUu ICovCisgIGlmIChoZWFkICYmICFvdmVybGFwcyAmJiByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5n X2dseXBoc19wKQorICAgIHsKKyAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKmgsICp0OworICAg ICAgTW91c2VfSExJbmZvICpobGluZm8gPSBNT1VTRV9ITF9JTkZPIChmKTsKKyAgICAgIGludCBt b3VzZV9iZWdfY29sIFVOSU5JVCwgbW91c2VfZW5kX2NvbCBVTklOSVQ7CisgICAgICBib29sIGNo ZWNrX21vdXNlX2ZhY2UgPSBmYWxzZTsKKyAgICAgIGludCBkdW1teV94ID0gMDsKKyAgICAgIC8q IElmIG1vdXNlIGhpZ2hsaWdodGluZyBpcyBvbiwgd2UgbWF5IG5lZWQgdG8gZHJhdyBhZGphY2Vu dAorICAgZ2x5cGhzIHVzaW5nIG1vdXNlLWZhY2UgaGlnaGxpZ2h0aW5nLiAqLworICAgICAgaWYg KGFyZWEgPT0gVEVYVF9BUkVBICYmIHJvdy0+bW91c2VfZmFjZV9wCisgICAgJiYgaGxpbmZvLT5t b3VzZV9mYWNlX2JlZ19yb3cgPj0gMAorICAgICYmIGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93 ID49IDApCisgIHsKKyAgICBwdHJkaWZmX3Qgcm93X3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJv dywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgIGlmIChyb3dfdnBvcyA+PSBobGluZm8tPm1vdXNl X2ZhY2VfYmVnX3JvdworICAgICAgICAmJiByb3dfdnBvcyA8PSBobGluZm8tPm1vdXNlX2ZhY2Vf ZW5kX3JvdykKKyAgICAgIHsKKyAgICAgICAgY2hlY2tfbW91c2VfZmFjZSA9IHRydWU7CisgICAg ICAgIG1vdXNlX2JlZ19jb2wgPSAocm93X3Zwb3MgPT0gaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19y b3cpCisgICAgICAgICAgICAgICAgICAgICAgICA/IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfY29s CisgICAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgICAgICAgIG1vdXNlX2VuZF9jb2wgPSAo cm93X3Zwb3MgPT0gaGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cpCisgICAgICAgICAgICAgICAg ICAgICAgICA/IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfY29sCisgICAgICAgICAgICAgICAgICAg ICAgICA6IHJvdy0+dXNlZFtURVhUX0FSRUFdOworICAgICAgfQorICB9CisgICAgICAvKiBDb21w dXRlIG92ZXJoYW5ncyBmb3IgYWxsIGdseXBoIHN0cm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SBjbGlwX3RhaWw7CisgICAgfQorICAgIH0KKyAgLyogRHJhdyBhbGwgc3RyaW5ncy4gKi8KKyAg Zm9yIChzID0gaGVhZDsgczsgcyA9IHMtPm5leHQpCisgICAgRlJBTUVfUklGIChmKS0+bWNfc2Ny aWJlX3N0cmluZyAocywgbWF0cml4LCByb3csIGxzbCwgZ2x5cGhfZmxhdm9yLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsIGN1 cnNvcl9nY19wKTsKKyNpZm5kZWYgSEFWRV9OUworICAvKiBXaGVuIGZvY3VzIGEgc29sZSBmcmFt ZSBhbmQgbW92ZSBob3Jpem9udGFsbHksIHRoaXMgY2xlYXJzIG9uX3AKKyAgICAgY2F1c2luZyBh IGZhaWx1cmUgdG8gZXJhc2UgcHJldiBjdXJzb3IgcG9zaXRpb24uICovCisgIGlmIChhcmVhID09 IFRFWFRfQVJFQQorICAgICAgJiYgIXJvdy0+ZnVsbF93aWR0aF9wCisgICAgICAvKiBXaGVuIGRy YXdpbmcgb3ZlcmxhcHBpbmcgcm93cywgb25seSB0aGUgZ2x5cGggc3RyaW5ncycKKyAgICAgIGZv cmVncm91bmQgaXMgZHJhd24sIHdoaWNoIGRvZXNuJ3QgZXJhc2UgYSBjdXJzb3IgY29tcGxldGVs eS4gKi8KKyAgICAgICYmICFvdmVybGFwcykKKyAgICB7CisgICAgICBpbnQgeDAgPSBjbGlwX2hl YWQgPyBjbGlwX2hlYWQtPnggOiAoaGVhZCA/IGhlYWQtPnggOiB4KTsKKyAgICAgIGludCB4MSA9 IChjbGlwX3RhaWwgPyBjbGlwX3RhaWwtPnggKyBjbGlwX3RhaWwtPmJhY2tncm91bmRfd2lkdGgK KyAgICAgICAgICAgICAgICAgICAgICAgICAgOiAodGFpbCA/IHRhaWwtPnggKyB0YWlsLT5iYWNr Z3JvdW5kX3dpZHRoIDogeCkpOworICAgICAgeDAgLT0gYXJlYV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BkcmF3X2dseXBocyBmb3IgdGhlIG1lYW5pbmcg b2YgSEwuICovCit2b2lkCittY19kcmF3X2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqdywg c3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAg ICAgICAgICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIGhsLCBpbnQgeCwgaW50IGhw b3MsIGludCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBl bnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgZW51bSB0 eXBlX29mX2N1cnNvciBjdXJzb3JfdHlwZSwgaW50IHdkLCBib29sIGFjdGl2ZV9wLAorICAgICAg ICAgICAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3ApCit7CisgIHN0cnVjdCBnbHlwaF9yb3cg KmJvdHRvbV9yb3cgPSBNQVRSSVhfQk9UVE9NX1RFWFRfUk9XIChtYXRyaXgsIHcpOworICBpbnQg Ym90dG9tX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGJvdHRvbV9yb3csIG1hdHJpeCk7CisvKgor ICAgICAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSBtY19nZXRfY3Vyc29yX2dseXBoICh3 LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19k cmF3X2N1cnNvcl9nbHlwaDogIGNoICglZCkgfCB4ICglZCksIGhwb3MgKCVkKSwgdnBvcyglZCks IGhsICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9nbHlwaC0+dS5jaCwg eCwgaHBvcywgdnBvcywgaGwpOworKi8KKyAgYmxvY2tfaW5wdXQgKCk7CisgIG1jX2RyYXdfZ2x5 cGhzICh3LCBtYXRyaXgs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gIm1jX2VyYXNlX2N1cnNvcjogIHJldHVybiAoJWQpXG4iLCAxKTsKKyAgICAgIHJldHVy bjsKKyAgICB9CisgIC8qIFZQT1MgPj0gbWF0cml4LT5ucm93cyBtZWFucyB0aGF0IHdpbmRvdyBo YXMgYmVlbiByZXNpemVkLgorICAgICBEb24ndCBib3RoZXIgdG8gZXJhc2UgdGhlIGN1cnNvci4g Ki8KKyAgaWYgKHZwb3MgPj0gbWF0cml4LT5ucm93cykKKyAgICB7CisgICAgICBpZiAoZGVidWdf cCkKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2VfY3Vyc29yOiAgcmV0dXJuICgl ZClcbiIsIDIpOworICAgICAgcmV0dXJuOworICAgIH0KKyAgLyogSWYgcm93IGNvbnRhaW5pbmcg Y3Vyc29yIGlzIG1hcmtlZCBpbnZhbGlkLCB0aGVyZSBpcyBub3RoaW5nIHdlCisgICAgIGNhbiBk by4gKi8KKyAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICB7CisgICAgICBpZiAoZGVidWdfcCkK KyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2VfY3Vyc29yOiAgcmV0dXJuICglZClc biIsIDMpOworICAgICAgcmV0dXJuOworICAgIH0KKyAgLyogSWYgbGluZSBzcGFjaW5nIGlzID4g MCwgb2xkIGN1cnNvciBtYXkgb25seSBiZSBwYXJ0aWFsbHkgdmlzaWJsZSBpbgorICAgICB3aW5k b3cgYWZ0ZXIgc3BsaXQtd2luZG93LiAgU28gYWRqdXN0IHZpc2libGUgaGVpZ2h0LiAqLworICBy b3ctPnZpc2libGVfaGVpZ2h0ID0gbWluIChyb3ctPnZpc2libGVfaGVpZ2h0LAorICAgICAgICAg ICAgd2luZG93X3RleHRfYm90dG9tX3kgKHcpIC0gcm93LT55KTsKKyAgLyogSWYgcm93IGlzIGNv bXBsZXRlbHkgaW52aXNpYmxlLCBkb24ndCBhdHRlbXB0IHRvIGRlbGV0ZSB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gICAgICAgICAgICAgYm9vbCByZW1vdmVfcCkKK3sKKyAgLyogYG1hdHJpeF9yb3cnIGlu IGBkaXNwbmV3LmNgIGNvbnRhaW5zIHRoZSBmb2xsb3dpbmcgdGVzdHMsCisgIGVhc3NlcnQgKG1h dHJpeCAmJiBtYXRyaXgtPnJvd3MpOworICBlYXNzZXJ0IChyb3cgPj0gMCAmJiByb3cgPCBtYXRy aXgtPm5yb3dzKTsgKi8KKyAgYm9vbCBiYXJmX2NyYXNoX29uZSA9IChtYXRyaXggJiYgbWF0cml4 LT5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfb25lKQorICAgIHJldHVy bjsKKyAgYm9vbCBiYXJmX2NyYXNoX3R3byA9ICh2cG9zID49IDAgJiYgdnBvcyA8IG1hdHJpeC0+ bnJvd3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgcmV0dXJu OworICBpZiAoeCA8IDAKKyAgICAgIHx8IHkgPCAwCisgICAgICB8fCBocG9zIDwgMAorICAgICAg fHwgdnBvcyA8IDApCisgICAgcmV0dXJuOworICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50 czsKKyAgQ0hFQ0tfQlVGRkVSIChidWYpOworICBib29sIGF1dG9faHNjcm9sbF9tb2RlX3AgPSBF USAoRmJ1ZmZlcl9sb2NhbF92YWx1ZSAoUWF1dG9faHNjcm9sbF9tb2RlLCBidWYpLCBRY3VycmVu dF9saW5lKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1KSAqLworICBib29sIGhzY2xf YWxsX3RlbXBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9o c2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBub3RoaW5nLiAq LworICBib29sIGhzY2xfYWxsX3Blcm1fMF9wID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBD LXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyBlbHNlIGJlc2lkZXMgaG9yaXpvbnRhbGx5IHNjcm9s bGluZyB0aGUKKyAgICAgICAgICAgICAgIGN1cnJlbnQgbGluZSBkaWZmZXJlbnRseS4KKyAgICAg ICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlm ZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8xX3AgPSAoIXctPnN1c3BlbmRfYXV0 b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21v ZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7CisgIC8q IEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIC4uLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5l IGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBo c2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA9PSAwCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxl ZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0aGUgbGVmdCBhcnJvdyBrZXkgb25lIHRpbWUuCisgICAg ICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVy ZW50bHkuKi8KKyAgYm9vbCBoc2NsX3RlbXBfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwK KyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gc29t ZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBjdXJyZW50IGxpbmUgdG8gYmUKKyAgICAgICAgICAgICAg IGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJl bnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9v bCBoc2NsX3Blcm1fcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAg ICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+ IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xs KTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGludCBmcmluZ2Vf Yml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgaW50IGZhY2VfaWQgPSBERUZBVUxUX0ZB Q0VfSUQ7CisgIGlmICghcmVtb3ZlX3AKKyAgICAgICYmIGdseXBoX2ZsYXZvciA9PSBNQ19PVkVS TEFZX0FSUk9XX0JJVE1BUAorICAgICAgJiYgIWhzY2xfYWxsX3RlbXBfcAorICAgICAgJiYgIWhz Y2xfdGVtcF9wCisgICAgICAmJiAhaHNjbF9wZXJtX3AKKyAgICAgICYmICFoc2NsX2FsbF9wZXJt XzBfcAorICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMV9wCisgICAgICAmJiAhaHNjbF9hbGxfcGVy bV8yX3ApCisgICAgeworICAgICAgZW51bSBmYWNlX2lkIG92ZXJsYXlfYXJyb3dfZmFjZV9pZCA9 CisgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICAgPyBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWluYWN0aXZlLWZhY2UiKSwg dHJ1ZSkKKyAgICAgICAgOiAoYWN0a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JvdywgdHJ1ZSwgY3Vyc29yX3R5cGUpOworICAgIH0KKyAg ICBlbHNlIGlmICghcmVtb3ZlX3AKKyAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgPT0gTUNf T1ZFUkxBWV9BUlJPV19CSVRNQVAKKyAgICAgICAgICAgICAmJiAoaHNjbF9hbGxfdGVtcF9wCisg ICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMF9wCisgICAgICAgICAgICAgICAgIHx8 IGhzY2xfYWxsX3Blcm1fMV9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9w CisgICAgICAgICAgICAgICAgIHx8IGhzY2xfdGVtcF9wCisgICAgICAgICAgICAgICAgIHx8IGhz Y2xfcGVybV9wKSkKKyAgICAgIHsKKyAgICAgICAgZW51bSBmYWNlX2lkIG92ZXJsYXlfYXJyb3df ZmFjZV9pZCA9CisgICAgICAgICAgKCFhY3RpdmVfcAorICAgICAgICAgICAmJiAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAg ICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhz Y2wtaW5hY3RpdmUtZmFjZSIpLCB0cnVlKQorICAgICAgICAgIDogKGFjdGl2ZV9wKQorICAgICAg ICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93 LWhzY2wtZmFjZSIpLCB0cnVlKQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAg ICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAg ICAgICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgICA6 IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgaWYgKGhzY2xfYWxsX3Blcm1fMF9wKQorICAgICAg ICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1o c2NsLXBlcm0iKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9w ZXJtXzFfcCkKKyAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1h cCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgZmFsc2UpOworICAgICAgICAgICAg ZWxzZSBpZiAoaHNjbF9hbGxfcGVybV8yX3ApCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAg PSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2Us IHRydWUpOworICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX3Blcm1fcCkKKyAgICAgICAgICAg ICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIist aHNjbC1wZXJtIiksIHRydWUsIHRydWUpOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xf YWxsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJp bmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXRlbXAiKSwgZmFsc2UsIGZhbHNlKTsKKyAg ICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfdGVtcF9wKQorICAgICAgICAgICAgICAgICAg ICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNj bC10ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgLyogQXMgdG8gYHJvdy0+b3Zlcm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5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgcm93LT5sZWZ0X2Zy aW5nZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9vZmZzZXQg PSAwOworICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAg ICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgdHJ1ZSwgY3Vyc29yX3R5cGUpOwor ICAgICAgfQorICAgICAgZWxzZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgICAmJiAoZ2x5 cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9S SUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19IT0xM T1dfUkVDVEFOR0xFCisgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZF UlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAg ICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAg ICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAg ICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKSkK KyAgICAgICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhf Zmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGVfcmlnaHRfYXJy b3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9y ID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3Rh bmdsZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IChnbHlwaF9mbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBRbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxf YmFyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZv ciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g UW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiBRbmlsOworICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUg PT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBs b29rdXBfZnJpbmdlX2JpdG1hcCAoYml0bWFwX2ZsYXZvcikKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIGZhY2VfaWQgPSAoY3Vyc29y X3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICAgJiYg KGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VE X1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAg ICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmV2ZXJzZWQtdmVy dGljYWwtYmFyLWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX3R5 cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICAgICAmJiBn bHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVwor ICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVS VElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2Zs YXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAg PyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy12ZXJ0aWNhbC1iYXItZmFjZSIp LCB0cnVlKQorICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAg ICByb3ctPmN1cnNvcl9pbl9mcmluZ2VfcCA9IGZhbHNlOworICAgICAgICAgIHJvdy0+cmlnaHRf ZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgcm93LT5yaWdodF9mcmlu Z2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgICAgcm93LT5yaWdodF9mcmluZ2Vfb2Zmc2V0 ID0gMDsKKyAgICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOwor ICAgICAgICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcCAodywgcm93LCBmYWxzZSwgY3Vyc29yX3R5 cGUpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQ SAorICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgb25fcCA9IHRydWU7CisgICAgICAgICAgICBGUkFN RV9SSUYgKGYpLT5tY19zY3JpYmVfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5 LCBocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBv cywgd2QsIGgsIGxzbCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGdseXBoX2ZsYXZvciwgb25fcCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wKTsKKyAgICAg ICAgICB9Cit9CisKKy8qIER1bXAgY29udGVudHMgb2YgZ2x5cGggR0xZUEggdG8gc3RkZXJyLiAg Uk9XIGFuZCBBUkVBIGFyZQorICAgdGhlIGdseXBoIHJvdyBhbmQgYXJlYSB3aGVyZSB0aGUgZ2x5 cGggY29tZXMgZnJvbS4gKi8KK3ZvaWQKK21jX2R1bXBfZ2x5cGggKHN0cnVjdCBnbHlwaF9yb3cg KnJvdywgc3RydWN0IGdseXBoICpnbHlwaCwgaW50IGFyZWEsIGludCByZWxhdGl2ZV94KQorewor ICBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgfHwgZ2x5cGgtPnR5cGUgPT0g R0xZUEhMRVNTX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAg IiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4x ZCAlNWQgJTRkICAlM2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBo c1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ct PnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgKGdseXBoLT50 eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgID8gJ0MnCisgICAgICAgICA6ICdHJyksCisgICAg ICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5w aXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPnUuY2gsCisgICAgICAgIGdseXBoLT5mYWNlX2lk LAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRf Ym94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5 cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgIG1jX2NoYXJfdG9f c3RyaW5nIChnbHlwaC0+dS5jaCkpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0g U1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICIg JTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQg JTVkICU0ZCAgJTNkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51 c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAg ICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dp ZHRoLAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBo LT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAg ICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgt Pnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIpOworICAgIH0KKyAgZWxzZSBpZiAo Z2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJy LAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0 ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDAp ID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAg ICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGds eXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lk LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVf cCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT54LCBn bHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAi LS0iLAorICAgICAgICAnLicpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ09N UE9TSVRFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAl NSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisgICAgICAgIGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0g MCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAg ICAgICcrJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAg Z2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5jbXAu aWQpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAg Z2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAg IGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+dS5jbXAuYXV0b21h dGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTVkICU0ZCAgJTNkICAlM2QgJXMgLiBb JWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT54LCBnbHlwaC0+eSwg Z2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAorICAg ICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNl LmNtcC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG4iKTsK KyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgpCisgICAgewor I2lmbmRlZiBIQVZFX1hXSURHRVRTCisgICAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQorICAg ICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAl M2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAg ICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2Vk W2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2 ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVG RkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklO R1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgOiAnLScpKSwK KyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAg ICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9s aW5lX3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisgICAgICAgIGdseXBoLT54LCBnbHlw aC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBoLT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0i LAorICAgICAgICAnLicpOworI2VuZGlmCisgICAgfQorfQorCisvKiBEdW1wIHRoZSBjb250ZW50 cyBvZiBnbHlwaCByb3cgYXQgVlBPUyBpbiBNQVRSSVggdG8gc3RkZXJyLgorICAgR0xZUEhTIDAg bWVhbnMgZG9uJ3Qgc2hvdyBnbHlwaCBjb250ZW50cy4KKyAgIEdMWVBIUyAxIG1lYW5zIHNob3cg Z2x5cGhzIGluIHNob3J0IGZvcm0KKyAgIEdMWVBIUyA+IDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4g bG9uZyBmb3JtLiAqLwordm9pZAorbWNfZHVtcF9nbHlwaF9yb3cgKHN0cnVjdCBnbHlwaF9yb3cg KnJvdywgaW50IHZwb3MsIGludCBnbHlwaHMpCit7CisgIGludCByZWxhdGl2ZV94ID0gMDsKKyAg aWYgKGdseXBocyAhPSAxKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuRFVNUCBH TFlQSCBST1dcbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiUm93ICAgICBTdGFydCAgICAg ICBFbmQgVXNlZCBvRT48XFxDVFpGZXNtICAgICBYICAgIFkgICAgVyAgICBIICAgIFYgICAgQSAg ICBQXG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxu Iik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIlM2QgJTkicEQiZCAlOSJwRCJkICU0ZCAlMS4x ZCUxLjFkJTEuMWQlMS4xZFwKKyUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEu MWQgICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZFxuIiwKKyAgICAgICAgIHZwb3MsCisgICAg ICAgICBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyksCisgICAgICAgICBNQVRSSVhfUk9X X0VORF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgcm93LT51c2VkW1RFWFRfQVJFQV0sCisgICAg ICAgICByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wLAorICAgICAgICAgcm93LT5l bmFibGVkX3AsCisgICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9sZWZ0X3AsCisgICAgICAgICBy b3ctPnRydW5jYXRlZF9vbl9yaWdodF9wLAorICAgICAgICAgcm93LT5jb250aW51ZWRfcCwKKyAg ICAgICAgIE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAocm93KSwKKyAgICAgICAgIE1B VFJJWF9ST1dfRElTUExBWVNfVEVYVF9QIChyb3cpLAorICAgICAgICAgcm93LT5lbmRzX2F0X3p2 X3AsCisgICAgICAgICByb3ctPmZpbGxfbGluZV9wLAorICAgICAgICAgcm93LT5lbmRzX2luX21p ZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPnN0YXJ0c19pbl9taWRkbGVfb2ZfY2hhcl9w LAorICAgICAgICAgcm93LT5tb3VzZV9mYWNlX3AsCisgICAgICAgICByb3ctPngsCisgICAgICAg ICByb3ctPnksCisgICAgICAgICByb3ctPnBpeGVsX3dpZHRoLAorICAgICAgICAgcm93LT5oZWln aHQsCisgICAgICAgICByb3ctPnZpc2libGVfaGVpZ2h0LAorICAgICAgICAgcm93LT5hc2NlbnQs CisgICAgICAgICByb3ctPnBoeXNfYXNjZW50KTsKKyAgICAgIC8qIFRoZSBuZXh0IDMgbGluZXMg c2hvdWxkIGFsaWduIHRvICJTdGFydCIgaW4gdGhlIGhlYWRlci4gKi8KKyAgICAgIGZwcmludGYg KHN0ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcdCU1ZFxuIiwgcm93LT5zdGFydC5vdmVybGF5 X3N0cmluZ19pbmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLm92ZXJsYXlfc3RyaW5nX2luZGV4LAor ICAgICAgICAgcm93LT5jb250aW51YXRpb25fbGluZXNfd2lkdGgpOworICAgICAgZnByaW50ZiAo c3RkZXJyLCAiICAgICU5InBEImQgJTkicEQiZFxuIiwKKyAgICAgICAgIENIQVJQT1MgKHJvdy0+ c3RhcnQuc3RyaW5nX3BvcyksCisgICAgICAgICBDSEFSUE9TIChyb3ctPmVuZC5zdHJpbmdfcG9z KSk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTlkICU5ZFxuIiwgcm93LT5zdGFydC5k cHZlY19pbmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLmRwdmVjX2luZGV4KTsKKyAgICB9CisgIGlm IChnbHlwaHMgPiAxKQorICAgIHsKKyAgICAgIGZvciAoaW50IGFyZWEgPSBMRUZUX01BUkdJTl9B UkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgIHsKKyAgICBzdHJ1Y3QgZ2x5cGggKmds eXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBn bHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAvKiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0 ZXh0LiAqLworICAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQg JiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgKytnbHlwaF9lbmQ7CisgICAgaWYgKGdseXBo IDwgZ2x5cGhfZW5kKQorICAgICAgZnByaW50ZiAoc3RkZXJyLCAiR2x5cGgjL1RvdGFsIFJlbC5Y IFQgICAgICAgUG9zIE8gICBXICAgICBDb2RlIEZhY2UgTFIgICAgIFggICAgWSBIUE9TIFZQT1Mg WlYgQ1xuIik7CisgICAgZm9yICg7IGdseXBoIDwgZ2x5cGhfZW5kOyArK2dseXBoKQorICAgICAg eworICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94KTsK KyAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICB9CisgIH0K KyAgICB9CisgIGVsc2UgaWYgKGdseXBocyA9PSAxKQorICAgIHsKKyAgICAgIGNoYXIgc1tTSFJU X01BWCArIDRdOworICAgICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEg PCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgeworICAgIGludCBpOworICAgIGZvciAoaSA9IDA7IGkg PCByb3ctPnVzZWRbYXJlYV07ICsraSkKKyAgICAgIHsKKyAgICAgICAgc3RydWN0IGdseXBoICpn bHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdICsgaTsKKyAgICAgICAgaWYgKGkgPT0gcm93LT51c2Vk W2FyZWFdIC0gMQorICAgICAgJiYgYXJlYSA9PSBURVhUX0FSRUEKKyAgICAgICYmIE5JTFAgKGds eXBoLT5vYmplY3QpCisgICAgICAmJiBnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAm JiBnbHlwaC0+dS5jaCA9PSAnICcpCisgICAgeworICAgICAgc3RyY3B5ICgmc1tpXSwgIltcXG5d Iik7CisgICAgICBpICs9IDQ7CisgICAgfQorICAgICAgICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9 PSBDSEFSX0dMWVBICisgICAgICAgICAgICYmIGdseXBoLT51LmNoIDwgMHg4MAorICAgICAgICAg ICAmJiBnbHlwaC0+dS5jaCA+PSAnICcpCisgICAgc1tpXSA9IGdseXBoLT51LmNoOworICAgICAg ICBlbHNlCisgICAgc1tpXSA9ICcuJzsKKyAgICAgIH0KKyAgICBzW2ldID0gJ1wwJzsKKyAgICBm cHJpbnRmIChzdGRlcnIsICIlM2Q6ICglZCkgJyVzJ1xuIiwgdnBvcywgcm93LT5lbmFibGVkX3As IHMpOworICB9CisgICAgfQorfQorCitERUZVTiAoIm1jLWR1bXAtZ2x5cGgtcm93IiwgRm1jX2R1 bXBfZ2x5cGhfcm93LCBTbWNfZHVtcF9nbHlwaF9yb3csIDEsIDIsICJQIiwKKyAgICAgICBkb2M6 IC8qIER1bXAgZ2x5cGggcm93IFJPVyB0byBzdGRlcnIuCitJbnRlcmFjdGl2ZWx5LCBST1cgaXMg dGhlIHByZWZpeCBudW1lcmljIGFyZ3VtZW50IGFuZCBkZWZhdWx0cyB0bwordGhlIHJvdyB3aGlj aCBkaXNwbGF5cyBwb2ludC4KK09wdGlvbmFsIGFyZ3VtZW50IEdMWVBIUyAwIG1lYW5zIGRvbid0 IGR1bXAgZ2x5cGhzLgorR0xZUEhTIDEgbWVhbnMgZHVtcCBnbHlwaHMgaW4gc2hvcnQgZm9ybS4K K0dMWVBIUyA+IDEgb3Igb21pdHRlZCBtZWFucyBkdW1wIGdseXBocyBpbiBsb25nIGZvcm0uICAq LykKKyAgKExpc3BfT2JqZWN0IHJvdywgTGlzcF9PYmplY3QgZ2x5cGhzKQoreworICBzdHJ1Y3Qg d2luZG93ICp3ID0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgc3RydWN0IGdseXBoX21h dHJpeCAqbWF0cml4OworICBFTUFDU19JTlQgdnBvczsKKyAgaWYgKE5JTFAgKHJvdykpCisgICAg eworICAgICAgaW50IGQxLCBkMiwgZDMsIGQ0LCBkNSwgeXBvczsKKyAgICAgIGJvb2wgdmlzaWJs ZV9wID0gcG9zX3Zpc2libGVfcCAodywgUFQsICZkMSwgJmQyLCAmZDMsICZkNCwgJmQ1LCAmeXBv cyk7CisgICAgICBpbnQgaGVhZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5FX0hF SUdIVCAodyk7CisgICAgICBpbnQgdm9mZnNldCA9IChoZWFkZXJfbGluZV9oZWlnaHQgPiAwCisg ICAgICAgICAgICAgICAgICAgICAmJiB5cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICA/ IHlwb3MgKyAxCisgICAgICAgICAgICAgICAgICAgICAgOiB5cG9zOworICAgICAgaWYgKHZpc2li bGVfcCkKKyAgICAgICAgdnBvcyA9IHZvZmZzZXQ7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB2 cG9zID0gMDsKKyAgICB9CisgICAgZWxzZQorICAgICAgeworICAgICAgICBDSEVDS19OVU1CRVIg KHJvdyk7CisgICAgICAgIHZwb3MgPSBY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cgZ2x5cGhz IGluIHNob3J0IGZvcm07Cit3aXRoIG51bWVyaWMgYXJndW1lbnQsIGl0cyB2YWx1ZSBpcyBwYXNz ZWQgYXMgdGhlIEdMWVBIUyBmbGFnLiAgKi8pCisgIChMaXNwX09iamVjdCBnbHlwaHMpCit7Cisg IHN0cnVjdCB3aW5kb3cgKncgPSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpOworICBzdHJ1Y3Qg YnVmZmVyICpidWZmZXIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgIGZwcmludGYgKHN0ZGVy ciwgIlBUID0gJSJwRCJkLCBCRUdWID0gJSJwRCJkLiBaViA9ICUicEQiZFxuIiwKKyAgICAgQlVG X1BUIChidWZmZXIpLCBCVUZfQkVHViAoYnVmZmVyKSwgQlVGX1pWIChidWZmZXIpKTsKKyAgZnBy aW50ZiAoc3RkZXJyLCAiQ3Vyc29yIHggPSAlZCwgeSA9ICVkLCBocG9zID0gJWQsIHZwb3MgPSAl ZFxuIiwKKyAgICAgdy0+Y3Vyc29yLngsIHctPmN1cnNvci55LCB3LT5jdXJzb3IuaHBvcywgdy0+ Y3Vyc29yLnZwb3MpOworICBmcHJpbnRmIChzdGRlcnIsICI9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworICBtY19kdW1wX2dseXBoX21hdHJpeCAody0+ Y3VycmVudF9tYXRyaXgsCisgICAgICAgICBUWVBFX1JBTkdFRF9GSVhOVU1QIChpbnQsIGdseXBo cykgPyBYRklYTlVNIChnbHlwaHMpIDogMCk7CisgIHJldHVybiBRbmlsOworfQorCit2b2lkCitt Y19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRvdyAqdywgZW51bSB0eXBlX29mX2NhY2hlIGNhY2hl X3R5cGUpCit7CisgIHN3aXRjaCAoY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBjYXNlIE5PX0NB Q0hFOgorICAgICAgICB7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNhc2Ug TUNfQ0FDSEU6CisgICAgICAgIHsKKyAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMp CisgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNf Y29uZikpCisgICAgICAgICAgICAgICYmIHctPm1jX2VsdHMudXNlZCA+IDEpCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIC8qIERlY3JlYXNlIHRoZSBzaXplIG9mIHRoZSBhcnJheSB0byBh IGJhcmUgbWluaW11bS4gKi8KKyAgICAgICAgICAgICAgdy0+bWNfZWx0cy5jYWNoZXMgPSB4bnJl YWxsb2MgKHctPm1jX2VsdHMuY2FjaGVzLCAxLCBzaXplb2YgKnctPm1jX2VsdHMuY2FjaGVzKTsK KyAgICAgICAgICAgICAgdy0+bWNfZWx0cy51c2VkID0gMDsKKyAgICAgICAgICAgICAgdy0+bWNf ZWx0cy5hbGxvY2F0ZWQgPSAxOworICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gIEFsdGhv dWdoIGl0IHdvdWxkIG5vdCBiZSB2ZXJ5IGVmZmljaWVudCwgaXQgaXMgcG9zc2libGUgdG8gc2V0 CisgICAgICAgICAgICAvLyAgdGhlIF91c2VkXyBlbGVtZW50cyBvZiB0aGUgYXJyYXkgdG8gemVy by4gIEluIHN1Y2ggYSBjYXNlLCB0aGUKKyAgICAgICAgICAgIC8vICAuLi5fZWx0cy5hbGxvY2F0 ZWQgd291bGQgcmVtYWluIHRoZSBzYW1lLgorICAgICAgICAgICAgLy8gIG1lbXNldCAody0+bWNf ZWx0cy5jYWNoZXMsIDAsIHctPm1jX2VsdHMudXNlZCAqIChzaXplb2YgKnctPm1jX2VsdHMuY2Fj aGVzKSk7CisgICAgICAgICAgICAvLyAgQXQgdGhpcyB0aW1lLCB3ZSBhcmUgaW5zdGVhZCBsZWF2 aW5nIHRoZSBhcnJheSBhcy1pcyB3aXRoIHRoZQorICAgICAgICAgICAgLy8gIHVuZGVyc3RhbmRp bmcgdGhhdCBpdCB3aWxsIGNvbnRhaW4gb3V0ZGF0ZWQgZGF0YSAoYWthIGdhcmJhZ2UpLgorICAg ICAgICAgICAgLy8gIFVzaW5nIHRoZSBjb3VudGVyIGB3LT5tY19lbHRzLnVzZWRgLCB3ZSB0cmFj ayBjdXJyZW50IGRhdGEuCisgICAgICAgICAgICBlbHNlIGlmIChCVUZGRVJQICh3LT5jb250ZW50 cykKKyAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIG1jX2NvbmYpKSkKKyAgICAgICAgICAgICAgdy0+bWNfZWx0cy51c2VkID0gMDsKKyAg ICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgY2FzZSBDSF9DQUNIRToKKyAgICAgICAg eworICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgJiYg TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAg ICAgICAgJiYgdy0+Y2hfZWx0cy51c2VkID4gMSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgLyogRGVjcmVhc2UgdGhlIHNpemUgb2YgdGhlIGFycmF5IHRvIGEgYmFyZSBtaW5pbXVtLiAq LworICAgICAgICAgICAgICB3LT5jaF9lbHRzLmNhY2hlcyA9IHhucmVhbGxvYyAody0+Y2hfZWx0 cy5jYWNoZXMsIDEsIHNpemVvZiAqdy0+Y2hfZWx0cy5jYWNoZXMpOworICAgICAgICAgICAgICB3 LT5jaF9lbHRzLnVzZWQgPSAwOworICAgICAgICAgICAgICB3LT5jaF9lbHRzLmFsbG9jYXRlZCA9 IDE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAgQWx0aG91Z2ggaXQgd291bGQgbm90 IGJlIHZlcnkgZWZmaWNpZW50LCBpdCBpcyBwb3NzaWJsZSB0byBzZXQKKyAgICAgICAgICAgIC8v ICB0aGUgX3VzZWRfIGVsZW1lbnRzIG9mIHRoZSBhcnJheSB0byB6ZXJvLiAgSW4gc3VjaCBhIGNh c2UsIHRoZQorICAgICAgICAgICAgLy8gIC4uLl9lbHRzLmFsbG9jYXRlZCB3b3VsZCByZW1haW4g dGhlIHNhbWUuCisgICAgICAgICAgICAvLyAgbWVtc2V0ICh3LT5jaF9lbHRzLmNhY2hlcywgMCwg dy0+Y2hfZWx0cy51c2VkICogKHNpemVvZiAqdy0+Y2hfZWx0cy5jYWNoZXMpKTsKKyAgICAgICAg ICAgIC8vICBBdCB0aGlzIHRpbWUsIHdlIGFyZSBpbnN0ZWFkIGxlYXZpbmcgdGhlIGFycmF5IGFz LWlzIHdpdGggdGhlCisgICAgICAgICAgICAvLyAgdW5kZXJzdGFuZGluZyB0aGF0IGl0IHdpbGwg Y29udGFpbiBvdXRkYXRlZCBkYXRhIChha2EgZ2FyYmFnZSkuCisgICAgICAgICAgICAvLyAgVXNp bmcgdGhlIGNvdW50ZXIgYHctPmNoX2VsdHMudXNlZGAsIHdlIHRyYWNrIGN1cnJlbnQgZGF0YS4K KyAgICAgICAgICAgIGVsc2UgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpKQorICAgICAgICAgICAgICB3LT5jaF9lbHRzLnVzZWQgPSAwOworICAgICAgICAgIGJyZWFr OworICAgICAgICB9CisgICAgICBjYXNlIEZDX0NBQ0hFOgorICAgICAgICB7CisgICAgICAgICAg aWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAmJiBOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAmJiB3LT5m Y19lbHRzLnVzZWQgPiAxKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBEZWNyZWFz ZSB0aGUgc2l6ZSBvZiB0aGUgYXJyYXkgdG8gYSBiYXJlIG1pbmltdW0uICovCisgICAgICAgICAg ICAgIHctPmZjX2VsdHMuY2FjaGVzID0geG5yZWFsbG9jICh3LT5mY19lbHRzLmNhY2hlcywgMSwg c2l6ZW9mICp3LT5mY19lbHRzLmNhY2hlcyk7CisgICAgICAgICAgICAgIHctPmZjX2VsdHMudXNl ZCA9IDA7CisgICAgICAgICAgICAgIHctPmZjX2VsdHMuYWxsb2NhdGVkID0gMTsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIC8vICBBbHRob3VnaCBpdCB3b3VsZCBub3QgYmUgdmVyeSBlZmZp Y2llbnQsIGl0IGlzIHBvc3NpYmxlIHRvIHNldAorICAgICAgICAgICAgLy8gIHRoZSBfdXNlZF8g ZWxlbWVudHMgb2YgdGhlIGFycmF5IHRvIHplcm8uICBJbiBzdWNoIGEgY2FzZSwgdGhlCisgICAg ICAgICAgICAvLyAgLi4uX2VsdHMuYWxsb2NhdGVkIHdvdWxkIHJlbWFpbiB0aGUgc2FtZS4KKyAg ICAgICAgICAgIC8vICBtZW1zZXQgKHctPmZjX2VsdHMuY2FjaGVzLCAwLCB3LT5mY19lbHRzLnVz ZWQgKiAoc2l6ZW9mICp3LT5mY19lbHRzLmNhY2hlcykpOworICAgICAgICAgICAgLy8gIEF0IHRo aXMgdGltZSwgd2UgYXJlIGluc3RlYWQgbGVhdmluZyB0aGUgYXJyYXkgYXMtaXMgd2l0aCB0aGUK KyAgICAgICAgICAgIC8vICB1bmRlcnN0YW5kaW5nIHRoYXQgaXQgd2lsbCBjb250YWluIG91dGRh dGVkIGRhdGEgKGFrYSBnYXJiYWdlKS4KKyAgICAgICAgICAgIC8vICBVc2luZyB0aGUgY291bnRl ciBgdy0+ZmNfZWx0cy51c2VkYCwgd2UgdHJhY2sgY3VycmVudCBkYXRhLgorICAgICAgICAgICAg ZWxzZSBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgICAg ICAgICAgIHctPmZjX2VsdHMudXNlZCA9IDA7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0K KyAgICB9Cit9CisKK3N0YXRpYyB2b2lkCittY19oZWxwZXIgKHN0cnVjdCB3aW5kb3cgKncsIHN0 cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAg ICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoLCBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5LCBp bnQgaHBvcywgaW50IHZwb3MsCisgICAgICAgICAgIGludCB3ZCwgaW50IGgsIGVudW0gdHlwZV9v Zl9jdXJzb3IgY3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgIHN0cnVj dCBtY19SR0IgZm9yZWdyb3VuZCwgc3RydWN0IG1jX1JHQiBiYWNrZ3JvdW5kLCBib29sIGFjdGl2 ZV9wLAorICAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsIGJvb2wgZHJhd19w LCBlbnVtIHR5cGVfb2ZfY2FjaGUgY2FjaGVfdHlwZSkKK3sKKyAgaWYgKGdseXBoICE9IE5VTEwK KyAgICAgICYmIGdseXBoLT51LmNoID09IDk1CisgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19I QkFSKQorICAgIHsKKyAgICAgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOwor ICAgICAgZW51bSBmYWNlX2lkIHNwZWNpYWxfY2hhcl9mYWNlX2lkID0KKyAgICAgICAgbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGV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W5kLmJsdWUsIGJhY2tncm91bmQucmVk LCBiYWNrZ3JvdW5kLmdyZWVuLCBiYWNrZ3JvdW5kLmJsdWUpOworICAgIH0KKyAgYm9vbCByZW1v dmVfcCA9IGZhbHNlOworICBpZiAoZHJhd19wKQorICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3 LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwgY3Vyc29yX3R5 cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwg YWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICBzdHJ1Y3QgbXVsdGlwbGVfY3Vy c29yc19jYWNoZSBmb29fZWx0czsKKyAgc3dpdGNoIChjYWNoZV90eXBlKQorICAgIHsKKyAgICAg IGNhc2UgTk9fQ0FDSEU6CisgICAgICAgIHsKKyAgICAgICAgICAvKiBEbyBub3QgY29udGludWUg dG8gdGhlIGxhc3Qgc2VjdGlvbiB0aGF0IHBvcHVsYXRlcyB0aGUgY2FjaGUgd2l0aAorICAgICAg ICAgIGN1cnNvciBkYXRhLCBhcyB0aGF0IHdpbGwgY2F1c2UgYSBTSUdTRUdWIChzZWdtZW50YXRp b24gZmF1bHQpLiAqLworICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfQorICAgICAgY2FzZSBN Q19DQUNIRToKKyAgICAgICAgeworICAgICAgICAgICsrdy0+bWNfZWx0cy51c2VkOworICAgICAg ICAgIGlmICh3LT5tY19lbHRzLmFsbG9jYXRlZCA8IHctPm1jX2VsdHMudXNlZCkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgaW50IG9sZF9hbGxvYyA9IHctPm1jX2VsdHMuYWxsb2NhdGVk OworICAgICAgICAgICAgICBpbnQgbmV3X2VsdHMgPSB3LT5tY19lbHRzLnVzZWQgLSB3LT5tY19l bHRzLmFsbG9jYXRlZDsKKyAgICAgICAgICAgICAgdy0+bWNfZWx0cy5jYWNoZXMgPSB4cGFsbG9j ICh3LT5tY19lbHRzLmNhY2hlcywgJnctPm1jX2VsdHMuYWxsb2NhdGVkLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19lbHRzLCBJTlRfTUFYLCBzaXplb2Yg KnctPm1jX2VsdHMuY2FjaGVzKTsKKyAgICAgICAgICAgICAgbWVtc2V0ICh3LT5tY19lbHRzLmNh Y2hlcyArIG9sZF9hbGxvYywgMCwKKyAgICAgICAgICAgICAgICAgICAgICAgKHctPm1jX2VsdHMu YWxsb2NhdGVkIC0gb2xkX2FsbG9jKSAqIHNpemVvZiAqdy0+bWNfZWx0cy5jYWNoZXMpOworICAg ICAgICAgICAgfQorICAgICAgICAgIGZvb19lbHRzLmNhY2hlcyA9IHctPm1jX2VsdHMuY2FjaGVz OworICAgICAgICAgIGZvb19lbHRzLmFsbG9jYXRlZCA9IHctPm1jX2VsdHMuYWxsb2NhdGVkOwor ICAgICAgICAgIGZvb19lbHRzLnVzZWQgPSB3LT5tY19lbHRzLnVzZWQ7CisgICAgICAgICAgYnJl YWs7CisgICAgICAgIH0KKyAgICAgIGNhc2UgQ0hfQ0FDSEU6CisgICAgICAgIHsKKyAgICAgICAg ICArK3ctPmNoX2VsdHMudXNlZDsKKyAgICAgICAgICBpZiAody0+Y2hfZWx0cy5hbGxvY2F0ZWQg PCB3LT5jaF9lbHRzLnVzZWQpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGludCBvbGRf YWxsb2MgPSB3LT5jaF9lbHRzLmFsbG9jYXRlZDsKKyAgICAgICAgICAgICAgaW50IG5ld19lbHRz ID0gdy0+Y2hfZWx0cy51c2VkIC0gdy0+Y2hfZWx0cy5hbGxvY2F0ZWQ7CisgICAgICAgICAgICAg IHctPmNoX2VsdHMuY2FjaGVzID0geHBhbGxvYyAody0+Y2hfZWx0cy5jYWNoZXMsICZ3LT5jaF9l bHRzLmFsbG9jYXRlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBuZXdfZWx0cywgSU5UX01BWCwgc2l6ZW9mICp3LT5jaF9lbHRzLmNhY2hlcyk7CisgICAgICAg ICAgICAgIG1lbXNldCAody0+Y2hfZWx0cy5jYWNoZXMgKyBvbGRfYWxsb2MsIDAsCisgICAgICAg ICAgICAgICAgICAgICAgICh3LT5jaF9lbHRzLmFsbG9jYXRlZCAtIG9sZF9hbGxvYykgKiBzaXpl b2YgKnctPmNoX2VsdHMuY2FjaGVzKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBmb29fZWx0 cy5jYWNoZXMgPSB3LT5jaF9lbHRzLmNhY2hlczsKKyAgICAgICAgICBmb29fZWx0cy5hbGxvY2F0 ZWQgPSB3LT5jaF9lbHRzLmFsbG9jYXRlZDsKKyAgICAgICAgICBmb29fZWx0cy51c2VkID0gdy0+ Y2hfZWx0cy51c2VkOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBjYXNlIEZD X0NBQ0hFOgorICAgICAgICB7CisgICAgICAgICAgKyt3LT5mY19lbHRzLnVzZWQ7CisgICAgICAg ICAgaWYgKHctPmZjX2VsdHMuYWxsb2NhdGVkIDwgdy0+ZmNfZWx0cy51c2VkKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBpbnQgb2xkX2FsbG9jID0gdy0+ZmNfZWx0cy5hbGxvY2F0ZWQ7 CisgICAgICAgICAgICAgIGludCBuZXdfZWx0cyA9IHctPmZjX2VsdHMudXNlZCAtIHctPmZjX2Vs dHMuYWxsb2NhdGVkOworICAgICAgICAgICAgICB3LT5mY19lbHRzLmNhY2hlcyA9IHhwYWxsb2Mg KHctPmZjX2VsdHMuY2FjaGVzLCAmdy0+ZmNfZWx0cy5hbGxvY2F0ZWQsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2VsdHMsIElOVF9NQVgsIHNpemVvZiAq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SBmb3IgYSBsZXZlbCBydWxlci4KKyAgIFZFUlRJQ0FMX1JVTEVSIGFuZCBGSUxM X0NPTFVNTjogIFdlIHdhbnQgYW4gSCB0aGF0IGVuc3VyZXMgbm8gZ2FwIGJldHdlZW4gdGhlCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91cy9uZXh0IGxpbmUuICBU aGUgRlggY29vcmRpbmF0ZSBpcyBzZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGVsc2V3aGVyZTogIGB3LT5jdXJzb3IueGAgLyBgbWMuZmNfeGAuICovCit2b2lkCittY19n ZXRfY3Vyc29yX2dlb21ldHJ5IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4 ICptYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cs IGludCB4LCBpbnQgKmZ4LCBpbnQgeSwKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCAqZnks IGludCBocG9zLCBpbnQgdnBvcywgaW50ICpoLAorICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSB0eXBlX29mX2N1cnNvciBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKKyAgICAgICAg ICAgICAgICAgICAgICAgIGludCAqd2QpCit7CisgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSBtY19n ZXRfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgIGlmIChnbHlw aCA9PSBOVUxMKQorICAgIHJldHVybjsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5E T1dfRlJBTUUgKHcpKTsKKyAgKmZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywg eCk7CisgICpoID0gcm93LT52aXNpYmxlX2hlaWdodDsKKyAgLyogRG9uJ3QgbGV0IHRoZSBjdXJz b3IgZXhjZWVkIHRoZSBkaW1lbnNpb25zIG9mIHRoZSByb3csIHNvIHRoYXQKKyAgdGhlIHVwcGVy L2xvd2VyIHNpZGUgb2YgdGhlIGJveCBhcmVuJ3QgY2xpcHBlZC4gICovCisgIGludCB3X2hlYWRl cl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICBpbnQgd190 ZXh0X2JvdHRvbV95ID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpIC0gKmg7CisgIGlmICh5IDwg d19oZWFkZXJfbGluZV9oZWlnaHQpCisgICAgeworICAgICAgKmggPSBtYXggKCpoIC0gKHdfaGVh ZGVyX2xpbmVfaGVpZ2h0IC0geSkgKyAxLCAqaCk7CisgICAgICB5ID0gd19oZWFkZXJfbGluZV9o ZWlnaHQgLSAxOworICAgICAgLy8gZnByaW50ZiAoc3RkZXJyLCAiQ09ORElUSU9OICMgMVxuIik7 CisgICAgfQorICAgZWxzZSBpZiAoeSA+IHdfdGV4dF9ib3R0b21feSkKKyAgICAgeworICAgICAg ICpoICs9IHkgLSB3X3RleHRfYm90dG9tX3k7CisgICAgICAgeSA9IHdfdGV4dF9ib3R0b21feTsK KyAgICAgICAvLyBmcHJpbnRmIChzdGRlcnIsICJDT05ESVRJT04gIyAyXG4iKTsKKyAgICAgfQor ICAqZnkgPSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgeSk7CisgIHN3aXRjaCAoY3Vyc29y X3R5cGUpCisgICAgeworICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgIHsKKyAgICAgICAgICBp ZiAoY3Vyc29yX3dpZHRoIDwgMSkKKyAgICAgICAgICAgIGN1cnNvcl93aWR0aCA9IG1heCAoRlJB TUVfQ1VSU09SX1dJRFRIIChmKSwgMSk7CisgICAgICAgICAgaWYgKGN1cnNvcl93aWR0aCA8IGds eXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAqd2QgPSBjdXJzb3Jfd2lk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k7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnNvcl9yb3cgPSAody0+Y3Vy c29yLnZwb3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJ WF9ST1cgKGN1cnNvcl9tYXRyaXgsIHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiBOVUxMOworICBzdHJ1Y3QgZ2x5cGggKmN1cnNvcl9nbHlwaCA9ICh3 LT5jdXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1j X2dldF9jdXJzb3JfZ2x5cGggKHcsIGN1cnNvcl9tYXRyaXgsIGN1cnNvcl9yb3csCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3Iu aHBvcywgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBO VUxMOworICBib29sIGN1cnNvcl9hdF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVMTAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jvdy0+ dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9y b3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgdy0+Y3Vyc29yLnggPT0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPmN1cnNvci54ID09IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRoKTsKKyAg Ym9vbCBjdXJzb3JfYmV5b25kX2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxMCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNvcl9y b3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg IWN1cnNvcl9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHRleHRfYXJlYV93aWR0aAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gY3Vyc29yX3Jvdy0+ cGl4ZWxfd2lkdGgpOworICBpbnQgZnJhbWVfY2hhcl93aWR0aCA9IEZSQU1FX0NPTFVNTl9XSURU SCAoZik7CisgIGludCB0ZW1wX2ZhY2VfaWQgPSBnbHlwaC0+ZmFjZV9pZDsKKyAgc3RydWN0IG1j X1JHQiBiYWNrZ3JvdW5kOworICBtY19zZXRfbHNsX2JnICh3LCB0ZW1wX2ZhY2VfaWQsICZiYWNr Z3JvdW5kKTsKKyAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3ggPT0gcmVsYXRp dmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSBocG9z CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IGdseXBoLT55Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpOworCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjog IENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAgICAqLworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAg ICB8fCBnbHlwaC0+dHlwZSA9PSBHTFlQSExFU1NfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3Rk ZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQg JTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAlNWQgJTRkICAlM2Qg ICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAor ICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAx KSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgKGdseXBoLT50eXBlID09IENIQVJfR0xZ UEgKKyAgICAgICAgID8gJ0MnCisgICAgICAgICA6ICdHJyksCisgICAgICAgIGdseXBoLT5jaGFy cG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisg ICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAg ICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJwor ICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgICAgICAgIGdseXBoLT5waXhlbF93aWR0 aCwKKyAgICAgICAgZ2x5cGgtPnUuY2gs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LS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIENIQVJf R0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmIChy ZWxhdGl2ZV94IDwgcm93LT5waXhlbF93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vy c29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2 ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1 cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAg ICAgICAgICAgICAgYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGNhY2hlX3R5cGUpOworICAg ICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0g LSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAgICB7CisgICAg ICAgICAgaWYgKHJlbGF0aXZlX3ggPCByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAg ICAgICAgZnggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICAg IG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnks IGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICB4X2xpbWl0IC0gcmVsYXRpdmVfeCwg aCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgIGZvcmVn cm91bmQsIGJhY2tncm91bmQsIGFjdGl2ZV9wLCBNQ19HTFlQSExFU1MsIGRyYXdfcCwKKyAgICAg ICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUpOworICAgICAgICB9CisgICAgICBicmVhazsKKyAg ICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgVkVSVElDQUxf UlVMRVI6ICBDSEFSX0dMWVBIIHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAgICAgICAqLwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7 CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRf cCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJz b3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm ICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRf ZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+ dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRf QVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51 c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g TUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dM WVBIOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFS X1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JB Ul9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFS CisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikK KyAgICAgICAgY3Vyc29yX3R5cGUgPSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgd2Qg PSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gs IG9wb2ludF9meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBj dXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBiYWNrZ3JvdW5kLAorICAgICAg ICAgICAgICAgICBhY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGNhY2hlX3R5cGUpOwor ICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgIEZJTExfQ09MVU1OOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAg ICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgRklMTF9DT0xV TU46CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICYmIGZjX3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAg ICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAg ICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAg KEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAg ICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB5CisgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X3Zwb3MgPT0gdnBvcykKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNT CisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIHdkID0gMTsKKyAgICAgIG1j X2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2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yaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUs IGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYmFja2dyb3VuZCwKKyAgICAgICAgICAgICAgICAg ICBhY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgY2FjaGVfdHlwZSk7CisgICAgICBpZiAoZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAg ICAgICAmJiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAo cmVsYXRpdmVfeCA8IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICByZWxhdGl2ZV94ICs9 IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB0ZW1wX2ZhY2VfaWQgPSAocm93LT5maWxs X2xpbmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IGdseXBoLT5mYWNlX2lkCisgICAg ICAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgICAgc3RydWN0 IG1jX1JHQiBiYWNrZ3JvdW5kOworICAgICAgICAgIG1jX3NldF9sc2xfYmcgKHcsIHRlbXBfZmFj ZV9pZCwgJmJhY2tncm91bmQpOworICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3cs IGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAg ICAgICAgICB4X2xpbWl0IC0gcmVsYXRpdmVfeCwgaCwgY3Vyc29yX3R5cGUsIHhfbGltaXQgLSBy ZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgYmFja2dyb3VuZCwg YWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19wLAorICAgICAgICAgICAgICAgICAgICAgY2Fj aGVfdHlwZSk7CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAg U1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmIChyb3ctPmZp bGxfbGluZV9wCisgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09 IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gg KyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgIHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNl X2lkOworICAgICAgICBlbHNlIGlmICghcm93LT5maWxsX2xpbmVfcAorICAgICAgICAgICAgICAg ICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0g MQorICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4 ZWxfd2lkdGgpCisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOworICAg ICAgc3RydWN0IG1jX1JHQiBiYWNrZ3JvdW5kOworICAgICAgbWNfc2V0X2xzbF9iZyAodywgdGVt cF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2 b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0 ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJ R0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3Jf YmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFS CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBITEVTUzsKKyAg ICAgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NM QVNICisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAg ICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAg IGN1cnNvcl90eXBlID0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgICAgIHdkID0gMTsKKyAg ICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCBvcG9pbnRfeCwgb3BvaW50X2Z4 LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAg IGFjdGl2ZV9wLCBnbHlwaF9mbGF2b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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBI KQorICB7CisgICAgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAg ICAgICAiXG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUx LjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93 LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAw IDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdJ JywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2Jq ZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkK KyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAg Z2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5pbWdf aWQsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGlu ZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPngs IGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpWIiA6 ICItLSIsCisgICAgICAgICcuJyk7CisgIHN3aXRjaCA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lIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgY3Vyc29yX3R5cGUgPSBNQ19I T0xMT1dfQk9YOworICAgICAgaWYgKCFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hl bHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgYWN0aXZlX3As IE1DX0dMWVBILCBkcmF3X3AsIGNhY2hlX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJ Q0FMX1JVTEVSOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgVkVSVElDQUxfUlVMRVI6CisgICAgeworICAgICAg Y3Vyc29yX3R5cGUgPSBNQ19IT0xMT1dfQk9YOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAg ICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJh Y2tncm91bmQsCisgICAgICAgICAgICAgICAgIGFjdGl2ZV9wLCBNQ19HTFlQSCw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ICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAg ICAgICAgICAgICAgQkVHSU46ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAgICAg ICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUg PT0gQ09NUE9TSVRFX0dMWVBIKQorICB7CisgICAgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgewor ICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQg JWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0sCisgICAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93 LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgICAnKycs CisgICAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgID8gJ0InCisgICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICAgIDogKE5JTFAgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICAgIDogJy0n KSkpLAorICAgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgICAodW5zaWduZWQg aW50KSBnbHlwaC0+dS5jbXAuaWQpOworICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTRkICUx LjFkJTEuMWQiLAorICAgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3ApOworICAg ICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwg IiAlNWQgJTRkICAlM2QgICUzZCAlcyAuIFslZC0lZF1cbiIsCisgICAgICAgICAgICAgICAgICAg ICAgICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBo LT56dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPnNs aWNlLmNtcC5mcm9tLCBnbHlwaC0+c2xpY2UuY21wLnRvKTsKKyAgICAgICAgZWxzZQorICAgICAg ICAgIGZwcmludGYgKHN0ZGVyciwgIlxuIik7CisgICAgICB9CisgIHN3aXRjaCAoYWN0aW9uX3R5 cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAg ICAgIE1VTFRJUExFX0NVUlNPUlM6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAg ICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6 CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZl X3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAg ICAgICAgIGFjdGl2ZV9wLCBNQ19HTFlQSCwgZHJhd19wLCBjYWNoZV90eXBlKTsKKyAgICAgIGJy ZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAg ICAgICAgIEhPUklaT05UQUxfUlVMRVI6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAg ICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVM RVI6CisgICAgeworICAgICAgaWYgKHJlbGF0aXZlX3ggPD0geF9saW1pdAorICAgICAgICAgICYm ICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3cs IGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAg ICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tn cm91bmQsCisgICAgICAgICAgICAgICAgICAgYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3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X1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNf Zmxhdm9yIGdseXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVk X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5j YXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Y3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmln aHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25f cmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ct PnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1D X0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoenZfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAo Z2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAg ICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICB8fCBn bHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3Jf dHlwZSA9IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19o ZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgb3BvaW50X2Z4LCB5LCBm eSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgIGFjdGl2 ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdfcCwgY2FjaGVfdHlwZSk7CisgICAgICBicmVhazsKKyAg ICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAg ICBGSUxMX0NPTFVNTjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7Cisg ICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAm JiBmY194ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNT CisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNf R0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFp cnMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiBv cG9pbnRfeSA9PSB5CisgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBv cykKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgOiBNQ19HTFlQSDsKKyAgICAgIHdkID0gMTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4 LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmY19meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAg ICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5k LCBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgICBhY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBk cmF3X3AsIGNhY2hlX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgIH0KKyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIEVORDogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAg ICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIFhXSURH RVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgpCisgIHsKKyNp Zm5kZWYgSEFWRV9YV0lER0VUUworICAgIGVhc3N1bWUgKGZhbHNlKTsKKyNlbHNlCisgICAgaWYg KG1jX3N0ZGVycl9wKQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiXG4gICU1ZC8l LTVkICU1ZCAlNGMgJTZkICVjICUzZCAweCUwNXggJTRkICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNk ICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwK KyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0g MSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdYJywKKyAgICAgICAgZ2x5cGgtPmNo YXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicK KyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJwor ICAgICAgICAgICAgOiAnLScpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAg IC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LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgWFdJREdFVF9HTFlQSCAgICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUkla T05UQUxfUlVMRVI6CisgICAgeworICAgICAgaWYgKHJlbGF0aXZlX3ggPD0geF9saW1pdAorICAg ICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgbWF0 cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAg ICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91 bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgYWN0aXZlX3AsIE1DX0dMWVBILCBk cmF3X3AsIGNhY2hlX3R5cGUpOworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4 X2xpbWl0KQorICAgICAgICB7CisgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxf d2lkdGg7CisgICAgICAgICAgd2hpbGUgKHJlbGF0aXZlX3ggPD0geF9saW1pdCkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJl bGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYmFja2dyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVfcCwgTUNfR0xZUEhMRVNTLCBkcmF3 X3AsIGNhY2hlX3R5cGUpOworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGZyYW1lX2NoYXJf d2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJ Q0FMX1JVTEVSOiAgWFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAg IGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNL U0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9m cmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+ Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFy b3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0 ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAh PSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVu Y2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJl YV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRf eCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQ SExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7Cisg ICAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tT TEFTSAorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAg ICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAg ICBjdXJzb3JfdHlwZSA9IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICBtY19oZWxwZXIg KHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgb3BvaW50X2Z4LCB5LCBmeSwgaHBv cywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgIGFjdGl2ZV9wLCBn bHlwaF9mbGF2b3IsIGRyYXdfcCwgY2FjaGVfdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9Cisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgRklM TF9DT0xVTU46ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBl bnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBmY194 ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAg ICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhM RVNTCisgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQor ICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRf eSA9PSB5CisgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcykKKyAg ICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBN Q19HTFlQSDsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2 ZV94LCBmY19meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBj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cCkKK3sKKyAgLy8gIGNsb2NrX3QgY2xvY2tf c3RhcnQgPSBjbG9jaygpOworICAvKiBOVCBFbWFjcyBjcmFzaGVzIG9uIHN0YXJ0dXAgd2l0aG91 dCBhIGBCVUZGRVJQJyBjaGVjayBpbiBgdXBkYXRlX3dpbmRvdycuICovCisgIGlmICghQlVGRkVS UCAody0+Y29udGVudHMpKQorICAgIHJldHVybjsKKyAgaWYgKE5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgcmV0dXJuOworICBpZiAodnBvcyA9PSBi b3R0b21fdnBvcykKKyAgICByZXR1cm47CisgIGlmICghcm93LT51c2VkW1RFWFRfQVJFQV0pCisg ICAgcmV0dXJuOworICBpbnQgaHBvc19zdGFydCA9IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXTsKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgIm1j X2RyYXdfcm93ICglcyk6ICB2cG9zICglZCkgfCBocG9zICglZCkgfCBsZW4gKCVkKVxuIiwKKyAg ICAgICAgICAgICAgICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3MsIGhwb3Nfc3RhcnQsIGhwb3Nf bGVuZ3RoKTsKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5kb3csIHcp OworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgTGlzcF9PYmplY3Qg YnVmID0gdy0+Y29udGVudHM7CisgIENIRUNLX0JVRkZFUiAoYnVmKTsKKyAgc3RydWN0IGJ1ZmZl ciAqYiA9IFhCVUZGRVIgKGJ1Zik7CisgIGludCBvcG9pbnRfZngsIG9wb2ludF9meSwgb3BvaW50 X3dkLCBvcG9pbnRfaDsKKyAgaW50IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGgg KHcsIFRFWFRfQVJFQSk7CisgIGludCBoZWFkZXJfbGluZV9mb3JtYXQgPSBXSU5ET1dfSEVBREVS X0xJTkVfSEVJR0hUICh3KTsKKyAgc3RydWN0IGdseXBoX3JvdyAqY3Vyc29yX3JvdyA9ICh3LT5j dXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFU UklYX1JPVyAoY3Vyc29yX21hdHJpeCwgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IE5VTEw7CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0g KHctPmN1cnNvci52cG9zICE9IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g bWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgY3Vyc29yX21hdHJpeCwgY3Vyc29yX3JvdywKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNv ci5ocG9zLCB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE5VTEw7CisgIGJvb2wgY3Vyc29yX2F0X2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxM CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93 LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29y X3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IueCA9PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gY3Vyc29yX3Jvdy0+cGl4ZWxfd2lkdGgpOwor ICBib29sIGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29y X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiAhY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gdGV4dF9hcmVhX3dpZHRoCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSBjdXJzb3Jfcm93 LT5waXhlbF93aWR0aCk7CisgIC8vICBib29sIGNnX3AgPSBjdXJzb3JfZ2x5cGggPT0gTlVMTDsK KyAgLy8gIGJvb2wgY3JfcCA9IGN1cnNvcl9yb3cgIT0gTlVMTDsKKyAgLy8gIGJvb2wgY2hfY3J1 ID0gdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdOworICAvLyAg Ym9vbCBjcmV3d2xfcCA9ICFjdXJzb3Jfcm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wOwor ICAvLyAgYm9vbCBjeF90YXdfcCA9IHctPmN1cnNvci54ID49IHRleHRfYXJlYV93aWR0aDsKKyAg Ly8gIGJvb2wgY3hfY3Jwd19wID0gdy0+Y3Vyc29yLnggPj0gY3Vyc29yX3Jvdy0+cGl4ZWxfd2lk dGg7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJ2cG9zICglZCkgfCBocG9zICglZC8lZCkgfCBj dXJzb3IueCAoJWQpIHwgdGF3ICglZCkgfCB1c2VkICglZCkgfCBydF9wICglZClcblwKKyAgLy8g ICAgY2dfcCAoJWQpLCBjcl9wICglZCksIGNoX2NydSAoJWQpLCBjcmV3d2xfcCAoJWQpLCBjeF90 YXdfcCAoJWQpLCBjeF9jcnB3X3AgKCVkKVxuIiwKKyAgLy8gICAgdnBvcywgaHBvc19zdGFydCwg aHBvc19sZW5ndGgsIHctPmN1cnNvci54LCB0ZXh0X2FyZWFfd2lkdGgsIHJvdy0+dXNlZFtURVhU X0FSRUFdLCByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wLAorICAvLyAgICBjZ19wLCBjcl9wLCBj aF9jcnUsIGNyZXd3bF9wLCBjeF90YXdfcCwgY3hfY3Jwd19wKTsKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICBSRVBMQUNFIFRIRSBSRUFMIENVUlNP UgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGVudW0gZmFjZV9pZCBiZ19mYWNlX2lkID0g KGN1cnNvcl9nbHlwaCAhPSBOVUxMKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gY3Vy c29yX2dseXBoLT5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxU X0ZBQ0VfSUQ7CisgIHN0cnVjdCBtY19SR0IgY3Vyc29yX2JnOworICBtY19zZXRfbHNsX2JnICh3 LCBiZ19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cuICovCisgIGVsc2UgaWYgKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAg ICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBv cyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICYmIChocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgp ID09IHJvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAmJiAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9ob3Jpem9udGFsX3J1bGVyKSkpCisgICAgewor ICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gTUNfUkVWRVJTRURfSE9MTE9XX1JF Q1RBTkdMRV9SSUdIVF9BUlJPVzsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1 cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIC0xLCB3LT5jdXJzb3IueSwgLTEsCisgICAgICAgICAg ICAgICAgIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgLTEsIC0xLCBNQ19SSUdIVF9G UklOR0VfQklUTUFQLCAtMSwKKyAgICAgICAgICAgICAgICAgY3Vyc29yX2ZnLCBjdXJzb3JfYmcs IGFjdGl2ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdfcCwgQ0hfQ0FDSEUpOworICAgIH0KKyAgLyog RVhBTVBMRSAoYnVmZmVyLWxvY2FsKTogIChzZXRxIG1jLXJlYWwtZmFrZS1jdXJzb3IgbmlsLydu by8ibm8iKSAqLworICBlbHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICYmIGN1cnNvcl90eXBlID09IE1DX05P X0NVUlNPUgorICAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zCisgICAgICAgICAg ICYmIHctPmN1cnNvci5ocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgJiYgdy0+Y3Vyc29y Lmhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgpCisgICAgeworICAgICAgLyogV2hlbiBh IHVzZXIgaGFzIG5vdCBzcGVjaWZpZWQgYSB2YWx1ZSBmb3IgYG1jLXJlYWwtZmFrZS1jdXJzb3In LCBvciB0aGUKKyAgICAgIHZhbHVlIGlzIGBub2AgaW4gdGhlIGZvcm0gb2YgYSBzeW1ib2wgb3Ig c3RyaW5nLCB0aGVuIHRoZSBkZWZhdWx0IHdlIHVzZQorICAgICAgYW4gTUNfQkFSIGFuZCBhbiBN Q19IQkFSIC0tIGJvdGggaGF2aW5nIGEgY3Vyc29yX3dpZHRoIG9mIDEuICovCisgICAgICBtY19n ZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRf ZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9m eSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBNQ19CQVIsIDEsICZvcG9pbnRfd2QpOworICAgICAgbWNfaGVs cGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwgb3BvaW50X2Z4 LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBv cywgdy0+Y3Vyc29yLnZwb3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAgICAgICAgICAgICAg IE1DX0JBUiwgMSwgY3Vyc29yX2ZnLCBjdXJzb3JfYmcsIGFjdGl2ZV9wLCBNQ19HTFlQSExFU1Ms CisgICAgICAgICAgICAgICAgIGRyYXdfcCwgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAg ICAgICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSk7CisgICAgICBtY19nZXRfY3Vyc29yX2dl b21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsIHctPmN1cnNv ci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdy0+Y3Vyc29y Lmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBNQ19IQkFSLCAxLCAmb3BvaW50X3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0 cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29y LnksCisgICAgICAgICAgICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNv ci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9oLAorICAgICAgICAgICAgICAgICBNQ19IQkFSLCAx LCBjdXJzb3JfZmcsIGN1cnNvcl9iZywgYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsCisgICAg ICAgICAgICAgICAgIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikp CisgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgOiBNQ19DQUNI RSk7CisgICAgfQorICBlbHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZw b3MKKyAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAg ICAmJiB3LT5jdXJzb3IuaHBvcyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAg ICAmJiBjdXJzb3JfZ2x5cGgtPnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBt Y19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9p bnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2lu dF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmb3BvaW50 X3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+ Y3Vyc29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgIG9wb2lu dF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9o LAorICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcs IGN1cnNvcl9iZywgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIE1DX0dMWVBILCBkcmF3X3As IE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiBNQ19DQUNIRSk7CisgICAgfQorICBlbHNlIGlmICghY3Vyc29yX2F0 X2ZyaW5nZV9wCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAg ICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3Mg Pj0gaHBvc19zdGFydAorICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA8IGhwb3Nfc3RhcnQg KyBocG9zX2xlbmd0aAorICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPnR5cGUgPT0gU1RSRVRD SF9HTFlQSCkKKyAgICB7CisgICAgICAvKiBJZiBhIHVzZXIgaGFzIHNldCBgeC1zdHJldGNoLWN1 cnNvcicgdG8gYSBub24tbmlsIHZhbHVlLCBoZS9zaGUgY2hvc2UgdG8KKyAgICAgIGhhdmUgYSBj dXJzb3IgdGhhdCBzcGFucyB0aGUgZW50aXJlIGxlbmd0aCBvZiB0aGUgU1RSRVRDSF9HTFlQSC4g Ki8KKyAgICAgIGlmICgheF9zdHJldGNoX2N1cnNvcl9wKQorICAgICAgICB7CisgICAgICAgICAg LyogVGhlIE1DX0hCQVIgc2hhbGwgaGF2ZSBhIGBjdXJzb3Jfd2lkdGhgIG9mIDEuICovCisgICAg ICAgICAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54 LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNv ci55LCAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLCBNQ19IQkFSLCAxLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfd2QpOworICAgICAgICAgIG1jX2hl bHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2ludF9m eCwKKyAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci55LCBvcG9pbnRfZnksIHctPmN1cnNv ci5ocG9zLCB3LT5jdXJzb3IudnBvcywKKyAgICAgICAgICAgICAgICAgICAgIG9wb2ludF93ZCwg b3BvaW50X2gsIE1DX0hCQVIsIDEsIGN1cnNvcl9mZywgY3Vyc29yX2JnLAorICAgICAgICAgICAg ICAgICAgICAgYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsCisgICAgICAgICAgICAgICAgICAg ICBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAgICAgICAg ICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSk7 CisgICAgICAgIH0KKyAgICAgIG1jX2dldF9jdXJzb3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwgcm93 LCB3LT5jdXJzb3IueCwgJm9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHctPmN1cnNvci55LCAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsIGN1cnNvcl90eXBlLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCAmb3BvaW50X3dkKTsK KyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29y LngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgIG9wb2ludF9meSwg dy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9oLAorICAg ICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcsIGN1cnNv cl9iZywgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIE1DX0dMWVBILCBkcmF3X3AsIE5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiBNQ19DQUNIRSk7CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisg ICAgICAgICAgICAgICAgICAgICAgICAgIERSQVcgQU5EIFJFQ09SRCBGQUtFIENVUlNPUlMKKyoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworICBpZiAoaHBvc19sZW5ndGggPT0gMSkKKyAgICB7Cisg ICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKQor ICAgICAgICB7CisgICAgICAgICAgLyogVGhlIHNwYWNlIGFwcGVuZGVkIHRvIGEgcm93IGVuZGlu ZyB3aXRoIGEgbmV3IGxpbmUKKyAgICAgICAgICBkb2VzIG5vdCBoYXZlIGEgYGdseXBoLT5jaGFy cG9zYCAoLTEsIDApIHRoYXQgd2UgY2FuCisgICAgICAgICAgdXNlIGZvciB0aGlzIHBhcnRpY3Vs YXIgYXBwbGljYXRpb24uICBXaGVuIHRoZXJlIGlzIGEKKyAgICAgICAgICBgYnVmZmVyLWRpc3Bs YXktdGFibGUnIGVudHJ5IHRoYXQgYXNzaWducyBhIHZpc2libGUKKyAgICAgICAgICBnbHlwaCB0 byBhIG5ldyBsaW5lLCB0aGVyZSBpcyBubyBwcm9ibGVtIGJlY2F1c2UgdGhhdAorICAgICAgICAg IGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBjYW4gdXNlLiAgV2hlbgorICAg ICAgICAgIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywgd2UgdXNlIHRoZSBmb2xsb3dpbmcK KyAgICAgICAgICB0ZXN0OiAgdGhlIGFwcGVuZGVkIHNwYWNlIGhhcyBhIHBvc2l0aW9uIHRoYXQg aXMgb25lCisgICAgICAgICAgbGVzcyB0aGFuIHRoZSBlbmQgb2YgdGhlIG1hdHJpeCByb3cuICov CisgICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07Cisg ICAgICAgICAgc3RydWN0IGdseXBoICpwcmV2aW91c19nbHlwaCA9ICgwIDw9IGhwb3MgLSAxICYm IGhwb3MgLSAxIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIGhwb3MgLSAxCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgICAgICAg ICBib29sIHNraXBfcCA9IChwcmV2aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gTUFUUklYX1JPV19FTkRfQ0hB UlBPUyAocm93KSAtIDEpOworICAgICAgICAgIGludCBwb3NpbnQgPSAoc3RhcnQgLSByb3ctPmds eXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAg ICAgICAgICAgICAgPyBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpIC0gMQorICAgICAgICAg ICAgICAgICAgICAgICA6IHN0YXJ0LT5jaGFycG9zOworICAgICAgICAgIExpc3BfT2JqZWN0IHNw ZWNzID0gbWNfYXNzb2MgKG1ha2VfZml4bnVtIChwb3NpbnQpLCBCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIG1jX2NvbmYpKTsKKyAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQg PiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09 IDApCisgICAgICAgICAgICAgICYmICFOSUxQIChzcGVjcykKKyAgICAgICAgICAgICAgJiYgc3Rh cnQtPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICYmICFza2lw X3AKKyAgICAgICAgICAgICAgJiYgIXN0YXJ0LT56dl9wKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBMaXNwX09iamVjdCBsaXNwX3R5cGUgPSBtY19udGggKDEsIHNwZWNzKTsKKyAgICAg ICAgICAgICAgZW51bSB0eXBlX29mX2N1cnNvciBjdXJzb3JfdHlwZSA9IChDT05TUCAobGlzcF90 eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g bWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlw ZSAobGlzcF90eXBlKTsKKyAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoc3RhcnQtPnR5cGUg PT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19IT0xMT1df Qk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3JfdHlwZTsKKyAgICAgICAg ICAgICAgaW50IGN1cnNvcl93aWR0aCA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENEUiAobGlzcF90eXBlKSkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0xOworICAgICAgICAgICAgICBM aXNwX09iamVjdCBtY19mb3JlZ3JvdW5kID0gbWNfbnRoICgyLCBzcGVjcyk7CisgICAgICAgICAg ICAgIHN0cnVjdCBtY19SR0IgZm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgaWYgKFNUUklOR1Ag KG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgIG1jX3h3X2NvbG9yX3ZhbHVlcyAodywg bWNfZm9yZWdyb3VuZCwgJmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKFZF Q1RPUlAgKG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBkb3VibGUgcmVkX2ZnID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQs IDApKTsKKyAgICAgICAgICAgICAgICAgICAgZG91YmxlIGdyZWVuX2ZnID0gWEZMT0FUX0RBVEEg KEFSRUYgKG1jX2ZvcmVncm91bmQsIDEpKTsKKyAgICAgICAgICAgICAgICAgICAgZG91YmxlIGJs dWVfZmcgPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMikpOworICAgICAgICAg ICAgICAgICAgICBmb3JlZ3JvdW5kLnJlZCA9IHJlZF9mZzsKKyAgICAgICAgICAgICAgICAgICAg Zm9yZWdyb3VuZC5ncmVlbiA9IGdyZWVuX2ZnOworICAgICAgICAgICAgICAgICAgICBmb3JlZ3Jv dW5kLmJsdWUgPSBibHVlX2ZnOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgZWxzZSBpZiAoTklMUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5kLnJlZCA9IGNoX2ZvcmVncm91bmQucmVk OworICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQuZ3JlZW4gPSBjaF9mb3JlZ3JvdW5k LmdyZWVuOworICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQuYmx1ZSA9IGNoX2ZvcmVn cm91bmQuYmx1ZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBpbnQgdnBv cyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgICAgICBpbnQgeF9s aW1pdCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgIG1j X2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJv dy0+eSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0sIHZwb3MsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNv cl93aWR0aCwgY3Vyc29yX21hdHJpeCwgZmNfeCwgZm9yZWdyb3VuZCwgYWN0aXZlX3AsCisgICAg ICAgICAgICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUywgZHJhd19wLCBNQ19DQUNIRSk7 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmICghTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAmJiBmY194IDw9IHRleHRf YXJlYV93aWR0aAorICAgICAgICAgICYmIGZjX3ggPj0gdy0+bWMubG51bV9waXhlbF93aWR0aCkK KyAgICAgICAgeworICAgICAgICAgIGludCB4X2xpbWl0ID0geCArIHN0YXJ0LT5waXhlbF93aWR0 aDsKKyAgICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueCA9PSBm Y194CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnkg PT0gc3RhcnQtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5j dXJzb3IuaHBvcyA9PSBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsKKyAg ICAgICAgICBpZiAoeCArIHN0YXJ0LT5waXhlbF93aWR0aCA8PSB0ZXh0X2FyZWFfd2lkdGgKKyAg ICAgICAgICAgICAgJiYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAg ICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAg ICYmICgoZmNfeCA+PSB4CisgICAgICAgICAgICAgICAgICAgJiYgZmNfeCA8IHggKyBzdGFydC0+ cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICB8fCBzdGFydCA9PSByb3ctPmdseXBoc1tU RVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAgICAmJiBz dGFydC0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgJiYgIXJl YWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3cs IHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAgICAgICAgICAg ICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBNQ19CQVIsIDEsCisg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGZjX3gsIGZjX2ZvcmVncm91bmQs IGFjdGl2ZV9wLCBGSUxMX0NPTFVNTiwKKyAgICAgICAgICAgICAgICAgICAgICAgZHJhd19wLCBG Q19DQUNIRSk7CisgICAgICAgIH0KKyAgICAgIGlmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hf aG9yaXpvbnRhbF9ydWxlcikpCisgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykK KyAgICAgICAgeworICAgICAgICAgIGludCB4X2xpbWl0ID0gKHN0YXJ0ID09IHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAg ICAgICAgICA/IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgOiB4ICsg c3RhcnQtPnBpeGVsX3dpZHRoOworICAgICAgICAgIC8qIFByZXNlcnZlIHN1cHBvcnQgZm9yIGRl ZmF1bHQgYmVoYXZpb3Igc3VjaCB0aGF0IGEgdXNlciBtYXkKKyAgICAgICAgICBzcGVjaWZ5IHRo ZSBoZWlnaHQgb2YgYW4gTUNfSEJBUiwgd2hpY2ggYmVnaW5zIGl0cyBqb3VybmV5CisgICAgICAg ICAgYXMgdGhlIGBjdXJzb3Jfd2lkdGgnLiAgYG1jX2dldF9jdXJzb3JfZ2VvbWV0cnknIHJlYWRq dXN0cy4gKi8KKyAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVY VF9BUkVBLCB4LCB4X2xpbWl0LCByb3ctPnksCisgICAgICAgICAgICAgICAgICAgICBzdGFydCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sIHZwb3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAg ICAgICAgICBjdXJzb3JfbWF0cml4LCBmY194LCBjaF9mb3JlZ3JvdW5kLCBhY3RpdmVfcCwKKyAg ICAgICAgICAgICAgICAgICAgIEhPUklaT05UQUxfUlVMRVIsIGRyYXdfcCwgQ0hfQ0FDSEUpOwor ICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg Y3Jvc3NoYWlycykpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1 bGVyKSkKKyAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3ApCisgICAgICAgIHsKKyAg ICAgICAgICBjdXJzb3JfdHlwZSA9IChzdGFydC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAorICAgICAgICAgICAgICAgICAgICAg ICAgOiBNQ19CQVI7CisgICAgICAgICAgaW50IHhfbGltaXQgPSB3aW5kb3dfYm94X3dpZHRoICh3 LCBURVhUX0FSRUEpOworICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKHctPmN1 cnNvci55ID09IHN0YXJ0LT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+Y3Vyc29yLnZwb3MgPT0gdnBvcyk7CisgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVf Zm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zv cm1hdCA9PSAwKQorICAgICAgICAgICAgICAmJiAoKHctPmN1cnNvci54ID49IHgKKyAgICAgICAg ICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA8IHggKyBzdGFydC0+cGl4ZWxfd2lkdGgpCisgICAg ICAgICAgICAgICAgICB8fCBzdGFydCA9PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51 c2VkW1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAgICAmJiBzdGFydC0+eSA8PSB3aW5kb3df dGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkK KyAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEs IHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQgLSByb3ct PmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBjdXJzb3JfdHlwZSwgMSwKKyAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX21hdHJpeCwgZmNfeCwgY2hfZm9yZWdyb3VuZCwgYWN0aXZlX3AsCisg ICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3AsIENIX0NBQ0hFKTsK KyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlCisgICAgICB7CisgICAgICAgIGludCByZWxhdGl2 ZV94ID0gMDsKKyAgICAgICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEg PCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5 cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGgg KmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgICAgICAgICAgLyogR2x5 cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4gKi8KKyAgICAgICAgICAgIGlmIChhcmVhID09IFRF WFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAg ICAgICAgICAgICArK2dseXBoX2VuZDsKKyAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBo X2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmICh2cG9z ICE9IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICAgICAgICAgICYmIGdseXBoICE9IGdseXBo X2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgJiYgZmNfeCA8IHJlbGF0aXZlX3gKKyAgICAg ICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPCByZWxhdGl2ZV94CisgICAgICAgICAgICAg ICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKQor ICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkKKyAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgLyogVGhlIHNwYWNlIGFwcGVuZGVkIHRvIGEgcm93IGVuZGlu ZyB3aXRoIGEgbmV3IGxpbmUgZG9lcworICAgICAgICAgICAgICAgICAgICBub3QgaGF2ZSBhIGBn bHlwaC0+Y2hhcnBvc2AgKC0xLCAwKSB0aGF0IHdlIGNhbiB1c2UgZm9yIHRoaXMKKyAgICAgICAg ICAgICAgICAgICAgcGFydGljdWxhciBhcHBsaWNhdGlvbi4gIFdoZW4gYSBgYnVmZmVyLWRpc3Bs YXktdGFibGUnIGVudHJ5CisgICAgICAgICAgICAgICAgICAgIGFzc2lnbnMgYSB2aXNpYmxlIGds eXBoIHRvIGEgbmV3IGxpbmUsIHRoZXJlIGlzIG5vIHByb2JsZW0KKyAgICAgICAgICAgICAgICAg ICAgYmVjYXVzZSB0aGF0IGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBjYW4g dXNlLgorICAgICAgICAgICAgICAgICAgICBXaGVuIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0 cywgd2UgdXNlIHRoZSBmb2xsb3dpbmcgdGVzdDoKKyAgICAgICAgICAgICAgICAgICAgdGhlIGFw cGVuZGVkIHNwYWNlIGhhcyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lIGxlc3MgdGhhbiB0aGUKKyAg ICAgICAgICAgICAgICAgICAgZW5kIG9mIHRoZSBtYXRyaXggcm93LiAqLworICAgICAgICAgICAg ICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpwcmV2aW91c19nbHlwaCA9ICgwIDw9IGhwb3Mg LSAxICYmIGhwb3MgLSAxIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0gKyBocG9zIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiBOVUxMOworICAgICAgICAgICAgICAgICAgICBib29sIHNraXBfcCA9IChwcmV2 aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHByZXZpb3VzX2dseXBoLT5jaGFycG9zID09IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykg LSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJs ZScgZW50cnkgY29udGFpbnMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhIHZp c2libGUgdGFiIGNoYXJhY3RlciAoIsK7IiksIHRoZSBzdWJzZXF1ZW50CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgU1RSRVRDSF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgZ2x5 cGgtPmNoYXJwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYWZv cmVtZW50aW9uZWQgdmlzaWJsZSB0YWIgY2hhcmFjdGVyLiAqLworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBnbHlw aC0+Y2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2U7CisgICAgICAgICAgICAg ICAgICAgIGludCBwb3NpbnQgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJv dy0+dXNlZFthcmVhXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1B VFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IGdseXBoLT5jaGFycG9zOworICAgICAgICAgICAgICAgICAgICBMaXNwX09iamVj dCBzcGVjcyA9IG1jX2Fzc29jIChtYWtlX2ZpeG51bSAocG9zaW50KSwgQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBtY19jb25mKSk7CisgICAgICAgICAgICAgICAgICAgIGlmICgoKGhlYWRl cl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAg fHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoc3BlY3MpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+eSA8PSB3aW5k b3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFza2lwX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICYmICFnbHlwaC0+enZfcCkKKyAgICAgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBMaXNwX09iamVjdCBsaXNwX3R5cGUg PSBtY19udGggKDEsIHNwZWNzKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gdHlwZV9v Zl9jdXJzb3IgY3Vyc29yX3R5cGUgPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19saXNwX3Rv X2N1cnNvcl90eXBlIChYQ0FSIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlw ZSAobGlzcF90eXBlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gKGds eXBoLT50eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IE1DX0hPTExPV19CT1gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBjdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBjdXJzb3Jf d2lkdGggPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBYRklYTlVNIChYQ0FSIChYQ0RSIChsaXNwX3R5cGUpKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0xOworICAgICAgICAgICAg ICAgICAgICAgICAgTGlzcF9PYmplY3QgbWNfZm9yZWdyb3VuZCA9IG1jX250aCAoMiwgc3BlY3Mp OworICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBmb3JlZ3JvdW5kOworICAg ICAgICAgICAgICAgICAgICAgICAgaWYgKFNUUklOR1AgKG1jX2ZvcmVncm91bmQpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIG1jX2ZvcmVncm91bmQs ICZmb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoVkVDVE9S UCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZG91YmxlIHJlZF9mZyA9IFhGTE9BVF9EQVRBIChBUkVG IChtY19mb3JlZ3JvdW5kLCAwKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3Vi bGUgZ3JlZW5fZmcgPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMSkpOworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZG91YmxlIGJsdWVfZmcgPSBYRkxPQVRfREFUQSAo QVJFRiAobWNfZm9yZWdyb3VuZCwgMikpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Zm9yZWdyb3VuZC5yZWQgPSByZWRfZmc7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBm b3JlZ3JvdW5kLmdyZWVuID0gZ3JlZW5fZmc7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBmb3JlZ3JvdW5kLmJsdWUgPSBibHVlX2ZnOworICAgICAgICAgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChOSUxQIChtY19mb3JlZ3Jv dW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBmb3JlZ3JvdW5kLnJlZCA9IGNoX2ZvcmVncm91bmQucmVkOworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZC5ncmVlbiA9IGNoX2ZvcmVncm91bmQuZ3Jl ZW47CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5kLmJsdWUgPSBjaF9m b3JlZ3JvdW5kLmJsdWU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4KTsK KyAgICAgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gd2luZG93X2JveF93aWR0aCAo dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0 cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB4X2xpbWl0LCByb3ctPnksIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgY3Vyc29yX3R5 cGUsIGN1cnNvcl93aWR0aCwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZmNfeCwgZm9yZWdyb3VuZCwgYWN0aXZlX3AsIE1VTFRJUExFX0NVUlNPUlMs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwgTUNfQ0FDSEUpOwor ICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkp CisgICAgICAgICAgICAgICAgICAgICYmIGZjX3ggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAg ICAgICAgICAgICAgICYmIGZjX3ggPj0gdy0+bWMubG51bV9waXhlbF93aWR0aCkKKyAgICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB3aW5kb3dfYm94 X3dpZHRoICh3LCBURVhUX0FSRUEpOworICAgICAgICAgICAgICAgICAgICBib29sIHJlYWxfZmFr ZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueCA9PSBmY194CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci55ID09IGdseXBoLT55CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5o cG9zID09IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsK KyAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV07CisgICAgICAgICAgICAgICAgICAgIGlmIChocG9zID49IGhwb3Nfc3RhcnQKKyAgICAg ICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAg ICAgICAgICAgICAgICAgICAgICAgICYmIHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgg PD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKGhlYWRlcl9s aW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg fHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAo KGdseXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg ZmNfeCA+PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZjX3gg PCByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHx8IChnbHlwaCA9PSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGZjX3ggPj0gcmVsYXRpdmVfeCkpCisgICAgICAgICAgICAgICAgICAgICAg ICAmJiBnbHlwaC0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAg ICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAgICAgICAgICAgICAg bWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsIHhfbGlt aXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnksIGhwb3MsIHZwb3Ms IE1DX0JBUiwgMSwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGZjX3gsIGZjX2ZvcmVncm91bmQsIGFjdGl2ZV9wLCBGSUxMX0NPTFVNTiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwgRkNfQ0FDSEUpOworICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgIGlmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIg KGIsIGNoX2hvcml6b250YWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAmJiB2cG9zID09 IHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg ICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAg ICAgICAgICAgICAgIGludCBocG9zID0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOwor ICAgICAgICAgICAgICAgICAgICAvKiBQcmVzZXJ2ZSBzdXBwb3J0IGZvciBkZWZhdWx0IGJlaGF2 aW9yIHN1Y2ggdGhhdCBhIHVzZXIgbWF5CisgICAgICAgICAgICAgICAgICAgIHNwZWNpZnkgdGhl IGhlaWdodCBvZiBhbiBNQ19IQkFSLCB3aGljaCBiZWdpbnMgaXRzIGpvdXJuZXkKKyAgICAgICAg ICAgICAgICAgICAgYXMgdGhlIGBjdXJzb3Jfd2lkdGgnLiAgYG1jX2dldF9jdXJzb3JfZ2VvbWV0 cnknIHJlYWRqdXN0cy4gKi8KKyAgICAgICAgICAgICAgICAgICAgaWYgKGhwb3MgPj0gaHBvc19z dGFydAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA8IGhwb3Nfc3RhcnQgKyBocG9z X2xlbmd0aCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93 LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgeF9saW1pdCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHJvdy0+eSwgaHBvcywgdnBvcywgTUNfSEJBUiwgMSwgY3Vyc29yX21hdHJp eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZjX3gsIGNoX2ZvcmVncm91bmQs IGFjdGl2ZV9wLCBIT1JJWk9OVEFMX1JVTEVSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgZHJhd19wLCBDSF9DQUNIRSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgaWYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMp KQorICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxfcnVs ZXIpKQorICAgICAgICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3ApCisgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gKGdseXBo LT50eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gTUNfSE9MTE9XX0JPWAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNf QkFSOworICAgICAgICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGgg KHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNv cl9wID0gKHctPmN1cnNvci55ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAg ICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsK KyAgICAgICAgICAgICAgICAgICAgaWYgKGhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAg ICAgICAgICAgICAgJiYgaHBvcyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAg ICAgICAgICAgICAgICAgJiYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQor ICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChnbHlwaCAhPSBnbHlwaF9lbmQgLSAxCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHJlbGF0aXZlX3gKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPCByZWxhdGl2ZV94ICsg Z2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChnbHlw aCA9PSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct PmN1cnNvci54ID49IHJlbGF0aXZlX3gpKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGgtPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2lu ZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBjdXJzb3Jf dHlwZSwgMSwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGZjX3gsIGNoX2ZvcmVncm91bmQsIGFjdGl2ZV9wLCBWRVJUSUNBTF9SVUxFUiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwgQ0hfQ0FDSEUpOworICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRo OworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorICAvLyAgY2xvY2tfdCBj bG9ja19lbmQgPSBjbG9jaygpOworICAvLyAgZG91YmxlIGNwdV90aW1lX3VzZWQgPSAoKGRvdWJs ZSkgKGNsb2NrX2VuZCAtIGNsb2NrX3N0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsKKyAgLy8gIGZw cmludGYgKHN0ZGVyciwgIm1jX2RyYXdfcm93ICglcyk6ICBUSU1FICglZilcbiIsIG1jX3dpbmRv dyAodyksIGNwdV90aW1lX3VzZWQpOworfQorCit2b2lkCittY19yZWRyYXdfaGVscGVyIChzdHJ1 Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9y b3cgKnJvdywKKyAgICAgICAgICAgICAgICAgIGVudW0gdHlwZV9vZl9jYWNoZSBjYWNoZV90eXBl LCBpbnQgc3RhcnRfaHBvcywgaW50IGVuZF9ocG9zKQoreworICBpbnQgcm93X3Zwb3MgPSBNQVRS SVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgc3RydWN0IG11bHRpcGxlX2N1cnNvcnNfY2Fj aGUgZm9vX2VsdHM7CisgIHN3aXRjaCAoY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBjYXNlIE5P X0NBQ0hFOgorICAgICAgICB7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNh c2UgTUNfQ0FDSEU6CisgICAgICAgIHsKKyAgICAgICAgICBmb29fZWx0cy5jYWNoZXMgPSB3LT5t Y19lbHRzLmNhY2hlczsKKyAgICAgICAgICBmb29fZWx0cy5hbGxvY2F0ZWQgPSB3LT5tY19lbHRz LmFsbG9jYXRlZDsKKyAgICAgICAgICBmb29fZWx0cy51c2VkID0gdy0+bWNfZWx0cy51c2VkOwor ICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBjYXNlIENIX0NBQ0hFOgorICAgICAg ICB7CisgICAgICAgICAgZm9vX2VsdHMuY2FjaGVzID0gdy0+Y2hfZWx0cy5jYWNoZXM7CisgICAg ICAgICAgZm9vX2VsdHMuYWxsb2NhdGVkID0gdy0+Y2hfZWx0cy5hbGxvY2F0ZWQ7CisgICAgICAg ICAgZm9vX2VsdHMudXNlZCA9IHctPmNoX2VsdHMudXNlZDsKKyAgICAgICAgICBicmVhazsKKyAg ICAgICAgfQorICA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X2hwb3MKKyAgICAgICAgICAgICAgICAgICYmIGhwb3Mg KyAxID09IGVuZF9ocG9zKSkKKyAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgIHsKKyAg ICAgICAgICBib29sIHJlbW92ZV9wID0gZmFsc2U7CisgICAgICAgICAgbWNfZHJhd19lcmFzZV9o eWJyaWQgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCBsc2xfZmcsIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlw aF9mbGF2b3IsIHJlbW92ZV9wKTsKKyAgICAgICAgfQorICAgIH0KK30KKwordm9pZAorbWNfcmVk cmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBz dHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICBpbnQgc3RhcnRfeCwgaW50IHN0 YXJ0X2hwb3MsIGludCBlbmRfaHBvcywgYm9vbCBjbGVhcl9lb2xfcCwKKyAgICAgICAgICAgICAg IGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1F IChXSU5ET1dfRlJBTUUgKHcpKTsKKyAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywg bWF0cml4KTsKKyAgVFJBQ0UgKChzdGRlcnIsICJtY19yZWRyYXdfcm93ICglZCk6ICBzdGFydF94 ICglZCkgfCBzdGFydF9ocG9zICglZCkgfCBlbmRfaHBvcyAoJWQpXG4iLAorICAgICAgICAgICAg ICAgICAgdnBvcywgc3RhcnRfeCwgc3RhcnRfaHBvcywgZW5kX2hwb3MpKTsKKyAgc3RydWN0IGds eXBoX3JvdyAqYm90dG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AgICAgeworICAgICAgICAgIGZvb19lbHRzLmNhY2hlcyA9 IHctPm1jX2VsdHMuY2FjaGVzOworICAgICAgICAgIGZvb19lbHRzLmFsbG9jYXRlZCA9IHctPm1j X2VsdHMuYWxsb2NhdGVkOworICAgICAgICAgIGZvb19lbHRzLnVzZWQgPSB3LT5tY19lbHRzLnVz ZWQ7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNhc2UgQ0hfQ0FDSEU6Cisg ICAgICAgIHsKKyAgICAgICAgICBmb29fZWx0cy5jYWNoZXMgPSB3LT5jaF9lbHRzLmNhY2hlczsK KyAgICAgICAgICBmb29fZWx0cy5hbGxvY2F0ZWQgPSB3LT5jaF9lbHRzLmFsbG9jYXRlZDsKKyAg ICAgICAgICBmb29fZWx0cy51c2VkID0gdy0+Y2hfZWx0cy51c2VkOworICAgICAgICAgIGJyZWFr OworICAgICAgICB9CisgICAgICBjYXNlIEZDX0NBQ0hFOgorICAgICAgICB7CisgICAgICAgICAg Zm9vX2VsdHMuY2FjaGVzID0gdy0+ZmNfZWx0cy5jYWNoZXM7CisgICAgICAgICAgZm9vX2VsdHMu YWxsb2NhdGVkID0gdy0+ZmNfZWx0cy5hbGxvY2F0ZWQ7CisgICAgICAgICAgZm9vX2VsdHMudXNl ZCA9IHctPmZjX2VsdHMudXNlZDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0K KyAgZm9yIChpbnQgZWx0ID0gMDsgZWx0IDwgZm9vX2VsdHMudXNlZDsgKytlbHQpCisgICAgewor ICAgICAgaW50IHggPSBmb29fZWx0cy5jYWNoZXNbZWx0XS54OworICAgICAgaW50IGZ4ID0gZm9v X2VsdHMuY2FjaGVzW2VsdF0uZng7CisgICAgICBpbnQgeSA9IGZvb19lbHRzLmNhY2hlc1tlbHRd Lnk7CisgICAgICBpbnQgZnkgPSBmb29fZWx0cy5jYWNoZXNbZWx0XS5meTsKKyAgICAgIGludCBo cG9zID0gZm9vX2VsdHMuY2FjaGVzW2VsdF0uaHBvczsKKyAgICAgIGludCB2cG9zID0gZm9vX2Vs dHMuY2FjaGVzW2VsdF0udnBvczsKKyAgICAgIGludCB3ZCA9IGZvb19lbHRzLmNhY2hlc1tlbHRd LndkOworICAgICAgaW50IGggPSBmb29fZWx0cy5jYWNoZXNbZWx0XS5oOworICAgICAgZW51bSB0 eXBlX29mX2N1cnNvciBjdXJzb3JfdHlwZSA9IGZvb19lbHRzLmNhY2hlc1tlbHRdLmN1cnNvcl90 eXBlOworICAgICAgaW50IGN1cnNvcl93aWR0aCA9IGZvb19lbHRzLmNhY2hlc1tlbHRdLmN1cnNv cl93aWR0aDsKKyAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnID0gey5yZWQgPSBmb29fZWx0cy5j YWNoZXNbZWx0XS5mb3JlZ3JvdW5kLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IC5ncmVlbiA9IGZvb19lbHRzLmNhY2hlc1tlbHRdLmZvcmVncm91bmQuZ3JlZW4sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IGZvb19lbHRzLmNhY2hlc1tlbHRdLmZvcmVn cm91bmQuYmx1ZX07CisgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9iZyA9IHsucmVkID0gZm9vX2Vs dHMuY2FjaGVzW2VsdF0uYmFja2dyb3VuZC5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAuZ3JlZW4gPSBmb29fZWx0cy5jYWNoZXNbZWx0XS5iYWNrZ3JvdW5kLmdyZWVuLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBmb29fZWx0cy5jYWNoZXNbZWx0XS5i YWNrZ3JvdW5kLmJsdWV9OworICAgICAgYm9vbCBhY3RpdmVfcCA9IGZvb19lbHRzLmNhY2hlc1tl bHRdLmFjdGl2ZV9wOworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gZm9vX2Vs dHMuY2FjaGVzW2VsdF0uZ2x5cGhfZmxhdm9yOworICAgICAgYm9vbCBlbmFibGVkX3AgPSBmb29f ZWx0cy5jYWNoZXNbZWx0XS5lbmFibGVkX3A7CisgICAgICAvKiBgbWF0cml4X3JvdycgaW4gYGRp c3BuZXcuY2AgY29udGFpbnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgICAgIGVhc3NlcnQgKG1h dHJpeCAmJiBtYXRyaXgtPnJvd3MpOworICAgICAgZWFzc2VydCAocm93ID49IDAgJiYgcm93IDwg bWF0cml4LT5ucm93cyk7ICovCisgICAgICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJpeCAm JiBtYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAgICAgaWYgKGJhcmZfY3Jhc2hfb25l KQorICAgICAgICBjb250aW51ZTsKKyAgICAgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAodnBvcyA+ PSAwICYmIHZwb3MgPCBtYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgICAgIGlmIChi YXJmX2NyYXNoX3R3bykKKyAgICAgICAgY29udGludWU7CisgICAgICBpZiAodnBvcyA9PSByb3df dnBvcworICAgICAgICAgICYmIGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICAgICYm IGVuYWJsZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIG1jX2VyYXNlX2N1cnNvciAodywgbWF0 cml4LCByb3csIHgsIHksIGhwb3MsIHZwb3MsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdk KTsKKyAgICAgICAgICBmb29fZWx0cy5jYWNoZXNbZWx0XS5lbmFibGVkX3AgPSBmYWxzZTsKKyAg ICAgICAgfQorICAgICAgICBlbHNlIGlmICh2cG9zID09IHJvd192cG9zCisgICAgICAgICAgICAg ICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIHJl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1jX1JHQiAqZmNfZm9yZWdyb3VuZCwgaW50ICpmY194KQorewor ICBpZiAoIUJVRkZFUlAgKHctPmNvbnRlbnRzKSkKKyAgICByZXR1cm47CisgIGlmIChOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICYmIE5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpKQorICAgIHJldHVybjsKKyAg c3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIExpc3BfT2JqZWN0IGJ1ZiA9 IHctPmNvbnRlbnRzOworICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKmIg PSBYQlVGRkVSIChidWYpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAg cHRyZGlmZl90IG9wb2ludCA9ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpCisgICAg ICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICA6IFhGSVhOVU0gKEZt YXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOworICBwdHJkaWZmX3QgZmNfY3VycmVudF9jb2wg PSBtY19jdXJyZW50X2NvbHVtbiAodywgb3BvaW50KTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGgg PSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAo QlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAoQlZBUiAo YiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGhzY2xfeCA9IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFy X3dpZHRoOworICBpZiAoYiAhPSBjdXJyZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVm ZmVyID0gY3VycmVudF9idWZmZXI7CisgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAg ICB9CisgICpmY194ID0gKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgJiYgIU5JTFAgKFZkaXNw bGF5X2xpbmVfbnVtYmVycykpCisgICAgICAgICAgICA/IChmaWxsX2NvbCAqIGZyYW1lX2NoYXJf d2lkdGgpICsgdy0+bWMubG51bV9waXhlbF93aWR0aCAtIGhzY2xfeAorICAgICAgICAgIDogKGZp bGxfY29sdW1uX3AKKyAgICAgICAgICAgICAmJiBOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMp KQorICAgICAgICAgICAgPyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoKSAtIGhzY2xfeAor ICAgICAgICAgIDogMDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAgc2V0X2J1ZmZlcl9pbnRlcm5h bCAob2xkX2J1ZmZlcik7CisgIGVudW0gZmFjZV9pZCBmaWxsX2NvbHVtbl9mYWNlX2lkID0KKyAg ICAoIWFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYs IGludGVybiAoImZjLWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAgICA6ICghYWN0aXZlX3AKKyAg ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY19pbmFjdGl2ZV93 aW5kb3dzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj cm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxfcnVsZXIp KQorICAgICAgICYmIHctPmN1cnNvci54ID09ICpmY194KQorICAgICAgPyBsb29rdXBfbmFtZWRf ZmFjZSAodywgZiwgaW50ZXJuICgiZmMtb3BvaW50LWluYWN0aXZlLWZhY2UiKSwgdHJ1ZSkKKyAg ICA6IChhY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9y dWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gKmZjX3gpCisgICAgICA/IGxvb2t1cF9u YW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1vcG9pbnQtZmFjZSIpLCB0cnVlKQorICAgIDog KCFhY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92 ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggIT0gKmZjX3gpCisgICAgICA/ IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1pbmFjdGl2ZS1mYWNlIiksIHRy dWUpCisgICAgOiAoYWN0aXZlX3AKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVy dGljYWxfcnVsZXIpKQorICAgICAgICYmIHctPmN1cnNvci54ICE9ICpmY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KKyAgICByZXR1cm47 CisgIGJvb2wgZ29fb25lX3AgPSAody0+bWNfZWx0cy51c2VkID4gMCB8fCB3LT5jaF9lbHRzLnVz ZWQgPiAwIHx8IHctPmZjX2VsdHMudXNlZCA+IDApOworICBib29sIGdvX3R3b19wID0gKEJVRkZF UlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICYmICghTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAg fHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAg ICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IG1jX2NvbmYpKSkpOworICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnByaW50ZiAoc3Rk ZXJyLCAibWNfcHJlX3Njcm9sbF9jbGVhbiAoJXMpOiAgZ29fb25lX3AgKCVzKSB8IGdvX3R3b19w ICglcylcbiIsCisgICAgICAgICAgICAgICAgICAgICBtY193aW5kb3cgKHcpLCBnb19vbmVfcCA/ ICJ5ZXMiIDogIm5vIiwgZ29fdHdvX3AgPyAieWVzIiA6ICJubyIpOworICBpZiAoIWdvX29uZV9w ICYmICFnb190d29fcCkKKyAgICByZXR1cm47CisgIGJvb2wgdXBkYXRpbmdfZnJhbWVfcCA9IGZh bHNlOworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgaWYgKFhGUkFN RSAody0+ZnJhbWUpICE9IGYtPm1jX3VwZGF0aW5nX2ZyYW1lCisgICAgICAmJiAoZ29fb25lX3Ag fHwgZ29fdHdvX3ApKQorICAgIHsKKyAgICAgIHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOworICAg ICAgdXBkYXRlX2JlZ2luIChmKTsKKyAgICB9CisgIGlm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IGFyZyA9IEZwcmVmaXhfbnVtZXJpY192YWx1ZSAoYXJnKTsKKyAgICAgIG1jX3N0 ZGVycl9wID0gWEZJWE5VTSAoYXJnKSA+IDA7CisgICAgfQorICByZXR1cm4gUW5pbDsKK30KKwor LyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAwKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKgogCQkgICAgICBXaW5kb3cgZGlzcGxheSBkaW1lbnNpb25zCkBA IC0xMzM5NSw2ICsxNzQ3OSw2OSBAQCBoc2Nyb2xsX3dpbmRvd190cmVlIChMaXNwX09iamVjdCB3 aW5kb3cpCiAJICAgICAgZWxzZQogCQlwdCA9IGNsaXBfdG9fYm91bmRzIChCRUdWLCBtYXJrZXJf cG9zaXRpb24gKHctPnBvaW50bSksIFpWKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogKGdkYikgYnQKKyMwICB0ZXJtaW5h dGVfZHVlX3RvX3NpZ25hbCAoc2lnPTYsIGJhY2t0cmFjZV9saW1pdD0yMTQ3NDgzNjQ3KSBhdCBl bWFjcy5jOjM1OQorIzEgIDB4MDAwMDAwMDEwMDFlZTk5NiBpbiBkaWUgKAorICAgIG1zZz0weDEw MDMyZmM4OCAiY2hhcnBvcyA8IDAgfHwgKGNoYXJwb3MgPj0gQlVGX0JFRyAoY3VycmVudF9idWZm ZXIpICYmIGNoYXJwb3MgPD0gWlYpIiwgZmlsZT0weDEwMDMyZTMyZCAieGRpc3AuYyIsIGxpbmU9 Nzk1MSkgYXQ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ICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY2hhcnBvcyA8PSBaVikpOyAqLworCisgIHN0 cnVjdCBkaXNwbGF5X3BvcyAqcG9zID0gJmN1cnNvcl9yb3ctPnN0YXJ0OworICBwdHJkaWZmX3Qg Y2hhcnBvcyA9IENIQVJQT1MgKHBvcy0+cG9zKTsKKworICBib29sIGJhcmZfY3Jhc2hfb25lID0g KGNoYXJwb3MgPCAwCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGNoYXJwb3MgPj0gQlVG X0JFRyAoY3VycmVudF9idWZmZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGNo YXJwb3MgPD0gWlYpKQorICAgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQorICAgICAgICAg ICAgICAgICAgICAgICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgcmV0dXJu IGhzY3JvbGxlZF9wOworCisgIC8qIGByZXNlYXRfMSc6ICBDSEFSUE9TIChwb3MpID49IEJFR1Yg JiYgQ0hBUlBPUyAocG9zKSA8PSBaViAqLworICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKGNoYXJw b3MgPj0gQkVHViAmJiBjaGFycG9zIDw9IFpWKQorICAgICAgICAgICAgICAgICAgICAgICAgID8g ZmFsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNo X3R3bykKKyAgICByZXR1cm4gaHNjcm9sbGVkX3A7CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JT ICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAgLyogTW92ZSBpdGVyYXRv ciB0byBwdCBzdGFydGluZyBhdCBjdXJzb3Jfcm93LT5zdGFydCBpbgogCQkgYSBsaW5lIHdpdGgg aW5maW5pdGUgd2lkdGguICAqLwogCSAgICAgIGluaXRfdG9fcm93X3N0YXJ0ICgmaXQsIHcsIGN1 cnNvcl9yb3cpOwpAQCAtMTQyODcsOSArMTg0MzQsMjIgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2 b2lkKQogCSAgICAgICp3LT5kZXNpcmVkX21hdHJpeC0+bWV0aG9kID0gMDsKIAkgICAgICBkZWJ1 Z19tZXRob2RfYWRkICh3LCAib3B0aW1pemF0aW9uIDEiKTsKICNlbmRpZgorCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAjaWZkZWYgSEFWRV9X SU5ET1dfU1lTVEVNCisgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICBtY191cGRh dGVfd2luZG93X2ZyaW5nZXMgKHcsIGZhbHNlKTsKKyAgICBlbHNlCiAJICAgICAgdXBkYXRlX3dp bmRvd19mcmluZ2VzICh3LCBmYWxzZSk7CiAjZW5kaWYKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogCSAgICAgIGdvdG8gdXBkYXRlOwogCSAgICB9CiAJICBlbHNlCkBAIC0xNzY4Nywx MCArMjE4NDcsMjIgQEAgcmVkaXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29s IGp1c3RfdGhpc19vbmVfcCkKICAgICB9CiAKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBi b29sIGtlZXBfY3VycmVudF9wID0gKGp1c3RfdGhpc19vbmVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgIHx8ICghdXNlZF9jdXJyZW50X21hdHJpeF9wICYmICFvdmVybGF5X2Fycm93X3NlZW4p CisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgdy0+cHNldWRvX3dpbmRvd19wKTsKKworICBi b29sIGZyaW5nZXNfdXBkYXRlZF9wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNyb3NzaGFpcnMpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dp bmRvd19mcmluZ2VzICh3LCBrZWVwX2N1cnJlbnRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBrZWVwX2N1cnJlbnRfcCk7CisKICAgaWYg KEZSQU1FX1dJTkRPV19QIChmKQotICAgICAgJiYgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCAo anVzdF90aGlzX29uZV9wCi0JCQkJICAgIHx8ICghdXNlZF9jdXJyZW50X21hdHJpeF9wICYmICFv dmVybGF5X2Fycm93X3NlZW4pCi0JCQkJICAgIHx8IHctPnBzZXVkb193aW5kb3dfcCkpKQorICAg ICAgJiYgZnJpbmdlc191cGRhdGVkX3ApCiAgICAgewogICAgICAgdXBkYXRlX2JlZ2luIChmKTsK ICAgICAgIGJsb2NrX2lucHV0ICgpOwpAQCAtMTc3MDUsNiArMjE4NzcsOSBAQCByZWRpc3BsYXlf d2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQogICAgICAg dXBkYXRlX2VuZCAoZik7CiAgICAgfQogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg IGlmIChXSU5ET1dfQk9UVE9NX0RJVklERVJfV0lEVEggKHcpKQogICAgIHhfZHJhd19ib3R0b21f ZGl2aWRlciAodyk7CiAjZW5kaWYgLyogSEFWRV9XSU5ET1dfU1lTVEVNICovCkBAIC0xODAxMCw2 ICsyMjE4NSwxOSBAQCB0cnlfd2luZG93X3JldXNpbmdfY3VycmVudF9tYXRyaXggKHN0cnVjdCB3 aW5kb3cgKncpCiAJICAgICBzY3JvbGxfcnVuX2hvb2sgd2lsbCBjbGVhciB0aGUgY3Vyc29yLCBh bmQgdXNlIHRoZQogCSAgICAgY3VycmVudCBtYXRyaXggdG8gZ2V0IHRoZSBoZWlnaHQgb2YgdGhl IHJvdyB0aGUgY3Vyc29yIGlzCiAJICAgICBpbi4gICovCisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9w KQorICAgIGZwcmludGYgKHN0ZGVyciwgInRyeV93aW5kb3dfcmV1c2luZ19jdXJyZW50X21hdHJp eCBbMSBvZiAyXSAoJXMpXG4iLCBtY193aW5kb3cgKHcpKTsKKworICBtY19wcmVfc2Nyb2xsX2Ns ZWFuICh3KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgcnVuLmN1cnJlbnRf eSA9IHN0YXJ0X3Jvdy0+eTsKIAkgIHJ1bi5kZXNpcmVkX3kgPSBpdC5jdXJyZW50X3k7CiAJICBy dW4uaGVpZ2h0ID0gaXQubGFzdF92aXNpYmxlX3kgLSBpdC5jdXJyZW50X3k7CkBAIC0xODE3Myw2 ICsyMjM2MSwxOSBAQCB0cnlfd2luZG93X3JldXNpbmdfY3VycmVudF9tYXRyaXggKHN0cnVjdCB3 aW5kb3cgKncpCiAJfQogCiAgICAgICAvKiBTY3JvbGwgdGhlIGRpc3BsYXkuICAqLworCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmICh0 cmFjZV9yZWRpc3BsYXlfcCkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJ0cnlfd2luZG93X3JldXNp bmdfY3VycmVudF9tYXRyaXggWzIgb2YgMl0gKCVzKVxuIiwgbWNfd2luZG93ICh3KSk7CisKKyAg bWNfcHJlX3Njcm9sbF9jbGVhbiAodyk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgICAgIHJ1bi5jdXJyZW50X3kgPSBmaXJzdF9yZXVzYWJsZV9yb3ctPnk7CiAgICAgICBydW4u ZGVzaXJlZF95ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CiAgICAgICBydW4uaGVp Z2h0ID0gaXQubGFzdF92aXNpYmxlX3kgLSBydW4uY3VycmVudF95OwpAQCAtMTkxMjcsNiArMjMz MjgsMTkgQEAgdHJ5X3dpbmRvd19pZCAoc3RydWN0IHdpbmRvdyAqdykKICAgLyogU2Nyb2xsIHRo ZSBkaXNwbGF5LiAgRG8gaXQgYmVmb3JlIGNoYW5naW5nIHRoZSBjdXJyZW50IG1hdHJpeCBzbwog ICAgICB0aGF0IHh0ZXJtLmMgZG9lc24ndCBnZXQgY29uZnVzZWQgYWJvdXQgd2hlcmUgdGhlIGN1 cnNvciBnbHlwaCBpcwogICAgICBmb3VuZC4gICovCisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQor ICAgIGZwcmludGYgKHN0ZGVyciwgInRyeV93aW5kb3dfaWQgKCVzKVxuIiwgbWNfd2luZG93ICh3 KSk7CisKKyAgbWNfcHJlX3Njcm9sbF9jbGVhbiAodyk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgaWYgKGR5ICYmIHJ1bi5oZWlnaHQpCiAgICAgewogICAgICAgdXBkYXRlX2Jl Z2luIChmKTsKQEAgLTIwMTMzLDYgKzI0MzQ3LDE3IEBAIGFwcGVuZF9zcGFjZV9mb3JfbmV3bGlu ZSAoc3RydWN0IGl0ICppdCwgYm9vbCBkZWZhdWx0X2ZhY2VfcCkKIAkgIG1lbXNldCAoJml0LT5w b3NpdGlvbiwgMCwgc2l6ZW9mIGl0LT5wb3NpdGlvbik7CiAJICBpdC0+b2JqZWN0ID0gUW5pbDsK IAkgIGl0LT5jID0gaXQtPmNoYXJfdG9fZGlzcGxheSA9ICcgJzsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgaWYgKElUX0JZVEVQ T1MgKCppdCkgPj0gWlZfQllURSkKKyAgICAgICAgaXQtPnp2X3AgPSB0cnVlOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAJICBpdC0+bGVuID0gMTsKIAogCSAgLyogSWYgdGhlIGRl ZmF1bHQgZmFjZSB3YXMgcmVtYXBwZWQsIGJlIHN1cmUgdG8gdXNlIHRoZQpAQCAtMjEyNjksOSAr MjU0OTQsMjIgQEAgbWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKICAg ICAgIGVsc2UKIAl0ZW1faXQuYyA9IHRlbV9pdC5jaGFyX3RvX2Rpc3BsYXkgPSAqcDsKICAgICAg IHRlbV9pdC5sZW4gPSAxOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCisgICAgICBpZiAoYmV5b25kX3p2KQorICAgICAgICB0ZW1faXQuenZf cCA9IHRydWU7CisgICAgICB0ZW1faXQuY3VycmVudF95ID0gaXQtPmN1cnJlbnRfeTsKKyAgICAg IHRlbV9pdC52cG9zID0gaXQtPnZwb3M7CiAgICAgICAvKiBNYWtlIHN1cmUgdGhlc2UgZ2x5cGhz IHdpbGwgaGF2ZSBhICJwb3NpdGlvbiIgb2YgLTEuICAqLwogICAgICAgU0VUX1RFWFRfUE9TICh0 ZW1faXQucG9zaXRpb24sIC0xLCAtMSk7CiAgICAgICBQUk9EVUNFX0dMWVBIUyAoJnRlbV9pdCk7 CisgICAgICB0ZW1faXQuaHBvcyArPSAxOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwog CiAgICAgICAvKiBTdG9wIHByb2R1Y2luZyBnbHlwaHMsIGFuZCByZWZyYWluIGZyb20gcHJvZHVj aW5nIHRoZSBsaW5lCiAJIG51bWJlciwgaWYgd2UgZG9uJ3QgaGF2ZSBlbm91Z2ggc3BhY2Ugb24g dGhpcyBsaW5lLiAgKi8KQEAgLTIxMjg0LDYgKzI1NTIyLDMwIEBAIG1heWJlX3Byb2R1Y2VfbGlu ZV9udW1iZXIgKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgIH0KIAorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBMaXNwX09iamVjdCBidWYgPSBp dC0+dy0+Y29udGVudHM7CisgIENIRUNLX0JVRkZFUiAoYnVmKTsKKyAgc3RydWN0IGJ1ZmZlciAq YiA9IFhCVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKm9sZF9idWZmZXIgPSBOVUxMOwor ICAvKiBOZWVkZWQgc28gdGhhdCBidWZmZXItbG9jYWwgdmFsdWVzIGNhbiBiZSBkZXRlcm1pbmVk OyBlLmcuLCB3aGVuIHN3aXRjaGluZworICB0byB0aGUgbWluaWJ1ZmZlci4gKi8KKyAgaWYgKGIg IT0gY3VycmVudF9idWZmZXIpCisgICAgeworICAgICAgb2xkX2J1ZmZlciA9IGN1cnJlbnRfYnVm ZmVyOworICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAoYik7CisgICAgfQorICBpdC0+dy0+bWMu bG51bV9waXhlbF93aWR0aCA9ICghTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRlbV9pdC5jdXJyZW50X3gKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IDA7CisgIGlmIChvbGRfYnVmZmVyKQorICAgIHNldF9idWZm ZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIC8qIFJlY29yZCB0aGUgd2lkdGggaW4gcGl4ZWxzIHdlIG5lZWQgZm9yIHRoZSBsaW5lIG51 bWJlciBkaXNwbGF5LiAgKi8KICAgaXQtPmxudW1fcGl4ZWxfd2lkdGggPSB0ZW1faXQuY3VycmVu dF94OwogICAvKiBDb3B5IHRoZSBwcm9kdWNlZCBnbHlwaHMgaW50byBJVCdzIGdseXBoX3Jvdy4g ICovCkBAIC0yNzA5Miw2ICszMTM1NCwyMCBAQCBhcHBlbmRfZ2x5cGggKHN0cnVjdCBpdCAqaXQp CiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWFd OwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMg Ki8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworICAgICAgZ2x5cGgtPnkgPSBp dC0+Y3VycmVudF95OworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBo LT52cG9zID0gaXQtPnZwb3M7CisgICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1Mg KGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAg IGlmIChpdC0+cGl4ZWxfd2lkdGggPiAwKQpAQCAtMjcxNzUsNiArMzE0NTEsMjAgQEAgYXBwZW5k X2NvbXBvc2l0ZV9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5 cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbaXQtPmFyZWFdOwogCX0KKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPngg PSBpdC0+Y3VycmVudF94OworICAgICAgZ2x5cGgtPnkgPSBpdC0+Y3VycmVudF95OworICAgICAg Z2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7Cisg ICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IGl0LT5jbXBfaXQuY2hhcnBvczsKICAgICAgIGds eXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dpZHRo IDw9IFNIUlRfTUFYKTsKQEAgLTI3MzgzLDYgKzMxNjczLDIwIEBAIHByb2R1Y2VfaW1hZ2VfZ2x5 cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+ Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKyAg ICAgIGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhw b3M7CisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworICAgICAgZ2x5cGgtPnp2X3AgPSBp dC0+enZfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgZ2x5cGgtPmNoYXJw b3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmpl Y3Q7CiAJICBnbHlwaC0+cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5kcyAoLTEsIGl0LT5waXhl bF93aWR0aCwgU0hSVF9NQVgpOwpAQCAtMjc0ODYsNiArMzE3OTAsMjAgQEAgcHJvZHVjZV94d2lk Z2V0X2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlw aF9yb3ctPmdseXBoc1thcmVhICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50 X3g7CisgICAgICBnbHlwaC0+eSA9IGl0LT5jdXJyZW50X3k7CisgICAgICBnbHlwaC0+aHBvcyA9 IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBvczsKKyAgICAgIGdseXBoLT56 dl9wID0gaXQtPnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBo LT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBp dC0+b2JqZWN0OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBp dC0+cGl4ZWxfd2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3NTcyLDYgKzMxODkwLDIwIEBAIGFwcGVu ZF9zdHJldGNoX2dseXBoIChzdHJ1Y3QgaXQgKml0LCBMaXNwX09iamVjdCBvYmplY3QsCiAJICAg IHdpZHRoIC09IGl0LT5maXJzdF92aXNpYmxlX3ggLSBpdC0+Y3VycmVudF94OwogCSAgZWFzc2Vy dCAod2lkdGggPiAwKTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKyAgICAg IGdseXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7 CisgICAgICBnbHlwaC0+dnBvcyA9IGl0LT52cG9zOworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+ enZfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJw b3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IG9iamVj dDsKICAgICAgIC8qIEZJWE1FOiBJdCB3b3VsZCBiZSBiZXR0ZXIgdG8gdXNlIFRZUEVfTUFYIGhl cmUsIGJ1dApAQCAtMjgwMjYsNiArMzIzNTgsMjAgQEAgYXBwZW5kX2dseXBobGVzc19nbHlwaCAo c3RydWN0IGl0ICppdCwgaW50IGZhY2VfaWQsIGJvb2wgZm9yX25vX2ZvbnQsIGludCBsZW4sCiAJ ICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWFdOwog CX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworICAgICAgZ2x5cGgtPnkgPSBpdC0+ Y3VycmVudF95OworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT52 cG9zID0gaXQtPnZwb3M7CisgICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0 LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGVh c3NlcnQgKGl0LT5waXhlbF93aWR0aCA8PSBTSFJUX01BWCk7CkBAIC0yOTA3NiwxMCArMzM0MjIs MzMgQEAgeF9pbnNlcnRfZ2x5cGhzIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93 ICp1cGRhdGVkX3JvdywKIAogICAvKiBXcml0ZSB0aGUgZ2x5cGhzLiAgKi8KICAgaHBvcyA9IHN0 YXJ0IC0gcm93LT5nbHlwaHNbdXBkYXRlZF9hcmVhXTsKKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpZiAoKHctPm1jX2VsdHMudXNlZCA+ IDAgfHwgdy0+Y2hfZWx0cy51c2VkID4gMCB8fCB3LT5mY19lbHRzLnVzZWQgPiAwKQorICAgICAg JiYgdXBkYXRlZF9hcmVhID09IFRFWFRfQVJFQSkKKyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgIGludCB2cG9zID0gTUFU UklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICBpbnQgc3RhcnRfeCA9IHctPm91dHB1 dF9jdXJzb3IueDsKKyAgICAgIGludCBzdGFydF9ocG9zID0gaHBvczsKKyAgICAgIGludCBlbmRf aHBvcyA9IGhwb3MgKyBsZW47CisgICAgICBib29sIGNsZWFyX2VvbF9wID0gZmFsc2U7CisgICAg ICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UgaGwgPSBEUkFXX05PUk1BTF9URVhUOworICAgICAgVFJB Q0UgKChzdGRlcnIsICJ4X2luc2VydF9nbHlwaHMgKCVkKTogIHN0YXJ0X3ggKCVkKSB8IHN0YXJ0 X2hwb3MgKCVkKSB8IGVuZF9ocG9zICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgdnBv cywgc3RhcnRfeCwgc3RhcnRfaHBvcywgZW5kX2hwb3MpKTsKKyAgICAgIG1jX3JlZHJhd19yb3cg KHcsIG1hdHJpeCwgcm93LCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRfaHBvcywgY2xlYXJfZW9s X3AsIGhsKTsKKyAgICB9CisgICAgZWxzZQogICBkcmF3X2dseXBocyAodywgdy0+b3V0cHV0X2N1 cnNvci54LCByb3csIHVwZGF0ZWRfYXJlYSwKIAkgICAgICAgaHBvcywgaHBvcyArIGxlbiwKIAkg ICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICAgLyogQWR2YW5jZSB0aGUgb3V0cHV0IGN1cnNvci4gICovCiAgIHctPm91dHB1dF9jdXJz b3IuaHBvcyArPSBsZW47CiAgIHctPm91dHB1dF9jdXJzb3IueCArPSBzaGlmdF9ieV93aWR0aDsK QEAgLTI5NTA1LDkgKzMzODc0LDMxIEBAIHhfZml4X292ZXJsYXBwaW5nX2FyZWEgKHN0cnVjdCB3 aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgIHdoaWxlIChpIDwgcm93LT51c2Vk W2FyZWFdCiAJCSAmJiByb3ctPmdseXBoc1thcmVhXVtpXS5vdmVybGFwc192ZXJ0aWNhbGx5X3Ap OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CisgICAgICAgIGlmICgody0+bWNfZWx0cy51c2VkID4gMCB8fCB3LT5jaF9lbHRzLnVzZWQgPiAw IHx8IHctPmZjX2VsdHMudXNlZCA+IDApCisgICAgICAgICAgICAmJiBhcmVhID09IFRFWFRfQVJF QSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgg PSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19W UE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IHN0YXJ0Owor ICAgICAgICAgICAgaW50IGVuZF9ocG9zID0gaTsKKyAgICAgICAgICAgIGJvb2wgY2xlYXJfZW9s X3AgPSBmYWxzZTsKKyAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCA9IERSQVdf Tk9STUFMX1RFWFQ7CisgICAgICAgICAgICBUUkFDRSAoKHN0ZGVyciwgInhfZml4X292ZXJsYXBw aW5nX2FyZWEgKCVkKTogIHN0YXJ0X3ggKCVkKSB8IHN0YXJ0X2hwb3MgKCVkKSB8IGVuZF9ocG9z ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgc3RhcnRfeCwgc3Rh cnRfaHBvcywgZW5kX2hwb3MpKTsKKyAgICAgICAgICAgIG1jX3JlZHJhd19yb3cgKHcsIG1hdHJp eCwgcm93LCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRfaHBvcywgY2xlYXJfZW9sX3AsIGhsKTsK KyAgICAgICAgICB9CisgICAgICAgICAgZWxzZQogCSAgZHJhd19nbHlwaHMgKHcsIHN0YXJ0X3gs IHJvdywgYXJlYSwKIAkJICAgICAgIHN0YXJ0LCBpLAogCQkgICAgICAgRFJBV19OT1JNQUxfVEVY VCwgb3ZlcmxhcHMpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJfQogICAgICAg ZWxzZQogCXsKQEAgLTI5NzU4LDEwICszNDE0OSwxNyBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29y IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLAogICBuZXdfY3Vyc29yX3R5cGUgPSBnZXRfd2lu ZG93X2N1cnNvcl90eXBlICh3LCBnbHlwaCwKIAkJCQkJICAgICZuZXdfY3Vyc29yX3dpZHRoLCAm YWN0aXZlX2N1cnNvcik7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RS1DVVJTT1JTICovCisKICAgLyogSWYgY3Vyc29yIGlzIGN1cnJlbnRseSBiZWluZyBzaG93biBh bmQgd2UgZG9uJ3Qgd2FudCBpdCB0byBiZSBvcgogICAgICBpdCBpcyBpbiB0aGUgd3JvbmcgcGxh Y2UsIG9yIHRoZSBjdXJzb3IgdHlwZSBpcyBub3Qgd2hhdCB3ZSB3YW50LAogICAgICBlcmFzZSBp dC4gICovCiAgIGlmICh3LT5waHlzX2N1cnNvcl9vbl9wCisgICAgICAmJiBOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGNy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wK LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY3Vyc29yX3R5cGUsIG5l d19jdXJzb3Jfd2lkdGgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb24s IGFjdGl2ZV9jdXJzb3IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICBpZiAoTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj cm9zc2hhaXJzKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg ZmNfdmlzaWJsZSkpCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IG1jX2NvbmYpKSkKKyAgICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGds eXBoX3JvdywgeCwgeSwgbmV3X2N1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbmV3X2N1cnNvcl93aWR0aCwgb24sIGFjdGl2ZV9jdXJzb3IpOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIApAQCAtMjk4ODcsNyArMzQyOTgsMjcg QEAgZHJhd19yb3dfd2l0aF9tb3VzZV9mYWNlIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgc3RhcnRf eCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogICBp ZiAoRlJBTUVfV0lORE9XX1AgKFhGUkFNRSAody0+ZnJhbWUpKSkKICAgICB7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGlmICh3 LT5tY19lbHRzLnVzZWQgPiAwIHx8IHctPmNoX2VsdHMudXNlZCA+IDAgfHwgdy0+ZmNfZWx0cy51 c2VkID4gMCkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJp eCA9IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19W UE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgYm9vbCBjbGVhcl9lb2xfcCA9IGZhbHNlOwor ICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCA9IGRyYXc7CisgICAgICAgICAgVFJB Q0UgKChzdGRlcnIsICJkcmF3X3Jvd193aXRoX21vdXNlX2ZhY2UgKCVkKTogIHN0YXJ0X3ggKCVk KSB8IHN0YXJ0X2hwb3MgKCVkKSB8IGVuZF9ocG9zICglZClcbiIsCisgICAgICAgICAgICAgICAg ICAgICAgICAgIHZwb3MsIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zKSk7CisgICAgICAg ICAgbWNfcmVkcmF3X3JvdyAodywgbWF0cml4LCByb3csIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVu ZF9ocG9zLCBjbGVhcl9lb2xfcCwgaGwpOworICAgICAgICB9CisgICAgICAgIGVsc2UKICAgICAg IGRyYXdfZ2x5cGhzICh3LCBzdGFydF94LCByb3csIFRFWFRfQVJFQSwgc3RhcnRfaHBvcywgZW5k X2hwb3MsIGRyYXcsIDApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBy ZXR1cm47CiAgICAgfQogI2VuZGlmCkBAIC0zMTk0NSwxMSArMzYzNzYsMzQgQEAgZXhwb3NlX2Fy ZWEgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgWFJlY3RhbmdsZSAq ciwKICAgc3RydWN0IGdseXBoICpsYXN0OwogICBpbnQgZmlyc3RfeCwgc3RhcnRfeCwgeDsKIAor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICBp ZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgcm93LT5maWxsX2xpbmVfcCkKKyAgICB7CisgICAgICBp ZiAody0+bWNfZWx0cy51c2VkID4gMCB8fCB3LT5jaF9lbHRzLnVzZWQgPiAwIHx8IHctPmZjX2Vs dHMudXNlZCA+IDApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpt YXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9S T1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgIGludCBzdGFydF94ID0gMDsKKyAgICAg ICAgICBpbnQgc3RhcnRfaHBvcyA9IDA7CisgICAgICAgICAgaW50IGVuZF9ocG9zID0gcm93LT51 c2VkW1RFWFRfQVJFQV07CisgICAgICAgICAgYm9vbCBjbGVhcl9lb2xfcCA9IGZhbHNlOworICAg ICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCA9IERSQVdfTk9STUFMX1RFWFQ7CisgICAg ICAgICAgVFJBQ0UgKChzdGRlcnIsICJleHBvc2VfYXJlYSAoJWQpOiAgV3JpdGUgdGhlIHdob2xl IGxpbmUuXG4iLCB2cG9zKSk7CisgICAgICAgICAgbWNfcmVkcmF3X3JvdyAodywgbWF0cml4LCBy b3csIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCBjbGVhcl9lb2xfcCwgaGwpOworICAg ICAgICB9CisgICAgICAgIGVsc2UKICAgICAvKiBJZiByb3cgZXh0ZW5kcyBmYWNlIHRvIGVuZCBv ZiBsaW5lIHdyaXRlIHRoZSB3aG9sZSBsaW5lLiAgKi8KICAgICBkcmF3X2dseXBocyAodywgMCwg cm93LCBhcmVhLAogCQkgMCwgcm93LT51c2VkW2FyZWFdLAogCQkgRFJBV19OT1JNQUxfVEVYVCwg MCk7CisgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGVsc2UKICAgICB7 CiAgICAgICAvKiBTZXQgU1RBUlRfWCB0byB0aGUgd2luZG93LXJlbGF0aXZlIHN0YXJ0IHBvc2l0 aW9uIGZvciBkcmF3aW5nIGdseXBocyBvZgpAQCAtMzE5ODEsMTEgKzM2NDM1LDM0IEBAIGV4cG9z ZV9hcmVhIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIFhSZWN0YW5n bGUgKnIsCiAJICArK2xhc3Q7CiAJfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCiAgICAgICAvKiBSZXBhaW50LiAgKi8KLSAgICAgIGlmIChs YXN0ID4gZmlyc3QpCisgICAgICAvKiBGbG9hdGluZyBmYWtlIGN1cnNvcnMgd2lsbCBleGlzdCB3 aGVuIChsYXN0ID09IGZpcnN0KS4gKi8KKyAgICAgIGlmICgody0+bWNfZWx0cy51c2VkID4gMCB8 fCB3LT5jaF9lbHRzLnVzZWQgPiAwIHx8IHctPmZjX2VsdHMudXNlZCA+IDApCisgICAgICAgICAg JiYgYXJlYSA9PSBURVhUX0FSRUEpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgICBpbnQgdnBvcyA9 IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgIHN0YXJ0X3ggPSBmaXJz dF94IC0gc3RhcnRfeDsKKyAgICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IGZpcnN0IC0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICBpbnQgZW5kX2hwb3MgPSBsYXN0IC0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICBib29sIGNsZWFyX2VvbF9wID0gZmFsc2U7Cisg ICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIGhsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAg ICAgICAgICBUUkFDRSAoKHN0ZGVyciwgImV4cG9zZV9hcmVhICglZCk6ICBzdGFydF94ICglZCkg fCBzdGFydF9ocG9zICglZCkgfCBlbmRfaHBvcyAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAg ICAgICAgICB2cG9zLCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRfaHBvcykpOworICAgICAgICAg IG1jX3JlZHJhd19yb3cgKHcsIG1hdHJpeCwgcm93LCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRf aHBvcywgY2xlYXJfZW9sX3AsIGhsKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChsYXN0 ID4gZmlyc3QpCiAJZHJhd19nbHlwaHMgKHcsIGZpcnN0X3ggLSBzdGFydF94LCByb3csIGFyZWEs CiAJCSAgICAgZmlyc3QgLSByb3ctPmdseXBoc1thcmVhXSwgbGFzdCAtIHJvdy0+Z2x5cGhzW2Fy ZWFdLAogCQkgICAgIERSQVdfTk9STUFMX1RFWFQsIDApOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAgICAgfQogfQogCkBAIC0zMTk5OSwxMCArMzY0NzYsMzMgQEAgZXhwb3NlX2xp bmUgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgWFJlY3RhbmdsZSAq cikKIHsKICAgZWFzc2VydCAocm93LT5lbmFibGVkX3ApOwogCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAgIGlmIChyb3ctPm1vZGVfbGluZV9w IHx8IHctPnBzZXVkb193aW5kb3dfcCkKKyAgICB7CisgICAgICBpZiAody0+bWNfZWx0cy51c2Vk ID4gMCB8fCB3LT5jaF9lbHRzLnVzZWQgPiAwIHx8IHctPmZjX2VsdHMudXNlZCA+IDApCisgICAg ICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50 X21hdHJpeDsKKyAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRy aXgpOworICAgICAgICAgIGludCBzdGFydF94ID0gMDsKKyAgICAgICAgICBpbnQgc3RhcnRfaHBv cyA9IDA7CisgICAgICAgICAgaW50IGVuZF9ocG9zID0gcm93LT51c2VkW1RFWFRfQVJFQV07Cisg ICAgICAgICAgYm9vbCBjbGVhcl9lb2xfcCA9IGZhbHNlOworICAgICAgICAgIGVudW0gZHJhd19n bHlwaHNfZmFjZSBobCA9IERSQVdfTk9STUFMX1RFWFQ7CisgICAgICAgICAgVFJBQ0UgKChzdGRl cnIsICJleHBvc2VfbGluZSAoJWQpOiAgV3JpdGUgdGhlIHdob2xlIGxpbmUuXG4iLCB2cG9zKSk7 CisgICAgICAgICAgbWNfcmVkcmF3X3JvdyAodywgbWF0cml4LCByb3csIHN0YXJ0X3gsIHN0YXJ0 X2hwb3MsIGVuZF9ocG9zLCBjbGVhcl9lb2xfcCwgaGwpOworICAgICAgICB9CisgICAgICAgIGVs c2UKICAgICBkcmF3X2dseXBocyAodywgMCwgcm93LCBURVhUX0FSRUEsCiAJCSAwLCByb3ctPnVz ZWRbVEVYVF9BUkVBXSwKIAkJIERSQVdfTk9STUFMX1RFWFQsIDApOworICAgIH0KKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogICBlbHNlCiAgICAgewogICAgICAgaWYgKHJvdy0+dXNl ZFtMRUZUX01BUkdJTl9BUkVBXSkKQEAgLTMyNTUwLDYgKzM3MDUwLDIyIEBAIHhfaW50ZXJzZWN0 X3JlY3RhbmdsZXMgKFhSZWN0YW5nbGUgKnIxLCBYUmVjdGFuZ2xlICpyMiwgWFJlY3RhbmdsZSAq cmVzdWx0KQogdm9pZAogc3ltc19vZl94ZGlzcCAodm9pZCkKIHsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBkZWZzdWJyICgmU21jX2R1 bXBfZ2x5cGhfcm93KTsKKworICBkZWZzdWJyICgmU21jX2R1bXBfZ2x5cGhfbWF0cml4KTsKKwor ICBkZWZzdWJyICgmU21jX2N1cnJlbnRfY29sdW1uKTsKKworICBkZWZzdWJyICgmU21jX3N0ZGVy cik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgVndpdGhfZWNob19hcmVhX3Nh dmVfdmVjdG9yID0gUW5pbDsKICAgc3RhdGljcHJvICgmVndpdGhfZWNob19hc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kID0gZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgIGVsc2UKKyAgICAgICAgeGdjdi5iYWNrZ3Jv dW5kID0geGdjdi5mb3JlZ3JvdW5kID0gZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsOwor ICAgICAgeGdjdi5ncmFwaGljc19leHBvc3VyZXMgPSBGYWxzZTsKKyAgICAgIGlmIChnYykKKyAg ICAgICAgWENoYW5nZUdDIChkcHksIGdjLCBtYXNrLCAmeGdjdik7CisgICAgICBlbHNlCisgICAg ICAgIHsKKyAgICAgICAgICBnYyA9IFhDcmVhdGVHQyAoZHB5LCB3aW5kb3csIG1hc2ssICZ4Z2N2 KTsKKyAgICAgICAgICBGUkFNRV9ESVNQTEFZX0lORk8gKGYpLT5zY3JhdGNoX2N1cnNvcl9nYyA9 IGdjOworICAgICAgICB9CisgICAgICB4X2NsaXBfdG9fcm93ICh3LCByb3csIFRFWFRfQVJFQSwg Z2MpOworICAgICAgeF9maWxsX3JlY3RhbmdsZSAoZiwgZ2MsIGZ4LCBmeSwgd2QsIGgpOworICAg ICAgeF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKGYsIGdjKTsKKyAgICB9Cit9CisKKy8qIFJJRjog RHJhdyBjdXJzb3Igb24gd2luZG93IFcuICovCitzdGF0aWMgdm9pZAorbWNfeF9kcmF3X3dpbmRv d19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwg c3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgIGludCB4LCBp bnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCwK KyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSB0eXBlX29m X2N1cnNvciBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKK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ZW50czsKKyAgICAgIENIRUNLX0JVRkZF UiAoYnVmKTsKKyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAgICAg Ym9vbCByZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1hcmtfYWN0aXZl KSkpOworICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAocmVnaW9uX2FjdGl2ZV9w KSA/IFhGSVhOVU0gKEZyZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAgICAgcHRyZGlmZl90 IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhGSVhOVU0gKEZyZWdpb25fZW5kICgp KSA6IC0xOworICAgICAgcHRyZGlmZl90IG9wb2ludF9wdCA9ICh3ID09IFhXSU5ET1cgKHNlbGVj dGVkX3dpbmRvdykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBQVAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogWEZJWE5VTSAoRm1hcmtlcl9wb3NpdGlvbiAody0+cG9pbnRt KSk7CisgICAgICBib29sIHJlZ2lvbl9pbl9ib3VuZHNfcCA9IChyZWdpb25fYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9wdCA+PSByZWdpb25fYmVn aW5uaW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfcHQgPCBy ZWdpb25fZW5kKTsKKyAgICAgIGlmIChjdXJzb3JfZ2x5cGgtPnR5cGUgIT0gSU1BR0VfR0xZUEgg JiYgbHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAg ICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3Jh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ICBlbHNlIGlmICghYWN0 aXZlX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGVudW0gZmFj ZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBp bnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtZmFjZSIpLCB0cnVlKTsKKyAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAg IFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfZ2MsIGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAg ICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQpOworICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgIC8q IEZvcmNlIGBtY194X3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+ Y3Vyc29yX2djJy4gICovCisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7CisgICAg ICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwg eCwgaHBvcywgdnBvcywgbHNsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlw aF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3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WF0 cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgICAg Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOwor ICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBieSBi b3Jyb3dpbmcgdGhlCisgICAgICAgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycg aW4geGZucy5jLiAgKi8KKyAgICAgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAg ICAgICAgICAgICAgJiYgcmVnaW9uX2luX2JvdW5kc19wCisgICAgICAgICAgICAgICAgICAmJiBh Y3RpdmVfcCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2Vf aWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBm LCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcmVnaW9uLWZhY2UiKSwgdHJ1ZSk7CisgICAg ICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZSA9IEZB Q0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25fZmFjZV9pZCk7CisgICAgICAgICAg ICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVk X2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiksIHRydWUpOwor ICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxv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pOworICAgICAgICAgICAgICAgICAg ICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54 LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfZmFjZS0+YmFja2dyb3VuZCk7CisgICAgICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgLyogVGhlIHJlZ2lvbiBpcyBfbm90XyB2 aXNpYmxlIGluIHRoZSBpbmFjdGl2ZSB3aW5kb3cgYmVjYXVzZSB0aGUgb3ZlcmxheSB3aW5kb3cg cHJvcGVydHkgaXMgdXNlZC4gKi8KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2 ZV9wKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3 LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtZmFjZSIpLCB0cnVlKTsK KyAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFj ZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAg ICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91 dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQp OworICAgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExB WSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2Ut PmJhY2tncm91bmQpOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgYmxv Y2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIC8qIEZvcmNlIGBtY194X3NldF9jdXJzb3JfZ2Mn IHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJy4gICovCisgICAgICAgICAg ICAgIGJvb2wgY3Vyc29yX2djX3AgPSB0cnVlOworICAgICAgICAgICAgICBtY19kcmF3X2N1cnNv cl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNv cl90eXBlLCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJ U1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuZm9yZWdyb3VuZCk7 CisgICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuYmFja2dyb3VuZCk7CisgICAgICAgICAgICAg IHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIC8qIERyYXcgdGhlIGZyYW1lIGFyb3Vu ZCB0aGUgYm94LiAqLworICAgICAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywg bWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAg ICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICB7 CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49 IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1 dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngt PmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIG1jX3hfZHJhd19ob2xsb3df Y3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7 CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vy c29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBtY194X2RyYXdf aG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsIGgpOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAg ICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVl ID49IDApCisgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+ Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhf bWFrZV9nYycgaW4geGZucy5jLiAgKi8KKyAgICAgICAgeworICAgICAgICAgIGJsb2NrX2lucHV0 ICgpOworICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIEZSQU1FX0JBQ0tHUk9VTkRfUElYRUwgKGYpKTsKKyAg ICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX2djLCBjb2xvci5waXhlbCk7CisgICAgICAgICAgLyogRm9yY2UgYG1jX3hf c2V0X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAg Ki8KKyAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICBtY19kcmF3 X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9z LCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vy c29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAgIFhTZXRGb3Jl Z3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2Ms IHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElT UExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgeGdjdi5iYWNrZ3JvdW5kKTsK KyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAg ICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICAg ICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4 LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5 cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAg ICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfQkFSOgorICAgIHsKKyAg ICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkK KyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX3BpeGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vy c29yX3BpeGVsID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNp YmxlX29rYXlfcCA9IHRydWU7CisgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1h dHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLCBjdXJzb3Jfd2lkdGgs IE1DX0JBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1 dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAg fQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2Nf aW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJz b3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLCBjdXJz b3Jfd2lkdGgsIE1DX0JBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAg IH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0hCQVI6CisgICAgeworICAgICAg aWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAg ICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54 LT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf cGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVf b2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4 LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsIGN1cnNvcl93aWR0aCwgTUNf SEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQor ICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52 aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3Ig KHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLCBjdXJzb3Jf d2lkdGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICB9 CisgICAgICBicmVhazsKKyAgICB9CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgp OworICB9CisgICAgICAgIH0KKyNpZmRlZiBIQVZFX1hfSTE4TgorICBpZiAodyA9PSBYV0lORE9X IChmLT5zZWxlY3RlZF93aW5kb3cpKQorICAgIGlmIChGUkFNRV9YSUMgKGYpICYmIChGUkFNRV9Y SUNfU1RZTEUgKGYpICYgWElNUHJlZWRpdFBvc2l0aW9uKSkKKyAgICAgIHhpY19zZXRfcHJlZWRp dGFyZWEgKHcsIHgsIHkpOworI2VuZGlmCisgICAgfQorICBYRmx1c2ggKEZSQU1FX1hfRElTUExB WSAoZikpOworfQorCisvKiBEcmF3IHN0cmV0Y2ggZ2x5cGggc3RyaW5nIFMuICAqLworc3RhdGlj IHZvaWQKK21jX3hfZHJhd19zdHJldGNoX2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0cmlu ZyAqcykKK3sKKyAgZWFzc2VydCAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQ SCk7CisgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgJiYgIXhfc3RyZXRjaF9jdXJz b3JfcCkKKyAgICB7CisgICAgICAvKiBJZiBgeC1zdHJldGNoLWN1cnNvcicgaXMgbmlsLCBkb24n dCBkcmF3IGEgYmxvY2sgY3Vyc29yIGFzCisgICB3aWRlIGFzIHRoZSBzdHJldGNoIGdseXBoLiAg Ki8KKyAgICAgIGludCB3aWR0aCwgYmFja2dyb3VuZF93aWR0aCA9IHMtPmJhY2tncm91bmRfd2lk dGg7CisgICAgICBpbnQgeCA9IHMtPng7CisgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkK KyAgeworICAgIGludCBsZWZ0X3ggPSB3aW5kb3dfYm94X2xlZnRfb2Zmc2V0IChzLT53LCBURVhU X0FSRUEpOworICAgIGlmICh4IDwgbGVmdF94KQorICAgICAgeworICAgICAgICBiYWNrZ3JvdW5k X3dpZHRoIC09IGxlZnRfeCAtIHg7CisgICAgICAgIHggPSBsZWZ0X3g7CisgICAgICB9CisgIH0K KyAgICAgIGVsc2UKKyAgeworICAgIC8qIEluIFIyTCByb3dzLCBkcmF3IHRoZSBjdXJzb3Igb24g dGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlCisgICAgICAgc3RyZXRjaCBnbHlwaC4gICovCisgICAgaW50 IHJpZ2h0X3ggPSB3aW5kb3dfYm94X3JpZ2h0IChzLT53LCBURVhUX0FSRUEpOworICAgIGlmICh4 ICsgYmFja2dyb3VuZF93aWR0aCA+IHJpZ2h0X3gpCisgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09 IHggLSByaWdodF94OworICAgIHggKz0gYmFja2dyb3VuZF93aWR0aDsKKyAgfQorICAgICAgd2lk dGggPSBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAocy0+ZiksIGJhY2tncm91bmRfd2lkdGgpOwor ICAgICAgaWYgKHMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgeCAtPSB3aWR0aDsKKyAgICAgIC8qIERy YXcgY3Vyc29yLiAgKi8KKyAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwg cy0+eSwgd2lkdGgsIHMtPmhlaWdodCk7CisgICAgICAvKiBDbGVhciByZXN0IHVzaW5nIHRoZSBH QyBvZiB0aGUgb3JpZ2luYWwgbm9uLWN1cnNvciBmYWNlLiAgKi8KKyAgICAgIGlmICh3aWR0aCA8 IGJhY2tncm91bmRfd2lkdGgpCisgIHsKKyAgICBpbnQgeSA9IHMtPnk7CisgICAgaW50IHcgPSBi YWNrZ3JvdW5kX3dpZHRoIC0gd2lkdGgsIGggPSBzLT5oZWlnaHQ7CisgICAgWFJlY3RhbmdsZSBy OworICAgIEdDIGdjOworICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgeCArPSB3 aWR0aDsKKyAgICBlbHNlCisgICAgICB4ID0gcy0+eDsKKyAgICBpZiAocy0+cm93LT5tb3VzZV9m YWNlX3AKKyAgICAgICAgJiYgY3Vyc29yX2luX21vdXNlX2ZhY2VfcCAocy0+dykpCisgICAgICB7 CisgICAgICAgIHhfc2V0X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAgICBnYyA9IHMtPmdjOwor ICAgICAgfQorICAgIGVsc2UKKyAgICAgIGdjID0g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IHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAg ICAgICAgICAgWEdldEdDVmFsdWVzIChzLT5kaXNwbGF5LCBzLT5nYywgR0NGb3JlZ3JvdW5kLCAm eGdjdik7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAocy0+ZGlzcGxheSwgcy0+ Z2MsIHMtPmZhY2UtPnVuZGVybGluZV9jb2xvcik7CisgICAgICAgICAgICAgICAgICB4X2RyYXdf dW5kZXJ3YXZlIChzKTsKKyAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChzLT5kaXNw bGF5LCBzLT5nYywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICB9CisgICAgICAgICAgZWxzZSBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFD RV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB1bnNpZ25lZCBsb25n IHRoaWNrbmVzcywgcG9zaXRpb247CisgICAgICAgICAgICAgIGludCB5OworICAgICAgICAgICAg ICBpZiAocy0+cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfcAorICAgICAgJiYgcy0+ cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8qIFdlIHVzZSB0aGUgc2FtZSB1bmRlcmxpbmUg c3R5bGUgYXMgdGhlIHByZXZpb3VzIG9uZS4gICovCisgICAgICAgICAgICAgICAgICB0aGlja25l c3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgcG9z aXRpb24gPSBzLT5wcmV2LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg LyogR2V0IHRoZSB1bmRlcmxpbmUgdGhpY2tuZXNzLiAgRGVmYXVsdCBpcyAxIHBpeGVsLiAgKi8K KyAgICAgICAgICAgICAgICAgIGlmIChzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV90aGlj a25lc3MgPiAwKQorICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSBzLT5mb250LT51bmRl cmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAg ICAgICB0aGlja25lc3MgPSAxOworICAgICAgICAgICAgICAgICAgaWYgKHhfdW5kZXJsaW5lX2F0 X2Rlc2NlbnRfbGluZSkKKyAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVpZ2h0 IC0gdGhpY2tuZXNzKSAtIChzLT55YmFzZSAtIHMtPnkpOworICAgICAgICAgICAgICAgICAgZWxz ZQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgLyogR2V0IHRo ZSB1bmRlcmxpbmUgcG9zaXRpb24uICBUaGlzIGlzIHRoZSByZWNvbW1lbmRlZAorICAgICAgICAg ICAgICAgICAgICAgICAgIHZlcnRpY2FsIG9mZnNldCBpbiBwaXhlbHMgZnJvbSB0aGUgYmFzZWxp bmUgdG8gdGhlIHRvcCBvZgorICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSB1bmRlcmxpbmUu ICBUaGlzIGlzIGEgc2lnbmVkIHZhbHVlIGFjY29yZGluZyB0byB0aGUKKyAgICAgICAgICAgICAg ICAgICAgICAgICBzcGVjcywgYW5kIGl0cyBkZWZhdWx0IGlzCisgICAgICAgICAgICAgICAgICAg ICAgICAgUk9VTkQgKChtYXhpbXVtIGRlc2NlbnQpIC8gMiksIHdpdGgKKyAgICAgICAgICAgICAg ICAgICAgICAgICBST1VORCh4KSA9IGZsb29yICh4ICsgMC41KSAgKi8KKyAgICAgICAgICAgICAg ICAgICAgICBpZiAoeF91c2VfdW5kZXJsaW5lX3Bvc2l0aW9uX3Byb3BlcnRpZXMKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgcy0+Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfcG9zaXRp b24gPj0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gcy0+Zm9udC0+dW5k ZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHMtPmZvbnQp CisgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5mb250LT5kZXNjZW50ICsg MSkgLyAyOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAg ICAgIHBvc2l0aW9uID0gdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0OworICAgICAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IG1heCAocG9zaXRpb24sIHVuZGVy bGluZV9taW5pbXVtX29mZnNldCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAv KiBDaGVjayB0aGUgc2FuaXR5IG9mIHRoaWNrbmVzcyBhbmQgcG9zaXRpb24uICBXZSBzaG91bGQK KyAgICAgICAgICAgICAgICAgYXZvaWQgZHJhd2luZyB1bmRlcmxpbmUgb3V0IG9mIHRoZSBjdXJy ZW50IGxpbmUgYXJlYS4gICovCisgICAgICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDw9 IHMtPnliYXNlICsgcG9zaXRpb24pCisgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVp Z2h0IC0gMSkgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBz LT5oZWlnaHQgPCBzLT55YmFzZSArIHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAg ICAgIHRoaWNrbmVzcyA9IChzLT55ICsgcy0+aGVpZ2h0KSAtIChzLT55YmFzZSArIHBvc2l0aW9u KTsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3RoaWNrbmVzcyA9IHRoaWNrbmVzczsKKyAg ICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Bvc2l0aW9uID0gcG9zaXRpb247CisgICAgICAgICAg ICAgIHkgPSBzLT55YmFzZSArIHBvc2l0aW9uOworICAgICAgICAgICAgICBpZiAocy0+ZmFjZS0+ dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUg KHMtPmYsIHMtPmdjLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzLT54LCB5LCBz LT53aWR0aCwgdGhpY2tuZXNzKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICAgICAg WEdldEdDVmFsdWVzIChzLT5kaXNwbGF5LCBzLT5nYywgR0NGb3JlZ3JvdW5kLCAmeGdjdik7Cisg ICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAocy0+ZGlzcGxheSwgcy0+Z2MsIHMtPmZh Y2UtPnVuZGVybGluZV9jb2xvcik7CisgICAgICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xl IChzLT5mLCBzLT5nYywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzLT54LCB5 LCBzLT53aWR0aCwgdGhpY2tuZXNzKTsKKyAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5k IChzLT5kaXNwbGF5LCBzLT5nYywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgb3ZlcmxpbmUuICAq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orCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRh dGluZ19mcmFtZSA9IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKCEg RlJBTUVfQ1JfU1VSRkFDRSAoZikpCiAgICAgewogICAgICAgaW50IHdpZHRoLCBoZWlnaHQ7CkBA IC0xMjY2LDYgKzIxMzgsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIFhG bHVzaCAoRlJBTUVfWF9ESVNQTEFZIChmKSk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5kaWYK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKIH0KIAogLyogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBsYWNl cyBpbiB4ZGlzcC5jCkBAIC0xMzEwMCw2ICsxMzk4MiwyMSBAQCB4X2FjdGl2YXRlX3RpbWVvdXRf YXRpbWVyICh2b2lkKQogCiBzdGF0aWMgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2UgeF9yZWRp c3BsYXlfaW50ZXJmYWNlID0KICAgeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYHh0ZXJt LmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMgdGhlCitgcmVkaXNwbGF5X2lu dGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgbWNfeF93cml0ZV9nbHlwaHMsCisg IG1jX3hfZHJhd193aW5kb3dfY3Vyc29yLAorICBtY194X2RyYXdfZ2x5cGhfc3RyaW5nLAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgeF9mcmFtZV9wYXJtX2hhbmRsZXJzLAog ICAgIHhfcHJvZHVjZV9nbHlwaHMsCiAgICAgeF93cml0ZV9nbHlwaHMsCg== --Multipart_Mon_May__6_11:39:09_2019-1--