From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Sun, 26 Jan 2020 23:39:21 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sun_Jan_26_23:39:20_2020-1" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="123393"; mail-complaints-to="usenet@ciao.gmane.io" 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-mx.org@gnu.org Mon Jan 27 08:40:34 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ivz0b-000Sf9-3Y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jan 2020 08:40:33 +0100 Original-Received: from localhost ([::1]:41174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivz0a-00030E-0j for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jan 2020 02:40:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42051) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivz0B-0002xp-5x for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2020 02:40:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivz08-0002Ht-Nf for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2020 02:40:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51796) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ivz06-0002FR-Ht for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2020 02:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ivz06-000586-EM for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2020 02:40:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jan 2020 07:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.158011077019671 (code B ref 17684); Mon, 27 Jan 2020 07:40:02 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 27 Jan 2020 07:39:30 +0000 Original-Received: from localhost ([127.0.0.1]:57769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivyzZ-00057C-NU for submit@debbugs.gnu.org; Mon, 27 Jan 2020 02:39:29 -0500 Original-Received: from gateway36.websitewelcome.com ([192.185.195.25]:30214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivyzX-00056x-5W for 17684@debbugs.gnu.org; Mon, 27 Jan 2020 02:39:27 -0500 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 616844015D49E for <17684@debbugs.gnu.org>; Mon, 27 Jan 2020 00:52:34 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id vyzVinZX4CCrgvyzWi1kHU; Mon, 27 Jan 2020 01:39:26 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FF7Ia8CX/kkOViBte79P6A5utyb4qOSr6Xf5QXxPIy0=; b=ndFbF0Rc9Y38HUopdU8EpMiRX3 Ir3hRvZeAMEhUJK/dEIhDdgsQJjs0pXaQYcqct3Ccv6gj54uSj+7Q/E3HoT7dTbPsY6RfUcFg8Guv 6mW7EAnSoodXyi/hMtqsarqRHRQwcJhMeYwMOCkrZwr+D+5Hm8HcNEs3GH6+rjjwIYAA2eYIphbfx e7OuT0xcO6rNwUuYmsnSgmveeHxhrn7Qx3jJVFNQs5Z9PEmlgmgr+Dwd0ANT9k6KjBzlDhUWc+B1b ObmHF0uJfuErSXn4/mNkdwjHkSF5I9M64bxnMxphsaEpzTc3X6eqsA1QU7FVgZUZ0E7YImQrk8hbB EBuxF0Cg==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:54196 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1ivyzS-003Ks1-42; Mon, 27 Jan 2020 01:39:25 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1ivyzS-003Ks1-42 X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:54196 X-Source-Auth: lawlist X-Email-Count: 6 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175325 Archived-At: --Multipart_Sun_Jan_26_23:39:20_2020-1 Content-Type: text/plain; charset=US-ASCII VERSION: 022.006 [01/26/2020] CHANGELOG: - Fixed a bug in `mc_engine' that erroneously permitted an attempt to draw a floating fake cursors (horizontal ruler) when the WD (width) had a negative value. It is now properly suppressed when the preceding character is MC_GLYPH. - crosshairs.el: The variable `+-fill-column' is now buffer-local. Renamed the variable `+-parens-p' to `+-parens-highlight'. - The setting of `w->mc.lnum_pixel_width` within `maybe_produce_line_number' is now conditioned upon (it->area == TEXT_AREA && IT_CHARPOS (*it) == wstart.charpos): https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00232.html - 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)) NOTES: - Our journey begins at the outset of `update_window' when `mc_update_window_dryrun' performs a `!draw_p` simulation to create a new cache of fake cursors that are stored in the `w->mc_matrix`. The cache of fake cursors from the previous redisplay is copied to a temporary `mc_matrix` under the name of `old_matrix`. `mc_update_text_area' (used for `!draw_p` / `draw_p` situations) calls `mc_draw_glyphs' (writes glyphs to the glass) followed by `mc_draw_row' (writes fake cursors to the glass immediately thereafter). At the tail end of `mc_update_window_dryrun', `mc_update_window_erase' compares the new `w->mc_matrix` with the `old_matrix` to determine which fake cursors are the same -- setting the `same_p` boolean struct member accordingly for each applicable fake cursor within the `w->mc_matrix`. All fake cursors in the `old_matrix` that are `!same_p` get erased at this juncture. [Fn 1.] After the dryrun is complete, `update_window' does the real thing -- `draw_p`. As to the `from_where` situations of SKIPPED, POST_CHANGED, UNCHANGED, and SET_CURSOR_TWO, `mc_helper' compares the incoming tentative fake cursor with the `w->mc_matrix` to see if it has previously been marked as `same_p` -- if it is `!same_p`, then the fake cursor is drawn and we `return`. Fake cursors that have a `cursor_type` of MC_LEFT_FRINGE_BITMAP or MC_RIGHT_FRINGE_BITMAP are always reset even if they are `same_p`. As to the `from_where` situations of SCRIBE_ONE, SCRIBE_TWO, SCRIBE_THREE, and NOWHERE, `mc_helper' always causes fake cursors to be drawn (because new glyphs were written to the glass, or the area to the right of the display line was cleared) and we `return`. . Fn. 1: Even though writing new glyphs to the glass (SCRIBE_ONE, SCRIBE_TWO, and SCRIBE_THREE) would erase fake cursors within those boundaries, it is still necessary to erase `!same_p` fake cursors prior thereto. This is because `scrolling_window' occurs before new glyphs are written and `rif->scroll_run_hook' may copy one or more rows to other areas of the glass. It is not worth the effort to programmatically track both the _copied_ fake cursors and the _original_ fake cursors from the previous redisplay cycle, whose glyphs may remain where they are in the current redisplay cycle because they satisfy the `GLYPH_EQUAL_P' test. - The rest of our journey takes place wherever `draw_glyphs' would ordinarily be called, excluding `update_text_area'. If features 17684/22873 are active, `mc_redraw_row' calls `mc_draw_glyphs' (writes glyphs to the glass) and fake cursors are written to the glass immediately thereafter (if the coordinates coincide with prerecorded data in the `w->mc_matrix`). The functions containing the aforementioned calls are: . `gui_insert_glyphs' . `gui_fix_overlapping_area' . `draw_row_with_mouse_face' . `expose_area' . `expose_line' . `redraw_overlapped_rows' [which has been incorporated into `update_window'] - 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. `mc_rotate_matrix' and `mc_reverse_vpos' were removed with patch v. 022.002. - NS: As of 09/28/2018 (7946445962372c4255180af45cb7c857f1b0b5fa), the NS port no longer does anything useful during `update_window' except mark dirty rectangles. All drawing is now done when the MacOS calls `drawRect', which in turn calls `expose_frame'. 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. - 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.] --Multipart_Sun_Jan_26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IG1jLS1tYXgtY3Vyc29ycy1vcmlnaW5hbCBtYy9t YXgtY3Vyc29ycykpCisgICAgKHdoZW4gbWMvbWF4LWN1cnNvcnMKKyAgICAgICh1bmxlc3MgKDwg KG1jL251bS1jdXJzb3JzKSBtYy9tYXgtY3Vyc29ycykKKyAgICAgICAgKGlmICh5ZXMtb3Itbm8t cCAoZm9ybWF0ICIlZCBhY3RpdmUgY3Vyc29ycy4gQ29udGludWU/ICIgKG1jL251bS1jdXJzb3Jz KSkpCisgICAgICAgICAgICAoc2V0cSBtYy9tYXgtY3Vyc29ycyAocmVhZC1udW1iZXIgIkVudGVy IGEgbmV3LCB0ZW1wb3JhcnkgbWF4aW11bTogIikpCisgICAgICAgICAgKG1jL3JlbW92ZS1mYWtl LWN1cnNvcnMpCisgICAgICAgICAgKGVycm9yICJBYm9ydGVkOiB0b28gbWFueSBjdXJzb3JzIikp KSkKKyAgICAobGV0ICgob3ZlcmxheQorICAgICAgICAgICAgKGlmIG1jL3VzZS1idWlsdC1pbi1j dXJzb3JzCisgICAgICAgICAgICAgIChtYWtlLW92ZXJsYXkgKHBvaW50KSAocG9pbnQpKQorICAg ICAgICAgICAgICAobWMvbWFrZS1jdXJzb3Itb3ZlcmxheS1hdC1wb2ludCkpKSkKKyAgICAgIChv dmVybGF5LXB1dCBvdmVybGF5ICdtYy1pZCAob3IgaWQgKG1jL2NyZWF0ZS1jdXJzb3ItaWQpKSkK KyAgICAgIChvdmVybGF5LXB1dCBvdmVybGF5ICd0eXBlICdmYWtlLWN1cnNvcikKKyAgICAgIChv dmVybGF5LXB1dCBvdmVybGF5ICdwcmlvcml0eSAxMDApCisgICAgICAobWMvc3RvcmUtY3VycmVu dC1zdGF0ZS1pbi1vdmVybGF5IG92ZXJsYXkpCisgICAgICAod2hlbiAodXNlLXJlZ2lvbi1wKQor ICAgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncmVnaW9uLW92ZXJsYXkKKyAgICAgICAgICAg ICAgICAgICAgIChtY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5kIGNvbXBhcmFibGUgYnkgYGVxJy4KKyAgICAgICAgICAg ICAgICAoc2V0cSBvcmlnaW5hbC1jb21tYW5kIChpbnRlcm4gKHN5bWJvbC1uYW1lIG9yaWdpbmFs LWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICA7OyBvdGhlcndpc2UgaXQncyBhIHN5bWJvbCwg YW5kIHdlIGNhbiBiZSBtb3JlIHRob3JvdWdoCisgICAgICAgICAgICAgICAgKGlmIChnZXQgb3Jp Z2luYWwtY29tbWFuZCAnbWMtLXVuc3VwcG9ydGVkKQorICAgICAgICAgICAgICAgICAgICAobWVz c2FnZSAiJVMgaXMgbm90IHN1cHBvcnRlZCB3aXRoIG11bHRpcGxlIGN1cnNvcnMlcyIKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWwtY29tbWFuZAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoZ2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1cHBvcnRlZCkpCisg ICAgICAgICAgICAgICAgICAod2hlbiAoYW5kIG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0 LWNtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobm90ICht ZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMvY21kcy10by1ydW4tb25jZSkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChvciBtYy9hbHdheXMtcnVuLWZvci1hbGwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChtZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMtLWRlZmF1bHQtY21k cy10by1ydW4tZm9yLWFsbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtZW1x IG9yaWdpbmFsLWNvbW1hbmQgbWMvY21kcy10by1ydW4tZm9yLWFsbCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChtYy9wcm9tcHQtZm9yLWluY2x1c2lvbi1pbi13aGl0ZWxpc3Qg b3JpZ2luYWwtY29tbWFuZCkpKQorICAgICAgICAgICAgICAgICAgICAobWMvZXhlY3V0ZS1jb21t YW5kLWZvci1hbGwtZmFrZS1jdXJzb3JzIG9yaWdpbmFsLWNvbW1hbmQpKSkpCisgICAgICAgICAg ICAgICh3aGVuIG1jL3VzZS1idWlsdC1pbi1jdXJzb3JzCisgICAgICAgICAgICAgICAgKHNldHEg bWMtY29uZgorICAgICAgICAgICAgICAgICAgICAgICAgKG1hcGNhcgorICAgICAgICAgICAgICAg ICAgICAgICAgICAobGFtYmRhICh4KSAobGlzdCAob3ZlcmxheS1zdGFydCB4KSAiYmFyIiBuaWwp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvYWxsLWZha2UtY3Vyc29ycykpKSkpKSkp KSkKKworICAoZGVmdW4gbWMvbWFyay1uZXh0LWxpa2UtdGhpcy1jeWNsZS1mb3J3YXJkICgpCisg ICJNYXJrcyBuZXh0IG9jY3VyZW5jZSBvZiB3b3JkIGxpa2UgdGhpcyBhbmQgYWR2YW5jZXMgY3Vy c29yIHRvIHRoaXMgb2NjdXJyZW5jZSIKKyAgKGludGVyYWN0aXZlKQorICAgIChtYy9tYXJrLW5l eHQtbGlrZS10aGlzIDEpKQorCisgIChkZWZ1biBtYy9tYXJrLXByZXZpb3VzLWxpa2UtdGhpcy1j eWNsZS1mb3J3YXJkICgpCisgICJNYXJrcyBuZXh0IG9jY3VycmVuY2Ugb2Ygd29yZCBsaWtlIHRo aXMgYW5kIGFkdmFuY2VzIGN1cnNvciB0byB0aGlzIG9jY3VycmVuY2UiCisgIChpbnRlcmFjdGl2 ZSkKKyAgICAobWMvbWFyay1wcmV2aW91cy1saWtlLXRoaXMgMSkpCisKKyAgKGFkZC10by1saXN0 ICdtYy0tZGVmYXVsdC1jbWRz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SBjb252ZXJzaW9uIGZyb20gTFNMIGlzIGRvbmUgaW50ZXJuYWxseSBieQor bXVsdGlwbHlpbmcgZWFjaCBlbGVtZW50IG9mIHRoZSBMU0wgY29sb3IgdmVjdG9yIGJ5IDI1NS4g IGB4dGVybS5jJyB1c2VzCitgeF9tYWtlX3RydWVjb2xvcl9waXhlbCcsIHdoaWNoIHVzZXMgMTYt Yml0IFJHQiAtLSB0aGUgY29udmVyc2lvbiBmcm9tIExTTAoraGFwcGVucyBpbnRlcm5hbGx5IGJ5 IG11bHRpcGx5aW5nIGVhY2ggZWxlbWVudCBvZiB0aGUgTFNMIGNvbG9yIHZlY3RvciBieSA2NTUz NS4iCisoaW50ZXJhY3RpdmUpCisgIChsZXQgKChidWZmZXIgKGdldC1idWZmZXItY3JlYXRlICIq TUMtVEVTVCoiKSkpCisgICAgKHdpdGgtY3VycmVudC1idWZmZXIgYnVmZmVyCisgICAgICAoZXJh c2UtYnVmZmVyKQorICAgICAgKGluc2VydCAiVGhpcyBpcyBhIHRlc3QhIikKKyAgICAgIChzZXRx IG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICgy ICJiYXIiICJwdXJwbGUiKQorICAgICAgICAgICAgICAgICAgICAgICgzICJib3giICIjMDBGRjAw IikKKyAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAg ICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAg ICAgICAgICAgICg2ICgiYmFyIiAzKSBbMC4wIDEuMCAxLjBdKQorICAgICAgICAgICAgICAgICAg ICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQiKQorICAgICAgICAgICAgICAgICAgICAgICg4ICJi b3giICJncmV5MjUiKQorICAgICAgICAgICAgICAgICAgICAgICg5ICJib3giICJncmV5NzUiKSkp KQorICAgIChzZWxlY3Qtd2luZG93I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gbmlsKSkK KyAgICAodW5sZXNzIChvciAobWVtcSB0aGlzLWNvbW1hbmQgKy1wYXJlbnMtZXhjbHVzaW9ucykK KyAgICAgICAgICAgICAgICAoYW5kIChudWxsICstcGFyZW5zLWhpZ2hsaWdodCkKKyAgICAgICAg ICAgICAgICAgICAgIChudWxsICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXApKSkKKyAgICAgICgr LWRlbGV0ZS1wYXJlbnMtb3ZlcmxheXMpKQorICAgIChpZiBmb3JjZQorICAgICAgKHdoZW4gKy1w YXJlbnMtaGlnaGxpZ2h0CisgICAgICAgICgrLXBhcmVucy1mbikpCisgICAgICAoc2V0cSArLXRp bWVyLXZhciAocnVuLXdpdGgtaWRsZS10aW1lciArLWlkbGUtdGltZXItc2Vjb25kcyBuaWwgIycr LXRpbWVyLWZuKSkpKSkKKworKGRlZnZhciBmYy1tb2RlKQorCis7OzsjIyNhdXRvbG9hZAorKGRl ZmluZS1taW5vci1tb2RlICstbW9kZQorIk1pbm9yIG1vZGUgZm9yIGRpc3BsYXlpbmcgYSBob3Jp em9udGFsIHJ1bGVyLiIKKyAgOmluaXQtdmFsdWUgbmlsCisgIDpsaWdodGVyICIgKyIKKyAgOmtl eW1hcCBuaWwKKyAgOmdsb2JhbCBuaWwKKyAgOmdyb3VwICcrLW1vZGUKKyAgKGNvbmQKKyAgICAo Ky1tb2RlCisgICAgICA7OzsgYCstbW9kZScgaGFzIHRoZSBhYmlsaXR5IHRvIGFsc28gZGlzcGxh eSBhIGZpbGwgY29sdW1uIGluZGljYXRvci4KKyAgICAgIDs7OyBTZWUgdGhlIHZhcmlhYmxlIGAr LWZpbGwtY29sdW1uJy4KKyAgICAgICh3aGVuIGZjLW1vZGUKKyAgICAgICAgKGZjLW1vZGUgLTEp KQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAgICAgICAgICAgICAgICAo Y2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3Vy cmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVsZG9jLW1vZGUgLTEpKQor ICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAgICAgICAgICAgICAg IChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBj dXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgaml0LWxvY2st Y29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1sb2NrLWNvbnRleHQt dGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIChydW4td2l0 aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZvbnRpZnkpKQorICAg ICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAgICAod2hlbiAoYW5k IChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBj dXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgdW5kby1hdXRv LWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciB1bmRvLWF1 dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0ICd1bmRvLWF1dG8tLXVu ZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChhZGQtdG8tbGlzdCAndW5k by1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQtYnVmZmVyKSkpKQorICAg ICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2l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dCB1c2VycyB3aWxsIHByb2JhYmx5IG5vdCB3YW50IHRoaXMgcGFydGljdWxhciBz ZXR0aW5nLgorICAgICAgKHVubGVzcyAobnVsbCBiaWRpLWRpc3BsYXktcmVvcmRlcmluZykKKyAg ICAgICAgKHNldHEgYmlkaS1kaXNwbGF5LXJlb3JkZXJpbmcgbmlsKSkKKyAgICAgIChzZXQgKG1h a2UtbG9jYWwtdmFyaWFibGUgJystLXNhdmVkLXN0YXRlKSBuaWwpCisgICAgICAoZG9saXN0ICh2 YXIgJyhidWZmZXItZGlzcGxheS10YWJsZQorICAgICAgICAgICAgICAgICAgICAgZnJpbmdlLWlu ZGljYXRvci1hbGlzdAorICAgICAgICAgICAgICAgICAgICAgdGFiLXdpZHRoCisgICAgICAgICAg ICAgICAgICAgICBsaW5lLW1vdmUtdmlzdWFsCisgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0 ZS1saW5lcworICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtcGFydGlhbC13aWR0aC13aW5k b3dzCisgICAgICAgICAgICAgICAgICAgICB3b3JkLXdyYXApKQorICAgICAgICAod2hlbiAobG9j YWwtdmFyaWFibGUtcCB2YXIpCisgICAgICAgICAgKHB1c2ggKGNvbnMgdmFyIChzeW1ib2wtdmFs dWUgdmFyKSkgKy0tc2F2ZWQtc3RhdGUpKSkKKyAgICAgIChzZXRxIGZpbGwtY29sdW1uIDgwKQor ICAgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkKKyAgICAgIChzZXRxLWxvY2FsIGF1 dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUpCisgICAgICAoc2V0cS1sb2NhbCBoc2Nyb2xs LXN0ZXAgNSkKKyAgICAgIChzZXRxIGJ1ZmZlci1kaXNwbGF5LXRhYmxlICstYnVmZmVyLWRpc3Bs YXktdGFibGUpCisgICAgICAoc2V0cSB0YWItd2lkdGggNCkKKyAgICAgIChzZXQgKG1ha2UtbG9j YWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpIHQpCisgICAgICAoc2V0cSB0cnVuY2F0ZS1s aW5lcworICAgICAgICAoY29uZAorICAgICAgICAgICgobGV0ICgobHN0ICstdHJ1bmNhdGUtbGlu ZXMtZGVyaXZlZC1tb2RlcykKKyAgICAgICAgICAgICAgICAgIG1vZGUpCisgICAgICAgICAgICAo Y2F0Y2ggJ2ZvdW5kCisgICAgICAgICAgICAgICh3aGlsZSAoc2V0cSBtb2RlIChwb3AgbHN0KSkK KyAgICAgICAgICAgICAgICAod2hlbiAoZGVyaXZlZC1tb2RlLXAgbW9kZSkKKyAgICAgICAgICAg ICAgICAgICh0aHJvdyAnZm91bmQgdCkpKSkpKQorICAgICAgICAgICAoKG1lbXEgbWFqb3ItbW9k ZSArLXRydW5jYXRlLWxpbmVzLW1ham9yLW1vZGVzKSkKKyAgICAgICAgICAgKHQKKyAgICAgICAg ICAgICBuaWwpKSkKKyAgICAgIChzZXQgKG1ha2UtbG9jYWwtdmFyaWFibGUgJ3RydW5jYXRlLXBh cnRpYWwtd2lkdGgtd2luZG93cykgbmlsKQorICAgICAgKHNldHEgd29yZC13cmFwIHQpCisgICAg ICAoc2V0cSBpbmRpY2F0ZS1lbXB0eS1saW5lcyB0KQorICAgICAgKHNldHEgaW5kaWNhdGUtYnVm ZmVyLWJvdW5kYXJpZXMgJ2xlZnQpCisgICAgICAoc2V0cSBmcmluZ2UtaW5kaWNhdG9yLWFsaXN0 CisgICAgICAgICAgOzs7IGhzY2xfYWxsX3RlbXBfcCB8IGhzY2xfdGVtcF9wCisgICAgICAgICco KCstaHNjbC10ZW1wIC4gKCstc2luZ2xlLWFuZ2xlLWxlZnQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgKy1kb3VibGUtYW5nbGUtbGVmdCkpCisgICAgICAgICAgOzs7IGhzY2xfYWxsX3Blcm1f MF9wIHwgaHNjbF9hbGxfcGVybV8xX3AgfCBoc2NsX2FsbF9wZXJtXzJfcCB8IGhzY2xfcGVybV9w CisgICAgICAgICAgKCstaHNjbC1wZXJtIC4gKCstc2luZ2xlLWFuZ2xlLXVwCisgICAgICAgICAg ICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLXVwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICstdHJpcGxlLWFuZ2xlLXVwCisgICAgICAgICAgICAgICAgICAgICAgICAgICstcXVhZHJ1 cGxlLWFuZ2xlLXVwKSkKKyAgICAgICAgICAoKy1vdmVybGF5LWFycm93IC4gKCstZnJpbmdlLWxl ZnQtYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWFy cm93KSkKKyAgICAgICAgICAodHJ1bmNhdGlvbiAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAg ICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgIChj b250aW51YXRpb24gLiAoKy1mcmluZ2UtbGVmdC1jdXJseS1hcnJvdworICAgICAgICAgICAgICAg ICAgICAgICAgICAgKy1iYWNrc2xhc2gpKQorICAgICAgICAgIChvdmVybGF5LWFycm93IC4gKy1m cmluZ2UtcmlnaHQtdHJpYW5nbGUpCisgICAgICAgICAgKHVwIC4gKy1mcmluZ2UtdXAtYXJyb3cp CisgICAgICAgICAgKGRvd24gLiArLWZyaW5nZS1kb3duLWFycm93KQorICAgICAgICAgICh0b3Ag LiArLWZyaW5nZS10b3AtbGVmdC1hbmdsZSkKKyAgICAgICAgICAoYm90dG9tIC4gKy1mcmluZ2Ut Ym90dG9tLXJpZ2h0LWFuZ2xlKQorICAgICAgICAgICh0b3AtYm90dG9tIC4gKCstZnJpbmdlLWxl ZnQtYnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWJyYWNr ZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS10b3AtcmlnaHQtYW5nbGUKKyAg ICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS10b3AtbGVmdC1hbmdsZSkpCisgICAgICAg ICAgKGVtcHR5LWxpbmUgLiArLWZyaW5nZS1lbXB0eS1saW5lKQorICAgICAgICAgICh1bmtub3du IC4gKy1mcmluZ2UtcXVlc3Rpb24tbWFyaykpKQorICAgICAgKHNldHEgZnJpbmdlLWN1cnNvci1h bGlzdCAnKChib3ggLiArLWZyaW5nZS1sZWZ0LXRyaWFuZ2xlKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChob2xsb3cgLiArLWhvbGxvdy1yZWN0YW5nbGUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGJhciAuICstdmVydGljYWwtYmFyKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChoYmFyIC4gKy1mcmluZ2UtaG9yaXpvbnRhbC1iYXIp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdy1zbWFsbCAuICstZnJp bmdlLWhvbGxvdy1zcXVhcmUpKSkKKyAgICAgIChpZiAob3IgKy1mb3J0aHdpdGgKKyAgICAgICAg ICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKGFkZC1ob29r ICdwb3N0LWNvbW1hbmQtaG9vayAnKy1kcmF3LWZvcnRod2l0aCAnYXBwZW5kICdsb2NhbCkKKyAg ICAgICAgKGFkZC1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnKy1kcmF3LWNyb3NzaGFpcnMgJ2Fw cGVuZCAnbG9jYWwpKQorICAgICAgKHdoZW4gKy1mb3J0aHdpdGgKKyAgICAgICAgKGFkZC1ob29r ICd3aW5kb3ctY29uZmlndXJhdGlvbi1jaGFuZ2UtaG9vayAnKy1kcmF3LWZvcnRod2l0aCBuaWwg J2xvY2FsKSkKKyAgICAgIChhZGQtaG9vayAnY2hhbmdlLW1ham9yLW1vZGUtaG9vayAndHVybi1v ZmYtKy1t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Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OworCisoZGVmdW4gKy1wYXJlbnMt Zm4gKCkKKyAgIkRvYy1zdHJpbmcuIgorICAobGV0KiAoKG9wb2ludCAocG9pbnQpKQorICAgICAg ICAgKGZyb20gKGlmICstcGFyZW5zLWZyb20tZm4KKyAgICAgICAgICAgICAgICAgKGZ1bmNhbGwg Ky1wYXJlbnMtZnJvbS1mbikKKyAgICAgICAgICAgICAgICAgKHBvaW50LW1pbikpKQorICAgICAg ICAgKHdpbiAoc2VsZWN0ZWQtd2luZG93KSkKKyAgICAgICAgIChpIDApCisgICAgICAgICAocHJl Y2VkaW5nLWNoYXIgKHByZWNlZGluZy1jaGFyKSkKKyAgICAgICAgIChvY2hhciAoY2hhci1hZnRl ciBvcG9pbnQpKQorICAgICAgICAgKHBvczEKKyAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAg ICAoKGFuZCBvY2hhcgorICAgICAgICAgICAgICAgICAgIChvciA7OzsgKGNoYXItdG8tc3RyaW5n IDQwKSA9PiBvcGVuaW5nIHBhcmVudGhlc2lzCisgICAgICAgICAgICAgICAgICAgICAgICg9IG9j aGFyIDQwKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDkxKSA9 PiBvcGVuaW5nIHNxdWFyZSBicmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICg9IG9jaGFy IDkxKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyMykgPT4g b3BlbmluZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgMTIz KSkpCisgICAgICAgICAgICAgICAgKG1pbiAoMSsgb3BvaW50KSAocG9pbnQtbWF4KSkpCisgICAg ICAgICAgICAgKChvciA7OzsgKGNoYXItdG8tc3RyaW5nIDQxKSA9PiBjbG9zaW5nIHBhcmVudGhl c2lzCisgICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKKyAgICAgICAgICAg ICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTMpID0+IGNsb3Npbmcgc3F1YXJlIGJyYWNrZXQK KyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDkzKQorICAgICAgICAgICAgICAg ICAgOzs7IChjaGFyLXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFja2V0CisgICAg ICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciAxMjUpKQorICAgICAgICAgICAgICAgICht YXggKHBvaW50LW1pbikgKDEtIG9wb2ludCkpKQorICAgICAgICAgICAgICh0CisgICAgICAgICAg ICAgICAgb3BvaW50KSkpCisgICAgICAgICBwb3MyCisgICAgICAgICBzZWxlY3RlZC1mYWNlKQor ICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgKGNvbmRpdGlvbi1jYXNlIG5pbAorICAgICAgICAo d2hpbGUgKHNldHEgcG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9tIHBvczEpKSkK KyAgICAgICAgICAoc2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEgMSkpCisgICAgICAgICAgKGlm ICg9IGkgMTApCisgICAgICAgICAgICAoc2V0cSBpIDEpCisgICAgICAgICAgICAoc2V0cSBpICgx KyBpKSkpCisgICAgICAgICAgKHNldHEgc2VsZWN0ZWQtZmFjZSAoY29uZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoKD0gaSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICcrLXBhcmVucy1vbmUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKCg9IGkgMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMt dHdvLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDMpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXRocmVlLWZhY2UpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDQpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJystcGFyZW5zLWZvdXItZmFjZSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKCg9IGkgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn Ky1wYXJlbnMtZml2ZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0g aSA2KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zaXgtZmFj ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtc2V2ZW4tZmFjZSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKCg9IGkgOCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAnKy1wYXJlbnMtZWlnaHQtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKCg9IGkgOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJl bnMtbmluZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxMCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGVuLWZhY2UpKSkK KyAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBwb3MxKSkpKQorICAg ICAgICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAg IChvdmVybGF5LXB1dCBvdiAnd2luZG93IHdpbikpCisgICAgICAgICAgICAob3ZlcmxheS1wdXQg b3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpCisgICAgICAgICAgKHdoZW4gcG9zMgorICAgICAgICAg ICAgKGxldCAoKG92IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIpKSkKKyAgICAgICAgICAg ICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAgICAgKG92 ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92 ICdmYWNlIHNlbGVjdGVkLWZhY2UpKSkpCisgICAgICAgIChlcnJvciBuaWwpKSkKKyAgICAoc2V0 cSArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wIHQpKSkKKworKGRlZnVuICstcmVtb3ZlLW92ZXJs YXlzIChiZWcgZW5kIG5hbWUgdmFsKQorIlJlbW92ZSB0aGUgb3ZlcmxheXMgdGhhdCBhcmUgYGVx dWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzYC4KK0luY2x1ZGVzIGEgdW5pcXVlIHNpdHVhdGlvbiB3 aGVuIGFuIG92ZXJsYXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVydHkKK2lzIGF0IHRo ZSB2ZXJ5IGVuZCBvZiBhIG5hcnJvd2VkLWJ1ZmZlci4iCisgIChsZXQqICgocG9pbnQtbWF4IChw b2ludC1tYXgpKQorICAgICAgICAgKHBvaW50LW1pbiAocG9pbnQtbWluKSkKKyAgICAgICAgIChu YXJyb3dlZC1wIChidWZmZXItbmFycm93ZWQtcCkpCisgICAgICAgICAoYmVnIChpZiBiZWcgYmVn IHBvaW50LW1pbikpCisgICAgICAgICAoZW5kCisgICAgICAgICAgIChjb25kCisgICAgICAgICAg ICAgKChhbmQKKyAgICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAg ICAgICBlbmQpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAg ICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICAobnVsbCBlbmQp KQorICAgICAgICAgICAgICAgcG9pbnQtbWF4KQorICAgICAgICAgICAgICgoYW5kCisgICAgICAg ICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAgICAgICAgICAg ICAgICg8IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgZW5kKQorICAgICAgICAgICAg ICgoYW5kCisgICAgICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5k CisgICAgICAgICAgICAgICAgICg9IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgKDEr IGVuZCkpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAor ICAgICAgICAgICAgICAgICAobnVsbCBlbmQpKQorICAgICAgICAgICAgICAgKDErIHBvaW50LW1h eCkpICkpCisgICAgICAgICAob3ZlcmxheXMKKyAgICAgICAgICAgKHByb2duCisgICAgICAgICAg ICAgKG92ZXJsYXktcmVjZW50ZXIgZW5kKQorICAgICAgICAgICAgIChvdmVybGF5cy1pbiBiZWcg ZW5kKSkpKQorICAgICh3aGVuIChhbmQgYmVnIGVuZCBuYW1lIHZhbCkKKyAgICAgIChkb2xpc3Qg KG8gb3ZlcmxheXMpCisgICAgICAgIChjb25kCisgICAgICAgICAgKChhbmQgKGVxIG5hbWUgJ2Zh Y2UpCisgICAgICAgICAgICAgICAgKGVxIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisgICAg ICAgICAgICA7OyBFaXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0c2lkZSBiZWcuLi5lbmQKKyAg ICAgICAgICAgIDs7IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCisgICAgICAgICAg ICA7OyBvciBkZWxldGUgaXQgZW50aXJlbHkgKGlmIGl0IGlzIGNvbnRhaW5lZCBpbiBiZWcuLi5l bmQpLgorICAgICAgICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAgICAg ICAgICAgICAoaWYgKD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKKyAgICAgICAgICAgICAgKHByb2du CisgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5IG8pCisgICAgICAg ICAgICAgICAgICAob3ZlcmxheS1zdGFydCBvKSBiZWcpCisgICAgICAgICAgICAgICAgKG1vdmUt b3ZlcmxheSBvIGVuZCAob3ZlcmxheS1lbmQgbykpKQorICAgICAgICAgICAgICAgICAgKG1vdmUt b3ZlcmxheSBvIChvdmVybGF5LXN0YXJ0IG8pIGJlZykpCisgICAgICAgICAgICAgIChpZiAoPiAo b3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBvIGVu ZCAob3ZlcmxheS1lbmQgbykpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVybGF5IG8pKSkp CisgICAgICAgICAgKChhbmQgKG5vdCAoZXEgbmFtZSAnZmFjZSkpCisgICAgICAgICAgICAgICAg KGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisg ICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkpKSkKKworKGRlZnVuICstZGVsZXRlLXBh cmVucy1vdmVybGF5cyAoKQorICAod2hlbiArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wCisgICAg KGRvbGlzdCAoZmFjZSAnKCstcGFyZW5zLW9uZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICst cGFyZW5zLXR3by1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRocmVlLWZhY2UK KyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZm91ci1mYWNlCisg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oZGVmaW5lLWZy aW5nZS1iaXRtYXAgJystZnJpbmdlLWZpbGxlZC1yZWN0YW5nbGUgKCstZnJpbmdlLWhlbHBlci1k ZWNpbWFsCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisi eHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4i CisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iCisieHh4eHh4eC4iKSBuaWwgbmls ICdjZW50ZXIpCisKKyhkZWZpbmUtZnJpbmdlLWJpdG1hcCAnKy1mcmluZ2UtaG9sbG93LXNxdWFy ZSAoKy1mcmluZ2UtaGVscGVyLWRlY2ltYWwKKyIueHh4eHh4LiIKKyIueC4uLi54LiIKKyIueC4u Li54LiIKKyIueC4uLi54LiIKKyIueC4uLi54LiIKKyIueHh4eHh4LiIpIG5pbCBuaWwgJ2NlbnRl cikKKworKGRlZmluZS1mcmluZ2UtYml0bWFwICcrLWZyaW5nZS1maWxsZWQtc3F1YXJlICgrLWZy aW5nZS1oZWxwZXItZGVjaW1hbAorIi54eHh4eHguIgorIi54eHh4eHguIgorIi54eHh4eHguIgor Ii54eHh4eHguIgorIi54eHh4eHguIgorIi54eHh4eHguIikgbmlsIG5pbCAnY2VudGVyKQorCiso ZGVmaW5lLWZyaW5nZS1iaXRtYXAgJystZnJpbmdlLWhvcml6b250YWwtYmFyICgrLWZyaW5nZS1o ZWxwZXItZGVjaW1hbAorInh4eHh4eHguIgorInh4eHh4eHguIikgbmlsIG5pbCAnYm90dG9tKQor CisoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJystZnJpbmdlLWVtcHR5LWxpbmUgKCstZnJpbmdlLWhl bHBlci1kZWNpbWFsCisiLi4uLi4uLi4iCisiLi54eHh4Li4iCisiLi4uLi4uLi4iCisiLi4uLi4u Li4iCisiLi54eHh4Li4iCisiLi4uLi4uLi4iKSBuaWwg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2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRs ZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxvY2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAg KHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2Fs bGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVu dC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJy ZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAgICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1 cnJlbnQtYm91bmRhcnktdGltZXIpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJs ZS1jaGFuZ2UKKyAgICAgICAgICAgICAgKGxhbWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0 by0tdW5kb2FibHktY2hhbmdlZC1idWZmZXJzIChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAg KGZzZXQgJ3VuZG8tYXV0by1hbWFsZ2FtYXRlICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmst Y3Vyc29yLW1vZGUKKyAgICAgICAgKGJsaW5rLWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hl biAobWVtcSAnYmxpbmstY3Vyc29yLWNoZWNrIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAg IChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJ2JsaW5rLWN1cnNvci1jaGVjaykpKQor ICAgICAgKHNldHEgZmMtdmlzaWJsZSB0KQorICAgICAgOzs7IGBhdXRvLWNvbXBvc2l0aW9uLW1v ZGUnIGlzIG5lZWRlZCBmb3IgY3Jvc3NoYWlycyB0byBwcm9wZXJseSBjYWxjdWxhdGUKKyAgICAg IDs7OyBjb29yZGluYXRlcy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dW5kICJw aW5rIikpCisgICJGYWNlIGZvciBgKy1ldmVuLXByZS16di1mYWNlJy4iCisgIDpncm91cCAnKy1t b2RlKQorCisoZGVmZmFjZSArLWV2ZW4taW5hY3RpdmUtcHJlLXp2LWZhY2UKKyAgJygoKChjbGFz cyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGRhcmspKQorICAgICA6Zm9yZWdy b3VuZCAiI2VlZThhYSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFj a2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJibHVlMSIpCisgICAgKCgoY2xhc3Mg Y29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91 bmQgIiNlZWU4YWEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tn cm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAiYmx1ZTEiKQorICAgICgoKGNsYXNzIGNv bG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAgICAoKCh0 eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0IDpm b3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1ldmVuLWluYWN0aXZlLXByZS16di1m YWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLWV2ZW4tYXQtenYtZmFjZQor ICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisg ICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNv bG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA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cyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGRhcmspKQorICAgICA6Zm9y ZWdyb3VuZCAiZ3JlZW4xIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChi YWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgImdyZWVuMSIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVn cm91bmQgImdyZWVuMSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFj a2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJncmVlbjEiKQorICAgICgoKGNsYXNz IGNvbG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAgICAo KCh0eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0 IDpmb3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1wb3N0LWZpbGwtcHJlLXp2LWZh Y2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcG9zdC1maWxsLWluYWN0aXZl LXByZS16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dy b3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgImdyZWVuNCIpCisgICAgKCgoY2xhc3MgY29s b3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5k ICJncmVlbjQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91 bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJncmVlbjQiKQorICAgICgoKGNsYXNzIGNvbG9y KSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAi Z3JlZW40IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgOCkpCisgICAgIDpmb3Jl Z3JvdW5kICJ3aGl0ZSIpCisgICAgKCgodHlwZSB0dHkpIChjbGFzcyBtb25vKSkKKyAgICAgOmlu dmVyc2UtdmlkZW8gdCkKKyAgICAodCA6Zm9yZWdyb3VuZCAicGluayIpKQorICAiRmFjZSBmb3Ig YCstcG9zdC1maWxsLWluYWN0aXZlLXByZS16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQor CisoZGVmZmFjZSArLXBvc3QtZmlsbC1hdC16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInB1cnBs ZTMiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGln aHQpKQorICAgICA6Zm9yZWdyb3VuZCAicmVkMSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4t Y29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInB1cnBsZTMi KQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQp KQorICAgICA6Zm9yZWdyb3VuZCAicmVkMSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29s b3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xh c3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAgKHQgOmZvcmVncm91bmQgInBp bmsiKSkKKyAgIkZhY2UgZm9yIGArLXBvc3QtZmlsbC1hdC16di1mYWNlJy4iCisgIDpncm91cCAn Ky1tb2RlKQorCisoZGVmZmFjZSArLXBvc3QtZmlsbC1pbmFjdGl2ZS1hdC16di1mYWNlCisgICco KCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAg OmZvcmVncm91bmQgInB1cnBsZTQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4 OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAicmVkNCIpCisgICAgKCgo Y2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZv cmVncm91bmQgInB1cnBsZTQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikg KGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAicmVkNCIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAg ICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAg KHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLXBvc3QtZmlsbC1pbmFjdGl2 ZS1hdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLXBvc3QtZmls bC1wb3N0LXp2LWZhY2UKKyAgJygoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChiYWNr Z3JvdW5kIGRhcmspKQorICAgICA6Zm9yZWdyb3VuZCAiUGFsZUdyZWVuMyIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3Jl Z3JvdW5kIC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2NhbF9mbGFn cywgZmNfaW5hY3RpdmVfd2luZG93cyksIGlkeCk7ICsraWR4OworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBt b2RlX2xpbmVfZm9ybWF0KSwgaWR4KTsgKytpZHg7CiAgIFhTRVRGQVNUSU5UIChCVkFSICgmYnVm ZmVyX2xvY2FsX2ZsYWdzLCBhYmJyZXZfbW9kZSksIGlkeCk7ICsraWR4OwogICBYU0VURkFTVElO VCAoQlZBUiAoJmJ1ZmZlcl9sb2NhbF9mbGFncywgb3ZlcndyaXRlX21vZGUpLCBpZHgpOyArK2lk eDsKQEAgLTUyMzEsNiArNTMxMiwyNCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICAvKiBN dXN0IGRvIHRoZXNlIGJlZm9yZSBtYWtpbmcgdGhlIGZpcnN0IGJ1ZmZlciEgKi8KIAogICAvKiBy ZWFsIHNldHVwIGlzIGRvbmUgaW4gYmluZGluZ3MuZWwgKi8KKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBic2V0X21jX3JlYWxfZmFrZV9j dXJzb3IgKCZidWZmZXJfZGVmYXVsdHMsIFFob2xsb3cpOworICBic2V0X21jX2NvbmYgKCZidWZm ZXJfZGVmYXVsdHMsIFFuaWwpOworICBic2V0X21jX2luYWN0aXZlX3dpbmRvd3MgKCZidWZmZXJf ZGVmYXVsdHMsIFF0KTsKKyAgYnNldF9jcm9zc2hhaXJzICgmYnVmZmVyX2RlZmF1bHRzLCBRbmls KTsKKyAgYnNldF9jaF9ob3Jpem9udGFsX3J1bGVyICgmYnVmZmVyX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NvbHVtbiBpbiBpbmFjdGl2ZSB3aW5k b3dzLiAqLworICBMaXNwX09iamVjdCBmY19pbmFjdGl2ZV93aW5kb3dzXzsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogICAvKiBDdXJzb3IgdHlwZSB0byBkaXNwbGF5IGluIG5vbi1z ZWxlY3RlZCB3aW5kb3dzLgogICAgICB0IG1lYW5zIHRvIHVzZSBob2xsb3cgYm94IGN1cnNvci4K ICAgICAgU2VlIGBjdXJzb3ItdHlwZScgZm9yIG90aGVyIHZhbHVlcy4gICovCkBAIC03OTEsMTQg KzgyNSwyMSBAQCBzdHJ1Y3QgYnVmZmVyCiAgICAgIGFuIGluZGlyZWN0IGJ1ZmZlciBzaW5jZSBp dCBjb3VudHMgYXMgaXRzIGJhc2UgYnVmZmVyLiAgKi8KICAgaW50IHdpbmRvd19jb3VudDsKIAor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAv KiBBIG5vbi16ZXJvIHZhbHVlIGluIHNsb3QgSURYIG1lYW5zIHRoYXQgcGVyLWJ1ZmZlciB2YXJp YWJsZQogICAgICB3aXRoIGluZGV4IElEWCBoYXMgYSBsb2NhbCB2YWx1ZSBpbiB0aGlzIGJ1ZmZl ci4gIFRoZSBpbmRleCBJRFgKICAgICAgZm9yIGEgYnVmZmVyLWxvY2FsIHZhcmlhYmxlIGlzIHN0 b3JlZCBpbiB0aGF0IHZhcmlhYmxlJ3Mgc2xvdAogICAgICBpbiBidWZmZXJfbG9jYWxfZmxhZ3Mg YXMgYSBMaXNwIGludGVnZXIuICBJZiB0aGUgaW5kZXggaXMgLTEsCiAgICAgIHRoaXMgbWVhbnMg dGhlIHZhcmlhYmxlIGlzIGFsd2F5cyBsb2NhbCBpbiBhbGwgYnVmZmVycy4gICovCi0jZGVmaW5l IE1BWF9QRVJfQlVGRkVSX1ZBUlMgNTAKKyNkZWZpbmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA2MAog ICBjaGFyIGxvY2FsX2ZsYWdzW01BWF9QRVJfQlVGRkVSX1ZBUlNdOwogCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgIC8qIFNldCB0byB0aGUgbW9kdGltZSBvZiB0aGUgdmlzaXRlZCBm aWxlIHdoZW4gcmVhZCBvciB3cml0dGVuLgogICAgICBtb2R0aW1lLnR2X25zZWMgPT0gTk9ORVhJ U1RFTlRfTU9EVElNRV9OU0VDUyBtZWFucwogICAgICB2aXNpdGVkIGZpbGUgd2FzIG5vbmV4aXN0 ZW50LiAgbW9kdGltZS50dl9uc2VjID09CkBAIC05MDcsNiArOTQ4LDY5IEBAIFhCVUZGRVIgKExp c3BfT2JqZWN0IGEpCiAvKiBNb3N0IGNvZGUgc2hvdWxkIHVzZSB0aGVzZSBmdW5jdGlvbnMgdG8g c2V0IExpc3AgZmllbGRzIGluIHN0cnVjdAogICAgYnVmZmVyLiAgKFNvbWUgc2V0dGVycyB0aGF0 IGFyZSBwcml2YXRlIHRvIGEgc2luZ2xlIC5jIGZpbGUgYXJlCiAgICBkZWZpbmVkIGFzIHN0YXRp YyBpbiB0aG9zZSBmaWxlcy4pICAqLworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog YmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCitJTkxJTkUgdm9pZAorYnNldF9ibHZfbWNfcmVh bF9mYWtlX2N1cnNvciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBi LT5tY19yZW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IHZvaWQKK2JzZXRfYmx2X2ZjX2luYWN0aXZlX3dp bmRvd3MgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+ZmNfaW5h Y3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiBJTkxJTkUgdm9pZAogYnNldF9iaWRpX3BhcmFn cmFwaF9kaXJlY3Rpb24gKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKIHsKZGlm ZiAtLWdpdCBhL3NyYy9kaXNwZXh0ZXJuLmggYi9zcmMvZGlzcGV4dGVybi5oCmluZGV4IDRlOTQ3 ZGEuLjhkYjViMGIgMTAwNjQ0Ci0tLSBhL3NyYy9kaXNwZXh0ZXJuLmgKKysrIGIvc3JjL2Rpc3Bl eHRlcm4uaApAQCAtMTQ1LDYgKzE0NSwxMzEgQEAgdHlwZWRlZiB2b2lkICpFbWFjc19DdXJzb3I7 CiAjZGVmaW5lIE5hdGl2ZVJlY3RhbmdsZSBpbnQKICNlbmRpZgogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCitleHRlcm4gYm9vbCBt Y19zdGRlcnJfcCBFWFRFUk5BTExZX1ZJU0lCTEU7CisKK3N0cnVjdCBnbHlwaDsKKworc3RydWN0 IGdseXBoX3JvdzsKKworc3RydWN0IGdseXBoX21hdHJpeDsKKworZW51bSBkcmF3X2dseXBoc19m YWNlOworCitlbnVtIGdseXBoX3Jvd19hcmVhOworCitzdHJ1Y3QgbWNfbWF0cml4OworCitlbnVt IG1jX2NhY2hlX3R5cGU7CisKK2VudW0gbWNfY3Vyc29yX3R5cGU7CisKK2VudW0gbWNfZmxhdm9y OworCitzdHJ1Y3QgbWNfUkdCOworCitzdHJ1Y3QgbWNfZXNzZW50aWFsczsKKworZW51bSBtY19k cmF3X3Jvd190eXBlOworCitlbnVtIG1jX2VuZ2luZV90eXBlOworCitlbnVtIG1jX3Jvd19wb3Np dGlvbjsKKworZW51bSBtY19yZWRyYXdfcm93X3R5cGU7CisKK2VudW0gZHJhd19nbHlwaF9hY3Rp b247CisKK2V4dGVybiBMaXNwX09iamVjdCBtY19saXN0biAocHRyZGlmZl90LCBMaXNwX09iamVj dCwgLi4uKTsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX250aCAoaW50LCBMaXNwX09iamVjdCk7 CisKK2V4dGVybiBMaXNwX09iamVjdCBtY19hc3NxIChMaXNwX09iamVjdCwgTGlzcF9PYmplY3Qp OworCitleHRlcm4gZW51bSBtY19yb3dfcG9zaXRpb24gbWNfcm93X3Bvc2l0aW9uIChzdHJ1Y3Qg d2luZG93ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKiwgaW50KTsKKworZXh0ZXJuIHB0 cmRpZmZfdCBtY19yZWdpb25fbGltaXQgKGJvb2wpOworCitleHRlcm4gc3RydWN0IGdseXBoICog bWNfZ2V0X2N1cnNvcl9nbHlwaCAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4 ICosCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGds eXBoX3JvdyAqLCBpbnQsIGludCk7CisKK2V4dGVybiB2b2lkIG1jX3h3X2NvbG9yX3ZhbHVlcyAo c3RydWN0IHdpbmRvdyAqLCBMaXNwX09iamVjdCwgc3RydWN0IG1jX1JHQiAqKTsKKworZXh0ZXJu IGJvb2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bHlwaF9tYXRyaXggKiwgc3RydWN0IGdseXBoX3JvdyAq LAorICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKiwgaW50LCBpbnQsIGludCwg aW50LCBpbnQsIGludCwKKyAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlw ZSwgaW50LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosCisgICAgICAgICAgICAgICAgICAgICAgIHN0 cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3NpdGlvbiwgc3RydWN0IG1jX1JHQiwK KyAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19lbmdpbmVfdHlwZSwgYm9vbCwgZW51bSBt Y19kcmF3X3Jvd190eXBlLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2NhY2hlX3R5 cGUpOworCitleHRlcm4gdm9pZCBtY19zZXRfZXNzZW50aWFscyAoc3RydWN0IHdpbmRvdyAqLCBz dHJ1Y3QgbWNfZXNzZW50aWFscyAqKTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19yb3cgKHN0cnVj dCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisg ICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICosIGludCwgaW50LCBpbnQsIHN0 cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNf ZXNzZW50aWFscywgZW51bSBtY19yb3dfcG9zaXRpb24sIGJvb2wsCisgICAgICAgICAgICAgICAg ICAgICAgICAgZW51bSBtY19kcmF3X3Jvd190eXBlKTsKKworZXh0ZXJuIGJvb2wgbWNfcmVkcmF3 X3JvdyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlw aF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZ2x5cGhfcm93X2FyZWEs IGludCwgaW50LCBpbnQsIGJvb2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGRy YXdfZ2x5cGhzX2ZhY2UsIGVudW0gbWNfcmVkcmF3X3Jvd190eXBlKTsKKworZXh0ZXJuIHZvaWQg bWNfcmVzZXRfY2FjaGUgKHN0cnVjdCB3aW5kb3cgKik7CisKK2V4dGVybiB2b2lkIG1jX2RyYXdf Y3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICosIGVudW0g ZHJhd19nbHlwaHNfZmFjZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQs IGludCwgaW50LCBzdHJ1Y3QgbWNfUkdCLCBlbnVtIG1jX2ZsYXZvciwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlLCBpbnQsIGJvb2wsIGJvb2wp OworCitleHRlcm4gdm9pZCBtY19lcmFzZV9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0 IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHN0cnVjdCBtY19tYXRyaXgsIGludCwgaW50LCBpbnQsIGludCwgZW51bSBtY19m bGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUs IGludCk7CisKK2V4dGVybiB2b2lkIG1jX2RyYXdfZXJhc2VfaHlicmlkIChzdHJ1Y3Qgd2luZG93 ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgaW50LCBpbnQsIGludCwgaW50LCBpbnQsIGlu dCwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29y X3R5cGUsIGludCwgc3RydWN0IG1jX1JHQiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBib29sLCBlbnVtIG1jX2ZsYXZvciwgYm9vbCk7CisKK2V4dGVybiBpbnQgbWNfZHJhd19n bHlwaHMgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5 cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfbWF0cml4LCBp bnQsIGVudW0gZ2x5cGhfcm93X2FyZWEsIHB0cmRpZmZfdCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIHB0cmRpZmZfdCwgZW51bSBkcmF3X2dseXBoc19mYWNlLCBpbnQsIGludCwgc3RydWN0 IG1jX1JHQiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfZmxhdm9yLCBlbnVt IG1jX2N1cnNvcl90eXBlLCBpbnQsIGJvb2wsIGJvb2wsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBlbnVtIGRyYXdfZ2x5cGhfYWN0aW9uLCBib29sKTsKKworZXh0ZXJuIHN0cnVjdCBnbHlw aF9tYXRyaXggKiBtY19zYXZlX2dseXBoX21hdHJpeCAoc3RydWN0IGdseXBoX21hdHJpeCAqKTsK KworZXh0ZXJuIHZvaWQgbWNfcmVzdG9yZV9nbHlwaF9tYXRyaXggKHN0cnVjdCBnbHlwaF9tYXRy aXggKiwgc3RydWN0IGdseXBoX21hdHJpeCAqKTsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMg Ki8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIFRleHQgY3Vyc29yIHR5cGVzLiAg Ki8KIAogZW51bSB0ZXh0X2N1cnNvcl9raW5kcwpAQCAtNDA0LDYgKzUyOSwxOCBAQCBzdHJ1Y3Qg Z2x5cGhfc2xpY2UKIAogc3RydWN0IGdseXBoCiB7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaW50IHJlbGF0aXZlX3gsIGhwb3M7CisK KyAgcHRyZGlmZl90IGJ5dGVwb3M7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg LyogUG9zaXRpb24gZnJvbSB3aGljaCB0aGlzIGdseXBoIHdhcyBkcmF3bi4gIElmIGBvYmplY3Qn IGJlbG93IGlzIGEKICAgICAgTGlzcCBzdHJpbmcsIHRoaXMgaXMgYW4gaW5kZXggaW50byB0aGF0 IHN0cmluZy4gIElmIGl0IGlzIGEKICAgICAgYnVmZmVyLCB0aGlzIGlzIGEgcG9zaXRpb24gaW4g dGhhdCBidWZmZXIuICBJbiBhZGRpdGlvbiwgc29tZQpAQCAtMTI3MCw2ICsxNDA3LDI4IEBAIGVu dW0gZHJhd19nbHlwaHNfZmFjZQogCiBzdHJ1Y3QgZ2x5cGhfc3RyaW5nCiB7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBib29sX2Jm IGxlZnRfb3ZlcndyaXR0ZW5fcCA6IDE7CisKKyAgICBib29sX2JmIHJpZ2h0X292ZXJ3cml0dGVu X3AgOiAxOworCisgICAgYm9vbF9iZiByZWN0YW5nbGVfbnVrZWRfcCA6IDE7CisKKyAgICBib29s X2JmIGJhY2tncm91bmRfbnVrZWRfcCA6IDE7CisKKyAgICBlbnVtIGRyYXdfZ2x5cGhfYWN0aW9u CisgICAgeworICAgICAgTUNfRFJBV19HTFlQSF9TVFJJTkcsCisgICAgICBNQ19FUkFTRV9HTFlQ SF9TVFJJTkcKKyAgICB9IGFjdGlvbl90eXBlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAgIC8qIFgtb3JpZ2luIG9mIHRoZSBzdHJpbmcuICAqLwogICBpbnQgeDsKIApAQCAtMjgz NCw2ICsyOTkzLDI5IEBAIHR5cGVkZWYgdm9pZCAoKmZyYW1lX3Bhcm1faGFuZGxlcikgKHN0cnVj dCBmcmFtZSAqLCBMaXNwX09iamVjdCwgTGlzcF9PYmplY3QpOwogCiBzdHJ1Y3QgcmVkaXNwbGF5 X2ludGVyZmFjZQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYG5zdGVybS5tYCB8IGB3 MzJ0ZXJtLmNgIHwgYHh0ZXJtLmNgIG11c3QgYmUgaW4gdGhlCitleGFjdCBzYW1lIG9yZGVyIGFz IHRoZSBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgLyog YG1jX25zX2RyYXdfd2luZG93X2N1cnNvcicgfCBgbWNfdzMyX2RyYXdfd2luZG93X2N1cnNvcicg fCBgbWNfeF9kcmF3X3dpbmRvd19jdXJzb3InICovCisgIHZvaWQgKCptY19zY3JpYmVfY3Vyc29y KSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAgICAg ICBzdHJ1Y3QgZ2x5cGhfcm93ICpnbHlwaF9yb3csIGludCB4LCBpbnQgZngsIGludCB5LCBpbnQg ZnksIGludCBocG9zLAorICAgICAgICBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCwgc3RydWN0IG1j X1JHQiBsc2wsIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsCisgICAgICAgIGludCBj dXJzb3Jfd2lkdGgsIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwgYm9vbCBvbl9wLCBib29s IGFjdGl2ZV9wKTsKKworICAvKiBgbWNfbnNfZHJhd19nbHlwaF9zdHJpbmcnIHwgYG1jX3czMl9k cmF3X2dseXBoX3N0cmluZycgfCBgbWNfeF9kcmF3X2dseXBoX3N0cmluZycgKi8KKyAgdm9pZCAo Km1jX3NjcmliZV9zdHJpbmcpIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICptYXRyaXgsCisgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgc3RydWN0IG1j X21hdHJpeCBtY19tYXRyaXgsIHN0cnVjdCBtY19SR0IgbHNsLAorICAgICAgICBlbnVtIG1jX2Zs YXZvciBnbHlwaF9mbGF2b3IsIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsIGludCB3 ZCwKKyAgICAgICAgYm9vbCBhY3RpdmVfcCwgYm9vbCBjdXJzb3JfZ2NfcCk7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgLyogSGFuZGxlcnMgZm9yIHNldHRpbmcgZnJhbWUgcGFy YW1ldGVycy4gICovCiAgIGZyYW1lX3Bhcm1faGFuZGxlciAqZnJhbWVfcGFybV9oYW5kbGVyczsK IApkaWZmIC0tZ2l0IGEvc3JjL2Rpc3BuZXcuYyBiL3NyYy9kaXNwbmV3LmMKaW5kZXggMDEzMWI2 My4uODU4N2ZlYiAxMDA2NDQKLS0tIGEvc3JjL2Rpc3BuZXcuYworKysgYi9zcmMvZGlzcG5ldy5j CkBAIC01Niw2ICs1NiwxNzgyIEBAIGFsb25nIHdpdGggR05VIEVtYWNzLiAgSWYgbm90LCBzZWUg PGh0dHBzOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4gICovCiAjaW5jbHVkZSAidzMyLmgiCiAj ZW5kaWYKIAwKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExF LUNVUlNPUlMgKi8KKworc3RydWN0IGdseXBoc19za2lwcGVkCit7CisgIHB0cmRpZmZfdCBhbGxv Y2F0ZWQ7CisgIHB0cmRpZmZfdCB1c2VkOworICBzdHJ1Y3Qgc2tpcHBlZF9pdGVtcworICAgIHsK KyAgICAgIGludCB4OworICAgICAgaW50IGhwb3M7CisgICAgICBib29sIGVuYWJsZWRfcDsKKyAg ICB9ICpza2lwcGVkOworfSBhcnJheV9nbHlwaHNfc2tpcHBlZDsKKworc3RydWN0IG1jX3Jvd19l bnRyeQoreworICBpbnQgb2xkX3VzZXMsIG5ld191c2VzOworICBpbnQgbmV3X2xpbmVfbnVtYmVy OworICBwdHJkaWZmX3QgYnVja2V0OworICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3c7CisgIHN0cnVj dCBtY19yb3dfZW50cnkgKm5leHQ7Cit9Oworc3RhdGljIHN0cnVjdCBtY19yb3dfZW50cnkgKm1j X3Jvd19lbnRyeV9wb29sOworc3RhdGljIHB0cmRpZmZfdCBtY19yb3dfZW50cnlfcG9vbF9zaXpl Oworc3RhdGljIHB0cmRpZmZfdCBtY19yb3dfZW50cnlfaWR4Oworc3RhdGljIHN0cnVjdCBtY19y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gPSB4bWFsbG9jIChuYnl0ZXMpOworICAgICAgICAg ICAgICBtZW1jcHkgKHNhdmVkLnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0sIG1hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdLCBuYnl0ZXMpOworICAgICAgICAgICAgfQorICAg ICAgICB9CisgICAgfQorICByZXR1cm4gc2F2ZWQ7Cit9CisKK3ZvaWQKK21jX3hmcmVlX2NhY2hl X21hdHJpeCAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCAqbWF0cml4KQorewor ICBpZiAobWF0cml4LT52cG9zID09IE5VTEwpCisgICAgcmV0dXJuOworICBmb3IgKGludCB2bnRo ID0gMDsgdm50aCA8IG1hdHJpeC0+dnBvc19hbGxvY2F0ZWQ7ICsrdm50aCkKKyAgICB7CisgICAg ICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAg ICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAg ICAgICBpZiAobWF0cml4LT52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSA+ IDApCisgICAgICAgICAgeworICAgICAgICAgICAgeGZyZWUgKG1hdHJpeC0+dnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXSk7CisgICAgICAgICAgICBtYXRyaXgtPnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV0gPSBOVUxMOworICAgICAgICAgICAgbWF0cml4LT52cG9zW3ZudGhdLmNhY2hl X2FsbG9jYXRlZFtjYWNoZV90eXBlXSA9IDA7CisgICAgICAgICAgICBtYXRyaXgtPnZwb3Nbdm50 aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSA9IDA7CisgICAgICAgICAgfQorICAgIH0KKyAgeGZy ZWUgKG1hdHJpeC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k7CisgICAgICAgICAgZC0+ZW5h YmxlZF9wID0gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIGJyZWFr OworICAgIH0KKyNpZmRlZiBIQVZFX1hXSURHRVRTCisgIC8qIEN1cnJlbnRseSB0aGlzIHNlZW1z IG5lZWRlZCB0byBkZXRlY3QgeHdpZGdldCBtb3ZlbWVudCByZWxpYWJseS4gKi8KKyAgICByZXR1 cm4gMDsKKyNlbmRpZgorICAvKiBHaXZlIHVwIGlmIHNvbWUgcm93cyBpbiB0aGUgZGVzaXJlZCBt YXRyaXggYXJlIG5vdCBlbmFibGVkLiAqLworICBpZiAoISBNQVRSSVhfUk9XX0VOQUJMRURfUCAo ZGVzaXJlZF9tYXRyaXgsIGkpKQorICAgIHJldHVybiAtMTsKKyAgZmlyc3Rfb2xkID0gZmlyc3Rf bmV3ID0gaTsKKyAgLyogU2V0IGxhc3RfbmV3IHRvIHRoZSBpbmRleCArIDEgb2YgdGhlIHJvdyB0 aGF0IHJlYWNoZXMgdGhlCisgICAgIGJvdHRvbSBib3VuZGFyeSBpbiB0aGUgZGVzaXJlZCBtYXRy aXguICBHaXZlIHVwIGlmIHdlIGZpbmQgYQorICAgICBkaXNhYmxlZCByb3cgYmVmb3JlIHdlIHJl YWNoIHRoZSBib3R0b20gYm91bmRhcnkuICovCisgIGkgPSBmaXJzdF9uZXcgKyAxOworICB3aGls ZSAoaSA8IGRlc2lyZWRfbWF0cml4LT5ucm93cyAtIDEpCisgICAgeworICAgICAgaW50IGJvdHRv bTsKKyAgICAgIGlmICghIE1BVFJJWF9ST1dfRU5BQkxFRF9QIChkZXNpcmVkX21hdHJpeCwgaSkp CisgICAgICAgIHJldHVybiAwOworICAgICAgYm90dG9tID0gTUFUUklYX1JPV19CT1RUT01fWSAo TUFUUklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIGkpKTsKKyAgICAgIGlmIChib3R0b20gPD0geWIp CisgICAgICAgICsraTsKKyAgICAgIG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9hbG1vc3RfcHJpbWUgKDExMykgd291 bGQgYmUgMTI3LiAqLworICB7CisgICAgdmVyaWZ5IChORVhUX0FMTU9TVF9QUklNRV9MSU1JVCA9 PSAxMSk7CisgICAgZW51bSB7IG5leHRfYWxtb3N0X3ByaW1lX2luY3JlbWVudF9tYXggPSAxMCB9 OworICAgIHB0cmRpZmZfdCByb3dfdGFibGVfbWF4ID0KKyAgICAgIChtaW4gKFBUUkRJRkZfTUFY LCBTSVpFX01BWCkgLyAoMyAqIHNpemVvZiAqbWNfcm93X3RhYmxlKQorICAgICAgIC0gbmV4dF9h bG1vc3RfcHJpbWVfaW5jcmVtZW50X21heCk7CisgICAgcHRyZGlmZl90IGN1cnJlbnRfbnJvd3Nf bWF4ID0gcm93X3RhYmxlX21heCAtIGRlc2lyZWRfbWF0cml4LT5ucm93czsKKyAgICBpZiAoY3Vy cmVudF9ucm93c19tYXggPCBjdXJyZW50X21hdHJpeC0+bnJvd3MpCisgICAgICBtZW1vcnlfZnVs bCAoU0laRV9NQVgpOworICB9CisgIC8qIFJlYWxsb2NhdGUgdmVjdG9ycywgdGFibGVzIGV0Yy4g aWYgbmVjZXNzYXJ5LiAqLworICBpZiAoY3VycmVudF9tYXRyaXgtPm5yb3dzID4gbWNfb2xkX2xp bmVzX3NpemUpCisgICAgbWNfb2xkX2xpbmVzID0geHBhbGxvYyAobWNfb2xkX2xpbmVzLCAmbWNf b2xkX2xpbmVzX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudF9tYXRyaXgt Pm5yb3dzIC0gbWNfb2xkX2xpbmVzX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgSU5U X01BWCwgc2l6ZW9mICptY19vbGRfbGluZXMpOworICBpZiAoZGVzaXJlZF9tYXRyaXgtPm5yb3dz ID4gbWNfbmV3X2xpbmVzX3NpemUpCisgICAgbWNfbmV3X2xpbmVzID0geHBhbGxvYyAobWNfbmV3 X2xpbmVzLCAmbWNfbmV3X2xpbmVzX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgZGVz aXJlZF9tYXRyaXgtPm5yb3dzIC0gbWNfbmV3X2xpbmVzX3NpemUsCisgICAgICAgICAgICAgICAg ICAgICAgICAgSU5UX01BWCwgc2l6ZW9mICptY19uZXdfbGluZXMpOworICBuID0gZGVzaXJlZF9t YXRyaXgtPm5yb3dzOworICBuICs9IGN1cnJlbnRfbWF0cml4LT5ucm93czsKKyAgaWYgKG1jX3Jv d190YWJsZV9zaXplIDwgMyAqIG4pCisgICAgeworICAgICAgcHRyZGlmZl90IHNpemUgPSBuZXh0 X2FsbW9zdF9wcmltZSAoMyAqIG4pOworICAgICAgbWNfcm93X3RhYmxlID0geG5yZWFsbG9jICht Y19yb3dfdGFibGUsIHNpemUsIHNpemVvZiAqbWNfcm93X3RhYmxlKTsKKyAgICAgIG1jX3Jvd190 YWJsZV9zaXplID0gc2l6ZTsKKyAgICAgIG1lbXNldCAobWNfcm93X3RhYmxlLCAwLCBzaXplICog c2l6ZW9mICptY19yb3dfdGFibGUpOworICAgIH0KKyAgaWYgKG4gPiBtY19yb3dfZW50cnlfcG9v bF9zaXplKQorICAgIG1jX3Jvd19lbnRyeV9wb29sID0geHBhbGxvYyAobWNfcm93X2VudHJ5X3Bv b2wsICZtY19yb3dfZW50cnlfcG9vbF9zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbiAtIG1jX3Jvd19lbnRyeV9wb29sX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAtMSwgc2l6ZW9mICptY19yb3dfZW50cnlfcG9vbCk7CisgIGlmIChkZXNpcmVkX21hdHJp eC0+bnJvd3MgPiBtY19ydW5zX3NpemUpCisgICAgeworICAgICAgbWNfcnVucyA9IHhucmVhbGxv YyAobWNfcnVucywgZGVzaXJlZF9tYXRyaXgtPm5yb3dzLCBzaXplb2YgKm1jX3J1bnMpOworICAg ICAgbWNfcnVuX3Bvb2wgPSB4bnJlYWxsb2MgKG1jX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dW1iZXIgPSBpOworICAgICAgbWNfbmV3X2xpbmVzW2ldID0gZW50cnk7CisgICAgfQorICAvKiBJ ZGVudGlmeSBtb3ZlcyBiYXNlZCBvbiBsaW5lcyB0aGF0IGFyZSB1bmlxdWUgYW5kIGVxdWFsCisg ICAgIGluIGJvdGggbWF0cmljZXMuICovCisgIGZvciAoaSA9IGZpcnN0X29sZDsgaSA8IGxhc3Rf b2xkOykKKyAgICBpZiAobWNfb2xkX2xpbmVzW2ldCisgICAgICAgICYmIG1jX29sZF9saW5lc1tp XS0+b2xkX3VzZXMgPT0gMQorICAgICAgICAmJiBtY19vbGRfbGluZXNbaV0tPm5ld191c2VzID09 IDEpCisgICAgICB7CisgICAgICAgIGludCBwLCBxOworICAgICAgICBpbnQgbmV3X2xpbmUgPSBt Y19vbGRfbGluZXNbaV0tPm5ld19saW5lX251bWJlcjsKKyAgICAgICAgc3RydWN0IHJ1biAqcnVu ID0gbWNfcnVuX3Bvb2wgKyBydW5faWR4Kys7CisgICAgICAgIC8qIFJlY29yZCBtb3ZlLiAqLwor ICAgICAgICBydW4tPmN1cnJlbnRfdnBvcyA9IGk7CisgICAgICAgIHJ1bi0+Y3VycmVudF95ID0g TUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkpLT55OworICAgICAgICBydW4tPmRlc2lyZWRf dnBvcyA9IG5ld19saW5lOworICAgICAgICBydW4tPmRlc2lyZWRfeSA9IE1BVFJJWF9ST1cgKGRl c2lyZWRfbWF0cml4LCBuZXdfbGluZSktPnk7CisgICAgICAgIHJ1bi0+bnJvd3MgPSAxOworICAg ICAgICBydW4tPmhlaWdodCA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBpKS0+aGVpZ2h0 OworICAgICAgICAvKiBFeHRlbmQgYmFja3dhcmQuICovCisgICAgICAgIHAgPSBpIC0gMTsKKyAg ICAgICAgcSA9IG5ld19saW5lIC0gMTsKKyAgICAgICAgd2hpbGUgKHAgPiBmaXJzdF9vbGQKKyAg ICAgICAgICAgICAgICYmIHEgPiBmaXJzdF9uZXcKKyAgICAgICAgICAgICAgICYmIG1jX29sZF9s aW5lc1twXSA9PSBtY19uZXdfbGluZXNbcV0pCisgICAgICAgICAgeworICAgICAgICAgICAgaW50 IGggPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgcCktPmhlaWdodDsKKyAgICAgICAgICAg IC0tcnVuLT5jdXJyZW50X3Zwb3M7CisgICAgICAgICAgICAtLXJ1bi0+ZGVzaXJlZF92cG9zOwor ICAgICAgICAgICAgKytydW4tPm5yb3dzOworICAgICAgICAgICAgcnVuLT5oZWlnaHQgKz0gaDsK KyAgICAgICAgICAgIHJ1bi0+ZGVzaXJlZF95IC09IGg7CisgICAgICAgICAgICBydW4tPmN1cnJl bnRfeSAtPSBoOworICAgICAgICAgICAgLS1wLCAtLXE7CisgICAgICAgICAgfQorICAgICAgICAv KiBFeHRlbmQgZm9yd2FyZC4gKi8KKyAgICAgICAgcCA9IGkgKyAxOworICAgICAgICBxID0gbmV3 X2xpbmUgKyAxOworICAgICAgICB3aGlsZSAocCA8IGxhc3Rfb2xkCisgICAgICAgICAgICAgICAm JiBxIDwgbGFzdF9uZXcKKyAgICAgICAgICAgICAgICYmIG1jX29sZF9saW5lc1twXSA9PSBtY19u ZXdfbGluZXNbcV0pCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IGggPSBNQVRSSVhfUk9X IChjdXJyZW50X21hdHJpeCwgcCktPmhlaWdodDsKKyAgICAgICAgICAgICsrcnVuLT5ucm93czsK KyAgICAgICAgICAgIHJ1bi0+aGVpZ2h0ICs9IGg7CisgICAgICAgICAgICArK3AsICsrcTsKKyAg ICAgICAgICB9CisgICAgICAgIC8qIEluc2VydCBydW4gaW50byBsaXN0IG9mIGFsbCBydW5zLiAg T3JkZXIgcnVucyBieSBjb3BpZWQKKyAgICAgICAgICAgcGl4ZWwgbGluZXMuICBOb3RlIHRoYXQg d2UgcmVjb3JkIHJ1bnMgdGhhdCBkb24ndCBoYXZlIHRvCisgICAgICAgICAgIGJlIGNvcGllZCBi ZWNhdXNlIHRoZXkgYXJlIGFscmVhZHkgaW4gcGxhY2UuICBUaGlzIGlzIGRvbmUKKyAgICAgICAg ICAgYmVjYXVzZSB3ZSBjYW4gYXZvaWQgY2FsbGluZyB1cGRhdGVfd2luZG93X2xpbmUgaW4gdGhp cworICAgICAgICAgICBjYXNlLiAqLworICAgICAgICBmb3IgKHAgPSAwOyBwIDwgbnJ1bnMgJiYg bWNfcnVuc1twXS0+aGVpZ2h0ID4gcnVuLT5oZWlnaHQ7ICsrcCkKKyAgICAgICAgICA7CisgICAg ICAgIGZvciAocSA9IG5ydW5zOyBxID4gcDsgLS1xKQorICAgICAgICAgIG1jX3J1bnNbcV0gPSBt Y19ydW5zW3EgLSAxXTsKKyAgICAgICAgbWNfcnVuc1twXSA9IHJ1bjsKKyAgICAgICAgKytucnVu czsKKyAgICAgICAgaSArPSBydW4tPm5yb3dzOworICAgICAgfQorICAgICAgZWxzZQorICAgICAg ICArK2k7CisgIC8qIERvIHRoZSBtb3Zlcy4gIERvIGl0IGluIGEgd2F5IHRoYXQgd2UgZG9uJ3Qg b3ZlcndyaXRlIHNvbWV0aGluZworICAgICB3ZSB3YW50IHRvIGNvcHkgbGF0ZXIgb24uICBUaGlz IGlzIG5vdCBzb2x2YWJsZSBpbiBnZW5lcmFsCisgICAgIGJlY2F1c2UgdGhlcmUgaXMgb25seSBv bmUgZGlzcGxheSBhbmQgd2UgZG9uJ3QgaGF2ZSBhIHdheSB0bworICAgICBleGNoYW5nZSBhcmVh cyBvbiB0aGlzIGRpc3BsYXkuICBFeGFtcGxlOgorICAgICAgICAgICstLS0tLS0tLS0tLSsgICAg ICAgKy0tLS0tLS0tLS0tKworICAgICAgICAgIHwgICAgIEEgICAgIHwgICAgICAgfCAgICAgQiAg ICAgfAorICAgICAgICAgICstLS0tLS0tLS0tLSsgIC0tPiAgKy0tLS0tLS0tLS0tKworICAgICAg ICAgIHwgICAgIEIgICAgIHwgICAgICAgfCAgICAgQSAgICAgfAorICAgICAgICAgICstLS0tLS0t LS0tLSsgICAgICAgKy0tLS0tLS0tLS0tKworICAgICBJbnN0ZWFkLCBwcmVmZXIgYmlnZ2VyIG1v dmVzLCBhbmQgaW52YWxpZGF0ZSBtb3ZlcyB0aGF0IHdvdWxkCisgICAgIGNvcHkgZnJvbSB3aGVy ZSB3ZSBjb3BpZWQgdG8uICovCisgIGZvciAoaSA9IDA7IGkgPCBucnVuczsgKytpKQorICAgIGlm IChtY19ydW5zW2ldLT5ucm93cyA+IDApCisgICAgICB7CisgICAgICAgIHN0cnVjdCBydW4gKnIg PSBtY19ydW5zW2ldOworICAgICAgICBpZiAoci0+Y3VycmVudF95ICE9IHItPmRlc2lyZWRfeSkK KyAgICAgICAgICB7CisgICAgICAgICAgICAvLyAgZnByaW50ZiAoc3RkZXJyLCAiJXM6ICByLT5j dXJyZW50L2Rlc2lyZWRfdnBvcyAoJWQvJWQpIHwgci0+Y3VycmVudC9kZXNpcmVkX3kgKCVkLyVk KVxuIiwKKyAgICAgICAgICAgIC8vICAgICAgICAgICByLT5jdXJyZW50X3kgPCByLT5kZXNpcmVk X3kgPyAi4oaTIiA6ICLihpEiLAorICAgICAgICAgICAgLy8gICAgICAgICAgIHItPmN1cnJlbnRf dnBvcywgci0+ZGVzaXJlZF92cG9zLCByLT5jdXJyZW50X3ksIHItPmRlc2lyZWRfeSk7CisgICAg ICAgICAgICAvLyAgcmlmLT5jbGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisgICAgICAgICAg ICAvLyAgcmlmLT5zY3JvbGxfcnVuX2hvb2sgKHcsIHIpOworICAgICAgICAgIH0KKyAgICAgICAg LyogVHJ1bmNhdGUgcnVucyB0aGF0IGNvcHkgdG8gd2hlcmUgd2UgY29waWVkIHRvLCBhbmQKKyAg ICAgICAgICAgaW52YWxpZGF0ZSBydW5zIHRoYXQgY29weSBmcm9tIHdoZXJlIHdlIGNvcGllZCB0 by4gKi8KKyAgICAgICAgZm9yIChqID0gbnJ1bnMgLSAxOyBqID4gaTsgLS1qKQorICAgICAgICAg IHsKKyAgICAgICAgICAgIHN0cnVjdCBydW4gKnAgPSBtY19ydW5zW2pdOworICAgICAgICAgICAg Ym9vbCB0cnVuY2F0ZWRfcCA9IDA7CisgICAgICAgICAgICBpZiAocC0+bnJvd3MgPiAwCisgICAg ICAgICAgICAgICAgJiYgcC0+ZGVzaXJlZF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0Cisg ICAgICAgICAgICAgICAgJiYgcC0+ZGVzaXJlZF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJlZF95 KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaWYgKHAtPmRlc2lyZWRfeSA8IHIt PmRlc2lyZWRfeSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgcC0+ bnJvd3MgPSByLT5kZXNpcmVkX3Zwb3MgLSBwLT5kZXNpcmVkX3Zwb3M7CisgICAgICAgICAgICAg ICAgICAgIHAtPmhlaWdodCA9IHItPmRlc2lyZWRfeSAtIHAtPmRlc2lyZWRfeTsKKyAgICAgICAg ICAgICAgICAgICAgdHJ1bmNhdGVkX3AgPSAxOworICAgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg aW50IG5yb3dzX2NvcGllZCA9IChyLT5kZXNpcmVkX3Zwb3MgKyByLT5ucm93cworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcC0+ZGVzaXJlZF92cG9zKTsKKyAgICAg ICAgICAgICAgICAgICAgaWYgKHAtPm5yb3dzIDw9IG5yb3dzX2NvcGllZCkKKyAgICAgICAgICAg ICAgICAgICAgICBwLT5ucm93cyA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaGVp Z2h0X2NvcGllZCA9IChyLT5kZXNpcmVkX3kgKyByLT5oZWlnaHQKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwLT5kZXNpcmVkX3kpOworICAgICAgICAg ICAgICAgICAgICAgICAgICBwLT5jdXJyZW50X3Zwb3MgKz0gbnJvd3NfY29waWVkOworICAgICAg ICAgICAgICAgICAgICAgICAgICBwLT5kZXNpcmVkX3Zwb3MgKz0gbnJvd3NfY29waWVkOworICAg ICAgICAgICAgICAgICAgICAgICAgICBwLT5ucm93cyAtPSBucm93c19jb3BpZWQ7CisgICAgICAg ICAgICAgICAgICAgICAgICAgIHAtPmN1cnJlbnRfeSArPSBoZWlnaHRfY29waWVkOworICAgICAg ICAgICAgICAgICAgICAgICAgICBwLT5kZXNpcmVkX3kgKz0gaGVpZ2h0X2NvcGllZDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgcC0+aGVpZ2h0IC09IGhlaWdodF9jb3BpZWQ7CisgICAgICAg ICAgICAgICAgICAgICAgICAgIHRydW5jYXRlZF9wID0gMTsKKyAgICAgICAgICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAg aWYgKHItPmN1cnJlbnRfeSAhPSByLT5kZXNpcmVkX3kKKyAgICAgICAgICAgICAgICAvKiBUaGUg Y29uZGl0aW9uIGJlbG93IGlzIGVxdWl2YWxlbnQgdG8KKyAgICAgICAgICAgICAgICAgICAoKHAt PmN1cnJlbnRfeSA+PSByLT5kZXNpcmVkX3kKKyAgICAgICAgICAgICAgICAgICAgICYmIHAtPmN1 cnJlbnRfeSA8IHItPmRlc2lyZWRfeSArIHItPmhlaWdodCkKKyAgICAgICAgICAgICAgICAgICAg fHwgKHAtPmN1cnJlbnRfeSArIHAtPmhlaWdodCA+IHItPmRlc2lyZWRfeQorICAgICAgICAgICAg ICAgICAgICAgICAgJiYgKHAtPmN1cnJlbnRfeSArIHAtPmhlaWdodAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDw9IHItPmRlc2lyZWRfeSArIHItPmhlaWdodCkpKQorICAgICAgICAgICAg ICAgICAgIGJlY2F1c2Ugd2UgaGF2ZSAwIDwgcC0+aGVpZ2h0IDw9IHItPmhlaWdodC4gKi8KKyAg ICAgICAgICAgICAgICAmJiBwLT5jdXJyZW50X3kgPCByLT5kZXNpcmVkX3kgKyByLT5oZWlnaHQK KyAgICAgICAgICAgICAgICAmJiBwLT5jdXJyZW50X3kgKyBwLT5oZWlnaHQgPiByLT5kZXNpcmVk X3kpCisgICAgICAgICAgICAgIHAtPm5yb3dzID0gMDsKKyAgICAgICAgICAgIC8qIFJlb3JkZXIg cnVucyBieSBjb3BpZWQgcGl4ZWwgbGluZXMgaWYgdHJ1bmNhdGVkLiAqLworICAgICAgICAgICAg aWYgKHRydW5jYXRlZF9wICYmIHAtPm5yb3dzID4gMCkKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIGludCBrID0gbnJ1bnMgLSAxOworICAgICAgICAgICAgICAgIHdoaWxlIChtY19y dW5zW2tdLT5ucm93cyA9PSAwIHx8IG1jX3J1bnNba10tPmhlaWdodCA8IHAtPmhlaWdodCkKKyAg ICAgICAgICAgICAgICAgIGstLTsKKyAgICAgICAgICAgICAgICBtZW1tb3ZlIChtY19ydW5zICsg aiwgbWNfcnVucyArIGogKyAxLCAoayAtIGopICogc2l6ZW9mICgqbWNfcnVucykpOworICAgICAg ICAgICAgICAgIG1jX3J1bnNba10gPSBwOworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQor ICAgICAgICAvKiBBc3NpZ24gbWF0cml4IHJvd3MuICovCisgICAgICAgIGZvciAoaiA9IDA7IGog PCByLT5ucm93czsgKytqKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9y b3cgKmZyb20sICp0bzsKKyAgICAgICAgICAgIGJvb2wgdG9fb3ZlcmxhcHBlZF9wOworICAgICAg ICAgICAgdG8gPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgci0+ZGVzaXJlZF92cG9zICsg aik7CisgICAgICAgICAgICBmcm9tID0gTUFUUklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIHItPmRl c2lyZWRfdnBvcyArIGopOworICAgICAgICAgICAgdG9fb3ZlcmxhcHBlZF9wID0gdG8tPm92ZXJs YXBwZWRfcDsKKyAgICAgICAgICAgIGZyb20tPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gZnJv bS0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wOworICAgICAgICAgICAgYXNzaWduX3JvdyAodG8s IGZyb20pOworICAgICAgICAgICAgLyogVGhlIGFib3ZlIGBhc3NpZ25fcm93JyBhY3R1YWxseSBk b2VzIHN3YXAsIHNvIGlmIHdlIGhhZAorICAgICAgICAgICAgICAgYW4gb3ZlcmxhcCBpbiB0aGUg Y29weSBkZXN0aW5hdGlvbiBvZiB0d28gcnVucywgdGhlbgorICAgICAgICAgICAgICAgdGhlIHNl Y29uZCBydW4gd291bGQgYXNzaWduIGEgcHJldmlvdXNseSBkaXNhYmxlZCBib2d1cworICAgICAg ICAgICAgICAgcm93LiAgQnV0IHRoYW5rcyB0byB0aGUgdHJ1bmNhdGlvbiBjb2RlIGluIHRoZQor ICAgICAgICAgICAgICAgcHJlY2VkaW5nIGZvci1sb29wLCB3ZSBubyBsb25nZXIgaGF2ZSBzdWNo IGFuIG92ZXJsYXAsCisgICAgICAgICAgICAgICBhbmQgdGh1cyB0aGUgYXNzaWduZWQgcm93IHNo b3VsZCBhbHdheXMgYmUgZW5hYmxlZC4gKi8KKyAgICAgICAgICAgIGVhc3NlcnQgKHRvLT5lbmFi bGVkX3ApOworICAgICAgICAgICAgZnJvbS0+ZW5hYmxlZF9wID0gZmFsc2U7CisgICAgICAgICAg ICB0by0+b3Zlcmx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isgIG9mIHJvdyBzcGFjZSBnbHlwaCB3aXRoIGEgY2hhcnBvcyBvZiAw LiAgVGhlIG90aGVyIGNvbmRpdGlvbnMgdGVzdCBmb3IgYW4gZW1wdHkKKyAgYnVmZmVyIChub3Qg bmFycm93ZWQpLCBvciBhbiBlbXB0eSBuYXJyb3dlZCBidWZmZXIuICovCisgIGJvb2wgcm93X2F0 X3p2X3AgPSAoKHZwb3MgIT0gMAorICAgICAgICAgICAgICAgICAgICAgICAmJiAoY3VycmVudF9y b3cgLSAxKS0+dXNlZFtURVhUX0FSRUFdID4gMAorICAgICAgICAgICAgICAgICAgICAgICAmJiBw cmV2X21hdHJpeF9yb3dfc3RhcnRfYnl0ZXBvcyAhPSBwcmV2X21hdHJpeF9yb3dfZW5kX2J5dGVw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgIShjdXJyZW50X3JvdyAtIDEpLT5lbmRzX2F0 X3p2X3AKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgbWF0cml4X3Jvd19zdGFydF9ieXRlcG9z ID09IG1hdHJpeF9yb3dfZW5kX2J5dGVwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZGVz aXJlZF9yb3ctPmVuZHNfYXRfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICB8fCAoKChoZWFk ZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPT0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIHx8IChoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCAmJiB2cG9zID09IDApKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBidWZmZXJfbmFycm93ZWRfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBib2JfcmVzcGVjdF9uYXJyb3cgPT0gZW9iX3Jlc3BlY3RfbmFycm93KQorICAg ICAgICAgICAgICAgICAgICAgIHx8ICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA9 PSAxKQorICAgICA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KQorICAg IGZwcmludGYgKHN0ZGVyciwgIm1jX3VwZGF0ZV90ZXh0X2FyZWEgKCVzKTogIHZwb3MgKCVkKVxu IiwKKyAgICAgICAgICAgICAgICAgICAgICBtY193aW5kb3cgKHcpLCB2cG9zKTsKKyAgLyogSW5h c211Y2ggYXMgd2UgcHJvY2VzcyB0aGUgY3Vyc29yIHJvdyBiZWZvcmUgYWxsIG90aGVyIHJvd3Ms IHdlIGNhbiByZWx5CisgIHVwb24gdGhlIHByZXZpb3VzIGBkZXNpcmVkX3Jvd2AgdG8gYmUgYWNj dXJhdGUuICovCisgIGVudW0gbWNfcm93X3Bvc2l0aW9uIHJvd19wb3NpdGlvbiA9ICBtY19yb3df cG9zaXRpb24gKHcsIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBkZXNpcmVkX3JvdworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IGN1cnJlbnRfcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBkZXNpcmVkX3JvdywgdnBvcyk7CisgIC8qIElmIHJvd3MgYXJlIGF0IGRp ZmZlcmVudCBYIG9yIFksIG9yIHJvd3MgaGF2ZSBkaWZmZXJlbnQgaGVpZ2h0LAorICAgICBvciB0 aGUgY3VycmVudCByb3cgaXMgbWFya2VkIGludmFsaWQsIHdyaXRlIHRoZSBlbnRpcmUgbGluZS4g Ki8KKyAgaWYgKCFjdXJyZW50X3Jvdy0+ZW5hYmxlZF9wCisgICAgICB8fCBkZXNpcmVkX3Jvdy0+ eSAhPSBjdXJyZW50X3Jvdy0+eQorICAgICAgfHwgZGVzaXJlZF9yb3ctPmFzY2VudCAhPSBjdXJy ZW50X3Jvdy0+YXNjZW50CisgICAgICB8fCBkZXNpcmVkX3Jvdy0+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m IChkZWJ1Z19wKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJXUklURSBFTlRJUkUgUk9XOlxu XAorICAgICAgICAgIHZwb3MgKCVkKSB8IGNoYXIgKCVkLyVzKSB8IHN0YXJ0X3g6ICglZCkgfCBz dGFydF9ocG9zICglZC8lZClcbiIsCisgICAgICAgICAgdnBvcywgZGVzaXJlZF9yb3ctPmdseXBo c1tURVhUX0FSRUFdLT51LmNoLAorICAgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChkZXNpcmVk X3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0tPnUuY2gpLAorICAgICAgICAgIGRlc2lyZWRfcm93LT54 LCAwLCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSk7CisgICAgICBpZiAoZGVzaXJl ZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgeworICAgICAgICAgIGJsb2NrX2lucHV0 ICgpOworICAgICAgICAgIGludCBsZW4gPSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdOwor ICAgICAgICAgIGludCBocG9zID0gZGVzaXJlZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdIC0gdXBk YXRlZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgIHctPm91dHB1dF9jdXJzb3Iu eCA9CisgICAgICAgICAgICBtY19kcmF3X2dseXBocyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0 ZWRfcm93LCB3LT5tY19tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+b3V0 cHV0X2N1cnNvci54LCBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4sCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCwgdnBvcywgbHNsLCBnbHlwaF9mbGF2 b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIHdkLC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b24sIG1ha2Ugc3Vy ZSB3ZSB3cml0ZSBhdCBsZWFzdCBvbmUKKyAgICAgICAgZ2x5cGgsIHNvIHRoYXQgdGhlIGZhY2Ug ZXh0ZW5zaW9uIGFjdHVhbGx5IHRha2VzIHBsYWNlLiAqLworICAgICAgICBpZiAoTUFUUklYX1JP V19FWFRFTkRTX0ZBQ0VfUCAoZGVzaXJlZF9yb3cpCisgICAgICAgICAgICAmJiAoZGVzaXJlZF9z dG9wX3BvcyA8IGN1cnJlbnRfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICB8 fCAoZGVzaXJlZF9zdG9wX3BvcyA9PSBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAg ICAgICAgICAgICAgICAgICYmICFNQVRSSVhfUk9XX0VYVEVORFNfRkFDRV9QIChjdXJyZW50X3Jv dykpKSkKKyAgICAgICAgICAtLWRlc2lyZWRfc3RvcF9wb3M7CisgICAgICAgIHN0b3AgPSBtaW4g KGN1cnJlbnRfcm93LT51c2VkW1RFWFRfQVJFQV0sIGRlc2lyZWRfc3RvcF9wb3MpOworICAgICAg ICBpID0gMDsKKyAgICAgICAgeCA9IGRlc2lyZWRfcm93LT54OworICAgICAgICBpbnQgY2xlYXJf dG9feCA9IDA7CisKKyAgICAgICAgLyogTG9vcCBvdmVyIGdseXBocyB0aGF0IGN1cnJlbnQgYW5k IGRlc2lyZWQgcm93IG1heSBoYXZlIGluIGNvbW1vbi4gKi8KKyAgICAgICAgd2hpbGUgKGkgPCBz dG9wKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQg PSAwOworICAgICAgICAgICAgYm9vbCBjYW5fc2tpcF9wID0gIWFib3J0X3NraXBwaW5nOworICAg ICAgICAgICAgLyogU2tpcCBvdmVyIGdseXBocyB0aGF0IGJvdGggcm93cyBoYXZlIGluIGNvbW1v bi4gIFRoZXNlIGRvbid0IGhhdmUKKyAgICA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ICAgICAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIEdM WVBIX0VRVUFMX1AgKGRlc2lyZWRfZ2x5cGgsIGN1cnJlbnRfZ2x5cGgpKQorICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICArK2FycmF5X2dseXBoc19za2lwcGVkLnVzZWQ7 CisgICAgICAgICAgICAgICAgICAgIGlmIChhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxvY2F0ZWQg PCBhcnJheV9nbHlwaHNfc2tpcHBlZC51c2VkKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICAgICAgICAgIGludCBvbGRfYWxsb2MgPSBhcnJheV9nbHlwaHNfc2tpcHBl ZC5hbGxvY2F0ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbmV3X2VsdHMgPSBhcnJh eV9nbHlwaHNfc2tpcHBlZC51c2VkIC0gYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkOwor ICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCA9Cisg ICAgICAgICAgICAgICAgICAgICAgICAgIHhwYWxsb2MgKGFycmF5X2dseXBoc19za2lwcGVkLnNr aXBwZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZhcnJheV9nbHlwaHNf c2tpcHBlZC5hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5l d19lbHRzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKmFycmF5X2dseXBoc19za2lw cGVkLnNraXBwZWQpOworICAgICAgICAgICAgICAgICAgICAgICAgbWVtc2V0IChhcnJheV9nbHlw aHNfc2tpcHBlZC5za2lwcGVkICsgb2xkX2FsbG9jLCAwLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKGFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCAtIG9sZF9hbGxvYykK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBzaXplb2YgKmFycmF5X2dseXBo c19za2lwcGVkLnNraXBwZWQpOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgICAgICAgaW50IG50aCA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSAxOworICAgICAg ICAgICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkW250aF0ueCA9IHg7Cisg ICAgICAgICAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbbnRoXS5ocG9z ID0gaTsKKyAgICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtu dGhdLmVuYWJsZWRfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgICAgIHggKz0gZGVzaXJlZF9n bHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICsrZGVzaXJlZF9nbHlwaCwg KytjdXJyZW50X2dseXBoLCArK2k7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgLyogQ29uc2lkZXIgdGhlIGNhc2UgdGhhdCB0aGUgY3VycmVudCByb3cgY29udGFpbnMgInh4 eCBwcHAgZ2dnIiBpbgorICAgICAgICAgICAgICAgIGl0YWxpYyBDb3VyaWVyIGZvbnQsIGFuZCB0 aGUgZGVzaXJlZCByb3cgaXMgInh4eCBnZ2ciLiAgVGhlIGNoYXJhY3RlciBgcCcKKyAgICAgICAg ICAgICAgICBoYXMgbGJlYXJpbmcsIGBnJyBoYXMgbm90LiAgVGhlIGxvb3AgYWJvdmUgd2lsbCBz dG9wIGluIGZyb250IG9mIHRoZQorICAgICAgICAgICAgICAgIGZpcnN0IGBwJyBpbiB0aGUgY3Vy cmVudCByb3cuICBJZiB3ZSB3b3VsZCBzdGFydCB3cml0aW5nIGdseXBocyB0aGVyZSwgd2UKKyAg ICAgICAgICAgICAgICB3b3VsZG4ndCBlcmFzZSB0aGUgbGJlYXJpbmcgb2YgdGhlIGBwJy4gIFRo ZSByZXN0IG9mIHRoZSBsYmVhcmluZyBwcm9ibGVtCisgICAgICAgICAgICAgICAgaXMgdGhlbiB0 YWtlbiBjYXJlIG9mIGJ5IGRyYXdfZ2x5cGhzLiAqLworICAgICAgICAgICAgICAgIGlmIChvdmVy bGFwcGluZ19nbHlwaHNfcAorICAgICAgICAgICAgICAgICAgICAmJiBpID4gMAorICAgICAgICAg ICAgICAgICAgICAmJiBpIDwgY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAg ICAgICAgICAgICAmJiAoY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSBkZXNpcmVkX3Jv dy0+dXNlZFtURVhUX0FSRUFdKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgaW50IGxlZnQsIHJpZ2h0OworICAgICAgICAgICAgICAgICAgICByaWYtPmdldF9nbHlw aF9vdmVyaGFuZ3MgKGN1cnJlbnRfZ2x5cGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg WEZSQU1FICh3LT5mcmFtZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmxlZnQsICZy aWdodCk7CisgICAgICAgICAgICAgICAgICAgIHdoaWxlIChsZWZ0ID4gMCAmJiBpID4gMCkKKyAg ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAtLWksIC0tZGVz aXJlZF9nbHlwaCwgLS1jdXJyZW50X2dseXBoOworICAgICAgICAgICAgICAgICAgICAgICAgeCAt PSBkZXNpcmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGxl ZnQgLT0gZGVzaXJlZF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgICAvKiBBYm9ydCB0aGUgc2tpcHBpbmcgYWxnb3JpdGhtIGlm IHdlIGVuZCB1cCBiZWZvcmUKKyAgICAgICAgICAgICAgICAgICAgICAgb3VyIHN0YXJ0aW5nIHBv aW50LCB0byBhdm9pZCBsb29waW5nIChidWcjMTA3MCkuCisgICAgICAgICAgICAgICAgICAgICAg IFRoaXMgY2FuIGhhcHBlbiB3aGVuIHRoZSBsYmVhcmluZyBpcyBsYXJnZXIgdGhhbgorICAgICAg ICAgICAgICAgICAgICAgICB0aGUgcGl4ZWwgd2lkdGguICovCisgICAgICAgICAgICAgICAgICAg IGFib3J0X3NraXBwaW5nID0gKGkgPCBzdGFydF9ocG9zKTsKKyAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgLyogVHJ5IHRvIGF2b2lkIHdyaXRpbmcgdGhl IGVudGlyZSByZXN0IG9mIHRoZSBkZXNpcmVkIHJvdworICAgICAgICAgICAgICAgYnkgbG9va2lu ZyBmb3IgYSByZXN5bmMgcG9pbnQuICBUaGlzIG1haW5seSBwcmV2ZW50cworICAgICAgICAgICAg ICAgbW9kZSBsaW5lIGZsaWNrZXJpbmcgaW4gdGhlIGNhc2UgdGhlIG1vZGUgbGluZSBpcyBpbgor ICAgICAgICAgICAgICAgZml4ZWQtcGl0Y2ggZm9udCwgd2hpY2ggaXQgdXN1YWxseSB3aWxsIGJl LiAqLworICAgICAgICAgICAgaWYgKGkgPCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQor ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IHN0YXJ0X3ggPSB4LCBzdGFydF9o cG9zID0gaTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnN0YXJ0ID0gZGVzaXJlZF9n bHlwaDsKKyAgICAgICAgICAgICAgICBpbnQgY3VycmVudF94ID0geDsKKyAgICAgICAgICAgICAg ICBib29sIHNraXBfZmlyc3RfcCA9ICFjYW5fc2tpcF9wOworICAgICAgICAgICAgICAgIC8qIEZp bmQgdGhlIG5leHQgZ2x5cGggdGhhdCdzIGVxdWFsIGFnYWluLiAqLworICAgICAgICAgICAgICAg IHdoaWxlIChpIDwgc3RvcAorICAgICAgICAgICAgICAgICAgICAgICAmJiAoc2tpcF9maXJzdF9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAhR0xZUEhfRVFVQUxfUCAoZGVzaXJlZF9n bHlwaCwgY3VycmVudF9nbHlwaCkpCisgICAgICAgICAgICAgICAgICAgICAgICYmIHggPT0gY3Vy cmVudF94KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICB4ICs9IGRl c2lyZWRfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3gg Kz0gY3VycmVudF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICsrZGVz aXJlZF9nbHlwaCwgKytjdXJyZW50X2dseXBoLCArK2k7CisgICAgICAgICAgICAgICAgICAgIHNr aXBfZmlyc3RfcCA9IDA7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZm9y IChpbnQgZWx0ID0gMDsKKyAgICAgICAgICAgICAgICAgICAgIGVsdCA8IGFycmF5X2dseXBoc19z a2lwcGVkLnVzZWQ7CisgICAgICAgICAgICAgICAgICAgICArK2VsdCkKKyAgICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IHggPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5z a2lwcGVkW2VsdF0ueDsKKyAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBhcnJheV9nbHlw aHNfc2tpcHBlZC5za2lwcGVkW2VsdF0uaHBvczsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0 IGdseXBoICp0YXJnZXRfZ2x5cGggPQorICAgICAgICAgICAgICAgICAgICAgIG1jX2dldF9jdXJz b3JfZ2x5cGggKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgaHBvcywgdnBvcyk7Cisg ICAgICAgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAgICAgICAgICAgICAgIGZw cmludGYgKHN0ZGVyciwgIlNLSVBQRUQ6ICB2cG9zICglZCkgfCBjaGFyICglZC8lcykgfCB4OiAo JWQpIHwgaHBvcyAoJWQvJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdnBvcywgdGFyZ2V0X2dseXBoLT51LmNoLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHRhcmdldF9nbHlwaC0+dS5jaCksCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4LCBocG9zLCB1cGRhdGVkX3Jv dy0+dXNlZFtURVhUX0FSRUFdIC0gMSk7CisgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfcm93 ICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHRhcmdldF9nbHlwaCwgeCwgMSwgdnBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2Vu dGlhbHMsIHJvd19wb3NpdGlvbiwgZHJhd19wLCBTS0lQUEVEKTsKKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICBpZiAoaSA9PSBzdGFydF9ocG9zIHx8IHggIT0gY3VycmVudF94 KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpID0gc3RhcnRfaHBv czsKKyAgICAgICAgICAgICAgICAgICAgeCA9IHN0YXJ0X3g7CisgICAgICAgICAgICAgICAgICAg IGRlc2lyZWRfZ2x5cGggPSBzdGFydDsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBv cywgc3RhcnRfaHBvcywgZGVzaXJlZF9yb3ctPnksIHN0YXJ0X3gpOworICAgICAgICAgICAgICAg IC8qIFJlLWRyYXcgYSBwb3J0aW9uIG9mIHRoZSByb3cuICovCisgICAgICAgICAgICAgICAgaWYg KGRlYnVnX3ApCisgICAgICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJSRURSQVcgU0VH TUVOVDpcblwKKyAgICAgICAgICAgICAgICAgICAgdnBvcyAoJWQpIHwgY2hhciAoJWQvJXMpIHwg eDogKCVkKSB8IGhwb3MgKCVkLyVkKSB8IGxlbmd0aCAoJWQpXG4iLAorICAgICAgICAgICAgICAg ICAgICB2cG9zLCBzdGFydC0+dS5jaCwgbWNfY2hhcl90b19zdHJpbmcgKHN0YXJ0LT51LmNoKSwK KyAgICAgICAgICAgICAgICAgICAgc3RhcnRfeCwgc3RhcnRfaHBvcywgdXBkYXRlZF9yb3ctPnVz ZWRbVEVYVF9BUkVBXSAtIDEsIGkgLSBzdGFydF9ocG9zKTsKKyAgICAgICAgICAgICAgICBibG9j a19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgICBpbnQgbGVuID0gaSAtIHN0YXJ0X2hwb3M7Cisg ICAgICAgICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHVwZGF0ZWRfcm93LT5nbHlwaHNbVEVY VF9BUkVBXTsKKyAgICAgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLnggPQorICAgICAgICAg ICAgICAgICAgbWNfZHJhd19nbHlwaHMgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3Jvdywg dy0+bWNfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPm91dHB1 dF9jdXJzb3IueCwgVEVYVF9BUkVBLCBocG9zLCBocG9zICsgbGVuLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIERSQVdfTk9STUFMX1RFWFQsIDAsIHZwb3MsIGxzbCwgZ2x5cGhf Zmxhdm9yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCB3 ZCwgZXNzZW50aWFscy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJzb3JfZ2NfcCwgTUNfRFJBV19HTFlQSF9TVFJJTkcsIGRyYXdfcCk7CisgICAgICAgICAg ICAgICAgdy0+b3V0cHV0X2N1cnNvci5ocG9zICs9IGxlbjsKKyAgICAgICAgICAgICAgICB1bmJs b2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAgIG1jX2RyYXdfcm93ICh3LCBkZXNpcmVkX21h dHJpeCwgdXBkYXRlZF9yb3csIHN0YXJ0LCBzdGFydF94LCBpIC0gc3RhcnRfaHBvcywKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywg cm93X3Bvc2l0aW9uLCBkcmF3X3AsIFNDUklCRV9UV08pOworICAgICAgICAgICAgICAgIGNoYW5n ZWRfcCA9IDE7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisKKyAgICAgICAgLyogV3Jp dGUgdGhlIHJlc3QuICovCisgICAgICAgIGlmIChpIDwgZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9B UkVBXSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBvdXRwdXRfY3Vyc29yX3RvICh3LCB2cG9z LCBpLCBkZXNpcmVkX3Jvdy0+eSwgeCk7CisgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAg ICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiRFJBVyBSRU1BSU5ERVIgT0YgVEhFIFJPVzpcblwK KyAgICAgICAgICAgICAgICB2cG9zICglZCkgfCBjaGFyICglZC8lcykgfCB4OiAoJWQpIHwgaHBv cyAoJWQvJWQpIHwgbGVuZ3RoICglZClcbiIsCisgICAgICAgICAgICAgICAgdnBvcywgZGVzaXJl ZF9nbHlwaC0+dS5jaCwgbWNfY2hhcl90b19zdHJpbmcgKGRlc2lyZWRfZ2x5cGgtPnUuY2gpLAor ICAgICAgICAgICAgICAgIHgsIGksIGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxLCBk ZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gaSk7CisgICAgICAgICAgICBibG9ja19pbnB1 dCAoKTsKKyAgICAgICAgICAgIGludCBsZW4gPSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFd IC0gaTsKKyAgICAgICAgICAgIGludCBocG9zID0gZGVzaXJlZF9nbHlwaCAtIHVwZGF0ZWRfcm93 LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICAgIHctPm91dHB1dF9jdXJzb3IueCA9Cisg ICAgICAgICAgICAgIG1jX2RyYXdfZ2x5cGhzICh3LCBkZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9y b3csIHctPm1jX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPm91dHB1 dF9jdXJzb3IueCwgVEVYVF9BUkVBLCBocG9zLCBocG9zICsgbGVuLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCwgdnBvcywgbHNsLCBnbHlwaF9mbGF2 b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgd2QsIGVzc2Vu dGlhbHMuYWN0aXZlX3AsIGN1cnNvcl9nY19wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgTUNfRFJBV19HTFlQSF9TVFJJTkcsIGRyYXdfcCk7CisgICAgICAgICAgICB3LT5vdXRwdXRf Y3Vyc29yLmhwb3M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ID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgZGVzaXJlZF9tYXRyaXgsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVkX3Jvdywg aHBvcywgdnBvcyk7CisgICAgICAgICAgICAgIGlmICh3LT5vdXRwdXRfY3Vyc29yLnggPT0gdXBk YXRlZF9yb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgIHggLT0gc3RhcnQtPnBpeGVs X3dpZHRoOworICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAgICBmcHJp bnRmIChzdGRlcnIsICJQT1NULUNIQU5HRUQ6ICB2cG9zICglZCkgfCB4ICglZCkgfCBocG9zICgl ZC8lZCkgfCBjaGFyICglZC8lcylcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB2cG9zLCB4LCBocG9zLCB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0LT51LmNoLCBtY19jaGFyX3RvX3N0cmlu ZyAoc3RhcnQtPnUuY2gpKTsKKyAgICAgICAgICAgICAgbWNfZHJhd19yb3cgKHcsIGRlc2lyZWRf bWF0cml4LCB1cGRhdGVkX3Jvdywgc3RhcnQsIHgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gaHBvcywgdnBvcywgY3Vyc29yX21hdHJp eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwg ZHJhd19wLCBQT1NUX0NIQU5HRUQpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgLyogVGhl cmUgd2VyZSBubyBjaGFuZ2VzIGFuZCBpID09IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0g Ki8KKyAgICAgICAgICAgIGVsc2UgaWYgKCFjaGFuZ2VkX3ApCisgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0 ZGVyciwgIlVOQ0hBTkdFRCAtLSBXUklURSBFTlRJUkUgTElORTogIHZwb3MgKCVkKSB8IHJvdy0+ dXNlZCAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCB1 cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSk7CisgICAgICAgICAgICAgICAgbWNfZHJh d19yb3cgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgZGVzaXJlZF9yb3ctPmdseXBo c1tURVhUX0FSRUFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNpcmVkX3Jvdy0+ eCwgZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgdnBvcywKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3 X3AsIFVOQ0hBTkdFRCk7CisgICAgICAgICAgICAgIH0KKworICAgICAgICAvKiBNYXliZSBjbGVh ciB0byBlbmQgb2YgbGluZS4gKi8KKyAgICAgICAgaWYgKE1BVFJJWF9ST1dfRVhURU5EU19GQUNF X1AgKGRlc2lyZWRfcm93KSkKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBJZiBuZXcgcm93 IGV4dGVuZHMgdG8gdGhlIGVuZCBvZiB0aGUgdGV4dCBhcmVhLCBub3RoaW5nCisgICAgICAgICAg ICAgICBoYXMgdG8gYmUgY2xlYXJlZCwgaWYgYW5kIG9ubHkgaWYgd2UgZGlkIGEgd3JpdGVfZ2x5 cGhzCisgICAgICAgICAgICAgICBhYm92ZS4gIFRoaXMgaXMgbWFkZSBzdXJlIGJ5IHNldHRpbmcg ZGVzaXJlZF9zdG9wX3BvcworICAgICAgICAgICAgICAgYXBwcm9wcmlhdGVseSBhYm92ZS4gKi8K KyAgICAgICAgICAgIGVhc3NlcnQgKGkgPCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdCisg ICAgICAgICAgICAgICAgICAgICB8fCAoKGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gPT0g Y3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAm JiBNQVRSSVhfUk9XX0VYVEVORFNfRkFDRV9QIChjdXJyZW50X3JvdykpKTsKKyAgICAgICAgICB9 CisgICAgICAgICAgZWxzZSBpZiAoTUFUUklYX1JPV19FWFRFTkRTX0ZBQ0VfUCAoY3VycmVudF9y b3cpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBJZiBvbGQgcm93IGV4dGVuZHMg dG8gdGhlIGVuZCBvZiB0aGUgdGV4dCBhcmVhLCBjbGVhci4gKi8KKyAgICAgICAgICAgICAgaWYg KGkgPj0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICBvdXRw dXRfY3Vyc29yX3RvICh3LCB2cG9zLCBpLCBkZXNpcmVkX3Jvdy0+eSwgZGVzaXJlZF9yb3ctPnBp eGVsX3dpZHRoKTsKKyAgICAgICAgICAgICAgaWYgKGRyYXdfcCkKKyAgICAgICAgICAgICAgICBy aWYtPmNsZWFyX2VuZF9vZl9saW5lICh3LCB1cGRhdGVkX3JvdywgVEVYVF9BUkVBLCAtMSk7Cisg ICAgICAgICAgICAgIGNsZWFyX3RvX3ggPSAtMTsKKyAgICAgICAgICAgICAgY2hhbmdlZF9wID0g MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKGRlc2lyZWRfcm93LT5waXhl bF93aWR0aCA8IGN1cnJlbnRfcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgIC8qIE90aGVyd2lzZSBjbGVhciB0byB0aGUgZW5kIG9mIHRoZSBvbGQgcm93 LiAgRXZlcnl0aGluZworICAgICAgICAgICAgICAgICAgIGFmdGVyIHRoYXQgcG9zaXRpb24gc2hv dWxkIGJlIGNsZWFyIGFscmVhZHkuICovCisgICAgICAgICAgICAgICAgaW50IHhsaW07CisgICAg ICAgICAgICAgICAgaWYgKGkgPj0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICAg ICAgICAgICAgICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRfcm93LT55 LCBkZXNpcmVkX3Jvdy0+cGl4ZWxfd2lkdGgpOworICAgICAgICAgICAgICAgIC8qIElmIGN1cnNv ciBpcyBkaXNwbGF5ZWQgYXQgdGhlIGVuZCBvZiB0aGUgbGluZSwgbWFrZSBzdXJlCisgICAgICAg ICAgICAgICAgICAgaXQncyBjbGVhcmVkLiAgTm93YWRheXMgd2UgZG9uJ3QgaGF2ZSBhIHBoeXNf Y3Vyc29yX2dseXBoCisgICAgICAgICAgICAgICAgICAgd2l0aCB3aGljaCB0byBlcmFzZSB0aGUg Y3Vyc29yIChiZWNhdXNlIHRoaXMgbWV0aG9kCisgICAgICAgICAgICAgICAgICAgZG9lc24ndCB3 b3JrIHdpdGggbGJlYXJpbmcvcmJlYXJpbmcpLCBzbyB3ZSBtdXN0IGRvIGl0IHRoaXMgd2F5LiAq LworICAgICAgICAgICAgICAgIGlmICh2cG9zID09IHctPnBoeXNfY3Vyc29yLnZwb3MKKyAgICAg ICAgICAgICAgICAgICAgJiYgKGRlc2lyZWRfcm93LT5yZXZlcnNlZF9wCisgICAgICAgICAgICAg ICAgICAgICAgICA/ICh3LT5waHlzX2N1cnNvci5ocG9zIDwgMCkKKyAgICAgICAgICAgICAgICAg ICAgICAgIDogKHctPnBoeXNfY3Vyc29yLmhwb3MgPj0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9B UkVBXSkpKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICB3LT5waHlz X2N1cnNvcl9vbl9wID0gMDsKKyAgICAgICAgICAgICAgICAgICAgeGxpbSA9IC0xOworICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAg ICB4bGltID0gY3VycmVudF9yb3ctPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgIGlmIChk cmF3X3ApCisgICAgICAgICAgICAgICAgICByaWYtPmNsZWFyX2VuZF9vZl9saW5lICh3LCB1cGRh dGVkX3JvdywgVEVYVF9BUkVBLCB4bGltKTsKKyAgICAgICAgICAgICAgICBjbGVhcl90b194ID0g eGxpbTsKKyAgICAgICAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgICB9CisK KyAgICAgICAgaWYgKGNoYW5nZWRfcAorICAgICAgICAgICAgJiYgY2xlYXJfdG9feCAhPSAwKQor ICAgICAgICAgIHsKKyAgICAgICAgICAgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94 X3dpZHRoICh3LCBURVhUX0FSRUEpOworICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBkZWJ1Z19m ZyA9IHsucmVkID0gMC44NjcsIC5ncmVlbiA9IDAuODY3LCAuYmx1ZSA9IDAuODY3fTsKKyAgICAg ICAgICAgIHN0cnVjdCBnbHlwaCAqdGFyZ2V0X2dseXBoID0KKyAgICAgICAgICAgICAgdXBkYXRl ZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdICsgdXBkYXRlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAt IDE7CisgICAgICAgICAgICAvKiBgbWNfZW5naW5lJyBvbmx5IGRyYXdzIGFuIE1DX0dMWVBIIHdo ZW4geCA8IHVwZGF0ZWRfcm93LT5waXhlbF93aWR0aC4KKyAgICAgICAgICAgIFRoZSBjdXJyZW50 IGRlc2lnbiBpbmhpYml0cyBkcmF3aW5nIG92ZXIgYW4gZXhpc3RpbmcgZ2x5cGggYXQgdGhlIGVu ZCBvZiBhCisgICAgICAgICAgICB3b3JkLXdyYXBwZWQgbGluZS4gIFNhaWQgZ2x5cGggcmVjZWl2 ZXMgYSBmYWtlIGN1cnNvciBpbiBlaXRoZXIgb25lIG9mIHRoZQorICAgICAgICAgICAgcHJldmlv dXMgc2VjdGlvbnMgYWJvdmUsIGFuZCBzaG91bGQgbm90IGJlIG92ZXJ3cml0dGVuIHdpdGggYW5v dGhlciBvbmUuCisgICAgICAgICAgICBUaGlzIGRlc2lnbiBpcyBuZWVkZWQgYmVjYXVzZSBhIHdv cmQtd3JhcHBlZCBsaW5lIGRvZXMgbm90IHJlY2VpdmUgYW4gZXh0cmEKKyAgICAgICAgICAgIHNw YWNlIGxpa2Ugbm9uLXdvcmQtd3JhcHBlZCBsaW5lcyBkby4gKi8KKyAgICAgICAgICAgIGludCB4 ID0gdXBkYXRlZF9yb3ctPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgaW50IGhwb3MgPSB1cGRh dGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsKKyAgICAgICAgICAgIGludCB4X2xpbWl0ID0g KGNsZWFyX3RvX3ggPT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gdGV4dF9hcmVh X3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgIDogY2xlYXJfdG9feDsKKyAgICAgICAg ICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgICAgICAgICAg ICBib29sIGZpbGxfY29sdW1uX3RydW1wc19wID0gKCFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNh bF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFO SUxQIChCVkFSIChiLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNzZW50aWFscy5mY194KTsKKyAgICAgICAg ICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNf dXBkYXRlX3RleHRfYXJlYSAoZmxvYXRpbmcpOiAgdnBvcyAoJWQpIHwgeF9saW1pdCAoJWQpXG4i LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZwb3MsIHhfbGltaXQpOworICAgICAg ICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICYmICFOSUxQ IChCVkFSIChiLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5h Y3RpdmVfcAorICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBmY19pbmFjdGl2ZV93aW5k b3dzKSkpKQorICAgICAgICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAg ICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0geAorICAgICAgICAgICAgICAgICYmIHRhcmdl dF9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAg ICBtY19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBo LCBURVhUX0FSRUEsCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRl ZF9yb3ctPnksIGhwb3MsIHZwb3MsIE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAg ICAgICAgICAgICAgZGVidWdfcCA/IGRlYnVnX2ZnIDogZXNzZW50aWFscy5mY19mZ1tyb3dfcG9z aXRpb25dLAorICAgICAgICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OLCBkcmF3X3AsIE5P V0hFUkUsIE5PX0NBQ0hFKTsKKyAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykK KyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2hvcml6b250YWxfcnVsZXIpKQorICAgICAg ICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgIHx8 ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAg KEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgJiYgeCA8 IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZw b3MKKyAgICAgICAgICAgICAgICAmJiB0YXJnZXRfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAg ICAgICYmIGRyYXdfcCkKKyAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBkZXNpcmVkX21hdHJp eCwgdXBkYXRlZF9yb3csIHRhcmdldF9nbHlwaCwgVEVYVF9BUkVBLAorICAgICAgICAgICAgICAg ICAgICAgICAgIHgsIHhfbGltaXQsIHVwZGF0ZWRfcm93LT55LCBocG9zLCB2cG9zLCBNQ19IQkFS LCAxLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19wID8gZGVidWdf ZmcgOiBlc3NlbnRpYWxzLmNoX2ZnW3Jvd19wb3NpdGlvbl0sCisgICAgICAgICAgICAgICAgICAg ICAgICAgSE9SSVpPTlRBTF9SVUxFUiwgZHJhd19wLCBOT1dIRVJFLCBOT19DQUNIRSk7CisgICAg ICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgJiYgIU5J TFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFS IChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMu YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2lu ZG93cykpKSkKKyAgICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3AKKyAgICAg ICAgICAgICAgICAmJiB4IDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgJiYgdnBv cyAhPSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHgK KyAgICAgICAgICAgICAgICAmJiB0YXJnZXRfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAg ICYmIGRyYXdfcCkKKyAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBkZXNpcmVkX21hdHJpeCwg dXBkYXRlZF9yb3csIHRhcmdldF9nbHlwaCwgVEVYVF9BUkVBLAorICAgICAgICAgICAgICAgICAg ICAgICAgIHgsIHhfbGltaXQsIHVwZGF0ZWRfcm93LT55LCBocG9zLCB2cG9zLCBNQ19CQVIsIDEs CisgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93 X3Bvc2l0aW9uLA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cmVhIGNhbiBwb3RlbnRpYWxseSBkcmF3IG92ZXIgdGhlIGJvcmRlci4gKi8KKyAgICAgICAgICBj dXJyZW50X3Jvdy0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AgPSAxOworICAgICAgICB9CisgICAg ICBib29sIHVwZGF0ZWRfcCA9IG1jX3VwZGF0ZV90ZXh0X2FyZWEgKHcsIGRlc2lyZWRfcm93LCB2 cG9zLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBlc3NlbnRpYWxzLCBkcmF3X3ApOworICAgICAgLyogVXBkYXRlIHRoZSBkaXNwbGF5 IG9mIHRoZSB0ZXh0IGFyZWEuICovCisgICAgICBpZiAodXBkYXRlZF9wKQorICAgICAgICB7Cisg ICAgICAgICAgY2hhbmdlZF9wID0gMTsKKyAgICAgICAgICBpZiAoY3VycmVudF9yb3ctPm1vdXNl X2ZhY2VfcCkKKyAgICAgICAgICAgICptb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AgPSAxOworICAg ICAgICB9CisgICAgICAvKiBVcGRhdGUgZGlzcGxheSBvZiB0aGUgcmlnaHQgbWFyZ2luIGFyZWEs IGlmIHRoZXJlIGlzIG9uZS4gKi8KKyAgICAgIGlmICghZGVzaXJlZF9yb3ctPmZ1bGxfd2lkdGhf cCAmJiB3LT5yaWdodF9tYXJnaW5fY29scyA+IDApCisgICAgICAgIHsKKyAgICAgICAgICBjaGFu Z2VkX3AgPSAxOworICAgICAgICAgIHVwZGF0ZV9tYXJnaW5hbF9hcmVhICh3LCBkZXNpcmVkX3Jv dywgUklHSFRfTUFSR0lOX0FSRUEsIHZwb3MpOworICAgICAgICB9CisgICAgICAvKiBEcmF3IHRy dW5jYXRpb24gbWFya3MgZXRjLiAqLworICAgICAgaWYgKCFjdXJyZW50X3Jvdy0+ZW5hYmxlZF9w CisgICAgICAgICAgfHwgZGVzaXJlZF9yb3ctPnkgIT0gY3VycmVudF9yb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3dfZXJh c2UgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBtY19tYXRyaXggb2xkX21hdHJpeCkKK3sKKyAg Ym9vbCBkZWJ1Z19wID0gZmFsc2U7CisgIGJvb2wgZ29fb25lX3AgPSAob2xkX21hdHJpeC5jdXJz b3JzX3VzZWRbTUNfQ0FDSEVdID4gMAorICAgICAgICAgICAgICAgICAgIHx8IG9sZF9tYXRyaXgu Y3Vyc29yc191c2VkW0NIX0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICAgICB8fCBvbGRfbWF0 cml4LmN1cnNvcnNfdXNlZFtGQ19DQUNIRV0gPiAwKTsKKyAgYm9vbCBnb190d29fcCA9IChCVUZG RVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAg IHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQorICAg ICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtY19jb25mKSkpKTsKKyAgYm9vbCB1cGRhdGluZ19mcmFtZV9wID0gZmFsc2U7CisgIHN0cnVj dCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBpZiAoWEZSQU1FICh3LT5mcmFtZSkg IT0gZi0+bWNfdXBkYXRpbmdfZnJhbWUKKyAgICAgICYmIChnb19vbmVfcCB8fCBnb190d29fcCkp CisgICAgeworICAgICAgdXBkYXRpbmdfZnJhbWVfcCA9IHRydWU7CisgICAgICB1cGRhdGVfYmVn aW4gKGYpOworICAgIH0KKyAgaWYgKHctPnBoeXNfY3Vyc29yX29uX3AKKyAgICAgICYmIGdvX3R3 b19wKQorICAgIGVyYXNlX3BoeXNfY3Vyc29yICh3KTsKKyAgZm9yIChpbnQgdm50aCA9IDA7Cisg ICAgICAgZ29fb25lX3AKKyAgICAgICAmJiB2bnRoIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZDsK KyAgICAgICArK3ZudGgpCisgICAgeworICAgICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2Fj aGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7Cisg ICAgICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICAgICAgZm9yIChpbnQgbnRoXzAgPSAwOworICAg ICAgICAgICAgIG1jX3RyYXZlcnNlX2NhY2hlX3AgKG9sZF9tYXRyaXgsIGNhY2hlX3R5cGUsIHZu dGgsIG50aF8wKTsKKyAgICAgICAgICAgICArK250aF8wKQorICAgICAgICAgIHsKKyAgICAgICAg ICAgIGJvb2wgc2FtZV9wID0gZmFsc2U7CisgICAgICAgICAgICBmb3IgKGludCB3X250aCA9IDA7 IHdfbnRoIDwgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXTsg Kyt3X250aCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHNhbWVfcCB8PSAob2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC50eXBlCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC50eXBlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiAoKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u Z2x5cGguYnl0ZXBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguYnl0ZXBvcykK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAob2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5yb3dfcG9zaXRpb24gPT0gQVRfWlYKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB8fCAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8wXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgKChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmdseXBoLmNoYXJwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLmNoYXJw b3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IEFUX1pWCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0uZ2x5cGgudS52YWwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnUudmFsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLmZhY2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhd LmdseXBoLmZhY2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgucGFkZGluZ19wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5wYWRkaW5nX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u Z2x5cGgubGVmdF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5sZWZ0 X2JveF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgucmlnaHRfYm94X2xpbmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgucmlnaHRfYm94X2xpbmVfcAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5nbHlwaC52b2Zmc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC52 b2Zmc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnBpeGVsX3dpZHRoCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW3dfbnRoXS5nbHlwaC5waXhlbF93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlw aC5zbGljZS5pbWcueAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuaW1nLngK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuaW1nLnkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b d19udGhdLmdseXBoLnNsaWNlLmltZy55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNl LmltZy53aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuaW1nLndpZHRo CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy5oZWlnaHQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmltZy5oZWlnaHQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u Z2x5cGguc2xpY2UuY21wLmZyb20KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNl LmNtcC5mcm9tCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLngKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhd LngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmZ4Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzBdLnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uZnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmZ5CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzBdLmhwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmhwb3MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0udnBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBvcworICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS53ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ud2QKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uaAorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3Jf dHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uY3Vyc29yX3R5cGUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0uY3Vyc29yX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5jdXJzb3Jfd2lkdGgK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMF0uZmcucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5mZy5y ZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhd LmZnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLmJsdWUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b d19udGhdLmZnLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcucmVkCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5iZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcuZ3JlZW4KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bd19udGhdLmJnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJnLmJsdWUKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYWN0aXZl X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBd LmdseXBoX2ZsYXZvcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGhfZmxhdm9yCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9 PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZW5hYmxl ZF9wKTsKKyAgICAgICAgICAgICAgICBpZiAoc2FtZV9wKQorICAgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAgICAgICAgICBm cHJpbnRmIChzdGRlcnIsICJISVQgKCVzKTogIHZwb3MgKCVkKSB8IGhwb3MgKCVkKSB8IGNoYXIg KCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjYWNoZV90 eXBlID09IE1DX0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/ICJNQyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGNhY2hl X3R5cGUgPT0gQ0hfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gIkNIIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY2Fj aGVfdHlwZSA9PSBGQ19DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyAiRkMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICJO TyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS5nbHlwaC51LmNoKSk7CisgICAgICAgICAgICAgICAgICAgIHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5zYW1lX3AgPSB0cnVl OworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICAgICAgICBpbnQgb2xkX2NhY2hlX3VzZWQgPSBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAgICAgICBpbnQg bmV3X2NhY2hlX3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hl X3R5cGVdOworICAgICAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIk1JU1MgKCVz KTogIHZwb3MgKCVkKSB8IGhwb3MgKCVkIHYuICVkKSB8IGNoYXIgKCVzIHYuICVzKSB8IGNhY2hl X3VzZWQgKCVkIHYuICVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChjYWNoZV90eXBlID09IE1DX0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/ICJNQyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogKGNhY2hlX3R5cGUgPT0gQ0hfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gIkNIIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoY2FjaGVfdHlwZSA9PSBGQ19DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyAiRkMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6ICJOTyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W3dfbnRoXS5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNf Y2hhcl90b19zdHJpbmcgKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0uZ2x5cGgudS5jaCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtY19jaGFyX3RvX3N0cmluZyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bd19udGhdLmdseXBoLnUuY2gpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgb2xkX2NhY2hlX3VzZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBuZXdfY2FjaGVfdXNlZCk7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgaWYgKCFzYW1lX3ApCisgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29udGFpbnMgdGhlIGZv bGxvd2luZyB0ZXN0cywKKyAgICAgICAgICAgICAgICBlYXNzZXJ0IChtYXRyaXggJiYgbWF0cml4 LT5yb3dzKTsKKyAgICAgICAgICAgICAgICBlYXNzZXJ0IChyb3cgPj0gMCAmJiByb3cgPCBtYXRy aXgtPm5yb3dzKTsgKi8KKyAgICAgICAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfb25lID0gKHct PmN1cnJlbnRfbWF0cml4ICYmIHctPmN1cnJlbnRfbWF0cml4LT5yb3dzKSA/IGZhbHNlIDogdHJ1 ZTsKKyAgICAgICAgICAgICAgICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgICAgICAgICAgICAg ICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZudGgg Pj0gMCAmJiB2bnRoIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsK KyAgICAgICAgICAgICAgICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgICAgICAgICAgICAgICBj b250aW51ZTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICp2bnRoX3JvdyA9IE1B VFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2bnRoKTsKKyAgICAgICAgICAgICAgICBpbnQg eF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS54Owor ICAgICAgICAgICAgICAgIGludCBmeF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5meDsKKyAgICAgICAgICAgICAgICBpbnQgeV8wID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS55OworICAgICAgICAgICAgICAg IGludCBmeV8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8w XS5meTsKKyAgICAgICAgICAgICAgICBpbnQgaHBvc18wID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5ocG9zOworICAgICAgICAgICAgICAgIGludCB2cG9z XzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnZwb3M7 CisgICAgICAgICAgICAgICAgaW50IHdkXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzBdLndkOworICAgICAgICAgICAgICAgIGludCBoXzAgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmg7CisgICAgICAgICAgICAg ICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZV8wID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAg ICBpbnQgY3Vyc29yX3dpZHRoXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXzBdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICAgICAgICAvLyAgc3RydWN0IG1j X1JHQiBsc2xfZmdfMCA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8wXS5mZy5yZWQsCisgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAg ICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5mZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0uZmcuYmx1ZX07CisgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfYmdf MCA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8w XS5iZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3Jl ZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJnLmdy ZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJnLmJsdWV9Owor ICAgICAgICAgICAgICAgIGJvb2wgYWN0aXZlX3BfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYWN0aXZlX3A7CisgICAgICAgICAgICAgICAgZW51bSBt Y19mbGF2b3IgZ2x5cGhfZmxhdm9yXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICBib29sIGVuYWJs ZWRfcF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5l bmFibGVkX3A7CisgICAgICAgICAgICAgICAgaWYgKHZwb3NfMCA9PSB2bnRoCisgICAgICAgICAg ICAgICAgICAgICYmIGdseXBoX2ZsYXZvcl8wID09IE1DX0dMWVBICisgICAgICAgICAgICAgICAg ICAgICYmIGVuYWJsZWRfcF8wCisgICAgICAgICAgICAgICAgICAgICYmIHZudGhfcm93LT5lbmFi bGVkX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1jX2VyYXNl X2N1cnNvciAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhfcm93LCBvbGRfbWF0cml4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhfMCwgeV8wLCBocG9zXzAsIHZwb3Nf MCwgZ2x5cGhfZmxhdm9yXzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Y3Vyc29yX3R5cGVfMCwgd2RfMCk7CisgICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZW5hYmxlZF9wID0gZmFsc2U7CisgICAg ICAgICAgICAgICAgICAgIC0tb2xkX21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07Cisg ICAgICAgICAgICAgICAgICAgIC8qIElmIHdlIGluYWR2ZXJ0ZW50bHkgZXJhc2VkIGFub3RoZXIg ZmFrZSBjdXJzb3IgYXQgdGhlIHNhbWUKKyAgICAgICAgICAgICAgICAgICAgSFBPUyB0aGF0IGlz IHN0aWxsIGVuYWJsZWRfcCBpbiB0aGUgYG9sZF9tYXRyaXhgLCB0aGVuIHJlZHJhdyBpdC4gKi8K KyAgICAgICAgICAgICAgICAgICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9 IE1DX0NBQ0hFOworICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNI RTsKKyAgICAgICAgICAgICAgICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpbnQgbnRoXzEgPSAwOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wIChvbGRfbWF0 cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGhfMSk7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICsrbnRoXzEpCisgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICBpbnQgeF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8xXS54OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBmeF8xID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5meDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBpbnQgeV8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8xXS55OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCBmeV8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5m eTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaHBvc18xID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5ocG9zOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGludCB2cG9zXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzFdLnZwb3M7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHdk XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLndkOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBoXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmg7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZV8xID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5jdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZ18xID0gey5yZWQgPSBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZnLnJlZCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZmcuZ3JlZW4sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZmcuYmx1ZX07Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIHN0cnVjdCBtY19SR0IgbHNsX2JnXzEgPSB7 LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uYmcu cmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMV0uYmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAg ICAgICAgICAgICAgICAgICAgLmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzFdLmJnLmJsdWV9OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJv b2wgYWN0aXZlX3BfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMV0uYWN0aXZlX3A7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19mbGF2 b3IgZ2x5cGhfZmxhdm9yXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzFdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29s IGVuYWJsZWRfcF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8xXS5lbmFibGVkX3A7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBnb19wXzEg PSAoaHBvc18wID09IGhwb3NfMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGVuYWJsZWRfcF8xKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAo IWdvX3BfMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3BfMSA9IGZhbHNlOworICAgICAgICAg ICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB3LT5jdXJyZW50X21h dHJpeCwgdm50aF9yb3csIHhfMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZnhfMSwgeV8xLCBmeV8xLCBocG9zXzEsIHZwb3NfMSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2RfMSwgaF8xLCBjdXJz b3JfdHlwZV8xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjdXJzb3Jfd2lkdGhfMSwgbHNsX2ZnXzEsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wXzEsIGdseXBoX2ZsYXZvcl8xLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVfcF8x KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZwb3NfMCA9 PSB2bnRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3BfMAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdm50aF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3BfMCA9IHRydWU7 CisgICAgICAgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHctPmN1cnJl bnRfbWF0cml4LCB2bnRoX3JvdywgeF8wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBmeF8wLCB5XzAsIGZ5XzAsIGhwb3NfMCwgdnBvc18wLCB3ZF8wLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoXzAsIGN1cnNvcl90eXBl XzAsIGN1cnNvcl93aWR0aF8wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBsc2xfYmdfMCwgYWN0aXZlX3BfMCwgZ2x5cGhfZmxhdm9yXzAsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9wXzApOworICAgICAgICAg ICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MF0uZW5hYmxlZF9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAgLS1vbGRfbWF0cml4 LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAgICAgICAvKiBJZiB3 ZSBpbmFkdmVydGVudGx5IGVyYXNlZCBhbm90aGVyIGZha2UgY3Vyc29yIGF0IHRoZSBzYW1lCisg ICAgICAgICAgICAgICAgICAgICAgSFBPUyB0aGF0IGlzIHN0aWxsIGVuYWJsZWRfcCBpbiB0aGUg YG9sZF9tYXRyaXhgLCB0aGVuIHJlZHJhdyBpdC4gKi8KKyAgICAgICAgICAgICAgICAgICAgICBm b3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgICAgICAgIGZvciAoaW50IG50aF8yID0gMDsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wIChvbGRfbWF0cml4LCBjYWNoZV90 eXBlLCB2bnRoLCBudGhfMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKytudGhf MikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBpbnQgeF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8yXS54OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ4XzIgPSBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZ4OworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaW50IHlfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMl0ueTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCBmeV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5m eTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBocG9zXzIgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmhwb3M7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpbnQgdnBvc18yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8yXS52cG9zOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aW50IHdkXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJd LndkOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhfMiA9IG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uaDsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGVfMiA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uY3Vyc29yX3R5cGU7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoXzIgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmN1cnNvcl93aWR0aDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnXzIgPSB7LnJlZCA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZmcucmVkLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAu Z3JlZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZn LmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMl0uZmcuYmx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgc3RydWN0 IG1jX1JHQiBsc2xfYmdfMiA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8yXS5iZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAv LyAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmJnLmdyZWVuLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmJnLmJsdWV9OworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcF8yID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5hY3RpdmVfcDsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvcl8yID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5nbHlwaF9mbGF2b3I7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGVuYWJsZWRfcF8yID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5lbmFibGVkX3A7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBib29sIGdvX3BfMiA9IChocG9zXzAgPT0gaHBvc18yCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmeF8wIDw9IGZ4XzIK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZ4XzAgKyB3 ZF8wID4gZnhfMiArIHdkXzIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGVuYWJsZWRfcF8yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlm ICghZ29fcF8yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3BfMiA9IGZhbHNlOworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHctPmN1 cnJlbnRfbWF0cml4LCB2bnRoX3JvdywgeF8yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGZ4XzIsIHlfMiwgZnlfMiwgaHBvc18yLCB2cG9zXzIs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Rf MiwgaF8yLCBjdXJzb3JfdHlwZV8yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aF8yLCBsc2xfZmdfMiwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVfcF8yLCBnbHlw aF9mbGF2b3JfMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICByZW1vdmVfcF8yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgICAgIC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+ZW5hYmxlZF9wKQorICAgICAgICB7Cisg ICAgICAgICAgbW9kZV9saW5lX3Jvdy0+eSA9IHliICsgV0lORE9XX1NDUk9MTF9CQVJfQVJFQV9I RUlHSFQgKHcpOworICAgICAgICAgIHVwZGF0ZV93aW5kb3dfbGluZSAodywgTUFUUklYX1JPV19W UE9TIChtb2RlX2xpbmVfcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBkZXNpcmVkX21hdHJpeCksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wKTsKKyAgICAgICAgfQorCisgICAgICAvKiBG aW5kIGZpcnN0IGVuYWJsZWQgcm93LiAgT3B0aW1pemF0aW9ucyBpbiByZWRpc3BsYXlfaW50ZXJu YWwKKyAgICAgICAgIG1heSBsZWFkIHRvIGFuIHVwZGF0ZSB3aXRoIG9ubHkgb25lIHJvdyBlbmFi bGVkLiAgVGhlcmUgbWF5CisgICAgICAgICBiZSBhbHNvIGNvbXBsZXRlbHkgZW1wdHkgbWF0cmlj ZXMuICovCisgICAgICB3aGlsZSAocm93IDwgZW5kICYmICFyb3ctPmVuYWJsZWRfcCkKKyAgICAg ICAgKytyb3c7CisKKyAgICAgIC8qIFRyeSByZXVzaW5nIHBhcnQgb2YgdGhlIGRpc3BsYXkgYnkg Y29weWluZy4gKi8KKyAgICAgIGlmIChyb3cgPCBlbmQgJiYgIXctPmRlc2lyZWRfbWF0cml4LT5u b19zY3JvbGxpbmdfcCkKKyAgICAgICAgeworICAgICAgICAgIGludCByYyA9IG1jX3Njcm9sbGlu Z193aW5kb3cgKHcsIGhlYWRlcl9saW5lX3JvdyAhPSBOVUxMKTsKKyAgICAgICAgICBpZiAocmMg PCAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBBbGwgcm93cyB3ZXJlIGZvdW5k IHRvIGJlIGVxdWFsLiAqLworICAgICAgICAgICAgICBwYXVz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qLworICAgICAgZm9yIChzdHJ1Y3QgZ2x5cGhfcm93ICptY19yb3cgPSByb3c7Cisg ICAgICAgICAgIG1jX3JvdyA8IGVuZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGluZyk7Cisg ICAgICAgICAgICsrbWNfcm93KQorICAgICAgICB7CisgICAgICAgICAgaW50IHZwb3MgPSBNQVRS SVhfUk9XX1ZQT1MgKG1jX3Jvdywgdy0+ZGVzaXJlZF9tYXRyaXgpOworICAgICAgICAgIGlmICht Y19yb3ctPmVuYWJsZWRfcAorICAgICAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9z KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4ID0gdy0+ZGVzaXJl ZF9tYXRyaXg7CisgICAgICAgICAgICAgIGlmICghZm9yY2VfcCAmJiArK25fdXBkYXRlZCAlIHBy ZWVtcHRfY291bnQgPT0gMCkKKyAgICAgICAgICAgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZ19p Z25vcmVfc3F1ZWV6YWJsZXMgKCk7CisgICAgICAgICAgICAgIGNoYW5nZWRfcCB8PSBtY191cGRh dGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRy aXgsIGVzc2VudGlhbHMsIGRyYXdfcCk7CisgICAgICAgICAgICAgIGlmIChNQVRSSVhfUk9XX0JP VFRPTV9ZIChyb3cpID49IHliKQorICAgICAgICAgICAgICAgIGZvciAoaW50IGkgPSB2cG9zICsg MTsgaSA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cyAtIDE7ICsraSkKKyAgICAgICAgICAgICAg ICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAody0+Y3VycmVudF9tYXRyaXgsIGksIGZhbHNl KTsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAg IGN1cnNvcl9tYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgIC8qIFVwZGF0ZSB0aGUg cmVzdCBvZiB0aGUgbGluZXMuICovCisgICAgICBmb3IgKDsgcm93IDwgZW5kICYmIChmb3JjZV9w IHx8ICFpbnB1dF9wZW5kaW5nKTsgKytyb3cpCisgICAgICAgIC8qIHNjcm9sbGluZ193aW5kb3cg cmVzZXRzIHRoZSBlbmFibGVkX3AgZmxhZyBvZiB0aGUgcm93cyBpdCByZXVzZXMgZnJvbQorICAg ICAgICBjdXJyZW50X21hdHJpeC4gKi8KKyAgICAgICAgaWYgKHJvdy0+ZW5hYmxlZF9wKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIHct PmRlc2lyZWRfbWF0cml4KTsKKyAgICAgICAgICAgIC8qIElmIHRoZSBgY3Vyc29yX3Jvd2AgaXMg d2l0aGluIHRoZSBgZGVzaXJlZF9tYXRyaXhgLCB0aGVuIGl0IHdhcworICAgICAgICAgICAgcHJv Y2Vzc2VkIGhlcmVpbmFib3ZlIGFuZCBzaG91bGQgYmUgc2tpcHBlZCBhdCB0aGlzIHRpbWUuICov CisgICAgICAgICAgICBpZiAodnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgIGNv bnRpbnVlOworICAgICAgICAgICAgaW50IGk7CisgICAgICAgICAgICAvKiBXZSdsbCBoYXZlIHRv IHBsYXkgYSBsaXR0bGUgYml0IHdpdGggd2hlbiB0bworICAgICAgICAgICAgICAgZGV0ZWN0X2lu cHV0X3BlbmRpbmcuICBJZiBpdCdzIGRvbmUgdG9vIG9mdGVuLAorICAgICAgICAgICAgICAgc2Ny b2xsaW5nIGxhcmdlIHdpbmRvd3Mgd2l0aCByZXBlYXRlZCBzY3JvbGwtdXAKKyAgICAgICAgICAg ICAgIGNv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ICh3LT5kZXNpcmVkX21hdHJpeCwgMCk7CisgICAgICAgICAgIGRlc2lyZWRf cm93IDwgZW5kCisgICAgICAgICAgICYmIChmb3JjZV9wIHx8ICFpbnB1dF9wZW5kaW5nKQorICAg ICAgICAgICAvKiBXMzIgRW1hY3MgY3Jhc2hlcyBvbiBzdGFydHVwIHdpdGhvdXQgYSBCVUZGRVJQ IGNoZWNrLiAqLworICAgICAgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAg ICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAg ICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3No YWlycykpCisgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBmY192aXNpYmxlKSkpOworICAgICAgICAgICArK2Rlc2lyZWRfcm93KQorICAgICAgICB7 CisgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGRlc2lyZWRfcm93LCB3LT5k ZXNpcmVkX21hdHJpeCk7CisgICAgICAgICAgaWYgKGRlc2lyZWRfcm93LT5lbmFibGVkX3ApCisg ICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJyZW50 X3JvdyA9IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgICAgICAgICBl bnVtIG1jX3Jvd19wb3NpdGlvbiByb3dfcG9zaXRpb24gPSBtY19yb3dfcG9zaXRpb24gKHcsIGN1 cnJlbnRfcm93LCBjdXJyZW50X3JvdywgdnBvcyk7CisgICAgICAgICAgaWYgKGN1cnJlbnRfcm93 LT5lbmFibGVkX3ApCisgICAgICAgICAgICBtY19kcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRy aXgsIGN1cnJlbnRfcm93LCBjdXJyZW50X3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAg ICAgICAgICAgICAgICAgICAgY3VycmVudF9yb3ctPngsIGN1cnJlbnRfcm93LT51c2VkW1RFWFRf QVJFQV0sIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNz ZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsCisgICAgICAgICAgICAgICAgICAgICAgICAg U0VUX0NVUlNPUl9PTkUpOworICAgICAgICB9CisKKyAgICAgIG1jX3Jlc3RvcmVfZ2x5cGhfbWF0 cml4IChzYXZlZF9kZXNpcmVkLCB3LT5kZXNpcmVkX21hdHJpeCk7CisgICAgICBtY19yZXN0b3Jl X2dseXBoX21hdHJpeCAoc2F2ZWRfY3VycmVudCwgdy0+Y3VycmVudF9tYXRyaXgpOworCisgICAg ICBtY191cGRhdGVfd2luZG93X2VyYXNlICh3LCBvbGRfbWF0cml4KTsKKworICAgICAgbWNfeGZy ZWVfY2FjaGVfbWF0cml4ICh3LCAmb2xkX21hdHJpeCk7CisKKyAgICB9CisgIC8vIGNsb2NrX3Qg Y2xvY2tfZW5kID0gY2xvY2soKTsKKyAgLy8gZG91YmxlIGNwdV90aW1lX3VzZWQgPSAoKGRvdWJs ZSkgKGNsb2NrX2VuZCAtIGNsb2NrX3N0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsKKyAgLy8gZnBy aW50ZiAoc3RkZXJyLCAibWNfc2Nyb2xsaW5nX3dpbmRvdyAoJXMpOiAgVElNRSAoJWYpXG4iLCBt Y193aW5kb3cgKHcpLCBjcHVfdGltZV91c2VkKTsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNP UlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIFN0cnVjdHVyZSB0byBwYXNz IGRpbWVuc2lvbnMgYXJvdW5kLiAgVXNlZCBmb3IgY2hhcmFjdGVyIGJvdW5kaW5nCiAgICBib3hl cywgZ2x5cGggbWF0cml4IGRpbWVuc2lvbnMgYW5kIGFsaWtlLiAgKi8KIApAQCAtMjI0MSw2ICs0 MDE3LDE2IEBAIGZyZWVfd2luZG93X21hdHJpY2VzIChzdHJ1Y3Qgd2luZG93ICp3KQogCSAgZnJl ZV9nbHlwaF9tYXRyaXggKHctPmN1cnJlbnRfbWF0cml4KTsKIAkgIGZyZWVfZ2x5cGhfbWF0cml4 ICh3LT5kZXNpcmVkX21hdHJpeCk7CiAJICB3LT5jdXJyZW50X21hdHJpeCA9IHctPmRlc2lyZWRf bWF0cml4ID0gTlVMTDsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICBtY194ZnJlZV9jYWNoZV9tYXRyaXggKHcsICZ3LT5tY19tYXRyaXgp OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJfQogCiAgICAgICAvKiBOZXh0IHdp bmRvdyBvbiBzYW1lIGxldmVsLiAgKi8KQEAgLTMzODcsNiArNTE3MywyNiBAQCBjaGVja19jdXJy ZW50X21hdHJpeF9mbGFncyAoc3RydWN0IHdpbmRvdyAqdykKIHN0YXRpYyBib29sCiB1cGRhdGVf d2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiB7CisKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKG1jX3N0ZGVy cl9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgInVwZGF0ZV93aW5kb3cgKCVzKVxuIiwgbWNfd2lu ZG93ICh3KSk7CisKKyAgc3RydWN0IG1jX2Vzc2VudGlhbHMgZXNzZW50aWFsczsKKyAgbWNfc2V0 X2Vzc2VudGlhbHMgKHcsICZlc3NlbnRpYWxzKTsKKworICBtY191cGRhdGVfd2luZG93X2RyeXJ1 biAodywgZm9yY2VfcCwgZXNzZW50aWFscyk7CisKKyAgc3RydWN0IGdseXBoX21hdHJpeCAqY3Vy c29yX21hdHJpeCA9IE5VTEw7CisKKyAgYm9vbCBkcmF3X3AgPSB0cnVlOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKmRlc2lyZWRfbWF0cml4 ID0gdy0+ZGVzaXJlZF9tYXRyaXg7CiAgIGJvb2wgcGF1c2VkX3A7CiAgIGludCBwcmVlbXB0X2Nv dW50ID0gY2xpcF90b19ib3VuZHMgKDEsIGJhdWRfcmF0ZSAvIDI0MDAgKyAxLCBJTlRfTUFYKTsK QEAgLTM0NjQsNiArNTI3MCw0NyBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBi b29sIGZvcmNlX3ApCiAJICAgIH0KIAl9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogUHJvY2VzcyB0aGUgY3Vyc29yIHJvdyBhdCB0 aGUgb3V0c2V0IGlmIGl0IGlzIHdpdGhpbiBgZGVzaXJlZF9tYXRyaXhgLgorICBXaGVuIHByb2Nl c3NpbmcgYWxsIG90aGVyIHJvd3MsIHdlIHdpbGwgcXVlcnkgdGhlIGB3LT5jdXJyZW50X21hdH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OworICAgICAgICAgIGNoYW5nZWRfcCB8PSAoQlVG RkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoIU5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgISBOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkpCisgICAgICAgICAgICAgICAgICAgICAgID8g bWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9w LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29y X21hdHJpeCwgZXNzZW50aWFscywgZHJhd19wKQorICAgICAgICAgICAgICAgICAgICAgICA6IHVw ZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7Cisg ICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAgICAgICAg ICBmb3IgKGludCBpID0gdnBvcyArIDE7IGkgPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MgLSAx OyArK2kpCisgICAgICAgICAgICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAody0+Y3VycmVu dF9tYXRyaXgsIGksIGZhbHNlKTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0K KworICBjdXJzb3JfbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKICAgICAgIC8qIFVwZGF0ZSB0aGUgcmVzdCBvZiB0aGUgbGluZXMuICAq LwogICAgICAgZm9yICg7IHJvdyA8IGVuZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVuZGluZyk7 ICsrcm93KQogCS8qIHNjcm9sbGluZ193aW5kb3cgcmVzZXRzIHRoZSBlbmFibGVkX3AgZmxhZyBv ZiB0aGUgcm93cyBpdApAQCAtMzQ3MSw2ICs1MzE4LDE5IEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVj dCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKIAlpZiAocm93LT5lbmFibGVkX3ApCiAJICB7CiAJ ICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIGRlc2lyZWRfbWF0cml4KTsKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAg ICAgICAgIC8qIElmIHRoZSBgY3Vyc29yX3Jvd2AgaXMgd2l0aGluIHRoZSBgZGVzaXJlZF9tYXRy aXhgLCB0aGVuIGl0IHdhcworICAgICAgICAgIHByb2Nlc3NlZCBoZXJlaW5hYm92ZSBhbmQgc2hv dWxkIGJlIHNraXBwZWQgYXQgdGhpcyB0aW1lLiAqLworICAgICAgICAgIGlmICh2cG9zID09IHct PmN1cnNvci52cG9zKQorICAgICAgICAgIGNvbnRpbnVlOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAJICAgIGludCBpOwogCiAJICAgIC8qIFdlJ2xsIGhhdmUgdG8gcGxheSBhIGxp dHRsZSBiaXQgd2l0aCB3aGVuIHRvCkBAIC0zNDc5LDggKzUzMzksMjEgQEAgdXBkYXRlX3dpbmRv dyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCSAgICAgICBjb21tYW5kcyB3aWxs IHRvbyBxdWlja2x5IHBhdXNlIHJlZGlzcGxheS4gICovCiAJICAgIGlmICghZm9yY2VfcCAmJiAr K25fdXBkYXRlZCAlIHByZWVtcHRfY291bnQgPT0gMCkKIAkgICAgICBkZXRlY3RfaW5wdXRfcGVu ZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7Ci0JICAgIGNoYW5nZWRfcCB8PSB1cGRhdGVfd2lu ZG93X2xpbmUgKHcsIHZwb3MsCi0JCQkJCSAgICAgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7 CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisK KyAgICAgICAgICBjaGFuZ2VkX3AgfD0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAg ICAgICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1j X2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHx8ICEgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkp KQorICAgICAgICAgICAgICAgICAgICAgICA/IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywgdnBv cywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIGRyYXdfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgOiB1cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZt b3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwog CiAJICAgIC8qIE1hcmsgYWxsIHJvd3MgYmVsb3cgdGhlIGxhc3QgdmlzaWJsZSBvbmUgaW4gdGhl IGN1cnJlbnQKIAkgICAgICAgbWF0cml4IGFzIGludmFsaWQuICBUaGlzIGlzIG5lY2Vzc2FyeSBi ZWNhdXNlIG9mCkBAIC0zNTAxLDYgKzUzNzQsNDEgQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0IHdp bmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCiAgICAgc2V0X2N1cnNvcjoKIAorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAvKiBJZiB3ZSBqdW1w ZWQgaGVyZSBmcm9tIGBzZXRfY3Vyc29yYCwgdGhlbiBzZXQgdGhlIGBjdXJzb3JfbWF0cml4YC4g Ki8KKyAgaWYgKGN1cnNvcl9tYXRyaXggPT0gTlVMTCkKKyAgICBjdXJzb3JfbWF0cml4ID0gdy0+ Y3VycmVudF9tYXRyaXg7CisKKyAgLyogUmVzZXQgYHJvd2AgdG8gMCBzbyB0aGF0IGZha2UgY3Vy c29ycyBjYW4gYmUgZHJhd24gb24gcm93cyBwcmVjZWRpbmcgdGhlCisgIGZpcnN0IGByb3ctPmVu YWJsZWRfcGAuICBKdXN0IHByaW9yIHRvIHRoZSBjYWxsIHRvIGBzY3JvbGxpbmdfd2luZG93JyBh Ym92ZSwKKyAgYHJvd2Agd2FzIGFkdmFuY2VkIHRvIHRoZSBmaXJzdCBgcm93LT5lbmFibGVkX3Bg LiAqLworICBmb3IgKHN0cnVjdCBnbHlwaF9yb3cgKmRlc2lyZWRfcm93ID0gTUFUUklYX1JPVyAo ZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAgIGRlc2lyZWRfcm93IDwgZW5kCisgICAgICAgJiYg KGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpCisgICAgICAgLyogVzMyIEVtYWNzIGNyYXNoZXMg b24gc3RhcnR1cCB3aXRob3V0IGEgQlVGRkVSUCBjaGVjay4gKi8KKyAgICAgICAmJiBCVUZGRVJQ ICh3LT5jb250ZW50cykKKyAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgbWNfY29uZikpCisgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpOworICAgICAgICsrZGVzaXJlZF9yb3cpCisg ICAgeworICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGRlc2lyZWRfcm93LCBkZXNp cmVkX21hdHJpeCk7CisgICAgICBpZiAoZGVzaXJlZF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAg Y29udGludWU7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJyZW50X3JvdyA9IE1BVFJJWF9S T1cgKHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgICAgIGVudW0gbWNfcm93X3Bvc2l0aW9u IHJvd19wb3NpdGlvbiA9IG1jX3Jvd19wb3NpdGlvbiAodywgY3VycmVudF9yb3csIGN1cnJlbnRf cm93LCB2cG9zKTsKKyAgICAgIGlmIChjdXJyZW50X3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICBt Y19kcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIGN1cnJlbnRfcm93LCBjdXJyZW50X3Jv dy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3Jvdy0+ eCwgY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgdnBvcywKKyAgICAgICAgICAgICAgICAg ICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgZHJhd19wLCBTRVRf Q1VSU09SX1RXTyk7CisgICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAg ICAvKiBVcGRhdGUgdGhlIGhlYWRlciBsaW5lIGFmdGVyIHNjcm9sbGluZyBiZWNhdXNlIGEgbmV3 IGhlYWRlcgogCSBsaW5lIHdvdWxkIG90aGVyd2lzZSBvdmVyd3JpdGUgbGluZXMgYXQgdGhlIHRv cCBvZiB0aGUgd2luZG93CiAJIHRoYXQgY2FuIGJlIHNjcm9sbGVkLiAgKi8KQEAgLTM1MTYsNyAr NTQyNCw0OSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3Ap CiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAJICBpZiAoY2hhbmdlZF9wICYmIHJpZi0+Zml4 X292ZXJsYXBwaW5nX2FyZWEpCiAJICAgIHsKLQkgICAgICByZWRyYXdfb3ZlcmxhcHBlZF9yb3dz ICh3LCB5Yik7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKy8qIGByZWRyYXdfb3ZlcmxhcHBlZF9yb3dzJzogIFJlZHJhdyBsaW5lcyBmcm9t IHRoZSBjdXJyZW50IG1hdHJpeC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URVhU X0FSRUEgPyByb3ctPnggOiAwKTsKKyAgICAgICAgICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3 LCB3LT5jdXJyZW50X21hdHJpeCwgcm93LCBhcmVhLCByb3ctPngsIDAsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgcm93LT51c2VkW2FyZWFdLCB0cnVlLCBEUkFXX05PUk1BTF9U RVhULAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVQREFURV9XSU5ET1dfX1JF RFJBV19PVkVSTEFQUEVEX1JPV1MpCisgICAgICAgICAgICAgICAgICAmJiByb3ctPnVzZWRbYXJl YV0pCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+ d3JpdGVfZ2x5cGhzICh3LCByb3csIHJvdy0+Z2x5cGhzW2FyZWFdLCBhcmVhLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnVzZWRbYXJlYV0pOwor ICAgICAgICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHJv dywgYXJlYSwgLTEpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAg ICByb3ctPm92ZXJsYXBwZWRfcCA9IDA7CisgICAgICAgIH0KKyAgICAgIGlmIChNQVRSSVhfUk9X X0JPVFRPTV9ZIChyb3cpID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKIAkgICAgICByZWRyYXdfb3ZlcmxhcHBpbmdfcm93cyAodywg eWIpOwogCSAgICB9CiAjZW5kaWYKQEAgLTM1MzYsOCArNTQ4NiwyMCBAQCB1cGRhdGVfd2luZG93 IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiAjZW5kaWYKIAogI2lmZGVmIEhBVkVf V0lORE9XX1NZU1RFTQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICBtY191cGRh dGVfd2luZG93X2ZyaW5nZXMgKHcsIDApOworICAgIGVsc2UKICAgICAgIHVwZGF0ZV93aW5kb3df ZnJpbmdlcyAodywgMCk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIC8q IEVuZCB0aGUgdXBkYXRlIG9mIHdpbmRvdyBXLiAgRG9uJ3Qgc2V0IHRoZSBjdXJzb3IgaWYgd2UK ICAgICAgICAgIHBhdXNlZCB1cGRhdGluZyB0aGUgZGlzcGxheSBiZWNhdXNlIGluIHRoaXMgY2Fz ZSwKICAgICAgICAgIHNldF93aW5kb3dfY3Vyc29yX2FmdGVyX3VwZGF0ZSBoYXNuJ3QgYmVlbiBj YWxsZWQsIGFuZApkaWZmIC0tZ2l0IGEvc3JjL2ZyYW1lLmggYi9zcmMvZnJhbWUuaAppbmRleCBm YTQ1YTMyLi41M2FkMTMxIDEwMDY0NAotLS0gYS9zcmMvZnJhbWUuaAorKysgYi9zcmMvZnJhbWUu aApAQCAtMjA1LDYgKzIwNSwxNiBAQCBzdHJ1Y3QgZnJhbWUKICAgTGlzcF9PYmplY3QgdG9vbF9i YXJfaXRlbXM7CiAgIC8qIHRvb2xfYmFyX2l0ZW1zIHNob3VsZCBiZSB0aGUgbGFzdCBMaXNwX09i amVjdCBtZW1iZXIuICAqLwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCisgIC8qIE5vbi1uaWwgd2hlbiB0aGUgZnJhbWUgaXMgaW4gdGhlIHBy b2Nlc3Mgb2YgYmVpbmcgdXBkYXRlZC4gKi8KKyAgc3RydWN0IGZyYW1lICptY191cGRhdGluZ19m cmFtZTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBDYWNoZSBvZiByZWFs aXplZCBmYWNlcy4gICovCiAgIHN0cnVjdCBmYWNlX2NhY2hlICpmYWNlX2NhY2hlOwogCmRpZmYg LS1naXQgYS9zcmMvZnJpbmdlLmMgYi9zcmMvZnJpbmdlLmMKaW5kZXggZDBkNTk5Mi4uMjUyZWRh YyAxMDA2NDQKLS0tIGEvc3JjL2ZyaW5nZS5jCisrKyBiL3NyYy9mcmluZ2UuYwpAQCAtNDM3LDgg KzQzNyw0NjIgQEAgc3RhdGljIHVuc2lnbmVkIHNob3J0IGVtcHR5X2xpbmVfYml0c1tdID0gewog I2RlZmluZSBTVEFOREFSRF9CSVRNQVBfSEVJR0hUKGJpdHMpIChzaXplb2YgKGJpdHMpL0JZVEVT X1BFUl9CSVRNQVBfUk9XKQogI2RlZmluZSBGUkJJVFMoYml0cykgIGJpdHMsIFNUQU5EQVJEX0JJ VE1BUF9IRUlHSFQgKGJpdHMpCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdp biBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIGArLWZyaW5nZS1oZWxwZXItZGVjaW1hbCcgZGVm aW5lZCBpbiBgY3Jvc3NoYWlycy5lbGAgKi8KKworLyogVE9ETzogIENvbnNpZGVyIGFkZGluZyB0 aGUgZm9sbG93aW5nIGZyaW5nZSBiaXRtYXBzOgorICAoZGVmaW5lLWZyaW5nZS1iaXRtYXAgJ2Jy ZWFrcG9pbnQgIlx4M2NceDdlXHhmZlx4ZmZceGZmXHhmZlx4N2VceDNjIikKKyAgKGRlZmluZS1m cmluZ2UtYml0bWFwICdob2xsb3ctcmlnaHQtdHJpYW5nbGUgIlx4ZTBceDkwXHg4OFx4ODRceDg0 XHg4OFx4OTBceGUwIikgKi8KKworLyogMjQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4i CisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLnh4Li4iCisgICAgICAieC4uLi54eC4iCisg ICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eC4iCisgICAg ICAieC4uLnh4Li4iCisgICAgICAieC4ueHguLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3dfYml0c1tdID17CisgIDB4ODAsIDB4ODAsIDB4ODAs IDB4OTgsIDB4OGMsIDB4ODYsIDB4YmYsCisgIDB4YmYsIDB4ODYsIDB4OGMsIDB4OTgsIDB4ODAs IDB4ODAsIDB4ODB9OworCisvKiAyNQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAg ICAgICIueHguLi54eCIKKyAgICAgICIuLnh4Li54eCIKKyAgICAgICIuLi54eC54eCIKKyAgICAg ICJ4eHh4eHh4eCIKKyAgICAgICJ4eHh4eHh4eCIKKyAgICAgICIuLi54eC54eCIKKyAgICAgICIu Lnh4Li54eCIKKyAgICAgICIueHguLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4u Li54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Jl dmVyc2VkX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvd19iaXRzW10gPXsKKyAgMHgzLCAweDMsIDB4 MywgMHg2MywgMHgzMywgMHgxYiwgMHhmZiwgMHhmZiwgMHgxYiwgMHgzMywgMHg2MywgMHgzLCAw eDMsIDB4M307CisKKy8qIDI2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgInh4eHh4eHh4IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAg InguLnh4Li54IgorICAgICAgInguLi54eC54IgorICAgICAgInguLi4ueHh4IgorICAgICAgIngu eHh4eHh4IgorICAgICAgIngueHh4eHh4IgorICAgICAgInguLi4ueHh4IgorICAgICAgInguLi54 eC54IgorICAgICAgInguLnh4Li54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54 IgorICAgICAgInh4eHh4eHh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfaG9sbG93 X3JlY3RhbmdsZV9yaWdodF9hcnJvd19iaXRzW10gPXsKKyAgMHhmZiwgMHg4MSwgMHg4MSwgMHg5 OSwgMHg4ZCwgMHg4NywgMHhiZiwKKyAgMHhiZiwgMHg4NywgMHg4ZCwgMHg5OSwgMHg4MSwgMHg4 MSwgMHhmZn07CisKKy8qIDI3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgInh4eHh4eHh4IgorICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IgorICAgICAg IngueHguLnh4IgorICAgICAgInguLnh4Lnh4IgorICAgICAgInguLi54eHh4IgorICAgICAgInh4 eHh4eHh4IgorICAgICAgInh4eHh4eHh4IgorICAgICAgInguLi54eHh4IgorICAgICAgInguLnh4 Lnh4IgorICAgICAgIngueHguLnh4IgorICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4 IgorICAgICAgInh4eHh4eHh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcmV2ZXJz ZWRfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvd19iaXRzW10gPXsKKyAgMHhmZiwgMHg4MSwg MHg4MSwgMHhiMSwgMHg5OSwgMHg4ZCwgMHhmZiwKKyAgMHhmZiwgMHg4ZCwgMHg5OSwgMHhiMSwg MHg4MSwgMHg4MSwgMHhmZn07CisKKy8qIDI4CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgInh4eHh4eHh4IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54 IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54Igor ICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAg ICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAgInguLi4uLi54IgorICAgICAg InguLi4uLi54IgorICAgICAgInh4eHh4eHh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfaG9sbG93X3JlY3RhbmdsZV9iaXRzW10gPXsKKyAgMHhmZiwgMHg4MSwgMHg4MSwgMHg4MSwg MHg4MSwgMHg4MSwgMHg4MSwKKyAgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwgMHg4MSwg MHhmZn07CisKKy8qIDI5CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAg InguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgIngu Li4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4u Li4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4u IgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgor ICAgICAgInguLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxf YmFyX2JpdHNbXSA9eworICAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgw LAorICAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwLCAweDgwfTsKKworLyogMzAK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4ueHgiCisgICAg ICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAi Li4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4u Li4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4u eHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgiCisgICAgICAiLi4uLi4ueHgi KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19yZXZlcnNlZF92ZXJ0aWNhbF9iYXJfYml0 c1tdID17CisgIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4 MywgMHgzLCAweDMsIDB4MywgMHgzfTsKKworLyogMzEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieHguLi4uLi4iCisgICAgICAieHguLi4uLi4iCisgICAgICAiIHh4 Li4uLi4iCisgICAgICAiLnh4Li4uLi4iCisgICAgICAiLi54eC4uLi4iCisgICAgICAiLi54eC4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guLiIKKyAgICAgICJ4eHh4LnguLiIKKyAgICAgICIu eHh4LnguLiIKKyAgICAgICIuLi54LnguLiIKKyAgICAgICIuLi54LnguLiIKKyAgICAgICIuLi54 LnguLiIKKyAgICAgICIuLi54LnguLiIKKyAgICAgICIuLi54LnguLiIKKyAgICAgICIuLi54Lngu LiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3BpbGNyb3dfYml0c1tdID17CisgIDB4 N2UsIDB4ZjQsIDB4ZjQsIDB4ZjQsIDB4NzQsIDB4MTQsIDB4MTQsIDB4MTQsIDB4MTQsIDB4MTQs IDB4MTR9OworCisvKiAzNAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAg ICIuLnh4eHguLiIKKyAgICAgICIueHh4eHh4LiIKKyAgICAgICJ4Li54eC4ueCIKKyAgICAgICJ4 Li54eC4ueCIKKyAgICAgICJ4eHh4eHh4eCIKKyAgICAgICJ4eC4uLi54eCIKKyAgICAgICJ4eHgu Lnh4eCIKKyAgICAgICIueHh4eHh4LiIKKyAgICAgICIuLnh4eHguLiIpCisqLworc3RhdGljIHVu c2lnbmVkIHNob3J0IG1jX3NtaWxleV9mYWNlX2JpdHNbXSA9eworICAweDNjLCAweDdlLCAweDk5 LCAweDk5LCAweGZmLCAweGMzLCAweGU3LCAweDdlLCAweDNjfTsKKworLyogMzUKKyAgICAoKy1m cmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi54Li4uLi4iCisgICAgICAiLi4ueC4u Li4iCisgICAgICAiLi4uLnguLi4iCisgICAgICAiLi4uLi54Li4iCisgICAgICAiLi4uLnguLi4i CisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi54Li4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfcmlnaHRfYml0c1tdID17CisgIDB4MjAsIDB4MTAsIDB4 OCwgMHg0LCAweDgsIDB4MTAsIDB4MjB9OworCisvKiAzNgorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLnguLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIu Li54Li4uLiIKKyAgICAgICIuLnguLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4u eC4uLiIKKyAgICAgICIuLi4uLnguLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Np bmdsZV9hbmdsZV9sZWZ0X2JpdHNbXSA9eworICAweDQsIDB4OCwgMHgxMCwgMHgyMCwgMHgxMCwg MHg4LCAweDR9OworCisvKiAzNworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAg ICAgICJ4eC54eC4uLiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAg ICIuLi54eC54eCIKKyAgICAgICIuLnh4Lnh4LiIKKyAgICAgICIueHgueHguLiIKKyAgICAgICJ4 eC54eC4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV9yaWdo dF9iaXRzW10gPXsKKyAgMHhkOCwgMHg2YywgMHgzNiwgMHgxYiwgMHgzNiwgMHg2YywgMHhkOH07 CisKKy8qIDM4CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLnh4 Lnh4IgorICAgICAgIi4ueHgueHguIgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4u IgorICAgICAgIi54eC54eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IikK KyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX2xlZnRfYml0c1tdID17 CisgIDB4MWIsIDB4MzYsIDB4NmMsIDB4ZDgsIDB4NmMsIDB4MzYsIDB4MWJ9OworCisvKiAzOQor ICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4LngueC4uLiIKKyAgICAg ICIueC54LnguLiIKKyAgICAgICIuLngueC54LiIKKyAgICAgICIuLi54LngueCIKKyAgICAgICIu LngueC54LiIKKyAgICAgICIueC54LnguLiIKKyAgICAgICJ4LngueC4uLiIpCisqLworc3RhdGlj IHVuc2lnbmVkIHNob3J0IG1jX3RyaXBsZV9hbmdsZV9yaWdodF9iaXRzW10gPXsKKyAgMHhhOCwg MHg1NCwgMHgyYSwgMHgxNSwgMHgyYSwgMHg1NCwgMHhhOH07CisKKy8qIDQwCisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLngueC54IgorICAgICAgIi4ueC54Lngu IgorICAgICAgIi54LngueC4uIgorICAgICAgIngueC54Li4uIgorICAgICAgIi54LngueC4uIgor ICAgICAgIi4ueC54LnguIgorICAgICAgIi4uLngueC54IikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfdHJpcGxlX2FuZ2xlX2xlZnRfYml0c1tdID17CisgIDB4MTUsIDB4MmEsIDB4NTQs IDB4YTgsIDB4NTQsIDB4MmEsIDB4MTV9OworCisvKiA0MQorICAgICgrLWZyaW5nZS1oZWxwZXIt aGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIu Li4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li4uLi54LiIKKyAgICAgICIuLi4uLi4u LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIp CisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV91cF9iaXRzW10gPXsK KyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgxMCwgMHgyOCwgMHg0NCwgMHg4MiwgMHgwMCwg MHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQyCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLi4uLi4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi54Li4ueC4uIgor ICAgICAgIi4ueC54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX2Rvd25fYml0c1tdID17CisgIDB4 MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4ODIsIDB4NDQsIDB4MjgsIDB4MTAsIDB4MDAsIDB4MDAs IDB4MDAsIDB4MDB9OworCisvKiA0MworICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAg ICAgICIuLi54Li4uLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4 Li4uLi54LiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4uLi4uLiIKKyAgICAgICIuLi4u Li4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2RvdWJsZV9hbmdsZV91cF9iaXRz W10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgxMCwgMHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwg MHg0NCwgMHg4MiwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQ0CisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAg Ii4ueC54Li4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4u eC54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4u Li4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91 YmxlX2FuZ2xlX2Rvd25fYml0c1tdID17CisgIDB4MDAsIDB4MDAsIDB4MDAsIDB4ODIsIDB4NDQs IDB4MjgsIDB4OTIsIDB4NDQsIDB4MjgsIDB4MTAsIDB4MDAsIDB4MDAsIDB4MDB9OworCisvKiA0 NQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi4uLiIKKyAg ICAgICIuLi54Li4uLiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAg ICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4 Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li4u Li54LiIKKyAgICAgICIuLi4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3Ry aXBsZV9hbmdsZV91cF9iaXRzW10gPXsKKyAgMHgwMCwgMHgxMCwgMHgyOCwgMHg0NCwgMHg5Miwg MHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwgMHg0NCwgMHg4MiwgMHgwMH07CisKKy8qIDQ2CisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIngu Li4uLnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgInguLngu LnguIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgInguLnguLngu IgorICAgICAgIi54Li4ueC4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi4uLnguLi4uIgor ICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1cGxl X2FuZ2xlX2Rvd25fYml0c1tdID17CisgIDB4MDAsIDB4ODIsIDB4NDQsIDB4MjgsIDB4OTIsIDB4 NDQsIDB4MjgsIDB4OTIsIDB4NDQsIDB4MjgsIDB4MTAsIDB4MDB9OworCisvKiA0NworICAgICgr LWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLngu eC4uLiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4u LiIKKyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIK KyAgICAgICIueC4uLnguLiIKKyAgICAgICJ4Li54Li54LiIKKyAgICAgICIuLngueC4uLiIKKyAg ICAgICIueC4uLnguLiIKKyAgICAgICJ4Li4uLi54LiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNo b3J0IG1jX3F1YWRydXBsZV9hbmdsZV91cF9iaXRzW10gPXsKKyAgMHgxMCwgMHgyOCwgMHg0NCwg MHg5MiwgMHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwgMHg0NCwgMHg5MiwgMHgyOCwgMHg0NCwgMHg4 Mn07CisKKy8qIDQ4CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIngu Li4uLnguIgorICAgICAgIi54Li4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h3LT5jb250ZW50 cyksIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKSwgIU5JTFAgKGNtYXApKQorICAgIHsKKyAgICAg IGJtMSA9IG1jX2Fzc3EgKGJpdG1hcCwgY21hcCk7CisgICAgICBpZiAoQ09OU1AgKGJtMSkpCisg IHsKKyAgICBpZiAoKGJtMSA9IFhDRFIgKGJtMSkpLCBOSUxQIChibTEpKQorICAgICAgcmV0dXJu IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgaWYgKENPTlNQIChibTEpKQorICAgICAgeworICAg ICAgICBsbjEgPSBYRklYTlVNIChGbGVuZ3RoIChibTEpKTsKKyAgICAgICAgaWYgKHBhcnRpYWxf cCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAobG4xID4gaXgyKQorICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgYm0gPSBtY19udGggKGl4MiwgYm0xKTsKKyAgICAgICAgICAg ICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAg ICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGlmIChsbjEgPiBpeDEpCisgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgICAgICAgICAgICAgIGlm ICghRVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJt MSwgIUVRIChibSwgUXQpKSkKKyAgICAgIGdvdG8gZm91bmQ7CisgIH0KKyAgICB9CisgIGlmICgh RVEgKGNtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3Qp KQorICAgICAgJiYgIU5JTFAgKEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0 b3JfYWxpc3QpKSkKKyAgICB7CisgICAgICBibTIgPSBtY19hc3NxIChiaXRtYXAsIEJWQVIgKCZi dWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsKKyAgICAgIGlmIChDT05T UCAoYm0yKSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgoYm0yID0gWENEUiAoYm0yKSksICFO SUxQIChibTIpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoQ09OU1AgKGJtMikp CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgbG4yID0gWEZJWE5VTSAoRmxl bmd0aCAoYm0yKSk7CisgICAgICAgICAgICAgICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgaWYgKGxuMiA+IGl4MikKKyAgICAg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgYm0gPSBtY19u dGggKGl4MiwgYm0yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0 KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBpZiAobG4xID4gaXgxKQorICAgIHsK KyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQor ICAgICAgICBnb3RvIGZvdW5kOworICAgIH0KKyAgaWYgKGxuMiA+IGl4MSkKKyAgICB7CisgICAg ICBibSA9IG1jX250aCAoaXgxLCBibTIpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAg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hcCA9IEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpLCAhTklMUCAoY21hcCkp CisgICAgeworICAgICAgYm0xID0gbWNfYXNzcSAoYml0bWFwLCBjbWFwKTsKKyAgICAgIGlmIChD T05TUCAoYm0xKSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgoYm0xID0gWENEUiAoYm0xKSks IE5JTFAgKGJtMSkpCisgICAgICAgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAg ICAgICAgICBpZiAoQ09OU1AgKGJtMSkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGxu MSA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMSkpOworICAgICAgICAgICAgICBpZiAocGFydGlhbF9w KQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmIChsbjEgPiBpeDIpCisg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAo aXgyLCBibTEpOworICAgICAgICAgICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAg ICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4MSkKKyAgICAgICAgICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOwor ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmICgoYm0gPSBi bTEsICFFUSAoYm0sIFF0KSkpCisgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgIH0K KyAgICB9CisgIGlmICghRVEgKGNtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9p bmRpY2F0b3JfYWxpc3QpKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKCZidWZmZXJfZGVmYXVsdHMs IGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKSkKKyAgICB7CisgICAgICBibTIgPSBtY19hc3NxIChi aXRtYXAsIEJWQVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsK KyAgICAgIGlmIChDT05TUCAoYm0yKSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgoYm0yID0g WENEUiAoYm0yKSksICFOSUxQIChibTIpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBp ZiAoQ09OU1AgKGJtMikpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgbG4y ID0gWEZJWE5VTSAoRmxlbmd0aCAoYm0yKSk7CisgICAgICAgICAgICAgICAgICBpZiAocGFydGlh bF9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgaWYgKGxu MiA+IGl4MikKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgYm0gPSBtY19udGggKGl4MiwgYm0yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg aWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5k OworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBpZiAobG4x ID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICBpZiAo IUVRIChibSwgUXQpKQorICAgICAgICBnb3RvIGZvdW5kOworICAgIH0KKyAgaWYgKGxuMiA+IGl4 MSkKKyAgICB7CisgICAgICBibSA9IG1jX250aCAoaXgxLCBibTIpOworICAgICAgaWYgKCFFUSAo Ym0sIFF0KSkKKyAgICAgICAgZ290byBmb3VuZDsKKyAgICAgIHJldHVybiBNQ19OT19GUklOR0Vf QklUTUFQOworICAgIH0KKyAgICBlbHNlIGlmICgoYm0gPSBibTIsIE5JTFAgKGJtKSkpCisgICAg ICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgZm91bmQ6CisgIHJldHVybiBsb29rdXBf ZnJpbmdlX2JpdG1hcCAoYm0pOworfQorCisvKiBSZWNhbGN1bGF0ZSB0aGUgYml0bWFwcyB0byBz aG93IGluIHRoZSBmcmluZ2VzIG9mIHdpbmRvdyBXLgorICAgT25seSBtYXJrIHJvd3Mgd2l0aCBt b2RpZmllZCBiaXRtYXBzIGZvciB1cGRhdGUgaW4gcmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AuCisg ICBJZiBLRUVQX0NVUlJFTlRfUCBpcyAwLCB1cGRhdGUgY3VycmVudF9tYXRyaXggdG9vLiAqLwor Ym9vbAorbWNfdXBkYXRlX3dpbmRvd19mcmluZ2VzIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGtl ZXBfY3VycmVudF9wKQoreworICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csICpjdXIgPSAwOworICBp bnQgeWIgPSB3aW5kb3dfdGV4dF9ib3R0b21feSAodyk7CisgIGludCBybiwgbnJvd3MgPSB3LT5j dXJyZW50X21hdHJpeC0+bnJvd3M7CisgIGludCB5OworICBib29sIHJlZHJhd19wID0gMDsKKyAg TGlzcF9PYmplY3QgYm91bmRhcnlfdG9wID0gUW5pbCwgYm91bmRhcnlfYm90ID0gUW5pbDsKKyAg TGlzcF9PYmplY3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worICAgICAgICBl bHNlIGlmIChDT05TUCAoaW5kKQorICAgICAgICAgICAgICAgICAmJiBDT05TUCAoWENBUiAoaW5k KSkpCisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBwb3M7CisgICAgICAgICAgaWYg KHBvcyA9IG1jX2Fzc3EgKFF0LCBpbmQpLCAhTklMUCAocG9zKSkKKyAgICAgICAgICAgIGJvdW5k YXJ5X3RvcCA9IGJvdW5kYXJ5X2JvdCA9IGFycm93X3RvcCA9IGFycm93X2JvdCA9IFhDRFIgKHBv cyk7CisgICAgICAgICAgaWYgKHBvcyA9IG1jX2Fzc3EgKFF0b3AsIGluZCksICFOSUxQIChwb3Mp KQorICAgICAgICAgICAgYm91bmRhcnlfdG9wID0gWENEUiAocG9zKTsKKyAgICAgICAgICBpZiAo cG9zID0gbWNfYXNzcSAoUWJvdHRvbSwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBi b3VuZGFyeV9ib3QgPSBYQ0RSIChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChR dXAsIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAgICAgYXJyb3dfdG9wID0gWENEUiAocG9z KTsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAoUWRvd24sIGluZCksICFOSUxQIChwb3Mp KQorICAgICAgICAgICAgYXJyb3dfYm90ID0gWENEUiAocG9zKTsKKyAgICAgICAgfQorICAgICAg ICBlbHNlCisgICAgICAgICAgLyogQW55dGhpbmcgZWxzZSBtZWFucyBib3VuZGFyeSBvbiBsZWZ0 IGFuZCBubyBhcnJvd3MuICovCisgICAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90 ID0gUWxlZnQ7CisgICAgfQorICB0b3BfaW5kX3JuID0gYm90X2luZF9ybiA9IC0xOworICBpZiAo IU5JTFAgKGluZCkpCisgICAgeworICAgICAgZm9yICh5ID0gdy0+dnNjcm9sbCwgcm4gPSAwOwor ICAgICAgICAgICB5IDwgeWIgJiYgcm4gPCBucm93czsKKyAgICAgICAgICAgeSArPSByb3ctPmhl aWdodCwgKytybikKKyAgICAgICAgeworICAgICAgICAgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4 LT5yb3dzICsgcm47CisgICAgICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAg IHJvdyA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgcm93LT5pbmRp Y2F0ZV9ib2JfcCA9IHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCA9IDA7CisgICAgICAgICAgcm93 LT5pbmRpY2F0ZV9lb2JfcCA9IHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCA9IDA7CisgICAg ICAgICAgaWYgKCFyb3ctPm1vZGVfbGluZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBpZiAodG9wX2luZF9ybiA8IDAgJiYgcm93LT52aXNpYmxlX2hlaWdodCA+IDApCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBP UyAocm93KSA8PSBCVUZfQkVHViAoWEJVRkZFUiAody0+Y29udGVudHMpKQorICAgICAgICAgICAg ICAgICAgICAgICYmICFNQVRSSVhfUk9XX1BBUlRJQUxMWV9WSVNJQkxFX0FUX1RPUF9QICh3LCBy b3cpKQorICAgICAgICAgICAgICAgICAgICByb3ctPmluZGljYXRlX2JvYl9wID0gIU5JTFAgKGJv dW5kYXJ5X3RvcCk7CisgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAg ICAgICByb3ctPmluZGljYXRlX3RvcF9saW5lX3AgPSAhTklMUCAoYXJyb3dfdG9wKTsKKyAgICAg ICAgICAgICAgICAgIHRvcF9pbmRfcm4gPSBybjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIGlmIChib3RfaW5kX3JuIDwgMCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICBpZiAoTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA+PSBCVUZfWlYgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhTUFUUklYX1JPV19Q QVJUSUFMTFlfVklTSUJMRV9BVF9CT1RUT01fUCAodywgcm93KSkKKyAgICAgICAgICAgICAgICAg ICAgcm93LT5pbmRpY2F0ZV9lb2JfcCA9ICFOSUxQIChib3VuZGFyeV9ib3QpLCBib3RfaW5kX3Ju ID0gcm47CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHkgKyByb3ctPmhlaWdodCA+PSB5 YikKKyAgICAgICAgICAgICAgICAgICAgICByb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3AgPSAh TklMUCAoYXJyb3dfYm90KSwgYm90X2luZF9ybiA9IHJuOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgZW1wdHlfcG9zID0gQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBpbmRpY2F0ZV9lbXB0eV9saW5lcyk7CisgIGlmICghTklMUCAoZW1w dHlfcG9zKSAmJiAhRVEgKGVtcHR5X3BvcywgUXJpZ2h0KSkKKyAgICBlbXB0eV9wb3MgPSBXSU5E T1dfTEVGVF9GUklOR0VfV0lEVEggKHcpID09IDAgPyBRcmlnaHQgOiBRbGVmdDsKKyAgZm9yICh5 ID0gMDsgeSA8IE1BWF9CSVRNQVBfQ0FDSEU7IHkrKykKKyAgICBiaXRtYXBfY2FjaGVbeV0gPSAt MTsKKyNkZWZpbmUgTUNfTEVGVF9GUklOR0UoY2FjaGUsIHdoaWNoLCBwYXJ0aWFsX3ApCQkJXAor ICAoYml0bWFwX2NhY2hlW2NhY2hlKjQrcGFydGlhbF9wXSA+PSAwCQkJCVwKKyAgID8gYml0bWFw X2N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XRfenZfcDsKKyAgICAgIGlmIChyb3ctPmluZGljYXRlX2JvYl9wKQorICAgICAg ICB7CisgICAgICAgICAgaWYgKEVRIChib3VuZGFyeV90b3AsIFFsZWZ0KSkKKyAgICAgICAgICAg IGJuID0gKChyb3ctPmluZGljYXRlX2VvYl9wICYmIEVRIChib3VuZGFyeV9ib3QsIFFsZWZ0KSkK KyAgICAgICAgICAgICAgICAgID8gTUNfTEVGVF9GUklOR0UgKDEsIFF0b3BfYm90dG9tLCByb3ct PmVuZHNfYXRfenZfcCkKKyAgICAgICAgICAgICAgICAgIDogTUNfTEVGVF9GUklOR0UgKDIsIFF0 b3AsIDApKTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgYm4gPSAoKHJvdy0+aW5k aWNhdGVfZW9iX3AgJiYgRVEgKGJvdW5kYXJ5X2JvdCwgUXJpZ2h0KSkKKyAgICAgICAgICAgICAg ICAgICAgPyBNQ19SSUdIVF9GUklOR0UgKDEsIFF0b3BfYm90dG9tLCByb3ctPmVuZHNfYXRfenZf cCkKKyAgICAgICAgICAgICAgICAgICAgOiBNQ19SSUdIVF9GUklOR0UgKDIsIFF0b3AsIDApKTsK KyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9saW5lX3ApCisg ICAgICAgICAgeworICAgICAgICAgICAgaWYgKEVRIChhcnJvd190b3AsIFFsZWZ0KSkKKyAgICAg ICAgICAgICAgYm4gPSBNQ19MRUZUX0ZSSU5HRSAoNiwgUXVwLCAwKTsKKyAgICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICAgIGJuID0gTUNfUklHSFRfRlJJTkdFICg2LCBRdXAsIDApOwor ICAgICAgICAgIH0KKyAgICAgIGlmIChibiAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAg ICB7CisgICAgICAgICAgc3RydWN0IGZyaW5nZV9iaXRtYXAgKmZiID0gZ2V0X2ZyaW5nZV9iaXRt YXBfZGF0YSAoYm4pOworICAgICAgICAgIGlmIChmYi0+YWxpZ24gPT0gQUxJR05fQklUTUFQX1RP UCAmJiBmYi0+cGVyaW9kID09IDApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHN0cnVj dCBnbHlwaF9yb3cgKnJvdzE7CisgICAgICAgICAgICAgIGludCB0b3BfaW5kX21heF95OworICAg ICAgICAgICAgICB0b3BfaW5kX21pbl95ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7 CisgICAgICAgICAgICAgIHRvcF9pbmRfbWF4X3kgPSB0b3BfaW5kX21pbl95ICsgZmItPmhlaWdo dDsKKyAgICAgICAgICAgICAgaWYgKHRvcF9pbmRfbWF4X3kgPiB5YikKKyAgICAgICAgICAgICAg ICB0b3BfaW5kX21heF95ID0geWI7CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSArIHJv dy0+aGVpZ2h0LCBybiA9IHRvcF9pbmRfcm4gKyAxOworICAgICAgICAgICAgICAgICAgIHkgPCB0 b3BfaW5kX21heF95ICYmIHJuIDwgbnJvd3M7CisgICAgICAgICAgICAgICAgICAgeSArPSByb3cx LT5oZWlnaHQsIHJuKyspCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYg KGJvdF9pbmRfcm4gPj0gMCAmJiBybiA+PSBib3RfaW5kX3JuKQorICAgICAgICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgICAgICAgIHJvdzEgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93 cyArIHJuOworICAgICAgICAgICAgICAgICAgaWYgKCFyb3cxLT5lbmFibGVkX3ApCisgICAgICAg ICAgICAgICAgICAgIHJvdzEgPSB3LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHJuOworICAgICAg ICAgICAgICAgICAgcm93MS0+aW5kaWNhdGVfYm9iX3AgPSByb3ctPmluZGljYXRlX2JvYl9wOwor ICAgICAgICAgICAgICAgICAgcm93MS0+aW5kaWNhdGVfdG9wX2xpbmVfcCA9IHJvdy0+aW5kaWNh dGVfdG9wX2xpbmVfcDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAg IH0KKyAgICB9CisgIGlmIChib3RfaW5kX3JuID49IDApCisgICAgeworICAgICAgaW50IGJuID0g TUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dz ICsgYm90X2luZF9ybjsKKyAgICAgIGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgIHJvdyA9 IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgYm90X2luZF9ybjsKKyAgICAgIGJvdF9yb3dfZW5k c19hdF96dl9wID0gcm93LT5lbmRzX2F0X3p2X3A7CisgICAgICBpZiAocm93LT5pbmRpY2F0ZV9l b2JfcCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChFUSAoYm91bmRhcnlfYm90LCBRbGVmdCkp CisgICAgICAgICAgICBibiA9IE1DX0xFRlRfRlJJTkdFICgzLCBRYm90dG9tLCByb3ctPmVuZHNf YXRfenZfcCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGJuID0gTUNfUklHSFRf RlJJTkdFICgzLCBRYm90dG9tLCByb3ctPmVuZHNfYXRfenZfcCk7CisgICAgICAgIH0KKyAgICAg ICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wKQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIGlmIChFUSAoYXJyb3dfYm90LCBRbGVmdCkpCisgICAgICAgICAgICAgIGJuID0g TUNfTEVGVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgICAgIGJuID0gTUNfUklHSFRfRlJJTkdFICg3LCBRZG93biwgMCk7CisgICAgICAgICAg fQorICAgICAgaWYgKGJuICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgIHsKKyAgICAg ICAgICBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCAqZmIgPSBnZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChi bik7CisgICAgICAgICAgaWYgKGZiLT5hbGlnbiA9PSBBTElHTl9CSVRNQVBfQk9UVE9NICYmIGZi LT5wZXJpb2QgPT0gMCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgc3RydWN0IGdseXBo X3JvdyAqcm93MTsKKyAgICAgICAgICAgICAgaW50IGJvdF9pbmRfbWluX3k7CisgICAgICAgICAg ICAgIGJvdF9pbmRfbWF4X3kgPSByb3ctPnkgKyByb3ctPnZpc2libGVfaGVpZ2h0OworICAgICAg ICAgICAgICBib3RfaW5kX21pbl95ID0gYm90X2luZF9tYXhfeSAtIGZiLT5oZWlnaHQ7CisgICAg ICAgICAgICAgIGlmIChib3RfaW5kX21pbl95IDwgV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAo dykpCisgICAgICAgICAgICAgICAgYm90X2luZF9taW5feSA9IFdJTkRPV19IRUFERVJfTElORV9I RUlHSFQgKHcpOworICAgICAgICAgICAgICBmb3IgKHkgPSByb3ctPnksIHJuID0gYm90X2luZF9y biAtIDE7CisgICAgICAgICAgICAgICAgICAgeSA+PSBib3RfaW5kX21pbl95ICYmIHJuID49IDA7 CisgICAgICAgICAgICAgICAgICAgeSAtPSByb3cxLT5oZWlnaHQsIHJuLS0pCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKHRvcF9pbmRfcm4gPj0gMCAmJiBybiA8PSB0 b3BfaW5kX3JuKQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAg IHJvdzEgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgICAgICAgICAg aWYgKCFyb3cxLT5lbmFibGVkX3ApCisgICAgICAgICAgICAgICAgICAgIHJvdzEgPSB3LT5jdXJy ZW50X21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgICAgICAgICAgcm93MS0+aW5kaWNhdGVf ZW9iX3AgPSByb3ctPmluZGljYXRlX2VvYl9wOworICAgICAgICAgICAgICAgICAgcm93MS0+aW5k aWNhdGVfYm90dG9tX2xpbmVfcCA9IHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcDsKKyAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGJvb2wgYXV0 b19oc2Nyb2xsX21vZGVfcCA9IEVRIChGYnVmZmVyX2xvY2FsX3ZhbHVlIChRYXV0b19oc2Nyb2xs X21vZGUsIHctPmNvbnRlbnRzKSwgUWN1cnJlbnRfbGluZSk7CisgIC8qIEVYQU1QTEU6ICAoc2Ny b2xsLWxlZnQgNSkgKi8KKyAgYm9vbCBoc2NsX2FsbF90ZW1wX3AgPSAody0+c3VzcGVuZF9hdXRv X2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTog IEMtdSBDLXggPCBhbmQgZG8gbm90aGluZy4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzBfcCA9 ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5o c2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xs ID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHct PmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgZWxz ZSBiZXNpZGVzIGhvcml6b250YWxseSBzY3JvbGxpbmcgdGhlCisgICAgICAgICAgICAgICBjdXJy ZW50IGxpbmUgZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25v dF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxs X3Blcm1fMV9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct Pm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9o c2Nyb2xsID09IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCAuLi4K KyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xs ZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8yX3AgPSAoIXctPnN1c3Bl bmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Ny b2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPT0g MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwp OworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpOyBhbmQsIHRoZW4gcHJlc3MgdGhlIGxl ZnQgYXJyb3cga2V5IG9uZSB0aW1lLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18g aG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiovCisgIGJvb2wgaHNjbF90ZW1wX3Ag PSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0 b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAw CisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVY QU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyB0aGF0IGNhdXNlcyB0aGUgY3VycmVu dCBsaW5lIHRvIGJlCisgICAgICAgICAgICAgICBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVy ZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Ny b2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9wZXJtX3AgPSAoIXctPnN1c3BlbmRf YXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVf cAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFN RSAody0+ZnJhbWUpOworICBmb3IgKHkgPSB3LT52c2Nyb2xsLCBybiA9IDA7CisgICAgICAgeSA8 IHliICYmIHJuIDwgbnJvd3M7CisgICAgICAgeSArPSByb3ctPmhlaWdodCwgcm4rK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hdHJpeC52cG9zW3Zu dGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcucmVkLAorICAgICAgLy8gICAgICAgICAg ICAgICAgICAgICAgICAgIC5ncmVlbiA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uZmcuZ3JlZW4sCisgICAgICAvLyAgICAgICAgICAgICAgICAgICAg ICAgICAgLmJsdWUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmZnLmJsdWV9OworICAgICAgLy8gIHN0cnVjdCBtY19SR0IgbHNsX2JnID0gey5yZWQg PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLnJl ZCwKKyAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdyZWVuLAorICAgICAg Ly8gICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF9jbV0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ibHVlfTsKKyAgICAgIGJvb2wgYWN0aXZl X3AgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmFj dGl2ZV9wOworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF9jbV0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5nbHlwaF9mbGF2b3I7CisgICAg ICBib29sIGVuYWJsZWRfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hl X3R5cGVdW250aF0uZW5hYmxlZF9wOwor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lk ID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICBp ZiAody0+aHNjcm9sbCAhPSAwKQorICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9m cmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ciKSwgZmFsc2UsIHRydWUp OworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0 X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJvdyIpLCB0cnVlLCB0cnVl KTsKKyAgICAgICAgICBtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNf TEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19O T19GUklOR0VfQklUTUFQOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKCh2cG9zID09IHZu dGhfZG0gfHwgdnBvcyA9PSB2bnRoX2NtKQorICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2 b3IgPT0gTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAKKyAgICAgICAgICAgICAgICAgJiYgKGhzY2xf YWxsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8wX3AKKyAg ICAgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMV9wCisgICAgICAgICAgICAgICAg ICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF90 ZW1wX3AKKyAgICAgICAgICAgICAgICAgICAgIHx8IGhzY2xfcGVybV9wKQorICAgICAgICAgICAg ICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IGZyaW5nZV9i aXRtYXAgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgICAgZW51bSBmYWNlX2lkIG92 ZXJsYXlfYXJyb3dfZmFjZV9pZCA9CisgICAgICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAg ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX2luYWN0aXZl X3dpbmRvd3MpKSkKKyAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBp bnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCBGUklO R0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAgICAg ICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJy b3ctaHNjbC1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAg ICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgICAgICBtY19sZWZ0X2ZyaW5nZV9mYWNlX2lk ID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAg ICAgICBpZiAoaHNjbF9hbGxfcGVybV8wX3ApCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAg PSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2Us IGZhbHNlKTsKKyAgICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9hbGxfcGVybV8xX3ApCisgICAg ICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRl cm4gKCIrLWhzY2wtcGVybSIpLCB0cnVlLCBmYWxzZSk7CisgICAgICAgICAgICAgICAgZWxzZSBp ZiAoaHNjbF9hbGxfcGVybV8yX3ApCisgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0g bWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIGZhbHNlLCB0 cnVlKTsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfcGVybV9wKQorICAgICAgICAg ICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVy biAoIistaHNjbC1wZXJtIiksIHRydWUsIHRydWUpOworICAgICAgICAgICAgICAgICAgICBlbHNl IGlmIChoc2NsX2FsbF90ZW1wX3ApCisgICAgICAgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1h cCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtdGVtcCIpLCBmYWxz ZSwgZmFsc2UpOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfdGVtcF9wKQor ICAgICAgICAgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0 bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtdGVtcCIpLCB0cnVlLCBmYWxzZSk7CisgICAgICAgICAg ICBtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0Vf QklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2Jp dG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfTk9fRlJJTkdF X0JJVE1BUDsKKyAgICAgICAgICB9CisgICAgICAgICAgZWxzZSBpZiAoKHZwb3MgPT0gdm50aF9k bSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgICAgICAgICAgICYmIChnbHlwaF9mbGF2 b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19I T0xMT1dfUkVDVEFOR0xFCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3Ig PT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8 fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisg ICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFS CisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURf VkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0g TUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkKKyAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxl ZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBMaXNwX09iamVjdCBiaXRtYXBfZmxh dm9yID0gKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfaG9sbG93X3Jl Y3RhbmdsZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklH SFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g UW1jX3JldmVyc2VkX2hvbGxvd19yZWN0YW5nbGVfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1df UkVDVEFOR0xFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNh bF9iYXJfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3Jl dmVyc2VkX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxf YmFyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9m bGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19yZXZlcnNlZF92ZXJ0aWNhbF9iYXIKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfYmFja3NsYXNoCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7CisgICAgICAgICAgICAgIG1jX3Jp Z2h0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1B UCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9mcmlu Z2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICAgICAgbWNfcmlnaHRf ZnJpbmdlX2ZhY2VfaWQgPQorICAgICAgICAgICAgICAgIChjdXJzb3JfdHlwZSA9PSBNQ19SSUdI VF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVf WlYKKyAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xM T1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAg ICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKSkK KyAgICAgICAgICAgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgi Ky1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAg ICAgICAgICAgICAgOiAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAg ICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBBVF9aVgorICAgICAgICAgICAgICAg ICAgICYmIChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdI VF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVW RVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAg ICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJh ci1hdC16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICAgIDog KGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAg ICAmJiByb3dfcG9zaXRpb24gPT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAgICYmIChnbHlw aF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAg ICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElD QUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29r dXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1wb3N0LXp2LWZh Y2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAgICAgOiAoY3Vyc29yX3R5 cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICYmIHJvd19w b3NpdGlvbiA9PSBQUkVfWlYKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0g TUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVS VElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBm LCBpbnRlcm4gKCIrLWJhci1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAg ICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisg ICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWCisgICAgICAgICAgICAg ICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJT RURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhf Zmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgID8g bG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1iYXItYXQtenYtZmFjZSIpLCBG UklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBN Q19SSUdIVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9u ID09IFBPU1RfWlYKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVW RVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYm IGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAg ICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxf QkFSKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRl cm4gKCIrLWJhci1wb3N0LXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAg ICAgICAgICAgOiBERUZBVUxUX0ZBQ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ZSwgMCk7CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRl X3RvcF9saW5lX3AgJiYgRVEgKGFycm93X3RvcCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAg ICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3Bf aW5kX21pbl95ID49IDApCisgICAgICAgICAgICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kg LSByb3ctPnk7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm90dG9t X2xpbmVfcCAmJiBFUSAoYXJyb3dfYm90LCBRbGVmdCkpCisgICAgICAgIHsKKyAgICAgICAgICBs ZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICBpZiAoYm90X2lu ZF9tYXhfeSA+PSAwKQorICAgICAgICAgICAgbGVmdF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0g KHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlCisg ICAgICAgIGxlZnQgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgLyogRGVjaWRlIHdoaWNo IGJpdG1hcCB0byBkcmF3IGluIHRoZSByaWdodCBmcmluZ2UuICovCisgICAgICBpZiAoV0lORE9X X1JJR0hUX0ZSSU5HRV9XSURUSCAodykgPT0gMCkKKyAgICAgICAgcmlnaHQgPSBNQ19OT19GUklO R0VfQklUTUFQOworICAgICAgZWxzZSBpZiAocm93LT5yaWdodF91c2VyX2ZyaW5nZV9iaXRtYXAg IT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgeworICAgICAgICAgIHJpZ2h0ID0gcm93 LT5yaWdodF91c2VyX2ZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgcmlnaHRfZmFjZV9pZCA9IHJv dy0+cmlnaHRfdXNlcl9mcmluZ2VfZmFjZV9pZDsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAo KCFyb3ctPnJldmVyc2VkX3AgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgIHx8IChyb3ctPnJldmVyc2VkX3AgJiYgcm93LT50cnVuY2F0ZWRfb25fbGVmdF9wKSkK KyAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0UgKDAsIFF0cnVuY2F0aW9uLCAwKTsKKyAg ICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm9iX3AgJiYgRVEgKGJvdW5kYXJ5X3RvcCwgUXJp Z2h0KSkKKyAgICAgICAgeworICAgICAgICAgIHJpZ2h0ID0gKChyb3ctPmluZGljYXRlX2VvYl9w ICYmIEVRIChib3VuZGFyeV9ib3QsIFFyaWdodCkpCisgICAgICAgICAgICAgPyBNQ19SSUdIVF9G UklOR0UgKDEsIFF0b3BfYm90dG9tLCB0b3Bfcm93X2VuZHNfYXRfenZfcCkKKyAgICAgICAgICAg ICA6IE1DX1JJR0hUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOworICAgICAgICAgIGlmICh0b3BfaW5k X21pbl95ID49IDApCisgICAgICAgICAgICByaWdodF9vZmZzZXQgPSB0b3BfaW5kX21pbl95IC0g cm93LT55OworICAgICAgICB9CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX2VvYl9wICYm IEVRIChib3VuZGFyeV9ib3QsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9 IE1DX1JJR0hUX0ZSSU5HRSAoMywgUWJvdHRvbSwgYm90X3Jvd19lbmRzX2F0X3p2X3ApOworICAg ICAgICAgIGlmIChib3RfaW5kX21heF95ID49IDApCisgICAgICAgICAgICByaWdodF9vZmZzZXQg PSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAgICAg ICB9CisgICAgICBlbHNlIGlmICgoIXJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmNvbnRpbnVlZF9w KQorICAgICAgICAgICAgICAgfHwgKHJvdy0+cmV2ZXJzZWRfcCAmJiBNQVRSSVhfUk9XX0NPTlRJ TlVBVElPTl9MSU5FX1AgKHJvdykpKQorICAgICAgICByaWdodCA9IE1DX1JJR0hUX0ZSSU5HRSAo NCwgUWNvbnRpbnVhdGlvbiwgMCk7CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9s aW5lX3AgJiYgRVEgKGFycm93X3RvcCwgUXJpZ2h0KSkKKyAgICAgICAgeworICAgICAgICAgIHJp Z2h0ID0gTUNfUklHSFRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5k X21pbl95ID49IDApCisgICAgICAgICAgICByaWdodF9vZmZzZXQgPSB0b3BfaW5kX21pbl95IC0g cm93LT55OworICAgICAgICB9CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX2JvdHRvbV9s aW5lX3AgJiYgRVEgKGFycm93X2JvdCwgUXJpZ2h0KSkKKyAgICAgICAgeworICAgICAgICAgIHJp Z2h0ID0gTUNfUklHSFRfRlJJTkdFICg3LCBRZG93biwgMCk7CisgICAgICAgICAgaWYgKGJvdF9p bmRfbWF4X3kgPj0gMCkKKyAgICAgICAgICAgIHJpZ2h0X29mZnNldCA9IGJvdF9pbmRfbWF4X3kg LSAocm93LT55ICsgcm93LT52aXNpYmxlX2hlaWdodCk7CisgICAgICAgIH0KKyAgICAgIGVsc2Ug aWYgKHJvdy0+aW5kaWNhdGVfZW1wdHlfbGluZV9wICYmIEVRIChlbXB0eV9wb3MsIFFyaWdodCkp CisgICAgICAgIHJpZ2h0ID0gTUNfUklHSFRfRlJJTkdFICg1LCBRZW1wdHlfbGluZSwgMCk7Cisg ICAgICBlbHNlCisgICAgICAgIHJpZ2h0ID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgIHBl cmlvZG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2ZyaW5nZV9iaXRtYXBzX3AgPSAxOworICAgICAgICAg ICAgICBpZiAobWNfbGVmdF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAKKyAg ICAgICAgICAgICAgICAgIHx8IG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdF X0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9 IGZhbHNlOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+ZnJp bmdlX2JpdG1hcF9wZXJpb2RpY19wID0gcGVyaW9kaWNfcDsKKyAgICAgICAgICAgICAgaWYgKG1j X2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAg ICAgIGN1ci0+bGVmdF9mcmluZ2VfYml0bWFwID0gbWNfbGVmdF9mcmluZ2VfYml0bWFwOworICAg ICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2VfYml0 bWFwID0gbGVmdDsKKyAgICAgICAgICAgICAgaWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBN Q19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2VfZmFj ZV9pZCA9IG1jX2xlZnRfZnJpbmdlX2ZhY2VfaWQ7CisgICAgICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICAgICAgY3VyLT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gbGVmdF9mYWNlX2lkOwor ICAgICAgICAgICAgICBpZiAobWNfbGVmdF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9C SVRNQVApCisgICAgICAgICAgICAgICAgY3VyLT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAg ICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2Vfb2Zm c2V0ID0gbGVmdF9vZmZzZXQ7CisgICAgICAgICAgICAgIGlmIChtY19yaWdodF9mcmluZ2VfYml0 bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9m cmluZ2VfYml0bWFwID0gbWNfcmlnaHRfZnJpbmdlX2JpdG1hcDsKKyAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9iaXRtYXAgPSByaWdodDsK KyAgICAgICAgICAgICAgaWYgKG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdF X0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9mYWNlX2lkID0gbWNf cmlnaHRfZnJpbmdlX2ZhY2VfaWQ7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgICAgY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IHJpZ2h0X2ZhY2VfaWQ7CisgICAgICAg ICAgICAgIGlmIChtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAp CisgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9vZmZzZXQg PSByaWdodF9vZmZzZXQ7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmIChyb3ct Pm92ZXJsYXlfYXJyb3dfYml0bWFwIDwgMCkKKyAgICAgICAgcm93LT5vdmVybGF5X2Fycm93X2Jp dG1hcCA9IG1jX2dldF9sb2dpY2FsX2ZyaW5nZV9iaXRtYXAgKHcsIFFvdmVybGF5X2Fycm93LCAw LCAwKTsKKyAgICAgIGlmIChyb3ctPm92ZXJsYXlfYXJyb3dfYml0bWFwICE9IGN1ci0+b3Zlcmxh eV9hcnJvd19iaXRtYXApCisgICAgICAgIHsKKyAgICAgICAgICByZWRyYXdfcCA9IDEsIHJvdy0+ cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AgPSAxOworICAgICAgICAgIGlmICgha2VlcF9jdXJyZW50 X3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGN1ci0+cmVkcmF3X2ZyaW5nZV9iaXRt YXBzX3AgPSAxOworICAgICAgICAgICAgICBjdXItPm92ZXJsYXlfYXJyb3dfYml0bWFwID0gcm93 LT5vdmVybGF5X2Fycm93X2JpdG1hcDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAg aWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAg ICAgfHwgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAg ICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAgICAgICBlbHNl CisgICAgICAgICAgcm93LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBwZXJpb2RpY19wOwor ICAgICAgaWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQor ICAgICAgICByb3ctPmxlZnRfZnJpbmdlX2JpdG1hcCA9IG1jX2xlZnRfZnJpbmdlX2JpdG1hcDsK KyAgICAgICAgZWxzZQorICAgICAgICAgIHJvdy0+bGVmdF9mcmluZ2VfYml0bWFwID0gbGVmdDsK KyAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkK KyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9mY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Ul9MSU5FX0hF SUdIVCAodyk7CisgIHAuYnkgPSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgbWF4IChoZWFk ZXJfbGluZV9oZWlnaHQsIHJvdy0+eSkpOworICBwLm55ID0gcm93LT52aXNpYmxlX2hlaWdodDsK KyAgaWYgKGxlZnRfcCkKKyAgICB7CisgICAgICBpbnQgd2QgPSBXSU5ET1dfTEVGVF9GUklOR0Vf V0lEVEggKHcpOworICAgICAgaW50IHggPSB3aW5kb3dfYm94X2xlZnQgKHcsIChXSU5ET1dfSEFT X0ZSSU5HRVNfT1VUU0lERV9NQVJHSU5TICh3KQorICAgICAgICAgICA/IExFRlRfTUFSR0lOX0FS RUEKKyAgICAgICAgICAgOiBURVhUX0FSRUEpKTsKKyAgICAgIGlmIChwLndkID4gd2QpCisgICAg ICAgIHAud2QgPSB3ZDsKKyAgICAgIHAueCA9IHggLSBwLndkIC0gKHdkIC0gcC53ZCkgLyAyOwor ICAgICAgaWYgKHAud2QgPCB3ZCB8fCBwLnkgPiBwLmJ5IHx8IHAueSArIHAuaCA8IHAuYnkgKyBw Lm55KQorICAgICAgICB7CisgICAgICAgICAgLyogSWYgVyBoYXMgYSB2ZXJ0aWNhbCBib3JkZXIg dG8gaXRzIGxlZnQsIGRvbid0IGRyYXcgb3ZlciBpdC4gKi8KKyAgICAgICAgICB3ZCAtPSAoKCFX SU5ET1dfTEVGVE1PU1RfUCAodykKKyAgICAgICAgICAgIC8qIFRoaXMgY291bGQgYmUgd3Jvbmcg d2hlbiB3ZSBhbGxvdyB3aW5kb3cgbG9jYWwKKyAgICAgICAgICAgICAgIHJpZ2h0IGRpdmlkZXJz IC0gYnV0IHRoZSB3aW5kb3cgb24gdGhlIGxlZnQgaXMgaGFyZAorICAgICAgICAgICAgICAgdG8g Z2V0LiAqLworICAgICAgICAgICAgJiYgIUZSQU1FX1JJR0hUX0RJVklERVJfV0lEVEggKGYpCisg ICAgICAgICAgICAmJiAhV0lORE9XX0hBU19WRVJUSUNBTF9TQ1JPTExfQkFSICh3KQorICAgICAg ICAgICAgLyogQnV0IGRvbid0IHJlZHVjZSB0aGUgZnJpbmdlIHdpZHRoIGlmIHRoZSB3aW5kb3cK KyAgICAgICAgICAgICAgIGhhcyBhIGxlZnQgbWFyZ2luLCBiZWNhdXNlIHRoYXQgbWVhbnMgd2Ug YXJlIG5vdAorICAgICAgICAgICAgICAgaW4gZGFuZ2VyIG9mIGRyYXdpbmcgb3ZlciB0aGUgdmVy dGljYWwgYm9yZGVyLAorICAgICAgICAgICAgICAgYW5kIE9UT0ggbGVhdmluZyBvdXQgdGhhdCBv bmUgcGl4ZWwgbGVhdmVzIGJlaGluZAorICAgICAgICAgICAgICAgdHJhY2VzIG9mIHRoZSBjdXJz b3IsIGlmIGl0IHdhcyBpbiBjb2x1bW4gemVybworICAgICAgICAgICAgICAgYmVmb3JlIGRyYXdp bmcgbm9uLWVtcHR5IG1hcmdpbiBhcmVhLiAqLworICAgICAgICAgICAgJiYgdy0+bGVmdF9tYXJn aW5fY29scyA9PSAwKQorICAgICAgICAgICA/IDEgOiAwKTsKKyAgICAgICAgICBwLmJ4ID0geCAt IHdkOworICAgICAgICAgIHAubnggPSB3ZDsKKyAgICAgICAgfQorICAgIH0KKyAgZWxzZQorICAg IHsKKyAgICAgIGludCB4ID0gd2luZG93X2JveF9yaWdodCAodywKKyAgICAgICAgKFdJTkRPV19I QVNfRlJJTkdFU19PVVRTSURFX01BUkdJTlMgKHcpCisgICAgICAgICA/IFJJR0hUX01BUkdJTl9B UkVBCisgICAgICAgICA6IFRFWFRfQVJFQSkpOworICAgICAgaW50IHdkID0gV0lORE9XX1JJR0hU X0ZSSU5HRV9XSURUSCAodyk7CisgICAgICBpZiAocC53ZCA+IHdkKQorICAgICAgICBwLndkID0g d2Q7CisgICAgICBwLnggPSB4ICsgKHdkIC0gcC53ZCkgLyAyOworICAgICAgLyogQ2xlYXIgcmln aHQgZnJpbmdlIGlmIG5vIGJpdG1hcCB0byBkcmF3IG9mIGlmIGJpdG1hcCBkb2Vzbid0IGZpbGwK KyAgIHRoZSBmcmluZ2UuICovCisgICAgICBpZiAocC53ZCA8IHdkIHx8IHAueSA+IHAuYnkgfHwg cC55ICsgcC5oIDwgcC5ieSArIHAubnkpCisgICAgICAgIHsKKyAgICAgICAgICBwLmJ4ID0geDsK KyAgICAgICAgICBwLm54ID0gd2Q7CisgICAgICAgIH0KKyAgICB9CisgIGlmIChwLnggPj0gV0lO RE9XX0JPWF9MRUZUX0VER0VfWCAodykKKyAgICAgICYmIChwLnggKyBwLndkKSA8PSBXSU5ET1df Qk9YX0xFRlRfRURHRV9YICh3KSArIFdJTkRPV19QSVhFTF9XSURUSCAodykpCisgICAgRlJBTUVf UklGIChmKS0+ZHJhd19mcmluZ2VfYml0bWFwICh3LCByb3csICZwKTsKK30KKwordm9pZAorbWNf ZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3csIGludCBsZWZ0X3AsIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUpCit7CisgIGlu dCBvdmVybGF5ID0gMDsKKyAgaWYgKGxlZnRfcCA9PSByb3ctPnJldmVyc2VkX3AgJiYgcm93LT5j dXJzb3JfaW5fZnJpbmdlX3ApCisgICAgeworICAgICAgTGlzcF9PYmplY3QgY3Vyc29yID0gUW5p bDsKKyAgICAgIHN3aXRjaCAoY3Vyc29yX3R5cGUpCisgICAgICAgIHsKKyAgICAgICAgY2FzZSBN Q19GUkFNRURfQk9YOgorICAgICAgICAgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5E QVJEX0JJVE1BUF9IRUlHSFQgKGhvbGxvd19yZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBj dXJzb3IgPSBRaG9sbG93OworICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFo b2xsb3dfc21hbGw7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfSE9MTE9XX0JP WDoKKyAgICAgICAgICBpZiAocm93LT52aXNpYmxlX2hlaWdodCA+PSBTVEFOREFSRF9CSVRNQVBf SEVJR0hUIChob2xsb3dfcmVjdGFuZ2xlX2JpdHMpKQorICAgICAgICAgICAgY3Vyc29yID0gUWhv bGxvdzsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICBjdXJzb3IgPSBRaG9sbG93X3NtYWxs OworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAg ICAgY3Vyc29yID0gUWJveDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19CQVI6 CisgICAgICAgICAgY3Vyc29yID0gUWJhcjsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2Fz ZSBNQ19IQkFSOgorICAgICAgICAgIGN1cnNvciA9IFFoYmFyOworICAgICAgICAgIGJyZWFrOwor ICAgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGNhc2UgTUNfTk9fQ1VS U09SOgorICAgICAgICBjYXNlIE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGNhc2Ug TUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAgICAgICBkZWZhdWx0OgorICAgICAgICAgIHctPnBo eXNfY3Vyc29yX29uX3AgPSAwOworICAgICAgICAgIHJvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0g MDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgaWYgKCFOSUxQIChjdXJzb3Ip KQorICAgICAgICB7CisgICAgICAgICAgaW50IGJtID0gbWNfZ2V0X2xvZ2ljYWxfY3Vyc29yX2Jp dG1hcCAodywgY3Vyc29yKTsKKyAgICAgICAgICBpZiAoYm0gIT0gTUNfTk9fRlJJTkdFX0JJVE1B UCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfZHJhd19mcmluZ2VfYml0bWFwXzEg KHcsIHJvdywgbGVmdF9wLCAyLCBibSk7CisgICAgICAgICAgICAgIG92ZXJsYXkgPSBFUSAoY3Vy c29yLCBRYm94KSA/IDMgOiAxOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBt Y19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywgcm93LCBsZWZ0X3AsIG92ZXJsYXksIE1DX05PX0ZS SU5HRV9CSVRNQVApOworICBpZiAobGVmdF9wICYmIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAg IT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywg cm93LCAxLCAxLCByb3ctPm92ZXJsYXlfYXJyb3dfYml0bWFwKTsKK30KKworLyogZW5kIE1VTFRJ UExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICNkZWZpbmUgTk9f RlJJTkdFX0JJVE1BUCAwCiAjZGVmaW5lIFVOREVGX0ZSSU5HRV9CSVRNQVAgMQogI2RlZmluZSBN QVhfU1RBTkRBUkRfRlJJTkdFX0JJVE1BUFMgQVJSQVlFTFRTIChzdGFuZGFyZF9iaXRtYXBzKQpA QCAtMTY5OSw2ICszMjE3LDE2OCBAQCBSZXR1cm4gbmlsIGlmIFBPUyBpcyBub3QgdmlzaWJsZSBp biBXSU5ET1cuICAqLykKIHZvaWQKIHN5bXNfb2ZfZnJpbmdlICh2b2lkKQogeworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8q IChnZXQgJ2VtcHR5LWxpbmUgJ2ZyaW5nZSkgP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T4gNDggKi8KKworLyogZW5k IE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgREVG U1lNIChRdHJ1bmNhdGlvbiwgInRydW5jYXRpb24iKTsKICAgREVGU1lNIChRY29udGludWF0aW9u LCAiY29udGludWF0aW9uIik7CiAgIERFRlNZTSAoUW92ZXJsYXlfYXJyb3csICJvdmVybGF5LWFy cm93Iik7CmRpZmYgLS1naXQgYS9zcmMvbnN0ZXJtLmggYi9zcmMvbnN0ZXJtLmgKaW5kZXggOTc3 M2ViMy4uZTM0YTExNiAxMDA2NDQKLS0tIGEvc3JjL25zdGVybS5oCisrKyBiL3NyYy9uc3Rlcm0u aApAQCAtNjYzLDYgKzY2MywxNiBAQCB0eXBlZGVmIGlkIGluc3RhbmNldHlwZTsKIAogQGludGVy ZmFjZSBFbWFjc1Njcm9sbGVyIDogTlNTY3JvbGxlcgogICB7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBOU1JlY3QgbWNfcmVjdGFu Z2xlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICBzdHJ1Y3Qgd2luZG93ICp3 aW5kb3c7CiAgICBzdHJ1Y3QgZnJhbWUgKmZyYW1lOwogICAgTlNSZXNwb25kZXIgKnByZXZSZXNw b25kZXI7CkBAIC02ODMsNiArNjkzLDE4IEBAIHR5cGVkZWYgaWQgaW5zdGFuY2V0eXBlOwogICAg aW50IGVtX3dob2xlOwogICAgfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCistICh2b2lkKW1jX3NldF9yZWN0YW5nbGU6IChOU1JlY3QpcmVj dDsKKy0gKE5TUmVjdCltY19nZXRfcmVjdGFuZ2xlOworLSAoc3RydWN0IHdpbmRvdyAqKW1jX2dl dF93aW5kb3c7CistIChib29sKW1jX2p1ZGdlOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAtIChpbnN0YW5jZXR5cGUpIGluaXRGcmFtZTogKE5TUmVjdCApciB3aW5kb3c6IChMaXNw X09iamVjdCl3aW47CiAtICh2b2lkKXNldEZyYW1lOiAoTlNSZWN0KXI7CiAKZGlmZiAtLWdpdCBh L3NyYy9uc3Rlcm0ubSBiL3NyYy9uc3Rlcm0ubQppbmRleCAwMjMzMTgyLi5hZjc5MzliIDEwMDY0 NAotLS0gYS9zcmMvbnN0ZXJtLm0KKysrIGIvc3JjL25zdGVybS5tCkBAIC03Niw2ICs3Niw5NzYg QEAgVXBkYXRlZCBieSBDaHJpc3RpYW4gTGltcGFjaCAoY2hyaXNAbmljZS5jaCkKIHN0YXRpYyBF bWFjc01lbnUgKm1haW5NZW51OwogI2VuZGlmCiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK3N0YXRpYyBCT09MIG5zX2NsaXBfdG9f cmVjdCAoc3RydWN0IGZyYW1lICosIE5TUmVjdCAqLCBpbnQpOworCitzdGF0aWMgdm9pZCBuc19y ZXNldF9jbGlwcGluZyAoc3RydWN0IGZyYW1lICopOworCitzdGF0aWMgdm9pZCBuc19kdW1wZ2x5 cGhzX2JveF9vcl9yZWxpZWYgKHN0cnVjdCBn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KKyAgICAgICAgICBpbnQgZnggPSBtY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZ4OworICAgICAgICAgIC8vICBp bnQgeSA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueTsKKyAg ICAgICAgICBpbnQgZnkgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmZ5OworICAgICAgICAgIGludCBocG9zID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5ocG9zOworICAgICAgICAgIGludCB2cG9zID0gbWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS52cG9zOworICAgICAgICAgIGludCB3ZCA9 IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ud2Q7CisgICAgICAg ICAgaW50IGggPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmg7 CisgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IG1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3R5cGU7CisgICAgICAgICAg Ly8gIGludCBjdXJzb3Jfd2lkdGggPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZyA9 IHsucmVkID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5y ZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gbWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ncmVlbiwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uZmcuYmx1ZX07CisgICAgICAgICAgLy8gIHN0cnVjdCBtY19SR0Ig bHNsX2JnID0gey5yZWQgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmJnLnJlZCwKKyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVu ID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ncmVlbiwK KyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBtY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgICAgIGJv b2wgYWN0aXZlX3AgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmFjdGl2ZV9wOworICAgICAgICAgIC8vICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSBt Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvcjsK KyAgICAgICAgICBib29sIGVuYWJsZWRfcCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uZW5hYmxlZF9wOworICAgICAgICAgIGJvb2wgZ29fcCA9ICh2cG9zID09 IHZudGgKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA9PSBjdXJzb3JfZ2x5cGgtPmhw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wKTsKKyAgICAgICAgICBpZiAo IWdvX3ApCisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICBOU1JlY3QgcjsKKyAgICAg ICAgICByLm9yaWdpbi54ID0gZng7CisgICAgICAgICAgci5vcmlnaW4ueSA9IGZ5OworICAgICAg ICAgIHIuc2l6ZS5oZWlnaHQgPSBoOworICAgICAgICAgIHIuc2l6ZS53aWR0aCA9IHdkOworICAg ICAgICAgIFtbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiBsc2xfZmcucmVkCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IGxzbF9mZy5ncmVlbgorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBibHVlOiBsc2xfZmcuYmx1ZQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdIHNldF07CisgICAg ICBpZiAoY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWCkKKyAgICAgICAgeworICAgICAgICAg IHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChzLT53LT5jb250ZW50cyk7CisgICAgICAgICAg Ym9vbCByZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJrX2Fj dGl2ZSkpKTsKKyAgICAgICAgICBwdHJkaWZmX3QgcmVnaW9uX2JlZyA9IChyZWdpb25fYWN0aXZl X3ApID8gbWNfcmVnaW9uX2xpbWl0ICgxKSA6IC0xOworICAgICAgICAgIHB0cmRpZmZfdCByZWdp b25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBtY19yZWdpb25fbGltaXQgKDApIDogLTE7Cisg ICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAmJiBhY3RpdmVfcAor ICAgICAgICA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9uLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lv bl9lbmRfZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5k X2ZhY2VfaWQpOworICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19hY3RpdmVfcmVnaW9u X2VuZF9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQg KGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlKSwgcy0+Zik7CisgICAgICAgICAgICAgICAg aG9sbG93X2NvbG9yID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2NvbG9yOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgIGVsc2UgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAg ICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJz b3JfZ2x5cGgtPmNoYXJwb3MgPiByZWdpb25fYmVnCisgICAgICAgICAgICAgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA8IHJlZ2lvbl9lbmQpCisgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdl ZW5fZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBpbnRlcm4gKCIrLXJl YWwtZmFrZS1jdXJzb3ItaW4tcmVnaW9uLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAg ICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZSA9 IEZBQ0VfRlJPTV9JRCAocy0+ZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlX2lk KTsKKyAgICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdl ZW5fY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EICho b2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UpLCBzLT5mKTsKKyAgICAgICAgICAgICAg ICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fY29sb3I7Cisg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9wKQorICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93 X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAo IistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAg ICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ ZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgTlNDb2xvciAq aG9sbG93X2FjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JB Q0tHUk9VTkQgKGhvbGxvd19hY3RpdmVfZmFjZSksIHMtPmYpOworICAgICAgICAgICAgICAgICAg ICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2 ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01f SUQgKHMtPmYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAg ICBOU0NvbG9yICpob2xsb3dfaW5hY3RpdmVfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xv ciAoTlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3dfaW5hY3RpdmVfZmFjZSksIHMtPmYpOworICAg ICAgICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19pbmFjdGl2ZV9jb2xvcjsK KyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGZhY2Ug JiYgTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VS U09SX0NPTE9SIChzLT5mKSwgcy0+ZikpCisgICAgICAgICAgeworICAgICAgICAgICAgW25zX2xv b2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGZhY2UpLCBzLT5mKSBzZXRd OworICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChzLT5mKTsK KyAgICAgICAgICB9CisgICAgICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgY2FzZSBNQ19OT19GUklOR0VfQklUTUFQOgorICAgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX05PX0NVUlNPUjoKKyAgICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOgor ICAgICAgICAgICAgICBjYXNlIE1DX0xFRlRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgICAgICAg Y2FzZSBNQ19GSUxMRURfQk9YOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAg ICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6Cisg ICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAgICAgICAgW2hvbGxvd19j b2xvciBzZXRdOworICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKE5TSW5zZXRSZWN0IChyLCAx LCAxKSk7CisgICAgICAgICAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAocy0+Zikgc2V0XTsK KyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19IT0xMT1dfQk9Y OgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAgICAgIFtob2xs b3dfY29sb3Igc2V0XTsKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAo ciwgMSwgMSkpOworICAgICAgICAgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpIHNl dF07CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfSEJBUjoK KyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsK KyAgICAgICAgICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAo cik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9Cis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vc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBz dHJ1Y3QgZm9udCAqZm9udCA9IHMtPmZhY2UtPmZvbnQ7CisgICAgICAgICAgICAgICAgICAgIGlm ICghZm9udCkKKyAgICAgICAgICAgICAgICAgICAgICBmb250ID0gRlJBTUVfRk9OVCAocy0+Zik7 CisgICAgICAgICAgICAgICAgICAgIGJvb2wgd2l0aF9iZ19wID0gZmFsc2U7CisgICAgICAgICAg ICAgICAgICAgIGZvbnQtPmRyaXZlci0+ZHJhdyAocywgcy0+Y21wX2Zyb20sIHMtPm5jaGFycywg cy0+eCwgcy0+eWJhc2UsIHdpdGhfYmdfcCk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIC8vICBjbG9ja190IGNsb2NrX2VuZCA9IGNsb2Nr KCk7CisgIC8vICBkb3VibGUgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0g Y2xvY2tfc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAi bnNfZHJhd19vdmVyd3JpdHRlbiAoJWQpOiAgVElNRSAoJWYpXG4iLCB2cG9zLCBjcHVfdGltZV91 c2VkKTsKK30KKworc3RhdGljIHZvaWQKK21jX25zX2RyYXdfd2luZG93X2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csCisgICAgICAgICAgICAgICAgICBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5LCBp bnQgaHBvcywgaW50IHZwb3MsIGludCB3ZCwgaW50IGgsCisgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgbWNfUkdCIGxz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bmQgPSBmYWNlLT5sZmFjZVtMRkFDRV9GT1JFR1JPVU5EX0lO REVYXTsKKyAgICAgTGlzcF9PYmplY3QgYmFja2dyb3VuZCA9IGZhY2UtPmxmYWNlW0xGQUNFX0JB Q0tHUk9VTkRfSU5ERVhdOworICAgICBmcHJpbnRmIChzdGRlcnIsICJcbmZvcmVncm91bmQgKCVz KSB8IGJhY2tncm91bmQgKCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAoIU5JTFAgKGZv cmVncm91bmQpID8gU1NEQVRBIChmb3JlZ3JvdW5kKSA6ICJOSUxQIiksCisgICAgICAgICAgICAg ICAgICAgICAgKCFOSUxQIChiYWNrZ3JvdW5kKSA/IFNTREFUQSAoYmFja2dyb3VuZCkgOiAiTklM UCIpKTsKKyAgLSAgRVhBTVBMRSBPRiBIT1cgVE8gQ1JFQVRFIEEgQ09MT1IgV0lUSCBSR0IvTFNM IGZsb2F0IHZhbHVlczoKKyAgICAgTlNDb2xvciAqbXlfY29sb3IgPSBbTlNDb2xvciBjb2xvcldp dGhDYWxpYnJhdGVkUmVkOiAxLjAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGdyZWVuOiAxLjAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBibHVlOiAxLjAKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdOworICAtICBBTFRFUk5BVElW RSBFWEFNUExFOgorICAgICBlbnVtIGZhY2VfaWQgZGVidWdnaW5nX2ZhY2VfaWQgPSBsb29rdXBf bmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJuICgiKy1kZWJ1Z2dpbmctZmFjZSIpLCB0cnVl KTsKKyAgICAgc3RydWN0IGZhY2UgKmRlYnVnZ2luZ19mYWNlID0gRkFDRV9GUk9NX0lEIChzLT5m LCBkZWJ1Z2dp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dfYWN0aXZlX3JlZ2lvbl9iZXR3 ZWVuX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAo aG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlKSwgZik7CisgICAgICAgICAgICAgIGhv bGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fY29sb3I7CisgICAgICAg ICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29r dXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1m YWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZl X2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAg ICAgICAgICAgTlNDb2xvciAqaG9sbG93X2FjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVk X2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19hY3RpdmVfZmFjZSksIGYpOworICAg ICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfY29sb3I7CisgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgLyogVGhlIHJlZ2lvbiBpcyBfbm90XyB2aXNpYmxlIGlu IHRoZSBpbmFjdGl2ZSB3aW5kb3cgYmVjYXVzZSB0aGUgb3ZlcmxheSB3aW5kb3cgcHJvcGVydHkg aXMgdXNlZC4gKi8KKyAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICA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09SOgor ICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAg ICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0xFRlRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgYnJl YWs7CisgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOwor ICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfRlJBTUVEX0JPWDoKKyAgICAgICAgTlNSZWN0 RmlsbCAocik7CisgICAgICAgIFtob2xsb3dfY29sb3Igc2V0XTsKKyAgICAgICAgTlNSZWN0Rmls bCAoTlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAo Zikgc2V0XTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0hPTExPV19CT1g6CisgICAg ICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAg IE5TUmVjdEZpbGwgKE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7CisgICAgICAgIFtGUkFNRV9DVVJT T1JfQ09MT1IgKGYpIHNldF07CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19IQkFSOgor ICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0JB UjoKKyAgICAgICAgcyA9IHI7CisgICAgICAgIC8qIEBsYXdsaXN0IGlzIGZvY3VzaW5nIHRoZSBp bml0aWFsIGRldmVsb3BtZW50IG9mIGZlYXR1cmUgcmVxdWVzdHMKKyAgICAgICAgIzE3Njg0IGFu ZCAjMjI4NzMgb24gTDJSIGxhbmd1YWdlcy4gKi8KKyAgICAgICAgaWYgKGdseXBoX2ZsYXZvciAh PSBNQ19HTFlQSAorICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBITEVTUykK KyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBJZiB0aGUgY2hhcmFjdGVyIHVuZGVyIGN1cnNv ciBpcyBSMkwsIGRyYXcgdGhlIGJhciBjdXJzb3IKKyAgICAgICAgICAgICAgIG9uIHRoZSByaWdo dCBvZiBpdHMgZ2x5cGgsIHJhdGhlciB0aGFuIG9uIHRoZSBsZWZ0LiAqLworICAgICAgICAgICAg aWYgKChjdXJzb3JfZ2x5cGgtPnJlc29sdmVkX2xldmVsICYgMSkgIT0gMCkKKyAgICAgICAgICAg ICAgcy5vcmlnaW4ueCArPSBjdXJzb3JfZ2x5cGgtPnBpeGVsX3dpZHRoIC0gcy5zaXplLndpZHRo OworICAgICAgICAgIH0KKyAgICAgICAgTlNSZWN0RmlsbCAocyk7CisgICAgICAgIGJyZWFrOwor ICAgIH0KKyAgbnNfcmVzZXRfY2xpcHBpbmcgKGYpOworICAvKiBkcmF3IHRoZSBjaGFyYWN0ZXIg dW5kZXIgdGhlIGN1cnNvciAqLworICBpZiAoZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBITEVTUwor ICAgICAgJiYgKGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gKKyAgICAgICAgICB8fCBjdXJz b3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YCisgICAgICAgICAgfHwgY3Vyc29yX3R5cGUgPT0gTUNf SE9MTE9XX0JPWAorICAgICAgICAgIHx8IChkZWJ1Z19wCisgICAgICAgICAgICAgICYmIGN1cnNv cl90eXBlID09IE1DX0hCQVIpCisgICAgICAgICAgfHwgKGRlYnVnX3AKKyAgICAgICAgICAgICAg JiYgY3Vyc29yX3R5cGUgPT0gTUNfQkFSKSkpCisgICAgeworICAgICAgLyogYGN1cnNvcl9nY19w YCBpcyB1c2VkIG9ubHkgYnkgYHczMnRlcm0uY2AgYW5kIGB4dGVybS5jJy4gKi8KKyAgICAgIGJv b2wgY3Vyc29yX2djX3AgPSBmYWxz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S0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KK3sKKyAgaWYgKHMtPmZvcl9vdmVybGFwcykKKyAgICByZXR1cm47 CisgIC8qIERvIHVuZGVybGluZS4gKi8KKyAgaWYgKGZhY2UtPnVuZGVybGluZV9wKQorICAgIHsK KyAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX1dBVkUpCisg ICAgICAgIHsKKyAgICAgICAgICBpZiAoZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAg ICAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg ICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChmYWNlLT51bmRlcmxpbmVfY29sb3IsIHMtPmYp IHNldF07CisgICAgICAgICAgbnNfZHJhd191bmRlcndhdmUgKHMsIHdpZHRoLCB4KTsKKyAgICAg ICAgfQorICAgICAgICBlbHNlIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VO REVSX0xJTkUpCisgICAgICAgICAgeworICAgICAgICAgICAgTlNSZWN0IHI7CisgICAgICAgICAg ICB1bnNpZ25lZCBsb25nIHRoaWNrbmVzcywgcG9zaXRpb247CisgICAgICAgICAgICAvKiBJZiB0 aGUgcHJldiB3YXMgdW5kZXJsaW5lZCwgbWF0Y2ggaXRzIGFwcGVhcmFuY2UuICovCisgICAgICAg ICAgICBpZiAocy0+cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfcAorICAgICAgICAg ICAgICAgICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElO RQorICAgICAgICAgICAgICAgICYmIHMtPnByZXYtPnVuZGVybGluZV90aGlja25lc3MgPiAwKQor ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+cHJldi0+dW5k ZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPnByZXYtPnVu ZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgc3RydWN0IGZvbnQgKmZvbnQ7Cisg ICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGRlc2NlbnQ7CisgICAgICAgICAgICAgICAg ICBmb250PXMtPmZvbnQ7CisgICAgICAgICAgICAgICAgICBkZXNjZW50ID0gcy0+eSArIHMtPmhl aWdodCAtIHMtPnliYXNlOworICAgICAgICAgICAgICAgICAgLyogVXNlIHVuZGVybGluZSB0aGlj a25lc3Mgb2YgZm9udCwgZGVmYXVsdGluZyB0byAxLiAqLworICAgICAgICAgICAgICAgICAgdGhp Y2tuZXNzID0gKGZvbnQgJiYgZm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IGZvbnQtPnVuZGVybGluZV90aGlja25lc3MKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogMTsKKyAgICAgICAgICAgICAgICAgIC8qIERldGVy bWluZSB0aGUgb2Zmc2V0IG9mIHVuZGVybGluaW5nIGZyb20gdGhlIGJhc2VsaW5lLiAqLworICAg ICAgICAgICAgICAgICAgaWYgKHhfdW5kZXJsaW5lX2F0X2Rlc2NlbnRfbGluZSkKKyAgICAgICAg ICAgICAgICAgICAgcG9zaXRpb24gPSBkZXNjZW50IC0gdGhpY2tuZXNzOworICAgICAgICAgICAg ICAgICAgICBlbHNlIGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRpb25fcHJvcGVydGllcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmb250ICYmIGZvbnQtPnVuZGVybGluZV9wb3Np dGlvbiA+PSAwKQorICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gZm9udC0+dW5kZXJs aW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGZvbnQpCisgICAg ICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGxyb3VuZCAoZm9udC0+ZGVzY2VudCAvIDIp OworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAg ICBwb3NpdGlvbiA9IHVuZGVybGluZV9taW5pbXVtX29mZnNldDsKKyAgICAgICAgICAgICAgICAg IHBvc2l0aW9uID0gbWF4IChwb3NpdGlvbiwgdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0KTsKKyAg ICAgICAgICAgICAgICAgIC8qIEVuc3VyZSB1bmRlcmxpbmluZyBpcyBub3QgY3JvcHBlZC4gKi8K KyAgICAgICAgICAgICAgICAgIGlmIChkZXNjZW50IDw9IHBvc2l0aW9uKQorICAgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBkZXNjZW50IC0gMTsK KyAgICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAxOworICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRlc2NlbnQgPCBwb3NpdGlvbiArIHRo aWNrbmVzcykKKyAgICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAxOworICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgIHMtPnVuZGVybGluZV90aGlja25lc3MgPSB0aGlja25lc3M7 CisgICAgICAgICAgICBzLT51bmRlcmxpbmVfcG9zaXRpb24gPSBwb3NpdGlvbjsKKyAgICAgICAg ICAgIHIgPSBOU01ha2VSZWN0ICh4LCBzLT55YmFzZSArIHBvc2l0aW9uLCB3aWR0aCwgdGhpY2tu ZXNzKTsKKyAgICAgICAgICAgIGlmIChmYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3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KKyAgICAgIGlmIChmYWNlLT5zdHJpa2VfdGhyb3VnaF9j b2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAgZWxz ZQorICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoZmFjZS0+c3RyaWtlX3Rocm91 Z2hfY29sb3IsIHMtPmYpIHNldF07CisgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICB9Cit9CisK K3N0YXRpYyB2b2lkCittY19uc19kdW1wZ2x5cGhzX3N0cmV0Y2ggKHN0cnVjdCBnbHlwaF9zdHJp bmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBzdHJ1Y3QgbWNfbWF0cml4IG1jX21hdHJpeCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHdkKQoreworICBOU1JlY3QgclsyXTsKKyAg aW50IG4sIGk7CisgIHN0cnVjdCBmYWNlICpmYWNlOworICBOU0NvbG9yICpmZ0NvbCwgKmJnQ29s OworICBpZiAoIXMtPmJhY2tncm91bmRfZmlsbGVkX3ApCisgICAgeworICAgICAgbiA9IG5zX2dl dF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICghbnNfY2xpcF90b19y ZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgKnIgPSBOU01ha2VSZWN0 IChzLT54LCBzLT55LCBzLT5iYWNrZ3JvdW5kX3dpZHRoLCBzLT5oZWlnaHQpOworICAgICAgaWYg KHMtPmhsID09IERSQVdfTU9VU0VfRkFDRSkKKyAgICAgICAgeworICAgICAgICAgIGZhY2UgPSBG QUNFX0ZST01fSUQgKHMtPmYsIE1PVVNFX0hMX0lORk8gKHMtPmYpLT5tb3VzZV9mYWNlX2ZhY2Vf aWQpOworICAgICAgICAgIGlmICghZmFjZSkKKyAgICAgICAgICAgIGZhY2UgPSBGQUNFX0ZST01f SUQgKHMtPmYsIE1PVVNFX0ZBQ0VfSUQpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAg ICAgIGZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIHMtPmZpcnN0X2dseXBoLT5mYWNlX2lkKTsK KyAgICAgIGJnQ29sID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VO RCAoZmFjZSksIHMtPmYpOworICAgICAgZmdDb2wgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAo TlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgcy0+Zik7CisgICAgICBmb3IgKGkgPSAwOyBpIDwg bjsgKytpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKCFzLT5yb3ctPmZ1bGxfd2lkdGhfcCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaW50IG92ZXJydW4sIGxlZnRvdmVycnVuOwor ICAgICAgICAgICAgICAvKiB0cnVuY2F0ZSB0byBhdm9pZCBvdmVyd3JpdGluZyBmcmluZ2UgYW5k L29yIHNjcm9sbGJhciAqLworICAgICAgICAgICAgICBvdmVycnVuID0gbWF4ICgwLCAocy0+eCAr IHMtPmJhY2tncm91bmRfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAt IChXSU5ET1dfQk9YX1JJR0hUX0VER0VfWCAocy0+dykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC0gV0lORE9XX1JJR0hUX0ZSSU5HRV9XSURUSCAocy0+dykpKTsKKyAgICAgICAgICAg ICAgICAgICAgcltpXS5zaXplLndpZHRoIC09IG92ZXJydW47CisgICAgICAgICAgICAgIC8qIHRy dW5jYXRlIHRvIGF2b2lkIG92ZXJ3cml0aW5nIHRvIGxlZnQgb2YgdGhlIHdpbmRvdyBib3ggKi8K KyAgICAgICAgICAgICAgbGVmdG92ZXJydW4gPSAoV0lORE9XX0JPWF9MRUZUX0VER0VfWCAocy0+ dykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBXSU5ET1dfTEVGVF9GUklOR0VfV0lE VEggKHMtPncpKSAtIHMtPng7CisgICAgICAgICAgICAgIGlmIChsZWZ0b3ZlcnJ1biA+IDApCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgcltpXS5vcmlnaW4ueCArPSBsZWZ0 b3ZlcnJ1bjsKKyAgICAgICAgICAgICAgICAgIHJbaV0uc2l6ZS53aWR0aCAtPSBsZWZ0b3ZlcnJ1 bjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgW2JnQ29sIHNl dF07CisgICAgICAgICAgLyogTk9URTogdW5kZXIgTlMgdGhpcyBpcyBOT1QgdXNlZCB0byBkcmF3 IGN1cnNvcnMsIGJ1dCB3ZSBtdXN0IGF2b2lkCisgICAgICAgICAgICAgb3ZlcndyaXRpbmcgY3Vy c29yICh1c3VhbGx5IHdoZW4gY3Vyc29yIG9uIGEgdGFiKSAqLworICAgICAgICAgIGlmIChzLT5o bCA9PSBEUkFXX0NVUlNPUikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogRklYTUU6 ICBEbyB3ZSBzdGlsbCBuZWVkIHRvIHByZXZlbnQgdGhpcyBzZWN0aW9uIG9mIGNvZGUgZnJvbQor ICAgICAgICAgICAgICBlcmFzaW5nIHRoZSBmYWtlIE1DX0hCQVIgdGhhdCBleHRlbmRzIHRoZSBl bnRpcmUgbGVuZ3RoIG9mIHRoZQorICAgICAgICAgICAgICBTVFJFVENIX0dMWVBIPyAgVGhpcyBt YXkgaGF2ZSBiZWVuIGRvbmUgcHJpb3IgdG8gdGhlIGZpeCByZWxhdGluZworICAgICAgICAgICAg ICB0byBsZWZ0L3JpZ2h0IG92ZXJ3cml0dGVuIGdseXBocy4gKi8KKyAgICAgICAgICAgICAgcltp XS5zaXplLmhlaWdodCAtPSAxOworICAgICAgICAgICAgICAvLyAgZW51bSBmYWNlX2lkIGRlYnVn Z2luZ19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIist ZGVidWdnaW5nLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgIC8vICBzdHJ1Y3QgZmFjZSAq ZGVidWdnaW5nX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGRlYnVnZ2luZ19mYWNlX2lkKTsK KyAgICAgICAgICAgICAgLy8gIE5TQ29sb3IgKmNvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29s b3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZGVidWdnaW5nX2ZhY2UpLCBzLT5mKTsKKyAgICAgICAg ICAgICAgLy8gIFtjb2xvciBzZXRdOworICAgICAgICAgICAgICBDR0Zsb2F0IHggPSByW2ldLm9y aWdpbi54OworICAgICAgICAgICAgICBDR0Zsb2F0IHdpZHRoID0gd2Q7CisgICAgICAgICAgICAg IHJbaV0uc2l6ZS53aWR0aCAtPSB3aWR0aDsKKyAgICAgICAgICAgICAgcltpXS5vcmlnaW4ueCAr PSB3aWR0aDsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocltpXSk7CisgICAgICAgICAgICAg IC8qIERyYXcgb3ZlcmxpbmluZywgZXRjLiBvbiB0aGUgY3Vyc29yLiAqLworICAgICAgICAgICAg ICBpZiAocy0+dy0+cGh5c19jdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgICAg ICAgICAgIG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChzLCBmYWNlLCBiZ0NvbCwgd2lkdGgs IHgpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIG1jX25zX2RyYXdf dGV4dF9kZWNvcmF0aW9uIChzLCBmYWNlLCBmZ0NvbCwgd2lkdGgsIHgpOworICAgICAgICAgICAg fQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAgLy8gIGludCByeCA9IHJbaV0ub3Jp Z2luLng7CisgIC8vICBpbnQgcnkgPSByW2ldLm9yaWdpbi55OworICAvLyAgaW50IHJ3ID0gcltp XS5zaXplLndpZHRoOworICAvLyAgaW50IHJoID0gcltpXS5zaXplLmhlaWdodDsKKyAgLy8gIGZw cmludGYgKHN0ZGVyciwgIm1jX25zX2R1bXBnbHlwaHNfc3RyZXRjaDogIHZwb3MgKCVkKSB8IHJ4 ICglZCkgfCByeSAoJWQpIHwgcncgKCVkKSB8IHJoICglZClcbiIsCisgIC8vICAgICAgICAgICAg ICAgICAgIHMtPmZpcnN0X2dseXBoLT52cG9zLCByeCwgcnksIHJ3LCByaCk7CisgICAgICAgICAg ICAgIE5TUmVjdEZpbGwgKHJbaV0pOworICAgICAgICAgICAgfQorICAgICAgICAgIC8qIERyYXcg b3ZlcmxpbmluZywgZXRjLiBvbiB0aGUgc3RyZXRjaCBnbHlwaCAob3IgdGhlIHBhcnQKKyAgICAg ICAgICAgICBvZiB0aGUgc3RyZXRjaCBnbHlwaCBhZnRlciB0aGUgY3Vyc29yKS4gKi8KKyAgICAg ICAgICBtY19uc19kcmF3X3RleHRfZGVjb3JhdGlvbiAocywgZmFjZSwgZmdDb2wsIHJbaV0uc2l6 ZS53aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcltpXS5vcmln aW4ueCk7CisgICAgICAgIH0KKyAgICAgIGlmICgocy0+bGVmdF9vdmVyd3JpdHRlbl9wIHx8IHMt PnJpZ2h0X292ZXJ3cml0dGVuX3ApCisgICAgICAgICAgJiYgKHMtPmFjdGlvbl90eXBlID09IE1D X0RSQVdfR0xZUEhfU1RSSU5HIHx8IHMtPmFjdGlvbl90eXBlID09IE1DX0VSQVNFX0dMWVBIX1NU UklORykpCisgICAgICAgIG1jX25zX2RyYXdfb3ZlcndyaXR0ZW4gK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Y2UueCwgcy0+c2xpY2Uu eSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLndpZHRoLCBzLT5zbGlj ZS5oZWlnaHQpOworICAgICAgW2ltZyBkcmF3SW5SZWN0OiBkcgorICAgICAgICAgICAgIGZyb21S ZWN0OiBpcgorICAgICAgICAgICAgIG9wZXJhdGlvbjogTlNDb21wb3NpdGVTb3VyY2VPdmVyCisg ICAgICAgICAgICAgIGZyYWN0aW9uOiAxLjAKKyAgICAgICAgICAgcmVzcGVjdEZsaXBwZWQ6IFlF UworICAgICAgICAgICAgICAgIGhpbnRzOiBuaWxdOworI2Vsc2UKKyAgICAgIFtpbWcgY29tcG9z aXRlVG9Qb2ludDogTlNNYWtlUG9pbnQgKHgsIHkgKyBzLT5zbGljZS5oZWlnaHQpCisgICAgICAg ICAgICAgICAgICBvcGVyYXRpb246IE5TQ29tcG9zaXRlU291cmNlT3Zlcl07CisjZW5kaWYKKyAg ICB9CisgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUikKKyAgICB7CisgICAgICBbRlJBTUVfQ1VS U09SX0NPTE9SIChzLT5mKSBzZXRdOworICAgICAgaWYgKHMtPnctPnBoeXNfY3Vyc29yX3R5cGUg PT0gTUNfRklMTEVEX0JPWCkKKyAgICAgICAgdGRDb2wgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xv ciAoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSwgcy0+Zik7CisgICAgICAgIGVsc2UKKyAgICAg ICAgICAvKiBDdXJyZW50bHkgb24gTlMgaW1nLT5tYXNrIGlzIGFsd2F5cyAwLiBTaW5jZQorICAg ICAgICAgICAgIGdldF93aW5kb3dfY3Vyc29yX3R5cGUgc3BlY2lmaWVzIGEgaG9sbG93IGJveCBj dXJzb3Igd2hlbiBvbgorICAgICAgICAgICAgIGEgbm9uLW1hc2tlZCBpbWFnZSB3ZSBuZXZlciBy ZWFjaCB0aGlzIGNsYXVzZS4gQnV0IHdlIHB1dCBpdAorICAgICAgICAgICAgIGluIGluIGFudGlj aXBhdGlvbiBvZiBiZXR0ZXIgc3VwcG9ydCBmb3IgaW1hZ2UgbWFza3Mgb24gTlMuICovCisgICAg ICAgICAgdGRDb2wgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5E IChmYWNlKSwgcy0+Zik7CisgICAgfQorICAgIGVsc2UKKyAgICAgIHRkQ29sID0gbnNfbG9va3Vw X2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYpOworICAvKiBE cmF3IHVuZGVybGluZSwgb3ZlcmxpbmUsIHN0cmlrZS10aHJvdWdoLiAqLworICBtY19uc19kcmF3 X3RleHRfZGVjb3JhdGlvbiAocywgZmFjZSwgdGRDb2wsIGJyLnNpemUud2lkdGgsIGJyLm9yaWdp bi54KTsKKyAgLyogRHJhdyByZWxpZWYsIGlmIHJlcXVlc3RlZCAqLworICBpZiAocy0+aW1nLT5y ZWxpZWYgfHwgcy0+aGwgPT1EUkFXX0lNQUdFX1JBSVNFRCB8fCBzLT5obCA9PURSQVdfSU1BR0Vf U1VOS0VOKQorICAgIHsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX0lNQUdFX1NVTktFTiB8fCBz LT5obCA9PSBEUkFXX0lNQUdFX1JBSVNFRCkKKyAgICAgICAgeworICAgICAgICAgIHRoID0gdG9v bF9iYXJfYnV0dG9uX3JlbGllZiA+PSAwID8KKyAgICAgICAgICAgIHRvb2xfYmFyX2J1dHRvbl9y ZWxpZWYgOiBERUZBVUxUX1RPT0xfQkFSX0JVVFRPTl9SRUxJRUY7CisgICAgICAgICAgcmFpc2Vk X3AgPSAocy0+aGwgPT0gRFJBV19JTUFHRV9SQUlTRUQpOworICAgICAgICB9CisgICAgICAgIGVs c2UKKyAgICAgICAgICB7CisgICAgICAgICAgICB0aCA9IGFicyAocy0+aW1nLT5yZWxpZWYpOwor ICAgICAgICAgICAgcmFpc2VkX3AgPSAocy0+aW1nLT5yZWxpZWYgPiAwKTsKKyAgICAgICAgICB9 CisgICAgICByLm9yaWdpbi54ID0geCAtIHRoOworICAgICAgci5vcmlnaW4ueSA9IHkgLSB0aDsK KyAgICAgIHIuc2l6ZS53aWR0aCA9IHMtPnNsaWNlLndpZHRoICsgMip0aC0xOworICAgICAgci5z aXplLmhlaWdodCA9IHMtPnNsaWNlLmhlaWdodCArIDIqdGgtMTsKKyAgICAgIG5zX2RyYXdfcmVs aWVmIChyLCB0aCwgcmFpc2VkX3AsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueSA9 PSAwLAorICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLnkgKyBzLT5zbGljZS5oZWlnaHQg PT0gcy0+aW1nLT5oZWlnaHQsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueCA9PSAw LAorICAgICAgICAgICAgICAgICAgICAgIHMtPnNsaWNlLnggKyBzLT5zbGljZS53aWR0aCA9PSBz LT5pbWctPndpZHRoLCBzKTsKKyAgICB9CisgIC8qIElmIHRoZXJlIGlzIG5vIG1hc2ssIHRoZSBi YWNrZ3JvdW5kIHdvbid0IGJlIHNlZW4sCisgICAgIHNvIGRyYXcgYSByZWN0YW5nbGUgb24gdGhl IGltYWdlIGZvciB0aGUgY3Vyc29yLgorICAgICBEbyB0aGlzIGZvciBhbGwgaW1hZ2VzLCBnZXR0 aW5nIHRyYW5zcGFyZW5jeSByaWdodCBpcyBub3QgcmVsaWFibGUuICovCisgIGlmIChzLT5obCA9 PSBEUkFXX0NVUlNPUikKKyAgICB7CisgICAgICBpbnQgdGhpY2tuZXNzID0gYWJzIChzLT5pbWct PnJlbGllZik7CisgICAgICBpZiAodGhpY2tuZXNzID09IDApIHRoaWNrbmVzcyA9IDE7CisgICAg aWYgKGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0g TUNfR0xZUEhMRVNTKQorICAgICAgeworICAgICAgICBOU0NvbG9yICpib3JkZXJfY29sb3IgPSBb TlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiBsc2wucmVkCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IGxzbC5ncmVl bgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBibHVlOiBsc2wuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGFscGhhOiAxLjBdOworICAgICAgICBuc19kcmF3X2JveCAo YnIsIHRoaWNrbmVzcywgYm9yZGVyX2NvbG9yLCAxLCAxKTsKKyAgICAgIH0KKyAgICAgIGVsc2UK KyAgICAgICAgbnNfZHJhd19ib3ggKGJyLCB0aGlja25lc3MsIEZSQU1FX0NVUlNPUl9DT0xPUiAo cy0+ZiksIDEsIDEpOworICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX21heWJlX2R1bXBn bHlwaHNfYmFja2dyb3VuZCAoc3RydWN0IGdseXBoX3N0cmluZyAqcywgY2hhciBmb3JjZV9wKQor eworICBOU1RSQUNFICgibWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIik7CisgIGlm ICghcy0+YmFja2dyb3VuZF9maWxsZWRfcC8qIHx8IHMtPmhsID09IERSQVdfTU9VU0VfRkFDRSov KQorICAgIHsKKyAgICAgIGludCBib3hfbGluZV93aWR0aCA9IG1heCAocy0+ZmFjZS0+Ym94X2xp bmVfd2lkdGgsIDApOworICAgICAgaWYgKEZPTlRfSEVJR0hUIChzLT5mb250KSA8IHMtPmhlaWdo dCAtIDIgKiBib3hfbGluZV93aWR0aAorICAgICAgICAgIC8qIFdoZW4geGRpc3AuYyBpZ25vcmVz IEZPTlRfSEVJR0hULCB3ZSBjYW5ub3QgdHJ1c3QgZm9udAorICAgICAgICAgICAgIGRpbWVuc2lv bnMsIHNpbmNlIHRoZSBhY3R1YWwgZ2x5cGhzIG1pZ2h0IGJlIG11Y2gKKyAgICAgICAgICAgICBz bWFsbGVyLiAgU28gaW4gdGhhdCBjYXNlIHdlIGFsd2F5cyBjbGVhciB0aGUgcmVjdGFuZ2xlCisg ICAgICAgICAgICAgd2l0aCBiYWNrZ3JvdW5kIGNvbG9yLiAqLworICAgICAgICAgIHx8IEZPTlRf VE9PX0hJR0ggKHMtPmZvbnQpCisgICAgICAgICAgfHwgcy0+Zm9udF9ub3RfZm91bmRfcCB8fCBz LT5leHRlbmRzX3RvX2VuZF9vZl9saW5lX3AgfHwgZm9yY2VfcCkKKyAgICAgICAgeworICAgICAg ICAgIHN0cnVjdCBmYWNlICpmYWNlOworICAgICAgICAgIGlmIChzLT5obCA9PSBEUkFXX01PVVNF X0ZBQ0UpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGZhY2UgPSBGQUNFX0ZST01fSUQg KHMtPmYsIE1PVVNFX0hMX0lORk8gKHMtPmYpLT5tb3VzZV9mYWNlX2ZhY2VfaWQpOworICAgICAg ICAgICAgICBpZiAoIWZhY2UpCisgICAgICAgICAgICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRCAo cy0+ZiwgTU9VU0VfRkFDRV9JRCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgIGZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIHMtPmZpcnN0X2dseXBoLT5m YWNlX2lkKTsKKyAgICAgICAgICBpZiAoIWZhY2UtPnN0aXBwbGUpCisgICAgICAgICAgICBbKE5T X0ZBQ0VfQkFDS0dST1VORCAoZmFjZSkgIT0gMAorICAgICAgICAgICAgICA/IG5zX2xvb2t1cF9p bmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBzLT5mKQorICAgICAgICAg ICAgICA6IEZSQU1FX0JBQ0tHUk9VTkRfQ09MT1IgKHMtPmYpKSBzZXRdOworICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc3RydWN0IG5zX2Rpc3BsYXlf aW5mbyAqZHB5aW5mbyA9IEZSQU1FX0RJU1BMQVlfSU5GTyAocy0+Zik7CisgICAgICAgICAgICAg ICAgW1tkcHlpbmZvLT5iaXRtYXBzW2ZhY2UtPnN0aXBwbGUtMV0uaW1nIHN0aXBwbGVNYXNrXSBz ZXRdOworICAgICAgICAgICAgICB9CisgICAgICAgICAgaWYgKHMtPmhsICE9IERSQVdfQ1VSU09S KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBzLT5yZWN0YW5nbGVfbnVrZWRfcCA9IHRy dWU7CisgICAgICAgICAgICAgIE5TUmVjdCByID0gTlNNYWtlUmVjdCAocy0+eCwgcy0+eSArIGJv eF9saW5lX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+YmFj a2dyb3VuZF93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPmhl aWdodC0yKmJveF9saW5lX3dpZHRoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7Cisg ICAgICAgICAgICB9CisgICAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAg ICAgIH0KKyAgICB9Cit9CisKK3N0YXRpYyB2b2lkCittY19uc19kcmF3X2dseXBoX3N0cmluZyAo c3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAg ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgc3RydWN0IG1jX21h dHJpeCBtY19tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBs c2wsIGVudW0gbWNfZmxhdm9yIGdseXBoX2Z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lwZSAhPSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAobmV4dC0+ Zmlyc3RfZ2x5cGgtPnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocy0+bmV4dCwg cik7CisgICAgICAgICAgICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQor ICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIG1jX25zX21heWJlX2R1 bXBnbHlwaHNfYmFja2dyb3VuZCAocy0+bmV4dCwgMSk7CisgICAgICAgICAgICAgICAgbnNfcmVz ZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UK KyAgICAgICAgICAgICAgICBtY19uc19kdW1wZ2x5cGhzX3N0cmV0Y2ggKHMtPm5leHQsIG1hdHJp eCwgcm93LCBtY19tYXRyaXgsIHdkKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7 CisgICAgICAgICAgfQorICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMgJiYgcy0+ZmFjZS0+ Ym94ICE9IEZBQ0VfTk9fQk9YCisgICAgICAmJiAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hB Ul9HTFlQSAorICAgICAgICAgIHx8IHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9H TFlQSCkpCisgICAgeworICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChz LCByKTsKKyAgICAgIGlmICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAg cmV0dXJuOworICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLCAxKTsK KyAgICAgIG5zX2R1bXBnbHlwaHNfYm94X29yX3JlbGllZiAocyk7CisgICAgICBuc19yZXNldF9j bGlwcGluZyAocy0+Zik7CisgICAgICBib3hfZHJhd25fcCA9IDE7CisgICAgfQorICBzd2l0Y2gg KHMtPmZpcnN0X2dseXBoLT50eXBlKQorICAgIHsKKyAgICBjYXNlIElNQUdFX0dMWVBIOgorICAg ICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICgh bnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgbWNf bnNfZHVtcGdseXBoc19pbWFnZSAocywgclswXSwgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNvcl90 eXBlLCBhY3RpdmVfcCk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBi cmVhazsKKyAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CisgICAgICBtY19uc19kdW1wZ2x5cGhzX3N0 cmV0Y2ggKHMsIG1hdHJpeCwgcm93LCBtY19tYXRyaXgsIHdkKTsKKyAgICAgIGJyZWFrOworICAg IGNhc2UgQ0hBUl9HTFlQSDoKKyAgICBjYXNlIENPTVBPU0lURV9HTFlQSDoKKyAgICAgIG4gPSBu c19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2NsaXBf dG9fcmVjdCAocy0+ZiwgciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIGlmIChzLT5mb3Jf b3ZlcmxhcHMKKyAgICAgICAgICB8fCAocy0+Y21wX2Zyb20gPiAwCisgICAgICAgICAgICAgICYm ICEgcy0+Zmlyc3RfZ2x5cGgtPnUuY21wLmF1dG9tYXRpYykpCisgICAgICAgIHMtPmJhY2tncm91 bmRfZmlsbGVkX3AgPSAxOworICAgICAgICBlbHNlCisgICAgICAgICAgbWNfbnNfbWF5YmVfZHVt cGdseXBoc19iYWNrZ3JvdW5kIChzLCBzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVf R0xZUEgpOworICAgICAgaW50IGZsYWdzID0gKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgICAg ICAgICAgICAgICAgICA/IE5TX0RVTVBHTFlQSF9DVVJTT1IKKyAgICAgICAgICAgICAgICAgIDog KHMtPmhsID09IERSQVdfTU9VU0VfRkFDRSkKKyAgICAgICAgICAgICAgICAgICAgPyBOU19EVU1Q R0xZUEhfTU9VU0VGQUNFCisgICAgICAgICAgICAgICAgICA6IChzLT5mb3Jfb3ZlcmxhcHMpCisg ICAgICAgICAgICAgICAgICAgID8gTlNfRFVNUEdMWVBIX0ZPUkVHUk9VTkQKKyAgICAgICAgICAg ICAgICAgIDogTlNfRFVNUEdMWVBIX05PUk1BTDsKKyAgICAgIHVuc2lnbmVkIGxvbmcgc2F2ZWRf ZmcgPSBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpOworICAgICAgaWYgKHMtPmhsID09IERS QVdfQ1VSU09SICYmIGN1cnNvcl90eXBlID09IE1DX0ZJTExFRF9CT1gpCisgICAgICAgIHsKKyAg ICAgICAgICB1bnNpZ25lZCBsb25nIHRtcCA9IE5TX0ZBQ0VfQkFDS0dST1VORCAocy0+ZmFjZSk7 CisgICAgICAgICAgTlNfRkFDRV9CQUNLR1JPVU5EIChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdS T1VORCAocy0+ZmFjZSk7CisgICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9 IHRtcDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgor ICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisgICAgICAg ICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICA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AgICAgICAgICB9CisgICAgICBpZiAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09N UE9TSVRFX0dMWVBIKQorICAgICAgICBuc19kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9y ZWdyb3VuZCAocyk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29s IHdpdGhfYmdfcCA9ICgoZmxhZ3MgPT0gTlNfRFVNUEdMWVBIX05PUk1BTCAmJiAhcy0+YmFja2dy b3VuZF9maWxsZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGZsYWdzID09 IE5TX0RVTVBHTFlQSF9NT1VTRUZBQ0UpOworICAgICAgICAgICAgaWYgKHdpdGhfYmdfcCkKKyAg ICAgICAgICAgICAgcy0+YmFja2dyb3VuZF9udWtlZF9wID0gdHJ1ZTsKKyAgICAgICAgICAgIGZv bnQtPmRyaXZlci0+ZHJhdyAocywgcy0+Y21wX2Zyb20sIHMtPm5jaGFycywgcy0+eCwgcy0+eWJh c2UsIHdpdGhfYmdfcCk7CisgICAgICAgICAgfQorICAgICAgTlNDb2xvciAqY29sID0gKE5TX0ZB Q0VfRk9SRUdST1VORCAocy0+ZmFjZSkgIT0gMAorICAgICAgICAgICAgICAgICAgICAgPyBuc19s b29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSwgcy0+ZikK KyAgICAgICAgICAgICAgICAgICAgIDogRlJBTUVfRk9SRUdST1VORF9DT0xPUiAocy0+ZikpOwor ICAgICAgW2NvbCBzZXRdOworICAgICAgLyogRHJhdyB1bmRlcmxpbmUsIG92ZXJsaW5lLCBzdHJp a2UtdGhyb3VnaC4gKi8KKyAgICAgIG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChzLCBzLT5m YWNlLCBjb2wsIHMtPndpZHRoLCBzLT54KTsKKyAgICAgIGlmIChzLT5maXJzdF9nbHl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ID0gbnNfZ2V0X2dseXBoX3N0cmluZ19jbGlwX3Jl Y3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAg ICAgICByZXR1cm47CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBzCisgICAgICAgICAgfHwgKHMt PmNtcF9mcm9tID4gMAorICAgICAgICAgICAgICAmJiAhIHMtPmZpcnN0X2dseXBoLT51LmNtcC5h dXRvbWF0aWMpKQorICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gMTsKKyAgICAgIGVs c2UKKyAgICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLCBzLT5maXJz dF9nbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpOworICAgICAgbnNfcmVzZXRfY2xpcHBp bmcgKHMtPmYpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0 ICgpOworICAgIH0KKyAgLyogRHJhdyBib3ggaWYgbm90IGRvbmUgYWxyZWFkeS4gKi8KKyAgaWYg KCFzLT5mb3Jfb3ZlcmxhcHMKKyAgICAgICYmICFib3hfZHJhd25fcAorICAgICAgJiYgcy0+ZmFj ZS0+Ym94ICE9IEZBQ0VfTk9fQk9YKQorICAgIHsKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3Ry aW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+Ziwg ciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIG5zX2R1bXBnbHlwaHNfYm94X29yX3JlbGll ZiAocyk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgfQorICBzLT5udW1f Y2xpcHMgPSAwOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIAogICAgTlNUUkFDRSwgVHJh Y2Ugc3VwcG9ydC4KQEAgLTEwNzksNiArMjA0OSwxNiBAQCBzdGF0aWMgTlNSZWN0IGNvbnN0cmFp bl9mcmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNGdWxsc2NyZWVuKQogICAgZXh0 ZXJuYWwgKFJJRikgY2FsbDsgd2hvbGUgZnJhbWUsIGNhbGxlZCBiZWZvcmUgZ3VpX3VwZGF0ZV93 aW5kb3dfYmVnaW4KICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCiB7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdf ZnJhbWUgPSBmOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAjaWZkZWYgTlNfSU1Q TF9DT0NPQQogICBFbWFjc1ZpZXcgKnZpZXcgPSBGUkFNRV9OU19WSUVXIChmKTsKIApAQCAtMTEw OSw2ICsyMDg5LDE2IEBAIHN0YXRpYyBOU1JlY3QgY29uc3RyYWluX2ZyYW1lX3JlY3QoTlNSZWN0 IGZyYW1lUmVjdCwgYm9vbCBpc0Z1bGxzY3JlZW4pCiAKIC8qICAgaWYgKGYgPT0gTU9VU0VfSExf SU5GTyAoZiktPm1vdXNlX2ZhY2VfbW91c2VfZnJhbWUpICovCiAgIE1PVVNFX0hMX0lORk8gKGYp LT5tb3VzZV9mYWNlX2RlZmVyID0gMDsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC00NzU5LDYgKzU3NDksMTcg QEAgaW4gY2VydGFpbiBzaXR1YXRpb25zIChyYXBpZCBpbmNvbWluZyBldmVudHMpLgogICAgICAg YmFyID0gW1tFbWFjc1Njcm9sbGVyIGFsbG9jXSBpbml0RnJhbWU6IHIgd2luZG93OiB3aW5dOwog ICAgICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyICh3aW5kb3csIG1ha2VfbWludF9wdHIgKGJh cikpOwogICAgICAgdXBkYXRlX3AgPSBZRVM7CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIC8qIFRoaXMgaXMgb25seSBmb3IgZGVi dWdnaW5nIHB1cnBvc2VzLiAqLworICAgICAgW2JhciBtY19zZXRfcmVjdGFuZ2xlOiByXTsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KICAgZWxzZQogICAgIHsKQEAgLTQ3 NjYsMTIgKzU3NjcsMzAgQEAgaW4gY2VydGFpbiBzaXR1YXRpb25zIChyYXBpZCBpbmNvbWluZyBl dmVudHMpLgogICAgICAgYmFyID0gWE5TX1NDUk9MTF9CQVIgKHdpbmRvdy0+dmVydGljYWxfc2Ny b2xsX2Jhcik7CiAgICAgICBvbGRSZWN0ID0gW2JhciBmcmFtZV07CiAgICAgICByLnNpemUud2lk dGggPSBvbGRSZWN0LnNpemUud2lkdGg7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgICAgIGlmIChGUkFNRV9MSVZFX1AgKGYpICYmICFO U0VxdWFsUmVjdHMgKG9sZFJlY3QsIHIpKQogICAgICAgICB7CisgICAgICAgICAgLyogVGhlIG1h aW4gd2luZG93IGhhcyBwcm9iYWJseSBiZWVuIHJlc2l6ZWQuICBHcmFjaW91c2x5IGRlbGV0ZSB0 aGUKKyAgICAgICAgICBvbGQgc2Nyb2xsIGJhciB3aXRob3V0IHJlcGFpbnRpbmcgaXRzIHJlY3Rh bmdsZTsgYW5kLCBjcmVhdGUgYSBuZXcKKyAgICAgICAgICBzY3JvbGwgYmFyIGVsc2V3aGVyZS4q LwogICAgICAgICAgIGlmIChvbGRSZWN0Lm9yaWdpbi54ICE9IHIub3JpZ2luLngpCisgICAgICAg ICAgICB7CiAgICAgICAgICAgICAgIG5zX2NsZWFyX2ZyYW1lX2FyZWEgKGYsIGxlZnQsIHRvcCwg d2lkdGgsIGhlaWdodCk7CisgICAgICAgICAgICAgIFtiYXIgbWNfanVkZ2VdOworICAgICAgICAg ICAgICBiYXIgPSBbW0VtYWNzU2Nyb2xsZXIgYWxsb2NdIGluaXRGcmFtZTogciB3aW5kb3c6IHdp bl07CisgICAgICAgICAgICAgIHdzZXRfdmVydGljYWxfc2Nyb2xsX2JhciAod2luZG93LCBtYWtl X21pbnRfcHRyIChiYXIpKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKICAgICAg ICAgICBbYmFyIHNldEZyYW1lOiByXTsKICAgICAgICAgfQorCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAgICAgfQogCiAgIGlmICh1cGRhdGVfcCkKQEAgLTQ5MzEsOSArNTk1MCw1NyBA QCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlkIGluY29taW5nIGV2ZW50cykuCiAgICAgewog ICAgICAgdmlldyA9IFtzdWJ2aWV3cyBvYmplY3RBdEluZGV4OiBpXTsKICAgICAgIGlmICghW3Zp ZXcgaXNLaW5kT2ZDbGFzczogW0VtYWNzU2Nyb2xsZXIgY2xhc3NdXSkgY29udGludWU7Ci0gICAg ICBpZiAoW3ZpZXcganVkZ2VdKQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCisgIC8qIGBYU0VUV0lORE9XJyB3aWxsIHNvbWV0aW1lcyBjYXVz ZSBFbWFjcyB0byBjcmFzaCB3aGVuIHJ1bm5pbmcgdW5kZXIgZ2RiIGV2ZW4KKyAgdGhvdWdoICh3 ICE9IE5VTEwpLiAgVGhlcmVmb3JlLCB3ZSBjYW5ub3QgcmVsaWFibHkgdXNlIGBXSU5ET1dfTElW RV9QJy4gKi8KKyAgc3RydWN0IHdpbmRvdyAqdyA9IFt2aWV3IG1jX2dldF93aW5kb3ddOworICBp ZiAodyAhPSBOVUxMCisgICAgICAmJiBOSUxQICh3LT5jb250ZW50cykpCisgICAgeworICAgICAg Qk9PTCBkZWJ1Z19wID0gZmFsc2U7CisgICAgICBpZiAoZGVidWdfcAorICAgICAgICAgIC8qIGB3 aW5kb3dfYm94JyBjYWxscyBgd2luZG93X2JveF9oZWlnaHQnLCB3aGljaCB3aWxsIGNhdXNlIEVt YWNzIHRvCisgICAgICAgICAgY3Jhc2ggaWYgRlJBTUVQICh3LT5mcmFtZSkgaXMgbm90IHNhdGlz ZmllZC4gKi8KKyAgICAgICAgICAmJiBGUkFNRVAgKHctPmZyYW1lKSkKKyAgICAgICAgeworICAg ICAgICAgIE5TUmVjdCByMCA9IFt2aWV3IG1jX2dldF9yZWN0YW5nbGVdOworICAgICAgICAgIGlu dCB4MCA9IE5TTWluWCAocjApOworICAgICAgICAgIGludCB5MCA9IE5TTWluWSAocjApOworICAg ICAgICAgIGludCB3ZDAgPSBOU1dpZHRoIChyMCk7CisgICAgICAgICAgaW50IGgwID0gTlNIZWln aHQgKHIwKTsKKyAgICAgICAgICBpbnQgd2luZG93X3ksIHdpbmRvd19oZWlnaHQ7CisgICAgICAg ICAgd2luZG93X2JveCAodywgQU5ZX0FSRUEsIDAsICZ3aW5kb3dfeSwgMCwgJndpbmRvd19oZWln aHQpOworICAgICAgICAgIGludCB0b3AgPSB3aW5kb3dfeTsKKyAgICAgICAgICBpbnQgaGVpZ2h0 ID0gd2luZG93X2hlaWdodDsKKyAgICAgICAgICBpbnQgd2lkdGggPSBXSU5ET1dfQ09ORklHX1ND Uk9MTF9CQVJfQ09MUyAodykgKiBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICAgICAgICAgIGlu dCBsZWZ0ID0gV0lORE9XX1NDUk9MTF9CQVJfQVJFQV9YICh3KTsKKyAgICAgICAgICBOU1JlY3Qg cjEgPSBOU01ha2VSZWN0IChsZWZ0LCB0b3AsIHdpZHRoLCBoZWlnaHQpOworICAgICAgICAgIC8q IFRoZSBwYXJlbnQgdmlldyBpcyBmbGlwcGVkLCBzbyB3ZSBuZWVkIHRvIGZsaXAgeSB2YWx1ZS4g Ki8KKyAgICAgICAgICBFbWFjc1ZpZXcgKmZyYW1lX3ZpZXcgPSBGUkFNRV9OU19WSUVXIChmKTsK KyAgICAgICAgICBOU1JlY3QgdiA9IFtmcmFtZV92aWV3IGZyYW1lXTsKKyAgICAgICAgICByMS5v cmlnaW4ueSA9ICh2LnNpemUuaGVpZ2h0IC0gcjEuc2l6ZS5oZWlnaHQgLSByMS5vcmlnaW4ueSk7 CisgICAgICAgICAgaW50IHgxID0gTlNNaW5YIChyMSk7CisgICAgICAgICAgaW50IHkxID0gTlNN aW5ZIChyMSk7CisgICAgICAgICAgaW50IHdkMSA9IE5TV2lkdGggKHIxKTsKKyAgICAgICAgICBp bnQgaDEgPSBOU0hlaWdodCAocjEpOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiVzIC0t IERFQUQ6XG5cCisgICAgICAgICAgeDAveDEgKCVkLyVkKSB8IHkwL3kxICglZC8lZCkgfCB3ZDAv d2QxICglZC8lZCkgfCBoMC9oMSAoJWQvJWQpXG4iLAorICAgICAgICAgIG1jX3dpbmRvdyAodyks IHgwLCB4MSwgeTAsIHkxLCB3ZDAsIHdkMSwgaDAsIGgxKTsKKyAgICAgICAgfQorICAgICAgaWYg KFt2aWV3IG1jX2p1ZGdlXSkKICAgICAgICAgcmVtb3ZlZCA9IFlFUzsKICAgICB9CisgICAgZWxz ZSBpZiAoW3ZpZXcganVkZ2VdKQorICAgICAgcmVtb3ZlZCA9IFlFUzsKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKworICAgIH0KIAogICBpZiAocmVtb3ZlZCkKICAgICBbZXZpZXcgdXBk YXRlRnJhbWVTaXplOiBOT107CkBAIC01MDc0LDYgKzYxNDEsMjAgQEAgc3RhdGljIExpc3BfT2Jq ZWN0IG5zX3N0cmluZ190b19saXNwbW9kIChjb25zdCBjaGFyICpzKQogZXh0ZXJuIGZyYW1lX3Bh cm1faGFuZGxlciBuc19mcmFtZV9wYXJtX2hhbmRsZXJzW107CiBzdGF0aWMgc3RydWN0IHJlZGlz cGxheV9pbnRlcmZhY2UgbnNfcmVkaXNwbGF5X2ludGVyZmFjZSA9CiB7CisKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIGByZWRpc3BsYXlf aW50ZXJmYWNlJyBpbiBgbnN0ZXJtLm1gIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIg YXMgdGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAg bWNfbnNfZHJhd193aW5kb3dfY3Vyc29yLAorICBtY19uc19kcmF3X2dseXBoX3N0cmluZywKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBuc19mcmFtZV9wYXJtX2hhbmRsZXJzLAog ICBndWlfcHJvZHVjZV9nbHlwaHMsCiAgIGd1aV93cml0ZV9nbHlwaHMsCkBAIC04NzExLDYgKzk3 OTIsNDkgQEAgLSAoQk9PTCljYW5CZWNvbWVNYWluV2luZG93CiAKIEBpbXBsZW1lbnRhdGlvbiBF bWFjc1Njcm9sbGVyCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5TUmVjdClyZWN0Cit7Cisg IG1jX3JlY3RhbmdsZSA9IHJlY3Q7Cit9CisKKy0gKE5TUmVjdCltY19nZXRfcmVjdGFuZ2xlCit7 CisgIHJldHVybiBtY19yZWN0YW5nbGU7Cit9CisKKy0gKHN0cnVjdCB3aW5kb3cgKiltY19nZXRf d2luZG93Cit7CisgIHJldHVybiB3aW5kb3c7Cit9CisKKy0gKGJvb2wpbWNfanVkZ2UKK3sKKyAg TlNUUkFDRSAoIltFbWFjc1Njcm9sbGVyIG1jX2p1ZGdlXSIpOworICBib29sIHJldCA9IGNvbmRl bW5lZDsKKyAgYmxvY2tfaW5wdXQgKCk7CisgIGlmIChjb25kZW1uZWQpCisgICAgeworICAgICAg LyogZW5zdXJlIG90aGVyIHNjcm9sbGJhciB1cGRhdGVzIGFmdGVyIGRlbGV0aW9uICovCisgICAg ICBFbWFjc1ZpZXcgKnZpZXcgPSAoRW1hY3NWaWV3ICopRlJBTUVfTlNfVklFVyAoZnJhbWUpOwor ICAgICAgaWYgKHZpZXcgIT0gbmlsKQorICAgICAgICB2aWV3LT5zY3JvbGxiYXJzTmVlZGluZ1Vw ZGF0ZSsrOworICAgIH0KKyAgaWYgKHdpbmRvdykKKyAgICB3c2V0X3ZlcnRpY2FsX3Njcm9sbF9i YXIgKHdpbmRvdywgUW5pbCk7CisgIHdpbmRvdyA9IDA7CisgIFtzZWxmIHJlbW92ZUZyb21TdXBl cnZpZXdXaXRob3V0TmVlZGluZ0Rpc3BsYXldOworICBbc2VsZiByZWxlYXNlXTsKKyAgdW5ibG9j a19pbnB1dCAoKTsKKyAgcmV0dXJuIHJldDsKK30KKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogLyogZm9yIHJlcGVhdCBidXR0b24gcHVzaCAqLwogI2RlZmluZSBTQ1JPTExfQkFSX0ZJ UlNUX0RFTEFZIDAuNQogI2RlZmluZSBTQ1JPTExfQkFSX0NPTlRJTlVPVVNfREVMQVkgKDEuMCAv IDE1KQpkaWZmIC0tZ2l0IGEvc3JjL3czMnRlcm0uYyBiL3NyYy93MzJ0ZXJtLmMKaW5kZXggYzZl MTc1ZS4uZmExMTVjMCAxMDA2NDQKLS0tIGEvc3JjL3czMnRlcm0uYworKysgYi9zcmMvdzMydGVy bS5jCkBAIC02Miw2ICs2MiwxMTY4IEBAIGFsb25nIHdpdGggR05VIEVtYWNzLiAgSWYgbm90LC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SBW dzMyX2NvbG9yX21hcDsgQ09OU1AgKHRhaWwpOyB0YWlsID0gWENEUiAodGFpbCkpCisgICAgewor ICAgICAgcmVnaXN0ZXIgTGlzcF9PYmplY3QgZWx0LCB0ZW07CisgICAgICBlbHQgPSBYQ0FSICh0 YWlsKTsKKyAgICAgIGlmICghQ09OU1AgKGVsdCkpIGNvbnRpbnVlOworICAgICAgdGVtID0gWENB UiAoZWx0KTsKKyAgICAgIGlmIChsc3RyY21waSAoU1NEQVRBICh0ZW0pLCBjb2xvcm5hbWUpID09 IDApCisgICAgICAgIHsKKyAgICAgICAgICByZXQgPSBGY2RyIChlbHQpOworICAgICAgICAgIGJy ZWFrOworICAgICAgICB9CisgICAgICBNQ19RVUlUOworICAgIH0KKyAgdW5ibG9ja19pbnB1dCAo KTsKKyAgcmV0dXJuIHJldDsKK30KKworc3RhdGljIExpc3BfT2JqZWN0CittY194X3RvX3czMl9j b2xvciAoY29uc3QgY2hhciAqIGNvbG9ybmFtZSkKK3sKKyAgcmVnaXN0ZXIgTGlzcF9PYmplY3Qg cmV0ID0gUW5pbDsKKyAgYmxvY2tfaW5wdXQgKCk7CisgIGlmIChjb2xvcm5hbWVbMF0gPT0gJyMn KQorICAgIHsKKyAgICAgIC8qIENvdWxkIGJlIGFuIG9sZC1zdHlsZSBSR0IgRGV2aWNlIHNwZWNp ZmljYXRpb24uICovCisgICAgICBpbnQgc2l6ZSA9IHN0cmxlbiAoY29sb3JuYW1lICsgMSk7Cisg ICAgICBjaGFyICpjb2xvciA9IGFsbG9jYSAoc2l6ZSArIDEpOworICAgICAgc3RyY3B5IChjb2xv ciwgY29sb3JuYW1lICsgMSk7CisgICAgICBpZiAoc2l6ZSA9PSAzIHx8IHNpemUgPT0gNiB8fCBz aXplID09IDkgfHwgc2l6ZSA9PSAxMikKKyAgICAgICAgeworICAgICAgICAgIFVJTlQgY29sb3J2 YWw7CisgICAgICAgICAgaW50IGksIHBvczsKKyAgICAgICAgICBwb3MgPSAwOworICAgICAgICAg IHNpemUgLz0gMzsKKyAgICAgICAgICBjb2xvcnZhbCA9IDA7CisgICAgICAgICAgZm9yIChpID0g MDsgaSA8IDM7IGkrKykKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY2hhciAqZW5kOwor ICAgICAgICAgICAgICBjaGFyIHQ7CisgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdmFsdWU7 CisgICAgICAgICAgICAgIC8qIFRoZSBjaGVjayBmb3IgJ3gnIGluIHRoZSBmb2xsb3dpbmcgY29u ZGl0aW9uYWwgdGFrZXMgaW50bworICAgICAgICAgICAgICBhY2NvdW50IHRoZSBmYWN0IHRoYXQg c3RydG9sIGFsbG93cyBhICIweCIgaW4gZnJvbnQgb2YKKyAgICAgICAgICAgICAgb3VyIG51bWJl cnMsIGFuZCB3ZSBkb24ndC4gKi8KKyAgICAgICAgICAgICAgaWYgKCFpc3hkaWdpdCAoY29sb3Jb MF0pIHx8IGNvbG9yWzFdID09ICd4JykKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAg ICAgICAgdCA9IGNvbG9yW3NpemVdOworICAgICAgICAgICAgICBjb2xvcltzaXplXSA9ICdcMCc7 CisgICAgICAgICAgICAgIHZhbHVlID0gc3RydG91bCAoY29sb3IsICZlbmQsIDE2KTsKKyAgICAg ICAgICAgICAgY29sb3Jbc2l6ZV0gPSB0OworICAgICAgICAgICAgICBpZiAoZXJybm8gPT0gRVJB TkdFIHx8IGVuZCAtIGNvbG9yICE9IHNpemUpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICAgIHN3aXRjaCAoc2l6ZSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgY2FzZSAxOgorICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZSAqIDB4MTA7CisgICAg ICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDI6CisgICAgICAgICAg ICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDM6CisgICAgICAgICAgICAgICAg ICB2YWx1ZSAvPSAweDEwOworICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg ICAgY2FzZSA0OgorICAgICAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDA7CisgICAgICAgICAg ICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGNvbG9ydmFs IHw9ICh2YWx1ZSA8PCBwb3MpOworICAgICAgICAgICAgICBwb3MgKz0gMHg4OworICAgICAgICAg ICAgICBpZiAoaSA9PSAyKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIHVu YmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgICAgICBYU0VUSU5UIChyZXQsIGNvbG9ydmFs KTsKKyAgICAgICAgICAgICAgICAgIHJldHVybiByZXQ7CisgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICBjb2xvciA9IGVuZDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0K KyAgZWxzZSBpZiAoc3RybmljbXAgKGNvbG9ybmFtZSwgInJnYjoiLCA0KSA9PSAwKQorICAgIHsK KyAgICAgIGNvbnN0IGNoYXIgKmNvbG9yOworICAgICAgVUlOVCBjb2xvcnZhbDsKKyAgICAgIGlu dCBpLCBwb3M7CisgICAgICBwb3MgPSAwOworICAgICAgY29sb3J2YWwgPSAwOworICAgICAgY29s b3IgPSBjb2xvcm5hbWUgKyA0OworICAgICAgZm9yIChpID0gMDsgaSA8IDM7IGkrKykKKyAgICAg ICAgeworICAgICAgICAgIGNoYXIgKmVuZDsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIHZhbHVl OworICAgICAgICAgIC8qIFRoZSBjaGVjayBmb3IgJ3gnIGluIHRoZSBmb2xsb3dpbmcgY29uZGl0 aW9uYWwgdGFrZXMgaW50bworICAgICAgICAgICAgIGFjY291bnQgdGhlIGZhY3QgdGhhdCBzdHJ0 b2wgYWxsb3dzIGEgIjB4IiBpbiBmcm9udCBvZgorICAgICAgICAgICAgIG91ciBudW1iZXJzLCBh bmQgd2UgZG9uJ3QuICovCisgICAgICAgICAgaWYgKCFpc3hkaWdpdCAoY29sb3JbMF0pIHx8IGNv bG9yWzFdID09ICd4JykKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIHZhbHVlID0gc3Ry dG91bCAoY29sb3IsICZlbmQsIDE2KTsKKyAgICAgICAgICBpZiAoZXJybm8gPT0gRVJBTkdFKQor ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgc3dpdGNoIChlbmQgLSBjb2xvcikKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgIGNhc2UgMToKKyAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1 ZSAqIDB4MTAgKyB2YWx1ZTsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNl IDI6CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzOgorICAgICAgICAg ICAgICB2YWx1ZSAvPSAweDEwOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNh c2UgNDoKKyAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDA7CisgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgdmFsdWUgPSBVTE9OR19NQVg7 CisgICAgICAgICAgICB9CisgICAgICAgICAgaWYgKHZhbHVlID09IFVMT05HX01BWCkKKyAgICAg ICAgICAgIGJyZWFrOworICAgICAgICAgIGNvbG9ydmFsIHw9ICh2YWx1ZSA8PCBwb3MpOworICAg ICAgICAgIHBvcyArPSAweDg7CisgICAgICAgICAgaWYgKGkgPT0gMikKKyAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgaWYgKCplbmQgIT0gJ1wwJykKKyAgICAgICAgICAgICAgICBicmVhazsK KyAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgWFNFVElOVCAo cmV0LCBjb2xvcnZhbCk7CisgICAgICAgICAgICAgIHJldHVybiByZXQ7CisgICAgICAgICAgICB9 CisgICAgICAgICAgaWYgKCplbmQgIT0gJy8nKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAg ICAgY29sb3IgPSBlbmQgKyAxOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UgaWYgKHN0cm5p Y21wIChjb2xvcm5hbWUsICJyZ2JpOiIsIDUpID09IDApCisgICAgICB7CisgICAgICAgIC8qIFRo aXMgaXMgYW4gUkdCIEludGVuc2l0eSBzcGVjaWZpY2F0aW9uLiAqLworICAgICAgICBjb25zdCBj aGFyICpjb2xvcjsKKyAgICAgICAgVUlOVCBjb2xvcnZhbDsKKyAgICAgICAgaW50IGksIHBvczsK KyAgICAgICAgcG9zID0gMDsKKyAgICAgICAgY29sb3J2YWwgPSAwOworICAgICAgICBjb2xvciA9 IGNvbG9ybmFtZSArIDU7CisgICAgICAgIGZvciAoaSA9IDA7IGkgPCAzOyBpKyspCisgICAgICAg ICAgeworICAgICAgICAgICAgY2hhciAqZW5kOworICAgICAgICAgICAgZG91YmxlIHZhbHVlOwor ICAgICAgICAgICAgVUlOVCB2YWw7CisgICAgICAgICAgICB2YWx1ZSA9IHN0cnRvZCAoY29sb3Is ICZlbmQpOworICAgICAgICAgICAgaWYgKGVycm5vID09IEVSQU5HRSkKKyAgICAgICAgICAgICAg YnJlYWs7CisgICAgICAgICAgICBpZiAodmFsdWUgPCAwLjAgfHwgdmFsdWUgPiAxLjApCisgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgdmFsID0gKFVJTlQpKDB4MTAwICogdmFsdWUp OworICAgICAgICAgICAgLyogV2UgdXNlZCAweDEwMCBpbnN0ZWFkIG9mIDB4RkYgdG8gZ2l2ZSBh IGNvbnRpbnVvdXMKKyAgICAgICAgICAgICAgIHJhbmdlIGJldHdlZW4gMC4wIGFuZCAxLjAgaW5j bHVzaXZlLiAgVGhlIG5leHQgc3RhdGVtZW50CisgICAgICAgICAgICAgICBmaXhlcyB0aGUgMS4w IGNhc2UuICovCisgICAgICAgICAgICBpZiAodmFsID09IDB4MTAwKQorICAgICAgICAgICAgICB2 YWwgPSAweEZGOworICAgICAgICAgICAgY29sb3J2YWwgfD0gKHZhbCA8PCBwb3MpOworICAgICAg ICAgICAgcG9zICs9IDB4ODsKKyAgICAgICAgICAgIGlmIChpID09IDIpCisgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICBpZiAoKmVuZCAhPSAnXDAnKQorICAgICAgICAgICAgICAgICAg YnJlYWs7CisgICAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAg ICBYU0VUSU5UIChyZXQsIGNvbG9ydmFsKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gcmV0Owor ICAgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoKmVuZCAhPSAnLycpCisgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgY29sb3IgPSBlbmQgKyAxOworICAgICAgICAgIH0KKyAg ICAgIH0KKyAgLyogSSBhbSBub3QgZ29pbmcgdG8gYXR0ZW1wdCB0byBoYW5kbGUgYW55IG9mIHRo ZSBDSUUgY29sb3Igc2NoZW1lcworICAgICBvciBUZWtIVkMsIHNpbmNlIEkgZG9uJ3Qga25vdyB0 aGUgYWxnb3JpdGhtcyBmb3IgY29udmVyc2lvbiB0byBSR0IuCisgICAgIElmIHdlIGZhaWwgdG8g bG9va3VwIHRoZSBjb2xvciBuYW1lIGluIHczMl9jb2xvcl9tYXAsIHRoZW4gY2hlY2sgdGhlCisg ICAgIGNvbG9ybmFtZSB0byBzZWUgaWYgaXQgY2FuIGJlIGNydWRlbHkgYXBwcm94aW1hdGVkOiBJ ZiB0aGUgWCBjb2xvcgorICAgICBlbmRzIGluIGEgbnVtYmVyIChlLmcuLCAiZGFya3NlYWdyZWVu MiIpLCBzdHJpcCB0aGUgbnVtYmVyIGFuZAorICAgICByZXR1cm4gdGhlIHJlc3VsdCBvZiBsb29r aW5nIHVwIHRoZSBiYXNlIGNvbG9yIG5hbWUuICovCisgIHJldCA9IG1jX3czMl9jb2xvcl9tYXBf bG9va3VwIChjb2xvcm5hbWUpOworICBpZiAoTklMUCAocmV0KSkKKyAgICB7CisgICAgICBpbnQg bGVuID0gc3RybGVuIChjb2xvcm5hbWUpOworICAgICAgaWYgKGlzZGlnaXQgKGNvbG9ybmFtZVts ZW4gLSAxXSkpCisgICAgICAgIHsKKyAgICAgICAgICBjaGFyICpwdHIsICphcHByb3ggPSBhbGxv Y2EgKGxlbiArIDEpOworICAgICAgICAgIHN0cmNweSAoYXBwcm94LCBjb2xvcm5hbWUpOworICAg ICAgICAgIHB0ciA9ICZhcHByb3hbbGVuIC0gMV07CisgICAgICAgICAgd2hpbGUgKHB0ciA+IGFw cHJveCAmJiBpc2RpZ2l0ICgqcHRyKSkKKyAgICAgICAgICAgICpwdHItLSA9ICdcMCc7CisgICAg ICAgICAgcmV0ID0gbWNfdzMyX2NvbG9yX21hcF9sb29rdXAgKGFwcHJveCk7CisgICAgICAgIH0K KyAgICB9CisgIHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVybiByZXQ7Cit9CisKKy8qIERlY2lk ZSBpZiBjb2xvciBuYW1lZCBDT0xPUiBpcyB2YWxpZCBmb3IgdGhlIGRpc3BsYXkgYXNzb2NpYXRl ZCB3aXRoCisgICB0aGUgc2VsZWN0ZWQgZnJhbWU7IGlmIHNvLCByZXR1cm4gdGhlIHJnYiB2YWx1 ZXMgaW4gQ09MT1JfREVGLgorICAgSWYgQUxMT0MgaXMgbm9uemVybywgYWxsb2NhdGUgYSBuZXcg Y29sb3JtYXAgY2VsbC4gKi8KK2ludAorbWNfdzMyX2RlZmluZWRfY29sb3IgKHN0cnVjdCBmcmFt ZSAqZiwgY29uc3QgY2hhciAqY29sb3IsIG1jX1hDb2xvciAqY29sb3JfZGVmLCBib29sIGFsbG9j X3ApCit7CisgIHJlZ2lzdGVyIExpc3BfT2JqZWN0IHRlbTsKKyAgQ09MT1JSRUYgdzMyX2NvbG9y X3JlZjsKKyAgdGVtID0gbWNfeF90b193MzJfY29sb3IgKGNvbG9yKTsKKyAgaWYgKCFOSUxQICh0 ZW0pKQorICAgIHsKKyAgICAgIGlmIChmKQorICAgICAgICB7CisgICAgICAgICAgLyogQXBwbHkg Z2FtbWEgY29ycmVjdGlvbi4gKi8KKyAgICAgICAgICB3MzJfY29sb3JfcmVmID0gWFVGSVhOVU1f UkFXICh0ZW0pOworICAgICAgICAgIGdhbW1hX2NvcnJlY3QgKGYsICZ3MzJfY29sb3JfcmVmKTsK KyAgICAgICAgICBYU0VUSU5UICh0ZW0sIHczMl9jb2xvcl9yZWYpOworICAgICAgICB9CisgICAg ICAvKiBNYXAgdGhpcyBjb2xvciB0byB0aGUgcGFsZXR0ZSBpZiBpdCBpcyBlbmFibGVkLiAqLwor ICAgICAgaWYgKCFOSUxQIChWdzMyX2VuYWJsZV9wYWxldHRlKSkKKyAgICAgICAgeworICAgICAg ICAgIHN0cnVjdCB3MzJfcGFsZXR0ZV9lbnRyeSAqIGVudHJ5ID0gb25lX3czMl9kaXNwbGF5X2lu Zm8uY29sb3JfbGlzdDsKKyAgICAgICAgICBzdHJ1Y3QgdzMyX3BhbGV0dGVfZW50cnkgKiogcHJl diA9ICZvbmVfdzMyX2Rpc3BsYXlfaW5mby5jb2xvcl9saXN0OworICAgICAgICAgIC8qIGNoZWNr IGlmIGNvbG9yIGlzIGFscmVhZHkgbWFwcGVkICovCisgICAgICAgICAgd2hpbGUgKGVudHJ5KQor ICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoTUNfVzMyX0NPTE9SIChlbnRyeS0+ZW50 cnkpID09IFhVRklYTlVNX1JBVyAodGVtKSkKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgICAgcHJldiA9ICZlbnRyeS0+bmV4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ICAgIHsKKyAgICAgICAgbHNsLT5yZWQgPSAtMS4w OworICAgICAgICBsc2wtPmdyZWVuID0gLTEuMDsKKyAgICAgICAgbHNsLT5ibHVlID0gLTEuMDsK KyAgICAgIH0KK30KKworLyogRHJhdyBzdHJldGNoIGdseXBoIHN0cmluZyBTLiAqLworc3RhdGlj IHZvaWQKK21jX3czMl9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChzdHJ1Y3QgZ2x5cGhfc3Ry aW5nICpzKQoreworICBlYXNzZXJ0IChzLT5maXJzdF9nbHlwaC0+dHlwZSA9PSBTVFJFVENIX0dM WVBIKTsKKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SCisgICAgICAmJiAheF9zdHJldGNoX2N1 cnNvcl9wKQorICAgIHsKKyAgICAgIC8qIElmIGB4LXN0cmV0Y2gtY3Vyc29yJyBpcyBuaWwsIGRv bid0IGRyYXcgYSBibG9jayBjdXJzb3IgYXMgd2lkZSBhcyB0aGUKKyAgICAgIHN0cmV0Y2ggZ2x5 cGguICovCisgICAgICBpbnQgd2lkdGgsIGJhY2tncm91bmRfd2lkdGggPSBzLT5iYWNrZ3JvdW5k X3dpZHRoOworICAgICAgaW50IHggPSBzLT54OworICAgICAgaWYgKCFzLT5yb3ctPnJldmVyc2Vk X3ApCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgbGVmdF94ID0gd2luZG93X2JveF9sZWZ0X29m ZnNldCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICBpZiAoeCA8IGxlZnRfeCkKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAtPSBsZWZ0X3ggLSB4Owor ICAgICAgICAgICAgICB4ID0gbGVmdF94OworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAg ICAgIGVsc2UKKyAgICAgICAgIHsKKyAgICAgICAgICAgLyogSW4gUjJMIHJvd3MsIGRyYXcgdGhl IGN1cnNvciBvbiB0aGUgcmlnaHQgZWRnZSBvZiB0aGUKKyAgICAgICAgICAgICAgc3RyZXRjaCBn bHlwaC4gKi8KKyAgICAgICAgICAgaW50IHJpZ2h0X3ggPSB3aW5kb3dfYm94X3JpZ2h0IChzLT53 LCBURVhUX0FSRUEpOworICAgICAgICAgICBpZiAoeCArIGJhY2tncm91bmRfd2lkdGggPiByaWdo dF94KQorICAgICAgICAgICAgIGJhY2tncm91bmRfd2lkdGggLT0geCAtIHJpZ2h0X3g7CisgICAg ICAgICAgIHggKz0gYmFja2dyb3VuZF93aWR0aDsKKyAgICAgICAgIH0KKyAgICAgIHdpZHRoID0g bWluIChGUkFNRV9DT0xVTU5fV0lEVEggKHMtPmYpLCBiYWNrZ3JvdW5kX3dpZHRoKTsKKyAgICAg IGlmIChzLT5yb3ctPnJldmVyc2VkX3ApCisgICAgICAgIHggLT0gd2lkdGg7CisgICAgICAvKiBE cmF3IGN1cnNvci4gKi8KKyAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19iZ19yZWN0IChzLCB4 LCBzLT55LCB3aWR0aCwgcy0+aGVpZ2h0KTsKKyAgICAgIC8qIENsZWFyIHJlc3QgdXNpbmcgdGhl IEdDIG9mIHRoZSBvcmlnaW5hbCBub24tY3Vyc29yIGZhY2UuICovCisgICAgICBpZiAod2lkdGgg PCBiYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICB7CisgICAgICAgICAgRW1hY3NfR0MgKmdjID0g cy0+ZmFjZS0+Z2M7CisgICAgICAgICAgaW50IHkgPSBzLT55OworICAgICAgICAgIGludCB3ID0g YmFja2dyb3VuZF93aWR0aCAtIHdpZHRoLCBoID0gcy0+aGVpZ2h0OworICAgICAgICAgIFJFQ1Qg cjsKKyAgICAgICAgICBIREMgaGRjID0gcy0+aGRjOworICAgICAgICAgIGlmICghcy0+cm93LT5y ZXZlcnNlZF9wKQorICAgICAgICAgICAgeCArPSB3aWR0aDsKKyAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgeCA9IHMtPng7CisgICAgICAgICAgaWYgKHMtPnJvdy0+bW91c2VfZmFjZV9w CisgICAgICAgICAgICAgICYmIGN1cnNvcl9pbl9tb3VzZV9mYWNlX3AgKHMtPncpKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICB3MzJfc2V0X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAg ICAgICAgICBnYyA9IHMtPmdjOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICBnYyA9IHMtPmZhY2UtPmdjOworICAgICAgICAgIGdldF9nbHlwaF9zdHJpbmdf Y2xpcF9yZWN0IChzLCAmcik7CisgICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAoaGRj LCAmcik7CisjaWYgMCAvKiBUT0RPOiBzdGlwcGxlICovCisgICAgICAgICAgaWYgKHMtPmZhY2Ut PnN0aXBwbGUpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIEZpbGwgYmFja2dyb3Vu ZCB3aXRoIGEgc3RpcHBsZSBwYXR0ZXJuLiAqLworICAgICAgICAgICAgICBYU2V0RmlsbFN0eWxl IChzLT5kaXNwbGF5LCBnYywgRmlsbE9wYXF1ZVN0aXBwbGVkKTsKKyAgICAgICAgICAgICAgWEZp bGxSZWN0YW5nbGUgKHMtPmRpc3BsYXksIHMtPndpbmRvdywgZ2MsIHgsIHksIHcsIGgpOworICAg ICAgICAgICAgICBYU2V0RmlsbFN0eWxlIChzLT5kaXNwbGF5LCBnYywgRmlsbFNvbGlkKTsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyNlbmRpZgorICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBnYy0+YmFja2dyb3Vu ZCwgeCwgeSwgdywgaCk7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgICBl bHNlIGlmICghcy0+YmFja2dyb3V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BzLT5mYWNlLT5zdGlwcGxlICE9IDA7CisgICAgICB9CisgICAgICBlbHNlIGlmIChzLT5obCA9 PSBEUkFXX0NVUlNPUikKKyAgICAgICAgeworICAgICAgICAgIG1jX3czMl9zZXRfY3Vyc29yX2dj IChzLCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgcy0+c3RpcHBsZWRfcCA9IGZhbHNlOworICAg ICAgICB9CisgICAgICAgIGVsc2UgaWYgKHMtPmhsID09IERSQVdfTU9VU0VfRkFDRSkKKyAgICAg ICAgICB7CisgICAgICAgICAgICB3MzJfc2V0X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAgICAg ICAgcy0+c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUgIT0gMDsKKyAgICAgICAgICB9Cisg ICAgICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19JTUFHRV9SQUlTRUQKKyAgICAgICAgICAg ICAgICAgICB8fCBzLT5obCA9PSBEUkFXX0lNQUdFX1NVTktFTikKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgcy0+Z2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgICAgICAgICAgcy0+c3RpcHBs ZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUgIT0gMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIC8qIEdDIG11c3QgaGF2ZSBi ZWVuIHNldC4gKi8KKyAgZWFzc2VydCAocy0+Z2MgIT0gMCk7Cit9CisKKy8qIERyYXcgYSBob2xs b3cgYm94IGN1cnNvciBvbiB3aW5kb3cgVyBpbiBnbHlwaCByb3cgUk9XLiAqLworc3RhdGljIHZv aWQKK21jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBn bHlwaF9tYXRyaXggKm1hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBn bHlwaF9yb3cgKnJvdywgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgIGludCBocG9zLCBpbnQgdnBvcywgaW50IHdkLCBpbnQgaCkKK3sKKyAg c3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKTsKKyAgSERDIGhkYzsK KyAgUkVDVCByZWN0OworICBIQlJVU0ggaGIgPSBDcmVhdGVTb2xpZEJydXNoIChmLT5vdXRwdXRf ZGF0YS53MzItPmN1cnNvcl9waXhlbCk7CisgIC8qIEdldCB0aGUgZ2x5cGggdGhlIGN1cnNvciBp cyBvbi4gIElmIHdlIGNhbid0IHRlbGwgYmVjYXVzZQorICAgICB0aGUgY3VycmVudCBtYXRyaXgg aXMgaW52YWxpZCBvciBzdWNoLCBnaXZlIHVwLiAqLworICBzdHJ1Y3QgZ2x5cGggKmN1cnNvcl9n bHlwaCA9IG1jX2dldF9jdXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93LCBocG9zLCB2cG9zKTsK KyAgaWYgKGN1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgIHsKKyAgICAgIERlbGV0ZU9iamVjdCAo aGIpOworICAgICAgcmV0dXJuOworICAgIH0KKyAgaW50IHJsID0gZng7CisgIGludCBydCA9IGZ5 OworICBpbnQgcnIgPSBybCArIHdkOworICBpbnQgcmIgPSBydCArIGg7CisgIC8vICBmcHJpbnRm IChzdGRlcnIsICJNQ19IT0xMT1dfQk9YOiAgcmwgKCVkKSB8IHJ0ICglZCkgfCByciAoJWQpIHwg cmIgKCVkKVxuIiwKKyAgLy8gICAgICAgICAgICAgICAgICAgcmwsIHJ0LCByciwgcmIpOworICBy ZWN0LmxlZnQgPSBybDsKKyAgcmVjdC50b3AgPSBydDsKKyAgcmVjdC5yaWdodCA9IHJyOworICBy ZWN0LmJvdHRvbSA9IHJiOworICBoZGMgPSBnZXRfZnJh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ZhY2UgKmZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGN1cnNvcl9nbHlwaC0+ ZmFjZV9pZCk7CisgICAgICAgIEhEQyBoZGM7CisgICAgICAgIC8qIElmIHRoZSBnbHlwaCdzIGJh Y2tncm91bmQgZXF1YWxzIHRoZSBjb2xvciB3ZSBub3JtYWxseSBkcmF3CisgICAgICAgIHRoZSBi YXIgY3Vyc29yIGluLCB0aGUgYmFyIGN1cnNvciBpbiBpdHMgbm9ybWFsIGNvbG9yIGlzCisgICAg ICAgIGludmlzaWJsZS4gIFVzZSB0aGUgZ2x5cGgncyBmb3JlZ3JvdW5kIGNvbG9yIGluc3RlYWQg aW4gdGhpcworICAgICAgICBjYXNlLCBvbiB0aGUgYXNzdW1wdGlvbiB0aGF0IHRoZSBnbHlwaCdz IGNvbG9ycyBhcmUgY2hvc2VuIHNvCisgICAgICAgIHRoYXQgdGhlIGdseXBoIGlzIGxlZ2libGUu ICovCisgICAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGN1cnNvcl9jb2xvcgorICAgICAg ICAgICAgJiYgIWN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKQorICAgICAgICAgIGN1cnNvcl9j b2xvciA9IGZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgIGludCBkZWZhdWx0X2Z4ID0gV0lORE9X X1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7CisgICAgICAgIGhkYyA9IGdldF9mcmFtZV9k YyAoZik7CisgICAgICAgIHczMl9jbGlwX3RvX3JvdyAodywgcm93LCBURVhUX0FSRUEsIGhkYyk7 CisgICAgICAgIGludCByeCA9IGZ4OworICAgICAgICBpbnQgcnkgPSBmeTsKKyAgICAgICAgaW50 IHJ3ID0gd2Q7CisgICAgICAgIGludCByaCA9IGg7CisgICAgICAgIC8vICBmcHJpbnRmIChzdGRl cnIsICJNQ19IQkFSOiAgZnggKCVkKSB8IGZ5ICglZCkgfCB3ZCAoJWQpIHwgaCAoJWQpX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Ki8KKyAgICAgIGlmIChhY3RpdmVfcCkKKyAgICAgICAg eworICAgICAgICAgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE9XX0ZSQU1FICh3KSk7 CisgICAgICAgICAgSFdORCBod25kID0gRlJBTUVfVzMyX1dJTkRPVyAoZik7CisgICAgICAgICAg dzMyX3N5c3RlbV9jYXJldF94CisgICAgICAgICAgICA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJ WEVMX1ggKHcsIHgpOworICAgICAgICAgIC8qIEZJWE1FOiAgV2hhdCBzaG91bGQgd2UgdXNlIGlu c3RlYWQgb2YgYHctPnBoeXNfY3Vyc29yX2FzY2VudCc/ICovCisgICAgICAgICAgdzMyX3N5c3Rl bV9jYXJldF95CisgICAgICAgICAgICA9IChXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgeSkK KyAgICAgICAgICAgICAgICsgcm93LT5hc2NlbnQgLSB3LT5waHlzX2N1cnNvcl9hc2NlbnQpOwor ICAgICAgICAgIHczMl9zeXN0ZW1fY2FyZXRfd2luZG93ID0gdzsKKyAgICAgICAgICB3MzJfc3lz dGVtX2NhcmV0X2hkcl9oZWlnaHQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAg ICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X21vZGVfaGVpZ2h0ID0gV0lORE9XX01PREVfTElORV9I RUlHSFQgKHcpOworICAgICAgICAgIFBvc3RNZXNzYWdlIChod25kLCBXTV9JTUVfU1RBUlRDT01Q T1NJVElPTiwgMCwgMCk7CisgICAgICAgICAgLyogSWYgdGhlIHNpemUgb2YgdGhlIGFjdGl2ZSBj dXJzb3IgY2hhbmdlZCwgZGVzdHJveSB0aGUgb2xkCisgICAgICAgICAgICAgc3lzdGVtIGNhcmV0 LiAqLworICAgICAgICAgIGlmICh3MzJfc3lzdGVtX2NhcmV0X2h3bmQKKyAgICAgICAgICAgICAg JiYgKHczMl9zeXN0ZW1fY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dWUpOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNl ID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAg ICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdy b3VuZDsKKyAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3df YWN0aXZlX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBs b29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0 aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBm YWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2luYWN0 aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5k ID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfaW5hY3RpdmVfZmFjZS0+YmFja2dyb3Vu ZDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+ Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBGUkFNRV9XMzJfV0lORE9XIChmKSw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ZSA+PSAwKQorICAgICAgICAgIHsKKyAgICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwn LiAqLworICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xv cl9waXhlbDsKKyAgICAgICAgICAgIG1jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJp eCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICAgIGYt Pm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOwor ICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnIGJ5 IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICAgICAgZnVuY3Rpb25hbGl0eSBvZiBgeF9tYWtlX2dj JyBpbiB3MzJmbnMuYy4gKi8KKyAgICAgICAgICAgICAgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAg ICAgICAgICAgICAgICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9n bHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fYmVnKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCA9 IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQt cmVnaW9uLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZh Y2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xs b3dfYWN0aXZlX3JlZ2lvbl9iZWdfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBlbnVtIGZh Y2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAg ICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQg KGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBnY192YWx1ZXMu Zm9yZWdyb3VuZCA9IGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAg ICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fYmVnX2Zh Y2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2Ug aWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID09IHJl Z2lvbl9lbmQpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGVudW0g ZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9m YWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItYXQtcmVnaW9uLXByZS16di1m YWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2Fj dGl2ZV9yZWdpb25fZW5kX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVn aW9uX2VuZF9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxv d19hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJl YWwtZmFrZS1jdXJzb3ItcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxv d19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3Jv dW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAg ICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlLT5i YWNrZ3JvdW5kOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBp ZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID4g cmVnaW9uX2JlZworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5j aGFycG9zIDwgcmVnaW9uX2VuZCkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2Vf aWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywg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gICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7 CisgICAgICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19h Y3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0 aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZh a2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfaW5hY3RpdmVfZmFjZS0+Zm9yZWdyb3Vu ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xs b3dfaW5hY3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MgPSBYQ3JlYXRlR0Mg KE5VTEwsIEZSQU1FX1czMl9XSU5ET1cgKGYpLCBtYXNrLCAmZ2NfdmFsdWVzKTsKKyAgICAgICAg ICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIC8qIEZvcmNlIGBtY193MzJfc2V0 X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycuICov CisgICAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3AgPSB0cnVlOworICAgICAgICAgICAgICBt Y19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9z LCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlwaF9m bGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAgICAg ICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MgPSBvcmlnaW5hbF9jdXJzb3JfZ2M7 CisgICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIG1jX3czMl9k cmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZw b3MsIHdkLCBoKTsKKyAgICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNl IE1DX0hPTExPV19CT1g6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3Jl ZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9y YXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICovCisgICAg ICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4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3JlYXRlR0MgKE5VTEwsIEZSQU1FX1czMl9XSU5ET1cgKGYpLCBtYXNrLCAmZ2NfdmFsdWVz KTsKKyAgICAgICAgICAvKiBGb3JjZSBgbWNfdzMyX3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+ Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgIGJvb2wgY3Vyc29y X2djX3AgPSB0cnVlOworICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgs IHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsIGxzbCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBj dXJzb3JfZ2NfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MgPSBv cmlnaW5hbF9jdXJzb3JfZ2M7CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAg fQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2Nf cCA9IGZhbHNlOworICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwg cm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfZ2NfcCk7CisgICAgICAg ICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfQkFSOgorICAgIHsKKyAgICAg IGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAg ICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEu dzMyLT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNp YmxlX29rYXlfcCA9IHRydWU7CisgICAgICAgICAgbWNfdzMyX2RyYXdfYmFyX2N1cnNvciAodywg bWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19p bnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9w aXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisg ICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9 IGZhbHNlOworICAgICAgICAgICAgbWNfdzMyX2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCBy b3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1DX0JBUiwgY3Vyc29yX2djX2ludmlzaWJs ZV9va2F5X3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1D X0hCQVI6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAm JiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlq YWNrIGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICovCisgICAgICAgICAgZi0+ b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICBi b29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY193MzJf ZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9z LCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgs IE1DX0hCQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICBmLT5vdXRw dXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3Jf Z2NfaW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfdzMyX2RyYXdfYmFy X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1DX0hC QVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICB9CisgICAgICBicmVh azsKKyAgICB9CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0ICgpOworICB9CisgICAg fQorfQorCisvKiBEcmF3IGdseXBoIHN0cmluZyBTLiAgVGhlIGBtY19tYXRyaXhgIGlzIHJlc2Vy dmVkIGZvciBmdXR1cmUgdXNlIHdoZW4gZXJhc2luZworICAgZmFrZSBjdXJzb3JzIGR1cmluZyBg bWNfdXBkYXRlX3dpbmRvd19lcmFzZScgYW5kIHJlZHJhd2luZyBmYWtlIGN1cnNvcnMgb24KKyAg IGxlZnQvcmlnaHQgb3ZlcndyaXR0ZW4gZ2x5cGhzLiAqLworc3RhdGljIHZvaWQKK21jX3czMl9k cmF3X2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21h dHJpeCAqbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csIHN0cnVjdCBtY19tYXRyaXggbWNfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAg ICAgICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAg ICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlLCBp bnQgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9w LCBib29sIGN1cnNvcl9nY19wKQoreworICBib29sIHJlbGllZl9kcmF3bl9wID0gMDsKKyAgLyog SWYgUyBkcmF3cyBpbnRvIHRoZSBiYWNrZ3JvdW5kIG9mIGl0cyBzdWNjZXNzb3IsIGRyYXcgdGhl CisgICAgIGJhY2tncm91bmQgb2YgdGhlIHN1Y2Nlc3NvciBmaXJzdCBzbyB0aGF0IFMgY2FuIGRy YXcgaW50byBpdC4KKyAgICAgVGhpcyBtYWtlcyBTLT5uZXh0IHVzZSBYRHJhd1N0cmluZyBpbnN0 ZWFkIG9mIFhEcmF3SW1hZ2VTdHJpbmcuICovCisgIGlmIChzLT5uZXh0ICYmIHMtPnJpZ2h0X292 ZXJoYW5nICYmICFzLT5mb3Jfb3ZlcmxhcHMpCisgICAgeworICAgICAgaW50IHdpZHRoOworICAg ICAgc3RydWN0IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgIGZvciAod2lkdGggPSAwLCBuZXh0 ID0gcy0+bmV4dDsKKyAgICAgICAgICAgbmV4dCAmJiB3aWR0aCA8IHMtPnJpZ2h0X292ZXJoYW5n OworICAgICAgICAgICB3aWR0aCArPSBuZXh0LT53aWR0aCwgbmV4dCA9IG5leHQtPm5leHQpCisg ICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBtY193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAobmV4dCwgY3Vy c29yX2djX3ApOworICAgICAgICAgICAgdzMyX3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmcgKG5l eHQpOworICAgICAgICAgICAgaWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBlID09IFNUUkVUQ0hf R0xZUEgpCisgICAgICAgICAgICAgIG1jX3czMl9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChu ZXh0KTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBo X3N0cmluZ19iYWNrZ3JvdW5kIChuZXh0LCB0cnVlKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9j bGlwcyA9IDA7CisgICAgICAgICAgfQorICAgIH0KKyAgLyogU2V0IHVwIFMtPmdjLCBzZXQgY2xp cHBpbmcgYW5kIGRyYXcgUy4gKi8KKyAgbWNfdzMyX3NldF9nbHlwaF9zdHJpbmdfZ2MgKHMsIGN1 cnNvcl9nY19wKTsKKyAgLyogRHJhdyByZWxpZWYgKGlmIGFueSkgaW4gYWR2YW5jZSBmb3IgY2hh ci9jb21wb3NpdGlvbiBzbyB0aGF0IHRoZQorICAgICBnbHlwaCBzdHJpbmcgY2FuIGJlIGRyYXdu IG92ZXIgaXQuICovCisgIGlmICghcy0+Zm9yX292ZXJsYXBzCisgICAgICAmJiBzLT5mYWNlLT5i b3ggIT0gRkFD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ZWRfcCA9IHRydWU7CisgICAgICBlbHNlCisgICAgICAgIHczMl9kcmF3X2dseXBo X3N0cmluZ19iYWNrZ3JvdW5kIChzLCBmYWxzZSk7CisgICAgICB3MzJfZHJhd19nbHlwaGxlc3Nf Z2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoK KyAgICAgIGVtYWNzX2Fib3J0ICgpOworICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMpCisg ICAgeworICAgICAgLyogRHJhdyB1bmRlcmxpbmUuICovCisgICAgICBpZiAocy0+ZmFjZS0+dW5k ZXJsaW5lX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5 cGUgPT0gRkFDRV9VTkRFUl9XQVZFKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBDT0xP UlJFRiBjb2xvcjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0 ZWRfcCkKKyAgICAgICAgICAgICAgICBjb2xvciA9IHMtPmdjLT5mb3JlZ3JvdW5kOworICAgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGNvbG9yID0gcy0+ZmFjZS0+dW5kZXJs aW5lX2NvbG9yOworICAgICAgICAgICAgICB3MzJfZHJhd191bmRlcndhdmUgKHMsIGNvbG9yKTsK KyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlw ZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHVuc2ln bmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaW50IHk7CisgICAg ICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV9wCisgICAg ICAgICAgICAgICAgICAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VO REVSX0xJTkUpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogV2UgdXNl IHRoZSBzYW1lIHVuZGVybGluZSBzdHlsZSBhcyB0aGUgcHJldmlvdXMgb25lLiAqLworICAgICAg ICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+cHJldi0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAg ICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHRoaWNrbmVzcy4gIERlZmF1 bHQgaXMgMSBwaXhlbC4gKi8KKyAgICAgICAgICAgICAgICAgIGlmIChzLT5mb250ICYmIHMtPmZv bnQtPnVuZGVybGluZV90aGlja25lc3MgPiAwKQorICAgICAgICAgICAgICAgICAgICB0aGlja25l c3MgPSBzLT5mb250LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gMTsKKyAgICAgICAgICAgICAg ICAgIGlmICh4X3VuZGVybGluZV9hdF9kZXNjZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAg IHBvc2l0aW9uID0gKHMtPmhlaWdodCAtIHRoaWNrbmVzcykgLSAocy0+eWJhc2UgLSBzLT55KTsK KyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHBvc2l0aW9uLiAgVGhpcyBp cyB0aGUgcmVjb21tZW5kZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRpY2FsIG9m ZnNldCBpbiBwaXhlbHMgZnJvbSB0aGUgYmFzZWxpbmUgdG8gdGhlIHRvcCBvZgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgdGhlIHVuZGVybGluZS4gIFRoaXMgaXMgYSBzaWduZWQgdmFsdWUg YWNjb3JkaW5nIHRvIHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY3MsIGFuZCBp dHMgZGVmYXVsdCBpcworICAgICAgICAgICAgICAgICAgICAgICAgICAgUk9VTkQgKChtYXhpbXVt X2Rlc2NlbnQpIC8gMiksIHdpdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EICh4 KSA9IGZsb29yICh4ICsgMC41KSAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICh4X3Vz ZV91bmRlcmxpbmVfcG9zaXRpb25fcHJvcGVydGllcworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAg ICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0 aW9uOworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocy0+Zm9udCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+Zm9udC0+ZGVzY2VudCArIDEpIC8gMjsK KyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IG1h eCAocG9zaXRpb24sIHVuZGVybGluZV9taW5pbXVtX29mZnNldCk7CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAvKiBDaGVjayB0aGUgc2FuaXR5IG9mIHRoaWNrbmVzcyBhbmQgcG9z aXRpb24uICBXZSBzaG91bGQKKyAgICAgICAgICAgICAgICAgYXZvaWQgZHJhd2luZyB1bmRlcmxp bmUgb3V0IG9mIHRoZSBjdXJyZW50IGxpbmUgYXJlYS4gKi8KKyAgICAgICAgICAgICAgaWYgKHMt PnkgKyBzLT5oZWlnaHQgPD0gcy0+eWJhc2UgKyBwb3NpdGlvbikKKyAgICAgICAgICAgICAgICBw b3NpdGlvbiA9IChzLT5oZWlnaHQgLSAxKSAtIChzLT55YmFzZSAtIHMtPnkpOworICAgICAgICAg ICAgICBpZiAocy0+eSArIHMtPmhlaWdodCA8IHMtPnliYXNlICsgcG9zaXRpb24gKyB0aGlja25l c3MpCisgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gKHMtPnkgKyBzLT5oZWlnaHQpIC0gKHMt PnliYXNlICsgcG9zaXRpb24pOworICAgICAgICAgICAgICBzLT51bmRlcmxpbmVfdGhpY2tuZXNz ID0gdGhpY2tuZXNzOworICAgICAgICAgICAgICBzLT51bmRlcmxpbmVfcG9zaXRpb24gPXBvc2l0 aW9uOworICAgICAgICAgICAgICB5ID0gcy0+eWJhc2UgKyBwb3NpdGlvbjsKKyAgICAgICAgICAg ICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICB3 MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmdjLT5mb3JlZ3JvdW5kLCBzLT54LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHksIHMtPndpZHRoLCAxKTsKKyAgICAgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMs IHMtPmZhY2UtPnVuZGVybGluZV9jb2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHksIHMtPndpZHRoLCAxKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg ICAgLyogRHJhdyBvdmVybGluZS4gKi8KKyAgICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9wKQor ICAgICAgICB7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBkeSA9IDAsIGggPSAxOworICAgICAg ICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAg IHczMl9maWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+Z2MtPmZvcmVncm91bmQsIHMtPngsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBz LT5mYWNlLT5vdmVybGluZV9jb2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgcy0+eSArIGR5LCBzLT53aWR0aCwgaCk7CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgc3Ry aWtlLXRocm91Z2guICovCisgICAgICBpZiAocy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfcAorICAg ICAgICAgICYmICFGT05UX1RFWFRNRVRSSUMgKHMtPmZvbnQpLnRtU3RydWNrT3V0KQorICAgICAg ICB7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBoID0gMTsKKyAgICAgICAgICB1bnNpZ25lZCBs b25nIGR5ID0gKHMtPmhlaWdodCAtIGgpIC8gMjsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3Ry aWtlX3Rocm91Z2hfY29sb3JfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVh IChzLT5mLCBzLT5oZGMsIHMtPmdjLT5mb3JlZ3JvdW5kLCBzLT54LCBzLT55ICsgZHksCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBzLT53aWR0aCwgaCk7CisgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+c3RyaWtl X3Rocm91Z2hfY29sb3IsIHMtPngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnkg KyBkeSwgcy0+d2lkdGgsIGgpOworICAgICAgICB9CisgICAgICAvKiBEcmF3IHJlbGllZiBpZiBu b3QgeWV0IGRyYXduLiAqLworICAgICAgaWYgKCFyZWxpZWZfZHJhd25fcCAmJiBzLT5mYWNlLT5i b3ggIT0gRkFDRV9OT19CT1gpCisgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19ib3ggKHMp OworICAgICAgaWYgKHMtPnByZXYpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhf c3RyaW5nICpwcmV2OworICAgICAgICAgIGZvciAocHJldiA9IHMtPnByZXY7IHByZXY7IHByZXYg PSBwcmV2LT5wcmV2KQorICAgICAgICAgICAgaWYgKHByZXYtPmhsICE9IHMtPmhsCisgICAgICAg ICAgICAgICAgJiYgcHJldi0+eCArIHByZXYtPndpZHRoICsgcHJldi0+cmlnaHRfb3Zlcmhhbmcg PiBzLT54KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogQXMgcHJldiB3YXMg ZHJhd24gd2hpbGUgY2xpcHBlZCB0byBpdHMgb3duIGFyZWEsIHdlCisgICAgICAgICAgICAgICAg ICAgbXVzdCBkcmF3IHRoZSByaWdodF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8K KyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IHByZXYtPmhsOwor ICAgICAgICAgICAgICAgIHByZXYtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfdzMy X3NldF9nbHlwaF9zdHJpbmdfZ2MgKHByZXYsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgICAg ICB3MzJfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19leGFjdGx5IChzLCBwcmV2KTsKKyAgICAg ICAgICAgICAgICBpZiAocHJldi0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSCkKKyAg ICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsK KyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgdzMyX2RyYXdfY29t cG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICB3 MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChwcmV2LT5oZGMsIE5VTEwpOworICAgICAgICAgICAgICAg IHByZXYtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAgICBwcmV2LT5udW1fY2xpcHMgPSAwOwor ICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmIChzLT5uZXh0KQorICAgICAgICB7 CisgICAgICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgICAgICBmb3IgKG5l eHQgPSBzLT5uZXh0OyBuZXh0OyBuZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAgICAgIGlmIChu ZXh0LT5obCAhPSBzLT5obAorICAgICAgICAgICAgICAgICYmIG5leHQtPnggLSBuZXh0LT5sZWZ0 X292ZXJoYW5nIDwgcy0+eCArIHMtPndpZHRoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgLyogQXMgbmV4dCB3aWxsIGJlIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBh cmVhLAorICAgICAgICAgICAgICAgICAgIHdlIG11c3QgZHJhdyB0aGUgbGVmdF9vdmVyaGFuZyBw YXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhz X2ZhY2Ugc2F2ZSA9IG5leHQtPmhsOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gcy0+aGw7 CisgICAgICAgICAgICAgICAgbWNfdzMyX3NldF9nbHlwaF9zdHJpbmdfZ2MgKG5leHQsIGN1cnNv cl9nY19wKTsKKyAgICAgICAgICAgICAgICB3MzJfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19l eGFjdGx5IChzLCBuZXh0KTsKKyAgICAgICAgICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5cGgt PnR5cGUgPT0gQ0hBUl9HTFlQSCkKKyAgICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0 cmluZ19mb3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgICAgICAgICAgdzMyX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChu ZXh0KTsKKyAgICAgICAgICAgICAgICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChuZXh0LT5oZGMs IE5VTEwpOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAg ICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgICAgICAgIG5leHQtPmNsaXBfaGVhZCA9 IHMtPm5leHQ7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLyogUmVzZXQg Y2xpcHBpbmcuICovCisgIHczMl9zZXRfY2xpcF9yZWN0YW5nbGUgKHMtPmhkYywgTlVMTCk7Cisg IHMtPm51bV9jbGlwcyA9IDA7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBGcmluZ2UgYml0bWFwcy4gICovCiAKIHN0YXRp YyBpbnQgbWF4X2ZyaW5nZV9ibXAgPSAwOwpAQCAtNTQyLDYgKzE3MDQsMTUgQEAgdzMyX3VwZGF0 ZV9iZWdpbiAoc3RydWN0IGZyYW1lICpmKQogICBpZiAoISBGUkFNRV9XMzJfUCAoZikpCiAgICAg cmV0dXJuOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAvKiBSZWdlbmVyYXRlIGRpc3BsYXkgcGFsZXR0ZSBiZWZvcmUgZHJhd2lu ZyBpZiBsaXN0IG9mIHJlcXVlc3RlZAogICAgICBjb2xvcnMgaGFzIGNoYW5nZWQuICovCiAgIGlm IChkaXNwbGF5X2luZm8tPnJlZ2VuX3BhbGV0dGUpCkBAIC02NzQsNiArMTg0NSwxNiBAQCB3MzJf dXBkYXRlX2VuZCAoc3RydWN0IGZyYW1lICpmKQogCiAgIC8qIE1vdXNlIGhpZ2hsaWdodCBtYXkg YmUgZGlzcGxheWVkIGFnYWluLiAgKi8KICAgTU9VU0VfSExfSU5GTyAoZiktPm1vdXNlX2ZhY2Vf ZGVmZXIgPSBmYWxzZTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC00MDAyLDEzICs1MTgzLDc0IEBAIHczMl9z ZXRfdmVydGljYWxfc2Nyb2xsX2JhciAoc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vdmVyIGNoaWxk IGZyYW1lcy4gICovCi0JICBTZXRXaW5kb3dQb3MgKGh3bmQsIEhXTkRfQk9UVE9NLCBsZWZ0LCB0 b3AsIHdpZHRoLCBtYXggKGhlaWdodCwgMSksCi0gICAgICAgICAgICAgICAgICAgICAgICBTV1Bf RlJBTUVDSEFOR0VEKTsKKyAgICAgICAgICBpZiAobGVmdCA8PSBiYXItPmxlZnQpCisgICAgICAg ICAgICBteV9zaG93X3dpbmRvdyAoZiwgaHduZCwgU1dfSElERSk7CisgICAgICAgICAgTW92ZVdp bmRvdyAoaHduZCwgbGVmdCwgdG9wLCB3aWR0aCwgbWF4IChoZWlnaHQsIDEpLCBsZWZ0IDw9IGJh ci0+bGVmdCk7CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKwogCiAJICBzaS5jYlNpemUgPSBzaXplb2YgKHNpKTsKIAkgIHNpLmZNYXNrID0g U0lGX1JBTkdFOwpAQCAtNDI3Nyw2ICs1NTE5LDIxIEBAIHczMl9qdWRnZV9zY3JvbGxfYmFycyAo c3RydWN0IGZyYW1lICpmKQogICAgIHsKICAgICAgIHN0cnVjdCBzY3JvbGxfYmFyICpiID0gWFND Uk9MTF9CQVIgKGJhcik7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RS1DVVJTT1JTICovCisKKyAgICAgIC8qIGBEZXN0cm95V2luZG93JyB3aXRoaW4gYHhfc2Nyb2xs X2Jhcl9yZW1vdmUnIHJlcGFpbnRzIHRoZSByZWN0YW5nbGUuCisgICAgICBUaGVyZWZvcmUsIHdl IGZpcnN0IHNlbmQgYSBtZXNzYWdlIHRvIGluaGliaXQgcmVwYWludGluZy4gKi8KKyAgICAgIGlm ICghV0lORE9XX0xJVkVfUCAoYi0+d2luZG93KSkKKyAgICAgICAgeworICAgICAgICAgIEhXTkQg aHduZCA9IFNDUk9MTF9CQVJfVzMyX1dJTkRPVyAoYik7CisgICAgICAgICAgU2VuZE1lc3NhZ2Ug KGh3bmQsIFdNX1NFVFJFRFJBVywgZmFsc2UsIDApOworICAgICAgICB9CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgICAgIHczMl9zY3JvbGxfYmFyX3JlbW92ZSAoYik7CiAKICAg ICAgIG5leHQgPSBiLT5uZXh0OwpAQCAtNzA4OCw2ICs4MzQ1LDIwIEBAIGV4dGVybiBmcmFtZV9w YXJtX2hhbmRsZXIgdzMyX2ZyYW1lX3Bhcm1faGFuZGxlcnNbXTsKIAogc3RhdGljIHN0cnVjdCBy ZWRpc3BsYXlfaW50ZXJmYWNlIHczMl9yZWRpc3BsYXlfaW50ZXJmYWNlID0KIHsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogYHJlZGlz cGxheV9pbnRlcmZhY2UnIGluIGB3MzJ0ZXJtLmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUg b3JkZXIgYXMgdGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICov CisKKyAgbWNfdzMyX2RyYXdfd2luZG93X2N1cnNvciwKKyAgbWNfdzMyX2RyYXdfZ2x5cGhfc3Ry aW5nLAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHczMl9mcmFtZV9wYXJtX2hh bmRsZXJzLAogICBndWlfcHJvZHVjZV9nbHlwaHMsCiAgIGd1aV93cml0ZV9nbHlwaHMsCmRpZmYg LS1naXQgYS9zcmMvd2luZG93LmggYi9zcmMvd2luZG93LmgKaW5kZXggNmIwZjBlNS4uMTRkZDM4 YSAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5oCisrKyBiL3NyYy93aW5kb3cuaApAQCAtMzI0LDYg KzMyNCwxNDcgQEAgc3RydWN0IHdpbmRvdwogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICov CisKKy8qIFN1ZmZpeGVzIGZvciB0aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBwcmVmaXguICovCitz dHJ1Y3QgbXVsdGlwbGVfY3Vyc29ycworeworICAvKiBUaGUgcmVjb3JkZWQgcGl4ZWwgd2lkdGgg b2YgdGhlIGxhc3QgbGluZSBudW1iZXIgZHJhd24gZHVyaW5nIHJlZGlzcGxheSAqLworICBpbnQg bG51bV9waXhlbF93aWR0aDsKK30gbWM7CisKK3N0cnVjdCBtY19tYXRyaXgKK3sKKyAgcHRyZGlm Zl90IHZwb3NfYWxsb2NhdGVkOworICBwdHJkaWZmX3QgdnBvc191c2VkOworICBwdHJkaWZmX3Qg Y3Vyc29yc191c2VkWzRdOworICBlbnVtIG1jX2NhY2hlX3R5cGUKKyAgeworICAgIE1DX0NBQ0hF LAorICAgIENIX0NBQ0hFLAorICAgIEZDX0NBQ0hFLAorICAgIE5PX0NBQ0hFCisgIH0gY2FjaGVf dHlwZTsKKyAgc3RydWN0IG1jX3Zwb3MKKyAgeworICAgIHB0cmRpZmZfdCBjYWNoZV9hbGxvY2F0 ZWRbNF07CisgICAgcHRyZGlmZl90IGNhY2hlX3VzZWRbNF07CisgICAgc3RydWN0IG1jX2NvbnRl bnRzCisgICAgeworICAgICAgYm9vbF9iZiBzYW1lX3AgOiAxOworICAgICAgc3RydWN0IGdseXBo IGdseXBoOworICAgICAgaW50IHg7CisgICAgICBpbnQgZng7CisgICAgICBpbnQgeTsKKyAgICAg IGludCBmeTsKKyAgICAgIGludCBocG9zOworICAgICAgaW50IHZwb3M7CisgICAgICBpbnQgd2Q7 CisgICAgICBpbnQgaDsKKyAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUKKyAgICAgIHsKKyAgICAg ICAgLyogTk9URTogIFRoZSBmcmluZ2UgYml0bWFwIGZyYW1ld29yayByZWxpZXMgdXBvbiBNQ19O T19GUklOR0VfQklUTUFQCisgICAgICAgIGhhdmluZyBhIHZhbHVlIG9mIHplcm8gKDApLiAqLwor ICAgICAgICBNQ19OT19GUklOR0VfQklUTUFQLAorICAgICAgICBNQ19OT19DVVJTT1IsCisgICAg ICAgIE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAsCisgICAgICAgIE1DX0xFRlRfRlJJTkdFX0JJVE1B UCwKKyAgICAgICAgTUNfRlJBTUVEX0JPWCwKKyAgICAgICAgTUNfRklMTEVEX0JPWCwKKyAgICAg ICAgTUNfSE9MTE9XX0JPWCwKKyAgICAgICAgTUNfQkFSLAorICAgICAgICBNQ19IQkFSCisgICAg ICB9IGN1cnNvcl90eXBlOworICAgICAgaW50IGN1cnNvcl93aWR0aDsKKyAgICAgIHN0cnVjdCBt Y19SR0IKKyAgICAgIHsKKyAgICAgICAgZG91YmxlIHJlZDsKKyAgICAgICAgZG91YmxlIGdyZWVu OworICAgICAgICBkb3VibGUgYmx1ZTsKKyAgICAgIH0gZmcsIGJnOworICAgICAgYm9vbF9iZiBh Y3RpdmVfcCA6IDE7CisgICAgICBlbnVtIG1jX2ZsYXZvcgorICAgICAgeworICAgICAgICBOT19G TEFWT1IsCisgICAgICAgIE1DX0dMWVBILAorICAgICAgICBNQ19HTFlQSExFU1MsCisgICAgICAg IE1DX09WRVJMQVlfQVJST1dfQklUTUFQLAorICAgICAgICBNQ19QSUxDUk9XLAorICAgICAgICBN Q19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XLAorICAgICAgICBNQ19SRVZFUlNFRF9IT0xM T1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XLAorICAgICAgICBNQ19IT0xMT1dfUkVDVEFOR0xFLAor ICAgICAgICBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgICAgICAgIE1DX1JFVkVSU0VE X1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVywKKyAgICAgICAgTUNfVkVSVElDQUxfQkFSLAorICAg ICAgICBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIsCisgICAgICAgIE1DX1ZFUlRJQ0FMX0JBUl9C QUNLU0xBU0gKKyAgICAgIH0gZ2x5cGhfZmxhdm9yOworICAgICAgZW51bSBtY19yb3dfcG9zaXRp b24KKyAgICAgIHsKKyAgICAgICAgUFJFX1pWLAorICAgICAgICBBVF9aViwKKyAgICAgICAgUE9T VF9aVgorICAgICAgfSByb3dfcG9zaXRpb247CisgICAgICBib29sX2JmIGVuYWJsZWRfcCA6IDE7 CisgICAgfSAqY2FjaGVbNF07CisgIH0gKnZwb3M7CisgIC8qIFVzZWQgZWxzZXdoZXJlLiAqLwor ICBzdHJ1Y3QgbWNfZXNzZW50aWFscworICB7CisgICAgYm9vbF9iZiBhY3RpdmVfcCA6IDE7Cisg ICAgc3RydWN0IG1jX1JHQiBjaF9mZ1szXSwgZmNfZmdbM10sIHNwX2ZnOworICAgIGludCBmY194 OworICAgIGludCB6djsKKyAgICBpbnQgenZfYnl0ZTsKKyAgfSBlc3NlbnRpYWxzOworICAvKiBV c2VkIGVsc2V3aGVyZS4gKi8KKyAgZW51bSBtY19lbmdpbmVfdHlwZQorICB7CisgICAgTVVMVElQ TEVfQ1VSU09SUywKKyAgICBIT1JJWk9OVEFMX1JVTEVSLAorICAgIFZFUlRJQ0FM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R1cm4gdmFs OworfQorCitMaXNwX09iamVjdAorbWNfbWVtcSAoTGlzcF9PYmplY3QgZWx0LCBMaXNwX09iamVj dCBsaXN0KQoreworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KSB8 fCBFUSAoWENBUiAobGlzdCksIGVsdCkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhD RFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAobGlzdCkgfHwgRVEgKFhDQVIgKGxpc3QpLCBl bHQpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlm ICghQ09OU1AgKGxpc3QpIHx8IEVRIChYQ0FSIChsaXN0KSwgZWx0KSkKKyAgICAgICAgYnJlYWs7 CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgfQorICByZXR1cm4gbGlzdDsKK30KKwor TGlzcF9PYmplY3QKK21jX250aCAoaW50IG51bSwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgZm9y IChpbnQgaSA9IDA7IGkgPCBudW0gJiYgIU5JTFAgKGxpc3QpOyBpKyspCisgICAgbGlzdCA9IFhD RFIgKGxpc3QpOworICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FSIChsaXN0KTsK KyAgICBlbHNlCisgICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QKK21jX2Fzc3Eg KExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgd2hpbGUgKDEpCisgICAg eworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1AgKFhDQVIgKGxp c3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBrZXkpKSkKKyAg ICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQ IChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAg ICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVhazsKKyAgICAg IGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAg fHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhDQVIgKFhDQVIg KGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3Qp OworICAgIH0KKyAgaWYgKENPTlNQIChsaXN0KSkKKyAgICByZXR1cm4gWENBUiAobGlzdCk7Cisg ICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK0xpc3BfT2JqZWN0CittY19hc3NvYyAo TGlzcF9PYmplY3Qga2V5LCBMaXNwX09iamVjdCBsaXN0KQoreworICBMaXNwX09iamVjdCBjYXI7 CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAg fHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhD QVIgKGxpc3QpKSwKKyAgICAgICAgICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZl cXVhbCAoY2FyLCBrZXkpKSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChs aXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENPTlNQIChYQ0FS IChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhDQVIgKGxpc3QpKSwKKyAg ICAgICAgICAgICAgICAgIEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZlcXVhbCAoY2FyLCBrZXkp KSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlm ICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAg ICAgICAgICAgJiYgKGNhciA9IFhDQVIgKFhDQVIgKGxpc3QpKSwKKyAgICAgICAgICAgICAgICAg IEVRIChjYXIsIGtleSkgfHwgIU5JTFAgKEZlcXVhbCAoY2FyLCBrZXkpKSkpKQorICAgICAgICBi cmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICB9CisgIGlmIChDT05TUCAobGlz dCkpCisgICAgcmV0dXJuIFhDQVIgKGxpc3QpOworICAgIGVsc2UKKyAgICAgIHJldHVybiBRbmls OworfQorCitMaXNwX09iamVjdAorbWNfcGxpc3RfZ2V0IChMaXNwX09iamVjdCBwbGlzdCwgTGlz cF9PYmplY3QgcHJvcCkKK3sKKyAgTGlzcF9PYmplY3QgdGFpbCwgaGFsZnRhaWw7CisgIC8qIGhh bGZ0YWlsIGlzIHVzZWQgdG8gZGV0ZWN0IGNpcmN1bGFyIGxpc3RzLiAgKi8KKyAgdGFpbCA9IGhh bGZ0YWlsID0gcGxpc3Q7CisgIHdoaWxlIChDT05TUCAodGFpbCkgJiYgQ09OU1AgKFhDRFIgKHRh aWwpKSkKKyAgICB7CisgICAgICBpZiAoRVEgKHByb3AsIFhDQVIgKHRhaWwpKSkKKyAgICAgICAg cmV0dXJuIFhDQVIgKFhDRFIgKHRhaWwpKTsKKyAgICAgIHRhaWwgPSBYQ0RSIChYQ0RSICh0YWls KSk7CisgICAgICBoYWxmdGFpbCA9IFhDRFIgKGhhbGZ0YWlsKTsKKyAgICAgIGlmIChFUSAodGFp bCwgaGFsZnRhaWwpKQorICAgICAgICBicmVhazsKKyAgICB9CisgIHJldHVybiBRbmlsOworfQor CisvKiBSRUdJT04gQkVHSU46ICBtY19yZWdpb25fbGltaXQgKDEpCisgICBSRUdJT04gRU5EOiAg bWNfcmVnaW9uX2xpbWl0ICgwKSAqLworcHRyZGlmZl90CittY19yZWdpb25fbGltaXQgKGJvb2wg YmVnaW5fcCkKK3sKKyAgaWYgKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICYm IE5JTFAgKFZtYXJrX2V2ZW5faWZfaW5hY3RpdmUpCisgICAgICAmJiBOSUxQIChCVkFSIChjdXJy ZW50X2J1ZmZlciwgbWFya19hY3RpdmUpKSkKKyAgICB4c2lnbmFsMCAoUW1hcmtfaW5hY3RpdmUp OworICBMaXNwX09iamVjdCBtYXJrZXIgPSBCVkFSIChjdXJyZW50X2J1ZmZlciwgbWFyayk7Cisg IGludCBtID0gKFhNQVJLRVIgKG1hcmtlciktPmJ1ZmZlcikKKyAgICAgICAgICA/IFhNQVJLRVIg KG1hcmtlciktPmNoYXJwb3MKKyAgICAgICAgICA6IC0xOworICByZXR1cm4gKG0gPT0gLTEpCisg ICAgICAgICAgID8gLTEKKyAgICAgICAgIDogKFBUIDwgbSkgPT0gYmVnaW5fcAorICAgICAgICAg ICA/IFBUCisgICAgICAgICA6IGNsaXBfdG9fYm91bmRzIChCRUdWLCBtLCBaVik7Cit9CisKKy8q IENoZWNrIHRoZSBwcmVzZW5jZSBvZiBhIGRpc3BsYXkgcHJvcGVydHkgYW5kIGNvbXB1dGUgaXRz IHdpZHRoLgorICAgSWYgYSBwcm9wZXJ0eSB3YXMgZm91bmQgYW5kIGl0cyB3aWR0aCB3YXMgZm91 bmQgYXMgd2VsbCwgcmV0dXJuCisgICBpdHMgd2lkdGggKD49IDApIGFuZCBzZXQgdGhlIHBvc2l0 aW9uIG9mIHRoZSBlbmQgb2YgdGhlIHByb3BlcnR5CisgICBpbiBFTkRQT1MuCisgICBPdGhlcndp c2UganVzdCByZXR1cm4gLTEuICovCitzdGF0aWMgaW50CittY19jaGVja19kaXNwbGF5X3dpZHRo IChwdHJkaWZmX3QgcG9zLCBwdHJkaWZmX3QgY29sLCBwdHJkaWZmX3QgKmVuZHBvcykKK3sKKyAg TGlzcF9PYmplY3QgdmFsLCBvdmVybGF5OworICBpZiAoQ09OU1AgKHZhbCA9IGdldF9jaGFyX3By b3BlcnR5X2FuZF9vdmVybGF5CisgICAgICAgICAgICAgIChtYWtlX2ZpeG51bSAocG9zKSwgUWRp c3BsYXksIFFuaWwsICZvdmVybGF5KSkKKyAgICAgICYmIEVRIChRc3BhY2UsIFhDQVIgKHZhbCkp KQorICAgIHsgLyogRklYTUU6IFVzZSBjYWxjX3BpeGVsX3dpZHRoX29yX2hlaWdodC4gKi8KKyAg ICAgIExpc3BfT2JqZWN0IHBsaXN0ID0gWENEUiAodmFsKSwgcHJvcDsKKyAgICAgIGludCB3aWR0 aCA9IC0xOworICAgICAgRU1BQ1NfSU5UIGFsaWduX3RvX21heCA9IChjb2wgPCBNT1NUX1BPU0lU SVZFX0ZJWE5VTSAtIElOVF9NQVgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g KEVNQUNTX0lOVCkgSU5UX01BWCArIGNvbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiBNT1NUX1BPU0lUSVZFX0ZJWE5VTSk7CisgICAgICBpZiAoKHByb3AgPSBtY19wbGlzdF9n ZXQgKHBsaXN0LCBRQ3dpZHRoKSwgUkFOR0VEX0ZJWE5VTVAgKDAsIHByb3AsIElOVF9NQVgpKQor ICAgICAgICAgIHx8IChwcm9wID0gbWNfcGxpc3RfZ2V0IChwbGlzdCwgUUNyZWxhdGl2ZV93aWR0 aCksCisgICAgICAgICAgICAgIFJBTkdFRF9GSVhOVU1QICgwLCBwcm9wLCBJTlRfTUFYKSkpCisg ICAgICAgIHdpZHRoID0gWEZJWE5VTSAocHJvcCk7CisgICAgICAgIGVsc2UgaWYgKEZMT0FUUCAo cHJvcCkgJiYgMCA8PSBYRkxPQVRfREFUQSAocHJvcCkKKyAgICAgICAgICAgICAgICAgJiYgWEZM T0FUX0RBVEEgKHByb3ApIDw9IElOVF9NQVgpCisgICAgICAgICAgd2lkdGggPSAoaW50KShYRkxP QVRfREFUQSAocHJvcCkgKyAwLjUpOworICAgICAgICAgIGVsc2UgaWYgKChwcm9wID0gbWNfcGxp c3RfZ2V0IChwbGlzdCwgUUNhbGlnbl90byksCisgICAgICAgICAgICAgICAgICAgIFJBTkdFRF9G SVhOVU1QIChjb2wsIHByb3AsIGFsaWduX3RvX21heCkpKQorICAgICAgICAgICAgd2lkdGggPSBY RklYTlVNIChwcm9wKSAtIGNvbDsKKyAgICAgICAgICAgICAgZWxzZSBpZiAoRkxPQVRQIChwcm9w KSAmJiBjb2wgPD0gWEZMT0FUX0RBVEEgKHByb3ApCisgICAgICAgICAgICAgICAgICAgICAgICYm IChYRkxPQVRfREFUQSAocHJvcCkgPD0gYWxpZ25fdG9fbWF4KSkKKyAgICAgICAgICAgICAgICB3 aWR0aCA9IChpbnQpKFhGTE9BVF9EQVRBIChwcm9wKSArIDAuNSkgLSBjb2w7CisgICAgICBpZiAo d2lkdGggPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHB0cmRpZmZfdCBzdGFydDsKKyAgICAg ICAgICBpZiAoT1ZFUkxBWVAgKG92ZXJsYXkpKQorICAgICAgICAgICAgKmVuZHBvcyA9IE9WRVJM QVlfUE9TSVRJT04gKE9WRVJMQVlfRU5EIChvdmVybGF5KSk7CisgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgIGdldF9wcm9wZXJ0eV9hbmRfcmFuZ2UgKHBvcywgUWRpc3BsYXksICZ2YWws ICZzdGFydCwgZW5kcG9zLCBRbmlsKTsKKyAgICAgICAgICAvKiBGb3IgOnJlbGF0aXZlLXdpZHRo LCB3ZSBuZWVkIHRvIG11bHRpcGx5IGJ5IHRoZSBjb2x1bW4KKyAgICAgICAgICAgICB3aWR0aCBv ZiB0aGUgY2hhcmFjdGVyIGF0IFBPUywgaWYgaXQgaXMgZ3JlYXRlciB0aGFuIDEuIC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3N0YXRpYyBMaXNwX09iamVjdAorbWNfYXV0b2NtcF9jaGFycyAo TGlzcF9PYmplY3QgcnVsZSwgcHRyZGlmZl90IGNoYXJwb3MsIHB0cmRpZmZfdCBieXRlcG9zLAor ICAgICAgICAgICAgICAgICAgcHRyZGlmZl90IGxpbWl0LCBzdHJ1Y3Qgd2luZG93ICp3aW4sIHN0 cnVjdCBmYWNlICpmYWNlLAorICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3Qgc3RyaW5nKQor eworICBwdHJkaWZmX3QgY291bnQgPSBTUEVDUERMX0lOREVYICgpOworICBzdHJ1Y3QgZnJhbWUg KmYgPSBYRlJBTUUgKHdpbi0+ZnJhbWUpOworICBMaXNwX09iamVjdCBwb3MgPSBtYWtlX2ZpeG51 bSAoY2hhcnBvcyk7CisgIHB0cmRpZmZfdCB0bzsKKyAgcHRyZGlmZl90IHB0ID0gUFQsIHB0X2J5 dGUgPSBQVF9CWVRFOworICBMaXNwX09iamVjdCByZSwgZm9udF9vYmplY3QsIGxnc3RyaW5nOwor ICBwdHJkaWZmX3QgbGVuOworICByZWNvcmRfdW53aW5kX3NhdmVfbWF0Y2hfZGF0YSAoKTsKKyAg cmUgPSBBUkVGIChydWxlLCAwKTsKKyAgaWYgKE5JTFAgKHJlKSkKKyAgICBsZW4gPSAxOworICBl bHNlIGlmICghIFNUUklOR1AgKHJlKSkKKyAgICByZXR1cm4gdW5iaW5kX3RvIChjb3VudCwgUW5p bCk7CisgIGVsc2UgaWYgKChsZW4gPSBmYXN0X2xvb2tpbmdfYXQgKHJlLCBjaGFycG9zLCBieXRl cG9zLCBsaW1pdCwgLTEsIHN0cmluZykpCisgICAgICAgICAgID4gMCkKKyAgICB7CisgICAgICBp ZiAoTklMUCAoc3RyaW5nKSkKKyAgICAgICAgbGVuID0gQllURV9UT19DSEFSIChieXRlcG9zICsg bGVuKSAtIGNoYXJwb3M7CisgICAgICBlbHNlCisgICAgICAgIGxlbiA9IHN0cmluZ19ieXRlX3Rv X2NoYXIgKHN0cmluZywgYnl0ZXBvcyArIGxlbikgLSBjaGFycG9zOworICAgIH0KKyAgaWYgKGxl biA8PSAwKQorICAgIHJldHVybiB1bmJpbmRfdG8gKGNvdW50LCBRbmlsKTsKKyAgdG8gPSBsaW1p dCA9IGNoYXJwb3MgKyBsZW47CisjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCisgIGlmIChGUkFN RV9XSU5ET1dfUCAoZikpCisgICAgeworICAgICAgZm9udF9vYmplY3QgPSBmb250X3JhbmdlIChj aGFycG9zLCBieXRlcG9zLCAmdG8sIHdpbiwgZmFjZSwgc3RyaW5nKTsKKyAgICAgIGlmICghIEZP TlRfT0JKRUNUX1AgKGZvbnRfb2JqZWN0KQorICAgICAgICAgIHx8ICghIE5JTFAgKHJlKQorICAg ICAgICAgICAgICAmJiB0byA8IGxpbWl0CisgICAgICAgICAgICAgICYmIChmYXN0X2xvb2tpbmdf YXQgKHJlLCBjaGFycG9zLCBieXRlcG9zLCB0bywgLTEsIHN0cmluZykgPD0gMCkpKQorICAgICAg ICByZXR1cm4gdW5iaW5kX3RvIChjb3VudCwgUW5pbCk7CisgICAgfQorICBlbHNlCisjZW5kaWYg ICAgICAgIC8qIG5vdCBIQVZFX1dJTkRPV19TWVNURU0gKi8KKyAgICBmb250X29iamVjdCA9IHdp bi0+ZnJhbWU7CisgIGxnc3RyaW5nID0gRmNvbXBvc2l0aW9uX2dldF9nc3RyaW5nIChwb3MsIG1h a2VfZml4bnVtICh0byksIGZvbnRfb2JqZWN0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgc3RyaW5nKTsKKyAgaWYgKE5JTFAgKExHU1RSSU5HX0lEIChsZ3N0cmluZykp KQorICAgIHsKKyAgICAgIC8qIFNhdmUgcG9pbnQgYXMgbWFya2VyIGJlZm9yZSBjYWxsaW5nIG91 dCB0byBsaXNwLiAgKi8KKyAgICAgIGlmIChOSUxQIChzdHJpbmcpKQorICAgICAgICByZWN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gIGNtcF9p dC0+aWQgPSBnZXRfY29tcG9zaXRpb25faWQgKGNoYXJwb3MsIGJ5dGVwb3MsIGVuZCAtIHN0YXJ0 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcCwgc3RyaW5nKTsK KyAgICAgIGlmIChjbXBfaXQtPmlkIDwgMCkKKyAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsK KyAgICAgIGNtcF9pdC0+bmNoYXJzID0gZW5kIC0gc3RhcnQ7CisgICAgICBjbXBfaXQtPm5nbHlw aHMgPSBjb21wb3NpdGlvbl90YWJsZVtjbXBfaXQtPmlkXS0+Z2x5cGhfbGVuOworICAgIH0KKyAg ZWxzZSBpZiAodykKKyAgICB7CisgICAgICBMaXNwX09iamVjdCBsZ3N0cmluZyA9IFFuaWw7Cisg ICAgICBMaXNwX09iamVjdCB2YWwsIGVsdDsKKyAgICAgIHB0cmRpZmZfdCBpOworICAgICAgdmFs ID0gQ0hBUl9UQUJMRV9SRUYgKFZjb21wb3NpdGlvbl9mdW5jdGlvbl90YWJsZSwgY21wX2l0LT5j aCk7CisgICAgICBmb3IgKGkgPSAwOyBpIDwgY21wX2l0LT5ydWxlX2lkeDsgaSsrLCB2YWwgPSBY Q0RSICh2YWwpKTsKKyAgICAgIGlmIChjaGFycG9zIDwgZW5kcG9zKQorICAgICAgICB7CisgICAg ICAgICAgZm9yICg7IENPTlNQICh2YWwpOyB2YWwgPSBYQ0RSICh2YWwpKQorICAgICAgICAgICAg eworICAgICAgICAgICAgICBlbHQgPSBYQ0FSICh2YWwpOworICAgICAgICAgICAgICBpZiAoISBW RUNUT1JQIChlbHQpIHx8IEFTSVpFIChlbHQpICE9IDMKKyAgICAgICAgICAgICAgICAgIHx8ICEg SU5URUdFUlAgKEFSRUYgKGVsdCwgMSkpKQorICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAg ICAgICAgICAgICBpZiAoWEZJWE5BVCAoQVJFRiAoZWx0LCAxKSkgIT0gY21wX2l0LT5sb29rYmFj aykKKyAgICAgICAgICAgICAgICBnb3RvIG5vX2NvbXBvc2l0aW9uOworICAgICAgICAgICAgICBs Z3N0cmluZyA9IG1jX2F1dG9jbXBfY2hhcnMgKGVsdCwgY2hhcnBvcywgYnl0ZXBvcywgZW5kcG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsIGZhY2UsIHN0cmlu Zyk7CisgICAgICAgICAgICAgIGlmIChjb21wb3NpdGlvbl9nc3RyaW5nX3AgKGxnc3RyaW5nKSkK KyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgbGdzdHJpbmcgPSBRbmlsOwor ICAgICAgICAgICAgICAvKiBDb21wb3NpdGlvbiBmYWlsZWQgcGVyaGFwcyBiZWNhdXNlIHRoZSBm b250IGRvZXNuJ3QKKyAgICAgICAgICAgICAgICAgc3VwcG9ydCBzdWZmaWNpZW50IHJhbmdlIG9m IGNoYXJhY3RlcnMuICBUcnkgdGhlCisgICAgICAgICAgICAgICAgIG90aGVyIGNvbXBvc2l0aW9u IHJ1bGVzIGlmIGFueS4gICovCisgICAgICAgICAgICB9CisgICAgICAgICAgY21wX2l0LT5yZXZl cnNlZF9wID0gMDsKKyAgICAgICAgfQorICAgICAgZWxzZQorICAgICAgICB7CisgICAgICAgICAg cHRyZGlmZl90IGNwb3MgPSBjaGFycG9zLCBicG9zID0gYnl0ZXBvczsKKyAgICAgICAgICBjbXBf aXQtPnJldmVyc2VkX3AgPSAxOworICAgICAgICAgIGVsdCA9IFhDQVIgKHZhbCk7CisgICAgICAg ICAgaWYgKGNtcF9pdC0+bG9va2JhY2sgPiAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBjcG9zID0gY2hhcnBvcyAtIGNtcF9pdC0+bG9va2JhY2s7CisgICAgICAgICAgICAgIGlmIChT VFJJTkdQIChzdHJpbmcpKQorICAgICAgICAgICAgICAgIGJwb3MgPSBzdHJpbmdfY2hhcl90b19i eXRlIChzdHJpbmcsIGNwb3MpOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAg YnBvcyA9IENIQVJfVE9fQllURSAoY3Bvcyk7CisgICAgICAgICAgICB9CisgICAgICAgICAgbGdz dHJpbmcgPSBtY19hdXRvY21wX2NoYXJzIChlbHQsIGNwb3MsIGJwb3MsIGNoYXJwb3MgKyAxLCB3 LCBmYWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nKTsKKyAg ICAgICAgICBpZiAoISBjb21wb3NpdGlvbl9nc3RyaW5nX3AgKGxnc3RyaW5nKQorICAgICAgICAg ICAgICB8fCBjcG9zICsgTEdTVFJJTkdfQ0hBUl9MRU4gKGxnc3RyaW5nKSAtIDEgIT0gY2hhcnBv cykKKyAgICAgICAgICAgIC8qIENvbXBvc2l0aW9uIGZhaWxlZCBvciBkaWRuJ3QgY292ZXIgdGhl IGN1cnJlbnQKKyAgICAgICAgICAgICAgIGNoYXJhY3Rlci4gICovCisgICAgICAgICAgICBnb3Rv IG5vX2NvbXBvc2l0aW9uOworICAgICAgICB9CisgICAgICBpZiAoTklMUCAobGdzdHJpbmcpKQor ICAgICAgICBnb3RvIG5vX2NvbXBvc2l0aW9uOworICAgICAgaWYgKE5JTFAgKExHU1RSSU5HX0lE IChsZ3N0cmluZykpKQorICAgICAgICBsZ3N0cmluZyA9IGNvbXBvc2l0aW9uX2dzdHJpbmdfcHV0 X2NhY2hlIChsZ3N0cmluZywgLTEpOworICAgICAgY21wX2l0LT5pZCA9IFhGSVhOVU0gKExHU1RS SU5HX0lEIChsZ3N0cmluZykpOworICAgICAgZm9yIChpID0gMDsgaSA8IExHU1RSSU5HX0dMWVBI X0xFTiAobGdzdHJpbmcpOyBpKyspCisgICAgICAgIGlmIChOSUxQIChMR1NUUklOR19HTFlQSCAo bGdzdHJpbmcsIGkpKSkKKyAgICAgICAgICBicmVhazsKKyAgICAgIGNtcF9pdC0+bmdseXBocyA9 IGk7CisgICAgICBjbXBfaXQtPmZyb20gPSAwOworICAgICAgY21wX2l0LT50byA9IGk7CisgICAg fQorICBlbHNlCisgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgcmV0dXJuIDE7Cisgbm9fY29t cG9zaXRpb246CisgIGlmIChjaGFycG9zID09IGVuZHBvcykKKyAgICByZXR1cm4gMDsKKyAgaWYg KGNoYXJwb3MgPCBlbmRwb3MpCisgICAgeworICAgICAgY2hhcnBvcysrOworICAgICAgaWYgKE5J TFAgKHN0cmluZykpCisgICAgICAgIElOQ19QT1MgKGJ5dGVwb3MpOworICAgICAgZWxzZQorICAg ICAgICBieXRlcG9zICs9IEJZVEVTX0JZX0NIQVJfSEVBRCAoKihTREFUQSAoc3RyaW5nKSArIGJ5 dGVwb3MpKTsKKyAgICB9CisgIGVsc2UKKyAgICB7CisgICAgICBjaGFycG9zLS07CisgICAgICAv KiBCWVRFUE9TIGlzIGNhbGN1bGF0ZWQgaW4gY29tcG9zaXRpb25fY29tcHV0ZV9zdG9wX3BvcyAq LworICAgICAgYnl0ZXBvcyA9IC0xOworICAgIH0KKyAgaWYgKGNtcF9pdC0+cmV2ZXJzZWRfcCkK KyAgICBlbmRwb3MgPSAtMTsKKyAgY29tcG9zaXRpb25fY29tcHV0ZV9zdG9wX3BvcyAoY21wX2l0 LCBjaGFycG9zLCBieXRlcG9zLCBlbmRwb3MsIHN0cmluZyk7CisgIHJldHVybiAwOworfQorCisv KiBTY2FubmluZyBmcm9tIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGN1cnJlbnQgbGluZSwgc3RvcCBh dCB0aGUgYnVmZmVyCisgICBwb3NpdGlvbiBFTkRQT1Mgb3IgYXQgdGhlIGNvbHVtbiBHT0FMQ09M IG9yIGF0IHRoZSBlbmQgb2YgbGluZSwgd2hpY2hldmVyCisgICBjb21lcyBmaXJzdC4KKyAgIFJl dHVybiB0aGUgcmVzdWx0aW5nIGJ1ZmZlciBwb3NpdGlvbiBhbmQgY29sdW1uIGluIEVORF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52aXNpYmxlIHRleHQuICovCisgICAgICAgICAgc2NhbiA9IHNraXBf aW52aXNpYmxlIChzY2FuLCAmbmV4dF9ib3VuZGFyeSwgZW5kLCBRbmlsKTsKKyAgICAgICAgICBp ZiAoc2NhbiAhPSBvbGRfc2NhbikKKyAgICAgICAgICAgIHNjYW5fYnl0ZSA9IENIQVJfVE9fQllU RSAoc2Nhbik7CisgICAgICAgICAgaWYgKHNjYW4gPj0gZW5kKQorICAgICAgICAgICAgZ290byBl bmRsb29wOworICAgICAgICB9CisgICAgICAvKiBUZXN0IHJlYWNoaW5nIHRoZSBnb2FsIGNvbHVt bi4gIFdlIGRvIHRoaXMgYWZ0ZXIgc2tpcHBpbmcKKyAgIGludmlzaWJsZSBjaGFyYWN0ZXJzLCBz byB0aGF0IHdlIHB1dCBwb2ludCBiZWZvcmUgdGhlCisgICBjaGFyYWN0ZXIgb24gd2hpY2ggdGhl IGN1cnNvciB3aWxsIGFwcGVhci4gKi8KKyAgICAgIGlmIChjb2wgPj0gZ29hbCkKKyAgICAgICAg YnJlYWs7CisgICAgICBwcmV2X2NvbCA9IGNvbDsKKyAgICAgIHsgLyogQ2hlY2sgZGlzcGxheSBw cm9wZXJ0eS4gKi8KKyAgICAgICAgcHRyZGlmZl90IGVuZHA7CisgICAgICAgIGludCB3aWR0aCA9 IG1jX2NoZWNrX2Rpc3BsYXlfd2lkdGggKHNjYW4sIGNvbCwgJmVuZHApOworICAgICAgICBpZiAo d2lkdGggPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBjb2wgKz0gd2lkdGg7CisgICAg ICAgICAgICBpZiAoZW5kcCA+IHNjYW4pIC8qIEF2b2lkIGluZmluaXRlIGxvb3BzIHdpdGggMC13 aWR0aCBvdmVybGF5cy4gKi8KKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHNjYW4g PSBlbmRwOworICAgICAgICAgICAgICAgIHNjYW5fYnl0ZSA9IENIQVJfVE9fQllURSAoc2Nhbik7 CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9 CisgICAgICB9CisgICAgICAvKiBDaGVjayBjb21wb3NpdGlvbiBzZXF1ZW5jZS4gKi8KKyAgICAg IGlmIChjbXBfaXQuaWQgPj0gMAorICAgICAgICAgIHx8IChzY2FuID09IGNtcF9pdC5zdG9wX3Bv cworICAgICAgICAgICAgICAmJiBtY19jb21wb3NpdGlvbl9yZXNlYXRfaXQgKCZjbXBfaXQsIHNj YW4sIHNjYW5fYnl0ZSwgZW5kLCB3LCBOVUxMLCBRbmlsKSkpCisgICAgICAgIGNvbXBvc2l0aW9u X3VwZGF0ZV9pdCAoJmNtcF9pdCwgc2Nhbiwgc2Nhbl9ieXRlLCBRbmlsKTsKKyAgICAgIGlmIChj bXBfaXQuaWQgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHNjYW4gKz0gY21wX2l0Lm5jaGFy czsKKyAgICAgICAgICBzY2FuX2J5dGUgKz0gY21wX2l0Lm5ieXRlczsKKyAgICAgICAgICBpZiAo c2NhbiA8PSBlbmQpCisgICAgICAgICAgICBjb2wgKz0gY21wX2l0LndpZHRoOworICAgICAgICAg IGlmIChjbXBfaXQudG8gPT0gY21wX2l0Lm5nbHlwaHMpCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIGNtcF9pdC5pZCA9IC0xOworICAgICAgICAgICAgICBjb21wb3NpdGlvbl9jb21wdXRl X3N0b3BfcG9zICgmY21wX2l0LCBzY2FuLCBzY2FuX2J5dGUsIGVuZCwgUW5pbCk7CisgICAgICAg ICAgICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGNtcF9pdC5mcm9tID0gY21w X2l0LnRvOworICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICBjID0gRkVUQ0hf QllURSAoc2Nhbl9ieXRlKTsKKyAgICAgIC8qIFNlZSBpZiB0aGVyZSBpcyBhIGRpc3BsYXkgdGFi bGUgYW5kIGl0IHJlbGF0ZXMgdG8gdGhpcyBjaGFyYWN0ZXIuICovCisgICAgICBpZiAoZHAgIT0g MAorICAgICAgICAgICYmICEgKG11bHRpYnl0ZSAmJiBMRUFESU5HX0NPREVfUCAoYykpCisgICAg ICAgICAgJiYgVkVDVE9SUCAoRElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpKSkKKyAgICAgICAgewor ICAgICAgICAgIExpc3BfT2JqZWN0IGNoYXJ2ZWM7CisgICAgICAgICAgcHRyZGlmZl90IGksIG47 CisgICAgICAgICAgLyogVGhpcyBjaGFyYWN0ZXIgaXMgZGlzcGxheWVkIHVzaW5nIGEgdmVjdG9y IG9mIGdseXBocy4KKyAgICAgICAgICAgICBVcGRhdGUgdGhlIGNvbHVtbi9wb3NpdGlvbiBiYXNl ZCBvbiB0aG9zZSBnbHlwaHMuICovCisgICAgICAgICAgY2hhcnZlYyA9IERJU1BfQ0hBUl9WRUNU T1IgKGRwLCBjKTsKKyAgICAgICAgICBuID0gQVNJWkUgKGNoYXJ2ZWMpOworICAgICAgICAgIGZv ciAoaSA9IDA7IGkgPCBuOyBpKyspCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIFRo aXMgc2hvdWxkIGJlIGhhbmRsZWQgdGhlIHNhbWUgYXMKKyAgICAgICAgICAgICAgbmV4dF9lbGVt ZW50X2Zyb21fZGlzcGxheV92ZWN0b3IgZG9lcyBpdC4gKi8KKyAgICAgICAgICAgICAgTGlzcF9P YmplY3QgZW50cnkgPSBBUkVGIChjaGFydmVjLCBpKTsKKyAgICAgICAgICAgICAgaWYgKEdMWVBI X0NPREVfUCAoZW50cnkpKQorICAgICAgICAgICAgICAgIGMgPSBHTFlQSF9DT0RFX0NIQVIgKGVu dHJ5KTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGMgPSAnICc7CisgICAg ICAgICAgICAgIGlmIChjID09ICdcbicpCisgICAgICAgICAgICAgICAgZ290byBlbmRsb29wOwor ICAgICAgICAgICAgICBpZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwg c2VsZWN0aXZlX2Rpc3BsYXkpLCBRdCkpCisgICAgICAgICAgICAgICAgZ290byBlbmRsb29wOwor ICAgICAgICAgICAgICBpZiAoYyA9PSAnXHQnKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAgICAgICAgICAgICAgICBjb2wgPSBjb2wg LyB0YWJfd2lkdGggKiB0YWJfd2lkdGg7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICsrY29sOworICAgICAgICAgICAgfQorICAgICAg ICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBUaGUgZGlzcGxh eSB0YWJsZSBkb2Vzbid0IGFmZmVjdCB0aGlzIGNoYXJhY3RlcjsKKyAgICAgICAgICAgICAgIGl0 IGRpc3BsYXlzIGFzIGl0c2VsZi4gKi8KKyAgICAgICAgICAgIGlmIChjID09ICdcbicpCisgICAg ICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgIGlmIChjID09ICdccicgJiYgRVEg KEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBzZWxlY3RpdmVfZGlzcGxheSksIFF0KSkKKyAgICAgICAg ICAgICAgZ290byBlbmRsb29wOworICAgICAgICAgICAgaWYgKGMgPT0gJ1x0JykKKyAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgIGNvbCArPSB0YWJfd2lkdGg7CisgICAgICAgICAgICAg ICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgIGVsc2UgaWYgKG11bHRpYnl0ZSAmJiBMRUFESU5HX0NPREVfUCAoYykpCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogU3RhcnQgb2YgbXVsdGktYnl0 ZSBmb3JtLiAqLworICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqcHRyOworICAgICAg ICAgICAgICAgICAgaW50IGJ5dGVzLCB3aWR0aDsKKyAgICAgICAgICAgICAgICAgIHB0ciA9IEJZ VEVfUE9TX0FERFIgKHNjYW5fYnl0ZSk7CisgICAgICAgICAgICAgICAgICBNQ19NVUxUSUJZVEVf QllURVNfV0lEVEggKHB0ciwgZHAsIGJ5dGVzLCB3aWR0aCk7CisgICAgICAgICAgICAgICAgICAv KiBTdWJ0cmFjdCBvbmUgdG8gY29tcGVuc2F0ZSBmb3IgdGhlIGluY3JlbWVudAorICAgICAgICAg ICAgICAgICAgdGhhdCBpcyBnb2luZyB0byBoYXBwZW4gYmVsb3cuICovCisgICAgICAgICAgICAg ICAgICBzY2FuX2J5dGUgKz0gYnl0ZXMgLSAxOworICAgICAgICAgICAgICAgICAgY29sICs9IHdp ZHRoOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmIChjdGxfYXJy b3cgJiYgKGMgPCAwNDAgfHwgYyA9PSAwMTc3KSkKKyAgICAgICAgICAgICAgICAgIGNvbCArPSAy OworICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoYyA8IDA0MCB8fCBjID49IDAxNzcpCisgICAg ICAgICAgICAgICAgICAgIGNvbCArPSA0OworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICAgICAgY29sKys7CisgICAgICAgICAgfQorICAgICAgc2NhbisrOworICAg ICAgc2Nhbl9ieXRlKys7CisgICAgfQorIGVuZGxvb3A6CisgIGxhc3Rfa25vd25fY29sdW1uID0g Y29sOworICBsYXN0X2tub3duX2NvbHVtbl9wb2ludCA9IHB0OworICBsYXN0X2tub3duX2NvbHVt bl9tb2RpZmllZCA9IE1PRElGRjsKKyAgaWYgKGdvYWxjb2wpCisgICAgKmdvYWxjb2wgPSBjb2w7 CisgIGlmIChl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1RBQl9XSURUSCAoY3VycmVudF9idWZm ZXIpOworICBib29sIGN0bF9hcnJvdyA9ICFOSUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwgY3Rs X2Fycm93KSk7CisgIHN0cnVjdCBMaXNwX0NoYXJfVGFibGUgKmRwID0gYnVmZmVyX2Rpc3BsYXlf dGFibGUgKCk7CisgIGlmIChwdCA9PSBsYXN0X2tub3duX2NvbHVtbl9wb2ludAorICAgICAgJiYg TU9ESUZGID09IGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkKQorICAgIHsKKyAgICAgIGlmIChv bGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAg ICAgIHJldHVybiBsYXN0X2tub3duX2NvbHVtbjsKKyAgICB9CisgIC8qIElmIHRoZSBidWZmZXIg aGFzIG92ZXJsYXlzLCB0ZXh0IHByb3BlcnRpZXMsCisgICAgIG9yIG11bHRpYnl0ZSBjaGFyYWN0 ZXJzLCB1c2UgYSBtb3JlIGdlbmVyYWwgYWxnb3JpdGhtLiAqLworICBpZiAoYnVmZmVyX2ludGVy dmFscyAoY3VycmVudF9idWZmZXIpCisgICAgICB8fCBidWZmZXJfaGFzX292ZXJsYXlzICgpCisg ICAgICB8fCBaICE9IFpfQllURSkKKyAgICB7CisgICAgICBFTUFDU19JTlQgY29sID0gTU9TVF9Q T1NJVElWRV9GSVhOVU07CisgICAgICBtY19zY2FuX2Zvcl9jb2x1bW4gKCZwdCwgJmNvbCwgTlVM TCwgcHQpOworICAgICAgeworICAgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgICBzZXRf YnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgICAgcmV0dXJuIGNvbDsKKyAgICAg IH0KKyAgICB9CisgIC8qIFNjYW4gYmFja3dhcmRzIGZyb20gcG9pbnQgdG8gdGhlIHByZXZpb3Vz IG5ld2xpbmUsCisgICAgIGNvdW50aW5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AgICAgLyogQ2hlY2sgd2hldGhlciB0aGF0IGJyaW5ncyB1cyB0byBiZWdpbm5pbmcgb2YgYnVm ZmVyLiAqLworICAgICAgICAgIGlmIChCRUdWID49IEdQVCkKKyAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICB9CisgICAgICBjID0gKi0tcHRyOworICAgICAgaWYgKGRwICYmIFZFQ1RPUlAgKERJ U1BfQ0hBUl9WRUNUT1IgKGRwLCBjKSkpCisgICAgICAgIHsKKyAgICAgICAgICBjaGFydmVjID0g RElTUF9DSEFSX1ZFQ1RPUiAoZHAsIGMpOworICAgICAgICAgIG4gPSBBU0laRSAoY2hhcnZlYyk7 CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGNoYXJ2 ZWMgPSBRbmlsOworICAgICAgICAgICAgbiA9IDE7CisgICAgICAgICAgfQorICAgICAgZm9yIChp ID0gbiAtIDE7IGkgPj0gMDsgLS1pKQorICAgICAgICB7CisgICAgICAgICAgaWYgKFZFQ1RPUlAg KGNoYXJ2ZWMpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBUaGlzIHNob3VsZCBi ZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisgICAgICAgICAgIG5leHRfZWxlbWVudF9mcm9tX2Rpc3Bs YXlfdmVjdG9yIGRvZXMgaXQuICovCisgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGVudHJ5ID0g QVJFRiAoY2hhcnZlYywgaSk7CisgICAgICAgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5 KSkKKyAgICAgICAgICAgICAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgYyA9ICcgJzsKKyAgICAgICAgICAgIH0K KyAgICAgICAgICBpZiAoYyA+PSAwNDAgJiYgYyA8IDAxNzcpCisgICAgICAgICAgICBjb2wrKzsK KyAgICAgICAgICAgIGVsc2UgaWYgKGMgPT0gJ1xuJworICAgICAgICAgICAgICAgICAgICAgfHwg KGMgPT0gJ1xyJworICAgICAgICAgICAgICAgICAgICAgICAgICYmIEVRIChCVkFSIChjdXJyZW50 X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3BsYXkpLCBRdCkpKQorICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgcHRyKys7CisgICAgICAgICAgICAgICAgZ290byBzdGFydF9vZl9saW5lX2Zv dW5kOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UgaWYgKGMgPT0gJ1x0JykK KyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAodGFiX3NlZW4pCisgICAg ICAgICAgICAgICAgICAgIGNvbCA9ICgoY29sICsgdGFiX3dpZHRoKSAvIHRhYl93aWR0aCkgKiB0 YWJfd2lkdGg7CisgICAgICAgICAgICAgICAgICBwb3N0X3RhYiArPSBjb2w7CisgICAgICAgICAg ICAgICAgICBjb2wgPSAwOworICAgICAgICAgICAgICAgICAgdGFiX3NlZW4gPSAxOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmIChWRUNUT1JQIChjaGFydmVjKSkK KyAgICAgICAgICAgICAgICAgIC8qIFdpdGggYSBkaXNwbGF5IHRhYmxlIGVudHJ5LCBDIGlzIGRp c3BsYXllZCBhcyBpcywgYW5kCisgICAgICAgICAgICAgICAgICAgICBub3QgZGlzcGxheWVkIGFz IFxOTk4gb3IgYXMgXk4uICBJZiBDIGlzIGEgc2luZ2xlLWJ5dGUKKyAgICAgICAgICAgICAgICAg ICAgIGNoYXJhY3RlciwgaXQgdGFrZXMgb25lIGNvbHVtbi4gIElmIEMgaXMgbXVsdGktYnl0ZSBp bgorICAgICAgICAgICAgICAgICAgICAgYSB1bmlieXRlIGJ1ZmZlciwgaXQncyB0cmFuc2xhdGVk IHRvIHVuaWJ5dGUsIHNvIGl0CisgICAgICAgICAgICAgIC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hbWUsIGYpOworICByZXR1cm4gU1NEQVRBIChGcHJpbjFfdG9fc3RyaW5n IChmcmFtZSwgUW5pbCkpOworfQorCisvKiBVU0FHRTogIGZwcmludGYgKHN0ZGVyciwgIldJTkRP VyAoJXMpIiwgbWNfd2luZG93ICh3KSk7ICovCitjaGFyICoKK21jX3dpbmRvdyAoc3RydWN0IHdp bmRvdyAqdykKK3sKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VUV0lORE9XICh3aW5kb3cs IHcpOworICByZXR1cm4gU1NEQVRBIChGcHJpbjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpKTsK K30KKworLyogVVNBR0U6ICBmcHJpbnRmIChzdGRlcnIsICJDSEFSQUNURVIgKCVzKSIsIG1jX2No YXJfdG9fc3RyaW5nIChnbHlwaC0+dS5jaCkpOyAqLworY2hhciAqCittY19jaGFyX3RvX3N0cmlu ZyAoaW50IGFyZykKK3sKKyAgTGlzcF9PYmplY3QgY2hhcmFjdGVyID0gKDAgPD0gYXJnICYmIGFy ZyA8PSBNQVhfQ0hBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgID8gRmNoYXJfdG9fc3Ry aW5nIChtYWtlX2ZpeG51bSAoYXJnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5p bDsKKyAgY2hhciAqIHJlc3VsdCA9ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAg ICAgICYmIGFyZyA9PSA5KQorICAgICAgICAgICAgICAgICAgICA/ICJcXHQiCisgICAgICAgICAg ICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJn ID09IDEwKQorICAgICAgICAgICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICAgICAgICAgICA6 ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnID09IDMyKQor ICAgICAgICAgICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAo Y2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9IDkKKyAgICAgICAgICAg ICAgICAgICAgICYmIGFyZyAhPSAxMAorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9IDMy KQorICAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVyKQorICAgICAgICAgICAg ICAgICAgOiAiXFw/IjsKKyAgcmV0dXJuIHJlc3VsdDsKK30KKworaW50CittY19saXNwX3RvX2N1 cnNvcl90eXBlIChMaXNwX09iamVjdCBhcmcpCit7CisgIGNoYXIgKnN0cjsKKyAgaWYgKFhUWVBF IChhcmcpID09IExpc3BfU3RyaW5nKQorICAgIHN0ciA9IFNTREFUQSAoYXJnKTsKKyAgICBlbHNl IGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N5bWJvbCkKKyAgICAgIHN0ciA9IFNTREFUQSAoU1lN Qk9MX05BTUUgKGFyZykpOworICAgICAgZWxzZSByZXR1cm4gLTE7CisgIGlmICghc3RyY21wIChz dHIsICJubyIpKQorICAgIHJldHVybiBNQ19OT19DVVJTT1I7CisgIGlmICghc3RyY21wIChzdHIs ICJtYy1sZWZ0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTUNfTEVGVF9GUklOR0VfQklU TUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAibWMtcmlnaHQtZnJpbmdlLWJpdG1hcCIpKQorICAg IHJldHVybiBNQ19SSUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAiYm94 IikpCisgICAgcmV0dXJuIE1DX0ZJTExFRF9CT1g7CisgIGlmICghc3RyY21wIChzdHIsICJmcmFt ZWQiKSkKKyAgICByZXR1cm4gTUNfRlJBTUVEX0JPWDsKKyAgaWYgKCFzdHJjbXAgKHN0ciwgImhv bGxvdyIpKQorICAgIHJldHVybiBNQ19IT0xMT1dfQk9YOworICBpZiA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ldHVybiAiVU5D SEFOR0VEIjsKKyAgICAgIGNhc2UgU0VUX0NVUlNPUl9PTkU6IHJldHVybiAiU0VUX0NVUlNPUl9P TkUiOworICAgICAgY2FzZSBTRVRfQ1VSU09SX1RXTzogcmV0dXJuICJTRVRfQ1VSU09SX1RXTyI7 CisgICAgICBkZWZhdWx0OgorICAgICAgcmV0dXJuICJVTktOT1dOIjsKKyAgICB9Cit9CisKKy8q IFVTQUdFOiAgZnByaW50ZiAoc3RkZXJyLCAiRlJPTV9XSEVSRSAoJXMpIiwgbWNfZHJhd19yb3df dHlwZV90b19zdHJpbmcgKGFyZykpOyAqLworY2hhciAqCittY19yZWRyYXdfcm93X3R5cGVfdG9f c3RyaW5nIChlbnVtIG1jX3JlZHJhd19yb3dfdHlwZSBmcm9tX3doZXJlKQoreworICBzd2l0Y2gg KGZyb21fd2hlcmUpCisgICAgeworICAgICAgY2FzZSBVUERBVEVfV0lORE9XX19SRURSQVdfT1ZF UkxBUFBFRF9ST1dTOiByZXR1cm4gIlVQREFURV9XSU5ET1dfX1JFRFJBV19PVkVSTEFQUEVEX1JP V1MiOworICAgICAgY2FzZSBHVUlfSU5TRVJUX0dMWVBIUzogcmV0dXJuICJHVUlfSU5TRVJUX0dM WVBIUyI7CisgICAgICBjYXNlIEdVSV9GSVhfT1ZFUkxBUFBJTkdfQVJFQTogcmV0dXJuICJHVUlf RklYX09WRVJMQVBQSU5HX0FSRUEiOworICAgICAgY2FzZSBEUkFXX1JPV19XSVRIX01PVVNFX0ZB Q0U6IHJldHVybiAiRFJBV19ST1dfV0lUSF9NT1VTRV9GQUNFIjsKKyAgICAgIGNhc2UgRVhQT1NF X0FSRUFfT05FOiByZXR1cm4gIkVYUE9TRV9BUkVBX09ORSI7CisgICAgICBjYXNlIEVYUE9TRV9B UkVBX1RXTzogcmV0dXJuICJFWFBPU0VfQVJFQV9UV08iOworICAgICAgY2FzZSBFWFBPU0VfTElO RTogcmV0dXJuICJFWFBPU0VfTElORSI7CisgICAgICBkZWZhdWx0OgorICAgICAgcmV0dXJuICJV TktOT1dOIjsKKyAgICB9Cit9CisKK3ZvaWQKK21jX2NhY2hlX2luc3BlY3RvciAoc3RydWN0IHdp bmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCBtYXRyaXgpCit7CisgIGludCB2cG9zX2FsbG9jYXRl ZCA9IHctPm1jX21hdHJpeC52cG9zX2FsbG9jYXRlZDsKKyAgaW50IHZwb3NfdXNlZCA9IHctPm1j X21hdHJpeC52cG9zX3VzZWQ7CisgIGZwcmludGYgKHN0ZGVyciwgIiVzOiAgbWF0cml4LnZwb3Nf YWxsb2NhdGVkICglZCkgfCBtYXRyaXgudnBvc191c2VkICglZClcbiIsCisgICAgICAgICAgICAg ICAgICAgbWNfd2luZG93ICh3KSwgdnBvc19hbGxvY2F0ZWQsIHZwb3NfdXNlZCk7CisgIGZvciAo ZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICBjYWNoZV90 eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAgICAgIGludCBj dXJzb3JzX3VzZWQgPSB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOworICAg ICAgZnByaW50ZiAoc3RkZXJyLCAiICBtYXRyaXguY3Vyc29yc191c2VkWyVzXSAoJWQpXG4iLAor ICAgICAgICAgICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlw ZSksIGN1cnNvcnNfdXNlZCk7CisgICAgfQorICBmb3IgKGludCB2bnRoID0gMDsKKyAgICAgICB2 bnRoIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZDsKKyAgICAgICArK3ZudGgpCisgICAgeworICAg ICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAg ICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgICAgICsrY2FjaGVfdHlwZSkKKyAg ICAgICAgeworICAgICAgICAgIGludCBjYWNoZV9hbGxvY2F0ZWQgPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAgaW50IGNhY2hl X3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdOwor ICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgICB2bnRoICglZCkgfCBjYWNoZV9hbGxvY2F0 ZWRbJXNdICglZCkgfCBjYWNoZV91c2VkWyVzXSAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgdm50aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2NhY2hlX3R5cGVf dG9fc3RyaW5nIChjYWNoZV90eXBlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hl X2FsbG9jYXRlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2NhY2hlX3R5cGVfdG9f c3RyaW5nIChjYWNoZV90eXBlKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlX3Vz ZWQpOworICAgICAgICB9CisgICAgfQorfQorCit2b2lkCittY19zZXRfbHNsX2JnIChzdHJ1Y3Qg d2luZG93ICp3LCBlbnVtIGZhY2VfaWQgZmFjZV9pZCwgc3RydWN0IG1jX1JHQiAqbHNsKQorewor ICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgc3RydWN0IGZhY2UgKmZh Y2U7CisgIGlmICghTklMUCAoVmZhY2VfcmVtYXBwaW5nX2FsaXN0KQorICAgICAgJiYgKGZhY2Vf aWQgPT0gREVGQVVMVF9GQUNFX0lEIC8qIFFkZWZhdWx0ICovCisgICAgICAgICAgfHwgZmFjZV9p ZCA9PSBNT0RF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gWFdJTkRPVyAoZi0+c2VsZWN0ZWRfd2luZG93KQorICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBmID09IEZSQU1FX0RJU1BMQVlfSU5GTyAoZiktPmhpZ2hsaWdodF9mcmFtZSk7Cisg IHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgIHN0cnVjdCBidWZm ZXIgKm9sZF9idWZmZXIgPSBOVUxMOworICBwdHJkaWZmX3Qgb3BvaW50ID0gKHcgPT0gWFdJTkRP VyAoc2VsZWN0ZWRfd2luZG93KSkKKyAgICAgICAgICAgICAgICAgICAgID8gUFQKKyAgICAgICAg ICAgICAgICAgICAgIDogWEZJWE5VTSAoRm1hcmtlcl9wb3NpdGlvbiAody0+cG9pbnRtKSk7Cisg IHB0cmRpZmZfdCBjdXJyZW50X2NvbCA9IG1jX2N1cnJlbnRfY29sdW1uICh3LCBvcG9pbnQpOwor ICBpbnQgZnJhbWVfY2hhcl93aWR0aCA9IEZSQU1FX0NPTFVNTl9XSURUSCAoZik7CisgIGJvb2wg ZmlsbF9jb2x1bW5fcCA9ICFOSUxQIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBpbnQgZmls bF9jb2wgPSBYRklYTlVNIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBpbnQgaHNjbF94ID0g dy0+aHNjcm9sbCAqIGZyYW1lX2NoYXJfd2lkdGg7CisgIGlmIChiICE9IGN1cnJlbnRfYnVmZmVy KQorICAgIHsKKyAgICAgIG9sZF9idWZmZXIgPSBjdXJyZW50X2J1ZmZlcjsKKyAgICAgIHNldF9i dWZmZXJfaW50ZXJuYWwgKGIpOworICAgIH0KKyAgZXNzZW50aWFscy0+enYgPSBaVjsKKyAgZXNz ZW50aWFscy0+enZfYnl0ZSA9IFpWX0JZVEU7CisgIGVzc2VudGlhbHMtPmZjX3ggPSAoZmlsbF9j b2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChWZGlzcGxheV9saW5lX251 bWJlcnMpKQorICAgICAgICAgICAgICAgICAgICAgICA/IChmaWxsX2NvbCAqIGZyYW1lX2NoYXJf d2lkdGgpICsgdy0+bWMubG51bV9waXhlbF93aWR0aCAtIGhzY2xfeAorICAgICAgICAgICAgICAg ICAgICAgOiAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAo VmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgPyAoZmlsbF9j b2wgKiBmcmFtZV9jaGFyX3dpZHRoKSAtIGhzY2xfeAorICAgICAgICAgICAgICAgICAgICAgOiAw OworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVy KTsKKyAgZW51bSBmYWNlX2lkIGZpbGxfY29sdW1uX3ByZV96dl9mYWNlX2lkID0KKyAgICAoIWVz c2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2Ug KHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpCisgICAgOiAo IWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgZmNfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAgJiYgIU5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgJiYgIU5JTFAgKEJW QVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3L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KSwgY3Jvc3NoYWlycykpKQorICAgICAgPyBsb29rdXBf bmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiZmMtaW5hY3RpdmUtYXQtenYtZmFjZSIpLCB0cnVl KQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgICYmICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYm ICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29y LnggPT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYs IGludGVybiAoImZjLW9wb2ludC1pbmFjdGl2ZS1hdC16di1mYWNlIiksIHRydWUpCisgICAgOiAo ZXNzZW50aWFscy0+YWN0aXZlX3AKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfdmVy dGljYWxfcnVsZXIpKQorICAgICAgICYmIHctPmN1cnNvci54ID09IGVzc2VudGlhbHMtPmZjX3gp CisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCJmYy1vcG9pbnQtYXQt enYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYm ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3Mp KQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKQorICAgICAgICYmICFOSUxQ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p Y2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxzLT5mY194KQor ICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiZmMtb3BvaW50LXBvc3Qt enYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYm ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3Mp KQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAg ICAgJiYgdy0+Y3Vyc29yLnggIT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXBvc3QtenYtZmFjZSIpLCB0cnVl KQorICAgIDogKGVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgJiYgIU5JTFAgKEJWQVIg KGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5jdXJzb3IueCAhPSBlc3NlbnRp YWxzLT5mY194KQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiZmMt cG9zdC16di1mYWNlIiksIHRydWUpCisgICAgOiBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50 ZXJuICgiZmMtcG9zdC16di1mYWNlIiksIHRydWUpOworICBzdHJ1Y3QgZmFjZSAqZmlsbF9jb2x1 bW5fcG9zdF96dl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBmaWx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GN1cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9 PSBQUkVfWlYpCisgICAgICAgICAgfHwgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgJiYg Y3VycmVudF9jb2wgJSAyICE9IDAKKyAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmls bF9jb2wKKyAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikpCisgICAgICAg IHsKKyAgICAgICAgICBsc2xfZmctPnJlZCA9IG9kZF9mb3JlZ3JvdW5kLnJlZDsKKyAgICAgICAg ICBsc2xfZmctPmdyZWVuID0gb2RkX2ZvcmVncm91bmQuZ3JlZW47CisgICAgICAgICAgbHNsX2Zn LT5ibHVlID0gb2RkX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgfQorICAgICAgICAvKiB5ZWxs b3cgKi8KKyAgICAgICAgZWxzZSBpZiAoKCFmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAg ICAmJiBjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0 aW9uID09IFBSRV9aVikKKyAgICAgICAgICAgICAgICAgfHwgKGZpbGxfY29sdW1uX3AKKyAgICAg ICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiA9PSAwCisgICAgICAgICAgICAgICAg ICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbAorICAgICAgICAgICAgICAgICAgICAgJiYg cm93X3Bvc2l0aW9uID09IFBSRV9aVikpCisgICAgICAgICAgeworICAgICAgICAgICAgbHNsX2Zn LT5yZWQgPSBldmVuX2ZvcmVncm91bmQucmVkOworICAgICAgICAgICAgbHNsX2ZnLT5ncmVlbiA9 IGV2ZW5fZm9yZWdyb3VuZC5ncmVlbjsKKyAgICAgICAgICAgIGxzbF9mZy0+Ymx1ZSA9IGV2ZW5f Zm9yZWdyb3VuZC5ibHVlOworICAgICAgICAgIH0KKyAgICAgICAgICAvKiBncmVlbiAqLworICAg ICAgICAgIGVsc2UgaWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAmJiBjdXJy ZW50X2NvbCA+IGZpbGxfY29sCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09 IFBSRV9aVikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbHNsX2ZnLT5yZWQgPSBiZXlv bmRfZmlsbF9mb3JlZ3JvdW5kLnJlZDsKKyAgICAgICAgICAgICAgbHNsX2ZnLT5ncmVlbiA9IGJl eW9uZF9maWxsX2ZvcmVncm91bmQuZ3JlZW47CisgICAgICAgICAgICAgIGxzbF9mZy0+Ymx1ZSA9 IGJleW9uZF9maWxsX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UgaWYgKHJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXNzZW50aWFscy5zcF9mZy5yZWQ7CisgICAgICAgICAg ICAgICAgbHNsX2ZnLT5ncmVlbiA9IGVzc2VudGlhbHMuc3BfZmcuZ3JlZW47CisgICAgICAgICAg ICAgICAgbHNsX2ZnLT5ibHVlID0gZXNzZW50aWFscy5zcF9mZy5ibHVlOworICAgICAgICAgICAg ICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAg IHsKKyAgICAgIGlmIChnbHlwaCAhPSBOVUxMCisgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0g OTUKKyAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19IQkFSKQorICAgICAgICB7CisgICAg ICAgICAgbHNsX2ZnLT5yZWQgPSBlc3NlbnRpYWxzLnNwX2ZnLnJlZDsKKyAgICAgICAgICBsc2xf ZmctPmdyZWVuID0gZXNzZW50aWFscy5zcF9mZy5ncmVlbjsKKyAgICAgICAgICBsc2xfZmctPmJs dWUgPSBlc3NlbnRpYWxzLnNwX2ZnLmJsdWU7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXNzZW50aWFscy5jaF9mZ1tyb3df cG9zaXRpb25dLnJlZDsKKyAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBlc3NlbnRpYWxzLmNo X2ZnW3Jvd19wb3NpdGlvbl0uZ3JlZW47CisgICAgICAgICAgICBsc2xfZmctPmJsdWUgPSBlc3Nl bnRpYWxzLmNoX2ZnW3Jvd19wb3NpdGlvbl0uYmx1ZTsKKyAgICAgICAgICB9CisgICAgICBicmVh azsKKyAgICB9CisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBsc2xfZmct PnJlZCA9IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bvc2l0aW9uXS5yZWQ7CisgICAgICBsc2xfZmct PmdyZWVuID0gZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25dLmdyZWVuOworICAgICAgbHNs X2ZnLT5ibHVlID0gZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25dLmJsdWU7CisgICAgICBi cmVhazsKKyAgICB9CisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBsc2xfZmct PnJlZCA9IGVzc2VudGlhbHMuZmNfZmdbcm93X3Bvc2l0aW9uXS5yZWQ7CisgICAgICBsc2xfZmct PmdyZWVuID0gZXNzZW50aWFscy5mY19mZ1tyb3dfcG9zaXRpb25dLmdyZWVuOworICAgICAgbHNs X2ZnLT5ibHVlID0gZXNzZW50aWFscy5mY19mZ1tyb3dfcG9zaXRpb25dLmJsdWU7CisgICAgICBi cmVhazsKKyAgICB9CisgICAgY2FzZSBDVVJTT1JfSU5ESUNBVE9SOgorICAgIHsKKyAgICAgIHN0 cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICAgICAgZW51bSBmYWNlX2lkIGN1 cnNvcl9mYWNlX2lkID0KKyAgICAgICAgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAm JiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93aW5kb3dz KSkKKyAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgPyBsb29r dXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZl LXByZS16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikKKyAgICAgICAgICA/IGxvb2t1cF9u YW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItcHJlLXp2LWZhY2Ui KSwgdHJ1ZSkKKyAgICAgICAgOiAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgJiYg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykp CisgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAgICAgID8gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2 ZS1hdC16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWKQorICAgICAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVyb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AgICAgaW50IGR1bW15X3ggPSAwOworICAgICAgLyogSWYgbW91c2UgaGln aGxpZ2h0aW5nIGlzIG9uLCB3ZSBtYXkgbmVlZCB0byBkcmF3IGFkamFjZW50CisgICBnbHlwaHMg dXNpbmcgbW91c2UtZmFjZSBoaWdobGlnaHRpbmcuICovCisgICAgICBpZiAoYXJlYSA9PSBURVhU X0FSRUEgJiYgcm93LT5tb3VzZV9mYWNlX3AKKyAgICAgICAgICAmJiBobGluZm8tPm1vdXNlX2Zh Y2VfYmVnX3JvdyA+PSAwCisgICAgICAgICAgJiYgaGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cg Pj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHB0cmRpZmZfdCByb3dfdnBvcyA9IE1BVFJJWF9S T1dfVlBPUyAocm93LCB3LT5jdXJyZW50X21hdHJpeCk7CisgICAgICAgICAgaWYgKHJvd192cG9z ID49IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfcm93CisgICAgICAgICAgICAgICYmIHJvd192cG9z IDw9IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93KQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBjaGVja19tb3VzZV9mYWNlID0gdHJ1ZTsKKyAgICAgICAgICAgICAgbW91c2VfYmVnX2Nv bCA9IChyb3dfdnBvcyA9PSBobGluZm8tPm1vdXNlX2ZhY2VfYmVnX3JvdykKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19jb2wKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgICAgICAgICAgICAgbW91c2VfZW5kX2NvbCA9 IChyb3dfdnBvcyA9PSBobGluZm8tPm1vdXNlX2ZhY2VfZW5kX3JvdykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gaGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9jb2wKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAg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leHQpCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIHMtPmxlZnRfb3ZlcndyaXR0ZW5fcCA9IHRydWU7CisgICAgICAgICAgICAgIHMtPmFj dGlvbl90eXBlID0gYWN0aW9uX3R5cGU7CisgICAgICAgICAgICAgIGxlbmd0aCArPSBzLT5maXJz dF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgICAgcmVsYXRpdmVf eCA9IHN0YXJ0X3ggLSBsZW5ndGg7CisgICAgICAgICAgZm9yIChzID0gaDsgczsgcyA9IHMtPm5l eHQpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPmZpcnN0X2dseXBoLT5yZWxhdGl2 ZV94ID0gcmVsYXRpdmVfeDsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBzLT5maXJzdF9n bHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgICAgc3RhcnQgPSBpOwor ICAgICAgICAgIGNvbXB1dGVfb3ZlcmhhbmdzX2FuZF94ICh0LCBoZWFkLT54LCB0cnVlKTsKKyAg ICAgICAgICBwcmVwZW5kX2dseXBoX3N0cmluZ19saXN0cyAoJmhlYWQsICZ0YWlsLCBoLCB0KTsK KyAgICAgICAgICBpZiAoY2xpcF9oZWFkID09IE5VTEwpCisgICAgICAgICAgICBjbGlwX2hlYWQg PSBoZWFkOworICAgICAgICB9CisgICAgICAvKiBQcmVwZW5kIGdseXBoIHN0cmluZ3MgZm9yIGds eXBocyBpbiBmcm9udCBvZiB0aGUgZmlyc3QgZ2x5cGgKKyAgICAgIHN0cmluZyB0aGF0IG92ZXJ3 cml0ZSB0aGF0IGdseXBoIHN0cmluZyBiZWNhdXNlIG9mIHRoZWlyCisgICAgICByaWdodCBvdmVy aGFuZy4gIEZvciB0aGVzZSBzdHJpbmdzLCBvbmx5IHRoZSBmb3JlZ3JvdW5kIG11c3QKKyAgICAg IGJlIGRyYXduLCBiZWNhdXNlIGl0IGRyYXdzIG92ZXIgdGhlIGdseXBoIHN0cmluZyBhdCBgaGVh ZCcuCisgICAgICBUaGUgYmFja2dyb3VuZCBtdXN0IG5vdCBiZSBkcmF3biBiZWNhdXNlIHRoaXMg d291bGQgb3ZlcndyaXRlCisgICAgICByaWdodCBvdmVyaGFuZ3Mgb2YgcHJlY2VkaW5nIGdseXBo cyBmb3Igd2hpY2ggbm8gZ2x5cGgKKyAgICAgIHN0cmluZ3MgZXhpc3QuICovCisgICAgICBpID0g bGVmdF9vdmVyd3JpdGluZyAoaGVhZCk7CisgICAgICBpZiAoaSA+PSAwKQorICAgICAgICB7Cisg ICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIG92ZXJsYXBfaGw7CisgICAgICAgICAgaWYg KGNoZWNrX21vdXNlX2ZhY2UKKyAgICAgICAgICAgICAgJiYgbW91c2VfYmVnX2NvbCA8IHN0YXJ0 ICYmIG1vdXNlX2VuZF9jb2wgPiBpKQorICAgICAgICAgICAgb3ZlcmxhcF9obCA9IERSQVdfTU9V U0VfRkFDRTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgb3ZlcmxhcF9obCA9IERS QVdfTk9STUFMX1RFWFQ7CisgICAgICAgICAgaWYgKGhsID09IG92ZXJsYXBfaGwgfHwgY2xpcF9o ZWFkID09IE5VTEwpCisgICAgICAgICAgICBjbGlwX2hlYWQgPSBoZWFkOworICAgICAgICAgIE1D X0JVSUxEX0dMWVBIX1NUUklOR1MgKGksIHN0YXJ0LCBoLCB0LCBvdmVybGFwX2hsLCBkdW1teV94 LCBsYXN0X3gpOworICAgICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAgICAg ICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICAgICAgY29tcHV0ZV9v dmVyaGFuZ3NfYW5kX3ggKHQsIGhlYWQtPngsIHRydWUpOworICAgICAgICAgIHByZXBlbmRfZ2x5 cGhf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9URVhUOworICAgICAgICAgIGlm IChobCA9PSBvdmVybGFwX2hsIHx8IGNsaXBfdGFpbCA9PSBOVUxMKQorICAgICAgICAgICAgY2xp cF90YWlsID0gdGFpbDsKKyAgICAgICAgICBpKys7ICAgICAgLyogV2UgbXVzdCBpbmNsdWRlIHRo ZSBJdGggZ2x5cGguICovCisgICAgICAgICAgTUNfQlVJTERfR0xZUEhfU1RSSU5HUyAoZW5kLCBp LCBoLCB0LCBvdmVybGFwX2hsLCB4LCBsYXN0X3gpOworICAgICAgICAgIGZvciAocyA9IGg7IHM7 IHMgPSBzLT5uZXh0KQorICAgICAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7 CisgICAgICAgICAgY29tcHV0ZV9vdmVyaGFuZ3NfYW5kX3ggKGgsIHRhaWwtPnggKyB0YWlsLT53 aWR0aCwgZmFsc2UpOworICAgICAgICAgIGFwcGVuZF9nbHlwaF9zdHJpbmdfbGlzdHMgKCZoZWFk LCAmdGFpbCwgaCwgdCk7CisgICAgICAgIH0KKyAgICAgIHRhaWwgPSBnbHlwaF9zdHJpbmdfY29u dGFpbmluZ19iYWNrZ3JvdW5kX3dpZHRoICh0YWlsKTsKKyAgICAgIGlmIChjbGlwX3RhaWwpCisg ICAgICAgIGNsaXBfdGFpbCA9IGdseXBoX3N0cmluZ19jb250YWluaW5nX2JhY2tncm91bmRfd2lk dGggKGNsaXBfdGFpbCk7CisgICAgICBpZiAoY2xpcF9oZWFkIHx8IGNsaXBfdGFpbCkKKyAgICAg ICAgZm9yIChzID0gaGVhZDsgczsgcyA9IHMtPm5leHQpCisgICAgICAgICAgeworICAgICAgICAg ICAgcy0+Y2xpcF9oZWFkID0gY2xpcF9oZWFkOworICAgICAgICAgICAgcy0+Y2xpcF90YWlsID0g Y2xpcF90YWlsOworICAgICAgICAgIH0KKyAgICB9CisgIC8qIERyYXcgYWxsIHN0cmluZ3MuICov CisgIGZvciAocyA9IGhlYWQ7IHMgJiYgZHJhd19wO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JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgIHsKKyAg ICAgIGludCB0ZW1wX3ggPSB4OworICAgICAgaW50IGhlYWRlcl9saW5lX2hlaWdodCA9IFdJTkRP V19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgY3Vyc29yX2dseXBoID0gbWNfZ2V0X2N1 cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhwb3MsIHZwb3MpOworICAgICAgaWYgKGN1cnNv cl9nbHlwaCA9PSBOVUxMKQorICAgICAgICB7CisgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6ICByZXR1cm4gKCVkKVxu IiwgNyk7CisgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CisgICAgICBpbnQgdGVtcF93ZCA9 IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICBpZiAodGVtcF94IDwgMCkKKyAgICAg ICAgeworICAgICAgICAgIHRlbXBfd2QgKz0gdGVtcF94OworICAgICAgICAgIHRlbXBfeCA9IDA7 CisgICAgICAgIH0KKyAgICAgIHRlbXBfd2QgPSBtaW4gKHdkLCB3aW5kb3dfYm94X3dpZHRoICh3 LCBURVhUX0FSRUEpIC0gdGVtcF94KTsKKyAgICAgIGludCBmeSA9IFdJTkRPV19UT19GUkFNRV9Q SVhFTF9ZICh3LCBtYXggKGhlYWRlcl9saW5lX2hlaWdodCwgcm93LT55KSk7CisgICAgICBpbnQg ZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB0ZW1wX3gpOworICAgICAgaWYg KHRlbXBfd2QgPiAwKQorICAgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVhcl9mcmFtZV9hcmVhIChm LCBmeCwgZnksIHRlbXBfd2QsIHJvdy0+dmlzaWJsZV9oZWlnaHQpOworICAgIH0KKyAgLyogRXJh c2UgdGhlIGN1cnNvciB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k cmF3cyB0aGUgZnJpbmdlIGJpdG1hcHMuICovCit2b2lkCittY19kcmF3X2VyYXNlX2h5YnJpZCAo c3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5 cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHks IGludCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGludCBoLAorICAgICAgICAgICAg ICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lk dGgsCisgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2wsIGJvb2wgYWN0aXZl X3AsIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICBi b29sIHJlbW92ZV9wKQoreworICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29udGFp bnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgZWFzc2VydCAobWF0cml4ICYmIG1hdHJpeC0+cm93 cyk7CisgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICBi b29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJpeCAmJiBtYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0 cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgcmV0dXJuOworICBib29sIGJhcmZfY3Jh c2hfdHdvID0gKHZwb3MgPj0gMCAmJiB2cG9zIDwgbWF0cml4LT5ucm93cykgPyBmYWxzZSA6IHRy dWU7CisgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICByZXR1cm47CisgIGlmICh4IDwgMAorICAg ICAgfHwgeSA8IDAKKyAgICAgIHx8IGhwb3MgPCAwCisgICAgICB8fCB2cG9zIDwgMCkKKyAgICBy ZXR1cm47CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBib29sIGF1 dG9faHNjcm9sbF9tb2RlX3AgPSBFUSAoRmJ1ZmZlcl9sb2NhbF92YWx1ZSAoUWF1dG9faHNjcm9s bF9tb2RlLCB3LT5jb250ZW50cyksIFFjdXJyZW50X2xpbmUpOworICAvKiBFWEFNUExFOiAgKHNj cm9sbC1sZWZ0IDUpICovCisgIGJvb2wgaHNjbF9hbGxfdGVtcF9wID0gKHctPnN1c3BlbmRfYXV0 b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2Rl X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVYQU1QTEU6 ICBDLXUgQy14IDwgYW5kIGRvIG5vdGhpbmcuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8wX3Ag PSAody0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9s bCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3 LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIGVs c2UgYmVzaWRlcyBob3Jpem9udGFsbHkgc2Nyb2xsaW5nIHRoZQorICAgICAgICAgICAgICAgY3Vy cmVudCBsaW5lIGRpZmZlcmVudGx5LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9u b3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2Fs bF9wZXJtXzFfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5f aHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgLi4u CisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9yaXpvbnRhbGx5IHNjcm9s bGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMl9wID0gKCF3LT5zdXNw ZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNj cm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID09 IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xs KTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1KTsgYW5kLCB0aGVuIHByZXNzIHRoZSBs ZWZ0IGFycm93IGtleSBvbmUgdGltZS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNf IGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4qLworICBib29sIGhzY2xfdGVtcF9w ID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1 dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBF WEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgdGhhdCBjYXVzZXMgdGhlIGN1cnJl bnQgbGluZSB0byBiZQorICAgICAgICAgICAgICAgaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZl cmVudGx5LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18gaG9yaXpvbnRhbGx5IHNj cm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfcGVybV9wID0gKCF3LT5zdXNwZW5k X2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2Rl X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAg ICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYm IHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwpOworICBpbnQgZnJpbmdlX2JpdG1hcCA9IE1D X05PX0ZSSU5HRV9CSVRNQVA7CisgIGludCBmYWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOworICBp ZiAoIXJlbW92ZV9wCisgICAgICAmJiBnbHlwaF9mbGF2b3IgPT0gTUNfT1ZFUkxBWV9BUlJPV19C SVRNQVAKKyAgICAgICYmICFoc2NsX2FsbF90ZW1wX3AKKyAgICAgICYmICFoc2NsX3RlbXBfcAor ICAgICAgJiYgIWhzY2xfcGVybV9wCisgICAgICAmJiAhaHNjbF9hbGxfcGVybV8wX3AKKyAgICAg ICYmICFoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMl9wKQorICAg IHsKKyAgICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQgPQorICAgICAgICAo IWFjdGl2ZV9wCisgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAo dywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWluYWN0aXZlLXByZS16di1mYWNlIiksIEZS SU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICA/IGxv b2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1wcmUtenYt ZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7 CisgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkK KyAgICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAgICAgICAgICAgICAg IDogREVGQVVMVF9GQUNFX0lEOworICAgICAgaWYgKHctPmhzY3JvbGwgIT0gMCkKKyAgICAgICAg ZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLW92ZXJs YXktYXJyb3ciKSwgZmFsc2UsIHRydWUpOworICAgICAgICBlbHNlCisgICAgICAgICAgZnJpbmdl X2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLW92ZXJsYXktYXJy b3ciKSwgdHJ1ZSwgdHJ1ZSk7CisgICAgICByb3ctPmxlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJz b3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICByb3ctPmxlZnRfZnJpbmdlX2ZhY2VfaWQg PSBmYWNlX2lkOworICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgcm93 LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxzZTsKKyAgICB9CisgICAgZWxzZSBpZiAo IXJlbW92ZV9wCisgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlfQVJS T1dfQklUTUFQCisgICAgICAgICAgICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICAg ICAgICB8fCBoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9w ZXJtXzFfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAg ICAgICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3Blcm1fcCkp CisgICAgICB7CisgICAgICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQgPQor ICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICAgID8gbG9va3Vw X2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtaW5hY3Rp dmUtcHJlLXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgOiAoYWN0 aXZlX3ApCisgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAo Iistb3ZlcmxheS1hcnJvdy1oc2NsLXByZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVl KQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICBmYWNlX2lkID0gKGN1cnNv cl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgID8gb3Zl cmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsK KyAgICAgICAgaWYgKGhzY2xfYWxsX3Blcm1fMF9wKQorICAgICAgICAgIGZyaW5nZV9iaXRtYXAg PSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2Us IGZhbHNlKTsKKyAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzFfcCkKKyAgICAgICAg ICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1o c2NsLXBlcm0iKSwgdHJ1ZSwgZmFsc2UpOworICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9hbGxf cGVybV8yX3ApCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2Jp dG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIHRydWUpOworICAgICAgICAg ICAgICBlbHNlIGlmIChoc2NsX3Blcm1fcCkKKyAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFw ID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUs IHRydWUpOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkKKyAgICAg ICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50 ZXJuICgiKy1oc2NsLXRlbXAiKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICAgIGVs c2UgaWYgKGhzY2xfdGVtcF9wKQorICAgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0g bWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10ZW1wIiksIHRydWUsIGZh bHNlKTsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0g TUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNf Tk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gZmFj ZV9pZDsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICByb3ct PmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAgICAgfQorICAgICAgZWxzZSBp ZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgICAmJiAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExP V19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2 b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAg ICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFCisgICAgICAg ICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJP VworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3Ig PT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09 IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKSkKKyAgICAgICAgeworICAgICAgICAg IExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19S RUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGVfcmlnaHRfYXJyb3cKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExP V19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvdworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNf SE9MTE9XX1JFQ1RBTkdMRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFy X3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGlj YWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNf cmV2ZXJzZWRfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9iYWNr c2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBRbmlsOworICAg ICAgICAgIGZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJ VE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZnJpbmdlX2JpdG1hcCAo Yml0bWFwX2ZsYXZvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0Vf QklUTUFQOworICAgICAgICAgIGZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJ TkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19S RVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgICAgID8gbG9va3VwX2Rlcml2 ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2UiKSwgRlJJ TkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09 IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhf Zmxhdm9yICE9IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAg ICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3Ig IT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgID8gbG9v a3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1iYXItcHJlLXp2LWZhY2UiKSwgRlJJ TkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lE OworICAgICAgICAgIHJvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gZmFsc2U7CisgICAgICAgICAg cm93LT5yaWdodF9mcmluZ2VfYml0bWFwID0gZnJpbmdlX2JpdG1hcDsKKyAgICAgICAgICByb3ct PnJpZ2h0X2ZyaW5nZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgICAgICByb3ctPnJpZ2h0X2Zy aW5nZV9vZmZzZXQgPSAwOworICAgICAgICAgIHJvdy0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19w ID0gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoZ2x5cGhfZmxhdm9yID09IE1D X0dMWVBICisgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1Mp CisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBvbl9wID0gdHJ1ZTsKKyAgICAgICAgICAg IEZSQU1FX1JJRiAoZiktPm1jX3NjcmliZV9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwg eSwgZnksIGhwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB2cG9zLCB3ZCwgaCwgbHNsLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgZ2x5cGhfZmxhdm9yLCBvbl9wLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX3ApOwor ICAgICAgICAgIH0KK30KKworLyogRHVtcCBjb250ZW50cyBvZiBnbHlwaCBHTFlQSCB0byBzdGRl cnIuICBST1cgYW5kIEFSRUEgYXJlCisgICB0aGUgZ2x5cGggcm93IGFuZCBhcmVhIHdoZXJlIHRo ZSBnbHlwaCBjb21lcyBmcm9tLiAqLwordm9pZAorbWNfZHVtcF9nbHlwaCAoc3RydWN0IGdseXBo X3JvdyAqcm93LCBzdHJ1Y3QgZ2x5cGggKmdseXBoLCBpbnQgYXJlYSwKKyAgICAgICAgICAgICAg IGludCByZWxhdGl2ZV94LCBpbnQgdnBvcykKK3sKKyAgYm9vbCBnbHlwaF96dl9wID0gKGdseXBo IC0gcm93LT5nbHlwaHNbYXJlYV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAg ICAgICAgICAgJiYgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgIGlmIChn bHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICB8fCBnbHlwaC0+dHlwZSA9PSBHTFlQSExF U1NfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBE ImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2Qg JXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAg ICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisg ICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisg ICAgICAgICA/ICdDJworICAgICAgICAgOiAnRycpLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywK KyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAg ICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAg ICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAgICAg ICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAg IGdseXBoLT51LmNoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxl ZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAg IGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgIG1jX2NoYXJf dG9fc3RyaW5nIChnbHlwaC0+dS5jaCkpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUg PT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAg ICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEu MWQgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFd LAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0g LSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAgICBnbHlwaC0+ Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICcw JworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAg ICAgIDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94 X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBo LT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICJcXFMiKTsKKyAgICB9 CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBIKQorICAgIHsKKyAgICAgIGZw cmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMg JTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDAp ID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAg ICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGds eXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lk LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVf cCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9z LCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisgICAgfQorICBlbHNl IGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpCisgICAgeworICAgICAgZnByaW50 ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2Qg MHglMDZ4IiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAg ICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAg ICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJysnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywK KyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdCJworICAg ICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAg ICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICcwJworICAgICAg ICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICh1bnNp Z25lZCBpbnQpIGdseXBoLT51LmNtcC5pZCk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTRk ICUxLjFkJTEuMWQiLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxl ZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3ApOworICAgICAg aWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAg JTNkICVzIC4gWyVkLSVkXVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+aHBv cywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAgICAgICAgICAgICAgICAgIGds eXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNtcC50byk7CisgICAgICAgIGVsc2UK KyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG4iKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBo LT50eXBlID09IFhXSURHRVRfR0xZUEgpCisgICAgeworI2lmbmRlZiBIQVZFX1hXSURHRVRTCisg ICAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAg ICAgICAiICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAlM2QgMHglMDV4ICU0ZCAlMS4xZCUxLjFk ICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwK KyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0g MSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdYJywKKyAgICAgICAgZ2x5cGgtPmNo YXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICA/ICdC JworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1Mn CisgICAgICAgICA6ICctJykpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAg IGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnUueHdpZGdldCwKKyAg ICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgJy4n KTsKKyNlbmRpZgorICAgIH0KK30KKworLyogRHVtcCB0aGUgY29udGVudHMgb2YgZ2x5cGggcm93 IGF0IFZQT1MgaW4gTUFUUklYIHRvIHN0ZGVyci4KKyAgIEdMWVBIUyAwIG1lYW5zIGRvbid0IHNo b3cgZ2x5cGggY29udGVudHMuCisgICBHTFlQSFMgMSBtZWFucyBzaG93IGdseXBocyBpbiBzaG9y dCBmb3JtCisgICBHTFlQSFMgPiAxIG1lYW5zIHNob3cgZ2x5cGhzIGluIGxvbmcgZm9ybS4gKi8K K3ZvaWQKK21jX2R1bXBfZ2x5cGhfcm93IChzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB2cG9z LCBpbnQgZ2x5cGhzKQoreworICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgIGlmIChnbHlwaHMgIT0g MSkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbkRVTVAgR0xZUEggUk9XXG4iKTsK KyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlJvdyAgICAgU3RhcnQgICAgICAgRW5kIFVzZWQgb0U+ PFxcQ1RaRmVzbSAgICAgWCAgICBZICAgIFcgICAgSCAgICBWICAgIEEgICAgUFxuIik7CisgICAg ICBmcHJpbnRmIChzdGRlcnIsICI9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworICAgICAgZnBy aW50ZiAoc3RkZXJyLCAiJTNkICU5InBEImQgJTkicEQiZCAlNGQgJTEuMWQlMS4xZCUxLjFkJTEu MWRcCislMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkICAlNGQgJTRkICU0 ZCAlNGQgJTRkICU0ZCAlNGRcbiIsCisgICAgICAgICB2cG9zLAorICAgICAgICAgTUFUUklYX1JP V19TVEFSVF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAo cm93KSwKKyAgICAgICAgIHJvdy0+dXNlZFtURVhUX0FSRUFdLAorICAgICAgICAgcm93LT5jb250 YWluc19vdmVybGFwcGluZ19nbHlwaHNfcCwKKyAgICAgICAgIHJvdy0+ZW5hYmxlZF9wLAorICAg ICAgICAgcm93LT50cnVuY2F0ZWRfb25fbGVmdF9wLAorICAgICAgICAgcm93LT50cnVuY2F0ZWRf b25fcmlnaHRfcCwKKyAgICAgICAgIHJvdy0+Y29udGludWVkX3AsCisgICAgICAgICBNQVRSSVhf Uk9XX0NPTlRJTlVBVElPTl9MSU5FX1AgKHJvdyksCisgICAgICAgICBNQVRSSVhfUk9XX0RJU1BM QVlTX1RFWFRfUCAocm93KSwKKyAgICAgICAgIHJvdy0+ZW5kc19hdF96dl9wLAorICAgICAgICAg cm93LT5maWxsX2xpbmVfcCwKKyAgICAgICAgIHJvdy0+ZW5kc19pbl9taWRkbGVfb2ZfY2hhcl9w LAorICAgICAgICAgcm93LT5zdGFydHNfaW5fbWlkZGxlX29mX2NoYXJfcCwKKyAgICAgICAgIHJv dy0+bW91c2VfZmFjZV9wLAorICAgICAgICAgcm93LT54LAorICAgICAgICAgcm93LT55LAorICAg ICAgICAgcm93LT5waXhlbF93aWR0aCwKKyAgICAgICAgIHJvdy0+aGVpZ2h0LAorICAgICAgICAg cm93LT52aXNpYmxlX2hlaWdodCwKKyAgICAgICAgIHJvdy0+YXNjZW50LAorICAgICAgICAgcm93 LT5waHlzX2FzY2VudCk7CisgICAgICAvKiBUaGUgbmV4dCAzIGxpbmVzIHNob3VsZCBhbGlnbiB0 byAiU3RhcnQiIGluIHRoZSBoZWFkZXIuICovCisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAg JTkicEQiZCAlOSJwRCJkXHQlNWRcbiIsIHJvdy0+c3RhcnQub3ZlcmxheV9zdHJpbmdfaW5kZXgs CisgICAgICAgICByb3ctPmVuZC5vdmVybGF5X3N0cmluZ19pbmRleCwKKyAgICAgICAgIHJvdy0+ Y29udGludWF0aW9uX2xpbmVzX3dpZHRoKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgICAl OSJwRCJkICU5InBEImRcbiIsCisgICAgICAgICBDSEFSUE9TIChyb3ctPnN0YXJ0LnN0cmluZ19w b3MpLAorICAgICAgICAgQ0hBUlBPUyAocm93LT5lbmQuc3RyaW5nX3BvcykpOworICAgICAgZnBy aW50ZiAoc3RkZXJyLCAiICAgICU5ZCAlOWRcbiIsIHJvdy0+c3RhcnQuZHB2ZWNfaW5kZXgsCisg ICAgICAgICByb3ctPmVuZC5kcHZlY19pbmRleCk7CisgICAgfQorICBpZiAoZ2x5cGhzID4gMSkK KyAgICB7CisgICAgICBmb3IgKGludCBhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExB U1RfQVJFQTsgKythcmVhKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlw aCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGhfZW5k ID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgLyogR2x5cGggZm9yIGEgbGlu ZSBlbmQgaW4gdGV4dC4gKi8KKyAgICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5 cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5 cGhfZW5kOworICAgICAgICAgIGlmIChnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAgICAgICAgIGZw cmludGYgKHN0ZGVyciwgIkdseXBoIy9Ub3RhbCBSZWwuWCBUICAgICAgIFBvcyBPICAgVyAgICAg Q29kZSBGYWNlIExSIEhQT1MgWlYgQ1xuIik7CisgICAgICAgICAgZm9yICg7IGdseXBoIDwgZ2x5 cGhfZW5kOyArK2dseXBoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19kdW1wX2ds eXBoIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB2cG9zKTsKKyAgICAgICAgICAgICAg cmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAg IH0KKyAgICB9CisgICAgZWxzZSBpZiAoZ2x5cGhzID09IDEpCisgICAgICB7CisgICAgICAgIGNo YXIgc1tTSFJUX01BWCArIDRdOworICAgICAgICBmb3IgKGludCBhcmVhID0gTEVGVF9NQVJHSU5f QVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICAgIHsKKyAgICAgICAgICAg IGludCBpOworICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHJvdy0+dXNlZFthcmVhXTsgKytp KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9 IHJvdy0+Z2x5cGhzW2FyZWFdICsgaTsKKyAgICAgICAgICAgICAgICBpZiAoaSA9PSByb3ctPnVz ZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICYmIGFyZWEgPT0gVEVYVF9BUkVBCisg ICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAg ICAgICAgICYmIGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggPT0gJyAnKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBzdHJjcHkgKCZzW2ldLCAiW1xcbl0iKTsKKyAgICAgICAgICAgICAgICAgICAgaSAr PSA0OworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZ2x5 cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGgtPnUuY2ggPCAweDgwCisgICAgICAgICAgICAgICAgICAgICAgICAgIC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QorICAgIHsKKyAgICAgIGludCBkMSwgZDIsIGQzLCBkNCwg ZDUsIHlwb3M7CisgICAgICBib29sIHZpc2libGVfcCA9IHBvc192aXNpYmxlX3AgKHcsIFBULCAm ZDEsICZkMiwgJmQzLCAmZDQsICZkNSwgJnlwb3MpOworICAgICAgaW50IGhlYWRlcl9saW5lX2hl aWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgaW50IHZvZmZzZXQg PSAoaGVhZGVyX2xpbmVfaGVpZ2h0ID4gMAorICAgICAgICAgICAgICAgICAgICAgJiYgeXBvcyA+ IDApCisgICAgICAgICAgICAgICAgICAgICAgPyB5cG9zICsgMQorICAgICAgICAgICAgICAgICAg ICAgIDogeXBvczsKKyAgICAgIGlmICh2aXNpYmxlX3ApCisgICAgICAgIHZwb3MgPSB2b2Zmc2V0 OworICAgICAgICBlbHNlCisgICAgICAgICAgdnBvcyA9IDA7CisgICAgfQorICAgIGVsc2UKKyAg ICAgIHsKKyAgICAgICAgQ0hFQ0tfTlVNQkVSIChyb3cpOworICAgICAgICB2cG9zID0gWEZJWE5V TSAocm93KTsKKyAgICAgIH0KKyAgaWYgKHZwb3MgPj0gMCAmJiB2cG9zIDwgbWF0cml4LT5ucm93 cykKKyAgICBtY19kdW1wX2dseXBoX3JvdyAoTUFUUklYX1JPVyAobWF0cml4LCB2cG9zKSwKKyAg ICAgICAgdnBvcywKKyAgICAgICAgVFlQRV9SQU5HRURfRklYTlVNUCAoaW50LCBnbHlwaHMpID8g WEZJWE5VTSAoZ2x5cGhzKSA6IDIpOworICByZXR1cm4gUW5pbDsKK30KKwordm9pZAorbWNfZHVt cF9nbHlwaF9tYXRyaXggKHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgaW50IGdseXBocykK K3sKKyAgaW50IGk7CisgIGZvciAoaSA9IDA7IGkgPCBtYXRyaXgtPm5yb3dzOyArK2kpCisgICAg bWNfZHVtcF9nbHlwaF9yb3cgKE1BVF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ID0gJWQsIHZwb3MgPSAlZFxu IiwKKyAgICAgdy0+Y3Vyc29yLngsIHctPmN1cnNvci55LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vy c29yLnZwb3MpOworICBmcHJpbnRmIChzdGRlcnIsICI9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT1cbiIpOworICBtY19kdW1wX2dseXBoX21hdHJpeCAody0+Y3Vy cmVudF9tYXRyaXgsCisgICAgICAgICBUWVBFX1JBTkdFRF9GSVhOVU1QIChpbnQsIGdseXBocykg PyBYRklYTlVNIChnbHlwaHMpIDogMCk7CisgIHJldHVybiBRbmlsOworfQorCitib29sCittY190 cmF2ZXJzZV9jYWNoZV9wIChzdHJ1Y3QgbWNfbWF0cml4IG1hdHJpeCwgZW51bSBtY19jYWNoZV90 eXBlIGNhY2hlX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICBpbnQgdm50aCwgaW50IG50aCkK K3sKKyAgaWYgKHZudGggPCBtYXRyaXgudnBvc191c2VkCisgICAgICAmJiBtYXRyaXguY3Vyc29y c191c2VkW2NhY2hlX3R5cGVdID4gMAorICAgICAgJiYgbnRoIDwgbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVfdXNlZFtjYWNoZV90eXBlXSkKKyAgICByZXR1cm4gdHJ1ZTsKKyAgICBlbHNlCisgICAg ICByZXR1cm4gZmFsc2U7Cit9CisKK3ZvaWQKK21jX3Jlc2V0X2NhY2hlIChzdHJ1Y3Qgd2luZG93 ICp3KQoreworICBpZiAoIUJVRkZFUlAgKHctPmNvbnRlbnRzKSkKKyAgICByZXR1cm47CisgIGZv ciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICBjYWNo ZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAgICAgIGJv b2wgYnZhcl9hY3RpdmVfcDsKKyAgICAgIHN3aXRjaCAoY2FjaGVfdHlwZSkKKyAgICAgICAgewor ICAgICAgICAgIGNhc2UgTk9fQ0FDSEU6CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHJl dHVybjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBjYXNlIE1DX0NBQ0hFOgorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAg ICAgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkK KyAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAg ZWxzZSBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAg JiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKQorICAgICAg ICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IHRydWU7CisgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgICAgfQorICAgICAgICAgIGNhc2UgQ0hfQ0FDSEU6CisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAg ICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAg ICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBlbHNl IGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgICAg ICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICB9CisgICAgICAgICAgY2FzZSBGQ19DQUNIRToKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAg JiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAg ICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IGZhbHNlOworICAgICAgICAgICAgICAgIGVsc2Ug aWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICAgICAgICYmICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkKKyAgICAgICAg ICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSB0cnVlOworICAgICAgICAgICAgICBicmVhazsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKCFidmFyX2FjdGl2ZV9wKQorICAgICAg ICB7CisgICAgICAgICAgLyogRGVjcmVhc2UgdGhlIHNpemUgb2YgdGhlIGFycmF5IHRvIGEgYmFy ZSBtaW5pbXVtLiAqLworICAgICAgICAgIGZvciAoaW50IHZudGggPSAwOyB2bnRoIDwgdy0+bWNf bWF0cml4LnZwb3NfdXNlZDsgKyt2bnRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBp ZiAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdID4g MSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXSA9CisgICAgICAgICAgICAgICAgICAgIHhucmVhbGxv YyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0sIDEsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA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bdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5nbHlwaC5zbGljZS5pbWcueCA9PSBnbHlwaC0+c2xp Y2UuaW1nLngKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhdLmdseXBoLnNsaWNlLmltZy55ID09IGdseXBoLT5zbGljZS5pbWcueQor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uZ2x5cGguc2xpY2UuaW1nLndpZHRoID09IGdseXBoLT5zbGljZS5pbWcud2lkdGgKKyAg ICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmdseXBoLnNsaWNlLmltZy5oZWlnaHQgPT0gZ2x5cGgtPnNsaWNlLmltZy5oZWlnaHQKKyAg ICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmdseXBoLnNsaWNlLmNtcC5mcm9tID09IGdseXBoLT5zbGljZS5jbXAuZnJvbQorICAgICAg ICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u eCA9PSB4CisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXS5meCA9PSBmeAorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueSA9PSB5CisgICAgICAgICAgICAgJiYgdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meSA9PSBmeQorICAg ICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhd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Byb3csIHgsIGZ4LCB5LCBm eSwgaHBvcywgdnBvcywgd2QsIGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwgZ2x5cGhfZmxhdm9y LCByZW1vdmVfcCk7CisgICAgICByZXR1cm47CisgICAgfQorICAgIGVsc2UgaWYgKGRyYXdfcAor ICAgICAgICAgICAgICYmIChmcm9tX3doZXJlID09IFNDUklCRV9PTkUKKyAgICAgICAgICAgICAg ICAgfHwgZnJvbV93aGVyZSA9PSBTQ1JJQkVfVFdPCisgICAgICAgICAgICAgICAgIHx8IGZyb21f d2hlcmUgPT0gU0NSSUJFX1RIUkVFCisgICAgICAgICAgICAgICAgIHx8IGZyb21fd2hlcmUgPT0g Tk9XSEVSRSkpCisgICAgICB7CisgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCBtYXRy aXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwgY3Vyc29yX3R5cGUsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFj dGl2ZV9wLCBnbHlwaF9mbGF2b3IsIHJlbW92ZV9wKTsKKyAgICAgICAgcmV0dXJuOworICAgICAg fQorICBpZiAoY2FjaGVfdHlwZSA9PSBOT19DQUNIRSkKKyAgICByZXR1cm47CisgICsrdy0+bWNf bWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgaWYgKHZudGggPj0gdy0+bWNfbWF0 cml4LnZwb3NfdXNlZCkKKyAgICB3LT5tY19tYXRyaXgudnBvc191c2VkID0gdm50aCArIDE7Cisg IGlmICh3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQgPCB3LT5tY19tYXRyaXgudnBvc191c2Vk KQorICAgIHsKKyAgICAgIGludCBvbGRfYWxsb2MgPSB3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GVfdHlwZV0gPSB4cGFsbG9jICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNo ZV90eXBlXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbmV3X2VsdHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIElOVF9NQVgsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAqdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0pOworICAgICAgbWVtc2V0ICh3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXSArIG9sZF9hbGxvYywgMCwKKyAgICAgICAg ICAgICAgICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlw ZV0gLSBvbGRfYWxsb2MpCisgICAgICAgICAgICAgICAgICogc2l6ZW9mICp3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXSk7CisgICAgfQorICBpbnQgbnRoID0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSAtIDE7CisgIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uc2FtZV9wID0gZmFsc2U7Cisg IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGgudHlw ZSA9IGdseXBoL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ICAgICAgcHJldmlvdXMvbmV4dCBsaW5lLiAgVGhlIEZY IGNvb3JkaW5hdGUgaXMgc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBl bHNld2hlcmU6ICBgdy0+Y3Vyc29yLnhgIC8gYG1jLmZjX3hgLiAqLwordm9pZAorbWNfZ2V0X2N1 cnNvcl9nZW9tZXRyeSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0 cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQg eCwgaW50ICpmeCwgaW50IHksCisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgKmZ5LCBpbnQg aHBvcywgaW50IHZwb3MsIGludCAqaCwKKyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNf Y3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsIGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAg ICAgICAgICAgICBpbnQgKndkKQoreworICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gbWNfZ2V0X2N1 cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhwb3MsIHZwb3MpOworICBpZiAoZ2x5cGggPT0g TlVMTCkKKyAgICByZXR1cm47CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE9XX0ZS QU1FICh3KSk7CisgICpmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIHgpOwor ICAqaCA9IHJvdy0+dmlzaWJsZV9oZWlnaHQ7CisgIC8qIERvbid0IGxldCB0aGUgY3Vyc29yIGV4 Y2VlZCB0aGUgZGltZW5zaW9ucyBvZiB0aGUgcm93LCBzbyB0aGF0CisgIHRoZSB1cHBlci9sb3dl ciBzaWRlIG9mIHRoZSBib3ggYXJlbid0IGNsaXBwZWQuICAqLworICBpbnQgd19oZWFkZXJfbGlu ZV9oZWlnaHQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgaW50IHdfdGV4dF9i b3R0b21feSA9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KSAtICpoOworICBpZiAoeSA8IHdfaGVh ZGVyX2xpbmVfaGVpZ2h0KQorICAgIHsKKyAgICAgICpoID0gbWF4ICgqaCAtICh3X2hlYWRlcl9s aW5lX2hlaWdodCAtIHkpICsgMSwgKmgpOworICAgICAgeSA9IHdfaGVhZGVyX2xpbmVfaGVpZ2h0 IC0gMTsKKyAgICAgIC8vIGZwcmludGYgKHN0ZGVyciwgIkNPTkRJVElPTiAjIDFcbiIpOworICAg IH0KKyAgIGVsc2UgaWYgKHkgPiB3X3RleHRfYm90dG9tX3kpCisgICAgIHsKKyAgICAgICAqaCAr PSB5IC0gd190ZXh0X2JvdHRvbV95OworICAgICAgIHkgPSB3X3RleHRfYm90dG9tX3k7CisgICAg ICAgLy8gZnByaW50ZiAoc3RkZXJyLCAiQ09ORElUSU9OICMgMlxuIik7CisgICAgIH0KKyAgKmZ5 ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHkpOworICBzd2l0Y2ggKGN1cnNvcl90eXBl KQorICAgIHsKKyAgICAgIGNhc2UgTUNfQkFSOgorICAgICAgICB7CisgICAgICAgICAgaWYgKGN1 cnNvcl93aWR0aCA8IDEpCisgICAgICAgICAgICBjdXJzb3Jfd2lkdGggPSBtYXggKEZSQU1FX0NV UlNPUl9XSURUSCAoZiksIDEpOworICAgICAgICAgIGlmIChjdXJzb3Jfd2lkdGggPCBnbHlwaC0+ cGl4ZWxfd2lkdGgpCisgICAgICAgICAgKndkID0gY3Vyc29yX3dpZHRoOworICAgICAgICAgIGJy ZWFrOworICAgICAgICB9CisgICAgICBjYXNlIE1DX0hCQVI6CisgICAgICAgIHsKKyAgICAgICAg ICBpbnQgY3Vyc29yX2hlaWdodCA9IChjdXJzb3Jfd2lkdGggPCAxKSA/IGxyaW50ICgwLj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yAgICAgICAgICAgICAmJiAheF9zdHJldGNo X2N1cnNvcl9wKQorICAgICAgICAgICAgPyBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAoZiksIGds eXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgIDogZ2x5cGgtPnBpeGVsX3dpZHRoOworICAg IH0KKy8qCisgICAgICBmcHJpbnRmIChzdGRlcnIsICJjdXJzb3Jfd2lkdGg6ICglZCkgfCB4ICgl ZCkgfCAqZnggKCVkKSB8IHkgKCVkKSB8ICpmeSAoJWQpLCAqd2QgKCVkKSB8ICpoICglZClcbiIs CisgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgeCwgKmZ4LCB5LCAqZnksICp3 ZCwgKmgpOworKi8KK30KKwordm9pZAorbWNfZW5naW5lIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1 Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAg ICAgc3RydWN0IGdseXBoICpnbHlwaCwgaW50IGFyZWEsIGludCByZWxhdGl2ZV94LCBpbnQgeF9s aW1pdCwgaW50IHksCisgICAgICAgICAgIGludCBocG9zLCBpbnQgdnBvcywgZW51bSBtY19jdXJz b3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgc3RydWN0 IGdseXBoX21hdHJpeCAqY3Vyc29yX21hdHJpeCwgc3RydWN0IG1jX2Vzc2VudGlhbHMgZXNzZW50 aWFscywKKyAgICAgICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9uLCBzdHJ1 Y3QgbWNfUkdCIGZvcmVncm91bmQsCisgICAgICAgICAgIGVudW0gbWNfZW5naW5lX3R5cGUgYWN0 aW9uX3R5cGUsIGJvb2wgZHJhd19wLAorICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5cGUg ZnJvbV93aGVyZSwgZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUpCit7CisgIGludCBvcG9p bnRfeCA9IHctPmN1cnNvci54OworICBpbnQgb3BvaW50X3kgPSB3LT5jdXJzb3IueTsKKyAgaW50 IG9wb2ludF9ocG9zID0gdy0+Y3Vyc29yLmhwb3M7CisgIGludCBvcG9pbnRfdnBvcyA9IHctPmN1 cnNvci52cG9zOworICBpbnQgZngsIGZ5LCBoLCB3ZDsKKyAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRy eSAodywgbWF0cml4LCByb3csIHJlbGF0aXZlX3gsICZmeCwgeSwgJmZ5LCBocG9zLCB2cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg JndkKTsKKyAgaW50IG9wb2ludF9meCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcs IG9wb2ludF94KTsKKyAgaW50IGZjX2Z4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAo dywgZXNzZW50aWFscy5mY194KTsKKyAgYm9vbCBnbHlwaF96dl9wID0gKGdseXBoIC0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAg ICAgICAmJiBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID09IFpWKTsKKyAgc3RydWN0IGZy YW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVS ICh3LT5jb250ZW50cyk7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dpZHRo ICh3LCBURVhUX0FSRUEpOworICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJzb3Jfcm93ID0gKHctPmN1 cnNvci52cG9zICE9IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRS SVhfUk9XIChjdXJzb3JfbWF0cml4LCB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSAo dy0+Y3Vyc29yLnZwb3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBt Y19nZXRfY3Vyc29yX2dseXBoICh3LCBjdXJzb3JfbWF0cml4LCBjdXJzb3Jfcm93LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29y Lmhwb3MsIHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog TlVMTDsKKyAgYm9vbCBjdXJzb3JfYXRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNvcl9yb3ct PnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jf cm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPmN1cnNvci54ID09IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7Cisg IGJvb2wgY3Vyc29yX2JleW9uZF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAhPSBOVUxMCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jf cm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm ICFjdXJzb3Jfcm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IGN1cnNvcl9yb3ct PnBpeGVsX3dpZHRoKTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lE VEggKGYpOworICBpbnQgdGVtcF9mYWNlX2lkID0gZ2x5cGgtPmZhY2VfaWQ7CisgIHN0cnVjdCBt Y19SR0IgYmFja2dyb3VuZDsKKyAgbWNfc2V0X2xzbF9iZyAodywgdGVtcF9mYWNlX2lkLCAmYmFj a2dyb3VuZCk7CisgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKG9wb2ludF94ID09IHJlbGF0 aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0gaHBv cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSByb3ctPnkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcyk7CisKKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAg Q0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKyAgaWYgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAg IHx8IGdseXBoLT50eXBlID09IEdMWVBITEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRl cnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAl NWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJXNcbiIs CisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ct PnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJl bGF0aXZlX3gsCisgICAgICAgIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICA/ ICdDJworICAgICAgICAgOiAnRycpLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAg KEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RS SU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChO SUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAg IDogJy0nKSkpLAorICAgICAgICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGds eXBoLT51LmNoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRf Ym94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGds eXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgIG1jX2NoYXJfdG9f c3RyaW5nIChnbHlwaC0+dS5jaCkpOworICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUzog IENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAqLworLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAg IG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnks IGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29y X3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tn cm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUs CisgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFr OworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICBIT1JJ Wk9OVEFMX1JVTEVSOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICA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ICB4X2xpbWl0IC0gcmVsYXRpdmVfeCwgaCwg Y3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAgICAg ICAgIGZvcmVncm91bmQsIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBI TEVTUywKKyAgICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUs IGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworLyogICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIENIQVJfR0xZUEggfCBHTFlQ SExFU1NfR0xZUEggICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K KyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGds eXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9y aWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJ Q0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0 X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ct PnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJU SUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dp ZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVT UworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5 cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAg ICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAg ICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICB8fCBnbHlw aF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlw ZSA9IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxw ZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgb3BvaW50X2Z4LCB5LCBmeSwg aHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dy b3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hl cmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJy ZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICBG SUxMX0NPTFVNTjogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAg ICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEZJTExfQ09MVU1OOgorICAg IHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSByb3ctPnBpeGVsX3dpZHRo KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJz KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IHkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgd2QgPSAxOwor ICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4 LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAg ICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3As IGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsK KyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2Ug Q1VSU09SX0lORElDQVRPUjoKKyAgICB7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKyAgfQorICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAg ICAgICAgICAgICAgICAgICAgICAgRU5EOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAg ICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisKKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAg U1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCkKKyAg eworICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAg IlxuICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUx LjFkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFd IC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAgICAgZ2x5cGgt PmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAn QicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdT JworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8g JzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRo LAorICAgICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7 CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwor LyogICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgU1RSRVRDSF9HTFlQ SCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBj YXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAg ICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwg Zm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3Rp dmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2Fj aGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIEhPUklaT05UQUxfUlVMRVI6 ICBTVFJFVENIX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBpZiAocmVs YXRpdmVfeCA8IHJvdy0+cGl4ZWxfd2lkdGgKKyAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNv cl9wKQorICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVf eCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJz b3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAg ICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRy YXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25f dHlwZSk7CisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAg ICAgIHsKKyAgICAgICAgICBpZiAocmVsYXRpdmVfeCA8IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRo OworICAgICAgICAgICAgICBmeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9 CisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gKHJvdy0+ZmlsbF9saW5lX3ApCisgICAgICAgICAg ICAgICAgICAgICAgICAgPyBnbHlwaC0+ZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAg IDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgYmFja2dyb3VuZDsK KyAgICAgICAgICBtY19zZXRfbHNsX2JnICh3LCB0ZW1wX2ZhY2VfaWQsICZiYWNrZ3JvdW5kKTsK KyAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwg ZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgeF9saW1pdCAtIHJl bGF0aXZlX3gsIGgsIGN1cnNvcl90eXBlLCB4X2xpbWl0IC0gcmVsYXRpdmVfeCwKKyAgICAgICAg ICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwgYmFja2dyb3VuZCwgZXNzZW50 aWFscy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgIE1DX0dMWVBITEVTUywgZHJhd19w LCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICAgIH0KKyAgICAg IGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAg ICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAgU1RSRVRDSF9HTFlQSCAgICAgICAgICAgICAg ICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JV TEVSOgorICAgIHsKKyAgICAgIGlmIChyb3ctPmZpbGxfbGluZV9wCisgICAgICAgICAgJiYgZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAg ICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAg ICAgIHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNlX2lkOworICAgICAgICBlbHNlIGlmICghcm93 LT5maWxsX2xpbmVfcAorICAgICAgICAgICAgICAgICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAmJiBvcG9p bnRfeCA+IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgdGVtcF9m YWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOworICAgICAgc3RydWN0IG1jX1JHQiBiYWNrZ3JvdW5k OworICAgICAgbWNfc2V0X2xzbF9iZyAodywgdGVtcF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7Cisg ICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJf QkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3Jf YXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFy b3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJp bmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1 bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJF QV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+ dHJ1bmNhdGVkX29uX3JpZ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LS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJ TjogIElNQUdFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisg IHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAg ICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQl MS4xZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVh XSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBo LT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8g J0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAn UycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0 aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlw aC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgIC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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBl bHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpCisgIHsKKyAgICBpZiAobWNf c3RkZXJyX3ApCisgICAgICB7CisgICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgICAi XG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNngiLAorICAgICAgICAg IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAoKHJvdy0+dXNlZFth cmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgICByZWxhdGl2 ZV94LAorICAgICAgICAgICcrJywKKyAgICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAg ICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicKKyAgICAgICAgICAg OiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgPyAnUycKKyAgICAgICAg ICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgICAgPyAnMCcKKyAg ICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAor ICAgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5pZCk7CisgICAgICAgIGZwcmlu dGYgKHN0ZGVyciwgIiAlNGQgJTEuMWQlMS4xZCIsCisgICAgICAgICAgZ2x5cGgtPmZhY2VfaWQs CisgICAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgICBnbHlwaC0+cmln aHRfYm94X2xpbmVfcCk7CisgICAgICBpZiAoZ2x5cGgtPnUuY21wLmF1dG9tYXR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ICAgICAgd2hpbGUgKHJlbGF0aXZlX3ggPD0geF9saW1pdCkKKyAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4 LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAg ICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dM WVBITEVTUywgZHJhd19wLAorICAgICAgICAgICAgICAgICAgICAgICAgIGZyb21fd2hlcmUsIGNh Y2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBmcmFt ZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAg ICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAg IFZFUlRJQ0FMX1JVTEVSOiAgQ09NUE9TSVRFX0dMWVBIICAgICAgICAgICAgICAgICAgICAqLwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7 CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRf cCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJz b3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm ICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRf ZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+ dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRf QVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51 c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklH SFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElD QUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElD QUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FM X0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOworICAg ICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0 aXZlX3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdk LCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQs CisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIGdseXBo X2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBjYWNoZV90eXBl LCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NPTFVNTjogIENPTVBPU0lU RV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlw aF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFth cmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRp YWxzLmZjX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQ IChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2Fs X3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g TUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dM WVBIOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5 cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAg ICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdy b3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwg Z2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNhY2hl X3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworICAgIGNhc2UgQ1VSU09SX0lORElDQVRPUjoKKyAgICB7CisgICAgICBicmVh azsKKyAgICB9CisvKi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ICBnbHlwaCAtIHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+ dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAg ICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnUycKKyAgICAgICAgICAgIDogJy0nKSksCisgICAgICAgIGdseXBoLT5waXhlbF93 aWR0aCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9s aW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+ dS54d2lkZ2V0LAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0i LAorICAgICAgICAnLicpOworI2VuZGlmCisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBM RV9DVVJTT1JTOiAgWFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAg ICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2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3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgICAgY2Fj aGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8 PSB4X2xpbWl0KQorICAgICAgICB7CisgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4 ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHJlbGF0aXZlX3ggPD0geF9saW1pdCkKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgs IHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAg ICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3Jl Z3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMu YWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19wLAorICAgICAgICAgICAgICAgICAgICAgICAg IGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgICAgICAgICAgcmVs YXRpdmVfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAg ICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFhXSURHRVRfR0xZUEggICAgICAgICAg ICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNB TF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vy c29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg cm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmln aHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jf cm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxh dm9yID09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ID09IHJvdy0+dXNlZFth cmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRp YWxzLmZjX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQ IChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX3ZlcnRpY2Fs X3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g TUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dM WVBIOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gs IGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNv cl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAg ICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBk cmF3X3AsIGZyb21fd2hlcmUsCisgICA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X3Bvc2l0aW9uIHJvd19wb3Np dGlvbiwgYm9vbCBkcmF3X3AsIGVudW0gbWNfZHJhd19yb3dfdHlwZSBmcm9tX3doZXJlKQorewor ICAvLyAgY2xvY2tfdCBjbG9ja19zdGFydCA9IGNsb2NrKCk7CisgIC8qIFczMiBFbWFjcyBjcmFz aGVzIG9uIHN0YXJ0dXAgd2l0aG91dCBhIGBCVUZGRVJQJyBjaGVjayBpbiBgdXBkYXRlX3dpbmRv dycuICovCisgIGlmICghQlVGRkVSUCAody0+Y29udGVudHMpKQorICAgIHJldHVybjsKKyAgc3Ry dWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNvbnRlbnRzKTsKKyAgaWYgKE5JTFAgKEJWQVIg KGIsIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAg ICAmJiBOSUxQIChCVkFSIChiLCBmY192aXNpYmxlKSkpCisgICAgcmV0dXJuOworICBzdHJ1Y3Qg Z2x5cGhfcm93ICpib3R0b21fcm93ID0gTUFUUklYX0JPVFRPTV9URVhUX1JPVyAobWF0cml4LCB3 KTsKKyAgaW50IGJvdHRvbV92cG9zID0gTUFUUklYX1JPV19WUE9TIChib3R0b21fcm93LCBtYXRy aXgpOworICBpZiAodnBvcyA9PSBib3R0b21fdnBvcykKKyAgICByZXR1cm47CisgIGlmICghcm93 LT51c2VkW1RFWFRfQVJFQV0pCisgICAgcmV0dXJuOworICBpbnQgaHBvc19zdGFydCA9IHN0YXJ0 IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgaWYgKG1jX3N0ZGVycl9wKQorICAgIGZwcmlu dGYgKHN0ZGVyciwgIm1jX2RyYXdfcm93ICglZCk6ICBkcmF3X3AgKCVzKSB8IGhwb3MgKCVkKSB8 IGxlbiAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgdnBvcywgZHJhd19wID8gInkiIDog Im4iLCBocG9zX3N0YXJ0LCBocG9zX2xlbmd0aCk7CisgIGludCBvcG9pbnRfZngsIG9wb2ludF9m eSwgb3BvaW50X3dkLCBvcG9pbnRfaDsKKyAgaW50IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19i b3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgIGludCBoZWFkZXJfbGluZV9mb3JtYXQgPSBXSU5E T1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgc3RydWN0IGdseXBoX3JvdyAqY3Vyc29yX3Jv dyA9ICh3LT5jdXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gTUFUUklYX1JPVyAoY3Vyc29yX21hdHJpeCwgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29y X2dseXBoID0gKHctPmN1cnNvci52cG9zICE9IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgY3Vyc29yX21hdHJpeCwgY3Vyc29yX3Jv dywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IE5VTEw7CisgIGJvb2wgY3Vyc29yX2F0X2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlw aCA9PSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0g TlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBj dXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gY3Vyc29yX3Jvdy0+cGl4ZWxf d2lkdGgpOworICBib29sIGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09 IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0g TlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3Mg PT0gY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gdGV4dF9hcmVhX3dp ZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSBj dXJzb3Jfcm93LT5waXhlbF93aWR0aCk7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgUkVQTEFDRSBUSEUgUkVBTCBDVVJTT1IKKyoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworICBlbnVtIGZhY2VfaWQgYmdfZmFjZV9pZCA9IChjdXJzb3JfZ2x5cGgg IT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGN1cnNvcl9nbH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KyAgLyogRVhBTVBMRSAoYnVmZmVy LWxvY2FsKTogIChzZXRxIG1jLXJlYWwtZmFrZS1jdXJzb3IgbmlsLyduby8ibm8iKSAqLworICBl bHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaCAh PSBOVUxMCisgICAgICAgICAgICYmIGN1cnNvcl90eXBlID09IE1DX05PX0NVUlNPUgorICAgICAg ICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICYmIHctPmN1cnNvci5o cG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPCBocG9zX3N0 YXJ0ICsgaHBvc19sZW5ndGgpCisgICAgeworICAgICAgLyogV2hlbiBhIHVzZXIgaGFzIG5vdCBz cGVjaWZpZWQgYSB2YWx1ZSBmb3IgYG1jLXJlYWwtZmFrZS1jdXJzb3InLCBvciB0aGUKKyAgICAg IHZhbHVlIGlzIGBub2AgaW4gdGhlIGZvcm0gb2YgYSBzeW1ib2wgb3Igc3RyaW5nLCB0aGVuIHRo ZSBkZWZhdWx0IHdlIHVzZQorICAgICAgYW4gTUNfQkFSIGFuZCBhbiBNQ19IQkFSIC0tIGJvdGgg aGF2aW5nIGEgY3Vyc29yX3dpZHRoIG9mIDEuICovCisgICAgICBtY19nZXRfY3Vyc29yX2dlb21l dHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsIHctPmN1cnNvci55 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhw b3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBNQ19CQVIsIDEsICZvcG9pbnRfd2QpOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwgb3BvaW50X2Z4LCB3LT5jdXJzb3IueSwK KyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZw b3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAgICAgICAgICAgICAgIE1DX0JBUiwgMSwgcm93 X3Bvc2l0aW9uLCBjdXJzb3JfZmcsIGN1cnNvcl9iZywgZXNzZW50aWFscy5hY3RpdmVfcCwKKyAg ICAgICAgICAgICAgICAgTUNfR0xZUEhMRVNTLCBkcmF3X3AsIGZyb21fd2hlcmUsIE5JTFAgKEJW QVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgICBt Y19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9p bnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2lu dF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBNQ19IQkFSLCAxLCAmb3BvaW50X3dkKTsKKyAgICAgIG1j X2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2lu dF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29y Lmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9oLAorICAgICAgICAgICAg ICAgICBNQ19IQkFSLCAxLCByb3dfcG9zaXRpb24sIGN1cnNvcl9mZywgY3Vyc29yX2JnLCBlc3Nl bnRpYWxzLmFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBNQ19HTFlQSCwgZHJhd19wLCBmcm9t X3doZXJlLCBOSUxQIChCVkFSIChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsK KyAgICB9CisgIGVsc2UgaWYgKCFjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgJiYgY3Vy c29yX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcwor ICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICYm IHctPmN1cnNvci5ocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaC0+dHlwZSAhPSBTVFJFVENIX0dMWVBIKQorICAgIHsKKyAgICAgIG1jX2dl dF9jdXJzb3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwgcm93LCB3LT5jdXJzb3IueCwgJm9wb2ludF9m eCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3BvaW50X2Z5 LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRfaCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZvcG9pbnRfd2Qp OworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJz b3IueCwgb3BvaW50X2Z4LCB3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ICAg eworICAgICAgICAgIC8qIFRoZSBNQ19IQkFSIHNoYWxsIGhhdmUgYSBgY3Vyc29yX3dpZHRoYCBv ZiAxLiAqLworICAgICAgICAgIG1jX2dldF9jdXJzb3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwgcm93 LCB3LT5jdXJzb3IueCwgJm9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB3LT5jdXJzb3IueSwgJm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRfaCwgTUNfSEJB UiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3BvaW50X3dkKTsKKyAg ICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNv ci54LCBvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IueSwgb3BvaW50 X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsCisgICAgICAgICAgICAgICAgICAg ICBvcG9pbnRfd2QsIG9wb2ludF9oLCBNQ19IQkFSLCAxLCByb3dfcG9zaXRpb24sIGN1cnNvcl9m ZywKKyAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9iZywgZXNzZW50aWFscy5hY3RpdmVfcCwg TUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgICAgIE5JTFAg KEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAg ICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgICAg IH0KKyAgICAgIG1jX2dldF9jdXJzb3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwgcm93LCB3LT5jdXJz b3IueCwgJm9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNv ci55LCAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsIGN1cnNvcl90eXBlLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCAmb3BvaW50X3dkKTsKKyAgICAgIG1j X2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2lu dF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29y Lmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9oLAorICAgICAgICAgICAg ICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGN1cnNvcl9mZywg Y3Vyc29yX2JnLAorICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQ SCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBOSUxQIChCVkFSIChiLCBt Y19jb25mKSkKKyAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAgICAgICA6 IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgRFJBVyBBTkQgUkVDT1JEIEZBS0UgQ1VS U09SUworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIGlmICghZXNzZW50aWFscy5hY3RpdmVf cAorICAgICAgJiYgTklMUCAoQlZBUiAoYiwgbWNfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAm JiBOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkKKyAgICAgICYmIE5JTFAgKEJW QVIgKGIsIGZjX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICByZXR1cm47CisgIGlmIChocG9zX2xl bmd0aCA9PSAxKQorICAgIHsKKyAgICAgIGlmICghTklMUCAoQlZBUiAoYiwgbWNfY29uZikpCisg ICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgfHwgKCFlc3Nl bnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWNf aW5hY3RpdmVfd2luZG93cykpKSkpCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUaGUgc3BhY2Ug YXBwZW5kZWQgdG8gYSByb3cgZW5kaW5nIHdpdGggYSBuZXcgbGluZQorICAgICAgICAgIGRvZXMg bm90IGhhdmUgYSBgZ2x5cGgtPmNoYXJwb3NgICgtMSwgMCkgdGhhdCB3ZSBjYW4KKyAgICAgICAg ICB1c2UgZm9yIHRoaXMgcGFydGljdWxhciBhcHBsaWNhdGlvbi4gIFdoZW4gdGhlcmUgaXMgYQor ICAgICAgICAgIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkgdGhhdCBhc3NpZ25zIGEgdmlz aWJsZQorICAgICAgICAgIGdseXBoIHRvIGEgbmV3IGxpbmUsIHRoZXJlIGlzIG5vIHByb2JsZW0g YmVjYXVzZSB0aGF0CisgICAgICAgICAgZ2x5cGggaGFzIGEgYGdseXBoLT5jaGFycG9zJyB0aGF0 IHdlIGNhbiB1c2UuICBXaGVuCisgICAgICAgICAgbm8gdmlzaWJsZSBFT0wgZ2x5cGggZXhpc3Rz LCB3ZSB1c2UgdGhlIGZvbGxvd2luZworICAgICAgICAgIHRlc3Q6ICB0aGUgYXBwZW5kZWQgc3Bh Y2UgaGFzIGEgcG9zaXRpb24gdGhhdCBpcyBvbmUKKyAgICAgICAgICBsZXNzIHRoYW4gdGhlIGVu ZCBvZiB0aGUgbWF0cml4IHJvdy4gKi8KKyAgICAgICAgICBpbnQgaHBvcyA9IHN0YXJ0IC0gcm93 LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnByZXZpb3VzX2ds eXBoID0gKDAgPD0gaHBvcyAtIDEgJiYgaHBvcyAtIDEgPCByb3ctPnVzZWRbVEVYVF9BUkVBXSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyByb3ctPmdseXBoc1tU RVhUX0FSRUFdICsgaHBvcyAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBOVUxMOworICAgICAgICAgIC8vIHN0cnVjdCBnbHlwaCAqbGFzdF9nbHlwaCA9IHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDE7CisgICAgICAg ICAgYm9vbCBza2lwX3AgPSAocHJldmlvdXNfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHByZXZpb3VzX2dseXBoLT5jaGFycG9zID09IE1BVFJJWF9ST1dfRU5EX0NI QVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgc3RhcnQtPmJ5dGVw b3MgIT0gZXNzZW50aWFscy56dl9ieXRlKQorICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRy dWUKKyAgICAgICAgICAgICAgICAgICAgICAgIC8qIFdoZW4gYSBgYnVmZmVyLWRpc3BsYXktdGFi bGUnIGVudHJ5IGNvbnRhaW5zCisgICAgICAgICAgICAgICAgICAgICAgICBhIHZpc2libGUgdGFi IGNoYXJhY3RlciAoIsK7IiksIHRoZSBzdWJzZXF1ZW50CisgICAgICAgICAgICAgICAgICAgICAg ICBTVFJFVENIX0dMWVBIIHdpbGwgaGF2ZSB0aGUgc2FtZSBzdGFydC0+Y2hhcnBvcworICAgICAg ICAgICAgICAgICAgICAgICAgYXMgdGhlIGFmb3JlbWVudGlvbmVkIHZpc2libGUgdGFiIGNoYXJh Y3Rlci4gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIDogKHByZXZpb3VzX2dseXBoICE9IE5V TEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHByZXZpb3VzX2dseXBoLT5jaGFycG9z ID09IHN0YXJ0LT5jaGFycG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAg ICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2U7CisgICAgICAgICAgaW50IHBvc2ludCA9IChy b3dfcG9zaXRpb24gPT0gUE9TVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IC0xCisg ICAgICAgICAgICAgICAgICAgICAgIDogKHJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBlc3NlbnRpYWxzLnp2CisgICAgICAgICAgICAgICAgICAgICAg IDogKHN0YXJ0LT5ieXRlcG9zICE9IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2Vk W1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPV19F TkRfQ0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgOiAoc3RhcnQtPmJ5 dGVwb3MgPT0gZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbVEVYVF9BUkVBXSAt IDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBlc3NlbnRpYWxzLnp2CisgICAgICAgICAg ICAgICAgICAgICAgIDogc3RhcnQtPmNoYXJwb3M7CisgICAgICAgICAgTGlzcF9PYmplY3Qgc3Bl Y3MgPSBtY19hc3NvYyAobWFrZV9maXhudW0gKHBvc2ludCksIEJWQVIgKGIsIG1jX2NvbmYpKTsK KyAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAg ICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICYm ICFOSUxQIChzcGVjcykKKyAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2Jv dHRvbV95ICh3KQorICAgICAgICAgICAgICAmJiAhc2tpcF9wCisgICAgICAgICAgICAgICYmIHJv d19wb3NpdGlvbiAhPSBQT1NUX1pWKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBMaXNw X09iamVjdCBsaXNwX3R5cGUgPSBtY19udGggKDEsIHNwZWNzKTsKKyAgICAgICAgICAgICAgZW51 bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfbGlzcF90b19j dXJzb3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlwZSAobGlzcF90eXBl KTsKKyAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoc3RhcnQtPnR5cGUgPT0gSU1BR0VfR0xZ UEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19IT0xMT1dfQk9YCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAgaW50IGN1 cnNvcl93aWR0aCA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gWEZJWE5VTSAoWENBUiAoWENEUiAobGlzcF90eXBlKSkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IC0xOworICAgICAgICAgICAgICBMaXNwX09iamVjdCBt Y19mb3JlZ3JvdW5kID0gbWNfbnRoICgyLCBzcGVjcyk7CisgICAgICAgICAgICAgIHN0cnVjdCBt Y19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICBpZiAoU1RSSU5HUCAobWNfZm9yZWdyb3VuZCkp CisgICAgICAgICAgICAgICAgbWNfeHdfY29sb3JfdmFsdWVzICh3LCBtY19mb3JlZ3JvdW5kLCAm bHNsX2ZnKTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChWRUNUT1JQIChtY19mb3JlZ3JvdW5k KSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLnJlZCA9 IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAwKSk7CisgICAgICAgICAgICAgICAg ICAgIGxzbF9mZy5ncmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAxKSk7 CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5ibHVlID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1j X2ZvcmVncm91bmQsIDIpKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg IGVsc2UgaWYgKE5JTFAgKG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICBtY19j b2xvcl9waWNrZXIgKHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCBwb3NpbnQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIHJvd19wb3NpdGlv biwgTVVMVElQTEVfQ1VSU09SUyk7CisgICAgICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JP V19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9h cmVhX3dpZHRoOworICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFy dCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0LCByb3ctPnksCisgICAgICAgICAgICAgICAgICAgICAg ICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBjdXJzb3JfdHlwZSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9tYXRyaXgsIGVzc2Vu dGlhbHMsIHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBsc2xfZmcsIE1V TFRJUExFX0NVUlNPUlMsIGRyYXdfcCwgZnJvbV93aGVyZSwgTUNfQ0FDSEUpOworICAgICAgICAg ICAgfQorICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQor ICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgIHx8ICghZXNz ZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZj X2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgLy8gJiYgZXNzZW50aWFscy5mY194IDw9 IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHRleHRfYXJl YV93aWR0aAorICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSB3LT5tYy5sbnVtX3BpeGVs X3dpZHRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHhfbGltaXQgPSB4ICsgc3RhcnQtPnBp eGVsX3dpZHRoOworICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKHctPmN1cnNv ci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPmN1cnNvci55ID09IHJvdy0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52 cG9zID09IHZwb3MpOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAg IG1jX2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19C QVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIEZJTExfQ09MVU1O KTsKKyAgICAgICAgICBpZiAoeCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAvLyB4 ICsgc3RhcnQtPnBpeGVsX3dpZHRoIDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAm JiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAg ICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgJiYgKChzdGFydCAh PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAg ICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHgKKyAgICAgICAgICAgICAgICAg ICAmJiBlc3NlbnRpYWxzLmZjX3ggPCB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICAgICAgfHwgKHN0YXJ0ID09IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRb VEVYVF9BUkVBXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3gg Pj0geCkpCisgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAo dykKKyAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgIG1j X2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJv dy0+eSwKKyAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FS RUFdLCB2cG9zLCBNQ19CQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRy aXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLAorICAgICAgICAgICAgICAgICAg ICAgICBGSUxMX0NPTFVNTiwgZHJhd19wLCBmcm9tX3doZXJlLCBGQ19DQUNIRSk7CisgICAgICAg IH0KKyAgICAgIGlmICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgJiYg IU5JTFAgKEJWQVIgKGIsIGNoX2hvcml6b250YWxfcnVsZXIpKQorICAgICAgICAgICYmIChlc3Nl bnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3Mp KSkpCisgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgeworICAg ICAgICAgIGludCB4X2xpbWl0ID0gKHN0YXJ0ID09IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyBy b3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICA/IHRleHRf YXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgOiB4ICsgc3RhcnQtPnBpeGVsX3dp ZHRoOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgIG1jX2NvbG9y X3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19IQkFSLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0aW9uLCBIT1JJWk9OVEFMX1JVTEVSKTsK KyAgICAgICAgICAvKiBQcmVzZXJ2ZSBzdXBwb3J0IGZvciBkZWZhdWx0IGJlaGF2aW9yIHN1Y2gg dGhhdCBhIHVzZXIgbWF5CisgICAgICAgICAgc3BlY2lmeSB0aGUgaGVpZ2h0IG9mIGFuIE1DX0hC QVIsIHdoaWNoIGJlZ2lucyBpdHMgam91cm5leQorICAgICAgICAgIGFzIHRoZSBgY3Vyc29yX3dp ZHRoJy4gIGBtY19nZXRfY3Vyc29yX2dlb21ldHJ5JyByZWFkanVzdHMuICovCisgICAgICAgICAg bWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9saW1pdCwg cm93LT55LAorICAgICAgICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FS RUFdLCB2cG9zLCBNQ19IQkFSLCAxLAorICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJp eCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsCisgICAgICAgICAgICAgICAgICAg ICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAg ICAgfQorICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAm JiAhTklMUCAoQlZBUiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICYmIChlc3Nl bnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3Mp KSkpCisgICAgICAgICAgJiYgIWZpbGxfY29sdW1uX3RydW1wc19wKQorICAgICAgICB7CisgICAg ICAgICAgY3Vyc29yX3R5cGUgPSAoc3RhcnQtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX0hPTExPV19CT1gKKyAgICAgICAgICAgICAgICAgICAgICAg IDogTUNfQkFSOworICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAg ICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKHctPmN1cnNvci55ID09IHJvdy0+eQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09 IHZwb3MpOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgIG1jX2Nv bG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBjdXJzb3JfdHlw ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgVkVSVElDQUxfUlVM RVIpOworICAgICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDAp CisgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAg ICAgJiYgKChzdGFydCAhPSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRf QVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0geAorICAgICAg ICAgICAgICAgICAgICYmIHctPmN1cnNvci54IDwgeCArIHN0YXJ0LT5waXhlbF93aWR0aCkKKyAg ICAgICAgICAgICAgICAgIHx8IChzdGFydCA9PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93 LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29y LnggPj0geCkpCisgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21f eSAodykKKyAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAg IG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQs IHJvdy0+eSwKKyAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhU X0FSRUFdLCB2cG9zLCBjdXJzb3JfdHlwZSwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsCisgICAgICAgICAg ICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3AsIGZyb21fd2hlcmUsIENIX0NBQ0hF KTsKKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlCisgICAgICB7CisgICAgICAgIGludCByZWxh dGl2ZV94ID0gMDsKKyAgICAgICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFy ZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgICBzdHJ1Y3QgZ2x5 cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgICAgICAgICAgLyog R2x5cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4gKi8KKyAgICAgICAgICAgIGlmIChhcmVhID09 IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQor ICAgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAgICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGds eXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmICh2 cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICAgICAgICAgICYmIGdseXBoICE9IGds eXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194IDwgcmVs YXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA8IHJlbGF0aXZlX3gK KyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoYiwgbWNfY29uZikpKQorICAgICAg ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBt Y19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtY19pbmFjdGl2ZV93aW5kb3dz KSkpKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLyogVGhlIHNw YWNlIGFwcGVuZGVkIHRvIGEgcm93IGVuZGluZyB3aXRoIGEgbmV3IGxpbmUgZG9lcworICAgICAg ICAgICAgICAgICAgICBub3QgaGF2ZSBhIGBnbHlwaC0+Y2hhcnBvc2AgKC0xLCAwKSB0aGF0IHdl IGNhbiB1c2UgZm9yIHRoaXMKKyAgICAgICAgICAgICAgICAgICAgcGFydGljdWxhciBhcHBsaWNh dGlvbi4gIFdoZW4gYSBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5CisgICAgICAgICAgICAg ICAgICAgIGFzc2lnbnMgYSB2aXNpYmxlIGdseXBoIHRvIGEgbmV3IGxpbmUsIHRoZXJlIGlzIG5v IHByb2JsZW0KKyAgICAgICAgICAgICAgICAgICAgYmVjYXVzZSB0aGF0IGdseXBoIGhhcyBhIGBn bHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBjYW4gdXNlLgorICAgICAgICAgICAgICAgICAgICBXaGVu IG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywgd2UgdXNlIHRoZSBmb2xsb3dpbmcgdGVzdDoK KyAgICAgICAgICAgICAgICAgICAgdGhlIGFwcGVuZGVkIHNwYWNlIGhhcyBhIHBvc2l0aW9uIHRo YXQgaXMgb25lIGxlc3MgdGhhbiB0aGUKKyAgICAgICAgICAgICAgICAgICAgZW5kIG9mIHRoZSBt YXRyaXggcm93LiAqLworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93 LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoICpw cmV2aW91c19nbHlwaCA9ICgwIDw9IGhwb3MgLSAxICYmIGhwb3MgLSAxIDwgcm93LT51c2VkW1RF WFRfQVJFQV0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyBocG9zIC0gMQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBOVUxMOworICAgICAgICAgICAg ICAgICAgICAvLyBzdHJ1Y3QgZ2x5cGggKmxhc3RfZ2x5cGggPSByb3ctPmdseXBoc1tURVhUX0FS RUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgICAgICAgICAgICAgICBib29s IHNraXBfcCA9IChwcmV2aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHByZXZpb3VzX2dseXBoLT5jaGFycG9zID09IE1BVFJJWF9ST1dfRU5E X0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGdseXBoLT5ieXRlcG9zICE9IGVzc2VudGlhbHMuenZfYnl0ZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIC8qIFdoZW4gYSBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IGNvbnRhaW5zCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSB2aXNpYmxlIHRhYiBjaGFyYWN0ZXIgKCLC uyIpLCB0aGUgc3Vic2VxdWVudAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNU UkVUQ0hfR0xZUEggd2lsbCBoYXZlIHRoZSBzYW1lIGdseXBoLT5jaGFycG9zCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgYXMgdGhlIGFmb3JlbWVudGlvbmVkIHZpc2libGUgdGFi IGNoYXJhY3Rlci4gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChwcmV2 aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gZ2x5cGgtPmNoYXJwb3MpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IGZhbHNlOworICAgICAgICAgICAgICAgICAgICBpbnQgcG9zaW50ID0gKHJv d19wb3NpdGlvbiA9PSBQT1NUX1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IC0xCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChyb3dfcG9zaXRpb24g PT0gQVRfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGVzc2VudGlh bHMuenYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoLT5ieXRlcG9z ICE9IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFtURVhUX0FS RUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9X X0VORF9DSEFSUE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoZ2x5cGgtPmJ5dGVwb3MgPT0gZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0g cm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog Z2x5cGgtPmNoYXJwb3M7CisgICAgICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IHNwZWNzID0g bWNfYXNzb2MgKG1ha2VfZml4bnVtIChwb3NpbnQpLCBCVkFSIChiLCBtY19jb25mKSk7CisgICAg ICAgICAgICAgICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDAp CisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoc3BlY3MpCisgICAgICAgICAgICAgICAg ICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAg ICAgICAgICAgICAgICAmJiAhc2tpcF9wCisgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3df cG9zaXRpb24gIT0gUE9TVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgICAgICBMaXNwX09iamVjdCBsaXNwX3R5cGUgPSBtY19udGggKDEsIHNwZWNzKTsK KyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUg PSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19saXNwX3RvX2N1cnNvcl90eXBlIChYQ0FSIChs aXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlwZSAobGlzcF90eXBlKTsKKyAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gKGdseXBoLT50eXBlID09IElNQUdFX0dM WVBIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0hPTExPV19C T1gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3JfdHlwZTsK KyAgICAgICAgICAgICAgICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGggPSAoQ09OU1AgKGxpc3Bf dHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBYRklY TlVNIChYQ0FSIChYQ0RSIChsaXNwX3R5cGUpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IC0xOworICAgICAgICAgICAgICAgICAgICAgICAgTGlzcF9PYmpl Y3QgbWNfZm9yZWdyb3VuZCA9IG1jX250aCAoMiwgc3BlY3MpOworICAgICAgICAgICAgICAgICAg ICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAo U1RSSU5HUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX3h3 X2NvbG9yX3ZhbHVlcyAodywgbWNfZm9yZWdyb3VuZCwgJmxzbF9mZyk7CisgICAgICAgICAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKFZFQ1RPUlAgKG1jX2ZvcmVncm91bmQpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9m Zy5yZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMCkpOworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLmdyZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1j X2ZvcmVncm91bmQsIDEpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5i bHVlID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDIpKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAo TklMUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19j b2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2ZnLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpbnQsIGN1cnNvcl90eXBlLCBy b3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIE1VTFRJUExFX0NVUlNPUlMpOworICAgICAgICAgICAgICAgICAgICAgICAgaW50IHZwb3Mg PSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgICAgICAgICAgICAgICAgICAgICAg IGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAgICAg bWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhfbGltaXQsIHJvdy0+eSwgZ2x5cGggLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfbWF0cml4LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxz bF9mZywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09S UywgZHJhd19wLCBmcm9tX3doZXJlLCBNQ19DQUNIRSk7CisgICAgICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICghTklMUCAoQlZBUiAo YiwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2 ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgZmNfaW5hY3RpdmVf d2luZG93cykpKSkKKyAgICAgICAgICAgICAgICAgICAgLy8gJiYgZXNzZW50aWFscy5mY194IDw9 IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3gg PCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194 ID49IHctPm1jLmxudW1fcGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgICAg ICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueCA9PSBlc3NlbnRp YWxzLmZjX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsKKyAgICAgICAgICAgICAgICAgICAgaW50IGhw b3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICAgICAgICBtY19jb2xvcl9waWNr ZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgTUNfQkFSLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgRklMTF9DT0xVTU4pOwor ICAgICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICAg ICAgICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAg ICAgICAgICAgICAgICAvLyAmJiByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoIDw9IHRl eHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8IHRl eHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChoZWFkZXJfbGluZV9m b3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGhl YWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChnbHlw aCAhPSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2Vu dGlhbHMuZmNfeCA+PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGVzc2VudGlhbHMuZmNfeCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGdseXBoID09IGdseXBoX2VuZCAtIDEKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHJlbGF0aXZl X3gpKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2Jv dHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3Jf cCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlw aCwgYXJlYSwgcmVsYXRpdmVfeCwgeF9saW1pdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHJvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFSLCAxLCBjdXJzb3JfbWF0cml4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBs c2xfZmcsIEZJTExfQ09MVU1OLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJh d19wLCBmcm9tX3doZXJlLCBGQ19DQUNIRSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2hvcml6b250YWxfcnVsZXIpKQorICAgICAgICAg ICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAg ICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAg ICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gdGV4dF9hcmVhX3dpZHRoOworICAgICAg ICAgICAgICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsK KyAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAg ICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0x LCBNQ19IQkFSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19wb3Np dGlvbiwgSE9SSVpPTlRBTF9SVUxFUik7CisgICAgICAgICAgICAgICAgICAgIC8qIFByZXNlcnZl IHN1cHBvcnQgZm9yIGRlZmF1bHQgYmVoYXZpb3Igc3VjaCB0aGF0IGEgdXNlciBtYXkKKyAgICAg ICAgICAgICAgICAgICAgc3BlY2lmeSB0aGUgaGVpZ2h0IG9mIGFuIE1DX0hCQVIsIHdoaWNoIGJl Z2lucyBpdHMgam91cm5leQorICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYGN1cnNvcl93aWR0 aCcuICBgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeScgcmVhZGp1c3RzLiAqLworICAgICAgICAgICAg ICAgICAgICBpZiAoaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICAgICAgICAgICAgICAm JiBocG9zIDwgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoKQorICAgICAgICAgICAgICAgICAgICAg IG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xp bWl0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT55LCBocG9zLCB2cG9z LCBNQ19IQkFSLCAxLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsIEhPUklaT05UQUxfUlVMRVIs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3X3AsIGZyb21fd2hlcmUsIENI X0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAg KEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZB UiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50 aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFj dGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNo X2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgICAgICYmICFmaWxsX2NvbHVt bl90cnVtcHNfcCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3R5cGUgPSAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiBNQ19CQVI7CisgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0g dGV4dF9hcmVhX3dpZHRoOworICAgICAgICAgICAgICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJz b3JfcCA9ICh3LT5jdXJzb3IueSA9PSByb3ctPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnZwb3MgPT0gdnBvcyk7CisgICAgICAg ICAgICAgICAgICAgIGludCBocG9zID0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOwor ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICAgICAg ICAgICAgbWNfY29sb3JfcGlja2VyICh3LCBnbHlwaCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEs IGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19w b3NpdGlvbiwgVkVSVElDQUxfUlVMRVIpOworICAgICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+ PSBocG9zX3N0YXJ0CisgICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFy dCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKGhlYWRlcl9saW5l X2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwg aGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKGds eXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ Y3Vyc29yLnggPj0gcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5jdXJzb3IueCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgfHwgKGdseXBoID09IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gcmVsYXRpdmVfeCkpCisgICAg ICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcp CisgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAg ICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCBy ZWxhdGl2ZV94LCB4X2xpbWl0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93 LT55LCBocG9zLCB2cG9zLCBjdXJzb3JfdHlwZSwgMSwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2Zn LCBWRVJUSUNBTF9SVUxFUiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdf cCwgZnJvbV93aGVyZSwgQ0hfQ0FDSEUpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICB9 CisgICAgICAgICAgfQorICAgICAgfQorICAvLyAgY2xvY2tfdCBjbG9ja19lbmQgPSBjbG9jaygp OworICAvLyAgZG91YmxlIGNwdV90aW1lX3VzZWQgPSAoKGRvdWJsZSkgKGNsb2NrX2VuZCAtIGNs b2NrX3N0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsKKyAgLy8gIGZwcmludGYgKHN0ZGVyciwgIm1j X2RyYXdfcm93ICglcyk6ICBUSU1FICglZilcbiIsIG1jX3dpbmRvdyAodyksIGNwdV90aW1lX3Vz ZWQpOworfQorCitib29sCittY19yZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3Qg Z2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAg ICAgIGVudW0gZ2x5cGhfcm93X2FyZWEgYXJlYSwgaW50IHN0YXJ0X3gsIGludCBzdGFydF9ocG9z LCBpbnQgZW5kX2hwb3MsCisgICAgICAgICAgICAgICBib29sIGNsZWFyX2VvbF9wLCBlbnVtIGRy YXdfZ2x5cGhzX2ZhY2UgaGwsCisgICAgICAgICAgICAgICBlbnVtIG1jX3JlZHJhd19yb3dfdHlw ZSBmcm9tX3doZXJlKQoreworICBib29sIGdvX3AgPSAoKHctPm1jX21hdHJpeC5jdXJzb3JzX3Vz ZWRbTUNfQ0FDSEVdID4gMAorICAgICAgICAgICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3Jz X3VzZWRbQ0hfQ0FDSEVdID4gMAorICAgICAgICAgICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJz b3JzX3VzZWRbRkNfQ0FDSEVdID4gMCkKKyAgICAgICAgICAgICA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SF9HTFlQSCBtYXkgY29udGFpbiBtb3Jl IHRoYW4gb25lIGZha2UgY3Vyc29yIGF0IHRoZSBzYW1lIEhQT1MuICovCisgIGZvciAoZW51bSBt Y19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICBjYWNoZV90eXBlIDwg Tk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQorICAgIHsKKyAgICAgIGZvciAoaW50IG50 aCA9IDA7CisgICAgICAgICAgIG1jX3RyYXZlcnNlX2NhY2hlX3AgKHctPm1jX21hdHJpeCwgY2Fj aGVfdHlwZSwgdm50aCwgbnRoKTsKKyAgICAgICAgICAgKytudGgpCisgICAgICAgIHsKKyAgICAg ICAgICBpbnQgeCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0ueDsKKyAgICAgICAgICBpbnQgZnggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhdLmZ4OworICAgICAgICAgIGludCB5ID0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS55OworICAgICAgICAgIGludCBmeSA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAg aW50IGhwb3MgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd Lmhwb3M7CisgICAgICAgICAgaW50IHZwb3MgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLnZwb3M7CisgICAgICAgICAgaW50IHdkID0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZDsKKyAgICAgICAgICBpbnQgaCA9 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uaDsKKyAgICAg ICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZTsKKyAgICAgICAgICBpbnQg Y3Vyc29yX3dpZHRoID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5jdXJzb3Jfd2lkdGg7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmcgPSB7LnJl ZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcucmVk LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcuZ3JlZW4sCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmJsdWV9OworICAgICAgICAgIC8vICBzdHJ1Y3QgbWNf UkdCIGxzbF9iZyA9IHsucmVkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXS5iZy5yZWQsCisgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAg IC5ncmVlbiA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u YmcuZ3JlZW4sCisgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ibHVlfTsK KyAgICAgICAgICBib29sIGFjdGl2ZV9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5hY3RpdmVfcDsKKyAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlw aF9mbGF2b3IgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICBib29sIGVuYWJsZWRfcCA9IHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9wOworICAgICAgICAgIGlm ICh2cG9zID09IHZudGgKKyAgICAgICAgICAgICAgJiYgKChocG9zID49IHN0YXJ0X2hwb3MKKyAg ICAgICAgICAgICAgICAgICAmJiBocG9zIDwgZW5kX2hwb3MpCisgICAgICAgICAgICAgICAgICAv KiBBIGZsb2F0aW5nIGN1cnNvciBiZXlvbmQgdGhlIGVuZCBvZiB0aGUgZ2x5cGggcm93LiAqLwor ICAgICAgICAgICAgICAgICAgfHwgKGhwb3MgKyAxID09IHN0YXJ0X2hwb3MKKyAgICAgICAgICAg ICAgICAgICAgICAmJiBocG9zICsgMSA9PSBlbmRfaHBvcykpCisgICAgICAgICAgICAgICYmIGVu YWJsZWRfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgYm9vbCByZW1vdmVfcCA9IGZh bHNlOworICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgbWF0cml4LCByb3cs IHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBsc2xfZmcsIGFjdGl2ZV9w LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCByZW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SA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlw ZSkKKyAgICB7CisgICAgICBmb3IgKGludCBudGggPSAwOworICAgICAgICAgICBtY190cmF2ZXJz ZV9jYWNoZV9wICh3LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAg ICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHggPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLng7CisgICAgICAgICAgaW50IGZ4ID0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5meDsKKyAgICAgICAg ICBpbnQgeSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u eTsKKyAgICAgICAgICBpbnQgZnkgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhdLmZ5OworICAgICAgICAgIGludCBocG9zID0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5ocG9zOworICAgICAgICAgIGludCB2cG9zID0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS52cG9zOworICAg ICAgICAgIGludCB3ZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0ud2Q7CisgICAgICAgICAgaW50IGggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLmg7CisgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJz b3JfdHlwZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u Y3Vyc29yX3R5cGU7CisgICAg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LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5nbHlwaF9mbGF2b3I7CisgICAgICAgICAgYm9v bCBlbmFibGVkX3AgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmVuYWJsZWRfcDsKKyAgICAgICAgICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2Ag Y29udGFpbnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgICAgICAgICBlYXNzZXJ0IChtYXRyaXgg JiYgbWF0cml4LT5yb3dzKTsKKyAgICAgICAgICBlYXNzZXJ0IChyb3cgPj0gMCAmJiByb3cgPCBt YXRyaXgtPm5yb3dzKTsgKi8KKyAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJp eCAmJiBtYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAgICAgICAgIGlmIChiYXJmX2Ny YXNoX29uZSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIGJvb2wgYmFyZl9jcmFz aF90d28gPSAodnBvcyA+PSAwICYmIHZwb3MgPCBtYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1 ZTsKKyAgICAgICAgICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgICAgICAgICBjb250aW51ZTsK KyAgICAgICAgICBpZiAodnBvcyA9PSB2bnRoCisgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZv ciA9PSBNQ19HTFlQSAorICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIG1jX2VyYXNlX2N1cnNvciAodywgbWF0cml4LCByb3csIHctPm1jX21h dHJpeCwgeCwgeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBn bHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCk7CisgICAgICAgICAgICAgIHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9wID0gZmFsc2U7Cisg ICAgICAgICAgICAgIC0tdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKHZwb3MgPT0gdm50aAorICAgICAgICAg ICAgICAgICAgICAgJiYgZW5hYmxlZF9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgYm9vbCByZW1vdmVfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9o eWJyaWQgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29y X3dpZHRoLCBsc2xfYmcsIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBnbHlwaF9mbGF2b3IsIHJlbW92ZV9wKTsKKyAgICAgICAgICAgICAgICB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcCA9IGZhbHNl OworICAgICAgICAgICAgICAgIC0tdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBl XTsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdID0gMDsKKyAgICB9Cit9CisKKy8qIEVyYXNlIGZh a2UgY3Vyc29ycyBmcm9tIChtaW4sIHJ1bi5jdXJyZW50X3ksIHJ1bi5kZXNpcmVkX3kpIHRvIGVu ZCBvZiB3aW5kb3cuCisgIFRSWV9XSU5ET1dfUkVVU0lOR19DVV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8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hF XSA+IDApOworICBib29sIGdvX3R3b19wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAg ICAgICAgICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9z c2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICAgIHx8ICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkpOworICBpZiAobWNf c3RkZXJyX3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfcHJlX3Njcm9sbF9jbGVhbiAoJXMp OlxuXAorICAlcyB8IGdvX29uZV9wICglcykgfCBnb190d29fcCAoJXMpXG5cCisgIHN0YXJ0X3Zw b3MgKCVkKSB8IG5yb3dzX3Njcm9sbGVkICglZClcblwKKyAgJXM6ICBydW4uY3VycmVudC9kZXNp cmVkX3kgKCVkLyVkKSB8IHJ1bi5oZWlnaHQgKCVkKVxuIiwKKyAgICBtY193aW5kb3cgKHcpLCAo ZnJvbV93aGVyZSA9PSBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTikKKyAg ICAgICAgICAgICAgICAgICAgID8gIlRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9E T1dOIgorICAgICAgICAgICAgICAgICAgIDogKGZyb21fd2hlcmUgPT0gVFJZX1dJTkRPV19SRVVT SU5HX0NVUlJFTlRfTUFUUklYX1VQKQorICAgICAgICAgICAgICAgICAgICAgPyAiVFJZX1dJTkRP V19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX1VQIgorICAgICAgICAgICAgICAgICAgIDogKGZyb21f d2hlcmUgPT0gVFJZX1dJTkRPV19JRCkKKyAgICAgICAgICAgICAgICAgICAgID8gIlRSWV9XSU5E T1dfSUQiCisgICAgICAgICAgICAgICAgICAgOiAiVU5LTk9XTiIsCisgICAgZ29fb25lX3AgPyAi eWVzIiA6ICJubyIsIGdvX3R3b19wID8gInllcyIgOiAibm8iLAorICAgIHN0YXJ0X3Zwb3MsIG5y b3dzX3Njcm9sbGVkLAorICAgIHJ1bi5jdXJyZW50X3kgPCBydW4uZGVzaXJlZF95ID8gIuKGkyIg OiAi4oaRIiwKKyAgICBydW4uY3VycmVudF95LCBydW4uZGVzaXJlZF95LCBydW4uaGVpZ2h0KTsK KyAgaWYgKCFnb19vbmVfcCAmJiAhZ29fdHdvX3ApCisgICAgcmV0dXJuOworICBib29sIHVwZGF0 aW5nX2ZyYW1lX3AgPSBmYWxzZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFt ZSk7CisgIGlmIChYRlJBTUUgKHctPmZyYW1lKSAhPSBmLT5tY191cGRhdGluZ19mcmFtZQorICAg ICAgJiYgKGdvX29uZV9wIHx8IGdvX3R3b19wKSkKKyAgICB7CisgICAgICB1cGRhdGluZ19mcmFt ZV9wID0gdHJ1ZTsKKyAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CisgICAgfQorICBpZiAody0+cGh5 c19jdXJzb3Jfb25fcAorICAgICAgJiYgZ29fdHdvX3ApCisgICAgZXJhc2VfcGh5c19jdXJzb3Ig KHcpOworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsK KyAgZm9yIChpbnQgdm50aCA9IHN0YXJ0X3Zwb3M7CisgICAgICAgbWF0cml4ICE9IE5VTEwKKyAg ICAgICAmJiB2bnRoIDwgbWF0cml4LT5ucm93cworICAgICAgICYmIE1BVFJJWF9ST1cgKG1hdHJp eCwgdm50aCktPmVuYWJsZWRfcAorICAgICAgICYmIGdvX29uZV9wOworICAgICAgICsrdm50aCkK KyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgs IHZudGgpOworICAgICAgbWNfZXJhc2Vfcm93ICh3LCBtYXRyaXgsIHJvdyk7CisgICAgfQorICBp ZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChmKTsKKyAgLy8gbWNfcmVzZXRf Y2FjaGUgKHcpOworfQorCitERUZVTiAoIm1jLXN0ZGVyciIsIEZtY19zdGRlcnIsIFNtY19zdGRl cnIsIDAsIDEsICJQIiwKKyAgICAgICBkb2M6IC8qIFRvZ2dsZSB0cmFjaW5nIG9mIG11bHRpcGxl IGZha2UgY3Vyc29ycy4KK1dpdGggQVJHLCB0dXJuIHRyYWNpbmcgb24gaWYgYW5kIG9ubHkgaWYg QVJHIGlzIHBvc2l0aXZlLiAqLykKKyAgKExpc3BfT2JqZWN0IGFyZykKK3sKKyAgaWYgKE5JTFAg KGFyZykpCisgICAgbWNfc3RkZXJyX3AgPSAhbWNfc3RkZXJyX3A7CisgIGVsc2UKKyAgICB7Cisg ICAgICBhcmcgPSBGcHJlZml4X251bWVyaWNfdmFsdWUgKGFyZyk7CisgICAgICBtY19zdGRlcnJf cCA9IFhGSVhOVU0gKGFyZykgPiAwOworICAgIH0KKyAgcmV0dXJuIFFuaWw7Cit9CisKKy8qIGVu ZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAMCiAv KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioKIAkJICAgICAgV2luZG93IGRpc3BsYXkgZGltZW5zaW9ucwpAQCAtMTQz OTcsOSArMTkyNjksMjIgQEAgcmVkaXNwbGF5X2ludGVybmFsICh2b2lkKQogCSAgICAgICp3LT5k ZXNpcmVkX21hdHJpeC0+bWV0aG9kID0gMDsKIAkgICAgICBkZWJ1Z19tZXRob2RfYWRkICh3LCAi b3B0aW1pemF0aW9uIDEiKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCisgIGlm IChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMg KHcsIGZhbHNlKTsKKyAgICBlbHNlCiAJICAgICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBm YWxzZSk7CiAjZW5kaWYKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIGdv dG8gdXBkYXRlOwogCSAgICB9CiAJICBlbHNlCkBAIC0xNzc5MiwxMCArMjI2NzcsMjIgQEAgcmVk aXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3RfdGhpc19vbmVfcCkK ICAgICB9CiAKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBib29sIGtlZXBfY3VycmVudF9w ID0gKGp1c3RfdGhpc19vbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICghdXNlZF9j dXJyZW50X21hdHJpeF9wICYmICFvdmVybGF5X2Fycm93X3NlZW4pCisgICAgICAgICAgICAgICAg ICAgICAgICAgfHwgdy0+cHNldWRvX3dpbmRvd19wKTsKKworICBib29sIGZyaW5nZXNfdXBkYXRl ZF9wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBr ZWVwX2N1cnJlbnRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDogdXBkYXRlX3dpbmRv d19mcmluZ2VzICh3LCBrZWVwX2N1cnJlbnRfcCk7CisKICAgaWYgKEZSQU1FX1dJTkRPV19QIChm KQotICAgICAgJiYgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCAoanVzdF90aGlzX29uZV9wCi0J CQkJICAgIHx8ICghdXNlZF9jdXJyZW50X21hdHJpeF9wICYmICFvdmVybGF5X2Fycm93X3NlZW4p Ci0JCQkJICAgIHx8IHctPnBzZXVkb193aW5kb3dfcCkpKQorICAgICAgJiYgZnJpbmdlc191cGRh dGVkX3ApCiAgICAgewogICAgICAgdXBkYXRlX2JlZ2luIChmKTsKICAgICAgIGJsb2NrX2lucHV0 ICgpOwpAQCAtMTc4MTAsNiArMjI3MDcsOSBAQCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVj dCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQogICAgICAgdXBkYXRlX2VuZCAoZik7CiAg ICAgfQogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGlmIChXSU5ET1dfQk9UVE9N X0RJVklERVJfV0lEVEggKHcpKQogICAgIGd1aV9kcmF3X2JvdHRvbV9kaXZpZGVyICh3KTsKICNl bmRpZiAvKiBIQVZFX1dJTkRPV19TWVNURU0gKi8KQEAgLTE4MTI1LDYgKzIzMDI1LDE2IEBAIHRy eV93aW5kb3dfcmV1c2luZ19jdXJyZW50X21hdHJpeCAoc3RydWN0IHdpbmRvdyAqdykKIAkgICAg ICB1cGRhdGVfYmVnaW4gKGYpOwogCSAgICAgIGd1aV91cGRhdGVfd2luZG93X2JlZ2luICh3KTsK IAkgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBt Y19wcmVfc2Nyb2xsX2NsZWFuICh3LCBydW4sIHN0YXJ0X3Zwb3MsIG5yb3dzX3Njcm9sbGVkLCBU UllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTik7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIAkgICAgICBGUkFNRV9SSUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcs ICZydW4pOwogCSAgICAgIGd1aV91cGRhdGVfd2luZG93X2VuZCAodywgZmFsc2UsIGZhbHNlKTsK IAkgICAgICB1cGRhdGVfZW5kIChmKTsKQEAgLTE4MjkxLDYgKzIzMjAxLDE2IEBAIHRyeV93aW5k b3dfcmV1c2luZ19jdXJyZW50X21hdHJpeCAoc3RydWN0IHdpbmRvdyAqdykKIAkgIHVwZGF0ZV9i ZWdpbiAoZik7CiAJICBndWlfdXBkYXRlX3dpbmRvd19iZWdpbiAodyk7CiAJICBGUkFNRV9SSUYg KGYpLT5jbGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBtY19wcmVfc2Nyb2xsX2NsZWFu ICh3LCBydW4sIHN0YXJ0X3Zwb3MsIG5yb3dzX3Njcm9sbGVkLCBUUllfV0lORE9XX1JFVVNJTkdf Q1VSUkVOVF9NQVRSSVhfVVApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBG UkFNRV9SSUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcsICZydW4pOwogCSAgZ3VpX3VwZGF0ZV93 aW5kb3dfZW5kICh3LCBmYWxzZSwgZmFsc2UpOwogCSAgdXBkYXRlX2VuZCAoZik7CkBAIC0xOTI0 NSw2ICsyNDE2NSwxNiBAQCB0cnlfd2luZG93X2lkIChzdHJ1Y3Qgd2luZG93ICp3KQogI2lmZGVm IEhBVkVfV0lORE9XX1NZU1RFTQogCSAgZ3VpX3VwZGF0ZV93aW5kb3dfYmVnaW4gKHcpOwogCSAg RlJBTUVfUklGIChmKS0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2UgKHcpOworCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgbWNfcHJlX3Nj cm9sbF9jbGVhbiAodywgcnVuLCBmaXJzdF91bmNoYW5nZWRfYXRfZW5kX3Zwb3MsIGR2cG9zLCBU UllfV0lORE9XX0lEKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgRlJBTUVf UklGIChmKS0+c2Nyb2xsX3J1bl9ob29rICh3LCAmcnVuKTsKIAkgIGd1aV91cGRhdGVfd2luZG93 X2VuZCAodywgZmFsc2UsIGZhbHNlKTsKICNlbmRpZgpAQCAtMjE1MjgsNiArMjY0NTgsMTcgQEAg bWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKICAgICAgIFNFVF9URVhU X1BPUyAodGVtX2l0LnBvc2l0aW9uLCAtMSwgLTEpOwogICAgICAgUFJPRFVDRV9HTFlQSFMgKCZ0 ZW1faXQpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgICAgICAvKiBUaGlzIHBlcm1pdHMgdXMgdG8gaW5zcGVjdCB0aGUgSFBPUyBvZiBs aW5lIG51bWJlciBnbHlwaHMgYW5kIHRoZSBzcGFjZQorICAgICAgcGFkZGluZyBiZWZvcmUvYWZ0 ZXIgdGhlIGxpbmUgbnVtYmVycy4gIFdlIHNldCBgZ2x5cGgtPmhwb3NgIGVsc2V3aGVyZS4gKi8K KyAgICAgIHRlbV9pdC5ocG9zICs9IDE7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgICAgIC8qIFN0b3AgcHJvZHVjaW5nIGdseXBocywgYW5kIHJlZnJhaW4gZnJvbSBwcm9kdWNp bmcgdGhlIGxpbmUKIAkgbnVtYmVyLCBpZiB3ZSBkb24ndCBoYXZlIGVub3VnaCBzcGFjZSBvbiB0 aGlzIGxpbmUuICAqLwogICAgICAgaWYgKHRlbV9pdC5jdXJyZW50X3ggPj0gd2lkdGhfbGltaXQp CkBAIC0yMTUzOSw2ICsyNjQ4MCwzNCBAQCBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChzdHJ1 Y3QgaXQgKml0KQogCX0KICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKKyAgc3RydWN0IHRleHRfcG9zIHdzdGFydDsKKyAgU0VUX1RF WFRfUE9TX0ZST01fTUFSS0VSICh3c3RhcnQsIGl0LT53LT5zdGFydCk7CisgIGlmIChpdC0+YXJl YSA9PSBURVhUX0FSRUEKKyAgICAgICYmIElUX0NIQVJQT1MgKCppdCkgPT0gd3N0YXJ0LmNoYXJw b3MpCisgICAgeworICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKGl0LT53LT5jb250 ZW50cyk7CisgICAgICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgICAgIC8q IE5lZWRlZCBzbyB0aGF0IGJ1ZmZlci1sb2NhbCB2YWx1ZXMgY2FuIGJlIGRldGVybWluZWQ7IGUu Zy4sIHdoZW4KKyAgICAgIHN3aXRjaGluZyB0byB0aGUgbWluaWJ1ZmZlci4gKi8KKyAgICAgIGlm IChiICE9IGN1cnJlbnRfYnVmZmVyKQorICAgICAgICB7CisgICAgICAgICAgb2xkX2J1ZmZlciA9 IGN1cnJlbnRfYnVmZmVyOworICAgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKGIpOworICAg ICAgICB9CisgICAgICBpdC0+dy0+bWMubG51bV9waXhlbF93aWR0aCA9ICghTklMUCAoVmRpc3Bs YXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0 ZW1faXQuY3VycmVudF94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogMDsK KyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRf YnVmZmVyKTsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogUmVj b3JkIHRoZSB3aWR0aCBpbiBwaXhlbHMgd2UgbmVlZCBmb3IgdGhlIGxpbmUgbnVtYmVyIGRpc3Bs YXkuICAqLwogICBpdC0+bG51bV9waXhlbF93aWR0aCA9IHRlbV9pdC5jdXJyZW50X3g7CiAgIC8q IENvcHkgdGhlIHByb2R1Y2VkIGdseXBocyBpbnRvIElUJ3MgZ2x5cGhfcm93LiAgKi8KQEAgLTI3 MzYwLDYgKzMyMzI5LDE3IEBAIGFwcGVuZF9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAkgICAgZ1sx XSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07CiAJfQorCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAg ICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRF UE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+ Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0g aXQtPm9iamVjdDsKICAgICAgIGlmIChpdC0+cGl4ZWxfd2lkdGggPiAwKQpAQCAtMjc0NDIsNiAr MzI0MjIsMTcgQEAgYXBwZW5kX2NvbXBvc2l0ZV9nbHlwaCAoc3RydWN0IGl0ICppdCkKIAkgICAg Z1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbaXQtPmFyZWFdOwog CX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5ieXRlcG9zID0g SVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAg Z2x5cGgtPmNoYXJwb3MgPSBpdC0+Y21wX2l0LmNoYXJwb3M7CiAgICAgICBnbHlwaC0+b2JqZWN0 ID0gaXQtPm9iamVjdDsKICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93aWR0aCA8PSBTSFJUX01B WCk7CkBAIC0yNzY1MCw2ICszMjY0MSwxNyBAQCBwcm9kdWNlX2ltYWdlX2dseXBoIChzdHJ1Y3Qg aXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9yb3ctPmdseXBoc1thcmVh ICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VS U09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5 dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJICBnbHlwaC0+ b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNsaXBfdG9fYm91 bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzc1Myw2ICszMjc1NSwx NyBAQCBwcm9kdWNlX3h3aWRnZXRfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgICAgaWYg KGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBo LT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCpp dCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBoLT5jaGFycG9zID0g Q0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0Owog CSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+cGl4ZWxfd2lk dGgsIFNIUlRfTUFYKTsKQEAgLTI3ODM5LDYgKzMyODUyLDE3IEBAIGFwcGVuZF9zdHJldGNoX2ds eXBoIChzdHJ1Y3QgaXQgKml0LCBMaXNwX09iamVjdCBvYmplY3QsCiAJICAgIHdpZHRoIC09IGl0 LT5maXJzdF92aXNpYmxlX3ggLSBpdC0+Y3VycmVudF94OwogCSAgZWFzc2VydCAod2lkdGggPiAw KTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+Ynl0ZXBv cyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg ICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBo LT5vYmplY3QgPSBvYmplY3Q7CiAgICAgICAvKiBGSVhNRTogSXQgd291bGQgYmUgYmV0dGVyIHRv IHVzZSBUWVBFX01BWCBoZXJlLCBidXQKQEAgLTI4MjkzLDYgKzMzMzE3LDE3IEBAIGFwcGVuZF9n bHlwaGxlc3NfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIGludCBmYWNlX2lkLCBib29sIGZvcl9ub19m b250LCBpbnQgbGVuLAogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ct PmdseXBoc1thcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBn bHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsK ICAgICAgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2VydCAoaXQtPnBp eGVsX3dpZHRoIDw9IFNIUlRfTUFYKTsKQEAgLTI5MzQzLDEwICszNDM3OCwyMCBAQCBndWlfaW5z ZXJ0X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqdXBkYXRlZF9y b3csCiAKICAgLyogV3JpdGUgdGhlIGdseXBocy4gICovCiAgIGhwb3MgPSBzdGFydCAtIHJvdy0+ Z2x5cGhzW3VwZGF0ZWRfYXJlYV07CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50 X21hdHJpeCwgcm93LCB1cGRhdGVkX2FyZWEsIHctPm91dHB1dF9jdXJzb3IueCwKKyAgICAgICAg ICAgICAgICAgICAgICBocG9zLCBocG9zICsgbGVuLCBmYWxzZSwgRFJBV19OT1JNQUxfVEVYVCwg R1VJX0lOU0VSVF9HTFlQSFMpKQogICBkcmF3X2dseXBocyAodywgdy0+b3V0cHV0X2N1cnNvci54 LCByb3csIHVwZGF0ZWRfYXJlYSwKIAkgICAgICAgaHBvcywgaHBvcyArIGxlbiwKIAkgICAgICAg RFJBV19OT1JNQUxfVEVYVCwgMCk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg LyogQWR2YW5jZSB0aGUgb3V0cHV0IGN1cnNvci4gICovCiAgIHctPm91dHB1dF9jdXJzb3IuaHBv cyArPSBsZW47CiAgIHctPm91dHB1dF9jdXJzb3IueCArPSBzaGlmdF9ieV93aWR0aDsKQEAgLTI5 NzcyLDkgKzM0ODE3LDE5IEBAIGd1aV9maXhfb3ZlcmxhcHBpbmdfYXJlYSAoc3RydWN0IHdpbmRv dyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAogCSAgd2hpbGUgKGkgPCByb3ctPnVzZWRbYXJl YV0KIAkJICYmIHJvdy0+Z2x5cGhzW2FyZWFdW2ldLm92ZXJsYXBzX3ZlcnRpY2FsbHlfcCk7CiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAg ICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgYXJlYSwg c3RhcnRfeCwgc3RhcnQsIGksCisgICAgICAgICAgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEdV SV9GSVhfT1ZFUkxBUFBJTkdfQVJFQSkpCiAJICBkcmF3X2dseXBocyAodywgc3RhcnRfeCwgcm93 LCBhcmVhLAogCQkgICAgICAgc3RhcnQsIGksCiAJCSAgICAgICBEUkFXX05PUk1BTF9URVhULCBv dmVybGFwcyk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAl9CiAgICAgICBlbHNl CiAJewpAQCAtMzAwMjUsMTAgKzM1MDgwLDIwIEBAIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHN0 cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgIG5ld19jdXJzb3JfdHlwZSA9IGdldF93aW5kb3df Y3Vyc29yX3R5cGUgKHcsIGdseXBoLAogCQkJCQkgICAgJm5ld19jdXJzb3Jfd2lkdGgsICZhY3Rp dmVfY3Vyc29yKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKwogICAvKiBJZiBjdXJzb3IgaXMgY3VycmVudGx5IGJlaW5nIHNob3duIGFuZCB3 ZSBkb24ndCB3YW50IGl0IHRvIGJlIG9yCiAgICAgIGl0IGlzIGluIHRoZSB3cm9uZyBwbGFjZSwg b3IgdGhlIGN1cnNvciB0eXBlIGlzIG5vdCB3aGF0IHdlIHdhbnQsCiAgICAgIGVyYXNlIGl0LiAg Ki8KICAgaWYgKHctPnBoeXNfY3Vyc29yX29uX3AKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgJiYgTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICYmIHctPm1jX21hdHJpeC5jdXJz b3JzX3VzZWRbTUNfQ0FDSEVdID09IDAKKyAgICAgICYmIHctPm1jX21hdHJpeC5jdXJzb3JzX3Vz ZWRbQ0hfQ0FDSEVdID09IDAKKyAgICAgICYmIHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNf Q0FDSEVdID09IDAKICAgICAgICYmICghb24KIAkgIHx8IHctPnBoeXNfY3Vyc29yLnggIT0geAog CSAgfHwgdy0+cGh5c19jdXJzb3IueSAhPSB5CkBAIC0zMDA0MSw2ICszNTEwNiw5IEBAIGRpc3Bs YXlfYW5kX3NldF9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAJICAgICAgJiYg bmV3X2N1cnNvcl93aWR0aCAhPSB3LT5waHlzX2N1cnNvcl93aWR0aCkpKQogICAgIGVyYXNlX3Bo eXNfY3Vyc29yICh3KTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBEb24n dCBjaGVjayBwaHlzX2N1cnNvcl9vbl9wIGhlcmUgYmVjYXVzZSB0aGF0IGZsYWcgaXMgb25seSBz ZXQKICAgICAgdG8gZmFsc2UgaW4gc29tZSBjYXNlcyB3aGVyZSB3ZSBrbm93IHRoYXQgdGhlIGN1 cnNvciBoYXMgYmVlbgogICAgICBjb21wbGV0ZWx5IGVyYXNlZCwgdG8gYXZvaWQgdGhlIGV4dHJh IHdvcmsgb2YgZXJhc2luZyB0aGUgY3Vyc29yCkBAIC0zMDA1OSw5ICszNTEyNywyMyBAQCBkaXNw bGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLAogICAgICAgdy0+ cGh5c19jdXJzb3IudnBvcyA9IHZwb3M7CiAgICAgfQogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmIChOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29y c191c2VkW01DX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191c2Vk W0NIX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NB Q0hFXSA9PSAwKQogICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGdseXBo X3JvdywgeCwgeSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY3Vy c29yX3R5cGUsIG5ld19jdXJzb3Jfd2lkdGgsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgb24sIGFjdGl2ZV9jdXJzb3IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiB9CiAKIApAQCAtMzAxNTQsNyArMzUyMzYsMTggQEAgZHJhd19yb3dfd2l0aF9tb3VzZV9m YWNlIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgc3RhcnRfeCwgc3RydWN0IGdseXBoX3JvdyAqcm93 LAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogICBpZiAoRlJBTUVfV0lORE9XX1AgKFhGUkFN RSAody0+ZnJhbWUpKSkKICAgICB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3Vy cmVudF9tYXRyaXgsIHJvdywgVEVYVF9BUkVBLCBzdGFydF94LAorICAgICAgICAgICAgICAgICAg ICAgICAgICBzdGFydF9ocG9zLCBlbmRfaHBvcywgZmFsc2UsIGRyYXcsIERSQVdfUk9XX1dJVEhf TU9VU0VfRkFDRSkpCiAgICAgICBkcmF3X2dseXBocyAodywgc3RhcnRfeCwgcm93LCBURVhUX0FS RUEsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCBkcmF3LCAwKTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAgICAgcmV0dXJuOwogICAgIH0KICNlbmRpZgpAQCAtMzIyMTQsMTEgKzM3 MzA3LDIzIEBAIGV4cG9zZV9hcmVhIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csIGNvbnN0IEVtYWNzX1JlY3RhbmdsZSAqciwKICAgc3RydWN0IGdseXBoICpsYXN0Owog ICBpbnQgZmlyc3RfeCwgc3RhcnRfeCwgeDsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgcm93 LT5maWxsX2xpbmVfcCkKKyAgICB7CisgICAgICBpZiAoIW1jX3JlZHJhd19yb3cgKHcsIHctPmN1 cnJlbnRfbWF0cml4LCByb3csIGFyZWEsIDAsIDAsIHJvdy0+dXNlZFthcmVhXSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEVYUE9TRV9BUkVBX09O RSkpCiAgICAgLyogSWYgcm93IGV4dGVuZHMgZmFjZSB0byBlbmQgb2YgbGluZSB3cml0ZSB0aGUg d2hvbGUgbGluZS4gICovCiAgICAgZHJhd19nbHlwaHMgKHcsIDAsIHJvdywgYXJlYSwKIAkJIDAs IHJvdy0+dXNlZFthcmVhXSwKIAkJIERSQVdfTk9STUFMX1RFWFQsIDApOworICAgIH0KKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICBlbHNlCiAgICAgewogICAgICAgLyogU2V0IFNU QVJUX1ggdG8gdGhlIHdpbmRvdy1yZWxhdGl2ZSBzdGFydCBwb3NpdGlvbiBmb3IgZHJhd2luZyBn bHlwaHMgb2YKQEAgLTMyMjUwLDExICszNzM1NSwyNCBAQCBleHBvc2VfYXJlYSAoc3RydWN0IHdp bmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIs CiAJICArK2xhc3Q7CiAJfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUtQ1VSU09SUyAqLworCiAgICAgICAvKiBSZXBhaW50LiAgKi8KLSAgICAgIGlmIChsYXN0ID4g Zmlyc3QpCisKKyAgICAgIC8qIEZsb2F0aW5nIGZha2UgY3Vyc29ycyB3aWxsIGV4aXN0IHdoZW4g KGxhc3QgPT0gZmlyc3QpLiAqLworICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJy ZW50X21hdHJpeCwgcm93LCBhcmVhLCBmaXJzdF94IC0gc3RhcnRfeCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgZmlyc3QgLSByb3ctPmdseXBoc1thcmVhXSwgbGFzdCAtIHJvdy0+Z2x5cGhz W2FyZWFdLAorICAgICAgICAgICAgICAgICAgICAgICAgICBmYWxzZSwgRFJBV19OT1JNQUxfVEVY VCwgRVhQT1NFX0FSRUFfVFdPKQorICAgICAgICAgICYmIGxhc3QgPiBmaXJzdCkKIAlkcmF3X2ds eXBocyAodywgZmlyc3RfeCAtIHN0YXJ0X3gsIHJvdywgYXJlYSwKIAkJICAgICBmaXJzdCAtIHJv dy0+Z2x5cGhzW2FyZWFdLCBsYXN0IC0gcm93LT5nbHlwaHNbYXJlYV0sCiAJCSAgICAgRFJBV19O T1JNQUxfVEVYVCwgMCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB9CiB9 CiAKQEAgLTMyMjY4LDEwICszNzM4NiwyMiBAQCBleHBvc2VfbGluZSAoc3RydWN0IHdpbmRvdyAq dywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIpCiB7CiAg IGVhc3NlcnQgKHJvdy0+ZW5hYmxlZF9wKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICBpZiAocm93LT5tb2RlX2xpbmVfcCB8fCB3LT5w c2V1ZG9fd2luZG93X3ApCisgICAgeworICAgICAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3LT5j dXJyZW50X21hdHJpeCwgcm93LCBURVhUX0FSRUEsIDAsIDAsCisgICAgICAgICAgICAgICAgICAg ICAgICAgIHJvdy0+dXNlZFtURVhUX0FSRUFdLCBmYWxzZSwgRFJBV19OT1JNQUxfVEVYVCwgRVhQ T1NFX0xJTkUpKQogICAgIGRyYXdfZ2x5cGhzICh3LCAwLCByb3csIFRFWFRfQVJFQSwKIAkJIDAs IHJvdy0+dXNlZFtURVhUX0FSRUFdLAogCQkgRFJBV19OT1JNQUxfVEVYVCwgMCk7CisgICAgfQor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGVsc2UKICAgICB7CiAgICAgICBpZiAo cm93LT51c2VkW0xFRlRfTUFSR0lOX0FSRUFdKQpAQCAtMzI4MTksNiArMzc5NDksMjIgQEAgZ3Vp X2ludGVyc2VjdF9yZWN0YW5nbGVzIChjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIxLCBjb25zdCBF bWFjc19SZWN0YW5nbGUgKnIyLAogdm9pZAogc3ltc19vZl94ZGlzcCAodm9pZCkKIHsKKworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBkZWZz dWJyICgmU21jX2R1bXBfZ2x5cGhfcm93KTsKKworICBkZWZzdWJyICgmU21jX2R1bXBfZ2x5cGhf bWF0cml4KTsKKworICBkZWZzdWJyICgmU21jX2N1cnJlbnRfY29sdW1uKTsKKworICBkZWZzdWJy ICgmU21jX3N0ZGVycik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgVndpdGhf ZWNob19hcmVhX3NhdmVfdmVjdG9yID0gUW5pbDsKICAgc3RhdGljcHJvICgmVndpdGhfZWNob19h cmVhX3NhdmVfdmVjdG9yKTsKIApkaWZmIC0tZ2l0IGEvc3JjL3h0ZXJtLmMgYi9zcmMveHRlcm0u YwppbmRleCBjOTZhYTc0Li5kMzRkODFkIDEwMDY0NAotLS0gYS9zcmMveHRlcm0uYworKysgYi9z cmMveHRlcm0uYwpAQCAtMTMyLDYgKzEzMiw5MDcgQEAgYWxvbmcgd2l0aCBHTlUgRW1hY3MuICBJ ZiBub3QsIHNlZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LiAgKi8KICNpbmNsdWRl IDxYMTEvWEtCbGliLmg+CiAjZW5kaWYKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8KKworI2lmZGVmIEdMWVBIX0RFQlVHCitzdGF0aWMg dm9pZCB4X2NoZWNrX2ZvbnQgKHN0cnVjdCBmcmFtZSAqLCBzdHJ1Y3QgZm9udCAqKTsKKyNlbmRp ZgorCitzdGF0aWMgdm9pZCB4X3NldF9tb2RlX2xpbmVfZmFjZV9nYyAoc3RydWN0IGdseXBoX3N0 cmluZyAqKTsKKworc3RhdGljIH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gKHN0cnVjdCB3aW5kb3cgKncsIHN0 cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAg ICAgICAgICAgICAgICAgICAgIGludCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9z LCBpbnQgdnBvcywgaW50IHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgIGludCBoLCBzdHJ1 Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoLCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9m bGF2b3IsIGJvb2wgb25fcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9w KQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICAv KiBUaGUgZnJpbmdlIGJpdG1hcHMgYXJlIHByZXNlbnRseSBoYW5kbGVkIGVsc2V3aGVyZSwgYnV0 IGNvdWxkIHNvbWVkYXkKKyAgYmUgbWFuYWdlZCAoaW4gcGFydCkgYXQgdGhpcyBzZWN0aW9uIG9m IGNvZGUuICovCisgIGlmIChvbl9wKQorICAgIHsKKyAgICAgIGlmIChyb3ctPmV4YWN0X3dpbmRv d193aWR0aF9saW5lX3AKKyAgICAgICAgICAmJiAocm93LT5yZXZlcnNlZF9wCisgICAgICAgICAg ICAgID8gKGhwb3MgPCAwKQorICAgICAgICAgICAgICA6IChocG9zID49IHJvdy0+dXNlZFtURVhU X0FSRUFdKSkpCisgICAgICAgIHsKKyAgICAgICAgICByb3ctPmN1cnNvcl9pbl9mcmluZ2VfcCA9 IHRydWU7CisgICAgICAgICAgbWNfZHJhd19mcmluZ2VfYml0bWFwICh3LCByb3csIHJvdy0+cmV2 ZXJzZWRfcCwgY3Vyc29yX3R5cGUpOworICAgICAgIC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UTUFQOgorICAg ICAgYnJlYWs7CisgICAgY2FzZSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVA6CisgICAgICBicmVhazsK KyAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6CisgICAgeworICAgICAgc3RydWN0IGdseXBoICpjdXJz b3JfZ2x5cGggPSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBv cyk7CisgICAgICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgICAgIHJldHVybjsKKyAg ICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgICAgICBib29s IHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7 CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2JlZyA9IChyZWdpb25fYWN0aXZlX3ApID8gbWNfcmVn aW9uX2xpbWl0ICgxKSA6IC0xOworICAgICAgcHRyZGlmZl90IHJlZ2lvbl9lbmQgPSAocmVnaW9u X2FjdGl2ZV9wKSA/IG1jX3JlZ2lvbl9saW1pdCAoMCkgOiAtMTsKKyAgICAgIGlmIChjdXJzb3Jf Z2x5cGgtPnR5cGUgIT0gSU1BR0VfR0xZUEggJiYgbHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+ PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3Jhcmls eSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycgYnkgYm9ycm93aW5nIHRoZQor ICAgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4geGZucy5jLiAqLworICAg ICAgICAgIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgIC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AgICBYU2V0Rm9yZWdyb3Vu ZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xs b3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg aG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoYWN0aXZlX3ApCisgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZl X2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2Ut Y3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qg ZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZl X2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9E SVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2Zh Y2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJB TUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0 aXZlX2ZhY2UtPmJhY2tncm91bmQpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2 ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFj ZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2 ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVf WF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfaW5hY3Rp dmVfZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91 bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9s bG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQpOworICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgLyogRm9yY2UgYG1jX3hfc2V0X2N1 cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAqLworICAg ICAgICAgIGJvb2wgY3Vyc29yX2djX3AgPSB0cnVlOworICAgICAgICAgIG1jX2RyYXdfY3Vyc29y X2dseXBoICh3LCBtYXRyaXgsIHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsIGxzbCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlw ZSwgd2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ICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAo IistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAg ICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwg aG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91 bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9s bG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEJh Y2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9n YywgaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2UtPmJhY2tncm91bmQpOworICAgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVnaW9uX2FjdGl2ZV9wCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID4gcmVnaW9uX2JlZworICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zIDwgcmVnaW9uX2VuZCkK KyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9p ZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2Ut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vyc29yX2djLCBob2xs b3dfaW5hY3RpdmVfZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgICAg IFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfZ2MsIGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAg ICAgIC8qIEZvcmNlIGBtY194X3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX2djJy4gKi8KKyAgICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IHRy dWU7CisgICAgICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywg RFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9nY19wKTsKKyAgICAgICAg ICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9nYywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg eGdjdi5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAg ICAgICAgICAgLyogRHJhdyB0aGUgZnJhbWUgYXJvdW5kIHRoZSBib3guICovCisgICAgICAgICAg ICAgIG1jX3hfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5 LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9 CisgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAg JiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4g Ki8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhl bDsKKyAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAg ICAgICBlbHNlCisgICAgICAgICAgbWNfeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwg cm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgIGJyZWFrOworICAg IH0KKyAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0g MCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICAvKiBUZW1wb3Jh cmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycgYnkgYm9ycm93aW5nIHRo ZQorICAgICAgICBmdW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AgICAgICAgICAgIGJvb2wg Y3Vyc29yX2djX3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3 LCBtYXRyaXgsIHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsIGxzbCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwg YWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9 CisgICAgY2FzZSBNQ19CQVI6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wu Z3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVt cG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAqLworICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAg ICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAgICAgICAg IG1jX3hfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9z LCB2cG9zLCB3ZCwgaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dp ZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29y X2djX2ludmlzaWJsZV9va2F5X3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1jX3hfZHJhd19iYXJf Y3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1DX0JBUiwg Y3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOwor ICAgIH0KKyAgICBjYXNlIE1DX0hCQVI6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAm JiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAg LyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAq LworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVs OworICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAg ICAgICAgIG1jX3hfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5 LCBocG9zLCB2cG9zLCB3ZCwgaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3dpZHRoLCBNQ19IQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAg ICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVs OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29s IGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY194X2Ry YXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBN Q19IQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAg YnJlYWs7CisgICAgfQorICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgfQor ICAgICAgICB9CisjaWZkZWYgSEFWRV9YX0kxOE4KKyAgaWYgKHcgPT0gWFdJTkRPVyAoZi0+c2Vs ZWN0ZWRfd2luZG93KSkKKyAgICBpZiAoRlJBTUVfWElDIChmKSAmJiAoRlJBTUVfWElDX1NUWUxF IChmKSAmIFhJTVByZWVkaXRQb3NpdGlvbikpCisgICAgICB4aWNfc2V0X3ByZWVkaXRhcmVhICh3 LCB4LCB5KTsKKyNlbmRpZgorICAgIH0KKyAgWEZsdXNoIChGUkFNRV9YX0RJU1BMQVkgKGYpKTsK K30KKworLyogRHJhdyBzdHJldGNoIGdseXBoIHN0cmluZyBTLiAqLworc3RhdGljIHZvaWQKK21j X3hfZHJhd19zdHJldGNoX2dseXBoX3N0cmluZyAoc3RydWN0IGdseXBoX3N0cmluZyAqcykKK3sK KyAgZWFzc2VydCAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCk7CisgIGlm IChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgJiYgIXhfc3RyZXRjaF9jdXJzb3JfcCkKKyAg ICB7CisgICAgICAvKiBJZiBgeC1zdHJldGNoLWN1cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3IGEg YmxvY2sgY3Vyc29yIGFzIHdpZGUgYXMgdGhlCisgICAgICBzdHJldGNoIGdseXBoLiAqLworICAg ICAgaW50IHdpZHRoLCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAg ICAgIGludCB4ID0gcy0+eDsKKyAgICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAg ICB7CisgICAgICAgICAgaW50IGxlZnRfeCA9IHdpbmRvd19ib3hfbGVmdF9vZmZzZXQgKHMtPncs IFRFWFRfQVJFQSk7CisgICAgICAgICAgaWYgKHggPCBsZWZ0X3gpCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIGJhY2tncm91bmRfd2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICAg ICAgeCA9IGxlZnRfeDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisg ICAgICAgICAgeworICAgICAgICAgICAgLyogSW4gUjJMIHJvd3MsIGRyYXcgdGhlIGN1cnNvciBv biB0aGUgcmlnaHQgZWRnZSBvZiB0aGUKKyAgICAgICAgICAgICAgIHN0cmV0Y2ggZ2x5cGguICov CisgICAgICAgICAgICBpbnQgcmlnaHRfeCA9IHdpbmRvd19ib3hfcmlnaHQgKHMtPncsIFRFWFRf QVJFQSk7CisgICAgICAgICAgICBpZiAoeCArIGJhY2tncm91bmRfd2lkdGggPiByaWdodF94KQor ICAgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IHggLSByaWdodF94OworICAgICAgICAg ICAgeCArPSBiYWNrZ3JvdW5kX3dpZHRoOworICAgICAgICAgIH0KKyAgICAgIHdpZHRoID0gbWlu IChGUkFNRV9DT0xVTU5fV0lEVEggKHMtPmYpLCBiYWNrZ3JvdW5kX3dpZHRoKTsKKyAgICAgIGlm IChzLT5yb3ctPnJldmVyc2VkX3ApCisgICAgICAgIHggLT0gd2lkdGg7CisgICAgICAvKiBEcmF3 IGN1cnNvci4gKi8KKyAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwgcy0+ eSwgd2lkdGgsIHMtPmhlaWdodCk7CisgICAgICAvKiBDbGVhciByZXN0IHVzaW5nIHRoZSBHQyBv ZiB0aGUgb3JpZ2luYWwgbm9uLWN1cnNvciBmYWNlLiAqLworICAgICAgaWYgKHdpZHRoIDwgYmFj a2dyb3VuZF93aWR0aCkKKyAgICAgICAgeworICAgICAgICAgIGludCB5ID0gcy0+eTsKKyAgICAg ICAgICBpbnQgdyA9IGJhY2tncm91bmRfd2lkdGggLSB3aWR0aCwgaCA9IHMtPmhlaWdodDsKKyAg ICAgICAgICBYUmVjdGFuZ2xlIHI7CisgICAgICAgICAgR0MgZ2M7CisgICAgICAgICAgaWYgKCFz LT5yb3ctPnJldmVyc2VkX3ApCisgICAgICAgICAgICB4ICs9IHdpZHRoOworICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgIHggPSBzLT54OworICAgICAgICAgIGlmIChzLT5yb3ctPm1vdXNlX2Zh Y2VfcAorICAgICAgICAgICAgICAmJiBjdXJzb3JfaW5fbW91c2VfZmFjZV9wIChzLT53KSkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgeF9zZXRfbW91c2VfZmFjZV9nYyAocyk7CisgICAg ICAgICAgICAgIGdjID0gcy0+Z2M7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgZ2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgICAgICBnZXRfZ2x5cGhfc3RyaW5nX2Ns aXBfcmVjdCAocywgJnIpOworICAgICAgICAgIHhfc2V0X2NsaXBfcmVjdGFuZ2xlcyAocy0+Ziwg Z2MsICZyLCAxKTsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3RpcHBsZSkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgLyogRmlsbCBiYWNrZ3JvdW5kIHdpdGggYSBzdGlwcGxlIHBhdHRl cm4uICovCisgICAgICAgICAgICAgIFhTZXRGaWxsU3R5bGUgKEZSQU1FX1hfRElTUExBWSAocy0+ ZiksIGdjLCBGaWxsT3BhcXVlU3RpcHBsZWQpOworICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFu Z2xlIChzLT5mLCBnYywgeCwgeSwgdywgaCk7CisgICAgICAgICAgICAgIFhTZXRGaWxsU3R5bGUg KEZSQU1FX1hfRElTUExBWSAocy0+ZiksIGdjLCBGaWxsU29saWQpOworICAgICAgICAgICAgfQor ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgWEdDVmFsdWVzIHhn Y3Y7CisgICAgICAgICAgICAgIFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwg Z2MsIEdDRm9yZWdyb3VuZCB8IEdDQmFja2dyb3VuZCwgJnhnY3YpOworICAgICAgICAgICAgICBY U2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgZ2MsIHhnY3YuYmFja2dyb3Vu ZCk7CisgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIGdjLCB4LCB5LCB3LCBo KTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+Ziks IGdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAgICAgfQorICAgICAgICAgIHhfcmVzZXRf Y2xpcF9yZWN0YW5nbGVzIChzLT5mLCBnYyk7CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UgaWYg KCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQorICAgIHsKKyAgICAgIGludCBiYWNrZ3JvdW5kX3dp ZHRoID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4ID0gcy0+eCwgbGVmdF94ID0g d2luZG93X2JveF9sZWZ0X29mZnNldCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgIC8qIERvbid0 IGRyYXcgaW50byBsZWZ0IG1hcmdpbiwgZnJpbmdlIG9yIHNjcm9sbGJhciBhcmVhCisgICAgICAg ICBleGNlcHQgZm9yIGhlYWRlciBsaW5lIGFuZCBtb2RlIGxpbmUuICovCisgICAgICBpZiAoeCA8 IGxlZnRfeCAmJiAhcy0+cm93LT5tb2RlX2xpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIGJh Y2tncm91bmRfd2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICB4ID0gbGVmdF94OworICAg ICAgICB9CisgICAgICBpZiAoYmFja2dyb3VuZF93aWR0aCA+IDApCisgICAgICAgIHhfZHJhd19n bHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwgcy0+eSwgYmFja2dyb3VuZF93aWR0aCwgcy0+aGVp Z2h0KTsKKyAgICB9CisgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworfQorCisvKiBE cmF3IGdseXBoIHN0cmluZyBTLiAgVGhlIGBtY19tYXRyaXhgIGlzIHJlc2VydmVkIGZvciBmdXR1 cmUgdXNlIHdoZW4gZXJhc2luZworICAgZmFrZSBjdXJzb3JzIGR1cmluZyBgbWNfdXBkYXRlX3dp bmRvd19lcmFzZScgYW5kIHJlZHJhd2luZyBmYWtlIGN1cnNvcnMgb24KKyAgIGxlZnQvcmlnaHQg b3ZlcndyaXR0ZW4gZ2x5cGhzLiAqLworc3RhdGljIHZvaWQKK21jX3hfZHJhd19nbHlwaF9zdHJp bmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwK KyAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgc3RydWN0IG1j X21hdHJpeCBtY19tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdC IGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAgICAgICAgICAgICAgICAg ICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKKyAg ICAgICAgICAgICAgICAgICAgICAgIGJvb2wg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AgZWxz ZQorICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKG5leHQsIHRy dWUpOworICAgICAgICAgICAgbmV4dC0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICB9CisgICAg fQorICAvKiBTZXQgdXAgUy0+Z2MsIHNldCBjbGlwcGluZyBhbmQgZHJhdyBTLiAqLworICBtY194 X3NldF9nbHlwaF9zdHJpbmdfZ2MgKHMsIGN1cnNvcl9nY19wKTsKKyAgLyogRHJhdyByZWxpZWYg KGlmIGFueSkgaW4gYWR2YW5jZSBmb3IgY2hhci9jb21wb3NpdGlvbiBzbyB0aGF0IHRoZQorICAg ICBnbHlwaCBzdHJpbmcgY2FuIGJlIGRyYXduIG92ZXIgaXQuICovCisgIGlmICghcy0+Zm9yX292 ZXJsYXBzCisgICAgICAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gKKyAgICAgICYmIChz LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgfHwgcy0+Zmlyc3Rf Z2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKSkKKyAgICB7CisgICAgICB4X3NldF9nbHlw aF9zdHJpbmdfY2xpcHBpbmcgKHMpOworICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19iYWNrZ3Jv dW5kIChzLCB0cnVlKTsKKyAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYm94IChzKTsKKyAgICAg IHhfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZyAocyk7CisgICAgICByZWxpZWZfZHJhd25fcCA9 IHRydWU7CisgICAgfQorICAgIGVsc2UgaWYgKCFzLT5jbGlwX2hlYWQgLyogZHJhd19nbHlwaHMg ZGlkbid0IHNwZWNpZnkgYSBjbGlwIG1hc2suICovCisgICAgICAgICAgICAgJiYgIXMtPmNsaXBf dGFpbAorICAgICAgICAgICAgICYmICgocy0+cHJldiAmJiBzLT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mQgKHMsIGZhbHNlKTsKKyAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfZm9y ZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENPTVBPU0lURV9HTFlQSDoKKyAg ICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMgfHwgKHMtPmNtcF9mcm9tID4gMAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkK KyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICBlbHNlCisgICAg ICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1ZSk7CisgICAgICB4X2Ry YXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgIGJyZWFrOwor ICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgorICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcykKKyAg ICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICBlbHNlCisgICAgICAg IHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1ZSk7CisgICAgICB4X2RyYXdf Z2x5cGhsZXNzX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgIGJyZWFrOworICAg IGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9CisgIGlmICghcy0+Zm9yX292 ZXJsYXBzKQorICAgIHsKKyAgICAgIC8qIERyYXcgdW5kZXJsaW5lLiAqLworICAgICAgaWYgKHMt PmZhY2UtPnVuZGVybGluZV9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKHMtPmZhY2UtPnVu ZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAg ICB4X2RyYXdfdW5kZXJ3YXZlIChzKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICAg ICAgWEdldEdDVmFsdWVzIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBzLT5nYywgR0NGb3JlZ3Jv dW5kLCAmeGdjdik7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9E SVNQTEFZIChzLT5mKSwgcy0+Z2MsIHMtPmZhY2UtPnVuZGVybGluZV9jb2xvcik7CisgICAgICAg ICAgICAgICAgICB4X2RyYXdfdW5kZXJ3YXZlIChzKTsKKyAgICAgICAgICAgICAgICAgIFhTZXRG b3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBzLT5nYywgeGdjdi5mb3JlZ3JvdW5k KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZSBpZiAo cy0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAg eworICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHRoaWNrbmVzcywgcG9zaXRpb247CisgICAg ICAgICAgICAgIGludCB5OworICAgICAgICAgICAgICBpZiAocy0+cHJldiAmJiBzLT5wcmV2LT5m YWNlLT51bmRlcmxpbmVfcAorICAgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5k ZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgIC8qIFdlIHVzZSB0aGUgc2FtZSB1bmRlcmxpbmUgc3R5bGUgYXMgdGhlIHBy ZXZpb3VzIG9uZS4gKi8KKyAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPnByZXYtPnVu ZGVybGluZV90aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPnByZXYt PnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVy bGluZSB0aGlja25lc3MuICBEZWZhdWx0IGlzIDEgcGl4ZWwuICovCisgICAgICAgICAgICAgICAg ICBpZiAocy0+Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfdGhpY2tuZXNzID4gMCkKKyAgICAg ICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzczsK KyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0g MTsKKyAgICAgICAgICAgICAgICAgIGlmICh4X3VuZGVybGluZV9hdF9kZXNjZW50X2xpbmUpCisg ICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhlaWdodCAtIHRoaWNrbmVzcykgLSAo cy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHBvc2l0 aW9uLiAgVGhpcyBpcyB0aGUgcmVjb21tZW5kZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICB2 ZXJ0aWNhbCBvZmZzZXQgaW4gcGl4ZWxzIGZyb20gdGhlIGJhc2VsaW5lIHRvIHRoZSB0b3Agb2YK KyAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgdW5kZXJsaW5lLiAgVGhpcyBpcyBhIHNpZ25l ZCB2YWx1ZSBhY2NvcmRpbmcgdG8gdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY3Ms IGFuZCBpdHMgZGVmYXVsdCBpcworICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EICgobWF4 aW11bSBkZXNjZW50KSAvIDIpLCB3aXRoCisgICAgICAgICAgICAgICAgICAgICAgICAgUk9VTkQo eCkgPSBmbG9vciAoeCArIDAuNSkgICovCisgICAgICAgICAgICAgICAgICAgICAgaWYgKHhfdXNl X3VuZGVybGluZV9wb3NpdGlvbl9wcm9wZXJ0aWVzCisgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAg ICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPmZvbnQtPnVuZGVybGluZV9wb3NpdGlvbjsK KyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChzLT5mb250KQorICAgICAgICAgICAgICAg ICAgICAgICAgcG9zaXRpb24gPSAocy0+Zm9udC0+ZGVzY2VudCArIDEpIC8gMjsKKyAgICAgICAg ICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHVu ZGVybGluZV9taW5pbXVtX29mZnNldDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVfbWluaW11bV9vZmZz ZXQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgLyogQ2hlY2sgdGhlIHNhbml0 eSBvZiB0aGlja25lc3MgYW5kIHBvc2l0aW9uLiAgV2Ugc2hvdWxkCisgICAgICAgICAgICAgICAg IGF2b2lkIGRyYXdpbmcgdW5kZXJsaW5lIG91dCBvZiB0aGUgY3VycmVudCBsaW5lIGFyZWEuICov CisgICAgICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDw9IHMtPnliYXNlICsgcG9zaXRp b24pCisgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gMSkgLSAocy0+eWJh c2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPCBzLT55YmFz ZSArIHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IChz LT55ICsgcy0+aGVpZ2h0KSAtIChzLT55YmFzZSArIHBvc2l0aW9uKTsKKyAgICAgICAgICAgICAg cy0+dW5kZXJsaW5lX3RoaWNrbmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgICAgcy0+dW5k ZXJsaW5lX3Bvc2l0aW9uID0gcG9zaXRpb247CisgICAgICAgICAgICAgIHkgPSBzLT55YmFzZSAr IHBvc2l0aW9uOworICAgICAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRl ZF9wKQorICAgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54 LCB5LCBzLT53aWR0aCwgdGhpY2tuZXNzKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAg ICAgICAgWEdldEdDVmFsdWVzIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBzLT5nYywgR0NGb3Jl Z3JvdW5kLCAmeGdjdik7CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVf WF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIHMtPmZhY2UtPnVuZGVybGluZV9jb2xvcik7CisgICAg ICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBzLT5nYywgcy0+eCwgeSwgcy0+ d2lkdGgsI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JveCAocyk7CisgICAgICBpZiAocy0+cHJldikKKyAgICAgICAgeworICAgICAgICAgIHN0cnVj dCBnbHlwaF9zdHJpbmcgKnByZXY7CisgICAgICAgICAgZm9yIChwcmV2ID0gcy0+cHJldjsgcHJl djsgcHJldiA9IHByZXYtPnByZXYpCisgICAgICAgICAgICBpZiAocHJldi0+aGwgIT0gcy0+aGwK KyAgICAgICAgICAgICAgICAmJiBwcmV2LT54ICsgcHJldi0+d2lkdGggKyBwcmV2LT5yaWdodF9v dmVyaGFuZyA+IHMtPngpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBw cmV2IHdhcyBkcmF3biB3aGlsZSBjbGlwcGVkIHRvIGl0cyBvd24gYXJlYSwgd2UKKyAgICAgICAg ICAgICAgICAgICBtdXN0IGRyYXcgdGhlIHJpZ2h0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwg bm93LiAqLworICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBzYXZlID0gcHJl di0+aGw7CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzLT5obDsKKyAgICAgICAgICAgICAg ICBtY194X3NldF9nbHlwaF9zdHJpbmdfZ2MgKHByZXYsIGN1cnNvcl9nY19wKTsKKyAgICAgICAg ICAgICAgICB4X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywgcHJldik7Cisg ICAgICAgICAgICAgICAgaWYgKHByZXYtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgp CisgICAgICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHByZXYp OworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19jb21wb3Np dGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHByZXYpOworICAgICAgICAgICAgICAgIHhfcmVz ZXRfY2xpcF9yZWN0YW5nbGVzIChwcmV2LT5mLCBwcmV2LT5nYyk7CisgICAgICAgICAgICAgICAg cHJldi0+aGwgPSBzYXZlOworICAgICAgICAgICAgICAgIHByZXYtPm51bV9jbGlwcyA9IDA7Cisg ICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKHMtPm5leHQpCisgICAgICAgIHsK KyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpuZXh0OworICAgICAgICAgIGZvciAobmV4 dCA9IHMtPm5leHQ7IG5leHQ7IG5leHQgPSBuZXh0LT5uZXh0KQorICAgICAgICAgICAgaWYgKG5l eHQtPmhsICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgbmV4dC0+eCAtIG5leHQtPmxlZnRf b3ZlcmhhbmcgPCBzLT54ICsgcy0+d2lkdGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAvKiBBcyBuZXh0IHdpbGwgYmUgZHJhd24gd2hpbGUgY2xpcHBlZCB0byBpdHMgb3duIGFy ZWEsCisgICAgICAgICAgICAgICAgICAgd2UgbXVzdCBkcmF3IHRoZSBsZWZ0X292ZXJoYW5nIHBh cnQgdXNpbmcgcy0+aGwgbm93LiAqLworICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNf ZmFjZSBzYXZlID0gbmV4dC0+aGw7CisgICAgICAgICAgICAgICAgbmV4dC0+aGwgPSBzLT5obDsK KyAgICAgICAgICAgICAgICBtY194X3NldF9nbHlwaF9zdHJpbmdfZ2MgKG5leHQsIGN1cnNvcl9n Y19wKTsKKyAgICAgICAgICAgICAgICB4X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3Rs eSAocywgbmV4dCk7CisgICAgICAgICAgICAgICAgaWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBl ID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2Zv cmVncm91bmQgKG5leHQpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAg IHhfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQpOworICAgICAg ICAgICAgICAgIHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChuZXh0LT5mLCBuZXh0LT5nYyk7Cisg ICAgICAgICAgICAgICAgbmV4dC0+aGwgPSBzYXZlOworICAgICAgICAgICAgICAgIG5leHQtPm51 bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgICAgbmV4dC0+Y2xpcF9oZWFkID0gcy0+bmV4dDsK KyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICAvKiBSZXNldCBjbGlwcGluZy4g Ki8KKyAgeF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKHMtPmYsIHMtPmdjKTsKKyAgcy0+bnVtX2Ns aXBzID0gMDsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIC8qIERlZmF1bHQgdG8gdXNpbmcgWElNIGlmIGF2YWlsYWJsZS4gICov CiAjaWZkZWYgVVNFX1hJTQogYm9vbCB1c2VfeGltID0gdHJ1ZTsKQEAgLTExMDksNiArMjAxMCwx NiBAQCBzdGF0aWMgdm9pZAogeF91cGRhdGVfYmVnaW4gKHN0cnVjdCBmcmFtZSAqZikKIHsKICAg LyogTm90aGluZyB0byBkby4gICovCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBmOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIC8qIERyYXcgYSB2ZXJ0aWNhbCB3aW5kb3cg Ym9yZGVyIGZyb20gKHgseTApIHRvICh4LHkxKSAgKi8KQEAgLTEyNTQsNiArMjE2NSwxNiBAQCB4 X3VwZGF0ZV9lbmQgKHN0cnVjdCBmcmFtZSAqZikKICAgWEZsdXNoIChGUkFNRV9YX0RJU1BMQVkg KGYpKTsKICAgdW5ibG9ja19pbnB1dCAoKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1l ID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAvKiBUaGlzIGZ1 bmN0aW9uIGlzIGNhbGxlZCBmcm9tIHZhcmlvdXMgcGxhY2VzIGluIHhkaXNwLmMKQEAgLTEzMjM4 LDYgKzE0MTU5LDIwIEBAIGV4dGVybiBmcmFtZV9wYXJtX2hhbmRsZXIgeF9mcmFtZV9wYXJtX2hh bmRsZXJzW107CiAKIHN0YXRpYyBzdHJ1Y3QgcmVkaXNwbGF5X2ludGVyZmFjZSB4X3JlZGlzcGxh eV9pbnRlcmZhY2UgPQogICB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgeHRlcm0uY2Ag bXVzdCBiZSBpbiB0aGUgZXhhY3Qgc2FtZSBvcmRlciBhcyB0aGUKK2ByZWRpc3BsYXlfaW50ZXJm YWNlJyBpbiBgZGlzcGV4dGVybi5oYCEgKi8KKworICBtY194X2RyYXdfd2luZG93X2N1cnNvciwK KyAgbWNfeF9kcmF3X2dseXBoX3N0cmluZywKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICAgIHhfZnJhbWVfcGFybV9oYW5kbGVycywKICAgICBndWlfcHJvZHVjZV9nbHlwaHMsCiAg ICAgZ3VpX3dyaXRlX2dseXBocywK --Multipart_Sun_Jan_26_23:39:20_2020-1--