From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Sat, 02 May 2020 13:50:18 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Sat_May__2_13:50:18_2020-1" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="70313"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mbork@mbork.pl, rms@gnu.org, johnw@gnu.org, akioburns@icloud.com To: 22873@debbugs.gnu.org,17684@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 02 22:51:40 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUz6o-000Eu4-UD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 22:51:39 +0200 Original-Received: from localhost ([::1]:42262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUz6n-00014I-OI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 May 2020 16:51:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUz6H-0000vo-Eu for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 16:51:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUz6F-0007qW-6F for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 16:51:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUz6D-0007pX-QH for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 16:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUz6D-0006FI-MZ for bug-gnu-emacs@gnu.org; Sat, 02 May 2020 16:51:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 May 2020 20:51: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.158845262923952 (code B ref 17684); Sat, 02 May 2020 20:51:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 2 May 2020 20:50:29 +0000 Original-Received: from localhost ([127.0.0.1]:54040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUz5g-0006EF-QU for submit@debbugs.gnu.org; Sat, 02 May 2020 16:50:28 -0400 Original-Received: from gateway33.websitewelcome.com ([192.185.146.21]:29423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUz5d-0006Ds-5P for 17684@debbugs.gnu.org; Sat, 02 May 2020 16:50:25 -0400 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 76E8F49ACC for <17684@debbugs.gnu.org>; Sat, 2 May 2020 15:50:24 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id Uz5bjo6c8Sl8qUz5bjCDkw; Sat, 02 May 2020 15:50:24 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Cc :To:From:Message-ID:Date:Sender:Reply-To: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=HLFRezrTpY4JbBgS2M+WUQJZ2G1e2V5RsdDdOTePI3k=; b=mLktv8Qt0Zhga0YUSFVyY8nrhi b4xH1++VTKurNKVHcMuxEbaU88VXiXQUK/2QeBPQc/6COcFYWcdqS9kbqNyvNF++FyMJA22Y58BRt kkB4T5z4vqeSCpV33GPSg5wigQWXmDKN2TmPribSvAqk/rWcUzPdfmvFO159KMCe1aGgExoSaynAa 7T9hNS8D5LWGfMTXjcr4Nnr/SIHxgSONcwsUrbQgPzAhHDGQ++O2nHhbbnxenaRgXReJPewZdZ+JJ S/GST6wX/pIpBcqqQeEUvpeAd4EYhdMLIxtDYFYY9EVyt6nIGmkw2etr+l3YKZChtpKwsmQ5A3Wis qkapojPQ==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:53077 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jUz5X-003qAY-OE; Sat, 02 May 2020 15:50:22 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1jUz5X-003qAY-OE X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private) [45.48.239.195]:53077 X-Source-Auth: lawlist X-Email-Count: 7 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179545 Archived-At: --Multipart_Sat_May__2_13:50:18_2020-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VERSION: 022.008 [05/02/2020] CHANGELOG: - Calculate and set it->lnum when both NILP (Vdisplay_line_numbers) and features 22873 / 17684 are active. Line numbers are now recorded in the struct of each glyph: glyph->lnum = it->lnum. The cache of multiple fake cursors has been revised to also record the lnum of each fake cursor. The recorded lnum is used to test for a `same_p` fake cursor situation; i.e., whether fake cursors should be erased and/or redrawn. . The lnum is needed for an apparently uncommon, but nevertheless reproducible situation wherein a screen line is added/deleted and there are two or more subsequent consecutive lines having the same content; and, the character(s) added/deleted is/are the same size/shape of the subsequent consecutive screen lines. `mc_update_window_erase' will erase a fake cursor on one of those subsequent consecutive lines depending upon whether the a screen line above is added/deleted. With the unique exception of the recorded lnum, all other data in the cache of fake cursors will be identical as to one of those subsequent consecutive screen lines. . EXAMPLE (word-wrap is non-nil) -- modification of the first paragraph by adding/ deleting the word "boy" causes the screen line containing only the word group "fudge." to be added/deleted. The fake cursor for the first _or_ second line containing "~//" will be erased, but the fake cursor for said line will not be redrawn by `mc_helper' unless the lnum data was previously used by `mc_update_window_erase' to make a the `same_p` determination. In other words, the fake cursor at isue would be `same_p` _without_ using the lnum data, but is `!same_p` when we use the lnum data. Every good boy | deserves fudge. Every good boy deserves fudge. Every good ↩ boy deserves fudge.| Every good boy deserves fudge. Every good boy deserves ↩ fudge. | | ~// | <=== This fake cursor IF adding the whole word "boy" with redo; ~// | <=== or, this fake cursor IF deleting the whole word "boy". . The performance hit is zero when built-in line numbers are active, but perhaps mildly detectable when built-in line numbers are turned off. Although line numbers are not being generated on the glass in the latter situation, Emacs will nevertheless be calling `display_count_lines_visually/logically' at the same locations as if the built-in line numbers were turned on. . When `mc_update_text_area' processes the line containing the fake cursor that needs to be redrawn, the line is deemed to be UNCHANGED. `clear_end_of_line' is not triggered and no floating fake cursors are redrawn based thereon. This analysis was helpful in narrowing down the issue to the need for the lnum data as described hereinabove. 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: Due to lack of free time available to dedicate to the development of features 22873 / 17684, applicability of the patch to the master branch is frozen at 07/14/2019: ac57c5093829ee09084c562bbbc1c412179be13d In the new emacs repository folder, execute a hard reset to 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 '+-mode) and `+-mode.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'. This was done to add support for MacOS Mojave .... TODO: - When an idle-timer fires and point is at the end of a horizontally scrolled line in a narrow window, the temporary horizontal scroll is canceled. Create a minimal working example and file a bug report. (progn (defun test () (interactive) (let ((ov (make-overlay (point) (1+ (point)) nil t t))) (overlay-put ov 'face '(:foreground "red")))) (global-set-key [f5] 'test) (split-window-horizontally) (switch-to-buffer (get-buffer-create "foo")) (setq bidi-display-reordering nil) (setq-local auto-hscroll-mode 'current-line) (dotimes (i 80) (insert (char-to-string (+ 65 i))))) - `ns_draw_window_cursor' calls `ns_clip_to_rect', which does _not_ take `row->clip` into consideration when drawing cursors with `NSRectFill'. When it comes time to draw glyphs on top of the box/hollow family of cursors, `row->clip` is taken into consideration by `get_glyph_string_clip'. Fake cursors can be drawn even though the glyphs cannot, resulting in hollow/box family of cursors without text. The issue can be reproduced with M-x mc-test. [A temporary workaround is to disable `row->clip` while drawing the glyphs.] https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00009.html - Deal with left/right overwritten glyphs in the w32 and X ports of Emacs. - The current test for `auto_hscroll_mode_p' only looks for `current_line` and all five related tests are based upon that assumption, which may not be true. - Multiple Cursors: If point is in the middle of a composite character, then select a fully composed character so that the fake cursor is visible. - Implement functionality similar to the Lisp multiple-cursors by Magnar Sveen. - Follow up with the Emacs team re bug#32177; i.e., (Current line number shifts one column to the left.) - Follow up with the Emacs team re bug#32060; i.e., Horizontal Scrolling (Current Line): Wrong line gets h-scrolled. - Determine if bug #28936 needs to be fixed and help the Emacs team re same. - Is there any additional meaningful optimization that can be added to the three calls of `mc_pre_scroll_clean'? - There is a bug affecting an older version of Emacs for the NS port that causes partial line flickering when the same characters are grouped together (;;;;;;) and MC_GLYPHLESS cursors are above or below -- having the same background color as the frame; e.g., black on black (used to erase a glyphless cursor). The partial flickering is only noticeable with rapid fire; e.g., holding down the right/left arrow key. When changing the color of the glyphless cursor, the issue is not present. [@lawlist has verified that the X and HPOS coordinates are accurate.] --Multipart_Sat_May__2_13:50:18_2020-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2020_05_02__13_04_51_850.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvKy1tb2RlLmVsIGIvbGlzcC8rLW1vZGUuZWwKbmV3IGZpbGUgbW9k ZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZjBiN2M4ZQotLS0gL2Rldi9udWxsCisrKyBiL2xpc3Av Ky1tb2RlLmVsCkBAIC0wLDAgKzEsMTI5MiBAQAorOzs7Ozs7Ozs7Ozs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hZC1udW1iZXIgIkVudGVyIGEgbmV3LCB0ZW1wb3JhcnkgbWF4 aW11bTogIikpCisgICAgICAgICAgKG1jL3JlbW92ZS1mYWtlLWN1cnNvcnMpCisgICAgICAgICAg KGVycm9yICJBYm9ydGVkOiB0b28gbWFueSBjdXJzb3JzIikpKSkKKyAgICAobGV0ICgob3Zlcmxh eQorICAgICAgICAgICAgKGlmIG1jL3VzZS1idWlsdC1pbi1jdXJzb3JzCisgICAgICAgICAgICAg IChtYWtlLW92ZXJsYXkgKHBvaW50KSAocG9pbnQpKQorICAgICAgICAgICAgICAobWMvbWFrZS1j dXJzb3Itb3ZlcmxheS1hdC1wb2ludCkpKSkKKyAgICAgIChvdmVybGF5LXB1dCBvdmVybGF5ICdt Yy1pZCAob3IgaWQgKG1jL2NyZWF0ZS1jdXJzb3ItaWQpKSkKKyAgICAgIChvdmVybGF5LXB1dCBv dmVybGF5ICd0eXBlICdmYWtlLWN1cnNvcikKKyAgICAgIChvdmVybGF5LXB1dCBvdmVybGF5ICdw cmlvcml0eSAxMDApCisgICAgICAobWMvc3RvcmUtY3VycmVudC1zdGF0ZS1pbi1vdmVybGF5IG92 ZXJsYXkpCisgICAgICAod2hlbiAodXNlLXJlZ2lvbi1wKQorICAgICAgICAob3ZlcmxheS1wdXQg b3ZlcmxheSAncmVnaW9uLW92ZXJsYXkKKyAgICAgICAgICAgICAgICAgICAgIChtYy9tYWtlLXJl Z2lvbi1vdmVybGF5LWJldHdlZW4tcG9pbnQtYW5kLW1hcmspKSkKKyAgICAgIG92ZXJsYXkpKQor CisgIChkZWZ1biBtYy9leGVjdXRlLWNvbW1hbmQtZm9yLWFsbC1mYWtlLWN1cnNvcnMgKGNtZCkK KyAgICAiQ2FsbHMgQ01EIGludGVyYWN0aXZlbHkgZm9yIGVhY2ggY3Vyc29yLgorICBJdCB3b3Jr cyBieSBtb3ZpbmcgcG9pbnQgdG8gdGhlIGZha2UgY3Vyc29yLCBzZXR0aW5nCisgIHVwIHRoZSBw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bWJkYSwgd2UgY2Fu J3Qga25vdyBpZiBpdCdzIHN1cHBvcnRlZCBvciBub3QKKyAgICAgICAgICAgICAgOzsgLSBzbyBn byBhaGVhZCBhbmQgYXNzdW1lIGl0J3Mgb2ssIGJlY2F1c2Ugd2UncmUganVzdCBvcHRpbWlzdGlj IGxpa2UgdGhhdAorICAgICAgICAgICAgICAoaWYgKG9yIChub3QgKHN5bWJvbHAgb3JpZ2luYWwt Y29tbWFuZCkpCisgICAgICAgICAgICAgICAgICAgICAgOzsgbGFtYmRhIHJlZ2lzdGVyZWQgYnkg c21hcnRyZXAKKyAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nLXByZWZpeC1wICIoIiAoc3lt Ym9sLW5hbWUgb3JpZ2luYWwtY29tbWFuZCkpKQorICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1 dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29ycyBvcmlnaW5hbC1jb21tYW5kKQorICAgICAg ICAgICAgICAgIDs7IHNtYXJ0cmVwIGBpbnRlcm4ncyBjb21tYW5kcyBpbnRvIG93biBvYmFycmF5 IHRvIGhlbHAKKyAgICAgICAgICAgICAgICA7OyBgZGVzY3JpYmUtYmluZGluZ3MnLiAgU28sIGxl dCdzIHJlLWBpbnRlcm4nIGhlcmUgdG8KKyAgICAgICAgICAgICAgICA7OyBtYWtlIHRoZSBjb21t YW5kIGNvbXBhcmFibGUgYnkgYGVxJy4KKyAgICAgICAgICAgICAgICAoc2V0cSBvcmlnaW5hbC1j b21tYW5kIChpbnRlcm4gKHN5bWJvbC1uYW1lIG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAg ICAgICAgICA7OyBvdGhlcndpc2UgaXQncyBhIHN5bWJvbCwgYW5kIHdlIGNhbiBiZSBtb3JlIHRo b3JvdWdoCisgICAgICAgICAgICAgICAgKGlmIChnZXQgb3JpZ2luYWwtY29tbWFuZCAnbWMtLXVu c3VwcG9ydGVkKQorICAgICAgICAgICAgICAgICAgICAobWVzc2FnZSAiJVMgaXMgbm90IHN1cHBv cnRlZCB3aXRoIG11bHRpcGxlIGN1cnNvcnMlcyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgb3JpZ2luYWwtY29tbWFuZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ2V0IG9y aWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1cHBvcnRlZCkpCisgICAgICAgICAgICAgICAgICAod2hl biAoYW5kIG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5v dCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLW9uY2UpKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobm90IChtZW1xIG9yaWdpbmFsLWNvbW1hbmQg bWMvY21kcy10by1ydW4tb25jZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvciBt Yy9hbHdheXMtcnVuLWZvci1hbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICht ZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMtLWRlZmF1bHQtY21kcy10by1ydW4tZm9yLWFsbCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtZW1xIG9yaWdpbmFsLWNvbW1hbmQgbWMv Y21kcy10by1ydW4tZm9yLWFsbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICht Yy9wcm9tcHQtZm9yLWluY2x1c2lvbi1pbi13aGl0ZWxpc3Qgb3JpZ2luYWwtY29tbWFuZCkpKQor ICAgICAgICAgICAgICAgICAgICAobWMvZXhlY3V0ZS1jb21tYW5kLWZvci1hbGwtZmFrZS1jdXJz b3JzIG9yaWdpbmFsLWNvbW1hbmQpKSkpCisgICAgICAgICAgICAgICh3aGVuIG1jL3VzZS1idWls dC1pbi1jdXJzb3JzCisgICAgICAgICAgICAgICAgKHNldHEgbWMtY29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2NTUzNS4iCisoaW50ZXJhY3RpdmUpCisgIChsZXQgKChidWZmZXIgKGdldC1idWZmZXIt Y3JlYXRlICIqTUMtVEVTVCoiKSkpCisgICAgKHdpdGgtY3VycmVudC1idWZmZXIgYnVmZmVyCisg ICAgICAoZXJhc2UtYnVmZmVyKQorICAgICAgKGluc2VydCAiVGhpcyBpcyBhIHRlc3QhIikKKyAg ICAgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEiKQorICAgICAgICAgICAgICAg ICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAgICAgICAgICAgICAgICAgICAgICgzICJib3gi ICIjMDBGRjAwIikKKyAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIp CisgICAgICAgICAgICAgICAgICAgICAgKDUgKCJoYmFyIiAzKSBbMS4wIDAuMCAxLjBdKQorICAg ICAgICAgICAgICAgICAgICAgICg2ICgiYmFyIiAzKSBbMC4wIDEuMCAxLjBdKQorICAgICAgICAg ICAgICAgICAgICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQiKQorICAgICAgICAgICAgICAgICAg ICAgICg4ICJib3giICJncmV5MjUiKQorICAgICAgICAgICAgICAgICAgICAgICg5ICJib3giICJn cmV5NzUiKSkpKQorICAgIChzZWxlY3Qtd2luZG93IChkaXNwbGF5LWJ1ZmZlciBidWZmZXIpKSkp CisKKyhkZWZ1biArLXRpbWVyLWZuICgpCisiU2luY2UgdGhpcyBmaXJlcyBnbG9iYWxseSwgd2Ug bXVzdCBjb250cm9sIHdoaWNoIGJ1ZmZlcnMgY3Jvc3NoYWlycyBhcHBlYXIgaW4uIgorICAod2hl biArLW1vZGUKKyAgICAodW5sZXNzIChvciAobWVtcSBsYXN0LWNvbW1hbmQgKy1wYXJlbnMtZXhj bHVzaW9ucykKKyAgICAgICAgICAgICAgICAobnVsbCArLXBhcmVucy1oaWdobGlnaHQpKQorICAg ICAgKCstcGFyZW5zLWZuKSkKK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ICAo c2V0cSArLXRpbWVyLXZhciAocnVuLXdpdGgtaWRsZS10aW1lciArLWlkbGUtdGltZXItc2Vjb25k cyBuaWwgIycrLXRpbWVyLWZuKSkpKSkKKworKGRlZnZhciBmYy1tb2RlKQorCis7OzsjIyNhdXRv bG9hZAorKGRlZmluZS1taW5vci1tb2RlICstbW9kZQorIk1pbm9yIG1vZGUgZm9yIGRpc3BsYXlp bmcgYSBob3Jpem9udGFsIHJ1bGVyLiIKKyAgOmluaXQtdmFsdWUgbmlsCisgIDpsaWdodGVyICIg KyIKKyAgOmtleW1hcCBuaWwKKyAgOmdsb2JhbCBuaWwKKyAgOmdyb3VwICcrLW1vZGUKKyAgKGNv bmQKKyAgICAoKy1tb2RlCisgICAgICA7OzsgYCstbW9kZScgaGFzIHRoZSBhYmlsaXR5IHRvIGFs c28gZGlzcGxheSBhIGZpbGwgY29sdW1uIGluZGljYXRvci4KKyAgICAgIDs7OyBTZWUgdGhlIHZh cmlhYmxlIGArLWZpbGwtY29sdW1uJy4KKyAgICAgICh3aGVuIGZjLW1vZGUKKyAgICAgICAgKGZj LW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAgICAgICAg ICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAo ZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVsZG9jLW1v ZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAgICAg ICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAg IChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAg aml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1sb2Nr LWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVy IChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZvbnRp ZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAgICAo d2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAg IChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAg dW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1l ciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0ICd1bmRv LWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChhZGQtdG8t bGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQtYnVmZmVy KSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkpCisgICAg ICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1vZGUgLTEp CisgICAgICAgICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21tYW5kLWhv b2spCisgICAgICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxpbmstY3Vy c29yLWNoZWNrKSkpCisgICAgICAoc2V0cSBjcm9zc2hhaXJzIHQpCisgICAgICAod2hlbiArLWZp bGwtY29sdW1uCisgICAgICAgIChzZXRxIGZjLXZpc2libGUgdCkpCisgICAgICA7Ozsg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bGlzdAorICAgICAgICAgICAgICAgICAgICAgdGFiLXdpZHRoCisg ICAgICAgICAgICAgICAgICAgICBsaW5lLW1vdmUtdmlzdWFsCisgICAgICAgICAgICAgICAgICAg ICB0cnVuY2F0ZS1saW5lcworICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtcGFydGlhbC13 aWR0aC13aW5kb3dzCisgICAgICAgICAgICAgICAgICAgICB3b3JkLXdyYXApKQorICAgICAgICAo d2hlbiAobG9jYWwtdmFyaWFibGUtcCB2YXIpCisgICAgICAgICAgKHB1c2ggKGNvbnMgdmFyIChz eW1ib2wtdmFsdWUgdmFyKSkgKy0tc2F2ZWQtc3RhdGUpKSkKKyAgICAgIChzZXRxIGZpbGwtY29s dW1uIDgwKQorICAgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkKKyAgICAgIChzZXRx LWxvY2FsIGF1dG8taHNjcm9sbC1tb2RlICdjdXJyZW50LWxpbmUpCisgICAgICAoc2V0cS1sb2Nh bCBoc2Nyb2xsLXN0ZXAgNSkKKyAgICAgIChzZXRxIGJ1ZmZlci1kaXNwbGF5LXRhYmxlICstYnVm ZmVyLWRpc3BsYXktdGFibGUpCisgICAgICAoc2V0cSB0YWItd2lkdGggNCkKKyAgICAgIChzZXQg KG1ha2UtbG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpIHQpCisgICAgICAoc2V0cSB0 cnVuY2F0ZS1saW5lcworICAgICAgICAoY29uZAorICAgICAgICAgICgobGV0ICgobHN0ICstdHJ1 bmNhdGUtbGluZXMtZGVyaXZlZC1tb2RlcykKKyAgICAgICAgICAgICAgICAgIG1vZGUpCisgICAg ICAgICAgICAoY2F0Y2ggJ2ZvdW5kCisgICAgICAgICAgICAgICh3aGlsZSAoc2V0cSBtb2RlIChw b3AgbHN0KSkKKyAgICAgICAgICAgICAgICAod2hlbiAoZGVyaXZlZC1tb2RlLXAgbW9kZSkKKyAg ICAgICAgICAgICAgICAgICh0aHJvdyAnZm91bmQgdCkpKSkpKQorICAgICAgICAgICAoKG1lbXEg bWFqb3ItbW9kZSArLXRydW5jYXRlLWxpbmVzLW1ham9yLW1vZGVzKSkKKyAgICAgICAgICAgKHQK KyAgICAgICAgICAgICBuaWwpKSkKKyAgICAgIChzZXQgKG1ha2UtbG9jYWwtdmFyaWFibGUgJ3Ry dW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cykgbmlsKQorICAgICAgKHNldHEgd29yZC13cmFw IHQpCisgICAgICAoc2V0cSBpbmRpY2F0ZS1lbXB0eS1saW5lcyB0KQorICAgICAgKHNldHEgaW5k aWNhdGUtYnVmZmVyLWJvdW5kYXJpZXMgJ2xlZnQpCisgICAgICAoc2V0cSBmcmluZ2UtaW5kaWNh dG9yLWFsaXN0CisgICAgICAgICAgOzs7IGhzY2xfYWxsX3RlbXBfcCB8IGhzY2xfdGVtcF9wCisg ICAgICAgICcoKCstaHNjbC10ZW1wIC4gKCstc2luZ2xlLWFuZ2xlLWxlZnQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgKy1kb3VibGUtYW5nbGUtbGVmdCkpCisgICAgICAgICAgOzs7IGhzY2xf YWxsX3Blcm1fMF9wIHwgaHNjbF9hbGxfcGVybV8xX3AgfCBoc2NsX2FsbF9wZXJtXzJfcCB8IGhz Y2xfcGVybV9wCisgICAgICAgICAgKCstaHNjbC1wZXJtIC4gKCstc2luZ2xlLWFuZ2xlLXVwCisg ICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLXVwCisgICAgICAgICAgICAg ICAgICAgICAgICAgICstdHJpcGxlLWFuZ2xlLXVwCisgICAgICAgICAgICAgICAgICAgICAgICAg ICstcXVhZHJ1cGxlLWFuZ2xlLXVwKSkKKyAgICAgICAgICAoKy1vdmVybGF5LWFycm93IC4gKCst ZnJpbmdlLWxlZnQtYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdl LXJpZ2h0LWFycm93KSkKKyAgICAgICAgICAodHJ1bmNhdGlvbiAuICgrLWZyaW5nZS1sZWZ0LWFy cm93CisgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYXJyb3cpKQorICAg ICAgICAgIChjb250aW51YXRpb24gLiAoKy1mcmluZ2UtbGVmdC1jdXJseS1hcnJvdworICAgICAg ICAgICAgICAgICAgICAgICAgICAgKy1iYWNrc2xhc2gpKQorICAgICAgICAgIChvdmVybGF5LWFy cm93IC4gKy1mcmluZ2UtcmlnaHQtdHJpYW5nbGUpCisgICAgICAgICAgKHVwIC4gKy1mcmluZ2Ut dXAtYXJyb3cpCisgICAgICAgICAgKGRvd24gLiArLWZyaW5nZS1kb3duLWFycm93KQorICAgICAg ICAgICh0b3AgLiArLWZyaW5nZS10b3AtbGVmdC1hbmdsZSkKKyAgICAgICAgICAoYm90dG9tIC4g Ky1mcmluZ2UtYm90dG9tLXJpZ2h0LWFuZ2xlKQorICAgICAgICAgICh0b3AtYm90dG9tIC4gKCst ZnJpbmdlLWxlZnQtYnJhY2tldAorICAgICAgICAgICAgICAgICAgICAgICAgICstZnJpbmdlLXJp Z2h0LWJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS10b3AtcmlnaHQt YW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICArLWZyaW5nZS10b3AtbGVmdC1hbmdsZSkp CisgICAgICAgICAgKGVtcHR5LWxpbmUgLiArLWZyaW5nZS1lbXB0eS1saW5lKQorICAgICAgICAg ICh1bmtub3duIC4gKy1mcmluZ2UtcXVlc3Rpb24tbWFyaykpKQorICAgICAgKHNldHEgZnJpbmdl LWN1cnNvci1hbGlzdCAnKChib3ggLiArLWZyaW5nZS1sZWZ0LXRyaWFuZ2xlKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChob2xsb3cgLiArLWhvbGxvdy1yZWN0YW5nbGUpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGJhciAuICstdmVydGljYWwtYmFyKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChoYmFyIC4gKy1mcmluZ2UtaG9yaXpv bnRhbC1iYXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdy1zbWFs bCAuICstZnJpbmdlLWhvbGxvdy1zcXVhcmUpKSkKKyAgICAgIChpZiAob3IgKy1mb3J0aHdpdGgK KyAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAg KGFkZC1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnKy1kcmF3LWZvcnRod2l0aCAnYXBwZW5kICds b2NhbCkKKyAgICAgICAgKGFkZC1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnKy1kcmF3LWNyb3Nz aGFpcnMgJ2FwcGVuZCAnbG9jYWwpKQorICAgICAgKHdoZW4gKy1mb3J0aHdpdGgKKyAgICAgICAg KGFkZC1ob29rICd3aW5kb3ctY29uZmlndXJhdGlvbi1jaGFuZ2UtaG9vayAnKy1kcmF3LWZvcnRo d2l0aCBuaWwgJ2xvY2FsKSkKKyAgICAgIChhZGQtaG9vayAnY2hhbmdlLW1ham9yLW1vZGUtaG9v ayAndHVybi1vZmYtKy1tb2RlIG5pbCAnbG9jYWwpCisgICAgICA7OzsgTWF0Y2hpbmcgcGFyZW50 aGVzZXMgZHJhd2luZyBmb3J0aHdpdGggaW50ZXJmZXJlcyB3aXRoIHlhc25pcHBldC4KKyAgICAg ICh3aGVuICstZm9ydGh3aXRoCisgICAgICAgIChzZXRxICstcGFyZW5zLWhpZ2hsaWdodCBuaWwp KQorICAgICAgKHdoZW4gKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgKGNv bmQKKyAgICAgICAgICAoKy1mb3J0aHdpdGgKKyAgICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQg T04gYCstbW9kZScgLS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jaGFyKSkKKyAgICAgICAgIChvY2hhciAo Y2hhci1hZnRlciBvcG9pbnQpKQorICAgICAgICAgKHBvczEKKyAgICAgICAgICAgKGNvbmQKKyAg ICAgICAgICAgICAoKGFuZCBvY2hhcgorICAgICAgICAgICAgICAgICAgIChvciA7OzsgKGNoYXIt dG8tc3RyaW5nIDQwKSA9PiBvcGVuaW5nIHBhcmVudGhlc2lzCisgICAgICAgICAgICAgICAgICAg ICAgICg9IG9jaGFyIDQwKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3Ry aW5nIDkxKSA9PiBvcGVuaW5nIHNxdWFyZSBicmFja2V0CisgICAgICAgICAgICAgICAgICAgICAg ICg9IG9jaGFyIDkxKQorICAgICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5n IDEyMykgPT4gb3BlbmluZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0g b2NoYXIgMTIzKSkpCisgICAgICAgICAgICAgICAgKG1pbiAoMSsgb3BvaW50KSAocG9pbnQtbWF4 KSkpCisgICAgICAgICAgICAgKChvciA7OzsgKGNoYXItdG8tc3RyaW5nIDQxKSA9PiBjbG9zaW5n IHBhcmVudGhlc2lzCisgICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKKyAg ICAgICAgICAgICAgICAgIDs7OyAoY2hhci10by1zdHJpbmcgOTMpID0+IGNsb3Npbmcgc3F1YXJl IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDkzKQorICAgICAg ICAgICAgICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFj a2V0CisgICAgICAgICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciAxMjUpKQorICAgICAgICAg ICAgICAgIChtYXggKHBvaW50LW1pbikgKDEtIG9wb2ludCkpKQorICAgICAgICAgICAgICh0Cisg ICAgICAgICAgICAgICAgb3BvaW50KSkpCisgICAgICAgICBwb3MyCisgICAgICAgICBzZWxlY3Rl ZC1mYWNlKQorICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgKGNvbmRpdGlvbi1jYXNlIG5pbAor ICAgICAgICAod2hpbGUgKHNldHEgcG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9t IHBvczEpKSkKKyAgICAgICAgICAoc2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEgMSkpCisgICAg ICAgICAgKGlmICg9IGkgMTApCisgICAgICAgICAgICAoc2V0cSBpIDEpCisgICAgICAgICAgICAo c2V0cSBpICgxKyBpKSkpCisgICAgICAgICAgKHNldHEgc2VsZWN0ZWQtZmFjZSAoY29uZAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICcrLXBhcmVucy1vbmUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKCg9IGkgMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn Ky1wYXJlbnMtdHdvLWZhY2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBp IDMpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXRocmVlLWZh Y2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDQpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLWZvdXItZmFjZSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAnKy1wYXJlbnMtZml2ZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoKD0gaSA2KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVu cy1zaXgtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtc2V2ZW4tZmFjZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgOCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtZWlnaHQtZmFjZSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKCg9IGkgOSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKy1wYXJlbnMtbmluZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo KD0gaSAxMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGVu LWZhY2UpKSkKKyAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBwb3Mx KSkpKQorICAgICAgICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAg ICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnd2luZG93IHdpbikpCisgICAgICAgICAgICAob3Zl cmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpCisgICAgICAgICAgKHdoZW4gcG9zMgor ICAgICAgICAgICAgKGxldCAoKG92IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIpKSkKKyAg ICAgICAgICAgICAgKHVubGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAg ICAgICAgKG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgICAgKG92ZXJs YXktcHV0IG92ICdmYWNlIHNlbGVjdGVkLWZhY2UpKSkpCisgICAgICAgIChlcnJvciBuaWwpKSkK KyAgICAoc2V0cSArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wIHQpKSkKKworKGRlZnVuICstcmVt b3ZlLW92ZXJsYXlzIChiZWcgZW5kIG5hbWUgdmFsKQorIlJlbW92ZSB0aGUgb3ZlcmxheXMgdGhh dCBhcmUgYGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzYC4KK0luY2x1ZGVzIGEgdW5pcXVlIHNp dHVhdGlvbiB3aGVuIGFuIG92ZXJsYXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVydHkK K2lzIGF0IHRoZSB2ZXJ5IGVuZCBvZiBhIG5hcnJvd2VkLWJ1ZmZlci4iCisgIChsZXQqICgocG9p bnQtbWF4IChwb2ludC1tYXgpKQorICAgICAgICAgKHBvaW50LW1pbiAocG9pbnQtbWluKSkKKyAg ICAgICAgIChuYXJyb3dlZC1wIChidWZmZXItbmFycm93ZWQtcCkpCisgICAgICAgICAoYmVnIChp ZiBiZWcgYmVnIHBvaW50LW1pbikpCisgICAgICAgICAoZW5kCisgICAgICAgICAgIChjb25kCisg ICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAg ICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChh bmQKKyAgICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICAo bnVsbCBlbmQpKQorICAgICAgICAgICAgICAgcG9pbnQtbWF4KQorICAgICAgICAgICAgICgoYW5k CisgICAgICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAg ICAgICAgICAgICAgICg8IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgZW5kKQorICAg ICAgICAgICAgICgoYW5kCisgICAgICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAg ICAgICAgZW5kCisgICAgICAgICAgICAgICAgICg9IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAg ICAgICAgKDErIGVuZCkpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFy cm93ZWQtcAorICAgICAgICAgICAgICAgICAobnVsbCBlbmQpKQorICAgICAgICAgICAgICAgKDEr IHBvaW50LW1heCkpICkpCisgICAgICAgICAob3ZlcmxheXMKKyAgICAgICAgICAgKHByb2duCisg ICAgICAgICAgICAgKG92ZXJsYXktcmVjZW50ZXIgZW5kKQorICAgICAgICAgICAgIChvdmVybGF5 cy1pbiBiZWcgZW5kKSkpKQorICAgICh3aGVuIChhbmQgYmVnIGVuZCBuYW1lIHZhbCkKKyAgICAg IChkb2xpc3QgKG8gb3ZlcmxheXMpCisgICAgICAgIChjb25kCisgICAgICAgICAgKChhbmQgKGVx IG5hbWUgJ2ZhY2UpCisgICAgICAgICAgICAgICAgKGVxIChvdmVybGF5LWdldCBvIG5hbWUpIHZh bCkpCisgICAgICAgICAgICA7OyBFaXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0c2lkZSBiZWcu Li5lbmQKKyAgICAgICAgICAgIDs7IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCisg ICAgICAgICAgICA7OyBvciBkZWxldGUgaXQgZW50aXJlbHkgKGlmIGl0IGlzIGNvbnRhaW5lZCBp biBiZWcuLi5lbmQpLgorICAgICAgICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8pIGJlZykK KyAgICAgICAgICAgICAgICAoaWYgKD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKKyAgICAgICAgICAg ICAgKHByb2duCisgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5IG8p CisgICAgICAgICAgICAgICAgICAob3ZlcmxheS1zdGFydCBvKSBiZWcpCisgICAgICAgICAgICAg ICAgKG1vdmUtb3ZlcmxheSBvIGVuZCAob3ZlcmxheS1lbmQgbykpKQorICAgICAgICAgICAgICAg ICAgKG1vdmUtb3ZlcmxheSBvIChvdmVybGF5LXN0YXJ0IG8pIGJlZykpCisgICAgICAgICAgICAg IChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5kKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3Zl cmxheSBvIGVuZCAob3ZlcmxheS1lbmQgbykpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVy bGF5IG8pKSkpCisgICAgICAgICAgKChhbmQgKG5vdCAoZXEgbmFtZSAnZmFjZSkpCisgICAgICAg ICAgICAgICAgKGVxdWFsLWluY2x1ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUp IHZhbCkpCisgICAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgbykpKSkpKSkKKworKGRlZnVuICst ZGVsZXRlLXBhcmVucy1vdmVybGF5cyAoKQorICAod2hlbiArLXBhcmVucy1vdmVybGF5cy1leGlz dC1wCisgICAgKGRvbGlzdCAoZmFjZSAnKCstcGFyZW5zLW9uZS1mYWNlCisgICAgICAgICAgICAg ICAgICAgICstcGFyZW5zLXR3by1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRo cmVlLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZm91ci1mYWNlCisgICAgICAg ICAgICAgICAgICAgICstcGFyZW5zLWZpdmUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBh cmVucy1zaXgtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1zZXZlbi1mYWNlCisg ICAgICAgICAgICAgICAgICAgICstcGFyZW5zLWVpZ2h0LWZhY2UKKyAgICAgICAgICAgICAgICAg ICAgKy1wYXJlbnMtbmluZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRlbi1m YWNlKSkKKyAgICAgICgrLXJlbW92ZS1vdmVybGF5cyBuaWwgbmlsICdmYWNlIGZhY2UpKQorICAg IChzZXRxICstcGFyZW5zLW92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BmYy1tb2Rl IG5pbCkKKyAgICAgIChtZXNzYWdlICJUdXJuZWQgT0ZGIGBmYy1tb2RlJyAoJXMpIC0tIHNlZSB0 aGUgdmFyaWFibGUgYCstZmlsbC1jb2x1bW4nLiIgKGN1cnJlbnQtYnVmZmVyKSkpCisgICAgKGZj LW1vZGUKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFsLWVsZG9jLW1vZGUKKyAgICAgICAgICAgICAg ICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAgICAgICAgICAgKGVxdWFs IGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAgICAgICAgKGdsb2JhbC1lbGRvYy1tb2RlIC0x KSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2stY29udGV4dC10aW1lcgorICAgICAgICAgICAg ICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1 YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGltZXJwIGppdC1s b2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciBqaXQtbG9jay1jb250 ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciAocnVu LXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAnaml0LWxvY2stY29udGV4dC1mb250aWZ5KSkK KyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4g KGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1 YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAod2hlbiAodGltZXJwIHVuZG8t YXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQorICAgICAgICAgIChjYW5jZWwtd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ChiYWNrZ3JvdW5kIGRhcmspKQorICAgICA6Zm9y ZWdyb3VuZCAiI2VlZThhYSIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAo YmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJibHVlMSIpCisgICAgKCgoY2xh c3MgY29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAg ICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAg KHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2ZW4taW5hY3RpdmUtcHJl LXp2LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstZXZlbi1hdC16di1m YWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJr KSkKKyAgICAgOmZvcmVncm91bmQgIkRlZXBQaW5rMSIpCisgICAgKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVw UGluazEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQg ZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNsYXNzIGNvbG9y KSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAi RGVlcFBpbmsxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgOCkpCisgICAgIDpm b3JlZ3JvdW5kICJ3aGl0ZSIpCisgICAgKCgodHlwZSB0dHkpIChjbGFzcyBtb25vKSkKKyAgICAg OmludmVyc2Utdml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cmVncm91bmQgIlJveWFsQmx1ZSIpCisgICAgKCgoY2xhc3Mg Y29sb3IpIChtaW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAgICgo KHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAgKHQg OmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLWV2ZW4taW5hY3RpdmUtcG9zdC16 di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLW9kZC1wcmUtenYtZmFj ZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykp CisgICAgIDpmb3JlZ3JvdW5kICJyZWQxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xv cnMgODgpIChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInJlZDEiKQorICAg ICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAg IDpmb3JlZ3JvdW5kICJyZWQxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgMTYp IChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInJlZDEiKQorICAgICgoKGNs YXNzIGNvbG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAg ICAoKCh0eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAg ICh0IDpmb3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1vZGQtcHJlLXp2LWZhY2Un LiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstb2RkLWluYWN0aXZlLXByZS16di1m YW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KQorICAgICh0IDpmb3JlZ3JvdW5k ICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1wb3N0LWZpbGwtcG9zdC16di1mYWNlJy4iCisgIDpn cm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLXBvc3QtZmlsbC1pbmFjdGl2ZS1wb3N0LXp2LWZh Y2UKKyAgJygoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgpIChiYWNrZ3JvdW5kIGRhcmsp KQorICAgICA6Zm9yZWdyb3VuZCAiUGFsZUdyZWVuNCIpCisgICAgKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAgIDpmb3JlZ3JvdW5kICJEYXJr T2xpdmVHcmVlbiIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDE2KSAoYmFja2dy b3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgIlBhbGVHcmVlbjQiKQorICAgICgoKGNsYXNz IGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdy b3VuZCAiRGFya09saXZlR3JlZW4iKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4 KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAgICAoKCh0eXBlIHR0eSkgKGNsYXNzIG1v bm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0IDpmb3JlZ3JvdW5kICJwaW5rIikp CisgICJGYWNlIGZvciBgKy1wb3N0LWZpbGwtaW5hY3RpdmUtcG9zdC16di1mYWNlJy4iCisgIDpn cm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSBmYy1wcmUtenYtZmFjZQorICAnKCgoKGNsYXNzIGNv bG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5k ICJncmV5MTUiKQorICAg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hcmUgaW5saW5lIGZ1bmN0aW9ucyBkZWZpbmVkIGluIGJ1ZmZlci5oLiAg Ki8KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNP UlMgKi8KKworc3RhdGljIHZvaWQKK2JzZXRfbWNfcmVhbF9mYWtlX2N1cnNvciAoc3RydWN0IGJ1 ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBiLT5tY19yZWFsX2Zha2VfY3Vyc29yXyA9 IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfbWNfY29uZiAoc3RydWN0IGJ1ZmZlciAqYiwg TGlzcF9PYmplY3QgdmFsKQoreworICBiLT5tY19jb25mXyA9IHZhbDsKK30KKworc3RhdGljIHZv aWQKK2JzZXRfbWNfaW5hY3RpdmVfd2luZG93cyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmpl Y3QgdmFsKQoreworICBiLT5tY19pbmFjdGl2ZV93aW5kb3dzXyA9IHZhbDsKK30KKworc3RhdGlj IHZvaWQKK2JzZXRfY3Jvc3NoYWlycyAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFs KQoreworICBiLT5jcm9zc2hhaXJzXyA9IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRfY2hf aG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQorewor ICBiLT5jaF9ob3Jpem9udGFsX3J1bGVyXyA9IHZhbDsKK30KKworc3RhdGljIHZvaWQKK2JzZXRf Y2hfdmVydGljYWxfcnVsZXIgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sK KyAgYi0+Y2hfdmVydGljYWxfcnVsZXJfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNldF9j aF9pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPmNoX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNl dF9mY192aXNpYmxlIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGIt PmZjX3Zpc2libGVfID0gdmFsOworfQorCitzdGF0aWMgdm9pZAorYnNldF9mY19pbmFjdGl2ZV93 aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmZjX2lu YWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RhdGljIHZvaWQKIGJzZXRfYWJicmV2X21v ZGUgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKIHsKQEAgLTUxNDUsNiArNTIw OCwyNCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICBic2V0X2xhc3Rfc2VsZWN0ZWRfd2lu ZG93ICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBtYWtlX2ZpeG51bSAoMCkpOwogCiAgIGlkeCA9IDE7 CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisK KyAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIG1jX3JlYWxfZmFrZV9j dXJzb3IpLCBpZHgpOyArK2lkeDsKKyAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZm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qKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgYnNldF9tb2RlX2xpbmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1bHRzLCBidWlsZF9w dXJlX2Nfc3RyaW5nICgiJS0iKSk7CiAgIGJzZXRfaGVhZGVyX2xpbmVfZm9ybWF0ICgmYnVmZmVy X2RlZmF1bHRzLCBRbmlsKTsKICAgYnNldF9hYmJyZXZfbW9kZSAoJmJ1ZmZlcl9kZWZhdWx0cywg UW5pbCk7CkBAIC01NDYxLDYgKzU1NjAsNTEgQEAgZGVmdmFyX3Blcl9idWZmZXIgKHN0cnVjdCBM aXNwX0J1ZmZlcl9PYmpmd2QgKmJvX2Z3ZCwgY29uc3QgY2hhciAqbmFtZXN0cmluZywKIHZvaWQK IHN5bXNfb2ZfYnVmZmVyICh2b2lkKQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIERFRlNZTSAoUW1jX3JlYWxfZmFrZV9jdXJzb3Is ICJtYy1yZWFsLWZha2UtY3Vyc29yIik7CisgIERFRlZBUl9QRVJfQlVGRkVSICgibWMtcmVhbC1m YWtlLWN1cnNvciIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgbWNfcmVhbF9mYWtlX2N1cnNvciks IFFuaWwsCisgICAgZG9jOiAvKiBBIGJ1ZmVyLWxvY2FsIHZhcmlhYmxlIHRvIHNldCB0aGUgY3Vy c29yIHR5cGUgb2YgdGhlIHJlYWwgZmFrZSBjdXJzb3IuICovKTsKKworICBERUZTWU0gKFFtY19j b25mLCAibWMtY29uZiIpOworICBERUZWQVJfUEVSX0JVRkZFUiAoIm1jLWNvbmYiLCAmQlZBUiAo Y3VycmVudF9idWZmZXIsIG1jX2NvbmYpLCBRbmlsLAorICAgIGRvYzogLyogQSBidWZlci1sb2Nh bCB2YXJpYWJ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cmF3IG11bHRp cGxlIGN1cnNvcnMgZmlsbCBjb2x1bW4gaW4gaW5hY3RpdmUgd2luZG93cy4gKi8pOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0YXRpY3BybyAoJmxhc3Rfb3ZlcmxheV9tb2Rp ZmljYXRpb25faG9va3MpOwogICBsYXN0X292ZXJsYXlfbW9kaWZpY2F0aW9uX2hvb2tzID0gbWFr ZV9uaWxfdmVjdG9yICgxMCk7CiAKZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuaCBiL3NyYy9idWZm ZXIuaAppbmRleCAyMDgwYTZmLi4xYWRhOTNlIDEwMDY0NAotLS0gYS9zcmMvYnVmZmVyLmgKKysr IGIvc3JjL2J1ZmZlci5oCkBAIC03NDAsNiArNzQwLDQwIEBAIHN0cnVjdCBidWZmZXIKICAgICAg aW4gdGhlIGRpc3BsYXkgb2YgdGhpcyBidWZmZXIuICAqLwogICBMaXNwX09iamVjdCBleHRyYV9s aW5lX3NwYWNpbmdfOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisgIC8qIFRoZSBjdXJzb3IgdHlwZSBvZiB0aGUgcmVhbCBmYWtlIGN1cnNv ci4gKi8KKyAgTGlzcF9PYmplY3QgbWNfcmVhbF9mYWtlX2N1cnNvcl87CisKKyAgLyogVGhlIG5h bWUgb2YgbGlzdCB1c2VkIGJ5IG11bHRpcGxlIGN1cnNvcnMgZm9yIG5leHQgcmVkaXNwbGF5LiAq LworICBMaXNwX09iamVjdCBtY19jb25mXzsKKworICAvKiBXaGV0aGVyIHRvIGRyYXcgbXVsdGlw bGUgY3Vyc29ycyBpbiBpbmFjdGl2ZSB3aW5kb3dzLiAqLworICBMaXNwX09iamVjdCBtY19pbmFj dGl2ZV93aW5kb3dzXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUgYnVmZmVyLWxvY2FsIHZhcmlh YmxlLiAqLworICBMaXNwX09iamVjdCBjcm9zc2hhaXJzXzsKKworICAvKiBUaGUgbmFtZSBvZiB0 aGUgY3Jvc3NoYWlycyBob3Jpem9udGFsIHJ1bGVyLiAqLworICBMaXNwX09iamVjdCBjaF9ob3Jp em9udGFsX3J1bGVyXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUgY3Jvc3NoYWlycyB2ZXJ0aWNh bCBydWxlci4gKi8KKyAgTGlzcF9PYmplY3QgY2hfdmVydGljYWxfcnVsZXJfOworCisgIC8qIFdo ZXRoZXIgdG8gZHJhdyBjcm9zc2hhaXJzIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3Bf T2JqZWN0IGNoX2luYWN0aXZlX3dpbmRvd3NfOworCisgIC8qIFRoZSBuYW1lIG9mIHRoZSBidWZm ZXItbG9jYWwgdmFyaWFibGUuICovCisgIExpc3BfT2JqZWN0IGZjX3Zpc2libGVfOworCisgIC8q IFdoZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGZpbGwgY29sdW1uIGluIGluYWN0aXZl IHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IGZjX2luYWN0aXZlX3dpbmRvd3NfOworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEN1cnNvciB0eXBlIHRvIGRpc3BsYXkgaW4g bm9uLXNlbGVjdGVkIHdpbmRvd3MuCiAgICAgIHQgbWVhbnMgdG8gdXNlIGhvbGxvdyBib3ggY3Vy c29yLgogICAgICBTZWUgYGN1cnNvci10eXBlJyBmb3Igb3RoZXIgdmFsdWVzLiAgKi8KQEAgLTc5 MSwxNCArODI1LDIxIEBAIHN0cnVjdCBidWZmZXIKICAgICAgYW4gaW5kaXJlY3QgYnVmZmVyIHNp bmNlIGl0IGNvdW50cyBhcyBpdHMgYmFzZSBidWZmZXIuICAqLwogICBpbnQgd2luZG93X2NvdW50 OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CiAgIC8qIEEgbm9uLXplcm8gdmFsdWUgaW4gc2xvdCBJRFggbWVhbnMgdGhhdCBwZXItYnVmZmVy IHZhcmlhYmxlCiAgICAgIHdpdGggaW5kZXggSURYIGhhcyBhIGxvY2FsIHZhbHVlIGluIHRoaXMg YnVmZmVyLiAgVGhlIGluZGV4IElEWAogICAgICBmb3IgYSBidWZmZXItbG9jYWwgdmFyaWFibGUg aXMgc3RvcmVkIGluIHRoYXQgdmFyaWFibGUncyBzbG90CiAgICAgIGluIGJ1ZmZlcl9sb2NhbF9m bGFncyBhcyBhIExpc3AgaW50ZWdlci4gIElmIHRoZSBpbmRleCBpcyAtMSwKICAgICAgdGhpcyBt ZWFucyB0aGUgdmFyaWFibGUgaXMgYWx3YXlzIGxvY2FsIGluIGFsbCBidWZmZXJzLiAgKi8KLSNk ZWZpbmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA1MAorI2RlZmluZSBNQVhfUEVSX0JVRkZFUl9WQVJT IDYwCiAgIGNoYXIgbG9jYWxfZmxhZ3NbTUFYX1BFUl9CVUZGRVJfVkFSU107CiAKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKICAgLyogU2V0IHRvIHRoZSBtb2R0aW1lIG9mIHRoZSB2aXNp dGVkIGZpbGUgd2hlbiByZWFkIG9yIHdyaXR0ZW4uCiAgICAgIG1vZHRpbWUudHZfbnNlYyA9PSBO T05FWElTVEVOVF9NT0RUSU1FX05TRUNTIG1lYW5zCiAgICAgIHZpc2l0ZWQgZmlsZSB3YXMgbm9u ZXhpc3RlbnQuICBtb2R0aW1lLnR2X25zZWMgPT0KQEAgLTkwNyw2ICs5NDgsNjkgQEAgWEJVRkZF UiAoTGlzcF9PYmplY3QgYSkKIC8qIE1vc3QgY29kZSBzaG91bGQgdXNlIHRoZXNlIGZ1bmN0aW9u cyB0byBzZXQgTGlzcCBmaWVsZHMgaW4gc3RydWN0CiAgICBidWZmZXIuICAoU29tZSBzZXR0ZXJz IHRoYXQgYXJlIHByaXZhdGUgdG8gYSBzaW5nbGUgLmMgZmlsZSBhcmUKICAgIGRlZmluZWQgYXMg c3RhdGljIGluIHRob3NlIGZpbGVzLikgICovCisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9t Y19yZWFsX2Zha2VfY3Vyc29yIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7 CisgIGItPm1jX3JlYWxfZmFrZV9jdXJzb3JfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNl dF9ibHZfbWNfY29uZiAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFsKQoreworICBi LT5tY19jb25mXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2JzZXRfYmx2X21jX2luYWN0aXZl X3dpbmRvd3MgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkKK3sKKyAgYi0+bWNf aW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2b2lkCitic2V0X2Jsdl9jcm9z c2hhaXJzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2YWwpCit7CisgIGItPmNyb3Nz a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Yy9kaXNwZXh0ZXJuLmgKaW5kZXgg NGU5NDdkYS4uMWE3OTcxMSAxMDA2NDQKLS0tIGEvc3JjL2Rpc3BleHRlcm4uaAorKysgYi9zcmMv ZGlzcGV4dGVybi5oCkBAIC0xNDUsNiArMTQ1LDEzMSBAQCB0eXBlZGVmIHZvaWQgKkVtYWNzX0N1 cnNvcjsKICNkZWZpbmUgTmF0aXZlUmVjdGFuZ2xlIGludAogI2VuZGlmCiAKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK2V4dGVybiBi b29sIG1jX3N0ZGVycl9wIEVYVEVSTkFMTFlfVklTSUJMRTsKKworc3RydWN0IGdseXBoOworCitz dHJ1Y3QgZ2x5cGhfcm93OworCitzdHJ1Y3QgZ2x5cGhfbWF0cml4OworCitlbnVtIGRyYXdfZ2x5 cGhzX2ZhY2U7CisKK2VudW0gZ2x5cGhfcm93X2FyZWE7CisKK3N0cnVjdCBtY19tYXRyaXg7CisK K2VudW0gbWNfY2FjaGVfdHlwZTsKKworZW51bSBtY19jdXJzb3JfdHlwZTsKKworZW51bSBtY19m bGF2b3I7CisKK3N0cnVjdCBtY19SR0I7CisKK3N0cnVjdCBtY19lc3NlbnRpYWxzOworCitlbnVt IG1jX2RyYXdfcm93X3R5cGU7CisKK2VudW0gbWNfZW5naW5lX3R5cGU7CisKK2VudW0gbWNfcm93 X3Bvc2l0aW9uOworCitlbnVtIG1jX3JlZHJhd19yb3dfdHlwZTsKKworZW51bSBkcmF3X2dseXBo X2FjdGlvbjsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2xpc3RuIChwdHJkaWZmX3QsIExpc3Bf T2JqZWN0LCAuLi4pOworCitleHRlcm4gTGlzcF9PYmplY3QgbWNfbnRoIChpbnQsIExpc3BfT2Jq ZWN0KTsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2Fzc3EgKExpc3BfT2JqZWN0LCBMaXNwX09i amVjdCk7CisKK2V4dGVybiBlbnVtIG1jX3Jvd19wb3NpdGlvbiBtY19yb3dfcG9zaXRpb24gKHN0 cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqLCBpbnQpOworCitleHRl cm4gcHRyZGlmZl90IG1jX3JlZ2lvbl9saW1pdCAoYm9vbCk7CisKK2V4dGVybiBzdHJ1Y3QgZ2x5 cGggKiBtY19nZXRfY3Vyc29yX2dseXBoIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9t YXRyaXggKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgZ2x5cGhfcm93ICosIGludCwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfeHdfY29sb3JfdmFs dWVzIChzdHJ1Y3Qgd2luZG93ICosIExpc3BfT2JqZWN0LCBzdHJ1Y3QgbWNfUkdCICopOworCitl eHRlcm4gYm9vbCBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHN0cnVjdCB3aW5kb3cgKiwgYm9v bCk7CisKK2V4dGVybiBjaGFyICogbWNfd2luZG93IChzdHJ1Y3Qgd2luZG93ICopOworCitleHRl cm4gY2hhciAqIG1jX2NoYXJfdG9fc3RyaW5nIChpbnQpOworCitleHRlcm4gY2hhciAqIG1jX2N1 cnNvcl90eXBlX3RvX3N0cmluZyAoZW51bSBtY19jdXJzb3JfdHlwZSk7CisKK2V4dGVybiBjaGFy ICogbWNfZmxhdm9yX3RvX3N0cmluZyAoZW51bSBtY19mbGF2b3IpOworCitleHRlcm4gY2hhciAq IG1jX2NhY2hlX3R5cGVfdG9fc3RyaW5nIChlbnVtIG1jX2NhY2hlX3R5cGUpOworCitleHRlcm4g Y2hhciAqIG1jX3JlZHJhd19yb3dfdHlwZV90b19zdHJpbmcgKGVudW0gbWNfcmVkcmF3X3Jvd190 eXBlKTsKKworZXh0ZXJuIHZvaWQgbWNfY2FjaGVfaW5zcGVjdG9yIChzdHJ1Y3Qgd2luZG93ICos IHN0cnVjdCBtY19tYXRyaXgpOworCitleHRlcm4gYm9vbCBtY190cmF2ZXJzZV9jYWNoZV9wIChz dHJ1Y3QgbWNfbWF0cml4LCBlbnVtIG1jX2NhY2hlX3R5cGUsIGludCwgaW50KTsKKworZXh0ZXJu IHZvaWQgbWNfZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlw aF9yb3cgKiwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1j X2N1cnNvcl90eXBlKTsKKworZXh0ZXJuIGludCBtY19nZXRfZnJpbmdlX2JpdG1hcCAoc3RydWN0 IHdpbmRvdyAqLCBMaXNwX09iamVjdCwgaW50LCBpbnQpOworCitleHRlcm4gdm9pZCBtY19lbmdp bmUgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhf cm93ICosCisgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqLCBpbnQsIGludCwg aW50LCBpbnQsIGludCwgaW50LAorICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNv cl90eXBlLCBpbnQsIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwKKyAgICAgICAgICAgICAgICAgICAg ICAgc3RydWN0IG1jX2Vzc2VudGlhbHMsIGVudW0gbWNfcm93X3Bvc2l0aW9uLCBzdHJ1Y3QgbWNf UkdCLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2VuZ2luZV90eXBlLCBib29sLCBl bnVtIG1jX2RyYXdfcm93X3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY2Fj aGVfdHlwZSk7CisKK2V4dGVybiB2b2lkIG1jX3NldF9lc3NlbnRpYWxzIChzdHJ1Y3Qgd2luZG93 ICosIHN0cnVjdCBtY19lc3NlbnRpYWxzICopOworCitleHRlcm4gdm9pZCBtY19kcmF3X3JvdyAo c3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlwaF9yb3cg KiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKiwgaW50LCBpbnQsIGlu dCwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVj dCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3NpdGlvbiwgYm9vbCwKKyAgICAgICAgICAg ICAgICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5cGUpOworCitleHRlcm4gYm9vbCBtY19y ZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9tYXRyaXggKiwgc3RydWN0 IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBnbHlwaF9yb3df YXJlYSwgaW50LCBpbnQsIGludCwgYm9vbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gZHJhd19nbHlwaHNfZmFjZSwgZW51bSBtY19yZWRyYXdfcm93X3R5cGUpOworCitleHRlcm4g dm9pZCBtY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRvdyAqKTsKKworZXh0ZXJuIHZvaWQgbWNf ZHJhd19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAq LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKiwg ZW51bSBkcmF3X2dseXBoc19mYWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGludCwgaW50LCBpbnQsIHN0cnVjdCBtY19SR0IsIGVudW0gbWNfZmxhdm9yLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUsIGludCwgYm9vbCwg Ym9vbCk7CisKK2V4dGVybiB2b2lkIG1jX2VyYXNlX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqLCBz dHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IG1jX21hdHJpeCwgaW50LCBpbnQsIGludCwgaW50LCBlbnVt IG1jX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3Jf dHlwZSwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHN0cnVjdCB3 aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50LCBpbnQsIGlu dCwgaW50LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19j dXJzb3JfdHlwZSwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGJvb2wsIGVudW0gbWNfZmxhdm9yLCBib29sKTsKKworZXh0ZXJuIGludCBtY19k cmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVj dCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19tYXRy aXgsIGludCwgZW51bSBnbHlwaF9yb3dfYXJlYSwgcHRyZGlmZl90LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgcHRyZGlmZl90LCBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UsIGludCwgaW50LCBz dHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19mbGF2b3Is IGVudW0gbWNfY3Vyc29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIGVudW0gZHJhd19nbHlwaF9hY3Rpb24sIGJvb2wpOworCitleHRlcm4gc3RydWN0 IGdseXBoX21hdHJpeCAqIG1jX3NhdmVfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4 ICopOworCitleHRlcm4gdm9pZCBtY19yZXN0b3JlX2dseXBoX21hdHJpeCAoc3RydWN0IGdseXBo X21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCisvKiBlbmQgTVVMVElQTEUtQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyogVGV4dCBjdXJzb3IgdHlw ZXMuICAqLwogCiBlbnVtIHRleHRfY3Vyc29yX2tpbmRzCkBAIC00MDQsNiArNTI5LDIxIEBAIHN0 cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1Y3QgZ2x5cGgKIHsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpbnQgcmVsYXRpdmVfeCwgaHBv czsKKworICBwdHJkaWZmX3QgYnl0ZXBvczsKKworICAvKiBDdXJyZW50IGxpbmUgbnVtYmVyLCB6 ZXJvLWJhc2VkLiAqLworICBwdHJkaWZmX3QgbG51bTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogICAvKiBQb3NpdGlvbiBmcm9tIHdoaWNoIHRoaXMgZ2x5cGggd2FzIGRyYXduLiAg SWYgYG9iamVjdCcgYmVsb3cgaXMgYQogICAgICBMaXNwIHN0cmluZywgdGhpcyBpcyBhbiBpbmRl eCBpbnRvIHRoYXQgc3RyaW5nLiAgSWYgaXQgaXMgYQogICAgICBidWZmZXIsIHRoaXMgaXMgYSBw b3NpdGlvbiBpbiB0aGF0IGJ1ZmZlci4gIEluIGFkZGl0aW9uLCBzb21lCkBAIC0xMjcwLDYgKzE0 MTAsMjggQEAgZW51bSBkcmF3X2dseXBoc19mYWNlCiAKIHN0cnVjdCBnbHlwaF9zdHJpbmcKIHsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICAgIGJvb2xfYmYgbGVmdF9vdmVyd3JpdHRlbl9wIDogMTsKKworICAgIGJvb2xfYmYgcmlnaHRf b3ZlcndyaXR0ZW5fcCA6IDE7CisKKyAgICBib29sX2JmIHJlY3RhbmdsZV9udWtlZF9wIDogMTsK KworICAgIGJvb2xfYmYgYmFja2dyb3VuZF9udWtlZF9wIDogMTsKKworICAgIGVudW0gZHJhd19n bHlwaF9hY3Rpb24KKyAgICB7CisgICAgICBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAgICAgIE1D X0VSQVNFX0dMWVBIX1NUUklORworICAgIH0gYWN0aW9uX3R5cGU7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKICAgLyogWC1vcmlnaW4gb2YgdGhlIHN0cmluZy4gICovCiAgIGludCB4 OwogCkBAIC0yODM0LDYgKzI5OTYsMjkgQEAgdHlwZWRlZiB2b2lkICgqZnJhbWVfcGFybV9oYW5k bGVyKSAoc3RydWN0IGZyYW1lICosIExpc3BfT2JqZWN0LCBMaXNwX09iamVjdCk7CiAKIHN0cnVj dCByZWRpc3BsYXlfaW50ZXJmYWNlCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgbnN0 ZXJtLm1gIHwgYHczMnRlcm0uY2AgfCBgeHRlcm0uY2AgbXVzdCBiZSBpbiB0aGUKK2V4YWN0IHNh bWUgb3JkZXIgYXMgdGhlIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgZGlzcGV4dGVybi5oYCEg Ki8KKworICAvKiBgbWNfbnNfZHJhd193aW5kb3dfY3Vyc29yJyB8IGBtY193MzJfZHJhd193aW5k b3dfY3Vyc29yJyB8IGBtY194X2RyYXdfd2luZG93X2N1cnNvcicgKi8KKyAgdm9pZCAoKm1jX3Nj cmliZV9jdXJzb3IpIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRy aXgsCisgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKmdseXBoX3JvdywgaW50IHgsIGludCBmeCwg aW50IHksIGludCBmeSwgaW50IGhwb3MsCisgICAgICAgIGludCB2cG9zLCBpbnQgd2QsIGludCBo LCBzdHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwKKyAg ICAgICAgaW50IGN1cnNvcl93aWR0aCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLCBib29s IG9uX3AsIGJvb2wgYWN0aXZlX3ApOworCisgIC8qIGBtY19uc19kcmF3X2dseXBoX3N0cmluZycg fCBgbWNfdzMyX2RyYXdfZ2x5cGhfc3RyaW5nJyB8IGBtY194X2RyYXdfZ2x5cGhfc3RyaW5nJyAq LworICB2b2lkICgqbWNfc2NyaWJlX3N0cmluZykgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0 cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwKKyAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93 LCBzdHJ1Y3QgbWNfbWF0cml4IG1jX21hdHJpeCwgc3RydWN0IG1jX1JHQiBsc2wsCisgICAgICAg IGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3Jf dHlwZSwgaW50IHdkLAorICAgICAgICBib29sIGFjdGl2ZV9wLCBib29sIGN1cnNvcl9nY19wKTsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBIYW5kbGVycyBmb3Igc2V0dGlu ZyBmcmFtZSBwYXJhbWV0ZXJzLiAgKi8KICAgZnJhbWVfcGFybV9oYW5kbGVyICpmcmFtZV9wYXJt X2hhbmRsZXJzOwogCmRpZmYgLS1naXQgYS9zcmMvZGlzcG5ldy5jIGIvc3JjL2Rpc3BuZXcuYwpp bmRleCAwMTMxYjYzLi5iNzUzMmE5IDEwMDY0NAotLS0gYS9zcmMvZGlzcG5ldy5jCisrKyBiL3Ny Yy9kaXNwbmV3LmMKQEAgLTU2LDYgKzU2LDE3ODggQEAgYWxvbmcgd2l0aCBHTlUgRW1hY3MuICBJ ZiBub3QsIHNlZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LiAgKi8KICNpbmNsdWRl ICJ3MzIuaCIKICNlbmRpZgogDAorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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50cnktPm5leHQ7CisgIGlmIChlbnRyeSA9 PSBOVUxMKQorICAgIHsKKyAgICAgIGVudHJ5ID0gbWNfcm93X2VudHJ5X3Bvb2wgKyBtY19yb3df ZW50cnlfaWR4Kys7CisgICAgICBlbnRyeS0+cm93ID0gcm93OworICAgICAgZW50cnktPm9sZF91 c2VzID0gZW50cnktPm5ld191c2VzID0gMDsKKyAgICAgIGVudHJ5LT5uZXdfbGluZV9udW1iZXIg PSAwOworICAgICAgZW50cnktPmJ1Y2tldCA9IGk7CisgICAgICBlbnRyeS0+bmV4dCA9IG1jX3Jv d190YWJsZVtpXTsKKyAgICAgIG1jX3Jvd190YWJsZVtpXSA9IGVudHJ5OworICAgIH0KKyAgcmV0 dXJuIGVudHJ5OworfQorCitzdHJ1Y3QgbWNfbWF0cml4CittY19zYXZlX2NhY2hlX21hdHJpeCAo c3RydWN0IG1jX21hdHJpeCBtYXRyaXgpCit7CisgIHN0cnVjdCBtY19tYXRyaXggc2F2ZWQ7Cisg IHNhdmVkLnZwb3NfYWxsb2NhdGVkID0gbWF0cml4LnZwb3NfYWxsb2NhdGVkOworICBzYXZlZC52 cG9zX3VzZWQgPSBtYXRyaXgudnBvc191c2VkOworICBzYXZlZC52cG9zID0geHphbGxvYyAoc2F2 ZWQudnBvc19hbGxvY2F0ZWQgKiBzaXplb2YgKnNhdmVkLnZwb3MpOworICBmb3IgKGVudW0gbWNf Y2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgY2FjaGVfdHlwZSA8IE5P X0NBQ0hFOworICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICBzYXZlZC5jdXJzb3JzX3VzZWRbY2Fj aGVfdHlwZV0gPSBtYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOworICBmb3IgKGludCB2 bnRoID0gMDsgdm50aCA8IG1hdHJpeC52cG9zX2FsbG9jYXRlZDsgKyt2bnRoKQorICAgIHsKKyAg ICAgIGZvciAoZW51bS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3QgcmVkaXNwbGF5X2ludGVyZmFjZSAqcmlm ID0gRlJBTUVfUklGIChYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpKTsKKyAgLyogU2tpcCBvdmVy IHJvd3MgZXF1YWwgYXQgdGhlIHN0YXJ0LiAqLworICBmb3IgKGkgPSBoZWFkZXJfbGluZV9wOyBp IDwgY3VycmVudF9tYXRyaXgtPm5yb3dzIC0gMTsgKytpKQorICAgIHsKKyAgICAgIHN0cnVjdCBn bHlwaF9yb3cgKmQgPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSk7CisgICAgICBzdHJ1 Y3QgZ2x5cGhfcm93ICpjID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkpOworICAgICAg aWYgKGMtPmVuYWJsZWRfcAorICAgICAgICAgICYmIGQtPmVuYWJsZWRfcAorICAgICAgICAgICYm ICFkLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcAorICAgICAgICAgICYmIGMtPnkgPT0gZC0+eQor ICAgICAgICAgICYmIE1BVFJJWF9ST1dfQk9UVE9NX1kgKGMpIDw9IHliCisgICAgICAgICAgJiYg TUFUUklYX1JPV19CT1RUT01fWSAoZCkgPD0geWIKKyAgICAgICAgICAmJiByb3dfZXF1YWxfcCAo YywgZCwgMSkpCisgICAgICAgIHsKKyAgICAgICAgICBhc3NpZ25fcm93IChjLCBkKTsKKyAgICAg ICAgICBkLT5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAg ICAgICAgYnJlYWs7CisgICAgfQorI2lmZGVmIEhBVkVfWFdJREdFVFMKKyAgLyogQ3VycmVudGx5 IHRoaXMgc2VlbXMgbmVlZGVkIHRvIGRldGVjdCB4d2lkZ2V0IG1vdmVtZW50IHJlbGlhYmx5LiAq LworICAgIHJldHVybiAwOworI2VuZGlmCisgIC8qIEdpdmUgdXAgaWYgc29tZSByb3dzIGluIHRo ZSBkZXNpcmVkIG1hdHJp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HBhcnQgb2YgdGhlIGRp c3BsYXkgZXZlbiBpZgorICAgICBvdGhlciBwYXJ0cyBhcmUgZGlzYWJsZWQuICovCisgIGkgPSBm aXJzdF9vbGQgKyAxOworICB3aGlsZSAoaSA8IGN1cnJlbnRfbWF0cml4LT5ucm93cyAtIDEpCisg ICAgeworICAgICAgaW50IGJvdHRvbSA9IE1BVFJJWF9ST1dfQk9UVE9NX1kgKE1BVFJJWF9ST1cg KGN1cnJlbnRfbWF0cml4LCBpKSk7CisgICAgICBpZiAoYm90dG9tIDw9IHliKQorICAgICAgICAr K2k7CisgICAgICBpZiAoYm90dG9tID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisgIGxh c3Rfb2xkID0gaTsKKyAgLyogU2tpcCBvdmVyIHJvd3MgZXF1YWwgYXQgdGhlIGJvdHRvbS4gKi8K KyAgaSA9IGxhc3RfbmV3OworICBqID0gbGFzdF9vbGQ7CisgIHdoaWxlIChpIC0gMSA+IGZpcnN0 X25ldworICAgICAgICAgJiYgaiAtIDEgPiBmaXJzdF9vbGQKKyAgICAgICAgICYmIE1BVFJJWF9S T1dfRU5BQkxFRF9QIChjdXJyZW50X21hdHJpeCwgaiAtIDEpCisgICAgICAgICAmJiAoTUFUUklY X1JPVyAoY3VycmVudF9tYXRyaXgsIGogLSAxKS0+eQorICAgICAgICAgICAgID09IE1BVFJJWF9S T1cgKGRlc2lyZWRfbWF0cml4LCBpIC0gMSktPnkpCisgICAgICAgICAmJiAhTUFUUklYX1JPVyAo ZGVzaXJlZF9tYXRyaXgsIGkgLSAxKS0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AKKyAgICAgICAg ICYmIHJvd19lcXVhbF9wIChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSAtIDEpLAorICAg ICAgICAgICAgICAgICAgICAgICAgIE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBqIC0gMSks IDEpKQorICAgIC0taSwgLS1qOworICBsYXN0X25ldyA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g ICAgLSBuZXh0X2FsbW9zdF9wcmltZV9pbmNyZW1lbnRfbWF4KTsKKyAgICBwdHJkaWZmX3QgY3Vy cmVudF9ucm93c19tYXggPSByb3dfdGFibGVfbWF4IC0gZGVzaXJlZF9tYXRyaXgtPm5yb3dzOwor ICAgIGlmIChjdXJyZW50X25yb3dzX21heCA8IGN1cnJlbnRfbWF0cml4LT5ucm93cykKKyAgICAg IG1lbW9yeV9mdWxsIChTSVpFX01BWCk7CisgIH0KKyAgLyogUmVhbGxvY2F0ZSB2ZWN0b3JzLCB0 YWJsZXMgZXRjLiBpZiBuZWNlc3NhcnkuICovCisgIGlmIChjdXJyZW50X21hdHJpeC0+bnJvd3Mg PiBtY19vbGRfbGluZXNfc2l6ZSkKKyAgICBtY19vbGRfbGluZXMgPSB4cGFsbG9jIChtY19vbGRf bGluZXMsICZtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJy ZW50X21hdHJpeC0+bnJvd3MgLSBtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX29sZF9saW5lcyk7CisgIGlmIChkZXNpcmVkX21h dHJpeC0+bnJvd3MgPiBtY19uZXdfbGluZXNfc2l6ZSkKKyAgICBtY19uZXdfbGluZXMgPSB4cGFs bG9jIChtY19uZXdfbGluZXMsICZtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICBkZXNpcmVkX21hdHJpeC0+bnJvd3MgLSBtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX25ld19saW5lcyk7CisgIG4g PSBkZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgIG4gKz0gY3VycmVudF9tYXRyaXgtPm5yb3dzOwor ICBpZiAobWNfcm93X3RhYmxlX3NpemUgPCAzICogbikKKyAgICB7CisgICAgICBwdHJkaWZmX3Qg c2l6ZSA9IG5leHRfYWxtb3N0X3ByaW1lICgzICogbik7CisgICAgICBtY19yb3dfdGFibGUgPSB4 bnJlYWxsb2MgKG1jX3Jvd190YWJsZSwgc2l6ZSwgc2l6ZW9mICptY19yb3dfdGFibGUpOworICAg ICAgbWNfcm93X3RhYmxlX3NpemUgPSBzaXplOworICAgICAgbWVtc2V0IChtY19yb3dfdGFibGUs IDAsIHNpemUgKiBzaXplb2YgKm1jX3Jvd190YWJsZSk7CisgICAgfQorICBpZiAobiA+IG1jX3Jv d19lbnRyeV9wb29sX3NpemUpCisgICAgbWNfcm93X2VudHJ5X3Bvb2wgPSB4cGFsbG9jIChtY19y b3dfZW50cnlfcG9vbCwgJm1jX3Jvd19lbnRyeV9wb29sX3NpemUsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBuIC0gbWNfcm93X2VudHJ5X3Bvb2xfc2l6ZSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC0xLCBzaXplb2YgKm1jX3Jvd19lbnRyeV9wb29sKTsKKyAgaWYgKGRl c2lyZWRfbWF0cml4LT5ucm93cyA+IG1jX3J1bnNfc2l6ZSkKKyAgICB7CisgICAgICBtY19ydW5z ID0geG5yZWFsbG9jIChtY19ydW5zLCBkZXNpcmVkX21hdHJpeC0+bnJvd3MsIHNpemVvZiAqbWNf cnVucyk7CisgICAgICBtY19ydW5fcG9vbCA9IHhucmVhbGxvYyAobWNfcnVuX3Bvb2wsIGRlc2ly ZWRfbWF0cml4LT5ucm93cywgc2l6ZW9mICptY19ydW5fcG9vbCk7CisgICAgICBtY19ydW5zX3Np emUgPSBkZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgICAgfQorICBucnVucyA9IHJ1bl9pZHggPSAw OworICBtY19yb3dfZW50cnlfaWR4ID0gMDsKKyAgLyogQWRkIHJvd3MgZnJvbSB0aGUgY3VycmVu dCBhbmQgZGVzaXJlZCBtYXRyaXggdG8gdGhlIGhhc2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W2ldLT5vbGRfdXNlcyA9PSAxCisgICAgICAgICYmIG1jX29sZF9saW5lc1tpXS0+ bmV3X3VzZXMgPT0gMSkKKyAgICAgIHsKKyAgICAgICAgaW50IHAsIHE7CisgICAgICAgIGludCBu ZXdfbGluZSA9IG1jX29sZF9saW5lc1tpXS0+bmV3X2xpbmVfbnVtYmVyOworICAgICAgICBzdHJ1 Y3QgcnVuICpydW4gPSBtY19ydW5fcG9vbCArIHJ1bl9pZHgrKzsKKyAgICAgICAgLyogUmVjb3Jk IG1vdmUuICovCisgICAgICAgIHJ1bi0+Y3VycmVudF92cG9zID0gaTsKKyAgICAgICAgcnVuLT5j dXJyZW50X3kgPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaSktPnk7CisgICAgICAgIHJ1 bi0+ZGVzaXJlZF92cG9zID0gbmV3X2xpbmU7CisgICAgICAgIHJ1bi0+ZGVzaXJlZF95ID0gTUFU UklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIG5ld19saW5lKS0+eTsKKyAgICAgICAgcnVuLT5ucm93 cyA9IDE7CisgICAgICAgIHJ1bi0+aGVpZ2h0ID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgs IGkpLT5oZWlnaHQ7CisgICAgICAgIC8qIEV4dGVuZCBiYWNrd2FyZC4gKi8KKyAgICAgICAgcCA9 IGkgLSAxOworICAgICAgICBxID0gbmV3X2xpbmUgLSAxOworICAgICAgICB3aGlsZSAocCA+IGZp cnN0X29sZAorICAgICAgICAgICAgICAgJiYgcSA+IGZpcnN0X25ldworICAgICAgICAgICAgICAg JiYgbWNfb2xkX2xpbmVzW3BdID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAg ICAgICAgICBpbnQgaCA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0Owor ICAgICAgICAgICAgLS1ydW4tPmN1cnJlbnRfdnBvczsKKyAgICAgICAgICAgIC0tcnVuLT5kZXNp cmVkX3Zwb3M7CisgICAgICAgICAgICArK3J1bi0+bnJvd3M7CisgICAgICAgICAgICBydW4tPmhl aWdodCArPSBoOworICAgICAgICAgICAgcnVuLT5kZXNpcmVkX3kgLT0gaDsKKyAgICAgICAgICAg IHJ1bi0+Y3VycmVudF95IC09IGg7CisgICAgICAgICAgICAtLXAsIC0tcTsKKyAgICAgICAgICB9 CisgICAgICAgIC8qIEV4dGVuZCBmb3J3YXJkLiAqLworICAgICAgICBwID0gaSArIDE7CisgICAg ICAgIHEgPSBuZXdfbGluZSArIDE7CisgICAgICAgIHdoaWxlIChwIDwgbGFzdF9vbGQKKyAgICAg ICAgICAgICAgICYmIHEgPCBsYXN0X25ldworICAgICAgICAgICAgICAgJiYgbWNfb2xkX2xpbmVz W3BdID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgaCA9 IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0OworICAgICAgICAgICAgKyty dW4tPm5yb3dzOworICAgICAgICAgICAgcnVuLT5oZWlnaHQgKz0gaDsKKyAgICAgICAgICAgICsr cCwgKytxOworICAgICAgICAgIH0KKyAgICAgICAgLyogSW5zZXJ0IHJ1biBpbnRvIGxpc3Qgb2Yg YWxsIHJ1bnMuICBPcmRlciBydW5zIGJ5IGNvcGllZAorICAgICAgICAgICBwaXhlbCBsaW5lcy4g IE5vdGUgdGhhdCB3ZSByZWNvcmQgcnVucyB0aGF0IGRvbid0IGhhdmUgdG8KKyAgICAgICAgICAg YmUgY29waWVkIGJlY2F1c2UgdGhleSBhcmUgYWxyZWFkeSBpbiBwbGFjZS4gIFRoaXMgaXMgZG9u ZQorICAgICAgICAgICBiZWNhdXNlIHdlIGNhbiBhdm9pZCBjYWxsaW5nIHVwZGF0ZV93aW5kb3df bGluZSBpbiB0aGlzCisgICAgICAgICAgIGNhc2UuICovCisgICAgICAgIGZvciAocCA9IDA7IHAg PCBucnVucyAmJiBtY19ydW5zW3BdLT5oZWlnaHQgPiBydW4tPmhlaWdodDsgKytwKQorICAgICAg ICAgIDsKKyAgICAgICAgZm9yIChxID0gbnJ1bnM7IHEgPiBwOyAtLXEpCisgICAgICAgICAgbWNf cnVuc1txXSA9IG1jX3J1bnNbcSAtIDFdOworICAgICAgICBtY19ydW5zW3BdID0gcnVuOworICAg ICAgICArK25ydW5zOworICAgICAgICBpICs9IHJ1bi0+bnJvd3M7CisgICAgICB9CisgICAgICBl bHNlCisgICAgICAgICsraTsKKyAgLyogRG8gdGhlIG1vdmVzLiAgRG8gaXQgaW4gYSB3YXkgdGhh dCB3ZSBkb24ndCBvdmVyd3JpdGUgc29tZXRoaW5nCisgICAgIHdlIHdhbnQgdG8gY29weSBsYXRl ciBvbi4gIFRoaXMgaXMgbm90IHNvbHZhYmxlIGluIGdlbmVyYWwKKyAgICAgYmVjYXVzZSB0aGVy ZSBpcyBvbmx5IG9uZSBkaXNwbGF5IGFuZCB3ZSBkb24ndCBoYXZlIGEgd2F5IHRvCisgICAgIGV4 Y2hhbmdlIGFyZWFzIG9uIHRoaXMgZGlzcGxheS4gIEV4YW1wbGU6CisgICAgICAgICAgKy0tLS0t LS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgfCAgICAgQSAgICAgfCAgICAg ICB8ICAgICBCICAgICB8CisgICAgICAgICAgKy0tLS0tLS0tLS0tKyAgLS0+ICArLS0tLS0tLS0t LS0rCisgICAgICAgICAgfCAgICAgQiAgICAgfCAgICAgICB8ICAgICBBICAgICB8CisgICAgICAg ICAgKy0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgIEluc3RlYWQsIHByZWZl ciBiaWdnZXIgbW92ZXMsIGFuZCBpbnZhbGlkYXRlIG1vdmVzIHRoYXQgd291bGQKKyAgICAgY29w eSBmcm9tIHdoZXJlIHdlIGNvcGllZCB0by4gKi8KKyAgZm9yIChpID0gMDsgaSA8IG5ydW5zOyAr K2kpCisgICAgaWYgKG1jX3J1bnNbaV0tPm5yb3dzID4gMCkKKyAgICAgIHsKKyAgICAgICAgc3Ry dWN0IHJ1biAqciA9IG1jX3J1bnNbaV07CisgICAgICAgIGlmIChyLT5jdXJyZW50X3kgIT0gci0+ ZGVzaXJlZF95KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vICBmcHJpbnRmIChzdGRlcnIs ICIlczogIHItPmN1cnJlbnQvZGVzaXJlZF92cG9zICglZC8lZCkgfCByLT5jdXJyZW50L2Rlc2ly ZWRfeSAoJWQvJWQpXG4iLAorICAgICAgICAgICAgLy8gICAgICAgICAgIHItPmN1cnJlbnRfeSA8 IHItPmRlc2lyZWRfeSA/ICLihpMiIDogIuKGkSIsCisgICAgICAgICAgICAvLyAgICAgICAgICAg ci0+Y3VycmVudF92cG9zLCByLT5kZXNpcmVkX3Zwb3MsIHItPmN1cnJlbnRfeSwgci0+ZGVzaXJl ZF95KTsKKyAgICAgICAgICAgIC8vICByaWYtPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsK KyAgICAgICAgICAgIC8vICByaWYtPnNjcm9sbF9ydW5faG9vayAodywgcik7CisgICAgICAgICAg fQorICAgICAgICAvKiBUcnVuY2F0ZSBydW5zIHRoYXQgY29weSB0byB3aGVyZSB3ZSBjb3BpZWQg dG8sIGFuZAorICAgICAgICAgICBpbnZhbGlkYXRlIHJ1bnMgdGhhdCBjb3B5IGZyb20gd2hlcmUg d2UgY29waWVkIHRvLiAqLworICAgICAgICBmb3IgKGogPSBucnVucyAtIDE7IGogPiBpOyAtLWop CisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0IHJ1biAqcCA9IG1jX3J1bnNbal07Cisg ICAgICAgICAgICBib29sIHRydW5jYXRlZF9wID0gMDsKKyAgICAgICAgICAgIGlmIChwLT5ucm93 cyA+IDAKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgPCByLT5kZXNpcmVkX3kgKyBy LT5oZWlnaHQKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgKyBwLT5oZWlnaHQgPiBy LT5kZXNpcmVkX3kpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAocC0+ZGVz aXJlZF95IDwgci0+ZGVzaXJlZF95KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBwLT5ucm93cyA9IHItPmRlc2lyZWRfdnBvcyAtIHAtPmRlc2lyZWRfdnBvczsKKyAg ICAgICAgICAgICAgICAgICAgcC0+aGVpZ2h0ID0gci0+ZGVzaXJlZF95IC0gcC0+ZGVzaXJlZF95 OworICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZWRfcCA9IDE7CisgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICBpbnQgbnJvd3NfY29waWVkID0gKHItPmRlc2lyZWRfdnBvcyArIHItPm5yb3dz CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwLT5kZXNpcmVkX3Zw b3MpOworICAgICAgICAgICAgICAgICAgICBpZiAocC0+bnJvd3MgPD0gbnJvd3NfY29waWVkKQor ICAgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzID0gMDsKKyAgICAgICAgICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAg ICAgIGludCBoZWlnaHRfY29waWVkID0gKHItPmRlc2lyZWRfeSArIHItPmhlaWdodAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHAtPmRlc2lyZWRfeSk7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmN1cnJlbnRfdnBvcyArPSBucm93c19jb3Bp ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfdnBvcyArPSBucm93c19j b3BpZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzIC09IG5yb3dzX2NvcGll ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+Y3VycmVudF95ICs9IGhlaWdodF9jb3Bp ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfeSArPSBoZWlnaHRfY29w aWVkOworICAgICAgICAgICAgICAgICAgICAgICAgICBwLT5oZWlnaHQgLT0gaGVpZ2h0X2NvcGll ZDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGVkX3AgPSAxOworICAgICAgICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICBpZiAoci0+Y3VycmVudF95ICE9IHItPmRlc2lyZWRfeQorICAgICAgICAgICAg ICAgIC8qIFRoZSBjb25kaXRpb24gYmVsb3cgaXMgZXF1aXZhbGVudCB0bworICAgICAgICAgICAg ICAgICAgICgocC0+Y3VycmVudF95ID49IHItPmRlc2lyZWRfeQorICAgICAgICAgICAgICAgICAg ICAgJiYgcC0+Y3VycmVudF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KQorICAgICAgICAg ICAgICAgICAgICB8fCAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJlZF95Cisg ICAgICAgICAgICAgICAgICAgICAgICAmJiAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPD0gci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KSkpCisg ICAgICAgICAgICAgICAgICAgYmVjYXVzZSB3ZSBoYXZlIDAgPCBwLT5oZWlnaHQgPD0gci0+aGVp Z2h0LiAqLworICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSA8IHItPmRlc2lyZWRfeSAr IHItPmhlaWdodAorICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSArIHAtPmhlaWdodCA+ IHItPmRlc2lyZWRfeSkKKyAgICAgICAgICAgICAgcC0+bnJvd3MgPSAwOworICAgICAgICAgICAg LyogUmVvcmRlciBydW5zIGJ5IGNvcGllZCBwaXhlbCBsaW5lcyBpZiB0cnVuY2F0ZWQuICovCisg ICAgICAgICAgICBpZiAodHJ1bmNhdGVkX3AgJiYgcC0+bnJvd3MgPiAwKQorICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgaW50IGsgPSBucnVucyAtIDE7CisgICAgICAgICAgICAgICAg d2hpbGUgKG1jX3J1bnNba10tPm5yb3dzID09IDAgfHwgbWNfcnVuc1trXS0+aGVpZ2h0IDwgcC0+ aGVpZ2h0KQorICAgICAgICAgICAgICAgICAgay0tOworICAgICAgICAgICAgICAgIG1lbW1vdmUg KG1jX3J1bnMgKyBqLCBtY19ydW5zICsgaiArIDEsIChrIC0gaikgKiBzaXplb2YgKCptY19ydW5z KSk7CisgICAgICAgICAgICAgICAgbWNfcnVuc1trXSA9IHA7CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgICB9CisgICAgICAgIC8qIEFzc2lnbiBtYXRyaXggcm93cy4gKi8KKyAgICAgICAgZm9y IChqID0gMDsgaiA8IHItPm5yb3dzOyArK2opCisgICAgICAgICAgeworICAgICAgICAgICAgc3Ry dWN0IGdseXBoX3JvdyAqZnJvbSwgKnRvOworICAgICAgICAgICAgYm9vbCB0b19vdmVybGFwcGVk X3A7CisgICAgICAgICAgICB0byA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCByLT5kZXNp cmVkX3Zwb3MgKyBqKTsKKyAgICAgICAgICAgIGZyb20gPSBNQVRSSVhfUk9XIChkZXNpcmVkX21h dHJpeCwgci0+ZGVzaXJlZF92cG9zICsgaik7CisgICAgICAgICAgICB0b19vdmVybGFwcGVkX3Ag PSB0by0+b3ZlcmxhcHBlZF9wOworICAgICAgICAgICAgZnJvbS0+cmVkcmF3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2J5dGVwb3MgPSAodnBvcyAhPSAwKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9ST1dfU1RBUlRfQllURVBPUyAo Y3VycmVudF9yb3cgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IC0xOworICBpbnQgcHJldl9tYXRyaXhfcm93X2VuZF9ieXRlcG9zID0gKHZwb3MgIT0gMCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPV19FTkRfQllURVBP UyAoY3VycmVudF9yb3cgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAtMTsKKyAgaW50IG1hdHJpeF9yb3dfc3RhcnRfYnl0ZXBvcyA9IE1BVFJJWF9ST1dfU1RBUlRf QllURVBPUyAoZGVzaXJlZF9yb3cpOworICBpbnQgbWF0cml4X3Jvd19lbmRfYnl0ZXBvcyA9IE1B VFJJWF9ST1dfRU5EX0JZVEVQT1MgKGRlc2lyZWRfcm93KTsKKyAgLyogVGhlIGZpcnN0IGNvbmRp dGlvbiB0ZXN0cyBmb3IgYSBzb2xpdGFyeSByb3cgY29udGFpbmluZyBaViwgcHJlY2VkZWQgYnkg YQorICByb3cgY29udGFpbmluZyBhIHBlbnVsdGltYXRlIGdseXBoIHdpdGggYSBjaGFycG9zIG9m IFpWIC0gMSBmb2xsb3dlZCBieSBhbiBlbmQKKyAgb2Ygcm93IHNwYWNlIGdseXBoIHdpdGggYSBj aGFycG9zIG9mIDAuICBUaGUgb3RoZXIgY29uZGl0aW9ucyB0ZXN0IGZvciBhbiBlbXB0eQorICBi dWZmZXIgKG5vdCBuYXJyb3dlZCksIG9yIGFuIGVtcHR5IG5hcnJvd2VkIGJ1ZmZlci4gKi8KKyAg Ym9vbCByb3dfYXRfenZfcCA9ICgodnBvcyAhPSAwCisgICAgICAgICAgICAgICAgICAgICAgICYm IChjdXJyZW50X3JvdyAtIDEpLT51c2VkW1RFWFRfQVJFQV0gPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICYmIHByZXZfbWF0cml4X3Jvd19zdGFydF9ieXRlcG9zICE9IHByZXZfbWF0cml4X3Jv d19lbmRfYnl0ZXBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiAhKGN1cnJlbnRfcm93IC0g MSktPmVuZHNfYXRfenZfcAorICAgICAgICAgICAgICAgICAgICAgICAmJiBtYXRyaXhfcm93X3N0 YXJ0X2J5dGVwb3MgPT0gbWF0cml4X3Jvd19lbmRfYnl0ZXBvcworICAgICAgICAgICAgICAgICAg ICAgICAmJiBkZXNpcmVkX3Jvdy0+ZW5kc19hdF96dl9wKQorICAgICAgICAgICAgICAgICAgICAg IHx8ICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA9PSAxKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwICYmIHZwb3MgPT0gMCkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGJ1ZmZlcl9uYXJyb3dlZF9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGJvYl9yZXNwZWN0X25hcnJvdyA9PSBlb2JfcmVzcGVjdF9u YXJyb3cpCisgICAgICAgICAgICAgICAgICAgICAgfHwgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4g MCAmJiB2cG9zID09IDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAoaGVhZGVyX2xp bmVfZm9ybWF0ID09IDAgJiYgdnBvcyA9PSAwKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgYm9iX2Rpc3JlZ2FyZF9uYXJyb3cgPT0gZW9iX2Rpc3JlZ2FyZF9uYXJyb3cpKTsKKyAgLyog SWYgbGluZS1udW1iZXJzIGFyZSBhY3RpdmUsIHRoZW4gc3BhY2UgZ2x5cGggcGFkZGluZyBlcXVh bCB0byBpdHMgd2lkdGg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gYGRlc2lyZWRfcm93 YCB0byBiZSBhY2N1cmF0ZS4gKi8KKyAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0aW9u ID0gIG1jX3Jvd19wb3NpdGlvbiAodywgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGRlc2ly ZWRfcm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogY3VycmVudF9yb3csCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2lyZWRfcm93LCB2cG9zKTsKKyAgLyogSWYgcm93 cyBhcmUgYXQgZGlmZmVyZW50IFggb3IgWSwgb3Igcm93cyBoYXZlIGRpZmZlcmVudCBoZWlnaHQs CisgICAgIG9yIHRoZSBjdXJyZW50IHJvdyBpcyBtYXJrZWQgaW52YWxpZCwgd3JpdGUgdGhlIGVu dGlyZSBsaW5lLiAqLworICBpZiAoIWN1cnJlbnRfcm93LT5lbmFibGVkX3AKKyAgICAgIHx8IGRl c2lyZWRfcm93LT55ICE9IGN1cnJlbnRfcm93LT55CisgICAgICB8fCBkZXNpcmVkX3Jvdy0+YXNj ZW50ICE9IGN1cnJlbnRfcm93LT5hc2NlbnQKKyAgICAgIHx8IGRlc2lyZWRfcm93LT5waHlzX2Fz Y2VudCAhPSBjdXJyZW50X3Jvdy0+cGh5c19hc2NlbnQKKyAgICAgIHx8IGRlc2lyZWRfcm93LT5w aHlzX2hlaWdodCAhPSBjdXJyZW50X3Jvdy0+cGh5c19oZWlnaHQKKyAgICAgIHx8IGRlc2lyZWRf cm93LT52aXNpYmxlX2hlaWdodCAhPSBjdXJyZW50X3Jvdy0+dmlzaWJsZV9oZWlnaHQKKyAgICAg IHx8IGN1cnJlbnRfcm93LT5vdmVybGFwcGVkX3AKKyAgICAgI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b19zdHJp bmcgKGRlc2lyZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXS0+dS5jaCksCisgICAgICAgICAgZGVz aXJlZF9yb3ctPngsIDAsIGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsKKyAgICAg IGlmIChkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAgICB7CisgICAgICAgICAg YmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgaW50IGxlbiA9IGRlc2lyZWRfcm93LT51c2VkW1RF WFRfQVJFQV07CisgICAgICAgICAgaW50IGhwb3MgPSBkZXNpcmVkX3Jvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gLSB1cGRhdGVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgdy0+b3V0 cHV0X2N1cnNvci54ID0KKyAgICAgICAgICAgIG1jX2RyYXdfZ2x5cGhzICh3LCBkZXNpcmVkX21h dHJpeCwgdXBkYXRlZF9yb3csIHctPm1jX21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICB3LT5vdXRwdXRfY3Vyc29yLngsIFRFWFRfQVJFQSwgaHBvcywgaHBvcyArIGxlbiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXX05PUk1BTF9URVhULCAwLCB2cG9zLCBsc2ws IGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwg d2QsIGVzc2VudGlhbHMuYWN0aXZlX3AsIGN1cnNvcl9nY19wLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgIE1DX0RSQVdfR0xZUEhfU1RSSU5HLCBkcmF3X3ApOworICAgICAgICAgIHctPm91 dHB1dF9jdXJzb3IuaHBvcyArPSBsZW47CisgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAg ICAgICAgfQorICAgICAgLyogQ2xlYXIgdG8gZW5kIG9mIHdpbmRvdy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VzZWRbVEVYVF9BUkVBXQorICAgICAg ICAgICAgICAgIHx8IChkZXNpcmVkX3N0b3BfcG9zID09IGN1cnJlbnRfcm93LT51c2VkW1RFWFRf QVJFQV0KKyAgICAgICAgICAgICAgICAgICAgJiYgIU1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1Ag KGN1cnJlbnRfcm93KSkpKQorICAgICAgICAgIC0tZGVzaXJlZF9zdG9wX3BvczsKKyAgICAgICAg c3RvcCA9IG1pbiAoY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgZGVzaXJlZF9zdG9wX3Bv cyk7CisgICAgICAgIGkgPSAwOworICAgICAgICB4ID0gZGVzaXJlZF9yb3ctPng7CisgICAgICAg IGludCBjbGVhcl90b194ID0gMDsKKworICAgICAgICAvKiBMb29wIG92ZXIgZ2x5cGhzIHRoYXQg Y3VycmVudCBhbmQgZGVzaXJlZCByb3cgbWF5IGhhdmUgaW4gY29tbW9uLiAqLworICAgICAgICB3 aGlsZSAoaSA8IHN0b3ApCisgICAgICAgICAgeworICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3Nr aXBwZWQudXNlZCA9IDA7CisgICAgICAgICAgICBib29sIGNhbl9za2lwX3AgPSAhYWJvcnRfc2tp cHBpbmc7CisgICAgICAgICAgICAvKiBTa2lwIG92ZXIgZ2x5cGhzIHRoYXQgYm90aCByb3dzIGhh dmUgaW4gY29tbW9uLiAgVGhlc2UgZG9uJ3QgaGF2ZQorICAgICAgICAgICAgdG8gYmUgd3JpdHRl bi4gIFdlIGNhbid0IHNraXAgaWYgdGhlIGxhc3QgY3VycmVudCBnbHlwaCBvdmVybGFwcyB0aGUK KyAgICAgICAgICAgIGdseXBoIHRvIGl0cyByaWdodC4gIEZvciBleGFtcGxlLCBjb25zaWRlciBh IGN1cnJlbnQgcm93IG9mIGBpZicgd2l0aAorICAgICAgICAgICAgdGhlIGBmJyBpbiBDb3VyaWVy IGJvbGQgc28gdGhhdCBpdCBvdmVybGFwcyB0aGUgYCAnIHRvIGl0cyByaWdodC4KKyAgICAgICAg ICAgIElmIHRoZSBkZXNpcmVkIHJvdyBpcyBgICcsIHdlIHdvdWxkIHNraXAgb3ZlciB0aGUgc3Bh Y2UgYWZ0ZXIgdGhlCisgICAgICAgICAgICBgaWYnIGFuZCB0aGVyZSB3b3VsZCByZW1haW4gYSBw aXhlbCBmcm9tIHRoZSBgZicgb24gdGhlIHNjcmVlbi4gKi8KKyAgICAgICAgICAgIGlmIChvdmVy bGFwcGluZ19nbHlwaHNfcCAmJiBpID4gMCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSAmY3VycmVudF9yb3ctPmdseXBoc1tURVhUX0FSRUFd W2kgLSAxXTsKKyAgICAgICAgICAgICAgICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAgICAgICAg ICAgcmlmLT5nZXRfZ2x5cGhfb3ZlcmhhbmdzIChnbHlwaCwgWEZSQU1FICh3LT5mcmFtZSksICZs ZWZ0LCAmcmlnaHQpOworICAgICAgICAgICAgICAgIGNhbl9za2lwX3AgPSAocmlnaHQgPT0gMCAm JiAhYWJvcnRfc2tpcHBpbmcpOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoY2Fu X3NraXBfcCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBzdGFydF9ocG9z ID0gaTsKKyAgICAgICAgICAgICAgICB3aGlsZSAoaSA8IHN0b3AKKyAgICAgICAgICAgICAgICAg ICAgICAgJiYgR0xZUEhfRVFVQUxfUCAoZGVzaXJlZF9nbHlwaCwgY3VycmVudF9nbHlwaCkpCisg ICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICsrYXJyYXlfZ2x5cGhzX3Nr aXBwZWQudXNlZDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFycmF5X2dseXBoc19za2lwcGVk LmFsbG9jYXRlZCA8IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQpCisgICAgICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgaW50IG9sZF9hbGxvYyA9IGFycmF5X2ds eXBoc19za2lwcGVkLmFsbG9jYXRlZDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBuZXdf ZWx0cyA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSBhcnJheV9nbHlwaHNfc2tpcHBlZC5h bGxvY2F0ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5z a2lwcGVkID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgeHBhbGxvYyAoYXJyYXlfZ2x5cGhz X3NraXBwZWQuc2tpcHBlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmFy cmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbmV3X2VsdHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElO VF9NQVgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAqYXJyYXlf Z2x5cGhzX3NraXBwZWQuc2tpcHBlZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQg KGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWQgKyBvbGRfYWxsb2MsIDAsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkIC0g b2xkX2FsbG9jKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpemVvZiAq YXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCk7CisgICAgICAgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICAgICAgICBpbnQgbnRoID0gYXJyYXlfZ2x5cGhzX3NraXBwZWQudXNlZCAt IDE7CisgICAgICAgICAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbbnRo XS54ID0geDsKKyAgICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBl ZFtudGhdLmhwb3MgPSBpOworICAgICAgICAgICAgICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBl ZC5za2lwcGVkW250aF0uZW5hYmxlZF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgICAgeCAr PSBkZXNpcmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgKytkZXNp cmVkX2dseXBoLCArK2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICAvKiBDb25zaWRlciB0aGUgY2FzZSB0aGF0IHRoZSBjdXJyZW50IHJvdyBj b250YWlucyAieHh4IHBwcCBnZ2ciIGluCisgICAgICAgICAgICAgICAgaXRhbGljIENvdXJpZXIg Zm9udCwgYW5kIHRoZSBkZXNpcmVkIHJvdyBpcyAieHh4IGdnZyIuICBUaGUgY2hhcmFjdGVyIGBw JworICAgICAgICAgICAgICAgIGhhcyBsYmVhcmluZywgYGcnIGhhcyBub3QuICBUaGUgbG9vcCBh Ym92ZSB3aWxsIHN0b3AgaW4gZnJvbnQgb2YgdGhlCisgICAgICAgICAgICAgICAgZmlyc3QgYHAn IGluIHRoZSBjdXJyZW50IHJvdy4gIElmIHdlIHdvdWxkIHN0YXJ0IHdyaXRpbmcgZ2x5cGhzIHRo ZXJlLCB3ZQorICAgICAgICAgICAgICAgIHdvdWxkbid0IGVyYXNlIHRoZSBsYmVhcmluZyBvZiB0 aGUgYHAnLiAgVGhlIHJlc3Qgb2YgdGhlIGxiZWFyaW5nIHByb2JsZW0KKyAgICAgICAgICAgICAg ICBpcyB0aGVuIHRha2VuIGNhcmUgb2YgYnkgZHJhd19nbHlwaHMuICovCisgICAgICAgICAgICAg ICAgaWYgKG92ZXJsYXBwaW5nX2dseXBoc19wCisgICAgICAgICAgICAgICAgICAgICYmIGkgPiAw CisgICAgICAgICAgICAgICAgICAgICYmIGkgPCBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFd CisgICAgICAgICAgICAgICAgICAgICYmIChjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdICE9 IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pKQorICAgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgICBpbnQgbGVmdCwgcmlnaHQ7CisgICAgICAgICAgICAgICAgICAgIHJp Zi0+Z2V0X2dseXBoX292ZXJoYW5ncyAoY3VycmVudF9nbHlwaCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICBYRlJBTUUgKHctPmZyYW1lKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmbGVmdCwgJnJpZ2h0KTsKKyAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGxlZnQgPiAwICYm IGkgPiAwKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAg IC0taSwgLS1kZXNpcmVkX2dseXBoLCAtLWN1cnJlbnRfZ2x5cGg7CisgICAgICAgICAgICAgICAg ICAgICAgICB4IC09IGRlc2lyZWRfZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAg ICAgICAgICAgbGVmdCAtPSBkZXNpcmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8qIEFib3J0IHRoZSBza2lwcGluZyBh bGdvcml0aG0gaWYgd2UgZW5kIHVwIGJlZm9yZQorICAgICAgICAgICAgICAgICAgICAgICBvdXIg c3RhcnRpbmcgcG9pbnQsIHRvIGF2b2lkIGxvb3BpbmcgKGJ1ZyMxMDcwKS4KKyAgICAgICAgICAg ICAgICAgICAgICAgVGhpcyBjYW4gaGFwcGVuIHdoZW4gdGhlIGxiZWFyaW5nIGlzIGxhcmdlciB0 aGFuCisgICAgICAgICAgICAgICAgICAgICAgIHRoZSBwaXhlbCB3aWR0aC4gKi8KKyAgICAgICAg ICAgICAgICAgICAgYWJvcnRfc2tpcHBpbmcgPSAoaSA8IHN0YXJ0X2hwb3MpOworICAgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAgICAvKiBUcnkgdG8gYXZvaWQg d3JpdGluZyB0aGUgZW50aXJlIHJlc3Qgb2YgdGhlIGRlc2lyZWQgcm93CisgICAgICAgICAgICAg ICBieSBsb29raW5nIGZvciBhIHJlc3luYyBwb2ludC4gIFRoaXMgbWFpbmx5IHByZXZlbnRzCisg ICAgICAgICAgICAgICBtb2RlIGxpbmUgZmxpY2tlcmluZyBpbiB0aGUgY2FzZSB0aGUgbW9kZSBs aW5lIGlzIGluCisgICAgICAgICAgICAgICBmaXhlZC1waXRjaCBmb250LCB3aGljaCBpdCB1c3Vh bGx5IHdpbGwgYmUuICovCisgICAgICAgICAgICBpZiAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RF WFRfQVJFQV0pCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgc3RhcnRfeCA9 IHgsIHN0YXJ0X2hwb3MgPSBpOworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqc3RhcnQg PSBkZXNpcmVkX2dseXBoOworICAgICAgICAgICAgICAgIGludCBjdXJyZW50X3ggPSB4OworICAg ICAgICAgICAgICAgIGJvb2wgc2tpcF9maXJzdF9wID0gIWNhbl9za2lwX3A7CisgICAgICAgICAg ICAgICAgLyogRmluZCB0aGUgbmV4dCBnbHlwaCB0aGF0J3MgZXF1YWwgYWdhaW4uICovCisgICAg ICAgICAgICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIChz a2lwX2ZpcnN0X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICFHTFlQSF9FUVVBTF9Q IChkZXNpcmVkX2dseXBoLCBjdXJyZW50X2dseXBoKSkKKyAgICAgICAgICAgICAgICAgICAgICAg JiYgeCA9PSBjdXJyZW50X3gpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgIHggKz0gZGVzaXJlZF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAg IGN1cnJlbnRfeCArPSBjdXJyZW50X2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAg ICAgICAgKytkZXNpcmVkX2dseXBoLCArK2N1cnJlbnRfZ2x5cGgsICsraTsKKyAgICAgICAgICAg ICAgICAgICAgc2tpcF9maXJzdF9wID0gMDsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICBmb3IgKGludCBlbHQgPSAwOworICAgICAgICAgICAgICAgICAgICAgZWx0IDwgYXJy YXlfZ2x5cGhzX3NraXBwZWQudXNlZDsKKyAgICAgICAgICAgICAgICAgICAgICsrZWx0KQorICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgeCA9IGFycmF5X2dseXBo c19za2lwcGVkLnNraXBwZWRbZWx0XS54OworICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcyA9 IGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbZWx0XS5ocG9zOworICAgICAgICAgICAgICAg ICAgICBzdHJ1Y3QgZ2x5cGggKnRhcmdldF9nbHlwaCA9CisgICAgICAgICAgICAgICAgICAgICAg bWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBocG9z LCB2cG9zKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAg ICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiU0tJUFBFRDogIHZwb3MgKCVkKSB8IGNoYXIgKCVk LyVzKSB8IHg6ICglZCkgfCBocG9zICglZC8lZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB2cG9zLCB0YXJnZXRfZ2x5cGgtPnUuY2gsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAodGFyZ2V0X2dseXBo LT51LmNoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHgsIGhwb3Ms IHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsKKyAgICAgICAgICAgICAgICAgICAg bWNfZHJhd19yb3cgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBo LCB4LCAxLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21h dHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFNLSVBQRUQpOworICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChpID09IHN0YXJ0X2hwb3MgfHwgeCAh PSBjdXJyZW50X3gpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGkg PSBzdGFydF9ocG9zOworICAgICAgICAgICAgICAgICAgICB4ID0gc3RhcnRfeDsKKyAgICAgICAg ICAgICAgICAgICAgZGVzaXJlZF9nbHlwaCA9IHN0YXJ0OworICAgICAgICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBvdXRwdXRfY3Vyc29y X3RvICh3LCB2cG9zLCBzdGFydF9ocG9zLCBkZXNpcmVkX3Jvdy0+eSwgc3RhcnRfeCk7CisgICAg ICAgICAgICAgICAgLyogUmUtZHJhdyBhIHBvcnRpb24gb2YgdGhlIHJvdy4gKi8KKyAgICAgICAg ICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwg IlJFRFJBVyBTRUdNRU5UOlxuXAorICAgICAgICAgICAgICAgICAgICB2cG9zICglZCkgfCBjaGFy ICglZC8lcykgfCB4OiAoJWQpIHwgaHBvcyAoJWQvJWQpIHwgbGVuZ3RoICglZClcbiIsCisgICAg ICAgICAgICAgICAgICAgIHZwb3MsIHN0YXJ0LT51LmNoLCBtY19jaGFyX3RvX3N0cmluZyAoc3Rh cnQtPnUuY2gpLAorICAgICAgICAgICAgICAgICAgICBzdGFydF94LCBzdGFydF9ocG9zLCB1cGRh dGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSwgaSAtIHN0YXJ0X2hwb3MpOworICAgICAgICAg ICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAgIGludCBsZW4gPSBpIC0gc3Rh cnRfaHBvczsKKyAgICAgICAgICAgICAgICBpbnQgaHBvcyA9IHN0YXJ0IC0gdXBkYXRlZF9yb3ct PmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgIHctPm91dHB1dF9jdXJzb3IueCA9 CisgICAgICAgICAgICAgICAgICBtY19kcmF3X2dseXBocyAodywgZGVzaXJlZF9tYXRyaXgsIHVw ZGF0ZWRfcm93LCB3LT5tY19tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdy0+b3V0cHV0X2N1cnNvci54LCBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4sCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCwgdnBvcywg bHNsLCBnbHlwaF9mbGF2b3IsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX3R5cGUsIHdkLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGN1cnNvcl9nY19wLCBNQ19EUkFXX0dMWVBIX1NUUklORywgZHJhd19wKTsK KyAgICAgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLmhwb3MgKz0gbGVuOworICAgICAgICAg ICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgICAgbWNfZHJhd19yb3cgKHcs IGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3Jvdywgc3RhcnQsIHN0YXJ0X3gsIGkgLSBzdGFydF9o cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCBjdXJzb3JfbWF0cml4LCBl c3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGRyYXdfcCwgU0NSSUJFX1RXTyk7CisgICAgICAgICAg ICAgICAgY2hhbmdlZF9wID0gMTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKworICAg ICAgICAvKiBXcml0ZSB0aGUgcmVzdC4gKi8KKyAgICAgICAgaWYgKGkgPCBkZXNpcmVkX3Jvdy0+ dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIG91dHB1dF9jdXJzb3Jf dG8gKHcsIHZwb3MsIGksIGRlc2lyZWRfcm93LT55LCB4KTsKKyAgICAgICAgICAgIGlmIChkZWJ1 Z19wKQorICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJEUkFXIFJFTUFJTkRFUiBPRiBU SEUgUk9XOlxuXAorICAgICAgICAgICAgICAgIHZwb3MgKCVkKSB8IGNoYXIgKCVkLyVzKSB8IHg6 ICglZCkgfCBocG9zICglZC8lZCkgfCBsZW5ndGggKCVkKVxuIiwKKyAgICAgICAgICAgICAgICB2 cG9zLCBkZXNpcmVkX2dseXBoLT51LmNoLCBtY19jaGFyX3RvX3N0cmluZyAoZGVzaXJlZF9nbHlw aC0+dS5jaCksCisgICAgICAgICAgICAgICAgeCwgaSwgZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9B UkVBXSAtIDEsIGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSBpKTsKKyAgICAgICAgICAg IGJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgaW50IGxlbiA9IGRlc2lyZWRfcm93LT51c2Vk W1RFWFRfQVJFQV0gLSBpOworICAgICAgICAgICAgaW50IGhwb3MgPSBkZXNpcmVkX2dseXBoIC0g dXBkYXRlZF9yb3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgdy0+b3V0cHV0X2N1 cnNvci54ID0KKyAgICAgICAgICAgICAgbWNfZHJhd19nbHlwaHMgKHcsIGRlc2lyZWRfbWF0cml4 LCB1cGRhdGVkX3Jvdywgdy0+bWNfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdy0+b3V0cHV0X2N1cnNvci54LCBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4sCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXX05PUk1BTF9URVhULCAwLCB2cG9zLCBsc2ws IGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBl LCB3ZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgY3Vyc29yX2djX3AsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBNQ19EUkFXX0dMWVBIX1NUUklORywgZHJhd19wKTsKKyAgICAgICAgICAg IHctPm91dHB1dF9jdXJzb3IuaHBvcyArPSBsZW47CisgICAgICAgICAgICB1bmJsb2NrX2lucHV0 ICgpOworICAgICAgICAgICAgLyogRklYTUU6ICBBbHRob3VnaCB3ZSBuZWVkIHRvIHVwZGF0ZSB0 aGUgY2FjaGUgYmV0d2VlbiB0aGUgZW5kIG9mCisgICAgICAgICAgICB1cGRhdGVkX3JvdyBhbmQg dGhlIHJpZ2h0IHdpbmRvdyBlZGdlLCBpdCBpcyBub3QgbmVjZXNzYXJ5IHRvIGRyYXcKKyAgICAg ICAgICAgIHRob3NlIGZha2UgY3V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JFQV0KKyAgICAgICAgICBU aGUgYHctPm91dHB1dF9jdXJzb3IueC95L2hwb3MvdnBvc2AgaXMgYXQgdGhlIGVuZCBvZiB0aGUg cHJldmlvdXMgY2hhbmdlLgorICAgICAgICAgIFdoZW4gdGhpcyBzaXR1YXRpb24gZXhpc3RzLCB0 aGUgZGlzdGFuY2UgYmV0d2VlbiB0aGUgZW5kIG9mIHRoZSBnbHlwaCByb3cgYW5kCisgICAgICAg ICAgdGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlIHdpbmRvdyB3aWxsIF9ub3RfIGJlIGNsZWFyZWQuICBU aGVyZWZvcmUsIGl0IGlzIG9rYXkgdG8KKyAgICAgICAgICBkcmF3IHRoZSBmbG9hdGluZyBnbHlw aHMgZm9yIHRoZSBob3Jpem9udGFsL3ZlcnRpY2FsIHJ1bGVycyBoZXJlLiAqLworICAgICAgICAg IGVsc2UgaWYgKGNoYW5nZWRfcAorICAgICAgICAgICAgICAgICAgICYmIHctPm91dHB1dF9jdXJz b3IuaHBvcyAhPSB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBpbnQgeCA9IHctPm91dHB1dF9jdXJzb3IueDsKKyAgICAgICAgICAgICAg aW50IGhwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLmhwb3M7CisgICAgICAgICAgICAgIHN0cnVjdCBn bHlwaCAqc3RhcnQgPSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBkZXNpcmVkX21hdHJpeCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVw ZGF0ZWRfcm93LCBocG9zLCB2cG9zKTsKKyAgICAgICAgICAgICAgaWYgKHctPm91dHB1dF9jdXJz b3IueCA9PSB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgeCAtPSBz dGFydC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAg ICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlBPU1QtQ0hBTkdFRDogIHZwb3MgKCVkKSB8IHggKCVk KSB8IGhwb3MgKCVkLyVkKSB8IGNoYXIgKCVkLyVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHZwb3MsIHgsIGhwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0g LSAxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQtPnUuY2gsIG1jX2No YXJfdG9fc3RyaW5nIChzdGFydC0+dS5jaCkpOworICAgICAgICAgICAgICBtY19kcmF3X3JvdyAo dywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBzdGFydCwgeCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSBocG9zLCB2cG9zLCBj dXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93 X3Bvc2l0aW9uLCBkcmF3X3AsIFBPU1RfQ0hBTkdFRCk7CisgICAgICAgICAgICB9CisgICAgICAg ICAgICAvKiBUaGVyZSB3ZXJlIG5vIGNoYW5nZXMgYW5kIGkgPT0gZGVzaXJlZF9yb3ctPnVzZWRb VEVYVF9BUkVBXSAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWNoYW5nZWRfcCkKKyAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAgICAgICAgICAg ZnByaW50ZiAoc3RkZXJyLCAiVU5DSEFOR0VEIC0tIFdSSVRFIEVOVElSRSBMSU5FOiAgdnBvcyAo JWQpIHwgcm93LT51c2VkICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHZwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsKKyAgICAgICAgICAg ICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBkZXNpcmVk X3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRl c2lyZWRfcm93LT54LCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdLCB2cG9zLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9z aXRpb24sIGRyYXdfcCwgVU5DSEFOR0VEKTsKKyAgICAgICAgICAgICAgfQorCisgICAgICAgIC8q IE1heWJlIGNsZWFyIHRvIGVuZCBvZiBsaW5lLiAqLworICAgICAgICBpZiAoTUFUUklYX1JPV19F WFRFTkRTX0ZBQ0VfUCAoZGVzaXJlZF9yb3cpKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8q IElmIG5ldyByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEsIG5vdGhpbmcK KyAgICAgICAgICAgICAgIGhhcyB0byBiZSBjbGVhcmVkLCBpZiBhbmQgb25seSBpZiB3ZSBkaWQg YSB3cml0ZV9nbHlwaHMKKyAgICAgICAgICAgICAgIGFib3ZlLiAgVGhpcyBpcyBtYWRlIHN1cmUg Ynkgc2V0dGluZyBkZXNpcmVkX3N0b3BfcG9zCisgICAgICAgICAgICAgICBhcHByb3ByaWF0ZWx5 IGFib3ZlLiAqLworICAgICAgICAgICAgZWFzc2VydCAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RF WFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgIHx8ICgoZGVzaXJlZF9yb3ctPnVzZWRbVEVY VF9BUkVBXSA9PSBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAgICAgICAg ICAgICAgICAgICYmIE1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1AgKGN1cnJlbnRfcm93KSkpOwor ICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChNQVRSSVhfUk9XX0VYVEVORFNfRkFDRV9Q IChjdXJyZW50X3JvdykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIElmIG9sZCBy b3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEsIGNsZWFyLiAqLworICAgICAg ICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAg ICAgICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRfcm93LT55LCBkZXNp cmVkX3Jvdy0+cGl4ZWxfd2lkdGgpOworICAgICAgICAgICAgICBpZiAoZHJhd19wKQorICAgICAg ICAgICAgICAgIHJpZi0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRfcm93LCBURVhUX0FS RUEsIC0xKTsKKyAgICAgICAgICAgICAgY2xlYXJfdG9feCA9IC0xOworICAgICAgICAgICAgICBj aGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoZGVzaXJl ZF9yb3ctPnBpeGVsX3dpZHRoIDwgY3VycmVudF9yb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgLyogT3RoZXJ3aXNlIGNsZWFyIHRvIHRoZSBlbmQgb2Yg dGhlIG9sZCByb3cuICBFdmVyeXRoaW5nCisgICAgICAgICAgICAgICAgICAgYWZ0ZXIgdGhhdCBw b3NpdGlvbiBzaG91bGQgYmUgY2xlYXIgYWxyZWFkeS4gKi8KKyAgICAgICAgICAgICAgICBpbnQg eGxpbTsKKyAgICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FS RUFdKQorICAgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgaSwgZGVz aXJlZF9yb3ctPnksIGRlc2lyZWRfcm93LT5waXhlbF93aWR0aCk7CisgICAgICAgICAgICAgICAg LyogSWYgY3Vyc29yIGlzIGRpc3BsYXllZCBhdCB0aGUgZW5kIG9mIHRoZSBsaW5lLCBtYWtlIHN1 cmUKKyAgICAgICAgICAgICAgICAgICBpdCdzIGNsZWFyZWQuICBOb3dhZGF5cyB3ZSBkb24ndCBo YXZlIGEgcGh5c19jdXJzb3JfZ2x5cGgKKyAgICAgICAgICAgICAgICAgICB3aXRoIHdoaWNoIHRv IGVyYXNlIHRoZSBjdXJzb3IgKGJlY2F1c2UgdGhpcyBtZXRob2QKKyAgICAgICAgICAgICAgICAg ICBkb2Vzbid0IHdvcmsgd2l0aCBsYmVhcmluZy9yYmVhcmluZyksIHNvIHdlIG11c3QgZG8gaXQg dGhpcyB3YXkuICovCisgICAgICAgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+cGh5c19jdXJzb3Iu dnBvcworICAgICAgICAgICAgICAgICAgICAmJiAoZGVzaXJlZF9yb3ctPnJldmVyc2VkX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgID8gKHctPnBoeXNfY3Vyc29yLmhwb3MgPCAwKQorICAgICAg ICAgICAgICAgICAgICAgICAgOiAody0+cGh5c19jdXJzb3IuaHBvcyA+PSBkZXNpcmVkX3Jvdy0+ dXNlZFtURVhUX0FSRUFdKSkpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgIHctPnBoeXNfY3Vyc29yX29uX3AgPSAwOworICAgICAgICAgICAgICAgICAgICB4bGltID0g LTE7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICAgIHhsaW0gPSBjdXJyZW50X3Jvdy0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAg ICAgICAgaWYgKGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgIHJpZi0+Y2xlYXJfZW5kX29mX2xp bmUgKHcsIHVwZGF0ZWRfcm93LCBURVhUX0FSRUEsIHhsaW0pOworICAgICAgICAgICAgICAgIGNs ZWFyX3RvX3ggPSB4bGltOworICAgICAgICAgICAgICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAg ICAgICAgIH0KKworICAgICAgICBpZiAoY2hhbmdlZF9wCisgICAgICAgICAgICAmJiBjbGVhcl90 b194ICE9IDApCisgICAgICAgICAgeworICAgICAgICAgICAgaW50IHRleHRfYXJlYV93aWR0aCA9 IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAgICAgICBzdHJ1Y3QgbWNf UkdCIGRlYnVnX2ZnID0gey5yZWQgPSAwLjg2NywgLmdyZWVuID0gMC44NjcsIC5ibHVlID0gMC44 Njd9OworICAgICAgICAgICAgc3RydWN0IGdseXBoICp0YXJnZXRfZ2x5cGggPQorICAgICAgICAg ICAgICB1cGRhdGVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyB1cGRhdGVkX3Jvdy0+dXNlZFtU RVhUX0FSRUFdIC0gMTsKKyAgICAgICAgICAgIC8qIGBtY19lbmdpbmUnIG9ubHkgZHJhd3MgYW4g TUNfR0xZUEggd2hlbiB4IDwgdXBkYXRlZF9yb3ctPnBpeGVsX3dpZHRoLgorICAgICAgICAgICAg VGhlIGN1cnJlbnQgZGVzaWduIGluaGliaXRzIGRyYXdpbmcgb3ZlciBhbiBleGlzdGluZyBnbHlw aCBhdCB0aGUgZW5kIG9mIGEKKyAgICAgICAgICAgIHdvcmQtd3JhcHBlZCBsaW5lLiAgU2FpZCBn bHlwaCByZWNlaXZlcyBhIGZha2UgY3Vyc29yIGluIGVpdGhlciBvbmUgb2YgdGhlCisgICAgICAg ICAgICBwcmV2aW91cyBzZWN0aW9ucyBhYm92ZSwgYW5kIHNob3VsZCBub3QgYmUgb3ZlcndyaXR0 ZW4gd2l0aCBhbm90aGVyIG9uZS4KKyAgICAgICAgICAgIFRoaXMgZGVzaWduIGlzIG5lZWRlZCBi ZWNhdXNlIGEgd29yZC13cmFwcGVkIGxpbmUgZG9lcyBub3QgcmVjZWl2ZSBhbiBleHRyYQorICAg ICAgICAgICAgc3BhY2UgbGlrZSBub24td29yZC13cmFwcGVkIGxpbmVzIGRvLiAqLworICAgICAg ICAgICAgaW50IHggPSB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICBpbnQg aHBvcyA9IHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAgICAgICAgICAgaW50 IHhfbGltaXQgPSAoY2xlYXJfdG9feCA9PSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg PyB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjbGVhcl90b194 OworICAgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNvbnRlbnRzKTsK KyAgICAgICAgICAgIGJvb2wgZmlsbF9jb2x1bW5fdHJ1bXBzX3AgPSAoIU5JTFAgKEJWQVIgKGIs IGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxzLmZjX3gp OworICAgICAgICAgICAgaWYgKG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICBmcHJpbnRmIChz dGRlcnIsICJtY191cGRhdGVfdGV4dF9hcmVhIChmbG9hdGluZyk6ICB2cG9zICglZCkgfCB4X2xp bWl0ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgeF9saW1p dCk7CisgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAg ICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICYmIChl c3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5h Y3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX2lu YWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgJiYgeCA8IHRleHRfYXJlYV93aWR0 aAorICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSB4CisgICAgICAgICAgICAg ICAgJiYgdGFyZ2V0X2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAmJiBkcmF3X3ApCisg ICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB0 YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwKKyAgICAgICAgICAgICAgICAgICAgICAgICB4LCB4X2xp bWl0LCB1cGRhdGVkX3Jvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFSLCAxLAorICAgICAgICAgICAg ICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19wID8gZGVidWdfZmcgOiBlc3NlbnRpYWxzLmZj X2ZnW3Jvd19wb3NpdGlvbl0sCisgICAgICAgICAgICAgICAgICAgICAgICAgRklMTF9DT0xVTU4s IGRyYXdfcCwgTk9XSEVSRSwgTk9fQ0FDSEUpOworICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHct PmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJz KSkKKyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaG9yaXpvbnRhbF9ydWxl cikpCisgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAg ICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAg ICAgICAmJiB4IDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgJiYgdnBvcyA9PSB3 LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICYmIHRhcmdldF9nbHlwaCAhPSBOVUxMCisg ICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIGRl c2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBURVhUX0FSRUEsCisgICAg ICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRlZF9yb3ctPnksIGhwb3MsIHZw b3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwg ZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgIGRlYnVn X3AgPyBkZWJ1Z19mZyA6IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bvc2l0aW9uXSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3X3AsIE5PV0hFUkUsIE5PX0NB Q0hFKTsKKyAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAg ICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgJiYg IU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAmJiAo ZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMu YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9p bmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICYmICFmaWxsX2NvbHVtbl90cnVt cHNfcAorICAgICAgICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAg ICAgICAmJiB2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAgICAgICAgICAgJiYgdy0+Y3Vy c29yLnggPj0geAorICAgICAgICAgICAgICAgICYmIHRhcmdldF9nbHlwaCAhPSBOVUxMCisgICAg ICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIGRlc2ly ZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBURVhUX0FSRUEsCisgICAgICAg ICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRlZF9yb3ctPnksIGhwb3MsIHZwb3Ms IE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3Nl bnRpYWxzLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAgICAgICAgICAgZGVidWdfcCA/ IGRlYnVnX2ZnIDogZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25dLAorICAgICAgICAgICAg ICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3AsIE5PV0hFUkUsIE5PX0NBQ0hFKTsK KyAgICAgICAgICB9CisKKyAgICAgIH0KKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30KKworLyogVXBk YXRlIHJvdyBWUE9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ZlcmxheV9hcnJvd19iaXRtYXAgIT0gY3VycmVudF9yb3ctPm92ZXJsYXlf YXJyb3dfYml0bWFwCisgICAgICAgICAgfHwgY3VycmVudF9yb3ctPnJlZHJhd19mcmluZ2VfYml0 bWFwc19wCisgICAgICAgICAgfHwgZGVzaXJlZF9yb3ctPm1vZGVfbGluZV9wICE9IGN1cnJlbnRf cm93LT5tb2RlX2xpbmVfcAorICAgICAgICAgIHx8IGRlc2lyZWRfcm93LT5leGFjdF93aW5kb3df d2lkdGhfbGluZV9wICE9IGN1cnJlbnRfcm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisg ICAgICAgICAgfHwgKE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAoZGVzaXJlZF9yb3cp CisgICAgICAgICAgICAgICE9IE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAoY3VycmVu dF9yb3cpKSkKKyAgICAgICAgcmlmLT5hZnRlcl91cGRhdGVfd2luZG93X2xpbmVfaG9vayAodywg ZGVzaXJlZF9yb3cpOworICAgIH0KKyAgLyogVXBkYXRlIGN1cnJlbnRfcm93IGZyb20gZGVzaXJl ZF9yb3cuICovCisgIG1ha2VfY3VycmVudCAody0+ZGVzaXJlZF9tYXRyaXgsIHctPmN1cnJlbnRf bWF0cml4LCB2cG9zKTsKKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30KKwordm9pZAorbWNfdXBkYXRl X3dpbmRvd19lcmFzZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCBvbGRfbWF0 cml4KQoreworICBib29sIGRlYnVnX3AgPSBmYWxzZTsKKyAgYm9vbCBnb19vbmVfcCA9IChvbGRf bWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPiAwCisgICAgICAgICAgICAgICAgICAgfHwg b2xkX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4gMAorICAgICAgICAgICAgICAgICAg IHx8IG9sZF9tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA+IDApOworICBib29sIGdvX3R3 b19wID0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAgICYmICghTklM UCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlz aWJsZSkpCisgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3 LT5jb250ZW50cyksIG1jX2NvbmYpKSkpOworICBib29sIHVwZGF0aW5nX2ZyYW1lX3AgPSBmYWxz ZTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIGlmIChYRlJBTUUg KHctPmZyYW1lKSAhPSBmLT5tY191cGRhdGluZ19mcmFtZQorICAgICAgJiYgKGdvX29uZV9wIHx8 IGdvX3R3b19wKSkKKyAgICB7CisgICAgICB1cGRhdGluZ19mcmFtZV9wID0gdHJ1ZTsKKyAgICAg IHVwZGF0ZV9iZWdpbiAoZik7CisgICAgfQorICBpZiAody0+cGh5c19jdXJzb3Jfb25fcAorICAg ICAgJiYgZ29fdHdvX3ApCisgICAgZXJhc2VfcGh5c19jdXJzb3IgKHcpOworICBmb3IgKGludCB2 bnRoID0gMDsKKyAgICAgICBnb19vbmVfcAorICAgICAgICYmIHZudGggPCB3LT5tY19tYXRyaXgu dnBvc191c2VkOworICAgICAgICsrdm50aCkKKyAgICB7CisgICAgICBmb3IgKGVudW0gbWNfY2Fj aGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAgICAgICAgIGNhY2hlX3R5cGUgPCBO T19DQUNIRTsKKyAgICAgICAgICAgKytjYWNoZV90eXBlKQorICAgICAgICBmb3IgKGludCBudGhf MCA9IDA7CisgICAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAob2xkX21hdHJpeCwgY2Fj aGVfdHlwZSwgdm50aCwgbnRoXzApOworICAgICAgICAgICAgICsrbnRoXzApCisgICAgICAgICAg eworICAgICAgICAgICAgYm9vbCBzYW1lX3AgPSBmYWxzZTsKKyAgICAgICAgICAgIGZvciAoaW50 IHdfbnRoID0gMDsgd19udGggPCB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2Nh Y2hlX3R5cGVdOyArK3dfbnRoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc2Ft ZV9wIHw9IChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmds eXBoLnR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnR5cGUKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmICgob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5nbHlwaC5ieXRlcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlw aC5ieXRlcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9PSBBVF9a VgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09IEFUX1pWKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9aVikpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiAoKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0uZ2x5cGguY2hhcnBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u Z2x5cGguY2hhcnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAob2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5yb3dfcG9zaXRpb24gPT0g QVRfWlYKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9PSBBVF9a VikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAob2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9aVgorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgKChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLmxudW0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhd LmdseXBoLmxudW0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IEFU X1pWCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gQVRfWlYp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0uZ2x5cGgudS52YWwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBo LnUudmFsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLmZhY2VfaWQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bd19udGhdLmdseXBoLmZhY2VfaWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgucGFkZGlu Z19wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5wYWRkaW5nX3AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0uZ2x5cGgubGVmdF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5n bHlwaC5sZWZ0X2JveF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgucmlnaHRfYm94 X2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgucmlnaHRfYm94X2xpbmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC52b2Zmc2V0CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRo XS5nbHlwaC52b2Zmc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnBpeGVsX3dpZHRoCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5waXhlbF93aWR0aAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5nbHlwaC5zbGljZS5pbWcueAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xp Y2UuaW1nLngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGguc2xpY2UuaW1nLnkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmltZy55CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmds eXBoLnNsaWNlLmltZy53aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGguc2xpY2Uu aW1nLndpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy5oZWlnaHQKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmltZy5oZWlnaHQKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0uZ2x5cGguc2xpY2UuY21wLmZyb20KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmds eXBoLnNsaWNlLmNtcC5mcm9tCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLngKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bd19udGhdLngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZngKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19u dGhdLmZ4CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMF0uZnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmZ5CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmhwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmhwb3MKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0udnBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBvcworICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8wXS53ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ud2QKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0uaAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uaAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8w XS5jdXJzb3JfdHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uY3Vyc29yX3R5cGUKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0uY3Vyc29yX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5jdXJz b3Jfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcucmVkCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5mZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZmcuZ3JlZW4KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bd19udGhdLmZnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLmJsdWUKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bd19udGhdLmZnLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcucmVkCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW3dfbnRoXS5iZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcuZ3JlZW4K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJn LmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmJnLmJsdWUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhf MF0uYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmFjdGl2ZV9wCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzBdLmdseXBoX2ZsYXZvcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGhfZmxh dm9yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmVuYWJsZWRfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250 aF0uZW5hYmxlZF9wKTsKKyAgICAgICAgICAgICAgICBpZiAoc2FtZV9wKQorICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAgICAgICAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJISVQgKCVzKTogIHZwb3MgKCVkKSB8IGhwb3MgKCVk KSB8IGNoYXIgKCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChjYWNoZV90eXBlID09IE1DX0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/ICJNQyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGNhY2hlX3R5cGUgPT0gQ0hfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gIkNIIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiAoY2FjaGVfdHlwZSA9PSBGQ19DQUNIRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyAiRkMiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6ICJOTyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0udnBvcywKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC51LmNoKSk7CisgICAgICAgICAgICAgICAg ICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5zYW1l X3AgPSB0cnVlOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBpbnQgb2xkX2NhY2hlX3VzZWQgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAg ICAgICBpbnQgbmV3X2NhY2hlX3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91 c2VkW2NhY2hlX3R5cGVdOworICAgICAgICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwg Ik1JU1MgKCVzKTogIHZwb3MgKCVkKSB8IGhwb3MgKCVkIHYuICVkKSB8IGNoYXIgKCVzIHYuICVz KSB8IGNhY2hlX3VzZWQgKCVkIHYuICVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChjYWNoZV90eXBlID09IE1DX0NBQ0hFKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/ICJNQyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gQ0hfQ0FDSEUpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gIkNIIgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoY2FjaGVfdHlwZSA9PSBGQ19DQUNIRSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiRkMiCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6ICJOTyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u dnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgbWNfY2hhcl90b19zdHJpbmcgKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0uZ2x5cGgudS5jaCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnUuY2gpLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgb2xkX2NhY2hlX3VzZWQsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBuZXdfY2FjaGVfdXNlZCk7CisgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCFzYW1lX3ApCisgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAvKiBgbWF0cml4X3JvdycgaW4gYGRpc3BuZXcuY2AgY29udGFp bnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgICAgICAgICAgICAgICBlYXNzZXJ0IChtYXRyaXgg JiYgbWF0cml4LT5yb3dzKTsKKyAgICAgICAgICAgICAgICBlYXNzZXJ0IChyb3cgPj0gMCAmJiBy b3cgPCBtYXRyaXgtPm5yb3dzKTsgKi8KKyAgICAgICAgICAgICAgICBib29sIGJhcmZfY3Jhc2hf b25lID0gKHctPmN1cnJlbnRfbWF0cml4ICYmIHctPmN1cnJlbnRfbWF0cml4LT5yb3dzKSA/IGZh bHNlIDogdHJ1ZTsKKyAgICAgICAgICAgICAgICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgICAg ICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICBib29sIGJhcmZfY3Jhc2hfdHdv ID0gKHZudGggPj0gMCAmJiB2bnRoIDwgdy0+Y3VycmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNl IDogdHJ1ZTsKKyAgICAgICAgICAgICAgICBpZiAoYmFyZl9jcmFzaF90d28pCisgICAgICAgICAg ICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICp2bnRo X3JvdyA9IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2bnRoKTsKKyAgICAgICAgICAg ICAgICBpbnQgeF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS54OworICAgICAgICAgICAgICAgIGludCBmeF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5meDsKKyAgICAgICAgICAgICAgICBpbnQgeV8wID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS55OworICAgICAg ICAgICAgICAgIGludCBmeV8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5meTsKKyAgICAgICAgICAgICAgICBpbnQgaHBvc18wID0gb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5ocG9zOworICAgICAgICAgICAgICAg IGludCB2cG9zXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLnZwb3M7CisgICAgICAgICAgICAgICAgaW50IHdkXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLndkOworICAgICAgICAgICAgICAgIGludCBoXzAg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmg7CisgICAg ICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZV8wID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3JfdHlwZTsKKyAgICAg ICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICAgICAgICAvLyAg c3RydWN0IG1jX1JHQiBsc2xfZmdfMCA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5yZWQsCisgICAgICAgICAgICAgICAgLy8gICAgICAg ICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8wXS5mZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAvLyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0uZmcuYmx1ZX07CisgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JH QiBsc2xfYmdfMCA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5iZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmJnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg LmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJn LmJsdWV9OworICAgICAgICAgICAgICAgIGJvb2wgYWN0aXZlX3BfMCA9IG9sZF9tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYWN0aXZlX3A7CisgICAgICAgICAgICAg ICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICBi b29sIGVuYWJsZWRfcF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8wXS5lbmFibGVkX3A7CisgICAgICAgICAgICAgICAgaWYgKHZwb3NfMCA9PSB2bnRoCisg ICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvcl8wID09IE1DX0dMWVBICisgICAgICAg ICAgICAgICAgICAgICYmIGVuYWJsZWRfcF8wCisgICAgICAgICAgICAgICAgICAgICYmIHZudGhf cm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg IG1jX2VyYXNlX2N1cnNvciAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhfcm93LCBvbGRfbWF0 cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhfMCwgeV8wLCBocG9z XzAsIHZwb3NfMCwgZ2x5cGhfZmxhdm9yXzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY3Vyc29yX3R5cGVfMCwgd2RfMCk7CisgICAgICAgICAgICAgICAgICAgIG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZW5hYmxlZF9wID0gZmFs c2U7CisgICAgICAgICAgICAgICAgICAgIC0tb2xkX21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVf dHlwZV07CisgICAgICAgICAgICAgICAgICAgIC8qIElmIHdlIGluYWR2ZXJ0ZW50bHkgZXJhc2Vk IGFub3RoZXIgZmFrZSBjdXJzb3IgYXQgdGhlIHNhbWUKKyAgICAgICAgICAgICAgICAgICAgSFBP UyB0aGF0IGlzIHN0aWxsIGVuYWJsZWRfcCBpbiB0aGUgYG9sZF9tYXRyaXhgLCB0aGVuIHJlZHJh dyBpdC4gKi8KKyAgICAgICAgICAgICAgICAgICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2Fj aGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUg PCBOT19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAg ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpbnQgbnRo XzEgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9w IChvbGRfbWF0cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGhfMSk7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICsrbnRoXzEpCisgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBpbnQgeF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8xXS54OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCBmeF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5m eDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgeV8xID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS55OworICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGludCBmeV8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8xXS5meTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaHBvc18xID0gb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5ocG9zOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGludCB2cG9zXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLnZwb3M7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgaW50IHdkXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzFdLndkOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBoXzEgPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmg7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZV8xID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5jdXJzb3JfdHlwZTsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoXzEgPSBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmN1cnNvcl93aWR0aDsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZ18xID0gey5yZWQgPSBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZnLnJlZCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZmcuZ3JlZW4s CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAu Ymx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZmcu Ymx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIHN0cnVjdCBtY19SR0IgbHNs X2JnXzEgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhfMV0uYmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMV0uYmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g ICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmJnLmJsdWV9OworICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGJvb2wgYWN0aXZlX3BfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMV0uYWN0aXZlX3A7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzFdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBib29sIGVuYWJsZWRfcF8xID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF8xXS5lbmFibGVkX3A7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9v bCBnb19wXzEgPSAoaHBvc18wID09IGhwb3NfMQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcF8xKTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBpZiAoIWdvX3BfMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVl OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3BfMSA9IGZhbHNlOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCB3LT5j dXJyZW50X21hdHJpeCwgdm50aF9yb3csIHhfMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZnhfMSwgeV8xLCBmeV8xLCBocG9zXzEsIHZwb3NfMSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2RfMSwg aF8xLCBjdXJzb3JfdHlwZV8xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGhfMSwgbHNsX2ZnXzEsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wXzEsIGdseXBoX2ZsYXZv cl8xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBy ZW1vdmVfcF8xKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYg KHZwb3NfMCA9PSB2bnRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3Bf MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdm50aF9yb3ctPmVuYWJsZWRfcCkKKyAg ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3Bf MCA9IHRydWU7CisgICAgICAgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcs IHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3JvdywgeF8wLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBmeF8wLCB5XzAsIGZ5XzAsIGhwb3NfMCwgdnBvc18wLCB3 ZF8wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoXzAsIGN1 cnNvcl90eXBlXzAsIGN1cnNvcl93aWR0aF8wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBsc2xfYmdfMCwgYWN0aXZlX3BfMCwgZ2x5cGhfZmxhdm9yXzAsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9wXzApOwor ICAgICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uZW5hYmxlZF9wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAgLS1v bGRfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAgICAg ICAvKiBJZiB3ZSBpbmFkdmVydGVudGx5IGVyYXNlZCBhbm90aGVyIGZha2UgY3Vyc29yIGF0IHRo ZSBzYW1lCisgICAgICAgICAgICAgICAgICAgICAgSFBPUyB0aGF0IGlzIHN0aWxsIGVuYWJsZWRf cCBpbiB0aGUgYG9sZF9tYXRyaXhgLCB0aGVuIHJlZHJhdyBpdC4gKi8KKyAgICAgICAgICAgICAg ICAgICAgICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgICAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaW50IG50aF8yID0gMDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wIChvbGRfbWF0cml4 LCBjYWNoZV90eXBlLCB2bnRoLCBudGhfMik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKytudGhfMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpbnQgeF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8yXS54OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ4 XzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZ4Owor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHlfMiA9IG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0ueTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGludCBmeV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8yXS5meTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBocG9zXzIgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmhwb3M7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdnBvc18yID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS52cG9zOworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgaW50IHdkXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzJdLndkOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhfMiA9IG9s ZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uaDsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGVfMiA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uY3Vyc29yX3R5 cGU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoXzIgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmN1cnNvcl93aWR0 aDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnXzIg PSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0u ZmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzJdLmZnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMl0uZmcuYmx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAv LyAgc3RydWN0IG1jX1JHQiBsc2xfYmdfMiA9IHsucmVkID0gb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5iZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmJnLmdyZWVuLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmJnLmJsdWV9 OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcF8yID0gb2xkX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5hY3RpdmVfcDsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvcl8yID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5nbHlwaF9mbGF2 b3I7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGVuYWJsZWRfcF8yID0gb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5lbmFibGVkX3A7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGdvX3BfMiA9IChocG9zXzAgPT0gaHBv c18yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBmeF8w IDw9IGZ4XzIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGZ4XzAgKyB3ZF8wID4gZnhfMiArIHdkXzIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcF8yKTsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGlmICghZ29fcF8yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250 aW51ZTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVtb3ZlX3BfMiA9IGZh bHNlOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQg KHcsIHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3JvdywgeF8yLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ4XzIsIHlfMiwgZnlfMiwgaHBvc18y LCB2cG9zXzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgd2RfMiwgaF8yLCBjdXJzb3JfdHlwZV8yLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aF8yLCBsc2xfZmdfMiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVf cF8yLCBnbHlwaF9mbGF2b3JfMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICByZW1vdmVfcF8yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgIH0KKyAgaWYgKHVwZGF0aW5nX2ZyYW1l X3ApCisgICAgdXBkYXRlX2VuZCAoZik7Cit9CisKK3ZvaWQKK21jX3VwZGF0ZV93aW5kb3dfZHJ5 cnVuIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3AsIHN0cnVjdCBtY19lc3NlbnRpYWxz IGVzc2VudGlhbHMpCit7CisgIGlmICghQlVGRkVSUCAody0+Y29udGVudHMpKQorICAgIHJldHVy bjsKKworICBpZiAody0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPT0gMAorICAg ICAgJiYgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPT0gMAorICAgICAgJiYg dy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtGQ19DQUNIRV0gPT0gMAorICAgICAgJiYgTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICYmIE5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HRoZSB3aW5kb3cncyBsaW5lcy4gKi8KKyAgICAgIGlmIChy b3ctPm1vZGVfbGluZV9wKQorICAgICAgICB7CisgICAgICAgICAgaGVhZGVyX2xpbmVfcm93ID0g cm93OworICAgICAgICAgICsrcm93OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAg ICBoZWFkZXJfbGluZV9yb3cgPSBOVUxMOworCisgICAgICAvKiBVcGRhdGUgdGhlIG1vZGUgbGlu ZSwgaWYgbmVjZXNzYXJ5LiAqLworICAgICAgc3RydWN0IGdseXBoX3JvdyAqbW9kZV9saW5lX3Jv dyA9IE1BVFJJWF9NT0RFX0xJTkVfUk9XIChkZXNpcmVkX21hdHJpeCk7CisgICAgICBpZiAobW9k ZV9saW5lX3Jvdy0+bW9kZV9saW5lX3AgJiYgbW9kZV9saW5lX3Jvdy0+ZW5hYmxlZF9wKQorICAg ICAgICB7CisgICAgICAgICAgbW9kZV9saW5lX3Jvdy0+eSA9IHliICsgV0lORE9XX1NDUk9MTF9C QVJfQVJFQV9IRUlHSFQgKHcpOworICAgICAgICAgIHVwZGF0ZV93aW5kb3dfbGluZSAodywgTUFU UklYX1JPV19WUE9TIChtb2RlX2xpbmVfcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBkZXNpcmVkX21hdHJpeCksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wKTsKKyAgICAgICAgfQorCisg ICAgICAvKiBGaW5kIGZpcnN0IGVuYWJsZWQgcm93LiAgT3B0aW1pemF0aW9ucyBpbiByZWRpc3Bs YXlfaW50ZXJuYWwKKyAgICAgICAgIG1heSBsZWFkIHRvIGFuIHVwZGF0ZSB3aXRoIG9ubHkgb25l IHJvdyBlbmFibGVkLiAgVGhlcmUgbWF5CisgICAgICAgICBiZSBhbHNvIGNvbXBsZXRlbHkgZW1w dHkgbWF0cmljZXMuICovCisgICAgICB3aGlsZSAocm93IDwgZW5kICYmICFyb3ctPmVuYWJsZWRf cCkKKyAgICAgICAgKytyb3c7CisKKyAgICAgIC8qIFRyeSByZXVzaW5nIHBhcnQgb2YgdGhlIGRp c3BsYXkgYnkgY29weWluZy4gKi8KKyAgICAgIGlmIChyb3cgPCBlbmQgJiYgIXctPmRlc2lyZWRf bWF0cml4LT5ub19zY3JvbGxpbmdfcCkKKyAgICAgICAgeworICAgICAgICAgIGludCByYyA9IG1j X3Njcm9sbGluZ193aW5kb3cgKHcsIGhlYWRlcl9saW5lX3JvdyAhPSBOVUxMKTsKKyAgICAgICAg ICBpZiAocmMgPCAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAvKiBBbGwgcm93cyB3 ZXJlIGZvdW5kIHRvIGJlIGVxdWFsLiAqLworICAgICAgICAgICAgICBwYXVzZWRfcCA9IDA7Cisg ICAgICAgICAgICAgIGdvdG8gc2V0X2N1cnNvcjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UgaWYgKHJjID4gMCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIC8qIFdl J3ZlIHNjcm9sbGVkIHRoZSBkaXNwbGF5LiAqLworICAgICAgICAgICAgICAgIGZvcmNlX3AgPSAx OworICAgICAgICAgICAgICAgIGNoYW5nZWRfcCA9IDE7CisgICAgICAgICAgICAgIH0KKyAgICAg ICAgfQorICAgICAgLyogUHJvY2VzcyB0aGUgY3Vyc29yIHJvdyBhdCB0aGUgb3V0c2V0IGlmIGl0 IGlzIHdpdGhpbiBgZGVzaXJlZF9tYXRyaXhgLgorICAgICAgV2hlbiBwcm9jZXNzaW5nIGFsbCBv dGhlciByb3dzLCB3ZSB3aWxsIHF1ZXJ5IHRoZSBgdy0+Y3VycmVudF9tYXRyaXhgIGZvciBkYXRh CisgICAgICByZWxhdGluZyB0byB0aGUgY3Vyc29yIHJvdy4gIGBtYWtlX2N1cnJlbnRgICh3aXRo aW4gYHVwZGF0ZV93aW5kb3dfbGluZScpCisgICAgICB1cGRhdGVzIHRoZSBgdy0+Y3VycmVudF9t YXRyaXhgIGZvciB0aGUgYXBwbGljYWJsZSByb3cuICBJbiBkb2luZyBzbywgaG93ZXZlciwKKyAg ICAgIHRoZSBhcHBsaWNhYmxlIHJvdyBpbiB0aGUgZGVzaXJlZCBtYXRyaXggaXMgYWx0ZXJlZCBz dWNoIHRoYXQgd2UgY2FuIG5vIGxvbmdlcgorICAgICAgcmVseSB1cG9uIHRoZSBhY2N1cmFjeSBv ZiBgUk9XLT51c2VkW1RFWFRfQVJFQV1gLiAgVGhlcmVmb3JlLCB3ZSBtdXN0IG5vdyByZWx5Cisg ICAgICBleGNsdXNpdmVseSB1cG9uIGB3LT5jdXJyZW50X21hdHJpeCcgZm9yIGN1cnNvciByb3cg YmFzZWQgZGVjaXNpb25zLiAqLworICAgICAgZm9yIChzdHJ1Y3QgZ2x5cGhfcm93ICptY19yb3cg PSByb3c7CisgICAgICAgICAgIG1jX3JvdyA8IGVuZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRfcGVu ZGluZyk7CisgICAgICAgICAgICsrbWNfcm93KQorICAgICAgICB7CisgICAgICAgICAgaW50IHZw b3MgPSBNQVRSSVhfUk9XX1ZQT1MgKG1jX3Jvdywgdy0+ZGVzaXJlZF9tYXRyaXgpOworICAgICAg ICAgIGlmIChtY19yb3ctPmVuYWJsZWRfcAorICAgICAgICAgICAgICAmJiB2cG9zID09IHctPmN1 cnNvci52cG9zKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4ID0g dy0+ZGVzaXJlZF9tYXRyaXg7CisgICAgICAgICAgICAgIGlmICghZm9yY2VfcCAmJiArK25fdXBk YXRlZCAlIHByZWVtcHRfY291bnQgPT0gMCkKKyAgICAgICAgICAgICAgICBkZXRlY3RfaW5wdXRf cGVuZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7CisgICAgICAgICAgICAgIGNoYW5nZWRfcCB8 PSBtY191cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVu X3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1 cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIGRyYXdfcCk7CisgICAgICAgICAgICAgIGlmIChNQVRS SVhfUk9XX0JPVFRPTV9ZIChyb3cpID49IHliKQorICAgICAgICAgICAgICAgIGZvciAoaW50IGkg PSB2cG9zICsgMTsgaSA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cyAtIDE7ICsraSkKKyAgICAg ICAgICAgICAgICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAody0+Y3VycmVudF9tYXRyaXgs IGksIGZhbHNlKTsKKyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAg IH0KKyAgICAgIGN1cnNvcl9tYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgIC8qIFVw ZGF0ZSB0aGUgcmVzdCBvZiB0aGUgbGluZXMuICovCisgICAgICBmb3IgKDsgcm93IDwgZW5kICYm IChmb3JjZV9wIHx8ICFpbnB1dF9wZW5kaW5nKTsgKytyb3cpCisgICAgICAgIC8qIHNjcm9sbGlu Z193aW5kb3cgcmVzZXRzIHRoZSBlbmFibGVkX3AgZmxhZyBvZiB0aGUgcm93cyBpdCByZXVzZXMg ZnJvbQorICAgICAgICBjdXJyZW50X21hdHJpeC4gKi8KKyAgICAgICAgaWYgKHJvdy0+ZW5hYmxl ZF9wKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9T IChyb3csIHctPmRlc2lyZWRfbWF0cml4KTsKKyAgICAgICAgICAgIC8qIElmIHRoZSBgY3Vyc29y X3Jvd2AgaXMgd2l0aGluIHRoZSBgZGVzaXJlZF9tYXRyaXhgLCB0aGVuIGl0IHdhcworICAgICAg ICAgICAgcHJvY2Vzc2VkIGhlcmVpbmFib3ZlIGFuZCBzaG91bGQgYmUgc2tpcHBlZCBhdCB0aGlz IHRpbWUuICovCisgICAgICAgICAgICBpZiAodnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAg ICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgaW50IGk7CisgICAgICAgICAgICAvKiBXZSds bCBoYXZlIHRvIHBsYXkgYSBsaXR0bGUgYml0IHdpdGggd2hlbiB0bworICAgICAgICAgICAgICAg ZGV0ZWN0X2lucHV0X3BlbmRpbmcuICBJZiBpdCdzIGRvbmUgdG9vIG9mdGVuLAorICAgICAgICAg ICAgICAgc2Nyb2xsaW5nIGxhcmdlIHdpbmRvd3Mgd2l0aCByZXBlYXRlZCBzY3JvbGwtdXAKKyAg ICAgICAgICAgICAgIGNvbW1hbmRzIHdpbGwgdG9vIHF1aWNrbHkgcGF1c2UgcmVkaXNwbGF5LiAq LworICAgICAgICAgICAgaWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVkICUgcHJlZW1wdF9jb3Vu dCA9PSAwKQorICAgICAgICAgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZ19pZ25vcmVfc3F1ZWV6 YWJsZXMgKCk7CisgICAgICAgICAgICBjaGFuZ2VkX3AgfD0gbWNfdXBkYXRlX3dpbmRvd19saW5l ICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywg ZHJhd19wKTsKKyAgICAgICAgICAgIC8qIE1hcmsgYWxsIHJvd3MgYmVsb3cgdGhlIGxhc3Qgdmlz aWJsZSBvbmUgaW4gdGhlIGN1cnJlbnQKKyAgICAgICAgICAgICAgIG1hdHJpeCBhcyBpbnZhbGlk LiAgVGhpcyBpcyBuZWNlc3NhcnkgYmVjYXVzZSBvZgorICAgICAgICA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Vyc29yX21hdHJpeCA9PSBOVUxMKQorICAgICAgICBjdXJzb3JfbWF0 cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgICAgICAvKiBSZXNldCBgcm93YCB0byAwIHNvIHRo YXQgZmFrZSBjdXJzb3JzIGNhbiBiZSBkcmF3biBvbiByb3dzIHByZWNlZGluZyB0aGUKKyAgICAg IGZpcnN0IGByb3ctPmVuYWJsZWRfcGAuICBKdXN0IHByaW9yIHRvIHRoZSBjYWxsIHRvIGBzY3Jv bGxpbmdfd2luZG93JyBhYm92ZSwKKyAgICAgIGByb3dgIHdhcyBhZHZhbmNlZCB0byB0aGUgZmly c3QgYHJvdy0+ZW5hYmxlZF9wYC4gKi8KKyAgICAgIGZvciAoc3RydWN0IGdseXBoX3JvdyAqZGVz aXJlZF9yb3cgPSBNQVRSSVhfUk9XICh3LT5kZXNpcmVkX21hdHJpeCwgMCk7CisgICAgICAgICAg IGRlc2lyZWRfcm93IDwgZW5kCisgICAgICAgICAgICYmIChmb3JjZV9wIHx8ICFpbnB1dF9wZW5k aW5nKQorICAgICAgICAgICAvKiBXMzIgRW1hY3MgY3Jhc2hlcyBvbiBzdGFydHVwIHdpdGhvdXQg YSBCVUZGRVJQIGNoZWNrLiAqLworICAgICAgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykK KyAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2Nv bmYpKQorICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpOworICAgICAgICAgICArK2Rlc2lyZWRfcm93KQor ICAgICAgICB7CisgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKGRlc2lyZWRf cm93LCB3LT5kZXNpcmVkX21hdHJpeCk7CisgICAgICAgICAgaWYgKGRlc2lyZWRfcm93LT5lbmFi bGVkX3ApCisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93 ICpjdXJyZW50X3JvdyA9IE1BVFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAg ICAgICAgICBlbnVtIG1jX3Jvd19wb3NpdGlvbiByb3dfcG9zaXRpb24gPSBtY19yb3dfcG9zaXRp b24gKHcsIGN1cnJlbnRfcm93LCBjdXJyZW50X3JvdywgdnBvcyk7CisgICAgICAgICAgaWYgKGN1 cnJlbnRfcm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICBtY19kcmF3X3JvdyAodywgdy0+Y3Vy cmVudF9tYXRyaXgsIGN1cnJlbnRfcm93LCBjdXJyZW50X3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0s CisgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudF9yb3ctPngsIGN1cnJlbnRfcm93LT51 c2VkW1RFWFRfQVJFQV0sIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21h dHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsCisgICAgICAgICAgICAgICAg ICAgICAgICAgU0VUX0NVUlNPUl9PTkUpOworICAgICAgICB9CisKKyAgICAgIG1jX3Jlc3RvcmVf Z2x5cGhfbWF0cml4IChzYXZlZF9kZXNpcmVkLCB3LT5kZXNpcmVkX21hdHJpeCk7CisgICAgICBt Y19yZXN0b3JlX2dseXBoX21hdHJpeCAoc2F2ZWRfY3VycmVudCwgdy0+Y3VycmVudF9tYXRyaXgp OworCisgICAgICBtY191cGRhdGVfd2luZG93X2VyYXNlICh3LCBvbGRfbWF0cml4KTsKKworICAg ICAgbWNfeGZyZWVfY2FjaGVfbWF0cml4ICh3LCAmb2xkX21hdHJpeCk7CisKKyAgICB9CisgIC8v IGNsb2NrX3QgY2xvY2tfZW5kID0gY2xvY2soKTsKKyAgLy8gZG91YmxlIGNwdV90aW1lX3VzZWQg PSAoKGRvdWJsZSkgKGNsb2NrX2VuZCAtIGNsb2NrX3N0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsK KyAgLy8gZnByaW50ZiAoc3RkZXJyLCAibWNfc2Nyb2xsaW5nX3dpbmRvdyAoJXMpOiAgVElNRSAo JWYpXG4iLCBtY193aW5kb3cgKHcpLCBjcHVfdGltZV91c2VkKTsKK30KKworLyogZW5kIE1VTFRJ UExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIFN0cnVjdHVy ZSB0byBwYXNzIGRpbWVuc2lvbnMgYXJvdW5kLiAgVXNlZCBmb3IgY2hhcmFjdGVyIGJvdW5kaW5n CiAgICBib3hlcywgZ2x5cGggbWF0cml4IGRpbWVuc2lvbnMgYW5kIGFsaWtlLiAgKi8KIApAQCAt MjI0MSw2ICs0MDIzLDE2IEBAIGZyZWVfd2luZG93X21hdHJpY2VzIChzdHJ1Y3Qgd2luZG93ICp3 KQogCSAgZnJlZV9nbHlwaF9tYXRyaXggKHctPmN1cnJlbnRfbWF0cml4KTsKIAkgIGZyZWVfZ2x5 cGhfbWF0cml4ICh3LT5kZXNpcmVkX21hdHJpeCk7CiAJICB3LT5jdXJyZW50X21hdHJpeCA9IHct PmRlc2lyZWRfbWF0cml4ID0gTlVMTDsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBtY194ZnJlZV9jYWNoZV9tYXRyaXggKHcsICZ3LT5t Y19tYXRyaXgpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJfQogCiAgICAgICAv KiBOZXh0IHdpbmRvdyBvbiBzYW1lIGxldmVsLiAgKi8KQEAgLTMzODcsNiArNTE3OSwyNiBAQCBj aGVja19jdXJyZW50X21hdHJpeF9mbGFncyAoc3RydWN0IHdpbmRvdyAqdykKIHN0YXRpYyBib29s CiB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiB7CisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYg KG1jX3N0ZGVycl9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgInVwZGF0ZV93aW5kb3cgKCVzKVxu IiwgbWNfd2luZG93ICh3KSk7CisKKyAgc3RydWN0IG1jX2Vzc2VudGlhbHMgZXNzZW50aWFsczsK KyAgbWNfc2V0X2Vzc2VudGlhbHMgKHcsICZlc3NlbnRpYWxzKTsKKworICBtY191cGRhdGVfd2lu ZG93X2RyeXJ1biAodywgZm9yY2VfcCwgZXNzZW50aWFscyk7CisKKyAgc3RydWN0IGdseXBoX21h dHJpeCAqY3Vyc29yX21hdHJpeCA9IE5VTEw7CisKKyAgYm9vbCBkcmF3X3AgPSB0cnVlOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKmRlc2ly ZWRfbWF0cml4ID0gdy0+ZGVzaXJlZF9tYXRyaXg7CiAgIGJvb2wgcGF1c2VkX3A7CiAgIGludCBw cmVlbXB0X2NvdW50ID0gY2xpcF90b19ib3VuZHMgKDEsIGJhdWRfcmF0ZSAvIDI0MDAgKyAx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JiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpOwor ICAgICAgICsrbWNfcm93KQorICAgIHsKKyAgICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9T IChtY19yb3csIGRlc2lyZWRfbWF0cml4KTsKKyAgICAgIGlmIChtY19yb3ctPmVuYWJsZWRfcAor ICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgIHsKKyAgICAgICAg ICBjdXJzb3JfbWF0cml4ID0gZGVzaXJlZF9tYXRyaXg7CisgICAgICAgICAgaWYgKCFmb3JjZV9w ICYmICsrbl91cGRhdGVkICUgcHJlZW1wdF9jb3VudCA9PSAwKQorICAgICAgICAgICAgZGV0ZWN0 X2lucHV0X3BlbmRpbmdfaWdub3JlX3NxdWVlemFibGVzICgpOworICAgICAgICAgIGNoYW5nZWRf cCB8PSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAo IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg Y3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgISBOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkpCisgICAgICAgICAgICAgICAg ICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVy d3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgZHJhd19wKQorICAgICAgICAgICAgICAgICAg ICAgICA6IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0 ZW5fcCk7CisgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0geWIpCisg ICAgICAgICAgICBmb3IgKGludCBpID0gdnBvcyArIDE7IGkgPCB3LT5jdXJyZW50X21hdHJpeC0+ bnJvd3MgLSAxOyArK2kpCisgICAgICAgICAgICAgIFNFVF9NQVRSSVhfUk9XX0VOQUJMRURfUCAo dy0+Y3VycmVudF9tYXRyaXgsIGksIGZhbHNlKTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAg fQorICAgIH0KKworICBjdXJzb3JfbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIC8qIFVwZGF0ZSB0aGUgcmVzdCBvZiB0aGUg bGluZXMuICAqLwogICAgICAgZm9yICg7IHJvdyA8IGVuZCAmJiAoZm9yY2VfcCB8fCAhaW5wdXRf cGVuZGluZyk7ICsrcm93KQogCS8qIHNjcm9sbGluZ193aW5kb3cgcmVzZXRzIHRoZSBlbmFibGVk X3AgZmxhZyBvZiB0aGUgcm93cyBpdApAQCAtMzQ3MSw2ICs1MzI0LDE5IEBAIHVwZGF0ZV93aW5k b3cgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKIAlpZiAocm93LT5lbmFibGVkX3Ap CiAJICB7CiAJICAgIGludCB2cG9zID0gTUFUUklYX1JPV19WUE9TIChyb3csIGRlc2lyZWRfbWF0 cml4KTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMg Ki8KKworICAgICAgICAgIC8qIElmIHRoZSBgY3Vyc29yX3Jvd2AgaXMgd2l0aGluIHRoZSBgZGVz aXJlZF9tYXRyaXhgLCB0aGVuIGl0IHdhcworICAgICAgICAgIHByb2Nlc3NlZCBoZXJlaW5hYm92 ZSBhbmQgc2hvdWxkIGJlIHNraXBwZWQgYXQgdGhpcyB0aW1lLiAqLworICAgICAgICAgIGlmICh2 cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICAgIGNvbnRpbnVlOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAJICAgIGludCBpOwogCiAJICAgIC8qIFdlJ2xsIGhhdmUgdG8g cGxheSBhIGxpdHRsZSBiaXQgd2l0aCB3aGVuIHRvCkBAIC0zNDc5LDggKzUzNDUsMjEgQEAgdXBk YXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCSAgICAgICBjb21t YW5kcyB3aWxsIHRvbyBxdWlja2x5IHBhdXNlIHJlZGlzcGxheS4gICovCiAJICAgIGlmICghZm9y Y2VfcCAmJiArK25fdXBkYXRlZCAlIHByZWVtcHRfY291bnQgPT0gMCkKIAkgICAgICBkZXRlY3Rf aW5wdXRfcGVuZGluZ19pZ25vcmVfc3F1ZWV6YWJsZXMgKCk7Ci0JICAgIGNoYW5nZWRfcCB8PSB1 cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsCi0JCQkJCSAgICAgJm1vdXNlX2ZhY2Vfb3Zlcndy aXR0ZW5fcCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKyAgICAgICAgICBjaGFuZ2VkX3AgfD0gKEJVRkZFUlAgKHctPmNvbnRlbnRzKQor ICAgICAgICAgICAgICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHx8ICEgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192 aXNpYmxlKSkpKQorICAgICAgICAgICAgICAgICAgICAgICA/IG1jX3VwZGF0ZV93aW5kb3dfbGlu ZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgOiB1cGRhdGVfd2luZG93X2xpbmUgKHcs IHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3ApOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKwogCiAJICAgIC8qIE1hcmsgYWxsIHJvd3MgYmVsb3cgdGhlIGxhc3QgdmlzaWJsZSBv bmUgaW4gdGhlIGN1cnJlbnQKIAkgICAgICAgbWF0cml4IGFzIGludmFsaWQuICBUaGlzIGlzIG5l Y2Vzc2FyeSBiZWNhdXNlIG9mCkBAIC0zNTAxLDYgKzUzODAsNDEgQEAgdXBkYXRlX3dpbmRvdyAo c3RydWN0IHdpbmRvdyAqdywgYm9vbCBmb3JjZV9wKQogCiAgICAgc2V0X2N1cnNvcjoKIAorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAvKiBJ ZiB3ZSBqd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IHN0cnVjdCBn bHlwaF9yb3cgKnJvdyA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgaTsKKyAgICAgIGlmICgh cm93LT5lbmFibGVkX3ApCisgICAgICAgIGJyZWFrOworICAgICAgICBlbHNlIGlmIChyb3ctPm1v ZGVfbGluZV9wKQorICAgICAgICAgIGNvbnRpbnVlOworICAgICAgaWYgKHJvdy0+b3ZlcmxhcHBl ZF9wKQorICAgICAgICB7CisgICAgICAgICAgZm9yIChlbnVtIGdseXBoX3Jvd19hcmVhIGFyZWEg PSBMRUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIGksIDAsIHJvdy0+eSwgYXJl YSA9PSBURVhUX0FSRUEgPyByb3ctPnggOiAwKTsKKyAgICAgICAgICAgICAgaWYgKCFtY19yZWRy YXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgcm93LCBhcmVhLCByb3ctPngsIDAsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93LT51c2VkW2FyZWFdLCB0cnVlLCBEUkFX X05PUk1BTF9URVhULAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVQREFURV9X SU5ET1dfX1JFRFJBV19PVkVSTEFQUEVEX1JPV1MpCisgICAgICAgICAgICAgICAgICAmJiByb3ct PnVzZWRbYXJlYV0pCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgRlJBTUVf UklGIChmKS0+d3JpdGVfZ2x5cGhzICh3LCByb3csIHJvdy0+Z2x5cGhzW2FyZWFdLCBhcmVhLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnVzZWRb YXJlYV0pOworICAgICAgICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+Y2xlYXJfZW5kX29mX2xp bmUgKHcsIHJvdywgYXJlYSwgLTEpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0K KyAgICAgICAgICByb3ctPm92ZXJsYXBwZWRfcCA9IDA7CisgICAgICAgIH0KKyAgICAgIGlmIChN QVRSSVhfUk9XX0JPVFRPTV9ZIChyb3cpID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICByZWRyYXdfb3ZlcmxhcHBpbmdf cm93cyAodywgeWIpOwogCSAgICB9CiAjZW5kaWYKQEAgLTM1MzYsOCArNTQ5MiwyMCBAQCB1cGRh dGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGZvcmNlX3ApCiAjZW5kaWYKIAogI2lm ZGVmIEhBVkVfV0lORE9XX1NZU1RFTQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAg ICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAg ICBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHcsIDApOworICAgIGVsc2UKICAgICAgIHVwZGF0 ZV93aW5kb3dfZnJpbmdlcyAodywgMCk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgICAgIC8qIEVuZCB0aGUgdXBkYXRlIG9mIHdpbmRvdyBXLiAgRG9uJ3Qgc2V0IHRoZSBjdXJz b3IgaWYgd2UKICAgICAgICAgIHBhdXNlZCB1cGRhdGluZyB0aGUgZGlzcGxheSBiZWNhdXNlIGlu IHRoaXMgY2FzZSwKICAgICAgICAgIHNldF93aW5kb3dfY3Vyc29yX2FmdGVyX3VwZGF0ZSBoYXNu J3QgYmVlbiBjYWxsZWQsIGFuZApkaWZmIC0tZ2l0IGEvc3JjL2ZyYW1lLmggYi9zcmMvZnJhbWUu aAppbmRleCBmYTQ1YTMyLi41M2FkMTMxIDEwMDY0NAotLS0gYS9zcmMvZnJhbWUuaAorKysgYi9z cmMvZnJhbWUuaApAQCAtMjA1LDYgKzIwNSwxNiBAQCBzdHJ1Y3QgZnJhbWUKICAgTGlzcF9PYmpl Y3QgdG9vbF9iYXJfaXRlbXM7CiAgIC8qIHRvb2xfYmFyX2l0ZW1zIHNob3VsZCBiZSB0aGUgbGFz dCBMaXNwX09iamVjdCBtZW1iZXIuICAqLwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIE5vbi1uaWwgd2hlbiB0aGUgZnJhbWUgaXMg aW4gdGhlIHByb2Nlc3Mgb2YgYmVpbmcgdXBkYXRlZC4gKi8KKyAgc3RydWN0IGZyYW1lICptY191 cGRhdGluZ19mcmFtZTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBDYWNo ZSBvZiByZWFsaXplZCBmYWNlcy4gICovCiAgIHN0cnVjdCBmYWNlX2NhY2hlICpmYWNlX2NhY2hl OwogCmRpZmYgLS1naXQgYS9zcmMvZnJpbmdlLmMgYi9zcmMvZnJpbmdlLmMKaW5kZXggZDBkNTk5 Mi4uNjYzODVmZiAxMDA2NDQKLS0tIGEvc3JjL2ZyaW5nZS5jCisrKyBiL3NyYy9mcmluZ2UuYwpA QCAtNDM3LDggKzQzNyw0NjIgQEAgc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4uLiIKKyAg ICAgICJ4Li4uLi4uLiIKKyAgICAgICJ4Li4uLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNo b3J0IG1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvd19iaXRzW10gPXsKKyAgMHg4MCwgMHg4MCwg MHg4MCwgMHg5OCwgMHg4YywgMHg4NiwgMHhiZiwKKyAgMHhiZiwgMHg4NiwgMHg4YywgMHg5OCwg MHg4MCwgMHg4MCwgMHg4MH07CisKKy8qIDI1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4 IgorICAgICAgIi54eC4uLnh4IgorICAgICAgIi4ueHguLnh4IgorICAgICAgIi4uLnh4Lnh4Igor ICAgICAgInh4eHh4eHh4IgorICAgICAgInh4eHh4eHh4IgorICAgICAgIi4uLnh4Lnh4IgorICAg ICAgIi4ueHguLnh4IgorICAgICAgIi54eC4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAg Ii4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweDMsIDB4 MywgMHgzLCAweDYzLCAweDMzLCAweDFiLCAweGZmLCAweGZmLCAweDFiLCAweDMzLCAweDYzLCAw eDMsIDB4MywgMHgzfTsKKworLyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieC4ueHguLngiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4uLi54eHgiCisgICAg ICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eHgiCisgICAgICAi eC4uLnh4LngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19o b2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgx LCAweDk5LCAweDhkLCAweDg3LCAweGJmLAorICAweGJmLCAweDg3LCAweDhkLCAweDk5LCAweDgx LCAweDgxLCAweGZmfTsKKworLyogMjcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiCisg ICAgICAieC54eC4ueHgiCisgICAgICAieC4ueHgueHgiCisgICAgICAieC4uLnh4eHgiCisgICAg ICAieHh4eHh4eHgiCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLnh4eHgiCisgICAgICAi eC4ueHgueHgiCisgICAgICAieC54eC4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4u Li4ueHgiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19y ZXZlcnNlZF9ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAw eDgxLCAweDgxLCAweGIxLCAweDk5LCAweDhkLCAweGZmLAorICAweGZmLCAweDhkLCAweDk5LCAw eGIxLCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAw eDgxLCAweDgxLCAweDgxLCAweDgxLAorICAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAw eDgxLCAweGZmfTsKKworLyogMjkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4u Li4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0 aWNhbF9iYXJfYml0c1tdID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAs IDB4ODAsCisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODB9OworCisv KiAzMAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi54eCIK KyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAg ICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAg ICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIu Li4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4u Li54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jh cl9iaXRzW10gPXsKKyAgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4 MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDN9OworCisvKiAzMQorICAgICgrLWZyaW5nZS1oZWxw ZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAg ICIgeHguLi4uLiIKKyAgICAgICIueHguLi4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIu Lnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi4u eHguLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLnh4 LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2ln bmVkIHNob3J0IG1jX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2 MCwgMHgzMCwgMHgzMCwgMHgxOCwgMHgxOCwgMHhjLCAweGMsIDB4NiwgMHg2LCAweDMsIDB4M307 CisKKy8qIDMyCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4u Li4uIgorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgInh4eC4uLi4u IgorICAgICAgIngueHguLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAgInguLnh4Li4uIgor ICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi54eC4uIgorICAg ICAgInguLi4ueHguIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4uLnh4IgorICAgICAg InguLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX2Jh Y2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwg MHg5OCwKKyAgMHg5OCwgMHg4YywgMHg4YywgMHg4NiwgMHg4NiwgMHg4MywgMHg4M307CisKKy8q IDMzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi54eHh4eHguIgor ICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4uIgorICAg ICAgIi54eHgueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAg Ii4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4u LngueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcGlsY3Jvd19iaXRzW10gPXsK KyAgMHg3ZSwgMHhmNCwgMHhmNCwgMHhmNCwgMHg3NCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwg MHgxNCwgMHgxNH07CisKKy8qIDM0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAor ICAgICAgIi4ueHh4eC4uIgorICAgICAgIi54eHh4eHguIgorICAgICAgInguLnh4Li54IgorICAg ICAgInguLnh4Li54IgorICAgICAgInh4eHh4eHh4IgorICAgICAgInh4Li4uLnh4IgorICAgICAg Inh4eC4ueHh4IgorICAgICAgIi54eHh4eHguIgorICAgICAgIi4ueHh4eC4uIikKKyovCitzdGF0 aWMgdW5zaWduZWQgc2hvcnQgbWNfc21pbGV5X2ZhY2VfYml0c1tdID17CisgIDB4M2MsIDB4N2Us IDB4OTksIDB4OTksIDB4ZmYsIDB4YzMsIDB4ZTcsIDB4N2UsIDB4M2N9OworCisvKiAzNQorICAg ICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLnguLi4uLiIKKyAgICAgICIu Li54Li4uLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi4uLnguLiIKKyAgICAgICIuLi4u eC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLnguLi4uLiIpCisqLworc3RhdGljIHVu c2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9yaWdodF9iaXRzW10gPXsKKyAgMHgyMCwgMHgx MCwgMHg4LCAweDQsIDB4OCwgMHgxMCwgMHgyMH07CisKKy8qIDM2CisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAg ICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAg Ii4uLi54Li4uIgorICAgICAgIi4uLi4ueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0c1tdID17CisgIDB4NCwgMHg4LCAweDEwLCAweDIwLCAw eDEwLCAweDgsIDB4NH07CisKKy8qIDM3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1h bAorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54eC54eC4uIgorICAgICAgIi4ueHgueHguIgor ICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgueHguIgorICAgICAgIi54eC54eC4uIgorICAg ICAgInh4Lnh4Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xl X3JpZ2h0X2JpdHNbXSA9eworICAweGQ4LCAweDZjLCAweDM2LCAweDFiLCAweDM2LCAweDZjLCAw eGQ4fTsKKworLyogMzgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAi Li4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgu eHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgu eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfbGVmdF9iaXRz W10gPXsKKyAgMHgxYiwgMHgzNiwgMHg2YywgMHhkOCwgMHg2YywgMHgzNiwgMHgxYn07CisKKy8q IDM5CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIngueC54Li4uIgor ICAgICAgIi54LngueC4uIgorICAgICAgIi4ueC54LnguIgorICAgICAgIi4uLngueC54IgorICAg ICAgIi4ueC54LnguIgorICAgICAgIi54LngueC4uIgorICAgICAgIngueC54Li4uIikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAw eGE4LCAweDU0LCAweDJhLCAweDE1LCAweDJhLCAweDU0LCAweGE4fTsKKworLyogNDAKKyAgICAo Ky1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueC54LngiCisgICAgICAiLi54 LngueC4iCisgICAgICAiLngueC54Li4iCisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54 Li4iCisgICAgICAiLi54LngueC4iCisgICAgICAiLi4ueC54LngiKQorKi8KK3N0YXRpYyB1bnNp Z25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxNSwgMHgyYSwg MHg1NCwgMHhhOCwgMHg1NCwgMHgyYSwgMHgxNX07CisKKy8qIDQxCisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAg ICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAg Ii4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4u Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX3VwX2JpdHNb XSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDgyLCAw eDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54 Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4i CisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQor Ki8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfZG93bl9iaXRzW10gPXsK KyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwg MHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgor ICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAg Ii4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3Vw X2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAw eDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmlu Z2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4i CisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19kb3VibGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHg4Miwg MHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMH07CisK Ky8qIDQ1CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgor ICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAg InguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAw eDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwfTsKKworLyogNDYK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAi eC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4u Li4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFk cnVwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5 MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMH07CisKKy8qIDQ3Cisg ICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLnguLi4uIgorICAgICAg Ii4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4u eC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4u IgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfcXVhZHJ1cGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDEwLCAweDI4LCAw eDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0 LCAweDgyfTsKKworLyogNDgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAi eC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4u eC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4u eC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4i KQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfZG93bl9iaXRzW10g PXsKKyAgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgy OCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMH07CisKIC8qIE5PVEU6ICBUaGUgb3JkZXIgb2YgdGhl c2UgYml0bWFwcyBtdXN0IG1hdGNoIHRoZSBzZXF1ZW5jZQotICAgdXNlZCBpbiBmcmluZ2UuZWwg dG8gZGVmaW5lIHRoZSBjb3JyZXNwb25kaW5nIHN5bWJvbHMuICAqLworICAgdXNlZCBpbiBmcmlu Z2UuZWwgdG8gZGVmaW5lIHRoZSBjb3JyZXNwb25kaW5nIHN5bWJvbHMuICovCiAKIHN0YXRpYyBz dHJ1Y3QgZnJpbmdlX2JpdG1hcCBzdGFuZG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ZXRfZnJpbmdlX2JpdG1hcCAoc3RydWN0IHdpbmRvdyAqdywg TGlzcF9PYmplY3QgYml0bWFwLCBpbnQgcmlnaHRfcCwgaW50IHBhcnRpYWxfcCkKK3sKKyAgTGlz cF9PYmplY3QgY21hcCwgYm0xID0gUW5pbCwgYm0yID0gUW5pbCwgYm07CisgIEVNQUNTX0lOVCBs bjEgPSAwLCBsbjIgPSAwOworICBpbnQgaXgxID0gcmlnaHRfcDsKKyAgaW50IGl4MiA9IGl4MSAr IChwYXJ0aWFsX3AgPyAyIDogMCk7CisgIGlmICgoY21hcCA9IEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpLCAhTklMUCAoY21hcCkpCisgICAgewor ICAgICAgYm0xID0gbWNfYXNzcSAoYml0bWFwLCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0x KSkKKyAgeworICAgIGlmICgoYm0xID0gWENEUiAoYm0xKSksIE5JTFAgKGJtMSkpCisgICAgICBy ZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICBpZiAoQ09OU1AgKGJtMSkpCisgICAgICB7 CisgICAgICAgIGxuMSA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMSkpOworICAgICAgICBpZiAocGFy dGlhbF9wKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmIChsbjEgPiBpeDIpCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgyLCBibTEpOworICAgICAg ICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5k OworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4MSkKKyAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICBibSA9IG1jX250aCAoaXgxLCBibTEpOworICAgICAgICAgICAgICAg ICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICB9CisgICAgZWxzZSBpZiAoKGJt ID0gYm0xLCAhRVEgKGJtLCBRdCkpKQorICAgICAgZ290byBmb3VuZDsKKyAgfQorICAgIH0KKyAg aWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9h bGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2lu ZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IG1jX2Fzc3EgKGJpdG1hcCwgQlZB UiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpOworICAgICAgaWYg KENPTlNQIChibTIpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibTIgPSBYQ0RSIChibTIp KSwgIU5JTFAgKGJtMikpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChDT05TUCAo Ym0yKSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBsbjIgPSBYRklYTlVN IChGbGVuZ3RoIChibTIpKTsKKyAgICAgICAgICAgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBpZiAobG4yID4gaXgyKQor ICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBibSA9 IG1jX250aCAoaXgyLCBibTIpOworICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIUVRIChi bSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChsbjEgPiBpeDEpCisg ICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgIGlmICghRVEgKGJtLCBR dCkpCisgICAgICAgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAobG4yID4gaXgxKQorICAgIHsK KyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQor ICAgICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7Cisg ICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJtMiwgTklMUCAoYm0pKSkKKyAgICAgIHJldHVybiBN Q19OT19GUklOR0VfQklUTUFQOworICBmb3VuZDoKKyAgcmV0dXJuIGxvb2t1cF9mcmluZ2VfYml0 bWFwIChibSk7Cit9CisKK3N0YXRpYyBpbnQKK21jX2dldF9sb2dpY2FsX2N1cnNvcl9iaXRtYXAg KHN0cnVjdCB3aW5kb3cgKncsIExpc3BfT2JqZWN0IGN1cnNvcikKK3sKKyAgTGlzcF9PYmplY3Qg Y21hcCwgYm0gPSBRbmlsOworICBpZiAoKGNtYXAgPSBCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIGZyaW5nZV9jdXJzb3JfYWxpc3QpKSwgIU5JTFAgKGNtYXApKQorICAgIHsKKyAgICAgIGJt ID0gbWNfYXNzcSAoY3Vyc29yLCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0pKQorICAgICAg ICB7CisgICAgICAgICAgaWYgKChibSA9IFhDRFIgKGJtKSksIE5JTFAgKGJtKSkKKyAgICAgICAg ICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIHJldHVybiBsb29rdXBf ZnJpbmdlX2Jpd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cmlnaHQKKyAgSWYgYW55IHZhbHVlIGluIGxv Y2FsIGJpbmRpbmcgaXMgbm90IHByZXNlbnQgb3IgdCwgdXNlIGdsb2JhbCB2YWx1ZS4KKyAgICAg SWYgcGFydGlhbCwgbG9va3VwIHBhcnRpYWwgYml0bWFwIGluIGRlZmF1bHQgdmFsdWUgaWYgbm90 IGZvdW5kIGhlcmUuCisgICAgIElmIG5vdCBwYXJ0aWFsLCBvciBubyBwYXJ0aWFsIHNwZWMgaXMg cHJlc2VudCwgdXNlIG5vbi1wYXJ0aWFsIGJpdG1hcC4gKi8KKyAgaWYgKChjbWFwID0gQlZBUiAo WEJVRkZFUiAody0+Y29udGVudHMpLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSksICFOSUxQIChj bWFwKSkKKyAgICB7CisgICAgICBibTEgPSBtY19hc3NxIChiaXRtYXAsIGNtYXApOworICAgICAg aWYgKENPTlNQIChibTEpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibTEgPSBYQ0RSIChi bTEpKSwgTklMUCAoYm0xKSkKKyAgICAgICAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQ OworICAgICAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgbG4xID0gWEZJWE5VTSAoRmxlbmd0aCAoYm0xKSk7CisgICAgICAgICAgICAgIGlmIChwYXJ0 aWFsX3ApCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4 MikKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNf bnRoIChpeDIsIGJtMSk7CisgICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkK KyAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAobG4xID4gaXgxKQorICAgICAgICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJt MSk7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKChi bSA9IGJtMSwgIUVRIChibSwgUXQpKSkKKyAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAg ICAgfQorICAgIH0KKyAgaWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJp bmdlX2luZGljYXRvcl9hbGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZh dWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IG1jX2Fz c3EgKGJpdG1hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlz dCkpOworICAgICAgaWYgKENPTlNQIChibTIpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChi bTIgPSBYQ0RSIChibTIpKSwgIU5JTFAgKGJtMikpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIGlmIChDT05TUCAoYm0yKSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICBsbjIgPSBYRklYTlVNIChGbGVuZ3RoIChibTIpKTsKKyAgICAgICAgICAgICAgICAgIGlmIChw YXJ0aWFsX3ApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBp ZiAobG4yID4gaXgyKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICAgICAgICBibSA9IG1jX250aCAoaXgyLCBibTIpOworICAgICAgICAgICAgICAgICAgICAg ICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8g Zm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlm IChsbjEgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAg IGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAobG4y ID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7CisgICAgICBpZiAo IUVRIChibSwgUXQpKQorICAgICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJuIE1DX05PX0ZS SU5HRV9CSVRNQVA7CisgICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJtMiwgTklMUCAoYm0pKSkK KyAgICAgIHJldHVybiBNQ19OT19GUklOR0VfQklUTUFQOworICBmb3VuZDoKKyAgcmV0dXJuIGxv b2t1cF9mcmluZ2VfYml0bWFwIChibSk7Cit9CisKKy8qIFJlY2FsY3VsYXRlIHRoZSBiaXRtYXBz IHRvIHNob3cgaW4gdGhlIGZyaW5nZXMgb2Ygd2luZG93IFcuCisgICBPbmx5IG1hcmsgcm93cyB3 aXRoIG1vZGlmaWVkIGJpdG1hcHMgZm9yIHVwZGF0ZSBpbiByZWRyYXdfZnJpbmdlX2JpdG1hcHNf cC4KKyAgIElmIEtFRVBfQ1VSUkVOVF9QIGlzIDAsIHVwZGF0ZSBjdXJyZW50X21hdHJpeCB0b28u ICovCitib29sCittY191cGRhdGVfd2luZG93X2ZyaW5nZXMgKHN0cnVjd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ZXVkb193aW5kb3dfcCkKKyAgICByZXR1cm4gMDsKKyAgaWYgKCFNSU5JX1dJ TkRPV19QICh3KQorICAgICAgJiYgKGluZCA9IEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg aW5kaWNhdGVfYnVmZmVyX2JvdW5kYXJpZXMpLCAhTklMUCAoaW5kKSkpCisgICAgeworICAgICAg aWYgKEVRIChpbmQsIFFsZWZ0KSB8fCBFUSAoaW5kLCBRcmlnaHQpKQorICAgICAgICBib3VuZGFy eV90b3AgPSBib3VuZGFyeV9ib3QgPSBhcnJvd190b3AgPSBhcnJvd19ib3QgPSBpbmQ7CisgICAg ICAgIGVsc2UgaWYgKENPTlNQIChpbmQpCisgICAgICAgICAgICAgICAgICYmIENPTlNQIChYQ0FS IChpbmQpKSkKKyAgICAgICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IHBvczsKKyAgICAgICAg ICBpZiAocG9zID0gbWNfYXNzcSAoUXQsIGluZCksICFOSUxQIChwb3MpKQorICAgICAgICAgICAg Ym91bmRhcnlfdG9wID0gYm91bmRhcnlfYm90ID0gYXJyb3dfdG9wID0gYXJyb3dfYm90ID0gWENE UiAocG9zKTsKKyAgICAgICAgICBpZiAocG9zID0gbWNfYXNzcSAoUXRvcCwgaW5kKSwgIU5JTFAg KHBvcykpCisgICAgICAgICAgICBib3VuZGFyeV90b3AgPSBYQ0RSIChwb3MpOworICAgICAgICAg IGlmIChwb3MgPSBtY19hc3NxIChRYm90dG9tLCBpbmQpLCAhTklMUCAocG9zKSkKKyAgICAgICAg ICAgIGJvdW5kYXJ5X2JvdCA9IFhDRFIgKHBvcyk7CisgICAgICAgICAgaWYgKHBvcyA9IG1jX2Fz c3EgKFF1cCwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBhcnJvd190b3AgPSBYQ0RS IChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRZG93biwgaW5kKSwgIU5JTFAg KHBvcykpCisgICAgICAgICAgICBhcnJvd19ib3QgPSBYQ0RSIChwb3MpOworICAgICAgICB9Cisg ICAgICAgIGVsc2UKKyAgICAgICAgICAvKiBBbnl0aGluZyBlbHNlIG1lYW5zIGJvdW5kYXJ5IG9u IGxlZnQgYW5kIG5vIGFycm93cy4gKi8KKyAgICAgICAgICBib3VuZGFyeV90b3AgPSBib3VuZGFy eV9ib3QgPSBRbGVmdDsKKyAgICB9CisgIHRvcF9pbmRfcm4gPSBib3RfaW5kX3JuID0gLTE7Cisg IGlmICghTklMUCAoaW5kKSkKKyAgICB7CisgICAgICBmb3IgKHkgPSB3LT52c2Nyb2xsLCBybiA9 IDA7CisgICAgICAgICAgIHkgPCB5YiAmJiBybiA8IG5yb3dzOworICAgICAgICAgICB5ICs9IHJv dy0+aGVpZ2h0LCArK3JuKQorICAgICAgICB7CisgICAgICAgICAgcm93ID0gdy0+ZGVzaXJlZF9t YXRyaXgtPnJvd3MgKyBybjsKKyAgICAgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAg ICAgICAgcm93ID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyBybjsKKyAgICAgICAgICByb3ct PmluZGljYXRlX2JvYl9wID0gcm93LT5pbmRpY2F0ZV90b3BfbGluZV9wID0gMDsKKyAgICAgICAg ICByb3ctPmluZGljYXRlX2VvYl9wID0gcm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wID0gMDsK KyAgICAgICAgICBpZiAoIXJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIGlmICh0b3BfaW5kX3JuIDwgMCAmJiByb3ctPnZpc2libGVfaGVpZ2h0ID4gMCkKKyAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAoTUFUUklYX1JPV19TVEFSVF9D SEFSUE9TIChyb3cpIDw9IEJVRl9CRUdWIChYQlVGRkVSICh3LT5jb250ZW50cykpCisgICAgICAg ICAgICAgICAgICAgICAgJiYgIU1BVFJJWF9ST1dfUEFSVElBTExZX1ZJU0lCTEVfQVRfVE9QX1Ag KHcsIHJvdykpCisgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5kaWNhdGVfYm9iX3AgPSAhTklM UCAoYm91bmRhcnlfdG9wKTsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgICAgICAgIHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCA9ICFOSUxQIChhcnJvd190b3ApOwor ICAgICAgICAgICAgICAgICAgdG9wX2luZF9ybiA9IHJuOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgaWYgKGJvdF9pbmRfcm4gPCAwKQorICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgIGlmIChNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID49IEJVRl9aViAo WEJVRkZFUiAody0+Y29udGVudHMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFNQVRSSVhf Uk9XX1BBUlRJQUxMWV9WSVNJQkxFX0FUX0JPVFRPTV9QICh3LCByb3cpKQorICAgICAgICAgICAg ICAgICAgICByb3ctPmluZGljYXRlX2VvYl9wID0gIU5JTFAgKGJvdW5kYXJ5X2JvdCksIGJvdF9p bmRfcm4gPSBybjsKKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoeSArIHJvdy0+aGVpZ2h0 ID49IHliKQorICAgICAgICAgICAgICAgICAgICAgIHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVf cCA9ICFOSUxQIChhcnJvd19ib3QpLCBib3RfaW5kX3JuID0gcm47CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorICBlbXB0eV9wb3MgPSBCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGluZGljYXRlX2VtcHR5X2xpbmVzKTsKKyAgaWYgKCFOSUxQ IChlbXB0eV9wb3MpICYmICFFUSAoZW1wdHlfcG9zLC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gYm90X2luZF9tYXhfeSA9IC0x OworICBpZiAodG9wX2luZF9ybiA+PSAwKQorICAgIHsKKyAgICAgIGludCBibiA9IE1DX05PX0ZS SU5HRV9CSVRNQVA7CisgICAgICByb3cgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHRvcF9p bmRfcm47CisgICAgICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICByb3cgPSB3LT5jdXJy ZW50X21hdHJpeC0+cm93cyArIHRvcF9pbmRfcm47CisgICAgICB0b3Bfcm93X2VuZHNfYXRfenZf cCA9IHJvdy0+ZW5kc19hdF96dl9wOworICAgICAgaWYgKHJvdy0+aW5kaWNhdGVfYm9iX3ApCisg ICAgICAgIHsKKyAgICAgICAgICBpZiAoRVEgKGJvdW5kYXJ5X3RvcCwgUWxlZnQpKQorICAgICAg ICAgICAgYm4gPSAoKHJvdy0+aW5kaWNhdGVfZW9iX3AgJiYgRVEgKGJvdW5kYXJ5X2JvdCwgUWxl ZnQpKQorICAgICAgICAgICAgICAgICAgPyBNQ19MRUZUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20s IHJvdy0+ZW5kc19hdF96dl9wKQorICAgICAgICAgICAgICAgICAgOiBNQ19MRUZUX0ZSSU5HRSAo MiwgUXRvcCwgMCkpOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBibiA9ICgocm93 LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBRcmlnaHQpKQorICAgICAgICAg ICAgICAgICAgICA/IE1DX1JJR0hUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20sIHJvdy0+ZW5kc19h dF96dl9wKQorICAgICAgICAgICAgICAgICAgICA6IE1DX1JJR0hUX0ZSSU5HRSAoMiwgUXRvcCwg MCkpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVf cCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoRVEgKGFycm93X3RvcCwgUWxlZnQpKQor ICAgICAgICAgICAgICBibiA9IE1DX0xFRlRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDYsIFF1cCwg MCk7CisgICAgICAgICAgfQorICAgICAgaWYgKGJuICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisg ICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCAqZmIgPSBnZXRfZnJpbmdl X2JpdG1hcF9kYXRhIChibik7CisgICAgICAgICAgaWYgKGZiLT5hbGlnbiA9PSBBTElHTl9CSVRN QVBfVE9QICYmIGZiLT5wZXJpb2QgPT0gMCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg c3RydWN0IGdseXBoX3JvdyAqcm93MTsKKyAgICAgICAgICAgICAgaW50IHRvcF9pbmRfbWF4X3k7 CisgICAgICAgICAgICAgIHRvcF9pbmRfbWluX3kgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hU ICh3KTsKKyAgICAgICAgICAgICAgdG9wX2luZF9tYXhfeSA9IHRvcF9pbmRfbWluX3kgKyBmYi0+ aGVpZ2h0OworICAgICAgICAgICAgICBpZiAodG9wX2luZF9tYXhfeSA+IHliKQorICAgICAgICAg ICAgICAgIHRvcF9pbmRfbWF4X3kgPSB5YjsKKyAgICAgICAgICAgICAgZm9yICh5ID0gcm93LT55 ICsgcm93LT5oZWlnaHQsIHJuID0gdG9wX2luZF9ybiArIDE7CisgICAgICAgICAgICAgICAgICAg eSA8IHRvcF9pbmRfbWF4X3kgJiYgcm4gPCBucm93czsKKyAgICAgICAgICAgICAgICAgICB5ICs9 IHJvdzEtPmhlaWdodCwgcm4rKykKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICBpZiAoYm90X2luZF9ybiA+PSAwICYmIHJuID49IGJvdF9pbmRfcm4pCisgICAgICAgICAgICAg ICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmRlc2lyZWRfbWF0cml4 LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICBpZiAoIXJvdzEtPmVuYWJsZWRfcCkKKyAg ICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47Cisg ICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV9ib2JfcCA9IHJvdy0+aW5kaWNhdGVfYm9i X3A7CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV90b3BfbGluZV9wID0gcm93LT5p bmRpY2F0ZV90b3BfbGluZV9wOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAg ICAgICAgfQorICAgIH0KKyAgaWYgKGJvdF9pbmRfcm4gPj0gMCkKKyAgICB7CisgICAgICBpbnQg Ym4gPSBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgcm93ID0gdy0+ZGVzaXJlZF9tYXRyaXgt PnJvd3MgKyBib3RfaW5kX3JuOworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAg cm93ID0gdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MgKyBib3RfaW5kX3JuOworICAgICAgYm90X3Jv d19lbmRzX2F0X3p2X3AgPSByb3ctPmVuZHNfYXRfenZfcDsKKyAgICAgIGlmIChyb3ctPmluZGlj YXRlX2VvYl9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKEVRIChib3VuZGFyeV9ib3QsIFFs ZWZ0KSkKKyAgICAgICAgICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDMsIFFib3R0b20sIHJvdy0+ ZW5kc19hdF96dl9wKTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgYm4gPSBNQ19S SUdIVF9GUklOR0UgKDMsIFFib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKTsKKyAgICAgICAgfQor ICAgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3ApCisgICAgICAgICAg eworICAgICAgICAgICAgaWYgKEVRIChhcnJvd19ib3QsIFFsZWZ0KSkKKyAgICAgICAgICAgICAg Ym4gPSBNQ19MRUZUX0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAg ICAgICB9CisgICAgICBpZiAoYm4gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgewor ICAgICAgICAgIHN0cnVjdCBmcmluZ2VfYml0bWFwICpmYiA9IGdldF9mcmluZ2VfYml0bWFwX2Rh dGEgKGJuKTsKKyAgICAgICAgICBpZiAoZmItPmFsaWduID09IEFMSUdOX0JJVE1BUF9CT1RUT00g JiYgZmItPnBlcmlvZCA9PSAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3cxOworICAgICAgICAgICAgICBpbnQgYm90X2luZF9taW5feTsKKyAgICAg ICAgICAgICAgYm90X2luZF9tYXhfeSA9IHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQ7Cisg ICAgICAgICAgICAgIGJvdF9pbmRfbWluX3kgPSBib3RfaW5kX21heF95IC0gZmItPmhlaWdodDsK KyAgICAgICAgICAgICAgaWYgKGJvdF9pbmRfbWluX3kgPCBXSU5ET1dfSEVBREVSX0xJTkVfSEVJ R0hUICh3KSkKKyAgICAgICAgICAgICAgICBib3RfaW5kX21pbl95ID0gV0lORE9XX0hFQURFUl9M SU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSwgcm4gPSBib3Rf aW5kX3JuIC0gMTsKKyAgICAgICAgICAgICAgICAgICB5ID49IGJvdF9pbmRfbWluX3kgJiYgcm4g Pj0gMDsKKyAgICAgICAgICAgICAgICAgICB5IC09IHJvdzEtPmhlaWdodCwgcm4tLSkKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAodG9wX2luZF9ybiA+PSAwICYmIHJu IDw9IHRvcF9pbmRfcm4pCisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAg ICAgICAgcm93MSA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAg ICAgICBpZiAoIXJvdzEtPmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgcm93MSA9IHct PmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRp Y2F0ZV9lb2JfcCA9IHJvdy0+aW5kaWNhdGVfZW9iX3A7CisgICAgICAgICAgICAgICAgICByb3cx LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wID0gcm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgYm9v bCBhdXRvX2hzY3JvbGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRvX2hz Y3JvbGxfbW9kZSwgdy0+Y29udGVudHMpLCBRY3VycmVudF9saW5lKTsKKyAgLyogRVhBTVBMRTog IChzY3JvbGwtbGVmdCA1KSAqLworICBib29sIGhzY2xfYWxsX3RlbXBfcCA9ICh3LT5zdXNwZW5k X2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxf bW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFN UExFOiAgQy11IEMteCA8IGFuZCBkbyBub3RoaW5nLiAqLworICBib29sIGhzY2xfYWxsX3Blcm1f MF9wID0gKHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hz Y3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwg PT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGlu ZyBlbHNlIGJlc2lkZXMgaG9yaXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAgICAgICAgICAgICAg IGN1cnJlbnQgbGluZSBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBp cyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNj bF9hbGxfcGVybV8xX3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5k IC4uLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBz Y3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+ c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRv X2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9s bCA9PSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAw CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgIT0gdy0+aHNj cm9sbCk7CisgIC8qIEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0 aGUgbGVmdCBhcnJvdyBrZXkgb25lIHRpbWUuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUg X2lzXyBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAgYm9vbCBoc2NsX3Rl bXBfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAm JiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9s bCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAg LyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBj dXJyZW50IGxpbmUgdG8gYmUKKyAgICAgICAgICAgICAgIGhvcml6b250YWxseSBzY3JvbGxlZCBk aWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxs eSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1fcCA9ICghdy0+c3Vz cGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxf bW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAg ICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5taW5faHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgc3RydWN0IGZyYW1lICpmID0g WEZSQU1FICh3LT5mcmFtZSk7CisgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJuID0gMDsKKyAgICAg ICB5IDwgeWIgJiYgcm4gPCBucm93czsKKyAgICAgICB5ICs9IHJvdy0+aGVpZ2h0LCBybisrKQor ICAgIHsKKyAgaW50IGxlZnQsIHJpZ2h0OworICB1bnNpZ25lZCBsZWZ0X2ZhY2VfaWQsIHJpZ2h0 X2ZhY2VfaWQ7CisgIGludCBsZWZ0X29mZnNldCwgcmlnaHRfb2Zmc2V0OworICBib29sIHBlcmlv ZGljX3A7CisgIHJvdyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgIGN1ciA9IHct PmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgIGludCB2bnRoX2RtID0gTUFUUklYX1JPV19W UE9TICh3LT5kZXNpcmVkX21hdHJpeC0+cm93cyArIHJuLCB3LT5kZXNpcmVkX21hdHJpeCk7Cisg IGludCB2bnRoX2NtID0gTUFUUklYX1JPV19WUE9TICh3LT5jdXJyZW50X21hdHJpeC0+cm93cyAr IHJuLCB3LT5jdXJyZW50X21hdHJpeCk7CisgIGVudW0gbWNfcm93X3Bvc2l0aW9uIHJvd19wb3Np dGlvbiA9IG1jX3Jvd19wb3NpdGlvbiAodywgY3VyLCBjdXIsIHZudGhfY20pOworICBpbnQgbWNf bGVmdF9mcmluZ2VfYml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgaW50IG1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yAgICAgIC8vICBpbnQgaCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhf Y21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uaDsKKyAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUg Y3Vyc29yX3R5cGUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmN1cnNvcl90eXBlOworICAgICAgLy8gIGludCBjdXJzb3Jfd2lkdGggPSB3LT5tY19t YXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmN1cnNvcl93aWR0aDsK KyAgICAgIC8vICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZyA9IHsucmVkID0gdy0+bWNfbWF0cml4LnZw b3Nbdm50aF9jbV0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5yZWQsCisgICAgICAvLyAgICAg ICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF9jbV0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ncmVlbiwKKyAgICAgIC8vICAgICAgICAgICAgICAg ICAgICAgICAgICAuYmx1ZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hl X3R5cGVdW250aF0uZmcuYmx1ZX07CisgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7 LnJlZCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u YmcucmVkLAorICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuZ3JlZW4sCisg ICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgYm9vbCBh Y3RpdmVfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uYWN0aXZlX3A7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSB3LT5tY19t YXRyaXgudnBvc1t2bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvcjsK KyAgICAgIGJvb2wgZW5hYmxlZF9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF9jbV0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICBpZiAoKHZwb3MgPT0gdm50aF9kbSB8 fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJM QVlfQVJST1dfQklUTUFQCisgICAgICAgICAgJiYgIWhzY2xfYWxsX3RlbXBfcAorICAgICAgICAg ICYmICFoc2NsX3RlbXBfcAorICAgICAgICAgICYmICFoc2NsX3Blcm1fcAorICAgICAgICAgICYm ICFoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzFfcAorICAg ICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAg ICAgICAgeworICAgICAgICAgIGludCBmcmluZ2VfYml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1B UDsKKyAgICAgICAgICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAg ICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgICA/IGxvb2t1 cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1pbmFjdGl2ZS1w cmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgIDogKGFjdGl2 ZV9wKQorICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAo Iistb3ZlcmxheS1hcnJvdy1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAg ICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2Zh Y2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2VfaWQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAg ICAgIGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNf Z2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJvdyIpLCBmYWxzZSwg dHJ1ZSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBt Y19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFycm93IiksIHRydWUs IHRydWUpOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9 PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoKHZwb3Mg PT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgICAgICAgICYmIGdseXBo X2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUAorICAgICAgICAgICAgICAgICAmJiAo aHNjbF9hbGxfdGVtcF9wCisgICAgICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBf cAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8xX3AKKyAgICAgICAgICAg ICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgICAgICAgICAgICB8fCBo c2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJtX3ApCisgICAgICAg ICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgZnJp bmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgICBlbnVtIGZhY2Vf aWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICAgKCFhY3RpdmVfcAorICAg ICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfaW5h Y3RpdmVfd2luZG93cykpKQorICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWluYWN0aXZlLXByZS16di1mYWNlIiks IEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAg ICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3Zlcmxh eS1hcnJvdy1oc2NsLXByZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAg ICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2Zh Y2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAg ICAgICAgICAgIGlmIChoc2NsX2FsbF9wZXJtXzBfcCkKKyAgICAgICAgICAgICAgZnJpbmdlX2Jp dG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCBm YWxzZSwgZmFsc2UpOworICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzFfcCkK KyAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcs IGludGVybiAoIistaHNjbC1wZXJtIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICBl bHNlIGlmIChoc2NsX2FsbF9wZXJtXzJfcCkKKyAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRt YXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFs c2UsIHRydWUpOworICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF9wZXJtX3ApCisgICAg ICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywg aW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAg IGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgICAgICBmcmluZ2Vf Yml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10ZW1wIiks IGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF90ZW1w X3ApCisgICAgICAgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5n ZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAg ICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZS SU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBmcmlu Z2VfYml0bWFwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19G UklOR0VfQklUTUFQOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmICgodnBvcyA9PSB2 bnRoX2RtIHx8IHZwb3MgPT0gdm50aF9jbSkKKyAgICAgICAgICAgICAgICAgICAgJiYgKGdseXBo X2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAg ICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdM RV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09 IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAg ICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNB TF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZF UlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKQorICAgICAgICAgICAgICAgICAgICAmJiBl bmFibGVkX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGJpdG1h cF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJS T1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xs b3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdM RV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3RhbmdsZV9yaWdodF9hcnJvdworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX0hP TExPV19SRUNUQU5HTEUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3Zl cnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdI VF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBR bWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFS KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0 aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogUW5pbDsKKyAgICAgICAgICAgICAg bWNfcmlnaHRfZnJpbmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0Vf QklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbG9va3Vw X2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2b3IpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgICAgICBtY19y aWdodF9mcmluZ2VfZmFjZV9pZCA9CisgICAgICAgICAgICAgICAgKGN1cnNvcl90eXBlID09IE1D X1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09 IFBSRV9aVgorICAgICAgICAgICAgICAgICAmJiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VE X0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgIHx8IGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9C QVIpKQorICAgICAgICAgICAgICAgICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRl cm4gKCIrLXJldmVyc2VkLWJhci1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkK KyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQ CisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWCisgICAgICAgICAg ICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xF X1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBN Q19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAg ICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikpCisgICAgICAg ICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmV2ZXJz ZWQtYmFyLWF0LXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAg ICAgOiAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAg ICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQT1NUX1pWCisgICAgICAgICAgICAgICAgICAgJiYg KGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhf Zmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikpCisgICAgICAgICAgICAgICAgICA/ IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmV2ZXJzZWQtYmFyLXBvc3Qt enYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJz b3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYg cm93X3Bvc2l0aW9uID09IFBSRV9aVgorICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZv ciAhPSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAg ICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdI VF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNF RF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2Ug KHcsIGYsIGludGVybiAoIistYmFyLXByZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVl KQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRN QVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gQVRfWlYKKyAgICAgICAg ICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdM RV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19S RVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAmJiBn bHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAg ICAgPyBsb29rdXBfZGVyaXZlZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJhci1hdC16di1mYWNl IiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBl ID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9z aXRpb24gPT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBN Q19SRVZF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Q7CisgICAgICAgIH0KKyAgICAg IGVsc2UgaWYgKCghcm93LT5yZXZlcnNlZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCkK KyAgICAgICAgICAgICAgIHx8IChyb3ctPnJldmVyc2VkX3AgJiYgcm93LT50cnVuY2F0ZWRfb25f cmlnaHRfcCkpCisgICAgICAgIGxlZnQgPSBNQ19MRUZUX0ZSSU5HRSAoMCwgUXRydW5jYXRpb24s IDApOworICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9ib2JfcCAmJiBFUSAoYm91bmRhcnlf dG9wLCBRbGVmdCkpCisgICAgICAgIHsKKyAgICAgICAgICBsZWZ0ID0gKChyb3ctPmluZGljYXRl X2VvYl9wICYmIEVRIChib3VuZGFyeV9ib3QsIFFsZWZ0KSkKKyAgICAgICAgICAgICAgICAgPyBN Q19MRUZUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20sIHRvcF9yb3dfZW5kc19hdF96dl9wKQorICAg ICAgICAgICAgICAgICA6IE1DX0xFRlRfRlJJTkdFICgyLCBRdG9wLCAwKSk7CisgICAgICAgICAg aWYgKHRvcF9pbmRfbWluX3kgPj0gMCkKKyAgICAgICAgICAgIGxlZnRfb2Zmc2V0ID0gdG9wX2lu ZF9taW5feSAtIHJvdy0+eTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0 ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBRbGVmdCkpCisgICAgICAgIHsKKyAgICAgICAg ICBsZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDMsIFFib3R0b20sIGJvdF9yb3dfZW5kc19hdF96dl9w KTsKKyAgICAgICAgICBpZiAoYm90X2luZF9tYXhfeSA+PSAwKQorICAgICAgICAgICAgbGVmdF9v ZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQpOwor ICAgICAgICB9CisgICAgICBlbHNlIGlmICgoIXJvdy0+cmV2ZXJzZWRfcCAmJiBNQVRSSVhfUk9X X0NPTlRJTlVBVElPTl9MSU5FX1AgKHJvdykpCisgICAgICAgICAgICAgICB8fCAocm93LT5yZXZl cnNlZF9wICYmIHJvdy0+Y29udGludWVkX3ApKQorICAgICAgICBsZWZ0ID0gTUNfTEVGVF9GUklO R0UgKDQsIFFjb250aW51YXRpb24sIDApOworICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9l bXB0eV9saW5lX3AgJiYgRVEgKGVtcHR5X3BvcywgUWxlZnQpKQorICAgICAgICBsZWZ0ID0gTUNf TEVGVF9GUklOR0UgKDUsIFFlbXB0eV9saW5lLCAwKTsKKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5k aWNhdGVfdG9wX2xpbmVfcCAmJiBFUSAoYXJyb3dfdG9wLCBRbGVmdCkpCisgICAgICAgIHsKKyAg ICAgICAgICBsZWZ0ID0gTUNfTEVGVF9GUklOR0UgKDYsIFF1cCwgMCk7CisgICAgICAgICAgaWYg KHRvcF9pbmRfbWluX3kgPj0gMCkKKyAgICAgICAgICAgIGxlZnRfb2Zmc2V0ID0gdG9wX2luZF9t aW5feSAtIHJvdy0+eTsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9i b3R0b21fbGluZV9wICYmIEVRIChhcnJvd19ib3QsIFFsZWZ0KSkKKyAgICAgICAgeworICAgICAg ICAgIGxlZnQgPSBNQ19MRUZUX0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgIGlmIChi b3RfaW5kX21heF95ID49IDApCisgICAgICAgICAgICBsZWZ0X29mZnNldCA9IGJvdF9pbmRfbWF4 X3kgLSAocm93LT55ICsgcm93LT52aXNpYmxlX2hlaWdodCk7CisgICAgICAgIH0KKyAgICAgIGVs c2UKKyAgICAgICAgbGVmdCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAvKiBEZWNpZGUg d2hpY2ggYml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AhPSBjdXItPmxlZnRf ZnJpbmdlX29mZnNldAorICAgICAgICAgIHx8IHJpZ2h0X29mZnNldCAhPSBjdXItPnJpZ2h0X2Zy aW5nZV9vZmZzZXQKKyAgICAgICAgICB8fCBwZXJpb2RpY19wICE9IGN1ci0+ZnJpbmdlX2JpdG1h cF9wZXJpb2RpY19wCisgICAgICAgICAgfHwgY3VyLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcCkK KyAgICAgICAgeworICAgICAgICAgIHJlZHJhd19wID0gMSwgcm93LT5yZWRyYXdfZnJpbmdlX2Jp dG1hcHNfcCA9IDE7CisgICAgICAgICAgaWYgKCFrZWVwX2N1cnJlbnRfcCkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgY3VyLT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcCA9IDE7CisgICAg ICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1B UAorICAgICAgICAgICAgICAgICAgfHwgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19G UklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+ZnJpbmdlX2JpdG1hcF9wZXJpb2Rp Y19wID0gZmFsc2U7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3Vy LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBwZXJpb2RpY19wOworICAgICAgICAgICAgICBp ZiAobWNfbGVmdF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAg ICAgICAgICAgY3VyLT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSBtY19sZWZ0X2ZyaW5nZV9iaXRtYXA7 CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgY3VyLT5sZWZ0X2ZyaW5n ZV9iaXRtYXAgPSBsZWZ0OworICAgICAgICAg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gICAgICAgaWYgKG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJ VE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPnJpZ2h0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAg ICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdlX29m ZnNldCA9IHJpZ2h0X29mZnNldDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYg KHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgPCAwKQorICAgICAgICByb3ctPm92ZXJsYXlfYXJy b3dfYml0bWFwID0gbWNfZ2V0X2xvZ2ljYWxfZnJpbmdlX2JpdG1hcCAodywgUW92ZXJsYXlfYXJy b3csIDAsIDApOworICAgICAgaWYgKHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgIT0gY3VyLT5v dmVybGF5X2Fycm93X2JpdG1hcCkKKyAgICAgICAgeworICAgICAgICAgIHJlZHJhd19wID0gMSwg cm93LT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcCA9IDE7CisgICAgICAgICAgaWYgKCFrZWVwX2N1 cnJlbnRfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3VyLT5yZWRyYXdfZnJpbmdl X2JpdG1hcHNfcCA9IDE7CisgICAgICAgICAgICAgIGN1ci0+b3ZlcmxheV9hcnJvd19iaXRtYXAg PSByb3ctPm92ZXJsYXlfYXJyb3dfYml0bWFwOworICAgICAgICAgICAgfQorICAgICAgICB9Cisg ICAgICBpZiAobWNfbGVmdF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAKKyAg ICAgICAgICB8fCBtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVAp CisgICAgICAgIHJvdy0+ZnJpbmdlX2JpdG1hcF9wZXJpb2RpY19wID0gZmFs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ICAg ICAgICAgIDogbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgZmFjZSwgRlJJTkdFX0ZBQ0VfSUQs IDApOworICAgICAgaWYgKGZhY2VfaWQgPCAwKQorICAgICAgICBmYWNlX2lkID0gRlJJTkdFX0ZB Q0VfSUQ7CisgICAgfQorICBmYiA9IGdldF9mcmluZ2VfYml0bWFwX2RhdGEgKHdoaWNoKTsKKyAg cGVyaW9kID0gZmItPnBlcmlvZDsKKyAgLyogQ29udmVydCByb3cgdG8gZnJhbWUgY29vcmRpbmF0 ZXMuICovCisgIHAueSA9IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpICsgb2Zm c2V0OworICBwLndoaWNoID0gd2hpY2g7CisgIHAuYml0cyA9IGZiLT5iaXRzOworICBwLndkID0g ZmItPndpZHRoOworICBwLmggPSBmYi0+aGVpZ2h0OworICBwLmRoID0gKHBlcmlvZCA+IDAgPyAo cC55ICUgcGVyaW9kKSA6IDApOworICBwLmggLT0gcC5kaDsKKyAgLyogQWRqdXN0IHkgdG8gdGhl IG9mZnNldCBpbiB0aGUgcm93IHRvIHN0YXJ0IGRyYXdpbmcgdGhlIGJpdG1hcC4gKi8KKyAgc3dp dGNoIChmYi0+YWxpZ24pCisgICAgeworICAgIGNhc2UgQUxJR05fQklUTUFQX0NFTlRFUjoKKyAg ICAgIHAueSArPSAocm93LT5oZWlnaHQgLSBwLmgpIC8gMjsKKyAgICAgIGJyZWFrOworICAgIGNh c2UgQUxJR05fQklUTUFQX0JPVFRPTToKKyAgICAgIHAueSArPSAocm93LT52aXNpYmxlX2hlaWdo dCAtIHAuaCk7CisgICAgICBicmVhazsKKyAgICBjYXNlIEFMSUdOX0JJVE1BUF9UT1A6CisgICAg ICBicmVhazsKKyAgICB9CisgIHAuZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgZmFjZV9pZCk7Cisg IGlmIChwLmZhY2UgPT0gTlVMTCkKKyAgICB7CisgICAgICAvKiBUaGlzIGNvdWxkIGhhcHBlbiBh ZnRlciBjbGVhcmluZyBmYWNlIGNhY2hlLgorICAgICAgQnV0IGl0IHNob3VsZG4ndCBoYXBwZW4g YW55bW9yZS4gICsra2ZzICovCisgICAgICByZXR1cm47CisgICAgfQorICBwcmVwYXJlX2ZhY2Vf Zm9yX2Rpc3BsYXkgKGYsIHAuZmFjZSk7CisgIC8qIENsZWFyIGxlZnQgZnJpbmdlIGlmIG5vIGJp dG1hcCB0byBkcmF3IG9yIGlmIGJpdG1hcCBkb2Vzbid0IGZpbGwKKyAgICAgdGhlIGZyaW5nZS4g Ki8KKyAgcC5ieCA9IC0xOworICBoZWFkZXJfbGluZV9oZWlnaHQgPSBXSU5ET1dfSEVBREVSX0xJ TkVfSEVJR0hUICh3KTsKKyAgcC5ieSA9IFdJTkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCBtYXgg KGhlYWRlcl9saW5lX2hlaWdodCwgcm93LT55KSk7CisgIHAubnkgPSByb3ctPnZpc2libGVfaGVp Z2h0OworICBpZiAobGVmdF9wKQorICAgIHsKKyAgICAgIGludCB3ZCA9IFdJTkRPV19MRUZUX0ZS SU5HRV9XSURUSCAodyk7CisgICAgICBpbnQgeCA9IHdpbmRvd19ib3hfbGVmdCAodywgKFdJTkRP V19IQVNfRlJJTkdFU19PVVRTSURFX01BUkdJTlMgKHcpCisgICAgICAgICAgID8gTEVGVF9NQVJH SU5fQVJFQQorICAgICAgICAgICA6IFRFWFRfQVJFQSkpOworICAgICAgaWYgKHAud2QgPiB3ZCkK KyAgICAgICAgcC53ZCA9IHdkOworICAgICAgcC54ID0geCAtIHAud2QgLSAod2QgLSBwLndkKSAv IDI7CisgICAgICBpZiAocC53ZCA8IHdkIHx8IHAueSA+IHAuYnkgfHwgcC55ICsgcC5oIDwgcC5i eSArIHAubnkpCisgICAgICAgIHsKKyAgICAgICAgICAvKiBJZiBXIGhhcyBhIHZlcnRpY2FsIGJv cmRlciB0byBpdHMgbGVmdCwgZG9uJ3QgZHJhdyBvdmVyIGl0LiAqLworICAgICAgICAgIHdkIC09 ICgoIVdJTkRPV19MRUZUTU9TVF9QICh3KQorICAgICAgICAgICAgLyogVGhpcyBjb3VsZCBiZSB3 cm9uZyB3aGVuIHdlIGFsbG93IHdpbmRvdyBsb2NhbAorICAgICAgICAgICAgICAgcmlnaHQgZGl2 aWRlcnMgLSBidXQgdGhlIHdpbmRvdyBvbiB0aGUgbGVmdCBpcyBoYXJkCisgICAgICAgICAgICAg ICB0byBnZXQuICovCisgICAgICAgICAgICAmJiAhRlJBTUVfUklHSFRfRElWSURFUl9XSURUSCAo ZikKKyAgICAgICAgICAgICYmICFXSU5ET1dfSEFTX1ZFUlRJQ0FMX1NDUk9MTF9CQVIgKHcpCisg ICAgICAgICAgICAvKiBCdXQgZG9uJ3QgcmVkdWNlIHRoZSBmcmluZ2Ugd2lkdGggaWYgdGhlIHdp bmRvdworICAgICAgICAgICAgICAgaGFzIGEgbGVmdCBtYXJnaW4sIGJlY2F1c2UgdGhhdCBtZWFu cyB3ZSBhcmUgbm90CisgICAgICAgICAgICAgICBpbiBkYW5nZXIgb2YgZHJhd2luZyBvdmVyIHRo ZSB2ZXJ0aWNhbCBib3JkZXIsCisgICAgICAgICAgICAgICBhbmQgT1RPSCBsZWF2aW5nIG91dCB0 aGF0IG9uZSBwaXhlbCBsZWF2ZXMgYmVoaW5kCisgICAgICAgICAgICAgICB0cmFjZXMgb2YgdGhl IGN1cnNvciwgaWYgaXQgd2FzIGluIGNvbHVtbiB6ZXJvCisgICAgICAgICAgICAgICBiZWZvcmUg ZHJhd2luZyBub24tZW1wdHkgbWFyZ2luIGFyZWEuICovCisgICAgICAgICAgICAmJiB3LT5sZWZ0 X21hcmdpbl9jb2xzID09IDApCisgICAgICAgICAgID8gMSA6IDApOworICAgICAgICAgIHAuYngg PSB4IC0gd2Q7CisgICAgICAgICAgcC5ueCA9IHdkOworICAgICAgICB9CisgICAgfQorICBlbHNl CisgICAgeworICAgICAgaW50IHggPSB3aW5kb3dfYm94X3JpZ2h0ICh3LAorICAgICAgICAoV0lO RE9XX0hBU19GUklOR0VTX09VVFNJREVfTUFSR0lOUyAodykKKyAgICAgICAgID8gUklHSFRfTUFS R0lOX0FSRUEKKyAgICAgICAgIDogVEVYVF9BUkVBKSk7CisgICAgICBpbnQgd2QgPSBXSU5ET1df UklHSFRfRlJJTkdFX1dJRFRIICh3KTsKKyAgICAgIGlmIChwLndkID4gd2QpCisgICAgICAgIHAu d2QgPSB3ZDsKKyAgICAgIHAueCA9IHggKyAod2QgLSBwLndkKSAvIDI7CisgICAgICAvKiBDbGVh ciByaWdodCBmcmluZ2UgaWYgbm8gYml0bWFwIHRvIGRyYXcgb2YgaWYgYml0bWFwIGRvZXNuJ3Qg ZmlsbAorICAgdGhlIGZyaW5nZS4gKi8KKyAgICAgIGlmIChwLndkIDwgd2QgfHwgcC55ID4gcC5i eSB8fCBwLnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkKKyAgICAgICAgeworICAgICAgICAgIHAuYngg PSB4OworICAgICAgICAgIHAubnggPSB3ZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYgKHAueCA+ PSBXSU5ET1dfQk9YX0xFRlRfRURHRV9YICh3KQorICAgICAgJiYgKHAueCArIHAud2QpIDw9IFdJ TkRPV19CT1hfTEVGVF9FREdFX1ggKHcpICsgV0lORE9XX1BJWEVMX1dJRFRIICh3KSkKKyAgICBG UkFNRV9SSUYgKGYpLT5kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgJnApOworfQorCit2b2lk CittY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9y b3cgKnJvdywgaW50IGxlZnRfcCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSkKK3sK KyAgaW50IG92ZXJsYXkgPSAwOworICBpZiAobGVmdF9wID09IHJvdy0+cmV2ZXJzZWRfcCAmJiBy b3ctPmN1cnNvcl9pbl9mcmluZ2VfcCkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCBjdXJzb3Ig PSBRbmlsOworICAgICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICAgICAgeworICAgICAgICBj YXNlIE1DX0ZSQU1FRF9CT1g6CisgICAgICAgICAgaWYgKHJvdy0+dmlzaWJsZV9oZWlnaHQgPj0g U1RBTkRBUkRfQklUTUFQX0hFSUdIVCAoaG9sbG93X3JlY3RhbmdsZV9iaXRzKSkKKyAgICAgICAg ICAgIGN1cnNvciA9IFFob2xsb3c7CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgY3Vyc29y ID0gUWhvbGxvd19zbWFsbDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19IT0xM T1dfQk9YOgorICAgICAgICAgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5EQVJEX0JJ VE1BUF9IRUlHSFQgKGhvbGxvd19yZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBjdXJzb3Ig PSBRaG9sbG93OworICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3df c21hbGw7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAg ICAgICAgICBjdXJzb3IgPSBRYm94OworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1D X0JBUjoKKyAgICAgICAgICBjdXJzb3IgPSBRYmFyOworICAgICAgICAgIGJyZWFrOworICAgICAg ICBjYXNlIE1DX0hCQVI6CisgICAgICAgICAgY3Vyc29yID0gUWhiYXI7CisgICAgICAgICAgYnJl YWs7CisgICAgICAgIGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19O T19DVVJTT1I6CisgICAgICAgIGNhc2UgTUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAg Y2FzZSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAg dy0+cGh5c19jdXJzb3Jfb25fcCA9IDA7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdl X3AgPSAwOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKGN1 cnNvcikpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgYm0gPSBtY19nZXRfbG9naWNhbF9jdXJz b3JfYml0bWFwICh3LCBjdXJzb3IpOworICAgICAgICAgIGlmIChibSAhPSBNQ19OT19GUklOR0Vf QklUTUFQKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRt YXBfMSAodywgcm93LCBsZWZ0X3AsIDIsIGJtKTsKKyAgICAgICAgICAgICAgb3ZlcmxheSA9IEVR IChjdXJzb3IsIFFib3gpID8gMyA6IDE7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9 CisgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIGxlZnRfcCwgb3ZlcmxheSwgTUNf Tk9fRlJJTkdFX0JJVE1BUCk7CisgIGlmIChsZWZ0X3AgJiYgcm93LT5vdmVybGF5X2Fycm93X2Jp dG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8x ICh3LCByb3csIDEsIDEsIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXApOworfQorCisvKiBlbmQg TVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmlu ZSBOT19GUklOR0VfQklUTUFQIDAKICNkZWZpbmUgVU5ERUZfRlJJTkdFX0JJVE1BUCAxCiAjZGVm aW5lIE1BWF9TVEFOREFSRF9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lX2FuZ2xlX3VwLCBRZnJpbmdl LCBtYWtlX2ZpeG51bSAoNDcpKTsKKyAgLyogKGdldCAnKy1xdWFkcnVwbGUtYW5nbGUtdXAgJ2Zy aW5nZSkgPT4gNDcgKi8KKworICAvKiA0OCAqLworICBERUZTWU0gKFFtY19xdWFkcnVwbGVfYW5n bGVfZG93biwgIistcXVhZHJ1cGxlLWFuZ2xlLWRvd24iKTsKKyAgVmZyaW5nZV9iaXRtYXBzID0g RmNvbnMgKFFtY19xdWFkcnVwbGVfYW5nbGVfZG93biwgVmZyaW5nZV9iaXRtYXBzKTsKKyAgRnB1 dCAoUW1jX3F1YWRydXBsZV9hbmdsZV9kb3duLCBRZnJpbmdlLCBtYWtlX2ZpeG51bSAoNDgpKTsK KyAgLyogKGdldCAnKy1xdWFkcnVwbGUtYW5nbGUtZG93biAnZnJpbmdlKSA9PiA0OCAqLworCisv KiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICBERUZTWU0gKFF0cnVuY2F0aW9uLCAidHJ1bmNhdGlvbiIpOwogICBERUZTWU0gKFFjb250aW51 YXRpb24sICJjb250aW51YXRpb24iKTsKICAgREVGU1lNIChRb3ZlcmxheV9hcnJvdywgIm92ZXJs YXktYXJyb3ciKTsKZGlmZiAtLWdpdCBhL3NyYy9uc3Rlcm0uaCBiL3NyYy9uc3Rlcm0uaAppbmRl eCA5NzczZWIzLi5lMzRhMTE2IDEwMDY0NAotLS0gYS9zcmMvbnN0ZXJtLmgKKysrIGIvc3JjL25z dGVybS5oCkBAIC02NjMsNiArNjYzLDE2IEBAIHR5cGVkZWYgaWQgaW5zdGFuY2V0eXBlOwogCiBA aW50ZXJmYWNlIEVtYWNzU2Nyb2xsZXIgOiBOU1Njcm9sbGVyCiAgIHsKKworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIE5TUmVjdCBtY19y ZWN0YW5nbGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgIHN0cnVjdCB3aW5k b3cgKndpbmRvdzsKICAgIHN0cnVjdCBmcmFtZSAqZnJhbWU7CiAgICBOU1Jlc3BvbmRlciAqcHJl dlJlc3BvbmRlcjsKQEAgLTY4Myw2ICs2OTMsMTggQEAgdHlwZWRlZiBpZCBpbnN0YW5jZXR5cGU7 CiAgICBpbnQgZW1fd2hvbGU7CiAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5TUmVj dClyZWN0OworLSAoTlNSZWN0KW1jX2dldF9yZWN0YW5nbGU7CistIChzdHJ1Y3Qgd2luZG93ICop bWNfZ2V0X3dpbmRvdzsKKy0gKGJvb2wpbWNfanVkZ2U7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIC0gKGluc3RhbmNldHlwZSkgaW5pdEZyYW1lOiAoTlNSZWN0IClyIHdpbmRvdzog KExpc3BfT2JqZWN0KXdpbjsKIC0gKHZvaWQpc2V0RnJhbWU6IChOU1JlY3QpcjsKIApkaWZmIC0t Z2l0IGEvc3JjL25zdGVybS5tIGIvc3JjL25zdGVybS5tCmluZGV4IDAyMzMxODIuLmIwODQ1NDUg MTAwNjQ0Ci0tLSBhL3NyYy9uc3Rlcm0ubQorKysgYi9z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vbSBhbm90aGVyCisgIGNhY2hlIC0tIHRodXMs IHdlIG11c3QgY2hlY2sgdGhlbSBhbGwgZm9yIG92ZXJ3cml0dGVuIGZha2UgY3Vyc29ycy4gKi8K KyAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAg IGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAgeworICAg ICAgZm9yIChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgcworICAgICAgICAgICAmJiBtY190cmF2 ZXJzZV9jYWNoZV9wIChtY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7CisgICAgICAg ICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgLy8gIGludCB4ID0gbWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAgICAgIGludCBmeCA9IG1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZng7CisgICAgICAgICAg Ly8gIGludCB5ID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS55 OworICAgICAgICAgIGludCBmeSA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uZnk7CisgICAgICAgICAgaW50IGhwb3MgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLmhwb3M7CisgICAgICAgICAgaW50IHZwb3MgPSBtY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnZwb3M7CisgICAgICAgICAgaW50 IHdkID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZDsKKyAg ICAgICAgICBpbnQgaCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uaDsKKyAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gbWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZTsKKyAgICAg ICAgICAvLyAgaW50IGN1cnNvcl93aWR0aCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNs X2ZnID0gey5yZWQgPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmZnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBtY19t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmdyZWVuLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gbWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ibHVlfTsKKyAgICAgICAgICAvLyAgc3RydWN0IG1j X1JHQiBsc2xfYmcgPSB7LnJlZCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF0uYmcucmVkLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAu Z3JlZW4gPSBtY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdy ZWVuLAorICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAgICAg ICAgYm9vbCBhY3RpdmVfcCA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uYWN0aXZlX3A7CisgICAgICAgICAgLy8gIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZv ciA9IG1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGhfZmxh dm9yOworICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gbWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICAgICAgYm9vbCBnb19wID0gKHZw b3MgPT0gdm50aAorICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zID09IGN1cnNvcl9nbHlw aC0+aHBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApOworICAgICAgICAg IGlmICghZ29fcCkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIE5TUmVjdCByOwor ICAgICAgICAgIHIub3JpZ2luLnggPSBmeDsKKyAgICAgICAgICByLm9yaWdpbi55ID0gZnk7Cisg ICAgICAgICAgci5zaXplLmhlaWdodCA9IGg7CisgICAgICAgICAgci5zaXplLndpZHRoID0gd2Q7 CisgICAgICAgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbF9mZy5yZWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjogbHNsX2ZnLmdyZWVu CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IGxzbF9mZy5ibHVl CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF0gc2V0XTsK KyAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAgICB7CisgICAg ICAgICAgc3RydWN0IGJ1ZmZlciA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JuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAg ICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lE IChzLT5mLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICBOU0Nv bG9yICpob2xsb3dfYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZB Q0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2ZV9mYWNlKSwgcy0+Zik7CisgICAgICAgICAgICAg ICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfY29sb3I7CisgICAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2lu YWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJuICgi Ky1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9IEZBQ0Vf RlJPTV9JRCAocy0+ZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAg ICAgICAgIE5TQ29sb3IgKmhvbGxvd19pbmFjdGl2ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVk X2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19pbmFjdGl2ZV9mYWNlKSwgcy0+Zik7 CisgICAgICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2luYWN0aXZlX2Nv bG9yOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAo ZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFN RV9DVVJTT1JfQ09MT1IgKHMtPmYpLCBzLT5mKSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBb bnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYp IHNldF07CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1JfQ09MT1IgKHMt PmYpOworICAgICAgICAgIH0KKyAgICAgICAgICBzd2l0Y2ggKGN1cnNvcl90eXBlKQorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6CisgICAgICAg ICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfTk9fQ1VSU09SOgorICAgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX1JJR0hUX0ZSSU5HRV9CSVRN QVA6CisgICAgICAgICAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQOgorICAgICAgICAg ICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7 CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfRlJBTUVEX0JP WDoKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAgICBbaG9s bG93X2NvbG9yIHNldF07CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNldFJlY3Qg KHIsIDEsIDEpKTsKKyAgICAgICAgICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChzLT5mKSBz ZXRdOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0hPTExP V19CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgICAgICAgICAg W2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKE5TSW5zZXRS ZWN0IChyLCAxLCAxKSk7CisgICAgICAgICAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAocy0+ Zikgc2V0XTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBNQ19I QkFSOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgICAgICAgICBOU1JlY3RG aWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICAvKiBJZiBhIGdseXBoIGV4aXN0cyAocy0+Y2hhcjJiICE9IE5VTEwpLCB0aGVuIGRyYXcgdGhl IGdseXBoIG9uIHRvcCBvZiB0aGUKKyAgICAgICAgICBuZXdseSBkcmF3biByZWN0YW5nbGUgdGhh dCB3YXMgY3JlYXRlZCBoZXJlaW5hYm92ZS4gIFRvIHRoZSBleHRlbnQgdGhhdCB3ZQorICAgICAg ICAgIHdhbnQgdG8gZG91YmxlLWltcHJpbnQgZ2x5cGhzIHRvIG1ha2UgdGhlbSBhcHBlYXIgdG8g YmUgc2VtaS1ib2xkLCBpdCBjYW4KKyAgICAgICAgICBiZSBkb25lIGhlcmUgZm9yIGFsbCBjdXJz b3IgdHlwZXMuICBUaGUgYm94LXN0eWxlIGN1cnNvcnMgYXJlIGltcHJpbnRlZAorICAgICAgICAg IHdpdGggZ2x5cGhzIG9ubHkgb25lICgxKSB0aW1lLiAgVGhlIHNlbWktYm9sZCBhcHBlYXJhbmNl IGlzIGhlbHBmdWwgd2hlbgorICAgICAgICAgIGRlYnVnZ2luZyB0byBzZWUgdGhhdCB0aGUgY29v cmRpbmF0ZXMgYXJlIGNvcnJlY3QuICovCisgICAgICAgICAgaWYgKHMtPmNoYXIyYiAhPSBOVUxM CisgICAgICAgICAgICAgICYmIChjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YCisgICAgICAg ICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisgICAgICAgICAgICAg ICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19IT0xMT1dfQk9YKSkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgQk9PTCBpc0NvbXBvc2l0ZSA9IHMtPmZpcnN0X2dseXBoLT50eXBlID09IENP TVBPU0lURV9HTFlQSDsKKyAgICAgICAgICAgICAgaWYgKGlzQ29tcG9zaXRlKQorICAgICAgICAg ICAgICAgIG5zX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAg ICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICAgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgICAgICAgICAgICAgICAg ICAgaWYgKCFmb250KQorICAgICAgICAgICAgICAgICAgICAgIGZvbnQgPSBGUkFNRV9GT05UIChz LT5mKTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3AgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgICAgICAgZm9udC0+ZHJpdmVyLT5kcmF3IChzLCBzLT5jbXBfZnJvbSwgcy0+bmNo YXJzLCBzLT54LCBzLT55YmFzZSwgd2l0aF9iZ19wKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLy8gIGNsb2NrX3QgY2xvY2tfZW5kID0g Y2xvY2soKTsK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REFUQSAoZm9yZWdyb3VuZCkgOiAiTklMUCIp LAorICAgICAgICAgICAgICAgICAgICAgICghTklMUCAoYmFja2dyb3VuZCkgPyBTU0RBVEEgKGJh Y2tncm91bmQpIDogIk5JTFAiKSk7CisgIC0gIEVYQU1QTEUgT0YgSE9XIFRPIENSRUFURSBBIENP TE9SIFdJVEggUkdCL0xTTCBmbG9hdCB2YWx1ZXM6CisgICAgIE5TQ29sb3IgKm15X2NvbG9yID0g W05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogMS4wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjogMS4wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmx1ZTogMS4wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHBoYTogMS4wXTsK KyAgLSAgQUxURVJOQVRJVkUgRVhBTVBMRToKKyAgICAgZW51bSBmYWNlX2lkIGRlYnVnZ2luZ19m YWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistZGVidWdn aW5nLWZhY2UiKSwgdHJ1ZSk7CisgICAgIHN0cnVjdCBmYWNlICpkZWJ1Z2dpbmdfZmFjZSA9IEZB Q0VfRlJPTV9JRCAocy0+ZiwgZGVidWdnaW5nX2ZhY2VfaWQpOworICAgICBOU0NvbG9yICpjb2xv ciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGRlYnVnZ2lu Z19mYWNlKSwgcy0+Zik7CisgICAgIFtjb2xvciBzZXRdOyAqLworICBpZiAoZ2x5cGhfZmxhdm9y ID09IE1DX0dMWVBICisgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEhMRVNTKQorICAg IFtbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiBsc2wucmVkCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZ3JlZW46IGxzbC5ncmVlbgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBibHVlOiBsc2wuYmx1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGFscGhhOiAxLjBdIHNldF07CisgICAgZWxzZQorICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAo Zikgc2V0XTsKKyAgaWYgKGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gpCisgICAgeworICAg ICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNvbnRlbnRzKTsKKyAgICAgIGJvb2wg cmVnaW9uX2FjdGl2ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJrX2FjdGl2ZSkpKTsK KyAgICAgIHB0cmRpZmZfdCByZWdpb25fYmVnID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBtY19yZWdp b25fbGltaXQgKDEpIDogLTE7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdpb25f YWN0aXZlX3ApID8gbWNfcmVnaW9uX2xpbWl0ICgwKSA6IC0xOworICAgICAgaWYgKHJlZ2lvbl9h Y3RpdmVfcAorICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAgJiYgY3Vyc29yX2dseXBo LT5jaGFycG9zID09IHJlZ2lvbl9iZWcpCisgICAgICAgIHsKKyAgICAgICAgICBlbnVtIGZhY2Vf aWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fYmVnX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAo dywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWF0LXJlZ2lvbi1wcmUtenYtZmFjZSIp LCB0cnVlKTsKKyAgIC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ICAgIHsKKyAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2 ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtl LWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFj ZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2Zh Y2VfaWQpOworICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19hY3RpdmVfY29sb3IgPSBu c19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3dfYWN0aXZl X2ZhY2UpLCBmKTsKKyAgICAgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZl X2NvbG9yOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIC8qIFRoZSByZWdpb24gaXMg X25vdF8gdmlzaWJsZSBpbiB0aGUgaW5hY3RpdmUgd2luZG93IGJlY2F1c2UgdGhlIG92ZXJsYXkg d2luZG93IHByb3BlcnR5IGlzIHVzZWQuICovCisgICAgICAgICAgICAgIGVsc2UgaWYgKCFhY3Rp dmVfcCkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJu ICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAg ICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICBO U0NvbG9yICpob2xsb3dfaW5hY3RpdmVfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAo TlNfRkFDRV9CQUNLR1JPVU5EIChob2xsb3dfaW5hY3RpdmVfZmFjZSksIGYpOworICAgICAgICAg ICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2luYWN0aXZlX2NvbG9yOworICAgICAgICAg ICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQg KGZhY2UpID09IG5zX2luZGV4X2NvbG9yIChGUkFNRV9DVVJTT1JfQ09MT1IgKGYpLCBmKSkKKyAg ICAgIHsKKyAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9V TkQgKGZhY2UpLCBmKSBzZXRdOworICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1Jf Q09MT1IgKGYpOworICAgICAgfQorI2lmZGVmIE5TX0lNUExfQ09DT0EKKyAgTlNEaXNhYmxlU2Ny ZWVuVXBkYXRlcyAoKTsKKyNlbmRpZgorICBzd2l0Y2ggKGN1cnNvcl90eXBlKQorICAgIHsKKyAg ICAgIGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNl IE1DX05PX0NVUlNPUjoKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX1JJR0hUX0ZSSU5H RV9CSVRNQVA6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19MRUZUX0ZSSU5HRV9CSVRN QVA6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19GSUxMRURfQk9YOgorICAgICAgICBO U1JlY3RGaWxsIChyKTsKKyAgICAgICAgYnJlYWs7CisgICAgICBjYXNlIE1DX0ZSQU1FRF9CT1g6 CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBbaG9sbG93X2NvbG9yIHNldF07Cisg ICAgICAgIE5TUmVjdEZpbGwgKE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7CisgICAgICAgIFtGUkFN RV9DVVJTT1JfQ09MT1IgKGYpIHNldF07CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19I T0xMT1dfQk9YOgorICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgW2hvbGxvd19jb2xv ciBzZXRdOworICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAociwgMSwgMSkpOworICAg ICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworICAgICAgICBicmVhazsKKyAgICAg IGNhc2UgTUNfSEJBUjoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgIGJyZWFrOwor ICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgIHMgPSByOworICAgICAgICAvKiBAbGF3bGlzdCBp cyBmb2N1c2luZyB0aGUgaW5pdGlhbCBkZXZlbG9wbWVudCBvZiBmZWF0dXJlIHJlcXVlc3RzCisg ICAgICAgICMxNzY4NCBhbmQgIzIyODczIG9uIEwyUiBsYW5ndWFnZXMuICovCisgICAgICAgIGlm IChnbHlwaF9mbGF2b3IgIT0gTUNfR0xZUEgKKyAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAh PSBNQ19HTFlQSExFU1MpCisgICAgICAgICAgeworICAgICAgICAgICAgLyogSWYgdGhlIGNoYXJh Y3RlciB1bmRlciBjdXJzb3IgaXMgUjJMLCBkcmF3IHRoZSBiYXIgY3Vyc29yCisgICAgICAgICAg ICAgICBvbiB0aGUgcmlnaHQgb2YgaXRzIGdseXBoLCByYXRoZXIgdGhhbiBvbiB0aGUgbGVmdC4g Ki8KKyAgICAgICAgICAgIGlmICgoY3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9 IDApCisgICAgICAgICAgICAgIHMub3JpZ2luLnggKz0gY3Vyc29yX2dseXBoLT5waXhlbF93aWR0 aCAtIHMuc2l6ZS53aWR0aDsKKyAgICAgICAgICB9CisgICAgICAgIE5TUmVjdEZpbGwgKHMpOwor ICAgICAgICBicmVhazsKKyAgICB9CisgIG5zX3Jlc2V0X2NsaXBwaW5nIChmKTsKKyAgLyogZHJh dyB0aGUgY2hhcmFjdGVyIHVuZGVyIHRoZSBjdXJzb3IgKi8KKyAgaWYgKGdseXBoX2ZsYXZvciAh PSBNQ19HTFlQSExFU1MKKyAgICAgICYmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisg ICAgICAgICAgfHwgY3Vyc29yX3R5cGUgPT0gTUNfRklMTEVEX0JPWAorICAgICAgICAgIHx8IGN1 cnNvcl90eXBlID09IE1DX0hPTExPV19CT1gKKyAgICAgICAgICB8fCAoZGVidWdfcAorICAgICAg ICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19IQkFSKQorICAgICAgICAgIHx8IChkZWJ1Z19w CisgICAgICAgICAgICAgICYmIGN1cnNvcl90eXBlID09IE1DX0JBUikpKQorICAgIHsKKyAgICAg IC8qIGBjdXJzb3JfZ2NfcGAgaXMgdXNlZCBvbmx5IGJ5IGB3MzJ0ZXJtLmNgIGFuZCBgeHRlcm0u YycuICovCisgICAgICBib29sIGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICBjb25zdCBFbWFj c19SZWN0YW5nbGUgKnNhdmVkX2NsaXAgPSBOVUxMOworICAgICAgaWYgKHJvdy0+Y2xpcCAhPSBO VUxMKQorICAgICAgICB7CisgICAgICAgICAgc2F2ZWRfY2xpcCA9IHJvdy0+Y2xpcDsKKyAgICAg ICAgICByb3ctPmNsaXAgPSBOVUxMOworICAgICAgICB9CisgICAgICBtY19kcmF3X2N1cnNvcl9n bHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cG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gICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoZmFjZS0+dW5kZXJs aW5lX2NvbG9yLCBzLT5mKSBzZXRdOworICAgICAgICAgIG5zX2RyYXdfdW5kZXJ3YXZlIChzLCB3 aWR0aCwgeCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocy0+ZmFjZS0+dW5kZXJsaW5l X3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIE5TUmVj dCByOworICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0aGlja25lc3MsIHBvc2l0aW9uOworICAg ICAgICAgICAgLyogSWYgdGhlIHByZXYgd2FzIHVuZGVybGluZWQsIG1hdGNoIGl0cyBhcHBlYXJh bmNlLiAqLworICAgICAgICAgICAgaWYgKHMtPnByZXYgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJs aW5lX3AKKyAgICAgICAgICAgICAgICAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9 PSBGQUNFX1VOREVSX0xJTkUKKyAgICAgICAgICAgICAgICAmJiBzLT5wcmV2LT51bmRlcmxpbmVf dGhpY2tuZXNzID4gMCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHRoaWNrbmVz cyA9IHMtPnByZXYtPnVuZGVybGluZV90aGlja25lc3M7CisgICAgICAgICAgICAgICAgcG9zaXRp b24gPSBzLT5wcmV2LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIHN0cnVj dCBmb250ICpmb250OworICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBkZXNjZW50Owor ICAgICAgICAgICAgICAgICAgZm9udD1zLT5mb250OworICAgICAgICAgICAgICAgICAgZGVzY2Vu dCA9IHMtPnkgKyBzLT5oZWlnaHQgLSBzLT55YmFzZTsKKyAgICAgICAgICAgICAgICAgIC8qIFVz ZSB1bmRlcmxpbmUgdGhpY2tuZXNzIG9mIGZvbnQsIGRlZmF1bHRpbmcgdG8gMS4gKi8KKyAgICAg ICAgICAgICAgICAgIHRoaWNrbmVzcyA9IChmb250ICYmIGZvbnQtPnVuZGVybGluZV90aGlja25l c3MgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBmb250LT51bmRlcmxpbmVf dGhpY2tuZXNzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IDE7CisgICAgICAgICAg ICAgICAgICAvKiBEZXRlcm1pbmUgdGhlIG9mZnNldCBvZiB1bmRlcmxpbmluZyBmcm9tIHRoZSBi YXNlbGluZS4gKi8KKyAgICAgICAgICAgICAgICAgIGlmICh4X3VuZGVybGluZV9hdF9kZXNjZW50 X2xpbmUpCisgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gZGVzY2VudCAtIHRoaWNrbmVz czsKKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoeF91c2VfdW5kZXJsaW5lX3Bvc2l0aW9u X3Byb3BlcnRpZXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZm9udCAmJiBmb250 LT51bmRlcmxpbmVfcG9zaXRpb24gPj0gMCkKKyAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlv biA9IGZvbnQtPnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICAgICAgICBlbHNl IGlmIChmb250KQorICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBscm91bmQgKGZv bnQtPmRlc2NlbnQgLyAyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSB1bmRlcmxpbmVfbWluaW11bV9vZmZzZXQ7Cisg ICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IG1heCAocG9zaXRpb24sIHVuZGVybGluZV9taW5p bXVtX29mZnNldCk7CisgICAgICAgICAgICAgICAgICAvKiBFbnN1cmUgdW5kZXJsaW5pbmcgaXMg bm90IGNyb3BwZWQuICovCisgICAgICAgICAgICAgICAgICBpZiAoZGVzY2VudCA8PSBwb3NpdGlv bikKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9u ID0gZGVzY2VudCAtIDE7CisgICAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gMTsKKyAg ICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChkZXNjZW50 IDwgcG9zaXRpb24gKyB0aGlja25lc3MpCisgICAgICAgICAgICAgICAgICAgICAgdGhpY2tuZXNz ID0gMTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICBzLT51bmRlcmxpbmVfdGhpY2tu ZXNzID0gdGhpY2tuZXNzOworICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Bvc2l0aW9uID0gcG9z aXRpb247CisgICAgICAgICAgICByID0gTlNNYWtlUmVjdCAoeCwgcy0+eWJhc2UgKyBwb3NpdGlv biwgd2lkdGgsIHRoaWNrbmVzcyk7CisgICAgICAgICAgICBpZiAoZmFjZS0+dW5kZXJsaW5lX2Rl ZmF1bHRlZF9wKQorICAgICAgICAgICAgICBbZGVmYXVsdENvbCBzZXRdOworICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChmYWNlLT51 bmRlcmxpbmVfY29sb3IsIHMtPmYpIHNldF07CisgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsK KyAgICAgICAgICB9CisgICAgfQorICAvKiBEbyBvdmVybGluZS4gV2UgZm9sbG93IG90aGVyIHRl cm1zIGluIHVzaW5nIGEgdGhpY2tuZXNzIG9mIDEKKyAgICAgYW5kIGlnbm9yaW5nIG92ZXJsaW5l X21hcmdpbi4gKi8KKyAgaWYgKGZhY2UtPm92ZXJsaW5lX3ApCisgICAgeworICAgICAgTlNSZWN0 IHI7CisgICAgICByID0gTlNNYWtlUmVjdCAoeCwgcy0+eSwgd2lkdGgsIDEpOworICAgICAgaWYg KGZhY2UtPm92ZXJsaW5lX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICBbZGVmYXVsdENvbCBz ZXRdOworICAgICAgICBlbHNlCisgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChm YWNlLT5vdmVybGluZV9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgIE5TUmVjdEZpbGwgKHIpOwor ICAgIH0KKyAgLyogRG8gc3RyaWtlLXRocm91Z2guICBXZSBmb2xsb3cgb3RoZXIgdGVybXMgZm9y IHRoaWNrbmVzcyBhbmQKKyAgICAgdmVydGljYWwgcG9zaXRpb24uKi8KKyAgaWYgKGZhY2UtPnN0 cmlrZV90aHJvdWdoX3ApCisgICAgeworICAgICAgTlNSZWN0IHI7CisgICAgICB1bnNpZ25lZCBs b25nIGR5OworICAgICAgZHkgPSBscmludCAoKHMtPmhlaWdodCAtIDEpIC8gMik7CisgICAgICBy ID0gTlNNYWtlUmVjdCAoeCwgcy0+eSArIGR5LCB3aWR0aCwgMSk7CisgICAgICBpZiAoZmFjZS0+ c3RyaWtlX3Rocm91Z2hfY29sb3JfZGVmYXVsdGVkX3ApCisgICAgICAgIFtkZWZhdWx0Q29sIHNl dF07CisgICAgICAgIGVsc2UKKyAgICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKGZh Y2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yLCBzLT5mKSBzZXRdOworICAgICAgTlNSZWN0RmlsbCAo cik7CisgICAgfQorfQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHVtcGdseXBoc19zdHJldGNoIChz dHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBzdHJ1Y3QgZ2x5cGh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sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYpOworICAgICAg Zm9yIChpID0gMDsgaSA8IG47ICsraSkKKyAgICAgICAgeworICAgICAgICAgIGlmICghcy0+cm93 LT5mdWxsX3dpZHRoX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGludCBvdmVycnVu LCBsZWZ0b3ZlcnJ1bjsKKyAgICAgICAgICAgICAgLyogdHJ1bmNhdGUgdG8gYXZvaWQgb3Zlcndy aXRpbmcgZnJpbmdlIGFuZC9vciBzY3JvbGxiYXIgKi8KKyAgICAgICAgICAgICAgb3ZlcnJ1biA9 IG1heCAoMCwgKHMtPnggKyBzLT5iYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgLSAoV0lORE9XX0JPWF9SSUdIVF9FREdFX1ggKHMtPncpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAtIFdJTkRPV19SSUdIVF9GUklOR0VfV0lEVEggKHMtPncp KSk7CisgICAgICAgICAgICAgICAgICAgIHJbaV0uc2l6ZS53aWR0aCAtPSBvdmVycnVuOworICAg ICAgICAgICAgICAvKiB0cnVuY2F0ZSB0byBhdm9pZCBvdmVyd3JpdGluZyB0byBsZWZ0IG9mIHRo ZSB3aW5kb3cgYm94ICovCisgICAgICAgICAgICAgIGxlZnRvdmVycnVuID0gKFdJTkRPV19CT1hf TEVGVF9FREdFX1ggKHMtPncpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgV0lORE9X X0xFRlRfRlJJTkdFX1dJRFRIIChzLT53KSkgLSBzLT54OworICAgICAgICAgICAgICBpZiAobGVm dG92ZXJydW4gPiAwKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIHJbaV0u b3JpZ2luLnggKz0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgICByW2ldLnNpemUud2lk dGggLT0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAg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mRleGVkX2NvbG9yIChOU19GQUNFX0ZPUkVHUk9VTkQgKGRlYnVnZ2luZ19mYWNlKSwg cy0+Zik7CisgICAgICAgICAgICAgIC8vICBbY29sb3Igc2V0XTsKKyAgICAgICAgICAgICAgQ0dG bG9hdCB4ID0gcltpXS5vcmlnaW4ueDsKKyAgICAgICAgICAgICAgQ0dGbG9hdCB3aWR0aCA9IHdk OworICAgICAgICAgICAgICByW2ldLnNpemUud2lkdGggLT0gd2lkdGg7CisgICAgICAgICAgICAg IHJbaV0ub3JpZ2luLnggKz0gd2lkdGg7CisgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHJbaV0p OworICAgICAgICAgICAgICAvKiBEcmF3IG92ZXJsaW5pbmcsIGV0Yy4gb24gdGhlIGN1cnNvci4g Ki8KKyAgICAgICAgICAgICAgaWYgKHMtPnctPnBoeXNfY3Vyc29yX3R5cGUgPT0gTUNfRklMTEVE X0JPWCkKKyAgICAgICAgICAgICAgICBtY19uc19kcmF3X3RleHRfZGVjb3JhdGlvbiAocywgZmFj ZSwgYmdDb2wsIHdpZHRoLCB4KTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg ICAgICBtY19uc19kcmF3X3RleHRfZGVjb3JhdGlvbiAocywgZmFjZSwgZmdDb2wsIHdpZHRoLCB4 KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgIC8vICBp bnQgcnggPSByW2ldLm9yaWdpbi54OworICAvLyAgaW50IHJ5ID0gcltpXS5vcmlnaW4ueTsKKyAg Ly8gIGludCBydyA9IHJbaV0uc2l6ZS53aWR0aDsKKyAgLy8gIGludCByaCA9IHJbaV0uc2l6ZS5o ZWlnaHQ7CisgIC8vICBmcHJpbnRmIChzdGRlcnIsICJtY19uc19kdW1wZ2x5cGhzX3N0cmV0Y2g6 ICB2cG9zICglZCkgfCByeCAoJWQpIHwgcnkgKCVkKSB8IHJ3ICglZCkgfCByaCAoJWQpXG4iLAor ICAvLyAgICAgICAgICAgICAgICAgICBzLT5maXJzdF9nbHlwaC0+dnBvcywgcngsIHJ5LCBydywg cmgpOworICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyW2ldKTsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAvKiBEcmF3IG92ZXJsaW5pbmcsIGV0Yy4gb24gdGhlIHN0cmV0Y2ggZ2x5cGggKG9y IHRoZSBwYXJ0CisgICAgICAgICAgICAgb2YgdGhlIHN0cmV0Y2ggZ2x5cGggYWZ0ZXIgdGhlIGN1 cnNvcikuICovCisgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2Us IGZnQ29sLCByW2ldLnNpemUud2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHJbaV0ub3JpZ2luLngpOworICAgICAgICB9CisgICAgICBpZiAoKHMtPmxlZnRfb3Zl cndyaXR0ZW5fcCB8fCBzLT5yaWdodF9vdmVyd3JpdHRlbl9wKQorICAgICAgICAgICYmIChzLT5h Y3Rpb25fdHlwZSA9PSBNQ19EUkFXX0dMWVBIX1NUUklORyB8fCBzLT5hY3Rpb25fdHlwZSA9PSBN Q19FUkFTRV9HTFlQSF9TVFJJTkcpKQorICAgICAgICBtY19uc19kcmF3X292ZXJ3cml0dGVuIChz LCBtYXRyaXgsIHJvdywgbWNfbWF0cml4LCBzLT5maXJzdF9nbHlwaCk7CisgICAgICBuc19yZXNl dF9jbGlwcGluZyAocy0+Zik7CisgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gMTsKKyAg ICB9Cit9CisKK3N0YXRpYyB2b2lkCittY19uc19kdW1wZ2x5cGhzX2ltYWdlIChzdHJ1Y3QgZ2x5 cGhfc3RyaW5nICpzLCBOU1JlY3Qgciwgc3RydWN0IG1jX1JHQiBsc2wsCisgICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3I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TsKKyAgLyogRHJhdyB1bmRlcmxpbmUsIG92ZXJsaW5lLCBzdHJpa2UtdGhyb3VnaC4g Ki8KKyAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIHRkQ29sLCBici5zaXpl LndpZHRoLCBici5vcmlnaW4ueCk7CisgIC8qIERyYXcgcmVsaWVmLCBpZiByZXF1ZXN0ZWQgKi8K KyAgaWYgKHMtPmltZy0+cmVsaWVmIHx8IHMtPmhsID09RFJBV19JTUFHRV9SQUlTRUQgfHwgcy0+ aGwgPT1EUkFXX0lNQUdFX1NVTktFTikKKyAgICB7CisgICAgICBpZiAocy0+aGwgPT0gRFJBV19J TUFHRV9TVU5LRU4gfHwgcy0+aGwgPT0gRFJBV19JTUFHRV9SQUlTRUQpCisgICAgICAgIHsKKyAg ICAgICAgICB0aCA9IHRvb2xfYmFyX2J1dHRvbl9yZWxpZWYgPj0gMCA/CisgICAgICAgICAgICB0 b29sX2Jhcl9idXR0b25fcmVsaWVmIDogREVGQVVMVF9UT09MX0JBUl9CVVRUT05fUkVMSUVGOwor ICAgICAgICAgIHJhaXNlZF9wID0gKHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VEKTsKKyAgICAg ICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgdGggPSBhYnMgKHMt PmltZy0+cmVsaWVmKTsKKyAgICAgICAgICAgIHJhaXNlZF9wID0gKHMtPmltZy0+cmVsaWVmID4g MCk7CisgICAgICAgICAgfQorICAgICAgci5vcmlnaW4ueCA9IHggLSB0aDsKKyAgICAgIHIub3Jp Z2luLnkgPSB5IC0gdGg7CisgICAgICByLnNpemUud2lkdGggPSBzLT5zbGljZS53aWR0aCArIDIq dGgtMTsKKyAgICAgIHIuc2l6ZS5oZWlnaHQgPSBzLT5zbGljZS5oZWlnaHQgKyAyKnRoLTE7Cisg ICAgICBuc19kcmF3X3JlbGllZiAociwgdGgsIHJhaXNlZF9wLAorICAgICAgICAgICAgICAgICAg ICAgIHMtPnNsaWNlLnkgPT0gMCwKKyAgICAgICAgICAgICAgICAgICAgICBzLT5zbGljZS55ICsg cy0+c2xpY2UuaGVpZ2h0ID09IHMtPmltZy0+aGVpZ2h0LAorICAgICAgICAgICAgICAgICAgICAg IHMtPnNsaWNlLnggPT0gMCwKKyAgICAgICAgICAgICAgICAgICAgICBzLT5zbGljZS54ICsgcy0+ c2xpY2Uud2lkdGggPT0gcy0+aW1nLT53aWR0aCwgcyk7CisgICAgfQorICAvKiBJZiB0aGVyZSBp cyBubyBtYXNrLCB0aGUgYmFja2dyb3VuZCB3b24ndCBiZSBzZWVuLAorICAgICBzbyBkcmF3IGEg cmVjdGFuZ2xlIG9uIHRoZSBpbWFnZSBmb3IgdGhlIGN1cnNvci4KKyAgICAgRG8gdGhpcyBmb3Ig YWxsIGltYWdlcywgZ2V0dGluZyB0cmFuc3BhcmVuY3kgcmlnaHQgaXMgbm90IHJlbGlhYmxlLiAq LworICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IpCisgICAgeworICAgICAgaW50IHRoaWNrbmVz cyA9IGFicyAocy0+aW1nLT5yZWxpZWYpOworICAgICAgaWYgKHRoaWNrbmVzcyA9PSAwKSB0aGlj a25lc3MgPSAxOworICAgIGlmIChnbHlwaF9mbGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgfHwg Z2x5cGhfZmxhdm9yID09IE1DX0dMWVBITEVTUykKKyAgICAgIHsKKyAgICAgICAgTlNDb2xvciAq Ym9yZGVyX2NvbG9yID0gW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGdyZWVuOiBsc2wuZ3JlZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHBoYTogMS4wXTsKKyAgICAg ICAgbnNfZHJhd19ib3ggKGJyLCB0aGlja25lc3MsIGJvcmRlcl9jb2xvciwgMSwgMSk7CisgICAg ICB9CisgICAgICBlbHNlCisgICAgICAgIG5zX2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBGUkFN RV9DVVJTT1JfQ09MT1IgKHMtPmYpLCAxLCAxKTsKKyAgICB9Cit9CisKK3N0YXRpYyB2b2lkCitt Y19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91bmQgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMs IGNoYXIgZm9yY2VfcCkKK3sKKyAgTlNUUkFDRSAoIm1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFj a2dyb3VuZCIpOworICBpZiAoIXMtPmJhY2tncm91bmRfZmlsbGVkX3AvKiB8fCBzLT5obCA9PSBE UkFXX01PVVNFX0ZBQ0UqLykKKyAgICB7CisgICAgICBpbnQgYm94X2xpbmVfd2lkdGggPSBtYXgg KHMtPmZhY2UtPmJveF9saW5lX3dpZHRoLCAwKTsKKyAgICAgIGlmIChGT05UX0hFSUdIVCAocy0+ Zm9udCkgPCBzLT5oZWlnaHQgLSAyICogYm94X2xpbmVfd2lkdGgKKyAgICAgICAgICAvKiBXaGVu IHhkaXNwLmMgaWdub3JlcyBGT05UX0hFSUdIVCwgd2UgY2Fubm90IHRydXN0IGZvbnQKKyAgICAg ICAgICAgICBkaW1lbnNpb25zLCBzaW5jZSB0aGUgYWN0dWFsIGdseXBocyBtaWdodCBiZSBtdWNo CisgICAgICAgICAgICAgc21hbGxlci4gIFNvIGluIHRoYXQgY2FzZSB3ZSBhbHdheXMgY2xlYXIg dGhlIHJlY3RhbmdsZQorICAgICAgICAgICAgIHdpdGggYmFja2dyb3VuZCBjb2xvci4gKi8KKyAg ICAgICAgICB8fCBGT05UX1RPT19ISUdIIChzLT5mb250KQorICAgICAgICAgIHx8IHMtPmZvbnRf bm90X2ZvdW5kX3AgfHwgcy0+ZXh0ZW5kc190b19lbmRfb2ZfbGluZV9wIHx8IGZvcmNlX3ApCisg ICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZmFjZSAqZmFjZTsKKyAgICAgICAgICBpZiAocy0+ aGwgPT0gRFJBV19NT1VTRV9GQUNFKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBmYWNl ID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9ITF9JTkZPIChzLT5mKS0+bW91c2VfZmFjZV9m YWNlX2lkKTsKKyAgICAgICAgICAgICAgaWYgKCFmYWNlKQorICAgICAgICAgICAgICAgIGZhY2Ug PSBGQUNFX0ZST01fSUQgKHMtPmYsIE1PVVNFX0ZBQ0VfSUQpOworICAgICAgICAgICAgfQorICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBz LT5maXJzdF9nbHlwaC0+ZmFjZV9pZCk7CisgICAgICAgICAgaWYgKCFmYWNlLT5zdGlwcGxlKQor ICAgICAgICAgICAgWyhOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpICE9IDAKKyAgICAgICAgICAg ICAgPyBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSwg cy0+ZikKKyAgICAgICAgICAgICAgOiBGUkFNRV9CQUNLR1JPVU5EX0NPTE9SIChzLT5mKSkgc2V0 XTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0 cnVjdCBuc19kaXNwbGF5X2luZm8gKmRweWluZm8gPSBGUkFNRV9ESVNQTEFZX0lORk8gKHMtPmYp OworICAgICAgICAgICAgICAgIFtbZHB5aW5mby0+Yml0bWFwc1tmYWNlLT5zdGlwcGxlLTFdLmlt ZyBzdGlwcGxlTWFza10gc2V0XTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIGlmIChzLT5o bCAhPSBEUkFXX0NVUlNPUikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgcy0+cmVjdGFu Z2xlX251a2VkX3AgPSB0cnVlOworICAgICAgICAgICAgICBOU1JlY3QgciA9IE5TTWFrZVJlY3Qg KHMtPngsIHMtPnkgKyBib3hfbGluZV93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHMtPmJhY2tncm91bmRfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzLT5oZWlnaHQtMipib3hfbGluZV93aWR0aCk7CisgICAgICAgICAgICAgIE5T UmVjdEZpbGwgKHIpOworICAgICAgICAgICAgfQorICAgICAgICAgIHMtPmJhY2tncm91bmRfZmls bGVkX3AgPSAxOworICAgICAgICB9CisgICAgfQorfQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHJh d19nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRy aXggKm1hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3csIHN0cnVjdCBtY19tYXRyaXggbWNfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBtY19SR0IgbHNsLCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsCisgICAgICAg ICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IHdk LCBib29sIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgY3Vyc29yX2dj X3ApCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICAgICAgRXh0ZXJuYWwgKFJJRik6IE1haW4gZHJh dy10ZXh0IGNhbGwuCisgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworeworICBOU1JlY3QgclsyXTsK KyAgaW50IG47CisgIGNoYXIgYm94X2RyYXduX3AgPSAwOworICBzdHJ1Y3QgZm9udCAqZm9udCA9 IHMtPmZhY2UtPmZvbnQ7CisgIGlmICghZm9udCkKKyAgICBmb250ID0gRlJBTUVfRk9OVCAocy0+ Zik7CisgIE5TVFJBQ0VfV0hFTiAoTlNUUkFDRV9HUk9VUF9HTFlQSFMsICJtY19uc19kcmF3X2ds eXBoX3N0cmluZyIpOworICBpZiAocy0+bmV4dCAmJiBzLT5yaWdodF9vdmVyaGFuZyAmJiAhcy0+ Zm9yX292ZXJsYXBzKQorICAgIHsKKyAgICAgIGludCB3aWR0aDsKKyAgICAgIHN0cnVjdCBnbHlw aF9zdHJpbmcgKm5leHQ7CisgICAgICBmb3IgKHdpZHRoID0gMCwgbmV4dCA9IHMtPm5leHQ7Cisg ICAgICAgICAgIG5leHQgJiYgd2lkdGggPCBzLT5yaWdodF9vdmVyaGFuZzsKKyAgICAgICAgICAg d2lkdGggKz0gbmV4dC0+d2lkdGgsIG5leHQgPSBuZXh0LT5uZXh0KQorICAgICAgICBpZiAobmV4 dC0+Zmlyc3RfZ2x5cGgtPnR5cGUgIT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgeworICAgICAg ICAgICAgaWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBlICE9IFNUUkVUQ0hfR0xZUEgpCisgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0cmluZ19jbGlw X3JlY3QgKHMtPm5leHQsIHIpOworICAgICAgICAgICAgICAgIGlmICghbnNfY2xpcF90b19yZWN0 IChzLT5mLCByLCBuKSkKKyAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgICAg ICBtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91bmQgKHMtPm5leHQsIDEpOworICAgICAg ICAgICAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgbWNfbnNfZHVtcGdseXBoc19zdHJldGNo IChzLT5uZXh0LCBtYXRyaXgsIHJvdywgbWNfbWF0cml4LCB3ZCk7CisgICAgICAgICAgICBuZXh0 LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgIH0KKyAgICB9CisgIGlmICghcy0+Zm9yX292ZXJs YXBzICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JPWAorICAgICAgJiYgKHMtPmZpcnN0X2ds eXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAgICB8fCBzLT5maXJzdF9nbHlwaC0+dHlw ZSA9PSBDT01QT1NJVEVfR0xZUEgpKQorICAgIHsKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3Ry aW5nX2NsaXBfcmVjdCAocywgcik7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+Ziwg ciwgbikpCisgICAgICAgIHJldHVybjsKKyAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFj a2dyb3VuZCAocywgMSk7CisgICAgICBuc19kdW1wZ2x5cGhzX2JveF9vcl9yZWxpZWYgKHMpOwor ICAgICAgbnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOworICAgICAgYm94X2RyYXduX3AgPSAxOwor ICAgIH0KKyAgc3dpdGNoIChzLT5maXJzdF9nbHlwaC0+dHlwZSkKKyAgICB7CisgICAgY2FzZSBJ TUFHRV9HTFlQSDoKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywg cik7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+ZiwgciwgbikpCisgICAgICAgIHJl dHVybjsKKyAgICAgIG1jX25zX2R1bXBnbHlwaHNfaW1hZ2UgKHMsIHJbMF0sIGxzbCwgZ2x5cGhf Zmxhdm9yLCBjdXJzb3JfdHlwZSwgYWN0aXZlX3ApOworICAgICAgbnNfcmVzZXRfY2xpcHBpbmcg KHMtPmYpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBTVFJFVENIX0dMWVBIOgorICAgICAgbWNf bnNfZHVtcGdseXBoc19zdHJldGNoIChzLCBtYXRyaXgsIHJvdywgbWNfbWF0cml4LCB3ZCk7Cisg ICAgICBicmVhazsKKyAgICBjYXNlIENIQVJfR0xZUEg6CisgICAgY2FzZSBDT01QT1NJVEVfR0xZ UEg6CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAg ICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAgICAgICByZXR1cm47Cisg ICAgICBpZiAocy0+Zm9yX292ZXJsYXBzCisgICAgICAgICAgfHwgKHMtPmNtcF9mcm9tID4gMAor ICAgICAgICAgICAgICAmJiAhIHMtPmZpcnN0X2dseXBoLT51LmNtcC5hdXRvbWF0aWMpKQorICAg ICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gMTsKKyAgICAgICAgZWxzZQorICAgICAgICAg IG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZCAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5 cGUgPT0gQ09NUE9TSVRFX0dMWVBIKTsKKyAgICAgIGludCBmbGFncyA9IChzLT5obCA9PSBEUkFX X0NVUlNPUikKKyAgICAgICAgICAgICAgICAgICAgPyBOU19EVU1QR0xZUEhfQ1VSU09SCisgICAg ICAgICAgICAgICAgICA6IChzLT5obCA9PSBEUkFXX01PVVNFX0ZBQ0UpCisgICAgICAgICAgICAg ICAgICAgID8gTlNfRFVNUEdMWVBIX01PVVNFRkFDRQorICAgICAgICAgICAgICAgICAgOiAocy0+ Zm9yX292ZXJsYXBzKQorICAgICAgICAgICAgICAgICAgICA/IE5TX0RVTVBHTFlQSF9GT1JFR1JP VU5ECisgICAgICAgICAgICAgICAgICA6IE5TX0RVTVBHTFlQSF9OT1JNQUw7CisgICAgICB1bnNp Z25lZCBsb25nIHNhdmVkX2ZnID0gTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKTsKKyAgICAg IGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUiAmJiBjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9Y KQorICAgICAgICB7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyB0bXAgPSBOU19GQUNFX0JBQ0tH Uk9VTkQgKHMtPmZhY2UpOworICAgICAgICAgIE5TX0ZBQ0VfQkFDS0dST1VORCAocy0+ZmFjZSkg PSBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpOworICAgICAgICAgIE5TX0ZBQ0VfRk9SRUdS T1VORCAocy0+ZmFjZSkgPSB0bXA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocy0+aGwg PT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfRlJB TUVEX0JPWAorICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICB7CisgICAg ICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0KKyAgICAgICAgICAg ICAgbG9va3VwX25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1 cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xs b3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19hY3RpdmVfZmFjZV9p ZCk7CisgICAgICAgICAgICBOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpID0gTlNfRkFDRV9G T1JFR1JPVU5EIChob2xsb3dfYWN0aXZlX2ZhY2UpOworICAgICAgICAgIH0KKyAgICAgICAgICBl bHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgICAgICAgICAgICAgICYmIGN1cnNv cl90eXBlID09IE1DX0ZSQU1FRF9CT1gKKyAgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2 ZV9mYWNlX2lkID0KKyAgICAgICAgICAgICAgICBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRy dWUpOworICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBG QUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAg ICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VORCAoaG9s bG93X2luYWN0aXZlX2ZhY2UpOworICAgICAgICAgICAgfQorICAgICAgaWYgKHMtPmZpcnN0X2ds eXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCkKKyAgICAgICAgbnNfZHJhd19jb21wb3NpdGVf Z2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMpOworICAgICAgICBlbHNlCisgICAgICAgICAgewor ICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3AgPSAoKGZsYWdzID09IE5TX0RVTVBHTFlQSF9OT1JN QUwgJiYgIXMtPmJhY2tncm91bmRfZmlsbGVkX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB8fCBmbGFncyA9PSBOU19EVU1QR0xZUEhfTU9VU0VGQUNFKTsKKyAgICAgICAgICAgIGlm ICh3aXRoX2JnX3ApCisgICAgICAgICAgICAgIHMtPmJhY2tncm91bmRfbnVrZWRfcCA9IHRydWU7 CisgICAgICAgICAgICBmb250LT5kcml2ZXItPmRyYXcgKHMsIHMtPmNtcF9mcm9tLCBzLT5uY2hh cnMsIHMtPngsIHMtPnliYXNlLCB3aXRoX2JnX3ApOworICAgICAgICAgIH0KKyAgICAgIE5TQ29s b3IgKmNvbCA9IChOU19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpICE9IDAKKyAgICAgICAgICAg ICAgICAgICAgID8gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAo cy0+ZmFjZSksIHMtPmYpCisgICAgICAgICAgICAgICAgICAgICA6IEZSQU1FX0ZPUkVHUk9VTkRf Q09MT1IgKHMtPmYpKTsKKyAgICAgIFtjb2wgc2V0XTsKKyAgICAgIC8qIERyYXcgdW5kZXJsaW5l LCBvdmVybGluZSwgc3RyaWtlLXRocm91Z2guICovCisgICAgICBtY19uc19kcmF3X3RleHRfZGVj b3JhdGlvbiAocywgcy0+ZmFjZSwgY29sLCBzLT53aWR0aCwgcy0+eCk7CisgICAgICBpZiAocy0+ Zmlyc3RfZ2x5cGgtPnR5cGUgIT0gQ09NUE9TSVRFX0dMWVBICisgICAgICAgICAgJiYgKHMtPmxl ZnRfb3ZlcndyaXR0ZW5fcCB8fCBzLT5yaWdodF9vdmVyd3JpdHRlbl9wKQorICAgICAgICAgICYm IChzLT5iYWNrZ3JvdW5kX251a2VkX3AgfHwgcy0+cmVjdGFuZ2xlX251a2VkX3ApCisgICAgICAg ICAgJiYgKHMtPmFjdGlvbl90eXBlID09IE1DX0RSQVdfR0xZUEhfU1RSSU5HIHx8IHMtPmFjdGlv bl90eXBlID09IE1DX0VSQVNFX0dMWVBIX1NUUklORykpCisgICAgICAgIG1jX25zX2RyYXdfb3Zl cndyaXR0ZW4gKHMsIG1hdHJpeCwgcm93LCBtY19tYXRyaXgsIHMtPmZpcnN0X2dseXBoKTsKKyAg ICAgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgICAgICYmIGN1cnNvcl90eXBlID09 IE1DX0ZJTExFRF9CT1gpCisgICAgICAgIHsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIHRtcCA9 IE5TX0ZBQ0VfQkFDS0dST1VORCAocy0+ZmFjZSk7CisgICAgICAgICAgTlNfRkFDRV9CQUNLR1JP VU5EIChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSk7CisgICAgICAgICAg TlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9IHRtcDsKKyAgICAgICAgfQorICAgICAgICBl bHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jf dHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAgICAgIE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ ZmFjZSkgPSBzYXZlZF9mZzsKKyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICAg IGJyZWFrOworICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgorICAgICAgbiA9IG5zX2dldF9nbHlw aF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlmICghbnNfY2xpcF90b19yZWN0IChz LT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcwor ICAgICAgICAgIHx8IChzLT5jbXBfZnJvbSA+IDAKKyAgICAgICAgICAgICAgJiYgISBzLT5maXJz dF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRf cCA9IDE7CisgICAgICBlbHNlCisgICAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNfYmFja2dy b3VuZCAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKTsKKyAgICAg IG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICAgIGJyZWFrOworICAgIGRlZmF1bHQ6Cisg ICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9CisgIC8qIERyYXcgYm94IGlmIG5vdCBkb25lIGFs cmVhZHkuICovCisgIGlmICghcy0+Zm9yX292ZXJsYXBzCisgICAgICAmJiAhYm94X2RyYXduX3AK KyAgICAgICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JPWCkKKyAgICB7CisgICAgICBuID0g bnNfZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlw X3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAgICAgICByZXR1cm47CisgICAgICBuc19kdW1wZ2x5 cGhzX2JveF9vcl9yZWxpZWYgKHMpOworICAgICAgbnNfcmVzZXRfY2xpcHBpbmcgKHMtPmYpOwor ICAgIH0KKyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMg Ki8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qID09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAK ICAgIE5TVFJBQ0UsIFRyYWNlIHN1cHBvcnQuCkBAIC0xMDc5LDYgKzIwNTIsMTYgQEAgc3RhdGlj IE5TUmVjdCBjb25zdHJhaW5fZnJhbWVfcmVjdChOU1JlY3QgZnJhbWVSZWN0LCBib29sIGlzRnVs bHNjcmVlbikKICAgIGV4dGVybmFsIChSSUYpIGNhbGw7IHdob2xlIGZyYW1lLCBjYWxsZWQgYmVm b3JlIGd1aV91cGRhdGVfd2luZG93X2JlZ2luCiAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLwogewor CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisg IGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogI2lmZGVmIE5TX0lNUExfQ09DT0EKICAgRW1hY3NWaWV3ICp2aWV3ID0gRlJBTUVfTlNfVklF VyAoZik7CiAKQEAgLTExMDksNiArMjA5MiwxNiBAQCBzdGF0aWMgTlNSZWN0IGNvbnN0cmFpbl9m cmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNGdWxsc2NyZWVuKQogCiAvKiAgIGlm IChmID09IE1PVVNFX0hMX0lORk8gKGYpLT5tb3VzZV9mYWNlX21vdXNlX2ZyYW1lKSAqLwogICBN T1VTRV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9kZWZlciA9IDA7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdf ZnJhbWUgPSBOVUxMOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIApAQCAt NDc1OSw2ICs1NzUyLDE3IEBAIGluIGNlcnRhaW4gc2l0dWF0aW9ucyAocmFwaWQgaW5jb21pbmcg ZXZlbnRzKS4KICAgICAgIGJhciA9IFtbRW1hY3NTY3JvbGxlciBhbGxvY10gaW5pdEZyYW1lOiBy IHdpbmRvdzogd2luXTsKICAgICAgIHdzZXRfdmVydGljYWxfc2Nyb2xsX2JhciAod2luZG93LCBt YWtlX21pbnRfcHRyIChiYXIpKTsKICAgICAgIHVwZGF0ZV9wID0gWUVTOworCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICAvKiBUaGlz IGlzIG9ubHkgZm9yIGRlYnVnZ2luZyBwdXJwb3Nlcy4gKi8KKyAgICAgIFtiYXIgbWNfc2V0X3Jl Y3RhbmdsZTogcl07CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB9CiAgIGVs c2UKICAgICB7CkBAIC00NzY2LDEyICs1NzcwLDMwIEBAIGluIGNlcnRhaW4gc2l0dWF0aW9ucyAo cmFwaWQgaW5jb21pbmcgZXZlbnRzKS4KICAgICAgIGJhciA9IFhOU19TQ1JPTExfQkFSICh3aW5k b3ctPnZlcnRpY2FsX3Njcm9sbF9iYXIpOwogICAgICAgb2xkUmVjdCA9IFtiYXIgZnJhbWVdOwog ICAgICAgci5zaXplLndpZHRoID0gb2xkUmVjdC5zaXplLndpZHRoOworCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCiAgICAgICBpZiAoRlJBTUVf TElWRV9QIChmKSAmJiAhTlNFcXVhbFJlY3RzIChvbGRSZWN0LCByKSkKICAgICAgICAgeworICAg ICAgICAgIC8qIFRoZSBtYWluIHdpbmRvdyBoYXMgcHJvYmFibHkgYmVlbiByZXNpemVkLiAgR3Jh Y2lvdXNseSBkZWxldGUgdGhlCisgICAgICAgICAgb2xkIHNjcm9sbCBiYXIgd2l0aG91dCByZXBh aW50aW5nIGl0cyByZWN0YW5nbGU7IGFuZCwgY3JlYXRlIGEgbmV3CisgICAgICAgICAgc2Nyb2xs IGJhciBlbHNld2hlcmUuKi8KICAgICAgICAgICBpZiAob2xkUmVjdC5vcmlnaW4ueCAhPSByLm9y aWdpbi54KQorICAgICAgICAgICAgewogICAgICAgICAgICAgICBuc19jbGVhcl9mcmFtZV9hcmVh IChmLCBsZWZ0LCB0b3AsIHdpZHRoLCBoZWlnaHQpOworICAgICAgICAgICAgICBbYmFyIG1jX2p1 ZGdlXTsKKyAgICAgICAgICAgICAgYmFyID0gW1tFbWFjc1Njcm9sbGVyIGFsbG9jXSBpbml0RnJh bWU6IHIgd2luZG93OiB3aW5dOworICAgICAgICAgICAgICB3c2V0X3ZlcnRpY2FsX3Njcm9sbF9i YXIgKHdpbmRvdywgbWFrZV9taW50X3B0ciAoYmFyKSk7CisgICAgICAgICAgICB9CisgICAgICAg ICAgICBlbHNlCiAgICAgICAgICAgW2JhciBzZXRGcmFtZTogcl07CiAgICAgICAgIH0KKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KIAogICBpZiAodXBkYXRlX3ApCkBAIC00 OTMxLDkgKzU5NTMsNTcgQEAgaW4gY2VydGFpbiBzaXR1YXRpb25zIChyYXBpZCBpbmNvbWluZyBl dmVudHMpLgogICAgIHsKICAgICAgIHZpZXcgPSBbc3Vidmlld3Mgb2JqZWN0QXRJbmRleDogaV07 CiAgICAgICBpZiAoIVt2aWV3IGlzS2luZE9mQ2xhc3M6IFtFbWFjc1Njcm9sbGVyIGNsYXNzXV0p IGNvbnRpbnVlOwotICAgICAgaWYgKFt2aWV3IGp1ZGdlXSkKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAvKiBgWFNFVFdJTkRPVycgd2ls bCBzb21ldGltZXMgY2F1c2UgRW1hY3MgdG8gY3Jhc2ggd2hlbiBydW5uaW5nIHVuZGVyIGdkYiBl dmVuCisgIHRob3VnaCAodyAhPSBOVUxMKS4gIFRoZXJlZm9yZSwgd2UgY2Fubm90IHJlbGlhYmx5 IHVzZSBgV0lORE9XX0xJVkVfUCcuICovCisgIHN0cnVjdCB3aW5kb3cgKncgPSBbdmlldyBtY19n ZXRfd2luZG93XTsKKyAgaWYgKHcgIT0gTlVMTAorICAgICAgJiYgTklMUCAody0+Y29udGVudHMp KQorICAgIHsKKyAgICAgIEJPT0wgZGVidWdfcCA9IGZhbHNlOworICAgICAgaWYgKGRlYnVnX3AK KyAgICAgICAgICAvKiBgd2luZG93X2JveCcgY2FsbHMgYHdpbmRvd19ib3hfaGVpZ2h0Jywgd2hp Y2ggd2lsbCBjYXVzZSBFbWFjcyB0bworICAgICAgICAgIGNyYXNoIGlmIEZSQU1FUCAody0+ZnJh bWUpIGlzIG5vdCBzYXRpc2ZpZWQuICovCisgICAgICAgICAgJiYgRlJBTUVQICh3LT5mcmFtZSkp CisgICAgICAgIHsKKyAgICAgICAgICBOU1JlY3QgcjAgPSBbdmlldyBtY19nZXRfcmVjdGFuZ2xl XTsKKyAgICAgICAgICBpbnQgeDAgPSBOU01pblggKHIwKTsKKyAgICAgICAgICBpbnQgeTAgPSBO U01pblkgKHIwKTsKKyAgICAgICAgICBpbnQgd2QwID0gTlNXaWR0aCAocjApOworICAgICAgICAg IGludCBoMCA9IE5TSGVpZ2h0IChyMCk7CisgICAgICAgICAgaW50IHdpbmRvd195LCB3aW5kb3df aGVpZ2h0OworICAgICAgICAgIHdpbmRvd19ib3ggKHcsIEFOWV9BUkVBLCAwLCAmd2luZG93X3ks IDAsICZ3aW5kb3dfaGVpZ2h0KTsKKyAgICAgICAgICBpbnQgdG9wID0gd2luZG93X3k7CisgICAg ICAgICAgaW50IGhlaWdodCA9IHdpbmRvd19oZWlnaHQ7CisgICAgICAgICAgaW50IHdpZHRoID0g V0lORE9XX0NPTkZJR19TQ1JPTExfQkFSX0NPTFMgKHcpICogRlJBTUVfQ09MVU1OX1dJRFRIIChm KTsKKyAgICAgICAgICBpbnQgbGVmdCA9IFdJTkRPV19TQ1JPTExfQkFSX0FSRUFfWCAodyk7Cisg ICAgICAgICAgTlNSZWN0IHIxID0gTlNNYWtlUmVjdCAobGVmdCwgdG9wLCB3aWR0aCwgaGVpZ2h0 KTsKKyAgICAgICAgICAvKiBUaGUgcGFyZW50IHZpZXcgaXMgZmxpcHBlZCwgc28gd2UgbmVlZCB0 byBmbGlwIHkgdmFsdWUuICovCisgICAgICAgICAgRW1hY3NWaWV3ICpmcmFtZV92aWV3ID0gRlJB TUVfTlNfVklFVyAoZik7CisgICAgICAgICAgTlNSZWN0IHYgPSBbZnJhbWVfdmlldyBmcmFtZV07 CisgICAgICAgICAgcjEub3JpZ2luLnkgPSAodi5zaXplLmhlaWdodCAtIHIxLnNpemUuaGVpZ2h0 IC0gcjEub3JpZ2luLnkpOworICAgICAgICAgIGludCB4MSA9IE5TTWluWCAocjEpOworICAgICAg ICAgIGludCB5MSA9IE5TTWluWSAocjEpOworICAgICAgICAgIGludCB3ZDEgPSBOU1dpZHRoIChy MSk7CisgICAgICAgICAgaW50IGgxID0gTlNIZWlnaHQgKHIxKTsKKyAgICAgICAgICBmcHJpbnRm IChzdGRlcnIsICIlcyAtLSBERUFEOlxuXAorICAgICAgICAgIHgwL3gxICglZC8lZCkgfCB5MC95 MSAoJWQvJWQpIHwgd2QwL3dkMSAoJWQvJWQpIHwgaDAvaDEgKCVkLyVkKVxuIiwKKyAgICAgICAg ICBtY193aW5kb3cgKHcpLCB4MCwgeDEsIHkwLCB5MSwgd2QwLCB3ZDEsIGgwLCBoMSk7CisgICAg ICAgIH0KKyAgICAgIGlmIChbdmlldyBtY19qdWRnZV0pCiAgICAgICAgIHJlbW92ZWQgPSBZRVM7 CiAgICAgfQorICAgIGVsc2UgaWYgKFt2aWV3IGp1ZGdlXSkKKyAgICAgIHJlbW92ZWQgPSBZRVM7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKKyAgICB9CiAKICAgaWYgKHJlbW92ZWQp CiAgICAgW2V2aWV3IHVwZGF0ZUZyYW1lU2l6ZTogTk9dOwpAQCAtNTA3NCw2ICs2MTQ0LDIwIEBA IHN0YXRpYyBMaXNwX09iamVjdCBuc19zdHJpbmdfdG9fbGlzcG1vZCAoY29uc3QgY2hhciAqcykK IGV4dGVybiBmcmFtZV9wYXJtX2hhbmRsZXIgbnNfZnJhbWVfcGFybV9oYW5kbGVyc1tdOwogc3Rh dGljIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNlIG5zX3JlZGlzcGxheV9pbnRlcmZhY2UgPQog eworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYG5zdGVybS5tYCBtdXN0IGJlIGluIHRoZSBl eGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGBkaXNwZXh0 ZXJuLmhgISAqLworCisgIG1jX25zX2RyYXdfd2luZG93X2N1cnNvciwKKyAgbWNfbnNfZHJhd19n bHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgbnNfZnJhbWVf cGFybV9oYW5kbGVycywKICAgZ3VpX3Byb2R1Y2VfZ2x5cGhzLAogICBndWlfd3JpdGVfZ2x5cGhz LApAQCAtODcxMSw2ICs5Nzk1LDQ5IEBAIC0gKEJPT0wpY2FuQmVjb21lTWFpbldpbmRvdwogCiBA aW1wbGVtZW50YXRpb24gRW1hY3NTY3JvbGxlcgogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCistICh2b2lkKW1jX3NldF9yZWN0YW5nbGU6IChO U1JlY3QpcmVjdAoreworICBtY19yZWN0YW5nbGUgPSByZWN0OworfQorCistIChOU1JlY3QpbWNf Z2V0X3JlY3RhbmdsZQoreworICByZXR1cm4gbWNfcmVjdGFuZ2xlOworfQorCistIChzdHJ1Y3Qg d2luZG93ICopbWNfZ2V0X3dpbmRvdworeworICByZXR1cm4gd2luZG93OworfQorCistIChib29s KW1jX2p1ZGdlCit7CisgIE5TVFJBQ0UgKCJbRW1hY3NTY3JvbGxlciBtY19qdWRnZV0iKTsKKyAg Ym9vbCByZXQgPSBjb25kZW1uZWQ7CisgIGJsb2NrX2lucHV0ICgpOworICBpZiAoY29uZGVtbmVk KQorICAgIHsKKyAgICAgIC8qIGVuc3VyZSBvdGhlciBzY3JvbGxiYXIgdXBkYXRlcyBhZnRlciBk ZWxldGlvbiAqLworICAgICAgRW1hY3NWaWV3ICp2aWV3ID0gKEVtYWNzVmlldyAqKUZSQU1FX05T X1ZJRVcgKGZyYW1lKTsKKyAgICAgIGlmICh2aWV3ICE9IG5pbCkKKyAgICAgICAgdmlldy0+c2Ny b2xsYmFyc05lZWRpbmdVcGRhdGUrKzsKKyAgICB9CisgIGlmICh3aW5kb3cpCisgICAgd3NldF92 ZXJ0aWNhbF9zY3JvbGxfYmFyICh3aW5kb3csIFFuaWwpOworICB3aW5kb3cgPSAwOworICBbc2Vs ZiByZW1vdmVGcm9tU3VwZXJ2aWV3V2l0aG91dE5lZWRpbmdEaXNwbGF5XTsKKyAgW3NlbGYgcmVs ZWFzZV07CisgIHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVybiByZXQ7Cit9CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKIC8qIGZvciByZXBlYXQgYnV0dG9uIHB1c2ggKi8KICNkZWZp bmUgU0NST0xMX0JBUl9GSVJTVF9ERUxBWSAwLjUKICNkZWZpbmUgU0NST0xMX0JBUl9DT05USU5V T1VTX0RFTEFZICgxLjAgLyAxNSkKZGlmZiAtLWdpdCBhL3NyYy93MzJ0ZXJtLmMgYi9zcmMvdzMy dGVybS5jCmluZGV4IGM2ZTE3NWUuLmZhMTE1YzAgMTAwNjQ0Ci0tLSBhL3NyYy93MzJ0ZXJtLmMK KysrIGIvc3JjL3czMnRlcm0uYwpAQCAtNjIsNiArNjIsMTE2OCBAQCBhbG9uZyB3aXRoIEdOVSBF bWFjcy4gIElmIG5vdCwgc2VlIDxodHRwczovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uICAqLwog I2luY2x1ZGUgImJpdG1hcHMvZ3JheS54Ym0iCiAjZW5kaWYKIAwKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNPUlMgKi8KKwordHlwZWRlZiBzdHJ1 Y3QgeworICB1bnNpZ25lZCBsb25nIHBpeGVsOworICB1bnNpZ25lZCBzaG9ydCByZWQsIG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gVnF1aXRfZmxhZzsKKyAgVnF1aXRfZmxhZyA9IFFu aWw7CisgIGlmIChFUSAoZmxhZywgUWtpbGxfZW1hY3MpKQorICAgIEZraWxsX2VtYWNzIChRbmls KTsKKyAgaWYgKEVRIChWdGhyb3dfb25faW5wdXQsIGZsYWcpKQorICAgIEZ0aHJvdyAoVnRocm93 X29uX2lucHV0LCBRdCk7CisgIEZzaWduYWwgKFFxdWl0LCBRbmlsKTsKK30KKworI2RlZmluZSBN Q19RVUlUCQkJCQkJXAorICBkbyB7CQkJCQkJCVwKKyAgICBpZiAoIU5JTFAgKFZxdWl0X2ZsYWcp ICYmIE5JTFAgKFZpbmhpYml0X3F1aXQpKQlcCisgICAgICBtY19wcm9jZXNzX3F1aXRfZmxhZyAo KTsJCQkJXAorICAgIGVsc2UgaWYgKHBlbmRpbmdfc2lnbmFscykJCQkJXAorICAgICAgcHJvY2Vz c19wZW5kaW5nX3NpZ25hbHMgKCk7CQkJXAorICB9IHdoaWxlIChmYWxzZSkKKworc3RhdGljIExp c3BfT2JqZWN0CittY193MzJfY29sb3JfbWFwX2xvb2t1cCAoY29uc3QgY2hhciAqY29sb3JuYW1l KQoreworICBMaXNwX09iamVjdCB0YWlsLCByZXQgPSBRbmlsOworICBibG9ja19pbnB1dCAoKTsK KyAgZm9yICh0YWlsID0gVnczMl9jb2xvcl9tYXA7IENPTlNQICh0YWlsKTsgdGFpbCA9IFhDRFIg KHRhaWwpKQorICAgIHsKKyAgICAgIHJlZ2lzdGVyIExpc3BfT2JqZWN0IGVsdCwgdGVtOworICAg ICAgZWx0ID0gWENBUiAodGFpbCk7CisgICAgICBpZiAoIUNPTlNQIChlbHQpKSBjb250aW51ZTsK KyAgICAgIHRlbSA9IFhDQVIgKGVsdCk7CisgICAgICBpZiAobHN0cmNtcGkgKFNTREFUQSAodGVt KSwgY29sb3JuYW1lKSA9PSAwKQorICAgICAgICB7CisgICAgICAgICAgcmV0ID0gRmNkciAoZWx0 KTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgTUNfUVVJVDsKKyAgICB9Cisg IHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBMaXNwX09iamVj dAorbWNfeF90b193MzJfY29sb3IgKGNvbnN0IGNoYXIgKiBjb2xvcm5hbWUpCit7CisgIHJlZ2lz dGVyIExpc3BfT2JqZWN0IHJldCA9IFFuaWw7CisgIGJsb2NrX2lucHV0ICgpOworICBpZiAoY29s b3JuYW1lWzBdID09ICcjJykKKyAgICB7CisgICAgICAvKiBDb3VsZCBiZSBhbiBvbGQtc3R5bGUg UkdCIERldmljZSBzcGVjaWZpY2F0aW9uLiAqLworICAgICAgaW50IHNpemUgPSBzdHJsZW4gKGNv bG9ybmFtZSArIDEpOworICAgICAgY2hhciAqY29sb3IgPSBhbGxvY2EgKHNpemUgKyAxKTsKKyAg ICAgIHN0cmNweSAoY29sb3IsIGNvbG9ybmFtZSArIDEpOworICAgICAgaWYgKHNpemUgPT0gMyB8 fCBzaXplID09IDYgfHwgc2l6ZSA9PSA5IHx8IHNpemUgPT0gMTIpCisgICAgICAgIHsKKyAgICAg ICAgICBVSU5UIGNvbG9ydmFsOworICAgICAgICAgIGludCBpLCBwb3M7CisgICAgICAgICAgcG9z ID0gMDsKKyAgICAgICAgICBzaXplIC89IDM7CisgICAgICAgICAgY29sb3J2YWwgPSAwOworICAg ICAgICAgIGZvciAoaSA9IDA7IGkgPCAzOyBpKyspCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIGNoYXIgKmVuZDsKKyAgICAgICAgICAgICAgY2hhciB0OworICAgICAgICAgICAgICB1bnNp Z25lZCBsb25nIHZhbHVlOworICAgICAgICAgICAgICAvKiBUaGUgY2hlY2sgZm9yICd4JyBpbiB0 aGUgZm9sbG93aW5nIGNvbmRpdGlvbmFsIHRha2VzIGludG8KKyAgICAgICAgICAgICAgYWNjb3Vu dCB0aGUgZmFjdCB0aGF0IHN0cnRvbCBhbGxvd3MgYSAiMHgiIGluIGZyb250IG9mCisgICAgICAg ICAgICAgIG91ciBudW1iZXJzLCBhbmQgd2UgZG9uJ3QuICovCisgICAgICAgICAgICAgIGlmICgh aXN4ZGlnaXQgKGNvbG9yWzBdKSB8fCBjb2xvclsxXSA9PSAneCcpCisgICAgICAgICAgICAgICAg YnJlYWs7CisgICAgICAgICAgICAgIHQgPSBjb2xvcltzaXplXTsKKyAgICAgICAgICAgICAgY29s b3Jbc2l6ZV0gPSAnXDAnOworICAgICAgICAgICAgICB2YWx1ZSA9IHN0cnRvdWwgKGNvbG9yLCAm ZW5kLCAxNik7CisgICAgICAgICAgICAgIGNvbG9yW3NpemVdID0gdDsKKyAgICAgICAgICAgICAg aWYgKGVycm5vID09IEVSQU5HRSB8fCBlbmQgLSBjb2xvciAhPSBzaXplKQorICAgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgICBzd2l0Y2ggKHNpemUpCisgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgIGNhc2UgMToKKyAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFs dWUgKiAweDEwOworICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2Fz ZSAyOgorICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAzOgor ICAgICAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDsKKyAgICAgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgICAgIGNhc2UgNDoKKyAgICAgICAgICAgICAgICAgIHZhbHVlIC89IDB4 MTAwOworICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICBjb2xvcnZhbCB8PSAodmFsdWUgPDwgcG9zKTsKKyAgICAgICAgICAgICAgcG9zICs9 IDB4ODsKKyAgICAgICAgICAgICAgaWYgKGkgPT0gMikKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAgICAgWFNFVElO VCAocmV0LCBjb2xvcnZhbCk7CisgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0OworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgY29sb3IgPSBlbmQ7CisgICAgICAgICAgICB9Cisg ICAgICAgIH0KKyAgICB9CisgIGVsc2UgaWYgKHN0cm5pY21wIChjb2xvcm5hbWUsICJyZ2I6Iiwg NCkgPT0gMCkKKyAgICB7CisgICAgICBjb25zdCBjaGFyICpjb2xvcjsKKyAgICAgIFVJTlQgY29s b3J2YWw7CisgICAgICBpbnQgaSwgcG9zOworICAgICAgcG9zID0gMDsKKyAgICAgIGNvbG9ydmFs ID0gMDsKKyAgICAgIGNvbG9yID0gY29sb3JuYW1lICsgNDsKKyAgICAgIGZvciAoaSA9IDA7IGkg PCAzOyBpKyspCisgICAgICAgIHsKKyAgICAgICAgICBjaGFyICplbmQ7CisgICAgICAgICAgdW5z aWduZWQgbG9uZyB2YWx1ZTsKKyAgICAgICAgICAvKiBUaGUgY2hlY2sgZm9yICd4JyBpbiB0aGUg Zm9sbG93aW5nIGNvbmRpdGlvbmFsIHRha2VzIGludG8KKyAgICAgICAgICAgICBhY2NvdW50IHRo ZSBmYWN0IHRoYXQgc3RydG9sIGFsbG93cyBhICIweCIgaW4gZnJvbnQgb2YKKyAgICAgICAgICAg ICBvdXIgbnVtYmVycywgYW5kIHdlIGRvbid0LiAqLworICAgICAgICAgIGlmICghaXN4ZGlnaXQg KGNvbG9yWzBdKSB8fCBjb2xvclsxXSA9PSAneCcpCisgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICB2YWx1ZSA9IHN0cnRvdWwgKGNvbG9yLCAmZW5kLCAxNik7CisgICAgICAgICAgaWYgKGVy cm5vID09IEVSQU5HRSkKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIHN3aXRjaCAoZW5k IC0gY29sb3IpCisgICAgICAgICAgICB7CisgICAgICAgICAgICBjYXNlIDE6CisgICAgICAgICAg ICAgIHZhbHVlID0gdmFsdWUgKiAweDEwICsgdmFsdWU7CisgICAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNh c2UgMzoKKyAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDsKKyAgICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAgIHZhbHVlIC89IDB4MTAwOworICAg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgIHZh bHVlID0gVUxPTkdfTUFYOworICAgICAgICAgICAgfQorICAgICAgICAgIGlmICh2YWx1ZSA9PSBV TE9OR19NQVgpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICBjb2xvcnZhbCB8PSAodmFs dWUgPDwgcG9zKTsKKyAgICAgICAgICBwb3MgKz0gMHg4OworICAgICAgICAgIGlmIChpID09IDIp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmICgqZW5kICE9ICdcMCcpCisgICAgICAg ICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAg ICAgICAgIFhTRVRJTlQgKHJldCwgY29sb3J2YWwpOworICAgICAgICAgICAgICByZXR1cm4gcmV0 OworICAgICAgICAgICAgfQorICAgICAgICAgIGlmICgqZW5kICE9ICcvJykKKyAgICAgICAgICAg IGJyZWFrOworICAgICAgICAgIGNvbG9yID0gZW5kICsgMTsKKyAgICAgICAgfQorICAgIH0KKyAg ICBlbHNlIGlmIChzdHJuaWNtcCAoY29sb3JuYW1lLCAicmdiaToiLCA1KSA9PSAwKQorICAgICAg eworICAgICAgICAvKiBUaGlzIGlzIGFuIFJHQiBJbnRlbnNpdHkgc3BlY2lmaWNhdGlvbi4gKi8K KyAgICAgICAgY29uc3QgY2hhciAqY29sb3I7CisgICAgICAgIFVJTlQgY29sb3J2YWw7CisgICAg ICAgIGludCBpLCBwb3M7CisgICAgICAgIHBvcyA9IDA7CisgICAgICAgIGNvbG9ydmFsID0gMDsK KyAgICAgICAgY29sb3IgPSBjb2xvcm5hbWUgKyA1OworICAgICAgICBmb3IgKGkgPSAwOyBpIDwg MzsgaSsrKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGNoYXIgKmVuZDsKKyAgICAgICAgICAg IGRvdWJsZSB2YWx1ZTsKKyAgICAgICAgICAgIFVJTlQgdmFsOworICAgICAgICAgICAgdmFsdWUg PSBzdHJ0b2QgKGNvbG9yLCAmZW5kKTsKKyAgICAgICAgICAgIGlmIChlcnJubyA9PSBFUkFOR0Up CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgaWYgKHZhbHVlIDwgMC4wIHx8IHZh bHVlID4gMS4wKQorICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIHZhbCA9IChVSU5U KSgweDEwMCAqIHZhbHVlKTsKKyAgICAgICAgICAgIC8qIFdlIHVzZWQgMHgxMDAgaW5zdGVhZCBv ZiAweEZGIHRvIGdpdmUgYSBjb250aW51b3VzCisgICAgICAgICAgICAgICByYW5nZSBiZXR3ZWVu IDAuMCBhbmQgMS4wIGluY2x1c2l2ZS4gIFRoZSBuZXh0IHN0YXRlbWVudAorICAgICAgICAgICAg ICAgZml4ZXMgdGhlIDEuMCBjYXNlLiAqLworICAgICAgICAgICAgaWYgKHZhbCA9PSAweDEwMCkK KyAgICAgICAgICAgICAgdmFsID0gMHhGRjsKKyAgICAgICAgICAgIGNvbG9ydmFsIHw9ICh2YWwg PDwgcG9zKTsKKyAgICAgICAgICAgIHBvcyArPSAweDg7CisgICAgICAgICAgICBpZiAoaSA9PSAy KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaWYgKCplbmQgIT0gJ1wwJykKKyAg ICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7 CisgICAgICAgICAgICAgICAgWFNFVElOVCAocmV0LCBjb2xvcnZhbCk7CisgICAgICAgICAgICAg ICAgcmV0dXJuIHJldDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCplbmQgIT0g Jy8nKQorICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNvbG9yID0gZW5kICsgMTsK KyAgICAgICAgICB9CisgICAgICB9CisgIC8qIEkgYW0gbm90IGdvaW5nIHRvIGF0dGVtcHQgdG8g aGFuZGxlIGFueSBvZiB0aGUgQ0lFIGNvbG9yIHNjaGVtZXMKKyAgICAgb3IgVGVrSFZDLCBzaW5j ZSBJIGRvbid0IGtub3cgdGhlIGFsZ29yaXRobXMgZm9yIGNvbnZlcnNpb24gdG8gUkdCLgorICAg ICBJZiB3ZSBmYWlsIHRvIGxvb2t1cCB0aGUgY29sb3IgbmFtZSBpbiB3MzJfY29sb3JfbWFwLCB0 aGVuIGNoZWNrIHRoZQorICAgICBjb2xvcm5hbWUgdG8gc2VlIGlmIGl0IGNhbiBiZSBjcnVkZWx5 IGFwcHJveGltYXRlZDogSWYgdGhlIFggY29sb3IKKyAgICAgZW5kcyBpbiBhIG51bWJlciAoZS5n LiwgImRhcmtzZWFncmVlbjIiKSwgc3RyaXAgdGhlIG51bWJlciBhbmQKKyAgICAgcmV0dXJuIHRo ZSByZXN1bHQgb2YgbG9va2luZyB1cCB0aGUgYmFzZSBjb2xvciBuYW1lLiAqLworICByZXQgPSBt Y193MzJfY29sb3JfbWFwX2xvb2t1cCAoY29sb3JuYW1lKTsKKyAgaWYgKE5JTFAgKHJldCkpCisg ICAgeworICAgICAgaW50IGxlbiA9IHN0cmxlbiAoY29sb3JuYW1lKTsKKyAgICAgIGlmIChpc2Rp Z2l0IChjb2xvcm5hbWVbbGVuIC0gMV0pKQorICAgICAgICB7CisgICAgICAgICAgY2hhciAqcHRy LCAqYXBwcm94ID0gYWxsb2NhIChsZW4gKyAxKTsKKyAgICAgICAgICBzdHJjcHkgKGFwcHJveCwg Y29sb3JuYW1lKTsKKyAgICAgICAgICBwdHIgPSAmYXBwcm94W2xlbiAtIDFdOworICAgICAgICAg IHdoaWxlIChwdHIgPiBhcHByb3ggJiYgaXNkaWdpdCAoKnB0cikpCisgICAgICAgICAgICAqcHRy LS0gPSAnXDAnOworICAgICAgICAgIHJldCA9IG1jX3czMl9jb2xvcl9tYXBfbG9va3VwIChhcHBy b3gpOworICAgICAgICB9CisgICAgfQorICB1bmJsb2NrX2lucHV0ICgpOworICByZXR1cm4gcmV0 OworfQorCisvKiBEZWNpZGUgaWYgY29sb3IgbmFtZWQgQ09MT1IgaXMgdmFsaWQgZm9yIHRoZSBk aXNwbGF5IGFzc29jaWF0ZWQgd2l0aAorICAgdGhlIHNlbGVjdGVkIGZyYW1lOyBpZiBzbywgcmV0 dXJuIHRoZSByZ2IgdmFsdWVzIGluIENPTE9SX0RFRi4KKyAgIElmIEFMTE9DIGlzIG5vbnplcm8s IGFsbG9jYXRlIGEgbmV3IGNvbG9ybWFwIGNlbGwuICovCitpbnQKK21jX3czMl9kZWZpbmVkX2Nv bG9yIChzdHJ1Y3QgZnJhbWUgKmYsIGNvbnN0IGNoYXIgKmNvbG9yLCBtY19YQ29sb3IgKmNvbG9y X2RlZiwgYm9vbCBhbGxvY19wKQoreworICByZWdpc3RlciBMaXNwX09iamVjdCB0ZW07CisgIENP TE9SUkVGIHczMl9jb2xvcl9yZWY7CisgIHRlbSA9IG1jX3hfdG9fdzMyX2NvbG9yIChjb2xvcik7 CisgIGlmICghTklMUCAodGVtKSkKKyAgICB7CisgICAgICBpZiAoZikKKyAgICAgICAgeworICAg ICAgICAgIC8qIEFwcGx5IGdhbW1hIGNvcnJlY3Rpb24uICovCisgICAgICAgICAgdzMyX2NvbG9y X3JlZiA9IFhVRklYTlVNX1JBVyAodGVtKTsKKyAgICAgICAgICBnYW1tYV9jb3JyZWN0IChmLCAm dzMyX2NvbG9yX3JlZik7CisgICAgICAgICAgWFNFVElOVCAodGVtLCB3MzJfY29sb3JfcmVmKTsK KyAgICAgICAgfQorICAgICAgLyogTWFwIHRoaXMgY29sb3IgdG8gdGhlIHBhbGV0dGUgaWYgaXQg aXMgZW5hYmxlZC4gKi8KKyAgICAgIGlmICghTklMUCAoVnczMl9lbmFibGVfcGFsZXR0ZSkpCisg ICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgdzMyX3BhbGV0dGVfZW50cnkgKiBlbnRyeSA9IG9u ZV93MzJfZGlzcGxheV9pbmZvLmNvbG9yX2xpc3Q7CisgICAgICAgICAgc3RydWN0IHczMl9wYWxl dHRlX2VudHJ5ICoqIHByZXYgPSAmb25lX3czMl9kaXNwbGF5X2luZm8uY29sb3JfbGlzdDsKKyAg ICAgICAgICAvKiBjaGVjayBpZiBjb2xvciBpcyBhbHJlYWR5IG1hcHBlZCAqLworICAgICAgICAg IHdoaWxlIChlbnRyeSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKE1DX1czMl9D T0xPUiAoZW50cnktPmVudHJ5KSA9PSBYVUZJWE5VTV9SQVcgKHRlbSkpCisgICAgICAgICAgICAg ICAgYnJlYWs7CisgICAgICAgICAgICAgIHByZXYgPSAmZW50cnktPm5leHQ7CisgICAgICAgICAg ICAgIGVudHJ5ID0gZW50cnktPm5leHQ7CisgICAgICAgICAgICB9CisgICAgICAgICAgaWYgKGVu dHJ5ID09IE5VTEwgJiYgYWxsb2NfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgLyog bm90IGFscmVhZHkgbWFwcGVkLCBzbyBhZGQgdG8gbGlzdCAqLworICAgICAgICAgICAgICBlbnRy eSA9IHhtYWxsb2MgKHNpemVvZiAoc3RydWN0IHczMl9wYWxldHRlX2VudHJ5KSk7CisgICAgICAg ICAgICAgIE1DX1czMl9TRVRfQ09MT1IgKGVudHJ5LT5lbnRyeSwgWFVGSVhOVU1fUkFXICh0ZW0p KTsKKyAgICAgICAgICAgICAgZW50cnktPm5leHQgPSBOVUxMOworICAgICAgICAgICAgICAqcHJl diA9IGVudHJ5OworICAgICAgICAgICAgICBvbmVfdzMyX2Rpc3BsYXlfaW5mby5udW1fY29sb3Jz Kys7CisgICAgICAgICAgICAgIC8qIHNldCBmbGFnIHRoYXQgcGFsZXR0ZSBtdXN0IGJlIHJlZ2Vu ZXJhdGVkICovCisgICAgICAgICAgICAgIG9uZV93MzJfZGlzcGxheV9pbmZvLnJlZ2VuX3BhbGV0 dGUgPSBUUlVFOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAvKiBFbnN1cmUgQ09M T1JSRUYgdmFsdWUgaXMgc25hcHBlZCB0byBuZWFyZXN0IGNvbG9yIGluIChkZWZhdWx0KQorICAg ICAgICAgcGFsZXR0ZSBieSBzaW11bGF0aW5nIHRoZSBQQUxFVFRFUkdCIG1hY3JvLiAgVGhpcyB3 b3JrcyB3aGV0aGVyCisgICAgICAgICBvciBub3QgdGhlIGRpc3BsYXkgZGV2aWNlIGhhcyBhIHBh bGV0dGUuICovCisgICAgICB3MzJfY29sb3JfcmVmID0gWFVGSVhOVU1fUkFXICh0ZW0pIHwgMHgy MDAwMDAwOworICAgICAgY29sb3JfZGVmLT5waXhlbCA9IHczMl9jb2xvcl9yZWY7CisgICAgICBj b2xvcl9kZWYtPnJlZCA9IEdldFJWYWx1ZSAodzMyX2NvbG9yX3JlZikgKiAyNTY7CisgICAgICBj b2xvcl9kZWYtPmdyZWVuID0gR2V0R1ZhbHVlICh3MzJfY29sb3JfcmVmKSAqIDI1NjsKKyAgICAg IGNvbG9yX2RlZi0+Ymx1ZSA9IEdldEJWYWx1ZSAodzMyX2NvbG9yX3JlZikgKiAyNTY7CisgICAg ICByZXR1cm4gMTsKKyAgICB9CisgICAgZWxzZQorICAgICAgeworICAgICAgICByZXR1cm4gMDsK KyAgICAgIH0KK30KKwordm9pZAorbWNfeHdfY29sb3JfdmFsdWVzIChzdH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3RyZXRjaF9jdXJzb3JfcCkKKyAgICB7CisgICAgICAvKiBJZiBgeC1zdHJldGNoLWN1 cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3IGEgYmxvY2sgY3Vyc29yIGFzIHdpZGUgYXMgdGhlCisg ICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgaW50IHdpZHRoLCBiYWNrZ3JvdW5kX3dpZHRo ID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4ID0gcy0+eDsKKyAgICAgIGlmICgh cy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB7CisgICAgICAgICAgaW50IGxlZnRfeCA9IHdp bmRvd19ib3hfbGVmdF9vZmZzZXQgKHMtPncsIFRFWFRfQVJFQSk7CisgICAgICAgICAgaWYgKHgg PCBsZWZ0X3gpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGJhY2tncm91bmRfd2lkdGgg LT0gbGVmdF94IC0geDsKKyAgICAgICAgICAgICAgeCA9IGxlZnRfeDsKKyAgICAgICAgICAgIH0K KyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICB7CisgICAgICAgICAgIC8qIEluIFIy TCByb3dzLCBkcmF3IHRoZSBjdXJzb3Igb24gdGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlCisgICAgICAg ICAgICAgIHN0cmV0Y2ggZ2x5cGguICovCisgICAgICAgICAgIGludCByaWdodF94ID0gd2luZG93 X2JveF9yaWdodCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgaWYgKHggKyBiYWNrZ3Jv dW5kX3dpZHRoID4gcmlnaHRfeCkKKyAgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09IHgg LSByaWdodF94OworICAgICAgICAgICB4ICs9IGJhY2tncm91bmRfd2lkdGg7CisgICAgICAgICB9 CisgICAgICB3aWR0aCA9IG1pbiAoRlJBTUVfQ09MVU1OX1dJRFRIIChzLT5mKSwgYmFja2dyb3Vu ZF93aWR0aCk7CisgICAgICBpZiAocy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB4IC09IHdp ZHRoOworICAgICAgLyogRHJhdyBjdXJzb3IuICovCisgICAgICB3MzJfZHJhd19nbHlwaF9zdHJp bmdfYmdfcmVjdCAocywgeCwgcy0+eSwgd2lkdGgsIHMtPmhlaWdodCk7CisgICAgICAvKiBDbGVh ciByZXN0IHVzaW5nIHRoZSBHQyBvZiB0aGUgb3JpZ2luYWwgbm9uLWN1cnNvciBmYWNlLiAqLwor ICAgICAgaWYgKHdpZHRoIDwgYmFja2dyb3VuZF93aWR0aCkKKyAgICAgICAgeworICAgICAgICAg IEVtYWNzX0dDICpnYyA9IHMtPmZhY2UtPmdjOworICAgICAgICAgIGludCB5ID0gcy0+eTsKKyAg ICAgICAgICBpbnQgdyA9IGJhY2tncm91bmRfd2lkdGggLSB3aWR0aCwgaCA9IHMtPmhlaWdodDsK KyAgICAgICAgICBSRUNUIHI7CisgICAgICAgICAgSERDIGhkYyA9IHMtPmhkYzsKKyAgICAgICAg ICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgICAgIHggKz0gd2lkdGg7CisgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHggPSBzLT54OworICAgICAgICAgIGlmIChzLT5y b3ctPm1vdXNlX2ZhY2VfcAorICAgICAgICAgICAgICAmJiBjdXJzb3JfaW5fbW91c2VfZmFjZV9w IChzLT53KSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgdzMyX3NldF9tb3VzZV9mYWNl X2djIChzKTsKKyAgICAgICAgICAgICAgZ2MgPSBzLT5nYzsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgZ2MgPSBzLT5mYWNlLT5nYzsKKyAgICAgICAgICBn ZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgJnIpOworICAgICAgICAgIHczMl9zZXRfY2xp cF9yZWN0YW5nbGUgKGhkYywgJnIpOworI2lmIDAgLyogVE9ETzogc3RpcHBsZSAqLworICAgICAg ICAgIGlmIChzLT5mYWNlLT5zdGlwcGxlKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAv KiBGaWxsIGJhY2tncm91bmQgd2l0aCBhIHN0aXBwbGUgcGF0dGVybi4gKi8KKyAgICAgICAgICAg ICAgWFNldEZpbGxTdHlsZSAocy0+ZGlzcGxheSwgZ2MsIEZpbGxPcGFxdWVTdGlwcGxlZCk7Cisg ICAgICAgICAgICAgIFhGaWxsUmVjdGFuZ2xlIChzLT5kaXNwbGF5LCBzLT53aW5kb3csIGdjLCB4 LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAgWFNldEZpbGxTdHlsZSAocy0+ZGlzcGxheSwgZ2Ms IEZpbGxTb2xpZCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisjZW5kaWYKKyAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMtPmYsIHMtPmhk YywgZ2MtPmJhY2tncm91bmQsIHgsIHksIHcsIGgpOworICAgICAgICAgICAgICB9CisgICAgICAg IH0KKyAgICB9CisgICAgZWxzZSBpZiAoIXMtPmJhY2tncm91bmRfZmlsbGVkX3ApCisgICAgICB7 CisgICAgICAgIGludCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAg ICAgICAgaW50IHggPSBzLT54LCBsZWZ0X3ggPSB3aW5kb3dfYm94X2xlZnRfb2Zmc2V0IChzLT53 LCBURVhUX0FSRUEpOworICAgICAgICAvKiBEb24ndCBkcmF3IGludG8gbGVmdCBtYXJnaW4sIGZy aW5nZSBvciBzY3JvbGxiYXIgYXJlYQorICAgICAgICAgICBleGNlcHQgZm9yIGhlYWRlciBsaW5l IGFuZCBtb2RlIGxpbmUuICovCisgICAgICAgIGlmICh4IDwgbGVmdF94ICYmICFzLT5yb3ctPm1v ZGVfbGluZV9wK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E9IDA7 CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMtPmhsID09IERSQVdfSU1BR0VfUkFJ U0VECisgICAgICAgICAgICAgICAgICAgfHwgcy0+aGwgPT0gRFJBV19JTUFHRV9TVU5LRU4pCisg ICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPmdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICAg ICAgICAgIHMtPnN0aXBwbGVkX3AgPSBzLT5mYWNlLT5zdGlwcGxlICE9IDA7CisgICAgICAgICAg ICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGVtYWNzX2Fib3J0ICgpOworICAv KiBHQyBtdXN0IGhhdmUgYmVlbiBzZXQuICovCisgIGVhc3NlcnQgKHMtPmdjICE9IDApOworfQor CisvKiBEcmF3IGEgaG9sbG93IGJveCBjdXJzb3Igb24gd2luZG93IFcgaW4gZ2x5cGggcm93IFJP Vy4gKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJhd19ob2xsb3dfY3Vyc29yIChzdHJ1Y3Qgd2lu ZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB4LCBpbnQgZngsIGludCB5LCBpbnQg ZnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaHBvcywgaW50IHZwb3MsIGludCB3 ZCwgaW50IGgpCit7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAoV0lORE9XX0ZSQU1FICh3 KSk7CisgIEhEQyBoZGM7CisgIFJFQ1QgcmVjdDsKKyAgSEJSVVNIIGhiID0gQ3JlYXRlU29saWRC cnVzaCAoZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwpOworICAvKiBHZXQgdGhlIGds eXBoIHRoZSBjdXJzb3IgaXMgb24uICBJZiB3ZSBjYW4ndCB0ZWxsI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2x5cGgncyBjb2xvcnMgYXJlIGNob3NlbiBzbworICAgICAgICB0aGF0IHRoZSBn bHlwaCBpcyBsZWdpYmxlLiAqLworICAgICAgICBpZiAoZmFjZS0+YmFja2dyb3VuZCA9PSBjdXJz b3JfY29sb3IKKyAgICAgICAgICAgICYmICFjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCkKKyAg ICAgICAgICBjdXJzb3JfY29sb3IgPSBmYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICBpbnQgZGVm YXVsdF9meCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIHgpOworICAgICAgICBo ZGMgPSBnZXRfZnJhbWVfZGMgKGYpOworICAgICAgICB3MzJfY2xpcF90b19yb3cgKHcsIHJvdywg VEVYVF9BUkVBLCBoZGMpOworICAgICAgICBpbnQgcnggPSBmeDsKKyAgICAgICAgaW50IHJ5ID0g Znk7CisgICAgICAgIGludCBydyA9IHdkOworICAgICAgICBpbnQgcmggPSBoOworICAgICAgICAv LyAgZnByaW50ZiAoc3RkZXJyLCAiTUNfSEJBUjogIGZ4ICglZCkgfCBmeSAoJWQpIHwgd2QgKCVk KSB8IGggKCVkKVxuIiwKKyAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgcngsIHJ5LCBydywg cmgpOworICAgICAgICB3MzJfZmlsbF9hcmVhIChmLCBoZGMsIGN1cnNvcl9jb2xvciwgcngsIHJ5 LCBydywgcmgpOworICAgICAgICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChoZGMsIE5VTEwpOwor ICAgICAgICByZWxlYXNlX2ZyYW1lX2RjIChmLCBoZGMpOworICAgICAgfQorfQorCisvKiBSSUY6 IERyYXcgb3IgY2xlYXIgY3Vyc29yIG9uIHdpbmRvdyBXLiAqLworc3RhdGljIHZvaWQKK21jX3cz Ml9kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRy aXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgaW50 IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGlu dCBoLAorICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2wsIGVudW0gbWNfY3Vyc29y X3R5cGUgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICBpbnQgY3Vyc29yX3dpZHRoLCBl bnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsIGJvb2wgb25fcCwgYm9vbCBhY3RpdmVfcCkKK3sK KyAgaWYgKG9uX3ApCisgICAgeworICAgICAgLyogSWYgdGhpcyBpcyB0aGUgYWN0aXZlIGN1cnNv ciwgd2UgbmVlZCB0byB0cmFjayBpdCB3aXRoIHRoZQorICAgICAgc3lzdGVtIGNhcmV0LCBzbyB0 aGlyZCBwYXJ0eSBzb2Z0d2FyZSBsaWtlIHNjcmVlbiBtYWduaWZpZXJzCisgICAgICBhbmQgc3Bl ZWNoIHN5bnRoZXNpemVycyBjYW4gZm9sbG93IHRoZSBjdXJzb3IuICovCisgICAgICBpZiAoYWN0 aXZlX3ApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJ TkRPV19GUkFNRSAodykpOworICAgICAgICAgIEhXTkQgaHduZCA9IEZSQU1FX1czMl9XSU5ET1cg KGYpOworICAgICAgICAgIHczMl9zeXN0ZW1fY2FyZXRfeAorICAgICAgICAgICAgPSBXSU5ET1df VEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB4KTsKKyAgICAgICAgICAvKiBGSVhNRTogIFdoYXQg c2hvdWxkIHdlIHVzZSBpbnN0ZWFkIG9mIGB3LT5waHlzX2N1cnNvcl9hc2NlbnQnPyAqLworICAg ICAgICAgIHczMl9zeXN0ZW1fY2FyZXRfeQorICAgICAgICAgICAgPSAoV0lORE9XX1RPX0ZSQU1F X1BJWEVMX1kgKHcsIHkpCisgICAgICAgICAgICAgICArIHJvdy0+YXNjZW50IC0gdy0+cGh5c19j dXJzb3JfYXNjZW50KTsKKyAgICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X3dpbmRvdyA9IHc7Cisg ICAgICAgICAgdzMyX3N5c3RlbV9jYXJldF9oZHJfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5F X0hFSUdIVCAodyk7CisgICAgICAgICAgdzMyX3N5c3RlbV9jYXJldF9tb2RlX2hlaWdodCA9IFdJ TkRPV19NT0RFX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgICAgICBQb3N0TWVzc2FnZSAoaHduZCwg V01fSU1FX1NUQVJUQ09NUE9TSVRJT04sIDAsIDApOworICAgICAgICAgIC8qIElmIHRoZSBzaXpl IG9mIHRoZSBhY3RpdmUgY3Vyc29yIGNoYW5nZWQsIGRlc3Ryb3kgdGhlIG9sZAorICAgICAgICAg ICAgIHN5c3RlbSBjYXJldC4gKi8KKyAgICAgICAgICBpZiAodzMyX3N5c3RlbV9jYXJldF9od25k CisgICAgICAgICAgICAgICYmICh3MzJfc3lzdGVtX2NhcmV0X2hlaWdodCAhPSBoKSkKKyAgICAg ICAgICAgIFBvc3RNZXNzYWdlIChod25kLCBXTV9FTUFDU19ERVNUUk9ZX0NBUkVULCAwLCAwKTsK KyAgICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X2hlaWdodCA9IGg7CisgICAgICAgICAgLyogTW92 ZSB0aGUgc3lzdGVtIGNhcmV0LiAqLworICAgICAgICAgIFBvc3RNZXNzYWdlIChod25kLCBXTV9F TUFDU19UUkFDS19DQVJFVCwgMCwgMCk7CisgICAgICAgIH0KKyAgICAgIC8qIFRoZSBmcmluZ2Ug Yml0bWFwcyBhcmUgcHJlc2VudGx5IGhhbmRsZWQgZWxzZXdoZXJlLCBidXQgY291bGQgc29tZWRh eQorICAgICAgYmUgbWFuYWdlZCAoaW4gcG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ksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVf ZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAg ICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3Jl Z3JvdW5kOworICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3df YWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lk ID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1w cmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhv bGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lk KTsKKyAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0 aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNr Z3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kOworICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvb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RwdXRfZGF0YS53MzItPmN1cnNvcl9nYyA9IG9yaWdp bmFsX2N1cnNvcl9nYzsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgIC8q IFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAq LworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4 ZWw7CisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3cs IHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9k YXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9 CisgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9nbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCAmJiBs c2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAg ICB7CisgICAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgICBtY193MzJfZHJhd19ob2xsb3df Y3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7 CisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFs X2N1cnNvcl9waXhlbDsKKyAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAg eworICAgICAgICAgIC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WN0aXZlX2ZhY2UtPmZvcmVncm91 bmQ7CisgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19hY3Rp dmVfcmVnaW9uX2JlZ19mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlw aC0+Y2hhcnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2VfaWQg PSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWF0 LXJlZ2lvbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0 IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBo b2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgIGVu dW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywg ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAg ICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICBn Y192YWx1ZXMuZm9yZWdyb3VuZCA9IG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g ZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZl X2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0g aG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAgIGdj X3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlLT5m b3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVs c2UgaWYgKGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3Rp dmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAg ICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9m YWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tn cm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFhY3RpdmVfcCkKKyAgICAg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNl X2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9m YWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAg ICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9sbG93X2luYWN0aXZl X2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5i YWNrZ3JvdW5kID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X2djID0gWENyZWF0ZUdDIChOVUxMLCBGUkFNRV9XMzJfV0lORE9XIChmKSwgbWFzaywgJmdjX3Zh bHVlcyk7CisgICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAvKiBG b3JjZSBgbWNfdzMyX3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEudzMy LT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsK KyAgICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHcsIG1hdHJpeCwgcm93LCBEUkFX X0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJzb3Jf Z2NfcCk7CisgICAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gb3Jp Z2luYWxfY3Vyc29yX2djOworICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAg ICAgICAgICBtY193MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngs IHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAgICB9CisgICAgICBicmVhazsK KyAgICB9CisgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVk ID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAg ICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3Jf cGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0g Y29sb3JfcGl4ZWw7CisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0 cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYt Pm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOwor ICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBtY193MzJfZHJhd19ob2xsb3dfY3Vy c29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7Cisg ICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19GSUxMRURfQk9YOgorICAgIHsKKyAgICAg IGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAg ICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEu dzMyLT5jdXJzb3JfZ2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICBmdW5jdGlvbmFsaXR5 IG9mIGB4X21ha2VfZ2MnIGluIHczMmZucy5jLiAqLworICAgICAgICAgIGJsb2NrX2lucHV0ICgp OworICAgICAgICAgIEVtYWNzX0dDIGdjX3ZhbHVlczsKKyAgICAgICAgICB1bnNpZ25lZCBsb25n IG1hc2sgPSBHQ0ZvcmVncm91bmQgfCBHQ0JhY2tncm91bmQ7CisgICAgICAgICAgZ2NfdmFsdWVz LmZvcmVncm91bmQgPSBGUkFNRV9CQUNLR1JPVU5EX1BJWEVMIChmKTsKKyAgICAgICAgICBnY192 YWx1ZXMuYmFja2dyb3VuZCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgIGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBGUkFNRV9XMzJfV0lORE9XIChmKSwg bWFzaywgJmdjX3ZhbHVlcyk7CisgICAgICAgICAgLyogRm9yY2UgYG1jX3czMl9zZXRfY3Vyc29y X2djJyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djJy4gKi8KKyAgICAg ICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICBtY19kcmF3X2N1cnNvcl9n bHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUs IHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAgICAgICAgIHVuYmxvY2tfaW5w dXQgKCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAg IGJvb2wgY3Vyc29yX2djX3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1jX2RyYXdfY3Vyc29yX2ds eXBoICh3LCBtYXRyaXgsIHJvdywgRFJBV19DVVJTT1IsIHgsIGhwb3MsIHZwb3MsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNvcl90eXBl LCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29y X2djX3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBjYXNlIE1DX0JB UjoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxz bC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sg YGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRw dXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3BpeGVsOworICAgICAgICAgIGJvb2wg Y3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOworICAgICAgICAgIG1jX3czMl9kcmF3 X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdk LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93aWR0aCwgTUNf QkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0K KyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2lu dmlzaWJsZV9va2F5X3AgPSBmYWxzZTsKKyAgICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJz b3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19CQVIsIGN1 cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAg ICB9CisgICAgY2FzZSBNQ19IQkFSOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYg bHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8q IFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAq LworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4 ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IHRydWU7Cisg ICAgICAgICAgbWNfdzMyX2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aCwgY3Vyc29yX3dpZHRoLCBNQ19IQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7Cisg ICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5h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HlwaC0+ dHlwZSA9PSBTVFJFVENIX0dMWVBIKQorICAgICAgICAgICAgICBtY193MzJfZHJhd19zdHJldGNo X2dseXBoX3N0cmluZyAobmV4dCk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICB3MzJfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAobmV4dCwgdHJ1ZSk7CisgICAgICAg ICAgICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgIH0KKyAgICB9CisgIC8qIFNldCB1 cCBTLT5nYywgc2V0IGNsaXBwaW5nIGFuZCBkcmF3IFMuICovCisgIG1jX3czMl9zZXRfZ2x5cGhf c3RyaW5nX2djIChzLCBjdXJzb3JfZ2NfcCk7CisgIC8qIERyYXcgcmVsaWVmIChpZiBhbnkpIGlu IGFkdmFuY2UgZm9yIGNoYXIvY29tcG9zaXRpb24gc28gdGhhdCB0aGUKKyAgICAgZ2x5cGggc3Ry aW5nIGNhbiBiZSBkcmF3biBvdmVyIGl0LiAqLworICBpZiAoIXMtPmZvcl9vdmVybGFwcworICAg ICAgJiYgcy0+ZmFjZS0+Ym94ICE9IEZBQ0VfTk9fQk9YCisgICAgICAmJiAocy0+Zmlyc3RfZ2x5 cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgIHx8IHMtPmZpcnN0X2dseXBoLT50eXBl ID09IENPTVBPU0lURV9HTFlQSCkpCisgICAgeworICAgICAgdzMyX3NldF9nbHlwaF9zdHJpbmdf Y2xpcHBpbmcgKHMpOworICAgICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMs IHRydWUpOworICAgICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2JveCAocyk7CisgICAgICB3MzJf c2V0X2dseXBoX3N0cmluZ19jbGlwcGluZyAocyk7CisgICAgICByZWxpZWZfZHJhd25fcCA9IDE7 CisgICAgfQorICBlbHNlIGlmICghcy0+Y2xpcF9oZWFkIC8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yYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQgKHMsIGZhbHNlKTsKKyAgICAgIHczMl9kcmF3 X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgQ09N UE9TSVRFX0dMWVBIOgorICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcyB8fCAocy0+Y21wX2Zyb20g PiAwCisgICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkKKyAg ICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAgICBlbHNlCisgICAgICAg IHczMl9kcmF3X2dseXBoX3N0cmluZ19iYWNrZ3JvdW5kIChzLCB0cnVlKTsKKyAgICAgIHczMl9k cmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocyk7CisgICAgICBicmVhazsK KyAgICBjYXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAgIGlmIChzLT5mb3Jfb3ZlcmxhcHMpCisg ICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgZWxzZQorICAgICAg ICB3MzJfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAocywgZmFsc2UpOworICAgICAgdzMy X2RyYXdfZ2x5cGhsZXNzX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChzKTsKKyAgICAgIGJyZWFr OworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9CisgIGlmICghcy0+ Zm9yX292ZXJsYXBzKQorICAgIHsKKyAgICAgIC8qIERyYXcgdW5kZXJsaW5lLiAqLworICAgICAg aWYgKHMtPmZhY2UtPnVuZGVybGluZV9wKQorICAgICAgICB7CisgICAgICAgICAgaWYgKHMtPmZh Y2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgQ09MT1JSRUYgY29sb3I7CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51 bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICAgICAgY29sb3IgPSBzLT5nYy0+Zm9y ZWdyb3VuZDsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjb2xvciA9 IHMtPmZhY2UtPnVuZGVybGluZV9jb2xvcjsKKyAgICAgICAgICAgICAgdzMyX2RyYXdfdW5kZXJ3 YXZlIChzLCBjb2xvcik7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZSBpZiAocy0+ZmFj ZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICB1bnNpZ25lZCBsb25nIHRoaWNrbmVzcywgcG9zaXRpb247CisgICAgICAgICAg ICAgIGludCB5OworICAgICAgICAgICAgICBpZiAocy0+cHJldiAmJiBzLT5wcmV2LT5mYWNlLT51 bmRlcmxpbmVfcAorICAgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5l X3R5cGUgPT0gRkFDRV9VTkRFUl9MSU5FKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgIC8qIFdlIHVzZSB0aGUgc2FtZSB1bmRlcmxpbmUgc3R5bGUgYXMgdGhlIHByZXZpb3Vz IG9uZS4gKi8KKyAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPnByZXYtPnVuZGVybGlu ZV90aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPnByZXYtPnVuZGVy bGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVybGluZSB0 aGlja25lc3MuICBEZWZhdWx0IGlzIDEgcGl4ZWwuICovCisgICAgICAgICAgICAgICAgICBpZiAo cy0+Zm9udCAmJiBzLT5mb250LT51bmRlcmxpbmVfdGhpY2tuZXNzID4gMCkKKyAgICAgICAgICAg ICAgICAgICAgdGhpY2tuZXNzID0gcy0+Zm9udC0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAgICAg ICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7 CisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVzY2VudF9saW5lKQorICAg ICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSB0aGlja25lc3MpIC0gKHMt PnliYXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAvKiBHZXQgdGhlIHVuZGVybGluZSBw b3NpdGlvbi4gIFRoaXMgaXMgdGhlIHJlY29tbWVuZGVkCisgICAgICAgICAgICAgICAgICAgICAg ICAgICB2ZXJ0aWNhbCBvZmZzZXQgaW4gcGl4ZWxzIGZyb20gdGhlIGJhc2VsaW5lIHRvIHRoZSB0 b3Agb2YKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSB1bmRlcmxpbmUuICBUaGlzIGlz IGEgc2lnbmVkIHZhbHVlIGFjY29yZGluZyB0byB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIHNwZWNzLCBhbmQgaXRzIGRlZmF1bHQgaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IFJPVU5EICgobWF4aW11bV9kZXNjZW50KSAvIDIpLCB3aXRoCisgICAgICAgICAgICAgICAgICAg ICAgICAgICBST1VORCAoeCkgPSBmbG9vciAoeCArIDAuNSkgICovCisgICAgICAgICAgICAgICAg ICAgICAgICBpZiAoeF91c2VfdW5kZXJsaW5lX3Bvc2l0aW9uX3Byb3BlcnRpZXMKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV9wb3Np dGlvbiA+PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IHMtPmZvbnQt PnVuZGVybGluZV9wb3NpdGlvbjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHMt PmZvbnQpCisgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmZvbnQtPmRl c2NlbnQgKyAxKSAvIDI7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVfbWluaW11bV9vZmZzZXQpOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgLyogQ2hlY2sgdGhlIHNhbml0eSBvZiB0 aGlja25lc3MgYW5kIHBvc2l0aW9uLiAgV2Ugc2hvdWxkCisgICAgICAgICAgICAgICAgIGF2b2lk IGRyYXdpbmcgdW5kZXJsaW5lIG91dCBvZiB0aGUgY3VycmVudCBsaW5lIGFyZWEuICovCisgICAg ICAgICAgICAgIGlmIChzLT55ICsgcy0+aGVpZ2h0IDw9IHMtPnliYXNlICsgcG9zaXRpb24pCisg ICAgICAgICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gMSkgLSAocy0+eWJhc2UgLSBz LT55KTsKKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPCBzLT55YmFzZSArIHBv c2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IChzLT55ICsg cy0+aGVpZ2h0KSAtIChzLT55YmFzZSArIHBvc2l0aW9uKTsKKyAgICAgICAgICAgICAgcy0+dW5k ZXJsaW5lX3RoaWNrbmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgICAgcy0+dW5kZXJsaW5l X3Bvc2l0aW9uID1wb3NpdGlvbjsKKyAgICAgICAgICAgICAgeSA9IHMtPnliYXNlICsgcG9zaXRp b247CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisg ICAgICAgICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9yZWdy b3VuZCwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5LCBzLT53aWR0aCwg MSk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgdzMyX2ZpbGxfYXJl YSAocy0+Ziwgcy0+aGRjLCBzLT5mYWNlLT51bmRlcmxpbmVfY29sb3IsIHMtPngsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB5LCBzLT53aWR0aCwgMSk7CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgb3ZlcmxpbmUuICovCisgICAgICBpZiAocy0+ZmFj ZS0+b3ZlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZHkgPSAw LCBoID0gMTsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+b3ZlcmxpbmVfY29sb3JfZGVmYXVsdGVk X3ApCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmdjLT5mb3Jl Z3JvdW5kLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+eSArIGR5LCBzLT53 aWR0aCwgaCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHczMl9maWxsX2FyZWEg KHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPngsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgpOworICAgICAgICB9Cisg ICAgICAvKiBEcmF3IHN0cmlrZS10aHJvdWdoLiAqLworICAgICAgaWYgKHMtPmZhY2UtPnN0cmlr ZV90aHJvdWdoX3AKKyAgICAgICAgICAmJiAhRk9OVF9URVhUTUVUUklDIChzLT5mb250KS50bVN0 cnVja091dCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgaCA9IDE7CisgICAg ICAgICAgdW5zaWduZWQgbG9uZyBkeSA9IChzLT5oZWlnaHQgLSBoKSAvIDI7CisgICAgICAgICAg aWYgKHMtPmZhY2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICAg ICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5nYy0+Zm9yZWdyb3VuZCwgcy0+eCwg cy0+eSArIGR5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+d2lkdGgsIGgpOworICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMs IHMtPmZhY2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yLCBzLT54LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgfQorICAgICAgLyog RHJhdyByZWxpZWYgaWYgbm90IHlldCBkcmF3bi4gKi8KKyAgICAgIGlmICghcmVsaWVmX2RyYXdu X3AgJiYgcy0+ZmFjZS0+Ym94ICE9IEZBQ0VfTk9fQk9YKQorICAgICAgICB3MzJfZHJhd19nbHlw aF9zdHJpbmdfYm94IChzKTsKKyAgICAgIGlmIChzLT5wcmV2KQorICAgICAgICB7CisgICAgICAg ICAgc3RydWN0IGdseXBoX3N0cmluZyAqcHJldjsKKyAgICAgICAgICBmb3IgKHByZXYgPSBzLT5w cmV2OyBwcmV2OyBwcmV2ID0gcHJldi0+cHJldikKKyAgICAgICAgICAgIGlmIChwcmV2LT5obCAh PSBzLT5obAorICAgICAgICAgICAgICAgICYmIHByZXYtPnggKyBwcmV2LT53aWR0aCArIHByZXYt PnJpZ2h0X292ZXJoYW5nID4gcy0+eCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg IC8qIEFzIHByZXYgd2FzIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLCB3ZQor ICAgICAgICAgICAgICAgICAgIG11c3QgZHJhdyB0aGUgcmlnaHRfb3ZlcmhhbmcgcGFydCB1c2lu ZyBzLT5obCBub3cuICovCisgICAgICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIHNh dmUgPSBwcmV2LT5obDsKKyAgICAgICAgICAgICAgICBwcmV2LT5obCA9IHMtPmhsOworICAgICAg ICAgICAgICAgIG1jX3czMl9zZXRfZ2x5cGhfc3RyaW5nX2djIChwcmV2LCBjdXJzb3JfZ2NfcCk7 CisgICAgICAgICAgICAgICAgdzMyX3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmdfZXhhY3RseSAo cywgcHJldik7CisgICAgICAgICAgICAgICAgaWYgKHByZXYtPmZpcnN0X2dseXBoLT50eXBlID09 IENIQVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB3MzJfZHJhd19nbHlwaF9zdHJpbmdfZm9y ZWdyb3VuZCAocHJldik7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAg ICAgIHczMl9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocHJldik7Cisg ICAgICAgICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3RhbmdsZSAocHJldi0+aGRjLCBOVUxMKTsK KyAgICAgICAgICAgICAgICBwcmV2LT5obCA9IHNhdmU7CisgICAgICAgICAgICAgICAgcHJldi0+ bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocy0+ bmV4dCkKKyAgICAgICAgeworICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKm5leHQ7Cisg ICAgICAgICAgZm9yIChuZXh0ID0gcy0+bmV4dDsgbmV4dDsgbmV4dCA9IG5leHQtPm5leHQpCisg ICAgICAgICAgICBpZiAobmV4dC0+aGwgIT0gcy0+aGwKKyAgICAgICAgICAgICAgICAmJiBuZXh0 LT54IC0gbmV4dC0+bGVmdF9vdmVyaGFuZyA8IHMtPnggKyBzLT53aWR0aCkKKyAgICAgICAgICAg ICAgeworICAgICAgICAgICAgICAgIC8qIEFzIG5leHQgd2lsbCBiZSBkcmF3biB3aGlsZSBjbGlw cGVkIHRvIGl0cyBvd24gYXJlYSwKKyAgICAgICAgICAgICAgICAgICB3ZSBtdXN0IGRyYXcgdGhl IGxlZnRfb3ZlcmhhbmcgcGFydCB1c2luZyBzLT5obCBub3cuICovCisgICAgICAgICAgICAgICAg ZW51bSBkcmF3X2dseXBoc19mYWNlIHNhdmUgPSBuZXh0LT5obDsKKyAgICAgICAgICAgICAgICBu ZXh0LT5obCA9IHMtPmhsOworICAgICAgICAgICAgICAgIG1jX3czMl9zZXRfZ2x5cGhfc3RyaW5n X2djIChuZXh0LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgICAgdzMyX3NldF9nbHlwaF9z dHJpbmdfY2xpcHBpbmdfZXhhY3RseSAocywgbmV4dCk7CisgICAgICAgICAgICAgICAgaWYgKG5l eHQtPmZpcnN0X2dseXBoLT50eXBlID09IENIQVJfR0xZUEgpCisgICAgICAgICAgICAgICAgICB3 MzJfZHJhd19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAobmV4dCk7CisgICAgICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHczMl9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJp bmdfZm9yZWdyb3VuZCAobmV4dCk7CisgICAgICAgICAgICAgICAgdzMyX3NldF9jbGlwX3JlY3Rh bmdsZSAobmV4dC0+aGRjLCBOVUxMKTsKKyAgICAgICAgICAgICAgICBuZXh0LT5obCA9IHNhdmU7 CisgICAgICAgICAgICAgICAgbmV4dC0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICAgICAgICBu ZXh0LT5jbGlwX2hlYWQgPSBzLT5uZXh0OworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAg ICB9CisgIC8qIFJlc2V0IGNsaXBwaW5nLiAqLworICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChz LT5oZGMsIE5VTEwpOworICBzLT5udW1fY2xpcHMgPSAwOworfQorCisvKiBlbmQgTVVMVElQTEUt Q1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogLyogRnJpbmdlIGJpdG1h cHMuICAqLwogCiBzdGF0aWMgaW50IG1heF9mcmluZ2VfYm1wID0gMDsKQEAgLTU0Miw2ICsxNzA0 LDE1IEBAIHczMl91cGRhdGVfYmVnaW4gKHN0cnVjdCBmcmFtZSAqZikKICAgaWYgKCEgRlJBTUVf VzMyX1AgKGYpKQogICAgIHJldHVybjsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IGY7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgLyogUmVnZW5lcmF0ZSBkaXNwbGF5IHBhbGV0 dGUgYmVmb3JlIGRyYXdpbmcgaWYgbGlzdCBvZiByZXF1ZXN0ZWQKICAgICAgY29sb3JzIGhhcyBj aGFuZ2VkLiAqLwogICBpZiAoZGlzcGxheV9pbmZvLT5yZWdlbl9wYWxldHRlKQpAQCAtNjc0LDYg KzE4NDUsMTYgQEAgdzMyX3VwZGF0ZV9lbmQgKHN0cnVjdCBmcmFtZSAqZikKIAogICAvKiBNb3Vz ZSBoaWdobGlnaHQgbWF5IGJlIGRpc3BsYXllZCBhZ2Fpbi4gICovCiAgIE1PVVNFX0hMX0lORk8g KGYpLT5tb3VzZV9mYWNlX2RlZmVyID0gZmFsc2U7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBO VUxMOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIApAQCAtNDAwMiwxMyAr NTE4Myw3NCBAQCB3MzJfc2V0X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHN0cnVjdCB3aW5kb3cgKncs CiAJICAgICAgcmVsZWFzZV9mcmFtZV9kYyAoZiwgaGRjKTsKIAkgICAgICB3MzJfY2xlYXJfdW5k ZXJfaW50ZXJuYWxfYm9yZGVyIChmKTsKIAkgICAgfQorCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogYmVnaW4gTVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBSRVBBSU5USU5HIFdIRU4g UkVNT1ZJTkcgU0NST0xMIEJBUjoKKworLSBTZXF1ZW5jZSBvZiBFdmVudHM6CisKKyAgLiBgcmVk aXNwbGF5X2ludGVybmFsJyBjYWxscyB0aGUgYGNvbmRlbW5fc2Nyb2xsX2JhcnNfaG9vaycsIHdo aWNoIG1hcmtzIGF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3 ZSB3YW50IHRvIHN1cHByZXNzIHJlcGFpbnRpbmcgdGhlIG9sZCBzY3JvbGwuICBXaGVuIGEgdXNl cgorc2hyaW5rcyB0aGUgd2lkdGggb2YgYSB3aW5kb3csIHdlIHdhbnQgdG8gcmVwYWludCBzbyB0 aGF0IHRoZSBuZXcgc2Nyb2xsIGJhcgord2luZG93IGlzIHVwZGF0ZWQuICovCisKICAgICAgICAg ICAvKiBNYWtlIHN1cmUgc2Nyb2xsIGJhciBpcyAidmlzaWJsZSIgYmVmb3JlIG1vdmluZywgdG8g ZW5zdXJlIHRoZQogICAgICAgICAgICAgIGFyZWEgb2YgdGhlIHBhcmVudCB3aW5kb3cgbm93IGV4 cG9zZWQgd2lsbCBiZSByZWZyZXNoZWQuICAqLwotICAgICAgICAgIG15X3Nob3dfd2luZG93IChm LCBod25kLCBTV19ISURFKTsKLS8qKiAgICAgICAgICAgTW92ZVdpbmRvdyAoaHduZCwgbGVmdCwg dG9wLCB3aWR0aCwgbWF4IChoZWlnaHQsIDEpLCBUUlVFKTsgKiovCi0JICAvKiBUcnkgdG8gbm90 IGRyYXcgb3ZlciBjaGlsZCBmcmFtZXMuICAqLwotCSAgU2V0V2luZG93UG9zIChod25kLCBIV05E X0JPVFRPTSwgbGVmdCwgdG9wLCB3aWR0aCwgbWF4IChoZWlnaHQsIDEpLAotICAgICAgICAgICAg ICAgICAgICAgICAgU1dQX0ZSQU1FQ0hBTkdFRCk7CisgICAgICAgICAgaWYgKGxlZnQgPD0gYmFy LT5sZWZ0KQorICAgICAgICAgICAgbXlfc2hvd193aW5kb3cgKGYsIGh3bmQsIFNXX0hJREUpOwor ICAgICAgICAgIE1vdmVXaW5kb3cgKGh3bmQsIGxlZnQsIHRvcCwgd2lkdGgsIG1heCAoaGVpZ2h0 LCAxKSwgbGVmdCA8PSBiYXItPmxlZnQpOworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKIAogCSAgc2kuY2JTaXplID0gc2l6ZW9mIChzaSk7 CiAJICBzaS5mTWFzayA9IFNJRl9SQU5HRTsKQEAgLTQyNzcsNiArNTUxOSwyMSBAQCB3MzJfanVk Z2Vfc2Nyb2xsX2JhcnMgKHN0cnVjdCBmcmFtZSAqZikKICAgICB7CiAgICAgICBzdHJ1Y3Qgc2Ny b2xsX2JhciAqYiA9IFhTQ1JPTExfQkFSIChiYXIpOwogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICAvKiBgRGVzdHJveVdpbmRvdycg d2l0aGluIGB4X3Njcm9sbF9iYXJfcmVtb3ZlJyByZXBhaW50cyB0aGUgcmVjdGFuZ2xlLgorICAg ICAgVGhlcmVmb3JlLCB3ZSBmaXJzdCBzZW5kIGEgbWVzc2FnZSB0byBpbmhpYml0IHJlcGFpbnRp bmcuICovCisgICAgICBpZiAoIVdJTkRPV19MSVZFX1AgKGItPndpbmRvdykpCisgICAgICAgIHsK KyAgICAgICAgICBIV05EIGh3bmQgPSBTQ1JPTExfQkFSX1czMl9XSU5ET1cgKGIpOworICAgICAg ICAgIFNlbmRNZXNzYWdlIChod25kLCBXTV9TRVRSRURSQVcsIGZhbHNlLCAwKTsKKyAgICAgICAg fQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICB3MzJfc2Nyb2xsX2Jhcl9y ZW1vdmUgKGIpOwogCiAgICAgICBuZXh0ID0gYi0+bmV4dDsKQEAgLTcwODgsNiArODM0NSwyMCBA QCBleHRlcm4gZnJhbWVfcGFybV9oYW5kbGVyIHczMl9mcmFtZV9wYXJtX2hhbmRsZXJzW107CiAK IHN0YXRpYyBzdHJ1Y3QgcmVkaXNwbGF5X2ludGVyZmFjZSB3MzJfcmVkaXNwbGF5X2ludGVyZmFj ZSA9CiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgdzMydGVybS5jYCBtdXN0IGJlIGlu IHRoZSBleGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGBk aXNwZXh0ZXJuLmhgISAqLworCisgIG1jX3czMl9kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1jX3cz Ml9kcmF3X2dseXBoX3N0cmluZywKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICB3 MzJfZnJhbWVfcGFybV9oYW5kbGVycywKICAgZ3VpX3Byb2R1Y2VfZ2x5cGhzLAogICBndWlfd3Jp dGVfZ2x5cGhzLApkaWZmIC0tZ2l0IGEvc3JjL3dpbmRvdy5oIGIvc3JjL3dpbmRvdy5oCmluZGV4 IDZiMGYwZTUuLjE0ZGQzOGEgMTAwNjQ0Ci0tLSBhL3NyYy93aW5kb3cuaAorKysgYi9zcmMvd2lu ZG93LmgKQEAgLTMyNCw2ICszMjQsMTQ3IEBAIHN0cnVjdCB3aW5kb3cKIAogI2lmZGVmIEhBVkVf V0lORE9XX1NZU1RFTQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVnaW4gTVVM VElQTEUtQ1VSU09SUyAqLworCisvKiBTdWZmaXhlcyBmb3IgdGhlIGBtY2Agd2luZG93IHBvaW50 ZXIgcHJlZml4LiAqLworc3RydWN0IG11bHRpcGxlX2N1cnNvcnMKK3sKKyAgLyogVGhlIHJlY29y ZGVkIHBpeGVsIHdpZHRoIG9mIHRoZSBsYXN0IGxpbmUgbnVtYmVyIGRyYXduIGR1cmluZyByZWRp c3BsYXkgKi8KKyAgaW50IGxudW1fcGl4ZWxfd2lkdGg7Cit9IG1jOworCitzdHJ1Y3QgbWNfbWF0 cml4Cit7CisgIHB0cmRpZmZfdCB2cG9zX2FsbG9jYXRlZDsKKyAgcHRyZGlmZl90IHZwb3NfdXNl ZDsKKyAgcHRyZGlmZl90IGN1cnNvcnNfdXNlZFs0XTsKKyAgZW51bSBtY19jYWNoZV90eXBlCisg IHsKKyAgICBNQ19DQUNIRSwKKyAgICBDSF9DQUNIRSwKKyAgICBGQ19DQUNIRSwKKyAgICBOT19D QUNIRQorICB9IGNhY2hlX3R5cGU7CisgIHN0cnVjdCBtY192cG9zCisgIHsKKyAgICBwdHJkaWZm X3QgY2FjaGVfYWxsb2NhdGVkWzRdOworICAgIHB0cmRpZmZfdCBjYWNoZV91c2VkWzRdOworICAg IHN0cnVjdCBtY19jb250ZW50cworICAgIHsKKyAgICAgIGJvb2xfYmYgc2FtZV9wIDogMTsKKyAg ICAgIHN0cnVjdCBnbHlwaCBnbHlwaDsKKyAgICAgIGludCB4OworICAgICAgaW50IGZ4OworICAg ICAgaW50IHk7CisgICAgICBpbnQgZnk7CisgICAgICBpbnQgaHBvczsKKyAgICAgIGludCB2cG9z OworICAgICAgaW50IHdkOworICAgICAgaW50IGg7CisgICAgICBlbnVtIG1jX2N1cnNvcl90eXBl CisgICAgICB7CisgICAgICAgIC8qIE5PVEU6ICBUaGUgZnJpbmdlIGJpdG1hcCBmcmFtZXdvcmsg cmVsaWVzIHVwb24gTUNfTk9fRlJJTkdFX0JJVE1BUAorICAgICAgICBoYXZpbmcgYSB2YWx1ZSBv ZiB6ZXJvICgwKS4gKi8KKyAgICAgICAgTUNfTk9fRlJJTkdFX0JJVE1BUCwKKyAgICAgICAgTUNf Tk9fQ1VSU09SLAorICAgICAgICBNQ19SSUdIVF9GUklOR0VfQklUTUFQLAorICAgICAgICBNQ19M RUZUX0ZSSU5HRV9CSVRNQVAsCisgICAgICAgIE1DX0ZSQU1FRF9CT1gsCisgICAgICAgIE1DX0ZJ TExFRF9CT1gsCisgICAgICAgIE1DX0hPTExPV19CT1gsCisgICAgICAgIE1DX0JBUiwKKyAgICAg ICAgTUNfSEJBUgorICAgICAgfSBjdXJzb3JfdHlwZTsKKyAgICAgIGludCBjdXJzb3Jfd2lkdGg7 CisgICAgICBzdHJ1Y3QgbWNfUkdCCisgICAgICB7CisgICAgICAgIGRvdWJsZSByZWQ7CisgICAg ICAgIGRvdWJsZSBncmVlbjsKKyAgICAgICAgZG91YmxlIGJsdWU7CisgICAgICB9IGZnLCBiZzsK KyAgICAgIGJvb2xfYmYgYWN0aXZlX3AgOiAxOworICAgICAgZW51bSBtY19mbGF2b3IKKyAgICAg IHsKKyAgICAgICAgTk9fRkxBVk9SLAorICAgICAgICBNQ19HTFlQSCwKKyAgICAgICAgTUNfR0xZ UEhMRVNTLAorICAgICAgICBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUCwKKyAgICAgICAgTUNfUElM Q1JPVywKKyAgICAgICAgTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVywKKyAgICAgICAg TUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVywKKyAgICAgICAgTUNfSE9M TE9XX1JFQ1RBTkdMRSwKKyAgICAgICAgTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XLAorICAg ICAgICBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1csCisgICAgICAgIE1DX1ZF UlRJQ0FMX0JBUiwKKyAgICAgICAgTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSLAorICAgICAgICBN Q19WRVJUSUNB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Xdfcm93X3R5cGUKKyAgewor ICAgIE5PV0hFUkUsCisgICAgU0NSSUJFX09ORSwKKyAgICBTQ1JJQkVfVFdPLAorICAgIFNDUklC RV9USFJFRSwKKyAgICBTS0lQUEVELAorICAgIFBPU1RfQ0hBTkdFRCwKKyAgICBVTkNIQU5HRUQs CisgICAgU0VUX0NVUlNPUl9PTkUsCisgICAgU0VUX0NVUlNPUl9UV08KKyAgfSBtY19kcmF3X3Jv d190eXBlX19mcm9tX3doZXJlOworICAvKiBVc2VkIGVsc2V3aGVyZS4gKi8KKyAgZW51bSBtY19y ZWRyYXdfcm93X3R5cGUKKyAgeworICAgIFVQREFURV9XSU5ET1dfX1JFRFJBV19PVkVSTEFQUEVE X1JPV1MsCisgICAgR1VJX0lOU0VSVF9HTFlQSFMsCisgICAgR1VJX0ZJWF9PVkVSTEFQUElOR19B UkVBLAorICAgIERSQVdfUk9XX1dJVEhfTU9VU0VfRkFDRSwKKyAgICBFWFBPU0VfQVJFQV9PTkUs CisgICAgRVhQT1NFX0FSRUFfVFdPLAorICAgIEVYUE9TRV9MSU5FCisgIH0gbWNfcmVkcmF3X3Jv d190eXBlX19mcm9tX3doZXJlOworfSBtY19tYXRyaXg7CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJT T1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgLyogQ3Vyc29yIHR5cGUg b2YgbGFzdCBjdXJzb3IgZHJhd24gb24gdGhlIHdpbmRvdy4gICovCiAgICAgZW51bSB0ZXh0X2N1 cnNvcl9raW5kcyBwaHlzX2N1cnNvcl90eXBlOwogCmRpZmYgLS1naXQgYS9zcmMveGRpc3AuYyBi L3NyYy94ZGlzcC5jCmluZGV4IDUwZjY0NDMuLmQxMGM5MjkgMTAwNjQ0Ci0tLSBhL3NyYy94ZGlz cC5jCisrKyBiL3NyYy94ZGlzcC5jCkBA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nIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICopOworc3RhdGljIGludCByaWdo dF9vdmVyd3JpdGluZyAoc3RydWN0IGdseXBoX3N0cmluZyAqKTsKK3N0YXRpYyB2b2lkIGFwcGVu ZF9nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKiosIHN0cnVjdCBnbHlwaF9zdHJp bmcgKiosCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3Ry aW5nICopOworc3RhdGljIHZvaWQgcHJlcGVuZF9nbHlwaF9zdHJpbmdfbGlzdHMgKHN0cnVjdCBn bHlwaF9zdHJpbmcgKiosIHN0cnVjdCBnbHlwaF9zdHJpbmcgKiosCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAqLCBzdHJ1Y3QgZ2x5 cGhfc3RyaW5nICopOworc3RhdGljIHZvaWQgYXBwZW5kX2dseXBoX3N0cmluZ19saXN0cyAoc3Ry dWN0IGdseXBoX3N0cmluZyAqKiwgc3RydWN0IGdseXBoX3N0cmluZyAqKiwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKiwgc3RydWN0 IGdseXBoX3N0cmluZyAqKTsKK3N0YXRpYyB2b2lkIGluaXRfZ2x5cGhfc3RyaW5nIChzdHJ1Y3Qg Z2x5cGhfc3RyaW5nICosIE1DX09QVElPTkFMX0hEQyAoaGRjKSB1bnNpZ25lZCAqLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3Jv dyAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZ2x5cGhfcm93X2FyZWEs IGludCwgZW51bSBkcmF3X2dseXBoc19mYWNlKTsKK3N0YXRpYyB2b2lkIGNvbXB1dGVfb3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JTERfSU1BR0VfR0xZUEhfU1RSSU5HIChT VEFSVCwgRU5ELCBIRUFELCBUQUlMLAkJXAorCQkJCQlITCwgWCwgTEFTVF9YKTsJCQlcCisJICAg ICAgYnJlYWs7CisKKyNkZWZpbmUgTUNfQlVJTERfR0xZUEhfU1RSSU5HU19YVyhTVEFSVCwgRU5E LCBIRUFELCBUQUlMLCBITCwgWCwgTEFTVF9YKQlcCisgICAgICAgICAgICBjYXNlIFhXSURHRVRf R0xZUEg6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAg ICAgICAgIE1DX0JVSUxEX1hXSURHRVRfR0xZUEhfU1RSSU5HIChTVEFSVCwgRU5ELCBIRUFELCBU QUlMLCAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBI TCwgWCwgTEFTVF9YKTsgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgIGJyZWFrOworCisj ZGVmaW5lIE1DX0JVSUxEX0dMWVBIX1NUUklOR1NfMihTVEFSVCwgRU5ELCBIRUFELCBUQUlMLCBI TCwgWCwgTEFTVF9YKQlcCisJICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgkJCQkJXAorCSAgICAg IE1DX0JVSUxEX0dMWVBITEVTU19HTFlQSF9TVFJJTkcgKFNUQVJULCBFTkQsIEhFQUQsIFRBSUws CVwKKwkJCQkJICAgIEhMLCBYLCBMQVNUX1gpOwkJXAorCSAgICAgIGJyZWFrOwkJCQkJCQlcCisJ CQkJCQkJCQlcCisJICAgIGRlZmF1bHQ6CQkJCQkJCVwKKwkgICAgICBlbWFjc19hYm9ydCAoKTsJ CQkJCQlcCisJICAgIH0JCQkJCQkJCVwKKwkJCQkJCQkJCVwKKwkgIGlmIChzKQkJCQkJCQlcCisJ ICAgIHsJCQkJCQkJCVwKKwkgICAgICBzZXRfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmRfd2lkdGgg KHMsIFNUQVJULCBMQV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bXEgKExpc3BfT2Jq ZWN0IGVsdCwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgd2hpbGUgKDEpCisgICAgeworICAgICAg aWYgKCFDT05TUCAobGlzdCkgfHwgRVEgKFhDQVIgKGxpc3QpLCBlbHQpKQorICAgICAgICBicmVh azsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpIHx8 IEVRIChYQ0FSIChsaXN0KSwgZWx0KSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENE UiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KSB8fCBFUSAoWENBUiAobGlzdCksIGVs dCkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3QpOworICAgIH0KKyAg cmV0dXJuIGxpc3Q7Cit9CisKK0xpc3BfT2JqZWN0CittY19udGggKGludCBudW0sIExpc3BfT2Jq ZWN0IGxpc3QpCit7CisgIGZvciAoaW50IGkgPSAwOyBpIDwgbnVtICYmICFOSUxQIChsaXN0KTsg aSsrKQorICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgaWYgKENPTlNQIChsaXN0KSkKKyAgICBy ZXR1cm4gWENBUiAobGlzdCk7CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFuaWw7Cit9CisKK0xp c3BfT2JqZWN0CittY19hc3NxIChMaXNwX09iamVjdCBrZXksIExpc3BfT2JqZWN0IGxpc3QpCit7 CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3QpCisgICAgICAgICAg fHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEgKFhDQVIgKFhDQVIg KGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3Qp OworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09OU1AgKFhDQVIgKGxp c3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkpLCBrZXkpKSkKKyAg ICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQ IChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAg ICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBicmVhazsKKyAgICAg IGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICB9CisgIGlmIChDT05TUCAobGlzdCkpCisgICAgcmV0 dXJuIFhDQVIgKGxpc3QpOworICAgIGVsc2UKKyAgICAgIHJldHVybiBRbmlsOworfQorCitMaXNw X09iamVjdAorbWNfYXNzb2MgKExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmplY3QgbGlzdCkKK3sK KyAgTGlzcF9PYmplY3QgY2FyOworICB3aGlsZSAoMSkKKyAgICB7CisgICAgICBpZiAoIUNPTlNQ IChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAg ICYmIChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2Fy LCBrZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7Cisg ICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAg ICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FS IChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQ IChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENE UiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAo WENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSks CisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwg a2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAg fQorICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FSIChsaXN0KTsKKyAgICBlbHNl CisgICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QKK21jX3BsaXN0X2dldCAoTGlz cF9PYmplY3QgcGxpc3QsIExpc3BfT2JqZWN0IHByb3ApCit7CisgIExpc3BfT2JqZWN0IHRhaWws IGhhbGZ0YWlsOworICAvKiBoYWxmdGFpbCBpcyB1c2VkIHRvIGRldGVjdCBjaXJjdWxhciBsaXN0 cy4gICovCisgIHRhaWwgPSBoYWxmdGFpbCA9IHBsaXN0OworICB3aGlsZSAoQ09OU1AgKHRhaWwp ICYmIENPTlNQIChYQ0RSICh0YWlsKSkpCisgICAgeworICAgICAgaWYgKEVRIChwcm9wLCBYQ0FS ICh0YWlsKSkpCisgICAgICAgIHJldHVybiBYQ0FSIChYQ0RSICh0YWlsKSk7CisgICAgICB0YWls ID0gWENEUiAoWENEUiAodGFpbCkpOworICAgICAgaGFsZnRhaWwgPSBYQ0RSIChoYWxmdGFpbCk7 CisgICAgICBpZiAoRVEgKHRhaWwsIGhhbGZ0YWlsKSkKKyAgICAgICAgYnJlYWs7CisgICAgfQor ICByZXR1cm4gUW5pbDsKK30KKworLyogUkVHSU9OIEJFR0lOOiAgbWNfcmVnaW9uX2xpbWl0ICgx KQorICAgUkVHSU9OIEVORDogIG1jX3JlZ2lvbl9saW1pdCAoMCkgKi8KK3B0cmRpZmZfdAorbWNf cmVnaW9uX2xpbWl0IChib29sIGJlZ2luX3ApCit7CisgIGlmICghTklMUCAoVnRyYW5zaWVudF9t YXJrX21vZGUpCisgICAgICAmJiBOSUxQIChWbWFya19ldmVuX2lmX2luYWN0aXZlKQorICAgICAg JiYgTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1hcmtfYWN0aXZlKSkpCisgICAgeHNpZ25h bDAgKFFtYXJrX2luYWN0aXZlKTsKKyAgTGlzcF9PYmplY3QgbWFya2VyID0gQlZBUiAoY3VycmVu dF9idWZmZXIsIG1hcmspOworICBpbnQgbSA9IChYTUFSS0VSIChtYXJrZXIpLT5idWZmZXIpCisg ICAgICAgICAgPyBYTUFSS0VSIChtYXJrZXIpLT5jaGFycG9zCisgICAgICAgICAgOiAtMTsKKyAg cmV0dXJuIChtID09IC0xKQorICAgICAgICAgICA/IC0xCisgICAgICAgICA6IChQVCA8IG0pID09 IGJlZ2luX3AKKyAgICAgICAgICAgPyBQVAorICAgICAgICAgOiBjbGlwX3RvX2JvdW5kcyAoQkVH ViwgbSwgWlYpOworfQorCisvKiBDaGVjayB0aGUgcHJlc2VuY2Ugb2YgYSBkaXNwbGF5IHByb3Bl cnR5IGFuZCBjb21wdXRlIGl0cyB3aWR0aC4KKyAgIElmIGEgcHJvcGVydHkgd2FzIGZvdW5kIGFu ZCBpdHMgd2lkdGggd2FzIGZvdW5kIGFzIHdlbGwsIHJldHVybgorICAgaXRzIHdpZHRoICg+PSAw KSBhbmQgc2V0IHRoZSBwb3NpdGlvbiBvZiB0aGUgZW5kIG9mIHRoZSBwcm9wZXJ0eQorICAgaW4g RU5EUE9TLgorICAgT3RoZXJ3aXNlIGp1c3QgcmV0dXJuIC0xLiAqLworc3RhdGljIGludAorbWNf Y2hlY2tfZGlzcGxheV93aWR0aCAocHRyZGlmZl90IHBvcywgcHRyZGlmZl90IGNvbCwgcHRyZGlm Zl90ICplbmRwb3MpCit7CisgIExpc3BfT2JqZWN0IHZhbCwgb3ZlcmxheTsKKyAgaWYgKENPTlNQ ICh2YWwgPSBnZXRfY2hhcl9wcm9wZXJ0eV9hbmRfb3ZlcmxheQorICAgICAgICAgICAgICAobWFr ZV9maXhudW0gKHBvcyksIFFkaXNwbGF5LCBRbmlsLCAmb3ZlcmxheSkpCisgICAgICAmJiBFUSAo UXNwYWNlLCBYQ0FSICh2YWwpKSkKKyAgICB7IC8qIEZJWE1FOiBVc2UgY2FsY19waXhlbF93aWR0 aF9vcl9oZWlnaHQuICovCisgICAgICBMaXNwX09iamVjdCBwbGlzdCA9IFhDRFIgKHZhbCksIHBy b3A7CisgICAgICBpbnQgd2lkdGggPSAtMTsKKyAgICAgIEVNQUNTX0lOVCBhbGlnbl90b19tYXgg PSAoY29sIDwgTU9TVF9QT1NJVElWRV9GSVhOVU0gLSBJTlRfTUFYCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IChFTUFDU19JTlQpIElOVF9NQVggKyBjb2wKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogTU9TVF9QT1NJVElWRV9GSVhOVU0pOworICAgICAgaWYg KChwcm9wID0gbWNfcGxpc3RfZ2V0IChwbGlzdCwgUUN3aWR0aCksIFJBTkdFRF9GSVhOVU1QICgw LCBwcm9wLCBJTlRfTUFYKSkKKyAgICAgICAgICB8fCAocHJvcCA9IG1jX3BsaXN0X2dldCAocGxp c3QsIFFDcmVsYXRpdmVfd2lkdGgpLAorICAgICAgICAgICAgICBSQU5HRURfRklYTlVNUCAoMCwg cHJvcCwgSU5UX01BWCkpKQorICAgICAgICB3aWR0aCA9IFhGSVhOVU0gKHByb3ApOworICAgICAg ICBlbHNlIGlmIChGTE9BVFAgKHByb3ApICYmIDAgPD0gWEZMT0FUX0RBVEEgKHByb3ApCisgICAg ICAgICAgICAgICAgICYmIFhGTE9BVF9EQVRBIChwcm9wKSA8PSBJTlRfTUFYKQorICAgICAgICAg IHdpZHRoID0gKGludCkoWEZMT0FUX0RBVEEgKHByb3ApICsgMC41KTsKKyAgICAgICAgICBlbHNl IGlmICgocHJvcCA9IG1jX3BsaXN0X2dldCAocGxpc3QsIFFDYWxpZ25fdG8pLAorICAgICAgICAg ICAgICAgICAgICBSQU5HRURfRklYTlVNUCAoY29sLCBwcm9wLCBhbGlnbl90b19tYXgpKSkKKyAg ICAgICAgICAgIHdpZHRoID0gWEZJWE5VTSAocHJvcCkgLSBjb2w7CisgICAgICAgICAgICAgIGVs c2UgaWYgKEZMT0FUUCAocHJvcCkgJiYgY29sIDw9IFhGTE9BVF9EQVRBIChwcm9wKQorICAgICAg ICAgICAgICAgICAgICAgICAmJiAoWEZMT0FUX0RBVEEgKHByb3ApIDw9IGFsaWduX3RvX21heCkp CisgICAgICAgICAgICAgICAgd2lkdGggPSAoaW50KShYRkxPQVRfREFUQSAocHJvcCkgKyAwLjUp IC0gY29sOworICAgICAgaWYgKHdpZHRoID49IDApCisgICAgICAgIHsKKyAgICAgICAgICBwdHJk aWZmX3Qgc3RhcnQ7CisgICAgICAgICAgaWYgKE9WRVJMQVlQIChvdmVybGF5KSkKKyAgICAgICAg ICAgICplbmRwb3MgPSBPVkVSTEFZX1BPU0lUSU9OIChPVkVSTEFZX0VORCAob3ZlcmxheSkpOwor ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBnZXRfcHJvcGVydHlfYW5kX3JhbmdlIChw b3MsIFFkaXNwbGF5LCAmdmFsLCAmc3RhcnQsIGVuZHBvcywgUW5pbCk7CisgICAgICAgICAgLyog Rm9yIDpyZWxhdGl2ZS13aWR0aCwgd2UgbmVlZCB0byBtdWx0aXBseSBieSB0aGUgY29sdW1uCisg ICAgICAgICAgICAgd2lkdGggb2YgdGhlIGNoYXJhY3RlciBhdCBQT1MsIGlmIGl0IGlzIGdyZWF0 ZXIgdGhhbiAxLiAqLworICAgICAgICAgIGlmICghTklMUCAobWNfcGxpc3RfZ2V0IChwbGlzdCwg UUNyZWxhdGl2ZV93aWR0aCkpCisgICAgICAgICAgICAgIC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X3QgYnl0ZXBvcywKKyAgICAgICAgICAgICAgICAgIHB0cmRpZmZfdCBsaW1pdCwgc3Ry dWN0IHdpbmRvdyAqd2luLCBzdHJ1Y3QgZmFjZSAqZmFjZSwKKyAgICAgICAgICAgICAgICAgIExp c3BfT2JqZWN0IHN0cmluZykKK3sKKyAgcHRyZGlmZl90IGNvdW50ID0gU1BFQ1BETF9JTkRFWCAo KTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3aW4tPmZyYW1lKTsKKyAgTGlzcF9PYmpl Y3QgcG9zID0gbWFrZV9maXhudW0gKGNoYXJwb3MpOworICBwdHJkaWZmX3QgdG87CisgIHB0cmRp ZmZfdCBwdCA9IFBULCBwdF9ieXRlID0gUFRfQllURTsKKyAgTGlzcF9PYmplY3QgcmUsIGZvbnRf b2JqZWN0LCBsZ3N0cmluZzsKKyAgcHRyZGlmZl90IGxlbjsKKyAgcmVjb3JkX3Vud2luZF9zYXZl X21hdGNoX2RhdGEgKCk7CisgIHJlID0gQVJFRiAocnVsZSwgMCk7CisgIGlmIChOSUxQIChyZSkp CisgICAgbGVuID0gMTsKKyAgZWxzZSBpZiAoISBTVFJJTkdQIChyZSkpCisgICAgcmV0dXJuIHVu YmluZF90byAoY291bnQsIFFuaWwpOworICBlbHNlIGlmICgobGVuID0gZmFzdF9sb29raW5nX2F0 IChyZSwgY2hhcnBvcywgYnl0ZXBvcywgbGltaXQsIC0xLCBzdHJpbmcpKQorICAgICAgICAgICA+ IDApCisgICAgeworICAgICAgaWYgKE5JTFAgKHN0cmluZykpCisgICAgICAgIGxlbiA9IEJZVEVf VE9fQ0hBUiAoYnl0ZXBvcyArIGxlbikgLSBjaGFycG9zOworICAgICAgZWxzZQorICAgICAgICBs ZW4gPSBzdHJpbmdfYnl0ZV90b19jaGFyIChzdHJpbmcsIGJ5dGVwb3MgKyBsZW4pIC0gY2hhcnBv czsKKyAgICB9CisgIGlmIChsZW4gPD0gMCkKKyAgICByZXR1cm4gdW5iaW5kX3RvIChjb3VudCwg UW5pbCk7CisgIHRvID0gbGltaXQgPSBjaGFycG9zICsgbGVuOworI2lmZGVmIEhBVkVfV0lORE9X X1NZU1RFTQorICBpZiAoRlJBTUVfV0lORE9XX1AgKGYpKQorICAgIHsKKyAgICAgIGZvbnRfb2Jq ZWN0ID0gZm9udF9yYW5nZSAoY2hhcnBvcywgYnl0ZXBvcywgJnRvLCB3aW4sIGZhY2UsIHN0cmlu Zyk7CisgICAgICBpZiAoISBGT05UX09CSkVDVF9QIChmb250X29iamVjdCkKKyAgICAgICAgICB8 fCAoISBOSUxQIChyZSkKKyAgICAgICAgICAgICAgJiYgdG8gPCBsaW1pdAorICAgICAgICAgICAg ICAmJiAoZmFzdF9sb29raW5nX2F0IChyZSwgY2hhcnBvcywgYnl0ZXBvcywgdG8sIC0xLCBzdHJp bmcpIDw9IDApKSkKKyAgICAgICAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIFFuaWwpOworICAg IH0KKyAgZWxzZQorI2VuZGlmICAgICAgICAvKiBub3QgSEFWRV9XSU5ET1dfU1lTVEVNICovCisg ICAgZm9udF9vYmplY3QgPSB3aW4tPmZyYW1lOworICBsZ3N0cmluZyA9IEZjb21wb3NpdGlvbl9n ZXRfZ3N0cmluZyAocG9zLCBtYWtlX2ZpeG51bSAodG8pLCBmb250X29iamVjdCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyk7CisgIGlmIChOSUxQIChMR1NU UklOR19JRCAobGdzdHJpbmcpKSkKKyAgICB7CisgICAgICAvKiBTYXZlIHBvaW50IGFzIG1hcmtl ciBiZWZvcmUgY2FsbGluZyBvdXQgdG8gbGlzcC4gICovCisgICAgICBpZiAoTklMUCAoc3RyaW5n KSkKKyAgICAgICAgcmVjb3JkX3Vud2luZF9wcm90ZWN0IChyZXN0b3JlX3BvaW50X3Vud2luZCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZF9tYXJrZXIgKG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2Jv b2wKK21jX2NvbXBvc2l0aW9uX3Jlc2VhdF9pdCAoc3RydWN0IGNvbXBvc2l0aW9uX2l0ICpjbXBf aXQsIHB0cmRpZmZfdCBjaGFycG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICBwdHJkaWZm X3QgYnl0ZXBvcywgcHRyZGlmZl90IGVuZHBvcywgc3RydWN0IHdpbmRvdyAqdywKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmZhY2UsIExpc3BfT2JqZWN0IHN0cmluZykK K3sKKyAgaWYgKGNtcF9pdC0+Y2ggPT0gLTIpCisgICAgeworICAgICAgY29tcG9zaXRpb25fY29t cHV0ZV9zdG9wX3BvcyAoY21wX2l0LCBjaGFycG9zLCBieXRlcG9zLCBlbmRwb3MsIHN0cmluZyk7 CisgICAgICBpZiAoY21wX2l0LT5jaCA9PSAtMiB8fCBjbXBfaXQtPnN0b3BfcG9zICE9IGNoYXJw b3MpCisgICAgICAgIC8qIFRoZSBjdXJyZW50IHBvc2l0aW9uIGlzIG5vdCBjb21wb3NlZC4gICov CisgICAgICAgIHJldHVybiAwOworICAgIH0KKyAgaWYgKGVuZHBvcyA8IDApCisgICAgZW5kcG9z ID0gTklMUCAoc3RyaW5nKSA/IEJFR1YgOiAwOworICBpZiAoY21wX2l0LT5jaCA8IDApCisgICAg eworICAgICAgLyogV2UgYXJlIGxvb2tpbmcgYXQgYSBzdGF0aWMgY29tcG9zaXRpb24uICAqLwor ICAgICAgcHRyZGlmZl90IHN0YXJ0LCBlbmQ7CisgICAgICBMaXNwX09iamVjdCBwcm9wOworICAg ICAgZmluZF9jb21wb3NpdGlvbiAoY2hhcnBvcywgLTEsICZzdGFydCwgJmVuZCwgJnByb3AsIHN0 cmluZyk7CisgICAgICBjbXBfaXQtPmlkID0gZ2V0X2NvbXBvc2l0aW9uX2lkIChjaGFycG9zLCBi eXRlcG9zLCBlbmQgLSBzdGFydCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHByb3AsIHN0cmluZyk7CisgICAgICBpZiAoY21wX2l0LT5pZCA8IDApCisgICAgICAgIGdv dG8gbm9fY29tcG9zaXRpb247CisgICAgICBjbXBfaXQtPm5jaGFycyA9IGVuZCAtIHN0YXJ0Owor ICAgICAgY21wX2l0LT5uZ2x5cGhzID0gY29tcG9zaXRpb25fdGFibGVbY21wX2l0LT5pZF0tPmds eXBoX2xlbjsKKyAgICB9CisgIGVsc2UgaWYgKHcpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qg bGdzdHJpbmcgPSBRbmlsOworICAgICAgTGlzcF9PYmplY3QgdmFsLCBlbHQ7CisgICAgICBwdHJk aWZmX3QgaTsKKyAgICAgIHZhbCA9IENIQVJfVEFCTEVfUkVGIChWY29tcG9zaXRpb25fZnVuY3Rp b25fdGFibGUsIGNtcF9pdC0+Y2gpOworICAgICAgZm9yIChpID0gMDsgaSA8IGNtcF9pdC0+cnVs ZV9pZHg7IGkrKywgdmFsID0gWENEUiAodmFsKSk7CisgICAgICBpZiAoY2hhcnBvcyA8IGVuZHBv cykKKyAgICAgICAgeworICAgICAgICAgIGZvciAoOyBDT05TUCAodmFsKTsgdmFsID0gWENEUiAo dmFsKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZWx0ID0gWENBUiAodmFsKTsKKyAg ICAgICAgICAgICAgaWYgKCEgVkVDVE9SUCAoZWx0KSB8fCBBU0laRSAoZWx0KSAhPSAzCisgICAg ICAgICAgICAgICAgICB8fCAhIElOVEVHRVJQIChBUkVGIChlbHQsIDEpKSkKKyAgICAgICAgICAg ICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgaWYgKFhGSVhOQVQgKEFSRUYgKGVsdCwgMSkp ICE9IGNtcF9pdC0+bG9va2JhY2spCisgICAgICAgICAgICAgICAgZ290byBub19jb21wb3NpdGlv bjsKKyAgICAgICAgICAgICAgbGdzdHJpbmcgPSBtY19hdXRvY21wX2NoYXJzIChlbHQsIGNoYXJw b3MsIGJ5dGVwb3MsIGVuZHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB3LCBmYWNlLCBzdHJpbmcpOworICAgICAgICAgICAgICBpZiAoY29tcG9zaXRpb25fZ3N0 cmluZ19wIChsZ3N0cmluZykpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg IGxnc3RyaW5nID0gUW5pbDsKKyAgICAgICAgICAgICAgLyogQ29tcG9zaXRpb24gZmFpbGVkIHBl cmhhcHMgYmVjYXVzZSB0aGUgZm9udCBkb2Vzbid0CisgICAgICAgICAgICAgICAgIHN1cHBvcnQg c3VmZmljaWVudCByYW5nZSBvZiBjaGFyYWN0ZXJzLiAgVHJ5IHRoZQorICAgICAgICAgICAgICAg ICBvdGhlciBjb21wb3NpdGlvbiBydWxlcyBpZiBhbnkuICAqLworICAgICAgICAgICAgfQorICAg ICAgICAgIGNtcF9pdC0+cmV2ZXJzZWRfcCA9IDA7CisgICAgICAgIH0KKyAgICAgIGVsc2UKKyAg ICAgICAgeworICAgICAgICAgIHB0cmRpZmZfdCBjcG9zID0gY2hhcnBvcywgYnBvcyA9IGJ5dGVw b3M7CisgICAgICAgICAgY21wX2l0LT5yZXZlcnNlZF9wID0gMTsKKyAgICAgICAgICBlbHQgPSBY Q0FSICh2YWwpOworICAgICAgICAgIGlmIChjbXBfaXQtPmxvb2tiYWNrID4gMCkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgY3BvcyA9IGNoYXJwb3MgLSBjbXBfaXQtPmxvb2tiYWNrOwor ICAgICAgICAgICAgICBpZiAoU1RSSU5HUCAoc3RyaW5nKSkKKyAgICAgICAgICAgICAgICBicG9z ID0gc3RyaW5nX2NoYXJfdG9fYnl0ZSAoc3RyaW5nLCBjcG9zKTsKKyAgICAgICAgICAgICAgZWxz ZQorICAgICAgICAgICAgICAgIGJwb3MgPSBDSEFSX1RPX0JZVEUgKGNwb3MpOworICAgICAgICAg ICAgfQorICAgICAgICAgIGxnc3RyaW5nID0gbWNfYXV0b2NtcF9jaGFycyAoZWx0LCBjcG9zLCBi cG9zLCBjaGFycG9zICsgMSwgdywgZmFjZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHN0cmluZyk7CisgICAgICAgICAgaWYgKCEgY29tcG9zaXRpb25fZ3N0cmluZ19wIChs Z3N0cmluZykKKyAgICAgICAgICAgICAgfHwgY3BvcyArIExHU1RSSU5HX0NIQVJfTEVOIChsZ3N0 cmluZykgLSAxICE9IGNoYXJwb3MpCisgICAgICAgICAgICAvKiBDb21wb3NpdGlvbiBmYWlsZWQg b3IgZGlkbid0IGNvdmVyIHRoZSBjdXJyZW50CisgICAgICAgICAgICAgICBjaGFyYWN0ZXIuICAq LworICAgICAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgICAgICAgfQorICAgICAgaWYg KE5JTFAgKGxnc3RyaW5nKSkKKyAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgICAgIGlm IChOSUxQIChMR1NUUklOR19JRCAobGdzdHJpbmcpKSkKKyAgICAgICAgbGdzdHJpbmcgPSBjb21w b3NpdGlvbl9nc3RyaW5nX3B1dF9jYWNoZSAobGdzdHJpbmcsIC0xKTsKKyAgICAgIGNtcF9pdC0+ aWQgPSBYRklYTlVNIChMR1NUUklOR19JRCAobGdzdHJpbmcpKTsKKyAgICAgIGZvciAoaSA9IDA7 IGkgPCBMR1NUUklOR19HTFlQSF9MRU4gKGxnc3RyaW5nKTsgaSsrKQorICAgICAgICBpZiAoTklM UCAoTEdTVFJJTkdfR0xZUEggKGxnc3RyaW5nLCBpKSkpCisgICAgICAgICAgYnJlYWs7CisgICAg ICBjbXBfaXQtPm5nbHlwaHMgPSBpOworICAgICAgY21wX2l0LT5mcm9tID0gMDsKKyAgICAgIGNt cF9pdC0+dG8gPSBpOworICAgIH0KKyAgZWxzZQorICAgIGdvdG8gbm9fY29tcG9zaXRpb247Cisg IH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pbCk7CisgICAgICAgICAgaWYgKHNjYW4gIT0gb2xkX3NjYW4pCisgICAgICAgICAgICBzY2Fu X2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOworICAgICAgICAgIGlmIChzY2FuID49IGVuZCkK KyAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgfQorICAgICAgLyogVGVzdCByZWFj aGluZyB0aGUgZ29hbCBjb2x1bW4uICBXZSBkbyB0aGlzIGFmdGVyIHNraXBwaW5nCisgICBpbnZp c2libGUgY2hhcmFjdGVycywgc28gdGhhdCB3ZSBwdXQgcG9pbnQgYmVmb3JlIHRoZQorICAgY2hh cmFjdGVyIG9uIHdoaWNoIHRoZSBjdXJzb3Igd2lsbCBhcHBlYXIuICovCisgICAgICBpZiAoY29s ID49IGdvYWwpCisgICAgICAgIGJyZWFrOworICAgICAgcHJldl9jb2wgPSBjb2w7CisgICAgICB7 IC8qIENoZWNrIGRpc3BsYXkgcHJvcGVydHkuICovCisgICAgICAgIHB0cmRpZmZfdCBlbmRwOwor ICAgICAgICBpbnQgd2lkdGggPSBtY19jaGVja19kaXNwbGF5X3dpZHRoIChzY2FuLCBjb2wsICZl bmRwKTsKKyAgICAgICAgaWYgKHdpZHRoID49IDApCisgICAgICAgICAgeworICAgICAgICAgICAg Y29sICs9IHdpZHRoOworICAgICAgICAgICAgaWYgKGVuZHAgPiBzY2FuKSAvKiBBdm9pZCBpbmZp bml0ZSBsb29wcyB3aXRoIDAtd2lkdGggb3ZlcmxheXMuICovCisgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICBzY2FuID0gZW5kcDsKKyAgICAgICAgICAgICAgICBzY2FuX2J5dGUgPSBD SEFSX1RPX0JZVEUgKHNjYW4pOworICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorICAgICAgLyogQ2hlY2sgY29tcG9zaXRpb24g c2VxdWVuY2UuICovCisgICAgICBpZiAoY21wX2l0LmlkID49IDAKKyAgICAgICAgICB8fCAoc2Nh biA9PSBjbXBfaXQuc3RvcF9wb3MKKyAgICAgICAgICAgICAgJiYgbWNfY29tcG9zaXRpb25fcmVz ZWF0X2l0ICgmY21wX2l0LCBzY2FuLCBzY2FuX2J5dGUsIGVuZCwgdywgTlVMTCwgUW5pbCkpKQor ICAgICAgICBjb21wb3NpdGlvbl91cGRhdGVfaXQgKCZjbXBfaXQsIHNjYW4sIHNjYW5fYnl0ZSwg UW5pbCk7CisgICAgICBpZiAoY21wX2l0LmlkID49IDApCisgICAgICAgIHsKKyAgICAgICAgICBz Y2FuICs9IGNtcF9pdC5uY2hhcnM7CisgICAgICAgICAgc2Nhbl9ieXRlICs9IGNtcF9pdC5uYnl0 ZXM7CisgICAgICAgICAgaWYgKHNjYW4gPD0gZW5kKQorICAgICAgICAgICAgY29sICs9IGNtcF9p dC53aWR0aDsKKyAgICAgICAgICBpZiAoY21wX2l0LnRvID09IGNtcF9pdC5uZ2x5cGhzKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBjbXBfaXQuaWQgPSAtMTsKKyAgICAgICAgICAgICAg Y29tcG9zaXRpb25fY29tcHV0ZV9zdG9wX3BvcyAoJmNtcF9pdCwgc2Nhbiwgc2Nhbl9ieXRlLCBl bmQsIFFuaWwpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICBjbXBfaXQuZnJvbSA9IGNtcF9pdC50bzsKKyAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAg fQorICAgICAgYyA9IEZFVENIX0JZVEUgKHNjYW5fYnl0ZSk7CisgICAgICAvKiBTZWUgaWYgdGhl cmUgaXMgYSBkaXNwbGF5IHRhYmxlIGFuZCBpdCByZWxhdGVzIHRvIHRoaXMgY2hhcmFjdGVyLiAq LworICAgICAgaWYgKGRwICE9IDAKKyAgICAgICAgICAmJiAhIChtdWx0aWJ5dGUgJiYgTEVBRElO R19DT0RFX1AgKGMpKQorICAgICAgICAgICYmIFZFQ1RPUlAgKERJU1BfQ0hBUl9WRUNUT1IgKGRw LCBjKSkpCisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBjaGFydmVjOworICAgICAg ICAgIHB0cmRpZmZfdCBpLCBuOworICAgICAgICAgIC8qIFRoaXMgY2hhcmFjdGVyIGlzIGRpc3Bs YXllZCB1c2luZyBhIHZlY3RvciBvZiBnbHlwaHMuCisgICAgICAgICAgICAgVXBkYXRlIHRoZSBj b2x1bW4vcG9zaXRpb24gYmFzZWQgb24gdGhvc2UgZ2x5cGhzLiAqLworICAgICAgICAgIGNoYXJ2 ZWMgPSBESVNQX0NIQVJfVkVDVE9SIChkcCwgYyk7CisgICAgICAgICAgbiA9IEFTSVpFIChjaGFy dmVjKTsKKyAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgaSsrKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICAvKiBUaGlzIHNob3VsZCBiZSBoYW5kbGVkIHRoZSBzYW1lIGFzCisgICAg ICAgICAgICAgIG5leHRfZWxlbWVudF9mcm9tX2Rpc3BsYXlfdmVjdG9yIGRvZXMgaXQuICovCisg ICAgICAgICAgICAgIExpc3BfT2JqZWN0IGVudHJ5ID0gQVJFRiAoY2hhcnZlYywgaSk7CisgICAg ICAgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5KSkKKyAgICAgICAgICAgICAgICBjID0g R0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg ICAgICBjID0gJyAnOworICAgICAgICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgICAgICAgICAg ICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1xyJyAmJiBFUSAoQlZB UiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQorICAgICAgICAgICAg ICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1x0JykKKyAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgICAg ICAgICAgICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICArK2NvbDsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAg ICAgICAgLyogVGhlIGRpc3BsYXkgdGFibGUgZG9lc24ndCBhZmZlY3QgdGhpcyBjaGFyYWN0ZXI7 CisgICAgICAgICAgICAgICBpdCBkaXNwbGF5cyBhcyBpdHNlbGYuICovCisgICAgICAgICAgICBp ZiAoYyA9PSAnXG4nKQorICAgICAgICAgICAgICBnb3RvIGVuZGxvb3A7CisgICAgICAgICAgICBp ZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2VsZWN0aXZlX2Rpc3Bs YXkpLCBRdCkpCisgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgIGlmIChj ID09ICdcdCcpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBjb2wgKz0gdGFiX3dp ZHRoOworICAgICAgICAgICAgICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAqIHRhYl93aWR0aDsK KyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChtdWx0aWJ5dGUgJiYgTEVB RElOR19DT0RFX1AgKGMpKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8q IFN0YXJ0IG9mIG11bHRpLWJ5dGUgZm9ybS4gKi8KKyAgICAgICAgICAgICAgICAgIHVuc2lnbmVk IGNoYXIgKnB0cjsKKyAgICAgICAgICAgICAgICAgIGludCBieXRlcywgd2lkdGg7CisgICAgICAg ICAgICAgICAgICBwdHIgPSBCWVRFX1BPU19BRERSIChzY2FuX2J5dGUpOworICAgICAgICAgICAg ICAgICAgTUNfTVVMVElCWVRFX0JZVEVTX1dJRFRIIChwdHIsIGRwLCBieXRlcywgd2lkdGgpOwor ICAgICAgICAgICAgICAgICAgLyogU3VidHJhY3Qgb25lIHRvIGNvbXBlbnNhdGUgZm9yIHRoZSBp bmNyZW1lbnQKKyAgICAgICAgICAgICAgICAgIHRoYXQgaXMgZ29pbmcgdG8gaGFwcGVuIGJlbG93 LiAqLworICAgICAgICAgICAgICAgICAgc2Nhbl9ieXRlICs9IGJ5dGVzIC0gMTsKKyAgICAgICAg ICAgICAgICAgIGNvbCArPSB3aWR0aDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgZWxzZSBpZiAoY3RsX2Fycm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3NykpCisgICAgICAg ICAgICAgICAgICBjb2wgKz0gMjsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGMgPCAwNDAg fHwgYyA+PSAwMTc3KQorICAgICAgICAgICAgICAgICAgICBjb2wgKz0gNDsKKyAgICAgICAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIGNvbCsrOworICAgICAgICAgIH0K KyAgICAgIHNjYW4rKzsKKyAgICAgIHNjYW5fYnl0ZSsrOworICAgIH0KKyBlbmRsb29wOgorICBs YXN0X2tub3duX2NvbHVtbiA9IGNvbDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fcG9pbnQgPSBwdDsK KyAgbGFzdF9rbm93bl9jb2x1bW5fbW9kaWZpZWQgPSBNT0RJRkY7CisgIGlmIChnb2FsY29sKQor ICAgICpnb2FsY29sID0gY29sOworICBpZiAoZW5kcG9zKQorICAgICplbmRwb3MgPSBzY2FuOwor ICBpZiAocHJldmNvbCkKKyAgICAqcHJldmNvbCA9IHByZXZfY29sOworfQorCitw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9pbnRlciBmb3IgZGVjcmVtZW50aW5nIHRocm91Z2ggdGhlIGNoYXJzIGJlZm9yZSBwb2ludC4g Ki8KKyAgcHRyID0gQllURV9QT1NfQUREUiAoQ0hBUl9UT19CWVRFIChwdCkgLSAxKSArIDE7Cisg IC8qIE1ha2UgYSBwb2ludGVyIHRvIHdoZXJlIGNvbnNlY3V0aXZlIGNoYXJzIGxlYXZlIG9mZiwK KyAgICAgZ29pbmcgYmFja3dhcmRzIGZyb20gcG9pbnQuICovCisgIGlmIChwdCA9PSBCRUdWKQor ICAgIHN0b3AgPSBwdHI7CisgICAgZWxzZSBpZiAocHQgPD0gR1BUIHx8IEJFR1YgPiBHUFQpCisg ICAgICBzdG9wID0gQkVHVl9BRERSOworICAgICAgZWxzZQorICAgICAgICBzdG9wID0gR0FQX0VO RF9BRERSOworICBjb2wgPSAwLCB0YWJfc2VlbiA9IDAsIHBvc3RfdGFiID0gMDsKKyAgd2hpbGUg KDEpCisgICAgeworICAgICAgcHRyZGlmZl90IGksIG47CisgICAgICBMaXNwX09iamVjdCBjaGFy dmVjOworICAgICAgaWYgKHB0ciA9PSBzdG9wKQorICAgICAgICB7CisgICAgICAgICAgLyogV2Ug c3RvcHBlZCBlaXRoZXIgZm9yIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGJ1ZmZlcgorICAgICAgICAg ICAgIG9yIGZvciB0aGUgZ2FwLiAqLworICAgICAgICAgIGlmIChwdHIgPT0gQkVHVl9BRERSKQor ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgLyogSXQgd2FzIHRoZSBnYXAuICBKdW1wIGJh Y2sgb3ZlciBpdC4gKi8KKyAgICAgICAgICBzdG9wID0gQkVHVl9BRERSOworICAgICAgICAgIHB0 ciA9IEdQVF9BRERSOworICAgICAgICAgIC8qIENoZWNrIHdoZXRoZXIgdGhhdCBicmluZ3MgdXMg dG8gYmVnaW5uaW5nIG9mIGJ1ZmZlci4gKi8KKyAgICAgICAgICBpZiAoQkVHViA+PSBHUFQpCisg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgYyA9ICotLXB0cjsKKyAgICAgIGlm IChkcCAmJiBWRUNUT1JQIChESVNQX0NIQVJfVkVDVE9SIChkcCwgYykpKQorICAgICAgICB7Cisg ICAgICAgICAgY2hhcnZlYyA9IERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKTsKKyAgICAgICAgICBu ID0gQVNJWkUgKGNoYXJ2ZWMpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7 CisgICAgICAgICAgICBjaGFydmVjID0gUW5pbDsKKyAgICAgICAgICAgIG4gPSAxOworICAgICAg ICAgIH0KKyAgICAgIGZvciAoaSA9IG4gLSAxOyBpID49IDA7IC0taSkKKyAgICAgICAgeworICAg ICAgICAgIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgLyogVGhpcyBzaG91bGQgYmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAgICAgICAgICBuZXh0 X2VsZW1lbnRfZnJvbV9kaXNwbGF5X3ZlY3RvciBkb2VzIGl0LiAqLworICAgICAgICAgICAgICBM aXNwX09iamVjdCBlbnRyeSA9IEFSRUYgKGNoYXJ2ZWMsIGkpOworICAgICAgICAgICAgICBpZiAo R0xZUEhfQ09ERV9QIChlbnRyeSkpCisgICAgICAgICAgICAgICAgYyA9IEdMWVBIX0NPREVfQ0hB UiAoZW50cnkpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGMgPSAn ICc7CisgICAgICAgICAgICB9CisgICAgICAgICAgaWYgKGMgPj0gMDQwICYmIGMgPCAwMTc3KQor ICAgICAgICAgICAgY29sKys7CisgICAgICAgICAgICBlbHNlIGlmIChjID09ICdcbicKKyAgICAg ICAgICAgICAgICAgICAgIHx8IChjID09ICdccicKKyAgICAgICAgICAgICAgICAgICAgICAgICAm JiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKSkKKyAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHB0cisrOworICAgICAgICAgICAgICAgIGdv dG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBl bHNlIGlmIChjID09ICdcdCcpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg aWYgKHRhYl9zZWVuKQorICAgICAgICAgICAgICAgICAgICBjb2wgPSAoKGNvbCArIHRhYl93aWR0 aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICAgICAgICAgICAgcG9zdF90YWIg Kz0gY29sOworICAgICAgICAgICAgICAgICAgY29sID0gMDsKKyAgICAgICAgICAgICAgICAgIHRh Yl9zZWVuID0gMTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAo VkVDVE9SUCAoY2hhcnZlYykpCisgICAgICAgICAgICAgICAgICAvKiBXaXRoIGEgZGlzcGxheSB0 YWJsZSBlbnRyeSwgQyBpcyBkaXNwbGF5ZWQgYXMgaXMsIGFuZAorICAgICAgICAgICAgICAgICAg ICAgbm90IGRpc3BsYXllZCBhcyBcTk5OIG9yIGFzIF5OLiAgSWYgQyBpcyBhIHNpbmdsZS1ieXRl CisgICAgICAgICAgICAgICAgICAgICBjaGFyYWN0ZXIsIGl0IHRha2VzIG9uZSBjb2x1bW4uICBJ ZiBDIGlzIG11bHRpLWJ5dGUgaW4KKyAgICAgICAgICAgICAgICAgICAgIGEgdW5pYnl0ZSBidWZm ZXIsIGl0J3MgdHJhbnNsYXRlZCB0byB1bmlieXRlLCBzbyBpdAorICAgICAgICAgICAgICAgICAg ICAgYWxzbyB0YWtlcyBvbmUgY29sdW1uLiAqLworICAgICAgICAgICAgICAgICAgKytjb2w7Cisg ICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIGNvbC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NfQ0FDSEVdID09IDAKKyAgICAgICYmIE5JTFAgKEJW QVIgKFhCVUZGRVIgKGl0LT53LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAo QlZBUiAoWEJVRkZFUiAoaXQtPnctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAmJiBO SUxQIChCVkFSIChYQlVGRkVSIChpdC0+dy0+Y29udGVudHMpLCBmY192aXNpYmxlKSkpCisgICAg cmV0dXJuOworICBwdHJkaWZmX3QgbGFzdF9saW5lID0gaXQtPmxudW07CisgIHB0cmRpZmZfdCBz dGFydF9mcm9tLCBieXRlcG9zOworICBwdHJkaWZmX3QgdGhpc19saW5lOworICBib29sIGZpcnN0 X3RpbWUgPSBmYWxzZTsKKyAgcHRyZGlmZl90IGJlZ19ieXRlID0gZGlzcGxheV9saW5lX251bWJl cnNfd2lkZW4gPyBCRUdfQllURSA6IEJFR1ZfQllURTsKKyAgcHRyZGlmZl90IHpfYnl0ZSA9IGRp c3BsYXlfbGluZV9udW1iZXJzX3dpZGVuID8gWl9CWVRFIDogWlZfQllURTsKKyAgdm9pZCAqaXRk YXRhID0gYmlkaV9zaGVsdmVfY2FjaGUgKCk7CisgIGlmIChFUSAoVmRpc3BsYXlfbGluZV9udW1i ZXJzLCBRdmlzdWFsKSkKKyAgICB0aGlzX2xpbmUgPSBkaXNwbGF5X2NvdW50X2xpbmVzX3Zpc3Vh bGx5IChpdCk7CisgICAgZWxzZQorICAgIHsKKyAgICAgIGlmICghbGFzdF9saW5lKQorICAgICAg ICB7CisgICAgICAgICAgLyogSWYgcG9zc2libGUsIHJldXNlIGRhdGEgY2FjaGVkIGJ5IGxpbmUt bnVtYmVyLW1vZGUuICovCisgICAgICAgICAgaWYgKGl0LT53LT5iYXNlX2xpbmVfbnVtYmVyID4g MAorICAgICAgICAgICAgICAmJiBpdC0+dy0+YmFzZV9saW5lX3BvcyA+IDAKKyAgICAgICAgICAg ICAgJiYgaXQtPnctPmJhc2VfbGluZV9wb3MgPD0gSVRfQ0hBUlBPUyAoKml0KQorICAgICAgICAg ICAgICAvKiBsaW5lLW51bWJlci1tb2RlIGFsd2F5cyBkaXNwbGF5cyBuYXJyb3dlZCBsaW5lCisg ICAgICAgICAgICAgIG51bWJlcnMsIHNvIHdlIGNhbm5vdCB1c2UgaXRzIGRhdGEgaWYgdGhlIHVz ZXIgd2FudHMKKyAgICAgICAgICAgICAgbGluZSBudW1iZXJzIHRoYXQgZGlzcmVnYXJkIG5hcnJv d2luZywgb3IgaWYgdGhlCisgICAgICAgICAgICAgIGJ1ZmZlcidzIG5hcnJvd2luZyBoYXMganVz dCBjaGFuZ2VkLiAqLworICAgICAgICAgICAgICAmJiAhKGRpc3BsYXlfbGluZV9udW1iZXJzX3dp ZGVuCisgICAgICAgICAgICAgICAgICAgJiYgKEJFR19CWVRFICE9IEJFR1ZfQllURSB8fCBaX0JZ VEUgIT0gWlZfQllURSkpCisgICAgICAgICAgICAgICYmICFjdXJyZW50X2J1ZmZlci0+Y2xpcF9j aGFuZ2VkKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBzdGFydF9mcm9tID0gQ0hBUl9U T19CWVRFIChpdC0+dy0+YmFzZV9saW5lX3Bvcyk7CisgICAgICAgICAgICAgIGxhc3RfbGluZSA9 IGl0LT53LT5iYXNlX2xpbmVfbnVtYmVyIC0gMTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgc3RhcnRfZnJvbSA9IGJlZ19ieXRlOworICAgICAgICAgIGlm ICghaXQtPmxudW1fYnl0ZXBvcykKKyAgICAgICAgICAgIGZpcnN0X3RpbWUgPSB0cnVlOworICAg ICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBzdGFydF9mcm9tID0gaXQtPmxudW1fYnl0 ZXBvczsKKyAgICAgIC8qIFBhcmFub2lhOiB3aGF0IGlmIHNvbWVvbmUgY2hhbmdlcyB0aGUgbmFy cm93aW5nIHNpbmNlIHRoZQorICAgICAgbGFzdCB0aW1lIGRpc3BsYXlfbGluZSB3YXMgY2FsbGVk PyAgU2hvdWxkbid0IHJlYWxseSBoYXBwZW4sCisgICAgICBidXQgd2hvIGtub3dzIHdoYXQgc29t ZSBjcmF6eSBMaXNwIGludm9rZWQgYnkgOmV2YWwgY291bGQgZG8/ICAqLworICAgICAgaWYgKCEo YmVnX2J5dGUgPD0gc3RhcnRfZnJvbSAmJiBzdGFydF9mcm9tIDw9IHpfYnl0ZSkpCisgICAgICAg IHsKKyAgICAgICAgICBsYXN0X2xpbmUgPSAwOworICAgICAgICAgIHN0YXJ0X2Zyb20gPSBiZWdf Ynl0ZTsKKyAgICAgICAgfQorICAgICAgdGhpc19saW5lID0gbGFzdF9saW5lICsgZGlzcGxheV9j b3VudF9saW5lc19sb2dpY2FsbHkgKHN0YXJ0X2Zyb20sCisgICAgICAgICAgICAgICAgICAgSVRf QllURVBPUyAoKml0KSwgSVRfQ0hBUlBPUyAoKml0KSwgJmJ5dGVwb3MpOworICAgICAgZWFzc2Vy dCAodGhpc19saW5lID4gMCB8fCAodGhpc19saW5lID09IDAgJiYgc3RhcnRfZnJvbSA9PSBiZWdf Ynl0ZSkpOworICAgICAgZWFzc2VydCAoYnl0ZXBvcyA9PSBJVF9CWVRFUE9TICgqaXQpKTsKKyAg ICB9CisgIC8qIFJlY29yZCB0aGUgbGluZSBudW1iZXIgaW5mb3JtYXRpb24uICovCisgIGlmICh0 aGlzX2xpbmUgIT0gbGFzdF9saW5lIHx8ICFpdC0+bG51bV9ieXRlcG9zKQorICAgIHsKKyAgICAg IGl0LT5sbnVtID0gdGhpc19saW5lOworICAgICAgaXQtPmxudW1fYnl0ZXBvcyA9IElUX0JZVEVQ T1MgKCppdCk7CisgICAgfQorICBiaWRpX3Vuc2hlbHZlX2NhY2hlIChpdGRhdGEsIGZhbHNlKTsK K30KKworLyogVVNBR0U6ICBmcHJpbnRmIChzdGRlcnIsICJGUkFNRSAoJXMpIiwgbWNfZnJhbWUg KGYpKTsgKi8KK2NoYXIgKgorbWNfZnJhbWUgKHN0cnVjdCBmcmFtZSAqZikKK3sKKyAgTGlzcF9P YmplY3QgZnJhbWU7CisgIFhTRVRGUkFNRSAoZnJhbWUsIGYpOworICByZXR1cm4gU1NEQVRBIChG cHJpbjFfdG9fc3RyaW5nIChmcmFtZSwgUW5pbCkpOworfQorCisvKiBVU0FHRTogIGZwcmludGYg KHN0ZGVyciwgIldJTkRPVyAoJXMpIiwgbWNfd2luZG93ICh3KSk7ICovCitjaGFyICoKK21jX3dp bmRvdyAoc3RydWN0IHdpbmRvdyAqdykKK3sKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VU V0lORE9XICh3aW5kb3csIHcpOworICByZXR1cm4gU1NEQVRBIChGcHJpbjFfdG9fc3RyaW5nICh3 aW5kb3csIFFuaWwpKTsKK30KKworLyogVVNBR0U6ICBmcHJpbnRmIChzdGRlcnIsICJDSEFSQUNU RVIgKCVzKSIsIG1jX2NoYXJfdG9fc3RyaW5nIChnbHlwaC0+dS5jaCkpOyAqLworY2hhciAqCitt Y19jaGFyX3RvX3N0cmluZyAoaW50IGFyZykKK3sKKyAgTGlzcF9PYmplY3QgY2hhcmFjdGVyID0g KDAgPD0gYXJnICYmIGFyZyA8PSBNQVhfQ0hBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gRmNoYXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51bSAoYXJnKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogUW5pbDsKKyAgY2hhciAqIHJlc3VsdCA9ICghTklMUCAoY2hhcmFjdGVyKQor ICAgICAgICAgICAgICAgICAgICYmIGFyZyA9PSA5KQorICAgICAgICAgICAgICAgICAgICA/ICJc XHQiCisgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAg ICAgICAgICAgJiYgYXJnID09IDEwKQorICAgICAgICAgICAgICAgICAgICA/ICJcXG4iCisgICAg ICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAg JiYgYXJnID09IDMyKQorICAgICAgICAgICAgICAgICAgICA/ICJcXHMiCisgICAgICAgICAgICAg ICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgJiYgYXJnICE9 IDkKKyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyAhPSAxMAorICAgICAgICAgICAgICAgICAg ICAgJiYgYXJnICE9IDMyKQorICAgICAgICAgICAgICAgICAgICA/IFNTREFUQSAoY2hhcmFjdGVy KQorICAgICAgICAgICAgICAgICAgOiAiXFw/IjsKKyAgcmV0dXJuIHJlc3VsdDsKK30KKworaW50 CittY19saXNwX3RvX2N1cnNvcl90eXBlIChMaXNwX09iamVjdCBhcmcpCit7CisgIGNoYXIgKnN0 cjsKKyAgaWYgKFhUWVBFIChhcmcpID09IExpc3BfU3RyaW5nKQorICAgIHN0ciA9IFNTREFUQSAo YXJnKTsKKyAgICBlbHNlIGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N5bWJvbCkKKyAgICAgIHN0 ciA9IFNTREFUQSAoU1lNQk9MX05BTUUgKGFyZykpOworICAgICAgZWxzZSByZXR1cm4gLTE7Cisg IGlmICghc3RyY21wIChzdHIsICJubyIpKQorICAgIHJldHVybiBNQ19OT19DVVJTT1I7CisgIGlm ICghc3RyY21wIChzdHIsICJtYy1sZWZ0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTUNf TEVGVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAibWMtcmlnaHQtZnJpbmdl LWJpdG1hcCIpKQorICAgIHJldHVybiBNQ19SSUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0 cmNtcCAoc3RyLCAiYm94IikpCisgICAgcmV0dXJuIE1DX0ZJTExFRF9CT1g7CisgIGlmICghc3Ry Y21wIChzdHIsICJmc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g ICBjYXNlIEVYUE9TRV9BUkVBX1RXTzogcmV0dXJuICJFWFBPU0VfQVJFQV9UV08iOworICAgICAg Y2FzZSBFWFBPU0VfTElORTogcmV0dXJuICJFWFBPU0VfTElORSI7CisgICAgICBkZWZhdWx0Ogor ICAgICAgcmV0dXJuICJVTktOT1dOIjsKKyAgICB9Cit9CisKK3ZvaWQKK21jX2NhY2hlX2luc3Bl Y3RvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IG1jX21hdHJpeCBtYXRyaXgpCit7CisgIGlu dCB2cG9zX2FsbG9jYXRlZCA9IHctPm1jX21hdHJpeC52cG9zX2FsbG9jYXRlZDsKKyAgaW50IHZw b3NfdXNlZCA9IHctPm1jX21hdHJpeC52cG9zX3VzZWQ7CisgIGZwcmludGYgKHN0ZGVyciwgIiVz OiAgbWF0cml4LnZwb3NfYWxsb2NhdGVkICglZCkgfCBtYXRyaXgudnBvc191c2VkICglZClcbiIs CisgICAgICAgICAgICAgICAgICAgbWNfd2luZG93ICh3KSwgdnBvc19hbGxvY2F0ZWQsIHZwb3Nf dXNlZCk7CisgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsK KyAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQorICAg IHsKKyAgICAgIGludCBjdXJzb3JzX3VzZWQgPSB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2Nh Y2hlX3R5cGVdOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICBtYXRyaXguY3Vyc29yc191c2Vk WyVzXSAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3RvX3N0 cmluZyAoY2FjaGVfdHlwZSksIGN1cnNvcnNfdXNlZCk7CisgICAgfQorICBmb3IgKGludCB2bnRo ID0gMDsKKyAgICAgICB2bnRoIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZDsKKyAgICAgICArK3Zu dGgpCisgICAgeworICAgICAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1D X0NBQ0hFOworICAgICAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgICAgICsr Y2FjaGVfdHlwZSkKKyAgICAgICAgeworICAgICAgICAgIGludCBjYWNoZV9hbGxvY2F0ZWQgPSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV07CisgICAg ICAgICAgaW50IGNhY2hlX3VzZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2Vk W2NhY2hlX3R5cGVdOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgICB2bnRoICglZCkg fCBjYWNoZV9hbGxvY2F0ZWRbJXNdICglZCkgfCBjYWNoZV91c2VkWyVzXSAoJWQpXG4iLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgdm50aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IG1jX2NhY2hlX3R5cGVfdG9fc3RyaW5nIChjYWNoZV90eXBlKSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIGNhY2hlX2FsbG9jYXRlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIG1j X2NhY2hlX3R5cGVfdG9fc3RyaW5nIChjYWNoZV90eXBlKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIGNhY2hlX3VzZWQpOworICAgICAgICB9CisgICAgfQorfQorCit2b2lkCittY19zZXRf bHNsX2JnIChzdHJ1Y3Qgd2luZG93ICp3LCBlbnVtIGZhY2VfaWQgZmFjZV9pZCwgc3RydWN0IG1j X1JHQiAqbHNsKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAg c3RydWN0IGZhY2UgKmZhY2U7CisgIGlmICghTklMUCAoVmZhY2Vfcm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ZW50aWFscy0+enZfYnl0ZSA9IFpWX0JZVEU7CisgIGVzc2VudGlhbHMt PmZjX3ggPSAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChW ZGlzcGxheV9saW5lX251bWJlcnMpKQorICAgICAgICAgICAgICAgICAgICAgICA/IChmaWxsX2Nv bCAqIGZyYW1lX2NoYXJfd2lkdGgpICsgdy0+bWMubG51bV9waXhlbF93aWR0aCAtIGhzY2xfeAor ICAgICAgICAgICAgICAgICAgICAgOiAoZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAg ICAgICAgJiYgTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgPyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoKSAtIGhzY2xfeAorICAgICAgICAg ICAgICAgICAgICAgOiAwOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVy bmFsIChvbGRfYnVmZmVyKTsKKyAgZW51bSBmYWNlX2lkIGZpbGxfY29sdW1uX3ByZV96dl9mYWNl X2lkID0KKyAgICAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChY QlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAmJiBOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICAgID8gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXByZS16di1mYWNlIiks IHRydWUpCisgICAgOiAoIWVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYgIU5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAg JiYgIU5JTFAgKEJWQVIgKF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TFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfaW5hY3RpdmVfd2luZG93cykpCisg ICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQor ICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiZmMtaW5hY3RpdmUtYXQt enYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAgICYm ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2luYWN0aXZlX3dpbmRvd3Mp KQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFp cnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAg ICAgJiYgdy0+Y3Vyc29yLnggPT0gZXNzZW50aWFscy0+ZmNfeCkKKyAgICAgID8gbG9va3VwX25h bWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLW9wb2ludC1pbmFjdGl2ZS1hdC16di1mYWNlIiks IHRydWUpCisgICAgOiAoZXNzZW50aWFscy0+YWN0aXZlX3AKKyAgICAgICAmJiAhTklMUCAoQlZB UiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAmJiAhTklMUCAo QlZBUiAoYiwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICYmIHctPmN1cnNvci54ID09IGVz c2VudGlhbHMtPmZjX3gpCisgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCJmYy1vcG9pbnQtYXQtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3Rp dmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250Z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wCisgICAgICAgJiYgIU5JTFAgKEJWQVIg KFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgJiYgIU5JTFAgKEJW QVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3Nl bnRpYWxzLT5mY194KQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgi ZmMtb3BvaW50LXBvc3QtenYtZmFjZSIpLCB0cnVlKQorICAgIDogKCFlc3NlbnRpYWxzLT5hY3Rp dmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX2lu YWN0aXZlX3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNh bF9ydWxlcikpCisgICAgICAgJiYgdy0+Y3Vyc29yLnggIT0gZXNzZW50aWFscy0+ZmNfeCkKKyAg ICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoImZjLWluYWN0aXZlLXBvc3Qt enYtZmFjZSIpLCB0cnVlKQorICAgIDogKGVzc2VudGlhbHMtPmFjdGl2ZV9wCisgICAgICAgJiYg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAg JiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAmJiB3LT5jdXJz b3IueCAhPSBlc3NlbnRpYWxzLT5mY194KQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywg ZiwgaW50ZXJuICgiZmMtcG9zdC16di1mYWNlIiksIHRydWUpCisgICAgOiBsb29rdXBfbmFtZWRf ZmFjZSAodywgZiwg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LCBiZXlvbmRfZmlsbF9jb2xvciwgJmJleW9u ZF9maWxsX2ZvcmVncm91bmQpOworICAgICAgLyogcmVkICovCisgICAgICBpZiAoKCFmaWxsX2Nv bHVtbl9wCisgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiAhPSAwCisgICAgICAgICAgICYm IHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgfHwgKGZpbGxfY29sdW1uX3AKKyAg ICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgJSAyICE9IDAKKyAgICAgICAgICAgICAgJiYgY3Vy cmVudF9jb2wgPD0gZmlsbF9jb2wKKyAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBS RV9aVikpCisgICAgICAgIHsKKyAgICAgICAgICBsc2xfZmctPnJlZCA9IG9kZF9mb3JlZ3JvdW5k LnJlZDsKKyAgICAgICAgICBsc2xfZmctPmdyZWVuID0gb2RkX2ZvcmVncm91bmQuZ3JlZW47Cisg ICAgICAgICAgbHNsX2ZnLT5ibHVlID0gb2RkX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgfQor ICAgICAgICAvKiB5ZWxsb3cgKi8KKyAgICAgICAgZWxzZSBpZiAoKCFmaWxsX2NvbHVtbl9wCisg ICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAg ICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikKKyAgICAgICAgICAgICAgICAgfHwgKGZpbGxf Y29sdW1uX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiA9PSAwCisg ICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbAorICAgICAgICAg ICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVikpCisgICAgICAgICAgeworICAg ICAgICAgICAgbHNsX2ZnLT5yZWQgPSBldmVuX2ZvcmVncm91bmQucmVkOworICAgICAgICAgICAg bHNsX2ZnLT5ncmVlbiA9IGV2ZW5fZm9yZWdyb3VuZC5ncmVlbjsKKyAgICAgICAgICAgIGxzbF9m Zy0+Ymx1ZSA9IGV2ZW5fZm9yZWdyb3VuZC5ibHVlOworICAgICAgICAgIH0KKyAgICAgICAgICAv KiBncmVlbiAqLworICAgICAgICAgIGVsc2UgaWYgKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAg ICAgICAgICAmJiBjdXJyZW50X2NvbCA+IGZpbGxfY29sCisgICAgICAgICAgICAgICAgICAgJiYg cm93X3Bvc2l0aW9uID09IFBSRV9aVikKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbHNs X2ZnLT5yZWQgPSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLnJlZDsKKyAgICAgICAgICAgICAgbHNs X2ZnLT5ncmVlbiA9IGJleW9uZF9maWxsX2ZvcmVncm91bmQuZ3JlZW47CisgICAgICAgICAgICAg IGxzbF9mZy0+Ymx1ZSA9IGJleW9uZF9maWxsX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICAgIGVsc2UgaWYgKHJvd19wb3NpdGlvbiA9PSBBVF9aVikKKyAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXNzZW50aWFscy5zcF9mZy5y ZWQ7CisgICAgICAgICAgICAgICAgbHNsX2ZnLT5ncmVlbiA9IGVzc2VudGlhbHMuc3BfZmcuZ3Jl ZW47CisgICAgICAgICAgICAgICAgbHNsX2ZnLT5ibHVlID0gZXNzZW50aWFscy5zcF9mZy5ibHVl OworICAgICAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBIT1JJWk9O VEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmIChnbHlwaCAhPSBOVUxMCisgICAgICAgICAgJiYg Z2x5cGgtPnUuY2ggPT0gOTUKKyAgICAgICAgICAmJ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CisgICAgICAgIDogKGVzc2VudGlh bHMuYWN0aXZlX3AKKyAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pWKQorICAgICAg ICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNv ci1hdC16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYs IGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1hdC16di1mYWNlIiksIHRydWUpOworICAgICAg c3RydWN0IGZhY2UgKmN1cnNvcl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBjdXJzb3JfZmFjZV9p ZCk7CisgICAgICBMaXNwX09iamVjdCBjdXJzb3JfY29sb3IgPSBjdXJzb3JfZmFjZS0+bGZhY2Vb TEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIGN1 cnNvcl9jb2xvciwgbHNsX2ZnKTsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgfQorfQorCisvKiBE cmF3IGdseXBocyBiZXR3ZWVuIFNUQVJUIGFuZCBFTkQgaW4gQVJFQSBvZiBST1cgb24gd2luZG93 IFcsCisgICBzdGFydGluZyBhdCB4LXBvc2l0aW9uIFguICBYIGlzIHJlbGF0aXZlIHRvIEFSRUEg aW4gVy4gIEhMIGlzIGEKKyAgIGZhY2Utb3ZlcnJpZGUgd2l0aCB0aGUgZm9sbG93aW5nIG1lYW5p bmc6CisgICAtICBEUkFXX05PUk1BTF9URVhUICBkcmF3IG5vcm1hbGx5CisgICAtICBEUkFXX0NV UlNPUiAgICBkcmF3IGluIGN1cnNvciBmYWNlCisgICAtICBEUkFXX01PVVNFX0ZBQ0UgIGRyYXcg aW4gbW91c2UgZmFjZS4KKyAgIC0gIERSQVdfSU5WRVJTRV9WSURFTyAgZHJhdyBpbiBtb2RlIGxp bmUgZmFjZQorICAgLSAgRFJBV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NFX0hMX0lORk8gKGYpOworICAgICAgaW50 IG1vdXNlX2JlZ19jb2wgVU5JTklULCBtb3VzZV9lbmRfY29sIFVOSU5JVDsKKyAgICAgIGJvb2wg Y2hlY2tfbW91c2VfZmFjZSA9IGZhbHNlOworICAgICAgaW50IGR1bW15X3ggPSAwOworICAgICAg LyogSWYgbW91c2UgaGlnaGxpZ2h0aW5nIGlzIG9uLCB3ZSBtYXkgbmVlZCB0byBkcmF3IGFkamFj ZW50CisgICBnbHlwaHMgdXNpbmcgbW91c2UtZmFjZSBoaWdobGlnaHRpbmcuICovCisgICAgICBp ZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgcm93LT5tb3VzZV9mYWNlX3AKKyAgICAgICAgICAmJiBo bGluZm8tPm1vdXNlX2ZhY2VfYmVnX3JvdyA+PSAwCisgICAgICAgICAgJiYgaGxpbmZvLT5tb3Vz ZV9mYWNlX2VuZF9yb3cgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIHB0cmRpZmZfdCByb3df dnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3LT5jdXJyZW50X21hdHJpeCk7CisgICAgICAg ICAgaWYgKHJvd192cG9zID49IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfcm93CisgICAgICAgICAg ICAgICYmIHJvd192cG9zIDw9IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93KQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBjaGVja19tb3VzZV9mYWNlID0gdHJ1ZTsKKyAgICAgICAgICAg ICAgbW91c2VfYmVnX2NvbCA9IChyb3dfdnBvcyA9PSBobGluZm8tPm1vdXNlX2ZhY2VfYmVnX3Jv dykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaGxpbmZvLT5tb3VzZV9mYWNlX2Jl Z19jb2wKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgICAgICAgICAgICAg bW91c2VfZW5kX2NvbCA9IChyb3dfdnBvcyA9PS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AgICAg ICAgIGN1cnNvcnMgdGhhdCBhcmUgYGxlZnRfb3ZlcndyaXR0ZW4nLiAqLworICAgICAgICAgIGxl bmd0aCA9IDA7CisgICAgICAgICAgZm9yIChzID0gaDsgczsgcyA9IHMtPm5leHQpCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIHMtPmxlZnRfb3ZlcndyaXR0ZW5fcCA9IHRydWU7CisgICAg ICAgICAgICAgIHMtPmFjdGlvbl90eXBlID0gYWN0aW9uX3R5cGU7CisgICAgICAgICAgICAgIGxl bmd0aCArPSBzLT5maXJzdF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAg ICAgICAgcmVsYXRpdmVfeCA9IHN0YXJ0X3ggLSBsZW5ndGg7CisgICAgICAgICAgZm9yIChzID0g aDsgczsgcyA9IHMtPm5leHQpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPmZpcnN0 X2dseXBoLT5yZWxhdGl2ZV94ID0gcmVsYXRpdmVfeDsKKyAgICAgICAgICAgICAgcmVsYXRpdmVf eCArPSBzLT5maXJzdF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAg ICAgc3RhcnQgPSBpOworICAgICAgICAgIGNvbXB1dGVfb3ZlcmhhbmdzX2FuZF94ICh0LCBoZWFk LT54LCB0cnVlKTsKKyAgICAgICAgICBwcmVwZW5kX2dseXBoX3N0cmluZ19saXN0cyAoJmhlYWQs ICZ0YWlsLCBoLCB0KTsKKyAgICAgICAgICBpZiAoY2xpcF9oZWFkID09IE5VTEwpCisgICAgICAg ICAgICBjbGlwX2hlYWQgPSBoZWFkOworICAgICAgICB9CisgICAgICAvKiBQcmVwZW5kIGdseXBo IHN0cmluZ3MgZm9yIGdseXBocyBpbiBmcm9udCBvZiB0aGUgZmlyc3QgZ2x5cGgKKyAgICAgIHN0 cmluZyB0aGF0IG92ZXJ3cml0ZSB0aGF0IGdseXBoIHN0cmluZyBiZWNhdXNlIG9mIHRoZWlyCisg ICAgICByaWdodCBvdmVyaGFuZy4gIEZvciB0aGVzZSBzdHJpbmdzLCBvbmx5IHRoZSBmb3JlZ3Jv dW5kIG11c3QKKyAgICAgIGJlIGRyYXduLCBiZWNhdXNlIGl0IGRyYXdzIG92ZXIgdGhlIGdseXBo IHN0cmluZyBhdCBgaGVhZCcuCisgICAgICBUaGUgYmFja2dyb3VuZCBtdXN0IG5vdCBiZSBkcmF3 biBiZWNhdXNlIHRoaXMgd291bGQgb3ZlcndyaXRlCisgICAgICByaWdodCBvdmVyaGFuZ3Mgb2Yg cHJlY2VkaW5nIGdseXBocyBmb3Igd2hpY2ggbm8gZ2x5cGgKKyAgICAgIHN0cmluZ3MgZXhpc3Qu ICovCisgICAgICBpID0gbGVmdF9vdmVyd3JpdGluZyAoaGVhZCk7CisgICAgICBpZiAoaSA+PSAw KQorICAgICAgICB7CisgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIG92ZXJsYXBfaGw7 CisgICAgICAgICAgaWYgKGNoZWNrX21vdXNlX2ZhY2UKKyAgICAgICAgICAgICAgJiYgbW91c2Vf YmVnX2NvbCA8IHN0YXJ0ICYmIG1vdXNlX2VuZF9jb2wgPiBpKQorICAgICAgICAgICAgb3Zlcmxh cF9obCA9IERSQVdfTU9VU0VfRkFDRTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAg b3ZlcmxhcF9obCA9IERSQVdfTk9STUFMX1RFWFQ7CisgICAgICAgICAgaWYgKGhsID09IG92ZXJs YXBfaGwgfHwgY2xpcF9oZWFkID09IE5VTEwpCisgICAgICAgICAgICBjbGlwX2hlYWQgPSBoZWFk OworICAgICAgICAgIE1DX0JVSUxEX0dMWVBIX1NUUklOR1MgKGksIHN0YXJ0LCBoLCB0LCBvdmVy bGFwX2hsLCBkdW1teV94LCBsYXN0X3gpOworICAgICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBz LT5uZXh0KQorICAgICAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRydWU7CisgICAg ICAgICAgY29tcHV0ZV9vdmVyaGFuZ3NfYW5kX3ggKHQsIGhlYWQtPngsIHRydWUpOworICAgICAg ICAgIHByZXBlbmRfZ2x5cGhfc3RyaW5nX2xpc3RzICgmaGVhZCwgJnRhaWwsIGgsIHQpOworICAg ICAgICB9CisgICAgICAvKiBBcHBlbmQgZ2x5cGhzIHN0cmluZ3MgZm9yIGdseXBocyBmb2xsb3dp bmcgdGhlIGxhc3QgZ2x5cGgKKyAgICAgIHN0cmluZyB0YWlsIHRoYXQgYXJlIG92ZXJ3cml0dGVu IGJ5IHRhaWwuICBUaGUgYmFja2dyb3VuZCBvZgorICAgICAgdGhlc2Ugc3RyaW5ncyBoYXMgdG8g YmUgZHJhd24gYmVjYXVzZSB0YWlsJ3MgZm9yZWdyb3VuZCBkcmF3cworICAgICAgb3ZlciBpdC4g Ki8KKyAgICAgIGkgPSByaWdodF9vdmVyd3JpdHRlbiAodGFpbCk7CisgICAgICBpZiAoaSA+PSAw KQorICAgICAgICB7CisgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIG92ZXJsYXBfaGw7 CisgICAgICAgICAgaWYgKGNoZWNrX21vdXNlX2ZhY2UKKyAgICAgICAgICAgICAgJiYgbW91c2Vf YmVnX2NvbCA8IGkgJiYgbW91c2VfZW5kX2NvbCA+IGVuZCkKKyAgICAgICAgICAgIG92ZXJsYXBf aGwgPSBEUkFXX01PVVNFX0ZBQ0U7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIG92 ZXJsYXBfaGwgPSBEUkFXX05PUk1BTF9URVhUOworICAgICAgICAgIGlmIChobCAhPSBvdmVybGFw X2hsKQorICAgICAgICAgICAgY2xpcF90YWlsID0gdGFpbDsKKyAgICAgICAgICBNQ19CVUlMRF9H TFlQSF9TVFJJTkdTIChlbmQsIGksIGgsIHQsIG92ZXJsYXBfaGwsIHgsIGxhc3RfeCk7CisgICAg ICAgI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ZCkKKyAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01PVVNFX0ZBQ0U7CisgICAg ICAgICAgICBlbHNlCisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX05PUk1BTF9URVhU OworICAgICAgICAgIGlmIChobCA9PSBvdmVybGFwX2hsIHx8IGNsaXBfdGFpbCA9PSBOVUxMKQor ICAgICAgICAgICAgY2xpcF90YWlsID0gdGFpbDsKKyAgICAgICAgICBpKys7ICAgICAgLyogV2Ug bXVzdCBpbmNsdWRlIHRoZSBJdGggZ2x5cGguICovCisgICAgICAgICAgTUNfQlVJTERfR0xZUEhf U1RSSU5HUyAoZW5kLCBpLCBoLCB0LCBvdmVybGFwX2hsLCB4LCBsYXN0X3gpOworICAgICAgICAg IGZvciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgICAgcy0+YmFja2dyb3VuZF9m aWxsZWRfcCA9IHRydWU7CisgICAgICAgICAgY29tcHV0ZV9vdmVyaGFuZ3NfYW5kX3ggKGgsIHRh aWwtPnggKyB0YWlsLT53aWR0aCwgZmFsc2UpOworICAgICAgICAgIGFwcGVuZF9nbHlwaF9zdHJp bmdfbGlzdHMgKCZoZWFkLCAmdGFpbCwgaCwgdCk7CisgICAgICAgIH0KKyAgICAgIHRhaWwgPSBn bHlwaF9zdHJpbmdfY29udGFpbmluZ19iYWNrZ3JvdW5kX3dpZHRoICh0YWlsKTsKKyAgICAgIGlm IChjbGlwX3RhaWwpCisgICAgICAgIGNsaXBfdGFpbCA9IGdseXBoX3N0cmluZ19jb250YWluaW5n X2JhY2tncm91bmRfd2lkdGggKGNsaXBfdGFpbCk7CisgICAgICBpZiAoY2xpcF9oZWFkIHx8IGNs aXBfdGFpbCkKKyAgICAgICAgZm9yIChzID0gaGVhZDsgczsgcyA9IHMtPm5leHQpCisgICAgICAg ICAgeworICAgICAgICAgICAgcy0+Y2xpcF9oZWFkID0gY2xpcF9oZWFkOworICAgICAgICAgICAg c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U7CisgIC8qIE1h eWJlIGNsZWFyIHRoZSBkaXNwbGF5IHVuZGVyIHRoZSBjdXJzb3IuICovCisgIGlmIChjdXJzb3Jf dHlwZSA9PSBNQ19IT0xMT1dfQk9YCisgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURf Qk9YKQorICAgIHsKKyAgICAgIGludCB0ZW1wX3ggPSB4OworICAgICAgaW50IGhlYWRlcl9saW5l X2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAgICAgY3Vyc29yX2ds eXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhwb3MsIHZwb3MpOwor ICAgICAgaWYgKGN1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgICAgICB7CisgICAgICAgICAgaWYg KGRlYnVnX3ApCisgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY19lcmFzZV9jdXJzb3I6 ICByZXR1cm4gKCVkKVxuIiwgNyk7CisgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CisgICAg ICBpbnQgdGVtcF93ZCA9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICBpZiAodGVt cF94IDwgMCkKKyAgICAgICAgeworICAgICAgICAgIHRlbXBfd2QgKz0gdGVtcF94OworICAgICAg ICAgIHRlbXBfeCA9IDA7CisgICAgICAgIH0KKyAgICAgIHRlbXBfd2QgPSBtaW4gKHdkLCB3aW5k b3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpIC0gdGVtcF94KTsKKyAgICAgIGludCBmeSA9IFdJ TkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCBtYXggKGhlYWRlcl9saW5lX2hlaWdodCwgcm93LT55 KSk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB0ZW1w X3gpOworICAgICAgaWYgKHRlbXBfd2QgPiAwKQorICAgICAgICB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1hcHMuCisgIGBkcmF3X3Jvd19mcmluZ2VfYml0bWFwcycgKHdp dGhpbiBgZXhwb3NlX2xpbmUnIGFuZCBgZHJhd193aW5kb3dfZnJpbmdlcycpCisgIGlzIHRoZSBt ZWNoYW5pc20gdGhhdCBkcmF3cyB0aGUgZnJpbmdlIGJpdG1hcHMuICovCit2b2lkCittY19kcmF3 X2VyYXNlX2h5YnJpZCAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0 cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgaW50IHgs IGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGludCBo LAorICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUs IGludCBjdXJzb3Jfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBs c2wsIGJvb2wgYWN0aXZlX3AsIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwKKyAgICAgICAg ICAgICAgICAgICAgICBib29sIHJlbW92ZV9wKQoreworICAvKiBgbWF0cml4X3JvdycgaW4gYGRp c3BuZXcuY2AgY29udGFpbnMgdGhlIGZvbGxvd2luZyB0ZXN0cywKKyAgZWFzc2VydCAobWF0cml4 ICYmIG1hdHJpeC0+cm93cyk7CisgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+ bnJvd3MpOyAqLworICBib29sIGJhcmZfY3Jhc2hfb25lID0gKG1hdHJpeCAmJiBtYXRyaXgtPnJv d3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgcmV0dXJuOwor ICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZwb3MgPj0gMCAmJiB2cG9zIDwgbWF0cml4LT5ucm93 cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICByZXR1cm47Cisg IGlmICh4IDwgMAorICAgICAgfHwgeSA8IDAKKyAgICAgIHx8IGhwb3MgPCAwCisgICAgICB8fCB2 cG9zIDwgMCkKKyAgICByZXR1cm47CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJh bWUpOworICBib29sIGF1dG9faHNjcm9sbF9tb2RlX3AgPSBFUSAoRmJ1ZmZlcl9sb2NhbF92YWx1 ZSAoUWF1dG9faHNjcm9sbF9tb2RlLCB3LT5jb250ZW50cyksIFFjdXJyZW50X2xpbmUpOworICAv KiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpICovCisgIGJvb2wgaHNjbF9hbGxfdGVtcF9wID0g KHctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGF1 dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9s bCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7 CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIG5vdGhpbmcuICovCisgIGJvb2wgaHNj bF9hbGxfcGVybV8wX3AgPSAody0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5t aW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMtdSBDLXggPCBhbmQg ZG8gc29tZXRoaW5nIGVsc2UgYmVzaWRlcyBob3Jpem9udGFsbHkgc2Nyb2xsaW5nIHRoZQorICAg ICAgICAgICAgICAgY3VycmVudCBsaW5lIGRpZmZlcmVudGx5LgorICAgICAgICAgICAgICAgQ3Vy cmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4gKi8K KyAgYm9vbCBoc2NsX2FsbF9wZXJtXzFfcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIEMt dSBDLXggPCBhbmQgLi4uCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25vdF8gaG9y aXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxsX3Blcm1f Ml9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5oc2Nyb2xsID09IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5f aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9s bCAhPSB3LT5oc2Nyb2xsKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVmdCA1KTsgYW5kLCB0 aGVuIHByZXNzIHRoZSBsZWZ0IGFycm93IGtleSBvbmUgdGltZS4KKyAgICAgICAgICAgICAgIEN1 cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4qLworICBi b29sIGhzY2xfdGVtcF9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAg ICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAm JiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xs ID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgdGhhdCBj YXVzZXMgdGhlIGN1cnJlbnQgbGluZSB0byBiZQorICAgICAgICAgICAgICAgaG9yaXpvbnRhbGx5 IHNjcm9sbGVkIGRpZmZlcmVudGx5LgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18g aG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfcGVybV9w ID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICYmIGF1 dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4g MAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAg ICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwpOworICBpbnQgZnJp bmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgIGludCBmYWNlX2lkID0gREVGQVVM VF9GQUNFX0lEOworICBpZiAoIXJlbW92ZV9wCisgICAgICAmJiBnbHlwaF9mbGF2b3IgPT0gTUNf T1ZFUkxBWV9BUlJPV19CSVRNQVAKKyAgICAgICYmICFoc2NsX2FsbF90ZW1wX3AKKyAgICAgICYm ICFoc2NsX3RlbXBfcAorICAgICAgJiYgIWhzY2xfcGVybV9wCisgICAgICAmJiAhaHNjbF9hbGxf cGVybV8wX3AKKyAgICAgICYmICFoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgJiYgIWhzY2xfYWxs X3Blcm1fMl9wKQorICAgIHsKKyAgICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2Vf aWQgPQorICAgICAgICAoIWFjdGl2ZV9wCisgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgID8gbG9va3Vw X2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWluYWN0aXZlLXBy ZS16di1mYWNlIiksIEZSSU5HRV9GQUNFX0lELCB0cnVlKQorICAgICAgICA6IChhY3RpdmVfcCkK KyAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3Zlcmxh eS1hcnJvdy1wcmUtenYtZmFjZSIpLCBGUklOR0VfRkFDRV9JRCwgdHJ1ZSkKKyAgICAgICAgOiBE RUZBVUxUX0ZBQ0VfSUQ7CisgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRf RlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAor ICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgaWYgKHctPmhzY3JvbGwg IT0gMCkKKyAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBp bnRlcm4gKCIrLW92ZXJsYXktYXJyb3ciKSwgZmFsc2UsIHRydWUpOworICAgICAgICBlbHNlCisg ICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFwICh3LCBpbnRlcm4g KCIrLW92ZXJsYXktYXJyb3ciKSwgdHJ1ZSwgdHJ1ZSk7CisgICAgICByb3ctPmxlZnRfZnJpbmdl X2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICByb3ctPmxlZnRf ZnJpbmdlX2ZhY2VfaWQgPSBmYWNlX2lkOworICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9vZmZzZXQg PSAwOworICAgICAgcm93LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxzZTsKKyAgICB9 CisgICAgZWxzZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09 IE1DX09WRVJMQVlfQVJST1dfQklUTUFQCisgICAgICAgICAgICAgJiYgKGhzY2xfYWxsX3RlbXBf cAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAgICAgICAg ICB8fCBoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJt XzJfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8 fCBoc2NsX3Blcm1fcCkpCisgICAgICB7CisgICAgICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fy cm93X2ZhY2VfaWQgPQorICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgJiYgIU5JTFAg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAg ICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFy cm93LWhzY2wtaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisg ICAgICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAgICAgICA/IGxvb2t1cF9kZXJpdmVkX2ZhY2Ug KHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLXByZS16di1mYWNlIiksIEZSSU5H RV9GQUNFX0lELCB0cnVlKQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICBm YWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAg ICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgICA6IERF RkFVTFRfRkFDRV9JRDsKKyAgICAgICAgaWYgKGhzY2xfYWxsX3Blcm1fMF9wKQorICAgICAgICAg IGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2Ns LXBlcm0iKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJt XzFfcCkKKyAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAo dywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgZmFsc2UpOworICAgICAgICAgICAgZWxz ZSBpZiAoaHNjbF9hbGxfcGVybV8yX3ApCisgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBt Y19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIHRy dWUpOworICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX3Blcm1fcCkKKyAgICAgICAgICAgICAg ICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNj bC1wZXJtIiksIHRydWUsIHRydWUpOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxs X3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdl X2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXRlbXAiKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfdGVtcF9wKQorICAgICAgICAgICAgICAgICAgICBm cmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC10 ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9iaXRtYXAgPSAo Y3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5n ZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgICAgcm93LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAw OworICAgICAgICByb3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAgICAg fQorICAgICAgZWxzZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgICAmJiAoZ2x5cGhfZmxh dm9yID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAg ICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVD VEFOR0xFCisgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FM X0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBN Q19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICB8 fCBnbHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgfHwg Z2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAg ICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNIKSkKKyAgICAg ICAgeworICAgICAgICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9y ID09IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGVfcmlnaHRfYXJyb3cKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3JlY3RhbmdsZV9y aWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlw aF9mbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJf UklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBR bWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklH SFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNf cmV2ZXJzZWRfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBN Q19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFD S1NMQVNIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3Zl cnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiBRbmlsOworICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSAoY3Vyc29yX3R5cGUgPT0gTUNf UklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBsb29rdXBf ZnJpbmdlX2JpdG1hcCAoYml0bWFwX2ZsYXZvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg OiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIGZhY2VfaWQgPSAoY3Vyc29yX3R5cGUg PT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICAgJiYgKGdseXBo X2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgICAg ID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJl LXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAg ICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JF VkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAm JiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAg ICAgICAgICAgID8gbG9va3VwX2Rlcml2ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1iYXItcHJl LXp2LWZhY2UiKSwgRlJJTkdFX0ZBQ0VfSUQsIHRydWUpCisgICAgICAgICAgICAgICAgICAgIDog REVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIHJvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gZmFs c2U7CisgICAgICAgICAgcm93LT5yaWdodF9mcmluZ2VfYml0bWFwID0gZnJpbmdlX2JpdG1hcDsK KyAgICAgICAgICByb3ctPnJpZ2h0X2ZyaW5nZV9mYWNlX2lkID0gZmFjZV9pZDsKKyAgICAgICAg ICByb3ctPnJpZ2h0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICAgIHJvdy0+ZnJpbmdlX2Jp dG1hcF9wZXJpb2RpY19wID0gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoZ2x5 cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9 PSBNQ19HTFlQSExFU1MpCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBvbl9wID0gdHJ1 ZTsKKyAgICAgICAgICAgIEZSQU1FX1JJRiAoZiktPm1jX3NjcmliZV9jdXJzb3IgKHcsIG1hdHJp eCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB2cG9zLCB3ZCwgaCwgbHNsLCBjdXJzb3JfdHlwZSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgZ2x5cGhf Zmxhdm9yLCBvbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgYWN0aXZlX3ApOworICAgICAgICAgIH0KK30KKworLyogRHVtcCBjb250ZW50cyBvZiBnbHlw aCBHTFlQSCB0byBzdGRlcnIuICBST1cgYW5kIEFSRUEgYXJlCisgICB0aGUgZ2x5cGggcm93IGFu ZCBhcmVhIHdoZXJlIHRoZSBnbHlwaCBjb21lcyBmcm9tLiAqLwordm9pZAorbWNfZHVtcF9nbHlw aCAoc3RydWN0IGdseXBoX3JvdyAqcm93LCBzdHJ1Y3QgZ2x5cGggKmdseXBoLCBpbnQgYXJlYSwK KyAgICAgICAgICAgICAgIGludCByZWxhdGl2ZV94LCBpbnQgdnBvcykKK3sKKyAgYm9vbCBnbHlw aF96dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNbYXJlYV0gPT0gcm93LT51c2VkW2FyZWFdIC0g MQorICAgICAgICAgICAgICAgICAgICAgJiYgTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9 PSBaVik7CisgIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICB8fCBnbHlwaC0+ dHlwZSA9PSBHTFlQSExFU1NfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJyLAor ICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAl MS4xZCUxLjFkICAlM2QgJXMgJXNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2Vk W2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgIChnbHlwaC0+dHlwZSA9 PSBDSEFSX0dMWVBICisgICAgICAgICA/ICdDJworICAgICAgICAgOiAnRycpLAorICAgICAgICBn bHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg ID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAg ICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxf d2lkdGgsCisgICAgICAgIGdseXBoLT51LmNoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAg ICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9s aW5lX3AsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisg ICAgICAgIG1jX2NoYXJfdG9fc3RyaW5nIChnbHlwaC0+dS5jaCkpOworICAgIH0KKyAgZWxzZSBp ZiAoZ2x5cGgtPnR5cGUgPT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChz dGRlcnIsCisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUw NnggJTRkICUxLjFkJTEuMWQgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiBy b3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAor ICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisg ICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4 ZWxfd2lkdGgsCisgICAgICAgIDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAg Z2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3As CisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAg ICJcXFMiKTsKKyAgICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IElNQUdFX0dMWVBIKQor ICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVk ICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVjXG4iLAor ICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51 c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxh dGl2ZV94LAorICAgICAgICAnSScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAo QlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAo U1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAo TklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScp KSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkg Z2x5cGgtPnUuaW1nX2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgt PmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAg ICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7 CisgICAgfQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpCisgICAg eworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMg JTkicEQiZCAlYyAlM2QgMHglMDZ4IiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRb YXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJysnLAorICAgICAgICBn bHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAg ICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAg ICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgs CisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5pZCk7CisgICAgICBmcHJpbnRm IChzdGRlcnIsICIgJTRkICUxLjFkJTEuMWQiLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAg ICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9s aW5lX3ApOworICAgICAgaWYgKGdseXBoLT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAgIGZwcmlu dGYgKHN0ZGVyciwgIiAgJTNkICVzIC4gWyVkLSVkXVxuIiwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAgICAg ICAgICAgICAgICAgIGdseXBoLT5zbGljZS5jbXAuZnJvbSwgZ2x5cGgtPnNsaWNlLmNtcC50byk7 CisgICAgICAgIGVsc2UKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG4iKTsKKyAgICB9Cisg IGVsc2UgaWYgKGdseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgpCisgICAgeworI2lmbmRlZiBI QVZFX1hXSURHRVRTCisgICAgICBlYXNzdW1lIChmYWxzZSk7CisjZWxzZQorICAgICAgZnByaW50 ZiAoc3RkZXJyLAorICAgICAgICAiICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAlM2QgMHglMDV4 ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93 LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdYJywKKyAg ICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgID8gJ1MnCisgICAgICAgICA6ICctJykpLAorICAgICAgICBnbHlwaC0+cGl4ZWxf d2lkdGgsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hf bGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgt PnUueHdpZGdldCwKKyAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0t IiwKKyAgICAgICAgJy4nKTsKKyNlbmRpZgorICAgIH0KK30KKworLyogRHVtcCB0aGUgY29udGVu dHMgb2YgZ2x5cGggcm93IGF0IFZQT1MgaW4gTUFUUklYIHRvIHN0ZGVyci4KKyAgIEdMWVBIUyAw IG1lYW5zIGRvbid0IHNob3cgZ2x5cGggY29udGVudHMuCisgICBHTFlQSFMgMSBtZWFucyBzaG93 IGdseXBocyBpbiBzaG9ydCBmb3JtCisgICBHTFlQSFMgPiAxIG1lYW5zIHNob3cgZ2x5cGhzIGlu IGxvbmcgZm9ybS4gKi8KK3ZvaWQKK21jX2R1bXBfZ2x5cGhfcm93IChzdHJ1Y3QgZ2x5cGhfcm93 ICpyb3csIGludCB2cG9zLCBpbnQgZ2x5cGhzKQoreworICBpbnQgcmVsYXRpdmVfeCA9IDA7Cisg IGlmIChnbHlwaHMgIT0gMSkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbkRVTVAg R0xZUEggUk9XXG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlJvdyAgICAgU3RhcnQgICAg ICAgRW5kIFVzZWQgb0U+PFxcQ1RaRmVzbSAgICAgWCAgICBZICAgIFcgICAgSCAgICBWICAgIEEg ICAgUFxuIik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICI9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1c biIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiJTNkICU5InBEImQgJTkicEQiZCAlNGQgJTEu MWQlMS4xZCUxLjFkJTEuMWRcCislMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUx LjFkICAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZCAlNGRcbiIsCisgICAgICAgICB2cG9zLAorICAg ICAgICAgTUFUUklYX1JPV19TVEFSVF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgTUFUUklYX1JP V19FTkRfQ0hBUlBPUyAocm93KSwKKyAgICAgICAgIHJvdy0+dXNlZFtURVhUX0FSRUFdLAorICAg ICAgICAgcm93LT5jb250YWluc19vdmVybGFwcGluZ19nbHlwaHNfcCwKKyAgICAgICAgIHJvdy0+ ZW5hYmxlZF9wLAorICAgICAgICAgcm93LT50cnVuY2F0ZWRfb25fbGVmdF9wLAorICAgICAgICAg cm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCwKKyAgICAgICAgIHJvdy0+Y29udGludWVkX3AsCisg ICAgICAgICBNQVRSSVhfUk9XX0NPTlRJTlVBVElPTl9MSU5FX1AgKHJvdyksCisgICAgICAgICBN QVRSSVhfUk9XX0RJU1BMQVlTX1RFWFRfUCAocm93KSwKKyAgICAgICAgIHJvdy0+ZW5kc19hdF96 dl9wLAorICAgICAgICAgcm93LT5maWxsX2xpbmVfcCwKKyAgICAgICAgIHJvdy0+ZW5kc19pbl9t aWRkbGVfb2ZfY2hhcl9wLAorICAgICAgICAgcm93LT5zdGFydHNfaW5fbWlkZGxlX29mX2NoYXJf cCwKKyAgICAgICAgIHJvdy0+bW91c2VfZmFjZV9wLAorICAgICAgICAgcm93LT54LAorICAgICAg ICAgcm93LT55LAorICAgICAgICAgcm93LT5waXhlbF93aWR0aCwKKyAgICAgICAgIHJvdy0+aGVp Z2h0LAorICAgICAgICAgcm93LT52aXNpYmxlX2hlaWdodCwKKyAgICAgICAgIHJvdy0+YXNjZW50 LAorICAgICAgICAgcm93LT5waHlzX2FzY2VudCk7CisgICAgICAvKiBUaGUgbmV4dCAzIGxpbmVz IHNob3VsZCBhbGlnbiB0byAiU3RhcnQiIGluIHRoZSBoZWFkZXIuICovCisgICAgICBmcHJpbnRm IChzdGRlcnIsICIgICAgJTkicEQiZCAlOSJwRCJkXHQlNWRcbiIsIHJvdy0+c3RhcnQub3Zlcmxh eV9zdHJpbmdfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5vdmVybGF5X3N0cmluZ19pbmRleCwK KyAgICAgICAgIHJvdy0+Y29udGludWF0aW9uX2xpbmVzX3dpZHRoKTsKKyAgICAgIGZwcmludGYg KHN0ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcbiIsCisgICAgICAgICBDSEFSUE9TIChyb3ct PnN0YXJ0LnN0cmluZ19wb3MpLAorICAgICAgICAgQ0hBUlBPUyAocm93LT5lbmQuc3RyaW5nX3Bv cykpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAgICU5ZCAlOWRcbiIsIHJvdy0+c3RhcnQu ZHB2ZWNfaW5kZXgsCisgICAgICAgICByb3ctPmVuZC5kcHZlY19pbmRleCk7CisgICAgfQorICBp ZiAoZ2x5cGhzID4gMSkKKyAgICB7CisgICAgICBmb3IgKGludCBhcmVhID0gTEVGVF9NQVJHSU5f QVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICB7CisgICAgICAgICAgc3Ry dWN0IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgIHN0cnVjdCBn bHlwaCAqZ2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgLyog R2x5cGggZm9yIGEgbGluZSBlbmQgaW4gdGV4dC4gKi8KKyAgICAgICAgICBpZiAoYXJlYSA9PSBU RVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGdseXBoLT5jaGFycG9zID4gMCkKKyAg ICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgIGlmIChnbHlwaCA8IGdseXBoX2VuZCkK KyAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIkdseXBoIy9Ub3RhbCBSZWwuWCBUICAgICAg IFBvcyBPICAgVyAgICAgQ29kZSBGYWNlIExSIEhQT1MgWlYgQ1xuIik7CisgICAgICAgICAgZm9y ICg7IGdseXBoIDwgZ2x5cGhfZW5kOyArK2dseXBoKQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LCB2cG9zKTsK KyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAg ICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAoZ2x5cGhzID09IDEpCisgICAg ICB7CisgICAgICAgIGNoYXIgc1tTSFJUX01BWCArIDRdOworICAgICAgICBmb3IgKGludCBhcmVh ID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICAg IHsKKyAgICAgICAgICAgIGludCBpOworICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHJvdy0+ dXNlZFthcmVhXTsgKytpKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc3RydWN0 IGdseXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdICsgaTsKKyAgICAgICAgICAgICAgICBp ZiAoaSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICYmIGFyZWEg PT0gVEVYVF9BUkVBCisgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAg ICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gJyAnKQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICBzdHJjcHkgKCZzW2ldLCAiW1xcbl0iKTsKKyAgICAgICAg ICAgICAgICAgICAgaSArPSA0OworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPCAweDgwCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBnbHlwaC0+dS5jaCA+PSAnICcpCisgICAgICAgICAgICAgICAgICAgIHNbaV0gPSBnbHlw aC0+dS5jaDsKKyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAg IHNbaV0gPSAnLic7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHNbaV0gPSAnXDAnOwor ICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiJTNkOiAoJWQpICclcydcbiIsIHZwb3MsIHJv dy0+ZW5hYmxlZF9wLCBzKTsKKyAgICAgICAgICB9CisgICAgICB9Cit9CisKK0RFRlVOICgibWMt ZHVtcC1nbHlwaC1yb3ciLCBGbWNfZHVtcF9nbHlwaF9yb3csIFNtY19kdW1wX2dseXBoX3Jvdywg MSwgMiwgIlAiLAorICAgICAgIGRvYzogLyogRHVtcCBnbHlwaCByb3cgUk9XIHRvIHN0ZGVyci4K K0ludGVyYWN0aXZlbHksIFJPVyBpcyB0aGUgcHJlZml4IG51bWVyaWMgYXJndW1lbnQgYW5kIGRl ZmF1bHRzIHRvCit0aGUgcm93IHdoaWNoIGRpc3BsYXlzIHBvaW50LgorT3B0aW9uYWwgYXJndW1l bnQgR0xZUEhTIDAgbWVhbnMgZG9uJ3QgZHVtcCBnbHlwaHMuCitHTFlQSFMgMSBtZWFucyBkdW1w IGdseXBocyBpbiBzaG9ydCBmb3JtLgorR0xZUEhTID4gMSBvciBvbWl0dGVkIG1lYW5zIGR1bXAg Z2x5cGhzIGluIGxvbmcgZm9ybS4gICovKQorICAoTGlzcF9PYmplY3Qgcm93LCBMaXNwX09iamVj dCBnbHlwaHMpCit7CisgIHN0cnVjdCB3aW5kb3cgKncgPSBYV0lORE9XIChzZWxlY3RlZF93aW5k b3cpOworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsK KyAgRU1BQ1NfSU5UIHZwb3M7CisgIGlmIChOSUxQIChyb3cpKQorICAgIHsKKyAgICAgIGludCBk MSwgZDIsIGQzLCBkNCwgZDUsIHlwb3M7CisgICAgICBib29sIHZpc2libGVfcCA9IHBvc192aXNp YmxlX3AgKHcsIFBULCAmZDEsICZkMiwgJmQzLCAmZDQsICZkNSwgJnlwb3MpOworICAgICAgaW50 IGhlYWRlcl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICAg ICAgaW50IHZvZmZzZXQgPSAoaGVhZGVyX2xpbmVfaGVpZ2h0ID4gMAorICAgICAgICAgICAgICAg ICAgICAgJiYgeXBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgPyB5cG9zICsgMQorICAg ICAgICAgICAgICAgICAgICAgIDogeXBvczsKKyAgICAgIGlmICh2aXNpYmxlX3ApCisgICAgICAg IHZwb3MgPSB2b2Zmc2V0OworICAgICAgICBlbHNlCisgICAgICAgICAgdnBvcyA9IDA7CisgICAg fQorICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgQ0hFQ0tfTlVNQkVSIChyb3cpOworICAgICAg ICB2cG9zID0gWEZJWE5VTSAocm93KTsKKyAgICAgIH0KKyAgaWYgKHZwb3MgPj0gMCAmJiB2cG9z IDwgbWF0cml4LT5ucm93cykKKyAgICBtY19kdW1wX2dseXBoX3JvdyAoTUFUUklYX1JPVyAobWF0 cml4LCB2cG9zKSwKKyAgICAgICAgdnBvcywKKyAgICAgICAgVFlQRV9SQU5HRURfRklYTlVNUCAo aW50LCBnbHlwaHMpID8gWEZJWE5VTSAoZ2x5cGhzKSA6IDIpOworICByZXR1cm4gUW5pbDsKK30K Kwordm9pZAorbWNfZHVtcF9nbHlwaF9tYXRyaXggKHN0cnV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u IiwKKyAgICAgQlVGX1BUIChidWZmZXIpLCBCVUZfQkVHViAoYnVmZmVyKSwgQlVGX1pWIChidWZm ZXIpKTsKKyAgZnByaW50ZiAoc3RkZXJyLCAiQ3Vyc29yIHggPSAlZCwgeSA9ICVkLCBocG9zID0g JWQsIHZwb3MgPSAlZFxuIiwKKyAgICAgdy0+Y3Vyc29yLngsIHctPmN1cnNvci55LCB3LT5jdXJz b3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MpOworICBmcHJpbnRmIChzdGRlcnIsICI9PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOworICBtY19kdW1wX2dseXBo X21hdHJpeCAody0+Y3VycmVudF9tYXRyaXgsCisgICAgICAgICBUWVBFX1JBTkdFRF9GSVhOVU1Q IChpbnQsIGdseXBocykgPyBYRklYTlVNIChnbHlwaHMpIDogMCk7CisgIHJldHVybiBRbmlsOwor fQorCitib29sCittY190cmF2ZXJzZV9jYWNoZV9wIChzdHJ1Y3QgbWNfbWF0cml4IG1hdHJpeCwg ZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICBpbnQg dm50aCwgaW50IG50aCkKK3sKKyAgaWYgKHZudGggPCBtYXRyaXgudnBvc191c2VkCisgICAgICAm JiBtYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdID4gMAorICAgICAgJiYgbnRoIDwgbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSkKKyAgICByZXR1cm4gdHJ1ZTsK KyAgICBlbHNlCisgICAgICByZXR1cm4gZmFsc2U7Cit9CisKK3ZvaWQKK21jX3Jlc2V0X2NhY2hl IChzdHJ1Y3Qgd2luZG93ICp3KQoreworICBpZiAoIUJVRkZFUlAgKHctPmNvbnRlbnRzKSkKKyAg ICByZXR1cm47CisgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNI RTsKKyAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90eXBlKQor ICAgIHsKKyAgICAgIGJvb2wgYnZhcl9hY3RpdmVfcDsKKyAgICAgIHN3aXRjaCAoY2FjaGVfdHlw ZSkKKyAgICAgICAgeworICAgICAgICAgIGNhc2UgTk9fQ0FDSEU6CisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBjYXNlIE1DX0NB Q0hFOgorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVu dHMpCisgICAgICAgICAgICAgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIG1jX2NvbmYpKSkKKyAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gZmFsc2U7Cisg ICAgICAgICAgICAgICAgZWxzZSBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNf Y29uZikpKQorICAgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IHRydWU7CisgICAgICAg ICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAgIGNhc2UgQ0hfQ0FDSEU6Cisg ICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAg ICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jv c3NoYWlycykpKQorICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgICBlbHNlIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkpCisgICAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gdHJ1ZTsKKyAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgY2FzZSBGQ19DQUNIRToKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAg ICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192 aXNpYmxlKSkpCisgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IGZhbHNlOworICAgICAg ICAgICAgICAgIGVsc2UgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2li bGUpKSkKKyAgICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSB0cnVlOworICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKCFidmFyX2Fj dGl2ZV9wKQorICAgICAgICB7CisgICAgICAgICAgLyogRGVjcmVhc2UgdGhlIHNpemUgb2YgdGhl IGFycmF5IHRvIGEgYmFyZSBtaW5pbXVtLiAqLworICAgICAgICAgIGZvciAoaW50IHZudGggPSAw OyB2bnRoIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZDsgKyt2bnRoKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICBpZiAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVk W2NhY2hlX3R5cGVdID4gMSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVt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QXQgdGhpcyB0aW1lLCB3ZSBhcmUgaW5zdGVhZCBsZWF2aW5nIHRoZSBhcnJheSBhcy1p cyB3aXRoIHRoZQorICAgICAgICAvLyAgdW5kZXJzdGFuZGluZyB0aGF0IGl0IHdpbGwgY29udGFp biBvdXRkYXRlZCBkYXRhIChha2EgZ2FyYmFnZSkuCisgICAgICAgIC8vICBVc2luZyB0aGUgY291 bnRlciBgdy0+bWNfbWF0cml4LnZwb3NbQF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXWAsIHdlIHRy YWNrIGN1cnJlbnQgZGF0YS4KKyAgICAgICAgZWxzZSBpZiAoYnZhcl9hY3RpdmVfcCkKKyAgICAg ICAgICB7CisgICAgICAgICAgICBmb3IgKGludCB2bnRoID0gMDsgdm50aCA8IHctPm1jX21hdHJp eC52cG9zX3VzZWQ7ICsrdm50aCkKKyAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXSA9IDA7CisgICAgICAgICAgICB3LT5tY19tYXRyaXgu Y3Vyc29yc191c2VkW2NhY2hlX3R5cGVdID0gMDsKKyAgICAgICAgICB9CisgICAgfQorfQorCitz dGF0aWMgdm9pZAorbWNfaGVscGVyIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgc3RydWN0IGds eXBoICpnbHlwaCwgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGludCB2 cG9zLAorICAgICAgICAgICBpbnQgd2QsIGludCBoLCBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNv cl90eXBlLCBpbnQgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICBlbnVtIG1jX3Jvd19wb3NpdGlv biByb3dfcG9zaXRpb24sIHN0cnVjdCBtY19SR0IgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgc3Ry dWN0IG1jX1JHQiBiYWNrZ3JvdW5kLCBib29sIGFjdGl2ZV9wLCBlbnVtIG1jX2ZsYXZvciBnbHlw aF9mbGF2b3IsCisgICAgICAgICAgIGJvb2wgZHJhd19wLCBlbnVtIG1jX2RyYXdfcm93X3R5cGUg ZnJvbV93aGVyZSwKKyAgICAgICAgICAgZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUsIGVu dW0gbWNfZW5naW5lX3R5cGUgYWN0aW9uX3R5cGUpCit7CisgIGludCB2bnRoID0gTUFUUklYX1JP V19WUE9TIChyb3csIG1hdHJpeCk7CisgIGlmIChtY19zdGRlcnJfcAorICAgICAgJiYgZHJhd19w KQorICAgIHsKKyAgICAgIGludCBjaGFycG9zID0gZ2x5cGgtPmNoYXJwb3M7CisgICAgICBpbnQg bG51bSA9IGdseXBoLT5sbnVtOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG5tY19oZWxwZXIg KCVzKTogIGZyb21fd2hlcmUgKCVzKVxuXAorICBhY3Rpb25fdHlwZSAoJXMpIHwgZmxhdm9yICgl cykgfCBjaGFycG9zICglZCkgfCBsbnVtICglZClcblwKKyAgY2hhciAoJXMpIHwgeCAoJWQpIHwg ZnggKCVkKSB8IHkgKCVkKSB8IGZ5ICglZCkgfCBocG9zICglZC8lZCkgfCB2cG9zICglZClcblwK KyAgd2QgKCVkKSB8IGggKCVkKSB8IGN1cnNvcl90eXBlICglcykgfCBjdXJzb3Jfd2lkdGggKCVk KSB8IGFjdGl2ZV9wICglcylcblwKKyAgRkctUkdCICglZi8lZi8lZikgfCBCRy1SR0IgKCVmLyVm LyVmKVxuIiwKKyAgICAgIG1jX3dpbmRvdyAodyksIG1jX2RyYXdfcm93X3R5cGVfdG9fc3RyaW5n IChmcm9tX3doZXJlKSwKKyAgICAgIG1jX2VuZ2luZV90eXBlX3RvX3N0cmluZyAoYWN0aW9uX3R5 cGUpLCBtY19mbGF2b3JfdG9fc3RyaW5nIChnbHlwaF9mbGF2b3IpLAorICAgICAgY2hhcnBvcywg bG51bSwgbWNfY2hhcl90b19zdHJpbmcgKGdseXBoLT51LmNoKSwgeCwgZngsIHksIGZ5LCBocG9z LAorICAgICAgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxLCB2cG9zLCB3ZCwgaCwgbWNfY3Vyc29y X3R5cGVfdG9fc3RyaW5nIChjdXJzb3JfdHlwZSksCisgICAgICBjdXJzb3Jfd2lkdGgsIChhY3Rp dmVfcCA/ICJ0cnVlIiA6ICJmYWxzZSIpLCBmb3JlZ3JvdW5kLnJlZCwgZm9yZWdyb3VuZC5ncmVl biwKKyAgICAgIGZvcmVncm91bmQuYmx1ZSwgYmFja2dyb3VuZC5yZWQsIGJhY2tncm91bmQuZ3Jl ZW4sIGJhY2tncm91bmQuYmx1ZSk7CisgICAgfQorICBib29sIHJlbW92ZV9wID0gZmFsc2U7Cisg IGlmIChkcmF3X3AKKyAgICAgICYmIChmcm9tX3doZXJlID09IFNLSVBQRUQKKyAgICAgICAgICB8 fCBmcm9tX3doZXJlID09IFBPU1RfQ0hBTkdFRAorICAgICAgICAgIHx8IGZyb21fd2hlcmUgPT0g VU5DSEFOR0VECisgICAgICAgICAgfHwgZnJvbV93aGVyZSA9PSBTRVRfQ1VSU09SX1RXTykpCisg ICAgeworICAgICAgYm9vbCBzYW1lX3AgPSBmYWxzZTsKKyAgICAgIGZvciAoaW50IG50aCA9IDA7 IG50aCA8IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV07ICsr bnRoKQorICAgICAgICB7CisgICAgICAgICAgc2FtZV9wIHw9CisgICAgICAgICAgICAody0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5zYW1lX3AgPT0gdHJ1ZQor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250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ICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZngg PT0gZngKKyAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhdLnkgPT0geQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnkgPT0gZnkKKyAgICAgICAgICAgICAmJiB3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmhwb3MgPT0gaHBvcwor ICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0udnBvcyA9PSB2cG9zCisgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZCA9PSB3ZAorICAgICAgICAgICAgICYmIHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uaCA9PSBoCisgICAgICAg ICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5j dXJzb3JfdHlwZSA9PSBjdXJzb3JfdHlwZQorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoID09IGN1cnNvcl93 aWR0aAorICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hl X3R5cGVdW250aF0uZmcucmVkID09IGZvcmVncm91bmQucmVkCisgICAgICAgICAgICAgJiYgdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy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xsIG5lZWQgdG8KKyAgICAgIHJlc2V0IHRoZSBsZWZ0L3JpZ2h0 IGZyaW5nZSBiaXRtYXAgaW5kaWNhdG9ycy4gKi8KKyAgICAgIGlmICghc2FtZV9wCisgICAgICAg ICAgfHwgY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQCisgICAgICAgICAgfHwg Y3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgbWNfZHJhd19l cmFzZV9oeWJyaWQgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdk LCBoLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93 aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICAg ICAgcmV0dXJuOworICAgIH0KKyAgICBlbHNlIGlmIChkcmF3X3AKKyAgICAgICAgICAgICAmJiAo ZnJvbV93aGVyZSA9PSBTQ1JJQkVfT05FCisgICAgICAgICAgICAgICAgIHx8IGZyb21fd2hlcmUg PT0gU0NSSUJFX1RXTworICAgICAgICAgICAgICAgICB8fCBmcm9tX3doZXJlID09IFNDUklCRV9U SFJFRQorICAgICAgICAgICAgICAgICB8fCBmcm9tX3doZXJlID09IE5PV0hFUkUpKQorICAgICAg eworICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwgZ2x5cGhfZmxh dm9yLCByZW1vdmVfcCk7CisgICAgICAgIHJldHVybjsKKyAgICAgIH0KKyAgaWYgKGNhY2hlX3R5 cGUgPT0gTk9fQ0FDSEUpCisgICAgcmV0dXJuOworICArK3ctPm1jX21hdHJpeC5jdXJzb3JzX3Vz ZWRbY2FjaGVfdHlwZV07CisgIGlmICh2bnRoID49IHctPm1jX21hdHJpeC52cG9zX3VzZWQpCisg ICAgdy0+bWNfbWF0cml4LnZwb3NfdXNlZCA9IHZudGggKyAxOworICBpZiAody0+bWNfbWF0cml4 LnZwb3NfYWxsb2NhdGVkIDwgdy0+bWNfbWF0cml4LnZwb3NfdXNlZCkKKyAgICB7CisgICAgICBp bnQgb2xkX2FsbG9jID0gdy0+bWNfbWF0cml4LnZwb3NfYWxsb2NhdGVkOworICAgICAgaW50IG5l d19lbHRzID0gdy0+bWNfbWF0cml4LnZwb3NfdXNlZCAtIHctPm1jX21hdHJpeC52cG9zX2FsbG9j YXRlZDsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zID0geHBhbGxvYyAody0+bWNfbWF0cml4LnZw b3MsICZ3LT5tY19tYXRyaXgudnBvc19hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG5ld19lbHRzLCBJTlRfTUFYLCBzaXplb2YgKnctPm1jX21hdHJpeC52cG9z KTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0cml4LnZwb3MgKyBvbGRfYWxsb2MsIDAsCisgICAg ICAgICAgICAgICAody0+bWNfbWF0cml4LnZwb3NfYWxsb2NhdGVkIC0gb2xkX2FsbG9jKSAqIHNp emVvZiAqdy0+bWNfbWF0cml4LnZwb3MpOworICAgIH0KKyAgKyt3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdOworICBpZiAody0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdIDwgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVfdXNlZFtjYWNoZV90eXBlXSkKKyAgICB7CisgICAgICBpbnQgb2xkX2FsbG9jID0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdOworICAgICAg aW50IG5ld19lbHRzID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNlZFtjYWNoZV90 eXBlXSAtIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBl XTsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdID0geHBh bGxvYyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV0sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19l bHRzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBJTlRfTUFYLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzaXplb2YgKnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdKTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV0gKyBvbGRfYWxsb2MsIDAsCisgICAgICAgICAgICAgICAody0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdIC0gb2xkX2FsbG9jKQor ICAgICAgICAgICAgICAgICAqIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY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bWMtcmVhbC1m YWtlLWN1cnNvcicuCisgICBNVUxUSVBMRV9DVVJTT1JTOiAgV2UgZG8gbm90IHVzZSB0aGlzIGZ1 bmN0aW9uLgorICAgSE9SSVpPTlRBTF9SVUxFUjogIFdlIHdhbnQgYSB1bml2ZXJzYWwgRlkgY29v cmRpbmF0ZSBmb3IgYSBsZXZlbCBydWxlci4KKyAgIFZFUlRJQ0FMX1JVTEVSIGFuZCBGSUxMX0NP TFVNTjogIFdlIHdhbnQgYW4gSCB0aGF0IGVuc3VyZXMgbm8gZ2FwIGJldHdlZW4gdGhlCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91cy9uZXh0IGxpbmUuICBUaGUg RlggY29vcmRpbmF0ZSBpcyBzZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGVsc2V3aGVyZTogIGB3LT5jdXJzb3IueGAgLyBgbWMuZmNfeGAuICovCit2b2lkCittY19nZXRf Y3Vyc29yX2dlb21ldHJ5IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpt YXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGlu dCB4LCBpbnQgKmZ4LCBpbnQgeSwKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCAqZnksIGlu dCBocG9zLCBpbnQgdnBvcywgaW50ICpoLAorICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBt Y19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAg ICAgICAgICAgICAgIGludCAqd2QpCit7CisgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSBtY19nZXRf Y3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgIGlmIChnbHlwaCA9 PSBOVUxMKQorICAgIHJldHVybjsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1df RlJBTUUgKHcpKTsKKyAgKmZ4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7 CisgICpoID0gcm93LT52aXNpYmxlX2hlaWdodDsKKyAgLyogRG9uJ3QgbGV0IHRoZSBjdXJzb3Ig ZXhjZWVkIHRoZSBkaW1lbnNpb25zIG9mIHRoZSByb3csIHNvIHRoYXQKKyAgdGhlIHVwcGVyL2xv d2VyIHNpZGUgb2YgdGhlIGJveCBhcmVuJ3QgY2xpcHBlZC4gICovCisgIGludCB3X2hlYWRlcl9s aW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICBpbnQgd190ZXh0 X2JvdHRvbV95ID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpIC0gKmg7CisgIGlmICh5IDwgd19o ZWFkZXJfbGluZV9oZWlnaHQpCisgICAgeworICAgICAgKmggPSBtYXggKCpoIC0gKHdfaGVhZGVy X2xpbmVfaGVpZ2h0IC0geSkgKyAxLCAqaCk7CisgICAgICB5ID0gd19oZWFkZXJfbGluZV9oZWln aHQgLSAxOworICAgICAgLy8gZnByaW50ZiAoc3RkZXJyLCAiQ09ORElUSU9OICMgMVxuIik7Cisg ICAgfQorICAgZWxzZSBpZiAoeSA+IHdfdGV4dF9ib3R0b21feSkKKyAgICAgeworICAgICAgICpo ICs9IHkgLSB3X3RleHRfYm90dG9tX3k7CisgICAgICAgeSA9IHdfdGV4dF9ib3R0b21feTsKKyAg ICAgICAvLyBmcHJpbnRmIChzdGRlcnIsICJDT05ESVRJT04gIyAyXG4iKTsKKyAgICAgfQorICAq ZnkgPSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgeSk7CisgIHN3aXRjaCAoY3Vyc29yX3R5 cGUpCisgICAgeworICAgICAgY2FzZSBNQ19CQVI6CisgICAgICAgIHsKKyAgICAgICAgICBpZiAo Y3Vyc29yX3dpZHRoIDwgMSkKKyAgICAgICAgICAgIGN1cnNvcl93aWR0aCA9IG1heCAoRlJBTUVf Q1VSU09SX1dJRFRIIChmKSwgMSk7CisgICAgICAgICAgaWYgKGN1cnNvcl93aWR0aCA8IGdseXBo LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAqd2QgPSBjdXJzb3Jfd2lkdGg7CisgICAgICAgICAg YnJlYWs7CisgICAgICAgIH0KKyAgICAgIGNhc2UgTUNfSEJBUjoKKyAgICAgICAgeworICAgICAg ICAgIGludCBjdXJzb3JfaGVpZ2h0ID0gKGN1cnNvcl93aWR0aCA8IDEpID8gbHJpbnQgKDAuMjUg KiAqaCkgOiBjdXJzb3Jfd2lkdGg7CisgICAgICAgICAgaWYgKGN1cnNvcl9oZWlnaHQgPiByb3ct PmhlaWdodCkKKyAgICAgICAgICAgIGN1cnNvcl9oZWlnaHQgPSByb3ctPmhlaWdodDsKKyAgICAg ICAgICAvKiBDdXJzb3Igc21hbGxlciB0aGFuIGxpbmUgaGVpZ2h0LCBzbyBtb3ZlIGRvd24uICov CisgICAgICAgICAgaWYgKCpoID4gY3Vyc29yX2hlaWdodCkKKyAgICAgICAgICAgICpmeSArPSAq aCAtIGN1cnNvcl9oZWlnaHQ7CisgICAgICAgICAgKmggPSBjdXJzb3JfaGVpZ2h0OworICAgICAg ICAgICp3ZCA9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAg fQorICAgICAgY2FzZSBNQ19SSUdIVF9GUklOR0VfQklUTUFQOgorICAgICAgY2FzZSBNQ19MRUZU X0ZSSU5HRV9CSVRNQVA6CisgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6CisgICAgICBj YXNlIE1DX05PX0NVUlNPUjoKKyAgICAgIGNhc2UgTUNfRlJBTUVEX0JPWDoKKyAgICAgIGNhc2Ug TUNfRklMTEVEX0JPWDoKKyAgICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICAgIGRlZm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KyAgICAgICAgICAgICAg ICAgICAgICYmIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPT0gWlYpOworICBzdHJ1Y3Qg ZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZG RVIgKHctPmNvbnRlbnRzKTsKKyAgaW50IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lk dGggKHcsIFRFWFRfQVJFQSk7CisgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnNvcl9yb3cgPSAody0+ Y3Vyc29yLnZwb3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1B VFJJWF9ST1cgKGN1cnNvcl9tYXRyaXgsIHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiBOVUxMOworICBzdHJ1Y3QgZ2x5cGggKmN1cnNvcl9nbHlwaCA9 ICh3LT5jdXJzb3IudnBvcyAhPSAtMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IG1jX2dldF9jdXJzb3JfZ2x5cGggKHcsIGN1cnNvcl9tYXRyaXgsIGN1cnNvcl9yb3csCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJz b3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiBOVUxMOworICBib29sIGN1cnNvcl9hdF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGggPT0gTlVM TAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jv dy0+dXNlZFtURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNv cl9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+Y3Vyc29yLnggPT0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID09IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRoKTsK KyAgYm9vbCBjdXJzb3JfYmV5b25kX2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxMCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93ICE9IE5VTEwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IGN1cnNv cl9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgIWN1cnNvcl9yb3ctPmV4YWN0X3dpbmRvd193aWR0aF9saW5lX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49IHRleHRfYXJlYV93aWR0aAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0gY3Vyc29yX3Jv dy0+cGl4ZWxfd2lkdGgpOworICBpbnQgZnJhbWVfY2hhcl93aWR0aCA9IEZSQU1FX0NPTFVNTl9X SURUSCAoZik7CisgIGludCB0ZW1wX2ZhY2VfaWQgPSBnbHlwaC0+ZmFjZV9pZDsKKyAgc3RydWN0 IG1jX1JHQiBiYWNrZ3JvdW5kOworICBtY19zZXRfbHNsX2JnICh3LCB0ZW1wX2ZhY2VfaWQsICZi YWNrZ3JvdW5kKTsKKyAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3ggPT0gcmVs YXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfaHBvcyA9PSBo cG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF95ID09IHJvdy0+eQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2cG9zKTsKKwor LyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgQkVHSU46 ICBDSEFSX0dMWVBIIHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAgICAgICAgKi8KKy8qIC0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLSAqLworICBpZiAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAg ICAgfHwgZ2x5cGgtPnR5cGUgPT0gR0xZUEhMRVNTX0dMWVBIKQorICB7CisgICAgaWYgKG1jX3N0 ZGVycl9wKQorICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiXG4gJTUicEQiZC8lLTVk ICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQgICUzZCAlcyAlc1xu IiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJv dy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAg cmVsYXRpdmVfeCwKKyAgICAgICAgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgICAg ID8gJ0MnCisgICAgICAgICA6ICdHJyksCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAg ICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChT VFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDog KE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAg ICAgOiAnLScpKSksCisgICAgICAgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAg Z2x5cGgtPnUuY2gsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVm dF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAg Z2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgbWNfY2hhcl90 b19zdHJpbmcgKGdseXBoLT51LmNoKSk7CisgIHN3aXRjaCAoYWN0aW9uX3R5cGUpCisgIHsKKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JT OiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NVUlNPUlM6CisgICAgeworICAg ICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBm eSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIHJ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VkVSVElDQUxfUlVMRVI6CisgICAgeworICAgICAgZW51bSBtY19mbGF2b3Ig Z2x5cGhfZmxhdm9yID0gKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29u X3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVS VElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3Jf YXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJv dy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdICE9IDEKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9w KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1JFVkVSU0VEX1ZF UlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGgg LSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF94ID49IHJvdy0+cGl4ZWxf d2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhM RVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF96dl9wKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChn bHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwg Z2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAg ICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgIHx8IGds eXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJU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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNT CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF96dl9wKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFp cnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0geQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdnBvcykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICB3ZCA9IDE7 CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZmNf ZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5 cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAg ICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2b3IsIGRyYXdf cCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUp OworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0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ICAiXG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFk JTEuMWQgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJl YV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAgICBnbHlw aC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8g J1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAg PyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lk dGgsCisgICAgICAgIDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgt PmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAg ICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICJcXFMi KTsKKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisvKiAgICAgICAgICAgICAgICAgICAgICAgIE1VTFRJUExFX0NVUlNPUlM6ICBTVFJFVENIX0dM WVBIICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tL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MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgsIGN1 cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAg ICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQSCwg ZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlv bl90eXBlKTsKKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93 LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICYmIHJlbGF0aXZlX3ggPD0geF9saW1pdCkKKyAg ICAgICAgeworICAgICAgICAgIGlmIChyZWxhdGl2ZV94IDwgcm93LT5waXhlbF93aWR0aCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lk dGg7CisgICAgICAgICAgICAgIGZ4ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICB0ZW1wX2ZhY2VfaWQgPSAocm93LT5maWxsX2xpbmVfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICA/IGdseXBoLT5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAg ICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBiYWNrZ3JvdW5k OworICAgICAgICAgIG1jX3NldF9sc2xfYmcgKHcsIHRlbXBfZmFjZV9pZCwgJmJhY2tncm91bmQp OworICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94 LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICB4X2xpbWl0IC0g cmVsYXRpdmVfeCwgaCwgY3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gICYmIG9w b2ludF94ID4gcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICB0ZW1w X2ZhY2VfaWQgPSBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICBzdHJ1Y3QgbWNfUkdCIGJhY2tncm91 bmQ7CisgICAgICBtY19zZXRfbHNsX2JnICh3LCB0ZW1wX2ZhY2VfaWQsICZiYWNrZ3JvdW5kKTsK KyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdlX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9w KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JB Ul9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNv cl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg IXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJP VworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9uZF9m cmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50 cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9B UkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93 LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogTUNfR0xZUEhMRVNTOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0g TUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhf Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBNQ19SSUdIVF9G UklOR0VfQklUTUFQOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgZ2x5cGgsIG9wb2ludF94LCB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ICAgICAgZ2x5 cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAg PyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAg ID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dp ZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlwaC0+dS5pbWdfaWQsCisgICAgICAgIGds eXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBn bHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2X3Ag PyAiWlYiIDogIi0tIiwKKyAgICAgICAgJy4nKTsKKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAg eworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICBN VUxUSVBMRV9DVVJTT1JTOiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgKi8KKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgTVVMVElQTEVfQ1VSU09SUzoKKyAgICB7 CisgICAgICBjdXJzb3JfdHlwZSA9IE1DX0hPTExPV19CT1g7CisgICAgICBtY19oZWxwZXIgKHcs IG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAor ICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bv c2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRp YWxzLmFjdGl2ZV9wLCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAg ICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAt LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgIEhPUklaT05U QUxfUlVMRVI6ICBJTUFHRV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAg IGN1cnNvcl90eXBlID0gTUNfSE9MTE9XX0JPWDsKKyAgICAgIGlmICghcmVhbF9mYWtlX2N1cnNv cl9wKQorICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVf eCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJz b3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAg ICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgsIGRy YXdfcCwgZnJvbV93aGVyZS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OiAgSU1BR0VfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAg ICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAgQ09NUE9TSVRFX0dMWVBI ICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisg IGVsc2UgaWYgKGdseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCkKKyAgeworICAgIGlmICht Y19zdGRlcnJfcCkKKyAgICAgIHsKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAg ICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCIsCisgICAgICAg ICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAgICgocm93LT51c2Vk W2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICAgIHJlbGF0 aXZlX3gsCisgICAgICAgICAgJysnLAorICAgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAg ICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICA/ICdCJworICAgICAgICAg ICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICA/ICdTJworICAgICAg ICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgICA/ICcwJwor ICAgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgs CisgICAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuY21wLmlkKTsKKyAgICAgICAgZnBy aW50ZiAoc3RkZXJyLCAiICU0ZCAlMS4xZCUxLjFkIiwKKyAgICAgICAgICBnbHlwaC0+ZmFjZV9p ZCwKKyAgICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICAgIGdseXBoLT5y aWdodF9ib3hfbGluZV9wKTsKKyAgICAgIGlmIChnbHlwaC0+dS5jbXAuYXV0b21hdGljKQorICAg ICAgICBmcHJpbnRmIChzdGRlcnIsICIgICUzZCAlcyAuIFslZC0lZF1cbiIsCisgICAgICAgICAg ICAgICAgICAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+c2xpY2UuY21wLmZyb20sIGdseXBoLT5zbGlj ZS5jbXAudG8pOworICAgICAgICBlbHNlCisgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG4i KTsKKyAgICAgIH0KKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUzogIENP TVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworICAgIGNhc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vcmVncm91bmQsCisgICAg ICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNfR0xZUEgs IGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgICBjYWNoZV90eXBlLCBhY3Rp b25fdHlwZSk7CisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJv dy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiByZWxhdGl2ZV94IDw9IHhfbGltaXQpCisg ICAgICAgIHsKKyAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAg ICAgICAgICB3aGlsZSAocmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAgICAgICAgeworICAg ICAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVfeCwg ZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgIHdkLCBoLCBj dXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgTUNf R0xZUEhMRVNTLCBkcmF3X3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbV93aGVyZSwg Y2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGZy YW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGJyZWFrOwor ICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAg ICAgVkVSVElDQUxfUlVMRVI6ICBDT01QT1NJVEVfR0xZUEggICAgICAgICAgICAgICAgICAgICov CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAg IHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChjdXJzb3JfYXRfZnJpbmdl X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FM X0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1 cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2JleW9u ZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93 LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9yb3ctPnVzZWRbVEVY VF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh cm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9S SUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFU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EZJTExfQ09MVU1OOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGds eXBoX2ZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2Vk W2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2Vu dGlhbHMuZmNfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5J TFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfdmVydGlj YWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3Bv aW50X3kgPT0geQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3Bv aW50X3Zwb3MgPT0gdnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNf R0xZUEg7CisgICAgICB3ZCA9IDE7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBn bHlwaCwgcmVsYXRpdmVfeCwgZmNfZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAg ICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bv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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+dHlw ZSA9PSBYV0lER0VUX0dMWVBIKQorICB7CisjaWZuZGVmIEhBVkVfWFdJREdFVFMKKyAgICBlYXNz dW1lIChmYWxzZSk7CisjZWxzZQorICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZwcmludGYg KHN0ZGVyciwKKyAgICAgICAgIlxuICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAlM2QgMHglMDV4 ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlw aHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93 LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdYJywKKyAg ICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQor ICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAg ICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAnLScpKSwKKyAgICAgICAgZ2x5cGgtPnBpeGVs X3dpZHRoLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94 X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBo LT51Lnh3aWRnZXQsCisgICAgICAgIGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICIt LSIsCisgICAgICAgICcuJyk7CisjZW5kaWYKKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyA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0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JV TEVSOgorICAgIHsKKyAgICAgIGlmIChyZWxhdGl2ZV94IDw9IHhfbGltaXQKKyAgICAgICAgICAm JiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93 LCBnbHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAg ICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZv cmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3Rp dmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgICBj YWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiByZWxhdGl2ZV94 IDw9IHhfbGltaXQpCisgICAgICAgIHsKKyAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5w aXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAocmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlw aCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAg ICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZv cmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFs cy5hY3RpdmVfcCwgTUNfR0xZUEhMRVNTLCBkcmF3X3AsCisgICAgICAgICAgICAgICAgICAgICAg ICAgZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgICAgICAgICBy ZWxhdGl2ZV94ICs9IGZyYW1lX2NoYXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0K KyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAgWFdJREdFVF9HTFlQSCAgICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIFZFUlRJ Q0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IChj dXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgIXJvdy0+Y29udGludWVkX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmICFyb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9y aWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJ Q0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoY3Vyc29yX2JleW9uZF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRf ZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNv cl9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+PSByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1D X1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBN Q19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSAorICAgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNf UkVWRVJTRURfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IE1DX1JJR0hUX0ZS SU5HRV9CSVRNQVA7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVs YXRpdmVfeCwgb3BvaW50X2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAg d2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3Vu ZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwgZ2x5 cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5 cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NPTFVNTjogIFhXSURH RVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgICBjYXNlIEZJTExfQ09MVU1OOgorICAgIHsKKyAgICAgIGVudW0gbWNfZmxhdm9yIGds eXBoX2ZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2Vk W2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2Vu dGlhbHMuZmNfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IChnbHlwaF96dl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5J TFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY2hfdmVydGlj YWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3Bv aW50X3kgPT0geQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3Bv aW50X3Zwb3MgPT0gdnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNf R0xZUEg7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRpdmVf eCwgZmNfZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vy c29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAg ICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBnbHlwaF9mbGF2b3Is IGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9u X3R5cGUpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisg ICAgY2FzZSBDVVJTT1JfSU5ESUNBVE9SOgorICAgIHsKKyAgICAgIGJyZWFrOworICAgIH0KKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICB9CisgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAq LworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5EOiAgWFdJREdFVF9HTFlQSCAg ICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tL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BNQVRSSVhfUk9XX1ZQT1MgKGJvdHRvbV9yb3csIG1h dHJpeCk7CisgIGlmICh2cG9zID09IGJvdHRvbV92cG9zKQorICAgIHJldHVybjsKKyAgaWYgKCFy b3ctPnVzZWRbVEVYVF9BUkVBXSkKKyAgICByZXR1cm47CisgIGludCBocG9zX3N0YXJ0ID0gc3Rh cnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICBpZiAobWNfc3RkZXJyX3ApCisgICAgZnBy aW50ZiAoc3RkZXJyLCAibWNfZHJhd19yb3cgKCVkKTogIGRyYXdfcCAoJXMpIHwgaHBvcyAoJWQp IHwgbGVuICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICB2cG9zLCBkcmF3X3AgPyAieSIg OiAibiIsIGhwb3Nfc3RhcnQsIGhwb3NfbGVuZ3RoKTsKKyAgaW50IG9wb2ludF9meCwgb3BvaW50 X2Z5LCBvcG9pbnRfd2QsIG9wb2ludF9oOworICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93 X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgaW50IGhlYWRlcl9saW5lX2Zvcm1hdCA9IFdJ TkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICBzdHJ1Y3QgZ2x5cGhfcm93ICpjdXJzb3Jf cm93ID0gKHctPmN1cnNvci52cG9zICE9IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQVRSSVhfUk9XIChjdXJzb3JfbWF0cml4LCB3LT5jdXJzb3IudnBvcykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTlVMTDsKKyAgc3RydWN0IGdseXBoICpjdXJz b3JfZ2x5cGggPSAody0+Y3Vyc29yLnZwb3MgIT0gLTEpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBjdXJzb3JfbWF0cml4LCBjdXJzb3Jf cm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogTlVMTDsKKyAgYm9vbCBjdXJzb3JfYXRfZnJpbmdlX3AgPSAoY3Vyc29yX2ds eXBoID09IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAh PSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09 IGN1cnNvcl9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBjdXJzb3Jfcm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID09IHRleHRfYXJlYV93aWR0aAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBjdXJzb3Jfcm93LT5waXhl bF93aWR0aCk7CisgIGJvb2wgY3Vyc29yX2JleW9uZF9mcmluZ2VfcCA9IChjdXJzb3JfZ2x5cGgg PT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3JvdyAh PSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBv cyA9PSBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmICFjdXJzb3Jfcm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSB0ZXh0X2FyZWFf d2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID49 IGN1cnNvcl9yb3ctPnBpeGVsX3dpZHRoKTsKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAg ICAgICAgICAgICAgICAgICAgICAgICBSRVBMQUNFIFRIRSBSRUFMIENVUlNPUgorKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisgIGVudW0gZmFjZV9pZCBiZ19mYWNlX2lkID0gKGN1cnNvcl9nbHlw aCAhPSBOVUxMKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gY3Vyc29yX2dseXBoLT5m YWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7Cisg IHN0cnVjdCBtY19SR0IgY3Vyc29yX2JnOworICBtY19zZXRfbHNsX2JnICh3LCBiZ19mYWNlX2lk LCAmY3Vyc29yX2JnKTsKKyAgLyogRklYTUU6ICBQdXQgaW4gc29tZSBjb2RlIHRvIGRlZmF1bHQg dG8gTUNfSE9MTE9XX0JPWCBpZiB0aGUgdXNlciBoYXMKKyAgdW53aXR0aW5nbHkgY29tZSB1cCB3 aXRoIHNvbWUgdW5hY2NlcHRhYmxlIGZvcm0gb2YgdW5yZWNvZ25pemVkIGN1cnNvciB0eXBlLiAq LworICBMaXNwX09iamVjdCBsaXNwX3R5cGUgPSBCVkFSIChiLCBtY19yZWFsX2Zha2VfY3Vyc29y KTsKKyAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IChDT05TUCAobGlzcF90eXBl KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfbGlzcF90b19jdXJz b3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlwZSAobGlzcF90eXBlKTsKKyAgaW50IGN1cnNv cl93aWR0aCA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgID8gWEZJ WE5VTSAoWENBUiAoWENEUiAobGlzcF90eXBlKSkpCisgICAgICAgICAgICAgICAgICAgICA6IC0x OworICBzdHJ1Y3QgbWNfUkdCIGN1cnNvcl9mZzsKKyAgbWNfY29sb3JfcGlja2VyICh3LCBjdXJz b3JfZ2x5cGgsIGVzc2VudGlhbHMsICZjdXJzb3JfZmcsIC0xLCBjdXJzb3JfdHlwZSwKKyAgICAg ICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIENVUlNPUl9JTkRJQ0FUT1IpOworICBib29sIGZp bGxfY29sdW1uX3RydW1wc19wID0gKCFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zp c2libGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54ID09 IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFjdXJz b3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhY3Vyc29y X2JleW9uZF9mcmluZ2VfcCk7CisgIC8qIFdlIHVzZSBhIHRlc3Qgc2ltaWxhciB0byB0aGUgcmVh bCBmYWtlIGN1cnNvciBzbyB0aGF0IHRoZSBmcmluZ2UgYml0bWFwIGlzCisgIG9ubHkgZHJhd24g b25jZSBwZXIgd2luZG93LiAqLworICBpZiAodnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAg JiYgaHBvc19zdGFydCArIGhwb3NfbGVuZ3RoID09IHJvdy0+dXNlZFtURVhUX0FSRUFdCisgICAg ICAmJiAhTklMUCAoQlZBUiAoYiwgY3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d2lkdGggb2YgMS4gKi8KKyAgICAgIG1jX2dldF9jdXJzb3JfZ2Vv bWV0cnkgKHcsIG1hdHJpeCwgcm93LCB3LT5jdXJzb3IueCwgJm9wb2ludF9meCwgdy0+Y3Vyc29y LnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3BvaW50X2Z5LCB3LT5jdXJzb3Iu aHBvcywgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIE1DX0JBUiwgMSwgJm9wb2ludF93ZCk7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJp eCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54LCBvcG9pbnRfZngsIHctPmN1cnNvci55 LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3Iu dnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAgTUNfQkFSLCAxLCBy b3dfcG9zaXRpb24sIGN1cnNvcl9mZywgY3Vyc29yX2JnLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLAor ICAgICAgICAgICAgICAgICBNQ19HTFlQSExFU1MsIGRyYXdfcCwgZnJvbV93aGVyZSwgTklMUCAo QlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICAg IG1jX2dldF9jdXJzb3JfZ2VvbWV0cnkgKHcsIG1hdHJpeCwgcm93LCB3LT5jdXJzb3IueCwgJm9w b2ludF9meCwgdy0+Y3Vyc29yLnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3Bv aW50X2Z5LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRfaCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIE1DX0hCQVIsIDEsICZvcG9pbnRfd2QpOworICAgICAg bWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwgb3Bv aW50X2Z4LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3LT5jdXJz b3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAgICAgICAg ICAgICAgIE1DX0hCQVIsIDEsIHJvd19wb3NpdGlvbiwgY3Vyc29yX2ZnLCBjdXJzb3JfYmcsIGVz c2VudGlhbHMuYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIE1DX0dMWVBILCBkcmF3X3AsIGZy b21fd2hlcmUsIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1Ip OworICAgIH0KKyAgZWxzZSBpZiAoIWN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAmJiBj dXJzb3JfZ2x5cGggIT0gTlVMTAorICAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9z CisgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAg JiYgdy0+Y3Vyc29yLmhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICAgICAg JiYgY3Vyc29yX2dseXBoLT50eXBlICE9IFNUUkVUQ0hfR0xZUEgpCisgICAgeworICAgICAgbWNf Z2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54LCAmb3BvaW50 X2Z4LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRf ZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJm9wb2ludF93 ZCk7CisgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1 cnNvci54LCBvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRf ZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwK KyAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9u LCBjdXJzb3JfZmcsIGN1cnNvcl9iZywKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3Rp dmVfcCwgTUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgTklM UCAoQlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAg ICAgICAgICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorICBlbHNl IGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaCAhPSBO VUxMCisgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgJiYg dy0+Y3Vyc29yLmhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBv cyA8IGhwb3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgt PnR5cGUgPT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICAvKiBJZiBhIHVzZXIgaGFzIHNl dCBgeC1zdHJldGNoLWN1cnNvcicgdG8gYSBub24tbmlsIHZhbHVlLCBoZS9zaGUgY2hvc2UgdG8K KyAgICAgIGhhdmUgYSBjdXJzb3IgdGhhdCBzcGFucyB0aGUgZW50aXJlIGxlbmd0aCBvZiB0aGUg U1RSRVRDSF9HTFlQSC4gKi8KKyAgICAgIGlmICgheF9zdHJldGNoX2N1cnNvcl9wKQorICAgICAg ICB7CisgICAgICAgICAgLyogVGhlIE1DX0hCQVIgc2hhbGwgaGF2ZSBhIGBjdXJzb3Jfd2lkdGhg IG9mIDEuICovCisgICAgICAgICAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCBy b3csIHctPmN1cnNvci54LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHctPmN1cnNvci55LCAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLCBNQ19I QkFSLCAxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfd2QpOwor ICAgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vy c29yLngsIG9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci55LCBvcG9p bnRfZnksIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywKKyAgICAgICAgICAgICAgICAg ICAgIG9wb2ludF93ZCwgb3BvaW50X2gsIE1DX0hCQVIsIDEsIHJvd19wb3NpdGlvbiwgY3Vyc29y X2ZnLAorICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX2JnLCBlc3NlbnRpYWxzLmFjdGl2ZV9w LCBNQ19HTFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgICAgTklM UCAoQlZBUiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisg ICAgICAgICAgICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICAg ICAgfQorICAgICAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1 cnNvci54LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vy c29yLnksICZvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRfaCwgY3Vyc29yX3R5cGUsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsICZvcG9pbnRfd2QpOworICAgICAg bWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwgb3Bv aW50X2Z4LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3LT5jdXJz b3IuaHBvcywgdy0+Y3Vyc29yLnZwb3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAgICAgICAg ICAgICAgIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgY3Vyc29yX2Zn LCBjdXJzb3JfYmcsCisgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dM WVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIE5JTFAgKEJWQVIgKGIs IG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAgICAgICAgICAgICAg IDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgIH0KKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXIEFORCBSRUNPUkQgRkFLRSBD VVJTT1JTCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgaWYgKCFlc3NlbnRpYWxzLmFjdGl2 ZV9wCisgICAgICAmJiBOSUxQIChCVkFSIChiLCBtY19pbmFjdGl2ZV93aW5kb3dzKSkKKyAgICAg ICYmIE5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgJiYgTklMUCAo QlZBUiAoYiwgZmNfaW5hY3RpdmVfd2luZG93cykpKQorICAgIHJldHVybjsKKyAgaWYgKGhwb3Nf bGVuZ3RoID09IDEpCisgICAgeworICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBtY19jb25mKSkK KyAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICB8fCAoIWVz c2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBt Y19pbmFjdGl2ZV93aW5kb3dzKSkpKSkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRoZSBzcGFj ZSBhcHBlbmRlZCB0byBhIHJvdyBlbmRpbmcgd2l0aCBhIG5ldyBsaW5lCisgICAgICAgICAgZG9l cyBub3QgaGF2ZSBhIGBnbHlwaC0+Y2hhcnBvc2AgKC0xLCAwKSB0aGF0IHdlIGNhbgorICAgICAg ICAgIHVzZSBmb3IgdGhpcyBwYXJ0aWN1bGFyIGFwcGxpY2F0aW9uLiAgV2hlbiB0aGVyZSBpcyBh CisgICAgICAgICAgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeSB0aGF0IGFzc2lnbnMgYSB2 aXNpYmxlCisgICAgICAgICAgZ2x5cGggdG8gYSBuZXcgbGluZSwgdGhlcmUgaXMgbm8gcHJvYmxl bSBiZWNhdXNlIHRoYXQKKyAgICAgICAgICBnbHlwaCBoYXMgYSBgZ2x5cGgtPmNoYXJwb3MnIHRo YXQgd2UgY2FuIHVzZS4gIFdoZW4KKyAgICAgICAgICBubyB2aXNpYmxlIEVPTCBnbHlwaCBleGlz dHMsIHdlIHVzZSB0aGUgZm9sbG93aW5nCisgICAgICAgICAgdGVzdDogIHRoZSBhcHBlbmRlZCBz cGFjZSBoYXMgYSBwb3NpdGlvbiB0aGF0IGlzIG9uZQorICAgICAgICAgIGxlc3MgdGhhbiB0aGUg ZW5kIG9mIHRoZSBtYXRyaXggcm93LiAqLworICAgICAgICAgIGludCBocG9zID0gc3RhcnQgLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgIHN0cnVjdCBnbHlwaCAqcHJldmlvdXNf Z2x5cGggPSAoMCA8PSBocG9zIC0gMSAmJiBocG9zIC0gMSA8IHJvdy0+dXNlZFtURVhUX0FSRUFd KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0gKyBocG9zIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IE5VTEw7CisgICAgICAgICAgLy8gc3RydWN0IGdseXBoICpsYXN0X2dseXBoID0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsKKyAgICAg ICAgICBib29sIHNraXBfcCA9IChwcmV2aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gTUFUUklYX1JPV19FTkRf Q0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzdGFydC0+Ynl0 ZXBvcyAhPSBlc3NlbnRpYWxzLnp2X2J5dGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8g dHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiBhIGBidWZmZXItZGlzcGxheS10 YWJsZScgZW50cnkgY29udGFpbnMKKyAgICAgICAgICAgICAgICAgICAgICAgIGEgdmlzaWJsZSB0 YWIgY2hhcmFjdGVyICgiwrsiKSwgdGhlIHN1YnNlcXVlbnQKKyAgICAgICAgICAgICAgICAgICAg ICAgIFNUUkVUQ0hfR0xZUEggd2lsbCBoYXZlIHRoZSBzYW1lIHN0YXJ0LT5jaGFycG9zCisgICAg ICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYWZvcmVtZW50aW9uZWQgdmlzaWJsZSB0YWIgY2hh cmFjdGVyLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgOiAocHJldmlvdXNfZ2x5cGggIT0g TlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJw b3MgPT0gc3RhcnQtPmNoYXJwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQor ICAgICAgICAgICAgICAgICAgICAgICAgOiBmYWxzZTsKKyAgICAgICAgICBpbnQgcG9zaW50ID0g KHJvd19wb3NpdGlvbiA9PSBQT1NUX1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgID8gLTEK KyAgICAgICAgICAgICAgICAgICAgICAgOiAocm93X3Bvc2l0aW9uID09IEFUX1pWKQorICAgICAg ICAgICAgICAgICAgICAgICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAgICAgICAgICAgICAg ICAgOiAoc3RhcnQtPmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVz ZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9X X0VORF9DSEFSUE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICA6IChzdGFydC0+ Ynl0ZXBvcyA9PSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFtURVhUX0FSRUFd IC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAg ICAgICAgICAgICAgICAgOiBzdGFydC0+Y2hhcnBvczsKKyAgICAgICAgICBMaXNwX09iamVjdCBz cGVjcyA9IG1jX2Fzc29jIChtYWtlX2ZpeG51bSAocG9zaW50KSwgQlZBUiAoYiwgbWNfY29uZikp OworICAgICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisg ICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAg JiYgIU5JTFAgKHNwZWNzKQorICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRf Ym90dG9tX3kgKHcpCisgICAgICAgICAgICAgICYmICFza2lwX3AKKyAgICAgICAgICAgICAgJiYg cm93X3Bvc2l0aW9uICE9IFBPU1RfWlYpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIExp c3BfT2JqZWN0IGxpc3BfdHlwZSA9IG1jX250aCAoMSwgc3BlY3MpOworICAgICAgICAgICAgICBl bnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19saXNwX3Rv X2N1cnNvcl90eXBlIChYQ0FSIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiBtY19saXNwX3RvX2N1cnNvcl90eXBlIChsaXNwX3R5 cGUpOworICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IChzdGFydC0+dHlwZSA9PSBJTUFHRV9H TFlQSCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0hPTExPV19CT1gKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcl90eXBlOworICAgICAgICAgICAgICBpbnQg Y3Vyc29yX3dpZHRoID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBYRklYTlVNIChYQ0FSIChYQ0RSIChsaXNwX3R5cGUpKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogLTE7CisgICAgICAgICAgICAgIExpc3BfT2JqZWN0 IG1jX2ZvcmVncm91bmQgPSBtY19udGggKDIsIHNwZWNzKTsKKyAgICAgICAgICAgICAgc3RydWN0 IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgIGlmIChTVFJJTkdQIChtY19mb3JlZ3JvdW5k KSkKKyAgICAgICAgICAgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIG1jX2ZvcmVncm91bmQs ICZsc2xfZmcpOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKFZFQ1RPUlAgKG1jX2ZvcmVncm91 bmQpKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBsc2xfZmcucmVk ID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDApKTsKKyAgICAgICAgICAgICAg ICAgICAgbHNsX2ZnLmdyZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDEp KTsKKyAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLmJsdWUgPSBYRkxPQVRfREFUQSAoQVJFRiAo bWNfZm9yZWdyb3VuZCwgMikpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgZWxzZSBpZiAoTklMUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgICAgIG1j X2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMsICZsc2xfZmcsIHBvc2ludCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgcm93X3Bvc2l0 aW9uLCBNVUxUSVBMRV9DVVJTT1JTKTsKKyAgICAgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhf Uk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB0ZXh0 X2FyZWFfd2lkdGg7CisgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIHN0 YXJ0LCBURVhUX0FSRUEsIHgsIHhfbGltaXQsIHJvdy0+eSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sIHZwb3MsIGN1cnNvcl90eXBlLAor ICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgY3Vyc29yX21hdHJpeCwgZXNz ZW50aWFscywgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9mZywg TVVMVElQTEVfQ1VSU09SUywgZHJhd19wLCBmcm9tX3doZXJlLCBNQ19DQUNIRSk7CisgICAgICAg ICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmICghTklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkp CisgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgfHwgKCFl c3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg ZmNfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAvLyAmJiBlc3NlbnRpYWxzLmZjX3gg PD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194IDwgdGV4dF9h cmVhX3dpZHRoCisgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHctPm1jLmxudW1fcGl4 ZWxfd2lkdGgpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgeF9saW1pdCA9IHggKyBzdGFydC0+ cGl4ZWxfd2lkdGg7CisgICAgICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAody0+Y3Vy c29yLnggPT0gZXNzZW50aWFscy5mY194CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gc3RhcnQgLSByb3ctPmdseXBoc1tURVhU X0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29y LnZwb3MgPT0gdnBvcyk7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAg ICAgbWNfY29sb3JfcGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIE1D X0JBUiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgRklMTF9DT0xV TU4pOworICAgICAgICAgIGlmICh4IDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgIC8v IHggKyBzdGFydC0+cGl4ZWxfd2lkdGggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAg ICYmICgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAgICAgICAg ICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAmJiAoKHN0YXJ0 ICE9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEKKyAg ICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0geAorICAgICAgICAgICAgICAg ICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHggKyBzdGFydC0+cGl4ZWxfd2lkdGgpCisgICAgICAg ICAgICAgICAgICB8fCAoc3RhcnQgPT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNl ZFtURVhUX0FSRUFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNf eCA+PSB4KSkKKyAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95 ICh3KQorICAgICAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAg bWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9saW1pdCwg cm93LT55LAorICAgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0sIHZwb3MsIE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21h dHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsCisgICAgICAgICAgICAgICAg ICAgICAgIEZJTExfQ09MVU1OLCBkcmF3X3AsIGZyb21fd2hlcmUsIEZDX0NBQ0hFKTsKKyAgICAg ICAgfQorICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAm JiAhTklMUCAoQlZBUiAoYiwgY2hfaG9yaXpvbnRhbF9ydWxlcikpCisgICAgICAgICAgJiYgKGVz c2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9w CisgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93 cykpKSkKKyAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICB7Cisg ICAgICAgICAgaW50IHhfbGltaXQgPSAoc3RhcnQgPT0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSAr IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gdGV4 dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICA6IHggKyBzdGFydC0+cGl4ZWxf d2lkdGg7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgbWNfY29s b3JfcGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIE1DX0hCQVIsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIEhPUklaT05UQUxfUlVMRVIp OworICAgICAgICAgIC8qIFByZXNlcnZlIHN1cHBvcnQgZm9yIGRlZmF1bHQgYmVoYXZpb3Igc3Vj aCB0aGF0IGEgdXNlciBtYXkKKyAgICAgICAgICBzcGVjaWZ5IHRoZSBoZWlnaHQgb2YgYW4gTUNf SEJBUiwgd2hpY2ggYmVnaW5zIGl0cyBqb3VybmV5CisgICAgICAgICAgYXMgdGhlIGBjdXJzb3Jf d2lkdGgnLiAgYG1jX2dldF9jdXJzb3JfZ2VvbWV0cnknIHJlYWRqdXN0cy4gKi8KKyAgICAgICAg ICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0 LCByb3ctPnksCisgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0sIHZwb3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0 cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAgICAg ICAgIEhPUklaT05UQUxfUlVMRVIsIGRyYXdfcCwgZnJvbV93aGVyZSwgQ0hfQ0FDSEUpOworICAg ICAgICB9CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAg ICYmICFOSUxQIChCVkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgJiYgKGVz c2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9w CisgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93 cykpKSkKKyAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3ApCisgICAgICAgIHsKKyAg ICAgICAgICBjdXJzb3JfdHlwZSA9IChzdGFydC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAorICAgICAgICAgICAgICAgICAgICAg ICAgOiBNQ19CQVI7CisgICAgICAgICAgaW50IHhfbGltaXQgPSB0ZXh0X2FyZWFfd2lkdGg7Cisg ICAgICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAody0+Y3Vyc29yLnkgPT0gcm93LT55 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnZwb3Mg PT0gdnBvcyk7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgbWNf Y29sb3JfcGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIGN1cnNvcl90 eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0aW9uLCBWRVJUSUNBTF9S VUxFUik7CisgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4g MCkKKyAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAg ICAgICAmJiAoKHN0YXJ0ICE9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVY VF9BUkVBXSAtIDEKKyAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSB4CisgICAg ICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPCB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoKQor ICAgICAgICAgICAgICAgICAgfHwgKHN0YXJ0ID09IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyBy b3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJz b3IueCA+PSB4KSkKKyAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRv bV95ICh3KQorICAgICAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAg ICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9saW1p dCwgcm93LT55LAorICAgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0sIHZwb3MsIGN1cnNvcl90eXBlLCAxLAorICAgICAgICAgICAgICAgICAgICAgICBj dXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAg ICAgICAgICAgICAgICAgVkVSVElDQUxfUlVMRVIsIGRyYXdfcCwgZnJvbV93aGVyZSwgQ0hfQ0FD SEUpOworICAgICAgICB9CisgICAgfQorICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgaW50IHJl bGF0aXZlX3ggPSAwOworICAgICAgICBmb3IgKGludCBhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsg YXJlYSA8IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHN0cnVj dCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAgICAgICAgIHN0cnVjdCBn bHlwaCAqZ2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgICAv KiBHbHlwaCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAqLworICAgICAgICAgICAgaWYgKGFyZWEg PT0gVEVYVF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDAp CisgICAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgICAgZm9yICg7IGdseXBoIDwg Z2x5cGhfZW5kOyArK2dseXBoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaWYg KHZwb3MgIT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGggIT0g Z2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPCBy ZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54IDwgcmVsYXRpdmVf eAorICAgICAgICAgICAgICAgICAgICAmJiBOSUxQIChCVkFSIChiLCBtY19jb25mKSkpCisgICAg ICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIs IG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1jX2luYWN0aXZlX3dpbmRv d3MpKSkpKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvKiBUaGUg c3BhY2UgYXBwZW5kZWQgdG8gYSByb3cgZW5kaW5nIHdpdGggYSBuZXcgbGluZSBkb2VzCisgICAg ICAgICAgICAgICAgICAgIG5vdCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDApIHRoYXQg d2UgY2FuIHVzZSBmb3IgdGhpcworICAgICAgICAgICAgICAgICAgICBwYXJ0aWN1bGFyIGFwcGxp Y2F0aW9uLiAgV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkKKyAgICAgICAgICAg ICAgICAgICAgYXNzaWducyBhIHZpc2libGUgZ2x5cGggdG8gYSBuZXcgbGluZSwgdGhlcmUgaXMg bm8gcHJvYmxlbQorICAgICAgICAgICAgICAgICAgICBiZWNhdXNlIHRoYXQgZ2x5cGggaGFzIGEg YGdseXBoLT5jaGFycG9zJyB0aGF0IHdlIGNhbiB1c2UuCisgICAgICAgICAgICAgICAgICAgIFdo ZW4gbm8gdmlzaWJsZSBFT0wgZ2x5cGggZXhpc3RzLCB3ZSB1c2UgdGhlIGZvbGxvd2luZyB0ZXN0 OgorICAgICAgICAgICAgICAgICAgICB0aGUgYXBwZW5kZWQgc3BhY2UgaGFzIGEgcG9zaXRpb24g dGhhdCBpcyBvbmUgbGVzcyB0aGFuIHRoZQorICAgICAgICAgICAgICAgICAgICBlbmQgb2YgdGhl IG1hdHJpeCByb3cuICovCisgICAgICAgICAgICAgICAgICAgIGludCBocG9zID0gZ2x5cGggLSBy b3ctPmdseXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGgg KnByZXZpb3VzX2dseXBoID0gKDAgPD0gaHBvcyAtIDEgJiYgaHBvcyAtIDEgPCByb3ctPnVzZWRb VEVYVF9BUkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIGhwb3MgLSAxCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgICAgICAgICAg ICAgICAgICAgIC8vIHN0cnVjdCBnbHlwaCAqbGFzdF9nbHlwaCA9IHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDE7CisgICAgICAgICAgICAgICAgICAgIGJv b2wgc2tpcF9wID0gKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gTUFUUklYX1JPV19F TkRfQ0hBUlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgZ2x5cGgtPmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLyogV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkgY29udGFpbnMKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhIHZpc2libGUgdGFiIGNoYXJhY3RlciAo IsK7IiksIHRoZSBzdWJzZXF1ZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg U1RSRVRDSF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgZ2x5cGgtPmNoYXJwb3MKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYWZvcmVtZW50aW9uZWQgdmlzaWJsZSB0 YWIgY2hhcmFjdGVyLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKHBy ZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBwcmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBnbHlwaC0+Y2hhcnBvcykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogZmFsc2U7CisgICAgICAgICAgICAgICAgICAgIGludCBwb3NpbnQgPSAo cm93X3Bvc2l0aW9uID09IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID8gLTEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKHJvd19wb3NpdGlv biA9PSBBVF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZXNzZW50 aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGgtPmJ5dGVw b3MgIT0gZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRf QVJFQV0gLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9S T1dfRU5EX0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IChnbHlwaC0+Ynl0ZXBvcyA9PSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9 PSByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiBnbHlwaC0+Y2hhcnBvczsKKyAgICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3Qgc3BlY3Mg PSBtY19hc3NvYyAobWFrZV9maXhudW0gKHBvc2ludCksIEJWQVIgKGIsIG1jX2NvbmYpKTsKKyAg ICAgICAgICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4g MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkK KyAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChzcGVjcykKKyAgICAgICAgICAgICAg ICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAg ICAgICAgICAgICAgICAgICYmICFza2lwX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIHJv d19wb3NpdGlvbiAhPSBQT1NUX1pWKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGxpc3BfdHlwZSA9IG1jX250aCAoMSwgc3BlY3Mp OworICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlw ZSA9IChDT05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIg KGxpc3BfdHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiBtY19saXNwX3RvX2N1cnNvcl90eXBlIChsaXNwX3R5cGUpOworICAg ICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoZ2x5cGgtPnR5cGUgPT0gSU1BR0Vf R0xZUEgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9X X0JPWAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcl90eXBl OworICAgICAgICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCA9IChDT05TUCAobGlz cF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFhG SVhOVU0gKFhDQVIgKFhDRFIgKGxpc3BfdHlwZSkpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogLTE7CisgICAgICAgICAgICAgICAgICAgICAgICBMaXNwX09i amVjdCBtY19mb3JlZ3JvdW5kID0gbWNfbnRoICgyLCBzcGVjcyk7CisgICAgICAgICAgICAgICAg ICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlm IChTVFJJTkdQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgbWNf eHdfY29sb3JfdmFsdWVzICh3LCBtY19mb3JlZ3JvdW5kLCAmbHNsX2ZnKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgZWxzZSBpZiAoVkVDVE9SUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNs X2ZnLnJlZCA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAwKSk7CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBsc2xfZmcuZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJFRiAo bWNfZm9yZWdyb3VuZCwgMSkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsX2Zn LmJsdWUgPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMikpOworICAgICAgICAg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlm IChOSUxQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1j X2NvbG9yX3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2ludCwgY3Vyc29yX3R5cGUs IHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgTVVMVElQTEVfQ1VSU09SUyk7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdnBv cyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgICAgICAgICAgICAg ICAgaW50IHhfbGltaXQgPSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICAg ICBtY19lbmdpbmUgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeF9saW1pdCwgcm93LT55LCBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHZwb3MsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9tYXRyaXgsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwg bHNsX2ZnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNVUxUSVBMRV9DVVJT T1JTLCBkcmF3X3AsIGZyb21fd2hlcmUsIE1DX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFS IChiLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0 aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBmY19pbmFjdGl2 ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICAgICAvLyAmJiBlc3NlbnRpYWxzLmZjX3gg PD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNf eCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZj X3ggPj0gdy0+bWMubG51bV9waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICAgICAg ICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9wID0gKHctPmN1cnNvci54ID09IGVzc2Vu dGlhbHMuZmNfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5jdXJzb3IueSA9PSByb3ctPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gZ2x5cGggLSByb3ctPmdseXBo c1tURVhUX0FSRUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAgICAgICAgICAgICBpbnQg aHBvcyA9IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgICAgICAgICAgICAgICAg ICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgICAgICAgICAgIG1jX2NvbG9yX3Bp Y2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsIC0xLCBNQ19CQVIsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0aW9uLCBGSUxMX0NPTFVNTik7 CisgICAgICAgICAgICAgICAgICAgIGlmIChocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAg ICAgICAgICAgICAgICYmIGhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICAg ICAgICAgICAgICAgICAgIC8vICYmIHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPD0g dGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAmJiByZWxhdGl2ZV94IDwg dGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKGhlYWRlcl9saW5l X2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwg aGVhZGVyX2xpbmVfZm9ybWF0ID09IDApCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAoKGds eXBoICE9IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNz ZW50aWFscy5mY194ID49IHJlbGF0aXZlX3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgZXNzZW50aWFscy5mY194IDwgcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAoZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPj0gcmVsYXRp dmVfeCkpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRf Ym90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNv cl9wKQorICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgbWF0cml4LCByb3csIGds eXBoLCBhcmVhLCByZWxhdGl2ZV94LCB4X2xpbWl0LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgcm93LT55LCBocG9zLCB2cG9zLCBNQ19CQVIsIDEsIGN1cnNvcl9tYXRyaXgsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24s IGxzbF9mZywgRklMTF9DT0xVTU4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBk cmF3X3AsIGZyb21fd2hlcmUsIEZDX0NBQ0hFKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAg ICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaG9yaXpvbnRhbF9ydWxlcikpCisgICAgICAg ICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAg ICAgICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcykKKyAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB0ZXh0X2FyZWFfd2lkdGg7CisgICAg ICAgICAgICAgICAgICAgIGludCBocG9zID0gZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFd OworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICAg ICAgICAgICAgbWNfY29sb3JfcGlja2VyICh3LCBnbHlwaCwgZXNzZW50aWFscywgJmxzbF9mZywg LTEsIE1DX0hCQVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bv c2l0aW9uLCBIT1JJWk9OVEFMX1JVTEVSKTsKKyAgICAgICAgICAgICAgICAgICAgLyogUHJlc2Vy dmUgc3VwcG9ydCBmb3IgZGVmYXVsdCBiZWhhdmlvciBzdWNoIHRoYXQgYSB1c2VyIG1heQorICAg ICAgICAgICAgICAgICAgICBzcGVjaWZ5IHRoZSBoZWlnaHQgb2YgYW4gTUNfSEJBUiwgd2hpY2gg YmVnaW5zIGl0cyBqb3VybmV5CisgICAgICAgICAgICAgICAgICAgIGFzIHRoZSBgY3Vyc29yX3dp ZHRoJy4gIGBtY19nZXRfY3Vyc29yX2dlb21ldHJ5JyByZWFkanVzdHMuICovCisgICAgICAgICAg ICAgICAgICAgIGlmIChocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgICAgICAgICAgICAg ICYmIGhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgpCisgICAgICAgICAgICAgICAgICAg ICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsIHhf bGltaXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnksIGhwb3MsIHZw b3MsIE1DX0hCQVIsIDEsIGN1cnNvcl9tYXRyaXgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywgSE9SSVpPTlRBTF9SVUxF UiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwgZnJvbV93aGVyZSwg Q0hfQ0FDSEUpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICghTklM UCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChiLCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICYmIChlc3Nl bnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMu YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg Y2hfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgIWZpbGxfY29s dW1uX3RydW1wc19wKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBj dXJzb3JfdHlwZSA9IChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IE1DX0hPTExPV19CT1gKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IE1DX0JBUjsKKyAgICAgICAgICAgICAgICAgICAgaW50IHhfbGltaXQg PSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1 cnNvcl9wID0gKHctPmN1cnNvci55ID09IHJvdy0+eQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsKKyAgICAg ICAgICAgICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07 CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAg ICAgICAgICBtY19jb2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAt MSwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93 X3Bvc2l0aW9uLCBWRVJUSUNBTF9SVUxFUik7CisgICAgICAgICAgICAgICAgICAgIGlmIChocG9z ID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBocG9zX3N0 YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICgoaGVhZGVyX2xp bmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8 fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICgo Z2x5cGggIT0gZ2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3 LT5jdXJzb3IueCA+PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPmN1cnNvci54IDwgcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICB8fCAoZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSByZWxhdGl2ZV94KSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAo dykKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAg ICAgICAgICAgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFyZWEs IHJlbGF0aXZlX3gsIHhfbGltaXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBy b3ctPnksIGhwb3MsIHZwb3MsIGN1cnNvcl90eXBlLCAxLCBjdXJzb3JfbWF0cml4LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xf ZmcsIFZFUlRJQ0FMX1JVTEVSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJh d19wLCBmcm9tX3doZXJlLCBDSF9DQUNIRSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAg IH0KKyAgICAgICAgICB9CisgICAgICB9CisgIC8vICBjbG9ja190IGNsb2NrX2VuZCA9IGNsb2Nr KCk7CisgIC8vICBkb3VibGUgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0g Y2xvY2tfc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAi bWNfZHJhd19yb3cgKCVzKTogIFRJTUUgKCVmKVxuIiwgbWNfd2luZG93ICh3KSwgY3B1X3RpbWVf dXNlZCk7Cit9CisKK2Jvb2wKK21jX3JlZHJhd19yb3cgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVj dCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAg ICAgICAgZW51bSBnbHlwaF9yb3dfYX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lYXJfZW5kX29mX2xpbmUnLiAqLworICBpZiAoY2xl YXJfZW9sX3AKKyAgICAgICYmIGVuZF9ocG9zID4gc3RhcnRfaHBvcykKKyAgICB7CisgICAgICAv KiBBZHZhbmNlIHRoZSBvdXRwdXQgY3Vyc29yLiAqLworICAgICAgdy0+b3V0cHV0X2N1cnNvci5o cG9zID0gZW5kX2hwb3M7CisgICAgICB3LT5vdXRwdXRfY3Vyc29yLnggPSB4OworICAgICAgRlJB TUVfUklGIChmKS0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHJvdywgVEVYVF9BUkVBLCAtMSk7Cisg ICAgfQorICAvLyAgY2xvY2tfc3RhcnQgPSBjbG9jaygpOworICBpbnQgdm50aCA9IE1BVFJJWF9S T1dfVlBPUyAocm93LCBtYXRyaXgpOworICAvKiBTVFJFVENIX0dMWVBIIG1heSBjb250YWluIG1v cmUgdGhhbiBvbmUgZmFrZSBjdXJzb3IgYXQgdGhlIHNhbWUgSFBPUy4gKi8KKyAgZm9yIChlbnVt IG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOworICAgICAgIGNhY2hlX3R5cGUg PCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAgeworICAgICAgZm9yIChpbnQg bnRoID0gMDsKKyAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVfcCAody0+bWNfbWF0cml4LCBj YWNoZV90eXBlLCB2bnRoLCBudGgpOworICAgICAgICAgICArK250aCkKKyAgICAgICAgeworICAg ICAgICAgIGludCB4ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS54OworICAgICAgICAgIGludCBmeCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF0uZng7CisgICAgICAgICAgaW50IHkgPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90e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hd LmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcuYmx1ZX07CisgICAgICAgICAgLy8gIHN0cnVjdCBt Y19SR0IgbHNsX2JnID0gey5yZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhdLmJnLnJlZCwKKyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAg ICAgLmdyZWVuID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XS5iZy5ncmVlbiwKKyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUg PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmJsdWV9 OworICAgICAgICAgIGJvb2wgYWN0aXZlX3AgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLmFjdGl2ZV9wOworICAgICAgICAgIGVudW0gbWNfZmxhdm9yIGds eXBoX2ZsYXZvciA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICAgICAg aWYgKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAmJiAoKGhwb3MgPj0gc3RhcnRfaHBvcwor ICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBlbmRfaHBvcykKKyAgICAgICAgICAgICAgICAg IC8qIEEgZmxvYXRpbmcgY3Vyc29yIGJleW9uZCB0aGUgZW5kIG9mIHRoZSBnbHlwaCByb3cuICov CisgICAgICAgICAgICAgICAgICB8fCAoaHBvcyArIDEgPT0gc3RhcnRfaHBvcworICAgICAgICAg ICAgICAgICAgICAgICYmIGhwb3MgKyAxID09IGVuZF9ocG9zKSkKKyAgICAgICAgICAgICAgJiYg ZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBib29sIHJlbW92ZV9wID0g ZmFsc2U7CisgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCBtYXRyaXgsIHJv dywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGxzbF9mZywgYWN0aXZl X3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaF9mbGF2b3IsIHJl bW92ZV9wKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgcmV0dXJuIHRydWU7 CisgIC8vICBjbG9ja19lbmQgPSBjbG9jaygpOworICAvLyAgZG91YmxlIHRpbWVfY3Vyc29ycyA9 ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0gY2xvY2tfc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOwor ICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfcmVkcmF3X3JvdyAoJWQpOiAgaHBvcyAoJWQvJWQp IHwgZ2x5cGhzICglZikgfCBjdXJzb3JzICglZilcbiIsCisgIC8vICAgICAgICAgICAgICAgICAg IHZwb3MsIHN0YXJ0X2hwb3MsIGVuZF9ocG9zLCB0aW1lX2dseXBocywgdGltZV9jdXJzb3JzKTsK K30KKwordm9pZAorbWNfZXJhc2Vfcm93IChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdykKK3sKKyAgaW50IHZudGggPSBN QVRSSVhfUk9XX1ZQT1MgKHJvdywgbWF0cml4KTsKKyAgaWYgKG1jX3N0ZGVycl9wKQorICAgIGZw cmludGYgKHN0ZGVyciwgIm1jX2VyYXNlX3JvdyAoJXMpOiAgdnBvcyAoJWQpXG4iLCBtY193aW5k b3cgKHcpLCB2bnRoKTsKKyAgLy8gIGlmIChtY19zdGRlcnJfcCkKKyAgLy8gICAgZnByaW50ZiAo c3RkZXJyLCAibWNfZXJhc2VfaGVscGVyICglcyk6ICBjYWNoZSAoJXMpIHwgdnBvcyAoJWQpXG4i LAorICAvLyAgICAgIG1jX3dpbmRvdyAodyksIG1jX2NhY2hlX3R5cGVfdG9fc3RyaW5nIChjYWNo ZV90eXBlKSwgdm50aCk7CisgIGZvciAoZW51bSBtY19jYWNoZV90eXBlIGNhY2hlX3R5cGUgPSBN Q19DQUNIRTsKKyAgICAgICBjYWNoZV90eXBlIDwgTk9fQ0FDSEU7CisgICAgICAgKytjYWNoZV90 eXBlKQorICAgIHsKKyAgICAgIGZvciAoaW50IG50aCA9IDA7CisgICAgICAgICAgIG1jX3RyYXZl cnNlX2NhY2hlX3AgKHctPm1jX21hdHJpeCwgY2FjaGVfdHlwZSwgdm50aCwgbnRoKTsKKyAgICAg ICAgICAgKytudGgpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgeCA9IHctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0ueDsKKyAgICAgICAgICBpbnQgZnggPSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZ4OworICAgICAg ICAgIGludCB5ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XS55OworICAgICAgICAgIGludCBmeSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAgaW50IGhwb3MgPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZ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90eXBlXVtudGhdLmJnLnJlZCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdyZWVuLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ibHVlfTsKKyAgICAgICAgICBib29sIGFjdGl2ZV9wID0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5hY3RpdmVfcDsK KyAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICBi b29sIGVuYWJsZWRfcCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uZW5hYmxlZF9wOworICAgICAgICAgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5j YCBjb250YWlucyB0aGUgZm9sbG93aW5nIHRlc3RzLAorICAgICAgICAgIGVhc3NlcnQgKG1hdHJp eCAmJiBtYXRyaXgtPnJvd3MpOworICAgICAgICAgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8 IG1hdHJpeC0+bnJvd3MpOyAqLworICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAobWF0 cml4ICYmIG1hdHJpeC0+cm93cykgPyBmYWxzZSA6IHRydWU7CisgICAgICAgICAgaWYgKGJhcmZf Y3Jhc2hfb25lKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgYm9vbCBiYXJmX2Ny YXNoX3R3byA9ICh2cG9zID49IDAgJiYgdnBvcyA8IG1hdHJpeC0+bnJvd3MpID8gZmFsc2UgOiB0 cnVlOworICAgICAgICAgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICAgICAgICAgIGNvbnRpbnVl OworICAgICAgICAgIGlmICh2cG9zID09IHZudGgKKyAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxh dm9yID09IE1DX0dMWVBICisgICAgICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgbWNfZXJhc2VfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgdy0+bWNf bWF0cml4LCB4LCB5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkKTsKKyAgICAgICAgICAgICAgdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3AgPSBmYWxzZTsK KyAgICAgICAgICAgICAgLS13LT5tY19tYXRyaXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdOwor ICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAodnBvcyA9PSB2bnRoCisgICAgICAg ICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICBib29sIHJlbW92ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICBtY19kcmF3X2VyYXNl X2h5YnJpZCAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBjdXJz b3Jfd2lkdGgsIGxzbF9iZywgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworIC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XQorICArLS0tLS0tLS0tLS0tLSsgPD0gaXQuY3VycmVudF95ID09IDAKKyAgfCAgICAgICAgICAg ICB8CisgIHwgICAgICAgICAgICAgfCA8PSBydW4uZGVzaXJlZF95ID09IDI3MCBbdXAgKOKGkSld ID09IHJ1bi5jdXJyZW50X3kgPCBydW4uZGVzaXJlZF95CisgIHwgICAgICAgICAgICAgfCAgICBy dW4uaGVpZ2h0ID0gaXQubGFzdF92aXNpYmxlX3kgLSBydW4uY3VycmVudF95OworICB8ICAgICAg ICAgICAgIHwgICAgcnVuLmhlaWdodCA9PSAxMDgwIC0gNTQwID09IDU0MAorICB8ICAgICAgICAg ICAgIHwgICAgW1RoZSBlbnRpcmUgYm90dG9tIHJlY3RhbmdsZSBnZXRzIGNvcGllZCB0byB1cHBl ciBydW4uZGVzaXJlZF95Ll0KKyAgfCAgICAgICAgICAgICB8CisgICstLS0tLS0tLS0tLS0tKyA8 PSBydW4uY3VycmVudF95ID09IDU0MAorICB8ICAgICAgICAgICAgIHwKKyAgfCAgICAgICAgICAg ICB8IDw9IHJ1bi5kZXNpcmVkX3kgPT0gODEwIFtkb3duICjihpMpXSA9PSBydW4uY3VycmVudF95 ID4gcnVuLmRlc2lyZWRfeQorICB8ICAgICAgICAgICAgIHwgICAgcnVuLmhlaWdodCA9IGl0Lmxh c3RfdmlzaWJsZV95IC0gcnVuLmRlc2lyZWRfeQorICB8ICAgICAgICAgICAgIHwgICAgcnVuLmhl aWdodCA9PSAxMDgwIC0gODEwID09IDI3MAorICB8ICAgICAgICAgICAgIHwgICAgW1RvcCBwYXJ0 IG9mIHRoZSBsb3dlciByZWN0YW5nbGUgZ2V0cyBjb3BpZWQgdG8gbG93ZXIgcnVuLmRlc2lyZWRf eS5dCisgIHwgICAgICAgICAgICAgfAorICArLS0tLS0tLS0tLS0tLSsgPD0gaXQubGFzdF92aXNp YmxlX3kgPT0gMTA4MCAqLwordm9pZAorbWNfcHJlX3Njcm9sbF9jbGVhbiAoc3RydWN0IHdpbmRv dyAqdywgc3RydWN0IHJ1biBydW4sIGludCBzdGFydF92cG9zLAorICAgICAgICAgICAgICAgICAg ICAgaW50IG5yb3dzX3Njcm9sbGVkLCBlbnVtIG1jX3ByZV9zY3JvbGxfY2xlYW5fdHlwZSBmcm9t X3doZXJlKQoreworICBpZiAoTUlOSV9XSU5ET1dfUCAodykpCisgICAgcmV0dXJuOworICBib29s IGdvX29uZV9wID0gKHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbTUNfQ0FDSEVdID4gMAorICAg ICAgICAgICAgICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbQ0hfQ0FDSEVdID4g MAorICAgICAgICAgICAgICAgICAgIHx8IHctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FD SEVdID4gMCk7CisgIGJvb2wgZ29fdHdvX3AgPSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAg ICAgICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNy b3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgfHwg IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKSk7CisgIGlmICht Y19zdGRlcnJfcCkKKyAgICBmcHJpbnRmIChzdGRlcnIsICJtY19wcmVfc2Nyb2xsX2NsZWFuICgl cyk6XG5cCisgICVzIHwgZ29fb25lX3AgKCVzKSB8IGdvX3R3b19wICglcylcblwKKyAgc3RhcnRf dnBvcyAoJWQpIHwgbnJvd3Nfc2Nyb2xsZWQgKCVkKVxuXAorICAlczogIHJ1bi5jdXJyZW50L2Rl c2lyZWRfeSAoJWQvJWQpIHwgcnVuLmhlaWdodCAoJWQpXG4iLAorICAgIG1jX3dpbmRvdyAodyks IChmcm9tX3doZXJlID09IFRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9ET1dOKQor ICAgICAgICAgICAgICAgICAgICAgPyAiVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklY X0RPV04iCisgICAgICAgICAgICAgICAgICAgOiAoZnJvbV93aGVyZSA9PSBUUllfV0lORE9XX1JF VVNJTkdfQ1VSUkVOVF9NQVRSSVhfVVApCisgICAgICAgICAgICAgICAgICAgICA/ICJUUllfV0lO RE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfVVAiCisgICAgICAgICAgICAgICAgICAgOiAoZnJv bV93aGVyZSA9PSBUUllfV0lORE9XX0lEKQorICAgICAgICAgICAgICAgICAgICAgPyAiVFJZX1dJ TkRPV19JRCIKKyAgICAgICAgICAgICAgICAgICA6ICJVTktOT1dOIiwKKyAgICBnb19vbmVfcCA/ ICJ5ZXMiIDogIm5vIiwgZ29fdHdvX3AgPyAieWVzIiA6ICJubyIsCisgICAgc3RhcnRfdnBvcywg bnJvd3Nfc2Nyb2xsZWQsCisgICAgcnVuLmN1cnJlbnRfeSA8IHJ1bi5kZXNpcmVkX3kgPyAi4oaT IiA6ICLihpEiLAorICAgIHJ1bi5jdXJyZW50X3ksIHJ1bi5kZXNpcmVkX3ksIHJ1bi5oZWlnaHQp OworICBpZiAoIWdvX29uZV9wICYmICFnb190d29fcCkKKyAgICByZXR1cm47CisgIGJvb2wgdXBk YXRpbmdfZnJhbWVfcCA9IGZhbHNlOworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZy YW1lKTsKKyAgaWYgKFhGUkFNRSAody0+ZnJhbWUpICE9IGYtPm1jX3VwZGF0aW5nX2ZyYW1lCisg ICAgICAmJiAoZ29fb25lX3AgfHwgZ29fdHdvX3ApKQorICAgIHsKKyAgICAgIHVwZGF0aW5nX2Zy YW1lX3AgPSB0cnVlOworICAgICAgdXBkYXRlX2JlZ2luIChmKTsKKyAgICB9CisgIGlmICh3LT5w aHlzX2N1cnNvcl9vbl9wCisgICAgICAmJiBnb190d29fcCkKKyAgICBlcmFzZV9waHlzX2N1cnNv ciAodyk7CisgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4 OworICBmb3IgKGludCB2bnRoID0gc3RhcnRfdnBvczsKKyAgICAgICBtYXRyaXggIT0gTlVMTAor ICAgICAgICYmIHZudGggPCBtYXRyaXgtPm5yb3dzCisgICAgICAgJiYgTUFUUklYX1JPVyAobWF0 cml4LCB2bnRoKS0+ZW5hYmxlZF9wCisgICAgICAgJiYgZ29fb25lX3A7CisgICAgICAgKyt2bnRo KQorICAgIHsKKyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdyA9IE1BVFJJWF9ST1cgKG1hdHJp eCwgdm50aCk7CisgICAgICBtY19lcmFzZV9yb3cgKHcsIG1hdHJpeCwgcm93KTsKKyAgICB9Cisg IGlmICh1cGRhdGluZ19mcmFtZV9wKQorICAgIHVwZGF0ZV9lbmQgKGYpOworICAvLyBtY19yZXNl dF9jYWNoZSAodyk7Cit9CisKK0RFRlVOICgibWMtc3RkZXJyIiwgRm1jX3N0ZGVyciwgU21jX3N0 ZGVyciwgMCwgMSwgIlAiLAorICAgICAgIGRvYzogLyogVG9nZ2xlIHRyYWNpbmcgb2YgbXVsdGlw bGUgZmFrZSBjdXJzb3JzLgorV2l0aCBBUkcsIHR1cm4gdHJhY2luZyBvbiBpZiBhbmQgb25seSBp ZiBBUkcgaXMgcG9zaXRpdmUuICovKQorICAoTGlzcF9PYmplY3QgYXJnKQoreworICBpZiAoTklM UCAoYXJnKSkKKyAgICBtY19zdGRlcnJfcCA9ICFtY19zdGRlcnJfcDsKKyAgZWxzZQorICAgIHsK KyAgICAgIGFyZyA9IEZwcmVmaXhfbnVtZXJpY192YWx1ZSAoYXJnKTsKKyAgICAgIG1jX3N0ZGVy cl9wID0gWEZJWE5VTSAoYXJnKSA+IDA7CisgICAgfQorICByZXR1cm4gUW5pbDsKK30KKworLyog ZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAwK IC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKgogCQkgICAgICBXaW5kb3cgZGlzcGxheSBkaW1lbnNpb25zCkBAIC04 ODYwLDYgKzEzODQxLDI3IEBAIG1vdmVfaXRfaW5fZGlzcGxheV9saW5lX3RvIChzdHJ1Y3QgaXQg Kml0LAogICAgICAgIHx8IChpdC0+bWV0aG9kID09IEdFVF9GUk9NX0RJU1BMQVlfVkVDVE9SCQlc CiAJICAgJiYgaXQtPmRwdmVjICsgaXQtPmN1cnJlbnQuZHB2ZWNfaW5kZXggKyAxID49IGl0LT5k cGVuZCkpKQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgIGJvb2wgbWNfbGluZV9udW1iZXJfcGVuZGluZyA9IGZhbHNlOworCisgIGlmIChp dC0+aHBvcyA9PSAwKQorICAgIHsKKyAgICAgIGlmICghKChvcCAmJiBNT1ZFX1RPX1gpICYmIHRv X3ggPT0gaXQtPmZpcnN0X3Zpc2libGVfeCkKKyAgICAgICAgICAmJiAhc2hvdWxkX3Byb2R1Y2Vf bGluZV9udW1iZXIgKGl0KSkKKyAgICAgICAgeworICAgICAgICAgIGlmIChpdC0+Y3VycmVudF94 ID09IGl0LT5maXJzdF92aXNpYmxlX3gpCisgICAgICAgICAgICBtY19saW5lX251bWJlciAoaXQp OworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBtY19saW5lX251bWJlcl9wZW5kaW5n ID0gdHJ1ZTsKKyAgICAgICAgfQorICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICBpZiAoaXQtPmhwb3MgPT0gMCkKICAgICB7CiAgICAgICAvKiBJZiBsaW5lIG51bWJlcnMg YXJlIGJlaW5nIGRpc3BsYXllZCwgcHJvZHVjZSBhIGxpbmUgbnVtYmVyLgpAQCAtOTI1MSw2ICsx NDI1MywyMiBAQCBtb3ZlX2l0X2luX2Rpc3BsYXlfbGluZV90byAoc3RydWN0IGl0ICppdCwKIAkJ ICAgIH0KIAkJfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VS U09SUyAqLworCisgICAgICAgIGlmIChuZXdfeCA+IGl0LT5maXJzdF92aXNpYmxlX3gpCisgICAg ICAgICAgeworICAgICAgICAgICAgaWYgKG1jX2xpbmVfbnVtYmVyX3BlbmRpbmcpCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICBtY19saW5lX251bWJlcl9wZW5kaW5nID0gZmFsc2U7 CisgICAgICAgICAgICAgICAgbWNfbGluZV9udW1iZXIgKGl0KTsKKyAgICAgICAgICAgICAgfQor ICAgICAgICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICAgIGlmIChu ZXdfeCA+IGl0LT5maXJzdF92aXNpYmxlX3gpCiAJCXsKIAkJICAvKiBJZiB3ZSBoYXZlIHJlYWNo ZWQgdGhlIHZpc2libGUgcG9ydGlvbiBvZiB0aGUKQEAgLTE0Mzk3LDkgKzE5NDE1LDIyIEBAIHJl ZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKIAkgICAgICAqdy0+ZGVzaXJlZF9tYXRyaXgtPm1ldGhv ZCA9IDA7CiAJICAgICAgZGVidWdfbWV0aG9kX2FkZCAodywgIm9wdGltaXphdGlvbiAxIik7CiAj ZW5kaWYKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMg Ki8KKwogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQorICBpZiAoQlVGRkVSUCAody0+Y29udGVu dHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkpCisgICAgbWNfdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3LCBmYWxzZSk7CisgICAgZWxz ZQogCSAgICAgIHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgZmFsc2UpOwogI2VuZGlmCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICBnb3RvIHVwZGF0ZTsKIAkgICAgfQog CSAgZWxzZQpAQCAtMTc3OTIsMTAgKzIyODIzLDIyIEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3Bf T2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3RoaXNfb25lX3ApCiAgICAgfQogCiAjaWZkZWYgSEFW RV9XSU5ET1dfU1lTVEVNCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RS1DVVJTT1JTICovCisKKyAgYm9vbCBrZWVwX2N1cnJlbnRfcCA9IChqdXN0X3RoaXNfb25lX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICB8fCAoIXVzZWRfY3VycmVudF9tYXRyaXhfcCAmJiAh b3ZlcmxheV9hcnJvd19zZWVuKQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8IHctPnBzZXVk b193aW5kb3dfcCk7CisKKyAgYm9vbCBmcmluZ2VzX3VwZGF0ZWRfcCA9IChCVUZGRVJQICh3LT5j b250ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IG1jX3VwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywga2VlcF9jdXJyZW50X3ApCisgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IHVwZGF0ZV93aW5kb3dfZnJpbmdlcyAodywga2VlcF9j dXJyZW50X3ApOworCiAgIGlmIChGUkFNRV9XSU5ET1dfUCAoZikKLSAgICAgICYmIHVwZGF0ZV93 aW5kb3dfZnJpbmdlcyAodywgKGp1c3RfdGhpc19vbmVfcAotCQkJCSAgICB8fCAoIXVzZWRfY3Vy cmVudF9tYXRyaXhfcCAmJiAhb3ZlcmxheV9hcnJvd19zZWVuKQotCQkJCSAgICB8fCB3LT5wc2V1 ZG9fd2luZG93X3ApKSkKKyAgICAgICYmIGZyaW5nZXNfdXBkYXRlZF9wKQogICAgIHsKICAgICAg IHVwZGF0ZV9iZWdpbiAoZik7CiAgICAgICBibG9ja19pbnB1dCAoKTsKQEAgLTE3ODEwLDYgKzIy ODUzLDkgQEAgcmVkaXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1c3Rf dGhpc19vbmVfcCkKICAgICAgIHVwZGF0ZV9lbmQgKGYpOwogICAgIH0KIAorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICBpZiAoV0lORE9XX0JPVFRPTV9ESVZJREVSX1dJRFRIICh3KSkK ICAgICBndWlfZHJhd19ib3R0b21fZGl2aWRlciAodyk7CiAjZW5kaWYgLyogSEFWRV9XSU5ET1df U1lTVEVNICovCkBAIC0xODEyNSw2ICsyMzE3MSwxNiBAQCB0cnlfd2luZG93X3JldXNpbmdfY3Vy cmVudF9tYXRyaXggKHN0cnVjdCB3aW5kb3cgKncpCiAJICAgICAgdXBkYXRlX2JlZ2luIChmKTsK IAkgICAgICBndWlfdXBkYXRlX3dpbmRvd19iZWdpbiAodyk7CiAJICAgICAgRlJBTUVfUklGIChm KS0+Y2xlYXJfd2luZG93X21vdXNlX2ZhY2UgKHcpOworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgbWNfcHJlX3Njcm9sbF9jbGVhbiAo dywgcnVuLCBzdGFydF92cG9zLCBucm93c19zY3JvbGxlZCwgVFJZX1dJTkRPV19SRVVTSU5HX0NV UlJFTlRfTUFUUklYX0RPV04pOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAg ICAgRlJBTUVfUklGIChmKS0+c2Nyb2xsX3J1bl9ob29rICh3LCAmcnVuKTsKIAkgICAgICBndWlf dXBkYXRlX3dpbmRvd19lbmQgKHcsIGZhbHNlLCBmYWxzZSk7CiAJICAgICAgdXBkYXRlX2VuZCAo Zik7CkBAIC0xODI5MSw2ICsyMzM0NywxNiBAQCB0cnlfd2luZG93X3JldXNpbmdfY3VycmVudF9t YXRyaXggKHN0cnVjdCB3aW5kb3cgKncpCiAJICB1cGRhdGVfYmVnaW4gKGYpOwogCSAgZ3VpX3Vw ZGF0ZV93aW5kb3dfYmVnaW4gKHcpOwogCSAgRlJBTUVfUklGIChmKS0+Y2xlYXJfd2luZG93X21v dXNlX2ZhY2UgKHcpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUt Q1VSU09SUyAqLworCisgICAgbWNfcHJlX3Njcm9sbF9jbGVhbiAodywgcnVuLCBzdGFydF92cG9z LCBucm93c19zY3JvbGxlZCwgVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX1VQKTsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgRlJBTUVfUklGIChmKS0+c2Nyb2xs X3J1bl9ob29rICh3LCAmcnVuKTsKIAkgIGd1aV91cGRhdGVfd2luZG93X2VuZCAodywgZmFsc2Us IGZhbHNlKTsKIAkgIHVwZGF0ZV9lbmQgKGYpOwpAQCAtMTkyNDUsNiArMjQzMTEsMTYgQEAgdHJ5 X3dpbmRvd19pZCAoc3RydWN0IHdpbmRvdyAqdykKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0K IAkgIGd1aV91cGRhdGVfd2luZG93X2JlZ2luICh3KTsKIAkgIEZSQU1FX1JJRiAoZiktPmNsZWFy X3dpbmRvd19tb3VzZV9mYWNlICh3KTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIG1jX3ByZV9zY3JvbGxfY2xlYW4gKHcsIHJ1biwg Zmlyc3RfdW5jaGFuZ2VkX2F0X2VuZF92cG9zLCBkdnBvcywgVFJZX1dJTkRPV19JRCk7CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIEZSQU1FX1JJRiAoZiktPnNjcm9sbF9ydW5f aG9vayAodywgJnJ1bik7CiAJICBndWlfdXBkYXRlX3dpbmRvd19lbmQgKHcsIGZhbHNlLCBmYWxz ZSk7CiAjZW5kaWYKQEAgLTIxNTI4LDYgKzI2NjA0LDE3IEBAIG1heWJlX3Byb2R1Y2VfbGluZV9u dW1iZXIgKHN0cnVjdCBpdCAqaXQpCiAgICAgICBTRVRfVEVYVF9QT1MgKHRlbV9pdC5wb3NpdGlv biwgLTEsIC0xKTsKICAgICAgIFBST0RVQ0VfR0xZUEhTICgmdGVtX2l0KTsKIAorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgLyogVGhp cyBwZXJtaXRzIHVzIHRvIGluc3BlY3QgdGhlIEhQT1Mgb2YgbGluZSBudW1iZXIgZ2x5cGhzIGFu ZCB0aGUgc3BhY2UKKyAgICAgIHBhZGRpbmcgYmVmb3JlL2FmdGVyIHRoZSBsaW5lIG51bWJlcnMu ICBXZSBzZXQgYGdseXBoLT5ocG9zYCBlbHNld2hlcmUuICovCisgICAgICB0ZW1faXQuaHBvcyAr PSAxOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICAvKiBTdG9wIHByb2R1 Y2luZyBnbHlwaHMsIGFuZCByZWZyYWluIGZyb20gcHJvZHVjaW5nIHRoZSBsaW5lCiAJIG51bWJl ciwgaWYgd2UgZG9uJ3QgaGF2ZSBlbm91Z2ggc3BhY2Ugb24gdGhpcyBsaW5lLiAgKi8KICAgICAg IGlmICh0ZW1faXQuY3VycmVudF94ID49IHdpZHRoX2xpbWl0KQpAQCAtMjE1MzksNiArMjY2MjYs MzQgQEAgbWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoc3RydWN0IGl0ICppdCkKIAl9CiAgICAg fQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CisgIHN0cnVjdCB0ZXh0X3BvcyB3c3RhcnQ7CisgIFNFVF9URVhUX1BPU19GUk9NX01BUktFUiAo d3N0YXJ0LCBpdC0+dy0+c3RhcnQpOworICBpZiAoaXQtPmFyZWEgPT0gVEVYVF9BUkVBCisgICAg ICAmJiBJVF9DSEFSUE9TICgqaXQpID09IHdzdGFydC5jaGFycG9zKQorICAgIHsKKyAgICAgIHN0 cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChpdC0+dy0+Y29udGVudHMpOworICAgICAgc3RydWN0 IGJ1ZmZlciAqb2xkX2J1ZmZlciA9IE5VTEw7CisgICAgICAvKiBOZWVkZWQgc28gdGhhdCBidWZm ZXItbG9jYWwgdmFsdWVzIGNhbiBiZSBkZXRlcm1pbmVkOyBlLmcuLCB3aGVuCisgICAgICBzd2l0 Y2hpbmcgdG8gdGhlIG1pbmlidWZmZXIuICovCisgICAgICBpZiAoYiAhPSBjdXJyZW50X2J1ZmZl cikKKyAgICAgICAgeworICAgICAgICAgIG9sZF9idWZmZXIgPSBjdXJyZW50X2J1ZmZlcjsKKyAg ICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICAgICAgfQorICAgICAgaXQtPnct Pm1jLmxudW1fcGl4ZWxfd2lkdGggPSAoIU5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdGVtX2l0LmN1cnJlbnRfeAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgICAgICBpZiAob2xkX2J1ZmZl cikKKyAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgfQorCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFJlY29yZCB0aGUgd2lkdGggaW4gcGl4 ZWxzIHdlIG5lZWQgZm9yIHRoZSBsaW5lIG51bWJlciBkaXNwbGF5LiAgKi8KICAgaXQtPmxudW1f cGl4ZWxfd2lkdGggPSB0ZW1faXQuY3VycmVudF94OwogICAvKiBDb3B5IHRoZSBwcm9kdWNlZCBn bHlwaHMgaW50byBJVCdzIGdseXBoX3Jvdy4gICovCkBAIC0yMTcyOSw2ICsyNjg0NCwxNSBAQCBk aXNwbGF5X2xpbmUgKHN0cnVjdCBpdCAqaXQsIGludCBjdXJzb3JfdnBvcykKIAogICBib29sIGxp bmVfbnVtYmVyX25lZWRlZCA9IHNob3VsZF9wcm9kdWNlX2xpbmVfbnVtYmVyIChpdCk7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgYm9v bCBtY19saW5lX251bWJlcl9uZWVkZWQgPSAhc2hvdWxkX3Byb2R1Y2VfbGluZV9udW1iZXIgKGl0 KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBNb3ZlIG92ZXIgZGlzcGxh eSBlbGVtZW50cyB0aGF0IGFyZSBub3QgdmlzaWJsZSBiZWNhdXNlIHdlIGFyZQogICAgICBoc2Ny b2xsZWQuICBUaGlzIG1heSBzdG9wIGF0IGFuIHgtcG9zaXRpb24gPCBmaXJzdF92aXNpYmxlX3gK ICAgICAgaWYgdGhlIGZpcnN0IGdseXBoIGlzIHBhcnRpYWxseSB2aXNpYmxlIG9yIGlmIHdlIGhp dCBhIGxpbmUgZW5kLiAgKi8KQEAgLTIxNzY5LDEyICsyNjg5MywzMyBAQCBkaXNwbGF5X2xpbmUg KHN0cnVjdCBpdCAqaXQsIGludCBjdXJzb3JfdnBvcykKICAgICAgIG1pbl9wb3MgPSBDSEFSUE9T ICh0aGlzX2xpbmVfbWluX3Bvcyk7CiAgICAgICBtaW5fYnBvcyA9IEJZVEVQT1MgKHRoaXNfbGlu ZV9taW5fcG9zKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICAgICAgaWYgKG1jX2xpbmVfbnVtYmVyX25lZWRlZCkKKyAgICAgICAgbWNf bGluZV9udW1iZXIgKGl0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAg LyogUHJvZHVjZSBsaW5lIG51bWJlciwgaWYgbmVlZGVkLiAgKi8KICAgICAgIGlmIChsaW5lX251 bWJlcl9uZWVkZWQpCiAJbWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoaXQpOwogICAgIH0KICAg ZWxzZSBpZiAoaXQtPmFyZWEgPT0gVEVYVF9BUkVBKQogICAgIHsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMqLworCisgICAgICBpZiAobWNfbGluZV9u dW1iZXJfbmVlZGVkKQorICAgICAgICBtY19saW5lX251bWJlciAoaXQpOworCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgICAgICAvKiBMaW5lIG51bWJlcnMgc2hvdWxkIHByZWNlZGUg dGhlIGxpbmUtcHJlZml4IG9yIHdyYXAtcHJlZml4LiAgKi8KICAgICAgIGlmIChsaW5lX251bWJl cl9uZWVkZWQpCiAJbWF5YmVfcHJvZHVjZV9saW5lX251bWJlciAoaXQpOwpAQCAtMjE5NDIsNiAr MjcwODcsMTcgQEAgZGlzcGxheV9saW5lIChzdHJ1Y3QgaXQgKml0LCBpbnQgY3Vyc29yX3Zwb3Mp CiAJICAgICBwcm9jZXNzIHRoZSBwcmVmaXggbm93LiAgKi8KIAkgIGlmIChpdC0+YXJlYSA9PSBU RVhUX0FSRUEgJiYgcGVuZGluZ19oYW5kbGVfbGluZV9wcmVmaXgpCiAJICAgIHsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgICBp ZiAobWNfbGluZV9udW1iZXJfbmVlZGVkKQorICAgICAgICAgIG1jX2xpbmVfbnVtYmVyIChpdCk7 CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgICAgICAvKiBMaW5lIG51bWJlcnMg c2hvdWxkIHByZWNlZGUgdGhlIGxpbmUtcHJlZml4IG9yIHdyYXAtcHJlZml4LiAgKi8KIAkgICAg ICBpZiAobGluZV9udW1iZXJfbmVlZGVkKQogCQltYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChp dCk7CkBAIC0yNzM2MCw2ICszMjUxNiwxOCBAQCBhcHBlbmRfZ2x5cGggKHN0cnVjdCBpdCAqaXQp CiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWFd OwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMg Ki8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5ieXRlcG9z ID0gSVRfQllURVBPUyAoKml0KTsKKyAgICAgIGdseXBoLT5sbnVtID0gaXQtPmxudW07CisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBP UyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAg ICAgaWYgKGl0LT5waXhlbF93aWR0aCA+IDApCkBAIC0yNzQ0Miw2ICszMjYxMCwxOCBAQCBhcHBl bmRfY29tcG9zaXRlX2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCSAgICBnWzFdID0gKmc7CiAJICBn bHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBoc1tpdC0+YXJlYV07CiAJfQorCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+ aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQp OworICAgICAgZ2x5cGgtPmxudW0gPSBpdC0+bG51bTsKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBpdC0+Y21wX2l0LmNoYXJwb3M7CiAgICAg ICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93 aWR0aCA8PSBTSFJUX01BWCk7CkBAIC0yNzY1MCw2ICszMjgzMCwxOCBAQCBwcm9kdWNlX2ltYWdl X2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9y b3ctPmdseXBoc1thcmVhICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOwor ICAgICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworICAgICAgZ2x5cGgtPmxu dW0gPSBpdC0+bG51bTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgZ2x5cGgt PmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9iamVjdCA9IGl0 LT5vYmplY3Q7CiAJICBnbHlwaC0+cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5kcyAoLTEsIGl0 LT5waXhlbF93aWR0aCwgU0hSVF9NQVgpOwpAQCAtMjc3NTMsNiArMzI5NDUsMTggQEAgcHJvZHVj ZV94d2lkZ2V0X2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0 LT5nbHlwaF9yb3ctPmdseXBoc1thcmVhICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0 LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworICAgICAg Z2x5cGgtPmxudW0gPSBpdC0+bG51bTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog CSAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9i amVjdCA9IGl0LT5vYmplY3Q7CiAJICBnbHlwaC0+cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5k cyAoLTEsIGl0LT5waXhlbF93aWR0aCwgU0hSVF9NQVgpOwpAQCAtMjc4MzksNiArMzMwNDMsMTgg QEAgYXBwZW5kX3N0cmV0Y2hfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIExpc3BfT2JqZWN0IG9iamVj dCwKIAkgICAgd2lkdGggLT0gaXQtPmZpcnN0X3Zpc2libGVfeCAtIGl0LT5jdXJyZW50X3g7CiAJ ICBlYXNzZXJ0ICh3aWR0aCA+IDApOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsK KyAgICAgIGdseXBoLT5ieXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKyAgICAgIGdseXBoLT5s bnVtID0gaXQtPmxudW07CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGds eXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmpl Y3QgPSBvYmplY3Q7CiAgICAgICAvKiBGSVhNRTogSXQgd291bGQgYmUgYmV0dGVyIHRvIHVzZSBU WVBFX01BWCBoZXJlLCBidXQKQEAgLTI4MjkzLDYgKzMzNTA5LDE4IEBAIGFwcGVuZF9nbHlwaGxl c3NfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIGludCBmYWNlX2lkLCBib29sIGZvcl9ub19mb250LCBp bnQgbGVuLAogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBo c1thcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+ Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisgICAgICBnbHlwaC0+bG51bSA9IGl0LT5sbnVt OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9 IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVj dDsKICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93aWR0aCA8PSBTSFJUX01BWCk7CkBAIC0yOTM0 MywxMCArMzQ1NzEsMjAgQEAgZ3VpX2luc2VydF9nbHlwaHMgKHN0cnVjdCB3aW5kb3cgKncsIHN0 cnVjdCBnbHlwaF9yb3cgKnVwZGF0ZWRfcm93LAogCiAgIC8qIFdyaXRlIHRoZSBnbHlwaHMuICAq LwogICBocG9zID0gc3RhcnQgLSByb3ctPmdseXBoc1t1cGRhdGVkX2FyZWFdOworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGlmICghbWNf cmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgdXBkYXRlZF9hcmVhLCB3LT5v dXRwdXRfY3Vyc29yLngsCisgICAgICAgICAgICAgICAgICAgICAgaHBvcywgaHBvcyArIGxlbiwg ZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEdVSV9JTlNFUlRfR0xZUEhTKSkKICAgZHJhd19nbHlw aHMgKHcsIHctPm91dHB1dF9jdXJzb3IueCwgcm93LCB1cGRhdGVkX2FyZWEsCiAJICAgICAgIGhw b3MsIGhwb3MgKyBsZW4sCiAJICAgICAgIERSQVdfTk9STUFMX1RFWFQsIDApOwogCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEFkdmFuY2UgdGhlIG91dHB1dCBjdXJzb3IuICAq LwogICB3LT5vdXRwdXRfY3Vyc29yLmhwb3MgKz0gbGVuOwogICB3LT5vdXRwdXRfY3Vyc29yLngg Kz0gc2hpZnRfYnlfd2lkdGg7CkBAIC0yOTc3Miw5ICszNTAxMCwxOSBAQCBndWlfZml4X292ZXJs YXBwaW5nX2FyZWEgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkg IHdoaWxlIChpIDwgcm93LT51c2VkW2FyZWFdCiAJCSAmJiByb3ctPmdseXBoc1thcmVhXVtpXS5v dmVybGFwc192ZXJ0aWNhbGx5X3ApOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBpZiAoIW1jX3JlZHJhd19yb3cgKHcsIHctPmN1 cnJlbnRfbWF0cml4LCByb3csIGFyZWEsIHN0YXJ0X3gsIHN0YXJ0LCBpLAorICAgICAgICAgIGZh bHNlLCBEUkFXX05PUk1BTF9URVhULCBHVUlfRklYX09WRVJMQVBQSU5HX0FSRUEpKQogCSAgZHJh d19nbHlwaHMgKHcsIHN0YXJ0X3gsIHJvdywgYXJlYSwKIAkJICAgICAgIHN0YXJ0LCBpLAogCQkg ICAgICAgRFJBV19OT1JNQUxfVEVYVCwgb3ZlcmxhcHMpOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAJfQogICAgICAgZWxzZQogCXsKQEAgLTMwMDI1LDEwICszNTI3MywyMCBAQCBk aXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIG9uLAogICBuZXdf Y3Vyc29yX3R5cGUgPSBnZXRfd2luZG93X2N1cnNvcl90eXBlICh3LCBnbHlwaCwKIAkJCQkJICAg ICZuZXdfY3Vyc29yX3dpZHRoLCAmYWN0aXZlX2N1cnNvcik7CiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgLyogSWYgY3Vyc29yIGlzIGN1 cnJlbnRseSBiZWluZyBzaG93biBhbmQgd2UgZG9uJ3Qgd2FudCBpdCB0byBiZSBvcgogICAgICBp dCBpcyBpbiB0aGUgd3JvbmcgcGxhY2UsIG9yIHRoZSBjdXJzb3IgdHlwZSBpcyBub3Qgd2hhdCB3 ZSB3YW50LAogICAgICBlcmFzZSBpdC4gICovCiAgIGlmICh3LT5waHlzX2N1cnNvcl9vbl9wCisg ICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQor ICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkK KyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisg ICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW01DX0NBQ0hFXSA9PSAwCisgICAgICAm JiB3LT5tY19tYXRyaXguY3Vyc29yc191c2VkW0NIX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5t Y19tYXRyaXguY3Vyc29yc191c2VkW0ZDX0NBQ0hFXSA9PSAwCiAgICAgICAmJiAoIW9uCiAJICB8 fCB3LT5waHlzX2N1cnNvci54ICE9IHgKIAkgIHx8IHctPnBoeXNfY3Vyc29yLnkgIT0geQpAQCAt MzAwNDEsNiArMzUyOTksOSBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2luZG93 ICp3LCBib29sIG9uLAogCSAgICAgICYmIG5ld19jdXJzb3Jfd2lkdGggIT0gdy0+cGh5c19jdXJz b3Jfd2lkdGgpKSkKICAgICBlcmFzZV9waHlzX2N1cnNvciAodyk7CiAKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKICAgLyogRG9uJ3QgY2hlY2sgcGh5c19jdXJzb3Jfb25fcCBoZXJlIGJl Y2F1c2UgdGhhdCBmbGFnIGlzIG9ubHkgc2V0CiAgICAgIHRvIGZhbHNlIGluIHNvbWUgY2FzZXMg d2hlcmUgd2Uga25vdyB0aGF0IHRoZSBjdXJzb3IgaGFzIGJlZW4KICAgICAgY29tcGxldGVseSBl cmFzZWQsIHRvIGF2b2lkIHRoZSBleHRyYSB3b3JrIG9mIGVyYXNpbmcgdGhlIGN1cnNvcgpAQCAt MzAwNTksOSArMzUzMjAsMjMgQEAgZGlzcGxheV9hbmRfc2V0X2N1cnNvciAoc3RydWN0IHdpbmRv dyAqdywgYm9vbCBvbiwKICAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB2cG9zOwogICAgIH0K IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICBpZiAoTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAg ICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkpCisg ICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2NvbmYpKQorICAg ICAgJiYgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtNQ19DQUNIRV0gPT0gMAorICAgICAgJiYg dy0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPT0gMAorICAgICAgJiYgdy0+bWNf bWF0cml4LmN1cnNvcnNfdXNlZFtGQ19DQUNIRV0gPT0gMCkKICAgRlJBTUVfUklGIChmKS0+ZHJh d193aW5kb3dfY3Vyc29yICh3LCBnbHlwaF9yb3csIHgsIHksCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbmV3X2N1cnNvcl90eXBlLCBuZXdfY3Vyc29yX3dpZHRoLAogICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uLCBhY3RpdmVfY3Vyc29yKTsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAKQEAgLTMwMTU0LDcgKzM1NDI5LDE4 IEBAIGRyYXdfcm93X3dpdGhfbW91c2VfZmFjZSAoc3RydWN0IHdpbmRvdyAqdywgaW50IHN0YXJ0 X3gsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0KICAg aWYgKEZSQU1FX1dJTkRPV19QIChYRlJBTUUgKHctPmZyYW1lKSkpCiAgICAgeworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICBpZiAo IW1jX3JlZHJhd19yb3cgKHcsIHctPmN1cnJlbnRfbWF0cml4LCByb3csIFRFWFRfQVJFQSwgc3Rh cnRfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRfaHBvcywgZW5kX2hwb3MsIGZh bHNlLCBkcmF3LCBEUkFXX1JPV19XSVRIX01PVVNFX0ZBQ0UpKQogICAgICAgZHJhd19nbHlwaHMg KHcsIHN0YXJ0X3gsIHJvdywgVEVYVF9BUkVBLCBzdGFydF9ocG9zLCBlbmRfaHBvcywgZHJhdywg MCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIHJldHVybjsKICAgICB9 CiAjZW5kaWYKQEAgLTMyMjE0LDExICszNzUwMCwyMyBAQCBleHBvc2VfYXJlYSAoc3RydWN0IHdp bmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIs CiAgIHN0cnVjdCBnbHlwaCAqbGFzdDsKICAgaW50IGZpcnN0X3gsIHN0YXJ0X3gsIHg7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgaWYg KGFyZWEgPT0gVEVYVF9BUkVBICYmIHJvdy0+ZmlsbF9saW5lX3ApCisgICAgeworICAgICAgaWYg KCFtY19yZWRyYXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgcm93LCBhcmVhLCAwLCAwLCBy b3ctPnVzZWRbYXJlYV0sCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZhbHNlLCBEUkFXX05P Uk1BTF9URVhULCBFWFBPU0VfQVJFQV9PTkUpKQogICAgIC8qIElmIHJvdyBleHRlbmRzIGZhY2Ug dG8gZW5kIG9mIGxpbmUgd3JpdGUgdGhlIHdob2xlIGxpbmUuICAqLwogICAgIGRyYXdfZ2x5cGhz ICh3LCAwLCByb3csIGFyZWEsCiAJCSAwLCByb3ctPnVzZWRbYXJlYV0sCiAJCSBEUkFXX05PUk1B TF9URVhULCAwKTsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgZWxz ZQogICAgIHsKICAgICAgIC8qIFNldCBTVEFSVF9YIHRvIHRoZSB3aW5kb3ctcmVsYXRpdmUgc3Rh cnQgcG9zaXRpb24gZm9yIGRyYXdpbmcgZ2x5cGhzIG9mCkBAIC0zMjI1MCwxMSArMzc1NDgsMjQg QEAgZXhwb3NlX2FyZWEgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywg Y29uc3QgRW1hY3NfUmVjdGFuZ2xlICpyLAogCSAgKytsYXN0OwogCX0KIAorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwogICAgICAgLyogUmVwYWlu dC4gICovCi0gICAgICBpZiAobGFzdCA+IGZpcnN0KQorCisgICAgICAvKiBGbG9hdGluZyBmYWtl IGN1cnNvcnMgd2lsbCBleGlzdCB3aGVuIChsYXN0ID09IGZpcnN0KS4gKi8KKyAgICAgIGlmICgh bWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgYXJlYSwgZmlyc3RfeCAt IHN0YXJ0X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZpcnN0IC0gcm93LT5nbHlwaHNb YXJlYV0sIGxhc3QgLSByb3ctPmdseXBoc1thcmVhXSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEVYUE9TRV9BUkVBX1RXTykKKyAgICAgICAgICAm JiBsYXN0ID4gZmlyc3QpCiAJZHJhd19nbHlwaHMgKHcsIGZpcnN0X3ggLSBzdGFydF94LCByb3cs IGFyZWEsCiAJCSAgICAgZmlyc3QgLSByb3ctPmdseXBoc1thcmVhXSwgbGFzdCAtIHJvdy0+Z2x5 cGhzW2FyZWFdLAogCQkgICAgIERSQVdfTk9STUFMX1RFWFQsIDApOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKworCiAgICAgfQogfQogCkBAIC0zMjI2OCwxMCArMzc1NzksMjIgQEAgZXhw b3NlX2xpbmUgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgY29uc3Qg RW1hY3NfUmVjdGFuZ2xlICpyKQogewogICBlYXNzZXJ0IChyb3ctPmVuYWJsZWRfcCk7CiAKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICAgaWYg KHJvdy0+bW9kZV9saW5lX3AgfHwgdy0+cHNldWRvX3dpbmRvd19wKQorICAgIHsKKyAgICAgIGlm ICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJvdywgVEVYVF9BUkVBLCAw LCAwLAorICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnVzZWRbVEVYVF9BUkVBXSwgZmFs c2UsIERSQVdfTk9STUFMX1RFWFQsIEVYUE9TRV9MSU5FKSkKICAgICBkcmF3X2dseXBocyAodywg MCwgcm93LCBURVhUX0FSRUEsCiAJCSAwLCByb3ctPnVzZWRbVEVYVF9BUkVBXSwKIAkJIERSQVdf Tk9STUFMX1RFWFQsIDApOworICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICBlbHNlCiAgICAgewogICAgICAgaWYgKHJvdy0+dXNlZFtMRUZUX01BUkdJTl9BUkVBXSkKQEAg LTMyODE5LDYgKzM4MTQyLDIyIEBAIGd1aV9pbnRlcnNlY3RfcmVjdGFuZ2xlcyAoY29uc3QgRW1h Y3NfUmVjdGFuZ2xlICpyMSwgY29uc3QgRW1hY3NfUmVjdGFuZ2xlICpyMiwKIHZvaWQKIHN5bXNf b2ZfeGRpc3AgKHZvaWQpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX3Jvdyk7CisKKyAg ZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX21hdHJpeCk7CisKKyAgZGVmc3ViciAoJlNtY19jdXJy ZW50X2NvbHVtbik7CisKKyAgZGVmc3ViciAoJlNtY19zdGRlcnIpOworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioq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MgKHMpOworICAgICAgcy0+c3RpcHBsZWRfcCA9IHMt PmZhY2UtPnN0aXBwbGUgIT0gMDsKKyAgICB9CisgIGVsc2UgaWYgKHMtPmhsID09IERSQVdfSU1B R0VfUkFJU0VECisgICAgICAgICAgIHx8IHMtPmhsID09IERSQVdfSU1BR0VfU1VOS0VOKQorICAg IHsKKyAgICAgIHMtPmdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICBzLT5zdGlwcGxlZF9wID0gcy0+ ZmFjZS0+c3RpcHBsZSAhPSAwOworICAgIH0KKyAgZWxzZQorICAgIGVtYWNzX2Fib3J0ICgpOwor ICAvKiBHQyBtdXN0IGhhdmUgYmVlbiBzZXQuICovCisgIGVhc3NlcnQgKHMtPmdjICE9IDApOwor fQorCisvKiBEcmF3IGEgaG9sbG93IGJveCBjdXJzb3Igb24gd2luZG93IFcgaW4gZ2x5cGggcm93 IFJPVy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfaG9sbG93X2N1cnNvciAoc3RydWN0IHdp bmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3csCisgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGludCBm eSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGludCBoKQoreworICBzdHJ1Y3QgZnJhbWUg KmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICBzdHJ1Y3QgeF9kaXNwbGF5X2luZm8g KmRweWluZm8gPSBGUkFNRV9ESVNQTEFZX0lORk8gKGYpOworICBEaXNwbGF5ICpkcHkgPSBGUkFN RV9YX0RJU1BMQVkgKGYpOworICBYR0NWYWx1ZXMgeGdjdjsKKyAgR0MgZ2M7CisgIC8qIEdldCB0 aGUgZ2x5cGggdGhlIGN1cnNvciBpcyBvbi4gIElmIHdlIGNhbid0IHRlbGwgYmVjYXVzZQorICAg ICB0aGUgY3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GZ4OworICBpbnQgcnkgPSBmeTsKKyAgaW50IHJ3ID0g d2QgLSAxOworICBpbnQgcmggPSBoIC0gMTsKKyAgeF9kcmF3X3JlY3RhbmdsZSAoZiwgZ2MsIHJ4 LCByeSwgcncsIHJoKTsKKy8qCisgIGZwcmludGYgKHN0ZGVyciwgIm1jX3hfZHJhd19ob2xsb3df Y3Vyc29yOiAgcnggKCVkKSB8IHJ5ICglZCkgfCBydyAoJWQpIHwgcmggKCVkKVxuIiwKKyAgICAg ICAgICAgICAgICAgICAgcngsIHJ5LCBydywgcmgpOworKi8KKyAgeF9yZXNldF9jbGlwX3JlY3Rh bmdsZXMgKGYsIGdjKTsKK30KKworLyogRHJhdyBhIGJhciBjdXJzb3Igb24gd2luZG93IFcgaW4g Z2x5cGggcm93IFJPVy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfYmFyX2N1cnNvciAoc3Ry dWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhf cm93ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGlu dCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGludCBoLAorICAgICAgICAgICAgICAg ICAgICAgIGludCB3aWR0aCwgZW51bSBtY19jdXJzb3JfdHlwZSBraW5kLCBib29sIGN1cnNvcl9n Y19pbnZpc2libGVfb2theV9wKQoreworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZy YW1lKTsKKyAgLyogSWYgY3Vyc29yIGlzIG91dCBvZiBib3VuZHMsIGRvbid0IGRyYXcgZ2FyYmFn ZS4gIFRoaXMgY2FuIGhhcHBlbgorICAgICBpbiBtaW5pLWJ1ZmZlciB3aW5kb3dzIHdoZW4gc3dp dGNoaW5nIGJldHdlZW4gZWNobyBhcmVhIGdseXBocworICAgICBhbmQgbWluaS1idWZmZXIuICov CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywg bWF0cml4LCByb3csIGhwb3MsIHZwb3MpOworICBpZiAoY3Vyc29yX2dseXBoID09IE5VTEwpCisg ICAgcmV0dXJuOworICAvKiBFeHBlcmltZW50YWwgYXZvaWRhbmNlIG9mIGN1cnNvciBvbiB4d2lk Z2V0LiAqLworICBpZiAoY3Vyc29yX2dseXBoLT50eXBlID09IFhXSURHRVRfR0xZUEgpCisgICAg cmV0dXJuOworICAvKiBJZiBvbiBhbiBpbWFnZSwgZHJhdyBsaWtlIGEgbm9ybWFsIGN1cnNvci4g IFRoYXQncyB1c3VhbGx5IGJldHRlcgorICAgICB2aXNpYmxlIHRoYW4gZHJhd2luZyBhIGJhciwg ZXNwLiBpZiB0aGUgaW1hZ2UgaXMgbGFyZ2Ugc28gdGhhdAorICAgICB0aGUgYmFyIG1pZ2h0IG5v dCBiZSBpbiB0aGUgd2luZG93LiAqLworICBpZiAoY3Vyc29yX2dseXBoLT50eXBlID09IElNQUdF X0dMWVBIKQorICAgIHsKKyAgICAgIHN0cnVjdCBtY19SR0IgbHNsID0gey5yZWQgPSAtMS4wLCAu Z3JlZW4gPSAtMS4wLCAuYmx1ZSA9IC0xLjB9OworICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhf Zmxhdm9yID0gTk9fRkxBVk9SOworICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlw ZSA9IE1DX0hPTExPV19CT1g7CisgICAgICBib29sIGFjdGl2ZV9wID0gZmFsc2U7CisgICAgICBi b29sIGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywg bWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsI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AgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2Ug aWYgKGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBl bnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcs IGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAg ICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0Vf RlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAg WFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAg ICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kKTsKKyAgICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFhY3RpdmVfcCkKKyAgICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xs b3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIr LXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9G Uk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAg ICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngt PmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAg ICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRw dXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kKTsK KyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAg ICAgIC8qIEZvcmNlIGBtY194X3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX2djJy4gKi8KKyAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsK KyAgICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VS U09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOwor ICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRf ZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg eGdjdi5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAg IC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4g Ki8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhl bDsKKyAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAg ICAgICBlbHNlIGlmIChjdXJzb3JfZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEggJiYgbHNsLnJl ZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgICAgewor ICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJz b3JfcGl4ZWwnLiAqLworICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVs ID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywg bWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAg ICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVs OworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJyBi eSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgICAgIGZ1b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hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYt ZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93 X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOwor ICAgICAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYp LCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdy b3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElT UExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9yZWdp b25fYmV0d2Vlbl9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICBlbHNlIGlmIChhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9m YWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1 cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVj dCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3Rp dmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJB TUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfYWN0 aXZlX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg aG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQorICAgICAgICAgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9s bG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgi Ky1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAg ICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBG QUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1 dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQpOwor ICAgICAgICAgICAgICAgICAgICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZ IChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfaW5hY3RpdmVfZmFjZS0+ YmFja2dyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGJs b2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAvKiBGb3JjZSBgbWNfeF9zZXRfY3Vyc29yX2dj JyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycuICovCisgICAgICAgICAg ICAgIGJvb2wgY3Vyc29yX2djX3AgPSB0cnVlOworICAgICAgICAgICAgICBtY19kcmF3X2N1cnNv cl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNv cl90eXBlLCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJ U1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuZm9yZWdyb3VuZCk7 CisgICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuYmFja2dyb3VuZCk7CisgICAgICAgICAgICAg IHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIC8qIERyYXcgdGhlIGZyYW1lIGFyb3Vu ZCB0aGUgYm94LiAqLworICAgICAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAodywg bWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAgICAg ICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfSE9MTE9XX0JPWDoKKyAgICB7 CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49 IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY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b3IucGl4ZWwpOworICAgICAgICAgIC8qIEZvcmNlIGBtY194X3Nl dF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJy4gKi8K KyAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICBtY19kcmF3X2N1 cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBs c2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vyc29y X3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAgICAgIFhTZXRGb3JlZ3Jv dW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhn Y3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExB WSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgeGdjdi5iYWNrZ3JvdW5kKTsKKyAg ICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAg ICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gZmFsc2U7CisgICAgICAgICAg ICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4LCBo cG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhf Zmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAgICAg ICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNfQkFSOgorICAgIHsKKyAgICAg IGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAg ICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf cGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVf b2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4 LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxl X29rYXlfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3Jp Z2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7 CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gZmFsc2U7Cisg ICAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aCwgY3Vyc29yX3dpZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAg ICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IQkFSOgorICAgIHsK KyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0g MCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0 X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZp c2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywg bWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2lu dmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhl bCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAg ICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCA9IGZh bHNlOworICAgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4 LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGgsIGN1cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5 X3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAgICBkZWZhdWx0OgorICAg ICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KKyAgICAgICAgfQorI2lmZGVmIEhBVkVfWF9JMThOCisg IGlmICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVkX3dpbmRvdykpCisgICAgaWYgKEZSQU1FX1hJ QyAoZikgJiYgKEZSQU1FX1hJQ19TVFlMRSAoZikgJiBYSU1QcmVlZGl0UG9zaXRpb24pKQorICAg ICAgeGljX3NldF9wcmVlZGl0YXJlYSAodywgeCwgeSk7CisjZW5kaWYKKyAgICB9CisgIFhGbHVz aCAoRlJBTUVfWF9ESVNQTEFZIChmKSk7Cit9CisKKy8qIERyYXcgc3RyZXRjaCBnbHlwaCBzdHJp bmcgUy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfc3RyZXRjaF9nbHlwaF9zdHJpbmcgKHN0 cnVjdCBnbHlwaF9zdHJpbmcgKnMpCit7CisgIGVhc3NlcnQgKHMtPmZpcnN0X2dseXBoLT50eXBl ID09IFNUUkVUQ0hfR0xZUEgpOworICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICYm ICF4X3N0cmV0Y2hfY3Vyc29yX3ApCisgICAgeworICAgICAgLyogSWYgYHgtc3RyZXRjaC1jdXJz b3InIGlzIG5pbCwgZG9uJ3QgZHJhdyBhIGJsb2NrIGN1cnNvciBhcyB3aWRlIGFzIHRoZQorICAg ICAgc3RyZXRjaCBnbHlwaC4gKi8KKyAgICAgIGludCB3aWR0aCwgYmFja2dyb3VuZF93aWR0aCA9 IHMtPmJhY2tncm91bmRfd2lkdGg7CisgICAgICBpbnQgeCA9IHMtPng7CisgICAgICBpZiAoIXMt PnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeworICAgICAgICAgIGludCBsZWZ0X3ggPSB3aW5k b3dfYm94X2xlZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAgIGlmICh4IDwg bGVmdF94KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRoIC09 IGxlZnRfeCAtIHg7CisgICAgICAgICAgICAgIHggPSBsZWZ0X3g7CisgICAgICAgICAgICB9Cisg ICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8qIEluIFIy TCByb3dzLCBkcmF3IHRoZSBjdXJzb3Igb24gdGhlIHJpZ2h0IGVkZ2Ugb2YgdGhlCisgICAgICAg ICAgICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgICAgICAgaW50IHJpZ2h0X3ggPSB3aW5k b3dfYm94X3JpZ2h0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAgICAgaWYgKHggKyBiYWNr Z3JvdW5kX3dpZHRoID4gcmlnaHRfeCkKKyAgICAgICAgICAgICAgYmFja2dyb3VuZF93aWR0aCAt PSB4IC0gcmlnaHRfeDsKKyAgICAgICAgICAgIHggKz0gYmFja2dyb3VuZF93aWR0aDsKKyAgICAg ICAgICB9CisgICAgICB3aWR0aCA9IG1pbiAoRlJBTUVfQ09MVU1OX1dJRFRIIChzLT5mKSwgYmFj a2dyb3VuZF93aWR0aCk7CisgICAgICBpZiAocy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB4 IC09IHdpZHRoOworICAgICAgLyogRHJhdyBjdXJzb3IuICovCisgICAgICB4X2RyYXdfZ2x5cGhf c3RyaW5nX2JnX3JlY3QgKHMsIHgsIHMtPnksIHdpZHRoLCBzLT5oZWlnaHQpOworICAgICAgLyog Q2xlYXIgcmVzdCB1c2luZyB0aGUgR0Mgb2YgdGhlIG9yaWdpbmFsIG5vbi1jdXJzb3IgZmFjZS4g Ki8KKyAgICAgIGlmICh3aWR0aCA8IGJhY2tncm91bmRfd2lkdGgpCisgICAgICAgIHsKKyAgICAg ICAgICBpbnQgeSA9IHMtPnk7CisgICAgICAgICAgaW50IHcgPSBiYWNrZ3JvdW5kX3dpZHRoIC0g d2lkdGgsIGggPSBzLT5oZWlnaHQ7CisgICAgICAgICAgWFJlY3RhbmdsZSByOworICAgICAgICAg IEdDIGdjOworICAgICAgICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICAgICAg eCArPSB3aWR0aDsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB4ID0gcy0+eDsKKyAgICAg ICAgICBpZiAocy0+cm93LT5tb3VzZV9mYWNlX3AKKyAgICAgICAgICAgICAgJiYgY3Vyc29yX2lu X21vdXNlX2ZhY2VfcCAocy0+dykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHhfc2V0 X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAgICAgICAgICBnYyA9IHMtPmdjOworICAgICAgICAg ICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGdjID0gcy0+ZmFjZS0+Z2M7CisgICAg ICAgICAgZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsICZyKTsKKyAgICAgICAgICB4X3Nl dF9jbGlwX3JlY3RhbmdsZXMgKHMtPmYsIGdjLCAmciwgMSk7CisgICAgICAgICAgaWYgKHMtPmZh Y2UtPnN0aXBwbGUpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8qIEZpbGwgYmFja2dy b3VuZCB3aXRoIGEgc3RpcHBsZSBwYXR0ZXJuLiAqLworICAgICAgICAgICAgICBYU2V0RmlsbFN0 eWxlIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBnYywgRmlsbE9wYXF1ZVN0aXBwbGVkKTsKKyAg ICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAocy0+ZiwgZ2MsIHgsIHksIHcsIGgpOworICAg ICAgICAgICAgICBYU2V0RmlsbFN0eWxlIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBnYywgRmls bFNvbGlkKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICBYR2V0R0NWYWx1ZXMg KEZSQU1FX1hfRElTUExBWSAocy0+ZiksIGdjLCBHQ0ZvcmVncm91bmQgfCBHQ0JhY2tncm91bmQs ICZ4Z2N2KTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKE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Ag PSB0cnVlOworICAgICAgZWxzZQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91 bmQgKHMsIHRydWUpOworICAgICAgeF9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdy b3VuZCAocyk7CisgICAgICBicmVhazsKKyAgICBjYXNlIEdMWVBITEVTU19HTFlQSDoKKyAgICAg IGlmIChzLT5mb3Jfb3ZlcmxhcHMpCisgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0 cnVlOworICAgICAgZWxzZQorICAgICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQg KHMsIHRydWUpOworICAgICAgeF9kcmF3X2dseXBobGVzc19nbHlwaF9zdHJpbmdfZm9yZWdyb3Vu ZCAocyk7CisgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7 CisgICAgfQorICBpZiAoIXMtPmZvcl9vdmVybGFwcykKKyAgICB7CisgICAgICAvKiBEcmF3IHVu ZGVybGluZS4gKi8KKyAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfcCkKKyAgICAgICAgewor ICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX1dBVkUp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVm YXVsdGVkX3ApCisgICAgICAgICAgICAgICAgeF9kcmF3X3VuZGVyd2F2ZSAocyk7CisgICAgICAg ICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBYR0NWYWx1 ZXMgeGdjdjsKKyAgICAgICAgICAgICAgICAgIFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQTEFZ IChzLT5mKSwgcy0+Z2MsIEdDRm9yZWdyb3VuZCwgJnhnY3YpOworICAgICAgICAgICAgICAgICAg WFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT51 bmRlcmxpbmVfY29sb3IpOworICAgICAgICAgICAgICAgICAgeF9kcmF3X3VuZGVyd2F2ZSAocyk7 CisgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChzLT5m KSwgcy0+Z2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0Vf VU5ERVJfTElORSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0 aGlja25lc3MsIHBvc2l0aW9uOworICAgICAgICAgICAgICBpbnQgeTsKKyAgICAgICAgICAgICAg aWYgKHMtPnByZXYgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3AKKyAgICAgICAgICAgICAg ICAgICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkK KyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAvKiBXZSB1c2UgdGhlIHNhbWUg dW5kZXJsaW5lIHN0eWxlIGFzIHRoZSBwcmV2aW91cyBvbmUuICovCisgICAgICAgICAgICAgICAg ICB0aGlja25lc3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAg ICAgICAgcG9zaXRpb24gPSBzLT5wcmV2LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgLyogR2V0IHRoZSB1bmRlcmxpbmUgdGhpY2tuZXNzLiAgRGVmYXVsdCBpcyAxIHBp eGVsLiAqLworICAgICAgICAgICAgICAgICAgaWYgKHMtPmZvbnQgJiYgcy0+Zm9udC0+dW5kZXJs aW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IHMtPmZv bnQtPnVuZGVybGluZV90aGlja25lc3M7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7CisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRl cmxpbmVfYXRfZGVzY2VudF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChz LT5oZWlnaHQgLSB0aGlja25lc3MpIC0gKHMtPnliYXNlIC0gcy0+eSk7CisgICAgICAgICAgICAg ICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAv KiBHZXQgdGhlIHVuZGVybGluZSBwb3NpdGlvbi4gIFRoaXMgaXMgdGhlIHJlY29tbWVuZGVkCisg ICAgICAgICAgICAgICAgICAgICAgICAgdmVydGljYWwgb2Zmc2V0IGluIHBpeGVscyBmcm9tIHRo ZSBiYXNlbGluZSB0byB0aGUgdG9wIG9mCisgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHVu ZGVybGluZS4gIFRoaXMgaXMgYSBzaWduZWQgdmFsdWUgYWNjb3JkaW5nIHRvIHRoZQorICAgICAg ICAgICAgICAgICAgICAgICAgIHNwZWNzLCBhbmQgaXRzIGRlZmF1bHQgaXMKKyAgICAgICAgICAg ICAgICAgICAgICAgICBST1VORCAoKG1heGltdW0gZGVzY2VudCkgLyAyKSwgd2l0aAorICAgICAg ICAgICAgICAgICAgICAgICAgIFJPVU5EKHgpID0gZmxvb3IgKHggKyAwLjUpICAqLworICAgICAg ICAgICAgICAgICAgICAgIGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRpb25fcHJvcGVydGllcwor ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGlu ZV9wb3NpdGlvbiA+PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBzLT5m b250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAo cy0+Zm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmZvbnQtPmRl c2NlbnQgKyAxKSAvIDI7CisgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAg ICAgICAgICAgICAgcG9zaXRpb24gPSB1bmRlcmxpbmVfbWluaW11bV9vZmZzZXQ7CisgICAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbWF4IChwb3NpdGlv biwgdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIC8qIENoZWNrIHRoZSBzYW5pdHkgb2YgdGhpY2tuZXNzIGFuZCBwb3NpdGlvbi4gIFdl IHNob3VsZAorICAgICAgICAgICAgICAgICBhdm9pZCBkcmF3aW5nIHVuZGVybGluZSBvdXQgb2Yg dGhlIGN1cnJlbnQgbGluZSBhcmVhLiAqLworICAgICAgICAgICAgICBpZiAocy0+eSArIHMtPmhl aWdodCA8PSBzLT55YmFzZSArIHBvc2l0aW9uKQorICAgICAgICAgICAgICAgIHBvc2l0aW9uID0g KHMtPmhlaWdodCAtIDEpIC0gKHMtPnliYXNlIC0gcy0+eSk7CisgICAgICAgICAgICAgIGlmIChz LT55ICsgcy0+aGVpZ2h0IDwgcy0+eWJhc2UgKyBwb3NpdGlvbiArIHRoaWNrbmVzcykKKyAgICAg ICAgICAgICAgICB0aGlja25lc3MgPSAocy0+eSArIHMtPmhlaWdodCkgLSAocy0+eWJhc2UgKyBw b3NpdGlvbik7CisgICAgICAgICAgICAgIHMtPnVuZGVybGluZV90aGlja25lc3MgPSB0aGlja25l c3M7CisgICAgICAgICAgICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9IHBvc2l0aW9uOworICAg ICAgICAgICAgICB5ID0gcy0+eWJhc2UgKyBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaWYgKHMt PmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICB4X2ZpbGxfcmVj dGFuZ2xlIChzLT5mLCBzLT5nYywgcy0+eCwgeSwgcy0+d2lkdGgsIHRoaWNrbmVzcyk7CisgICAg ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBYR0NW YWx1ZXMgeGdjdjsKKyAgICAgICAgICAgICAgICAgIFhHZXRHQ1ZhbHVlcyAoRlJBTUVfWF9ESVNQ TEFZIChzLT5mKSwgcy0+Z2MsIEdDRm9yZWdyb3VuZCwgJnhnY3YpOworICAgICAgICAgICAgICAg ICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNl LT51bmRlcmxpbmVfY29sb3IpOworICAgICAgICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAo cy0+Ziwgcy0+Z2MsIHMtPngsIHksIHMtPndpZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAg ICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2 LmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAg fQorICAgICAgLyogRHJhdyBvdmVybGluZS4gKi8KKyAgICAgIGlmIChzLT5mYWNlLT5vdmVybGlu ZV9wKQorICAgICAgICB7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyBkeSA9IDAsIGggPSAxOwor ICAgICAgICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAg ICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMt PndpZHRoLCBoKTsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAgICAgICBYR2V0R0NWYWx1ZXMgKEZSQU1FX1hfRElT UExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVncm91bmQsICZ4Z2N2KTsKKyAgICAgICAgICAgICAg WFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT5v dmVybGluZV9jb2xvcik7CisgICAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMt PmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICAgICAgWFNldEZv cmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQp OworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAvKiBEcmF3IHN0cmlrZS10aHJvdWdo LiAqLworICAgICAgaWYgKHMtPmZhY2UtPnN0cmlrZV90aHJvdWdoX3ApCisgICAgICAgIHsKKyAg ICAgICAgICB1bnNpZ25lZCBsb25nIGggPSAxOworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZHkg PSAocy0+aGVpZ2h0IC0gaCkgLyAyOworICAgICAgICAgIGlmIChzLT5mYWNlLT5zdHJpa2VfdGhy b3VnaF9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMt PmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICBlbHNl CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAg ICAgICBYR2V0R0NWYWx1ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVn cm91bmQsICZ4Z2N2KTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElT UExBWSAocy0+ZiksIHMtPmdjLCBzLT5mYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvcik7CisgICAg ICAgICAgICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCBzLT55ICsgZHks IHMtPndpZHRoLCBoKTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElT UExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAgICAgICAgfQorICAg ICAgICB9CisgICAgICAvKiBEcmF3IHJlbGllZiBpZiBub3QgeWV0IGRyYXduLiAqLworICAgICAg aWYgKCFyZWxpZWZfZHJhd25fcCAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gpCisgICAg ICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19ib3ggKHMpOworICAgICAgaWYgKHMtPnByZXYpCisg ICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpwcmV2OworICAgICAgICAg IGZvciAocHJldiA9IHMtPnByZXY7IHByZXY7IHByZXYgPSBwcmV2LT5wcmV2KQorICAgICAgICAg ICAgaWYgKHByZXYtPmhsICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgcHJldi0+eCArIHBy ZXYtPndpZHRoICsgcHJldi0+cmlnaHRfb3ZlcmhhbmcgPiBzLT54KQorICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgLyogQXMgcHJldiB3YXMgZHJhd24gd2hpbGUgY2xpcHBlZCB0byBp dHMgb3duIGFyZWEsIHdlCisgICAgICAgICAgICAgICAgICAgbXVzdCBkcmF3IHRoZSByaWdodF9v dmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRy YXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IHByZXYtPmhsOworICAgICAgICAgICAgICAgIHByZXYtPmhs ID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfeF9zZXRfZ2x5cGhfc3RyaW5nX2djIChwcmV2 LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgICAgeF9zZXRfZ2x5cGhfc3RyaW5nX2NsaXBw aW5nX2V4YWN0bHkgKHMsIHByZXYpOworICAgICAgICAgICAgICAgIGlmIChwcmV2LT5maXJzdF9n bHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBIKQorICAgICAgICAgICAgICAgICAgeF9kcmF3X2dseXBo X3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICB4X2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2 KTsKKyAgICAgICAgICAgICAgICB4X3Jlc2V0X2NsaXBfcmVjdGFuZ2xlcyAocHJldi0+ZiwgcHJl di0+Z2MpOworICAgICAgICAgICAgICAgIHByZXYtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAg ICBwcmV2LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAg IGlmIChzLT5uZXh0KQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoX3N0cmluZyAq bmV4dDsKKyAgICAgICAgICBmb3IgKG5leHQgPSBzLT5uZXh0OyBuZXh0OyBuZXh0ID0gbmV4dC0+ bmV4dCkKKyAgICAgICAgICAgIGlmIChuZXh0LT5obCAhPSBzLT5obAorICAgICAgICAgICAgICAg ICYmIG5leHQtPnggLSBuZXh0LT5sZWZ0X292ZXJoYW5nIDwgcy0+eCArIHMtPndpZHRoKQorICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogQXMgbmV4dCB3aWxsIGJlIGRyYXduIHdo aWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLAorICAgICAgICAgICAgICAgICAgIHdlIG11c3Qg ZHJhdyB0aGUgbGVmdF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAg ICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IG5leHQtPmhsOworICAgICAgICAg ICAgICAgIG5leHQtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfeF9zZXRfZ2x5cGhf c3RyaW5nX2djIChuZXh0LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgICAgeF9zZXRfZ2x5 cGhfc3RyaW5nX2NsaXBwaW5nX2V4YWN0bHkgKHMsIG5leHQpOworICAgICAgICAgICAgICAgIGlm IChuZXh0LT5maXJzdF9nbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBIKQorICAgICAgICAgICAgICAg ICAgeF9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAgICAg ICBlbHNlCisgICAgICAgICAgICAgICAgICB4X2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19m b3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAgICAgICB4X3Jlc2V0X2NsaXBfcmVjdGFuZ2xl cyAobmV4dC0+ZiwgbmV4dC0+Z2MpOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gc2F2ZTsK KyAgICAgICAgICAgICAgICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgICAgICAgIG5l eHQtPmNsaXBfaGVhZCA9IHMtPm5leHQ7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg IH0KKyAgLyogUmVzZXQgY2xpcHBpbmcuICovCisgIHhfcmVzZXRfY2xpcF9yZWN0YW5nbGVzIChz LT5mLCBzLT5nYyk7CisgIHMtPm51bV9jbGlwcyA9IDA7Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1D VVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAvKiBEZWZhdWx0IHRvIHVz aW5nIFhJTSBpZiBhdmFpbGFibGUuICAqLwogI2lmZGVmIFVTRV9YSU0KIGJvb2wgdXNlX3hpbSA9 IHRydWU7CkBAIC0xMTA5LDYgKzIwMTAsMTYgQEAgc3RhdGljIHZvaWQKIHhfdXBkYXRlX2JlZ2lu IChzdHJ1Y3QgZnJhbWUgKmYpCiB7CiAgIC8qIE5vdGhpbmcgdG8gZG8uICAqLworCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3Vw ZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAv KiBEcmF3IGEgdmVydGljYWwgd2luZG93IGJvcmRlciBmcm9tICh4LHkwKSB0byAoeCx5MSkgICov CkBAIC0xMjU0LDYgKzIxNjUsMTYgQEAgeF91cGRhdGVfZW5kIChzdHJ1Y3QgZnJhbWUgKmYpCiAg IFhGbHVzaCAoRlJBTUVfWF9ESVNQTEFZIChmKSk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7CiAjZW5k aWYKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8K KworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKIH0KIAogLyogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgZnJvbSB2YXJpb3VzIHBs YWNlcyBpbiB4ZGlzcC5jCkBAIC0xMzIzOCw2ICsxNDE1OSwyMCBAQCBleHRlcm4gZnJhbWVfcGFy bV9oYW5kbGVyIHhfZnJhbWVfcGFybV9oYW5kbGVyc1tdOwogCiBzdGF0aWMgc3RydWN0IHJlZGlz cGxheV9pbnRlcmZhY2UgeF9yZWRpc3BsYXlfaW50ZXJmYWNlID0KICAgeworCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5 X2ludGVyZmFjZScgaW4gYHh0ZXJtLmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIg YXMgdGhlCitgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAg bWNfeF9kcmF3X3dpbmRvd19jdXJzb3IsCisgIG1jX3hfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB4X2ZyYW1lX3Bhcm1faGFuZGxlcnMsCiAg ICAgZ3VpX3Byb2R1Y2VfZ2x5cGhzLAogICAgIGd1aV93cml0ZV9nbHlwaHMsCg== --Multipart_Sat_May__2_13:50:18_2020-1--