From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Sun, 17 Nov 2019 22:58:13 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sun_Nov_17_22:58:13_2019-1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="43332"; mail-complaints-to="usenet@blaine.gmane.org" Cc: johnw@gnu.org, mbork@mbork.pl, rms@gnu.org, akioburns@icloud.com To: 22873@debbugs.gnu.org,17684@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 18 07:59:43 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iWb0d-0007vU-8C for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Nov 2019 07:59:43 +0100 Original-Received: from localhost ([::1]:58594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWb0b-0006Ds-Mh for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Nov 2019 01:59:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWb09-0006Db-8j for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 01:59:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWb06-0002sh-K4 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 01:59:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34243) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iWb04-0002ro-VT for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 01:59:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iWb01-0003SL-Qq for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 01:59:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Nov 2019 06:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.157406032713263 (code B ref 17684); Mon, 18 Nov 2019 06:59:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 18 Nov 2019 06:58:47 +0000 Original-Received: from localhost ([127.0.0.1]:43065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWazn-0003Rr-2i for submit@debbugs.gnu.org; Mon, 18 Nov 2019 01:58:47 -0500 Original-Received: from gateway22.websitewelcome.com ([192.185.47.179]:29059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWazL-0003R7-Pf for 17684@debbugs.gnu.org; Mon, 18 Nov 2019 01:58:40 -0500 Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 532F4129C for <17684@debbugs.gnu.org>; Mon, 18 Nov 2019 00:58:19 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id WazKi8PJ9OdBHWazKiMYZQ; Mon, 18 Nov 2019 00:58:19 -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=h6D2KZ/eLGdfkp841ly7OK0WwrErhjLCw+RixGJv9Cs=; b=d32b8Btq7xJKa1OdOiyTTtGBCi k8TEW0tLDrWPLvVvrUGn30094aZeJieHzML8SWN4Uj0q0gwO1TMzenhESgbYDz0EZIwWLO7IFQegL httmYQ8caGesHAUJJvGRMudI9QWrsnoxFHE7HC/8KjgRiGfaFH7N8GtYcMK4lzgFBSIATCdiRfhZH VDNacoFXuYGgOEK8iWRBjikJcKkEbUxKItQ1Y2+VeBnvVMG7y1pqQ1OIUVyE1Iwhn+hzJr3SO7QlB L58Q6E2bZrCr3QC+rT4AspAx/m2meYrsnQ3cbkjEJ+SH06b9guXfKEDe517bLRnt/UUYmJzP6rdyt C4RMKpfQ==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:52650 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iWazG-0004A9-OE; Mon, 18 Nov 2019 00:58:17 -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: 1iWazG-0004A9-OE X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:52650 X-Source-Auth: lawlist X-Email-Count: 6 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171884 Archived-At: --Multipart_Sun_Nov_17_22:58:13_2019-1 Content-Type: text/plain; charset=US-ASCII VERSION: 022.005 [11/17/2019] CHANGELOG: - Fixed a bug affecting the NS port relating to redrawing fake cursors on left/ right overwritten glyphs. When `mc_update_window_erase' calls `mc_erase_cursor', the window cache of fake cursors has already been updated even though the window contents have not. As such, it is necessary to use the `old_cache' (saved fake cursor cache from the previous command loop) to determine which fake cursors must be redrawn. [Prior to this bug fix, the updated cache of fake cursors (i.e., `w->mc_matrix`) was used when determining which fake cursors to redraw on the left/right overwritten glyphs.] As to the W32 port and the X11 port, support for redrawing fake cursors on left/right overwritten glyphs is still on the "todo list". However, `mc_w32_draw_glyph_string' and `mc_x_draw_glyph_string' have now been updated to include an extra argument for the `mc_matrix`. - 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. - There is a bug affecting the recorded `w->mc.lnum_pixel_width` that is observable when not running under gdb, but disappears when running under gdb. While viewing a folded org-mode buffer, the non-gdb instance had a visible line number pixel-width of 44, but Emacs treated it as fluctuating between 44 and 55 as the cursor was moved to the end of line. In the gdb instance, the visible line number pixel width was 55 with no fluctuation under the same conditions as the non-gdb instance. This appears to be a different bug than bug#32177 (current line number shifts one column to the left) because the line number of the current line does not shift left, and changing the bidi settings did not correct the issue. - The current test for `auto_hscroll_mode_p' only looks for `current_line` and all five related tests are based upon that assumption, which may not be true. - Multiple Cursors: If point is in the middle of a composite character, then select a fully composed character so that the fake cursor is visible. - Implement functionality similar to the Lisp multiple-cursors by Magnar Sveen. - Follow up with the Emacs team re bug#32177; i.e., (Current line number shifts one column to the left.) - Follow up with the Emacs team re bug#32060; i.e., Horizontal Scrolling (Current Line): Wrong line gets h-scrolled. - Determine if bug #28936 needs to be fixed and help the Emacs team re same. - Is there any additional meaningful optimization that can be added to the three calls of `mc_pre_scroll_clean'? - There is a bug affecting an older version of Emacs for the NS port that causes partial line flickering when the same characters are grouped together (;;;;;;) and MC_GLYPHLESS cursors are above or below -- having the same background color as the frame; e.g., black on black (used to erase a glyphless cursor). The partial flickering is only noticeable with rapid fire; e.g., holding down the right/left arrow key. When changing the color of the glyphless cursor, the issue is not present. [@lawlist has verified that the X and HPOS coordinates are accurate.] --Multipart_Sun_Nov_17_22:58:13_2019-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2019_11_17__20_26_22_702.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5kMDlhMTMyCi0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTI4NCBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGxpYnJhcnkgd3JpdHRlbiBieSAgTWFnbmFyIFN2ZWVuLgorCisoZGVmdmFyIHBhY2thZ2UtYXJj aGl2ZXMpCisKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBtYy9t YXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMtLW1heC1jdXJzb3JzLW9yaWdpbmFsKQorKGRlZnZhciBt Yy9tYXgtY3Vyc29ycykKKyhkZWZ2YXIgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsKQorK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nMpCisgICAgICAgIChpZiAoeWVzLW9yLW5vLXAgKGZvcm1hdCAiJWQgYWN0aXZlIGN1 cnNvcnMuIENvbnRpbnVlPyAiIChtYy9udW0tY3Vyc29ycykpKQorICAgICAgICAgICAgKHNldHEg bWMvbWF4LWN1cnNvcnMgKHJlYWQtbnVtYmVyICJFbnRlciBhIG5ldywgdGVtcG9yYXJ5IG1heGlt dW06ICIpKQorICAgICAgICAgIChtYy9yZW1vdmUtZmFrZS1jdXJzb3JzKQorICAgICAgICAgIChl cnJvciAiQWJvcnRlZDogdG9vIG1hbnkgY3Vyc29ycyIpKSkpCisgICAgKGxldCAoKG92ZXJsYXkK KyAgICAgICAgICAgIChpZiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAo bWFrZS1vdmVybGF5IChwb2ludCkgKHBvaW50KSkKKyAgICAgICAgICAgICAgKG1jL21ha2UtY3Vy c29yLW92ZXJsYXktYXQtcG9pbnQpKSkpCisgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAnbWMt aWQgKG9yIGlkIChtYy9jcmVhdGUtY3Vyc29yLWlkKSkpCisgICAgICAob3ZlcmxheS1wdXQgb3Zl cmxheSAndHlwZSAnZmFrZS1jdXJzb3IpCisgICAgICAob3ZlcmxheS1wdXQgb3ZlcmxheSAncHJp b3JpdHkgMTAwKQorICAgICAgKG1jL3N0b3JlLWN1cnJlbnQtc3RhdGUtaW4tb3ZlcmxheSBvdmVy bGF5KQorICAgICAgKHdoZW4gKHVzZS1yZWdpb24tcCkKKyAgICAgICAgKG92ZXJsYXktcHV0IG92 ZXJsYXkgJ3JlZ2lvbi1vdmVybGF5CisgICAgICAgICAgICAgICAgICAgICAobWMvbWFrZS1yZWdp b24tb3ZlcmxheS1iZXR3ZWVuLXBvaW50LWFuZC1tYXJrKSkpCisgICAgICBvdmVybGF5KSkKKwor ICAoZGVmdW4gbWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJzb3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2UnbGwgaGFuZGxl IHRob3NlIGxhdGVyIGluc3RlYWQuCisgICAgICAgICAgICAod2hlbiAoZnVuY3Rpb25wIG9yaWdp bmFsLWNvbW1hbmQpCisgICAgICAgICAgICAgIDs7IGlmIGl0J3MgYSBsYW1iZGEsIHdlIGNhbid0 IGtub3cgaWYgaXQncyBzdXBwb3J0ZWQgb3Igbm90CisgICAgICAgICAgICAgIDs7IC0gc28gZ28g YWhlYWQgYW5kIGFzc3VtZSBpdCdzIG9rLCBiZWNhdXNlIHdlJ3JlIGp1c3Qgb3B0aW1pc3RpYyBs aWtlIHRoYXQKKyAgICAgICAgICAgICAgKGlmIChvciAobm90IChzeW1ib2xwIG9yaWdpbmFsLWNv bW1hbmQpKQorICAgICAgICAgICAgICAgICAgICAgIDs7IGxhbWJkYSByZWdpc3RlcmVkIGJ5IHNt YXJ0cmVwCisgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1wcmVmaXgtcCAiKCIgKHN5bWJv bC1uYW1lIG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgIChtYy9leGVjdXRl LWNvbW1hbmQtZm9yLWFsbC1mYWtlLWN1cnNvcnMgb3JpZ2luYWwtY29tbWFuZCkKKyAgICAgICAg ICAgICAgICA7OyBzbWFydHJlcCBgaW50ZXJuJ3MgY29tbWFuZHMgaW50byBvd24gb2JhcnJheSB0 byBoZWxwCisgICAgICAgICAgICAgICAgOzsgYGRlc2NyaWJlLWJpbmRpbmdzJy4gIFNvLCBsZXQn cyByZS1gaW50ZXJuJyBoZXJlIHRvCisgICAgICAgICAgICAgICAgOzsgbWFrZSB0aGUgY29tbWFu ZCBjb21wYXJhYmxlIGJ5IGBlcScuCisgICAgICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29t bWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBvcmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAg ICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBzeW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9y b3VnaAorICAgICAgICAgICAgICAgIChpZiAoZ2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1 cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAgICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0 ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4g KGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg KG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1j L2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMv YWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2Nt ZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMv cHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1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HQiAtLSB0aGUgY29udmVyc2lvbiBm cm9tIExTTAoraGFwcGVucyBpbnRlcm5hbGx5IGJ5IG11bHRpcGx5aW5nIGVhY2ggZWxlbWVudCBv ZiB0aGUgTFNMIGNvbG9yIHZlY3RvciBieSA2NTUzNS4iCisoaW50ZXJhY3RpdmUpCisgIChsZXQg KChidWZmZXIgKGdldC1idWZmZXItY3JlYXRlICIqTUMtVEVTVCoiKSkpCisgICAgKHdpdGgtY3Vy cmVudC1idWZmZXIgYnVmZmVyCisgICAgICAoZXJhc2UtYnVmZmVyKQorICAgICAgKGluc2VydCAi VGhpcyBpcyBhIHRlc3QhIikKKyAgICAgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2Vu dGEiKQorICAgICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAgICAgICAg ICAgICAgICAgICAgICgzICJib3giICIjMDBGRjAwIikKKyAgICAgICAgICAgICAgICAgICAgICAo NCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAz KSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg2ICgiYmFyIiAzKSBbMC4w IDEuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQi KQorICAgICAgICAgICAgICAgICAgICAgICg4ICJib3giICJncmV5MjUiKQorICAgICAgICAgICAg ICAgICAgICAgICg5ICJib3giICJncmV5NzUiKSkpKQorICAgIChzZWxlY3Qtd2luZG93IChkaXNw bGF5LWJ1ZmZlciBidWZmZXIpKSkpCisKKyhkZWZ1biArLXRpbWVyLWZuICgpCisiU2luY2UgdGhp cyBmaXJlcyBnbG9iYWxseSwgd2UgbXVzdCBjb250cm9sIHdoaWNoIGJ1ZmZlcnMgY3Jvc3NoYWly cyBhcHBlYXIgaW4uIgorICAod2hlbiArLW1vZGUKKyAgICAodW5sZXNzIChvciAobWVtcSBsYXN0 LWNvbW1hbmQgKy1wYXJlbnMtZXhjbHVzaW9ucykKKyAgICAgICAgICAgICAgICAobnVsbCArLXBh cmVucy1wKSkKKyAgICAgICgrLXBhcmVucy1mbikpCisgICAgKHdoZW4gKy10aW1lci12YXIKKyAg ICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVscSArLXRpbWVyLXZhciB0aW1lci1pZGxlLWxp c3QpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgbmlsKSkpKQorCisoZGVmdW4gKy1kcmF3LWZv cnRod2l0aCAoKQorIkltbWVkaWF0ZWx5IGRlbGV0ZS9kcmF3IG1hdGNoaW5nIHBhcmVudGhlc2Vz LiIKKyAgKCstZHJhdy1jcm9zc2hhaXJzICdmb3JjZSkpCisKKyhkZWZ1biArLWRyYXctY3Jvc3No YWlycyAoJm9wdGlvbmFsIGZvcmNlKQorIkltbWVkaWF0ZWx5IGRlbGV0ZSBtYXRjaGluZyBwYXJl bnRoZXNlcy4gIElmIEZPUkNFIGlzIG5vbi1uaWwsIHRoZW4gaW1tZWRpYXRlbHkKK2RyYXcgbWF0 Y2hpbmcgcGFyZW50aGVzaXM7IG90aGVyd2lzZSwgZHJhdyB0aGVtIG9uIGFuIGlkbGUtdGllci4i CisgICh3aGVuICstbW9kZQorICAgICh3aGVuICstdGltZXItdmFyCisgICAgICAoc2V0cSB0aW1l ci1pZGxlLWxpc3QgKGRlbHEgKy10aW1lci12YXIgdGltZXItaWRsZS1saXN0KSkKKyAgICAgIChz ZXRxICstdGltZXItdmFyIG5pbCkpCisgICAgKHVubGVzcyAob3IgKG1lbXEgdGhpcy1jb21tYW5k ICstcGFyZW5zLWV4Y2x1c2lvbnMpCisgICAgICAgICAgICAgICAgKGFuZCAobnVsbCArLXBhcmVu cy1wKQorICAgICAgICAgICAgICAgICAgICAgKG51bGwgKy1wYXJlbnMtb3ZlcmxheXMtZXhpc3Qt cCkpKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZvcmNlCisg ICAgICAocHJvZ24KKyAgICAgICAgKHdoZW4gKy1wYXJlbnMtcAorICAgICAgICAgICgrLXBhcmVu cy1mbikpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGltZXIgKy1p ZGxlLXRpbWVyLXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKyhkZWZ2YXIgZmMtbW9k ZSkKKworOzs7IyMjYXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJNaW5vciBt b2RlIGZvciBkaXNwbGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZhbHVlIG5p bAorICA6bGlnaHRlciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisgIDpncm91 cCAnKy1tb2RlCisgIChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUnIGhhcyB0 aGUgYWJpbGl0eSB0byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3IuCisgICAg ICA7OzsgU2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hlbiBmYy1t b2RlCisgICAgICAgIChmYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFsLWVsZG9j LW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAg ICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAg KGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2stY29udGV4 dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQor ICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAg ICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAgKGNhbmNl bC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEgaml0LWxv Y2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxv Y2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1l ciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQor ICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAg ICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAg ICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpKQorICAg ICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAgICAgKGxh bWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1idWZmZXJz IChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFsZ2FtYXRl ICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAgICAgICAgKGJsaW5r LWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmstY3Vyc29yLWNoZWNr IHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5k LWhvb2sgJ2JsaW5rLWN1cnNvci1j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lhYmxlICcrLS1zYXZlZC1zdGF0 ZSkgbmlsKQorICAgICAgKGRvbGlzdCAodmFyICcoYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAg ICAgICAgICAgICAgICAgIGZyaW5nZS1pbmRpY2F0b3ItYWxpc3QKKyAgICAgICAgICAgICAgICAg ICAgIHRhYi13aWR0aAorICAgICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3VhbAorICAg ICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgICAgICAgICAgICAgIHRy dW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cworICAgICAgICAgICAgICAgICAgICAgd29yZC13 cmFwKSkKKyAgICAgICAgKHdoZW4gKGxvY2FsLXZhcmlhYmxlLXAgdmFyKQorICAgICAgICAgIChw dXNoIChjb25zIHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICstLXNhdmVkLXN0YXRlKSkpCisgICAg ICAoc2V0cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgIChzZXRxIGRpc3BsYXktbGluZS1udW1iZXJz IHQpCisgICAgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1saW5lKQor ICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAoc2V0cSBidWZmZXItZGlz cGxheS10YWJsZSArLWJ1ZmZlci1kaXNwbGF5LXRhYmxlKQorICAgICAgKHNldHEgdGFiLXdpZHRo IDQpCisgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlzdWFsKSB0 KQorICAgICAgKHNldHEgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICAo KGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisgICAgICAgICAgICAg ICAgICBtb2RlKQorICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAgICAod2hp bGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAgICAgKHdoZW4gKGRlcml2ZWQt bW9kZS1wIG1vZGUpCisgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkpKSkKKyAg ICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVuY2F0ZS1saW5lcy1tYWpvci1tb2Rlcykp CisgICAgICAgICAgICh0CisgICAgICAgICAgICAgbmlsKSkpCisgICAgICAoc2V0IChtYWtlLWxv Y2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkKKyAgICAg IChzZXRxIHdvcmQtd3JhcCB0KQorICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGluZXMgdCkK KyAgICAgIChzZXRxIGluZGljYXRlLWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAgICAgKHNl dHEgZnJpbmdlLWluZGljYXRvci1hbGlzdAorICAgICAgICAgIDs7OyBoc2NsX2FsbF90ZW1wX3Ag fCBoc2NsX3RlbXBfcAorICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1s ZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLWxlZnQpKQorICAg ICAgICAgIDs7OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxsX3Blcm1fMV9wIHwgaHNjbF9h bGxfcGVybV8yX3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNp bmdsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1hbmdsZS11 cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLXRyaXBsZS1hbmdsZS11cAorICAgICAgICAg ICAgICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgKCstb3Zl cmxheS1hcnJvdyAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAgKHRydW5jYXRpb24gLiAo Ky1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJp Z2h0LWFycm93KSkKKyAgICAgICAgICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxlZnQtY3Vy bHktYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNoKSkKKyAgICAg ICAgICAob3ZlcmxheS1hcnJvdyAuICstZnJpbmdlLXJpZ2h0LXRyaWFuZ2xlKQorICAgICAgICAg ICh1cCAuICstZnJpbmdlLXVwLWFycm93KQorICAgICAgICAgIChkb3duIC4gKy1mcmluZ2UtZG93 bi1hcnJvdykKKyAgICAgICAgICAodG9wIC4gKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpCisgICAg ICAgICAgKGJvdHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAgICAgICAo dG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAg ICAgICArLWZyaW5nZS1yaWdodC1icmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgKy1m cmluZ2UtdG9wLXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2Ut dG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgIChlbXB0eS1saW5lIC4gKy1mcmluZ2UtZW1wdHkt bGluZSkKKyAgICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmspKSkKKyAg ICAgIChzZXRxIGZyaW5nZS1jdXJzb3ItYWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVmdC10cmlh bmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaG9sbG93IC4gKy1ob2xs b3ctcmVjdGFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChiYXIgLiAr LXZlcnRpY2FsLWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGJhciAu ICstZnJpbmdlLWhvcml6b250YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChob2xsb3ctc21hbGwgLiArLWZyaW5nZS1ob2xsb3ctc3F1YXJlKSkpCisgICAgICAoaWYg KG9yICstZm9ydGh3aXRoCisgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcg Jyg0KSkpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1mb3J0 aHdpdGggJ2FwcGVuZCAnbG9jYWwpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhv b2sgJystZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICh3aGVuICstZm9y dGh3aXRoCisgICAgICAgIChhZGQtaG9vayAnd2luZG93LWNvbmZpZ3VyYXRpb24tY2hhbmdlLWhv b2sgJystZHJhdy1mb3J0aHdpdGggbmlsICdsb2NhbCkpCisgICAgICAoYWRkLWhvb2sgJ2NoYW5n ZS1tYWpvci1tb2RlLWhvb2sgJ3R1cm4tb2ZmLSstbW9kZSBuaWwgJ2xvY2FsKQorICAgICAgOzs7 IE1hdGNoaW5nIHBhcmVudGhlc2VzIGRyYXdpbmcgZm9ydGh3aXRoIGludGVyZmVyZXMgd2l0aCB5 YXNuaXBwZXQuCisgICAgICAod2hlbiArLWZvcnRod2l0aAorICAgICAgICAoc2V0cSArLXBhcmVu cy1wIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAg ICAgICAoY29uZAorICAgICAgICAgICgrLWZvcnRod2l0aAorICAgICAgICAgICAgKG1lc3NhZ2Ug IlR1cm5lZCBPTiBgKy1tb2RlJyAtLSBEcmF3IG1hdGNoaW5nIHBhcmVudGhlc2VzIGltbWVkaWF0 ZWx5LiIpKQorICAgICAgICAgICgoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpCisgICAg ICAgICAgICA7OzsgTWF0Y2hpbmcgcGFyZW50aGVzZXMgd2lsbCBiZSBkcmF3biBpbW1lZGlhdGVs eS4KKyAgICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScgLS0gT3B0aW1pemVk IGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMuIikpCisgICAgICAgICAgKHQKKyAgICAgICAgICAgICht ZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScuIikpKSkpCisgICAgKHQKKyAgICAgIChraWxsLWxv Y2FsLXZhcmlhYmxlICdmaWxsLWNvbHVtbikKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdh dXRvLWhzY3JvbGwtbW9kZSkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdoc2Nyb2xsLXN0 ZXApCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnY3Jvc3NoYWlycykKKyAgICAgIChraWxs LWxvY2FsLXZhcmlhYmxlICdmYy12aXNpYmxlKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J2Rpc3BsYXktbGluZS1udW1iZXJzKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ2Rpc3Bs YXktbGluZS1udW1iZXJzLXdpZHRoKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ21jLWNv bmYpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnYnVmZmVyLWRpc3BsYXktdGFibGUpCisg ICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAndGFiLXdpZHRoKQorICAgICAgKG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g MCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAocHJlY2VkaW5nLWNoYXIpKQorICAgICAgICAg KG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisgICAgICAgICAocG9zMQorICAgICAgICAgICAo Y29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFyCisgICAgICAgICAgICAgICAgICAgKG9yIDs7 OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5pbmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAg ICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAgICAgICAgICAgICAgICAgICAgIDs7OyAoY2hh ci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1YXJlIGJyYWNrZXQKKyAgICAgICAgICAgICAg ICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAgICAgICAgICAgICAgICAgIDs7OyAoY2hhci10 by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkgYnJhY2tldAorICAgICAgICAgICAgICAgICAg ICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAgICAgICAgICAobWluICgxKyBvcG9pbnQpIChw b2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDEpID0+ IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFy IDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyA5MykgPT4gY2xvc2lu ZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAgICAgICAgKD0gcHJlY2VkaW5nLWNoYXIgOTMp CisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyNSkgPT4gY2xvc2luZyB3 YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDEyNSkpCisg ICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWluKSAoMS0gb3BvaW50KSkpCisgICAgICAgICAg ICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQpKSkKKyAgICAgICAgIHBvczIKKyAgICAgICAg IHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAoY29uZGl0aW9uLWNh c2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBwb3MxIChudGggMSAocGFyc2UtcGFydGlhbC1z ZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChzZXRxIHBvczIgKHNjYW4tc2V4cHMgcG9zMSAx KSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAgICAgICAgICAgIChzZXRxIGkgMSkKKyAgICAg ICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAgICAgICAoc2V0cSBzZWxlY3RlZC1mYWNlIChj b25kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLW9uZS1mYWNlKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMt dGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtZm91ci1mYWNlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA1KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZlLWZhY2UpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0g aSA3KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zZXZlbi1m YWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA4KQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1laWdodC1mYWNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChsZXQgKChvdiAobWFrZS1vdmVybGF5IHBvczEg KDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRv d3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAg ICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxlY3RlZC1mYWNlKSkKKyAgICAgICAgICAod2hl biBwb3MyCisgICAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSAoMS0gcG9zMikgcG9z MikpKQorICAgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRvd3MKKyAg ICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ3dpbmRvdyB3aW4pKQorICAgICAgICAgICAg ICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpKSkKKyAgICAgICAgKGVycm9y IG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAgdCkpKQorCisoZGVm dW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQgbmFtZSB2YWwpCisiUmVtb3ZlIHRoZSBvdmVy bGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXNgLgorSW5jbHVkZXMgYSB1 bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3ZlcmxheSB3aXRoIGFuIGAnYWZ0ZXItc3RyaW5nYCBw cm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9mIGEgbmFycm93ZWQtYnVmZmVyLiIKKyAgKGxl dCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisgICAgICAgICAocG9pbnQtbWluIChwb2ludC1t aW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1ZmZlci1uYXJyb3dlZC1wKSkKKyAgICAgICAg IChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkKKyAgICAgICAgIChlbmQKKyAgICAgICAgICAg KGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5hcnJvd2Vk LXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAgIGVuZCkKKyAgICAgICAg ICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAgICAgICAg ICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICBwb2ludC1tYXgpCisgICAgICAgICAg ICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAgICAgICBl bmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBvaW50LW1heCkpCisgICAgICAgICAgICAgICBl bmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAg ICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKD0gZW5kIHBvaW50LW1heCkpCisg ICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAg ICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAg ICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAgICAgIChvdmVybGF5cworICAgICAgICAgICAo cHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1yZWNlbnRlciBlbmQpCisgICAgICAgICAgICAg KG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAgKHdoZW4gKGFuZCBiZWcgZW5kIG5hbWUgdmFs KQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICAo KGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAgICAgICAgICAoZXEgKG92ZXJsYXktZ2V0IG8g bmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVpdGhlciBwdXNoIHRoaXMgb3ZlcmxheSBvdXRz aWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsgb3Igc3BsaXQgaXQgdG8gZXhjbHVkZSBiZWcu Li5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0ZSBpdCBlbnRpcmVseSAoaWYgaXQgaXMgY29u dGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAgICAgICAoaWYgKDwgKG92ZXJsYXktc3RhcnQg bykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAg ICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IChjb3B5LW92 ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAg ICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkpCisgICAgICAg ICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92ZXJsYXktc3RhcnQgbykgYmVnKSkKKyAgICAg ICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBvKSBlbmQpCisgICAgICAgICAgICAgICAgICAo bW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkKKyAgICAgICAgICAgICAgICAoZGVs ZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAoKGFuZCAobm90IChlcSBuYW1lICdmYWNlKSkK KyAgICAgICAgICAgICAgICAoZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXMgKG92ZXJsYXktZ2V0 IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIChkZWxldGUtb3ZlcmxheSBvKSkpKSkpKQorCiso ZGVmdW4gKy1kZWxldGUtcGFyZW5zLW92ZXJsYXlzICgpCisgICh3aGVuICstcGFyZW5zLW92ZXJs YXlzLWV4aXN0LXAKKyAgICAoZG9saXN0IChmYWNlICcoKy1wYXJlbnMtb25lLWZhY2UKKyAgICAg ICAgICAgICAgICAgICAgKy1wYXJlbnMtdHdvLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1w YXJlbnMtdGhyZWUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1mb3VyLWZhY2UK KyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZml2ZS1mYWNlCisgICAgICAgICAgICAgICAg ICAgICstcGFyZW5zLXNpeC1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXNldmVu LWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZWlnaHQtZmFjZQorICAgICAgICAg ICAgICAgICAgICArLXBhcmVucy1uaW5lLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJl bnMtdGVuLWZhY2UpKQorICAgICAgKCstcmVtb3ZlLW92ZXJsYXlzIG5pbCB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glcykg LS0gc2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkK KyAgICAoZmMtbW9kZQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAgICAg ICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAg ICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVsZG9j LW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAg ICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAg ICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1l cnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1s b2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRp bWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZv bnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAg ICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAg ICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1l cnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10 aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0ICd1 bm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uIgorICA6Z3JvdXAgJystbW9kZSkK KworKGRlZmZhY2UgKy1iYXItcHJlLXp2LWZhY2UKKyAgJygodCAoOmZvcmVncm91bmQgIm1hZ2Vu dGExIikpKQorICAiRmFjZSBmb3IgYCstYmFyLXByZS16di1mYWNlJy4iCisgIDpncm91cCAnKy1t b2RlKQorCisoZGVmZmFjZSArLWJhci1hdC16di1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5kICJ5 ZWxsb3ciKSkpCisgICJGYWNlIGZvciBgKy1iYXItYXQtenYtZmFjZScuIgorICA6Z3JvdXAgJyst bW9kZSkKKworKGRlZmZhY2UgKy1iYXItcG9zdC16di1mYWNlCisgICcoKHQgKDpmb3JlZ3JvdW5k ICJtYWdlbnRhNCIpKSkKKyAgIkZhY2UgZm9yIGArLWJhci1wb3N0LXp2LWZhY2UnLiIKKyAgOmdy b3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcmV2ZXJzZWQtYmFyLXByZS16di1mYWNlCisgICco KHQgKDpmb3JlZ3JvdW5kICJjeWFuMSIpKSkKKyAgIkZhY2UgZm9yIGArLXJldmVyc2VkLWJhci1w cmUtenYtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1yZXZlcnNlZC1i YXItYXQtenYtZmFjZQorICAnKCh0ICg6Zm9yZWdyb3VuZCAiY2hhcnRyZXVzZSIpKSkKKyAgIkZh Y2UgZm9yIGArLXJldmVyc2VkLWJhci1hdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQor CisoZGVmZmFjZSArLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UKKyAgJygodCAoOmZvcmVncm91 bmQgImN5YW40IikpKQorICAiRmFjZSBmb3IgYCstcmV2ZXJzZWQtYmFyLXBvc3QtenYtZmFjZScu IgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1ldmVuLXByZS16di1mYWNlCisgICco KCgoY2xhc3MgY29sb3IpIChtaW4t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aW4t Y29sb3JzIDE2KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJibHVlMSIp CisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAi d2hpdGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZp ZGVvIHQpCisgICAgKHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2ZW4t aW5hY3RpdmUtcHJlLXp2LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICst ZXZlbi1hdC16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFj a2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgIkRlZXBQaW5rMSIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3Jl Z3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikg KGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQorICAgICgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6 Zm9yZWdyb3VuZCAiRGVlcFBpbmsxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMg OCkpCisgICAgIDpmb3JlZ3JvdW5kICJ3aGl0ZSIpCisgICAgKCgodHlwZSB0dHkpIChjbGFzcyBt b25vKSkKKyAgICAgOmludmVyc2UtdmlkZW8gdCkKKyAgICAodCA6Zm9yZWdyb3VuZCAicGluayIp KQorICAiRmFjZSBmb3IgYCstZXZlbi1hdC16di1mYWNlJ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m9yZWdyb3VuZCAid2hp dGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVv IHQpCisgICAgKHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2ZW4taW5h Y3RpdmUtcG9zdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLW9k ZC1wcmUtenYtZmFjZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tn cm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJyZWQxIikKKyAgICAoKChjbGFzcyBjb2xv cikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQg InJlZDEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQg ZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJyZWQxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1p bi1jb2xvcnMgMTYpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInJlZDEi KQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQg IndoaXRlIikKKyAgICAoKCh0eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12 aWRlbyB0KQorICAgICh0IDpmb3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1vZGQt cHJlLXp2LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstb2RkLWluYWN0 aXZlLXByZS16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFj a2dyb3VuZCBkYXJrKSkKKyAgICAgO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FjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZh Y2UgKy1vZGQtcG9zdC16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4 KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTEiKQorICAgICgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6 Zm9yZWdyb3VuZCAiRGFya1NhbG1vbiIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3Jz IDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTEiKQorICAg ICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQorICAg ICA6Zm9yZWdyb3VuZCAiRGFya1NhbG1vbiIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29s b3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xh c3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAgKHQgOmZvcmVncm91bmQgInBp bmsiKSkKKyAgIkZhY2UgZm9yIGArLW9kZC1wb3N0LXp2LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1v ZGUpCisKKyhkZWZmYWNlICstb2RkLWluYWN0aXZlLXBvc3QtenYtZmFjZQorICAnKCgoKGNsYXNz IGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3Jv dW5kICJzaWVubmE0IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChiYWNr Z3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTQiKQorICAgICgoKGNsYXNz IGN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NoX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCitzdGF0 aWMgdm9pZAorYnNldF9mY192aXNpYmxlIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2 YWwpCit7CisgIGItPmZjX3Zpc2libGVfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNldF9m Y19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPmZjX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiBlbmQgTVVMVElQTEUt Q1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RhdGljIHZvaWQKIGJz ZXRfYWJicmV2X21vZGUgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKIHsKQEAg LTUxNDUsNiArNTIwOCwyNCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICBic2V0X2xhc3Rf c2VsZWN0ZWRfd2luZG93ICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBtYWtlX2ZpeG51bSAoMCkpOwog CiAgIGlkeCA9IDE7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKyAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIG1j X3JlYWxfZmFrZV9jdXJzb3IpLCBpZHgpOyArK2lkeDsKKyAgWFNFVEZBU1RJTlQgKEJWQVIgKCZi dWZmZXJfbG9jYWxfZmxhZ3MsIG1jX2NvbmYpLCBpZHgpOyArK2lkeDsKKyAgWFNFVEZBU1RJTlQg KEJWQVIgKCZidWZmZXJf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CAtNTIzMSw2ICs1MzEyLDI0IEBAIGluaXRfYnVmZmVyX29u Y2UgKHZvaWQpCiAgIC8qIE11c3QgZG8gdGhlc2UgYmVmb3JlIG1ha2luZyB0aGUgZmlyc3QgYnVm ZmVyISAqLwogCiAgIC8qIHJlYWwgc2V0dXAgaXMgZG9uZSBpbiBiaW5kaW5ncy5lbCAqLworCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGJz ZXRfbWNfcmVhbF9mYWtlX2N1cnNvciAoJmJ1ZmZlcl9kZWZhdWx0cywgUWhvbGxvdyk7CisgIGJz ZXRfbWNfY29uZiAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7CisgIGJzZXRfbWNfaW5hY3RpdmVf d2luZG93cyAoJmJ1ZmZlcl9kZWZhdWx0cywgUXQpOworICBic2V0X2Nyb3NzaGFpcnMgKCZidWZm ZXJfZGVmYXVsdHMsIFFuaWwpOworICBic2V0X2NoX2hvcml6b250YWxfcnVsZXIgKCZidWZmZXJf ZGVmYXVsdHMsIFF0KTsKKyAgYnNldF9jaF92ZXJ0aWNhbF9ydWxlciAoJmJ1ZmZlcl9kZWZhdWx0 cywgUXQpOworICBic2V0X2NoX2luYWN0aXZlX3dpbmRvd3MgKCZidWZmZXJfZGVmYXVsdHMsIFF0 KTsKKyAgYnNldF9mY192aXNpYmxlICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKKyAgYnNldF9m Y19pbmFjdGl2ZV93aW5kb3dzICgmYnVmZmVyX2RlZmF1bHRzLCBRdCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgYnNldF9tb2RlX2xpbmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1 bH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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0YXRpY3BybyAoJmxhc3Rf b3ZlcmxheV9tb2RpZmljYXRpb25faG9va3MpOwogICBsYXN0X292ZXJsYXlfbW9kaWZpY2F0aW9u X2hvb2tzID0gbWFrZV9uaWxfdmVjdG9yICgxMCk7CiAKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIu aCBiL3NyYy9idWZmZXIuaAppbmRleCAyMDgwYTZmLi4xYWRhOTNlIDEwMDY0NAotLS0gYS9zcmMv YnVmZmVyLmgKKysrIGIvc3JjL2J1ZmZlci5oCkBAIC03NDAsNiArNzQwLDQwIEBAIHN0cnVjdCBi dWZmZXIKICAgICAgaW4gdGhlIGRpc3BsYXkgb2YgdGhpcyBidWZmZXIuICAqLwogICBMaXNwX09i amVjdCBleHRyYV9saW5lX3NwYWNpbmdfOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIFRoZSBjdXJzb3IgdHlwZSBvZiB0aGUgcmVh bCBmYWtlIGN1cnNvci4gKi8KKyAgTGlzcF9PYmplY3QgbWNfcmVhbF9mYWtlX2N1cnNvcl87CisK KyAgLyogVGhlIG5hbWUgb2YgbGlzdCB1c2VkIGJ5IG11bHRpcGxlIGN1cnNvcnMgZm9yIG5leHQg cmVkaXNwbGF5LiAqLworICBMaXNwX09iamVjdCBtY19jb25mXzsKKworICAvKiBXaGV0aGVyIHRv IGRyYXcgbXVsdGlwbGUgY3Vyc29ycyBpbiBpbmFjdGl2ZSB3aW5kb3dzLiAqLworICBMaXNwX09i amVjdCBtY19pbmFjdGl2ZV93aW5kb3dzXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUgYnVmZmVy LWxvY2FsIHZhcmlhYmxlLiAqLworICBMaXNwX09iamVjdCBjcm9zc2hhaXJzXzsKKworICAvKiBU aGUgbmFtZSBvZiB0aGUgY3Jvc3NoYWlycyBob3Jpem9udGFsIHJ1bGVyLiAqLworICBMaXNwX09i amVjdCBjaF9ob3Jpem9udGFsX3J1bGVyXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUgY3Jvc3No YWlycyB2ZXJ0aWNhbCBydWxlci4gKi8KKyAgTGlzcF9PYmplY3QgY2hfdmVydGljYWxfcnVsZXJf OworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBjcm9zc2hhaXJzIGluIGluYWN0aXZlIHdpbmRvd3Mu ICovCisgIExpc3BfT2JqZWN0IGNoX2luYWN0aXZlX3dpbmRvd3NfOworCisgIC8qIFRoZSBuYW1l IG9mIHRoZSBidWZmZXItbG9jYWwgdmFyaWFibGUuICovCisgIExpc3BfT2JqZWN0IGZjX3Zpc2li bGVfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGZpbGwgY29sdW1u IGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IGZjX2luYWN0aXZlX3dpbmRv d3NfOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEN1cnNvciB0eXBlIHRv IGRpc3BsYXkgaW4gbm9uLXNlbGVjdGVkIHdpbmRvd3MuCiAgICAgIHQgbWVhbnMgdG8gdXNlIGhv bGxvdyBib3ggY3Vyc29yLgogICAgICBTZWUgYGN1cnNvci10eXBlJyBmb3Igb3RoZXIgdmFsdWVz LiAgKi8KQEAgLTc5MSwxNCArODI1LDIxIEBAIHN0cnVjdCBidWZmZXIKICAgICAgYW4gaW5kaXJl Y3QgYnVmZmVyIHNpbmNlIGl0IGNvdW50cyBhcyBpdHMgYmFzZSBidWZmZXIuICAqLwogICBpbnQg d2luZG93X2NvdW50OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCiAgIC8qIEEgbm9uLXplcm8gdmFsdWUgaW4gc2xvdCBJRFggbWVhbnMgdGhh dCBwZXItYnVmZmVyIHZhcmlhYmxlCiAgICAgIHdpdGggaW5kZXggSURYIGhhcyBhIGxvY2FsIHZh bHVlIGluIHRoaXMgYnVmZmVyLiAgVGhlIGluZGV4IElEWAogICAgICBmb3IgYSBidWZmZXItbG9j YWwgdmFyaWFibGUgaXMgc3RvcmVkIGluIHRoYXQgdmFyaWFibGUncyBzbG90CiAgICAgIGluIGJ1 ZmZlcl9sb2NhbF9mbGFncyBhcyBhIExpc3AgaW50ZWdlci4gIElmIHRoZSBpbmRleCBpcyAtMSwK ICAgICAgdGhpcyBtZWFucyB0aGUgdmFyaWFibGUgaXMgYWx3YXlzIGxvY2FsIGluIGFsbCBidWZm ZXJzLiAgKi8KLSNkZWZpbmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA1MAorI2RlZmluZSBNQVhfUEVS X0JVRkZFUl9WQVJTIDYwCiAgIGNoYXIgbG9jYWxfZmxhZ3NbTUFYX1BFUl9CVUZGRVJfVkFSU107 CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogU2V0IHRvIHRoZSBtb2R0aW1l IG9mIHRoZSB2aXNpdGVkIGZpbGUgd2hlbiByZWFkIG9yIHdyaXR0ZW4uCiAgICAgIG1vZHRpbWUu dHZfbnNlYyA9PSBOT05FWElTVEVOVF9NT0RUSU1FX05TRUNTIG1lYW5zCiAgICAgIHZpc2l0ZWQg ZmlsZSB3YXMgbm9uZXhpc3RlbnQuICBtb2R0aW1lLnR2X25zZWMgPT0KQEAgLTkwNyw2ICs5NDgs NjkgQEAgWEJVRkZFUiAoTGlzcF9PYmplY3QgYSkKIC8qIE1vc3QgY29kZSBzaG91bGQgdXNlIHRo ZXNlIGZ1bmN0aW9ucyB0byBzZXQgTGlzcCBmaWVsZHMgaW4gc3RydWN0CiAgICBidWZmZXIuICAo U29tZSBzZXR0ZXJzIHRoYXQgYXJlIHByaXZhdGUgdG8gYSBzaW5nbGUgLmMgZmlsZSBhcmUKICAg IGRlZmluZWQgYXMgc3RhdGljIGluIHRob3NlIGZpbGVzLikgICovCisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK0lOTElORSB2b2lk Citic2V0X2Jsdl9tY19yZWFsX2Zha2VfY3Vyc29yIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09i amVjdCB2YWwpCit7CisgIGItPm1jX3JlYWxfZmFrZV9jdXJzb3JfID0gdmFsOworfQorCitJTkxJ TkUgdm9pZAorYnNldF9ibHZfbWNfY29uZiAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3Qg dmFsKQoreworICBiLT5tY19jb25mXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2 X21jX2luYWN0aXZlX3dpbmRvd3MgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkK K3sKKyAgYi0+bWNfaW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCiti c2V0X2Jsdl9jcm9zc2hhaXJzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPmNyb3NzaGFpcnNfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9ibHZfY2hf aG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IG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HRlcm4u aAorKysgYi9zcmMvZGlzcGV4dGVybi5oCkBAIC0xNDUsNiArMTQ1LDEzMSBAQCB0eXBlZGVmIHZv aWQgKkVtYWNzX0N1cnNvcjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2VuZGlmCiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICov CisKK2V4dGVybiBib29sIG1jX3N0ZGVycl9wIEVYVEVSTkFMTFlfVklTSUJMRTsKKworc3RydWN0 IGdseXBoOworCitzdHJ1Y3QgZ2x5cGhfcm93OworCitzdHJ1Y3QgZ2x5cGhfbWF0cml4OworCitl bnVtIGRyYXdfZ2x5cGhzX2ZhY2U7CisKK2VudW0gZ2x5cGhfcm93X2FyZWE7CisKK3N0cnVjdCBt Y19tYXRyaXg7CisKK2VudW0gbWNfY2FjaGVfdHlwZTsKKworZW51bSBtY19jdXJzb3JfdHlwZTsK KworZW51bSBtY19mbGF2b3I7CisKK3N0cnVjdCBtY19SR0I7CisKK3N0cnVjdCBtY19lc3NlbnRp YWxzOworCitlbnVtIG1jX2RyYXdfcm93X3R5cGU7CisKK2VudW0gbWNfZW5naW5lX3R5cGU7CisK K2VudW0gbWNfcm93X3Bvc2l0aW9uOworCitlbnVtIG1jX3JlZHJhd19yb3dfdHlwZTsKKworZW51 bSBkcmF3X2dseXBoX2FjdGlvbjsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2xpc3RuIChwdHJk aWZmX3QsIExpc3BfT2JqZWN0LCAuLi4pOworCitleHRlcm4gTGlzcF9PYmplY3QgbWNfbnRoIChp bnQsIExpc3BfT2JqZWN0KTsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2Fzc3EgKExpc3BfT2Jq ZWN0LCBMaXNwX09iamVjdCk7CisKK2V4dGVybiBlbnVtIG1jX3Jvd19wb3NpdGlvbiBtY19yb3df cG9zaXRpb24gKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqLCBp bnQpOworCitleHRlcm4gcHRyZGlmZl90IG1jX3JlZ2lvbl9saW1pdCAoYm9vbCk7CisKK2V4dGVy biBzdHJ1Y3QgZ2x5cGggKiBtY19nZXRfY3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICosIHN0 cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICosIGludCwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNf eHdfY29sb3JfdmFsdWVzIChzdHJ1Y3Qgd2luZG93ICosIExpc3BfT2JqZWN0LCBzdHJ1Y3QgbWNf UkdCICopOworCitleHRlcm4gYm9vbCBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHN0cnVjdCB3 aW5kb3cgKiwgYm9vbCk7CisKK2V4dGVybiBjaGFyICogbWNfd2luZG93IChzdHJ1Y3Qgd2luZG93 ICopOworCitleHRlcm4gY2hhciAqIG1jX2NoYXJfdG9fc3RyaW5nIChpbnQpOworCitleHRlcm4g Y2hhciAqIG1jX2N1cnNvcl90eXBlX3RvX3N0cmluZyAoZW51bSBtY19jdXJzb3JfdHlwZSk7CisK K2V4dGVybiBjaGFyICogbWNfZmxhdm9yX3RvX3N0cmluZyAoZW51bSBtY19mbGF2b3IpOworCitl eHRlcm4gY2hhciAqIG1jX2NhY2hlX3R5cGVfdG9fc3RyaW5nIChlbnVtIG1jX2NhY2hlX3R5cGUp OworCitleHRlcm4gY2hhciAqIG1jX3JlZHJhd19yb3dfdHlwZV90b19zdHJpbmcgKGVudW0gbWNf cmVkcmF3X3Jvd190eXBlKTsKKworZXh0ZXJuIHZvaWQgbWNfY2FjaGVfaW5zcGVjdG9yIChzdHJ1 Y3Qgd2luZG93ICosIHN0cnVjdCBtY19tYXRyaXgpOworCitleHRlcm4gYm9vbCBtY190cmF2ZXJz ZV9jYWNoZV9wIChzdHJ1Y3QgbWNfbWF0cml4LCBlbnVtIG1jX2NhY2hlX3R5cGUsIGludCwgaW50 KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICos IHN0cnVjdCBnbHlwaF9yb3cgKiwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBlbnVtIG1jX2N1cnNvcl90eXBlKTsKKworZXh0ZXJuIGludCBtY19nZXRfZnJpbmdlX2Jp dG1hcCAoc3RydWN0IHdpbmRvdyAqLCBMaXNwX09iamVjdCwgaW50LCBpbnQpOworCitleHRlcm4g dm9pZCBtY19lbmdpbmUgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBz dHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAq LCBpbnQsIGludCwgaW50LCBpbnQsIGludCwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICBl bnVtIG1jX2N1cnNvcl90eXBlLCBpbnQsIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IG1jX2Vzc2VudGlhbHMsIGVudW0gbWNfcm93X3Bvc2l0aW9u LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2VuZ2luZV90 eXBlLCBib29sLCBlbnVtIG1jX2RyYXdfcm93X3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAg IGVudW0gbWNfY2FjaGVfdHlwZSk7CisKK2V4dGVybiB2b2lkIG1jX3NldF9lc3NlbnRpYWxzIChz dHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBtY19lc3NlbnRpYWxzICopOworCitleHRlcm4gdm9pZCBt Y19kcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVj dCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKiwg aW50LCBpbnQsIGludCwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAg ICAgICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3NpdGlvbiwgYm9vbCwK KyAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5cGUpOworCitleHRl cm4gYm9vbCBtY19yZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRy aXggKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBnbHlwaF9yb3dfYXJlYSwgaW50LCBpbnQsIGludCwgYm9vbCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSwgZW51bSBtY19yZWRyYXdfcm93X3R5cGUp OworCitleHRlcm4gdm9pZCBtY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRvdyAqKTsKKworZXh0 ZXJuIHZvaWQgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGds eXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBn bHlwaF9yb3cgKiwgZW51bSBkcmF3X2dseXBoc19mYWNlLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGludCwgaW50LCBpbnQsIHN0cnVjdCBtY19SR0IsIGVudW0gbWNfZmxhdm9y LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUs IGludCwgYm9vbCwgYm9vbCk7CisKK2V4dGVybiB2b2lkIG1jX2VyYXNlX2N1cnNvciAoc3RydWN0 IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX21hdHJpeCwgaW50LCBpbnQsIGlu dCwgaW50LCBlbnVtIG1jX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19jdXJzb3JfdHlwZSwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19lcmFzZV9oeWJy aWQgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhf cm93ICosCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwg aW50LCBpbnQsIGludCwgaW50LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZW51bSBtY19jdXJzb3JfdHlwZSwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGJvb2wsIGVudW0gbWNfZmxhdm9yLCBib29sKTsKKworZXh0 ZXJuIGludCBtY19kcmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0 cnVjdCBtY19tYXRyaXgsIGludCwgZW51bSBnbHlwaF9yb3dfYXJlYSwgcHRyZGlmZl90LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgcHRyZGlmZl90LCBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Us IGludCwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19mbGF2b3IsIGVudW0gbWNfY3Vyc29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaF9hY3Rpb24sIGJvb2wpOworCitl eHRlcm4gc3RydWN0IGdseXBoX21hdHJpeCAqIG1jX3NhdmVfZ2x5cGhfbWF0cml4IChzdHJ1Y3Qg Z2x5cGhfbWF0cml4ICopOworCitleHRlcm4gdm9pZCBtY19yZXN0b3JlX2dseXBoX21hdHJpeCAo c3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCisvKiBlbmQg TVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyogVGV4 dCBjdXJzb3IgdHlwZXMuICAqLwogCiBlbnVtIHRleHRfY3Vyc29yX2tpbmRzCkBAIC00MDQsNiAr NTI5LDE4IEBAIHN0cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1Y3QgZ2x5cGgKIHsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpbnQgcmVs YXRpdmVfeCwgaHBvczsKKworICBwdHJkaWZmX3QgYnl0ZXBvczsKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICAvKiBQb3NpdGlvbiBmcm9tIHdoaWNoIHRoaXMgZ2x5cGggd2FzIGRy YXduLiAgSWYgYG9iamVjdCcgYmVsb3cgaXMgYQogICAgICBMaXNwIHN0cmluZywgdGhpcyBpcyBh biBpbmRleCBpbnRvIHRoYXQgc3RyaW5nLiAgSWYgaXQgaXMgYQogICAgICBidWZmZXIsIHRoaXMg aXMgYSBwb3NpdGlvbiBpbiB0aGF0IGJ1ZmZlci4gIEluIGFkZGl0aW9uLCBzb21lCkBAIC0xMjcw LDYgKzE0MDcsMjggQEAgZW51bSBkcmF3X2dseXBoc19mYWNlCiAKIHN0cnVjdCBnbHlwaF9zdHJp bmcKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMg Ki8KKworICAgIGJvb2xfYmYgbGVmdF9vdmVyd3JpdHRlbl9wIDogMTsKKworICAgIGJvb2xfYmYg cmlnaHRfb3ZlcndyaXR0ZW5fcCA6IDE7CisKKyAgICBib29sX2JmIHJlY3RhbmdsZV9udWtlZF9w IDogMTsKKworICAgIGJvb2xfYmYgYmFja2dyb3VuZF9udWtlZF9wIDogMTsKKworICAgIGVudW0g ZHJhd19nbHlwaF9hY3Rpb24KKyAgICB7CisgICAgICBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAg ICAgIE1DX0VSQVNFX0dMWVBIX1NUUklORworICAgIH0gYWN0aW9uX3R5cGU7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgLyogWC1vcmlnaW4gb2YgdGhlIHN0cmluZy4gICovCiAg IGludCB4OwogCkBAIC0yODM0LDYgKzI5OTMsMjkgQEAgdHlwZWRlZiB2b2lkICgqZnJhbWVfcGFy bV9oYW5kbGVyKSAoc3RydWN0IGZyYW1lICosIExpc3BfT2JqZWN0LCBMaXNwX09iamVjdCk7CiAK IHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNlCiB7CisKKworLy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nbHlwaF9tYXRyaXggKm1hdHJpeCwKKyAgICAgICAgc3RydWN0IGdseXBoX3Jv dyAqcm93LCBzdHJ1Y3QgbWNfbWF0cml4IG1jX21hdHJpeCwgc3RydWN0IG1jX1JHQiBsc2wsCisg ICAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwgZW51bSBtY19jdXJzb3JfdHlwZSBj dXJzb3JfdHlwZSwgaW50IHdkLAorICAgICAgICBib29sIGFjdGl2ZV9wLCBib29sIGN1cnNvcl9n Y19wKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBIYW5kbGVycyBmb3Ig c2V0dGluZyBmcmFtZSBwYXJhbWV0ZXJzLiAgKi8KICAgZnJhbWVfcGFybV9oYW5kbGVyICpmcmFt ZV9wYXJtX2hhbmRsZXJzOwogCmRpZmYgLS1naXQgYS9zcmMvZGlzcG5ldy5jIGIvc3JjL2Rpc3Bu ZXcuYwppbmRleCAwMTMxYjYzLi44NTg3ZmViIDEwMDY0NAotLS0gYS9zcmMvZGlzcG5ldy5jCisr KyBiL3NyYy9kaXNwbmV3LmMKQEAgLTU2LDYgKzU2LDE3ODIgQEAgYWxvbmcgd2l0aCBHTlUgRW1h Y3MuICBJZiBub3QsIHNlZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LiAgKi8KICNp bmNsdWRlICJ3MzIuaCIKICNlbmRpZgogDAorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCitzdHJ1Y3QgZ2x5cGhzX3NraXBwZWQKK3sK KyAgcHRyZGlmZl90IGFsbG9jYXRlZDsKKyAgcHRyZGlmZl90IHVzZWQ7CisgIHN0cnVjdCBza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9sZF91c2VzID0gZW50cnktPm5ld191c2VzID0gMDsKKyAgICAgIGVudHJ5LT5uZXdfbGluZV9u dW1iZXIgPSAwOworICAgICAgZW50cnktPmJ1Y2tldCA9IGk7CisgICAgICBlbnRyeS0+bmV4dCA9 IG1jX3Jvd190YWJsZVtpXTsKKyAgICAgIG1jX3Jvd190YWJsZVtpXSA9IGVudHJ5OworICAgIH0K KyAgcmV0dXJuIGVudHJ5OworfQorCitzdHJ1Y3QgbWNfbWF0cml4CittY19zYXZlX2NhY2hlX21h dHJpeCAoc3RydWN0IG1jX21hdHJpeCBtYXRyaXgpCit7CisgIHN0cnVjdCBtY19tYXRyaXggc2F2 ZWQ7CisgIHNhdmVkLnZwb3NfYWxsb2NhdGVkID0gbWF0cml4LnZwb3NfYWxsb2NhdGVkOworICBz YXZlZC52cG9zX3VzZWQgPSBtYXRyaXgudnBvc191c2VkOworICBzYXZlZC52cG9zID0geHphbGxv YyAoc2F2ZWQudnBvc19hbGxvY2F0ZWQgKiBzaXplb2YgKnNhdmVkLnZwb3MpOworICBmb3IgKGVu dW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVfdHlw ZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICBzYXZlZC5jdXJzb3JzX3Vz ZWRbY2FjaGVfdHlwZV0gPSBtYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOworICBmb3Ig KGludCB2bnRoID0gMDsgdm50aCA8IG1hdHJpeC52cG9zX2FsbG9jYXRlZDsgKyt2bnRoKQorICAg IHsKKyAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsK KyAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICArK2NhY2hlX3R5 cGUpCisgICAgICAgIHsKKyAgICAgICAgICBzYXZlZC52cG9zW3Zud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wgY3VycmVudF9tYXRyaXgtPm5yb3dzIC0gMTsgKytpKQorICAgIHsKKyAgICAgIHN0 cnVjdCBnbHlwaF9yb3cgKmQgPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSk7CisgICAg ICBzdHJ1Y3QgZ2x5cGhfcm93ICpjID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkpOwor ICAgICAgaWYgKGMtPmVuYWJsZWRfcAorICAgICAgICAgICYmIGQtPmVuYWJsZWRfcAorICAgICAg ICAgICYmICFkLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcAorICAgICAgICAgICYmIGMtPnkgPT0g ZC0+eQorICAgICAgICAgICYmIE1BVFJJWF9ST1dfQk9UVE9NX1kgKGMpIDw9IHliCisgICAgICAg ICAgJiYgTUFUUklYX1JPV19CT1RUT01fWSAoZCkgPD0geWIKKyAgICAgICAgICAmJiByb3dfZXF1 YWxfcCAoYywgZCwgMSkpCisgICAgICAgIHsKKyAgICAgICAgICBhc3NpZ25fcm93IChjLCBkKTsK KyAgICAgICAgICBkLT5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBlbHNl CisgICAgICAgICAgYnJlYWs7CisgICAgfQorI2lmZGVmIEhBVkVfWFdJREdFVFMKKyAgLyogQ3Vy cmVudGx5IHRoaXMgc2VlbXMgbmVlZGVkIHRvIGRldGVjdCB4d2lkZ2V0IG1vdmVtZW50IHJlbGlh Ymx5LiAqLworICAgIHJldHVybiAwOworI2VuZGlmCisgIC8qIEdpdmUgdXAgaWYgc29tZSByb3dz IGluIHRoZSBkZXNpcmVkIG1hdHJpeCBhcmUgbm90IGVuYWJsZWQuICovCisgIGlmICghIE1BVFJJ WF9ST1dfRU5BQkxFRF9QIChkZXNpcmVkX21hdHJpeCwgaSkpCisgICAgcmV0dXJuIC0xOworICBm aXJzdF9vbGQgPSBmaXJzdF9uZXcgPSBpOworICAvKiBTZXQgbGFzdF9uZXcgdG8gdG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GJvdHRvbSA9IE1BVFJJWF9ST1dfQk9UVE9NX1kgKE1BVFJJ WF9ST1cgKGN1cnJlbnRfbWF0cml4LCBpKSk7CisgICAgICBpZiAoYm90dG9tIDw9IHliKQorICAg ICAgICArK2k7CisgICAgICBpZiAoYm90dG9tID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9 CisgIGxhc3Rfb2xkID0gaTsKKyAgLyogU2tpcCBvdmVyIHJvd3MgZXF1YWwgYXQgdGhlIGJvdHRv bS4gKi8KKyAgaSA9IGxhc3RfbmV3OworICBqID0gbGFzdF9vbGQ7CisgIHdoaWxlIChpIC0gMSA+ IGZpcnN0X25ldworICAgICAgICAgJiYgaiAtIDEgPiBmaXJzdF9vbGQKKyAgICAgICAgICYmIE1B VFJJWF9ST1dfRU5BQkxFRF9QIChjdXJyZW50X21hdHJpeCwgaiAtIDEpCisgICAgICAgICAmJiAo TUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGogLSAxKS0+eQorICAgICAgICAgICAgID09IE1B VFJJWF9ST1cgKGRlc2lyZWRfbWF0cml4LCBpIC0gMSktPnkpCisgICAgICAgICAmJiAhTUFUUklY X1JPVyAoZGVzaXJlZF9tYXRyaXgsIGkgLSAxKS0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AKKyAg ICAgICAgICYmIHJvd19lcXVhbF9wIChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSAtIDEp LAorICAgICAgICAgICAgICAgICAgICAgICAgIE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBq IC0gMSksIDEpKQorICAgIC0taSwgLS1qOworICBsYXN0X25ldyA9IGk7CisgIGxhc3Rfb2xkID0g ajsKKyAgLyogTm90aGluZyB0byBkbyBpZiBhbGwgcm93cyBhcmUgZXF1YWwuICovCisgIGlmIChs YXN0X25ldyA9PSBmaXJzdF9uZXcpCisgICAgcmV0dXJuIDA7CisgIC8qIENoZWNrIGZvciBpbnRl Z2VyIG92ZXJmb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fbWF0cml4LT5ucm93cykK KyAgICAgIG1lbW9yeV9mdWxsIChTSVpFX01BWCk7CisgIH0KKyAgLyogUmVhbGxvY2F0ZSB2ZWN0 b3JzLCB0YWJsZXMgZXRjLiBpZiBuZWNlc3NhcnkuICovCisgIGlmIChjdXJyZW50X21hdHJpeC0+ bnJvd3MgPiBtY19vbGRfbGluZXNfc2l6ZSkKKyAgICBtY19vbGRfbGluZXMgPSB4cGFsbG9jICht Y19vbGRfbGluZXMsICZtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJyZW50X21hdHJpeC0+bnJvd3MgLSBtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX29sZF9saW5lcyk7CisgIGlmIChkZXNp cmVkX21hdHJpeC0+bnJvd3MgPiBtY19uZXdfbGluZXNfc2l6ZSkKKyAgICBtY19uZXdfbGluZXMg PSB4cGFsbG9jIChtY19uZXdfbGluZXMsICZtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICBkZXNpcmVkX21hdHJpeC0+bnJvd3MgLSBtY19uZXdfbGluZXNfc2l6ZSwK KyAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX25ld19saW5lcyk7 CisgIG4gPSBkZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgIG4gKz0gY3VycmVudF9tYXRyaXgtPm5y b3dzOworICBpZiAobWNfcm93X3RhYmxlX3NpemUgPCAzICogbikKKyAgICB7CisgICAgICBwdHJk aWZmX3Qgc2l6ZSA9IG5leHRfYWxtb3N0X3ByaW1lICgzICogbik7CisgICAgICBtY19yb3dfdGFi bGUgPSB4bnJlYWxsb2MgKG1jX3Jvd190YWJsZSwgc2l6ZSwgc2l6ZW9mICptY19yb3dfdGFibGUp OworICAgICAgbWNfcm93X3RhYmxlX3NpemUgPSBzaXplOworICAgICAgbWVtc2V0IChtY19yb3df dGFibGUsIDAsIHNpemUgKiBzaXplb2YgKm1jX3Jvd190YWJsZSk7CisgICAgfQorICBpZiAobiA+ IG1jX3Jvd19lbnRyeV9wb29sX3NpemUpCisgICAgbWNfcm93X2VudHJ5X3Bvb2wgPSB4cGFsbG9j IChtY19yb3dfZW50cnlfcG9vbCwgJm1jX3Jvd19lbnRyeV9wb29sX3NpemUsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBuIC0gbWNfcm93X2VudHJ5X3Bvb2xfc2l6ZSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIC0xLCBzaXplb2YgKm1jX3Jvd19lbnRyeV9wb29sKTsKKyAg aWYgKGRlc2lyZWRfbWF0cml4LT5ucm93cyA+IG1jX3J1bnNfc2l6ZSkKKyAgICB7CisgICAgICBt Y19ydW5zID0geG5yZWFsbG9jIChtY19ydW5zLCBkZXNpcmVkX21hdHJpeC0+bnJvd3MsIHNpemVv ZiAqbWNfcnVucyk7CisgICAgICBtY19ydW5fcG9vbCA9IHhucmVhbGxvYyAobWNfcnVuX3Bvb2ws IGRlc2lyZWRfbWF0cml4LT5ucm93cywgc2l6ZW9mICptY19ydW5fcG9vbCk7CisgICAgICBtY19y dW5zX3NpemUgPSBkZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgICAgfQorICBucnVucyA9IHJ1bl9p ZHggPSAwOworICBtY19yb3dfZW50cnlfaWR4ID0gMDsKKyAgLyogQWRkIHJvd3MgZnJvbSB0aGUg Y3VycmVudCBhbmQgZGVzaXJlZCBtYXRyaXggdG8gdGhlIGhhc2ggdGFibGUKKyAgICAgcm93X2hh c2hfdGFibGUgdG8gYmUgYWJsZSB0byBmaW5kIGVxdWFsIG9uZXMgcXVpY2tseS4gKi8KKyAgZm9y IChpID0gZmlyc3Rfb2xkOyBpIDwgbGFzdF9vbGQ7ICsraSkKKyAgICB7CisgICAgICBpZiAoTUFU UklYX1JPV19FTkFCTEVEX1AgKGN1cnJlbnRfbWF0cml4LCBpKSkKKyAgICAgICAgeworICAgICAg ICAgIGVudHJ5ID0gbWNfYWRkX3Jvd19lbnRyeSAoTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgs IGkpKTsKKyAgICAgICAgICBtY19vbGRfbGluZXNbaV0gPSBlbnRyeTsKKyAgICAgICAgICArK2Vu dHJ5LT5vbGRfdXNlczsKKyAgICAgICAgfQorICAgICAgZWxzZQorICAgICAgICBtY19vbGRfbGlu ZXNbaV0gPSBOVUxMOworICAgIH0KKyAgZm9yIChpID0gZmlyc3RfbmV3OyBpIDwgbGFzdF9uZXc7 ICsraSkKKyAgICB7CisgICAgICBlYXNzZXJ0IChNQVRSSVhfUk9XX0VOQUJMRURfUCAoZGVzaXJl ZF9tYXRyaXgsIGkpKTsKKyAgICAgIGVudHJ5ID0gbWNfYWRkX3Jvd19lbnRyeSAoTUFUUklYX1JP VyAoZGVzaXJlZF9tYXRyaXgsIGkpKTsKKyAgICAgICsrZW50cnktPm5ld191c2VzOworICAgICAg ZW50cnktPm5ld19saW5lX251bWJlciA9IGk7CisgICAgICBtY19uZXdfbGluZXNbaV0gPSBlbnRy eTsKKyAgICB9CisgIC8qIElkZW50aWZ5IG1vdmVzIGJhc2VkIG9uIGxpbmVzIHRoYXQgYXJlIHVu aXF1ZSBhbmQgZXF1YWwKKyAgICAgaW4gYm90aCBtYXRyaWNlcy4gKi8KKyAgZm9yIChpID0gZmly c3Rfb2xkOyBpIDwgbGFzdF9vbGQ7KQorICAgIGlmIChtY19vbGRfbGluZXNbaV0KKyAgICAgICAg JiYgbWNfb2xkX2xpbmVzW2ldLT5vbGRfdXNlcyA9PSAxCisgICAgICAgICYmIG1jX29sZF9saW5l c1tpXS0+bmV3X3VzZXMgPT0gMSkKKyAgICAgIHsKKyAgICAgICAgaW50IHAsIHE7CisgICAgICAg IGludCBuZXdfbGluZSA9IG1jX29sZF9saW5lc1tpXS0+bmV3X2xpbmVfbnVtYmVyOworICAgICAg ICBzdHJ1Y3QgcnVuICpydW4gPSBtY19ydW5fcG9vbCArIHJ1bl9pZHgrKzsKKyAgICAgICAgLyog UmVjb3JkIG1vdmUuICovCisgICAgICAgIHJ1bi0+Y3VycmVudF92cG9zID0gaTsKKyAgICAgICAg cnVuLT5jdXJyZW50X3kgPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaSktPnk7CisgICAg ICAgIHJ1bi0+ZGVzaXJlZF92cG9zID0gbmV3X2xpbmU7CisgICAgICAgIHJ1bi0+ZGVzaXJlZF95 ID0gTUFUUklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIG5ld19saW5lKS0+eTsKKyAgICAgICAgcnVu LT5ucm93cyA9IDE7CisgICAgICAgIHJ1bi0+aGVpZ2h0ID0gTUFUUklYX1JPVyAoY3VycmVudF9t YXRyaXgsIGkpLT5oZWlnaHQ7CisgICAgICAgIC8qIEV4dGVuZCBiYWNrd2FyZC4gKi8KKyAgICAg ICAgcCA9IGkgLSAxOworICAgICAgICBxID0gbmV3X2xpbmUgLSAxOworICAgICAgICB3aGlsZSAo cCA+IGZpcnN0X29sZAorICAgICAgICAgICAgICAgJiYgcSA+IGZpcnN0X25ldworICAgICAgICAg ICAgICAgJiYgbWNfb2xkX2xpbmVzW3BdID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7 CisgICAgICAgICAgICBpbnQgaCA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVp Z2h0OworICAgICAgICAgICAgLS1ydW4tPmN1cnJlbnRfdnBvczsKKyAgICAgICAgICAgIC0tcnVu LT5kZXNpcmVkX3Zwb3M7CisgICAgICAgICAgICArK3J1bi0+bnJvd3M7CisgICAgICAgICAgICBy dW4tPmhlaWdodCArPSBoOworICAgICAgICAgICAgcnVuLT5kZXNpcmVkX3kgLT0gaDsKKyAgICAg ICAgICAgIHJ1bi0+Y3VycmVudF95IC09IGg7CisgICAgICAgICAgICAtLXAsIC0tcTsKKyAgICAg ICAgICB9CisgICAgICAgIC8qIEV4dGVuZCBmb3J3YXJkLiAqLworICAgICAgICBwID0gaSArIDE7 CisgICAgICAgIHEgPSBuZXdfbGluZSArIDE7CisgICAgICAgIHdoaWxlIChwIDwgbGFzdF9vbGQK KyAgICAgICAgICAgICAgICYmIHEgPCBsYXN0X25ldworICAgICAgICAgICAgICAgJiYgbWNfb2xk X2xpbmVzW3BdID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBp bnQgaCA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0OworICAgICAgICAg ICAgKytydW4tPm5yb3dzOworICAgICAgICAgICAgcnVuLT5oZWlnaHQgKz0gaDsKKyAgICAgICAg ICAgICsrcCwgKytxOworICAgICAgICAgIH0KKyAgICAgICAgLyogSW5zZXJ0IHJ1biBpbnRvIGxp c3Qgb2YgYWxsIHJ1bnMuICBPcmRlciBydW5zIGJ5IGNvcGllZAorICAgICAgICAgICBwaXhlbCBs aW5lcy4gIE5vdGUgdGhhdCB3ZSByZWNvcmQgcnVucyB0aGF0IGRvbid0IGhhdmUgdG8KKyAgICAg ICAgICAgYmUgY29waWVkIGJlY2F1c2UgdGhleSBhcmUgYWxyZWFkeSBpbiBwbGFjZS4gIFRoaXMg aXMgZG9uZQorICAgICAgICAgICBiZWNhdXNlIHdlIGNhbiBhdm9pZCBjYWxsaW5nIHVwZGF0ZV93 aW5kb3dfbGluZSBpbiB0aGlzCisgICAgICAgICAgIGNhc2UuICovCisgICAgICAgIGZvciAocCA9 IDA7IHAgPCBucnVucyAmJiBtY19ydW5zW3BdLT5oZWlnaHQgPiBydW4tPmhlaWdodDsgKytwKQor ICAgICAgICAgIDsKKyAgICAgICAgZm9yIChxID0gbnJ1bnM7IHEgPiBwOyAtLXEpCisgICAgICAg ICAgbWNfcnVuc1txXSA9IG1jX3J1bnNbcSAtIDFdOworICAgICAgICBtY19ydW5zW3BdID0gcnVu OworICAgICAgICArK25ydW5zOworICAgICAgICBpICs9IHJ1bi0+bnJvd3M7CisgICAgICB9Cisg ICAgICBlbHNlCisgICAgICAgICsraTsKKyAgLyogRG8gdGhlIG1vdmVzLiAgRG8gaXQgaW4gYSB3 YXkgdGhhdCB3ZSBkb24ndCBvdmVyd3JpdGUgc29tZXRoaW5nCisgICAgIHdlIHdhbnQgdG8gY29w eSBsYXRlciBvbi4gIFRoaXMgaXMgbm90IHNvbHZhYmxlIGluIGdlbmVyYWwKKyAgICAgYmVjYXVz ZSB0aGVyZSBpcyBvbmx5IG9uZSBkaXNwbGF5IGFuZCB3ZSBkb24ndCBoYXZlIGEgd2F5IHRvCisg ICAgIGV4Y2hhbmdlIGFyZWFzIG9uIHRoaXMgZGlzcGxheS4gIEV4YW1wbGU6CisgICAgICAgICAg Ky0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgfCAgICAgQSAgICAg fCAgICAgICB8ICAgICBCICAgICB8CisgICAgICAgICAgKy0tLS0tLS0tLS0tKyAgLS0+ICArLS0t LS0tLS0tLS0rCisgICAgICAgICAgfCAgICAgQiAgICAgfCAgICAgICB8ICAgICBBICAgICB8Cisg ICAgICAgICAgKy0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgIEluc3RlYWQs IHByZWZlciBiaWdnZXIgbW92ZXMsIGFuZCBpbnZhbGlkYXRlIG1vdmVzIHRoYXQgd291bGQKKyAg ICAgY29weSBmcm9tIHdoZXJlIHdlIGNvcGllZCB0by4gKi8KKyAgZm9yIChpID0gMDsgaSA8IG5y dW5zOyArK2kpCisgICAgaWYgKG1jX3J1bnNbaV0tPm5yb3dzID4gMCkKKyAgICAgIHsKKyAgICAg ICAgc3RydWN0IHJ1biAqciA9IG1jX3J1bnNbaV07CisgICAgICAgIGlmIChyLT5jdXJyZW50X3kg IT0gci0+ZGVzaXJlZF95KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vICBmcHJpbnRmIChz dGRlcnIsICIlczogIHItPmN1cnJlbnQvZGVzaXJlZF92cG9zICglZC8lZCkgfCByLT5jdXJyZW50 L2Rlc2lyZWRfeSAoJWQvJWQpXG4iLAorICAgICAgICAgICAgLy8gICAgICAgICAgIHItPmN1cnJl bnRfeSA8IHItPmRlc2lyZWRfeSA/ICLihpMiIDogIuKGkSIsCisgICAgICAgICAgICAvLyAgICAg ICAgICAgci0+Y3VycmVudF92cG9zLCByLT5kZXNpcmVkX3Zwb3MsIHItPmN1cnJlbnRfeSwgci0+ ZGVzaXJlZF95KTsKKyAgICAgICAgICAgIC8vICByaWYtPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNl ICh3KTsKKyAgICAgICAgICAgIC8vICByaWYtPnNjcm9sbF9ydW5faG9vayAodywgcik7CisgICAg ICAgICAgfQorICAgICAgICAvKiBUcnVuY2F0ZSBydW5zIHRoYXQgY29weSB0byB3aGVyZSB3ZSBj b3BpZWQgdG8sIGFuZAorICAgICAgICAgICBpbnZhbGlkYXRlIHJ1bnMgdGhhdCBjb3B5IGZyb20g d2hlcmUgd2UgY29waWVkIHRvLiAqLworICAgICAgICBmb3IgKGogPSBucnVucyAtIDE7IGogPiBp OyAtLWopCisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0IHJ1biAqcCA9IG1jX3J1bnNb al07CisgICAgICAgICAgICBib29sIHRydW5jYXRlZF9wID0gMDsKKyAgICAgICAgICAgIGlmIChw LT5ucm93cyA+IDAKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgPCByLT5kZXNpcmVk X3kgKyByLT5oZWlnaHQKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgKyBwLT5oZWln aHQgPiByLT5kZXNpcmVkX3kpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAo cC0+ZGVzaXJlZF95IDwgci0+ZGVzaXJlZF95KQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBwLT5ucm93cyA9IHItPmRlc2lyZWRfdnBvcyAtIHAtPmRlc2lyZWRfdnBv czsKKyAgICAgICAgICAgICAgICAgICAgcC0+aGVpZ2h0ID0gci0+ZGVzaXJlZF95IC0gcC0+ZGVz aXJlZF95OworICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZWRfcCA9IDE7CisgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgICBpbnQgbnJvd3NfY29waWVkID0gKHItPmRlc2lyZWRfdnBvcyArIHIt Pm5yb3dzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwLT5kZXNp cmVkX3Zwb3MpOworICAgICAgICAgICAgICAgICAgICBpZiAocC0+bnJvd3MgPD0gbnJvd3NfY29w aWVkKQorICAgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzID0gMDsKKyAgICAgICAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgICAgICAgIGludCBoZWlnaHRfY29waWVkID0gKHItPmRlc2lyZWRfeSArIHItPmhlaWdodAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHAtPmRlc2ly ZWRfeSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmN1cnJlbnRfdnBvcyArPSBucm93 c19jb3BpZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfdnBvcyArPSBu cm93c19jb3BpZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzIC09IG5yb3dz X2NvcGllZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+Y3VycmVudF95ICs9IGhlaWdo dF9jb3BpZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfeSArPSBoZWln aHRfY29waWVkOworICAgICAgICAgICAgICAgICAgICAgICAgICBwLT5oZWlnaHQgLT0gaGVpZ2h0 X2NvcGllZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGVkX3AgPSAxOworICAg ICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICB9CisgICAgICAgICAgICBpZiAoci0+Y3VycmVudF95ICE9IHItPmRlc2lyZWRfeQorICAgICAg ICAgICAgICAgIC8qIFRoZSBjb25kaXRpb24gYmVsb3cgaXMgZXF1aXZhbGVudCB0bworICAgICAg ICAgICAgICAgICAgICgocC0+Y3VycmVudF95ID49IHItPmRlc2lyZWRfeQorICAgICAgICAgICAg ICAgICAgICAgJiYgcC0+Y3VycmVudF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KQorICAg ICAgICAgICAgICAgICAgICB8fCAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJl ZF95CisgICAgICAgICAgICAgICAgICAgICAgICAmJiAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD0gci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0 KSkpCisgICAgICAgICAgICAgICAgICAgYmVjYXVzZSB3ZSBoYXZlIDAgPCBwLT5oZWlnaHQgPD0g ci0+aGVpZ2h0LiAqLworICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSA8IHItPmRlc2ly ZWRfeSArIHItPmhlaWdodAorICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSArIHAtPmhl aWdodCA+IHItPmRlc2lyZWRfeSkKKyAgICAgICAgICAgICAgcC0+bnJvd3MgPSAwOworICAgICAg ICAgICAgLyogUmVvcmRlciBydW5zIGJ5IGNvcGllZCBwaXhlbCBsaW5lcyBpZiB0cnVuY2F0ZWQu ICovCisgICAgICAgICAgICBpZiAodHJ1bmNhdGVkX3AgJiYgcC0+bnJvd3MgPiAwKQorICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IGsgPSBucnVucyAtIDE7CisgICAgICAgICAg ICAgICAgd2hpbGUgKG1jX3J1bnNba10tPm5yb3dzID09IDAgfHwgbWNfcnVuc1trXS0+aGVpZ2h0 IDwgcC0+aGVpZ2h0KQorICAgICAgICAgICAgICAgICAgay0tOworICAgICAgICAgICAgICAgIG1l bW1vdmUgKG1jX3J1bnMgKyBqLCBtY19ydW5zICsgaiArIDEsIChrIC0gaikgKiBzaXplb2YgKCpt Y19ydW5zKSk7CisgICAgICAgICAgICAgICAgbWNfcnVuc1trXSA9IHA7CisgICAgICAgICAgICAg IH0KKyAgICAgICAgICB9CisgICAgICAgIC8qIEFzc2lnbiBtYXRyaXggcm93cy4gKi8KKyAgICAg ICAgZm9yIChqID0gMDsgaiA8IHItPm5yb3dzOyArK2opCisgICAgICAgICAgeworICAgICAgICAg ICAgc3RydWN0IGdseXBoX3JvdyAqZnJvbSwgKnRvOworICAgICAgICAgICAgYm9vbCB0b19vdmVy bGFwcGVkX3A7CisgICAgICAgICAgICB0byA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBy LT5kZXNpcmVkX3Zwb3MgKyBqKTsKKyAgICAgICAgICAgIGZyb20gPSBNQVRSSVhfUk9XIChkZXNp cmVkX21hdHJpeCwgci0+ZGVzaXJlZF92cG9zICsgaik7CisgICAgICAgICAgICB0b19vdmVybGFw cGVkX3AgPSB0by0+b3ZlcmxhcHBlZF9wOworICAgICAgICAgICAgZnJvbS0+cmVkcmF3X2ZyaW5n ZV9iaXRtYXBzX3AgPSBmcm9tLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3A7CisgICAgICAgICAg ICBhc3NpZ25fcm93ICh0bywgZnJvbSk7CisgICAgICAgICAgICAvKiBUaGUgYWJvdmUgYGFzc2ln bl9yb3cnIGFjdHVhbGx5IGRvZXMgc3dhcCwgc28gaWYgd2U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X2VuZF9ieXRlcG9zID0gKHZwb3MgIT0g MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPV19FTkRf QllURVBPUyAoY3VycmVudF9yb3cgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAtMTsKKyAgaW50IG1hdHJpeF9yb3dfc3RhcnRfYnl0ZXBvcyA9IE1BVFJJWF9ST1df U1RBUlRfQllURVBPUyAoZGVzaXJlZF9yb3cpOworICBpbnQgbWF0cml4X3Jvd19lbmRfYnl0ZXBv cyA9IE1BVFJJWF9ST1dfRU5EX0JZVEVQT1MgKGRlc2lyZWRfcm93KTsKKyAgLyogVGhlIGZpcnN0 IGNvbmRpdGlvbiB0ZXN0cyBmb3IgYSBzb2xpdGFyeSByb3cgY29udGFpbmluZyBaViwgcHJlY2Vk ZWQgYnkgYQorICByb3cgY29udGFpbmluZyBhIHBlbnVsdGltYXRlIGdseXBoIHdpdGggYSBjaGFy cG9zIG9mIFpWIC0gMSBmb2xsb3dlZCBieSBhbiBlbmQKKyAgb2Ygcm93IHNwYWNlIGdseXBoIHdp dGggYSBjaGFycG9zIG9mIDAuICBUaGUgb3RoZXIgY29uZGl0aW9ucyB0ZXN0IGZvciBhbiBlbXB0 eQorICBidWZmZXIgKG5vdCBuYXJyb3dlZCksIG9yIGFuIGVtcHR5IG5hcnJvd2VkIGJ1ZmZlci4g Ki8KKyAgYm9vbCByb3dfYXRfenZfcCA9ICgodnBvcyAhPSAwCisgICAgICAgICAgICAgICAgICAg ICAgICYmIChjdXJyZW50X3JvdyAtIDEpLT51c2VkW1RFWFRfQVJFQV0gPiAwCisgICAgICAgICAg ICAgICAgICAgICAgICYmIHByZXZfbWF0cml4X3Jvd19zdGFydF9ieXRlcG9zICE9IHByZXZfbWF0 cml4X3Jvd19lbmRfYnl0ZXBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiAhKGN1cnJlbnRf cm93IC0gMSktPmVuZHNfYX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AgICAgICAgICAgICAgICAgICAgICAgICA/ IGRlc2lyZWRfcm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogY3VycmVudF9yb3csCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2lyZWRfcm93LCB2cG9zKTsKKyAgLyog SWYgcm93cyBhcmUgYXQgZGlmZmVyZW50IFggb3IgWSwgb3Igcm93cyBoYXZlIGRpZmZlcmVudCBo ZWlnaHQsCisgICAgIG9yIHRoZSBjdXJyZW50IHJvdyBpcyBtYXJrZWQgaW52YWxpZCwgd3JpdGUg dGhlIGVudGlyZSBsaW5lLiAqLworICBpZiAoIWN1cnJlbnRfcm93LT5lbmFibGVkX3AKKyAgICAg IHx8IGRlc2lyZWRfcm93LT55ICE9IGN1cnJlbnRfcm93LT55CisgICAgICB8fCBkZXNpcmVkX3Jv dy0+YXNjZW50ICE9IGN1cnJlbnRfcm93LT5hc2NlbnQKKyAgICAgIHx8IGRlc2lyZWRfcm93LT5w aHlzX2FzY2VudCAhPSBjdXJyZW50X3Jvdy0+cGh5c19hc2NlbnQKKyAgICAgIHx8IGRlc2lyZWRf cm93LT5waHlzX2hlaWdodCAhPSBjdXJyZW50X3Jvdy0+cGh5c19oZWlnaHQKKyAgICAgIHx8IGRl c2lyZWRfcm93LT52aXNpYmxlX2hlaWdodCAhPSBjdXJyZW50X3Jvdy0+dmlzaWJsZV9oZWlnaHQK KyAgICAgIHx8IGN1cnJlbnRfcm93LT5vdmVybGFwcGVkX3AKKyAgICAgIC8qIFRoaXMgbmV4dCBs aW5lIGlzIG5lY2Vzc2FyeSBmb3IgY29ycmVjdGx5IHJlZHJhd2luZworICAgICAgICAgbW91c2Ut ZmFjZSBhcmVhcyBhZnRlciBzY3JvbGxpbmcgYW5kIG90aGVyIG9wZXJhdGlvbnMuCisgICAgICAg ICBIb3dldmVyLCBpdCBjYXVzZXMg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hUX0FSRUFdKQorICAgICAgICB7CisgICAg ICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgaW50IGxlbiA9IGRlc2lyZWRfcm93LT51 c2VkW1RFWFRfQVJFQV07CisgICAgICAgICAgaW50IGhwb3MgPSBkZXNpcmVkX3Jvdy0+Z2x5cGhz W1RFWFRfQVJFQV0gLSB1cGRhdGVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAg dy0+b3V0cHV0X2N1cnNvci54ID0KKyAgICAgICAgICAgIG1jX2RyYXdfZ2x5cGhzICh3LCBkZXNp cmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHctPm1jX21hdHJpeCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLngsIFRFWFRfQVJFQSwgaHBvcywgaHBvcyArIGxl biwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXX05PUk1BTF9URVhULCAwLCB2cG9z LCBsc2wsIGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jf dHlwZSwgd2QsIGVzc2VudGlhbHMuYWN0aXZlX3AsIGN1cnNvcl9nY19wLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIE1DX0RSQVdfR0xZUEhfU1RSSU5HLCBkcmF3X3ApOworICAgICAgICAg IHctPm91dHB1dF9jdXJzb3IuaHBvcyArPSBsZW47CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAo KTsKKyAgICAgICAgfQorICAgICAgLyogQ2xlYXIgdG8gZW5kIG9mIHdpbmRvdy4gKi8KKyAgICAg IGlmIChkcmF3X3ApCisgICAgICAgIHJpZi0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRf cm93LCBURVhUX0FSRUEsIC0xKTsKKyAgICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAvKiBUaGlz IGVyYXNlcyB0aGUgY3Vyc29yLiAg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ICAgICAgICAgIC0tZGVzaXJlZF9zdG9wX3BvczsKKyAg ICAgICAgc3RvcCA9IG1pbiAoY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgZGVzaXJlZF9z dG9wX3Bvcyk7CisgICAgICAgIGkgPSAwOworICAgICAgICB4ID0gZGVzaXJlZF9yb3ctPng7Cisg ICAgICAgIGludCBjbGVhcl90b194ID0gMDsKKworICAgICAgICAvKiBMb29wIG92ZXIgZ2x5cGhz IHRoYXQgY3VycmVudCBhbmQgZGVzaXJlZCByb3cgbWF5IGhhdmUgaW4gY29tbW9uLiAqLworICAg ICAgICB3aGlsZSAoaSA8IHN0b3ApCisgICAgICAgICAgeworICAgICAgICAgICAgYXJyYXlfZ2x5 cGhzX3NraXBwZWQudXNlZCA9IDA7CisgICAgICAgICAgICBib29sIGNhbl9za2lwX3AgPSAhYWJv cnRfc2tpcHBpbmc7CisgICAgICAgICAgICAvKiBTa2lwIG92ZXIgZ2x5cGhzIHRoYXQgYm90aCBy b3dzIGhhdmUgaW4gY29tbW9uLiAgVGhlc2UgZG9uJ3QgaGF2ZQorICAgICAgICAgICAgdG8gYmUg d3JpdHRlbi4gIFdlIGNhbid0IHNraXAgaWYgdGhlIGxhc3QgY3VycmVudCBnbHlwaCBvdmVybGFw cyB0aGUKKyAgICAgICAgICAgIGdseXBoIHRvIGl0cyByaWdodC4gIEZvciBleGFtcGxlLCBjb25z aWRlciBhIGN1cnJlbnQgcm93IG9mIGBpZicgd2l0aAorICAgICAgICAgICAgdGhlIGBmJyBpbiBD b3VyaWVyIGJvbGQgc28gdGhhdCBpdCBvdmVybGFwcyB0aGUgYCAnIHRvIGl0cyByaWdodC4KKyAg ICAgICAgICAgIElmIHRoZSBkZXNpcmVkIHJvdyBpcyBgICcsIHdlIHdvdWxkIHNraXAgb3ZlciB0 aGUgc3BhY2UgYWZ0ZXIgdGhlCisgICAgICAgICAgICBgaWYnIGFuZCB0aGVyZSB3b3VsZCByZW1h aW4gYSBwaXhlbCBmcm9tIHRoZSBgZicgb24gdGhlIHNjcmVlbi4gKi8KKyAgICAgICAgICAgIGlm IChvdmVybGFwcGluZ19nbHlwaHNfcCAmJiBpID4gMCkKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSAmY3VycmVudF9yb3ctPmdseXBoc1tURVhU X0FSRUFdW2kgLSAxXTsKKyAgICAgICAgICAgICAgICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAg ICAgICAgICAgcmlmLT5nZXRfZ2x5cGhfb3ZlcmhhbmdzIChnbHlwaCwgWEZSQU1FICh3LT5mcmFt ZSksICZsZWZ0LCAmcmlnaHQpOworICAgICAgICAgICAgICAgIGNhbl9za2lwX3AgPSAocmlnaHQg PT0gMCAmJiAhYWJvcnRfc2tpcHBpbmcpOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICBp ZiAoY2FuX3NraXBfcCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBzdGFy dF9ocG9zID0gaTsKKyAgICAgICAgICAgICAgICB3aGlsZSAoaSA8IHN0b3AKKyAgICAgICAgICAg ICAgICAgICAgICAgJiYgR0xZUEhfRVFVQUxfUCAoZGVzaXJlZF9nbHlwaCwgY3VycmVudF9nbHlw aCkpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICsrYXJyYXlfZ2x5 cGhzX3NraXBwZWQudXNlZDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFycmF5X2dseXBoc19z a2lwcGVkLmFsbG9jYXRlZCA8IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQpCisgICAgICAgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgaW50IG9sZF9hbGxvYyA9IGFy cmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlu dCBuZXdfZWx0cyA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSBhcnJheV9nbHlwaHNfc2tp cHBlZC5hbGxvY2F0ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tp cHBlZC5za2lwcGVkID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgeHBhbGxvYyAoYXJyYXlf Z2x5cGhzX3NraXBwZWQuc2tpcHBlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJmFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbmV3X2VsdHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIElOVF9NQVgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAq YXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBt ZW1zZXQgKGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWQgKyBvbGRfYWxsb2MsIDAsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2Nh dGVkIC0gb2xkX2FsbG9jKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHNp emVvZiAqYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCk7CisgICAgICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgICAgICAgICBpbnQgbnRoID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQu dXNlZCAtIDE7CisgICAgICAgICAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnNraXBw ZWRbbnRoXS54ID0geDsKKyAgICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQu c2tpcHBlZFtudGhdLmhwb3MgPSBpOworICAgICAgICAgICAgICAgICAgICBhcnJheV9nbHlwaHNf c2tpcHBlZC5za2lwcGVkW250aF0uZW5hYmxlZF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAg ICAgeCArPSBkZXNpcmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAg KytkZXNpcmVkX2dseXBoLCArK2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAvKiBDb25zaWRlciB0aGUgY2FzZSB0aGF0IHRoZSBjdXJyZW50 IHJvdyBjb250YWlucyAieHh4IHBwcCBnZ2ciIGluCisgICAgICAgICAgICAgICAgaXRhbGljIENv dXJpZXIgZm9udCwgYW5kIHRoZSBkZXNpcmVkIHJvdyBpcyAieHh4IGdnZyIuICBUaGUgY2hhcmFj dGVyIGBwJworICAgICAgICAgICAgICAgIGhhcyBsYmVhcmluZywgYGcnIGhhcyBub3QuICBUaGUg bG9vcCBhYm92ZSB3aWxsIHN0b3AgaW4gZnJvbnQgb2YgdGhlCisgICAgICAgICAgICAgICAgZmly c3QgYHAnIGluIHRoZSBjdXJyZW50IHJvdy4gIElmIHdlIHdvdWxkIHN0YXJ0IHdyaXRpbmcgZ2x5 cGhzIHRoZXJlLCB3ZQorICAgICAgICAgICAgICAgIHdvdWxkbid0IGVyYXNlIHRoZSBsYmVhcmlu ZyBvZiB0aGUgYHAnLiAgVGhlIHJlc3Qgb2YgdGhlIGxiZWFyaW5nIHByb2JsZW0KKyAgICAgICAg ICAgICAgICBpcyB0aGVuIHRha2VuIGNhcmUgb2YgYnkgZHJhd19nbHlwaHMuICovCisgICAgICAg ICAgICAgICAgaWYgKG92ZXJsYXBwaW5nX2dseXBoc19wCisgICAgICAgICAgICAgICAgICAgICYm IGkgPiAwCisgICAgICAgICAgICAgICAgICAgICYmIGkgPCBjdXJyZW50X3Jvdy0+dXNlZFtURVhU X0FSRUFdCisgICAgICAgICAgICAgICAgICAgICYmIChjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FS RUFdICE9IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pKQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAgICAgICAgICAg ICAgIHJpZi0+Z2V0X2dseXBoX292ZXJoYW5ncyAoY3VycmVudF9nbHlwaCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBYRlJBTUUgKHctPmZyYW1lKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmbGVmdCwgJnJpZ2h0KTsKKyAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGxlZnQg PiAwICYmIGkgPiAwKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg ICAgICAgIC0taSwgLS1kZXNpcmVkX2dseXBoLCAtLWN1cnJlbnRfZ2x5cGg7CisgICAgICAgICAg ICAgICAgICAgICAgICB4IC09IGRlc2lyZWRfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAg ICAgICAgICAgICAgICAgbGVmdCAtPSBkZXNpcmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8qIEFib3J0IHRoZSBza2lw cGluZyBhbGdvcml0aG0gaWYgd2UgZW5kIHVwIGJlZm9yZQorICAgICAgICAgICAgICAgICAgICAg ICBvdXIgc3RhcnRpbmcgcG9pbnQsIHRvIGF2b2lkIGxvb3BpbmcgKGJ1ZyMxMDcwKS4KKyAgICAg ICAgICAgICAgICAgICAgICAgVGhpcyBjYW4gaGFwcGVuIHdoZW4gdGhlIGxiZWFyaW5nIGlzIGxh cmdlciB0aGFuCisgICAgICAgICAgICAgICAgICAgICAgIHRoZSBwaXhlbCB3aWR0aC4gKi8KKyAg ICAgICAgICAgICAgICAgICAgYWJvcnRfc2tpcHBpbmcgPSAoaSA8IHN0YXJ0X2hwb3MpOworICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAgICAvKiBUcnkgdG8g YXZvaWQgd3JpdGluZyB0aGUgZW50aXJlIHJlc3Qgb2YgdGhlIGRlc2lyZWQgcm93CisgICAgICAg ICAgICAgICBieSBsb29raW5nIGZvciBhIHJlc3luYyBwb2ludC4gIFRoaXMgbWFpbmx5IHByZXZl bnRzCisgICAgICAgICAgICAgICBtb2RlIGxpbmUgZmxpY2tlcmluZyBpbiB0aGUgY2FzZSB0aGUg bW9kZSBsaW5lIGlzIGluCisgICAgICAgICAgICAgICBmaXhlZC1waXRjaCBmb250LCB3aGljaCBp dCB1c3VhbGx5IHdpbGwgYmUuICovCisgICAgICAgICAgICBpZiAoaSA8IGRlc2lyZWRfcm93LT51 c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgc3Rh cnRfeCA9IHgsIHN0YXJ0X2hwb3MgPSBpOworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAq c3RhcnQgPSBkZXNpcmVkX2dseXBoOworICAgICAgICAgICAgICAgIGludCBjdXJyZW50X3ggPSB4 OworICAgICAgICAgICAgICAgIGJvb2wgc2tpcF9maXJzdF9wID0gIWNhbl9za2lwX3A7CisgICAg ICAgICAgICAgICAgLyogRmluZCB0aGUgbmV4dCBnbHlwaCB0aGF0J3MgZXF1YWwgYWdhaW4uICov CisgICAgICAgICAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAgICAgICAgICAgICAg ICYmIChza2lwX2ZpcnN0X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICFHTFlQSF9F UVVBTF9QIChkZXNpcmVkX2dseXBoLCBjdXJyZW50X2dseXBoKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgJiYgeCA9PSBjdXJyZW50X3gpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgIHggKz0gZGVzaXJlZF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAg ICAgICAgIGN1cnJlbnRfeCArPSBjdXJyZW50X2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAg ICAgICAgICAgICAgKytkZXNpcmVkX2dseXBoLCArK2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAg ICAgICAgICAgICAgICAgc2tpcF9maXJzdF9wID0gMDsKKyAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICBmb3IgKGludCBlbHQgPSAwOworICAgICAgICAgICAgICAgICAgICAgZWx0 IDwgYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZDsKKyAgICAgICAgICAgICAgICAgICAgICsrZWx0 KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgeCA9IGFycmF5 X2dseXBoc19za2lwcGVkLnNraXBwZWRbZWx0XS54OworICAgICAgICAgICAgICAgICAgICBpbnQg aHBvcyA9IGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbZWx0XS5ocG9zOworICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnRhcmdldF9nbHlwaCA9CisgICAgICAgICAgICAgICAg ICAgICAgbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93 LCBocG9zLCB2cG9zKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAg ICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiU0tJUFBFRDogIHZwb3MgKCVkKSB8IGNo YXIgKCVkLyVzKSB8IHg6ICglZCkgfCBocG9zICglZC8lZClcbiIsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCB0YXJnZXRfZ2x5cGgtPnUuY2gsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAodGFyZ2V0 X2dseXBoLT51LmNoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHgs IGhwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsKKyAgICAgICAgICAgICAg ICAgICAgbWNfZHJhd19yb3cgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0 X2dseXBoLCB4LCAxLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFNLSVBQRUQpOwor ICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChpID09IHN0YXJ0X2hwb3Mg fHwgeCAhPSBjdXJyZW50X3gpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgIGkgPSBzdGFydF9ocG9zOworICAgICAgICAgICAgICAgICAgICB4ID0gc3RhcnRfeDsKKyAg ICAgICAgICAgICAgICAgICAgZGVzaXJlZF9nbHlwaCA9IHN0YXJ0OworICAgICAgICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBvdXRwdXRf Y3Vyc29yX3RvICh3LCB2cG9zLCBzdGFydF9ocG9zLCBkZXNpcmVkX3Jvdy0+eSwgc3RhcnRfeCk7 CisgICAgICAgICAgICAgICAgLyogUmUtZHJhdyBhIHBvcnRpb24gb2YgdGhlIHJvdy4gKi8KKyAg ICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0 ZGVyciwgIlJFRFJBVyBTRUdNRU5UOlxuXAorICAgICAgICAgICAgICAgICAgICB2cG9zICglZCkg fCBjaGFyICglZC8lcykgfCB4OiAoJWQpIHwgaHBvcyAoJWQvJWQpIHwgbGVuZ3RoICglZClcbiIs CisgICAgICAgICAgICAgICAgICAgIHZwb3MsIHN0YXJ0LT51LmNoLCBtY19jaGFyX3RvX3N0cmlu ZyAoc3RhcnQtPnUuY2gpLAorICAgICAgICAgICAgICAgICAgICBzdGFydF94LCBzdGFydF9ocG9z LCB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSwgaSAtIHN0YXJ0X2hwb3MpOworICAg ICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAgIGludCBsZW4gPSBp IC0gc3RhcnRfaHBvczsKKyAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IHN0YXJ0IC0gdXBkYXRl ZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgIHctPm91dHB1dF9jdXJz b3IueCA9CisgICAgICAgICAgICAgICAgICBtY19kcmF3X2dseXBocyAodywgZGVzaXJlZF9tYXRy aXgsIHVwZGF0ZWRfcm93LCB3LT5tY19tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdy0+b3V0cHV0X2N1cnNvci54LCBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4s CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCwg dnBvcywgbHNsLCBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX3R5cGUsIHdkLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl9nY19wLCBNQ19EUkFXX0dMWVBIX1NUUklORywgZHJh d19wKTsKKyAgICAgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLmhwb3MgKz0gbGVuOworICAg ICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgICAgbWNfZHJhd19y b3cgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3Jvdywgc3RhcnQsIHN0YXJ0X3gsIGkgLSBz dGFydF9ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCBjdXJzb3JfbWF0 cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGRyYXdfcCwgU0NSSUJFX1RXTyk7CisgICAg ICAgICAgICAgICAgY2hhbmdlZF9wID0gMTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0K KworICAgICAgICAvKiBXcml0ZSB0aGUgcmVzdC4gKi8KKyAgICAgICAgaWYgKGkgPCBkZXNpcmVk X3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIG91dHB1dF9j dXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRfcm93LT55LCB4KTsKKyAgICAgICAgICAgIGlm IChkZWJ1Z19wKQorICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJEUkFXIFJFTUFJTkRF UiBPRiBUSEUgUk9XOlxuXAorICAgICAgICAgICAgICAgIHZwb3MgKCVkKSB8IGNoYXIgKCVkLyVz KSB8IHg6ICglZCkgfCBocG9zICglZC8lZCkgfCBsZW5ndGggKCVkKVxuIiwKKyAgICAgICAgICAg ICAgICB2cG9zLCBkZXNpcmVkX2dseXBoLT51LmNoLCBtY19jaGFyX3RvX3N0cmluZyAoZGVzaXJl ZF9nbHlwaC0+dS5jaCksCisgICAgICAgICAgICAgICAgeCwgaSwgZGVzaXJlZF9yb3ctPnVzZWRb VEVYVF9BUkVBXSAtIDEsIGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSBpKTsKKyAgICAg ICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgaW50IGxlbiA9IGRlc2lyZWRfcm93 LT51c2VkW1RFWFRfQVJFQV0gLSBpOworICAgICAgICAgICAgaW50IGhwb3MgPSBkZXNpcmVkX2ds eXBoIC0gdXBkYXRlZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgdy0+b3V0 cHV0X2N1cnNvci54ID0KKyAgICAgICAgICAgICAgbWNfZHJhd19nbHlwaHMgKHcsIGRlc2lyZWRf bWF0cml4LCB1cGRhdGVkX3Jvdywgdy0+bWNfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdy0+b3V0cHV0X2N1cnNvci54LCBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4s CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXX05PUk1BTF9URVhULCAwLCB2cG9z LCBsc2wsIGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNv cl90eXBlLCB3ZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgY3Vyc29yX2djX3AsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBNQ19EUkFXX0dMWVBIX1NUUklORywgZHJhd19wKTsKKyAgICAg ICAgICAgIHctPm91dHB1dF9jdXJzb3IuaHBvcyArPSBsZW47CisgICAgICAgICAgICB1bmJsb2Nr X2lucHV0ICgpOworICAgICAgICAgICAgLyogRklYTUU6ICBBbHRob3VnaCB3ZSBuZWVkIHRvIHVw ZGF0ZSB0aGUgY2FjaGUgYmV0d2VlbiB0aGUgZW5kIG9mCisgICAgICAgICAgICB1cGRhdGVkX3Jv dyBhbmQgdGhlIHJpZ2h0IHdpbmRvdyBlZGdlLCBpdCBpcyBub3QgbmVjZXNzYXJ5IHRvIGRyYXcK KyAgICAgICAgICAgIHRob3NlIGZha2UgY3Vyc29ycy4gQWx0aG91Z2ggd2UgbWF5IG5vdCBiZSBh YmxlIHRvIHNlZSBpdCB3aXRoIHRoZQorICAgICAgICAgICAgbmFrZWQgZXllLCB0aG9zZSBmYWtl IGN1cnNvcnMgYXJlIGJlaW5nIHN1cGVyaW1wb3NlZCBvbiB0aGUgZXhpc3RpbmcKKyAgICAgICA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g ICAgICAgICAgICAgICAgICAgIHZwb3MsIHgsIGhwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRf QVJFQV0gLSAxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQtPnUuY2gs IG1jX2NoYXJfdG9fc3RyaW5nIChzdGFydC0+dS5jaCkpOworICAgICAgICAgICAgICBtY19kcmF3 X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBzdGFydCwgeCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSBocG9zLCB2 cG9zLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFs cywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFBPU1RfQ0hBTkdFRCk7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgICAvKiBUaGVyZSB3ZXJlIG5vIGNoYW5nZXMgYW5kIGkgPT0gZGVzaXJlZF9yb3ct PnVzZWRbVEVYVF9BUkVBXSAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWNoYW5nZWRfcCkKKyAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAgICAg ICAgICAgZnByaW50ZiAoc3RkZXJyLCAiVU5DSEFOR0VEIC0tIFdSSVRFIEVOVElSRSBMSU5FOiAg dnBvcyAoJWQpIHwgcm93LT51c2VkICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHZwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsKKyAgICAg ICAgICAgICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBk ZXNpcmVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGRlc2lyZWRfcm93LT54LCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdLCB2cG9zLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCBy b3dfcG9zaXRpb24sIGRyYXdfcCwgVU5DSEFOR0VEKTsKKyAgICAgICAgICAgICAgfQorCisgICAg ICAgIC8qIE1heWJlIGNsZWFyIHRvIGVuZCBvZiBsaW5lLiAqLworICAgICAgICBpZiAoTUFUUklY X1JPV19FWFRFTkRTX0ZBQ0VfUCAoZGVzaXJlZF9yb3cpKQorICAgICAgICAgIHsKKyAgICAgICAg ICAgIC8qIElmIG5ldyByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEsIG5v dGhpbmcKKyAgICAgICAgICAgICAgIGhhcyB0byBiZSBjbGVhcmVkLCBpZiBhbmQgb25seSBpZiB3 ZSBkaWQgYSB3cml0ZV9nbHlwaHMKKyAgICAgICAgICAgICAgIGFib3ZlLiAgVGhpcyBpcyBtYWRl IHN1cmUgYnkgc2V0dGluZyBkZXNpcmVkX3N0b3BfcG9zCisgICAgICAgICAgICAgICBhcHByb3By aWF0ZWx5IGFib3ZlLiAqLworICAgICAgICAgICAgZWFzc2VydCAoaSA8IGRlc2lyZWRfcm93LT51 c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgIHx8ICgoZGVzaXJlZF9yb3ctPnVz ZWRbVEVYVF9BUkVBXSA9PSBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAg ICAgICAgICAgICAgICAgICYmIE1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1AgKGN1cnJlbnRfcm93 KSkpOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChNQVRSSVhfUk9XX0VYVEVORFNf RkFDRV9QIChjdXJyZW50X3JvdykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIElm IG9sZCByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEsIGNsZWFyLiAqLwor ICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAg ICAgICAgICAgICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRfcm93LT55 LCBkZXNpcmVkX3Jvdy0+cGl4ZWxfd2lkdGgpOworICAgICAgICAgICAgICBpZiAoZHJhd19wKQor ICAgICAgICAgICAgICAgIHJpZi0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRfcm93LCBU RVhUX0FSRUEsIC0xKTsKKyAgICAgICAgICAgICAgY2xlYXJfdG9feCA9IC0xOworICAgICAgICAg ICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAo ZGVzaXJlZF9yb3ctPnBpeGVsX3dpZHRoIDwgY3VycmVudF9yb3ctPnBpeGVsX3dpZHRoKQorICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogT3RoZXJ3aXNlIGNsZWFyIHRvIHRoZSBl bmQgb2YgdGhlIG9sZCByb3cuICBFdmVyeXRoaW5nCisgICAgICAgICAgICAgICAgICAgYWZ0ZXIg dGhhdCBwb3NpdGlvbiBzaG91bGQgYmUgY2xlYXIgYWxyZWFkeS4gKi8KKyAgICAgICAgICAgICAg ICBpbnQgeGxpbTsKKyAgICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+dXNlZFtU RVhUX0FSRUFdKQorICAgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywg aSwgZGVzaXJlZF9yb3ctPnksIGRlc2lyZWRfcm93LT5waXhlbF93aWR0aCk7CisgICAgICAgICAg ICAgICAgLyogSWYgY3Vyc29yIGlzIGRpc3BsYXllZCBhdCB0aGUgZW5kIG9mIHRoZSBsaW5lLCBt YWtlIHN1cmUKKyAgICAgICAgICAgICAgICAgICBpdCdzIGNsZWFyZWQuICBOb3dhZGF5cyB3ZSBk b24ndCBoYXZlIGEgcGh5c19jdXJzb3JfZ2x5cGgKKyAgICAgICAgICAgICAgICAgICB3aXRoIHdo aWNoIHRvIGVyYXNlIHRoZSBjdXJzb3IgKGJlY2F1c2UgdGhpcyBtZXRob2QKKyAgICAgICAgICAg ICAgICAgICBkb2Vzbid0IHdvcmsgd2l0aCBsYmVhcmluZy9yYmVhcmluZyksIHNvIHdlIG11c3Qg ZG8gaXQgdGhpcyB3YXkuICovCisgICAgICAgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+cGh5c19j dXJzb3IudnBvcworICAgICAgICAgICAgICAgICAgICAmJiAoZGVzaXJlZF9yb3ctPnJldmVyc2Vk X3AKKyAgICAgICAgICAgICAgICAgICAgICAgID8gKHctPnBoeXNfY3Vyc29yLmhwb3MgPCAwKQor ICAgICAgICAgICAgICAgICAgICAgICAgOiAody0+cGh5c19jdXJzb3IuaHBvcyA+PSBkZXNpcmVk X3Jvdy0+dXNlZFtURVhUX0FSRUFdKSkpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAgIHctPnBoeXNfY3Vyc29yX29uX3AgPSAwOworICAgICAgICAgICAgICAgICAgICB4 bGltID0gLTE7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgICAgIHhsaW0gPSBjdXJyZW50X3Jvdy0+cGl4ZWxfd2lkdGg7CisgICAg ICAgICAgICAgICAgaWYgKGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgIHJpZi0+Y2xlYXJfZW5k X29mX2xpbmUgKHcsIHVwZGF0ZWRfcm93LCBURVhUX0FSRUEsIHhsaW0pOworICAgICAgICAgICAg ICAgIGNsZWFyX3RvX3ggPSB4bGltOworICAgICAgICAgIC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ICAgc3BhY2UgbGlrZSBub24td29yZC13cmFwcGVkIGxpbmVzIGRvLiAqLwor ICAgICAgICAgICAgaW50IHggPSB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAg ICBpbnQgaHBvcyA9IHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgICAg ICAgaW50IHhfbGltaXQgPSAoY2xlYXJfdG9feCA9PSAtMSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgPyB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjbGVh cl90b194OworICAgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNvbnRl bnRzKTsKKyAgICAgICAgICAgIGJvb2wgZmlsbF9jb2x1bW5fdHJ1bXBzX3AgPSAoIU5JTFAgKEJW QVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxz LmZjX3gpOworICAgICAgICAgICAgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICBmcHJp bnRmIChzdGRlcnIsICJtY191cGRhdGVfdGV4dF9hcmVhIChmbG9hdGluZyk6ICB2cG9zICglZCkg fCB4X2xpbWl0ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywg eF9saW1pdCk7CisgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAg ICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50 aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIs IGZjX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgJiYgeCA8IHRleHRfYXJl YV93aWR0aAorICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSB4CisgICAgICAg ICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAmJiBkcmF3 X3ApCisgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRf cm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwKKyAgICAgICAgICAgICAgICAgICAgICAgICB4 LCB4X2xpbWl0LCB1cGRhdGVkX3Jvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFSLCAxLAorICAgICAg ICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlv biwKKyAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19wID8gZGVidWdfZmcgOiBlc3NlbnRp YWxzLmZjX2ZnW3Jvd19wb3NpdGlvbl0sCisgICAgICAgICAgICAgICAgICAgICAgICAgRklMTF9D T0xVTU4sIGRyYXdfcCwgTk9XSEVSRSwgTk9fQ0FDSEUpOworICAgICAgICAgICAgaWYgKEJVRkZF UlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjcm9z c2hhaXJzKSkKKyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaG9yaXpvbnRh bF9ydWxlcikpCisgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAg ICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAg ICAgICAgICAgICAmJiB4IDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgJiYgdnBv cyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICYmIHRhcmdldF9nbHlwaCAhPSBO VUxMCisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAgICBtY19lbmdpbmUg KHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBURVhUX0FSRUEs CisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRlZF9yb3ctPnksIGhw b3MsIHZwb3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21h dHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAg IGRlYnVnX3AgPyBkZWJ1Z19mZyA6IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bvc2l0aW9uXSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3X3AsIE5PV0hFUkUs IE5PX0NBQ0hFKTsKKyAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAg ICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAg ICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2Vu dGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChi LCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICYmICFmaWxsX2NvbHVt bl90cnVtcHNfcAorICAgICAgICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAg ICAgICAgICAgICAmJiB2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICAgICAgJiYg dy0+Y3Vyc29yLnggPj0geAorICAgICAgICAgICAgICAgICYmIHRhcmdldF9nbHlwaCAhPSBOVUxM CisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAgICBtY19lbmdpbmUgKHcs IGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBURVhUX0FSRUEsCisg ICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRlZF9yb3ctPnksIGhwb3Ms IHZwb3MsIE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4 LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgZGVi dWdfcCA/IGRlYnVnX2ZnIDogZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25dLAorICAgICAg ICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3AsIE5PV0hFUkUsIE5PX0NB Q0hFKTsKKyAgICAgICAgICB9CisKKyAgICAgIH0KKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30KKwor LyogVXBkYXRlIHJvdyBWUE9TIGluIHdpbmRvdyBXLiAgVmFsdWUgaXMgdHJ1ZSBpZiBkaXNwbGF5 IGhhcyBiZWVuIGNoYW5nZWQuICovCitzdGF0aWMgYm9vbAorbWNfdXBkYXRlX3dpbmRvd19saW5l IChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgdnBvcywgY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1vZGVfbGluZV9wICE9IGN1 cnJlbnRfcm93LT5tb2RlX2xpbmVfcAorICAgICAgICAgIHx8IGRlc2lyZWRfcm93LT5leGFjdF93 aW5kb3dfd2lkdGhfbGluZV9wICE9IGN1cnJlbnRfcm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGlu ZV9wCisgICAgICAgICAgfHwgKE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAoZGVzaXJl ZF9yb3cpCisgICAgICAgICAgICAgICE9IE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAo Y3VycmVudF9yb3cpKSkKKyAgICAgICAgcmlmLT5hZnRlcl91cGRhdGVfd2luZG93X2xpbmVfaG9v ayAodywgZGVzaXJlZF9yb3cpOworICAgIH0KKyAgLyogVXBkYXRlIGN1cnJlbnRfcm93IGZyb20g ZGVzaXJlZF9yb3cuICovCisgIG1ha2VfY3VycmVudCAody0+ZGVzaXJlZF9tYXRyaXgsIHctPmN1 cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30KKwordm9pZAorbWNf dXBkYXRlX3dpbmRvd19lcmFzZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCBv bGRfbWF0cml4KQoreworICBib29sIGRlYnVnX3AgPSBmYWxzZTsKKyAgYm9vbCBnb19vbmVfcCA9 IChvbGRfbWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPiAwCisgICAgICAgICAgICAgICAg ICAgfHwgb2xkX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4gMAorICAgICAgICAgICAg ICAgICAgIHx8IG9sZF9tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA+IDApOworICBib29s IGdvX3R3b19wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICYm ICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg ZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkpOworICBib29sIHVwZGF0aW5nX2ZyYW1lX3Ag PSBmYWxzZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGlmIChY RlJBTUUgKHctPmZyYW1lKSAhPSBmLT5tY191cGRhdGluZ19mcmFtZQorICAgICAgJiYgKGdvX29u ZV9wIHx8IGdvX3R3b19wKSkKKyAgICB7CisgICAgICB1cGRhdGluZ19mcmFtZV9wID0gdHJ1ZTsK KyAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CisgICAgfQorICBpZiAody0+cGh5c19jdXJzb3Jfb25f cAorICAgICAgJiYgZ29fdHdvX3ApCisgICAgZXJhc2VfcGh5c19jdXJzb3IgKHcpOworICBmb3Ig KGludCB2bnRoID0gMDsKKyAgICAgICBnb19vbmVfcAorICAgICAgICYmIHZudGggPCB3LT5tY19t YXRyaXgudnBvc191c2VkOworICAgICAgICsrdm50aCkKKyAgICB7CisgICAgICBmb3IgKGVudW0g bWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgICAgIGNhY2hlX3R5 cGUgPCBOT19DQUNIRTsKKyAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAgICAgICBmb3IgKGlu dCBudGhfMCA9IDA7CisgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAob2xkX21hdHJp eCwgY2FjaGVfdHlwZSwgdm50aCwgbnRoXzApOworICAgICAgICAgICAgICsrbnRoXzApCisgICAg ICAgICAgeworICAgICAgICAgICAgYm9vbCBzYW1lX3AgPSBmYWxzZTsKKyAgICAgICAgICAgIGZv ciAoaW50IHdfbnRoID0gMDsgd19udGggPCB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91 c2VkW2NhY2hlX3R5cGVdOyArK3dfbnRoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgc2FtZV9wIHw9IChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmdseXBoLnR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnR5cGUKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmICgob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5nbHlwaC5ieXRlcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRo XS5nbHlwaC5ieXRlcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9 PSBBVF9aVgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09IEFU X1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9aVikpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguY2hhcnBvcworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3 X250aF0uZ2x5cGguY2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAo b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5yb3dfcG9zaXRp b24gPT0gQVRfWlYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9 PSBBVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAob2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9a VgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC51LnZhbAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250 aF0uZ2x5cGgudS52YWwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguZmFjZV9pZAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0uZ2x5cGguZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlw aC5wYWRkaW5nX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnBhZGRpbmdfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5nbHlwaC5sZWZ0X2JveF9saW5lX3AKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b d19udGhdLmdseXBoLmxlZnRfYm94X2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5y aWdodF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5yaWdodF9ib3hf bGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnZvZmZzZXQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bd19udGhdLmdseXBoLnZvZmZzZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgucGl4ZWxf d2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnBpeGVsX3dpZHRoCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy54CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5n bHlwaC5zbGljZS5pbWcueAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5zbGljZS5pbWcueQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuaW1nLnkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0uZ2x5cGguc2xpY2UuaW1nLndpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlw aC5zbGljZS5pbWcud2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuaW1nLmhl aWdodAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2UuaW1nLmhlaWdodAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5nbHlwaC5zbGljZS5jbXAuZnJvbQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3 X250aF0uZ2x5cGguc2xpY2UuY21wLmZyb20KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ueAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0ueAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5meAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVt3X250aF0uZngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ueQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3 X250aF0ueQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5meQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u ZnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uaHBv cworICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS52cG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS52cG9z CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLndkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS53ZAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5oCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzBdLmN1cnNvcl90eXBlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5jdXJzb3JfdHlw ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3Jfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19u dGhdLmN1cnNvcl93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5yZWQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bd19udGhdLmZnLnJlZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5ncmVlbgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0uZmcuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcuYmx1ZQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVt3X250aF0uZmcuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5iZy5y ZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLnJlZAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5i Zy5ncmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uYmcuZ3JlZW4KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMF0uYmcuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uYmcuYmx1ZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uZ2x5cGhfZmxhdm9yCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5n bHlwaF9mbGF2b3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZW5hYmxlZF9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5lbmFibGVkX3ApOworICAgICAgICAgICAgICAgIGlmIChzYW1lX3ApCisgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAg ICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIkhJVCAoJXMpOiAgdnBvcyAoJWQpIHwg aHBvcyAoJWQpIHwgY2hhciAoJXMpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGNhY2hlX3R5cGUgPT0gTUNfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gIk1DIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoY2FjaGVfdHlwZSA9PSBDSF9DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyAiQ0giCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IChjYWNoZV90eXBlID09IEZDX0NBQ0hFKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/ICJGQyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogIk5PIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS52cG9z LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmhwb3MsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAody0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnUuY2gpKTsKKyAgICAgICAg ICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19u dGhdLnNhbWVfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVidWdfcCkKKyAgICAgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGludCBvbGRfY2FjaGVfdXNlZCA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdOworICAgICAgICAg ICAgICAgICAgICAgIGludCBuZXdfY2FjaGVfdXNlZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZiAo c3RkZXJyLCAiTUlTUyAoJXMpOiAgdnBvcyAoJWQpIHwgaHBvcyAoJWQgdi4gJWQpIHwgY2hhciAo JXMgdi4gJXMpIHwgY2FjaGVfdXNlZCAoJWQgdi4gJWQpXG4iLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGNhY2hlX3R5cGUgPT0gTUNfQ0FDSEUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gIk1DIgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoY2FjaGVfdHlwZSA9PSBDSF9DQUNIRSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiQ0giCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChjYWNoZV90eXBlID09IEZDX0NBQ0hFKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJGQyIKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogIk5PIiwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W3dfbnRoXS52cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5ocG9zLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmhwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC51LmNoKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nICh3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgudS5jaCksCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBvbGRfY2FjaGVfdXNlZCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYWNoZV91c2VkKTsKKyAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoIXNhbWVfcCkKKyAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5j YCBjb250YWlucyB0aGUgZm9sbG93aW5nIHRlc3RzLAorICAgICAgICAgICAgICAgIGVhc3NlcnQg KG1hdHJpeCAmJiBtYXRyaXgtPnJvd3MpOworICAgICAgICAgICAgICAgIGVhc3NlcnQgKHJvdyA+ PSAwICYmIHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICAgICAgICAgICAgICAgIGJvb2wgYmFy Zl9jcmFzaF9vbmUgPSAody0+Y3VycmVudF9tYXRyaXggJiYgdy0+Y3VycmVudF9tYXRyaXgtPnJv d3MpID8gZmFsc2UgOiB0cnVlOworICAgICAgICAgICAgICAgIGlmIChiYXJmX2NyYXNoX29uZSkK KyAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIGJvb2wgYmFyZl9j cmFzaF90d28gPSAodm50aCA+PSAwICYmIHZudGggPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3Mp ID8gZmFsc2UgOiB0cnVlOworICAgICAgICAgICAgICAgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAg ICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9y b3cgKnZudGhfcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIHZudGgpOworICAg ICAgICAgICAgICAgIGludCB4XzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXzBdLng7CisgICAgICAgICAgICAgICAga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3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRfcDsKKyAgICAgICAgICAgICAgICBpZiAodnBvc18wID09 IHZudGgKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yXzAgPT0gTUNfR0xZUEgK KyAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wXzAKKyAgICAgICAgICAgICAgICAgICAg JiYgdm50aF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgICAgbWNfZXJhc2VfY3Vyc29yICh3LCB3LT5jdXJyZW50X21hdHJpeCwgdm50aF9yb3cs IG9sZF9tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeF8wLCB5 XzAsIGhwb3NfMCwgdnBvc18wLCBnbHlwaF9mbGF2b3JfMCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZV8wLCB3ZF8wKTsKKyAgICAgICAgICAgICAgICAg ICAgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5lbmFibGVk X3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgLS1vbGRfbWF0cml4LmN1cnNvcnNfdXNl ZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAgICAgLyogSWYgd2UgaW5hZHZlcnRlbnRs eSBlcmFzZWQgYW5vdGhlciBmYWtlIGN1cnNvciBhdCB0aGUgc2FtZQorICAgICAgICAgICAgICAg ICAgICBIUE9TIHRoYXQgaXMgc3RpbGwgZW5hYmxlZF9wIGluIHRoZSBgb2xkX21hdHJpeGAsIHRo ZW4gcmVkcmF3IGl0LiAqLworICAgICAgICAgICAgICAgICAgICBmb3IgKGVudW0gbWNfY2FjaGVf dHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgICAgICAgICAgICAgICAgICAgY2Fj aGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICAgICAgICAgICAgICAgICsrY2FjaGVfdHlw ZSkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBmb3Ig KGludCBudGhfMSA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX3RyYXZlcnNl X2NhY2hlX3AgKG9sZF9tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aF8xKTsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKytudGhfMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB4XzEgPSBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLng7CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgaW50IGZ4XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzFdLmZ4OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB5XzEgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLnk7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaW50IGZ5XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzFdLmZ5OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBocG9z XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmhwb3M7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHZwb3NfMSA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0udnBvczsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICBpbnQgd2RfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMV0ud2Q7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhfMSA9IG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uaDsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlXzEgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmN1cnNvcl90eXBl OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGhfMSA9IG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uY3Vyc29yX3dpZHRoOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnXzEgPSB7LnJl ZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZmcucmVk LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg LmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5m Zy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8xXS5mZy5ibHVlfTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgc3RydWN0IG1j X1JHQiBsc2xfYmdfMSA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8xXS5iZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAg ICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8xXS5iZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uYmcuYmx1ZX07CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8xXS5hY3RpdmVfcDsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3JfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGJvb2wgZW5hYmxlZF9wXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzFdLmVuYWJsZWRfcDsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBib29sIGdvX3BfMSA9IChocG9zXzAgPT0gaHBvc18xCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wXzEpOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGlmICghZ29fcF8xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Y29udGludWU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCByZW1vdmVfcF8xID0g ZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQg KHcsIHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3JvdywgeF8xLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmeF8xLCB5XzEsIGZ5XzEsIGhwb3NfMSwg dnBvc18xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB3ZF8xLCBoXzEsIGN1cnNvcl90eXBlXzEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aF8xLCBsc2xfZmdfMSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aXZlX3BfMSwgZ2x5 cGhfZmxhdm9yXzEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHJlbW92ZV9wXzEpOworICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAg ZWxzZSBpZiAodnBvc18wID09IHZudGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVu YWJsZWRfcF8wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB2bnRoX3Jvdy0+ZW5hYmxl ZF9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgYm9vbCBy ZW1vdmVfcF8wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5 YnJpZCAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhfcm93LCB4XzAsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ4XzAsIHlfMCwgZnlfMCwgaHBvc18wLCB2 cG9zXzAsIHdkXzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGhfMCwgY3Vyc29yX3R5cGVfMCwgY3Vyc29yX3dpZHRoXzAsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9iZ18wLCBhY3RpdmVfcF8wLCBnbHlwaF9mbGF2 b3JfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3Zl X3BfMCk7CisgICAgICAgICAgICAgICAgICAgICAgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8wXS5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICAg ICAgICAtLW9sZF9tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOworICAgICAgICAgICAg ICAgICAgICAgIC8qIElmIHdlIGluYWR2ZXJ0ZW50bHkgZXJhc2VkIGFub3RoZXIgZmFrZSBjdXJz b3IgYXQgdGhlIHNhbWUKKyAgICAgICAgICAgICAgICAgICAgICBIUE9TIHRoYXQgaXMgc3RpbGwg ZW5hYmxlZF9wIGluIHRoZSBgb2xkX21hdHJpeGAsIHRoZW4gcmVkcmF3IGl0LiAqLworICAgICAg ICAgICAgICAgICAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19D QUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICAgICAgICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpbnQgbnRoXzIgPSAw OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX3RyYXZlcnNlX2NhY2hlX3AgKG9s ZF9tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aF8yKTsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICArK250aF8yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGludCB4XzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLng7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgZnhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf Ml0uZng7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgeV8yID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS55OworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaW50IGZ5XzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzJdLmZ5OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhw b3NfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uaHBv czsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9zXzIgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLnZwb3M7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpbnQgd2RfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMl0ud2Q7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQg aF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5oOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3Jf dHlwZV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5j dXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBjdXJzb3Jfd2lk dGhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uY3Vy c29yX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBs c2xfZmdfMiA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8yXS5mZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMl0uZmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8yXS5mZy5ibHVlfTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIC8vICBzdHJ1Y3QgbWNfUkdCIGxzbF9iZ18yID0gey5yZWQgPSBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmJnLnJlZCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uYmcuZ3JlZW4sCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0u YmcuYmx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9wXzIg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmFjdGl2ZV9w OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxh dm9yXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmds eXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgZW5hYmxlZF9w XzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmVuYWJs ZWRfcDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgZ29fcF8yID0gKGhwb3Nf MCA9PSBocG9zXzIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIGZ4XzAgPD0gZnhfMgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgZnhfMCArIHdkXzAgPiBmeF8yICsgd2RfMgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wXzIpOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaWYgKCFnb19wXzIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCByZW1vdmVf cF8yID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNl X2h5YnJpZCAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhfcm93LCB4XzIsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnhfMiwgeV8yLCBmeV8y LCBocG9zXzIsIHZwb3NfMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB3ZF8yLCBoXzIsIGN1cnNvcl90eXBlXzIsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoXzIsIGxzbF9m Z18yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGFjdGl2ZV9wXzIsIGdseXBoX2ZsYXZvcl8yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9wXzIpOworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgfQorICBpZiAodXBkYXRp bmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChmKTsKK30KKwordm9pZAorbWNfdXBkYXRlX3dp bmRvd19kcnlydW4gKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCwgc3RydWN0IG1jX2Vz c2VudGlhbHMgZXNzZW50aWFscykKK3sKKyAgaWYgKCFCVUZGRVJQICh3LT5jb250ZW50cykpCisg ICAgcmV0dXJuOworCisgIGlmICh3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA9 PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hFXSA9PSAwCisg ICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA9P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pKTsKKyNlbmRpZgorCisgIC8qIENoZWNrIHBlbmRpbmcgaW5wdXQgdGhl IGZpcnN0IHRpbWUgc28gdGhhdCB3ZSBjYW4gcXVpY2tseSByZXR1cm4uICovCisgIGlmICghZm9y Y2VfcCkKKyAgICBkZXRlY3RfaW5wdXRfcGVuZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7CisK KyAgLyogSWYgZm9yY2VkIHRvIGNvbXBsZXRlIHRoZSB1cGRhdGUsIG9yIGlmIG5vIGlucHV0IGlz IHBlbmRpbmcsIGRvIHRoZSB1cGRhdGUuICovCisgIGlmIChmb3JjZV9wIHx8ICFpbnB1dF9wZW5k aW5nIHx8ICFOSUxQIChkb19tb3VzZV90cmFja2luZykpCisgICAgeworICAgICAgc3RydWN0IGds eXBoX3JvdyAqaGVhZGVyX2xpbmVfcm93OworICAgICAgYm9vbCBjaGFuZ2VkX3AgPSAwOworICAg ICAgYm9vbCBtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AgPSAwOworICAgICAgaW50IG5fdXBkYXRl ZCA9IDA7CisgICAgICAvLyAgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2UgKnJpZiA9IEZSQU1F X1JJRiAoWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKSk7CisgICAgICAvLyAgcmlmLT51cGRhdGVf d2luZG93X2JlZ2luX2hvb2sgKHcpOworICAgICAgaW50IHliID0gd2luZG93X3RleHRfYm90dG9t X3kgKHcpOworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAoZGVzaXJl ZF9tYXRyaXgsIDApOworICAgICAgc3RydWN0IGdseXBoX3JvdyAqZW5kID0gTUFUUklYX01PREVf TElORV9ST1cgKGRlc2lyZWRfbWF0cml4KTsKKworICAgICAgLyogVGFrZSBub3RlIG9mIHRoZSBo ZWFkZXIgbGluZSwgaWYgdGhlcmUgaXMgb25lLiAgV2Ugd2lsbAorICAgICAgICAgdXBkYXRlIGl0 IGJlbG93LCBhZnRlciB1cGRhdGluZyBhbGwgb2YgdGhlIHdpbmRvdydzIGxpbmVzLiAqLworICAg ICAgaWYgKHJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgIHsKKyAgICAgICAgICBoZWFkZXJfbGlu ZV9yb3cgPSByb3c7CisgICAgICAgICAgKytyb3c7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQor ICAgICAgICAgIGhlYWRlcl9saW5lX3JvdyA9IE5VTEw7CisKKyAgICAgIC8qIFVwZGF0ZSB0aGUg bW9kZSBsaW5lLCBpZiBuZWNlc3NhcnkuICovCisgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICptb2Rl X2xpbmVfcm93ID0gTUFUUklYX01PREVfTElORV9ST1cgKGRlc2lyZWRfbWF0cml4KTsKKyAgICAg IGlmIChtb2RlX2xpbmVfcm93LT5tb2RlX2xpbmVfcCAmJiBtb2RlX2xpbmVfcm93LT5lbmFibGVk X3ApCisgICAgICAgIHsKKyAgICAgICAgICBtb2RlX2xpbmVfcm93LT55ID0geWIgKyBXSU5ET1df U0NST0xMX0JBUl9BUkVBX0hFSUdIVCAodyk7CisgICAgICAgICAgdXBkYXRlX3dpbmRvd19saW5l ICh3LCBNQVRSSVhfUk9XX1ZQT1MgKG1vZGVfbGluZV9yb3csCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2lyZWRfbWF0cml4KSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOworICAgICAg ICB9CisKKyAgICAgIC8qIEZpbmQgZmlyc3QgZW5hYmxlZCByb3cuICBPcHRpbWl6YXRpb25zIGlu IHJlZGlzcGxheV9pbnRlcm5hbAorICAgICAgICAgbWF5IGxlYWQgdG8gYW4gdXBkYXRlIHdpdGgg b25seSBvbmUgcm93IGVuYWJsZWQuICBUaGVyZSBtYXkKKyAgICAgICAgIGJlIGFsc28gY29tcGxl dGVseSBlbXB0eSBtYXRyaWNlcy4gKi8KKyAgICAgIHdoaWxlIChyb3cgPCBlbmQgJiYgIXJvdy0+ ZW5hYmxlZF9wKQorICAgICAgICArK3JvdzsKKworICAgICAgLyogVHJ5IHJldXNpbmcgcGFydCBv ZiB0aGUgZGlzcGxheSBieSBjb3B5aW5nLiAqLworICAgICAgaWYgKHJvdyA8IGVuZCAmJiAhdy0+ ZGVzaXJlZF9tYXRyaXgtPm5vX3Njcm9sbGluZ19wKQorICAgICAgICB7CisgICAgICAgICAgaW50 IHJjID0gbWNfc2Nyb2xsaW5nX3dpbmRvdyAodywgaGVhZGVyX2xpbmVfcm93ICE9IE5VTEwpOwor ICAgICAgICAgIGlmIChyYyA8IDApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIEFs bCByb3dzIHdlcmUgZm91bmQgdG8gYmUgZXF1YWwuICovCisgICAgICAgICAgICAgIHBhdXNlZF9w ID0gMDsKKyAgICAgICAgICAgICAgZ290byBzZXRfY3Vyc29yOworICAgICAgICAgICAgfQorICAg ICAgICAgICAgZWxzZSBpZiAocmMgPiAwKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgLyogV2UndmUgc2Nyb2xsZWQgdGhlIGRpc3BsYXkuICovCisgICAgICAgICAgICAgICAgZm9y Y2VfcCA9IDE7CisgICAgICAgICAgICAgICAgY2hhbmdlZF9wID0gMTsKKyAgICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgICAvKiBQcm9jZXNzIHRoZSBjdXJzb3Igcm93IGF0IHRoZSBvdXRz ZXQgaWYgaXQgaXMgd2l0aGluIGBkZXNpcmVkX21hdHJpeGAuCisgICAgICBXaGVuIHByb2Nlc3Np bmcgYWxsIG90aGVyIHJvd3MsIHdlIHdpbGwgcXVlcnkgdGhlIGB3LT5jdXJyZW50X21hdHJpeGAg Zm9yIGRhdGEKKyAgICAgIHJlbGF0aW5nIHRvIHRoZSBjdXJzb3Igcm93LiAgYG1ha2VfY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ZV9zcXVlZXphYmxlcyAoKTsKKyAgICAgICAgICAgICAgY2hh bmdlZF9wIHw9IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3Zl cndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgZHJhd19wKTsKKyAgICAgICAgICAgICAg aWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAgICAgICAgICAgICAgZm9y IChpbnQgaSA9IHZwb3MgKyAxOyBpIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzIC0gMTsgKytp KQorICAgICAgICAgICAgICAgICAgU0VUX01BVFJJWF9ST1dfRU5BQkxFRF9QICh3LT5jdXJyZW50 X21hdHJpeCwgaSwgZmFsc2UpOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0K KyAgICAgICAgfQorICAgICAgY3Vyc29yX21hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICAg ICAgLyogVXBkYXRlIHRoZSByZXN0IG9mIHRoZSBsaW5lcy4gKi8KKyAgICAgIGZvciAoOyByb3cg PCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpOyArK3JvdykKKyAgICAgICAgLyog c2Nyb2xsaW5nX3dpbmRvdyByZXNldHMgdGhlIGVuYWJsZWRfcCBmbGFnIG9mIHRoZSByb3dzIGl0 IHJldXNlcyBmcm9tCisgICAgICAgIGN1cnJlbnRfbWF0cml4LiAqLworICAgICAgICBpZiAocm93 LT5lbmFibGVkX3ApCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhf Uk9XX1ZQT1MgKHJvdywgdy0+ZGVzaXJlZF9tYXRyaXgpOworICAgICAgICAgICAgLyogSWYgdGhl IGBjdXJzb3Jfcm93YCBpcyB3aXRoaW4gdGhlIGBkZXNpcmVkX21hdHJpeGAsIHRoZW4gaXQgd2Fz CisgICAgICAgICAgICBwcm9jZXNzZWQgaGVyZWluYWJvdmUgYW5kIHNob3VsZCBiZSBza2lwcGVk IGF0IHRoaXMgdGltZS4gKi8KKyAgICAgICAgICAgIGlmICh2cG9zID09IHctPmN1cnNvci52cG9z KQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICBpbnQgaTsKKyAgICAgICAgICAg IC8qIFdlJ2xsIGhhdmUgdG8gcGxheSBhIGxpdHRsZSBiaXQgd2l0aCB3aGVuIHRvCisgICAgICAg ICAgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZy4gIElmIGl0J3MgZG9uZSB0b28gb2Z0ZW4sCisg ICAgICAgICAgICAgICBzY3JvbGxpbmcgbGFyZ2Ugd2luZG93cyB3aXRoIHJlcGVhdGVkIHNjcm9s bC11cAorICAgICAgICAgICAgICAgY29tbWFuZHMgd2lsbCB0b28gcXVpY2tseSBwYXVzZSByZWRp c3BsYXkuICovCisgICAgICAgICAgICBpZiAoIWZvcmNlX3AgJiYgKytuX3VwZGF0ZWQgJSBwcmVl bXB0X2NvdW50ID09IDApCisgICAgICAgICAgICAgIGRldGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9y ZV9zcXVlZXphYmxlcyAoKTsKKyAgICAgICAgICAgIGNoYW5nZWRfcCB8PSBtY191cGRhdGVfd2lu ZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3Nl bnRpYWxzLCBkcmF3X3ApOworICAgICAgICAgICAgLyogTWFyayBhbGwgcm93cyBiZWxvdyB0aGUg bGFzdCB2aXNpYmxlIG9uZSBpbiB0aGUgY3VycmVudAorICAgICAgICAgICAgICAgbWF0cml4IGFz IGludmFsaWQuICBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNhdXNlIG9mCisgICAgICAgICAgICAgICB2 YXJpYWJsZSBsaW5lIGhlaWdodHMuICBDb25zaWRlciB0aGUgY2FzZSBvZiB0aHJlZQorICAgICAg ICAgICAgICAgc3VjY2Vzc2l2ZSByZWRpc3BsYXlzLCB3aGVyZSB0aGUgZmlyc3QgZGlzcGxheXMg NQorICAgICAgICAgICAgICAgbGluZXMsIHRoZSBzZWNvbmQgMyBsaW5lcywgYW5kIHRoZSB0aGly ZCA1IGxpbmVzIGFnYWluLgorICAgICAgICAgICAgICAgSWYgdGhlIHNlY29uZCByZWRpc3BsYXkg d291bGRuJ3QgbWFyayByb3dzIGluIHRoZQorICAgICAgICAgICAgICAgY3VycmVudCBtYXRyaXgg aW52YWxpZCwgdGhlIHRoaXJkIHJlZGlzcGxheSBtaWdodCBiZQorICAgICAgICAgICAgICAgdGVt cHRlZCB0byBvcHRpbWl6ZSByZWRpc3BsYXkgYmFzZWQgb24gbGluZXMgZGlzcGxheWVkCisgICAg ICAgICAgICAgICBpbiB0aGUgZmlyc3QgcmVkaXNwbGF5LiAqLworICAgICAgICAgICAgaWYgKE1B VFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAgICAgICAgICAgIGZvciAoaSA9IHZw b3MgKyAxOyBpIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzIC0gMTsgKytpKQorICAgICAgICAg ICAgICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAody0+Y3VycmVudF9tYXRyaXgsIGksIGZh bHNlKTsKKyAgICAgICAgICB9CisgICAgICAvKiBXYXMgZGlzcGxheSBwcmVlbXB0ZWQ/ICovCisg ICAgICBwYXVzZWRfcCA9IHJvdyA8IGVuZDsKKyAgICAgIHNldF9jdXJzb3I6CisgICAgICAvKiBJ ZiB3ZSBqdW1wZWQgaGVyZSBmcm9tIGBzZXRfY3Vyc29yYCwgdGhlbiBzZXQgdGhlIGBjdXJzb3Jf bWF0cml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9IE1BVFJJWF9ST1dfVlBPUyAo ZGVzaXJlZF9yb3csIHctPmRlc2lyZWRfbWF0cml4KTsKKyAgICAgICAgICBpZiAoZGVzaXJlZF9y b3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIHN0cnVjdCBn bHlwaF9yb3cgKmN1cnJlbnRfcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIHZw b3MpOworICAgICAgICAgIGVudW0gbWNfcm93X3Bvc2l0aW9uIHJvd19wb3NpdGlvbiA9IG1jX3Jv d19wb3NpdGlvbiAodywgY3VycmVudF9yb3csIGN1cnJlbnRfcm93LCB2cG9zKTsKKyAgICAgICAg ICBpZiAoY3VycmVudF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIG1jX2RyYXdfcm93ICh3 LCB3LT5jdXJyZW50X21hdHJpeCwgY3VycmVudF9yb3csIGN1cnJlbnRfcm93LT5nbHlwaHNbVEVY VF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3Jvdy0+eCwgY3VycmVu dF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICBj dXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGRyYXdfcCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBTRVRfQ1VSU09SX09ORSk7CisgICAgICAgIH0KKworICAgICAgbWNf cmVzdG9yZV9nbHlwaF9tYXRyaXggKHNhdmVkX2Rlc2lyZWQsIHctPmRlc2lyZWRfbWF0cml4KTsK KyAgICAgIG1jX3Jlc3RvcmVfZ2x5cGhfbWF0cml4IChzYXZlZF9jdXJyZW50LCB3LT5jdXJyZW50 X21hdHJpeCk7CisKKyAgICAgIG1jX3VwZGF0ZV93aW5kb3dfZXJhc2UgKHcsIG9sZF9tYXRyaXgp OworCisgICAgICBtY194ZnJlZV9jYWNoZV9tYXRyaXggKHcsICZvbGRfbWF0cml4KTsKKworICAg IH0KKyAgLy8gY2xvY2tfdCBjbG9ja19lbmQgPSBjbG9jaygpOworICAvLyBkb3VibGUgY3B1X3Rp bWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0gY2xvY2tfc3RhcnQpKSAvIENMT0NLU19Q RVJfU0VDOworICAvLyBmcHJpbnRmIChzdGRlcnIsICJtY19zY3JvbGxpbmdfd2luZG93ICglcyk6 ICBUSU1FICglZilcbiIsIG1jX3dpbmRvdyAodyksIGNwdV90aW1lX3VzZWQpOworfQorCisvKiBl bmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyog U3RydWN0dXJlIHRvIHBhc3MgZGltZW5zaW9ucyBhcm91bmQuICBVc2VkIGZvciBjaGFyYWN0ZXIg Ym91bmRpbmcKICAgIGJveGVzLCBnbHlwaCBtYXRyaXggZGltZW5zaW9ucyBhbmQgYWxpa2UuICAq LwogCkBAIC0yMjQxLDYgKzQwMTcsMTYgQEAgZnJlZV93aW5kb3dfbWF0cmljZXMgKHN0cnVjdCB3 aW5kb3cgKncpCiAJICBmcmVlX2dseXBoX21hdHJpeCAody0+Y3VycmVudF9tYXRyaXgpOwogCSAg ZnJlZV9nbHlwaF9tYXRyaXggKHctPmRlc2lyZWRfbWF0cml4KTsKIAkgIHctPmN1cnJlbnRfbWF0 cml4ID0gdy0+ZGVzaXJlZF9tYXRyaXggPSBOVUxMOworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIG1jX3hmcmVlX2NhY2hlX21hdHJpeCAo dywgJnctPm1jX21hdHJpeCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAl9CiAK ICAgICAgIC8qIE5leHQgd2luZG93IG9uIHNhbWUgbGV2ZWwuICAqLwpAQCAtMzM4Nyw2ICs1MTcz LDI2IEBAIGNoZWNrX2N1cnJlbnRfbWF0cml4X2ZsYWdzIChzdHJ1Y3Qgd2luZG93ICp3KQogc3Rh dGljIGJvb2wKIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkK IHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworICBpZiAobWNfc3RkZXJyX3ApCisgICAgZnByaW50ZiAoc3RkZXJyLCAidXBkYXRlX3dpbmRv dyAoJXMpXG4iLCBtY193aW5kb3cgKHcpKTsKKworICBzdHJ1Y3QgbWNfZXNzZW50aWFscyBlc3Nl bnRpYWxzOworICBtY19zZXRfZXNzZW50aWFscyAodywgJmVzc2VudGlhbHMpOworCisgIG1jX3Vw ZGF0ZV93aW5kb3dfZHJ5cnVuICh3LCBmb3JjZV9wLCBlc3NlbnRpYWxzKTsKKworICBzdHJ1Y3Qg Z2x5cGhfbWF0cml4ICpjdXJzb3JfbWF0cml4ID0gTlVMTDsKKworICBib29sIGRyYXdfcCA9IHRy dWU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgc3RydWN0IGdseXBoX21hdHJp eCAqZGVzaXJlZF9tYXRyaXggPSB3LT5kZXNpcmVkX21hdHJpeDsKICAgYm9vbCBwYXVzZWRfcDsK ICAgaW50IHByZWVtcHRfY291bnQgPSBjbGlwX3RvX2JvdW5kcyAoM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m93ID0gcm93OworICAgICAgIG1jX3JvdyA8IGVuZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVu ZGluZyk7CisgICAgICAgKyttY19yb3cpCisgICAgeworICAgICAgaW50IHZwb3MgPSBNQVRSSVhf Uk9XX1ZQT1MgKG1jX3JvdywgZGVzaXJlZF9tYXRyaXgpOworICAgICAgaWYgKG1jX3Jvdy0+ZW5h YmxlZF9wCisgICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgewor ICAgICAgICAgIGN1cnNvcl9tYXRyaXggPSBkZXNpcmVkX21hdHJpeDsKKyAgICAgICAgICBpZiAo IWZvcmNlX3AgJiYgKytuX3VwZGF0ZWQgJSBwcmVlbXB0X2NvdW50ID09IDApCisgICAgICAgICAg ICBkZXRlY3RfaW5wdXRfcGVuZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7CisgICAgICAgICAg Y2hhbmdlZF9wIHw9IChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICAg ICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAhIE5J TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgPyBtY191cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9m YWNlX292ZXJ3cml0dGVuX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCBkcmF3X3ApCisgICAgICAgICAg ICAgICAgICAgICAgIDogdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9v dmVyd3JpdHRlbl9wKTsKKyAgICAgICAgICBpZiAoTUFUUklYX1JPV19CT1RUT01fWSAocm93KSA+ PSB5YikKKyAgICAgICAgICAgIGZvciAoaW50IGkgPSB2cG9zICsgMTsgaSA8IHctPmN1cnJlbnRf bWF0cml4LT5ucm93cyAtIDE7ICsraSkKKyAgICAgICAgICAgICAgU0VUX01BVFJJWF9ST1dfRU5B QkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwgaSwgZmFsc2UpOworICAgICAgICAgIGJyZWFrOwor ICAgICAgICB9CisgICAgfQorCisgIGN1cnNvcl9tYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgLyogVXBkYXRlIHRoZSByZXN0 IG9mIHRoZSBsaW5lcy4gICovCiAgICAgICBmb3IgKDsgcm93IDwgZW5kICYmIChmb3JjZV9wIHx8 ICFpbnB1dF9wZW5kaW5nKTsgKytyb3cpCiAJLyogc2Nyb2xsaW5nX3dpbmRvdyByZXNldHMgdGhl IGVuYWJsZWRfcCBmbGFnIG9mIHRoZSByb3dzIGl0CkBAIC0zNDcxLDYgKzUzMTgsMTkgQEAgdXBk YXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCWlmIChyb3ctPmVu YWJsZWRfcCkKIAkgIHsKIAkgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgZGVz aXJlZF9tYXRyaXgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisgICAgICAgICAgLyogSWYgdGhlIGBjdXJzb3Jfcm93YCBpcyB3aXRoaW4g dGhlIGBkZXNpcmVkX21hdHJpeGAsIHRoZW4gaXQgd2FzCisgICAgICAgICAgcHJvY2Vzc2VkIGhl cmVpbmFib3ZlIGFuZCBzaG91bGQgYmUgc2tpcHBlZCBhdCB0aGlzIHRpbWUuICovCisgICAgICAg ICAgaWYgKHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgY29udGludWU7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgaW50IGk7CiAKIAkgICAgLyogV2UnbGwg aGF2ZSB0byBwbGF5IGEgbGl0dGxlIGJpdCB3aXRoIHdoZW4gdG8KQEAgLTM0NzksOCArNTMzOSwy MSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiAJICAg ICAgIGNvbW1hbmRzIHdpbGwgdG9vIHF1aWNrbHkgcGF1c2UgcmVkaXNwbGF5LiAgKi8KIAkgICAg aWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVkICUgcHJlZW1wdF9jb3VudCA9PSAwKQogCSAgICAg IGRldGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9yZV9zcXVlZXphYmxlcyAoKTsKLQkgICAgY2hhbmdl ZF9wIHw9IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywKLQkJCQkJICAgICAmbW91c2VfZmFj ZV9vdmVyd3JpdHRlbl9wKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFLUNVUlNPUlMgKi8KKworICAgICAgICAgIGNoYW5nZWRfcCB8PSAoQlVGRkVSUCAody0+Y29u dGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgfHwgISBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGZjX3Zpc2libGUpKSkpCisgICAgICAgICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dp bmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNz ZW50aWFscywgZHJhd19wKQorICAgICAgICAgICAgICAgICAgICAgICA6IHVwZGF0ZV93aW5kb3df bGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCiAKIAkgICAgLyogTWFyayBhbGwgcm93cyBiZWxvdyB0aGUgbGFzdCB2 aXNpYmxlIG9uZSBpbiB0aGUgY3VycmVudAogCSAgICAgICBtYXRyaXggYXMgaW52YWxpZC4gIFRo aXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2Ugb2YKQEAgLTM1MDEsNiArNTM3NCw0MSBAQCB1cGRhdGVf d2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiAKICAgICBzZXRfY3Vyc29y OgogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1V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9tYXRyaXgtPm5yb3dzOyArK2kpCisgICAgeworICAgICAg c3RydWN0IGdseXBoX3JvdyAqcm93ID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyBpOworICAg ICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgYnJlYWs7CisgICAgICAgIGVsc2UgaWYg KHJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgICAgY29udGludWU7CisgICAgICBpZiAocm93LT5v dmVybGFwcGVkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBmb3IgKGVudW0gZ2x5cGhfcm93X2Fy ZWEgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgaSwgMCwgcm93 LT55LCBhcmVhID09IFRFWFRfQVJFQSA/IHJvdy0+eCA6IDApOworICAgICAgICAgICAgICBpZiAo IW1jX3JlZHJhd19yb3cgKHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIGFyZWEsIHJvdy0+eCwg MCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnVzZWRbYXJlYV0sIHRy dWUsIERSQVdfTk9STUFMX1RFWFQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg VVBEQVRFX1dJTkRPV19fUkVEUkFXX09WRVJMQVBQRURfUk9XUykKKyAgICAgICAgICAgICAgICAg ICYmIHJvdy0+dXNlZFthcmVhXSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICBGUkFNRV9SSUYgKGYpLT53cml0ZV9nbHlwaHMgKHcsIHJvdywgcm93LT5nbHlwaHNbYXJlYV0s IGFyZWEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJv dy0+dXNlZFthcmVhXSk7CisgICAgICAgICAgICAgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVhcl9l bmRfb2ZfbGluZSAodywgcm93LCBhcmVhLCAtMSk7CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgfQorICAgICAgICAgIHJvdy0+b3ZlcmxhcHBlZF9wID0gMDsKKyAgICAgICAgfQorICAg ICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisgICAgICAgIGJyZWFrOwor ICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIHJlZHJhd19vdmVy bGFwcGluZ19yb3dzICh3LCB5Yik7CiAJICAgIH0KICNlbmRpZgpAQCAtMzUzNiw4ICs1NDg2LDIw IEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKICNlbmRp ZgogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRz KQorICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpKQorICAgIG1jX3VwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgMCk7CisgICAgZWxzZQogICAg ICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCAwKTsKIAorLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogICAgICAgLyogRW5kIHRoZSB1cGRhdGUgb2Ygd2luZG93IFcuICBEb24ndCBzZXQg dGhlIGN1cnNvciBp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AgICAgICJ4Li4ueHguLiIKKyAgICAgICJ4Li54eC4uLiIKKyAgICAgICJ4 Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIpCisqLworc3RhdGlj IHVuc2lnbmVkIHNob3J0IG1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvd19iaXRzW10gPXsKKyAg MHg4MCwgMHg4MCwgMHg4MCwgMHg5OCwgMHg4YywgMHg4NiwgMHhiZiwKKyAgMHhiZiwgMHg4Niwg MHg4YywgMHg5OCwgMHg4MCwgMHg4MCwgMHg4MH07CisKKy8qIDI1CisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAg ICAgIi4uLi4uLnh4IgorICAgICAgIi54eC4uLnh4IgorICAgICAgIi4ueHguLnh4IgorICAgICAg Ii4uLnh4Lnh4IgorICAgICAgInh4eHh4eHh4IgorICAgICAgInh4eHh4eHh4IgorICAgICAgIi4u Lnh4Lnh4IgorICAgICAgIi4ueHguLnh4IgorICAgICAgIi54eC4uLnh4IgorICAgICAgIi4uLi4u Lnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHNbXSA9 eworICAweDMsIDB4MywgMHgzLCAweDYzLCAweDMzLCAweDFiLCAweGZmLCAweGZmLCAweDFiLCAw eDMzLCAweDYzLCAweDMsIDB4MywgMHgzfTsKKworLyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVy LWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eC4uLi4uLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4u Li54eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54 eHgiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZm LCAweDgxLCAweDgxLCAweDk5LCAweDhkLCAweDg3LCAweGJmLAorICAweGJmLCAweDg3LCAweDhk LCAweDk5LCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjcKKyAgICAoKy1mcmluZ2UtaGVscGVy LWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAi eC4uLi4ueHgiCisgICAgICAieC54eC4ueHgiCisgICAgICAieC4ueHgueHgiCisgICAgICAieC4u Lnh4eHgiCisgICAgICAieHh4eHh4eHgiCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLnh4 eHgiCisgICAgICAieC4ueHgueHgiCisgICAgICAieC54eC4ueHgiCisgICAgICAieC4uLi4ueHgi CisgICAgICAieC4uLi4ueHgiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25l ZCBzaG9ydCBtY19yZXZlcnNlZF9ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9 eworICAweGZmLCAweDgxLCAweDgxLCAweGIxLCAweDk5LCAweDhkLCAweGZmLAorICAweGZmLCAw eDhkLCAweDk5LCAweGIxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjgKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAg ICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRp YyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHNbXSA9eworICAweGZmLCAw eDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLAorICAweDgxLCAweDgxLCAweDgxLCAw eDgxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4u Li4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4i CisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY192ZXJ0aWNhbF9iYXJfYml0c1tdID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAs IDB4ODAsIDB4ODAsIDB4ODAsCisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAs IDB4ODB9OworCisvKiAzMAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAg ICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIu Li4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4u Li54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54 eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIK KyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3JldmVyc2Vk X3ZlcnRpY2FsX2Jhcl9iaXRzW10gPXsKKyAgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4Mywg MHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDN9OworCisvKiAzMQorICAgICgr LWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICJ4eC4u Li4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAgICAgICIueHguLi4uLiIKKyAgICAgICIuLnh4Li4u LiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi54eC4uLiIK KyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4uLnh4LiIKKyAg ICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLwor c3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhj MCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwgMHgxOCwgMHgxOCwgMHhjLCAweGMsIDB4NiwgMHg2 LCAweDMsIDB4M307CisKKy8qIDMyCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAor ICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAg ICAgInh4eC4uLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAg InguLnh4Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54eC4uIgorICAgICAgIngu Li54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4u Lnh4IgorICAgICAgInguLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVy dGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHhlMCwg MHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwgMHg4YywgMHg4YywgMHg4NiwgMHg4NiwgMHg4Mywg MHg4M307CisKKy8qIDMzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAg Ii54eHh4eHguIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4 eHgueC4uIgorICAgICAgIi54eHgueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngu eC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4u IgorICAgICAgIi4uLngueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcGlsY3Jv d19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwgMHhmNCwgMHhmNCwgMHg3NCwgMHgxNCwgMHgxNCwg MHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisKKy8qIDM0CisgICAgKCstZnJpbmdlLWhlbHBlci1o ZXhhZGVjaW1hbAorICAgICAgIi4ueHh4eC4uIgorICAgICAgIi54eHh4eHguIgorICAgICAgIngu Lnh4Li54IgorICAgICAgInguLnh4Li54IgorICAgICAgInh4eHh4eHh4IgorICAgICAgInh4Li4u Lnh4IgorICAgICAgInh4eC4ueHh4IgorICAgICAgIi54eHh4eHguIgorICAgICAgIi4ueHh4eC4u IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc21pbGV5X2ZhY2VfYml0c1tdID17Cisg IDB4M2MsIDB4N2UsIDB4OTksIDB4OTksIDB4ZmYsIDB4YzMsIDB4ZTcsIDB4N2UsIDB4M2N9Owor CisvKiAzNQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLnguLi4u LiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi4uLnguLiIK KyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLnguLi4uLiIpCisq Lworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9yaWdodF9iaXRzW10gPXsK KyAgMHgyMCwgMHgxMCwgMHg4LCAweDQsIDB4OCwgMHgxMCwgMHgyMH07CisKKy8qIDM2CisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4ueC4uIgorICAgICAgIi4u Li54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4uLi4uIgorICAgICAgIi4uLngu Li4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLi4ueC4uIikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0c1tdID17CisgIDB4NCwgMHg4LCAw eDEwLCAweDIwLCAweDEwLCAweDgsIDB4NH07CisKKy8qIDM3CisgICAgKCstZnJpbmdlLWhlbHBl ci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54eC54eC4uIgorICAgICAg Ii4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgueHguIgorICAgICAgIi54 eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNf ZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGQ4LCAweDZjLCAweDM2LCAweDFiLCAw eDM2LCAweDZjLCAweGQ4fTsKKworLyogMzgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNp bWFsCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisgICAgICAiLnh4Lnh4Li4i CisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAiLi54eC54eC4iCisg ICAgICAiLi4ueHgueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5n bGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxYiwgMHgzNiwgMHg2YywgMHhkOCwgMHg2YywgMHgzNiwg MHgxYn07CisKKy8qIDM5CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAg IngueC54Li4uIgorICAgICAgIi54LngueC4uIgorICAgICAgIi4ueC54LnguIgorICAgICAgIi4u LngueC54IgorICAgICAgIi4ueC54LnguIgorICAgICAgIi54LngueC4uIgorICAgICAgIngueC54 Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3JpZ2h0X2Jp dHNbXSA9eworICAweGE4LCAweDU0LCAweDJhLCAweDE1LCAweDJhLCAweDU0LCAweGE4fTsKKwor LyogNDAKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueC54Lngi CisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisgICAgICAieC54LnguLi4iCisg ICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4iCisgICAgICAiLi4ueC54LngiKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAg MHgxNSwgMHgyYSwgMHg1NCwgMHhhOCwgMHg1NCwgMHgyYSwgMHgxNX07CisKKy8qIDQxCisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLngu Li4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLngu IgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgor ICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2Fu Z2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAw eDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDIKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4i CisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfZG93 bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwg MHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQzCisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAg Ii54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54 Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4u Li4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91 YmxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAw eDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDQK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAi LnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLngu Li54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNp Z25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwg MHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgw MCwgMHgwMH07CisKKy8qIDQ1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAg Ii54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54 Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4u eC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5z aWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDEwLCAw eDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAw fTsKKworLyogNDYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4u Li4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54Lngu Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4i CisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHg4MiwgMHg0 NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMH07 CisKKy8qIDQ3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLngu Li4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLngu IgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgor ICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAg ICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1cGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAw eDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDky LCAweDI4LCAweDQ0LCAweDgyfTsKKworLyogNDgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54Lngu Li4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4i CisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAg ICAiLi4ueC4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVf ZG93bl9iaXRzW10gPXsKKyAgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5 MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMH07CisKIC8qIE5PVEU6ICBUaGUg b3JkZXIgb2YgdGhlc2UgYml0bWFwcyBtdXN0IG1hdGNoIHRoZSBzZXF1ZW5jZQotICAgdXNlZCBp biBmcmluZ2UuZWwgdG8gZGVmaW5lIHRoZSBjb3JyZXNwb25kaW5nIHN5bWJvbHMuICAqLworICAg dXNlZCBpbiBmcmluZ2UuZWwgdG8gZGVmaW5lIHRoZSBjb3JyZXNwb25kaW5nIHN5bWJvbHMu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W50LCB1c2Ug bm9uLXBhcnRpYWwgYml0bWFwLiAqLworaW50CittY19nZXRfZnJpbmdlX2JpdG1hcCAoc3RydWN0 IHdpbmRvdyAqdywgTGlzcF9PYmplY3QgYml0bWFwLCBpbnQgcmlnaHRfcCwgaW50IHBhcnRpYWxf cCkKK3sKKyAgTGlzcF9PYmplY3QgY21hcCwgYm0xID0gUW5pbCwgYm0yID0gUW5pbCwgYm07Cisg IEVNQUNTX0lOVCBsbjEgPSAwLCBsbjIgPSAwOworICBpbnQgaXgxID0gcmlnaHRfcDsKKyAgaW50 IGl4MiA9IGl4MSArIChwYXJ0aWFsX3AgPyAyIDogMCk7CisgIGlmICgoY21hcCA9IEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpLCAhTklMUCAoY21h cCkpCisgICAgeworICAgICAgYm0xID0gbWNfYXNzcSAoYml0bWFwLCBjbWFwKTsKKyAgICAgIGlm IChDT05TUCAoYm0xKSkKKyAgeworICAgIGlmICgoYm0xID0gWENEUiAoYm0xKSksIE5JTFAgKGJt MSkpCisgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICBpZiAoQ09OU1AgKGJt MSkpCisgICAgICB7CisgICAgICAgIGxuMSA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMSkpOworICAg ICAgICBpZiAocGFydGlhbF9wKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmIChsbjEgPiBp eDIpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgyLCBi bTEpOworICAgICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAg ICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4MSkKKyAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOworICAg ICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgZ290 byBmb3VuZDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICB9CisgICAg ZWxzZSBpZiAoKGJtID0gYm0xLCAhRVEgKGJtLCBRdCkpKQorICAgICAgZ290byBmb3VuZDsKKyAg fQorICAgIH0KKyAgaWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdl X2luZGljYXRvcl9hbGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0 cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IG1jX2Fzc3Eg KGJpdG1hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkp OworICAgICAgaWYgKENPTlNQIChibTIpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibTIg PSBYQ0RSIChibTIpKSwgIU5JTFAgKGJtMikpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IGlmIChDT05TUCAoYm0yKSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBs bjIgPSBYRklYTlVNIChGbGVuZ3RoIChibTIpKTsKKyAgICAgICAgICAgICAgICAgIGlmIChwYXJ0 aWFsX3ApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBpZiAo bG4yID4gaXgyKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg ICAgICAgICBibSA9IG1jX250aCAoaXgyLCBibTIpOworICAgICAgICAgICAgICAgICAgICAgICAg ICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91 bmQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChs bjEgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgIGlm ICghRVEgKGJtLCBRdCkpCisgICAgICAgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAobG4yID4g aXgxKQorICAgIHsKKyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7CisgICAgICBpZiAoIUVR IChibSwgUXQpKQorICAgICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJuIE1DX05PX0ZSSU5H RV9CSVRNQVA7CisgICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJtMiwgTklMUCAoYm0pKSkKKyAg ICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICBmb3VuZDoKKyAgcmV0dXJuIGxvb2t1 cF9mcmluZ2VfYml0bWFwIChibSk7Cit9CisKK3N0YXRpYyBpbnQKK21jX2dldF9sb2dpY2FsX2N1 cnNvcl9iaXRtYXAgKHN0cnVjdCB3aW5kb3cgKncsIExpc3BfT2JqZWN0IGN1cnNvcikKK3sKKyAg TGlzcF9PYmplY3QgY21hcCwgYm0gPSBRbmlsOworICBpZiAoKGNtYXAgPSBCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGZyaW5nZV9jdXJzb3JfYWxpc3QpKSwgIU5JTFAgKGNtYXApKQorICAg IHsKKyAgICAgIGJtID0gbWNfYXNzcSAoY3Vyc29yLCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAo Ym0pKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibSA9IFhDRFIgKGJtKSksIE5JTFAgKGJt KSkKKyAgICAgICAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICA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mlnaHQgcGFydGlhbC1sZWZ0IHBhcnRpYWwtcmlnaHQKKyAgSWYgYW55 IHZhbHVlIGluIGxvY2FsIGJpbmRpbmcgaXMgbm90IHByZXNlbnQgb3IgdCwgdXNlIGdsb2JhbCB2 YWx1ZS4KKyAgICAgSWYgcGFydGlhbCwgbG9va3VwIHBhcnRpYWwgYml0bWFwIGluIGRlZmF1bHQg dmFsdWUgaWYgbm90IGZvdW5kIGhlcmUuCisgICAgIElmIG5vdCBwYXJ0aWFsLCBvciBubyBwYXJ0 aWFsIHNwZWMgaXMgcHJlc2VudCwgdXNlIG5vbi1wYXJ0aWFsIGJpdG1hcC4gKi8KKyAgaWYgKChj bWFwID0gQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0 KSksICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAgICBibTEgPSBtY19hc3NxIChiaXRtYXAsIGNt YXApOworICAgICAgaWYgKENPTlNQIChibTEpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChi bTEgPSBYQ0RSIChibTEpKSwgTklMUCAoYm0xKSkKKyAgICAgICAgICAgIHJldHVybiBNQ19OT19G UklOR0VfQklUTUFQOworICAgICAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgbG4xID0gWEZJWE5VTSAoRmxlbmd0aCAoYm0xKSk7CisgICAgICAgICAg ICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg aWYgKGxuMSA+IGl4MikKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg ICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMSk7CisgICAgICAgICAgICAgICAgICAgICAgaWYgKCFF USAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAobG4xID4gaXgxKQor ICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNf bnRoIChpeDEsIGJtMSk7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQp KQorICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UgaWYgKChibSA9IGJtMSwgIUVRIChibSwgUXQpKSkKKyAgICAgICAgICAgICAgZ290byBm b3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9k ZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAo JmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAg IGJtMiA9IG1jX2Fzc3EgKGJpdG1hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2lu ZGljYXRvcl9hbGlzdCkpOworICAgICAgaWYgKENPTlNQIChibTIpKQorICAgICAgICB7CisgICAg ICAgICAgaWYgKChibTIgPSBYQ0RSIChibTIpKSwgIU5JTFAgKGJtMikpCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGlmIChDT05TUCAoYm0yKSkKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICBsbjIgPSBYRklYTlVNIChGbGVuZ3RoIChibTIpKTsKKyAgICAgICAgICAg ICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgICAgICBpZiAobG4yID4gaXgyKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgyLCBibTIpOworICAgICAgICAg ICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0K KyAgICB9CisgIGlmIChsbjEgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwg Ym0xKTsKKyAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgIGdvdG8gZm91bmQ7CisgICAg fQorICBpZiAobG4yID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7 CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0 dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJtMiwg TklMUCAoYm0pKSkKKyAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICBmb3VuZDoK KyAgcmV0dXJuIGxvb2t1cF9mcmluZ2VfYml0bWFwIChibSk7Cit9CisKKy8qIFJlY2FsY3VsYXRl IHRoZSBiaXRtYXBzIHRvIHNob3cgaW4gdGhlIGZyaW5nZXMgb2Ygd2luZG93IFcuCisgICBPbmx5 IG1hcmsgcm93cyB3aXRoIG1vZGlmaWVkIGJpdG1hcHMgZm9yIHVwZGF0ZSBpbiByZWRyYXdfZnJp bmdlX2JpdG1hcHNfcC4KKyAgIElmIEtFRVBfQ1VSUkVOVF9QIGlzIDAsIHVwZGF0ZSBjdXJyZW50 X21hdHJpeCB0b28uICovCitib29sC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AgTUNfSUZf TElOVCAoPSAwKTsKKyAgaWYgKHctPnBzZXVkb193aW5kb3dfcCkKKyAgICByZXR1cm4gMDsKKyAg aWYgKCFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgKGluZCA9IEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgaW5kaWNhdGVfYnVmZmVyX2JvdW5kYXJpZXMpLCAhTklMUCAoaW5kKSkpCisg ICAgeworICAgICAgaWYgKEVRIChpbmQsIFFsZWZ0KSB8fCBFUSAoaW5kLCBRcmlnaHQpKQorICAg ICAgICBib3VuZGFyeV90b3AgPSBib3VuZGFyeV9ib3QgPSBhcnJvd190b3AgPSBhcnJvd19ib3Qg PSBpbmQ7CisgICAgICAgIGVsc2UgaWYgKENPTlNQIChpbmQpCisgICAgICAgICAgICAgICAgICYm IENPTlNQIChYQ0FSIChpbmQpKSkKKyAgICAgICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IHBv czsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAoUXQsIGluZCksICFOSUxQIChwb3MpKQor ICAgICAgICAgICAgYm91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90ID0gYXJyb3dfdG9wID0gYXJy b3dfYm90ID0gWENEUiAocG9zKTsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAoUXRvcCwg aW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBib3VuZGFyeV90b3AgPSBYQ0RSIChwb3Mp OworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRYm90dG9tLCBpbmQpLCAhTklMUCAocG9z KSkKKyAgICAgICAgICAgIGJvdW5kYXJ5X2JvdCA9IFhDRFIgKHBvcyk7CisgICAgICAgICAgaWYg KHBvcyA9IG1jX2Fzc3EgKFF1cCwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBhcnJv d190b3AgPSBYQ0RSIChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRZG93biwg aW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBhcnJvd19ib3QgPSBYQ0RSIChwb3MpOwor ICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICAvKiBBbnl0aGluZyBlbHNlIG1lYW5z IGJvdW5kYXJ5IG9uIGxlZnQgYW5kIG5vIGFycm93cy4gKi8KKyAgICAgICAgICBib3VuZGFyeV90 b3AgPSBib3VuZGFyeV9ib3QgPSBRbGVmdDsKKyAgICB9CisgIHRvcF9pbmRfcm4gPSBib3RfaW5k X3JuID0gLTE7CisgIGlmICghTklMUCAoaW5kKSkKKyAgICB7CisgICAgICBmb3IgKHkgPSB3LT52 c2Nyb2xsLCBybiA9IDA7CisgICAgICAgICAgIHkgPCB5YiAmJiBybiA8IG5yb3dzOworICAgICAg ICAgICB5ICs9IHJvdy0+aGVpZ2h0LCArK3JuKQorICAgICAgICB7CisgICAgICAgICAgcm93ID0g dy0+ZGVzaXJlZF9tYXRyaXgtPnJvd3MgKyBybjsKKyAgICAgICAgICBpZiAoIXJvdy0+ZW5hYmxl ZF9wKQorICAgICAgICAgICAgcm93ID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyBybjsKKyAg ICAgICAgICByb3ctPmluZGljYXRlX2JvYl9wID0gcm93LT5pbmRpY2F0ZV90b3BfbGluZV9wID0g MDsKKyAgICAgICAgICByb3ctPmluZGljYXRlX2VvYl9wID0gcm93LT5pbmRpY2F0ZV9ib3R0b21f bGluZV9wID0gMDsKKyAgICAgICAgICBpZiAoIXJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIGlmICh0b3BfaW5kX3JuIDwgMCAmJiByb3ctPnZpc2libGVfaGVp Z2h0ID4gMCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAoTUFUUklY X1JPV19TVEFSVF9DSEFSUE9TIChyb3cpIDw9IEJVRl9CRUdWIChYQlVGRkVSICh3LT5jb250ZW50 cykpCisgICAgICAgICAgICAgICAgICAgICAgJiYgIU1BVFJJWF9ST1dfUEFSVElBTExZX1ZJU0lC TEVfQVRfVE9QX1AgKHcsIHJvdykpCisgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5kaWNhdGVf Ym9iX3AgPSAhTklMUCAoYm91bmRhcnlfdG9wKTsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCA9ICFOSUxQIChh cnJvd190b3ApOworICAgICAgICAgICAgICAgICAgdG9wX2luZF9ybiA9IHJuOworICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfcm4gPCAwKQorICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmIChNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cp ID49IEJVRl9aViAoWEJVRkZFUiAody0+Y29udGVudHMpKQorICAgICAgICAgICAgICAgICAgICAg ICYmICFNQVRSSVhfUk9XX1BBUlRJQUxMWV9WSVNJQkxFX0FUX0JPVFRPTV9QICh3LCByb3cpKQor ICAgICAgICAgICAgICAgICAgICByb3ctPmluZGljYXRlX2VvYl9wID0gIU5JTFAgKGJvdW5kYXJ5 X2JvdCksIGJvdF9pbmRfcm4gPSBybjsKKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoeSAr IHJvdy0+aGVpZ2h0ID49IHliKQorICAgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5kaWNhdGVf Ym90dG9tX2xpbmVfcCA9ICFOSUxQIChhcnJvd19ib3QpLCBib3RfaW5kX3JuID0gcm47CisgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBlbXB0eV9w b3MgPSBCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGluZGljYXRlX2VtcHR5X2xpbmVzKTsK KyAgaWYgKCFOSU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pbiBvbmUgcm93LiAqLworICB0b3BfaW5kX21pbl95ID0gYm90X2lu ZF9tYXhfeSA9IC0xOworICBpZiAodG9wX2luZF9ybiA+PSAwKQorICAgIHsKKyAgICAgIGludCBi biA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICByb3cgPSB3LT5kZXNpcmVkX21hdHJpeC0+ cm93cyArIHRvcF9pbmRfcm47CisgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICBy b3cgPSB3LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHRvcF9pbmRfcm47CisgICAgICB0b3Bfcm93 X2VuZHNfYXRfenZfcCA9IHJvdy0+ZW5kc19hdF96dl9wOworICAgICAgaWYgKHJvdy0+aW5kaWNh dGVfYm9iX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAoRVEgKGJvdW5kYXJ5X3RvcCwgUWxl ZnQpKQorICAgICAgICAgICAgYm4gPSAoKHJvdy0+aW5kaWNhdGVfZW9iX3AgJiYgRVEgKGJvdW5k YXJ5X2JvdCwgUWxlZnQpKQorICAgICAgICAgICAgICAgICAgPyBNQ19MRUZUX0ZSSU5HRSAoMSwg UXRvcF9ib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKQorICAgICAgICAgICAgICAgICAgOiBNQ19M RUZUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICBibiA9ICgocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBRcmlnaHQp KQorICAgICAgICAgICAgICAgICAgICA/IE1DX1JJR0hUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20s IHJvdy0+ZW5kc19hdF96dl9wKQorICAgICAgICAgICAgICAgICAgICA6IE1DX1JJR0hUX0ZSSU5H RSAoMiwgUXRvcCwgMCkpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNh dGVfdG9wX2xpbmVfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoRVEgKGFycm93X3Rv cCwgUWxlZnQpKQorICAgICAgICAgICAgICBibiA9IE1DX0xFRlRfRlJJTkdFICg2LCBRdXAsIDAp OworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklO R0UgKDYsIFF1cCwgMCk7CisgICAgICAgICAgfQorICAgICAgaWYgKGJuICE9IE1DX05PX0ZSSU5H RV9CSVRNQVApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCAqZmIg PSBnZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChibik7CisgICAgICAgICAgaWYgKGZiLT5hbGlnbiA9 PSBBTElHTl9CSVRNQVBfVE9QICYmIGZiLT5wZXJpb2QgPT0gMCkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93MTsKKyAgICAgICAgICAgICAgaW50IHRv cF9pbmRfbWF4X3k7CisgICAgICAgICAgICAgIHRvcF9pbmRfbWluX3kgPSBXSU5ET1dfSEVBREVS X0xJTkVfSEVJR0hUICh3KTsKKyAgICAgICAgICAgICAgdG9wX2luZF9tYXhfeSA9IHRvcF9pbmRf bWluX3kgKyBmYi0+aGVpZ2h0OworICAgICAgICAgICAgICBpZiAodG9wX2luZF9tYXhfeSA+IHli KQorICAgICAgICAgICAgICAgIHRvcF9pbmRfbWF4X3kgPSB5YjsKKyAgICAgICAgICAgICAgZm9y ICh5ID0gcm93LT55ICsgcm93LT5oZWlnaHQsIHJuID0gdG9wX2luZF9ybiArIDE7CisgICAgICAg ICAgICAgICAgICAgeSA8IHRvcF9pbmRfbWF4X3kgJiYgcm4gPCBucm93czsKKyAgICAgICAgICAg ICAgICAgICB5ICs9IHJvdzEtPmhlaWdodCwgcm4rKykKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICBpZiAoYm90X2luZF9ybiA+PSAwICYmIHJuID49IGJvdF9pbmRfcm4pCisg ICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmRl c2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICBpZiAoIXJvdzEtPmVu YWJsZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4LT5y b3dzICsgcm47CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV9ib2JfcCA9IHJvdy0+ aW5kaWNhdGVfYm9iX3A7CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV90b3BfbGlu ZV9wID0gcm93LT5pbmRpY2F0ZV90b3BfbGluZV9wOworICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgaWYgKGJvdF9pbmRfcm4gPj0gMCkKKyAgICB7 CisgICAgICBpbnQgYm4gPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgcm93ID0gdy0+ZGVz aXJlZF9tYXRyaXgtPnJvd3MgKyBib3RfaW5kX3JuOworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRf cCkKKyAgICAgICAgcm93ID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyBib3RfaW5kX3JuOwor ICAgICAgYm90X3Jvd19lbmRzX2F0X3p2X3AgPSByb3ctPmVuZHNfYXRfenZfcDsKKyAgICAgIGlm IChyb3ctPmluZGljYXRlX2VvYl9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKEVRIChib3Vu ZGFyeV9ib3QsIFFsZWZ0KSkKKyAgICAgICAgICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDMsIFFi b3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg ICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDMsIFFib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKTsK KyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3Ap CisgICAgICAgICAgeworICAgICAgICAgICAgaWYgKEVRIChhcnJvd19ib3QsIFFsZWZ0KSkKKyAg ICAgICAgICAgICAgYm4gPSBNQ19MRUZUX0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDcsIFFkb3du LCAwKTsKKyAgICAgICAgICB9CisgICAgICBpZiAoYm4gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkK KyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBmcmluZ2VfYml0bWFwICpmYiA9IGdldF9mcmlu Z2VfYml0bWFwX2RhdGEgKGJuKTsKKyAgICAgICAgICBpZiAoZmItPmFsaWduID09IEFMSUdOX0JJ VE1BUF9CT1RUT00gJiYgZmItPnBlcmlvZCA9PSAwKQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3cxOworICAgICAgICAgICAgICBpbnQgYm90X2luZF9t aW5feTsKKyAgICAgICAgICAgICAgYm90X2luZF9tYXhfeSA9IHJvdy0+eSArIHJvdy0+dmlzaWJs ZV9oZWlnaHQ7CisgICAgICAgICAgICAgIGJvdF9pbmRfbWluX3kgPSBib3RfaW5kX21heF95IC0g ZmItPmhlaWdodDsKKyAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfbWluX3kgPCBXSU5ET1dfSEVB REVSX0xJTkVfSEVJR0hUICh3KSkKKyAgICAgICAgICAgICAgICBib3RfaW5kX21pbl95ID0gV0lO RE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+ eSwgcm4gPSBib3RfaW5kX3JuIC0gMTsKKyAgICAgICAgICAgICAgICAgICB5ID49IGJvdF9pbmRf bWluX3kgJiYgcm4gPj0gMDsKKyAgICAgICAgICAgICAgICAgICB5IC09IHJvdzEtPmhlaWdodCwg cm4tLSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAodG9wX2luZF9y biA+PSAwICYmIHJuIDw9IHRvcF9pbmRfcm4pCisgICAgICAgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47Cisg ICAgICAgICAgICAgICAgICBpZiAoIXJvdzEtPmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgICAg ICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAg ICByb3cxLT5pbmRpY2F0ZV9lb2JfcCA9IHJvdy0+aW5kaWNhdGVfZW9iX3A7CisgICAgICAgICAg ICAgICAgICByb3cxLT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wID0gcm93LT5pbmRpY2F0ZV9ib3R0 b21fbGluZV9wOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQor ICAgIH0KKyAgYm9vbCBhdXRvX2hzY3JvbGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFs dWUgKFFhdXRvX2hzY3JvbGxfbW9kZSwgdy0+Y29udGVudHMpLCBRY3VycmVudF9saW5lKTsKKyAg LyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1KSAqLworICBib29sIGhzY2xfYWxsX3RlbXBfcCA9 ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBh dXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3Jv bGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDAp OworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBub3RoaW5nLiAqLworICBib29sIGhz Y2xfYWxsX3Blcm1fMF9wID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5k IGRvIHNvbWV0aGluZyBlbHNlIGJlc2lkZXMgaG9yaXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAg ICAgICAgICAgICAgIGN1cnJlbnQgbGluZSBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1 cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICov CisgIGJvb2wgaHNjbF9hbGxfcGVybV8xX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBD LXUgQy14IDwgYW5kIC4uLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhv cml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJt XzJfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+aHNjcm9sbCA9PSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWlu X2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3Jv bGwgIT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwg dGhlbiBwcmVzcyB0aGUgbGVmdCBhcnJvdyBrZXkgb25lIHRpbWUuCisgICAgICAgICAgICAgICBD dXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAg Ym9vbCBoc2NsX3RlbXBfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAg ICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9s bCA9PSAwKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQg Y2F1c2VzIHRoZSBjdXJyZW50IGxpbmUgdG8gYmUKKyAgICAgICAgICAgICAgIGhvcml6b250YWxs eSBzY3JvbGxlZCBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNf IGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1f cCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBh dXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+ IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgc3RydWN0 IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJu ID0gMDsKKyAgICAgICB5IDwgeWIgJiYgcm4gPCBucm93czsKKyAgICAgICB5ICs9IHJvdy0+aGVp Z2h0LCBybisrKQorICAgIHsKKyAgaW50IGxlZnQsIHJpZ2h0OworICB1bnNpZ25lZCBsZWZ0X2Zh Y2VfaWQsIHJpZ2h0X2ZhY2VfaWQ7CisgIGludCBsZWZ0X29mZnNldCwgcmlnaHRfb2Zmc2V0Owor ICBib29sIHBlcmlvZGljX3A7CisgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47 CisgIGN1ciA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgIGludCB2bnRoX2RtID0g TUFUUklYX1JPV19WUE9TICh3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJuLCB3LT5kZXNpcmVk X21hdHJpeCk7CisgIGludCB2bnRoX2NtID0gTUFUUklYX1JPV19WUE9TICh3LT5jdXJyZW50X21h dHJpeC0+cm93cyArIHJuLCB3LT5jdXJyZW50X21hdHJpeCk7CisgIGVudW0gbWNfcm93X3Bvc2l0 aW9uIHJvd19wb3NpdGlvbiA9IG1jX3Jvd19wb3NpdGlvbiAodywgY3VyLCBjdXIsIHZudGhfY20p OworICBpbnQgbWNfbGVmdF9mcmluZ2VfYml0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AgICAgICAgICAgICAgICAgLmJsdWUgPSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmJsdWV9Owor ICAgICAgYm9vbCBhY3RpdmVfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uYWN0aXZlX3A7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2 b3IgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmds eXBoX2ZsYXZvcjsKKyAgICAgIGJvb2wgZW5hYmxlZF9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF9jbV0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICBpZiAoKHZwb3Mg PT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9y ID09IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAgICAgJiYgIWhzY2xfYWxsX3RlbXBf cAorICAgICAgICAgICYmICFoc2NsX3RlbXBfcAorICAgICAgICAgICYmICFoc2NsX3Blcm1fcAor ICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAgICYmICFoc2NsX2FsbF9w ZXJtXzFfcAorICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICYmIGVu YWJsZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIGludCBmcmluZ2VfYml0bWFwID0gTUNfTk9f RlJJTkdFX0JJVE1BUDsKKyAgICAgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNl X2lkID0KKyAgICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgICAmJiAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAg ICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJv dy1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAg ICAgIDogKGFjdGl2ZV9wKQorICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9J RCwgdHJ1ZSkKKyAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIG1jX2xl ZnRfZnJpbmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQ KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2Zh Y2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNF X0lEOworICAgICAgICAgIGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgICAgICBmcmluZ2Vf Yml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJv dyIpLCBmYWxzZSwgdHJ1ZSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZyaW5n ZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFy cm93IiksIHRydWUsIHRydWUpOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChj dXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIH0KKyAgICAgICAgZWxz ZSBpZiAoKHZwb3MgPT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgICAg ICAgICYmIGdseXBoX2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUAorICAgICAgICAg ICAgICAgICAmJiAoaHNjbF9hbGxfdGVtcF9wCisgICAgICAgICAgICAgICAgICAgICB8fCBoc2Ns X2FsbF9wZXJtXzBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8xX3AK KyAgICAgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgICAg ICAgICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJt X3ApCisgICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBpbnQgZnJpbmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAg ICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICAgKCFh Y3RpdmVfcAorICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJp dmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWluYWN0aXZlLXBy ZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICA6IChhY3Rp dmVfcCkKKyAgICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVy biAoIistb3ZlcmxheS1hcnJvdy1oc2NsLXByZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0 cnVlKQorICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAgIG1jX2xl ZnRfZnJpbmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQ KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3df ZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRf RkFDRV9JRDsKKyAgICAgICAgICAgIGlmIChoc2NsX2FsbF9wZXJtXzBfcCkKKyAgICAgICAgICAg ICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhz Y2wtcGVybSIpLCBmYWxzZSwgZmFsc2UpOworICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2Fs bF9wZXJtXzFfcCkKKyAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5n ZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUsIGZhbHNlKTsKKyAgICAg ICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzJfcCkKKyAgICAgICAgICAgICAgICAg IGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2Ns LXBlcm0iKSwgZmFsc2UsIHRydWUpOworICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9w ZXJtX3ApCisgICAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdl X2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgdHJ1ZSk7CisgICAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAg ICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIist aHNjbC10ZW1wIiksIGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBp ZiAoaHNjbF90ZW1wX3ApCisgICAgICAgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0g bWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10ZW1wIiksIHRydWUsIGZh bHNlKTsKKyAgICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9 PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlm ICgodnBvcyA9PSB2bnRoX2RtIHx8IHZwb3MgPT0gdm50aF9jbSkKKyAgICAgICAgICAgICAgICAg ICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisg ICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9M TE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5 cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAgICAgICAgICAgICAgICAg IHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9 PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAgICAgICAg ICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIExpc3Bf T2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5H TEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9M TE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJv dworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxh dm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNf VkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX3Zl cnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAo Z2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xh c2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsKKyAg ICAgICAgICAgICAgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBNQ19S SUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2b3IpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAg ICAgICAgICBtY19yaWdodF9mcmluZ2VfZmFjZV9pZCA9CisgICAgICAgICAgICAgICAgKGN1cnNv cl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgJiYgcm93 X3Bvc2l0aW9uID09IFBSRV9aVgorICAgICAgICAgICAgICAgICAmJiAoZ2x5cGhfZmxhdm9yID09 IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFD RV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9G UklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pW CisgICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xM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ICAgICAgICAgICAgICAgICAgICYm IGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAh PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9k ZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistYmFyLXByZS16di1mYWNlIiksIEZSSU5HRV9G QUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hU X0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gQVRf WlYKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9M TE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2Zs YXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAg ICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJh ci1hdC16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICAgIDog KGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAg ICAmJiByb3dfcG9zaXRpb24gPT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAgICYmIGdseXBo X2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JB Ul9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19S RVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVk X2ZhY2UgKHcsIGYsIGludGVybiAoIistYmFyLXBvc3QtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9J RCwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAg IH0KKyAgICAgICAgfQorICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgcm93ID0g Y3VyOworICAgICAgbGVmdF9mYWNlX2lkID0gcmlnaHRfZmFjZV9pZCA9IERFRkFVTFRfRkFDRV9J RDsKKyAgICAgIGxlZnRfb2Zmc2V0ID0gcmlnaHRfb2Zmc2V0ID0gMDsKKyAgICAgIHBlcmlvZGlj X3AgPSAwOworICAgICAgLyogRGVjaWRlIHdoaWNoIGJpdG1hcCB0byBkcmF3IGluIHRoZSBsZWZ0 IGZyaW5nZS4gKi8KKyAgICAgIGlmIChXSU5ET1dfTEVGVF9GUklOR0VfV0lEVEggKHcpID09IDAp CisgICAgICAgIGxlZnQgPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgZWxzZSBpZiAocm93 LT5sZWZ0X3VzZXJfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAg ICB7CisgICAgICAgICAgbGVmdCA9IHJvdy0+bGVmdF91c2VyX2ZyaW5nZV9iaXRtYXA7CisgICAg ICAgICAgbGVm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IHJvdy0+dmlzaWJs ZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlIGlmICgoIXJvdy0+cmV2ZXJzZWRfcCAm JiBNQVRSSVhfUk9XX0NPTlRJTlVBVElPTl9MSU5FX1AgKHJvdykpCisgICAgICAgICAgICAgICB8 fCAocm93LT5yZXZlcnNlZF9wICYmIHJvdy0+Y29udGludWVkX3ApKQorICAgICAgICBsZWZ0ID0g TUNfTEVGVF9GUklOR0UgKDQsIFFjb250aW51YXRpb24sIDApOworICAgICAgZWxzZSBpZiAocm93 LT5pbmRpY2F0ZV9lbXB0eV9saW5lX3AgJiYgRVEgKGVtcHR5X3BvcywgUWxlZnQpKQorICAgICAg ICBsZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDUsIFFlbXB0eV9saW5lLCAwKTsKKyAgICAgIGVsc2Ug aWYgKHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCAmJiBFUSAoYXJyb3dfdG9wLCBRbGVmdCkpCisg ICAgICAgIHsKKyAgICAgICAgICBsZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDYsIFF1cCwgMCk7Cisg ICAgICAgICAgaWYgKHRvcF9pbmRfbWluX3kgPj0gMCkKKyAgICAgICAgICAgIGxlZnRfb2Zmc2V0 ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAocm93 LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wICYmIEVRIChhcnJvd19ib3QsIFFsZWZ0KSkKKyAgICAg ICAgeworICAgICAgICAgIGxlZnQgPSBNQ19MRUZUX0ZSSU5HRSAoNywgUWRvd24sIDApOworICAg ICAgICAgIGlmIChib3RfaW5kX21heF95ID49IDApCisgICAgICAgICAgICBsZWZ0X29mZnNldCA9 IGJvdF9pbmRfbWF4X3kgLSAocm93LT55ICsgcm93LT52aXNpYmxlX2hlaWdodCk7CisgICAgICAg IH0KKyAgICAgIGVsc2UKKyAgICAgICAgbGVmdCA9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IGN1ci0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQKKyAgICAgICAgICB8fCBsZWZ0X29mZnNldCAh PSBjdXItPmxlZnRfZnJpbmdlX29mZnNldAorICAgICAgICAgIHx8IHJpZ2h0X29mZnNldCAhPSBj dXItPnJpZ2h0X2ZyaW5nZV9vZmZzZXQKKyAgICAgICAgICB8fCBwZXJpb2RpY19wICE9IGN1ci0+ ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wCisgICAgICAgICAgfHwgY3VyLT5yZWRyYXdfZnJpbmdl X2JpdG1hcHNfcCkKKyAgICAgICAgeworICAgICAgICAgIHJlZHJhd19wID0gMSwgcm93LT5yZWRy YXdfZnJpbmdlX2JpdG1hcHNfcCA9IDE7CisgICAgICAgICAgaWYgKCFrZWVwX2N1cnJlbnRfcCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3VyLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNf cCA9IDE7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9f RlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgfHwgbWNfcmlnaHRfZnJpbmdlX2JpdG1h cCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+ZnJpbmdlX2Jp dG1hcF9wZXJpb2RpY19wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgICAgY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBwZXJpb2RpY19wOworICAg ICAgICAgICAgICBpZiAobWNfbGVmdF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRN QVApCisgICAgICAgICAgICAgICAgY3VyLT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSBtY19sZWZ0X2Zy aW5nZV9iaXRtYXA7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3Vy LT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSBsZWZ0OworICAgICAgICAgICAgICBpZiAobWNfbGVmdF9m cmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgY3Vy LT5sZWZ0X2ZyaW5nZV9mYWNlX2lkID0gbWNfbGVmdF9mcmluZ2VfZmFjZV9pZDsKKyAgICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2ZhY2VfaWQg PSBsZWZ0X2ZhY2VfaWQ7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAg IT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdl X29mZnNldCA9IDA7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3Vy LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSBsZWZ0X29mZnNldDsKKyAgICAgICAgICAgICAgaWYgKG1j X3JpZ2h0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAg ICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9iaXRtYXAgPSBtY19yaWdodF9mcmluZ2VfYml0bWFwOwor ICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdl X2JpdG1hcCA9IHJpZ2h0OworICAgICAgICAgICAgICBpZiAobWNfcmlnaHRfZnJpbmdlX2JpdG1h cCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJp bmdlX2ZhY2VfaWQgPSBtY19yaWdodF9mcmluZ2VfZmFjZV9pZDsKKyAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9mYWNlX2lkID0gcmlnaHRf ZmFjZV9pZDsKKyAgICAgICAgICAgICAgaWYgKG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXAgIT0gTUNf Tk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9vZmZz ZXQgPSAwOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+cmln aHRfZnJpbmdlX29mZnNldCA9IHJpZ2h0X29mZnNldDsKKyAgICAgICAgICAgIH0KKyAgICAgICAg fQorICAgICAgaWYgKHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgPCAwKQorICAgICAgICByb3ct Pm92ZXJsYXlfYXJyb3dfYml0bWFwID0gbWNfZ2V0X2xvZ2ljYWxfZnJpbmdlX2JpdG1hcCAodywg UW92ZXJsYXlfYXJyb3csIDAsIDApOworICAgICAgaWYgKHJvdy0+b3ZlcmxheV9hcnJvd19iaXRt YXAgIT0gY3VyLT5vdmVybGF5X2Fycm93X2JpdG1hcCkKKyAgICAgICAgeworICAgICAgICAgIHJl ZHJhd19wID0gMSwgcm93LT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcCA9IDE7CisgICAgICAgICAg aWYgKCFrZWVwX2N1cnJlbnRfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3VyLT5y ZWRyYXdfZnJpbmdlX2JpdG1hcHNfcCA9IDE7CisgICAgICAgICAgICAgIGN1ci0+b3ZlcmxheV9h cnJvd19iaXRtYXAgPSByb3ctPm92ZXJsYXlfYXJyb3dfYml0bWFwOworICAgICAgICAgICAgfQor ICAgICAgICB9CisgICAgICBpZiAobWNfbGVmdF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5H RV9CSVRNQVAKKyAgICAgICAgICB8fCBtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZS SU5HRV9CSVRNQVAp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ZhY2UgKHcsIGYsIFFmcmluZ2UsIGZhbHNlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgZmFjZSwgRlJJ TkdFX0ZBQ0VfSUQsIDApOworICAgICAgaWYgKGZhY2VfaWQgPCAwKQorICAgICAgICBmYWNlX2lk ID0gRlJJTkdFX0ZBQ0VfSUQ7CisgICAgfQorICBmYiA9IGdldF9mcmluZ2VfYml0bWFwX2RhdGEg KHdoaWNoKTsKKyAgcGVyaW9kID0gZmItPnBlcmlvZDsKKyAgLyogQ29udmVydCByb3cgdG8gZnJh bWUgY29vcmRpbmF0ZXMuICovCisgIHAueSA9IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCBy b3ctPnkpICsgb2Zmc2V0OworICBwLndoaWNoID0gd2hpY2g7CisgIHAuYml0cyA9IGZiLT5iaXRz OworICBwLndkID0gZmItPndpZHRoOworICBwLmggPSBmYi0+aGVpZ2h0OworICBwLmRoID0gKHBl cmlvZCA+IDAgPyAocC55ICUgcGVyaW9kKSA6IDApOworICBwLmggLT0gcC5kaDsKKyAgLyogQWRq dXN0IHkgdG8gdGhlIG9mZnNldCBpbiB0aGUgcm93IHRvIHN0YXJ0IGRyYXdpbmcgdGhlIGJpdG1h cC4gKi8KKyAgc3dpdGNoIChmYi0+YWxpZ24pCisgICAgeworICAgIGNhc2UgQUxJR05fQklUTUFQ X0NFTlRFUjoKKyAgICAgIHAueSArPSAocm93LT5oZWlnaHQgLSBwLmgpIC8gMjsKKyAgICAgIGJy ZWFrOworICAgIGNhc2UgQUxJR05fQklUTUFQX0JPVFRPTToKKyAgICAgIHAueSArPSAocm93LT52 aXNpYmxlX2hlaWdodCAtIHAuaCk7CisgICAgICBicmVhazsKKyAgICBjYXNlIEFMSUdOX0JJVE1B UF9UT1A6CisgICAgICBicmVhazsKKyAgICB9CisgIHAuZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwg ZmFjZV9pZCk7CisgIGlmIChwLmZhY2UgPT0gTlVMTCkKKyAgICB7CisgICAgICAvKiBUaGlzIGNv dWxkIGhhcHBlbiBhZnRlciBjbGVhcmluZyBmYWNlIGNhY2hlLgorICAgICAgQnV0IGl0IHNob3Vs ZG4ndCBoYXBwZW4gYW55bW9yZS4gICsra2ZzICovCisgICAgICByZXR1cm47CisgICAgfQorICBw cmVwYXJlX2ZhY2VfZm9yX2Rpc3BsYXkgKGYsIHAuZmFjZSk7CisgIC8qIENsZWFyIGxlZnQgZnJp bmdlIGlmIG5vIGJpdG1hcCB0byBkcmF3IG9yIGlmIGJpdG1hcCBkb2Vzbid0IGZpbGwKKyAgICAg dGhlIGZyaW5nZS4gKi8KKyAgcC5ieCA9IC0xOworICBoZWFkZXJfbGluZV9oZWlnaHQgPSBXSU5E T1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgcC5ieSA9IFdJTkRPV19UT19GUkFNRV9QSVhF TF9ZICh3LCBtYXggKGhlYWRlcl9saW5lX2hlaWdodCwgcm93LT55KSk7CisgIHAubnkgPSByb3ct PnZpc2libGVfaGVpZ2h0OworICBpZiAobGVmdF9wKQorICAgIHsKKyAgICAgIGludCB3ZCA9IFdJ TkRPV19MRUZUX0ZSSU5HRV9XSURUSCAodyk7CisgICAgICBpbnQgeCA9IHdpbmRvd19ib3hfbGVm dCAodywgKFdJTkRPV19IQVNfRlJJTkdFU19PVVRTSURFX01BUkdJTlMgKHcpCisgICAgICAgICAg ID8gTEVGVF9NQVJHSU5fQVJFQQorICAgICAgICAgICA6IFRFWFRfQVJFQSkpOworICAgICAgaWYg KHAud2QgPiB3ZCkKKyAgICAgICAgcC53ZCA9IHdkOworICAgICAgcC54ID0geCAtIHAud2QgLSAo d2QgLSBwLndkKSAvIDI7CisgICAgICBpZiAocC53ZCA8IHdkIHx8IHAueSA+IHAuYnkgfHwgcC55 ICsgcC5oIDwgcC5ieSArIHAubnkpCisgICAgICAgIHsKKyAgICAgICAgICAvKiBJZiBXIGhhcyBh IHZlcnRpY2FsIGJvcmRlciB0byBpdHMgbGVmdCwgZG9uJ3QgZHJhdyBvdmVyIGl0LiAqLworICAg ICAgICAgIHdkIC09ICgoIVdJTkRPV19MRUZUTU9TVF9QICh3KQorICAgICAgICAgICAgLyogVGhp cyBjb3VsZCBiZSB3cm9uZyB3aGVuIHdlIGFsbG93IHdpbmRvdyBsb2NhbAorICAgICAgICAgICAg ICAgcmlnaHQgZGl2aWRlcnMgLSBidXQgdGhlIHdpbmRvdyBvbiB0aGUgbGVmdCBpcyBoYXJkCisg ICAgICAgICAgICAgICB0byBnZXQuICovCisgICAgICAgICAgICAmJiAhRlJBTUVfUklHSFRfRElW SURFUl9XSURUSCAoZikKKyAgICAgICAgICAgICYmICFXSU5ET1dfSEFTX1ZFUlRJQ0FMX1NDUk9M TF9CQVIgKHcpCisgICAgICAgICAgICAvKiBCdXQgZG9uJ3QgcmVkdWNlIHRoZSBmcmluZ2Ugd2lk dGggaWYgdGhlIHdpbmRvdworICAgICAgICAgICAgICAgaGFzIGEgbGVmdCBtYXJnaW4sIGJlY2F1 c2UgdGhhdCBtZWFucyB3ZSBhcmUgbm90CisgICAgICAgICAgICAgICBpbiBkYW5nZXIgb2YgZHJh d2luZyBvdmVyIHRoZSB2ZXJ0aWNhbCBib3JkZXIsCisgICAgICAgICAgICAgICBhbmQgT1RPSCBs ZWF2aW5nIG91dCB0aGF0IG9uZSBwaXhlbCBsZWF2ZXMgYmVoaW5kCisgICAgICAgICAgICAgICB0 cmFjZXMgb2YgdGhlIGN1cnNvciwgaWYgaXQgd2FzIGluIGNvbHVtbiB6ZXJvCisgICAgICAgICAg ICAgICBiZWZvcmUgZHJhd2luZyBub24tZW1wdHkgbWFyZ2luIGFyZWEuICovCisgICAgICAgICAg ICAmJiB3LT5sZWZ0X21hcmdpbl9jb2xzID09IDApCisgICAgICAgICAgID8gMSA6IDApOworICAg ICAgICAgIHAuYnggPSB4IC0gd2Q7CisgICAgICAgICAgcC5ueCA9IHdkOworICAgICAgICB9Cisg ICAgfQorICBlbHNlCisgICAgeworICAgICAgaW50IHggPSB3aW5kb3dfYm94X3JpZ2h0ICh3LAor ICAgICAgICAoV0lORE9XX0hBU19GUklOR0VTX09VVFNJREVfTUFSR0lOUyAodykKKyAgICAgICAg ID8gUklHSFRfTUFSR0lOX0FSRUEKKyAgICAgICAgIDogVEVYVF9BUkVBKSk7CisgICAgICBpbnQg d2QgPSBXSU5ET1dfUklHSFRfRlJJTkdFX1dJRFRIICh3KTsKKyAgICAgIGlmIChwLndkID4gd2Qp CisgICAgICAgIHAud2QgPSB3ZDsKKyAgICAgIHAueCA9IHggKyAod2QgLSBwLndkKSAvIDI7Cisg ICAgICAvKiBDbGVhciByaWdodCBmcmluZ2UgaWYgbm8gYml0bWFwIHRvIGRyYXcgb2YgaWYgYml0 bWFwIGRvZXNuJ3QgZmlsbAorICAgdGhlIGZyaW5nZS4gKi8KKyAgICAgIGlmIChwLndkIDwgd2Qg fHwgcC55ID4gcC5ieSB8fCBwLnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkKKyAgICAgICAgeworICAg ICAgICAgIHAuYnggPSB4OworICAgICAgICAgIHAubnggPSB3ZDsKKyAgICAgICAgfQorICAgIH0K KyAgaWYgKHAueCA+PSBXSU5ET1dfQk9YX0xFRlRfRURHRV9YICh3KQorICAgICAgJiYgKHAueCAr IHAud2QpIDw9IFdJTkRPV19CT1hfTEVGVF9FREdFX1ggKHcpICsgV0lORE9XX1BJWEVMX1dJRFRI ICh3KSkKKyAgICBGUkFNRV9SSUYgKGYpLT5kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgJnAp OworfQorCit2b2lkCittY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHN0cnVjdCB3aW5kb3cgKncsIHN0 cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IGxlZnRfcCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJz b3JfdHlwZSkKK3sKKyAgaW50IG92ZXJsYXkgPSAwOworICBpZiAobGVmdF9wID09IHJvdy0+cmV2 ZXJzZWRfcCAmJiByb3ctPmN1cnNvcl9pbl9mcmluZ2VfcCkKKyAgICB7CisgICAgICBMaXNwX09i amVjdCBjdXJzb3IgPSBRbmlsOworICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICAgICAg eworICAgICAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6CisgICAgICAgICAgaWYgKHJvdy0+dmlzaWJs ZV9oZWlnaHQgPj0gU1RBTkRBUkRfQklUTUFQX0hFSUdIVCAoaG9sbG93X3JlY3RhbmdsZV9iaXRz KSkKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3c7CisgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgY3Vyc29yID0gUWhvbGxvd19zbWFsbDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAg Y2FzZSBNQ19IT0xMT1dfQk9YOgorICAgICAgICAgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0ID49 IFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGhvbGxvd19yZWN0YW5nbGVfYml0cykpCisgICAgICAg ICAgICBjdXJzb3IgPSBRaG9sbG93OworICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGN1cnNv ciA9IFFob2xsb3dfc21hbGw7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfRklM TEVEX0JPWDoKKyAgICAgICAgICBjdXJzb3IgPSBRYm94OworICAgICAgICAgIGJyZWFrOworICAg ICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgICBjdXJzb3IgPSBRYmFyOworICAgICAgICAgIGJy ZWFrOworICAgICAgICBjYXNlIE1DX0hCQVI6CisgICAgICAgICAgY3Vyc29yID0gUWhiYXI7Cisg ICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAg ICAgY2FzZSBNQ19OT19DVVJTT1I6CisgICAgICAgIGNhc2UgTUNfUklHSFRfRlJJTkdFX0JJVE1B UDoKKyAgICAgICAgY2FzZSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGRlZmF1bHQ6 CisgICAgICAgICAgdy0+cGh5c19jdXJzb3Jfb25fcCA9IDA7CisgICAgICAgICAgcm93LT5jdXJz b3JfaW5fZnJpbmdlX3AgPSAwOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBp ZiAoIU5JTFAgKGN1cnNvcikpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgYm0gPSBtY19nZXRf bG9naWNhbF9jdXJzb3JfYml0bWFwICh3LCBjdXJzb3IpOworICAgICAgICAgIGlmIChibSAhPSBN Q19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19kcmF3 X2ZyaW5nZV9iaXRtYXBfMSAodywgcm93LCBsZWZ0X3AsIDIsIGJtKTsKKyAgICAgICAgICAgICAg b3ZlcmxheSA9IEVRIChjdXJzb3IsIFFib3gpID8gMyA6IDE7CisgICAgICAgICAgICB9CisgICAg ICAgIH0KKyAgICB9CisgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIGxlZnRfcCwg b3ZlcmxheSwgTUNfTk9fRlJJTkdFX0JJVE1BUCk7CisgIGlmIChsZWZ0X3AgJiYgcm93LT5vdmVy bGF5X2Fycm93X2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgIG1jX2RyYXdfZnJp bmdlX2JpdG1hcF8xICh3LCByb3csIDEsIDEsIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXApOwor fQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogI2RlZmluZSBOT19GUklOR0VfQklUTUFQIDAKICNkZW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njcm9sbGVyCiAgIHsKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAg IE5TUmVjdCBtY19yZWN0YW5nbGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg IHN0cnVjdCB3aW5kb3cgKndpbmRvdzsKICAgIHN0cnVjdCBmcmFtZSAqZnJhbWU7CiAgICBOU1Jl c3BvbmRlciAqcHJldlJlc3BvbmRlcjsKQEAgLTY4Myw2ICs2OTMsMTggQEAgdHlwZWRlZiBpZCBp bnN0YW5jZXR5cGU7CiAgICBpbnQgZW1fd2hvbGU7CiAgICB9CiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3Rh bmdsZTogKE5TUmVjdClyZWN0OworLSAoTlNSZWN0KW1jX2dldF9yZWN0YW5nbGU7CistIChzdHJ1 Y3Qgd2luZG93ICopbWNfZ2V0X3dpbmRvdzsKKy0gKGJvb2wpbWNfanVkZ2U7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKIC0gKGluc3RhbmNldHlwZSkgaW5pdEZyYW1lOiAoTlNSZWN0 IClyIHdpbmRvdzogKExpc3BfT2JqZWN0KXdpbjsKIC0gKHZvaWQpc2V0RnJhbWU6IChOU1JlY3Qp cjsKIApkaWZmIC0tZ2l0IGEvc3JjL25zdGVybS5tIGIvc3JjL25zdGVybS5tCmluZGV4IDAyMzMx ODIuLmFmN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uZSBjYWNoZSBtYXkgb3ZlcndyaXRlIGEgZmFrZSBjdXJzb3IgZnJvbSBhbm90aGVyCisgIGNh Y2hlIC0tIHRodXMsIHdlIG11c3QgY2hlY2sgdGhlbSBhbGwgZm9yIG92ZXJ3cml0dGVuIGZha2Ug Y3Vyc29ycy4gKi8KKyAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NB Q0hFOworICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUp CisgICAgeworICAgICAgZm9yIChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgcworICAgICAgICAg ICAmJiBtY190cmF2ZXJzZV9jYWNoZV9wIChtY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50 aCk7CisgICAgICAgICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgLy8gIGludCB4ID0g bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAgICAg IGludCBmeCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZng7 CisgICAgICAgICAgLy8gIGludCB5ID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXS55OworICAgICAgICAgIGludCBmeSA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAgaW50IGhwb3MgPSBtY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmhwb3M7CisgICAgICAgICAgaW50IHZw b3MgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnZwb3M7Cisg ICAgICAgICAgaW50IHdkID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS53ZDsKKyAgICAgICAgICBpbnQgaCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uaDsKKyAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90 eXBlID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3Jf dHlwZTsKKyAgICAgICAgICAvLyAgaW50IGN1cnNvcl93aWR0aCA9IG1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVj dCBtY19SR0IgbHNsX2ZnID0gey5yZWQgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhdLmZnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAu Z3JlZW4gPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmdy ZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gbWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlfTsKKyAgICAgICAgICAv LyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAg ICAgICAgICAgICAuZ3JlZW4gPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmJnLmdyZWVuLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAu Ymx1ZSA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1 ZX07CisgICAgICAgICAgYm9vbCBhY3RpdmVfcCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uYWN0aXZlX3A7CisgICAgICAgICAgLy8gIGVudW0gbWNfZmxhdm9y IGdseXBoX2ZsYXZvciA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gbWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICAgICAgYm9v bCBnb19wID0gKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zID09 IGN1cnNvcl9nbHlwaC0+aHBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3Ap OworICAgICAgICAgIGlmICghZ29fcCkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAg IE5TUmVjdCByOworICAgICAgICAgIHIub3JpZ2luLnggPSBmeDsKKyAgICAgICAgICByLm9yaWdp bi55ID0gZnk7CisgICAgICAgICAgci5zaXplLmhlaWdodCA9IGg7CisgICAgICAgICAgci5zaXpl LndpZHRoID0gd2Q7CisgICAgICAgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6 IGxzbF9mZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjog bHNsX2ZnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6 IGxzbF9mZy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6 IDEuMF0gc2V0XTsKKyAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19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X2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQg KGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlKSwgcy0+Zik7CisgICAgICAgICAgICAgIGhv bGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19jb2xvcjsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICAgIGVsc2UgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+ Y2hhcnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlX2lkID0gbG9va3VwX25h bWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1hdC1yZWdp b24tcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhv bGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBob2xsb3df YWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgTlNDb2xvciAqaG9s bG93X2FjdGl2ZV9yZWdpb25fZW5kX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5T X0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2UpLCBzLT5mKTsK KyAgICAgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRf Y29sb3I7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZSBpZiAocmVnaW9uX2Fj dGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAgICAg ICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA+IHJlZ2lvbl9iZWcKKyAgICAgICAg ICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zIDwgcmVnaW9uX2VuZCkKKyAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2Fj dGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMt PmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbi1yZWdpb24tcHJlLXp2LWZhY2UiKSwg dHJ1ZSk7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdp b25fYmV0d2Vlbl9mYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBob2xsb3dfYWN0aXZlX3JlZ2lv bl9iZXR3ZWVuX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgTlNDb2xvciAqaG9sbG93X2Fj dGl2ZV9yZWdpb25fYmV0d2Vlbl9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19G QUNFX0ZPUkVHUk9VTkQgKGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZSksIHMtPmYp OworICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2FjdGl2ZV9yZWdpb25f YmV0d2Vlbl9jb2xvcjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBp ZiAoYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+ dywgcy0+ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUp OworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0g RkFDRV9GUk9NX0lEIChzLT5mLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAg ICAgICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRf Y29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2ZV9mYWNlKSwgcy0+Zik7Cisg ICAgICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfY29sb3I7Cisg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3Ap CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2Vf aWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRy dWUpOworICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVf ZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAg ICAgICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19pbmFjdGl2ZV9jb2xvciA9IG5zX2xv b2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19pbmFjdGl2ZV9m YWNlKSwgcy0+Zik7CisgICAgICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93 X2luYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAg ICAgZWxzZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4 X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpLCBzLT5mKSkKKyAgICAgICAgICB7Cisg ICAgICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAo ZmFjZSksIHMtPmYpIHNldF07CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJT T1JfQ09MT1IgKHMtPmYpOworICAgICAgICAgIH0KKyAgICAgICAgICBzd2l0Y2ggKGN1cnNvcl90 eXBlKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRN QVA6CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfTk9fQ1VS U09SOgorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX1JJR0hU X0ZSSU5HRV9CSVRNQVA6CisgICAgICAgICAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQ OgorICAgICAgICAgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgICAgICAgICAgTlNS ZWN0RmlsbCAocik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2Ug TUNfRlJBTUVEX0JPWDoKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAg ICAgICAgICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAo TlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgICAgICAgICBbRlJBTUVfQ1VSU09SX0NP TE9SIChzLT5mKSBzZXRdOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBj YXNlIE1DX0hPTExPV19CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAg ICAgICAgICAgICAgW2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICAgICAgICAgIE5TUmVjdEZp bGwgKE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7CisgICAgICAgICAgICAgICAgW0ZSQU1FX0NVUlNP Ul9DT0xPUiAocy0+Zikgc2V0XTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAg ICAgY2FzZSBNQ19IQkFSOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgICAg ICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICAvKiBJZiBhIGdseXBoIGV4aXN0cyAocy0+Y2hhcjJiICE9IE5VTEwpLCB0 aGVuIGRyYXcgdGhlIGdseXBoIG9uIHRvcCBvZiB0aGUKKyAgICAgICAgICBuZXdseSBkcmF3biBy ZWN0YW5nbGUgdGhhdCB3YXMgY3JlYXRlZCBoZXJlaW5hYm92ZS4gIFRvIHRoZSBleHRlbnQgdGhh dCB3ZQorICAgICAgICAgIHdhbnQgdG8gZG91YmxlLWltcHJpbnQgZ2x5cGhzIHRvIG1ha2UgdGhl bSBhcHBlYXIgdG8gYmUgc2VtaS1ib2xkLCBpdCBjYW4KKyAgICAgICAgICBiZSBkb25lIGhlcmUg Zm9yIGFsbCBjdXJzb3IgdHlwZXMuICBUaGUgYm94LXN0eWxlIGN1cnNvcnMgYXJlIGltcHJpbnRl ZAorICAgICAgICAgIHdpdGggZ2x5cGhzIG9ubHkgb25lICgxKSB0aW1lLiAgVGhlIHNlbWktYm9s ZCBhcHBlYXJhbmNlIGlzIGhlbHBmdWwgd2hlbgorICAgICAgICAgIGRlYnVnZ2luZyB0byBzZWUg dGhhdCB0aGUgY29vcmRpbmF0ZXMgYXJlIGNvcnJlY3QuICovCisgICAgICAgICAgaWYgKHMtPmNo YXIyYiAhPSBOVUxMCisgICAgICAgICAgICAgICYmIChjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURf Qk9YCisgICAgICAgICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisg ICAgICAgICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19IT0xMT1dfQk9YKSkKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgQk9PTCBpc0NvbXBvc2l0ZSA9IHMtPmZpcnN0X2dseXBo LT50eXBlID09IENPTVBPU0lURV9HTFlQSDsKKyAgICAgICAgICAgICAgaWYgKGlzQ29tcG9zaXRl KQorICAgICAgICAgICAgICAgIG5zX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3Jv dW5kIChzKTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgICAg ICAgICAgICAgICAgICAgaWYgKCFmb250KQorICAgICAgICAgICAgICAgICAgICAgIGZvbnQgPSBG UkFNRV9GT05UIChzLT5mKTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3AgPSBm YWxzZTsKKyAgICAgICAgICAgICAgICAgICAgZm9udC0+ZHJpdmVyLT5kcmF3IChzLCBzLT5jbXBf ZnJvbSwgcy0+bmNoYXJzLCBzLT54LCBzLT55YmFzZSwgd2l0aF9iZ19wKTsKKyAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgf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SBD T0xPUiBXSVRIIFJHQi9MU0wgZmxvYXQgdmFsdWVzOgorICAgICBOU0NvbG9yICpteV9jb2xvciA9 IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IDEuMAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IDEuMAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IDEuMAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07 CisgIC0gIEFMVEVSTkFUSVZFIEVYQU1QTEU6CisgICAgIGVudW0gZmFjZV9pZCBkZWJ1Z2dpbmdf ZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBpbnRlcm4gKCIrLWRlYnVn Z2luZy1mYWNlIiksIHRydWUpOworICAgICBzdHJ1Y3QgZmFjZSAqZGVidWdnaW5nX2ZhY2UgPSBG QUNFX0ZST01fSUQgKHMtPmYsIGRlYnVnZ2luZ19mYWNlX2lkKTsKKyAgICAgTlNDb2xvciAqY29s b3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChkZWJ1Z2dp bmdfZmFjZSksIHMtPmYpOworICAgICBbY29sb3Igc2V0XTsgKi8KKyAgaWYgKGdseXBoX2ZsYXZv ciA9PSBNQ19HTFlQSAorICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBITEVTUykKKyAg ICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGdyZWVuOiBsc2wuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAgICAg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gICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19pbmFjdGl2ZV9jb2xvcjsKKyAgICAgICAg ICAgICAgICB9CisgICAgfQorICAgIGVsc2UgaWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JPVU5E IChmYWNlKSA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCisg ICAgICB7CisgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JP VU5EIChmYWNlKSwgZikgc2V0XTsKKyAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09S X0NPTE9SIChmKTsKKyAgICAgIH0KKyNpZmRlZiBOU19JTVBMX0NPQ09BCisgIE5TRGlzYWJsZVNj cmVlblVwZGF0ZXMgKCk7CisjZW5kaWYKKyAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICB7Cisg ICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGJyZWFrOworICAgICAgY2Fz ZSBNQ19OT19DVVJTT1I6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19SSUdIVF9GUklO R0VfQklUTUFQOgorICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklU TUFQOgorICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAg TlNSZWN0RmlsbCAocik7CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19GUkFNRURfQk9Y OgorICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgW2hvbGxvd19jb2xvciBzZXRdOwor ICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAociwgMSwgMSkpOworICAgICAgICBbRlJB TUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNf SE9MTE9XX0JPWDoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgIFtob2xsb3dfY29s b3Igc2V0XTsKKyAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNldFJlY3QgKHIsIDEsIDEpKTsKKyAg ICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAoZikgc2V0XTsKKyAgICAgICAgYnJlYWs7CisgICAg ICBjYXNlIE1DX0hCQVI6CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBicmVhazsK KyAgICAgIGNhc2UgTUNfQkFSOgorICAgICAgICBzID0gcjsKKyAgICAgICAgLyogQGxhd2xpc3Qg aXMgZm9jdXNpbmcgdGhlIGluaXRpYWwgZGV2ZWxvcG1lbnQgb2YgZmVhdHVyZSByZXF1ZXN0cwor ICAgICAgICAjMTc2ODQgYW5kICMyMjg3MyBvbiBMMlIgbGFuZ3VhZ2VzLiAqLworICAgICAgICBp ZiAoZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBICisgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3Ig IT0gTUNfR0xZUEhMRVNTKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8qIElmIHRoZSBjaGFy YWN0ZXIgdW5kZXIgY3Vyc29yIGlzIFIyTCwgZHJhdyB0aGUgYmFyIGN1cnNvcgorICAgICAgICAg ICAgICAgb24gdGhlIHJpZ2h0IG9mIGl0cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxlZnQu ICovCisgICAgICAgICAgICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2ZWRfbGV2ZWwgJiAxKSAh PSAwKQorICAgICAgICAgICAgICBzLm9yaWdpbi54ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lk dGggLSBzLnNpemUud2lkdGg7CisgICAgICAgICAgfQorICAgICAgICBOU1JlY3RGaWxsIChzKTsK KyAgICAgICAgYnJlYWs7CisgICAgfQorICBuc19yZXNldF9jbGlwcGluZyAoZik7CisgIC8qIGRy YXcgdGhlIGNoYXJhY3RlciB1bmRlciB0aGUgY3Vyc29yICovCisgIGlmIChnbHlwaF9mbGF2b3Ig IT0gTUNfR0xZUEhMRVNTCisgICAgICAmJiAoY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWAor ICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0ZJTExFRF9CT1gKKyAgICAgICAgICB8fCBj dXJzb3JfdHlwZSA9PSBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgfHwgKGRlYnVnX3AKKyAgICAg ICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfSEJBUikKKyAgICAgICAgICB8fCAoZGVidWdf cAorICAgICAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19CQVIpKSkKKyAgICB7CisgICAg ICAvKiBgY3Vyc29yX2djX3BgIGlzIHVzZWQgb25seSBieSBgdzMydGVybS5jYCBhbmQgYHh0ZXJt LmMnLiAqLworICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IGZhbHNlOworICAgICAgY29uc3QgRW1h Y3NfUmVjdGFuZ2xlICpzYXZlZF9jbGlwID0gTlVMTDsKKyAgICAgIGlmIChyb3ctPmNsaXAgIT0g TlVMTCkKKyAgICAgICAgeworICAgICAgICAgIHNhdmVkX2NsaXAgPSByb3ctPmNsaXA7CisgICAg ICAgICAgcm93LT5jbGlwID0gTlVMTDsKKyAgICAgICAgfQorICAgICAgbWNfZHJhd19jdXJzb3Jf Z2x5cGggKHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywgbHNsLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdk LCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgaWYgKHNhdmVkX2NsaXAgIT0gTlVMTCkK KyAgICAgICAgcm93LT5jbGlwID0gc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d2F2ZSAocywg d2lkdGgsIHgpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVybGlu ZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBOU1Jl Y3QgcjsKKyAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlvbjsKKyAg ICAgICAgICAgIC8qIElmIHRoZSBwcmV2IHdhcyB1bmRlcmxpbmVkLCBtYXRjaCBpdHMgYXBwZWFy YW5jZS4gKi8KKyAgICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVy bGluZV9wCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUg PT0gRkFDRV9VTkRFUl9MSU5FCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+dW5kZXJsaW5l X3RoaWNrbmVzcyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICB0aGlja25l c3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgIHBvc2l0 aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgZm9udCAqZm9udDsKKyAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZGVzY2VudDsK KyAgICAgICAgICAgICAgICAgIGZvbnQ9cy0+Zm9udDsKKyAgICAgICAgICAgICAgICAgIGRlc2Nl bnQgPSBzLT55ICsgcy0+aGVpZ2h0IC0gcy0+eWJhc2U7CisgICAgICAgICAgICAgICAgICAvKiBV c2UgdW5kZXJsaW5lIHRoaWNrbmVzcyBvZiBmb250LCBkZWZhdWx0aW5nIHRvIDEuICovCisgICAg ICAgICAgICAgICAgICB0aGlja25lc3MgPSAoZm9udCAmJiBmb250LT51bmRlcmxpbmVfdGhpY2tu ZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZm9udC0+dW5kZXJsaW5l X3RoaWNrbmVzcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAxOworICAgICAgICAg ICAgICAgICAgLyogRGV0ZXJtaW5lIHRoZSBvZmZzZXQgb2YgdW5kZXJsaW5pbmcgZnJvbSB0aGUg YmFzZWxpbmUuICovCisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2Vu dF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGRlc2NlbnQgLSB0aGlja25l c3M7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHhfdXNlX3VuZGVybGluZV9wb3NpdGlv bl9wcm9wZXJ0aWVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZvbnQgJiYgZm9u dC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgcG9zaXRp b24gPSBmb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAgZWxz ZSBpZiAoZm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbHJvdW5kIChm b250LT5kZXNjZW50IC8gMik7CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0Owor ICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVfbWlu aW11bV9vZmZzZXQpOworICAgICAgICAgICAgICAgICAgLyogRW5zdXJlIHVuZGVybGluaW5nIGlz IG5vdCBjcm9wcGVkLiAqLworICAgICAgICAgICAgICAgICAgaWYgKGRlc2NlbnQgPD0gcG9zaXRp b24pCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlv biA9IGRlc2NlbnQgLSAxOworICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7Cisg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVzY2Vu dCA8IHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVz cyA9IDE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3RoaWNr bmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9IHBv c2l0aW9uOworICAgICAgICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnliYXNlICsgcG9zaXRp b24sIHdpZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAgaWYgKGZhY2UtPnVuZGVybGluZV9k ZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoZmFjZS0+ dW5kZXJsaW5lX2NvbG9yLCBzLT5mKSBzZXRdOworICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7 CisgICAgICAgICAgfQorICAgIH0KKyAgLyogRG8gb3ZlcmxpbmUuIFdlIGZvbGxvdyBvdGhlciB0 ZXJtcyBpbiB1c2luZyBhIHRoaWNrbmVzcyBvZiAxCisgICAgIGFuZCBpZ25vcmluZyBvdmVybGlu ZV9tYXJnaW4uICovCisgIGlmIChmYWNlLT5vdmVybGluZV9wKQorICAgIHsKKyAgICAgIE5TUmVj dCByOworICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnksIHdpZHRoLCAxKTsKKyAgICAgIGlm IChmYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgW2RlZmF1bHRDb2wg c2V0XTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAo ZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPmYpIHNldF07CisgICAgICBOU1JlY3RGaWxsIChyKTsK KyAgICB9CisgIC8qIERvIHN0cmlrZS10aHJvdWdoLiAgV2UgZm9sbG93IG90aGVyIHRlcm1zIGZv ciB0aGlja25lc3MgYW5kCisgICAgIHZlcnRpY2FsIHBvc2l0aW9uLiovCisgIGlmIChmYWNlLT5z dHJpa2VfdGhyb3VnaF9wKQorICAgIHsKKyAgICAgIE5TUmVjdCByOworICAgICAgdW5zaWduZWQg bG9uZyBkeTsKKyAgICAgIGR5ID0gbHJpbnQgKChzLT5oZWlnaHQgLSAxKSAvIDIpOworICAgICAg ciA9IE5TTWFrZVJlY3QgKHgsIHMtPnkgKyBkeSwgd2lkdGgsIDEpOworICAgICAgaWYgKGZhY2Ut PnN0cmlrZV90aHJvdWdoX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICBbZGVmYXVsdENvbCBz ZXRdOworICAgICAgICBlbHNlCisgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChm YWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgIE5TUmVjdEZpbGwg KHIpOworICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX2R1bXBnbHlwaHNfc3RyZXRjaCAo c3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAg ICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIHN0cnVjdCBtY19t YXRyaXggbWNfbWF0cml4LAorIC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tPnJv dy0+ZnVsbF93aWR0aF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpbnQgb3ZlcnJ1 biwgbGVmdG92ZXJydW47CisgICAgICAgICAgICAgIC8qIHRydW5jYXRlIHRvIGF2b2lkIG92ZXJ3 cml0aW5nIGZyaW5nZSBhbmQvb3Igc2Nyb2xsYmFyICovCisgICAgICAgICAgICAgIG92ZXJydW4g PSBtYXggKDAsIChzLT54ICsgcy0+YmFja2dyb3VuZF93aWR0aCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC0gKFdJTkRPV19CT1hfUklHSFRfRURHRV9YIChzLT53KQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgLSBXSU5ET1dfUklHSFRfRlJJTkdFX1dJRFRIIChzLT53 KSkpOworICAgICAgICAgICAgICAgICAgICByW2ldLnNpemUud2lkdGggLT0gb3ZlcnJ1bjsKKyAg ICAgICAgICAgICAgLyogdHJ1bmNhdGUgdG8gYXZvaWQgb3ZlcndyaXRpbmcgdG8gbGVmdCBvZiB0 aGUgd2luZG93IGJveCAqLworICAgICAgICAgICAgICBsZWZ0b3ZlcnJ1biA9IChXSU5ET1dfQk9Y X0xFRlRfRURHRV9YIChzLT53KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIFdJTkRP V19MRUZUX0ZSSU5HRV9XSURUSCAocy0+dykpIC0gcy0+eDsKKyAgICAgICAgICAgICAgaWYgKGxl ZnRvdmVycnVuID4gMCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICByW2ld Lm9yaWdpbi54ICs9IGxlZnRvdmVycnVuOworICAgICAgICAgICAgICAgICAgcltpXS5zaXplLndp ZHRoIC09IGxlZnRvdmVycnVuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAg ICAgICAgICBbYmdDb2wgc2V0XTsKKyAgICAgICAgICAvKiBOT1RFOiB1bmRlciBOUyB0aGlzIGlz IE5PVCB1c2VkIHRvIGRy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ICAgIENH RmxvYXQgeCA9IHJbaV0ub3JpZ2luLng7CisgICAgICAgICAgICAgIENHRmxvYXQgd2lkdGggPSB3 ZDsKKyAgICAgICAgICAgICAgcltpXS5zaXplLndpZHRoIC09IHdpZHRoOworICAgICAgICAgICAg ICByW2ldLm9yaWdpbi54ICs9IHdpZHRoOworICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyW2ld KTsKKyAgICAgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBjdXJzb3Iu ICovCisgICAgICAgICAgICAgIGlmIChzLT53LT5waHlzX2N1cnNvcl90eXBlID09IE1DX0ZJTExF RF9CT1gpCisgICAgICAgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZh Y2UsIGJnQ29sLCB3aWR0aCwgeCk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIGZnQ29sLCB3aWR0aCwg eCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAvLyAg aW50IHJ4ID0gcltpXS5vcmlnaW4ueDsKKyAgLy8gIGludCByeSA9IHJbaV0ub3JpZ2luLnk7Cisg IC8vICBpbnQgcncgPSByW2ldLnNpemUud2lkdGg7CisgIC8vICBpbnQgcmggPSByW2ldLnNpemUu aGVpZ2h0OworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfbnNfZHVtcGdseXBoc19zdHJldGNo OiAgdnBvcyAoJWQpIHwgcnggKCVkKSB8IHJ5ICglZCkgfCBydyAoJWQpIHwgcmggKCVkKVxuIiwK KyAgLy8gICAgICAgICAgICAgICAgICAgcy0+Zmlyc3RfZ2x5cGgtPnZwb3MsIHJ4LCByeSwgcncs IHJoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocltpXSk7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBzdHJldGNoIGdseXBoIChv ciB0aGUgcGFydAorICAgICAgICAgICAgIG9mIHRoZSBzdHJldGNoIGdseXBoIGFmdGVyIHRoZSBj dXJzb3IpLiAqLworICAgICAgICAgIG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChzLCBmYWNl LCBmZ0NvbCwgcltpXS5zaXplLndpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICByW2ldLm9yaWdpbi54KTsKKyAgICAgICAgfQorICAgICAgaWYgKChzLT5sZWZ0X292 ZXJ3cml0dGVuX3AgfHwgcy0+cmlnaHRfb3ZlcndyaXR0ZW5fcCkKKyAgICAgICAgICAmJiAocy0+ YWN0aW9uX3R5cGUgPT0gTUNfRFJBV19HTFlQSF9TVFJJTkcgfHwgcy0+YWN0aW9uX3R5cGUgPT0g TUNfRVJBU0VfR0xZUEhfU1RSSU5HKSkKKyAgICAgICAgbWNfbnNfZHJhd19vdmVyd3JpdHRlbiAo cywgbWF0cml4LCByb3csIG1jX21hdHJpeCwgcy0+Zmlyc3RfZ2x5cGgpOworICAgICAgbnNfcmVz ZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7Cisg ICAgfQorfQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHVtcGdseXBoc19pbWFnZSAoc3RydWN0IGds eXBoX3N0cmluZyAqcywgTlNSZWN0IHIsIHN0cnVjdCBtY19SR0IgbHNsLAorICAgICAgICAgICAg ICAgICAgICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLCBlbnVtIG1jX2N1cnNvcl90 eXBlIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcCkK Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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isgICAgeworICAgICAgYnIgPSBOU01ha2VSZWN0IChiZ194LCBi Z195LCBzLT5iYWNrZ3JvdW5kX3dpZHRoLCBiZ19oZWlnaHQpOworICAgICAgcy0+YmFja2dyb3Vu ZF9maWxsZWRfcCA9IDE7CisgICAgfQorICAgIGVsc2UKKyAgICAgIGJyID0gTlNNYWtlUmVjdCAo eCwgeSwgcy0+c2xpY2Uud2lkdGgsIHMtPnNsaWNlLmhlaWdodCk7CisgIE5TUmVjdEZpbGwgKGJy KTsKKyAgLyogRHJhdyB0aGUgaW1hZ2UuLiBkbyB3ZSBuZWVkIHRvIGRyYXcgcGxhY2Vob2xkZXIg aWYgaW1nID09bmlsPyAqLworICBpZiAoaW1nICE9IG5pbCkKKyAgICB7CisjaWZkZWYgTlNfSU1Q TF9DT0NPQQorICAgICAgTlNSZWN0IGRyID0gTlNNYWtlUmVjdCAoeCwgeSwgcy0+c2xpY2Uud2lk dGgsIHMtPnNsaWNlLmhlaWdodCk7CisgICAgICBOU1JlY3QgaXIgPSBOU01ha2VSZWN0IChzLT5z bGljZS54LCBzLT5zbGljZS55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+c2xp Y2Uud2lkdGgsIHMtPnNsaWNlLmhlaWdodCk7CisgICAgICBbaW1nIGRyYXdJblJlY3Q6IGRyCisg ICAgICAgICAgICAgZnJvbVJlY3Q6IGlyCisgICAgICAgICAgICAgb3BlcmF0aW9uOiBOU0NvbXBv c2l0ZVNvdXJjZU92ZXIKKyAgICAgICAgICAgICAgZnJhY3Rpb246IDEuMAorICAgICAgICAgICBy ZXNwZWN0RmxpcHBlZDogWUVTCisgICAgICAgICAgICAgICAgaGludHM6IG5pbF07CisjZWxzZQor ICAgICAgW2ltZyBjb21wb3NpdGVUb1BvaW50OiBOU01ha2VQb2ludCAoeCwgeSArIHMtPnNsaWNl LmhlaWdodCkKKyAgICAgICAgICAgICAgICAgIG9wZXJhdGlvbjogTlNDb21wb3NpdGVTb3VyY2VP dmVyXT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IHJlbGllZiwgaWYgcmVxdWVzdGVkICov CisgIGlmIChzLT5pbWctPnJlbGllZiB8fCBzLT5obCA9PURSQVdfSU1BR0VfUkFJU0VEIHx8IHMt PmhsID09RFJBV19JTUFHRV9TVU5LRU4pCisgICAgeworICAgICAgaWYgKHMtPmhsID09IERSQVdf SU1BR0VfU1VOS0VOIHx8IHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VEKQorICAgICAgICB7Cisg ICAgICAgICAgdGggPSB0b29sX2Jhcl9idXR0b25fcmVsaWVmID49IDAgPworICAgICAgICAgICAg dG9vbF9iYXJfYnV0dG9uX3JlbGllZiA6IERFRkFVTFRfVE9PTF9CQVJfQlVUVE9OX1JFTElFRjsK KyAgICAgICAgICByYWlzZWRfcCA9IChzLT5obCA9PSBEUkFXX0lNQUdFX1JBSVNFRCk7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHRoID0gYWJzIChz LT5pbWctPnJlbGllZik7CisgICAgICAgICAgICByYWlzZWRfcCA9IChzLT5pbWctPnJlbGllZiA+ IDApOworICAgICAgICAgIH0KKyAgICAgIHIub3JpZ2luLnggPSB4IC0gdGg7CisgICAgICByLm9y aWdpbi55ID0geSAtIHRoOworICAgICAgci5zaXplLndpZHRoID0gcy0+c2xpY2Uud2lkdGggKyAy KnRoLTE7CisgICAgICByLnNpemUuaGVpZ2h0ID0gcy0+c2xpY2UuaGVpZ2h0ICsgMip0aC0xOwor ICAgICAgbnNfZHJhd19yZWxpZWYgKHIsIHRoLCByYWlzZWRfcCwKKyAgICAgICAgICAgICAgICAg ICAgICBzLT5zbGljZS55ID09IDAsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueSAr IHMtPnNsaWNlLmhlaWdodCA9PSBzLT5pbWctPmhlaWdodCwKKyAgICAgICAgICAgICAgICAgICAg ICBzLT5zbGljZS54ID09IDAsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueCArIHMt PnNsaWNlLndpZHRoID09IHMtPmltZy0+d2lkdGgsIHMpOworICAgIH0KKyAgLyogSWYgdGhlcmUg aXMgbm8gbWFzaywgdGhlIGJhY2tncm91bmQgd29uJ3QgYmUgc2VlbiwKKyAgICAgc28gZHJhdyBh IHJlY3RhbmdsZSBvbiB0aGUgaW1hZ2UgZm9yIHRoZSBjdXJzb3IuCisgICAgIERvIHRoaXMgZm9y IGFsbCBpbWFnZXMsIGdldHRpbmcgdHJhbnNwYXJlbmN5IHJpZ2h0IGlzIG5vdCByZWxpYWJsZS4g Ki8KKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgIHsKKyAgICAgIGludCB0aGlja25l c3MgPSBhYnMgKHMtPmltZy0+cmVsaWVmKTsKKyAgICAgIGlmICh0aGlja25lc3MgPT0gMCkgdGhp Y2tuZXNzID0gMTsKKyAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgIHx8 IGdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MpCisgICAgICB7CisgICAgICAgIE5TQ29sb3Ig KmJvcmRlcl9jb2xvciA9IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbC5yZWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBncmVlbjogbHNsLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IGxzbC5ibHVlCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07CisgICAg ICAgIG5zX2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBib3JkZXJfY29sb3IsIDEsIDEpOworICAg ICAgfQorICAgICAgZWxzZQorICAgICAgICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywgRlJB TUVf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HsKKyAgICAgICAgICAgICAgZmFj ZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgTU9VU0VfSExfSU5GTyAocy0+ZiktPm1vdXNlX2ZhY2Vf ZmFjZV9pZCk7CisgICAgICAgICAgICAgIGlmICghZmFjZSkKKyAgICAgICAgICAgICAgICBmYWNl ID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+Ziwg cy0+Zmlyc3RfZ2x5cGgtPmZhY2VfaWQpOworICAgICAgICAgIGlmICghZmFjZS0+c3RpcHBsZSkK KyAgICAgICAgICAgIFsoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSAhPSAwCisgICAgICAgICAg ICAgID8gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSks IHMtPmYpCisgICAgICAgICAgICAgIDogRlJBTUVfQkFDS0dST1VORF9DT0xPUiAocy0+ZikpIHNl dF07CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBz dHJ1Y3QgbnNfZGlzcGxheV9pbmZvICpkcHlpbmZvID0gRlJBTUVfRElTUExBWV9JTkZPIChzLT5m KTsKKyAgICAgICAgICAgICAgICBbW2RweWluZm8tPmJpdG1hcHNbZmFjZS0+c3RpcHBsZS0xXS5p bWcgc3RpcHBsZU1hc2tdIHNldF07CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICBpZiAocy0+ aGwgIT0gRFJBV19DVVJTT1IpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPnJlY3Rh bmdsZV9udWtlZF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgTlNSZWN0IHIgPSBOU01ha2VSZWN0 IChzLT54LCBzLT55ICsgYm94X2xpbmVfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzLT5iYWNrZ3JvdW5kX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgcy0+aGVpZ2h0LTIqYm94X2xpbmVfd2lkdGgpOworICAgICAgICAgICAgICBO U1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBzLT5iYWNrZ3JvdW5kX2Zp bGxlZF9wID0gMTsKKyAgICAgICAgfQorICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX2Ry YXdfZ2x5cGhfc3RyaW5nIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICptYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAq cm93LCBzdHJ1Y3QgbWNfbWF0cml4IG1jX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAg ICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsIGludCB3 ZCwgYm9vbCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGN1cnNvcl9n Y19wKQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgIEV4dGVybmFsIChSSUYpOiBNYWluIGRy YXctdGV4dCBjYWxsLgorICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KK3sKKyAgTlNSZWN0IHJbMl07 CisgIGludCBuOworICBjaGFyIGJveF9kcmF3bl9wID0gMDsKKyAgc3RydWN0IGZvbnQgKmZvbnQg PSBzLT5mYWNlLT5mb250OworICBpZiAoIWZvbnQpCisgICAgZm9udCA9IEZSQU1FX0ZPTlQgKHMt PmYpOworICBOU1RSQUNFX1dIRU4gKE5TVFJBQ0VfR1JPVVBfR0xZUEhTLCAibWNfbnNfZHJhd19n bHlwaF9zdHJpbmciKTsKKyAgaWYgKHMtPm5leHQgJiYgcy0+cmlnaHRfb3ZlcmhhbmcgJiYgIXMt PmZvcl9vdmVybGFwcykKKyAgICB7CisgICAgICBpbnQgd2lkdGg7CisgICAgICBzdHJ1Y3QgZ2x5 cGhfc3RyaW5nICpuZXh0OworICAgICAgZm9yICh3aWR0aCA9IDAsIG5leHQgPSBzLT5uZXh0Owor ICAgICAgICAgICBuZXh0ICYmIHdpZHRoIDwgcy0+cmlnaHRfb3Zlcmhhbmc7CisgICAgICAgICAg IHdpZHRoICs9IG5leHQtPndpZHRoLCBuZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAgaWYgKG5l eHQtPmZpcnN0X2dseXBoLT50eXBlICE9IElNQUdFX0dMWVBIKQorICAgICAgICAgIHsKKyAgICAg ICAgICAgIGlmIChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSAhPSBTVFJFVENIX0dMWVBIKQorICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xp cF9yZWN0IChzLT5uZXh0LCByKTsKKyAgICAgICAgICAgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVj dCAocy0+ZiwgciwgbikpCisgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAg ICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLT5uZXh0LCAxKTsKKyAgICAg ICAgICAgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIG1jX25zX2R1bXBnbHlwaHNfc3RyZXRj aCAocy0+bmV4dCwgbWF0cml4LCByb3csIG1jX21hdHJpeCwgd2QpOworICAgICAgICAgICAgbmV4 dC0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICB9CisgICAgfQorICBpZiAoIXMtPmZvcl9vdmVy bGFwcyAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gKKyAgICAgICYmIChzLT5maXJzdF9n bHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgfHwgcy0+Zmlyc3RfZ2x5cGgtPnR5 cGUgPT0gQ09NUE9TSVRFX0dMWVBIKSkKKyAgICB7CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0 cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYs IHIsIG4pKQorICAgICAgICByZXR1cm47CisgICAgICBtY19uc19tYXliZV9kdW1wZ2x5cGhzX2Jh Y2tncm91bmQgKHMsIDEpOworICAgICAgbnNfZHVtcGdseXBoc19ib3hfb3JfcmVsaWVmIChzKTsK KyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICAgIGJveF9kcmF3bl9wID0gMTsK KyAgICB9CisgIHN3aXRjaCAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUpCisgICAgeworICAgIGNhc2Ug SU1BR0VfR0xZUEg6CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMs IHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAgICAgICBy ZXR1cm47CisgICAgICBtY19uc19kdW1wZ2x5cGhzX2ltYWdlIChzLCByWzBdLCBsc2wsIGdseXBo X2ZsYXZvciwgY3Vyc29yX3R5cGUsIGFjdGl2ZV9wKTsKKyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5n IChzLT5mKTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgU1RSRVRDSF9HTFlQSDoKKyAgICAgIG1j X25zX2R1bXBnbHlwaHNfc3RyZXRjaCAocywgbWF0cml4LCByb3csIG1jX21hdHJpeCwgd2QpOwor ICAgICAgYnJlYWs7CisgICAgY2FzZSBDSEFSX0dMWVBIOgorICAgIGNhc2UgQ09NUE9TSVRFX0dM WVBIOgorICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAg ICAgIGlmICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOwor ICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcworICAgICAgICAgIHx8IChzLT5jbXBfZnJvbSA+IDAK KyAgICAgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkKKyAg ICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICAgIGVsc2UKKyAgICAgICAg ICBtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91bmQgKHMsIHMtPmZpcnN0X2dseXBoLT50 eXBlID09IENPTVBPU0lURV9HTFlQSCk7CisgICAgICBpbnQgZmxhZ3MgPSAocy0+aGwgPT0gRFJB V19DVVJTT1IpCisgICAgICAgICAgICAgICAgICAgID8gTlNfRFVNUEdMWVBIX0NVUlNPUgorICAg ICAgICAgICAgICAgICAgOiAocy0+aGwgPT0gRFJBV19NT1VTRV9GQUNFKQorICAgICAgICAgICAg ICAgICAgICA/IE5TX0RVTVBHTFlQSF9NT1VTRUZBQ0UKKyAgICAgICAgICAgICAgICAgIDogKHMt PmZvcl9vdmVybGFwcykKKyAgICAgICAgICAgICAgICAgICAgPyBOU19EVU1QR0xZUEhfRk9SRUdS T1VORAorICAgICAgICAgICAgICAgICAgOiBOU19EVU1QR0xZUEhf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wgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAgICAgICAgICAmJiBjdXJz b3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisgICAgICAgICAgICAgICAgICAgJiYgYWN0aXZlX3Ap CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3Rp dmVfZmFjZV9pZCA9CisgICAgICAgICAgICAgICAgbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMt PmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0 cnVlKTsKKyAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0g RkFDRV9GUk9NX0lEIChzLT5mLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAg ICAgIE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSBOU19GQUNFX0ZPUkVHUk9VTkQgKGhv bGxvd19pbmFjdGl2ZV9mYWNlKTsKKyAgICAgICAgICAgIH0KKyAgICAgIGlmIChzLT5maXJzdF9n bHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpCisgICAgICAgIG5zX2RyYXdfY29tcG9zaXRl X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIHsK KyAgICAgICAgICAgIGJvb2wgd2l0aF9iZ19wID0gKChmbGFncyA9PSBOU19EVU1QR0xZUEhfTk9S TUFMICYmICFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgfHwgZmxhZ3MgPT0gTlNfRFVNUEdMWVBIX01PVVNFRkFDRSk7CisgICAgICAgICAgICBp ZiAod2l0aF9iZ19wKQorICAgICAgICAgICAgICBzLT5iYWNrZ3JvdW5kX251a2VkX3AgPSB0cnVl OworICAgICAgICAgICAgZm9udC0+ZHJpdmVyLT5kcmF3IChzLCBzLT5jbXBfZnJvbSwgcy0+bmNo YXJzLCBzLT54LCBzLT55YmFzZSwgd2l0aF9iZ19wKTsKKyAgICAgICAgICB9CisgICAgICBOU0Nv bG9yICpjb2wgPSAoTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSAhPSAwCisgICAgICAgICAg ICAgICAgICAgICA/IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQg KHMtPmZhY2UpLCBzLT5mKQorICAgICAgICAgICAgICAgICAgICAgOiBGUkFNRV9GT1JFR1JPVU5E X0NPTE9SIChzLT5mKSk7CisgICAgICBbY29sIHNldF07CisgICAgICAvKiBEcmF3IHVuZGVybGlu ZSwgb3ZlcmxpbmUsIHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgbWNfbnNfZHJhd190ZXh0X2Rl Y29yYXRpb24gKHMsIHMtPmZhY2UsIGNvbCwgcy0+d2lkdGgsIHMtPngpOworICAgICAgaWYgKHMt PmZpcnN0X2dseXBoLT50eXBlICE9IENPTVBPU0lURV9HTFlQSAorICAgICAgICAgICYmIChzLT5s ZWZ0X292ZXJ3cml0dGVuX3AgfHwgcy0+cmlnaHRfb3ZlcndyaXR0ZW5fcCkKKyAgICAgICAgICAm JiAocy0+YmFja2dyb3VuZF9udWtlZF9wIHx8IHMtPnJlY3RhbmdsZV9udWtlZF9wKQorICAgICAg ICAgICYmIChzLT5hY3Rpb25fdHlwZSA9PSBNQ19EUkFXX0dMWVBIX1NUUklORyB8fCBzLT5hY3Rp b25fdHlwZSA9PSBNQ19FUkFTRV9HTFlQSF9TVFJJTkcpKQorICAgICAgICBtY19uc19kcmF3X292 ZXJ3cml0dGVuIChzLCBtYXRyaXgsIHJvdywgbWNfbWF0cml4LCBzLT5maXJzdF9nbHlwaCk7Cisg ICAgICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9 PSBNQ19GSUxMRURfQk9YKQorICAgICAgICB7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyB0bXAg PSBOU19GQUNFX0JBQ0tHUk9VTkQgKHMtPmZhY2UpOworICAgICAgICAgIE5TX0ZBQ0VfQkFDS0dS T1VORCAocy0+ZmFjZSkgPSBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpOworICAgICAgICAg IE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSB0bXA7CisgICAgICAgIH0KKyAgICAgICAg ZWxzZSBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAgICAgICAgJiYgY3Vyc29y X3R5cGUgPT0gTUNfRlJBTUVEX0JPWCkKKyAgICAgICAgICBOU19GQUNFX0ZPUkVHUk9VTkQgKHMt PmZhY2UpID0gc2F2ZWRfZmc7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAg ICBicmVhazsKKyAgICBjYXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAgIG4gPSBuc19nZXRfZ2x5 cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAo cy0+ZiwgciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMK KyAgICAgICAgICB8fCAocy0+Y21wX2Zyb20gPiAwCisgICAgICAgICAgICAgICYmICEgcy0+Zmly c3RfZ2x5cGgtPnUuY21wLmF1dG9tYXRpYykpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVk X3AgPSAxOworICAgICAgZWxzZQorICAgICAgICBtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tn cm91bmQgKHMsIHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCk7CisgICAg ICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0Ogor ICAgICAgZW1hY3NfYWJvcnQgKCk7CisgICAgfQorICAvKiBEcmF3IGJveCBpZiBub3QgZG9uZSBh bHJlYWR5LiAqLworICBpZiAoIXMtPmZvcl9vdmVybGFwcworICAgICAgJiYgIWJveF9kcmF3bl9w CisgICAgICAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gpCisgICAgeworICAgICAgbiA9 IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICghbnNfY2xp cF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgbnNfZHVtcGds eXBoc19ib3hfb3JfcmVsaWVmIChzKTsKKyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsK KyAgICB9CisgIHMtPm51bV9jbGlwcyA9IDA7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JT ICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiA9PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQog CiAgICBOU1RSQUNFLCBUcmFjZSBzdXBwb3J0LgpAQCAtMTA3OSw2ICsyMDQ5LDE2IEBAIHN0YXRp YyBOU1JlY3QgY29uc3RyYWluX2ZyYW1lX3JlY3QoTlNSZWN0IGZyYW1lUmVjdCwgYm9vbCBpc0Z1 bGxzY3JlZW4pCiAgICBleHRlcm5hbCAoUklGKSBjYWxsOyB3aG9sZSBmcmFtZSwgY2FsbGVkIGJl Zm9yZSBndWlfdXBkYXRlX3dpbmRvd19iZWdpbgogICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KIHsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICBmLT5tY191cGRhdGluZ19mcmFtZSA9IGY7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICNpZmRlZiBOU19JTVBMX0NPQ09BCiAgIEVtYWNzVmlldyAqdmlldyA9IEZSQU1FX05TX1ZJ RVcgKGYpOwogCkBAIC0xMTA5LDYgKzIwODksMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5f ZnJhbWVfcmVjdChOU1JlY3QgZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKIAogLyogICBp ZiAoZiA9PSBNT1VTRV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9tb3VzZV9mcmFtZSkgKi8KICAg TU9VU0VfSExfSU5GTyAoZiktPm1vdXNlX2ZhY2VfZGVmZXIgPSAwOworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5n X2ZyYW1lID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAg LTQ3NTksNiArNTc0OSwxNyBAQCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMgKHJhcGlkIGluY29taW5n IGV2ZW50cykuCiAgICAgICBiYXIgPSBbW0VtYWNzU2Nyb2xsZXIgYWxsb2NdIGluaXRGcmFtZTog ciB3aW5kb3c6IHdpbl07CiAgICAgICB3c2V0X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHdpbmRvdywg bWFrZV9taW50X3B0ciAoYmFyKSk7CiAgICAgICB1cGRhdGVfcCA9IFlFUzsKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgLyogVGhp cyBpcyBvbmx5IGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMuICovCisgICAgICBbYmFyIG1jX3NldF9y ZWN0YW5nbGU6IHJdOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgfQogICBl bHNlCiAgICAgewpAQCAtNDc2NiwxMiArNTc2NywzMCBAQCBpbiBjZXJ0YWluIHNpdHVhdGlvbnMg KHJhcGlkIGluY29taW5nIGV2ZW50cykuCiAgICAgICBiYXIgPSBYTlNfU0NST0xMX0JBUiAod2lu ZG93LT52ZXJ0aWNhbF9zY3JvbGxfYmFyKTsKICAgICAgIG9sZFJlY3QgPSBbYmFyIGZyYW1lXTsK ICAgICAgIHIuc2l6ZS53aWR0aCA9IG9sZFJlY3Quc2l6ZS53aWR0aDsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAgICAgaWYgKEZSQU1F X0xJVkVfUCAoZikgJiYgIU5TRXF1YWxSZWN0cyAob2xkUmVjdCwgcikpCiAgICAgICAgIHsKKyAg ICAgICAgICAvKiBUaGUgbWFpbiB3aW5kb3cgaGFzIHByb2JhYmx5IGJlZW4gcmVzaXplZC4gIEdy YWNpb3VzbHkgZGVsZXRlIHRoZQorICAgICAgICAgIG9sZCBzY3JvbGwgYmFyIHdpdGhvdXQgcmVw YWludGluZyBpdHMgcmVjdGFuZ2xlOyBhbmQsIGNyZWF0ZSBhIG5ldworICAgICAgICAgIHNjcm9s bCBiYXIgZWxzZXdoZXJlLiovCiAgICAgICAgICAgaWYgKG9sZFJlY3Qub3JpZ2luLnggIT0gci5v cmlnaW4ueCkKKyAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgbnNfY2xlYXJfZnJhbWVfYXJl YSAoZiwgbGVmdCwgdG9wLCB3aWR0aCwgaGVpZ2h0KTsKKyAgICAgICAgICAgICAgW2JhciBtY19q dWRnZV07CisgICAgICAgICAgICAgIGJhciA9IFtbRW1hY3NTY3JvbGxlciBhbGxvY10gaW5pdEZy YW1lOiByIHdpbmRvdzogd2luXTsKKyAgICAgICAgICAgICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxf YmFyICh3aW5kb3csIG1ha2VfbWludF9wdHIgKGJhcikpOworICAgICAgICAgICAgfQorICAgICAg ICAgICAgZWxzZQogICAgICAgICAgIFtiYXIgc2V0RnJhbWU6IHJdOwogICAgICAgICB9CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB9CiAKICAgaWYgKHVwZGF0ZV9wKQpAQCAt NDkzMSw5ICs1OTUwLDU3IEBAIGluIGNlcnRhaW4gc2l0dWF0aW9ucyAocmFwaWQgaW5jb21pbmcg ZXZlbnRzKS4KICAgICB7CiAgICAgICB2aWV3ID0gW3N1YnZpZXdzIG9iamVjdEF0SW5kZXg6IGld OwogICAgICAgaWYgKCFbdmlldyBpc0tpbmRPZkNsYXNzOiBbRW1hY3NTY3JvbGxlciBjbGFzc11d KSBjb250aW51ZTsKLSAgICAgIGlmIChbdmlldyBqdWRnZV0pCisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogYFhTRVRXSU5ET1cnIHdp bGwgc29tZXRpbWVzIGNhdXNlIEVtYWNzIHRvIGNyYXNoIHdoZW4gcnVubmluZyB1bmRlciBnZGIg ZXZlbgorICB0aG91Z2ggKHcgIT0gTlVMTCkuICBUaGVyZWZvcmUsIHdlIGNhbm5vdCByZWxpYWJs eSB1c2UgYFdJTkRPV19MSVZFX1AnLiAqLworICBzdHJ1Y3Qgd2luZG93ICp3ID0gW3ZpZXcgbWNf Z2V0X3dpbmRvd107CisgIGlmICh3ICE9IE5VTEwKKyAgICAgICYmIE5JTFAgKHctPmNvbnRlbnRz KSkKKyAgICB7CisgICAgICBCT09MIGRlYnVnX3AgPSBmYWxzZTsKKyAgICAgIGlmIChkZWJ1Z19w CisgICAgICAgICAgLyogYHdpbmRvd19ib3gnIGNhbGxzIGB3aW5kb3dfYm94X2hlaWdodCcsIHdo aWNoIHdpbGwgY2F1c2UgRW1hY3MgdG8KKyAgICAgICAgICBjcmFzaCBpZiBGUkFNRVAgKHctPmZy YW1lKSBpcyBub3Qgc2F0aXNmaWVkLiAqLworICAgICAgICAgICYmIEZSQU1FUCAody0+ZnJhbWUp KQorICAgICAgICB7CisgICAgICAgICAgTlNSZWN0IHIwID0gW3ZpZXcgbWNfZ2V0X3JlY3Rhbmds ZV07CisgICAgICAgICAgaW50IHgwID0gTlNNaW5YIChyMCk7CisgICAgICAgICAgaW50IHkwID0g TlNNaW5ZIChyMCk7CisgICAgICAgICAgaW50IHdkMCA9IE5TV2lkdGggKHIwKTsKKyAgICAgICAg ICBpbnQgaDAgPSBOU0hlaWdodCAocjApOworICAgICAgICAgIGludCB3aW5kb3dfeSwgd2luZG93 X2hlaWdodDsKKyAgICAgICAgICB3aW5kb3dfYm94ICh3LCBBTllfQVJFQSwgMCwgJndpbmRvd195 LCAwLCAmd2luZG93X2hlaWdodCk7CisgICAgICAgICAgaW50IHRvcCA9IHdpbmRvd195OworICAg ICAgICAgIGludCBoZWlnaHQgPSB3aW5kb3dfaGVpZ2h0OworICAgICAgICAgIGludCB3aWR0aCA9 IFdJTkRPV19DT05GSUdfU0NST0xMX0JBUl9DT0xTICh3KSAqIEZSQU1FX0NPTFVNTl9XSURUSCAo Zik7CisgICAgICAgICAgaW50IGxlZnQgPSBXSU5ET1dfU0NST0xMX0JBUl9BUkVBX1ggKHcpOwor ICAgICAgICAgIE5TUmVjdCByMSA9IE5TTWFrZVJlY3QgKGxlZnQsIHRvcCwgd2lkdGgsIGhlaWdo dCk7CisgICAgICAgICAgLyogVGhlIHBhcmVudCB2aWV3IGlzIGZsaXBwZWQsIHNvIHdlIG5lZWQg dG8gZmxpcCB5IHZhbHVlLiAqLworICAgICAgICAgIEVtYWNzVmlldyAqZnJhbWVfdmlldyA9IEZS QU1FX05TX1ZJRVcgKGYpOworICAgICAgICAgIE5TUmVjdCB2ID0gW2ZyYW1lX3ZpZXcgZnJhbWVd OworICAgICAgICAgIHIxLm9yaWdpbi55ID0gKHYuc2l6ZS5oZWlnaHQgLSByMS5zaXplLmhlaWdo dCAtIHIxLm9yaWdpbi55KTsKKyAgICAgICAgICBpbnQgeDEgPSBOU01pblggKHIxKTsKKyAgICAg ICAgICBpbnQgeTEgPSBOU01pblkgKHIxKTsKKyAgICAgICAgICBpbnQgd2QxID0gTlNXaWR0aCAo cjEpOworICAgICAgICAgIGludCBoMSA9IE5TSGVpZ2h0IChyMSk7CisgICAgICAgICAgZnByaW50 ZiAoc3RkZXJyLCAiJXMgLS0gREVBRDpcblwKKyAgICAgICAgICB4MC94MSAoJWQvJWQpIHwgeTAv eTEgKCVkLyVkKSB8IHdkMC93ZDEgKCVkLyVkKSB8IGgwL2gxICglZC8lZClcbiIsCisgICAgICAg ICAgbWNfd2luZG93ICh3KSwgeDAsIHgxLCB5MCwgeTEsIHdkMCwgd2QxLCBoMCwgaDEpOworICAg ICAgICB9CisgICAgICBpZiAoW3ZpZXcgbWNfanVkZ2VdKQogICAgICAgICByZW1vdmVkID0gWUVT OwogICAgIH0KKyAgICBlbHNlIGlmIChbdmlldyBqdWRnZV0pCisgICAgICByZW1vdmVkID0gWUVT OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCisgICAgfQogCiAgIGlmIChyZW1vdmVk KQogICAgIFtldmlldyB1cGRhdGVGcmFtZVNpemU6IE5PXTsKQEAgLTUwNzQsNiArNjE0MSwyMCBA QCBzdGF0aWMgTGlzcF9PYmplY3QgbnNfc3RyaW5nX3RvX2xpc3Btb2QgKGNvbnN0IGNoYXIgKnMp CiBleHRlcm4gZnJhbWVfcGFybV9oYW5kbGVyIG5zX2ZyYW1lX3Bhcm1faGFuZGxlcnNbXTsKIHN0 YXRpYyBzdHJ1Y3QgcmVkaXNwbGF5X2ludGVyZmFjZSBuc19yZWRpc3BsYXlfaW50ZXJmYWNlID0K IHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworLyogYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGBuc3Rlcm0ubWAgbXVzdCBiZSBpbiB0aGUg ZXhhY3Qgc2FtZSBvcmRlciBhcyB0aGUKK2ByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4 dGVybi5oYCEgKi8KKworICBtY19uc19kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1jX25zX2RyYXdf Z2x5cGhfc3RyaW5nLAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIG5zX2ZyYW1l X3Bhcm1faGFuZGxlcnMsCiAgIGd1aV9wcm9kdWNlX2dseXBocywKICAgZ3VpX3dyaXRlX2dseXBo cywKQEAgLTg3MTEsNiArOTc5Miw0OSBAQCAtIChCT09MKWNhbkJlY29tZU1haW5XaW5kb3cKIAog QGltcGxlbWVudGF0aW9uIEVtYWNzU2Nyb2xsZXIKIAorCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLSAodm9pZCltY19zZXRfcmVjdGFuZ2xlOiAo TlNSZWN0KXJlY3QKK3sKKyAgbWNfcmVjdGFuZ2xlID0gcmVjdDsKK30KKworLSAoTlNSZWN0KW1j X2dldF9yZWN0YW5nbGUKK3sKKyAgcmV0dXJuIG1jX3JlY3RhbmdsZTsKK30KKworLSAoc3RydWN0 IHdpbmRvdyAqKW1jX2dldF93aW5kb3cKK3sKKyAgcmV0dXJuIHdpbmRvdzsKK30KKworLSAoYm9v bCltY19qdWRnZQoreworICBOU1RSQUNFICgiW0VtYWNzU2Nyb2xsZXIgbWNfanVkZ2VdIik7Cisg IGJvb2wgcmV0ID0gY29uZGVtbmVkOworICBibG9ja19pbnB1dCAoKTsKKyAgaWYgKGNvbmRlbW5l ZCkKKyAgICB7CisgICAgICAvKiBlbnN1cmUgb3RoZXIgc2Nyb2xsYmFyIHVwZGF0ZXMgYWZ0ZXIg ZGVsZXRpb24gKi8KKyAgICAgIEVtYWNzVmlldyAqdmlldyA9IChFbWFjc1ZpZXcgKilGUkFNRV9O U19WSUVXIChmcmFtZSk7CisgICAgICBpZiAodmlldyAhPSBuaWwpCisgICAgICAgIHZpZXctPnNj cm9sbGJhcnNOZWVkaW5nVXBkYXRlKys7CisgICAgfQorICBpZiAod2luZG93KQorICAgIHdzZXRf dmVydGljYWxfc2Nyb2xsX2JhciAod2luZG93LCBRbmlsKTsKKyAgd2luZG93ID0gMDsKKyAgW3Nl bGYgcmVtb3ZlRnJvbVN1cGVydmlld1dpdGhvdXROZWVkaW5nRGlzcGxheV07CisgIFtzZWxmIHJl bGVhc2VdOworICB1bmJsb2NrX2lucHV0ICgpOworICByZXR1cm4gcmV0OworfQorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAvKiBmb3IgcmVwZWF0IGJ1dHRvbiBwdXNoICovCiAjZGVm aW5lIFNDUk9MTF9CQVJfRklSU1RfREVMQVkgMC41CiAjZGVmaW5lIFNDUk9MTF9CQVJfQ09OVElO VU9VU19ERUxBWSAoMS4wIC8gMTUpCmRpZmYgLS1naXQgYS9zcmMvdzMydGVybS5jIGIvc3JjL3cz MnRlcm0uYwppbmRleCBjNmUxNzVlLi5mYTExNWMwIDEwMDY0NAotLS0gYS9zcmMvdzMydGVybS5j CisrKyBiL3NyYy93MzJ0ZXJtLmMKQEAgLTYyLDYgKzYyLDExNjggQEAgYWxvbmcgd2l0aCBHTlUg RW1hY3MuICBJZiBub3QsIHNlZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LiAgKi8K ICNpbmNsdWRlICJiaXRtYXBzL2dyYXkueGJtIgogI2VuZGlmCiAMCisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK3R5cGVkZWYgc3Ry dWN0IHsKKyAgdW5zaWduZWQgbG9uZyBwaXhlbDsKKyAgdW5zaWduZWQgc2hvcnQgcmVkLCBncmVl biwgYmx1ZTsKKyAgY2hhciBmbGFnczsKKyAgY2hhciBwYWQ7Cit9IG1jX1hDb2xvcjsKKworI2lm ZGVmIEdMWVBIX0RFQlVHCitzdGF0aWMgdm9pZCB3MzJfY2hlY2tfZm9udCAoc3RydWN0I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y3QKK21jX3hfdG9fdzMyX2NvbG9yIChjb25zdCBjaGFyICogY29sb3JuYW1lKQoreworICByZWdp c3RlciBMaXNwX09iamVjdCByZXQgPSBRbmlsOworICBibG9ja19pbnB1dCAoKTsKKyAgaWYgKGNv bG9ybmFtZVswXSA9PSAnIycpCisgICAgeworICAgICAgLyogQ291bGQgYmUgYW4gb2xkLXN0eWxl IFJHQiBEZXZpY2Ugc3BlY2lmaWNhdGlvbi4gKi8KKyAgICAgIGludCBzaXplID0gc3RybGVuIChj b2xvcm5hbWUgKyAxKTsKKyAgICAgIGNoYXIgKmNvbG9yID0gYWxsb2NhIChzaXplICsgMSk7Cisg ICAgICBzdHJjcHkgKGNvbG9yLCBjb2xvcm5hbWUgKyAxKTsKKyAgICAgIGlmIChzaXplID09IDMg fHwgc2l6ZSA9PSA2IHx8IHNpemUgPT0gOSB8fCBzaXplID09IDEyKQorICAgICAgICB7CisgICAg ICAgICAgVUlOVCBjb2xvcnZhbDsKKyAgICAgICAgICBpbnQgaSwgcG9zOworICAgICAgICAgIHBv cyA9IDA7CisgICAgICAgICAgc2l6ZSAvPSAzOworICAgICAgICAgIGNvbG9ydmFsID0gMDsKKyAg ICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMzsgaSsrKQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBjaGFyICplbmQ7CisgICAgICAgICAgICAgIGNoYXIgdDsKKyAgICAgICAgICAgICAgdW5z aWduZWQgbG9uZyB2YWx1ZTsKKyAgICAgICAgICAgICAgLyogVGhlIGNoZWNrIGZvciAneCcgaW4g dGhlIGZvbGxvd2luZyBjb25kaXRpb25hbCB0YWtlcyBpbnRvCisgICAgICAgICAgICAgIGFjY291 bnQgdGhlIGZhY3QgdGhhdCBzdHJ0b2wgYWxsb3dzIGEgIjB4IiBpbiBmcm9udCBvZgorICAgICAg ICAgICAgICBvdXIgbnVtYmVycywgYW5kIHdlIGRvbid0LiAqLworICAgICAgICAgICAgICBpZiAo IWlzeGRpZ2l0IChjb2xvclswXSkgfHwgY29sb3JbMV0gPT0gJ3gnKQorICAgICAgICAgICAgICAg IGJyZWFrOworICAgICAgICAgICAgICB0ID0gY29sb3Jbc2l6ZV07CisgICAgICAgICAgICAgIGNv bG9yW3NpemVdID0gJ1wwJzsKKyAgICAgICAgICAgICAgdmFsdWUgPSBzdHJ0b3VsIChjb2xvciwg JmVuZCwgMTYpOworICAgICAgICAgICAgICBjb2xvcltzaXplXSA9IHQ7CisgICAgICAgICAgICAg IGlmIChlcnJubyA9PSBFUkFOR0UgfHwgZW5kIC0gY29sb3IgIT0gc2l6ZSkKKyAgICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgICAgc3dpdGNoIChzaXplKQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICBjYXNlIDE6CisgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZh bHVlICogMHgxMDsKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNh c2UgMjoKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMzoK KyAgICAgICAgICAgICAgICAgIHZhbHVlIC89IDB4MTA7CisgICAgICAgICAgICAgICAgICBicmVh azsKKyAgICAgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAgICAgICB2YWx1ZSAvPSAw eDEwMDsKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgY29sb3J2YWwgfD0gKHZhbHVlIDw8IHBvcyk7CisgICAgICAgICAgICAgIHBvcyAr PSAweDg7CisgICAgICAgICAgICAgIGlmIChpID09IDIpCisgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgICAgIFhTRVRJ TlQgKHJldCwgY29sb3J2YWwpOworICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldDsKKyAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgIGNvbG9yID0gZW5kOworICAgICAgICAgICAgfQor ICAgICAgICB9CisgICAgfQorICBlbHNlIGlmIChzdHJuaWNtcCAoY29sb3JuYW1lLCAicmdiOiIs IDQpID09IDApCisgICAgeworICAgICAgY29uc3QgY2hhciAqY29sb3I7CisgICAgICBVSU5UIGNv bG9ydmFsOworICAgICAgaW50IGksIHBvczsKKyAgICAgIHBvcyA9IDA7CisgICAgICBjb2xvcnZh bCA9IDA7CisgICAgICBjb2xvciA9IGNvbG9ybmFtZSArIDQ7CisgICAgICBmb3IgKGkgPSAwOyBp IDwgMzsgaSsrKQorICAgICAgICB7CisgICAgICAgICAgY2hhciAqZW5kOworICAgICAgICAgIHVu c2lnbmVkIGxvbmcgdmFsdWU7CisgICAgICAgICAgLyogVGhlIGNoZWNrIGZvciAneCcgaW4gdGhl IGZvbGxvd2luZyBjb25kaXRpb25hbCB0YWtlcyBpbnRvCisgICAgICAgICAgICAgYWNjb3VudCB0 aGUgZmFjdCB0aGF0IHN0cnRvbCBhbGxvd3MgYSAiMHgiIGluIGZyb250IG9mCisgICAgICAgICAg ICAgb3VyIG51bWJlcnMsIGFuZCB3ZSBkb24ndC4gKi8KKyAgICAgICAgICBpZiAoIWlzeGRpZ2l0 IChjb2xvclswXSkgfHwgY29sb3JbMV0gPT0gJ3gnKQorICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgdmFsdWUgPSBzdHJ0b3VsIChjb2xvciwgJmVuZCwgMTYpOworICAgICAgICAgIGlmIChl cnJubyA9PSBFUkFOR0UpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICBzd2l0Y2ggKGVu ZCAtIGNvbG9yKQorICAgICAgICAgICAgeworICAgICAgICAgICAgY2FzZSAxOgorICAgICAgICAg ICAgICB2YWx1ZSA9IHZhbHVlICogMHgxMCArIHZhbHVlOworICAgICAgICAgICAgICBicmVhazsK KyAgICAgICAgICAgIGNhc2UgMjoKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBj YXNlIDM6CisgICAgICAgICAgICAgIHZhbHVlIC89IDB4MTA7CisgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgY2FzZSA0OgorICAgICAgICAgICAgICB2YWx1ZSAvPSAweDEwMDsKKyAg ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICB2 YWx1ZSA9IFVMT05HX01BWDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBpZiAodmFsdWUgPT0g VUxPTkdfTUFYKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgY29sb3J2YWwgfD0gKHZh bHVlIDw8IHBvcyk7CisgICAgICAgICAgcG9zICs9IDB4ODsKKyAgICAgICAgICBpZiAoaSA9PSAy KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoKmVuZCAhPSAnXDAnKQorICAgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAg ICAgICAgICBYU0VUSU5UIChyZXQsIGNvbG9ydmFsKTsKKyAgICAgICAgICAgICAgcmV0dXJuIHJl dDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBpZiAoKmVuZCAhPSAnLycpCisgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICBjb2xvciA9IGVuZCArIDE7CisgICAgICAgIH0KKyAgICB9Cisg ICAgZWxzZSBpZiAoc3RybmljbXAgKGNvbG9ybmFtZSwgInJnYmk6IiwgNSkgPT0gMCkKKyAgICAg IHsKKyAgICAgICAgLyogVGhpcyBpcyBhbiBSR0IgSW50ZW5zaXR5IHNwZWNpZmljYXRpb24uICov CisgICAgICAgIGNvbnN0IGNoYXIgKmNvbG9yOworICAgICAgICBVSU5UIGNvbG9ydmFsOworICAg ICAgICBpbnQgaSwgcG9zOworICAgICAgICBwb3MgPSAwOworICAgICAgICBjb2xvcnZhbCA9IDA7 CisgICAgICAgIGNvbG9yID0gY29sb3JuYW1lICsgNTsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8 IDM7IGkrKykKKyAgICAgICAgICB7CisgICAgICAgICAgICBjaGFyICplbmQ7CisgICAgICAgICAg ICBkb3VibGUgdmFsdWU7CisgICAgICAgICAgICBVSU5UIHZhbDsKKyAgICAgICAgICAgIHZhbHVl ID0gc3RydG9kIChjb2xvciwgJmVuZCk7CisgICAgICAgICAgICBpZiAoZXJybm8gPT0gRVJBTkdF KQorICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGlmICh2YWx1ZSA8IDAuMCB8fCB2 YWx1ZSA+IDEuMCkKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB2YWwgPSAoVUlO VCkoMHgxMDAgKiB2YWx1ZSk7CisgICAgICAgICAgICAvKiBXZSB1c2VkIDB4MTAwIGluc3RlYWQg b2YgMHhGRiB0byBnaXZlIGEgY29udGludW91cworICAgICAgICAgICAgICAgcmFuZ2UgYmV0d2Vl biAwLjAgYW5kIDEuMCBpbmNsdXNpdmUuICBUaGUgbmV4dCBzdGF0ZW1lbnQKKyAgICAgICAgICAg ICAgIGZpeGVzIHRoZSAxLjAgY2FzZS4gKi8KKyAgICAgICAgICAgIGlmICh2YWwgPT0gMHgxMDAp CisgICAgICAgICAgICAgIHZhbCA9IDB4RkY7CisgICAgICAgICAgICBjb2xvcnZhbCB8PSAodmFs IDw8IHBvcyk7CisgICAgICAgICAgICBwb3MgKz0gMHg4OworICAgICAgICAgICAgaWYgKGkgPT0g MikKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmICgqZW5kICE9ICdcMCcpCisg ICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgp OworICAgICAgICAgICAgICAgIFhTRVRJTlQgKHJldCwgY29sb3J2YWwpOworICAgICAgICAgICAg ICAgIHJldHVybiByZXQ7CisgICAgICAgICAgICAgIH0KKy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ID4gYXBwcm94ICYmIGlzZGlnaXQgKCpwdHIpKQorICAgICAgICAgICAgKnB0 ci0tID0gJ1wwJzsKKyAgICAgICAgICByZXQgPSBtY193MzJfY29sb3JfbWFwX2xvb2t1cCAoYXBw cm94KTsKKyAgICAgICAgfQorICAgIH0KKyAgdW5ibG9ja19pbnB1dCAoKTsKKyAgcmV0dXJuIHJl dDsKK30KKworLyogRGVjaWRlIGlmIGNvbG9yIG5hbWVkIENPTE9SIGlzIHZhbGlkIGZvciB0aGUg ZGlzcGxheSBhc3NvY2lhdGVkIHdpdGgKKyAgIHRoZSBzZWxlY3RlZCBmcmFtZTsgaWYgc28sIHJl dHVybiB0aGUgcmdiIHZhbHVlcyBpbiBDT0xPUl9ERUYuCisgICBJZiBBTExPQyBpcyBub256ZXJv LCBhbGxvY2F0ZSBhIG5ldyBjb2xvcm1hcCBjZWxsLiAqLworaW50CittY193MzJfZGVmaW5lZF9j b2xvciAoc3RydWN0IGZyYW1lICpmLCBjb25zdCBjaGFyICpjb2xvciwgbWNfWENvbG9yICpjb2xv cl9kZWYsIGJvb2wgYWxsb2NfcCkKK3sKKyAgcmVnaXN0ZXIgTGlzcF9PYmplY3QgdGVtOworICBD T0xPUlJFRiB3MzJfY29sb3JfcmVmOworICB0ZW0gPSBtY194X3RvX3czMl9jb2xvciAoY29sb3Ip OworICBpZiAoIU5JTFAgKHRlbSkpCisgICAgeworICAgICAgaWYgKGYpCisgICAgICAgIHsKKyAg ICAgICAgICAvKiBBcHBseSBnYW1tYSBjb3JyZWN0aW9uLiAqLworICAgICAgICAgIHczMl9jb2xv cl9yZWYgPSBYVUZJWE5VTV9SQVcgKHRlbSk7CisgICAgICAgICAgZ2FtbWFfY29ycmVjdCAoZiwg JnczMl9jb2xvcl9yZWYpOworICAgICAgICAgIFhTRVRJTlQgKHRlbSwgdzMyX2NvbG9yX3JlZik7 CisgICAgICAgIH0KKyAgICAgIC8qIE1hcCB0aGlzIGNvbG9yIHRvIHRoZSBwYWxldHRlIGlmIGl0 IGlzIGVuYWJsZWQuICovCisgICAgICBpZiAoIU5JTFAgKFZ3MzJfZW5hYmxlX3BhbGV0dGUpKQor ICAgICAgICB7CisgICAgICAgICAgc3RydWN0IHczMl9wYWxldHRlX2VudHJ5ICogZW50cnkgPSBv bmVfdzMyX2Rpc3BsYXlfaW5mby5jb2xvcl9saXN0OworICAgICAgICAgIHN0cnVjdCB3MzJfcGFs ZXR0ZV9lbnRyeSAqKiBwcmV2ID0gJm9uZV93MzJfZGlzcGxheV9pbmZvLmNvbG9yX2xpc3Q7Cisg ICAgICAgICAgLyogY2hlY2sgaWYgY29sb3IgaXMgYWxyZWFkeSBtYXBwZWQgKi8KKyAgICAgICAg ICB3aGlsZSAoZW50cnkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChNQ19XMzJf Q09MT1IgKGVudHJ5LT5lbnRyeSkgPT0gWFVGSVhOVU1fUkFXICh0ZW0pKQorICAgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgICBwcmV2ID0gJmVudHJ5LT5uZXh0OworICAgICAgICAg ICAgICBlbnRyeSA9IGVudHJ5LT5uZXh0OworICAgICAgICAgICAgfQorICAgICAgICAgIGlmIChl bnRyeSA9PSBOVUxMICYmIGFsbG9jX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8q IG5vdCBhbHJlYWR5IG1hcHBlZCwgc28gYWRkIHRvIGxpc3QgKi8KKyAgICAgICAgICAgICAgZW50 cnkgPSB4bWFsbG9jIChzaXplb2YgKHN0cnVjdCB3MzJfcGFsZXR0ZV9lbnRyeSkpOworICAgICAg ICAgICAgICBNQ19XMzJfU0VUX0NPTE9SIChlbnRyeS0+ZW50cnksIFhVRklYTlVNX1JBVyAodGVt KSk7CisgICAgICAgICAgICAgIGVudHJ5LT5uZXh0ID0gTlVMTDsKKyAgICAgICAgICAgICAgKnBy ZXYgPSBlbnRyeTsKKyAgICAgICAgICAgICAgb25lX3czMl9kaXNwbGF5X2luZ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vciBhcyB3aWRlIGFzIHRoZQor ICAgICAgc3RyZXRjaCBnbHlwaC4gKi8KKyAgICAgIGludCB3aWR0aCwgYmFja2dyb3VuZF93aWR0 aCA9IHMtPmJhY2tncm91bmRfd2lkdGg7CisgICAgICBpbnQgeCA9IHMtPng7CisgICAgICBpZiAo IXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIGludCBsZWZ0X3ggPSB3 aW5kb3dfYm94X2xlZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAgIGlmICh4 IDwgbGVmdF94KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRo IC09IGxlZnRfeCAtIHg7CisgICAgICAgICAgICAgIHggPSBsZWZ0X3g7CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgeworICAgICAgICAgICAvKiBJbiBS Mkwgcm93cywgZHJhdyB0aGUgY3Vyc29yIG9uIHRoZSByaWdodCBlZGdlIG9mIHRoZQorICAgICAg ICAgICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgICAgICBpbnQgcmlnaHRfeCA9IHdpbmRv d19ib3hfcmlnaHQgKHMtPncsIFRFWFRfQVJFQSk7CisgICAgICAgICAgIGlmICh4ICsgYmFja2dy b3VuZF93aWR0aCA+IHJpZ2h0X3gpCisgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAtPSB4 IC0gcmlnaHRfeDsKKyAgICAgICAgICAgeCArPSBiYWNrZ3JvdW5kX3dpZHRoOworICAgICAgICAg fQorICAgICAgd2lkdGggPSBtaW4gKEZSQU1FX0NPTFVNTl9XSURUSCAocy0+ZiksIGJhY2tncm91 bmRfd2lkdGgpOworICAgICAgaWYgKHMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeCAtPSB3 aWR0aDsKKyAgICAgIC8qIERyYXcgY3Vyc29yLiAqLworICAgICAgdzMyX2RyYXdfZ2x5cGhfc3Ry aW5nX2JnX3JlY3QgKHMsIHgsIHMtPnksIHdpZHRoLCBzLT5oZWlnaHQpOworICAgICAgLyogQ2xl YXIgcmVzdCB1c2luZyB0aGUgR0Mgb2YgdGhlIG9yaWdpbmFsIG5vbi1jdXJzb3IgZmFjZS4gKi8K KyAgICAgIGlmICh3aWR0aCA8IGJhY2tncm91bmRfd2lkdGgpCisgICAgICAgIHsKKyAgICAgICAg ICBFbWFjc19HQyAqZ2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgICAgICBpbnQgeSA9IHMtPnk7Cisg ICAgICAgICAgaW50IHcgPSBiYWNrZ3JvdW5kX3dpZHRoIC0gd2lkdGgsIGggPSBzLT5oZWlnaHQ7 CisgICAgICAgICAgUkVDVCByOworICAgICAgICAgIEhEQyBoZGMgPSBzLT5oZGM7CisgICAgICAg ICAgaWYgKCFzLT5yb3ctPnJldmVyc2VkX3ApCisgICAgICAgICAgICB4ICs9IHdpZHRoOworICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB4ID0gcy0+eDsKKyAgICAgICAgICBpZiAocy0+ cm93LT5tb3VzZV9mYWNlX3AKKyAgICAgICAgICAgICAgJiYgY3Vyc29yX2luX21vdXNlX2ZhY2Vf cCAocy0+dykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHczMl9zZXRfbW91c2VfZmFj ZV9nYyAocyk7CisgICAgICAgICAgICAgIGdjID0gcy0+Z2M7CisgICAgICAgICAgICB9CisgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICAgICAg Z2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsICZyKTsKKyAgICAgICAgICB3MzJfc2V0X2Ns aXBfcmVjdGFuZ2xlIChoZGMsICZyKTsKKyNpZiAwIC8qIFRPRE86IHN0aXBwbGUgKi8KKyAgICAg ICAgICBpZiAocy0+ZmFjZS0+c3RpcHBsZSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg LyogRmlsbCBiYWNrZ3JvdW5kIHdpdGggYSBzdGlwcGxlIHBhdHRlcm4uICovCisgICAgICAgICAg ICAgIFhTZXRGaWxsU3R5bGUgKHMtPmRpc3BsYXksIGdjLCBGaWxsT3BhcXVlU3RpcHBsZWQpOwor ICAgICAgICAgICAgICBYRmlsbFJlY3RhbmdsZSAocy0+ZGlzcGxheSwgcy0+d2luZG93LCBnYywg eCwgeSwgdywgaCk7CisgICAgICAgICAgICAgIFhTZXRGaWxsU3R5bGUgKHMtPmRpc3BsYXksIGdj LCBGaWxsU29saWQpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorI2VuZGlmCisg ICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5o ZGMsIGdjLT5iYWNrZ3JvdW5kLCB4LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAgfQorICAgICAg ICB9CisgICAgfQorICAgIGVsc2UgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQorICAgICAg eworICAgICAgICBpbnQgYmFja2dyb3VuZF93aWR0aCA9IHMtPmJhY2tncm91bmRfd2lkdGg7Cisg ICAgICAgIGludCB4ID0gcy0+eCwgbGVmdF94ID0gd2luZG93X2JveF9sZWZ0X29mZnNldCAocy0+ dywgVEVYVF9BUkVBKTsKKyAgICAgICAgLyogRG9uJ3QgZHJhdyBpbnRvIGxlZnQgbWFyZ2luLCBm cmluZ2Ugb3Igc2Nyb2xsYmFyIGFyZWEKKyAgICAgICAgICAgZXhjZXB0IGZvciBoZWFkZXIgbGlu ZSBhbmQgbW9kZSBsaW5lLiAqLworICAgICAgICBpZiAoeCA8IGxlZnRfeCAmJiAhcy0+cm93LT5t b2RlX2xpbmVfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09 IGxlZnRfeCAtIHg7CisgICAg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9wIHRvIGEgbm9uLXplcm8gdmFsdWUgaWYg dGhlIGZhY2Ugb2YgUyBoYXMgYSBzdGlwcGxlIHBhdHRlcm4uICovCitzdGF0aWMgaW5saW5lIHZv aWQKK21jX3czMl9zZXRfZ2x5cGhfc3RyaW5nX2djIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBi b29sIGN1cnNvcl9nY19wKQoreworICBwcmVwYXJlX2ZhY2VfZm9yX2Rpc3BsYXkgKHMtPmYsIHMt PmZhY2UpOworICBpZiAocy0+aGwgPT0gRFJBV19OT1JNQUxfVEVYVCkKKyAgICB7CisgICAgICBz LT5nYyA9IHMtPmZhY2UtPmdjOworICAgICAgcy0+c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBw bGUgIT0gMDsKKyAgICB9CisgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19JTlZFUlNFX1ZJREVP KQorICAgICAgeworICAgICAgICB3MzJfc2V0X21vZGVfbGluZV9mYWNlX2djIChzKTsKKyAgICAg ICAgcy0+c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUgIT0gMDsKKyAgICAgIH0KKyAgICAg IGVsc2UgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgICAgICB7CisgICAgICAgICAgbWNf dzMyX3NldF9jdXJzb3JfZ2MgKHMsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICBzLT5zdGlwcGxl ZF9wID0gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19N T1VTRV9GQUNFKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHczMl9zZXRfbW91c2VfZmFjZV9n YyAocyk7CisgICAgICAgICAgICBzLT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAw OworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0lNQUdFX1JB SVNFRAorICAgICAgICAgICAgICAgICAgIHx8IHMtPmhsID09IERSQVdfSU1BR0VfU1VOS0VOKQor ICAgICAgICAgICAgeworICAgICAgICAgICAgICBzLT5nYyA9IHMtPmZhY2UtPmdjOworICAgICAg ICAgICAgICBzLT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAwOworICAgICAgICAg ICAgfQorICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBlbWFjc19hYm9ydCAoKTsKKyAg LyogR0MgbXVzdCBoYXZlIGJlZW4gc2V0LiAqLworICBlYXNzZXJ0IChzLT5nYyAhPSAwKTsKK30K KworLyogRHJhdyBhIGhvbGxvdyBib3ggY3Vyc29yIG9uIHdpbmRvdyBXIGluIGdseXBoIHJvdyBS T1cuICovCitzdGF0aWMgdm9pZAorbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdp bmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50 IGZ5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MsIGludCB2cG9zLCBpbnQg d2QsIGludCBoKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAo dykpOworICBIREMgaGRjOworICBSRUNUIHJlY3Q7CisgIEhCUlVTSCBoYiA9IENyZWF0ZVNvbGlk QnJ1c2ggKGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsKTsKKyAgLyogR2V0IHRoZSBn bHlwaCB0aGUgY3Vyc29yIGlzIG9uLiAgSWYgd2UgY2FuJ3QgdGVsbCBiZWNhdXNlCisgICAgIHRo ZSBjdXJyZW50IG1hdHJpeCBpcyBpbnZhbGlkIG9yIHN1Y2gsIGdpdmUgdXAuICovCisgIHN0cnVj dCBnbHlwaCAqY3Vyc29yX2dseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCBy b3csIGhwb3MsIHZwb3MpOworICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisgICAgeworICAg ICAgRGVsZXRlT2JqZWN0IChoYik7CisgICAgICByZXR1cm47CisgICAgfQorICBpbnQgcmwgPSBm eDsKKyAgaW50IHJ0ID0gZnk7CisgIGludCByciA9IHJsICsgd2Q7CisgIGludCByYiA9IHJ0ICsg aDsKKyAgLy8gIGZwcmludGYgKHN0ZGVyciwgIk1DX0hPTExPV19CT1g6ICBybCAoJWQpIHwgcnQg KCVkKSB8IHJyICglZCkgfCByYiAoJWQpXG4iLAorICAvLyAgICAgICAgICAgICAgICAgICBybCwg cnQsIHJyLCByYik7CisgIHJlY3QubGVmdCA9IHJsOworICByZWN0LnRvcCA9IHJ0OworICByZWN0 LnJpZ2h0ID0gcnI7CisgIHJlY3QuYm90dG9tID0gcmI7CisgIGhkYyA9IGdldF9mcmFtZV9kYyAo Zik7CisgIC8qIFNldCBjbGlwcGluZywgZHJhdyB0aGUgcmVjdGFuZ2xlLCBhbmQgcmVzZXQgY2xp cHBpbmcgYWdhaW4uICovCisgIHczMl9jbGlwX3RvX3JvdyAodywgcm93LCBURVhUX0FSRUEsIGhk Yyk7CisgIEZyYW1lUmVjdCAoaGRjLCAmcmVjdCwgaGIpOworICBEZWxldGVPYmplY3QgKGhiKTsK KyAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAoaGRjLCBOVUxMKTsKKyAgcmVsZWFzZV9mcmFtZV9k YyAoZiwgaGRjKTsKK30KKworLyogRHJhdyBhIGJhciBjdXJzb3Igb24gd2luZG93IFcgaW4gZ2x5 cGggcm93IFJPVy4gKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJhd19iYXJfY3Vyc29yIChzdHJ1 Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIHN0c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AgICAgICAgICAgIGlu dCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBvcywgaW50IHdkLCBp bnQgaCwKKyAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2N1cnNv cl90eXBlIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCwg ZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLCBib29sIG9uX3AsIGJvb2wgYWN0aXZlX3ApCit7 CisgIGlmIChvbl9wKQorICAgIHsKKyAgICAgIC8qIElmIHRoaXMgaXMgdGhlIGFjdGl2ZSBjdXJz b3IsIHdlIG5lZWQgdG8gdHJhY2sgaXQgd2l0aCB0aGUKKyAgICAgIHN5c3RlbSBjYXJldCwgc28g dGhpcmQgcGFydHkgc29mdHdhcmUgbGlrZSBzY3JlZW4gbWFnbmlmaWVycworICAgICAgYW5kIHNw ZWVjaCBzeW50aGVzaXplcnMgY2FuIGZvbGxvdyB0aGUgY3Vyc29yLiAqLworICAgICAgaWYgKGFj dGl2ZV9wKQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChX SU5ET1dfRlJBTUUgKHcpKTsKKyAgICAgICAgICBIV05EIGh3bmQgPSBGUkFNRV9XMzJfV0lORE9X IChmKTsKKyAgICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X3gKKyAgICAgICAgICAgID0gV0lORE9X X1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7CisgICAgICAgICAgLyogRklYTUU6ICBXaGF0 IHNob3VsZCB3ZSB1c2UgaW5zdGVhZCBvZiBgdy0+cGh5c19jdXJzb3JfYXNjZW50Jz8gKi8KKyAg ICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X3kKKyAgICAgICAgICAgID0gKFdJTkRPV19UT19GUkFN RV9QSVhFTF9ZICh3LCB5KQorICAgICAgICAgICAg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ICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0 aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91 bmQgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vy c29yX2dseXBoLT5jaGFycG9zID4gcmVnaW9uX2JlZworICAgICAgICAgICAgICAgICAgICAgICAm JiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPCByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3 ZWVuX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZh a2UtY3Vyc29yLWluLXJlZ2lvbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAg ICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UgPSBGQUNF X0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZV9pZCk7CisgICAg ICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFj ZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2x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5jdXJzb3JfZ2MgPSBvcmln aW5hbF9jdXJzb3JfZ2M7CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4g Ki8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3Bp eGVsOworICAgICAgICAgIG1jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJpeCwgcm93 LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICBmLT5vdXRwdXRf ZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAg fQorICAgICAgICBlbHNlIGlmIChjdXJzb3JfZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEggJiYg bHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAg ICAgeworICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53 MzItPmN1cnNvcl9waXhlbCcuICovCisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93 X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgp OworICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5h bF9jdXJzb3JfcGl4ZWw7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgLyogVGVtc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ZhY2UtPmZvcmVncm91bmQ7Cisg ICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9y ZWdpb25fZW5kX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jf Z2x5cGgtPmNoYXJwb3MgPiByZWdpb25fYmVnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBjdXJzb3JfZ2x5cGgtPmNoYXJwb3MgPCByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVn aW9uX2JldHdlZW5fZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIr LXJlYWwtZmFrZS1jdXJzb3ItaW4tcmVnaW9uLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVu X2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFj ZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVf ZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1j dXJzb3ItcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgICAgc3RydWN0 IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2 ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9 IGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICBn Y192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZS0+ Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBl bHNlIGlmIChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIp LCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0 aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAg ICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19hY3RpdmVf ZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNr Z3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kOworICAgICAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAg ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZmFj ZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBp bnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVf ZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAg ICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19pbmFjdGl2 ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMu YmFja2dyb3VuZCA9IGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kOworICAgICAgICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNv cl9nYyA9IFhDcmVhdGVHQyAoTlVMTCwgRlJBTUVfVzMyX1dJTkRPVyAoZiksIG1hc2ssICZnY192 YWx1ZXMpOworICAgICAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgLyog Rm9yY2UgYG1jX3czMl9zZXRfY3Vyc29yX2djJyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX2djJy4gKi8KKyAgICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7 CisgICAgICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgRFJB V19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29y X2djX3ApOworICAgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9IG9y aWdpbmFsX2N1cnNvcl9nYzsKKyAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAg ICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4 LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgICAgfQorICAgICAgYnJlYWs7 CisgICAgfQorICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICB7CisgICAgICBpZiAobHNsLnJl ZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAg ICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9 IGNvbG9yX3BpeGVsOworICAgICAgICAgIG1jX3czMl9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1h dHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICBm LT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsK KyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1 cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOwor ICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICB7CisgICAg ICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisg ICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgZnVuY3Rpb25hbGl0 eSBvZiBgeF9tYWtlX2djJyBpbiB3MzJmbnMuYy4gKi8KKyAgICAgICAgICBibG9ja19pbnB1dCAo KTsKKyAgICAgICAgICBFbWFjc19HQyBnY192YWx1ZXM7CisgICAgICAgICAgdW5zaWduZWQgbG9u ZyBtYXNrID0gR0NGb3JlZ3JvdW5kIHwgR0NCYWNrZ3JvdW5kOworICAgICAgICAgIGdjX3ZhbHVl cy5mb3JlZ3JvdW5kID0gRlJBTUVfQkFDS0dST1VORF9QSVhFTCAoZik7CisgICAgICAgICAgZ2Nf dmFsdWVzLmJhY2tncm91bmQgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0 YS53MzItPmN1cnNvcl9nYyA9IFhDcmVhdGVHQyAoTlVMTCwgRlJBTUVfVzMyX1dJTkRPVyAoZiks IG1hc2ssICZnY192YWx1ZXMpOworICAgICAgICAgIC8qIEZvcmNlIGBtY193MzJfc2V0X2N1cnNv cl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9nYycuICovCisgICAg ICAgICAgYm9vbCBjdXJzb3JfZ2NfcCA9IHRydWU7CisgICAgICAgICAgbWNfZHJhd19jdXJzb3Jf Z2x5cGggKHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywgbHNsLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBl LCB3ZCwgYWN0aXZlX3AsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53 MzItPmN1cnNvcl9nYyA9IG9yaWdpbmFsX2N1cnNvcl9nYzsKKyAgICAgICAgICB1bmJsb2NrX2lu cHV0ICgpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAg ICBib29sIGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICAgICAgICBtY19kcmF3X2N1cnNvcl9n bHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlw ZSwgd2QsIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNv cl9nY19wKTsKKyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19C QVI6CisgICAgeworICAgICAgaWYgKGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBs c2wuYmx1ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNr IGBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCcuICovCisgICAgICAgICAgZi0+b3V0 cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBjb2xvcl9waXhlbDsKKyAgICAgICAgICBib29s IGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY193MzJfZHJh d19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3 ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoLCBjdXJzb3Jfd2lkdGgsIE1D X0JBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1dF9k YXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9 CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19p bnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY193MzJfZHJhd19iYXJfY3Vy c29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93aWR0aCwgTUNfQkFSLCBj dXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7Cisg ICAgfQorICAgIGNhc2UgTUNfSEJBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYm IGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4g Ki8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3Bp eGVsOworICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOwor ICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwg eSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGgsIGN1cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOwor ICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vy c29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAg ICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAg ICBtY193MzJfZHJhd19iYXJfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBo cG9zLCB2cG9zLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1 cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAg ICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJv cnQgKCk7CisgIH0KKyAgICB9Cit9CisKKy8qIERyYXcgZ2x5cGggc3RyaW5nIFMuICBUaGUgYG1j X21hdHJpeGAgaXMgcmVzZXJ2ZWQgZm9yIGZ1dHVyZSB1c2Ugd2hlbiBlcmFzaW5nCisgICBmYWtl IGN1cnNvcnMgZHVyaW5nIGBtY191cGRhdGVfd2luZG93X2VyYXNlJyBhbmQgcmVkcmF3aW5nIGZh a2UgY3Vyc29ycyBvbgorICAgbGVmdC9yaWdodCBvdmVyd3JpdHRlbiBnbHlwaHMuICovCitzdGF0 aWMgdm9pZAorbWNfdzMyX2RyYXdfZ2x5cGhfc3RyaW5nIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpz LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgc3RydWN0IG1jX21hdHJpeCBtY19tYXRyaXgsCisgICAg ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2ZsYXZvciBn bHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5 cGUgY3Vyc29yX3R5cGUsIGludCB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2RyYXdfc3RyZXRj aF9nbHlwaF9zdHJpbmcgKG5leHQpOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg ICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKG5leHQsIHRydWUpOworICAgICAg ICAgICAgbmV4dC0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICB9CisgICAgfQorICAvKiBTZXQg dXAgUy0+Z2MsIHNldCBjbGlwcGluZyBhbmQgZHJhdyBTLiAqLworICBtY193MzJfc2V0X2dseXBo X3N0cmluZ19nYyAocywgY3Vyc29yX2djX3ApOworICAvKiBEcmF3IHJlbGllZiAoaWYgYW55KSBp biBhZHZhbmNlIGZvciBjaGFyL2NvbXBvc2l0aW9uIHNvIHRoYXQgdGhlCisgICAgIGdseXBoIHN0 cmluZyBjYW4gYmUgZHJhd24gb3ZlciBpdC4gKi8KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMKKyAg ICAgICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JPWAorICAgICAgJiYgKHMtPmZpcnN0X2ds eXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgICB8fCBzLT5maXJzdF9nbHlwaC0+dHlw ZSA9PSBDT01QT1NJVEVfR0xZUEgpKQorICAgIHsKKyAgICAgIHczMl9zZXRfZ2x5cGhfc3RyaW5n X2NsaXBwaW5nIChzKTsKKyAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19iYWNrZ3JvdW5kIChz LCB0cnVlKTsKKyAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19ib3ggKHMpOworICAgICAgdzMy X3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmcgKHMpOworICAgICAgcmVsaWVmX2RyYXduX3AgPSAx OworICAgIH0KKyAgZWxzZSBpZiAoIXMtPmNsaXBfaGVhZCAvKiBkcmF3X2dseXBocyBkaWRuJ3Qg c3BlY2lmeSBhIGNsaXAgbWFzay4gKi8KKy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HlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENP TVBPU0lURV9HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMgfHwgKHMtPmNtcF9mcm9t ID4gMAorICAgICAgICAgICYmICEgcy0+Zmlyc3RfZ2x5cGgtPnUuY21wLmF1dG9tYXRpYykpCisg ICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxzZQorICAgICAg ICB3MzJfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgdHJ1ZSk7CisgICAgICB3MzJf ZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMpOworICAgICAgYnJlYWs7 CisgICAgY2FzZSBHTFlQSExFU1NfR0xZUEg6CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBzKQor ICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gdHJ1ZTsKKyAgICAgIGVsc2UKKyAgICAg ICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIGZhbHNlKTsKKyAgICAgIHcz Ml9kcmF3X2dseXBobGVzc19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVh azsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgICAgfQorICBpZiAoIXMt PmZvcl9vdmVybGFwcykKKyAgICB7CisgICAgICAvKiBEcmF3IHVuZGVybGluZS4gKi8KKyAgICAg IGlmIChzLT5mYWNlLT51bmRlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChzLT5m YWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX1dBVkUpCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIENPTE9SUkVGIGNvbG9yOworICAgICAgICAgICAgICBpZiAocy0+ZmFjZS0+ dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgICAgIGNvbG9yID0gcy0+Z2MtPmZv cmVncm91bmQ7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY29sb3Ig PSBzLT5mYWNlLT51bmRlcmxpbmVfY29sb3I7CisgICAgICAgICAgICAgIHczMl9kcmF3X3VuZGVy d2F2ZSAocywgY29sb3IpOworICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMtPmZh Y2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0aGlja25lc3MsIHBvc2l0aW9uOworICAgICAgICAg ICAgICBpbnQgeTsKKyAgICAgICAgICAgICAgaWYgKHMtPnByZXYgJiYgcy0+cHJldi0+ZmFjZS0+ dW5kZXJsaW5lX3AKKyAgICAgICAgICAgICAgICAgICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGlu ZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAg ICAgICAgICAvKiBXZSB1c2UgdGhlIHNhbWUgdW5kZXJsaW5lIHN0eWxlIGFzIHRoZSBwcmV2aW91 cyBvbmUuICovCisgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSBzLT5wcmV2LT51bmRlcmxp bmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBzLT5wcmV2LT51bmRl cmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogR2V0IHRoZSB1bmRlcmxpbmUg dGhpY2tuZXNzLiAgRGVmYXVsdCBpcyAxIHBpeGVsLiAqLworICAgICAgICAgICAgICAgICAgaWYg KHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAgICAg ICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPmZvbnQtPnVuZGVybGluZV90aGlja25lc3M7CisgICAg ICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAx OworICAgICAgICAgICAgICAgICAgaWYgKHhfdW5kZXJsaW5lX2F0X2Rlc2NlbnRfbGluZSkKKyAg ICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gdGhpY2tuZXNzKSAtIChz LT55YmFzZSAtIHMtPnkpOworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgLyogR2V0IHRoZSB1bmRlcmxpbmUg cG9zaXRpb24uICBUaGlzIGlzIHRoZSByZWNvbW1lbmRlZAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgdmVydGljYWwgb2Zmc2V0IGluIHBpeGVscyBmcm9tIHRoZSBiYXNlbGluZSB0byB0aGUg dG9wIG9mCisgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgdW5kZXJsaW5lLiAgVGhpcyBp cyBhIHNpZ25lZCB2YWx1ZSBhY2NvcmRpbmcgdG8gdGhlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBzcGVjcywgYW5kIGl0cyBkZWZhdWx0IGlzCisgICAgICAgICAgICAgICAgICAgICAgICAg ICBST1VORCAoKG1heGltdW1fZGVzY2VudCkgLyAyKSwgd2l0aAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgUk9VTkQgKHgpID0gZmxvb3IgKHggKyAwLjUpICAqLworICAgICAgICAgICAgICAg ICAgICAgICAgaWYgKHhfdXNlX3VuZGVybGluZV9wb3NpdGlvbl9wcm9wZXJ0aWVzCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgcy0+Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfcG9z aXRpb24gPj0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBzLT5mb250 LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChz LT5mb250KQorICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5mb250LT5k ZXNjZW50ICsgMSkgLyAyOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICAgIHBvc2l0aW9uID0gbWF4IChwb3NpdGlvbiwgdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0KTsK KyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIC8qIENoZWNrIHRoZSBzYW5pdHkgb2Yg dGhpY2tuZXNzIGFuZCBwb3NpdGlvbi4gIFdlIHNob3VsZAorICAgICAgICAgICAgICAgICBhdm9p ZCBkcmF3aW5nIHVuZGVybGluZSBvdXQgb2YgdGhlIGN1cnJlbnQgbGluZSBhcmVhLiAqLworICAg ICAgICAgICAgICBpZiAocy0+eSArIHMtPmhlaWdodCA8PSBzLT55YmFzZSArIHBvc2l0aW9uKQor ICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhlaWdodCAtIDEpIC0gKHMtPnliYXNlIC0g cy0+eSk7CisgICAgICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDwgcy0+eWJhc2UgKyBw b3NpdGlvbiArIHRoaWNrbmVzcykKKyAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAocy0+eSAr IHMtPmhlaWdodCkgLSAocy0+eWJhc2UgKyBwb3NpdGlvbik7CisgICAgICAgICAgICAgIHMtPnVu ZGVybGluZV90aGlja25lc3MgPSB0aGlja25lc3M7CisgICAgICAgICAgICAgIHMtPnVuZGVybGlu ZV9wb3NpdGlvbiA9cG9zaXRpb247CisgICAgICAgICAgICAgIHkgPSBzLT55YmFzZSArIHBvc2l0 aW9uOworICAgICAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQor ICAgICAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+Z2MtPmZvcmVn cm91bmQsIHMtPngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSwgcy0+d2lkdGgs IDEpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIHczMl9maWxsX2Fy ZWEgKHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yLCBzLT54LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgeSwgcy0+d2lkdGgsIDEpOworICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgICAvKiBEcmF3IG92ZXJsaW5lLiAqLworICAgICAgaWYgKHMtPmZh Y2UtPm92ZXJsaW5lX3ApCisgICAgICAgIHsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGR5ID0g MCwgaCA9IDE7CisgICAgICAgICAgaWYgKHMtPmZhY2UtPm92ZXJsaW5lX2NvbG9yX2RlZmF1bHRl ZF9wKQorICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9y ZWdyb3VuZCwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+ d2lkdGgsIGgpOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVh IChzLT5mLCBzLT5oZGMsIHMtPmZhY2UtPm92ZXJsaW5lX2NvbG9yLCBzLT54LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgfQor ICAgICAgLyogRHJhdyBzdHJpa2UtdGhyb3VnaC4gKi8KKyAgICAgIGlmIChzLT5mYWNlLT5zdHJp a2VfdGhyb3VnaF9wCisgICAgICAgICAgJiYgIUZPTlRfVEVYVE1FVFJJQyAocy0+Zm9udCkudG1T dHJ1Y2tPdXQpCisgICAgICAgIHsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGggPSAxOworICAg ICAgICAgIHVuc2lnbmVkIGxvbmcgZHkgPSAocy0+aGVpZ2h0IC0gaCkgLyAyOworICAgICAgICAg IGlmIChzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAg ICAgIHczMl9maWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+Z2MtPmZvcmVncm91bmQsIHMtPngs IHMtPnkgKyBkeSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPndpZHRoLCBoKTsKKyAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRj LCBzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgcy0+eSArIGR5LCBzLT53aWR0aCwgaCk7CisgICAgICAgIH0KKyAgICAgIC8q IERyYXcgcmVsaWVmIGlmIG5vdCB5ZXQgZHJhd24uICovCisgICAgICBpZiAoIXJlbGllZl9kcmF3 bl9wICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JPWCkKKyAgICAgICAgdzMyX2RyYXdfZ2x5 cGhfc3RyaW5nX2JveCAocyk7CisgICAgICBpZiAocy0+cHJldikKKyAgICAgICAgeworICAgICAg ICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKnByZXY7CisgICAgICAgICAgZm9yIChwcmV2ID0gcy0+ cHJldjsgcHJldjsgcHJldiA9IHByZXYtPnByZXYpCisgICAgICAgICAgICBpZiAocHJldi0+aGwg IT0gcy0+aGwKKyAgICAgICAgICAgICAgICAmJiBwcmV2LT54ICsgcHJldi0+d2lkdGggKyBwcmV2 LT5yaWdodF9vdmVyaGFuZyA+IHMtPngpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAvKiBBcyBwcmV2IHdhcyBkcmF3biB3aGlsZSBjbGlwcGVkIHRvIGl0cyBvd24gYXJlYSwgd2UK KyAgICAgICAgICAgICAgICAgICBtdXN0IGRyYXcgdGhlIHJpZ2h0X292ZXJoYW5nIHBhcnQgdXNp bmcgcy0+aGwgbm93LiAqLworICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBz YXZlID0gcHJldi0+aGw7CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzLT5obDsKKyAgICAg ICAgICAgICAgICBtY193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAocHJldiwgY3Vyc29yX2djX3Ap OworICAgICAgICAgICAgICAgIHczMl9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBwaW5nX2V4YWN0bHkg KHMsIHByZXYpOworICAgICAgICAgICAgICAgIGlmIChwcmV2LT5maXJzdF9nbHlwaC0+dHlwZSA9 PSBDSEFSX0dMWVBIKQorICAgICAgICAgICAgICAgICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2Zv cmVncm91bmQgKHByZXYpOworICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAg ICAgICB3MzJfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHByZXYpOwor ICAgICAgICAgICAgICAgIHczMl9zZXRfY2xpcF9yZWN0YW5nbGUgKHByZXYtPmhkYywgTlVMTCk7 CisgICAgICAgICAgICAgICAgcHJldi0+aGwgPSBzYXZlOworICAgICAgICAgICAgICAgIHByZXYt Pm51bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKHMt Pm5leHQpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpuZXh0Owor ICAgICAgICAgIGZvciAobmV4dCA9IHMtPm5leHQ7IG5leHQ7IG5leHQgPSBuZXh0LT5uZXh0KQor ICAgICAgICAgICAgaWYgKG5leHQtPmhsICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgbmV4 dC0+eCAtIG5leHQtPmxlZnRfb3ZlcmhhbmcgPCBzLT54ICsgcy0+d2lkdGgpCisgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAvKiBBcyBuZXh0IHdpbGwgYmUgZHJhd24gd2hpbGUgY2xp cHBlZCB0byBpdHMgb3duIGFyZWEsCisgICAgICAgICAgICAgICAgICAgd2UgbXVzdCBkcmF3IHRo ZSBsZWZ0X292ZXJoYW5nIHBhcnQgdXNpbmcgcy0+aGwgbm93LiAqLworICAgICAgICAgICAgICAg IGVudW0gZHJhd19nbHlwaHNfZmFjZSBzYXZlID0gbmV4dC0+aGw7CisgICAgICAgICAgICAgICAg bmV4dC0+aGwgPSBzLT5obDsKKyAgICAgICAgICAgICAgICBtY193MzJfc2V0X2dseXBoX3N0cmlu Z19nYyAobmV4dCwgY3Vyc29yX2djX3ApOworICAgICAgICAgICAgICAgIHczMl9zZXRfZ2x5cGhf c3RyaW5nX2NsaXBwaW5nX2V4YWN0bHkgKHMsIG5leHQpOworICAgICAgICAgICAgICAgIGlmIChu ZXh0LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBIKQorICAgICAgICAgICAgICAgICAg dzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKG5leHQpOworICAgICAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgICAgICB3MzJfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3Ry aW5nX2ZvcmVncm91bmQgKG5leHQpOworICAgICAgICAgICAgICAgIHczMl9zZXRfY2xpcF9yZWN0 YW5nbGUgKG5leHQtPmhkYywgTlVMTCk7CisgICAgICAgICAgICAgICAgbmV4dC0+aGwgPSBzYXZl OworICAgICAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7CisgICAgICAgICAgICAgICAg bmV4dC0+Y2xpcF9oZWFkID0gcy0+bmV4dDsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgfQorICAvKiBSZXNldCBjbGlwcGluZy4gKi8KKyAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAo cy0+aGRjLCBOVUxMKTsKKyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKworLyogZW5kIE1VTFRJUExF LUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIEZyaW5nZSBiaXRt YXBzLiAgKi8KIAogc3RhdGljIGludCBtYXhfZnJpbmdlX2JtcCA9IDA7CkBAIC01NDIsNiArMTcw NCwxNSBAQCB3MzJfdXBkYXRlX2JlZ2luIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIGlmICghIEZSQU1F X1czMl9QIChmKSkKICAgICByZXR1cm47CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBmOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFJlZ2VuZXJhdGUgZGlzcGxheSBwYWxl dHRlIGJlZm9yZSBkcmF3aW5nIGlmIGxpc3Qgb2YgcmVxdWVzdGVkCiAgICAgIGNvbG9ycyBoYXMg Y2hhbmdlZC4gKi8KICAgaWYgKGRpc3BsYXlfaW5mby0+cmVnZW5fcGFsZXR0ZSkKQEAgLTY3NCw2 ICsxODQ1LDE2IEBAIHczMl91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAKICAgLyogTW91 c2UgaGlnaGxpZ2h0IG1heSBiZSBkaXNwbGF5ZWQgYWdhaW4uICAqLwogICBNT1VTRV9ITF9JTkZP IChmKS0+bW91c2VfZmFjZV9kZWZlciA9IGZhbHNlOworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0g TlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTQwMDIsMTMg KzUxODMsNzQgQEAgdzMyX3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyIChzdHJ1Y3Qgd2luZG93ICp3 LAogCSAgICAgIHJlbGVhc2VfZnJhbWVfZGMgKGYsIGhkYyk7CiAJICAgICAgdzMyX2NsZWFyX3Vu ZGVyX2ludGVybmFsX2JvcmRlciAoZik7CiAJICAgIH0KKworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogUkVQQUlOVElORyBXSEVO IFJFTU9WSU5HIFNDUk9MTCBCQVI6CisKKy0gU2VxdWVuY2Ugb2YgRXZlbnRzOgorCisgIC4gYHJl ZGlzcGxheV9pbnRlcm5hbCcgY2FsbHMgdGhlIGBjb25kZW1uX3Njcm9sbF9iYXJzX2hvb2snLCB3 aGljaCBtYXJrcyBhbGwKKyAgICBzY3JvbGwgYmFycyBhcyBjYW5kaWRhdGVzIGZvciBkZWxldGlv bi4KKworICAuIFRoZW4gYHJlZGlzcGxheV9pbnRl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JlcGFpbnQgc28g dGhhdCB0aGUgbmV3IHNjcm9sbCBiYXIKK3dpbmRvdyBpcyB1cGRhdGVkLiAqLworCiAgICAgICAg ICAgLyogTWFrZSBzdXJlIHNjcm9sbCBiYXIgaXMgInZpc2libGUiIGJlZm9yZSBtb3ZpbmcsIHRv IGVuc3VyZSB0aGUKICAgICAgICAgICAgICBhcmVhIG9mIHRoZSBwYXJlbnQgd2luZG93IG5vdyBl eHBvc2VkIHdpbGwgYmUgcmVmcmVzaGVkLiAgKi8KLSAgICAgICAgICBteV9zaG93X3dpbmRvdyAo ZiwgaHduZCwgU1dfSElERSk7Ci0vKiogICAgICAgICAgIE1vdmVXaW5kb3cgKGh3bmQsIGxlZnQs IHRvcCwgd2lkdGgsIG1heCAoaGVpZ2h0LCAxKSwgVFJVRSk7ICoqLwotCSAgLyogVHJ5IHRvIG5v dCBkcmF3IG92ZXIgY2hpbGQgZnJhbWVzLiAgKi8KLQkgIFNldFdpbmRvd1BvcyAoaHduZCwgSFdO RF9CT1RUT00sIGxlZnQsIHRvcCwgd2lkdGgsIG1heCAoaGVpZ2h0LCAxKSwKLSAgICAgICAgICAg ICAgICAgICAgICAgIFNXUF9GUkFNRUNIQU5HRUQpOworICAgICAgICAgIGlmIChsZWZ0IDw9IGJh ci0+bGVmdCkKKyAgICAgICAgICAgIG15X3Nob3dfd2luZG93IChmLCBod25kLCBTV19ISURFKTsK KyAgICAgICAgICBNb3ZlV2luZG93IChod25kLCBsZWZ0LCB0b3AsIHdpZHRoLCBtYXggKGhlaWdo dCwgMSksIGxlZnQgPD0gYmFyLT5sZWZ0KTsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8K Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIAkgIHNpLmNiU2l6ZSA9IHNpemVvZiAoc2kp OwogCSAgc2kuZk1hc2sgPSBTSUZfUkFOR0U7CkBAIC00Mjc3LDYgKzU1MTksMjEgQEAgdzMyX2p1 ZGdlX3Njcm9sbF9iYXJzIChzdHJ1Y3QgZnJhbWUgKmYpCiAgICAgewogICAgICAgc3RydWN0IHNj cm9sbF9iYXIgKmIgPSBYU0NST0xMX0JBUiAoYmFyKTsKIAorCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgLyogYERlc3Ryb3lXaW5kb3cn IHdpdGhpbiBgeF9zY3JvbGxfYmFyX3JlbW92ZScgcmVwYWludHMgdGhlIHJlY3RhbmdsZS4KKyAg ICAgIFRoZXJlZm9yZSwgd2UgZmlyc3Qgc2VuZCBhIG1lc3NhZ2UgdG8gaW5oaWJpdCByZXBhaW50 aW5nLiAqLworICAgICAgaWYgKCFXSU5ET1dfTElWRV9QIChiLT53aW5kb3cpKQorICAgICAgICB7 CisgICAgICAgICAgSFdORCBod25kID0gU0NST0xMX0JBUl9XMzJfV0lORE9XIChiKTsKKyAgICAg ICAgICBTZW5kTWVzc2FnZSAoaHduZCwgV01fU0VUUkVEUkFXLCBmYWxzZSwgMCk7CisgICAgICAg IH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgdzMyX3Njcm9sbF9iYXJf cmVtb3ZlIChiKTsKIAogICAgICAgbmV4dCA9IGItPm5leHQ7CkBAIC03MDg4LDYgKzgzNDUsMjAg QEAgZXh0ZXJuIGZyYW1lX3Bhcm1faGFuZGxlciB3MzJfZnJhbWVfcGFybV9oYW5kbGVyc1tdOwog CiBzdGF0aWMgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2UgdzMyX3JlZGlzcGxheV9pbnRlcmZh Y2UgPQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYHczMnRlcm0uY2AgbXVzdCBiZSBp biB0aGUgZXhhY3Qgc2FtZSBvcmRlciBhcyB0aGUKK2ByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBg ZGlzcGV4dGVybi5oYCEgKi8KKworICBtY193MzJfZHJhd193aW5kb3dfY3Vyc29yLAorICBtY193 MzJfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg dzMyX2ZyYW1lX3Bhcm1faGFuZGxlcnMsCiAgIGd1aV9wcm9kdWNlX2dseXBocywKICAgZ3VpX3dy aXRlX2dseXBocywKZGlmZiAtLWdpdCBhL3NyYy93aW5kb3cuaCBiL3NyYy93aW5kb3cuaAppbmRl eCA2YjBmMGU1Li4xNGRkMzhhIDEwMDY0NAotLS0gYS9zcmMvd2luZG93LmgKKysrIGIvc3JjL3dp bmRvdy5oCkBAIC0zMjQsNiArMzI0LDE0NyBAQCBzdHJ1Y3Qgd2luZG93CiAKICNpZmRlZiBIQVZF X1dJTkRPV19TWVNURU0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1V TFRJUExFLUNVUlNPUlMgKi8KKworLyogU3VmZml4ZXMgZm9yIHRoZSBgbWNgIHdpbmRvdyBwb2lu dGVyIHByZWZpeC4gKi8KK3N0cnVjdCBtdWx0aXBsZV9jdXJzb3JzCit7CisgIC8qIFRoZSByZWNv cmRlZCBwaXhlbCB3aWR0aCBvZiB0aGUgbGFzdCBsaW5lIG51bWJlciBkcmF3biBkdXJpbmcgcmVk aXNwbGF5ICovCisgIGludCBsbnVtX3BpeGVsX3dpZHRoOworfSBtYzsKKworc3RydWN0IG1jX21h dHJpeAoreworICBwdHJkaWZmX3QgdnBvc19hbGxvY2F0ZWQ7CisgIHB0cmRpZmZfdCB2cG9zX3Vz ZWQ7CisgIHB0cmRpZmZfdCBjdXJzb3JzX3VzZWRbNF07CisgIGVudW0gbWNfY2FjaGVfdHlwZQor ICB7CisgICAgTUNfQ0FDSEUsCisgICAgQ0hfQ0FDSEUsCisgICAgRkNfQ0FDSEUsCisgICAgTk9f Q0FDSEUKKyAgfSBjYWNoZV90eXBlOworICBzdHJ1Y3QgbWNfdnBvcworICB7CisgICAgcHRyZGlm Zl90IGNhY2hlX2FsbG9jYXRlZFs0XTsKKyAgICBwdHJkaWZmX3QgY2FjaGVfdXNlZFs0XTsKKyAg ICBzdHJ1Y3QgbWNfY29udGVudHMKKyAgICB7CisgICAgICBib29sX2JmIHNhbWVfcCA6IDE7Cisg ICAgICBzdHJ1Y3QgZ2x5cGggZ2x5cGg7CisgICAgICBpbnQgeDsKKyAgICAgIGludCBmeDsKKyAg ICAgIGludCB5OworICAgICAgaW50IGZ5OworICAgICAgaW50IGhwb3M7CisgICAgICBpbnQgdnBv czsKKyAgICAgIGludCB3ZDsKKyAgICAgIGludCBoOworICAgICAgZW51bSBtY19jdXJzb3JfdHlw ZQorICAgICAgeworICAgICAgICAvKiBOT1RFOiAgVGhlIGZyaW5nZSBiaXRtYXAgZnJhbWV3b3Jr IHJlbGllcyB1cG9uIE1DX05PX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgaGF2aW5nIGEgdmFsdWUg b2YgemVybyAoMCkuICovCisgICAgICAgIE1DX05PX0ZSSU5HRV9CSVRNQVAsCisgICAgICAgIE1D X05PX0NVUlNPUiwKKyAgICAgICAgTUNfUklHSFRfRlJJTkdFX0JJVE1BUCwKKyAgICAgICAgTUNf TEVGVF9GUklOR0VfQklUTUFQLAorICAgICAgICBNQ19GUkFNRURfQk9YLAorICAgICAgICBNQ19G SUxMRURfQk9YLAorICAgICAgICBNQ19IT0xMT1dfQk9YLAorICAgICAgICBNQ19CQVIsCisgICAg ICAgIE1DX0hCQVIKKyAgICAgIH0gY3Vyc29yX3R5cGU7CisgICAgICBpbnQgY3Vyc29yX3dpZHRo OworICAgICAgc3RydWN0IG1jX1JHQgorICAgICAgeworICAgICAgICBkb3VibGUgcmVkOworICAg ICAgICBkb3VibGUgZ3JlZW47CisgICAgICAgIGRvdWJsZSBibHVlOworICAgICAgfSBmZywgYmc7 CisgICAgICBib29sX2JmIGFjdGl2ZV9wIDogMTsKKyAgICAgIGVudW0gbWNfZmxhdm9yCisgICAg ICB7CisgICAgICAgIE5PX0ZMQVZPUiwKKyAgICAgICAgTUNfR0xZUEgsCisgICAgICAgIE1DX0dM WVBITEVTUywKKyAgICAgICAgTUNfT1ZFUkxBWV9BUlJPV19CSVRNQVAsCisgICAgICAgIE1DX1BJ TENST1csCisgICAgICAgIE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1csCisgICAgICAg IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1csCisgICAgICAgIE1DX0hP TExPV19SRUNUQU5HTEUsCisgICAgICAgIE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVywKKyAg ICAgICAgTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XLAorICAgICAgICBNQ19W RVJUSUNBTF9CQVIsCisgICAgICAgIE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUiwKKyAgICAgICAg TUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgfSBnbHlwaF9mbGF2b3I7CisgICAgICBl bnVtIG1jX3Jvd19wb3NpdGlvbgorICAgICAgeworICAgICAgICBQUkVfWlYsCisgICAgICAgIEFU X1pWLAorICAgICAgICBQT1NUX1pWCisgICAgICB9IHJvd19wb3NpdGlvbjsKKyAgICAgIGJvb2xf YmYgZW5hYmxlZF9wIDogMTsKKyAgICB9ICpjYWNoZVs0XTsKKyAgfSAqdnBvczsKKyAgLyogVXNl ZCBlbHNld2hlcmUuICovCisgIHN0cnVjdCBtY19lc3NlbnRpYWxzCisgIHsKKyAgICBib29sX2Jm IGFjdGl2ZV9wIDogMTsKKyAgICBzdHJ1Y3QgbWNfUkdCIGNoX2ZnWzNdLCBmY19mZ1szXSwgc3Bf Zmc7CisgICAgaW50IGZjX3g7CisgICAgaW50IHp2OworICAgIGludCB6dl9ieXRlOworICB9IGVz c2VudGlhbHM7CisgIC8qIFVzZWQgZWxzZXdoZXJlLiAqLworICBlbnVtIG1jX2VuZ2luZV90eXBl CisgIHsKKyAgICBNVUxUSVBMRV9DVVJTT1JTLAorICAgIEhPUklaT05UQUxfUlVMRVIsCisgICAg VkVSVElDQUxfUlVMRVIsCisgICAgRklMTF9DT0xVTU4sCisgICAgQ1VSU09SX0lORElDQVRPUgor ICB9IGFjdGlvbl90eXBlOworICAvKiBVc2VkIGVsc2V3aGVyZS4gKi8KKyAgZW51bSBtY19wcmVf c2Nyb2xsX2NsZWFuX3R5cGUKKyAgeworICAgIFRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01B VFJJWF9ET1dOLAorICAgIFRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9VUCwKKyAg ICBUUllfV0lORE9XX0lECisgIH0gbWNfcHJlX3Njcm9sbF9jbGVhbl90eXBlX19mcm9tX3doZXJl OworICAvKiBVc2VkIGVsc2V3aGVyZS4gKi8KKyAgZW51bSBtY19kcmF3X3Jvd190eXBlCisgIHsK KyAgICBOT1dIRVJFLAorICAgIFNDUklCRV9PTkUsCisgICAgU0NSSUJFX1RXTywKKyAgICBTQ1JJ QkVfVEhSRUUsCisgICAgU0tJUFBFRCwKKyAgICBQT1NUX0NIQU5HRUQsCisgICAgVU5DSEFOR0VE LAorICAgIFNFVF9DVVJTT1JfT05FLAorICAgIFNFVF9DVVJTT1JfVFdPCisgIH0gbWNfZHJhd19y b3dfdHlwZV9fZnJvbV93aGVyZTsKKyAgLyogVXNlZCBlbHNld2hlcmUuICovCisgIGVudW0gbWNf cmVkcmF3X3Jvd190eXBlCisgIHsKKyAgICBVUERBVEVfV0lORE9XX19SRURSQVdfT1ZFUkxBUFBF RF9ST1dTLAorICAgIEdVSV9JTlNFUlRfR0xZUEhTLAorICAgIEdVSV9GSVhfT1ZFUkxBUFBJTkdf QVJFQSwKKyAgICBEUkFXX1JPV19XSVRIX01PVVNFX0ZBQ0UsCisgICAgRVhQT1NFX0FSRUFfT05F LAorICAgIEVYUE9TRV9BUkVBX1RXTywKKyAgICBFWFBPU0VfTElORQorICB9IG1jX3JlZHJhd19y b3dfdHlwZV9fZnJvbV93aGVyZTsKK30gbWNfbWF0cml4OworCisvKiBlbmQgTVVMVElQTEUtQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIC8qIEN1cnNvciB0eXBl IG9mIGxhc3QgY3Vyc29yIGRyYXduIG9uIHRoZSB3aW5kb3cuICAqLwogICAgIGVudW0gdGV4dF9j dXJzb3Jfa2luZHMgcGh5c19jdXJzb3JfdHlwZTsKIApkaWZmIC0tZ2l0IGEvc3JjL3hkaXNwLmMg Yi9zcmMveGRpc3AuYwppbmRleCA1MGY2NDQzLi4wYWMzZDlhIDEwMDY0NAotLS0gYS9zcmMveGRp c3AuYworKysgYi9zcmMveGRpc3AuYwpAQCAtOTYyLDYgKzk2Miw0ODkyIEBAIHN0YXRpYyB2b2lk IHNob3dfbW91c2VfZmFjZSAoTW91c2VfSExJbmZvICosIGVudW0gZHJhd19nbHlwaHNfZmFjZSk7 CiBzdGF0aWMgYm9vbCBjb29yZHNfaW5fbW91c2VfZmFjZV9wIChzdHJ1Y3Qgd2luZG93IC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CBhYzU3YzUwOTM4MjllZTA5MDg0YzU2MmJiYmMx YzQxMjE3OWJlMTNkCisKK1N0ZXAgMzogIEZyb20gd2l0aGluIHRoZSBuZXcgZW1hY3MgZm9sZGVy IGNyZWF0ZWQgaW4gU3RlcCAxLCBhcHBseSB0aGUgcGF0Y2g6CisKK2dpdCBhcHBseSAvcGF0aC90 by90aGUvcGF0Y2guZGlmZgorCitTdGVwIDQ6ICAuL2F1dG9nZW4uc2gKKworU3RlcCA1OiAgLi9j b25maWd1cmUgLi4uIFt5b3VyIGN1c3RvbSBvcHRpb25zXQorCitTdGVwIDY6ICBtYWtlCisKK1N0 ZXAgNzogIG1ha2UgaW5zdGFsbAorCisKK1VTQUdFOgorCistIEZvciBhIG1pbmltYWwgd29ya2lu ZyBleGFtcGxlIG9mIGJ1aWx0LWluIGZha2UgY3Vyc29ycywgdHlwZTogIE0teCBtYy10ZXN0CisK KyAgOzs7IFRVUk4gT04gRkFLRSBDVVJTT1JTIChidWZmZXIgcG9zaXRpb24sIGN1cnNvci10eXBl LCBjdXJzb3IgY29sb3IpOgorCisgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEi KQorICAgICAgICAgICAgICAgICAgKDIgImJhciIgInB1cnBsZSIpCisgICAgICAgICAgICAgICAg ICAoMyAiYm94IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93IiAiIzAw MDBGRiIpCisgICAgICAgICAgICAgICAgICAoNSAoImhiYXIiIDMpIFsxLjAgMC4wIDEuMF0pCisg ICAgICAgICAgICAgICAgICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkKKyAgICAgICAgICAg ICAgICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQiKSkpCisKKyAgOzs7IFRVUk4gT0ZGIEZBS0Ug Q1VSU09SUzoKKworICAoc2V0cSBtYy1jb25mIG5pbCkKKworLSBUbyB0cnkgb3V0IGJvdGggdGhl IGNyb3NzaGFpcn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0xZUEhfU1RSSU5HU19YVyhTVEFSVCwgRU5ELCBIRUFELCBUQUlMLCBITCwg WCwgTEFTVF9YKQlcCisgICAgICAgICAgICBjYXNlIFhXSURHRVRfR0xZUEg6ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgIE1DX0JVSUxEX1hX SURHRVRfR0xZUEhfU1RSSU5HIChTVEFSVCwgRU5ELCBIRUFELCBUQUlMLCAgICAgICBcCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBITCwgWCwgTEFTVF9YKTsgICAg ICAgICAgICAgICBcCisgICAgICAgICAgICAgIGJyZWFrOworCisjZGVmaW5lIE1DX0JVSUxEX0dM WVBIX1NUUklOR1NfMihTVEFSVCwgRU5ELCBIRUFELCBUQUlMLCBITCwgWCwgTEFTVF9YKQlcCisJ ICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgkJCQkJXAorCSAgICAgIE1DX0JVSUxEX0dMWVBITEVT U19HTFlQSF9TVFJJTkcgKFNUQVJULCBFTkQsIEhFQUQsIFRBSUwsCVwKKwkJCQkJICAgIEhMLCBY LCBMQVNUX1gpOwkJXAorCSAgICAgIGJyZWFrOwkJCQkJCQlcCisJCQkJCQkJCQlcCisJICAgIGRl ZmF1bHQ6CQkJCQkJCVwKKwkgICAgICBlbWFjc19hYm9ydCAoKTsJCQkJCQlcCisJICAgIH0JCQkJ CQkJCVwKKwkJCQkJCQkJCVwKKwkgIGlmIChzKQkJCQkJCQlcCisJICAgIHsJCQkJCQkJCVwKKwkg ICAgICBzZXRfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmRfd2lkdGggKHMsIFNUQVJULCBMQVNUX1gp OwlcCisJICAgICAgKFgpICs9IHMtPndpZHRoOwkJCQkJCVwKKwkgICAgfQkJCQkJCQkJXAorCX0J CQkJCQkJCVwKKyAgICB9IHdoaWxlIChmYWxzZSkKKworI2RlZmluZSBNQ19CVUlMRF9HTFl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AgICBicmVhazsKKyAgICAgIGxpc3QgPSBY Q0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpIHx8IEVRIChYQ0FSIChsaXN0KSwg ZWx0KSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBp ZiAoIUNPTlNQIChsaXN0KSB8fCBFUSAoWENBUiAobGlzdCksIGVsdCkpCisgICAgICAgIGJyZWFr OworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAgIH0KKyAgcmV0dXJuIGxpc3Q7Cit9CisK K0xpc3BfT2JqZWN0CittY19udGggKGludCBudW0sIExpc3BfT2JqZWN0IGxpc3QpCit7CisgIGZv ciAoaW50IGkgPSAwOyBpIDwgbnVtICYmICFOSUxQIChsaXN0KTsgaSsrKQorICAgIGxpc3QgPSBY Q0RSIChsaXN0KTsKKyAgaWYgKENPTlNQIChsaXN0KSkKKyAgICByZXR1cm4gWENBUiAobGlzdCk7 CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK0xpc3BfT2JqZWN0CittY19hc3Nx IChMaXNwX09iamVjdCBrZXksIExpc3BfT2JqZWN0IGxpc3QpCit7CisgIHdoaWxlICgxKQorICAg IHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChs aXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhDQVIgKFhDQVIgKGxpc3QpKSwga2V5KSkpCisg ICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAgICAgaWYgKCFDT05T UCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1AgKFhDQVIgKGxpc3QpKQorICAgICAgICAgICAg ICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBrZXkpKSkKKyAgICAgICAgYnJlYWs7CisgICAg ICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAg IHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIEVRIChYQ0FSIChYQ0FS IChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0 KTsKKyAgICB9CisgIGlmIChDT05TUCAobGlzdCkpCisgICAgcmV0dXJuIFhDQVIgKGxpc3QpOwor ICAgIGVsc2UKKyAgICAgIHJldHVybiBRbmlsOworfQorCitMaXNwX09iamVjdAorbWNfYXNzb2Mg KExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgTGlzcF9PYmplY3QgY2Fy OworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAg IHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChY Q0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChG ZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAo bGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENB UiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisg ICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5 KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBp ZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAg ICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAg ICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAg YnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgfQorICBpZiAoQ09OU1AgKGxp c3QpKQorICAgIHJldHVybiBYQ0FSIChsaXN0KTsKKyAgICBlbHNlCisgICAgICByZXR1cm4gUW5p bDsKK30KKworTGlzcF9PYmplY3QKK21jX3BsaXN0X2dldCAoTGlzcF9PYmplY3QgcGxpc3QsIExp c3BfT2JqZWN0IHByb3ApCit7CisgIExpc3BfT2JqZWN0IHRhaWwsIGhhbGZ0YWlsOworICAvKiBo YWxmdGFpbCBpcyB1c2VkIHRvIGRldGVjdCBjaXJjdWxhciBsaXN0cy4gICovCisgIHRhaWwgPSBo YWxmdGFpbCA9IHBsaXN0OworICB3aGlsZSAoQ09OU1AgKHRhaWwpICYmIENPTlNQIChYQ0RSICh0 YWlsKSkpCisgICAgeworICAgICAgaWYgKEVRIChwcm9wLCBYQ0FSICh0YWlsKSkpCisgICAgICAg IHJldHVybiBYQ0FSIChYQ0RSICh0YWlsKSk7CisgICAgICB0YWlsID0gWENEUiAoWENEUiAodGFp bCkpOworICAgICAgaGFsZnRhaWwgPSBYQ0RSIChoYWxmdGFpbCk7CisgICAgICBpZiAoRVEgKHRh aWwsIGhhbGZ0YWlsKSkKKyAgICAgICAgYnJlYWs7CisgICAgfQorICByZXR1cm4gUW5pbDsKK30K KworLyogUkVHSU9OIEJFR0lOOiAgbWNfcmVnaW9uX2xpbWl0ICgxKQorICAgUkVHSU9OIEVORDog IG1jX3JlZ2lvbl9saW1pdCAoMCkgKi8KK3B0cmRpZmZfdAorbWNfcmVnaW9uX2xpbWl0IChib29s IGJlZ2luX3ApCit7CisgIGlmICghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAm JiBOSUxQIChWbWFya19ldmVuX2lmX2luYWN0aXZlKQorICAgICAgJiYgTklMU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pCisgICAgICAmJiBFUSAoUXNwYWNlLCBYQ0FSICh2YWwp KSkKKyAgICB7IC8qIEZJWE1FOiBVc2UgY2FsY19waXhlbF93aWR0aF9vcl9oZWlnaHQuICovCisg ICAgICBMaXNwX09iamVjdCBwbGlzdCA9IFhDRFIgKHZhbCksIHByb3A7CisgICAgICBpbnQgd2lk dGggPSAtMTsKKyAgICAgIEVNQUNTX0lOVCBhbGlnbl90b19tYXggPSAoY29sIDwgTU9TVF9QT1NJ VElWRV9GSVhOVU0gLSBJTlRfTUFYCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IChFTUFDU19JTlQpIElOVF9NQVggKyBjb2wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogTU9TVF9QT1NJVElWRV9GSVhOVU0pOworICAgICAgaWYgKChwcm9wID0gbWNfcGxpc3Rf Z2V0IChwbGlzdCwgUUN3aWR0aCksIFJBTkdFRF9GSVhOVU1QICgwLCBwcm9wLCBJTlRfTUFYKSkK KyAgICAgICAgICB8fCAocHJvcCA9IG1jX3BsaXN0X2dldCAocGxpc3QsIFFDcmVsYXRpdmVfd2lk dGgpLAorICAgICAgICAgICAgICBSQU5HRURfRklYTlVNUCAoMCwgcHJvcCwgSU5UX01BWCkpKQor ICAgICAgICB3aWR0aCA9IFhGSVhOVU0gKHByb3ApOworICAgICAgICBlbHNlIGlmIChGTE9BVFAg KHByb3ApICYmIDAgPD0gWEZMT0FUX0RBVEEgKHByb3ApCisgICAgICAgICAgICAgICAgICYmIFhG TE9BVF9EQVRBIChwcm9wKSA8PSBJTlRfTUFYKQorICAgICAgICAgIHdpZHRoID0gKGludCkoWEZM T0FUX0RBVEEgKHByb3ApICsgMC41KTsKKyAgICAgICAgICBlbHNlIGlmICgocHJvcCA9IG1jX3Bs aXN0X2dldCAocGxpc3QsIFFDYWxpZ25fdG8pLAorICAgICAgICAgICAgICAgICAgICBSQU5HRURf RklYTlVNUCAoY29sLCBwcm9wLCBhbGlnbl90b19tYXgpKSkKKyAgICAgICAgICAgIHdpZHRoID0g WEZJWE5VTSAocHJvcCkgLSBjb2w7CisgICAgICAgICAgICAgIGVsc2UgaWYgKEZMT0FUUCAocHJv cCkgJiYgY29sIDw9IFhGTE9BVF9EQVRBIChwcm9wKQorICAgICAgICAgICAgICAgICAgICAgICAm JiAoWEZMT0FUX0RBVEEgKHByb3ApIDw9IGFsaWduX3RvX21heCkpCisgICAgICAgICAgICAgICAg d2lkdGggPSAoaW50KShYRkxPQVRfREFUQSAocHJvcCkgKyAwLjUpIC0gY29sOworICAgICAgaWYg KHdpZHRoID49IDApCisgICAgICAgIHsKKyAgICAgICAgICBwdHJkaWZmX3Qgc3RhcnQ7CisgICAg ICAgICAgaWYgKE9WRVJMQVlQIChvdmVybGF5KSkKKyAgICAgICAgICAgICplbmRwb3MgPSBPVkVS TEFZX1BPU0lUSU9OIChPVkVSTEFZX0VORCAob3ZlcmxheSkpOworICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICBnZXRfcHJvcGVydHlfYW5kX3JhbmdlIChwb3MsIFFkaXNwbGF5LCAmdmFs LCAmc3RhcnQsIGVuZHBvcywgUW5pbCk7CisgICAgICAgICAgLyogRm9yIDpyZWxhdGl2ZS13aWR0 aCwgd2UgbmVlZCB0byBtdWx0aXBseSBieSB0aGUgY29sdW1uCisgICAgICAgICAgICAgd2lkdGgg b2YgdGhlIGNoYXJhY3RlciBhdCBQT1MsIGlmIGl0IGlzIGdyZWF0ZXIgdGhhbiAxLiAqLworICAg ICAgICAgIGlmICghTklMUCAobWNfcGxpc3RfZ2V0IChwbGlzdCwgUUNyZWxhdGl2ZV93aWR0aCkp CisgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChjdXJyZW50X2J1ZmZlciwgZW5hYmxlX211 bHRpYnl0ZV9jaGFyYWN0ZXJzKSkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGludCBi LCB3ZDsKKyAgICAgICAgICAgICAgdW5zaWduZWQgY2h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AgcHRyZGlmZl90IGNvdW50ID0gU1BFQ1BETF9JTkRFWCAoKTsKKyAgc3RydWN0IGZyYW1l ICpmID0gWEZSQU1FICh3aW4tPmZyYW1lKTsKKyAgTGlzcF9PYmplY3QgcG9zID0gbWFrZV9maXhu dW0gKGNoYXJwb3MpOworICBwdHJkaWZmX3QgdG87CisgIHB0cmRpZmZfdCBwdCA9IFBULCBwdF9i eXRlID0gUFRfQllURTsKKyAgTGlzcF9PYmplY3QgcmUsIGZvbnRfb2JqZWN0LCBsZ3N0cmluZzsK KyAgcHRyZGlmZl90IGxlbjsKKyAgcmVjb3JkX3Vud2luZF9zYXZlX21hdGNoX2RhdGEgKCk7Cisg IHJlID0gQVJFRiAocnVsZSwgMCk7CisgIGlmIChOSUxQIChyZSkpCisgICAgbGVuID0gMTsKKyAg ZWxzZSBpZiAoISBTVFJJTkdQIChyZSkpCisgICAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIFFu aWwpOworICBlbHNlIGlmICgobGVuID0gZmFzdF9sb29raW5nX2F0IChyZSwgY2hhcnBvcywgYnl0 ZXBvcywgbGltaXQsIC0xLCBzdHJpbmcpKQorICAgICAgICAgICA+IDApCisgICAgeworICAgICAg aWYgKE5JTFAgKHN0cmluZykpCisgICAgICAgIGxlbiA9IEJZVEVfVE9fQ0hBUiAoYnl0ZXBvcyAr IGxlbikgLSBjaGFycG9zOworICAgICAgZWxzZQorICAgICAgICBsZW4gPSBzdHJpbmdfYnl0ZV90 b19jaGFyIChzdHJpbmcsIGJ5dGVwb3MgKyBsZW4pIC0gY2hhcnBvczsKKyAgICB9CisgIGlmIChs ZW4gPD0gMCkKKyAgICByZXR1cm4gdW5iaW5kX3RvIChjb3VudCwgUW5pbCk7CisgIHRvID0gbGlt aXQgPSBjaGFycG9zICsgbGVuOworI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQorICBpZiAoRlJB TUVfV0lORE9XX1AgKGYpKQorICAgIHsKKyAgICAgIGZvbnRfb2JqZWN0ID0gZm9udF9yYW5nZSAo Y2hhcnBvcywgYnl0ZXBvcywgJnRvLCB3aW4sIGZhY2UsIHN0cmluZyk7CisgICAgICBpZiAoISBG T05UX09CSkVDVF9QIChmb250X29iamVjdCkKKyAgICAgICAgICB8fCAoISBOSUxQIChyZSkKKyAg ICAgICAgICAgICAgJiYgdG8gPCBsaW1pdAorICAgICAgICAgICAgICAmJiAoZmFzdF9sb29raW5n X2F0IChyZSwgY2hhcnBvcywgYnl0ZXBvcywgdG8sIC0xLCBzdHJpbmcpIDw9IDApKSkKKyAgICAg ICAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIFFuaWwpOworICAgIH0KKyAgZWxzZQorI2VuZGlm ICAgICAgICAvKiBub3QgSEFWRV9XSU5ET1dfU1lTVEVNICovCisgICAgZm9udF9vYmplY3QgPSB3 aW4tPmZyYW1lOworICBsZ3N0cmluZyA9IEZjb21wb3NpdGlvbl9nZXRfZ3N0cmluZyAocG9zLCBt YWtlX2ZpeG51bSAodG8pLCBmb250X29iamVjdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHN0cmluZyk7CisgIGlmIChOSUxQIChMR1NUUklOR19JRCAobGdzdHJpbmcp KSkKKyAgICB7CisgICAgICAvKiBTYXZlIHBvaW50IGFzIG1hcmtlciBiZWZvcmUgY2FsbGluZyBv dXQgdG8gbGlzcC4gICovCisgICAgICBpZiAoTklMUCAoc3RyaW5nKSkKKyAgICAgICAgcmVjb3Jk X3Vud2luZF9wcm90ZWN0IChyZXN0b3JlX3BvaW50X3Vud2luZCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBidWlsZF9tYXJrZXIgKGN1cnJlbnRfYnVmZmVyLCBwdCwgcHRfYnl0ZSkp OworICAgICAgbGdzdHJpbmcgPSBzYWZlX2NhbGwgKDYsIFZhdXRvX2NvbXBvc2l0aW9uX2Z1bmN0 aW9uLCBBUkVGIChydWxlLCAyKSwKKyAgICAgICAgICAgICAgICAgICAgIC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ZGlm Zl90IGVuZHBvcywgc3RydWN0IHdpbmRvdyAqdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg c3RydWN0IGZhY2UgKmZhY2UsIExpc3BfT2JqZWN0IHN0cmluZykKK3sKKyAgaWYgKGNtcF9pdC0+ Y2ggPT0gLTIpCisgICAgeworICAgICAgY29tcG9zaXRpb25fY29tcHV0ZV9zdG9wX3BvcyAoY21w X2l0LCBjaGFycG9zLCBieXRlcG9zLCBlbmRwb3MsIHN0cmluZyk7CisgICAgICBpZiAoY21wX2l0 LT5jaCA9PSAtMiB8fCBjbXBfaXQtPnN0b3BfcG9zICE9IGNoYXJwb3MpCisgICAgICAgIC8qIFRo ZSBjdXJyZW50IHBvc2l0aW9uIGlzIG5vdCBjb21wb3NlZC4gICovCisgICAgICAgIHJldHVybiAw OworICAgIH0KKyAgaWYgKGVuZHBvcyA8IDApCisgICAgZW5kcG9zID0gTklMUCAoc3RyaW5nKSA/ IEJFR1YgOiAwOworICBpZiAoY21wX2l0LT5jaCA8IDApCisgICAgeworICAgICAgLyogV2UgYXJl IGxvb2tpbmcgYXQgYSBzdGF0aWMgY29tcG9zaXRpb24uICAqLworICAgICAgcHRyZGlmZl90IHN0 YXJ0LCBlbmQ7CisgICAgICBMaXNwX09iamVjdCBwcm9wOworICAgICAgZmluZF9jb21wb3NpdGlv biAoY2hhcnBvcywgLTEsICZzdGFydCwgJmVuZCwgJnByb3AsIHN0cmluZyk7CisgICAgICBjbXBf aXQtPmlkID0gZ2V0X2NvbXBvc2l0aW9uX2lkIChjaGFycG9zLCBieXRlcG9zLCBlbmQgLSBzdGFy dCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3AsIHN0cmluZyk7 CisgICAgICBpZiAoY21wX2l0LT5pZCA8IDApCisgICAgICAgIGdvdG8gbm9fY29tcG9zaXRpb247 CisgICAgICBjbXBfaXQtPm5jaGFycyA9IGVuZCAtIHN0YXJ0OworICAgICAgY21wX2l0LT5uZ2x5 cGhzID0gY29tcG9zaXRpb25fdGFibGVbY21wX2l0LT5pZF0tPmdseXBoX2xlbjsKKyAgICB9Cisg IGVsc2UgaWYgKHcpCisgICAgeworICAgICAgTGlzcF9PYmplY3QgbGdzdHJpbmcgPSBRbmlsOwor ICAgICAgTGlzcF9PYmplY3QgdmFsLCBlbHQ7CisgICAgICBwdHJkaWZmX3QgaTsKKyAgICAgIHZh bCA9IENIQVJfVEFCTEVfUkVGIChWY29tcG9zaXRpb25fZnVuY3Rpb25fdGFibGUsIGNtcF9pdC0+ Y2gpOworICAgICAgZm9yIChpID0gMDsgaSA8IGNtcF9pdC0+cnVsZV9pZHg7IGkrKywgdmFsID0g WENEUiAodmFsKSk7CisgICAgICBpZiAoY2hhcnBvcyA8IGVuZHBvcykKKyAgICAgICAgeworICAg ICAgICAgIGZvciAoOyBDT05TUCAodmFsKTsgdmFsID0gWENEUiAodmFsKSkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgZWx0ID0gWENBUiAodmFsKTsKKyAgICAgICAgICAgICAgaWYgKCEg VkVDVE9SUCAoZWx0KSB8fCBBU0laRSAoZWx0KSAhPSAzCisgICAgICAgICAgICAgICAgICB8fCAh IElOVEVHRVJQIChBUkVGIChlbHQsIDEpKSkKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAg ICAgICAgICAgICAgaWYgKFhGSVhOQVQgKEFSRUYgKGVsdCwgMSkpICE9IGNtcF9pdC0+bG9va2Jh Y2spCisgICAgICAgICAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgICAgICAgICAgICAg bGdzdHJpbmcgPSBtY19hdXRvY21wX2NoYXJzIChlbHQsIGNoYXJwb3MsIGJ5dGVwb3MsIGVuZHBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LCBmYWNlLCBzdHJp bmcpOworICAgICAgICAgICAgICBpZiAoY29tcG9zaXRpb25fZ3N0cmluZ19wIChsZ3N0cmluZykp CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGxnc3RyaW5nID0gUW5pbDsK KyAgICAgICAgICAgICAgLyogQ29tcG9zaXRpb24gZmFpbGVkIHBlcmhhcHMgYmVjYXVzZSB0aGUg Zm9udCBkb2Vzbid0CisgICAgICAgICAgICAgICAgIHN1cHBvcnQgc3VmZmljaWVudCByYW5nZSBv ZiBjaGFyYWN0ZXJzLiAgVHJ5IHRoZQorICAgICAgICAgICAgICAgICBvdGhlciBjb21wb3NpdGlv biBydWxlcyBpZiBhbnkuICAqLworICAgICAgICAgICAgfQorICAgICAgICAgIGNtcF9pdC0+cmV2 ZXJzZWRfcCA9IDA7CisgICAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAg IHB0cmRpZmZfdCBjcG9zID0gY2hhcnBvcywgYnBvcyA9IGJ5dGVwb3M7CisgICAgICAgICAgY21w X2l0LT5yZXZlcnNlZF9wID0gMTsKKyAgICAgICAgICBlbHQgPSBYQ0FSICh2YWwpOworICAgICAg ICAgIGlmIChjbXBfaXQtPmxvb2tiYWNrID4gMCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgY3BvcyA9IGNoYXJwb3MgLSBjbXBfaXQtPmxvb2tiYWNrOworICAgICAgICAgICAgICBpZiAo U1RSSU5HUCAoc3RyaW5nKSkKKyAgICAgICAgICAgICAgICBicG9zID0gc3RyaW5nX2NoYXJfdG9f Ynl0ZSAoc3RyaW5nLCBjcG9zKTsKKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAg IGJwb3MgPSBDSEFSX1RPX0JZVEUgKGNwb3MpOworICAgICAgICAgICAgfQorICAgICAgICAgIGxn c3RyaW5nID0gbWNfYXV0b2NtcF9jaGFycyAoZWx0LCBjcG9zLCBicG9zLCBjaGFycG9zICsgMSwg dywgZmFjZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyk7Cisg ICAgICAgICAgaWYgKCEgY29tcG9zaXRpb25fZ3N0cmluZ19wIChsZ3N0cmluZykKKyAgICAgICAg ICAgICAgfHwgY3BvcyArIExHU1RSSU5HX0NIQVJfTEVOIChsZ3N0cmluZykgLSAxICE9IGNoYXJw b3MpCisgICAgICAgICAgICAvKiBDb21wb3NpdGlvbiBmYWlsZWQgb3IgZGlkbid0IGNvdmVyIHRo ZSBjdXJyZW50CisgICAgICAgICAgICAgICBjaGFyYWN0ZXIuICAqLworICAgICAgICAgICAgZ290 byBub19jb21wb3NpdGlvbjsKKyAgICAgICAgfQorICAgICAgaWYgKE5JTFAgKGxnc3RyaW5nKSkK KyAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgICAgIGlmIChOSUxQIChMR1NUUklOR19J RCAobGdzdHJpbmcpKSkKKyAgICAgICAgbGdzdHJpbmcgPSBjb21wb3NpdGlvbl9nc3RyaW5nX3B1 dF9jYWNoZSAobGdzdHJpbmcsIC0xKTsKKyAgICAgIGNtcF9pdC0+aWQgPSBYRklYTlVNIChMR1NU UklOR19JRCAobGdzdHJpbmcpKTsKKyAgICAgIGZvciAoaSA9IDA7IGkgPCBMR1NUUklOR19HTFlQ SF9MRU4gKGxnc3RyaW5nKTsgaSsrKQorICAgICAgICBpZiAoTklMUCAoTEdTVFJJTkdfR0xZUEgg KGxnc3RyaW5nLCBpKSkpCisgICAgICAgICAgYnJlYWs7CisgICAgICBjbXBfaXQtPm5nbHlwaHMg PSBpOworICAgICAgY21wX2l0LT5mcm9tID0gMDsKKyAgICAgIGNtcF9pdC0+dG8gPSBpOworICAg IH0KKyAgZWxzZQorICAgIGdvdG8gbm9fY29tcG9zaXRpb247CisgIHJldHVybiAxOworIG5vX2Nv bXBvc2l0aW9uOgorICBpZiAoY2hhcnBvcyA9PSBlbmRwb3MpCisgICAgcmV0dXJuIDA7CisgIGlm IChjaGFycG9zIDwgZW5kcG9zKQorICAgIHsKKyAgICAgIGNoYXJwb3MrKzsKKyAgICAgIGlmIChO SUxQIChzdHJp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cDsKKyAgICAgICAgfQorICAgICAgLyogVGVzdCByZWFjaGluZyB0aGUgZ29hbCBjb2x1 bW4uICBXZSBkbyB0aGlzIGFmdGVyIHNraXBwaW5nCisgICBpbnZpc2libGUgY2hhcmFjdGVycywg c28gdGhhdCB3ZSBwdXQgcG9pbnQgYmVmb3JlIHRoZQorICAgY2hhcmFjdGVyIG9uIHdoaWNoIHRo ZSBjdXJzb3Igd2lsbCBhcHBlYXIuICovCisgICAgICBpZiAoY29sID49IGdvYWwpCisgICAgICAg IGJyZWFrOworICAgICAgcHJldl9jb2wgPSBjb2w7CisgICAgICB7IC8qIENoZWNrIGRpc3BsYXkg cHJvcGVydHkuICovCisgICAgICAgIHB0cmRpZmZfdCBlbmRwOworICAgICAgICBpbnQgd2lkdGgg PSBtY19jaGVja19kaXNwbGF5X3dpZHRoIChzY2FuLCBjb2wsICZlbmRwKTsKKyAgICAgICAgaWYg KHdpZHRoID49IDApCisgICAgICAgICAgeworICAgICAgICAgICAgY29sICs9IHdpZHRoOworICAg ICAgICAgICAgaWYgKGVuZHAgPiBzY2FuKSAvKiBBdm9pZCBpbmZpbml0ZSBsb29wcyB3aXRoIDAt d2lkdGggb3ZlcmxheXMuICovCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzY2Fu ID0gZW5kcDsKKyAgICAgICAgICAgICAgICBzY2FuX2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4p OworICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICB9CisgICAgICAgICAg fQorICAgICAgfQorICAgICAgLyogQ2hlY2sgY29tcG9zaXRpb24gc2VxdWVuY2UuICovCisgICAg ICBpZiAoY21wX2l0LmlkID49IDAKKyAgICAgICAgICB8fCAoc2NhbiA9PSBjbXBfaXQuc3RvcF9w b3MKKyAgICAgICAgICAgICAgJiYgbWNfY29tcG9zaXRpb25fcmVzZWF0X2l0ICgmY21wX2l0LCBz Y2FuLCBzY2FuX2J5dGUsIGVuZCwgdywgTlVMTCwgUW5pbCkpKQorICAgICAgICBjb21wb3NpdGlv bl91cGRhdGVfaXQgKCZjbXBfaXQsIHNjYW4sIHNjYW5fYnl0ZSwgUW5pbCk7CisgICAgICBpZiAo Y21wX2l0LmlkID49IDApCisgICAgICAgIHsKKyAgICAgICAgICBzY2FuICs9IGNtcF9pdC5uY2hh cnM7CisgICAgICAgICAgc2Nhbl9ieXRlICs9IGNtcF9pdC5uYnl0ZXM7CisgICAgICAgICAgaWYg KHNjYW4gPD0gZW5kKQorICAgICAgICAgICAgY29sICs9IGNtcF9pdC53aWR0aDsKKyAgICAgICAg ICBpZiAoY21wX2l0LnRvID09IGNtcF9pdC5uZ2x5cGhzKQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBjbXBfaXQuaWQgPSAtMTsKKyAgICAgICAgICAgICAgY29tcG9zaXRpb25fY29tcHV0 ZV9zdG9wX3BvcyAoJmNtcF9pdCwgc2Nhbiwgc2Nhbl9ieXRlLCBlbmQsIFFuaWwpOworICAgICAg ICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBjbXBfaXQuZnJvbSA9IGNt cF9pdC50bzsKKyAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgYyA9IEZFVENI X0JZVEUgKHNjYW5fYnl0ZSk7CisgICAgICAvKiBTZWUgaWYgdGhlcmUgaXMgYSBkaXNwbGF5IHRh YmxlIGFuZCBpdCByZWxhdGVzIHRvIHRoaXMgY2hhcmFjdGVyLiAqLworICAgICAgaWYgKGRwICE9 IDAKKyAgICAgICAgICAmJiAhIChtdWx0aWJ5dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQorICAg ICAgICAgICYmIFZFQ1RPUlAgKERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKSkpCisgICAgICAgIHsK KyAgICAgICAgICBMaXNwX09iamVjdCBjaGFydmVjOworICAgICAgICAgIHB0cmRpZmZfdCBpLCBu OworICAgICAgICAgIC8qIFRoaXMgY2hhcmFjdGVyIGlzIGRpc3BsYXllZCB1c2luZyBhIHZlY3Rv ciBvZiBnbHlwaHMuCisgICAgICAgICAgICAgVXBkYXRlIHRoZSBjb2x1bW4vcG9zaXRpb24gYmFz ZWQgb24gdGhvc2UgZ2x5cGhzLiAqLworICAgICAgICAgIGNoYXJ2ZWMgPSBESVNQX0NIQVJfVkVD VE9SIChkcCwgYyk7CisgICAgICAgICAgbiA9IEFTSVpFIChjaGFydmVjKTsKKyAgICAgICAgICBm b3IgKGkgPSAwOyBpIDwgbjsgaSsrKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBU aGlzIHNob3VsZCBiZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisgICAgICAgICAgICAgIG5leHRfZWxl bWVudF9mcm9tX2Rpc3BsYXlfdmVjdG9yIGRvZXMgaXQuICovCisgICAgICAgICAgICAgIExpc3Bf T2JqZWN0IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7CisgICAgICAgICAgICAgIGlmIChHTFlQ SF9DT0RFX1AgKGVudHJ5KSkKKyAgICAgICAgICAgICAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChl bnRyeSk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICBjID0gJyAnOworICAg ICAgICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsK KyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1xyJyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIs IHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQorICAgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsK KyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1x0JykKKyAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgICAgICAgICAgICAgY29sID0gY29s IC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgICAgICArK2NvbDsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgLyogVGhlIGRpc3Bs YXkgdGFibGUgZG9lc24ndCBhZmZlY3QgdGhpcyBjaGFyYWN0ZXI7CisgICAgICAgICAgICAgICBp dCBkaXNwbGF5cyBhcyBpdHNlbGYuICovCisgICAgICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAg ICAgICAgICAgICBnb3RvIGVuZGxvb3A7CisgICAgICAgICAgICBpZiAoYyA9PSAnXHInICYmIEVR IChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3BsYXkpLCBRdCkpCisgICAgICAg ICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgIGlmIChjID09ICdcdCcpCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgICAgICAg ICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAqIHRhYl93aWR0aDsKKyAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICBlbHNlIGlmIChtdWx0aWJ5dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQor ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8qIFN0YXJ0IG9mIG11bHRpLWJ5 dGUgZm9ybS4gKi8KKyAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKnB0cjsKKyAgICAg ICAgICAgICAgICAgIGludCBieXRlcywgd2lkdGg7CisgICAgICAgICAgICAgICAgICBwdHIgPSBC WVRFX1BPU19BRERSIChzY2FuX2J5dGUpOworICAgICAgICAgICAgICAgICAgTUNfTVVMVElCWVRF X0JZVEVTX1dJRFRIIChwdHIsIGRwLCBieXRlcywgd2lkdGgpOworICAgICAgICAgICAgICAgICAg LyogU3VidHJhY3Qgb25lIHRvIGNvbXBlbnNhdGUgZm9yIHRoZSBpbmNyZW1lbnQKKyAgICAgICAg ICAgICAgICAgIHRoYXQgaXMgZ29pbmcgdG8gaGFwcGVuIGJlbG93LiAqLworICAgICAgICAgICAg ICAgICAgc2Nhbl9ieXRlICs9IGJ5dGVzIC0gMTsKKyAgICAgICAgICAgICAgICAgIGNvbCArPSB3 aWR0aDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoY3RsX2Fy cm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3NykpCisgICAgICAgICAgICAgICAgICBjb2wgKz0g MjsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGMgPCAwNDAgfHwgYyA+PSAwMTc3KQorICAg ICAgICAgICAgICAgICAgICBjb2wgKz0gNDsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAg ICAgICAgICAgICAgICAgICAgIGNvbCsrOworICAgICAgICAgIH0KKyAgICAgIHNjYW4rKzsKKyAg ICAgIHNjYW5fYnl0ZSsrOworICAgIH0KKyBlbmRsb29wOgorICBsYXN0X2tub3duX2NvbHVtbiA9 IGNvbDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fcG9pbnQgPSBwdDsKKyAgbGFzdF9rbm93bl9jb2x1 bW5fbW9kaWZpZWQgPSBNT0RJRkY7CisgIGlmIChnb2FsY29sKQorICAgICpnb2FsY29sID0gY29s OworICBpZiAoZW5kcG9zKQorICAgICplbmRwb3MgPSBzY2FuOworICBpZiAocHJldmNvbCkKKyAg ICAqcHJldmNvbCA9IHByZXZfY29sOworfQorCitwdHJkaWZmX3QKK21jX2N1cnJlbnRfY29sdW1u IChzdHJ1Y3Qgd2luZG93ICp3LCBwdHJkaWZmX3QgcHQpCit7CisgIC8qIGBidWZfY2hhcnBvc190 b19ieXRlcG9zJzogIGVhc3NlcnQgKEJVRl9CRUcgKGIpIDw9IGNoYXJwb3MgJiYgY2hhcnBvcyA8 PSBCVUZfWiAoYikpOyAqLworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAody0+Y29udGVu dHMpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgaWYgKGIgIT0gY3Vy cmVudF9idWZmZXIpCisgICAgeworICAgICAgb2xkX2J1ZmZlciA9IGN1cnJlbnRfYnVmZmVyOwor ICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAoYik7CisgICAgfQorICBib29sIGJhcmZfY3Jhc2gg PSAoQlVGX0JFRyAoYikgPD0gcHQgJiYgcHQgPD0gQlVGX1ogKGIpKSA/IGZhbHNlIDogdHJ1ZTsK KyAgaWYgKGJhcmZfY3Jhc2gpCisgICAgeworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAg IHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAgICAgcmV0dXJuIDA7CisgICAg fQorICBFTUFDU19JTlQgbGFzdF9rbm93bl9jb2x1bW5fbW9kaWZpZWQgPSAwOworICBwdHJkaWZm X3QgbGFzdF9rbm93bl9jb2x1bW4gPSAwOworICBwdHJkaWZmX3QgY29sOworICB1bnNpZ25lZCBj aGFyICpwdHIsICpzdG9wOworICBib29sIHRhYl9zZWVuOworICBwdHJkaWZmX3QgcG9zdF90YWI7 CisgIGludCBjOworICBpbnQgdGFiX3dpZHRoID0gU0FORV9UQUJfV0lEVEggKGN1cnJlbnRfYnVm ZmVyKTsKKyAgYm9vbCBjdGxfYXJyb3cgPSAhTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIGN0 bF9hcnJvdykpOworICBzdHJ1Y3QgTGlzcF9DaGFyX1RhYmxlICpkcCA9IGJ1ZmZlcl9kaXNwbGF5 X3RhYmxlICgpOworICBpZiAocHQgPT0gbGFzdF9rbm93bl9jb2x1bW5fcG9pbnQKKyAgICAgICYm IE1PRElGRiA9PSBsYXN0X2tub3duX2NvbHV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GVy IHRvIHdoZXJlIGNvbnNlY3V0aXZlIGNoYXJzIGxlYXZlIG9mZiwKKyAgICAgZ29pbmcgYmFja3dh cmRzIGZyb20gcG9pbnQuICovCisgIGlmIChwdCA9PSBCRUdWKQorICAgIHN0b3AgPSBwdHI7Cisg ICAgZWxzZSBpZiAocHQgPD0gR1BUIHx8IEJFR1YgPiBHUFQpCisgICAgICBzdG9wID0gQkVHVl9B RERSOworICAgICAgZWxzZQorICAgICAgICBzdG9wID0gR0FQX0VORF9BRERSOworICBjb2wgPSAw LCB0YWJfc2VlbiA9IDAsIHBvc3RfdGFiID0gMDsKKyAgd2hpbGUgKDEpCisgICAgeworICAgICAg cHRyZGlmZl90IGksIG47CisgICAgICBMaXNwX09iamVjdCBjaGFydmVjOworICAgICAgaWYgKHB0 ciA9PSBzdG9wKQorICAgICAgICB7CisgICAgICAgICAgLyogV2Ugc3RvcHBlZCBlaXRoZXIgZm9y IHRoZSBiZWdpbm5pbmcgb2YgdGhlIGJ1ZmZlcgorICAgICAgICAgICAgIG9yIGZvciB0aGUgZ2Fw LiAqLworICAgICAgICAgIGlmIChwdHIgPT0gQkVHVl9BRERSKQorICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgLyogSXQgd2FzIHRoZSBnYXAuICBKdW1wIGJhY2sgb3ZlciBpdC4gKi8KKyAg ICAgICAgICBzdG9wID0gQkVHVl9BRERSOworICAgICAgICAgIHB0ciA9IEdQVF9BRERSOworICAg ICAgICAgIC8qIENoZWNrIHdoZXRoZXIgdGhhdCBicmluZ3MgdXMgdG8gYmVnaW5uaW5nIG9mIGJ1 ZmZlci4gKi8KKyAgICAgICAgICBpZiAoQkVHViA+PSBHUFQpCisgICAgICAgICAgICBicmVhazsK KyAgICAgICAgfQorICAgICAgYyA9ICotLXB0cjsKKyAgICAgIGlmIChkcCAmJiBWRUNUT1JQIChE SVNQX0NIQVJfVkVDVE9SIChkcCwgYykpKQorICAgICAgICB7CisgICAgICAgICAgY2hhcnZlYyA9 IERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKTsKKyAgICAgICAgICBuID0gQVNJWkUgKGNoYXJ2ZWMp OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBjaGFy dmVjID0gUW5pbDsKKyAgICAgICAgICAgIG4gPSAxOworICAgICAgICAgIH0KKyAgICAgIGZvciAo aSA9IG4gLSAxOyBpID49IDA7IC0taSkKKyAgICAgICAgeworICAgICAgICAgIGlmIChWRUNUT1JQ IChjaGFydmVjKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyogVGhpcyBzaG91bGQg YmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAgICAgICAgICBuZXh0X2VsZW1lbnRfZnJvbV9kaXNw bGF5X3ZlY3RvciBkb2VzIGl0LiAqLworICAgICAgICAgICAgICBMaXNwX09iamVjdCBlbnRyeSA9 IEFSRUYgKGNoYXJ2ZWMsIGkpOworICAgICAgICAgICAgICBpZiAoR0xZUEhfQ09ERV9QIChlbnRy eSkpCisgICAgICAgICAgICAgICAgYyA9IEdMWVBIX0NPREVfQ0hBUiAoZW50cnkpOworICAgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGMgPSAnICc7CisgICAgICAgICAgICB9 CisgICAgICAgICAgaWYgKGMgPj0gMDQwICYmIGMgPCAwMTc3KQorICAgICAgICAgICAgY29sKys7 CisgICAgICAgICAgICBlbHNlIGlmIChjID09ICdcbicKKyAgICAgICAgICAgICAgICAgICAgIHx8 IChjID09ICdccicKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVu dF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKSkKKyAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgIHB0cisrOworICAgICAgICAgICAgICAgIGdvdG8gc3RhcnRfb2ZfbGluZV9m b3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChjID09ICdcdCcp CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKHRhYl9zZWVuKQorICAg ICAgICAgICAgICAgICAgICBjb2wgPSAoKGNvbCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICog dGFiX3dpZHRoOworICAgICAgICAgICAgICAgICAgcG9zdF90YWIgKz0gY29sOworICAgICAgICAg ICAgICAgICAgY29sID0gMDsKKyAgICAgICAgICAgICAgICAgIHRhYl9zZWVuID0gMTsKKyAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoVkVDVE9SUCAoY2hhcnZlYykp CisgICAgICAgICAgICAgICAgICAvKiBXaXRoIGEgZGlzcGxheSB0YWJsZSBlbnRyeSwgQyBpcyBk aXNwbGF5ZWQgYXMgaXMsIGFuZAorICAgICAgICAgICAgICAgICAgICAgbm90IGRpc3BsYXllZCBh cyBcTk5OIG9yIGFzIF5OLiAgSWYgQyBpcyBhIHNpbmdsZS1ieXRlCisgICAgICAgICAgICAgICAg ICAgICBjaGFyYWN0ZXIsIGl0IHRha2VzIG9uZSBjb2x1bW4uICBJZiBDIGlzIG11bHRpLWJ5dGUg aW4KKyAgICAgICAgICAgICAgICAgICAgIGEgdW5pYnl0ZSBidWZmZXIsIGl0J3MgdHJhbnNsYXRl ZCB0byB1bmlieXRlLCBzbyBpdAorICAgICAgICAgICAgICAgICAgICAgYWxzbyB0YWtlcyBvbmUg Y29sdW1uLiAqLworICAgICAgICAgICAgICAgICAgKytjb2w7CisgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgIGNvbCArPSAoY3RsX2Fycm93ICYmIGMgPCAwMjAwKSA/ IDIgOiA0OworICAgICAgICB9CisgICAgfQorIHN0YXJ0X29mX2xpbmVfZm91bmQ6CisgIGlmICh0 YWJfc2VlbikKKyAgICB7CisgICAgICBjb2wgPSAoKGNvbCArIHRhYl93aWR0aCkgLyB0YWJ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QSAoRnByaW4xX3RvX3N0cmluZyAod2luZG93LCBRbmlsKSk7 Cit9CisKKy8qIFVTQUdFOiAgZnByaW50ZiAoc3RkZXJyLCAiQ0hBUkFDVEVSICglcykiLCBtY19j aGFyX3RvX3N0cmluZyAoZ2x5cGgtPnUuY2gpKTsgKi8KK2NoYXIgKgorbWNfY2hhcl90b19zdHJp bmcgKGludCBhcmcpCit7CisgIExpc3BfT2JqZWN0IGNoYXJhY3RlciA9ICgwIDw9IGFyZyAmJiBh cmcgPD0gTUFYX0NIQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICA/IEZjaGFyX3RvX3N0 cmluZyAobWFrZV9maXhudW0gKGFyZykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFu aWw7CisgIGNoYXIgKiByZXN1bHQgPSAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAg ICAgICAmJiBhcmcgPT0gOSkKKyAgICAgICAgICAgICAgICAgICAgPyAiXFx0IgorICAgICAgICAg ICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICYmIGFy ZyA9PSAxMCkKKyAgICAgICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgICAgICAgICAg OiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyA9PSAzMikK KyAgICAgICAgICAgICAgICAgICAgPyAiXFxzIgorICAgICAgICAgICAgICAgICAgOiAoIU5JTFAg KGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyAhPSA5CisgICAgICAgICAg ICAgICAgICAgICAmJiBhcmcgIT0gMTAKKyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyAhPSAz MikKKyAgICAgICAgICAgICAgICAgICAgPyBTU0RBVEEgKGNoYXJhY3RlcikKKyAgICAgICAgICAg ICAgICAgIDogIlxcPyI7CisgIHJldHVybiByZXN1bHQ7Cit9CisKK2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S VElDQUxfUlVMRVI6IHJldHVybiAiVkVSVElDQUxfUlVMRVIiOworICAgICAgY2FzZSBGSUxMX0NP TFVNTjogcmV0dXJuICJGSUxMX0NPTFVNTiI7CisgICAgICBjYXNlIENVUlNPUl9JTkRJQ0FUT1I6 IHJldHVybiAiQ1VSU09SX0lORElDQVRPUiI7CisgICAgICBkZWZhdWx0OgorICAgICAgcmV0dXJu ICJVTktOT1dOIjsKKyAgICB9Cit9CisKKy8qIFVTQUdFOiAgZnByaW50ZiAoc3RkZXJyLCAiRlJP TV9XSEVSRSAoJXMpIiwgbWNfZHJhd19yb3dfdHlwZV90b19zdHJpbmcgKGFyZykpOyAqLworY2hh ciAqCittY19kcmF3X3Jvd190eXBlX3RvX3N0cmluZyAoZW51bSBtY19kcmF3X3Jvd190eXBlIGZy b21fd2hlcmUpCit7CisgIHN3aXRjaCAoZnJvbV93aGVyZSkKKyAgICB7CisgICAgICBjYXNlIE5P V0hFUkU6IHJldHVybiAiTk9XSEVSRSI7CisgICAgICBjYXNlIFNDUklCRV9PTkU6IHJldHVybiAi U0NSSUJFX09ORSI7CisgICAgICBjYXNlIFNDUklCRV9UV086IHJldHVybiAiU0NSSUJFX1RXTyI7 CisgICAgICBjYXNlIFNDUklCRV9USFJFRTogcmV0dXJuICJTQ1JJQkVfVEhSRUUiOworICAgICAg Y2FzZSBTS0lQUEVEOiByZXR1cm4gIlNLSVBQRUQiOworICAgICAgY2FzZSBQT1NUX0NIQU5HRUQ6 IHJldHVybiAiUE9TVF9DSEFOR0VEIjsKKyAgICAgIGNhc2UgVU5DSEFOR0VEOiByZXR1cm4gIlVO Q0hBTkdFRCI7CisgICAgICBjYXNlIFNFVF9DVVJTT1JfT05FOiByZXR1cm4gIlNFVF9DVVJTT1Jf T05FIjsKKyAgICAgIGNhc2UgU0VUX0NVUlNPUl9UV086IHJldHVybiAiU0VUX0NVUlNPUl9UV08i OworICAgICAgZGVmYXVsdDoKKyAgICAgIHJldHVybiAiVU5LTk9XTiI7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XgudnBvc19hbGxvY2F0ZWQ7CisgIGludCB2cG9zX3VzZWQgPSB3LT5t Y19tYXRyaXgudnBvc191c2VkOworICBmcHJpbnRmIChzdGRlcnIsICIlczogIG1hdHJpeC52cG9z X2FsbG9jYXRlZCAoJWQpIHwgbWF0cml4LnZwb3NfdXNlZCAoJWQpXG4iLAorICAgICAgICAgICAg ICAgICAgIG1jX3dpbmRvdyAodyksIHZwb3NfYWxsb2NhdGVkLCB2cG9zX3VzZWQpOworICBmb3Ig KGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVf dHlwZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBpbnQg Y3Vyc29yc191c2VkID0gdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAg ICAgIGZwcmludGYgKHN0ZGVyciwgIiAgbWF0cml4LmN1cnNvcnNfdXNlZFslc10gKCVkKVxuIiwK KyAgICAgICAgICAgICAgICAgICAgICAgbWNfY2FjaGVfdHlwZV90b19zdHJpbmcgKGNhY2hlX3R5 cGUpLCBjdXJzb3JzX3VzZWQpOworICAgIH0KKyAgZm9yIChpbnQgdm50aCA9IDA7CisgICAgICAg dm50aCA8IHctPm1jX21hdHJpeC52cG9zX3VzZWQ7CisgICAgICAgKyt2bnRoKQorICAgIHsKKyAg ICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAg ICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICArK2NhY2hlX3R5cGUpCisg ICAgICAgIHsKKyAgICAgICAgICBpbnQgY2FjaGVfYWxsb2NhdGVkID0gdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdOworICAgICAgICAgIGludCBjYWNo ZV91c2VkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXTsK KyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgdm50aCAoJWQpIHwgY2FjaGVfYWxsb2Nh dGVkWyVzXSAoJWQpIHwgY2FjaGVfdXNlZFslc10gKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIHZudGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19jYWNoZV90eXBl X3RvX3N0cmluZyAoY2FjaGVfdHlwZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNo ZV9hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3Rv X3N0cmluZyAoY2FjaGVfdHlwZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZV91 c2VkKTsKKyAgICAgICAgfQorICAgIH0KK30KKwordm9pZAorbWNfc2V0X2xzbF9iZyAoc3RydWN0 IHdpbmRvdyAqdywgZW51bSBmYWNlX2lkIGZhY2VfaWQsIHN0cnVjdCBtY19SR0IgKmxzbCkKK3sK KyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIHN0cnVjdCBmYWNlICpm YWNlOworICBpZiAoIU5JTFAgKFZmYWNlX3JlbWFwcGluZ19hbGlzdCkKKyAgICAgICYmIChmYWNl X2lkID09IERFRkFVTFRfRkFDRV9JRCAvKiBRZGVmYXVsdCAqLworICAgICAgICAgIHx8IGZhY2Vf aWQgPT0gTU9ERV9MSU5FX0ZBQ0VfSUQgLyogUW1vZGVfbGluZSAqLworICAgICAgICAgIHx8IGZh Y2VfaWQgPT0gTU9ERV9MSU5FX0lOQUNUSVZFX0ZBQ0VfSUQgLyogUW1vZGVfbGluZV9pbmFjdGl2 ZSAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gSEVBREVSX0xJTkVfRkFDRV9JR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GUk9NX0lEIChmLCBsb29rdXBfYmFzaWNfZmFjZSAodywgZiwgZmFj ZV9pZCkpOworICAgIGVsc2UKKyAgICAgIGZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGZhY2VfaWQp OworICBMaXNwX09iamVjdCBjb2xvciA9IChmYWNlICE9IE5VTEwpCisgICAgICAgICAgICAgICAg ICAgICAgPyBmYWNlLT5sZmFjZVtMRkFDRV9CQUNLR1JPVU5EX0lOREVYXQorICAgICAgICAgICAg ICAgICAgICAgIDogYnVpbGRfc3RyaW5nICgiT3JhbmdlUmVkIik7CisgIG1jX3h3X2NvbG9yX3Zh bHVlcyAodywgY29sb3IsIGxzbCk7Cit9CisKK3ZvaWQKK21jX3NldF9lc3NlbnRpYWxzIChzdHJ1 Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgbWNfZXNzZW50aWFscyAqZXNzZW50aWFscykKK3sKKyAgaWYg KCFCVUZGRVJQICh3LT5jb250ZW50cykpCisgICAgcmV0dXJuOworICBpZiAoTklMUCAoQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAmJiBOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkKKyAgICByZXR1cm47CisgIHN0cnVj dCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBlc3NlbnRpYWxzLT5hY3RpdmVfcCA9 ICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVkX3dpbmRvdykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgZiA9PSBGUkFNRV9ESVNQTEFZX0lORk8gKGYpLT5oaWdobGlnaHRfZnJhbWUpOwor ICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAody0+Y29udGVudHMpOworICBzdHJ1Y3QgYnVm ZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgcHRyZGlmZl90IG9wb2ludCA9ICh3ID09IFhXSU5E T1cgKHNlbGVjdGVkX3dpbmRvdykpCisgICAgICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAg ICAgICAgICAgICAgICA6IFhGSVhOVU0gKEZtYXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOwor ICBwdHJkaWZmX3QgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgb3BvaW50KTsK KyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBib29s IGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZp bGxfY29sID0gWEZJWE5VTSAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGhzY2xfeCA9 IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFyX3dpZHRoOworICBpZiAoYiAhPSBjdXJyZW50X2J1ZmZl cikKKyAgICB7CisgICAgICBvbGRfYnVmZmVyID0gY3VycmVudF9idWZmZXI7CisgICAgICBzZXRf YnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9CisgIGVzc2VudGlhbHMtPnp2ID0gWlY7CisgIGVz c2VudGlhbHMtPnp2X2J5dGUgPSBaVl9CWVRFOworICBlc3NlbnRpYWxzLT5mY194ID0gKGZpbGxf Y29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoVmRpc3BsYXlfbGluZV9u dW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAgICAgPyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFy X3dpZHRoKSArIHctPm1jLmxudW1fcGl4ZWxfd2lkdGggLSBoc2NsX3gKKyAgICAgICAgICAgICAg ICAgICAgIDogKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIE5JTFAg KFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisgICAgICAgICAgICAgICAgICAgICAgID8gKGZpbGxf Y29sICogZnJhbWVfY2hhcl93aWR0aCkgLSBoc2NsX3gKKyAgICAgICAgICAgICAgICAgICAgIDog MDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZl cik7CisgIGVudW0gZmFjZV9pZCBmaWxsX2NvbHVtbl9wcmVfenZfZmFjZV9pZCA9CisgICAgKCFl c3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBmY19pbmFjdGl2ZV93aW5kb3dzKSkKKyAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCJmYy1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAgIDog KCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChC VkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNz ZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAo ImZjLW9wb2ludC1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKGVzc2VudGlh bHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJWQVI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l2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAmJiBOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgID8gbG9va3VwX25hbWVk X2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXBvc3QtenYtZmFjZSIpLCB0cnVlKQor ICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVG RkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFO SUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLngg PT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoImZjLW9wb2ludC1pbmFjdGl2ZS1wb3N0LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6IChl c3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0 aWNhbF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNzZW50aWFscy0+ZmNfeCkK KyAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLW9wb2ludC1wb3N0 LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICA6ICghZXNzZW50aWFscy0+YWN0aXZlX3AKKyAgICAgICAm JiAhTklMUC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HQiAqbHNsX2ZnLCBpbnQgcG9zaW50LCBl bnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICBlbnVt IG1jX3Jvd19wb3NpdGlvbiByb3dfcG9zaXRpb24sIGVudW0gbWNfZW5naW5lX3R5cGUgYWN0aW9u X3R5cGUpCit7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKyAgICBjYXNlIE1VTFRJUExF X0NVUlNPUlM6CisgICAgeworICAgICAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFt ZSk7CisgICAgICBwdHJkaWZmX3QgY3VycmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywg cG9zaW50KTsKKyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7 CisgICAgICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4p KTsKKyAgICAgIGludCBmaWxsX2NvbCA9IChmaWxsX2NvbHVtbl9wKQorICAgICAgICAgICAgICAg ICAgICAgPyBYRklYTlVNIChCVkFSIChiLCBmaWxsX2NvbHVtbikpCisgICAgICAgICAgICAgICAg ICAgICA6IDA7CisgICAgICBlbnVtIGZhY2VfaWQgZXZlbl9mYWNlX2lkID0KKyAgICAgICAgKCFl c3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgID8gbG9va3VwX25hbWVk X2ZhY2UgKHcsIGYsIGludGVybiAoIistZXZlbi1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVl KQorICAgICAgICA6IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWV2ZW4tcHJl LXp2LWZhY2UiKSwgdHJ1ZSk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0KKyAgICAgICAgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAg ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93 aW5kb3dzKSkpCisgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist cG9zdC1maWxsLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcG9zdC1maWxsLXByZS16di1mYWNlIiksIHRy dWUpOworICAgICAgc3RydWN0IGZhY2UgKmJleW9uZF9maWxsX2ZhY2UgPSBGQUNFX0ZST01fSUQg KGYsIGJleW9uZF9maWxsX2ZhY2VfaWQpOworICAgICAgTGlzcF9PYmplY3QgYmV5b25kX2ZpbGxf Y29sb3IgPSBiZXlvbmRfZmlsbF9mYWNlLT5sZmFjZVtMRkFDRV9GT1JFR1JPVU5EX0lOREVYXTsK KyAgICAgIHN0cnVjdCBtY19SR0IgYmV5b25kX2ZpbGxfZm9yZWdyb3VuZDsKKyAgICAgIG1jX3h3 X2NvbG9yX3ZhbHVlcyAodywgYmV5b25kX2ZpbGxfY29sb3IsICZiZXlvbmRfZmlsbF9mb3JlZ3Jv dW5kKTsKKyAgICAgIC8qIHJlZCAqLworICAgICAgaWYgKCghZmlsbF9jb2x1bW5fcAorICAgICAg ICAgICAmJiBjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgICAgICAmJiByb3dfcG9zaXRpb24g PT0gUFJFX1pWKQorICAgICAgICAgIHx8IChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICYm IGN1cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZp bGxfY29sCisgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpKQorICAgICAg ICB7CisgICAgICAgICAgbHNsX2ZnLT5yZWQgPSBvZGRfZm9yZWdyb3VuZC5yZWQ7CisgICAgICAg ICAgbHNsX2ZnLT5ncmVlbiA9IG9kZF9mb3JlZ3JvdW5kLmdyZWVuOworICAgICAgICAgIGxzbF9m Zy0+Ymx1ZSA9IG9kZF9mb3JlZ3JvdW5kLmJsdWU7CisgICAgICAgIH0KKyAgICAgICAgLyogeWVs bG93ICovCisgICAgICAgIGVsc2UgaWYgKCghZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAg ICAgJiYgY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICAgICAgICAgICAgICYmIHJvd19wb3Np dGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgICAgICAgIHx8IChmaWxsX2NvbHVtbl9wCisgICAg ICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAg ICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmlsbF9jb2wKKyAgICAgICAgICAgICAgICAgICAgICYm IHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGxzbF9m Zy0+cmVkID0gZXZlbl9mb3JlZ3JvdW5kLnJlZDsKKyAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4g PSBldmVuX2ZvcmVncm91bmQuZ3JlZW47CisgICAgICAgICAgICBsc2xfZmctPmJsdWUgPSBldmVu X2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgICB9CisgICAgICAgICAgLyogZ3JlZW4gKi8KKyAg ICAgICAgICBlbHNlIGlmIChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgJiYgY3Vy cmVudF9jb2wgPiBmaWxsX2NvbAorICAgICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9 PSBQUkVfWlYpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gYmV5 b25kX2ZpbGxfZm9yZWdyb3VuZC5yZWQ7CisgICAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBi ZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLmdyZWVuOworICAgICAgICAgICAgICBsc2xfZmctPmJsdWUg PSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLmJsdWU7CisgICAgICAgICAgICB9CisgICAgICAgICAg ICBlbHNlIGlmIChyb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICBsc2xfZmctPnJlZCA9IGVzc2VudGlhbHMuc3BfZmcucmVkOworICAgICAgICAg ICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBlc3NlbnRpYWxzLnNwX2ZnLmdyZWVuOworICAgICAgICAg ICAgICAgIGxzbF9mZy0+Ymx1ZSA9IGVzc2VudGlhbHMuc3BfZmcuYmx1ZTsKKyAgICAgICAgICAg ICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAg ICB7CisgICAgICBpZiAoZ2x5cGggIT0gTlVMTAorICAgICAgICAgICYmIGdseXBoLT51LmNoID09 IDk1CisgICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfSEJBUikKKyAgICAgICAgeworICAg ICAgICAgIGxzbF9mZy0+cmVkID0gZXNzZW50aWFscy5zcF9mZy5yZWQ7CisgICAgICAgICAgbHNs X2ZnLT5ncmVlbiA9IGVzc2VudGlhbHMuc3BfZmcuZ3JlZW47CisgICAgICAgICAgbHNsX2ZnLT5i bHVlID0gZXNzZW50aWFscy5zcF9mZy5ibHVlOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAg ICAgICAgICB7CisgICAgICAgICAgICBsc2xfZmctPnJlZCA9IGVzc2VudGlhbHMuY2hfZmdbcm93 X3Bvc2l0aW9uXS5yZWQ7CisgICAgICAgICAgICBsc2xfZmctPmdyZWVuID0gZXNzZW50aWFscy5j aF9mZ1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HgsIGxhc3RfeCk7 CisgIGlmICh0YWlsKQorICAgIHsKKyAgICAgIHMgPSBnbHlwaF9zdHJpbmdfY29udGFpbmluZ19i YWNrZ3JvdW5kX3dpZHRoICh0YWlsKTsKKyAgICAgIHhfcmVhY2hlZCA9IHMtPnggKyBzLT5iYWNr Z3JvdW5kX3dpZHRoOworICAgIH0KKyAgICBlbHNlCisgICAgICB4X3JlYWNoZWQgPSB4OworICAv KiBJZiB0aGVyZSBhcmUgYW55IGdseXBocyB3aXRoIGxiZWFyaW5nIDwgMCBvciByYmVhcmluZyA+ IHdpZHRoIGluCisgICAgIHRoZSByb3csIHJlZHJhdyBzb21lIGdseXBocyBpbiBmcm9udCBvciBm b2xsb3dpbmcgdGhlIGdseXBoCisgICAgIHN0cmluZ3MgYnVpbHQgYWJvdmUuICovCisgIGlmICho ZWFkICYmICFvdmVybGFwcyAmJiByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wKQor ICAgIHsKKyAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKmgsICp0OworICAgICAgTW91c2VfSExJ bmZvICpobGluZm8gPSBNT1VTRV9ITF9JTkZPIChmKTsKKyAgICAgIGludCBtb3VzZV9iZWdfY29s IFVOSU5JVCwgbW91c2VfZW5kX2NvbCBVTklOSVQ7CisgICAgICBib29sIGNoZWNrX21vdXNlX2Zh Y2UgPSBmYWxzZTsKKyAgICAgIGludCBkdW1teV94ID0gMDsKKyAgICAgIC8qIElmIG1vdXNlIGhp Z2hsaWdodGluZyBpcyBvbiwgd2UgbWF5IG5lZWQgdG8gZHJhdyBhZGphY2VudAorICAgZ2x5cGhz IHVzaW5nIG1vdXNlLWZhY2UgaGlnaGxpZ2h0aW5nLiAqLworICAgICAgaWYgKGFyZWEgPT0gVEVY VF9BUkVBICYmIHJvdy0+bW91c2VfZmFjZV9wCisgICAgICAgICAgJiYgaGxpbmZvLT5tb3VzZV9m YWNlX2JlZ19yb3cgPj0gMAorICAgICAgICAgICYmIGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93 ID49IDApCisgICAgICAgIHsKKyAgICAgICAgICBwdHJkaWZmX3Qgcm93X3Zwb3MgPSBNQVRSSVhf Uk9XX1ZQT1MgKHJvdywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgICAgICAgIGlmIChyb3dfdnBv cyA+PSBobGluZm8tPm1vdXNlX2ZhY2VfYmVnX3JvdworICAgICAgICAgICAgICAmJiByb3dfdnBv cyA8PSBobGluZm8tPm1vdXNlX2ZhY2VfZW5kX3JvdykKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgY2hlY2tfbW91c2VfZmFjZSA9IHRydWU7CisgICAgICAgICAgICAgIG1vdXNlX2JlZ19j b2wgPSAocm93X3Zwb3MgPT0gaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19yb3cpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfY29sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgICAgICAgICAgICAgIG1vdXNlX2VuZF9jb2wg PSAocm93X3Zwb3MgPT0gaGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfY29sCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IHJvdy0+dXNlZFtURVhUX0FSRUFdOworICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgICAvKiBDb21wdXRlIG92ZXJoYW5ncyBmb3IgYWxsIGdseXBoIHN0 cmluZ3MuICovCisgICAgICBpZiAoRlJBTUVfUklGIChmKS0+Y29tcHV0ZV9nbHlwaF9zdHJpbmdf b3ZlcmhhbmdzKQorICAgICAgICBmb3IgKHMgPSBoZWFkOyBzOyBzID0gcy0+bmV4dCkKKyAgICAg ICAgICBGUkFNRV9SSUYgKGYpLT5jb21wdXRlX2dseXB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Bj YXNlIG9jY3VycyBpbgorICAgICAgICAgICAgIHByYWN0aWNlLCBzbyB3ZSdsbCBzdGljayB0byB0 aGlzIGZvciBub3cuICAtLS0gY3lkICAqLworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNl CisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBzdGFydCAmJiBtb3VzZV9lbmRfY29s ID4gaSkKKyAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01PVVNFX0ZBQ0U7CisgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX05PUk1BTF9URVhUOwor ICAgICAgICAgIGlmIChobCAhPSBvdmVybGFwX2hsKQorICAgICAgICAgICAgY2xpcF9oZWFkID0g aGVhZDsKKyAgICAgICAgICBqID0gaTsKKyAgICAgICAgICBNQ19CVUlMRF9HTFlQSF9TVFJJTkdT IChqLCBzdGFydCwgaCwgdCwgb3ZlcmxhcF9obCwgZHVtbXlfeCwgbGFzdF94KTsKKyAgICAgICAg ICAvKiBUaGUgYGxlZnRfb3ZlcndyaXR0ZW5gIGJlaGF2aW9yIHRoYXQgZXJhc2VzIHRoZSBmYWtl IGN1cnNvcnMgdHJhY2VzIHRvCisgICAgICAgICAgYGZvbnQtPmRyaXZlci0+ZHJhd2AgaW4gYG5z X2RyYXdfZ2x5cGhfc3RyaW5nJzsgYW5kLCB0aGUgaGVpZ2h0IG9mIHRoZSByZWN0YW5nbGUKKyAg ICAgICAgICBkcmF3biBieSBgbnNfZHVtcGdseXBoc19zdHJldGNoJzsgYW5kLCBgbnNfbWF5YmVf ZHVtcGdseXBoc19iYWNrZ3JvdW5kJyB3aGljaAorICAgICAgICAgIGVyYXNlcyB0aGUgYXBwbGlj YWJsZSByZWN0YW5nbGUuICovCisgICAgICAgICAgLyogRVhBTVBMRTogIAlNCisgICAgICAgICAg SW4gdGhpcyBleGFtcGxlLCB3ZSBoYXZlIGEgdmlzaWJsZSAxODcgKMK7KSB0aGF0IGlzIGZvbGxv d2VkIGJ5IGEgdmlzaWJsZQorICAgICAgICAgIFRBQl9TVFJFVENIIChhcyBhIHJlc3VsdCBvZiBh IGNvcnJlc3BvbmRpbmcgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeSksCisgICAgICAgICAg Zm9sbG93ZWQgYnkgd2lkZSAiTSIsIGZvbGxvd2VkIGJ5IGEgc3BhY2UgYXQgdGhlIGVuZCBvZiB0 aGUgZ2x5cGggcm93CisgICAgICAgICAgKHdoaWNoIGhhcyBubyBidWZmZXIgcG9zaXRpb24pLiAg V2hlbiBwbGFjaW5nIGEgZmFrZSBjdXJzb3Igb24gdGhlICJNIiwKKyAgICAgICAgICBobCA9PSBE UkFXX0NVUlNPUiBhbmQgdGhlIFNUUkVUQ0hfR0xZUEggaXMgYGxlZnRfb3ZlcndyaXR0ZW5gLiAg RHJhd2luZworICAgICAgICAgIG5vcm1hbCB0ZXh0IGR1cmluZyBgdXBkYXRlX3dpbmRvdycgKERS QVdfTk9STUFMX1RFWFQpIGNhbiBhbHNvIGVyYXNlIGZha2UKKyAgICAgICAgICBjdXJzb3JzIHRo YXQgYXJlIGBsZWZ0X292ZXJ3cml0dGVuJy4gKi8KKyAgICAgICAgICBsZW5ndGggPSAwOworICAg ICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgICAgeworICAgICAg ICAgICAgICBzLT5sZWZ0X292ZXJ3cml0dGVuX3AgPSB0cnVlOworICAgICAgICAgICAgICBzLT5h Y3Rpb25fdHlwZSA9IGFjdGlvbl90eXBlOworICAgICAgICAgICAgICBsZW5ndGggKz0gcy0+Zmly c3RfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICAgIHJlbGF0aXZl X3ggPSBzdGFydF94IC0gbGVuZ3RoOworICAgICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBzLT5u ZXh0KQorICAgICAgICAgICAg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kKKyAgICAgICAgewor ICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlm IChjaGVja19tb3VzZV9mYWNlCisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBzdGFy dCAmJiBtb3VzZV9lbmRfY29sID4gaSkKKyAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01P VVNFX0ZBQ0U7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBE UkFXX05PUk1BTF9URVhUOworICAgICAgICAgIGlmIChobCA9PSBvdmVybGFwX2hsIHx8IGNsaXBf aGVhZCA9PSBOVUxMKQorICAgICAgICAgICAgY2xpcF9oZWFkID0gaGVhZDsKKyAgICAgICAgICBN Q19CVUlMRF9HTFlQSF9TVFJJTkdTIChpLCBzdGFydCwgaCwgdCwgb3ZlcmxhcF9obCwgZHVtbXlf eCwgbGFzdF94KTsKKyAgICAgICAgICBmb3IgKHMgPSBoOyBzOyBzID0gcy0+bmV4dCkKKyAgICAg ICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgICAgIGNvbXB1dGVf b3ZlcmhhbmdzX2FuZF94ICh0LCBoZWFkLT54LCB0cnVlKTsKKyAgICAgICAgICBwcmVwZW5kX2ds eXBoX3N0cmluZ19saXN0cyAoJmhlYWQsICZ0YWlsLCBoLCB0KTsKKyAgICAgICAgfQorICAgICAg LyogQXBwZW5kIGdseXBocyBzdHJpbmdzIGZvciBnbHlwaHMgZm9sbG93aW5nIHRoZSBsYXN0IGds eXBoCisgICAgICBzdHJpbmcgdGFpbCB0aGF0IGFyZSBvdmVyd3JpdHRlbiBieSB0YWlsLiAgVGhl IGJhY2tncm91bmQgb2YKKyAgICAgIHRoZXNlIHN0cmluZ3MgaGFzIHRvIGJlIGRyYXduIGJlY2F1 c2UgdGFpbCdzIGZvcmVncm91bmQgZHJhd3MKKyAgICAgIG92ZXIgaXQuICovCisgICAgICBpID0g cmlnaHRfb3ZlcndyaXR0ZW4gKHRhaWwpOworICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgewor ICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlm IChjaGVja19tb3VzZV9mYWNlCisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBpICYm IG1vdXNlX2VuZF9jb2wgPiBlbmQpCisgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19NT1VT RV9GQUNFOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJB V19OT1JNQUxfVEVYVDsKKyAgICAgICAgICBpZiAoaGwgIT0gb3ZlcmxhcF9obCkKKyAgICAgICAg ICAgIGNsaXBfdGFpbCA9IHRhaWw7CisgICAgICAgICAgTUNfQlVJTERfR0xZUEhfU1RSSU5HUyAo ZW5kLCBpLCBoLCB0LCBvdmVybGFwX2hsLCB4LCBsYXN0X3gpOworICAgICAgICAvKiBUaGUgYHJp Z2h0X292ZXJ3cml0dGVuYCBiZWhhdmlvciB0aGF0IGVyYXNlcyB0aGUgZmFrZSBjdXJzb3JzIHRy YWNlcyB0bworICAgICAgICBgZm9udC0+ZHJpdmVyLT5kcmF3YCBpbiBgbnNfZHJhd19nbHlwaF9z dHJpbmcnOyBhbmQsIHRoZSBoZWlnaHQgb2YgdGhlIHJlY3RhbmdsZQorICAgICAgICBkcmF3biBi eSBgbnNfZHVtcGdseXBoc19zdHJldGNoJzsgYW5kLCBgbnNfbWF5YmVfZHVtcGdseXBoc19iYWNr Z3JvdW5kJyB3aGljaAorICAgICAgICBlcmFzZXMgdGhlIGFwcGxpY2FibGUgcmVjdGFuZ2xlLiAq LworICAgICAgICAvKiBFWEFNUExFOiAgIkVtYWNzIEd1aWRlZCBUb3VyCU92ZXJ2aWV3Ii4KKyAg ICAgICAgcmlnaHRfb3Zlc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3QgZ2x5cGgKKyAgICAgIHN0 cmluZyB0YWlsIHRoYXQgb3ZlcndyaXRlIHRhaWwuICBUaGUgZm9yZWdyb3VuZCBvZiBzdWNoCisg ICAgICBnbHlwaHMgaGFzIHRvIGJlIGRyYXduIGJlY2F1c2UgaXQgd3JpdGVzIGludG8gdGhlIGJh Y2tncm91bmQKKyAgICAgIG9mIHRhaWwuICBUaGUgYmFja2dyb3VuZCBtdXN0IG5vdCBiZSBkcmF3 biBiZWNhdXNlIGl0IGNvdWxkCisgICAgICBwYWludCBvdmVyIHRoZSBmb3JlZ3JvdW5kIG9mIGZv bGxvd2luZyBnbHlwaHMuICovCisgICAgICBpID0gcmlnaHRfb3ZlcndyaXRpbmcgKHRhaWwpOwor ICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNf ZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNlCisgICAgICAg ICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBpICYmIG1vdXNlX2VuZF9jb2wgPiBlbmQpCisgICAg ICAgICAgICBvdmVybGFwX2hsID0gRFJBV19NT1VTRV9GQUNFOworICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAgICAgICAgICBp ZiAoaGwgPT0gb3ZlcmxhcF9obCB8fCBjbGlwX3RhaWwgPT0gTlVMTCkKKyAgICAgICAgICAgIGNs aXBfdGFpbCA9IHRhaWw7CisgICAgICAgICAgaSsrOyAgICAgIC8qIFdlIG11c3QgaW5jbHVkZSB0 aGUgSXRoIGdseXBoLiAqLworICAgICAgICAgIE1DX0JVSUxEX0dMWVBIX1NUUklOR1MgKGVuZCwg aSwgaCwgdCwgb3ZlcmxhcF9obCwgeCwgbGFzdF94KTsKKyAgICAgICAgICBmb3IgKHMgPSBoOyBz OyBzID0gcy0+bmV4dCkKKyAgICAgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVl OworICAgICAgICAgIGNvbXB1dGVfb3ZlcmhhbmdzX2FuZF94IChoLCB0YWlsLT54ICsgdGFpbC0+ d2lkdGgsIGZhbHNlKTsKKyAgICAgICAgICBhcHBlbmRfZ2x5cGhfc3RyaW5nX2xpc3RzICgmaGVh ZCwgJnRhaWwsIGgsIHQpOworICAgICAgICB9CisgICAgICB0YWlsID0gZ2x5cGhfc3RyaW5nX2Nv bnRhaW5pbmdfYmFja2dyb3VuZF93aWR0aCAodGFpbCk7CisgICAgICBpZiAoY2xpcF90YWlsKQor ICAgICAgICBjbGlwX3RhaWwgPSBnbHlwaF9zdHJpbmdfY29udGFpbmluZ19iYWNrZ3JvdW5kX3dp ZHRoIChjbGlwX3RhaWwpOworICAgICAgaWYgKGNsaXBfaGVhZCB8fCBjbGlwX3RhaWwpCisgICAg ICAgIGZvciAocyA9IGhlYWQ7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgIHsKKyAgICAgICAg ICAgIHMtPmNsaXBfaGVhZCA9IGNsaXBfaGVhZDsKKyAgICAgICAgICAgIHMtPmNsaXBfdGFpbCA9 IGNsaXBfdGFpbDsKKyAgICAgICAgICB9CisgICAgfQorICAvKiBEcmF3IGFsbCBzdHJpbmdzLiAq LworICBmb3IgKHMgPSBoZWFkOyBzICYmIGRyYXdfcDsgcyA9IHMtPm5leHQpCisgICAgRlJBTUVf UklGIChmKS0+bWNfc2NyaWJlX3N0cmluZyAocywgbWF0cml4LCByb3csIG1jX21hdHJpeCwgbHNs LCBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworI2lmbmRlZiBIQVZFX05TCisg IC8qIFdoZW4gZm9jdXMgYSBzb2xlIGZyYW1lIGFuZCBtb3ZlIGhvcml6b250YWxseSwgdGhpcyBj b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CisgICAgeF9yZWFjaGVkID0gRlJBTUVfVE9f V0lORE9XX1BJWEVMX1ggKHcsIHhfcmVhY2hlZCk7CisgIGVsc2UKKyAgICB4X3JlYWNoZWQgLT0g YXJlYV9sZWZ0OworICBNQ19SRUxFQVNFX0hEQyAoaGRjLCBmKTsKKyAgU0FGRV9GUkVFICgpOwor ICByZXR1cm4geF9yZWFjaGVkOworfQorCisvKiBEcmF3IHRoZSBjdXJzb3IgZ2x5cGggb2Ygd2lu ZG93IFcgaW4gZ2x5cGggcm93IFJPVy4gIFNlZSB0aGUKKyAgIGNvbW1lbnQgb2YgZHJhd19nbHlw aHMgZm9yIHRoZSBtZWFuaW5nIG9mIEhMLiAqLwordm9pZAorbWNfZHJhd19jdXJzb3JfZ2x5cGgg KHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGds eXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFj ZSBobCwgaW50IHgsIGludCBocG9zLCBpbnQgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICBz dHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAgICAg ICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsIGludCB3ZCwgYm9v bCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICBib29sIGN1cnNvcl9nY19wKQorewor ICAvLyAgc3RydWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSBtY19nZXRfY3Vyc29yX2dseXBoICh3 LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJtY19k cmF3X2N1cnNvcl9nbHlwaDogIGNoICglZCkgfCB4ICglZCksIGhwb3MgKCVkKSwgdnBvcyglZCks IGhsICglZClcbi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y YXdfZ2x5cGhzX2ZhY2UgaGw7CisgIC8qIE5vIGN1cnNvciBkaXNwbGF5ZWQgb3Igcm93IGludmFs aWRhdGVkID0+IG5vdGhpbmcgdG8gZG8gb24gdGhlIHNjcmVlbi4gKi8KKyAgaWYgKGN1cnNvcl90 eXBlID09IE1DX05PX0NVUlNPUikKKyAgICB7CisgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAg ZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2VfY3Vyc29yOiAgcmV0dXJuICglZClcbiIsIDEpOwor ICAgICAgcmV0dXJuOworICAgIH0KKyAgLyogVlBPUyA+PSBtYXRyaXgtPm5yb3dzIG1lYW5zIHRo YXQgd2luZG93IGhhcyBiZWVuIHJlc2l6ZWQuCisgICAgIERvbid0IGJvdGhlciB0byBlcmFzZSB0 aGUgY3Vyc29yLiAqLworICBpZiAodnBvcyA+PSBtYXRyaXgtPm5yb3dzKQorICAgIHsKKyAgICAg IGlmIChkZWJ1Z19wKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6 ICByZXR1cm4gKCVkKVxuIiwgMik7CisgICAgICByZXR1cm47CisgICAgfQorICAvKiBJZiByb3cg Y29udGFpbmluZyBjdXJzb3IgaXMgbWFya2VkIGludmFsaWQsIHRoZXJlIGlzIG5vdGhpbmcgd2UK KyAgICAgY2FuIGRvLiAqLworICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgIHsKKyAgICAgIGlm IChkZWJ1Z19wKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6ICBy ZXR1cm4gKCVkKVxuIiwgMyk7CisgICAgICByZXR1cm47CisgICAgfQorICAvKiBJZiBsaW5lIHNw YWNpbmcgaXMgPiAwLCBvbGQgY3Vyc29yIG1heSBvbmx5IGJlIHBhcnRpYWxseSB2aXNpYmxlIGlu CisgICAgIHdpbmRvdyBhZnRlciBzcGxpdC13aW5kb3cuICBTbyBhZGp1c3QgdmlzaWJsZSBoZWln aHQuICovCisgIHJvdy0+dmlzaWJsZV9oZWlnaHQgPSBtaW4gKHJvdy0+dmlzaWJsZV9oZWlnaHQs CisgICAgICAgICAgICB3aW5kb3dfdGV4dF9ib3R0b21feSAodykgLSByb3ctPnkpOworICAvKiBJ ZiByb3cgaXMgY29tcGxldGVseSBpbnZpc2libGUsIGRvbid0IGF0dGVtcHQgdG8gZGVsZXRlIGEg Y3Vyc29yIHdoaWNoCisgICAgIGlzbid0IHRoZXJlLiAgVGhpcyBjYW4gaGFwcGVuIGlmIGN1cnNv ciBpcyBhdCB0b3Agb2YgYSB3aW5kb3csIGFuZAorICAgICB3ZSBzd2l0Y2ggdG8gYSBidWZmZXIg d2l0aCBhIGhlYWRlciBsaW5lIGluIHRoYXQgd2luZG93LiAqLworICBpZiAocm93LT52aXNpYmxl X2hlaWdodCA8PSAwKQorICAgIHsKKyAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICBmcHJpbnRm IChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6ICByZXR1cm4gKCVkKVxuIiwgNCk7CisgICAgICBy ZXR1cm47CisgICAgfQorICAvKiBJZiBjdXJzb3IgaXMgaW4gdGhlIGZyaW5nZSwgZXJhc2UgYnkg ZHJhd2luZyBhY3R1YWwgYml0bWFwIHRoZXJlLiAqLworICBpZiAocm93LT5jdXJzb3JfaW5fZnJp bmdlX3AKKyAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19HTFlQSCkKKyAgICB7CisgICAgICBy b3ctPmN1cnNvcl9pbl9mcmluZ2VfcCA9IGZhbHNlOworICAgICAgbWNfZHJhd19mcmluZ2VfYml0 bWFwICh3LCByb3csIHJvdy0+cmV2ZXJzZWRfcCwgY3Vyc29yX3R5cGUpOworICAgICAgaWYgKGRl YnVnX3ApCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX2VyYXNlX2N1cnNvcjogIHJldHVy biAoJWQpXG4iLCA1KTsK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GZhbHNlOworICAvLyAgc3Ry dWN0IGdseXBoICpjdXJzb3JfZ2x5cGggPSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgs IHJvdywgaHBvcywgdnBvcyk7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJtY19kcmF3X2N1cnNv cl9nbHlwaDogIGNoICglZCkgfCB4ICglZCksIGhwb3MgKCVkKSwgdnBvcyglZCksIGhsICglZClc biIsCisgIC8vICAgICAgICAgICAgICAgICAgICBjdXJzb3JfZ2x5cGgtPnUuY2gsIHgsIGhwb3Ms IHZwb3MsIGhsKTsKKyAgYmxvY2tfaW5wdXQgKCk7CisgIGJvb2wgZHJhd19wID0gdHJ1ZTsKKyAg bWNfZHJhd19nbHlwaHMgKHcsIG1hdHJpeCwgcm93LCBtY19tYXRyaXgsIHgsIFRFWFRfQVJFQSwg aHBvcywgaHBvcyArIDEsIGhsLCAwLAorICAgICAgICAgICAgICAgICAgdnBvcywgbHNsLCBnbHlw aF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICBj dXJzb3JfZ2NfcCwgTUNfRVJBU0VfR0xZUEhfU1RSSU5HLCBkcmF3X3ApOworICB1bmJsb2NrX2lu cHV0ICgpOworICAvKiBXaGVuIHdlIGVyYXNlIHRoZSBjdXJzb3IsIGFuZCBST1cgaXMgb3Zlcmxh cHBlZCBieSBvdGhlciByb3dzLCBtYWtlCisgIHN1cmUgdGhhdCB0aGVzZSBvdmVybGFwcGluZyBw YXJ0cyBvZiBvdGhlciByb3dzIGFyZSByZWRyYXduLiAqLworICBpZiAoaGwgPT0gRFJBV19OT1JN QUxfVEVYVCAmJiByb3ctPm92ZXJsYXBwZWRfcCkKKyAgICB7CisgICAgICBpZiAocm93ID4gbWF0 cml4LT5yb3dzCisgICAgICAgICAgJiYgTUFUUklYX1JPV19PVkVSTEFQU19TVUNDX1AgKHJvdyAt IDEpKQorICAgICAgICBndWlfZml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m9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9k ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExF OiAgQy11IEMteCA8IGFuZCBkbyBub3RoaW5nLiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMF9w ID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct PmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3Jv bGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0g dy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyBl bHNlIGJlc2lkZXMgaG9yaXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAgICAgICAgICAgICAgIGN1 cnJlbnQgbGluZSBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBf bm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9h bGxfcGVybV8xX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWlu X2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIC4u LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3Jv bGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+c3Vz cGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hz Y3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA9 PSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9s bCk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0aGUg bGVmdCBhcnJvdyBrZXkgb25lIHRpbWUuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lz XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAgYm9vbCBoc2NsX3RlbXBf cCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBh dXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+ IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyog RVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBjdXJy ZW50IGxpbmUgdG8gYmUKKyAgICAgICAgICAgICAgIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZm ZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBz Y3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1fcCA9ICghdy0+c3VzcGVu ZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9k ZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgaW50IGZyaW5nZV9iaXRtYXAgPSBN Q19OT19GUklOR0VfQklUTUFQOworICBpbnQgZmFjZV9pZCA9IERFRkFVTFRfRkFDRV9JRDsKKyAg aWYgKCFyZW1vdmVfcAorICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1df QklUTUFQCisgICAgICAmJiAhaHNjbF9hbGxfdGVtcF9wCisgICAgICAmJiAhaHNjbF90ZW1wX3AK KyAgICAgICYmICFoc2NsX3Blcm1fcAorICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMF9wCisgICAg ICAmJiAhaHNjbF9hbGxfcGVybV8xX3AKKyAgICAgICYmICFoc2NsX2FsbF9wZXJtXzJfcCkKKyAg ICB7CisgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAg KCFhY3RpdmVfcAorICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2Ug KHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCBG UklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAgICAgPyBs b29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctcHJlLXp2 LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgIDogREVGQVVMVF9GQUNFX0lE OworICAgICAgZmFjZV9pZCA9IChjdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVAp CisgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAgICAgICAgICAg ICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgIGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAg IGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVy bGF5LWFycm93IiksIGZhbHNlLCB0cnVlKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIGZyaW5n ZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFy cm93IiksIHRydWUsIHRydWUpOworICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAoY3Vy c29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9mYWNlX2lk ID0gZmFjZV9pZDsKKyAgICAgIHJvdy0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgIHJv dy0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wID0gZmFsc2U7CisgICAgfQorICAgIGVsc2UgaWYg KCFyZW1vdmVfcAorICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FS Uk9XX0JJVE1BUAorICAgICAgICAgICAgICYmIChoc2NsX2FsbF90ZW1wX3AKKyAgICAgICAgICAg ICAgICAgfHwgaHNjbF9hbGxfcGVybV8wX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxf cGVybV8xX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8yX3AKKyAgICAgICAg ICAgICAgICAgfHwgaHNjbF90ZW1wX3AKKyAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJtX3Ap KQorICAgICAgeworICAgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0K KyAgICAgICAgICAoIWFjdGl2ZV9wCisgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICAgICA/IGxvb2t1 cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWluYWN0 aXZlLXByZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgIDogKGFj dGl2ZV9wKQorICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLW92ZXJsYXktYXJyb3ctaHNjbC1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1 ZSkKKyAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgZmFjZV9pZCA9IChjdXJz b3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICA/IG92 ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7 CisgICAgICAgIGlmIChoc2NsX2FsbF9wZXJtXzBfcCkKKyAgICAgICAgICBmcmluZ2VfYml0bWFw ID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIGZhbHNl LCBmYWxzZSk7CisgICAgICAgICAgZWxzZSBpZiAoaHNjbF9hbGxfcGVybV8xX3ApCisgICAgICAg ICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIist aHNjbC1wZXJtIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxs X3Blcm1fMl9wKQorICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9i aXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIGZhbHNlLCB0cnVlKTsKKyAgICAgICAg ICAgICAgZWxzZSBpZiAoaHNjbF9wZXJtX3ApCisgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1h cCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCB0cnVl LCB0cnVlKTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF90ZW1wX3ApCisgICAg ICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGlu dGVybiAoIistaHNjbC10ZW1wIiksIGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAgICAgICAgICBl bHNlIGlmIChoc2NsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9 IG1jX2dldF9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seXBoX2ZsYXZvciA9 PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkpCisgICAgICAgIHsKKyAgICAgICAg ICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1df UkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xM T1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gUW1jX3JldmVyc2VkX2hvbGxvd19yZWN0YW5nbGVfcmlnaHRfYXJyb3cKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1D X0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBRbWNfaG9sbG93X3JlY3RhbmdsZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jh cl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChn bHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX3ZlcnRp Y2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVS VElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1j X3JldmVyc2VkX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfYmFj a3NsYXNoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsKKyAg ICAgICAgICBmcmluZ2VfYml0bWFwID0gKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9C SVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gbG9va3VwX2ZyaW5nZV9iaXRtYXAg KGJpdG1hcF9mbGF2b3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfTk9fRlJJTkdF X0JJVE1BUDsKKyAgICAgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZS SU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAgICYmIChnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRf QVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVW RVJTRURfVkVSVElDQUxfQkFSKSkKKyAgICAgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJp dmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmV2ZXJzZWQtYmFyLXByZS16di1mYWNlIiksIEZS SU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9 PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBo X2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9y ICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgICAgICA/IGxv b2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistYmFyLXByZS16di1mYWNlIiksIEZS SU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9J RDsKKyAgICAgICAgICByb3ctPmN1cnNvcl9pbl9mcmluZ2VfcCA9IGZhbHNlOworICAgICAgICAg IHJvdy0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgcm93 LT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAgICAgcm93LT5yaWdodF9m cmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNf cCA9IGZhbHNlOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGdseXBoX2ZsYXZvciA9PSBN Q19HTFlQSAorICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNT KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgb25fcCA9IHRydWU7CisgICAgICAgICAg ICBGUkFNRV9SSUYgKGYpLT5tY19zY3JpYmVfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngs IHksIGZ5LCBocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdnBvcywgd2QsIGgsIGxzbCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGdseXBoX2ZsYXZvciwgb25fcCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wKTsK KyAgICAgICAgICB9Cit9CisKKy8qIER1bXAgY29udGVudHMgb2YgZ2x5cGggR0xZUEggdG8gc3Rk ZXJyLiAgUk9XIGFuZCBBUkVBIGFyZQorICAgdGhlIGdseXBoIHJvdyBhbmQgYXJlYSB3aGVyZSB0 aGUgZ2x5cGggY29tZXMgZnJvbS4gKi8KK3ZvaWQKK21jX2R1bXBfZ2x5cGggKHN0cnVjdCBnbHlw aF9yb3cgKnJvdywgc3RydWN0IGdseXBoICpnbHlwaCwgaW50IGFyZWEsCisgICAgICAgICAgICAg ICBpbnQgcmVsYXRpdmVfeCwgaW50IHZwb3MpCit7CisgIGJvb2wgZ2x5cGhfenZfcCA9IChnbHlw aCAtIHJvdy0+Z2x5cGhzW2FyZWFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAg ICAgICAgICAgICYmIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPT0gWlYpOworICBpZiAo Z2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgfHwgZ2x5cGgtPnR5cGUgPT0gR0xZUEhM RVNTX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJw RCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNk ICVzICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAg ICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAor ICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAor ICAgICAgICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3Ms CisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAg ICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAg ICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAg ICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAg ICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICBtY19jaGFy X3RvX3N0cmluZyAoZ2x5cGgtPnUuY2gpKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBl ID09IFNUUkVUQ0hfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAg ICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUx LjFkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFd IC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdTJywKKyAgICAgICAgZ2x5cGgt PmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAg PyAnQicKKyAgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAg PyAnUycKKyAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAn MCcKKyAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAg ICAgICAwdSwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2Jv eF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlw aC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7CisgICAg fQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICB7CisgICAgICBm cHJpbnRmIChzdGRlcnIsCisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVj ICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQgICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGgg LSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAw KSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAg ICAgJ0knLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBn bHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmltZ19p ZCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5l X3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBv cywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworICAgIH0KKyAgZWxz ZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmlu dGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNk IDB4JTA2eCIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAg ICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisg ICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICcrJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3Ms CisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAg ICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAg ICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAg ICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5z aWduZWQgaW50KSBnbHlwaC0+dS5jbXAuaWQpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU0 ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wKTsKKyAgICAg IGlmIChnbHlwaC0+dS5jbXAuYXV0b21hdGljKQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIg ICUzZCAlcyAuIFslZC0lZF1cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPmhw b3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBn bHlwaC0+c2xpY2UuY21wLmZyb20sIGdseXBoLT5zbGljZS5jbXAudG8pOworICAgICAgICBlbHNl CisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuIik7CisgICAgfQorICBlbHNlIGlmIChnbHlw aC0+dHlwZSA9PSBYV0lER0VUX0dMWVBIKQorICAgIHsKKyNpZm5kZWYgSEFWRV9YV0lER0VUUwor ICAgICAgZWFzc3VtZSAoZmFsc2UpOworI2Vsc2UKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAg ICAgICAgIiAgJTVkLyUtNWQgJTVkICU0YyAlNmQgJWMgJTNkIDB4JTA1eCAlNGQgJTEuMWQlMS4x ZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0s CisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAt IDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5j aGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAn QicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdT JworICAgICAgICAgOiAnLScpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAg ICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAg ICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT51Lnh3aWRnZXQsCisg ICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcu Jyk7CisjZW5kaWYKKyAgICB9Cit9CisKKy8qIER1bXAgdGhlIGNvbnRlbnRzIG9mIGdseXBoIHJv dyBhdCBWUE9TIGluIE1BVFJJWCB0byBzdGRlcnIuCisgICBHTFlQSFMgMCBtZWFucyBkb24ndCBz aG93IGdseXBoIGNvbnRlbnRzLgorICAgR0xZUEhTIDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4gc2hv cnQgZm9ybQorICAgR0xZUEhTID4gMSBtZWFucyBzaG93IGdseXBocyBpbiBsb25nIGZvcm0uICov Cit2b2lkCittY19kdW1wX2dseXBoX3JvdyAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgdnBv cywgaW50IGdseXBocykKK3sKKyAgaW50IHJlbGF0aXZlX3ggPSAwOworICBpZiAoZ2x5cGhzICE9 IDEpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5EVU1QIEdMWVBIIFJPV1xuIik7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJSb3cgICAgIFN0YXJ0ICAgICAgIEVuZCBVc2VkIG9F PjxcXENUWkZlc20gICAgIFggICAgWSAgICBXICAgIEggICAgViAgICBBICAgIFBcbiIpOworICAg ICAgZnByaW50ZiAoc3RkZXJyLCAiPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4iKTsKKyAgICAgIGZw cmludGYgKHN0ZGVyciwgIiUzZCAlOSJwRCJkICU5InBEImQgJTRkICUxLjFkJTEuMWQlMS4xZCUx LjFkXAorJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCAgJTRkICU0ZCAl NGQgJTRkICU0ZCAlNGQgJTRkXG4iLAorICAgICAgICAgdnBvcywKKyAgICAgICAgIE1BVFJJWF9S T1dfU1RBUlRfQ0hBUlBPUyAocm93KSwKKyAgICAgICAgIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1Mg KHJvdyksCisgICAgICAgICByb3ctPnVzZWRbVEVYVF9BUkVBXSwKKyAgICAgICAgIHJvdy0+Y29u dGFpbnNfb3ZlcmxhcHBpbmdfZ2x5cGhzX3AsCisgICAgICAgICByb3ctPmVuYWJsZWRfcCwKKyAg ICAgICAgIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCwKKyAgICAgICAgIHJvdy0+dHJ1bmNhdGVk X29uX3JpZ2h0X3AsCisgICAgICAgICByb3ctPmNvbnRpbnVlZF9wLAorICAgICAgICAgTUFUUklY X1JPV19DT05USU5VQVRJT05fTElORV9QIChyb3cpLAorICAgICAgICAgTUFUUklYX1JPV19ESVNQ TEFZU19URVhUX1AgKHJvdyksCisgICAgICAgICByb3ctPmVuZHNfYXRfenZfcCwKKyAgICAgICAg IHJvdy0+ZmlsbF9saW5lX3AsCisgICAgICAgICByb3ctPmVuZHNfaW5fbWlkZGxlX29mX2NoYXJf cCwKKyAgICAgICAgIHJvdy0+c3RhcnRzX2luX21pZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICBy b3ctPm1vdXNlX2ZhY2VfcCwKKyAgICAgICAgIHJvdy0+eCwKKyAgICAgICAgIHJvdy0+eSwKKyAg ICAgICAgIHJvdy0+cGl4ZWxfd2lkdGgsCisgICAgICAgICByb3ctPmhlaWdodCwKKyAgICAgICAg IHJvdy0+dmlzaWJsZV9oZWlnaHQsCisgICAgICAgICByb3ctPmFzY2VudCwKKyAgICAgICAgIHJv dy0+cGh5c19hc2NlbnQpOworICAgICAgLyogVGhlIG5leHQgMyBsaW5lcyBzaG91bGQgYWxpZ24g dG8gIlN0YXJ0IiBpbiB0aGUgaGVhZGVyLiAqLworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAg ICU5InBEImQgJTkicEQiZFx0JTVkXG4iLCByb3ctPnN0YXJ0Lm92ZXJsYXlfc3RyaW5nX2luZGV4 LAorICAgICAgICAgcm93LT5lbmQub3ZlcmxheV9zdHJpbmdfaW5kZXgsCisgICAgICAgICByb3ct PmNvbnRpbnVhdGlvbl9saW5lc193aWR0aCk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAg JTkicEQiZCAlOSJwRCJkXG4iLAorICAgICAgICAgQ0hBUlBPUyAocm93LT5zdGFydC5zdHJpbmdf cG9zKSwKKyAgICAgICAgIENIQVJQT1MgKHJvdy0+ZW5kLnN0cmluZ19wb3MpKTsKKyAgICAgIGZw cmludGYgKHN0ZGVyciwgIiAgICAlOWQgJTlkXG4iLCByb3ctPnN0YXJ0LmRwdmVjX2luZGV4LAor ICAgICAgICAgcm93LT5lbmQuZHB2ZWNfaW5kZXgpOworICAgIH0KKyAgaWYgKGdseXBocyA+IDEp CisgICAgeworICAgICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFyZWEgPCBM QVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5 cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2Vu ZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgICAgICAgIC8qIEdseXBoIGZvciBhIGxp bmUgZW5kIGluIHRleHQuICovCisgICAgICAgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGds eXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAgICAgICAgICArK2ds eXBoX2VuZDsKKyAgICAgICAgICBpZiAoZ2x5cGggPCBnbHlwaF9lbmQpCisgICAgICAgICAgICBm cHJpbnRmIChzdGRlcnIsICJHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAg IENvZGUgRmFjZSBMUiBIUE9TIFpWIENcbiIpOworICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGds eXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfZHVtcF9n bHlwaCAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgdnBvcyk7CisgICAgICAgICAgICAg IHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAg ICB9CisgICAgfQorICAgIGVsc2UgaWYgKGdseXBocyA9PSAxKQorICAgICAgeworICAgICAgICBj aGFyIHNbU0hSVF9NQVggKyA0XTsKKyAgICAgICAgZm9yIChpbnQgYXJlYSA9IExFRlRfTUFSR0lO X0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICB7CisgICAgICAgICAg ICBpbnQgaTsKKyAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCByb3ctPnVzZWRbYXJlYV07ICsr aSkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGgg PSByb3ctPmdseXBoc1thcmVhXSArIGk7CisgICAgICAgICAgICAgICAgaWYgKGkgPT0gcm93LT51 c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAmJiBhcmVhID09IFRFWFRfQVJFQQor ICAgICAgICAgICAgICAgICAgICAmJiBOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAg ICAgICAgICAmJiBnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgICAgICAgICAg ICYmIGdseXBoLT51LmNoID09ICcgJykKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgICAgc3RyY3B5ICgmc1tpXSwgIltcXG5dIik7CisgICAgICAgICAgICAgICAgICAgIGkg Kz0gNDsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGds eXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGds eXBoLT51LmNoIDwgMHg4MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUu Y2ggPj0gJyAnKQorICAgICAgICAgICAgICAgICAgICBzW2ldID0gZ2x5cGgtPnUuY2g7CisgICAg ICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICBzW2ldID0gJy4nOwor ICAgICAgICAgICAgICB9CisgICAgICAgICAgICBzW2ldID0gJ1wwJzsKKyAgICAgICAgICAgIGZw cmludGYgKHN0ZGVyciwgIiUzZDogKCVkKSAnJXMnXG4iLCB2cG9zL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ID0gKGhlYWRlcl9saW5lX2hlaWdodCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICYmIHlwb3Mg PiAwKQorICAgICAgICAgICAgICAgICAgICAgID8geXBvcyArIDEKKyAgICAgICAgICAgICAgICAg ICAgICA6IHlwb3M7CisgICAgICBpZiAodmlzaWJsZV9wKQorICAgICAgICB2cG9zID0gdm9mZnNl dDsKKyAgICAgICAgZWxzZQorICAgICAgICAgIHZwb3MgPSAwOworICAgIH0KKyAgICBlbHNlCisg ICAgICB7CisgICAgICAgIENIRUNLX05VTUJFUiAocm93KTsKKyAgICAgICAgdnBvcyA9IFhGSVhO VU0gKHJvdyk7CisgICAgICB9CisgIGlmICh2cG9zID49IDAgJiYgdnBvcyA8IG1hdHJpeC0+bnJv d3MpCisgICAgbWNfZHVtcF9nbHlwaF9yb3cgKE1BVFJJWF9ST1cgKG1hdHJpeCwgdnBvcyksCisg ICAgICAgIHZwb3MsCisgICAgICAgIFRZUEVfUkFOR0VEX0ZJWE5VTVAgKGludCwgZ2x5cGhzKSA/ IFhGSVhOVU0gKGdseXBocykgOiAyKTsKKyAgcmV0dXJuIFFuaWw7Cit9CisKK3ZvaWQKK21jX2R1 bXBfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsIGludCBnbHlwaHMp Cit7CisgIGludCBpOworICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsgKytpKQorICAg IG1jX2R1bXBfZ2x5cGhfcm93IChNQVRSSVhfUk9XIChtYXRyaXgsIGkpLCBpLCBnbHlwaHMpOwor fQorCitERUZVTiAoIm1jLWR1bXAtZ2x5cGgtbWF0cml4IiwgRm1jX2R1bXBfZ2x5cGhfbWF0cml4 LAorICAgICAgIFNtY19kdW1wX2dseXBoX21hdHJpeCwgMCwgMSwgInAiLAorICAgICAgIGRvYzog LyogRHVtcCB0aGUgY3VycmVudCBtYXRyaXggb2YgdGhlIHNlbGVjdGVkIHdpbmRvdyB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AgVFlQRV9SQU5HRURfRklYTlVNUCAoaW50LCBnbHlwaHMp ID8gWEZJWE5VTSAoZ2x5cGhzKSA6IDApOworICByZXR1cm4gUW5pbDsKK30KKworYm9vbAorbWNf dHJhdmVyc2VfY2FjaGVfcCAoc3RydWN0IG1jX21hdHJpeCBtYXRyaXgsIGVudW0gbWNfY2FjaGVf dHlwZSBjYWNoZV90eXBlLAorICAgICAgICAgICAgICAgICAgICAgaW50IHZudGgsIGludCBudGgp Cit7CisgIGlmICh2bnRoIDwgbWF0cml4LnZwb3NfdXNlZAorICAgICAgJiYgbWF0cml4LmN1cnNv cnNfdXNlZFtjYWNoZV90eXBlXSA+IDAKKyAgICAgICYmIG50aCA8IG1hdHJpeC52cG9zW3ZudGhd LmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0pCisgICAgcmV0dXJuIHRydWU7CisgICAgZWxzZQorICAg ICAgcmV0dXJuIGZhbHNlOworfQorCit2b2lkCittY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRv dyAqdykKK3sKKyAgaWYgKCFCVUZGRVJQICh3LT5jb250ZW50cykpCisgICAgcmV0dXJuOworICBm b3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2Fj aGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBi b29sIGJ2YXJfYWN0aXZlX3A7CisgICAgICBzd2l0Y2ggKGNhY2hlX3R5cGUpCisgICAgICAgIHsK KyAgICAgICAgICBjYXNlIE5PX0NBQ0hFOgorICAgICAgICAgICAgeworICAgICAgICAgICAgICBy ZXR1cm47CisgICAgICAgICAgICB9CisgICAgICAgICAgY2FzZSBNQ19DQUNIRToKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAg ICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkp CisgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IGZhbHNlOworICAgICAgICAgICAgICAg IGVsc2UgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICAgICAg ICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKSkKKyAgICAg ICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSB0cnVlOworICAgICAgICAgICAgICBicmVhazsK KyAgICAgICAgICAgIH0KKyAgICAgICAgICBjYXNlIENIX0NBQ0hFOgorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAg ICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAg ICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgZWxz ZSBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgICAg ICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IHRydWU7CisgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgICAgfQorICAgICAgICAgIGNhc2UgRkNfQ0FDSEU6CisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAg ICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpKQorICAg ICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBlbHNl IGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAgICAg ICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmICghYnZhcl9hY3RpdmVfcCkKKyAgICAg ICAgeworICAgICAgICAgIC8qIERlY3JlYXNlIHRoZSBzaXplIG9mIHRoZSBhcnJheSB0byBhIGJh cmUgbWluaW11bS4gKi8KKyAgICAgICAgICBmb3IgKGludCB2bnRoID0gMDsgdm50aCA8IHctPm1j X21hdHJpeC52cG9zX3VzZWQ7ICsrdm50aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg aWYgKHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSA+ IDEpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0gPQorICAgICAgICAgICAgICAgICAgICB4bnJlYWxs b2MgKHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdLCAxLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV0pOworICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdID0gMTsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVf dHlwZV0gP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19tYXRyaXgudnBvc191c2VkOyAr K3ZudGgpCisgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRb Y2FjaGVfdHlwZV0gPSAwOworICAgICAgICAgICAgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtj YWNoZV90eXBlXSA9IDA7CisgICAgICAgICAgfQorICAgIH0KK30KKworc3RhdGljIHZvaWQKK21j X2hlbHBlciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBz dHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGgsIGlu dCB4LCBpbnQgZngsIGludCB5LCBpbnQgZnksIGludCBocG9zLCBpbnQgdnBvcywKKyAgICAgICAg ICAgaW50IHdkLCBpbnQgaCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IGN1 cnNvcl93aWR0aCwKKyAgICAgICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9u LCBzdHJ1Y3QgbWNfUkdCIGZvcmVncm91bmQsCisgICAgICAgICAgIHN0cnVjdCBtY19SR0IgYmFj a2dyb3VuZCwgYm9vbCBhY3RpdmVfcCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAg ICAgICAgICBib29sIGRyYXdfcCwgZW51bSBtY19kcmF3X3Jvd190eXBlIGZyb21fd2hlcmUsCisg ICAgICAgICAgIGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlLCBlbnVtIG1jX2VuZ2luZV90 eXBlIGFjdGlvbl90eXBlKQoreworICBpbnQgdm50aCA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBt YXRyaXgpOworICBpZiAobWNfc3RkZXJyX3AKKyAgICAgICYmIGRyYXdfcCkKKyAgICB7CisgICAg ICBpbnQgY2hhcnBvcyA9IGdseXBoLT5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isgIGlmIChk cmF3X3AKKyAgICAgICYmIChmcm9tX3doZXJlID09IFNLSVBQRUQKKyAgICAgICAgICB8fCBmcm9t X3doZXJlID09IFBPU1RfQ0hBTkdFRAorICAgICAgICAgIHx8IGZyb21fd2hlcmUgPT0gVU5DSEFO R0VECisgICAgICAgICAgfHwgZnJvbV93aGVyZSA9PSBTRVRfQ1VSU09SX1RXTykpCisgICAgewor ICAgICAgYm9vbCBzYW1lX3AgPSBmYWxzZTsKKyAgICAgIGZvciAoaW50IG50aCA9IDA7IG50aCA8 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV07ICsrbnRoKQor ICAgICAgICB7CisgICAgICAgICAgc2FtZV9wIHw9CisgICAgICAgICAgICAody0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5zYW1lX3AgPT0gdHJ1ZQorICAgICAg ICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u Z2x5cGgudHlwZSA9PSBnbHlwaC0+dHlwZQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGguYnl0ZXBvcyA9PSBnbHlwaC0+ Ynl0ZXBvcworICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uZ2x5cGguY2hhcnBvcyA9PSBnbHlwaC0+Y2hhcnBvcworICAgICAgICAg ICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5 cGgudS52YWwgPT0gZ2x5cGgtPnUudmFsCisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoX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tudGhdLmdseXBoLnNsaWNlLmltZy53aWR0aCA9PSBnbHlwaC0+c2xpY2UuaW1nLndpZHRoCisg ICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5nbHlwaC5zbGljZS5pbWcuaGVpZ2h0ID09IGdseXBoLT5zbGljZS5pbWcuaGVpZ2h0Cisg ICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5nbHlwaC5zbGljZS5jbXAuZnJvbSA9PSBnbHlwaC0+c2xpY2UuY21wLmZyb20KKyAgICAg ICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LnggPT0geAorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uZnggPT0gZngKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnkgPT0geQorICAgICAgICAgICAgICYmIHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnkgPT0gZnkKKyAg ICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmhwb3MgPT0gaHBvcworICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0udnBvcyA9PSB2cG9zCisgICAgICAgICAgICAgJiYgdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZCA9PSB3ZAorICAg ICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uaCA9PSBoCisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZSA9PSBjdXJzb3JfdHlwZQorICAgICAgICAgICAg ICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29y X3dpZHRoID09IGN1cnNvcl93aWR0aAorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcucmVkID09IGZvcmVncm91bmQucmVkCisg ICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5mZy5ncmVlbiA9PSBmb3JlZ3JvdW5kLmdyZWVuCisgICAgICAgICAgICAgJiYgdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlID09IGZvcmVn cm91bmQuYmx1ZQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uYmcucmVkID09IGJhY2tncm91bmQucmVkCisgICAgICAgICAgICAg JiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ncmVl biA9PSBiYWNrZ3JvdW5kLmdyZWVuCisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ibHVlID09IGJhY2tncm91bmQuYmx1ZQor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uYWN0aXZlX3AgPT0gY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isgICAgICAgICAgICAg ICAgIHx8IGZyb21fd2hlcmUgPT0gU0NSSUJFX1RXTworICAgICAgICAgICAgICAgICB8fCBmcm9t X3doZXJlID09IFNDUklCRV9USFJFRQorICAgICAgICAgICAgICAgICB8fCBmcm9tX3doZXJlID09 IE5PV0hFUkUpKQorICAgICAgeworICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgbWF0 cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsIGN1cnNvcl90eXBlLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBh Y3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCByZW1vdmVfcCk7CisgICAgICAgIHJldHVybjsKKyAgICAg IH0KKyAgaWYgKGNhY2hlX3R5cGUgPT0gTk9fQ0FDSEUpCisgICAgcmV0dXJuOworICArK3ctPm1j X21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgIGlmICh2bnRoID49IHctPm1jX21h dHJpeC52cG9zX3VzZWQpCisgICAgdy0+bWNfbWF0cml4LnZwb3NfdXNlZCA9IHZudGggKyAxOwor ICBpZiAody0+bWNfbWF0cml4LnZwb3NfYWxsb2NhdGVkIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNl ZCkKKyAgICB7CisgICAgICBpbnQgb2xkX2FsbG9jID0gdy0+bWNfbWF0cml4LnZwb3NfYWxsb2Nh dGVkOworICAgICAgaW50IG5ld19lbHRzID0gdy0+bWNfbWF0cml4LnZwb3NfdXNlZCAtIHctPm1j X21hdHJpeC52cG9zX2FsbG9jYXRlZDsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zID0geHBhbGxv YyAody0+bWNfbWF0cml4LnZwb3MsICZ3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19lbHRzLCBJTlRfTUFYLCBzaXplb2Yg KnctPm1jX21hdHJpeC52cG9zKTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0cml4LnZwb3MgKyBv bGRfYWxsb2MsIDAsCisgICAgICAgICAgICAgICAody0+bWNfbWF0cml4LnZwb3NfYWxsb2NhdGVk IC0gb2xkX2FsbG9jKSAqIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3MpOworICAgIH0KKyAgKyt3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdOworICBpZiAody0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdIDwgdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSkKKyAgICB7CisgICAgICBp bnQgb2xkX2FsbG9jID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2Nh Y2hlX3R5cGVdOworICAgICAgaW50IG5ld19lbHRzID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVfdXNlZFtjYWNoZV90eXBlXSAtIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2Fs bG9jYXRlZFtjYWNoZV90eXBlXTsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdID0geHBhbGxvYyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICZ3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2Fj aGVfdHlwZV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG5ld19lbHRzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKnctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdKTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0gKyBvbGRfYWxsb2MsIDAsCisgICAgICAg ICAgICAgICAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5 cGVdIC0gb2xkX2FsbG9jKQorICAgICAgICAgICAgICAgICAqIHNpemVvZiAqdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0pOworICAgIH0KKyAgaW50IG50aCA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0gLSAxOworICB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnNhbWVfcCA9IGZhbHNlOwor ICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoLnR5 cGUgPSBnbHlwaC0+dHlwZTsKKyAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXS5nbHlwaC5ieXRlcG9zID0gZ2x5cGgtPmJ5dGVwb3M7CisgIHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGguY2hhcnBvcyA9IGdseXBo LT5jaGFycG9zOworICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmdseXBoLnUudmFs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lwaF9yb3cgKnJvdywgaW50 IHgsIGludCAqZngsIGludCB5LAorICAgICAgICAgICAgICAgICAgICAgICAgaW50ICpmeSwgaW50 IGhwb3MsIGludCB2cG9zLCBpbnQgKmgsCisgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1j X2N1cnNvcl90eXBlIGN1cnNvcl90eXBlLCBpbnQgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICAg ICAgICAgICAgICAgaW50ICp3ZCkKK3sKKyAgc3RydWN0IGdseXBoICpnbHlwaCA9IG1jX2dldF9j dXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93LCBocG9zLCB2cG9zKTsKKyAgaWYgKGdseXBoID09 IE5VTEwpCisgICAgcmV0dXJuOworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19G UkFNRSAodykpOworICAqZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB4KTsK KyAgKmggPSByb3ctPnZpc2libGVfaGVpZ2h0OworICAvKiBEb24ndCBsZXQgdGhlIGN1cnNvciBl eGNlZWQgdGhlIGRpbWVuc2lvbnMgb2YgdGhlIHJvdywgc28gdGhhdAorICB0aGUgdXBwZXIvbG93 ZXIgc2lkZSBvZiB0aGUgYm94IGFyZW4ndCBjbGlwcGVkLiAgKi8KKyAgaW50IHdfaGVhZGVyX2xp bmVfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgIGludCB3X3RleHRf Ym90dG9tX3kgPSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykgLSAqaDsKKyAgaWYgKHkgPCB3X2hl YWRlcl9saW5lX2hlaWdodCkKKyAgICB7CisgICAgICAqaCA9IG1heCAoKmggLSAod19oZWFkZXJf bGluZV9oZWlnaHQgLSB5KSArIDEsICpoKTsKKyAgICAgIHkgPSB3X2hlYWRlcl9saW5lX2hlaWdo dCAtIDE7CisgICAgICAvLyBmcHJpbnRmIChzdGRlcnIsICJDT05ESVRJT04gIyAxXG4iKTsKKyAg ICB9CisgICBlbHNlIGlmICh5ID4gd190ZXh0X2JvdHRvbV95KQorICAgICB7CisgICAgICAgKmgg Kz0geSAtIHdfdGV4dF9ib3R0b21feTsKKyAgICAgICB5ID0gd190ZXh0X2JvdHRvbV95OworICAg ICAgIC8vIGZwcmludGYgKHN0ZGVyciwgIkNPTkRJVElPTiAjIDJcbiIpOworICAgICB9CisgICpm eSA9IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCB5KTsKKyAgc3dpdGNoIChjdXJzb3JfdHlw ZSkKKyAgICB7CisgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgeworICAgICAgICAgIGlmIChj dXJzb3Jfd2lkdGggPCAxKQorICAgICAgICAgICAgY3Vyc29yX3dpZHRoID0gbWF4IChGUkFNRV9D VVJTT1JfV0lEVEggKGYpLCAxKTsKKyAgICAgICAgICBpZiAoY3Vyc29yX3dpZHRoIDwgZ2x5cGgt PnBpeGVsX3dpZHRoKQorICAgICAgICAgICp3ZCA9IGN1cnNvcl93aWR0aDsKKyAgICAgICAgICBi cmVhazsKKyAgICAgICAgfQorICAgICAgY2FzZSBNQ19IQkFSOgorICAgICAgICB7CisgICAgICAg ICAgaW50IGN1cnNvcl9oZWlnaHQgPSAoY3Vyc29yX3dpZHRoIDwgMSkgPyBscmludCAoMC4yNSAq ICpoKSA6IGN1cnNvcl93aWR0aDsKKyAgICAgICAgICBpZiAoY3Vyc29yX2hlaWdodCA+IHJvdy0+ aGVpZ2h0KQorICAgICAgICAgICAgY3Vyc29yX2hlaWdodCA9IHJvdy0+aGVpZ2h0OworICAgICAg ICAgIC8qIEN1cnNvciBzbWFsbGVyIHRoYW4gbGluZSBoZWlnaHQsIHNvIG1vdmUgZG93bi4gKi8K KyAgICAgICAgICBpZiAoKmggPiBjdXJzb3JfaGVpZ2h0KQorICAgICAgICAgICAgKmZ5ICs9ICpo IC0gY3Vyc29yX2hlaWdodDsKK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93LCByZWxhdGl2ZV94LCAmZngsIHksICZmeSwgaHBvcywgdnBvcywK KyAgICAgICAgICAgICAgICAgICAgICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgs ICZ3ZCk7CisgIGludCBvcG9pbnRfZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3 LCBvcG9pbnRfeCk7CisgIGludCBmY19meCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1gg KHcsIGVzc2VudGlhbHMuZmNfeCk7CisgIGJvb2wgZ2x5cGhfenZfcCA9IChnbHlwaCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAg ICAgICAgJiYgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgIHN0cnVjdCBm cmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZF UiAody0+Y29udGVudHMpOworICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0 aCAodywgVEVYVF9BUkVBKTsKKyAgc3RydWN0IGdseXBoX3JvdyAqY3Vyc29yX3JvdyA9ICh3LT5j dXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFU UklYX1JPVyAoY3Vyc29yX21hdHJpeCwgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IE5VTEw7CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0g KHctPmN1cnNvci52cG9zICE9IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g bWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgY3Vyc29yX21hdHJpeCwgY3Vyc29yX3JvdywKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNv ci5ocG9zLCB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE5VTEw7CisgIGJvb2wgY3Vyc29yX2F0X2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxM CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93 LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29y X3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IueCA9PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gY3Vyc29yX3Jvdy0+cGl4ZWxfd2lkdGgpOwor ICBib29sIGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29y X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiAhY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gdGV4dF9hcmVhX3dpZHRoCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSBjdXJzb3Jfcm93 LT5waXhlbF93aWR0aCk7CisgIGludCBmcmFtZV9jaGFyX3dpZHRoID0gRlJBTUVfQ09MVU1OX1dJ RFRIIChmKTsKKyAgaW50IHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNlX2lkOworICBzdHJ1Y3Qg bWNfUkdCIGJhY2tncm91bmQ7CisgIG1jX3NldF9sc2xfYmcgKHcsIHRlbXBfZmFjZV9pZCwgJmJh Y2tncm91bmQpOworICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSByZWxh dGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9ocG9zID09IGhw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0gcm93LT55Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpOworCisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjog IENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAgICAqLworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAg ICB8fCBnbHlwaC0+dHlwZSA9PSBHTFlQSExFU1NfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3Rk ZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQg JTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVzXG4i LAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93 LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICBy ZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAg PyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAg IChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNU UklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAo TklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAg ICA6ICctJykpKSwKKyAgICAgICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBn bHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0 X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBn bHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICBtY19jaGFyX3Rv X3N0cmluZyAoZ2x5cGgtPnUuY2gpKTsKKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlM6 ICBDSEF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AgIG1jX2hlbHBlciAodywgbWF0cml4 LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAg ICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlv biwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxz LmFjdGl2ZV9wLCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAg ICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICYmIHJlbGF0 aXZlX3ggPD0geF9saW1pdCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChyZWxhdGl2ZV94IDwg cm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgcmVsYXRpdmVf eCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgIGZ4ICs9IGdseXBoLT5waXhl bF93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwg cm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAg ICAgICAgICAgICAgeF9saW1pdCAtIHJlbGF0aXZlX3gsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jf d2lkdGgsIHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQsIGJh Y2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywKKyAgICAgICAgICAg ICAgICAgICAgIGRyYXdfcCwgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOwor ICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8K Ky8qICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVI6ICBDSEFSX0dMWVBIIHwgR0xZUEhMRVNT X0dMWVBIICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAg Y2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9m bGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRf cCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9C QVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmlu Z2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVu Y2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFS X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJz b3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxf QkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2Zs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAg fHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8 fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxh dm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBN Q19SSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3 LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3Ms IHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQs IGVzc2VudGlhbHMuYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAor ICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsK KyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgRklMTF9D T0xVTU46ICBDSEFSX0dMWVBIIHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAgICAgICAqLwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7Cisg ICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSB5CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2cG9zKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsK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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIFNUUkVU Q0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgIHsKKyAg ICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAl NSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAg JTNkICVzICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisg ICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEp LAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnUycsCisgICAgICAgIGdseXBoLT5jaGFy cG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisg ICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAg ICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJwor ICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAg ICAgICAgMHUsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9i b3hfbGluZV9wLAorICAgICAgICBnbHl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RVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgaWYgKHJlbGF0aXZl X3ggPCByb3ctPnBpeGVsX3dpZHRoCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkK KyAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4 LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5 cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAg ICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3As IGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUp OworICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRb YXJlYV0gLSAxCisgICAgICAgICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAgICB7 CisgICAgICAgICAgaWYgKHJlbGF0aXZlX3ggPCByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAg ICAgICAgICAgICAgZnggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAg ICAgICAgIHRlbXBfZmFjZV9pZCA9IChyb3ctPmZpbGxfbGluZV9wKQorICAgICAgICAgICAgICAg ICAgICAgICAgID8gZ2x5cGgtPmZhY2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAgICA6IERF RkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGJhY2tncm91bmQ7CisgICAg ICAgICAgbWNfc2V0X2xzbF9iZyAodywgdGVtcF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7CisgICAg ICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgIHhfbGltaXQgLSByZWxhdGl2 ZV94LCBoLCBjdXJzb3JfdHlwZSwgeF9saW1pdCAtIHJlbGF0aXZlX3gsCisgICAgICAgICAgICAg ICAgICAgICByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsIGJhY2tncm91bmQsIGVzc2VudGlhbHMu YWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICBNQ19HTFlQSExFU1MsIGRyYXdfcCwgZnJv bV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgICB9CisgICAgICBicmVh azsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAg ICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAg ICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoK KyAgICB7CisgICAgICBpZiAocm93LT5maWxsX2xpbmVfcAorICAgICAgICAgICYmIGdseXBoIC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAg JiYgb3BvaW50X3ggPiByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICB0 ZW1wX2ZhY2VfaWQgPSBnbHlwaC0+ZmFjZV9pZDsKKyAgICAgICAgZWxzZSBpZiAoIXJvdy0+Zmls bF9saW5lX3AKKyAgICAgICAgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3gg PiByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAgIHRlbXBfZmFjZV9p ZCA9IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgIHN0cnVjdCBtY19SR0IgYmFja2dyb3VuZDsKKyAg ICAgIG1jX3NldF9sc2xfYmcgKHcsIHRlbXBfZmFjZV9pZCwgJmJhY2tncm91bmQpOworICAgICAg ZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tT TEFTSAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5j b250aW51ZWRfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRl ZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1D X1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdICE9 IDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5j YXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBNQ19HTFlQSExFU1M7CisgICAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3Ig PT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9 PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJT RURfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IE1DX1JJR0hUX0ZSSU5HRV9C SVRNQVA7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBn bHlwaCwgb3BvaW50X3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAg ICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZv cmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZl X3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBj YWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgRklMTF9DT0xVTU46 ICBTVFJFVENIX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBpZiAocm93LT5m aWxsX2xpbmVfcAorICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9 PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID4gcmVs YXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgdGVtcF9mYWNlX2lkID0gZ2x5 cGgtPmZhY2VfaWQ7CisgICAgICAgIGVsc2UgaWYgKCFyb3ctPmZpbGxfbGluZV9wCisgICAgICAg ICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRb YXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+IHJlbGF0aXZl X3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gREVGQVVM VF9GQUNFX0lEOworICAgICAgc3RydWN0IG1jX1JHQiBiYWNrZ3JvdW5kOworICAgICAgbWNfc2V0 X2xzbF9iZyAodywgdGVtcF9mYWNlX2lkLCAmYmFja2dyb3VuZCk7CisgICAgICBlbnVtIG1jX2Zs YXZvciBnbHlwaF9mbGF2b3IgPSBNQ19HTFlQSExFU1M7CisgICAgICB3ZCA9IDE7CisgICAgICBt Y19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgZXNzZW50aWFscy5mY194LCBmY19meCwg eSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwg Y3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAg IGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBm cm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb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9wKQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiXG4g JTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQg ICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAor ICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAx KSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ0knLAorICAgICAgICBnbHlwaC0+Y2hh cnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJwor ICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisg ICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcK KyAgICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisg ICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmltZ19pZCwKKyAgICAgICAgZ2x5cGgtPmZh Y2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5y aWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIg OiAiLS0iLAorICAgICAgICAnLicpOworICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExF X0NVUlNPUlM6ICBJTUFHRV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAg IGN1cnNvcl90eXBlID0gTUNfSE9MTE9XX0JPWDsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4 LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAg ICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24s IGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0 aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNh Y2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxF UjogIElNQUdFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgY3Vyc29y X3R5cGUgPSBNQ19IT0xMT1dfQk9YOworICAgICAgaWYgKCFyZWFsX2Zha2VfY3Vyc29yX3ApCisg ICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwg eSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAg ICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQSCwgZHJhd19wLCBm cm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsK KyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIElNQUdFX0dMWVBIICAgICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJ Q0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGN1cnNvcl90eXBlID0gTUNfSE9MTE9XX0JPWDsKKyAg ICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwg ZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vy c29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJh Y2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3As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ICAgICAgKChyb3ctPnVzZWRbYXJlYV0g PT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgICAgcmVsYXRpdmVfeCwK KyAgICAgICAgICAnKycsCisgICAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgICAgKEJV RkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgID8gJ0InCisgICAgICAgICAgIDogKFNU UklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICAg IDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICAgID8gJzAnCisgICAgICAg ICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAg ICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5jbXAuaWQpOworICAgICAgICBmcHJpbnRmIChz dGRlcnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAg ICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgICAgZ2x5cGgtPnJpZ2h0X2Jv eF9saW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAgIGZw cmludGYgKHN0ZGVyciwgIiAgJTNkICVzIC4gWyVkLSVkXVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAg ICAgICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNtcC50 byk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOworICAg ICAgfQorICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKy8qICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgQ09NUE9TSVRF X0dMWVBIICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisg ICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgorICAgIHsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0 cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAg ICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRp b24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMu YWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAg IGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIEhPUklaT05UQUxfUlVM RVI6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgaWYg KHJlbGF0aXZlX3ggPD0geF9saW1pdAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3Ap CisgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90 eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAg ICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQSCwgZHJhd19w LCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBl KTsKKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2Vk W2FyZWFdIC0gMQorICAgICAgICAgICYmIHJlbGF0aXZlX3ggPD0geF9saW1pdCkKKyAgICAgICAg eworICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAg IHdoaWxlIChyZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmeCwgeSwg ZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90 eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQSExF U1MsIGRyYXdfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tX3doZXJlLCBjYWNoZV90 eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZnJhbWVfY2hh cl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICBWRVJU SUNBTF9SVUxFUjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgVkVSVElDQUxfUlVMRVI6CisgICAgeworICAg ICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gKGN1cnNvcl9hdF9mcmluZ2VfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JB Q0tTTEFTSAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0 X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93 LT5jb250aW51ZWRfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg IXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5n ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5j YXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFd ICE9IDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRy dW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFth cmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF94ID49IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19H TFlQSDsKKyAgICAgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FS Uk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JB Ul9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JB UgorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIp CisgICAgICAgIGN1cnNvcl90eXBlID0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUDsKKyAgICAgIHdk ID0gMTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94 LCBvcG9pbnRfZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZCwgaCwg Y3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAg ICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2 b3IsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0 aW9uX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgRklMTF9DT0xVTU46ICBDT01QT1NJVEVfR0xZ UEggICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAg IGNhc2UgRklMTF9DT0xVTU46CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxh dm9yID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0g LSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5m Y194ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGds eXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZ UEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZB UiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF92ZXJ0aWNhbF9ydWxl cikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9 PSB5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBv cyA9PSB2cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dM WVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsK KyAgICAgIHdkID0gMTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCBy ZWxhdGl2ZV94LCBmY19meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdk LCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQs CisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIGdseXBo X2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBjYWNoZV90eXBl LCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKyAgICBjYXNlIENVUlNPUl9JTkRJQ0FUT1I6CisgICAgeworICAgICAgYnJlYWs7Cisg ICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIH0KKyAgfQorLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVORDogIENPTVBPU0lU RV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBCRUdJTjogIFhXSURHRVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICAq LworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhX SURHRVRfR0xZUEgpCisgIHsKKyNpZm5kZWYgSEFWRV9YV0lER0VUUworICAgIGVhc3N1bWUgKGZh bHNlKTsKKyNlbHNlCisgICAgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgZnByaW50ZiAoc3RkZXJy LAorICAgICAgICAiXG4gICU1ZC8lLTVkICU1ZCAlNGMgJTZkICVjICUzZCAweCUwNXggJTRkICUx LjFkJTEuMWQgICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRb YXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1gnLAorICAgICAgICBn bHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg ID8gJ1MnCisgICAgICAgICAgICA6ICctJykpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgs CisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgIC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S0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAg ICBIT1JJWk9OVEFMX1JVTEVSOiAgWFdJREdFVF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICov CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6Cisg ICAgeworICAgICAgaWYgKHJlbGF0aXZlX3ggPD0geF9saW1pdAorICAgICAgICAgICYmICFyZWFs X2Zha2VfY3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBo LCByZWxhdGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAg d2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBN Q19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5 cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICYmIHJlbGF0aXZlX3ggPD0geF9s aW1pdCkKKyAgICAgICAgeworICAgICAgICAgIHJlbGF0aXZlX3ggKz0gZ2x5cGgtPnBpeGVsX3dp ZHRoOworICAgICAgICAgIHdoaWxlIChyZWxhdGl2ZV94IDw9IHhfbGltaXQpCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxh dGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAg d2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2 ZV9wLCBNQ19HTFlQSExFU1MsIGRyYXdfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBmcm9t X3doZXJlLCBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICAgICAgICAgIHJlbGF0aXZl X3ggKz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAg YnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAg ICAgICAgICAgICAgVkVSVElDQUxfUlVMRVI6ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAg ICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgVkVSVElDQUxfUlVM RVI6CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gKGN1cnNvcl9h dF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+ Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNf VkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3Ap CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFS X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJz b3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9mcmluZ2Vf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+ dXNlZFtURVhUX0FSRUFdICE9IDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFd ID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9wb2ludF94ID49IHJvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElD QUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVS U0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9 PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09 IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVIpCisgICAgICAgIGN1cnNvcl90eXBlID0gTUNfUklHSFRfRlJJTkdFX0JJ VE1BUDsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94 LCBvcG9pbnRfZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZCwgaCwg Y3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAg ICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2 b3IsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0 aW9uX3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJTExfQ09MVU1OOiAgWFdJREdFVF9HTFlQ SCAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAg IGNhc2UgRklMTF9DT0xVTU46CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxh dm9yID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0g LSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5m Y194ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGds eXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZ UEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZB UiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjaF92ZXJ0aWNhbF9ydWxl cikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9 PSB5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBv cyA9PSB2cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dM WVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsK KyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmY19m eCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlw ZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAg ICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19w LCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7 CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNl IENVUlNPUl9JTkRJQ0FUT1I6CisgICAgeworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgIH0KKyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS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nMpKQorICAgICAgJiYg TklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkpKQorICAgIHJldHVybjsKKyAgc3RydWN0IGdseXBo X3JvdyAqYm90dG9tX3JvdyA9IE1BVFJJWF9CT1RUT01fVEVYVF9ST1cgKG1hdHJpeCwgdyk7Cisg IGludCBib3R0b21fdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAoYm90dG9tX3JvdywgbWF0cml4KTsK KyAgaWYgKHZwb3MgPT0gYm90dG9tX3Zwb3MpCisgICAgcmV0dXJuOworICBpZiAoIXJvdy0+dXNl ZFtURVhUX0FSRUFdKQorICAgIHJldHVybjsKKyAgaW50IGhwb3Nfc3RhcnQgPSBzdGFydCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgIGlmIChtY19zdGRlcnJfcCkKKyAgICBmcHJpbnRmIChz dGRlcnIsICJtY19kcmF3X3JvdyAoJWQpOiAgZHJhd19wICglcykgfCBocG9zICglZCkgfCBsZW4g KCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgIHZwb3MsIGRyYXdfcCA/ICJ5IiA6ICJuIiwg aHBvc19zdGFydCwgaHBvc19sZW5ndGgpOworICBpbnQgb3BvaW50X2Z4LCBvcG9pbnRfZnksIG9w b2ludF93ZCwgb3BvaW50X2g7CisgIGludCB0ZXh0X2FyZWFfd2lkdGggPSB3aW5kb3dfYm94X3dp ZHRoICh3LCBURVhUX0FSRUEpOworICBpbnQgaGVhZGVyX2xpbmVfZm9ybWF0ID0gV0lORE9XX0hF QURFUl9MSU5FX0hFSUdIVCAodyk7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnNvcl9yb3cgPSAo dy0+Y3Vyc29yLnZwb3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1BVFJJWF9ST1cgKGN1cnNvcl9tYXRyaXgsIHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiBOVUxMOworICBzdHJ1Y3QgZ2x5cGggKmN1cnNvcl9nbHlw aCA9ICh3LT5jdXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IG1jX2dldF9jdXJzb3JfZ2x5cGggKHcsIGN1cnNvcl9tYXRyaXgsIGN1cnNvcl9yb3csCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5j dXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiBOVUxMOworICBib29sIGN1cnNvcl9hdF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0g TlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29y X3Jvdy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1 cnNvcl9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID09IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRo KTsKKyAgYm9vbCBjdXJzb3JfYmV5b25kX2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxM CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1 cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgIWN1cnNvcl9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHRleHRfYXJlYV93aWR0aAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gY3Vyc29y X3Jvdy0+cGl4ZWxfd2lkdGgpOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAg ICAgICAgICAgICAgICAgIFJFUExBQ0UgVEhFIFJFQUwgQ1VSU09SCisqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKyAgZW51bSBmYWNlX2lkIGJnX2ZhY2VfaWQgPSAoY3Vyc29yX2dseXBoICE9IE5V TEwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBjdXJzb3JfZ2x5cGgtPmZhY2VfaWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgc3RydWN0 IG1jX1JHQiBjdXJzb3JfYmc7CisgIG1jX3NldF9sc2xfYmcgKHcsIGJnX2ZhY2VfaWQsICZjdXJz b3JfYmcpOworICAvKiBGSVhNRTogIFB1dCBpbiBzb21lIGNvZGUgdG8gZGVmYXVsdCB0byBNQ19I T0xMT1dfQk9YIGlmIHRoZSB1c2VyIGhhcworICB1bndpdHRpbmdseSBjb21lIHVwIHdpdGggc29t ZSB1bmFjY2VwdGFibGUgZm9ybSBvZiB1bnJlY29nbml6ZWQgY3Vyc29yIHR5cGUuICovCisgIExp c3BfT2JqZWN0IGxpc3BfdHlwZSA9IEJWQVIgKGIsIG1jX3JlYWxfZmFrZV9jdXJzb3IpOworICBl bnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19saXNwX3RvX2N1cnNvcl90eXBl IChYQ0FSIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiBtY19saXNwX3RvX2N1cnNvcl90eXBlIChsaXNwX3R5cGUpOworICBpbnQgY3Vyc29yX3dpZHRo ID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgPyBYRklYTlVNIChY Q0FSIChYQ0RSIChsaXNwX3R5cGUpKSkKKyAgICAgICAgICAgICAgICAgICAgIDogLTE7CisgIHN0 cnVjdCBtY19SR0IgY3Vyc29yX2ZnOworICBtY19jb2xvcl9waWNrZXIgKHcsIGN1cnNvcl9nbHlw aCwgZXNzZW50aWFscywgJmN1cnNvcl9mZywgLTEsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAg ICAgICAgIHJvd19wb3NpdGlvbiwgQ1VSU09SX0lORElDQVRPUik7CisgIGJvb2wgZmlsbF9jb2x1 bW5fdHJ1bXBzX3AgPSAoIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNzZW50 aWFscy5mY194CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWN1cnNvcl9hdF9m cmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFjdXJzb3JfYmV5b25k X2ZyaW5nZV9wKTsKKyAgLyogV2UgdXNlIGEgdGVzdCBzaW1pbGFyIHRvIHRoZSByZWFsIGZha2Ug Y3Vyc29yIHNvIHRoYXQgdGhlIGZyaW5nZSBiaXRtYXAgaXMKKyAgb25seSBkcmF3biBvbmNlIHBl ciB3aW5kb3cuICovCisgIGlmICh2cG9zID09IHctPmN1cnNvci52cG9zCisgICAgICAmJiBocG9z X3N0YXJ0ICsgaHBvc19sZW5ndGggPT0gcm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICYmICFO SUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9o b3Jpem9udGFsX3J1bGVyKSkpCisgICAgeworICAgICAgLyogZnJpbmdlIGJpdG1hcHMgdXNlIGZh Y2VfaWQgdG8gc2V0IHRoZSBmb3JlZ3JvdW5kIGNvbG9yLiAgVGhlIG92ZXJsYXktYXJyb3cKKyAg ICAgIGlzIHByZXNlbnRseSB0aGUgb25seSBzaXR1YXRpb24gd2hlcmUgdGhlIGBlc3NlbnRpYWxz LmFjdGl2ZV9wYCBhbmQgYG1pbmltYWxfcGAgYXJlCisgICAgICB1c2VkIHRvIGRldGVybWluZSB0 aGUgYXBwbGljYWJsZSBmYWNlX2lkLiAqLworICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmcgPSB7 LnJlZCA9IC0xLjAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSAtMS4w LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSAtMS4wfTsKKyAgICAgIC8q IFdlIHVzZSB0aGUgZmlyc3QgZ2x5cGggaW4gdGhlIHJvdywgd2l0aCBhbiBYIGFuZCBIUE9TIG9m IHplcm8uICovCisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCByb3ctPmdseXBoc1tU RVhUX0FSRUFdLCAwLCAtMSwgdy0+Y3Vyc29yLnksIC0xLAorICAgICAgICAgICAgICAgICAwLCB3 LT5jdXJzb3IudnBvcywgLTEsIC0xLCBNQ19MRUZUX0ZSSU5HRV9CSVRNQVAsIC0xLCByb3dfcG9z aXRpb24sCisgICAgICAgICAgICAgICAgIGxzbF9mZywgY3Vyc29yX2JnLCBlc3NlbnRpYWxzLmFj dGl2ZV9wLCBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUCwKKyAgICAgICAgICAgICAgICAgZHJhd19w LCBmcm9tX3doZXJlLCBDSF9DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorICBpZiAo Y3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zCisgICAg ICAmJiB3LT5jdXJzb3IuaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAmJiB3LT5jdXJzb3IuaHBv cyA9PSBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICYmICFOSUxQIChCVkFSIChiLCBj cm9zc2hhaXJzKSkKKyAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9ob3Jpem9udGFsX3J1bGVy KSkpCisgICAgeworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yID0gTUNfSE9MTE9X X1JFQ1RBTkdMRTsKKyAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1tURVhU X0FSRUFdOworICAgICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNl ZFtURVhUX0FSRUFdOworICAgICAgLyogR2x5cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4gKi8K KyAgICAgIGlmIChnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAg ICAgICArK2dseXBoX2VuZDsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBo X2VuZCAtIDEsIHctPmN1cnNvci54LCAtMSwgdy0+Y3Vyc29yLnksIC0xLAorICAgICAgICAgICAg ICAgICB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLn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ywgb3IgdGhlCisgICAgICB2YWx1 ZSBpcyBgbm9gIGluIHRoZSBmb3JtIG9mIGEgc3ltYm9sIG9yIHN0cmluZywgdGhlbiB0aGUgZGVm YXVsdCB3ZSB1c2UKKyAgICAgIGFuIE1DX0JBUiBhbmQgYW4gTUNfSEJBUiAtLSBib3RoIGhhdmlu ZyBhIGN1cnNvcl93aWR0aCBvZiAxLiAqLworICAgICAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAo dywgbWF0cml4LCByb3csIHctPmN1cnNvci54LCAmb3BvaW50X2Z4LCB3LT5jdXJzb3IueSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLCB3 LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg TUNfQkFSLCAxLCAmb3BvaW50X3dkKTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3cs IGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngsIG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAg ICAgICAgICAgICAgIG9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBv cG9pbnRfd2QsIG9wb2ludF9oLAorICAgICAgICAgICAgICAgICBNQ19CQVIsIDEsIHJvd19wb3Np dGlvbiwgY3Vyc29yX2ZnLCBjdXJzb3JfYmcsIGVzc2VudGlhbHMuYWN0aXZlX3AsCisgICAgICAg ICAgICAgICAgIE1DX0dMWVBITEVTUywgZHJhd19wLCBmcm9tX3doZXJlLCBOSUxQIChCVkFSIChi LCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgICAgbWNfZ2V0 X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54LCAmb3BvaW50X2Z4 LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfZnks IHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgTUNfSEJBUiwgMSwgJm9wb2ludF93ZCk7CisgICAgICBtY19oZWxw ZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9pbnRfZngs IHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHctPmN1cnNvci5ocG9z LCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAg TUNfSEJBUiwgMSwgcm93X3Bvc2l0aW9uLCBjdXJzb3JfZmcsIGN1cnNvcl9iZywgZXNzZW50aWFs cy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVy ZSwgTklMUCAoQlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAg fQorICBlbHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYmIGN1cnNvcl9n bHlwaCAhPSBOVUxMCisgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAg ICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAmJiB3LT5j dXJzb3IuaHBvcyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAgICAmJiBjdXJz b3JfZ2x5cGgtPnR5cGUgIT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBtY19nZXRfY3Vy c29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngsICZvcG9pbnRfZngsIHct PmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdy0+ Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmb3BvaW50X3dkKTsKKyAg ICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngs IG9wb2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgIG9wb2ludF9meSwgdy0+ Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCBvcG9pbnRfd2QsIG9wb2ludF9oLAorICAgICAg ICAgICAgICAgICBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGN1cnNv cl9mZywgY3Vyc29yX2JnLAorICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBN Q19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBOSUxQIChCVkFS IChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgPyBDSF9DQUNIRQorICAgICAgICAgICAg ICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICB9CisgIGVsc2UgaWYgKCFj dXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoICE9IE5VTEwKKyAg ICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAmJiB3LT5jdXJz b3IuaHBvcyA+PSBocG9zX3N0YXJ0CisgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zIDwgaHBv c19zdGFydCArIGhwb3NfbGVuZ3RoCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+dHlwZSA9 PSBTVFJFVENIX0dMWVBIKQorICAgIHsKKyAgICAgIC8qIElmIGEgdXNlciBoYXMgc2V0IGB4LXN0 cmV0Y2gtY3Vyc29yJyB0byBhIG5vbi1uaWwgdmFsdWUsIGhlL3NoZSBjaG9zZSB0bworICAgICAg aGF2ZSBhIGN1cnNvciB0aGF0IHNwYW5zIHRoZSBlbnRpcmUgbGVuZ3RoIG9mIHRoZSBTVFJFVENI X0dMWVBILiAqLworICAgICAgaWYgKCF4X3N0cmV0Y2hfY3Vyc29yX3ApCisgICAgICAgIHsKKyAg ICAgICAgICAvKiBUaGUgTUNfSEJBUiBzaGFsbCBoYXZlIGEgYGN1cnNvcl93aWR0aGAgb2YgMS4g Ki8KKyAgICAgICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+ Y3Vyc29yLngsICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg dy0+Y3Vyc29yLnksICZvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsIE1DX0hCQVIsIDEs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF93ZCk7CisgICAgICAg ICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwg b3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLnksIG9wb2ludF9meSwg dy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLAorICAgICAgICAgICAgICAgICAgICAgb3Bv aW50X3dkLCBvcG9pbnRfaCwgTUNfSEJBUiwgMSwgcm93X3Bvc2l0aW9uLCBjdXJzb3JfZmcsCisg ICAgICAgICAgICAgICAgICAgICBjdXJzb3JfYmcsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dM WVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgICAgICBOSUxQIChCVkFS IChiLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAg ICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgICAgICB9Cisg ICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngs ICZvcG9pbnRfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IueSwg Jm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgJm9wb2ludF93ZCk7CisgICAgICBtY19oZWxw ZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9pbnRfZngs IHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHctPmN1cnNvci5ocG9z LCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAg Y3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBjdXJzb3JfZmcsIGN1cnNv cl9iZywKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRy YXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgTklMUCAoQlZBUiAoYiwgbWNfY29u ZikpCisgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAgICAgICAgOiBNQ19D QUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq CisgICAgICAgICAgICAgICAgICAgICAgICAgIERSQVcgQU5EIFJFQ09SRCBGQUtFIENVUlNPUlMK KyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworICBpZiAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAg ICAgICYmIE5JTFAgKEJWQVIgKGIsIG1jX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgJiYgTklM UCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAmJiBOSUxQIChCVkFSIChi LCBmY19pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgcmV0dXJuOworICBpZiAoaHBvc19sZW5ndGgg PT0gMSkKKyAgICB7CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAg ICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFs cy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1jX2luYWN0 aXZlX3dpbmRvd3MpKSkpKQorICAgICAgICB7CisgICAgICAgICAgLyogVGhlIHNwYWNlIGFwcGVu ZGVkIHRvIGEgcm93IGVuZGluZyB3aXRoIGEgbmV3IGxpbmUKKyAgICAgICAgICBkb2VzIG5vdCBo YXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDApIHRoYXQgd2UgY2FuCisgICAgICAgICAgdXNl IGZvciB0aGlzIHBhcnRpY3VsYXIgYXBwbGljYXRpb24uICBXaGVuIHRoZXJlIGlzIGEKKyAgICAg ICAgICBgYnVmZmVyLWRpc3BsYXktdGFibGUnIGVudHJ5IHRoYXQgYXNzaWducyBhIHZpc2libGUK KyAgICAgICAgICBnbHlwaCB0byBhIG5ldyBsaW5lLCB0aGVyZSBpcyBubyBwcm9ibGVtIGJlY2F1 c2UgdGhhdAorICAgICAgICAgIGdseXBoIGhhcyBhIGBnbHlwaC0+Y2hhcnBvcycgdGhhdCB3ZSBj YW4gdXNlLiAgV2hlbgorICAgICAgICAgIG5vIHZpc2libGUgRU9MIGdseXBoIGV4aXN0cywgd2Ug dXNlIHRoZSBmb2xsb3dpbmcKKyAgICAgICAgICB0ZXN0OiAgdGhlIGFwcGVuZGVkIHNwYWNlIGhh cyBhIHBvc2l0aW9uIHRoYXQgaXMgb25lCisgICAgICAgICAgbGVzcyB0aGFuIHRoZSBlbmQgb2Yg dGhlIG1hdHJpeCByb3cuICovCisgICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgc3RydWN0IGdseXBoICpwcmV2aW91c19nbHlwaCA9 ICgwIDw9IGhwb3MgLSAxICYmIGhwb3MgLSAxIDwgcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSArIGhwb3MgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogTlVMTDsKKyAgICAgICAgICAvLyBzdHJ1Y3QgZ2x5cGggKmxhc3RfZ2x5cGggPSByb3ctPmds eXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgICAgIGJv b2wgc2tpcF9wID0gKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBNQVRSSVhfUk9XX0VORF9DSEFSUE9T IChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICYmIHN0YXJ0LT5ieXRlcG9zICE9 IGVzc2VudGlhbHMuenZfYnl0ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisg ICAgICAgICAgICAgICAgICAgICAgICAvKiBXaGVuIGEgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBl bnRyeSBjb250YWlucworICAgICAgICAgICAgICAgICAgICAgICAgYSB2aXNpYmxlIHRhYiBjaGFy YWN0ZXIgKCLCuyIpLCB0aGUgc3Vic2VxdWVudAorICAgICAgICAgICAgICAgICAgICAgICAgU1RS RVRDSF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgc3RhcnQtPmNoYXJwb3MKKyAgICAgICAgICAg ICAgICAgICAgICAgIGFzIHRoZSBhZm9yZW1lbnRpb25lZCB2aXNpYmxlIHRhYiBjaGFyYWN0ZXIu ICovCisgICAgICAgICAgICAgICAgICAgICAgICA6IChwcmV2aW91c19nbHlwaCAhPSBOVUxMCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBz dGFydC0+Y2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAg ICAgICAgICAgICAgICAgICA6IGZhbHNlOworICAgICAgICAgIGludCBwb3NpbnQgPSAocm93X3Bv c2l0aW9uID09IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyAtMQorICAgICAg ICAgICAgICAgICAgICAgICA6IChyb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAgICAgICAg ICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICA6IChz dGFydC0+Ynl0ZXBvcyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFtURVhU X0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9ST1dfRU5EX0NI QVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgIDogKHN0YXJ0LT5ieXRlcG9z ID09IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzdGFy dCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKQor ICAgICAgICAgICAgICAgICAgICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAg ICAgICAgICA6IHN0YXJ0LT5jaGFycG9zOworICAgICAgICAgIExpc3BfT2JqZWN0IHNwZWNzID0g bWNfYXNzb2MgKG1ha2VfZml4bnVtIChwb3NpbnQpLCBCVkFSIChiLCBtY19jb25mKSk7CisgICAg ICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAg ICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAmJiAhTklM UCAoc3BlY3MpCisgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21f eSAodykKKyAgICAgICAgICAgICAgJiYgIXNraXBfcAorICAgICAgICAgICAgICAmJiByb3dfcG9z aXRpb24gIT0gUE9TVF9aVikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgTGlzcF9PYmpl Y3QgbGlzcF90eXBlID0gbWNfbnRoICgxLCBzcGVjcyk7CisgICAgICAgICAgICAgIGVudW0gbWNf Y3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUgPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vyc29y X3R5cGUgKFhDQVIgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7Cisg ICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gKHN0YXJ0LT50eXBlID09IElNQUdFX0dMWVBIKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogY3Vyc29yX3R5cGU7CisgICAgICAgICAgICAgIGludCBjdXJzb3Jf d2lkdGggPSAoQ09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IFhGSVhOVU0gKFhDQVIgKFhDRFIgKGxpc3BfdHlwZSkpKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAtMTsKKyAgICAgICAgICAgICAgTGlzcF9PYmplY3QgbWNfZm9y ZWdyb3VuZCA9IG1jX250aCAoMiwgc3BlY3MpOworICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdC IGxzbF9mZzsKKyAgICAgICAgICAgICAgaWYgKFNUUklOR1AgKG1jX2ZvcmVncm91bmQpKQorICAg ICAgICAgICAgICAgIG1jX3h3X2NvbG9yX3ZhbHVlcyAodywgbWNfZm9yZWdyb3VuZCwgJmxzbF9m Zyk7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoVkVDVE9SUCAobWNfZm9yZWdyb3VuZCkpCisg ICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGxzbF9mZy5yZWQgPSBYRkxP QVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMCkpOworICAgICAgICAgICAgICAgICAgICBs c2xfZmcuZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMSkpOworICAg ICAgICAgICAgICAgICAgICBsc2xfZmcuYmx1ZSA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3Jl Z3JvdW5kLCAyKSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNl IGlmIChOSUxQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgbWNfY29sb3Jf cGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgcG9zaW50LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCByb3dfcG9zaXRpb24sIE1V TFRJUExFX0NVUlNPUlMpOworICAgICAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBP UyAocm93LCBtYXRyaXgpOworICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHRleHRfYXJlYV93 aWR0aDsKKyAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRF WFRfQVJFQSwgeCwgeF9saW1pdCwgcm93LT55LAorICAgICAgICAgICAgICAgICAgICAgICAgIHN0 YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwgdnBvcywgY3Vyc29yX3R5cGUsCisgICAgICAg ICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxz LCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLCBNVUxUSVBM RV9DVVJTT1JTLCBkcmF3X3AsIGZyb21fd2hlcmUsIE1DX0NBQ0hFKTsKKyAgICAgICAgICAgIH0K KyAgICAgICAgfQorICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBmY192aXNpYmxlKSkKKyAgICAg ICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICB8fCAoIWVzc2VudGlh bHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBmY19pbmFj dGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgIC8vICYmIGVzc2VudGlhbHMuZmNfeCA8PSB0ZXh0 X2FyZWFfd2lkdGgKKyAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPCB0ZXh0X2FyZWFfd2lk dGgKKyAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0gdy0+bWMubG51bV9waXhlbF93aWR0 aCkKKyAgICAgICAgeworICAgICAgICAgIGludCB4X2xpbWl0ID0geCArIHN0YXJ0LT5waXhlbF93 aWR0aDsKKyAgICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueCA9 PSBlc3NlbnRpYWxzLmZjX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5jdXJzb3IueSA9PSByb3ctPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9 PSB2cG9zKTsKKyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICBtY19j b2xvcl9waWNrZXIgKHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgTUNfQkFSLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0aW9uLCBGSUxMX0NPTFVNTik7Cisg ICAgICAgICAgaWYgKHggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgLy8geCArIHN0 YXJ0LT5waXhlbF93aWR0aCA8PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgJiYgKCho ZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgfHwg aGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICYmICgoc3RhcnQgIT0gcm93 LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMQorICAgICAgICAg ICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSB4CisgICAgICAgICAgICAgICAgICAgJiYg ZXNzZW50aWFscy5mY194IDwgeCArIHN0YXJ0LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAg ICAgIHx8IChzdGFydCA9PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRf QVJFQV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHgp KQorICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisg ICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAgICBtY19lbmdp bmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0LCByb3ctPnks CisgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwg dnBvcywgTUNfQkFSLCAxLAorICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBl c3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAgICAgICAgICAg RklMTF9DT0xVTU4sIGRyYXdfcCwgZnJvbV93aGVyZSwgRkNfQ0FDSEUpOworICAgICAgICB9Cisg ICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICYmICFOSUxQ IChCVkFSIChiLCBjaF9ob3Jpem9udGFsX3J1bGVyKSkKKyAgICAgICAgICAmJiAoZXNzZW50aWFs cy5hY3RpdmVfcAorICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAg ICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQor ICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgIHsKKyAgICAgICAg ICBpbnQgeF9saW1pdCA9IChzdGFydCA9PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51 c2VkW1RFWFRfQVJFQV0gLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgPyB0ZXh0X2FyZWFf d2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgIDogeCArIHN0YXJ0LT5waXhlbF93aWR0aDsK KyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICBtY19jb2xvcl9waWNr ZXIgKHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgTUNfSEJBUiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgSE9SSVpPTlRBTF9SVUxFUik7CisgICAg ICAgICAgLyogUHJlc2VydmUgc3VwcG9ydCBmb3IgZGVmYXVsdCBiZWhhdmlvciBzdWNoIHRoYXQg YSB1c2VyIG1heQorICAgICAgICAgIHNwZWNpZnkgdGhlIGhlaWdodCBvZiBhbiBNQ19IQkFSLCB3 aGljaCBiZWdpbnMgaXRzIGpvdXJuZXkKKyAgICAgICAgICBhcyB0aGUgYGN1cnNvcl93aWR0aCcu ICBgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeScgcmVhZGp1c3RzLiAqLworICAgICAgICAgIG1jX2Vu Z2luZSAodywgbWF0cml4LCByb3csIHN0YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+ eSwKKyAgICAgICAgICAgICAgICAgICAgIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwg dnBvcywgTUNfSEJBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVz c2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLAorICAgICAgICAgICAgICAgICAgICAgSE9S SVpPTlRBTF9SVUxFUiwgZHJhd19wLCBmcm9tX3doZXJlLCBDSF9DQUNIRSk7CisgICAgICAgIH0K KyAgICAgIGlmICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgJiYgIU5J TFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAmJiAoZXNzZW50aWFs cy5hY3RpdmVfcAorICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAg ICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQor ICAgICAgICAgICYmICFmaWxsX2NvbHVtbl90cnVtcHNfcCkKKyAgICAgICAgeworICAgICAgICAg IGN1cnNvcl90eXBlID0gKHN0YXJ0LT50eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAg ICAgICAgICAgICAgPyBNQ19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICA6IE1D X0JBUjsKKyAgICAgICAgICBpbnQgeF9saW1pdCA9IHRleHRfYXJlYV93aWR0aDsKKyAgICAgICAg ICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9ICh3LT5jdXJzb3IueSA9PSByb3ctPnkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9z KTsKKyAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICBtY19jb2xvcl9w aWNrZXIgKHcsIHN0YXJ0LCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgY3Vyc29yX3R5cGUsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIFZFUlRJQ0FMX1JVTEVSKTsK KyAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAg ICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICYm ICgoc3RhcnQgIT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNlZFtURVhUX0FSRUFd IC0gMQorICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHgKKyAgICAgICAgICAg ICAgICAgICAmJiB3LT5jdXJzb3IueCA8IHggKyBzdGFydC0+cGl4ZWxfd2lkdGgpCisgICAgICAg ICAgICAgICAgICB8fCAoc3RhcnQgPT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNl ZFtURVhUX0FSRUFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49 IHgpKQorICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcp CisgICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAgICBtY19l bmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0LCByb3ct PnksCisgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVB XSwgdnBvcywgY3Vyc29yX3R5cGUsIDEsCisgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9t YXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLAorICAgICAgICAgICAgICAg ICAgICAgICBWRVJUSUNBTF9SVUxFUiwgZHJhd19wLCBmcm9tX3doZXJlLCBDSF9DQUNIRSk7Cisg ICAgICAgIH0KKyAgICB9CisgICAgZWxzZQorICAgICAgeworICAgICAgICBpbnQgcmVsYXRpdmVf eCA9IDA7CisgICAgICAgIGZvciAoaW50IGFyZWEgPSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwg TEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0IGdseXBo ICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgICAgc3RydWN0IGdseXBoICpn bHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAgIC8qIEdseXBo IGZvciBhIGxpbmUgZW5kIGluIHRleHQuICovCisgICAgICAgICAgICBpZiAoYXJlYSA9PSBURVhU X0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAgICAg ICAgICAgICAgKytnbHlwaF9lbmQ7CisgICAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9l bmQ7ICsrZ2x5cGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAodnBvcyAh PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaCAhPSBnbHlwaF9l bmQgLSAxCisgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHJlbGF0aXZl X3gKKyAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPCByZWxhdGl2ZV94CisgICAg ICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKSkKKyAgICAgICAgICAg ICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGlmICghTklMUCAoQlZBUiAoYiwgbWNfY29u ZikpCisgICAgICAgICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgbWNfaW5hY3RpdmVfd2luZG93cykpKSkp CisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8qIFRoZSBzcGFjZSBh cHBlbmRlZCB0byBhIHJvdyBlbmRpbmcgd2l0aCBhIG5ldyBsaW5lIGRvZXMKKyAgICAgICAgICAg ICAgICAgICAgbm90IGhhdmUgYSBgZ2x5cGgtPmNoYXJwb3NgICgtMSwgMCkgdGhhdCB3ZSBjYW4g dXNlIGZvciB0aGlzCisgICAgICAgICAgICAgICAgICAgIHBhcnRpY3VsYXIgYXBwbGljYXRpb24u ICBXaGVuIGEgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeQorICAgICAgICAgICAgICAgICAg ICBhc3NpZ25zIGEgdmlzaWJsZSBnbHlwaCB0byBhIG5ldyBsaW5lLCB0aGVyZSBpcyBubyBwcm9i bGVtCisgICAgICAgICAgICAgICAgICAgIGJlY2F1c2UgdGhhdCBnbHlwaCBoYXMgYSBgZ2x5cGgt PmNoYXJwb3MnIHRoYXQgd2UgY2FuIHVzZS4KKyAgICAgICAgICAgICAgICAgICAgV2hlbiBubyB2 aXNpYmxlIEVPTCBnbHlwaCBleGlzdHMsIHdlIHVzZSB0aGUgZm9sbG93aW5nIHRlc3Q6CisgICAg ICAgICAgICAgICAgICAgIHRoZSBhcHBlbmRlZCBzcGFjZSBoYXMgYSBwb3NpdGlvbiB0aGF0IGlz IG9uZSBsZXNzIHRoYW4gdGhlCisgICAgICAgICAgICAgICAgICAgIGVuZCBvZiB0aGUgbWF0cml4 IHJvdy4gKi8KKyAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5 cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqcHJldmlv dXNfZ2x5cGggPSAoMCA8PSBocG9zIC0gMSAmJiBocG9zIC0gMSA8IHJvdy0+dXNlZFtURVhUX0FS RUFdKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgaHBvcyAtIDEKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgICAgICAgICAgICAgICAg ICAgLy8gc3RydWN0IGdseXBoICpsYXN0X2dseXBoID0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSAr IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCBza2lw X3AgPSAocHJldmlvdXNfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBNQVRSSVhfUk9XX0VORF9DSEFS UE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlw aC0+Ynl0ZXBvcyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAv KiBXaGVuIGEgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeSBjb250YWlucworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGEgdmlzaWJsZSB0YWIgY2hhcmFjdGVyICgiwrsiKSwg dGhlIHN1YnNlcXVlbnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVFJFVENI X0dMWVBIIHdpbGwgaGF2ZSB0aGUgc2FtZSBnbHlwaC0+Y2hhcnBvcworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGFzIHRoZSBhZm9yZW1lbnRpb25lZCB2aXNpYmxlIHRhYiBjaGFy YWN0ZXIuICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAocHJldmlvdXNf Z2x5cGggIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHBy ZXZpb3VzX2dseXBoLT5jaGFycG9zID09IGdseXBoLT5jaGFycG9zKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgaW50IHBvc2ludCA9IChyb3dfcG9z aXRpb24gPT0gUE9TVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAt MQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAocm93X3Bvc2l0aW9uID09IEFU X1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBlc3NlbnRpYWxzLnp2 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaC0+Ynl0ZXBvcyAhPSBl c3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbVEVYVF9BUkVBXSAt IDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPV19FTkRf Q0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGds eXBoLT5ieXRlcG9zID09IGVzc2VudGlhbHMuenZfYnl0ZQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBlc3NlbnRpYWxzLnp2CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGdseXBo LT5jaGFycG9zOworICAgICAgICAgICAgICAgICAgICBMaXNwX09iamVjdCBzcGVjcyA9IG1jX2Fz c29jIChtYWtlX2ZpeG51bSAocG9zaW50KSwgQlZBUiAoYiwgbWNfY29uZikpOworICAgICAgICAg ICAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAg ICAgICAgICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAg ICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKHNwZWNzKQorICAgICAgICAgICAgICAgICAgICAg ICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIXNraXBfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0 aW9uICE9IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICAgICAgTGlzcF9PYmplY3QgbGlzcF90eXBlID0gbWNfbnRoICgxLCBzcGVjcyk7CisgICAg ICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gKENP TlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAobGlzcF90 eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgICAgICAgICAg ICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19IT0xMT1dfQk9YCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yX3R5cGU7CisgICAg ICAgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoID0gKENPTlNQIChsaXNwX3R5cGUp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gWEZJWE5VTSAo WENBUiAoWENEUiAobGlzcF90eXBlKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAtMTsKKyAgICAgICAgICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IG1j X2ZvcmVncm91bmQgPSBtY19udGggKDIsIHNwZWNzKTsKKyAgICAgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFNUUklO R1AgKG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICBtY194d19jb2xv cl92YWx1ZXMgKHcsIG1jX2ZvcmVncm91bmQsICZsc2xfZmcpOworICAgICAgICAgICAgICAgICAg ICAgICAgICBlbHNlIGlmIChWRUNUT1JQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsc2xfZmcucmVk ID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDApKTsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGxzbF9mZy5ncmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3Jl Z3JvdW5kLCAxKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsc2xfZmcuYmx1ZSA9 IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAyKSk7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKE5JTFAg KG1jX2ZvcmVncm91bmQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfY29sb3Jf cGlja2VyICh3LCBnbHlwaCwgZXNzZW50aWFscywgJmxzbF9mZywKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaW50LCBjdXJzb3JfdHlwZSwgcm93X3Bv c2l0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBN VUxUSVBMRV9DVVJTT1JTKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9zID0gTUFU UklYX1JPV19WUE9TIChyb3csIG1hdHJpeCk7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQg eF9saW1pdCA9IHRleHRfYXJlYV93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1jX2Vu Z2luZSAodywgbWF0cml4LCByb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB4X2xpbWl0LCByb3ctPnksIGdseXBoIC0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBv cywgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlMsIGRy YXdfcCwgZnJvbV93aGVyZSwgTUNfQ0FDSEUpOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGZj X3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX2luYWN0aXZlX3dpbmRv d3MpKSkpCisgICAgICAgICAgICAgICAgICAgIC8vICYmIGVzc2VudGlhbHMuZmNfeCA8PSB0ZXh0 X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194IDwgdGV4 dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSB3 LT5tYy5sbnVtX3BpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBpbnQgeF9saW1pdCA9IHRleHRfYXJlYV93aWR0aDsKKyAgICAgICAgICAgICAgICAg ICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAody0+Y3Vyc29yLnggPT0gZXNzZW50aWFscy5m Y194CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct PmN1cnNvci55ID09IHJvdy0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+Y3Vyc29yLnZwb3MgPT0gdnBvcyk7CisgICAgICAgICAgICAgICAgICAgIGludCBocG9zID0g Z2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICAgICAgICAgICAgbWNfY29sb3JfcGlja2VyICh3 LCBnbHlwaCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIE1DX0JBUiwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIEZJTExfQ09MVU1OKTsKKyAgICAg ICAgICAgICAgICAgICAgaWYgKGhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAgICAgICAg ICAgICAgJiYgaHBvcyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAgICAgICAg ICAgICAgICAgLy8gJiYgcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCA8PSB0ZXh0X2Fy ZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIHJlbGF0aXZlX3ggPCB0ZXh0X2Fy ZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICgoaGVhZGVyX2xpbmVfZm9ybWF0 ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJf bGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICgoZ2x5cGggIT0g Z2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxz LmZjX3ggPj0gcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlc3Nl bnRpYWxzLmZjX3ggPCByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHx8IChnbHlwaCA9PSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSByZWxhdGl2ZV94KSkK KyAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21f eSAodykKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisg ICAgICAgICAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFy ZWEsIHJlbGF0aXZlX3gsIHhfbGltaXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICByb3ctPnksIGhwb3MsIHZwb3MsIE1DX0JBUiwgMSwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2Zn LCBGSUxMX0NPTFVNTiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwg ZnJvbV93aGVyZSwgRkNfQ0FDSEUpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgIGlmICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAg ICYmICFOSUxQIChCVkFSIChiLCBjaF9ob3Jpem9udGFsX3J1bGVyKSkKKyAgICAgICAgICAgICAg ICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8 ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFO SUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICAg ICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHRleHRfYXJlYV93aWR0aDsKKyAgICAgICAgICAg ICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICAgICAg ICBtY19jb2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgTUNf SEJBUiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24s IEhPUklaT05UQUxfUlVMRVIpOworICAgICAgICAgICAgICAgICAgICAvKiBQcmVzZXJ2ZSBzdXBw b3J0IGZvciBkZWZhdWx0IGJlaGF2aW9yIHN1Y2ggdGhhdCBhIHVzZXIgbWF5CisgICAgICAgICAg ICAgICAgICAgIHNwZWNpZnkgdGhlIGhlaWdodCBvZiBhbiBNQ19IQkFSLCB3aGljaCBiZWdpbnMg aXRzIGpvdXJuZXkKKyAgICAgICAgICAgICAgICAgICAgYXMgdGhlIGBjdXJzb3Jfd2lkdGgnLiAg YG1jX2dldF9jdXJzb3JfZ2VvbWV0cnknIHJlYWRqdXN0cy4gKi8KKyAgICAgICAgICAgICAgICAg ICAgaWYgKGhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBv cyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19l bmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgeF9saW1pdCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+eSwgaHBvcywgdnBvcywgTUNf SEJBUiwgMSwgY3Vyc29yX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgbHNsX2ZnLCBIT1JJWk9OVEFMX1JVTEVSLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJhd19wLCBmcm9tX3doZXJlLCBDSF9DQUNI RSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFS IChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIs IGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMu YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9pbmFj dGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1 bXBzX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90 eXBlID0gKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogTUNfQkFSOworICAgICAgICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHRleHRf YXJlYV93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3Ag PSAody0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAgICAg ICAgICAgICBpbnQgaHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAg ICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgICAgICAg IG1jX2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBjdXJz b3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRp b24sIFZFUlRJQ0FMX1JVTEVSKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGhwb3MgPj0gaHBv c19zdGFydAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA8IGhwb3Nfc3RhcnQgKyBo cG9zX2xlbmd0aAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChoZWFkZXJfbGluZV9mb3Jt YXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGhlYWRl cl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChnbHlwaCAh PSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNv ci54ID49IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vy c29yLnggPCByZWxhdGl2ZV94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHx8IChnbHlwaCA9PSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHJlbGF0aXZlX3gpKQorICAgICAgICAg ICAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAg ICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRp dmVfeCwgeF9saW1pdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+eSwg aHBvcywgdnBvcywgY3Vyc29yX3R5cGUsIDEsIGN1cnNvcl9tYXRyaXgsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywgVkVS VElDQUxfUlVMRVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcmF3X3AsIGZy b21fd2hlcmUsIENIX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgfQorICAg ICAgICAgIH0KKyAgICAgIH0KKyAgLy8gIGNsb2NrX3QgY2xvY2tfZW5kID0gY2xvY2soKTsKKyAg Ly8gIGRvdWJsZSBjcHVfdGltZV91c2VkID0gKChkb3VibGUpIChjbG9ja19lbmQgLSBjbG9ja19z dGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJtY19kcmF3 X3JvdyAoJXMpOiAgVElNRSAoJWYpXG4iLCBtY193aW5kb3cgKHcpLCBjcHVfdGltZV91c2VkKTsK K30KKworYm9vbAorbWNfcmVkcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBo X21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICBl bnVtIGdseXBoX3Jvd19hcmVhIGFyZWEsIGludCBzdGFydF94LCBpbnQgc3RhcnRfaHBvcywgaW50 IGVuZF9ocG9zLAorICAgICAgICAgICAgICAgYm9vbCBjbGVhcl9lb2xfcCwgZW51bSBkcmF3X2ds eXBoc19mYWNlIGhsLAorICAgICAgICAgICAgICAgZW51bSBtY19yZWRyYXdfcm93X3R5cGUgZnJv bV93aGVyZSkKK3sKKyAgYm9vbCBnb19wID0gKCh3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01D X0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191c2Vk W0NIX0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICB8fCB3LT5tY19tYXRyaXguY3Vyc29yc191 c2VkW0ZDX0NBQ0hFXSA+IDApCisgICAgICAgICAgICAgICAmJiBhcmVhID09IFRFWFRfQVJFQQor ICAgICAgICAgICAgICAgJiYgcm93LT51c2VkW2FyZWFdKTsKKyAgaWYgKCFnb19wKQorICAgIHJl dHVybiBmYWxzZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcp KTsKKyAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgaWYgKG1j X3N0ZGVycl9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX3JlZHJhd19yb3cgKCVkKTogICVz XG5cCisgIHN0YXJ0X3ggKCVkKSB8IHN0YXJ0X2hwb3MgKCVkKSB8IGVuZF9ocG9zICglZClcbiIs CisgIHZwb3MsIG1jX3JlZHJhd19yb3dfdHlwZV90b19zdHJpbmcgKGZyb21fd2hlcmUpLCBzdG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zID0gKChkb3VibGUpIChjbG9ja19lbmQgLSBj bG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8qIGByZWRyYXdfb3ZlcmxhcHBlZF9y b3dzJyBjYWxscyBgcmlmLT5jbGVhcl9lbmRfb2ZfbGluZScuICovCisgIGlmIChjbGVhcl9lb2xf cAorICAgICAgJiYgZW5kX2hwb3MgPiBzdGFydF9ocG9zKQorICAgIHsKKyAgICAgIC8qIEFkdmFu Y2UgdGhlIG91dHB1dCBjdXJzb3IuICovCisgICAgICB3LT5vdXRwdXRfY3Vyc29yLmhwb3MgPSBl bmRfaHBvczsKKyAgICAgIHctPm91dHB1dF9jdXJzb3IueCA9IHg7CisgICAgICBGUkFNRV9SSUYg KGYpLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgcm93LCBURVhUX0FSRUEsIC0xKTsKKyAgICB9Cisg IC8vICBjbG9ja19zdGFydCA9IGNsb2NrKCk7CisgIGludCB2bnRoID0gTUFUUklYX1JPV19WUE9T IChyb3csIG1hdHJpeCk7CisgIC8qIFNUUkVUQ0hfR0xZUEggbWF5IGNvbnRhaW4gbW9yZSB0aGFu IG9uZSBmYWtlIGN1cnNvciBhdCB0aGUgc2FtZSBIUE9TLiAqLworICBmb3IgKGVudW0gbWNfY2Fj aGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NB Q0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICB7CisgICAgICBmb3IgKGludCBudGggPSAw OworICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wICh3LT5tY19tYXRyaXgsIGNhY2hlX3R5 cGUsIHZudGgsIG50aCk7CisgICAgICAgICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAg aW50IHggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLng7 CisgICAgICAgICAgaW50IGZ4ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXS5meDsKKyAgICAgICAgICBpbnQgeSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueTsKKyAgICAgICAgICBpbnQgZnkgPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZ5OworICAgICAgICAgIGludCBo cG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5ocG9z OworICAgICAgICAgIGludCB2cG9zID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXS52cG9zOworICAgICAgICAgIGludCB3ZCA9IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ud2Q7CisgICAgICAgICAgaW50IGggPSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmg7CisgICAgICAgICAg ZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3R5cGU7CisgICAgICAgICAgaW50IGN1cnNv cl93aWR0aCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u Y3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnID0gey5yZWQgPSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLnJlZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmdyZWVuLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIC5ibHVlID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlfTsKKyAgICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBs c2xfYmcgPSB7LnJlZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uYmcucmVkLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3Jl ZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdy ZWVuLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAg ICAgICAgYm9vbCBhY3RpdmVfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF0uYWN0aXZlX3A7CisgICAgICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxh dm9yID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5nbHlw aF9mbGF2b3I7CisgICAgICAgICAgYm9vbCBlbmFibGVkX3AgPSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcDsKKyAgICAgICAgICBpZiAodnBv cyA9PSB2bnRoCisgICAgICAgICAgICAgICYmICgoaHBvcyA+PSBzdGFydF9ocG9zCisgICAgICAg ICAgICAgICAgICAgJiYgaHBvcyA8IGVuZF9ocG9zKQorICAgICAgICAgICAgICAgICAgLyogQSBm bG9hdGluZyBjdXJzb3IgYmV5b25kIHRoZSBlbmQgb2YgdGhlIGdseXBoIHJvdy4gKi8KKyAgICAg ICAgICAgICAgICAgIHx8IChocG9zICsgMSA9PSBzdGFydF9ocG9zCisgICAgICAgICAgICAgICAg ICAgICAgJiYgaHBvcyArIDEgPT0gZW5kX2hwb3MpKQorICAgICAgICAgICAgICAmJiBlbmFibGVk X3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3AgPSBmYWxzZTsK KyAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIG1hdHJpeCwgcm93LCB4LCBm eCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgbHNsX2ZnLCBhY3RpdmVfcCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3Ap OworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICByZXR1cm4gdHJ1ZTsKKyAgLy8g IGNsb2NrX2VuZCA9IGNsb2NrKCk7CisgIC8vICBkb3VibGUgdGltZV9jdXJzb3JzID0gKChkb3Vi bGUpIChjbG9ja19lbmQgLSBjbG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8vICBm cHJpbnRmIChzdGRlcnIsICJtY19yZWRyYXdfcm93ICglZCk6ICBocG9zICglZC8lZCkgfCBnbHlw aHMgKCVmKSB8IGN1cnNvcnMgKCVmKVxuIiwKKyAgLy8gICAgICAgICAgICAgICAgICAgdnBvcywg c3RhcnRfaHBvcywgZW5kX2hwb3MsIHRpbWVfZ2x5cGhzLCB0aW1lX2N1cnNvcnMpOworfQorCit2 b2lkCittY19lcmFzZV9yb3cgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXgg Km1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93KQoreworICBpbnQgdm50aCA9IE1BVFJJWF9S T1dfVlBPUyAocm93LCBtYXRyaXgpOworICBpZiAobWNfc3RkZXJyX3ApCisgICAgZnByaW50ZiAo c3RkZXJyLCAibWNfZXJhc2Vfcm93ICglcyk6ICB2cG9zICglZClcbiIsIG1jX3dpbmRvdyAodyks IHZudGgpOworICAvLyAgaWYgKG1jX3N0ZGVycl9wKQorICAvLyAgICBmcHJpbnRmIChzdGRlcnIs ICJtY19lcmFzZV9oZWxwZXIgKCVzKTogIGNhY2hlICglcykgfCB2cG9zICglZClcbiIsCisgIC8v ICAgICAgbWNfd2luZG93ICh3KSwgbWNfY2FjaGVfdHlwZV90b19zdHJpbmcgKGNhY2hlX3R5cGUp LCB2bnRoKTsKKyAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hF OworICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisg ICAgeworICAgICAgZm9yIChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgbWNfdHJhdmVyc2VfY2Fj aGVfcCAody0+bWNfbWF0cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGgpOworICAgICAgICAgICAr K250aCkKKyAgICAgICAgeworICAgICAgICAgIGludCB4ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAgICAgIGludCBmeCA9IHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZng7CisgICAgICAgICAgaW50 IHkgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnk7Cisg ICAgICAgICAgaW50IGZ5ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXS5meTsKKyAgICAgICAgICBpbnQgaHBvcyA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uaHBvczsKKyAgICAgICAgICBpbnQgdnBvcyA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0udnBvczsKKyAgICAgICAg ICBpbnQgd2QgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LndkOworICAgICAgICAgIGludCBoID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXS5oOworICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5 cGUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmN1cnNv cl90eXBlOworICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGggPSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICAvLyAg c3RydWN0IG1jX1JHQiBsc2xfZmcgPSB7LnJlZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uZmcucmVkLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAg ICAgICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmZnLmdyZWVuLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAg ICAuYmx1ZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u ZmcuYmx1ZX07CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgLmJsdWUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgICAgIGJvb2wgYWN0aXZlX3AgPSB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmFjdGl2ZV9wOworICAgICAg ICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgIGJvb2wgZW5h YmxlZF9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5l bmFibGVkX3A7CisgICAgICAgICAgLyogYG1hdHJpeF9yb3cnIGluIGBkaXNwbmV3LmNgIGNvbnRh aW5zIHRoZSBmb2xsb3dpbmcgdGVzdHMsCisgICAgICAgICAgZWFzc2VydCAobWF0cml4ICYmIG1h dHJpeC0+cm93cyk7CisgICAgICAgICAgZWFzc2VydCAocm93ID49IDAgJiYgcm93IDwgbWF0cml4 LT5ucm93cyk7ICovCisgICAgICAgICAgYm9vbCBiYXJmX2NyYXNoX29uZSA9IChtYXRyaXggJiYg bWF0cml4LT5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgICAgICAgICBpZiAoYmFyZl9jcmFzaF9v bmUpCisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfdHdv ID0gKHZwb3MgPj0gMCAmJiB2cG9zIDwgbWF0cml4LT5ucm93cykgPyBmYWxzZSA6IHRydWU7Cisg ICAgICAgICAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAgICAgICAgICAgY29udGludWU7CisgICAg ICAgICAgaWYgKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgPT0g TUNfR0xZUEgKKyAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICBtY19lcmFzZV9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB3LT5tY19tYXRyaXgs IHgsIHksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhf Zmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QpOworICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcCA9IGZhbHNlOworICAgICAg ICAgICAgICAtLXctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAg ICAgICB9CisgICAgICAgICAgICBlbHNlIGlmICh2cG9zID09IHZudGgKKyAgICAgICAgICAgICAg ICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGJv b2wgcmVtb3ZlX3AgPSB0cnVlOworICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlk ICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgbHNsX2JnLCBhY3RpdmVfcCwKK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S0tLS0tLS0tKyA8PSBpdC5sYXN0X3Zpc2libGVfeSA9 PSAxMDgwICovCit2b2lkCittY19wcmVfc2Nyb2xsX2NsZWFuIChzdHJ1Y3Qgd2luZG93ICp3LCBz dHJ1Y3QgcnVuIHJ1biwgaW50IHN0YXJ0X3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICBpbnQg bnJvd3Nfc2Nyb2xsZWQsIGVudW0gbWNfcHJlX3Njcm9sbF9jbGVhbl90eXBlIGZyb21fd2hlcmUp Cit7CisgIGlmIChNSU5JX1dJTkRPV19QICh3KSkKKyAgICByZXR1cm47CisgIGJvb2wgZ29fb25l X3AgPSAody0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPiAwCisgICAgICAgICAg ICAgICAgICAgfHwgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPiAwCisgICAg ICAgICAgICAgICAgICAgfHwgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtGQ19DQUNIRV0gPiAw KTsKKyAgYm9vbCBnb190d29fcCA9IChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAg ICAgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpCisgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkpKTsKKyAgaWYgKG1jX3N0ZGVy cl9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX3ByZV9zY3JvbGxfY2xlYW4gKCVzKTpcblwK KyAgJXMgfCBnb19vbmVfcCAoJXMpIHwgZ29fdHdvX3AgKCVzKVxuXAorICBzdGFydF92cG9zICgl ZCkgfCBucm93c19zY3JvbGxlZCAoJWQpXG5cCisgICVzOiAgcnVuLmN1cnJlbnQvZGVzaXJlZF95 ICglZC8lZCkgfCBydW4uaGVpZ2h0ICglZClcbiIsCisgICAgbWNfd2luZG93ICh3KSwgKGZyb21f d2hlcmUgPT0gVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX0RPV04pCisgICAgICAg ICAgICAgICAgICAgICA/ICJUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTiIK KyAgICAgICAgICAgICAgICAgICA6IChmcm9tX3doZXJlID09IFRSWV9XSU5ET1dfUkVVU0lOR19D VVJSRU5UX01BVFJJWF9VUCkKKyAgICAgICAgICAgICAgICAgICAgID8gIlRSWV9XSU5ET1dfUkVV U0lOR19DVVJSRU5UX01BVFJJWF9VUCIKKyAgICAgICAgICAgICAgICAgICA6IChmcm9tX3doZXJl ID09IFRSWV9XSU5ET1dfSUQpCisgICAgICAgICAgICAgICAgICAgICA/ICJUUllfV0lORE9XX0lE IgorICAgICAgICAgICAgICAgICAgIDogIlVOS05PV04iLAorICAgIGdvX29uZV9wID8gInllcyIg OiAibm8iLCBnb190d29fcCA/ICJ5ZXMiIDogIm5vIiwKKyAgICBzdGFydF92cG9zLCBucm93c19z Y3JvbGxlZCwKKyAgICBydW4uY3VycmVudF95IDwgcnVuLmRlc2lyZWRfeSA/ICLihpMiIDogIuKG kSIsCisgICAgcnVuLmN1cnJlbnRfeSwgcnVuLmRlc2lyZWRfeSwgcnVuLmhlaWdodCk7CisgIGlm ICghZ29fb25lX3AgJiYgIWdvX3R3b19wKQorICAgIHJldHVybjsKKyAgYm9vbCB1cGRhdGluZ19m cmFtZV9wID0gZmFsc2U7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOwor ICBpZiAoWEZSQU1FICh3LT5mcmFtZSkgIT0gZi0+bWNfdXBkYXRpbmdfZnJhbWUKKyAgICAgICYm IChnb19vbmVfcCB8fCBnb190d29fcCkpCisgICAgeworICAgICAgdXBkYXRpbmdfZnJhbWVfcCA9 IHRydWU7CisgICAgICB1cGRhdGVfYmVnaW4gKGYpOworICAgIH0KKyAgaWYgKHctPnBoeXNfY3Vy c29yX29uX3AKKyAgICAgICYmIGdvX3R3b19wKQorICAgIGVyYXNlX3BoeXNfY3Vyc29yICh3KTsK KyAgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgIGZv ciAoaW50IHZudGggPSBzdGFydF92cG9zOworICAgICAgIG1hdHJpeCAhPSBOVUxMCisgICAgICAg JiYgdm50aCA8IG1hdHJpeC0+bnJvd3MKKyAgICAgICAmJiBNQVRSSVhfUk9XIChtYXRyaXgsIHZu dGgpLT5lbmFibGVkX3AKKyAgICAgICAmJiBnb19vbmVfcDsKKyAgICAgICArK3ZudGgpCisgICAg eworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAobWF0cml4LCB2bnRo KTsKKyAgICAgIG1jX2VyYXNlX3JvdyAodywgbWF0cml4LCByb3cpOworICAgIH0KKyAgaWYgKHVw ZGF0aW5nX2ZyYW1lX3ApCisgICAgdXBkYXRlX2VuZCAoZik7CisgIC8vIG1jX3Jlc2V0X2NhY2hl ICh3KTsKK30KKworREVGVU4gKCJtYy1zdGRlcnIiLCBGbWNfc3RkZXJyLCBTbWNfc3RkZXJyLCAw LCAxLCAiUCIsCisgICAgICAgZG9jOiAvKiBUb2dnbGUgdHJhY2luZyBvZiBtdWx0aXBsZSBmYWtl IGN1cnNvcnMuCitXaXRoIEFSRywgdHVybiB0cmFjaW5nIG9uIGlmIGFuZCBvbmx5IGlmIEFSRyBp cyBwb3NpdGl2ZS4gKi8pCisgIChMaXNwX09iamVjdCBhcmcpCit7CisgIGlmIChOSUxQIChhcmcp KQorICAgIG1jX3N0ZGVycl9wID0gIW1jX3N0ZGVycl9wOworICBlbHNlCisgICAgeworICAgICAg YXJnID0gRnByZWZpeF9udW1lcmljX3ZhbHVlIChhcmcpOworICAgICAgbWNfc3RkZXJyX3AgPSBY RklYTlVNIChhcmcpID4gMDsKKyAgICB9CisgIHJldHVybiBRbmlsOworfQorCisvKiBlbmQgTVVM VElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogDAogLyoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqCiAJCSAgICAgIFdpbmRvdyBkaXNwbGF5IGRpbWVuc2lvbnMKQEAgLTEzNTExLDYg KzE4Mzk3LDY5IEBAIGhzY3JvbGxfd2luZG93X3RyZWUgKExpc3BfT2JqZWN0IHdpbmRvdykKIAkg ICAgICBlbHNlCiAJCXB0ID0gY2xpcF90b19ib3VuZHMgKEJFR1YsIG1hcmtlcl9wb3NpdGlvbiAo dy0+cG9pbnRtKSwgWlYpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4g TVVMVElQTEUtQ1VSU09SUyAqLworCisvKiAoZ2RiKSBidAorIzAgIHRlcm1pbmF0ZV9kdWVfdG9f c2lnbmFsIChzaWc9NiwgYmFja3RyYWNlX2xpbWl0PTIxNDc0ODM2NDcpIGF0IGVtYWNzLmM6MzU5 CisjMSAgMHgwMDAwMDAwMTAwMWVlOTk2IGluIGRpZSAoCisgICAgbXNnPTB4MTAwMzJmYzg4ICJj aGFycG9zIDwgMCB8fCAoY2hhcnBvcyA+PSBCVUZfQkVHIChjdXJyZW50X2J1ZmZlcikgJiYgY2hh cnBvcyA8PSBaVikiLCBmaWxlPTB4MTAwMzJlMzJkICJ4ZGlzcC5jIiwgbGluZT03OTUxKSBhdCBh bGxvYy5j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ICAgICAgICAgICAgICAgICAmJiBjaGFycG9zIDw9IFpWKSk7ICovCisKKyAgc3RydWN0IGRpc3Bs YXlfcG9zICpwb3MgPSAmY3Vyc29yX3Jvdy0+c3RhcnQ7CisgIHB0cmRpZmZfdCBjaGFycG9zID0g Q0hBUlBPUyAocG9zLT5wb3MpOworCisgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAoY2hhcnBvcyA8 IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICB8fCAoY2hhcnBvcyA+PSBCVUZfQkVHIChjdXJy ZW50X2J1ZmZlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY2hhcnBvcyA8PSBa VikpCisgICAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAg ICAgICA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX29uZSkKKyAgICByZXR1cm4gaHNjcm9sbGVk X3A7CisKKyAgLyogYHJlc2VhdF8xJzogIENIQVJQT1MgKHBvcykgPj0gQkVHViAmJiBDSEFSUE9T IChwb3MpIDw9IFpWICovCisgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAoY2hhcnBvcyA+PSBCRUdW ICYmIGNoYXJwb3MgPD0gWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQorICAg ICAgICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAg IHJldHVybiBoc2Nyb2xsZWRfcDsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICAvKiBNb3ZlIGl0ZXJhdG9yIHRvIHB0IHN0 YXJ0aW5nIGF0IGN1cnNvcl9yb3ctPnN0YXJ0IGluCiAJCSBhIGxpbmUgd2l0aCBpbmZpbml0ZSB3 aWR0aC4gICovCiAJICAgICAgaW5pdF90b19yb3dfc3RhcnQgKCZpdCwgdywgY3Vyc29yX3Jvdyk7 CkBAIC0xNDM5Nyw5ICsxOTM0NiwyMiBAQCByZWRpc3BsYXlfaW50ZXJuYWwgKHZvaWQpCiAJICAg ICAgKnctPmRlc2lyZWRfbWF0cml4LT5tZXRob2QgPSAwOwogCSAgICAgIGRlYnVnX21ldGhvZF9h ZGQgKHcsICJvcHRpbWl6YXRpb24gMSIpOwogI2VuZGlmCisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNU RU0KKyAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgIG1jX3VwZGF0ZV93aW5kb3df ZnJpbmdlcyAodywgZmFsc2UpOworICAgIGVsc2UKIAkgICAgICB1cGRhdGVfd2luZG93X2ZyaW5n ZXMgKHcsIGZhbHNlKTsKICNlbmRpZgorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJ ICAgICAgZ290byB1cGRhdGU7CiAJICAgIH0KIAkgIGVsc2UKQEAgLTE3NzkyLDEwICsyMjc1NCwy MiBAQCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlz X29uZV9wKQogICAgIH0KIAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQorCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGJvb2wga2VlcF9j dXJyZW50X3AgPSAoanVzdF90aGlzX29uZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwg KCF1c2VkX2N1cnJlbnRfbWF0cml4X3AgJiYgIW92ZXJsYXlfYXJyb3dfc2VlbikKKyAgICAgICAg ICAgICAgICAgICAgICAgICB8fCB3LT5wc2V1ZG9fd2luZG93X3ApOworCisgIGJvb2wgZnJpbmdl c191cGRhdGVkX3AgPSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWly cykpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY191cGRhdGVfd2luZG93X2ZyaW5n ZXMgKHcsIGtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1cGRh dGVfd2luZG93X2ZyaW5nZXMgKHcsIGtlZXBfY3VycmVudF9wKTsKKwogICBpZiAoRlJBTUVfV0lO RE9XX1AgKGYpCi0gICAgICAmJiB1cGRhdGVfd2luZG93X2ZyaW5nZXMgKHcsIChqdXN0X3RoaXNf b25lX3AKLQkJCQkgICAgfHwgKCF1c2VkX2N1cnJlbnRfbWF0cml4X3AgJiYgIW92ZXJsYXlfYXJy b3dfc2VlbikKLQkJCQkgICAgfHwgdy0+cHNldWRvX3dpbmRvd19wKSkpCisgICAgICAmJiBmcmlu Z2VzX3VwZGF0ZWRfcCkKICAgICB7CiAgICAgICB1cGRhdGVfYmVnaW4gKGYpOwogICAgICAgYmxv Y2tfaW5wdXQgKCk7CkBAIC0xNzgxMCw2ICsyMjc4NCw5IEBAIHJlZGlzcGxheV93aW5kb3cgKExp c3BfT2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3RoaXNfb25lX3ApCiAgICAgICB1cGRhdGVfZW5k IChmKTsKICAgICB9CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKFdJTkRP V19CT1RUT01fRElWSURFUl9XSURUSCAodykpCiAgICAgZ3VpX2RyYXdfYm90dG9tX2RpdmlkZXIg KHcpOwogI2VuZGlmIC8qIEhBVkVfV0lORE9XX1NZU1RFTSAqLwpAQCAtMTgxMjUsNiArMjMxMDIs MTYgQEAgdHJ5X3dpbmRvd19yZXVzaW5nX2N1cnJlbnRfbWF0cml4IChzdHJ1Y3Qgd2luZG93ICp3 KQogCSAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CiAJICAgICAgZ3VpX3VwZGF0ZV93aW5kb3dfYmVn aW4gKHcpOwogCSAgICAgIEZSQU1FX1JJRiAoZiktPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3 KTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworICAgIG1jX3ByZV9zY3JvbGxfY2xlYW4gKHcsIHJ1biwgc3RhcnRfdnBvcywgbnJvd3Nfc2Ny b2xsZWQsIFRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9ET1dOKTsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIEZSQU1FX1JJRiAoZiktPnNjcm9sbF9ydW5f aG9vayAodywgJnJ1bik7CiAJICAgICAgZ3VpX3VwZGF0ZV93aW5kb3dfZW5kICh3LCBmYWxzZSwg ZmFsc2UpOwogCSAgICAgIHVwZGF0ZV9lbmQgKGYpOwpAQCAtMTgyOTEsNiArMjMyNzgsMTYgQEAg dHJ5X3dpbmRvd19yZXVzaW5nX2N1cnJlbnRfbWF0cml4IChzdHJ1Y3Qgd2luZG93ICp3KQogCSAg dXBkYXRlX2JlZ2luIChmKTsKIAkgIGd1aV91cGRhdGVfd2luZG93X2JlZ2luICh3KTsKIAkgIEZS QU1FX1JJRiAoZiktPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIG1jX3ByZV9zY3Jv bGxfY2xlYW4gKHcsIHJ1biwgc3RhcnRfdnBvcywgbnJvd3Nfc2Nyb2xsZWQsIFRSWV9XSU5ET1df UkVVU0lOR19DVVJSRU5UX01BVFJJWF9VUCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIAkgIEZSQU1FX1JJRiAoZiktPnNjcm9sbF9ydW5faG9vayAodywgJnJ1bik7CiAJICBndWlf dXBkYXRlX3dpbmRvd19lbmQgKHcsIGZhbHNlLCBmYWxzZSk7CiAJICB1cGRhdGVfZW5kIChmKTsK QEAgLTE5MjQ1LDYgKzI0MjQyLDE2IEBAIHRyeV93aW5kb3dfaWQgKHN0cnVjdCB3aW5kb3cgKncp CiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAJICBndWlfdXBkYXRlX3dpbmRvd19iZWdpbiAo dyk7CiAJICBGUkFNRV9SSUYgKGYpLT5jbGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBt Y19wcmVfc2Nyb2xsX2NsZWFuICh3LCBydW4sIGZpcnN0X3VuY2hhbmdlZF9hdF9lbmRfdnBvcywg ZHZwb3MsIFRSWV9XSU5ET1dfSUQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJ ICBGUkFNRV9SSUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcsICZydW4pOwogCSAgZ3VpX3VwZGF0 ZV93aW5kb3dfZW5kICh3LCBmYWxzZSwgZmFsc2UpOwogI2VuZGlmCkBAIC0yMTUyOCw2ICsyNjUz NSwxNyBAQCBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChzdHJ1Y3QgaXQgKml0KQogICAgICAg U0VUX1RFWFRfUE9TICh0ZW1faXQucG9zaXRpb24sIC0xLCAtMSk7CiAgICAgICBQUk9EVUNFX0dM WVBIUyAoJnRlbV9pdCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RS1DVVJTT1JTICovCisKKyAgICAgIC8qIFRoaXMgcGVybWl0cyB1cyB0byBpbnNwZWN0IHRoZSBI UE9TIG9mIGxpbmUgbnVtYmVyIGdseXBocyBhbmQgdGhlIHNwYWNlCisgICAgICBwYWRkaW5nIGJl Zm9yZS9hZnRlciB0aGUgbGluZSBudW1iZXJzLiAgV2Ugc2V0IGBnbHlwaC0+aHBvc2AgZWxzZXdo ZXJlLiAqLworICAgICAgdGVtX2l0Lmhwb3MgKz0gMTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogICAgICAgLyogU3RvcCBwcm9kdWNpbmcgZ2x5cGhzLCBhbmQgcmVmcmFpbiBmcm9t IHByb2R1Y2luZyB0aGUgbGluZQogCSBudW1iZXIsIGlmIHdlIGRvbid0IGhhdmUgZW5vdWdoIHNw YWNlIG9uIHRoaXMgbGluZS4gICovCiAgICAgICBpZiAodGVtX2l0LmN1cnJlbnRfeCA+PSB3aWR0 aF9saW1pdCkKQEAgLTIxNTM5LDYgKzI2NTU3LDI4IEBAIG1heWJlX3Byb2R1Y2VfbGluZV9udW1i ZXIgKHN0cnVjdCBpdCAqaXQpCiAJfQogICAgIH0KIAorCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZF UiAoaXQtPnctPmNvbnRlbnRzKTsKKyAgc3RydWN0IGJ1ZmZlciAqb2xkX2J1ZmZlciA9IE5VTEw7 CisgIC8qIE5lZWRlZCBzbyB0aGF0IGJ1ZmZlci1sb2NhbCB2YWx1ZXMgY2FuIGJlIGRldGVybWlu ZWQ7IGUuZy4sIHdoZW4gc3dpdGNoaW5nCisgIHRvIHRoZSBtaW5pYnVmZmVyLiAqLworICBpZiAo YiAhPSBjdXJyZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVmZmVyID0gY3VycmVudF9i dWZmZXI7CisgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9CisgIGl0LT53LT5t Yy5sbnVtX3BpeGVsX3dpZHRoID0gKCFOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdGVtX2l0LmN1cnJlbnRfeAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAgc2V0X2J1 ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICAgLyogUmVjb3JkIHRoZSB3aWR0aCBpbiBwaXhlbHMgd2UgbmVlZCBmb3IgdGhlIGxpbmUg bnVtYmVyIGRpc3BsYXkuICAqLwogICBpdC0+bG51bV9waXhlbF93aWR0aCA9IHRlbV9pdC5jdXJy ZW50X3g7CiAgIC8qIENvcHkgdGhlIHByb2R1Y2VkIGdseXBocyBpbnRvIElUJ3MgZ2x5cGhfcm93 LiAgKi8KQEAgLTI3MzYwLDYgKzMyNDAwLDE3IEBAIGFwcGVuZF9nbHlwaCAoc3RydWN0IGl0ICpp dCkKIAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJl YV07CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVw b3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAg ICAgICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlw aC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGlmIChpdC0+cGl4ZWxfd2lkdGggPiAwKQpA QCAtMjc0NDIsNiArMzI0OTMsMTcgQEAgYXBwZW5kX2NvbXBvc2l0ZV9nbHlwaCAoc3RydWN0IGl0 ICppdCkKIAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNb aXQtPmFyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBo LT5ieXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBpdC0+Y21wX2l0LmNoYXJwb3M7CiAgICAgICBn bHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93aWR0 aCA8PSBTSFJUX01BWCk7CkBAIC0yNzY1MCw2ICszMjcxMiwxNyBAQCBwcm9kdWNlX2ltYWdlX2ds eXBoIChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9yb3ct PmdseXBoc1thcmVhICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAg ICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKworCiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7 CiAJICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9 IGNsaXBfdG9fYm91bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzc1 Myw2ICszMjgyNiwxNyBAQCBwcm9kdWNlX3h3aWRnZXRfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJ fQogICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7 CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisK KyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElU X0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBo LT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBp dC0+b2JqZWN0OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBp dC0+cGl4ZWxfd2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3ODM5LDYgKzMyOTIzLDE3IEBAIGFwcGVu ZF9zdHJldGNoX2dseXBoIChzdHJ1Y3QgaXQgKml0LCBMaXNwX09iamVjdCBvYmplY3QsCiAJICAg IHdpZHRoIC09IGl0LT5maXJzdF92aXNpYmxlX3ggLSBpdC0+Y3VycmVudF94OwogCSAgZWFzc2Vy dCAod2lkdGggPiAwKTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBn bHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsK ICAgICAgIGdseXBoLT5vYmplY3QgPSBvYmplY3Q7CiAgICAgICAvKiBGSVhNRTogSXQgd291bGQg YmUgYmV0dGVyIHRvIHVzZSBUWVBFX01BWCBoZXJlLCBidXQKQEAgLTI4MjkzLDYgKzMzMzg4LDE3 IEBAIGFwcGVuZF9nbHlwaGxlc3NfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIGludCBmYWNlX2lkLCBi b29sIGZvcl9ub19mb250LCBpbnQgbGVuLAogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0 LT5nbHlwaF9yb3ctPmdseXBoc1thcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhw b3M7CisgICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQt PnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFz c2VydCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNIUlRfTUFYKTsKQEAgLTI5MzQzLDEwICszNDQ0OSwy MCBAQCBndWlfaW5zZXJ0X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3Jv dyAqdXBkYXRlZF9yb3csCiAKICAgLyogV3JpdGUgdGhlIGdseXBocy4gICovCiAgIGhwb3MgPSBz dGFydCAtIHJvdy0+Z2x5cGhzW3VwZGF0ZWRfYXJlYV07CisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKCFtY19yZWRyYXdfcm93ICh3 LCB3LT5jdXJyZW50X21hdHJpeCwgcm93LCB1cGRhdGVkX2FyZWEsIHctPm91dHB1dF9jdXJzb3Iu eCwKKyAgICAgICAgICAgICAgICAgICAgICBocG9zLCBocG9zICsgbGVuLCBmYWxzZSwgRFJBV19O T1JNQUxfVEVYVCwgR1VJX0lOU0VSVF9HTFlQSFMpKQogICBkcmF3X2dseXBocyAodywgdy0+b3V0 cHV0X2N1cnNvci54LCByb3csIHVwZGF0ZWRfYXJlYSwKIAkgICAgICAgaHBvcywgaHBvcyArIGxl biwKIAkgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCk7CiAKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgLyogQWR2YW5jZSB0aGUgb3V0cHV0IGN1cnNvci4gICovCiAgIHctPm91dHB1 dF9jdXJzb3IuaHBvcyArPSBsZW47CiAgIHctPm91dHB1dF9jdXJzb3IueCArPSBzaGlmdF9ieV93 aWR0aDsKQEAgLTI5NzcyLDkgKzM0ODg4LDE5IEBAIGd1aV9maXhfb3ZlcmxhcHBpbmdfYXJlYSAo c3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAogCSAgd2hpbGUgKGkgPCBy b3ctPnVzZWRbYXJlYV0KIAkJICYmIHJvdy0+Z2x5cGhzW2FyZWFdW2ldLm92ZXJsYXBzX3ZlcnRp Y2FsbHlfcCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgs IHJvdywgYXJlYSwgc3RhcnRfeCwgc3RhcnQsIGksCisgICAgICAgICAgZmFsc2UsIERSQVdfTk9S TUFMX1RFWFQsIEdVSV9GSVhfT1ZFUkxBUFBJTkdfQVJFQSkpCiAJICBkcmF3X2dseXBocyAodywg c3RhcnRfeCwgcm93LCBhcmVhLAogCQkgICAgICAgc3RhcnQsIGksCiAJCSAgICAgICBEUkFXX05P Uk1BTF9URVhULCBvdmVybGFwcyk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAl9 CiAgICAgICBlbHNlCiAJewpAQCAtMzAwMjUsMTAgKzM1MTUxLDIwIEBAIGRpc3BsYXlfYW5kX3Nl dF9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgIG5ld19jdXJzb3JfdHlwZSA9 IGdldF93aW5kb3dfY3Vyc29yX3R5cGUgKHcsIGdseXBoLAogCQkJCQkgICAgJm5ld19jdXJzb3Jf d2lkdGgsICZhY3RpdmVfY3Vyc29yKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAvKiBJZiBjdXJzb3IgaXMgY3VycmVudGx5IGJlaW5n IHNob3duIGFuZCB3ZSBkb24ndCB3YW50IGl0IHRvIGJlIG9yCiAgICAgIGl0IGlzIGluIHRoZSB3 cm9uZyBwbGFjZSwgb3IgdGhlIGN1cnNvciB0eXBlIGlzIG5vdCB3aGF0IHdlIHdhbnQsCiAgICAg IGVyYXNlIGl0LiAgKi8KICAgaWYgKHctPnBoeXNfY3Vyc29yX29uX3AKKyAgICAgICYmIE5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAmJiBOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgJiYgTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICYmIHctPm1j X21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID09IDAKKyAgICAgICYmIHctPm1jX21hdHJp eC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID09IDAKKyAgICAgICYmIHctPm1jX21hdHJpeC5jdXJz b3JzX3VzZWRbRkNfQ0FDSEVdID09IDAKICAgICAgICYmICghb24KIAkgIHx8IHctPnBoeXNfY3Vy c29yLnggIT0geAogCSAgfHwgdy0+cGh5c19jdXJzb3IueSAhPSB5CkBAIC0zMDA0MSw2ICszNTE3 Nyw5IEBAIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24s CiAJICAgICAgJiYgbmV3X2N1cnNvcl93aWR0aCAhPSB3LT5waHlzX2N1cnNvcl93aWR0aCkpKQog ICAgIGVyYXNlX3BoeXNfY3Vyc29yICh3KTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICAvKiBEb24ndCBjaGVjayBwaHlzX2N1cnNvcl9vbl9wIGhlcmUgYmVjYXVzZSB0aGF0IGZs YWcgaXMgb25seSBzZXQKICAgICAgdG8gZmFsc2UgaW4gc29tZSBjYXNlcyB3aGVyZSB3ZSBrbm93 IHRoYXQgdGhlIGN1cnNvciBoYXMgYmVlbgogICAgICBjb21wbGV0ZWx5IGVyYXNlZCwgdG8gYXZv aWQgdGhlIGV4dHJhIHdvcmsgb2YgZXJhc2luZyB0aGUgY3Vyc29yCkBAIC0zMDA1OSw5ICszNTE5 OCwyMyBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9u LAogICAgICAgdy0+cGh5c19jdXJzb3IudnBvcyA9IHZwb3M7CiAgICAgfQogCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmIChOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgJiYgTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICYmIE5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAmJiB3LT5tY19t YXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXgu Y3Vyc29yc191c2VkW0NIX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29y c191c2VkW0ZDX0NBQ0hFXSA9PSAwKQogICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJz b3IgKHcsIGdseXBoX3JvdywgeCwgeSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBuZXdfY3Vyc29yX3R5cGUsIG5ld19jdXJzb3Jfd2lkdGgsCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgb24sIGFjdGl2ZV9jdXJzb3IpOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiB9CiAKIApAQCAtMzAxNTQsNyArMzUzMDcsMTggQEAgZHJhd19yb3df d2l0aF9tb3VzZV9mYWNlIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgc3RhcnRfeCwgc3RydWN0IGds eXBoX3JvdyAqcm93LAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogICBpZiAoRlJBTUVfV0lO RE9XX1AgKFhGUkFNRSAody0+ZnJhbWUpKSkKICAgICB7CisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGlmICghbWNfcmVkcmF3X3Jv dyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgVEVYVF9BUkVBLCBzdGFydF94LAorICAgICAg ICAgICAgICAgICAgICAgICAgICBzdGFydF9ocG9zLCBlbmRfaHBvcywgZmFsc2UsIGRyYXcsIERS QVdfUk9XX1dJVEhfTU9VU0VfRkFDRSkpCiAgICAgICBkcmF3X2dseXBocyAodywgc3RhcnRfeCwg cm93LCBURVhUX0FSRUEsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCBkcmF3LCAwKTsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogICAgICAgcmV0dXJuOwogICAgIH0KICNlbmRpZgpAQCAt MzIyMTQsMTEgKzM3Mzc4LDIzIEBAIGV4cG9zZV9hcmVhIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1 Y3QgZ2x5cGhfcm93ICpyb3csIGNvbnN0IEVtYWNzX1JlY3RhbmdsZSAqciwKICAgc3RydWN0IGds eXBoICpsYXN0OwogICBpbnQgZmlyc3RfeCwgc3RhcnRfeCwgeDsKIAorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICBpZiAoYXJlYSA9PSBURVhU X0FSRUEgJiYgcm93LT5maWxsX2xpbmVfcCkKKyAgICB7CisgICAgICBpZiAoIW1jX3JlZHJhd19y b3cgKHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIGFyZWEsIDAsIDAsIHJvdy0+dXNlZFthcmVh XSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEVY UE9TRV9BUkVBX09ORSkpCiAgICAgLyogSWYgcm93IGV4dGVuZHMgZmFjZSB0byBlbmQgb2YgbGlu ZSB3cml0ZSB0aGUgd2hvbGUgbGluZS4gICovCiAgICAgZHJhd19nbHlwaHMgKHcsIDAsIHJvdywg YXJlYSwKIAkJIDAsIHJvdy0+dXNlZFthcmVhXSwKIAkJIERSQVdfTk9STUFMX1RFWFQsIDApOwor ICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBlbHNlCiAgICAgewogICAg ICAgLyogU2V0IFNUQVJUX1ggdG8gdGhlIHdpbmRvdy1yZWxhdGl2ZSBzdGFydCBwb3NpdGlvbiBm b3IgZHJhd2luZyBnbHlwaHMgb2YKQEAgLTMyMjUwLDExICszNzQyNiwyMyBAQCBleHBvc2VfYXJl YSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19S ZWN0YW5nbGUgKnIsCiAJICArK2xhc3Q7CiAJfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAgICAgICAvKiBSZXBhaW50LiAgKi8KLSAgICAg IGlmIChsYXN0ID4gZmlyc3QpCisgICAgICAvKiBGbG9hdGluZyBmYWtlIGN1cnNvcnMgd2lsbCBl eGlzdCB3aGVuIChsYXN0ID09IGZpcnN0KS4gKi8KKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAo dywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgYXJlYSwgZmlyc3RfeCAtIHN0YXJ0X3gsCisgICAg ICAgICAgICAgICAgICAgICAgICAgIGZpcnN0IC0gcm93LT5nbHlwaHNbYXJlYV0sIGxhc3QgLSBy b3ctPmdseXBoc1thcmVhXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UsIERSQVdf Tk9STUFMX1RFWFQsIEVYUE9TRV9BUkVBX1RXTykKKyAgICAgICAgICAmJiBsYXN0ID4gZmlyc3Qp CiAJZHJhd19nbHlwaHMgKHcsIGZpcnN0X3ggLSBzdGFydF94LCByb3csIGFyZWEsCiAJCSAgICAg Zmlyc3QgLSByb3ctPmdseXBoc1thcmVhXSwgbGFzdCAtIHJvdy0+Z2x5cGhzW2FyZWFdLAogCQkg ICAgIERSQVdfTk9STUFMX1RFWFQsIDApOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgICAgfQogfQogCkBAIC0zMjI2OCwxMCArMzc0NTYsMjIgQEAgZXhwb3NlX2xpbmUgKHN0cnVj dCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgY29uc3QgRW1hY3NfUmVjdGFuZ2xl ICpyKQogewogICBlYXNzZXJ0IChyb3ctPmVuYWJsZWRfcCk7CiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgaWYgKHJvdy0+bW9kZV9saW5l X3AgfHwgdy0+cHNldWRvX3dpbmRvd19wKQorICAgIHsKKyAgICAgIGlmICghbWNfcmVkcmF3X3Jv dyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgVEVYVF9BUkVBLCAwLCAwLAorICAgICAgICAg ICAgICAgICAgICAgICAgICByb3ctPnVzZWRbVEVYVF9BUkVBXSwgZmFsc2UsIERSQVdfTk9STUFM X1RFWFQsIEVYUE9TRV9MSU5FKSkKICAgICBkcmF3X2dseXBocyAodywgMCwgcm93LCBURVhUX0FS RUEsCiAJCSAwLCByb3ctPnVzZWRbVEVYVF9BUkVBXSwKIAkJIERSQVdfTk9STUFMX1RFWFQsIDAp OworICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBlbHNlCiAgICAgewog ICAgICAgaWYgKHJvdy0+dXNlZFtMRUZUX01BUkdJTl9BUkVBXSkKQEAgLTMyODE5LDYgKzM4MDE5 LDIyIEBAIGd1aV9pbnRlcnNlY3RfcmVjdGFuZ2xlcyAoY29uc3QgRW1hY3NfUmVjdGFuZ2xlICpy MSwgY29uc3QgRW1hY3NfUmVjdGFuZ2xlICpyMiwKIHZvaWQKIHN5bXNfb2ZfeGRpc3AgKHZvaWQp CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX3Jvdyk7CisKKyAgZGVmc3ViciAoJlNtY19k dW1wX2dseXBoX21hdHJpeCk7CisKKyAgZGVmc3ViciAoJlNtY19jdXJyZW50X2NvbHVtbik7CisK KyAgZGVmc3ViciAoJlNtY19zdGRlcnIpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIFZ3aXRoX2VjaG9fYXJlYV9zYXZlX3ZlY3RvciA9IFFuaWw7CiAgIHN0YXRpY3BybyAoJlZ3 aXRoX2VjaG9fYXJlYV9zYXZlX3ZlY3Rvcik7CiAKZGlmZiAtLWdpdCBhL3NyYy94dGVybS5jIGIv c3JjL3h0ZXJtLmMKaW5kZXggYzk2YWE3NC4uZDM0ZDgxZCAxMDA2NDQKLS0tIGEvc3JjL3h0ZXJt LmMKKysrIGIvc3JjL3h0ZXJtLmMKQEAgLTEzMiw2ICsxMzIsOTA3IEBAIGFsb25nIHdpdGggR05V IEVtYWNzLiAgSWYgbm90LCBzZWUgPGh0dHBzOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4gICov CiAjaW5jbHVkZSA8WDExL1hLQmxpYi5oPgogI2VuZGlmCiAKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyNpZmRlZiBHTFlQSF9ERUJV Rworc3RhdGljIHZvaWQgeF9jaGVja19mb250IChzdHJ1Y3QgZnJhbWUgKiwgc3RydWN0IGZvbnQg Kik7CisjZW5kaWYKKworc3RhdGljIHZvaWQgeF9zZXRfbW9kZV9saW5lX2ZhY2VfZ2MgKHN0cnVj dCBnbHlwaF9zdHJpbmcgKik7CisKK3N0YXRpYyB2b2lkIHhfc2V0X21vdXNlX2ZhY2VfZ2MgKH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1VSU09SKQorICAgIHsKKyAgICAgIG1jX3hfc2V0X2N1cnNvcl9nYyAo cywgY3Vyc29yX2djX3ApOworICAgICAgcy0+c3RpcHBsZWRfcCA9IGZhbHNlOworICAgIH0KKyAg ZWxzZSBpZiAocy0+aGwgPT0gRFJBV19NT1VTRV9GQUNFKQorICAgIHsKKyAgICAgIHhfc2V0X21v dXNlX2ZhY2VfZ2MgKHMpOworICAgICAgcy0+c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUg IT0gMDsKKyAgICB9CisgIGVsc2UgaWYgKHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VECisgICAg ICAgICAgIHx8IHMtPmhsID09IERSQVdfSU1BR0VfU1VOS0VOKQorICAgIHsKKyAgICAgIHMtPmdj ID0gcy0+ZmFjZS0+Z2M7CisgICAgICBzLT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAh PSAwOworICAgIH0KKyAgZWxzZQorICAgIGVtYWNzX2Fib3J0ICgpOworICAvKiBHQyBtdXN0IGhh dmUgYmVlbiBzZXQuICovCisgIGVhc3NlcnQgKHMtPmdjICE9IDApOworfQorCisvKiBEcmF3IGEg aG9sbG93IGJveCBjdXJzb3Igb24gd2luZG93IFcgaW4gZ2x5cGggcm93IFJPVy4gKi8KK3N0YXRp YyB2b2lkCittY194X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAg ICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGlu dCB2cG9zLCBpbnQgd2QsIGludCBoKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJ TkRPV19GUkFNRSAodykpOworICBzdHJ1Y3QgeF9kaXNwbGF5X2luZm8gKmRweWluZm8gPSBGUkFN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dGhlIHJlY3RhbmdsZSwgYW5kIHJlc2V0IGNsaXBwaW5nIGFnYWluLiAq LworICB4X2NsaXBfdG9fcm93ICh3LCByb3csIFRFWFRfQVJFQSwgZ2MpOworICAvKiBgeF9kcmF3 X3JlY3RhbmdsZScgbmVlZHMgYSBXRCBhbmQgSCB0aGF0IGFyZSAxIHBpeGVsIGxlc3MuICovCisg IGludCByeCA9IGZ4OworICBpbnQgcnkgPSBmeTsKKyAgaW50IHJ3ID0gd2QgLSAxOworICBpbnQg cmggPSBoIC0gMTsKKyAgeF9kcmF3X3JlY3RhbmdsZSAoZiwgZ2MsIHJ4LCByeSwgcncsIHJoKTsK Ky8qCisgIGZwcmludGYgKHN0ZGVyciwgIm1jX3hfZHJhd19ob2xsb3dfY3Vyc29yOiAgcnggKCVk KSB8IHJ5ICglZCkgfCBydyAoJWQpIHwgcmggKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAg cngsIHJ5LCBydywgcmgpOworKi8KKyAgeF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKGYsIGdjKTsK K30KKworLyogRHJhdyBhIGJhciBjdXJzb3Igb24gd2luZG93IFcgaW4gZ2x5cGggcm93IFJPVy4g Ki8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywg c3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAg ICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3Ms IGludCB2cG9zLCBpbnQgd2QsIGludCBoLAorICAgICAgICAgICAgICAgICAgICAgIGludCB3aWR0 aCwgZW51bSBtY19jdXJzb3JfdHlwZSBraW5kLCBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2th eV9wKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgLyogSWYg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AgICAgICAgICAgICAgICBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5 LCBpbnQgaHBvcywgaW50IHZwb3MsIGludCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBp bnQgaCwgc3RydWN0IG1jX1JHQiBsc2wsIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUs CisgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCwgZW51bSBtY19mbGF2 b3IgZ2x5cGhfZmxhdm9yLCBib29sIG9uX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgYm9v bCBhY3RpdmVfcCkKK3sKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUg KHcpKTsKKyAgLyogVGhlIGZyaW5nZSBiaXRtYXBzIGFyZSBwcmVzZW50bHkgaGFuZGxlZCBlbHNl d2hlcmUsIGJ1dCBjb3VsZCBzb21lZGF5CisgIGJlIG1hbmFnZWQgKGluIHBhcnQpIGF0IHRoaXMg c2VjdGlvbiBvZiBjb2RlLiAqLworICBpZiAob25fcCkKKyAgICB7CisgICAgICBpZiAocm93LT5l eGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgJiYgKHJvdy0+cmV2ZXJzZWRfcAor ICAgICAgICAgICAgICA/IChocG9zIDwgMCkKKyAgICAgICAgICAgICAgOiAoaHBvcyA+PSByb3ct PnVzZWRbVEVYVF9BUkVBXSkpKQorICAgICAgICB7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5f ZnJpbmdlX3AgPSB0cnVlOworICAgICAgICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcCAodywgcm93 LCByb3ctPnJldmVyc2VkX3AsIGN1cnNvcl90eXBlKTsKKyAgICAgICAgfQorICAgICAgZWxzZQor ICAgICAgICB7CisgIENvbG9ybWFwIGNtYXAgPSBGUkFNRV9YX0NPTE9STUFQIChmKTsKKyAgdW5z aWduZWQg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dGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAg IFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JldHdlZW5fZmFjZS0+Zm9yZWdyb3VuZCk7 CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9wKQor ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9s bG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist cmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAg ICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9s bG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQg KEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93 X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg aG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFj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BmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf Z2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hf RElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgeGdjdi5iYWNrZ3JvdW5k KTsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5 IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBm LT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBt Y194X2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBv cywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhl bCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChj dXJzb3JfZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEggJiYgbHNsLnJlZCA+PSAwICYmIGxzbC5n cmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgICAgeworICAgICAgICAgICAgLyog VGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAqLwor ICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gY29sb3IucGl4ZWw7 CisgICAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICAgIH0K KyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIFRlbXBvcmFy aWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhl CisgICAgICAgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4geGZucy5jLiAq LworICAgICAgICAgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAm JiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID09 IHJlZ2lvbl9iZWcpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgZW51bSBm YWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlX2lkID0gbG9va3VwX25hbWVkX2Zh Y2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1hdC1yZWdpb24tcHJlLXp2LWZh Y2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2 ZV9yZWdpb25fYmVnX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9u X2JlZ19mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0 aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZh a2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0 IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2 ZV9mYW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IHN0cnVjdCBmYWNlICpob2xsb3df YWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7Cisg ICAgICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChm KSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVn cm91bmQpOworICAgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hf RElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9m YWNlLT5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2Zh Y2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vy c29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAg ICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYs IGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgWFNl dEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAg ICAgICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0 X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfaW5hY3RpdmVfZmFjZS0+YmFja2dyb3VuZCk7Cisg ICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgpOwor ICAgICAgICAgICAgICAvKiBGb3JjZSBgbWNfeF9zZXRfY3Vyc29yX2djJyB0byB1c2UgYHMtPmYt Pm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycuICovCisgICAgICAgICAgICAgIGJvb2wgY3Vyc29y X2djX3AgPSB0cnVlOworICAgICAgICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0 cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0 aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfZ2NfcCk7 CisgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgICAg IFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfZ2MsIHhnY3YuYmFja2dyb3VuZCk7CisgICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQg KCk7CisgICAgICAgICAgICAgIC8qIERyYXcgdGhlIGZyYW1lIGFyb3VuZCB0aGUgYm94LiAqLwor ICAgICAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgICAgfQorICAgICAgYnJl YWs7CisgICAgfQorICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICB7CisgICAgICBpZiAobHNs LnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsK KyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNv cl9waXhlbCcuICovCisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0g Y29sb3IucGl4ZWw7CisgICAgICAgICAgbWNfeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIG1hdHJp eCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLCBoKTsKKyAgICAgICAgICBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIG1jX3hfZHJhd19ob2xsb3dfY3Vyc29yICh3 LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICBi cmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19GSUxMRURfQk9YOgorICAgIHsKKyAgICAgIGlmIChs c2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAg LyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnIGJ5IGJv cnJvd2luZyB0aGUKKyAgICAgICAgZnVuY3Rpb25hbGl0eSBvZiBgeF9tYWtlX2djJyBpbiB4Zm5z LmMuICovCisgICAgICAgIHsKKyAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICBY U2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vy c29yX2djLCBGUkFNRV9CQUNLR1JPVU5EX1BJWEVMIChmKSk7CisgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg Y29sb3IucGl4ZWwpOworICAgICAgICAgIC8qIEZvcmNlIGBtY194X3NldF9jdXJzb3JfZ2MnIHRv IHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJy4gKi8KKyAgICAgICAgICBib29s IGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywg bWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3Rp dmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJ U1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuZm9yZWdyb3VuZCk7 CisgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1 dF9kYXRhLngtPmN1cnNvcl9nYywgeGdjdi5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICB1bmJsb2Nr X2lucHV0ICgpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAg ICAgICBib29sIGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICAgICAgICBtY19kcmF3X2N1cnNv cl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2ws CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJzb3Jf dHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgfQorICAgICAgYnJl YWs7CisgICAgfQorICAgIGNhc2UgTUNfQkFSOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49 IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAg ICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVs Jy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5w aXhlbDsKKyAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsK KyAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGN1cnNvcl93aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAg ICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3Bp eGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBi b29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY194 X2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBv cywgd2QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRo LCBNQ19CQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICB9CisgICAg ICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IQkFSOgorICAgIHsKKyAgICAgIGlmIChsc2wu cmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgewor ICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29y X3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBj b2xvci5waXhlbDsKKyAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0g dHJ1ZTsKKyAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGN1cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3Ap OworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1 cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAg ICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAg ICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhw b3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNv cl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAg IH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQg KCk7CisgIH0KKyAgICAgICAgfQorI2lmZGVmIEhBVkVfWF9JMThOCisgIGlmICh3ID09IFhXSU5E T1cgKGYtPnNlbGVjdGVkX3dpbmRvdykpCisgICAgaWYgKEZSQU1FX1hJQyAoZikgJiYgKEZSQU1F X1hJQ19TVFlMRSAoZikgJiBYSU1QcmVlZGl0UG9zaXRpb24pKQorICAgICAgeGljX3NldF9wcmVl ZGl0YXJlYSAodywgeCwgeSk7CisjZW5kaWYKKyAgICB9CisgIFhGbHVzaCAoRlJBTUVfWF9ESVNQ TEFZIChmKSk7Cit9CisKKy8qIERyYXcgc3RyZXRjaCBnbHlwaCBzdHJpbmcgUy4gKi8KK3N0YXRp YyB2b2lkCittY194X2RyYXdfc3RyZXRjaF9nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJp bmcgKnMpCit7CisgIGVhc3NlcnQgKHMtPmZpcnN0X2dseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZ UEgpOworICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICYmICF4X3N0cmV0Y2hfY3Vy c29yX3ApCisgICAgeworICAgICAgLyogSWYgYHgtc3RyZXRjaC1jdXJzb3InIGlzIG5pbCwgZG9u J3QgZHJhdyBhIGJsb2NrIGN1cnNvciBhcyB3aWRlIGFzIHRoZQorICAgICAgc3RyZXRjaCBnbHlw aC4gKi8KKyAgICAgIGludCB3aWR0aCwgYmFja2dyb3VuZF93aWR0aCA9IHMtPmJhY2tncm91bmRf d2lkdGg7CisgICAgICBpbnQgeCA9IHMtPng7CisgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRf cCkKKyAgICAgICAgeworICAgICAgICAgIGludCBsZWZ0X3ggPSB3aW5kb3dfYm94X2xlZnRfb2Zm c2V0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAgIGlmICh4IDwgbGVmdF94KQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IGxlZnRfeCAtIHg7Cisg ICAgICAgICAgICAgIHggPSBsZWZ0X3g7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAg ICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8qIEluIFIyTCByb3dzLCBkcmF3IHRo ZSBjdXJzb3Igb24gdGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlCisgICAgICAgICAgICAgICBzdHJldGNo IGdseXBoLiAqLworICAgICAgICAgICAgaW50IHJpZ2h0X3ggPSB3aW5kb3dfYm94X3JpZ2h0IChz LT53LCBURVhUX0FSRUEpOworICAgICAgICAgICAgaWYgKHggKyBiYWNrZ3JvdW5kX3dpZHRoID4g cmlnaHRfeCkKKyAgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAtPSB4IC0gcmlnaHRfeDsK KyAgICAgICAgICAgIHggKz0gYmFja2dyb3VuZF93aWR0aDsKKyAgICAgICAgICB9CisgICAgICB3 aWR0aCA9IG1pbiAoRlJBTUVfQ09MVU1OX1dJRFRIIChzLT5mKSwgYmFja2dyb3VuZF93aWR0aCk7 CisgICAgICBpZiAocy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB4IC09IHdpZHRoOworICAg ICAgLyogRHJhdyBjdXJzb3IuICovCisgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JnX3JlY3Qg KHMsIHgsIHMtPnksIHdpZHRoLCBzLT5oZWlnaHQpOworICAgICAgLyogQ2xlYXIgcmVzdCB1c2lu ZyB0aGUgR0Mgb2YgdGhlIG9yaWdpbmFsIG5vbi1jdXJzb3IgZmFjZS4gKi8KKyAgICAgIGlmICh3 aWR0aCA8IGJhY2tncm91bmRfd2lkdGgpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgeSA9IHMt Pnk7CisgICAgICAgICAgaW50IHcgPSBiYWNrZ3JvdW5kX3dpZHRoIC0gd2lkdGgsIGggPSBzLT5o ZWlnaHQ7CisgICAgICAgICAgWFJlY3RhbmdsZSByOworICAgICAgICAgIEdDIGdjOworICAgICAg ICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICAgICAgeCArPSB3aWR0aDsKKyAg ICAgICAgICBlbHNlCisgICAgICAgICAgICB4ID0gcy0+eDsKKyAgICAgICAgICBpZiAocy0+cm93 LT5tb3VzZV9mYWNlX3AKKyAgICAgICAgICAgICAgJiYgY3Vyc29yX2luX21vdXNlX2ZhY2VfcCAo cy0+dykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHhfc2V0X21vdXNlX2ZhY2VfZ2Mg KHMpOworICAgICAgICAgICAgICBnYyA9IHMtPmdjOworICAgICAgICAgICAgfQorICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgIGdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICAgICAgZ2V0X2dseXBo X3N0cmluZ19jbGlwX3JlY3QgKHMsICZyKTsKKyAgICAgICAgICB4X3NldF9jbGlwX3JlY3Rhbmds ZXMgKHMtPmYsIGdjLCAmciwgMSk7CisgICAgICAgICAgaWYgKHMtPmZhY2UtPnN0aXBwbGUpCisg ICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIEZpbGwgYmFja2dyb3VuZCB3aXRoIGEgc3Rp cHBsZSBwYXR0ZXJuLiAqLworICAgICAgICAgICAgICBYU2V0RmlsbFN0eWxlIChGUkFNRV9YX0RJ U1BMQVkgKHMtPmYpLCBnYywgRmlsbE9wYXF1ZVN0aXBwbGVkKTsKKyAgICAgICAgICAgICAgeF9m aWxsX3JlY3RhbmdsZSAocy0+ZiwgZ2MsIHgsIHksIHcsIGgpOworICAgICAgICAgICAgICBYU2V0 RmlsbFN0eWxlIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBnYywgRmlsbFNvbGlkKTsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAg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VEVf R0xZUEg6CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBzIHx8IChzLT5jbXBfZnJvbSA+IDAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICEgcy0+Zmlyc3RfZ2x5cGgtPnUuY21wLmF1 dG9tYXRpYykpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAg ZWxzZQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIHRydWUpOwor ICAgICAgeF9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAg ICBicmVhazsKKyAgICBjYXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3Zl cmxhcHMpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxz ZQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIHRydWUpOworICAg ICAgeF9kcmF3X2dseXBobGVzc19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBi cmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgICAgfQorICBpZiAo IXMtPmZvcl9vdmVybGFwcykKKyAgICB7CisgICAgICAvKiBEcmF3IHVuZGVybGluZS4gKi8KKyAg ICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIGlmIChz LT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX1dBVkUpCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAg ICAgICAgICAgICAgeF9kcmF3X3VuZGVyd2F2ZSAocyk7CisgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBYR0NWYWx1ZXMgeGdjdjsKKyAgICAg ICAgICAgICAgICAgIFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2Ms IEdDRm9yZWdyb3VuZCwgJnhnY3YpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQg KEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT51bmRlcmxpbmVfY29sb3Ip OworICAgICAgICAgICAgICAgICAgeF9kcmF3X3VuZGVyd2F2ZSAocyk7CisgICAgICAgICAgICAg ICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+Z2MsIHhnY3Yu Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAg IGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0aGlja25lc3MsIHBvc2l0 aW9uOworICAgICAgICAgICAgICBpbnQgeTsKKyAgICAgICAgICAgICAgaWYgKHMtPnByZXYgJiYg cy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3AKKyAgICAgICAgICAgICAgICAgICYmIHMtPnByZXYt PmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICAvKiBXZSB1c2UgdGhlIHNhbWUgdW5kZXJsaW5lIHN0eWxl IGFzIHRoZSBwcmV2aW91cyBvbmUuICovCisgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSBz LT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgcG9zaXRpb24g PSBzLT5wcmV2LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogR2V0 IHRoZSB1bmRlcmxpbmUgdGhpY2tuZXNzLiAgRGVmYXVsdCBpcyAxIHBpeGVsLiAqLworICAgICAg ICAgICAgICAgICAgaWYgKHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzcyA+ IDApCisgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPmZvbnQtPnVuZGVybGluZV90 aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHRo aWNrbmVzcyA9IDE7CisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2Vu dF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSB0aGlj a25lc3MpIC0gKHMtPnliYXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVy bGluZSBwb3NpdGlvbi4gIFRoaXMgaXMgdGhlIHJlY29tbWVuZGVkCisgICAgICAgICAgICAgICAg ICAgICAgICAgdmVydGljYWwgb2Zmc2V0IGluIHBpeGVscyBmcm9tIHRoZSBiYXNlbGluZSB0byB0 aGUgdG9wIG9mCisgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHVuZGVybGluZS4gIFRoaXMg aXMgYSBzaWduZWQgdmFsdWUgYWNjb3JkaW5nIHRvIHRoZQorICAgICAgICAgICAgICAgICAgICAg ICAgIHNwZWNzLCBhbmQgaXRzIGRlZmF1bHQgaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICBS T1VORCAoKG1heGltdW0gZGVzY2VudCkgLyAyKSwgd2l0aAorICAgICAgICAgICAgICAgICAgICAg ICAgIFJPVU5EKHgpID0gZmxvb3IgKHggKyAwLjUpICAqLworICAgICAgICAgICAgICAgICAgICAg IGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRpb25fcHJvcGVydGllcworICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV9wb3NpdGlvbiA+PSAw KQorICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBzLT5mb250LT51bmRlcmxpbmVf cG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocy0+Zm9udCkKKyAgICAg ICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmZvbnQtPmRlc2NlbnQgKyAxKSAvIDI7 CisgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgcG9z aXRpb24gPSB1bmRlcmxpbmVfbWluaW11bV9vZmZzZXQ7CisgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbWF4IChwb3NpdGlvbiwgdW5kZXJsaW5lX21p bmltdW1fb2Zmc2V0KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIC8qIENoZWNr IHRoZSBzYW5pdHkgb2YgdGhpY2tuZXNzIGFuZCBwb3NpdGlvbi4gIFdlIHNob3VsZAorICAgICAg ICAgICAgICAgICBhdm9pZCBkcmF3aW5nIHVuZGVybGluZSBvdXQgb2YgdGhlIGN1cnJlbnQgbGlu ZSBhcmVhLiAqLworICAgICAgICAgICAgICBpZiAocy0+eSArIHMtPmhlaWdodCA8PSBzLT55YmFz ZSArIHBvc2l0aW9uKQorICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhlaWdodCAtIDEp IC0gKHMtPnliYXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0 IDwgcy0+eWJhc2UgKyBwb3NpdGlvbiArIHRoaWNrbmVzcykKKyAgICAgICAgICAgICAgICB0aGlj a25lc3MgPSAocy0+eSArIHMtPmhlaWdodCkgLSAocy0+eWJhc2UgKyBwb3NpdGlvbik7CisgICAg ICAgICAgICAgIHMtPnVuZGVybGluZV90aGlja25lc3MgPSB0aGlja25lc3M7CisgICAgICAgICAg ICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9IHBvc2l0aW9uOworICAgICAgICAgICAgICB5ID0g cy0+eWJhc2UgKyBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGlu ZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBz LT5nYywgcy0+eCwgeSwgcy0+d2lkdGgsIHRoaWNrbmVzcyk7CisgICAgICAgICAgICAgIGVsc2UK KyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBYR0NWYWx1ZXMgeGdjdjsKKyAg ICAgICAgICAgICAgICAgIFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZIChzLT5mKSwgcy0+ Z2MsIEdDRm9yZWdyb3VuZCwgJnhnY3YpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91 bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT51bmRlcmxpbmVfY29s b3IpOworICAgICAgICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAocy0+Ziwgcy0+Z2MsIHMt PngsIHksIHMtPndpZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVn cm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQpOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRHJh dyBvdmVybGluZS4gKi8KKyAgICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9wKQorICAgICAgICB7 CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBkeSA9IDAsIGggPSAxOworICAgICAgICAgIGlmIChz LT5mYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgIHhfZmlsbF9y ZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAg ICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2 OworICAgICAgICAgICAgICBYR2V0R0NWYWx1ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMt PmdjLCBHQ0ZvcmVncm91bmQsICZ4Z2N2KTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQg KEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT5vdmVybGluZV9jb2xvcik7 CisgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55 ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1F X1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAgICAg fQorICAgICAgICB9CisgICAgICAvKiBEcmF3IHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgaWYg KHMtPmZhY2UtPnN0cmlrZV90aHJvdWdoX3ApCisgICAgICAgIHsKKyAgICAgICAgICB1bnNpZ25l ZCBsb25nIGggPSAxOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZHkgPSAocy0+aGVpZ2h0IC0g aCkgLyAyOworICAgICAgICAgIGlmIChzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvcl9kZWZh dWx0ZWRfcCkKKyAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54 LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICBYR2V0R0NWYWx1 ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVncm91bmQsICZ4Z2N2KTsK KyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMt PmdjLCBzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvcik7CisgICAgICAgICAgICAgIHhfZmls bF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsK KyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMt PmdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAv KiBEcmF3IHJlbGllZiBpZiBub3QgeWV0IGRyYXduLiAqLworICAgICAgaWYgKCFyZWxpZWZfZHJh d25fcCAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gpCisgICAgICAgICAgeF9kcmF3X2ds eXBoX3N0cmluZ19ib3ggKHMpOworICAgICAgaWYgKHMtPnByZXYpCisgICAgICAgIHsKKyAgICAg ICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpwcmV2OworICAgICAgICAgIGZvciAocHJldiA9IHMt PnByZXY7IHByZXY7IHByZXYgPSBwcmV2LT5wcmV2KQorICAgICAgICAgICAgaWYgKHByZXYtPmhs ICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgcHJldi0+eCArIHByZXYtPndpZHRoICsgcHJl di0+cmlnaHRfb3ZlcmhhbmcgPiBzLT54KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgLyogQXMgcHJldiB3YXMgZHJhd24gd2hpbGUgY2xpcHBlZCB0byBpdHMgb3duIGFyZWEsIHdl CisgICAgICAgICAgICAgICAgICAgbXVzdCBkcmF3IHRoZSByaWdodF9vdmVyaGFuZyBwYXJ0IHVz aW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ug c2F2ZSA9IHByZXYtPmhsOworICAgICAgICAgICAgICAgIHByZXYtPmhsID0gcy0+aGw7CisgICAg ICAgICAgICAgICAgbWNfeF9zZXRfZ2x5cGhfc3RyaW5nX2djIChwcmV2LCBjdXJzb3JfZ2NfcCk7 CisgICAgICAgICAgICAgICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBwaW5nX2V4YWN0bHkgKHMs IHByZXYpOworICAgICAgICAgICAgICAgIGlmIChwcmV2LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBD SEFSX0dMWVBIKQorICAgICAgICAgICAgICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3Jv dW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB4X2Ry YXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAg ICAgICB4X3Jlc2V0X2NsaXBfcmVjdGFuZ2xlcyAocHJldi0+ZiwgcHJldi0+Z2MpOworICAgICAg ICAgICAgICAgIHByZXYtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAgICBwcmV2LT5udW1fY2xp cHMgPSAwOworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmIChzLT5uZXh0KQor ICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgICAg ICBmb3IgKG5leHQgPSBzLT5uZXh0OyBuZXh0OyBuZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAg ICAgIGlmIChuZXh0LT5obCAhPSBzLT5obAorICAgICAgICAgICAgICAgICYmIG5leHQtPnggLSBu ZXh0LT5sZWZ0X292ZXJoYW5nIDwgcy0+eCArIHMtPndpZHRoKQorICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgLyogQXMgbmV4dCB3aWxsIGJlIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8g aXRzIG93biBhcmVhLAorICAgICAgICAgICAgICAgICAgIHdlIG11c3QgZHJhdyB0aGUgbGVmdF9v dmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRy YXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IG5leHQtPmhsOworICAgICAgICAgICAgICAgIG5leHQtPmhs ID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfeF9zZXRfZ2x5cGhfc3RyaW5nX2djIChuZXh0 LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBw aW5nX2V4YWN0bHkgKHMsIG5leHQpOworICAgICAgICAgICAgICAgIGlmIChuZXh0LT5maXJzdF9n bHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBIKQorICAgICAgICAgICAgICAgICAgeF9kcmF3X2dseXBo X3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICB4X2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0 KTsKKyAgICAgICAgICAgICAgICB4X3Jlc2V0X2NsaXBfcmVjdGFuZ2xlcyAobmV4dC0+ZiwgbmV4 dC0+Z2MpOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAg ICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgICAgICAgIG5leHQtPmNsaXBfaGVhZCA9 IHMtPm5leHQ7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLyogUmVzZXQg Y2xpcHBpbmcuICovCisgIHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChzLT5mLCBzLT5nYyk7Cisg IHMtPm51bV9jbGlwcyA9IDA7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBEZWZhdWx0IHRvIHVzaW5nIFhJTSBpZiBhdmFp bGFibGUuICAqLwogI2lmZGVmIFVTRV9YSU0KIGJvb2wgdXNlX3hpbSA9IHRydWU7CkBAIC0xMTA5 LDYgKzIwMTAsMTYgQEAgc3RhdGljIHZvaWQKIHhfdXBkYXRlX2JlZ2luIChzdHJ1Y3QgZnJhbWUg KmYpCiB7CiAgIC8qIE5vdGhpbmcgdG8gZG8uICAqLworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0g ZjsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAvKiBEcmF3IGEgdmVydGlj YWwgd2luZG93IGJvcmRlciBmcm9tICh4LHkwKSB0byAoeCx5MSkgICovCkBAIC0xMjU0LDYgKzIx NjUsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAgIFhGbHVzaCAoRlJBTUVf WF9ESVNQTEFZIChmKSk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5kaWYKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRh dGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIH0KIAog LyogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBsYWNlcyBpbiB4ZGlzcC5j CkBAIC0xMzIzOCw2ICsxNDE1OSwyMCBAQCBleHRlcm4gZnJhbWVfcGFybV9oYW5kbGVyIHhfZnJh bWVfcGFybV9oYW5kbGVyc1tdOwogCiBzdGF0aWMgc3RydWN0IHJlZGlzcGxheV9pbnRlcmZhY2Ug eF9yZWRpc3BsYXlfaW50ZXJmYWNlID0KICAgeworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4g YHh0ZXJtLmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMgdGhlCitgcmVkaXNw bGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgbWNfeF9kcmF3X3dpbmRv d19jdXJzb3IsCisgIG1jX3hfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworCisKICAgICB4X2ZyYW1lX3Bhcm1faGFuZGxlcnMsCiAgICAgZ3VpX3Byb2R1Y2Vf Z2x5cGhzLAogICAgIGd1aV93cml0ZV9nbHlwaHMsCg== --Multipart_Sun_Nov_17_22:58:13_2019-1--