From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Mon, 22 Jul 2019 23:01:19 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Mon_Jul_22_23:01:18_2019-1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="81183"; 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 Tue Jul 23 08:02:22 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 1hpnsR-000HQb-Jp for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2019 08:02:22 +0200 Original-Received: from localhost ([::1]:39388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpnsQ-0004YS-KW for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2019 02:02:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48809) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpnsF-0004Xh-27 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 02:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpnsC-0004fP-RR for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 02:02:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpnsB-0004dA-5p for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 02:02:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpnsB-0001dP-0O for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2019 02:02:03 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2019 06:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22873 X-GNU-PR-Package: emacs Original-Received: via spool by 22873-submit@debbugs.gnu.org id=B22873.15638616886204 (code B ref 22873); Tue, 23 Jul 2019 06:02:02 +0000 Original-Received: (at 22873) by debbugs.gnu.org; 23 Jul 2019 06:01:28 +0000 Original-Received: from localhost ([127.0.0.1]:33883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpnrc-0001bv-8d for submit@debbugs.gnu.org; Tue, 23 Jul 2019 02:01:28 -0400 Original-Received: from gateway30.websitewelcome.com ([192.185.145.3]:49315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpnrZ-0001bf-4O for 22873@debbugs.gnu.org; Tue, 23 Jul 2019 02:01:25 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway30.websitewelcome.com (Postfix) with ESMTP id A4FA8F1B3 for <22873@debbugs.gnu.org>; Tue, 23 Jul 2019 01:01:24 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id pnrXh4HRn2PzOpnrYhBwPq; Tue, 23 Jul 2019 01:01:24 -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=wDaZC0BFsHP2hMpbdDoLNx03WvfLda1+Vp3dBQahUkM=; b=ZKz9WyobF42q/uaOvWiCtbkRbK YPoYzs2i3xeC47YHUaYgCsf9G+moko+1Ayr5U4KSvZN5fct/u04di1r8fDdAYBvkbcuY+YtzALsS/ Gd1CY5oR7eVpbxOVQm1WMHzmY2huV7+yWDz8sNFWgdcxUaehZjqpVqM8aUfWzrOaBCWhukaPhgPX2 jg+YjuNhfUkk/d/mEyRy9AcPphqJcz4v/9WUAn2LOKq+OcsRnUXU7Wj0hZ14/77qIhhNjEq27ukmO bY1Tm5cmcQAcy2yV7rZyN1QrsCJIxAYePH5im6XJkmZY8PtqEo+YCQNvZ0ogGzn6S9Fuy8ppgFRmQ UW7yYOYg==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:54630 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hpnrU-000tY1-73; Tue, 23 Jul 2019 01:01:23 -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: 1hpnrU-000tY1-73 X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:54630 X-Source-Auth: lawlist X-Email-Count: 7 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:163620 Archived-At: --Multipart_Mon_Jul_22_23:01:18_2019-1 Content-Type: text/plain; charset=US-ASCII VERSION: 022.001 [07/22/2019] CHANGELOG: - `mc_update_window_erase' no longer sets the `same_p` struct member to `false`, as this was undoing all of the work that had previously been done to discover and set `same_p` to `true` in previous loops through the caches of fake cursors. Although this bug may have been somewhat difficult for the naked eye to see, the fix will improve the overall performance in some situations by reducing the need to erase and redraw certain fake cursors. - Miscellaneous tidying-up of code. VIDEOS: w32: https://youtu.be/r3BdJVlsAnQ ns: https://youtu.be/bc1h8jtbXmw x11: https://youtu.be/aCIFhD2Xz5s SCREENSHOTS: 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 07/14/2019: git reset --hard ac57c5093829ee09084c562bbbc1c412179be13d 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, that package must be installed. If the multiple-cursors package is already installed, then just (require 'crosshairs) and `crosshairs.el` will redefine a few of the multiple-cursors 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) (mc/built-in-cursors)) TODO: - 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 a minimal working example and file a bug report. (progn (defun test () (interactive) (let ((ov (make-overlay (point) (1+ (point)) nil t t))) (overlay-put ov 'face '(:foreground "red")))) (global-set-key [f5] 'test) (split-window-horizontally) (switch-to-buffer (get-buffer-create "foo")) (setq bidi-display-reordering nil) (setq-local auto-hscroll-mode 'current-line) (dotimes (i 80) (insert (char-to-string (+ 65 i))))) - `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 - Deal with left/right overwritten glyphs in the w32 and X ports of Emacs. - 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. - Is there any additional meaningful optimization that can be added to the three calls of `mc_pre_scroll_clean'? - 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.] - 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. --Multipart_Mon_Jul_22_23:01:18_2019-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2019_07_22__21_18_46_990.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi43ODI3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SAxIChtYy9udW0tY3Vyc29ycykpIDs7 IG5vIGZha2UgY3Vyc29ycz8gZGlzYWJsZSBtYy1tb2RlCisgICAgICAgICAgKG11bHRpcGxlLWN1 cnNvcnMtbW9kZSAwKQorICAgICAgICAod2hlbiB0aGlzLW9yaWdpbmFsLWNvbW1hbmQKKyAgICAg ICAgICAobGV0ICgob3JpZ2luYWwtY29tbWFuZCAob3IgbWMtLXRoaXMtY29tbWFuZAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29tbWFuZC1yZW1hcHBpbmcgdGhpcy1v cmlnaW5hbC1jb21tYW5kKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 aGlzLW9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgIDs7IHNraXAga2V5Ym9hcmQgbWFj cm9zLCBzaW5jZSB0aGV5IHdpbGwgZ2VuZXJhdGUgYWN0dWFsIGNvbW1hbmRzIHRoYXQgYXJlCisg ICAgICAgICAgICA7OyBhbHNvIHJ1biBpbiB0aGUgY29tbWFuZCBsb29wIC0gd2UnbGwgaGFuZGxl IHRob3NlIGxhdGVyIGluc3RlYWQuCisgICAgICAgICAgICAod2hlbiAoZnVuY3Rpb25wIG9yaWdp bmFsLWNvbW1hbmQpCisgICAgICAgICAgICAgIDs7IGlmIGl0J3MgYSBsYW1iZGEsIHdlIGNhbid0 IGtub3cgaWYgaXQncyBzdXBwb3J0ZWQgb3Igbm90CisgICAgICAgICAgICAgIDs7IC0gc28gZ28g YWhlYWQgYW5kIGFzc3VtZSBpdCdzIG9rLCBiZWNhdXNlIHdlJ3JlIGp1c3Qgb3B0aW1pc3RpYyBs aWtlIHRoYXQKKyAgICAgICAgICAgICAgKGlmIChvciAobm90IChzeW1ib2xwIG9yaWdpbmFsLWNv bW1hbmQpKQorICAgICAgICAgICAgICAgICAgICAgIDs7IGxhbWJkYSByZWdpc3RlcmVkIGJ5IHNt YXJ0cmVwCisgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1wcmVmaXgtcCAiKCIgKHN5bWJv bC1uYW1lIG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgIChtYy9leGVjdXRl LWNvbW1hbmQtZm9yLWFsbC1mYWtlLWN1cnNvcnMgb3JpZ2luYWwtY29tbWFuZCkKKyAgICAgICAg ICAgICAgICA7OyBzbWFydHJlcCBgaW50ZXJuJ3MgY29tbWFuZHMgaW50byBvd24gb2JhcnJheSB0 byBoZWxwCisgICAgICAgICAgICAgICAgOzsgYGRlc2NyaWJlLWJpbmRpbmdzJy4gIFNvLCBsZXQn cyByZS1gaW50ZXJuJyBoZXJlIHRvCisgICAgICAgICAgICAgICAgOzsgbWFrZSB0aGUgY29tbWFu ZCBjb21wYXJhYmxlIGJ5IGBlcScuCisgICAgICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29t bWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAg ICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBzeW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9y b3VnaAorICAgICAgICAgICAgICAgIChpZiAoZ2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1 cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAgICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0 ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4g KGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg KG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1j L2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMv YWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2Nt ZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMv cHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29y cyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAgICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQt aW4tY3Vyc29ycworICAgICAgICAgICAgICAgIChzZXRxIG1jLWNvbmYKKyAgICAgICAgICAgICAg ICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoeCkg KGxpc3QgKG92ZXJsYXktc3RhcnQgeCkgImJhciIgbmlsKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgKG1jL2FsbC1mYWtlLWN1cnNvcnMpKSkpKSkpKSkpCisKKyAgKGRlZnVuIG1jL21hcmst bmV4dC1saWtlLXRoaXMtY3ljbGUtZm9yd2FyZCAoKQorICAiTWFya3MgbmV4dCBvY2N1cmVuY2Ug b2Ygd29yZC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HRlc3QhIikKKyAgICAgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIg Im1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAg ICAgICAgICAgICAgICAgICAgICgzICJib3giICIjMDBGRjAwIikKKyAgICAgICAgICAgICAgICAg ICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgKDUgKCJo YmFyIiAzKSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg2ICgiYmFyIiAz KSBbMC4wIDEuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg3ICJmcmFtZWQiICJPcmFu Z2VSZWQiKQorICAgICAgICAgICAgICAgICAgICAgICg4ICJib3giICJncmV5MjUiKQorICAgICAg ICAgICAgICAgICAgICAgICg5ICJib3giICJncmV5NzUiKSkpKQorICAgIChzZWxlY3Qtd2luZG93 IChkaXNwbGF5LWJ1ZmZlciBidWZmZXIpKSkpCisKKyhkZWZ1biArLXRpbWVyLWZuICgpCisiU2lu Y2UgdGhpcyBmaXJlcyBnbG9iYWxseSwgd2UgbXVzdCBjb250cm9sIHdoaWNoIGJ1ZmZlcnMgY3Jv c3NoYWlycyBhcHBlYXIgaW4uIgorICAod2hlbiArLW1vZGUKKyAgICAodW5sZXNzIChvciAobWVt cSBsYXN0LWNvbW1hbmQgKy1wYXJlbnMtZXhjbHVzaW9ucykKKyAgICAgICAgICAgICAgICAobnVs bCArLXBhcmVucy1wKSkKKyAgICAgICgrLXBhcmVucy1mbikpCisgICAgKHdoZW4gKy10aW1lci12 YXIKKyAgICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVscSArLXRpbWVyLXZhciB0aW1lci1p ZGxlLWxpc3QpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgbmlsKSkpKQorCisoZGVmdW4gKy1k cmF3LWZvcnRod2l0aCAoKQorIkltbWVkaWF0ZWx5IGRlbGV0ZS9kcmF3IG1hdGNoaW5nIHBhcmVu dGhlc2VzLiIKKyAgKCstZHJhdy1jcm9zc2hhaXJzICdmb3JjZSkpCisKKyhkZWZ1biArLWRyYXct Y3Jvc3NoYWlycyAoJm9wdGlvbmFsIGZvcmNlKQorIkltbWVkaWF0ZWx5IGRlbGV0ZSBtYXRjaGlu ZyBwYXJlbnRoZXNlcy4gIElmIEZPUkNFIGlzIG5vbi1uaWwsIHRoZW4gaW1tZWRpYXRlbHkKK2Ry YXcgbWF0Y2hpbmcgcGFyZW50aGVzaXM7IG90aGVyd2lzZSwgZHJhdyB0aGVtIG9uIGFuIGlkbGUt dGllci4iCisgICh3aGVuICstbW9kZQorICAgICh3aGVuICstdGltZXItdmFyCisgICAgICAoc2V0 cSB0aW1lci1pZGxlLWxpc3QgKGRlbHEgKy10aW1lci12YXIgdGltZXItaWRsZS1saXN0KSkKKyAg ICAgIChzZXRxICstdGltZXItdmFyIG5pbCkpCisgICAgKHVubGVzcyAob3IgKG1lbXEgdGhpcy1j b21tYW5kICstcGFyZW5zLWV4Y2x1c2lvbnMpCisgICAgICAgICAgICAgICAgKGFuZCAobnVsbCAr LXBhcmVucy1wKQorICAgICAgICAgICAgICAgICAgICAgKG51bGwgKy1wYXJlbnMtb3ZlcmxheXMt ZXhpc3QtcCkpKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZv cmNlCisgICAgICAocHJvZ24KKyAgICAgICAgKHdoZW4gKy1wYXJlbnMtcAorICAgICAgICAgICgr LXBhcmVucy1mbikpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGlt ZXIgKy1pZGxlLXRpbWVyLXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKyhkZWZ2YXIg ZmMtbW9kZSkKKworOzs7IyMjYXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJN aW5vciBtb2RlIGZvciBkaXNwbGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZh bHVlIG5pbAorICA6bGlnaHRlciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisg IDpncm91cCAnKy1tb2RlCisgIChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUn IGhhcyB0aGUgYWJpbGl0eSB0byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3Iu CisgICAgICA7OzsgU2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hl biBmYy1tb2RlCisgICAgICAgIChmYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFs LWVsZG9jLW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2Fu eSkKKyAgICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAg ICAgICAgKGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2st Y29udGV4dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAn YW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQor ICAgICAgICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAg KGNhbmNlbC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEg aml0LWxvY2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAn aml0LWxvY2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4 dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAn YW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQor ICAgICAgICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQor ICAgICAgICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIp KQorICAgICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAg ICAgKGxhbWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1i dWZmZXJzIChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFs Z2FtYXRlICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAgICAgICAg KGJsaW5rLWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmstY3Vyc29y LWNoZWNrIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAncG9zdC1j b21tYW5kLWhvb2sgJ2JsaW5rLWN1cnNvci1jaGVjaykpKQorICAgICAgKHNldHEgY3Jvc3NoYWly cyB0KQorICAgICAgKHdoZW4gKy1maWxsLWNvbHVtbgorICAgICAgICAoc2V0cSBmYy12aXNpYmxl IHQpKQorICAgICAgOzs7IGBhdXRvLWNvbXBvc2l0aW9uLW1vZGUnIGlzIG5lZWRlZCBmb3IgY3Jv c3NoYWlycyB0byBwcm9wZXJseSBjYWxjdWxhdGUKKyAgICAgIDs7OyBjb29yZGluYXRlcyBvZiBj b21wb3NpdGlvbiBjaGFyYWN0ZXJzLiAgQXV0b21hdGljYWxseSBiZWNvbWVzIHBlcm1hbmVudGx5 C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ZG93cworICAgICAgICAgICAgICAgICAgICAg d29yZC13cmFwKSkKKyAgICAgICAgKHdoZW4gKGxvY2FsLXZhcmlhYmxlLXAgdmFyKQorICAgICAg ICAgIChwdXNoIChjb25zIHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICstLXNhdmVkLXN0YXRlKSkp CisgICAgICAoc2V0cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgIChzZXRxIGRpc3BsYXktbGluZS1u dW1iZXJzIHQpCisgICAgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1s aW5lKQorICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAoc2V0cSBidWZm ZXItZGlzcGxheS10YWJsZSArLWJ1ZmZlci1kaXNwbGF5LXRhYmxlKQorICAgICAgKHNldHEgdGFi LXdpZHRoIDQpCisgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlz dWFsKSB0KQorICAgICAgKHNldHEgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgKGNvbmQKKyAgICAg ICAgICAoKGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisgICAgICAg ICAgICAgICAgICBtb2RlKQorICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAg ICAod2hpbGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAgICAgKHdoZW4gKGRl cml2ZWQtbW9kZS1wIG1vZGUpCisgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkp KSkKKyAgICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVuY2F0ZS1saW5lcy1tYWpvci1t b2RlcykpCisgICAgICAgICAgICh0CisgICAgICAgICAgICAgbmlsKSkpCisgICAgICAoc2V0ICht YWtlLWxvY2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkK KyAgICAgIChzZXRxIHdvcmQtd3JhcCB0KQorICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGlu ZXMgdCkKKyAgICAgIChzZXRxIGluZGljYXRlLWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAg ICAgKHNldHEgZnJpbmdlLWluZGljYXRvci1hbGlzdAorICAgICAgICAgIDs7OyBoc2NsX2FsbF90 ZW1wX3AgfCBoc2NsX3RlbXBfcAorICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1h bmdsZS1sZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLWxlZnQp KQorICAgICAgICAgIDs7OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxsX3Blcm1fMV9wIHwg aHNjbF9hbGxfcGVybV8yX3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICgrLWhzY2wtcGVybSAu ICgrLXNpbmdsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1h bmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLXRyaXBsZS1hbmdsZS11cAorICAg ICAgICAgICAgICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAg KCstb3ZlcmxheS1hcnJvdyAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAgKHRydW5jYXRp b24gLiAoKy1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICstZnJp bmdlLXJpZ2h0LWFycm93KSkKKyAgICAgICAgICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxl ZnQtY3VybHktYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNoKSkK KyAgICAgICAgICAob3ZlcmxheS1hcnJvdyAuICstZnJpbmdlLXJpZ2h0LXRyaWFuZ2xlKQorICAg ICAgICAgICh1cCAuICstZnJpbmdlLXVwLWFycm93KQorICAgICAgICAgIChkb3duIC4gKy1mcmlu Z2UtZG93bi1hcnJvdykKKyAgICAgICAgICAodG9wIC4gKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUp CisgICAgICAgICAgKGJvdHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAg ICAgICAodG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQKKyAgICAgICAgICAgICAg ICAgICAgICAgICArLWZyaW5nZS1yaWdodC1icmFja2V0CisgICAgICAgICAgICAgICAgICAgICAg ICAgKy1mcmluZ2UtdG9wLXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgKy1m cmluZ2UtdG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgIChlbXB0eS1saW5lIC4gKy1mcmluZ2Ut ZW1wdHktbGluZSkKKyAgICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmsp KSkKKyAgICAgIChzZXRxIGZyaW5nZS1jdXJzb3ItYWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVm dC10cmlhbmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaG9sbG93IC4g Ky1ob2xsb3ctcmVjdGFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChi YXIgLiArLXZlcnRpY2FsLWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo aGJhciAuICstZnJpbmdlLWhvcml6b250YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChob2xsb3ctc21hbGwgLiArLWZyaW5nZS1ob2xsb3ctc3F1YXJlKSkpCisgICAg ICAoaWYgKG9yICstZm9ydGh3aXRoCisgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZp eC1hcmcgJyg0KSkpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJh dy1mb3J0aHdpdGggJ2FwcGVuZCAnbG9jYWwpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21t YW5kLWhvb2sgJystZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICh3aGVu ICstZm9ydGh3aXRoCisgICAgICAgIChhZGQtaG9vayAnd2luZG93LWNvbmZpZ3VyYXRpb24tY2hh bmdlLWhvb2sgJystZHJhdy1mb3J0aHdpdGggbmlsICdsb2NhbCkpCisgICAgICAoYWRkLWhvb2sg J2NoYW5nZS1tYWpvci1tb2RlLWhvb2sgJ3R1cm4tb2ZmLSstbW9kZSBuaWwgJ2xvY2FsKQorICAg ICAgOzs7IE1hdGNoaW5nIHBhcmVudGhlc2VzIGRyYXdpbmcgZm9ydGh3aXRoIGludGVyZmVyZXMg d2l0aCB5YXNuaXBwZXQuCisgICAgICAod2hlbiArLWZvcnRod2l0aAorICAgICAgICAoc2V0cSAr LXBhcmVucy1wIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55 KQorICAgICAgICAoY29uZAorICAgICAgICAgICgrLWZvcnRod2l0aAorICAgICAgICAgICAgKG1l c3NhZ2UgIlR1cm5lZCBPTiBgKy1tb2RlJyAtLSBEcmF3IG1hdGNoaW5nIHBhcmVudGhlc2VzIGlt bWVkaWF0ZWx5LiIpKQorICAgICAgICAgICgoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkp CisgICAgICAgICAgICA7OzsgTWF0Y2hpbmcgcGFyZW50aGVzZXMgd2lsbCBiZSBkcmF3biBpbW1l ZGlhdGVseS4KKyAgICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScgLS0gT3B0 aW1pemVkIGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMuIikpCisgICAgICAgICAgKHQKKyAgICAgICAg ICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScuIikpKSkpCisgICAgKHQKKyAgICAgIChr aWxsLWxvY2FsLXZhcmlhYmxlICdmaWxsLWNvbHVtbikKKyAgICAgIChraWxsLWxvY2FsLXZhcmlh YmxlICdhdXRvLWhzY3JvbGwtbW9kZSkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdoc2Ny b2xsLXN0ZXApCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnY3Jvc3NoYWlycykKKyAgICAg IChraWxsLWxvY2FsLXZhcmlhYmxlICdmYy12aXNpYmxlKQorICAgICAgKGtpbGwtbG9jYWwtdmFy aWFibGUgJ2Rpc3BsYXktbGluZS1udW1iZXJzKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J2Rpc3BsYXktbGluZS1udW1iZXJzLXdpZHRoKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J21jLWNvbmYpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnYnVmZmVyLWRpc3BsYXktdGFi bGUpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAndGFiLXdpZHRoKQorICAgICAgKGtpbGwt bG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpCisgICAgICAoa2lsbC1sb2NhbC12YXJp YWJsZSAndHJ1bmNhdGUtbGluZXMpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAndHJ1bmNh dGUtcGFydGlhbC13aWR0aC13aW5kb3dzKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ3dv cmQtd3JhcCkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdpbmRpY2F0ZS1lbXB0eS1saW5l cykKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdpbmRpY2F0ZS1idWZmZXItYm91bmRhcmll cykKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdmcmluZ2UtaW5kaWNhdG9yLWFsaXN0KQor ICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ2ZyaW5nZS1jdXJzb3ItYWxpc3QpCisgICAgICAo a2lsbC1sb2NhbC12YXJpYWJsZSAnKy1mb3J0aHdpdGgpCisgICAgICAoZG9saXN0IChzYXZlZCAr LS1zYXZlZC1zdGF0ZSkKKyAgICAgICAgKHNldCAobWFrZS1sb2NhbC12YXJpYWJsZSAoY2FyIHNh dmVkKSkgKGNkciBzYXZlZCkpKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJystLXNhdmVk LXN0YXRlKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykKKyAgICAgICh3aGVuICht ZW1xICcrLWRyYXctZm9ydGh3aXRoIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAocmVtb3Zl LWhvb2sgJ3Bvc3QtY29tbWFuZC1ob29rICcrLWRyYXctZm9ydGh3aXRoICdsb2NhbCkpCisgICAg ICAod2hlbiAobWVtcSAnKy1kcmF3LWNyb3NzaGFpcnMgcG9zdC1jb21tYW5kLWhvb2spCisgICAg ICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1jcm9zc2hhaXJzICds b2NhbCkpCisgICAgICAod2hlbiAobWVtcSAnKy1kcmF3LWZvcnRod2l0aCB3aW5kb3ctY29uZmln dXJhdGlvbi1jaGFuZ2UtaG9vaykKKyAgICAgICAgKHJlbW92ZS1ob29rICd3aW5kb3ctY29uZmln dXJhdGlvbi1jaGFuZ2UtaG9vayAnKy1kcmF3LWZvcnRod2l0aCAnbG9jYWwpKQorICAgICAgKHJl bW92ZS1ob29rICdjaGFuZ2UtbWFqb3ItbW9kZS1ob29rICd0dXJuLW9mZi0rLW1vZGUgJ2xvY2Fs KQorICAgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgICAgKHNldHEgdGltZXItaWRsZS1saXN0 IChkZWxxICstdGltZXItdmFyIHRpbWVyLWlkbGUtbGlzdCkpCisgICAgICAgIChzZXRxICstdGlt ZXItdmFyIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQor ICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9GRiBgKy1tb2RlJy4iKSkpKSkKKworKGRlZnVuIHR1 cm4tb2ZmLSstbW9kZSAoKQorICAoKy1tb2RlIC0xKSkKKworOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7CisKKyhkZWZ1biArLXBhcmVucy1mbiAoKQorICAiRG9jLXN0cmluZy4iCisgIChsZXQqICgo b3BvaW50IChwb2ludCkpCisgICAgICAgICAoZnJvbSAoaWYgKy1wYXJlbnMtZnJvbS1mbgorICAg ICAgICAgICAgICAgICAoZnVuY2FsbCArLXBhcmVucy1mcm9tLWZuKQorICAgICAgICAgICAgICAg ICAocG9pbnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxlY3RlZC13aW5kb3cpKQorICAgICAg ICAgKGkgMCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAocHJlY2VkaW5nLWNoYXIpKQorICAg ICAgICAgKG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisgICAgICAgICAocG9zMQorICAgICAg ICAgICAoY29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFyCisgICAgICAgICAgICAgICAgICAg KG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5pbmcgcGFyZW50aGVzaXMKKyAgICAg ICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAgICAgICAgICAgICAgICAgICAgIDs7 OyAoY2hhci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1YXJlIGJyYWNrZXQKKyAgICAgICAg ICAgICAgICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAgICAgICAgICAgICAgICAgIDs7OyAo Y2hhci10by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkgYnJhY2tldAorICAgICAgICAgICAg ICAgICAgICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAgICAgICAgICAobWluICgxKyBvcG9p bnQpIChwb2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9yIDs7OyAoY2hhci10by1zdHJpbmcg NDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGlu Zy1jaGFyIDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyA5MykgPT4g Y2xvc2luZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAgICAgICAgKD0gcHJlY2VkaW5nLWNo YXIgOTMpCisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyNSkgPT4gY2xv c2luZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDEy NSkpCisgICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWluKSAoMS0gb3BvaW50KSkpCisgICAg ICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQpKSkKKyAgICAgICAgIHBvczIKKyAg ICAgICAgIHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAoY29uZGl0 aW9uLWNhc2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBwb3MxIChudGggMSAocGFyc2UtcGFy dGlhbC1zZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChzZXRxIHBvczIgKHNjYW4tc2V4cHMg cG9zMSAxKSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAgICAgICAgICAgIChzZXRxIGkgMSkK KyAgICAgICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAgICAgICAoc2V0cSBzZWxlY3RlZC1m YWNlIChjb25kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLW9uZS1mYWNlKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtdGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkg NCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtZm91ci1mYWNl KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA1KQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZlLWZhY2UpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoKD0gaSA3KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1z ZXZlbi1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA4KQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1laWdodC1mYWNlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2UpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICcrLXBhcmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChsZXQgKChvdiAobWFrZS1vdmVybGF5 IHBvczEgKDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZl LXdpbmRvd3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAg ICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxlY3RlZC1mYWNlKSkKKyAgICAgICAg ICAod2hlbiBwb3MyCisgICAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSAoMS0gcG9z MikgcG9zMikpKQorICAgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRv d3MKKyAgICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ3dpbmRvdyB3aW4pKQorICAgICAg ICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpKSkKKyAgICAgICAg KGVycm9yIG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAgdCkpKQor CisoZGVmdW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQgbmFtZSB2YWwpCisiUmVtb3ZlIHRo ZSBvdmVybGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXNgLgorSW5jbHVk ZXMgYSB1bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3ZlcmxheSB3aXRoIGFuIGAnYWZ0ZXItc3Ry aW5nYCBwcm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9mIGEgbmFycm93ZWQtYnVmZmVyLiIK KyAgKGxldCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisgICAgICAgICAocG9pbnQtbWluIChw b2ludC1taW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1ZmZlci1uYXJyb3dlZC1wKSkKKyAg ICAgICAgIChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkKKyAgICAgICAgIChlbmQKKyAgICAg ICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5h cnJvd2VkLXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAgIGVuZCkKKyAg ICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAg ICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICBwb2ludC1tYXgpCisgICAg ICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAg ICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBvaW50LW1heCkpCisgICAgICAgICAg ICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQt cAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKD0gZW5kIHBvaW50LW1h eCkpCisgICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAg ICAgICAgICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAg ICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAgICAgIChvdmVybGF5cworICAgICAg ICAgICAocHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1yZWNlbnRlciBlbmQpCisgICAgICAg ICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAgKHdoZW4gKGFuZCBiZWcgZW5kIG5h bWUgdmFsKQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykKKyAgICAgICAgKGNvbmQKKyAgICAg ICAgICAoKGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAgICAgICAgICAoZXEgKG92ZXJsYXkt Z2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVpdGhlciBwdXNoIHRoaXMgb3Zlcmxh eSBvdXRzaWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsgb3Igc3BsaXQgaXQgdG8gZXhjbHVk ZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0ZSBpdCBlbnRpcmVseSAoaWYgaXQg aXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAgICAgICAoaWYgKDwgKG92ZXJsYXkt c3RhcnQgbykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5k KQorICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IChj b3B5LW92ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChvdmVybGF5LXN0YXJ0IG8pIGJlZykK KyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkpCisg ICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92ZXJsYXktc3RhcnQgbykgYmVnKSkK KyAgICAgICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBvKSBlbmQpCisgICAgICAgICAgICAg ICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkKKyAgICAgICAgICAgICAg ICAoZGVsZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAoKGFuZCAobm90IChlcSBuYW1lICdm YWNlKSkKKyAgICAgICAgICAgICAgICAoZXF1YWwtaW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GFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVy CisgICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAg ICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVu ICh0aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVy IGppdC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250 ZXh0LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250 ZXh0LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkp CisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAg ICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVu ICh0aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNh bmNlbC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChm c2V0ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgp IChhZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJl bnQtYnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9y ZSkpCisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29y LW1vZGUgLTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGlu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2UgKy1iYXItcG9zdC16di1mYWNlCisgICcoKHQgKDpmb3Jl Z3JvdW5kICJtYWdlbnRhNCIpKSkKKyAgIkZhY2UgZm9yIGArLWJhci1wb3N0LXp2LWZhY2UnLiIK KyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcmV2ZXJzZWQtYmFyLXByZS16di1mYWNl CisgICcoKHQgKDpmb3JlZ3JvdW5kICJjeWFuMSIpKSkKKyAgIkZhY2UgZm9yIGArLXJldmVyc2Vk LWJhci1wcmUtenYtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1yZXZl cnNlZC1iYXItYXQtenYtZmFjZQorICAnKCh0ICg6Zm9yZWdyb3VuZCAiY2hhcnRyZXVzZSIpKSkK KyAgIkZhY2UgZm9yIGArLXJldmVyc2VkLWJhci1hdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1t b2RlKQorCisoZGVmZmFjZSArLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UKKyAgJygodCAoOmZv cmVncm91bmQgImN5YW40IikpKQorICAiRmFjZSBmb3IgYCstcmV2ZXJzZWQtYmFyLXBvc3QtenYt ZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1ldmVuLXByZS16di1mYWNl CisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkK KyAgICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29s b3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJjeWFuMSIpCisg ICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAg ICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3Jz IDE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yAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZm YWNlICstZXZlbi1hdC16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4 KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgIkRlZXBQaW5rMSIpCisgICAg KCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAg IDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9y cyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQor ICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQor ICAgICA6Zm9yZWdyb3VuZCAiRGVlcFBpbmsxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1j b2xvcnMgOCkpCisgICAgIDpmb3JlZ3JvdW5kICJ3aGl0ZSIpCisgICAgKCgodHlwZSB0dHkpIChj bGFzcyBtb25vKSkKKyAgICAgOmludmVyc2UtdmlkZW8gdCkKKyAgICAodCA6Zm9yZWdyb3VuZCAi cGluayIpKQorICAiRmFjZSBmb3IgYCstZXZlbi1hdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1t b2RlKQorCisoZGVmZmFjZSArLWV2ZW4taW5hY3RpdmUtYXQtenYtZmFjZQorICAnKCgoKGNsYXNz IGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3Jv dW5kICJEZWVwUGluazQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJh Y2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAiRGVlcFBpbms0IikKKyAgICAoKChj bGFzcyBjb2xvcikgKG1pb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kgKGNsYXNzIG1v bm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0IDpmb3JlZ3JvdW5kICJwaW5rIikp CisgICJGYWNlIGZvciBgKy1ldmVuLXBvc3QtenYtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkK KworKGRlZmZhY2UgKy1ldmVuLWluYWN0aXZlLXBvc3QtenYtZmFjZQorICAnKCgoKGNsYXNzIGNv bG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5k ICJEYXJrT2xpdmVHcmVlbjQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkg KGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAiUm95YWxCbHVlIikKKyAgICAo KChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgMTYpIChiYWNrZ3JvdW5kIGRhcmspKQorICAgICA6 Zm9yZWdyb3VuZCAiRGFya09saXZlR3JlZW40IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1j b2xvcnMgMTYpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgIlJveWFsQmx1 ZSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3Vu ZCAid2hpdGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNl LXZpZGVvIHQpCisgICAgKHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2 ZW4taW5hY3RpdmUtcG9zdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFj ZSArLW9kZC1wcmUtenYtZmFjZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkg KGJhY2tncm91bmQgZGFyaykpCisgICAgID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b3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTEi KQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQp KQorICAgICA6Zm9yZWdyb3VuZCAiRGFya1NhbG1vbiIpCisgICAgKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAgICgoKHR5cGUgdHR5 KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAgKHQgOmZvcmVncm91 bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLW9kZC1wb3N0LXp2LWZhY2UnLiIKKyAgOmdyb3Vw ICcrLW1vZGUpCisKKyhkZWZmYWNlICstb2RkLWluYWN0aXZlLXBvc3QtenYtZmFjZQorICAnKCgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpm b3JlZ3JvdW5kICJzaWVubmE0IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgp IChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTQiKQorICAgICgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpm b3JlZ3JvdW5kICJzaWVubmE0IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgMTYp IChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTQiKQorICAgICgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikK KyAgICAoKCh0eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52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MgY29sb3IpIChtaW4t Y29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgIlBhbGVHcmVl bjQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGln aHQpKQorICAgICA6Zm9yZWdyb3VuZCAiRGFya09saXZlR3JlZW4iKQorICAgICgoKGNsYXNzIGNv bG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAgICAoKCh0 eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0IDpm b3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1wb3N0LWZpbGwtaW5hY3RpdmUtcG9z dC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSBmYy1wcmUtenYtZmFj ZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykp CisgICAgIDpmb3JlZ3JvdW5kICJncmV5MTUiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNv bG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAiZ3JleTE1IikK KyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgMTYpIChiYWNrZ3JvdW5kIGRhcmspKQor ICAgICA6Zm9yZWdyb3VuZCAiZ3JleTE1IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xv cnMgMTYpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgImdyZXkxNSIpCisg ICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hp dGUiKQorICAgICgoKHR5cGUgdHR5KSAo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BiLT5tY19jb25mXyA9IHZh bDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfbWNfaW5hY3RpdmVfd2luZG93cyAoc3RydWN0IGJ1 ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5tY19pbmFjdGl2ZV93aW5kb3dzXyA9 IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfY3Jvc3NoYWlycyAoc3RydWN0IGJ1ZmZlciAq YiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5jcm9zc2hhaXJzXyA9IHZhbDsKK30KKworc3Rh dGljIHZvaWQKK2JzZXRfY2hfaG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlz cF9PYmplY3QgdmFsKQoreworICBiLT5jaF9ob3Jpem9udGFsX3J1bGVyXyA9IHZhbDsKK30KKwor c3RhdGljIHZvaWQKK2JzZXRfY2hfdmVydGljYWxfcnVsZXIgKHN0cnVjdCBidWZmZXIgKmIsIExp c3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+Y2hfdmVydGljYWxfcnVsZXJfID0gdmFsOworfQorCitz dGF0aWMgdm9pZAorYnNldF9jaF9pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBM aXNwX09iamVjdCB2YWwpCit7CisgIGItPmNoX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQor CitzdGF0aWMgdm9pZAorYnNldF9mY192aXNpYmxlIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09i amVjdCB2YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAor YnNldF9mY19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2 YWwpCit7CisgIGItPmZjX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiBlbmQgTVVM VElQTEUtQ1VSU09SUyAqLworLy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wgaWR4KTsg KytpZHg7CisgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBjaF9pbmFj dGl2ZV93aW5kb3dzKSwgaWR4KTsgKytpZHg7CisgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVmZmVy X2xvY2FsX2ZsYWdzLCBmY192aXNpYmxlKSwgaWR4KTsgKytpZHg7CisgIFhTRVRGQVNUSU5UIChC VkFSICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBmY19pbmFjdGl2ZV93aW5kb3dzKSwgaWR4KTsgKytp ZHg7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgWFNFVEZBU1RJTlQgKEJWQVIg KCZidWZmZXJfbG9jYWxfZmxhZ3MsIG1vZGVfbGluZV9mb3JtYXQpLCBpZHgpOyArK2lkeDsKICAg WFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIGFiYnJldl9tb2RlKSwgaWR4 KTsgKytpZHg7CiAgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBvdmVy d3JpdGVfbW9kZSksIGlkeCk7ICsraWR4OwpAQCAtNTIzMSw2ICs1MzEyLDI0IEBAIGluaXRfYnVm ZmVyX29uY2UgKHZvaWQpCiAgIC8qIE11c3QgZG8gdGhlc2UgYmVmb3JlIG1ha2luZyB0aGUgZmly c3QgYnVmZmVyISAqLwogCiAgIC8qIHJlYWwgc2V0dXAgaXMgZG9uZSBpbiBiaW5kaW5ncy5lbCAq LworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CisgIGJzZXRfbWNfcmVhbF9mYWtlX2N1cnNvciAo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isKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIERFRlNZTSAoUW1j X3JlYWxfZmFrZV9jdXJzb3IsICJtYy1yZWFsLWZha2UtY3Vyc29yIik7CisgIERFRlZBUl9QRVJf QlVGRkVSICgibWMtcmVhbC1mYWtlLWN1cnNvciIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNf cmVhbF9mYWtlX2N1cnNvciksIFFuaWwsCisgICAgZG9jOiAvKiBBIGJ1ZmVyLWxvY2FsIHZhcmlh YmxlIHRvIHNldCB0aGUgY3Vyc29yIHR5cGUgb2YgdGhlIHJlYWwgZmFrZSBjdXJzb3IuICovKTsK KworICBERUZTWU0gKFFtY19jb25mLCAibWMtY29uZiIpOworICBERUZWQVJfUEVSX0JVRkZFUiAo Im1jLWNvbmYiLCAmQlZBUiAoY3VycmVudF9idWZmZXIsIG1jX2NvbmYpLCBRbmlsLAorICAgIGRv YzogLyogQSBidWZlci1sb2NhbCB2YXJpYWJsZSB0byBzdG9yZSB0aGUgdmFsdWUgb2YgdGhlIG11 bHRpcGxlIGN1cnNvcnMgdG8gYmUgZGlzcGxheWVkCitkdXJpbmcgdGhlIG5leHQgcmVkaXNwbGF5 LiAqLyk7CisKKyAgREVGU1lNIChRbWNfaW5hY3RpdmVfd2luZG93cywgIm1jLWluYWN0aXZlLXdp bmRvd3MiKTsKKyAgREVGVkFSX1BFUl9CVUZGRVIgKCJtYy1pbmFjdGl2ZS13aW5kb3dzIiwgJkJW QVIgKGN1cnJlbnRfYnVmZmVyLCBtY19pbmFjdGl2ZV93aW5kb3dzKSwgUW5pbCwKKyAgICBkb2M6 IC8qIFdoZW4gbm9uLW5pbCwgZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGluIGluYWN0aXZlIHdpbmRv d3MuICovKTsKKworICBERUZTWU0gKFFjcm9z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jL2J1ZmZlci5oCkBAIC03NDAsNiArNzQwLDQwIEBAIHN0 cnVjdCBidWZmZXIKICAgICAgaW4gdGhlIGRpc3BsYXkgb2YgdGhpcyBidWZmZXIuICAqLwogICBM aXNwX09iamVjdCBleHRyYV9saW5lX3NwYWNpbmdfOwogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIFRoZSBjdXJzb3IgdHlwZSBvZiB0 aGUgcmVhbCBmYWtlIGN1cnNvci4gKi8KKyAgTGlzcF9PYmplY3QgbWNfcmVhbF9mYWtlX2N1cnNv cl87CisKKyAgLyogVGhlIG5hbWUgb2YgbGlzdCB1c2VkIGJ5IG11bHRpcGxlIGN1cnNvcnMgZm9y IG5leHQgcmVkaXNwbGF5LiAqLworICBMaXNwX09iamVjdCBtY19jb25mXzsKKworICAvKiBXaGV0 aGVyIHRvIGRyYXcgbXVsdGlwbGUgY3Vyc29ycyBpbiBpbmFjdGl2ZSB3aW5kb3dzLiAqLworICBM aXNwX09iamVjdCBtY19pbmFjdGl2ZV93aW5kb3dzXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUg YnVmZmVyLWxvY2FsIHZhcmlhYmxlLiAqLworICBMaXNwX09iamVjdCBjcm9zc2hhaXJzXzsKKwor ICAvKiBUaGUgbmFtZSBvZiB0aGUgY3Jvc3NoYWlycyBob3Jpem9udGFsIHJ1bGVyLiAqLworICBM aXNwX09iamVjdCBjaF9ob3Jpem9udGFsX3J1bGVyXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUg Y3Jvc3NoYWlycyB2ZXJ0aWNhbCBydWxlci4gKi8KKyAgTGlzcF9PYmplY3QgY2hfdmVydGljYWxf cnVsZXJfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBjcm9zc2hhaXJzIGluIGluYWN0aXZlIHdp bmRvd3MuICovCisgIExpc3BfT2JqZWN0IGNoX2luYWN0aXZlX3dpbmRvd3NfOworCisgIC8qIFRo ZSBuYW1lIG9mIHRoZSBidWZmZXItbG9jYWwgdmFyaWFibGUuICovCisgIExpc3BfT2JqZWN0IGZj X3Zpc2libGVfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGZpbGwg Y29sdW1uIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IGZjX2luYWN0aXZl X3dpbmRvd3NfOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEN1cnNvciB0 eXBlIHRvIGRpc3BsYXkgaW4gbm9uLXNlbGVjdGVkIHdpbmRvd3MuCiAgICAgIHQgbWVhbnMgdG8g dXNlIGhvbGxvdyBib3ggY3Vyc29yLgogICAgICBTZWUgYGN1cnNvci10eXBlJyBmb3Igb3RoZXIg dmFsdWVzLiAgKi8KQEAgLTc5MSwxNCArODI1LDIxIEBAIHN0cnVjdCBidWZmZXIKICAgICAgYW4g aW5kaXJlY3QgYnVmZmVyIHNpbmNlIGl0IGNvdW50cyBhcyBpdHMgYmFzZSBidWZmZXIuICAqLwog ICBpbnQgd2luZG93X2NvdW50OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCiAgIC8qIEEgbm9uLXplcm8gdmFsdWUgaW4gc2xvdCBJRFggbWVh bnMgdGhhdCBwZXItYnVmZmVyIHZhcmlhYmxlCiAgICAgIHdpdGggaW5kZXggSURYIGhhcyBhIGxv Y2FsIHZhbHVlIGluIHRoaXMgYnVmZmVyLiAgVGhlIGluZGV4IElEWAogICAgICBmb3IgYSBidWZm ZXItbG9jYWwgdmFyaWFibGUgaXMgc3RvcmVkIGluIHRoYXQgdmFyaWFibGUncyBzbG90CiAgICAg IGluIGJ1ZmZlcl9sb2NhbF9mbGFncyBhcyBhIExpc3AgaW50ZWdlci4gIElmIHRoZSBpbmRleCBp cyAtMSwKICAgICAgdGhpcyBtZWFucyB0aGUgdmFyaWFibGUgaXMgYWx3YXlzIGxvY2FsIGluIGFs bCBidWZmZXJzLiAgKi8KLSNkZWZpbmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA1MAorI2RlZmluZSBN QVhfUEVSX0JVRkZFUl9WQVJTIDYwCiAgIGNoYXIgbG9jYWxfZmxhZ3NbTUFYX1BFUl9CVUZGRVJf VkFSU107CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogU2V0IHRvIHRoZSBt b2R0aW1lIG9mIHRoZSB2aXNpdGVkIGZpbGUgd2hlbiByZWFkIG9yIHdyaXR0ZW4uCiAgICAgIG1v ZHRpbWUudHZfbnNlYyA9PSBOT05FWElTVEVOVF9NT0RUSU1FX05TRUNTIG1lYW5zCiAgICAgIHZp c2l0ZWQgZmlsZSB3YXMgbm9uZXhpc3RlbnQuICBtb2R0aW1lLnR2X25zZWMgPT0KQEAgLTkwNyw2 ICs5NDgsNjkgQEAgWEJVRkZFUiAoTGlzcF9PYmplY3QgYSkKIC8qIE1vc3QgY29kZSBzaG91bGQg dXNlIHRoZXNlIGZ1bmN0aW9ucyB0byBzZXQgTGlzcCBmaWVsZHMgaW4gc3RydWN0CiAgICBidWZm ZXIuICAoU29tZSBzZXR0ZXJzIHRoYXQgYXJlIHByaXZhdGUgdG8gYSBzaW5nbGUgLmMgZmlsZSBh cmUKICAgIGRlZmluZWQgYXMgc3RhdGljIGluIHRob3NlIGZpbGVzLikgICovCisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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KyAgYi0+Y2hfaW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lO TElORSB2b2lkCitic2V0X2Jsdl9mY192aXNpYmxlIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09i amVjdCB2YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAor YnNldF9ibHZfZmNfaW5hY3RpdmVfd2luZG93cyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmpl Y3QgdmFsKQoreworICBiLT5mY19pbmFjdGl2ZV93aW5kb3dzXyA9IHZhbDsKK30KKworLyogZW5k IE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIElOTElO RSB2b2lkCiBic2V0X2JpZGlfcGFyYWdyYXBoX2RpcmVjdGlvbiAoc3RydWN0IGJ1ZmZlciAqYiwg TGlzcF9PYmplY3QgdmFsKQogewpkaWZmIC0tZ2l0IGEvc3JjL2Rpc3BleHRlcm4uaCBiL3NyYy9k aXNwZXh0ZXJuLmgKaW5kZXggNGU5NDdkYS4uM2MxMTBlMiAxMDA2NDQKLS0tIGEvc3JjL2Rpc3Bl eHRlcm4uaAorKysgYi9zcmMvZGlzcGV4dGVybi5oCkBAIC0xNDUsNiArMTQ1LDEzMSBAQCB0eXBl ZGVmIHZvaWQgKkVtYWNzX0N1cnNvcjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2Vu ZGlmCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJT T1JTICovCisKK2V4dGVybiBib29sIHRyYWNlX3JlZGlzcGxheV9wIEVYVEVSTkFMTFlfVklTSUJM RTsKKworc3R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gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICosIGludCwgaW50KTsKKworZXh0 ZXJuIHZvaWQgbWNfeHdfY29sb3JfdmFsdWVzIChzdHJ1Y3Qgd2luZG93ICosIExpc3BfT2JqZWN0 LCBzdHJ1Y3QgbWNfUkdCICopOworCitleHRlcm4gYm9vbCBtY191cGRhdGVfd2luZG93X2ZyaW5n ZXMgKHN0cnVjdCB3aW5kb3cgKiwgYm9vbCk7CisKK2V4dGVybiBjaGFyICogbWNfd2luZG93IChz dHJ1Y3Qgd2luZG93ICopOworCitleHRlcm4gY2hhciAqIG1jX2NoYXJfdG9fc3RyaW5nIChpbnQp OworCitleHRlcm4gY2hhciAqIG1jX2N1cnNvcl90eXBlX3RvX3N0cmluZyAoZW51bSBtY19jdXJz b3JfdHlwZSk7CisKK2V4dGVybiBjaGFyICogbWNfZmxhdm9yX3RvX3N0cmluZyAoZW51bSBtY19m bGF2b3IpOworCitleHRlcm4gY2hhciAqIG1jX2NhY2hlX3R5cGVfdG9fc3RyaW5nIChlbnVtIG1j X2NhY2hlX3R5cGUpOworCitleHRlcm4gY2hhciAqIG1jX3JlZHJhd19yb3dfdHlwZV90b19zdHJp bmcgKGVudW0gbWNfcmVkcmF3X3Jvd190eXBlKTsKKworZXh0ZXJuIHZvaWQgbWNfY2FjaGVfaW5z cGVjdG9yIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBtY19tYXRyaXgpOworCitleHRlcm4gYm9v bCBtY190cmF2ZXJzZV9jYWNoZV9wIChzdHJ1Y3QgbWNfbWF0cml4LCBlbnVtIG1jX2NhY2hlX3R5 cGUsIGludCwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1 Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwgaW50LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlKTsKKworZXh0ZXJuIGludCBtY19n ZXRfZnJpbmdlX2JpdG1hcCAoc3RydWN0IHdpbmRvdyAqLCBMaXNwX09iamVjdCwgaW50LCBpbnQp OworCitleHRlcm4gdm9pZCBtY19lbmdpbmUgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBo X21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAgICAgIHN0 cnVjdCBnbHlwaCAqLCBpbnQsIGludCwgaW50LCBpbnQsIGludCwgaW50LAorICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlLCBpbnQsIHN0cnVjdCBnbHlwaF9tYXRyaXgg KiwKKyAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX2Vzc2VudGlhbHMsIGVudW0gbWNf cm93X3Bvc2l0aW9uLCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVt IG1jX2VuZ2luZV90eXBlLCBib29sLCBlbnVtIG1jX2RyYXdfcm93X3R5cGUsCisgICAgICAgICAg ICAgICAgICAgICAgIGVudW0gbWNfY2FjaGVfdHlwZSk7CisKK2V4dGVybiB2b2lkIG1jX3NldF9l c3NlbnRpYWxzIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBtY19lc3NlbnRpYWxzICopOworCitl eHRlcm4gdm9pZCBtY19kcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgZ2x5cGggKiwgaW50LCBpbnQsIGludCwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAg ICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3Np dGlvbiwgYm9vbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5 cGUpOworCitleHRlcm4gYm9vbCBtY19yZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICosIHN0cnVj dCBnbHlwaF9tYXRyaXggKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgZW51bSBnbHlwaF9yb3dfYXJlYSwgaW50LCBpbnQsIGludCwgYm9vbCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSwgZW51bSBtY19yZWRy YXdfcm93X3R5cGUpOworCitleHRlcm4gdm9pZCBtY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRv dyAqKTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cg Kiwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHN0cnVjdCBnbHlwaF9yb3cgKiwgZW51bSBkcmF3X2dseXBoc19mYWNlLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgaW50LCBpbnQsIHN0cnVjdCBtY19SR0IsIGVu dW0gbWNfZmxhdm9yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNf Y3Vyc29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCk7CisKK2V4dGVybiB2b2lkIG1jX2VyYXNlX2N1 cnNvciAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlw aF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50 LCBlbnVtIG1jX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19j dXJzb3JfdHlwZSwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHN0 cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICos CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50LCBp bnQsIGludCwgaW50LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19jdXJzb3JfdHlwZSwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGJvb2wsIGVudW0gbWNfZmxhdm9yLCBib29sKTsKKworZXh0ZXJuIGlu dCBtY19kcmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICos IHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgZW51 bSBnbHlwaF9yb3dfYXJlYSwgcHRyZGlmZl90LCBwdHJkaWZmX3QsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UsIGludCwgaW50LCBzdHJ1Y3QgbWNfUkdC LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19mbGF2b3IsIGVudW0gbWNfY3Vy c29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gZHJhd19nbHlwaF9hY3Rpb24sIGJvb2wpOworCitleHRlcm4gc3RydWN0IGdseXBoX21hdHJp eCAqIG1jX3NhdmVfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCitleHRl cm4gdm9pZCBtY19yZXN0b3JlX2dseXBoX21hdHJpeCAoc3RydWN0IGdseXBoX21hdHJpeCAqLCBz dHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogLyogVGV4dCBjdXJzb3IgdHlwZXMuICAqLwogCiBl bnVtIHRleHRfY3Vyc29yX2tpbmRzCkBAIC00MDQsNiArNTI5LDE4IEBAIHN0cnVjdCBnbHlwaF9z bGljZQogCiBzdHJ1Y3QgZ2x5cGgKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpbnQgcmVsYXRpdmVfeCwgaHBvczsKKworICBwdHJk aWZmX3QgYnl0ZXBvczsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBQb3Np dGlvbiBmcm9tIHdoaWNoIHRoaXMgZ2x5cGggd2FzIGRyYXduLiAgSWYgYG9iamVjdCcgYmVsb3cg aXMgYQogICAgICBMaXNwIHN0cmluZywgdGhpcyBpcyBhbiBpbmRleCBpbnRvIHRoYXQgc3RyaW5n LiAgSWYgaXQgaXMgYQogICAgICBidWZmZXIsIHRoaXMgaXMgYSBwb3NpdGlvbiBpbiB0aGF0IGJ1 ZmZlci4gIEluIGFkZGl0aW9uLCBzb21lCkBAIC0xMjcwLDYgKzE0MDcsMjggQEAgZW51bSBkcmF3 X2dseXBoc19mYWNlCiAKIHN0cnVjdCBnbHlwaF9zdHJpbmcKIHsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIGJvb2xfYmYgbGVmdF9v dmVyd3JpdHRlbl9wIDogMTsKKworICAgIGJvb2xfYmYgcmlnaHRfb3ZlcndyaXR0ZW5fcCA6IDE7 CisKKyAgICBib29sX2JmIHJlY3RhbmdsZV9udWtlZF9wIDogMTsKKworICAgIGJvb2xfYmYgYmFj a2dyb3VuZF9udWtlZF9wIDogMTsKKworICAgIGVudW0gZHJhd19nbHlwaF9hY3Rpb24KKyAgICB7 CisgICAgICBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAgICAgIE1DX0VSQVNFX0dMWVBIX1NUUklO RworICAgIH0gYWN0aW9uX3R5cGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg LyogWC1vcmlnaW4gb2YgdGhlIHN0cmluZy4gICovCiAgIGludCB4OwogCkBAIC0yODM0LDYgKzI5 OTMsMjggQEAgdHlwZWRlZiB2b2lkICgqZnJhbWVfcGFybV9oYW5kbGVyKSAoc3RydWN0IGZyYW1l ICosIExpc3BfT2JqZWN0LCBMaXNwX09iamVjdCk7CiAKIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJm YWNlCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgbnN0ZXJtLm1gIHwgYHczMnRlcm0u Y2AgfCBgeHRlcm0uY2AgbXVzdCBiZSBpbiB0aGUKK2V4YWN0IHNhbWUgb3JkZXIgYXMgdGhlIGBy ZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4dGVybi5oYCEgKi8KKworICAvKiBgbWNfbnNf ZHJhd193aW5kb3dfY3Vyc29yJyB8IGBtY193MzJfZHJhd193aW5kb3dfY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mIGQtPmVuYWJsZWRfcAorICAgICAgICAgICYmICFk LT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcAorICAgICAgICAgICYmIGMtPnkgPT0gZC0+eQorICAg ICAgICAgICYmIE1BVFJJWF9ST1dfQk9UVE9NX1kgKGMpIDw9IHliCisgICAgICAgICAgJiYgTUFU UklYX1JPV19CT1RUT01fWSAoZCkgPD0geWIKKyAgICAgICAgICAmJiByb3dfZXF1YWxfcCAoYywg ZCwgMSkpCisgICAgICAgIHsKKyAgICAgICAgICBhc3NpZ25fcm93IChjLCBkKTsKKyAgICAgICAg ICBkLT5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAg ICAgYnJlYWs7CisgICAgfQorI2lmZGVmIEhBVkVfWFdJREdFVFMKKyAgLyogQ3VycmVudGx5IHRo aXMgc2VlbXMgbmVlZGVkIHRvIGRldGVjdCB4d2lkZ2V0IG1vdmVtZW50IHJlbGlhYmx5LiAqLwor ICAgIHJldHVybiAwOworI2VuZGlmCisgIC8qIEdpdmUgdXAgaWYgc29tZSByb3dzIGluIHRoZSBk ZXNpcmVkIG1hdHJpeCBhcmUgbm90IGVuYWJsZWQuICovCisgIGlmICghIE1BVFJJWF9ST1dfRU5B QkxFRF9QIChkZXNpcmVkX21hdHJpeCwgaSkpCisgICAgcmV0dXJuIC0xOworICBmaXJzdF9vbGQg PSBmaXJzdF9uZXcgPSBpOworICAvKiBTZXQgbGFzdF9uZXcgdG8gdGhlIGluZGV4ICsgMSBvZiB0 aGUgcm93IHRoYXQgcmVhY2hlcyB0aGUKKyAgICAgYm90dG9tIGJvdW5kYXJ5IGluIHRoZSBkZXNp cmVkIG1hdHJpeC4gIEdpdmUgdXAgaWYgd2UgZmluZCBhCisgICAgIGRpc2FibGVkIHJvdyBiZWZv cmUgd2UgcmVhY2ggdGhlIGJvdHRvbSBib3VuZGFyeS4gKi8KKyAgaSA9IGZpcnN0X25ldyArIDE7 CisgIHdoaWxlIChpIDwgZGVzaXJlZF9tYXRyaXgtPm5yb3dzIC0gMSkKKyAgICB7CisgICAgICBp bnQgYm90dG9tOworICAgICAgaWYgKCEgTUFUUklYX1JPV19FTkFCTEVEX1AgKGRlc2lyZWRfbWF0 cml4LCBpKSkKKyAgICAgICAgcmV0dXJuIDA7CisgICAgICBib3R0b20gPSBNQVRSSVhfUk9XX0JP VFRPTV9ZIChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSkpOworICAgICAgaWYgKGJvdHRv bSA8PSB5YikKKyAgICAgICAgKytpOworICAgICAgaWYgKGJvdHRvbSA+PSB5YikKKyAgICAgICAg YnJlYWs7CisgICAgfQorICBsYXN0X25ldyA9IGk7CisgIC8qIFNldCBsYXN0X29sZCB0byB0aGUg aW5kZXggKyAxIG9mIHRoZSByb3cgdGhhdCByZWFjaGVzIHRoZSBib3R0b20KKyAgICAgYm91bmRh cnkgaW4gdGhlIGN1cnJlbnQgbWF0cml4LiAgV2UgZG9uJ3QgbG9vayBhdCB0aGUgZW5hYmxlZAor ICAgICBmbGFnIGhlcmUgYmVjYXVzZSB3ZSBwbGFuIHRvIHJldXNlIHBhcnQgb2YgdGhlIGRpc3Bs YXkgZXZlbiBpZgorICAgICBvdGhlciBwYXJ0cyBhcmUgZGlzYWJsZWQuICovCisgIGkgPSBmaXJz dF9vbGQgKyAxOworICB3aGlsZSAoaSA8IGN1cnJlbnRfbWF0cml4LT5ucm93cyAtIDEpCisgICAg eworICAgICAgaW50IGJvdHRvbSA9IE1BVFJJWF9ST1dfQk9UVE9NX1kgKE1BVFJJWF9ST1cgKGN1 cnJlbnRfbWF0cml4LCBpKSk7CisgICAgICBpZiAoYm90dG9tIDw9IHliKQorICAgICAgICArK2k7 CisgICAgICBpZiAoYm90dG9tID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisgIGxhc3Rf b2xkID0gaTsKKyAgLyogU2tpcCBvdmVyIHJvd3MgZXF1YWwgYXQgdGhlIGJvdHRvbS4gKi8KKyAg aSA9IGxhc3RfbmV3OworICBqID0gbGFzdF9vbGQ7CisgIHdoaWxlIChpIC0gMSA+IGZpcnN0X25l dworICAgICAgICAgJiYgaiAtIDEgPiBmaXJzdF9vbGQKKyAgICAgICAgICYmIE1BVFJJWF9ST1df RU5BQkxFRF9QIChjdXJyZW50X21hdHJpeCwgaiAtIDEpCisgICAgICAgICAmJiAoTUFUUklYX1JP VyAoY3VycmVudF9tYXRyaXgsIGogLSAxKS0+eQorICAgICAgICAgICAgID09IE1BVFJJWF9ST1cg KGRlc2lyZWRfbWF0cml4LCBpIC0gMSktPnkpCisgICAgICAgICAmJiAhTUFUUklYX1JPVyAoZGVz aXJlZF9tYXRyaXgsIGkgLSAxKS0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AKKyAgICAgICAgICYm IHJvd19lcXVhbF9wIChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSAtIDEpLAorICAgICAg ICAgICAgICAgICAgICAgICAgIE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBqIC0gMSksIDEp KQorICAgIC0taSwgLS1qOworICBsYXN0X25ldyA9IGk7CisgIGxhc3Rfb2xkID0gajsKKyAgLyog Tm90aGluZyB0byBkbyBpZiBhbGwgcm93cyBhcmUgZXF1YWwuICovCisgIGlmIChsYXN0X25ldyA9 PSBmaXJzdF9uZXcpCisgICAgcmV0dXJuIDA7CisgIC8qIENoZWNrIGZvciBpbnRlZ2VyIG92ZXJm bG93IGluIHNpemUgY2FsY3VsYXRpb24uCisgICAgIElmIG5leHRfYWxtb3N0X3ByaW1lIGNoZWNr cyAoTikgZm9yIGRpdmlzaWJpbGl0eSBieSAyLi4xMCwgdGhlbgorICAgICBpdCBjYW4gcmV0dXJu IGF0IG1vc3QgTiArIDEwLCBlLmcuLCBuZXh0X2FsbW9zdF9wcmltZSAoMSkgPT0gMTEuCisgICAg IFNvLCBzZXQgbmV4dF9hbG1vc3RfcHJpbWVfaW5jcmV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MsICZtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50 X21hdHJpeC0+bnJvd3MgLSBtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX29sZF9saW5lcyk7CisgIGlmIChkZXNpcmVkX21hdHJp eC0+bnJvd3MgPiBtY19uZXdfbGluZXNfc2l6ZSkKKyAgICBtY19uZXdfbGluZXMgPSB4cGFsbG9j IChtY19uZXdfbGluZXMsICZtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBkZXNpcmVkX21hdHJpeC0+bnJvd3MgLSBtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX25ld19saW5lcyk7CisgIG4gPSBk ZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgIG4gKz0gY3VycmVudF9tYXRyaXgtPm5yb3dzOworICBp ZiAobWNfcm93X3RhYmxlX3NpemUgPCAzICogbikKKyAgICB7CisgICAgICBwdHJkaWZmX3Qgc2l6 ZSA9IG5leHRfYWxtb3N0X3ByaW1lICgzICogbik7CisgICAgICBtY19yb3dfdGFibGUgPSB4bnJl YWxsb2MgKG1jX3Jvd190YWJsZSwgc2l6ZSwgc2l6ZW9mICptY19yb3dfdGFibGUpOworICAgICAg bWNfcm93X3RhYmxlX3NpemUgPSBzaXplOworICAgICAgbWVtc2V0IChtY19yb3dfdGFibGUsIDAs IHNpemUgKiBzaXplb2YgKm1jX3Jvd190YWJsZSk7CisgICAgfQorICBpZiAobiA+IG1jX3Jvd19l bnRyeV9wb29sX3NpemUpCisgICAgbWNfcm93X2VudHJ5X3Bvb2wgPSB4cGFsbG9jIChtY19yb3df ZW50cnlfcG9vbCwgJm1jX3Jvd19lbnRyeV9wb29sX3NpemUsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBuIC0gbWNfcm93X2VudHJ5X3Bvb2xfc2l6ZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIC0xLCBzaXplb2YgKm1jX3Jvd19lbnRyeV9wb29sKTsKKyAgaWYgKGRlc2ly ZWRfbWF0cml4LT5ucm93cyA+IG1jX3J1bnNfc2l6ZSkKKyAgICB7CisgICAgICBtY19ydW5zID0g eG5yZWFsbG9jIChtY19ydW5zLCBkZXNpcmVkX21hdHJpeC0+bnJvd3MsIHNpemVvZiAqbWNfcnVu cyk7CisgICAgICBtY19ydW5fcG9vbCA9IHhucmVhbGxvYyAobWNfcnVuX3Bvb2wsIGRlc2lyZWRf bWF0cml4LT5ucm93cywgc2l6ZW9mICptY19ydW5fcG9vbCk7CisgICAgICBtY19ydW5zX3NpemUg PSBkZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgICAgfQorICBucnVucyA9IHJ1bl9pZHggPSAwOwor ICBtY19yb3dfZW50cnlfaWR4ID0gMDsKKyAgLyogQWRkIHJvd3MgZnJvbSB0aGUgY3VycmVudCBh bmQgZGVzaXJlZCBtYXRyaXggdG8gdGhlIGhhc2ggdGFibGUKKyAgICAgcm93X2hhc2hfdGFibGUg dG8gYmUgYWJsZSB0byBmaW5kIGVxdWFsIG9uZXMgcXVpY2tseS4gKi8KKyAgZm9yIChpID0gZmly c3Rfb2xkOyBpIDwgbGFzdF9vbGQ7ICsraSkKKyAgICB7CisgICAgICBpZiAoTUFUUklYX1JPV19F TkFCTEVEX1AgKGN1cnJlbnRfbWF0cml4LCBpKSkKKyAgICAgICAgeworICAgICAgICAgIGVudHJ5 ID0gbWNfYWRkX3Jvd19lbnRyeSAoTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkpKTsKKyAg ICAgICAgICBtY19vbGRfbGluZXNbaV0gPSBlbnRyeTsKKyAgICAgICAgICArK2VudHJ5LT5vbGRf dXNlczsKKyAgICAgICAgfQorICAgICAgZWxzZQorICAgICAgICBtY19vbG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2xpbmU7CisgICAgICAgIHJ1bi0+ZGVzaXJlZF95ID0gTUFUUklY X1JPVyAoZGVzaXJlZF9tYXRyaXgsIG5ld19saW5lKS0+eTsKKyAgICAgICAgcnVuLT5ucm93cyA9 IDE7CisgICAgICAgIHJ1bi0+aGVpZ2h0ID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkp LT5oZWlnaHQ7CisgICAgICAgIC8qIEV4dGVuZCBiYWNrd2FyZC4gKi8KKyAgICAgICAgcCA9IGkg LSAxOworICAgICAgICBxID0gbmV3X2xpbmUgLSAxOworICAgICAgICB3aGlsZSAocCA+IGZpcnN0 X29sZAorICAgICAgICAgICAgICAgJiYgcSA+IGZpcnN0X25ldworICAgICAgICAgICAgICAgJiYg bWNfb2xkX2xpbmVzW3BdID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBpbnQgaCA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0OworICAg ICAgICAgICAgLS1ydW4tPmN1cnJlbnRfdnBvczsKKyAgICAgICAgICAgIC0tcnVuLT5kZXNpcmVk X3Zwb3M7CisgICAgICAgICAgICArK3J1bi0+bnJvd3M7CisgICAgICAgICAgICBydW4tPmhlaWdo dCArPSBoOworICAgICAgICAgICAgcnVuLT5kZXNpcmVkX3kgLT0gaDsKKyAgICAgICAgICAgIHJ1 bi0+Y3VycmVudF95IC09IGg7CisgICAgICAgICAgICAtLXAsIC0tcTsKKyAgICAgICAgICB9Cisg ICAgICAgIC8qIEV4dGVuZCBmb3J3YXJkLiAqLworICAgICAgICBwID0gaSArIDE7CisgICAgICAg IHEgPSBuZXdfbGluZSArIDE7CisgICAgICAgIHdoaWxlIChwIDwgbGFzdF9vbGQKKyAgICAgICAg ICAgICAgICYmIHEgPCBsYXN0X25ldworICAgICAgICAgICAgICAgJiYgbWNfb2xkX2xpbmVzW3Bd ID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgaCA9IE1B VFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0OworICAgICAgICAgICAgKytydW4t Pm5yb3dzOworICAgICAgICAgICAgcnVuLT5oZWlnaHQgKz0gaDsKKyAgICAgICAgICAgICsrcCwg KytxOworICAgICAgICAgIH0KKyAgICAgICAgLyogSW5zZXJ0IHJ1biBpbnRvIGxpc3Qgb2YgYWxs IHJ1bnMuICBPcmRlciBydW5zIGJ5IGNvcGllZAorICAgICAgICAgICBwaXhlbCBsaW5lcy4gIE5v dGUgdGhhdCB3ZSByZWNvcmQgcnVucyB0aGF0IGRvbid0IGhhdmUgdG8KKyAgICAgICAgICAgYmUg Y29waWVkIGJlY2F1c2UgdGhleSBhcmUgYWxyZWFkeSBpbiBwbGFjZS4gIFRoaXMgaXMgZG9uZQor ICAgICAgICAgICBiZWNhdXNlIHdlIGNhbiBhdm9pZCBjYWxsaW5nIHVwZGF0ZV93aW5kb3dfbGlu ZSBpbiB0aGlzCisgICAgICAgICAgIGNhc2UuICovCisgICAgICAgIGZvciAocCA9IDA7IHAgPCBu cnVucyAmJiBtY19ydW5zW3BdLT5oZWlnaHQgPiBydW4tPmhlaWdodDsgKytwKQorICAgICAgICAg IDsKKyAgICAgICAgZm9yIChxID0gbnJ1bnM7IHEgPiBwOyAtLXEpCisgICAgICAgICAgbWNfcnVu c1txXSA9IG1jX3J1bnNbcSAtIDFdOworICAgICAgICBtY19ydW5zW3BdID0gcnVuOworICAgICAg ICArK25ydW5zOworICAgICAgICBpICs9IHJ1bi0+bnJvd3M7CisgICAgICB9CisgICAgICBlbHNl CisgICAgICAgICsraTsKKyAgLyogRG8gdGhlIG1vdmVzLiAgRG8gaXQgaW4gYSB3YXkgdGhhdCB3 ZSBkb24ndCBvdmVyd3JpdGUgc29tZXRoaW5nCisgICAgIHdlIHdhbnQgdG8gY29weSBsYXRlciBv bi4gIFRoaXMgaXMgbm90IHNvbHZhYmxlIGluIGdlbmVyYWwKKyAgICAgYmVjYXVzZSB0aGVyZSBp cyBvbmx5IG9uZSBkaXNwbGF5IGFuZCB3ZSBkb24ndCBoYXZlIGEgd2F5IHRvCisgICAgIGV4Y2hh bmdlIGFyZWFzIG9uIHRoaXMgZGlzcGxheS4gIEV4YW1wbGU6CisgICAgICAgICAgKy0tLS0tLS0t LS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgfCAgICAgQSAgICAgfCAgICAgICB8 ICAgICBCICAgICB8CisgICAgICAgICAgKy0tLS0tLS0tLS0tKyAgLS0+ICArLS0tLS0tLS0tLS0r CisgICAgICAgICAgfCAgICAgQiAgICAgfCAgICAgICB8ICAgICBBICAgICB8CisgICAgICAgICAg Ky0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgIEluc3RlYWQsIHByZWZlciBi aWdnZXIgbW92ZXMsIGFuZCBpbnZhbGlkYXRlIG1vdmVzIHRoYXQgd291bGQKKyAgICAgY29weSBm cm9tIHdoZXJlIHdlIGNvcGllZCB0by4gKi8KKyAgZm9yIChpID0gMDsgaSA8IG5ydW5zOyArK2kp CisgICAgaWYgKG1jX3J1bnNbaV0tPm5yb3dzID4gMCkKKyAgICAgIHsKKyAgICAgICAgc3RydWN0 IHJ1biAqciA9IG1jX3J1bnNbaV07CisgICAgICAgIGlmIChyLT5jdXJyZW50X3kgIT0gci0+ZGVz aXJlZF95KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vICBmcHJpbnRmIChzdGRlcnIsICIl czogIHItPmN1cnJlbnQvZGVzaXJlZF92cG9zICglZC8lZCkgfCByLT5jdXJyZW50L2Rlc2lyZWRf eSAoJWQvJWQpXG4iLAorICAgICAgICAgICAgLy8gICAgICAgICAgIHItPmN1cnJlbnRfeSA8IHIt PmRlc2lyZWRfeSA/ICLihpMiIDogIuKGkSIsCisgICAgICAgICAgICAvLyAgICAgICAgICAgci0+ Y3VycmVudF92cG9zLCByLT5kZXNpcmVkX3Zwb3MsIHItPmN1cnJlbnRfeSwgci0+ZGVzaXJlZF95 KTsKKyAgICAgICAgICAgIC8vICByaWYtPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsKKyAg ICAgICAgICAgIC8vICByaWYtPnNjcm9sbF9ydW5faG9vayAodywgcik7CisgICAgICAgICAgfQor ICAgICAgICAvKiBUcnVuY2F0ZSBydW5zIHRoYXQgY29weSB0byB3aGVyZSB3ZSBjb3BpZWQgdG8s IGFuZAorICAgICAgICAgICBpbnZhbGlkYXRlIHJ1bnMgdGhhdCBjb3B5IGZyb20gd2hlcmUgd2Ug Y29waWVkIHRvLiAqLworICAgICAgICBmb3IgKGogPSBucnVucyAtIDE7IGogPiBpOyAtLWopCisg ICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0IHJ1biAqcCA9IG1jX3J1bnNbal07CisgICAg ICAgICAgICBib29sIHRydW5jYXRlZF9wID0gMDsKKyAgICAgICAgICAgIGlmIChwLT5ucm93cyA+ IDAKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgPCByLT5kZXNpcmVkX3kgKyByLT5o ZWlnaHQKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgKyBwLT5oZWlnaHQgPiByLT5k ZXNpcmVkX3kpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAocC0+ZGVzaXJl ZF95IDwgci0+ZGVzaXJlZF95KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICBwLT5ucm93cyA9IHItPmRlc2lyZWRfdnBvcyAtIHAtPmRlc2lyZWRfdnBvczsKKyAgICAg ICAgICAgICAgICAgICAgcC0+aGVpZ2h0ID0gci0+ZGVzaXJlZF95IC0gcC0+ZGVzaXJlZF95Owor ICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZWRfcCA9IDE7CisgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBpbnQgbnJvd3NfY29waWVkID0gKHItPmRlc2lyZWRfdnBvcyArIHItPm5yb3dzCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwLT5kZXNpcmVkX3Zwb3Mp OworICAgICAgICAgICAgICAgICAgICBpZiAocC0+bnJvd3MgPD0gbnJvd3NfY29waWVkKQorICAg ICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzID0gMDsKKyAgICAgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAg IGludCBoZWlnaHRfY29waWVkID0gKHItPmRlc2lyZWRfeSArIHItPmhlaWdodAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHAtPmRlc2lyZWRfeSk7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmN1cnJlbnRfdnBvcyArPSBucm93c19jb3BpZWQ7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfdnBvcyArPSBucm93c19jb3Bp ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzIC09IG5yb3dzX2NvcGllZDsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+Y3VycmVudF95ICs9IGhlaWdodF9jb3BpZWQ7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfeSArPSBoZWlnaHRfY29waWVk OworICAgICAgICAgICAgICAgICAgICAgICAgICBwLT5oZWlnaHQgLT0gaGVpZ2h0X2NvcGllZDsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGVkX3AgPSAxOworICAgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAg ICAgICAgICBpZiAoci0+Y3VycmVudF95ICE9IHItPmRlc2lyZWRfeQorICAgICAgICAgICAgICAg IC8qIFRoZSBjb25kaXRpb24gYmVsb3cgaXMgZXF1aXZhbGVudCB0bworICAgICAgICAgICAgICAg ICAgICgocC0+Y3VycmVudF95ID49IHItPmRlc2lyZWRfeQorICAgICAgICAgICAgICAgICAgICAg JiYgcC0+Y3VycmVudF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KQorICAgICAgICAgICAg ICAgICAgICB8fCAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJlZF95CisgICAg ICAgICAgICAgICAgICAgICAgICAmJiAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPD0gci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KSkpCisgICAg ICAgICAgICAgICAgICAgYmVjYXVzZSB3ZSBoYXZlIDAgPCBwLT5oZWlnaHQgPD0gci0+aGVpZ2h0 LiAqLworICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSA8IHItPmRlc2lyZWRfeSArIHIt PmhlaWdodAorICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSArIHAtPmhlaWdodCA+IHIt PmRlc2lyZWRfeSkKKyAgICAgICAgICAgICAgcC0+bnJvd3MgPSAwOworICAgICAgICAgICAgLyog UmVvcmRlciBydW5zIGJ5IGNvcGllZCBwaXhlbCBsaW5lcyBpZiB0cnVuY2F0ZWQuICovCisgICAg ICAgICAgICBpZiAodHJ1bmNhdGVkX3AgJiYgcC0+bnJvd3MgPiAwKQorICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgaW50IGsgPSBucnVucyAtIDE7CisgICAgICAgICAgICAgICAgd2hp bGUgKG1jX3J1bnNba10tPm5yb3dzID09IDAgfHwgbWNfcnVuc1trXS0+aGVpZ2h0IDwgcC0+aGVp Z2h0KQorICAgICAgICAgICAgICAgICAgay0tOworICAgICAgICAgICAgICAgIG1lbW1vdmUgKG1j X3J1bnMgKyBqLCBtY19ydW5zICsgaiArIDEsIChrIC0gaikgKiBzaXplb2YgKCptY19ydW5zKSk7 CisgICAgICAgICAgICAgICAgbWNfcnVuc1trXSA9IHA7CisgICAgICAgICAgICAgIH0KKyAgICAg ICAgICB9CisgICAgICAgIC8qIEFzc2lnbiBtYXRyaXggcm93cy4gKi8KKyAgICAgICAgZm9yIChq ID0gMDsgaiA8IHItPm5yb3dzOyArK2opCisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0 IGdseXBoX3JvdyAqZnJvbSwgKnRvOworICAgICAgICAgICAgYm9vbCB0b19vdmVybGFwcGVkX3A7 CisgICAgICAgICAgICB0byA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCByLT5kZXNpcmVk X3Zwb3MgKyBqKTsKKyAgICAgICAgICAgIGZyb20gPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJp eCwgci0+ZGVzaXJlZF92cG9zICsgaik7CisgICAgICAgICAgICB0b19vdmVybGFwcGVkX3AgPSB0 by0+b3ZlcmxhcHBlZF9wOworICAgICAgICAgICAgZnJvbS0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBz X3AgPSBmcm9tLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3A7CisgICAgICAgICAgICBhc3NpZ25f cm93ICh0bywgZnJvbSk7CisgICAgICAgICAgICAvKiBUaGUgYWJvdmUgYGFzc2lnbl9yb3cnIGFj dHVhbGx5IGRvZXMgc3dhcCwgc28gaWYgd2UgaGFkCisgICAgICAgICAgICAgICBhbiBvdmVybGFw IGluIHRoZSBjb3B5IGRlc3RpbmF0aW9uIG9mIHR3byBydW5zLCB0aGVuCisgICAgICAgICAgICAg ICB0aGUgc2Vjb25kIHJ1biB3b3VsZCBhc3NpZ24gYSBwcmV2aW91c2x5IGRpc2FibGVkIGJvZ3Vz CisgICAgICAgICAgICAgICByb3cuICBCdXQgdGhhbmtzIHRvIHRoZSB0cnVuY2F0aW9uIGNvZ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oZSBwcmV2aW91cyByb3cgaW4gdGhlIGN1cnJlbnQgbWF0cml4 LiAgQXMgdG8gdGhlIGN1cnNvciByb3csIHdlCisgIHJlcGx5IHVwb24gdGhlIHByZXZpb3VzIHJv dyBpbiB0aGUgZGVzaXJlZCBtYXRyaXggLS0gdGhpcyBpcyBhY2NlcHRhYmxlIGJlY2F1c2UKKyAg dGhlIHBvaW50ZXJzIGJldHdlZW4gZGVzaXJlZC9jdXJyZW50IHJvdyBtYXRyaWNlcyBoYXZlIG5v dCB5ZXQgYmVlbiBzd2FwcGVkIGJ5CisgIGBtYWtlX2N1cnJlbnQnIGluIGB1cGRhdGVfd2luZG93 X2xpbmUnLCBvciBiZWNhdXNlIHRoZSBwcmV2aW91cyByb3cgd291bGQgYmUKKyAgdGhlIHNhbWUg aW4gYm90aCBtYXRyaWNlcyBpZiB3ZSBqdW1wZWQgdG8gYHNldF9jdXJzb3I6YCB3aXRoaW4gYHVw ZGF0ZV93aW5kb3cnCisgIGFuZCBgbWNfdXBkYXRlX3dpbmRvd19kcnlydW4nLiAqLworICBpbnQg cHJldl9tYXRyaXhfcm93X3N0YXJ0X2J5dGVwb3MgPSAodnBvcyAhPSAwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9ST1dfU1RBUlRfQllURVBPUyAoY3Vy cmVudF9yb3cgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC0x OworICBpbnQgcHJldl9tYXRyaXhfcm93X2VuZF9ieXRlcG9zID0gKHZwb3MgIT0gMCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPV19FTkRfQllURVBPUyAo Y3VycmVudF9yb3cgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAt MTsKKyAgaW50IG1hdHJpeF9yb3dfc3RhcnRfYnl0ZXBvcyA9IE1BVFJJWF9ST1dfU1RBUlRfQllU RVBPUyAoZGVzaXJlZF9yb3cpOworICBpbnQgbWF0cml4X3Jvd19lbmRfYnl0ZXBvcyA9IE1BVFJJ WF9ST1dfRU5EX0JZVEVQT1MgKGRlc2lyZWRfcm93KTsKKyAgLyogVGhlIGZpcnN0IGNvbmRpdGlv biB0ZXN0cyBmb3IgYSBzb2xpdGFyeSByb3cgY29udGFpbmluZyBaViwgcHJlY2VkZWQgYnkgYQor ICByb3cgY29udGFpbmluZyBhIHBlbnVsdGltYXRlIGdseXBoIHdpdGggYSBjaGFycG9zIG9mIFpW IC0gMSBmb2xsb3dlZCBieSBhbiBlbmQKKyAgb2Ygcm93IHNwYWNlIGdseXBoIHdpdGggYSBjaGFy cG9zIG9mIDAuICBUaGUgb3RoZXIgY29uZGl0aW9ucyB0ZXN0IGZvciBhbiBlbXB0eQorICBidWZm ZXIgKG5vdCBuYXJyb3dlZCksIG9yIGFuIGVtcHR5IG5hcnJvd2VkIGJ1ZmZlci4gKi8KKyAgYm9v bCByb3dfYXRfenZfcCA9ICgodnBvcyAhPSAwCisgICAgICAgICAgICAgICAgICAgICAgICYmIChj dXJyZW50X3JvdyAtIDEpLT51c2VkW1RFWFRfQVJFQV0gPiAwCisgICAgICAgICAgICAgICAgICAg ICAgICYmIHByZXZfbWF0cml4X3Jvd19zdGFydF9ieXRlcG9zICE9IHByZXZfbWF0cml4X3Jvd19l bmRfYnl0ZXBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiAhKGN1cnJlbnRfcm93IC0gMSkt PmVuZHNfYXRfenZfcAorICAgICAgICAgICAgICAgICAgICAgICAmJiBtYXRyaXhfcm93X3N0YXJ0 X2J5dGVwb3MgPT0gbWF0cml4X3Jvd19lbmRfYnl0ZXBvcworICAgICAgICAgICAgICAgICAgICAg ICAmJiBkZXNpcmVkX3Jvdy0+ZW5kc19hdF96dl9wKQorICAgICAgICAgICAgICAgICAgICAgIHx8 ICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA9PS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2wgPSB7LnJlZCA9IC0xLjAsIC5ncmVlbiA9IC0x LjAsIC5ibHVlID0gLTEuMH07CisgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IE5PX0ZM QVZPUjsKKyAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IE5PX0NVUlNPUjsKKyAg aW50IHdkID0gLTE7CisgIGJvb2wgY3Vyc29yX2djX3AgPSBmYWxzZTsKKyAgc3RydWN0IGdseXBo X21hdHJpeCAqZGVzaXJlZF9tYXRyaXggPSB3LT5kZXNpcmVkX21hdHJpeDsKKyAgaWYgKGRlYnVn X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfdXBkYXRlX3RleHRfYXJlYSAoJXMpOiAgdnBv cyAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3MpOwor ICAvKiBJbmFzbXVjaCBhcyB3ZSBwcm9jZXNzIHRoZSBjdXJzb3Igcm93IGJlZm9yZSBhbGwgb3Ro ZXIgcm93cywgd2UgY2FuIHJlbHkKKyAgdXBvbiB0aGUgcHJldmlvdXMgYGRlc2lyZWRfcm93YCB0 byBiZSBhY2N1cmF0ZS4gKi8KKyAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9uID0g IG1jX3Jvd19wb3NpdGlvbiAodywgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGRlc2lyZWRf cm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogY3VycmVudF9yb3csCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGRlc2lyZWRfcm93LCB2cG9zKTsKKyAgLyogSWYgcm93cyBh cmUgYXQgZGlmZmVyZW50IFggb3Ig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y0+b3V0cHV0 X2N1cnNvci54ID0KKyAgICAgICAgICAgIG1jX2RyYXdfZ2x5cGhzICh3LCBkZXNpcmVkX21hdHJp eCwgdXBkYXRlZF9yb3csIHctPm91dHB1dF9jdXJzb3IueCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4sIERSQVdfTk9STUFMX1RFWFQsIDAs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgbHNsLCBnbHlwaF9mbGF2b3IsIGN1 cnNvcl90eXBlLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFj dGl2ZV9wLCBjdXJzb3JfZ2NfcCwgTUNfRFJBV19HTFlQSF9TVFJJTkcsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZHJhd19wKTsKKyAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLmhwb3Mg Kz0gbGVuOworICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgIH0KKyAgICAgIC8q IENsZWFyIHRvIGVuZCBvZiB3aW5kb3cuICovCisgICAgICBpZiAoZHJhd19wKQorICAgICAgICBy aWYtPmNsZWFyX2VuZF9vZl9saW5lICh3LCB1cGRhdGVkX3JvdywgVEVYVF9BUkVBLCAtMSk7Cisg ICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgLyogVGhpcyBlcmFzZXMgdGhlIGN1cnNvci4gIFdl IGRvIHRoaXMgaGVyZSBiZWNhdXNlCisgICAgICAgICBub3RpY2VvdmVyd3JpdHRlbl90ZXh0X2N1 cnNvciBjYW5ub3QgZWFzaWx5IGNoZWNrIHRoaXMsIHdoaWNoCisgICAgICAgICBtaWdodCBpbmRp Y2F0ZSB0aGF0IHRoZSB3aG9sZSBmdW5jdGlvbmFsaXR5IG9mCisgICAgICAgICBub3RpY2VvdmVy d3JpdHRlbl90ZXh0X2N1cnNvciB3b3VsZCBiZXR0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AgICAgaW50IGxlZnQsIHJpZ2h0OworICAgICAgICAgICAgICAgIHJpZi0+Z2V0X2dseXBo X292ZXJoYW5ncyAoZ2x5cGgsIFhGUkFNRSAody0+ZnJhbWUpLCAmbGVmdCwgJnJpZ2h0KTsKKyAg ICAgICAgICAgICAgICBjYW5fc2tpcF9wID0gKHJpZ2h0ID09IDAgJiYgIWFib3J0X3NraXBwaW5n KTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGNhbl9za2lwX3ApCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IGk7CisgICAgICAgICAg ICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIEdMWVBIX0VR VUFMX1AgKGRlc2lyZWRfZ2x5cGgsIGN1cnJlbnRfZ2x5cGgpKQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICArK2FycmF5X2dseXBoc19za2lwcGVkLnVzZWQ7CisgICAg ICAgICAgICAgICAgICAgIGlmIChhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxvY2F0ZWQgPCBhcnJh eV9nbHlwaHNfc2tpcHBlZC51c2VkKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgIGludCBvbGRfYWxsb2MgPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxv Y2F0ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbmV3X2VsdHMgPSBhcnJheV9nbHlw aHNfc2tpcHBlZC51c2VkIC0gYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkOworICAgICAg ICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCA9CisgICAgICAg ICAgICAgICAgICAgICAgICAgIHhwYWxsb2MgKGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWQs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZhcnJheV9nbHlwaHNfc2tpcHBl ZC5hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19lbHRz LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKmFycmF5X2dseXBoc19za2lwcGVkLnNr aXBwZWQpOworICAgICAgICAgICAgICAgICAgICAgICAgbWVtc2V0IChhcnJheV9nbHlwaHNfc2tp cHBlZC5za2lwcGVkICsgb2xkX2FsbG9jLCAwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCAtIG9sZF9hbGxvYykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBzaXplb2YgKmFycmF5X2dseXBoc19za2lw cGVkLnNraXBwZWQpOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg ICAgaW50IG50aCA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSAxOworICAgICAgICAgICAg ICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkW250aF0ueCA9IHg7CisgICAgICAg ICAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbbnRoXS5ocG9zID0gaTsK KyAgICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmVu YWJsZWRfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgICAgIHggKz0gZGVzaXJlZF9nbHlwaC0+ cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICsrZGVzaXJlZF9nbHlwaCwgKytjdXJy ZW50X2dseXBoLCArK2k7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgLyog Q29uc2lkZXIgdGhlIGNhc2UgdGhhdCB0aGUgY3VycmVudCByb3cgY29udGFpbnMgInh4eCBwcHAg Z2dnIiBpbgorICAgICAgICAgICAgICAgIGl0YWxpYyBDb3VyaWVyIGZvbnQsIGFuZCB0aGUgZGVz aXJlZCByb3cgaXMgInh4eCBnZ2ciLiAgVGhlIGNoYXJhY3RlciBgcCcKKyAgICAgICAgICAgICAg ICBoYXMgbGJlYXJpbmcsIGBnJyBoYXMgbm90LiAgVGhlIGxvb3AgYWJvdmUgd2lsbCBzdG9wIGlu IGZyb250IG9mIHRoZQorICAgICAgICAgICAgICAgIGZpcnN0IGBwJyBpbiB0aGUgY3VycmVudCBy b3cuICBJZiB3ZSB3b3VsZCBzdGFydCB3cml0aW5nIGdseXBocyB0aGVyZSwgd2UKKyAgICAgICAg ICAgICAgICB3b3VsZG4ndCBlcmFzZSB0aGUgbGJlYXJpbmcgb2YgdGhlIGBwJy4gIFRoZSByZXN0 IG9mIHRoZSBsYmVhcmluZyBwcm9ibGVtCisgICAgICAgICAgICAgICAgaXMgdGhlbiB0YWtlbiBj YXJlIG9mIGJ5IGRyYXdfZ2x5cGhzLiAqLworICAgICAgICAgICAgICAgIGlmIChvdmVybGFwcGlu Z19nbHlwaHNfcAorICAgICAgICAgICAgICAgICAgICAmJiBpID4gMAorICAgICAgICAgICAgICAg ICAgICAmJiBpIDwgY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAg ICAgICAmJiAoY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSBkZXNpcmVkX3Jvdy0+dXNl ZFtURVhUX0FSRUFdKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg aW50IGxlZnQsIHJpZ2h0OworICAgICAgICAgICAgICAgICAgICByaWYtPmdldF9nbHlwaF9vdmVy aGFuZ3MgKGN1cnJlbnRfZ2x5cGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgWEZSQU1F ICh3LT5mcmFtZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmxlZnQsICZyaWdodCk7 CisgICAgICAgICAgICAgICAgICAgIHdoaWxlIChsZWZ0ID4gMCAmJiBpID4gMCkKKyAgICAgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAtLWksIC0tZGVzaXJlZF9n bHlwaCwgLS1jdXJyZW50X2dseXBoOworICAgICAgICAgICAgICAgICAgICAgICAgeCAtPSBkZXNp cmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgLT0g ZGVzaXJlZF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICAvKiBBYm9ydCB0aGUgc2tpcHBpbmcgYWxnb3JpdGhtIGlmIHdlIGVu ZCB1cCBiZWZvcmUKKyAgICAgICAgICAgICAgICAgICAgICAgb3VyIHN0YXJ0aW5nIHBvaW50LCB0 byBhdm9pZCBsb29waW5nIChidWcjMTA3MCkuCisgICAgICAgICAgICAgICAgICAgICAgIFRoaXMg Y2FuIGhhcHBlbiB3aGVuIHRoZSBsYmVhcmluZyBpcyBsYXJnZXIgdGhhbgorICAgICAgICAgICAg ICAgICAgICAgICB0aGUgcGl4ZWwgd2lkdGguICovCisgICAgICAgICAgICAgICAgICAgIGFib3J0 X3NraXBwaW5nID0gKGkgPCBzdGFydF9ocG9zKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgLyogVHJ5IHRvIGF2b2lkIHdyaXRpbmcgdGhlIGVudGly ZSByZXN0IG9mIHRoZSBkZXNpcmVkIHJvdworICAgICAgICAgICAgICAgYnkgbG9va2luZyBmb3Ig YSByZXN5bmMgcG9pbnQuICBUaGlzIG1haW5seSBwcmV2ZW50cworICAgICAgICAgICAgICAgbW9k ZSBsaW5lIGZsaWNrZXJpbmcgaW4gdGhlIGNhc2UgdGhlIG1vZGUgbGluZSBpcyBpbgorICAgICAg ICAgICAgICAgZml4ZWQtcGl0Y2ggZm9udCwgd2hpY2ggaXQgdXN1YWxseSB3aWxsIGJlLiAqLwor ICAgICAgICAgICAgaWYgKGkgPCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IHN0YXJ0X3ggPSB4LCBzdGFydF9ocG9zID0g aTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnN0YXJ0ID0gZGVzaXJlZF9nbHlwaDsK KyAgICAgICAgICAgICAgICBpbnQgY3VycmVudF94ID0geDsKKyAgICAgICAgICAgICAgICBib29s IHNraXBfZmlyc3RfcCA9ICFjYW5fc2tpcF9wOworICAgICAgICAgICAgICAgIC8qIEZpbmQgdGhl IG5leHQgZ2x5cGggdGhhdCdzIGVxdWFsIGFnYWluLiAqLworICAgICAgICAgICAgICAgIHdoaWxl IChpIDwgc3RvcAorICAgICAgICAgICAgICAgICAgICAgICAmJiAoc2tpcF9maXJzdF9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICB8fCAhR0xZUEhfRVFVQUxfUCAoZGVzaXJlZF9nbHlwaCwg Y3VycmVudF9nbHlwaCkpCisgICAgICAgICAgICAgICAgICAgICAgICYmIHggPT0gY3VycmVudF94 KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICB4ICs9IGRlc2lyZWRf Z2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3ggKz0gY3Vy cmVudF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICsrZGVzaXJlZF9n bHlwaCwgKytjdXJyZW50X2dseXBoLCArK2k7CisgICAgICAgICAgICAgICAgICAgIHNraXBfZmly c3RfcCA9IDA7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZm9yIChpbnQg ZWx0ID0gMDsKKyAgICAgICAgICAgICAgICAgICAgIGVsdCA8IGFycmF5X2dseXBoc19za2lwcGVk LnVzZWQ7CisgICAgICAgICAgICAgICAgICAgICArK2VsdCkKKyAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgaW50IHggPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVk W2VsdF0ueDsKKyAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBhcnJheV9nbHlwaHNfc2tp cHBlZC5za2lwcGVkW2VsdF0uaHBvczsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBo ICp0YXJnZXRfZ2x5cGggPQorICAgICAgICAgICAgICAgICAgICAgIG1jX2dldF9jdXJzb3JfZ2x5 cGggKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgaHBvcywgdnBvcyk7CisgICAgICAg ICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAgICAgICAgICAgICAgIGZwcmludGYg KHN0ZGVyciwgIlNLSVBQRUQ6ICB2cG9zICglZCkgfCBjaGFyICglZC8lcykgfCB4OiAoJWQpIHwg aHBvcyAoJWQvJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg dnBvcywgdGFyZ2V0X2dseXBoLT51LmNoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHRhcmdldF9nbHlwaC0+dS5jaCksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4LCBocG9zLCB1cGRhdGVkX3Jvdy0+dXNl ZFtURVhUX0FSRUFdIC0gMSk7CisgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfcm93ICh3LCBk ZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHRhcmdldF9nbHlwaCwgeCwgMSwgdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwgZHJhd19wLCBTS0lQUEVEKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICBpZiAoaSA9PSBzdGFydF9ocG9zIHx8IHggIT0gY3VycmVudF94KQorICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpID0gc3RhcnRfaHBvczsKKyAg ICAgICAgICAgICAgICAgICAgeCA9IHN0YXJ0X3g7CisgICAgICAgICAgICAgICAgICAgIGRlc2ly ZWRfZ2x5cGggPSBzdGFydDsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgc3Rh cnRfaHBvcywgZGVzaXJlZF9yb3ctPnksIHN0YXJ0X3gpOworICAgICAgICAgICAgICAgIC8qIFJl LWRyYXcgYSBwb3J0aW9uIG9mIHRoZSByb3cuICovCisgICAgICAgICAgICAgICAgaWYgKGRlYnVn X3ApCisgICAgICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJSRURSQVcgU0VHTUVOVDpc blwKKyAgICAgICAgICAgICAgICAgICAgdnBvcyAoJWQpIHwgY2hhciAoJWQvJXMpIHwgeDogKCVk KSB8IGhwb3MgKCVkLyVkKSB8IGxlbmd0aCAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICB2 cG9zLCBzdGFydC0+dS5jaCwgbWNfY2hhcl90b19zdHJpbmcgKHN0YXJ0LT51LmNoKSwKKyAgICAg ICAgICAgICAgICAgICAgc3RhcnRfeCwgc3RhcnRfaHBvcywgdXBkYXRlZF9yb3ctPnVzZWRbVEVY VF9BUkVBXSAtIDEsIGkgLSBzdGFydF9ocG9zKTsKKyAgICAgICAgICAgICAgICBibG9ja19pbnB1 dCAoKTsKKyAgICAgICAgICAgICAgICBpbnQgbGVuID0gaSAtIHN0YXJ0X2hwb3M7CisgICAgICAg ICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHVwZGF0ZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVB XTsKKyAgICAgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLnggPQorICAgICAgICAgICAgICAg ICAgbWNfZHJhd19nbHlwaHMgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3Jvdywgdy0+b3V0 cHV0X2N1cnNvci54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRFWFRfQVJF QSwgaHBvcywgaHBvcyArIGxlbiwgRFJBV19OT1JNQUxfVEVYVCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAwLCB2cG9zLCBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUs IHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZl X3AsIGN1cnNvcl9nY19wLCBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBkcmF3X3ApOworICAgICAgICAgICAgICAgIHctPm91dHB1dF9jdXJz b3IuaHBvcyArPSBsZW47CisgICAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAg ICAgICAgICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBz dGFydCwgc3RhcnRfeCwgaSAtIHN0YXJ0X2hwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHZwb3MsIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgZHJhd19w LCBTQ1JJQkVfVFdPKTsKKyAgICAgICAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgfQorCisgICAgICAgIC8qIFdyaXRlIHRoZSByZXN0LiAqLworICAg ICAgICBpZiAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgewor ICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgaSwgZGVzaXJlZF9yb3ctPnks IHgpOworICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAgIGZwcmludGYgKHN0 ZGVyciwgIkRSQVcgUkVNQUlOREVSIE9GIFRIRSBST1c6XG5cCisgICAgICAgICAgICAgICAgdnBv cyAoJWQpIHwgY2hhciAoJWQvJXMpIHwgeDogKCVkKSB8IGhwb3MgKCVkLyVkKSB8IGxlbmd0aCAo JWQpXG4iLAorICAgICAgICAgICAgICAgIHZwb3MsIGRlc2lyZWRfZ2x5cGgtPnUuY2gsIG1jX2No YXJfdG9fc3RyaW5nIChkZXNpcmVkX2dseXBoLT51LmNoKSwKKyAgICAgICAgICAgICAgICB4LCBp LCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSwgZGVzaXJlZF9yb3ctPnVzZWRbVEVY VF9BUkVBXSAtIGkpOworICAgICAgICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICBp bnQgbGVuID0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAtIGk7CisgICAgICAgICAgICBp bnQgaHBvcyA9IGRlc2lyZWRfZ2x5cGggLSB1cGRhdGVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV07 CisgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLnggPQorICAgICAgICAgICAgICBtY19kcmF3 X2dseXBocyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB3LT5vdXRwdXRfY3Vyc29y LngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBURVhUX0FSRUEsIGhwb3MsIGhwb3Mg KyBsZW4sIERSQVdfTk9STUFM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UgaWYgKGNoYW5nZWRfcAorICAgICAgICAgICAgICAgICAgICYmIHct Pm91dHB1dF9jdXJzb3IuaHBvcyAhPSB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBpbnQgeCA9IHctPm91dHB1dF9jdXJzb3IueDsKKyAg ICAgICAgICAgICAgaW50IGhwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLmhwb3M7CisgICAgICAgICAg ICAgIHN0cnVjdCBnbHlwaCAqc3RhcnQgPSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBkZXNpcmVk X21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHVwZGF0ZWRfcm93LCBocG9zLCB2cG9zKTsKKyAgICAgICAgICAgICAgaWYgKHct Pm91dHB1dF9jdXJzb3IueCA9PSB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAg ICAgICAgeCAtPSBzdGFydC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgIGlmIChkZWJ1Z19w KQorICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlBPU1QtQ0hBTkdFRDogIHZwb3Mg KCVkKSB8IHggKCVkKSB8IGhwb3MgKCVkLyVkKSB8IGNoYXIgKCVkLyVzKVxuIiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHZwb3MsIHgsIGhwb3MsIHVwZGF0ZWRfcm93LT51c2Vk W1RFWFRfQVJFQV0gLSAxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQt PnUuY2gsIG1jX2NoYXJfdG9fc3RyaW5nIChzdGFydC0+dS5jaCkpOworICAgICAgICAgICAgICBt Y19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBzdGFydCwgeCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSBo cG9zLCB2cG9zLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNz ZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFBPU1RfQ0hBTkdFRCk7CisgICAgICAgICAg ICB9CisgICAgICAgICAgICAvKiBUaGVyZSB3ZXJlIG5vIGNoYW5nZXMgYW5kIGkgPT0gZGVzaXJl ZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWNoYW5nZWRf cCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAg ICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiVU5DSEFOR0VEIC0tIFdSSVRFIEVOVElSRSBM SU5FOiAgdnBvcyAoJWQpIHwgcm93LT51c2VkICglZClcbiIsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHZwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsK KyAgICAgICAgICAgICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRf cm93LCBkZXNpcmVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGRlc2lyZWRfcm93LT54LCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdLCB2 cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRp YWxzLCByb3dfcG9zaXRpb24sIGRyYXdfcCwgVU5DSEFOR0VEKTsKKyAgICAgICAgICAgICAgfQor CisgICAgICAgIC8qIE1heWJlIGNsZWFyIHRvIGVuZCBvZiBsaW5lLiAqLworICAgICAgICBpZiAo TUFUUklYX1JPV19FWFRFTkRTX0ZBQ0VfUCAoZGVzaXJlZF9yb3cpKQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIC8qIElmIG5ldyByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFy ZWEsIG5vdGhpbmcKKyAgICAgICAgICAgICAgIGhhcyB0byBiZSBjbGVhcmVkLCBpZiBhbmQgb25s eSBpZiB3ZSBkaWQgYSB3cml0ZV9nbHlwaHMKKyAgICAgICAgICAgICAgIGFib3ZlLiAgVGhpcyBp cyBtYWRlIHN1cmUgYnkgc2V0dGluZyBkZXNpcmVkX3N0b3BfcG9zCisgICAgICAgICAgICAgICBh cHByb3ByaWF0ZWx5IGFib3ZlLiAqLworICAgICAgICAgICAgZWFzc2VydCAoaSA8IGRlc2lyZWRf cm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgIHx8ICgoZGVzaXJlZF9y b3ctPnVzZWRbVEVYVF9BUkVBXSA9PSBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAg ICAgICAgICAgICAgICAgICAgICAgICYmIE1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1AgKGN1cnJl bnRfcm93KSkpOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChNQVRSSVhfUk9XX0VY VEVORFNfRkFDRV9QIChjdXJyZW50X3JvdykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IC8qIElmIG9sZCByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEsIGNsZWFy LiAqLworICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFd KQorICAgICAgICAgICAgICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRf cm93LT55LCBkZXNpcmVkX3Jvdy0+cGl4ZWxfd2lkdGgpOworICAgICAgICAgICAgICBpZiAoZHJh d19wKQorICAgICAgICAgICAgICAgIHJpZi0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRf cm93LCBURVhUX0FSRUEsIC0xKTsKKyAgICAgICAgICAgICAgY2xlYXJfdG9feCA9IC0xOworICAg ICAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxz ZSBpZiAoZGVzaXJlZF9yb3ctPnBpeGVsX3dpZHRoIDwgY3VycmVudF9yb3ctPnBpeGVsX3dpZHRo KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogT3RoZXJ3aXNlIGNsZWFyIHRv IHRoZSBlbmQgb2YgdGhlIG9sZCByb3cuICBFdmVyeXRoaW5nCisgICAgICAgICAgICAgICAgICAg YWZ0ZXIgdGhhdCBwb3NpdGlvbiBzaG91bGQgYmUgY2xlYXIgYWxyZWFkeS4gKi8KKyAgICAgICAg ICAgICAgICBpbnQgeGxpbTsKKyAgICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+ dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywg dnBvcywgaSwgZGVzaXJlZF9yb3ctPnksIGRlc2lyZWRfcm93LT5waXhlbF93aWR0aCk7CisgICAg ICAgICAgICAgICAgLyogSWYgY3Vyc29yIGlzIGRpc3BsYXllZCBhdCB0aGUgZW5kIG9mIHRoZSBs aW5lLCBtYWtlIHN1cmUKKyAgICAgICAgICAgICAgICAgICBpdCdzIGNsZWFyZWQuICBOb3dhZGF5 cyB3ZSBkb24ndCBoYXZlIGEgcGh5c19jdXJzb3JfZ2x5cGgKKyAgICAgICAgICAgICAgICAgICB3 aXRoIHdoaWNoIHRvIGVyYXNlIHRoZSBjdXJzb3IgKGJlY2F1c2UgdGhpcyBtZXRob2QKKyAgICAg ICAgICAgICAgICAgICBkb2Vzbid0IHdvcmsgd2l0aCBsYmVhcmluZy9yYmVhcmluZyksIHNvIHdl IG11c3QgZG8gaXQgdGhpcyB3YXkuICovCisgICAgICAgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+ cGh5c19jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICAgICAmJiAoZGVzaXJlZF9yb3ctPnJl dmVyc2VkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgID8gKHctPnBoeXNfY3Vyc29yLmhwb3Mg PCAwKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAody0+cGh5c19jdXJzb3IuaHBvcyA+PSBk ZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKSkpCisgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgIHctPnBoeXNfY3Vyc29yX29uX3AgPSAwOworICAgICAgICAgICAgICAg ICAgICB4bGltID0gLTE7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgIHhsaW0gPSBjdXJyZW50X3Jvdy0+cGl4ZWxfd2lkdGg7 CisgICAgICAgICAgICAgICAgaWYgKGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgIHJpZi0+Y2xl YXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRfcm93LCBURVhUX0FSRUEsIHhsaW0pOworICAgICAg ICAgICAgICAgIGNsZWFyX3RvX3ggPSB4bGltOworICAgICAgICAgICAgICAgIGNoYW5nZWRfcCA9 IDE7CisgICAgICAgICAgICAgIH0KKworICAgICAgICBpZiAoY2hhbmdlZF9wCisgICAgICAgICAg ICAmJiBjbGVhcl90b194ICE9IDApCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IHRleHRf YXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAg ICBzdHJ1Y3QgbWNfUkdCIGRlYnVnX2ZnID0gey5yZWQgPSAwLjg2NywgLmdyZWVuID0gMC44Njcs IC5ibH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AgICAgICAgICAgICAgICAgICAg OiBjbGVhcl90b194OworICAgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHct PmNvbnRlbnRzKTsKKyAgICAgICAgICAgIGJvb2wgZmlsbF9jb2x1bW5fdHJ1bXBzX3AgPSAoIU5J TFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3Nl bnRpYWxzLmZjX3gpOworICAgICAgICAgICAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQorICAgICAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY191cGRhdGVfdGV4dF9hcmVhIChmbG9hdGluZyk6 ICB2cG9zICglZCkgfCB4X2xpbWl0ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdnBvcywgeF9saW1pdCk7CisgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVu dHMpCisgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAg ICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAg IHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5J TFAgKEJWQVIgKGIsIGZjX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgJiYg eCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+ PSB4CisgICAgICAgICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9IE5VTEwKKyAgICAgICAgICAg ICAgICAmJiBkcmF3X3ApCisgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgZGVzaXJlZF9tYXRy aXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICB4LCB4X2xpbWl0LCB1cGRhdGVkX3Jvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFS LCAxLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19wID8gZGVidWdf ZmcgOiBlc3NlbnRpYWxzLmZjX2ZnW3Jvd19wb3NpdGlvbl0sCisgICAgICAgICAgICAgICAgICAg ICAgICAgRklMTF9DT0xVTU4sIGRyYXdfcCwgTk9XSEVSRSwgTk9fQ0FDSEUpOworICAgICAgICAg ICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg Y2hfaG9yaXpvbnRhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0 aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93 cykpKSkKKyAgICAgICAgICAgICAgICAmJiB4IDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAg ICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICYmIHRhcmdl dF9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAg ICBtY19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBo LCBURVhUX0FSRUEsCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRl ZF9yb3ctPnksIGhwb3MsIHZwb3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAg ICAgICAgICAgICAgIGRlYnVnX3AgPyBkZWJ1Z19mZyA6IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bv c2l0aW9uXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3 X3AsIE5PV0hFUkUsIE5PX0NBQ0hFKTsKKyAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250 ZW50cykKKyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisg ICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAg ICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAg ICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFO SUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICYm ICFmaWxsX2NvbHVtbl90cnVtcHNfcAorICAgICAgICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFf d2lkdGgKKyAgICAgICAgICAgICAgICAmJiB2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0geAorICAgICAgICAgICAgICAgICYmIHRhcmdldF9n bHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAgICBt Y19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBU RVhUX0FSRUEsCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRlZF9y b3ctPnksIGhwb3MsIHZwb3MsIE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBj dXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAg ICAgICAgICAgZGVidWdfcCA/IGRlYnVnX2ZnIDogZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRp b25dLAorICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3AsIE5P V0hFUkUsIE5PX0NBQ0hFKTsKKyAgICAgICAgICB9CisKKyAgICAgIH0KKyAgcmV0dXJuIGNoYW5n ZWRfcDsKK30KKworLyogVXBkYXRlIHJvdyBWUE9TIGluIHdpbmRvdyBXLiAgVmFsdWUgaXMgdHJ1 ZSBpZiBkaXNwbGF5IGhhcyBiZWVuIGNoYW5nZWQuICovCitzdGF0aWMgYm9vbAorbWNfdXBkYXRl X3dpbmRvd19saW5lIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgdnBvcywgYm9vbCAqbW91c2VfZmFj ZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICpjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfZXNz ZW50aWFscyBlc3NlbnRpYWxzLCBib29sIGRyYXdfcCkKK3sKKyAgc3RydWN0IGdseXBoX3JvdyAq Y3VycmVudF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpe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OX0xJTkVfUCAoY3VycmVudF9yb3cpKSkKKyAgICAgICAgcmlmLT5hZnRlcl91cGRhdGVfd2lu ZG93X2xpbmVfaG9vayAodywgZGVzaXJlZF9yb3cpOworICAgIH0KKyAgLyogVXBkYXRlIGN1cnJl bnRfcm93IGZyb20gZGVzaXJlZF9yb3cuICovCisgIG1ha2VfY3VycmVudCAody0+ZGVzaXJlZF9t YXRyaXgsIHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30K Kwordm9pZAorbWNfdXBkYXRlX3dpbmRvd19lcmFzZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IG1jX21hdHJpeCBvbGRfbWF0cml4KQoreworICBib29sIGRlYnVnX3AgPSBmYWxzZTsKKyAgYm9v bCBnb19vbmVfcCA9IChvbGRfbWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPiAwCisgICAg ICAgICAgICAgICAgICAgfHwgb2xkX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4gMAor ICAgICAgICAgICAgICAgICAgIHx8IG9sZF9tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA+ IDApOworICBib29sIGdvX3R3b19wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAg ICAgICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkpOworICBib29sIHVwZGF0 aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFt ZSk7CisgIGlmIChYRlJBTUUgKHctPmZyYW1lKSAhPSBmLT5tY191cGRhdGluZ19mcmFtZQorICAg ICAgJiYgKGdvX29uZV9wIHx8IGdvX3R3b19wKSkKKyAgICB7CisgICAgICB1cGRhdGluZ19mcmFt ZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CisgICAgfQorICBpZiAody0+cGh5 c19jdXJzb3Jfb25fcAorICAgICAgJiYgZ29fdHdvX3ApCisgICAgZXJhc2VfcGh5c19jdXJzb3Ig KHcpOworICBmb3IgKGludCB2bnRoID0gMDsKKyAgICAgICBnb19vbmVfcAorICAgICAgICYmIHZu dGggPCB3LT5tY19tYXRyaXgudnBvc191c2VkOworICAgICAgICsrdm50aCkKKyAgICB7CisgICAg ICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAg ICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAg ICAgICBmb3IgKGludCBudGhfMCA9IDA7CisgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVf cCAob2xkX21hdHJpeCwgY2FjaGVfdHlwZSwgdm50aCwgbnRoXzApOworICAgICAgICAgICAgICsr bnRoXzApCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBzYW1lX3AgPSBmYWxzZTsKKyAg ICAgICAgICAgIGZvciAoaW50IHdfbnRoID0gMDsgd19udGggPCB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdOyArK3dfbnRoKQorICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgc2FtZV9wIHw9IChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmdseXBoLnR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBo LnR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICgob2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5ieXRlcG9zCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW3dfbnRoXS5nbHlwaC5ieXRlcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHx8IChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJv d19wb3NpdGlvbiA9PSBBVF9aVgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bv c2l0aW9uID09IEFUX1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9 PSBQT1NUX1pWCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0g UE9TVF9aVikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguY2hhcnBvcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0uZ2x5cGguY2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB8fCAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8w XS5yb3dfcG9zaXRpb24gPT0gQVRfWlYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnJv d19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAo b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5yb3dfcG9zaXRp b24gPT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9u ID09IFBPU1RfWlYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC51LnZhbAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVt3X250aF0uZ2x5cGgudS52YWwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguZmFj ZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguZmFjZV9pZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8wXS5nbHlwaC5wYWRkaW5nX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnBh ZGRpbmdfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5sZWZ0X2JveF9saW5lX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bd19udGhdLmdseXBoLmxlZnRfYm94X2xpbmVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5nbHlwaC5yaWdodF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlw aC5yaWdodF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnZvZmZzZXQKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnZvZmZzZXQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u Z2x5cGgucGl4ZWxfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnBpeGVsX3dp ZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy54CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5nbHlwaC5zbGljZS5pbWcueAorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5z bGljZS5pbWcueQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuaW1nLnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuaW1nLndpZHRoCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W3dfbnRoXS5nbHlwaC5zbGljZS5pbWcud2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgu c2xpY2UuaW1nLmhlaWdodAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuaW1n LmhlaWdodAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5zbGljZS5jbXAuZnJvbQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuY21wLmZyb20KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MF0ueAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ueAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5meAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVt3X250aF0uZngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ueQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0ueQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5meQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVt3X250aF0uZnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvcworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVt3X250aF0uaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS52cG9zCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W3dfbnRoXS52cG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLndkCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS53ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5oCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5o CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmN1cnNvcl90eXBlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRo XS5jdXJzb3JfdHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3Jfd2lkdGgKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bd19udGhdLmN1cnNvcl93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5yZWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmZnLnJlZAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5n cmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZmcuZ3JlZW4KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MF0uZmcuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZmcuYmx1ZQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8wXS5iZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLnJlZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5iZy5ncmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uYmcuZ3JlZW4KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uYmcuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9 PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uYmcuYmx1 ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGhfZmxhdm9yCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5nbHlwaF9mbGF2b3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZW5hYmxlZF9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5lbmFibGVkX3ApOworICAgICAgICAgICAgICAgIC8qIEZv cmNlIHRoZSBmcmluZ2UgYml0bWFwcyB0byBhbHdheXMgYmUgcmVzZXQvcmVkcmF3bi4gKi8KKyAg ICAgICAgICAgICAgICBpZiAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8wXS5jdXJzb3JfdHlwZQorICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5jdXJzb3JfdHlwZQorICAgICAg ICAgICAgICAgICAgICAmJiAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8wXS5jdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAg ICAgICAgICAgICAgIHx8IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0uY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUCkpCisgICAgICAgICAg ICAgICAgICBzYW1lX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBpZiAoc2FtZV9wKQorICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAg ICAgICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJISVQgKCVzKTogIHZwb3MgKCVkKSB8 IGhwb3MgKCVkKSB8IGNoYXIgKCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChjYWNoZV90eXBlID09IE1DX0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/ICJNQyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gQ0hfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gIkNIIgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAoY2FjaGVfdHlwZSA9PSBGQ19DQUNIRSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyAiRkMiCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6ICJOTyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5ocG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC51LmNoKSk7CisgICAgICAg ICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5zYW1lX3AgPSB0cnVlOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRlYnVnX3ApCisgICAgICAg ICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIk1JU1MgKCVzKTogIHZwb3MgKCVkKSB8IGhw b3MgKCVkIHYuICVkKSB8IGNoYXIgKCVzIHYuICVzKSB8IGNhY2hlX3VzZWQgKCVkIHYuICVkKVxu IiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2FjaGVfdHlwZSA9PSBN Q19DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gIk1DIgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gQ0hf Q0FDSEUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJDSCIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjYWNoZV90eXBlID09IEZDX0NB Q0hFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiRkMiCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiTk8iLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW3dfbnRoXS52cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC51LmNoKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAody0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnUuY2gpLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2Nh Y2hlX3R5cGVdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0pOworICAgICAgICAgICAgICB9 CisgICAgICAgICAgICBpZiAoIXNhbWVfcCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5jYCBjb250YWlucyB0aGUgZm9sbG93aW5n IHRlc3RzLAorICAgICAgICAgICAgICAgIGVhc3NlcnQgKG1hdHJpeCAmJiBtYXRyaXgtPnJvd3Mp OworICAgICAgICAgICAgICAgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+bnJv d3MpOyAqLworICAgICAgICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAody0+Y3VycmVu dF9tYXRyaXggJiYgdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAg ICAgICAgICAgICAgIGlmIChiYXJmX2NyYXNoX29uZSkKKyAgICAgICAgICAgICAgICAgIGNvbnRp bnVlOworICAgICAgICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAodm50aCA+PSAwICYm IHZudGggPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAgICAg ICAgICAgICAgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICAgICAgICAgICAgICAgIGNvbnRpbnVl OworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnZudGhfcm93ID0gTUFUUklYX1JP VyAody0+Y3VycmVudF9tYXRyaXgsIHZudGgpOworICAgICAgICAgICAgICAg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oZV90eXBl XVtudGhfMF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgICAgICAgIGJvb2wgZW5hYmxlZF9wXzAg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRf cDsKKyAgICAgICAgICAgICAgICBpZiAodnBvc18wID09IHZudGgKKyAgICAgICAgICAgICAgICAg ICAgJiYgZ2x5cGhfZmxhdm9yXzAgPT0gTUNfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAgJiYg ZW5hYmxlZF9wXzAKKyAgICAgICAgICAgICAgICAgICAgJiYgdm50aF9yb3ctPmVuYWJsZWRfcCkK KyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbWNfZXJhc2VfY3Vyc29y ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgdm50aF9yb3csIHhfMCwgeV8wLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGhwb3NfMCwgdnBvc18wLCBnbHlwaF9mbGF2b3JfMCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZV8wLCB3ZF8w KTsKKyAgICAgICAgICAgICAgICAgICAgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8wXS5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgLS1v bGRfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAgICAg LyogSWYgd2UgaW5hZHZlcnRlbnRseSBlcmFzZWQgYW5vdGhlciBmYWtlIGN1cnNvciBhdCB0aGUg c2FtZQorICAgICAgICAgICAgICAgICAgICBIUE9TIHRoYXQgaXMgc3RpbGwgZW5hYmxlZF9wIGlu IHRoZSBgb2xkX21hdHJpeGAsIHRoZW4gcmVkcmF3IGl0LiAqLworICAgICAgICAgICAgICAgICAg ICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAg ICAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICAgICAg ICAgICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgICAgICBmb3IgKGludCBudGhfMSA9IDA7CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1jX3RyYXZlcnNlX2NhY2hlX3AgKG9sZF9tYXRyaXgsIGNhY2hlX3R5cGUsIHZu dGgsIG50aF8xKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKytudGhfMSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB4 XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLng7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ4XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZ4OworICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGludCB5XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzFdLnk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ5XzEgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZ5OworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGludCBocG9zXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzFdLmhwb3M7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHZw b3NfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0udnBv czsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgd2RfMSA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0ud2Q7CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgaW50IGhfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMV0uaDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90 eXBlIGN1cnNvcl90eXBlXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzFdLmN1cnNvcl90eXBlOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBj dXJzb3Jfd2lkdGhfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMV0uY3Vyc29yX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBt Y19SR0IgbHNsX2ZnXzEgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMV0uZmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8xXS5mZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5mZy5ibHVlfTsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmdfMSA9IHsucmVkID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5iZy5yZWQsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5iZy5ncmVlbiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAu Ymx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uYmcu Ymx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcF8xID0gb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5hY3RpdmVfcDsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3JfMSA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZ2x5cGhfZmxh dm9yOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgZW5hYmxlZF9wXzEgPSBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmVuYWJsZWRfcDsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGdvX3BfMSA9IChocG9zXzAgPT0gaHBvc18x CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9w XzEpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZ29fcF8xKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgYm9vbCByZW1vdmVfcF8xID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg bWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3JvdywgeF8x LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmeF8x LCB5XzEsIGZ5XzEsIGhwb3NfMSwgdnBvc18xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB3ZF8xLCBoXzEsIGN1cnNvcl90eXBlXzEsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aF8x LCBsc2xfZmdfMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgYWN0aXZlX3BfMSwgZ2x5cGhfZmxhdm9yXzEsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9wXzEpOworICAgICAgICAgICAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodnBvc18wID09IHZudGgKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcF8wCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB2bnRoX3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgICAgYm9vbCByZW1vdmVfcF8wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAg ICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhfcm93 LCB4XzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ4XzAs IHlfMCwgZnlfMCwgaHBvc18wLCB2cG9zXzAsIHdkXzAsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGhfMCwgY3Vyc29yX3R5cGVfMCwgY3Vyc29yX3dpZHRoXzAs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9iZ18wLCBh Y3RpdmVfcF8wLCBnbHlwaF9mbGF2b3JfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgcmVtb3ZlX3BfMCk7CisgICAgICAgICAgICAgICAgICAgICAgb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5lbmFibGVkX3AgPSBmYWxz ZTsKKyAgICAgICAgICAgICAgICAgICAgICAtLW9sZF9tYXRyaXguY3Vyc29yc191c2VkW2NhY2hl X3R5cGVdOworICAgICAgICAgICAgICAgICAgICAgIC8qIElmIHdlIGluYWR2ZXJ0ZW50bHkgZXJh c2VkIGFub3RoZXIgZmFrZSBjdXJzb3IgYXQgdGhlIHNhbWUKKyAgICAgICAgICAgICAgICAgICAg ICBIUE9TIHRoYXQgaXMgc3RpbGwgZW5hYmxlZF9wIGluIHRoZSBgb2xkX21hdHJpeGAsIHRoZW4g cmVkcmF3IGl0LiAqLworICAgICAgICAgICAgICAgICAgICAgIGZvciAoZW51bSBtY19jYWNoZV90 eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNh Y2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICsrY2FjaGVf dHlwZSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgZm9yIChpbnQgbnRoXzIgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1j X3RyYXZlcnNlX2NhY2hlX3AgKG9sZF9tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aF8yKTsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArK250aF8yKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB4XzIgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLng7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBpbnQgZnhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZng7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgeV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8y XS55OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ5XzIgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZ5OworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaW50IGhwb3NfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMl0uaHBvczsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCB2cG9zXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJd LnZwb3M7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgd2RfMiA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0ud2Q7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpbnQgaF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8yXS5oOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBt Y19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8yXS5jdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGludCBjdXJzb3Jfd2lkdGhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMl0uY3Vyc29yX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmdfMiA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5mZy5yZWQsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZmcuZ3JlZW4sCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5mZy5ibHVlfTsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICBzdHJ1Y3QgbWNfUkdCIGxzbF9iZ18yID0g ey5yZWQgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmJn LnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAg ICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMl0uYmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMl0uYmcuYmx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBib29sIGFjdGl2ZV9wXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXzJdLmFjdGl2ZV9wOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzJdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGJvb2wgZW5hYmxlZF9wXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzJdLmVuYWJsZWRfcDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGJvb2wgZ29fcF8yID0gKGhwb3NfMCA9PSBocG9zXzIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGZ4XzAgPD0gZnhfMgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZnhfMCArIHdkXzAgPiBmeF8yICsgd2RfMgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9w XzIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFnb19wXzIpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgYm9vbCByZW1vdmVfcF8yID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhf cm93LCB4XzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgZnhfMiwgeV8yLCBmeV8yLCBocG9zXzIsIHZwb3NfMiwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ZF8yLCBoXzIsIGN1cnNvcl90eXBl XzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Y3Vyc29yX3dpZHRoXzIsIGxzbF9mZ18yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wXzIsIGdseXBoX2ZsYXZvcl8yLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9wXzIp OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 CisgICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChmKTsKK30K Kwordm9pZAorbWNfdXBkYXRlX3dpbmRvd19kcnlydW4gKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wg Zm9yY2VfcCwgc3RydWN0IG1jX2Vzc2VudGlhbHMgZXNzZW50aWFscykKK3sKKyAgaWYgKCFCVUZG RVJQICh3LT5jb250ZW50cykpCisgICAgcmV0dXJuOworCisgIGlmICh3LT5tY19tYXRyaXguY3Vy c29yc191c2VkW01DX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191 c2VkW0N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y4gKi8KKyAgZWFzc2VydCAoRlJBTUVf V0lORE9XX1AgKFhGUkFNRSAoV0lORE9XX0ZSQU1FICh3KSkpKTsKKyNlbmRpZgorCisgIC8qIENo ZWNrIHBlbmRpbmcgaW5wdXQgdGhlIGZpcnN0IHRpbWUgc28gdGhhdCB3ZSBjYW4gcXVpY2tseSBy ZXR1cm4uICovCisgIGlmICghZm9yY2VfcCkKKyAgICBkZXRlY3RfaW5wdXRfcGVuZGluZ19pZ25v cmVfc3F1ZWV6YWJsZXMgKCk7CisKKyAgLyogSWYgZm9yY2VkIHRvIGNvbXBsZXRlIHRoZSB1cGRh dGUsIG9yIGlmIG5vIGlucHV0IGlzIHBlbmRpbmcsIGRvIHRoZSB1cGRhdGUuICovCisgIGlmIChm b3JjZV9wIHx8ICFpbnB1dF9wZW5kaW5nIHx8ICFOSUxQIChkb19tb3VzZV90cmFja2luZykpCisg ICAgeworICAgICAgc3RydWN0IGdseXBoX3JvdyAqaGVhZGVyX2xpbmVfcm93OworICAgICAgYm9v bCBjaGFuZ2VkX3AgPSAwOworICAgICAgYm9vbCBtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AgPSAw OworICAgICAgaW50IG5fdXBkYXRlZCA9IDA7CisgICAgICAvLyAgc3RydWN0IHJlZGlzcGxheV9p bnRlcmZhY2UgKnJpZiA9IEZSQU1FX1JJRiAoWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKSk7Cisg ICAgICAvLyAgcmlmLT51cGRhdGVfd2luZG93X2JlZ2luX2hvb2sgKHcpOworICAgICAgaW50IHli ID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpOworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93 ID0gTUFUUklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAgc3RydWN0IGdseXBoX3Jv dyAqZW5kID0gTUFUUklYX01PREVfTElORV9ST1cgKGRlc2lyZWRfbWF0cml4KTsKKworICAgICAg LyogVGFrZSBub3RlIG9mIHRoZSBoZWFkZXIgbGluZSwgaWYgdGhlcmUgaXMgb25lLiAgV2Ugd2ls bAorICAgICAgICAgdXBkYXRlIGl0IGJlbG93LCBhZnRlciB1cGRhdGluZyBhbGwgb2YgdGhlIHdp bmRvdydzIGxpbmVzLiAqLworICAgICAgaWYgKHJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgIHsK KyAgICAgICAgICBoZWFkZXJfbGluZV9yb3cgPSByb3c7CisgICAgICAgICAgKytyb3c7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIGhlYWRlcl9saW5lX3JvdyA9IE5VTEw7CisK KyAgICAgIC8qIFVwZGF0ZSB0aGUgbW9kZSBsaW5lLCBpZiBuZWNlc3NhcnkuICovCisgICAgICBz dHJ1Y3QgZ2x5cGhfcm93ICptb2RlX2xpbmVfcm93ID0gTUFUUklYX01PREVfTElORV9ST1cgKGRl c2lyZWRfbWF0cml4KTsKKyAgICAgIGlmIChtb2RlX2xpbmVfcm93LT5tb2RlX2xpbmVfcCAmJiBt b2RlX2xpbmVfcm93LT5lbmFibGVkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBtb2RlX2xpbmVf cm93LT55ID0geWIgKyBXSU5ET1dfU0NST0xMX0JBUl9BUkVBX0hFSUdIVCAodyk7CisgICAgICAg ICAgdXBkYXRlX3dpbmRvd19saW5lICh3LCBNQVRSSVhfUk9XX1ZQT1MgKG1vZGVfbGluZV9yb3cs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2ly ZWRfbWF0cml4KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZtb3VzZV9mYWNlX292 ZXJ3cml0dGVuX3ApOworICAgICAgICB9CisKKyAgICAgIC8qIEZpbmQgZmlyc3QgZW5hYmxlZCBy b3cuICBPcHRpbWl6YXRpb25zIGluIHJlZGlzcGxheV9pbnRlcm5hbAorICAgICAgICAgbWF5IGxl YWQgdG8gYW4gdXBkYXRlIHdpdGggb25seSBvbmUgcm93IGVuYWJsZWQuICBUaGVyZSBtYXkKKyAg ICAgICAgIGJlIGFsc28gY29tcGxldGVseSBlbXB0eSBtYXRyaWNlcy4gKi8KKyAgICAgIHdoaWxl IChyb3cgPCBlbmQgJiYgIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICArK3JvdzsKKworICAgICAg LyogVHJ5IHJldXNpbmcgcGFydCBvZiB0aGUgZGlzcGxheSBieSBjb3B5aW5nLiAqLworICAgICAg aWYgKHJvdyA8IGVuZCAmJiAhdy0+ZGVzaXJlZF9tYXRyaXgtPm5vX3Njcm9sbGluZ19wKQorICAg ICAgICB7CisgICAgICAgICAgaW50IHJjID0gbWNfc2Nyb2xsaW5nX3dpbmRvdyAodywgaGVhZGVy X2xpbmVfcm93ICE9IE5VTEwpOworICAgICAgICAgIGlmIChyYyA8IDApCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIC8qIEFsbCByb3dzIHdlcmUgZm91bmQgdG8gYmUgZXF1YWwuICovCisg ICAgICAgICAgICAgIHBhdXNlZF9wID0gMDsKKyAgICAgICAgICAgICAgZ290byBzZXRfY3Vyc29y OworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAocmMgPiAwKQorICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgLyogV2UndmUgc2Nyb2xsZWQgdGhlIGRpc3BsYXkuICov CisgICAgICAgICAgICAgICAgZm9yY2VfcCA9IDE7CisgICAgICAgICAgICAgICAgY2hhbmdlZF9w ID0gMTsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAvKiBQcm9jZXNzIHRoZSBj dXJzb3Igcm93IGF0IHRoZSBvdXRzZXQgaWYgaXQgaXMgd2l0aGluIGBkZXNpcmVkX21hdHJpeGAu CisgICAgICBXaGVuIHByb2Nlc3NpbmcgYWxsIG90aGVyIHJvd3MsIHdlIHdpbGwgcXVlcnkgdGhl IGB3LT5jdXJyZW50X21hdHJpeGAg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wdF9jb3VudCA9PSAwKQor ICAgICAgICAgICAgICAgIGRldGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9yZV9zcXVlZXphYmxlcyAo KTsKKyAgICAgICAgICAgICAgY2hhbmdlZF9wIHw9IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywg dnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgZHJh d19wKTsKKyAgICAgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIp CisgICAgICAgICAgICAgICAgZm9yIChpbnQgaSA9IHZwb3MgKyAxOyBpIDwgdy0+Y3VycmVudF9t YXRyaXgtPm5yb3dzIC0gMTsgKytpKQorICAgICAgICAgICAgICAgICAgU0VUX01BVFJJWF9ST1df RU5BQkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwgaSwgZmFsc2UpOworICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgY3Vyc29yX21hdHJpeCA9IHct PmN1cnJlbnRfbWF0cml4OworICAgICAgLyogVXBkYXRlIHRoZSByZXN0IG9mIHRoZSBsaW5lcy4g Ki8KKyAgICAgIGZvciAoOyByb3cgPCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcp OyArK3JvdykKKyAgICAgICAgLyogc2Nyb2xsaW5nX3dpbmRvdyByZXNldHMgdGhlIGVuYWJsZWRf cCBmbGFnIG9mIHRoZSByb3dzIGl0IHJldXNlcyBmcm9tCisgICAgICAgIGN1cnJlbnRfbWF0cml4 LiAqLworICAgICAgICBpZiAocm93LT5lbmFibGVkX3ApCisgICAgICAgICAgeworICAgICAgICAg ICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+ZGVzaXJlZF9tYXRyaXgpOwor ICAgICAgICAgICAgLyogSWYgdGhlIGBjdXJzb3Jfcm93YCBpcyB3aXRoaW4gdGhlIGBkZXNpcmVk X21hdHJpeGAsIHRoZW4gaXQgd2FzCisgICAgICAgICAgICBwcm9jZXNzZWQgaGVyZWluYWJvdmUg YW5kIHNob3VsZCBiZSBza2lwcGVkIGF0IHRoaXMgdGltZS4gKi8KKyAgICAgICAgICAgIGlmICh2 cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAg ICBpbnQgaTsKKyAgICAgICAgICAgIC8qIFdlJ2xsIGhhdmUgdG8gcGxheSBhIGxpdHRsZSBiaXQg d2l0aCB3aGVuIHRvCisgICAgICAgICAgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZy4gIElmIGl0 J3MgZG9uZSB0b28gb2Z0ZW4sCisgICAgICAgICAgICAgICBzY3JvbGxpbmcgbGFyZ2Ugd2luZG93 cyB3aXRoIHJlcGVhdGVkIHNjcm9sbC11cAorICAgICAgICAgICAgICAgY29tbWFuZHMgd2lsbCB0 b28gcXVpY2tseSBwYXVzZSByZWRpc3BsYXkuICovCisgICAgICAgICAgICBpZiAoIWZvcmNlX3Ag JiYgKytuX3VwZGF0ZWQgJSBwcmVlbXB0X2NvdW50ID09IDApCisgICAgICAgICAgICAgIGRldGVj dF9pbnB1dF9wZW5kaW5nX2lnbm9yZV9zcXVlZXphYmxlcyAoKTsKKyAgICAgICAgICAgIGNoYW5n ZWRfcCB8PSBtY191cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3 cml0dGVuX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCBkcmF3X3ApOworICAgICAgICAgICAgLyogTWFy ayBhbGwgcm93cyBiZWxvdyB0aGUgbGFzdCB2aXNpYmxlIG9uZSBpbiB0aGUgY3VycmVudAorICAg ICAgICAgICAgICAgbWF0cml4IGFzIGludmFsaWQuICBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNhdXNl IG9mCisgICAgICAgICAgICAgICB2YXJpYWJsZSBsaW5lIGhlaWdodHMuICBDb25zaWRlciB0aGUg Y2FzZSBvZiB0aHJlZQorICAgICAgICAgICAgICAgc3VjY2Vzc2l2ZSByZWRpc3BsYXlzLCB3aGVy ZSB0aGUgZmlyc3QgZGlzcGxheXMgNQorICAgICAgICAgICAgICAgbGluZXMsIHRoZSBzZWNvbmQg MyBsaW5lcywgYW5kIHRoZSB0aGlyZCA1IGxpbmVzIGFnYWluLgorICAgICAgICAgICAgICAgSWYg dGhlIHNlY29uZCByZWRpc3BsYXkgd291bGRuJ3QgbWFyayByb3dzIGluIHRoZQorICAgICAgICAg ICAgICAgY3VycmVudCBtYXRyaXggaW52YWxpZCwgdGhlIHRoaXJkIHJlZGlzcGxheSBtaWdodCBi ZQorICAgICAgICAgICAgICAgdGVtcHRlZCB0byBvcHRpbWl6ZSByZWRpc3BsYXkgYmFzZWQgb24g bGluZXMgZGlzcGxheWVkCisgICAgICAgICAgICAgICBpbiB0aGUgZmlyc3QgcmVkaXNwbGF5LiAq LworICAgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAg ICAgICAgICAgIGZvciAoaSA9IHZwb3MgKyAxOyBpIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dz IC0gMTsgKytpKQorICAgICAgICAgICAgICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAody0+ Y3VycmVudF9tYXRyaXgsIGksIGZhbHNlKTsKKyAgICAgICAgICB9CisgICAgICAvKiBXYXMgZGlz cGxheSBwcmVlbXB0ZWQ/ICovCisgICAgICBwYXVzZWRfcCA9IHJvdyA8IGVuZDsKKyAgICAgIHNl dF9jdXJzb3I6CisgICAgICAvKiBJZiB3ZSBqdW1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pKSk7 CisgICAgICAgICAgICsrZGVzaXJlZF9yb3cpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgdnBv cyA9IE1BVFJJWF9ST1dfVlBPUyAoZGVzaXJlZF9yb3csIHctPmRlc2lyZWRfbWF0cml4KTsKKyAg ICAgICAgICBpZiAoZGVzaXJlZF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIGNvbnRpbnVl OworICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnJlbnRfcm93ID0gTUFUUklYX1JPVyAo dy0+Y3VycmVudF9tYXRyaXgsIHZwb3MpOworICAgICAgICAgIGVudW0gbWNfcm93X3Bvc2l0aW9u IHJvd19wb3NpdGlvbiA9IG1jX3Jvd19wb3NpdGlvbiAodywgY3VycmVudF9yb3csIGN1cnJlbnRf cm93LCB2cG9zKTsKKyAgICAgICAgICBpZiAoY3VycmVudF9yb3ctPmVuYWJsZWRfcCkKKyAgICAg ICAgICAgIG1jX2RyYXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgY3VycmVudF9yb3csIGN1 cnJlbnRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBj dXJyZW50X3Jvdy0+eCwgY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgdnBvcywKKyAgICAg ICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRp b24sIGRyYXdfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBTRVRfQ1VSU09SX09ORSk7Cisg ICAgICAgIH0KKworICAgICAgbWNfcmVzdG9yZV9nbHlwaF9tYXRyaXggKHNhdmVkX2Rlc2lyZWQs IHctPmRlc2lyZWRfbWF0cml4KTsKKyAgICAgIG1jX3Jlc3RvcmVfZ2x5cGhfbWF0cml4IChzYXZl ZF9jdXJyZW50LCB3LT5jdXJyZW50X21hdHJpeCk7CisKKyAgICAgIG1jX3VwZGF0ZV93aW5kb3df ZXJhc2UgKHcsIG9sZF9tYXRyaXgpOworCisgICAgICBtY194ZnJlZV9jYWNoZV9tYXRyaXggKHcs ICZvbGRfbWF0cml4KTsKKworICAgIH0KKyAgLy8gY2xvY2tfdCBjbG9ja19lbmQgPSBjbG9jaygp OworICAvLyBkb3VibGUgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0gY2xv Y2tfc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICAvLyBmcHJpbnRmIChzdGRlcnIsICJtY19z Y3JvbGxpbmdfd2luZG93ICglcyk6ICBUSU1FICglZilcbiIsIG1jX3dpbmRvdyAodyksIGNwdV90 aW1lX3VzZWQpOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogLyogU3RydWN0dXJlIHRvIHBhc3MgZGltZW5zaW9ucyBhcm91bmQu ICBVc2VkIGZvciBjaGFyYWN0ZXIgYm91bmRpbmcKICAgIGJveGVzLCBnbHlwaCBtYXRyaXggZGlt ZW5zaW9ucyBhbmQgYWxpa2UuICAqLwogCkBAIC0yMjQxLDYgKzQwNjQsMTYgQEAgZnJlZV93aW5k b3dfbWF0cmljZXMgKHN0cnVjdCB3aW5kb3cgKncpCiAJICBmcmVlX2dseXBoX21hdHJpeCAody0+ Y3VycmVudF9tYXRyaXgpOwogCSAgZnJlZV9nbHlwaF9tYXRyaXggKHctPmRlc2lyZWRfbWF0cml4 KTsKIAkgIHctPmN1cnJlbnRfbWF0cml4ID0gdy0+ZGVzaXJlZF9tYXRyaXggPSBOVUxMOworCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIG1j X3hmcmVlX2NhY2hlX21hdHJpeCAodywgJnctPm1jX21hdHJpeCk7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIAl9CiAKICAgICAgIC8qIE5leHQgd2luZG93IG9uIHNhbWUgbGV2ZWwu ICAqLwpAQCAtMzM4Nyw2ICs1MjIwLDI2IEBAIGNoZWNrX2N1cnJlbnRfbWF0cml4X2ZsYWdzIChz dHJ1Y3Qgd2luZG93ICp3KQogc3RhdGljIGJvb2wKIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5k b3cgKncsIGJvb2wgZm9yY2VfcCkKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnBy aW50ZiAoc3RkZXJyLCAidXBkYXRlX3dpbmRvdyAoJXMpXG4iLCBtY193aW5kb3cgKHcpKTsKKwor ICBzdHJ1Y3QgbWNfZXNzZW50aWFscyBlc3NlbnRpYWxzOworICBtY19zZXRfZXNzZW50aWFscyAo dywgJmVzc2VudGlhbHMpOworCisgIG1jX3VwZGF0ZV93aW5kb3dfZHJ5cnVuICh3LCBmb3JjZV9w LCBlc3NlbnRpYWxzKTsKKworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpjdXJzb3JfbWF0cml4ID0g TlVMTDsKKworICBib29sIGRyYXdfcCA9IHRydWU7CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgc3RydWN0IGdseXBoX21hdHJpeCAqZGVzaXJlZF9tYXRyaXggPSB3LT5kZXNpcm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4JyBmb3IgY3Vyc29yIHJvdyBiYXNlZCBkZWNpc2lvbnMuICovCisg IGZvciAoc3RydWN0IGdseXBoX3JvdyAqbWNfcm93ID0gcm93OworICAgICAgIG1jX3JvdyA8IGVu ZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGluZyk7CisgICAgICAgKyttY19yb3cpCisgICAg eworICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKG1jX3JvdywgZGVzaXJlZF9tYXRy aXgpOworICAgICAgaWYgKG1jX3Jvdy0+ZW5hYmxlZF9wCisgICAgICAgICAgJiYgdnBvcyA9PSB3 LT5jdXJzb3IudnBvcykKKyAgICAgICAgeworICAgICAgICAgIGN1cnNvcl9tYXRyaXggPSBkZXNp cmVkX21hdHJpeDsKKyAgICAgICAgICBpZiAoIWZvcmNlX3AgJiYgKytuX3VwZGF0ZWQgJSBwcmVl bXB0X2NvdW50ID09IDApCisgICAgICAgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZ19pZ25vcmVf c3F1ZWV6YWJsZXMgKCk7CisgICAgICAgICAgY2hhbmdlZF9wIHw9IChCVUZGRVJQICh3LT5jb250 ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICB8fCAhIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgZmNfdmlzaWJsZSkpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgPyBtY191cGRhdGVfd2lu ZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3Nl bnRpYWxzLCBkcmF3X3ApCisgICAgICAgICAgICAgICAgICAgICAgIDogdXBkYXRlX3dpbmRvd19s aW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wKTsKKyAgICAgICAgICBpZiAo TUFUUklYX1JPV19CT1RUT01fWSAocm93KSA+PSB5YikKKyAgICAgICAgICAgIGZvciAoaW50IGkg PSB2cG9zICsgMTsgaSA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cyAtIDE7ICsraSkKKyAgICAg ICAgICAgICAgU0VUX01BVFJJWF9ST1dfRU5BQkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwgaSwg ZmFsc2UpOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgfQorCisgIGN1cnNvcl9t YXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICAgICAgLyogVXBkYXRlIHRoZSByZXN0IG9mIHRoZSBsaW5lcy4gICovCiAgICAgICBmb3Ig KDsgcm93IDwgZW5kICYmIChmb3JjZV9wIHx8ICFpbnB1dF9wZW5kaW5nKTsgKytyb3cpCiAJLyog c2Nyb2xsaW5nX3dpbmRvdyByZXNldHMgdGhlIGVuYWJsZWRfcCBmbGFnIG9mIHRoZSByb3dzIGl0 CkBAIC0zNDcxLDYgKzUzNjUsMTkgQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywg Ym9vbCBmb3JjZV9wKQogCWlmIChyb3ctPmVuYWJsZWRfcCkKIAkgIHsKIAkgICAgaW50IHZwb3Mg PSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgZGVzaXJlZF9tYXRyaXgpOworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICAgICAgLyogSWYg dGhlIGBjdXJzb3Jfcm93YCBpcyB3aXRoaW4gdGhlIGBkZXNpcmVkX21hdHJpeGAsIHRoZW4gaXQg d2FzCisgICAgICAgICAgcHJvY2Vzc2VkIGhlcmVpbmFib3ZlIGFuZCBzaG91bGQgYmUgc2tpcHBl ZCBhdCB0aGlzIHRpbWUuICovCisgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3Mp CisgICAgICAgICAgY29udGludWU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkg ICAgaW50IGk7CiAKIAkgICAgLyogV2UnbGwgaGF2ZSB0byBwbGF5IGEgbGl0dGxlIGJpdCB3aXRo IHdoZW4gdG8KQEAgLTM0NzksOCArNTM4NiwyMSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2lu ZG93ICp3LCBib29sIGZvcmNlX3ApCiAJICAgICAgIGNvbW1hbmRzIHdpbGwgdG9vIHF1aWNrbHkg cGF1c2UgcmVkaXNwbGF5LiAgKi8KIAkgICAgaWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVkICUg cHJlZW1wdF9jb3VudCA9PSAwKQogCSAgICAgIGRldGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9yZV9z cXVlZXphYmxlcyAoKTsKLQkgICAgY2hhbmdlZF9wIHw9IHVwZGF0ZV93aW5kb3dfbGluZSAodywg dnBvcywKLQkJCQkJICAgICAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wKTsKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgICAgIGNo YW5nZWRfcCB8PSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAg ICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgISBOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkpCisgICAgICAgICAg ICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFj ZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgZHJhd19wKQorICAgICAgICAgICAg ICAgICAgICAgICA6IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3Zl cndyaXR0ZW5fcCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIAkgICAgLyogTWFy ayBhbGwgcm93cyBiZWxvdyB0aGUgbGFzdCB2aXNpYmxlIG9uZSBpbiB0aGUgY3VycmVudAogCSAg ICAgICBtYXRyaXggYXMgaW52YWxpZC4gIFRoaXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2Ugb2YKQEAg LTM1MDEsNiArNTQyMSw0MSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29s IGZvcmNlX3ApCiAKICAgICBzZXRfY3Vyc29yOgogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIElmIHdlIGp1bXBlZCBoZXJlIGZyb20g YHNldF9jdXJzb3JgLCB0aGVuIHNldCB0aGUgYGN1cnNvcl9tYXRyaXhgLiAqLworICBpZiAoY3Vy c29yX21hdHJpeCA9PSBOVUxMKQorICAgIGN1cnNvcl9tYXRyaXggPSB3LT5jdXJyZW50X21hdHJp eDsKKworICAvKiBSZXNldCBgcm93YCB0byAwIHNvIHRoYXQgZmFrZSBjdXJzb3JzIGNhbiBiZSBk cmF3biBvbiByb3dzIHByZWNlZGluZyB0aGUKKyAgZmlyc3QgYHJvdy0+ZW5hYmxlZF9wYC4gIEp1 c3QgcHJpb3IgdG8gdGhlIGNhbGwgdG8gYHNjcm9sbGluZ193aW5kb3cnIGFib3ZlLAorICBgcm93 YCB3YXMgYWR2YW5jZWQgdG8gdGhlIGZpcnN0IGByb3ctPmVuYWJsZWRfcGAuICovCisgIGZvciAo c3RydWN0IGdseXBoX3JvdyAqZGVzaXJlZF9yb3cgPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJp eCwgMCk7CisgICAgICAgZGVzaXJlZF9yb3cgPCBlbmQKKyAgICAgICAmJiAoZm9yY2VfcCB8fCAh aW5wdXRfcGVuZGluZykKKyAgICAgICAvKiBXMzIgRW1hY3MgY3Jhc2hlcyBvbiBzdGFydHVwIHdp dGhvdXQgYSBCVUZGRVJQIGNoZWNrLiAqLworICAgICAgICYmIEJVRkZFUlAgKHctPmNvbnRlbnRz KQorICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25m KSkKKyAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jv c3NoYWlycykpCisgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGZjX3Zpc2libGUpKSk7CisgICAgICAgKytkZXNpcmVkX3JvdykKKyAgICB7CisgICAgICBp bnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAoZGVzaXJlZF9yb3csIGRlc2lyZWRfbWF0cml4KTsK KyAgICAgIGlmIChkZXNpcmVkX3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICBjb250aW51ZTsKKyAg ICAgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnJlbnRfcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVu dF9tYXRyaXgsIHZwb3MpOworICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9u ID0gbWNfcm93X3Bvc2l0aW9uICh3LCBjdXJyZW50X3JvdywgY3VycmVudF9yb3csIHZwb3MpOwor ICAgICAgaWYgKGN1cnJlbnRfcm93LT5lbmFibGVkX3ApCisgICAgICAgIG1jX2RyYXdfcm93ICh3 LCB3LT5jdXJyZW50X21hdHJpeCwgY3VycmVudF9yb3csIGN1cnJlbnRfcm93LT5nbHlwaHNbVEVY VF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfcm93LT54LCBjdXJyZW50X3Jv dy0+dXNlZFtURVhUX0FSRUFdLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21h dHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFNFVF9DVVJTT1JfVFdPKTsK KyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIC8qIFVwZGF0ZSB0 aGUgaGVhZGVyIGxpbmUgYWZ0ZXIgc2Nyb2xsaW5nIGJlY2F1c2UgYSBuZXcgaGVhZGVyCiAJIGxp bmUgd291bGQgb3RoZXJ3aXNlIG92ZXJ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SAqZiA9IFhGUkFNRSAoV0lO RE9XX0ZSQU1FICh3KSk7CisgIGZvciAoaW50IGkgPSAwOyBpIDwgdy0+Y3VycmVudF9tYXRyaXgt Pm5yb3dzOyArK2kpCisgICAgeworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gdy0+Y3Vy cmVudF9tYXRyaXgtPnJvd3MgKyBpOworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAg ICAgYnJlYWs7CisgICAgICAgIGVsc2UgaWYgKHJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgICAg Y29udGludWU7CisgICAgICBpZiAocm93LT5vdmVybGFwcGVkX3ApCisgICAgICAgIHsKKyAgICAg ICAgICBmb3IgKGVudW0gZ2x5cGhfcm93X2FyZWEgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFy ZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgb3V0 cHV0X2N1cnNvcl90byAodywgaSwgMCwgcm93LT55LCBhcmVhID09IFRFWFRfQVJFQSA/IHJvdy0+ eCA6IDApOworICAgICAgICAgICAgICBpZiAoIW1jX3JlZHJhd19yb3cgKHcsIHctPmN1cnJlbnRf bWF0cml4LCByb3csIGFyZWEsIHJvdy0+eCwgMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICByb3ctPnVzZWRbYXJlYV0sIHRydWUsIERSQVdfTk9STUFMX1RFWFQsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFX1dJTkRPV19fUkVEUkFXX09WRVJMQVBQ RURfUk9XUykKKyAgICAgICAgICAgICAgICAgICYmIHJvdy0+dXNlZFthcmVhXSkKKyAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICBGUkFNRV9SSUYgKGYpLT53cml0ZV9nbHlwaHMg KHcsIHJvdywgcm93LT5nbHlwaHNbYXJlYV0sIGFyZWEsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+dXNlZFthcmVhXSk7CisgICAgICAgICAgICAg ICAgICBGUkFNRV9SSUYgKGYpLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgcm93LCBhcmVhLCAtMSk7 CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgIHJvdy0+b3Zlcmxh cHBlZF9wID0gMDsKKyAgICAgICAgfQorICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJv dykgPj0geWIpCisgICAgICAgIGJyZWFrOworICAgIH0KKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogCSAgICAgIHJlZHJhd19vdmVybGFwcGluZ19yb3dzICh3LCB5Yik7CiAJICAgIH0K ICNlbmRpZgpAQCAtMzUzNiw4ICs1NTMzLDIwIEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5k b3cgKncsIGJvb2wgZm9yY2VfcCkKICNlbmRpZgogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVN CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisK KyAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgIG1jX3VwZGF0ZV93aW5kb3dfZnJp bmdlcyAodywgMCk7CisgICAgZWxzZQogICAgICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCAw KTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgLyogRW5kIHRoZSB1cGRh dGUgb2Ygd2luZG93IFcuICBEb24ndCBzZXQgdGhlIGN1cnNvciBpZiB3ZQogICAgICAgICAgcGF1 c2VkIHVwZGF0aW5nIHRoZSBkaXNwbGF5IGJlY2F1c2UgaW4gdGhpcyBjYXNlLAogICAgICAgICAg c2V0X3dpbmRvd19jdXJzb3JfYWZ0ZXJfdXBkYXRlIGhhc24ndCBiZWVuIGNhbGxlZCwgYW5kCmRp ZmYgLS1naXQgYS9zcmMvZnJhbWUuaCBiL3NyYy9mcmFtZS5oCmluZGV4IGZhNDVhMzIuLjUzYWQx MzEgMTAwNjQ0Ci0tLSBhL3NyYy9mcmFtZS5oCisrKyBiL3NyYy9mcmFtZS5oCkBAIC0yMDUsNiAr MjA1LDE2IEBAIHN0cnVjdCBmcmFtZQogICBMaXNwX09iamVjdCB0b29sX2Jhcl9pdGVtczsKICAg LyogdG9vbF9iYXJfaXRlbXMgc2hvdWxkIGJlIHRoZSBsYXN0IExpc3BfT2JqZWN0IG1lbWJlci4g ICovCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKyAgLyogTm9uLW5pbCB3aGVuIHRoZSBmcmFtZSBpcyBpbiB0aGUgcHJvY2VzcyBvZiBiZWlu ZyB1cGRhdGVkLiAqLworICBzdHJ1Y3QgZnJhbWUgKm1jX3VwZGF0aW5nX2ZyYW1lOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIENhY2hlIG9mIHJlYWxpemVkIGZhY2VzLiAg Ki8KICAgc3RydWN0IGZhY2VfY2FjaGUgKmZhY2VfY2FjaGU7CiAKZGlmZiAtLWdpdCBhL3NyYy9m cmluZ2UuY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4Li4uLnh4LiIKKyAgICAgICJ4Lnh4eHh4 eCIKKyAgICAgICJ4Lnh4eHh4eCIKKyAgICAgICJ4Li4uLnh4LiIKKyAgICAgICJ4Li4ueHguLiIK KyAgICAgICJ4Li54eC4uLiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIKKyAg ICAgICJ4Li4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3ZlcnRpY2FsX2Jh cl9yaWdodF9hcnJvd19iaXRzW10gPXsKKyAgMHg4MCwgMHg4MCwgMHg4MCwgMHg5OCwgMHg4Yywg MHg4NiwgMHhiZiwKKyAgMHhiZiwgMHg4NiwgMHg4YywgMHg5OCwgMHg4MCwgMHg4MCwgMHg4MH07 CisKKy8qIDI1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4u Lnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi54eC4uLnh4 IgorICAgICAgIi4ueHguLnh4IgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgInh4eHh4eHh4Igor ICAgICAgInh4eHh4eHh4IgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHguLnh4IgorICAg ICAgIi54eC4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAg Ii4uLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcmV2ZXJzZWRfdmVydGlj YWxfYmFyX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweDMsIDB4MywgMHgzLCAweDYzLCAweDMz LCAweDFiLCAweGZmLCAweGZmLCAweDFiLCAweDMzLCAweDYzLCAweDMsIDB4MywgMHgzfTsKKwor LyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgi CisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4ueHguLngiCisg ICAgICAieC4uLnh4LngiCisgICAgICAieC4uLi54eHgiCisgICAgICAieC54eHh4eHgiCisgICAg ICAieC54eHh4eHgiCisgICAgICAieC4uLi54eHgiCisgICAgICAieC4uLnh4LngiCisgICAgICAi eC4ueHguLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4 eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX3Jp Z2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDk5LCAweDhkLCAweDg3 LCAweGJmLAorICAweGJmLCAweDg3LCAweDhkLCAweDk5LCAweDgxLCAweDgxLCAweGZmfTsKKwor LyogMjcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgi CisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC54eC4ueHgiCisg ICAgICAieC4ueHgueHgiCisgICAgICAieC4uLnh4eHgiCisgICAgICAieHh4eHh4eHgiCisgICAg ICAieHh4eHh4eHgiCisgICAgICAieC4uLnh4eHgiCisgICAgICAieC4ueHgueHgiCisgICAgICAi eC54eC4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieHh4 eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19yZXZlcnNlZF9ob2xsb3dfcmVj dGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweGIxLCAw eDk5LCAweDhkLCAweGZmLAorICAweGZmLCAweDhkLCAweDk5LCAweGIxLCAweDgxLCAweDgxLCAw eGZmfTsKKworLyogMjgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAi eHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVj dGFuZ2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAw eDgxLAorICAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyog MjkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4u Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfYml0c1tdID17 CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsCisgIDB4ODAsIDB4 ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAzMAorICAgICgrLWZyaW5n ZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIK KyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAg ICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAg ICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIu Li4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGlj IHVuc2lnbmVkIHNob3J0IG1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcl9iaXRzW10gPXsKKyAgMHgz LCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4Mywg MHgzLCAweDN9OworCisvKiAzMQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAg ICAgICJ4eC4uLi4uLiIKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAgICAg ICIueHguLi4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIu Li54eC4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4u eHguLiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54 eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2JhY2tz bGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwgMHgx OCwgMHgxOCwgMHhjLCAweGMsIDB4NiwgMHg2LCAweDMsIDB4M307CisKKy8qIDMyCisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4u Li4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgIngueHguLi4u IgorICAgICAgIngueHguLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLnh4Li4uIgor ICAgICAgInguLi54eC4uIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgorICAg ICAgInguLi4ueHguIgorICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10gPXsK KyAgMHhjMCwgMHhjMCwgMHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwgMHg4 YywgMHg4YywgMHg4NiwgMHg4NiwgMHg4MywgMHg4M307CisKKy8qIDMzCisgICAgKCstZnJpbmdl LWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi54eHh4eHguIgorICAgICAgInh4eHgueC4uIgor ICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4uIgorICAgICAgIi54eHgueC4uIgorICAg ICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAg Ii4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIikKKyovCitzdGF0 aWMgdW5zaWduZWQgc2hvcnQgbWNfcGlsY3Jvd19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwgMHhm NCwgMHhmNCwgMHg3NCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisKKy8q IDM0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4ueHh4eC4uIgor ICAgICAgIi54eHh4eHguIgorICAgICAgInguLnh4Li54IgorICAgICAgInguLnh4Li54IgorICAg ICAgInh4eHh4eHh4IgorICAgICAgInh4Li4uLnh4IgorICAgICAgInh4eC4ueHh4IgorICAgICAg Ii54eHh4eHguIgorICAgICAgIi4ueHh4eC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfc21pbGV5X2ZhY2VfYml0c1tdID17CisgIDB4M2MsIDB4N2UsIDB4OTksIDB4OTksIDB4ZmYs IDB4YzMsIDB4ZTcsIDB4N2UsIDB4M2N9OworCisvKiAzNQorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICIuLnguLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIu Li4ueC4uLiIKKyAgICAgICIuLi4uLnguLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi54 Li4uLiIKKyAgICAgICIuLnguLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Np bmdsZV9hbmdsZV9yaWdodF9iaXRzW10gPXsKKyAgMHgyMCwgMHgxMCwgMHg4LCAweDQsIDB4OCwg MHgxMCwgMHgyMH07CisKKy8qIDM2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAor ICAgICAgIi4uLi4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAg ICAgIi4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAg Ii4uLi4ueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX2xl ZnRfYml0c1tdID17CisgIDB4NCwgMHg4LCAweDEwLCAweDIwLCAweDEwLCAweDgsIDB4NH07CisK Ky8qIDM3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4Li4u IgorICAgICAgIi54eC54eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4Igor ICAgICAgIi4ueHgueHguIgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9ewor ICAweGQ4LCAweDZjLCAweDM2LCAweDFiLCAweDM2LCAweDZjLCAweGQ4fTsKKworLyogMzgKKyAg ICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueHgueHgiCisgICAgICAi Li54eC54eC4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4 Lnh4Li4iCisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiKQorKi8KK3N0YXRpYyB1 bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxYiwgMHgz NiwgMHg2YywgMHhkOCwgMHg2YywgMHgzNiwgMHgxYn07CisKKy8qIDM5CisgICAgKCstZnJpbmdl LWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIngueC54Li4uIgorICAgICAgIi54LngueC4uIgor ICAgICAgIi4ueC54LnguIgorICAgICAgIi4uLngueC54IgorICAgICAgIi4ueC54LnguIgorICAg ICAgIi54LngueC4uIgorICAgICAgIngueC54Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfdHJpcGxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGE4LCAweDU0LCAweDJhLCAw eDE1LCAweDJhLCAweDU0LCAweGE4fTsKKworLyogNDAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngu eC54Li4iCisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54Lngu eC4iCisgICAgICAiLi4ueC54LngiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlw bGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxNSwgMHgyYSwgMHg1NCwgMHhhOCwgMHg1NCwg MHgyYSwgMHgxNX07CisKKy8qIDQxCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAor ICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAg Ii54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMg dW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAw LCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwLCAw eDAwfTsKKworLyogNDIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAi Li4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54Lngu Li4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4i CisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgw MCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH07 CisKKy8qIDQzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4u Li4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4u IgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgor ICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAw LCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAw eDAwLCAweDAwLCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4i CisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAg ICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfZG93 bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5Miwg MHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQ1CisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4u IgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgor ICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAg ICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAg Ii4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3Vw X2JpdHNbXSA9eworICAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAw eDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwfTsKKworLyogNDYKKyAgICAoKy1mcmluZ2UtaGVs cGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAi LnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLngu Li54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4u Li4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9i aXRzW10gPXsKKyAgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5 MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMH07CisKKy8qIDQ3CisgICAgKCstZnJpbmdlLWhlbHBl ci1oZXhhZGVjaW1hbAorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAg Ii54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54 Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4u eC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4u IgorICAgICAgInguLi4uLnguIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1 cGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAw eDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyfTsKKworLyogNDgK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4ueC4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAi LnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLngu Li54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54 Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iKQorKi8KK3N0YXRpYyB1bnNp Z25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHg4MiwgMHg0NCwg MHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgy OCwgMHgxMH07CisKIC8qIE5PVEU6ICBUaGUgb3JkZXIgb2YgdGhlc2UgYml0bWFwcyBtdXN0IG1h dGNoIHRoZSBzZXF1ZW5jZQogICAgdXNlZCBpbiBmcmluZ2UuZWwgdG8gZGVmaW5lIHRoZSBjb3Jy ZXN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aXRtYXAuICovCitpbnQKK21j X2dldF9mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCBiaXRtYXAs IGludCByaWdodF9wLCBpbnQgcGFydGlhbF9wKQoreworICBMaXNwX09iamVjdCBjbWFwLCBibTEg PSBRbmlsLCBibTIgPSBRbmlsLCBibTsKKyAgRU1BQ1NfSU5UIGxuMSA9IDAsIGxuMiA9IDA7Cisg IGludCBpeDEgPSByaWdodF9wOworICBpbnQgaXgyID0gaXgxICsgKHBhcnRpYWxfcCA/IDIgOiAw KTsKKyAgaWYgKChjbWFwID0gQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmcmluZ2VfaW5k aWNhdG9yX2FsaXN0KSksICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAgICBibTEgPSBtY19hc3Nx IChiaXRtYXAsIGNtYXApOworICAgICAgaWYgKENPTlNQIChibTEpKQorICB7CisgICAgaWYgKChi bTEgPSBYQ0RSIChibTEpKSwgTklMUCAoYm0xKSkKKyAgICAgIHJldHVybiBNQ19OT19GUklOR0Vf QklUTUFQOworICAgIGlmIChDT05TUCAoYm0xKSkKKyAgICAgIHsKKyAgICAgICAgbG4xID0gWEZJ WE5VTSAoRmxlbmd0aCAoYm0xKSk7CisgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAgICAg eworICAgICAgICAgICAgaWYgKGxuMSA+IGl4MikKKyAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMSk7CisgICAgICAgICAgICAgICAgaWYgKCFFUSAo Ym0sIFF0KSkKKyAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgIH0K KyAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBpZiAobG4xID4gaXgxKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGJt ID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQp KQorICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIH0KKyAgICAgIH0KKyAgICBlbHNlIGlmICgoYm0gPSBibTEsICFFUSAoYm0sIFF0 KSkpCisgICAgICBnb3RvIGZvdW5kOworICB9CisgICAgfQorICBpZiAoIUVRIChjbWFwLCBCVkFS ICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkKKyAgICAgICYmICFO SUxQIChCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkpCisg ICAgeworICAgICAgYm0yID0gbWNfYXNzcSAoYml0bWFwLCBCVkFSICgmYnVmZmVyX2RlZmF1bHRz LCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSk7CisgICAgICBpZiAoQ09OU1AgKGJtMikpCisgICAg ICAgIHsKKyAgICAgICAgICBpZiAoKGJtMiA9IFhDRFIgKGJtMikpLCAhTklMUCAoYm0yKSkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKENPTlNQIChibTIpKQorICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgIGxuMiA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMikpOwor ICAgICAgICAgICAgICAgICAgaWYgKHBhcnRpYWxfcCkKKyAgICAgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgICAgIGlmIChsbjIgPiBpeDIpCisgICAgICAgICAgICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMik7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0K KyAgICAgICAgfQorICAgIH0KKyAgaWYgKGxuMSA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IG1j X250aCAoaXgxLCBibTEpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgZ290byBm b3VuZDsKKyAgICB9CisgIGlmIChsbjIgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBtY19udGgg KGl4MSwgYm0yKTsKKyAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgIGdvdG8gZm91bmQ7 CisgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICB9CisgICAgZWxzZSBpZiAo KGJtID0gYm0yLCBOSUxQIChibSkpKQorICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7 CisgIGZvdW5kOgorICByZXR1cm4gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJtKTsKK30KKworc3Rh dGljIGludAorbWNfZ2V0X2xvZ2ljYWxfY3Vyc29yX2JpdG1hcCAoc3RydWN0IHdpbmRvdyAqdywg TGlzcF9PYmplY3QgY3Vyc29yKQoreworICBMaXNwX09iamVjdCBjbWFwLCBibSA9IFFuaWw7Cisg IGlmICgoY21hcCA9IEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZnJpbmdlX2N1cnNvcl9h bGlzdCkpLCAhTklMUCAoY21hcCkpCisgICAgeworICAgICAgYm0gPSBtY19hc3NxIChjdXJzb3Is IGNtYXApOworICAgICAgaWYgKENPTlNQIChibSkpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAo KGJtID0gWENEUiAoYm0pKSwgTklMUCAoYm0pKQorICAgICAgICAgICAgcmV0dXJuIE1DX05PX0ZS SU5HRV9CSVRNQVA7CisgICAgICAgICAgcmV0dXJuIGxvb2t1c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GlhbC1yaWdodAorICBJZiBhbnkgdmFsdWUgaW4gbG9jYWwgYmluZGluZyBpcyBub3Qg cHJlc2VudCBvciB0LCB1c2UgZ2xvYmFsIHZhbHVlLgorICAgICBJZiBwYXJ0aWFsLCBsb29rdXAg cGFydGlhbCBiaXRtYXAgaW4gZGVmYXVsdCB2YWx1ZSBpZiBub3QgZm91bmQgaGVyZS4KKyAgICAg SWYgbm90IHBhcnRpYWwsIG9yIG5vIHBhcnRpYWwgc3BlYyBpcyBwcmVzZW50LCB1c2Ugbm9uLXBh cnRpYWwgYml0bWFwLiAgKi8KKyAgaWYgKChjbWFwID0gQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSksICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAg ICBibTEgPSBtY19hc3NxIChiaXRtYXAsIGNtYXApOworICAgICAgaWYgKENPTlNQIChibTEpKQor ICAgICAgICB7CisgICAgICAgICAgaWYgKChibTEgPSBYQ0RSIChibTEpKSwgTklMUCAoYm0xKSkK KyAgICAgICAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIGlmIChD T05TUCAoYm0xKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbG4xID0gWEZJWE5VTSAo Rmxlbmd0aCAoYm0xKSk7CisgICAgICAgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4MikKKyAgICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMSk7Cisg ICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAg ICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICBpZiAobG4xID4gaXgxKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICAgICAgICAg ICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICBn b3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKChibSA9IGJtMSwgIUVRIChibSwg UXQpKSkKKyAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYg KCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlz dCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGlj YXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IG1jX2Fzc3EgKGJpdG1hcCwgQlZBUiAo JmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpOworICAgICAgaWYgKENP TlNQIChibTIpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibTIgPSBYQ0RSIChibTIpKSwg IU5JTFAgKGJtMikpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChDT05TUCAoYm0y KSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBsbjIgPSBYRklYTlVNIChG bGVuZ3RoIChibTIpKTsKKyAgICAgICAgICAgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBpZiAobG4yID4gaXgyKQorICAg ICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBibSA9IG1j X250aCAoaXgyLCBibTIpOworICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwg UXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChsbjEgPiBpeDEpCisgICAg eworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgIGlmICghRVEgKGJtLCBRdCkp CisgICAgICAgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAobG4yID4gaXgxKQorICAgIHsKKyAg ICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAg ICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAg fQorICAgIGVsc2UgaWYgKChibSA9IGJtMiwgTklMUCAoYm0pKSkKKyAgICAgIHJldHVybiBNQ19O T19GUklOR0VfQklUTUFQOworICBmb3VuZDoKKyAgcmV0dXJuIGxvb2t1cF9mcmluZ2VfYml0bWFw IChibSk7Cit9CisKKy8qIFJlY2FsY3VsYXRlIHRoZSBiaXRtYXBzIHRvIHNob3cgaW4gdGhlIGZy aW5nZXMgb2Ygd2luZG93IFcuCisgICBPbmx5IG1hcmsgcm93cyB3aXRoIG1vZGlmaWVkIGJpdG1h cHMgZm9yIHVwZGF0ZSBpbiByZWRyYXdfZnJpbmdlX2JpdG1hcHNfcC4KKyAgIElmIEtFRVBfQ1VS UkVOVF9QIGlzIDAsIHVwZGF0ZSBjdXJyZW50X21hdHJpeCB0b28uICovCitib29sCittY191cGRh dGVfd2luZG93X2ZyaW5nZXMgKHN0cnV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LT5wc2V1ZG9f d2luZG93X3ApCisgICAgcmV0dXJuIDA7CisgIGlmICghTUlOSV9XSU5ET1dfUCAodykKKyAgICAg ICYmIChpbmQgPSBCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGluZGljYXRlX2J1ZmZlcl9i b3VuZGFyaWVzKSwgIU5JTFAgKGluZCkpKQorICAgIHsKKyAgICAgIGlmIChFUSAoaW5kLCBRbGVm dCkgfHwgRVEgKGluZCwgUXJpZ2h0KSkKKyAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlf Ym90ID0gYXJyb3dfdG9wID0gYXJyb3dfYm90ID0gaW5kOworICAgICAgICBlbHNlIGlmIChDT05T UCAoaW5kKQorICAgICAgICAgICAgICAgICAmJiBDT05TUCAoWENBUiAoaW5kKSkpCisgICAgICAg IHsKKyAgICAgICAgICBMaXNwX09iamVjdCBwb3M7CisgICAgICAgICAgaWYgKHBvcyA9IG1jX2Fz c3EgKFF0LCBpbmQpLCAhTklMUCAocG9zKSkKKyAgICAgICAgICAgIGJvdW5kYXJ5X3RvcCA9IGJv dW5kYXJ5X2JvdCA9IGFycm93X3RvcCA9IGFycm93X2JvdCA9IFhDRFIgKHBvcyk7CisgICAgICAg ICAgaWYgKHBvcyA9IG1jX2Fzc3EgKFF0b3AsIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAg ICAgYm91bmRhcnlfdG9wID0gWENEUiAocG9zKTsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNz cSAoUWJvdHRvbSwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBib3VuZGFyeV9ib3Qg PSBYQ0RSIChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRdXAsIGluZCksICFO SUxQIChwb3MpKQorICAgICAgICAgICAgYXJyb3dfdG9wID0gWENEUiAocG9zKTsKKyAgICAgICAg ICBpZiAocG9zID0gbWNfYXNzcSAoUWRvd24sIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAg ICAgYXJyb3dfYm90ID0gWENEUiAocG9zKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAg ICAgICAgLyogQW55dGhpbmcgZWxzZSBtZWFucyBib3VuZGFyeSBvbiBsZWZ0IGFuZCBubyBhcnJv d3MuICAqLworICAgICAgICAgIGJvdW5kYXJ5X3RvcCA9IGJvdW5kYXJ5X2JvdCA9IFFsZWZ0Owor ICAgIH0KKyAgdG9wX2luZF9ybiA9IGJvdF9pbmRfcm4gPSAtMTsKKyAgaWYgKCFOSUxQIChpbmQp KQorICAgIHsKKyAgICAgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJuID0gMDsKKyAgICAgICAgICAg eSA8IHliICYmIHJuIDwgbnJvd3M7CisgICAgICAgICAgIHkgKz0gcm93LT5oZWlnaHQsICsrcm4p CisgICAgICAgIHsKKyAgICAgICAgICByb3cgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJu OworICAgICAgICAgIGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICByb3cgPSB3LT5j dXJyZW50X21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgIHJvdy0+aW5kaWNhdGVfYm9iX3Ag PSByb3ctPmluZGljYXRlX3RvcF9saW5lX3AgPSAwOworICAgICAgICAgIHJvdy0+aW5kaWNhdGVf ZW9iX3AgPSByb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3AgPSAwOworICAgICAgICAgIGlmICgh cm93LT5tb2RlX2xpbmVfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKHRvcF9p bmRfcm4gPCAwICYmIHJvdy0+dmlzaWJsZV9oZWlnaHQgPiAwKQorICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgIGlmIChNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdykgPD0g QlVGX0JFR1YgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSkKKyAgICAgICAgICAgICAgICAgICAgICAm JiAhTUFUUklYX1JPV19QQVJUSUFMTFlfVklTSUJMRV9BVF9UT1BfUCAodywgcm93KSkKKyAgICAg ICAgICAgICAgICAgICAgcm93LT5pbmRpY2F0ZV9ib2JfcCA9ICFOSUxQIChib3VuZGFyeV90b3Ap OworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgcm93LT5p bmRpY2F0ZV90b3BfbGluZV9wID0gIU5JTFAgKGFycm93X3RvcCk7CisgICAgICAgICAgICAgICAg ICB0b3BfaW5kX3JuID0gcm47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBpZiAo Ym90X2luZF9ybiA8IDApCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYg KE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPj0gQlVGX1pWIChYQlVGRkVSICh3LT5jb250 ZW50cykpCisgICAgICAgICAgICAgICAgICAgICAgJiYgIU1BVFJJWF9ST1dfUEFSVElBTExZX1ZJ U0lCTEVfQVRfQk9UVE9NX1AgKHcsIHJvdykpCisgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5k aWNhdGVfZW9iX3AgPSAhTklMUCAoYm91bmRhcnlfYm90KSwgYm90X2luZF9ybiA9IHJuOworICAg ICAgICAgICAgICAgICAgICBlbHNlIGlmICh5ICsgcm93LT5oZWlnaHQgPj0geWIpCisgICAgICAg ICAgICAgICAgICAgICAgcm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wID0gIU5JTFAgKGFycm93 X2JvdCksIGJvdF9pbmRfcm4gPSBybjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICB9CisgIGVtcHR5X3BvcyA9IEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgaW5kaWNhdGVfZW1wdHlfbGluZXMpOworICBpZiAoIU5JTFAgKGVtcHR5X3BvcykgJiYg IUVRIChlbXB0eV9wb3MsIF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2luZF9tYXhfeSA9IC0xOworICBpZiAodG9wX2lu ZF9ybiA+PSAwKQorICAgIHsKKyAgICAgIGludCBibiA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7Cisg ICAgICByb3cgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHRvcF9pbmRfcm47CisgICAgICBp ZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICByb3cgPSB3LT5jdXJyZW50X21hdHJpeC0+cm93 cyArIHRvcF9pbmRfcm47CisgICAgICB0b3Bfcm93X2VuZHNfYXRfenZfcCA9IHJvdy0+ZW5kc19h dF96dl9wOworICAgICAgaWYgKHJvdy0+aW5kaWNhdGVfYm9iX3ApCisgICAgICAgIHsKKyAgICAg ICAgICBpZiAoRVEgKGJvdW5kYXJ5X3RvcCwgUWxlZnQpKQorICAgICAgICAgICAgYm4gPSAoKHJv dy0+aW5kaWNhdGVfZW9iX3AgJiYgRVEgKGJvdW5kYXJ5X2JvdCwgUWxlZnQpKQorICAgICAgICAg ICAgICAgICAgPyBNQ19MRUZUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20sIHJvdy0+ZW5kc19hdF96 dl9wKQorICAgICAgICAgICAgICAgICAgOiBNQ19MRUZUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOwor ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBibiA9ICgocm93LT5pbmRpY2F0ZV9lb2Jf cCAmJiBFUSAoYm91bmRhcnlfYm90LCBRcmlnaHQpKQorICAgICAgICAgICAgICAgICAgICA/IE1D X1JJR0hUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKQorICAgICAg ICAgICAgICAgICAgICA6IE1DX1JJR0hUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOworICAgICAgICB9 CisgICAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCkKKyAgICAgICAgICB7 CisgICAgICAgICAgICBpZiAoRVEgKGFycm93X3RvcCwgUWxlZnQpKQorICAgICAgICAgICAgICBi biA9IE1DX0xFRlRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDYsIFF1cCwgMCk7CisgICAgICAgICAg fQorICAgICAgaWYgKGJuICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgIHsKKyAgICAg ICAgICBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCAqZmIgPSBnZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChi bik7CisgICAgICAgICAgaWYgKGZiLT5hbGlnbiA9PSBBTElHTl9CSVRNQVBfVE9QICYmIGZiLT5w ZXJpb2QgPT0gMCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3Jv dyAqcm93MTsKKyAgICAgICAgICAgICAgaW50IHRvcF9pbmRfbWF4X3k7CisgICAgICAgICAgICAg IHRvcF9pbmRfbWluX3kgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgICAg ICAgICAgdG9wX2luZF9tYXhfeSA9IHRvcF9pbmRfbWluX3kgKyBmYi0+aGVpZ2h0OworICAgICAg ICAgICAgICBpZiAodG9wX2luZF9tYXhfeSA+IHliKQorICAgICAgICAgICAgICAgIHRvcF9pbmRf bWF4X3kgPSB5YjsKKyAgICAgICAgICAgICAgZm9yICh5ID0gcm93LT55ICsgcm93LT5oZWlnaHQs IHJuID0gdG9wX2luZF9ybiArIDE7CisgICAgICAgICAgICAgICAgICAgeSA8IHRvcF9pbmRfbWF4 X3kgJiYgcm4gPCBucm93czsKKyAgICAgICAgICAgICAgICAgICB5ICs9IHJvdzEtPmhlaWdodCwg cm4rKykKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAoYm90X2luZF9y biA+PSAwICYmIHJuID49IGJvdF9pbmRfcm4pCisgICAgICAgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47Cisg ICAgICAgICAgICAgICAgICBpZiAoIXJvdzEtPmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgICAg ICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAg ICByb3cxLT5pbmRpY2F0ZV9ib2JfcCA9IHJvdy0+aW5kaWNhdGVfYm9iX3A7CisgICAgICAgICAg ICAgICAgICByb3cxLT5pbmRpY2F0ZV90b3BfbGluZV9wID0gcm93LT5pbmRpY2F0ZV90b3BfbGlu ZV9wOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0K KyAgaWYgKGJvdF9pbmRfcm4gPj0gMCkKKyAgICB7CisgICAgICBpbnQgYm4gPSBNQ19OT19GUklO R0VfQklUTUFQOworICAgICAgcm93ID0gdy0+ZGVzaXJlZF9tYXRyaXgtPnJvd3MgKyBib3RfaW5k X3JuOworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgcm93ID0gdy0+Y3VycmVu dF9tYXRyaXgtPnJvd3MgKyBib3RfaW5kX3JuOworICAgICAgYm90X3Jvd19lbmRzX2F0X3p2X3Ag PSByb3ctPmVuZHNfYXRfenZfcDsKKyAgICAgIGlmIChyb3ctPmluZGljYXRlX2VvYl9wKQorICAg ICAgICB7CisgICAgICAgICAgaWYgKEVRIChib3VuZGFyeV9ib3QsIFFsZWZ0KSkKKyAgICAgICAg ICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDMsIFFib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKTsK KyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDMs IFFib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlm IChyb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3ApCisgICAgICAgICAgeworICAgICAgICAgICAg aWYgKEVRIChhcnJvd19ib3QsIFFsZWZ0KSkKKyAgICAgICAgICAgICAgYm4gPSBNQ19MRUZUX0ZS SU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAg Ym4gPSBNQ19SSUdIVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICB9CisgICAgICBp ZiAoYm4gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVj dCBmcmluZ2VfYml0bWFwICpmYiA9IGdldF9mcmluZ2VfYml0bWFwX2RhdGEgKGJuKTsKKyAgICAg ICAgICBpZiAoZmItPmFsaWduID09IEFMSUdOX0JJVE1BUF9CT1RUT00gJiYgZmItPnBlcmlvZCA9 PSAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cx OworICAgICAgICAgICAgICBpbnQgYm90X2luZF9taW5feTsKKyAgICAgICAgICAgICAgYm90X2lu ZF9tYXhfeSA9IHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQ7CisgICAgICAgICAgICAgIGJv dF9pbmRfbWluX3kgPSBib3RfaW5kX21heF95IC0gZmItPmhlaWdodDsKKyAgICAgICAgICAgICAg aWYgKGJvdF9pbmRfbWluX3kgPCBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KSkKKyAgICAg ICAgICAgICAgICBib3RfaW5kX21pbl95ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7 CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSwgcm4gPSBib3RfaW5kX3JuIC0gMTsKKyAg ICAgICAgICAgICAgICAgICB5ID49IGJvdF9pbmRfbWluX3kgJiYgcm4gPj0gMDsKKyAgICAgICAg ICAgICAgICAgICB5IC09IHJvdzEtPmhlaWdodCwgcm4tLSkKKyAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICBpZiAodG9wX2luZF9ybiA+PSAwICYmIHJuIDw9IHRvcF9pbmRfcm4p CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgcm93MSA9IHct PmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICBpZiAoIXJvdzEt PmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4 LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV9lb2JfcCA9IHJv dy0+aW5kaWNhdGVfZW9iX3A7CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV9ib3R0 b21fbGluZV9wID0gcm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgYm9vbCBhdXRvX2hzY3JvbGxf bW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRvX2hzY3JvbGxfbW9kZSwgdy0+ Y29udGVudHMpLCBRY3VycmVudF9saW5lKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1 KSAqLworICBib29sIGhzY2xfYWxsX3RlbXBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAor ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8 IGFuZCBkbyBub3RoaW5nLiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMF9wID0gKHctPnN1c3Bl bmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Ny b2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAw CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7 CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyBlbHNlIGJlc2lkZXMg aG9yaXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAgICAgICAgICAgICAgIGN1cnJlbnQgbGluZSBk aWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9u dGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8xX3Ag PSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct PmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3Jv bGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0g dy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIC4uLgorICAgICAgICAg ICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJl bnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hz Y3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA9PSAwCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIC8qIEVY QU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0aGUgbGVmdCBhcnJvdyBr ZXkgb25lIHRpbWUuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFs bHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAgYm9vbCBoc2NsX3RlbXBfcCA9ICghdy0+c3Vz cGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxf bW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMt dSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBjdXJyZW50IGxpbmUgdG8g YmUKKyAgICAgICAgICAgICAgIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4KKyAg ICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZm ZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1fcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3Jv bGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAg ICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNj cm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFt ZSk7CisgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJuID0gMDsKKyAgICAgICB5IDwgeWIgJiYgcm4g PCBucm93czsKKyAgICAgICB5ICs9IHJvdy0+aGVpZ2h0LCBybisrKQorICAgIHsKKyAgaW50IGxl ZnQsIHJpZ2h0OworICB1bnNpZ25lZCBsZWZ0X2ZhY2VfaWQsIHJpZ2h0X2ZhY2VfaWQ7CisgIGlu dCBsZWZ0X29mZnNldCwgcmlnaHRfb2Zmc2V0OworICBib29sIHBlcmlvZGljX3A7CisgIHJvdyA9 IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgIGN1ciA9IHctPmN1cnJlbnRfbWF0cml4 LT5yb3dzICsgcm47CisgIGludCB2bnRoX2RtID0gTUFUUklYX1JPV19WUE9TICh3LT5kZXNpcmVk X21hdHJpeC0+cm93cyArIHJuLCB3LT5kZXNpcmVkX21hdHJpeCk7CisgIGludCB2bnRoX2NtID0g TUFUUklYX1JPV19WUE9TICh3LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHJuLCB3LT5jdXJyZW50 X21hdHJpeCk7CisgIGVudW0gbWNfcm93X3Bvc2l0aW9uIHJvd19wb3NpdGlvbiA9IG1jX3Jvd19w b3NpdGlvbiAodywgY3VyLCBjdXIsIHZudGhfY20pOworICBpbnQgbWNfbGVmdF9mcmluZ2VfYml0 bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyA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tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgYm9vbCBhY3RpdmVfcCA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYWN0aXZlX3A7Cisg ICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRo X2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvcjsKKyAgICAgIGJvb2wgZW5h YmxlZF9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF9jbV0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XS5lbmFibGVkX3A7CisgICAgICBpZiAoKHZwb3MgPT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhf Y20pCisgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQ CisgICAgICAgICAgJiYgIWhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICYmICFoc2NsX3RlbXBf cAorICAgICAgICAgICYmICFoc2NsX3Blcm1fcAorICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJt XzBfcAorICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAgICYmICFoc2Ns X2FsbF9wZXJtXzJfcAorICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgeworICAgICAg ICAgIGludCBmcmluZ2VfYml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICBl bnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICghYWN0aXZl X3AKKyAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj aF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3 LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1 ZSkKKyAgICAgICAgICAgIDogKGFjdGl2ZV9wKQorICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1l ZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctcHJlLXp2LWZhY2UiKSwgdHJ1 ZSkKKyAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIG1jX2xlZnRfZnJp bmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2VfaWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOwor ICAgICAgICAgIGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgICAgICBmcmluZ2VfYml0bWFw ID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJvdyIpLCBm YWxzZSwgdHJ1ZSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRt YXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFycm93Iiks IHRydWUsIHRydWUpOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3Jf dHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAo KHZwb3MgPT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgICAgICAgICYm IGdseXBoX2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUAorICAgICAgICAgICAgICAg ICAmJiAoaHNjbF9hbGxfdGVtcF9wCisgICAgICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9w ZXJtXzBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8xX3AKKyAgICAg ICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgICAgICAgICAg ICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJtX3ApCisg ICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBp bnQgZnJpbmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgICBlbnVt IGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICAgKCFhY3RpdmVf cAorICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg Y2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1pbmFjdGl2ZS1wcmUtenYtZmFj ZSIpLCB0cnVlKQorICAgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICA/ IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1w cmUtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAg ICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVG VF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAgIGlmIChoc2NsX2FsbF9wZXJtXzBf cCkKKyAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3 LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCBmYWxzZSwgZmFsc2UpOworICAgICAgICAgICAgICBl bHNlIGlmIChoc2NsX2FsbF9wZXJtXzFfcCkKKyAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFw ID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUs IGZhbHNlKTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzJfcCkKKyAg ICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywg aW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIHRydWUpOworICAgICAgICAgICAgICAgICAg ZWxzZSBpZiAoaHNjbF9wZXJtX3ApCisgICAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAg PSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwg dHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkKKyAg ICAgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAg KHcsIGludGVybiAoIistaHNjbC10ZW1wIiksIGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAgICAg ICAgICAgICAgZWxzZSBpZiAoaHNjbF90ZW1wX3ApCisgICAgICAgICAgICAgICAgICAgICAgICBm cmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10 ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9 IChjdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIH0KKyAg ICAgICAgICBlbHNlIGlmICgodnBvcyA9PSB2bnRoX2RtIHx8IHZwb3MgPT0gdm50aF9jbSkKKyAg ICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xF X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0g TUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAg IHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAg ICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNI KQorICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAg ICAgICAgICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1D X0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0g TUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3Rh bmdsZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9 PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0 X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlw aF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g UW1jX3JldmVyc2VkX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRp Y2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogUW5pbDsKKyAgICAgICAgICAgICAgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCA9IChjdXJz b3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2b3Ip CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0Vf QklUTUFQOworICAgICAgICAgICAgICBtY19yaWdodF9mcmluZ2VfZmFjZV9pZCA9CisgICAgICAg ICAgICAgICAgKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAg ICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVgorICAgICAgICAgICAgICAgICAmJiAo Z2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29r dXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2Ui KSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklO R0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWCisg ICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1df UkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikp CisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIr LXJldmVyc2VkLWJhci1hdC16di1mYWNlIiksIHRydWUpCisgICAgICAgICAgICAgICAgOiAoY3Vy c29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICYm IHJvd19wb3NpdGlvbiA9PSBQT1NUX1pWCisgICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2Zs YXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09 IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9u YW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UiKSwg dHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0Vf QklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVgorICAg ICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVD VEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9 IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAg ICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJhci1wcmUtenYt ZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hU X0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gQVRf WlYKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9M TE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2Zs YXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAg ICAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1iYXIt YXQtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1D X1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24g PT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZF UlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgJiYg Z2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAg ICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSB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ICg0LCBRY29udGludWF0aW9uLCAw KTsKKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW1wdHlfbGluZV9wICYmIEVRIChlbXB0 eV9wb3MsIFFsZWZ0KSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg1LCBRZW1wdHlf bGluZSwgMCk7CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9saW5lX3AgJiYgRVEg KGFycm93X3RvcCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9IE1DX0xFRlRf RlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5kX21pbl95ID49IDApCisg ICAgICAgICAgICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kgLSByb3ctPnk7CisgICAgICAg IH0KKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCAmJiBFUSAoYXJy b3dfYm90LCBRbGVmdCkpCisgICAgICAgIHsKKyAgICAgICAgICBsZWZ0ID0gTUNfTEVGVF9GUklO R0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICBpZiAoYm90X2luZF9tYXhfeSA+PSAwKQorICAg ICAgICAgICAgbGVmdF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+dmlz aWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIGxlZnQgPSBNQ19O T19GUklOR0VfQklUTUFQOworICAgICAgLyogRGVjaWRlIHdoaWNoIGJpdG1hcCB0byBkcmF3IGlu IHRoZSByaWdodCBmcmluZ2UuICAqLworICAgICAgaWYgKFdJTkRPV19SSUdIVF9GUklOR0VfV0lE VEggKHcpID09IDApCisgICAgICAgIHJpZ2h0ID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAg IGVsc2UgaWYgKHJvdy0+cmlnaHRfdXNlcl9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9C SVRNQVApCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IHJvdy0+cmlnaHRfdXNlcl9mcmlu Z2VfYml0bWFwOworICAgICAgICAgIHJpZ2h0X2ZhY2VfaWQgPSByb3ctPnJpZ2h0X3VzZXJfZnJp bmdlX2ZhY2VfaWQ7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKCghcm93LT5yZXZlcnNlZF9w ICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICB8fCAocm93LT5y ZXZlcnNlZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCkpCisgICAgICAgIHJpZ2h0ID0g TUNfUklHSFRfRlJJTkdFICgwLCBRdHJ1bmNhdGlvbiwgMCk7CisgICAgICBlbHNlIGlmIChyb3ct PmluZGljYXRlX2JvYl9wICYmIEVRIChib3VuZGFyeV90b3AsIFFyaWdodCkpCisgICAgICAgIHsK KyAgICAgICAgICByaWdodCA9ICgocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlf Ym90LCBRcmlnaHQpKQorICAgICAgICAgICAgID8gTUNfUklHSFRfRlJJTkdFICgxLCBRdG9wX2Jv dHRvbSwgdG9wX3Jvd19lbmRzX2F0X3p2X3ApCisgICAgICAgICAgICAgOiBNQ19SSUdIVF9GUklO R0UgKDIsIFF0b3AsIDApKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5feSA+PSAwKQorICAg ICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAgICAg fQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90 LCBRcmlnaHQpKQorICAgICAgICB7CisgICAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0Ug KDMsIFFib3R0b20sIGJvdF9yb3dfZW5kc19hdF96dl9wKTsKKyAgICAgICAgICBpZiAoYm90X2lu ZF9tYXhfeSA+PSAwKQorICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gYm90X2luZF9tYXhfeSAt IChyb3ctPnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQorICAgICAgZWxzZSBp ZiAoKCFyb3ctPnJldmVyc2VkX3AgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAg IHx8IChyb3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChy b3cpKSkKKyAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0UgKDQsIFFjb250aW51YXRpb24s IDApOworICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV90b3BfbGluZV9wICYmIEVRIChhcnJv d190b3AsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hUX0ZS SU5HRSAoNiwgUXVwLCAwKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5feSA+PSAwKQorICAg ICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAgICAg fQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wICYmIEVRIChhcnJv d19ib3QsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hUX0ZS SU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgIGlmIChib3RfaW5kX21heF95ID49IDApCisg ICAgICAgICAgICByaWdodF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+ dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRl X2VtcHR5X2xpbmVfcCAmJiBFUSAoZW1wdH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kcmF3X3AgPSAxLCByb3ctPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAg ICBpZiAoIWtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjdXIt PnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICAgICAgaWYgKG1jX2xlZnRf ZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICB8 fCBtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAg ICAgICAgICAgY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxzZTsKKyAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmZyaW5nZV9iaXRtYXBfcGVyaW9k aWNfcCA9IHBlcmlvZGljX3A7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRt YXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJp bmdlX2JpdG1hcCA9IG1jX2xlZnRfZnJpbmdlX2JpdG1hcDsKKyAgICAgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2JpdG1hcCA9IGxlZnQ7CisgICAg ICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1B UCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2ZhY2VfaWQgPSBtY19sZWZ0X2Zy aW5nZV9mYWNlX2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1 ci0+bGVmdF9mcmluZ2VfZmFjZV9pZCA9IGxlZnRfZmFjZV9pZDsKKyAgICAgICAgICAgICAgaWYg KG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgIGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX29mZnNldCA9IGxlZnRfb2Zmc2V0 OworICAgICAgICAgICAgICBpZiAobWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklO R0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IG1j X3JpZ2h0X2ZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgICAgY3VyLT5yaWdodF9mcmluZ2VfYml0bWFwID0gcmlnaHQ7CisgICAgICAgICAgICAgIGlm IChtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAg ICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IG1jX3JpZ2h0X2ZyaW5nZV9mYWNl X2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRf ZnJpbmdlX2ZhY2VfaWQgPSByaWdodF9mYWNlX2lkOworICAgICAgICAgICAgICBpZiAobWNfcmln aHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAg IGN1ci0+cmlnaHRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gcmlnaHRfb2Zmc2V0Owor ICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocm93LT5vdmVybGF5X2Fycm93X2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WYgKHdoaWNoICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgeworICAg ICAgb2Zmc2V0ID0gMDsKKyAgICB9CisgICAgZWxzZSBpZiAobGVmdF9wKQorICAgICAgeworICAg ICAgICB3aGljaCA9IHJvdy0+bGVmdF9mcmluZ2VfYml0bWFwOworICAgICAgICBmYWNlX2lkID0g cm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICBvZmZzZXQgPSByb3ctPmxlZnRfZnJp bmdlX29mZnNldDsKKyAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAgIHdo aWNoID0gcm93LT5yaWdodF9mcmluZ2VfYml0bWFwOworICAgICAgICAgIGZhY2VfaWQgPSByb3ct PnJpZ2h0X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICAgIG9mZnNldCA9IHJvdy0+cmlnaHRfZnJp bmdlX29mZnNldDsKKyAgICAgICAgfQorICBpZiAoZmFjZV9pZCA9PSBERUZBVUxUX0ZBQ0VfSUQp CisgICAgeworICAgICAgTGlzcF9PYmplY3QgZmFjZSA9IGZyaW5nZV9mYWNlc1t3aGljaF07Cisg ICAgICBmYWNlX2lkID0gTklMUCAoZmFjZSkgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgUWZy aW5nZSwgZmFsc2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBsb29rdXBfZGVyaXZl ZF9mYWNlICh3LCBmLCBmYWNlLCBGUklOR0VfRkFDRV9JRCwgMCk7CisgICAgICBpZiAoZmFjZV9p ZCA8IDApCisgICAgICAgIGZhY2VfaWQgPSBGUklOR0VfRkFDRV9JRDsKKyAgICB9CisgIGZiID0g Z2V0X2ZyaW5nZV9iaXRtYXBfZGF0YSAod2hpY2gpOworICBwZXJpb2QgPSBmYi0+cGVyaW9kOwor ICAvKiBDb252ZXJ0IHJvdyB0byBmcmFtZSBjb29yZGluYXRlcy4gICovCisgIHAueSA9IFdJTkRP V19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpICsgb2Zmc2V0OworICBwLndoaWNoID0gd2hp Y2g7CisgIHAuYml0cyA9IGZiLT5iaXRzOworICBwLndkID0gZmItPndpZHRoOworICBwLmggPSBm Yi0+aGVpZ2h0OworICBwLmRoID0gKHBlcmlvZCA+IDAgPyAocC55ICUgcGVyaW9kKSA6IDApOwor ICBwLmggLT0gcC5kaDsKKyAgLyogQWRqdXN0IHkgdG8gdGhlIG9mZnNldCBpbiB0aGUgcm93IHRv IHN0YXJ0IGRyYXdpbmcgdGhlIGJpdG1hcC4gICovCisgIHN3aXRjaCAoZmItPmFsaWduKQorICAg IHsKKyAgICBjYXNlIEFMSUdOX0JJVE1BUF9DRU5URVI6CisgICAgICBwLnkgKz0gKHJvdy0+aGVp Z2h0IC0gcC5oKSAvIDI7CisgICAgICBicmVhazsKKyAgICBjYXNlIEFMSUdOX0JJVE1BUF9CT1RU T006CisgICAgICBwLnkgKz0gKHJvdy0+dmlzaWJsZV9oZWlnaHQgLSBwLmgpOworICAgICAgYnJl YWs7CisgICAgY2FzZSBBTElHTl9CSVRNQVBfVE9QOgorICAgICAgYnJlYWs7CisgICAgfQorICBw LmZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGZhY2VfaWQpOworICBpZiAocC5mYWNlID09IE5VTEwp CisgICAgeworICAgICAgLyogVGhpcyBjb3VsZCBoYXBwZW4gYWZ0ZXIgY2xlYXJpbmcgZmFjZSBj YWNoZS4KKyAgICAgIEJ1dCBpdCBzaG91bGRuJ3QgaGFwcGVuIGFueW1vcmUuICArK2tmcyAqLwor ICAgICAgcmV0dXJuOworICAgIH0KKyAgcHJlcGFyZV9mYWNlX2Zvcl9kaXNwbGF5IChmLCBwLmZh Y2UpOworICAvKiBDbGVhciBsZWZ0IGZyaW5nZSBpZiBubyBiaXRtYXAgdG8gZHJhdyBvciBpZiBi aXRtYXAgZG9lc24ndCBmaWxsCisgICAgIHRoZSBmcmluZ2UuICAqLworICBwLmJ4ID0gLTE7Cisg IGhlYWRlcl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICBw LmJ5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIG1heCAoaGVhZGVyX2xpbmVfaGVpZ2h0 LCByb3ctPnkpKTsKKyAgcC5ueSA9IHJvdy0+dmlzaWJsZV9oZWlnaHQ7CisgIGlmIChsZWZ0X3Ap CisgICAgeworICAgICAgaW50IHdkID0gV0lORE9XX0xFRlRfRlJJTkdFX1dJRFRIICh3KTsKKyAg ICAgIGludCB4ID0gd2luZG93X2JveF9sZWZ0ICh3LCAoV0lORE9XX0hBU19GUklOR0VTX09VVFNJ REVfTUFSR0lOUyAodykKKyAgICAgICAgICAgPyBMRUZUX01BUkdJTl9BUkVBCisgICAgICAgICAg IDogVEVYVF9BUkVBKSk7CisgICAgICBpZiAocC53ZCA+IHdkKQorICAgICAgICBwLndkID0gd2Q7 CisgICAgICBwLnggPSB4IC0gcC53ZCAtICh3ZCAtIHAud2QpIC8gMjsKKyAgICAgIGlmIChwLndk IDwgd2QgfHwgcC55ID4gcC5ieSB8fCBwLnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkKKyAgICAgICAg eworICAgICAgICAgIC8qIElmIFcgaGFzIGEgdmVydGljYWwgYm9yZGVyIHRvIGl0cyBsZWZ0LCBk b24ndCBkcmF3IG92ZXIgaXQuICAqLworICAgICAgICAgIHdkIC09ICgoIVdJTkRPV19MRUZUTU9T VF9QICh3KQorICAgICAgICAgICAgLyogVGhpcyBjb3VsZCBiZSB3cm9uZyB3aGVuIHdlIGFsbG93 IHdpbmRvdyBsb2NhbAorICAgICAgICAgICAgICAgcmlnaHQgZGl2aWRlcnMgLSBidXQgdGhlIHdp bmRvdyBvbiB0aGUgbGVmdCBpcyBoYXJkCisgICAgICAgICAgICAgICB0byBnZXQuICAqLworICAg ICAgICAgICAgJiYgIUZSQU1FX1JJR0hUX0RJVklERVJfV0lEVEggKGYpCisgICAgICAgICAgICAm JiAhV0lORE9XX0hBU19WRVJUSUNBTF9TQ1JPTExfQkFSICh3KQorICAgICAgICAgICAgLyogQnV0 IGRvbid0IHJlZHVjZSB0aGUgZnJpbmdlIHdpZHRoIGlmIHRoZSB3aW5kb3cKKyAgICAgICAgICAg ICAgIGhhcyBhIGxlZnQgbWFyZ2luLCBiZWNhdXNlIHRoYXQgbWVhbnMgd2UgYXJlIG5vdAorICAg ICAgICAgICAgICAgaW4gZGFuZ2VyIG9mIGRyYXdpbmcgb3ZlciB0aGUgdmVydGljYWwgYm9yZGVy LAorICAgICAgICAgICAgICAgYW5kIE9UT0ggbGVhdmluZyBvdXQgdGhhdCBvbmUgcGl4ZWwgbGVh dmVzIGJlaGluZAorICAgICAgICAgICAgICAgdHJhY2VzIG9mIHRoZSBjdXJzb3IsIGlmIGl0IHdh cyBpbiBjb2x1bW4gemVybworICAgICAgICAgICAgICAgYmVmb3JlIGRyYXdpbmcgbm9uLWVtcHR5 IG1hcmdpbiBhcmVhLiAgKi8KKyAgICAgICAgICAgICYmIHctPmxlZnRfbWFyZ2luX2NvbHMgPT0g MCkKKyAgICAgICAgICAgPyAxIDogMCk7CisgICAgICAgICAgcC5ieCA9IHggLSB3ZDsKKyAgICAg ICAgICBwLm54ID0gd2Q7CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UKKyAgICB7CisgICAgICBp bnQgeCA9IHdpbmRvd19ib3hfcmlnaHQgKHcsCisgICAgICAgIChXSU5ET1dfSEFTX0ZSSU5HRVNf T1VUU0lERV9NQVJHSU5TICh3KQorICAgICAgICAgPyBSSUdIVF9NQVJHSU5fQVJFQQorICAgICAg ICAgOiBURVhUX0FSRUEpKTsKKyAgICAgIGludCB3ZCA9IFdJTkRPV19SSUdIVF9GUklOR0VfV0lE VEggKHcpOworICAgICAgaWYgKHAud2QgPiB3ZCkKKyAgICAgICAgcC53ZCA9IHdkOworICAgICAg cC54ID0geCArICh3ZCAtIHAud2QpIC8gM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b2xsb3c7CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgY3Vyc29yID0gUWhvbGxvd19zbWFs bDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAgICAg ICAgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGhv bGxvd19yZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBjdXJzb3IgPSBRaG9sbG93OworICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3dfc21hbGw7CisgICAgICAg ICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAgICBjdXJzb3Ig PSBRYm94OworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAg ICBjdXJzb3IgPSBRYmFyOworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0hCQVI6 CisgICAgICAgICAgY3Vyc29yID0gUWhiYXI7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNh c2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19OT19DVVJTT1I6CisgICAg ICAgIGNhc2UgTUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19MRUZUX0ZS SU5HRV9CSVRNQVA6CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgdy0+cGh5c19jdXJzb3Jf b25fcCA9IDA7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3AgPSAwOworICAgICAg ICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKGN1cnNvcikpCisgICAgICAg IHsKKyAgICAgICAgICBpbnQgYm0gPSBtY19nZXRfbG9naWNhbF9jdXJzb3JfYml0bWFwICh3LCBj dXJzb3IpOworICAgICAgICAgIGlmIChibSAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywgcm93LCBs ZWZ0X3AsIDIsIGJtKTsKKyAgICAgICAgICAgICAgb3ZlcmxheSA9IEVRIChjdXJzb3IsIFFib3gp ID8gMyA6IDE7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIG1jX2RyYXdfZnJp bmdlX2JpdG1hcF8xICh3LCByb3csIGxlZnRfcCwgb3ZlcmxheSwgTUNfTk9fRlJJTkdFX0JJVE1B UCk7CisgIGlmIChsZWZ0X3AgJiYgcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCAhPSBNQ19OT19G UklOR0VfQklUTUFQKQorICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIDEsIDEs IHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXApOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09S UyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBOT19GUklOR0VfQklU TUFQIDAKICNkZWZpbmUgVU5ERUZfRlJJTkdFX0JJVE1BUCAxCiAjZGVmaW5lIE1BWF9TVEFOREFS RF9GUklOR0VfQklUTUFQUyBBUlJBWUVMVFMgKHN0YW5kYXJkX2JpdG1hcHMpCkBAIC0xNjk5LDYg KzMyMTcsMTY4IEBAIFJldHVybiBuaWwgaWYgUE9TIGlzIG5vdCB2aXNpYmxlIGluIFdJTkRPVy4g ICovKQogdm9pZAogc3ltc19vZl9mcmluZ2UgKHZvaWQpCiB7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBiZWdpbiBNVUxUSVB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XRtYXBzKTsKKyAgRnB1dCAoUW1jX3F1YWRydXBs ZV9hbmdsZV9kb3duLCBRZnJpbmdlLCBtYWtlX2ZpeG51bSAoNDgpKTsKKyAgLyogKGdldCAnKy1x dWFkcnVwbGUtYW5nbGUtZG93biAnZnJpbmdlKSA9PiA0OCAqLworCisvKiBlbmQgTVVMVElQTEUt Q1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBERUZTWU0gKFF0cnVu Y2F0aW9uLCAidHJ1bmNhdGlvbiIpOwogICBERUZTWU0gKFFjb250aW51YXRpb24sICJjb250aW51 YXRpb24iKTsKICAgREVGU1lNIChRb3ZlcmxheV9hcnJvdywgIm92ZXJsYXktYXJyb3ciKTsKZGlm ZiAtLWdpdCBhL3NyYy9uc3Rlcm0uaCBiL3NyYy9uc3Rlcm0uaAppbmRleCA5NzczZWIzLi5lMzRh MTE2IDEwMDY0NAotLS0gYS9zcmMvbnN0ZXJtLmgKKysrIGIvc3JjL25zdGVybS5oCkBAIC02NjMs NiArNjYzLDE2IEBAIHR5cGVkZWYgaWQgaW5zdGFuY2V0eXBlOwogCiBAaW50ZXJmYWNlIEVtYWNz U2Nyb2xsZXIgOiBOU1Njcm9sbGVyCiAgIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIE5TUmVjdCBtY19yZWN0YW5nbGU7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgIHN0cnVjdCB3aW5kb3cgKndpbmRvdzsKICAg IHN0cnVjdCBmcmFtZSAqZnJhbWU7CiAgICBOU1Jlc3BvbmRlciAqcHJldlJlc3BvbmRlcjsKQEAg LTY4Myw2ICs2OTMsMTggQEAgdHlwZWRlZiBpZCBpbnN0YW5jZXR5cGU7CiAgICBpbnQgZW1fd2hv bGU7CiAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5TUmVjdClyZWN0OworLSAoTlNS ZWN0KW1jX2dldF9yZWN0YW5nbGU7CistIChzdHJ1Y3Qgd2luZG93ICopbWNfZ2V0X3dpbmRvdzsK Ky0gKGJvb2wpbWNfanVkZ2U7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC0gKGlu c3RhbmNldHlwZSkgaW5pdEZyYW1lOiAoTlNSZWN0IClyIHdpbmRvdzogKExpc3BfT2JqZWN0KXdp bjsKIC0gKHZvaWQpc2V0RnJhbWU6IChOU1JlY3QpcjsKIApkaWZmIC0tZ2l0IGEvc3JjL25zdGVy bS5tIGIvc3JjL25zdGVybS5tCmluZGV4IDAyMzMxODIuLmMyNGE2NDAgMTAwNjQ0Ci0tLSBhL3Ny Yy9uc3Rlcm0ubQorKysgYi9zcmMvbnN0ZXJtLm0KQEAgLTc2LDYgKzc2LDk3NSBAQCBVcGRhdGVk IGJ5IENocmlzdGlhbiBMaW1wYWNoIChjaHJpc0BuaWNlLmNoKQogc3RhdGljIEVtYWNzTWVudSAq bWFpbk1lbnU7CiAjZW5kaWYKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2lu IE1VTFRJUExFLUNVUlNPUlMgKi8KKworc3RhdGljIEJPT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FDRV9JRCk7CisgIGludCB2bnRoID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7Cisg IC8qIFNUUkVUQ0hfR0xZUEggbWF5IGNvbnRhaW4gbW9yZSB0aGFuIG9uZSBmYWtlIGN1cnNvciBh dCB0aGUgc2FtZSBIUE9TLgorICBOT1RFOiAgQSBmYWtlIGN1cnNvciBmcm9tIG9uZSBjYWNoZSBt YXkgb3ZlcndyaXRlIGEgZmFrZSBjdXJzb3IgZnJvbSBhbm90aGVyCisgIGNhY2hlIC0tIHRodXMs IHdlIG11c3QgY2hlY2sgdGhlbSBhbGwgZm9yIG92ZXJ3cml0dGVuIGZha2UgY3Vyc29ycy4gKi8K KyAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAg IGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAgeworICAg ICAgZm9yIChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgcworICAgICAgICAgICAmJiBtY190cmF2 ZXJzZV9jYWNoZV9wIChzLT53LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7Cisg ICAgICAgICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgLy8gIGludCB4ID0gcy0+dy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAgICAg IGludCBmeCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uZng7CisgICAgICAgICAgLy8gIGludCB5ID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXS55OworICAgICAgICAgIGludCBmeSA9IHMtPnctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAgaW50 IGhwb3MgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd Lmhwb3M7CisgICAgICAgICAgaW50IHZwb3MgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLnZwb3M7CisgICAgICAgICAgaW50IHdkID0gcy0+dy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZDsKKyAgICAgICAgICBp bnQgaCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u aDsKKyAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gcy0+dy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZTsKKyAg ICAgICAgICAvLyAgaW50IGN1cnNvcl93aWR0aCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVjdCBt Y19SR0IgbHNsX2ZnID0gey5yZWQgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhdLmZnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAuZ3JlZW4gPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmZnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0g cy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVl fTsKKyAgICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHMtPnctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAgICAg ICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBzLT53LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdyZWVuLAorICAgICAgICAgIC8v ICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHMtPnctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAgICAgICAgYm9vbCBhY3Rp dmVfcCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u YWN0aXZlX3A7CisgICAgICAgICAgLy8gIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IHMt PnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGhfZmxh dm9yOworICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICAgICAgYm9vbCBnb19w ID0gKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zID09IGN1cnNv cl9nbHlwaC0+aHBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApOworICAg ICAgICAgIGlmICghZ29fcCkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIE5TUmVj dCByOworICAgICAgICAgIHIub3JpZ2luLnggPSBmeDsKKyAgICAgICAgICByLm9yaWdpbi55ID0g Znk7CisgICAgICAgICAgci5zaXplLmhlaWdodCA9IGg7CisgICAgICAgICAgci5zaXplLndpZHRo ID0gd2Q7CisgICAgICAgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbF9m Zy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjogbHNsX2Zn LmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IGxzbF9m Zy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF0g c2V0XTsKKyAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAgICB7 CisgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHMtPnctPmNvbnRlbnRzKTsK KyAgICAgICAgICBib29sIHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJr X21vZGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIg KGIsIG1hcmtfYWN0aXZlKSkpOworICAgICAgICAgIHB0cmRpZmZfdCByZWdpb25fYmVnID0gKHJl Z2lvbl9hY3RpdmVfcCkgPyBtY19yZWdpb25fbGltaXQgKDEpIDogLTE7CisgICAgICAgICAgcHRy ZGlmZl90IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IG1jX3JlZ2lvbl9saW1pdCAo MCkgOiAtMTsKKyAgICAgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICYm IGFjdGl2ZV9wCisgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA9PSByZWdp b25fYmVnKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93 X2FjdGl2ZV9yZWdpb25fYmVnX2ZhY2VfaWQgPS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zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZP UkVHUk9VTkQgKGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZSksIHMtPmYpOworICAg ICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vl bl9jb2xvcjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoYWN0 aXZlX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGVudW0gZmFj ZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAg ICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChzLT5mLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAg ICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3Ig KE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2ZV9mYWNlKSwgcy0+Zik7CisgICAgICAg ICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfY29sb3I7CisgICAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9s bG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50 ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOwor ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9 IEZBQ0VfRlJPTV9JRCAocy0+ZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAg ICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19pbmFjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9p bmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19pbmFjdGl2ZV9mYWNlKSwg cy0+Zik7CisgICAgICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2luYWN0 aXZlX2NvbG9yOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxz ZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2NvbG9y IChGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpLCBzLT5mKSkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSks IHMtPmYpIHNldF07CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09M T1IgKHMtPmYpOworICAgICAgICAgIH0KKyAgICAgICAgICBzd2l0Y2ggKGN1cnNvcl90eXBlKQor ICAgICAgICAgICAgeworICAgICAgICAgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6Cisg ICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfTk9fQ1VSU09SOgor ICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX1JJR0hUX0ZSSU5H RV9CSVRNQVA6CisgICAgICAgICAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAg ICAgICAgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0Rmls bCAocik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfRlJB TUVEX0JPWDoKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAg ICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNl dFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChz LT5mKSBzZXRdOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1D X0hPTExPV19CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAg ICAgICAgW2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKE5T SW5zZXRSZWN0IChyLCAxLCAxKSk7CisgICAgICAgICAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xP UiAocy0+Zikgc2V0XTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2Fz ZSBNQ19IQkFSOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgICAgICAgICBO U1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAvKiBJZiBhIGdseXBoIGV4aXN0cyAocy0+Y2hhcjJiICE9IE5VTEwpLCB0aGVuIGRy YXcgdGhlIGdseXBoIG9uIHRvcCBvZiB0aGUKKyAgICAgICAgICBuZXdseSBkcmF3biByZWN0YW5n bGUgdGhhdCB3YXMgY3JlYXRlZCBoZXJlaW5hYm92ZS4gIFRvIHRoZSBleHRlbnQgdGhhdCB3ZQor ICAgICAgICAgIHdhbnQgdG8gZG91YmxlLWltcHJpbnQgZ2x5cGhzIHRvIG1ha2UgdGhlbSBhcHBl YXIgdG8gYmUgc2VtaS1ib2xkLCBpdCBjYW4KKyAgICAgICAgICBiZSBkb25lIGhlcmUgZm9yIGFs bCBjdXJzb3IgdHlwZXMuICBUaGUgYm94LXN0eWxlIGN1cnNvcnMgYXJlIGltcHJpbnRlZAorICAg ICAgICAgIHdpdGggZ2x5cGhzIG9ubHkgb25lICgxKSB0aW1lLiAgVGhlIHNlbWktYm9sZCBhcHBl YXJhbmNlIGlzIGhlbHBmdWwgd2hlbgorICAgICAgICAgIGRlYnVnZ2luZyB0byBzZWUgdGhhdCB0 aGUgY29vcmRpbmF0ZXMgYXJlIGNvcnJlY3QuICovCisgICAgICAgICAgaWYgKHMtPmNoYXIyYiAh PSBOVUxMCisgICAgICAgICAgICAgICYmIChjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YCisg ICAgICAgICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisgICAgICAg ICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19IT0xMT1dfQk9YKSkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgQk9PTCBpc0NvbXBvc2l0ZSA9IHMtPmZpcnN0X2dseXBoLT50eXBl ID09IENPTVBPU0lURV9HTFlQSDsKKyAgICAgICAgICAgICAgaWYgKGlzQ29tcG9zaXRlKQorICAg ICAgICAgICAgICAgIG5zX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChz KTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgICAgICAgICAg ICAgICAgICAgaWYgKCFmb250KQorICAgICAgICAgICAgICAgICAgICAgIGZvbnQgPSBGUkFNRV9G T05UIChzLT5mKTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3AgPSBmYWxzZTsK KyAgICAgICAgICAgICAgICAgICAgZm9udC0+ZHJpdmVyLT5kcmF3IChzLCBzLT5jbXBfZnJvbSwg cy0+bmNoYXJzLCBzLT54LCBzLT55YmFzZSwgd2l0aF9iZ19wKTsKKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLy8gIGNsb2NrX3QgY2xvY2tf ZW5kID0gY2xvY2soKTsKKyAgLy8gIGRvdWJsZSBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChj bG9ja19lbmQgLSBjbG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8vICBmcHJpbnRm IChzdGRlcnIsICJuc19kcmF3X292ZXJ3cml0dGVuICglZCk6ICBUSU1FICglZilcbiIsIHZwb3Ms IGNwdV90aW1lX3VzZWQpOworfQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHJhd193aW5kb3dfY3Vy c29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVj dCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgICAgICAgIGludCB4LCBpbnQgZngsIGludCB5 LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCwKKyAgICAgICAgICAg ICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBl LAorICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCwgZW51bSBtY19mbGF2b3IgZ2x5 cGhfZmxhdm9yLCBib29s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ID0gZmFj ZS0+bGZhY2VbTEZBQ0VfQkFDS0dST1VORF9JTkRFWF07CisgICAgIGZwcmludGYgKHN0ZGVyciwg IlxuZm9yZWdyb3VuZCAoJXMpIHwgYmFja2dyb3VuZCAoJXMpXG4iLAorICAgICAgICAgICAgICAg ICAgICAgICghTklMUCAoZm9yZWdyb3VuZCkgPyBTU0RBVEEgKGZvcmVncm91bmQpIDogIk5JTFAi KSwKKyAgICAgICAgICAgICAgICAgICAgICAoIU5JTFAgKGJhY2tncm91bmQpID8gU1NEQVRBIChi YWNrZ3JvdW5kKSA6ICJOSUxQIikpOworICAtICBFWEFNUExFIE9GIEhPVyBUTyBDUkVBVEUgQSBD T0xPUiBXSVRIIFJHQi9MU0wgZmxvYXQgdmFsdWVzOgorICAgICBOU0NvbG9yICpteV9jb2xvciA9 IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IDEuMAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IDEuMAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IDEuMAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07 CisgIC0gIEFMVEVSTkFUSVZFIEVYQU1QTEU6CisgICAgIGVudW0gZmFjZV9pZCBkZWJ1Z2dpbmdf ZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBpbnRlcm4gKCIrLWRlYnVn Z2luZy1mYWNlIiksIHRydWUpOworICAgICBzdHJ1Y3QgZmFjZSAqZGVidWdnaW5nX2ZhY2UgPSBG QUNFX0ZST01fSUQgKHMtPmYsIGRlYnVnZ2luZ19mYWNlX2lkKTsKKyAgICAgTlNDb2xvciAqY29s b3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChkZWJ1Z2dp bmdfZmFjZSksIHMtPmYpOworICAgICBbY29sb3Igc2V0XTsgKi8KKyAgaWYgKGdseXBoX2ZsYXZv ciA9PSBNQ19HTFlQSAorICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBITEVTUykKKyAg ICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGdyZWVuOiBsc2wuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBhbHBoYTogMS4wXSBzZXRdOworICAgIGVsc2UKKyAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1Ig KGYpIHNldF07CisgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgIHsKKyAg ICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgICAgICBib29s IHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7 CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2JlZyA9IChyZWdpb25fYWN0aXZlX3ApID8gbWNfcmVn aW9uX2xpbWl0ICgxKSA6IC0xOworICAgICAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAocmVnaW9u X2FjdGl2ZV9wKSA/IG1jX3JlZ2lvbl9saW1pdCAoMCkgOiAtMTsKKyAgICAgIGlmIChyZWdpb25f YWN0aXZlX3AKKyAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICYmIGN1cnNvcl9nbHlw aC0+Y2hhcnBvcyA9PSByZWdpb25fYmVnKQorICAgIC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TEVGVF9GUklOR0VfQklU TUFQOgorICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAg TlNSZWN0RmlsbCAocik7CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19GUkFNRURfQk9Y OgorICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgW2hvbGxvd19jb2xvciBzZXRdOwor ICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAociwgMSwgMSkpOworICAgICAgICBbRlJB TUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNf SE9MTE9XX0JPWDoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgIFtob2xsb3dfY29s b3Igc2V0XTsKKyAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAg ICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAoZikgc2V0XTsKKyAgICAgICAgYnJlYWs7CisgICAg ICBjYXNlIE1DX0hCQVI6CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBicmVhazsK KyAgICAgIGNhc2UgTUNfQkFSOgorICAgICAgICBzID0gcjsKKyAgICAgICAgLyogQGxhd2xpc3Qg aXMgZm9jdXNpbmcgdGhlIGluaXRpYWwgZGV2ZWxvcG1lbnQgb2YgZmVhdHVyZSByZXF1ZXN0cwor ICAgICAgICAjMTc2ODQgYW5kICMyMjg3MyBvbiBMMlIgbGFuZ3VhZ2VzLiAqLworICAgICAgICBp ZiAoZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBICisgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3Ig IT0gTUNfR0xZUEhMRVNTKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8qIElmIHRoZSBjaGFy YWN0ZXIgdW5kZXIgY3Vyc29yIGlzIFIyTCwgZHJhdyB0aGUgYmFyIGN1cnNvcgorICAgICAgICAg ICAgICAgb24gdGhlIHJpZ2h0IG9mIGl0cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxlZnQu ICovCisgICAgICAgICAgICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2ZWRfbGV2ZWwgJiAxKSAh PSAwKQorICAgICAgICAgICAgICBzLm9yaWdpbi54ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lk dGggLSBzLnNpemUud2lkdGg7CisgICAgICAgICAgfQorICAgICAgICBOU1JlY3RGaWxsIChzKTsK KyAgICAgICAgYnJlYWs7CisgICAgfQorICBuc19yZXNldF9jbGlwcGluZyAoZik7CisgIC8qIGRy YXcgdGhlIGNoYXJhY3RlciB1bmRlciB0aGUgY3Vyc29yICovCisgIGlmIChnbHlwaF9mbGF2b3Ig IT0gTUNfR0xZUEhMRVNTCisgICAgICAmJiAoY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWAor ICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0ZJTExFRF9CT1gKKyAgICAgICAgICB8fCBj dXJzb3JfdHlwZSA9PSBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgfHwgKGRlYnVnX3AKKyAgICAg ICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfSEJBUikKKyAgICAgICAgICB8fCAoZGVidWdf cAorICAgICAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19CQVIpKSkKKyAgICB7CisgICAg ICAvKiBgY3Vyc29yX2djX3BgIGlzIHVzZWQgb25seSBieSBgdzMydGVybS5jYCBhbmQgYHh0ZXJt LmMnLiAqLworICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IGZhbHNlOworICAgICAgY29uc3QgRW1h Y3NfUmVjdGFuZ2xlICpzYXZlZF9jbGlwID0gTlVMTDsKKyAgICAgIGlmIChyb3ctPmNsaXAgIT0g TlVMTCkKKyAgICAgICAgewor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AqLworICBpZiAoZmFjZS0+dW5k ZXJsaW5lX3ApCisgICAgeworICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZB Q0VfVU5ERVJfV0FWRSkKKyAgICAgICAgeworICAgICAgICAgIGlmIChmYWNlLT51bmRlcmxpbmVf ZGVmYXVsdGVkX3ApCisgICAgICAgICAgICBbZGVmYXVsdENvbCBzZXRdOworICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKGZhY2UtPnVuZGVy bGluZV9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgICAgICBuc19kcmF3X3VuZGVyd2F2ZSAocywg d2lkdGgsIHgpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVybGlu ZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBOU1Jl Y3QgcjsKKyAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlvbjsKKyAg ICAgICAgICAgIC8qIElmIHRoZSBwcmV2IHdhcyB1bmRlcmxpbmVkLCBtYXRjaCBpdHMgYXBwZWFy YW5jZS4gKi8KKyAgICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVy bGluZV9wCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUg PT0gRkFDRV9VTkRFUl9MSU5FCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+dW5kZXJsaW5l X3RoaWNrbmVzcyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICB0aGlja25l c3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgIHBvc2l0 aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgZm9udCAqZm9udDsKKyAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZGVzY2VudDsK KyAgICAgICAgICAgICAgICAgIGZvbnQ9cy0+Zm9udDsKKyAgICAgICAgICAgICAgICAgIGRlc2Nl bnQgPSBzLT55ICsgcy0+aGVpZ2h0IC0gcy0+eWJhc2U7CisgICAgICAgICAgICAgICAgICAvKiBV c2UgdW5kZXJsaW5lIHRoaWNrbmVzcyBvZiBmb250LCBkZWZhdWx0aW5nIHRvIDEuICovCisgICAg ICAgICAgICAgICAgICB0aGlja25lc3MgPSAoZm9udCAmJiBmb250LT51bmRlcmxpbmVfdGhpY2tu ZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZm9udC0+dW5kZXJsaW5l X3RoaWNrbmVzcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAxOworICAgICAgICAg ICAgICAgICAgLyogRGV0ZXJtaW5lIHRoZSBvZmZzZXQgb2YgdW5kZXJsaW5pbmcgZnJvbSB0aGUg YmFzZWxpbmUuICovCisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2Vu dF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGRlc2NlbnQgLSB0aGlja25l c3M7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHhfdXNlX3VuZGVybGluZV9wb3NpdGlv bl9wcm9wZXJ0aWVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZvbnQgJiYgZm9u dC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgcG9zaXRp b24gPSBmb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAgZWxz ZSBpZiAoZm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbHJvdW5kIChm b250LT5kZXNjZW50IC8gMik7CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0Owor ICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVfbWlu aW11bV9vZmZzZXQpOworICAgICAgICAgICAgICAgICAgLyogRW5zdXJlIHVuZGVybGluaW5nIGlz IG5vdCBjcm9wcGVkLiAqLworICAgICAgICAgICAgICAgICAgaWYgKGRlc2NlbnQgPD0gcG9zaXRp b24pCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlv biA9IGRlc2NlbnQgLSAxOworICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7Cisg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVzY2Vu dCA8IHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVz cyA9IDE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3RoaWNr bmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9IHBv c2l0aW9uOworICAgICAgICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnliYXNlICsgcG9zaXRp b24sIHdpZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAgaWYgKGZhY2UtPnVuZGVybGluZV9k ZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoZmFjZS0+ dW5kZXJsaW5lX2NvbG9yLCBzLT5mKSBzZXRdOworICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7 CisgICAgICAgICAgfQorICAgIH0KKyAgLyogRG8gb3ZlcmxpbmUuIFdlIGZvbGxvdyBvdGhlciB0 ZXJtcyBpbiB1c2luZyBhIHRoaWNrbmVzcyBvZiAxCisgICAgIGFuZCBpZ25vcmluZyBvdmVybGlu ZV9tYXJnaW4uICovCisgIGlmIChmYWNlLT5vdmVybGluZV9wKQorICAgIHsKKyAgICAgIE5TUmVj dCByOworICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnksIHdpZHRoLCAxKTsKKyAgICAgIGlm IChmYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgW2RlZmF1bHRDb2wg c2V0XTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAo ZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPmYpIHNldF07CisgICAgICBOU1JlY3RGaWxsIChyKTsK KyAgICB9CisgIC8qIERvIHN0cmlrZS10aHJvdWdoLiAgV2UgZm9sbG93IG90aGVyIHRlcm1zIGZv ciB0aGlja25lc3MgYW5kCisgICAgIHZlcnRpY2FsIHBvc2l0aW9uLiovCisgIGlmIChmYWNlLT5z dHJpa2VfdGhyb3VnaF9wKQorICAgIHsKKyAgICAgIE5TUmVjdCByOworICAgICAgdW5zaWduZWQg bG9uZyBkeTsKKyAgICAgIGR5ID0gbHJpbnQgKChzLT5oZWlnaHQgLSAxKSAvIDIpOworICAgICAg ciA9IE5TTWFrZVJlY3QgKHgsIHMtPnkgKyBkeSwgd2lkdGgsIDEpOworICAgICAgaWYgKGZhY2Ut PnN0cmlrZV90aHJvdWdoX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICBbZGVmYXVsdENvbCBz ZXRdOworICAgICAgICBlbHNlCisgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChm YWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgIE5TUmVjdEZpbGwg KHIpOworICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX2R1bXBnbHlwaHNfc3RyZXRjaCAo c3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB3ZCkKK3sK KyAgTlNSZWN0IHJbMl07CisgIGludCBuLCBpOworICBzdHJ1Y3QgZmFjZSAqZmFjZTsKKyAgTlND b2xvciAqZmdDb2wsICpiZ0NvbDsKKyAgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQorICAg IHsKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7CisgICAg ICAqciA9IE5TTWFrZVJlY3QgKHMtPngsIHMtPnksIHMtPmJhY2tncm91bmRfd2lkdGgsIHMtPmhl aWdodCk7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+ZiwgciwgbikpCisgICAgICAg IHJldHVybjsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX01PVVNFX0ZBQ0UpCisgICAgICAgIHsK KyAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9ITF9JTkZPIChzLT5m KS0+bW91c2VfZmFjZV9mYWNlX2lkKTsKKyAgICAgICAgICBpZiAoIWZhY2UpCisgICAgICAgICAg ICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAgfQor ICAgICAgICBlbHNlCisgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBzLT5maXJz dF9nbHlwaC0+ZmFjZV9pZCk7CisgICAgICBiZ0NvbCA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9y IChOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBzLT5mKTsKKyAgICAgIGZnQ29sID0gbnNfbG9v a3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYpOworICAg ICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkKKyAgICAgICAgeworICAgICAgICAgIGlmICghcy0+ cm93LT5mdWxsX3dpZHRoX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGludCBvdmVy cnVuLCBsZWZ0b3ZlcnJ1bjsKKyAgICAgICAgICAgICAgLyogdHJ1bmNhdGUgdG8gYXZvaWQgb3Zl cndyaXRpbmcgZnJpbmdlIGFuZC9vciBzY3JvbGxiYXIgKi8KKyAgICAgICAgICAgICAgb3ZlcnJ1 biA9IG1heCAoMCwgKHMtPnggKyBzLT5iYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgLSAoV0lORE9XX0JPWF9SSUdIVF9FREdFX1ggKHMtPncpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAtIFdJTkRPV19SSUdIVF9GUklOR0VfV0lEVEggKHMt PncpKSk7CisgICAgICAgICAgICAgICAgICAgIHJbaV0uc2l6ZS53aWR0aCAtPSBvdmVycnVuOwor ICAgICAgICAgICAgICAvKiB0cnVuY2F0ZSB0byBhdm9pZCBvdmVyd3JpdGluZyB0byBsZWZ0IG9m IHRoZSB3aW5kb3cgYm94ICovCisgICAgICAgICAgICAgIGxlZnRvdmVycnVuID0gKFdJTkRPV19C T1hfTEVGVF9FREdFX1ggKHMtPncpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0lO RE9XX0xFRlRfRlJJTkdFX1dJRFRIIChzLT53KSkgLSBzLT54OworICAgICAgICAgICAgICBpZiAo bGVmdG92ZXJydW4gPiAwKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIHJb aV0ub3JpZ2luLnggKz0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgICByW2ldLnNpemUu d2lkdGggLT0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAv KiBYWFg6IFRyeSB0byB3b3JrIGJldHdlZW4gcHJvYmxlbSB3aGVyZSBhIHN0cmV0Y2ggZ2x5cGgg b24KKyAgICAgICAgICAgICAgICAgYSBwYXJ0aWFsbHktdmlzaWJsZSBib3R0b20gcm93IHdpbGwg Y2xlYXIgcGFydCBvZiB0aGUKKyAgICAgICAgICAgICAgICAgbW9kZWxpbmUsIGFuZCBhbm90aGVy IHdoZXJlIGxpc3QtYnVmZmVycyBoZWFkZXJzIGFuZCBzaW1pbGFyCisgICAgICAgICAgICAgICAg IHJvd3MgZXJyb25lb3VzbHkgaGF2ZSB2aXNpYmxlX2hlaWdodCBzZXQgdG8gMC4gIE5vdCBzdXJl CisgICAgICAgICAgICAgICAgIHdoZXJlIHRoaXMgaXMgY29taW5nIGZyb20gYXMgb3RoZXIgdGVy bXMgc2VlbSBub3QgdG8gc2hvdy4gKi8KKyAgICAgICAgICAgICAgcltpXS5zaXplLmhlaWdodCA9 IG1pbiAocy0+aGVpZ2h0LCBzLT5yb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgICAgIH0K KyAgICAgICAgICBbYmdDb2wgc2V0XTsKKyAgICAgICAgICAvKiBOT1RFOiB1bmRlciBOUyB0aGlz IGlzIE5PVCB1c2VkIHRvIGRyYXcgY3Vyc29ycywgYnV0IHdlIG11c3QgYXZvaWQKKyAgICAgICAg ICAgICBvdmVyd3JpdGluZyBjdXJzb3IgKHVzdWFsbHkgd2hlbiBjdXJzb3Igb24gYSB0YWIpICov CisgICAgICAgICAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICAvKiBGSVhNRTogIERvIHdlIHN0aWxsIG5lZWQgdG8gcHJldmVudCB0aGlzIHNl Y3Rpb24gb2YgY29kZSBmcm9tCisgICAgICAgICAgICAgIGVyYXNpbmcgdGhlIGZha2UgTUNfSEJB UiB0aGF0IGV4dGVuZHMgdGhlIGVudGlyZSBsZW5ndGggb2YgdGhlCisgICAgICAgICAgICAgIFNU UkVUQ0hfR0xZUEg/ICBUaGlzIG1heSBoYXZlIGJlZW4gZG9uZSBwcmlvciB0byB0aGUgZml4IHJl bGF0aW5nCisgICAgICAgICAgICAgIHRvIGxlZnQvcmlnaHQgb3ZlcndyaXR0ZW4gZ2x5cGhzLiAq LworICAgICAgICAgICAgICByW2ldLnNpemUuaGVpZ2h0IC09IDE7CisgICAgICAgICAgICAgIC8v ICBlbnVtIGZhY2VfaWQgZGVidWdnaW5nX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+ dywgcy0+ZiwgaW50ZXJuICgiKy1kZWJ1Z2dpbmctZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAg ICAgLy8gIHN0cnVjdCBmYWNlICpkZWJ1Z2dpbmdfZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+Ziwg ZGVidWdnaW5nX2ZhY2VfaWQpOworICAgICAgICAgICAgICAvLyAgTlNDb2xvciAqY29sb3IgPSBu c19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChkZWJ1Z2dpbmdfZmFj ZSksIHMtPmYpOworICAgICAgICAgICAgICAvLyAgW2NvbG9yIHNldF07CisgICAgICAgICAgICAg IENHRmxvYXQgeCA9IHJbaV0ub3JpZ2luLng7CisgICAgICAgICAgICAgIENHRmxvYXQgd2lkdGgg PSB3ZDsKKyAgICAgICAgICAgICAgcltpXS5zaXplLndpZHRoIC09IHdpZHRoOworICAgICAgICAg ICAgICByW2ldLm9yaWdpbi54ICs9IHdpZHRoOworICAgICAgICAgICAgICBOU1JlY3RGaWxsIChy W2ldKTsKKyAgICAgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBjdXJz b3IuICovCisgICAgICAgICAgICAgIGlmIChzLT53LT5waHlzX2N1cnNvcl90eXBlID09IE1DX0ZJ TExFRF9CT1gpCisgICAgICAgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMs IGZhY2UsIGJnQ29sLCB3aWR0aCwgeCk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIGZnQ29sLCB3aWR0 aCwgeCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAv LyAgaW50IHJ4ID0gcltpXS5vcmlnaW4ueDsKKyAgLy8gIGludCByeSA9IHJbaV0ub3JpZ2luLnk7 CisgIC8vICBpbnQgcncgPSByW2ldLnNpemUud2lkdGg7CisgIC8vICBpbnQgcmggPSByW2ldLnNp emUuaGVpZ2h0OworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfbnNfZHVtcGdseXBoc19zdHJl dGNoOiAgdnBvcyAoJWQpIHwgcnggKCVkKSB8IHJ5ICglZCkgfCBydyAoJWQpIHwgcmggKCVkKVxu IiwKKyAgLy8gICAgICAgICAgICAgICAgICAgcy0+Zmlyc3RfZ2x5cGgtPnZwb3MsIHJ4LCByeSwg cncsIHJoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocltpXSk7CisgICAgICAgICAgICB9 CisgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBzdHJldGNoIGdseXBo IChvciB0aGUgcGFydAorICAgICAgICAgICAgIG9mIHRoZSBzdHJldGNoIGdseXBoIGFmdGVyIHRo ZSBjdXJzb3IpLiAqLworICAgICAgICAgIG1jX25zX2RyYXdfdGV4dF9kZWN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y0+ c2xpY2Uud2lkdGgsIHMtPnNsaWNlLmhlaWdodCk7CisgIE5TUmVjdEZpbGwgKGJyKTsKKyAgLyog RHJhdyB0aGUgaW1hZ2UuLiBkbyB3ZSBuZWVkIHRvIGRyYXcgcGxhY2Vob2xkZXIgaWYgaW1nID09 bmlsPyAqLworICBpZiAoaW1nICE9IG5pbCkKKyAgICB7CisjaWZkZWYgTlNfSU1QTF9DT0NPQQor ICAgICAgTlNSZWN0IGRyID0gTlNNYWtlUmVjdCAoeCwgeSwgcy0+c2xpY2Uud2lkdGgsIHMtPnNs aWNlLmhlaWdodCk7CisgICAgICBOU1JlY3QgaXIgPSBOU01ha2VSZWN0IChzLT5zbGljZS54LCBz LT5zbGljZS55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2Uud2lkdGgs IHMtPnNsaWNlLmhlaWdodCk7CisgICAgICBbaW1nIGRyYXdJblJlY3Q6IGRyCisgICAgICAgICAg ICAgZnJvbVJlY3Q6IGlyCisgICAgICAgICAgICAgb3BlcmF0aW9uOiBOU0NvbXBvc2l0ZVNvdXJj ZU92ZXIKKyAgICAgICAgICAgICAgZnJhY3Rpb246IDEuMAorICAgICAgICAgICByZXNwZWN0Rmxp cHBlZDogWUVTCisgICAgICAgICAgICAgICAgaGludHM6IG5pbF07CisjZWxzZQorICAgICAgW2lt ZyBjb21wb3NpdGVUb1BvaW50OiBOU01ha2VQb2ludCAoeCwgeSArIHMtPnNsaWNlLmhlaWdodCkK KyAgICAgICAgICAgICAgICAgIG9wZXJhdGlvbjogTlNDb21wb3NpdGVTb3VyY2VPdmVyXTsKKyNl bmRpZgorICAgIH0KKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgIHsKKyAgICAgIFtG UkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpIHNldF07CisgICAgICBpZiAocy0+dy0+cGh5c19jdXJz b3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgICB0ZENvbC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VdfSU1BR0VfUkFJU0VEKQorICAgICAgICB7CisgICAgICAgICAg dGggPSB0b29sX2Jhcl9idXR0b25fcmVsaWVmID49IDAgPworICAgICAgICAgICAgdG9vbF9iYXJf YnV0dG9uX3JlbGllZiA6IERFRkFVTFRfVE9PTF9CQVJfQlVUVE9OX1JFTElFRjsKKyAgICAgICAg ICByYWlzZWRfcCA9IChzLT5obCA9PSBEUkFXX0lNQUdFX1JBSVNFRCk7CisgICAgICAgIH0KKyAg ICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHRoID0gYWJzIChzLT5pbWctPnJl bGllZik7CisgICAgICAgICAgICByYWlzZWRfcCA9IChzLT5pbWctPnJlbGllZiA+IDApOworICAg ICAgICAgIH0KKyAgICAgIHIub3JpZ2luLnggPSB4IC0gdGg7CisgICAgICByLm9yaWdpbi55ID0g eSAtIHRoOworICAgICAgci5zaXplLndpZHRoID0gcy0+c2xpY2Uud2lkdGggKyAyKnRoLTE7Cisg ICAgICByLnNpemUuaGVpZ2h0ID0gcy0+c2xpY2UuaGVpZ2h0ICsgMip0aC0xOworICAgICAgbnNf ZHJhd19yZWxpZWYgKHIsIHRoLCByYWlzZWRfcCwKKyAgICAgICAgICAgICAgICAgICAgICBzLT5z bGljZS55ID09IDAsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueSArIHMtPnNsaWNl LmhlaWdodCA9PSBzLT5pbWctPmhlaWdodCwKKyAgICAgICAgICAgICAgICAgICAgICBzLT5zbGlj ZS54ID09IDAsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueCArIHMtPnNsaWNlLndp ZHRoID09IHMtPmltZy0+d2lkdGgsIHMpOworICAgIH0KKyAgLyogSWYgdGhlcmUgaXMgbm8gbWFz aywgdGhlIGJhY2tncm91bmQgd29uJ3QgYmUgc2VlbiwKKyAgICAgc28gZHJhdyBhIHJlY3Rhbmds ZSBvbiB0aGUgaW1hZ2UgZm9yIHRoZSBjdXJzb3IuCisgICAgIERvIHRoaXMgZm9yIGFsbCBpbWFn ZXMsIGdldHRpbmcgdHJhbnNwYXJlbmN5IHJpZ2h0IGlzIG5vdCByZWxpYWJsZS4gKi8KKyAgaWYg KHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgIHsKKyAgICAgIGludCB0aGlja25lc3MgPSBhYnMg KHMtPmltZy0+cmVsaWVmKTsKKyAgICAgIGlmICh0aGlja25lc3MgPT0gMCkgdGhpY2tuZXNzID0g MTsKKyAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19HTFlQSExFU1MpCisgICAgICB7CisgICAgICAgIE5TQ29sb3IgKmJvcmRlcl9j b2xvciA9IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbC5yZWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjog bHNsLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGJsdWU6IGxzbC5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07CisgICAgICAgIG5zX2Ry YXdfYm94IChiciwgdGhpY2tuZXNzLCBib3JkZXJfY29sb3IsIDEsIDEpOworICAgICAgfQorICAg ICAgZWxzZQorICAgICAgICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywgRlJBTUVfQ1VSU09S X0NPTE9SIChzLT5mKSwgMSwgMSk7CisgICAgfQorfQorCitzdGF0aWMgdm9pZAorbWNfbnNfbWF5 YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBjaGFyIGZv cmNlX3ApCit7CisgIE5TVFJBQ0UgKCJtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91bmQi KTsKKyAgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wLyogfHwgcy0+aGwgPT0gRFJBV19NT1VT RV9GQUNFKi8pCisgICAgeworICAgICAgaW50IGJveF9saW5lX3dpZHRoID0gbWF4IChzLT5mYWNl LT5ib3hfbGluZV93aWR0aCwgMCk7CisgICAgICBpZiAoRk9OVF9IRUlHSFQgKHMtPmZvbnQpIDwg cy0+aGVpZ2h0IC0gMiAqIGJveF9saW5lX3dpZHRoCisgICAgICAgICAgLyogV2hlbiB4ZGlzcC5j IGlnbm9yZXMgRk9OVF9IRUlHSFQsIHdlIGNhbm5vdCB0cnVzdCBmb250CisgICAgICAgICAgICAg ZGltZW5zaW9ucywgc2luY2UgdGhlIGFjdHVhbCBnbHlwaHMgbWlnaHQgYmUgbXVjaAorICAgICAg ICAgICAgIHNtYWxsZXIuICBTbyBpbiB0aGF0IGNhc2Ugd2UgYWx3YXlzIGNsZWFyIHRoZSByZWN0 YW5nbGUKKyAgICAgICAgICAgICB3aXRoIGJhY2tncm91bmQgY29sb3IuICovCisgICAgICAgICAg fHwgRk9OVF9UT09fSElHSCAocy0+Zm9udCkKKyAgICAgICAgICB8fCBzLT5mb250X25vdF9mb3Vu ZF9wIHx8IHMtPmV4dGVuZHNfdG9fZW5kX29mX2xpbmVfcCB8fCBmb3JjZV9wKQorICAgICAgICB7 CisgICAgICAgICAgc3RydWN0IGZhY2UgKmZhY2U7CisgICAgICAgICAgaWYgKHMtPmhsID09IERS QVdfTU9VU0VfRkFDRSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZmFjZSA9IEZBQ0Vf RlJPTV9JRCAocy0+ZiwgTU9VU0VfSExfSU5GTyAocy0+ZiktPm1vdXNlX2ZhY2VfZmFjZV9pZCk7 CisgICAgICAgICAgICAgIGlmICghZmFjZSkKKyAgICAgICAgICAgICAgICBmYWNlID0gRkFDRV9G Uk9NX0lEIChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+Ziwgcy0+Zmlyc3Rf Z2x5cGgtPmZhY2VfaWQpOworICAgICAgICAgIGlmICghZmFjZS0+c3RpcHBsZSkKKyAgICAgICAg ICAgIFsoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSAhPSAwCisgICAgICAgICAgICAgID8gbnNf bG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSksIHMtPmYpCisg ICAgICAgICAgICAgIDogRlJBTUVfQkFDS0dST1VORF9DT0xPUiAocy0+ZikpIHNldF07CisgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgbnNf ZGlzcGxheV9pbmZvICpkcHlpbmZvID0gRlJBTUVfRElTUExBWV9JTkZPIChzLT5mKTsKKyAgICAg ICAgICAgICAgICBbW2RweWluZm8tPmJpdG1hcHNbZmFjZS0+c3RpcHBsZS0xXS5pbWcgc3RpcHBs ZU1hc2tdIHNldF07CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICBpZiAocy0+aGwgIT0gRFJB V19DVVJTT1IpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPnJlY3RhbmdsZV9udWtl ZF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgTlNSZWN0IHIgPSBOU01ha2VSZWN0IChzLT54LCBz LT55ICsgYm94X2xpbmVfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBzLT5iYWNrZ3JvdW5kX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgcy0+aGVpZ2h0LTIqYm94X2xpbmVfd2lkdGgpOworICAgICAgICAgICAgICBOU1JlY3RGaWxs IChyKTsKKyAgICAgICAgICAgIH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ZlcmhhbmcgJiYgIXMtPmZvcl9v dmVybGFwcykKKyAgICB7CisgICAgICBpbnQgd2lkdGg7CisgICAgICBzdHJ1Y3QgZ2x5cGhfc3Ry aW5nICpuZXh0OworICAgICAgZm9yICh3aWR0aCA9IDAsIG5leHQgPSBzLT5uZXh0OworICAgICAg ICAgICBuZXh0ICYmIHdpZHRoIDwgcy0+cmlnaHRfb3Zlcmhhbmc7CisgICAgICAgICAgIHdpZHRo ICs9IG5leHQtPndpZHRoLCBuZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAgaWYgKG5leHQtPmZp cnN0X2dseXBoLT50eXBlICE9IElNQUdFX0dMWVBIKQorICAgICAgICAgIHsKKyAgICAgICAgICAg IGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSAhPSBTVFJFVENIX0dMWVBIKQorICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0 IChzLT5uZXh0LCByKTsKKyAgICAgICAgICAgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+ ZiwgciwgbikpCisgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAgbWNf bnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLT5uZXh0LCAxKTsKKyAgICAgICAgICAg ICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgZWxzZQorICAgICAgICAgICAgICAgIG1jX25zX2R1bXBnbHlwaHNfc3RyZXRjaCAocy0+ bmV4dCwgbWF0cml4LCByb3csIHdkKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7 CisgICAgICAgICAgfQorICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMgJiYgcy0+ZmFjZS0+ Ym94ICE9IEZBQ0VfTk9fQk9YCisgICAgICAmJiAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hB Ul9HTFlQSAorICAgICAgICAgIHx8IHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9H TFlQSCkpCisgICAgeworICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChz LCByKTsKKyAgICAgIGlmICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAg cmV0dXJuOworICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLCAxKTsK KyAgICAgIG5zX2R1bXBnbHlwaHNfYm94X29yX3JlbGllZiAocyk7CisgICAgICBuc19yZXNldF9j bGlwcGluZyAocy0+Zik7CisgICAgICBib3hfZHJhd25fcCA9IDE7CisgICAgfQorICBzd2l0Y2gg KHMtPmZpcnN0X2dseXBoLT50eXBlKQorICAgIHsKKyAgICBjYXNlIElNQUdFX0dMWVBIOgorICAg ICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICgh bnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgbWNf bnNfZHVtcGdseXBoc19pbWFnZSAocywgclswXSwgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNvcl90 eXBlLCBhY3RpdmVfcCk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBi cmVhazsKKyAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CisgICAgICBtY19uc19kdW1wZ2x5cGhzX3N0 cmV0Y2ggKHMsIG1hdHJpeCwgcm93LCB3ZCk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENIQVJf R0xZUEg6CisgICAgY2FzZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICBuID0gbnNfZ2V0X2dseXBo X3N0cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMt PmYsIHIsIG4pKQorICAgICAgICByZXR1cm47CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBzCisg ICAgICAgICAgfHwgKHMtPmNtcF9mcm9tID4gMAorICAgICAgICAgICAgICAmJiAhIHMtPmZpcnN0 X2dseXBoLT51LmNtcC5hdXRvbWF0aWMpKQorICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9w ID0gMTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFj a2dyb3VuZCAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKTsKKyAg ICAgIGludCBmbGFncyA9IChzLT5obCA9PSBEUkFXX0NVUlNPUikKKyAgICAgICAgICAgICAgICAg ICAgPyBOU19EVU1QR0xZUEhfQ1VSU09SCisgICAgICAgICAgICAgICAgICA6IChzLT5obCA9PSBE UkFXX01PVVNFX0ZBQ0UpCisgICAgICAgICAgICAgICAgICAgID8gTlNfRFVNUEdMWVBIX01PVVNF RkFDRQorICAgICAgICAgICAgICAgICAgOiAocy0+Zm9yX292ZXJsYXBzKQorICAgICAgICAgICAg ICAgICAgICA/IE5TX0RVTVBHTFlQSF9GT1JFR1JPVU5ECisgICAgICAgICAgICAgICAgICA6IE5T X0RVTVBHTFlQSF9OT1JNQUw7CisgICAgICB1bnNpZ25lZCBsb25nIHNhdmVkX2ZnID0gTlNfRkFD RV9GT1JFR1JPVU5EIChzLT5mYWNlKTsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUiAm JiBjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgICB7CisgICAgICAgICAgdW5z aWduZWQgbG9uZyB0bXAgPSBOU19GQUNFX0JBQ0tHUk9VTkQgKHMtPmZhY2UpOworICAgICAgICAg IE5TX0ZBQ0VfQkFDS0dST1VORCAocy0+ZmFjZSkgPSBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZh Y2UpOworICAgICAgICAgIE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSB0bXA7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAg ICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWAorICAgICAgICAgICAgICAgICAm JiBhY3RpdmVfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93 X2FjdGl2ZV9mYWNlX2lkID0KKyAgICAgICAgICAgICAgbG9va3VwX25hbWVkX2ZhY2UgKHMtPncs IHMtPmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsK KyAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01f SUQgKHMtPmYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICBOU19GQUNFX0ZP UkVHUk9VTkQgKHMtPmZhY2UpID0gTlNfRkFDRV9GT1JFR1JPVU5EIChob2xsb3dfYWN0aXZlX2Zh Y2UpOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNP UgorICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gKKyAg ICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0KKyAgICAgICAgICAgICAg ICBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vy c29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICBzdHJ1Y3Qg ZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19p bmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5m YWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VORCAoaG9sbG93X2luYWN0aXZlX2ZhY2UpOworICAgICAg ICAgICAgfQorICAgICAgaWYgKHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQ SCkKKyAgICAgICAgbnNfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMp OworICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3Ag PSAoKGZsYWdzID09IE5TX0RVTVBHTFlQSF9OT1JNQUwgJiYgIXMtPmJhY2tncm91bmRfZmlsbGVk X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBmbGFncyA9PSBOU19EVU1QR0xZ UEhfTU9VU0VGQUNFKTsKKyAgICAgICAgICAgIGlmICh3aXRoX2JnX3ApCisgICAgICAgICAgICAg IHMtPmJhY2tncm91bmRfbnVrZWRfcCA9IHRydWU7CisgICAgICAgICAgICBmb250LT5kcml2ZXIt PmRyYXcgKHMsIHMtPmNtcF9mcm9tLCBzLT5uY2hhcnMsIHMtPngsIHMtPnliYXNlLCB3aXRoX2Jn X3ApOworICAgICAgICAgIH0KKyAgICAgIE5TQ29sb3IgKmNvbCA9IChOU19GQUNFX0ZPUkVHUk9V TkQgKHMtPmZhY2UpICE9IDAKKyAgICAgICAgICAgICAgICAgICAgID8gbnNfbG9va3VwX2luZGV4 ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSksIHMtPmYpCisgICAgICAgIC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LT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgICAg ICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAgICAgIE5TX0ZB Q0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSBzYXZlZF9mZzsKKyAgICAgIG5zX3Jlc2V0X2NsaXBw aW5nIChzLT5mKTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgorICAg ICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICgh bnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgaWYg KHMtPmZvcl9vdmVybGFwcworICAgICAgICAgIHx8IChzLT5jbXBfZnJvbSA+IDAKKyAgICAgICAg ICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkKKyAgICAgICAgcy0+ YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICBlbHNlCisgICAgICAgIG1jX25zX21heWJl X2R1bXBnbHlwaHNfYmFja2dyb3VuZCAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9T SVRFX0dMWVBIKTsKKyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICAgIGJyZWFr OworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9CisgIC8qIERyYXcg Ym94IGlmIG5vdCBkb25lIGFscmVhZHkuICovCisgIGlmICghcy0+Zm9yX292ZXJsYXBzCisgICAg ICAmJiAhYm94X2RyYXduX3AKKyAgICAgICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JPWCkK KyAgICB7CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsIHIpOwor ICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAgICAgICByZXR1cm47 CisgICAgICBuc19kdW1wZ2x5cGhzX2JveF9vcl9yZWxpZWYgKHMpOworICAgICAgbnNfcmVzZXRf Y2xpcHBpbmcgKHMtPmYpOworICAgIH0KKyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKworLyogZW5k IE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qID09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09CiAKICAgIE5TVFJBQ0UsIFRyYWNlIHN1cHBvcnQuCkBAIC0xMDc5LDYg KzIwNDgsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5fZnJhbWVfcmVjdChOU1JlY3QgZnJh bWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKICAgIGV4dGVybmFsIChSSUYpIGNhbGw7IHdob2xl IGZyYW1lLCBjYWxsZWQgYmVmb3JlIGd1aV91cGRhdGVfd2luZG93X2JlZ2luCiAgICAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLwogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogI2lmZGVmIE5TX0lNUExfQ09DT0EKICAgRW1hY3NWaWV3ICp2 aWV3ID0gRlJBTUVfTlNfVklFVyAoZik7CiAKQEAgLTExMDksNiArMjA4OCwxNiBAQCBzdGF0aWMg TlNSZWN0IGNvbnN0cmFpbl9mcmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNGdWxs c2NyZWVuKQogCiAvKiAgIGlmIChmID09IE1PVVNFX0hMX0lORk8gKGYpLT5tb3VzZV9mYWNlX21v dXNlX2ZyYW1lKSAqLwogICBNT1VTRV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9kZWZlciA9IDA7 CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisK KyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBOVUxMOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiB9CiAKIApAQCAtNDc1OSw2ICs1NzQ4LDE3IEBAIGluIGNlcnRhaW4gc2l0dWF0aW9u cyAocmFwaWQgaW5jb21pbmcgZXZlbnRzKS4KICAgICAgIGJhciA9IFtbRW1hY3NTY3JvbGxlciBh bGxvY10gaW5pdEZyYW1lOiByIHdpbmRvdzogd2luXTsKICAgICAgIHdzZXRfdmVydGljYWxfc2Ny b2xsX2JhciAod2luZG93LCBtYWtlX21pbnRfcHRyIChiYXIpKTsKICAgICAgIHVwZGF0ZV9wID0g WUVTOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCisgICAgICAvKiBUaGlzIGlzIG9ubHkgZm9yIGRlYnVnZ2luZyBwdXJwb3Nlcy4gKi8KKyAg ICAgIFtiYXIgbWNfc2V0X3JlY3RhbmdsZTogcl07CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgICB9CiAgIGVsc2UKICAgICB7CkBAIC00NzY2LDEyICs1NzY2LDMwIEBAIGluIGNl cnRhaW4gc2l0dWF0aW9ucyAocmFwaWQgaW5jb21pbmcgZXZlbnRzKS4KICAgICAgIGJhciA9IFhO U19TQ1JPTExfQkFSICh3aW5kb3ctPnZlcnRpY2FsX3Njcm9sbF9iYXIpOwogICAgICAgb2xkUmVj dCA9IFtiYXIgZnJhbWVdOwogICAgICAgci5zaXplLndpZHRoID0gb2xkUmVjdC5zaXplLndpZHRo OworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CiAgICAgICBpZiAoRlJBTUVfTElWRV9QIChmKSAmJiAhTlNFcXVhbFJlY3RzIChvbGRSZWN0LCBy KSkKICAgICAgICAgeworICAgICAgICAgIC8qIFRoZSBtYWluIHdpbmRvdyBoYXMgcHJvYmFibHkg YmVlbiByZXNpemVkLiAgR3JhY2lvdXNseSBkZWxldGUgdGhlCisgICAgICAgICAgb2xkIHNjcm9s bCBiYXIgd2l0aG91dCByZXBhaW50aW5nIGl0cyByZWN0YW5nbGU7IGFuZCwgY3JlYXRlIGEgbmV3 CisgICAgICAgICAgc2Nyb2xsIGJhciBlbHNld2hlcmUuKi8KICAgICAgICAgICBpZiAob2xkUmVj dC5vcmlnaW4ueCAhPSByLm9yaWdpbi54KQorICAgICAgICAgICAgewogICAgICAgICAgICAgICBu c19jbGVhcl9mcmFtZV9hcmVhIChmLCBsZWZ0LCB0b3AsIHdpZHRoLCBoZWlnaHQpOworICAgICAg ICAgICAgICBbYmFyIG1jX2p1ZGdlXTsKKyAgICAgICAgICAgICAgYmFyID0gW1tFbWFjc1Njcm9s bGVyIGFsbG9jXSBpbml0RnJhbWU6IHIgd2luZG93OiB3aW5dOworICAgICAgICAgICAgICB3c2V0 X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHdpbmRvdywgbWFrZV9taW50X3B0ciAoYmFyKSk7CisgICAg ICAgICAgICB9CisgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgW2JhciBzZXRGcmFtZTogcl07 CiAgICAgICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KIAogICBp ZiAodXBkYXRlX3ApCkBAIC00OTMxLDkgKzU5NDksNTcgQEAgaW4gY2VydGFpbiBzaXR1YXRpb25z IChyYXBpZCBpbmNvbWluZyBldmVudHMpLgogICAgIHsKICAgICAgIHZpZXcgPSBbc3Vidmlld3Mg b2JqZWN0QXRJbmRleDogaV07CiAgICAgICBpZiAoIVt2aWV3IGlzS2luZE9mQ2xhc3M6IFtFbWFj c1Njcm9sbGVyIGNsYXNzXV0pIGNvbnRpbnVlOwotICAgICAgaWYgKFt2aWV3IGp1ZGdlXSkKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAv KiBgWFNFVFdJTkRPVycgd2lsbCBzb21ldGltZXMgY2F1c2UgRW1hY3MgdG8gY3Jhc2ggd2hlbiBy dW5uaW5nIHVuZGVyIGdkYiBldmVuCisgIHRob3VnaCAodyAhPSBOVUxMKS4gIFRoZXJlZm9yZSwg d2UgY2Fubm90IHJlbGlhYmx5IHVzZSBgV0lORE9XX0xJVkVfUCcuICovCisgIHN0cnVjdCB3aW5k b3cgKncgPSBbdmlldyBtY19nZXRfd2luZG93XTsKKyAgaWYgKHcgIT0gTlVMTAorICAgICAgJiYg TklMUCAody0+Y29udGVudHMpKQorICAgIHsKKyAgICAgIEJPT0wgZGVidWdfcCA9IGZhbHNlOwor ICAgICAgaWYgKGRlYnVnX3AKKyAgICAgICAgICAvKiBgd2luZG93X2JveCcgY2FsbHMgYHdpbmRv d19ib3hfaGVpZ2h0Jywgd2hpY2ggd2lsbCBjYXVzZSBFbWFjcyB0bworICAgICAgICAgIGNyYXNo IGlmIEZSQU1FUCAody0+ZnJhbWUpIGlzIG5vdCBzYXRpc2ZpZWQuICovCisgICAgICAgICAgJiYg RlJBTUVQICh3LT5mcmFtZSkpCisgICAgICAgIHsKKyAgICAgICAgICBOU1JlY3QgcjAgPSBbdmll dyBtY19nZXRfcmVjdGFuZ2xlXTsKKyAgICAgICAgICBpbnQgeDAgPSBOU01pblggKHIwKTsKKyAg ICAgICAgICBpbnQgeTAgPSBOU01pblkgKHIwKTsKKyAgICAgICAgICBpbnQgd2QwID0gTlNXaWR0 aCAocjApOworICAgICAgICAgIGludCBoMCA9IE5TSGVpZ2h0IChyMCk7CisgICAgICAgICAgaW50 IHdpbmRvd195LCB3aW5kb3dfaGVpZ2h0OworICAgICAgICAgIHdpbmRvd19ib3ggKHcsIEFOWV9B UkVBLCAwLCAmd2luZG93X3ksIDAsICZ3aW5kb3dfaGVpZ2h0KTsKKyAgICAgICAgICBpbnQgdG9w ID0gd2luZG93X3k7CisgICAgICAgICAgaW50IGhlaWdodCA9IHdpbmRvd19oZWlnaHQ7CisgICAg ICAgICAgaW50IHdpZHRoID0gV0lORE9XX0NPTkZJR19TQ1JPTExfQkFSX0NPTFMgKHcpICogRlJB TUVfQ09MVU1OX1dJRFRIIChmKTsKKyAgICAgICAgICBpbnQgbGVmdCA9IFdJTkRPV19TQ1JPTExf QkFSX0FSRUFfWCAodyk7CisgICAgICAgICAgTlNSZWN0IHIxID0gTlNNYWtlUmVjdCAobGVmdCwg dG9wLCB3aWR0aCwgaGVpZ2h0KTsKKyAgICAgICAgICAvKiBUaGUgcGFyZW50IHZpZXcgaXMgZmxp cHBlZCwgc28gd2UgbmVlZCB0byBmbGlwIHkgdmFsdWUuICovCisgICAgICAgICAgRW1hY3NWaWV3 ICpmcmFtZV92aWV3ID0gRlJBTUVfTlNfVklFVyAoZik7CisgICAgICAgICAgTlNSZWN0IHYgPSBb ZnJhbWVfdmlldyBmcmFtZV07CisgICAgICAgICAgcjEub3JpZ2luLnkgPSAodi5zaXplLmhlaWdo dCAtIHIxLnNpemUuaGVpZ2h0IC0gcjEub3JpZ2luLnkpOworICAgICAgICAgIGludCB4MSA9IE5T TWluWCAocjEpOworICAgICAgICAgIGludCB5MSA9IE5TTWluWSAocjEpOworICAgICAgICAgIGlu dCB3ZDEgPSBOU1dpZHRoIChyMSk7CisgICAgICAgICAgaW50IGgxID0gTlNIZWlnaHQgKHIxKTsK KyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIlcyAtLSBERUFEOlxuXAorICAgICAgICAgIHgw L3gxICglZC8lZCkgfCB5MC95MSAoJWQvJWQpIHwgd2QwL3dkMSAoJWQvJWQpIHwgaDAvaDEgKCVk LyVkKVxuIiwKKyAgICAgICAgICBtY193aW5kb3cgKHcpLCB4MCwgeDEsIHkwLCB5MSwgd2QwLCB3 ZDEsIGgwLCBoMSk7CisgICAgICAgIH0KKyAgICAgIGlmIChbdmlldyBtY19qdWRnZV0pCiAgICAg ICAgIHJlbW92ZWQgPSBZRVM7CiAgICAgfQorICAgIGVsc2UgaWYgKFt2aWV3IGp1ZGdlXSkKKyAg ICAgIHJlbW92ZWQgPSBZRVM7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKKyAgICB9 CiAKICAgaWYgKHJlbW92ZWQpCiAgICAgW2V2aWV3IHVwZGF0ZUZyYW1lU2l6ZTogTk9dOwpAQCAt NTA3NCw2ICs2MTQwLDIwIEBAIHN0YXRpYyBMaXNwX09iamVjdCBuc19zdHJpbmdfdG9fbGlzcG1v ZCAoY29uc3QgY2hhciAqcykKIGV4dGVybiBmcmFtZV9wYXJtX2hhbmRsZXIgbnNfZnJhbWVfcGFy bV9oYW5kbGVyc1tdOwogc3RhdGljIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNlIG5zX3JlZGlz cGxheV9pbnRlcmZhY2UgPQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYG5zdGVybS5t YCBtdXN0IGJlIGluIHRoZSBleGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9pbnRl cmZhY2UnIGluIGBkaXNwZXh0ZXJuLmhgISAqLworCisgIG1jX25zX2RyYXdfd2luZG93X2N1cnNv ciwKKyAgbWNfbnNfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgbnNfZnJhbWVfcGFybV9oYW5kbGVycywKICAgZ3VpX3Byb2R1Y2VfZ2x5cGhzLAog ICBndWlfd3JpdGVfZ2x5cGhzLApAQCAtODcxMSw2ICs5NzkxLDQ5IEBAIC0gKEJPT0wpY2FuQmVj b21lTWFpbldpbmRvdwogCiBAaW1wbGVtZW50YXRpb24gRW1hY3NTY3JvbGxlcgogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCistICh2b2lkKW1j X3NldF9yZWN0YW5nbGU6IChOU1JlY3QpcmVjdAoreworICBtY19yZWN0YW5nbGUgPSByZWN0Owor fQorCistIChOU1JlY3QpbWNfZ2V0X3JlY3RhbmdsZQoreworICByZXR1cm4gbWNfcmVjdGFuZ2xl OworfQorCistIChzdHJ1Y3Qgd2luZG93ICopbWNfZ2V0X3dpbmRvdworeworICByZXR1cm4gd2lu ZG93OworfQorCistIChib29sKW1jX2p1ZGdlCit7CisgIE5TVFJBQ0UgKCJbRW1hY3NTY3JvbGxl ciBtY19qdWRnZV0iKTsKKyAgYm9vbCByZXQgPSBjb25kZW1uZWQ7CisgIGJsb2NrX2lucHV0ICgp OworICBpZiAoY29uZGVtbmVkKQorICAgIHsKKyAgICAgIC8qIGVuc3VyZSBvdGhlciBzY3JvbGxi YXIgdXBkYXRlcyBhZnRlciBkZWxldGlvbiAqLworICAgICAgRW1hY3NWaWV3ICp2aWV3ID0gKEVt YWNzVmlldyAqKUZSQU1FX05TX1ZJRVcgKGZyYW1lKTsKKyAgICAgIGlmICh2aWV3ICE9IG5pbCkK KyAgICAgICAgdmlldy0+c2Nyb2xsYmFyc05lZWRpbmdVcGRhdGUrKzsKKyAgICB9CisgIGlmICh3 aW5kb3cpCisgICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyICh3aW5kb3csIFFuaWwpOworICB3 aW5kb3cgPSAwOworICBbc2VsZiByZW1vdmVGcm9tU3VwZXJ2aWV3V2l0aG91dE5lZWRpbmdEaXNw bGF5XTsKKyAgW3NlbGYgcmVsZWFzZV07CisgIHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVybiBy ZXQ7Cit9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIGZvciByZXBlYXQgYnV0 dG9uIHB1c2ggKi8KICNkZWZpbmUgU0NST0xMX0JBUl9GSVJTVF9ERUxBWSAwLjUKICNkZWZpbmUg U0NST0xMX0JBUl9DT05USU5VT1VTX0RFTEFZICgxLjAg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gKCk7CQkJXAorICB9IHdoaWxlIChm YWxzZSkKKworc3RhdGljIExpc3BfT2JqZWN0CittY193MzJfY29sb3JfbWFwX2xvb2t1cCAoY29u c3QgY2hhciAqY29sb3JuYW1lKQoreworICBMaXNwX09iamVjdCB0YWlsLCByZXQgPSBRbmlsOwor ICBibG9ja19pbnB1dCAoKTsKKyAgZm9yICh0YWlsID0gVnczMl9jb2xvcl9tYXA7IENPTlNQICh0 YWlsKTsgdGFpbCA9IFhDRFIgKHRhaWwpKQorICAgIHsKKyAgICAgIHJlZ2lzdGVyIExpc3BfT2Jq ZWN0IGVsdCwgdGVtOworICAgICAgZWx0ID0gWENBUiAodGFpbCk7CisgICAgICBpZiAoIUNPTlNQ IChlbHQpKSBjb250aW51ZTsKKyAgICAgIHRlbSA9IFhDQVIgKGVsdCk7CisgICAgICBpZiAobHN0 cmNtcGkgKFNTREFUQSAodGVtKSwgY29sb3JuYW1lKSA9PSAwKQorICAgICAgICB7CisgICAgICAg ICAgcmV0ID0gRmNkciAoZWx0KTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAg TUNfUVVJVDsKKyAgICB9CisgIHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVybiByZXQ7Cit9CisK K3N0YXRpYyBMaXNwX09iamVjdAorbWNfeF90b193MzJfY29sb3IgKGNvbnN0IGNoYXIgKiBjb2xv cm5hbWUpCit7CisgIHJlZ2lzdGVyIExpc3BfT2JqZWN0IHJldCA9IFFuaWw7CisgIGJsb2NrX2lu cHV0ICgpOworICBpZiAoY29sb3JuYW1lWzBdID09ICcjJykKKyAgICB7CisgICAgICAvKiBDb3Vs ZCBiZSBhbiBvbGQtc3R5bGUgUkdCIERldmljZSBzcGVjaWZpY2F0aW9uLiAqLworICAgICAgaW50 IHNpemUgPSBzdHJsZW4gKGNvbG9ybmFtZSArIDEpOworICAgICAgY2hhciAqY29sb3IgPSBhbGxv Y2EgKHNpemUgKyAxKTsKKyAgICAgIHN0cmNweSAoY29sb3IsIGNvbG9ybmFtZSArIDEpOworICAg ICAgaWYgKHNpemUgPT0gMyB8fCBzaXplID09IDYgfHwgc2l6ZSA9PSA5IHx8IHNpemUgPT0gMTIp CisgICAgICAgIHsKKyAgICAgICAgICBVSU5UIGNvbG9ydmFsOworICAgICAgICAgIGludCBpLCBw b3M7CisgICAgICAgICAgcG9zID0gMDsKKyAgICAgICAgICBzaXplIC89IDM7CisgICAgICAgICAg Y29sb3J2YWwgPSAwOworICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCAzOyBpKyspCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIGNoYXIgKmVuZDsKKyAgICAgICAgICAgICAgY2hhciB0Owor ICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHZhbHVlOworICAgICAgICAgICAgICAvKiBUaGUg Y2hlY2sgZm9yICd4JyBpbiB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbmFsIHRha2VzIGludG8KKyAg ICAgICAgICAgICAgYWNjb3VudCB0aGUgZmFjdCB0aGF0IHN0cnRvbCBhbGxvd3MgYSAiMHgiIGlu IGZyb250IG9mCisgICAgICAgICAgICAgIG91ciBudW1iZXJzLCBhbmQgd2UgZG9uJ3QuICovCisg ICAgICAgICAgICAgIGlmICghaXN4ZGlnaXQgKGNvbG9yWzBdKSB8fCBjb2xvclsxXSA9PSAneCcp CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHQgPSBjb2xvcltzaXplXTsK KyAgICAgICAgICAgICAgY29sb3Jbc2l6ZV0gPSAnXDAnOworICAgICAgICAgICAgICB2YWx1ZSA9 IHN0cnRvdWwgKGNvbG9yLCAmZW5kLCAxNik7CisgICAgICAgICAgICAgIGNvbG9yW3NpemVdID0g dDsKKyAgICAgICAgICAgICAgaWYgKGVycm5vID09IEVSQU5HRSB8fCBlbmQgLSBjb2xvciAhPSBz aXplKQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBzd2l0Y2ggKHNpemUp CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGNhc2UgMToKKyAgICAgICAgICAg ICAgICAgIHZhbHVlID0gdmFsdWUgKiAweDEwOworICAgICAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAg ICAgICAgICAgY2FzZSAzOgorICAgICAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDsKKyAgICAg ICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNDoKKyAgICAgICAgICAg ICAgICAgIHZhbHVlIC89IDB4MTAwOworICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICBjb2xvcnZhbCB8PSAodmFsdWUgPDwgcG9zKTsKKyAg ICAgICAgICAgICAgcG9zICs9IDB4ODsKKyAgICAgICAgICAgICAgaWYgKGkgPT0gMikKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAg ICAgICAgICAgICAgWFNFVElOVCAocmV0LCBjb2xvcnZhbCk7CisgICAgICAgICAgICAgICAgICBy ZXR1cm4gcmV0OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgY29sb3IgPSBlbmQ7 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UgaWYgKHN0cm5pY21wIChj b2xvcm5hbWUsICJyZ2I6IiwgNCkgPT0gMCkKKyAgICB7CisgICAgICBjb25zdCBjaGFyICpjb2xv cjsKKyAgICAgIFVJTlQgY29sb3J2YWw7CisgICAgICBpbnQgaSwgcG9zOworICAgICAgcG9zID0g MDsKKyAgICAgIGNvbG9ydmFsID0gMDsKKyAgICAgIGNvbG9yID0gY29sb3JuYW1lICsgNDsKKyAg ICAgIGZvciAoaSA9IDA7IGkgPCAzOyBpKyspCisgICAgICAgIHsKKyAgICAgICAgICBjaGFyICpl bmQ7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyB2YWx1ZTsKKyAgICAgICAgICAvKiBUaGUgY2hl Y2sgZm9yICd4JyBpbiB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbmFsIHRha2VzIGludG8KKyAgICAg ICAgICAgICBhY2NvdW50IHRoZSBmYWN0IHRoYXQgc3RydG9sIGFsbG93cyBhICIweCIgaW4gZnJv bnQgb2YKKyAgICAgICAgICAgICBvdXIgbnVtYmVycywgYW5kIHdlIGRvbid0LiAqLworICAgICAg ICAgIGlmICghaXN4ZGlnaXQgKGNvbG9yWzBdKSB8fCBjb2xvclsxXSA9PSAneCcpCisgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICB2YWx1ZSA9IHN0cnRvdWwgKGNvbG9yLCAmZW5kLCAxNik7 CisgICAgICAgICAgaWYgKGVycm5vID09IEVSQU5HRSkKKyAgICAgICAgICAgIGJyZWFrOworICAg ICAgICAgIHN3aXRjaCAoZW5kIC0gY29sb3IpCisgICAgICAgICAgICB7CisgICAgICAgICAgICBj YXNlIDE6CisgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUgKiAweDEwICsgdmFsdWU7CisgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICBicmVh azsKKyAgICAgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDsKKyAg ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAgIHZh bHVlIC89IDB4MTAwOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6 CisgICAgICAgICAgICAgIHZhbHVlID0gVUxPTkdfTUFYOworICAgICAgICAgICAgfQorICAgICAg ICAgIGlmICh2YWx1ZSA9PSBVTE9OR19NQVgpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAg ICBjb2xvcnZhbCB8PSAodmFsdWUgPDwgcG9zKTsKKyAgICAgICAgICBwb3MgKz0gMHg4OworICAg ICAgICAgIGlmIChpID09IDIpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmICgqZW5k ICE9ICdcMCcpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHVuYmxvY2tf aW5wdXQgKCk7CisgICAgICAgICAgICAgIFhTRVRJTlQgKHJldCwgY29sb3J2YWwpOworICAgICAg ICAgICAgICByZXR1cm4gcmV0OworICAgICAgICAgICAgfQorICAgICAgICAgIGlmICgqZW5kICE9 ICcvJykKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIGNvbG9yID0gZW5kICsgMTsKKyAg ICAgICAgfQorICAgIH0KKyAgICBlbHNlIGlmIChzdHJuaWNtcCAoY29sb3JuYW1lLCAicmdiaToi LCA1KSA9PSAwKQorICAgICAgeworICAgICAgICAvKiBUaGlzIGlzIGFuIFJHQiBJbnRlbnNpdHkg c3BlY2lmaWNhdGlvbi4gKi8KKyAgICAgICAgY29uc3QgY2hhciAqY29sb3I7CisgICAgICAgIFVJ TlQgY29sb3J2YWw7CisgICAgICAgIGludCBpLCBwb3M7CisgICAgICAgIHBvcyA9IDA7CisgICAg ICAgIGNvbG9ydmFsID0gMDsKKyAgICAgICAgY29sb3IgPSBjb2xvcm5hbWUgKyA1OworICAgICAg ICBmb3IgKGkgPSAwOyBpIDwgMzsgaSsrKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGNoYXIg KmVuZDsKKyAgICAgICAgICAgIGRvdWJsZSB2YWx1ZTsKKyAgICAgICAgICAgIFVJTlQgdmFsOwor ICAgICAgICAgICAgdmFsdWUgPSBzdHJ0b2QgKGNvbG9yLCAmZW5kKTsKKyAgICAgICAgICAgIGlm IChlcnJubyA9PSBFUkFOR0UpCisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgaWYg KHZhbHVlIDwgMC4wIHx8IHZhbHVlID4gMS4wKQorICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgIHZhbCA9IChVSU5UKSgweDEwMCAqIHZhbHVlKTsKKyAgICAgICAgICAgIC8qIFdlIHVz ZWQgMHgxMDAgaW5zdGVhZCBvZiAweEZGIHRvIGdpdmUgYSBjb250aW51b3VzCisgICAgICAgICAg ICAgICByYW5nZSBiZXR3ZWVuIDAuMCBhbmQgMS4wIGluY2x1c2l2ZS4gIFRoZSBuZXh0IHN0YXRl bWVudAorICAgICAgICAgICAgICAgZml4ZXMgdGhlIDEuMCBjYXNlLiAqLworICAgICAgICAgICAg aWYgKHZhbCA9PSAweDEwMCkKKyAgICAgICAgICAgICAgdmFsID0gMHhGRjsKKyAgICAgICAgICAg IGNvbG9ydmFsIHw9ICh2YWwgPDwgcG9zKTsKKyAgICAgICAgICAgIHBvcyArPSAweDg7CisgICAg ICAgICAgICBpZiAoaSA9PSAyKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaWYg KCplbmQgIT0gJ1wwJykKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAg IHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgICAgWFNFVElOVCAocmV0LCBjb2xvcnZh bCk7CisgICAgICAgICAgICAgICAgcmV0dXJuIHJldDsKKyAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgaWYgKCplbmQgIT0gJy8nKQorICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAg IGNvbG9yID0gZW5kICsgMTsKKyAgICAgICAgICB9CisgICAgICB9CisgIC8qIEkgYW0gbm90IGdv aW5nIHRvIGF0dGVtcHQgdG8gaGFuZGxlIGFueSBvZiB0aGUgQ0lFIGNvbG9yIHNjaGVtZXMKKyAg ICAgb3IgVGVrSFZDLCBzaW5jZSBJIGRvbid0IGtub3cgdGhlIGFsZ29yaXRobXMgZm9yIGNvbnZl cnNpb24gdG8gUkdCLgorICAgICBJZiB3ZSBmYWlsIHRvIGxvb2t1cCB0aGUgY29sb3IgbmFtZSBp biB3MzJfY29sb3JfbWFwLCB0aGVuIGNoZWNrIHRoZQorICAgICBjb2xvcm5hbWUgdG8gc2VlIGlm IGl0IGNhbiBiZSBjcnVkZWx5IGFwcHJveGltYXRlZDogSWYgdGhlIFggY29sb3IKKyAgICAgZW5k cyBpbiBhIG51bWJlciAoZS5nLiwgImRhcmtzZWFncmVlbjIiKSwgc3RyaXAgdGhlIG51bWJlciBh bmQKKyAgICAgcmV0dXJuIHRoZSByZXN1bHQgb2YgbG9va2luZyB1cCB0aGUgYmFzZSBjb2xvciBu YW1lLiAqLworICByZXQgPSBtY193MzJfY29sb3JfbWFwX2xvb2t1cCAoY29sb3JuYW1lKTsKKyAg aWYgKE5JTFAgKHJldCkpCisgICAgeworICAgICAgaW50IGxlbiA9IHN0cmxlbiAoY29sb3JuYW1l KTsKKyAgICAgIGlmIChpc2RpZ2l0IChjb2xvcm5hbWVbbGVuIC0gMV0pKQorICAgICAgICB7Cisg ICAgICAgICAgY2hhciAqcHRyLCAqYXBwcm94ID0gYWxsb2NhIChsZW4gKyAxKTsKKyAgICAgICAg ICBzdHJjcHkgKGFwcHJveCwgY29sb3JuYW1lKTsKKyAgICAgICAgICBwdHIgPSAmYXBwcm94W2xl biAtIDFdOworICAgICAgICAgIHdoaWxlIChwdHIgPiBhcHByb3ggJiYgaXNkaWdpdCAoKnB0cikp CisgICAgICAgICAgICAqcHRyLS0gPSAnXDAnOworICAgICAgICAgIHJldCA9IG1jX3czMl9jb2xv cl9tYXBfbG9va3VwIChhcHByb3gpOworICAgICAgICB9CisgICAgfQorICB1bmJsb2NrX2lucHV0 ICgpOworICByZXR1cm4gcmV0OworfQorCisvKiBEZWNpZGUgaWYgY29sb3IgbmFtZWQgQ09MT1Ig aXMgdmFsaWQgZm9yIHRoZSBkaXNwbGF5IGFzc29jaWF0ZWQgd2l0aAorICAgdGhlIHNlbGVjdGVk IGZyYW1lOyBpZiBzbywgcmV0dXJuIHRoZSByZ2IgdmFsdWVzIGluIENPTE9SX0RFRi4KKyAgIElm IEFMTE9DIGlzIG5vbnplcm8sIGFsbG9jYXRlIGEgbmV3IGNvbG9ybWFwIGNlbGwuICovCitpbnQK K21jX3czMl9kZWZpbmVkX2NvbG9yIChzdHJ1Y3QgZnJhbWUgKmYsIGNvbnN0IGNoYXIgKmNvbG9y LCBtY19YQ29sb3IgKmNvbG9yX2RlZiwgYm9vbCBhbGxvY19wKQoreworICByZWdpc3RlciBMaXNw X09iamVjdCB0ZW07CisgIENPTE9SUkVGIHczMl9jb2xvcl9yZWY7CisgIHRlbSA9IG1jX3hfdG9f dzMyX2NvbG9yIChjb2xvcik7CisgIGlmICghTklMUCAodGVtKSkKKyAgICB7CisgICAgICBpZiAo ZikKKyAgICAgICAgeworICAgICAgICAgIC8qIEFwcGx5IGdhbW1hIGNvcnJlY3Rpb24uICovCisg ICAgICAgICAgdzMyX2NvbG9yX3JlZiA9IFhVRklYTlVNX1JBVyAodGVtKTsKKyAgICAgICAgICBn YW1tYV9jb3JyZWN0IChmLCAmdzMyX2NvbG9yX3JlZik7CisgICAgICAgICAgWFNFVElOVCAodGVt LCB3MzJfY29sb3JfcmVmKTsKKyAgICAgICAgfQorICAgICAgLyogTWFwIHRoaXMgY29sb3IgdG8g dGhlIHBhbGV0dGUgaWYgaXQgaXMgZW5hYmxlZC4gKi8KKyAgICAgIGlmICghTklMUCAoVnczMl9l bmFibGVfcGFsZXR0ZSkpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgdzMyX3BhbGV0dGVf ZW50cnkgKiBlbnRyeSA9IG9uZV93MzJfZGlzcGxheV9pbmZvLmNvbG9yX2xpc3Q7CisgICAgICAg ICAgc3RydWN0IHczMl9wYWxldHRlX2VudHJ5ICoqIHByZXYgPSAmb25lX3czMl9kaXNwbGF5X2lu Zm8uY29sb3JfbGlzdDsKKyAgICAgICAgICAvKiBjaGVjayBpZiBjb2xvciBpcyBhbHJlYWR5IG1h cHBlZCAqLworICAgICAgICAgIHdoaWxlIChlbnRyeSkKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgaWYgKE1DX1czMl9DT0xPUiAoZW50cnktPmVudHJ5KSA9PSBYVUZJWE5VTV9SQVcgKHRl bSkpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHByZXYgPSAmZW50cnkt Pm5leHQ7CisgICAgICAgICAgICAgIGVudHJ5ID0gZW50cnktPm5leHQ7CisgICAgICAgICAgICB9 CisgICAgICAgICAgaWYgKGVudHJ5ID09IE5VTEwgJiYgYWxsb2NfcCkKKyAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgLyogbm90IGFscmVhZHkgbWFwcGVkLCBzbyBhZGQgdG8gbGlzdCAqLwor ICAgICAgICAgICAgICBlbnRyeSA9IHhtYWxsb2MgKHNpemVvZiAoc3RydWN0IHczMl9wYWxldHRl X2VudHJ5KSk7CisgICAgICAgICAgICAgIE1DX1czMl9TRVRfQ09MT1IgKGVudHJ5LT5lbnRyeSwg WFVGSVhOVU1fUkFXICh0ZW0pKTsKKyAgICAgICAgICAgICAgZW50cnktPm5leHQgPSBOVUxMOwor ICAgICAgICAgICAgICAqcHJldiA9IGVudHJ5OworICAgICAgICAgICAgICBvbmVfdzMyX2Rpc3Bs YXlfaW5mby5udW1fY29sb3JzKys7CisgICAgICAgICAgICAgIC8qIHNldCBmbGFnIHRoYXQgcGFs ZXR0ZSBtdXN0IGJlIHJlZ2VuZXJhdGVkICovCisgICAgICAgICAgICAgIG9uZV93MzJfZGlzcGxh eV9pbmZvLnJlZ2VuX3BhbGV0dGUgPSBUUlVFOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICAvKiBFbnN1cmUgQ09MT1JSRUYgdmFsdWUgaXMgc25hcHBlZCB0byBuZWFyZXN0IGNvbG9y IGluIChkZWZhdWx0KQorICAgICAgICAgcGFsZXR0ZSBieSBzaW11bGF0aW5nIHRoZSBQQUxFVFRF UkdCIG1hY3JvLi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VlICh0ZW1wLnBpeGVsKSkg LyA2NTUzNS4wOworICAgICAgbHNsLT5ibHVlID0gKChHZXRCVmFsdWUgKHRlbXAucGl4ZWwpIDw8 IDgpIHwgR2V0QlZhbHVlICh0ZW1wLnBpeGVsKSkgLyA2NTUzNS4wOworICAgIH0KKyAgICBlbHNl CisgICAgICB7CisgICAgICAgIGxzbC0+cmVkID0gLTEuMDsKKyAgICAgICAgbHNsLT5ncmVlbiA9 IC0xLjA7CisgICAgICAgIGxzbC0+Ymx1ZSA9IC0xLjA7CisgICAgICB9Cit9CisKKy8qIERyYXcg c3RyZXRjaCBnbHlwaCBzdHJpbmcgUy4gKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJhd19zdHJl dGNoX2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKK3sKKyAgZWFzc2VydCAo cy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCk7CisgIGlmIChzLT5obCA9PSBE UkFXX0NVUlNPUgorICAgICAgJiYgIXhfc3RyZXRjaF9jdXJzb3JfcCkKKyAgICB7CisgICAgICAv KiBJZiBgeC1zdHJldGNoLWN1cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3IGEgYmxvY2sgY3Vyc29y IGFzIHdpZGUgYXMgdGhlCisgICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgaW50IHdpZHRo LCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4ID0g cy0+eDsKKyAgICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB7CisgICAgICAg ICAgaW50IGxlZnRfeCA9IHdpbmRvd19ib3hfbGVmdF9vZmZzZXQgKHMtPncsIFRFWFRfQVJFQSk7 CisgICAgICAgICAgaWYgKHggPCBsZWZ0X3gpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IGJhY2tncm91bmRfd2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICAgICAgeCA9IGxlZnRf eDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICB7Cisg ICAgICAgICAgIC8qIEluIFIyTCByb3dzLCBkcmF3IHRoZSBjdXJzb3Igb24gdGhlIHJpZ2h0IGVk Z2Ugb2YgdGhlCisgICAgICAgICAgICAgIHN0cmV0Y2ggZ2x5cGguICovCisgICAgICAgICAgIGlu dCByaWdodF94ID0gd2luZG93X2JveF9yaWdodCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAg ICAgaWYgKHggKyBiYWNrZ3JvdW5kX3dpZHRoID4gcmlnaHRfeCkKKyAgICAgICAgICAgICBiYWNr Z3JvdW5kX3dpZHRoIC09IHggLSByaWdodF94OworICAgICAgICAgICB4ICs9IGJhY2tncm91bmRf d2lkdGg7CisgICAgICAgICB9CisgICAgICB3aWR0aCA9IG1pbiAoRlJBTUVfQ09MVU1OX1dJRFRI IChzLT5mKSwgYmFja2dyb3VuZF93aWR0aCk7CisgICAgICBpZiAocy0+cm93LT5yZXZlcnNlZF9w KQorICAgICAgICB4IC09IHdpZHRoOworICAgICAgLyogRHJhdyBjdXJzb3IuICovCisgICAgICB3 MzJfZHJhd19nbHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwgcy0+eSwgd2lkdGgsIHMtPmhlaWdo dCk7CisgICAgICAvKiBDbGVhciByZXN0IHVzaW5nIHRoZSBHQyBvZiB0aGUgb3JpZ2luYWwgbm9u LWN1cnNvciBmYWNlLiAqLworICAgICAgaWYgKHdpZHRoIDwgYmFja2dyb3VuZF93aWR0aCkKKyAg ICAgICAgeworICAgICAgICAgIEVtYWNzX0dDICpnYyA9IHMtPmZhY2UtPmdjOworICAgICAgICAg IGludCB5ID0gcy0+eTsKKyAgICAgICAgICBpbnQgdyA9IGJhY2tncm91bmRfd2lkdGggLSB3aWR0 aCwgaCA9IHMtPmhlaWdodDsKKyAgICAgICAgICBSRUNUIHI7CisgICAgICAgICAgSERDIGhkYyA9 IHMtPmhkYzsKKyAgICAgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgICAg IHggKz0gd2lkdGg7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHggPSBzLT54Owor ICAgICAgICAgIGlmIChzLT5yb3ctPm1vdXNlX2ZhY2VfcAorICAgICAgICAgICAgICAmJiBjdXJz b3JfaW5fbW91c2VfZmFjZV9wIChzLT53KSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg dzMyX3NldF9tb3VzZV9mYWNlX2djIChzKTsKKyAgICAgICAgICAgICAgZ2MgPSBzLT5nYzsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgZ2MgPSBzLT5mYWNl LT5nYzsKKyAgICAgICAgICBnZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgJnIpOworICAg ICAgICAgIHczMl9zZXRfY2xpcF9yZWN0YW5nbGUgKGhkYywgJnIpOworI2lmIDAgLyogVE9ETzog c3RpcHBsZSAqLworICAgICAgICAgIGlmIChzLT5mYWNlLT5zdGlwcGxlKQorICAgICAgICAgICAg eworICAgICAgICAgICAgICAvKiBGaWxsIGJhY2tncm91bmQgd2l0aCBhIHN0aXBwbGUgcGF0dGVy bi4gKi8KKyAgICAgICAgICAgICAgWFNldEZpbGxTdHlsZSAocy0+ZGlzcGxheSwgZ2MsIEZpbGxP cGFxdWVTdGlwcGxlZCk7CisgICAgICAgICAgICAgIFhGaWxsUmVjdGFuZ2xlIChzLT5kaXNwbGF5 LCBzLT53aW5kb3csIGdjLCB4LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAgWFNldEZpbGxTdHls ZSAocy0+ZGlzcGxheSwgZ2MsIEZpbGxTb2xpZCk7CisgICAgICAgICAgICB9CisgICAgICAgICAg ICBlbHNlCisjZW5kaWYKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHczMl9maWxs X2FyZWEgKHMtPmYsIHMtPmhkYywgZ2MtPmJhY2tncm91bmQsIHgsIHksIHcsIGgpOworICAgICAg ICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAoIXMtPmJhY2tncm91bmRf ZmlsbGVkX3ApCisgICAgICB7CisgICAgICAgIGludCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFj a2dyb3VuZF93aWR0aDsKKyAgICAgICAgaW50IHggPSBzLT54LCBsZWZ0X3ggPSB3aW5kb3dfYm94 X2xlZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAvKiBEb24ndCBkcmF3IGlu dG8gbGVmdCBtYXJnaW4sIGZyaW5nZSBvciBzY3JvbGxiYXIgYXJlYQorICAgICAgICAgICBleGNl cHQgZm9yIGhlYWRlciBsaW5lIGFuZCBtb2RlIGxpbmUuICovCisgICAgICAgIGlmICh4IDwgbGVm dF94ICYmICFzLT5yb3ctPm1vZGVfbGluZV9wKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJh Y2tncm91bmRfd2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICAgIHggPSBsZWZ0X3g7Cisg ICAgICAgICAgfQorICAgICAgICBpZiAoYmFja2dyb3VuZF93aWR0aCA+IDApCisgICAgICAgICAg dzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2JnX3JlY3QgKHMsIHgsIHMtPnksIGJhY2tncm91bmRfd2lk dGgsIHMtPmhlaWdodCk7CisgICAgICB9CisgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVl OworfQorCisvKiBTZXQgUy0+Z2MgdG8gYSBzdWl0YWJsZSBHQyBmb3IgZHJhd2luZyBnbHlwaCBz dHJpbmcgUyBpbiBjdXJzb3IKKyAgIGZhY2UuICovCitzdGF0aWMgdm9pZAorbWNfdzMyX3NldF9j dXJzb3JfZ2MgKHN0cnVjdCBnbHlwaF9zd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PSAwOworICAgIH0KKyAgICBlbHNlIGlmIChzLT5obCA9PSBE UkFXX0lOVkVSU0VfVklERU8pCisgICAgICB7CisgICAgICAgIHczMl9zZXRfbW9kZV9saW5lX2Zh Y2VfZ2MgKHMpOworICAgICAgICBzLT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAw OworICAgICAgfQorICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IpCisgICAgICAg IHsKKyAgICAgICAgICBtY193MzJfc2V0X2N1cnNvcl9nYyAocywgY3Vyc29yX2djX3ApOworICAg ICAgICAgIHMtPnN0aXBwbGVkX3AgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlm IChzLT5obCA9PSBEUkFXX01PVVNFX0ZBQ0UpCisgICAgICAgICAgeworICAgICAgICAgICAgdzMy X3NldF9tb3VzZV9mYWNlX2djIChzKTsKKyAgICAgICAgICAgIHMtPnN0aXBwbGVkX3AgPSBzLT5m YWNlLT5zdGlwcGxlICE9IDA7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMtPmhs ID09IERSQVdfSU1BR0VfUkFJU0VECisgICAgICAgICAgICAgICAgICAgfHwgcy0+aGwgPT0gRFJB V19JTUFHRV9TVU5LRU4pCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPmdjID0gcy0+ ZmFjZS0+Z2M7CisgICAgICAgICAgICAgIHMtPnN0aXBwbGVkX3AgPSBzLT5mYWNlLT5zdGlwcGxl ICE9IDA7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGVt YWNzX2Fib3J0ICgpOworICAvKiBHQyBtdXN0IGhhdmUgYmVlbiBzZXQuICovCisgIGVhc3NlcnQg KHMtPmdjICE9IDApOworfQorCisvKiBEcmF3IGEgaG9sbG93IGJveCBjdXJzb3Igb24gd2luZG93 IFcgaW4gZ2x5cGggcm93IFJPVy4gKi8KK3N0YXRpYy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3dzIHdoZW4gc3dpdGNoaW5nIGJldHdlZW4gZWNobyBhcmVh IGdseXBocworICAgICBhbmQgbWluaS1idWZmZXIuICovCisgIHN0cnVjdCBnbHlwaCAqY3Vyc29y X2dseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhwb3MsIHZwb3Mp OworICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgcmV0dXJuOworICAvKiBJZiBvbiBh biBpbWFnZSwgZHJhdyBsaWtlIGEgbm9ybWFsIGN1cnNvci4gIFRoYXQncyB1c3VhbGx5IGJldHRl cgorICAgICB2aXNpYmxlIHRoYW4gZHJhd2luZyBhIGJhciwgZXNwLiBpZiB0aGUgaW1hZ2UgaXMg bGFyZ2Ugc28gdGhhdAorICAgICB0aGUgYmFyIG1pZ2h0IG5vdCBiZSBpbiB0aGUgd2luZG93LiAq LworICBpZiAoY3Vyc29yX2dseXBoLT50eXBlID09IElNQUdFX0dMWVBIKQorICAgIHsKKyAgICAg IHN0cnVjdCBtY19SR0IgbHNsID0gey5yZWQgPSAtMS4wLCAuZ3JlZW4gPSAtMS4wLCAuYmx1ZSA9 IC0xLjB9OworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gTk9fRkxBVk9SOwor ICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IE1DX0hPTExPV19CT1g7Cisg ICAgICBib29sIGFjdGl2ZV9wID0gZmFsc2U7CisgICAgICBib29sIGN1cnNvcl9nY19wID0gZmFs c2U7CisgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VS U09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5 cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAg fQorICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgQ09MT1JSRUYgY3Vyc29yX2NvbG9yID0gZi0+ b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWw7CisgICAgICAgIHN0cnVjdCBmYWNlICpmYWNl ID0gRkFDRV9GUk9NX0lEIChmLCBjdXJzb3JfZ2x5cGgtPmZhY2VfaWQpOworICAgICAgICBIREMg aGRjOworICAgICAgICAvKiBJZiB0aGUgZ2x5cGgncyBiYWNrZ3JvdW5kIGVxdWFscyB0aGUgY29s b3Igd2Ugbm9ybWFsbHkgZHJhdworICAgICAgICB0aGUgYmFyIGN1cnNvciBpbiwgdGhlIGJhciBj dXJzb3IgaW4gaXRzIG5vcm1hbCBjb2xvciBpcworICAgICAgICBpbnZpc2libGUuICBVc2UgdGhl IGdseXBoJ3MgZm9yZWdyb3VuZCBjb2xvciBpbnN0ZWFkIGluIHRoaXMKKyAgICAgICAgY2FzZSwg b24gdGhlIGFzc3VtcHRpb24gdGhhdCB0aGUgZ2x5cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbwor ICAgICAgICB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxlLiAqLworICAgICAgICBpZiAoZmFjZS0+ YmFja2dyb3VuZCA9PSBjdXJzb3JfY29sb3IKKyAgICAgICAgICAgICYmICFjdXJzb3JfZ2NfaW52 aXNpYmxlX29rYXlfcCkKKyAgICAgICAgICBjdXJzb3JfY29sb3IgPSBmYWNlLT5mb3JlZ3JvdW5k OworICAgICAgICBpbnQgZGVmYXVsdF9meCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1gg KHcsIHgpOworICAgICAgICBoZGMgPSBnZXRfZnJhbWVfZGMgKGYpOworICAgICAgICB3MzJfY2xp cF90b19yb3cgKHcsIHJvdywgVEVYVF9BUkVBLCBoZGMpOworICAgICAgICBpbnQgcnggPSBmeDsK KyAgICAgICAgaW50IHJ5ID0gZnk7CisgICAgICAgIGludCBydyA9IHdkOworICAgICAgICBpbnQg cmggPSBoOworICAgICAgICAvLyAgZnByaW50ZiAoc3RkZXJyLCAiTUNfSEJBUjogIGZ4ICglZCkg fCBmeSAoJWQpIHwgd2QgKCVkKSB8IGggKCVkKVxuIiwKKyAgICAgICAgLy8gICAgICAgICAgICAg ICAgICAgcngsIHJ5LCBydywgcmgpOworICAgICAgICB3MzJfZmlsbF9hcmVhIChmLCBoZGMsIGN1 cnNvcl9jb2xvciwgcngsIHJ5LCBydywgcmgpOworICAgICAgICB3MzJfc2V0X2NsaXBfcmVjdGFu Z2xlIChoZGMsIE5VTEwpOworICAgICAgICByZWxlYXNlX2ZyYW1lX2RjIChmLCBoZGMpOworICAg ICAgfQorfQorCisvKiBSSUY6IERyYXcgb3IgY2xlYXIgY3Vyc29yIG9uIHdpbmRvdyBXLiAqLwor c3RhdGljIHZvaWQKK21jX3czMl9kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncs IHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAg ICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGlu dCB2cG9zLCBpbnQgd2QsIGludCBoLAorICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBs c2wsIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICBp bnQgY3Vyc29yX3dpZHRoLCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsIGJvb2wgb25fcCwg Ym9vbCBhY3RpdmVfcCkKK3sKKyAgaWYgKG9uX3ApCisgICAgeworICAgICAgLyogSWYgdGhpcyBp cyB0aGUgYWN0aXZlIGN1cnNvciwgd2UgbmVlZCB0byB0cmFjayBpdCB3aXRoIHRoZQorICAgICAg c3lzdGVtIGNhcmV0LCBzbyB0aGlyZCBwYXJ0eSBzb2Z0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orICAgICAgICAgICAgIHN5c3RlbSBjYXJldC4gKi8KKyAgICAgICAgICBpZiAodzMy X3N5c3RlbV9jYXJldF9od25kCisgICAgICAgICAgICAgICYmICh3MzJfc3lzdGVtX2NhcmV0X2hl aWdodCAhPSBoKSkKKyAgICAgICAgICAgIFBvc3RNZXNzYWdlIChod25kLCBXTV9FTUFDU19ERVNU Uk9ZX0NBUkVULCAwLCAwKTsKKyAgICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X2hlaWdodCA9IGg7 CisgICAgICAgICAgLyogTW92ZSB0aGUgc3lzdGVtIGNhcmV0LiAqLworICAgICAgICAgIFBvc3RN ZXNzYWdlIChod25kLCBXTV9FTUFDU19UUkFDS19DQVJFVCwgMCwgMCk7CisgICAgICAgIH0KKyAg ICAgIC8qIFRoZSBmcmluZ2UgYml0bWFwcyBhcmUgcHJlc2VudGx5IGhhbmRsZWQgZWxzZXdoZXJl LCBidXQgY291bGQgc29tZWRheQorICAgICAgYmUgbWFuYWdlZCAoaW4gcGFydCkgYXQgdGhpcyBz ZWN0aW9uIG9mIGNvZGUuICovCisgICAgICBpZiAocm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGlu ZV9wCisgICAgICAgICAgJiYgKHJvdy0+cmV2ZXJzZWRfcAorICAgICAgICAgICAgID8gKGhwb3Mg PCAwKQorICAgICAgICAgICAgIDogKGhwb3MgPj0gcm93LT51c2VkW1RFWFRfQVJFQV0pKSkKKyAg ICAgICAgeworICAgICAgICAgIHJvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gdHJ1ZTsKKyAgICAg ICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgcm93LT5yZXZlcnNlZF9wLCBjdXJz b3JfdHlwZSk7CisgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CisgIHN0cnVjdCBmcmFtZSAq ZiA9IFhGUkFNRSAoV0lORE9XX0ZSQU1FICh3KSk7CisgIENPTE9SUkVGIG9yaWdpbmFsX2N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G9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist cmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAg ICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9s bG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVn cm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAg ICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5k OworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2 ZV9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgZW51bSBm YWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYs IGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVl KTsKKyAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2Zh Y2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAg ICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19pbmFjdGl2ZV9mYWNl LT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5k ID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9IFhDcmVhdGVHQyAo TlVMTCwgRlJBTUVfVzMyX1dJTkRPVyAoZiksIG1hc2ssICZnY192YWx1ZXMpOworICAgICAgICAg IGJsb2NrX2lucHV0ICgpOworICAgICAgICAgIC8qIEZvcmNlIGBtY193MzJfc2V0X2N1cnNvcl9n YycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycuICovCisgICAgICAg ICAgYm9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7CisgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5 cGggKHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywgbHNsLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3 ZCwgYWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzIt PmN1cnNvcl9nYyA9IG9yaWdpbmFsX2N1cnNvcl9nYzsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0 ICgpOworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMy LT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNv ciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29y X3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9nbHlwaC0+dHlwZSA9 PSBJTUFHRV9HTFlQSCAmJiBsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJs dWUgPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sg YGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICAgIGYtPm91 dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgICBt Y193MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBo cG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNv cl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgICB9CisgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sg YGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAg ICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4gdzMyZm5zLmMuICovCisgICAg ICAgICAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmIGFjdGl2 ZV9wCisgICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPT0gcmVnaW9u X2JlZykKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2FjdGl2ZV9yZWdpb25fYmVnX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywg ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yL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ha2UtY3Vyc29yLWF0LXJlZ2lvbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAg ICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlID0g RkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7CisgICAg ICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29r dXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1m YWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2Fj dGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAg ICAgICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19hY3RpdmVfZmFj ZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQg PSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA+IHJlZ2lvbl9iZWcKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA8IHJlZ2lvbl9lbmQpCisg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBl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mFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vy c29yLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0 IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2 ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5k ID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQ7 CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYg KCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUt enYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2Ug KmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVf ZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5k ID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICAg ICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tn cm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGYtPm91dHB1 dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBGUkFNRV9XMzJfV0lORE9X IChmKSwgbWFzaywgJmdjX3ZhbHVlcyk7CisgICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgpOwor ICAgICAgICAgICAgICAvKiBGb3JjZSBgbWNfdzMyX3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+ Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgICAgICBib29sIGN1 cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcs IG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2Qs IGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAgICAgICAgICAgICB1bmJsb2Nr X2lucHV0ICgpOworICAgICAgICAgICAgICBtY193MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBt YXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAg ICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAgIHsK KyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0g MCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0 X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9s bG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2Qs IGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2lu YWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBtY193 MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9z LCB2cG9zLCB3ZCwgaCk7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19GSUxMRURf Qk9YOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYg bHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFj ayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAgICAg ICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHczMmZucy5jLiAqLworICAgICAg ICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgIEVtYWNzX0dDIGdjX3ZhbHVlczsKKyAgICAg ICAgICB1bnNpZ25lZCBsb25nIG1hc2sgPSBHQ0ZvcmVncm91bmQgfCBHQ0JhY2tncm91bmQ7Cisg ICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBGUkFNRV9CQUNLR1JPVU5EX1BJWEVMIChm KTsKKyAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGNvbG9yX3BpeGVsOworICAgICAg ICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBGUkFN RV9XMzJfV0lORE9XIChmKSwgbWFzaywgJmdjX3ZhbHVlcyk7CisgICAgICAgICAgLyogRm9yY2Ug YG1jX3czMl9zZXRfY3Vyc29yX2djJyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX2djJy4gKi8KKyAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAg ICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBo cG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2Zs YXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAg IGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAg ICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAg ICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3AgPSBmYWxzZTsKKyAgICAgICAgICAg IG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgRFJBV19DVVJTT1IsIHgsIGhw b3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlwaF9m bGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX2djX3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAg IH0KKyAgICBjYXNlIE1DX0JBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxz bC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBU ZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gKi8K KyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVs OworICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAg ICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwg ZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgs IGN1cnNvcl93aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAg ICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3Jf cGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAg IGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1j X3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3Ms IHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29y X3dpZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICB9 CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IQkFSOgorICAgIHsKKyAgICAgIGlm IChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAg ICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMy LT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxl X29rYXlfcCA9IHRydWU7CisgICAgICAgICAgbWNfdzMyX2RyYXdfYmFyX2N1cnNvciAodywgbWF0 cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19IQkFSLCBjdXJzb3JfZ2NfaW52 aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4 ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSBm YWxzZTsKKyAgICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19IQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxl X29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGRlZmF1bHQ6 CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgfQorICAgIH0KK30KKworLyogRHJhdyBnbHlwaCBz dHJpbmcgUy4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mIChuZXh0LT5maXJz dF9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBt Y193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAobmV4dCwgY3Vyc29yX2djX3ApOworICAgICAgICAg ICAgdzMyX3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmcgKG5leHQpOworICAgICAgICAgICAgaWYg KG5leHQtPmZpcnN0X2dseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgICAgICAgICAgICAg IG1jX3czMl9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChuZXh0KTsKKyAgICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19iYWNrZ3JvdW5kIChu ZXh0LCB0cnVlKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7CisgICAgICAgICAg fQorICAgIH0KKyAgLyogU2V0IHVwIFMtPmdjLCBzZXQgY2xpcHBpbmcgYW5kIGRyYXcgUy4gKi8K KyAgbWNfdzMyX3NldF9nbHlwaF9zdHJpbmdfZ2MgKHMsIGN1cnNvcl9nY19wKTsKKyAgLyogRHJh dyByZWxpZWYgKGlmIGFueSkgaW4gYWR2YW5jZSBmb3IgY2hhci9jb21wb3NpdGlvbiBzbyB0aGF0 IHRoZQorICAgICBnbHlwaCBzdHJpbmcgY2FuIGJlIGRyYXduIG92ZXIgaXQuICovCisgIGlmICgh cy0+Zm9yX292ZXJsYXBzCisgICAgICAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gKKyAg ICAgICYmIChzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgfHwg cy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKSkKKyAgICB7CisgICAgICB3 MzJfc2V0X2dseXBoX3N0cmluZ19jbGl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ZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgp OworICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMpCisgICAgeworICAgICAgLyogRHJhdyB1 bmRlcmxpbmUuICovCisgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3ApCisgICAgICAgIHsK KyAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9XQVZF KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBDT0xPUlJFRiBjb2xvcjsKKyAgICAgICAg ICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAg ICBjb2xvciA9IHMtPmdjLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAg ICAgICAgICAgICAgIGNvbG9yID0gcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yOworICAgICAgICAg ICAgICB3MzJfZHJhd191bmRlcndhdmUgKHMsIGNvbG9yKTsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgICBlbHNlIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJTkUp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBw b3NpdGlvbjsKKyAgICAgICAgICAgICAgaW50IHk7CisgICAgICAgICAgICAgIGlmIChzLT5wcmV2 ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV9wCisgICAgICAgICAgICAgICAgICAmJiBzLT5w cmV2LT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgLyogV2UgdXNlIHRoZSBzYW1lIHVuZGVybGluZSBz dHlsZSBhcyB0aGUgcHJldmlvdXMgb25lLiAqLworICAgICAgICAgICAgICAgICAgdGhpY2tuZXNz ID0gcy0+cHJldi0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICAgIHBvc2l0 aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8q IEdldCB0aGUgdW5kZXJsaW5lIHRoaWNrbmVzcy4gIERlZmF1bHQgaXMgMSBwaXhlbC4gKi8KKyAg ICAgICAgICAgICAgICAgIGlmIChzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV90aGlja25l c3MgPiAwKQorICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSBzLT5mb250LT51bmRlcmxp bmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAg ICAgICAgdGhpY2tuZXNzID0gMTsKKyAgICAgICAgICAgICAgICAgIGlmICh4X3VuZGVybGluZV9h dF9kZXNjZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhlaWdo dCAtIHRoaWNrbmVzcykgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIC8q IEdldCB0aGUgdW5kZXJsaW5lIHBvc2l0aW9uLiAgVGhpcyBpcyB0aGUgcmVjb21tZW5kZWQKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRpY2FsIG9mZnNldCBpbiBwaXhlbHMgZnJvbSB0 aGUgYmFzZWxpbmUgdG8gdGhlIHRvcCBvZgorICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhl IHVuZGVybGluZS4gIFRoaXMgaXMgYSBzaWduZWQgdmFsdWUgYWNjb3JkaW5nIHRvIHRoZQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgc3BlY3MsIGFuZCBpdHMgZGVmYXVsdCBpcworICAgICAg ICAgICAgICAgICAgICAgICAgICAgUk9VTkQgKChtYXhpbXVtX2Rlc2NlbnQpIC8gMiksIHdpdGgK KyAgICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EICh4KSA9IGZsb29yICh4ICsgMC41KSAg Ki8KKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRpb25f cHJvcGVydGllcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHMtPmZvbnQgJiYgcy0+ Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgICAg IHBvc2l0aW9uID0gcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICAg ICAgICAgICAgZWxzZSBpZiAocy0+Zm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcG9z aXRpb24gPSAocy0+Zm9udC0+ZGVzY2VudCArIDEpIC8gMjsKKyAgICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IG1heCAocG9zaXRpb24sIHVuZGVybGlu ZV9taW5pbXVtX29mZnNldCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAvKiBD aGVjayB0aGUgc2FuaXR5IG9mIHRoaWNrbmVzcyBhbmQgcG9zaXRpb24uICBXZSBzaG91bGQKKyAg ICAgICAgICAgICAgICAgYXZvaWQgZHJhd2luZyB1bmRlcmxpbmUgb3V0IG9mIHRoZSBjdXJyZW50 IGxpbmUgYXJlYS4gKi8KKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPD0gcy0+ eWJhc2UgKyBwb3NpdGlvbikKKyAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQg LSAxKSAtIChzLT55YmFzZSAtIHMtPnkpOworICAgICAgICAgICAgICBpZiAocy0+eSArIHMtPmhl aWdodCA8IHMtPnliYXNlICsgcG9zaXRpb24gKyB0aGlja25lc3MpCisgICAgICAgICAgICAgICAg dGhpY2tuZXNzID0gKHMtPnkgKyBzLT5oZWlnaHQpIC0gKHMtPnliYXNlICsgcG9zaXRpb24pOwor ICAgICAgICAgICAgICBzLT51bmRlcmxpbmVfdGhpY2tuZXNzID0gdGhpY2tuZXNzOworICAgICAg ICAgICAgICBzLT51bmRlcmxpbmVfcG9zaXRpb24gPXBvc2l0aW9uOworICAgICAgICAgICAgICB5 ID0gcy0+eWJhc2UgKyBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVy bGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBz LT5oZGMsIHMtPmdjLT5mb3JlZ3JvdW5kLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHksIHMtPndpZHRoLCAxKTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAg ICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmZhY2UtPnVuZGVybGluZV9j b2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHksIHMtPndpZHRo LCAxKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRHJhdyBvdmVybGluZS4g Ki8KKyAgICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9wKQorICAgICAgICB7CisgICAgICAgICAg dW5zaWduZWQgbG9uZyBkeSA9IDAsIGggPSAxOworICAgICAgICAgIGlmIChzLT5mYWNlLT5vdmVy bGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMtPmYs IHMtPmhkYywgcy0+Z2MtPmZvcmVncm91bmQsIHMtPngsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5mYWNlLT5vdmVybGluZV9jb2xv ciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+eSArIGR5LCBzLT53aWR0 aCwgaCk7CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgc3RyaWtlLXRocm91Z2guICovCisgICAg ICBpZiAocy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfcAorICAgICAgICAgICYmICFGT05UX1RFWFRN RVRSSUMgKHMtPmZvbnQpLnRtU3RydWNrT3V0KQorICAgICAgICB7CisgICAgICAgICAgdW5zaWdu ZWQgbG9uZyBoID0gMTsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGR5ID0gKHMtPmhlaWdodCAt IGgpIC8gMjsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfY29sb3JfZGVm YXVsdGVkX3ApCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmdj LT5mb3JlZ3JvdW5kLCBzLT54LCBzLT55ICsgZHksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICBzLT53aWR0aCwgaCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHczMl9maWxs X2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfY29sb3IsIHMtPngs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOwor ICAgICAgICB9CisgICAgICAvKiBEcmF3IHJlbGllZiBpZiBub3QgeWV0IGRyYXduLiAqLworICAg ICAgaWYgKCFyZWxpZWZfZHJhd25fcCAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gpCisg ICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19ib3ggKHMpOworICAgICAgaWYgKHMtPnByZXYp CisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpwcmV2OworICAgICAg ICAgIGZvciAocHJldiA9IHMtPnByZXY7IHByZXY7IHByZXYgPSBwcmV2LT5wcmV2KQorICAgICAg ICAgICAgaWYgKHByZXYtPmhsICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgcHJldi0+eCAr IHByZXYtPndpZHRoICsgcHJldi0+cmlnaHRfb3ZlcmhhbmcgPiBzLT54KQorICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgLyogQXMgcHJldiB3YXMgZHJhd24gd2hpbGUgY2xpcHBlZCB0 byBpdHMgb3duIGFyZWEsIHdlCisgICAgICAgICAgICAgICAgICAgbXVzdCBkcmF3IHRoZSByaWdo dF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBlbnVt IGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IHByZXYtPmhsOworICAgICAgICAgICAgICAgIHByZXYt PmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfdzMyX3NldF9nbHlwaF9zdHJpbmdfZ2Mg KHByZXYsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgICAgICB3MzJfc2V0X2dseXBoX3N0cmlu Z19jbGlwcGluZ19leGFjdGx5IChzLCBwcmV2KTsKKyAgICAgICAgICAgICAgICBpZiAocHJldi0+ Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSCkKKyAgICAgICAgICAgICAgICAgIHczMl9k cmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgICAgICAgdzMyX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19m b3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xl IChwcmV2LT5oZGMsIE5VTEwpOworICAgICAgICAgICAgICAgIHByZXYtPmhsID0gc2F2ZTsKKyAg ICAgICAgICAgICAgICBwcmV2LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgICAgICB9CisgICAg ICAgIH0KKyAgICAgIGlmIChzLT5uZXh0KQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGds eXBoX3N0cmluZyAqbmV4dDsKKyAgICAgICAgICBmb3IgKG5leHQgPSBzLT5uZXh0OyBuZXh0OyBu ZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAgICAgIGlmIChuZXh0LT5obCAhPSBzLT5obAorICAg ICAgICAgICAgICAgICYmIG5leHQtPnggLSBuZXh0LT5sZWZ0X292ZXJoYW5nIDwgcy0+eCArIHMt PndpZHRoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogQXMgbmV4dCB3aWxs IGJlIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLAorICAgICAgICAgICAgICAg ICAgIHdlIG11c3QgZHJhdyB0aGUgbGVmdF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4g Ki8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IG5leHQtPmhs OworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNf dzMyX3NldF9nbHlwaF9zdHJpbmdfZ2MgKG5leHQsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAg ICAgICB3MzJfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19leGFjdGx5IChzLCBuZXh0KTsKKyAg ICAgICAgICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSCkK KyAgICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0 KTsKKyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgdzMyX2RyYXdf Y29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAgICAg ICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChuZXh0LT5oZGMsIE5VTEwpOworICAgICAgICAgICAg ICAgIG5leHQtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAgICBuZXh0LT5udW1fY2xpcHMgPSAw OworICAgICAgICAgICAgICAgIG5leHQtPmNsaXBfaGVhZCA9IHMtPm5leHQ7CisgICAgICAgICAg ICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLyogUmVzZXQgY2xpcHBpbmcuICovCisgIHczMl9z ZXRfY2xpcF9yZWN0YW5nbGUgKHMtPmhkYywgTlVMTCk7CisgIHMtPm51bV9jbGlwcyA9IDA7Cit9 CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAvKiBGcmluZ2UgYml0bWFwcy4gICovCiAKIHN0YXRpYyBpbnQgbWF4X2ZyaW5nZV9ibXAg PSAwOwpAQCAtNTQyLDYgKzE3MDEsMTUgQEAgdzMyX3VwZGF0ZV9iZWdpbiAoc3RydWN0IGZyYW1l ICpmKQogICBpZiAoISBGUkFNRV9XMzJfUCAoZikpCiAgICAgcmV0dXJuOwogCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0 aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBSZWdl bmVyYXRlIGRpc3BsYXkgcGFsZXR0ZSBiZWZvcmUgZHJhd2luZyBpZiBsaXN0IG9mIHJlcXVlc3Rl ZAogICAgICBjb2xvcnMgaGFzIGNoYW5nZWQuICovCiAgIGlmIChkaXNwbGF5X2luZm8tPnJlZ2Vu X3BhbGV0dGUpCkBAIC02NzQsNiArMTg0MiwxNiBAQCB3MzJfdXBkYXRlX2VuZCAoc3RydWN0IGZy YW1lICpmKQogCiAgIC8qIE1vdXNlIGhpZ2hsaWdodCBtYXkgYmUgZGlzcGxheWVkIGFnYWluLiAg Ki8KICAgTU9VU0VfSExfSU5GTyAoZiktPm1vdXNlX2ZhY2VfZGVmZXIgPSBmYWxzZTsKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5t Y191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IH0KIAogCkBAIC00MDAyLDEzICs1MTgwLDc0IEBAIHczMl9zZXRfdmVydGljYWxfc2Nyb2xsX2Jh ciAoc3RydWN0IHdpbmRvdyAqdywKIAkgICAgICByZWxlYXNlX2ZyYW1lX2RjIChmLCBoZGMpOwog CSAgICAgIHczMl9jbGVhcl91bmRlcl9pbnRlcm5hbF9ib3JkZXIgKGYpOwogCSAgICB9CisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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AobGVmdCA8PSBiYXItPmxlZnQpCisgICAgICAgICAgICBteV9zaG93X3dpbmRvdyAo ZiwgaHduZCwgU1dfSElERSk7CisgICAgICAgICAgTW92ZVdpbmRvdyAoaHduZCwgbGVmdCwgdG9w LCB3aWR0aCwgbWF4IChoZWlnaHQsIDEpLCBsZWZ0IDw9IGJhci0+bGVmdCk7CisKKy8qIGVuZCBN VUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAJICBzaS5j YlNpemUgPSBzaXplb2YgKHNpKTsKIAkgIHNpLmZNYXNrID0gU0lGX1JBTkdFOwpAQCAtNDI3Nyw2 ICs1NTE2LDIxIEBAIHczMl9qdWRnZV9zY3JvbGxfYmFycyAoc3RydWN0IGZyYW1lICpmKQogICAg IHsKICAgICAgIHN0cnVjdCBzY3JvbGxfYmFyICpiID0gWFNDUk9MTF9CQVIgKGJhcik7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAg IC8qIGBEZXN0cm95V2luZG93JyB3aXRoaW4gYHhfc2Nyb2xsX2Jhcl9yZW1vdmUnIHJlcGFpbnRz IHRoZSByZWN0YW5nbGUuCisgICAgICBUaGVyZWZvcmUsIHdlIGZpcnN0IHNlbmQgYSBtZXNzYWdl IHRvIGluaGliaXQgcmVwYWludGluZy4gKi8KKyAgICAgIGlmICghV0lORE9XX0xJVkVfUCAoYi0+ d2luZG93KSkKKyAgICAgICAgeworICAgICAgICAgIEhXTkQgaHduZCA9IFNDUk9MTF9CQVJfVzMy X1dJTkRPVyAoYik7CisgICAgICAgICAgU2VuZE1lc3NhZ2UgKGh3bmQsIFdNX1NFVFJFRFJBVywg ZmFsc2UsIDApOworICAgICAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg ICAgIHczMl9zY3JvbGxfYmFyX3JlbW92ZSAoYik7CiAKICAgICAgIG5leHQgPSBiLT5uZXh0OwpA QCAtNzA4OCw2ICs4MzQyLDIwIEBAIGV4dGVybiBmcmFtZV9wYXJtX2hhbmRsZXIgdzMyX2ZyYW1l X3Bhcm1faGFuZGxlcnNbXTsKIAogc3RhdGljIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNlIHcz Ml9yZWRpc3BsYXlfaW50ZXJmYWNlID0KIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGB3 MzJ0ZXJtLmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMgdGhlCitgcmVkaXNw bGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgbWNfdzMyX2RyYXdfd2lu ZG93X2N1cnNvciwKKyAgbWNfdzMyX2RyYXdfZ2x5cGhfc3RyaW5nLAorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgIHczMl9mcmFtZV9wYXJtX2hhbmRsZXJzLAogICBndWlfcHJvZHVj ZV9nbHlwaHMsCiAgIGd1aV93cml0ZV9nbHlwaHMsCmRpZmYgLS1naXQgYS9zcmMvd2luZG93Lmgg Yi9zcmMvd2luZG93LmgKaW5kZXggNmIwZjBlNS4uMTRkZDM4YSAxMDA2NDQKLS0tIGEvc3JjL3dp bmRvdy5oCisrKyBiL3NyYy93aW5kb3cuaApAQCAtMzI0LDYgKzMyNCwxNDcgQEAgc3RydWN0IHdp bmRvdwogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIFN1ZmZpeGVzIGZvciB0 aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBwcmVmaXguICovCitzdHJ1Y3QgbXVsdGlwbGVfY3Vyc29y cworeworICAvKiBUaGUgcmVjb3JkZWQgcGl4ZWwgd2lkdGggb2YgdGhlIGxhc3QgbGluZSBudW1i ZXIgZHJhd24gZHVyaW5nIHJlZGlzcGxheSAqLworICBpbnQgbG51bV9waXhlbF93aWR0aDsKK30g bWM7CisKK3N0cnVjdCBtY19tYXRyaXgKK3sKKyAgcHRyZGlmZl90IHZwb3NfYWxsb2NhdGVkOwor ICBwdHJkaWZmX3QgdnBvc191c2VkOworICBwdHJkaWZmX3QgY3Vyc29yc191c2VkWzRdOworICBl bnVtIG1jX2NhY2hlX3R5cGUKKyAgeworICAgIE1DX0NBQ0hFLAorICAgIENIX0NBQ0hFLAorICAg IEZDX0NBQ0hFLAorICAgIE5PX0NBQ0hFCisgIH0gY2FjaGVfdHlwZTsKKyAgc3RydWN0IG1jX3Zw b3MKKyAgeworICAgIHB0cmRpZmZfdCBjYWNoZV9hbGxvY2F0ZWRbNF07CisgICAgcHRyZGlmZl90 IGNhY2hlX3VzZWRbNF07CisgICAgc3RydWN0IG1jX2NvbnRlbnRzCisgICAgeworICAgICAgYm9v bF9iZiBzYW1lX3AgOiAxOworICAgICAgc3RydWN0IGdseXBoIGdseXBoOworICAgICAgaW50IHg7 CisgICAgICBpbnQgZng7CisgICAgICBpbnQgeTsKKyAgICAgIGludCBmeTsKKyAgICAgIGludCBo cG9zOworICAgICAgaW50IHZwb3M7CisgICAgICBpbnQgd2Q7CisgICAgICBpbnQgaDsKKyAgICAg IGVudW0gbWNfY3Vyc29yX3R5cGUKKyAgICAgIHsKKyAgICAgICAgLyogTk9URTogIFRoZSBmcmlu Z2UgYml0bWFwIGZyYW1ld29yayByZWxpZXMgdXBvbiBNQ19OT19GUklOR0VfQklUTUFQCisgICAg ICAgIGhhdmluZyBhIHZhbHVlIG9mIHplcm8gKDApLiAqLworICAgICAgICBNQ19OT19GUklOR0Vf QklUTUFQLAorICAgICAgICBNQ19OT19DVVJTT1IsCisgICAgICAgIE1DX1JJR0hUX0ZSSU5HRV9C SVRNQVAsCisgICAgICAgIE1DX0xFRlRfRlJJTkdFX0JJVE1BUCwKKyAgICAgICAgTUNfRlJBTUVE X0JPWCwKKyAgICAgICAgTUNfRklMTEVEX0JPWCwKKyAgICAgICAgTUNfSE9MTE9XX0JPWCwKKyAg ICAgICAgTUNfQkFSLAorICAgICAgICBNQ19IQkFSCisgICAgICB9IGN1cnNvcl90eXBlOworICAg ICAgaW50IGN1cnNvcl93aWR0aDsKKyAgICAgIHN0cnVjdCBtY19SR0IKKyAgICAgIHsKKyAgICAg ICAgZG91YmxlIHJlZDsKKyAgICAgICAgZG91YmxlIGdyZWVuOworICAgICAgICBkb3VibGUgYmx1 ZTsKKyAgICAgIH0gZmcsIGJnOworICAgICAgYm9vbF9iZiBhY3RpdmVfcCA6IDE7CisgICAgICBl bnVtIG1jX2ZsYXZvcgorICAgICAgeworICAgICAgICBOT19GTEFWT1IsCisgICAgICAgIE1DX0dM WVBILAorICAgICAgICBNQ19HTFlQSExFU1MsCisgICAgICAgIE1DX09WRVJMQVlfQVJST1dfQklU TUFQLAorICAgICAgICBNQ19QSUxDUk9XLAorICAgICAgICBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJ R0hUX0FSUk9XLAorICAgICAgICBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FS Uk9XLAorICAgICAgICBNQ19IT0xMT1dfUkVDVEFOR0xFLAorICAgICAgICBNQ19WRVJUSUNBTF9C QVJfUklHSFRfQVJST1csCisgICAgICAgIE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVywKKyAgICAgICAgTUNfVkVSVElDQUxfQkFSLAorICAgICAgICBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVIsCisgICAgICAgIE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgIH0gZ2x5 cGhfZmxhdm9yOworICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24KKyAgICAgIHsKKyAgICAgICAg UFJFX1pWLAorICAgICAgICBBVF9aViwKKyAgICAgICAgUE9TVF9aVgorICAgICAgfSByb3dfcG9z aXRpb247CisgICAgICBib29sX2JmIGVuYWJsZWRfcCA6IDE7CisgICAgfSAqY2FjaGVbNF07Cisg IH0gKnZwb3M7CisgIC8qIFVzZWQgZWxzZXdoZXJlLiAqLworICBzdHJ1Y3QgbWNfZXNzZW50aWFs cworICB7CisgICAgYm9vbF9iZiBhY3RpdmVfcCA6IDE7CisgICAgc3RydWN0IG1jX1JHQiBjaF9m Z1szXSwgZmNfZmdbM10sIHNwX2ZnOworICAgIGludCBmY194OworICAgIGludCB6djsKKyAgICBp bnQgenZfYnl0ZTsKKyAgfSBlc3NlbnRpYWxzOworICAvKiBVc2VkIGVsc2V3aGVyZS4gKi8KKyAg ZW51bSBtY19lbmdpbmVfdHlwZQorICB7CisgICAgTVVMVElQTEVfQ1VSU09SUywKKyAgICBIT1JJ Wk9OVEFMX1JVTEVSLAorICAgIFZFUlRJQ0FMX1JVTEVSLAorICAgIEZJTExfQ09MVU1OLAorICAg IENVUlNPUl9JTkRJQ0FUT1IKKyAgfSBhY3Rpb25fdHlwZTsKKyAgLyogVXNlZCBlbHNld2hlcmUu ICovCisgIGVudW0gbWNfcHJlX3Njcm9sbF9jbGVhbl90eXBlCisgIHsKKyAgICBUUllfV0lORE9X X1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTiwKKyAgICBUUllfV0lORE9XX1JFVVNJTkdfQ1VS UkVOVF9NQVRSSVhfVVAsCisgICAgVFJZX1dJTkRPV19JRAorICB9IG1jX3ByZV9zY3JvbGxfY2xl YW5fdHlwZV9fZnJvbV93aGVyZTsKKyAgLyogVXNlZCBlbHNld2hlcmUuICovCisgIGVudW0gbWNf ZHJhd19yb3dfdHlwZQorICB7CisgICAgTk9XSEVSRSwKKyAgICBTQ1JJQkVfT05FLAorICAgIFND UklCRV9UV08sCisgICAgU0NSSUJFX1RIUkVFLAorICAgIFNLSVBQRUQsCisgICAgUE9TVF9DSEFO R0VELAorICAgIFVOQ0hBTkdFRCwKKyAgICBTRVRfQ1VSU09SX09ORSwKKyAgICBTRVRfQ1VSU09S X1RXTworICB9IG1jX2RyYXdfcm93X3R5cGVfX2Zyb21fd2hlcmU7CisgIC8qIFVzZWQgZWxzZXdo ZXJlLiAqLworICBlbnVtIG1jX3JlZHJhd19yb3dfdHlwZQorICB7CisgICAgVVBEQVRFX1dJTkRP V19fUkVEUkFXX09WRVJMQVBQRURfUk9XUywKKyAgICBHVUlfSU5TRVJUX0dMWVBIUywKKyAgICBH VUlfRklYX09WRVJMQVBQSU5HX0FSRUEsCisgICAgRFJBV19ST1dfV0lUSF9NT1VTRV9GQUNFLAor ICAgIEVYUE9TRV9BUkVBX09ORSwKKyAgICBFWFBPU0VfQVJFQV9UV08sCisgICAgRVhQT1NFX0xJ TkUKKyAgfSBtY19yZWRyYXdfcm93X3R5cGVfX2Zyb21fd2hlcmU7Cit9IG1jX21hdHJpeDsKKwor LyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgICAvKiBDdXJzb3IgdHlwZSBvZiBsYXN0IGN1cnNvciBkcmF3biBvbiB0aGUgd2lu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ChwdHJkaWZmX3QgY291bnQsIExp c3BfT2JqZWN0IGFyZywgLi4uKQoreworICBlYXNzdW1lICgwIDwgY291bnQpOworICBMaXNwX09i amVjdCB2YWwgPSBGY29ucyAoYXJnLCBRbmlsKTsKKyAgTGlzcF9PYmplY3QgdGFpbCA9IHZhbDsK KyAgdmFfbGlzdCBhcDsKKyAgdmFfc3RhcnQgKGFwLCBhcmcpOworICBmb3IgKHB0cmRpZmZfdCBp ID0gMTsgaSA8IGNvdW50OyBpKyspCisgICAgeworICAgICAgTGlzcF9PYmplY3QgZWxlbSA9IEZj b25zICh2YV9hcmcgKGFwLCBMaXNwX09iamVjdCksIFFuaWwpOworICAgICAgWFNFVENEUiAodGFp bCwgZWxlbSk7CisgICAgICB0YWlsID0gZWxlbTsKKyAgICB9CisgIHZhX2VuZCAoYXApOworICBy ZXR1cm4gdmFsOworfQorCitMaXNwX09iamVjdAorbWNfbWVtcSAoTGlzcF9PYmplY3QgZWx0LCBM aXNwX09iamVjdCBsaXN0KQoreworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBpZiAoIUNPTlNQ IChsaXN0KSB8fCBFUSAoWENBUiAobGlzdCksIGVsdCkpCisgICAgICAgIGJyZWFrOworICAgICAg bGlzdCA9IFhDRFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAobGlzdCkgfHwgRVEgKFhDQVIg KGxpc3QpLCBlbHQpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsK KyAgICAgIGlmICghQ09OU1AgKGxpc3QpIHx8IEVRIChYQ0FSIChsaXN0KSwgZWx0KSkKKyAgICAg ICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgfQorICByZXR1cm4gbGlz dDsKK30KKworTGlzcF9PYmplY3QKK21jX250aCAoaW50IG51bSwgTGlzcF9PYmplY3QgbGlzdCkK K3sKKyAgZm9yIChpbnQgaSA9IDA7IGkgPCBudW0gJiYgIU5JTFAgKGxpc3QpOyBpKyspCisgICAg bGlzdCA9IFhDRFIgKGxpc3QpOworICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FS IChsaXN0KTsKKyAgICBlbHNlCisgICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QK K21jX2Fzc3EgKExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgd2hpbGUg KDEpCisgICAgeworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1Ag KFhDQVIgKGxpc3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBr ZXkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBp ZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAg ICAgICAgICAgICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVh azsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisg ICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhD QVIgKFhDQVIgKGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhD RFIgKGxpc3QpOworICAgIH0KKyAgaWYgKENPTlNQIChsaXN0KSkKKyAgICByZXR1cm4gWENBUiAo bGlzdCk7CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK0xpc3BfT2JqZWN0Citt Y19hc3NvYyAoTGlzcF9PYmplY3Qga2V5LCBMaXNwX09iamVjdCBsaXN0KQoreworICBMaXNwX09i amVjdCBjYXI7CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisg ICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9 IFhDQVIgKFhDQVIgKGxpc3QpKSwKKyAgICAgICAgICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwg IU5JTFAgKEZlcXVhbCAoY2FyLCBrZXkpKSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3Qg PSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENP TlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhDQVIgKGxp c3QpKSwKKyAgICAgICAgICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZlcXVhbCAo Y2FyLCBrZXkpKSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsK KyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0 KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhDQVIgKGxpc3QpKSwKKyAgICAgICAg ICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZlcXVhbCAoY2FyLCBrZXkpKSkpKQor ICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICB9CisgIGlmIChD T05TUCAobGlzdCkpCisgICAgcmV0dXJuIFhDQVIgKGxpc3QpOworICAgIGVsc2UKKyAgICAgIHJl dHVybiBRbmlsOworfQorCitMaXNwX09iamVjdAorbWNfcGxpc3RfZ2V0IChMaXNwX09iamVjdCBw bGlzdCwgTGlzcF9PYmplY3QgcHJvcCkKK3sKKyAgTGlzcF9PYmplY3QgdGFpbCwgaGFsZnRhaWw7 CisgIC8qIGhhbGZ0YWlsIGlzIHVzZWQgdG8gZGV0ZWN0IGNpcmN1bGFyIGxpc3RzLiAgKi8KKyAg dGFpbCA9IGhhbGZ0YWlsID0gcGxpc3Q7CisgIHdoaWxlIChDT05TUCAodGFpbCkgJiYgQ09OU1Ag KFhDRFIgKHRhaWwpKSkKKyAgICB7CisgICAgICBpZiAoRVEgKHByb3AsIFhDQVIgKHRhaWwpKSkK KyAgICAgICAgcmV0dXJuIFhDQVIgKFhDRFIgKHRhaWwpKTsKKyAgICAgIHRhaWwgPSBYQ0RSIChY Q0RSICh0YWlsKSk7CisgICAgICBoYWxmdGFpbCA9IFhDRFIgKGhhbGZ0YWlsKTsKKyAgICAgIGlm IChFUSAodGFpbCwgaGFsZnRhaWwpKQorICAgICAgICBicmVhazsKKyAgICB9CisgIHJldHVybiBR bmlsOworfQorCisvKiBSRUdJT04gQkVHSU46ICBtY19yZWdpb25fbGltaXQgKDEpCisgICBSRUdJ T04gRU5EOiAgbWNfcmVnaW9uX2xpbWl0ICgwKSAqLworcHRyZGlmZl90CittY19yZWdpb25fbGlt aXQgKGJvb2wgYmVnaW5fcCkKK3sKKyAgaWYgKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkK KyAgICAgICYmIE5JTFAgKFZtYXJrX2V2ZW5faWZfaW5hY3RpdmUpCisgICAgICAmJiBOSUxQIChC VkFSIChjdXJyZW50X2J1ZmZlciwgbWFya19hY3RpdmUpKSkKKyAgICB4c2lnbmFsMCAoUW1hcmtf aW5hY3RpdmUpOworICBMaXNwX09iamVjdCBtYXJrZXIgPSBCVkFSIChjdXJyZW50X2J1ZmZlciwg bWFyayk7CisgIGludCBtID0gKFhNQVJLRVIgKG1hcmtlciktPmJ1ZmZlcikKKyAgICAgICAgICA/ IFhNQVJLRVIgKG1hcmtlciktPmNoYXJwb3MKKyAgICAgICAgICA6IC0xOworICByZXR1cm4gKG0g PT0gLTEpCisgICAgICAgICAgID8gLTEKKyAgICAgICAgIDogKFBUIDwgbSkgPT0gYmVnaW5fcAor ICAgICAgICAgICA/IFBUCisgICAgICAgICA6IGNsaXBfdG9fYm91bmRzIChCRUdWLCBtLCBaVik7 Cit9CisKKy8qIENoZWNrIHRoZSBwcmVzZW5jZSBvZiBhIGRpc3BsYXkgcHJvcGVydHkgYW5kIGNv bXB1dGUgaXRzIHdpZHRoLgorICAgSWYgYSBwcm9wZXJ0eSB3YXMgZm91bmQgYW5kIGl0cyB3aWR0 aCB3YXMgZm91bmQgYXMgd2VsbCwgcmV0dXJuCisgICBpdHMgd2lkdGggKD49IDApIGFuZCBzZXQg dGhlIHBvc2l0aW9uIG9mIHRoZSBlbmQgb2YgdGhlIHByb3BlcnR5CisgICBpbiBFTkRQT1MuCisg ICBPdGhlcndpc2UganVzdCByZXR1cm4gLTEuICovCitzdGF0aWMgaW50CittY19jaGVja19kaXNw bGF5X3dpZHRoIChwdHJkaWZmX3QgcG9zLCBwdHJkaWZmX3QgY29sLCBwdHJkaWZmX3QgKmVuZHBv cykKK3sKKyAgTGlzcF9PYmplY3QgdmFsLCBvdmVybGF5OworICBpZiAoQ09OU1AgKHZhbCA9IGdl dF9jaGFyX3Byb3BlcnR5X2FuZF9vdmVybGF5CisgICAgICAgICAgICAgIChtYWtlX2ZpeG51bSAo cG9zKSwgUWRpc3BsYXksIFFuaWwsICZvdmVybGF5KSkKKyAgICAgICYmIEVRIChRc3BhY2UsIFhD QVIgKHZhbCkpKQorICAgIHsgLyogRklYTUU6IFVzZSBjYWxjX3BpeGVsX3dpZHRoX29yX2hlaWdo dC4gKi8KKyAgICAgIExpc3BfT2JqZWN0IHBsaXN0ID0gWENEUiAodmFsKSwgcHJvcDsKKyAgICAg IGludCB3aWR0aCA9IC0xOworICAgICAgRU1BQ1NfSU5UIGFsaWduX3RvX21heCA9IChjb2wgPCBN T1NUX1BPU0lUSVZFX0ZJWE5VTSAtIElOVF9NQVgKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gKEVNQUNTX0lOVCkgSU5UX01BWCArIGNvbAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBNT1NUX1BPU0lUSVZFX0ZJWE5VTSk7CisgICAgICBpZiAoKHByb3AgPSBt Y19wbGlzdF9nZXQgKHBsaXN0LCBRQ3dpZHRoKSwgUkFOR0VEX0ZJWE5VTVAgKDAsIHByb3AsIElO VF9NQVgpKQorICAgICAgICAgIHx8IChwcm9wID0gbWNfcGxpc3RfZ2V0IChwbGlzdCwgUUNyZWxh dGl2ZV93aWR0aCksCisgICAgICAgICAgICAgIFJBTkdFRF9GSVhOVU1QICgwLCBwcm9wLCBJTlRf TUFYKSkpCisgICAgICAgIHdpZHRoID0gWEZJWE5VTSAocHJvcCk7CisgICAgICAgIGVsc2UgaWYg KEZMT0FUUCAocHJvcCkgJiYgMCA8PSBYRkxPQVRfREFUQSAocHJvcCkKKyAgICAgICAgICAgICAg ICAgJiYgWEZMT0FUX0RBVEEgKHByb3ApIDw9IElOVF9NQVgpCisgICAgICAgICAgd2lkdGggPSAo aW50KShYRkxPQVRfREFUQSAocHJvcCkgKyAwLjUpOworICAgICAgICAgIGVsc2UgaWYgKChwcm9w ID0gbWNfcGxpc3RfZ2V0IChwbGlzdCwgUUNhbGlnbl90byksCisgICAgICAgICAgICAgICAgICAg IFJBTkdFRF9GSVhOVU1QIChjb2wsIHByb3AsIGFsaWduX3RvX21heCkpKQorICAgICAgICAgICAg d2lkdGggPSBYRklYTlVNIChwcm9wKSAtIGNvbDsKKyAgICAgICAgICAgICAgZWxzZSBpZiAoRkxP QVRQIChwcm9wKSAmJiBjb2wgPD0gWEZMT0FUX0RBVEEgKHByb3ApCisgICAgICAgICAgICAgICAg ICAgICAgICYmIChYRkxPQVRfREFUQSAocHJvcCkgPD0gYWxpZ25fdG9fbWF4KSkKKyAgICAgICAg ICAgICAgICB3aWR0aCA9IChpbnQpKFhGTE9BVF9EQVRBIChwcm9wKSArIDAuNSkgLSBjb2w7Cisg ICAgICBpZiAod2lkdGggPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHB0c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W5kX3NhdmVfbWF0Y2hfZGF0 YSAoKTsKKyAgcmUgPSBBUkVGIChydWxlLCAwKTsKKyAgaWYgKE5JTFAgKHJlKSkKKyAgICBsZW4g PSAxOworICBlbHNlIGlmICghIFNUUklOR1AgKHJlKSkKKyAgICByZXR1cm4gdW5iaW5kX3RvIChj b3VudCwgUW5pbCk7CisgIGVsc2UgaWYgKChsZW4gPSBmYXN0X2xvb2tpbmdfYXQgKHJlLCBjaGFy cG9zLCBieXRlcG9zLCBsaW1pdCwgLTEsIHN0cmluZykpCisgICAgICAgICAgID4gMCkKKyAgICB7 CisgICAgICBpZiAoTklMUCAoc3RyaW5nKSkKKyAgICAgICAgbGVuID0gQllURV9UT19DSEFSIChi eXRlcG9zICsgbGVuKSAtIGNoYXJwb3M7CisgICAgICBlbHNlCisgICAgICAgIGxlbiA9IHN0cmlu Z19ieXRlX3RvX2NoYXIgKHN0cmluZywgYnl0ZXBvcyArIGxlbikgLSBjaGFycG9zOworICAgIH0K KyAgaWYgKGxlbiA8PSAwKQorICAgIHJldHVybiB1bmJpbmRfdG8gKGNvdW50LCBRbmlsKTsKKyAg dG8gPSBsaW1pdCA9IGNoYXJwb3MgKyBsZW47CisjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCisg IGlmIChGUkFNRV9XSU5ET1dfUCAoZikpCisgICAgeworICAgICAgZm9udF9vYmplY3QgPSBmb250 X3JhbmdlIChjaGFycG9zLCBieXRlcG9zLCAmdG8sIHdpbiwgZmFjZSwgc3RyaW5nKTsKKyAgICAg IGlmICghIEZPTlRfT0JKRUNUX1AgKGZvbnRfb2JqZWN0KQorICAgICAgICAgIHx8ICghIE5JTFAg KHJlKQorICAgICAgICAgICAgICAmJiB0byA8IGxpbWl0CisgICAgICAgICAgICAgICYmIChmYXN0 X2xvb2tpbmdfYXQgKHJlLCBjaGFycG9zLCBieXRlcG9zLCB0bywgLTEsIHN0cmluZykgPD0gMCkp KQorICAgICAgICByZXR1cm4gdW5iaW5kX3RvIChjb3VudCwgUW5pbCk7CisgICAgfQorICBlbHNl CisjZW5kaWYgICAgICAgIC8qIG5vdCBIQVZFX1dJTkRPV19TWVNURU0gKi8KKyAgICBmb250X29i amVjdCA9IHdpbi0+ZnJhbWU7CisgIGxnc3RyaW5nID0gRmNvbXBvc2l0aW9uX2dldF9nc3RyaW5n IChwb3MsIG1ha2VfZml4bnVtICh0byksIGZvbnRfb2JqZWN0LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgc3RyaW5nKTsKKyAgaWYgKE5JTFAgKExHU1RSSU5HX0lEIChs Z3N0cmluZykpKQorICAgIHsKKyAgICAgIC8qIFNhdmUgcG9pbnQgYXMgbWFya2VyIGJlZm9yZSBj YWxsaW5nIG91dCB0byBsaXNwLiAgKi8KKyAgICAgIGlmIChOSUxQIChzdHJpbmcpKQorICAgICAg ICByZWNvcmRfdW53aW5kX3Byb3RlY3QgKHJlc3RvcmVfcG9pbnRfdW53aW5kLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkX21hcmtlciAoY3VycmVudF9idWZmZXIsIHB0LCBw dF9ieXRlKSk7CisgICAgICBsZ3N0cmluZyA9IHNhZmVfY2FsbCAoNiwgVmF1dG9fY29tcG9zaXRp b25fZnVuY3Rpb24sIEFSRUYgKHJ1bGUsIDIpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg IHBvcywgbWFrZV9maXhudW0gKHRvKSwgZm9udF9vYmplY3QsIHN0cmluZyk7CisgICAgfQorICBy ZXR1cm4gdW5iaW5kX3RvIChjb3VudCwgbGdzdHJpbmcpOworfQorCisvKiBDaGVjayBpZiB0aGUg Y2hhcmFjdGVyIGF0IENIQVJQT1MgKGFuZCBCWVRFUE9TKSBpcyBjb21wb3NlZAorICAgKHBvc3Np Ymx5IHdpdGggdGhlIGZvbGxvd2luZyBjaGFyYWN0ZXJzKSBvbiB3aW5kb3cgVy4gIEVORFBPUyBs aW1pdHMKKyAgIGNoYXJhY3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aCk7CisgICAgICBmb3IgKGkgPSAwOyBpIDwgY21wX2l0LT5ydWxlX2lkeDsgaSsr LCB2YWwgPSBYQ0RSICh2YWwpKTsKKyAgICAgIGlmIChjaGFycG9zIDwgZW5kcG9zKQorICAgICAg ICB7CisgICAgICAgICAgZm9yICg7IENPTlNQICh2YWwpOyB2YWwgPSBYQ0RSICh2YWwpKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBlbHQgPSBYQ0FSICh2YWwpOworICAgICAgICAgICAg ICBpZiAoISBWRUNUT1JQIChlbHQpIHx8IEFTSVpFIChlbHQpICE9IDMKKyAgICAgICAgICAgICAg ICAgIHx8ICEgSU5URUdFUlAgKEFSRUYgKGVsdCwgMSkpKQorICAgICAgICAgICAgICAgIGNvbnRp bnVlOworICAgICAgICAgICAgICBpZiAoWEZJWE5BVCAoQVJFRiAoZWx0LCAxKSkgIT0gY21wX2l0 LT5sb29rYmFjaykKKyAgICAgICAgICAgICAgICBnb3RvIG5vX2NvbXBvc2l0aW9uOworICAgICAg ICAgICAgICBsZ3N0cmluZyA9IG1jX2F1dG9jbXBfY2hhcnMgKGVsdCwgY2hhcnBvcywgYnl0ZXBv cywgZW5kcG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIGZh Y2UsIHN0cmluZyk7CisgICAgICAgICAgICAgIGlmIChjb21wb3NpdGlvbl9nc3RyaW5nX3AgKGxn c3RyaW5nKSkKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgbGdzdHJpbmcg PSBRbmlsOworICAgICAgICAgICAgICAvKiBDb21wb3NpdGlvbiBmYWlsZWQgcGVyaGFwcyBiZWNh dXNlIHRoZSBmb250IGRvZXNuJ3QKKyAgICAgICAgICAgICAgICAgc3VwcG9ydCBzdWZmaWNpZW50 IHJhbmdlIG9mIGNoYXJhY3RlcnMuICBUcnkgdGhlCisgICAgICAgICAgICAgICAgIG90aGVyIGNv bXBvc2l0aW9uIHJ1bGVzIGlmIGFueS4gICovCisgICAgICAgICAgICB9CisgICAgICAgICAgY21w X2l0LT5yZXZlcnNlZF9wID0gMDsKKyAgICAgICAgfQorICAgICAgZWxzZQorICAgICAgICB7Cisg ICAgICAgICAgcHRyZGlmZl90IGNwb3MgPSBjaGFycG9zLCBicG9zID0gYnl0ZXBvczsKKyAgICAg ICAgICBjbXBfaXQtPnJldmVyc2VkX3AgPSAxOworICAgICAgICAgIGVsdCA9IFhDQVIgKHZhbCk7 CisgICAgICAgICAgaWYgKGNtcF9pdC0+bG9va2JhY2sgPiAwKQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICBjcG9zID0gY2hhcnBvcyAtIGNtcF9pdC0+bG9va2JhY2s7CisgICAgICAgICAg ICAgIGlmIChTVFJJTkdQIChzdHJpbmcpKQorICAgICAgICAgICAgICAgIGJwb3MgPSBzdHJpbmdf Y2hhcl90b19ieXRlIChzdHJpbmcsIGNwb3MpOworICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgYnBvcyA9IENIQVJfVE9fQllURSAoY3Bvcyk7CisgICAgICAgICAgICB9CisgICAg ICAgICAgbGdzdHJpbmcgPSBtY19hdXRvY21wX2NoYXJzIChlbHQsIGNwb3MsIGJwb3MsIGNoYXJw b3MgKyAxLCB3LCBmYWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Ry aW5nKTsKKyAgICAgICAgICBpZiAoISBjb21wb3NpdGlvbl9nc3RyaW5nX3AgKGxnc3RyaW5nKQor ICAgICAgICAgICAgICB8fCBjcG9zICsgTEdTVFJJTkdfQ0hBUl9MRU4gKGxnc3RyaW5nKSAtIDEg IT0gY2hhcnBvcykKKyAgICAgICAgICAgIC8qIENvbXBvc2l0aW9uIGZhaWxlZCBvciBkaWRuJ3Qg Y292ZXIgdGhlIGN1cnJlbnQKKyAgICAgICAgICAgICAgIGNoYXJhY3Rlci4gICovCisgICAgICAg ICAgICBnb3RvIG5vX2NvbXBvc2l0aW9uOworICAgICAgICB9CisgICAgICBpZiAoTklMUCAobGdz dHJpbmcpKQorICAgICAgICBnb3RvIG5vX2NvbXBvc2l0aW9uOworICAgICAgaWYgKE5JTFAgKExH U1RSSU5HX0lEIChsZ3N0cmluZykpKQorICAgICAgICBsZ3N0cmluZyA9IGNvbXBvc2l0aW9uX2dz dHJpbmdfcHV0X2NhY2hlIChsZ3N0cmluZywgLTEpOworICAgICAgY21wX2l0LT5pZCA9IFhGSVhO VU0gKExHU1RSSU5HX0lEIChsZ3N0cmluZykpOworICAgICAgZm9yIChpID0gMDsgaSA8IExHU1RS SU5HX0dMWVBIX0xFTiAobGdzdHJpbmcpOyBpKyspCisgICAgICAgIGlmIChOSUxQIChMR1NUUklO R19HTFlQSCAobGdzdHJpbmcsIGkpKSkKKyAgICAgICAgICBicmVhazsKKyAgICAgIGNtcF9pdC0+ bmdseXBocyA9IGk7CisgICAgICBjbXBfaXQtPmZyb20gPSAwOworICAgICAgY21wX2l0LT50byA9 IGk7CisgICAgfQorICBlbHNlCisgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgcmV0dXJuIDE7 Cisgbm9fY29tcG9zaXRpb246CisgIGlmIChjaGFycG9zID09IGVuZHBvcykKKyAgICByZXR1cm4g MDsKKyAgaWYgKGNoYXJwb3MgPCBlbmRwb3MpCisgICAgeworICAgICAgY2hhcnBvcysrOworICAg ICAgaWYgKE5JTFAgKHN0cmluZykpCisgICAgICAgIElOQ19QT1MgKGJ5dGVwb3MpOworICAgICAg ZWxzZQorICAgICAgICBieXRlcG9zICs9IEJZVEVTX0JZX0NIQVJfSEVBRCAoKihTREFUQSAoc3Ry aW5nKSArIGJ5dGVwb3MpKTsKKyAgICB9CisgIGVsc2UKKyAgICB7CisgICAgICBjaGFycG9zLS07 CisgICAgICAvKiBCWVRFUE9TIGlzIGNhbGN1bGF0ZWQgaW4gY29tcG9zaXRpb25fY29tcHV0ZV9z dG9wX3BvcyAqLworICAgICAgYnl0ZXBvcyA9IC0xOworICAg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isgICAgICBwcmV2X2NvbCA9IGNvbDsKKyAgICAgIHsgLyogQ2hlY2sg ZGlzcGxheSBwcm9wZXJ0eS4gKi8KKyAgICAgICAgcHRyZGlmZl90IGVuZHA7CisgICAgICAgIGlu dCB3aWR0aCA9IG1jX2NoZWNrX2Rpc3BsYXlfd2lkdGggKHNjYW4sIGNvbCwgJmVuZHApOworICAg ICAgICBpZiAod2lkdGggPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBjb2wgKz0gd2lk dGg7CisgICAgICAgICAgICBpZiAoZW5kcCA+IHNjYW4pIC8qIEF2b2lkIGluZmluaXRlIGxvb3Bz IHdpdGggMC13aWR0aCBvdmVybGF5cy4gKi8KKyAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgIHNjYW4gPSBlbmRwOworICAgICAgICAgICAgICAgIHNjYW5fYnl0ZSA9IENIQVJfVE9fQllU RSAoc2Nhbik7CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgICB9CisgICAgICB9CisgICAgICAvKiBDaGVjayBjb21wb3NpdGlvbiBzZXF1ZW5jZS4g Ki8KKyAgICAgIGlmIChjbXBfaXQuaWQgPj0gMAorICAgICAgICAgIHx8IChzY2FuID09IGNtcF9p dC5zdG9wX3BvcworICAgICAgICAgICAgICAmJiBtY19jb21wb3NpdGlvbl9yZXNlYXRfaXQgKCZj bXBfaXQsIHNjYW4sIHNjYW5fYnl0ZSwgZW5kLCB3LCBOVUxMLCBRbmlsKSkpCisgICAgICAgIGNv bXBvc2l0aW9uX3VwZGF0ZV9pdCAoJmNtcF9pdCwgc2Nhbiwgc2Nhbl9ieXRlLCBRbmlsKTsKKyAg ICAgIGlmIChjbXBfaXQuaWQgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHNjYW4gKz0gY21w X2l0Lm5jaGFyczsKKyAgICAgICAgICBzY2FuX2J5dGUgKz0gY21wX2l0Lm5ieXRlczsKKyAgICAg ICAgICBpZiAoc2NhbiA8PSBlbmQpCisgICAgICAgICAgICBjb2wgKz0gY21wX2l0LndpZHRoOwor ICAgICAgICAgIGlmIChjbXBfaXQudG8gPT0gY21wX2l0Lm5nbHlwaHMpCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGNtcF9pdC5pZCA9IC0xOworICAgICAgICAgICAgICBjb21wb3NpdGlv bl9jb21wdXRlX3N0b3BfcG9zICgmY21wX2l0LCBzY2FuLCBzY2FuX2J5dGUsIGVuZCwgUW5pbCk7 CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGNtcF9pdC5m cm9tID0gY21wX2l0LnRvOworICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICBj ID0gRkVUQ0hfQllURSAoc2Nhbl9ieXRlKTsKKyAgICAgIC8qIFNlZSBpZiB0aGVyZSBpcyBhIGRp c3BsYXkgdGFibGUgYW5kIGl0IHJlbGF0ZXMgdG8gdGhpcyBjaGFyYWN0ZXIuICovCisgICAgICBp ZiAoZHAgIT0gMAorICAgICAgICAgICYmICEgKG11bHRpYnl0ZSAmJiBMRUFESU5HX0NPREVfUCAo YykpCisgICAgICAgICAgJiYgVkVDVE9SUCAoRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpKSkKKyAg ICAgICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IGNoYXJ2ZWM7CisgICAgICAgICAgcHRyZGlm Zl90IGksIG47CisgICAgICAgICAgLyogVGhpcyBjaGFyYWN0ZXIgaXMgZGlzcGxheWVkIHVzaW5n IGEgdmVjdG9yIG9mIGdseXBocy4KKyAgICAgICAgICAgICBVcGRhdGUgdGhlIGNvbHVtbi9wb3Np dGlvbiBiYXNlZCBvbiB0aG9zZSBnbHlwaHMuICovCisgICAgICAgICAgY2hhcnZlYyA9IERJU1Bf Q0hBUl9WRUNUT1IgKGRwLCBjKTsKKyAgICAgICAgICBuID0gQVNJWkUgKGNoYXJ2ZWMpOworICAg ICAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyBpKyspCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIC8qIFRoaXMgc2hvdWxkIGJlIGhhbmRsZWQgdGhlIHNhbWUgYXMKKyAgICAgICAgICAgICAg bmV4dF9lbGVtZW50X2Zyb21fZGlzcGxheV92ZWN0b3IgZG9lcyBpdC4gKi8KKyAgICAgICAgICAg ICAgTGlzcF9PYmplY3QgZW50cnkgPSBBUkVGIChjaGFydmVjLCBpKTsKKyAgICAgICAgICAgICAg aWYgKEdMWVBIX0NPREVfUCAoZW50cnkpKQorICAgICAgICAgICAgICAgIGMgPSBHTFlQSF9DT0RF X0NIQVIgKGVudHJ5KTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGMgPSAn ICc7CisgICAgICAgICAgICAgIGlmIChjID09ICdcbicpCisgICAgICAgICAgICAgICAgZ290byBl bmRsb29wOworICAgICAgICAgICAgICBpZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50 X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3BsYXkpLCBRdCkpCisgICAgICAgICAgICAgICAgZ290byBl bmRsb29wOworICAgICAgICAgICAgICBpZiAoYyA9PSAnXHQnKQorICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAgICAgICAgICAgICAgICBj b2wgPSBjb2wgLyB0YWJfd2lkdGggKiB0YWJfd2lkdGg7CisgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICsrY29sOworICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBU aGUgZGlzcGxheSB0YWJsZSBkb2Vzbid0IGFmZmVjdCB0aGlzIGNoYXJhY3RlcjsKKyAgICAgICAg ICAgICAgIGl0IGRpc3BsYXlzIGFzIGl0c2VsZi4gKi8KKyAgICAgICAgICAgIGlmIChjID09ICdc bicpCisgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgIGlmIChjID09ICdc cicgJiYgRVEgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBzZWxlY3RpdmVfZGlzcGxheSksIFF0KSkK KyAgICAgICAgICAgICAgZ290byBlbmRsb29wOworICAgICAgICAgICAgaWYgKGMgPT0gJ1x0JykK KyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAg ICAgICAgICAgICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgIGVsc2UgaWYgKG11bHRpYnl0ZSAmJiBMRUFESU5HX0NPREVf UCAoYykpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogU3RhcnQgb2Yg bXVsdGktYnl0ZSBmb3JtLiAqLworICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqcHRy OworICAgICAgICAgICAgICAgICAgaW50IGJ5dGVzLCB3aWR0aDsKKyAgICAgICAgICAgICAgICAg IHB0ciA9IEJZVEVfUE9TX0FERFIgKHNjYW5fYnl0ZSk7CisgICAgICAgICAgICAgICAgICBNQ19N VUxUSUJZVEVfQllURVNfV0lEVEggKHB0ciwgZHAsIGJ5dGVzLCB3aWR0aCk7CisgICAgICAgICAg ICAgICAgICAvKiBTdWJ0cmFjdCBvbmUgdG8gY29tcGVuc2F0ZSBmb3IgdGhlIGluY3JlbWVudAor ICAgICAgICAgICAgICAgICAgdGhhdCBpcyBnb2luZyB0byBoYXBwZW4gYmVsb3cuICovCisgICAg ICAgICAgICAgICAgICBzY2FuX2J5dGUgKz0gYnl0ZXMgLSAxOworICAgICAgICAgICAgICAgICAg Y29sICs9IHdpZHRoOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlm IChjdGxfYXJyb3cgJiYgKGMgPCAwNDAgfHwgYyA9PSAwMTc3KSkKKyAgICAgICAgICAgICAgICAg IGNvbCArPSAyOworICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoYyA8IDA0MCB8fCBjID49IDAx NzcpCisgICAgICAgICAgICAgICAgICAgIGNvbCArPSA0OworICAgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgICAgY29sKys7CisgICAgICAgICAgfQorICAgICAgc2Nh bisrOworICAgICAgc2Nhbl9ieXRlKys7CisgICAgfQorIGVuZGxvb3A6CisgIGxhc3Rfa25vd25f Y29sdW1uID0gY29sOworICBsYXN0X2tub3duX2NvbHVtbl9wb2ludCA9IHB0OworICBsYXN0X2tu b3duX2NvbHVtbl9tb2RpZmllZCA9IE1PRElGRjsKKyAgaWYgKGdvYWxjb2wpCisgICAgKmdvYWxj b2wgPSBjb2w7CisgIGlmIChlbmRwb3MpCisgICAgKmVuZHBvcyA9IHNjYW47CisgIGlmIChwcmV2 Y29sKQorICAgICpwcmV2Y29sID0gcHJldl9jb2w7Cit9CisKK3B0cmRpZmZfdAorbWNfY3VycmVu dF9jb2x1bW4gKHN0cnVjdCB3aW5kb3cgKncsIHB0cmRpZmZfdCBwdCkKK3sKKyAgLyogYGJ1Zl9j aGFycG9zX3RvX2J5dGVwb3MnOiAgZWFzc2VydCAoQlVGX0JFRyAoYikgPD0gY2hhcnBvcyAmJiBj aGFycG9zIDw9IEJVRl9aIChiKSk7ICovCisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3 LT5jb250ZW50cyk7CisgIHN0cnVjdCBidWZmZXIgKm9sZF9idWZmZXIgPSBOVUxMOworICBpZiAo YiAhPSBjdXJyZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVmZmVyID0gY3VycmVudF9i dWZmZXI7CisgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9CisgIGJvb2wgYmFy Zl9jcmFzaCA9ICh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ZWVuID0gMCwgcG9zdF90YWIgPSAwOworICB3aGlsZSAoMSkKKyAgICB7 CisgICAgICBwdHJkaWZmX3QgaSwgbjsKKyAgICAgIExpc3BfT2JqZWN0IGNoYXJ2ZWM7CisgICAg ICBpZiAocHRyID09IHN0b3ApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBXZSBzdG9wcGVkIGVp dGhlciBmb3IgdGhlIGJlZ2lubmluZyBvZiB0aGUgYnVmZmVyCisgICAgICAgICAgICAgb3IgZm9y IHRoZSBnYXAuICovCisgICAgICAgICAgaWYgKHB0ciA9PSBCRUdWX0FERFIpCisgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAvKiBJdCB3YXMgdGhlIGdhcC4gIEp1bXAgYmFjayBvdmVyIGl0 LiAqLworICAgICAgICAgIHN0b3AgPSBCRUdWX0FERFI7CisgICAgICAgICAgcHRyID0gR1BUX0FE RFI7CisgICAgICAgICAgLyogQ2hlY2sgd2hldGhlciB0aGF0IGJyaW5ncyB1cyB0byBiZWdpbm5p bmcgb2YgYnVmZmVyLiAqLworICAgICAgICAgIGlmIChCRUdWID49IEdQVCkKKyAgICAgICAgICAg IGJyZWFrOworICAgICAgICB9CisgICAgICBjID0gKi0tcHRyOworICAgICAgaWYgKGRwICYmIFZF Q1RPUlAgKERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKSkpCisgICAgICAgIHsKKyAgICAgICAgICBj aGFydmVjID0gRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpOworICAgICAgICAgIG4gPSBBU0laRSAo Y2hhcnZlYyk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAg ICAgIGNoYXJ2ZWMgPSBRbmlsOworICAgICAgICAgICAgbiA9IDE7CisgICAgICAgICAgfQorICAg ICAgZm9yIChpID0gbiAtIDE7IGkgPj0gMDsgLS1pKQorICAgICAgICB7CisgICAgICAgICAgaWYg KFZFQ1RPUlAgKGNoYXJ2ZWMpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBUaGlz IHNob3VsZCBiZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisgICAgICAgICAgIG5leHRfZWxlbWVudF9m cm9tX2Rpc3BsYXlfdmVjdG9yIGRvZXMgaXQuICovCisgICAgICAgICAgICAgIExpc3BfT2JqZWN0 IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7CisgICAgICAgICAgICAgIGlmIChHTFlQSF9DT0RF X1AgKGVudHJ5KSkKKyAgICAgICAgICAgICAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7 CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgYyA9ICcgJzsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgICBpZiAoYyA+PSAwNDAgJiYgYyA8IDAxNzcpCisgICAgICAgICAg ICBjb2wrKzsKKyAgICAgICAgICAgIGVsc2UgaWYgKGMgPT0gJ1xuJworICAgICAgICAgICAgICAg ICAgICAgfHwgKGMgPT0gJ1xyJworICAgICAgICAgICAgICAgICAgICAgICAgICYmIEVRIChCVkFS IChjdXJyZW50X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3BsYXkpLCBRdCkpKQorICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgcHRyKys7CisgICAgICAgICAgICAgICAgZ290byBzdGFydF9v Zl9saW5lX2ZvdW5kOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UgaWYgKGMg PT0gJ1x0JykKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAodGFiX3Nl ZW4pCisgICAgICAgICAgICAgICAgICAgIGNvbCA9ICgoY29sICsgdGFiX3dpZHRoKSAvIHRhYl93 aWR0aCkgKiB0YWJfd2lkdGg7CisgICAgICAgICAgICAgICAgICBwb3N0X3RhYiArPSBjb2w7Cisg ICAgICAgICAgICAgICAgICBjb2wgPSAwOworICAgICAgICAgICAgICAgICAgdGFiX3NlZW4gPSAx OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmIChWRUNUT1JQIChj aGFydmVjKSkKKyAgICAgICAgICAgICAgICAgIC8qIFdpdGggYSBkaXNwbGF5IHRhYmxlIGVudHJ5 LCBDIGlzIGRpc3BsYXllZCBhcyBpcywgYW5kCisgICAgICAgICAgICAgICAgICAgICBub3QgZGlz cGxheWVkIGFzIFxOTk4gb3IgYXMgXk4uICBJZiBDIGlzIGEgc2luZ2xlLWJ5dGUKKyAgICAgICAg ICAgICAgICAgICAgIGNoYXJhY3RlciwgaXQgdGFrZXMgb25lIGNvbHVtbi4gIElmIEMgaXMgbXVs dGktYnl0ZSBpbgorICAgICAgICAgICAgICAgICAgICAgYSB1bmlieXRlIGJ1ZmZlciwgaXQncyB0 cmFuc2xhdGVkIHRvIHVuaWJ5dGUsIHNvIGl0CisgICAgICAgICAgICAgICAgICAgICBhbHNvIHRh a2VzIG9uZSBjb2x1bW4uICovCisgICAgICAgICAgICAgICAgICArK2NvbDsKKyAgICAgICAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgY29sICs9IChjdGxfYXJyb3cgJiYgYyA8 IDAyMDApID8gMiA6IDQ7CisgICAgICAgIH0KKyAgICB9Cisgc3RhcnRfb2ZfbGluZV9mb3VuZDoK KyAgaWYgKHRhYl9zZWVuKQorICAgIHsKKyAgICAgIGNvbCA9ICgoY29sICsgdGFiX3dpZHRoKSAv IHRhYl93aWR0aCkgKiB0YWJfd2lkdGg7CisgICAgICBjb2wgKz0gcG9zdF90YWI7CisgICAgfQor ICBsYXN0X2tub3duX2NvbHVtbiA9IGNvbDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fcG9pbnQgPSBw dDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fbW9kaWZpZWQgPSBNT0RJRkY7CisgIGlmIChvbGRfYnVm ZmVyKQorICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIp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gICAgICAgICAgICAgICAgICAgICAgICAgID8gRmNo YXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51bSAoYXJnKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogUW5pbDsKKyAgY2hhciAqIHJlc3VsdCA9ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAg ICAgICAgICAgICAgICYmIGFyZyA9PSA5KQorICAgICAgICAgICAgICAgICAgICA/ICJcXHQiCisg ICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAg ICAgJiYgYXJnID09IDEwKQorICAgICAgICAgICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICAg ICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJn ID09IDMyKQorICAgICAgICAgICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICAgICAgICAgICA6 ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9IDkKKyAg ICAgICAgICAgICAgICAgICAgICYmIGFyZyAhPSAxMAorICAgICAgICAgICAgICAgICAgICAgJiYg YXJnICE9IDMyKQorICAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAg ICAgICAgICAgICAgICAgOiAiXFw/IjsKKyAgcmV0dXJuIHJlc3VsdDsKK30KKworaW50CittY19s aXNwX3RvX2N1cnNvcl90eXBlIChMaXNwX09iamVjdCBhcmcpCit7CisgIGNoYXIgKnN0cjsKKyAg aWYgKFhUWVBFIChhcmcpID09IExpc3BfU3RyaW5nKQorICAgIHN0ciA9IFNTREFUQSAoYXJnKTsK KyAgICBlbHNlIGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N5bWJvbCkKKyAgICAgIHN0ciA9IFNT REFUQSAoU1lNQk9MX05BTUUgKGFyZykpOworICAgICAgZWxzZSByZXR1cm4gLTE7CisgIGlmICgh c3RyY21wIChzdHIsICJubyIpKQorICAgIHJldHVybiBNQ19OT19DVVJTT1I7CisgIGlmICghc3Ry Y21wIChzdHIsICJtYy1sZWZ0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTUNfTEVGVF9G UklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAibWMtcmlnaHQtZnJpbmdlLWJpdG1h cCIpKQorICAgIHJldHVybiBNQ19SSUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAo c3RyLCAiYm94IikpCisgICAgcmV0dXJuIE1DX0ZJTExFRF9CT1g7CisgIGlmICghc3RyY21wIChz dHIsICJmcmFtZWQiKSkKKyAgICByZXR1cm4gTUNfRlJBTUVEX0JPWDsKKyAgaWYgKCFzdHJjbXAg KHN0ciwgImhvbGxvdyIpKQorICAgIHJldHVybiBNQ19IT0xMT1dfQk9YOworICBpZiAoIXN0cmNt cCAoc3RyLCAiYmFyIikpCisgICAgcmV0dXJuIE1DX0JBUjsKKyAgaWYgKCFzdHJjbXAgKHN0ciwg ImhiYXIiKSkKKyAgICByZXR1cm4gTUNfSEJBUjsKKyAgcmV0dXJuIC0xOworfQorCisvKiBVU0FH RTogIGZwcmludGYgKHN0ZGVyciwgIkNVUlNPUiBUWVBFICglcykiLCBtY19jdXJzb3JfdHlwZV90 b19zdHJpbmcgKGFyZykpOyAqLworY2hhciAqCittY19jdXJzb3JfdHlwZV90b19zdHJpbmcgKGVu dW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUpCit7CisgIHN3aXRjaCAoY3Vyc29yX3R5cGUp CisgICAgeworICAgICAgY2FzZSBNQ19GSUxMRURfQk9YOiByZXR1cm4gIk1DX0ZJTExFRF9CT1gi OworICAgICAgY2FzZSBNQ19GUkFNRURfQk9YOiByZXR1cm4gIk1DX0ZSQU1FRF9CT1giOworICAg ICAgY2FzZSBNQ19IT0xMT1dfQk9YOiByZXR1cm4gIk1DX0hPTExPV19CT1giOworICAgICA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HsKKyAgICAgIGNhc2Ug Tk9fQ0FDSEU6IHJldHVybiAiTk9fQ0FDSEUiOworICAgICAgY2FzZSBNQ19DQUNIRTogcmV0dXJu ICJNQ19DQUNIRSI7CisgICAgICBjYXNlIENIX0NBQ0hFOiByZXR1cm4gIkNIX0NBQ0hFIjsKKyAg ICAgIGNhc2UgRkNfQ0FDSEU6IHJldHVybiAiRkNfQ0FDSEUiOworICAgICAgZGVmYXVsdDoKKyAg ICAgIHJldHVybiAiVU5LTk9XTiI7CisgICAgfQorfQorCisvKiBVU0FHRTogIGZwcmludGYgKHN0 ZGVyciwgIkFDVElPTi1UWVBFICglcykiLCBtY19lbmdpbmVfdHlwZV90b19zdHJpbmcgKGFyZykp OyAqLworY2hhciAqCittY19lbmdpbmVfdHlwZV90b19zdHJpbmcgKGVudW0gbWNfZW5naW5lX3R5 cGUgYWN0aW9uX3R5cGUpCit7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgICAgeworICAgICAg Y2FzZSBNVUxUSVBMRV9DVVJTT1JTOiByZXR1cm4gIk1VTFRJUExFX0NVUlNPUlMiOworICAgICAg Y2FzZSBIT1JJWk9OVEFMX1JVTEVSOiByZXR1cm4gIkhPUklaT05UQUxfUlVMRVIiOworICAgICAg Y2FzZSBWRVJUSUNBTF9SVUxFUjogcmV0dXJuICJWRVJUSUNBTF9SVUxFUiI7CisgICAgICBjYXNl IEZJTExfQ09MVU1OOiByZXR1cm4gIkZJTExfQ09MVU1OIjsKKyAgICAgIGNhc2UgQ1VSU09SX0lO RElDQVRPUjogcmV0dXJuICJDVVJTT1JfSU5ESUNBVE9SIjsKKyAgICAgIGRlZmF1bHQ6CisgICAg ICByZXR1cm4gIlVOS05PV04iOworICAgIH0KK30KKworLyogVVNBR0U6ICBmcHJpbnRmIChzdGRl cnIsICJGUk9NX1dIRVJFICglcykiLCBtY19kcmF3X3Jvd190eXBlX3RvX3N0cmluZyAoYXJnKSk7 ICovCitjaGFyICoKK21jX2RyYXdfcm93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JBV19PVkVS TEFQUEVEX1JPV1MiOworICAgICAgY2FzZSBHVUlfSU5TRVJUX0dMWVBIUzogcmV0dXJuICJHVUlf SU5TRVJUX0dMWVBIUyI7CisgICAgICBjYXNlIEdVSV9GSVhfT1ZFUkxBUFBJTkdfQVJFQTogcmV0 dXJuICJHVUlfRklYX09WRVJMQVBQSU5HX0FSRUEiOworICAgICAgY2FzZSBEUkFXX1JPV19XSVRI X01PVVNFX0ZBQ0U6IHJldHVybiAiRFJBV19ST1dfV0lUSF9NT1VTRV9GQUNFIjsKKyAgICAgIGNh c2UgRVhQT1NFX0FSRUFfT05FOiByZXR1cm4gIkVYUE9TRV9BUkVBX09ORSI7CisgICAgICBjYXNl IEVYUE9TRV9BUkVBX1RXTzogcmV0dXJuICJFWFBPU0VfQVJFQV9UV08iOworICAgICAgY2FzZSBF WFBPU0VfTElORTogcmV0dXJuICJFWFBPU0VfTElORSI7CisgICAgICBkZWZhdWx0OgorICAgICAg cmV0dXJuICJVTktOT1dOIjsKKyAgICB9Cit9CisKK3ZvaWQKK21jX2NhY2hlX2luc3BlY3RvciAo c3RydWN0IHdpbmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCBtYXRyaXgpCit7CisgIGludCB2cG9z X2FsbG9jYXRlZCA9IHctPm1jX21hdHJpeC52cG9zX2FsbG9jYXRlZDsKKyAgaW50IHZwb3NfdXNl ZCA9IHctPm1jX21hdHJpeC52cG9zX3VzZWQ7CisgIGZwcmludGYgKHN0ZGVyciwgIiVzOiAgbWF0 cml4LnZwb3NfYWxsb2NhdGVkICglZCkgfCBtYXRyaXgudnBvc191c2VkICglZClcbiIsCisgICAg ICAgICAgICAgICAgICAgbWNfd2luZG93ICh3KSwgdnBvc19hbGxvY2F0ZWQsIHZwb3NfdXNlZCk7 CisgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAg ICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAg ICAgIGludCBjdXJzb3JzX3VzZWQgPSB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5 cGVdOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICBtYXRyaXguY3Vyc29yc191c2VkWyVzXSAo JWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAo Y2FjaGVfdHlwZSksIGN1cnNvcnNfdXNlZCk7CisgICAgfQorICBmb3IgKGludCB2bnRoID0gMDsK KyAgICAgICB2bnRoIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZDsKKyAgICAgICArK3ZudGgpCisg ICAgeworICAgICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hF OworICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgICAgICsrY2FjaGVf dHlwZSkKKyAgICAgICAgeworICAgICAgICAgIGludCBjYWNoZV9hbGxvY2F0ZWQgPSB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAg aW50IGNhY2hlX3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hl X3R5cGVdOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgICB2bnRoICglZCkgfCBjYWNo ZV9hbGxvY2F0ZWRbJXNdICglZCkgfCBjYWNoZV91c2VkWyVzXSAoJWQpXG4iLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgdm50aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2Nh Y2hlX3R5cGVfdG9fc3RyaW5nIChjYWNoZV90eXBlKSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIGNhY2hlX2FsbG9jYXRlZCwKKyAgICAgICAg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sKK30KKwordm9pZAorbWNfc2V0X2Vzc2VudGlh bHMgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBtY19lc3NlbnRpYWxzICplc3NlbnRpYWxzKQor eworICBpZiAoIUJVRkZFUlAgKHctPmNvbnRlbnRzKSkKKyAgICByZXR1cm47CisgIGlmIChOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICYmIE5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpKQorICAgIHJldHVybjsK KyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGVzc2VudGlhbHMtPmFj dGl2ZV9wID0gKHcgPT0gWFdJTkRPVyAoZi0+c2VsZWN0ZWRfd2luZG93KQorICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBmID09IEZSQU1FX0RJU1BMQVlfSU5GTyAoZiktPmhpZ2hsaWdodF9m cmFtZSk7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgIHN0 cnVjdCBidWZmZXIgKm9sZF9idWZmZXIgPSBOVUxMOworICBwdHJkaWZmX3Qgb3BvaW50ID0gKHcg PT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KSkKKyAgICAgICAgICAgICAgICAgICAgID8gUFQK KyAgICAgICAgICAgICAgICAgICAgIDogWEZJWE5VTSAoRm1hcmtlcl9wb3NpdGlvbiAody0+cG9p bnRtKSk7CisgIHB0cmRpZmZfdCBjdXJyZW50X2NvbCA9IG1jX2N1cnJlbnRfY29sdW1uICh3LCBv cG9pbnQpOworICBpbnQgZnJhbWVfY2hhcl93aWR0aCA9IEZSQU1FX0NPTFVNTl9XSURUSCAoZik7 CisgIGJvb2wgZmlsbF9jb2x1bW5fcCA9ICFOSUxQIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOwor ICBpbnQgZmlsbF9jb2wgPSBYRklYTlVNIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBpbnQg aHNjbF94ID0gdy0+aHNjcm9sbCAqIGZyYW1lX2NoYXJfd2lkdGg7CisgIGlmIChiICE9IGN1cnJl bnRfYnVmZmVyKQorICAgIHsKKyAgICAgIG9sZF9idWZmZXIgPSBjdXJyZW50X2J1ZmZlcjsKKyAg ICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKGIpOworICAgIH0KKyAgZXNzZW50aWFscy0+enYgPSBa VjsKKyAgZXNzZW50aWFscy0+enZfYnl0ZSA9IFpWX0JZVEU7CisgIGVzc2VudGlhbHMtPmZjX3gg PSAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChWZGlzcGxh eV9saW5lX251bWJlcnMpKQorICAgICAgICAgICAgICAgICAgICAgICA/IChmaWxsX2NvbCAqIGZy YW1lX2NoYXJfd2lkdGgpICsgdy0+bWMubG51bV9waXhlbF93aWR0aCAtIGhzY2xfeAorICAgICAg ICAgICAgICAgICAgICAgOiAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICAg JiYgTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAg PyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoKSAtIGhzY2xfeAorICAgICAgICAgICAgICAg ICAgICAgOiAwOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVybmFsIChv bGRfYnVmZmVyKTsKKyAgZW51bSBmYWNlX2lkIGZpbGxfY29sdW1uX3ByZV96dl9mYWNlX2lkID0K KyAgICAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAmJiBOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUp CisgICAgOiAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAgJiYgIU5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgJiYg IU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5jdXJzb3Iu eCA9PSBlc3NlbnRpYWxzLT5mY194KQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg aW50ZXJuICgiZmMtb3BvaW50LWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpCisgICAgOiAo ZXNzZW50aWFscy0+YWN0aXZlX3AKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVy dGljYWxfcnVsZXIpKQorICAgICAgICYmIHctPmN1cnNvci54ID09IGVzc2VudGlhbHMtPmZjX3gp CisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1vcG9pbnQtcHJl LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6ICghZXNzZW50aWFscy0+YWN0aXZlX3AKKyAgICAgICAm JiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY19pbmFjdGl2ZV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klMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAo YiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICYmIHctPmN1cnNvci54ID09IGVzc2VudGlh bHMtPmZjX3gpCisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1v cG9pbnQtYXQtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAor ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZl X3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxl cikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggIT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8g bG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLWF0LXp2LWZhY2Ui KSwgdHJ1ZSkKKyAgICA6IChlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYmICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQ IChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggIT0g ZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVy biAoImZjLWF0LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBm LCBpbnRlcm4gKCJmYy1hdC16di1mYWNlIiksIH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mVfd2luZG93cykpCisgICAgICAg JiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAg ICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5j dXJzb3IueCA9PSBlc3NlbnRpYWxzLT5mY194KQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAo dywgZiwgaW50ZXJuICgiZmMtb3BvaW50LWluYWN0aXZlLXBvc3QtenYtZmFjZSIpLCB0cnVlKQor ICAgIDogKGVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIs IGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxz LT5mY194KQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiZmMtb3Bv aW50LXBvc3QtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAor ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZl X3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxl cikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggIT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8g bG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXBvc3QtenYtZmFj ZSIpLCB0cnVlKQorICAgIDogK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Ug KHctPmZyYW1lKTsKKyAgICAgIHB0cmRpZmZfdCBjdXJyZW50X2NvbCA9IG1jX2N1cnJlbnRfY29s dW1uICh3LCBwb3NpbnQpOworICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNv bnRlbnRzKTsKKyAgICAgIGJvb2wgZmlsbF9jb2x1bW5fcCA9ICFOSUxQIChCVkFSIChiLCBmaWxs X2NvbHVtbikpOworICAgICAgaW50IGZpbGxfY29sID0gKGZpbGxfY29sdW1uX3ApCisgICAgICAg ICAgICAgICAgICAgICA/IFhGSVhOVU0gKEJWQVIgKGIsIGZpbGxfY29sdW1uKSkKKyAgICAgICAg ICAgICAgICAgICAgIDogMDsKKyAgICAgIGVudW0gZmFjZV9pZCBldmVuX2ZhY2VfaWQgPQorICAg ICAgICAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICAgPyBsb29r dXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1ldmVuLWluYWN0aXZlLXByZS16di1mYWNl IiksIHRydWUpCisgICAgICAgIDogbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist ZXZlbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgIHN0cnVjdCBmYWNlICpldmVuX2ZhY2Ug PSBGQUNFX0ZST01fSUQgKGYsIGV2ZW5fZmFjZV9pZCk7CisgICAgICBMaXNwX09iamVjdCBldmVu X2NvbG9yID0gZXZlbl9mYWNlLT5sZmFjZVtMRkFDRV9GT1JFR1JPVU5EX0lOREVYXTsKKyAgICAg IHN0cnVjdCBtY19SR0IgZXZlbl9mb3JlZ3JvdW5kOworICAgICAgbWNfeHdfY29sb3JfdmFsdWVz ICh3LCBldmVuX2NvbG9yLCAmZXZlbl9mb3JlZ3JvdW5kKTsK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Zh Y2UiKSwgdHJ1ZSk7CisgICAgICBzdHJ1Y3QgZmFjZSAqYmV5b25kX2ZpbGxfZmFjZSA9IEZBQ0Vf RlJPTV9JRCAoZiwgYmV5b25kX2ZpbGxfZmFjZV9pZCk7CisgICAgICBMaXNwX09iamVjdCBiZXlv bmRfZmlsbF9jb2xvciA9IGJleW9uZF9maWxsX2ZhY2UtPmxmYWNlW0xGQUNFX0ZPUkVHUk9VTkRf SU5ERVhdOworICAgICAgc3RydWN0IG1jX1JHQiBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kOworICAg ICAgbWNfeHdfY29sb3JfdmFsdWVzICh3LCBiZXlvbmRfZmlsbF9jb2xvciwgJmJleW9uZF9maWxs X2ZvcmVncm91bmQpOworICAgICAgLyogcmVkICovCisgICAgICBpZiAoKCFmaWxsX2NvbHVtbl9w CisgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAgICAgICYmIHJvd19w b3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgfHwgKGZpbGxfY29sdW1uX3AKKyAgICAgICAg ICAgICAgJiYgY3VycmVudF9jb2wgJSAyICE9IDAKKyAgICAgICAgICAgICAgJiYgY3VycmVudF9j b2wgPD0gZmlsbF9jb2wKKyAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikp CisgICAgICAgIHsKKyAgICAgICAgICBsc2xfZmctPnJlZCA9IG9kZF9mb3JlZ3JvdW5kLnJlZDsK KyAgICAgICAgICBsc2xfZmctPmdyZWVuID0gb2RkX2ZvcmVncm91bmQuZ3JlZW47CisgICAgICAg ICAgbHNsX2ZnLT5ibHVlID0gb2RkX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgfQorICAgICAg ICAvKiB5ZWxsb3cgKi8KKyAgICAgICAgZWxzZSBpZiAoKCFmaWxsX2NvbHVtbl9wCisgICAgICAg ICAgICAgICAgICAmJiBjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgJiYg cm93X3Bvc2l0aW9uID09IFBSRV9aVikKKyAgICAgICAgICAgICAgICAgfHwgKGZpbGxfY29sdW1u X3AKKyAgICAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiA9PSAwCisgICAgICAg ICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbAorICAgICAgICAgICAgICAg ICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikpCisgICAgICAgICAgeworICAgICAgICAg ICAgbHNsX2ZnLT5yZWQgPSBldmVuX2ZvcmVncm91bmQucmVkOworICAgICAgICAgICAgbHNsX2Zn LT5ncmVlbiA9IGV2ZW5fZm9yZWdyb3VuZC5ncmVlbjsKKyAgICAgICAgICAgIGxzbF9mZy0+Ymx1 ZSA9IGV2ZW5fZm9yZWdyb3VuZC5ibHVlOworICAgICAgICAgIH0KKyAgICAgICAgICAvKiBncmVl biAqLworICAgICAgICAgIGVsc2UgaWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAg ICAmJiBjdXJyZW50X2NvbCA+IGZpbGxfY29sCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bv c2l0aW9uID09IFBSRV9aVikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbHNsX2ZnLT5y ZWQgPSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLnJlZDsKKyAgICAgICAgICAgICAgbHNsX2ZnLT5n cmVlbiA9IGJleW9uZF9maWxsX2ZvcmVncm91bmQuZ3JlZW47CisgICAgICAgICAgICAgIGxzbF9m Zy0+Ymx1ZSA9IGJleW9uZF9maWxsX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIGVsc2UgaWYgKHJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXNzZW50aWFsc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b3ItcHJl LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgOiAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVf d2luZG93cykpCisgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAg ICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNv ci1pbmFjdGl2ZS1hdC16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogKGVzc2VudGlhbHMuYWN0 aXZlX3AKKyAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWKQorICAgICAgICAgID8g bG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1hdC16 di1mYWNlIiksIHRydWUpCisgICAgICAgIDogbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVy biAoIistcmVhbC1mYWtlLWN1cnNvci1hdC16di1mYWNlIiksIHRydWUpOworICAgICAgc3RydWN0 IGZhY2UgKmN1cnNvcl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBjdXJzb3JfZmFjZV9pZCk7Cisg ICAgICBMaXNwX09iamVjdCBjdXJzb3JfY29sb3IgPSBjdXJzb3JfZmFjZS0+bGZhY2VbTEZBQ0Vf Rk9SRUdST1VORF9JTkRFWF07CisgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIGN1cnNvcl9j b2xvciwgbHNsX2ZnKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgfQorfQorCisvKiBEcmF3IGds eXBocyBiZXR3ZWVuIFNUQVJUIGFuZCBFTkQgaW4gQVJFQSBvZiBST1cgb24gd2luZG93IFcsCisg ICBzdGFydGluZyBhdCB4LXBvc2l0aW9uIFguICBYIGlzIHJlbG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JvdywgcmVkcmF3 IHNvbWUgZ2x5cGhzIGluIGZyb250IG9yIGZvbGxvd2luZyB0aGUgZ2x5cGgKKyAgICAgc3RyaW5n cyBidWlsdCBhYm92ZS4gKi8KKyAgaWYgKGhlYWQgJiYgIW92ZXJsYXBzICYmIHJvdy0+Y29udGFp bnNfb3ZlcmxhcHBpbmdfZ2x5cGhzX3ApCisgICAgeworICAgICAgc3RydWN0IGdseXBoX3N0cmlu ZyAqaCwgKnQ7CisgICAgICBNb3VzZV9ITEluZm8gKmhsaW5mbyA9IE1PVVNFX0hMX0lORk8gKGYp OworICAgICAgaW50IG1vdXNlX2JlZ19jb2wgVU5JTklULCBtb3VzZV9lbmRfY29sIFVOSU5JVDsK KyAgICAgIGJvb2wgY2hlY2tfbW91c2VfZmFjZSA9IGZhbHNlOworICAgICAgaW50IGR1bW15X3gg PSAwOworICAgICAgLyogSWYgbW91c2UgaGlnaGxpZ2h0aW5nIGlzIG9uLCB3ZSBtYXkgbmVlZCB0 byBkcmF3IGFkamFjZW50CisgICBnbHlwaHMgdXNpbmcgbW91c2UtZmFjZSBoaWdobGlnaHRpbmcu ICovCisgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgcm93LT5tb3VzZV9mYWNlX3AKKyAg ICAgICAgICAmJiBobGluZm8tPm1vdXNlX2ZhY2VfYmVnX3JvdyA+PSAwCisgICAgICAgICAgJiYg aGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHB0 cmRpZmZfdCByb3dfdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3LT5jdXJyZW50X21hdHJp eCk7CisgICAgICAgICAgaWYgKHJvd192cG9zID49IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfcm93 CisgICAgICAgICAgICAgICYmIHJvd192cG9zIDw9IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93 KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjaGVja19tb3VzZV9mYWNlID0gdHJ1ZTsK KyAgICAgICAgICAgICAgbW91c2VfYmVnX2NvbCA9IChyb3dfdnBvcyA9PSBobGluZm8tPm1vdXNl X2ZhY2VfYmVnX3JvdykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaGxpbmZvLT5t b3VzZV9mYWNlX2JlZ19jb2wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAg ICAgICAgICAgICAgbW91c2VfZW5kX2NvbCA9IChyb3dfdnBvcyA9PSBobGluZm8tPm1vdXNlX2Zh Y2VfZW5kX3JvdykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaGxpbmZvLT5tb3Vz ZV9mYWNlX2VuZF9jb2wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogcm93LT51c2Vk W1RFWFRfQVJFQV07CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIC8qIENvbXB1dGUg b3ZlcmhhbmdzIGZvciBhbGwgZ2x5cGggc3RyaW5ncy4gKi8KKyAgICAgIGlmIChGUkFNRV9SSUYg KGYpLT5jb21wdXRlX2dseXBoX3N0cmluZ19vdmVyaGFuZ3MpCisgICAgICAgIGZvciAocyA9IGhl YWQ7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgIEZSQU1FX1JJRiAoZiktPmNvbXB1dGVfZ2x5 cGhfc3RyaW5nX292ZXJoYW5ncyAocyk7CisgICAgICAvKiBQcmVwZW5kIGdseXBoIHN0cmluZ3Mg Zm9yIGdseXBocyBpbiBmcm9udCBvZiB0aGUgZmlyc3QgZ2x5cGgKKyAgICAgIHN0cmluZyB0aGF0 IGFyZSBvdmVyd3JpdHRlbiBiZWNhdXNlIG9mIHRoZSBmaXJzdCBnbHlwaAorICAgICAgc3RyaW5n J3MgbGVmdCBvdmVyaGFuZy4gIFRoZSBiYWNrZ3JvdW5kIG9mIGFsbCBzdHJpbmdzCisgICAgICBw cmVwZW5kZWQgbXV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zIG5vIGJ1ZmZlciBwb3NpdGlvbikuICBXaGVuIHBsYWNpbmcgYSBmYWtlIGN1cnNvciBvbiB0 aGUgIk0iLAorICAgICAgICAgIGhsID09IERSQVdfQ1VSU09SIGFuZCB0aGUgU1RSRVRDSF9HTFlQ SCBpcyBgbGVmdF9vdmVyd3JpdHRlbmAuICBEcmF3aW5nCisgICAgICAgICAgbm9ybWFsIHRleHQg ZHVyaW5nIGB1cGRhdGVfd2luZG93JyAoRFJBV19OT1JNQUxfVEVYVCkgY2FuIGFsc28gZXJhc2Ug ZmFrZQorICAgICAgICAgIGN1cnNvcnMgdGhhdCBhcmUgYGxlZnRfb3ZlcndyaXR0ZW4nLiAqLwor ICAgICAgICAgIGxlbmd0aCA9IDA7CisgICAgICAgICAgZm9yIChzID0gaDsgczsgcyA9IHMtPm5l eHQpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPmxlZnRfb3ZlcndyaXR0ZW5fcCA9 IHRydWU7CisgICAgICAgICAgICAgIHMtPmFjdGlvbl90eXBlID0gYWN0aW9uX3R5cGU7CisgICAg ICAgICAgICAgIGxlbmd0aCArPSBzLT5maXJzdF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAg ICAgICB9CisgICAgICAgICAgcmVsYXRpdmVfeCA9IHN0YXJ0X3ggLSBsZW5ndGg7CisgICAgICAg ICAgZm9yIChzID0gaDsgczsgcyA9IHMtPm5leHQpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIHMtPmZpcnN0X2dseXBoLT5yZWxhdGl2ZV94ID0gcmVsYXRpdmVfeDsKKyAgICAgICAgICAg ICAgcmVsYXRpdmVfeCArPSBzLT5maXJzdF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAg ICB9CisgICAgICAgICAgc3RhcnQgPSBpOworICAgICAgICAgIGNvbXB1dGVfb3ZlcmhhbmdzX2Fu ZF94ICh0LCBoZWFkLT54LCB0cnVlKTsKKyAgICAgICAgICBwcmVwZW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IHBhaW50 IG92ZXIgdGhlIGZvcmVncm91bmQgb2YgZm9sbG93aW5nIGdseXBocy4gKi8KKyAgICAgIGkgPSBy aWdodF9vdmVyd3JpdGluZyAodGFpbCk7CisgICAgICBpZiAoaSA+PSAwKQorICAgICAgICB7Cisg ICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIG92ZXJsYXBfaGw7CisgICAgICAgICAgaWYg KGNoZWNrX21vdXNlX2ZhY2UKKyAgICAgICAgICAgICAgJiYgbW91c2VfYmVnX2NvbCA8IGkgJiYg bW91c2VfZW5kX2NvbCA+IGVuZCkKKyAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01PVVNF X0ZBQ0U7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFX X05PUk1BTF9URVhUOworICAgICAgICAgIGlmIChobCA9PSBvdmVybGFwX2hsIHx8IGNsaXBfdGFp bCA9PSBOVUxMKQorICAgICAgICAgICAgY2xpcF90YWlsID0gdGFpbDsKKyAgICAgICAgICBpKys7 ICAgICAgLyogV2UgbXVzdCBpbmNsdWRlIHRoZSBJdGggZ2x5cGguICovCisgICAgICAgICAgTUNf QlVJTERfR0xZUEhfU1RSSU5HUyAoZW5kLCBpLCBoLCB0LCBvdmVybGFwX2hsLCB4LCBsYXN0X3gp OworICAgICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgICAgcy0+ YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICAgICAgY29tcHV0ZV9vdmVyaGFuZ3Nf YW5kX3ggKGgsIHRhaWwtPnggKyB0YWlsLT53aWR0aCwgZmFsc2UpOworICAgICAgICAgIGFwcGVu ZF9nbHlwaF9zdHJpbmdfbGlzdHMgKCZoZWFkLCAmdGFpbCwgaCwgdCk7CisgICAgICAgIH0KKyAg ICAgIHRhaWwgPSBnbHlwaF9zdHJpbmdfY29udGFpbmluZ19iYWNrZ3JvdW5kX3dpZHRoICh0YWls KTsKKyAgICAgIGlmIChjbGlwX3RhaWwpCisgICAgICAgIGNsaXBfdGFpbCA9IGdseXBoX3N0cmlu Z19jb250YWluaW5nX2JhY2tncm91bmRfd2lkdGggKGNsaXBfdGFpbCk7CisgICAgICBpZiAoY2xp cF9oZWFkIHx8IGNsaXBfdGFpbCkKKyAgICAgICAgZm9yIChzID0gaGVhZDsgczsgcyA9IHMtPm5l eHQpCisgICAgICAgICAgeworICAgICAgICAgICAgcy0+Y2xpcF9oZWFkID0gY2xpcF9oZWFkOwor ICAgICAgICAgICAgcy0+Y2xpcF90YWlsID0gY2xpcF90YWlsOworICAgICAgICAgIH0KKyAgICB9 CisgIC8qIERyYXcgYWxsIHN0cmluZ3MuICovCisgIGZvciAocyA9IGhlYWQ7IHMgJiYgZHJhd19w OyBzID0gcy0+bmV4dCkKKyAgICBGUkFNRV9SSUYgKGYpLT5tY19zY3JpYmVfc3RyaW5nIChzLCBt YXRyaXgsIHJvdywgbHNsLCBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworI2lm bmRlZiBIQVZFX05TCisgIC8qIFdoZW4gZm9jdXMgYSBzb2xlIGZyYW1lIGFuZCBtb3ZlIGhvcml6 b250YWxseSwgdGhpcyBjbGVhcnMgb25fcAorICAgICBjYXVzaW5nIGEgZmFpbHVyZSB0byBlcmFz ZSBwcmV2IGN1cnNvciBwb3NpdGlvbi4gKi8KKyAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBCisgICAg ICAmJiAhcm93LT5mdWxsX3dpZHRoX3AKKyAgICAgIC8qIFdoZW4gZHJhd2luZyBvdmVybGFwcGlu ZyByb3dzLCBvbmx5IHRoZSBnbHlwaCBzdHJpbmdzJworICAgICAgZm9yZWdyb3VuZCBpcyBkcmF3 biwgd2hpY2ggZG9lc24ndCBlcmF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UKKyAgIGNvbW1l bnQgb2YgZHJhd19nbHlwaHMgZm9yIHRoZSBtZWFuaW5nIG9mIEhMLiAqLwordm9pZAorbWNfZHJh d19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1h dHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgICAgIGVudW0g ZHJhd19nbHlwaHNfZmFjZSBobCwgaW50IHgsIGludCBocG9zLCBpbnQgdnBvcywKKyAgICAgICAg ICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxh dm9yLAorICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5 cGUsIGludCB3ZCwgYm9vbCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICBib29sIGN1 cnNvcl9nY19wKQoreworICAvLyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSBtY19nZXRf Y3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgIC8vICBmcHJpbnRm IChzdGRlcnIsICJtY19kcmF3X2N1cnNvcl9nbHlwaDogIGNoICglZCkgfCB4ICglZCksIGhwb3Mg KCVkKSwgdnBvcyglZCksIGhsICglZClcbiIsCisgIC8vICAgICAgICAgICAgICAgICAgICBjdXJz b3JfZ2x5cGgtPnUuY2gsIHgsIGhwb3MsIHZwb3MsIGhsKTsKKyAgYmxvY2tfaW5wdXQgKCk7Cisg IGJvb2wgZHJhd19wID0gdHJ1ZTsKKyAgbWNfZHJhd19nbHlwaHMgKHcsIG1hdHJpeCwgcm93LCB4 LCBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyAxLCBobCwgMCwgdnBvcywgbHNsLAorICAgICAgICAg ICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJ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5yb3dzIG1lYW5zIHRoYXQgd2luZG93IGhhcyBiZWVuIHJlc2l6ZWQu CisgICAgIERvbid0IGJvdGhlciB0byBlcmFzZSB0aGUgY3Vyc29yLiAqLworICBpZiAodnBvcyA+ PSBtYXRyaXgtPm5yb3dzKQorICAgIHsKKyAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICBmcHJp bnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6ICByZXR1cm4gKCVkKVxuIiwgMik7CisgICAg ICByZXR1cm47CisgICAgfQorICAvKiBJZiByb3cgY29udGFpbmluZyBjdXJzb3IgaXMgbWFya2Vk IGludmFsaWQsIHRoZXJlIGlzIG5vdGhpbmcgd2UKKyAgICAgY2FuIGRvLiAqLworICBpZiAoIXJv dy0+ZW5hYmxlZF9wKQorICAgIHsKKyAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICBmcHJpbnRm IChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6ICByZXR1cm4gKCVkKVxuIiwgMyk7CisgICAgICBy ZXR1cm47CisgICAgfQorICAvKiBJZiBsaW5lIHNwYWNpbmcgaXMgPiAwLCBvbGQgY3Vyc29yIG1h eSBvbmx5IGJlIHBhcnRpYWxseSB2aXNpYmxlIGluCisgICAgIHdpbmRvdyBhZnRlciBzcGxpdC13 aW5kb3cuICBTbyBhZGp1c3QgdmlzaWJsZSBoZWlnaHQuICovCisgIHJvdy0+dmlzaWJsZV9oZWln aHQgPSBtaW4gKHJvdy0+dmlzaWJsZV9oZWlnaHQsCisgICAgICAgICAgICB3aW5kb3dfdGV4dF9i b3R0b21feSAodykgLSByb3ctPnkpOworICAvKiBJZiByb3cgaXMgY29tcGxldGVseSBpbnZpc2li bGUsIGRvbid0IGF0dGVtcHQgdG8gZGVsZXRlIGEgY3Vyc29yIHdoaWNoCisgICAgIGlzbid0IHRo ZXJlLiAgVGhpcyBjYW4gaGFwcGVuIGlmIGN1cnNvciBpcyBhdCB0b3Agb2YgYSB3aW5kb3cs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b2YgYSBsaW5lIChvbiBhIG5ld2xpbmUpLiAgVGhlIGN1cnNvciBhcHBlYXJzIHRoZXJlLCBidXQK KyAgICAgIG1vdXNlIGhpZ2hsaWdodGluZyBkb2VzIG5vdC4gKi8KKyAgICAgICYmIHJvdy0+dXNl ZFtURVhUX0FSRUFdID4gaHBvcyAmJiBocG9zID49IDApCisgICAgbW91c2VfZmFjZV9oZXJlX3Ag PSB0cnVlOworICAvKiBNYXliZSBjbGVhciB0aGUgZGlzcGxheSB1bmRlciB0aGUgY3Vyc29yLiAq LworICBpZiAoY3Vyc29yX3R5cGUgPT0gTUNfSE9MTE9XX0JPWAorICAgICAgfHwgY3Vyc29yX3R5 cGUgPT0gTUNfRlJBTUVEX0JPWCkKKyAgICB7CisgICAgICBpbnQgdGVtcF94ID0geDsKKyAgICAg IGludCBoZWFkZXJfbGluZV9oZWlnaHQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsK KyAgICAgIGN1cnNvcl9nbHlwaCA9IG1jX2dldF9jdXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93 LCBocG9zLCB2cG9zKTsKKyAgICAgIGlmIChjdXJzb3JfZ2x5cGggPT0gTlVMTCkKKyAgICAgICAg eworICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAi bWNfZXJhc2VfY3Vyc29yOiAgcmV0dXJuICglZClcbiIsIDcpOworICAgICAgICAgIHJldHVybjsK KyAgICAgICAgfQorICAgICAgaW50IHRlbXBfd2QgPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRo OworICAgICAgaWYgKHRlbXBfeCA8IDApCisgICAgICAgIHsKKyAgICAgICAgICB0ZW1wX3dkICs9 IHRlbXBfeDsKKyAgICAgICAgICB0ZW1wX3ggPSAwOworICAgICAgICB9CisgICAgICB0ZW1wX3dk ID0gbWluICh3ZCwgd2luZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBK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LT5yb3dzKSA/ IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfb25lKQorICAgIHJldHVybjsKKyAgYm9v bCBiYXJmX2NyYXNoX3R3byA9ICh2cG9zID49IDAgJiYgdnBvcyA8IG1hdHJpeC0+bnJvd3MpID8g ZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgcmV0dXJuOworICBpZiAo eCA8IDAKKyAgICAgIHx8IHkgPCAwCisgICAgICB8fCBocG9zIDwgMAorICAgICAgfHwgdnBvcyA8 IDApCisgICAgcmV0dXJuOworICBib29sIGF1dG9faHNjcm9sbF9tb2RlX3AgPSBFUSAoRmJ1ZmZl cl9sb2NhbF92YWx1ZSAoUWF1dG9faHNjcm9sbF9tb2RlLCB3LT5jb250ZW50cyksIFFjdXJyZW50 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 KyAgICAgICAgKCFhY3RpdmVfcAorICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICA/IGxvb2t1cF9uYW1l ZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaW5hY3RpdmUtcHJlLXp2LWZh Y2UiKSwgdHJ1ZSkKKyAgICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAgICAgPyBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LXByZS16di1mYWNlIiksIHRy dWUpCisgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgZmFjZV9pZCA9IChjdXJzb3Jf dHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgPyBvdmVybGF5 X2Fycm93X2ZhY2VfaWQKKyAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAg IC8qIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJp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Blcm1fMl9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfdGVt cF9wCisgICAgICAgICAgICAgICAgIHx8IGhzY2xfcGVybV9wKSkKKyAgICAgIHsKKyAgICAgICAg ZW51bSBmYWNlX2lkIG92ZXJsYXlfYXJyb3dfZmFjZV9pZCA9CisgICAgICAgICAgKCFhY3RpdmVf cAorICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9p bmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1 ZSkKKyAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgID8gbG9va3VwX25hbWVkX2Zh Y2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLXByZS16di1mYWNlIiksIHRy dWUpCisgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgIGZhY2VfaWQgPSAoY3Vy c29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgPyBv dmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lE OworICAgICAgICBpZiAoaHNjbF9hbGxfcGVybV8wX3ApCisgICAgICAgICAgZnJpbmdlX2JpdG1h cCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCBmYWxz ZSwgZmFsc2UpOworICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3Blcm1fMV9wKQorICAgICAg ICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIr LWhzY2wtcGVyb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0ID0g 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 YXJlYSkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmds eXBoc1thcmVhXTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsg cm93LT51c2VkW2FyZWFdOworICAgICAgICAgIC8qIEdseXBoIGZvciBhIGxpbmUgZW5kIGluIHRl eHQuICovCisgICAgICAgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGdseXBoID09IGdseXBo X2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAg ICAgICAgICBpZiAoZ2x5cGggPCBnbHlwaF9lbmQpCisgICAgICAgICAgICBmcHJpbnRmIChzdGRl cnIsICJHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUgRmFjZSBM UiBIUE9TIFpWIENcbiIpOworICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytn bHlwaCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfZHVtcF9nbHlwaCAocm93LCBn bHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgdnBvcyk7CisgICAgICAgICAgICAgIHJlbGF0aXZlX3gg Kz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQor ICAgIGVsc2UgaWYgKGdseXBocyA9PSAxKQorICAgICAgeworICAgICAgICBjaGFyIHNbU0hSVF9N QVggKyA0XTsKKyAgICAgICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEg PCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgaTsKKyAg ICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCByb3ctPnVzZWRbYXJlYV07ICsraSkKKyAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBo c1thcmVhXSArIGk7CisgICAgICAgICAgICAgICAgaWYgKGkgPT0gcm93LT51c2VkW2FyZWFdIC0g MQorICAgICAgICAgICAgICAgICAgICAmJiBhcmVhID09IFRFWFRfQVJFQQorICAgICAgICAgICAg ICAgICAgICAmJiBOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgICAgICAmJiBn bHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51 LmNoID09ICcgJykKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgc3Ry Y3B5ICgmc1tpXSwgIltcXG5dIik7CisgICAgICAgICAgICAgICAgICAgIGkgKz0gNDsKKyAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGdseXBoLT50eXBlID09 IENIQVJfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoIDwg MHg4MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPj0gJyAnKQor ICAgICAgICAgICAgICAgICAgICBzW2ldID0gZ2x5cGgtPnUuY2g7CisgICAgICAgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICBzW2ldID0gJy4nOworICAgICAgICAgICAg ICB9CisgICAgICAgICAgICBzW2ldID0gJ1wwJzsKKyAgICAgICAgICAgIGZwcmludGYgKHN0ZGVy ciwgIiUzZDogKCVkKSAnJXMnXG4iLCB2cG9zLCByb3ctPmVuYWJsZWRfcCwgcyk7CisgICAgICAg ICAgfQorICAgICAgfQorfQorCitERUZVTiAoIm1jLWR1bXAtZ2x5cGgtcm93IiwgRm1jX2R1bXBf Z2x5cGhfcm93LCBTbWNfZHVtcF9nbHlwaF9yb3csIDEsIDIsICJQIiwKKyAgICAgICBkb2M6IC8q IER1bXAgZ2x5cGggcm93IFJPVyB0byBzdGRlcnIuCitJbnRlcmFjdGl2ZWx5LCBST1cgaXMgdGhl IHByZWZpeCBudW1lcmljIGFyZ3VtZW50IGFuZCBkZWZhdWx0cyB0bwordGhlIHJvdyB3aGljaCBk aXNwbGF5cyBwb2ludC4KK09wdGlvbmFsIGFyZ3VtZW50IEdMWVBIUyAwIG1lYW5zIGRvbid0IGR1 bXAgZ2x5cGhzLgorR0xZUEhTIDEgbWVhbnMgZHVtcCBnbHlwaHMgaW4gc2hvcnQgZm9ybS4KK0dM WVBIUyA+IDEgb3Igb21pdHRlZCBtZWFucyBkdW1wIGdseXBocyBpbiBsb25nIGZvcm0uICAqLykK KyAgKExpc3BfT2JqZWN0IHJvdywgTGlzcF9PYmplY3QgZ2x5cGhzKQoreworICBzdHJ1Y3Qgd2lu ZG93ICp3ID0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgc3RydWN0IGdseXBoX21hdHJp eCAqbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgIEVNQUNTX0lOVCB2cG9zOworICBpZiAo TklMUCAocm93KSkKKyAgICB7CisgICAgICBpbnQgZDEsIGQyLCBkMywgZDQsIGQ1LCB5cG9zOwor ICAgICAgYm9vbCB2aXNpYmxlX3AgPSBwb3NfdmlzaWJsZV9wICh3LCBQVCwgJmQxLCAmZDIsICZk MywgJmQ0LCAmZDUsICZ5cG9zKTsKKyAgICAgIGludCBoZWFkZXJfbGluZV9oZWlnaHQgPSBXSU5E T1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgIGludCB2b2Zmc2V0ID0gKGhlYWRlcl9s aW5lX2hlaWdodCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICYmIHlwb3MgPiAwKQorICAgICAg ICAgICAgICAgICAgICAgID8geXBvcyArIDEKKyAgICAgICAgICAgICAgICAgICAgICA6IHlwb3M7 CisgICAgICBpZiAodmlzaWJsZV9wKQorICAgICAgICB2cG9zID0gdm9mZnNldDsKKyAgICAgICAg ZWxzZQorICAgICAgICAgIHZwb3MgPSAwOworICAgIH0KKyAgICBlbHNlCisgICAgICB7CisgICAg ICAgIENIRU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FucyBzaG93IGdseXBocyBpbiBzaG9ydCBmb3Jt Oword2l0aCBudW1lcmljIGFyZ3VtZW50LCBpdHMgdmFsdWUgaXMgcGFzc2VkIGFzIHRoZSBHTFlQ SFMgZmxhZy4gICovKQorICAoTGlzcF9PYmplY3QgZ2x5cGhzKQoreworICBzdHJ1Y3Qgd2luZG93 ICp3ID0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgc3RydWN0IGJ1ZmZlciAqYnVmZmVy ID0gWEJVRkZFUiAody0+Y29udGVudHMpOworICBmcHJpbnRmIChzdGRlcnIsICJQVCA9ICUicEQi ZCwgQkVHViA9ICUicEQiZC4gWlYgPSAlInBEImRcbiIsCisgICAgIEJVRl9QVCAoYnVmZmVyKSwg QlVGX0JFR1YgKGJ1ZmZlciksIEJVRl9aViAoYnVmZmVyKSk7CisgIGZwcmludGYgKHN0ZGVyciwg IkN1cnNvciB4ID0gJWQsIHkgPSAlZCwgaHBvcyA9ICVkLCB2cG9zID0gJWRcbiIsCisgICAgIHct PmN1cnNvci54LCB3LT5jdXJzb3IueSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zKTsK KyAgZnByaW50ZiAoc3RkZXJyLCAiPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09XG4iKTsKKyAgbWNfZHVtcF9nbHlwaF9tYXRyaXggKHctPmN1cnJlbnRfbWF0cml4 LAorICAgICAgICAgVFlQRV9SQU5HRURfRklYTlVNUCAoaW50LCBnbHlwaHMpID8gWEZJWE5VTSAo Z2x5cGhzKSA6IDApOworICByZXR1cm4gUW5pbDsKK30KKworYm9vbAorbWNfdHJhdmVyc2VfY2Fj aGVfcCAoc3RydWN0IG1jX21hdHJpeCBtYXRyaXgsIGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90 eXBlLAorICAgICAgICAgICAgICAgICAgICAgaW50IHZudGgsIGludCBudGgpCit7CisgIGlmICh2 bnRoIDwgbWF0cml4LnZwb3NfdXNlZAorICAgICAgJiYgbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNo ZV90eXBlXSA+IDAKKyAgICAgICYmIG50aCA8IG1hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRb Y2FjaGVfdHlwZV0pCisgICAgcmV0dXJuIHRydWU7CisgICAgZWxzZQorICAgICAgcmV0dXJuIGZh bHNlOworfQorCit2b2lkCittY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRvdyAqdykKK3sKKyAg aWYgKCFCVUZGRVJQICh3LT5jb250ZW50cykpCisgICAgcmV0dXJuOworICBmb3IgKGVudW0gbWNf Y2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVfdHlwZSA8IE5P X0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBib29sIGJ2YXJfYWN0 aXZlX3A7CisgICAgICBzd2l0Y2ggKGNhY2hlX3R5cGUpCisgICAgICAgIHsKKyAgICAgICAgICBj YXNlIE5PX0NBQ0hFOgorICAgICAgICAgICAgeworICAgICAgICAgICAgICByZXR1cm47CisgICAg ICAgICAgICB9CisgICAgICAgICAgY2FzZSBNQ19DQUNIRToKKyAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgJiYg TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkpCisgICAgICAgICAg ICAgICAgYnZhcl9hY3RpdmVfcCA9IGZhbHNlOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKEJV RkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkKKyAgICAgICAgICAgICAgICAg IGJ2YXJfYWN0aXZlX3AgPSB0cnVlOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICBjYXNlIENIX0NBQ0hFOgorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAmJiBOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgICAgICAgICAg ICBidmFyX2FjdGl2ZV9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoQlVGRkVS UCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgICAgICAgICAgICAgICAg YnZhcl9hY3RpdmVfcCA9IHRydWU7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAg fQorICAgICAgICAgIGNhc2UgRkNfQ0FDSEU6CisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpKQorICAgICAgICAgICAgICAg IGJ2YXJfYWN0aXZlX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChCVUZGRVJQ ICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgICAgICAgICAgICAgICBi dmFyX2FjdGl2ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICAgIGlmICghYnZhcl9hY3RpdmVfcCkKKyAgICAgICAgeworICAgICAg ICAgIC8qIERlY3JlYXNlIHRoZSBzaXplIG9mIHRoZSBhcnJheSB0byBhIGJhcmUgbWluaW11bS4g Ki8KKyAgICAgICAgICBmb3IgKGludCB2bnRoID0gMDsgdm50aCA8IHctPm1jX21hdHJpeC52cG9z X3VzZWQ7ICsrdm50aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSA+IDEpCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV0gPQorICAgICAgICAgICAgICAgICAgICB4bnJlYWxsb2MgKHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdLCAxLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV0pOworICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVf YWxsb2NhdGVkW2NhY2hlX3R5cGVdID0gMTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0gPSAwOwor ICAgICAgICAgICAgfQorICAgICAgICAgIHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVf dHlwZV0gPSAwOworICAgICAgICB9CisgICAgICAgIC8vICBBbHRob3VnaCBpdCB3b3VsZCBub3Qg YmUgdmVyeSBlZmZpY2llbnQsIGl0IGlzIHBvc3NpYmxlIHRvIHNldAorICAgICAgICAvLyAgdGhl IF91c2VkXyBlbGVtZW50cyBvZiB0aGUgYXJyYXkgdG8gemVyby4gIEluIHN1Y2ggYSBjYXNlLCB0 a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eCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhf cm93ICpyb3csCisgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGgsIGludCB4LCBpbnQgZngs IGludCB5LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBvcywKKyAgICAgICAgICAgaW50IHdkLCBp bnQgaCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwK KyAgICAgICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9uLCBzdHJ1Y3QgbWNf UkdCIGZvcmVncm91bmQsCisgICAgICAgICAgIHN0cnVjdCBtY19SR0IgYmFja2dyb3VuZCwgYm9v bCBhY3RpdmVfcCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAgICAgICBib29s IGRyYXdfcCwgZW51bSBtY19kcmF3X3Jvd190eXBlIGZyb21fd2hlcmUsCisgICAgICAgICAgIGVu dW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlLCBlbnVtIG1jX2VuZ2luZV90eXBlIGFjdGlvbl90 eXBlKQoreworICBpbnQgdm50aCA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICBp ZiAobWNfc3RkZXJyX3AKKyAgICAgICYmIGRyYXdfcCkKKyAgICB7CisgICAgICBpbnQgY2hhcnBv cyA9IGdseXBoLT5jaGFycG9zOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5tY19oZWxwZXIg KCVzKTogIGZyb21fd2hlcmUgKCVzKVxuXAorICBhY3Rpb25fdHlwZSAoJXMpIHwgZmxhdm9yICgl cykgfCBjaGFycG9zICglZClcblwKKyAgY2hhciAoJXMpIHwgeCAoJWQpIHwgZnggKCVkKSB8IHkg KCVkKSB8IGZ5ICglZCkgfCBocG9zICglZC8lZCkgfCB2cG9zICglZClcblwKKyAgaCAoJWQpIHwg Y3Vyc29yX3R5cGUgKCVzKS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RyaXgudnBvc1t2bnRoXS5j YWNoZV91c2VkW2NhY2hlX3R5cGVdOyArK250aCkKKyAgICAgICAgeworICAgICAgICAgIHNhbWVf cCB8PQorICAgICAgICAgICAgKHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uc2FtZV9wID09IHRydWUKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLnR5cGUgPT0gZ2x5cGgtPnR5cGUK KyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmdseXBoLmJ5dGVwb3MgPT0gZ2x5cGgtPmJ5dGVwb3MKKyAgICAgICAgICAgICAmJiB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLmNoYXJw b3MgPT0gZ2x5cGgtPmNoYXJwb3MKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLnUudmFsID09IGdseXBoLT51LnZhbAor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uZ2x5cGguZmFjZV9pZCA9PSBnbHlwaC0+ZmFjZV9pZAorICAgICAgICAgICAgICYmIHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGgucGFkZGlu Z19wID09IGdseXBoLT5wYWRkaW5nX3AKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLmxlZnRfYm94X2xpbmVfcCA9PSBn bHlwaC0+bGVmdF9ib3hfbGluZV9wC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AgICAgICAgcmV0dXJuOworICAgICAgfQorICBpZiAoY2Fj aGVfdHlwZSA9PSBOT19DQUNIRSkKKyAgICByZXR1cm47CisgICsrdy0+bWNfbWF0cml4LmN1cnNv cnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgaWYgKHZudGggPj0gdy0+bWNfbWF0cml4LnZwb3NfdXNl ZCkKKyAgICB3LT5tY19tYXRyaXgudnBvc191c2VkID0gdm50aCArIDE7CisgIGlmICh3LT5tY19t YXRyaXgudnBvc19hbGxvY2F0ZWQgPCB3LT5tY19tYXRyaXgudnBvc191c2VkKQorICAgIHsKKyAg ICAgIGludCBvbGRfYWxsb2MgPSB3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQ7CisgICAgICBp bnQgbmV3X2VsdHMgPSB3LT5tY19tYXRyaXgudnBvc191c2VkIC0gdy0+bWNfbWF0cml4LnZwb3Nf YWxsb2NhdGVkOworICAgICAgdy0+bWNfbWF0cml4LnZwb3MgPSB4cGFsbG9jICh3LT5tY19tYXRy aXgudnBvcywgJnctPm1jX21hdHJpeC52cG9zX2FsbG9jYXRlZCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbmV3X2VsdHMsIElOVF9NQVgsIHNpemVvZiAqdy0+bWNfbWF0cml4 LnZwb3MpOworICAgICAgbWVtc2V0ICh3LT5tY19tYXRyaXgudnBvcyArIG9sZF9hbGxvYywgMCwK KyAgICAgICAgICAgICAgICh3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQgLSBvbGRfYWxsb2Mp ICogc2l6ZW9mICp3LT5tY19tYXRyaXgudnBvcyk7CisgICAgfQorICArK3ctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV07CisgIGlmICh3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV0gPCB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdKQorICAgIHsKKyAgICAgIGludCBvbGRfYWxsb2Mg PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV07Cisg ICAgICBpbnQgbmV3X2VsdHMgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2Nh Y2hlX3R5cGVdIC0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hl X3R5cGVdOworICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0g PSB4cGFsbG9jICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg bmV3X2VsdHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIElOVF9NQVgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV0pOworICAgICAgbWVtc2V0ICh3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXSArIG9sZF9hbGxvYywgMCwKKyAgICAgICAgICAgICAgICh3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV0gLSBvbGRfYWxs b2MpCisgIC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AgICAgIE1DX0hCQVIgYXMgdG8gYG1jLXJlYWwtZmFrZS1jdXJzb3InLgor ICAgTVVMVElQTEVfQ1VSU09SUzogIFdlIGRvIG5vdCB1c2UgdGhpcyBmdW5jdGlvbi4KKyAgIEhP UklaT05UQUxfUlVMRVI6ICBXZSB3YW50IGEgdW5pdmVyc2FsIEZZIGNvb3JkaW5hdGUgZm9yIGEg bGV2ZWwgcnVsZXIuCisgICBWRVJUSUNBTF9SVUxFUiBhbmQgRklMTF9DT0xVTU46ICBXZSB3YW50 IGFuIEggdGhhdCBlbnN1cmVzIG5vIGdhcCBiZXR3ZWVuIHRoZQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgcHJldmlvdXMvbmV4dCBsaW5lLiAgVGhlIEZYIGNvb3JkaW5hdGUg aXMgc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNld2hlcmU6ICBg dy0+Y3Vyc29yLnhgIC8gYG1jLmZjX3hgLiAqLwordm9pZAorbWNfZ2V0X2N1cnNvcl9nZW9tZXRy eSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAgICAg ICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgeCwgaW50ICpmeCwg aW50IHksCisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgKmZ5LCBpbnQgaHBvcywgaW50IHZw b3MsIGludCAqaCwKKyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUg Y3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICBp bnQgKndkKQoreworICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAo dywgbWF0cml4LCByb3csIGhwb3MsIHZwb3MpOworICBpZiAoZ2x5cGggPT0gTlVMTCkKKyAgICBy Z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isgICAgICAgICAgaWYgKGN1cnNvcl93aWR0aCA8 IDEpCisgICAgICAgICAgICBjdXJzb3Jfd2lkdGggPSBtYXggKEZSQU1FX0NVUlNPUl9XSURUSCAo ZiksIDEpOworICAgICAgICAgIGlmIChjdXJzb3Jfd2lkdGggPCBnbHlwaC0+cGl4ZWxfd2lkdGgp CisgICAgICAgICAgKndkID0gY3Vyc29yX3dpZHRoOworICAgICAgICAgIGJyZWFrOworICAgICAg ICB9CisgICAgICBjYXNlIE1DX0hCQVI6CisgICAgICAgIHsKKyAgICAgICAgICBpbnQgY3Vyc29y X2hlaWdodCA9IChjdXJzb3Jfd2lkdGggPCAxKSA/IGxyaW50ICgwLjI1ICogKmgpIDogY3Vyc29y X3dpZHRoOworICAgICAgICAgIGlmIChjdXJzb3JfaGVpZ2h0ID4gcm93LT5oZWlnaHQpCisgICAg ICAgICAgICBjdXJzb3JfaGVpZ2h0ID0gcm93LT5oZWlnaHQ7CisgICAgICAgICAgLyogQ3Vyc29y IHNtYWxsZXIgdGhhbiBsaW5lIGhlaWdodCwgc28gbW92ZSBkb3duLiAqLworICAgICAgICAgIGlm ICgqaCA+IGN1cnNvcl9oZWlnaHQpCisgICAgICAgICAgICAqZnkgKz0gKmggLSBjdXJzb3JfaGVp Z2h0OworICAgICAgICAgICpoID0gY3Vyc29yX2hlaWdodDsKKyAgICAgICAgICAqd2QgPSBnbHlw aC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNhc2Ug TUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQ OgorICAgICAgY2FzZSBNQ19OT19GUklOR0VfQklUTUFQOgorICAgICAgY2FzZSBNQ19OT19DVVJT T1I6CisgICAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6CisgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6 CisgICAgICBjYXNlIE1DX0hPTExPV19CT1g6CisgICAgICBkZWZhdWx0OgorICAgICAgLyogQ29t cHV0ZSB0aGUgd2lkdGggb2YgdGhlIHJlY3RhbmdsZSB0byBkcmF3LiAgSWYgb24gYSBzdHJldGNo IGdseXBoLCBhbmQKKyAgICAgIGB4LXN0cmV0Y2gtY3Vyc29yJyBpcyBuaWwsIGRvbid0IGRyYXcg YSByZWN0YW5nbGUgYXMgd2lkZSBhcyB0aGUgZ2x5cGgsIGJ1dAorICAgICAgdXNlIGEgY2Fub25p Y2FsIGNoYXJhY3RlciB3aWR0aCBpbnN0ZWFkLiAqLworICAgICAgKndkID0gKGdseXBoLT50eXBl ID09IFNUUkVUQ0hfR0xZUEgKKyAgICAgICAgICAgICAmJiAheF9zdHJldGNoX2N1cnNvcl9wKQor ICAgICAgICAgICAgPyBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAoZiksIGdseXBoLT5waXhlbF93 aWR0aCkKKyAgICAgICAgICAgIDogZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgIH0KKy8qCisgICAg ICBmcHJpbnRmIChzdGRlcnIsICJjdXJzb3Jfd2lkdGg6ICglZCkgfCB4ICglZCkgfCAqZnggKCVk KSB8IHkgKCVkKSB8ICpmeSAoJWQpLCAqd2QgKCVkKSB8ICpoICglZClcbiIsCisgICAgICAgICAg ICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgeCwgKmZ4LCB5LCAqZnksICp3ZCwgKmgpOworKi8K K30KKwordm9pZAorbWNfZW5naW5lIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgc3RydWN0IGds eXBoICpnbHlwaCwgaW50IGFyZWEsIGludCByZWxhdGl2ZV94LCBpbnQgeF9saW1pdCwgaW50IHks CisgICAgICAgICAgIGludCBocG9zLCBpbnQgdnBvcywgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJz b3J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gICAgICAgICAgICAmJiBNQVRS SVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID09IFpWKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZS QU1FICh3LT5mcmFtZSk7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50 cyk7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FS 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+ b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAor ICAgICAgICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBoLT51LmNoLAor ICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwK KyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBn bHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChnbHlw aC0+dS5jaCkpOworICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUzogIENIQVJfR0xZUEgg fCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t ICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAo dywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3Ms CisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3df cG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgI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PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xp bWl0KQorICAgICAgICB7CisgICAgICAgICAgaWYgKHJlbGF0aXZlX3ggPCByb3ctPnBpeGVsX3dp ZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5w aXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgZnggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAg ICAgICAgICAgfQorICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCBy ZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICB4 X2xpbWl0IC0gcmVsYXRpdmVfeCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bv c2l0aW9uLAorICAgICAgICAgICAgICAgICAgICAgZm9yZWdyb3VuZCwgYmFja2dyb3VuZCwgZXNz ZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEhMRVNTLAorICAgICAgICAgICAgICAgICAgICAgZHJh d19wLCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICAgIH0KKyAg ICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAg ICAgICBWRVJUSUNBTF9SVUxFUjogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAg ICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FM X1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChjdXJz b3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBy b3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdo dF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Y3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9y b3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZF UlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19S RVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkV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peGVsX3dpZHRoKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3 LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBv cywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJv d19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNz ZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAg ICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAg IH0KK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KHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAl NWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJXNcbiIs CisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ct PnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJl bGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAg IChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNU UklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAo TklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAg ICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAwdSwKKyAg ICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisg ICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5 cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7CisgIHN3aXRjaCAoYWN0aW9u X3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAg ICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAg ICAgICovCisvKiAtLS0tLS0t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VfeCwgZngsIHksIGZ5LCBocG9z LCB2cG9zLAorICAgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgYmFja2dy b3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwK KyAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAo Z2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAg ICAgICAgICAmJiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICBp ZiAocmVsYXRpdmVfeCA8IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICByZWxhdGl2ZV94 ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB0ZW1wX2ZhY2VfaWQgPSAocm93LT5m aWxsX2xpbmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IGdseXBoLT5mYWNlX2lkCisg ICAgICAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgICAgc3Ry dWN0IG1jX1JHQiBiYWNrZ3JvdW5kOworICAgICAgICAgIG1jX3NldF9sc2xfYmcgKHcsIHRlbXBf ZmFjZV9pZCwgJmJhY2tncm91bmQpOworICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCBy b3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAg ICAgICAgICAgICB4X2xpbWl0IC0gcmVsYXRpdmVfeCwgaCwgY3Vyc29yX3R5cGUsIHhfbGltaXQg LSByZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICA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ICAgICAgICB0ZW1wX2ZhY2VfaWQgPSBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICBz dHJ1Y3QgbWNfUkdCIGJhY2tncm91bmQ7CisgICAgICBtY19zZXRfbHNsX2JnICh3LCB0ZW1wX2Zh Y2VfaWQsICZiYWNrZ3JvdW5kKTsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9 IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9v bl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZF UlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlv bmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1 cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEhMRVNTOworICAgICAg aWYgKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9X CisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gK KyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAg fHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vy c29yX3R5cGUgPSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgd2QgPSAxOworICAgICAg bWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIG9wb2ludF94LCBvcG9pbnRfZngsIHks IGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZC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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5E OiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAg ICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+ dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZw cmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAl YyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0g MCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAg ICAgICdJJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAg ICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+ dS5pbWdfaWQsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9i b3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5 cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgJy4nKTsKKyAgc3dp dGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAg ICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgSU1BR0VfR0xZUEggICAgICAg ICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgTVVM VElQTEVfQ1VSU09SUzoKKyAgICB7CisgICAgICBjdXJzb3JfdHlwZSA9IE1DX0hPTExPV19CT1g7 CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngs IHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5c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gICBicmVhazsKKyAgICB9CisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgVkVSVElDQUxf UlVMRVI6ICBJTUFHRV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBjdXJz b3JfdHlwZSA9IE1DX0hPTExPV19CT1g7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93 LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAg ICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3Jl Z3JvdW5kLAorICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9w LCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBjYWNoZV90 eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAgSU1B R0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0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S0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJF R0lOOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IENPTVBPU0lURV9H TFlQSCkKKyAgeworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIHsKKyAgICAgICAgZnByaW50 ZiAoc3RkZXJyLAorICAgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMg JTNkIDB4JTA2eCIsCisgICAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAor ICAgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAt IDEpLAorICAgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICAgJysnLAorICAgICAgICAgIGds eXBoLT5jaGFycG9zLAorICAgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICA/ICdCJworICAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgICA/ICdTJworICAgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAg ICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUu Y21wLmlkKTsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAg ICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9w LAorICAgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+ dS5jbXAuYXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICUzZCAlcyAuIFsl ZC0lZF1cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2 X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+c2xpY2Uu Y21wLmZyb20sIGdseXBoLT5zbGljZS5jbXAudG8pOworICAgICAgICBlbHNlCisgICAgICAgICAg ZnByaW50ZiAoc3RkZXJyLCAiXG4iKTsKKyAgICAgIH0KKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkK KyAgeworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAg TVVMVElQTEVfQ1VSU09SUzogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgKi8K Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgTVVMVElQTEVfQ1VSU09SUzoKKyAg ICB7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwg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dmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAg ICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAoZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiByZWxh dGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICByZWxhdGl2ZV94ICs9IGds eXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAocmVsYXRpdmVfeCA8PSB4X2xpbWl0 KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93 LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAg ICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRp b24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNz ZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEhMRVNTLCBkcmF3X3AsCisgICAgICAgICAgICAgICAg ICAgICAgICAgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgICAg ICAgICByZWxhdGl2ZV94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAg ICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyog ICAgICAgICAgICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVI6ICBDT01QT1NJVEVfR0xZUEgg ICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNl IFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZv ciA9IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRl ZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1D X1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9i ZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5cGhfZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBn bHlwa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sYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0geQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxw ZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZmNfZngsIHksIGZ5LCBocG9z LCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5k L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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwor ICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBYV0lER0VUX0dMWVBIKQorICB7CisjaWZuZGVmIEhB VkVfWFdJREdFVFMKKyAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQorICAgIGlmIChtY19zdGRl cnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICAlNWQvJS01ZCAlNWQg JTRjICU2ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJWNcbiIsCisgICAg ICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRb YXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZl X3gsCisgICAgICAgICdYJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZG RVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1Ag KGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAnLScpKSwK KyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAg ICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9s aW5lX3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisgICAgICAgIGdseXBoLT5ocG9zLCBn bHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisjZW5kaWYKKyAgc3dpdGNo IChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0t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IGlmIChyZWxhdGl2ZV94IDw9 IHhfbGltaXQKKyAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICBtY19o ZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9z LCB2cG9zLAorICAgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgYmFja2dy b3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwK KyAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAo Z2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAg ICAgICAgICAmJiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICBy ZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAocmVsYXRp dmVfeCA8PSB4X2xpbWl0KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIg KHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAg YmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEhMRVNTLCBkcmF3X3AsCisg ICAgICAgICAgICAgICAgICAgICAgICAgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9uX3R5 cGUpOworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAg ICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAg WFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxh dm9yIGdseXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRl ZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1D X1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vy c29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRf cCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmln aHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGds eXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ctPnBp eGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dM WVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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LS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAg ICBGSUxMX0NPTFVNTjogIFhXSURHRVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICovCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEZJTExfQ09MVU1OOgorICAgIHsKKyAg ICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0geQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICA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cG9zKQor ICAgIHJldHVybjsKKyAgaWYgKCFyb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICByZXR1cm47Cisg IGludCBocG9zX3N0YXJ0ID0gc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICBpZiAo dHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJhd19yb3cgKCVk KTogIGRyYXdfcCAoJXMpIHwgaHBvcyAoJWQpIHwgbGVuICglZClcbiIsCisgICAgICAgICAgICAg ICAgICAgICB2cG9zLCBkcmF3X3AgPyAieSIgOiAibiIsIGhwb3Nfc3RhcnQsIGhwb3NfbGVuZ3Ro KTsKKyAgaW50IG9wb2ludF9meCwgb3BvaW50X2Z5LCBvcG9pbnRfd2QsIG9wb2ludF9oOworICBp bnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAg aW50IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOwor ICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJzb3Jfcm93ID0gKHctPmN1cnNvci52cG9zICE9IC0xKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9XIChjdXJzb3JfbWF0 cml4LCB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog TlVMTDsKKyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSAody0+Y3Vyc29yLnZwb3MgIT0g LTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19nZXRfY3Vyc29yX2dseXBo ICh3LCBjdXJzb3JfbWF0cml4LCBjdXJzb3Jfcm93LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52 cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgYm9vbCBjdXJz b3JfYXRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT5leGFjdF93aW5kb3df d2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54 ID09IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5j dXJzb3IueCA9PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7CisgIGJvb2wgY3Vyc29yX2JleW9u ZF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJF QV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFjdXJzb3Jfcm93LT5leGFj dF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5jdXJzb3IueCA+PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPmN1cnNvci54ID49IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRoKTsKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICBSRVBMQUNF IFRIRSBSRUFMIENVUlNPUgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGVudW0gZmFjZV9p ZCBiZ19mYWNlX2lkID0gKGN1cnNvcl9nbHlwaCAhPSBOVUxMKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gY3Vyc29yX2dseXBoLT5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgIHN0cnVjdCBtY19SR0IgY3Vyc29yX2JnOworICBt Y19zZXRfbHNsX2JnICh3LCBiZ19mYWNlX2lkLCAmY3Vyc29yX2JnKTsKKyAgLyogRklYTUU6ICBQ dXQgaW4gc29tZSBjb2RlIHRvIGRlZmF1bHQgdG8gTUNfSE9MTE9XX0JPWCBpZiB0aGUgdXNlciBo YXMKKyAgdW53aXR0aW5nbHkgY29tZSB1cCB3aXRoIHNvbWUgdW5hY2NlcHRhYmxlIGZvcm0gb2Yg dW5yZWNvZ25pemVkIGN1cnNvciB0eXBlLiAqLworICBMaXNwX09iamVjdCBsaXNwX3R5cGUgPSBC VkFSIChiLCBtY19yZWFsX2Zha2VfY3Vyc29yKTsKKyAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJz b3JfdHlwZSA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlw ZSAobGlzcF90eXBlKTsKKyAgaW50IGN1cnNvcl93aWR0aCA9IChDT05TUCAobGlzcF90eXBlKSkK KyAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENEUiAobGlzcF90eXBlKSkp CisgICAgICAgICAgICAgICAgICAgICA6IC0xOworICBzdHJ1Y3QgbWNfUkdCIGN1cnNvcl9mZzsK KyAgbWNfY29sb3JfcGlja2VyICh3LCBjdXJzb3JfZ2x5cGgsIGVzc2VudGlhbHMsICZjdXJzb3Jf ZmcsIC0xLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIENV UlNPUl9JTkRJQ0FUT1IpOworICBib29sIGZpbGxfY29sdW1uX3RydW1wc19wID0gKCFOSUxQIChC VkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPmN1cnNvci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmICFjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiAhY3Vyc29yX2JleW9uZF9mcmluZ2VfcCk7CisgIC8qIFdlIHVz ZSBhIHRlc3Qgc2ltaWxhciB0byB0aGUgcmVhbCBmYWtlIGN1cnNvciBzbyB0aGF0IHRoZSBmcmlu Z2UgYml0bWFwIGlzCisgIG9ubHkgZHJhd24gb25jZSBwZXIgd2luZG93LiAqLworICBpZiAodnBv cyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgJiYgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoID09 IHJvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWly cykpCisgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaG9yaXpvb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sIG1hdHJpeCwgcm93LCB3LT5jdXJz b3IueCwgJm9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRf aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1DX0JBUiwgMSwgJm9wb2ludF93ZCk7 CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNv ci54LCBvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnks IHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAg ICAgICAgICAgICAgICAgTUNfQkFSLCAxLCByb3dfcG9zaXRpb24sIGN1cnNvcl9mZywgY3Vyc29y X2JnLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBNQ19HTFlQSExFU1Ms IGRyYXdfcCwgZnJvbV93aGVyZSwgTklMUCAoQlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgICAg bWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54LCAmb3Bv aW50X2Z4LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9p bnRfZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgTUNfSEJBUiwgMSwgJm9wb2ludF93ZCk7CisgICAgICBt Y19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9p bnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHctPmN1cnNv ci5ocG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAgICAgICAg ICAgICAgTUNfSEJBUiwgMSwgcm93X3Bvc2l0aW9uLCBjdXJzb3JfZmcsIGN1cnNvcl9iZywgZXNz ZW50aWFscy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgTUNfR0xZUEgsIGRyYXdfcCwgZnJv bV93aGVyZSwgTklMUCAoQlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7 CisgICAgfQorICBlbHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYmIGN1 cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MK KyAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAm JiB3LT5jdXJzb3IuaHBvcyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAgICAm JiBjdXJzb3JfZ2x5cGgtPnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBtY19n ZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRf ZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9m eSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmb3BvaW50X3dk KTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vy c29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgIG9wb2ludF9m eSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9oLAor ICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24s IGN1cnNvcl9mZywgY3Vyc29yX2JnLAorICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2 ZV9wLCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBOSUxQ IChCVkFSIChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAg ICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICB9CisgIGVsc2Ug aWYgKCFjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoICE9IE5V TEwKKyAgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAmJiB3 LT5jdXJzb3IuaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9z IDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+ dHlwZSA9PSBTVFJFVENIX0dMWVBIKQorICAgIHsKKyAgICAgIC8qIElmIGEgdXNlciBoYXMgc2V0 IGB4LXN0cmV0Y2gtY3Vyc29yJyB0byBhIG5vbi1uaWwgdmFsdWUsIGhlL3NoZSBjaG9zZSB0bwor ICAgICAgaGF2ZSBhIGN1cnNvciB0aGF0IHNwYW5zIHRoZSBlbnRpcmUgbGVuZ3RoIG9mIHRoZSBT VFJFVENIX0dMWVBILiAqLworICAgICAgaWYgKCF4X3N0cmV0Y2hfY3Vyc29yX3ApCisgICAgICAg IHsKKyAgICAgICAgICAvKiBUaGUgTUNfSEJBUiBzaGFsbCBoYXZlIGEgYGN1cnNvcl93aWR0aGAg b2YgMS4gKi8KKyAgICAgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJv dywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdy0+Y3Vyc29yLnksICZvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsIE1DX0hC QVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF93ZCk7Cisg ICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJz b3IueCwgb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLnksIG9wb2lu dF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLAorICAgICAgICAgICAgICAgICAg ICAgb3BvaW50X3dkLCBvcG9pbnRfaCwgTUNfSEJBUiwgMSwgcm93X3Bvc2l0aW9uLCBjdXJzb3Jf ZmcsCisgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfYmcsIGVzc2VudGlhbHMuYWN0aXZlX3As IE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgICAgICBOSUxQ IChCVkFSIChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAg ICAgICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgICAg ICB9CisgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vy c29yLngsICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJz b3IueSwgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLCBjdXJzb3JfdHlwZSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgJm9wb2ludF93ZCk7CisgICAgICBt Y19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9p bnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHctPmN1cnNv ci5ocG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAgICAgICAg ICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBjdXJzb3JfZmcs IGN1cnNvcl9iZywKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZ UEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgTklMUCAoQlZBUiAoYiwg bWNfY29uZikpCisgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAg OiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqCisgICAgICAgICAgICAgICAgICAgICAgICAgIERSQVcgQU5EIFJFQ09SRCBGQUtFIENV UlNPUlMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBpZiAoIWVzc2VudGlhbHMuYWN0aXZl X3AKKyAgICAgICYmIE5JTFAgKEJWQVIgKGIsIG1jX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAg JiYgTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAmJiBOSUxQIChC VkFSIChiLCBmY19pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgcmV0dXJuOworICBpZiAoaHBvc19s ZW5ndGggPT0gMSkKKyAgICB7CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQor ICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgIHx8ICghZXNz ZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1j X2luYWN0aXZlX3dpbmRvd3MpKSkpKQorICAgICAgICB7CisgICAgICAgICAgLyogVGhlIHNwYWNl IGFwcGVuZGVkIHRvIGEgcm93IGVuZGluZyB3aXRoIGEgbmV3IGxpbmUKKyAgICAgICAgICBkb2Vz IG5vdCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDApIHRoYXQgd2UgY2FuCisgICAgICAg ICAgdXNlIGZvciB0aGlzIHBhcnRpY3VsYXIgYXBwbGljYXRpb24uICBXaGVuIHRoZXJlIGlzIGEK KyAgICAgICAgICBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IHRoYXQgYXNzaWducyBhIHZp c2libGUKKyAgICAgICAgICBnbHlwaCB0byBhIG5ldyBsaW5lLCB0aGVyZSBpcyBubyBwcm9ibGVt IGJlY2F1c2UgdGhhdAorICAgICAgICAgIGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhh dCB3ZSBjYW4gdXNlLiAgV2hlbgorICAgICAgICAgIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0 cywgd2UgdXNlIHRoZSBmb2xsb3dpbmcKKyAgICAgICAgICB0ZXN0OiAgdGhlIGFwcGVuZGVkIHNw YWNlIGhhcyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lCisgICAgICAgICAgbGVzcyB0aGFuIHRoZSBl bmQgb2YgdGhlIG1hdHJpeCByb3cuICovCisgICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgc3RydWN0IGdseXBoICpwcmV2aW91c19n bHlwaCA9ICgwIDw9IGhwb3MgLSAxICYmIGhwb3MgLSAxIDwgcm93LT51c2VkW1RFWFRfQVJFQV0p CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSArIGhwb3MgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogTlVMTDsKKyAgICAgICAgICAvLyBzdHJ1Y3QgZ2x5cGggKmxhc3RfZ2x5cGggPSBy b3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAg ICAgIGJvb2wgc2tpcF9wID0gKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBNQVRSSVhfUk9XX0VORF9D SEFSUE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICYmIHN0YXJ0LT5ieXRl cG9zICE9IGVzc2VudGlhbHMuenZfYnl0ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0 cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAvKiBXaGVuIGEgYGJ1ZmZlci1kaXNwbGF5LXRh YmxlJyBlbnRyeSBjb250YWlucworICAgICAgICAgICAgICAgICAgICAgICAgYSB2aXNpYmxlIHRh YiBjaGFyYWN0ZXIgKCLCuyIpLCB0aGUgc3Vic2VxdWVudAorICAgICAgICAgICAgICAgICAgICAg ICAgU1RSRVRDSF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgc3RhcnQtPmNoYXJwb3MKKyAgICAg ICAgICAgICAgICAgICAgICAgIGFzIHRoZSBhZm9yZW1lbnRpb25lZCB2aXNpYmxlIHRhYiBjaGFy YWN0ZXIuICovCisgICAgICAgICAgICAgICAgICAgICAgICA6IChwcmV2aW91c19nbHlwaCAhPSBO VUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBv cyA9PSBzdGFydC0+Y2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisg ICAgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlOworICAgICAgICAgIGludCBwb3NpbnQgPSAo cm93X3Bvc2l0aW9uID09IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyAtMQor ICAgICAgICAgICAgICAgICAgICAgICA6IChyb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAg ICA6IChzdGFydC0+Ynl0ZXBvcyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNl ZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9ST1df RU5EX0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgIDogKHN0YXJ0LT5i eXRlcG9zID09IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRfQVJFQV0g LSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAg ICAgICAgICAgICAgICA6IHN0YXJ0LT5jaGFycG9zOworICAgICAgICAgIExpc3BfT2JqZWN0IHNw ZWNzID0gbWNfYXNzb2MgKG1ha2VfZml4bnVtIChwb3NpbnQpLCBCVkFSIChiLCBtY19jb25mKSk7 CisgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAg ICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAm JiAhTklMUCAoc3BlY3MpCisgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9i b3R0b21feSAodykKKyAgICAgICAgICAgICAgJiYgIXNraXBfcAorICAgICAgICAgICAgICAmJiBy b3dfcG9zaXRpb24gIT0gUE9TVF9aVikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgTGlz cF9PYmplY3QgbGlzcF90eXBlID0gbWNfbnRoICgxLCBzcGVjcyk7CisgICAgICAgICAgICAgIGVu dW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUgPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9f Y3Vyc29yX3R5cGUgKFhDQVIgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlw ZSk7CisgICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gKHN0YXJ0LT50eXBlID09IElNQUdFX0dM WVBIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yX3R5cGU7CisgICAgICAgICAgICAgIGludCBj dXJzb3Jfd2lkdGggPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IFhGSVhOVU0gKFhDQVIgKFhDRFIgKGxpc3BfdHlwZSkpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAtMTsKKyAgICAgICAgICAgICAgTGlzcF9PYmplY3Qg bWNfZm9yZWdyb3VuZCA9IG1jX250aCAoMiwgc3BlY3MpOworICAgICAgICAgICAgICBzdHJ1Y3Qg bWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICAgICAgaWYgKFNUUklOR1AgKG1jX2ZvcmVncm91bmQp KQorICAgICAgICAgICAgICAgIG1jX3h3X2NvbG9yX3ZhbHVlcyAodywgbWNfZm9yZWdyb3VuZCwg JmxzbF9mZyk7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoVkVDVE9SUCAobWNfZm9yZWdyb3Vu ZCkpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5yZWQg PSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMCkpOworICAgICAgICAgICAgICAg ICAgICBsc2xfZmcuZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMSkp OworICAgICAgICAgICAgICAgICAgICBsc2xfZmcuYmx1ZSA9IFhGTE9BVF9EQVRBIChBUkVGICht Y19mb3JlZ3JvdW5kLCAyKSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg ICBlbHNlIGlmIChOSUxQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgbWNf Y29sb3JfcGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgcG9zaW50LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCByb3dfcG9zaXRp b24sIE1VTFRJUExFX0NVUlNPUlMpOworICAgICAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9S T1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHdpbmRv d19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywg bWF0cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sIHZwb3Ms IGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgY3Vy c29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAgICAgICAg ICAgICAgIGxzbF9mZywgTVVMVElQTEVfQ1VSU09SUywgZHJhd19wLCBmcm9tX3doZXJlLCBNQ19D QUNIRSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmICghTklMUCAoQlZBUiAo YiwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAg ICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoYiwgZmNfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAmJiBlc3Nl bnRpYWxzLmZjX3ggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgJiYgZXNzZW50aWFscy5m Y194ID49IHctPm1jLmxudW1fcGl4ZWxfd2lkdGgpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQg eF9saW1pdCA9IHggKyBzdGFydC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgYm9vbCByZWFsX2Zh a2VfY3Vyc29yX3AgPSAody0+Y3Vyc29yLnggPT0gZXNzZW50aWFscy5mY194CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gc3Rh cnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLnZwb3MgPT0gdnBvcyk7CisgICAgICAgICAgc3RydWN0IG1j X1JHQiBsc2xfZmc7CisgICAgICAgICAgbWNfY29sb3JfcGlja2VyICh3LCBzdGFydCwgZXNzZW50 aWFscywgJmxzbF9mZywgLTEsIE1DX0JBUiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJv d19wb3NpdGlvbiwgRklMTF9DT0xVTU4pOworICAgICAgICAgIGlmICh4ICsgc3RhcnQtPnBpeGVs X3dpZHRoIDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAmJiAoKGhlYWRlcl9saW5l X2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGlu ZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgJiYgKChzdGFydCAhPSByb3ctPmdseXBoc1tU RVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAg JiYgZXNzZW50aWFscy5mY194ID49IHgKKyAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxz LmZjX3ggPCB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgfHwgKHN0 YXJ0ID09IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEK KyAgICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0geCkpCisgICAgICAg ICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAg ICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0 cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAg ICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBNQ19C QVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwgbHNsX2ZnLAorICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NPTFVN TiwgZHJhd19wLCBmcm9tX3doZXJlLCBGQ19DQUNIRSk7CisgICAgICAgIH0KKyAgICAgIGlmICgh TklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIs IGNoX2hvcml6b250YWxfcnVsZXIpKQorICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9w CisgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAg JiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgeworICAgICAgICAgIGludCB4X2xp bWl0ID0gKHN0YXJ0ID09IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9B UkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICA/IHRleHRfYXJlYV93aWR0aAorICAg ICAgICAgICAgICAgICAgICAgICAgOiB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoOworICAgICAgICAg IHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgc3Rh cnQsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19IQkFSLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgcm93X3Bvc2l0aW9uLCBIT1JJWk9OVEFMX1JVTEVSKTsKKyAgICAgICAgICAvKiBQ cmVzZXJ2ZSBzdXBwb3J0IGZvciBkZWZhdWx0IGJlaGF2aW9yIHN1Y2ggdGhhdCBhIHVzZXIgbWF5 CisgICAgICAgICAgc3BlY2lmeSB0aGUgaGVpZ2h0IG9mIGFuIE1DX0hCQVIsIHdoaWNoIGJlZ2lu cyBpdHMgam91cm5leQorICAgICAgICAgIGFzIHRoZSBgY3Vyc29yX3dpZHRoJy4gIGBtY19nZXRf Y3Vyc29yX2dlb21ldHJ5JyByZWFkanVzdHMuICovCisgICAgICAgICAgbWNfZW5naW5lICh3LCBt YXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9saW1pdCwgcm93LT55LAorICAgICAg ICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBNQ19I QkFSLCAxLAorICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywg cm93X3Bvc2l0aW9uLCBsc2xfZmcsCisgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JV TEVSLCBkcmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgfQorICAgICAgaWYg KCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAmJiAhTklMUCAoQlZBUiAo YiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9w CisgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAg JiYgIWZpbGxfY29sdW1uX3RydW1wc19wKQorICAgICAgICB7CisgICAgICAgICAgY3Vyc29yX3R5 cGUgPSAoc3RhcnQtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAg ICA/IE1DX0hPTExPV19CT1gKKyAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfQkFSOworICAg ICAgICAgIGludCB4X2xpbWl0ID0gd2luZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAg ICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueSA9PSByb3ctPnkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9 PSB2cG9zKTsKKyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICBtY19j b2xvcl9waWNrZXIgKHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgY3Vyc29yX3R5 cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIFZFUlRJQ0FMX1JV TEVSKTsKKyAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAw KQorICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAg ICAgICYmICgoc3RhcnQgIT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNlZFtURVhU X0FSRUFdIC0gMQorICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHgKKyAgICAg ICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA8IHggKyBzdGFydC0+cGl4ZWxfd2lkdGgpCisg ICAgICAgICAgICAgICAgICB8fCAoc3RhcnQgPT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJv dy0+dXNlZFtURVhUX0FSRUFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNv ci54ID49IHgpKQorICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9t X3kgKHcpCisgICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAg ICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0 LCByb3ctPnksCisgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSwgdnBvcywgY3Vyc29yX3R5cGUsIDEsCisgICAgICAgICAgICAgICAgICAgICAgIGN1 cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLAorICAgICAgICAg ICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUiwgZHJhd19wLCBmcm9tX3doZXJlLCBDSF9DQUNI RSk7CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZQorICAgICAgeworICAgICAgICBpbnQgcmVs YXRpdmVfeCA9IDA7CisgICAgICAgIGZvciAoaW50IGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBh cmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0 IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgICAgc3RydWN0IGds eXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAgIC8q IEdseXBoIGZvciBhIGxpbmUgZW5kIGluIHRleHQuICovCisgICAgICAgICAgICBpZiAoYXJlYSA9 PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkK KyAgICAgICAgICAgICAgKytnbHlwaF9lbmQ7CisgICAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBn bHlwaF9lbmQ7ICsrZ2x5cGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAo dnBvcyAhPSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCAhPSBn bHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHJl bGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPCByZWxhdGl2ZV94 CisgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKSkKKyAgICAg ICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGlmICghTklMUCAoQlZBUiAoYiwg bWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgICA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XNlZFtU RVhUX0FSRUFdKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgaHBvcyAtIDEKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgICAgICAgICAg ICAgICAgICAgLy8gc3RydWN0IGdseXBoICpsYXN0X2dseXBoID0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSArIHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsKKyAgICAgICAgICAgICAgICAgICAgYm9v bCBza2lwX3AgPSAocHJldmlvdXNfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBNQVRSSVhfUk9XX0VO RF9DSEFSUE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBnbHlwaC0+Ynl0ZXBvcyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAvKiBXaGVuIGEgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeSBjb250YWlucworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEgdmlzaWJsZSB0YWIgY2hhcmFjdGVyICgi wrsiKSwgdGhlIHN1YnNlcXVlbnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBT VFJFVENIX0dMWVBIIHdpbGwgaGF2ZSB0aGUgc2FtZSBnbHlwaC0+Y2hhcnBvcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGFzIHRoZSBhZm9yZW1lbnRpb25lZCB2aXNpYmxlIHRh YiBjaGFyYWN0ZXIuICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAocHJl dmlvdXNfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHByZXZpb3VzX2dseXBoLT5jaGFycG9zID09IGdseXBoLT5jaGFycG9zKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgaW50IHBvc2ludCA9IChy b3dfcG9zaXRpb24gPT0gUE9TVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyAtMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAocm93X3Bvc2l0aW9u ID09IEFUX1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBlc3NlbnRp YWxzLnp2CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaC0+Ynl0ZXBv cyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbVEVYVF9B UkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JP V19FTkRfQ0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGdseXBoLT5ieXRlcG9zID09IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09 IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBlc3NlbnRpYWxzLnp2CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IGdseXBoLT5jaGFycG9zOworICAgICAgICAgICAgICAgICAgICBMaXNwX09iamVjdCBzcGVjcyA9 IG1jX2Fzc29jIChtYWtlX2ZpeG51bSAocG9zaW50KSwgQlZBUiAoYiwgbWNfY29uZikpOworICAg ICAgICAgICAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAw KQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQor ICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKHNwZWNzKQorICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAg ICAgICAgICAgICAgICAgJiYgIXNraXBfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93 X3Bvc2l0aW9uICE9IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICAgICAgTGlzcF9PYmplY3QgbGlzcF90eXBlID0gbWNfbnRoICgxLCBzcGVjcyk7 CisgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBl ID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAo bGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgICAg ICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IChnbHlwaC0+dHlwZSA9PSBJTUFHRV9H TFlQSCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19IT0xMT1df Qk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yX3R5cGU7 CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoID0gKENPTlNQIChsaXNw X3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gWEZJ WE5VTSAoWENBUiAoWENEUiAobGlzcF90eXBlKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAtMTsKKyAgICAgICAgICAgICAgICAgICAgICAgIExpc3BfT2Jq ZWN0IG1jX2ZvcmVncm91bmQgPSBtY19udGggKDIsIHNwZWNzKTsKKyAgICAgICAgICAgICAgICAg ICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICAgICAgICAgICAgaWYg KFNUUklOR1AgKG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICBtY194 d19jb2xvcl92YWx1ZXMgKHcsIG1jX2ZvcmVncm91bmQsICZsc2xfZmcpOworICAgICAgICAgICAg ICAgICAgICAgICAgICBlbHNlIGlmIChWRUNUT1JQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsc2xf ZmcucmVkID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDApKTsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5ncmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGICht Y19mb3JlZ3JvdW5kLCAxKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsc2xfZmcu Ymx1ZSA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAyKSk7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYg KE5JTFAgKG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNf Y29sb3JfcGlja2VyICh3LCBnbHlwaCwgZXNzZW50aWFscywgJmxzbF9mZywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaW50LCBjdXJzb3JfdHlwZSwg cm93X3Bvc2l0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBNVUxUSVBMRV9DVVJTT1JTKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9z ID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAg ICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwg cmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeF9saW1pdCwg cm93LT55LCBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGN1cnNv cl9tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwgbHNsX2ZnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBNVUxUSVBMRV9DVVJTT1JTLCBkcmF3X3AsIGZyb21fd2hlcmUsIE1DX0NBQ0hFKTsKKyAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg aWYgKCFOSUxQIChCVkFSIChiLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgJiYg KGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50 aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFS IChiLCBmY19pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICAgICAmJiBlc3Nl bnRpYWxzLmZjX3ggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICYmIGVz c2VudGlhbHMuZmNfeCA+PSB3LT5tYy5sbnVtX3BpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGgg KHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNv cl9wID0gKHctPmN1cnNvci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueSA9PSByb3ctPnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29y Lmhwb3MgPT0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3Mp OworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAg ICAgICAgICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZs c2xfZmcsIC0xLCBNQ19CQVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg cm93X3Bvc2l0aW9uLCBGSUxMX0NPTFVNTik7CisgICAgICAgICAgICAgICAgICAgIGlmIChocG9z ID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBocG9zX3N0 YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIHJlbGF0aXZlX3gg KyBnbHlwaC0+cGl4ZWxfd2lkdGggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAg ICAgICAgICAmJiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAg ICAgICAgICAgICAgICAgICAmJiAoKGdseXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHJlbGF0aXZlX3gKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194IDwgcmVsYXRpdmVfeCAr IGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAoZ2x5 cGggPT0gZ2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBl c3NlbnRpYWxzLmZjX3ggPj0gcmVsYXRpdmVfeCkpCisgICAgICAgICAgICAgICAgICAgICAgICAm JiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAg ICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICAgIG1jX2Vu Z2luZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0LAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBNQ19C QVIsIDEsIGN1cnNvcl9tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBl c3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywgRklMTF9DT0xVTU4sCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIEZDX0NBQ0hFKTsKKyAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGNy b3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaG9y aXpvbnRhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2 ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVf d2luZG93cykpKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBv cykKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IHhfbGltaXQg PSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworICAgICAgICAgICAgICAgICAgICBp bnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICAgICAg ICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgICAgICAgIG1jX2NvbG9y X3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19IQkFSLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgSE9SSVpPTlRB TF9SVUxFUik7CisgICAgICAgICAgICAgICAgICAgIC8qIFByZXNlcnZlIHN1cHBvcnQgZm9yIGRl ZmF1bHQgYmVoYXZpb3Igc3VjaCB0aGF0IGEgdXNlciBtYXkKKyAgICAgICAgICAgICAgICAgICAg c3BlY2lmeSB0aGUgaGVpZ2h0IG9mIGFuIE1DX0hCQVIsIHdoaWNoIGJlZ2lucyBpdHMgam91cm5l eQorICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYGN1cnNvcl93aWR0aCcuICBgbWNfZ2V0X2N1 cnNvcl9nZW9tZXRyeScgcmVhZGp1c3RzLiAqLworICAgICAgICAgICAgICAgICAgICBpZiAoaHBv cyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zIDwgaHBvc19z dGFydCArIGhwb3NfbGVuZ3RoKQorICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywg bWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBNQ19IQkFSLCAxLCBj dXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFs cywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsIEhPUklaT05UQUxfUlVMRVIsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGNyb3Nz aGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGlj YWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRv d3MpKSkpCisgICAgICAgICAgICAgICAgICAgICYmICFmaWxsX2NvbHVtbl90cnVtcHNfcCkKKyAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoZ2x5 cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBN Q19CQVI7CisgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gd2luZG93X2JveF93aWR0 aCAodywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCByZWFsX2Zha2VfY3Vy c29yX3AgPSAody0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAg ICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsK KyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAg ICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0x LCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3df 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 c2VkKTsKK30KKworYm9vbAorbWNfcmVkcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAg ICAgICBlbnVtIGdseXBoX3Jvd19hcmVhIGFyZWEsIGludCBzdGFydF94LCBpbnQgc3RhcnRfaHBv cywgaW50IGVuZF9ocG9zLAorICAgICAgICAgICAgICAgYm9vbCBjbGVhcl9lb2xfcCwgZW51bSBk cmF3X2dseXBoc19mYWNlIGhsLAorICAgICAgICAgICAgICAgZW51bSBtY19yZWRyYXdfcm93X3R5 cGUgZnJvbV93aGVyZSkKK3sKKyAgYm9vbCBnb19wID0gKCh3LT5tY19tYXRyaXguY3Vyc29yc191 c2VkW01DX0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICB8fCB3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19zdGFydCA9IGNsb2NrKCk7 CisgIGludCB2bnRoID0gTUFUUklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgIC8qIFNUUkVU Q0hfR0xZUEggbWF5IGNvbnRhaW4gbW9yZSB0aGFuIG9uZSBmYWtlIGN1cnNvciBhdCB0aGUgc2Ft ZSBIUE9TLiAqLworICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FD SEU7CisgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkK KyAgICB7CisgICAgICBmb3IgKGludCBudGggPSAwOworICAgICAgICAgICBtY190cmF2ZXJzZV9j YWNoZV9wICh3LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAgICAg ICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHggPSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLng7CisgICAgICAgICAgaW50IGZ4ID0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meDsKKyAgICAgICAgICBp bnQgeSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueTsK KyAgICAgICAgICBpbnQgZnkgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmZ5OworICAgICAgICAgIGludCBocG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5ocG9zOworICAgICAgICAgIGludCB2cG9zID0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS52cG9zOworICAgICAg ICAgIGludCB3ZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0ud2Q7CisgICAgICAgICAgaW50IGggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhdLmg7CisgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3Jf dHlwZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vy c29yX3R5cGU7CisgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCA9IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0 cnVjdCBtY19SR0IgbHNsX2ZnID0gey5yZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLmZnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmZnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlfTsK KyAgICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAgICAgICAgIC8v ICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdyZWVuLAorICAgICAgICAgIC8vICAgICAgICAg ICAgICAgICAgICAgICAgICAuYmx1ZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAgICAgICAgYm9vbCBhY3RpdmVfcCA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYWN0aXZlX3A7CisgICAg ICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgYm9vbCBl bmFibGVkX3AgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmVuYWJsZWRfcDsKKyAgICAgICAgICBpZiAodnBvcyA9PSB2bnRoCisgICAgICAgICAgICAgICYm ICgoaHBvcyA+PSBzdGFydF9ocG9zCisgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA8IGVuZF9o cG9zKQorICAgICAgICAgICAgICAgICAgLyogQSBmbG9hdGluZyBjdXJzb3IgYmV5b25kIHRoZSBl bmQgb2YgdGhlIGdseXBoIHJvdy4gKi8KKyAgICAgICAgICAgICAgICAgIHx8IChocG9zICsgMSA9 PSBzdGFydF9ocG9zCisgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyArIDEgPT0gZW5kX2hw b3MpKQorICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIGJvb2wgcmVtb3ZlX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgbWNfZHJhd19lcmFz ZV9oeWJyaWQgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBo LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNv cl93aWR0aCwgbHNsX2ZnLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICAgICAgICAgICAgfQorICAgICAgICB9 CisgICAgfQorICByZXR1cm4gdHJ1ZTsKKyAgLy8gIGNsb2NrX2VuZCA9IGNsb2NrKCk7CisgIC8v ICBkb3VibGUgdGltZV9jdXJzb3JzID0gKChkb3VibGUpIChjbG9ja19lbmQgLSBjbG9ja19zdGFy dCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJtY19yZWRyYXdf cm93ICglZCk6ICBocG9zICglZC8lZCkgfCBnbHlwaHMgKCVmKSB8IGN1cnNvcnMgKCVmKVxuIiwK KyAgLy8gICAgICAgICAgICAgICAgICAgdnBvcywgc3RhcnRfaHBvcywgZW5kX2hwb3MsIHRpbWVf Z2x5cGhzLCB0aW1lX2N1cnNvcnMpOworfQorCit2b2lkCittY19lcmFzZV9yb3cgKHN0cnVjdCB3 aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAq cm93KQoreworICBpbnQgdm50aCA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICBp ZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2Vfcm93 ICglcyk6ICB2cG9zICglZClcbiIsIG1jX3dpbmRvdyAodyksIHZudGgpOworICAvLyAgaWYgKHRy YWNlX3JlZGlzcGxheV9wKQorICAvLyAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9oZWxw ZXIgKCVzKTogIGNhY2hlICglcykgfCB2cG9zICglZClcbiIsCisgIC8vICAgICAgbWNfd2luZG93 ICh3KSwgbWNfY2FjaGVfdHlwZV90b19zdHJpbmcgKGNhY2hlX3R5cGUpLCB2bnRoKTsKKyAgZm9y IChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAgIGNhY2hl X3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAgeworICAgICAgZm9y IChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAody0+bWNfbWF0 cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGgpOworICAgICAgICAgICArK250aCkKKyAgICAgICAg eworICAgICAgICAgIGludCB4ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXS54OworICAgICAgICAgIGludCBmeCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZng7CisgICAgICAgICAgaW50IHkgPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnk7CisgICAgICAgICAgaW50IGZ5 ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meTsKKyAg ICAgICAgICBpbnQgaHBvcyA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uaHBvczsKKyAgICAgICAgICBpbnQgdnBvcyA9IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0udnBvczsKKyAgICAgICAgICBpbnQgd2QgPSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLndkOworICAgICAgICAg IGludCBoID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5o OworICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUgPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmN1cnNvcl90eXBlOworICAgICAg ICAgIGludCBjdXJzb3Jfd2lkdGggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBs c2xfZmcgPSB7LnJlZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uZmcucmVkLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3Jl ZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmdy ZWVuLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcuYmx1ZX07CisgICAg ICAgICAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIC5ncmVlbiA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF0uYmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg LmJsdWUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJn LmJsdWV9OworICAgICAgICAgIGJvb2wgYWN0aXZlX3AgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmFjdGl2ZV9wOworICAgICAgICAgIGVudW0gbWNfZmxh dm9yIGdseXBoX2ZsYXZvciA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAg ICAgICAgLyogYG1hdHJpeF9yb3cnIGluIGBkaXNwbmV3LmNgIGNvbnRhaW5zIHRoZSBmb2xsb3dp bmcgdGVzdHMsCisgICAgICAgICAgZWFzc2VydCAobWF0cml4ICYmIG1hdHJpeC0+cm93cyk7Cisg ICAgICAgICAgZWFzc2VydCAocm93ID49IDAgJiYgcm93IDwgbWF0cml4LT5ucm93cyk7ICovCisg ICAgICAgICAgYm9vbCBiYXJmX2NyYXNoX29uZSA9IChtYXRyaXggJiYgbWF0cml4LT5yb3dzKSA/ IGZhbHNlIDogdHJ1ZTsKKyAgICAgICAgICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgICAgICAg ICBjb250aW51ZTsKKyAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZwb3MgPj0gMCAm JiB2cG9zIDwgbWF0cml4LT5ucm93cykgPyBmYWxzZSA6IHRydWU7CisgICAgICAgICAgaWYgKGJh cmZfY3Jhc2hfdHdvKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgaWYgKHZwb3Mg PT0gdm50aAorICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAg ICAgICAgICAgJiYgZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19l cmFzZV9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCB5LCBocG9zLCB2cG9zLCBnbHlwaF9mbGF2 b3IsIGN1cnNvcl90eXBlLCB3ZCk7CisgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9wID0gZmFsc2U7CisgICAgICAgICAg ICAgIC0tdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICAgIGVsc2UgaWYgKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAgICAg ICAgJiYgZW5hYmxlZF9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYm9vbCBy ZW1vdmVfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcs IG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBs c2xfYmcsIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBn bHlwaF9mbGF2b3IsIHJlbW92ZV9wKTsKKyAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcCA9IGZhbHNlOworICAgICAg ICAgICAgICAgIC0tdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAg ICAgICAgICAgfQorICAgICAgICB9CisgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZV91c2VkW2NhY2hlX3R5cGVdID0gMDsKKyAgICB9Cit9CisKKy8qIEVyYXNlIGZha2UgY3Vyc29y cyBmcm9tIChtaW4sIHJ1bi5jdXJyZW50X3ksIHJ1bi5kZXNpcmVkX3kpIHRvIGVuZCBvZiB3aW5k b3cuCisgIFRSWV9XSU5ET1dfUkVVU0lOR19DV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ICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA+IDApOwor ICBib29sIGdvX3R3b19wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAg ICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkK KyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkpOworICBpZiAodHJhY2VfcmVkaXNw bGF5X3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfcHJlX3Njcm9sbF9jbGVhbiAoJXMpOlxu XAorICAlcyB8IGdvX29uZV9wICglcykgfCBnb190d29fcCAoJXMpXG5cCisgIHN0YXJ0X3Zwb3Mg KCVkKSB8IG5yb3dzX3Njcm9sbGVkICglZClcblwKKyAgJXM6ICBydW4uY3VycmVudC9kZXNpcmVk X3kgKCVkLyVkKSB8IHJ1bi5oZWlnaHQgKCVkKVxuIiwKKyAgICBtY193aW5kb3cgKHcpLCAoZnJv bV93aGVyZSA9PSBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTikKKyAgICAg ICAgICAgICAgICAgICAgID8gIlRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9ET1dO IgorICAgICAgICAgICAgICAgICAgIDogKGZyb21fd2hlcmUgPT0gVFJZX1dJTkRPV19SRVVTSU5H X0NVUlJFTlRfTUFUUklYX1VQKQorICAgICAgICAgICAgICAgICAgICAgPyAiVFJZX1dJTkRPV19S RVVTSU5HX0NVUlJFTlRfTUFUUklYX1VQIgorICAgICAgICAgICAgICAgICAgIDogKGZyb21fd2hl cmUgPT0gVFJZX1dJTkRPV19JRCkKKyAgICAgICAgICAgICAgICAgICAgID8gIlRSWV9XSU5ET1df SUQiCisgICAgICAgICAgICAgICAgICAgOiAiVU5LTk9XTiIsCisgICAgZ29fb25lX3AgPyAieWVz IiA6ICJubyIsIGdvX3R3b19wID8gInllcyIgOiAibm8iLAorICAgIHN0YXJ0X3Zwb3MsIG5yb3dz X3Njcm9sbGVkLAorICAgIHJ1bi5jdXJyZW50X3kgPCBydW4uZGVzaXJlZF95ID8gIuKGkyIgOiAi 4oaRIiwKKyAgICBydW4uY3VycmVudF95LCBydW4uZGVzaXJlZF95LCBydW4uaGVpZ2h0KTsKKyAg aWYgKCFnb19vbmVfcCAmJiAhZ29fdHdvX3ApCisgICAgcmV0dXJuOworICBib29sIHVwZGF0aW5n X2ZyYW1lX3AgPSBmYWxzZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7 CisgIGlmIChYRlJBTUUgKHctPmZyYW1lKSAhPSBmLT5tY191cGRhdGluZ19mcmFtZQorICAgICAg JiYgKGdvX29uZV9wIHx8IGdvX3R3b19wKSkKKyAgICB7CisgICAgICB1cGRhdGluZ19mcmFtZV9w ID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CisgICAgfQorICBpZiAody0+cGh5c19j dXJzb3Jfb25fcAorICAgICAgJiYgZ29fdHdvX3ApCisgICAgZXJhc2VfcGh5c19jdXJzb3IgKHcp OworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAg Zm9yIChpbnQgdm50aCA9IHN0YXJ0X3Zwb3M7CisgICAgICAgbWF0cml4ICE9IE5VTEwKKyAgICAg ICAmJiB2bnRoIDwgbWF0cml4LT5ucm93cworICAgICAgICYmIE1BVFJJWF9ST1cgKG1hdHJpeCwg dm50aCktPmVuYWJsZWRfcAorICAgICAgICYmIGdvX29uZV9wOworICAgICAgICsrdm50aCkKKyAg ICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIHZu dGgpOworICAgICAgbWNfZXJhc2Vfcm93ICh3LCBtYXRyaXgsIHJvdyk7CisgICAgfQorICBpZiAo dXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChmKTsKKyAgLy8gbWNfcmVzZXRfY2Fj aGUgKHcpOworfQorCitERUZVTiAoIm1jLXN0ZGVyciIsIEZtY19zdGRlcnIsIFNtY19zdGRlcnIs IDAsIDEsICJQIiwKKyAgICAgICBkb2M6IC8qIFRvZ2dsZSB0cmFjaW5nIG9mIG11bHRpcGxlIGZh a2UgY3Vyc29ycy4KK1dpdGggQVJHLCB0dXJuIHRyYWNpbmcgb24gaWYgYW5kIG9ubHkgaWYgQVJH IGlzIHBvc2l0aXZlLiAqLykKKyAgKExpc3BfT2JqZWN0IGFyZykKK3sKKyAgaWYgKE5JTFAgKGFy ZykpCisgICAgbWNfc3RkZXJyX3AgPSAhbWNfc3RkZXJyX3A7CisgIGVsc2UKKyAgICB7CisgICAg ICBhcmcgPSBGcHJlZml4X251bWVyaWNfdmFsdWUgKGFyZyk7CisgICAgICBtY19zdGRlcnJfcCA9 IFhGSVhOVU0gKGFyZykgPiAwOworICAgIH0KKyAgcmV0dXJuIFFuaWw7Cit9CisKKy8qIGVuZCBN VUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAMCiAvKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKIAkJICAgICAgV2luZG93IGRpc3BsYXkgZGltZW5zaW9ucwpAQCAtMTM1MTEs NiArMTgzNDcsNjkgQEAgaHNjcm9sbF93aW5kb3dfdHJlZSAoTGlz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jhc2hfb25lKQorICAgIHJldHVybiBoc2Nyb2xs ZWRfcDsKKworICAvKiBgcmVzZWF0XzEnOiAgQ0hBUlBPUyAocG9zKSA+PSBCRUdWICYmIENIQVJQ T1MgKHBvcykgPD0gWlYgKi8KKyAgYm9vbCBiYXJmX2NyYXNoX3R3byA9IChjaGFycG9zID49IEJF R1YgJiYgY2hhcnBvcyA8PSBaVikKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisg ICAgICAgICAgICAgICAgICAgICAgICAgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF90d28pCisg ICAgcmV0dXJuIGhzY3JvbGxlZF9wOworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIC8qIE1vdmUgaXRlcmF0b3IgdG8gcHQg c3RhcnRpbmcgYXQgY3Vyc29yX3Jvdy0+c3RhcnQgaW4KIAkJIGEgbGluZSB3aXRoIGluZmluaXRl IHdpZHRoLiAgKi8KIAkgICAgICBpbml0X3RvX3Jvd19zdGFydCAoJml0LCB3LCBjdXJzb3Jfcm93 KTsKQEAgLTE0Mzk3LDkgKzE5Mjk2LDIyIEBAIHJlZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKIAkg ICAgICAqdy0+ZGVzaXJlZF9tYXRyaXgtPm1ldGhvZCA9IDA7CiAJICAgICAgZGVidWdfbWV0aG9k X2FkZCAodywgIm9wdGltaXphdGlvbiAxIik7CiAjZW5kaWYKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogI2lmZGVmIEhBVkVfV0lORE9XX1NZ U1RFTQorICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgbWNfdXBkYXRlX3dpbmRv d19mcmluZ2VzICh3LCBmYWxzZSk7CisgICAgZWxzZQogCSAgICAgIHVwZGF0ZV93aW5kb3dfZnJp bmdlcyAodywgZmFsc2UpOwogI2VuZGlmCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAkgICAgICBnb3RvIHVwZGF0ZTsKIAkgICAgfQogCSAgZWxzZQpAQCAtMTc3OTIsMTAgKzIyNzA0 LDIyIEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3BfT2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3Ro aXNfb25lX3ApCiAgICAgfQogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgYm9vbCBrZWVw X2N1cnJlbnRfcCA9IChqdXN0X3RoaXNfb25lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICB8 fCAoIXVzZWRfY3VycmVudF9tYXRyaXhfcCAmJiAhb3ZlcmxheV9hcnJvd19zZWVuKQorICAgICAg ICAgICAgICAgICAgICAgICAgIHx8IHctPnBzZXVkb193aW5kb3dfcCk7CisKKyAgYm9vbCBmcmlu Z2VzX3VwZGF0ZWRfcCA9IChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX3VwZGF0ZV93aW5kb3dfZnJp bmdlcyAodywga2VlcF9jdXJyZW50X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVw ZGF0ZV93aW5kb3dfZnJpbmdlcyAodywga2VlcF9jdXJyZW50X3ApOworCiAgIGlmIChGUkFNRV9X SU5ET1dfUCAoZikKLSAgICAgICYmIHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgKGp1c3RfdGhp c19vbmVfcAotCQkJCSAgICB8fCAoIXVzZWRfY3VycmVudF9tYXRyaXhfcCAmJiAhb3ZlcmxheV9h cnJvd19zZWVuKQotCQkJCSAgICB8fCB3LT5wc2V1ZG9fd2luZG93X3ApKSkKKyAgICAgICYmIGZy aW5nZXNfdXBkYXRlZF9wKQogICAgIHsKICAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CiAgICAgICBi bG9ja19pbnB1dCAoKTsKQEAgLTE3ODEwLDYgKzIyNzM0LDkgQEAgcmVkaXNwbGF5X3dpbmRvdyAo TGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3RfdGhpc19vbmVfcCkKICAgICAgIHVwZGF0ZV9l bmQgKGYpOwogICAgIH0KIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBpZiAoV0lO RE9XX0JPVFRPTV9ESVZJREVSX1dJRFRIICh3KSkKICAgICBndWlfZHJhd19ib3R0b21fZGl2aWRl ciAodyk7CiAjZW5kaWYgLyogSEFWRV9XSU5ET1dfU1lTVEVNICovCkBAIC0xODEyNSw2ICsyMzA1 MiwxNiBAQCB0cnlfd2luZG93X3JldXNpbmdfY3VycmVudF9tYXRyaXggKHN0cnVjdCB3aW5kb3cg KncpCiAJICAgICAgdXBkYXRlX2JlZ2luIChmKTsKIAkgICAgICBndWlfdXBkYXRlX3dpbmRvd19i ZWdpbiAodyk7CiAJICAgICAgRlJBTUVfUklGIChmKS0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2Ug KHcpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCisgICAgbWNfcHJlX3Njcm9sbF9jbGVhbiAodywgcnVuLCBzdGFydF92cG9zLCBucm93c19z Y3JvbGxlZCwgVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX0RPV04pOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgICAgRlJBTUVfUklGIChmKS0+c2Nyb2xsX3J1 bl9ob29rICh3LCAmcnVuKTsKIAkgICAgICBndWlfdXBkYXRlX3dpbmRvd19lbmQgKHcsIGZhbHNl LCBmYWxzZSk7CiAJICAgICAgdXBkYXRlX2VuZCAoZik7CkBAIC0xODI5MSw2ICsyMzIyOCwxNiBA QCB0cnlfd2luZG93X3JldXNpbmdfY3VycmVudF9tYXRyaXggKHN0cnVjdCB3aW5kb3cgKncpCiAJ ICB1cGRhdGVfYmVnaW4gKGYpOwogCSAgZ3VpX3VwZGF0ZV93aW5kb3dfYmVnaW4gKHcpOwogCSAg RlJBTUVfUklGIChmKS0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2UgKHcpOworCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgbWNfcHJlX3Nj cm9sbF9jbGVhbiAodywgcnVuLCBzdGFydF92cG9zLCBucm93c19zY3JvbGxlZCwgVFJZX1dJTkRP V19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX1VQKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogCSAgRlJBTUVfUklGIChmKS0+c2Nyb2xsX3J1bl9ob29rICh3LCAmcnVuKTsKIAkgIGd1 aV91cGRhdGVfd2luZG93X2VuZCAodywgZmFsc2UsIGZhbHNlKTsKIAkgIHVwZGF0ZV9lbmQgKGYp OwpAQCAtMTkyNDUsNiArMjQxOTIsMTYgQEAgdHJ5X3dpbmRvd19pZCAoc3RydWN0IHdpbmRvdyAq dykKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KIAkgIGd1aV91cGRhdGVfd2luZG93X2JlZ2lu ICh3KTsKIAkgIEZSQU1FX1JJRiAoZiktPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAg IG1jX3ByZV9zY3JvbGxfY2xlYW4gKHcsIHJ1biwgZmlyc3RfdW5jaGFuZ2VkX2F0X2VuZF92cG9z LCBkdnBvcywgVFJZX1dJTkRPV19JRCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAkgIEZSQU1FX1JJRiAoZiktPnNjcm9sbF9ydW5faG9vayAodywgJnJ1bik7CiAJICBndWlfdXBk YXRlX3dpbmRvd19lbmQgKHcsIGZhbHNlLCBmYWxzZSk7CiAjZW5kaWYKQEAgLTIxNTI4LDYgKzI2 NDg1LDE3IEBAIG1heWJlX3Byb2R1Y2VfbGluZV9udW1iZXIgKHN0cnVjdCBpdCAqaXQpCiAgICAg ICBTRVRfVEVYVF9QT1MgKHRlbV9pdC5wb3NpdGlvbiwgLTEsIC0xKTsKICAgICAgIFBST0RVQ0Vf R0xZUEhTICgmdGVtX2l0KTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFLUNVUlNPUlMgKi8KKworICAgICAgLyogVGhpcyBwZXJtaXRzIHVzIHRvIGluc3BlY3QgdGhl IEhQT1Mgb2YgbGluZSBudW1iZXIgZ2x5cGhzIGFuZCB0aGUgc3BhY2UKKyAgICAgIHBhZGRpbmcg YmVmb3JlL2FmdGVyIHRoZSBsaW5lIG51bWJlcnMuICBXZSBzZXQgYGdseXBoLT5ocG9zYCBlbHNl d2hlcmUuICovCisgICAgICB0ZW1faXQuaHBvcyArPSAxOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAgICAgICAvKiBTdG9wIHByb2R1Y2luZyBnbHlwaHMsIGFuZCByZWZyYWluIGZy b20gcHJvZHVjaW5nIHRoZSBsaW5lCiAJIG51bWJlciwgaWYgd2UgZG9uJ3QgaGF2ZSBlbm91Z2gg c3BhY2Ugb24gdGhpcyBsaW5lLiAgKi8KICAgICAgIGlmICh0ZW1faXQuY3VycmVudF94ID49IHdp ZHRoX2xpbWl0KQpAQCAtMjE1MzksNiArMjY1MDcsMjggQEAgbWF5YmVfcHJvZHVjZV9saW5lX251 bWJlciAoc3RydWN0IGl0ICppdCkKIAl9CiAgICAgfQogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVG RkVSIChpdC0+dy0+Y29udGVudHMpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVM TDsKKyAgLyogTmVlZGVkIHNvIHRoYXQgYnVmZmVyLWxvY2FsIHZhbHVlcyBjYW4gYmUgZGV0ZXJt aW5lZDsgZS5nLiwgd2hlbiBzd2l0Y2hpbmcKKyAgdG8gdGhlIG1pbmlidWZmZXIuICovCisgIGlm IChiICE9IGN1cnJlbnRfYnVmZmVyKQorICAgIHsKKyAgICAgIG9sZF9idWZmZXIgPSBjdXJyZW50 X2J1ZmZlcjsKKyAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKGIpOworICAgIH0KKyAgaXQtPnct Pm1jLmxudW1fcGl4ZWxfd2lkdGggPSAoIU5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0ZW1faXQuY3VycmVudF94CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAwOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRf YnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAvKiBSZWNvcmQgdGhlIHdpZHRoIGluIHBpeGVscyB3ZSBuZWVkIGZvciB0aGUgbGlu ZSBudW1iZXIgZGlzcGxheS4gICovCiAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoID0gdGVtX2l0LmN1 cnJlbnRfeDsKICAgLyogQ29weSB0aGUgcHJvZHVjZWQgZ2x5cGhzIGludG8gSVQncyBnbHlwaF9y b3cuICAqLwpAQCAtMjczNjAsNiArMzIzNTAsMTcgQEAgYXBwZW5kX2dseXBoIChzdHJ1Y3QgaXQg Kml0KQogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBoc1th cmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+Ynl0 ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGds eXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgaWYgKGl0LT5waXhlbF93aWR0aCA+IDAp CkBAIC0yNzQ0Miw2ICszMjQ0MywxNyBAQCBhcHBlbmRfY29tcG9zaXRlX2dseXBoIChzdHJ1Y3Qg aXQgKml0KQogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBo c1tpdC0+YXJlYV07CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5 cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IGl0LT5jbXBfaXQuY2hhcnBvczsKICAgICAg IGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBpeGVsX3dp ZHRoIDw9IFNIUlRfTUFYKTsKQEAgLTI3NjUwLDYgKzMyNjYyLDE3IEBAIHByb2R1Y2VfaW1hZ2Vf Z2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jv dy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7Cisg ICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIAkgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9u KTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRo ID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+cGl4ZWxfd2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3 NzUzLDYgKzMyNzc2LDE3IEBAIHByb2R1Y2VfeHdpZGdldF9nbHlwaCAoc3RydWN0IGl0ICppdCkK IAl9CiAgICAgICBpZiAoZ2x5cGggPCBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYSArIDFdKQog CXsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5ieXRlcG9zID0g SVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgZ2x5 cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9iamVjdCA9 IGl0LT5vYmplY3Q7CiAJICBnbHlwaC0+cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5kcyAoLTEs IGl0LT5waXhlbF93aWR0aCwgU0hSVF9NQVgpOwpAQCAtMjc4MzksNiArMzI4NzMsMTcgQEAgYXBw ZW5kX3N0cmV0Y2hfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIExpc3BfT2JqZWN0IG9iamVjdCwKIAkg ICAgd2lkdGggLT0gaXQtPmZpcnN0X3Zpc2libGVfeCAtIGl0LT5jdXJyZW50X3g7CiAJICBlYXNz ZXJ0ICh3aWR0aCA+IDApOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAg IGdseXBoLT5ieXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24p OwogICAgICAgZ2x5cGgtPm9iamVjdCA9IG9iamVjdDsKICAgICAgIC8qIEZJWE1FOiBJdCB3b3Vs ZCBiZSBiZXR0ZXIgdG8gdXNlIFRZUEVfTUFYIGhlcmUsIGJ1dApAQCAtMjgyOTMsNiArMzMzMzgs MTcgQEAgYXBwZW5kX2dseXBobGVzc19nbHlwaCAoc3RydWN0IGl0ICppdCwgaW50IGZhY2VfaWQs IGJvb2wgZm9yX25vX2ZvbnQsIGludCBsZW4sCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0g aXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+ aHBvczsKKyAgICAgIGdseXBoLT5ieXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChp dC0+cG9zaXRpb24pOwogICAgICAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAgICAgICBl YXNzZXJ0IChpdC0+cGl4ZWxfd2lkdGggPD0gU0hSVF9NQVgpOwpAQCAtMjkzNDMsMTAgKzM0Mzk5 LDIwIEBAIGd1aV9pbnNlcnRfZ2x5cGhzIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhf cm93ICp1cGRhdGVkX3JvdywKIAogICAvKiBXcml0ZSB0aGUgZ2x5cGhzLiAgKi8KICAgaHBvcyA9 IHN0YXJ0IC0gcm93LT5nbHlwaHNbdXBkYXRlZF9hcmVhXTsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpZiAoIW1jX3JlZHJhd19yb3cg KHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIHVwZGF0ZWRfYXJlYSwgdy0+b3V0cHV0X2N1cnNv ci54LAorICAgICAgICAgICAgICAgICAgICAgIGhwb3MsIGhwb3MgKyBsZW4sIGZhbHNlLCBEUkFX X05PUk1BTF9URVhULCBHVUlfSU5TRVJUX0dMWVBIUykpCiAgIGRyYXdfZ2x5cGhzICh3LCB3LT5v dXRwdXRfY3Vyc29yLngsIHJvdywgdXBkYXRlZF9hcmVhLAogCSAgICAgICBocG9zLCBocG9zICsg bGVuLAogCSAgICAgICBEUkFXX05PUk1BTF9URVhULCAwKTsKIAorLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAvKiBBZHZhbmNlIHRoZSBvdXRwdXQgY3Vyc29yLiAgKi8KICAgdy0+b3V0 cHV0X2N1cnNvci5ocG9zICs9IGxlbjsKICAgdy0+b3V0cHV0X2N1cnNvci54ICs9IHNoaWZ0X2J5 X3dpZHRoOwpAQCAtMjk3NzIsOSArMzQ4MzgsMTkgQEAgZ3VpX2ZpeF9vdmVybGFwcGluZ19hcmVh IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCiAJICB3aGlsZSAoaSA8 IHJvdy0+dXNlZFthcmVhXQogCQkgJiYgcm93LT5nbHlwaHNbYXJlYV1baV0ub3ZlcmxhcHNfdmVy dGljYWxseV9wKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJp eCwgcm93LCBhcmVhLCBzdGFydF94LCBzdGFydCwgaSwKKyAgICAgICAgICBmYWxzZSwgRFJBV19O T1JNQUxfVEVYVCwgR1VJX0ZJWF9PVkVSTEFQUElOR19BUkVBKSkKIAkgIGRyYXdfZ2x5cGhzICh3 LCBzdGFydF94LCByb3csIGFyZWEsCiAJCSAgICAgICBzdGFydCwgaSwKIAkJICAgICAgIERSQVdf Tk9STUFMX1RFWFQsIG92ZXJsYXBzKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog CX0KICAgICAgIGVsc2UKIAl7CkBAIC0zMDAyNSwxMCArMzUxMDEsMTcgQEAgZGlzcGxheV9hbmRf c2V0X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBvbiwKICAgbmV3X2N1cnNvcl90eXBl ID0gZ2V0X3dpbmRvd19jdXJzb3JfdHlwZSAodywgZ2x5cGgsCiAJCQkJCSAgICAmbmV3X2N1cnNv cl93aWR0aCwgJmFjdGl2ZV9jdXJzb3IpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAgIC8qIElmIGN1cnNvciBpcyBjdXJyZW50bHkgYmVp bmcgc2hvd24gYW5kIHdlIGRvbid0IHdhbnQgaXQgdG8gYmUgb3IKICAgICAgaXQgaXMgaW4gdGhl IHdyb25nIHBsYWNlLCBvciB0aGUgY3Vyc29yIHR5cGUgaXMgbm90IHdoYXQgd2Ugd2FudCwKICAg ICAgZXJhc2UgaXQuICAqLwogICBpZiAody0+cGh5c19jdXJzb3Jfb25fcAorICAgICAgJiYgTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICYmIE5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAgICAmJiBO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQogICAgICAgJiYgKCFv bgogCSAgfHwgdy0+cGh5c19jdXJzb3IueCAhPSB4CiAJICB8fCB3LT5waHlzX2N1cnNvci55ICE9 IHkKQEAgLTMwMDQxLDYgKzM1MTI0LDkgQEAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqdywgYm9vbCBvbiwKIAkgICAgICAmJiBuZXdfY3Vyc29yX3dpZHRoICE9IHctPnBo eXNfY3Vyc29yX3dpZHRoKSkpCiAgICAgZXJhc2VfcGh5c19jdXJzb3IgKHcpOwogCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIC8qIERvbid0IGNoZWNrIHBoeXNfY3Vyc29yX29uX3Ag aGVyZSBiZWNhdXNlIHRoYXQgZmxhZyBpcyBvbmx5IHNldAogICAgICB0byBmYWxzZSBpbiBzb21l IGNhc2VzIHdoZXJlIHdlIGtub3cgdGhhdCB0aGUgY3Vyc29yIGhhcyBiZWVuCiAgICAgIGNvbXBs ZXRlbHkgZXJhc2VkLCB0byBhdm9pZCB0aGUgZXh0cmEgd29yayBvZiBlcmFzaW5nIHRoZSBjdXJz b3IKQEAgLTMwMDU5LDkgKzM1MTQ1LDIwIEBAIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHN0cnVj dCB3aW5kb3cgKncsIGJvb2wgb24sCiAgICAgICB3LT5waHlzX2N1cnNvci52cG9zID0gdnBvczsK ICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKyAgaWYgKE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2li bGUpKQorICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25m KSkpCiAgIEZSQU1FX1JJRiAoZiktPmRyYXdfd2luZG93X2N1cnNvciAodywgZ2x5cGhfcm93LCB4 LCB5LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jdXJzb3JfdHlw ZSwgbmV3X2N1cnNvcl93aWR0aCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBvbiwgYWN0aXZlX2N1cnNvcik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0K IAogCkBAIC0zMDE1NCw3ICszNTI1MSwxOCBAQCBkcmF3X3Jvd193aXRoX21vdXNlX2ZhY2UgKHN0 cnVjdCB3aW5kb3cgKncsIGludCBzdGFydF94LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCiAjaWZk ZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAgIGlmIChGUkFNRV9XSU5ET1dfUCAoWEZSQU1FICh3LT5m cmFtZSkpKQogICAgIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50X21h dHJpeCwgcm93LCBURVhUX0FSRUEsIHN0YXJ0X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAg IHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCBmYWxzZSwgZHJhdywgRFJBV19ST1dfV0lUSF9NT1VTRV9G QUNFKSkKICAgICAgIGRyYXdfZ2x5cGhzICh3LCBzdGFydF94LCByb3csIFRFWFRfQVJFQSwgc3Rh cnRfaHBvcywgZW5kX2hwb3MsIGRyYXcsIDApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgICAgICByZXR1cm47CiAgICAgfQogI2VuZGlmCkBAIC0zMjIxNCwxMSArMzczMjIsMjMg QEAgZXhwb3NlX2FyZWEgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywg Y29uc3QgRW1hY3NfUmVjdGFuZ2xlICpyLAogICBzdHJ1Y3QgZ2x5cGggKmxhc3Q7CiAgIGludCBm aXJzdF94LCBzdGFydF94LCB4OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCiAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiByb3ctPmZpbGxf bGluZV9wKQorICAgIHsKKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9t YXRyaXgsIHJvdywgYXJlYSwgMCwgMCwgcm93LT51c2VkW2FyZWFdLAorICAgICAgICAgICAgICAg ICAgICAgICAgICBmYWxzZSwgRFJBV19OT1JNQUxfVEVYVCwgRVhQT1NFX0FSRUFfT05FKSkKICAg ICAvKiBJZiByb3cgZXh0ZW5kcyBmYWNlIHRvIGVuZCBvZiBsaW5lIHdyaXRlIHRoZSB3aG9sZSBs aW5lLiAgKi8KICAgICBkcmF3X2dseXBocyAodywgMCwgcm93LCBhcmVhLAogCQkgMCwgcm93LT51 c2VkW2FyZWFdLAogCQkgRFJBV19OT1JNQUxfVEVYVCwgMCk7CisgICAgfQorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgIGVsc2UKICAgICB7CiAgICAgICAvKiBTZXQgU1RBUlRfWCB0 byB0aGUgd2luZG93LXJlbGF0aXZlIHN0YXJ0IHBvc2l0aW9uIGZvciBkcmF3aW5nIGdseXBocyBv ZgpAQCAtMzIyNTAsMTEgKzM3MzcwLDIzIEBAIGV4cG9zZV9hcmVhIChzdHJ1Y3Qgd2luZG93ICp3 LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGNvbnN0IEVtYWNzX1JlY3RhbmdsZSAqciwKIAkgICsr bGFzdDsKIAl9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKICAgICAgIC8qIFJlcGFpbnQuICAqLwotICAgICAgaWYgKGxhc3QgPiBmaXJzdCkK KyAgICAgIC8qIEZsb2F0aW5nIGZha2UgY3Vyc29ycyB3aWxsIGV4aXN0IHdoZW4gKGxhc3QgPT0g Zmlyc3QpLiAqLworICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJp eCwgcm93LCBhcmVhLCBmaXJzdF94IC0gc3RhcnRfeCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgZmlyc3QgLSByb3ctPmdseXBoc1thcmVhXSwgbGFzdCAtIHJvdy0+Z2x5cGhzW2FyZWFdLAor ICAgICAgICAgICAgICAgICAgICAgICAgICBmYWxzZSwgRFJBV19OT1JNQUxfVEVYVCwgRVhQT1NF X0FSRUFfVFdPKQorICAgICAgICAgICYmIGxhc3QgPiBmaXJzdCkKIAlkcmF3X2dseXBocyAodywg Zmlyc3RfeCAtIHN0YXJ0X3gsIHJvdywgYXJlYSwKIAkJICAgICBmaXJzdCAtIHJvdy0+Z2x5cGhz W2FyZWFdLCBsYXN0IC0gcm93LT5nbHlwaHNbYXJlYV0sCiAJCSAgICAgRFJBV19OT1JNQUxfVEVY VCwgMCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB9CiB9CiAKQEAgLTMy MjY4LDEwICszNzQwMCwyMiBAQCBleHBvc2VfbGluZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIpCiB7CiAgIGVhc3NlcnQg KHJvdy0+ZW5hYmxlZF9wKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFLUNVUlNPUlMgKi8KKwogICBpZiAocm93LT5tb2RlX2xpbmVfcCB8fCB3LT5wc2V1ZG9fd2lu ZG93X3ApCisgICAgeworICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50X21h dHJpeCwgcm93LCBURVhUX0FSRUEsIDAsIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgIHJv dy0+dXNlZFtURVhUX0FSRUFdLCBmYWxzZSwgRFJBV19OT1JNQUxfVEVYVCwgRVhQT1NFX0xJTkUp KQogICAgIGRyYXdfZ2x5cGhzICh3LCAwLCByb3csIFRFWFRfQVJFQSwKIAkJIDAsIHJvdy0+dXNl ZFtURVhUX0FSRUFdLAogCQkgRFJBV19OT1JNQUxfVEVYVCwgMCk7CisgICAgfQorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIGVsc2UKICAgICB7CiAgICAgICBpZiAocm93LT51c2Vk W0xFRlRfTUFSR0lOX0FSRUFdKQpAQCAtMzI4MTksNiArMzc5NjMsMjIgQEAgZ3VpX2ludGVyc2Vj dF9yZWN0YW5nbGVzIChjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIxLCBjb25zdCBFbWFjc19SZWN0 YW5nbGUgKnIyLAogdm9pZAogc3ltc19vZl94ZGlzcCAodm9pZCkKIHsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBkZWZzdWJyICgmU21j X2R1bXBfZ2x5cGhfcm93KTsKKworICBkZWZzdWJyICgmU21jX2R1bXBfZ2x5cGhfbWF0cml4KTsK KworICBkZWZzdWJyICgmU21jX2N1cnJlbnRfY29sdW1uKTsKKworICBkZWZzdWJyICgmU21jX3N0 ZGVycik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgVndpdGhfZWNob19hcmVh X3NhdmVfdmVjdG9yID0gUW5pbDsKICAgc3RhdGljcHJvICgmVndpdGhfZWNob19hcmVhX3NhdmVf dmVjdG9yKTsKIApkaWZmIC0tZ2l0IGEvc3JjL3h0ZXJtLmMgYi9zcmMveHRlcm0uYwppbmRleCBj OTZhYTc0Li43ZjhmMWEwIDEwMDY0NAotLS0gYS9zcmMveHRlcm0uYworKysgYi9zcmMveHRlcm0u YwpAQCAtMTMyLDYgKzEzMiw5MDQgQEAgYWxvbmcgd2l0aCBHTlUgRW1hY3MuICBJZiBub3QsIHNl ZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LiAgKi8KICNpbmNsdWRlIDxYMTEvWEtC bGliLmg+CiAjZW5kaWYKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1V TFRJUExFLUNVUlNPUlMgKi8KKworI2lmZGVmIEdMWVBIX0RFQlVHCitzdGF0aWMgdm9pZCB4X2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2MsIGZ4 LCBmeSwgd2QsIGgpOworICAgICAgeF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKGYsIGdjKTsKKyAg ICB9Cit9CisKKy8qIFJJRjogRHJhdyBjdXJzb3Igb24gd2luZG93IFcuICovCitzdGF0aWMgdm9p ZAorbWNfeF9kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlw aF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAg ICAgICAgICAgIGludCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBv cywgaW50IHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgIGludCBoLCBzdHJ1Y3QgbWNfUkdC IGxzbCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICBpbnQgY3Vyc29yX3dpZHRoLCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsIGJv b2wgb25fcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9wKQoreworICBz dHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICAvKiBUaGUgZnJp bmdlIGJpdG1hcHMgYXJlIHByZXNlbnRseSBoYW5kbGVkIGVsc2V3aGVyZSwgYnV0IGNvdWxkIHNv bWVkYXkKKyAgYmUgbWFuYWdlZCAoaW4gcGFydCkgYXQgdGhpcyBzZWN0aW9uIG9mIGNvZGUuICov CisgIGlmIChvbl9wKQorICAgIHsKKyAgICAgIGlmIChyb3ctPmV4YWN0X3dpbmRvd193aWR0aF9s aW5lX3AKKyAgICAgICAgICAmJiAocm93LT5yZXZlcnNlZF9wCisgICAgICAgICAgICAgID8gKGhw b3MgPCAwKQorICAgICAgICAgICAgICA6IChocG9zID49IHJvdy0+dXNlZF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vbG9yKTsKKyAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgeworICAgIGNhc2UgTUNfTk9f RlJJTkdFX0JJVE1BUDoKKyAgICAgIGJyZWFrOworICAgIGNhc2UgTUNfTk9fQ1VSU09SOgorICAg ICAgYnJlYWs7CisgICAgY2FzZSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOgorICAgICAgYnJlYWs7 CisgICAgY2FzZSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVA6CisgICAgICBicmVhazsKKyAgICBjYXNl IE1DX0ZSQU1FRF9CT1g6CisgICAgeworICAgICAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGgg PSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgICAg ICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgICAgIHJldHVybjsKKyAgICAgIHN0cnVj dCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgICAgICBib29sIHJlZ2lvbl9h Y3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICBw dHJkaWZmX3QgcmVnaW9uX2JlZyA9IChyZWdpb25fYWN0aXZlX3ApID8gbWNfcmVnaW9uX2xpbWl0 ICgxKSA6IC0xOworICAgICAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9w KSA/IG1jX3JlZ2lvbl9saW1pdCAoMCkgOiAtMTsKKyAgICAgIGlmIChjdXJzb3JfZ2x5cGgtPnR5 cGUgIT0gSU1BR0VfR0xZUEggJiYgbHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxz bC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3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Vh bC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0 cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19h Y3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVf WF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZl X2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZS QU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2Fj dGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQg PSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXBy ZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9s bG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQp OworICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChm KSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVn cm91bmQpOworICAgICAgICAgICAgICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQ TEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2Ut PmJhY2tncm91bmQpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxz ZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVk X2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYt ZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93 X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lk KTsKKyAgICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZ IChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfaW5hY3RpdmVfZmFjZS0+ Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1F X1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0 aXZlX2ZhY2UtPmJhY2tncm91bmQpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg YmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgLyogRm9yY2UgYG1jX3hfc2V0X2N1cnNvcl9nYycg dG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgIGJv b2wgY3Vyc29yX2djX3AgPSB0cnVlOworIC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LWZhY2Ui KSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZl X3JlZ2lvbl9lbmRfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25f ZW5kX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2Fj dGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1m YWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3Ry dWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2Fj dGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1F X1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2 ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQg KEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93 X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2UtPmJhY2tncm91bmQpOworICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID4gcmVnaW9uX2JlZworICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zIDwgcmVnaW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CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9w KQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0g ZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg aW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAg ICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0Vf RlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAg ICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54 LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAg ICAgICAgICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0 cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQpOwor ICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICgh YWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg ICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1l ZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtcHJlLXp2 LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpo b2xsb3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WFNldEJhY2tncm91bmQgKEZS QU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgeGdjdi5iYWNr Z3JvdW5kKTsKKyAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAg LyogRHJhdyB0aGUgZnJhbWUgYXJvdW5kIHRoZSBib3guICovCisgICAgICAgICAgICAgIG1jX3hf ZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2 cG9zLCB3ZCwgaCk7CisgICAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2Fz ZSBNQ19IT0xMT1dfQk9YOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdy ZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBv cmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAg ICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAg ICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBm eSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNl CisgICAgICAgICAgbWNfeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBj YXNlIE1DX0ZJTExFRF9CT1g6CisgICAgeworICAgIC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2V0QmFj a2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2dj LCB4Z2N2LmJhY2tncm91bmQpOworICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAg IH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2dj X3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgs IHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsIGxzbCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3As IGN1cnNvcl9nY19wKTsKKyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2Fz ZSBNQ19CQVI6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0g MCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkg aGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYt Pm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIGJv b2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAgICAgICAgIG1jX3hfZHJh d19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3 ZCwgaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBNQ19C QVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAg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yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAg ICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9n Y19pbnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY194X2RyYXdfYmFyX2N1 cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19IQkFSLCBj dXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7Cisg ICAgfQorICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgfQorICAgICAgICB9 CisjaWZkZWYgSEFWRV9YX0kxOE4KKyAgaWYgKHcgPT0gWFdJTkRPVyAoZi0+c2VsZWN0ZWRfd2lu ZG93KSkKKyAgICBpZiAoRlJBTUVfWElDIChmKSAmJiAoRlJBTUVfWElDX1NUWUxFIChmKSAmIFhJ TVByZWVkaXRQb3NpdGlvbikpCisgICAgICB4aWNfc2V0X3ByZWVkaXRhcmVhICh3LCB4LCB5KTsK KyNlbmRpZgorICAgIH0KKyAgWEZsdXNoIChGUkFNRV9YX0RJU1BMQVkgKGYpKTsKK30KKworLyog RHJhdyBzdHJldGNoIGdseXBoIHN0cmluZyBTLiAqLworc3RhdGljIHZvaWQKK21jX3hfZHJhd19z dHJldGNoX2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKK3sKKyAgZWFzc2Vy dCAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCk7CisgIGlmIChzLT5obCA9 PSBEUkFXX0NVUlNPUgorICAgICAgJiYgIXhfc3RyZXRjaF9jdXJzb3JfcCkKKyAgICB7CisgICAg ICAvKiBJZiBgeC1zdHJldGNoLWN1cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3IGEgYmxvY2sgY3Vy c29yIGFzIHdpZGUgYXMgdGhlCisgICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgaW50IHdp ZHRoLCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4 ID0gcy0+eDsKKyAgICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB7CisgICAg ICAgICAgaW50IGxlZnRfeCA9IHdpbmRvd19ib3hfbGVmdF9vZmZzZXQgKHMtPncsIFRFWFRfQVJF QSk7CisgICAgICAgICAgaWYgKHggPCBsZWZ0X3gpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIGJhY2tncm91bmRfd2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICAgICAgeCA9IGxl ZnRfeDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAg eworICAgICAgICAgICAgLyogSW4gUjJMIHJvd3MsIGRyYXcgdGhlIGN1cnNvciBvbiB0aGUgcmln aHQgZWRnZSBvZiB0aGUKKyAgICAgICAgICAgICAgIHN0cmV0Y2ggZ2x5cGguICovCisgICAgICAg ICAgICBpbnQgcmlnaHRfeCA9IHdpbmRvd19ib3hfcmlnaHQgKHMtPncsIFRFWFRfQVJFQSk7Cisg ICAgICAgICAgICBpZiAoeCArIGJhY2tncm91bmRfd2lkdGggPiByaWdodF94KQorICAgICAgICAg ICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IHggLSByaWdodF94OworICAgICAgICAgICAgeCArPSBi YWNrZ3JvdW5kX3dpZHRoOworICAgICAgICAgIH0KKyAgICAgIHdpZHRoID0gbWluIChGUkFNRV9D T0xVTU5fV0lEVEggKHMtPmYpLCBiYWNrZ3JvdW5kX3dpZHRoKTsKKyAgICAgIGlmIChzLT5yb3ct PnJldmVyc2VkX3ApCisgICAgICAgIHggLT0gd2lkdGg7CisgICAgICAvKiBEcmF3IGN1cnNvci4g Ki8KKyAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwgcy0+eSwgd2lkdGgs IHMtPmhlaWdodCk7CisgICAgICAvKiBDbGVhciByZXN0IHVzaW5nIHRoZSBHQyBvZiB0aGUgb3Jp Z2luYWwgbm9uLWN1cnNvciBmYWNlLiAqLworICAgICAgaWYgKHdpZHRoIDwgYmFja2dyb3VuZF93 aWR0aCkKKyAgICAgICAgeworICAgICAgICAgIGludCB5ID0gcy0+eTsKKyAgICAgICAgICBpbnQg dyA9IGJhY2tncm91bmRfd2lkdGggLSB3aWR0aCwgaCA9IHMtPmhlaWdodDsKKyAgICAgICAgICBY UmVjdGFuZ2xlIHI7CisgICAgICAgICAgR0MgZ2M7CisgICAgICAgICAgaWYgKCFzLT5yb3ctPnJl dmVyc2VkX3ApCisgICAgICAgICAgICB4ICs9IHdpZHRoOworICAgICAgICAgIGVsc2UKKyAgICAg ICAgICAgIHggPSBzLT54OworICAgICAgICAgIGlmIChzLT5yb3ctPm1vdXNlX2ZhY2VfcAorICAg ICAgICAgICAgICAmJiBjdXJzb3JfaW5fbW91c2VfZmFjZV9wIChzLT53KSkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgeF9zZXRfbW91c2VfZmFjZV9nYyAocyk7CisgICAgICAgICAgICAg IGdjID0gcy0+Z2M7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAg Z2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgICAgICBnZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAo cywgJnIpOworICAgICAgICAgIHhfc2V0X2NsaXBfcmVjdGFuZ2xlcyAocy0+ZiwgZ2MsICZyLCAx KTsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3RpcHBsZSkKKyAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgLyogRmlsbCBiYWNrZ3JvdW5kIHdpdGggYSBzdGlwcGxlIHBhdHRlcm4uICovCisg ICAgICAgICAgICAgIFhTZXRGaWxsU3R5bGUgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIGdjLCBG aWxsT3BhcXVlU3RpcHBsZWQpOworICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5m LCBnYywgeCwgeSwgdywgaCk7CisgICAgICAgICAgICAgIFhTZXRGaWxsU3R5bGUgKEZSQU1FX1hf RElTUExBWSAocy0+ZiksIGdjLCBGaWxsU29saWQpOworICAgICAgICAgICAgfQorICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgWEdDVmFsdWVzIHhnY3Y7CisgICAg ICAgICAgICAgIFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgZ2MsIEdDRm9y ZWdyb3VuZCB8IEdDQmFja2dyb3VuZCwgJnhnY3YpOworICAgICAgICAgICAgICBYU2V0Rm9yZWdy b3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgZ2MsIHhnY3YuYmFja2dyb3VuZCk7CisgICAg ICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIGdjLCB4LCB5LCB3LCBoKTsKKyAgICAg ICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIGdjLCB4Z2N2 LmZvcmVncm91bmQpOworICAgICAgICAgICAgfQorICAgICAgICAgIHhfcmVzZXRfY2xpcF9yZWN0 YW5nbGVzIChzLT5mLCBnYyk7CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UgaWYgKCFzLT5iYWNr Z3JvdW5kX2ZpbGxlZF9wKQorICAgIHsKKyAgICAgIGludCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+ YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4ID0gcy0+eCwgbGVmdF94ID0gd2luZG93X2Jv eF9sZWZ0X29mZnNldCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgIC8qIERvbid0IGRyYXcgaW50 byBsZWZ0IG1hcmdpbiwgZnJpbmdlIG9yIHNjcm9sbGJhciBhcmVhCisgICAgICAgICBleGNlcHQg Zm9yIGhlYWRlciBsaW5lIGFuZCBtb2RlIGxpbmUuICovCisgICAgICBpZiAoeCA8IGxlZnRfeCAm JiAhcy0+cm93LT5tb2RlX2xpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIGJhY2tncm91bmRf d2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICB4ID0gbGVmdF94OworICAgICAgICB9Cisg ICAgICBpZiAoYmFja2dyb3VuZF93aWR0aCA+IDApCisgICAgICAgIHhfZHJhd19nbHlwaF9zdHJp bmdfYmdfcmVjdCAocywgeCwgcy0+eSwgYmFja2dyb3VuZF93aWR0aCwgcy0+aGVpZ2h0KTsKKyAg ICB9CisgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworfQorCisvKiBEcmF3IGdseXBo IHN0cmluZyBTLiAqLworc3RhdGljIHZvaWQKK21jX3hfZHJhd19nbHlwaF9zdHJpbmcgKHN0cnVj dCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGds eXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2ws IGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAg ICAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9wLCBib29sIGN1cnNvcl9nY19wKQoreworICBi b29sIHJlbGllZl9kcmF3bl9wID0gZmFsc2U7CisgIC8qIElmIFMgZHJhd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91 bmQgKHMpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICBp ZiAocy0+Zm9yX292ZXJsYXBzIHx8IChzLT5jbXBfZnJvbSA+IDAKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICEgcy0+Zmlyc3RfZ2x5cGgtPnUuY21wLmF1dG9tYXRpYykpCisgICAg ICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxzZQorICAgICAgICB4 X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIHRydWUpOworICAgICAgeF9kcmF3X2Nv bXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBj YXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMpCisgICAgICAg IHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxzZQorICAgICAgICB4X2Ry YXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIHRydWUpOworICAgICAgeF9kcmF3X2dseXBo bGVzc19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBkZWZh dWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgICAgfQorICBpZiAoIXMtPmZvcl9vdmVybGFw cykKKyAgICB7CisgICAgICAvKiBEcmF3IHVuZGVybGluZS4gKi8KKyAgICAgIGlmIChzLT5mYWNl LT51bmRlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxp bmVfdHlwZSA9PSBGQUNFX1VOREVSX1dBVkUpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICAgICAgeF9k cmF3X3VuZGVyd2F2ZSAocyk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICBYR0NWYWx1ZXMgeGdjdjsKKyAgICAgICAgICAgICAgICAgIFhH ZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIEdDRm9yZWdyb3VuZCwg JnhnY3YpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExB WSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT51bmRlcmxpbmVfY29sb3IpOworICAgICAgICAgICAg ICAgICAgeF9kcmF3X3VuZGVyd2F2ZSAocyk7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdy b3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIHhnY3YuZm9yZWdyb3VuZCk7Cisg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMtPmZh Y2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0aGlja25lc3MsIHBvc2l0aW9uOworICAgICAgICAg ICAgICBpbnQgeTsKKyAgICAgICAgICAgICAgaWYgKHMtPnByZXYgJiYgcy0+cHJldi0+ZmFjZS0+ dW5kZXJsaW5lX3AKKyAgICAgICAgICAgICAgICAgICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGlu ZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAvKiBXZSB1c2UgdGhlIHNhbWUgdW5kZXJsaW5lIHN0eWxlIGFzIHRoZSBwcmV2aW91 cyBvbmUuICovCisgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSBzLT5wcmV2LT51bmRlcmxp bmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBzLT5wcmV2LT51bmRl cmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogR2V0IHRoZSB1bmRlcmxpbmUg dGhpY2tuZXNzLiAgRGVmYXVsdCBpcyAxIHBpeGVsLiAqLworICAgICAgICAgICAgICAgICAgaWYg KHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAgICAg ICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPmZvbnQtPnVuZGVybGluZV90aGlja25lc3M7CisgICAg ICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7Cisg ICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2VudF9saW5lKQorICAgICAg ICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSB0aGlja25lc3MpIC0gKHMtPnli YXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVybGluZSBwb3NpdGlvbi4g IFRoaXMgaXMgdGhlIHJlY29tbWVuZGVkCisgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGlj YWwgb2Zmc2V0IGluIHBpeGVscyBmcm9tIHRoZSBiYXNlbGluZSB0byB0aGUgdG9wIG9mCisgICAg ICAgICAgICAgICAgICAgICAgICAgdGhlIHVuZGVybGluZS4gIFRoaXMgaXMgYSBzaWduZWQgdmFs dWUgYWNjb3JkaW5nIHRvIHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNzLCBhbmQg aXRzIGRlZmF1bHQgaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICBST1VORCAoKG1heGltdW0g ZGVzY2VudCkgLyAyKSwgd2l0aAorICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EKHgpID0g Zmxvb3IgKHggKyAwLjUpICAqLworICAgICAgICAgICAgICAgICAgICAgIGlmICh4X3VzZV91bmRl cmxpbmVfcG9zaXRpb25fcHJvcGVydGllcworICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBz LT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV9wb3NpdGlvbiA+PSAwKQorICAgICAgICAgICAg ICAgICAgICAgICAgcG9zaXRpb24gPSBzLT5mb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAg ICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocy0+Zm9udCkKKyAgICAgICAgICAgICAgICAgICAg ICAgIHBvc2l0aW9uID0gKHMtPmZvbnQtPmRlc2NlbnQgKyAxKSAvIDI7CisgICAgICAgICAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSB1bmRlcmxp bmVfbWluaW11bV9vZmZzZXQ7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICAgIHBvc2l0aW9uID0gbWF4IChwb3NpdGlvbiwgdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0KTsK KyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIC8qIENoZWNrIHRoZSBzYW5pdHkgb2Yg dGhpY2tuZXNzIGFuZCBwb3NpdGlvbi4gIFdlIHNob3VsZAorICAgICAgICAgICAgICAgICBhdm9p ZCBkcmF3aW5nIHVuZGVybGluZSBvdXQgb2YgdGhlIGN1cnJlbnQgbGluZSBhcmVhLiAqLworICAg ICAgICAgICAgICBpZiAocy0+eSArIHMtPmhlaWdodCA8PSBzLT55YmFzZSArIHBvc2l0aW9uKQor ICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhlaWdodCAtIDEpIC0gKHMtPnliYXNlIC0g cy0+eSk7CisgICAgICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDwgcy0+eWJhc2UgKyBw b3NpdGlvbiArIHRoaWNrbmVzcykKKyAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAocy0+eSAr IHMtPmhlaWdodCkgLSAocy0+eWJhc2UgKyBwb3NpdGlvbik7CisgICAgICAgICAgICAgIHMtPnVu ZGVybGluZV90aGlja25lc3MgPSB0aGlja25lc3M7CisgICAgICAgICAgICAgIHMtPnVuZGVybGlu ZV9wb3NpdGlvbiA9IHBvc2l0aW9uOworICAgICAgICAgICAgICB5ID0gcy0+eWJhc2UgKyBwb3Np dGlvbjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkK KyAgICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBzLT5nYywgcy0+eCwgeSwg cy0+d2lkdGgsIHRoaWNrbmVzcyk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICBYR0NWYWx1ZXMgeGdjdjsKKyAgICAgICAgICAgICAgICAg IFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIEdDRm9yZWdyb3Vu ZCwgJnhnY3YpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElT UExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT51bmRlcmxpbmVfY29sb3IpOworICAgICAgICAg ICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAocy0+Ziwgcy0+Z2MsIHMtPngsIHksIHMtPndpZHRo LCB0aGlja25lc3MpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hf RElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRHJhdyBvdmVybGluZS4gKi8K KyAgICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9wKQorICAgICAgICB7CisgICAgICAgICAgdW5z aWduZWQgbG9uZyBkeSA9IDAsIGggPSAxOworICAgICAgICAgIGlmIChzLT5mYWNlLT5vdmVybGlu ZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYs IHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICBlbHNlCisg ICAgICAgICAgICB7CisgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAg ICBYR2V0R0NWYWx1ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVncm91 bmQsICZ4Z2N2KTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExB WSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT5vdmVybGluZV9jb2xvcik7CisgICAgICAgICAgICAg IHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRo LCBoKTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICAvKiBEcmF3IHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgaWYgKHMtPmZhY2UtPnN0cmlr ZV90aHJvdWdoX3ApCisgICAgICAgIHsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGggPSAxOwor ICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZHkgPSAocy0+aGVpZ2h0IC0gaCkgLyAyOworICAgICAg ICAgIGlmIChzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAg ICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMt PndpZHRoLCBoKTsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICBYR2V0R0NWYWx1ZXMgKEZSQU1FX1hfRElT UExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVncm91bmQsICZ4Z2N2KTsKKyAgICAgICAgICAgICAg WFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT5z dHJpa2VfdGhyb3VnaF9jb2xvcik7CisgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMt PmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICAgICAg WFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVn cm91bmQpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAvKiBEcmF3IHJlbGllZiBp ZiBub3QgeWV0IGRyYXduLiAqLworICAgICAgaWYgKCFyZWxpZWZfZHJhd25fcCAmJiBzLT5mYWNl LT5ib3ggIT0gRkFDRV9OT19CT1gpCisgICAgICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19ib3gg KHMpOworICAgICAgaWYgKHMtPnByZXYpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5 cGhfc3RyaW5nICpwcmV2OworICAgICAgICAgIGZvciAocHJldiA9IHMtPnByZXY7IHByZXY7IHBy ZXYgPSBwcmV2LT5wcmV2KQorICAgICAgICAgICAgaWYgKHByZXYtPmhsICE9IHMtPmhsCisgICAg ICAgICAgICAgICAgJiYgcHJldi0+eCArIHByZXYtPndpZHRoICsgcHJldi0+cmlnaHRfb3Zlcmhh bmcgPiBzLT54KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogQXMgcHJldiB3 YXMgZHJhd24gd2hpbGUgY2xpcHBlZCB0byBpdHMgb3duIGFyZWEsIHdlCisgICAgICAgICAgICAg ICAgICAgbXVzdCBkcmF3IHRoZSByaWdodF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4g Ki8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IHByZXYtPmhs OworICAgICAgICAgICAgICAgIHByZXYtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNf eF9zZXRfZ2x5cGhfc3RyaW5nX2djIChwcmV2LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAg ICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBwaW5nX2V4YWN0bHkgKHMsIHByZXYpOworICAgICAg ICAgICAgICAgIGlmIChwcmV2LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBIKQorICAg ICAgICAgICAgICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAg ICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB4X2RyYXdfY29tcG9zaXRlX2ds eXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICB4X3Jlc2V0X2Ns aXBfcmVjdGFuZ2xlcyAocHJldi0+ZiwgcHJldi0+Z2MpOworICAgICAgICAgICAgICAgIHByZXYt PmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAgICBwcmV2LT5udW1fY2xpcHMgPSAwOworICAgICAg ICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmIChzLT5uZXh0KQorICAgICAgICB7CisgICAg ICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgICAgICBmb3IgKG5leHQgPSBz LT5uZXh0OyBuZXh0OyBuZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAgICAgIGlmIChuZXh0LT5o bCAhPSBzLT5obAorICAgICAgICAgICAgICAgICYmIG5leHQtPnggLSBuZXh0LT5sZWZ0X292ZXJo YW5nIDwgcy0+eCArIHMtPndpZHRoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg LyogQXMgbmV4dCB3aWxsIGJlIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLAor ICAgICAgICAgICAgICAgICAgIHdlIG11c3QgZHJhdyB0aGUgbGVmdF9vdmVyaGFuZyBwYXJ0IHVz aW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ug c2F2ZSA9IG5leHQtPmhsOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gcy0+aGw7CisgICAg ICAgICAgICAgICAgbWNfeF9zZXRfZ2x5cGhfc3RyaW5nX2djIChuZXh0LCBjdXJzb3JfZ2NfcCk7 CisgICAgICAgICAgICAgICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBwaW5nX2V4YWN0bHkgKHMs IG5leHQpOworICAgICAgICAgICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBD SEFSX0dMWVBIKQorICAgICAgICAgICAgICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3Jv dW5kIChuZXh0KTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB4X2Ry YXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAg ICAgICB4X3Jlc2V0X2NsaXBfcmVjdGFuZ2xlcyAobmV4dC0+ZiwgbmV4dC0+Z2MpOworICAgICAg ICAgICAgICAgIG5leHQtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAgICBuZXh0LT5udW1fY2xp cHMgPSAwOworICAgICAgICAgICAgICAgIG5leHQtPmNsaXBfaGVhZCA9IHMtPm5leHQ7CisgICAg ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLyogUmVzZXQgY2xpcHBpbmcuICovCisg IHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChzLT5mLCBzLT5nYyk7CisgIHMtPm51bV9jbGlwcyA9 IDA7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAvKiBEZWZhdWx0IHRvIHVzaW5nIFhJTSBpZiBhdmFpbGFibGUuICAqLwogI2lm ZGVmIFVTRV9YSU0KIGJvb2wgdXNlX3hpbSA9IHRydWU7CkBAIC0xMTA5LDYgKzIwMDcsMTYgQEAg c3RhdGljIHZvaWQKIHhfdXBkYXRlX2JlZ2luIChzdHJ1Y3QgZnJhbWUgKmYpCiB7CiAgIC8qIE5v dGhpbmcgdG8gZG8uICAqLworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogfQogCiAvKiBEcmF3IGEgdmVydGljYWwgd2luZG93IGJvcmRl ciBmcm9tICh4LHkwKSB0byAoeCx5MSkgICovCkBAIC0xMjU0LDYgKzIxNjIsMTYgQEAgeF91cGRh dGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIFhGbHVzaCAoRlJBTUVfWF9ESVNQTEFZIChmKSk7 CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5kaWYKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5V TEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogLyogVGhpcyBmdW5jdGlv biBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBsYWNlcyBpbiB4ZGlzcC5jCkBAIC0xMzIzOCw2ICsx NDE1NiwyMCBAQCBleHRlcm4gZnJhbWVfcGFybV9oYW5kbGVyIHhfZnJhbWVfcGFybV9oYW5kbGVy c1tdOwogCiBzdGF0aWMgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2UgeF9yZWRpc3BsYXlfaW50 ZXJmYWNlID0KICAgeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYHh0ZXJtLmNgIG11c3Qg YmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMgdGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScg aW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgbWNfeF9kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1j X3hfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg ICB4X2ZyYW1lX3Bhcm1faGFuZGxlcnMsCiAgICAgZ3VpX3Byb2R1Y2VfZ2x5cGhzLAogICAgIGd1 aV93cml0ZV9nbHlwaHMsCg== --Multipart_Mon_Jul_22_23:01:18_2019-1--