From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Sat, 08 Jun 2019 16:44:10 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sat_Jun__8_16:44:10_2019-1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236904"; mail-complaints-to="usenet@blaine.gmane.org" Cc: johnw@gnu.org, mbork@mbork.pl, rms@gnu.org, akioburns@icloud.com 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 Sun Jun 09 01:46:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZl2O-000wWR-02 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jun 2019 01:46:17 +0200 Original-Received: from localhost ([::1]:32921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZl2M-00082y-SQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jun 2019 19:46:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33415) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZl1F-0007yv-Lw for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 19:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZl1D-0005V6-Gm for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 19:45:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZl1C-0005TG-2e for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 19:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hZl1B-0007RF-To for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 19:45:01 -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: Sat, 08 Jun 2019 23:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.156003746128523 (code B ref 17684); Sat, 08 Jun 2019 23:45:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 8 Jun 2019 23:44:21 +0000 Original-Received: from localhost ([127.0.0.1]:53911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZl0X-0007Pz-1w for submit@debbugs.gnu.org; Sat, 08 Jun 2019 19:44:21 -0400 Original-Received: from gateway30.websitewelcome.com ([192.185.150.24]:15276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZl0S-0007Pa-L7 for 17684@debbugs.gnu.org; Sat, 08 Jun 2019 19:44:17 -0400 Original-Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 16EA43E41 for <17684@debbugs.gnu.org>; Sat, 8 Jun 2019 18:44:16 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id Zl0Rh7rkyYTGMZl0Rh5OjI; Sat, 08 Jun 2019 18:44:16 -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:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TYxRaYP5xRFtQzeCv83IB5TokKUrmipOwyW0yjzbbK4=; b=IDlQ4OSZ16J+GCLLuKJBAL3aAW p6+1jkLRFVLGM+0u6QMmu84hTQwrp9H8aDEannPguEMnz3L1F+FYW8E+HtmdqDhDWK89DMaHDiJh/ +/qaBxVnla1+Ucgwpubk2CXIx4LsWnBkeQ/RfbeJvyYsqniD06vx18M1/7NArqXwU7HaJ9sVZpAG1 DU2By+ZVGz15o8WX/wOp8RCXAklsU6RRxZ0Poo0pBR91K8pt1zzW4FqvB6yfnZRbm/yYmYZedC0tO dQ7mSNEtHRlPYPZ+V+33wKpj4XyE0PqkjQKP5jZWtZEhwBYWsyzvUnO9YDqf50jyFuBdOngus6DA0 tWav8wJA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:55026 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.92) (envelope-from ) id 1hZl0N-0007Wx-D7; Sat, 08 Jun 2019 18:44:14 -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: 1hZl0N-0007Wx-D7 X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:55026 X-Source-Auth: lawlist X-Email-Count: 6 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:160249 Archived-At: --Multipart_Sat_Jun__8_16:44:10_2019-1 Content-Type: text/plain; charset=US-ASCII VERSION: 021.001 [06/08/2019] CHANGELOG: - Fixed bugs in `mc_xfree_cache_matrix', the most significant of which was the failure to reset struct members that were not allocated to memory dynamically. - Fixed bugs in `mc_save_cache_matrix', the most significant of which was that some struct members were not being saved. - Added `mc_traverse_cache_p' to be used in various `for` loops, which ensures that a uniform test is used everywhere [which was not previously the case]. - Fixed a bug in `mc_helper' relating to proper bookkeeping of the `vpos_used` member in the `mc_matrix'. - Added `mc_cache_inspector' to help with debugging. - `mc_set_essentials' is now called only once per `update_window' (at outset). - Fixed a bug with respect to determining the `row_position` of the cursor row, which is the one exception where we consult the previous row in the desired matrix instead of consulting the previous row in the current matrix. - Reduced overall footprint a little bit by restoring `it` struct to its original state -- the member `zv_p` is no longer needed by features 17684 / 22873. The code used to record `it` struct member `zv_p` has been removed. Reduced the additional `glyph` struct members to just `hpos`, `bytepos` and `relative_x` (which is not needed, but may be useful if debugging). The code used to record the prior `glyph` struct members `x`, `y`, `vpos` and `zv_p` has been removed. - Miscellaneous cleaning up of unused variables, shortened certain names, and tidied up some of the code. Changed a couple of colors for even-at-zv .... - Added screenshot of most of the features on all three GUI ports (X11, W32, NS). SCREENSHOTS (X11, W32, NS): https://www.lawlist.com/images/22873_17684_light_dark_backgrounds.png 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 both the crosshairs feature and the visible fill column indicator feature, type: M-x +-mode - To try out just the visible fill column indicator feature, type: M-x fc-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: - `ns_draw_window_cursor' calls `ns_clip_to_rect', which does _not_ take `row->clip` into consideration when drawing cursors with `NSRectFill'. When it comes time to draw glyphs on top of the box/hollow family of cursors, `row->clip` is taken into consideration by `get_glyph_string_clip'. Fake cursors can be drawn even though the glyphs cannot, resulting in hollow/box family of cursors without text. The issue can be reproduced with M-x mc-test. [A temporary workaround is to disable `row->clip` while drawing the glyphs.] https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00009.html - Add additional support for `ch_inactive_windows' and `fc_inactive_windows' when the variables have a `nil` value. In such a case, the inactive windows should not display the crosshairs and/or visible fill column indicator. At the present time, fake cursors are drawn in active/inactive windows alike. - Deal with left/right overwritten glyphs in the w32 and X ports of Emacs. - Is there any additional meaningful optimization that can be added to the three calls of `mc_pre_scroll_clean'? - NOTE: As to `mc_scrolling_window', it would appear that there is no tangible benefit to rotating the current/prospective cache of fake cursors to compare the data before removing the fake cursors. When scrolling the display, only _some_ lines are copied to new locations. Areas that are not overwritten may have fake cursors and those may not necessarily be removed if desired/current matrix glyphs are equal. The test for `GLYPH_EQUAL_P' does not take into consideration the existence of a fake cursor, and the glyph (with a fake cursor) may not be updated as a result thereof. As to lines that are not copied, portions may be updated and fake cursors would be removed thereby. - 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_Sat_Jun__8_16:44:10_2019-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2019_06_08__16_37_35_624.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4zYmJkNjk3Ci0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTI4MiBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGxpYnJhcnkgd3JpdHRlbiBieSAgTWFnbmFyIFN2ZWVuLgorCisoZGVmdmFyIHBhY2thZ2UtYXJj aGl2ZXMpCisKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBtYy9t YXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBt Yy9tYXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsKQorKGRlZnZhciBt Yy0tdGhpcy1jb21tYW5kKQorKGRlZnZhciBtYy9jbWRzLXRvLXJ1bi1vbmNlKQorKGRlZnZhciBt Yy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1mb3ItYWxsKQorKGRlZnZhciBtYy9jbWRzLXRvLXJ1bi1m b3ItYWxsKQorKGRlZnZhciBtYy0tZGVmYXVsdC1jbWRzLXRvL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ICIpKQorICAgICAgICAgIChtYy9yZW1vdmUtZmFrZS1jdXJzb3JzKQorICAgICAgICAgIChl cnJvciAiQWJvcnRlZDogdG9vIG1hbnkgY3Vyc29ycyIpKSkpCisgICAgKGxldCAoKG92ZXJsYXkK KyAgICAgICAgICAgIChpZiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAo bWFrZS1vdmVybGF5IChwb2ludCkgKHBvaW50KSkKKyAgICAgICAgICAgICAgKG1jL21ha2UtY3Vy c29yLW92ZXJsYXktYXQtcG9pbnQpKSkpCisgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAnbWMt aWQgKG9yIGlkIChtYy9jcmVhdGUtY3Vyc29yLWlkKSkpCisgICAgICAob3ZlcmxheS1wdXQgb3Zl cmxheSAndHlwZSAnZmFrZS1jdXJzb3IpCisgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncHJp b3JpdHkgMTAwKQorICAgICAgKG1jL3N0b3JlLWN1cnJlbnQtc3RhdGUtaW4tb3ZlcmxheSBvdmVy bGF5KQorICAgICAgKHdoZW4gKHVzZS1yZWdpb24tcCkKKyAgICAgICAgKG92ZXJsYXktcHV0IG92 ZXJsYXkgJ3JlZ2lvbi1vdmVybGF5CisgICAgICAgICAgICAgICAgICAgICAobWMvbWFrZS1yZWdp b24tb3ZlcmxheS1iZXR3ZWVuLXBvaW50LWFuZC1tYXJrKSkpCisgICAgICBvdmVybGF5KSkKKwor ICAoZGVmdW4gbWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJzb3JzIChjbWQpCisg ICAgIkNhbGxzIENNRCBpbnRlcmFjdGl2ZWx5IGZvciBlYWNoIGN1cnNvci4KKyAgSXQgd29ya3Mg YnkgbW92aW5nIHBvaW50IHRvIHRoZSBmYWtlIGN1cnNvciwgc2V0dGluZworICB1cCB0aGUgcHJv cGVyIGVudmlyb25tZW50LCBhbmQgdGhlbiByZW1vdmluZyB0aGUgY3Vy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gLSAgU29tZSBjb21tYW5kcyBhcmUgc28gdW5zdXBwb3J0ZWQgdGhhdCB0aGV5IGFy ZSBldmVuIHByZXZlbnRlZCBmb3IKKyAgdGhlIG9yaWdpbmFsIGN1cnNvciwgdG8gaW5mb3JtIGFi b3V0IHRoZSBsYWNrIG9mIHN1cHBvcnQuIgorICAgICh1bmxlc3MgbWMtLWV4ZWN1dGluZy1jb21t YW5kLWZvci1mYWtlLWN1cnNvcgorICAgICAgKGlmIChlcSAxIChtYy9udW0tY3Vyc29ycykpIDs7 IG5vIGZha2UgY3Vyc29ycz8gZGlzYWJsZSBtYy1tb2RlCisgICAgICAgICAgKG11bHRpcGxlLWN1 cnNvcnMtbW9kZSAwKQorICAgICAgICAod2hlbiB0aGlzLW9yaWdpbmFsLWNvbW1hbmQKKyAgICAg ICAgICAobGV0ICgob3JpZ2luYWwtY29tbWFuZCAob3IgbWMtLXRoaXMtY29tbWFuZAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29tbWFuZC1yZW1hcHBpbmcgdGhpcy1v cmlnaW5hbC1jb21tYW5kKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 aGlzLW9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgIDs7IHNraXAga2V5Ym9hcmQgbWFj cm9zLCBzaW5jZSB0aGV5IHdpbGwgZ2VuZXJhdGUgYWN0dWFsIGNvbW1hbmRzIHRoYXQgYXJlCisg ICAgICAgICAgICA7OyBhbHNvIHJ1biBpbiB0aGUgY29tbWFuZCBsb29wIC0gd2UnbGwgaGFuZGxl IHRob3NlIGxhdGVyIGluc3RlYWQuCisgICAgICAgICAgICAod2hlbiAoZnVuY3Rpb25wIG9yaWdp bmFsLWNvbW1hbmQpCisgICAgICAgICAgICAgIDs7IGlmIGl0J3MgYSBsYW1iZGEsIHdlIGNhbid0 IGtub3cgaWYgaXQncyBzdXBwb3J0ZWQgb3Igbm90CisgICAgICAgICAgICAg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SBjdXJzb3JzJXMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4g KGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg KG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1j L2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMv YWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2Nt ZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMv cHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29y cyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAgICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQt aW4tY3Vyc29ycworICAgICAgICAgICAgICAgIChzZXRxIG1jLWNvbmYKKyAgICAgICAgICAgICAg ICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgICAgIC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UpCisgIChsZXQgKChidWZmZXIg KGdldC1idWZmZXItY3JlYXRlICIqTUMtVEVTVCoiKSkpCisgICAgKHdpdGgtY3VycmVudC1idWZm ZXIgYnVmZmVyCisgICAgICAoZXJhc2UtYnVmZmVyKQorICAgICAgKGluc2VydCAiVGhpcyBpcyBh IHRlc3QhIikKKyAgICAgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQorICAg 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 IGBhdXRvLWNvbXBvc2l0aW9uLW1vZGUnIGlzI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gICAgIHRhYi13 aWR0aAorICAgICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3VhbAorICAgICAgICAgICAg ICAgICAgICAgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgICAgICAgICAgICAgIHRydW5jYXRlLXBh cnRpYWwtd2lkdGgtd2luZG93cworICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwKSkKKyAg 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 bmVkIE9OIGArLW1vZGUn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orICAgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgICAg KHNldHEgdGltZXItaWRsZS1saXN0IChkZWxxICstdGltZXItdmFyIHRpbWVyLWlkbGUtbGlzdCkp CisgICAgICAgIChzZXRxICstdGltZXItdmFyIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWlu dGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9GRiBgKy1tb2Rl Jy4iKSkpKSkKKworKGRlZnVuIHR1cm4tb2ZmLSstbW9kZSAoKQorICAoKy1tb2RlIC0xKSkKKwor Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7CisKKyhkZWZ1biArLXBhcmVucy1mbiAoKQorICAiRG9j LXN0cmluZy4iCisgIChsZXQqICgob3BvaW50IChwb2ludCkpCisgICAgICAgICAoZnJvbSAoaWYg Ky1wYXJlbnMtZnJvbS1mbgorICAgICAgICAgICAgICAgICAoZnVuY2FsbCArLXBhcmVucy1mcm9t LWZuKQorICAgICAgICAgICAgICAgICAocG9pbnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxl Y3RlZC13aW5kb3cpKQorICAgICAgICAgKGkgMCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAo cHJlY2VkaW5nLWNoYXIpKQorICAgICAgICAgKG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisg ICAgICAgICAocG9zMQorICAgICAgICAgICAoY29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFy CisgICAgICAgICAgICAgICAgICAgKG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5p bmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAg ICAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1 YXJlIGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAg ICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkg YnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAg ICAgICAgICAobWluICgxKyBvcG9pbnQpIChwb2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9y IDs7OyAoY2hhci10by1zdHJpbmcgNDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAg ICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChj aGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2luZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAg ICAgICAgKD0gcHJlY2VkaW5nLWNoYXIgOTMpCisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXIt dG8tc3RyaW5nIDEyNSkgPT4gY2xvc2luZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAg ICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCisgICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWlu KSAoMS0gb3BvaW50KSkpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQp KSkKKyAgICAgICAgIHBvczIKKyAgICAgICAgIHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhj dXJzaW9uCisgICAgICAoY29uZGl0aW9uLWNhc2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBw b3MxIChudGggMSAocGFyc2UtcGFydGlhbC1zZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChz ZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAxKSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAg ICAgICAgICAgIChzZXRxIGkgMSkKKyAgICAgICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAg ICAgICAoc2V0cSBzZWxlY3RlZC1mYWNlIChjb25kCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFy ZW5zLW9uZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgNCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtZm91ci1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSA1KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZl LWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA3KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKD0gaSA4KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy1laWdodC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2Up CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChs ZXQgKChvdiAobWFrZS1vdmVybGF5IHBvczEgKDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5s ZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0 IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxl Y3RlZC1mYWNlKSkKKyAgICAgICAgICAod2hlbiBwb3MyCisgICAgICAgICAgICAobGV0ICgob3Yg KG1ha2Utb3ZlcmxheSAoMS0gcG9zMikgcG9zMikpKQorICAgICAgICAgICAgICAodW5sZXNzICst cGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAgICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3Yg J3dpbmRvdyB3aW4pKQorICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0 ZWQtZmFjZSkpKSkKKyAgICAgICAgKGVycm9yIG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92 ZXJsYXlzLWV4aXN0LXAgdCkpKQorCisoZGVmdW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQg bmFtZSB2YWwpCisiUmVtb3ZlIHRoZSBvdmVybGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5n LXByb3BlcnRpZXNgLgorSW5jbHVkZXMgYSB1bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3Zlcmxh eSB3aXRoIGFuIGAnYWZ0ZXItc3RyaW5nYCBwcm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9m IGEgbmFycm93ZWQtYnVmZmVyLiIKKyAgKGxldCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisg ICAgICAgICAocG9pbnQtbWluIChwb2ludC1taW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1 ZmZlci1uYXJyb3dlZC1wKSkKKyAgICAgICAgIChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkK KyAgICAgICAgIChlbmQKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAg ICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAg ICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAo bm90IG5hcnJvd2VkLXApCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAg ICAgICBwb2ludC1tYXgpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFy cm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBv aW50LW1heCkpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAg ICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAg ICAgICAgKD0gZW5kIHBvaW50LW1heCkpCisgICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAg ICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAg ICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAg ICAgIChvdmVybGF5cworICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1y ZWNlbnRlciBlbmQpCisgICAgICAgICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAg KHdoZW4gKGFuZCBiZWcgZW5kIG5hbWUgdmFsKQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykK KyAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAg ICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVp dGhlciBwdXNoIHRoaXMgb3ZlcmxheSBvdXRzaWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsg b3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0 ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAg ICAgICAoaWYgKDwgKG92ZXJsYXktc3RhcnQgbykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAo PiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAg ICAgICAobW92ZS1vdmVybGF5IChjb3B5LW92ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChv dmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5k IChvdmVybGF5LWVuZCBvKSkpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92 ZXJsYXktc3RhcnQgbykgYmVnKSkKKyAgICAgICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBv KSBlbmQpCisgICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVu ZCBvKSkKKyAgICAgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAo KGFuZCAobm90IChlcSBuYW1lICdmYWNlKSkKKyAgICAgICAgICAgICAg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doZW4gKGFuZCBq aXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3Rp dmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcg Jyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAg ICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7 OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAn cmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9j ay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3Rp dmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcg Jyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnkt dGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFy eS10aW1lcikpCisgICAgICAgIChmc2V0ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAg ICAgICAgICAgICAobGFtYmRhICgpIChhZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1j aGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQtYnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1h dXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkpCisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQor ICAgICAgICAoYmxpbmstY3Vyc29yLW1vZGUgLTEpCisgICAgICAgICh3aGVuI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ZmZhY2UgKy1iYXItcG9zdC16 di1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJtYWdlbnRhNCIpKSkKKyAgIkZhY2UgZm9yIGAr LWJhci1wb3N0LXp2LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcmV2 ZXJzZWQtYmFyLXByZS16di1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJjeWFuMSIpKSkKKyAg IkZhY2UgZm9yIGArLXJldmVyc2VkLWJhci1wcmUtenYtZmFjZScuIgorICA6Z3JvdXAgJystbW9k ZSkKKworKGRlZmZhY2UgKy1yZXZlcnNlZC1iYXItYXQtenYtZmFjZQorICAnKCh0ICg6Zm9yZWdy b3VuZCAiY2hhcnRyZXVzZSIpKSkKKyAgIkZhY2UgZm9yIGArLXJldmVyc2VkLWJhci1hdC16di1m YWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLXJldmVyc2VkLWJhci1wb3N0 LXp2LWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgImN5YW40IikpKQorICAiRmFjZSBmb3IgYCst cmV2ZXJzZWQtYmFyLXBvc3QtenYtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZh Y2UgKy1ldmVuLXByZS16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4 KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgo Y2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpm b3JlZ3JvdW5kICJjeWFuMSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAo YmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29s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UnLiIKKyAgOmdy b3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstZXZlbi1hdC16di1mYWNlCisgICcoKCgoY2xhc3Mg Y29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91 bmQgIkRlZXBQaW5rMSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFj a2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNs YXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3Jl Z3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikg KGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAiRGVlcFBpbmsxIikKKyAgICAo KChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgOCkpCisgICAgIDpmb3JlZ3JvdW5kICJ3aGl0ZSIp CisgICAgKCgodHlwZSB0dHkpIChjbGFzcyBtb25vKSkKKyAgICAgOmludmVyc2UtdmlkZW8gdCkK KyAgICAodCA6Zm9yZWdyb3VuZCAicGluayIpKQorICAiRmFjZSBmb3IgYCstZXZlbi1hdC16di1m YWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLWV2ZW4taW5hY3RpdmUtYXQt enYtZmFjZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQg ZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazQiKQorICAgICgoKGNsYXNzIGNvbG9y KSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAi RGVlcFBpbms0IikKKyAgICAoKChjbGFzcyBjb2xvc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1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQor eworICBiLT5tY19jb25mXyA9IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfbWNfaW5hY3Rp dmVfd2luZG93cyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5t Y19pbmFjdGl2ZV93aW5kb3dzXyA9IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfY3Jvc3No YWlycyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hh aXJzXyA9IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfY2hfaG9yaXpvbnRhbF9ydWxlciAo c3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jaF9ob3Jpem9udGFs X3J1bGVyXyA9IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfY2hfdmVydGljYWxfcnVsZXIg KHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+Y2hfdmVydGljYWxf cnVsZXJfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNldF9jaF9pbmFjdGl2ZV93aW5kb3dz IChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmNoX2luYWN0aXZl X3dpbmRvd3NfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNldF9mY192aXNpYmxlIChzdHJ1 Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFs OworfQorCitzdGF0aWMgdm9pZAorYnNldF9mY19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVm ZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmZjX2luYWN0aXZlX3dpbmRvd3NfID0g dmFsOworfQorCis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IChjdXJyZW50X2J1ZmZlciwgY2hfaW5hY3Rp dmVfd2luZG93cyksIFFuaWwsCisgICAgZG9jOiAvKiBXaGVuIG5vbi1uaWwsIGRyYXcgY3Jvc3No YWlycyBpbiBpbmFjdGl2ZSB3aW5kb3dzLiAqLyk7CisKKyAgREVGU1lNIChRZmNfdmlzaWJsZSwg ImZjLXZpc2libGUiKTsKKyAgREVGVkFSX1BFUl9CVUZGRVIgKCJmYy12aXNpYmxlIiwgJkJWQVIg KGN1cnJlbnRfYnVmZmVyLCBmY192aXNpYmxlKSwgUW5pbCwKKyAgICBkb2M6IC8qIEEgYnVmZXIt bG9jYWwgdmFyaWFibGUgdG8gdHVybiBvbi9vZmYgdGhlIG11bHRpcGxlIGN1cnNvcnMgZmlsbCBj b2x1bW4uICovKTsKKworICBERUZTWU0gKFFmY192aXNpYmxlX2luYWN0aXZlX3dpbmRvdywgImZj LWluYWN0aXZlLXdpbmRvdyIpOworICBERUZWQVJfUEVSX0JVRkZFUiAoImZjLWluYWN0aXZlLXdp bmRvd3MiLCAmQlZBUiAoY3VycmVudF9idWZmZXIsIGZjX2luYWN0aXZlX3dpbmRvd3MpLCBRbmls LAorICAgIGRvYzogLyogV2hlbiBub24tbmlsLCBkcmF3IG11bHRpcGxlIGN1cnNvcnMgZmlsbCBj b2x1bW4gaW4gaW5hY3RpdmUgd2luZG93cy4gKi8pOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgIHN0YXRpY3BybyAoJmxhc3Rfb3ZlcmxheV9tb2RpZmljYXRpb25faG9va3MpOwog ICBsYXN0X292ZXJsYXlfbW9kaWZpY2F0aW9uX2hvb2tzID0gbWFrZV9uaWxfdmVjdG9yICgxMCk7 CiAKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuaCBiL3NyYy9idWZmZXIuaAppbmRleCBmNDJjM2U5 Li4xODlmYWM1IDE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8gZHJhdyBjcm9z c2hhaXJzIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IGNoX2luYWN0aXZl X3dpbmRvd3NfOworCisgIC8qIFRoZSBuYW1lIG9mIHRoZSBidWZmZXItbG9jYWwgdmFyaWFibGUu ICovCisgIExpc3BfT2JqZWN0IGZjX3Zpc2libGVfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBt dWx0aXBsZSBjdXJzb3JzIGZpbGwgY29sdW1uIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExp c3BfT2JqZWN0IGZjX2luYWN0aXZlX3dpbmRvd3NfOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgIC8qIEN1cnNvciB0eXBlIHRvIGRpc3BsYXkgaW4gbm9uLXNlbGVjdGVkIHdpbmRv d3MuCiAgICAgIHQgbWVhbnMgdG8gdXNlIGhvbGxvdyBib3ggY3Vyc29yLgogICAgICBTZWUgYGN1 cnNvci10eXBlJyBmb3Igb3RoZXIgdmFsdWVzLiAgKi8KQEAgLTc4NywxNCArODIxLDIxIEBAIHN0 cnVjdCBidWZmZXIKICAgICAgYW4gaW5kaXJlY3QgYnVmZmVyIHNpbmNlIGl0IGNvdW50cyBhcyBp dHMgYmFzZSBidWZmZXIuICAqLwogICBpbnQgd2luZG93X2NvdW50OwogCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAgIC8qIEEgbm9uLXplcm8g dmFsdWUgaW4gc2xvdCBJRFggbWVhbnMgdGhhdCBwZXItYnVmZmVyIHZhcmlhYmxlCiAgICAgIHdp dGggaW5kZXggSURYIGhhcyBhIGxvY2FsIHZhbHVlIGluIHRoaXMgYnVmZmVyLiAg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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBM RS1DVVJTT1JTICovCisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9tY19yZWFsX2Zha2VfY3Vyc29y IChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX3JlYWxfZmFr ZV9jdXJzb3JfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfbWNfY29uZiAoc3Ry dWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5tY19jb25mXyA9IHZhbDsK K30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2X21jX2luYWN0aXZlX3dpbmRvd3MgKHN0cnVjdCBi dWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+bWNfaW5hY3RpdmVfd2luZG93c18g PSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9jcm9zc2hhaXJzIChzdHJ1Y3QgYnVm ZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmNyb3NzaGFpcnNfID0gdmFsOworfQor CitJTkxJTkUgdm9pZAorYnNldF9ibHZfY2hfaG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZl ciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jaF9ob3Jpem9udGFsX3J1bGVyXyA9IHZh bDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2X2NoX3ZlcnRpY2FsX3J1bGVyIChzdHJ1Y3Qg YnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmNoX3ZlcnRpY2FsX3J1bGVyXyA9 IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2X2NoX2luYWN0aXZlX3dpbmRvd3MgKHN0 cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+Y2hfaW5hY3RpdmVfd2lu ZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9mY192aXNpYmxlIChzdHJ1 Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFs OworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfZmNfaW5hY3RpdmVfd2luZG93cyAoc3RydWN0 IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5mY19pbmFjdGl2ZV93aW5kb3dz XyA9IHZhbDsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIElOTElORSB2b2lkCiBic2V0X2JpZGlfcGFyYWdyYXBoX2RpcmVjdGlv biAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQogewpkaWZmIC0tZ2l0IGEvc3Jj L2Rpc3BleHRlcm4uaCBiL3NyYy9kaXNwZXh0ZXJuLmgKaW5kZXggMWE1MzY1Ni4uNjA0ZDM2OCAx MDA2NDQKLS0tIGEvc3JjL2Rpc3BleHRlcm4uaAorKysgYi9zcmMvZGlzcGV4dGVybi5oCkBAIC0x MDAsNiArMTAwLDEyMSBAQCB0eXBlZGVmIGludCBDdXJzb3I7CiAjZGVmaW5lIE5hdGl2ZVJlY3Rh bmdsZSBpbnQKICNlbmRpZgogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4g TVVMVElQTEUtQ1VSU09SUyAqLworCitzdHJ1Y3QgZ2x5cGg7CisKK3N0cnVjdCBnbHlwaF9yb3c7 CisKK3N0cnVjdCBnbHlwaF9tYXRyaXg7CisKK2VudW0gZHJhd19nbHlwaHNfZmFjZTsKKworZW51 bSBnbHlwaF9yb3dfYXJlYTsKKworc3RydWN0IG1jX21hdHJpeDsKKworZW51bSBtY19jYWNoZV90 eXBlOworCitlbnVtIG1jX2N1cnNvcl90eXBlOworCitlbnVtIG1jX2ZsYXZvcjsKKworc3RydWN0 IG1jX1JHQjsKKworc3RydWN0IG1jX2Vzc2VudGlhbHM7CisKK2VudW0gbWNfZnJvbV93aGVyZTsK KworZW51bSBtY19hY3Rpb25fdHlwZTsKKworZW51bSBtY19yb3dfcG9zaXRpb247CisKK2V4dGVy biBMaXNwX09iamVjdCBtY19saXN0biAocHRyZGlmZl90LCBMaXNwX09iamVjdCwgLi4uKTsKKwor ZXh0ZXJuIExpc3BfT2JqZWN0IG1jX250aCAoaW50LCBMaXNwX09iamVjdCk7CisKK2V4dGVybiBM aXNwX09iamVjdCBtY19hc3NxIChMaXNwX09iamVjdCwgTGlzcF9PYmplY3QpOworCitleHRlcm4g ZW51bSBtY19yb3dfcG9zaXRpb24gbWNfcm93X3Bvc2l0aW9uIChzdHJ1Y3QgZ2x5cGhfcm93ICos CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5 cGhfcm93ICosIGludCk7CisKK2V4dGVybiBwdHJkaWZmX3QgbWNfcmVnaW9uX2xpbWl0IChib29s KTsKKworZXh0ZXJuIHN0cnVjdCBnbHlwaCAqIG1jX2dldF9jdXJzb3JfZ2x5cGggKHN0cnVjdCB3 aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKiwgaW50LCBpbnQpOworCitleHRl cm4gdm9pZCBtY194d19jb2xvcl92YWx1ZXMgKHN0cnVjdCB3aW5kb3cgKiw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dyAqLAorICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKiwgaW50 LCBpbnQsIGludCwgaW50LCBpbnQsIGludCwKKyAgICAgICAgICAgICAgICAgICAgICAgZW51bSBt Y19jdXJzb3JfdHlwZSwgaW50LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosCisgICAgICAgICAgICAg ICAgICAgICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3NpdGlvbiwgc3Ry dWN0IG1jX1JHQiwKKyAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19hY3Rpb25fdHlwZSwg Ym9vbCwgZW51bSBtY19mcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1j X2NhY2hlX3R5cGUpOworCitleHRlcm4gdm9pZCBtY19zZXRfZXNzZW50aWFscyAoc3RydWN0IHdp bmRvdyAqLCBzdHJ1Y3QgbWNfZXNzZW50aWFscyAqKTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19y b3cgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhf cm93ICosCisgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICosIGludCwgaW50 LCBpbnQsIGludCwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAg ICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3NpdGlvbiwgYm9vbCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2Zyb21fd2hlcmUpOworCitleHRlcm4gdm9p ZCBtY19yZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwg c3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQs IGludCwgYm9vbCwgZW51bSBkcmF3X2dseXBoc19mYWNlKTsKKworZXh0ZXJuIHZvaWQgbWNfcmVz ZXRfY2FjaGUgKHN0cnVjdCB3aW5kb3cgKik7CisKK2V4dGVybiB2b2lkIG1jX2RyYXdfY3Vyc29y X2dseXBoIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICosIGVudW0gZHJhd19n bHlwaHNfZmFjZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQsIGludCwg aW50LCBzdHJ1Y3QgbWNfUkdCLCBlbnVtIG1jX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlLCBpbnQsIGJvb2wsIGJvb2wpOworCitl eHRlcm4gdm9pZCBtY19lcmFzZV9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBo X21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGludCwgaW50LCBpbnQsIGludCwgZW51bSBtY19mbGF2b3IsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUsIGludCk7CisKK2V4dGVybiB2b2lkIG1j X2RyYXdfZXJhc2VfaHlicmlkIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRyaXgg Kiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGludCwgaW50LCBpbnQsIGludCwgaW50LCBpbnQsIGludCwgaW50LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUsIGludCwgc3RydWN0IG1jX1JH QiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sLCBlbnVtIG1jX2ZsYXZv ciwgYm9vbCk7CisKK2V4dGVybiB2b2lkIG1jX3hfd3JpdGVfZ2x5cGhzIChzdHJ1Y3Qgd2luZG93 ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqLCBlbnVtIGdseXBoX3Jvd19hcmVh LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIHN0cnVjdCBt Y19SR0IsIGVudW0gbWNfZmxhdm9yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gbWNfY3Vyc29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCwgYm9vbCk7CisKK2V4dGVybiBzdHJ1 Y3QgZ2x5cGhfbWF0cml4ICogbWNfc2F2ZV9nbHlwaF9tYXRyaXggKHN0cnVjdCBnbHlwaF9tYXRy aXggKik7CisKK2V4dGVybiB2b2lkIG1jX3Jlc3RvcmVfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5 cGhfbWF0cml4ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKik7CisKKy8qIGVuZCBNVUxUSVBMRS1D VVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBUZXh0IGN1cnNvciB0 eXBlcy4gICovCiAKIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMKQEAgLTM4Miw2ICs0OTcsMTggQEAg c3RydWN0IGdseXBoX3NsaWNlCiAKIHN0cnVjdCBnbHlwaAogeworCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGludCByZWxhdGl2ZV94LCBo cG9zOworCisgIHB0cmRpZmZfdCBieXRlcG9zOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgIC8qIFBvc2l0aW9uIGZyb20gd2hpY2ggdGhpcyBnbHlwaCB3YXMgZHJhd24uICBJZiBg b2JqZWN0JyBiZWxvdyBpcyBhCiAgICAgIExpc3Agc3RyaW5nLCB0aGlzIGlzIGFuIGluZGV4IGlu dG8gdGhhdCBzdHJpbmcuICBJZiBpdCBpcyBhCiAgICAgIGJ1ZmZlciwgdGhpcyBpcyBhIHBvc2l0 aW9uIGluIHRoYXQgYnVmZmVyLiAgSW4gYWRkaXRpb24sIHNvbWUKQEAgLTEyNDgsNiArMTM3NSwy OCBAQCBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UKIAogc3RydWN0IGdseXBoX3N0cmluZwogeworCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAg Ym9vbF9iZiBsZWZ0X292ZXJ3cml0dGVuX3AgOiAxOworCisgICAgYm9vbF9iZiByaWdodF9vdmVy d3JpdHRlbl9wIDogMTsKKworICAgIGJvb2xfYmYgcmVjdGFuZ2xlX251a2VkX3AgOiAxOworCisg ICAgYm9vbF9iZiBiYWNrZ3JvdW5kX251a2VkX3AgOiAxOworCisgICAgZW51bSBkcmF3X2dseXBo X2FjdGlvbgorICAgIHsKKyAgICAgIE1DX0RSQVdfR0xZUEgsCisgICAgICBNQ19FUkFTRV9HTFlQ SAorICAgIH0gYWN0aW9uX3R5cGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg LyogWC1vcmlnaW4gb2YgdGhlIHN0cmluZy4gICovCiAgIGludCB4OwogCkBAIC0yODEyLDYgKzI5 NjEsMzIgQEAgdHlwZWRlZiB2b2lkICgqZnJhbWVfcGFybV9oYW5kbGVyKSAoc3RydWN0IGZyYW1l ICosIExpc3BfT2JqZWN0LCBMaXNwX09iamVjdCk7CiAKIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJm YWNlCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgbnN0ZXJtLm1gIFwgYHczMnRlcm0u Y2AgXCBgeHRlcm0uY2AgbXVzdCBiZSBpbiB0aGUKK2V4YWN0IHNhbWUgb3JkZXIgYXMgdGhlIGBy ZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4dGVybi5oYCEgKi8KKworICB2b2lkICgqbWNf c2NyaWJlX2dseXBocykgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1h dHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICBzdHJ1Y3QgZ2x5cGggKnN0cmlu ZywgZW51bSBnbHlwaF9yb3dfYXJlYSBhcmVhLCBpbnQgbGVuLCBpbnQgdnBvcywKKyAgICAgICAg aW50IGJvdHRvbV92cG9zLCBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhf Zmxhdm9yLAorICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlLCBpbnQgd2Qs IGJvb2wgYWN0aXZlX3AsIGJvb2wgY3Vyc29yX2djX3AsCisgICAgICAgIGJvb2wgZHJhd19wKTsK KworICB2b2lkICgqbWN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cmMvZGlzcG5ldy5jCisrKyBi L3NyYy9kaXNwbmV3LmMKQEAgLTU2LDYgKzU2LDE4MTYgQEAgYWxvbmcgd2l0aCBHTlUgRW1hY3Mu ICBJZiBub3QsIHNlZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LiAgKi8KICNpbmNs dWRlICJ3MzIuaCIKICNlbmRpZgogDAorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog YmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCisgIHN0cnVjdCBnbHlwaHNfc2tpcHBlZAorICB7 CisgICAgcHRyZGlmZl90IGFsbG9jYXRlZDsKKyAgICBwdHJkaWZmX3QgdXNlZDsKKyAgICBzdHJ1 Y3Qgc2tpcHBlZF9pdGVtcworICAgICAgeworICAgICAgICBpbnQgeDsKKyAgICAgICAgaW50IGhw b3M7CisgICAgICAgIGJvb2wgZW5hYmxlZF9wOworICAgICAgfSAqc2tpcHBlZDsKKyAgfSBhcnJh eV9nbHlwaHNfc2tpcHBlZDsKKworc3RhdGljIGJvb2wgdXBkYXRlX3dpbmRvd19saW5lIChzdHJ1 Y3Qgd2luZG93ICosIGludCwgYm9vbCAqKTsKKworc3RhdGljIHZvaWQgdXBkYXRlX21hcmdpbmFs X2FyZWEgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGVudW0gZ2x5cGhfcm93X2FyZWEsIGludCk7CisKK3N0YXRp YyB2b2lkIG1ha2VfY3VycmVudCAoc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICosIGludCk7CisKK3N0YXRpYyBib29sIHJvd19lcXVhbF9wIChzdHJ1Y3QgZ2x5cGhf cm93ICosIHN0cnVjdCBnbHlwaF9yb3cgKi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pZiAoYm90dG9tIDw9IHliKQorICAgICAgICArK2k7CisgICAgICBpZiAo Ym90dG9tID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisgIGxhc3RfbmV3ID0gaTsKKyAg LyogU2V0IGxhc3Rfb2xkIHRvIHRoZSBpbmRleCArIDEgb2YgdGhlIHJvdyB0aGF0IHJlYWNoZXMg dGhlIGJvdHRvbQorICAgICBib3VuZGFyeSBpbiB0aGUgY3VycmVudCBtYXRyaXguICBXZSBkb24n dCBsb29rIGF0IHRoZSBlbmFibGVkCisgICAgIGZsYWcgaGVyZSBiZWNhdXNlIHdlIHBsYW4gdG8g cmV1c2UgcGFydCBvZiB0aGUgZGlzcGxheSBldmVuIGlmCisgICAgIG90aGVyIHBhcnRzIGFyZSBk aXNhYmxlZC4gKi8KKyAgaSA9IGZpcnN0X29sZCArIDE7CisgIHdoaWxlIChpIDwgY3VycmVudF9t YXRyaXgtPm5yb3dzIC0gMSkKKyAgICB7CisgICAgICBpbnQgYm90dG9tID0gTUFUUklYX1JPV19C T1RUT01fWSAoTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkpKTsKKyAgICAgIGlmIChib3R0 b20gPD0geWIpCisgICAgICAgICsraTsKKyAgICAgIGlmIChib3R0b20gPj0geWIpCisgICAgICAg IGJyZWFrOworICAgIH0KKyAgbGFzdF9vbGQgPSBpOworICAvKiBTa2lwIG92ZXIgcm93cyBlcXVh bCBhdCB0aGUgYm90dG9tLiAqLworICBpID0gbGFzdF9uZXc7CisgIGogPSBsYXN0X29sZDsKKyAg d2hpbGUgKGkgLSAxID4gZmlyc3RfbmV3CisgICAgICAgICAmJiBqIC0gMSA+IGZpcnN0X29sZAor ICAgICAgICAgJiYgTUFUUklYX1JPV19FTkFCTEVEX1AgKGN1cnJlbnRfbWF0cml4LCBqIC0gMSkK KyAgICAgICAgICYmIChNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaiAtIDEpLT55CisgICAg ICAgICAgICAgPT0gTUF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vdWxkIGJlIDE0LCBlLmcuLAorICAgICBiZWNh dXNlIG5leHRfYWxtb3N0X3ByaW1lICgxMTMpIHdvdWxkIGJlIDEyNy4gKi8KKyAgeworICAgIHZl cmlmeSAoTkVYVF9BTE1PU1RfUFJJTUVfTElNSVQgPT0gMTEpOworICAgIGVudW0geyBuZXh0X2Fs bW9zdF9wcmltZV9pbmNyZW1lbnRfbWF4ID0gMTAgfTsKKyAgICBwdHJkaWZmX3Qgcm93X3RhYmxl X21heCA9CisgICAgICAobWluIChQVFJESUZGX01BWCwgU0laRV9NQVgpIC8gKDMgKiBzaXplb2Yg Km1jX3Jvd190YWJsZSkKKyAgICAgICAtIG5leHRfYWxtb3N0X3ByaW1lX2luY3JlbWVudF9tYXgp OworICAgIHB0cmRpZmZfdCBjdXJyZW50X25yb3dzX21heCA9IHJvd190YWJsZV9tYXggLSBkZXNp cmVkX21hdHJpeC0+bnJvd3M7CisgICAgaWYgKGN1cnJlbnRfbnJvd3NfbWF4IDwgY3VycmVudF9t YXRyaXgtPm5yb3dzKQorICAgICAgbWVtb3J5X2Z1bGwgKFNJWkVfTUFYKTsKKyAgfQorICAvKiBS ZWFsbG9jYXRlIHZlY3RvcnMsIHRhYmxlcyBldGMuIGlmIG5lY2Vzc2FyeS4gKi8KKyAgaWYgKGN1 cnJlbnRfbWF0cml4LT5ucm93cyA+IG1jX29sZF9saW5lc19zaXplKQorICAgIG1jX29sZF9saW5l cyA9IHhwYWxsb2MgKG1jX29sZF9saW5lcywgJm1jX29sZF9saW5lc19zaXplLAorICAgICAgICAg ICAgICAgICAgICAgICAgIGN1cnJlbnRfbWF0cml4LT5ucm93cyAtIG1jX29sZF9saW5lc19zaXpl LAorICAgICAgICAgICAgICAgICAgICAgICAgIElOVF9NQVgsIHNpemVvZiAqbWNfb2xkX2xpbmVz KTsKKyAgaWYgKGRlc2lyZWRfbWF0cml4LT5ucm93cyA+IG1jX25ld19saW5lc19zaXplKQorICAg IG1jX25ld19saW5lcyA9IHhwYWxsb2MgKG1jX25ld19saW5lcywgJm1jX25ld19saW5lc19zaXpl LAorICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2lyZWRfbWF0cml4LT5ucm93cyAtIG1jX25l d19saW5lc19zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgIElOVF9NQVgsIHNpemVvZiAq bWNfbmV3X2xpbmVzKTsKKyAgbiA9IGRlc2lyZWRfbWF0cml4LT5ucm93czsKKyAgbiArPSBjdXJy ZW50X21hdHJpeC0+bnJvd3M7CisgIGlmIChtY19yb3dfdGFibGVfc2l6ZSA8IDMgKiBuKQorICAg IHsKKyAgICAgIHB0cmRpZmZfdCBzaXplID0gbmV4dF9hbG1vc3RfcHJpbWUgKDMgKiBuKTsKKyAg ICAgIG1jX3Jvd190YWJsZSA9IHhucmVhbGxvYyAobWNfcm93X3RhYmxlLCBzaXplLCBzaXplb2Yg Km1jX3Jvd190YWJsZSk7CisgICAgICBtY19yb3dfdGFibGVfc2l6ZSA9IHNpemU7CisgICAgICBt ZW1zZXQgKG1jX3Jvd190YWJsZSwgMCwgc2l6ZSAqIHNpemVvZiAqbWNfcm93X3RhYmxlKTsKKyAg ICB9CisgIGlmIChuID4gbWNfcm93X2VudHJ5X3Bvb2xfc2l6ZSkKKyAgICBtY19yb3dfZW50cnlf cG9vbCA9IHhwYWxsb2MgKG1jX3Jvd19lbnRyeV9wb29sLCAmbWNfcm93X2VudHJ5X3Bvb2xfc2l6 ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4gLSBtY19yb3dfZW50cnlfcG9vbF9z aXplLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLTEsIHNpemVvZiAqbWNfcm93X2Vu dHJ5X3Bvb2wpOworICBpZiAoZGVzaXJlZF9tYXRyaXgtPm5yb3dzID4gbWNfcnVuc19zaXplKQor ICAgIHsKKyAgICAgIG1jX3J1bnMgPSB4bnJlYWxsb2MgKG1jX3J1bnMsIGRlc2lyZWRfbWF0cml4 LT5ucm93cywgc2l6ZW9mICptY19ydW5zKTsKKyAgICAgIG1jX3J1bl9wb29sID0geG5yZWFsbG9j IChtY19ydW5fcG9vbCwgZGVzaXJlZF9tYXRyaXgtPm5yb3dzLCBzaXplb2YgKm1jX3J1bl9wb29s KTsKKyAgICAgIG1jX3J1bnNfc2l6ZSA9IGRlc2lyZWRfbWF0cml4LT5ucm93czsKKyAgICB9Cisg IG5ydW5zID0gcnVuX2lkeCA9IDA7CisgIG1jX3Jvd19lbnRyeV9pZHggPSAwOworICAvKiBBZGQg cm93cyBmcm9tIHRoZSBjdXJyZW50IGFuZCBkZXNpcmVkIG1hdHJpeCB0byB0aGUgaGFzaCB0YWJs ZQorICAgICByb3dfaGFzaF90YWJsZSB0byBiZSBhYmxlIHRvIGZpbmQgZXF1YWwgb25lcyBxdWlj a2x5LiAqLworICBmb3IgKGkgPSBmaXJzdF9vbGQ7IGkgPCBsYXN0X29sZDsgKytpKQorICAgIHsK KyAgICAgIGlmIChNQVRSSVhfUk9XX0VOQUJMRURfUCAoY3VycmVudF9tYXRyaXgsIGkpKQorICAg ICAgICB7CisgICAgICAgICAgZW50cnkgPSBtY19hZGRfcm93X2VudHJ5IChNQVRSSVhfUk9XIChj dXJyZW50X21hdHJpeCwgaSkpOworICAgICAgICAgIG1jX29sZF9saW5lc1tpXSA9IGVudHJ5Owor ICAgICAgICAgICsrZW50cnktPm9sZF91c2VzOworICAgICAgICB9CisgICAgICBlbHNlCisgICAg ICAgIG1jX29sZF9saW5lc1tpXSA9IE5VTEw7CisgICAgfQorICBmb3IgKGkgPSBmaXJzdF9uZXc7 IGkgPCBsYXN0X25ldzsgKytpKQorICAgIHsKKyAgICAgIGVhc3NlcnQgKE1BVFJJWF9ST1dfRU5B QkxFRF9QIChkZXNpcmVkX21hdHJpeCwgaSkpOworICAgICAgZW50cnkgPSBtY19hZGRfcm93X2Vu dHJ5IChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSkpOworICAgICAgKytlbnRyeS0+bmV3 X3VzZXM7CisgICAgICBlbnRyeS0+bmV3X2xpbmVfbnVtYmVyID0gaTsKKyAgICAgIG1jX25ld19s aW5lc1tpXSA9IGVudHJ5OworICAgIH0KKyAgLyogSWRlbnRpZnkgbW92ZXMgYmFzZWQgb24gbGlu ZXMgdGhhdCBhcmUgdW5pcXVlIGFuZCBlcXVhbAorICAgICBpbiBib3RoIG1hdHJpY2VzLiAqLwor ICBmb3IgKGkgPSBmaXJzdF9vbGQ7IGkgPCBsYXN0X29sZDspCisgICAgaWYgKG1jX29sZF9saW5l c1tpXQorICAgICAgICAmJiBtY19vbGRfbGluZXNbaV0tPm9sZF91c2VzID09IDEKKyAgICAgICAg JiYgbWNfb2xkX2xpbmVzW2ldLT5uZXdfdXNlcyA9PSAxKQorICAgICAgeworICAgICAgICBpbnQg cCwgcTsKKyAgICAgICAgaW50IG5ld19saW5lID0gbWNfb2xkX2xpbmVzW2ldLT5uZXdfbGluZV9u dW1iZXI7CisgICAgICAgIHN0cnVjdCBydW4gKnJ1biA9IG1jX3J1bl9wb29sICsgcnVuX2lkeCsr OworICAgICAgICAvKiBSZWNvcmQgbW92ZS4gKi8KKyAgICAgICAgcnVuLT5jdXJyZW50X3Zwb3Mg PSBpOworICAgICAgICBydW4tPmN1cnJlbnRfeSA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4 LCBpKS0+eTsKKyAgICAgICAgcnVuLT5kZXNpcmVkX3Zwb3MgPSBuZXdfbGluZTsKKyAgICAgICAg cnVuLT5kZXNpcmVkX3kgPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgbmV3X2xpbmUpLT55 OworICAgICAgICBydW4tPm5yb3dzID0gMTsKKyAgICAgICAgcnVuLT5oZWlnaHQgPSBNQVRSSVhf Uk9XIChjdXJyZW50X21hdHJpeCwgaSktPmhlaWdodDsKKyAgICAgICAgLyogRXh0ZW5kIGJhY2t3 YXJkLiAqLworICAgICAgICBwID0gaSAtIDE7CisgICAgICAgIHEgPSBuZXdfbGluZSAtIDE7Cisg ICAgICAgIHdoaWxlIChwID4gZmlyc3Rfb2xkCisgICAgICAgICAgICAgICAmJiBxID4gZmlyc3Rf bmV3CisgICAgICAgICAgICAgICAmJiBtY19vbGRfbGluZXNbcF0gPT0gbWNfbmV3X2xpbmVzW3Fd KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGludCBoID0gTUFUUklYX1JPVyAoY3VycmVudF9t YXRyaXgsIHApLT5oZWlnaHQ7CisgICAgICAgICAgICAtLXJ1bi0+Y3VycmVudF92cG9zOworICAg ICAgICAgICAgLS1ydW4tPmRlc2lyZWRfdnBvczsKKyAgICAgICAgICAgICsrcnVuLT5ucm93czsK KyAgICAgICAgICAgIHJ1bi0+aGVpZ2h0ICs9IGg7CisgICAgICAgICAgICBydW4tPmRlc2lyZWRf eSAtPSBoOworICAgICAgICAgICAgcnVuLT5jdXJyZW50X3kgLT0gaDsKKyAgICAgICAgICAgIC0t cCwgLS1xOworICAgICAgICAgIH0KKyAgICAgICAgLyogRXh0ZW5kIGZvcndhcmQuICovCisgICAg ICAgIHAgPSBpICsgMTsKKyAgICAgICAgcSA9IG5ld19saW5lICsgMTsKKyAgICAgICAgd2hpbGUg KHAgPCBsYXN0X29sZAorICAgICAgICAgICAgICAgJiYgcSA8IGxhc3RfbmV3CisgICAgICAgICAg ICAgICAmJiBtY19vbGRfbGluZXNbcF0gPT0gbWNfbmV3X2xpbmVzW3FdKQorICAgICAgICAgIHsK KyAgICAgICAgICAgIGludCBoID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIHApLT5oZWln aHQ7CisgICAgICAgICAgICArK3J1bi0+bnJvd3M7CisgICAgICAgICAgICBydW4tPmhlaWdodCAr PSBoOworICAgICAgICAgICAgKytwLCArK3E7CisgICAgICAgICAgfQorICAgICAgICAvKiBJbnNl cnQgcnVuIGludG8gbGlzdCBvZiBhbGwgcnVucy4gIE9yZGVyIHJ1bnMgYnkgY29waWVkCisgICAg ICA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wKKyAgICAgICAgICArLS0tLS0tLS0t LS0rICAtLT4gICstLS0tLS0tLS0tLSsKKyAgICAgICAgICB8ICAgICBCICAgICB8ICAgICAgIHwg ICAgIEEgICAgIHwKKyAgICAgICAgICArLS0tLS0tLS0tLS0rICAgICAgICstLS0tLS0tLS0tLSsK KyAgICAgSW5zdGVhZCwgcHJlZmVyIGJpZ2dlciBtb3ZlcywgYW5kIGludmFsaWRhdGUgbW92ZXMg dGhhdCB3b3VsZAorICAgICBjb3B5IGZyb20gd2hlcmUgd2UgY29waWVkIHRvLiAqLworICBmb3Ig KGkgPSAwOyBpIDwgbnJ1bnM7ICsraSkKKyAgICBpZiAobWNfcnVuc1tpXS0+bnJvd3MgPiAwKQor ICAgICAgeworICAgICAgICBzdHJ1Y3QgcnVuICpyID0gbWNfcnVuc1tpXTsKKyAgICAgICAgaWYg KHItPmN1cnJlbnRfeSAhPSByLT5kZXNpcmVkX3kpCisgICAgICAgICAgeworICAgICAgICAgICAg Ly8gIGZwcmludGYgKHN0ZGVyciwgIiVzOiAgci0+Y3VycmVudC9kZXNpcmVkX3Zwb3MgKCVkLyVk KSB8IHItPmN1cnJlbnQvZGVzaXJlZF95ICglZC8lZClcbiIsCisgICAgICAgICAgICAvLyAgICAg ICAgICAgci0+Y3VycmVudF95IDwgci0+ZGVzaXJlZF95ID8gIuKGkyIgOiAi4oaRIiwKKyAgICAg ICAgICAgIC8vICAgICAgICAgICByLT5jdXJyZW50X3Zwb3MsIHItPmRlc2lyZWRfdnBvcywgci0+ Y3VycmVudF95LCByLT5kZXNpcmVkX3kpOworICAgICAgICAgICAgLy8gIHJpZi0+Y2xlYXJfd2lu ZG93X21vdXNlX2ZhY2UgKHcpOworICAgICAgICAgICAgLy8gIHJpZi0+c2Nyb2xsX3J1bl9ob29r ICh3LCByKTsKKyAgICAgICAgICB9CisgICAgICAgIC8qIFRydW5jYXRlIHJ1bnMgdGhhdCBjb3B5 IHRvIHdoZXJlIHdlIGNvcGllZCB0bywgYW5kCisgICAgICAgICAgIGludmFsaWRhdGUgcnVucyB0 aGF0IGNvcHkgZnJvbSB3aGVyZSB3ZSBjb3BpZWQgdG8uICovCisgICAgICAgIGZvciAoaiA9IG5y dW5zIC0gMTsgaiA+IGk7IC0taikKKyAgICAgICAgICB7CisgICAgICAgICAgICBzdHJ1Y3QgcnVu ICpwID0gbWNfcnVuc1tqXTsKKyAgICAgICAgICAgIGJvb2wgdHJ1bmNhdGVkX3AgPSAwOworICAg ICAgICAgICAgaWYgKHAtPm5yb3dzID4gMAorICAgICAgICAgICAgICAgICYmIHAtPmRlc2lyZWRf eSA8IHItPmRlc2lyZWRfeSArIHItPmhlaWdodAorICAgICAgICAgICAgICAgICYmIHAtPmRlc2ly ZWRfeSArIHAtPmhlaWdodCA+IHItPmRlc2lyZWRfeSkKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIGlmIChwLT5kZXNpcmVkX3kgPCByLT5kZXNpcmVkX3kpCisgICAgICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzID0gci0+ZGVzaXJlZF92cG9zIC0g cC0+ZGVzaXJlZF92cG9zOworICAgICAgICAgICAgICAgICAgICBwLT5oZWlnaHQgPSByLT5kZXNp cmVkX3kgLSBwLT5kZXNpcmVkX3k7CisgICAgICAgICAgICAgICAgICAgIHRydW5jYXRlZF9wID0g MTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCBucm93c19jb3BpZWQgPSAoci0+ZGVz aXJlZF92cG9zICsgci0+bnJvd3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAtIHAtPmRlc2lyZWRfdnBvcyk7CisgICAgICAgICAgICAgICAgICAgIGlmIChwLT5ucm93 cyA8PSBucm93c19jb3BpZWQpCisgICAgICAgICAgICAgICAgICAgICAgcC0+bnJvd3MgPSAwOwor ICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhlaWdodF9jb3BpZWQgPSAoci0+ZGVzaXJlZF95 ICsgci0+aGVpZ2h0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIC0gcC0+ZGVzaXJlZF95KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+Y3VycmVu dF92cG9zICs9IG5yb3dzX2NvcGllZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+ZGVz aXJlZF92cG9zICs9IG5yb3dzX2NvcGllZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+ bnJvd3MgLT0gbnJvd3NfY29waWVkOworICAgICAgICAgICAgICAgICAgICAgICAgICBwLT5jdXJy ZW50X3kgKz0gaGVpZ2h0X2NvcGllZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+ZGVz aXJlZF95ICs9IGhlaWdodF9jb3BpZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmhl aWdodCAtPSBoZWlnaHRfY29waWVkOworICAgICAgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0 ZWRfcCA9IDE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmIChyLT5jdXJyZW50X3kgIT0gci0+ZGVz aXJlZF95CisgICAgICAgICAgICAgICAgLyogVGhlIGNvbmRpdGlvbiBiZWxvdyBpcyBlcXVpdmFs ZW50IHRvCisgICAgICAgICAgICAgICAgICAgKChwLT5jdXJyZW50X3kgPj0gci0+ZGVzaXJlZF95 CisgICAgICAgICAgICAgICAgICAgICAmJiBwLT5jdXJyZW50X3kgPCByLT5kZXNpcmVkX3kgKyBy LT5oZWlnaHQpCisgICAgICAgICAgICAgICAgICAgIHx8IChwLT5jdXJyZW50X3kgKyBwLT5oZWln aHQgPiByLT5kZXNpcmVkX3kKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIChwLT5jdXJyZW50 X3kgKyBwLT5oZWlnaHQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PSByLT5kZXNpcmVk X3kgKyByLT5oZWlnaHQpKSkKKyAgICAgICAgICAgICAgICAgICBiZWNhdXNlIHdlIGhhdmUgMCA8 IHAtPmhlaWdodCA8PSByLT5oZWlnaHQuICovCisgICAgICAgICAgICAgICAgJiYgcC0+Y3VycmVu dF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0CisgICAgICAgICAgICAgICAgJiYgcC0+Y3Vy cmVudF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJlZF95KQorICAgICAgICAgICAgICBwLT5ucm93 cyA9IDA7CisgICAgICAgICAgICAvKiBSZW9yZGVyIHJ1bnMgYnkgY29waWVkIHBpeGVsIGxpbmVz IGlmIHRydW5jYXRlZC4gKi8KKyAgICAgICAgICAgIGlmICh0cnVuY2F0ZWRfcCAmJiBwLT5ucm93 cyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgayA9IG5ydW5zIC0g MTsKKyAgICAgICAgICAgICAgICB3aGlsZSAobWNfcnVuc1trXS0+bnJvd3MgPT0gMCB8fCBtY19y dW5zW2tdLT5oZWlnaHQgPCBwLT5oZWlnaHQpCisgICAgICAgICAgICAgICAgICBrLS07CisgICAg ICAgICAgICAgICAgbWVtbW92ZSAobWNfcnVucyArIGosIG1jX3J1bnMgKyBqICsgMSwgKGsgLSBq KSAqIHNpemVvZiAoKm1jX3J1bnMpKTsKKyAgICAgICAgICAgICAgICBtY19ydW5zW2tdID0gcDsK KyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgICAgLyogQXNzaWduIG1hdHJpeCBy b3dzLiAqLworICAgICAgICBmb3IgKGogPSAwOyBqIDwgci0+bnJvd3M7ICsraikK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gZnByaW50ZiAoc3RkZXJyLCAibWNfdXBkYXRlX3Rl eHRfYXJlYSAoJXMpOiAgY3VycmVudC9ib3R0b21fdnBvcyAoJWQvJWQpXG4iLAorICAgICAgICAg ICAgICAgICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3MsIGJvdHRvbV92cG9zKTsKKyAgLyogSW5h c211Y2ggYXMgd2UgcHJvY2VzcyB0aGUgY3Vyc29yIHJvdyBiZWZvcmUgYWxsIG90aGVyIHJvd3Ms IHdlIGNhbiByZWx5CisgIHVwb24gdGhlIHByZXZpb3VzIGBkZXNpcmVkX3Jvd2AgdG8gYmUgYWNj dXJhdGUuICovCisgIGVudW0gbWNfcm93X3Bvc2l0aW9uIHJvd19wb3NpdGlvbiA9ICBtY19yb3df cG9zaXRpb24gKHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGRlc2lyZWRfcm93CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJy ZW50X3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZGVzaXJlZF9yb3csIHZwb3MpOworICAvKiBJZiByb3dzIGFyZSBhdCBkaWZmZXJl bnQgWCBvciBZLCBvciByb3dzIGhhdmUgZGlmZmVyZW50IGhlaWdodCwKKyAgICAgb3IgdGhlIGN1 cnJlbnQgcm93IGlzIG1hcmtlZCBpbnZhbGlkLCB3cml0ZSB0aGUgZW50aXJlIGxpbmUuICovCisg IGlmICghY3VycmVudF9yb3ctPmVuYWJsZWRfcAorICAgICAgfHwgZGVzaXJlZF9yb3ctPnkgIT0g Y3VycmVudF9yb3ctPnkKKyAgICAgIHx8IGRlc2lyZWRfcm93LT5hc2NlbnQgIT0gY3VycmVudF9y b3ctPmFzY2VudAorICAgICAgfHwgZGVz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biBhIHBpeGVsIGZyb20gdGhlCisgICAgICAgYGYnIG9uIHRo ZSBzY3JlZW4uICovCisgICAgaWYgKG92ZXJsYXBwaW5nX2dseXBoc19wICYmIGkgPiAwKQorICAg ICAgeworICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gJmN1cnJlbnRfcm93LT5nbHlwaHNb VEVYVF9BUkVBXVtpIC0gMV07CisgICAgICAgIGludCBsZWZ0LCByaWdodDsKKyAgICAgICAgcmlm LT5nZXRfZ2x5cGhfb3ZlcmhhbmdzIChnbHlwaCwgWEZSQU1FICh3LT5mcmFtZSksICZsZWZ0LCAm cmlnaHQpOworICAgICAgICBjYW5fc2tpcF9wID0gKHJpZ2h0ID09IDAgJiYgIWFib3J0X3NraXBw aW5nKTsKKyAgICAgIH0KKworICAgIGlmIChjYW5fc2tpcF9wKQorICAgICAgeworICAgICAgICBp bnQgc3RhcnRfaHBvcyA9IGk7CisKKyAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAg ICAgICAmJiBHTFlQSF9FUVVBTF9QIChkZXNpcmVkX2dseXBoLCBjdXJyZW50X2dseXBoKSkKKyAg ICAgICAgICB7CisgICAgICAgICAgICArK2FycmF5X2dseXBoc19za2lwcGVkLnVzZWQ7CisgICAg ICAgICAgICBpZiAoYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkIDwgYXJyYXlfZ2x5cGhz X3NraXBwZWQudXNlZCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBvbGRf YWxsb2MgPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxvY2F0ZWQ7CisgICAgICAgICAgICAgICAg aW50IG5ld19lbHRzID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZCAtIGFycmF5X2dseXBoc19z a2lwcGVkLmFsbG9jYXRlZDsKKyAgICAgICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5z a2lwcGVkID0KKyAgICAgICAgICAgICAgICAgIHhwYWxsb2MgKGFycmF5X2dseXBoc19za2lwcGVk LnNraXBwZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmYXJyYXlfZ2x5cGhzX3NraXBw ZWQuYWxsb2NhdGVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2VsdHMsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgc2l6ZW9mICphcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkKTsKKyAgICAgICAgICAgICAg ICBtZW1zZXQgKGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWQgKyBvbGRfYWxsb2MsIDAsCisg ICAgICAgICAgICAgICAgICAgICAgICAgKGFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCAt IG9sZF9hbGxvYykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICogc2l6ZW9mICphcnJheV9n bHlwaHNfc2tpcHBlZC5za2lwcGVkKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgaW50 IG50aCA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSAxOworICAgICAgICAgICAgYXJyYXlf Z2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLnggPSB4OworICAgICAgICAgICAgYXJyYXlfZ2x5 cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmhwb3MgPSBpOworICAgICAgICAgICAgYXJyYXlfZ2x5 cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmVuYWJsZWRfcCA9IHRydWU7CisgICAgICAgICAgICB4 ICs9IGRlc2lyZWRfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgKytkZXNpcmVkX2ds eXBoLCArK2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAgICAgICB9CisKKyAgICAgICAgLyogQ29u c2lkZXIgdGhlIGNhc2UgdGhhdCB0aGUgY3VycmVudCByb3cgY29udGFpbnMgInh4eAorICAgICBw cHAgZ2dnIiBpbiBpdGFsaWMgQ291cmllciBmb250LCBhbmQgdGhlIGRlc2lyZWQgcm93CisgICAg IGlzICJ4eHggZ2dnIi4gIFRoZSBjaGFyYWN0ZXIgYHAnIGhhcyBsYmVhcmluZywgYGcnCisgICAg IGhhcyBub3QuICBUaGUgbG9vcCBhYm92ZSB3aWxsIHN0b3AgaW4gZnJvbnQgb2YgdGhlCisgICAg IGZpcnN0IGBwJyBpbiB0aGUgY3VycmVudCByb3cuICBJZiB3ZSB3b3VsZCBzdGFydAorICAgICB3 cml0aW5nIGdseXBocyB0aGVyZSwgd2Ugd291bGRuJ3QgZXJhc2UgdGhlIGxiZWFyaW5nCisgICAg IG9mIHRoZSBgcCcuICBUaGUgcmVzdCBvZiB0aGUgbGJlYXJpbmcgcHJvYmxlbSBpcyB0aGVuCisg ICAgIHRha2VuIGNhcmUgb2YgYnkgZHJhd19nbHlwaHMuICovCisgICAgICAgIGlmIChvdmVybGFw cGluZ19nbHlwaHNfcAorICAgICAgICAgICAgJiYgaSA+IDAKKyAgICAgICAgICAgICYmIGkgPCBj dXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAmJiAoY3VycmVudF9yb3ct PnVzZWRbVEVYVF9BUkVBXSAhPSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKSkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAgICAgICByaWYtPmdl dF9nbHlwaF9vdmVyaGFuZ3MgKGN1cnJlbnRfZ2x5cGgsCisgICAgICAgICAgICAgICAgICAgIFhG UkFNRSAody0+ZnJhbWUpLAorICAgICAgICAgICAgICAgICAgICAmbGVmdCwgJnJpZ2h0KTsKKyAg ICAgICAgICAgIHdoaWxlIChsZWZ0ID4gMCAmJiBpID4gMCkKKyAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgIC0taSwgLS1kZX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isgICAgICAgIGludCBjdXJyZW50X3ggPSB4OworICAgICAgICBib29sIHNraXBfZmlyc3RfcCA9 ICFjYW5fc2tpcF9wOworICAgICAgICAvKiBGaW5kIHRoZSBuZXh0IGdseXBoIHRoYXQncyBlcXVh bCBhZ2Fpbi4gKi8KKyAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAgICAgICAmJiAo c2tpcF9maXJzdF9wCisgICAgICAgICAgICAgICAgICAgfHwgIUdMWVBIX0VRVUFMX1AgKGRlc2ly ZWRfZ2x5cGgsIGN1cnJlbnRfZ2x5cGgpKQorICAgICAgICAgICAgICAgJiYgeCA9PSBjdXJyZW50 X3gpCisgICAgICAgICAgeworICAgICAgICAgICAgeCArPSBkZXNpcmVkX2dseXBoLT5waXhlbF93 aWR0aDsKKyAgICAgICAgICAgIGN1cnJlbnRfeCArPSBjdXJyZW50X2dseXBoLT5waXhlbF93aWR0 aDsKKyAgICAgICAgICAgICsrZGVzaXJlZF9nbHlwaCwgKytjdXJyZW50X2dseXBoLCArK2k7Cisg ICAgICAgICAgICBza2lwX2ZpcnN0X3AgPSAwOworICAgICAgICAgIH0KKworICBmb3IgKGludCBl bHQgPSAwOworICAgICAgIGVsdCA8IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQKKyAgICAgICAm JiB2cG9zICE9IGJvdHRvbV92cG9zOworICAgICAgICsrZWx0KQorICAgIHsKKyAgICAgIGludCB4 ID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtlbHRdLng7CisgICAgICBpbnQgaHBvcyA9 IGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbZWx0XS5ocG9zOworICAgICAgc3RydWN0IGds eXBoICp0YXJnZXRfZ2x5cGggPQorICAgICAgICBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBkZXNp cmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIGhwb3MsIHZwb3MpOworICAgICAgaWYgKGRlYnVnX3Ap CisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlNLSVBQRUQ6ICB2cG9zICglZCkgfCBjaGFyICgl ZC8lcykgfCB4OiAoJWQpIHwgaHBvcyAoJWQvJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAg ICAgIHZwb3MsIHRhcmdldF9nbHlwaC0+dS5jaCwgbWNfY2hhcl90b19zdHJpbmcgKHRhcmdldF9n bHlwaC0+dS5jaCksCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgaHBvcywgdXBkYXRlZF9y b3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpOworICAgICAgbWNfZHJhd19yb3cgKHcsIGRlc2lyZWRf bWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCB4LCAxLCB2cG9zLAorICAgICAgICAg ICAgICAgICAgIGJvdHRvbV92cG9zLCBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9z aXRpb24sIGRyYXdfcCwgU0tJUFBFRCk7CisgICAgfQorCisgICAgICAgIGlmIChpID09IHN0YXJ0 X2hwb3MgfHwgeCAhPSBjdXJyZW50X3gpCisgICAgICAgICAgeworICAgICAgICAgICAgaSA9IHN0 YXJ0X2hwb3M7CisgICAgICAgICAgICB4ID0gc3RhcnRfeDsKKyAgICAgICAgICAgIGRlc2lyZWRf Z2x5cGggPSBzdGFydDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIH0KKworICAgICAg ICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9zLCBzdGFydF9ocG9zLCBkZXNpcmVkX3Jvdy0+eSwg c3RhcnRfeCk7CisKKyAgLyogUmUtZHJhdyBhIHBvcnRpb24gb2YgdGhlIHJvdy4gKi8KKworICBp ZiAoZGVidWdfcAorICAgICAgJiYgdnBvcyAhPSBib3R0b21fdnBvcykKKyAgICB7CisgICAgICBm cHJpbnRmIChzdGRlcnIsICJSRURSQVcgU0VHTUVOVDpcblwKKyAgICAgIHZwb3MgKCVkKSB8IGNo Y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k7CisgICAgICAgIH0KKworICAgICAg LyogTWF5YmUgY2xlYXIgdG8gZW5kIG9mIGxpbmUuICovCisgICAgICBpZiAoTUFUUklYX1JPV19F WFRFTkRTX0ZBQ0VfUCAoZGVzaXJlZF9yb3cpKQorICAgICAgICB7CisgICAgICAgICAgLyogSWYg bmV3IHJvdyBleHRlbmRzIHRvIHRoZSBlbmQgb2YgdGhlIHRleHQgYXJlYSwgbm90aGluZworICAg ICAgICAgICAgIGhhcyB0byBiZSBjbGVhcmVkLCBpZiBhbmQgb25seSBpZiB3ZSBkaWQgYSB3cml0 ZV9nbHlwaHMKKyAgICAgICAgICAgICBhYm92ZS4gIFRoaXMgaXMgbWFkZSBzdXJlIGJ5IHNldHRp bmcgZGVzaXJlZF9zdG9wX3BvcworICAgICAgICAgICAgIGFwcHJvcHJpYXRlbHkgYWJvdmUuICov CisgICAgICAgICAgZWFzc2VydCAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAg ICAgICAgICAgICAgICAgICB8fCAoKGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gPT0gY3Vy cmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgTUFU UklYX1JPV19FWFRFTkRTX0ZBQ0VfUCAoY3VycmVudF9yb3cpKSk7CisgICAgICAgIH0KKyAgICAg IGVsc2UgaWYgKE1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1AgKGN1cnJlbnRfcm93KSkKKyAgICAg ICAgeworICAgICAgICAgIC8qIElmIG9sZCByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0 ZXh0IGFyZWEsIGNsZWFyLiAqLworICAgICAgICAgIGlmIChpID49IGRlc2lyZWRfcm93LT51c2Vk W1RFWFRfQVJFQV0pCisgICAgICAgICAgICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9zLCBpLCBk ZXNpcmVkX3Jvdy0+eSwgZGV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yBpdCB0aGlzIHdheS4g Ki8KKyAgICAgICAgICBpZiAodnBvcyA9PSB3LT5waHlzX2N1cnNvci52cG9zCisgICAgICAgICAg ICAgICYmIChkZXNpcmVkX3Jvdy0+cmV2ZXJzZWRfcAorICAgICAgICAgICAgICAgICAgPyAody0+ cGh5c19jdXJzb3IuaHBvcyA8IDApCisgICAgICAgICAgICAgICAgICA6ICh3LT5waHlzX2N1cnNv ci5ocG9zID49IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pKSkKKyAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgdy0+cGh5c19jdXJzb3Jfb25fcCA9IDA7CisgICAgICAgICAgICAgIHhs aW0gPSAtMTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg eGxpbSA9IGN1cnJlbnRfcm93LT5waXhlbF93aWR0aDsKKyAgICAgICAgICBpZiAoZHJhd19wKQor ICAgICAgICAgICAgcmlmLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgdXBkYXRlZF9yb3csIFRFWFRf QVJFQSwgeGxpbSk7CisgICAgICAgICAgY2xlYXJfdG9feCA9IHhsaW07CisgICAgICAgICAgY2hh bmdlZF9wID0gMTsKKyAgICAgICAgfQorCisgIGlmIChjaGFuZ2VkX3AKKyAgICAgICYmIGNsZWFy X3RvX3ggIT0gMCkKKyAgICB7CisgICAgICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2Jv eF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgICAgIHN0cnVjdCBtY19SR0IgZGVidWdfZmcgPSB7 LnJlZCA9IDAuODY3LCAuZ3JlZW4gPSAwLjg2NywgLmJsdWUgPSAwLjg2N307CisgICAgICBzdHJ1 Y3QgZ2x5cGggKnRhcmdldF9nbHlwaCA9IHVwZGF0ZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSAr IHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgLyogYG1jX2VuZ2luZScg b25seSBkcmF3cyBhbiBNQ19HTFlQSCB3aGVuIHggPCB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGgu CisgICAgICBUaGUgY3VycmVudCBkZXNpZ24gaW5oaWJpdHMgZHJhd2luZyBvdmVyIGFuIGV4aXN0 aW5nIGdseXBoIGF0IHRoZSBlbmQgb2YgYQorICAgICAgd29yZC13cmFwcGVkIGxpbmUuICBTYWlk IGdseXBoIHJlY2VpdmVzIGEgZmFrZSBjdXJzb3IgaW4gZWl0aGVyIG9uZSBvZiB0aGUKKyAgICAg IHByZXZpb3VzIHNlY3Rpb25zIGFib3ZlLCBhbmQgc2hvdWxkIG5vdCBiZSBvdmVyd3JpdHRlbiB3 aXRoIGFub3RoZXIgb25lLgorICAgICAgVGhpcyBkZXNpZ24gaXMgbmVlZGVkIGJlY2F1c2UgYSB3 b3JkLXdyYXBwZWQgbGluZSBkb2VzIG5vdCByZWNlaXZlIGFuIGV4dHJhCisgICAgICBzcGFjZSBs aWtlIG5vbi13b3JkLXdyYXBwZWQgbGluZXMgZG8uICovCisgICAgICBpbnQgeCA9IHVwZGF0ZWRf cm93LT5waXhlbF93aWR0aDsKKyAgICAgIGludCBocG9zID0gdXBkYXRlZF9yb3ctPnVzZWRbVEVY VF9BUkVBXSAtIDE7CisgICAgICBpbnQgeF9saW1pdCA9IChjbGVhcl90b194ID09IC0xKQorICAg ICAgICAgICAgICAgICAgICA/IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICA6 IGNsZWFyX3RvX3g7CisgICAgICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgICAg IENIRUNLX0JVRkZFUiAoYnVmKTsKKyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChi dWYpOworICAgICAgYm9vbCBmaWxsX2NvbHVtbl90cnVtcHNfcCA9ICghTklMUCAoQlZBUiAoYiwg Y2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNzZW50aWFs cy5mY194KTsKKworICAgICAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQorICAgICAgICBmcHJpbnRm IChzdGRlcnIsICJtY191cGRhdGVfdGV4dF9hcmVhIChmbG9hdGluZyk6ICB2cG9zICglZCkgfCB4 X2xpbWl0ICglZClcbiIsIHZwb3MsIHhfbGltaXQpOworCisgICAgICBpZiAoQlVGRkVSUCAody0+ Y29udGVudHMpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgJiYgeCA8IHRleHRfYXJlYV93aWR0aAorICAgICAg ICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSB4CisgICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9 IE5VTEwKKyAgICAgICAgICAmJiBkcmF3X3ApCisgICAgICAgIG1jX2VuZ2luZSAodywgZGVzaXJl ZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwgeCwgeF9saW1p dCwKKyAgICAgICAgICAgICAgICAgICB1cGRhdGVkX3Jvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFS LCAxLCBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLAorICAgICAgICAgICAgICAgICAgIHJvd19w b3NpdGlvbiwgZGVidWdfcCA/IGRlYnVnX2ZnIDogZXNzZW50aWFscy5mY19mZ1tyb3dfcG9zaXRp b25dLAorICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OLCBkcmF3X3AsIE5PV0hFUkUsIE5P X0NBQ0hFKTsKKworICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICYm ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAg ICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX2hvcml6b250YWxf cnVsZXIpKQorICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAmJiB2 cG9zID09IHctPmN1cnNvci52cG9zCisgICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9IE5VTEwK KyAgICAgICAgICAmJiBkcmF3X3ApCisgICAgICAgIG1jX2VuZ2luZSAodywgZGVzaXJlZF9tYXRy aXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwgeCwgeF9saW1pdCwKKyAg ICAgICAgICAgICAgICAgICB1cGRhdGVkX3Jvdy0+eSwgaHBvcywgdnBvcywgTUNfSEJBUiwgMSwg Y3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywKKyAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRp b24sIGRlYnVnX3AgPyBkZWJ1Z19mZyA6IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bvc2l0aW9uXSwK KyAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3X3AsIE5PV0hFUkUsIE5P X0NBQ0hFKTsKKworICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICYm ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAg ICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2FsX3J1 bGVyKSkKKyAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3AKKyAgICAgICAgICAmJiB4 IDwgdGV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kVfUCAoZGVzaXJl ZF9yb3cpCisgICAgICAgICAgICAgICE9IE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAo Y3VycmVudF9yb3cpKSkKKyAgICAgICAgcmlmLT5hZnRlcl91cGRhdGVfd2luZG93X2xpbmVfaG9v ayAodywgZGVzaXJlZF9yb3cpOworICAgIH0KKyAgLyogVXBkYXRlIGN1cnJlbnRfcm93IGZyb20g ZGVzaXJlZF9yb3cuICovCisgIG1ha2VfY3VycmVudCAody0+ZGVzaXJlZF9tYXRyaXgsIHctPmN1 cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30KKwordm9pZAorbWNf dXBkYXRlX3dpbmRvd19lcmFzZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCBv bGRfbWF0cml4KQoreworICBib29sIGdvX29uZV9wID0gKG9sZF9tYXRyaXguY3Vyc29yc191c2Vk W01DX0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICAgICB8fCBvbGRfbWF0cml4LmN1cnNvcnNf dXNlZFtDSF9DQUNIRV0gPiAwCisgICAgICAgICAgICAgICAgICAgfHwgb2xkX21hdHJpeC5jdXJz b3JzX3VzZWRbRkNfQ0FDSEVdID4gMCk7CisgIGJvb2wgZ29fdHdvX3AgPSAoQlVGRkVSUCAody0+ Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICB8fCAhTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29u ZikpKSk7CisgIGJvb2wgdXBkYXRpbmdfZnJhbWVfcCA9IGZhbHNlOworICBzdHJ1Y3QgZnJhbWUg KmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgaWYgKFhGUkFNRSAody0+ZnJhbWUpICE9IGYtPm1j X3VwZGF0aW5nX2ZyYW1lCisgICAgICAmJiAoZ29fb25lX3AgfHwgZ29fdHdvX3ApKQorICAgIHsK KyAgICAgIHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOworICAgICAgdXBkYXRlX2JlZ2luIChmKTsK KyAgICB9CisgIGlmICh3LT5waHlzX2N1cnNvcl9vbl9wCisgICAgICAmJiBnb190d29fcCkKKyAg ICBlcmFzZV9waHlzX2N1cnNvciAodyk7CisgIGZvciAoaW50IHZudGggPSAwOworICAgICAgIGdv X29uZV9wCisgICAgICAgJiYgdm50aCA8IHctPm1jX21hdHJpeC52cG9zX3VzZWQ7CisgICAgICAg Kyt2bnRoKQorICAgIHsKKyAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUg PSBNQ19DQUNIRTsKKyAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAg ICArK2NhY2hlX3R5cGUpCisgICAgICAgIGZvciAoaW50IG50aF8wID0gMDsKKyAgICAgICAgICAg ICBtY190cmF2ZXJzZV9jYWNoZV9wIChvbGRfbWF0cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGhf MCk7CisgICAgICAgICAgICAgKytudGhfMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29s IHNhbWVfcCA9IGZhbHNlOworICAgICAgICAgICAgZm9yIChpbnQgd19udGggPSAwOyB3X250aCA8 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV07ICsrd19udGgp CisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzYW1lX3AgfD0gKG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgudHlwZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVt3X250aF0uZ2x5cGgudHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5ieXRl cG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5ieXRlcG9zCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzBdLmdseXBoLmNoYXJwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLmNoYXJw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgudS52YWwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19u dGhdLmdseXBoLnUudmFsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLmZhY2VfaWQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bd19udGhdLmdseXBoLmZhY2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5 cGgucGFkZGluZ19wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5wYWRkaW5nX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uZ2x5cGgubGVmdF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W3dfbnRoXS5nbHlwaC5sZWZ0X2JveF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgu cmlnaHRfYm94X2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgucmlnaHRfYm94 X2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC52b2Zmc2V0CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5nbHlwaC52b2Zmc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnBpeGVs X3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5waXhlbF93aWR0aAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8wXS5nbHlwaC5zbGljZS5pbWcueAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u Z2x5cGguc2xpY2UuaW1nLngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuaW1nLnkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmltZy55CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzBdLmdseXBoLnNsaWNlLmltZy53aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5 cGguc2xpY2UuaW1nLndpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy5o ZWlnaHQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmltZy5oZWlnaHQKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuY21wLmZyb20KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b d19udGhdLmdseXBoLnNsaWNlLmNtcC5mcm9tCisgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLngKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bd19udGhdLngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZngKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bd19udGhdLmZ4CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b d19udGhdLnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZnkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhd LmZ5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmhwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmhw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0udnBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBv cworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS53ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9 PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ud2QKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uaAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uaAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5jdXJzb3JfdHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uY3Vyc29yX3R5 cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uY3Vyc29yX3dpZHRoCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5jdXJzb3Jfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcucmVkCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW3dfbnRoXS5mZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcuZ3JlZW4KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bd19udGhdLmZnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLmJsdWUK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmZnLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcu cmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5iZy5yZWQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u YmcuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLmdyZWVuCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzBdLmJnLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLmJsdWUKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmFjdGl2ZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoX2ZsYXZvcgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u Z2x5cGhfZmxhdm9yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVt3X250aF0uZW5hYmxlZF9wKTsKKyAgICAgICAgICAgICAgICAvKiBGb3JjZSB0aGUgZnJp bmdlIGJpdG1hcHMgdG8gYWx3YXlzIGJlIHJlc2V0L3JlZHJhd24uICovCisgICAgICAgICAgICAg ICAgaWYgKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uY3Vy c29yX3R5cGUKKyAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uY3Vyc29yX3R5cGUKKyAgICAgICAgICAgICAgICAg ICAgJiYgKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uY3Vy c29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgICAg ICB8fCBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmN1cnNv cl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVApKQorICAgICAgICAgICAgICAgICAgc2Ft ZV9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgaWYgKHNhbWVfcCkKKyAgICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gIGZwcmludGYgKHN0ZGVyciwgIkhJVCAoJXMp OiAgdnBvcyAoJWQpIHwgaHBvcyAoJWQpIHwgY2hhciAoJXMpXG4iLAorICAgICAgICAgICAgICAg ICAgICAvLyAgICAgICAgICAgICAgICAgICAoY2FjaGVfdHlwZSA9PSBNQ19DQUNIRSkKKyAgICAg ICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICA/ICJNQyIKKyAgICAgICAgICAg ICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgOiAoY2FjaGVfdHlwZSA9PSBDSF9DQUNIRSkK KyAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICA/ICJDSCIKKyAgICAg ICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgOiAoY2FjaGVfdHlwZSA9PSBGQ19D QUNIRSkKKyAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICA/ICJGQyIK KyAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgOiAiTk8iLAorICAgICAg ICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBvcywKKyAgICAgICAgICAgICAgICAgICAgLy8g ICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bd19udGhdLmhwb3MsCisgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAg IG1jX2NoYXJfdG9fc3RyaW5nICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVt3X250aF0uZ2x5cGgudS5jaCkpOworICAgICAgICAgICAgICAgICAgICB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uc2FtZV9wID0gdHJ1ZTsKKyAg ICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg ICAvLyAgZnByaW50ZiAoc3RkZXJyLCAiTUlTUyAoJXMpOiAgdnBvcyAoJWQpIHwgaHBvcyAoJWQg di4gJWQpIHwgY2hhciAoJXMgdi4gJXMpIHwgY2FjaGVfdXNlZCAoJWQgdi4gJWQpXG4iLAorICAg ICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIChjYWNoZV90eXBlID09IE1D X0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgPyAi TUMiCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgOiAoY2FjaGVf dHlwZSA9PSBDSF9DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAg ICAgICAgID8gIkNIIgorICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAg IDogKGNhY2hlX3R5cGUgPT0gRkNfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAg ICAgICAgICAgICAgICAgICA/ICJGQyIKKyAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAg ICAgICAgICAgICA6ICJOTyIsCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAg ICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnZw b3MsCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5ocG9zLAorICAgICAgICAgICAg ICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgIC8vICAg ICAgICAgICAgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnUuY2gpLAorICAgICAgICAgICAgICAgICAg ICAgIC8vICAgICAgICAgICAgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nICh3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgudS5jaCksCisgICAgICAg ICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0sCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAg ICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBl XSk7CisgICAgICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bd19udGhdLnNhbWVfcCA9IGZhbHNlOworICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICghc2FtZV9wKQorICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgLyogYG1hdHJpeF9yb3cnIGluIGBkaXNwbmV3LmNgIGNvbnRh aW5zIHRoZSBmb2xsb3dpbmcgdGVzdHMsCisgICAgICAgICAgICAgICAgZWFzc2VydCAobWF0cml4 ICYmIG1hdHJpeC0+cm93cyk7CisgICAgICAgICAgICAgICAgZWFzc2VydCAocm93ID49IDAgJiYg cm93IDwgbWF0cml4LT5ucm93cyk7ICovCisgICAgICAgICAgICAgICAgYm9vbCBiYXJmX2NyYXNo X29uZSA9ICh3LT5jdXJyZW50X21hdHJpeCAmJiB3LT5jdXJyZW50X21hdHJpeC0+cm93cykgPyBm YWxzZSA6IHRydWU7CisgICAgICAgICAgICAgICAgaWYgKGJhcmZfY3Jhc2hfb25lKQorICAgICAg ICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgYm9vbCBiYXJmX2NyYXNoX3R3 byA9ICh2bnRoID49IDAgJiYgdm50aCA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cykgPyBmYWxz ZSA6IHRydWU7CisgICAgICAgICAgICAgICAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAgICAgICAg ICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqdm50 aF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgdm50aCk7CisgICAgICAgICAg ICAgICAgaW50IHhfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0ueDsKKyAgICAgICAgICAgICAgICBpbnQgZnhfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZng7CisgICAgICAgICAgICAgICAgaW50IHlfMCA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ueTsKKyAgICAg ICAgICAgICAgICBpbnQgZnlfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uZnk7CisgICAgICAgICAgICAgICAgaW50IGhwb3NfMCA9IG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvczsKKyAgICAgICAgICAgICAg ICBpbnQgdnBvc18wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS52cG9zOworICAgICAgICAgICAgICAgIGludCB3ZF8wID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS53ZDsKKyAgICAgICAgICAgICAgICBpbnQgaF8w ID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5oOworICAg ICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGVfMCA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uY3Vyc29yX3R5cGU7CisgICAg ICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3Jfd2lkdGg7CisgICAgICAgICAgICAgICAgLy8g IHN0cnVjdCBtY19SR0IgbHNsX2ZnXzAgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcucmVkLAorICAgICAgICAgICAgICAgIC8vICAgICAg ICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMF0uZmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgLy8gICAgICAg ICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzBdLmZnLmJsdWV9OworICAgICAgICAgICAgICAgIHN0cnVjdCBtY19S R0IgbHNsX2JnXzAgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uYmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5iZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5i Zy5ibHVlfTsKKyAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9wXzAgPSBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmFjdGl2ZV9wOworICAgICAgICAgICAg ICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvcl8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgICAgICAg Ym9vbCBlbmFibGVkX3BfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0uZW5hYmxlZF9wOworICAgICAgICAgICAgICAgIGlmICh2cG9zXzAgPT0gdm50aAor ICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3JfMCA9PSBNQ19HTFlQSAorICAgICAg ICAgICAgICAgICAgICAmJiBlbmFibGVkX3BfMAorICAgICAgICAgICAgICAgICAgICAmJiB2bnRo X3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg ICBtY19lcmFzZV9jdXJzb3IgKHcsIHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3JvdywgeF8wLCB5 XzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHBvc18wLCB2cG9zXzAs IGdseXBoX2ZsYXZvcl8wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1 cnNvcl90eXBlXzAsIHdkXzApOworICAgICAgICAgICAgICAgICAgICBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRfcCA9IGZhbHNlOworICAgICAg ICAgICAgICAgICAgICAtLW9sZF9tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOworICAg ICAgICAgICAgICAgICAgICAvKiBJZiB3ZSBpbmFkdmVydGVudGx5IGVyYXNlZCBhbm90aGVyIGZh a2UgY3Vyc29yIGF0IHRoZSBzYW1lCisgICAgICAgICAgICAgICAgICAgIEhQT1MgdGhhdCBpcyBz dGlsbCBlbmFibGVkX3AgaW4gdGhlIGBvbGRfbWF0cml4YCwgdGhlbiByZWRyYXcgaXQuICovCisg ICAgICAgICAgICAgICAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBN Q19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7 CisgICAgICAgICAgICAgICAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAgICAgICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaW50IG50aF8xID0gMDsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAob2xkX21hdHJp eCwgY2FjaGVfdHlwZSwgdm50aCwgbnRoXzEpOworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICArK250aF8xKQorICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaW50IHhfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMV0ueDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgZnhfMSA9IG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZng7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaW50IHlfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMV0ueTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQg ZnlfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZnk7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhwb3NfMSA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uaHBvczsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICBpbnQgdnBvc18xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8xXS52cG9zOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB3ZF8x ID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS53ZDsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5oOworICAgICAgICAgICAgICAgICAgICAgICAgICAg IGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGVfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uY3Vyc29yX3R5cGU7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8xXS5jdXJzb3Jfd2lkdGg7CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmdfMSA9IHsucmVkID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5mZy5yZWQsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZnLmdyZWVuLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZnLmJsdWV9OworICAg ICAgICAgICAgICAgICAgICAgICAgICAgIC8vICBzdHJ1Y3QgbWNfUkdCIGxzbF9iZ18xID0gey5y ZWQgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmJnLnJl ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzFdLmJnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8xXS5iZy5ibHVlfTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29s IGFjdGl2ZV9wXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzFdLmFjdGl2ZV9wOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfZmxhdm9y IGdseXBoX2ZsYXZvcl8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8xXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBl bmFibGVkX3BfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MV0uZW5hYmxlZF9wOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgZ29fcF8xID0g KGhwb3NfMCA9PSBocG9zXzEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBlbmFibGVkX3BfMSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFn b19wXzEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wXzEgPSBmYWxzZTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgdy0+Y3VycmVudF9tYXRy aXgsIHZudGhfcm93LCB4XzEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGZ4XzEsIHlfMSwgZnlfMSwgaHBvc18xLCB2cG9zXzEsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdkXzEsIGhfMSwgY3Vyc29y X3R5cGVfMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX3dpZHRoXzEsIGxzbF9mZ18xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVfcF8xLCBnbHlwaF9mbGF2b3JfMSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlX3BfMSk7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICh2cG9zXzAgPT0g dm50aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wXzAKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHZudGhfcm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wXzAgPSB0cnVlOwor ICAgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB3LT5jdXJyZW50 X21hdHJpeCwgdm50aF9yb3csIHhfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZnhfMCwgeV8wLCBmeV8wLCBocG9zXzAsIHZwb3NfMCwgd2RfMCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaF8wLCBjdXJzb3JfdHlwZV8w LCBjdXJzb3Jfd2lkdGhfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbHNsX2JnXzAsIGFjdGl2ZV9wXzAsIGdseXBoX2ZsYXZvcl8wLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVfcF8wKTsKKyAgICAgICAgICAg ICAgICAgICAgICBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBd LmVuYWJsZWRfcCA9IGZhbHNlOworICAgICAgICAgICAgICAgICAgICAgIC0tb2xkX21hdHJpeC5j dXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAgICAgICAgICAgICAgLyogSWYgd2Ug aW5hZHZlcnRlbnRseSBlcmFzZWQgYW5vdGhlciBmYWtlIGN1cnNvciBhdCB0aGUgc2FtZQorICAg ICAgICAgICAgICAgICAgICAgIEhQT1MgdGhhdCBpcyBzdGlsbCBlbmFibGVkX3AgaW4gdGhlIGBv bGRfbWF0cml4YCwgdGhlbiByZWRyYXcgaXQuICovCisgICAgICAgICAgICAgICAgICAgICAgZm9y IChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAgICAgICAg ICAgICAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICAgICAgICAg ICAgICAgICAgKytjYWNoZV90eXBlKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICAgICAgICBmb3IgKGludCBudGhfMiA9IDA7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAob2xkX21hdHJpeCwgY2FjaGVfdHlw ZSwgdm50aCwgbnRoXzIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsrbnRoXzIp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgaW50IHhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMl0ueDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBmeF8yID0gb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5meDsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGludCB5XzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzJdLnk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQg ZnlfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZnk7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaHBvc18yID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5ocG9zOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaW50IHZwb3NfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMl0udnBvczsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCB3ZF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS53 ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBoXzIgPSBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmg7CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlXzIgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmN1cnNvcl90eXBlOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aF8yID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5jdXJzb3Jfd2lkdGg7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZ18yID0gey5yZWQgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZnLnJlZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdy ZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5mZy5n cmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzJdLmZnLmJsdWV9OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIHN0cnVjdCBt Y19SR0IgbHNsX2JnXzIgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMl0uYmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g ICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5iZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5iZy5ibHVlfTsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGJvb2wgYWN0aXZlX3BfMiA9IG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uYWN0aXZlX3A7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3JfMiA9IG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZ2x5cGhfZmxhdm9yOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBlbmFibGVkX3BfMiA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZW5hYmxlZF9wOworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgYm9vbCBnb19wXzIgPSAoaHBvc18wID09IGhwb3NfMgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZnhfMCA8PSBmeF8yCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmeF8wICsgd2Rf MCA+IGZ4XzIgKyB3ZF8yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBlbmFibGVkX3BfMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAo IWdvX3BfMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wXzIgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB3LT5jdXJy ZW50X21hdHJpeCwgdm50aF9yb3csIHhfMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBmeF8yLCB5XzIsIGZ5XzIsIGhwb3NfMiwgdnBvc18yLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdkXzIs IGhfMiwgY3Vyc29yX3R5cGVfMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGhfMiwgbHNsX2ZnXzIsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX3BfMiwgZ2x5cGhf Zmxhdm9yXzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgcmVtb3ZlX3BfMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgIH0KKyAgICB9CisgIGlmICh1cGRhdGluZ19mcmFtZV9wKQorICAgIHVw ZGF0ZV9lbmQgKGYpOworfQorCit2b2lkCittY191cGRhdGVfd2luZG93X2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obW9kZV9saW5lX3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZGVzaXJlZF9tYXRyaXgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7CisgICAgICAgIH0KKworICAgICAgLyogRmlu ZCBmaXJzdCBlbmFibGVkIHJvdy4gIE9wdGltaXphdGlvbnMgaW4gcmVkaXNwbGF5X2ludGVybmFs CisgICAgICAgICBtYXkgbGVhZCB0byBhbiB1cGRhdGUgd2l0aCBvbmx5IG9uZSByb3cgZW5hYmxl ZC4gIFRoZXJlIG1heQorICAgICAgICAgYmUgYWxzbyBjb21wbGV0ZWx5IGVtcHR5IG1hdHJpY2Vz LiAqLworICAgICAgd2hpbGUgKHJvdyA8IGVuZCAmJiAhcm93LT5lbmFibGVkX3ApCisgICAgICAg ICsrcm93OworCisgICAgICAvKiBUcnkgcmV1c2luZyBwYXJ0IG9mIHRoZSBkaXNwbGF5IGJ5IGNv cHlpbmcuICovCisgICAgICBpZiAocm93IDwgZW5kICYmICF3LT5kZXNpcmVkX21hdHJpeC0+bm9f c2Nyb2xsaW5nX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgcmMgPSBtY19zY3JvbGxpbmdf d2luZG93ICh3LCBoZWFkZXJfbGluZV9yb3cgIT0gTlVMTCk7CisgICAgICAgICAgaWYgKHJjIDwg MCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogQWxsIHJvd3Mgd2VyZSBmb3VuZCB0 byBiZSBlcXVhbC4gKi8KKyAgICAgICAgICAgICAgcGF1c2VkX3AgPSAwOworICAgICAgICAgICAg ICBnb3RvIHNldF9jdXJzb3I7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChy YyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBXZSd2ZSBzY3JvbGxl ZCB0aGUgZGlzcGxheS4gKi8KKyAgICAgICAgICAgICAgICBmb3JjZV9wID0gMTsKKyAgICAgICAg ICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAg IC8qIFByb2Nlc3MgdGhlIGN1cnNvciByb3cgYXQgdGhlIG91dHNldCBpZiBpdCBpcyB3aXRoaW4g YGRlc2lyZWRfbWF0cml4YC4KKyAgICAgIFdoZW4gcHJvY2Vzc2luZyBhbGwgb3RoZXIgcm93cywg d2Ugd2lsbCBxdWVyeSB0aGUgYHctPmN1cnJlbnRfbWF0cml4YCBmb3IgZGF0YQorICAgICAgcmVs YXRpbmcgdG8gdGhlIGN1cnNvciByb3cuICBgbWFrZV9jdXJyZW50YCAod2l0aGluIGB1cGRhdGVf d2luZG93X2xpbmUnKQorICAgICAgdXBkYXRlcyB0aGUgYHctPmN1cnJlbnRfbWF0cml4YCBmb3Ig dGhlIGFwcGxpY2FibGUgcm93LiAgSW4gZG9pbmcgc28sIGhvd2V2ZXIsCisgICAgICB0aGUgYXBw bGljYWJsZSByb3cgaW4gdGhlIGRlc2lyZWQgbWF0cml4IGlzIGFsdGVyZWQgc3VjaCB0aGF0IHdl IGNhbiBubyBsb25nZXIKKyAgICAgIHJlbHkgdXBvbiB0aGUgYWNjdXJhY3kgb2YgYFJPVy0+dXNl ZFtURVhUX0FSRUFdYC4gIFRoZXJlZm9yZSwgd2UgbXVzdCBub3cgcmVseQorICAgICAgZXhjbHVz aXZlbHkgdXBvbiBgdy0+Y3VycmVudF9tYXRyaXgnIGZvciBjdXJzb3Igcm93IGJhc2VkIGRlY2lz aW9ucy4gKi8KKyAgICAgIGZvciAoc3RydWN0IGdseXBoX3JvdyAqbWNfcm93ID0gcm93OworICAg ICAgICAgICBtY19yb3cgPCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpOworICAg ICAgICAgICArK21jX3JvdykKKyAgICAgICAgeworICAgICAgICAgIGludCB2cG9zID0gTUFUUklY X1JPV19WUE9TIChtY19yb3csIHctPmRlc2lyZWRfbWF0cml4KTsKKyAgICAgICAgICBpZiAobWNf cm93LT5lbmFibGVkX3AKKyAgICAgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCA9IHctPmRlc2lyZWRf bWF0cml4OworICAgICAgICAgICAgICBpZiAoIWZvcmNlX3AgJiYgKytuX3VwZGF0ZWQgJSBwcmVl bXB0X2NvdW50ID09IDApCisgICAgICAgICAgICAgICAgZGV0ZWN0X2lucHV0X3BlbmRpbmdfaWdu b3JlX3NxdWVlemFibGVzICgpOworICAgICAgICAgICAgICBjaGFuZ2VkX3AgfD0gbWNfdXBkYXRl X3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4 LCBlc3NlbnRpYWxzLCBkcmF3X3ApOworICAgICAgICAgICAgICBpZiAoTUFUUklYX1JPV19CT1RU T01fWSAocm93KSA+PSB5YikKKyAgICAgICAgICAgICAgICBmb3IgKGludCBpID0gdnBvcyArIDE7 IGkgPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MgLSAxOyArK2kpCisgICAgICAgICAgICAgICAg ICBTRVRfTUFUUklYX1JPV19FTkFCTEVEX1AgKHctPmN1cnJlbnRfbWF0cml4LCBpLCBmYWxzZSk7 CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBj dXJzb3JfbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgICAgICAvKiBVcGRhdGUgdGhlIHJl c3Qgb2YgdGhlIGxpbmVzLiAqLworICAgICAgZm9yICg7IHJvdyA8IGVuZCAmJiAoZm9yY2VfcCB8 fCAhaW5wdXRfcGVuZGluZyk7ICsrcm93KQorICAgICAgICAvKiBzY3JvbGxpbmdfd2luZG93IHJl c2V0cyB0aGUgZW5hYmxlZF9wIGZsYWcgb2YgdGhlIHJvd3MgaXQgcmV1c2VzIGZyb20KKyAgICAg ICAgY3VycmVudF9tYXRyaXguICovCisgICAgICAgIGlmIChyb3ctPmVuYWJsZWRfcCkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3LT5k ZXNpcmVkX21hdHJpeCk7CisgICAgICAgICAgICAvKiBJZiB0aGUgYGN1cnNvcl9yb3dgIGlzIHdp dGhpbiB0aGUgYGRlc2lyZWRfbWF0cml4YCwgdGhlbiBpdCB3YXMKKyAgICAgICAgICAgIHByb2Nl c3NlZCBoZXJlaW5hYm92ZSBhbmQgc2hvdWxkIGJlIHNraXBwZWQgYXQgdGhpcyB0aW1lLiAqLwor ICAgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICBjb250 aW51ZTsKKyAgICAgICAgICAgIGludCBpOworICAgICAgICAgICAgLyogV2UnbGwgaGF2ZSB0byBw bGF5IGEgbGl0dGxlIGJpdCB3aXRoIHdoZW4gdG8KKyAgICAgICAgICAgICAgIGRldGVjdF9pbnB1 dF9wZW5kaW5nLiAgSWYgaXQncyBkb25lIHRvbyBvZnRlbiwKKyAgICAgICAgICAgICAgIHNjcm9s bGluZyBsYXJnZSB3aW5kb3dzIHdpdGggcmVwZWF0ZWQgc2Nyb2xsLXVwCisgICAgICAgICAgICAg ICBjb21tYW5kcyB3aWxsIHRvbyBxdWlja2x5IHBhdXNlIHJlZGlzcGxheS4gKi8KKyAgICAgICAg ICAgIGlmICghZm9yY2VfcCAmJiArK25fdXBkYXRlZCAlIHByZWVtcHRfY291bnQgPT0gMCkKKyAg ICAgICAgICAgICAgZGV0ZWN0X2lucHV0X3BlbmRpbmdfaWdub3JlX3NxdWVlemFibGVzICgpOwor ICAgICAgICAgICAgY2hhbmdlZF9wIHw9IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywg Jm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIGRyYXdfcCk7Cisg ICAgICAgICAgICAvKiBNYXJrIGFsbCByb3dzIGJlbG93IHRoZSBsYXN0IHZpc2libGUgb25lIGlu IHRoZSBjdXJyZW50CisgICAgICAgICAgICAgICBtYXRyaXggYXMgaW52YWxpZC4gIFRoaXMgaXMg bmVjZXNzYXJ5IGJlY2F1c2Ugb2YKKyAgICAgICAgICAgICAgIHZhcmlhYmxlIGxpbmUgaGVpZ2h0 cy4gIENvbnNpZGVyIHRoZSBjYXNlIG9mIHRocmVlCisgICAgICAgICAgICAgICBzdWNjZXNzaXZl IHJlZGlzcGxheXMsIHdoZXJlIHRoZSBmaXJzdCBkaXNwbGF5cyA1CisgICAgICAgICAgICAgICBs aW5lcywgdGhlIHNlY29uZCAzIGxpbmVzLCBhbmQgdGhlIHRoaXJkIDUgbGluZXMgYWdhaW4uCisg ICAgICAgICAgICAgICBJZiB0aGUgc2Vjb25kIHJlZGlzcGxheSB3b3VsZG4ndCBtYXJrIHJvd3Mg aW4gdGhlCisgICAgICAgICAgICAgICBjdXJyZW50IG1hdHJpeCBpbnZhbGlkLCB0aGUgdGhpcmQg cmVkaXNwbGF5IG1pZ2h0IGJlCisgICAgICAgICAgICAgICB0ZW1wdGVkIHRvIG9wdGltaXplIHJl ZGlzcGxheSBiYXNlZCBvbiBsaW5lcyBkaXNwbGF5ZWQKKyAgICAgICAgICAgICAgIGluIHRoZSBm aXJzdCByZWRpc3BsYXkuICovCisgICAgICAgICAgICBpZiAoTUFUUklYX1JPV19CT1RUT01fWSAo cm93KSA+PSB5YikKKyAgICAgICAgICAgICAgZm9yIChpID0gdnBvcyArIDE7IGkgPCB3LT5jdXJy ZW50X21hdHJpeC0+bnJvd3MgLSAxOyArK2kpCisgICAgICAgICAgICAgICAgU0VUX01BVFJJWF9S T1dfRU5BQkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwgaSwgZmFsc2UpOworICAgICAgICAgIH0K KyAgICAgIC8qIFdhcyBkaXNwbGF5IHByZWVtcHRlZD8gKi8KKyAgICAgIHBhdXNlZF9wID0gcm93 IDwgZW5kOworICAgICAgc2V0X2N1cnNvcjoKKyAgICAgIC8qIElmIHdlIGp1bXBlZCBoZXJlIGZy b20gYHNldF9jdXJzb3JgLCB0aGVuIHNldCB0aGUgYGN1cnNvcl9tYXRyaXhgLiAqLworICAgICAg aWYgKGN1cnNvcl9tYXRyaXggPT0gTlVMTCkKKyAgICAgICAgY3Vyc29yX21hdHJpeCA9IHctPmN1 cnJlbnRfbWF0cml4OworICAgICAgLyogUmVzZXQgYHJvd2AgdG8gMCBzbyB0aGF0IGZha2UgY3Vy c29ycyBjYW4gYmUgZHJhd24gb24gcm93cyBwcmVjZWRpbmcgdGhlCisgICAgICBmaXJzdCBgcm93 LT5lbmFibGVkX3BgLiAgSnVzdCBwcmlvciB0byB0aGUgY2FsbCB0byBgc2Nyb2xsaW5nX3dpbmRv dycgYWJvdmUsCisgICAgICBgcm93YCB3YXMgYWR2YW5jZWQgdG8gdGhlIGZpcnN0IGByb3ctPmVu YWJsZWRfcGAuICovCisgICAgICBmb3IgKHN0cnVjdCBnbHlwaF9yb3cgKmRlc2lyZWRfcm93ID0g TUFUUklYX1JPVyAody0+ZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAgICAgICBkZXNpcmVkX3Jv dyA8IGVuZAorICAgICAgICAgICAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGluZykKKyAgICAg ICAgICAgLyogVzMyIEVtYWNzIGNyYXNoZXMgb24gc3RhcnR1cCB3aXRob3V0IGEgQlVGRkVSUCBj aGVjay4gKi8KKyAgICAgICAgICAgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAg ICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAg ICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKQorICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgZmNfdmlzaWJsZSkpKTsKKyAgICAgICAgICAgKytkZXNpcmVkX3JvdykKKyAgICAgICAgewor ICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChkZXNpcmVkX3Jvdywgdy0+ZGVz aXJlZF9tYXRyaXgpOworICAgICAgICAgIGlmIChkZXNpcmVkX3Jvdy0+ZW5hYmxlZF9wKQorICAg ICAgICAgICAgY29udGludWU7CisgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqYm90dG9tX3Jv dyA9IE1BVFJJWF9CT1RUT01fVEVYVF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB3KTsKKyAgICAg ICAgICBpbnQgYm90dG9tX3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGJvdHRvbV9yb3csIHctPmN1 cnJlbnRfbWF0cml4KTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJyZW50X3JvdyA9 IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgICAgICAgICBlbnVtIG1j X3Jvd19wb3NpdGlvbiByb3dfcG9zaXRpb24gPSBtY19yb3dfcG9zaXRpb24gKGN1cnJlbnRfcm93 LCBjdXJyZW50X3JvdywgdnBvcyk7CisgICAgICAgICAgaWYgKGN1cnJlbnRfcm93LT5lbmFibGVk X3ApCisgICAgICAgICAgICBtY19kcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIGN1cnJl bnRfcm93LCBjdXJyZW50X3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAg ICAgICAgICAgY3VycmVudF9yb3ctPngsIGN1cnJlbnRfcm93LT51c2VkW1RFWFRfQVJFQV0sIHZw b3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tX3Zwb3MsIGN1cnNvcl9tYXRyaXgs IGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3 X3AsIFNFVF9DVVJTT1JfT05FKTsKKyAgICAgICAgfQorCisgICAgICBtY19yZXN0b3JlX2dseXBo X21hdHJpeCAoc2F2ZWRfZGVzaXJlZCwgdy0+ZGVzaXJlZF9tYXRyaXgpOworICAgICAgbWNfcmVz dG9yZV9nbHlwaF9tYXRyaXggKHNhdmVkX2N1cnJlbnQsIHctPmN1cnJlbnRfbWF0cml4KTsKKwor ICAgICAgbWNfdXBkYXRlX3dpbmRvd19lcmFzZSAodywgb2xkX21hdHJpeCk7CisKKyAgICAgIG1j X3hmcmVlX2NhY2hlX21hdHJpeCAodywgJm9sZF9tYXRyaXgpOworCisgICAgfQorICAvLyBjbG9j a190IGNsb2NrX2VuZCA9IGNsb2NrKCk7CisgIC8vIGRvdWJsZSBjcHVfdGltZV91c2VkID0gKChk b3VibGUpIChjbG9ja19lbmQgLSBjbG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8v IGZwcmludGYgKHN0ZGVyciwgIm1jX3Njcm9sbGluZ193aW5kb3cgKCVzKTogIFRJTUUgKCVmKVxu IiwgbWNfd2luZG93ICh3KSwgY3B1X3RpbWVfdXNlZCk7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1D VVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBTdHJ1Y3R1cmUgdG8g cGFzcyBkaW1lbnNpb25zIGFyb3VuZC4gIFVzZWQgZm9yIGNoYXJhY3RlciBib3VuZGluZwogICAg Ym94ZXMsIGdseXBoIG1hdHJpeCBkaW1lbnNpb25zIGFuZCBhbGlrZS4gICovCiAKQEAgLTIyNDEs NiArNDA1MSwxNiBAQCBmcmVlX3dpbmRvd19tYXRyaWNlcyAoc3RydWN0IHdpbmRvdyAqdykKIAkg IGZyZWVfZ2x5cGhfbWF0cml4ICh3LT5jdXJyZW50X21hdHJpeCk7CiAJICBmcmVlX2dseXBoX21h dHJpeCAody0+ZGVzaXJlZF9tYXRyaXgpOwogCSAgdy0+Y3VycmVudF9tYXRyaXggPSB3LT5kZXNp cmVkX21hdHJpeCA9IE5VTEw7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgbWNfeGZyZWVfY2FjaGVfbWF0cml4ICh3LCAmdy0+bWNfbWF0 cml4KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCX0KIAogICAgICAgLyogTmV4 dCB3aW5kb3cgb24gc2FtZSBsZXZlbC4gICovCkBAIC0zMzg3LDYgKzUyMDcsMjggQEAgY2hlY2tf Y3VycmVudF9tYXRyaXhfZmxhZ3MgKHN0cnVjdCB3aW5kb3cgKncpCiBzdGF0aWMgYm9vbAogdXBk YXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogeworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmICh0cmFj ZV9yZWRpc3BsYXlfcCkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJ1cGRhdGVfd2luZG93ICglcylc biIsIG1jX3dpbmRvdyAodykpOworCisgIGJvb2wgZHJhd19wID0gdHJ1ZTsKKworICBzdHJ1Y3Qg bWNfZXNzZW50aWFscyBlc3NlbnRpYWxzOworICBtY19zZXRfZXNzZW50aWFscyAodywgJmVzc2Vu dGlhbHMpOworCisgIG1jX3VwZGF0ZV93aW5kb3dfZHJ5cnVuICh3LCBmb3JjZV9wLCBlc3NlbnRp YWxzKTsKKworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpjdXJzb3JfbWF0cml4ID0gTlVMTDsKKwor ICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKmRlc2lyZWRfbWF0 cml4ID0gdy0+ZGVzaXJlZF9tYXRyaXg7CiAgIGJvb2wgcGF1c2VkX3A7CiAgIGludCBwcmVlbXB0 X2NvdW50ID0gY2xpcF90b19ib3VuZHMgKDEsIGJhdWRfcmF0ZSAvIDI0MDAgKyAxLCBJTlRfTUFY KTsKQEAgLTM0NjAsNiArNTMwMiw0NyBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3 LCBib29sIGZvcmNlX3ApCiAJICAgIH0KIAl9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogUHJvY2VzcyB0aGUgY3Vyc29yIHJvdyBh dCB0aGUgb3V0c2V0IGlmIGl0IGlzIHdpdGhpbiBgZGVzaXJlZF9tYXRyaXhgLgorICBXaGVuIHB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3VudCA9PSAwKQorICAgICAgICAgICAgZGV0ZWN0X2lucHV0 X3BlbmRpbmdfaWdub3JlX3NxdWVlemFibGVzICgpOworICAgICAgICAgIGNoYW5nZWRfcCB8PSAo QlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoIU5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3No YWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgISBOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkpCisgICAgICAgICAgICAgICAgICAgICAg ID8gbWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRl bl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX21hdHJpeCwgZXNzZW50aWFscywgZHJhd19wKQorICAgICAgICAgICAgICAgICAgICAgICA6 IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7 CisgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAgICAg ICAgICBmb3IgKGludCBpID0gdnBvcyArIDE7IGkgPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3Mg LSAxOyArK2kpCisgICAgICAgICAgICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAody0+Y3Vy cmVudF9tYXRyaXgsIGksIGZhbHNlKTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAg IH0KKworICBjdXJzb3JfbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgICAgIC8qIFVwZGF0ZSB0aGUgcmVzdCBvZiB0aGUgbGluZXMu ICAqLwogICAgICAgZm9yICg7IHJvdyA8IGVuZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGlu Zyk7ICsrcm93KQogCS8qIHNjcm9sbGluZ193aW5kb3cgcmVzZXRzIHRoZSBlbmFibGVkX3AgZmxh ZyBvZiB0aGUgcm93cyBpdApAQCAtMzQ2Nyw2ICs1MzUwLDE5IEBAIHVwZGF0ZV93aW5kb3cgKHN0 cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKIAlpZiAocm93LT5lbmFibGVkX3ApCiAJICB7 CiAJICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIGRlc2lyZWRfbWF0cml4KTsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICAgICAgICAgIC8qIElmIHRoZSBgY3Vyc29yX3Jvd2AgaXMgd2l0aGluIHRoZSBgZGVzaXJlZF9t YXRyaXhgLCB0aGVuIGl0IHdhcworICAgICAgICAgIHByb2Nlc3NlZCBoZXJlaW5hYm92ZSBhbmQg c2hvdWxkIGJlIHNraXBwZWQgYXQgdGhpcyB0aW1lLiAqLworICAgICAgICAgIGlmICh2cG9zID09 IHctPmN1cnNvci52cG9zKQorICAgICAgICAgIGNvbnRpbnVlOworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAJICAgIGludCBpOwogCiAJICAgIC8qIFdlJ2xsIGhhdmUgdG8gcGxheSBh IGxpdHRsZSBiaXQgd2l0aCB3aGVuIHRvCkBAIC0zNDc1LDggKzUzNzEsMjEgQEAgdXBkYXRlX3dp bmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCSAgICAgICBjb21tYW5kcyB3 aWxsIHRvbyBxdWlja2x5IHBhdXNlIHJlZGlzcGxheS4gICovCiAJICAgIGlmICghZm9yY2VfcCAm JiArK25fdXBkYXRlZCAlIHByZWVtcHRfY291bnQgPT0gMCkKIAkgICAgICBkZXRlY3RfaW5wdXRf cGVuZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7Ci0JICAgIGNoYW5nZWRfcCB8PSB1cGRhdGVf d2luZG93X2xpbmUgKHcsIHZwb3MsCi0JCQkJCSAgICAgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5f cCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKyAgICAgICAgICBjaGFuZ2VkX3AgfD0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAg ICAgICAgICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHx8ICEgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxl KSkpKQorICAgICAgICAgICAgICAgICAgICAgICA/IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywg dnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIGRyYXdf cCkKKyAgICAgICAgICAgICAgICAgICAgICAgOiB1cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3Ms ICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KwogCiAJICAgIC8qIE1hcmsgYWxsIHJvd3MgYmVsb3cgdGhlIGxhc3QgdmlzaWJsZSBvbmUgaW4g dGhlIGN1cnJlbnQKIAkgICAgICAgbWF0cml4IGFzIGludmFsaWQuICBUaGlzIGlzIG5lY2Vzc2Fy eSBiZWNhdXNlIG9mCkBAIC0zNDk3LDYgKzU0MDYsNDQgQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0 IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCiAgICAgc2V0X2N1cnNvcjoKIAorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAvKiBJZiB3ZSBq dW1wZWQgaGVyZSBmcm9tIGBzZXRfY3Vyc29yYCwgdGhlbiBzZXQgdGhlIGBjdXJzb3JfbWF0cml4 YC4gKi8KKyAgaWYgKGN1cnNvcl9tYXRyaXggPT0gTlVMTCkKKyAgICBjdXJzb3JfbWF0cml4ID0g dy0+Y3VycmVudF9tYXRyaXg7CisKKyAgLyogUmVzZXQgYHJvd2AgdG8gMCBzbyB0aGF0IGZha2Ug Y3Vyc29ycyBjYW4gYmUgZHJhd24gb24gcm93cyBwcmVjZWRpbmcgdGhlCisgIGZpcnN0IGByb3ct PmVuYWJsZWRfcGAuICBKdXN0IHByaW9yIHRvIHRoZSBjYWxsIHRvIGBzY3JvbGxpbmdfd2luZG93 JyBhYm92ZSwKKyAgYHJvd2Agd2FzIGFkdmFuY2VkIHRvIHRoZSBmaXJzdCBgcm93LT5lbmFibGVk X3BgLiAqLworICBmb3IgKHN0cnVjdCBnbHlwaF9yb3cgKmRlc2lyZWRfcm93ID0gTUFUUklYX1JP VyAoZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAgIGRlc2lyZWRfcm93IDwgZW5kCisgICAgICAg JiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpCisgICAgICAgLyogVzMyIEVtYWNzIGNyYXNo ZXMgb24gc3RhcnR1cCB3aXRob3V0IGEgQlVGRkVSUCBjaGVjay4gKi8KKyAgICAgICAmJiBCVUZG RVJQICh3LT5jb250ZW50cykKKyAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpOworICAgICAgICsrZGVzaXJlZF9yb3cp CisgICAgeworICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGRlc2lyZWRfcm93LCBk ZXNpcmVkX21hdHJpeCk7CisgICAgICBpZiAoZGVzaXJlZF9yb3ctPmVuYWJsZWRfcCkKKyAgICAg ICAgY29udGludWU7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpib3R0b21fcm93ID0gTUFUUklY X0JPVFRPTV9URVhUX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIHcpOworICAgICAgaW50IGJvdHRv bV92cG9zID0gTUFUUklYX1JPV19WUE9TIChib3R0b21fcm93LCB3LT5jdXJyZW50X21hdHJpeCk7 CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJyZW50X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gICAgICAgICAgY29udGludWU7Cisg ICAgICBpZiAocm93LT5vdmVybGFwcGVkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBmb3IgKGVu dW0gZ2x5cGhfcm93X2FyZWEgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FS RUE7ICsrYXJlYSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90 byAodywgaSwgMCwgcm93LT55LCBhcmVhID09IFRFWFRfQVJFQSA/IHJvdy0+eCA6IDApOworICAg ICAgICAgICAgICBpZiAoKHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID4gMCB8 fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hFXSA+IDAgfHwgdy0+bWNfbWF0cml4 LmN1cnNvcnNfdXNlZFtGQ19DQUNIRV0gPiAwKQorICAgICAgICAgICAgICAgICAgJiYgYXJlYSA9 PSBURVhUX0FSRUEKKyAgICAgICAgICAgICAgICAgICYmIHJvdy0+dXNlZFthcmVhXSkKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRy aXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgICAgICAgICAgIGludCBzdGFydF94ID0g cm93LT54OworICAgICAgICAgICAgICAgICAgaW50IHN0YXJ0X2hwb3MgPSAwOworICAgICAgICAg ICAgICAgICAgaW50IGVuZF9ocG9zID0gcm93LT51c2VkW2FyZWFdOworICAgICAgICAgICAgICAg ICAgYm9vbCBjbGVhcl9lb2xfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgICBlbnVtIGRyYXdf Z2x5cGhzX2ZhY2UgaGwgPSBEUkFXX05PUk1BTF9URVhUOworICAgICAgICAgICAgICAgICAgbWNf cmVkcmF3X3JvdyAodywgbWF0cml4LCByb3csIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVuZF9ocG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJfZW9sX3AsIGhsKTsKKyAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAocm93LT51c2VkW2FyZWFd KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBGUkFNRV9SSUYgKGYp LT53cml0ZV9nbHlwaHMgKHcsIHJvdywgcm93LT5nbHlwaHNbYXJlYV0sIGFyZWEsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT51c2VkW2FyZWFd KTsKKyAgICAgICAgICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+Y2xlYXJfZW5kX29mX2xpbmUg KHcsIHJvdywgYXJlYSwgLTEpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQor ICAgICAgICAgIHJvdy0+b3ZlcmxhcHBlZF9wID0gMDsKKyAgICAgICAgfQorICAgICAgaWYgKE1B VFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAgICAgIGJyZWFrOworICAgIH0KKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIHJlZHJhd19vdmVybGFwcGluZ19y b3dzICh3LCB5Yik7CiAJICAgIH0KICNlbmRpZgpAQCAtMzUzMSwxMCArNTUyOSwyMSBAQCB1cGRh dGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiAgICAgICBzdHJjcHkg KHctPmN1cnJlbnRfbWF0cml4LT5tZXRob2QsIHctPmRlc2lyZWRfbWF0cml4LT5tZXRob2QpOwog I2VuZGlmCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KKyAgaWYgKEJVRkZFUlAgKHctPmNvbnRl bnRzKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3No YWlycykpKQorICAgIG1jX3VwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgMCk7CisgICAgZWxzZQog ICAgICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCAwKTsKICNlbmRpZgogCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgICAgICAvKiBFbmQgdGhlIHVwZGF0ZSBvZiB3aW5kb3cgVy4g IERvbid0IHNldCB0aGUgY3Vyc29yIGlmIHdlCiAgICAgICAgICBwYXVzZWQgdXBkYXRpbmcgdGhl IGRpc3BsYXkgYmVjYXVzZSBpbiB0aGlzIGNhc2UsCiAgICAgICAgICBzZXRfd2luZG93X2N1cnNv cl9hZnRlcl91cGRhdGUgaGFzbid0IGJlZW4gY2FsbGVkLCBhbmQKZGlmZiAtLWdpdCBhL3NyYy9m cmFtZS5oIGIvc3JjL2ZyYW1lLmgKaW5kZXggZWM4ZjYxNC4uZWVhZjcxZSAxMDA2NDQKLS0tIGEv c3JjL2ZyYW1lLmgKKysrIGIvc3JjL2ZyYW1lLmgKQEAgLTIwNSw2ICsyMDUsMTYgQEAgc3RydWN0 IGZyYW1lCiAgIExpc3BfT2JqZWN0IHRvb2xfYmFyX2l0ZW1zOwogICAvKiB0b29sX2Jhcl9pdGVt cyBzaG91bGQgYmUgdGhlIGxhc3QgTGlzcF9PYmplY3QgbWVtYmVyLiAgKi8KIAorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAvKiBOb24tbmls IHdoZW4gdGhlIGZyYW1lIGlzIGluIHRoZSBwcm9jZXNzIG9mIGJlaW5nIHVwZGF0ZWQuICovCisg IHN0cnVjdCBmcmFtZSAqbWNfdXBkYXRpbmdfZnJhbWU7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgLyogQ2FjaGUgb2YgcmVhbGl6ZWQgZmFjZXMuICAqLwogICBzdHJ1Y3QgZmFj ZV9jYWNoZSAqZmFjZV9jYWNoZTsKIApkaWZmIC0tZ2l0IGEvc3JjL2ZyaW5nZS5jIGIvc3JjL2Zy aW5nZS5jCmluZGV4IDMzNWE2ZWIuLjVlN2JkMTcgMTAwNjQ0Ci0tLSBhL3NyYy9mcmluZ2UuYwor KysgYi9zcmMvZnJpbmdlLmMKQEAgLTQzOCw2ICs0MzgsNDYwIEBAIHN0YXRpYyB1bnNpZ25lZCBz aG9ydCBlbXB0eV9saW5lX2JpdHNbXSA9IHsKICNkZWZpbmUgU1RBTkRBUkRfQklUTUFQX0hFSUdI VChiaXRzKSAoc2l6ZW9mIChiaXRzKS9CWVRFU19QRVJfQklUTUFQX1JPVykKICNkZWZpbmUgRlJC SVRTKGJpdHMpICBiaXRzLCBTVEFOREFSRF9CSVRNQVBfSEVJR0hUIChiaXRzKQogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBg Ky1mcmluZ2UtaGVscGVyLWRlY2ltYWwnIGRlZmluZWQgaW4gYGNyb3NzaGFpcnMuZWxgICovCisK Ky8qIFRPRE86ICBDb25zaWRlciBhZGRpbmcgdGhlIGZvbGxvd2luZyBmcmluZ2UgYml0bWFwczoK KyAgKGRlZmluZS1mcmluZ2UtYml0bWFwICdicmVha3BvaW50ICJceDNjXHg3ZVx4ZmZceGZmXHhm Zlx4ZmZceDdlXHgzYyIpCisgIChkZWZpbmUtZnJpbmdlLWJpdG1hcCAnaG9sbG93LXJpZ2h0LXRy aWFuZ2xlICJceGUwXHg5MFx4ODhceDg0XHg4NFx4ODhceDkwXHhlMCIpICovCisKKy8qIDI0Cisg ICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInguLi4uLi4uIgorICAgICAg InguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgIngu Li54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgIngueHh4eHh4IgorICAgICAgIngueHh4 eHh4IgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLnh4Li4u IgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIikK KyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2Jp dHNbXSA9eworICAweDgwLCAweDgwLCAweDgwLCAweDk4LCAweDhjLCAweDg2LCAweGJmLAorICAw eGJmLCAweDg2LCAweDhjLCAweDk4LCAweDgwLCAweDgwLCAweDgwfTsKKworLyogMjUKKyAgICAo Ky1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4u Li4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLnh4Li4ueHgiCisgICAgICAiLi54eC4u eHgiCisgICAgICAiLi4ueHgueHgiCisgICAgICAieHh4eHh4eHgiCisgICAgICAieHh4eHh4eHgi CisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC4ueHgiCisgICAgICAiLnh4Li4ueHgiCisg ICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgi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1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgor ICAgICAgInh4Li4uLi4uIgorICAgICAgIiB4eC4uLi4uIgorICAgICAgIi54eC4uLi4uIgorICAg ICAgIi4ueHguLi4uIgorICAgICAgIi4ueHguLi4uIgorICAgICAgIi4uLnh4Li4uIgorICAgICAg Ii4uLnh4Li4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4uLi54eC4uIgorICAgICAgIi4u Li4ueHguIgorICAgICAgIi4uLi4ueHguIgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4u Lnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfYmFja3NsYXNoX2JpdHNbXSA9ewor ICAweGMwLCAweGMwLCAweGUwLCAweDYwLCAweDMwLCAweDMwLCAweDE4LCAweDE4LCAweGMsIDB4 YywgMHg2LCAweDYsIDB4MywgMHgzfTsKKworLyogMzIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieHguLi4uLi4iCisgICAgICAieHguLi4uLi4iCisgICAgICAieHh4 Li4uLi4iCisgICAgICAieHh4Li4uLi4iCisgICAgICAieC54eC4uLi4iCisgICAgICAieC54eC4u Li4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4i CisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisgICAgICAieC4uLi54eC4iCisg ICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoX2JpdHNbXSA9eworICAweGMwLCAweGMwLCAw eGUwLCAweGUwLCAweGIwLCAweGIwLCAweDk4LAorICAweDk4LCAweDhjLCAweDhjLCAweDg2LCAw eDg2LCAweDgzLCAweDgzfTsKKworLyogMzMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAiLnh4eHh4eC4iCisgICAgICAieHh4eC54Li4iCisgICAgICAieHh4eC54Li4i CisgICAgICAieHh4eC54Li4iCisgICAgICAiLnh4eC54Li4iCisgICAgICAiLi4ueC54Li4iCisg ICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iCisgICAg ICAiLi4ueC54Li4iCisgICAgICAiLi4ueC54Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9y dCBtY19waWxjcm93X2JpdHNbXSA9eworICAweDdlLCAweGY0LCAweGY0LCAweGY0LCAweDc0LCAw eDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0LCAweDE0fTsKKworLyogMzQKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54eHh4Li4iCisgICAgICAiLnh4eHh4eC4i CisgICAgICAieC4ueHguLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieHh4eHh4eHgiCisg ICAgICAieHguLi4ueHgiCisgICAgICAieHh4Li54eHgiCisgICAgICAiLnh4eHh4eC4iCisgICAg ICAiLi54eHh4Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zbWlsZXlfZmFjZV9i aXRzW10gPXsKKyAgMHgzYywgMHg3ZSwgMHg5OSwgMHg5OSwgMHhmZiwgMHhjMywgMHhlNywgMHg3 ZSwgMHgzY307CisKKy8qIDM1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgIi4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAg Ii4uLi4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4u eC4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX3JpZ2h0 X2JpdHNbXSA9eworICAweDIwLCAweDEwLCAweDgsIDB4NCwgMHg4LCAweDEwLCAweDIwfTsKKwor LyogMzYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi54Li4i CisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54Li4uLi4iCisg ICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4uLi54Li4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAg MHg0LCAweDgsIDB4MTAsIDB4MjAsIDB4MTAsIDB4OCwgMHg0fTsKKworLyogMzcKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4 Li4iCisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4i CisgICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfcmlnaHRfYml0c1tdID17CisgIDB4ZDgsIDB4NmMsIDB4 MzYsIDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDh9OworCisvKiAzOAorICAgICgrLWZyaW5nZS1oZWxw ZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAg ICIueHgueHguLiIKKyAgICAgICJ4eC54eC4uLiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICIu Lnh4Lnh4LiIKKyAgICAgICIuLi54eC54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1j X2RvdWJsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDFiLCAweDM2LCAweDZjLCAweGQ4LCAw eDZjLCAweDM2LCAweDFifTsKKworLyogMzkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4i CisgICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisg ICAgICAieC54LnguLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5n bGVfcmlnaHRfYml0c1tdID17CisgIDB4YTgsIDB4NTQsIDB4MmEsIDB4MTUsIDB4MmEsIDB4NTQs IDB4YTh9OworCisvKiA0MAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAg ICIuLi54LngueCIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICJ4 LngueC4uLiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIuLi54 LngueCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV9sZWZ0X2Jp dHNbXSA9eworICAweDE1LCAweDJhLCAweDU0LCAweGE4LCAweDU0LCAweDJhLCAweDE1fTsKKwor LyogNDEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4i CisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisg ICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19zaW5nbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4 MTAsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiA0Mgor ICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAg ICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4 Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54 Li4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4u LiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Npbmds ZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDgyLCAw eDQ0LCAweDI4LCAweDEwLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDMKKyAgICAo Ky1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54Lngu Li4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19kb3VibGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4 MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODIsIDB4MDAsIDB4MDAsIDB4MDB9 OworCisvKiA0NAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4u Li4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54 LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAg ICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLwor c3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAw eDAwLCAweDAwLCAweDAwLCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEw LCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDUKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54Lngu Li4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4i CisgICAgICAiLnguLi54Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLi4uLi4uLi4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfdXBfYml0c1tdID17CisgIDB4 MDAsIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQs IDB4ODIsIDB4MDB9OworCisvKiA0NgorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLi4uLi4uLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAg ICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIu LngueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGlj IHVuc2lnbmVkIHNob3J0IG1jX3F1YWRydXBsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDAw LCAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAw eDEwLCAweDAwfTsKKworLyogNDcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAieC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi eC4ueC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLnguLi54Li4iCisgICAgICAieC4uLi4u eC4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfdXBfYml0 c1tdID17CisgIDB4MTAsIDB4MjgsIDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4OTIsIDB4Mjgs IDB4NDQsIDB4OTIsIDB4MjgsIDB4NDQsIDB4ODJ9OworCisvKiA0OAorICAgICgrLWZyaW5nZS1o ZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIueC4uLnguLiIKKyAg ICAgICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICIuLngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIu LngueC4uLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIuLi54Li4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Ry aXBsZV9hbmdsZV9kb3duX2JpdHNbXSA9eworICAweDgyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0 LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDkyLCAweDQ0LCAweDI4LCAweDEwfTsKKwogLyog Tk9URTogIFRoZSBvcmRlciBvZiB0aGVzZSBiaXRtYXBzIG11c3QgbWF0Y2ggdGhlIHNlcXVlbmNl CiAgICB1c2VkIGluIGZyaW5nZS5lbCB0byBkZWZpbmUgdGhlIGNvcnJlc3BvbmRpbmcgc3ltYm9s cy4gICovCiAKQEAgLTQ2Nyw4ICs5MjEsMTA3NCBAQCBzdGF0aWMgc3RydWN0IGZyaW5nZV9iaXRt YXAgc3RhbmRhcmRfYml0bWFwc1tdID0KICAgeyBGUkJJVFMgKHZlcnRpY2FsX2Jhcl9iaXRzKSwg ICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAogICB7IEZSQklUUyAoaG9yaXpv bnRhbF9iYXJfYml0cyksICAgICA4LCAwLCBBTElHTl9CSVRNQVBfQk9UVE9NLCAwIH0sCiAgIHsg RlJCSVRTIChlbXB0eV9saW5lX2JpdHMpLCAgICAgICAgIDgsIDMsIEFMSUdOX0JJVE1BUF9UT1As ICAgIDAgfSwKKworICAvKiAyNCAqLworICB7RlJCSVRTIChtY192ZXJ0aWNhbF9iYXJfcmlnaHRf YXJyb3dfYml0cyksIDgsIDAsIEFMSUdOX0JJVE1BUF9DRU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gIHsKKyAgICBpZiAoKGJtMSA9IFhDRFIgKGJtMSkp LCBOSUxQIChibTEpKQorICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgaWYg KENPTlNQIChibTEpKQorICAgICAgeworICAgICAgICBsbjEgPSBYRklYTlVNIChGbGVuZ3RoIChi bTEpKTsKKyAgICAgICAgaWYgKHBhcnRpYWxfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBp ZiAobG4xID4gaXgyKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYm0gPSBtY19u dGggKGl4MiwgYm0xKTsKKyAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAg ICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAg ICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmIChsbjEgPiBpeDEpCisgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOworICAg ICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAgICBnb3RvIGZv dW5kOworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorICAgIGVsc2UgaWYg KChibSA9IGJtMSwgIUVRIChibSwgUXQpKSkKKyAgICAgIGdvdG8gZm91bmQ7CisgIH0KKyAgICB9 CisgIGlmICghRVEgKGNtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0 b3JfYWxpc3QpKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5n ZV9pbmRpY2F0b3JfYWxpc3QpKSkKKyAgICB7CisgICAgICBibTIgPSBtY19hc3NxIChiaXRtYXAs IEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsKKyAgICAg IGlmIChDT05TUCAoYm0yKSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgoYm0yID0gWENEUiAo Ym0yKSksICFOSUxQIChibTIpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoQ09O U1AgKGJtMikpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgbG4yID0gWEZJ WE5VTSAoRmxlbmd0aCAoYm0yKSk7CisgICAgICAgICAgICAgICAgICBpZiAocGFydGlhbF9wKQor ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgaWYgKGxuMiA+IGl4 MikKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg Ym0gPSBtY19udGggKGl4MiwgYm0yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFF USAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAg ICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBpZiAobG4xID4gaXgx KQorICAgIHsKKyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICBpZiAoIUVRIChi bSwgUXQpKQorICAgICAgICBnb3RvIGZvdW5kOworICAgIH0KKyAgaWYgKGxuMiA+IGl4MSkKKyAg ICB7CisgICAgICBibSA9IG1jX250aCAoaXgxLCBibTIpOworICAgICAgaWYgKCFFUSAoYm0sIFF0 KSkKKyAgICAgICAgZ290byBmb3VuZDsKKyAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQ OworICAgIH0KKyAgICBlbHNlIGlmICgoYm0gPSBibTIsIE5JTFAgKGJtKSkpCisgICAgICByZXR1 cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgZm91bmQ6CisgIHJldH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MSkpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAoKGJtMSA9IFhD RFIgKGJtMSkpLCBOSUxQIChibTEpKQorICAgICAgICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9C SVRNQVA7CisgICAgICAgICAgaWYgKENPTlNQIChibTEpKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBsbjEgPSBYRklYTlVNIChGbGVuZ3RoIChibTEpKTsKKyAgICAgICAgICAgICAgaWYg KHBhcnRpYWxfcCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAobG4x ID4gaXgyKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgYm0g PSBtY19udGggKGl4MiwgYm0xKTsKKyAgICAgICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwg UXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmIChsbjEgPiBpeDEpCisgICAgICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOwor ICAgICAgICAgICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAg ICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoKGJtID0gYm0xLCAhRVEg KGJtLCBRdCkpKQorICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICB9CisgICAgfQor ICBpZiAoIUVRIChjbWFwLCBCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9y X2FsaXN0KSkKKyAgICAgICYmICFOSUxQIChCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2Vf aW5kaWNhdG9yX2FsaXN0KSkpCisgICAgeworICAgICAgYm0yID0gbWNfYXNzcSAoYml0bWFwLCBC VkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSk7CisgICAgICBp ZiAoQ09OU1AgKGJtMikpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAoKGJtMiA9IFhDRFIgKGJt MikpLCAhTklMUCAoYm0yKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKENPTlNQ IChibTIpKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGxuMiA9IFhGSVhO VU0gKEZsZW5ndGggKGJtMikpOworICAgICAgICAgICAgICAgICAgaWYgKHBhcnRpYWxfcCkKKyAg ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGlmIChsbjIgPiBpeDIp CisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGJt ID0gbWNfbnRoIChpeDIsIGJtMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghRVEg KGJtLCBRdCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgaWYgKGxuMSA+IGl4MSkK KyAgICB7CisgICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOworICAgICAgaWYgKCFFUSAoYm0s IFF0KSkKKyAgICAgICAgZ290byBmb3VuZDsKKyAgICB9CisgIGlmIChsbjIgPiBpeDEpCisgICAg eworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0yKTsKKyAgICAgIGlmICghRVEgKGJtLCBRdC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gICAgICAgICBpZiAocG9zID0g bWNfYXNzcSAoUXQsIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAgICAgYm91bmRhcnlfdG9w ID0gYm91bmRhcnlfYm90ID0gYXJyb3dfdG9wID0gYXJyb3dfYm90ID0gWENEUiAocG9zKTsKKyAg ICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAoUXRvcCwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAg ICAgICAgICBib3VuZGFyeV90b3AgPSBYQ0RSIChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBt Y19hc3NxIChRYm90dG9tLCBpbmQpLCAhTklMUCAocG9zKSkKKyAgICAgICAgICAgIGJvdW5kYXJ5 X2JvdCA9IFhDRFIgKHBvcyk7CisgICAgICAgICAgaWYgKHBvcyA9IG1jX2Fzc3EgKFF1cCwgaW5k KSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBhcnJvd190b3AgPSBYQ0RSIChwb3MpOworICAg ICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRZG93biwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAg ICAgICAgICBhcnJvd19ib3QgPSBYQ0RSIChwb3MpOworICAgICAgICB9CisgICAgICAgIGVsc2UK KyAgICAgICAgICAvKiBBbnl0aGluZyBlbHNlIG1lYW5zIGJvdW5kYXJ5IG9uIGxlZnQgYW5kIG5v IGFycm93cy4gICovCisgICAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90ID0gUWxl ZnQ7CisgICAgfQorICB0b3BfaW5kX3JuID0gYm90X2luZF9ybiA9IC0xOworICBpZiAoIU5JTFAg KGluZCkpCisgICAgeworICAgICAgZm9yICh5ID0gdy0+dnNjcm9sbCwgcm4gPSAwOworICAgICAg ICAgICB5IDwgeWIgJiYgcm4gPCBucm93czsKKyAgICAgICAgICAgeSArPSByb3ctPmhlaWdodCwg KytybikKKyAgICAgICAgeworICAgICAgICAgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dz ICsgcm47CisgICAgICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIHJvdyA9 IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgcm93LT5pbmRpY2F0ZV9i b2JfcCA9IHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCA9IDA7CisgICAgICAgICAgcm93LT5pbmRp Y2F0ZV9lb2JfcCA9IHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCA9IDA7CisgICAgICAgICAg aWYgKCFyb3ctPm1vZGVfbGluZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAo dG9wX2luZF9ybiA8IDAgJiYgcm93LT52aXNpYmxlX2hlaWdodCA+IDApCisgICAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93 KSA8PSBCVUZfQkVHViAoWEJVRkZFUiAody0+Y29udGVudHMpKQorICAgICAgICAgICAgICAgICAg ICAgICYmICFNQVRSSVhfUk9XX1BBUlRJQUxMWV9WSVNJQkxFX0FUX1RPUF9QICh3LCByb3cpKQor ICAgICAgICAgICAgICAgICAgICByb3ctPmluZGljYXRlX2JvYl9wID0gIU5JTFAgKGJvdW5kYXJ5 X3RvcCk7CisgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICBy b3ctPmluZGljYXRlX3RvcF9saW5lX3AgPSAhTklMUCAoYXJyb3dfdG9wKTsKKyAgICAgICAgICAg ICAgICAgIHRvcF9pbmRfcm4gPSBybjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg IGlmIChib3RfaW5kX3JuIDwgMCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICBpZiAoTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA+PSBCVUZfWlYgKFhCVUZGRVIgKHct PmNvbn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T5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBRbGVmdCkpCisgICAg ICAgICAgICAgICAgICA/IE1DX0xFRlRfRlJJTkdFICgxLCBRdG9wX2JvdHRvbSwgcm93LT5lbmRz X2F0X3p2X3ApCisgICAgICAgICAgICAgICAgICA6IE1DX0xFRlRfRlJJTkdFICgyLCBRdG9wLCAw KSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGJuID0gKChyb3ctPmluZGljYXRl X2VvYl9wICYmIEVRIChib3VuZGFyeV9ib3QsIFFyaWdodCkpCisgICAgICAgICAgICAgICAgICAg ID8gTUNfUklHSFRfRlJJTkdFICgxLCBRdG9wX2JvdHRvbSwgcm93LT5lbmRzX2F0X3p2X3ApCisg ICAgICAgICAgICAgICAgICAgIDogTUNfUklHSFRfRlJJTkdFICgyLCBRdG9wLCAwKSk7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV90b3BfbGluZV9wKQorICAgICAg ICAgIHsKKyAgICAgICAgICAgIGlmIChFUSAoYXJyb3dfdG9wLCBRbGVmdCkpCisgICAgICAgICAg ICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDYsIFF1cCwgMCk7CisgICAgICAgICAgICAgIGVsc2UK KyAgICAgICAgICAgICAgICBibiA9IE1DX1JJR0hUX0ZSSU5HRSAoNiwgUXVwLCAwKTsKKyAgICAg ICAgICB9CisgICAgICBpZiAoYm4gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgewor ICAgICAgICAgIHN0cnVjdCBmcmluZ2VfYml0bWFwICpmYiA9IGdldF9mcmluZ2VfYml0bWFwX2Rh dGEgKGJuKTsKKyAgICAgICAgICBpZiAoZmItPmFsaWduID09IEFMSUdOX0JJVE1BUF9UT1AgJiYg ZmItPnBlcmlvZCA9PSAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5 cGhfcm93ICpyb3cxOworICAgICAgICAgICAgICBpbnQgdG9wX2luZF9tYXhfeTsKKyAgICAgICAg ICAgICAgdG9wX2luZF9taW5feSA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAg ICAgICAgICAgICB0b3BfaW5kX21heF95ID0gdG9wX2luZF9taW5feSArIGZiLT5oZWlnaHQ7Cisg ICAgICAgICAgICAgIGlmICh0b3BfaW5kX21heF95ID4geWIpCisgICAgICAgICAgICAgICAgdG9w X2luZF9tYXhfeSA9IHliOworICAgICAgICAgICAgICBmb3IgKHkgPSByb3ctPnkgKyByb3ctPmhl aWdodCwgcm4gPSB0b3BfaW5kX3JuICsgMTsKKyAgICAgICAgICAgICAgICAgICB5IDwgdG9wX2lu ZF9tYXhfeSAmJiBybiA8IG5yb3dzOworICAgICAgICAgICAgICAgICAgIHkgKz0gcm93MS0+aGVp Z2h0LCBybisrKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmIChib3Rf aW5kX3JuID49IDAgJiYgcm4gPj0gYm90X2luZF9ybikKKyAgICAgICAgICAgICAgICAgICAgYnJl YWs7CisgICAgICAgICAgICAgICAgICByb3cxID0gdy0+ZGVzaXJlZF9tYXRyaXgtPnJvd3MgKyBy bjsKKyAgICAgICAgICAgICAgICAgIGlmICghcm93MS0+ZW5hYmxlZF9wKQorICAgICAgICAgICAg ICAgICAgICByb3cxID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyBybjsKKyAgICAgICAgICAg ICAgICAgIHJvdzEtPmluZGljYXRlX2JvYl9wID0gcm93LT5pbmRpY2F0ZV9ib2JfcDsKKyAgICAg ICAgICAgICAgICAgIHJvdzEtPmluZGljYXRlX3RvcF9saW5lX3AgPSByb3ctPmluZGljYXRlX3Rv cF9saW5lX3A7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgfQorICBpZiAoYm90X2luZF9ybiA+PSAwKQorICAgIHsKKyAgICAgIGludCBibiA9IE1DX05P X0ZSSU5HRV9CSVRNQVA7CisgICAgICByb3cgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIGJv dF9pbmRfcm47CisgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICByb3cgPSB3LT5j dXJyZW50X21hdHJpeC0+cm93cyArIGJvdF9pbmRfcm47CisgICAgICBib3Rfcm93X2VuZHNfYXRf enZfcCA9IHJvdy0+ZW5kc19hdF96dl9wOworICAgICAgaWYgKHJvdy0+aW5kaWNhdGVfZW9iX3Ap CisgICAgICAgIHsKKyAgICAgICAgICBpZiAoRVEgKGJvdW5kYXJ5X2JvdCwgUWxlZnQpKQorICAg ICAgICAgICAgYm4gPSBNQ19MRUZUX0ZSSU5HRSAoMywgUWJvdHRvbSwgcm93LT5lbmRzX2F0X3p2 X3ApOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBibiA9IE1DX1JJR0hUX0ZSSU5H RSAoMywgUWJvdHRvbSwgcm93LT5lbmRzX2F0X3p2X3ApOworICAgICAgICB9CisgICAgICAgIGVs c2UgaWYgKHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBpZiAoRVEgKGFycm93X2JvdCwgUWxlZnQpKQorICAgICAgICAgICAgICBibiA9IE1DX0xF RlRfRlJJTkdFICg3LCBRZG93biwgMCk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg ICAgICBibiA9IE1DX1JJR0hUX0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgIH0KKyAg ICAgIGlmIChibiAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICB7CisgICAgICAgICAg c3RydWN0IGZyaW5nZV9iaXRtYXAgKmZiID0gZ2V0X2ZyaW5nZV9iaXRtYXBfZGF0YSAoYm4pOwor ICAgICAgICAgIGlmIChmYi0+YWxpZ24gPT0gQUxJR05fQklUTUFQX0JPVFRPTSAmJiBmYi0+cGVy aW9kID09IDApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cg KnJvdzE7CisgICAgICAgICAgICAgIGludCBib3RfaW5kX21pbl95OworICAgICAgICAgICAgICBi b3RfaW5kX21heF95ID0gcm93LT55ICsgcm93LT52aXNpYmxlX2hlaWdodDsKKyAgICAgICAgICAg ICAgYm90X2luZF9taW5feSA9IGJvdF9pbmRfbWF4X3kgLSBmYi0+aGVpZ2h0OworICAgICAgICAg ICAgICBpZiAoYm90X2luZF9taW5feSA8IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpKQor ICAgICAgICAgICAgICAgIGJvdF9pbmRfbWluX3kgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hU ICh3KTsKKyAgICAgICAgICAgICAgZm9yICh5ID0gcm93LT55LCBybiA9IGJvdF9pbmRfcm4gLSAx OworICAgICAgICAgICAgICAgICAgIHkgPj0gYm90X2luZF9taW5feSAmJiBybiA+PSAwOworICAg ICAgICAgICAgICAgICAgIHkgLT0gcm93MS0+aGVpZ2h0LCBybi0tKQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgIGlmICh0b3BfaW5kX3JuID49IDAgJiYgcm4gPD0gdG9wX2lu ZF9ybikKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICByb3cx ID0gdy0+ZGVzaXJlZF9tYXRyaXgtPnJvd3MgKyBybjsKKyAgICAgICAgICAgICAgICAgIGlmICgh cm93MS0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICAgICAgICByb3cxID0gdy0+Y3VycmVudF9t YXRyaXgtPnJvd3MgKyBybjsKKyAgICAgICAgICAgICAgICAgIHJvdzEtPmluZGljYXRlX2VvYl9w ID0gcm93LT5pbmRpY2F0ZV9lb2JfcDsKKyAgICAgICAgICAgICAgICAgIHJvdzEtPmluZGljYXRl X2JvdHRvbV9saW5lX3AgPSByb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3A7CisgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBMaXNwX09iamVjdCBi dWYgPSB3LT5jb250ZW50czsKKyAgQ0hFQ0tfQlVGRkVSIChidWYpOworICBib29sIGF1dG9faHNj cm9sbF9tb2RlX3AgPSBFUSAoRmJ1ZmZlcl9sb2NhbF92YWx1ZSAoUWF1dG9faHNjcm9sbF9tb2Rl LCBidWYpLCBRY3VycmVudF9saW5lKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1KSAq LworICBib29sIGhzY2xfYWxsX3RlbXBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFu ZCBkbyBub3RoaW5nLiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMF9wID0gKHctPnN1c3BlbmRf YXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xs X21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7Cisg IC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyBlbHNlIGJlc2lkZXMgaG9y aXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAgICAgICAgICAgICAgIGN1cnJlbnQgbGluZSBkaWZm ZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFs bHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8xX3AgPSAo IXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg YXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhz Y3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwg PiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+ aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIC4uLgorICAgICAgICAgICAg ICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRs eS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3Jv bGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA9PSAwCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1Q TEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0aGUgbGVmdCBhcnJvdyBrZXkg b25lIHRpbWUuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkg c2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAgYm9vbCBoc2NsX3RlbXBfcCA9ICghdy0+c3VzcGVu ZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9k ZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBD LXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBjdXJyZW50IGxpbmUgdG8gYmUK KyAgICAgICAgICAgICAgIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4KKyAgICAg ICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJl bnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1fcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwK KyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9s bCAhPSB3LT5oc2Nyb2xsKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7 CisgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJuID0gMDsKKyAgICAgICB5IDwgeWIgJiYgcm4gPCBu cm93czsKKyAgICAgICB5ICs9IHJvdy0+aGVpZ2h0LCBybisrKQorICAgIHsKKyAgaW50IGxlZnQs IHJpZ2h0OworICB1bnN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ID09IHZudGhfY20pCisg ICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAg ICAgICAgJiYgIWhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICYmICFoc2NsX3RlbXBfcAorICAg ICAgICAgICYmICFoc2NsX3Blcm1fcAorICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzBfcAor ICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAgICYmICFoc2NsX2FsbF9w ZXJtXzJfcAorICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIGlu dCBmcmluZ2VfYml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICBlbnVtIGZh Y2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICghYWN0aXZlX3AKKyAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9pbmFj dGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBp bnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1ZSkKKyAg ICAgICAgICAgIDogKGFjdGl2ZV9wKQorICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctcHJlLXp2LWZhY2UiKSwgdHJ1ZSkKKyAg ICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2Zh Y2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAg ICAgIGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNf Z2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJvdyIpLCBmYWxzZSwg dHJ1ZSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBt Y19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFycm93IiksIHRydWUs IHRydWUpOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9 PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoKHZwb3Mg PT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgICAgICAgICYmIGdseXBo X2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUAorICAgICAgICAgICAgICAgICAmJiAo aHNjbF9hbGxfdGVtcF9wCisgICAgICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBf cAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8xX3AKKyAgICAgICAgICAg ICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgICAgICAgICAgICB8fCBo c2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJtX3ApCisgICAgICAg ICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgZnJp bmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgICBlbnVtIGZhY2Vf aWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICAgKCFhY3RpdmVfcAorICAg ICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfaW5h Y3RpdmVfd2luZG93cykpKQorICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBm LCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0 cnVlKQorICAgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICA/IGxvb2t1 cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1wcmUtenYt ZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAg ICAgIG1jX2xlZnRfZnJpbmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklO R0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG92ZXJs YXlfYXJyb3dfZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAgIGlmIChoc2NsX2FsbF9wZXJtXzBfcCkKKyAg ICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRl cm4gKCIrLWhzY2wtcGVybSIpLCBmYWxzZSwgZmFsc2UpOworICAgICAgICAgICAgICBlbHNlIGlm IChoc2NsX2FsbF9wZXJtXzFfcCkKKyAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNf Z2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUsIGZhbHNl KTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzJfcCkKKyAgICAgICAg ICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJu ICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIHRydWUpOworICAgICAgICAgICAgICAgICAgZWxzZSBp ZiAoaHNjbF9wZXJtX3ApCisgICAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19n ZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgdHJ1ZSk7 CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkKKyAgICAgICAg ICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGlu dGVybiAoIistaHNjbC10ZW1wIiksIGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAgICAgICAgICAg ICAgZWxzZSBpZiAoaHNjbF90ZW1wX3ApCisgICAgICAgICAgICAgICAgICAgICAgICBmcmluZ2Vf Yml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10ZW1wIiks IHRydWUsIGZhbHNlKTsKKyAgICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJz b3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIH0KKyAgICAgICAg ICBlbHNlIGlmICgodnBvcyA9PSB2bnRoX2RtIHx8IHZwb3MgPT0gdm50aF9jbSkKKyAgICAgICAg ICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hU X0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVW RVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAg ICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAgICAgICAg ICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBo X2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAg ICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExP V19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVW RVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3RhbmdsZV9y aWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Z2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVS U0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3Jl dmVyc2VkX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jh cl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog UW5pbDsKKyAgICAgICAgICAgICAgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlw ZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2b3IpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQ OworICAgICAgICAgICAgICBtY19yaWdodF9mcmluZ2VfZmFjZV9pZCA9CisgICAgICAgICAgICAg ICAgKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAg ICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVgorICAgICAgICAgICAgICAgICAmJiAoZ2x5cGhf Zmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBN Q19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2UiKSwgdHJ1 ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklU TUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWCisgICAgICAg ICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFO R0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9 PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikpCisgICAg ICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVy c2VkLWJhci1hdC16di1mYWNlIiksIHRydWUpCisgICAgICAgICAgICAgICAgOiAoY3Vyc29yX3R5 cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICYmIHJvd19w b3NpdGlvbiA9PSBQT1NUX1pWCisgICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9 PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAg ICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JF VkVSU0VEX1ZFUlRJQ0FMX0JBUikpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9m YWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UiKSwgdHJ1ZSkK KyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQ CisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVgorICAgICAgICAg ICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xF X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JF VkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGds eXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAg ICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJhci1wcmUtenYtZmFjZSIp LCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5H RV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gQVRfWlYKKyAg ICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9MTE9XX1JF Q1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAh PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAg ICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAg ICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1iYXItYXQtenYt ZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hU X0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUE9T VF9aVgorICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9I T0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhf Zmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAg ICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisg ICAgICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJh ci1wb3N0LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9J RDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkK KyAgICAgICAgcm93ID0gY3VyOworICAgICAgbGVmdF9mYWNlX2lkID0gcmlnaHRfZmFjZV9pZCA9 IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgIGxlZnRfb2Zmc2V0ID0gcmlnaHRfb2Zmc2V0ID0gMDsK KyAgICAgIHBlcmlvZGljX3AgPSAwOworICAgICAgLyogRGVjaWRlIHdo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NldCA9IHRvcF9pbmRfbWluX3kgLSByb3ctPnk7CisgICAgICAgIH0K KyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW9iX3AgJiYgRVEgKGJvdW5kYXJ5X2JvdCwg UWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICgzLCBR Ym90dG9tLCBib3Rfcm93X2VuZHNfYXRfenZfcCk7CisgICAgICAgICAgaWYgKGJvdF9pbmRfbWF4 X3kgPj0gMCkKKyAgICAgICAgICAgIGxlZnRfb2Zmc2V0ID0gYm90X2luZF9tYXhfeSAtIChyb3ct PnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAoKCFy b3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChyb3cpKQor ICAgICAgICAgICAgICAgfHwgKHJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmNvbnRpbnVlZF9wKSkK KyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg0LCBRY29udGludWF0aW9uLCAwKTsKKyAg ICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW1wdHlfbGluZV9wICYmIEVRIChlbXB0eV9wb3Ms IFFsZWZ0KSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg1LCBRZW1wdHlfbGluZSwg MCk7CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9saW5lX3AgJiYgRVEgKGFycm93 X3RvcCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdF ICg2LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5kX21pbl95ID49IDApCisgICAgICAg ICAgICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kgLSByb3ctPnk7CisgICAgICAgIH0KKyAg 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ICAgICBlbHNlIGlmIChyb3ctPmluZGlj YXRlX2JvYl9wICYmIEVRIChib3VuZGFyeV90b3AsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAg ICAgICByaWdodCA9ICgocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBR cmlnaHQpKQorICAgICAgICAgICAgID8gTUNfUklHSFRfRlJJTkdFICgxLCBRdG9wX2JvdHRvbSwg dG9wX3Jvd19lbmRzX2F0X3p2X3ApCisgICAgICAgICAgICAgOiBNQ19SSUdIVF9GUklOR0UgKDIs IFF0b3AsIDApKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5feSA+PSAwKQorICAgICAgICAg ICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAgICAgfQorICAg ICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBRcmln aHQpKQorICAgICAgICB7CisgICAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0UgKDMsIFFi b3R0b20sIGJvdF9yb3dfZW5kc19hdF96dl9wKTsKKyAgICAgICAgICBpZiAoYm90X2luZF9tYXhf eSA+PSAwKQorICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gYm90X2luZF9tYXhfeSAtIChyb3ct PnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAoKCFy b3ctPnJldmVyc2VkX3AgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgIHx8IChy b3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChyb3cpKSkK KyAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0UgKDQsIFFjb250aW51YXRpb24sIDApOwor ICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV90b3BfbGluZV9wICYmIEVRIChhcnJvd190b3As IFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hUX0ZSSU5HRSAo NiwgUXVwLCAwKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5feSA+PSAwKQorICAgICAgICAg ICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAgICAgfQorICAg ICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wICYmIEVRIChhcnJvd19ib3Qs IFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hUX0ZSSU5HRSAo NywgUWRvd24sIDApOworICAgICAgICAgIGlmIChib3RfaW5kX21heF95ID49IDApCisgICAgICAg ICAgICByaWdodF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+dmlzaWJs ZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX2VtcHR5 X2xpbmVfcCAmJiBFUSAoZW1wdHlfcG9zLCBRcmlnaHQpKQorICAgICAgICByaWdodCA9IE1DX1JJ R0hUX0ZSSU5HRSAoNSwgUWVtcHR5X2xpbmUsIDApOworICAgICAgZWxzZQorICAgICAgICByaWdo dCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICBwZXJpb2RpY19wID0gKGdldF9mcmluZ2Vf Yml0bWFwX2RhdGEgKGxlZnQpLT5wZXJpb2QgIT0gMAorICAgICAgICAgICAgICAgICAgICB8fCBn ZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChyaWdodCktPnBlcmlvZCAhPSAwKTsKKyAgICAgIGlmIChy b3ctPnkgIT0gY3VyLT55CisgICAgICAgICAgfHwgcm93LT52aXNpYmxlX2hlaWdodCAhPSBjdXIt PnZpc2libGVfaGVpZ2h0CisgICAgICAgICAgfHwgcm93LT5lbmRzX2F0X3p2X3AgIT0gY3VyLT5l bmRzX2F0X3p2X3AKKyAgICAgICAgICB8fCBsZWZ0ICE9IGN1ci0+bGVmdF9mcmluZ2VfYml0bWFw CisgICAgICAgICAgfHwgcmlnaHQgIT0gY3VyLT5yaWdodF9mcmluZ2VfYml0bWFwCisgICAgICAg ICAgfHwgbGVmdF9mYWNlX2lkICE9IGN1ci0+bGVmdF9mcmluZ2VfZmFjZV9pZAorICAgICAgICAg IHx8IHJpZ2h0X2ZhY2VfaWQgIT0gY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZAorICAgICAgICAg IHx8IGxlZnRfb2Zmc2V0ICE9IGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0CisgICAgICAgICAgfHwg cmlnaHRfb2Zmc2V0ICE9IGN1ci0+cmlnaHRfZnJpbmdlX29mZnNldAorICAgICAgICAgIHx8IHBl cmlvZGljX3AgIT0gY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AKKyAgICAgICAgICB8fCBj dXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wKQorICAgICAgICB7CisgICAgICAgICAgcmVkcmF3 X3AgPSAxLCByb3ctPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICBpZiAo IWtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjdXItPnJlZHJh d19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICAgICAgaWYgKG1jX2xlZnRfZnJpbmdl X2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICB8fCBtY19y aWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAg ICAgY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9 IHBlcmlvZGljX3A7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0g TUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2Jp dG1hcCA9IG1jX2xlZnRfZnJpbmdlX2JpdG1hcDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2JpdG1hcCA9IGxlZnQ7CisgICAgICAgICAg ICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAg ICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2ZhY2VfaWQgPSBtY19sZWZ0X2ZyaW5nZV9m YWNlX2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+bGVm dF9mcmluZ2VfZmFjZV9pZCA9IGxlZnRfZmFjZV9pZDsKKyAgICAgICAgICAgICAgaWYgKG1jX2xl ZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAg IGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX29mZnNldCA9IGxlZnRfb2Zmc2V0OworICAg ICAgICAgICAgICBpZiAobWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklU TUFQKQorICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IG1jX3JpZ2h0 X2ZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAg Y3VyLT5yaWdodF9mcmluZ2VfYml0bWFwID0gcmlnaHQ7CisgICAgICAgICAgICAgIGlmIChtY19y aWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAg ICAgY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IG1jX3JpZ2h0X2ZyaW5nZV9mYWNlX2lkOwor ICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdl X2ZhY2VfaWQgPSByaWdodF9mYWNlX2lkOworICAgICAgICAgICAgICBpZiAobWNfcmlnaHRfZnJp bmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+ cmlnaHRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gcmlnaHRfb2Zmc2V0OworICAgICAg ICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCA8 IDApCisgICAgICAgIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgPSBtY19nZXRfbG9naWNhbF9m cmluZ2VfYml0bWFwICh3LCBRb3ZlcmxheV9hcnJvdywgMCwgMCk7CisgICAgICBpZiAocm93LT5v dmVybGF5X2Fycm93X2JpdG1hcCAhPSBjdXItPm92ZXJsYXlfYXJyb3dfYml0bWFwKQorICAgICAg ICB7CisgICAgICAgICAgcmVkcmF3X3AgPSAxLCByb3ctPnJlZHJhd19mcmluZ2VfYml0bWFwc19w ID0gMTsKKyAgICAgICAgICBpZiAoIWtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICBjdXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICAg ICAgY3VyLT5vdmVybGF5X2Fycm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ICAgZHJhd24uCisgICBMRUZUX1AgaXMgMSBmb3IgbGVmdCBmcmluZ2UsIDAgZm9yIHJpZ2h0IGZy aW5nZS4KKyovCitzdGF0aWMgdm9pZAorbWNfZHJhd19mcmluZ2VfYml0bWFwXzEgKHN0cnVjdCB3 aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IGxlZnRfcCwgaW50IG92ZXJsYXks IGludCB3aGljaCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUg KHcpKTsKKyAgc3RydWN0IGRyYXdfZnJpbmdlX2JpdG1hcF9wYXJhbXMgcDsKKyAgc3RydWN0IGZy aW5nZV9iaXRtYXAgKmZiOworICBpbnQgcGVyaW9kOworICBpbnQgZmFjZV9pZCA9IERFRkFVTFRf RkFDRV9JRDsKKyAgaW50IG9mZnNldCwgaGVhZGVyX2xpbmVfaGVpZ2h0OworICBwLm92ZXJsYXlf cCA9IChvdmVybGF5ICYgMSkgPT0gMTsKKyAgcC5jdXJzb3JfcCA9IChvdmVybGF5ICYgMikgPT0g MjsKKyAgaWYgKHdoaWNoICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgeworICAgICAgb2Zm c2V0ID0gMDsKKyAgICB9CisgICAgZWxzZSBpZiAobGVmdF9wKQorICAgICAgeworICAgICAgICB3 aGljaCA9IHJvdy0+bGVmdF9mcmluZ2VfYml0bWFwOworICAgICAgICBmYWNlX2lkID0gcm93LT5s ZWZ0X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICBvZmZzZXQgPSByb3ctPmxlZnRfZnJpbmdlX29m ZnNldDsKKyAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAgIHdoaWNoID0g cm93LT5yaWdodF9mcmluZ2VfYml0bWFwOworICAgICAgICAgIGZhY2VfaWQgPSByb3ctPnJpZ2h0 X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICAgIG9mZnNldCA9IHJvdy0+cmlnaHRfZnJpbmdlX29m ZnNldDsKKyAgICAgICAgfQorICBpZiAoZmFjZV9pZCA9PSBERUZBVUxUX0ZBQ0VfSUQpCisgICAg eworICAgICAgTGlzcF9PYmplY3QgZmFjZSA9IGZyaW5nZV9mYWNlc1t3aGljaF07CisgICAgICBm YWNlX2lkID0gTklMUCAoZmFjZSkgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgUWZyaW5nZSwg ZmFsc2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBsb29rdXBfZGVyaXZlZF9mYWNl ICh3LCBmLCBmYWNlLCBGUklOR0VfRkFDRV9JRCwgMCk7CisgICAgICBpZiAoZmFjZV9pZCA8IDAp CisgICAgICAgIGZhY2VfaWQgPSBGUklOR0VfRkFDRV9JRDsKKyAgICB9CisgIGZiID0gZ2V0X2Zy aW5nZV9iaXRtYXBfZGF0YSAod2hpY2gpOworICBwZXJpb2QgPSBmYi0+cGVyaW9kOworICAvKiBD b252ZXJ0IHJvdyB0byBmcmFtZSBjb29yZGluYXRlcy4gICovCisgIHAueSA9IFdJTkRPV19UT19G UkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpICsgb2Zmc2V0OworICBwLndoaWNoID0gd2hpY2g7Cisg IHAuYml0cyA9IGZiLT5iaXRzOworICBwLndkID0gZmItPndpZHRoOworICBwLmggPSBmYi0+aGVp Z2h0OworICBwLmRoID0gKHBlcmlvZCA+IDAgPyAocC55ICUgcGVyaW9kKSA6IDApOworICBwLmgg LT0gcC5kaDsKKyAgLyogQWRqdXN0IHkgdG8gdGhlIG9mZnNldCBpbiB0aGUgcm93IHRvIHN0YXJ0 IGRyYXdpbmcgdGhlIGJpdG1hcC4gICovCisgIHN3aXRjaCAoZmItPmFsaWduKQorICAgIHsKKyAg ICBjYXNlIEFMSUdOX0JJVE1BUF9DRU5URVI6CisgICAgICBwLnkgKz0gKHJvdy0+aGVpZ2h0IC0g cC5oKSAvIDI7CisgICAgICBicmVhazsKK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F9BUkVBKSk7CisgICAgICBpZiAocC53ZCA+IHdkKQorICAgICAgICBwLndkID0gd2Q7CisgICAg ICBwLnggPSB4IC0gcC53ZCAtICh3ZCAtIHAud2QpIC8gMjsKKyAgICAgIGlmIChwLndkIDwgd2Qg fHwgcC55ID4gcC5ieSB8fCBwLnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkKKyAgICAgICAgeworICAg ICAgICAgIC8qIElmIFcgaGFzIGEgdmVydGljYWwgYm9yZGVyIHRvIGl0cyBsZWZ0LCBkb24ndCBk cmF3IG92ZXIgaXQuICAqLworICAgICAgICAgIHdkIC09ICgoIVdJTkRPV19MRUZUTU9TVF9QICh3 KQorICAgICAgICAgICAgLyogVGhpcyBjb3VsZCBiZSB3cm9uZyB3aGVuIHdlIGFsbG93IHdpbmRv dyBsb2NhbAorICAgICAgICAgICAgICAgcmlnaHQgZGl2aWRlcnMgLSBidXQgdGhlIHdpbmRvdyBv biB0aGUgbGVmdCBpcyBoYXJkCisgICAgICAgICAgICAgICB0byBnZXQuICAqLworICAgICAgICAg ICAgJiYgIUZSQU1FX1JJR0hUX0RJVklERVJfV0lEVEggKGYpCisgICAgICAgICAgICAmJiAhV0lO RE9XX0hBU19WRVJUSUNBTF9TQ1JPTExfQkFSICh3KQorICAgICAgICAgICAgLyogQnV0IGRvbid0 IHJlZHVjZSB0aGUgZnJpbmdlIHdpZHRoIGlmIHRoZSB3aW5kb3cKKyAgICAgICAgICAgICAgIGhh cyBhIGxlZnQgbWFyZ2luLCBiZWNhdXNlIHRoYXQgbWVhbnMgd2UgYXJlIG5vdAorICAgICAgICAg ICAgICAgaW4gZGFuZ2VyIG9mIGRyYXdpbmcgb3ZlciB0aGUgdmVydGljYWwgYm9yZGVyLAorICAg ICAgICAgICAgICAgYW5kIE9UT0ggbGVhdmluZyBvdXQgdGhhdCBvbmUgcGl4ZWwgbGVhdmVzIGJl aGluZAorICAgICAgICAgICAgICAgdHJhY2VzIG9mIHRoZSBjdXJzb3IsIGlmIGl0IHdhcyBpbiBj b2x1bW4gemVybworICAgICAgICAgICAgICAgYmVmb3JlIGRyYXdpbmcgbm9uLWVtcHR5IG1hcmdp biBhcmVhLiAgKi8KKyAgICAgICAgICAgICYmIHctPmxlZnRfbWFyZ2luX2NvbHMgPT0gMCkKKyAg ICAgICAgICAgPyAxIDogMCk7CisgICAgICAgICAgcC5ieCA9IHggLSB3ZDsKKyAgICAgICAgICBw Lm54ID0gd2Q7CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UKKyAgICB7CisgICAgICBpbnQgeCA9 IHdpbmRvd19ib3hfcmlnaHQgKHcsCisgICAgICAgIChXSU5ET1dfSEFTX0ZSSU5HRVNfT1VUU0lE RV9NQVJHSU5TICh3KQorICAgICAgICAgPyBSSUdIVF9NQVJHSU5fQVJFQQorICAgICAgICAgOiBU RVhUX0FSRUEpKTsKKyAgICAgIGludCB3ZCA9IFdJTkRPV19SSUdIVF9GUklOR0VfV0lEVEggKHcp OworICAgICAgaWYgKHAud2QgPiB3ZCkKKyAgICAgICAgcC53ZCA9IHdkOworICAgICAgcC54ID0g eCArICh3ZCAtIHAud2QpIC8gMjsKKyAgICAgIC8qIENsZWFyIHJpZ2h0IGZyaW5nZSBpZiBubyBi aXRtYXAgdG8gZHJhdyBvZiBpZiBiaXRtYXAgZG9lc24ndCBmaWxsCisgICB0aGUgZnJpbmdlLiAg Ki8KKyAgICAgIGlmIChwLndkIDwgd2QgfHwgcC55ID4gcC5ieSB8fCBwLnkgKyBwLmggPCBwLmJ5 ICsgcC5ueSkKKyAgICAgICAgeworICAgICAgICAgIHAuYnggPSB4OworICAgICAgICAgIHAubngg PSB3ZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYgKHAueCA+PSBXSU5ET1dfQk9YX0xFRlRfRURH RV9YICh3KQorICAgICAgJiYgKHAueCArIHAud2QpIDw9IFdJTkRPV19CT1hfTEVGVF9FREdFX1gg KHcpICsgV0lORE9XX1BJWEVMX1dJRFRIICh3KSkKKyAgICBGUkFNRV9SSUYgKGYpLT5kcmF3X2Zy aW5nZV9iaXRtYXAgKHcsIHJvdywgJnApOworfQorCit2b2lkCittY19kcmF3X2ZyaW5nZV9iaXRt YXAgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IGxlZnRfcCwg ZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSkKK3sKKyAgaW50IG92ZXJsYXkgPSAwOwor ICBpZiAobGVmdF9wID09IHJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmN1cnNvcl9pbl9mcmluZ2Vf cCkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCBjdXJzb3IgPSBRbmlsOworICAgICAgc3dpdGNo IChjdXJzb3JfdHlwZSkKKyAgICAgICAgeworICAgICAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6Cisg ICAgICAgICAgaWYgKHJvdy0+dmlzaWJsZV9oZWlnaHQgPj0gU1RBTkRBUkRfQklUTUFQX0hFSUdI VCAoaG9sbG93X3JlY3RhbmdsZV9iaXRzKSkKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3c7 CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgY3Vyc29yID0gUWhvbGxvd19zbWFsbDsKKyAg ICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAgICAgICAgIGlm IChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGhvbGxvd19y ZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBjdXJzb3IgPSBRaG9sbG93OworICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3dfc21hbGw7CisgICAgICAgICAgYnJl YWs7CisgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAgICBjdXJzb3IgPSBRYm94 OworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgICBjdXJz b3IgPSBRYmFyOworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0hCQVI6CisgICAg ICAgICAgY3Vyc29yID0gUWhiYXI7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNf Tk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19OT19DVVJTT1I6CisgICAgICAgIGNh c2UgTUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19MRUZUX0ZSSU5HRV9C SVRNQVA6CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgdy0+cGh5c19jdXJzb3Jfb25fcCA9 IDA7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3AgPSAwOworICAgICAgICAgIGJy ZWFrOworICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKGN1cnNvcikpCisgICAgICAgIHsKKyAg ICAgICAgICBpbnQgYm0gPSBtY19nZXRfbG9naWNhbF9jdXJzb3JfYml0bWFwICh3LCBjdXJzb3Ip OworICAgICAgICAgIGlmIChibSAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAg eworICAgICAgICAgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywgcm93LCBsZWZ0X3As IDIsIGJtKTsKKyAgICAgICAgICAgICAgb3ZlcmxheSA9IEVRIChjdXJzb3IsIFFib3gpID8gMyA6 IDE7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIG1jX2RyYXdfZnJpbmdlX2Jp dG1hcF8xICh3LCByb3csIGxlZnRfcCwgb3ZlcmxheSwgTUNfTk9fRlJJTkdFX0JJVE1BUCk7Cisg IGlmIChsZWZ0X3AgJiYgcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCAhPSBNQ19OT19GUklOR0Vf QklUTUFQKQorICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIDEsIDEsIHJvdy0+ b3ZlcmxheV9hcnJvd19iaXRtYXApOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBOT19GUklOR0VfQklUTUFQIDAK ICNkZWZpbmUgVU5ERUZfRlJJTkdFX0JJVE1BUCAxCiAjZGVmaW5lIE1BWF9TVEFOREFSRF9GUklO R0VfQklUTUFQUyBBUlJBWUVMVFMgKHN0YW5kYXJkX2JpdG1hcHMpCkBAIC0xNzAwLDYgKzMyMjAs MTY4IEBAIFJldHVybiBuaWwgaWYgUE9TIGlzIG5vdCB2aXNpYmxlIGluIFdJTkRPVy4gICovKQog dm9pZAogc3ltc19vZl9mcmluZ2UgKHZvaWQpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogKGdldCAnZW1wdHktbGlu ZSAnZnJpbmdlKSA9PiAyMyA9PiB0aGUgbGFzdCBzdGFuZGFyZC1iaXRtYXAgYmVmb3JlIHRoaXMg b25lLgorICBTZWUgYGZyaW5nZS5lbGAuICovCisKKyAgLyogMjQgKi8KKyAgREVGU1lNIChRbWNf dmVydGljYWxfYmFyX3JpZ2h0X2Fycm93LCAiKy12ZXJ0aWNhbC1iYXItcmlnaHQtYXJyb3ciKTsK KyAgVmZyaW5nZV9iaXRtYXBzID0gRmNvbnMgKFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cs IFZmcmluZ2VfYml0bWFwcyk7CisgIEZwdXQgKFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cs IFFmcmluZ2UsIG1ha2VfZ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tlX2ZpeG51bSAoNDYpKTsKKyAgLyogKGdldCAnKy10cmlwbGUtYW5nbGUt ZG93biAnZnJpbmdlKSA9PiA0NiAqLworCisgIC8qIDQ3ICovCisgIERFRlNZTSAoUW1jX3F1YWRy dXBsZV9hbmdsZV91cCwgIistcXVhZHJ1cGxlLWFuZ2xlLXVwIik7CisgIFZmcmluZ2VfYml0bWFw cyA9IEZjb25zIChRbWNfcXVhZHJ1cGxlX2FuZ2xlX3VwLCBWZnJpbmdlX2JpdG1hcHMpOworICBG cHV0IChRbWNfcXVhZHJ1cGxlX2FuZ2xlX3VwLCBRZnJpbmdlLCBtYWtlX2ZpeG51bSAoNDcpKTsK KyAgLyogKGdldCAnKy1xdWFkcnVwbGUtYW5nbGUtdXAgJ2ZyaW5nZSkgPT4gNDcgKi8KKworICAv KiA0OCAqLworICBERUZTWU0gKFFtY19xdWFkcnVwbGVfYW5nbGVfZG93biwgIistcXVhZHJ1cGxl LWFuZ2xlLWRvd24iKTsKKyAgVmZyaW5nZV9iaXRtYXBzID0gRmNvbnMgKFFtY19xdWFkcnVwbGVf YW5nbGVfZG93biwgVmZyaW5nZV9iaXRtYXBzKTsKKyAgRnB1dCAoUW1jX3F1YWRydXBsZV9hbmds ZV9kb3duLCBRZnJpbmdlLCBtYWtlX2ZpeG51bSAoNDgpKTsKKyAgLyogKGdldCAnKy1xdWFkcnVw bGUtYW5nbGUtZG93biAnZnJpbmdlKSA9PiA0OCAqLworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09S UyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBERUZTWU0gKFF0cnVuY2F0aW9u LCAidHJ1bmNhdGlvbiIpOwogICBERUZTWU0gKFFjb250aW51YXRpb24sICJjb250aW51YXRpb24i KTsKICAgREVGU1lNIChRb3ZlcmxheV9hcnJvdywgIm92ZXJsYXktYXJyb3ciKTsKZGlmZiAtLWdp dCBhL3NyYy9uc3Rlcm0uaCBiL3NyYy9uc3Rlcm0uaAppbmRleCA3OGNlNjA4Li44ZWYwZGZlIDEw MDY0NAotLS0gYS9zcmMvbnN0ZXJtLmgKKysrIGIvc3JjL25zdGVybS5oCkBAIC02NjAsNiArNjYw LDE2IEBAIHR5cGVkZWYgaWQgaW5zdGFuY2V0eXBlOwogCiBAaW50ZXJmYWNlIEVtYWNzU2Nyb2xs ZXIgOiBOU1Njcm9sbGVyCiAgIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFLUNVUlNPUlMgKi8KKworICAgIE5TUmVjdCBtY19yZWN0YW5nbGU7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgIHN0cnVjdCB3aW5kb3cgKndpbmRvdzsKICAgIHN0cnVj dCBmcmFtZSAqZnJhbWU7CiAgICBOU1Jlc3BvbmRlciAqcHJldlJlc3BvbmRlcjsKQEAgLTY4MCw2 ICs2OTAsMTggQEAgdHlwZWRlZiBpZCBpbnN0YW5jZXR5cGU7CiAgICBpbnQgZW1fd2hvbGU7CiAg ICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5TUmVjdClyZWN0OworLSAoTlNSZWN0KW1j X2dldF9yZWN0YW5nbGU7CistIChzdHJ1Y3Qgd2luZG93ICopbWNfZ2V0X3dpbmRvdzsKKy0gKGJv b2wpbWNfanVkZ2U7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqK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hl X3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAgeworICAgICAgZm9y IChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgcworICAgICAgICAgICAmJiBtY190cmF2ZXJzZV9j YWNoZV9wIChzLT53LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAg ICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgLy8gIGludCB4ID0gcy0+dy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAgICAgIGludCBm eCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZng7 CisgICAgICAgICAgLy8gIGludCB5ID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS55OworICAgICAgICAgIGludCBmeSA9IHMtPnctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAgaW50IGhwb3Mg PSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmhwb3M7 CisgICAgICAgICAgaW50IHZwb3MgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhdLnZwb3M7CisgICAgICAgICAgaW50IHdkID0gcy0+dy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZDsKKyAgICAgICAgICBpbnQgaCA9 IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uaDsKKyAg ICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gcy0+dy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZTsKKyAgICAgICAg ICAvLyAgaW50IGN1cnNvcl93aWR0aCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVjdCBtY19SR0Ig bHNsX2ZnID0gey5yZWQgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmZnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3Jl ZW4gPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZn LmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gcy0+dy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlfTsKKyAg ICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHMtPnctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAgICAgICAgIC8v ICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBzLT53LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdyZWVuLAorICAgICAgICAgIC8vICAgICAg ICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAgICAgICAgYm9vbCBhY3RpdmVfcCA9 IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYWN0aXZl X3A7CisgICAgICAgICAgLy8gIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IHMtPnctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGhfZmxhdm9yOwor ICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICAgICAgYm9vbCBnb19wID0gKHZw b3MgPT0gdm50aAorICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zID09IGN1cnNvcl9nbHlw aC0+aHBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApOworICAgICAgICAg IGlmICghZ29fcCkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIE5TUmVjdCByOwor ICAgICAgICAgIHIub3JpZ2luLnggPSBmeDsKKyAgICAgICAgICByLm9yaWdpbi55ID0gZnk7Cisg ICAgICAgICAgci5zaXplLmhlaWdodCA9IGg7CisgICAgICAgICAgci5zaXplLndpZHRoID0gd2Q7 CisgICAgICAgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbF9mZy5yZWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjogbHNsX2ZnLmdyZWVu CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IGxzbF9mZy5ibHVl CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF0gc2V0XTsK KyAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAgICB7CisgICAg ICAgICAgTGlzcF9PYmplY3QgYnVmID0gcy0+dy0+Y29udGVudHM7CisgICAgICAgICAgQ0hFQ0tf QlVGRkVSIChidWYpOworICAgICAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYp OworICAgICAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21h cmtfbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZB UiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWcgPSAo cmVnaW9uX2FjdGl2ZV9wKSA/IG1jX3JlZ2lvbl9saW1pdCAoMSkgOiAtMTsKKyAgICAgICAgICBw dHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdpb25fYWN0aXZlX3ApID8gbWNfcmVnaW9uX2xpbWl0 ICgwKSA6IC0xOworICAgICAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAg JiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID09IHJl Z2lvbl9iZWcpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xs b3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBz LT5mLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQtcmVnaW9uLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25f YmVnX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19m YWNlX2lkKTsKKyAgICAgICAgICAgICAgTlNDb2xvciAqaG9sbG93X2FjdGl2ZV9yZWdpb25fYmVn X2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3I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TsKKyAgICAgICAgICAgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfaW5h Y3RpdmVfY29sb3I7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBl bHNlIGlmIChmYWNlICYmIE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSkgPT0gbnNfaW5kZXhfY29s b3IgKEZSQU1FX0NVUlNPUl9DT0xPUiAocy0+ZiksIHMtPmYpKQorICAgICAgICAgIHsKKyAgICAg ICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNl KSwgcy0+Zikgc2V0XTsKKyAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IEZSQU1FX0NVUlNPUl9D T0xPUiAocy0+Zik7CisgICAgICAgICAgfQorICAgICAgICAgIHN3aXRjaCAoY3Vyc29yX3R5cGUp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoK KyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19OT19DVVJTT1I6 CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfUklHSFRfRlJJ TkdFX0JJVE1BUDoKKyAgICAgICAgICAgICAgY2FzZSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVA6Cisg ICAgICAgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAgICAgICAgICBOU1JlY3RG aWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19G UkFNRURfQk9YOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAg ICAgIFtob2xsb3dfY29sb3Igc2V0XTsKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChOU0lu c2V0UmVjdCAociwgMSwgMSkpOworICAgICAgICAgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1Ig KHMtPmYpIHNldF07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2Ug TUNfSE9MTE9XX0JPWDoKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAg ICAgICAgICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAo TlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgICAgICAgICBbRlJBTUVfQ1VSU09SX0NP TE9SIChzLT5mKSBzZXRdOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBj YXNlIE1DX0hCQVI6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfQkFSOgorICAgICAgICAgICAgICAg IE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQor ICAgICAgICAgIC8qIElmIGEgZ2x5cGggZXhpc3RzIChzLT5jaGFyMmIgIT0gTlVMTCksIHRoZW4g ZHJhdyB0aGUgZ2x5cGggb24gdG9wIG9mIHRoZQorICAgICAgICAgIG5ld2x5IGRyYXduIHJlY3Rh bmdsZSB0aGF0IHdhcyBjcmVhdGVkIGhlcmVpbmFib3ZlLiAgVG8gdGhlIGV4dGVudCB0aGF0IHdl CisgICAgICAgICAgd2FudCB0byBkb3VibGUtaW1wcmludCBnbHlwaHMgdG8gbWFrZSB0aGVtIGFw cGVhciB0byBiZSBzZW1pLWJvbGQsIGl0IGNhbgorICAgICAgICAgIGJlIGRvbmUgaGVyZSBmb3Ig YWxsIGN1cnNvciB0eXBlcy4gIFRoZSBib3gtc3R5bGUgY3Vyc29ycyBhcmUgaW1wcmludGVkCisg ICAgICAgICAgd2l0aCBnbHlwaHMgb25seSBvbmUgKDEpIHRpbWUuICBUaGUgc2VtaS1ib2xkIGFw cGVhcmFuY2UgaXMgaGVscGZ1bCB3aGVuCisgICAgICAgICAgZGVidWdnaW5nIHRvIHNlZSB0aGF0 IHRoZSBjb29yZGluYXRlcyBhcmUgY29ycmVjdC4gKi8KKyAgICAgICAgICBpZiAocy0+Y2hhcjJi ICE9IE5VTEwKKyAgICAgICAgICAgICAgJiYgKGN1cnNvcl90eXBlID09IE1DX0ZJTExFRF9CT1gK KyAgICAgICAgICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gKKyAgICAg ICAgICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0hPTExPV19CT1gpKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBCT09MIGlzQ29tcG9zaXRlID0gcy0+Zmlyc3RfZ2x5cGgtPnR5 cGUgPT0gQ09NUE9TSVRFX0dMWVBIOworICAgICAgICAgICAgICBpZiAoaXNDb21wb3NpdGUpCisg ICAgICAgICAgICAgICAgbnNfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQg KHMpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgICAgc3RydWN0IGZvbnQgKmZvbnQgPSBzLT5mYWNlLT5mb250OworICAgICAgICAg ICAgICAgICAgICBpZiAoIWZvbnQpCisgICAgICAgICAgICAgICAgICAgICAgZm9udCA9IEZSQU1F X0ZPTlQgKHMtPmYpOworICAgICAgICAgICAgICAgICAgICBib29sIHdpdGhfYmdfcCA9IGZhbHNl OworICAgICAgICAgICAgICAgICAgICBmb250LT5kcml2ZXItPmRyYXcgKHMsIHMtPmNtcF9mcm9t LCBzLT5uY2hhcnMsIHMtPngsIHMtPnliYXNlLCB3aXRoX2JnX3ApOworICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICAvLyAg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0lEIChm LCBmYWNlX2lkKTsKKyAgICAgTlNDb2xvciAqY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xv ciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgZik7CisgIC0gIEVYQU1QTEUgT0YgSE9XIFRP IFBSSU5UIEEgQ09MT1IgVE8gU1RERVJSOgorICAgICBMaXNwX09iamVjdCBmb3JlZ3JvdW5kID0g ZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgICAgIExpc3BfT2JqZWN0IGJh Y2tncm91bmQgPSBmYWNlLT5sZmFjZVtMRkFDRV9CQUNLR1JPVU5EX0lOREVYXTsKKyAgICAgZnBy aW50ZiAoc3RkZXJyLCAiXG5mb3JlZ3JvdW5kICglcykgfCBiYWNrZ3JvdW5kICglcylcbiIsCisg ICAgICAgICAgICAgICAgICAgICAgKCFOSUxQIChmb3JlZ3JvdW5kKSA/IFNTREFUQSAoZm9yZWdy b3VuZCkgOiAiTklMUCIpLAorICAgICAgICAgICAgICAgICAgICAgICghTklMUCAoYmFja2dyb3Vu ZCkgPyBTU0RBVEEgKGJhY2tncm91bmQpIDogIk5JTFAiKSk7CisgIC0gIEVYQU1QTEUgT0YgSE9X IFRPIENSRUFURSBBIENPTE9SIFdJVEggUkdCL0xTTCBmbG9hdCB2YWx1ZXM6CisgICAgIE5TQ29s b3IgKm15X2NvbG9yID0gW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogMS4wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjogMS4w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmx1 ZTogMS4wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBhbHBoYTogMS4wXTsKKyAgLSAgQUxURVJOQVRJVkUgRVhBTVBMRToKKyAgICAgZW51bSBmYWNl X2lkIGRlYnVnZ2luZ19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGlu dGVybiAoIistZGVidWdnaW5nLWZhY2UiKSwgdHJ1ZSk7CisgICAgIHN0cnVjdCBmYWNlICpkZWJ1 Z2dpbmdfZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgZGVidWdnaW5nX2ZhY2VfaWQpOworICAg ICBOU0NvbG9yICpjb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVH Uk9VTkQgKGRlYnVnZ2luZ19mYWNlKSwgcy0+Zik7CisgICAgIFtjb2xvciBzZXRdOyAqLworICBp ZiAoZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNf R0xZUEhMRVNTKQorICAgIFtbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiBsc2wucmVk CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IGxzbC5ncmVlbgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBibHVlOiBsc2wuYmx1ZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdIHNldF07CisgICAgZWxzZQorICAgICAgW0ZSQU1F X0NVUlNPUl9DT0xPUiAoZikgc2V0XTsKKyAgaWYgKGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9C T1gpCisgICAgeworICAgICAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgICAgICBD SEVDS19CVUZGRVIgKGJ1Zik7CisgICAgICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVm KTsKKyAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtf bW9kZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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gICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID09IHJlZ2lvbl9lbmQp CisgICAgICAgICAgeworICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVn aW9uX2VuZF9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1hdC1yZWdpb24tcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAg ICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlX2lkKTsKKyAgICAgICAgICAgIE5T Q29sb3IgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVk X2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNl KSwgZik7CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9l bmRfY29sb3I7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHJlZ2lvbl9hY3RpdmVf cAorICAgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgJiYg Y3Vyc29yX2dseXBoLT5jaGFycG9zID4gcmVnaW9uX2JlZworICAgICAgICAgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA8IHJlZ2lvbl9lbmQpCisgICAgICAgICAgICB7CisgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2Vf aWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgi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fYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIC8q IFRoZSByZWdpb24gaXMgX25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1 c2UgdGhlIG92ZXJsYXkgd2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICAg IGVsc2UgaWYgKCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNl IiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2 ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAg ICAgICAgICAgICAgICBOU0NvbG9yICpob2xsb3dfaW5hY3RpdmVfY29sb3IgPSBuc19sb29rdXBf aW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3dfaW5hY3RpdmVfZmFjZSks IGYpOworICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2luYWN0aXZlX2Nv bG9yOworICAgICAgICAgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAoZmFjZSAmJiBOU19G QUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09M T1IgKGYpLCBmKSkKKyAgICAgIHsKKyAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChO U19GQUNFX0ZPUkVHUk9VTkQgKGZhY2UpLCBmKSBzZXRdOworICAgICAgICBob2xsb3dfY29sb3Ig PSBGUkFNRV9DVVJTT1JfQ09MT1IgKGYpOworICAgICAgfQorI2lmZGVmIE5TX0lNUExfQ09DT0EK KyAgTlNEaXNhYmxlU2NyZWVuVXBkYXRlcyAoKTsKKyNlbmRpZgorICBzd2l0Y2ggKGN1cnNvcl90 eXBlKQorICAgIHsKKyAgICAgIGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgYnJl YWs7CisgICAgICBjYXNlIE1DX05PX0NVUlNPUjoKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNl IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19M RUZUX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19GSUxMRURf Qk9YOgorICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNl IE1DX0ZSQU1FRF9CT1g6CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBbaG9sbG93 X2NvbG9yIHNldF07CisgICAgICAgIE5TUmVjdEZpbGwgKE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7 CisgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKGYpIHNldF07CisgICAgICAgIGJyZWFrOwor ICAgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAg ICAgW2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAo ciwgMSwgMSkpOworICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworICAgICAg ICBicmVhazsKKyAgICAgIGNhc2UgTUNfSEJBUjoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7Cisg ICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgIHMgPSByOworICAgICAg ICAvKiBAbGF3bGlzdCBpcyBmb2N1c2luZyB0aGUgaW5pdGlhbCBkZXZlbG9wbWVudCBvZiBmZWF0 dXJlIHJlcXVlc3RzCisgICAgICAgICMxNzY4NCBhbmQgIzIyODczIG9uIEwyUiBsYW5ndWFnZXMu ICovCisgICAgICAgIGlmIChnbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEgKKyAgICAgICAgICAgICYm IGdseXBoX2ZsYXZvciAhPSBNQ19HTFlQSExFU1MpCisgICAgICAgICAgeworICAgICAgICAgICAg LyogSWYgdGhlIGNoYXJhY3RlciB1bmRlciBjdXJzb3IgaXMgUjJMLCBkcmF3IHRoZSBiYXIgY3Vy c29yCisgICAgICAgICAgICAgICBvbiB0aGUgcmlnaHQgb2YgaXRzIGdseXBoLCByYXRoZXIgdGhh biBvbiB0aGUgbGVmdC4gKi8KKyAgICAgICAgICAgIGlmICgoY3Vyc29yX2dseXBoLT5yZXNvbHZl ZF9sZXZlbCAmIDEpICE9IDApCisgICAgICAgICAgICAgIHMub3JpZ2luLnggKz0gY3Vyc29yX2ds eXBoLT5waXhlbF93aWR0aCAtIHMuc2l6ZS53aWR0aDsKKyAgICAgICAgICB9CisgICAgICAgIE5T UmVjdEZpbGwgKHMpOworICAgICAgICBicmVhazsKKyAgICB9CisgIG5zX3Jlc2V0X2NsaXBwaW5n IChmKTsKKyAgLyogZHJhdyB0aGUgY2hhcmFjdGVyIHVuZGVyIHRoZSBjdXJzb3IgKi8KKyAgaWYg KGdseXBoX2ZsYXZvciAhPSBNQ19HTFlQSExFU1MKKyAgICAgICYmIChjdXJzb3JfdHlwZSA9PSBN Q19GUkFNRURfQk9YCisgICAgICAgICAgfHwgY3Vyc29yX3R5cGUgPT0gTUNfRklMTEVEX0JPWAor ICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0hPTExPV19CT1gKKyAgICAgICAgICB8fCAo ZGVidWdfcAorICAgICAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LQorICAgRHJhdyB1bmRlcmxpbmUsIG92ZXJsaW5lLCBhbmQgc3RyaWtlLXRocm91Z2ggb24gZ2x5 cGggc3RyaW5nIHMuCisgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworeworICBpZiAocy0+Zm9yX292 ZXJsYXBzKQorICAgIHJldHVybjsKKyAgLyogRG8gdW5kZXJsaW5lLiAqLworICBpZiAoZmFjZS0+ dW5kZXJsaW5lX3ApCisgICAgeworICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09 IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAgICAgeworICAgICAgICAgIGlmIChmYWNlLT51bmRlcmxp bmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICBbZGVmYXVsdENvbCBzZXRdOworICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKGZhY2UtPnVu ZGVybGluZV9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgICAgICBuc19kcmF3X3VuZGVyd2F2ZSAo cywgd2lkdGgsIHgpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVy bGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBO U1JlY3QgcjsKKyAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlvbjsK KyAgICAgICAgICAgIC8qIElmIHRoZSBwcmV2IHdhcyB1bmRlcmxpbmVkLCBtYXRjaCBpdHMgYXBw ZWFyYW5jZS4gKi8KKyAgICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMtPnByZXYtPmZhY2UtPnVu ZGVybGluZV9wCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5 cGUgPT0gRkFDRV9VTkRFUl9MSU5FCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+dW5kZXJs aW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICB0aGlj a25lc3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgIHBv c2l0aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBz dHJ1Y3QgZm9udCAqZm9udDsKKyAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZGVzY2Vu dDsKKyAgICAgICAgICAgICAgICAgIGZvbnQ9cy0+Zm9udDsKKyAgICAgICAgICAgICAgICAgIGRl c2NlbnQgPSBzLT55ICsgcy0+aGVpZ2h0IC0gcy0+eWJhc2U7CisgICAgICAgICAgICAgICAgICAv KiBVc2UgdW5kZXJsaW5lIHRoaWNrbmVzcyBvZiBmb250LCBkZWZhdWx0aW5nIHRvIDEuICovCisg ICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAoZm9udCAmJiBmb250LT51bmRlcmxpbmVfdGhp Y2tuZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZm9udC0+dW5kZXJs aW5lX3RoaWNrbmVzcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAxOworICAgICAg ICAgICAgICAgICAgLyogRGV0ZXJtaW5lIHRoZSBvZmZzZXQgb2YgdW5kZXJsaW5pbmcgZnJvbSB0 aGUgYmFzZWxpbmUuICovCisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVz Y2VudF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGRlc2NlbnQgLSB0aGlj a25lc3M7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHhfdXNlX3VuZGVybGluZV9wb3Np dGlvbl9wcm9wZXJ0aWVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZvbnQgJiYg Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgcG9z aXRpb24gPSBmb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAg ZWxzZSBpZiAoZm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbHJvdW5k IChmb250LT5kZXNjZW50IC8gMik7CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0 OworICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVf bWluaW11bV9vZmZzZXQpOworICAgICAgICAgICAgICAgICAgLyogRW5zdXJlIHVuZGVybGluaW5n IGlzIG5vdCBjcm9wcGVkLiAqLworICAgICAgICAgICAgICAgICAgaWYgKGRlc2NlbnQgPD0gcG9z aXRpb24pCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBwb3Np dGlvbiA9IGRlc2NlbnQgLSAxOworICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7 CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVz Y2VudCA8IHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgICAgICAgIHRoaWNr bmVzcyA9IDE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Ro aWNrbmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9 IHBvc2l0aW9uOworICAgICAgICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnliYXNlICsgcG9z aXRpb24sIHdpZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAgaWYgKGZhY2UtPnVuZGVybGlu ZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAg ICAgICAgZWxzZQorICAgICAgICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoZmFj ZS0+dW5kZXJsaW5lX2NvbG9yLCBzLT5mKSBzZXRdOworICAgICAgICAgICAgTlNSZWN0RmlsbCAo cik7CisgICAgICAgICAgfQorICAgIH0KKyAgLyogRG8gb3ZlcmxpbmUuIFdlIGZvbGxvdyBvdGhl ciB0ZXJtcyBpbiB1c2luZyBhIHRoaWNrbmVzcyBvZiAxCisgICAgIGFuZCBpZ25vcmluZyBvdmVy bGluZV9tYXJnaW4uICovCisgIGlmIChmYWNlLT5vdmVybGluZV9wKQorICAgIHsKKyAgICAgIE5T UmVjdCByOworICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnksIHdpZHRoLCAxKTsKKyAgICAg IGlmIChmYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgW2RlZmF1bHRD b2wgc2V0XTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xv ciAoZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPmYpIHNldF07CisgICAgICBOU1JlY3RGaWxsIChy KTsKKyAgICB9CisgIC8qIERvIHN0cmlrZS10aHJvdWdoLiAgV2UgZm9sbG93IG90aGVyIHRlcm1z IGZvciB0aGlja25lc3MgYW5kCisgICAgIHZlcnRpY2FsIHBvc2l0aW9uLiovCisgIGlmIChmYWNl LT5zdHJpa2VfdGhyb3VnaF9wKQorICAgIHsKKyAgICAgIE5TUmVjdCByOworICAgICAgdW5zaWdu ZWQgbG9uZyBkeTsKKyAgICAgIGR5ID0gbHJpbnQgKChzLT5oZWlnaHQgLSAxKSAvIDIpOworICAg ICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnkgKyBkeSwgd2lkdGgsIDEpOworICAgICAgaWYgKGZh Y2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICBbZGVmYXVsdENv bCBzZXRdOworICAgICAgICBlbHNlCisgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9y IChmYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgIE5TUmVjdEZp bGwgKHIpOworICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX2R1bXBnbHlwaHNfc3RyZXRj aCAoc3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAor ICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB3ZCkK K3sKKyAgTlNSZWN0IHJbMl07CisgIGludCBuLCBpOworICBzdHJ1Y3QgZmFjZSAqZmFjZTsKKyAg TlNDb2xvciAqZmdDb2wsICpiZ0NvbDsKKyAgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQor ICAgIHsKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7Cisg ICAgICAqciA9IE5TTWFrZVJlY3QgKHMtPngsIHMtPnksIHMtPmJhY2tncm91bmRfd2lkdGgsIHMt PmhlaWdodCk7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+ZiwgciwgbikpCisgICAg ICAgIHJldHVybjsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX01PVVNFX0ZBQ0UpCisgICAgICAg IHsKKyAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9ITF9JTkZPIChz LT5mKS0+bW91c2VfZmFjZV9mYWNlX2lkKTsKKyAgICAgICAgICBpZiAoIWZhY2UpCisgICAgICAg ICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAg fQorICAgICAgICBlbHNlCisgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBzLT5m aXJzdF9nbHlwaC0+ZmFjZV9pZCk7CisgICAgICBiZ0NvbCA9IG5zX2xvb2t1cF9pbmRleGVkX2Nv bG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBzLT5mKTsKKyAgICAgIGZnQ29sID0gbnNf bG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYpOwor ICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgh cy0+cm93LT5mdWxsX3dpZHRoX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGludCBv dmVycnVuLCBsZWZ0b3ZlcnJ1bjsKKyAgICAgICAgICAgICAgLyogdHJ1bmNhdGUgdG8gYXZvaWQg b3ZlcndyaXRpbmcgZnJpbmdlIGFuZC9vciBzY3JvbGxiYXIgKi8KKyAgICAgICAgICAgICAgb3Zl cnJ1biA9IG1heCAoMCwgKHMtPnggKyBzLT5iYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLSAoV0lORE9XX0JPWF9SSUdIVF9FREdFX1ggKHMtPncpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIFdJTkRPV19SSUdIVF9GUklOR0VfV0lEVEgg KHMtPncpKSk7CisgICAgICAgICAgICAgICAgICAgIHJbaV0uc2l6ZS53aWR0aCAtPSBvdmVycnVu OworICAgICAgICAgICAgICAvKiB0cnVuY2F0ZSB0byBhdm9pZCBvdmVyd3JpdGluZyB0byBsZWZ0 IG9mIHRoZSB3aW5kb3cgYm94ICovCisgICAgICAgICAgICAgIGxlZnRvdmVycnVuID0gKFdJTkRP V19CT1hfTEVGVF9FREdFX1ggKHMtPncpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsg V0lORE9XX0xFRlRfRlJJTkdFX1dJRFRIIChzLT53KSkgLSBzLT54OworICAgICAgICAgICAgICBp ZiAobGVmdG92ZXJydW4gPiAwKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg IHJbaV0ub3JpZ2luLnggKz0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgICByW2ldLnNp emUud2lkdGggLT0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAvKiBYWFg6IFRyeSB0byB3b3JrIGJldHdlZW4gcHJvYmxlbSB3aGVyZSBhIHN0cmV0Y2ggZ2x5 cGggb24KKyAgICAgICAgICAgICAgICAgYSBwYXJ0aWFsbHktdmlzaWJsZSBib3R0b20gcm93IHdp bGwgY2xlYXIgcGFydCBvZiB0aGUKKyAgICAgICAgICAgICAgICAgbW9kZWxpbmUsIGFuZCBhbm90 aGVyIHdoZXJlIGxpc3QtYnVmZmVycyBoZWFkZXJzIGFuZCBzaW1pbGFyCisgICAgICAgICAgICAg ICAgIHJvd3MgZXJyb25lb3VzbHkgaGF2ZSB2aXNpYmxlX2hlaWdodCBzZXQgdG8gMC4gIE5vdCBz dXJlCisgICAgICAgICAgICAgICAgIHdoZXJlIHRoaXMgaXMgY29taW5nIGZyb20gYXMgb3RoZXIg dGVybXMgc2VlbSBub3QgdG8gc2hvdy4gKi8KKyAgICAgICAgICAgICAgcltpXS5zaXplLmhlaWdo dCA9IG1pbiAocy0+aGVpZ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vciAqY29sb3Ig PSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChkZWJ1Z2dpbmdf ZmFjZSksIHMtPmYpOworICAgICAgICAgICAgICAvLyAgW2NvbG9yIHNldF07CisgICAgICAgICAg ICAgIENHRmxvYXQgeCA9IHJbaV0ub3JpZ2luLng7CisgICAgICAgICAgICAgIENHRmxvYXQgd2lk dGggPSB3ZDsKKyAgICAgICAgICAgICAgcltpXS5zaXplLndpZHRoIC09IHdpZHRoOworICAgICAg ICAgICAgICByW2ldLm9yaWdpbi54ICs9IHdpZHRoOworICAgICAgICAgICAgICBOU1JlY3RGaWxs IChyW2ldKTsKKyAgICAgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBj dXJzb3IuICovCisgICAgICAgICAgICAgIGlmIChzLT53LT5waHlzX2N1cnNvcl90eXBlID09IE1D X0ZJTExFRF9CT1gpCisgICAgICAgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24g KHMsIGZhY2UsIGJnQ29sLCB3aWR0aCwgeCk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIGZnQ29sLCB3 aWR0aCwgeCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgewor ICAvLyAgaW50IHJ4ID0gcltpXS5vcmlnaW4ueDsKKyAgLy8gIGludCByeSA9IHJbaV0ub3JpZ2lu Lnk7CisgIC8vICBpbnQgcncgPSByW2ldLnNpemUud2lkdGg7CisgIC8vICBpbnQgcmggPSByW2ld LnNpemUuaGVpZ2h0OworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfbnNfZHVtcGdseXBoc19z dHJldGNoOiAgdnBvcyAoJWQpIHwgcnggKCVkKSB8IHJ5ICglZCkgfCBydyAoJWQpIHwgcmggKCVk KVxuIiwKKyAgLy8gICAgICAgICAgICAgICAgICAgcy0+Zmlyc3RfZ2x5cGgtPnZwb3MsIHJ4LCBy eSwgcncsIHJoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocltpXSk7CisgICAgICAgICAg ICB9CisgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBzdHJldGNoIGds eXBoIChvciB0aGUgcGFydAorICAgICAgICAgICAgIG9mIHRoZSBzdHJldGNoIGdseXBoIGFmdGVy IHRoZSBjdXJzb3IpLiAqLworICAgICAgICAgIG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChz LCBmYWNlLCBmZ0NvbCwgcltpXS5zaXplLndpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICByW2ldLm9yaWdpbi54KTsKKyAgICAgICAgfQorICAgICAgaWYgKChzLT5s ZWZ0X292ZXJ3cml0dGVuX3AgfHwgcy0+cmlnaHRfb3ZlcndyaXR0ZW5fcCkKKyAgICAgICAgICAm JiAocy0+YWN0aW9uX3R5cGUgPT0gTUNfRFJBV19HTFlQSCB8fCBzLT5hY3Rpb25fdHlwZSA9PSBN Q19FUkFTRV9HTFlQSCkpCisgICAgICAgIG1jX25zX2RyYXdfb3ZlcndyaXR0ZW4gKHMsIG1hdHJp eCwgcm93LCBzLT5maXJzdF9nbHlwaCk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7 CisgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gMTsKKyAgICB9Cit9CisKK3N0YXRpYyB2 b2lkCittY19uc19kdW1wZ2x5cGhzX2ltYWdlIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBOU1Jl Y3Qgciwgc3RydWN0IG1jX1JHQiBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1j X2ZsYXZvciBnbHlwaF9mbGF2b3IsIGVudW0gbWNfY3Vyc29yX3R5cG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mUsIG92ZXJsaW5lLCBzdHJpa2UtdGhyb3VnaC4gKi8KKyAgbWNfbnNfZHJhd190 ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIHRkQ29sLCBici5zaXplLndpZHRoLCBici5vcmlnaW4u eCk7CisgIC8qIERyYXcgcmVsaWVmLCBpZiByZXF1ZXN0ZWQgKi8KKyAgaWYgKHMtPmltZy0+cmVs aWVmIHx8IHMtPmhsID09RFJBV19JTUFHRV9SQUlTRUQgfHwgcy0+aGwgPT1EUkFXX0lNQUdFX1NV TktFTikKKyAgICB7CisgICAgICBpZiAocy0+aGwgPT0gRFJBV19JTUFHRV9TVU5LRU4gfHwgcy0+ aGwgPT0gRFJBV19JTUFHRV9SQUlTRUQpCisgICAgICAgIHsKKyAgICAgICAgICB0aCA9IHRvb2xf YmFyX2J1dHRvbl9yZWxpZWYgPj0gMCA/CisgICAgICAgICAgICB0b29sX2Jhcl9idXR0b25fcmVs aWVmIDogREVGQVVMVF9UT09MX0JBUl9CVVRUT05fUkVMSUVGOworICAgICAgICAgIHJhaXNlZF9w ID0gKHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VEKTsKKyAgICAgICAgfQorICAgICAgICBlbHNl CisgICAgICAgICAgeworICAgICAgICAgICAgdGggPSBhYnMgKHMtPmltZy0+cmVsaWVmKTsKKyAg ICAgICAgICAgIHJhaXNlZF9wID0gKHMtPmltZy0+cmVsaWVmID4gMCk7CisgICAgICAgICAgfQor ICAgICAgci5vcmlnaW4ueCA9IHggLSB0aDsKKyAgICAgIHIub3JpZ2luLnkgPSB5IC0gdGg7Cisg ICAgICByLnNpemUud2lkdGggPSBzLT5zbGljZS53aWR0aCArIDIqdGgtMTsKKyAgICAgIHIuc2l6 ZS5oZWlnaHQgPSBzLT5zbGljZS5oZWlnaHQgKyAyKnRoLTE7CisgICAgICBuc19kcmF3X3JlbGll ZiAociwgdGgsIHJhaXNlZF9wLAorICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLnkgPT0g MCwKKyAgICAgICAgICAgICAgICAgICAgICBzLT5zbGljZS55ICsgcy0+c2xpY2UuaGVpZ2h0ID09 IHMtPmltZy0+aGVpZ2h0LAorICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLnggPT0gMCwK KyAgICAgICAgICAgICAgICAgICAgICBzLT5zbGljZS54ICsgcy0+c2xpY2Uud2lkdGggPT0gcy0+ aW1nLT53aWR0aCwgcyk7CisgICAgfQorICAvKiBJZiB0aGVyZSBpcyBubyBtYXNrLCB0aGUgYmFj a2dyb3VuZCB3b24ndCBiZSBzZWVuLAorICAgICBzbyBkcmF3IGEgcmVjdGFuZ2xlIG9uIHRoZSBp bWFnZSBmb3IgdGhlIGN1cnNvci4KKyAgICAgRG8gdGhpcyBmb3IgYWxsIGltYWdlcywgZ2V0dGlu ZyB0cmFuc3BhcmVuY3kgcmlnaHQgaXMgbm90IHJlbGlhYmxlLiAqLworICBpZiAocy0+aGwgPT0g RFJBV19DVVJTT1IpCisgICAgeworICAgICAgaW50IHRoaWNrbmVzcyA9IGFicyAocy0+aW1nLT5y ZWxpZWYpOworICAgICAgaWYgKHRoaWNrbmVzcyA9PSAwKSB0aGlja25lc3MgPSAxOworICAgIGlm IChnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1D X0dMWVBITEVTUykKKyAgICAgIHsKKyAgICAgICAgTlNDb2xvciAqYm9yZGVyX2NvbG9yID0gW05T Q29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyZWVuOiBsc2wuZ3JlZW4K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBhbHBoYTogMS4wXTsKKyAgICAgICAgbnNfZHJhd19ib3ggKGJy LCB0aGlja25lc3MsIGJvcmRlcl9jb2xvciwgMSwgMSk7CisgICAgICB9CisgICAgICBlbHNlCisg ICAgICAgIG5zX2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBGUkFNRV9DVVJTT1JfQ09MT1IgKHMt PmYpLCAxLCAxKTsKKyAgICB9Cit9CisKK3N0YXRpYyB2b2lkCittY19uc19tYXliZV9kdW1wZ2x5 cGhzX2JhY2tncm91bmQgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIGNoYXIgZm9yY2VfcCkKK3sK KyAgTlNUUkFDRSAoIm1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZCIpOworICBpZiAo IXMtPmJhY2tncm91bmRfZmlsbGVkX3AvKiB8fCBzLT5obCA9PSBEUkFXX01PVVNFX0ZBQ0UqLykK KyAgICB7CisgICAgICBpbnQgYm94X2xpbmVfd2lkdGggPSBtYXggKHMtPmZhY2UtPmJveF9saW5l X3dpZHRoLCAwKTsKKyAgICAgIGlmIChGT05UX0hFSUdIVCAocy0+Zm9udCkgPCBzLT5oZWlnaHQg LSAyICogYm94X2xpbmVfd2lkdGgKKyAgICAgICAgICAvKiBXaGVuIHhkaXNwLmMgaWdub3JlcyBG T05UX0hFSUdIVCwgd2UgY2Fubm90IHRydXN0IGZvbnQKKyAgICAgICAgICAgICBkaW1lbnNpb25z LCBzaW5jZSB0aGUgYWN0dWFsIGdseXBocyBtaWdodCBiZSBtdWNoCisgICAgICAgICAgICAgc21h bGxlci4gIFNvIGluIHRoYXQgY2FzZSB3ZSBhbHdheXMgY2xlYXIgdGhlIHJlY3RhbmdsZQorICAg ICAgICAgICAgIHdpdGggYmFja2dyb3VuZCBjb2xvci4gKi8KKyAgICAgICAgICB8fCBGT05UX1RP T19ISUdIIChzLT5mb250KQorICAgICAgICAgIHx8IHMtPmZvbnRfbm90X2ZvdW5kX3AgfHwgcy0+ ZXh0ZW5kc190b19lbmRfb2ZfbGluZV9wIHx8IGZvcmNlX3ApCisgICAgICAgIHsKKyAgICAgICAg ICBzdHJ1Y3QgZmFjZSAqZmFjZTsKKyAgICAgICAgICBpZiAocy0+aGwgPT0gRFJBV19NT1VTRV9G QUNFKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChz LT5mLCBNT1VTRV9ITF9JTkZPIChzLT5mKS0+bW91c2VfZmFjZV9mYWNlX2lkKTsKKyAgICAgICAg ICAgICAgaWYgKCFmYWNlKQorICAgICAgICAgICAgICAgIGZhY2UgPSBGQUNFX0ZST01fSUQgKHMt PmYsIE1PVVNFX0ZBQ0VfSUQpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBzLT5maXJzdF9nbHlwaC0+ZmFj ZV9pZCk7CisgICAgICAgICAgaWYgKCFmYWNlLT5zdGlwcGxlKQorICAgICAgICAgICAgWyhOU19G QUNFX0JBQ0tHUk9VTkQgKGZhY2UpICE9IDAKKyAgICAgICAgICAgICAgPyBuc19sb29rdXBfaW5k ZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSwgcy0+ZikKKyAgICAgICAgICAg ICAgOiBGUkFNRV9CQUNLR1JPVU5EX0NPTE9SIChzLT5mKSkgc2V0XTsKKyAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0cnVjdCBuc19kaXNwbGF5X2lu Zm8gKmRweWluZm8gPSBGUkFNRV9ESVNQTEFZX0lORk8gKHMtPmYpOworICAgICAgICAgICAgICAg IFtbZHB5aW5mby0+Yml0bWFwc1tmYWNlLT5zdGlwcGxlLTFdLmltZyBzdGlwcGxlTWFza10gc2V0 XTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIGlmIChzLT5obCAhPSBEUkFXX0NVUlNPUikK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgcy0+cmVjdGFuZ2xlX251a2VkX3AgPSB0cnVl OworICAgICAgICAgICAgICBOU1JlY3QgciA9IE5TTWFrZVJlY3QgKHMtPngsIHMtPnkgKyBib3hf bGluZV93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPmJhY2tn cm91bmRfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzLT5oZWln aHQtMipib3hfbGluZV93aWR0aCk7CisgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAg ICAgICAgICAgfQorICAgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSAxOworICAgICAg ICB9CisgICAgfQorfQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHJhd19nbHlwaF9zdHJpbmcgKHN0 cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0 IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0Ig bHNsLCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAg ICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBpbnQgd2QsIGJvb2wgYWN0aXZlX3AsIGJvb2wgY3Vyc29yX2djX3ApCisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLQorICAgICAgRXh0ZXJuYWwgKFJJRik6IE1haW4gZHJhdy10ZXh0IGNhbGwuCisg ICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworeworICAvKiBUT0RPIChvcHRpbWl6ZSk6IGZvY3VzIGZv ciBib3ggYW5kIGNvbnRlbnRzIGRyYXcgKi8KKyAgTlNSZWN0IHJbMl07CisgIGludCBuLCBmbGFn czsKKyAgY2hhciBib3hfZHJhd25fcCA9IDA7CisgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFj ZS0+Zm9udDsKKyAgaWYgKCFmb250KQorICAgIGZvbnQgPSBGUkFNRV9GT05UIChzLT5mKTsKKyAg TlNUUkFDRV9XSEVOIChOU1RSQUNFX0dST1VQX0dMWVBIUywgIm1jX25zX2RyYXdfZ2x5cGhfc3Ry aW5nIik7CisgIGlmIChzLT5uZXh0ICYmIHMtPnJpZ2h0X292ZXJoYW5nICYmICFzLT5mb3Jfb3Zl cmxhcHMpCisgICAgeworICAgICAgaW50IHdpZHRoOworICAgICAgc3RydWN0IGdseXBoX3N0cmlu ZyAqbmV4dDsKKyAgICAgIGZvciAod2lkdGggPSAwLCBuZXh0ID0gcy0+bmV4dDsKKyAgICAgICAg ICAgbmV4dCAmJiB3aWR0aCA8IHMtPnJpZ2h0X292ZXJoYW5nOworICAgICAgICAgICB3aWR0aCAr PSBuZXh0LT53aWR0aCwgbmV4dCA9IG5leHQtPm5leHQpCisgICAgICAgIGlmIChuZXh0LT5maXJz dF9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBp ZiAobmV4dC0+Zmlyc3RfZ2x5cGgtPnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAo cy0+bmV4dCwgcik7CisgICAgICAgICAgICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYs IHIsIG4pKQorICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIG1jX25z X21heWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZCAocy0+bmV4dCwgMSk7CisgICAgICAgICAgICAg ICAgbnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgICAgICAgICB9CisgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgIG1jX25zX2R1bXBnbHlwaHNfc3RyZXRjaCAocy0+bmV4dCwg bWF0cml4LCByb3csIHdkKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7CisgICAg ICAgICAgfQorICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMgJiYgcy0+ZmFjZS0+Ym94ICE9 IEZBQ0VfTk9fQk9YCisgICAgICAmJiAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQ SAorICAgICAgICAgIHx8IHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCkp CisgICAgeworICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsK KyAgICAgIGlmICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJu OworICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLCAxKTsKKyAgICAg IG5zX2R1bXBnbHlwaHNfYm94X29yX3JlbGllZiAocyk7CisgICAgICBuc19yZXNldF9jbGlwcGlu ZyAocy0+Zik7CisgICAgICBib3hfZHJhd25fcCA9IDE7CisgICAgfQorICBzd2l0Y2ggKHMtPmZp cnN0X2dseXBoLT50eXBlKQorICAgIHsKKyAgICBjYXNlIElNQUdFX0dMWVBIOgorICAgICAgbiA9 IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICghbnNfY2xp cF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgbWNfbnNfZHVt cGdseXBoc19pbWFnZSAocywgclswXSwgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCBh Y3RpdmVfcCk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBicmVhazsK KyAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CisgICAgICBtY19uc19kdW1wZ2x5cGhzX3N0cmV0Y2gg KHMsIG1hdHJpeCwgcm93LCB3ZCk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENIQVJfR0xZUEg6 CisgICAgY2FzZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0cmlu Z19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIs IG4pKQorICAgICAgICByZXR1cm47CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBzCisgICAgICAg ICAgfHwgKHMtPmNtcF9mcm9tID4gMAorICAgICAgICAgICAgICAmJiAhIHMtPmZpcnN0X2dseXBo LT51LmNtcC5hdXRvbWF0aWMpKQorICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gMTsK KyAgICAgIGVsc2UKKyAgICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChz LCBzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpOworICAgICAgZmxhZ3Mg PSBzLT5obCA9PSBEUkFXX0NVUlNPUiA/IE5TX0RVTVBHTFlQSF9DVVJTT1IgOgorICAgICAgICAo cy0+aGwgPT0gRFJBV19NT1VTRV9GQUNFID8gTlNfRFVNUEdMWVBIX01PVVNFRkFDRSA6CisgICAg ICAgICAocy0+Zm9yX292ZXJsYXBzID8gTlNfRFVNUEdMWVBIX0ZPUkVHUk9VTkQgOgorICAgICAg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UgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SCisgICAg ICAgICAgICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWAorICAgICAgICAg ICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVt IGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+ dywgcy0+ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNl IiksIHRydWUpOworICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2Zh Y2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAg ICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VO RCAoaG9sbG93X2luYWN0aXZlX2ZhY2UpOworICAgICAgICAgICAgfQorICAgICAgeworICAgICAg ICBCT09MIGlzQ29tcG9zaXRlID0gcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dM WVBIOworICAgICAgICBpZiAoaXNDb21wb3NpdGUpCisgICAgICAgICAgbnNfZHJhd19jb21wb3Np dGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMpOworICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3AgPSAoKGZsYWdzID09IE5TX0RVTVBH TFlQSF9OT1JNQUwgJiYgIXMtPmJhY2tncm91bmRfZmlsbGVkX3ApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHx8IGZsYWdzID09IE5TX0RVTVBHTFlQSF9NT1VTRUZBQ0UpOworICAg ICAgICAgICAgICBpZiAod2l0aF9iZ19wKQorICAgICAgICAgICAgICAgIHMtPmJhY2tncm91bmRf bnVrZWRfcCA9IHRydWU7CisgICAgICAgICAgICAgIGZvbnQtPmRyaXZlci0+ZHJhdyAocywgcy0+ Y21wX2Zyb20sIHMtPm5jaGFycywgcy0+eCwgcy0+eWJhc2UsIHdpdGhfYmdfcCk7CisgICAgICAg ICAgICB9CisgICAgICB9CisgICAgICB7CisgICAgICAgIE5TQ29sb3IgKmNvbCA9IChOU19GQUNF X0ZPUkVHUk9VTkQgKHMtPmZhY2UpICE9IDAKKyAgICAgICAgICAgICAgICAgICAgICAgID8gbnNf bG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSksCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzLT5mKQorICAg ICAgICAgICAgICAgICAgICAgICAgOiBGUkFNRV9GT1JFR1JPVU5EX0NPTE9SIChzLT5mKSk7Cisg ICAgICAgIFtjb2wgc2V0XTsKKyAgICAgICAgLyogRHJhdyB1bmRlcmxpbmUsIG92ZXJsaW5lLCBz dHJpa2UtdGhyb3VnaC4gKi8KKyAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMs IHMtPmZhY2UsIGNvbCwgcy0+d2lkdGgsIHMtPngpOworICAgICAgfQorICAgICAgeworICAgICAg ICBpZiAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgIT0gQ09NUE9TSVRFX0dMWVBICisgICAgICAgICAg ICAmJiAocy0+bGVmdF9vdmVyd3JpdHRlbl9wIHx8IHMtPnJpZ2h0X292ZXJ3cml0dGVuX3ApCisg ICAgICAgICAgICAmJiAocy0+YmFja2dyb3VuZF9udWtlZF9wIHx8IHMtPnJlY3RhbmdsZV9udWtl ZF9wKQorICAgICAgICAgICAgJiYgKHMtPmFjdGlvbl90eXBlID09IE1DX0RSQVdfR0xZUEggfHwg cy0+YWN0aW9uX3R5cG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DE7CisgICAg ICBlbHNlCisgICAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZCAocywgcy0+ Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKTsKKyAgICAgIC8qIC4uLiAqLwor ICAgICAgLyogTm90IHlldCBpbXBsZW1lbnRlZC4gKi8KKyAgICAgIC8qIC4uLiAqLworICAgICAg bnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAg ICAgIGVtYWNzX2Fib3J0ICgpOworICAgIH0KKyAgLyogRHJhdyBib3ggaWYgbm90IGRvbmUgYWxy ZWFkeS4gKi8KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMgJiYgIWJveF9kcmF3bl9wICYmIHMtPmZh Y2UtPmJveCAhPSBGQUNFX05PX0JPWCkKKyAgICB7CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0 cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYs IHIsIG4pKQorICAgICAgICByZXR1cm47CisgICAgICBuc19kdW1wZ2x5cGhzX2JveF9vcl9yZWxp ZWYgKHMpOworICAgICAgbnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgIH0KKyAgcy0+bnVt X2NsaXBzID0gMDsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKICAgIE5TVFJBQ0UsIFRy YWNlIHN1cHBvcnQuCkBAIC0xMTA5LDYgKzIwODIsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJh aW5fZnJhbWVfcmVjdChOU1JlY3QgZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKICAgIGV4 dGVybmFsIChSSUYpIGNhbGw7IHdob2xlIGZyYW1lLCBjYWxsZWQgYmVmb3JlIHVwZGF0ZV93aW5k b3dfYmVnaW4KICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCiB7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJh bWUgPSBmOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAjaWZkZWYgTlNfSU1QTF9D T0NPQQogICBFbWFjc1ZpZXcgKnZpZXcgPSBGUkFNRV9OU19WSUVXIChmKTsKIApAQCAtMTIwOSw2 ICsyMTkyLDE2IEBAIHN0YXRpYyBOU1JlY3QgY29uc3RyYWluX2ZyYW1lX3JlY3QoTlNSZWN0IGZy YW1lUmVjdCwgYm9vbCBpc0Z1bGxzY3JlZW4pCiAKIC8qICAgaWYgKGYgPT0gTU9VU0VfSExfSU5G TyAoZiktPm1vdXNlX2ZhY2VfbW91c2VfZnJhbWUpICovCiAgIE1PVVNFX0hMX0lORk8gKGYpLT5t b3VzZV9mYWNlX2RlZmVyID0gMDsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC00ODAzLDYgKzU3OTYsMTcgQEAg aW4gY2VydGFpbiBzaXR1YXRpb25zIChyYXBpZCBpbmNvbWluZyBldmVudHMpLgogICAgICAgYmFy ID0gW1tFbWFjc1Njcm9sbGVyIGFsbG9jXSBpbml0RnJhbWU6IHIgd2luZG93OiB3aW5dOwogICAg ICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyICh3aW5kb3csIG1ha2VfbWludF9wdHIgKGJhcikp OwogICAgICAgdXBkYXRlX3AgPSBZRVM7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIC8qIFRoaXMgaXMgb25seSBmb3IgZGVidWdn aW5nIHB1cnBvc2VzLiAqLworICAgICAgW2JhciBtY19zZXRfcmVjdGFuZ2xlOiByXTsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KICAgZWxzZQogICAgIHsKQEAgLTQ4MTAs MTIgKzU4MTQsMzAgQEAgaW4gY2VydGFpbiBzaXR1YXRpb25zIChyYXBpZCBpbmNvbWluZyBldmVu dHMpLgogICAgICAgYmFyID0gWE5TX1NDUk9MTF9CQVIgKHdpbmRvdy0+dmVydGljYWxfc2Nyb2xs X2Jhcik7CiAgICAgICBvbGRSZWN0ID0gW2JhciBmcmFtZV07CiAgICAgICByLnNpemUud2lkdGgg PSBvbGRSZWN0LnNpemUud2lkdGg7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKICAgICAgIGlmIChGUkFNRV9MSVZFX1AgKGYpICYmICFOU0Vx dWFsUmVjdHMgKG9sZFJlY3QsIHIpKQogICAgICAgICB7CisgICAgICAgICAgLyogVGhlIG1haW4g d2luZG93IGhhcyBwcm9iYWJseSBiZWVuIHJlc2l6ZWQuICBHcmFjaW91c2x5IGRlbGV0ZSB0aGUK KyAgICAgICAgICBvbGQgc2Nyb2xsIGJhciB3aXRob3V0IHJlcGFpbnRpbmcgaXRzIHJlY3Rhbmds ZTsgYW5kLCBjcmVhdGUgYSBuZXcKKyAgICAgICAgICBzY3JvbGwgYmFyIGVsc2V3aGVyZS4qLwog ICAgICAgICAgIGlmIChvbGRSZWN0Lm9yaWdpbi54ICE9IHIub3JpZ2luLngpCisgICAgICAgICAg ICB7CiAgICAgICAgICAgICAgIG5zX2NsZWFyX2ZyYW1lX2FyZWEgKGYsIGxlZnQsIHRvcCwgd2lk dGgsIGhlaWdodCk7CisgICAgICAgICAgICAgIFtiYXIgbWNfanVkZ2VdOworICAgICAgICAgICAg ICBiYXIgPSBbW0VtYWNzU2Nyb2xsZXIgYWxsb2NdIGluaXRGcmFtZTogciB3aW5kb3c6IHdpbl07 CisgICAgICAgICAgICAgIHdzZXRfdmVydGljYWxfc2Nyb2xsX2JhciAod2luZG93LCBtYWtlX21p bnRfcHRyIChiYXIpKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKICAgICAgICAg ICBbYmFyIHNldEZyYW1lOiByXTsKICAgICAgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgICAgfQogCiAgIGlmICh1cGRhdGVfcCkKQEAgLTQ5NzUsOSArNTk5Nyw1NyBAQCBp biBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlkIGluY29taW5nIGV2ZW50cykuCiAgICAgewogICAg ICAgdmlldyA9IFtzdWJ2aWV3cyBvYmplY3RBdEluZGV4OiBpXTsKICAgICAgIGlmICghW3ZpZXcg aXNLaW5kT2ZDbGFzczogW0VtYWNzU2Nyb2xsZXIgY2xhc3NdXSkgY29udGludWU7Ci0gICAgICBp ZiAoW3ZpZXcganVkZ2VdKQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCisgIC8qIGBYU0VUV0lORE9XJyB3aWxsIHNvbWV0aW1lcyBjYXVzZSBF bWFjcyB0byBjcmFzaCB3aGVuIHJ1bm5pbmcgdW5kZXIgZ2RiIGV2ZW4KKyAgdGhvdWdoICh3ICE9 IE5VTEwpLiAgVGhlcmVmb3JlLCB3ZSBjYW5ub3QgcmVsaWFibHkgdXNlIGBXSU5ET1dfTElWRV9Q Jy4gKi8KKyAgc3RydWN0IHdpbmRvdyAqdyA9IFt2aWV3IG1jX2dldF93aW5kb3ddOworICBpZiAo dyAhPSBOVUxMCisgICAgICAmJiBOSUxQICh3LT5jb250ZW50cykpCisgICAgeworICAgICAgQk9P TCBkZWJ1Z19wID0gZmFsc2U7CisgICAgICBpZiAoZGVidWdfcAorICAgICAgICAgIC8qIGB3aW5k b3dfYm94JyBjYWxscyBgd2luZG93X2JveF9oZWlnaHQnLCB3aGljaCB3aWxsIGNhdXNlIEVtYWNz IHRvCisgICAgICAgICAgY3Jhc2ggaWYgRlJBTUVQICh3LT5mcmFtZSkgaXMgbm90IHNhdGlzZmll ZC4gKi8KKyAgICAgICAgICAmJiBGUkFNRVAgKHctPmZyYW1lKSkKKyAgICAgICAgeworICAgICAg ICAgIE5TUmVjdCByMCA9IFt2aWV3IG1jX2dldF9yZWN0YW5nbGVdOworICAgICAgICAgIGludCB4 MCA9IE5TTWluWCAocjApOworICAgICAgICAgIGludCB5MCA9IE5TTWluWSAocjApOworICAgICAg ICAgIGludCB3ZDAgPSBOU1dpZHRoIChyMCk7CisgICAgICAgICAgaW50IGgwID0gTlNIZWlnaHQg KHIwKTsKKyAgICAgICAgICBpbnQgd2luZG93X3ksIHdpbmRvd19oZWlnaHQ7CisgICAgICAgICAg d2luZG93X2JveCAodywgQU5ZX0FSRUEsIDAsICZ3aW5kb3dfeSwgMCwgJndpbmRvd19oZWlnaHQp OworICAgICAgICAgIGludCB0b3AgPSB3aW5kb3dfeTsKKyAgICAgICAgICBpbnQgaGVpZ2h0ID0g d2luZG93X2hlaWdodDsKKyAgICAgICAgICBpbnQgd2lkdGggPSBXSU5ET1dfQ09ORklHX1NDUk9M TF9CQVJfQ09MUyAodykgKiBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICAgICAgICAgIGludCBs ZWZ0ID0gV0lORE9XX1NDUk9MTF9CQVJfQVJFQV9YICh3KTsKKyAgICAgICAgICBOU1JlY3QgcjEg PSBOU01ha2VSZWN0IChsZWZ0LCB0b3AsIHdpZHRoLCBoZWlnaHQpOworICAgICAgICAgIC8qIFRo ZSBwYXJlbnQgdmlldyBpcyBmbGlwcGVkLCBzbyB3ZSBuZWVkIHRvIGZsaXAgeSB2YWx1ZS4gKi8K KyAgICAgICAgICBFbWFjc1ZpZXcgKmZyYW1lX3ZpZXcgPSBGUkFNRV9OU19WSUVXIChmKTsKKyAg ICAgICAgICBOU1JlY3QgdiA9IFtmcmFtZV92aWV3IGZyYW1lXTsKKyAgICAgICAgICByMS5vcmln aW4ueSA9ICh2LnNpemUuaGVpZ2h0IC0gcjEuc2l6ZS5oZWlnaHQgLSByMS5vcmlnaW4ueSk7Cisg ICAgICAgICAgaW50IHgxID0gTlNNaW5YIChyMSk7CisgICAgICAgICAgaW50IHkxID0gTlNNaW5Z IChyMSk7CisgICAgICAgICAgaW50IHdkMSA9IE5TV2lkdGggKHIxKTsKKyAgICAgICAgICBpbnQg aDEgPSBOU0hlaWdodCAocjEpOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiVzIC0tIERF QUQ6XG5cCisgICAgICAgICAgeDAveDEgKCVkLyVkKSB8IHkwL3kxICglZC8lZCkgfCB3ZDAvd2Qx ICglZC8lZCkgfCBoMC9oMSAoJWQvJWQpXG4iLAorICAgICAgICAgIG1jX3dpbmRvdyAodyksIHgw LCB4MSwgeTAsIHkxLCB3ZDAsIHdkMSwgaDAsIGgxKTsKKyAgICAgICAgfQorICAgICAgaWYgKFt2 aWV3IG1jX2p1ZGdlXSkKICAgICAgICAgcmVtb3ZlZCA9IFlFUzsKICAgICB9CisgICAgZWxzZSBp ZiAoW3ZpZXcganVkZ2VdKQorICAgICAgcmVtb3ZlZCA9IFlFUzsKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKworICAgIH0KIAogICBpZiAocmVtb3ZlZCkKICAgICBbZXZpZXcgdXBkYXRl RnJhbWVTaXplOiBOT107CkBAIC01MTA2LDYgKzYxNzYsMjEgQEAgc3RhdGljIExpc3BfT2JqZWN0 IG5zX3N0cmluZ190b19saXNwbW9kIChjb25zdCBjaGFyICpzKQogZXh0ZXJuIGZyYW1lX3Bhcm1f aGFuZGxlciBuc19mcmFtZV9wYXJtX2hhbmRsZXJzW107CiBzdGF0aWMgc3RydWN0IHJlZGlzcGxh eV9pbnRlcmZhY2UgbnNfcmVkaXNwbGF5X2ludGVyZmFjZSA9CiB7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIGByZWRpc3BsYXlfaW50 ZXJmYWNlJyBpbiBgbnN0ZXJtLm1gIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMg dGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgbWNf eF93cml0ZV9nbHlwaHMsCisgIG1jX25zX2RyYXdfd2luZG93X2N1cnNvciwKKyAgbWNfbnNfZHJh d19nbHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgbnNfZnJh bWVfcGFybV9oYW5kbGVycywKICAgeF9wcm9kdWNlX2dseXBocywKICAgeF93cml0ZV9nbHlwaHMs CkBAIC04NzIxLDYgKzk4MDYsNDkgQEAgLSAoQk9PTCljYW5CZWNvbWVNYWluV2luZG93CiAKIEBp bXBsZW1lbnRhdGlvbiBFbWFjc1Njcm9sbGVyCiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5T UmVjdClyZWN0Cit7CisgIG1jX3JlY3RhbmdsZSA9IHJlY3Q7Cit9CisKKy0gKE5TUmVjdCltY19n ZXRfcmVjdGFuZ2xlCit7CisgIHJldHVybiBtY19yZWN0YW5nbGU7Cit9CisKKy0gKHN0cnVjdCB3 aW5kb3cgKiltY19nZXRfd2luZG93Cit7CisgIHJldHVybiB3aW5kb3c7Cit9CisKKy0gKGJvb2wp bWNfanVkZ2UKK3sKKyAgTlNUUkFDRSAoIltFbWFjc1Njcm9sbGVyIG1jX2p1ZGdlXSIpOworICBi b29sIHJldCA9IGNvbmRlbW5lZDsKKyAgYmxvY2tfaW5wdXQgKCk7CisgIGlmIChjb25kZW1uZWQp CisgICAgeworICAgICAgLyogZW5zdXJlIG90aGVyIHNjcm9sbGJhciB1cGRhdGVzIGFmdGVyIGRl bGV0aW9uICovCisgICAgICBFbWFjc1ZpZXcgKnZpZXcgPSAoRW1hY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gfQorfQorCisvKiBEcmF3IHN0cmV0Y2ggZ2x5cGggc3RyaW5nIFMuICAq Lworc3RhdGljIHZvaWQKK21jX3czMl9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChzdHJ1Y3Qg Z2x5cGhfc3RyaW5nICpzKQoreworICBlYXNzZXJ0IChzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBT VFJFVENIX0dMWVBIKTsKKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SCisgICAgICAmJiAheF9z dHJldGNoX2N1cnNvcl9wKQorICAgIHsKKyAgICAgIC8qIElmIGB4LXN0cmV0Y2gtY3Vyc29yJyBp cyBuaWwsIGRvbid0IGRyYXcgYSBibG9jayBjdXJzb3IgYXMKKyAgIHdpZGUgYXMgdGhlIHN0cmV0 Y2ggZ2x5cGguICAqLworICAgICAgaW50IHdpZHRoLCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFj a2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4ID0gcy0+eDsKKyAgICAgIGlmICghcy0+cm93LT5y ZXZlcnNlZF9wKQorICAgICAgICB7CisgICAgICAgICAgaW50IGxlZnRfeCA9IHdpbmRvd19ib3hf bGVmdF9vZmZzZXQgKHMtPncsIFRFWFRfQVJFQSk7CisgICAgICAgICAgaWYgKHggPCBsZWZ0X3gp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGJhY2tncm91bmRfd2lkdGggLT0gbGVmdF94 IC0geDsKKyAgICAgICAgICAgICAgeCA9IGxlZnRfeDsKKyAgICAgICAgICAgIH0KKyAgICAgICAg fQorICAgICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAgIC8qIEluIFIyTCByb3dzLCBkcmF3 IHRoZSBjdXJzb3Igb24gdGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlCisgICAgICAgICAgICAgc3RyZXRj aCBnbHlwaC4gICovCisgICAgICAgICAgaW50IHJpZ2h0X3ggPSB3aW5kb3dfYm94X3JpZ2h0IChz LT53LCBURVhUX0FSRUEpOworICAgICAgICAgIGlmICh4ICsgYmFja2dyb3VuZF93aWR0aCA+IHJp Z2h0X3gpCisgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IHggLSByaWdodF94OworICAg ICAgICAgIHggKz0gYmFja2dyb3VuZF93aWR0aDsKKyAgICAgICAgfQorICAgICAgd2lkdGggPSBt aW4gKEZSQU1FX0NPTFVNTl9XSURUSCAocy0+ZiksIGJhY2tncm91bmRfd2lkdGgpOworICAgICAg aWYgKHMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeCAtPSB3aWR0aDsKKyAgICAgIC8qIERy YXcgY3Vyc29yLiAgKi8KKyAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwg cy0+eSwgd2lkdGgsIHMtPmhlaWdodCk7CisgICAgICAvKiBDbGVhciByZXN0IHVzaW5nIHRoZSBH QyBvZiB0aGUgb3JpZ2luYWwgbm9uLWN1cnNvciBmYWNlLiAgKi8KKyAgICAgIGlmICh3aWR0aCA8 IGJhY2tncm91bmRfd2lkdGgpCisgICAgICAgIHsKKyAgICAgICAgICBYR0NWYWx1ZXMgKmdjID0g cy0+ZmFjZS0+Z2M7CisgICAgICAgICAgaW50IHkgPSBzLT55OworICAgICAgICAgIGludCB3ID0g YmFja2dyb3VuZF93aWR0aCAtIHdpZHRoLCBoID0gcy0+aGVpZ2h0OworICAgICAgICAgIFJFQ1Qg cjsKKyAgICAgICAgICAgICAgICBIREMgaGRjID0gcy0+aGRjOworICAgICAgICAgIGlmICghcy0+ cm93LT5yZXZlcnNlZF9wKQorICAgICAgICAgICAgeCArPSB3aWR0aDsKKyAgICAgICAgICBlbHNl CisgICAgICAgICAgICB4ID0gcy0+eDsKKyAgICAgICAgICBpZiAocy0+cm93LT5tb3VzZV9mYWNl X3AKKyAgICAgICAgICAgICAgJiYgY3Vyc29yX2luX21vdXNlX2ZhY2VfcCAocy0+dykpCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIHhfc2V0X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAg ICAgICAgICBnYyA9IHMtPmdjOworICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAg ICAgICAgIGdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICAgICAgZ2V0X2dseXBoX3N0cmluZ19jbGlw X3JlY3QgKHMsICZyKTsKKyAgICAgICAgICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChoZGMsICZy KTsKKyNpZiAwIC8qIFRPRE86IHN0aXBwbGUgKi8KKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3Rp cHBsZSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogRmlsbCBiYWNrZ3JvdW5kIHdp dGggYSBzdGlwcGxlIHBhdHRlcm4uICAqLworICAgICAgICAgICAgICBYU2V0RmlsbFN0eWxlIChz LT5kaXNwbGF5LCBnYywgRmlsbE9wYXF1ZVN0aXBwbGVkKTsKKyAgICAgICAgICAgICAgWEZpbGxS ZWN0YW5nbGUgKHMtPmRpc3BsYXksIHMtPndpbmRvdywgZ2MsIHgsIHksIHcsIGgpOworICAgICAg ICAgICAgICBYU2V0RmlsbFN0eWxlIChzLT5kaXNwbGF5LCBnYywgRmlsbFNvbGlkKTsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgICBlbHNlCisjZW5kaWYKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBnYy0+YmFja2dyb3VuZCwgeCwgeSwg dywgaCk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UgaWYgKCFzLT5i YWNrZ3JvdW5kX2ZpbGxlZF9wKQorICAgIHsKKyAgICAgIGludCBiYWNrZ3JvdW5kX3dpZHRoID0g cy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4ID0gcy0+eCwgbG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lbHNlIGlmIChzLT5obCA9PSBEUkFXX01PVVNFX0ZB Q0UpCisgICAgeworICAgICAgeF9zZXRfbW91c2VfZmFjZV9nYyAocyk7CisgICAgICBzLT5zdGlw cGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAwOworICAgIH0KKyAgZWxzZSBpZiAocy0+aGwg PT0gRFJBV19JTUFHRV9SQUlTRUQKKyAgICAgICAgICAgfHwgcy0+aGwgPT0gRFJBV19JTUFHRV9T VU5LRU4pCisgICAgeworICAgICAgcy0+Z2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgIHMtPnN0aXBw bGVkX3AgPSBzLT5mYWNlLT5zdGlwcGxlICE9IDA7CisgICAgfQorICBlbHNlCisgICAgZW1hY3Nf YWJvcnQgKCk7CisgIC8qIEdDIG11c3QgaGF2ZSBiZWVuIHNldC4gICovCisgIGVhc3NlcnQgKHMt PmdjICE9IDApOworfQorCisvKiBEcmF3IGEgaG9sbG93IGJveCBjdXJzb3Igb24gd2luZG93IFcg aW4gZ2x5cGggcm93IFJPVy4gICovCitzdGF0aWMgdm9pZAorbWNfdzMyX2RyYXdfaG9sbG93X2N1 cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgeCwgaW50 IGZ4LCBpbnQgeSwgaW50IGZ5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhwb3Ms IGludCB2cG9zLCBpbnQgd2QsIGludCBoKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUg KFdJTkRPV19GUkFNRSAodykpOworICBIREMgaGRjOworICBSRUNUIHJlY3Q7CisgIEhCUlVTSCBo YiA9IENyZWF0ZVNvbGlkQnJ1c2ggKGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsKTsK KyAgLyogR2V0IHRoZS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Swgb24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUgZ2x5cGgncyBj b2xvcnMgYXJlIGNob3NlbiBzbworICAgICAgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICov CisgICAgICBpZiAoZmFjZS0+YmFja2dyb3VuZCA9PSBjdXJzb3JfY29sb3IKKyAgICAgICAgICAm JiAhY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApCisgICAgICAgIGN1cnNvcl9jb2xvciA9IGZh Y2UtPmZvcmVncm91bmQ7CisgICAgICBpbnQgZGVmYXVsdF9meCA9IFdJTkRPV19URVhUX1RPX0ZS QU1FX1BJWEVMX1ggKHcsIHgpOworICAgICAgaGRjID0gZ2V0X2ZyYW1lX2RjIChmKTsKKyAgICAg IHczMl9jbGlwX3RvX3JvdyAodywgcm93LCBURVhUX0FSRUEsIGhkYyk7CisgICAgICBpbnQgcngg PSBmeDsKKyAgICAgIGludCByeSA9IGZ5OworICAgICAgaW50IHJ3ID0gd2Q7CisgICAgICBpbnQg cmggPSBoOworLyoKKyAgICBmcHJpbnRmIChzdGRlcnIsICJNQ19IQkFSOiAgZnggKCVkKSB8IGZ5 ICglZCkgfCB3ZCAoJWQpIHwgaCAoJWQpXG4iLCByeCwgcnksIHJ3LCByaCk7CisqLworICAgICAg dzMyX2ZpbGxfYXJlYSAoZiwgaGRjLCBjdXJzb3JfY29sb3IsIHJ4LCByeSwgcncsIHJoKTsKKyAg ICAgIHczMl9zZXRfY2xpcF9yZWN0YW5nbGUgKGhkYywgTlVMTCk7CisgICAgICByZWxlYXNlX2Zy YW1lX2RjIChmLCBoZGMpOworICAgIH0KK30KKworLyogUklGOiBEcmF3IG9yIGNsZWFyIGN1cnNv ciBvbiB3aW5kb3cgVy4gICovCitzdGF0aWMgdm9pZAorbWNfdzMyX2RyYXdfd2luZG93X2N1cnNv ciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3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fbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2Ug PSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7 CisgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX3Jl Z2lvbl9lbmRfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgYWN0 aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID4g cmVnaW9uX2JlZworICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJw b3MgPCByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2VfaWQgPSBsb29rdXBf bmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluLXJlZ2lvbi1w cmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xs b3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19h Y3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZV9pZCk7CisgIC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0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBo cG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2Zs YXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAg IGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAg ICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNr IGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91 dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgbWNf dzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBv cywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3Bp eGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYg KGN1cnNvcl9nbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCAmJiBsc2wucmVkID49IDAgJiYgbHNs LmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4g ICovCisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9y X3BpeGVsOworICAgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4 LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgICAgZi0+ b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7Cisg ICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg LyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycgYnkg Ym9ycm93aW5nIHRoZQorICAgICAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2Mn IGluIHczMmZucy5jLiAgKi8KKyAgICAgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAg ICAgICAgICAgICAgICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9n bHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fYmVnKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCA9 IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQt cmVnaW9uLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZh Y2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xs b3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBlbnVtIGZh Y2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAg ICA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ZSk7CisgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxv d19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3Jv dW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAg ICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlLT5i YWNrZ3JvdW5kOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBp ZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID4g cmVnaW9uX2JlZworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5j aGFycG9zIDwgcmVnaW9uX2VuZCkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2Vf aWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29y LWluLXJlZ2lvbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICBz dHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlID0gRkFDRV9GUk9N X0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2VfaWQpOworICAgICAgICAg ICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBf bmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNl IiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0 aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAg ICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2Zh Y2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91 bmQgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UtPmZvcmVncm91bmQ7CisgICAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoYWN0aXZlX3Ap CisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBm YWNlX2lkIGhvbGxvd19hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBp bnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAg ICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7 CisgICAgICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19h Y3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0 aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZh a2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfaW5hY3RpdmVfZmFjZS0+Zm9yZWdyb3Vu ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xs b3dfaW5hY3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MgPSBYQ3JlYXRlR0Mg KE5VTEwsIEZSQU1FX1czMl9XSU5ET1cgKGYpLCBtYXNrLCAmZ2NfdmFsdWVzKTsKKyAgICAgICAg ICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIC8qIEZvcmNlIGBtY193MzJfc2V0 X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycuICAq LworICAgICAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICAgICAg bWNfZHJhd19jdXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBv cywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhf Zmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAgICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2dj OworICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICBtY193MzJf ZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2 cG9zLCB3ZCwgaCk7CisgICAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2Fz ZSBNQ19IT0xMT1dfQk9YOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdy ZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBv cmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAgKi8KKyAg ICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOwor ICAgICAgICAgIG1jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53 MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAg ICAgICBlbHNlCisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N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wID0gdHJ1ZTsKKyAgICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4 LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwg Y3Vyc29yX2djX3ApOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0g b3JpZ2luYWxfY3Vyc29yX2djOworICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAg IH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2dj X3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgs IHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3As CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX2djX3ApOworICAgICAg ICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0JBUjoKKyAgICB7CisgICAg ICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisg ICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX3BpeGVsJy4gICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5j dXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZp c2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY193MzJfZHJhd19iYXJfY3Vyc29yICh3 LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1DX0JBUiwgY3Vyc29yX2dj X2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UK KyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9w ID0gZmFsc2U7CisgICAgICAgICAgICBtY193MzJfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgs IHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNp YmxlX29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2Ug TUNfSEJBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAw ICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBo aWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gICovCisgICAgICAgICAg Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAg ICBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY193 MzJfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2 cG9zLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lk dGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICBmLT5v dXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAg ICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJz b3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfdzMyX2RyYXdf YmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2Qs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1D X0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICB9CisgICAgICBi cmVhazsKKyAgICB9CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgpOworICB9Cisg ICAgfQorfQorCisvKiBEcmF3IGdseXBoIHN0cmluZyBTLiAgKi8KK3N0YXRpYyB2b2lkCittY193 MzJfZHJhd19nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlw aF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9y LAorICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90 eXBlLCBpbnQgY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mdfZm9yZWdyb3VuZCAocyk7Cisg ICAgICBicmVhazsKKyAgICBjYXNlIENPTVBPU0lURV9HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jf b3ZlcmxhcHMgfHwgKHMtPmNtcF9mcm9tID4gMAorICAgICAgICAgICYmICEgcy0+Zmlyc3RfZ2x5 cGgtPnUuY21wLmF1dG9tYXRpYykpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0 cnVlOworICAgICAgZWxzZQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQg KHMsIHRydWUpOworICAgICAgeF9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3Vu ZCAocyk7CisgICAgICBicmVhazsKKyAgICBjYXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAgIGlm IChzLT5mb3Jfb3ZlcmxhcHMpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVl OworICAgICAgZWxzZQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMs IGZhbHNlKTsKKyAgICAgIHhfZHJhd19nbHlwaGxlc3NfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQg KHMpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgpOwor ICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMpCisgICAgeworICAgICAgLyogRHJhdyB1bmRl cmxpbmUuICAqLworICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9wKQorICAgICAgICB7Cisg ICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgQ09MT1JSRUYgY29sb3I7CisgICAgICAgICAg ICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICAgICAg Y29sb3IgPSBzLT5nYy0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgIGNvbG9yID0gcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yOworICAgICAgICAgICAgICB3 MzJfZHJhd191bmRlcndhdmUgKHMsIGNvbG9yKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBl bHNlIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlv bjsKKyAgICAgICAgICAgICAgaW50IHk7CisgICAgICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMt PnByZXYtPmZhY2UtPnVuZGVybGluZV9wCisgICAgICAgICAgICAgICAgICAmJiBzLT5wcmV2LT5m YWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgLyogV2UgdXNlIHRoZSBzYW1lIHVuZGVybGluZSBzdHlsZSBh cyB0aGUgcHJldmlvdXMgb25lLiAgKi8KKyAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMt PnByZXYtPnVuZGVybGluZV90aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9 IHMtPnByZXYtPnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAvKiBHZXQg dGhlIHVuZGVybGluZSB0aGlja25lc3MuICBEZWZhdWx0IGlzIDEgcGl4ZWwuICAqLworICAgICAg ICAgICAgICAgICAgaWYgKHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzcyA+ IDApCisgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPmZvbnQtPnVuZGVybGluZV90 aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHRo aWNrbmVzcyA9IDE7CisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2Vu dF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSB0aGlj a25lc3MpIC0gKHMtPnliYXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVy bGluZSBwb3NpdGlvbi4gIFRoaXMgaXMgdGhlIHJlY29tbWVuZGVkCisgICAgICAgICAgICAgICAg ICAgICAgICAgdmVydGljYWwgb2Zmc2V0IGluIHBpeGVscyBmcm9tIHRoZSBiYXNlbGluZSB0byB0 aGUgdG9wIG9mCisgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHVuZGVybGluZS4gIFRoaXMg aXMgYSBzaWduZWQgdmFsdWUgYWNjb3JkaW5nIHRvIHRoZQorICAgICAgICAgICAgICAgICAgICAg ICAgIHNwZWNzLCBhbmQgaXRzIGRlZmF1bHQgaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICBS T1VORCAoKG1heGltdW1fZGVzY2VudCkgLyAyKSwgd2l0aAorICAgICAgICAgICAgICAgICAgICAg ICAgIFJPVU5EICh4KSA9IGZsb29yICh4ICsgMC41KSAgKi8KKyAgICAgICAgICAgICAgICAgICAg ICBpZiAoeF91c2VfdW5kZXJsaW5lX3Bvc2l0aW9uX3Byb3BlcnRpZXMKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgcy0+Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfcG9zaXRpb24gPj0g MCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gcy0+Zm9udC0+dW5kZXJsaW5l X3Bvc2l0aW9uOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHMtPmZvbnQpCisgICAg ICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5mb250LT5kZXNjZW50ICsgMSkgLyAy OworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IG1h eCAocG9zaXRpb24sIHVuZGVybGluZV9taW5pbXVtX29mZnNldCk7CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAvKiBDaGVjayB0aGUgc2FuaXR5IG9mIHRoaWNrbmVzcyBhbmQgcG9z aXRpb24uICBXZSBzaG91bGQKKyAgICAgICAgICAgICAgICAgYXZvaWQgZHJhd2luZyB1bmRlcmxp bmUgb3V0IG9mIHRoZSBjdXJyZW50IGxpbmUgYXJlYS4gICovCisgICAgICAgICAgICAgIGlmIChz LT55ICsgcy0+aGVpZ2h0IDw9IHMtPnliYXNlICsgcG9zaXRpb24pCisgICAgICAgICAgICAgICAg cG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gMSkgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAg ICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPCBzLT55YmFzZSArIHBvc2l0aW9uICsgdGhpY2tu ZXNzKQorICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IChzLT55ICsgcy0+aGVpZ2h0KSAtIChz LT55YmFzZSArIHBvc2l0aW9uKTsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3RoaWNrbmVz cyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Bvc2l0aW9uID1wb3Np dGlvbjsKKyAgICAgICAgICAgICAgeSA9IHMtPnliYXNlICsgcG9zaXRpb247CisgICAgICAgICAg ICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICAgICAg dzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9yZWdyb3VuZCwgcy0+eCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5LCBzLT53aWR0aCwgMSk7CisgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMt PmZhY2UtPnVuZGVybGluZV9jb2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB5LCBzLT53aWR0aCwgMSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIC8q IERyYXcgb3ZlcmxpbmUuICAqLworICAgICAgaWYgKHMtPmZhY2UtPm92ZXJsaW5lX3ApCisgICAg ICAgIHsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGR5ID0gMCwgaCA9IDE7CisgICAgICAgICAg aWYgKHMtPmZhY2UtPm92ZXJsaW5lX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgdzMy X2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9yZWdyb3VuZCwgcy0+eCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOworICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmZh Y2UtPm92ZXJsaW5lX2NvbG9yLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBz LT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgfQorICAgICAgLyogRHJhdyBzdHJpa2Ut dGhyb3VnaC4gICovCisgICAgICBpZiAocy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfcAorICAgICAg ICAgICYmICFGT05UX1RFWFRNRVRSSUMgKHMtPmZvbnQpLnRtU3RydWNrT3V0KQorICAgICAgICB7 CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBoID0gMTsKKyAgICAgICAgICB1bnNpZ25lZCBsb25n IGR5ID0gKHMtPmhlaWdodCAtIGgpIC8gMjsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3RyaWtl X3Rocm91Z2hfY29sb3JfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChz LT5mLCBzLT5oZGMsIHMtPmdjLT5mb3JlZ3JvdW5kLCBzLT54LCBzLT55ICsgZHksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICBzLT53aWR0aCwgaCk7CisgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5mYWNlLT5zdHJpa2VfdGhyb3Vn aF9jb2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+ d2lkdGgsIGgpOworICAgICAgICB9CisgICAgICAvKiBEcmF3IHJlbGllZiBpZiBub3QgeWV0IGRy YXduLiAgKi8KKyAgICAgIGlmICghcmVsaWVmX2RyYXduX3AgJiYgcy0+ZmFjZS0+Ym94ICE9IEZB Q0VfTk9fQk9YKQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JveCAocyk7CisgICAgICBp ZiAocy0+cHJldikKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKnBy ZXY7CisgICAgICAgICAgZm9yIChwcmV2ID0gcy0+cHJldjsgcHJldjsgcHJldiA9IHByZXYtPnBy ZXYpCisgICAgICAgICAgICBpZiAocHJldi0+aGwgIT0gcy0+aGwKKyAgICAgICAgICAgICAgICAm JiBwcmV2LT54ICsgcHJldi0+d2lkdGggKyBwcmV2LT5yaWdodF9vdmVyaGFuZyA+IHMtPngpCisg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBwcmV2IHdhcyBkcmF3biB3aGls ZSBjbGlwcGVkIHRvIGl0cyBvd24gYXJlYSwgd2UKKyAgICAgICAgICAgICAgICAgICBtdXN0IGRy YXcgdGhlIHJpZ2h0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwgbm93LiAgKi8KKyAgICAgICAg ICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IHByZXYtPmhsOworICAgICAgICAg ICAgICAgIHByZXYtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfdzMyX3NldF9nbHlw aF9zdHJpbmdfZ2MgKHByZXYsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgICAgICB4X3NldF9n bHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywgcHJldik7CisgICAgICAgICAgICAgICAg aWYgKHByZXYtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAg ICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHByZXYpOworICAgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5n X2ZvcmVncm91bmQgKHByZXYpOworICAgICAgICAgICAgICAgIHczMl9zZXRfY2xpcF9yZWN0YW5n bGUgKHByZXYtPmhkYywgTlVMTCk7CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzYXZlOwor ICAgICAgICAgICAgICAgIHByZXYtPm51bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgfQorICAgICAgaWYgKHMtPm5leHQpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3Qg Z2x5cGhfc3RyaW5nICpuZXh0OworICAgICAgICAgIGZvciAobmV4dCA9IHMtPm5leHQ7IG5leHQ7 IG5leHQgPSBuZXh0LT5uZXh0KQorICAgICAgICAgICAgaWYgKG5leHQtPmhsICE9IHMtPmhsCisg ICAgICAgICAgICAgICAgJiYgbmV4dC0+eCAtIG5leHQtPmxlZnRfb3ZlcmhhbmcgPCBzLT54ICsg cy0+d2lkdGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBuZXh0IHdp bGwgYmUgZHJhd24gd2hpbGUgY2xpcHBlZCB0byBpdHMgb3duIGFyZWEsCisgICAgICAgICAgICAg ICAgICAgd2UgbXVzdCBkcmF3IHRoZSBsZWZ0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwgbm93 LiAgKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IG5leHQt PmhsOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAg bWNfdzMyX3NldF9nbHlwaF9zdHJpbmdfZ2MgKG5leHQsIGN1cnNvcl9nY19wKTsKKyAgICAgICAg ICAgICAgICB4X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywgbmV4dCk7Cisg ICAgICAgICAgICAgICAgaWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgp CisgICAgICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQp OworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19jb21wb3Np dGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQpOworICAgICAgICAgICAgICAgIHczMl9z ZXRfY2xpcF9yZWN0YW5nbGUgKG5leHQtPmhkYywgTlVMTCk7CisgICAgICAgICAgICAgICAgbmV4 dC0+aGwgPSBzYXZlOworICAgICAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7CisgICAg ICAgICAgICAgICAgbmV4dC0+Y2xpcF9oZWFkID0gcy0+bmV4dDsKKyAgICAgICAgICAgICAgfQor ICAgICAgICB9CisgICAgfQorICAvKiBSZXNldCBjbGlwcGluZy4gICovCisgIHczMl9zZXRfY2xp cF9yZWN0YW5nbGUgKHMtPmhkYywgTlVMTCk7CisgIHMtPm51bV9jbGlwcyA9IDA7Cit9CisKKy8q IGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAv KiBGcmluZ2UgYml0bWFwcy4gICovCiAKIHN0YXRpYyBpbnQgbWF4X2ZyaW5nZV9ibXAgPSAwOwpA QCAtNTQ1LDYgKzE0MTcsMTUgQEAgeF91cGRhdGVfYmVnaW4gKHN0cnVjdCBmcmFtZSAqZikKICAg aWYgKCEgRlJBTUVfVzMyX1AgKGYpKQogICAgIHJldHVybjsKIAorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFt ZSA9IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogUmVnZW5lcmF0ZSBk aXNwbGF5IHBhbGV0dGUgYmVmb3JlIGRyYXdpbmcgaWYgbGlzdCBvZiByZXF1ZXN0ZWQKICAgICAg Y29sb3JzIGhhcyBjaGFuZ2VkLiAqLwogICBpZiAoZGlzcGxheV9pbmZvLT5yZWdlbl9wYWxldHRl KQpAQCAtNzU0LDYgKzE2MzUsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAK ICAgLyogTW91c2UgaGlnaGxpZ2h0IG1heSBiZSBkaXNwbGF5ZWQgYWdhaW4uICAqLwogICBNT1VT RV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9kZWZlciA9IGZhbHNlOworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5n X2ZyYW1lID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAg LTQwNDEsMTMgKzQ5MzIsNzQgQEAgdzMyX3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyIChzdHJ1Y3Qg d2luZG93ICp3LAogCSAgICAgIHJlbGVhc2VfZnJhbWVfZGMgKGYsIGhkYyk7CiAJICAgICAgeF9j bGVhcl91bmRlcl9pbnRlcm5hbF9ib3JkZXIgKGYpOwogCSAgICB9CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIFJFUEFJTlRJ TkcgV0hFTiBSRU1PVklORyBTQ1JPTEwgQkFSOgorCistIFNlcXVlbmNlIG9mIEV2ZW50czoKKwor ICAuIGByZWRpc3BsYXlfaW50ZXJuYWwnIGNhbGxzIHRoZSBgY29uZGVtbl9zY3JvbGxfYmFyc19o b29rJywgd2hpY2ggbWFya3MgYWxsCisgICAgc2Nyb2xsIGJhcnMgYXMgY2FuZGlkYXRlcyBmb3Ig ZGVsZXRpb24uCisKKyAgLiBUaGVuIGByZWRpc3BsYXlfaW50ZXJuYWwnIGNhbGxzIGByZWRpc3Bs YXlfd2luZG93cycsIHdoaWNoIHdhbGtzIHRo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dGhlIG5ldyBzY3JvbGwgYmFyCit3aW5kb3cgaXMgdXBkYXRlZC4gKi8KKwog ICAgICAgICAgIC8qIE1ha2Ugc3VyZSBzY3JvbGwgYmFyIGlzICJ2aXNpYmxlIiBiZWZvcmUgbW92 aW5nLCB0byBlbnN1cmUgdGhlCiAgICAgICAgICAgICAgYXJlYSBvZiB0aGUgcGFyZW50IHdpbmRv dyBub3cgZXhwb3NlZCB3aWxsIGJlIHJlZnJlc2hlZC4gICovCi0gICAgICAgICAgbXlfc2hvd193 aW5kb3cgKGYsIGh3bmQsIFNXX0hJREUpOwotLyoqICAgICAgICAgICBNb3ZlV2luZG93IChod25k LCBsZWZ0LCB0b3AsIHdpZHRoLCBtYXggKGhlaWdodCwgMSksIFRSVUUpOyAqKi8KLQkgIC8qIFRy eSB0byBub3QgZHJhdyBvdmVyIGNoaWxkIGZyYW1lcy4gICovCi0JICBTZXRXaW5kb3dQb3MgKGh3 bmQsIEhXTkRfQk9UVE9NLCBsZWZ0LCB0b3AsIHdpZHRoLCBtYXggKGhlaWdodCwgMSksCi0gICAg ICAgICAgICAgICAgICAgICAgICBTV1BfRlJBTUVDSEFOR0VEKTsKKyAgICAgICAgICBpZiAobGVm dCA8PSBiYXItPmxlZnQpCisgICAgICAgICAgICBteV9zaG93X3dpbmRvdyAoZiwgaHduZCwgU1df SElERSk7CisgICAgICAgICAgTW92ZVdpbmRvdyAoaHduZCwgbGVmdCwgdG9wLCB3aWR0aCwgbWF4 IChoZWlnaHQsIDEpLCBsZWZ0IDw9IGJhci0+bGVmdCk7CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJT T1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAJICBzaS5jYlNpemUgPSBzaXpl b2YgKHNpKTsKIAkgIHNpLmZNYXNrID0gU0lGX1JBTkdFOwpAQCAtNDMxNiw2ICs1MjY4LDIxIEBA IHczMl9qdWRnZV9zY3JvbGxfYmFycyAoc3RydWN0IGZyYW1lICpmKQogICAgIHsKICAgICAgIHN0 cnVjdCBzY3JvbGxfYmFyICpiID0gWFNDUk9MTF9CQVIgKGJhcik7CiAKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIC8qIGBEZXN0cm95 V2luZG93JyB3aXRoaW4gYHhfc2Nyb2xsX2Jhcl9yZW1vdmUnIHJlcGFpbnRzIHRoZSByZWN0YW5n bGUuCisgICAgICBUaGVyZWZvcmUsIHdlIGZpcnN0IHNlbmQgYSBtZXNzYWdlIHRvIGluaGliaXQg cmVwYWludGluZy4gKi8KKyAgICAgIGlmICghV0lORE9XX0xJVkVfUCAoYi0+d2luZG93KSkKKyAg ICAgICAgeworICAgICAgICAgIEhXTkQgaHduZCA9IFNDUk9MTF9CQVJfVzMyX1dJTkRPVyAoYik7 CisgICAgICAgICAgU2VuZE1lc3NhZ2UgKGh3bmQsIFdNX1NFVFJFRFJBVywgZmFsc2UsIDApOwor ICAgICAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIHhfc2Nyb2xs X2Jhcl9yZW1vdmUgKGIpOwogCiAgICAgICBuZXh0ID0gYi0+bmV4dDsKQEAgLTcwOTEsNiArODA1 OCwyMSBAQCBleHRlcm4gZnJhbWVfcGFybV9oYW5kbGVyIHczMl9mcmFtZV9wYXJtX2hhbmRsZXJz W107CiAKIHN0YXRpYyBzdHJ1Y3QgcmVkaXNwbGF5X2ludGVyZmFjZSB3MzJfcmVkaXNwbGF5X2lu dGVyZmFjZSA9CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgdzMydGVybS5jYCBtdXN0 IGJlIGluIHRoZSBleGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9pbnRlcmZhY2Un IGluIGBkaXNwZXh0ZXJuLmhgISAqLworCisgIG1jX3hfd3JpdGVfZ2x5cGhzLAorICBtY193MzJf ZHJhd193aW5kb3dfY3Vyc29yLAorICBtY193MzJfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgdzMyX2ZyYW1lX3Bhcm1faGFuZGxlcnMsCiAgIHhf cHJvZHVjZV9nbHlwaHMsCiAgIHhfd3JpdGVfZ2x5cGhzLApkaWZmIC0tZ2l0IGEvc3JjL3dpbmRv dy5oIGIvc3JjL3dpbmRvdy5oCmluZGV4IGZkZWY0MDcuLjM1NjI2M2EgMTAwNjQ0Ci0tLSBhL3Ny Yy93aW5kb3cuaAorKysgYi9zcmMvd2luZG93LmgKQEAgLTMyNCw2ICszMjQsMTI4IEBAIHN0cnVj dCB3aW5kb3cKIAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBTdWZmaXhlcyBm b3IgdGhlIGBtY2Agd2luZG93IHBvaW50ZXIgcHJlZml4LiAqLworc3RydWN0IG11bHRpcGxlX2N1 cnNvcnMKK3sKKyAgLyogVGhlIHJlY29yZGVkIHBpeGVsIHdpZHRoIG9mIHRoZSBsYXN0IGxpbmUg bnVtYmVyIGRyYXduIGR1cmluZyByZWRpc3BsYXkgKi8KKyAgaW50IGxudW1fcGl4ZWxfd2lkdGg7 Cit9IG1jOworCitzdHJ1Y3QgbWNfbWF0cml4Cit7CisgIHB0cmRpZmZfdCB2cG9zX2FsbG9jYXRl ZDsKKyAgcHRyZGlmZl90IHZwb3NfdXNlZDsKKyAgcHRyZGlmZl90IGN1cnNvcnNfdXNlZFs0XTsK KyAgZW51bSBtY19jYWNoZV90eXBlCisgIHsKKyAgICBNQ19DQUNIRSwKKyAgICBDSF9DQUNIRSwK KyAgICBGQ19DQUNIRSwKKyAgICBOT19DQUNIRQorICB9IGNhY2hlX3R5cGU7CisgIHN0cnVjdCBt Y192cG9zCisgIHsKKyAgICBwdHJkaWZmX3QgY2FjaGVfYWxsb2NhdGVkWzRdOworICAgIHB0cmRp ZmZfdCBjYWNoZV91c2VkWzRdOworICAgIHN0cnVjdCBtY19jb250ZW50cworICAgIHsKKyAgICAg IGJvb2xfYmYgc2FtZV9wIDogMTsKKyAgICAgIGVudW0gbWNfZnJvbV93aGVyZQorICAgICAgewor ICAgICAgICBOT1dIRVJFLAorICAgICAgICBTQ1JJQkVfT05FLAorICAgICAgICBTQ1JJQkVfVFdP LAorICAgICAgICBTQ1JJQkVfVEhSRUUsCisgICAgICAgIFNLSVBQRUQsCisgICAgICAgIFBPU1Rf Q0hBTkdFRCwKKyAgICAgICAgVU5DSEFOR0VELAorICAgICAgICBTRVRfQ1VSU09SX09ORSwKKyAg ICAgICAgU0VUX0NVUlNPUl9UV08KKyAgICAgIH0gZnJvbV93aGVyZTsKKyAgICAgIHN0cnVjdCBn bHlwaCBnbHlwaDsKKyAgICAgIGludCB4OworICAgICAgaW50IGZ4OworICAgICAgaW50IHk7Cisg ICAgICBpbnQgZnk7CisgICAgICBpbnQgaHBvczsKKyAgICAgIGludCB2cG9zOworICAgICAgaW50 IHdkOworICAgICAgaW50IGg7CisgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlCisgICAgICB7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SX1JJR0hUX0FSUk9XLAorICAgICAgICBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgICAgICAgIE1DX1ZFUlRJQ0FMX0JBUiwK KyAgICAgICAgTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSLAorICAgICAgICBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICB9IGdseXBoX2ZsYXZvcjsKKyAgICAgIGJvb2xfYmYgZW5hYmxl ZF9wIDogMTsKKyAgICB9ICpjYWNoZVs0XTsKKyAgfSAqdnBvczsKKyAgLyogVXNlZCBlbHNld2hl cmUuICovCisgIHN0cnVjdCBtY19lc3NlbnRpYWxzCisgIHsKKyAgICBlbnVtIG1jX3Jvd19wb3Np dGlvbgorICAgIHsKKyAgICAgIFBSRV9aViwKKyAgICAgIEFUX1pWLAorICAgICAgUE9TVF9aVgor ICAgIH0gcm93X3Bvc2l0aW9uOworICAgIGJvb2xfYmYgYWN0aXZlX3AgOiAxOworICAgIHN0cnVj dCBtY19SR0IgY2hfZmdbM10sIGZjX2ZnWzNdLCBzcF9mZzsKKyAgICBpbnQgZmNfeDsKKyAgICBp bnQgenY7CisgICAgaW50IHp2X2J5dGU7CisgIH0gZXNzZW50aWFsczsKKyAgLyogVXNlZCBlbHNl d2hlcmUuICovCisgIGVudW0gbWNfYWN0aW9uX3R5cGUKKyAgeworICAgIE1VTFRJUExFX0NVUlNP UlMsCisgICAgSE9SSVpPTlRBTF9SVUxFUiwKKyAgICBWRVJUSUNBTF9SVUxFUiwKKyAgICBGSUxM X0NPTFVNTiwKKyAgICBDVVJTT1JfSU5ESUNBVE9SCisgIH0gYWN0aW9uX3R5cGU7Cit9IG1jX21h dHJpeDsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgICAvKiBDd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3B0cgorCityb3ctPmdseXBoc1tURVhUX0FSRUFdW2hwb3NdLnBpeGVs X3dpZHRoCisKK3ctPmN1cnJlbnRfbWF0cml4LT5yb3dzWzJdLT5nbHlwaHNbVEVYVF9BUkVBXVto cG9zXS5waXhlbF93aWR0aAorCit3LT5jdXJyZW50X21hdHJpeC0+cm93c1syXS5lbmFibGVkX3AK Kwordy0+Y3VycmVudF9tYXRyaXgtPnJvd3NbMl0udXNlZFtURVhUX0FSRUFdCisKK1JBTkdFRF9J TlRFR0VSUCA9PiBSQU5HRURfRklYTlVNUAorCitUWVBFX1JBTkdFRF9JTlRFR0VSUCA9PiBUWVBF X1JBTkdFRF9GSVhOVU1QCisKK21ha2VfbnVtYmVyID0+IG1ha2VfZml4bnVtCisKK1hJTlQgPT4g WEZJWE5VTQorCitYRkFTVElOVCA9PiBYRklYTkFUCisKK3N0cnVjdCBmcmFtZSAqZiA9IFhGUkFN RSAody0+ZnJhbWUpOworICBPUgorc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJB TUUgKHcpKTsKKworTGlzcF9PYmplY3Qgc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAoaV9zdG9y ZSwgUW5pbCk7CitjaGFyICpjaGFyX3N0cmluZyA9IFNTREFUQSAoc3RyaW5nKTsKK2ZwcmludGYg KHN0ZGVyciwgImlfc3RvcmU6ICAlc1xuIiwgY2hhcl9zdHJpbmcpOworCitjaGFyICp3X2NvbnRl bnRzID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKSAmJiBTVFJJTkdQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIG5hbWUpKSkKKyAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBuYW1lKSkKKyAgICAgICAgICAgICAgICAgICA6ICJuaWwi OworZnByaW50ZiAoc3RkZXJyLCAiXG5CdWZmZXIgKCVzKVxuIiwgd19jb250ZW50cyk7Cis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1gpCVwKKyAgICAgICAgICAgIGNhc2UgWFdJREdFVF9HTFlQSDogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgTUNfQlVJ TERfWFdJREdFVF9HTFlQSF9TVFJJTkcgKFNUQVJULCBFTkQsIEhFQUQsIFRBSUwsICAgICAgIFwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhMLCBYLCBMQVNUX1gp OyAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgYnJlYWs7CisKKyNkZWZpbmUgTUNfQlVJ TERfR0xZUEhfU1RSSU5HU18yKFNUQVJULCBFTkQsIEhFQUQsIFRBSUwsIEhMLCBYLCBMQVNUX1gp CVwKKwkgICAgY2FzZSBHTFlQSExFU1NfR0xZUEg6CQkJCQlcCisJICAgICAgTUNfQlVJTERfR0xZ UEhMRVNTX0dMWVBIX1NUUklORyAoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwJXAorCQkJCQkgICAg SEwsIFgsIExBU1RfWCk7CQlcCisJICAgICAgYnJlYWs7CQkJCQkJCVwKKwkJCQkJCQkJCVwKKwkg ICAgZGVmYXVsdDoJCQkJCQkJXAorCSAgICAgIGVtYWNzX2Fib3J0ICgpOwkJCQkJCVwKKwkgICAg fQkJCQkJCQkJXAorCQkJCQkJCQkJXAorCSAgaWYgKHMpCQkJCQkJCVwKKwkgICAgewkJCQkJCQkJ XAorCSAgICAgIHNldF9nbHlwaF9zdHJpbmdfYmFja2dyb3VuZF93aWR0aCAocywgU1RBUlQsIExB U1RfWCk7CVwKKwkgICAgICAoWCkgKz0gcy0+d2lkdGg7CQkJCQkJXAorCSAgICB9CQkJCQkJCQlc CisJfQkJCQkJCQkJXAorICAgIH0gd2hpbGUgKGZhbHNlKQorCisjZGVmaW5lIE1DX0JVSUxEX0dM WVBIX1NUUklOR1MoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwgSEwsIFgsIExBU1RfWC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QkJXAorICB9IHdoaWxlICgwKQorCitMaXNwX09iamVjdAorbWNfdmVjdG9yIChpbnQgbGVu Z3RoKQoreworICBzdHJ1Y3QgTGlzcF9WZWN0b3IgKnAgPSBhbGxvY2F0ZV92ZWN0b3IgKGxlbmd0 aCk7CisgIGZvciAocHRyZGlmZl90IGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspCisgICAgcC0+Y29u dGVudHNbaV0gPSBRbmlsOworICByZXR1cm4gbWFrZV9saXNwX3B0ciAocCwgTGlzcF9WZWN0b3Js aWtlKTsKK30KKworTGlzcF9PYmplY3QKK21jX2xpc3RuIChwdHJkaWZmX3QgY291bnQsIExpc3Bf T2JqZWN0IGFyZywgLi4uKQoreworICBlYXNzdW1lICgwIDwgY291bnQpOworICBMaXNwX09iamVj dCB2YWwgPSBGY29ucyAoYXJnLCBRbmlsKTsKKyAgTGlzcF9PYmplY3QgdGFpbCA9IHZhbDsKKyAg dmFfbGlzdCBhcDsKKyAgdmFfc3RhcnQgKGFwLCBhcmcpOworICBmb3IgKHB0cmRpZmZfdCBpID0g MTsgaSA8IGNvdW50OyBpKyspCisgICAgeworICAgICAgTGlzcF9PYmplY3QgZWxlbSA9IEZjb25z ICh2YV9hcmcgKGFwLCBMaXNwX09iamVjdCksIFFuaWwpOworICAgICAgWFNFVENEUiAodGFpbCwg ZWxlbSk7CisgICAgICB0YWlsID0gZWxlbTsKKyAgICB9CisgIHZhX2VuZCAoYXApOworICByZXR1 cm4gdmFsOworfQorCitMaXNwX09iamVjdAorbWNfbWVtcSAoTGlzcF9PYmplY3QgZWx0LCBMaXNw X09iamVjdCBsaXN0KQoreworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBpZiAoIUNPTlNQIChs aXN0KSB8fCBFUSAoWENBUiAobGlzdCksIGVsdCkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlz dCA9IFhDRFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAobGlzdCkgfHwgRVEgKFhDQVIgKGxp c3QpLCBlbHQpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAg ICAgIGlmICghQ09OU1AgKGxpc3QpIHx8IEVRIChYQ0FSIChsaXN0KSwgZWx0KSkKKyAgICAgICAg YnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgfQorICByZXR1cm4gbGlzdDsK K30KKworTGlzcF9PYmplY3QKK21jX250aCAoaW50IG51bSwgTGlzcF9PYmplY3QgbGlzdCkKK3sK KyAgZm9yIChpbnQgaSA9IDA7IGkgPCBudW0gJiYgIU5JTFAgKGxpc3QpOyBpKyspCisgICAgbGlz dCA9IFhDRFIgKGxpc3QpOworICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FSIChs aXN0KTsKKyAgICBlbHNlCisgICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QKK21j X2Fzc3EgKExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgd2hpbGUgKDEp CisgICAgeworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1AgKFhD QVIgKGxpc3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBrZXkp KSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAo IUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAg ICAgICAgICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVhazsK KyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAg ICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhDQVIg KFhDQVIgKGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIg KGxpc3QpOworICAgIH0KKyAgaWYgKENPTlNQIChsaXN0KSkKKyAgICByZXR1cm4gWENBUiAobGlz dCk7CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK0xpc3BfT2JqZWN0CittY19h c3NvYyAoTGlzcF9PYmplY3Qga2V5LCBMaXNwX09iamVjdCBsaXN0KQoreworICBMaXNwX09iamVj dCBjYXI7CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAg ICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9IFhD QVIgKFhDQVIgKGxpc3QpKSwKKyAgICAgICAgICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5J TFAgKEZlcXVhbCAoY2FyLCBrZXkpKSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBY Q0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENPTlNQ IChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhDQVIgKGxpc3Qp KSwKKyAgICAgICAgICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZlcXVhbCAoY2Fy LCBrZXkpKSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAg ICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkK KyAgICAgICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhDQVIgKGxpc3QpKSwKKyAgICAgICAgICAg ICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZlcXVhbCAoY2FyLCBrZXkpKSkpKQorICAg IC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AgICB4c2lnbmFsMCAoUW1hcmtfaW5h Y3RpdmUpOworICBMaXNwX09iamVjdCBtYXJrZXIgPSBCVkFSIChjdXJyZW50X2J1ZmZlciwgbWFy ayk7CisgIGludCBtID0gKFhNQVJLRVIgKG1hcmtlciktPmJ1ZmZlcikKKyAgICAgICAgICA/IFhN QVJLRVIgKG1hcmtlciktPmNoYXJwb3MKKyAgICAgICAgICA6IC0xOworICByZXR1cm4gKG0gPT0g LTEpCisgICAgICAgICAgID8gLTEKKyAgICAgICAgIDogKFBUIDwgbSkgPT0gYmVnaW5fcAorICAg ICAgICAgICA/IFBUCisgICAgICAgICA6IGNsaXBfdG9fYm91bmRzIChCRUdWLCBtLCBaVik7Cit9 CisKKy8qIENoZWNrIHRoZSBwcmVzZW5jZSBvZiBhIGRpc3BsYXkgcHJvcGVydHkgYW5kIGNvbXB1 dGUgaXRzIHdpZHRoLgorICAgSWYgYSBwcm9wZXJ0eSB3YXMgZm91bmQgYW5kIGl0cyB3aWR0aCB3 YXMgZm91bmQgYXMgd2VsbCwgcmV0dXJuCisgICBpdHMgd2lkdGggKD49IDApIGFuZCBzZXQgdGhl IHBvc2l0aW9uIG9mIHRoZSBlbmQgb2YgdGhlIHByb3BlcnR5CisgICBpbiBFTkRQT1MuCisgICBP dGhlcndpc2UganVzdCByZXR1cm4gLTEuICovCitzdGF0aWMgaW50CittY19jaGVja19kaXNwbGF5 X3dpZHRoIChwdHJkaWZmX3QgcG9zLCBwdHJkaWZmX3QgY29sLCBwdHJkaWZmX3QgKmVuZHBvcykK K3sKKyAgTGlzcF9PYmplY3QgdmFsLCBvdmVybGF5OworICBpZiAoQ09OU1AgKHZhbCA9IGdldF9j aGFyX3Byb3BlcnR5X2FuZF9vdmVybGF5CisgICAgICAgKG1ha2VfZml4bnVtIChwb3MpLCBRZGlz cGxheSwgUW5pbCwgJm92ZXJsYXkpKQorICAgICAgJiYgRVEgKFFzcGFjZSwgWENBUiAodmFsKSkp CisgICAgeyAvKiBGSVhNR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gKHByb3ApIDw9IGFs aWduX3RvX21heCkpCisgIHdpZHRoID0gKGludCkoWEZMT0FUX0RBVEEgKHByb3ApICsgMC41KSAt IGNvbDsKKyAgICAgIGlmICh3aWR0aCA+PSAwKQorICB7CisgICAgcHRyZGlmZl90IHN0YXJ0Owor ICAgIGlmIChPVkVSTEFZUCAob3ZlcmxheSkpCisgICAgICAqZW5kcG9zID0gT1ZFUkxBWV9QT1NJ VElPTiAoT1ZFUkxBWV9FTkQgKG92ZXJsYXkpKTsKKyAgICBlbHNlCisgICAgICBnZXRfcHJvcGVy dHlfYW5kX3JhbmdlIChwb3MsIFFkaXNwbGF5LCAmdmFsLCAmc3RhcnQsIGVuZHBvcywgUW5pbCk7 CisgICAgLyogRm9yIDpyZWxhdGl2ZS13aWR0aCwgd2UgbmVlZCB0byBtdWx0aXBseSBieSB0aGUg Y29sdW1uCisgICAgICAgd2lkdGggb2YgdGhlIGNoYXJhY3RlciBhdCBQT1MsIGlmIGl0IGlzIGdy ZWF0ZXIgdGhhbiAxLiAqLworICAgIGlmICghTklMUCAobWNfcGxpc3RfZ2V0IChwbGlzdCwgUUNy ZWxhdGl2ZV93aWR0aCkpCisgICAgICAgICYmICFOSUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwg ZW5hYmxlX211bHRpYnl0ZV9jaGFyYWN0ZXJzKSkpCisgICAgICB7CisgICAgICAgIGludCBiLCB3 ZDsKKyAgICAgICAgdW5zaWduZWQgY2hhciAqcCA9IEJZVEVfUE9TX0FERFIgKENIQVJfVE9fQllU RSAocG9zKSk7CisgICAgICAgIE1DX01VTFRJQllURV9CWVRFU19XSURUSCAocCwgYnVmZmVyX2Rp c3BsYXlfdGFibGUgKCksIGIsIHdkKTsKKyAgICAgICAgd2lkdGggKj0gd2Q7CisgICAgICB9Cisg ICAgcmV0dXJuIHdpZHRoOworICB9CisgICAgfQorICByZXR1cm4gLTE7Cit9CisKKy8qIFNjYW5u aW5nIGZyb20gdGhlIGJlZ2lubmluZyBv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ICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAg ICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgIH0KKyAgICAgICAgZWxz ZQorICAgICsrY29sOworICAgICAgfQorICB9CisgICAgICBlbHNlCisgIHsKKyAgICAvKiBUaGUg ZGlzcGxheSB0YWJsZSBkb2Vzbid0IGFmZmVjdCB0aGlzIGNoYXJhY3RlcjsKKyAgICAgICBpdCBk aXNwbGF5cyBhcyBpdHNlbGYuICovCisgICAgaWYgKGMgPT0gJ1xuJykKKyAgICAgIGdvdG8gZW5k bG9vcDsKKyAgICBpZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2Vs ZWN0aXZlX2Rpc3BsYXkpLCBRdCkpCisgICAgICBnb3RvIGVuZGxvb3A7CisgICAgaWYgKGMgPT0g J1x0JykKKyAgICAgIHsKKyAgICAgICAgY29sICs9IHRhYl93aWR0aDsKKyAgICAgICAgY29sID0g Y29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgICAgfQorICAgIGVsc2UgaWYgKG11bHRp Ynl0ZSAmJiBMRUFESU5HX0NPREVfUCAoYykpCisgICAgICB7CisgICAgICAgIC8qIFN0YXJ0IG9m IG11bHRpLWJ5dGUgZm9ybS4gKi8KKyAgICAgICAgdW5zaWduZWQgY2hhciAqcHRyOworICAgICAg ICBpbnQgYnl0ZXMsIHdpZHRoOworICAgICAgICBwdHIgPSBCWVRFX1BPU19BRERSIChzY2FuX2J5 dGUpOworICAgICAgICBNQ19NVUxUSUJZVEVfQllURVNfV0lEVEggKHB0ciwgZHAsIGJ5dGVzLCB3 aWR0aCk7CisgICAgICAgIC8qIFN1YnRyYWN0IG9uZSB0byBjb21wZW5zYXRlIGZvciB0aGUgaW5j cmVtZW50CisgICAgIHRoYXQgaXMgZ29pbmcgdG8gaGFwcGVuIGJlbG93LiAqLworICAgICAgICBz Y2FuX2J5dGUgKz0gYnl0ZXMgLSA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GlzcGxheV92ZWN0b3IgZG9l cyBpdC4gKi8KKyAgICAgICAgTGlzcF9PYmplY3QgZW50cnkgPSBBUkVGIChjaGFydmVjLCBpKTsK KyAgICAgICAgaWYgKEdMWVBIX0NPREVfUCAoZW50cnkpKQorICAgIGMgPSBHTFlQSF9DT0RFX0NI QVIgKGVudHJ5KTsKKyAgICAgICAgZWxzZQorICAgIGMgPSAnICc7CisgICAgICB9CisgICAgaWYg KGMgPj0gMDQwICYmIGMgPCAwMTc3KQorICAgICAgY29sKys7CisgICAgZWxzZSBpZiAoYyA9PSAn XG4nCisgICAgICAgfHwgKGMgPT0gJ1xyJworICAgICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVu dF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKSkKKyAgICAgIHsKKyAgICAgICAgcHRy Kys7CisgICAgICAgIGdvdG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgIH0KKyAgICBlbHNl IGlmIChjID09ICdcdCcpCisgICAgICB7CisgICAgICAgIGlmICh0YWJfc2VlbikKKyAgICBjb2wg PSAoKGNvbCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICBw b3N0X3RhYiArPSBjb2w7CisgICAgICAgIGNvbCA9IDA7CisgICAgICAgIHRhYl9zZWVuID0gMTsK KyAgICAgIH0KKyAgICBlbHNlIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgIC8qIFdpdGgg YSBkaXNwbGF5IHRhYmxlIGVudHJ5LCBDIGlzIGRpc3BsYXllZCBhcyBpcywgYW5kCisgICAgICAg ICBub3QgZGlzcGxheWVkIGFzIFxOTk4gb3IgYXMgXk4uICBJZiBDIGlzIGEgc2luZ2xlLWJ5dGUK KyAgICAgICAgIGNoYXJhY3RlciwgaXQgdGFrZXMgb25lIGNvbHVtbi4gIElmIEMgaXMgbXVsdGkt Ynl0ZSBpbgorICAgICAgICAgYSB1bmlieXR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ByZXR1cm4gU1NEQVRBIChGcHJpbjFfdG9fc3RyaW5nIChmcmFtZSwg UW5pbCkpOworfQorCisvKiBVU0FHRTogIGZwcmludGYgKHN0ZGVyciwgIldJTkRPVyAoJXMpIiwg bWNfd2luZG93ICh3KSk7ICovCitjaGFyICoKK21jX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdykK K3sKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICBy ZXR1cm4gU1NEQVRBIChGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpKTsKK30KKworLyog VVNBR0U6ICBmcHJpbnRmIChzdGRlcnIsICJDSEFSQUNURVIgKCVzKSIsIG1jX2NoYXJfdG9fc3Ry aW5nIChnbHlwaC0+dS5jaCkpOyAqLworY2hhciAqCittY19jaGFyX3RvX3N0cmluZyAoaW50IGFy ZykKK3sKKyAgTGlzcF9PYmplY3QgY2hhcmFjdGVyID0gKDAgPD0gYXJnICYmIGFyZyA8PSBNQVhf Q0hBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgID8gRmNoYXJfdG9fc3RyaW5nIChtYWtl X2ZpeG51bSAoYXJnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsKKyAgY2hh ciAqIHJlc3VsdCA9ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICYmIGFy ZyA9PSA5KQorICAgICAgICAgICAgICAgICAgICA/ICJcXHQiCisgICAgICAgICAgICAgICAgICA6 ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnID09IDEwKQor ICAgICAgICAgICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAo Y2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnID09IDMyKQorICAgICAgICAg ICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVy KQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9IDkKKyAgICAgICAgICAgICAgICAgICAg ICYmIGFyZyAhPSAxMAorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9IDMyKQorICAgICAg ICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgOiAi XFw/IjsKKyAgcmV0dXJuIHJlc3VsdDsKK30KKworaW50CittY19saXNwX3RvX2N1cnNvcl90eXBl IChMaXNwX09iamVjdCBhcmcpCit7CisgIGNoYXIgKnN0cjsKKyAgaWYgKFhUWVBFIChhcmcpID09 IExpc3BfU3RyaW5nKQorICAgIHN0ciA9IFNTREFUQSAoYXJnKTsKKyAgICBlbHNlIGlmIChYVFlQ RSAoYXJnKSA9PSBMaXNwX1N5bWJvbCkKKyAgICAgIHN0ciA9IFNTREFUQSAoU1lNQk9MX05BTUUg KGFyZykpOworICAgICAgZWxzZSByZXR1cm4gLTE7CisgIGlmICghc3RyY21wIChzdHIsICJubyIp KQorICAgIHJldHVybiBNQ19OT19DVVJTT1I7CisgIGlmICghc3RyY21wIChzdHIsICJtYy1sZWZ0 LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTUNfTEVGVF9GUklOR0VfQklUTUFQOworICBp ZiAoIXN0cmNtcCAoc3RyLCAibWMtcmlnaHQtZnJpbmdlLWJpdG1hcCIpKQorICAgIHJldHVybiBN Q19SSUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAiYm94IikpCisgICAg cmV0dXJuIE1DX0ZJTExFRF9CT1g7CisgIGlmICghc3RyY21wIChzdHIsICJmcmFtZWQiKSkKKyAg ICByZXR1cm4gTUNfRlJBTUVEX0JPWDsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgImhvbGxvdyIpKQor ICAgIHJldHVybiBNQ19IT0xMT1dfQk9YOworICBpZiAoIXN0cmNtcC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CAoYWN0aW9uX3R5cGUpCisgICAgeworICAgICAgY2FzZSBNVUxUSVBMRV9DVVJT T1JTOiByZXR1cm4gIk1VTFRJUExFX0NVUlNPUlMiOworICAgICAgY2FzZSBIT1JJWk9OVEFMX1JV TEVSOiByZXR1cm4gIkhPUklaT05UQUxfUlVMRVIiOworICAgICAgY2FzZSBWRVJUSUNBTF9SVUxF UjogcmV0dXJuICJWRVJUSUNBTF9SVUxFUiI7CisgICAgICBjYXNlIEZJTExfQ09MVU1OOiByZXR1 cm4gIkZJTExfQ09MVU1OIjsKKyAgICAgIGNhc2UgQ1VSU09SX0lORElDQVRPUjogcmV0dXJuICJD VVJTT1JfSU5ESUNBVE9SIjsKKyAgICAgIGRlZmF1bHQ6CisgICAgICByZXR1cm4gIlVOS05PV04i OworICAgIH0KK30KKworLyogVVNBR0U6ICBmcHJpbnRmIChzdGRlcnIsICJBQ1RJT04tVFlQRSAo JXMpIiwgbWNfZnJvbV93aGVyZV90b19zdHJpbmcgKGFyZykpOyAqLworY2hhciAqCittY19mcm9t X3doZXJlX3RvX3N0cmluZyAoZW51bSBtY19mcm9tX3doZXJlIGZyb21fd2hlcmUpCit7CisgIHN3 aXRjaCAoZnJvbV93aGVyZSkKKyAgICB7CisgICAgICBjYXNlIE5PV0hFUkU6IHJldHVybiAiTk9X SEVSRSI7CisgICAgICBjYXNlIFNDUklCRV9PTkU6IHJldHVybiAiU0NSSUJFX09ORSI7CisgICAg ICBjYXNlIFNDUklCRV9UV086IHJldHVybiAiU0NSSUJFX1RXTyI7CisgICAgICBjYXNlIFNDUklC RV9USFJFRTogcmV0dXJuICJTQ1JJQkVfVEhSRUUiOworICAgICAgY2FzZSBTS0lQUEVEOiByZXR1 cm4gIlNLSVBQRUQiOworICAgICAgY2FzZSBQT1NUX0NIQU5HRUQ6IHJldHVybiAiUE9TVF9DSEFO R0VEIjsKKyAgICAgIGNhc2UgVU5DSEFOR0VEOiByZXR1cm4gIlVOQ0hBTkdFRCI7CisgICAgICBj YXNlIFNFVF9DVVJTT1JfT05FOiByZXR1cm4gIlNFVF9DVVJTT1JfT05FIjsKKyAgICAgIGNhc2Ug U0VUX0NVUlNPUl9UV086IHJldHVybiAiU0VUX0NVUlNPUl9UV08iOworICAgICAgZGVmYXVsdDoK KyAgICAgIHJldHVybiAiVU5LTk9XTiI7CisgICAgfQorfQorCit2b2lkCittY19jYWNoZV9pbnNw ZWN0b3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBtY19tYXRyaXggbWF0cml4KQoreworICBp bnQgdnBvc19hbGxvY2F0ZWQgPSB3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQ7CisgIGludCB2 cG9zX3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc191c2VkOworICBmcHJpbnRmIChzdGRlcnIsICIl czogIG1hdHJpeC52cG9zX2FsbG9jYXRlZCAoJWQpIHwgbWF0cml4LnZwb3NfdXNlZCAoJWQpXG4i LAorICAgICAgICAgICAgICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3NfYWxsb2NhdGVkLCB2cG9z X3VzZWQpOworICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7 CisgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAg ICB7CisgICAgICBpbnQgY3Vyc29yc191c2VkID0gdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtj YWNoZV90eXBlXTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgbWF0cml4LmN1cnNvcnNfdXNl ZFslc10gKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgbWNfY2FjaGVfdHlwZV90b19z dHJpbmcgKGNhY2hlX3R5cGUpLCBjdXJzb3JzX3VzZWQpOworICAgIH0KKyAgZm9yIChpbnQgdm50 aCA9IDA7CisgICAgICAgdm50aCA8IHctPm1jX21hdHJpeC52cG9zX3VzZWQ7CisgICAgICAgKyt2 bnRoKQorICAgIHsKKyAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBN Q19DQUNIRTsKKyAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICAr K2NhY2hlX3R5cGUpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgY2FjaGVfYWxsb2NhdGVkID0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdOworICAg ICAgICAgIGludCBjYWNoZV91c2VkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNl ZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgdm50aCAoJWQp IHwgY2FjaGVfYWxsb2NhdGVkWyVzXSAoJWQpIHwgY2FjaGVfdXNlZFslc10gKCVkKVxuIiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIHZudGgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlwZSksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBjYWNoZV9hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBt Y19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlwZSksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICBjYWNoZV91c2VkKTsKKyAgICAgICAgfQorICAgIH0KK30KKwordm9pZAorbWNfc2V0 X2xzbF9iZyAoc3RydWN0IHdpbmRvdyAqdywgZW51bSBmYWNlX2lkIGZhY2VfaWQsIHN0cnVjdCBt Y19SR0IgKmxzbCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7Cisg IHN0cnVjdCBmYWNlICpmYWNlOworICBpZiAoIU5JTFAgKFZmYWNlX3J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AgICAgIHx8IGZhY2VfaWQgPT0gV0lORE9XX0RJVklERVJfTEFTVF9QSVhFTF9G QUNFX0lEIC8qIFF3aW5kb3dfZGl2aWRlcl9sYXN0X3BpeGVsICovCisgICAgICAgICAgfHwgZmFj ZV9pZCA9PSBWRVJUSUNBTF9CT1JERVJfRkFDRV9JRCAvKiBRdmVydGljYWxfYm9yZGVyICovCisg ICAgICAgICAgfHwgZmFjZV9pZCA9PSBJTlRFUk5BTF9CT1JERVJfRkFDRV9JRCkpIC8qIFFpbnRl cm5hbF9ib3JkZXIgKi8KKyAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChmLCBsb29rdXBfYmFzaWNf ZmFjZSAodywgZiwgZmFjZV9pZCkpOworICAgIGVsc2UKKyAgICAgIGZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGZhY2VfaWQpOworICBMaXNwX09iamVjdCBjb2xvciA9IChmYWNlICE9IE5VTEwpCisg ICAgICAgICAgICAgICAgICAgICAgPyBmYWNlLT5sZmFjZVtMRkFDRV9CQUNLR1JPVU5EX0lOREVY XQorICAgICAgICAgICAgICAgICAgICAgIDogYnVpbGRfc3RyaW5nICgiT3JhbmdlUmVkIik7Cisg IG1jX3h3X2NvbG9yX3ZhbHVlcyAodywgY29sb3IsIGxzbCk7Cit9CisKK3ZvaWQKK21jX3NldF9l c3NlbnRpYWxzIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgbWNfZXNzZW50aWFscyAqZXNzZW50 aWFscykKK3sKKyAgaWYgKCFCVUZGRVJQICh3LT5jb250ZW50cykpCisgICAgcmV0dXJuOworICBp ZiAoTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICYm IE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAm JiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkKKyAgICBy ZXR1cm47CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBlc3NlbnRp YWxzLT5hY3RpdmVfcCA9ICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVkX3dpbmRvdykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgZiA9PSBGUkFNRV9ESVNQTEFZX0lORk8gKGYpLT54X2hp Z2hsaWdodF9mcmFtZSk7CisgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOworICBDSEVD S19CVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICBz dHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgcHRyZGlmZl90IG9wb2ludCA9ICh3 ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpCisgICAgICAgICAgICAgICAgICAgICA/IFBU CisgICAgICAgICAgICAgICAgICAgICA6IFhGSVhOVU0gKEZtYXJrZXJfcG9zaXRpb24gKHctPnBv aW50bSkpOworICBwdHJkaWZmX3QgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywg b3BvaW50KTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYp OworICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsK KyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50 IGhzY2xfeCA9IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFyX3dpZHRoOworICBpZiAoYiAhPSBjdXJy ZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVmZmVyID0gY3VycmVudF9idWZmZXI7Cisg ICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9CisgIGVzc2VudGlhbHMtPnp2ID0g WlY7CisgIGVzc2VudGlhbHMtPnp2X2J5dGUgPSBaVl9CWVRFOworICBlc3NlbnRpYWxzLT5mY194 ID0gKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoVmRpc3Bs YXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgPyAoZmlsbF9jb2wgKiBm cmFtZV9jaGFyX3dpZHRoKSArIHctPm1jLmxudW1fcGl4ZWxfd2lkdGggLSBoc2NsX3gKKyAgICAg ICAgICAgICAgICAgICAgIDogKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICYmIE5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisgICAgICAgICAgICAgICAgICAgICAg ID8gKGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0aCkgLSBoc2NsX3gKKyAgICAgICAgICAgICAg ICAgICAgIDogMDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAo b2xkX2J1ZmZlcik7CisKKyAgZW51bSBmYWNlX2lkIGZpbGxfY29sdW1uX3ByZV96dl9mYWNlX2lk ID0KKyAgICAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAmJiBOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgID8gbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRy dWUpCisgICAgOiAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRz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bTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgICAgICBzdHJ1Y3QgbWNfUkdC IGJleW9uZF9maWxsX2ZvcmVncm91bmQ7CisgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIGJl eW9uZF9maWxsX2NvbG9yLCAmYmV5b25kX2ZpbGxfZm9yZWdyb3VuZCk7CisgICAgICAvKiByZWQg Ki8KKyAgICAgIGlmICgoIWZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgJiYgY3VycmVudF9jb2wg JSAyICE9IDAKKyAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikKKyAgICAgICAg ICB8fCAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCAlIDIgIT0g MAorICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbAorICAgICAgICAgICAg ICAmJiByb3dfcG9zaXRpb24gPT0gUFJFX1pWKSkKKyAgICAgICAgeworICAgICAgICAgIGxzbF9m Zy0+cmVkID0gb2RkX2ZvcmVncm91bmQucmVkOworICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBv ZGRfZm9yZWdyb3VuZC5ncmVlbjsKKyAgICAgICAgICBsc2xfZmctPmJsdWUgPSBvZGRfZm9yZWdy b3VuZC5ibHVlOworICAgICAgICB9CisgICAgICAgIC8qIHllbGxvdyAqLworICAgICAgICBlbHNl IGlmICgoIWZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUg MiA9PSAwCisgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUFJFX1pWKQorICAg ICAgICAgICAgICAgICB8fCAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgJiYg Y3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29s IDw9IGZpbGxfY29sCisgICAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUFJF X1pWKSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBsc2xfZmctPnJlZCA9IGV2ZW5fZm9yZWdy b3VuZC5yZWQ7CisgICAgICAgICAgICBsc2xfZmctPmdyZWVuID0gZXZlbl9mb3JlZ3JvdW5kLmdy ZWVuOworICAgICAgICAgICAgbHNsX2ZnLT5ibHVlID0gZXZlbl9mb3JlZ3JvdW5kLmJsdWU7Cisg ICAgICAgICAgfQorICAgICAgICAgIC8qIGdyZWVuICovCisgICAgICAgICAgZWxzZSBpZiAoZmls bF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sID4gZmlsbF9jb2wK KyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUFJFX1pWKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBsc2xfZmctPnJlZCA9IGJleW9uZF9maWxsX2ZvcmVncm91bmQu cmVkOworICAgICAgICAgICAgICBsc2xfZmctPmdyZWVuID0gYmV5b25kX2ZpbGxfZm9yZWdyb3Vu ZC5ncmVlbjsKKyAgICAgICAgICAgICAgbHNsX2ZnLT5ibHVlID0gYmV5b25kX2ZpbGxfZm9yZWdy b3VuZC5ibHVlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAocm93X3Bvc2l0 aW9uID09IEFUX1pWKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbHNsX2ZnLT5y ZWQgPSBlc3NlbnRpYWxzLnNwX2ZnLnJlZDsKKyAgICAgICAgICAgICAgICBsc2xfZmctPmdyZWVu ID0gZXNzZW50aWFscy5zcF9mZy5ncmVlbjsKKyAgICAgICAgICAgICAgICBsc2xfZmctPmJsdWUg PSBlc3NlbnRpYWxzLnNwX2ZnLmJsdWU7CisgICAgICAgICAgICAgIH0KKyAgICAgIGJyZWFrOwor ICAgIH0KKyAgICBjYXNlIEhPUklaT05UQUxfUlVM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sKKyAgICAg IE1vdXNlX0hMSW5mbyAqaGxpbmZvID0gTU9VU0VfSExfSU5GTyAoZik7CisgICAgICBpbnQgbW91 c2VfYmVnX2NvbCBVTklOSVQsIG1vdXNlX2VuZF9jb2wgVU5JTklUOworICAgICAgYm9vbCBjaGVj a19tb3VzZV9mYWNlID0gZmFsc2U7CisgICAgICBpbnQgZHVtbXlfeCA9IDA7CisgICAgICAvKiBJ ZiBtb3VzZSBoaWdobGlnaHRpbmcgaXMgb24sIHdlIG1heSBuZWVkIHRvIGRyYXcgYWRqYWNlbnQK KyAgIGdseXBocyB1c2luZyBtb3VzZS1mYWNlIGhpZ2hsaWdodGluZy4gKi8KKyAgICAgIGlmIChh cmVhID09IFRFWFRfQVJFQSAmJiByb3ctPm1vdXNlX2ZhY2VfcAorICAgICAgICAgICYmIGhsaW5m by0+bW91c2VfZmFjZV9iZWdfcm93ID49IDAKKyAgICAgICAgICAmJiBobGluZm8tPm1vdXNlX2Zh Y2VfZW5kX3JvdyA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgcHRyZGlmZl90IHJvd192cG9z ID0gTUFUUklYX1JPV19WUE9TIChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgICAgICAgICBp ZiAocm93X3Zwb3MgPj0gaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19yb3cKKyAgICAgICAgICAgICAg JiYgcm93X3Zwb3MgPD0gaGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cpCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGNoZWNrX21vdXNlX2ZhY2UgPSB0cnVlOworICAgICAgICAgICAgICBt b3VzZV9iZWdfY29sID0gKHJvd192cG9zID09IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfcm93KQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBobGluZm8tPm1vdXNlX2ZhY2VfYmVnX2Nv bAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAwOworICAgICAgICAgICAg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JvdyBjb250YWlucyBtb3VzZSBoaWdobGlnaHRpbmcs IGF0dGVtcHQgdG8gZHJhdworICAgICAgICAgICAgIHRoZSBvdmVybGFwcGVkIGdseXBocyB3aXRo IHRoZSBjb3JyZWN0IGhpZ2hsaWdodC4gIFRoaXMKKyAgICAgICAgICAgICBjb2RlIGZhaWxzIGlm IHRoZSBvdmVybGFwIGVuY29tcGFzc2VzIG1vcmUgdGhhbiBvbmUgZ2x5cGgKKyAgICAgICAgICAg ICBhbmQgbW91c2UtaGlnaGxpZ2h0IHNwYW5zIG9ubHkgc29tZSBvZiB0aGVzZSBnbHlwaHMuCisg ICAgICAgICAgICAgSG93ZXZlciwgbWFraW5nIGl0IHdvcmsgcGVyZmVjdGx5IGludm9sdmVzIGEg bG90IG1vcmUKKyAgICAgICAgICAgICBjb2RlLCBhbmQgSSBkb24ndCBrbm93IGlmIHRoZSBwYXRo b2xvZ2ljYWwgY2FzZSBvY2N1cnMgaW4KKyAgICAgICAgICAgICBwcmFjdGljZSwgc28gd2UnbGwg c3RpY2sgdG8gdGhpcyBmb3Igbm93LiAgLS0tIGN5ZCAgKi8KKyAgICAgICAgICBpZiAoY2hlY2tf bW91c2VfZmFjZQorICAgICAgICAgICAgICAmJiBtb3VzZV9iZWdfY29sIDwgc3RhcnQgJiYgbW91 c2VfZW5kX2NvbCA+IGkpCisgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19NT1VTRV9GQUNF OworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19OT1JN QUxfVEVYVDsKKyAgICAgICAgICBpZiAoaGwgIT0gb3ZlcmxhcF9obCkKKyAgICAgICAgICAgIGNs aXBfaGVhZCA9IGhlYWQ7CisgICAgICAgICAgaiA9IGk7CisgICAgICAgICAgTUNfQlVJTERfR0xZ UEhfU1RSSU5HUyAoaiwgc3RhcnQsIGgsIHQsIG92ZXJsYXBfaGwsIGR1bW15X3gsIGxhc3RfeCk7 CisgICAgIC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ICAgICAgICBpZiAoY2hlY2tfbW91c2VfZmFj ZQorICAgICAgICAgICAgICAmJiBtb3VzZV9iZWdfY29sIDwgaSAmJiBtb3VzZV9lbmRfY29sID4g ZW5kKQorICAgICAgICAgICAgb3ZlcmxhcF9obCA9IERSQVdfTU9VU0VfRkFDRTsKKyAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgb3ZlcmxhcF9obCA9IERSQVdfTk9STUFMX1RFWFQ7Cisg ICAgICAgICAgaWYgKGhsID09IG92ZXJsYXBfaGwgfHwgY2xpcF90YWlsID09IE5VTEwpCisgICAg ICAgICAgICBjbGlwX3RhaWwgPSB0YWlsOworICAgICAgICAgIGkrKzsgICAgICAvKiBXZSBtdXN0 IGluY2x1ZGUgdGhlIEl0aCBnbHlwaC4gKi8KKyAgICAgICAgICBNQ19CVUlMRF9HTFlQSF9TVFJJ TkdTIChlbmQsIGksIGgsIHQsIG92ZXJsYXBfaGwsIHgsIGxhc3RfeCk7CisgICAgICAgICAgZm9y IChzID0gaDsgczsgcyA9IHMtPm5leHQpCisgICAgICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxl ZF9wID0gdHJ1ZTsKKyAgICAgICAgICBjb21wdXRlX292ZXJoYW5nc19hbmRfeCAoaCwgdGFpbC0+ eCArIHRhaWwtPndpZHRoLCBmYWxzZSk7CisgICAgICAgICAgYXBwZW5kX2dseXBoX3N0cmluZ19s aXN0cyAoJmhlYWQsICZ0YWlsLCBoLCB0KTsKKyAgICAgICAgfQorICAgICAgdGFpbCA9IGdseXBo X3N0cmluZ19jb250YWluaW5nX2JhY2tncm91bmRfd2lkdGggKHRhaWwpOworICAgICAgaWYgKGNs aXBfdGFpbCkKKyAgICAgICAgY2xpcF90YWlsID0gZ2x5cGhfc3RyaW5nX2NvbnRhaW5pbmdfYmFj a2dyb3VuZF93aWR0aCAoY2xpcF90YWlsKTsKKyAgICAgIGlmIChjbGlwX2hlYWQgfHwgY2xpcF90 YWlsKQorICAgICAgICB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2UgdGhlIG91dHB1dCBjdXJzb3IuICovCisgIHctPm91dHB1dF9jdXJzb3Iu aHBvcyArPSBsZW47CisgIHctPm91dHB1dF9jdXJzb3IueCA9IHg7Cit9CisKKy8qIEVYUE9SVDoK KyAgIERyYXcgdGhlIGN1cnNvciBnbHlwaCBvZiB3aW5kb3cgVyBpbiBnbHlwaCByb3cgUk9XLiAg U2VlIHRoZQorICAgY29tbWVudCBvZiBkcmF3X2dseXBocyBmb3IgdGhlIG1lYW5pbmcgb2YgSEwu ICovCit2b2lkCittY19kcmF3X2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAg ICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIGhsLCBpbnQgeCwgaW50IGhwb3MsIGlu dCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1j X2ZsYXZvciBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJz b3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IHdkLCBib29sIGFjdGl2ZV9wLAorICAgICAgICAgICAg ICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3ApCit7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmJvdHRv bV9yb3cgPSBNQVRSSVhfQk9UVE9NX1RFWFRfUk9XIChtYXRyaXgsIHcpOworICBpbnQgYm90dG9t X3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGJvdHRvbV9yb3csIG1hdHJpeCk7CisvKgorICAgICAg c3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBtYXRy aXgsIHJvdywgaHBvcywgdnBvcyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19kcmF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isgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobDsKKyAgLyogTm8gY3Vyc29yIGRpc3BsYXll ZCBvciByb3cgaW52YWxpZGF0ZWQgPT4gbm90aGluZyB0byBkbyBvbiB0aGUgc2NyZWVuLiAqLwor ICBpZiAoY3Vyc29yX3R5cGUgPT0gTUNfTk9fQ1VSU09SKQorICAgIHsKKyAgICAgIGlmIChkZWJ1 Z19wKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6ICByZXR1cm4g KCVkKVxuIiwgMSk7CisgICAgICByZXR1cm47CisgICAgfQorICAvKiBWUE9TID49IG1hdHJpeC0+ bnJvd3MgbWVhbnMgdGhhdCB3aW5kb3cgaGFzIGJlZW4gcmVzaXplZC4KKyAgICAgRG9uJ3QgYm90 aGVyIHRvIGVyYXNlIHRoZSBjdXJzb3IuICovCisgIGlmICh2cG9zID49IG1hdHJpeC0+bnJvd3Mp CisgICAgeworICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1j X2VyYXNlX2N1cnNvcjogIHJldHVybiAoJWQpXG4iLCAyKTsKKyAgICAgIHJldHVybjsKKyAgICB9 CisgIC8qIElmIHJvdyBjb250YWluaW5nIGN1cnNvciBpcyBtYXJrZWQgaW52YWxpZCwgdGhlcmUg aXMgbm90aGluZyB3ZQorICAgICBjYW4gZG8uICovCisgIGlmICghcm93LT5lbmFibGVkX3ApCisg ICAgeworICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX2Vy YXNlX2N1cnNvcjogIHJldHVybiAoJWQpXG4iLCAzKTsKKyAgICAgIHJldHVybjsKKyAgICB9Cisg IC8qIElmIGxpbmUgc3BhY2luZyBpcyA+IDAsIG9sZCBjdXJzb3IgbWF5IG9ubHkgYmUgcGFydGlh bGx5IHZpc2libGUgaW4KKyAgICAgd2luZG93IGFmdGVyIHNwbGl0LXdpbmRvd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ApCisgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6 ICByZXR1cm4gKCVkKVxuIiwgNyk7CisgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CisgICAg ICBpbnQgdGVtcF93ZCA9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICBpZiAodGVt cF94IDwgMCkKKyAgICAgICAgeworICAgICAgICAgIHRlbXBfd2QgKz0gdGVtcF94OworICAgICAg ICAgIHRlbXBfeCA9IDA7CisgICAgICAgIH0KKyAgICAgIHRlbXBfd2QgPSBtaW4gKHdkLCB3aW5k b3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpIC0gdGVtcF94KTsKKyAgICAgIGludCBmeSA9IFdJ TkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCBtYXggKGhlYWRlcl9saW5lX2hlaWdodCwgcm93LT55 KSk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB0ZW1w X3gpOworICAgICAgaWYgKHRlbXBfd2QgPiAwKQorICAgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVh cl9mcmFtZV9hcmVhIChmLCBmeCwgZnksIHRlbXBfd2QsIHJvdy0+dmlzaWJsZV9oZWlnaHQpOwor ICAgIH0KKyAgLyogRXJhc2UgdGhlIGN1cnNvciBieSByZWRyYXdpbmcgdGhlIGNoYXJhY3RlciB1 bmRlcm5lYXRoIGl0LiAqLworICBpZiAobW91c2VfZmFjZV9oZXJlX3ApCisgICAgaGwgPSBEUkFX X01PVVNFX0ZBQ0U7CisgICAgZWxzZQorICAgICAgaGwgPSBEUkFXX05PUk1BTF9URVhUOworICBz dHJ1Y3QgbWNfUkdCIGxzbCA9IHsucmVkID0gLTEuMCwgLmdyZWVuID0gLTEuMCwgLmJsdWUgPSAt MS4wfTsKKyAgYm9vbCBhY3RpdmVfcCA9IGZhbHNlOworICBib29sIGN1cnNvcl9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IGludCB2cG9zLCBpbnQgd2QsIGlu dCBoLAorICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5 cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JH QiBsc2wsIGJvb2wgYWN0aXZlX3AsIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwKKyAgICAg ICAgICAgICAgICAgICAgICBib29sIHJlbW92ZV9wKQoreworICAvKiBgbWF0cml4X3JvdycgaW4g YGRpc3BuZXcuY2AgY29udGFpbnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgZWFzc2VydCAobWF0 cml4ICYmIG1hdHJpeC0+cm93cyk7CisgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJp eC0+bnJvd3MpOyAqLworICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJpeCAmJiBtYXRyaXgt PnJvd3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgcmV0dXJu OworICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZwb3MgPj0gMCAmJiB2cG9zIDwgbWF0cml4LT5u cm93cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICByZXR1cm47 CisgIGlmICh4IDwgMAorICAgICAgfHwgeSA8IDAKKyAgICAgIHx8IGhwb3MgPCAwCisgICAgICB8 fCB2cG9zIDwgMCkKKyAgICByZXR1cm47CisgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNvbnRlbnRz OworICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgIGJvb2wgYXV0b19oc2Nyb2xsX21vZGVfcCA9IEVR IChGYnVmZmVyX2xvY2FsX3ZhbHVlIChRYXV0b19oc2Nyb2xsX21vZGUsIGJ1ZiksIFFjdXJyZW50 X2xpbmUpOworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpICovCisgIGJvb2wgaHNjbF9h bGxfdGVtcF9wID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hz Y3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIG5vdGhpbmcuICov CisgIGJvb2wgaHNjbF9hbGxfcGVybV8wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMt dSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIGVsc2UgYmVzaWRlcyBob3Jpem9udGFsbHkgc2Nyb2xs aW5nIHRoZQorICAgICAgICAgICAgICAgY3VycmVudCBsaW5lIGRpZmZlcmVudGx5LgorICAgICAg ICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZm ZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzFfcCA9ICghdy0+c3VzcGVuZF9hdXRv X2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9k ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyog RVhBTVBMRTogIEMtdSBDLXggPCBhbmQgLi4uCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUg aXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhz Y2xfYWxsX3Blcm1fMl9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID09IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVm dCA1KTsgYW5kLCB0aGVuIHByZXNzIHRoZSBsZWZ0IGFycm93IGtleSBvbmUgdGltZS4KKyAgICAg ICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJl bnRseS4qLworICBib29sIGhzY2xfdGVtcF9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAor ICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYmIHct Pm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21l dGhpbmcgdGhhdCBjYXVzZXMgdGhlIGN1cnJlbnQgbGluZSB0byBiZQorICAgICAgICAgICAgICAg aG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LgorICAgICAgICAgICAgICAgQ3VycmVu dCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29s IGhzY2xfcGVybV9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAg ICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwp OworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgaW50IGZyaW5nZV9i aXRtYXAgPSBNQ19OT19GUklOR0VfQklUTUFQOworICBpbnQgZmFjZV9pZCA9IERFRkFVTFRfRkFD RV9JRDsKKyAgaWYgKCFyZW1vdmVfcAorICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJM QVlfQVJST1dfQklUTUFQCisgICAgICAmJiAhaHNjbF9hbGxfdGVtcF9wCisgICAgICAmJiAhaHNj bF90ZW1wX3AKKyAgICAgICYmICFoc2NsX3Blcm1fcAorICAgICAgJiYgIWhzY2xfYWxsX3Blcm1f MF9wCisgICAgICAmJiAhaHNjbF9hbGxfcGVybV8xX3AKKyAgICAgICYmICFoc2NsX2FsbF9wZXJt XzJfcCkKKyAgICB7CisgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0K KyAgICAgICAgKCFhY3RpdmVfcAorICAg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AgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklU TUFQOworICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgIHJv dy0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgIHJvdy0+ZnJpbmdlX2JpdG1hcF9wZXJp b2RpY19wID0gZmFsc2U7CisgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgdHJ1 ZSwgY3Vyc29yX3R5cGUpOworICAgIH0KKyAgICBlbHNlIGlmICghcmVtb3ZlX3AKKyAgICAgICAg ICAgICAmJiBnbHlwaF9mbGF2b3IgPT0gTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAKKyAgICAgICAg ICAgICAmJiAoaHNjbF9hbGxfdGVtcF9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Bl cm1fMF9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMV9wCisgICAgICAgICAg ICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfdGVt cF9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfcGVybV9wKSkKKyAgICAgIHsKKyAgICAgICAg ZW51bSBmYWNlX2lkIG92ZXJsYXlfYXJyb3dfZmFjZV9pZCA9CisgICAgICAgICAgKCFhY3RpdmVf cAorICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9p bmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1 ZSkKKyAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgID8gbG9va3VwX25hbWVkX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19iaXRtYXBgIHNh dGlzZmllcyB0aGUgZmlyc3QgY29uZGl0aW9uCisgICAgICAgIG9mICh3aGljaCAhPSBOT19GUklO R0VfQklUTUFQKS4gIEF0IHRoaXMgdGltZSwgQGxhd2xpc3QgcHJlZmVycyBub3QgdG8KKyAgICAg ICAgcmVseSB1cG9uIGEgTGlzcCBzZXR0aW5nIHVzaW5nIGBzZXQtZnJpbmdlLWJpdG1hcC1mYWNl Jy4gKi8KKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0g TUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIHJvdy0+bGVmdF9mcmlu Z2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgIHJvdy0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0g MDsKKyAgICAgICAgcm93LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxzZTsKKyAgICAg ICAgbWNfZHJhd19mcmluZ2VfYml0bWFwICh3LCByb3csIHRydWUsIGN1cnNvcl90eXBlKTsKKyAg ICAgIH0KKyAgICAgIGVsc2UgaWYgKCFyZW1vdmVfcAorICAgICAgICAgICAgICAgJiYgKGdseXBo X2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfSE9MTE9X X1JFQ1RBTkdMRQorICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3Ig PT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAg ICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAg IHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAg ICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkpCisg ICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGdseXBoX2Zs YXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9 PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX2hvbGxvd19yZWN0YW5n bGVfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Z2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBRbWNfaG9sbG93X3JlY3RhbmdsZQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxf QkFSX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFS X1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g UW1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jh cgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3Ig PT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFS X0JBQ0tTTEFTSCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFt Y192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogUW5pbDsKKyAgICAgICAgICBmcmluZ2VfYml0bWFwID0gKGN1cnNvcl90eXBlID09 IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gbG9v a3VwX2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2b3IpCisgICAgICAgICAgICAgICAgICAgICAg ICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICBmYWNlX2lkID0gKGN1cnNvcl90 eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAgICYmIChn bHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVwor ICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlw aF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKSkKKyAgICAgICAgICAgICAgICAg ICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1w cmUtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9 PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBo X2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9y ICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgICAgICA/IGxv b2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJhci1wcmUtenYtZmFjZSIpLCB0cnVl KQorICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICByb3ct PmN1cnNvcl9pbl9mcmluZ2VfcCA9IGZhbHNlOworICAgICAgICAgIHJvdy0+cmlnaHRfZnJpbmdl X2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgcm93LT5yaWdodF9mcmluZ2VfZmFj ZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgICAgcm93LT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gMDsK KyAgICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAgICAg ICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcCAodywgcm93LCBmYWxzZSwgY3Vyc29yX3R5cGUpOwor ICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAg ICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTKQorICAgICAgICAg IHsKKyAgICAgICAgICAgIGJvb2wgb25fcCA9IHRydWU7CisgICAgICAgICAgICBGUkFNRV9SSUYg KGYpLT5tY19zY3JpYmVfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgd2Qs IGgsIGxzbCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGdseXBoX2ZsYXZvciwgb25fcCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wKTsKKyAgICAgICAgICB9 Cit9CisKKy8qIER1bXAgY29udGVudHMgb2YgZ2x5cGggR0xZUEggdG8gc3RkZXJyLiAgUk9XIGFu ZCBBUkVBIGFyZQorICAgdGhlIGdseXBoIHJvdyBhbmQgYXJlYSB3aGVyZSB0aGUgZ2x5cGggY29t ZXMgZnJvbS4gKi8KK3ZvaWQKK21jX2R1bXBfZ2x5cGggKHN0cnVjdCBnbHlwaF9yb3cgKnJvdywg c3RydWN0IGdseXBoICpnbHlwaCwgaW50IGFyZWEsCisgICAgICAgICAgICAgICBpbnQgcmVsYXRp dmVfeCwgaW50IHZwb3MpCit7CisgIGJvb2wgZ2x5cGhfenZfcCA9IChnbHlwaCAtIHJvdy0+Z2x5 cGhzW2FyZWFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICYm IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPT0gWlYpOworICBpZiAoZ2x5cGgtPnR5cGUg PT0gQ0hBUl9HTFlQSAorICAgICAgfHwgZ2x5cGgtPnR5cGUgPT0gR0xZUEhMRVNTX0dMWVBIKQor ICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVk ICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVzXG4iLAor ICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51 c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxh dGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgPyAn QycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChC VUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklO R1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklM UCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6 ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+dS5j aCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5l X3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBv cywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAo Z2x5cGgtPnUuY2gpKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFNUUkVUQ0hf R0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQv JS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMg JXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAg KChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAg ICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisg ICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAg ICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAg ICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAg ICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAg ICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisg ICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5 cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7CisgICAgfQorICBlbHNlIGlm IChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRl cnIsCisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNngg JTRkICUxLjFkJTEuMWQgICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBo c1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ct PnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ0knLAorICAg ICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAg ICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxf d2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmltZ19pZCwKKyAgICAgICAg Z2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAg IGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZf cCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgt PnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwK KyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisg ICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVz ZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0 aXZlX3gsCisgICAgICAgICcrJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChC VUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChT VFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChO SUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykp KSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBn bHlwaC0+dS5jbXAuaWQpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFk IiwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5l X3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+ dS5jbXAuYXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICUzZCAlcyAuIFsl ZC0lZF1cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2 X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+c2xpY2Uu Y21wLmZyb20sIGdseXBoLT5zbGljZS5jbXAudG8pOworICAgICAgICBlbHNlCisgICAgICAgIGZw cmludGYgKHN0ZGVyciwgIlxuIik7CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBY V0lER0VUX0dMWVBIKQorICAgIHsKKyNpZm5kZWYgSEFWRV9YV0lER0VUUworICAgICAgZWFzc3Vt ZSAoZmFsc2UpOworI2Vsc2UKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAgJTVk LyUtNWQgJTVkICU0YyAlNmQgJWMgJTNkIDB4JTA1eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVj XG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgo cm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAg ICByZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAg ICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicKKyAgICAgICAg IDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAg OiAnLScpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+ZmFj ZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJp Z2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisgICAgICAgIGdseXBo LT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisjZW5kaWYK KyAgICB9Cit9CisKKy8qIER1bXAgdGhlIGNvbnRlbnRzIG9mIGdseXBoIHJvdyBhdCBWUE9TIGlu IE1BVFJJWCB0byBzdGRlcnIuCisgICBHTFlQSFMgMCBtZWFucyBkb24ndCBzaG93IGdseXBoIGNv bnRlbnRzLgorICAgR0xZUEhTIDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4gc2hvcnQgZm9ybQorICAg R0xZUEhTID4gMSBtZWFucyBzaG93IGdseXBocyBpbiBsb25nIGZvcm0uICovCit2b2lkCittY19k dW1wX2dseXBoX3JvdyAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgdnBvcywgaW50IGdseXBo cykKK3sKKyAgaW50IHJlbGF0aXZlX3ggPSAwOworICBpZiAoZ2x5cGhzICE9IDEpCisgICAgewor ICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5EVU1QIEdMWVBIIFJPV1xuIik7CisgICAgICBmcHJp bnRmIChzdGRlcnIsICJSb3cgICAgIFN0YXJ0ICAgICAgIEVuZCBVc2VkIG9FPjxcXENUWkZlc20g ICAgIFggICAgWSAgICBXICAgIEggICAgViAgICBBICAgIFBcbiIpOworICAgICAgZnByaW50ZiAo c3RkZXJyLCAiPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVy ciwgIiUzZCAlOSJwRCJkICU5InBEImQgJTRkICUxLjFkJTEuMWQlMS4xZCUxLjFkXAorJTEuMWQl MS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCAgJTRkICU0ZCAlNGQgJTRkICU0ZCAl NGQgJTRkXG4iLAorICAgICAgICAgdnBvcywKKyAgICAgICAgIE1BVFJJWF9ST1dfU1RBUlRfQ0hB UlBPUyAocm93KSwKKyAgICAgICAgIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdyksCisgICAg ICAgICByb3ctPnVzZWRbVEVYVF9BUkVBXSwKKyAgICAgICAgIHJvdy0+Y29udGFpbnNfb3Zlcmxh cHBpbmdfZ2x5cGhzX3AsCisgICAgICAgICByb3ctPmVuYWJsZWRfcCwKKyAgICAgICAgIHJvdy0+ dHJ1bmNhdGVkX29uX2xlZnRfcCwKKyAgICAgICAgIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3As CisgICAgICAgICByb3ctPmNvbnRpbnVlZF9wLAorICAgICAgICAgTUFUUklYX1JPV19DT05USU5V QVRJT05fTElORV9QIChyb3cpLAorICAgICAgICAgTUFUUklYX1JPV19ESVNQTEFZU19URVhUX1Ag KHJvdyksCisgICAgICAgICByb3ctPmVuZHNfYXRfenZfcCwKKyAgICAgICAgIHJvdy0+ZmlsbF9s aW5lX3AsCisgICAgICAgICByb3ctPmVuZHNfaW5fbWlkZGxlX29mX2NoYXJfcCwKKyAgICAgICAg IHJvdy0+c3RhcnRzX2luX21pZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPm1vdXNlX2Zh Y2VfcCwKKyAgICAgICAgIHJvdy0+eCwKKyAgICAgICAgIHJvdy0+eSwKKyAgICAgICAgIHJvdy0+ cGl4ZWxfd2lkdGgsCisgICAgICAgICByb3ctPmhlaWdodCwKKyAgICAgICAgIHJvdy0+dmlzaWJs ZV9oZWlnaHQsCisgICAgICAgICByb3ctPmFzY2VudCwKKyAgICAgICAgIHJvdy0+cGh5c19hc2Nl bnQpOworICAgICAgLyogVGhlIG5leHQgMyBsaW5lcyBzaG91bGQgYWxpZ24gdG8gIlN0YXJ0IiBp biB0aGUgaGVhZGVyLiAqLworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAgICU5InBEImQgJTki cEQiZFx0JTVkXG4iLCByb3ctPnN0YXJ0Lm92ZXJsYXlfc3RyaW5nX2luZGV4LAorICAgICAgICAg cm93LT5lbmQub3ZlcmxheV9zdHJpbmdfaW5kZXgsCisgICAgICAgICByb3ctPmNvbnRpbnVhdGlv bl9saW5lc193aWR0aCk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTkicEQiZCAlOSJw RCJkXG4iLAorICAgICAgICAgQ0hBUlBPUyAocm93LT5zdGFydC5zdHJpbmdfcG9zKSwKKyAgICAg ICAgIENIQVJQT1MgKHJvdy0+ZW5kLnN0cmluZ19wb3MpKTsKKyAgICAgIGZwcmludGYgKHN0ZGVy ciwgIiAgICAlOWQgJTlkXG4iLCByb3ctPnN0YXJ0LmRwdmVjX2luZGV4LAorICAgICAgICAgcm93 LT5lbmQuZHB2ZWNfaW5kZXgpOworICAgIH0KKyAgaWYgKGdseXBocyA+IDEpCisgICAgeworICAg ICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsr YXJlYSkKKyAgeworICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsK KyAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOwor ICAgIC8qIEdseXBoIGZvciBhIGxpbmUgZW5kIGluIHRleHQuICovCisgICAgaWYgKGFyZWEgPT0g VEVYVF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisg ICAgICArK2dseXBoX2VuZDsKKyAgICBpZiAoZ2x5cGggPCBnbHlwaF9lbmQpCisgICAgICBmcHJp bnRmIChzdGRlcnIsICJHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENv ZGUgRmFjZSBMUiBIUE9TIFpWIENcbiIpOworICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsg KytnbHlwaCkKKyAgICAgIHsKKyAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBnbHlwaCwgYXJl YSwgcmVsYXRpdmVfeCwgdnBvcyk7CisgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVs X3dpZHRoOworICAgICAgfQorICB9CisgICAgfQorICBlbHNlIGlmIChnbHlwaHMgPT0gMSkKKyAg ICB7CisgICAgICBjaGFyIHNbU0hSVF9NQVggKyA0XTsKKyAgICAgIGZvciAoaW50IGFyZWEgPSBM RUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgIHsKKyAgICBpbnQg aTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgcm93LT51c2VkW2FyZWFdOyArK2kpCisgICAgICB7Cisg ICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXSArIGk7CisgICAg ICAgIGlmIChpID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICYmIGFyZWEgPT0gVEVYVF9B UkVBCisgICAgICAmJiBOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgJiYgZ2x5cGgtPnR5cGUg PT0gQ0hBUl9HTFlQSAorICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gJyAnKQorICAgIHsKKyAgICAg IHN0cmNweSAoJnNbaV0sICJbXFxuXSIpOworICAgICAgaSArPSA0OworICAgIH0KKyAgICAgICAg ZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgICAmJiBnbHlwaC0+ dS5jaCA8IDB4ODAKKyAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPj0gJyAnKQorICAgIHNbaV0g PSBnbHlwaC0+dS5jaDsKKyAgICAgICAgZWxzZQorICAgIHNbaV0gPSAnLic7CisgICAgICB9Cisg ICAgc1tpXSA9ICdcMCc7CisgICAgZnByaW50ZiAoc3RkZXJyLCAiJTNkOiAoJWQpICclcydcbiIs IHZwb3MsIHJvdy0+ZW5hYmxlZF9wLCBzKTsKKyAgfQorICAgIH0KK30KKworREVGVU4gKCJtYy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gICAgICAgICAgICAgICAgICA/IHlwb3MgKyAxCisgICAg ICAgICAgICAgICAgICAgICAgOiB5cG9zOworICAgICAgaWYgKHZpc2libGVfcCkKKyAgICAgICAg dnBvcyA9IHZvZmZzZXQ7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB2cG9zID0gMDsKKyAgICB9 CisgICAgZWxzZQorICAgICAgeworICAgICAgICBDSEVDS19OVU1CRVIgKHJvdyk7CisgICAgICAg IHZwb3MgPSBYRklYTlVNIChyb3cpOworICAgICAgfQorICBpZiAodnBvcyA+PSAwICYmIHZwb3Mg PCBtYXRyaXgtPm5yb3dzKQorICAgIG1jX2R1bXBfZ2x5cGhfcm93IChNQVRSSVhfUk9XIChtYXRy aXgsIHZwb3MpLAorICAgICAgICB2cG9zLAorICAgICAgICBUWVBFX1JBTkdFRF9GSVhOVU1QIChp bnQsIGdseXBocykgPyBYRklYTlVNIChnbHlwaHMpIDogMik7CisgIHJldHVybiBRbmlsOworfQor Cit2b2lkCittY19kdW1wX2dseXBoX21hdHJpeCAoc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4 LCBpbnQgZ2x5cGhzKQoreworICBpbnQgaTsKKyAgZm9yIChpID0gMDsgaSA8IG1hdHJpeC0+bnJv d3M7ICsraSkKKyAgICBtY19kdW1wX2dseXBoX3JvdyAoTUFUUklYX1JPVyAobWF0cml4LCBpKSwg aSwgZ2x5cGhzKTsKK30KKworREVGVU4gKCJtYy1kdW1wLWdseXBoLW1hdHJpeCIsIEZtY19kdW1w X2dseXBoX21hdHJpeCwKKyAgICAgICBTbWNfZHVtcF9nbHlwaF9tYXRyaXgsIDAsIDEsICJwIiwK KyAgICAgICBkb2M6IC8qIER1bXAgdGhlIGN1cnJlbnQgbWF0cml4IG9mIHRoZSBzZWxlY3RlZCB3 aW5kb3cgdG8gc3RkZXJyLgorU2hvd3MgY29udGVudHMgb2YgZ2x5cGggcm93IHN0cnVjdHVyZXMu ICBXaXRoIG5vbi1uaWwKK3BhcmFtZ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wKTsKKyAgcmV0dXJuIFFuaWw7Cit9 CisKK2Jvb2wKK21jX3RyYXZlcnNlX2NhY2hlX3AgKHN0cnVjdCBtY19tYXRyaXggbWF0cml4LCBl bnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgIGludCB2 bnRoLCBpbnQgbnRoKQoreworICBpZiAodm50aCA8IG1hdHJpeC52cG9zX3VzZWQKKyAgICAgICYm IG1hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV0gPiAwCisgICAgICAmJiBudGggPCBtYXRy aXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdKQorICAgIHJldHVybiB0cnVlOwor ICAgIGVsc2UKKyAgICAgIHJldHVybiBmYWxzZTsKK30KKwordm9pZAorbWNfcmVzZXRfY2FjaGUg KHN0cnVjdCB3aW5kb3cgKncpCit7CisgIGlmICghQlVGRkVSUCAody0+Y29udGVudHMpKQorICAg IHJldHVybjsKKyAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hF OworICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisg ICAgeworICAgICAgYm9vbCBidmFyX2FjdGl2ZV9wOworICAgICAgc3dpdGNoIChjYWNoZV90eXBl KQorICAgICAgICB7CisgICAgICAgICAgY2FzZSBOT19DQUNIRToKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfQorICAgICAgICAgIGNhc2UgTUNfQ0FD SEU6CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50 cykKKyAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgbWNfY29uZikpKQorICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSBmYWxzZTsKKyAg ICAgICAgICAgICAgICBlbHNlIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAg ICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19j b25mKSkpCisgICAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gdHJ1ZTsKKyAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgY2FzZSBDSF9DQUNIRToKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAg ICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9z c2hhaXJzKSkpCisgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IGZhbHNlOworICAgICAg ICAgICAgICAgIGVsc2UgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKSkKKyAgICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSB0cnVlOworICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBjYXNlIEZDX0NBQ0hFOgorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAg ICAgICAgICAgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zp c2libGUpKSkKKyAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gZmFsc2U7CisgICAgICAg ICAgICAgICAgZWxzZSBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJs ZSkpKQorICAgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IHRydWU7CisgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAoIWJ2YXJfYWN0 aXZlX3ApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBEZWNyZWFzZSB0aGUgc2l6ZSBvZiB0aGUg YXJyYXkgdG8gYSBiYXJlIG1pbmltdW0uICovCisgICAgICAgICAgZm9yIChpbnQgdm50aCA9IDA7 IHZudGggPCB3LT5tY19tYXRyaXgudnBvc191c2VkOyArK3ZudGgpCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIGlmICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRb Y2FjaGVfdHlwZV0gPiAxKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdID0KKyAgICAgICAgICAgICAg ICAgICAgeG5yZWFsbG9jICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XSwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKnctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdKTsKKyAgICAgICAgICAgICAgICAgIHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSA9IDE7CisgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZV91c2VkW2NhY2hlX3R5cGVdID0gMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICB3LT5tY19t YXRyaXguY3Vyc29yc191c2VkW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w ZV1bbnRoXS5nbHlwaC5zbGljZS5pbWcuaGVpZ2h0ID09IGdseXBoLT5zbGljZS5pbWcuaGVpZ2h0 CisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXS5nbHlwaC5zbGljZS5jbXAuZnJvbSA9PSBnbHlwaC0+c2xpY2UuY21wLmZyb20KKyAg ICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLnggPT0geAorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uZnggPT0gZngKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnkgPT0geQorICAgICAgICAgICAgICYm IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnkgPT0gZnkK KyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmhwb3MgPT0gaHBvcworICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0udnBvcyA9PSB2cG9zCisgICAgICAgICAgICAgJiYg dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZCA9PSB3ZAor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uaCA9PSBoCisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZSA9PSBjdXJzb3JfdHlwZQorICAgICAgICAg ICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vy c29yX3dpZHRoID09IGN1cnNvcl93aWR0aAorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcucmVkID09IGZvcmVncm91bmQucmVk CisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXS5mZy5ncmVlbiA9PSBmb3JlZ3JvdW5kLmdyZWVuCisgICAgICAgICAgICAgJiYgdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlID09IGZv cmVncm91bmQuYmx1ZQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkID09IGJhY2tncm91bmQucmVkCisgICAgICAgICAg ICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5n cmVlbiA9PSBiYWNrZ3JvdW5kLmdyZWVuCisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ibHVlID09IGJhY2tncm91bmQuYmx1 ZQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uYWN0aXZlX3AgPT0gYWN0aXZlX3AKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvciA9PSBnbHlw aF9mbGF2b3IKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcCA9PSB0cnVlKTsKKyAgICAgICAgfQorICAgICAgaWYg KCFzYW1lX3ApCisgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCBtYXRyaXgsIHJvdywg eCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLCBn bHlwaF9mbGF2b3IsIHJlbW92ZV9wKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgICAgZWxzZSBp ZiAoZHJhd19wCisgICAgICAgICAgICAgJiYgKGZyb21fd2hlcmUgPT0gU0NSSUJFX09ORQorICAg ICAgICAgICAgICAgICB8fCBmcm9tX3doZXJlID09IFNDUklCRV9UV08KKyAgICAgICAgICAgICAg ICAgfHwgZnJvbV93aGVyZSA9PSBTQ1JJQkVfVEhSRUUKKyAgICAgICAgICAgICAgICAgfHwgZnJv bV93aGVyZSA9PSBOT1dIRVJFKSkKKyAgICB7CisgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAo dywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsIGN1cnNvcl90 eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgZm9yZWdyb3Vu ZCwgYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICAgICAgcmV0dXJuOworICAg IH0KKyAgaWYgKGNhY2hlX3R5cGUgPT0gTk9fQ0FDSEUpCisgICAgcmV0dXJuOworICArK3ctPm1j X21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgIGlmICh2bnRoID49IHctPm1jX21h dHJpeC52cG9zX3VzZWQpCisgICAgdy0+bWNfbWF0cml4LnZwb3NfdXNlZCA9IHZudGggKyAxOwor ICBpZiAody0+bWNfbWF0cml4LnZwb3NfYWxsb2NhdGVkIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNl ZCkKKyAgICB7CisgICAgICBpbnQgb2xkX2FsbG9jID0gdy0+bWNfbWF0cml4LnZwb3NfYWxsb2Nh dGVkOworICAgICAgaW50IG5ld19lbHRzID0gdy0+bWNfbWF0cml4LnZwb3NfdXNlZCAtIHctPm1j X21hdHJpeC52cG9zX2FsbG9jYXRlZDsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zID0geHBhbGxv YyAody0+bWNfbWF0cml4LnZwb3MsICZ3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19lbHRzLCBJTlRfTUFYLCBzaXplb2Yg KnctPm1jX21hdHJpeC52cG9zKTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0cml4LnZwb3MgKyBv bGRfYWxsb2MsIDAsCisgICAgICAgICAgICAgICAody0+bWNfbWF0cml4LnZwb3NfYWxsb2NhdGVk IC0gb2xkX2FsbG9jKSAqIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3MpOworICAgIH0KKyAgKyt3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdOworICBpZiAody0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdIDwgdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSkKKyAgICB7CisgICAgICBp bnQgb2xkX2FsbG9jID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2Nh Y2hlX3R5cGVdOworICAgICAgaW50IG5ld19lbHRzID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVfdXNlZFtjYWNoZV90eXBlXSAtIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2Fs bG9jYXRlZFtjYWNoZV90eXBlXTsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdID0geHBhbGxvYyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICZ3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2Fj aGVfdHlwZV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG5ld19lbHRzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKnctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdKTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0gKyBvbGRfYWxsb2MsIDAsCisgICAgICAg ICAgICAgICAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5 cGVdIC0gb2xkX2FsbG9jKQorICAgICAgICAgICAgICAgICAqIHNpemVvZiAqdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0pOworICAgIH0KKworICBpbnQgbnRoID0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSAtIDE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mRp bmF0ZSBmb3IgYSBsZXZlbCBydWxlci4KKyAgIFZFUlRJQ0FMX1JVTEVSIGFuZCBGSUxMX0NPTFVN TjogIFdlIHdhbnQgYW4gSCB0aGF0IGVuc3VyZXMgbm8gZ2FwIGJldHdlZW4gdGhlCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91cy9uZXh0IGxpbmUuICBUaGUgRlgg Y29vcmRpbmF0ZSBpcyBzZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVs c2V3aGVyZTogIGB3LT5jdXJzb3IueGAgLyBgbWMuZmNfeGAuICovCit2b2lkCittY19nZXRfY3Vy c29yX2dlb21ldHJ5IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRy aXgsCisgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB4 LCBpbnQgKmZ4LCBpbnQgeSwKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCAqZnksIGludCBo cG9zLCBpbnQgdnBvcywgaW50ICpoLAorICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19j dXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAg ICAgICAgICAgIGludCAqd2QpCit7CisgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSBtY19nZXRfY3Vy c29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgIGlmIChnbHlwaCA9PSBO VUxMKQorICAgIHJldHVybjsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJB TUUgKHcpKTsKKyAgKmZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7Cisg ICpoID0gcm93LT52aXNpYmxlX2hlaWdodDsKKyAgLyogRG9uJ3QgbGV0IHRoZSBjdXJzb3IgZXhj ZWVkIHRoZSBkaW1lbnNpb25zIG9mIHRoZSByb3csIHNvIHRoYXQKKyAgdGhlIHVwcGVyL2xvd2Vy IHNpZGUgb2YgdGhlIGJveCBhcmVuJ3QgY2xpcHBlZC4gICovCisgIGludCB3X2hlYWRlcl9saW5l X2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICBpbnQgd190ZXh0X2Jv dHRvbV95ID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpIC0gKmg7CisgIGlmICh5IDwgd19oZWFk ZXJfbGluZV9oZWlnaHQpCisgICAgeworICAgICAgKmggPSBtYXggKCpoIC0gKHdfaGVhZGVyX2xp bmVfaGVpZ2h0IC0geSkgKyAxLCAqaCk7CisgICAgICB5ID0gd19oZWFkZXJfbGluZV9oZWlnaHQg LSAxOworICAgICAgLy8gZnByaW50ZiAoc3RkZXJyLCAiQ09ORElUSU9OICMgMVxuIik7CisgICAg fQorICAgZWxzZSBpZiAoeSA+IHdfdGV4dF9ib3R0b21feSkKKyAgICAgeworICAgICAgICpoICs9 IHkgLSB3X3RleHRfYm90dG9tX3k7CisgICAgICAgeSA9IHdfdGV4dF9ib3R0b21feTsKKyAgICAg ICAvLyBmcHJpbnRmIChzdGRlcnIsICJDT05ESVRJT04gIyAyXG4iKTsKKyAgICAgfQorICAqZnkg PSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgeSk7CisgIHN3aXRjaCAoY3Vyc29yX3R5cGUp CisgICAgeworICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgIHsKKyAgICAgICAgICBpZiAoY3Vy c29yX3dpZHRoIDwgMSkKKyAgICAgICAgICAgIGN1cnNvcl93aWR0aCA9IG1heCAoRlJBTUVfQ1VS U09SX1dJRFRIIChmKSwgMSk7CisgICAgICAgICAgaWYgKGN1cnNvcl93aWR0aCA8IGdseXBoLT5w aXhlbF93aWR0aCkKKyAgICAgICAgICAqd2QgPSBjdXJ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JVRkZFUiAoYnVmKTsKKyAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGJ1 Zik7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FS RUEpOworICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJzb3Jfcm93ID0gKHctPmN1cnNvci52cG9zICE9 IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9XIChjdXJz b3JfbWF0cml4LCB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogTlVMTDsKKyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSAody0+Y3Vyc29yLnZw b3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19nZXRfY3Vyc29y X2dseXBoICh3LCBjdXJzb3JfbWF0cml4LCBjdXJzb3Jfcm93LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLmhwb3MsIHctPmN1 cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgYm9v bCBjdXJzb3JfYXRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9B UkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT5leGFjdF93 aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1 cnNvci54ID09IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5jdXJzb3IueCA9PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7CisgIGJvb2wgY3Vyc29y X2JleW9uZF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVMTAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93LT51c2VkW1RF WFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFjdXJzb3Jfcm93 LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IueCA+PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRo KTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBp bnQgdGVtcF9mYWNlX2lkID0gZ2x5cGgtPmZhY2VfaWQ7CisgIHN0cnVjdCBtY19SR0IgYmFja2dy b3VuZDsKKyAgbWNfc2V0X2xzbF9iZyAodywgdGVtcF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7Cisg IGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0aXZlX3gKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0gaHBvcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSByb3ctPnkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcyk7CisKKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgQ0hBUl9HTFlQSCB8 IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgaWYgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGdseXBoLT50 eXBlID09IEdMWVBITEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAg IGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQi ZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGds eXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0g PT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisg ICAgICAgIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICA/ICdDJworICAgICAg ICAgOiAnRycpLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGds eXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAg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Ag ICAgICBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIENIQVJfR0xZUEgg fCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t ICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmIChyZWxhdGl2 ZV94IDwgcm93LT5waXhlbF93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3Ap CisgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90 eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAg ICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwg Y2FjaGVfdHlwZSwKKyAgICAgICAgICAgICAgICAgICBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAo Z2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAg ICAgICAgICAmJiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICBp ZiAocmVsYXRpdmVfeCA8IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICBm eCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgICAgbWNfaGVs cGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywg dnBvcywKKyAgICAgICAgICAgICAgICAgICAgIHhfbGltaXQgLSByZWxhdGl2ZV94LCBoLCBjdXJz b3JfdHlwZSwgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwg YmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEhMRVNTLAorICAgICAgICAg ICAgICAgICAgICAgZHJhd19wLCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7 CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAq LworLyogICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIENIQVJfR0xZUEggfCBHTFlQSExF U1NfR0xZUEggICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAg ICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBo X2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdo dF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRy dW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1 cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93 LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dpZHRo KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5cGhf Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBo X2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAg IHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9 IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxwZXIg KHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgb3BvaW50X2Z4LCB5LCBmeSwgaHBv cywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMu YWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLAor ICAgICAgICAgICAgICAgICBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgRklMTF9DT0xVTU46ICBDSEFS X0dMWVBIIHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBlbnVtIG1j X2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09 IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2cG9zKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIHdkID0gMTsKKyAgICAgIG1jX2hlbHBlciAo dywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmY19meCwgeSwgZnksIGhwb3MsIHZw b3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBm b3JlZ3JvdW5kLCBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2 ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdfcCwgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwKKyAgICAg ICAgICAgICAgICAgYWN0aW9uX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBDVVJTT1JfSU5ESUNBVE9SOgorICAgIHsKKyAgICAg IGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tL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SAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAg ICAgICAgJ1MnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGds eXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAor ICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIDB1LAorICAgICAgICBnbHlwaC0+ ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgt PnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpW IiA6ICItLSIsCisgICAgICAgICJcXFMiKTsKKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgewor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJ UExFX0NVUlNPUlM6ICBTVFJFVENIX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgTVVMVElQTEVfQ1VSU09SUzoKKyAgICB7Cisg ICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwg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hlcmUsIGNhY2hlX3R5cGUsCisgICAgICAgICAgICAgICAgICAgYWN0aW9uX3R5 cGUpOworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVz ZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAg ICB7CisgICAgICAgICAgaWYgKHJlbGF0aXZlX3ggPCByb3ctPnBpeGVsX3dpZHRoKQorICAgICAg ICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgdGVtcF9m YWNlX2lkID0gKHJvdy0+ZmlsbF9saW5lX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBn bHlwaC0+ZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lE OworICAgICAgICAgIHN0cnVjdCBtY19SR0IgYmFja2dyb3VuZDsKKyAgICAgICAgICBtY19zZXRf bHNsX2JnICh3LCB0ZW1wX2ZhY2VfaWQsICZiYWNrZ3JvdW5kKTsKKyAgICAgICAgICBtY19oZWxw ZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2 cG9zLAorICAgICAgICAgICAgICAgICAgICAgeF9saW1pdCAtIHJlbGF0aXZlX3gsIGgsIGN1cnNv cl90eXBlLCB4X2xpbWl0IC0gcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgIGZvcmVn cm91bmQsIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywKKyAg ICAgICAgICAgICAgICAgICAgIGRyYXdfcCwgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9u X3R5cGUpOworICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0t LS0tL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gICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVk X29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNf VkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdI VF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2Jl eW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg Y3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdICE9IDEKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSExFU1M7CisgICAg ICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAg ICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFT SAorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAg ICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICBj dXJzb3JfdHlwZSA9IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICB3ZCA9IDE7CisgICAg ICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgb3BvaW50X3gsIG9wb2ludF9meCwg eSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwg Y3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgICBl c3NlbnRpYWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAg ICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgYnJlYWs7Cisg ICAgfQorLyogLS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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjog IElNQUdFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgIHsK KyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJc biAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4x ZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0s CisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAt IDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5j aGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0In CisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycK KyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcw JworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwK KyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlwaC0+ ZmFjZV9pZCwKKyAgICAg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S0tLS0tLS0tLSAq LworLyogICAgICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIElNQUdFX0dM WVBIICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAg ICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgY3Vyc29yX3R5cGUgPSBNQ19I T0xMT1dfQk9YOworICAgICAgaWYgKCFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hl bHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgZXNzZW50aWFs cy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwKKyAg ICAgICAgICAgICAgICAgICBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgVkVSVElD QUxfUlVMRVI6ICBJTUFHRV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBj dXJzb3JfdHlwZSA9IE1DX0hPTExPV19CT1g7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwg cm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAg ICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYmFj a2dyb3VuZCwKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgs IGRyYXdfcCwgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwKKyAgICAgICAgICAgICAgICAgYWN0aW9u X3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisv KiAgICAgICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NPTFVNTjogIElNQUdFX0dMWVBIICAg ICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNh c2UgRklMTF9DT0xVTU46CisgICAgeworICAgICAgY3Vyc29yX3R5cGUgPSBNQ19IT0xMT1dfQk9Y OworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4 LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAg IGVzc2VudGlhbHMuYWN0aXZl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S0gKi8KKyAgZWxz ZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKQorICB7CisgICAgaWYgKG1jX3N0 ZGVycl9wKQorICAgICAgeworICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICAgIlxu ICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgICBn bHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgKChyb3ctPnVzZWRbYXJl YV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgICAgcmVsYXRpdmVf eCwKKyAgICAgICAgICAnKycsCisgICAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgICAg KEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgID8gJ0InCisgICAgICAgICAgIDog KFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAg ICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICAgID8gJzAnCisgICAg ICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAg ICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5jbXAuaWQpOworICAgICAgICBmcHJpbnRm IChzdGRlcnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICAgIGdseXBoLT5mYWNlX2lkLAor ICAgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgICAgZ2x5cGgtPnJpZ2h0 X2JveF9saW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAg IGZwcmludGYgKHN0ZGVyciwgIiAgJTNkICVzIC4gWyVkLSVkXVxuIiwKKyAgICAgICAgICAgICAg ICAgICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAg ICAgICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNt cC50byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOwor ICAgICAgfQorICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgQ09NUE9T SVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAodywg bWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisg ICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3Jv dW5kLCBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBN Q19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLAorICAgICAgICAgICAgICAg ICBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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bGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdy b3VuZCwgYmFja2dyb3VuZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFj dGl2ZV9wLCBNQ19HTFlQSExFU1MsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICAgICAgICAgIHJlbGF0 aXZlX3ggKz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg ICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAg ICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAg ICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgVkVSVElDQUxf UlVMRVI6CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gKGN1cnNv cl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJv dy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g TUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0 X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxf QkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChj dXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmlu Z2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jv dy0+dXNlZFtURVhUX0FSRUFdICE9IDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF94ID49IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfVkVS VElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JF VkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gTUNfUklHSFRfRlJJTkdF X0JJVE1BUDsKKyAgICAgIHdkID0gMTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3cs IGdseXBoLCByZWxhdGl2ZV94LCBvcG9pbnRfZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAg ICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwg YmFja2dyb3VuZCwKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhf Zmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUs IGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAgQ09NUE9TSVRF X0dMWVBIICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K KyAgICBjYXNlIEZJTExfQ09MVU1OOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBo X2ZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2Fy ZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlh bHMuZmNfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1D X0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAg KEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfdmVydGljYWxf cnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50 X3kgPT0geQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50 X3Zwb3MgPT0gdnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZ UEg7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlw aCwgcmVsYXRpdmVfeCwgZmNfZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAg ICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYmFja2dyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBk cmF3X3AsIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsCisgICAgICAgICAgICAgICAgIGFjdGlvbl90 eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAg IGNhc2UgQ1VSU09SX0lORElDQVRPUjoKKyAgICB7CisgICAgICBicmVhazsKKyAgICB9CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgfQorICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K Ky8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5EOiAgQ09NUE9TSVRFX0dMWVBIICAg ICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisKKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJF R0lOOiAgWFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gWFdJREdFVF9HTFlQ SCkKKyAgeworI2lmbmRlZiBIQVZFX1hXSURHRVRTCisgICAgZWFzc3VtZSAoZmFsc2UpOworI2Vs c2UKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAg ICJcbiAgJTVkLyUtNWQgJTVkICU0YyAlNmQgJWMgJTNkIDB4JTA1eCAlNGQgJTEuMWQlMS4xZCAg JTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisg ICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEp LAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFy cG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisg ICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAg ICAgICAgICAgIDogJy0nKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAg Z2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAg IGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+dS54d2lkZ2V0LAorICAg ICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicp OworI2VuZGlmCisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgWFdJ REdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgbWNfaGVscGVyICh3 LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywK KyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVn cm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZlX3As IE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsCisgICAgICAgICAgICAg ICAgIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgWFdJ REdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgaWYgKHJlbGF0aXZl X3ggPD0geF9saW1pdAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAg IG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnks IGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIGZvcmVncm91bmQsIGJhY2tncm91bmQsCisgICAgICAgICAgICAgICAgICAgZXNz ZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwgY2FjaGVfdHlw ZSwKKyAgICAgICAgICAgICAgICAgICBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAoZ2x5cGggLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAm JiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICByZWxhdGl2ZV94 ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAocmVsYXRpdmVfeCA8PSB4 X2xpbWl0KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJp eCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAg ICAgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3Jl Z3JvdW5kLCBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMu YWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAg ICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgICAgICAgICAgcmVs YXRpdmVfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAg ICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFhXSURHRVRfR0xZUEggICAgICAgICAg ICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNB TF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vy c29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg cm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmln aHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jf cm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JF VkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBNQ19SSUdIVF9GUklO R0VfQklUTUFQOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0 aXZlX3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdk LCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBiYWNrZ3JvdW5kLAor ICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdf cCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUp OworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAg ICAgICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAgWFdJREdFVF9HTFlQSCAgICAgICAg ICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgRklM TF9DT0xVTU46CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gKGds eXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID4gcmVs YXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQ SExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3Ap CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jv c3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB5CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2cG9z KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIG1j X2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmY19meCwgeSwgZnks IGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29y X3dpZHRoLCBmb3JlZ3JvdW5kLCBiYWNrZ3JvdW5kLAorICAgICAgICAgICAgICAgICBlc3NlbnRp YWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAg ICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBDVVJTT1JfSU5ESUNBVE9SOgorICAg IHsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0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RkVSUCAody0+Y29udGVudHMpKQorICAgIHJldHVybjsKKyAgaWYg KE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAmJiBO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYg TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgcmV0 dXJuOworICBpZiAodnBvcyA9PSBib3R0b21fdnBvcykKKyAgICByZXR1cm47CisgIGlmICghcm93 LT51c2VkW1RFWFRfQVJFQV0pCisgICAgcmV0dXJuOworICBpbnQgaHBvc19zdGFydCA9IHN0YXJ0 IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQorICAg IGZwcmludGYgKHN0ZGVyciwgIm1jX2RyYXdfcm93ICglZCk6ICBkcmF3X3AgKCVzKSB8IGhwb3Mg KCVkKSB8IGxlbiAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgdnBvcywgZHJhd19wID8g InkiIDogIm4iLCBocG9zX3N0YXJ0LCBocG9zX2xlbmd0aCk7CisgIExpc3BfT2JqZWN0IGJ1ZiA9 IHctPmNvbnRlbnRzOworICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKmIg PSBYQlVGRkVSIChidWYpOworICBpbnQgb3BvaW50X2Z4LCBvcG9pbnRfZnksIG9wb2ludF93ZCwg b3BvaW50X2g7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRoICh3LCBU RVhUX0FSRUEpOworICBpbnQgaGVhZGVyX2xpbmVfZm9ybWF0ID0gV0lORE9XX0hFQURFUl9MSU5F X0hFSUdIVCAodyk7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnNvcl9yb3cgPSAody0+Y3Vyc29y LnZwb3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9S T1cgKGN1cnNvcl9tYXRyaXgsIHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBOVUxMOworICBzdHJ1Y3QgZ2x5cGggKmN1cnNvcl9nbHlwaCA9ICh3LT5j dXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX2dl dF9jdXJzb3JfZ2x5cGggKHcsIGN1cnNvcl9tYXRyaXgsIGN1cnNvcl9yb3csCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IuaHBv cywgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBOVUxM OworICBib29sIGN1cnNvcl9hdF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jvdy0+dXNl ZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ct PmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+Y3Vyc29yLnggPT0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPmN1cnNvci54ID09IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRoKTsKKyAgYm9v bCBjdXJzb3JfYmV5b25kX2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxMCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNvcl9yb3ct PnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWN1 cnNvcl9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHRleHRfYXJlYV93aWR0aAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gY3Vyc29yX3Jvdy0+cGl4 ZWxfd2lkdGgpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAg ICAgICAgIFJFUExBQ0UgVEhFIFJFQUwgQ1VSU09SCisqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KyAgZW51bSBmYWNlX2lkIGJnX2ZhY2VfaWQgPSAoY3Vyc29yX2dseXBoICE9IE5VTEwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBjdXJzb3JfZ2x5cGgtPmZhY2VfaWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgc3RydWN0IG1jX1JHQiBj dXJzb3JfYmc7CisgIG1jX3NldF9sc2xfYmcgKHcsIGJnX2ZhY2VfaWQsICZjdXJzb3JfYmcpOwor ICAvKiBGSVhNRTogIFB1dCBpbiBzb21lIGNvZGUgdG8gZGVmYXVsdCB0byBNQ19IT0xMT1dfQk9Y IGlmIHRoZSB1c2VyIGhhcworICB1bndpdHRpbmdseSBjb21lIHVwIHdpdGggc29tZSB1bmFjY2Vw dGFibGUgZm9ybSBvZiB1bnJlY29nbml6ZWQgY3Vyc29yIHR5cGUuICovCisgIExpc3BfT2JqZWN0 IGxpc3BfdHlwZSA9IEJWQVIgKGIsIG1jX3JlYWxfZmFrZV9jdXJzb3IpOworICBlbnVtIG1jX2N1 cnNvcl90eXBlIGN1cnNvcl90eXBlID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENB UiAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgIGludCBjdXJzb3Jfd2lkdGgg PSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICA/IFhGSVhOVU0gKFhD QVIgKFhDRFIgKGxpc3BfdHlwZSkpKQorICAgICAgICAgICAgICAgICAgICAgOiAtMTsKKyAgc3Ry dWN0IG1jX1JHQiBjdXJzb3JfZmc7CisgIG1jX2NvbG9yX3BpY2tlciAodywgY3Vyc29yX2dseXBo LCBlc3NlbnRpYWxzLCAmY3Vyc29yX2ZnLCAtMSwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAg ICAgICAgICAgcm93X3Bvc2l0aW9uLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgYm9vbCBmaWxsX2Nv bHVtbl90cnVtcHNfcCA9ICghTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPmN1cnNvci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiAhY3Vyc29yX2JleW9uZF9mcmluZ2VfcCk7CisgIC8qIFdlIHVzZSBhIHRlc3Qgc2lt aWxhciB0byB0aGUgcmVhbCBmYWtlIGN1cnNvciBzbyB0aGF0IHRoZSBmcmluZ2UgYml0bWFwIGlz CisgIG9ubHkgZHJhd24gb25jZSBwZXIgd2luZG93LiAqLworICBpZiAodnBvcyA9PSB3LT5jdXJz b3IudnBvcworICAgICAgJiYgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoID09IHJvdy0+dXNlZFtU RVhUX0FSRUFdCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj cm9zc2hhaXJzKSkKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNoX2hvcml6b250YWxfcnVsZXIpKSkKKyAgICB7CisgICAgICAvKiBmcmluZ2UgYml0bWFwcyB1 c2UgZmFjZV9pZCB0byBzZXQgdGhlIGZvcmVncm91bmQgY29sb3IuICBUaGUgb3ZlcmxheS1hcnJv dworICAgICAgaXMgcHJlc2VudGx5IHRoZSBvbmx5IHNpdHVhdGlvbiB3aGVyZSB0aGUgYGVzc2Vu dGlhbHMuYWN0aXZlX3BgIGFuZCBgbWluaW1hbF9wYCBhcmUKKyAgICAgIHVzZWQgdG8gZGV0ZXJt aW5lIHRoZSBhcHBsaWNhYmxlIGZhY2VfaWQuICovCisgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9m ZyA9IHsucmVkID0gLTEuMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9 IC0xLjAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IC0xLjB9OworICAg ICAgLyogV2UgdXNlIHRoZSBmaXJzdCBnbHlwaCBpbiB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CisgICAgICBlbnVtIG1jX2ZsYXZv ciBnbHlwaF9mbGF2b3IgPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9X OworICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07Cisg ICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW1RFWFRfQVJF QV07CisgICAgICAvKiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAqLworICAgICAgaWYg KGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICAgICsrZ2x5 cGhfZW5kOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGhfZW5kIC0gMSwg cm93LT5waXhlbF93aWR0aCwgLTEsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAtMSwg cm93LT51c2VkW1RFWFRfQVJFQV0gLSAxLCB3LT5jdXJzb3IudnBvcywgLTEsIC0xLAorICAgICAg ICAgICAgICAgICBNQ19SSUdIVF9GUklOR0VfQklUTUFQLCAtMSwgY3Vyc29yX2ZnLCBjdXJzb3Jf YmcsIGVzc2VudGlhbHMuYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwg ZHJhd19wLCBmcm9tX3doZXJlLCBDSF9DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQor ICAvKiBFWEFNUExFIChidWZmZXItbG9jYWwpOiAgKHNldHEgbWMtcmVhbC1mYWtlLWN1cnNvciBu aWwvJ25vLyJubyIpICovCisgIGVsc2UgaWYgKCFjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAg ICAgJiYgY3Vyc29yX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0g TUNfTk9fQ1VSU09SCisg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aWFscy5hY3RpdmVf cCwgTUNfR0xZUEhMRVNTLAorICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIE5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgICAgbWNf Z2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54LCAmb3BvaW50 X2Z4LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRf ZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgTUNfSEJBUiwgMSwgJm9wb2ludF93ZCk7CisgICAgICBtY19o ZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9pbnRf ZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHctPmN1cnNvci5o cG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAgICAgICAgICAg ICAgTUNfSEJBUiwgMSwgY3Vyc29yX2ZnLCBjdXJzb3JfYmcsIGVzc2VudGlhbHMuYWN0aXZlX3As IE1DX0dMWVBILCBkcmF3X3AsCisgICAgICAgICAgICAgICAgIGZyb21fd2hlcmUsIE5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19D QUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorICBlbHNlIGlmICghY3Vyc29yX2F0X2Zy aW5nZV9wCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICYm IHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPj0g aHBvc19zdGFydAorICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA8IGhwb3Nfc3RhcnQgKyBo cG9zX2xlbmd0aAorICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPnR5cGUgIT0gU1RSRVRDSF9H TFlQSCkKKyAgICB7CisgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJv dywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9z LCAmb3BvaW50X2gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwg Y3Vyc29yX3dpZHRoLCAmb3BvaW50X3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCBy b3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisg ICAgICAgICAgICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9z LCBvcG9pbnRfd2QsIG9wb2ludF9oLAorICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vy c29yX3dpZHRoLCBjdXJzb3JfZmcsIGN1cnNvcl9iZywgZXNzZW50aWFscy5hY3RpdmVfcCwKKyAg ICAgICAgICAgICAgICAgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwgTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsK KyAgICB9CisgIGVsc2UgaWYgKCFjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgJiYgY3Vy c29yX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcwor ICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICYm IHctPmN1cnNvci5ocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaC0+dHlwZSA9PSBTVFJFVENIX0dMWVBIKQorICAgIHsKKyAgICAgIC8qIElm IGEgdXNlciBoYXMgc2V0IGB4LXN0cmV0Y2gtY3Vyc29yJyB0byBhIG5vbi1uaWwgdmFsdWUsIGhl L3NoZSBjaG9zZSB0bworICAgICAgaGF2ZSBhIGN1cnNvciB0aGF0IHNwYW5zIHRoZSBlbnRpcmUg bGVuZ3RoIG9mIHRoZSBTVFJFVENIX0dMWVBILiAqLworICAgICAgaWYgKCF4X3N0cmV0Y2hfY3Vy c29yX3ApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUaGUgTUNfSEJBUiBzaGFsbCBoYXZlIGEg YGN1cnNvcl93aWR0aGAgb2YgMS4gKi8KKyAgICAgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5 ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLnksICZvcG9pbnRfZnksIHctPmN1cnNvci5o cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci52cG9zLCAm b3BvaW50X2gsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Jm9wb2ludF93ZCk7CisgICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29y X2dseXBoLCB3LT5jdXJzb3IueCwgb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgdy0+ Y3Vyc29yLnksIG9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLAorICAg ICAgICAgICAgICAgICAgICAgb3BvaW50X3dkLCBvcG9pbnRfaCwgTUNfSEJBUiwgMSwgY3Vyc29y X2ZnLCBjdXJzb3JfYmcsCisgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2ZV9w LCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgICAgTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICAgICAgICAg ICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNP Ul9JTkRJQ0FUT1IpOworICAgICAgICB9CisgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3 LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB3LT5jdXJzb3IueSwgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLCBj dXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwg Jm9wb2ludF93ZCk7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5 cGgsIHctPmN1cnNvci54LCBvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAg ICBvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBv cG9pbnRfaCwKKyAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgY3Vy c29yX2ZnLCBjdXJzb3JfYmcsIGVzc2VudGlhbHMuYWN0aXZlX3AsCisgICAgICAgICAgICAgICAg IE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgIERSQVcgQU5EIFJF Q09SRCBGQUtFIENVUlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBpZiAoaHBvc19s ZW5ndGggPT0gMSkKKyAgICB7CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgbWNfY29uZikpKQorICAgICAgICB7CisgICAgICAgICAgLyogVGhlIHNwYWNlIGFw cGVuZGVkIHRvIGEgcm93IGVuZGluZyB3aXRoIGEgbmV3IGxpbmUKKyAgICAgICAgICBkb2VzIG5v dCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDApIHRoYXQgd2UgY2FuCisgICAgICAgICAg dXNlIGZvciB0aGlzIHBhcnRpY3VsYXIgYXBwbGljYXRpb24uICBXaGVuIHRoZXJlIGlzIGEKKyAg ICAgICAgICBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IHRoYXQgYXNzaWducyBhIHZpc2li bGUKKyAgICAgICAgICBnbHlwaCB0byBhIG5ldyBsaW5lLCB0aGVyZSBpcyBubyBwcm9ibGVtIGJl Y2F1c2UgdGhhdAorICAgICAgICAgIGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3 ZSBjYW4gdXNlLiAgV2hlbgorICAgICAgICAgIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywg d2UgdXNlIHRoZSBmb2xsb3dpbmcKKyAgICAgICAgICB0ZXN0OiAgdGhlIGFwcGVuZGVkIHNwYWNl IGhhcyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lCisgICAgICAgICAgbGVzcyB0aGFuIHRoZSBlbmQg b2YgdGhlIG1hdHJpeCByb3cuICovCisgICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgc3RydWN0IGdseXBoICpwcmV2aW91c19nbHlw aCA9ICgwIDw9IGhwb3MgLSAxICYmIGhwb3MgLSAxIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSArIGhwb3MgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogTlVMTDsKKyAgICAgICAgICAvLyBzdHJ1Y3QgZ2x5cGggKmxhc3RfZ2x5cGggPSByb3ct PmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgICAg IGJvb2wgc2tpcF9wID0gKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBNQVRSSVhfUk9XX0VORF9DSEFS UE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICYmIHN0YXJ0LT5ieXRlcG9z ICE9IGVzc2VudGlhbHMuenZfYnl0ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVl CisgICAgICAgICAgICAgICAgICAgICAgICAvKiBXaGVuIGEgYGJ1ZmZlci1kaXNwbGF5LXRhYmxl JyBlbnRyeSBjb250YWlucworICAgICAgICAgICAgICAgICAgICAgICAgYSB2aXNpYmxlIHRhYiBj aGFyYWN0ZXIgKCLCuyIpLCB0aGUgc3Vic2VxdWVudAorICAgICAgICAgICAgICAgICAgICAgICAg U1RSRVRDSF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgc3RhcnQtPmNoYXJwb3MKKyAgICAgICAg ICAgICAgICAgICAgICAgIGFzIHRoZSBhZm9yZW1lbnRpb25lZCB2aXNpYmxlIHRhYiBjaGFyYWN0 ZXIuICovCisgICAgICAgICAgICAgICAgICAgICAgICA6IChwcmV2aW91c19nbHlwaCAhPSBOVUxM CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9 PSBzdGFydC0+Y2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAg ICAgICAgICAgICAgICAgICAgICA6IGZhbHNlOworICAgICAgICAgIGludCBwb3NpbnQgPSAocm93 X3Bvc2l0aW9uID09IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyAtMQorICAg ICAgICAgICAgICAgICAgICAgICA6IChyb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAgICAg ICAgICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICA6 IChzdGFydC0+Ynl0ZXBvcyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFtU RVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9ST1dfRU5E X0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgIDogKHN0YXJ0LT5ieXRl cG9zID09IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBz dGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAx KQorICAgICAgICAgICAgICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAg ICAgICAgICAgICA6IHN0YXJ0LT5jaGFycG9zOworICAgICAgICAgIExpc3BfT2JqZWN0IHNwZWNz ID0gbWNfYXNzb2MgKG1ha2VfZml4bnVtIChwb3NpbnQpLCBCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIG1jX2NvbmYpKTsKKyAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAw ICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDAp CisgICAgICAgICAgICAgICYmICFOSUxQIChzcGVjcykKKyAgICAgICAgICAgICAgJiYgcm93LT55 IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAmJiAhc2tpcF9wCisg ICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiAhPSBQT1NUX1pWKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBMaXNwX09iamVjdCBsaXNwX3R5cGUgPSBtY19udGggKDEsIHNwZWNzKTsK KyAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IChDT05TUCAo bGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJz b3JfdHlwZSAobGlzcF90eXBlKTsKKyAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoc3RhcnQt PnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19I T0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3JfdHlwZTsKKyAg ICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENEUiAobGlzcF90 eXBlKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0xOworICAgICAgICAg ICAgICBMaXNwX09iamVjdCBtY19mb3JlZ3JvdW5kID0gbWNfbnRoICgyLCBzcGVjcyk7CisgICAg ICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICBpZiAoU1RSSU5H UCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgbWNfeHdfY29sb3JfdmFsdWVzICh3 LCBtY19mb3JlZ3JvdW5kLCAmbHNsX2ZnKTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChWRUNU T1JQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgbHNsX2ZnLnJlZCA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAwKSk7 CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5ncmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGICht Y19mb3JlZ3JvdW5kLCAxKSk7CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5ibHVlID0gWEZM T0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDIpKTsKKyAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKE5JTFAgKG1jX2ZvcmVncm91bmQpKQorICAgICAg ICAgICAgICAgICAgICBtY19jb2xvcl9waWNrZXIgKHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNs X2ZnLCBwb3NpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3R5cGUsIHJvd19wb3NpdGlvbiwgTVVMVElQTEVfQ1VSU09SUyk7CisgICAgICAgICAgICAg IGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgICAg IGludCB4X2xpbWl0ID0gd2luZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgICAgICAg ICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9s aW1pdCwgcm93LT55LAorICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0IC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXSwgdnBvcywgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX3dpZHRoLCBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24s CisgICAgICAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLCBNVUxUSVBMRV9DVVJTT1JTLCBkcmF3 X3AsIGZyb21fd2hlcmUsIE1DX0NBQ0hFKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg ICAgaWYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQor ICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAg ICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0gdy0+bWMubG51bV9waXhlbF93aWR0aCkKKyAgICAgICAg eworICAgICAgICAgIGludCB4X2xpbWl0ID0geCArIHN0YXJ0LT5waXhlbF93aWR0aDsKKyAgICAg ICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxz LmZjX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3Iu eSA9PSByb3ctPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5j dXJzb3IuaHBvcyA9PSBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsKKyAg ICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICBtY19jb2xvcl9waWNrZXIg KHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgTUNfQkFSLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0aW9uLCBGSUxMX0NPTFVNTik7CisgICAgICAgICAg aWYgKHggKyBzdGFydC0+cGl4ZWxfd2lkdGggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAg ICAgICYmICgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAgICAg ICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAmJiAoKHN0 YXJ0ICE9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEK KyAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0geAorICAgICAgICAgICAg ICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHggKyBzdGFydC0+cGl4ZWxfd2lkdGgpCisgICAg ICAgICAgICAgICAgICB8fCAoc3RhcnQgPT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+ dXNlZFtURVhUX0FSRUFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMu ZmNfeCA+PSB4KSkKKyAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRv bV95ICh3KQorICAgICAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAg ICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9saW1p dCwgcm93LT55LAorICAgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0sIHZwb3MsIE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29y X21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsCisgICAgICAgICAgICAg ICAgICAgICAgIEZJTExfQ09MVU1OLCBkcmF3X3AsIGZyb21fd2hlcmUsIEZDX0NBQ0hFKTsKKyAg ICAgICAgfQorICAgICAgaWYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNy b3NzaGFpcnMpKQorICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9ob3Jpem9udGFsX3J1 bGVyKSkKKyAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICB7Cisg ICAgICAgICAgaW50IHhfbGltaXQgPSAoc3RhcnQgPT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSAr IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gdGV4 dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICA6IHggKyBzdGFydC0+cGl4ZWxf d2lkdGg7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgbWNfY29s b3JfcGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIE1DX0hCQVIsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIEhPUklaT05UQUxfUlVM RVIpOworICAgICAgICAgIC8qIFByZXNlcnZlIHN1cHBvcnQgZm9yIGRlZmF1bHQgYmVoYXZpb3Ig c3VjaCB0aGF0IGEgdXNlciBtYXkKKyAgICAgICAgICBzcGVjaWZ5IHRoZSBoZWlnaHQgb2YgYW4g TUNfSEJBUiwgd2hpY2ggYmVnaW5zIGl0cyBqb3VybmV5CisgICAgICAgICAgYXMgdGhlIGBjdXJz b3Jfd2lkdGgnLiAgYG1jX2dldF9jdXJzb3JfZ2VvbWV0cnknIHJlYWRqdXN0cy4gKi8KKyAgICAg ICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xp bWl0LCByb3ctPnksCisgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0sIHZwb3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jf bWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAg ICAgICAgIEhPUklaT05UQUxfUlVMRVIsIGRyYXdfcCwgZnJvbV93aGVyZSwgQ0hfQ0FDSEUpOwor ICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg Y3Jvc3NoYWlycykpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1 bGVyKSkKKyAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3ApCisgICAgICAgIHsKKyAg ICAgICAgICBjdXJzb3JfdHlwZSA9IChzdGFydC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAorICAgICAgICAgICAgICAgICAgICAg ICAgOiBNQ19CQVI7CisgICAgICAgICAgaW50IHhfbGltaXQgPSB3aW5kb3dfYm94X3dpZHRoICh3 LCBURVhUX0FSRUEpOworICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKHctPmN1 cnNvci55ID09IHJvdy0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2Zn OworICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMsICZsc2xf ZmcsIC0xLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19w b3NpdGlvbiwgVkVSVElDQUxfUlVMRVIpOworICAgICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zv cm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3Jt YXQgPT0gMCkKKyAgICAgICAgICAgICAgJiYgKChzdGFydCAhPSByb3ctPmdseXBoc1tURVhUX0FS RUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYgdy0+ Y3Vyc29yLnggPj0geAorICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54IDwgeCArIHN0 YXJ0LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgIHx8IChzdGFydCA9PSByb3ctPmds eXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0geCkpCisgICAgICAgICAgICAgICYmIHJvdy0+eSA8 PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9j dXJzb3JfcCkKKyAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0LCBU RVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAgICAgICAgICAgICAgICAgc3Rh cnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBjdXJzb3JfdHlwZSwgMSwKKyAgICAg ICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9u LCBsc2xfZmcsCisgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3As IGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlCisgICAg ICB7CisgICAgICAgIGludCByZWxhdGl2ZV94ID0gMDsKKyAgICAgICAgZm9yIChpbnQgYXJlYSA9 IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICB7 CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07Cisg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2Fy ZWFdOworICAgICAgICAgICAgLyogR2x5cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4gKi8KKyAg ICAgICAgICAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYg Z2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAgICAgICAg ICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgIGlmICh2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICAg ICAgICAgICYmIGdseXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgJiYg ZXNzZW50aWFscy5mY194IDwgcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAmJiB3LT5j dXJzb3IueCA8IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkpCisgICAgICAgICAgICAgICAgICBicmVh azsKKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgbWNfY29uZikpKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAv KiBUaGUgc3BhY2UgYXBwZW5kZWQgdG8gYSByb3cgZW5kaW5nIHdpdGggYSBuZXcgbGluZSBkb2Vz CisgICAgICAgICAgICAgICAgICAgIG5vdCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDAp IHRoYXQgd2UgY2FuIHVzZSBmb3IgdGhpcworICAgICAgICAgICAgICAgICAgICBwYXJ0aWN1bGFy IGFwcGxpY2F0aW9uLiAgV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkKKyAgICAg ICAgICAgICAgICAgICAgYXNzaWducyBhIHZpc2libGUgZ2x5cGggdG8gYSBuZXcgbGluZSwgdGhl cmUgaXMgbm8gcHJvYmxlbQorICAgICAgICAgICAgICAgICAgICBiZWNhdXNlIHRoYXQgZ2x5cGgg aGFzIGEgYGdseXBoLT5jaGFycG9zJyB0aGF0IHdlIGNhbiB1c2UuCisgICAgICAgICAgICAgICAg ICAgIFdoZW4gbm8gdmlzaWJsZSBFT0wgZ2x5cGggZXhpc3RzLCB3ZSB1c2UgdGhlIGZvbGxvd2lu ZyB0ZXN0OgorICAgICAgICAgICAgICAgICAgICB0aGUgYXBwZW5kZWQgc3BhY2UgaGFzIGEgcG9z aXRpb24gdGhhdCBpcyBvbmUgbGVzcyB0aGFuIHRoZQorICAgICAgICAgICAgICAgICAgICBlbmQg b2YgdGhlIG1hdHJpeCByb3cuICovCisgICAgICAgICAgICAgICAgICAgIGludCBocG9zID0gZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGggKnByZXZpb3VzX2dseXBoID0gKDAgPD0gaHBvcyAtIDEgJiYgaHBvcyAtIDEgPCByb3ct PnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIGhwb3MgLSAxCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgICAg ICAgICAgICAgICAgICAgIC8vIHN0cnVjdCBnbHlwaCAqbGFzdF9nbHlwaCA9IHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDE7CisgICAgICAgICAgICAgICAg ICAgIGJvb2wgc2tpcF9wID0gKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gTUFUUklY X1JPV19FTkRfQ0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgZ2x5cGgtPmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLyogV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkgY29udGFp bnMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhIHZpc2libGUgdGFiIGNoYXJh Y3RlciAoIsK7IiksIHRoZSBzdWJzZXF1ZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgU1RSRVRDSF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgZ2x5cGgtPmNoYXJwb3MKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYWZvcmVtZW50aW9uZWQgdmlz aWJsZSB0YWIgY2hhcmFjdGVyLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBnbHlwaC0+Y2hhcnBvcykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogZmFsc2U7CisgICAgICAgICAgICAgICAgICAgIGludCBwb3Np bnQgPSAocm93X3Bvc2l0aW9uID09IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gLTEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKHJvd19w b3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g ZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGgt PmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2Vk W1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1B VFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChnbHlwaC0+Ynl0ZXBvcyA9PSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSA9PSByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBnbHlwaC0+Y2hhcnBvczsKKyAgICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3Qg c3BlY3MgPSBtY19hc3NvYyAobWFrZV9maXhudW0gKHBvc2ludCksIEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgbWNfY29uZikpOworICAgICAgICAgICAgICAgICAgICBpZiAoKChoZWFkZXJf bGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8 IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5J TFAgKHNwZWNzKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190 ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXNraXBfcAorICAg ICAgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uICE9IFBPU1RfWlYpCisgICAgICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3QgbGlz cF90eXBlID0gbWNfbnRoICgxLCBzcGVjcyk7CisgICAgICAgICAgICAgICAgICAgICAgICBlbnVt IG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNf bGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1jX2xpc3BfdG9fY3Vy c29yX3R5cGUgKGxpc3BfdHlwZSk7CisgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlw ZSA9IChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogY3Vyc29yX3R5cGU7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQg Y3Vyc29yX3dpZHRoID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENEUiAobGlzcF90eXBlKSkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAtMTsKKyAgICAg ICAgICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IG1jX2ZvcmVncm91bmQgPSBtY19udGggKDIs IHNwZWNzKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOwor ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFNUUklOR1AgKG1jX2ZvcmVncm91bmQpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIG1jX2ZvcmVncm91 bmQsICZsc2xfZmcpOworICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChWRUNUT1JQ IChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBsc2xfZmcucmVkID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1j X2ZvcmVncm91bmQsIDApKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5n cmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAxKSk7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBsc2xfZmcuYmx1ZSA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19m b3JlZ3JvdW5kLCAyKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKE5JTFAgKG1jX2ZvcmVncm91bmQpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWNfY29sb3JfcGlja2VyICh3LCBnbHlwaCwgZXNzZW50 aWFscywgJmxzbF9mZywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgcG9zaW50LCBjdXJzb3JfdHlwZSwgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTKTsK KyAgICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3cs IG1hdHJpeCk7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHdpbmRvd19i b3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgICAgICAgICAgICBtY19lbmdp bmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgeF9saW1pdCwgcm93LT55LCBnbHlwaCAtIHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZwb3Ms IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9tYXRyaXgsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTLCBkcmF3 X3AsIGZyb21fd2hlcmUsIE1DX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAgICAmJiBlc3Nl bnRpYWxzLmZjX3ggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICYmIGVz c2VudGlhbHMuZmNfeCA+PSB3LT5tYy5sbnVtX3BpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGgg KHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNv cl9wID0gKHctPmN1cnNvci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueSA9PSByb3ctPnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29y Lmhwb3MgPT0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3Mp OworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAg ICAgICAgICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZs c2xfZmcsIC0xLCBNQ19CQVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgcm93X3Bvc2l0aW9uLCBGSUxMX0NPTFVNTik7CisgICAgICAgICAgICAgICAgICAgIGlmICho cG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBocG9z X3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIHJlbGF0aXZl X3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAg ICAgICAgICAgICAmJiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAg ICAgICAgICAgICAgICAgICAgICAmJiAoKGdseXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHJlbGF0aXZlX3gKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194IDwgcmVsYXRpdmVf eCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAo Z2x5cGggPT0gZ2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBlc3NlbnRpYWxzLmZjX3ggPj0gcmVsYXRpdmVfeCkpCisgICAgICAgICAgICAgICAgICAgICAg ICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICAgIG1j X2VuZ2luZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBN Q19CQVIsIDEsIGN1cnNvcl9tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywgRklMTF9DT0xVTU4sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIEZDX0NBQ0hFKTsK KyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICYm ICFOSUxQIChCVkFSIChiLCBjaF9ob3Jpem9udGFsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAg ICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FS RUEpOworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7Cisg ICAgICAgICAgICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMs ICZsc2xfZmcsIC0xLCBNQ19IQkFSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHJvd19wb3NpdGlvbiwgSE9SSVpPTlRBTF9SVUxFUik7CisgICAgICAgICAgICAgICAg ICAgIC8qIFByZXNlcnZlIHN1cHBvcnQgZm9yIGRlZmF1bHQgYmVoYXZpb3Igc3VjaCB0aGF0IGEg dXNlciBtYXkKKyAgICAgICAgICAgICAgICAgICAgc3BlY2lmeSB0aGUgaGVpZ2h0IG9mIGFuIE1D X0hCQVIsIHdoaWNoIGJlZ2lucyBpdHMgam91cm5leQorICAgICAgICAgICAgICAgICAgICBhcyB0 aGUgYGN1cnNvcl93aWR0aCcuICBgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeScgcmVhZGp1c3RzLiAq LworICAgICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAg ICAgICAgICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoKQorICAgICAg ICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCBy ZWxhdGl2ZV94LCB4X2xpbWl0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93 LT55LCBocG9zLCB2cG9zLCBNQ19IQkFSLCAxLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsIEhP UklaT05UQUxfUlVMRVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3X3As IGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgICBpZiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykp CisgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxl cikpCisgICAgICAgICAgICAgICAgICAgICYmICFmaWxsX2NvbHVtbl90cnVtcHNfcCkKKyAgICAg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoZ2x5cGgt PnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19C QVI7CisgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gd2luZG93X2JveF93aWR0aCAo dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29y X3AgPSAody0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAg ICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAg ICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgICAg ICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBj dXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3df cG9zaXRpb24sIFZFUlRJQ0FMX1JVTEVSKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGhwb3Mg Pj0gaHBvc19zdGFydAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA8IGhwb3Nfc3Rh cnQgKyBocG9zX2xlbmd0aAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChoZWFkZXJfbGlu ZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8 IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChn bHlwaCAhPSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct PmN1cnNvci54ID49IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+Y3Vyc29yLnggPCByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHx8IChnbHlwaCA9PSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHJlbGF0aXZlX3gpKQorICAg ICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3 KQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAg ICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwg cmVsYXRpdmVfeCwgeF9saW1pdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJv dy0+eSwgaHBvcywgdnBvcywgY3Vyc29yX3R5cGUsIDEsIGN1cnNvcl9tYXRyaXgsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9m ZywgVkVSVElDQUxfUlVMRVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3 X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAg fQorICAgICAgICAgIH0KKyAgICAgIH0KKyAgLy8gIGNsb2NrX3QgY2xvY2tfZW5kID0gY2xvY2so KTsKKyAgLy8gIGRvdWJsZSBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChjbG9ja19lbmQgLSBj bG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJt Y19kcmF3X3JvdyAoJXMpOiAgVElNRSAoJWYpXG4iLCBtY193aW5kb3cgKHcpLCBjcHVfdGltZV91 c2VkKTsKK30KKwordm9pZAorbWNfcmVkcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAg ICAgICBpbnQgc3RhcnRfeCwgaW50IHN0YXJ0X2hwb3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zb3IuICovCisgICAgICB3LT5vdXRwdXRfY3Vyc29yLmhw b3MgPSBlbmRfaHBvczsKKyAgICAgIHctPm91dHB1dF9jdXJzb3IueCA9IHg7CisgICAgICBGUkFN RV9SSUYgKGYpLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgcm93LCBURVhUX0FSRUEsIC0xKTsKKyAg ICB9CisgIC8vICBjbG9ja19zdGFydCA9IGNsb2NrKCk7CisgIGludCB2bnRoID0gTUFUUklYX1JP V19WUE9TIChyb3csIG1hdHJpeCk7CisgIC8qIFNUUkVUQ0hfR0xZUEggbWF5IGNvbnRhaW4gbW9y ZSB0aGFuIG9uZSBmYWtlIGN1cnNvciBhdCB0aGUgc2FtZSBIUE9TLiAqLworICBmb3IgKGVudW0g bWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVfdHlwZSA8 IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBmb3IgKGludCBu dGggPSAwOworICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wICh3LT5tY19tYXRyaXgsIGNh Y2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAgICAgICsrbnRoKQorICAgICAgICB7CisgICAg ICAgICAgaW50IHggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLng7CisgICAgICAgICAgaW50IGZ4ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5meDsKKyAgICAgICAgICBpbnQgeSA9IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueTsKKyAgICAgICAgICBpbnQgZnkgPSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZ5OworICAgICAgICAg IGludCBocG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XS5ocG9zOworICAgICAgICAgIGludCB2cG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS52cG9zOworICAgICAgICAgIGludCB3ZCA9IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ud2Q7CisgICAgICAgICAgaW50IGgg PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmg7CisgICAg ICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3R5cGU7CisgICAgICAgICAgaW50 IGN1cnNvcl93aWR0aCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnID0gey5y ZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLnJl ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmdyZWVuLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlfTsKKyAgICAgICAgICAvLyAgc3RydWN0IG1j X1JHQiBsc2xfYmcgPSB7LnJlZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF0uYmcucmVkLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAg ICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmJnLmdyZWVuLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1ZX07 CisgICAgICAgICAgYm9vbCBhY3RpdmVfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uYWN0aXZlX3A7CisgICAgICAgICAgZW51bSBtY19mbGF2b3IgZ2x5 cGhfZmxhdm9yID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgYm9vbCBlbmFibGVkX3AgPSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcDsKKyAgICAgICAgICBp ZiAodnBvcyA9PSB2bnRoCisgICAgICAgICAgICAgICYmICgoaHBvcyA+PSBzdGFydF9ocG9zCisg ICAgICAgICAgICAgICAgICAgJiYgaHBvcyA8IGVuZF9ocG9zKQorICAgICAgICAgICAgICAgICAg LyogQSBmbG9hdGluZyBjdXJzb3IgYmV5b25kIHRoZSBlbmQgb2YgdGhlIGdseXBoIHJvdy4gKi8K KyAgICAgICAgICAgICAgICAgIHx8IChocG9zICsgMSA9PSBzdGFydF9ocG9zCisgICAgICAgICAg ICAgICAgICAgICAgJiYgaHBvcyArIDEgPT0gZW5kX2hwb3MpKQorICAgICAgICAgICAgICAmJiBl bmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3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bGF5X3ApCisgIC8vICAgIGZwcmludGYgKHN0ZGVy ciwgIm1jX2VyYXNlX2hlbHBlciAoJXMpOiAgY2FjaGUgKCVzKSB8IHZwb3MgKCVkKVxuIiwKKyAg Ly8gICAgICBtY193aW5kb3cgKHcpLCBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlw ZSksIHZudGgpOworICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FD SEU7CisgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkK KyAgICB7CisgICAgICBmb3IgKGludCBudGggPSAwOworICAgICAgICAgICBtY190cmF2ZXJzZV9j YWNoZV9wICh3LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAgICAg ICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHggPSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLng7CisgICAgICAgICAgaW50IGZ4ID0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meDsKKyAgICAgICAgICBp bnQgeSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueTsK KyAgICAgICAgICBpbnQgZnkgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmZ5OworICAgICAgICAgIGludCBocG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5ocG9zOworICAgICAgICAgIGludCB2cG9zID0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS52cG9zOworICAgICAg ICAgIGludCB3ZCA9IHctPm1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ICAgICAg ICAgICAgICAgICAgICAgICAuYmx1ZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAgICAgICAgYm9vbCBhY3RpdmVfcCA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYWN0aXZlX3A7CisgICAg ICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgYm9vbCBl bmFibGVkX3AgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmVuYWJsZWRfcDsKKyAgICAgICAgICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29u dGFpbnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgICAgICAgICBlYXNzZXJ0IChtYXRyaXggJiYg bWF0cml4LT5yb3dzKTsKKyAgICAgICAgICBlYXNzZXJ0IChyb3cgPj0gMCAmJiByb3cgPCBtYXRy aXgtPm5yb3dzKTsgKi8KKyAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJpeCAm JiBtYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAgICAgICAgIGlmIChiYXJmX2NyYXNo X29uZSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF90 d28gPSAodnBvcyA+PSAwICYmIHZwb3MgPCBtYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsK KyAgICAgICAgICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgICAgICAgICBjb250aW51ZTsKKyAg ICAgICAgICBpZiAodnBvcyA9PSB2bnRoCisgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciA9 PSBNQ19HTFlQSAorICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIG1jX2VyYXNlX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIHksIGhwb3Ms IHZwb3MsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkKTsKKyAgICAgICAgICAgICAgdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3AgPSBm YWxzZTsKKyAgICAgICAgICAgICAgLS13LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5 cGVdOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAodnBvcyA9PSB2bnRoCisg ICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICBib29sIHJlbW92ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICBtY19kcmF3 X2VyYXNlX2h5YnJpZCAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsIGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIGxzbF9iZywgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICAgICAgICAgICAgICAg IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9w ID0gZmFsc2U7CisgICAgICAgICAgICAgICAgLS13LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2Nh Y2hlX3R5cGVdOworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIHct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2h0ID0gaXQubGFzdF92aXNpYmxlX3kgLSBydW4uY3VycmVudF95OworICB8 ICAgICAgICAgICAgIHwgICAgcnVuLmhlaWdodCA9PSAxMDgwIC0gNTQwID09IDU0MAorICB8ICAg ICAgICAgICAgIHwgICAgW1RoZSBlbnRpcmUgYm90dG9tIHJlY3RhbmdsZSBnZXRzIGNvcGllZCB0 byB1cHBlciBydW4uZGVzaXJlZF95Ll0KKyAgfCAgICAgICAgICAgICB8CisgICstLS0tLS0tLS0t LS0tKyA8PSBydW4uY3VycmVudF95ID09IDU0MAorICB8ICAgICAgICAgICAgIHwKKyAgfCAgICAg ICAgICAgICB8IDw9IHJ1bi5kZXNpcmVkX3kgPT0gODEwIFtkb3duICjihpMpXSA9PSBydW4uY3Vy cmVudF95ID4gcnVuLmRlc2lyZWRfeQorICB8ICAgICAgICAgICAgIHwgICAgcnVuLmhlaWdodCA9 IGl0Lmxhc3RfdmlzaWJsZV95IC0gcnVuLmRlc2lyZWRfeQorICB8ICAgICAgICAgICAgIHwgICAg cnVuLmhlaWdodCA9PSAxMDgwIC0gODEwID09IDI3MAorICB8ICAgICAgICAgICAgIHwgICAgW1Rv cCBwYXJ0IG9mIHRoZSBsb3dlciByZWN0YW5nbGUgZ2V0cyBjb3BpZWQgdG8gbG93ZXIgcnVuLmRl c2lyZWRfeS5dCisgIHwgICAgICAgICAgICAgfAorICArLS0tLS0tLS0tLS0tLSsgPD0gaXQubGFz dF92aXNpYmxlX3kgPT0gMTA4MCAqLwordm9pZAorbWNfcHJlX3Njcm9sbF9jbGVhbiAoc3RydWN0 IHdpbmRvdyAqdywgc3RydWN0IHJ1biBydW4sIGludCBzdGFydF92cG9zLAorICAgICAgICAgICAg ICAgICAgICAgaW50IG5yb3dzX3Njcm9sbGVkLCBlbnVtIG1jX3ByZV9zY3JvbGxfY2xlYW4gZnJv bV93aGVyZSkKK3sKKyAgaWYgKE1JTklfV0lORE9XX1AgKHcpKQorICAgIHJldHVybjsKKyAgYm9v bCBnb19vbmVfcCA9ICh3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA+IDAKKyAg ICAgICAgICAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hFXSA+ IDAKKyAgICAgICAgICAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NB Q0hFXSA+IDApOworICBib29sIGdvX3R3b19wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAg ICAgICAgICAgICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj cm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICAgIHx8 ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkpOworICBpZiAo dHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfcHJlX3Njcm9sbF9j bGVhbiAoJXMpOlxuXAorICAlcyB8IGdvX29uZV9wICglcykgfCBnb190d29fcCAoJXMpXG5cCisg IHN0YXJ0X3Zwb3MgKCVkKSB8IG5yb3dzX3Njcm9sbGVkICglZClcblwKKyAgJXM6ICBydW4uY3Vy cmVudC9kZXNpcmVkX3kgKCVkLyVkKSB8IHJ1bi5oZWlnaHQgKCVkKVxuIiwKKyAgICBtY193aW5k b3cgKHcpLCAoZnJvbV93aGVyZSA9PSBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhf RE9XTikKKyAgICAgICAgICAgICAgICAgICAgID8gIlRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5U X01BVFJJWF9ET1dOIgorICAgICAgICAgICAgICAgICAgIDogKGZyb21fd2hlcmUgPT0gVFJZX1dJ TkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX1VQKQorICAgICAgICAgICAgICAgICAgICAgPyAi VFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX1VQIgorICAgICAgICAgICAgICAgICAg IDogKGZyb21fd2hlcmUgPT0gVFJZX1dJTkRPV19JRCkKKyAgICAgICAgICAgICAgICAgICAgID8g IlRSWV9XSU5ET1dfSUQiCisgICAgICAgICAgICAgICAgICAgOiAiVU5LTk9XTiIsCisgICAgZ29f b25lX3AgPyAieWVzIiA6ICJubyIsIGdvX3R3b19wID8gInllcyIgOiAibm8iLAorICAgIHN0YXJ0 X3Zwb3MsIG5yb3dzX3Njcm9sbGVkLAorICAgIHJ1bi5jdXJyZW50X3kgPCBydW4uZGVzaXJlZF95 ID8gIuKGkyIgOiAi4oaRIiwKKyAgICBydW4uY3VycmVudF95LCBydW4uZGVzaXJlZF95LCBydW4u aGVpZ2h0KTsKKyAgaWYgKCFnb19vbmVfcCAmJiAhZ29fdHdvX3ApCisgICAgcmV0dXJuOworICBi b29sIHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1F ICh3LT5mcmFtZSk7CisgIGlmIChYRlJBTUUgKHctPmZyYW1lKSAhPSBmLT5tY191cGRhdGluZ19m cmFtZQorICAgICAgJiYgKGdvX29uZV9wIHx8IGdvX3R3b19wKSkKKyAgICB7CisgICAgICB1cGRh dGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CisgICAgfQorICBp ZiAody0+cGh5c19jdXJzb3Jfb25fcAorICAgICAgJiYgZ29fdHdvX3ApCisgICAgZXJhc2VfcGh5 c19jdXJzb3IgKHcpOworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50 X21hdHJpeDsKKyAgZm9yIChpbnQgdm50aCA9IHN0YXJ0X3Zwb3M7CisgICAgICAgbWF0cml4ICE9 IE5VTEwKKyAgICAgICAmJiB2bnRoIDwgbWF0cml4LT5ucm93cworICAgICAgICYmIE1BVFJJWF9S T1cgKG1hdHJpeCwgdm50aCktPmVuYWJsZWRfcAorICAgICAgICYmIGdvX29uZV9wOworICAgICAg ICsrdm50aCkKKyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9X IChtYXRyaXgsIHZudGgpOworICAgICAgbWNfZXJhc2Vfcm93ICh3LCBtYXRyaXgsIHJvdyk7Cisg ICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChmKTsKKyAgLy8g bWNfcmVzZXRfY2FjaGUgKHcpOworfQorCitERUZVTiAoIm1jLXN0ZGVyciIsIEZtY19zdGRlcnIs IFNtY19zdGRlcnIsIDAsIDEsICJQIiwKKyAgICAgICBkb2M6IC8qIFRvZ2dsZSB0cmFjaW5nIG9m IG11bHRpcGxlIGZha2UgY3Vyc29ycy4KK1dpdGggQVJHLCB0dXJuIHRyYWNpbmcgb24gaWYgYW5k IG9ubHkgaWYgQVJHIGlzIHBvc2l0aXZlLiAqLykKKyAgKExpc3BfT2JqZWN0IGFyZykKK3sKKyAg aWYgKE5JTFAgKGFyZykpCisgICAgbWNfc3RkZXJyX3AgPSAhbWNfc3RkZXJyX3A7CisgIGVsc2UK KyAgICB7CisgICAgICBhcmcgPSBGcHJlZml4X251bWVyaWNfdmFsdWUgKGFyZyk7CisgICAgICBt Y19zdGRlcnJfcCA9IFhGSVhOVU0gKGFyZykgPiAwOworICAgIH0KKyAgcmV0dXJuIFFuaWw7Cit9 CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAMCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioKIAkJICAgICAgV2luZG93IGRpc3BsYXkgZGltZW5zaW9u cwpAQCAtMTMzOTUsNiArMTgwNjEsNjkgQEAgaHNjcm9sbF93aW5kb3dfdHJlZSAoTGlzcF9PYmpl Y3Qgd2luZG93KQogCSAgICAgIGVsc2UKIAkJcHQgPSBjbGlwX3RvX2JvdW5kcyAoQkVHViwgbWFy a2VyX3Bvc2l0aW9uICh3LT5wb2ludG0pLCBaVik7CiAKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIChnZGIpIGJ0CisjMCAgdGVy bWluYXRlX2R1ZV90b19zaWduYWwgKHNpZz02LCBiYWNrdHJhY2VfbGltaXQ9MjE0NzQ4MzY0Nykg YXQgZW1hY3MuYzozNTkKKyMxICAweDAwMDAwMDAxMDAxZWU5OTYgaW4gZGllICgKKyAgICBtc2c9 MHgxMDAzMmZjODggImNoYXJwb3MgPCAwIHx8IChjaGFycG9zID49IEJVRl9CRUcgKGN1cnJlbnRf YnVmZmVyKSAmJiBjaGFycG9zIDw9IFpWKSIsIGZpbGU9MHgxMDAzMmUzMmQgInhkaXNwLmMiLCBs aW5lPTc5NTEpIGF0IGFsbG9jLmM6NzIxNAorIzIgIDB4MDAwMDAwMDEwMDA0ZDJhYiBpbiBpbml0 X2l0ZXJhdG9yIChpdD0weDdmZmY1ZmJmOWU4MCwgdz0weDExYWU2MjE1MCwKKyAgICBjaGFycG9z PTc0MywgYnl0ZXBvcz03NDMsIHJvdz0weDAsIGJhc2VfZmFjZV9pZD1ERUZBVUxUX0ZBQ0VfSUQp CisgICAgYXQgeGRpc3AuYzo3OTUwCisjMyAgMHgwMDAwMDAwMTAwMDRlZmM5IGluIGluaXRfZnJv bV9kaXNwbGF5X3Bv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ZmVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBjaGFycG9zIDw9IFpWKSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gZmFsc2UKKyAgICAg ICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfb25lKQorICAgIHJl dHVybiBoc2Nyb2xsZWRfcDsKKworICAvKiBgcmVzZWF0XzEnOiAgQ0hBUlBPUyAocG9zKSA+PSBC RUdWICYmIENIQVJQT1MgKHBvcykgPD0gWlYgKi8KKyAgYm9vbCBiYXJmX2NyYXNoX3R3byA9IChj aGFycG9zID49IEJFR1YgJiYgY2hhcnBvcyA8PSBaVikKKyAgICAgICAgICAgICAgICAgICAgICAg ICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworICBpZiAoYmFyZl9j cmFzaF90d28pCisgICAgcmV0dXJuIGhzY3JvbGxlZF9wOworCisvKiBlbmQgTVVMVElQTEUtQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIC8qIE1vdmUgaXRl cmF0b3IgdG8gcHQgc3RhcnRpbmcgYXQgY3Vyc29yX3Jvdy0+c3RhcnQgaW4KIAkJIGEgbGluZSB3 aXRoIGluZmluaXRlIHdpZHRoLiAgKi8KIAkgICAgICBpbml0X3RvX3Jvd19zdGFydCAoJml0LCB3 LCBjdXJzb3Jfcm93KTsKQEAgLTE0Mjg3LDkgKzE5MDE2LDIyIEBAIHJlZGlzcGxheV9pbnRlcm5h bCAodm9pZCkKIAkgICAgICAqdy0+ZGVzaXJlZF9tYXRyaXgtPm1ldGhvZCA9IDA7CiAJICAgICAg ZGVidWdfbWV0aG9kX2FkZCAodywgIm9wdGltaXphdGlvbiAxIik7CiAjZW5kaWYKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogI2lmZGVmIEhB VkVfV0lORE9XX1NZU1RFTQorICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgbWNf dXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBmYWxzZSk7CisgICAgZWxzZQogCSAgICAgIHVwZGF0 ZV93aW5kb3dfZnJpbmdlcyAodywgZmFsc2UpOwogI2VuZGlmCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKIAkgICAgICBnb3RvIHVwZGF0ZTsKIAkgICAgfQogCSAgZWxzZQpAQCAtMTc2 ODcsMTAgKzIyNDI5LDIyIEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3BfT2JqZWN0IHdpbmRvdywg Ym9vbCBqdXN0X3RoaXNfb25lX3ApCiAgICAgfQogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVN CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisK KyAgYm9vbCBrZWVwX2N1cnJlbnRfcCA9IChqdXN0X3RoaXNfb25lX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICB8fCAoIXVzZWRfY3VycmVudF9tYXRyaXhfcCAmJiAhb3ZlcmxheV9hcnJvd19z ZWVuKQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8IHctPnBzZXVkb193aW5kb3dfcCk7CisK KyAgYm9vbCBmcmluZ2VzX3VwZGF0ZWRfcCA9IChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBjcm9zc2hhaXJzKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX3VwZGF0 ZV93aW5kb3dfZnJpbmdlcyAodywga2VlcF9jdXJyZW50X3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywga2VlcF9jdXJyZW50X3ApOworCiAg IGlmIChGUkFNRV9XSU5ET1dfUCAoZikKLSAgICAgICYmIHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAo dywgKGp1c3RfdGhpc19vbmVfcAotCQkJCSAgICB8fCAoIXVzZWRfY3VycmVudF9tYXRyaXhfcCAm JiAhb3ZlcmxheV9hcnJvd19zZWVuKQotCQkJCSAgICB8fCB3LT5wc2V1ZG9fd2luZG93X3ApKSkK KyAgICAgICYmIGZyaW5nZXNfdXBkYXRlZF9wKQogICAgIHsKICAgICAgIHVwZGF0ZV9iZWdpbiAo Zik7CiAgICAgICBibG9ja19pbnB1dCAoKTsKQEAgLTE3NzA1LDYgKzIyNDU5LDkgQEAgcmVkaXNw bGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3RfdGhpc19vbmVfcCkKICAg ICAgIHVwZGF0ZV9lbmQgKGYpOwogICAgIH0KIAorLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICBpZiAoV0lORE9XX0JPVFRPTV9ESVZJREVSX1dJRFRIICh3KSkKICAgICB4X2RyYXdfYm90 dG9tX2RpdmlkZXIgKHcpOwogI2VuZGlmIC8qIEhBVkVfV0lORE9XX1NZU1RFTSAqLwpAQCAtMTgw MTAsNiArMjI3NjcsNyBAQCB0cnlfd2luZG93X3JldXNpbmdfY3VycmVudF9tYXRyaXggKHN0cnVj dCB3aW5kb3cgKncpCiAJICAgICBzY3JvbGxfcnVuX2hvb2sgd2lsbCBjbGVhciB0aGUgY3Vyc29y LCBhbmQgdXNlIHRoZQogCSAgICAgY3VycmVudCBtYXRyaXggdG8gZ2V0IHRoZSBoZWlnaHQgb2Yg dGhlIHJvdyB0aGUgY3Vyc29yIGlzCiAJICAgICBpbi4gICovCisKIAkgIHJ1bi5jdXJyZW50X3kg PSBzdGFydF9yb3ctPnk7CiAJICBydW4uZGVzaXJlZF95ID0gaXQuY3VycmVudF95OwogCSAgcnVu LmhlaWdodCA9IGl0Lmxhc3RfdmlzaWJsZV95IC0gaXQuY3VycmVudF95OwpAQCAtMTgwMTksNiAr MjI3NzcsMTYgQEAgdHJ5X3dpbmRvd19yZXVzaW5nX2N1cnJlbnRfbWF0cml4IChzdHJ1Y3Qgd2lu ZG93ICp3KQogCSAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CiAJICAgICAgRlJBTUVfUklGIChmKS0+ dXBkYXRlX3dpbmRvd19iZWdpbl9ob29rICh3KTsKIAkgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVh cl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBtY19wcmVfc2Nyb2xsX2NsZWFuICh3LCBydW4s IHN0YXJ0X3Zwb3MsIG5yb3dzX3Njcm9sbGVkLCBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9N QVRSSVhfRE9XTik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICBGUkFN RV9SSUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcsICZydW4pOwogCSAgICAgIEZSQU1FX1JJRiAo ZiktPnVwZGF0ZV93aW5kb3dfZW5kX2hvb2sgKHcsIGZhbHNlLCBmYWxzZSk7CiAJICAgICAgdXBk YXRlX2VuZCAoZik7CkBAIC0xODE3Myw2ICsyMjk0MSw3IEBAIHRyeV93aW5kb3dfcmV1c2luZ19j dXJyZW50X21hdHJpeCAoc3RydWN0IHdpbmRvdyAqdykKIAl9CiAKICAgICAgIC8qIFNjcm9sbCB0 aGUgZGlzcGxheS4gICovCisKICAgICAgIHJ1bi5jdXJyZW50X3kgPSBmaXJzdF9yZXVzYWJsZV9y b3ctPnk7CiAgICAgICBydW4uZGVzaXJlZF95ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAo dyk7CiAgICAgICBydW4uaGVpZ2h0ID0gaXQubGFzdF92aXNpYmxlX3kgLSBydW4uY3VycmVudF95 OwpAQCAtMTgxODMsNiArMjI5NTIsMTYgQEAgdHJ5X3dpbmRvd19yZXVzaW5nX2N1cnJlbnRfbWF0 cml4IChzdHJ1Y3Qgd2luZG93ICp3KQogCSAgdXBkYXRlX2JlZ2luIChmKTsKIAkgIEZSQU1FX1JJ RiAoZiktPnVwZGF0ZV93aW5kb3dfYmVnaW5faG9vayAodyk7CiAJICBGUkFNRV9SSUYgKGYpLT5j bGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBtY19wcmVfc2Nyb2xsX2NsZWFuICh3LCBy dW4sIHN0YXJ0X3Zwb3MsIG5yb3dzX3Njcm9sbGVkLCBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVO VF9NQVRSSVhfVVApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBGUkFNRV9S SUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcsICZydW4pOwogCSAgRlJBTUVfUklGIChmKS0+dXBk YXRlX3dpbmRvd19lbmRfaG9vayAodywgZmFsc2UsIGZhbHNlKTsKIAkgIHVwZGF0ZV9lbmQgKGYp OwpAQCAtMTkxMjcsNiArMjM5MDYsNyBAQCB0cnlfd2luZG93X2lkIChzdHJ1Y3Qgd2luZG93ICp3 KQogICAvKiBTY3JvbGwgdGhlIGRpc3BsYXkuICBEbyBpdCBiZWZvcmUgY2hhbmdpbmcgdGhlIGN1 cnJlbnQgbWF0cml4IHNvCiAgICAgIHRoYXQgeHRlcm0uYyBkb2Vzbid0IGdldCBjb25mdXNlZCBh Ym91dCB3aGVyZSB0aGUgY3Vyc29yIGdseXBoIGlzCiAgICAgIGZvdW5kLiAgKi8KKwogICBpZiAo ZHkgJiYgcnVuLmhlaWdodCkKICAgICB7CiAgICAgICB1cGRhdGVfYmVnaW4gKGYpOwpAQCAtMTkx MzUsNiArMjM5MTUsMTYgQEAgdHJ5X3dpbmRvd19pZCAoc3RydWN0IHdpbmRvdyAqdykKIAl7CiAJ ICBGUkFNRV9SSUYgKGYpLT51cGRhdGVfd2luZG93X2JlZ2luX2hvb2sgKHcpOwogCSAgRlJBTUVf UklGIChmKS0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2UgKHcpOworCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgbWNfcHJlX3Njcm9sbF9j bGVhbiAodywgcnVuLCBmaXJzdF91bmNoYW5nZWRfYXRfZW5kX3Zwb3MsIGR2cG9zLCBUUllfV0lO RE9XX0lEKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgRlJBTUVfUklGIChm KS0+c2Nyb2xsX3J1bl9ob29rICh3LCAmcnVuKTsKIAkgIEZSQU1FX1JJRiAoZiktPnVwZGF0ZV93 aW5kb3dfZW5kX2hvb2sgKHcsIGZhbHNlLCBmYWxzZSk7CiAJfQpAQCAtMjEyNzMsNiArMjYwNjMs MTcgQEAgbWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKICAgICAgIFNF VF9URVhUX1BPUyAodGVtX2l0LnBvc2l0aW9uLCAtMSwgLTEpOwogICAgICAgUFJPRFVDRV9HTFlQ SFMgKCZ0ZW1faXQpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisgICAgICAvKiBUaGlzIHBlcm1pdHMgdXMgdG8gaW5zcGVjdCB0aGUgSFBP UyBvZiBsaW5lIG51bWJlciBnbHlwaHMgYW5kIHRoZSBzcGFjZQorICAgICAgcGFkZGluZyBiZWZv cmUvYWZ0ZXIgdGhlIGxpbmUgbnVtYmVycy4gIFdlIHNldCBgZ2x5cGgtPmhwb3NgIGVsc2V3aGVy ZS4gKi8KKyAgICAgIHRlbV9pdC5ocG9zICs9IDE7CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgICAgIC8qIFN0b3AgcHJvZHVjaW5nIGdseXBocywgYW5kIHJlZnJhaW4gZnJvbSBw cm9kdWNpbmcgdGhlIGxpbmUKIAkgbnVtYmVyLCBpZiB3ZSBkb24ndCBoYXZlIGVub3VnaCBzcGFj ZSBvbiB0aGlzIGxpbmUuICAqLwogICAgICAgaWYgKHRlbV9pdC5jdXJyZW50X3ggPj0gd2lkdGhf bGltaXQpCkBAIC0yMTI4NCw2ICsyNjA4NSwzMCBAQCBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVy IChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgTGlzcF9PYmplY3QgYnVmID0gaXQtPnctPmNv bnRlbnRzOworICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVG RkVSIChidWYpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgLyogTmVl ZGVkIHNvIHRoYXQgYnVmZmVyLWxvY2FsIHZhbHVlcyBjYW4gYmUgZGV0ZXJtaW5lZDsgZS5nLiwg d2hlbiBzd2l0Y2hpbmcKKyAgdG8gdGhlIG1pbmlidWZmZXIuICovCisgIGlmIChiICE9IGN1cnJl bnRfYnVmZmVyKQorICAgIHsKKyAgICAgIG9sZF9idWZmZXIgPSBjdXJyZW50X2J1ZmZlcjsKKyAg ICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKGIpOworICAgIH0KKyAgaXQtPnctPm1jLmxudW1fcGl4 ZWxfd2lkdGggPSAoIU5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyB0ZW1faXQuY3VycmVudF94CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAwOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVy bmFsIChvbGRfYnVmZmVyKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBS ZWNvcmQgdGhlIHdpZHRoIGluIHBpeGVscyB3ZSBuZWVkIGZvciB0aGUgbGluZSBudW1iZXIgZGlz cGxheS4gICovCiAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoID0gdGVtX2l0LmN1cnJlbnRfeDsKICAg LyogQ29weSB0aGUgcHJvZHVjZWQgZ2x5cGhzIGludG8gSVQncyBnbHlwaF9yb3cuICAqLwpAQCAt MjcwOTIsNiArMzE5MTcsMTcgQEAgYXBwZW5kX2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCSAgICBn WzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBoc1thcmVhXTsKIAl9CisK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAg ICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElUX0JZ VEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGdseXBo LT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmplY3Qg PSBpdC0+b2JqZWN0OwogICAgICAgaWYgKGl0LT5waXhlbF93aWR0aCA+IDApCkBAIC0yNzE3NSw2 ICszMjAxMSwxNyBAQCBhcHBlbmRfY29tcG9zaXRlX2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCSAg ICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBoc1tpdC0+YXJlYV07 CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3Mg PSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAg ICBnbHlwaC0+Y2hhcnBvcyA9IGl0LT5jbXBfaXQuY2hhcnBvczsKICAgICAgIGdseXBoLT5vYmpl Y3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNIUlRf TUFYKTsKQEAgLTI3MzgzLDYgKzMyMjMwLDE3IEBAIHByb2R1Y2VfaW1hZ2VfZ2x5cGggKHN0cnVj dCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2Fy ZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+ Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIAkgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBo LT5vYmplY3QgPSBpdC0+b2JqZWN0OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19i b3VuZHMgKC0xLCBpdC0+cGl4ZWxfd2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3NDg2LDYgKzMyMzQ0 LDE3IEBAIHByb2R1Y2VfeHdpZGdldF9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAl9CiAgICAgICBp ZiAoZ2x5cGggPCBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYSArIDFdKQogCXsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5 cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5ieXRlcG9zID0gSVRfQllURVBPUyAo Kml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgZ2x5cGgtPmNoYXJwb3Mg PSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7 CiAJICBnbHlwaC0+cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5kcyAoLTEsIGl0LT5waXhlbF93 aWR0aCwgU0hSVF9NQVgpOwpAQCAtMjc1NzIsNiArMzI0NDEsMTcgQEAgYXBwZW5kX3N0cmV0Y2hf Z2x5cGggKHN0cnVjdCBpdCAqaXQsIExpc3BfT2JqZWN0IG9iamVjdCwKIAkgICAgd2lkdGggLT0g aXQtPmZpcnN0X3Zpc2libGVfeCAtIGl0LT5jdXJyZW50X3g7CiAJICBlYXNzZXJ0ICh3aWR0aCA+ IDApOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNP UlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5ieXRl cG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogICAgICAgZ2x5 cGgtPm9iamVjdCA9IG9iamVjdDsKICAgICAgIC8qIEZJWE1FOiBJdCB3b3VsZCBiZSBiZXR0ZXIg dG8gdXNlIFRZUEVfTUFYIGhlcmUsIGJ1dApAQCAtMjgwMjYsNiArMzI5MDYsMTcgQEAgYXBwZW5k X2dseXBobGVzc19nbHlwaCAoc3RydWN0IGl0ICppdCwgaW50IGZhY2VfaWQsIGJvb2wgZm9yX25v X2ZvbnQsIGludCBsZW4sCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jv dy0+Z2x5cGhzW2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAg IGdseXBoLT5ieXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24p OwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAgICAgICBlYXNzZXJ0IChpdC0+ cGl4ZWxfd2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjkwNzYsMTAgKzMzOTY3LDM1IEBAIHhfaW5z ZXJ0X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqdXBkYXRlZF9y b3csCiAKICAgLyogV3JpdGUgdGhlIGdseXBocy4gICovCiAgIGhwb3MgPSBzdGFydCAtIHJvdy0+ Z2x5cGhzW3VwZGF0ZWRfYXJlYV07CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKCh3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01D X0NBQ0hFXSA+IDAKKyAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hF XSA+IDAKKyAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA+IDAp CisgICAgICAmJiB1cGRhdGVkX2FyZWEgPT0gVEVYVF9BUkVBKQorICAgIHsKKyAgICAgIHN0cnVj dCBnbHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgaW50IHZw b3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgICAgIGludCBzdGFydF94ID0g dy0+b3V0cHV0X2N1cnNvci54OworICAgICAgaW50IHN0YXJ0X2hwb3MgPSBocG9zOworICAgICAg aW50IGVuZF9ocG9zID0gaHBvcyArIGxlbjsKKyAgICAgIGJvb2wgY2xlYXJfZW9sX3AgPSBmYWxz ZTsKKyAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCA9IERSQVdfTk9STUFMX1RFWFQ7Cisg ICAgICBUUkFDRSAoKHN0ZGVyciwgInhfaW5zZXJ0X2dseXBocyAoJWQpOiAgc3RhcnRfeCAoJWQp IHwgc3RhcnRfaHBvcyAoJWQpIHwgZW5kX2hwb3MgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICB2cG9zLCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRfaHBvcykpOworICAgICAgbWNfcmVk cmF3X3JvdyAodywgbWF0cml4LCByb3csIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCBj bGVhcl9lb2xfcCwgaGwpOworICAgIH0KKyAgICBlbHNlCiAgIGRyYXdfZ2x5cGhzICh3LCB3LT5v dXRwdXRfY3Vyc29yLngsIHJvdywgdXBkYXRlZF9hcmVhLAogCSAgICAgICBocG9zLCBocG9zICsg bGVuLAogCSAgICAgICBEUkFXX05PUk1BTF9URVhULCAwKTsKIAorLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAvKiBBZHZhbmNlIHRoZSBvdXRwdXQgY3Vyc29yLiAgKi8KICAgdy0+b3V0 cHV0X2N1cnNvci5ocG9zICs9IGxlbjsKICAgdy0+b3V0cHV0X2N1cnNvci54ICs9IHNoaWZ0X2J5 X3dpZHRoOwpAQCAtMjk1MDUsOSArMzQ0MjEsMzMgQEAgeF9maXhfb3ZlcmxhcHBpbmdfYXJlYSAo c3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAogCSAgd2hpbGUgKGkgPCBy b3ctPnVzZWRbYXJlYV0KIAkJICYmIHJvdy0+Z2x5cGhzW2FyZWFdW2ldLm92ZXJsYXBzX3ZlcnRp Y2FsbHlfcCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKyAgICAgICAgaWYgKCh3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hF XSA+IDAKKyAgICAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hF XSA+IDAKKyAgICAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hF XSA+IDApCisgICAgICAgICAgICAmJiBhcmVhID09IFRFWFRfQVJFQSkKKyAgICAgICAgICB7Cisg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJp eDsKKyAgICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7 CisgICAgICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IHN0YXJ0OworICAgICAgICAgICAgaW50IGVu ZF9ocG9zID0gaTsKKyAgICAgICAgICAgIGJvb2wgY2xlYXJfZW9sX3AgPSBmYWxzZTsKKyAgICAg ICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCA9IERSQVdfTk9STUFMX1RFWFQ7CisgICAg ICAgICAgICBUUkFDRSAoKHN0ZGVyciwgInhfZml4X292ZXJsYXBwaW5nX2FyZWEgKCVkKTogIHN0 YXJ0X3ggKCVkKSB8IHN0YXJ0X2hwb3MgKCVkKSB8IGVuZF9ocG9zICglZClcbiIsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgdnBvcywgc3RhcnRfeCwgc3RhcnRfaHBvcywgZW5kX2hwb3Mp KTsKKyAgICAgICAgICAgIG1jX3JlZHJhd19yb3cgKHcsIG1hdHJpeCwgcm93LCBzdGFydF94LCBz dGFydF9ocG9zLCBlbmRfaHBvcywgY2xlYXJfZW9sX3AsIGhsKTsKKyAgICAgICAgICB9CisgICAg ICAgICAgZWxzZQogCSAgZHJhd19nbHlwaHMgKHcsIHN0YXJ0X3gsIHJvdywgYXJlYSwKIAkJICAg ICAgIHN0YXJ0LCBpLAogCQkgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgb3ZlcmxhcHMpOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJfQogICAgICAgZWxzZQogCXsKQEAgLTI5NzU4 LDEwICszNDY5OCwxNyBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3 LCBib29sIG9uLAogICBuZXdfY3Vyc29yX3R5cGUgPSBnZXRfd2luZG93X2N1cnNvcl90eXBlICh3 LCBnbHlwaCwKIAkJCQkJICAgICZuZXdfY3Vyc29yX3dpZHRoLCAmYWN0aXZlX2N1cnNvcik7CiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAg LyogSWYgY3Vyc29yIGlzIGN1cnJlbnRseSBiZWluZyBzaG93biBhbmQgd2UgZG9uJ3Qgd2FudCBp dCB0byBiZSBvcgogICAgICBpdCBpcyBpbiB0aGUgd3JvbmcgcGxhY2UsIG9yIHRoZSBjdXJzb3Ig dHlwZSBpcyBub3Qgd2hhdCB3ZSB3YW50LAogICAgICBlcmFzZSBpdC4gICovCiAgIGlmICh3LT5w aHlzX2N1cnNvcl9vbl9wCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBmY192aXNpYmxlKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgbWNfY29uZikpCiAgICAgICAmJiAoIW9uCiAJICB8fCB3LT5waHlzX2N1cnNvci54ICE9 IHgKIAkgIHx8IHctPnBoeXNfY3Vyc29yLnkgIT0geQpAQCAtMjk3NzQsNiArMzQ3MjEsOSBAQCBk aXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLAogCSAgICAg ICYmIG5ld19jdXJzb3Jfd2lkdGggIT0gdy0+cGh5c19jdXJzb3Jfd2lkdGgpKSkKICAgICBlcmFz ZV9waHlzX2N1cnNvciAodyk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyog RG9uJ3QgY2hlY2sgcGh5c19jdXJzb3Jfb25fcCBoZXJlIGJlY2F1c2UgdGhhdCBmbGFnIGlzIG9u bHkgc2V0CiAgICAgIHRvIGZhbHNlIGluIHNvbWUgY2FzZXMgd2hlcmUgd2Uga25vdyB0aGF0IHRo ZSBjdXJzb3IgaGFzIGJlZW4KICAgICAgY29tcGxldGVseSBlcmFzZWQsIHRvIGF2b2lkIHRoZSBl eHRyYSB3b3JrIG9mIGVyYXNpbmcgdGhlIGN1cnNvcgpAQCAtMjk3OTIsOSArMzQ3NDIsMTkgQEAg ZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBvbiwKICAgICAg IHctPnBoeXNfY3Vyc29yLnZwb3MgPSB2cG9zOwogICAgIH0KIAotICBGUkFNRV9SSUYgKGYpLT5k cmF3X3dpbmRvd19jdXJzb3IgKHcsIGdseXBoX3JvdywgeCwgeSwKLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBuZXdfY3Vyc29yX3R5cGUsIG5ld19jdXJzb3Jfd2lkdGgsCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb24sIGFjdGl2ZV9jdXJzb3IpOwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBp ZiAoTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAg ICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAg ICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkKKyAgICBG UkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGdseXBoX3JvdywgeCwgeSwgbmV3 X2N1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3 X2N1cnNvcl93aWR0aCwgb24sIGFjdGl2ZV9jdXJzb3IpOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiB9CiAKIApAQCAtMjk4ODcsNyArMzQ4NDcsMjkgQEAgZHJhd19yb3dfd2l0aF9t b3VzZV9mYWNlIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgc3RhcnRfeCwgc3RydWN0IGdseXBoX3Jv dyAqcm93LAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogICBpZiAoRlJBTUVfV0lORE9XX1Ag KFhGUkFNRSAody0+ZnJhbWUpKSkKICAgICB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGlmICh3LT5tY19tYXRyaXguY3Vyc29y c191c2VkW01DX0NBQ0hFXSA+IDAKKyAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191 c2VkW0NIX0NBQ0hFXSA+IDAKKyAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2Vk W0ZDX0NBQ0hFXSA+IDApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0cml4 ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJ WF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgIGJvb2wgY2xlYXJfZW9sX3AgPSBm YWxzZTsKKyAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UgaGwgPSBkcmF3OworICAgICAg ICAgIFRSQUNFICgoc3RkZXJyLCAiZHJhd19yb3dfd2l0aF9tb3VzZV9mYWNlICglZCk6ICBzdGFy dF94ICglZCkgfCBzdGFydF9ocG9zICglZCkgfCBlbmRfaHBvcyAoJWQpXG4iLAorICAgICAgICAg ICAgICAgICAgICAgICAgICB2cG9zLCBzdGFydF94LCBzdGFydF9ocG9zLCBlbmRfaHBvcykpOwor ICAgICAgICAgIG1jX3JlZHJhd19yb3cgKHcsIG1hdHJpeCwgcm93LCBzdGFydF94LCBzdGFydF9o cG9zLCBlbmRfaHBvcywgY2xlYXJfZW9sX3AsIGhsKTsKKyAgICAgICAgfQorICAgICAgICBlbHNl CiAgICAgICBkcmF3X2dseXBocyAodywgc3RhcnRfeCwgcm93LCBURVhUX0FSRUEsIHN0YXJ0X2hw b3MsIGVuZF9ocG9zLCBkcmF3LCAwKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAgICAgcmV0dXJuOwogICAgIH0KICNlbmRpZgpAQCAtMzE5NDUsMTEgKzM2OTI3LDM2IEBAIGV4 cG9zZV9hcmVhIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIFhSZWN0 YW5nbGUgKnIsCiAgIHN0cnVjdCBnbHlwaCAqbGFzdDsKICAgaW50IGZpcnN0X3gsIHN0YXJ0X3gs IHg7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIHJvdy0+ZmlsbF9saW5lX3ApCisgICAgewor ICAgICAgaWYgKHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID4gMAorICAgICAg ICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4gMAorICAgICAgICAg IHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVdID4gMCkKKyAgICAgICAgewor ICAgICAgICAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4 OworICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7Cisg ICAgICAgICAgaW50IHN0YXJ0X3ggPSAwOworICAgICAgICAgIGludCBzdGFydF9ocG9zID0gMDsK KyAgICAgICAgICBpbnQgZW5kX2hwb3MgPSByb3ctPnVzZWRbVEVYVF9BUkVBXTsKKyAgICAgICAg ICBib29sIGNsZWFyX2VvbF9wID0gZmFsc2U7CisgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19m YWNlIGhsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAgICAgICAgICBUUkFDRSAoKHN0ZGVyciwgImV4 cG9zZV9hcmVhICglZCk6ICBXcml0ZSB0aGUgd2hvbGUgbGluZS5cbiIsIHZwb3MpKTsKKyAgICAg ICAgICBtY19yZWRyYXdfcm93ICh3LCBtYXRyaXgsIHJvdywgc3RhcnRfeCwgc3RhcnRfaHBvcywg ZW5kX2hwb3MsIGNsZWFyX2VvbF9wLCBobCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQogICAg IC8qIElmIHJvdyBleHRlbmRzIGZhY2UgdG8gZW5kIG9mIGxpbmUgd3JpdGUgdGhlIHdob2xlIGxp bmUuICAqLwogICAgIGRyYXdfZ2x5cGhzICh3LCAwLCByb3csIGFyZWEsCiAJCSAwLCByb3ctPnVz ZWRbYXJlYV0sCiAJCSBEUkFXX05PUk1BTF9URVhULCAwKTsKKyAgICB9CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgZWxzZQogICAgIHsKICAgICAgIC8qIFNldCBTVEFSVF9YIHRv IHRoZSB3aW5kb3ctcmVsYXRpdmUgc3RhcnQgcG9zaXRpb24gZm9yIGRyYXdpbmcgZ2x5cGhzIG9m CkBAIC0zMTk4MSwxMSArMzY5ODgsMzYgQEAgZXhwb3NlX2FyZWEgKHN0cnVjdCB3aW5kb3cgKncs IHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgWFJlY3RhbmdsZSAqciwKIAkgICsrbGFzdDsKIAl9CiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAg ICAgIC8qIFJlcGFpbnQuICAqLwotICAgICAgaWYgKGxhc3QgPiBmaXJzdCkKKyAgICAgIC8qIEZs b2F0aW5nIGZha2UgY3Vyc29ycyB3aWxsIGV4aXN0IHdoZW4gKGxhc3QgPT0gZmlyc3QpLiAqLwor ICAgICAgaWYgKCh3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA+IDAKKyAgICAg ICAgICAgfHwgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPiAwCisgICAgICAg ICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVdID4gMCkKKyAgICAgICAg ICAmJiBhcmVhID09IFRFWFRfQVJFQSkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlw aF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgICAgIGludCB2cG9z ID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgc3RhcnRfeCA9IGZp cnN0X3ggLSBzdGFydF94OworICAgICAgICAgIGludCBzdGFydF9ocG9zID0gZmlyc3QgLSByb3ct PmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgIGludCBlbmRfaHBvcyA9IGxhc3QgLSByb3ct PmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgIGJvb2wgY2xlYXJfZW9sX3AgPSBmYWxzZTsK KyAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UgaGwgPSBEUkFXX05PUk1BTF9URVhUOwor ICAgICAgICAgIFRSQUNFICgoc3RkZXJyLCAiZXhwb3NlX2FyZWEgKCVkKTogIHN0YXJ0X3ggKCVk KSB8IHN0YXJ0X2hwb3MgKCVkKSB8IGVuZF9ocG9zICglZClcbiIsCisgICAgICAgICAgICAgICAg ICAgICAgICAgIHZwb3MsIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zKSk7CisgICAgICAg ICAgbWNfcmVkcmF3X3JvdyAodywgbWF0cml4LCByb3csIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVu ZF9ocG9zLCBjbGVhcl9lb2xfcCwgaGwpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGxh c3QgPiBmaXJzdCkKIAlkcmF3X2dseXBocyAodywgZmlyc3RfeCAtIHN0YXJ0X3gsIHJvdywgYXJl YSwKIAkJICAgICBmaXJzdCAtIHJvdy0+Z2x5cGhzW2FyZWFdLCBsYXN0IC0gcm93LT5nbHlwaHNb YXJlYV0sCiAJCSAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCk7CisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKICAgICB9CiB9CiAKQEAgLTMxOTk5LDEwICszNzAzMSwzNSBAQCBleHBvc2Vf bGluZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBYUmVjdGFuZ2xl ICpyKQogewogICBlYXNzZXJ0IChyb3ctPmVuYWJsZWRfcCk7CiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgaWYgKHJvdy0+bW9kZV9saW5l X3AgfHwgdy0+cHNldWRvX3dpbmRvd19wKQorICAgIHsKKyAgICAgIGlmICh3LT5tY19tYXRyaXgu Y3Vyc29yc191c2VkW01DX0NBQ0hFXSA+IDAKKyAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vy c29yc191c2VkW0NIX0NBQ0hFXSA+IDAKKyAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29y c191c2VkW0ZDX0NBQ0hFXSA+IDApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgICAgICBpbnQgdnBvcyA9 IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgIGludCBzdGFydF94ID0g MDsKKyAgICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IDA7CisgICAgICAgICAgaW50IGVuZF9ocG9z ID0gcm93LT51c2VkW1RFWFRfQVJFQV07CisgICAgICAgICAgYm9vbCBjbGVhcl9lb2xfcCA9IGZh bHNlOworICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBobCA9IERSQVdfTk9STUFMX1RF WFQ7CisgICAgICAgICAgVFJBQ0UgKChzdGRlcnIsICJleHBvc2VfbGluZSAoJWQpOiAgV3JpdGUg dGhlIHdob2xlIGxpbmUuXG4iLCB2cG9zKSk7CisgICAgICAgICAgbWNfcmVkcmF3X3JvdyAodywg bWF0cml4LCByb3csIHN0YXJ0X3gsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCBjbGVhcl9lb2xfcCwg aGwpOworICAgICAgICB9CisgICAgICAgIGVsc2UKICAgICBkcmF3X2dseXBocyAodywgMCwgcm93 LCBURVhUX0FSRUEsCiAJCSAwLCByb3ctPnVzZWRbVEVYVF9BUkVBXSwKIAkJIERSQVdfTk9STUFM X1RFWFQsIDApOworICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBlbHNl CiAgICAgewogICAgICAgaWYgKHJvdy0+dXNlZFtMRUZUX01BUkdJTl9BUkVBXSkKQEAgLTMyNTUw LDYgKzM3NjA3LDIyIEBAIHhfaW50ZXJzZWN0X3JlY3RhbmdsZXMgKFhSZWN0YW5nbGUgKnIxLCBY UmVjdGFuZ2xlICpyMiwgWFJlY3RhbmdsZSAqcmVzdWx0KQogdm9pZAogc3ltc19vZl94ZGlzcCAo dm9pZCkKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNP UlMgKi8KKworICBkZWZzdWJyICgmU21jX2R1bXBfZ2x5cGhfcm93KTsKKworICBkZWZzdWJyICgm U21jX2R1bXBfZ2x5cGhfbWF0cml4KTsKKworICBkZWZzdWJyICgmU21jX2N1cnJlbnRfY29sdW1u KTsKKworICBkZWZzdWJyICgmU21jX3N0ZGVycik7CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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V0QgYW5kIEggdGhhdCBhcmUgMSBwaXhlbCBsZXNzLiAq LworICBpbnQgcnggPSBmeDsKKyAgaW50IHJ5ID0gZnk7CisgIGludCBydyA9IHdkIC0gMTsKKyAg aW50IHJoID0gaCAtIDE7CisgIHhfZHJhd19yZWN0YW5nbGUgKGYsIGdjLCByeCwgcnksIHJ3LCBy aCk7CisvKgorICBmcHJpbnRmIChzdGRlcnIsICJtY194X2RyYXdfaG9sbG93X2N1cnNvcjogIHJ4 ICglZCkgfCByeSAoJWQpIHwgcncgKCVkKSB8IHJoICglZClcbiIsCisgICAgICAgICAgICAgICAg ICAgIHJ4LCByeSwgcncsIHJoKTsKKyovCisgIHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChmLCBn Yyk7Cit9CisKKy8qIERyYXcgYSBiYXIgY3Vyc29yIG9uIHdpbmRvdyBXIGluIGdseXBoIHJvdyBS T1cuICovCitzdGF0aWMgdm9pZAorbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cg KncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAor ICAgICAgICAgICAgICAgICAgICAgIGludCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBo cG9zLCBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCwKKyAgICAgICAgICAgICAgICAgICAgICBpbnQg d2lkdGgsIGVudW0gbWNfY3Vyc29yX3R5cGUga2luZCwgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxl X29rYXlfcCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIC8q IElmIGN1cnNvciBpcyBvdXQgb2YgYm91bmRzLCBkb24ndCBkcmF3IGdhcmJhZ2UuICBUaGlzIGNh biBoYXBwZW4KKyAgICAgaW4gbWluaS1idWZmZXIgd2luZG93cyB3aGVuIHN3aXRjaGluZyBiZXR3 ZWVuIG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isgICAgICAgICAgJiYgIWN1cnNvcl9nY19pbnZpc2libGVfb2theV9w KQorICAgICAgICB4Z2N2LmJhY2tncm91bmQgPSB4Z2N2LmZvcmVncm91bmQgPSBmYWNlLT5mb3Jl Z3JvdW5kOworICAgICAgZWxzZQorICAgICAgICB4Z2N2LmJhY2tncm91bmQgPSB4Z2N2LmZvcmVn cm91bmQgPSBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWw7CisgICAgICB4Z2N2LmdyYXBo aWNzX2V4cG9zdXJlcyA9IEZhbHNlOworICAgICAgaWYgKGdjKQorICAgICAgICBYQ2hhbmdlR0Mg KGRweSwgZ2MsIG1hc2ssICZ4Z2N2KTsKKyAgICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAg IGdjID0gWENyZWF0ZUdDIChkcHksIHdpbmRvdywgbWFzaywgJnhnY3YpOworICAgICAgICAgIEZS QU1FX0RJU1BMQVlfSU5GTyAoZiktPnNjcmF0Y2hfY3Vyc29yX2djID0gZ2M7CisgICAgICAgIH0K KyAgICAgIHhfY2xpcF90b19yb3cgKHcsIHJvdywgVEVYVF9BUkVBLCBnYyk7CisgICAgICB4X2Zp bGxfcmVjdGFuZ2xlIChmLCBnYywgZngsIGZ5LCB3ZCwgaCk7CisgICAgICB4X3Jlc2V0X2NsaXBf cmVjdGFuZ2xlcyAoZiwgZ2MpOworICAgIH0KK30KKworLyogUklGOiBEcmF3IGN1cnNvciBvbiB3 aW5kb3cgVy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGlu dCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsCisgICAgICAgICAgICAgICAgICAgICAg ICAga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IG1hdHJpeCwg cm93LCBocG9zLCB2cG9zKTsKKyAgICAgIGlmIChjdXJzb3JfZ2x5cGggPT0gTlVMTCkKKyAgICAg ICAgcmV0dXJuOworICAgICAgTGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgICAgICBD SEVDS19CVUZGRVIgKGJ1Zik7CisgICAgICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVm KTsKKyAgICAgIGJvb2wgcmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtf bW9kZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBt YXJrX2FjdGl2ZSkpKTsKKyAgICAgIHB0cmRpZmZfdCByZWdpb25fYmVnID0gKHJlZ2lvbl9hY3Rp dmVfcCkgPyBtY19yZWdpb25fbGltaXQgKDEpIDogLTE7CisgICAgICBwdHJkaWZmX3QgcmVnaW9u X2VuZCA9IChyZWdpb25fYWN0aXZlX3ApID8gbWNfcmVnaW9uX2xpbWl0ICgwKSA6IC0xOworICAg ICAgaWYgKGN1cnNvcl9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCAmJiBsc2wucmVkID49IDAg JiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBieSBi b3Jyb3dpbmcgdGhlCisgICAgICAgICAgZnVuY3Rpb25hbGl0eSBvZiBgeF9tYWtlX2djJyBpbiB4 Zm5zLmMuICovCisgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAm JiBhY3RpdmVfcAorICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPT0gcmVn aW9uX2JlZykKKyAgICAgICAgICAgIHsKKyAg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9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAg ICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBUZW1w b3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycgYnkgYm9ycm93aW5n IHRoZQorICAgICAgICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHhmbnMu Yy4gKi8KKyAgICAgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBv cyA9PSByZWdpb25fYmVnKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCA9IGxvb2t1cF9uYW1l ZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQtcmVnaW9uLXByZS16 di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19h Y3RpdmVfcmVnaW9uX2JlZ19mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3Jl Z2lvbl9iZWdfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93 X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0 cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19h Y3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVf WF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZl X2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZS QU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2Fj dGl2ZV9yZWdpb25fYmVnX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9n bHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2Vf aWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29y LWF0LXJlZ2lvbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3Ry dWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlID0gRkFDRV9GUk9NX0lEIChm LCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAg IGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAo dywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOwor ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFD RV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAg ICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+ Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAg ICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZS0+YmFja2dyb3Vu ZCk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmIChyZWdp b25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPiByZWdpb25f YmVnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3Mg PCByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg ICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZV9pZCA9IGxv b2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW4tcmVn aW9uLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBm YWNlICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UgPSBGQ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ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQp OworICAgICAgICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExB WSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5m b3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFN RV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3Rp dmVfZmFjZS0+YmFja2dyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2 ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtl LWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lE IChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICAg IFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfZ2MsIGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91 dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQp OworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBibG9ja19pbnB1dCAo KTsKKyAgICAgICAgICAgICAgLyogRm9yY2UgYG1jX3hfc2V0X2N1cnNvcl9nYycgdG8gdXNlIGBz LT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgICAgICBib29sIGN1 cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcs IG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2Qs IGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX2dj X3ApOworICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwg Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAg ICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX2djLCB4Z2N2LmJhY2tncm91bmQpOworICAgICAgICAgICAgICB1bmJsb2NrX2lu cHV0ICgpOworICAgICAgICAgICAgICAvKiBEcmF3IHRoZSBmcmFtZSBhcm91bmQgdGhlIGJveC4g Ki8KKyAgICAgICAgICAgICAgbWNfeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICAgIH0KKyAgICAg IGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0hPTExPV19CT1g6CisgICAgeworICAgICAgaWYg KGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAg ICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhl bCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIG1jX3hfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBt YXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAg Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOwor ICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNv ciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAg ICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICB7CisgICAgICBp ZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAg ICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBi eSBib3Jyb3dpbmcgdGhlCisgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4g eGZucy5jLiAqLworICAgICAgICB7CisgICAgICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAg ICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExB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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vy c29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAgIH0KKyAgICAg IGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0JBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJl ZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAg ICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9w aXhlbCcuICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gY29s b3IucGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IHRy dWU7CisgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjdXJzb3Jfd2lkdGgsIE1DX0JBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOwor ICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNv cl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAg ICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAg bWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93 aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgfQor ICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfSEJBUjoKKyAgICB7CisgICAgICBpZiAo bHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAg IHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9waXhlbCcuICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVs ID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlf cCA9IHRydWU7CisgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2th eV9wKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5h bF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSBmYWxzZTsKKyAgICAg ICAgICAgIG1jX3hfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5 LCBocG9zLCB2cG9zLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBj dXJzb3Jfd2lkdGgsIE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAg ICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fi b3J0ICgpOworICB9CisgICAgICAgIH0KKyNpZmRlZiBIQVZFX1hfSTE4TgorICBpZiAodyA9PSBY V0lORE9XIChmLT5zZWxlY3RlZF93aW5kb3cpKQorICAgIGlmIChGUkFNRV9YSUMgKGYpICYmIChG UkFNRV9YSUNfU1RZTEUgKGYpICYgWElNUHJlZWRpdFBvc2l0aW9uKSkKKyAgICAgIHhpY19zZXRf cHJlZWRpdGFyZWEgKHcsIHgsIHkpOworI2VuZGlmCisgICAgfQorICBYRmx1c2ggKEZSQU1FX1hf RElTUExBWSAoZikpOworfQorCisvKiBEcmF3IHN0cmV0Y2ggZ2x5cGggc3RyaW5nIFMuICovCitz dGF0aWMgdm9pZAorbWNfeF9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChzdHJ1Y3QgZ2x5cGhf c3RyaW5nICpzKQoreworICBlYXNzZXJ0IChzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBTVFJFVENI X0dMWVBIKTsKKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SCisgICAgICAmJiAheF9zdHJldGNo X2N1cnNvcl9wKQorICAgIHsKKyAgICAgIC8qIElmIGB4LXN0cmV0Y2gtY3Vyc29yJyBpcyBuaWws IGRvbid0IGRyYXcgYSBibG9jayBjdXJzb3IgYXMgd2lkZSBhcyB0aGUKKyAgICAgIHN0cmV0Y2gg Z2x5cGguICovCisgICAgICBpbnQgd2lkdGgsIGJhY2tncm91bmRfd2lkdGggPSBzLT5iYWNrZ3Jv dW5kX3dpZHRoOworICAgICAgaW50IHggPSBzLT54OworICAgICAgaWYgKCFzLT5yb3ctPnJldmVy c2VkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgbGVmdF94ID0gd2luZG93X2JveF9sZWZ0 X29mZnNldCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICBpZiAoeCA8IGxlZnRfeCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAtPSBsZWZ0X3ggLSB4 OworICAgICAgICAgICAgICB4ID0gbGVmdF94OworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBJbiBSMkwgcm93cywgZHJh dyB0aGUgY3Vyc29yIG9uIHRoZSByaWdodCBlZGdlIG9mIHRoZQorICAgICAgICAgICAgICAgc3Ry ZXRjaCBnbHlwaC4gKi8KKyAgICAgICAgICAgIGludCByaWdodF94ID0gd2luZG93X2JveF9yaWdo dCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgIGlmICh4ICsgYmFja2dyb3VuZF93aWR0 aCA+IHJpZ2h0X3gpCisgICAgICAgICAgICAgIGJhY2tncm91bmRfd2lkdGggLT0geCAtIHJpZ2h0 X3g7CisgICAgICAgICAgICB4ICs9IGJhY2tncm91bmRfd2lkdGg7CisgICAgICAgICAgfQorICAg ICAgd2lkdGggPSBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAocy0+ZiksIGJhY2tncm91bmRfd2lk dGgpOworICAgICAgaWYgKHMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeCAtPSB3aWR0aDsK KyAgICAgIC8qIERyYXcgY3Vyc29yLiAqLworICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19iZ19y ZWN0IChzLCB4LCBzLT55LCB3aWR0aCwgcy0+aGVpZ2h0KTsKKyAgICAgIC8qIENsZWFyIHJlc3Qg dXNpbmcgdGhlIEdDIG9mIHRoZSBvcmlnaW5hbCBub24tY3Vyc29yIGZhY2UuICovCisgICAgICBp ZiAod2lkdGggPCBiYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHkg PSBzLT55OworICAgICAgICAgIGludCB3ID0gYmFja2dyb3VuZF93aWR0aCAtIHdpZHRoLCBoID0g cy0+aGVpZ2h0OworICAgICAgICAgIFhSZWN0YW5nbGUgcjsKKyAgICAgICAgICBHQyBnYzsKKyAg ICAgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgICAgIHggKz0gd2lkdGg7 CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeCA9IHMtPng7CisgICAgICAgICAgaWYgKHMt PnJvdy0+bW91c2VfZmFjZV9wCisgICAgICAgICAgICAgICYmIGN1cnNvcl9pbl9tb3VzZV9mYWNl X3AgKHMtPncpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB4X3NldF9tb3VzZV9mYWNl X2djIChzKTsKKyAgICAgICAgICAgICAgZ2MgPSBzLT5nYzsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgICBlbHNlCisgICAgICAgICAgICBnYyA9IHMtPmZhY2UtPmdjOworICAgICAgICAgIGdldF9n bHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCAmcik7CisgICAgICAgICAgeF9zZXRfY2xpcF9yZWN0 YW5nbGVzIChzLT5mLCBnYywgJnIsIDEpOworICAgICAgICAgIGlmIChzLT5mYWNlLT5zdGlwcGxl KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBGaWxsIGJhY2tncm91bmQgd2l0aCBh IHN0aXBwbGUgcGF0dGVybi4gKi8KKyAgICAgICAgICAgICAgWFNldEZpbGxTdHlsZSAocy0+ZGlz cGxheSwgZ2MsIEZpbGxPcGFxdWVTdGlwcGxlZCk7CisgICAgICAgICAgICAgIHhfZmlsbF9yZWN0 YW5nbGUgKHMtPmYsIGdjLCB4LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAgWFNldEZpbGxTdHls ZSAocy0+ZGlzcGxheSwgZ2MsIEZpbGxTb2xpZCk7CisgICAgICAgICAgICB9CisgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBYR0NWYWx1ZXMgeGdjdj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m9yICh3aWR0aCA9IDAsIG5leHQg PSBzLT5uZXh0OworICAgICAgICAgICBuZXh0ICYmIHdpZHRoIDwgcy0+cmlnaHRfb3Zlcmhhbmc7 CisgICAgICAgICAgIHdpZHRoICs9IG5leHQtPndpZHRoLCBuZXh0ID0gbmV4dC0+bmV4dCkKKyAg ICAgICAgaWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBlICE9IElNQUdFX0dMWVBIKQorICAgICAg ICAgIHsKKyAgICAgICAgICAgIG1jX3hfc2V0X2dseXBoX3N0cmluZ19nYyAobmV4dCwgY3Vyc29y X2djX3ApOworICAgICAgICAgICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBwaW5nIChuZXh0KTsK KyAgICAgICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBTVFJFVENIX0dMWVBI KQorICAgICAgICAgICAgICBtY194X2RyYXdfc3RyZXRjaF9nbHlwaF9zdHJpbmcgKG5leHQpOwor ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tn cm91bmQgKG5leHQsIHRydWUpOworICAgICAgICAgICAgbmV4dC0+bnVtX2NsaXBzID0gMDsKKyAg ICAgICAgICB9CisgICAgfQorICAvKiBTZXQgdXAgUy0+Z2MsIHNldCBjbGlwcGluZyBhbmQgZHJh dyBTLiAqLworICBtY194X3NldF9nbHlwaF9zdHJpbmdfZ2MgKHMsIGN1cnNvcl9nY19wKTsKKyAg LyogRHJhdyByZWxpZWYgKGlmIGFueSkgaW4gYWR2YW5jZSBmb3IgY2hhci9jb21wb3NpdGlvbiBz byB0aGF0IHRoZQorICAgICBnbHlwaCBzdHJpbmcgY2FuIGJlIGRyYXduIG92ZXIgaXQuICovCisg IGlmICghcy0+Zm9yX292ZXJsYXBzCisgICAgICAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19C T1gKKyAgICAgICYmIChzLT5maXJzdF9nbHlwaC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bmcgKHMpOworICBzd2l0Y2ggKHMtPmZpcnN0X2dseXBoLT50eXBlKQorICAgIHsKKyAgICBj YXNlIElNQUdFX0dMWVBIOgorICAgICAgeF9kcmF3X2ltYWdlX2dseXBoX3N0cmluZyAocyk7Cisg ICAgICBicmVhazsKKyAgICBjYXNlIFhXSURHRVRfR0xZUEg6CisgICAgICB4X2RyYXdfeHdpZGdl dF9nbHlwaF9zdHJpbmcgKHMpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBTVFJFVENIX0dMWVBI OgorICAgICAgbWNfeF9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChzKTsKKyAgICAgIGJyZWFr OworICAgIGNhc2UgQ0hBUl9HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMpCisgICAg ICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxzZQorICAgICAgICB4 X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIGZhbHNlKTsKKyAgICAgIHhfZHJhd19n bHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENPTVBP U0lURV9HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMgfHwgKHMtPmNtcF9mcm9tID4g MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5j bXAuYXV0b21hdGljKSkKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7Cisg ICAgICBlbHNlCisgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1 ZSk7CisgICAgICB4X2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsK KyAgICAgIGJyZWFrOworICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgorICAgICAgaWYgKHMtPmZv cl9vdmVybGFwcykKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAg ICBlbHNlCisgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1ZSk7 CisgICAgICB4X2RyYXdfZ2x5cGhsZXNzX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAg ICAgIGJyZWFrOworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9Cisg IGlmICghcy0+Zm9yX292ZXJsYXBzKQorICAgIHsKKyAgICAgIC8qIERyYXcgdW5kZXJsaW5lLiAq LworICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9wKQorICAgICAgICB7CisgICAgICAgICAg aWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkK KyAgICAgICAgICAgICAgICB4X2RyYXdfdW5kZXJ3YXZlIChzKTsKKyAgICAgICAgICAgICAgZWxz ZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2Owor ICAgICAgICAgICAgICAgICAgWEdldEdDVmFsdWVzIChzLT5kaXNwbGF5LCBzLT5nYywgR0NGb3Jl Z3JvdW5kLCAmeGdjdik7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAocy0+ZGlz cGxheSwgcy0+Z2MsIHMtPmZhY2UtPnVuZGVybGluZV9jb2xvcik7CisgICAgICAgICAgICAgICAg ICB4X2RyYXdfdW5kZXJ3YXZlIChzKTsKKyAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5k IChzLT5kaXNwbGF5LCBzLT5nYywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZSBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5 cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB1bnNp Z25lZCBsb25nIHRoaWNrbmVzcywgcG9zaXRpb247CisgICAgICAgICAgICAgIGludCB5OworICAg ICAgICAgICAgICBpZiAocy0+cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfcAorICAg ICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9V TkRFUl9MSU5FKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8qIFdlIHVz ZSB0aGUgc2FtZSB1bmRlcmxpbmUgc3R5bGUgYXMgdGhlIHByZXZpb3VzIG9uZS4gKi8KKyAgICAg ICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPnByZXYtPnVuZGVybGluZV90aGlja25lc3M7Cisg ICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPnByZXYtPnVuZGVybGluZV9wb3NpdGlvbjsK KyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVybGluZSB0aGlja25lc3MuICBEZWZh dWx0IGlzIDEgcGl4ZWwuICovCisgICAgICAgICAgICAgICAgICBpZiAocy0+Zm9udCAmJiBzLT5m b250LT51bmRlcmxpbmVfdGhpY2tuZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgdGhpY2tu ZXNzID0gcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gMTsKKyAgICAgICAgICAgICAgICAg IGlmICh4X3VuZGVybGluZV9hdF9kZXNjZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAgIHBv c2l0aW9uID0gKHMtPmhlaWdodCAtIHRoaWNrbmVzcykgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAg ICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHBvc2l0aW9uLiAgVGhpcyBpcyB0aGUgcmVj b21tZW5kZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICB2ZXJ0aWNhbCBvZmZzZXQgaW4gcGl4 ZWxzIGZyb20gdGhlIGJhc2VsaW5lIHRvIHRoZSB0b3Agb2YKKyAgICAgICAgICAgICAgICAgICAg ICAgICB0aGUgdW5kZXJsaW5lLiAgVGhpcyBpcyBhIHNpZ25lZCB2YWx1ZSBhY2NvcmRpbmcgdG8g dGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY3MsIGFuZCBpdHMgZGVmYXVsdCBpcwor ICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EICgobWF4aW11bSBkZXNjZW50KSAvIDIpLCB3 aXRoCisgICAgICAgICAgICAgICAgICAgICAgICAgUk9VTkQoeCkgPSBmbG9vciAoeCArIDAuNSkg ICovCisgICAgICAgICAgICAgICAgICAgICAgaWYgKHhfdXNlX3VuZGVybGluZV9wb3NpdGlvbl9w cm9wZXJ0aWVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHMtPmZvbnQgJiYgcy0+Zm9u dC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgICBwb3Np dGlvbiA9IHMtPmZvbnQtPnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICAgICAg ICBlbHNlIGlmIChzLT5mb250KQorICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAo cy0+Zm9udC0+ZGVzY2VudCArIDEpIC8gMjsKKyAgICAgICAgICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHVuZGVybGluZV9taW5pbXVtX29mZnNl dDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBt YXggKHBvc2l0aW9uLCB1bmRlcmxpbmVfbWluaW11bV9vZmZzZXQpOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgLyogQ2hlY2sgdGhlIHNhbml0eSBvZiB0aGlja25lc3MgYW5kIHBv c2l0aW9uLiAgV2Ugc2hvdWxkCisgICAgICAgICAgICAgICAgIGF2b2lkIGRyYXdpbmcgdW5kZXJs aW5lIG91dCBvZiB0aGUgY3VycmVudCBsaW5lIGFyZWEuICovCisgICAgICAgICAgICAgIGlmIChz LT55ICsgcy0+aGVpZ2h0IDw9IHMtPnliYXNlICsgcG9zaXRpb24pCisgICAgICAgICAgICAgICAg cG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gMSkgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAg ICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPCBzLT55YmFzZSArIHBvc2l0aW9uICsgdGhpY2tu ZXNzKQorICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IChzLT55ICsgcy0+aGVpZ2h0KSAtIChz LT55YmFzZSArIHBvc2l0aW9uKTsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3RoaWNrbmVz cyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Bvc2l0aW9uID0gcG9z aXRpb247CisgICAgICAgICAgICAgIHkgPSBzLT55YmFzZSArIHBvc2l0aW9uOworICAgICAgICAg ICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgICAg IHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCB5LCBzLT53aWR0aCwgdGhpY2tu ZXNzKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICAgICAgWEdldEdDVmFsdWVzIChz LT5kaXNwbGF5LCBzLT5nYywgR0NGb3JlZ3JvdW5kLCAmeGdjdik7CisgICAgICAgICAgICAgICAg ICBYU2V0Rm9yZWdyb3VuZCAocy0+ZGlzcGxheSwgcy0+Z2MsIHMtPmZhY2UtPnVuZGVybGluZV9j b2xvcik7CisgICAgICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBzLT5nYywg cy0+eCwgeSwgcy0+d2lkdGgsIHRoaWNrbmVzcyk7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9y ZWdyb3VuZCAocy0+ZGlzcGxheSwgcy0+Z2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAvKiBEcmF3IG92ZXJsaW5l LiAqLworICAgICAgaWYgKHMtPmZhY2UtPm92ZXJsaW5lX3ApCisgICAgICAgIHsKKyAgICAgICAg ICB1bnNpZ25lZCBsb25nIGR5ID0gMCwgaCA9IDE7CisgICAgICAgICAgaWYgKHMtPmZhY2UtPm92 ZXJsaW5lX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAo cy0+Ziwgcy0+Z2MsIHMtPngsIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOworICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgWEdDVmFsdWVzIHhnY3Y7CisgICAgICAg ICAgICAgIFhHZXRHQ1ZhbHVlcyAocy0+ZGlzcGxheSwgcy0+Z2MsIEdDRm9yZWdyb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ngsIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOworICAgICAgICAgICAg ICBYU2V0Rm9yZWdyb3VuZCAocy0+ZGlzcGxheSwgcy0+Z2MsIHhnY3YuZm9yZWdyb3VuZCk7Cisg ICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgcmVsaWVmIGlmIG5vdCB5ZXQg ZHJhd24uICovCisgICAgICBpZiAoIXJlbGllZl9kcmF3bl9wICYmIHMtPmZhY2UtPmJveCAhPSBG QUNFX05PX0JPWCkKKyAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JveCAocyk7CisgICAg ICBpZiAocy0+cHJldikKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcg KnByZXY7CisgICAgICAgICAgZm9yIChwcmV2ID0gcy0+cHJldjsgcHJldjsgcHJldiA9IHByZXYt PnByZXYpCisgICAgICAgICAgICBpZiAocHJldi0+aGwgIT0gcy0+aGwKKyAgICAgICAgICAgICAg ICAmJiBwcmV2LT54ICsgcHJldi0+d2lkdGggKyBwcmV2LT5yaWdodF9vdmVyaGFuZyA+IHMtPngp CisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBwcmV2IHdhcyBkcmF3biB3 aGlsZSBjbGlwcGVkIHRvIGl0cyBvd24gYXJlYSwgd2UKKyAgICAgICAgICAgICAgICAgICBtdXN0 IGRyYXcgdGhlIHJpZ2h0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwgbm93LiAqLworICAgICAg ICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBzYXZlID0gcHJldi0+aGw7CisgICAgICAg ICAgICAgICAgcHJldi0+aGwgPSBzLT5obDsKKyAgICAgICAgICAgICAgICBtY194X3NldF9nbHlw aF9zdHJpbmdfZ2MgKHByZXYsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgICAgICB4X3NldF9n bHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywgcHJldik7CisgICAgICAgICAgICAgICAg aWYgKHByZXYtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAg ICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHByZXYpOworICAgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5n X2ZvcmVncm91bmQgKHByZXYpOworICAgICAgICAgICAgICAgIHhfcmVzZXRfY2xpcF9yZWN0YW5n bGVzIChwcmV2LT5mLCBwcmV2LT5nYyk7CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzYXZl OworICAgICAgICAgICAgICAgIHByZXYtPm51bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgIH0K KyAgICAgICAgfQorICAgICAgaWYgKHMtPm5leHQpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1 Y3QgZ2x5cGhfc3RyaW5nICpuZXh0OworICAgICAgICAgIGZvciAobmV4dCA9IHMtPm5leHQ7IG5l eHQ7IG5leHQgPSBuZXh0LT5uZXh0KQorICAgICAgICAgICAgaWYgKG5leHQtPmhsICE9IHMtPmhs CisgICAgICAgICAgICAgICAgJiYgbmV4dC0+eCAtIG5leHQtPmxlZnRfb3ZlcmhhbmcgPCBzLT54 ICsgcy0+d2lkdGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBuZXh0 IHdpbGwgYmUgZHJhd24gd2hpbGUgY2xpcHBlZCB0byBpdHMgb3duIGFyZWEsCisgICAgICAgICAg ICAgICAgICAgd2UgbXVzdCBkcmF3IHRoZSBsZWZ0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwg bm93LiAqLworICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBzYXZlID0gbmV4 dC0+aGw7CisgICAgICAgICAgICAgICAgbmV4dC0+aGwgPSBzLT5obDsKKyAgICAgICAgICAgICAg ICBtY194X3NldF9nbHlwaF9zdHJpbmdfZ2MgKG5leHQsIGN1cnNvcl9nY19wKTsKKyAgICAgICAg ICAgICAgICB4X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywgbmV4dCk7Cisg ICAgICAgICAgICAgICAgaWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgp CisgICAgICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQp OworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19jb21wb3Np dGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQpOworICAgICAgICAgICAgICAgIHhfcmVz ZXRfY2xpcF9yZWN0YW5nbGVzIChuZXh0LT5mLCBuZXh0LT5nYyk7CisgICAgICAgICAgICAgICAg bmV4dC0+aGwgPSBzYXZlOworICAgICAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7Cisg ICAgICAgICAgICAgICAgbmV4dC0+Y2xpcF9oZWFkID0gcy0+bmV4dDsKKyAgICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgfQorICAvKiBSZXNldCBjbGlwcGluZy4gKi8KKyAgeF9yZXNldF9j bGlwX3JlY3RhbmdsZXMgKHMtPmYsIHMtPmdjKTsKKyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKwor LyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IC8qIERlZmF1bHQgdG8gdXNpbmcgWElNIGlmIGF2YWlsYWJsZS4gICovCiAjaWZkZWYgVVNFX1hJ TQogYm9vbCB1c2VfeGltID0gdHJ1ZTsKQEAgLTk5OSw2ICsxODc4LDE1IEBAIHhfdXBkYXRlX2Jl Z2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmIChGUkFNRV9UT09MVElQX1AgKGYpICYmICFGUkFN RV9WSVNJQkxFX1AgKGYpKQogICAgIHJldHVybjsKIAorCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IGY7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKCEgRlJBTUVfQ1JfU1VSRkFD RSAoZikpCiAgICAgewogICAgICAgaW50IHdpZHRoLCBoZWlnaHQ7CkBAIC0xMjY2LDYgKzIxNTQs MTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIFhGbHVzaCAoRlJBTUVfWF9E SVNQTEFZIChmKSk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5kaWYKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGlu Z19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogLyog VGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBsYWNlcyBpbiB4ZGlzcC5jCkBA IC0xMzEwMCw2ICsxMzk5OCwyMSBAQCB4X2FjdGl2YXRlX3RpbWVvdXRfYXRpbWVyICh2b2lkKQog CiBzdGF0aWMgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2UgeF9yZWRpc3BsYXlfaW50ZXJmYWNl ID0KICAgeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYHh0ZXJtLmNgIG11c3QgYmUgaW4g dGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMgdGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRp c3BleHRlcm4uaGAhICovCisKKyAgbWNfeF93cml0ZV9nbHlwaHMsCisgIG1jX3hfZHJhd193aW5k b3dfY3Vyc29yLAorICBtY194X2RyYXdfZ2x5cGhfc3RyaW5nLAorCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgICAgeF9mcmFtZV9wYXJtX2hhbmRsZXJzLAogICAgIHhfcHJvZHVjZV9n bHlwaHMsCiAgICAgeF93cml0ZV9nbHlwaHMsCg== --Multipart_Sat_Jun__8_16:44:10_2019-1--