From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs). Date: Tue, 16 Jul 2019 12:28:02 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Tue_Jul_16_12:28:01_2019-1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="50503"; mail-complaints-to="usenet@blaine.gmane.org" Cc: johnw@gnu.org, mbork@mbork.pl, rms@gnu.org, akioburns@icloud.com To: 22873@debbugs.gnu.org,17684@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 16 21:29:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hnT8Y-0009fW-Gn for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jul 2019 21:29:20 +0200 Original-Received: from localhost ([::1]:51910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnT8X-0006RU-Dz for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jul 2019 15:29:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50358) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnT8M-0006FM-7e for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 15:29:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnT8K-0003qf-6l for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 15:29:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42361) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnT8I-0003pw-MU for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 15:29:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnT8I-0004pm-Ga for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 15:29:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jul 2019 19:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22873 X-GNU-PR-Package: emacs Original-Received: via spool by 22873-submit@debbugs.gnu.org id=B22873.156330529318491 (code B ref 22873); Tue, 16 Jul 2019 19:29:02 +0000 Original-Received: (at 22873) by debbugs.gnu.org; 16 Jul 2019 19:28:13 +0000 Original-Received: from localhost ([127.0.0.1]:51176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnT7U-0004oA-4S for submit@debbugs.gnu.org; Tue, 16 Jul 2019 15:28:12 -0400 Original-Received: from gateway30.websitewelcome.com ([192.185.144.21]:34832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnT7R-0004nx-Ar for 22873@debbugs.gnu.org; Tue, 16 Jul 2019 15:28:10 -0400 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id CF00C11AB7 for <22873@debbugs.gnu.org>; Tue, 16 Jul 2019 14:28:08 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id nT7PhKvOUiQernT7QhmQUb; Tue, 16 Jul 2019 14:28:08 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ptBcZ3vpyVBKtKSpUFqv/7o7kIQjzo7rVnPwM2ynvfU=; b=XxubGpp95Pew2Ztlkgdl9OqsEw dAihHyB/AmaXpc5gPC+WgQJZbzYK0mZxWKXnJBOSXZHMoniIJ9fdLMbppioeJoGeR/DzN0BlOi+dm 9ZBt0GFfNeWyJyu8bA8Toqfv/aA3mnOcKN7mjTh0IwFNrfyE1OH0imIrRVi/eqqqtSh0DNcAv9hF4 nc4NmWSwv0uDB+Lh1/X8175GQB6Rp0Np9aKe8/X33BogEcjQS78Wm4slIMar8/IP5PhIktSjgsu4R VHkhhwjAA4a+ZkC3IgAy+MmqIFfIq8sqk4tTT12xW9x+eKufwAaTxwX7rCwfcWwXC3k/168KK+fxn cQBytj0w==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51359 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hnT7L-001oGk-Vf; Tue, 16 Jul 2019 14:28:07 -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: 1hnT7L-001oGk-Vf X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:51359 X-Source-Auth: lawlist X-Email-Count: 7 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163204 Archived-At: --Multipart_Tue_Jul_16_12:28:01_2019-1 Content-Type: text/plain; charset=US-ASCII VERSION: 022.000 [07/14/2019] CHANGELOG: - Fast forward from 04/08/2019 to 07/14/2019; i.e., the attached patch applies to a recent version of the master branch as of 07/14/2019. Each GUI port has been lightly tested to verify features 17684/22873 work as expected. - Added a new member of the `mc_contents` struct to record the `row_position`, which is now used (in part) by `mc_update_window_erase' to determine whether an AT_ZV / POST_ZV fake cursor is the same as the previous loop -- disregarding lack of equality of the `*.bytepos` and `*.charpos` struct members. An example where this is helpful is when a user adds / removes characters from the buffer, but does not add / remove a row. - As to features 17684/22873, removed all calls to CHECK_BUFFER. None of the buffer lisp objects are coming from the user (outside of C), so a `BUFFERP' check of `w->contents` is sufficient. - Added screen recordings of features 17684/22873. - Miscellaneous tidying-up of code. VIDEOS: w32: https://youtu.be/r3BdJVlsAnQ ns: https://youtu.be/bc1h8jtbXmw x11: https://youtu.be/aCIFhD2Xz5s SCREENSHOTS: https://www.lawlist.com/images/22873_17684_light_dark_backgrounds.png SETUP: Step 1: git clone -b master git://git.sv.gnu.org/emacs.git Step 2: In the new emacs folder, go back to an Emacs version from 07/14/2019: git reset --hard ac57c5093829ee09084c562bbbc1c412179be13d Step 3: From within the new emacs folder created in Step 1, apply the patch: git apply /path/to/the/patch.diff Step 4: ./autogen.sh Step 5: ./configure ... [your custom options] Step 6: make Step 7: make install USAGE: - For a minimal working example of built-in fake cursors, type: M-x mc-test ;;; TURN ON FAKE CURSORS (buffer position, cursor-type, cursor color): (setq mc-conf '((1 "hbar" "magenta") (2 "bar" "purple") (3 "box" "#00FF00") (4 "hollow" "#0000FF") (5 ("hbar" 3) [1.0 0.0 1.0]) (6 ("bar" 3) [0.0 1.0 1.0]) (7 "framed" "OrangeRed")))) ;;; TURN OFF FAKE CURSORS: (setq mc-conf nil) - To try out both the crosshairs feature and the visible fill column indicator feature, type: M-x +-mode - To try out just the visible fill column indicator feature, type: M-x fc-mode - To try out built-in fake cursors with Magnar Sveen's multiple-cursors package, that package must be installed. If the multiple-cursors package is already installed, then just (require 'crosshairs) and `crosshairs.el` will redefine a few of the multiple-cursors functions and set up a few keyboard shortcuts. If the multiple-cursors package by Magnar Sveen is not already installed, then here are two easy ways to install that package: Type: M-x mc-install OR, evaluate the following snippet: (progn (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'multiple-cursors) (mc/built-in-cursors)) TODO: - When an idle-timer fires and point is at the end of a horizontally scrolled line in a narrow window, the temporary horizontal scroll is canceled. Create a minimal working example and file a bug report. (progn (defun test () (interactive) (let ((ov (make-overlay (point) (1+ (point)) nil t t))) (overlay-put ov 'face '(:foreground "red")))) (global-set-key [f5] 'test) (split-window-horizontally) (switch-to-buffer (get-buffer-create "foo")) (setq bidi-display-reordering nil) (setq-local auto-hscroll-mode 'current-line) (dotimes (i 80) (insert (char-to-string (+ 65 i))))) - `ns_draw_window_cursor' calls `ns_clip_to_rect', which does _not_ take `row->clip` into consideration when drawing cursors with `NSRectFill'. When it comes time to draw glyphs on top of the box/hollow family of cursors, `row->clip` is taken into consideration by `get_glyph_string_clip'. Fake cursors can be drawn even though the glyphs cannot, resulting in hollow/box family of cursors without text. The issue can be reproduced with M-x mc-test. [A temporary workaround is to disable `row->clip` while drawing the glyphs.] https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00009.html - Deal with left/right overwritten glyphs in the w32 and X ports of Emacs. - There is a bug affecting the recorded `w->mc.lnum_pixel_width` that is observable when not running under gdb, but disappears when running under gdb. While viewing a folded org-mode buffer, the non-gdb instance had a visible line number pixel-width of 44, but Emacs treated it as fluctuating between 44 and 55 as the cursor was moved to the end of line. In the gdb instance, the visible line number pixel width was 55 with no fluctuation under the same conditions as the non-gdb instance. This appears to be a different bug than bug#32177 (current line number shifts one column to the left) because the line number of the current line does not shift left, and changing the bidi settings did not correct the issue. - The current test for `auto_hscroll_mode_p' only looks for `current_line` and all five related tests are based upon that assumption, which may not be true. - Multiple Cursors: If point is in the middle of a composite character, then select a fully composed character so that the fake cursor is visible. - Implement functionality similar to the Lisp multiple-cursors by Magnar Sveen. - Follow up with the Emacs team re bug#32177; i.e., (Current line number shifts one column to the left.) - Follow up with the Emacs team re bug#32060; i.e., Horizontal Scrolling (Current Line): Wrong line gets h-scrolled. - Determine if bug #28936 needs to be fixed and help the Emacs team re same. - Is there any additional meaningful optimization that can be added to the three calls of `mc_pre_scroll_clean'? - There is a bug affecting an older version of Emacs for the NS port that causes partial line flickering when the same characters are grouped together (;;;;;;) and MC_GLYPHLESS cursors are above or below -- having the same background color as the frame; e.g., black on black (used to erase a glyphless cursor). The partial flickering is only noticeable with rapid fire; e.g., holding down the right/left arrow key. When changing the color of the glyphless cursor, the issue is not present. [@lawlist has verified that the X and HPOS coordinates are accurate.] - NOTE: As to `mc_scrolling_window', it would appear that there is no tangible benefit to rotating the current/prospective cache of fake cursors to compare the data before removing the fake cursors. When scrolling the display, only _some_ lines are copied to new locations. Areas that are not overwritten may have fake cursors and those may not necessarily be removed if desired/current matrix glyphs are equal. The test for `GLYPH_EQUAL_P' does not take into consideration the existence of a fake cursor, and the glyph (with a fake cursor) may not be updated as a result thereof. As to lines that are not copied, portions may be updated and fake cursors would be removed thereby. --Multipart_Tue_Jul_16_12:28:01_2019-1 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1hbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmln aW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4g KGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg KG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0tZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1j L2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMv YWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVt cSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZhdWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2Nt ZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWMv cHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hpdGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29y cyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAgICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQt aW4tY3Vyc29ycworICAgICAgICAgICAgICAgIChzZXRxIG1jLWNvbmYKKyAgICAgICAgICAgICAg ICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoeCkg KGxpc3QgKG92ZXJsYXktc3RhcnQgeCkgImJhciI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A2NTUzNS4iCisoaW50ZXJhY3RpdmUpCisg IChsZXQgKChidWZmZXIgKGdldC1idWZmZXItY3JlYXRlICIqTUMtVEVTVCoiKSkpCisgICAgKHdp dGgtY3VycmVudC1idWZmZXIgYnVmZmVyCisgICAgICAoZXJhc2UtYnVmZmVyKQorICAgICAgKGlu c2VydCAiVGhpcyBpcyBhIHRlc3QhIikKKyAgICAgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIg Im1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICgyICJiYXIiICJwdXJwbGUiKQorICAg ICAgICAgICAgICAgICAgICAgICgzICJib3giICIjMDBGRjAwIikKKyAgICAgICAgICAgICAgICAg ICAgICAoNCAiaG9sbG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgKDUgKCJo YmFyIiAzKSBbMS4wIDAuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg2ICgiYmFyIiAz KSBbMC4wIDEuMCAxLjBdKQorICAgICAgICAgICAgICAgICAgICAgICg3ICJmcmFtZWQiICJPcmFu Z2VSZWQiKQorICAgICAgICAgICAgICAgICAgICAgICg4ICJib3giICJncmV5MjUiKQorICAgICAg ICAgICAgICAgICAgICAgICg5ICJib3giICJncmV5NzUiKSkpKQorICAgIChzZWxlY3Qtd2luZG93 IChkaXNwbGF5LWJ1ZmZlciBidWZmZXIpKSkpCisKKyhkZWZ1biArLXRpbWVyLWZuICgpCisiU2lu Y2UgdGhpcyBmaXJlcyBnbG9iYWxseSwgd2UgbXVzdCBjb250cm9sIHdoaWNoIGJ1ZmZlcnMgY3Jv c3NoYWlycyBhcHBlYXIgaW4uIgorICAod2hlbiArLW1vZGUKKyAgICAodW5sZXNzIChvciAobWVt cSBsYXN0LWNvbW1hbmQgKy1wYXJlbnMtZXhjbHVzaW9ucykKKyAgICAgICAgICAgICAgICAobnVs bCArLXBhcmVucy1wKSkKKyAgICAgICgrLXBhcmVucy1mbikpCisgICAgKHdoZW4gKy10aW1lci12 YXIKKyAgICAgIChzZXRxIHRpbWVyLWlkbGUtbGlzdCAoZGVscSArLXRpbWVyLXZhciB0aW1lci1p ZGxlLWxpc3QpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgbmlsKSkpKQorCisoZGVmdW4gKy1k cmF3LWZvcnRod2l0aCAoKQorIkltbWVkaWF0ZWx5IGRlbGV0ZS9kcmF3IG1hdGNoaW5nIHBhcmVu dGhlc2VzLiIKKyAgKCstZHJhdy1jcm9zc2hhaXJzICdmb3JjZSkpCisKKyhkZWZ1biArLWRyYXct Y3Jvc3NoYWlycyAoJm9wdGlvbmFsIGZvcmNlKQorIkltbWVkaWF0ZWx5IGRlbGV0ZSBtYXRjaGlu ZyBwYXJlbnRoZXNlcy4gIElmIEZPUkNFIGlzIG5vbi1uaWwsIHRoZW4gaW1tZWRpYXRlbHkKK2Ry YXcgbWF0Y2hpbmcgcGFyZW50aGVzaXM7IG90aGVyd2lzZSwgZHJhdyB0aGVtIG9uIGFuIGlkbGUt dGllci4iCisgICh3aGVuICstbW9kZQorICAgICh3aGVuICstdGltZXItdmFyCisgICAgICAoc2V0 cSB0aW1lci1pZGxlLWxpc3QgKGRlbHEgKy10aW1lci12YXIgdGltZXItaWRsZS1saXN0KSkKKyAg ICAgIChzZXRxICstdGltZXItdmFyIG5pbCkpCisgICAgKHVubGVzcyAob3IgKG1lbXEgdGhpcy1j b21tYW5kICstcGFyZW5zLWV4Y2x1c2lvbnMpCisgICAgICAgICAgICAgICAgKGFuZCAobnVsbCAr LXBhcmVucy1wKQorICAgICAgICAgICAgICAgICAgICAgKG51bGwgKy1wYXJlbnMtb3ZlcmxheXMt ZXhpc3QtcCkpKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykpCisgICAgKGlmIGZv cmNlCisgICAgICAocHJvZ24KKyAgICAgICAgKHdoZW4gKy1wYXJlbnMtcAorICAgICAgICAgICgr LXBhcmVucy1mbikpKQorICAgICAgKHNldHEgKy10aW1lci12YXIgKHJ1bi13aXRoLWlkbGUtdGlt ZXIgKy1pZGxlLXRpbWVyLXNlY29uZHMgbmlsICMnKy10aW1lci1mbikpKSkpCisKKyhkZWZ2YXIg ZmMtbW9kZSkKKworOzs7IyMjYXV0b2xvYWQKKyhkZWZpbmUtbWlub3ItbW9kZSArLW1vZGUKKyJN aW5vciBtb2RlIGZvciBkaXNwbGF5aW5nIGEgaG9yaXpvbnRhbCBydWxlci4iCisgIDppbml0LXZh bHVlIG5pbAorICA6bGlnaHRlciAiICsiCisgIDprZXltYXAgbmlsCisgIDpnbG9iYWwgbmlsCisg IDpncm91cCAnKy1tb2RlCisgIChjb25kCisgICAgKCstbW9kZQorICAgICAgOzs7IGArLW1vZGUn IGhhcyB0aGUgYWJpbGl0eSB0byBhbHNvIGRpc3BsYXkgYSBmaWxsIGNvbHVtbiBpbmRpY2F0b3Iu CisgICAgICA7OzsgU2VlIHRoZSB2YXJpYWJsZSBgKy1maWxsLWNvbHVtbicuCisgICAgICAod2hl biBmYy1tb2RlCisgICAgICAgIChmYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgZ2xvYmFs LWVsZG9jLW1vZGUKKyAgICAgICAgICAgICAgICAgKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2Fu eSkKKyAgICAgICAgICAgICAgICAgKGVxdWFsIGN1cnJlbnQtcHJlZml4LWFyZyAnKDQpKSkKKyAg ICAgICAgKGdsb2JhbC1lbGRvYy1tb2RlIC0xKSkKKyAgICAgICh3aGVuIChhbmQgaml0LWxvY2st Y29udGV4dC10aW1lcgorICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAn YW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQor ICAgICAgICAod2hlbiAodGltZXJwIGppdC1sb2NrLWNvbnRleHQtdGltZXIpCisgICAgICAgICAg KGNhbmNlbC10aW1lciBqaXQtbG9jay1jb250ZXh0LXRpbWVyKSkKKyAgICAgICAgOzsgKHNldHEg aml0LWxvY2stY29udGV4dC10aW1lciAocnVuLXdpdGgtaWRsZS10aW1lciA1LjAgJ3JlcGVhdCAn aml0LWxvY2stY29udGV4dC1mb250aWZ5KSkKKyAgICAgICAgKHNldHEgaml0LWxvY2stY29udGV4 dC10aW1lciBuaWwpKQorICAgICAgKHdoZW4gKGFuZCAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAn YW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQor ICAgICAgICAod2hlbiAodGltZXJwIHVuZG8tYXV0by1jdXJyZW50LWJvdW5kYXJ5LXRpbWVyKQor ICAgICAgICAgIChjYW5jZWwtdGltZXIgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIp KQorICAgICAgICAoZnNldCAndW5kby1hdXRvLS11bmRvYWJsZS1jaGFuZ2UKKyAgICAgICAgICAg ICAgKGxhbWJkYSAoKSAoYWRkLXRvLWxpc3QgJ3VuZG8tYXV0by0tdW5kb2FibHktY2hhbmdlZC1i dWZmZXJzIChjdXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKGZzZXQgJ3VuZG8tYXV0by1hbWFs Z2FtYXRlICdpZ25vcmUpKQorICAgICAgKHdoZW4gYmxpbmstY3Vyc29yLW1vZGUKKyAgICAgICAg KGJsaW5rLWN1cnNvci1tb2RlIC0xKQorICAgICAgICAod2hlbiAobWVtcSAnYmxpbmstY3Vyc29y LWNoZWNrIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAgIChyZW1vdmUtaG9vayAncG9zdC1j b21tYW5kLWhvb2sgJ2JsaW5rLWN1cnNvci1jaGVjaykpKQorICAgICAgKHNldHEgY3Jvc3NoYWly cyB0KQorICAgICAgKHdoZW4gKy1maWxsLWNvbHVtbgorICAgICAgICAoc2V0cSBmYy12aXNpYmxl IHQpKQorICAgICAgOzs7IGBhdXRvLWNvbXB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xpc3QKKyAgICAgICAgICAg ICAgICAgICAgIHRhYi13aWR0aAorICAgICAgICAgICAgICAgICAgICAgbGluZS1tb3ZlLXZpc3Vh bAorICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgICAgICAgICAg ICAgIHRydW5jYXRlLXBhcnRpYWwtd2lkdGgtd2luZG93cworICAgICAgICAgICAgICAgICAgICAg d29yZC13cmFwKSkKKyAgICAgICAgKHdoZW4gKGxvY2FsLXZhcmlhYmxlLXAgdmFyKQorICAgICAg ICAgIChwdXNoIChjb25zIHZhciAoc3ltYm9sLXZhbHVlIHZhcikpICstLXNhdmVkLXN0YXRlKSkp CisgICAgICAoc2V0cSBmaWxsLWNvbHVtbiA4MCkKKyAgICAgIChzZXRxIGRpc3BsYXktbGluZS1u dW1iZXJzIHQpCisgICAgICAoc2V0cS1sb2NhbCBhdXRvLWhzY3JvbGwtbW9kZSAnY3VycmVudC1s aW5lKQorICAgICAgKHNldHEtbG9jYWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAoc2V0cSBidWZm ZXItZGlzcGxheS10YWJsZSArLWJ1ZmZlci1kaXNwbGF5LXRhYmxlKQorICAgICAgKHNldHEgdGFi LXdpZHRoIDQpCisgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlz dWFsKSB0KQorICAgICAgKHNldHEgdHJ1bmNhdGUtbGluZXMKKyAgICAgICAgKGNvbmQKKyAgICAg ICAgICAoKGxldCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisgICAgICAg ICAgICAgICAgICBtb2RlKQorICAgICAgICAgICAgKGNhdGNoICdmb3VuZAorICAgICAgICAgICAg ICAod2hpbGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAgICAgKHdoZW4gKGRl cml2ZWQtbW9kZS1wIG1vZGUpCisgICAgICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkp KSkKKyAgICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVuY2F0ZS1saW5lcy1tYWpvci1t b2RlcykpCisgICAgICAgICAgICh0CisgICAgICAgICAgICAgbmlsKSkpCisgICAgICAoc2V0ICht YWtlLWxvY2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRvd3MpIG5pbCkK KyAgICAgIChzZXRxIHdvcmQtd3JhcCB0KQorICAgICAgKHNldHEgaW5kaWNhdGUtZW1wdHktbGlu ZXMgdCkKKyAgICAgIChzZXRxIGluZGljYXRlLWJ1ZmZlci1ib3VuZGFyaWVzICdsZWZ0KQorICAg ICAgKHNldHEgZnJpbmdlLWluZGljYXRvci1hbGlzdAorICAgICAgICAgIDs7OyBoc2NsX2FsbF90 ZW1wX3AgfCBoc2NsX3RlbXBfcAorICAgICAgICAnKCgrLWhzY2wtdGVtcCAuICgrLXNpbmdsZS1h bmdsZS1sZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLWxlZnQp KQorICAgICAgICAgIDs7OyBoc2NsX2FsbF9wZXJtXzBfcCB8IGhzY2xfYWxsX3Blcm1fMV9wIHwg aHNjbF9hbGxfcGVybV8yX3AgfCBoc2NsX3Blcm1fcAorICAgICAgICAgICgrLWhzY2wtcGVybSAu ICgrLXNpbmdsZS1hbmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLWRvdWJsZS1h bmdsZS11cAorICAgICAgICAgICAgICAgICAgICAgICAgICArLXRyaXBsZS1hbmdsZS11cAorICAg ICAgICAgICAgICAgICAgICAgICAgICArLXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAg KCstb3ZlcmxheS1hcnJvdyAuICgrLWZyaW5nZS1sZWZ0LWFycm93CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICArLWZyaW5nZS1yaWdodC1hcnJvdykpCisgICAgICAgICAgKHRydW5jYXRp b24gLiAoKy1mcmluZ2UtbGVmdC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICstZnJp bmdlLXJpZ2h0LWFycm93KSkKKyAgICAgICAgICAoY29udGludWF0aW9uIC4gKCstZnJpbmdlLWxl ZnQtY3VybHktYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNoKSkK KyAgICAgICAgICAob3ZlcmxheS1hcnJvdyAuICstZnJpbmdlLXJpZ2h0LXRyaWFuZ2xlKQorICAg ICAgICAgICh1cCAuICstZnJpbmdlLXVwLWFycm93KQorICAgICAgICAgIChkb3duIC4gKy1mcmlu Z2UtZG93bi1hcnJvdykKKyAgICAgICAgICAodG9wIC4gKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUp CisgICAgICAgICAgKGJvdHRvbSAuICstZnJpbmdlLWJvdHRvbS1yaWdodC1hbmdsZSkKKyAgICAg ICAgICAodG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQKKyAgICAgICAgICAgICAg ICAgICAgICAgICArLWZyaW5nZS1yaWdodC1icmFja2V0CisgICAgICAgICAgICAgICAgICAgICAg ICAgKy1mcmluZ2UtdG9wLXJpZ2h0LWFuZ2xlCisgICAgICAgICAgICAgICAgICAgICAgICAgKy1m cmluZ2UtdG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgIChlbXB0eS1saW5lIC4gKy1mcmluZ2Ut ZW1wdHktbGluZSkKKyAgICAgICAgICAodW5rbm93biAuICstZnJpbmdlLXF1ZXN0aW9uLW1hcmsp KSkKKyAgICAgIChzZXRxIGZyaW5nZS1jdXJzb3ItYWxpc3QgJygoYm94IC4gKy1mcmluZ2UtbGVm dC10cmlhbmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaG9sbG93IC4g Ky1ob2xsb3ctcmVjdGFuZ2xlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChi YXIgLiArLXZlcnRpY2FsLWJhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo aGJhciAuICstZnJpbmdlLWhvcml6b250YWwtYmFyKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChob2xsb3ctc21hbGwgLiArLWZyaW5nZS1ob2xsb3ctc3F1YXJlKSkpCisgICAg ICAoaWYgKG9yICstZm9ydGh3aXRoCisgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZp eC1hcmcgJyg0KSkpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJh dy1mb3J0aHdpdGggJ2FwcGVuZCAnbG9jYWwpCisgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21t YW5kLWhvb2sgJystZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICh3aGVu ICstZm9ydGh3aXRoCisgICAgICAgIChhZGQtaG9vayAnd2luZG93LWNvbmZpZ3VyYXRpb24tY2hh bmdlLWhvb2sgJystZHJhdy1mb3J0aHdpdGggbmlsICdsb2NhbCkpCisgICAgICAoYWRkLWhvb2sg J2NoYW5nZS1tYWpvci1tb2RlLWhvb2sgJ3R1cm4tb2ZmLSstbW9kZSBuaWwgJ2xvY2FsKQorICAg ICAgOzs7IE1hdGNoaW5nIHBhcmVudGhlc2VzIGRyYXdpbmcgZm9ydGh3aXRoIGludGVyZmVyZXMg d2l0aCB5YXNuaXBwZXQuCisgICAgICAod2hlbiArLWZvcnRod2l0aAorICAgICAgICAoc2V0cSAr LXBhcmVucy1wIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55 KQorICAgICAgICAoY29uZAorICAgICAgICAgICgrLWZvcnRod2l0aAorICAgICAgICAgICAgKG1l c3NhZ2UgIlR1cm5lZCBPTiBgKy1tb2RlJyAtLSBEcmF3IG1hdGNoaW5nIHBhcmVudGhlc2VzIGlt bWVkaWF0ZWx5LiIpKQorICAgICAgICAgICgoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkp CisgICAgICAgICAgICA7OzsgTWF0Y2hpbmcgcGFyZW50aGVzZXMgd2lsbCBiZSBkcmF3biBpbW1l ZGlhdGVseS4KKyAgICAgICAgICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScgLS0gT3B0 aW1pemVkIGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMuIikpCisgICAgICAgICAgKHQKKyAgICAgICAg ICAgIChtZXNzYWdlICJUdXJuZWQgT04gYCstbW9kZScuIikpKSkpCisgICAgKHQKKyAgICAgIChr aWxsLWxvY2FsLXZhcmlhYmxlICdmaWxsLWNvbHVtbikKKyAgICAgIChraWxsLWxvY2FsLXZhcmlh YmxlICdhdXRvLWhzY3JvbGwtbW9kZSkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdoc2Ny b2xsLXN0ZXApCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnY3Jvc3NoYWlycykKKyAgICAg IChraWxsLWxvY2FsLXZhcmlhYmxlICdmYy12aXNpYmxlKQorICAgICAgKGtpbGwtbG9jYWwtdmFy aWFibGUgJ2Rpc3BsYXktbGluZS1udW1iZXJzKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J2Rpc3BsYXktbGluZS1udW1iZXJzLXdpZHRoKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUg J21jLWNvbmYpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAnYnVmZmVyLWRpc3BsYXktdGFi bGUpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAndGFiLXdpZHRoKQorICAgICAgKGtpbGwt bG9jYWwtdmFyaWFibGUgJ2xpbmUtbW92ZS12aXN1YWwpCisgICAgICAoa2lsbC1sb2NhbC12YXJp YWJsZSAndHJ1bmNhdGUtbGluZXMpCisgICAgICAoa2lsbC1sb2NhbC12YXJpYWJsZSAndHJ1bmNh dGUtcGFydGlhbC13aWR0aC13aW5kb3dzKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ3dv cmQtd3JhcCkKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdpbmRpY2F0ZS1lbXB0eS1saW5l cykKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdpbmRpY2F0ZS1idWZmZXItYm91bmRhcmll cykKKyAgICAgIChraWxsLWxvY2FsLXZhcmlhYmxlICdmcmluZ2UtaW5kaWNhdG9yLWFsaXN0KQor ICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJ2ZyaW5nZS1jdXJzb3ItYWxpc3QpCisgICAgICAo a2lsbC1sb2NhbC12YXJpYWJsZSAnKy1mb3J0aHdpdGgpCisgICAgICAoZG9saXN0IChzYXZlZCAr LS1zYXZlZC1zdGF0ZSkKKyAgICAgICAgKHNldCAobWFrZS1sb2NhbC12YXJpYWJsZSAoY2FyIHNh dmVkKSkgKGNkciBzYXZlZCkpKQorICAgICAgKGtpbGwtbG9jYWwtdmFyaWFibGUgJystLXNhdmVk LXN0YXRlKQorICAgICAgKCstZGVsZXRlLXBhcmVucy1vdmVybGF5cykKKyAgICAgICh3aGVuICht ZW1xICcrLWRyYXctZm9ydGh3aXRoIHBvc3QtY29tbWFuZC1ob29rKQorICAgICAgICAocmVtb3Zl LWhvb2sgJ3Bvc3QtY29tbWFuZC1ob29rICcrLWRyYXctZm9ydGh3aXRoICdsb2NhbCkpCisgICAg ICAod2hlbiAobWVtcSAnKy1kcmF3LWNyb3NzaGFpcnMgcG9zdC1jb21tYW5kLWhvb2spCisgICAg ICAgIChyZW1vdmUtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJystZHJhdy1jcm9zc2hhaXJzICds b2NhbCkpCisgICAgICAod2hlbiAobWVtcSAnKy1kcmF3LWZvcnRod2l0aCB3aW5kb3ctY29uZmln dXJhdGlvbi1jaGFuZ2UtaG9vaykKKyAgICAgICAgKHJlbW92ZS1ob29rICd3aW5kb3ctY29uZmln dXJhdGlvbi1jaGFuZ2UtaG9vayAnKy1kcmF3LWZvcnRod2l0aCAnbG9jYWwpKQorICAgICAgKHJl bW92ZS1ob29rICdjaGFuZ2UtbWFqb3ItbW9kZS1ob29rICd0dXJuLW9mZi0rLW1vZGUgJ2xvY2Fs KQorICAgICAgKHdoZW4gKy10aW1lci12YXIKKyAgICAgICAgKHNldHEgdGltZXItaWRsZS1saXN0 IChkZWxxICstdGltZXItdmFyIHRpbWVyLWlkbGUtbGlzdCkpCisgICAgICAgIChzZXRxICstdGlt ZXItdmFyIG5pbCkpCisgICAgICAod2hlbiAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQor ICAgICAgICAobWVzc2FnZSAiVHVybmVkIE9GRiBgKy1tb2RlJy4iKSkpKSkKKworKGRlZnVuIHR1 cm4tb2ZmLSstbW9kZSAoKQorICAoKy1tb2RlIC0xKSkKKworOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7CisKKyhkZWZ1biArLXBhcmVucy1mbiAoKQorICAiRG9jLXN0cmluZy4iCisgIChsZXQqICgo b3BvaW50IChwb2ludCkpCisgICAgICAgICAoZnJvbSAoaWYgKy1wYXJlbnMtZnJvbS1mbgorICAg ICAgICAgICAgICAgICAoZnVuY2FsbCArLXBhcmVucy1mcm9tLWZuKQorICAgICAgICAgICAgICAg ICAocG9pbnQtbWluKSkpCisgICAgICAgICAod2luIChzZWxlY3RlZC13aW5kb3cpKQorICAgICAg ICAgKGkgMCkKKyAgICAgICAgIChwcmVjZWRpbmctY2hhciAocHJlY2VkaW5nLWNoYXIpKQorICAg ICAgICAgKG9jaGFyIChjaGFyLWFmdGVyIG9wb2ludCkpCisgICAgICAgICAocG9zMQorICAgICAg ICAgICAoY29uZAorICAgICAgICAgICAgICgoYW5kIG9jaGFyCisgICAgICAgICAgICAgICAgICAg KG9yIDs7OyAoY2hhci10by1zdHJpbmcgNDApID0+IG9wZW5pbmcgcGFyZW50aGVzaXMKKyAgICAg ICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgNDApCisgICAgICAgICAgICAgICAgICAgICAgIDs7 OyAoY2hhci10by1zdHJpbmcgOTEpID0+IG9wZW5pbmcgc3F1YXJlIGJyYWNrZXQKKyAgICAgICAg ICAgICAgICAgICAgICAgKD0gb2NoYXIgOTEpCisgICAgICAgICAgICAgICAgICAgICAgIDs7OyAo Y2hhci10by1zdHJpbmcgMTIzKSA9PiBvcGVuaW5nIHdhdnkgYnJhY2tldAorICAgICAgICAgICAg ICAgICAgICAgICAoPSBvY2hhciAxMjMpKSkKKyAgICAgICAgICAgICAgICAobWluICgxKyBvcG9p bnQpIChwb2ludC1tYXgpKSkKKyAgICAgICAgICAgICAoKG9yIDs7OyAoY2hhci10by1zdHJpbmcg NDEpID0+IGNsb3NpbmcgcGFyZW50aGVzaXMKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGlu Zy1jaGFyIDQxKQorICAgICAgICAgICAgICAgICAgOzs7IChjaGFyLXRvLXN0cmluZyA5MykgPT4g Y2xvc2luZyBzcXVhcmUgYnJhY2tldAorICAgICAgICAgICAgICAgICAgKD0gcHJlY2VkaW5nLWNo YXIgOTMpCisgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyNSkgPT4gY2xv c2luZyB3YXZ5IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICg9IHByZWNlZGluZy1jaGFyIDEy NSkpCisgICAgICAgICAgICAgICAgKG1heCAocG9pbnQtbWluKSAoMS0gb3BvaW50KSkpCisgICAg ICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICBvcG9pbnQpKSkKKyAgICAgICAgIHBvczIKKyAg ICAgICAgIHNlbGVjdGVkLWZhY2UpCisgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAoY29uZGl0 aW9uLWNhc2UgbmlsCisgICAgICAgICh3aGlsZSAoc2V0cSBwb3MxIChudGggMSAocGFyc2UtcGFy dGlhbC1zZXhwIGZyb20gcG9zMSkpKQorICAgICAgICAgIChzZXRxIHBvczIgKHNjYW4tc2V4cHMg cG9zMSAxKSkKKyAgICAgICAgICAoaWYgKD0gaSAxMCkKKyAgICAgICAgICAgIChzZXRxIGkgMSkK KyAgICAgICAgICAgIChzZXRxIGkgKDErIGkpKSkKKyAgICAgICAgICAoc2V0cSBzZWxlY3RlZC1m YWNlIChjb25kCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDEpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJystcGFyZW5zLW9uZS1mYWNlKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAyKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICcrLXBhcmVucy10d28tZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKCg9IGkgMykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtdGhyZWUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkg NCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtZm91ci1mYWNl KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA1KQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1maXZlLWZhY2UpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICgoPSBpIDYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJystcGFyZW5zLXNpeC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoKD0gaSA3KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1z ZXZlbi1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA4KQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1laWdodC1mYWNlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA5KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICcrLXBhcmVucy1uaW5lLWZhY2UpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICgoPSBpIDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICcrLXBhcmVucy10ZW4tZmFjZSkpKQorICAgICAgICAgIChsZXQgKChvdiAobWFrZS1vdmVybGF5 IHBvczEgKDErIHBvczEpKSkpCisgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZl LXdpbmRvd3MKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92ICd3aW5kb3cgd2luKSkKKyAg ICAgICAgICAgIChvdmVybGF5LXB1dCBvdiAnZmFjZSBzZWxlY3RlZC1mYWNlKSkKKyAgICAgICAg ICAod2hlbiBwb3MyCisgICAgICAgICAgICAobGV0ICgob3YgKG1ha2Utb3ZlcmxheSAoMS0gcG9z MikgcG9zMikpKQorICAgICAgICAgICAgICAodW5sZXNzICstcGFyZW5zLWluYWN0aXZlLXdpbmRv d3MKKyAgICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ3dpbmRvdyB3aW4pKQorICAgICAg ICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2VsZWN0ZWQtZmFjZSkpKSkKKyAgICAgICAg KGVycm9yIG5pbCkpKQorICAgIChzZXRxICstcGFyZW5zLW92ZXJsYXlzLWV4aXN0LXAgdCkpKQor CisoZGVmdW4gKy1yZW1vdmUtb3ZlcmxheXMgKGJlZyBlbmQgbmFtZSB2YWwpCisiUmVtb3ZlIHRo ZSBvdmVybGF5cyB0aGF0IGFyZSBgZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXNgLgorSW5jbHVk ZXMgYSB1bmlxdWUgc2l0dWF0aW9uIHdoZW4gYW4gb3ZlcmxheSB3aXRoIGFuIGAnYWZ0ZXItc3Ry aW5nYCBwcm9wZXJ0eQoraXMgYXQgdGhlIHZlcnkgZW5kIG9mIGEgbmFycm93ZWQtYnVmZmVyLiIK KyAgKGxldCogKChwb2ludC1tYXggKHBvaW50LW1heCkpCisgICAgICAgICAocG9pbnQtbWluIChw b2ludC1taW4pKQorICAgICAgICAgKG5hcnJvd2VkLXAgKGJ1ZmZlci1uYXJyb3dlZC1wKSkKKyAg ICAgICAgIChiZWcgKGlmIGJlZyBiZWcgcG9pbnQtbWluKSkKKyAgICAgICAgIChlbmQKKyAgICAg ICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5h cnJvd2VkLXApCisgICAgICAgICAgICAgICAgIGVuZCkKKyAgICAgICAgICAgICAgIGVuZCkKKyAg ICAgICAgICAgICAoKGFuZAorICAgICAgICAgICAgICAgICAobm90IG5hcnJvd2VkLXApCisgICAg ICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAgICAgICAgICAgICBwb2ludC1tYXgpCisgICAg ICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAg ICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKDwgZW5kIHBvaW50LW1heCkpCisgICAgICAgICAg ICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQt cAorICAgICAgICAgICAgICAgICBlbmQKKyAgICAgICAgICAgICAgICAgKD0gZW5kIHBvaW50LW1h eCkpCisgICAgICAgICAgICAgICAoMSsgZW5kKSkKKyAgICAgICAgICAgICAoKGFuZAorICAgICAg ICAgICAgICAgICBuYXJyb3dlZC1wCisgICAgICAgICAgICAgICAgIChudWxsIGVuZCkpCisgICAg ICAgICAgICAgICAoMSsgcG9pbnQtbWF4KSkgKSkKKyAgICAgICAgIChvdmVybGF5cworICAgICAg ICAgICAocHJvZ24KKyAgICAgICAgICAgICAob3ZlcmxheS1yZWNlbnRlciBlbmQpCisgICAgICAg ICAgICAgKG92ZXJsYXlzLWluIGJlZyBlbmQpKSkpCisgICAgKHdoZW4gKGFuZCBiZWcgZW5kIG5h bWUgdmFsKQorICAgICAgKGRvbGlzdCAobyBvdmVybGF5cykKKyAgICAgICAgKGNvbmQKKyAgICAg ICAgICAoKGFuZCAoZXEgbmFtZSAnZmFjZSkKKyAgICAgICAgICAgICAgICAoZXEgKG92ZXJsYXkt Z2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIDs7IEVpdGhlciBwdXNoIHRoaXMgb3Zlcmxh eSBvdXRzaWRlIGJlZy4uLmVuZAorICAgICAgICAgICAgOzsgb3Igc3BsaXQgaXQgdG8gZXhjbHVk ZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7IG9yIGRlbGV0ZSBpdCBlbnRpcmVseSAoaWYgaXQg aXMgY29udGFpbmVkIGluIGJlZy4uLmVuZCkuCisgICAgICAgICAgICAoaWYgKDwgKG92ZXJsYXkt c3RhcnQgbykgYmVnKQorICAgICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQgbykgZW5k KQorICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IChj b3B5LW92ZXJsYXkgbykKKyAgICAgICAgICAgICAgICAgIChvdmVybGF5LXN0YXJ0IG8pIGJlZykK KyAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkpCisg ICAgICAgICAgICAgICAgICAobW92ZS1vdmVybGF5IG8gKG92ZXJsYXktc3RhcnQgbykgYmVnKSkK KyAgICAgICAgICAgICAgKGlmICg+IChvdmVybGF5LWVuZCBvKSBlbmQpCisgICAgICAgICAgICAg ICAgICAobW92ZS1vdmVybGF5IG8gZW5kIChvdmVybGF5LWVuZCBvKSkKKyAgICAgICAgICAgICAg ICAoZGVsZXRlLW92ZXJsYXkgbykpKSkKKyAgICAgICAgICAoKGFuZCAobm90IChlcSBuYW1lICdm YWNlKSkKKyAgICAgICAgICAgICAgICAoZXF1YWwtaW5jbHVkaW5nLXByb3BlcnRpZXMgKG92ZXJs YXktZ2V0IG8gbmFtZSkgdmFsKSkKKyAgICAgICAgICAgIChkZWxldGUtb3ZlcmxheSBvKSkpKSkp KQorCisoZGVmdW4gKy1kZWxldGUtcGFyZW5zLW92ZXJsYXlzICgpCisgICh3aGVuICstcGFyZW5z LW92ZXJsYXlzLWV4aXN0LXAKKyAgICAoZG9saXN0IChmYWNlICcoKy1wYXJlbnMtb25lLWZhY2UK KyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtdHdvLWZhY2UKKyAgICAgICAgICAgICAgICAg ICAgKy1wYXJlbnMtdGhyZWUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1mb3Vy LWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZml2ZS1mYWNlCisgICAgICAgICAg ICAgICAgICAgICstcGFyZW5zLXNpeC1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5z LXNldmVuLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtZWlnaHQtZmFjZQorICAg ICAgICAgICAgICAgICAgICArLXBhcmVucy1uaW5lLWZhY2UKKyAgICAgICAgICAgICAgICAgICAg Ky1wYXJlbnMtdGVuLWZhY2UpKQorICAgICAgKCstcmVtb3ZlLW92ZXJsYXlzIG5pbCBuaWwgJ2Zh Y2UgZmFjZSkpCisgICAgKHNldHEgKy1wYXJlbnMtb3ZlcmxheXMtZXhpc3QtcCBuaWwpKSkKKwor Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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wtZWxkb2MtbW9kZQor ICAgICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAg ICAgICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFs LWVsZG9jLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVy CisgICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAg ICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVu ICh0aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVy IGppdC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250 ZXh0LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250 ZXh0LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkp CisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAg ICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVu ICh0aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNh bmNlbC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChm c2V0ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgp IChhZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlc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1mYWNlJy4iCisgIDpncm91 cCAnKy1tb2RlKQorCisoZGVmZmFjZSArLWJhci1hdC16di1mYWNlCisgICcoKHQgKDpmb3JlZ3Jv dW5kICJ5ZWxsb3ciKSkpCisgICJGYWNlIGZvciBgKy1iYXItYXQtenYtZmFjZScuIgorICA6Z3Jv dXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1iYXItcG9zdC16di1mYWNlCisgICcoKHQgKDpmb3Jl Z3JvdW5kICJtYWdlbnRhNCIpKSkKKyAgIkZhY2UgZm9yIGArLWJhci1wb3N0LXp2LWZhY2UnLiIK KyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZmYWNlICstcmV2ZXJzZWQtYmFyLXByZS16di1mYWNl CisgICcoKHQgKDpmb3JlZ3JvdW5kICJjeWFuMSIpKSkKKyAgIkZhY2UgZm9yIGArLXJldmVyc2Vk LWJhci1wcmUtenYtZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1yZXZl cnNlZC1iYXItYXQtenYtZmFjZQorICAnKCh0ICg6Zm9yZWdyb3VuZCAiY2hhcnRyZXVzZSIpKSkK KyAgIkZhY2UgZm9yIGArLXJldmVyc2VkLWJhci1hdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1t b2RlKQorCisoZGVmZmFjZSArLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2UKKyAgJygodCAoOmZv cmVncm91bmQgImN5YW40IikpKQorICAiRmFjZSBmb3IgYCstcmV2ZXJzZWQtYmFyLXBvc3QtenYt ZmFjZScuIgorICA6Z3JvdXAgJystbW9kZSkKKworKGRlZmZhY2UgKy1ldmVuLXByZS16di1mYWNl CisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBkYXJrKSkK KyAgICAgOmZvcmVncm91bmQgInllbGxvdyIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4tY29s b3JzIDg4KSAoYmFja2dyb3VuZCBsa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9yZWdy b3VuZCAid2hpdGUiKQorICAgICgoKHR5cGUgdHR5KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZl cnNlLXZpZGVvIHQpCisgICAgKHQgOmZvcmVncm91bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGAr LWV2ZW4taW5hY3RpdmUtcHJlLXp2LWZhY2UnLiIKKyAgOmdyb3VwICcrLW1vZGUpCisKKyhkZWZm YWNlICstZXZlbi1hdC16di1mYWNlCisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4 KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgIkRlZXBQaW5rMSIpCisgICAg KCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAg IDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9y cyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpmb3JlZ3JvdW5kICJEZWVwUGluazEiKQor ICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQpKQor ICAgICA6Zm9yZWdyb3VuZCAiRGVlcFBpbmsxIikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1j b2xvcnMgOCkpCisgICAgIDpmb3JlZ3JvdW5kICJ3aGl0ZSIpCisgICAgKCgodHlwZSB0dHkpIChj bGFzcyBtb25vKSkKKyAgICAgOmludmVyc2UtdmlkZW8gdCkKKyAgICAodCA6Zm9yZWdyb3VuZCAi cGluayIpKQorICAiRmFjZSBmb3IgYCstZXZlbi1hdC16di1mYWNlJy4iCisgIDpncm91cCAnKy1t b2RlKQorCisoZGVmZmFjZSArLWV2ZW4taW5hY3RpdmUtYXQtenYtZmFjZQorICAnKCgoKGNsYXNz IGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bm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JrKSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTEiKQor ICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQor ICAgICA6Zm9yZWdyb3VuZCAiRGFya1NhbG1vbiIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4t Y29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTEi KQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGlnaHQp KQorICAgICA6Zm9yZWdyb3VuZCAiRGFya1NhbG1vbiIpCisgICAgKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDgpKQorICAgICA6Zm9yZWdyb3VuZCAid2hpdGUiKQorICAgICgoKHR5cGUgdHR5 KSAoY2xhc3MgbW9ubykpCisgICAgIDppbnZlcnNlLXZpZGVvIHQpCisgICAgKHQgOmZvcmVncm91 bmQgInBpbmsiKSkKKyAgIkZhY2UgZm9yIGArLW9kZC1wb3N0LXp2LWZhY2UnLiIKKyAgOmdyb3Vw ICcrLW1vZGUpCisKKyhkZWZmYWNlICstb2RkLWluYWN0aXZlLXBvc3QtenYtZmFjZQorICAnKCgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpm b3JlZ3JvdW5kICJzaWVubmE0IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgODgp IChiYWNrZ3JvdW5kIGxpZ2h0KSkKKyAgICAgOmZvcmVncm91bmQgInNpZW5uYTQiKQorICAgICgo KGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgZGFyaykpCisgICAgIDpm b3JlZ3JvdW5kICJzaWVubmE0IikKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgMTYp IChiY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JvdW5kIGRhcmspKQorICAgICA6Zm9yZWdyb3VuZCAiUGFsZUdyZWVuNCIpCisgICAg KCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkpCisgICAg IDpmb3JlZ3JvdW5kICJEYXJrT2xpdmVHcmVlbiIpCisgICAgKCgoY2xhc3MgY29sb3IpIChtaW4t Y29sb3JzIDE2KSAoYmFja2dyb3VuZCBkYXJrKSkKKyAgICAgOmZvcmVncm91bmQgIlBhbGVHcmVl bjQiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyAxNikgKGJhY2tncm91bmQgbGln aHQpKQorICAgICA6Zm9yZWdyb3VuZCAiRGFya09saXZlR3JlZW4iKQorICAgICgoKGNsYXNzIGNv bG9yKSAobWluLWNvbG9ycyA4KSkKKyAgICAgOmZvcmVncm91bmQgIndoaXRlIikKKyAgICAoKCh0 eXBlIHR0eSkgKGNsYXNzIG1vbm8pKQorICAgICA6aW52ZXJzZS12aWRlbyB0KQorICAgICh0IDpm b3JlZ3JvdW5kICJwaW5rIikpCisgICJGYWNlIGZvciBgKy1wb3N0LWZpbGwtaW5hY3RpdmUtcG9z dC16di1mYWNlJy4iCisgIDpncm91cCAnKy1tb2RlKQorCisoZGVmZmFjZSBmYy1wcmUtenYtZmFj ZQorICAnKCgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgZGFyaykp CisgICAgIDpmb3JlZ3JvdW5kICJncmV5MTUiKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNv bG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICA6Zm9yZWdyb3VuZCAiZ3JleTE1IikK KyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgMTYpIChiYWNrZ3JvdW5kIGRhcmspKQor ICAgICA6Zm9yZWdyb3VuZCAiZ3JleTE1IikKKyAgICAoKChjbGFzcyBjb2xv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OworfQorCitzdGF0aWMgdm9pZAor YnNldF9mY19pbmFjdGl2ZV93aW5kb3dzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2 YWwpCit7CisgIGItPmZjX2luYWN0aXZlX3dpbmRvd3NfID0gdmFsOworfQorCisvKiBlbmQgTVVM VElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RhdGljIHZv aWQKIGJzZXRfYWJicmV2X21vZGUgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0IHZhbCkK IHsKQEAgLTUxNDUsNiArNTIwOCwyNCBAQCBpbml0X2J1ZmZlcl9vbmNlICh2b2lkKQogICBic2V0 X2xhc3Rfc2VsZWN0ZWRfd2luZG93ICgmYnVmZmVyX2xvY2FsX2ZsYWdzLCBtYWtlX2ZpeG51bSAo MCkpOwogCiAgIGlkeCA9IDE7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRS1DVVJTT1JTICovCisKKyAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxh Z3MsIG1jX3JlYWxfZmFrZV9jdXJzb3IpLCBpZHgpOyArK2lkeDsKKyAgWFNFVEZBU1RJTlQgKEJW QVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIG1jX2NvbmYpLCBpZHgpOyArK2lkeDsKKyAgWFNFVEZB U1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIG1jX2luYWN0aXZlX3dpbmRvd3MpLCBp ZHgpOyArK2lkeDsKKyAgWFNFVEZBU1RJTlQgKEJWQVIgKCZidWZmZXJfbG9jYWxfZmxhZ3MsIGNy b3NzaGFpcnMpLCBpZHgpOyArK2lkeD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gZG9uZSBpbiBiaW5kaW5ncy5lbCAq LworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CisgIGJzZXRfbWNfcmVhbF9mYWtlX2N1cnNvciAoJmJ1ZmZlcl9kZWZhdWx0cywgUWhvbGxvdyk7 CisgIGJzZXRfbWNfY29uZiAoJmJ1ZmZlcl9kZWZhdWx0cywgUW5pbCk7CisgIGJzZXRfbWNfaW5h Y3RpdmVfd2luZG93cyAoJmJ1ZmZlcl9kZWZhdWx0cywgUXQpOworICBic2V0X2Nyb3NzaGFpcnMg KCZidWZmZXJfZGVmYXVsdHMsIFFuaWwpOworICBic2V0X2NoX2hvcml6b250YWxfcnVsZXIgKCZi dWZmZXJfZGVmYXVsdHMsIFF0KTsKKyAgYnNldF9jaF92ZXJ0aWNhbF9ydWxlciAoJmJ1ZmZlcl9k ZWZhdWx0cywgUXQpOworICBic2V0X2NoX2luYWN0aXZlX3dpbmRvd3MgKCZidWZmZXJfZGVmYXVs dHMsIFF0KTsKKyAgYnNldF9mY192aXNpYmxlICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKKyAg YnNldF9mY19pbmFjdGl2ZV93aW5kb3dzICgmYnVmZmVyX2RlZmF1bHRzLCBRdCk7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgYnNldF9tb2RlX2xpbmVfZm9ybWF0ICgmYnVmZmVy X2RlZmF1bHRzLCBidWlsZF9wdXJlX2Nfc3RyaW5nICgiJS0iKSk7CiAgIGJzZXRfaGVhZGVyX2xp bmVfZm9ybWF0ICgmYnVmZmVyX2RlZmF1bHRzLCBRbmlsKTsKICAgYnNldF9hYmJyZXZfbW9kZSAo JmJ1ZmZlcl9kZWZhdWx0c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pOworCisgIERFRlNZTSAoUWNoX2luYWN0aXZlX3dpbmRvd3MsICJjaC1pbmFj dGl2ZS13aW5kb3dzIik7CisgIERFRlZBUl9QRVJfQlVGRkVSICgiY2gtaW5hY3RpdmUtd2luZG93 cyIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgY2hfaW5hY3RpdmVfd2luZG93cyksIFFuaWwsCisg ICAgZG9jOiAvKiBXaGVuIG5vbi1uaWwsIGRyYXcgY3Jvc3NoYWlycyBpbiBpbmFjdGl2ZSB3aW5k b3dzLiAqLyk7CisKKyAgREVGU1lNIChRZmNfdmlzaWJsZSwgImZjLXZpc2libGUiKTsKKyAgREVG VkFSX1BFUl9CVUZGRVIgKCJmYy12aXNpYmxlIiwgJkJWQVIgKGN1cnJlbnRfYnVmZmVyLCBmY192 aXNpYmxlKSwgUW5pbCwKKyAgICBkb2M6IC8qIEEgYnVmZXItbG9jYWwgdmFyaWFibGUgdG8gdHVy biBvbi9vZmYgdGhlIG11bHRpcGxlIGN1cnNvcnMgZmlsbCBjb2x1bW4uICovKTsKKworICBERUZT WU0gKFFmY192aXNpYmxlX2luYWN0aXZlX3dpbmRvdywgImZjLWluYWN0aXZlLXdpbmRvdyIpOwor ICBERUZWQVJfUEVSX0JVRkZFUiAoImZjLWluYWN0aXZlLXdpbmRvd3MiLCAmQlZBUiAoY3VycmVu dF9idWZmZXIsIGZjX2luYWN0aXZlX3dpbmRvd3MpLCBRbmlsLAorICAgIGRvYzogLyogV2hlbiBu b24tbmlsLCBkcmF3IG11bHRpcGxlIGN1cnNvcnMgZmlsbCBjb2x1bW4gaW4gaW5hY3RpdmUgd2lu ZG93cy4gKi8pOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIHN0YXRpY3BybyAo Jmxhc3Rfb3ZlcmxheV9tb2RpZmljYXRpb25faG9va3MpOwogICBsYXN0X292ZXJsYXl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VyXzsKKworICAvKiBUaGUgbmFtZSBvZiB0aGUg Y3Jvc3NoYWlycyB2ZXJ0aWNhbCBydWxlci4gKi8KKyAgTGlzcF9PYmplY3QgY2hfdmVydGljYWxf cnVsZXJfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBjcm9zc2hhaXJzIGluIGluYWN0aXZlIHdp bmRvd3MuICovCisgIExpc3BfT2JqZWN0IGNoX2luYWN0aXZlX3dpbmRvd3NfOworCisgIC8qIFRo ZSBuYW1lIG9mIHRoZSBidWZmZXItbG9jYWwgdmFyaWFibGUuICovCisgIExpc3BfT2JqZWN0IGZj X3Zpc2libGVfOworCisgIC8qIFdoZXRoZXIgdG8gZHJhdyBtdWx0aXBsZSBjdXJzb3JzIGZpbGwg Y29sdW1uIGluIGluYWN0aXZlIHdpbmRvd3MuICovCisgIExpc3BfT2JqZWN0IGZjX2luYWN0aXZl X3dpbmRvd3NfOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEN1cnNvciB0 eXBlIHRvIGRpc3BsYXkgaW4gbm9uLXNlbGVjdGVkIHdpbmRvd3MuCiAgICAgIHQgbWVhbnMgdG8g dXNlIGhvbGxvdyBib3ggY3Vyc29yLgogICAgICBTZWUgYGN1cnNvci10eXBlJyBmb3Igb3RoZXIg dmFsdWVzLiAgKi8KQEAgLTc5MSwxNCArODI1LDIxIEBAIHN0cnVjdCBidWZmZXIKICAgICAgYW4g aW5kaXJlY3QgYnVmZmVyIHNpbmNlIGl0IGNvdW50cyBhcyBpdHMgYmFzZSBidWZmZXIuICAqLwog ICBpbnQgd2luZG93X2NvdW50OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCiAgIC8qIEEgbm9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idWZm ZXIuICAoU29tZSBzZXR0ZXJzIHRoYXQgYXJlIHByaXZhdGUgdG8gYSBzaW5nbGUgLmMgZmlsZSBh cmUKICAgIGRlZmluZWQgYXMgc3RhdGljIGluIHRob3NlIGZpbGVzLikgICovCisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK0lOTElO RSB2b2lkCitic2V0X2Jsdl9tY19yZWFsX2Zha2VfY3Vyc29yIChzdHJ1Y3QgYnVmZmVyICpiLCBM aXNwX09iamVjdCB2YWwpCit7CisgIGItPm1jX3JlYWxfZmFrZV9jdXJzb3JfID0gdmFsOworfQor CitJTkxJTkUgdm9pZAorYnNldF9ibHZfbWNfY29uZiAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9P YmplY3QgdmFsKQoreworICBiLT5tY19jb25mXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQKK2Jz ZXRfYmx2X21jX2luYWN0aXZlX3dpbmRvd3MgKHN0cnVjdCBidWZmZXIgKmIsIExpc3BfT2JqZWN0 IHZhbCkKK3sKKyAgYi0+bWNfaW5hY3RpdmVfd2luZG93c18gPSB2YWw7Cit9CisKK0lOTElORSB2 b2lkCitic2V0X2Jsdl9jcm9zc2hhaXJzIChzdHJ1Y3QgYnVmZmVyICpiLCBMaXNwX09iamVjdCB2 YWwpCit7CisgIGItPmNyb3NzaGFpcnNfID0gdmFsOworfQorCitJTkxJTkUgdm9pZAorYnNldF9i bHZfY2hfaG9yaXpvbnRhbF9ydWxlciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlzcF9PYmplY3QgdmFs KQoreworICBiLT5jaF9ob3Jpem9udGFsX3J1bGVyXyA9IHZhbDsKK30KKworSU5MSU5FIHZvaWQK K2JzZXRfYmx2X2NoX3ZlcnRpY2FsX3J1bGVyIChzdHJ1Y3QgYnVm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ogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJT T1JTICovCisKK2V4dGVybiBib29sIHRyYWNlX3JlZGlzcGxheV9wIEVYVEVSTkFMTFlfVklTSUJM RTsKKworc3RydWN0IGdseXBoOworCitzdHJ1Y3QgZ2x5cGhfcm93OworCitzdHJ1Y3QgZ2x5cGhf bWF0cml4OworCitlbnVtIGRyYXdfZ2x5cGhzX2ZhY2U7CisKK2VudW0gZ2x5cGhfcm93X2FyZWE7 CisKK3N0cnVjdCBtY19tYXRyaXg7CisKK2VudW0gbWNfY2FjaGVfdHlwZTsKKworZW51bSBtY19j dXJzb3JfdHlwZTsKKworZW51bSBtY19mbGF2b3I7CisKK3N0cnVjdCBtY19SR0I7CisKK3N0cnVj dCBtY19lc3NlbnRpYWxzOworCitlbnVtIG1jX2RyYXdfcm93X3R5cGU7CisKK2VudW0gbWNfZW5n aW5lX3R5cGU7CisKK2VudW0gbWNfcm93X3Bvc2l0aW9uOworCitlbnVtIG1jX3JlZHJhd19yb3df dHlwZTsKKworZW51bSBkcmF3X2dseXBoX2FjdGlvbjsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1j X2xpc3RuIChwdHJkaWZmX3QsIExpc3BfT2JqZWN0LCAuLi4pOworCitleHRlcm4gTGlzcF9PYmpl Y3QgbWNfbnRoIChpbnQsIExpc3BfT2JqZWN0KTsKKworZXh0ZXJuIExpc3BfT2JqZWN0IG1jX2Fz c3EgKExpc3BfT2JqZWN0LCBMaXNwX09iamVjdCk7CisKK2V4dGVybiBlbnVtIG1jX3Jvd19wb3Np dGlvbiBtY19yb3dfcG9zaXRpb24gKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX3JvdyAq LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGds eXBoX3JvdyAqL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VtIG1jX2NhY2hlX3R5 cGUsIGludCwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1 Y3Qgd2luZG93ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwgaW50LAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlKTsKKworZXh0ZXJuIGludCBtY19n ZXRfZnJpbmdlX2JpdG1hcCAoc3RydWN0IHdpbmRvdyAqLCBMaXNwX09iamVjdCwgaW50LCBpbnQp OworCitleHRlcm4gdm9pZCBtY19lbmdpbmUgKHN0cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBo X21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICosCisgICAgICAgICAgICAgICAgICAgICAgIHN0 cnVjdCBnbHlwaCAqLCBpbnQsIGludCwgaW50LCBpbnQsIGludCwgaW50LAorICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlLCBpbnQsIHN0cnVjdCBnbHlwaF9tYXRyaXgg KiwKKyAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX2Vzc2VudGlhbHMsIGVudW0gbWNf cm93X3Bvc2l0aW9uLCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAgICAgICBlbnVt IG1jX2VuZ2luZV90eXBlLCBib29sLCBlbnVtIG1jX2RyYXdfcm93X3R5cGUsCisgICAgICAgICAg ICAgICAgICAgICAgIGVudW0gbWNfY2FjaGVfdHlwZSk7CisKK2V4dGVybiB2b2lkIG1jX3NldF9l c3NlbnRpYWxzIChzdHJ1Y3Qgd2luZG93ICosIHN0cnVjdCBtY19lc3NlbnRpYWxzICopOworCitl eHRlcm4gdm9pZCBtY19kcmF3X3JvdyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICosIHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1 Y3QgZ2x5cGggKiwgaW50LCBpbnQsIGludCwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAg ICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19lc3NlbnRpYWxzLCBlbnVtIG1jX3Jvd19wb3Np dGlvbiwgYm9vbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2RyYXdfcm93X3R5 cGUpOworCitleHRlcm4gYm9vbCBtY19yZWRyYXdfcm93IChzdHJ1Y3Qgd2luZG93ICosIHN0cnVj dCBnbHlwaF9tYXRyaXggKiwgc3RydWN0IGdseXBoX3JvdyAqLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgZW51bSBnbHlwaF9yb3dfYXJlYSwgaW50LCBpbnQsIGludCwgYm9vbCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSwgZW51bSBtY19yZWRy YXdfcm93X3R5cGUpOworCitleHRlcm4gdm9pZCBtY19yZXNldF9jYWNoZSAoc3RydWN0IHdpbmRv dyAqKTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19jdXJzb3JfZ2x5cGggKHN0cnVjdCB3aW5kb3cg Kiwgc3RydWN0IGdseXBoX21hdHJpeCAqLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHN0cnVjdCBnbHlwaF9yb3cgKiwgZW51bSBkcmF3X2dseXBoc19mYWNlLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgaW50LCBpbnQsIHN0cnVjdCBtY19SR0IsIGVu dW0gbWNfZmxhdm9yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gbWNf Y3Vyc29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCk7CisKK2V4dGVybiB2b2lkIG1jX2VyYXNlX2N1 cnNvciAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICosIHN0cnVjdCBnbHlw aF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50 LCBlbnVtIG1jX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19j dXJzb3JfdHlwZSwgaW50KTsKKworZXh0ZXJuIHZvaWQgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHN0 cnVjdCB3aW5kb3cgKiwgc3RydWN0IGdseXBoX21hdHJpeCAqLCBzdHJ1Y3QgZ2x5cGhfcm93ICos CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50LCBpbnQsIGludCwgaW50LCBp bnQsIGludCwgaW50LCBpbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19jdXJzb3JfdHlwZSwgaW50LCBzdHJ1Y3QgbWNfUkdCLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGJvb2wsIGVudW0gbWNfZmxhdm9yLCBib29sKTsKKworZXh0ZXJuIGlu dCBtY19kcmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICos IHN0cnVjdCBnbHlwaF9yb3cgKiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgZW51 bSBnbHlwaF9yb3dfYXJlYSwgcHRyZGlmZl90LCBwdHJkaWZmX3QsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UsIGludCwgaW50LCBzdHJ1Y3QgbWNfUkdC LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19mbGF2b3IsIGVudW0gbWNfY3Vy c29yX3R5cGUsIGludCwgYm9vbCwgYm9vbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGVu dW0gZHJhd19nbHlwaF9hY3Rpb24sIGJvb2wpOworCitleHRlcm4gc3RydWN0IGdseXBoX21hdHJp eCAqIG1jX3NhdmVfZ2x5cGhfbWF0cml4IChzdHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCitleHRl cm4gdm9pZCBtY19yZXN0b3JlX2dseXBoX21hdHJpeCAoc3RydWN0IGdseXBoX21hdHJpeCAqLCBz dHJ1Y3QgZ2x5cGhfbWF0cml4ICopOworCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogLyogVGV4dCBjdXJzb3IgdHlwZXMuICAqLwogCiBl bnVtIHRleHRfY3Vyc29yX2tpbmRzCkBAIC00MDQsNiArNTI5LDE4IEBAIHN0cnVjdCBnbHlwaF9z bGljZQogCiBzdHJ1Y3QgZ2x5cGgKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpbnQgcmVsYXRpdmVfeCwgaHBvczsKKworICBwdHJk aWZmX3QgYnl0ZXBvczsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBQb3Np dGlvbiBmcm9tIHdoaWNoIHRoaXMgZ2x5cGggd2FzIGRyYXduLiAgSWYgYG9iamVjdCcgYmVsb3cg aXMgYQogICAgICBMaXNwIHN0cmluZywgdGhpcyBpcyBhbiBpbmRleCBpbnRvIHRoYXQgc3RyaW5n LiAgSWYgaXQgaXMgYQogICAgICBidWZmZXIsIHRoaXMgaXMgYSBwb3NpdGlvbiBpbiB0aGF0IGJ1 ZmZlci4gIEluIGFkZGl0aW9uLCBzb21lCkBAIC0xMjcwLDYgKzE0MDcsMjggQEAgZW51bSBkcmF3 X2dseXBoc19mYWNlCiAKIHN0cnVjdCBnbHlwaF9zdHJpbmcKIHsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIGJvb2xfYmYgbGVmdF9v dmVyd3JpdHRlbl9wIDogMTsKKworICAgIGJvb2xfYmYgcmlnaHRfb3ZlcndyaXR0ZW5fcCA6IDE7 CisKKyAgICBib29sX2JmIHJlY3RhbmdsZV9udWtlZF9wIDogMTsKKworICAgIGJvb2xfYmYgYmFj a2dyb3VuZF9udWtlZF9wIDogMTsKKworICAgIGVudW0gZHJhd19nbHlwaF9hY3Rpb24KKyAgICB7 CisgICAgICBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAgICAgIE1DX0VSQVNFX0dMWVBIX1NUUklO RworICAgIH0gYWN0aW9uX3R5cGU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAg LyogWC1vcmlnaW4gb2YgdGhlIHN0cmluZy4gICovCiAgIGludCB4OwogCkBAIC0yODM0LDYgKzI5 OTMsMjggQEAgdHlwZWRlZiB2b2lkICgqZnJhbWVfcGFybV9oYW5kbGVyKSAoc3RydWN0IGZyYW1l ICosIExpc3BfT2JqZWN0LCBMaXNwX09iamVjdCk7CiAKIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJm YWNlCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKy8qIGByZWRpc3BsYXlfaW50ZXJmYWNlJyBpbiBgbnN0ZXJtLm1gIHwgYHczMnRlcm0u Y2AgfCBgeHRlcm0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Jvb2wgYWN0aXZlX3AsIGJvb2wgY3Vyc29yX2djX3Ap OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIEhhbmRsZXJzIGZvciBzZXR0 aW5nIGZyYW1lIHBhcmFtZXRlcnMuICAqLwogICBmcmFtZV9wYXJtX2hhbmRsZXIgKmZyYW1lX3Bh cm1faGFuZGxlcnM7CiAKZGlmZiAtLWdpdCBhL3NyYy9kaXNwbmV3LmMgYi9zcmMvZGlzcG5ldy5j CmluZGV4IDAxMzFiNjMuLjRhNWVlZTcgMTAwNjQ0Ci0tLSBhL3NyYy9kaXNwbmV3LmMKKysrIGIv c3JjL2Rpc3BuZXcuYwpAQCAtNTYsNiArNTYsMTgzMCBAQCBhbG9uZyB3aXRoIEdOVSBFbWFjcy4g IElmIG5vdCwgc2VlIDxodHRwczovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uICAqLwogI2luY2x1 ZGUgInczMi5oIgogI2VuZGlmCiAMCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBi ZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKK3N0cnVjdCBnbHlwaHNfc2tpcHBlZAoreworICBw dHJkaWZmX3QgYWxsb2NhdGVkOworICBwdHJkaWZmX3QgdXNlZDsKKyAgc3RydWN0IHNraXBwZWRf aXRlbXMKKyAgICB7CisgICAgICBpbnQgeDsKKyAgICAgIGludCBocG9zOworICAgICAgYm9vbCBl bmFibGVkX3A7CisgICAgfSAqc2tpcHBlZDsKK30gYXJyYXlfZ2x5cGhzX3NraXBwZWQ7CisKK3N0 cnVjdCBtY19yb3dfZW50cnkKK3sKKyAgaW50IG9sZF91c2VzLCBuZXdfdXNlczsKKyAgaW50IG5l d19saW5lX251bWJlcjsKKyAgcHR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N0cnVjdCBnbHlw aF9yb3cgKmQgPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSk7CisgICAgICBzdHJ1Y3Qg Z2x5cGhfcm93ICpjID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkpOworICAgICAgaWYg KGMtPmVuYWJsZWRfcAorICAgICAgICAgICYmIGQtPmVuYWJsZWRfcAorICAgICAgICAgICYmICFk LT5yZWRyYXdfZnJpbmdlX2JpdG1hcHNfcAorICAgICAgICAgICYmIGMtPnkgPT0gZC0+eQorICAg ICAgICAgICYmIE1BVFJJWF9ST1dfQk9UVE9NX1kgKGMpIDw9IHliCisgICAgICAgICAgJiYgTUFU UklYX1JPV19CT1RUT01fWSAoZCkgPD0geWIKKyAgICAgICAgICAmJiByb3dfZXF1YWxfcCAoYywg ZCwgMSkpCisgICAgICAgIHsKKyAgICAgICAgICBhc3NpZ25fcm93IChjLCBkKTsKKyAgICAgICAg ICBkLT5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAg ICAgYnJlYWs7CisgICAgfQorI2lmZGVmIEhBVkVfWFdJREdFVFMKKyAgLyogQ3VycmVudGx5IHRo aXMgc2VlbXMgbmVlZGVkIHRvIGRldGVjdCB4d2lkZ2V0IG1vdmVtZW50IHJlbGlhYmx5LiAqLwor ICAgIHJldHVybiAwOworI2VuZGlmCisgIC8qIEdpdmUgdXAgaWYgc29tZSByb3dzIGluIHRoZSBk ZXNpcmVkIG1hdHJpeCBhcmUgbm90IGVuYWJsZWQuICovCisgIGlmICghIE1BVFJJWF9ST1dfRU5B QkxFRF9QIChkZXNpcmVkX21hdHJpeCwgaSkpCisgICAgcmV0dXJuIC0xOworICBmaXJzdF9vbGQg PSBmaXJzdF9uZXcgPSBpOworICAvKiBTZXQgbGFzdF9uZXcgdG8gdGhlIGluZGV4ICsgMSBvZiB0 aGUgcm93IHRoYXQgcmVhY2hlcyB0aGUKKyAgICAgYm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nRfbWF0cml4LCBpKSk7CisgICAgICBpZiAoYm90dG9tIDw9IHliKQorICAgICAgICArK2k7 CisgICAgICBpZiAoYm90dG9tID49IHliKQorICAgICAgICBicmVhazsKKyAgICB9CisgIGxhc3Rf b2xkID0gaTsKKyAgLyogU2tpcCBvdmVyIHJvd3MgZXF1YWwgYXQgdGhlIGJvdHRvbS4gKi8KKyAg aSA9IGxhc3RfbmV3OworICBqID0gbGFzdF9vbGQ7CisgIHdoaWxlIChpIC0gMSA+IGZpcnN0X25l dworICAgICAgICAgJiYgaiAtIDEgPiBmaXJzdF9vbGQKKyAgICAgICAgICYmIE1BVFJJWF9ST1df RU5BQkxFRF9QIChjdXJyZW50X21hdHJpeCwgaiAtIDEpCisgICAgICAgICAmJiAoTUFUUklYX1JP VyAoY3VycmVudF9tYXRyaXgsIGogLSAxKS0+eQorICAgICAgICAgICAgID09IE1BVFJJWF9ST1cg KGRlc2lyZWRfbWF0cml4LCBpIC0gMSktPnkpCisgICAgICAgICAmJiAhTUFUUklYX1JPVyAoZGVz aXJlZF9tYXRyaXgsIGkgLSAxKS0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBzX3AKKyAgICAgICAgICYm IHJvd19lcXVhbF9wIChNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJpeCwgaSAtIDEpLAorICAgICAg ICAgICAgICAgICAgICAgICAgIE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBqIC0gMSksIDEp KQorICAgIC0taSwgLS1qOworICBsYXN0X25ldyA9IGk7CisgIGxhc3Rfb2xkID0gajsKKyAgLyog Tm90aGluZyB0byBkbyBpZiBhbGwgcm93cyBhcmUgZXF1YWwuICovCisgIGlmIChsYXN0X25ldyA9 PSBmaXJzdF9uZXcpCisgICAgcmV0dXJuIDA7CisgIC8qIENoZWNrIGZvciBpbnRlZ2VyIG92ZXJm bG93IGluIHNpemUgY2FsY3VsYXRpb24uCisgICAgIElmIG5leHRfYWxtb3N0X3ByaW1lIGNoZWNr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KyAgLyogUmVhbGxvY2F0ZSB2ZWN0b3JzLCB0YWJs ZXMgZXRjLiBpZiBuZWNlc3NhcnkuICovCisgIGlmIChjdXJyZW50X21hdHJpeC0+bnJvd3MgPiBt Y19vbGRfbGluZXNfc2l6ZSkKKyAgICBtY19vbGRfbGluZXMgPSB4cGFsbG9jIChtY19vbGRfbGlu ZXMsICZtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50 X21hdHJpeC0+bnJvd3MgLSBtY19vbGRfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX29sZF9saW5lcyk7CisgIGlmIChkZXNpcmVkX21hdHJp eC0+bnJvd3MgPiBtY19uZXdfbGluZXNfc2l6ZSkKKyAgICBtY19uZXdfbGluZXMgPSB4cGFsbG9j IChtY19uZXdfbGluZXMsICZtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICBkZXNpcmVkX21hdHJpeC0+bnJvd3MgLSBtY19uZXdfbGluZXNfc2l6ZSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICBJTlRfTUFYLCBzaXplb2YgKm1jX25ld19saW5lcyk7CisgIG4gPSBk ZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgIG4gKz0gY3VycmVudF9tYXRyaXgtPm5yb3dzOworICBp ZiAobWNfcm93X3RhYmxlX3NpemUgPCAzICogbikKKyAgICB7CisgICAgICBwdHJkaWZmX3Qgc2l6 ZSA9IG5leHRfYWxtb3N0X3ByaW1lICgzICogbik7CisgICAgICBtY19yb3dfdGFibGUgPSB4bnJl YWxsb2MgKG1jX3Jvd190YWJsZSwgc2l6ZSwgc2l6ZW9mICptY19yb3dfdGFibGUpOworICAgICAg bWNfcm93X3RhYmxlX3NpemUgPSBzaXplOworICAgICAgbWVtc2V0IChtY19yb3dfdGFibGUsIDAs IHNpemUgKiBzaXplb2YgKm1jX3Jvd190YWJsZSk7CisgICAgfQorICBpZiAobiA+IG1jX3Jvd19l bnRyeV9wb29sX3NpemUpCisgICAgbWNfcm93X2VudHJ5X3Bvb2wgPSB4cGFsbG9jIChtY19yb3df ZW50cnlfcG9vbCwgJm1jX3Jvd19lbnRyeV9wb29sX3NpemUsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBuIC0gbWNfcm93X2VudHJ5X3Bvb2xfc2l6ZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIC0xLCBzaXplb2YgKm1jX3Jvd19lbnRyeV9wb29sKTsKKyAgaWYgKGRlc2ly ZWRfbWF0cml4LT5ucm93cyA+IG1jX3J1bnNfc2l6ZSkKKyAgICB7CisgICAgICBtY19ydW5zID0g eG5yZWFsbG9jIChtY19ydW5zLCBkZXNpcmVkX21hdHJpeC0+bnJvd3MsIHNpemVvZiAqbWNfcnVu cyk7CisgICAgICBtY19ydW5fcG9vbCA9IHhucmVhbGxvYyAobWNfcnVuX3Bvb2wsIGRlc2lyZWRf bWF0cml4LT5ucm93cywgc2l6ZW9mICptY19ydW5fcG9vbCk7CisgICAgICBtY19ydW5zX3NpemUg PSBkZXNpcmVkX21hdHJpeC0+bnJvd3M7CisgICAgfQorICBucnVucyA9IHJ1bl9pZHggPSAwOwor ICBtY19yb3dfZW50cnlfaWR4ID0gMDsKKyAgLyogQWRkIHJvd3MgZnJvbSB0aGUgY3VycmVudCBh bmQgZGVzaXJlZCBtYXRyaXggdG8gdGhlIGhhc2ggdGFibGUKKyAgICAgcm93X2hhc2hfdGFibGUg dG8gYmUgYWJsZSB0byBmaW5kIGVxdWFsIG9uZXMgcXVpY2tseS4gKi8KKyAgZm9yIChpID0gZmly c3Rfb2xkOyBpIDwgbGFzdF9vbGQ7ICsraSkKKyAgICB7CisgICAgICBpZiAoTUFUUklYX1JPV19F TkFCTEVEX1AgKGN1cnJlbnRfbWF0cml4LCBpKSkKKyAgICAgICAgeworICAgICAgICAgIGVudHJ5 ID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yAgICAgICAgLyogUmVjb3JkIG1v dmUuICovCisgICAgICAgIHJ1bi0+Y3VycmVudF92cG9zID0gaTsKKyAgICAgICAgcnVuLT5jdXJy ZW50X3kgPSBNQVRSSVhfUk9XIChjdXJyZW50X21hdHJpeCwgaSktPnk7CisgICAgICAgIHJ1bi0+ ZGVzaXJlZF92cG9zID0gbmV3X2xpbmU7CisgICAgICAgIHJ1bi0+ZGVzaXJlZF95ID0gTUFUUklY X1JPVyAoZGVzaXJlZF9tYXRyaXgsIG5ld19saW5lKS0+eTsKKyAgICAgICAgcnVuLT5ucm93cyA9 IDE7CisgICAgICAgIHJ1bi0+aGVpZ2h0ID0gTUFUUklYX1JPVyAoY3VycmVudF9tYXRyaXgsIGkp LT5oZWlnaHQ7CisgICAgICAgIC8qIEV4dGVuZCBiYWNrd2FyZC4gKi8KKyAgICAgICAgcCA9IGkg LSAxOworICAgICAgICBxID0gbmV3X2xpbmUgLSAxOworICAgICAgICB3aGlsZSAocCA+IGZpcnN0 X29sZAorICAgICAgICAgICAgICAgJiYgcSA+IGZpcnN0X25ldworICAgICAgICAgICAgICAgJiYg bWNfb2xkX2xpbmVzW3BdID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAgICAg ICAgICBpbnQgaCA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0OworICAg ICAgICAgICAgLS1ydW4tPmN1cnJlbnRfdnBvczsKKyAgICAgICAgICAgIC0tcnVuLT5kZXNpcmVk X3Zwb3M7CisgICAgICAgICAgICArK3J1bi0+bnJvd3M7CisgICAgICAgICAgICBydW4tPmhlaWdo dCArPSBoOworICAgICAgICAgICAgcnVuLT5kZXNpcmVkX3kgLT0gaDsKKyAgICAgICAgICAgIHJ1 bi0+Y3VycmVudF95IC09IGg7CisgICAgICAgICAgICAtLXAsIC0tcTsKKyAgICAgICAgICB9Cisg ICAgICAgIC8qIEV4dGVuZCBmb3J3YXJkLiAqLworICAgICAgICBwID0gaSArIDE7CisgICAgICAg IHEgPSBuZXdfbGluZSArIDE7CisgICAgICAgIHdoaWxlIChwIDwgbGFzdF9vbGQKKyAgICAgICAg ICAgICAgICYmIHEgPCBsYXN0X25ldworICAgICAgICAgICAgICAgJiYgbWNfb2xkX2xpbmVzW3Bd ID09IG1jX25ld19saW5lc1txXSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQgaCA9IE1B VFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCBwKS0+aGVpZ2h0OworICAgICAgICAgICAgKytydW4t Pm5yb3dzOworICAgICAgICAgICAgcnVuLT5oZWlnaHQgKz0gaDsKKyAgICAgICAgICAgICsrcCwg KytxOworICAgICAgICAgIH0KKyAgICAgICAgLyogSW5zZXJ0IHJ1biBpbnRvIGxpc3Qgb2YgYWxs IHJ1bnMuICBPcmRlciBydW5zIGJ5IGNvcGllZAorICAgICAgICAgICBwaXhlbCBsaW5lcy4gIE5v dGUgdGhhdCB3ZSByZWNvcmQgcnVucyB0aGF0IGRvbid0IGhhdmUgdG8KKyAgICAgICAgICAgYmUg Y29waWVkIGJlY2F1c2UgdGhleSBhcmUgYWxyZWFkeSBpbiBwbGFjZS4gIFRoaXMgaXMgZG9uZQor ICAgICAgICAgICBiZWNhdXNlIHdlIGNhbiBhdm9pZCBjYWxsaW5nIHVwZGF0ZV93aW5kb3dfbGlu ZSBpbiB0aGlzCisgICAgICAgICAgIGNhc2UuICovCisgICAgICAgIGZvciAocCA9IDA7IHAgPCBu cnVucyAmJiBtY19ydW5zW3BdLT5oZWlnaHQgPiBydW4tPmhlaWdodDsgKytwKQorICAgICAgICAg IDsKKyAgICAgICAgZm9yIChxID0gbnJ1bnM7IHEgPiBwOyAtLXEpCisgICAgICAgICAgbWNfcnVu c1txXSA9IG1jX3J1bnNbcSAtIDFdOworICAgICAgICBtY19ydW5zW3BdID0gcnVuOworICAgICAg ICArK25ydW5zOworICAgICAgICBpICs9IHJ1bi0+bnJvd3M7CisgICAgICB9CisgICAgICBlbHNl CisgICAgICAgICsraTsKKyAgLyogRG8gdGhlIG1vdmVzLiAgRG8gaXQgaW4gYSB3YXkgdGhhdCB3 ZSBkb24ndCBvdmVyd3JpdGUgc29tZXRoaW5nCisgICAgIHdlIHdhbnQgdG8gY29weSBsYXRlciBv bi4gIFRoaXMgaXMgbm90IHNvbHZhYmxlIGluIGdlbmVyYWwKKyAgICAgYmVjYXVzZSB0aGVyZSBp cyBvbmx5IG9uZSBkaXNwbGF5IGFuZCB3ZSBkb24ndCBoYXZlIGEgd2F5IHRvCisgICAgIGV4Y2hh bmdlIGFyZWFzIG9uIHRoaXMgZGlzcGxheS4gIEV4YW1wbGU6CisgICAgICAgICAgKy0tLS0tLS0t LS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgfCAgICAgQSAgICAgfCAgICAgICB8 ICAgICBCICAgICB8CisgICAgICAgICAgKy0tLS0tLS0tLS0tKyAgLS0+ICArLS0tLS0tLS0tLS0r CisgICAgICAgICAgfCAgICAgQiAgICAgfCAgICAgICB8ICAgICBBICAgICB8CisgICAgICAgICAg Ky0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCisgICAgIEluc3RlYWQsIHByZWZlciBi aWdnZXIgbW92ZXMsIGFuZCBpbnZhbGlkYXRlIG1vdmVzIHRoYXQgd291bGQKKyAgICAgY29weSBm cm9tIHdoZXJlIHdlIGNvcGllZCB0by4gKi8KKyAgZm9yIChpID0gMDsgaSA8IG5ydW5zOyArK2kp CisgICAgaWYgKG1jX3J1bnNbaV0tPm5yb3dzID4gMCkKKyAgICAgIHsKKyAgICAgICAgc3RydWN0 IHJ1biAqciA9IG1jX3J1bnNbaV07CisgICAgICAgIGlmIChyLT5jdXJyZW50X3kgIT0gci0+ZGVz aXJlZF95KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vICBmcHJpbnRmIChzdGRlcnIsICIl czogIHItPmN1cnJlbnQvZGVzaXJlZF92cG9zICglZC8lZCkgfCByLT5jdXJyZW50L2Rlc2lyZWRf eSAoJWQvJWQpXG4iLAorICAgICAgICAgICAgLy8gICAgICAgICAgIHItPmN1cnJlbnRfeSA8IHIt PmRlc2lyZWRfeSA/ICLihpMiIDogIuKGkSIsCisgICAgICAgICAgICAvLyAgICAgICAgICAgci0+ Y3VycmVudF92cG9zLCByLT5kZXNpcmVkX3Zwb3MsIHItPmN1cnJlbnRfeSwgci0+ZGVzaXJlZF95 KTsKKyAgICAgICAgICAgIC8vICByaWYtPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsKKyAg ICAgICAgICAgIC8vICByaWYtPnNjcm9sbF9ydW5faG9vayAodywgcik7CisgICAgICAgICAgfQor ICAgICAgICAvKiBUcnVuY2F0ZSBydW5zIHRoYXQgY29weSB0byB3aGVyZSB3ZSBjb3BpZWQgdG8s IGFuZAorICAgICAgICAgICBpbnZhbGlkYXRlIHJ1bnMgdGhhdCBjb3B5IGZyb20gd2hlcmUgd2Ug Y29waWVkIHRvLiAqLworICAgICAgICBmb3IgKGogPSBucnVucyAtIDE7IGogPiBpOyAtLWopCisg ICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0IHJ1biAqcCA9IG1jX3J1bnNbal07CisgICAg ICAgICAgICBib29sIHRydW5jYXRlZF9wID0gMDsKKyAgICAgICAgICAgIGlmIChwLT5ucm93cyA+ IDAKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgPCByLT5kZXNpcmVkX3kgKyByLT5o ZWlnaHQKKyAgICAgICAgICAgICAgICAmJiBwLT5kZXNpcmVkX3kgKyBwLT5oZWlnaHQgPiByLT5k ZXNpcmVkX3kpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAocC0+ZGVzaXJl ZF95IDwgci0+ZGVzaXJlZF95KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICBwLT5ucm93cyA9IHItPmRlc2lyZWRfdnBvcyAtIHAtPmRlc2lyZWRfdnBvczsKKyAgICAg ICAgICAgICAgICAgICAgcC0+aGVpZ2h0ID0gci0+ZGVzaXJlZF95IC0gcC0+ZGVzaXJlZF95Owor ICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZWRfcCA9IDE7CisgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAg ICAgICAgICBpbnQgbnJvd3NfY29waWVkID0gKHItPmRlc2lyZWRfdnBvcyArIHItPm5yb3dzCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwLT5kZXNpcmVkX3Zwb3Mp OworICAgICAgICAgICAgICAgICAgICBpZiAocC0+bnJvd3MgPD0gbnJvd3NfY29waWVkKQorICAg ICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzID0gMDsKKyAgICAgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAg IGludCBoZWlnaHRfY29waWVkID0gKHItPmRlc2lyZWRfeSArIHItPmhlaWdodAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHAtPmRlc2lyZWRfeSk7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmN1cnJlbnRfdnBvcyArPSBucm93c19jb3BpZWQ7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfdnBvcyArPSBucm93c19jb3Bp ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPm5yb3dzIC09IG5yb3dzX2NvcGllZDsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgcC0+Y3VycmVudF95ICs9IGhlaWdodF9jb3BpZWQ7 CisgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmRlc2lyZWRfeSArPSBoZWlnaHRfY29waWVk OworICAgICAgICAgICAgICAgICAgICAgICAgICBwLT5oZWlnaHQgLT0gaGVpZ2h0X2NvcGllZDsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ1bmNhdGVkX3AgPSAxOworICAgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAg ICAgICAgICBpZiAoci0+Y3VycmVudF95ICE9IHItPmRlc2lyZWRfeQorICAgICAgICAgICAgICAg IC8qIFRoZSBjb25kaXRpb24gYmVsb3cgaXMgZXF1aXZhbGVudCB0bworICAgICAgICAgICAgICAg ICAgICgocC0+Y3VycmVudF95ID49IHItPmRlc2lyZWRfeQorICAgICAgICAgICAgICAgICAgICAg JiYgcC0+Y3VycmVudF95IDwgci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KQorICAgICAgICAgICAg ICAgICAgICB8fCAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0ID4gci0+ZGVzaXJlZF95CisgICAg ICAgICAgICAgICAgICAgICAgICAmJiAocC0+Y3VycmVudF95ICsgcC0+aGVpZ2h0CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPD0gci0+ZGVzaXJlZF95ICsgci0+aGVpZ2h0KSkpCisgICAg ICAgICAgICAgICAgICAgYmVjYXVzZSB3ZSBoYXZlIDAgPCBwLT5oZWlnaHQgPD0gci0+aGVpZ2h0 LiAqLworICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSA8IHItPmRlc2lyZWRfeSArIHIt PmhlaWdodAorICAgICAgICAgICAgICAgICYmIHAtPmN1cnJlbnRfeSArIHAtPmhlaWdodCA+IHIt PmRlc2lyZWRfeSkKKyAgICAgICAgICAgICAgcC0+bnJvd3MgPSAwOworICAgICAgICAgICAgLyog UmVvcmRlciBydW5zIGJ5IGNvcGllZCBwaXhlbCBsaW5lcyBpZiB0cnVuY2F0ZWQuICovCisgICAg ICAgICAgICBpZiAodHJ1bmNhdGVkX3AgJiYgcC0+bnJvd3MgPiAwKQorICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgaW50IGsgPSBucnVucyAtIDE7CisgICAgICAgICAgICAgICAgd2hp bGUgKG1jX3J1bnNba10tPm5yb3dzID09IDAgfHwgbWNfcnVuc1trXS0+aGVpZ2h0IDwgcC0+aGVp Z2h0KQorICAgICAgICAgICAgICAgICAgay0tOworICAgICAgICAgICAgICAgIG1lbW1vdmUgKG1j X3J1bnMgKyBqLCBtY19ydW5zICsgaiArIDEsIChrIC0gaikgKiBzaXplb2YgKCptY19ydW5zKSk7 CisgICAgICAgICAgICAgICAgbWNfcnVuc1trXSA9IHA7CisgICAgICAgICAgICAgIH0KKyAgICAg ICAgICB9CisgICAgICAgIC8qIEFzc2lnbiBtYXRyaXggcm93cy4gKi8KKyAgICAgICAgZm9yIChq ID0gMDsgaiA8IHItPm5yb3dzOyArK2opCisgICAgICAgICAgeworICAgICAgICAgICAgc3RydWN0 IGdseXBoX3JvdyAqZnJvbSwgKnRvOworICAgICAgICAgICAgYm9vbCB0b19vdmVybGFwcGVkX3A7 CisgICAgICAgICAgICB0byA9IE1BVFJJWF9ST1cgKGN1cnJlbnRfbWF0cml4LCByLT5kZXNpcmVk X3Zwb3MgKyBqKTsKKyAgICAgICAgICAgIGZyb20gPSBNQVRSSVhfUk9XIChkZXNpcmVkX21hdHJp eCwgci0+ZGVzaXJlZF92cG9zICsgaik7CisgICAgICAgICAgICB0b19vdmVybGFwcGVkX3AgPSB0 by0+b3ZlcmxhcHBlZF9wOworICAgICAgICAgICAgZnJvbS0+cmVkcmF3X2ZyaW5nZV9iaXRtYXBz X3AgPSBmcm9tLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3A7CisgICAgICAgICAgICBhc3NpZ25f cm93ICh0bywgZnJvbSk7CisgICAgICAgICAgICAvKiBUaGUgYWJvdmUgYGFzc2lnbl9yb3cnIGFj dHVhbGx5IGRvZXMgc3dhcCwgc28gaWYgd2UgaGFkCisgICAgICAgICAgICAgICBhbiBvdmVybGFw IGluIHRoZSBjb3B5IGRlc3Rp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AgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPV19FTkRfQllURVBPUyAo Y3VycmVudF9yb3cgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAt MTsKKyAgaW50IG1hdHJpeF9yb3dfc3RhcnRfYnl0ZXBvcyA9IE1BVFJJWF9ST1dfU1RBUlRfQllU RVBPUyAoZGVzaXJlZF9yb3cpOworICBpbnQgbWF0cml4X3Jvd19lbmRfYnl0ZXBvcyA9IE1BVFJJ WF9ST1dfRU5EX0JZVEVQT1MgKGRlc2lyZWRfcm93KTsKKyAgLyogVGhlIGZpcnN0IGNvbmRpdGlv biB0ZXN0cyBmb3IgYSBzb2xpdGFyeSByb3cgY29udGFpbmluZyBaViwgcHJlY2VkZWQgYnkgYQor ICByb3cgY29udGFpbmluZyBhIHBlbnVsdGltYXRlIGdseXBoIHdpdGggYSBjaGFycG9zIG9mIFpW IC0gMSBmb2xsb3dlZCBieSBhbiBlbmQKKyAgb2Ygcm93IHNwYWNlIGdseXBoIHdpdGggYSBjaGFy cG9zIG9mIDAuICBUaGUgb3RoZXIgY29uZGl0aW9ucyB0ZXN0IGZvciBhbiBlbXB0eQorICBidWZm ZXIgKG5vdCBuYXJyb3dlZCksIG9yIGFuIGVtcHR5IG5hcnJvd2VkIGJ1ZmZlci4gKi8KKyAgYm9v bCByb3dfYXRfenZfcCA9ICgodnBvcyAhPSAwCisgICAgICAgICAgICAgICAgICAgICAgICYmIChj dXJyZW50X3JvdyAtIDEpLT51c2VkW1RFWFRfQVJFQV0gPiAwCisgICAgICAgICAgICAgICAgICAg ICAgICYmIHByZXZfbWF0cml4X3Jvd19zdGFydF9ieXRlcG9zICE9IHByZXZfbWF0cml4X3Jvd19l bmRfYnl0ZXBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiAhKGN1cnJlbnRfcm93IC0gMSkt PmVuZHNfYXRfenZfcAorICAgICAgICAgICAgICAgICAgICAgICAmJiBtYXRyaXhfcm93X3N0YXJ0 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isgICAgICAgICAgaW50IGxlbiA9IGRlc2lyZWRfcm93LT51c2VkW1RFWFRf QVJFQV07CisgICAgICAgICAgaW50IGhwb3MgPSBkZXNpcmVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJF QV0gLSB1cGRhdGVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgdy0+b3V0cHV0 X2N1cnNvci54ID0KKyAgICAgICAgICAgIG1jX2RyYXdfZ2x5cGhzICh3LCBkZXNpcmVkX21hdHJp eCwgdXBkYXRlZF9yb3csIHctPm91dHB1dF9jdXJzb3IueCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBURVhUX0FSRUEsIGhwb3MsIGhwb3MgKyBsZW4sIERSQVdfTk9STUFMX1RFWFQsIDAs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdnBvcywgbHNsLCBnbHlwaF9mbGF2b3IsIGN1 cnNvcl90eXBlLCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLmFj dGl2ZV9wLCBjdXJzb3JfZ2NfcCwgTUNfRFJBV19HTFlQSF9TVFJJTkcsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZHJhd19wKTsKKyAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLmhwb3Mg Kz0gbGVuOworICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgIH0KKyAgICAgIC8q IENsZWFyIHRvIGVuZCBvZiB3aW5kb3cuICovCisgICAgICBpZiAoZHJhd19wKQorICAgICAgICBy aWYtPmNsZWFyX2VuZF9vZl9saW5lICh3LCB1cGRhdGVkX3JvdywgVEVYVF9BUkVBLCAtMSk7Cisg ICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgLyogVGhpcyBlcmFzZXMgdGhlIGN1cnNvci4gIFdl IGRvIHRoaXMgaGVyZSBiZWNhdXNlCisgICAgICAgICBub3RpY2VvdmVyd3JpdHRlbl90ZXh0X2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3AgPSBtaW4gKGN1cnJl bnRfcm93LT51c2VkW1RFWFRfQVJFQV0sIGRlc2lyZWRfc3RvcF9wb3MpOworICAgICAgICBpID0g MDsKKyAgICAgICAgeCA9IGRlc2lyZWRfcm93LT54OworICAgICAgICBpbnQgY2xlYXJfdG9feCA9 IDA7CisKKyAgICAgICAgLyogTG9vcCBvdmVyIGdseXBocyB0aGF0IGN1cnJlbnQgYW5kIGRlc2ly ZWQgcm93IG1heSBoYXZlIGluIGNvbW1vbi4gKi8KKyAgICAgICAgd2hpbGUgKGkgPCBzdG9wKQor ICAgICAgICAgIHsKKyAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgPSAwOwor ICAgICAgICAgICAgYm9vbCBjYW5fc2tpcF9wID0gIWFib3J0X3NraXBwaW5nOworICAgICAgICAg ICAgLyogU2tpcCBvdmVyIGdseXBocyB0aGF0IGJvdGggcm93cyBoYXZlIGluIGNvbW1vbi4gIFRo ZXNlIGRvbid0IGhhdmUKKyAgICAgICAgICAgIHRvIGJlIHdyaXR0ZW4uICBXZSBjYW4ndCBza2lw IGlmIHRoZSBsYXN0IGN1cnJlbnQgZ2x5cGggb3ZlcmxhcHMgdGhlCisgICAgICAgICAgICBnbHlw aCB0byBpdHMgcmlnaHQuICBGb3IgZXhhbXBsZSwgY29uc2lkZXIgYSBjdXJyZW50IHJvdyBvZiBg aWYnIHdpdGgKKyAgICAgICAgICAgIHRoZSBgZicgaW4gQ291cmllciBib2xkIHNvIHRoYXQgaXQg b3ZlcmxhcHMgdGhlIGAgJyB0byBpdHMgcmlnaHQuCisgICAgICAgICAgICBJZiB0aGUgZGVzaXJl ZCByb3cgaXMgYCAnLCB3ZSB3b3VsZCBza2lwIG92ZXIgdGhlIHNwYWNlIGFmdGVyIHRoZQorICAg ICAgICAgICAgYGlmJyBhbmQgdGhlcmUgd291bGQgcmVtYWluIGEgcGl4ZWwgZnJvbSB0aGUgYGYn IG9uIHRoZSBzY3JlZW4uICovCisgICAgICAgICAgICBpZiAob3ZlcmxhcHBpbmdfZ2x5cGhzX3Ag JiYgaSA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGgg KmdseXBoID0gJmN1cnJlbnRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXVtpIC0gMV07CisgICAgICAg ICAgICAgICAgaW50IGxlZnQsIHJpZ2h0OworICAgICAgICAgICAgICAgIHJpZi0+Z2V0X2dseXBo X292ZXJoYW5ncyAoZ2x5cGgsIFhGUkFNRSAody0+ZnJhbWUpLCAmbGVmdCwgJnJpZ2h0KTsKKyAg ICAgICAgICAgICAgICBjYW5fc2tpcF9wID0gKHJpZ2h0ID09IDAgJiYgIWFib3J0X3NraXBwaW5n KTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGNhbl9za2lwX3ApCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgc3RhcnRfaHBvcyA9IGk7CisgICAgICAgICAg ICAgICAgd2hpbGUgKGkgPCBzdG9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIEdMWVBIX0VR VUFMX1AgKGRlc2lyZWRfZ2x5cGgsIGN1cnJlbnRfZ2x5cGgpKQorICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICArK2FycmF5X2dseXBoc19za2lwcGVkLnVzZWQ7CisgICAg ICAgICAgICAgICAgICAgIGlmIChhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxvY2F0ZWQgPCBhcnJh eV9nbHlwaHNfc2tpcHBlZC51c2VkKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgIGludCBvbGRfYWxsb2MgPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5hbGxv Y2F0ZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbmV3X2VsdHMgPSBhcnJheV9nbHlw aHNfc2tpcHBlZC51c2VkIC0gYXJyYXlfZ2x5cGhzX3NraXBwZWQuYWxsb2NhdGVkOworICAgICAg ICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZCA9CisgICAgICAg ICAgICAgICAgICAgICAgICAgIHhwYWxsb2MgKGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWQs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZhcnJheV9nbHlwaHNfc2tpcHBl ZC5hbGxvY2F0ZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19lbHRz LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfTUFYLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKmFycmF5X2dseXBoc19za2lwcGVkLnNr aXBwZWQpOworICAgICAgICAgICAgICAgICAgICAgICAgbWVtc2V0IChhcnJheV9nbHlwaHNfc2tp cHBlZC5za2lwcGVkICsgb2xkX2FsbG9jLCAwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGFycmF5X2dseXBoc19za2lwcGVkLmFsbG9jYXRlZCAtIG9sZF9hbGxvYykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBzaXplb2YgKmFycmF5X2dseXBoc19za2lw cGVkLnNraXBwZWQpOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg ICAgaW50IG50aCA9IGFycmF5X2dseXBoc19za2lwcGVkLnVzZWQgLSAxOworICAgICAgICAgICAg ICAgICAgICBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVkW250aF0ueCA9IHg7CisgICAgICAg ICAgICAgICAgICAgIGFycmF5X2dseXBoc19za2lwcGVkLnNraXBwZWRbbnRoXS5ocG9zID0gaTsK KyAgICAgICAgICAgICAgICAgICAgYXJyYXlfZ2x5cGhzX3NraXBwZWQuc2tpcHBlZFtudGhdLmVu YWJsZWRfcCA9IHRydWU7CisgICAgICAgICAgICAgICAgICAgIHggKz0gZGVzaXJlZF9nbHlwaC0+ cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICsrZGVzaXJlZF9nbHlwaCwgKytjdXJy ZW50X2dseXBoLCArK2k7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgLyog Q29uc2lkZXIgdGhlIGNhc2UgdGhhdCB0aGUgY3VycmVudCByb3cgY29udGFpbnMgInh4eCBwcHAg Z2dnIiBpbgorICAgICAgICAgICAgICAgIGl0YWxpYyBDb3VyaWVyIGZvbnQsIGFuZCB0aGUgZGVz aXJlZCByb3cgaXMgInh4eCBnZ2ciLiAgVGhlIGNoYXJhY3RlciBgcCcKKyAgICAgICAgICAgICAg ICBoYXMgbGJlYXJpbmcsIGBnJyBoYXMgbm90LiAgVGhlIGxvb3AgYWJvdmUgd2lsbCBzdG9wIGlu IGZyb250IG9mIHRoZQorICAgICAgICAgICAgICAgIGZpcnN0IGBwJyBpbiB0aGUgY3VycmVudCBy b3cuICBJZiB3ZSB3b3VsZCBzdGFydCB3cml0aW5nIGdseXBocyB0aGVyZSwgd2UKKyAgICAgICAg ICAgICAgICB3b3VsZG4ndCBlcmFzZSB0aGUgbGJlYXJpbmcgb2YgdGhlIGBwJy4gIFRoZSByZXN0 IG9mIHRoZSBsYmVhcmluZyBwcm9ibGVtCisgICAgICAgICAgICAgICAgaXMgdGhlbiB0YWtlbiBj YXJlIG9mIGJ5IGRyYXdfZ2x5cGhzLiAqLworICAgICAgICAgICAgICAgIGlmIChvdmVybGFwcGlu Z19nbHlwaHNfcAorICAgICAgICAgICAgICAgICAgICAmJiBpID4gMAorICAgICAgICAgICAgICAg ICAgICAmJiBpIDwgY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAg ICAgICAmJiAoY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAhPSBkZXNpcmVkX3Jvdy0+dXNl ZFtURVhUX0FSRUFdKSkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg aW50IGxlZnQsIHJpZ2h0OworICAgICAgICAgICAgICAgICAgICByaWYtPmdldF9nbHlwaF9vdmVy aGFuZ3MgKGN1cnJlbnRfZ2x5cGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgWEZSQU1F ICh3LT5mcmFtZSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmxlZnQsICZyaWdodCk7 CisgICAgICAgICAgICAgICAgICAgIHdoaWxlIChsZWZ0ID4gMCAmJiBpID4gMCkKKyAgICAgICAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAtLWksIC0tZGVzaXJlZF9n bHlwaCwgLS1jdXJyZW50X2dseXBoOworICAgICAgICAgICAgICAgICAgICAgICAgeCAtPSBkZXNp cmVkX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgLT0g ZGVzaXJlZF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICAvKiBBYm9ydCB0aGUgc2tpcHBpbmcgYWxnb3JpdGhtIGlmIHdlIGVu ZCB1cCBiZWZvcmUKKyAgICAgICAgICAgICAgICAgICAgICAgb3VyIHN0YXJ0aW5nIHBvaW50LCB0 byBhdm9pZCBsb29waW5nIChidWcjMTA3MCkuCisgICAgICAgICAgICAgICAgICAgICAgIFRoaXMg Y2FuIGhhcHBlbiB3aGVuIHRoZSBsYmVhcmluZyBpcyBsYXJnZXIgdGhhbgorICAgICAgICAgICAg ICAgICAgICAgICB0aGUgcGl4ZWwgd2lkdGguICovCisgICAgICAgICAgICAgICAgICAgIGFib3J0 X3NraXBwaW5nID0gKGkgPCBzdGFydF9ocG9zKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgLyogVHJ5IHRvIGF2b2lkIHdyaXRpbmcgdGhlIGVudGly ZSByZXN0IG9mIHRoZSBkZXNpcmVkIHJvdworICAgICAgICAgICAgICAgYnkgbG9va2luZyBmb3Ig YSByZXN5bmMgcG9pbnQuICBUaGlzIG1haW5seSBwcmV2ZW50cworICAgICAgICAgICAgICAgbW9k ZSBsaW5lIGZsaWNrZXJpbmcgaW4gdGhlIGNhc2UgdGhlIG1vZGUgbGluZSBpcyBpbgorICAgICAg ICAgICAgICAgZml4ZWQtcGl0Y2ggZm9udCwgd2hpY2ggaXQgdXN1YWxseSB3aWxsIGJlLiAqLwor ICAgICAgICAgICAgaWYgKGkgPCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IHN0YXJ0X3ggPSB4LCBzdGFydF9ocG9zID0g aTsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnN0YXJ0ID0gZGVzaXJlZF9nbHlwaDsK KyAgICAgICAgICAgICAgICBpbnQgY3VycmVudF94ID0geDsKKyAgICAgICAgICAgICAgICBib29s IHNraXBfZmlyc3RfcCA9ICFjYW5fc2tpcF9wOworICAgICAgICAgICAgICAgIC8qIEZpbmQgdGhl IG5leHQgZ2x5cGggdGhhdCdzIGVxdWFsIGFnYWluLiAqLworICAgICAgICAgICAgICAgIHdoaWxl IChpIDwgc3RvcAorICAgICAgICAgICAgICAgICAgICAgICAmJiAoc2tpcF9maXJzdF9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICB8fCAhR0xZUEhfRVFVQUxfUCAoZGVzaXJlZF9nbHlwaCwg Y3VycmVudF9nbHlwaCkpCisgICAgICAgICAgICAgICAgICAgICAgICYmIHggPT0gY3VycmVudF94 KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICB4ICs9IGRlc2lyZWRf Z2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgICAgICAgICAgICBjdXJyZW50X3ggKz0gY3Vy cmVudF9nbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgICAgICAgICsrZGVzaXJlZF9n bHlwaCwgKytjdXJyZW50X2dseXBoLCArK2k7CisgICAgICAgICAgICAgICAgICAgIHNraXBfZmly c3RfcCA9IDA7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZm9yIChpbnQg ZWx0ID0gMDsKKyAgICAgICAgICAgICAgICAgICAgIGVsdCA8IGFycmF5X2dseXBoc19za2lwcGVk LnVzZWQ7CisgICAgICAgICAgICAgICAgICAgICArK2VsdCkKKyAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgaW50IHggPSBhcnJheV9nbHlwaHNfc2tpcHBlZC5za2lwcGVk W2VsdF0ueDsKKyAgICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBhcnJheV9nbHlwaHNfc2tp cHBlZC5za2lwcGVkW2VsdF0uaHBvczsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGdseXBo ICp0YXJnZXRfZ2x5cGggPQorICAgICAgICAgICAgICAgICAgICAgIG1jX2dldF9jdXJzb3JfZ2x5 cGggKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgaHBvcywgdnBvcyk7CisgICAgICAg ICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAgICAgICAgICAgICAgICAgIGZwcmludGYg KHN0ZGVyciwgIlNLSVBQRUQ6ICB2cG9zICglZCkgfCBjaGFyICglZC8lcykgfCB4OiAoJWQpIHwg aHBvcyAoJWQvJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg dnBvcywgdGFyZ2V0X2dseXBoLT51LmNoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbWNfY2hhcl90b19zdHJpbmcgKHRhcmdldF9nbHlwaC0+dS5jaCksCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4LCBocG9zLCB1cGRhdGVkX3Jvdy0+dXNl ZFtURVhUX0FSRUFdIC0gMSk7CisgICAgICAgICAgICAgICAgICAgIG1jX2RyYXdfcm93ICh3LCBk ZXNpcmVkX21hdHJpeCwgdXBkYXRlZF9yb3csIHRhcmdldF9nbHlwaCwgeCwgMSwgdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwgZHJhd19wLCBTS0lQUEVEKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICBpZiAoaSA9PSBzdGFydF9ocG9zIHx8IHggIT0gY3VycmVudF94KQorICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpID0gc3RhcnRfaHBvczsKKyAg ICAgICAgICAgICAgICAgICAgeCA9IHN0YXJ0X3g7CisgICAgICAgICAgICAgICAgICAgIGRlc2ly ZWRfZ2x5cGggPSBzdGFydDsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgc3Rh cnRfaHBvcywgZGVzaXJlZF9yb3ctPnksIHN0YXJ0X3gpOworICAgICAgICAgICAgICAgIC8qIFJl LWRyYXcgYSBwb3J0aW9uIG9mIHRoZSByb3cuICovCisgICAgICAgICAgICAgICAgaWYgKGRlYnVn X3ApCisgICAgICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJSRURSQVcgU0VHTUVOVDpc blwKKyAgICAgICAgICAgICAgICAgICAgdnBvcyAoJWQpIHwgY2hhciAoJWQvJXMpIHwgeDogKCVk KSB8IGhwb3MgKCVkLyVkKSB8IGxlbmd0aCAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAgICB2 cG9zLCBzdGFydC0+dS5jaCwgbWNfY2hhcl90b19zdHJpbmcgKHN0YXJ0LT51LmNoKSwKKyAgICAg ICAgICAgICAgICAgICAgc3RhcnRfeCwgc3RhcnRfaHBvcywgdXBkYXRlZF9yb3ctPnVzZWRbVEVY VF9BUkVBXSAtIDEsIGkgLSBzdGFydF9ocG9zKTsKKyAgICAgICAgICAgICAgICBibG9ja19pbnB1 dCAoKTsKKyAgICAgICAgICAgICAgICBpbnQgbGVuID0gaSAtIHN0YXJ0X2hwb3M7CisgICAgICAg ICAgICAgICAgaW50IGhwb3MgPSBzdGFydCAtIHVwZGF0ZWRfcm93LT5nbHlwaHNbVEVYVF9BUkVB XTsKKyAgICAgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLnggPQorICAgICAgICAgICAgICAg ICAgbWNfZHJhd19nbHlwaHMgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3Jvdywgdy0+b3V0 cHV0X2N1cnNvci54LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRFWFRfQVJF QSwgaHBvcywgaHBvcyArIGxlbiwgRFJBV19OT1JNQUxfVEVYVCwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAwLCB2cG9zLCBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUs IHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZl X3AsIGN1cnNvcl9nY19wLCBNQ19EUkFXX0dMWVBIX1NUUklORywKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBkcmF3X3ApOworICAgICAgICAgICAgICAgIHctPm91dHB1dF9jdXJz b3IuaHBvcyArPSBsZW47CisgICAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAgICAg ICAgICAgICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBz dGFydCwgc3RhcnRfeCwgaSAtIHN0YXJ0X2hwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHZwb3MsIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwgZHJhd19w LCBTQ1JJQkVfVFdPKTsKKyAgICAgICAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAg ICAgICB9CisgICAgICAgICAgfQorCisgICAgICAgIC8qIFdyaXRlIHRoZSByZXN0LiAqLworICAg ICAgICBpZiAoaSA8IGRlc2lyZWRfcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgICAgICAgewor ICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywgdnBvcywgaSwgZGVzaXJlZF9yb3ctPnks IHgpOworICAgICAgICAgICAgaWYgKGRlYnVnX3ApCisgICAgICAgICAgICAgIGZwcmludGYgKHN0 ZGVyciwgIkRSQVcgUkVNQUlOREVSIE9GIFRIRSBST1c6XG5cCisgICAgICAgICAgICAgICAgdnBv cyAoJWQpIHwgY2hhciAoJWQvJXMpIHwgeDogKCVkKSB8IGhwb3MgKCVkLyVkKSB8IGxlbmd0aCAo JWQpXG4iLAorICAgICAgICAgICAgICAgIHZwb3MsIGRlc2lyZWRfZ2x5cGgtPnUuY2gsIG1jX2No YXJfdG9fc3RyaW5nIChkZXNpcmVkX2dseXBoLT51LmNoKSwKKyAgICAgICAgICAgICAgICB4LCBp LCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSwgZGVzaXJlZF9yb3ctPnVzZWRbVEVY VF9BUkVBXSAtIGkpOworICAgICAgICAgICAgYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICBp bnQgbGVuID0gZGVzaXJlZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAtIGk7CisgICAgICAgICAgICBp bnQgaHBvcyA9IGRlc2lyZWRfZ2x5cGggLSB1cGRhdGVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV07 CisgICAgICAgICAgICB3LT5vdXRwdXRfY3Vyc29yLnggPQorICAgICAgICAgICAgICBtY19kcmF3 X2dseXBocyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCB3LT5vdXRwdXRfY3Vyc29y LngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBURVhUX0FSRUEsIGhwb3MsIGhwb3Mg KyBsZW4sIERSQVdfTk9STUFMX1RFWFQsIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB2cG9zLCBsc2wsIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwgY3Vyc29yX2djX3AsIE1DX0RS QVdfR0xZUEhfU1RSSU5HLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJhd19wKTsK KyAgICAgICAgICAgIHctPm91dHB1dF9jdXJzb3IuaHBvcyArPSBsZW47CisgICAgICAgICAgICB1 bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgLyogRklYTUU6ICBBbHRob3VnaCB3ZSBuZWVk IHRvIHVwZGF0ZSB0aGUgY2FjaGUgYmV0d2VlbiB0aGUgZW5kIG9mCisgICAgICAgICAgICB1cGRh dGVkX3JvdyBhbmQgdGhlIHJpZ2h0IHdpbmRvdyBlZGdlLCBpdCBpcyBub3QgbmVjZXNzYXJ5IHRv IGRyYXcKKyAgICAgICAgICAgIHRob3NlIGZha2UgY3Vyc29ycy4gQWx0aG91Z2ggd2UgbWF5IG5v dCBiZSBhYmxlIHRvIHNlZSBpdCB3aXRoIHRoZQorICAgICAgICAgICAgbmFrZWQgZXllLCB0aG9z ZSBmYWtlIGN1cnNvcnMgYXJlIGJlaW5nIHN1cGVyaW1wb3NlZCBvbiB0aGUgZXhpc3RpbmcKKyAg ICAgICAgICAgIGZha2UgY3Vyc29ycyB0aGF0IGRvIG5vdCBnZXQgZXJhc2VkIGJ5IHRoZSBjb2Rl IGluIHRoZSBzZWN0aW9uI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mRvdyB3aWxsIF9ub3RfIGJl IGNsZWFyZWQuICBUaGVyZWZvcmUsIGl0IGlzIG9rYXkgdG8KKyAgICAgICAgICBkcmF3IHRoZSBm bG9hdGluZyBnbHlwaHMgZm9yIHRoZSBob3Jpem9udGFsL3ZlcnRpY2FsIHJ1bGVycyBoZXJlLiAq LworICAgICAgICAgIGVsc2UgaWYgKGNoYW5nZWRfcAorICAgICAgICAgICAgICAgICAgICYmIHct Pm91dHB1dF9jdXJzb3IuaHBvcyAhPSB1cGRhdGVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBpbnQgeCA9IHctPm91dHB1dF9jdXJzb3IueDsKKyAg ICAgICAgICAgICAgaW50IGhwb3MgPSB3LT5vdXRwdXRfY3Vyc29yLmhwb3M7CisgICAgICAgICAg ICAgIHN0cnVjdCBnbHlwaCAqc3RhcnQgPSBtY19nZXRfY3Vyc29yX2dseXBoICh3LCBkZXNpcmVk X21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHVwZGF0ZWRfcm93LCBocG9zLCB2cG9zKTsKKyAgICAgICAgICAgICAgaWYgKHct Pm91dHB1dF9jdXJzb3IueCA9PSB1cGRhdGVkX3Jvdy0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAg ICAgICAgeCAtPSBzdGFydC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgIGlmIChkZWJ1Z19w KQorICAgICAgICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIlBPU1QtQ0hBTkdFRDogIHZwb3Mg KCVkKSB8IHggKCVkKSB8IGhwb3MgKCVkLyVkKSB8IGNoYXIgKCVkLyVzKVxuIiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHZwb3MsIHgsIGhwb3MsIHVwZGF0ZWRfcm93LT51c2Vk W1RFWFRfQVJFQV0gLSAxLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQt PnUuY2gsIG1jX2NoYXJfdG9fc3RyaW5nIChzdGFydC0+dS5jaCkpOworICAgICAgICAgICAgICBt Y19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRfcm93LCBzdGFydCwgeCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSBo cG9zLCB2cG9zLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNz ZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFBPU1RfQ0hBTkdFRCk7CisgICAgICAgICAg ICB9CisgICAgICAgICAgICAvKiBUaGVyZSB3ZXJlIG5vIGNoYW5nZXMgYW5kIGkgPT0gZGVzaXJl ZF9yb3ctPnVzZWRbVEVYVF9BUkVBXSAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWNoYW5nZWRf cCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGlmIChkZWJ1Z19wKQorICAgICAg ICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiVU5DSEFOR0VEIC0tIFdSSVRFIEVOVElSRSBM SU5FOiAgdnBvcyAoJWQpIHwgcm93LT51c2VkICglZClcbiIsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHZwb3MsIHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxKTsK KyAgICAgICAgICAgICAgICBtY19kcmF3X3JvdyAodywgZGVzaXJlZF9tYXRyaXgsIHVwZGF0ZWRf cm93LCBkZXNpcmVkX3Jvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGRlc2lyZWRfcm93LT54LCBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdLCB2 cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRp YWxzLCByb3dfcG9zaXRpb24sIGRyYXdfcCwgVU5DSEFOR0VEKTsKKyAgICAgICAgICAgICAgfQor CisgICAgICAgIC8qIE1heWJlIGNsZWFyIHRvIGVuZCBvZiBsaW5lLiAqLworICAgICAgICBpZiAo TUFUUklYX1JPV19FWFRFTkRTX0ZBQ0VfUCAoZGVzaXJlZF9yb3cpKQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIC8qIElmIG5ldyByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFy ZWEsIG5vdGhpbmcKKyAgICAgICAgICAgICAgIGhhcyB0byBiZSBjbGVhcmVkLCBpZiBhbmQgb25s eSBpZiB3ZSBkaWQgYSB3cml0ZV9nbHlwaHMKKyAgICAgICAgICAgICAgIGFib3ZlLiAgVGhpcyBp cyBtYWRlIHN1cmUgYnkgc2V0dGluZyBkZXNpcmVkX3N0b3BfcG9zCisgICAgICAgICAgICAgICBh cHByb3ByaWF0ZWx5IGFib3ZlLiAqLworICAgICAgICAgICAgZWFzc2VydCAoaSA8IGRlc2lyZWRf cm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAgICAgICAgICAgICAgICAgIHx8ICgoZGVzaXJlZF9y b3ctPnVzZWRbVEVYVF9BUkVBXSA9PSBjdXJyZW50X3Jvdy0+dXNlZFtURVhUX0FSRUFdKQorICAg ICAgICAgICAgICAgICAgICAgICAgICYmIE1BVFJJWF9ST1dfRVhURU5EU19GQUNFX1AgKGN1cnJl bnRfcm93KSkpOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChNQVRSSVhfUk9XX0VY VEVORFNfRkFDRV9QIChjdXJyZW50X3JvdykpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IC8qIElmIG9sZCByb3cgZXh0ZW5kcyB0byB0aGUgZW5kIG9mIHRoZSB0ZXh0IGFyZWEsIGNsZWFy LiAqLworICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFd KQorICAgICAgICAgICAgICAgIG91dHB1dF9jdXJzb3JfdG8gKHcsIHZwb3MsIGksIGRlc2lyZWRf cm93LT55LCBkZXNpcmVkX3Jvdy0+cGl4ZWxfd2lkdGgpOworICAgICAgICAgICAgICBpZiAoZHJh d19wKQorICAgICAgICAgICAgICAgIHJpZi0+Y2xlYXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRf cm93LCBURVhUX0FSRUEsIC0xKTsKKyAgICAgICAgICAgICAgY2xlYXJfdG9feCA9IC0xOworICAg ICAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxz ZSBpZiAoZGVzaXJlZF9yb3ctPnBpeGVsX3dpZHRoIDwgY3VycmVudF9yb3ctPnBpeGVsX3dpZHRo KQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogT3RoZXJ3aXNlIGNsZWFyIHRv IHRoZSBlbmQgb2YgdGhlIG9sZCByb3cuICBFdmVyeXRoaW5nCisgICAgICAgICAgICAgICAgICAg YWZ0ZXIgdGhhdCBwb3NpdGlvbiBzaG91bGQgYmUgY2xlYXIgYWxyZWFkeS4gKi8KKyAgICAgICAg ICAgICAgICBpbnQgeGxpbTsKKyAgICAgICAgICAgICAgICBpZiAoaSA+PSBkZXNpcmVkX3Jvdy0+ dXNlZFtURVhUX0FSRUFdKQorICAgICAgICAgICAgICAgICAgb3V0cHV0X2N1cnNvcl90byAodywg dnBvcywgaSwgZGVzaXJlZF9yb3ctPnksIGRlc2lyZWRfcm93LT5waXhlbF93aWR0aCk7CisgICAg ICAgICAgICAgICAgLyogSWYgY3Vyc29yIGlzIGRpc3BsYXllZCBhdCB0aGUgZW5kIG9mIHRoZSBs aW5lLCBtYWtlIHN1cmUKKyAgICAgICAgICAgICAgICAgICBpdCdzIGNsZWFyZWQuICBOb3dhZGF5 cyB3ZSBkb24ndCBoYXZlIGEgcGh5c19jdXJzb3JfZ2x5cGgKKyAgICAgICAgICAgICAgICAgICB3 aXRoIHdoaWNoIHRvIGVyYXNlIHRoZSBjdXJzb3IgKGJlY2F1c2UgdGhpcyBtZXRob2QKKyAgICAg ICAgICAgICAgICAgICBkb2Vzbid0IHdvcmsgd2l0aCBsYmVhcmluZy9yYmVhcmluZyksIHNvIHdl IG11c3QgZG8gaXQgdGhpcyB3YXkuICovCisgICAgICAgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+ cGh5c19jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICAgICAmJiAoZGVzaXJlZF9yb3ctPnJl dmVyc2VkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgID8gKHctPnBoeXNfY3Vyc29yLmhwb3Mg PCAwKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAody0+cGh5c19jdXJzb3IuaHBvcyA+PSBk ZXNpcmVkX3Jvdy0+dXNlZFtURVhUX0FSRUFdKSkpCisgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgIHctPnBoeXNfY3Vyc29yX29uX3AgPSAwOworICAgICAgICAgICAgICAg ICAgICB4bGltID0gLTE7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICAgIHhsaW0gPSBjdXJyZW50X3Jvdy0+cGl4ZWxfd2lkdGg7 CisgICAgICAgICAgICAgICAgaWYgKGRyYXdfcCkKKyAgICAgICAgICAgICAgICAgIHJpZi0+Y2xl YXJfZW5kX29mX2xpbmUgKHcsIHVwZGF0ZWRfcm93LCBURVhUX0FSRUEsIHhsaW0pOworICAgICAg ICAgICAgICAgIGNsZWFyX3RvX3ggPSB4bGltOworICAgICAgICAgICAgICAgIGNoYW5nZWRfcCA9 IDE7CisgICAgICAgICAgICAgIH0KKworICAgICAgICBpZiAoY2hhbmdlZF9wCisgICAgICAgICAg ICAmJiBjbGVhcl90b194ICE9ID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ICAg ICAgICAgICBpbnQgaHBvcyA9IHVwZGF0ZWRfcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxOworICAg ICAgICAgICAgaW50IHhfbGltaXQgPSAoY2xlYXJfdG9feCA9PSAtMSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgPyB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAg OiBjbGVhcl90b194OworICAgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHct PmNvbnRlbnRzKTsKKyAgICAgICAgICAgIGJvb2wgZmlsbF9jb2x1bW5fdHJ1bXBzX3AgPSAoIU5J TFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSBlc3Nl bnRpYWxzLmZjX3gpOworICAgICAgICAgICAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQorICAgICAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJtY191cGRhdGVfdGV4dF9hcmVhIChmbG9hdGluZyk6 ICB2cG9zICglZCkgfCB4X2xpbWl0ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdnBvcywgeF9saW1pdCk7CisgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVu dHMpCisgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGZjX3Zpc2libGUpKQorICAg ICAgICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAg IHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5J TFAgKEJWQVIgKGIsIGZjX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgICAgICAgJiYg eCA8IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+ PSB4CisgICAgICAgICAgICAgICAgJiYgdGFyZ2V0X2dseXBoICE9IE5VTEwKKyAgICAgICAgICAg ICAgICAmJiBkcmF3X3ApCisgICAgICAgICAgICAgIG1jX2VuZ2luZSAodywgZGVzaXJlZF9tYXRy aXgsIHVwZGF0ZWRfcm93LCB0YXJnZXRfZ2x5cGgsIFRFWFRfQVJFQSwKKyAgICAgICAgICAgICAg ICAgICAgICAgICB4LCB4X2xpbWl0LCB1cGRhdGVkX3Jvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFS LCAxLAorICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXgsIGVzc2VudGlhbHMs IHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBkZWJ1Z19wID8gZGVidWdf ZmcgOiBlc3NlbnRpYWxzLmZjX2ZnW3Jvd19wb3NpdGlvbl0sCisgICAgICAgICAgICAgICAgICAg ICAgICAgRklMTF9DT0xVTU4sIGRyYXdfcCwgTk9XSEVSRSwgTk9fQ0FDSEUpOworICAgICAgICAg ICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg Y2hfaG9yaXpvbnRhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0 aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY2hfaW5hY3RpdmVfd2luZG93 cykpKSkKKyAgICAgICAgICAgICAgICAmJiB4IDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAg ICAgICAgJiYgdnBvcyA9PSB3LT5jdXJzb3IudnBvcworICAgICAgICAgICAgICAgICYmIHRhcmdl dF9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAg ICBtY19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBo LCBURVhUX0FSRUEsCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRl ZF9yb3ctPnksIGhwb3MsIHZwb3MsIE1DX0hCQVIsIDEsCisgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLAorICAgICAgICAgICAg ICAgICAgICAgICAgIGRlYnVnX3AgPyBkZWJ1Z19mZyA6IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bv c2l0aW9uXSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSLCBkcmF3 X3AsIE5PV0hFUkUsIE5PX0NBQ0hFKTsKKyAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250 ZW50cykKKyAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisg ICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAg ICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAg ICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICFO SUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICAgICAgICYm ICFmaWxsX2NvbHVtbl90cnVtcHNfcAorICAgICAgICAgICAgICAgICYmIHggPCB0ZXh0X2FyZWFf d2lkdGgKKyAgICAgICAgICAgICAgICAmJiB2cG9zICE9IHctPmN1cnNvci52cG9zCisgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPj0geAorICAgICAgICAgICAgICAgICYmIHRhcmdldF9n bHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgJiYgZHJhd19wKQorICAgICAgICAgICAgICBt Y19lbmdpbmUgKHcsIGRlc2lyZWRfbWF0cml4LCB1cGRhdGVkX3JvdywgdGFyZ2V0X2dseXBoLCBU RVhUX0FSRUEsCisgICAgICAgICAgICAgICAgICAgICAgICAgeCwgeF9saW1pdCwgdXBkYXRlZF9y b3ctPnksIGhwb3MsIHZwb3MsIE1DX0JBUiwgMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBj dXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sCisgICAgICAgICAgICAgICAg ICAgICAgICAgZGVidWdfcCA/IGRlYnVnX2ZnIDogZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRp b25dLAorICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSLCBkcmF3X3AsIE5P V0hFUkUsIE5PX0NBQ0hFKTsKKyAgICAgICAgICB9CisKKyAgICAgIH0KKyAgcmV0dXJuIGNoYW5n ZWRfcDsKK30KKworLyogVXBkYXRlIHJvdyBWUE9TIGluIHdpbmRvdyBXLiAgVmFsdWUgaXMgdHJ1 ZSBpZiBkaXNwbGF5IGhhcyBiZWVuIGNoYW5nZWQuICovCitzdGF0aWMgYm9vbAorbWNfdXBkYXRl X3dpbmRvd19saW5lIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgdnBvcywgYm9vbCAqbW91c2VfZmFj ZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfbWF0 cml4IC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uICovCisgICAgICBpZiAoIWRlc2lyZWRfcm93LT5mdWxsX3dpZHRo X3AgJiYgdy0+bGVmdF9tYXJnaW5fY29scyA+IDApCisgICAgICAgIHsKKyAgICAgICAgICBjaGFu Z2VkX3AgPSAxOworICAgICAgICAgIHVwZGF0ZV9tYXJnaW5hbF9hcmVhICh3LCBkZXNpcmVkX3Jv dywgTEVGVF9NQVJHSU5fQVJFQSwgdnBvcyk7CisgICAgICAgICAgLyogU2V0dGluZyB0aGlzIGZs YWcgd2lsbCBlbnN1cmUgdGhlIHZlcnRpY2FsIGJvcmRlciwgaWYKKyAgICAgICAgICAgICBhbnks IGJldHdlZW4gdGhpcyB3aW5kb3cgYW5kIHRoZSBvbmUgb24gaXRzIGxlZnQgd2lsbCBiZQorICAg ICAgICAgICAgIHJlZHJhd24uICBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNhdXNlIHVwZGF0aW5nIHRo ZSBsZWZ0CisgICAgICAgICAgICAgbWFyZ2luIGFyZWEgY2FuIHBvdGVudGlhbGx5IGRyYXcgb3Zl ciB0aGUgYm9yZGVyLiAqLworICAgICAgICAgIGN1cnJlbnRfcm93LT5yZWRyYXdfZnJpbmdlX2Jp dG1hcHNfcCA9IDE7CisgICAgICAgIH0KKyAgICAgIGJvb2wgdXBkYXRlZF9wID0gbWNfdXBkYXRl X3RleHRfYXJlYSAodywgZGVzaXJlZF9yb3csIHZwb3MsIGN1cnNvcl9tYXRyaXgsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIGRyYXdfcCk7 CisgICAgICAvKiBVcGRhdGUgdGhlIGRpc3BsYXkgb2YgdGhlIHRleHQgYXJlYS4gKi8KKyAgICAg IGlmICh1cGRhdGVkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBjaGFuZ2VkX3AgPSAxOworICAg ICAgICAgIGlmIChjdXJyZW50X3Jvdy0+bW91c2VfZmFjZV9wKQorICAgICAgICAgICAgKm1vdX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dGhfbGluZV9wICE9IGN1cnJlbnRfcm93LT5leGFjdF93aW5k b3dfd2lkdGhfbGluZV9wCisgICAgICAgICAgfHwgKE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJ TkVfUCAoZGVzaXJlZF9yb3cpCisgICAgICAgICAgICAgICE9IE1BVFJJWF9ST1dfQ09OVElOVUFU SU9OX0xJTkVfUCAoY3VycmVudF9yb3cpKSkKKyAgICAgICAgcmlmLT5hZnRlcl91cGRhdGVfd2lu ZG93X2xpbmVfaG9vayAodywgZGVzaXJlZF9yb3cpOworICAgIH0KKyAgLyogVXBkYXRlIGN1cnJl bnRfcm93IGZyb20gZGVzaXJlZF9yb3cuICovCisgIG1ha2VfY3VycmVudCAody0+ZGVzaXJlZF9t YXRyaXgsIHctPmN1cnJlbnRfbWF0cml4LCB2cG9zKTsKKyAgcmV0dXJuIGNoYW5nZWRfcDsKK30K Kwordm9pZAorbWNfdXBkYXRlX3dpbmRvd19lcmFzZSAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0 IG1jX21hdHJpeCBvbGRfbWF0cml4KQoreworICBib29sIGdvX29uZV9wID0gKG9sZF9tYXRyaXgu Y3Vyc29yc191c2VkW01DX0NBQ0hFXSA+IDAKKyAgICAgICAgICAgICAgICAgICB8fCBvbGRfbWF0 cml4LmN1cnNvcnNfdXNlZFtDSF9DQUNIRV0gPiAwCisgICAgICAgICAgICAgICAgICAgfHwgb2xk X21hdHJpeC5jdXJzb3JzX3VzZWRbRkNfQ0FDSEVdID4gMCk7CisgIGJvb2wgZ29fdHdvX3AgPSAo QlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgJiYgKCFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAg ICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkK KyAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgbWNfY29uZikpKSk7CisgIGJvb2wgdXBkYXRpbmdfZnJhbWVfcCA9IGZhbHNlOworICBz dHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgaWYgKFhGUkFNRSAody0+ZnJh bWUpICE9IGYtPm1jX3VwZGF0aW5nX2ZyYW1lCisgICAgICAmJiAoZ29fb25lX3AgfHwgZ29fdHdv X3ApKQorICAgIHsKKyAgICAgIHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOworICAgICAgdXBkYXRl X2JlZ2luIChmKTsKKyAgICB9CisgIGlmICh3LT5waHlzX2N1cnNvcl9vbl9wCisgICAgICAmJiBn b190d29fcCkKKyAgICBlcmFzZV9waHlzX2N1cnNvciAodyk7CisgIGZvciAoaW50IHZudGggPSAw OworICAgICAgIGdvX29uZV9wCisgICAgICAgJiYgdm50aCA8IHctPm1jX21hdHJpeC52cG9zX3Vz ZWQ7CisgICAgICAgKyt2bnRoKQorICAgIHsKKyAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBl IGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hF OworICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgIGZvciAoaW50IG50aF8wID0gMDsK KyAgICAgICAgICAgICBtY190cmF2ZXJzZV9jYWNoZV9wIChvbGRfbWF0cml4LCBjYWNoZV90eXBl LCB2bnRoLCBudGhfMCk7CisgICAgICAgICAgICAgKytudGhfMCkKKyAgICAgICAgICB7CisgICAg ICAgICAgICBib29sIHNhbWVfcCA9IGZhbHNlOworICAgICAgICAgICAgZm9yIChpbnQgd19udGgg PSAwOyB3X250aCA8IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlw ZV07ICsrd19udGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzYW1lX3AgfD0g KG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uZ2x5cGgudHlw ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgudHlwZQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgKChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmdseXBoLmJ5dGVwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLmJ5dGVw b3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IEFUX1pWCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gQVRfWlYpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMF0ucm93X3Bvc2l0aW9uID09IFBPU1RfWlYKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bd19udGhdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICgob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF8wXS5nbHlwaC5jaGFycG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5j aGFycG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9PSBBVF9aVgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5tY19tYXRyaXgudnBvc1t2 bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0ucm93X3Bvc2l0aW9uID09IEFUX1pWKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLnJvd19wb3NpdGlvbiA9PSBQT1NUX1pWCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW3dfbnRoXS5yb3dfcG9zaXRpb24gPT0gUE9TVF9aVikpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzBdLmdseXBoLnUudmFsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC51LnZh bAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5nbHlwaC5mYWNlX2lkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnBhZGRpbmdfcAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgucGFkZGluZ19wCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmdseXBoLmxlZnRfYm94X2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9 PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5cGgu bGVmdF9ib3hfbGluZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnJpZ2h0X2JveF9saW5l X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnJpZ2h0X2JveF9saW5lX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVtudGhfMF0uZ2x5cGgudm9mZnNldAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uZ2x5 cGgudm9mZnNldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5waXhlbF93aWR0aAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVt3X250aF0uZ2x5cGgucGl4ZWxfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0u Z2x5cGguc2xpY2UuaW1nLngKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmlt Zy54CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmdseXBoLnNsaWNlLmltZy55CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5nbHlwaC5zbGljZS5pbWcueQorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5z bGljZS5pbWcud2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnNsaWNlLmltZy53 aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5nbHlwaC5zbGljZS5pbWcuaGVpZ2h0CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5zbGljZS5pbWcuaGVpZ2h0CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmdseXBoLnNsaWNlLmNtcC5mcm9tCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5nbHlwaC5z bGljZS5jbXAuZnJvbQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS54CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS54CisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZ4CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5m eAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8wXS55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09 IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS55CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzBdLmZ5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5meQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5ocG9zCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzBdLnZwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnZwb3MKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMF0ud2QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4 LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLndkCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzBdLmgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmgKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uY3Vy c29yX3R5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmN1cnNvcl90eXBlCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlw ZV1bbnRoXzBdLmN1cnNvcl93aWR0aAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSB3 LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0uY3Vyc29yX3dp ZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLnJlZAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVt3X250aF0u ZmcucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZnLmdyZWVuCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5mZy5ncmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5mZy5ibHVlCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW3dfbnRoXS5mZy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJnLnJlZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA9PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNo ZV90eXBlXVt3X250aF0uYmcucmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvbGRf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmJnLmdyZWVuCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW3dfbnRoXS5iZy5ncmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5iZy5ibHVl CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5iZy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmFj dGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09IHctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5hY3RpdmVfcAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8wXS5nbHlwaF9mbGF2b3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0gdy0+bWNf bWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoX2ZsYXZvcgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8wXS5lbmFibGVkX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmVu YWJsZWRfcCk7CisgICAgICAgICAgICAgICAgLyogRm9yY2UgdGhlIGZyaW5nZSBiaXRtYXBzIHRv IGFsd2F5cyBiZSByZXNldC9yZWRyYXduLiAqLworICAgICAgICAgICAgICAgIGlmIChvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmN1cnNvcl90eXBlCisgICAg ICAgICAgICAgICAgICAgICAgPT0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bd19udGhdLmN1cnNvcl90eXBlCisgICAgICAgICAgICAgICAgICAgICYmIChvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmN1cnNvcl90eXBlID09IE1D X0xFRlRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAgICAgICAgfHwgb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5jdXJzb3JfdHlwZSA9PSBNQ19S SUdIVF9GUklOR0VfQklUTUFQKSkKKyAgICAgICAgICAgICAgICAgIHNhbWVfcCA9IGZhbHNlOwor ICAgICAgICAgICAgICAgIGlmIChzYW1lX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgIC8vICBmcHJpbnRmIChzdGRlcnIsICJISVQgKCVzKTogIHZwb3MgKCVkKSB8 IGhwb3MgKCVkKSB8IGNoYXIgKCVzKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgLy8gICAgICAg ICAgICAgICAgICAgKGNhY2hlX3R5cGUgPT0gTUNfQ0FDSEUpCisgICAgICAgICAgICAgICAgICAg IC8vICAgICAgICAgICAgICAgICAgICAgPyAiTUMiCisgICAgICAgICAgICAgICAgICAgIC8vICAg ICAgICAgICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gQ0hfQ0FDSEUpCisgICAgICAgICAgICAg ICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgPyAiQ0giCisgICAgICAgICAgICAgICAgICAg IC8vICAgICAgICAgICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gRkNfQ0FDSEUpCisgICAgICAg ICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgPyAiRkMiCisgICAgICAgICAgICAg ICAgICAgIC8vICAgICAgICAgICAgICAgICAgIDogIk5PIiwKKyAgICAgICAgICAgICAgICAgICAg Ly8gICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bd19udGhdLnZwb3MsCisgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAg ICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS5ocG9z LAorICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICBtY19jaGFyX3RvX3N0 cmluZyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLmds eXBoLnUuY2gpKTsKKyAgICAgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bd19udGhdLnNhbWVfcCA9IHRydWU7CisgICAgICAgICAgICAgICAg ICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgLy8gIGZwcmludGYg KHN0ZGVyciwgIk1JU1MgKCVzKTogIHZwb3MgKCVkKSB8IGhwb3MgKCVkIHYuICVkKSB8IGNoYXIg KCVzIHYuICVzKSB8IGNhY2hlX3VzZWQgKCVkIHYuICVkKVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICAvLyAgICAgICAgICAgICAgICAgICAoY2FjaGVfdHlwZSA9PSBNQ19DQUNIRSkKKyAgICAg ICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgID8gIk1DIgorICAgICAgICAg ICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIDogKGNhY2hlX3R5cGUgPT0gQ0hfQ0FD SEUpCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICA/ICJDSCIK KyAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICA6IChjYWNoZV90eXBl ID09IEZDX0NBQ0hFKQorICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAg ICAgPyAiRkMiCisgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgOiAi Tk8iLAorICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3dfbnRoXS52cG9zLAorICAgICAgICAg ICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMF0uaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAvLyAg ICAgICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVt3X250aF0uaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAg ICBtY19jaGFyX3RvX3N0cmluZyAob2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5 cGVdW250aF8wXS5nbHlwaC51LmNoKSwKKyAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAg ICAgICAgICAgICBtY19jaGFyX3RvX3N0cmluZyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bd19udGhdLmdseXBoLnUuY2gpLAorICAgICAgICAgICAgICAgICAgICAg IC8vICAgICAgICAgICAgICAgICAgIG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91c2VkW2Nh Y2hlX3R5cGVdLAorICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgIHct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0pOworICAgICAgICAg ICAgICAgICAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW3df bnRoXS5zYW1lX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICB9CisgICAgICAgICAgICBpZiAoIXNhbWVfcCkKKyAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5jYCBjb250YWlucyB0aGUgZm9sbG93 aW5nIHRlc3RzLAorICAgICAgICAgICAgICAgIGVhc3NlcnQgKG1hdHJpeCAmJiBtYXRyaXgtPnJv d3MpOworICAgICAgICAgICAgICAgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+ bnJvd3MpOyAqLworICAgICAgICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAody0+Y3Vy cmVudF9tYXRyaXggJiYgdy0+Y3VycmVudF9tYXRyaXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOwor ICAgICAgICAgICAgICAgIGlmIChiYXJmX2NyYXNoX29uZSkKKyAgICAgICAgICAgICAgICAgIGNv bnRpbnVlOworICAgICAgICAgICAgICAgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAodm50aCA+PSAw ICYmIHZudGggPCB3LT5jdXJyZW50X21hdHJpeC0+bnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAg ICAgICAgICAgICAgIGlmIChiYXJmX2NyYXNoX3R3bykKKyAgICAgICAgICAgICAgICAgIGNvbnRp bnVlOworICAgICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnZudGhfcm93ID0gTUFUUklY X1JPVyAody0+Y3VycmVudF9tYXRyaXgsIHZudGgpOworICAgICAgICAgICAgICAgIGludCB4XzAg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLng7CisgICAg ICAgICAgICAgICAgaW50IGZ4XzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXzBdLmZ4OworICAgICAgICAgICAgICAgIGludCB5XzAgPSBvbGRfbWF0cml4LnZw b3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLnk7CisgICAgICAgICAgICAgICAgaW50 IGZ5XzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmZ5 OworICAgICAgICAgICAgICAgIGludCBocG9zXzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzBdLmhwb3M7CisgICAgICAgICAgICAgICAgaW50IHZwb3NfMCA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0udnBvczsKKyAg ICAgICAgICAgICAgICBpbn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5ncmVlbiA9 IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcuZ3JlZW4s CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMF0uYmcuYmx1ZX07CisgICAg ICAgICAgICAgICAgYm9vbCBhY3RpdmVfcF8wID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8wXS5hY3RpdmVfcDsKKyAgICAgICAgICAgICAgICBlbnVtIG1jX2Zs YXZvciBnbHlwaF9mbGF2b3JfMCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgICAgICAgIGJvb2wgZW5hYmxlZF9w XzAgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzBdLmVuYWJs ZWRfcDsKKyAgICAgICAgICAgICAgICBpZiAodnBvc18wID09IHZudGgKKyAgICAgICAgICAgICAg ICAgICAgJiYgZ2x5cGhfZmxhdm9yXzAgPT0gTUNfR0xZUEgKKyAgICAgICAgICAgICAgICAgICAg JiYgZW5hYmxlZF9wXzAKKyAgICAgICAgICAgICAgICAgICAgJiYgdm50aF9yb3ctPmVuYWJsZWRf cCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbWNfZXJhc2VfY3Vy c29yICh3LCB3LT5jdXJyZW50X21hdHJpeCwgdm50aF9yb3csIHhfMCwgeV8wLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhwb3NfMCwgdnBvc18wLCBnbHlwaF9mbGF2b3Jf MCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZV8wLCB3 ZF8wKTsKKyAgICAgICAgICAgICAgICAgICAgb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2Nh Y2hlX3R5cGVdW250aF8wXS5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAg LS1vbGRfbWF0cml4LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICAgICAgICAg ICAgLyogSWYgd2UgaW5hZHZlcnRlbnRseSBlcmFzZWQgYW5vdGhlciBmYWtlIGN1cnNvciBhdCB0 aGUgc2FtZQorICAgICAgICAgICAgICAgICAgICBIUE9TIHRoYXQgaXMgc3RpbGwgZW5hYmxlZF9w IGluIHRoZSBgb2xkX21hdHJpeGAsIHRoZW4gcmVkcmF3IGl0LiAqLworICAgICAgICAgICAgICAg ICAgICBmb3IgKGVudW0gbWNfY2FjaGVfdHlwZSBjYWNoZV90eXBlID0gTUNfQ0FDSEU7CisgICAg ICAgICAgICAgICAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hFOworICAgICAgICAgICAg ICAgICAgICAgICAgICsrY2FjaGVfdHlwZSkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgICAgICBmb3IgKGludCBudGhfMSA9IDA7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIG1jX3RyYXZlcnNlX2NhY2hlX3AgKG9sZF9tYXRyaXgsIGNhY2hlX3R5cGUs IHZudGgsIG50aF8xKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKytudGhfMSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCB4XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLng7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ4XzEgPSBvbGRfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZ4OworICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGludCB5XzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXzFdLnk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ5XzEgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmZ5OworICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGludCBocG9zXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzFdLmhwb3M7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50 IHZwb3NfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0u dnBvczsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgd2RfMSA9IG9sZF9tYXRyaXgu dnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0ud2Q7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgaW50IGhfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMV0uaDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNv cl90eXBlIGN1cnNvcl90eXBlXzEgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXzFdLmN1cnNvcl90eXBlOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu dCBjdXJzb3Jfd2lkdGhfMSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhfMV0uY3Vyc29yX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVj dCBtY19SR0IgbHNsX2ZnXzEgPSB7LnJlZCA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtj YWNoZV90eXBlXVtudGhfMV0uZmcucmVkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8xXS5mZy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0gb2xkX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5mZy5ibHVlfTsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmdfMSA9IHsucmVkID0gb2xkX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5iZy5yZWQsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5iZy5ncmVlbiwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0u YmcuYmx1ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcF8xID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8xXS5hY3RpdmVfcDsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3Jf MSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMV0uZ2x5cGhf Zmxhdm9yOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgZW5hYmxlZF9wXzEgPSBv bGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzFdLmVuYWJsZWRfcDsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGdvX3BfMSA9IChocG9zXzAgPT0gaHBv c18xCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxl ZF9wXzEpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZ29fcF8xKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgYm9vbCByZW1vdmVfcF8xID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHctPmN1cnJlbnRfbWF0cml4LCB2bnRoX3Jvdywg eF8xLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBm eF8xLCB5XzEsIGZ5XzEsIGhwb3NfMSwgdnBvc18xLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB3ZF8xLCBoXzEsIGN1cnNvcl90eXBlXzEsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0 aF8xLCBsc2xfZmdfMSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgYWN0aXZlX3BfMSwgZ2x5cGhfZmxhdm9yXzEsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9wXzEpOworICAgICAgICAgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodnBvc18wID09IHZudGgKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcF8wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB2bnRoX3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgICAgYm9vbCByZW1vdmVfcF8wID0gdHJ1ZTsKKyAgICAgICAgICAgICAg ICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZudGhf cm93LCB4XzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ4 XzAsIHlfMCwgZnlfMCwgaHBvc18wLCB2cG9zXzAsIHdkXzAsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGhfMCwgY3Vyc29yX3R5cGVfMCwgY3Vyc29yX3dpZHRo XzAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxzbF9iZ18w LCBhY3RpdmVfcF8wLCBnbHlwaF9mbGF2b3JfMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgcmVtb3ZlX3BfMCk7CisgICAgICAgICAgICAgICAgICAgICAgb2xk X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8wXS5lbmFibGVkX3AgPSBm YWxzZTsKKyAgICAgICAgICAgICAgICAgICAgICAtLW9sZF9tYXRyaXguY3Vyc29yc191c2VkW2Nh Y2hlX3R5cGVdOworICAgICAgICAgICAgICAgICAgICAgIC8qIElmIHdlIGluYWR2ZXJ0ZW50bHkg ZXJhc2VkIGFub3RoZXIgZmFrZSBjdXJzb3IgYXQgdGhlIHNhbWUKKyAgICAgICAgICAgICAgICAg ICAgICBIUE9TIHRoYXQgaXMgc3RpbGwgZW5hYmxlZF9wIGluIHRoZSBgb2xkX21hdHJpeGAsIHRo ZW4gcmVkcmF3IGl0LiAqLworICAgICAgICAgICAgICAgICAgICAgIGZvciAoZW51bSBtY19jYWNo ZV90eXBlIGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICsrY2Fj aGVfdHlwZSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgZm9yIChpbnQgbnRoXzIgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1jX3RyYXZlcnNlX2NhY2hlX3AgKG9sZF9tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aF8y KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArK250aF8yKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB4XzIg PSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLng7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgZnhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZng7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBpbnQgeV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF8yXS55OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGZ5XzIgPSBvbGRfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJdLmZ5OworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaW50IGhwb3NfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMl0uaHBvczsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGludCB2cG9zXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRo XzJdLnZwb3M7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgd2RfMiA9IG9sZF9t YXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0ud2Q7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBpbnQgaF8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdW250aF8yXS5oOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51 bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZV8yID0gb2xkX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF8yXS5jdXJzb3JfdHlwZTsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGhfMiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhfMl0uY3Vyc29yX3dpZHRoOworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmdfMiA9IHsucmVkID0gb2xkX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5mZy5yZWQsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhfMl0uZmcuZ3JlZW4sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVlID0g b2xkX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF8yXS5mZy5ibHVlfTsK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICBzdHJ1Y3QgbWNfUkdCIGxzbF9iZ18y ID0gey5yZWQgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXzJd LmJnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAg ICAgICAgICAgICAgIC5ncmVlbiA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhfMl0uYmcuZ3JlZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IG9sZF9tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhfMl0uYmcuYmx1ZX07CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBib29sIGFjdGl2ZV9wXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXzJdLmFjdGl2ZV9wOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXzJdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGJvb2wgZW5hYmxlZF9wXzIgPSBvbGRfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV1bbnRoXzJdLmVuYWJsZWRfcDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGJvb2wgZ29fcF8yID0gKGhwb3NfMCA9PSBocG9zXzIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZ4XzAgPD0gZnhfMgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZnhfMCArIHdkXzAgPiBmeF8yICsgd2Rf MgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZW5hYmxl ZF9wXzIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFnb19wXzIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgYm9vbCByZW1vdmVfcF8yID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgdy0+Y3VycmVudF9tYXRyaXgsIHZu dGhfcm93LCB4XzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgZnhfMiwgeV8yLCBmeV8yLCBocG9zXzIsIHZwb3NfMiwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ZF8yLCBoXzIsIGN1cnNvcl90 eXBlXzIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY3Vyc29yX3dpZHRoXzIsIGxzbF9mZ18yLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGl2ZV9wXzIsIGdseXBoX2ZsYXZvcl8yLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZV9w XzIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9CisgICAgICAgICAg ICB9CisgICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRhdGVfZW5kIChmKTsK K30KKwordm9pZAorbWNfdXBkYXRlX3dpbmRvd19kcnlydW4gKHN0cnVjdCB3aW5kb3cgKncsIGJv b2wgZm9yY2VfcCwgc3RydWN0IG1jX2Vzc2VudGlhbHMgZXNzZW50aWFscykKK3sKKyAgaWYgKCFC VUZGRVJQICh3LT5jb250ZW50cykpCisgICAgcmV0dXJuOworCisgIGlmICh3LT5tY19tYXRyaXgu Y3Vyc29yc191c2VkW01DX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29y c191c2VkW0NIX0NBQ0hFXSA9PSAwCisgICAgICAmJiB3LT5tY19tYXRyaXguY3Vyc29yc191c2Vk W0ZDX0NBQ0hFXSA9PSAwCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50 cyksIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjcm9zc2hhaXJzKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgZmNfdmlzaWJsZSkpKQorICAgIHJldHVybjsKKworICAvLyBjbG9ja190IGNsb2NrX3N0YXJ0 ID0gY2xvY2soKTsKKworICBib29sIGRyYXdfcCA9IGZhbHNlOworCisgIHN0cnVjdCBnbHlwaF9t YXRyaXggKnNhdmVkX2Rlc2lyZWQgPSBtY19zYXZlX2dseXBoX21hdHJpeCAody0+ZGVzaXJlZF9t YXRyaXgpOworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpzYXZlZF9jdXJyZW50ID0gbWNfc2F2ZV9n bHlwaF9tYXRyaXggKHctPmN1cnJlbnRfbW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ml0dGVuX3Ag PSAwOworICAgICAgaW50IG5fdXBkYXRlZCA9IDA7CisgICAgICAvLyAgc3RydWN0IHJlZGlzcGxh eV9pbnRlcmZhY2UgKnJpZiA9IEZSQU1FX1JJRiAoWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKSk7 CisgICAgICAvLyAgcmlmLT51cGRhdGVfd2luZG93X2JlZ2luX2hvb2sgKHcpOworICAgICAgaW50 IHliID0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpOworICAgICAgc3RydWN0IGdseXBoX3JvdyAq cm93ID0gTUFUUklYX1JPVyAoZGVzaXJlZF9tYXRyaXgsIDApOworICAgICAgc3RydWN0IGdseXBo X3JvdyAqZW5kID0gTUFUUklYX01PREVfTElORV9ST1cgKGRlc2lyZWRfbWF0cml4KTsKKworICAg ICAgLyogVGFrZSBub3RlIG9mIHRoZSBoZWFkZXIgbGluZSwgaWYgdGhlcmUgaXMgb25lLiAgV2Ug d2lsbAorICAgICAgICAgdXBkYXRlIGl0IGJlbG93LCBhZnRlciB1cGRhdGluZyBhbGwgb2YgdGhl IHdpbmRvdydzIGxpbmVzLiAqLworICAgICAgaWYgKHJvdy0+bW9kZV9saW5lX3ApCisgICAgICAg IHsKKyAgICAgICAgICBoZWFkZXJfbGluZV9yb3cgPSByb3c7CisgICAgICAgICAgKytyb3c7Cisg ICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIGhlYWRlcl9saW5lX3JvdyA9IE5VTEw7 CisKKyAgICAgIC8qIFVwZGF0ZSB0aGUgbW9kZSBsaW5lLCBpZiBuZWNlc3NhcnkuICovCisgICAg ICBzdHJ1Y3QgZ2x5cGhfcm93ICptb2RlX2xpbmVfcm93ID0gTUFUUklYX01PREVfTElORV9ST1cg KGRlc2lyZWRfbWF0cml4KTsKKyAgICAgIGlmIChtb2RlX2xpbmVfcm93LT5tb2RlX2xpbmVfcCAm JiBtb2RlX2xpbmVfcm93LT5lbmFibGVkX3ApCisgICAgICAgIHsKKyAgICAgICAgICBtb2RlX2xp bmVfcm93LT55ID0geWIgKyBXSU5ET1dfU0NST0xMX0JBUl9BUkVBX0hFSUdIVCAodyk7CisgICAg ICAgICAgdXBkYXRlX3dpbmRvd19saW5lICh3LCBNQVRSSVhfUk9XX1ZQT1MgKG1vZGVfbGluZV9y b3csCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRl c2lyZWRfbWF0cml4KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZtb3VzZV9mYWNl X292ZXJ3cml0dGVuX3ApOworICAgICAgICB9CisKKyAgICAgIC8qIEZpbmQgZmlyc3QgZW5hYmxl ZCByb3cuICBPcHRpbWl6YXRpb25zIGluIHJlZGlzcGxheV9pbnRlcm5hbAorICAgICAgICAgbWF5 IGxlYWQgdG8gYW4gdXBkYXRlIHdpdGggb25seSBvbmUgcm93IGVuYWJsZWQuICBUaGVyZSBtYXkK KyAgICAgICAgIGJlIGFsc28gY29tcGxldGVseSBlbXB0eSBtYXRyaWNlcy4gKi8KKyAgICAgIHdo aWxlIChyb3cgPCBlbmQgJiYgIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICArK3JvdzsKKworICAg ICAgLyogVHJ5IHJldXNpbmcgcGFydCBvZiB0aGUgZGlzcGxheSBieSBjb3B5aW5nLiAqLworICAg ICAgaWYgKHJvdyA8IGVuZCAmJiAhdy0+ZGVzaXJlZF9tYXRyaXgtPm5vX3Njcm9sbGluZ19wKQor ICAgICAgICB7CisgICAgICAgICAgaW50IHJjID0gbWNfc2Nyb2xsaW5nX3dpbmRvdyAodywgaGVh ZGVyX2xpbmVfcm93ICE9IE5VTEwpOworICAgICAgICAgIGlmIChyYyA8IDApCisgICAgICAgICAg ICB7CisgICAgICAgICAgICAgIC8qIEFsbCByb3dzIHdlcmUgZm91bmQgdG8gYmUgZXF1YWwuICov CisgICAgICAgICAgICAgIHBhdXNlZF9wID0gMDsKKyAgICAgICAgICAgICAgZ290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Km1jX3JvdyA9IHJvdzsKKyAgICAgICAgICAgbWNfcm93 IDwgZW5kICYmIChmb3JjZV9wIHx8ICFpbnB1dF9wZW5kaW5nKTsKKyAgICAgICAgICAgKyttY19y b3cpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAobWNf cm93LCB3LT5kZXNpcmVkX21hdHJpeCk7CisgICAgICAgICAgaWYgKG1jX3Jvdy0+ZW5hYmxlZF9w CisgICAgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICB7 CisgICAgICAgICAgICAgIGN1cnNvcl9tYXRyaXggPSB3LT5kZXNpcmVkX21hdHJpeDsKKyAgICAg ICAgICAgICAgaWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVkICUgcHJlZW1wdF9jb3VudCA9PSAw KQorICAgICAgICAgICAgICAgIGRldGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9yZV9zcXVlZXphYmxl cyAoKTsKKyAgICAgICAgICAgICAgY2hhbmdlZF9wIHw9IG1jX3VwZGF0ZV93aW5kb3dfbGluZSAo dywgdnBvcywgJm1vdXNlX2ZhY2Vfb3ZlcndyaXR0ZW5fcCwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywg ZHJhd19wKTsKKyAgICAgICAgICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kgKHJvdykgPj0g eWIpCisgICAgICAgICAgICAgICAgZm9yIChpbnQgaSA9IHZwb3MgKyAxOyBpIDwgdy0+Y3VycmVu dF9tYXRyaXgtPm5yb3dzIC0gMTsgKytpKQorICAgICAgICAgICAgICAgICAgU0VUX01BVFJJWF9S T1dfRU5BQkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwgaSwgZmFsc2UpOworICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgY3Vyc29yX21hdHJpeCA9 IHctPmN1cnJlbnRfbWF0cml4OworICAgICAgLyogVXBkYXRlIHRoZSByZXN0IG9mIHRoZSBsaW5l cy4gKi8KKyAgICAgIGZvciAoOyByb3cgPCBlbmQgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRp bmcpOyArK3JvdykKKyAgICAgICAgLyogc2Nyb2xsaW5nX3dpbmRvdyByZXNldHMgdGhlIGVuYWJs ZWRfcCBmbGFnIG9mIHRoZSByb3dzIGl0IHJldXNlcyBmcm9tCisgICAgICAgIGN1cnJlbnRfbWF0 cml4LiAqLworICAgICAgICBpZiAocm93LT5lbmFibGVkX3ApCisgICAgICAgICAgeworICAgICAg ICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+ZGVzaXJlZF9tYXRyaXgp OworICAgICAgICAgICAgLyogSWYgdGhlIGBjdXJzb3Jfcm93YCBpcyB3aXRoaW4gdGhlIGBkZXNp cmVkX21hdHJpeGAsIHRoZW4gaXQgd2FzCisgICAgICAgICAgICBwcm9jZXNzZWQgaGVyZWluYWJv dmUgYW5kIHNob3VsZCBiZSBza2lwcGVkIGF0IHRoaXMgdGltZS4gKi8KKyAgICAgICAgICAgIGlm ICh2cG9zID09IHctPmN1cnNvci52cG9zKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAg ICAgICBpbnQgaTsKKyAgICAgICAgICAgIC8qIFdlJ2xsIGhhdmUgdG8gcGxheSBhIGxpdHRsZSBi aXQgd2l0aCB3aGVuIHRvCisgICAgICAgICAgICAgICBkZXRlY3RfaW5wdXRfcGVuZGluZy4gIElm IGl0J3MgZG9uZSB0b28gb2Z0ZW4sCisgICAgICAgICAgICAgICBzY3JvbGxpbmcgbGFyZ2Ugd2lu ZG93cyB3aXRoIHJlcGVhdGVkIHNjcm9sbC11cAorICAgICAgICAgICAgICAgY29tbWFuZHMgd2ls bCB0b28gcXVpY2tseSBwYXVzZSByZWRpc3BsYXkuICovCisgICAgICAgICAgICBpZiAoIWZvcmNl X3AgJiYgKytuX3VwZGF0ZWQgJSBwcmVlbXB0X2NvdW50ID09IDApCisgICAgICAgICAgICAgIGRl dGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9yZV9zcXVlZXphYmxlcyAoKTsKKyAgICAgICAgICAgIGNo YW5nZWRfcCB8PSBtY191cGRhdGVfd2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292 ZXJ3cml0dGVuX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCBkcmF3X3ApOworICAgICAgICAgICAgLyog TWFyayBhbGwgcm93cyBiZWxvdyB0aGUgbGFzdCB2aXNpYmxlIG9uZSBpbiB0aGUgY3VycmVudAor ICAgICAgICAgICAgICAgbWF0cml4IGFzIGludmFsaWQuICBUaGlzIGlzIG5lY2Vzc2FyeSBiZWNh dXNlIG9mCisgICAgICAgICAgICAgICB2YXJpYWJsZSBsaW5lIGhlaWdodHMuICBDb25zaWRlciB0 aGUgY2FzZSBvZiB0aHJlZQorICAgICAgICAgICAgICAgc3VjY2Vzc2l2ZSByZWRpc3BsYXlzLCB3 aGVyZSB0aGUgZmlyc3QgZGlzcGxheXMgNQorICAgICAgICAgICAgICAgbGluZXMsIHRoZSBzZWNv bmQgMyBsaW5lcywgYW5kIHRoZSB0aGlyZCA1IGxpbmVzIGFnYWluLgorICAgICAgICAgICAgICAg SWYgdGhlIHNlY29uZCByZWRpc3BsYXkgd291bGRuJ3QgbWFyayByb3dzIGluIHRoZQorICAgICAg ICAgICAgICAgY3VycmVudCBtYXRyaXggaW52YWxpZCwgdGhlIHRoaXJkIHJlZGlzcGxheSBtaWdo dCBiZQorICAgICAgICAgICAgICAgdGVtcHRlZCB0byBvcHRpbWl6ZSByZWRpc3BsYXkgYmFzZWQg b24gbGluZXMgZGlz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VzaXJlZF9yb3cgPCBlbmQKKyAgICAg ICAgICAgJiYgKGZvcmNlX3AgfHwgIWlucHV0X3BlbmRpbmcpCisgICAgICAgICAgIC8qIFczMiBF bWFjcyBjcmFzaGVzIG9uIHN0YXJ0dXAgd2l0aG91dCBhIEJVRkZFUlAgY2hlY2suICovCisgICAg ICAgICAgICYmIEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAmJiAoIU5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisgICAgICAgICAgICAgICB8fCAh TklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAg ICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUp KSk7CisgICAgICAgICAgICsrZGVzaXJlZF9yb3cpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQg dnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAoZGVzaXJlZF9yb3csIHctPmRlc2lyZWRfbWF0cml4KTsK KyAgICAgICAgICBpZiAoZGVzaXJlZF9yb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgICAgIGNvbnRp bnVlOworICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnJlbnRfcm93ID0gTUFUUklYX1JP VyAody0+Y3VycmVudF9tYXRyaXgsIHZwb3MpOworICAgICAgICAgIGVudW0gbWNfcm93X3Bvc2l0 aW9uIHJvd19wb3NpdGlvbiA9IG1jX3Jvd19wb3NpdGlvbiAodywgY3VycmVudF9yb3csIGN1cnJl bnRfcm93LCB2cG9zKTsKKyAgICAgICAgICBpZiAoY3VycmVudF9yb3ctPmVuYWJsZWRfcCkKKyAg ICAgICAgICAgIG1jX2RyYXdfcm93ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgY3VycmVudF9yb3cs IGN1cnJlbnRfcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICBjdXJyZW50X3Jvdy0+eCwgY3VycmVudF9yb3ctPnVzZWRbVEVYVF9BUkVBXSwgdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9z aXRpb24sIGRyYXdfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBTRVRfQ1VSU09SX09ORSk7 CisgICAgICAgIH0KKworICAgICAgbWNfcmVzdG9yZV9nbHlwaF9tYXRyaXggKHNhdmVkX2Rlc2ly ZWQsIHctPmRlc2lyZWRfbWF0cml4KTsKKyAgICAgIG1jX3Jlc3RvcmVfZ2x5cGhfbWF0cml4IChz YXZlZF9jdXJyZW50LCB3LT5jdXJyZW50X21hdHJpeCk7CisKKyAgICAgIG1jX3VwZGF0ZV93aW5k b3dfZXJhc2UgKHcsIG9sZF9tYXRyaXgpOworCisgICAgICBtY194ZnJlZV9jYWNoZV9tYXRyaXgg KHcsICZvbGRfbWF0cml4KTsKKworICAgIH0KKyAgLy8gY2xvY2tfdCBjbG9ja19lbmQgPSBjbG9j aygpOworICAvLyBkb3VibGUgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0g Y2xvY2tfc3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICAvLyBmcHJpbnRmIChzdGRlcnIsICJt Y19zY3JvbGxpbmdfd2luZG93ICglcyk6ICBUSU1FICglZilcbiIsIG1jX3dpbmRvdyAodyksIGNw dV90aW1lX3VzZWQpOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogLyogU3RydWN0dXJlIHRvIHBhc3MgZGltZW5zaW9ucyBhcm91 bmQuICBVc2VkIGZvciBjaGFyYWN0ZXIgYm91bmRpbmcKICAgIGJveGVzLCBnbHlwaCBtYXRyaXgg ZGltZW5zaW9ucyBhbmQgYWxpa2UuICAqLwogCkBAIC0yMjQxLDYgKzQwNjUsMTYgQEAgZnJlZV93 aW5kb3dfbWF0cmljZXMgKHN0cnVjdCB3aW5kb3cgKncpCiAJICBmcmVlX2dseXBoX21hdHJpeCAo dy0+Y3VycmVudF9tYXRyaXgpOwogCSAgZnJlZV9nbHlwaF9tYXRyaXggKHctPmRlc2lyZWRfbWF0 cml4KTsKIAkgIHctPmN1cnJlbnRfbWF0cml4ID0gdy0+ZGVzaXJlZF9tYXRyaXggPSBOVUxMOwor CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisg IG1jX3hmcmVlX2NhY2hlX21hdHJpeCAodywgJnctPm1jX21hdHJpeCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIAl9CiAKICAgICAgIC8qIE5leHQgd2luZG93IG9uIHNhbWUgbGV2 ZWwuICAqLwpAQCAtMzM4Nyw2ICs1MjIxLDI2IEBAIGNoZWNrX2N1cnJlbnRfbWF0cml4X2ZsYWdz IChzdHJ1Y3Qgd2luZG93ICp3KQogc3RhdGljIGJvb2wKIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3 aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAg ZnByaW50ZiAoc3RkZXJyLCAidXBkYXRlX3dpbmRvdyAoJXMpXG4iLCBtY193aW5kb3cgKHcpKTsK KworICBzdHJ1Y3QgbWNfZXNzZW50aWFscyBlc3NlbnRpYWxzOworICBtY19zZXRfZXNzZW50aWFs cyAodywgJmVzc2VudGlhbHMpOworCisgIG1jX3VwZGF0ZV93aW5kb3dfZHJ5cnVuICh3LCBmb3Jj ZV9wLCBlc3NlbnRpYWxzKTsKKworICBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpjdXJzb3JfbWF0cml4 ID0gTlVMTDsKKworICBib29sIGRyYXdfcCA9IHRydWU7CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgc3RydWN0IGdseXBoX21hdHJpeCAqZGVzaXJlZF9tYXRyaXggPSB3LT5kZXNp cmVkX21hdHJpeDsKICAgYm9vbCBwYXVzZWRfcDsKICAgaW50IHByZWVtcHRfY291bnQgPSBjbGlw X3RvX2JvdW5kcyAoMSwgYmF1ZF9yYXRlIC8gMjQwMCArIDEsIElOVF9NQVgpOwpAQCAtMzQ2NCw2 ICs1MzE4LDQ3IEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2Vf cCkKIAkgICAgfQogCX0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKworICAvKiBQcm9jZXNzIHRoZSBjdXJzb3Igcm93IGF0IHRoZSBvdXRzZXQg aWYgaXQgaXMgd2l0aGluIGBkZXNpcmVkX21hdHJpeGAuCisgIFdoZW4gcHJvY2Vzc2luZyBhbGwg b3RoZXIgcm93cywgd2Ugd2lsbCBxdWVyeSB0aGUgYHctPmN1cnJlbnRfbWF0cml4YCBmb3IgZGF0 YQorICByZWxhdGluZyB0byB0aG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ChCVUZGRVJQICh3LT5j b250ZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBtY19jb25mKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8 fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICB8fCAhIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRl bnRzKSwgZmNfdmlzaWJsZSkpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgPyBtY191cGRhdGVf d2luZG93X2xpbmUgKHcsIHZwb3MsICZtb3VzZV9mYWNlX292ZXJ3cml0dGVuX3AsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBl c3NlbnRpYWxzLCBkcmF3X3ApCisgICAgICAgICAgICAgICAgICAgICAgIDogdXBkYXRlX3dpbmRv d19saW5lICh3LCB2cG9zLCAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wKTsKKyAgICAgICAgICBp ZiAoTUFUUklYX1JPV19CT1RUT01fWSAocm93KSA+PSB5YikKKyAgICAgICAgICAgIGZvciAoaW50 IGkgPSB2cG9zICsgMTsgaSA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cyAtIDE7ICsraSkKKyAg ICAgICAgICAgICAgU0VUX01BVFJJWF9ST1dfRU5BQkxFRF9QICh3LT5jdXJyZW50X21hdHJpeCwg aSwgZmFsc2UpOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgfQorCisgIGN1cnNv cl9tYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAgICAgLyogVXBkYXRlIHRoZSByZXN0IG9mIHRoZSBsaW5lcy4gICovCiAgICAgICBm b3IgKDsgcm93IDwgZW5kICYmIChmb3JjZV9wIHx8ICFpbnB1dF9wZW5kaW5nKTsgKytyb3cpCiAJ Lyogc2Nyb2xsaW5nX3dpbmRvdyByZXNldHMgdGhlIGVuYWJsZWRfcCBmbGFnIG9mIHRoZSByb3dz IGl0CkBAIC0zNDcxLDYgKzUzNjYsMTkgQEAgdXBkYXRlX3dpbmRvdyAoc3RydWN0IHdpbmRvdyAq dywgYm9vbCBmb3JjZV9wKQogCWlmIChyb3ctPmVuYWJsZWRfcCkKIAkgIHsKIAkgICAgaW50IHZw b3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgZGVzaXJlZF9tYXRyaXgpOworCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgICAgICAgICAgLyog SWYgdGhlIGBjdXJzb3Jfcm93YCBpcyB3aXRoaW4gdGhlIGBkZXNpcmVkX21hdHJpeGAsIHRoZW4g aXQgd2FzCisgICAgICAgICAgcHJvY2Vzc2VkIGhlcmVpbmFib3ZlIGFuZCBzaG91bGQgYmUgc2tp cHBlZCBhdCB0aGlzIHRpbWUuICovCisgICAgICAgICAgaWYgKHZwb3MgPT0gdy0+Y3Vyc29yLnZw b3MpCisgICAgICAgICAgY29udGludWU7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAkgICAgaW50IGk7CiAKIAkgICAgLyogV2UnbGwgaGF2ZSB0byBwbGF5IGEgbGl0dGxlIGJpdCB3 aXRoIHdoZW4gdG8KQEAgLTM0NzksOCArNTM4NywyMSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qg d2luZG93ICp3LCBib29sIGZvcmNlX3ApCiAJICAgICAgIGNvbW1hbmRzIHdpbGwgdG9vIHF1aWNr bHkgcGF1c2UgcmVkaXNwbGF5LiAgKi8KIAkgICAgaWYgKCFmb3JjZV9wICYmICsrbl91cGRhdGVk ICUgcHJlZW1wdF9jb3VudCA9PSAwKQogCSAgICAgIGRldGVjdF9pbnB1dF9wZW5kaW5nX2lnbm9y ZV9zcXVlZXphYmxlcyAoKTsKLQkgICAgY2hhbmdlZF9wIHw9IHVwZGF0ZV93aW5kb3dfbGluZSAo dywgdnBvcywKLQkJCQkJICAgICAmbW91c2VfZmFjZV9vdmVyd3JpdHRlbl9wKTsKKworCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgICAgICAg IGNoYW5nZWRfcCB8PSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAg ICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNv bnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgISBO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKSkpCisgICAgICAg ICAgICAgICAgICAgICAgID8gbWNfdXBkYXRlX3dpbmRvd19saW5lICh3LCB2cG9zLCAmbW91c2Vf ZmFjZV9vdmVyd3JpdHRlbl9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX21hdHJpeCwgZXNzZW50aWFscywgZHJhd19wKQorICAgICAgICAg ICAgICAgICAgICAgICA6IHVwZGF0ZV93aW5kb3dfbGluZSAodywgdnBvcywgJm1vdXNlX2ZhY2Vf b3ZlcndyaXR0ZW5fcCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKIAkgICAgLyog TWFyayBhbGwgcm93cyBiZWxvdyB0aGUgbGFzdCB2aXNpYmxlIG9uZSBpbiB0aGUgY3VycmVudAog CSAgICAgICBtYXRyaXggYXMgaW52YWxpZC4gIFRoaXMgaXMgbmVjZXNzYXJ5IGJlY2F1c2Ugb2YK QEAgLTM1MDEsNiArNTQyMiw0MSBAQCB1cGRhdGVfd2luZG93IChzdHJ1Y3Qgd2luZG93ICp3LCBi b29sIGZvcmNlX3ApCiAKICAgICBzZXRfY3Vyc29yOgogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIC8qIElmIHdlIGp1bXBlZCBoZXJlIGZy b20gYHNldF9jdXJzb3JgLCB0aGVuIHNldCB0aGUgYGN1cnNvcl9tYXRyaXhgLiAqLworICBpZiAo Y3Vyc29yX21hdHJpeCA9PSBOVUxMKQorICAgIGN1cnNvcl9tYXRyaXggPSB3LT5jdXJyZW50X21h dHJpeDsKKworICAvKiBSZXNldCBgcm93YCB0byAwIHNvIHRoYXQgZmFrZSBjdXJzb3JzIGNhbiBi ZSBkcmF3biBvbiByb3dzIHByZWNlZGluZyB0aGUKKyAgZmlyc3QgYHJvdy0+ZW5hYmxlZF9wYC4g IEp1c3QgcHJpb3IgdG8gdGhlIGNhbGwgdG8gYHNjcm9sbGluZ193aW5kb3cnIGFib3ZlLAorICBg cm93YCB3YXMgYWR2YW5jZWQgdG8gdGhlIGZpcnN0IGByb3ctPmVuYWJsZWRfcGAuICovCisgIGZv ciAoc3RydWN0IGdseXBoX3JvdyAqZGVzaXJlZF9yb3cgPSBNQVRSSVhfUk9XIChkZXNpcmVkX21h dHJpeCwgMCk7CisgICAgICAgZGVzaXJlZF9yb3cgPCBlbmQKKyAgICAgICAmJiAoZm9yY2VfcCB8 fCAhaW5wdXRfcGVuZGluZykKKyAgICAgICAvKiBXMzIgRW1hY3MgY3Jhc2hlcyBvbiBzdGFydHVw IHdpdGhvdXQgYSBCVUZGRVJQIGNoZWNrLiAqLworICAgICAgICYmIEJVRkZFUlAgKHctPmNvbnRl bnRzKQorICAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19j b25mKSkKKyAgICAgICAgICAgfHwgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg Y3Jvc3NoYWlycykpCisgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGZjX3Zpc2libGUpKSk7CisgICAgICAgKytkZXNpcmVkX3JvdykKKyAgICB7CisgICAg ICBpbnQgdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAoZGVzaXJlZF9yb3csIGRlc2lyZWRfbWF0cml4 KTsKKyAgICAgIGlmIChkZXNpcmVkX3Jvdy0+ZW5hYmxlZF9wKQorICAgICAgICBjb250aW51ZTsK KyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKmN1cnJlbnRfcm93ID0gTUFUUklYX1JPVyAody0+Y3Vy cmVudF9tYXRyaXgsIHZwb3MpOworICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24gcm93X3Bvc2l0 aW9uID0gbWNfcm93X3Bvc2l0aW9uICh3LCBjdXJyZW50X3JvdywgY3VycmVudF9yb3csIHZwb3Mp OworICAgICAgaWYgKGN1cnJlbnRfcm93LT5lbmFibGVkX3ApCisgICAgICAgIG1jX2RyYXdfcm93 ICh3LCB3LT5jdXJyZW50X21hdHJpeCwgY3VycmVudF9yb3csIGN1cnJlbnRfcm93LT5nbHlwaHNb VEVYVF9BUkVBXSwKKyAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfcm93LT54LCBjdXJyZW50 X3Jvdy0+dXNlZFtURVhUX0FSRUFdLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgY3Vyc29y X21hdHJpeCwgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBkcmF3X3AsIFNFVF9DVVJTT1JfVFdP KTsKKyAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIC8qIFVwZGF0 ZSB0aGUgaGVhZGVyIGxpbmUgYWZ0ZXIgc2Nyb2xsaW5nIGJlY2F1c2UgYSBuZXcgaGVhZGVyCiAJ IGxpbmUgd291bGQgb3RoZXJ3aXNlIG92ZXJ3cml0ZSBsaW5lcyBhdCB0aGUgdG9wIG9mIHRoZSB3 aW5kb3cKIAkgdGhhdCBjYW4gYmUgc2Nyb2xsZWQuICAqLwpAQCAtMzUxNiw3ICs1NDcyLDQ5IEBA IHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKICNpZmRlZiBI QVZFX1dJTkRPV19TWVNURU0KIAkgIGlmIChjaGFuZ2VkX3AgJiYgcmlmLT5maXhfb3ZlcmxhcHBp bmdfYXJlYSkKIAkgICAgewotCSAgICAgIHJlZHJhd19vdmVybGFwcGVkX3Jvd3MgKHcsIHliKTsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor LyogYHJlZHJhd19vdmVybGFwcGVkX3Jvd3MnOiAgUmVkcmF3IGxpbmVzIGZyb20gdGhlIGN1cnJl bnQgbWF0cml4IG9mIHdpbmRvdyBXCit0aGF0IGFyZSBvdmVybGFwcGVkIG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AgICAgICAgICBpZiAoIW1jX3JlZHJhd19yb3cgKHcsIHctPmN1cnJl bnRfbWF0cml4LCByb3csIGFyZWEsIHJvdy0+eCwgMCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICByb3ctPnVzZWRbYXJlYV0sIHRydWUsIERSQVdfTk9STUFMX1RFWFQsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFX1dJTkRPV19fUkVEUkFXX09WRVJM QVBQRURfUk9XUykKKyAgICAgICAgICAgICAgICAgICYmIHJvdy0+dXNlZFthcmVhXSkKKyAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBGUkFNRV9SSUYgKGYpLT53cml0ZV9nbHlw aHMgKHcsIHJvdywgcm93LT5nbHlwaHNbYXJlYV0sIGFyZWEsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+dXNlZFthcmVhXSk7CisgICAgICAgICAg ICAgICAgICBGUkFNRV9SSUYgKGYpLT5jbGVhcl9lbmRfb2ZfbGluZSAodywgcm93LCBhcmVhLCAt MSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgIHJvdy0+b3Zl cmxhcHBlZF9wID0gMDsKKyAgICAgICAgfQorICAgICAgaWYgKE1BVFJJWF9ST1dfQk9UVE9NX1kg KHJvdykgPj0geWIpCisgICAgICAgIGJyZWFrOworICAgIH0KKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogCSAgICAgIHJlZHJhd19vdmVybGFwcGluZ19yb3dzICh3LCB5Yik7CiAJICAg IH0KICNlbmRpZgpAQCAtMzUzNiw4ICs1NTM0LDIwIEBAIHVwZGF0ZV93aW5kb3cgKHN0cnVjdCB3 aW5kb3cgKncsIGJvb2wgZm9yY2VfcCkKICNlbmRpZgogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lT VEVNCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKyAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgIG1jX3VwZGF0ZV93aW5kb3df ZnJpbmdlcyAodywgMCk7CisgICAgZWxzZQogICAgICAgdXBkYXRlX3dpbmRvd19mcmluZ2VzICh3 LCAwKTsKIAorLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgLyogRW5kIHRoZSB1 cGRhdGUgb2Ygd2luZG93IFcuICBEb24ndCBzZXQgdGhlIGN1cnNvciBpZiB3ZQogICAgICAgICAg cGF1c2VkIHVwZGF0aW5nIHRoZSBkaXNwbGF5IGJlY2F1c2UgaW4gdGhpcyBjYXNlLAogICAgICAg ICAgc2V0X3dpbmRvd19jdXJzb3JfYWZ0ZXJfdXBkYXRlIGhhc24ndCBiZWVuIGNhbGxlZCwgYW5k CmRpZmYgLS1naXQgYS9zcmMvZnJhbWUuaCBiL3NyYy9mcmFtZS5oCmluZGV4IGZhNDVhMzIuLjUz YWQxMzEgMTAwNjQ0Ci0tLSBhL3NyYy9mcmFtZS5oCisrKyBiL3NyYy9mcmFtZS5oCkBAIC0yMDUs NiArMjA1LDE2IEBAIHN0cnVjdCBmcmFtZQogICBMaXNwX09iamVjdCB0b29sX2Jhcl9pdGVtczsK ICAgLyogdG9vbF9iYXJfaXRlbXMgc2hvdWxkIGJlIHRoZSBsYXN0IExpc3BfT2JqZWN0IG1lbWJl ci4gICovCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKyAgLyogTm9uLW5pbCB3aGVuIHRoZSBmcmFtZSBpcyBpbiB0aGUgcHJvY2VzcyBvZiBi ZWluZyB1cGRhdGVkLiAqLworICBzdHJ1Y3QgZnJhbWUgKm1jX3VwZGF0aW5nX2ZyYW1lOworCisv KiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIENhY2hlIG9mIHJlYWxpemVkIGZhY2Vz LiAgKi8KICAgc3RydWN0IGZhY2VfY2FjaGUgKmZhY2VfY2FjaGU7CiAKZGlmZiAtLWdpdCBhL3Ny Yy9mcmluZ2UuYyBiL3NyYy9mcmluZ2UuYwppbmRleCBkMGQ1OTkyLi4xMGFhMTAwIDEwMDY0NAot LS0gYS9zcmMvZnJpbmdlLmMKKysrIGIvc3JjL2ZyaW5nZS5jCkBAIC00MzcsNiArNDM3LDQ2MCBA QCBzdGF0aWMgdW5zaWduZWQgc2hvcnQgZW1wdHlfbGluZV9iaXRzW10gPSB7CiAjZGVmaW5lIFNU QU5EQVJEX0JJVE1BUF9IRUlHSFQoYml0cykgKHNpemVvZiAoYml0cykvQllURVNfUEVSX0JJVE1B UF9ST1cpCiAjZGVmaW5lIEZSQklUUyhiaXRzKSAgYml0cywgU1RBTkRBUkRfQklUTUFQX0hFSUdI VCAoYml0cykKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExF LUNVUlNPUlMgKi8KKworLyogYCstZnJpbmdlLWhlbHBlci1kZWNpbWFsJyBkZWZpbmVkIGluIGBj cm9zc2hhaXJzLmVsYCAqLworCisvKiBUT0RPOiAgQ29uc2lkZXIg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h4eHh4 IgorICAgICAgInh4eHh4eHh4IgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHguLnh4Igor ICAgICAgIi54eC4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAgICAgIi4uLi4uLnh4IgorICAg ICAgIi4uLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcmV2ZXJzZWRfdmVy dGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweDMsIDB4MywgMHgzLCAweDYzLCAw eDMzLCAweDFiLCAweGZmLCAweGZmLCAweDFiLCAweDMzLCAweDYzLCAweDMsIDB4MywgMHgzfTsK KworLyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4 eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4ueHguLngi CisgICAgICAieC4uLnh4LngiCisgICAgICAieC4uLi54eHgiCisgICAgICAieC54eHh4eHgiCisg ICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eHgiCisgICAgICAieC4uLnh4LngiCisgICAg ICAieC4ueHguLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xl X3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDk5LCAweDhkLCAw eDg3LCAweGJmLAorICAweGJmLCAweDg3LCAweDhkLCAweDk5LCAweDgxLCAweDgxLCAweGZmfTsK KworLyogMjcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieHh4eHh4 eHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC54eC4ueHgi CisgICAgICAieC4ueHgueHgiCisgICAgICAieC4uLnh4eHgiCisgICAgICAieHh4eHh4eHgiCisg ICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLnh4eHgiCisgICAgICAieC4ueHgueHgiCisgICAg ICAieC54eC4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAieC4uLi4ueHgiCisgICAgICAi eHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19yZXZlcnNlZF9ob2xsb3df cmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweGIx LCAweDk5LCAweDhkLCAweGZmLAorICAweGZmLCAweDhkLCAweDk5LCAweGIxLCAweDgxLCAweDgx LCAweGZmfTsKKworLyogMjgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAi eC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19ob2xsb3df cmVjdGFuZ2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgx LCAweDgxLAorICAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweGZmfTsKKwor LyogMjkKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4uLi4i CisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0aWNhbF9iYXJfYml0c1td ID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsCisgIDB4ODAs IDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODB9OworCisvKiAzMAorICAgICgrLWZy aW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54 eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIK KyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAg ICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAg ICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3Rh dGljIHVuc2lnbmVkIHNob3J0IG1jX3JldmVyc2VkX3ZlcnRpY2FsX2Jhcl9iaXRzW10gPXsKKyAg MHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4MywgMHgzLCAweDMsIDB4 MywgMHgzLCAweDN9OworCisvKiAzMQorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwK KyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAg ICAgICIueHguLi4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAg ICIuLi54eC4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIu Li4ueHguLiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4u Li54eCIKKyAgICAgICIuLi4uLi54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2Jh Y2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwg MHgxOCwgMHgxOCwgMHhjLCAweGMsIDB4NiwgMHg2LCAweDMsIDB4M307CisKKy8qIDMyCisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4 Li4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgIngueHgu Li4uIgorICAgICAgIngueHguLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLnh4Li4u IgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgor ICAgICAgInguLi4ueHguIgorICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10g PXsKKyAgMHhjMCwgMHhjMCwgMHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwg MHg4YywgMHg4YywgMHg4NiwgMHg4NiwgMHg4MywgMHg4M307CisKKy8qIDMzCisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi54eHh4eHguIgorICAgICAgInh4eHgueC4u IgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4uIgorICAgICAgIi54eHgueC4uIgor ICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAg ICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIikKKyovCitz dGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcGlsY3Jvd19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwg MHhmNCwgMHhmNCwgMHg3NCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisK Ky8qIDM0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4ueHh4eC4u IgorICAgICAgIi54eHh4eHguIgorICAgICAgInguLnh4Li54IgorICAgICAgInguLnh4Li54Igor ICAgICAgInh4eHh4eHh4IgorICAgICAgInh4Li4uLnh4IgorICAgICAgInh4eC4ueHh4IgorICAg ICAgIi54eHh4eHguIgorICAgICAgIi4ueHh4eC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfc21pbGV5X2ZhY2VfYml0c1tdID17CisgIDB4M2MsIDB4N2UsIDB4OTksIDB4OTksIDB4 ZmYsIDB4YzMsIDB4ZTcsIDB4N2UsIDB4M2N9OworCisvKiAzNQorICAgICgrLWZyaW5nZS1oZWxw ZXItaGV4YWRlY2ltYWwKKyAgICAgICIuLnguLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAg ICIuLi4ueC4uLiIKKyAgICAgICIuLi4uLnguLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIu Li54Li4uLiIKKyAgICAgICIuLnguLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1j X3NpbmdsZV9hbmdsZV9yaWdodF9iaXRzW10gPXsKKyAgMHgyMCwgMHgxMCwgMHg4LCAweDQsIDB4 OCwgMHgxMCwgMHgyMH07CisKKy8qIDM2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1h bAorICAgICAgIi4uLi4ueC4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgor ICAgICAgIi4ueC4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAg ICAgIi4uLi4ueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xl X2xlZnRfYml0c1tdID17CisgIDB4NCwgMHg4LCAweDEwLCAweDIwLCAweDEwLCAweDgsIDB4NH07 CisKKy8qIDM3CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4 Li4uIgorICAgICAgIi54eC54eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4 IgorICAgICAgIi4ueHgueHguIgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikK KyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9 eworICAweGQ4LCAweDZjLCAweDM2LCAweDFiLCAweDM2LCAweDZjLCAweGQ4fTsKKworLyogMzgK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueHgueHgiCisgICAg ICAiLi54eC54eC4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iCisgICAgICAi Lnh4Lnh4Li4iCisgICAgICAiLi54eC54eC4iCisgICAgICAiLi4ueHgueHgiKQorKi8KK3N0YXRp YyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxYiwg MHgzNiwgMHg2YywgMHhkOCwgMHg2YywgMHgzNiwgMHgxYn07CisKKy8qIDM5CisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIngueC54Li4uIgorICAgICAgIi54LngueC4u IgorICAgICAgIi4ueC54LnguIgorICAgICAgIi4uLngueC54IgorICAgICAgIi4ueC54LnguIgor ICAgICAgIi54LngueC4uIgorICAgICAgIngueC54Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGE4LCAweDU0LCAweDJh LCAweDE1LCAweDJhLCAweDU0LCAweGE4fTsKKworLyogNDAKKyAgICAoKy1mcmluZ2UtaGVscGVy LWhleGFkZWNpbWFsCisgICAgICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAi LngueC54Li4iCisgICAgICAieC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54 LngueC4iCisgICAgICAiLi4ueC54LngiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190 cmlwbGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxNSwgMHgyYSwgMHg1NCwgMHhhOCwgMHg1 NCwgMHgyYSwgMHgxNX07CisKKy8qIDQxCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1h bAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgor ICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAg ICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAg Ii4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0 aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAw eDAwLCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAw LCAweDAwfTsKKworLyogNDIKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi Li4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54 LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNp Z25lZCBzaG9ydCBtY19zaW5nbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwg MHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgw MH07CisKKy8qIDQzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLngu Li4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLngu IgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgor ICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAw eDAwLCAweDAwLCAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgy LCAweDAwLCAweDAwLCAweDAwfTsKKworLyogNDQKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFk ZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4i CisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisg ICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVf ZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5 MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQ1CisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLngu Li4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLngu IgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgor ICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAg ICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xl X3VwX2JpdHNbXSA9eworICAweDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0 LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwfTsKKworLyogNDYKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAi LnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4u Li4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfZG93 bl9iaXRzW10gPXsKKyAgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwg MHg5MiwgMHg0NCwgMHgyOCwgMHgxMCwgMHgwMH07CisKKy8qIDQ3CisgICAgKCstZnJpbmdlLWhl bHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAg ICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAg Ii54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54 Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4u eC4uIgorICAgICAgInguLi4uLnguIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVh ZHJ1cGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4 LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyfTsKKworLyog NDgKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4ueC4iCisg ICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAg ICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAi LnguLi54Li4iCisg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KSkKKyAgICAgIHsKKyAgICAgICAgbG4xID0g WEZJWE5VTSAoRmxlbmd0aCAoYm0xKSk7CisgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAg ICAgeworICAgICAgICAgICAgaWYgKGxuMSA+IGl4MikKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMSk7CisgICAgICAgICAgICAgICAgaWYgKCFF USAoYm0sIFF0KSkKKyAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAg IH0KKyAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBpZiAobG4xID4gaXgxKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg IGJtID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICAgICAgICAgICAgICBpZiAoIUVRIChibSwg UXQpKQorICAgICAgICAgICAgICAgICAgICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgIH0KKyAgICAgIH0KKyAgICBlbHNlIGlmICgoYm0gPSBibTEsICFFUSAoYm0s IFF0KSkpCisgICAgICBnb3RvIGZvdW5kOworICB9CisgICAgfQorICBpZiAoIUVRIChjbWFwLCBC VkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkKKyAgICAgICYm ICFOSUxQIChCVkFSICgmYnVmZmVyX2RlZmF1bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSkp CisgICAgeworICAgICAgYm0yID0gbWNfYXNzcSAoYml0bWFwLCBCVkFSICgmYnVmZmVyX2RlZmF1 bHRzLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSk7CisgICAgICBpZiAoQ09OU1AgKGJtMikpCisg ICAgICAgIHsKKyAgICAgICAgICBpZiAoKGJtMiA9IFhDRFIgKGJtMikpLCAhTklMUCAoYm0yKSkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKENPTlNQIChibTIpKQorICAgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGxuMiA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMikp OworICAgICAgICAgICAgICAgICAgaWYgKHBhcnRpYWxfcCkKKyAgICAgICAgICAgICAgICAgICAg eworICAgICAgICAgICAgICAgICAgICAgIGlmIChsbjIgPiBpeDIpCisgICAgICAgICAgICAgICAg ICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJt Mik7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg IH0KKyAgICAgICAgfQorICAgIH0KKyAgaWYgKGxuMSA+IGl4MSkKKyAgICB7CisgICAgICBibSA9 IG1jX250aCAoaXgxLCBibTEpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgZ290 byBmb3VuZDsKKyAgICB9CisgIGlmIChsbjIgPiBpeDEpCisgICAgeworICAgICAgYm0gPSBtY19u dGggKGl4MSwgYm0yKTsKKyAgICAgIGlmICghRVEgKGJtLCBRdCkpCisgICAgICAgIGdvdG8gZm91 bmQ7CisgICAgICByZXR1cm4gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICB9CisgICAgZWxzZSBp ZiAoKGJtID0gYm0yLCBOSUxQIChibSkpKQorICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRN QVA7CisgIGZvdW5kOgorICByZXR1cm4gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJtKTsKK30KKwor c3RhdGljIGludAorbWNfZ2V0X2xvZ2ljYWxfY3Vyc29yX2JpdG1hcCAoc3RydWN0IHdpbmRvdyAq dywgTGlzcF9PYmplY3QgY3Vyc29yKQoreworICBMaXNwX09iamVjdCBjbWFwLCBibSA9IFFuaWw7 CisgIGlmICgoY21hcCA9IEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZnJpbmdlX2N1cnNv cl9hbGlzdCkpLCAhTklMUCAoY21hcCkpCisgICAgeworICAgICAgYm0gPSBtY19hc3NxIChjdXJz b3IsIGNtYXApOworICAgICAgaWYgKENPTlNQIChibSkpCisgICAgICAgIHsKKyAgICAgICAgICBp ZiAoKGJtID0gWENEUiAoYm0pKSwgTklMUCAoYm0pKQorICAgICAgICAgICAgcmV0dXJuIE1DX05P X0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgcmV0dXJuIGxvb2t1cF9mcmluZ2VfYml0bWFwIChi bSk7CisgICAgICAgIH0KKyAgICB9CisgIGlmIChFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZh dWx0cywgZnJpbmdlX2N1cnNvcl9hbGlzdCkpKQorICAgIHJldHVybiBNQ19OT19GUklOR0VfQklU TUFQOworICBibSA9IG1jX2Fzc3EgKGN1cnNvciwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJp bmdlX2N1cnNvcl9hbGlzdCkpOworICBpZiAoIUNPTlNQIChibSkgfHwgKChibSA9IFhDRFIgKGJt KSksIE5JTFAgKGJtKSkpCisgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgIHJldHVy biBsb29rdXBfZnJpbmdlX2JpdG1hcCAoYm0pOworfQorCitzdGF0aWMgaW50CittY19nZXRfbG9n aWNhbF9mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICp3LCBMaXNwX09iamVjdCBiaXRtYXAs IGludCByaWdodF9wLCBpbnQgcGFydGlhbF9wKQoreworICBMaXNwX09iamVjdCBjbWFwLCBibTEg PSBRbmlsLCBibTIgPSBRbmlsLCBibT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gIGlm IChDT05TUCAoYm0xKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbG4xID0gWEZJWE5V TSAoRmxlbmd0aCAoYm0xKSk7CisgICAgICAgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYgKGxuMSA+IGl4MikKKyAgICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDIsIGJtMSk7 CisgICAgICAgICAgICAgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgICAgICAgICAgICAg ICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgICBpZiAobG4xID4gaXgxKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICAgICAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMSk7CisgICAgICAgICAg ICAgICAgICAgICAgICBpZiAoIUVRIChibSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICBnb3RvIGZvdW5kOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKChibSA9IGJtMSwgIUVRIChi bSwgUXQpKSkKKyAgICAgICAgICAgICAgZ290byBmb3VuZDsKKyAgICAgICAgfQorICAgIH0KKyAg aWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9h bGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2lu ZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IG1jX2Fzc3EgKGJpdG1hcCwgQlZB UiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRvcl9hbGlzdCkpOworICAgICAgaWYg KENPTlNQIChibTIpKQorICAgICAgICB7CisgICAgICAgICAgaWYgKChibTIgPSBYQ0RSIChibTIp KSwgIU5JTFAgKGJtMikpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChDT05TUCAo Ym0yKSkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBsbjIgPSBYRklYTlVN IChGbGVuZ3RoIChibTIpKTsKKyAgICAgICAgICAgICAgICAgIGlmIChwYXJ0aWFsX3ApCisgICAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBpZiAobG4yID4gaXgyKQor ICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICBibSA9 IG1jX250aCAoaXgyLCBibTIpOworICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIUVRIChi bSwgUXQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZm91bmQ7CisgICAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGlmIChsbjEgPiBpeDEpCisg ICAgeworICAgICAgYm0gPSBtY19udGggKGl4MSwgYm0xKTsKKyAgICAgIGlmICghRVEgKGJtLCBR dCkpCisgICAgICAgIGdvdG8gZm91bmQ7CisgICAgfQorICBpZiAobG4yID4gaXgxKQorICAgIHsK KyAgICAgIGJtID0gbWNfbnRoIChpeDEsIGJtMik7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQor ICAgICAgICBnb3RvIGZvdW5kOworICAgICAgcmV0dXJuIE1DX05PX0ZSSU5HRV9CSVRNQVA7Cisg ICAgfQorICAgIGVsc2UgaWYgKChibSA9IGJt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X2JvdCA9IFhDRFIgKHBvcyk7CisgICAg ICAgICAgaWYgKHBvcyA9IG1jX2Fzc3EgKFF0b3AsIGluZCksICFOSUxQIChwb3MpKQorICAgICAg ICAgICAgYm91bmRhcnlfdG9wID0gWENEUiAocG9zKTsKKyAgICAgICAgICBpZiAocG9zID0gbWNf YXNzcSAoUWJvdHRvbSwgaW5kKSwgIU5JTFAgKHBvcykpCisgICAgICAgICAgICBib3VuZGFyeV9i b3QgPSBYQ0RSIChwb3MpOworICAgICAgICAgIGlmIChwb3MgPSBtY19hc3NxIChRdXAsIGluZCks ICFOSUxQIChwb3MpKQorICAgICAgICAgICAgYXJyb3dfdG9wID0gWENEUiAocG9zKTsKKyAgICAg ICAgICBpZiAocG9zID0gbWNfYXNzcSAoUWRvd24sIGluZCksICFOSUxQIChwb3MpKQorICAgICAg ICAgICAgYXJyb3dfYm90ID0gWENEUiAocG9zKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisg ICAgICAgICAgLyogQW55dGhpbmcgZWxzZSBtZWFucyBib3VuZGFyeSBvbiBsZWZ0IGFuZCBubyBh cnJvd3MuICAqLworICAgICAgICAgIGJvdW5kYXJ5X3RvcCA9IGJvdW5kYXJ5X2JvdCA9IFFsZWZ0 OworICAgIH0KKyAgdG9wX2luZF9ybiA9IGJvdF9pbmRfcm4gPSAtMTsKKyAgaWYgKCFOSUxQIChp bmQpKQorICAgIHsKKyAgICAgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJuID0gMDsKKyAgICAgICAg ICAgeSA8IHliICYmIHJuIDwgbnJvd3M7CisgICAgICAgICAgIHkgKz0gcm93LT5oZWlnaHQsICsr cm4pCisgICAgICAgIHsKKyAgICAgICAgICByb3cgPSB3LT5kZXNpcmVkX21hdHJpeC0+cm93cyAr IHJuOworICAgICAgICAgIGlmICghcm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICByb3cgPSB3 LT5jdXJyZW50X21hdHJpeC0+cm93cyArIHJuOworICAgICAgICAgIHJvdy0+aW5kaWNhdGVfYm9i X3AgPSByb3ctPmluZGljYXRlX3RvcF9saW5lX3AgPSAwOworICAgICAgICAgIHJvdy0+aW5kaWNh dGVfZW9iX3AgPSByb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3AgPSAwOworICAgICAgICAgIGlm ICghcm93LT5tb2RlX2xpbmVfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKHRv cF9pbmRfcm4gPCAwICYmIHJvdy0+dmlzaWJsZV9oZWlnaHQgPiAwKQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgIGlmIChNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdykg PD0gQlVGX0JFR1YgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSkKKyAgICAgICAgICAgICAgICAgICAg ICAmJiAhTUFUUklYX1JPV19QQVJUSUFMTFlfVklTSUJMRV9BVF9UT1BfUCAodywgcm93KSkKKyAg ICAgICAgICAgICAgICAgICAgcm93LT5pbmRpY2F0ZV9ib2JfcCA9ICFOSUxQIChib3VuZGFyeV90 b3ApOworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgcm93 LT5pbmRpY2F0ZV90b3BfbGluZV9wID0gIU5JTFAgKGFycm93X3RvcCk7CisgICAgICAgICAgICAg ICAgICB0b3BfaW5kX3JuID0gcm47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBp ZiAoYm90X2luZF9ybiA8IDApCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg aWYgKE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPj0gQlVGX1pWIChYQlVGRkVSICh3LT5j b250ZW50cykpCisgICAgICAgICAgICAgICAgICAgICAgJiYgIU1BVFJJWF9ST1dfUEFSVElBTExZ X1ZJU0lCTEVfQVRfQk9UVE9NX1AgKHcsIHJvdykpCisgICAgICAgICAgICAgICAgICAgIHJvdy0+ aW5k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9wKQorICAgICAgICAgICAgICAgICAgOiBNQ19MRUZUX0ZSSU5HRSAoMiwgUXRvcCwgMCkp OworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBibiA9ICgocm93LT5pbmRpY2F0ZV9l b2JfcCAmJiBFUSAoYm91bmRhcnlfYm90LCBRcmlnaHQpKQorICAgICAgICAgICAgICAgICAgICA/ IE1DX1JJR0hUX0ZSSU5HRSAoMSwgUXRvcF9ib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKQorICAg ICAgICAgICAgICAgICAgICA6IE1DX1JJR0hUX0ZSSU5HRSAoMiwgUXRvcCwgMCkpOworICAgICAg ICB9CisgICAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfdG9wX2xpbmVfcCkKKyAgICAgICAg ICB7CisgICAgICAgICAgICBpZiAoRVEgKGFycm93X3RvcCwgUWxlZnQpKQorICAgICAgICAgICAg ICBibiA9IE1DX0xFRlRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgICAgICBlbHNlCisg ICAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDYsIFF1cCwgMCk7CisgICAgICAg ICAgfQorICAgICAgaWYgKGJuICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAgICAgIHsKKyAg ICAgICAgICBzdHJ1Y3QgZnJpbmdlX2JpdG1hcCAqZmIgPSBnZXRfZnJpbmdlX2JpdG1hcF9kYXRh IChibik7CisgICAgICAgICAgaWYgKGZiLT5hbGlnbiA9PSBBTElHTl9CSVRNQVBfVE9QICYmIGZi LT5wZXJpb2QgPT0gMCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgc3RydWN0IGdseXBo X3JvdyAqcm93MTsKKyAgICAgICAgICAgICAgaW50IHRvcF9pbmRfbWF4X3k7CisgICAgICAgICAg ICAgIHRvcF9pbmRfbWluX3kgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgICAg ICAgICAgICAgdG9wX2luZF9tYXhfeSA9IHRvcF9pbmRfbWluX3kgKyBmYi0+aGVpZ2h0OworICAg ICAgICAgICAgICBpZiAodG9wX2luZF9tYXhfeSA+IHliKQorICAgICAgICAgICAgICAgIHRvcF9p bmRfbWF4X3kgPSB5YjsKKyAgICAgICAgICAgICAgZm9yICh5ID0gcm93LT55ICsgcm93LT5oZWln aHQsIHJuID0gdG9wX2luZF9ybiArIDE7CisgICAgICAgICAgICAgICAgICAgeSA8IHRvcF9pbmRf bWF4X3kgJiYgcm4gPCBucm93czsKKyAgICAgICAgICAgICAgICAgICB5ICs9IHJvdzEtPmhlaWdo dCwgcm4rKykKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBpZiAoYm90X2lu ZF9ybiA+PSAwICYmIHJuID49IGJvdF9pbmRfcm4pCisgICAgICAgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47 CisgICAgICAgICAgICAgICAgICBpZiAoIXJvdzEtPmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAg ICAgICAgcm93MSA9IHctPmN1cnJlbnRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAg ICAgICByb3cxLT5pbmRpY2F0ZV9ib2JfcCA9IHJvdy0+aW5kaWNhdGVfYm9iX3A7CisgICAgICAg ICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV90b3BfbGluZV9wID0gcm93LT5pbmRpY2F0ZV90b3Bf bGluZV9wOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg IH0KKyAgaWYgKGJvdF9pbmRfcm4gPj0gMCkKKyAgICB7CisgICAgICBpbnQgYm4gPSBNQ19OT19G UklOR0VfQklUTUFQOworICAgICAgcm93ID0gdy0+ZGVzaXJlZF9tYXRyaXgtPnJvd3MgKyBib3Rf aW5kX3JuOworICAgICAgaWYgKCFyb3ctPmVuYWJsZWRfcCkKKyAgICAgICAgcm93ID0gdy0+Y3Vy cmVudF9tYXRyaXgtPnJvd3MgKyBib3RfaW5kX3JuOworICAgICAgYm90X3Jvd19lbmRzX2F0X3p2 X3AgPSByb3ctPmVuZHNfYXRfenZfcDsKKyAgICAgIGlmIChyb3ctPmluZGljYXRlX2VvYl9wKQor ICAgICAgICB7CisgICAgICAgICAgaWYgKEVRIChib3VuZGFyeV9ib3QsIFFsZWZ0KSkKKyAgICAg ICAgICAgIGJuID0gTUNfTEVGVF9GUklOR0UgKDMsIFFib3R0b20sIHJvdy0+ZW5kc19hdF96dl9w KTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgYm4gPSBNQ19SSUdIVF9GUklOR0Ug KDMsIFFib3R0b20sIHJvdy0+ZW5kc19hdF96dl9wKTsKKyAgICAgICAgfQorICAgICAgICBlbHNl IGlmIChyb3ctPmluZGljYXRlX2JvdHRvbV9saW5lX3ApCisgICAgICAgICAgeworICAgICAgICAg ICAgaWYgKEVRIChhcnJvd19ib3QsIFFsZWZ0KSkKKyAgICAgICAgICAgICAgYm4gPSBNQ19MRUZU X0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg ICAgYm4gPSBNQ19SSUdIVF9GUklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICB9CisgICAg ICBpZiAoYm4gIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgeworICAgICAgICAgIHN0 cnVjdCBmcmluZ2VfYml0bWFwICpmYiA9IGdldF9mcmluZ2VfYml0bWFwX2RhdGEgKGJuKTsKKyAg ICAgICAgICBpZiAoZmItPmFsaWduID09IEFMSUdOX0JJVE1BUF9CT1RUT00gJiYgZmItPnBlcmlv ZCA9PSAwKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpy b3cxOworICAgICAgICAgICAgICBpbnQgYm90X2luZF9taW5feTsKKyAgICAgICAgICAgICAgYm90 X2luZF9tYXhfeSA9IHJvdy0+eSArIHJvdy0+dmlzaWJsZV9oZWlnaHQ7CisgICAgICAgICAgICAg IGJvdF9pbmRfbWluX3kgPSBib3RfaW5kX21heF95IC0gZmItPmhlaWdodDsKKyAgICAgICAgICAg ICAgaWYgKGJvdF9pbmRfbWluX3kgPCBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KSkKKyAg ICAgICAgICAgICAgICBib3RfaW5kX21pbl95ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAo dyk7CisgICAgICAgICAgICAgIGZvciAoeSA9IHJvdy0+eSwgcm4gPSBib3RfaW5kX3JuIC0gMTsK KyAgICAgICAgICAgICAgICAgICB5ID49IGJvdF9pbmRfbWluX3kgJiYgcm4gPj0gMDsKKyAgICAg ICAgICAgICAgICAgICB5IC09IHJvdzEtPmhlaWdodCwgcm4tLSkKKyAgICAgICAgICAgICAgICB7 CisgICAgICAgICAgICAgICAgICBpZiAodG9wX2luZF9ybiA+PSAwICYmIHJuIDw9IHRvcF9pbmRf cm4pCisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgcm93MSA9 IHctPmRlc2lyZWRfbWF0cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICBpZiAoIXJv dzEtPmVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgcm93MSA9IHctPmN1cnJlbnRfbWF0 cml4LT5yb3dzICsgcm47CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV9lb2JfcCA9 IHJvdy0+aW5kaWNhdGVfZW9iX3A7CisgICAgICAgICAgICAgICAgICByb3cxLT5pbmRpY2F0ZV9i b3R0b21fbGluZV9wID0gcm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgYm9vbCBhdXRvX2hzY3Jv bGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRvX2hzY3JvbGxfbW9kZSwg dy0+Y29udGVudHMpLCBRY3VycmVudF9saW5lKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVm dCA1KSAqLworICBib29sIGhzY2xfYWxsX3RlbXBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9s bAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMt eCA8IGFuZCBkbyBub3RoaW5nLiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMF9wID0gKHctPnN1 c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19o c2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwg PiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9s bCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyBlbHNlIGJlc2lk ZXMgaG9yaXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAgICAgICAgICAgICAgIGN1cnJlbnQgbGlu ZSBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jp em9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8x X3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hz Y3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwg PT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIC4uLgorICAgICAg ICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZm ZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+c3VzcGVuZF9hdXRv X2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9k ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA9PSAwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIC8q IEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0aGUgbGVmdCBhcnJv dyBrZXkgb25lIHRpbWUuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9u dGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAgYm9vbCBoc2NsX3RlbXBfcCA9ICghdy0+ c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3Jv bGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTog IEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBjdXJyZW50IGxpbmUg dG8gYmUKKyAgICAgICAgICAgICAgIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4K KyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBk aWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1fcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hz Y3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5f aHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5m cmFtZSk7CisgIGZvciAoeSA9IHctPnZzY3JvbGwsIHJuID0gMDsKKyAgICAgICB5IDwgeWIgJiYg cm4gPCBucm93czsKKyAgICAgICB5ICs9IHJvdy0+aGVpZ2h0LCBybisrKQorICAgIHsKKyAgaW50 IGxlZnQsIHJpZ2h0OworICB1bnNpZ25lZCBsZWZ0X2ZhY2VfaWQsIHJpZ2h0X2ZhY2VfaWQ7Cisg IGludCBsZWZ0X29mZnNldCwgcmlnaHRfb2Zmc2V0OworICBib29sIHBlcmlvZGljX3A7CisgIHJv dyA9IHctPmRlc2lyZWRfbWF0cml4LT5yb3dz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biwKKyAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAu Ymx1ZSA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0u ZmcuYmx1ZX07CisgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAg ICAgLy8gICAgICAgICAgICAgICAgICAgICAgICAgIC5ncmVlbiA9IHctPm1jX21hdHJpeC52cG9z W3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuZ3JlZW4sCisgICAgICAvLyAgICAg ICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoX2NtXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgYm9vbCBhY3RpdmVfcCA9IHct Pm1jX21hdHJpeC52cG9zW3ZudGhfY21dLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYWN0aXZlX3A7 CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSB3LT5tY19tYXRyaXgudnBvc1t2 bnRoX2NtXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmdseXBoX2ZsYXZvcjsKKyAgICAgIGJvb2wg ZW5hYmxlZF9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF9jbV0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5lbmFibGVkX3A7CisgICAgICBpZiAoKHZwb3MgPT0gdm50aF9kbSB8fCB2cG9zID09IHZu dGhfY20pCisgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlfQVJST1dfQklU TUFQCisgICAgICAgICAgJiYgIWhzY2xfYWxsX3RlbXBfcAorICAgICAgICAgICYmICFoc2NsX3Rl bXBfcAorICAgICAgICAgICYmICFoc2NsX3Blcm1fcAorICAgICAgICAgICYmICFoc2NsX2FsbF9w ZXJtXzBfcAorICAgICAgICAgICYmICFoc2NsX2FsbF9wZXJtXzFfcAorICAgICAgICAgICYmICFo c2NsX2FsbF9wZXJtXzJfcAorICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgeworICAg ICAgICAgIGludCBmcmluZ2VfYml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAg ICBlbnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICghYWN0 aXZlX3AKKyAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNl ICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaW5hY3RpdmUtcHJlLXp2LWZhY2UiKSwg dHJ1ZSkKKyAgICAgICAgICAgIDogKGFjdGl2ZV9wKQorICAgICAgICAgICAgICA/IGxvb2t1cF9u YW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctcHJlLXp2LWZhY2UiKSwg dHJ1ZSkKKyAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIG1jX2xlZnRf ZnJpbmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBvdmVybGF5X2Fycm93X2ZhY2Vf aWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lE OworICAgICAgICAgIGlmICh3LT5oc2Nyb2xsICE9IDApCisgICAgICAgICAgICBmcmluZ2VfYml0 bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistb3ZlcmxheS1hcnJvdyIp LCBmYWxzZSwgdHJ1ZSk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIGZyaW5nZV9i aXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1vdmVybGF5LWFycm93 IiksIHRydWUsIHRydWUpOworICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1hcCA9IChjdXJz b3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gZnJpbmdlX2JpdG1hcAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBp ZiAoKHZwb3MgPT0gdm50aF9kbSB8fCB2cG9zID09IHZudGhfY20pCisgICAgICAgICAgICAgICAg ICYmIGdseXBoX2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUAorICAgICAgICAgICAg ICAgICAmJiAoaHNjbF9hbGxfdGVtcF9wCisgICAgICAgICAgICAgICAgICAgICB8fCBoc2NsX2Fs bF9wZXJtXzBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9hbGxfcGVybV8xX3AKKyAg ICAgICAgICAgICAgICAgICAgIHx8IGhzY2xfYWxsX3Blcm1fMl9wCisgICAgICAgICAgICAgICAg ICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICAgICAgfHwgaHNjbF9wZXJtX3Ap CisgICAgICAgICAgICAgICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICB7CisgICAgICAgICAg ICBpbnQgZnJpbmdlX2JpdG1hcCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAgICAgICBl bnVtIGZhY2VfaWQgb3ZlcmxheV9hcnJvd19mYWNlX2lkID0KKyAgICAgICAgICAgICAgKCFhY3Rp dmVfcAorICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRz KSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9m YWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNjbC1pbmFjdGl2ZS1wcmUtenYt ZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICA6IChhY3RpdmVfcCkKKyAgICAgICAgICAgICAg ICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ctaHNj bC1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsK KyAgICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2ZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNf TEVGVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA/IG92ZXJsYXlfYXJyb3dfZmFjZV9pZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgICAgIGlmIChoc2NsX2FsbF9wZXJt XzBfcCkKKyAgICAgICAgICAgICAgZnJpbmdlX2JpdG1hcCA9IG1jX2dldF9mcmluZ2VfYml0bWFw ICh3LCBpbnRlcm4gKCIrLWhzY2wtcGVybSIpLCBmYWxzZSwgZmFsc2UpOworICAgICAgICAgICAg ICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzFfcCkKKyAgICAgICAgICAgICAgICBmcmluZ2VfYml0 bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNjbC1wZXJtIiksIHRy dWUsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX2FsbF9wZXJtXzJfcCkK KyAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAo dywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIHRydWUpOworICAgICAgICAgICAgICAg ICAgZWxzZSBpZiAoaHNjbF9wZXJtX3ApCisgICAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRt YXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1 ZSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfYWxsX3RlbXBfcCkK KyAgICAgICAgICAgICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRt YXAgKHcsIGludGVybiAoIistaHNjbC10ZW1wIiksIGZhbHNlLCBmYWxzZSk7CisgICAgICAgICAg ICAgICAgICAgICAgZWxzZSBpZiAoaHNjbF90ZW1wX3ApCisgICAgICAgICAgICAgICAgICAgICAg ICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAoIistaHNj bC10ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgICAgIG1jX2xlZnRfZnJpbmdlX2JpdG1h cCA9IChjdXJzb3JfdHlwZSA9PSBNQ19MRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklOR0VfQklUTUFQOworICAgICAgICAgIH0K KyAgICAgICAgICBlbHNlIGlmICgodnBvcyA9PSB2bnRoX2RtIHx8IHZwb3MgPT0gdm50aF9jbSkK KyAgICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFO R0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3Ig PT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAg ICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAg ICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19S RVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAg IHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAg ICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIKKyAgICAgICAg ICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfQkFDS1NM QVNIKQorICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIExpc3BfT2JqZWN0IGJpdG1hcF9mbGF2b3IgPSAoZ2x5cGhfZmxhdm9yID09 IE1DX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaF9mbGF2b3Ig PT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVykKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfaG9sbG93X3Jl Y3RhbmdsZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19yZWN0YW5nbGUK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZv ciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3ZlcnRpY2FsX2Jhcl9yaWdodF9hcnJvdworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09 IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfcmV2ZXJzZWRfdmVydGljYWxfYmFyX3Jp Z2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChn bHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gUW1jX3JldmVyc2VkX3ZlcnRpY2FsX2JhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xB U0gpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX3Zl cnRpY2FsX2Jhcl9iYWNrc2xhc2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogUW5pbDsKKyAgICAgICAgICAgICAgbWNfcmlnaHRfZnJpbmdlX2JpdG1hcCA9IChj dXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJpdG1hcF9mbGF2 b3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBNQ19OT19GUklO R0VfQklUTUFQOworICAgICAgICAgICAgICBtY19yaWdodF9mcmluZ2VfZmFjZV9pZCA9CisgICAg ICAgICAgICAgICAgKGN1cnNvcl90eXBlID09IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAg ICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVgorICAgICAgICAgICAgICAgICAm JiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19SRUNUQU5HTEVfUklHSFRfQVJS T1cKKyAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2Zs YXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpKQorICAgICAgICAgICAgICAgICAgPyBs b29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJlLXp2LWZh Y2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9G UklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IEFUX1pW CisgICAgICAgICAgICAgICAgICAgJiYgKGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xM T1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgIHx8IGdseXBo X2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JB UikpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4g KCIrLXJldmVyc2VkLWJhci1hdC16di1mYWNlIiksIHRydWUpCisgICAgICAgICAgICAgICAgOiAo Y3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAgICAgICAgICAg ICYmIHJvd19wb3NpdGlvbiA9PSBQT1NUX1pWCisgICAgICAgICAgICAgICAgICAgJiYgKGdseXBo X2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9y ID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1 cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJldmVyc2VkLWJhci1wb3N0LXp2LWZhY2Ui KSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklO R0VfQklUTUFQCisgICAgICAgICAgICAgICAgICAgJiYgcm93X3Bvc2l0aW9uID09IFBSRV9aVgor ICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9IT0xMT1df UkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9y ICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAg ICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAgICAg ICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLWJhci1wcmUt enYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09IE1DX1JJ R0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0g QVRfWlYKKyAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURf SE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICYmIGdseXBo X2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAg ICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSKQor ICAgICAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1i YXItYXQtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgICAgICAgIDogKGN1cnNvcl90eXBlID09 IE1DX1JJR0hUX0ZSSU5HRV9CSVRNQVAKKyAgICAgICAgICAgICAgICAgICAmJiByb3dfcG9zaXRp b24gPT0gUE9TVF9aVgorICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19S RVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAg JiYgZ2x5cGhfZmxhdm9yICE9IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVwor ICAgICAgICAgICAgICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNB TF9CQVIpCisgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRl cm4gKCIrLWJhci1wb3N0LXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICA6IERFRkFV TFRfRkFDRV9JRDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKCFyb3ctPmVu YWJsZWRfcCkKKyAgICAgICAgcm93ID0gY3VyOworICAgICAgbGVmdF9mYWNlX2lkID0gcmlnaHRf ZmFjZV9pZCA9IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgIGxlZnRfb2Zmc2V0ID0gcmlnaHRfb2Zm c2V0ID0gMDsKKyAgICAgIHBlcmlvZGljX3AgPSAwOworICAgICAgLyogRGVjaWRlIHdoaWNoIGJp dG1hcCB0byBkcmF3IGluIHRoZSBsZWZ0IGZyaW5nZS4gICovCisgICAgICBpZiAoV0lORE9XX0xF RlRfRlJJTkdFX1dJRFRIICh3KSA9PSAwKQorICAgICAgICBsZWZ0ID0gTUNfTk9fRlJJTkdFX0JJ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CisgICAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJ TkdFICgzLCBRYm90dG9tLCBib3Rfcm93X2VuZHNfYXRfenZfcCk7CisgICAgICAgICAgaWYgKGJv dF9pbmRfbWF4X3kgPj0gMCkKKyAgICAgICAgICAgIGxlZnRfb2Zmc2V0ID0gYm90X2luZF9tYXhf eSAtIChyb3ctPnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQorICAgICAgZWxz ZSBpZiAoKCFyb3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9Q IChyb3cpKQorICAgICAgICAgICAgICAgfHwgKHJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmNvbnRp bnVlZF9wKSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg0LCBRY29udGludWF0aW9u LCAwKTsKKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfZW1wdHlfbGluZV9wICYmIEVRIChl bXB0eV9wb3MsIFFsZWZ0KSkKKyAgICAgICAgbGVmdCA9IE1DX0xFRlRfRlJJTkdFICg1LCBRZW1w dHlfbGluZSwgMCk7CisgICAgICBlbHNlIGlmIChyb3ctPmluZGljYXRlX3RvcF9saW5lX3AgJiYg RVEgKGFycm93X3RvcCwgUWxlZnQpKQorICAgICAgICB7CisgICAgICAgICAgbGVmdCA9IE1DX0xF RlRfRlJJTkdFICg2LCBRdXAsIDApOworICAgICAgICAgIGlmICh0b3BfaW5kX21pbl95ID49IDAp CisgICAgICAgICAgICBsZWZ0X29mZnNldCA9IHRvcF9pbmRfbWluX3kgLSByb3ctPnk7CisgICAg ICAgIH0KKyAgICAgIGVsc2UgaWYgKHJvdy0+aW5kaWNhdGVfYm90dG9tX2xpbmVfcCAmJiBFUSAo YXJyb3dfYm90LCBRbGVmdCkpCisgICAgICAgIHsKKyAgICAgICAgICBsZWZ0ID0gTUNfTEVGVF9G UklOR0UgKDcsIFFkb3duLCAwKTsKKyAgICAgICAgICBpZiAoYm90X2luZF9tYXhfeSA+PSAwKQor ICAgICAgICAgICAgbGVmdF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJvdy0+ dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIGxlZnQgPSBN Q19OT19GUklOR0VfQklUTUFQOworICAgICAgLyogRGVjaWRlIHdoaWNoIGJpdG1hcCB0byBkcmF3 IGluIHRoZSByaWdodCBmcmluZ2UuICAqLworICAgICAgaWYgKFdJTkRPV19SSUdIVF9GUklOR0Vf V0lEVEggKHcpID09IDApCisgICAgICAgIHJpZ2h0ID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAg ICAgIGVsc2UgaWYgKHJvdy0+cmlnaHRfdXNlcl9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5H RV9CSVRNQVApCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IHJvdy0+cmlnaHRfdXNlcl9m cmluZ2VfYml0bWFwOworICAgICAgICAgIHJpZ2h0X2ZhY2VfaWQgPSByb3ctPnJpZ2h0X3VzZXJf ZnJpbmdlX2ZhY2VfaWQ7CisgICAgICAgIH0KKyAgICAgIGVsc2UgaWYgKCghcm93LT5yZXZlcnNl ZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICB8fCAocm93 LT5yZXZlcnNlZF9wICYmIHJvdy0+dHJ1bmNhdGVkX29uX2xlZnRfcCkpCisgICAgICAgIHJpZ2h0 ID0gTUNfUklHSFRfRlJJTkdFICgwLCBRdHJ1bmNhdGlvbiwgMCk7CisgICAgICBlbHNlIGlmIChy b3ctPmluZGljYXRlX2JvYl9wICYmIEVRIChib3VuZGFyeV90b3AsIFFyaWdodCkpCisgICAgICAg IHsKKyAgICAgICAgICByaWdodCA9ICgocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRh cnlfYm90LCBRcmlnaHQpKQorICAgICAgICAgICAgID8gTUNfUklHSFRfRlJJTkdFICgxLCBRdG9w X2JvdHRvbSwgdG9wX3Jvd19lbmRzX2F0X3p2X3ApCisgICAgICAgICAgICAgOiBNQ19SSUdIVF9G UklOR0UgKDIsIFF0b3AsIDApKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5feSA+PSAwKQor ICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAg ICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9lb2JfcCAmJiBFUSAoYm91bmRhcnlf Ym90LCBRcmlnaHQpKQorICAgICAgICB7CisgICAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklO R0UgKDMsIFFib3R0b20sIGJvdF9yb3dfZW5kc19hdF96dl9wKTsKKyAgICAgICAgICBpZiAoYm90 X2luZF9tYXhfeSA+PSAwKQorICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gYm90X2luZF9tYXhf eSAtIChyb3ctPnkgKyByb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgfQorICAgICAgZWxz ZSBpZiAoKCFyb3ctPnJldmVyc2VkX3AgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAg ICAgIHx8IChyb3ctPnJldmVyc2VkX3AgJiYgTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9Q IChyb3cpKSkKKyAgICAgICAgcmlnaHQgPSBNQ19SSUdIVF9GUklOR0UgKDQsIFFjb250aW51YXRp b24sIDApOworICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV90b3BfbGluZV9wICYmIEVRIChh cnJvd190b3AsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hU X0ZSSU5HRSAoNiwgUXVwLCAwKTsKKyAgICAgICAgICBpZiAodG9wX2luZF9taW5feSA+PSAwKQor ICAgICAgICAgICAgcmlnaHRfb2Zmc2V0ID0gdG9wX2luZF9taW5feSAtIHJvdy0+eTsKKyAgICAg ICAgfQorICAgICAgZWxzZSBpZiAocm93LT5pbmRpY2F0ZV9ib3R0b21fbGluZV9wICYmIEVRIChh cnJvd19ib3QsIFFyaWdodCkpCisgICAgICAgIHsKKyAgICAgICAgICByaWdodCA9IE1DX1JJR0hU X0ZSSU5HRSAoNywgUWRvd24sIDApOworICAgICAgICAgIGlmIChib3RfaW5kX21heF95ID49IDAp CisgICAgICAgICAgICByaWdodF9vZmZzZXQgPSBib3RfaW5kX21heF95IC0gKHJvdy0+eSArIHJv dy0+dmlzaWJsZV9oZWlnaHQpOworICAgICAgICB9CisgICAgICBlbHNlIGlmIChyb3ctPmluZGlj YXRlX2VtcHR5X2xpbmVfcCAmJiBFUSAoZW1wdHlfcG9zLCBRcmlnaHQpKQorICAgICAgICByaWdo dCA9IE1DX1JJR0hUX0ZSSU5HRSAoNSwgUWVtcHR5X2xpbmUsIDApOworICAgICAgZWxzZQorICAg ICAgICByaWdodCA9IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICBwZXJpb2RpY19wID0gKGdl dF9mcmluZ2VfYml0bWFwX2RhdGEgKGxlZnQpLT5wZXJpb2QgIT0gMAorICAgICAgICAgICAgICAg ICAgICB8fCBnZXRfZnJpbmdlX2JpdG1hcF9kYXRhIChyaWdodCktPnBlcmlvZCAhPSAwKTsKKyAg ICAgIGlmIChyb3ctPnkgIT0gY3VyLT55CisgICAgICAgICAgfHwgcm93LT52aXNpYmxlX2hlaWdo dCAhPSBjdXItPnZpc2libGVfaGVpZ2h0CisgICAgICAgICAgfHwgcm93LT5lbmRzX2F0X3p2X3Ag IT0gY3VyLT5lbmRzX2F0X3p2X3AKKyAgICAgICAgICB8fCBsZWZ0ICE9IGN1ci0+bGVmdF9mcmlu Z2VfYml0bWFwCisgICAgICAgICAgfHwgcmlnaHQgIT0gY3VyLT5yaWdodF9mcmluZ2VfYml0bWFw CisgICAgICAgICAgfHwgbGVmdF9mYWNlX2lkICE9IGN1ci0+bGVmdF9mcmluZ2VfZmFjZV9pZAor ICAgICAgICAgIHx8IHJpZ2h0X2ZhY2VfaWQgIT0gY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZAor ICAgICAgICAgIHx8IGxlZnRfb2Zmc2V0ICE9IGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0CisgICAg ICAgICAgfHwgcmlnaHRfb2Zmc2V0ICE9IGN1ci0+cmlnaHRfZnJpbmdlX29mZnNldAorICAgICAg ICAgIHx8IHBlcmlvZGljX3AgIT0gY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AKKyAgICAg ICAgICB8fCBjdXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wKQorICAgICAgICB7CisgICAgICAg ICAgcmVkcmF3X3AgPSAxLCByb3ctPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAg ICAgICBpZiAoIWtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBj dXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAgICAgICAgICAgICAgaWYgKG1jX2xl ZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQCisgICAgICAgICAgICAgICAg ICB8fCBtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAg ICAgICAgICAgICAgY3VyLT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICBjdXItPmZyaW5nZV9iaXRtYXBfcGVy aW9kaWNfcCA9IHBlcmlvZGljX3A7CisgICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9i aXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRf ZnJpbmdlX2JpdG1hcCA9IG1jX2xlZnRfZnJpbmdlX2JpdG1hcDsKKyAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2JpdG1hcCA9IGxlZnQ7Cisg ICAgICAgICAgICAgIGlmIChtY19sZWZ0X2ZyaW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJ VE1BUCkKKyAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX2ZhY2VfaWQgPSBtY19sZWZ0 X2ZyaW5nZV9mYWNlX2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAg IGN1ci0+bGVmdF9mcmluZ2VfZmFjZV9pZCA9IGxlZnRfZmFjZV9pZDsKKyAgICAgICAgICAgICAg aWYgKG1jX2xlZnRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgICAgIGN1ci0+bGVmdF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICAgICAgICBl bHNlCisgICAgICAgICAgICAgICAgICBjdXItPmxlZnRfZnJpbmdlX29mZnNldCA9IGxlZnRfb2Zm c2V0OworICAgICAgICAgICAgICBpZiAobWNfcmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19G UklOR0VfQklUTUFQKQorICAgICAgICAgICAgICAgIGN1ci0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9 IG1jX3JpZ2h0X2ZyaW5nZV9iaXRtYXA7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfYml0bWFwID0gcmlnaHQ7CisgICAgICAgICAgICAg IGlmIChtY19yaWdodF9mcmluZ2VfYml0bWFwICE9IE1DX05PX0ZSSU5HRV9CSVRNQVApCisgICAg ICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IG1jX3JpZ2h0X2ZyaW5nZV9m YWNlX2lkOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGN1ci0+cmln aHRfZnJpbmdlX2ZhY2VfaWQgPSByaWdodF9mYWNlX2lkOworICAgICAgICAgICAgICBpZiAobWNf cmlnaHRfZnJpbmdlX2JpdG1hcCAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAgICAgICAgICAg ICAgIGN1ci0+cmlnaHRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICAgICAgY3VyLT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gcmlnaHRfb2Zmc2V0 OworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAocm93LT5vdmVybGF5X2Fycm93 X2JpdG1hcCA8IDApCisgICAgICAgIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXAgPSBtY19nZXRf bG9naWNhbF9mcmluZ2VfYml0bWFwICh3LCBRb3ZlcmxheV9hcnJvdywgMCwgMCk7CisgICAgICBp ZiAocm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCAhPSBjdXItPm92ZXJsYXlfYXJyb3dfYml0bWFw KQorICAgICAgICB7CisgICAgICAgICAgcmVkcmF3X3AgPSAxLCByb3ctPnJlZHJhd19mcmluZ2Vf Yml0bWFwc19wID0gMTsKKyAgICAgICAgICBpZiAoIWtlZXBfY3VycmVudF9wKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICBjdXItPnJlZHJhd19mcmluZ2VfYml0bWFwc19wID0gMTsKKyAg ICAgICAgICAgICAgY3VyLT5vdmVybGF5X2Fycm93X2JpdG1hcCA9IHJvdy0+b3ZlcmxheV9hcnJv d19iaXRtYXA7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGlmIChtY19sZWZ0X2Zy aW5nZV9iaXRtYXAgIT0gTUNfTk9fRlJJTkdFX0JJV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ZV9mYWNlc1t3aGljaF07 CisgICAgICBmYWNlX2lkID0gTklMUCAoZmFjZSkgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwg UWZyaW5nZSwgZmFsc2UpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBsb29rdXBfZGVy aXZlZF9mYWNlICh3LCBmLCBmYWNlLCBGUklOR0VfRkFDRV9JRCwgMCk7CisgICAgICBpZiAoZmFj ZV9pZCA8IDApCisgICAgICAgIGZhY2VfaWQgPSBGUklOR0VfRkFDRV9JRDsKKyAgICB9CisgIGZi ID0gZ2V0X2ZyaW5nZV9iaXRtYXBfZGF0YSAod2hpY2gpOworICBwZXJpb2QgPSBmYi0+cGVyaW9k OworICAvKiBDb252ZXJ0IHJvdyB0byBmcmFtZSBjb29yZGluYXRlcy4gICovCisgIHAueSA9IFdJ TkRPV19UT19GUkFNRV9QSVhFTF9ZICh3LCByb3ctPnkpICsgb2Zmc2V0OworICBwLndoaWNoID0g d2hpY2g7CisgIHAuYml0cyA9IGZiLT5iaXRzOworICBwLndkID0gZmItPndpZHRoOworICBwLmgg PSBmYi0+aGVpZ2h0OworICBwLmRoID0gKHBlcmlvZCA+IDAgPyAocC55ICUgcGVyaW9kKSA6IDAp OworICBwLmggLT0gcC5kaDsKKyAgLyogQWRqdXN0IHkgdG8gdGhlIG9mZnNldCBpbiB0aGUgcm93 IHRvIHN0YXJ0IGRyYXdpbmcgdGhlIGJpdG1hcC4gICovCisgIHN3aXRjaCAoZmItPmFsaWduKQor ICAgIHsKKyAgICBjYXNlIEFMSUdOX0JJVE1BUF9DRU5URVI6CisgICAgICBwLnkgKz0gKHJvdy0+ aGVpZ2h0IC0gcC5oKSAvIDI7CisgICAgICBicmVhazsKKyAgICBjYXNlIEFMSUdOX0JJVE1BUF9C T1RUT006CisgICAgICBwLnkgKz0gKHJvdy0+dmlzaWJsZV9oZWlnaHQgLSBwLmgpOworICAgICAg YnJlYWs7CisgICAgY2FzZSBBTElHTl9CSVRNQVBfVE9QOgorICAgICAgYnJlYWs7CisgICAgfQor ICBwLmZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGZhY2VfaWQpOworICBpZiAocC5mYWNlID09IE5V TEwpCisgICAgeworICAgICAgLyogVGhpcyBjb3VsZCBoYXBwZW4gYWZ0ZXIgY2xlYXJpbmcgZmFj ZSBjYWNoZS4KKyAgICAgIEJ1dCBpdCBzaG91bGRuJ3QgaGFwcGVuIGFueW1vcmUuICArK2tmcyAq LworICAgICAgcmV0dXJuOworICAgIH0KKyAgcHJlcGFyZV9mYWNlX2Zvcl9kaXNwbGF5IChmLCBw LmZhY2UpOworICAvKiBDbGVhciBsZWZ0IGZyaW5nZSBpZiBubyBiaXRtYXAgdG8gZHJhdyBvciBp ZiBiaXRtYXAgZG9lc24ndCBmaWxsCisgICAgIHRoZSBmcmluZ2UuICAqLworICBwLmJ4ID0gLTE7 CisgIGhlYWRlcl9saW5lX2hlaWdodCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOwor ICBwLmJ5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIG1heCAoaGVhZGVyX2xpbmVfaGVp Z2h0LCByb3ctPnkpKTsKKyAgcC5ueSA9IHJvdy0+dmlzaWJsZV9oZWlnaHQ7CisgIGlmIChsZWZ0 X3ApCisgICAgeworICAgICAgaW50IHdkID0gV0lORE9XX0xFRlRfRlJJTkdFX1dJRFRIICh3KTsK KyAgICAgIGludCB4ID0gd2luZG93X2JveF9sZWZ0ICh3LCAoV0lORE9XX0hBU19GUklOR0VTX09V VFNJREVfTUFSR0lOUyAodykKKyAgICAgICAgICAgPyBMRUZUX01BUkdJTl9BUkVBCisgICAgICAg ICAgIDogVEVYVF9BUkVBKSk7CisgICAgICBpZiAocC53ZCA+IHdkKQorICAgICAgICBwLndkID0g d2Q7CisgICAgICBwLnggPSB4IC0gcC53ZCAtICh3ZCAtIHAud2QpIC8gMjsKKyAgICAgIGlmIChw LndkIDwgd2QgfHwgcC55ID4gcC5ieSB8fCBwLnkgKyBwLmggPCBwLmJ5ICsgcC5ueSkKKyAgICAg ICAgeworICAgICAgICAgIC8qIElmIFcgaGFzIGEgdmVydGljYWwgYm9yZGVyIHRvIGl0cyBsZWZ0 LCBkb24ndCBkcmF3IG92ZXIgaXQuICAqLworICAgICAgICAgIHdkIC09ICgoIVdJTkRPV19MRUZU TU9TVF9QICh3KQorICAgICAgICAgICAgLyogVGhpcyBjb3VsZCBiZSB3cm9uZyB3aGVuIHdlIGFs bG93IHdpbmRvdyBsb2NhbAorICAgICAgICAgICAgICAgcmlnaHQgZGl2aWRlcnMgLSBidXQgdGhl IHdpbmRvdyBvbiB0aGUgbGVmdCBpcyBoYXJkCisgICAgICAgICAgICAgICB0byBnZXQuICAqLwor ICAgICAgICAgICAgJiYgIUZSQU1FX1JJR0hUX0RJVklERVJfV0lEVEggKGYpCisgICAgICAgICAg ICAmJiAhV0lORE9XX0hBU19WRVJUSUNBTF9TQ1JPTExfQkFSICh3KQorICAgICAgICAgICAgLyog QnV0IGRvbid0IHJlZHVjZSB0aGUgZnJpbmdlIHdpZHRoIGlmIHRoZSB3aW5kb3cKKyAgICAgICAg ICAgICAgIGhhcyBhIGxlZnQgbWFyZ2luLCBiZWNhdXNlIHRoYXQgbWVhbnMgd2UgYXJlIG5vdAor ICAgICAgICAgICAgICAgaW4gZGFuZ2VyIG9mIGRyYXdpbmcgb3ZlciB0aGUgdmVydGljYWwgYm9y ZGVyLAorICAgICAgICAgICAgICAgYW5kIE9UT0ggbGVhdmluZyBvdXQgdGhhdCBvbmUgcGl4ZWwg bGVhdmVzIGJlaGluZAorICAgICAgICAgICAgICAgdHJhY2VzIG9mIHRoZSBjdXJzb3IsIGlmIGl0 IHdhcyBpbiBjb2x1bW4gemVybworICAgICAgICAgICAgICAgYmVmb3JlIGRyYXdpbmcgbm9uLWVt cHR5IG1hcmdpbiBhcmVhLiAgKi8KKyAgICAgICAgICAgICYmIHctPmxlZnRfbWFyZ2luX2NvbHMg PT0gMCkKKyAgICAgICAgICAgPyAxIDogMCk7CisgICAgICAgICAgcC5ieCA9IHggLSB3ZDsKKyAg ICAgICAgICBwLm54ID0gd2Q7CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UKKyAgICB7CisgICAg ICBpbnQgeCA9IHdpbmRvd19ib3hfcmlnaHQgKHcsCisgICAgICAgIChXSU5ET1dfSEFTX0ZSSU5H RVNfT1VUU0lERV9NQVJHSU5TICh3KQorICAgICAgICAgPyBSSUdIVF9NQVJHSU5fQVJFQQorICAg ICAgICAgOiBURVhUX0FSRUEpKTsKKyAgICAgIGludCB3ZCA9IFdJTkRPV19SSUdIVF9GUklOR0Vf V0lEVEggKHcpOworICAgICAgaWYgKHAud2QgPiB3ZCkKKyAgICAgICAgcC53ZCA9IHdkOworICAg ICAgcC54ID0geCArICh3ZCAtIHAud2QpIC8gMjsKKyAgICAgIC8qIENsZWFyIHJpZ2h0IGZyaW5n ZSBpZiBubyBiaXRtYXAgdG8gZHJhdyBvZiBpZiBiaXRtYXAgZG9lc24ndCBmaWxsCisgICB0aGUg ZnJpbmdlLiAgKi8KKyAgICAgIGlmIChwLndkIDwgd2QgfHwgcC55ID4gcC5ieSB8fCBwLnkgKyBw LmggPCBwLmJ5ICsgcC5ueSkKKyAgICAgICAgeworICAgICAgICAgIHAuYnggPSB4OworICAgICAg ICAgIHAubnggPSB3ZDsKKyAgICAgICAgfQorICAgIH0KKyAgaWYgKHAueCA+PSBXSU5ET1dfQk9Y X0xFRlRfRURHRV9YICh3KQorICAgICAgJiYgKHAueCArIHAud2QpIDw9IFdJTkRPV19CT1hfTEVG VF9FREdFX1ggKHcpICsgV0lORE9XX1BJWEVMX1dJRFRIICh3KSkKKyAgICBGUkFNRV9SSUYgKGYp LT5kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywgJnApOworfQorCit2b2lkCittY19kcmF3X2Zy aW5nZV9iaXRtYXAgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50 IGxlZnRfcCwgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSkKK3sKKyAgaW50IG92ZXJs YXkgPSAwOworICBpZiAobGVmdF9wID09IHJvdy0+cmV2ZXJzZWRfcCAmJiByb3ctPmN1cnNvcl9p bl9mcmluZ2VfcCkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCBjdXJzb3IgPSBRbmlsOworICAg ICAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICAgICAgeworICAgICAgICBjYXNlIE1DX0ZSQU1F RF9CT1g6CisgICAgICAgICAgaWYgKHJvdy0+dmlzaWJsZV9oZWlnaHQgPj0gU1RBTkRBUkRfQklU TUFQX0hFSUdIVCAoaG9sbG93X3JlY3RhbmdsZV9iaXRzKSkKKyAgICAgICAgICAgIGN1cnNvciA9 IFFob2xsb3c7CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgY3Vyc29yID0gUWhvbGxvd19z bWFsbDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAg ICAgICAgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0ID49IFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQg KGhvbGxvd19yZWN0YW5nbGVfYml0cykpCisgICAgICAgICAgICBjdXJzb3IgPSBRaG9sbG93Owor ICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGN1cnNvciA9IFFob2xsb3dfc21hbGw7CisgICAg ICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAgICAgICBjdXJz b3IgPSBRYm94OworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAg ICAgICBjdXJzb3IgPSBRYmFyOworICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE1DX0hC QVI6CisgICAgICAgICAgY3Vyc29yID0gUWhiYXI7CisgICAgICAgICAgYnJlYWs7CisgICAgICAg IGNhc2UgTUNfTk9fRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19OT19DVVJTT1I6Cisg ICAgICAgIGNhc2UgTUNfUklHSFRfRlJJTkdFX0JJVE1BUDoKKyAgICAgICAgY2FzZSBNQ19MRUZU X0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgdy0+cGh5c19jdXJz b3Jfb25fcCA9IDA7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3AgPSAwOworICAg ICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKGN1cnNvcikpCisgICAg ICAgIHsKKyAgICAgICAgICBpbnQgYm0gPSBtY19nZXRfbG9naWNhbF9jdXJzb3JfYml0bWFwICh3 LCBjdXJzb3IpOworICAgICAgICAgIGlmIChibSAhPSBNQ19OT19GUklOR0VfQklUTUFQKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXBfMSAodywgcm93 LCBsZWZ0X3AsIDIsIGJtKTsKKyAgICAgICAgICAgICAgb3ZlcmxheSA9IEVRIChjdXJzb3IsIFFi b3gpID8gMyA6IDE7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIG1jX2RyYXdf ZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIGxlZnRfcCwgb3ZlcmxheSwgTUNfTk9fRlJJTkdFX0JJ VE1BUCk7CisgIGlmIChsZWZ0X3AgJiYgcm93LT5vdmVybGF5X2Fycm93X2JpdG1hcCAhPSBNQ19O T19GUklOR0VfQklUTUFQKQorICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcF8xICh3LCByb3csIDEs IDEsIHJvdy0+b3ZlcmxheV9hcnJvd19iaXRtYXApOworfQorCisvKiBlbmQgTVVMVElQTEUtQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogI2RlZmluZSBOT19GUklOR0Vf QklUTUFQIDAKICNkZWZpbmUgVU5ERUZfRlJJTkdFX0JJVE1BUCAxCiAjZGVmaW5lIE1BWF9TVEFO REFSRF9GUklOR0VfQklUTUFQUyBBUlJBWUVMVFMgKHN0YW5kYXJkX2JpdG1hcHMpCkBAIC0xNjk5 LDYgKzMyMTcsMTY4IEBAIFJldHVybiBuaWwgaWYgUE9TIGlzIG5vdCB2aXNpYmxlIGluIFdJTkRP Vy4gICovKQogdm9pZAogc3ltc19vZl9mcmluZ2UgKHZvaWQpCiB7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgLyogKGdldCAn ZW1wdHktbGluZSAnZnJpbmdlKSA9PiAyMyA9PiB0aGUgbGFzdCBzdGFuZGFyZC1iaXRtYXAgYmVm b3JlIHRoaXMgb25lLgorICBTZWUgYGZyaW5nZS5lbGAuICovCisKKyAgLyogMjQgKi8KKyAgREVG U1lNIChRbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93LCAiKy12ZXJ0aWNhbC1iYXItcmlnaHQt YXJyb3ciKTsKKyAgVmZyaW5nZV9iaXRtYXBzID0gRmNvbnMgKFFtY192ZXJ0aWNhbF9iYXJfcmln aHRfYXJyb3csIFZmcmluZ2VfYml0bWFwcyk7CisgIEZwdXQgKFFtY192ZXJ0aWNhbF9iYXJfcmln aHRfYXJyb3csIFFmcmluZ2UsIG1ha2VfZml4bnVtICgyNCkpOworICAvKiAoZ2V0ICcrLXZlcnRp Y2FsLWJhci1yaWdodC1hcnJvdyAnZnJpbmdlKSA9PiAyNCAqLworCisgIC8qIDI1ICovCisgIERF RlNZTSAoUW1jX3JldmVyc2VkX3ZlcnR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CkBAIC02 NjMsNiArNjYzLDE2IEBAIHR5cGVkZWYgaWQgaW5zdGFuY2V0eXBlOwogCiBAaW50ZXJmYWNlIEVt YWNzU2Nyb2xsZXIgOiBOU1Njcm9sbGVyCiAgIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIE5TUmVjdCBtY19yZWN0YW5nbGU7CisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgIHN0cnVjdCB3aW5kb3cgKndpbmRvdzsK ICAgIHN0cnVjdCBmcmFtZSAqZnJhbWU7CiAgICBOU1Jlc3BvbmRlciAqcHJldlJlc3BvbmRlcjsK QEAgLTY4Myw2ICs2OTMsMTggQEAgdHlwZWRlZiBpZCBpbnN0YW5jZXR5cGU7CiAgICBpbnQgZW1f d2hvbGU7CiAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKy0gKHZvaWQpbWNfc2V0X3JlY3RhbmdsZTogKE5TUmVjdClyZWN0OworLSAo TlNSZWN0KW1jX2dldF9yZWN0YW5nbGU7CistIChzdHJ1Y3Qgd2luZG93ICopbWNfZ2V0X3dpbmRv dzsKKy0gKGJvb2wpbWNfanVkZ2U7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC0g KGluc3RhbmNldHlwZSkgaW5pdEZyYW1lOiAoTlNSZWN0IClyIHdpbmRvdzogKExpc3BfT2JqZWN0 KXdpbjsKIC0gKHZvaW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ZXJzZV9jYWNoZV9wIChzLT53LT5tY19tYXRyaXgsIGNhY2hlX3R5cGUsIHZudGgsIG50aCk7 CisgICAgICAgICAgICsrbnRoKQorICAgICAgICB7CisgICAgICAgICAgLy8gIGludCB4ID0gcy0+ dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAg ICAgIGludCBmeCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVd W250aF0uZng7CisgICAgICAgICAgLy8gIGludCB5ID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS55OworICAgICAgICAgIGludCBmeSA9IHMtPnctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZnk7CisgICAgICAgICAg aW50IGhwb3MgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmhwb3M7CisgICAgICAgICAgaW50IHZwb3MgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnZwb3M7CisgICAgICAgICAgaW50IHdkID0gcy0+dy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS53ZDsKKyAgICAgICAg ICBpbnQgaCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uaDsKKyAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gcy0+dy0+ bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5jdXJzb3JfdHlwZTsK KyAgICAgICAgICAvLyAgaW50IGN1cnNvcl93aWR0aCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3Zu dGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uY3Vyc29yX3dpZHRoOworICAgICAgICAgIHN0cnVj dCBtY19SR0IgbHNsX2ZnID0gey5yZWQgPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNo ZVtjYWNoZV90eXBlXVtudGhdLmZnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAuZ3JlZW4gPSBzLT53LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmZnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVl ID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5i bHVlfTsKKyAgICAgICAgICAvLyAgc3RydWN0IG1jX1JHQiBsc2xfYmcgPSB7LnJlZCA9IHMtPnct Pm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcucmVkLAorICAg ICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuZ3JlZW4gPSBzLT53LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLmdyZWVuLAorICAgICAgICAg IC8vICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHMtPnctPm1jX21hdHJpeC52cG9z W3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uYmcuYmx1ZX07CisgICAgICAgICAgYm9vbCBh Y3RpdmVfcCA9IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250 aF0uYWN0aXZlX3A7CisgICAgICAgICAgLy8gIGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9 IHMtPnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGhf Zmxhdm9yOworICAgICAgICAgIGJvb2wgZW5hYmxlZF9wID0gcy0+dy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3A7CisgICAgICAgICAgYm9vbCBn b19wID0gKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zID09IGN1 cnNvcl9nbHlwaC0+aHBvcworICAgICAgICAgICAgICAgICAgICAgICAmJiBlbmFibGVkX3ApOwor ICAgICAgICAgIGlmICghZ29fcCkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIE5T UmVjdCByOworICAgICAgICAgIHIub3JpZ2luLnggPSBmeDsKKyAgICAgICAgICByLm9yaWdpbi55 ID0gZnk7CisgICAgICAgICAgci5zaXplLmhlaWdodCA9IGg7CisgICAgICAgICAgci5zaXplLndp ZHRoID0gd2Q7CisgICAgICAgICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxz bF9mZy5yZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVlbjogbHNs X2ZnLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IGxz bF9mZy5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEu MF0gc2V0XTsKKyAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAg ICB7CisgICAgICAgICAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHMtPnctPmNvbnRlbnRz KTsKKyAgICAgICAgICBib29sIHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAoVnRyYW5zaWVudF9t YXJrX21vZGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAg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HJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAg ICAgJiYgYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hh cnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgZW51 bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlX2lkID0gbG9va3VwX25hbWVk X2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1hdC1yZWdpb24t cHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxv d19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBob2xsb3dfYWN0 aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgTlNDb2xvciAqaG9sbG93 X2FjdGl2ZV9yZWdpb25fZW5kX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZB Q0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2ZhY2UpLCBzLT5mKTsKKyAg ICAgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfY29s b3I7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZSBpZiAocmVnaW9uX2FjdGl2 ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA+IHJlZ2lvbl9iZWcKKyAgICAgICAgICAg ICAgICAgICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zIDwgcmVnaW9uX2VuZCkKKyAgICAg ICAgIC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faWQpOworICAgICAgICAgICAgICAg ICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29s b3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2ZV9mYWNlKSwgcy0+Zik7CisgICAg ICAgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVfY29sb3I7CisgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisg ICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+Ziwg aW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUp OworICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFj ZSA9IEZBQ0VfRlJPTV9JRCAocy0+ZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAg ICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19pbmFjdGl2ZV9jb2xvciA9IG5zX2xvb2t1 cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhvbGxvd19pbmFjdGl2ZV9mYWNl KSwgcy0+Zik7CisgICAgICAgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2lu YWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAg ZWxzZSBpZiAoZmFjZSAmJiBOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpID09IG5zX2luZGV4X2Nv bG9yIChGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpLCBzLT5mKSkKKyAgICAgICAgICB7CisgICAg ICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFj ZSksIHMtPmYpIHNldF07CisgICAgICAgICAgICBob2xsb3dfY29sb3IgPSBGUkFNRV9DVVJTT1Jf Q09MT1IgKHMtPmYpOworICAgICAgICAgIH0KKyAgICAgICAgICBzd2l0Y2ggKGN1cnNvcl90eXBl KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6 CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNfTk9fQ1VSU09S OgorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX1JJR0hUX0ZS SU5HRV9CSVRNQVA6CisgICAgICAgICAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0VfQklUTUFQOgor ICAgICAgICAgICAgICBjYXNlIE1DX0ZJTExFRF9CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0 RmlsbCAocik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIGNhc2UgTUNf RlJBTUVEX0JPWDoKKyAgICAgICAgICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAg ICAgICBbaG9sbG93X2NvbG9yIHNldF07CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAoTlNJ bnNldFJlY3QgKHIsIDEsIDEpKTsKKyAgICAgICAgICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9S IChzLT5mKSBzZXRdOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNl IE1DX0hPTExPV19CT1g6CisgICAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAg ICAgICAgICAgW2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwg KE5TSW5zZXRSZWN0IChyLCAxLCAxKSk7CisgICAgICAgICAgICAgICAgW0ZSQU1FX0NVUlNPUl9D T0xPUiAocy0+Zikgc2V0XTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAg Y2FzZSBNQ19IQkFSOgorICAgICAgICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICAg ICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBjYXNlIE1DX0JBUjoKKyAgICAgICAgICAgICAg ICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0K KyAgICAgICAgICAvKiBJZiBhIGdseXBoIGV4aXN0cyAocy0+Y2hhcjJiICE9IE5VTEwpLCB0aGVu IGRyYXcgdGhlIGdseXBoIG9uIHRvcCBvZiB0aGUKKyAgICAgICAgICBuZXdseSBkcmF3biByZWN0 YW5nbGUgdGhhdCB3YXMgY3JlYXRlZCBoZXJlaW5hYm92ZS4gIFRvIHRoZSBleHRlbnQgdGhhdCB3 ZQorICAgICAgICAgIHdhbnQgdG8gZG91YmxlLWltcHJpbnQgZ2x5cGhzIHRvIG1ha2UgdGhlbSBh cHBlYXIgdG8gYmUgc2VtaS1ib2xkLCBpdCBjYW4KKyAgICAgICAgICBiZSBkb25lIGhlcmUgZm9y IGFsbCBjdXJzb3IgdHlwZXMuICBUaGUgYm94LXN0eWxlIGN1cnNvcnMgYXJlIGltcHJpbnRlZAor ICAgICAgICAgIHdpdGggZ2x5cGhzIG9ubHkgb25lICgxKSB0aW1lLiAgVGhlIHNlbWktYm9sZCBh cHBlYXJhbmNlIGlzIGhlbHBmdWwgd2hlbgorICAgICAgICAgIGRlYnVnZ2luZyB0byBzZWUgdGhh dCB0aGUgY29vcmRpbmF0ZXMgYXJlIGNvcnJlY3QuICovCisgICAgICAgICAgaWYgKHMtPmNoYXIy YiAhPSBOVUxMCisgICAgICAgICAgICAgICYmIChjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9Y CisgICAgICAgICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YCisgICAg ICAgICAgICAgICAgICB8fCBjdXJzb3JfdHlwZSA9PSBNQ19IT0xMT1dfQk9YKSkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgQk9PTCBpc0NvbXBvc2l0ZSA9IHMtPmZpcnN0X2dseXBoLT50 eXBlID09IENPTVBPU0lURV9HTFlQSDsKKyAgICAgICAgICAgICAgaWYgKGlzQ29tcG9zaXRlKQor ICAgICAgICAgICAgICAgIG5zX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5k IChzKTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICB7CisgICAgICAg ICAgICAgICAgICAgIHN0cnVjdCBmb250ICpmb250ID0gcy0+ZmFjZS0+Zm9udDsKKyAgICAgICAg ICAgICAgICAgICAgaWYgKCFmb250KQorICAgICAgICAgICAgICAgICAgICAgIGZvbnQgPSBGUkFN RV9GT05UIChzLT5mKTsKKyAgICAgICAgICAgICAgICAgICAgYm9vbCB3aXRoX2JnX3AgPSBmYWxz ZTsKKyAgICAgICAgICAgICAgICAgICAgZm9udC0+ZHJpdmVyLT5kcmF3IChzLCBzLT5jbXBfZnJv bSwgcy0+bmNoYXJzLCBzLT54LCBzLT55YmFzZSwgd2l0aF9iZ19wKTsKKyAgICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLy8gIGNsb2NrX3QgY2xv Y2tfZW5kID0gY2xvY2soKTsKKyAgLy8gIGRvdWJsZSBjcHVfdGltZV91c2VkID0gKChkb3VibGUp IChjbG9ja19lbmQgLSBjbG9ja19zdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7CisgIC8vICBmcHJp bnRmIChzdGRlcnIsICJuc19kcmF3X292ZXJ3cml0dGVuICglZCk6ICBU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ICAgIGVudW0gZmFjZV9pZCBmYWNlX2lkID0g bG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistYmFyLXByZS16di1mYWNlIiksIHRy dWUpOworICAgICBzdHJ1Y3QgZmFjZSAqZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgZmFjZV9pZCk7 CisgICAgIE5TQ29sb3IgKmNvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0Vf Rk9SRUdST1VORCAoZmFjZSksIGYpOworICAtICBFWEFNUExFIE9GIEhPVyBUTyBQUklOVCBBIENP TE9SIFRPIFNUREVSUjoKKyAgICAgTGlzcF9PYmplY3QgZm9yZWdyb3VuZCA9IGZhY2UtPmxmYWNl W0xGQUNFX0ZPUkVHUk9VTkRfSU5ERVhdOworICAgICBMaXNwX09iamVjdCBiYWNrZ3JvdW5kID0g ZmFjZS0+bGZhY2VbTEZBQ0VfQkFDS0dST1VORF9JTkRFWF07CisgICAgIGZwcmludGYgKHN0ZGVy ciwgIlxuZm9yZWdyb3VuZCAoJXMpIHwgYmFja2dyb3VuZCAoJXMpXG4iLAorICAgICAgICAgICAg ICAgICAgICAgICghTklMUCAoZm9yZWdyb3VuZCkgPyBTU0RBVEEgKGZvcmVncm91bmQpIDogIk5J TFAiKSwKKyAgICAgICAgICAgICAgICAgICAgICAoIU5JTFAgKGJhY2tncm91bmQpID8gU1NEQVRB IChiYWNrZ3JvdW5kKSA6ICJOSUxQIikpOworICAtICBFWEFNUExFIE9GIEhPVyBUTyBDUkVBVEUg QSBDT0xPUiBXSVRIIFJHQi9MU0wgZmxvYXQgdmFsdWVzOgorICAgICBOU0NvbG9yICpteV9jb2xv ciA9IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IDEuMAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IDEuMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsdWU6IDEuMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEu MF07CisgIC0gIEFMVEVSTkFUSVZFIEVYQU1QTEU6CisgICAgIGVudW0gZmFjZV9pZCBkZWJ1Z2dp bmdfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlIChzLT53LCBzLT5mLCBpbnRlcm4gKCIrLWRl YnVnZ2luZy1mYWNlIiksIHRydWUpOworICAgICBzdHJ1Y3QgZmFjZSAqZGVidWdnaW5nX2ZhY2Ug PSBGQUNFX0ZST01fSUQgKHMtPmYsIGRlYnVnZ2luZ19mYWNlX2lkKTsKKyAgICAgTlNDb2xvciAq Y29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChkZWJ1 Z2dpbmdfZmFjZSksIHMtPmYpOworICAgICBbY29sb3Igc2V0XTsgKi8KKyAgaWYgKGdseXBoX2Zs YXZvciA9PSBNQ19HTFlQSAorICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBITEVTUykK KyAgICBbW05TQ29sb3IgY29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogbHNsLnJlZAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGdyZWVuOiBsc2wuZ3JlZW4KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgYmx1ZTogbHNsLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBhbHBoYTogMS4wXSBzZXRdOworICAgIGVsc2UKKyAgICAgIFtGUkFNRV9DVVJTT1JfQ09M T1IgKGYpIHNldF07CisgIGlmIChjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgIHsK KyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgICAgICBi b29sIH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ICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAo cmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAg IHsKKyAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFj ZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJz b3ItYXQtcmVnaW9uLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgc3RydWN0IGZh Y2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xs b3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7CisgICAgICAgICAgICBOU0NvbG9yICpob2xs b3dfYWN0aXZlX3JlZ2lvbl9lbmRfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNf RkFDRV9CQUNLR1JPVU5EIChob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZSksIGYpOworICAg ICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fZW5kX2NvbG9yOwor ICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAg ICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl9nbHlw aC0+Y2hhcnBvcyA+IHJlZ2lvbl9iZWcKKyAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3JfZ2x5 cGgtPmNoYXJwb3MgPCByZWdpb25fZW5kKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBl bnVtIGZhY2VfaWQgaG9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E5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2Fj dGl2ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2Fj dGl2ZV9jb2xvcjsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAvKiBUaGUgcmVnaW9u IGlzIF9ub3RfIHZpc2libGUgaW4gdGhlIGluYWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRoZSBvdmVy bGF5IHdpbmRvdyBwcm9wZXJ0eSBpcyB1c2VkLiAqLworICAgICAgICAgICAgICBlbHNlIGlmICgh YWN0aXZlX3ApCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgZW51bSBmYWNl X2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGlu dGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKTsK KyAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9IEZB Q0VfRlJPTV9JRCAoZiwgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAg ICAgTlNDb2xvciAqaG9sbG93X2luYWN0aXZlX2NvbG9yID0gbnNfbG9va3VwX2luZGV4ZWRfY29s b3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2luYWN0aXZlX2ZhY2UpLCBmKTsKKyAgICAg ICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19pbmFjdGl2ZV9jb2xvcjsKKyAgICAg ICAgICAgICAgICB9CisgICAgfQorICAgIGVsc2UgaWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JP VU5EIChmYWNlKSA9PSBuc19pbmRleF9jb2xvciAoRlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikp CisgICAgICB7CisgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JF R1JPVU5EIChmYWNlKSwgZikgc2V0XTsKKyAgICAgICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VS U09SX0NPTE9SIChmKTsKKyAgICAgIH0KKyNpZmRlZiBOU19JTVBMX0NPQ09BCisgIE5TRGlzYWJs ZVNjcmVlblVwZGF0ZXMgKCk7CisjZW5kaWYKKyAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICB7 CisgICAgICBjYXNlIE1DX05PX0ZSSU5HRV9CSVRNQVA6CisgICAgICAgIGJyZWFrOworICAgICAg Y2FzZSBNQ19OT19DVVJTT1I6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19SSUdIVF9G UklOR0VfQklUTUFQOgorICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfTEVGVF9GUklOR0Vf QklUTUFQOgorICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgTUNfRklMTEVEX0JPWDoKKyAgICAg ICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBNQ19GUkFNRURf Qk9YOgorICAgICAgICBOU1JlY3RGaWxsIChyKTsKKyAgICAgICAgW2hvbGxvd19jb2xvciBzZXRd OworICAgICAgICBOU1JlY3RGaWxsIChOU0luc2V0UmVjdCAociwgMSwgMSkpOworICAgICAgICBb RlJBTUVfQ1VSU09SX0NPTE9SIChmKSBzZXRdOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2Ug TUNfSE9MTE9XX0JPWDoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgIFtob2xsb3df Y29sb3Igc2V0XTsKKyAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNldFJlY3QgKHIsIDEsIDEpKTsK KyAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAoZikgc2V0XTsKKyAgICAgICAgYnJlYWs7Cisg ICAgICBjYXNlIE1DX0hCQVI6CisgICAgICAgIE5TUmVjdEZpbGwgKHIpOworICAgICAgICBicmVh azsKKyAgICAgIGNhc2UgTUNfQkFSOgorICAgICAgICBzID0gcjsKKyAgICAgICAgLyogQGxhd2xp c3QgaXMgZm9jdXNpbmcgdGhlIGluaXRpYWwgZGV2ZWxvcG1lbnQgb2YgZmVhdHVyZSByZXF1ZXN0 cworICAgICAgICAjMTc2ODQgYW5kICMyMjg3MyBvbiBMMlIgbGFuZ3VhZ2VzLiAqLworICAgICAg ICBpZiAoZ2x5cGhfZmxhdm9yICE9IE1DX0dMWVBICisgICAgICAgICAgICAmJiBnbHlwaF9mbGF2 b3IgIT0gTUNfR0xZUEhMRVNTKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIC8qIElmIHRoZSBj aGFyYWN0ZXIgdW5kZXIgY3Vyc29yIGlzIFIyTCwgZHJhdyB0aGUgYmFyIGN1cnNvcgorICAgICAg ICAgICAgICAgb24gdGhlIHJpZ2h0IG9mIGl0cyBnbHlwaCwgcmF0aGVyIHRoYW4gb24gdGhlIGxl ZnQuICovCisgICAgICAgICAgICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2ZWRfbGV2ZWwgJiAx KSAhPSAwKQorICAgICAgICAgICAgICBzLm9yaWdpbi54ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxf d2lkdGggLSBzLnNpemUud2lkdGg7CisgICAgICAgICAgfQorICAgICAgICBOU1JlY3RGaWxsIChz KTsKKyAgICAgICAgYnJlYWs7CisgICAgfQorICBuc19yZXNldF9jbGlwcGluZyAoZik7CisgIC8q IGRyYXcgdGhlIGNoYXJhY3RlciB1bmRlciB0aGUgY3Vyc29yICovCisgIGlmIChnbHlwaF9mbGF2 b3IgIT0gTUNfR0xZUEhMRVNTCisgICAgICAmJiAoY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JP WAorICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0ZJTExFRF9CT1g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ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBOU0NvbG9yICpk ZWZhdWx0Q29sLCBDR0Zsb2F0IHdpZHRoLCBDR0Zsb2F0IHgpCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LQorICAgRHJhdyB1bmRlcmxpbmUsIG92ZXJsaW5lLCBhbmQgc3RyaWtlLXRocm91Z2ggb24gZ2x5 cGggc3RyaW5nIHMuCisgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworeworICBpZiAocy0+Zm9yX292 ZXJsYXBzKQorICAgIHJldHVybjsKKyAgLyogRG8gdW5kZXJsaW5lLiAqLworICBpZiAoZmFjZS0+ dW5kZXJsaW5lX3ApCisgICAgeworICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV90eXBlID09 IEZBQ0VfVU5ERVJfV0FWRSkKKyAgICAgICAgeworICAgICAgICAgIGlmIChmYWNlLT51bmRlcmxp bmVfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICBbZGVmYXVsdENvbCBzZXRdOworICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICBbbnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKGZhY2UtPnVu ZGVybGluZV9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgICAgICBuc19kcmF3X3VuZGVyd2F2ZSAo cywgd2lkdGgsIHgpOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKHMtPmZhY2UtPnVuZGVy bGluZV90eXBlID09IEZBQ0VfVU5ERVJfTElORSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBO U1JlY3QgcjsKKyAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlvbjsK KyAgICAgICAgICAgIC8qIElmIHRoZSBwcmV2IHdhcyB1bmRlcmxpbmVkLCBtYXRjaCBpdHMgYXBw ZWFyYW5jZS4gKi8KKyAgICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMtPnByZXYtPmZhY2UtPnVu ZGVybGluZV9wCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+ZmFjZS0+dW5kZXJsaW5lX3R5 cGUgPT0gRkFDRV9VTkRFUl9MSU5FCisgICAgICAgICAgICAgICAgJiYgcy0+cHJldi0+dW5kZXJs aW5lX3RoaWNrbmVzcyA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICB0aGlj a25lc3MgPSBzLT5wcmV2LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgIHBv c2l0aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBz dHJ1Y3QgZm9udCAqZm9udDsKKyAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZGVzY2Vu dDsKKyAgICAgICAgICAgICAgICAgIGZvbnQ9cy0+Zm9udDsKKyAgICAgICAgICAgICAgICAgIGRl c2NlbnQgPSBzLT55ICsgcy0+aGVpZ2h0IC0gcy0+eWJhc2U7CisgICAgICAgICAgICAgICAgICAv KiBVc2UgdW5kZXJsaW5lIHRoaWNrbmVzcyBvZiBmb250LCBkZWZhdWx0aW5nIHRvIDEuICovCisg ICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAoZm9udCAmJiBmb250LT51bmRlcmxpbmVfdGhp Y2tuZXNzID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZm9udC0+dW5kZXJs aW5lX3RoaWNrbmVzcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAxOworICAgICAg ICAgICAgICAgICAgLyogRGV0ZXJtaW5lIHRoZSBvZmZzZXQgb2YgdW5kZXJsaW5pbmcgZnJvbSB0 aGUgYmFzZWxpbmUuICovCisgICAgICAgICAgICAgICAgICBpZiAoeF91bmRlcmxpbmVfYXRfZGVz Y2VudF9saW5lKQorICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGRlc2NlbnQgLSB0aGlj a25lc3M7CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHhfdXNlX3VuZGVybGluZV9wb3Np dGlvbl9wcm9wZXJ0aWVzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZvbnQgJiYg Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAgcG9z aXRpb24gPSBmb250LT51bmRlcmxpbmVfcG9zaXRpb247CisgICAgICAgICAgICAgICAgICAgICAg ZWxzZSBpZiAoZm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gbHJvdW5k IChmb250LT5kZXNjZW50IC8gMik7CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAg ICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gdW5kZXJsaW5lX21pbmltdW1fb2Zmc2V0 OworICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBtYXggKHBvc2l0aW9uLCB1bmRlcmxpbmVf bWluaW11bV9vZmZzZXQpOworICAgICAgICAgICAgICAgICAgLyogRW5zdXJlIHVuZGVybGluaW5n IGlzIG5vdCBjcm9wcGVkLiAqLworICAgICAgICAgICAgICAgICAgaWYgKGRlc2NlbnQgPD0gcG9z aXRpb24pCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICBwb3Np dGlvbiA9IGRlc2NlbnQgLSAxOworICAgICAgICAgICAgICAgICAgICAgIHRoaWNrbmVzcyA9IDE7 CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVz Y2VudCA8IHBvc2l0aW9uICsgdGhpY2tuZXNzKQorICAgICAgICAgICAgICAgICAgICAgIHRoaWNr bmVzcyA9IDE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgcy0+dW5kZXJsaW5lX3Ro aWNrbmVzcyA9IHRoaWNrbmVzczsKKyAgICAgICAgICAgIHMtPnVuZGVybGluZV9wb3NpdGlvbiA9 IHBvc2l0aW9uOworICAgICAgICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnliYXNlICsgcG9z aXRpb24sIHdpZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAgaWYgKGZhY2UtPnVuZGVybGlu ZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgW2RlZmF1bHRDb2wgc2V0XTsKKyAgICAgICAg ICAgICAgZWxzZQorICAgICAgICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoZmFj ZS0+dW5kZXJsaW5lX2NvbG9yLCBzLT5mKSBzZXRdOworICAgICAgICAgICAgTlNSZWN0RmlsbCAo cik7CisgICAgICAgICAgfQorICAgIH0KKyAgLyogRG8gb3ZlcmxpbmUuIFdlIGZvbGxvdyBvdGhl ciB0ZXJtcyBpbiB1c2luZyBhIHRoaWNrbmVzcyBvZiAxCisgICAgIGFuZCBpZ25vcmluZyBvdmVy bGluZV9tYXJnaW4uICovCisgIGlmIChmYWNlLT5vdmVybGluZV9wKQorICAgIHsKKyAgICAgIE5T UmVjdCByOworICAgICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnksIHdpZHRoLCAxKTsKKyAgICAg IGlmIChmYWNlLT5vdmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgW2RlZmF1bHRD b2wgc2V0XTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIFtuc19sb29rdXBfaW5kZXhlZF9jb2xv ciAoZmFjZS0+b3ZlcmxpbmVfY29sb3IsIHMtPmYpIHNldF07CisgICAgICBOU1JlY3RGaWxsIChy KTsKKyAgICB9CisgIC8qIERvIHN0cmlrZS10aHJvdWdoLiAgV2UgZm9sbG93IG90aGVyIHRlcm1z IGZvciB0aGlja25lc3MgYW5kCisgICAgIHZlcnRpY2FsIHBvc2l0aW9uLiovCisgIGlmIChmYWNl LT5zdHJpa2VfdGhyb3VnaF9wKQorICAgIHsKKyAgICAgIE5TUmVjdCByOworICAgICAgdW5zaWdu ZWQgbG9uZyBkeTsKKyAgICAgIGR5ID0gbHJpbnQgKChzLT5oZWlnaHQgLSAxKSAvIDIpOworICAg ICAgciA9IE5TTWFrZVJlY3QgKHgsIHMtPnkgKyBkeSwgd2lkdGgsIDEpOworICAgICAgaWYgKGZh Y2UtPnN0cmlrZV90aHJvdWdoX2NvbG9yX2RlZmF1bHRlZF9wKQorICAgICAgICBbZGVmYXVsdENv bCBzZXRdOworICAgICAgICBlbHNlCisgICAgICAgICAgW25zX2xvb2t1cF9pbmRleGVkX2NvbG9y IChmYWNlLT5zdHJpa2VfdGhyb3VnaF9jb2xvciwgcy0+Zikgc2V0XTsKKyAgICAgIE5TUmVjdEZp bGwgKHIpOworICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX2R1bXBnbHlwaHNfc3RyZXRj aCAoc3RydWN0IGdseXBoX3N0cmluZyAqcywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LAor ICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB3ZCkK K3sKKyAgTlNSZWN0IHJbMl07CisgIGludCBuLCBpOworICBzdHJ1Y3QgZmFjZSAqZmFjZTsKKyAg TlNDb2xvciAqZmdDb2wsICpiZ0NvbDsKKyAgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wKQor ICAgIHsKKyAgICAgIG4gPSBuc19nZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgcik7Cisg ICAgICAqciA9IE5TTWFrZVJlY3QgKHMtPngsIHMtPnksIHMtPmJhY2tncm91bmRfd2lkdGgsIHMt PmhlaWdodCk7CisgICAgICBpZiAoIW5zX2NsaXBfdG9fcmVjdCAocy0+ZiwgciwgbikpCisgICAg ICAgIHJldHVybjsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX01PVVNFX0ZBQ0UpCisgICAgICAg IHsKKyAgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9ITF9JTkZPIChz LT5mKS0+bW91c2VfZmFjZV9mYWNlX2lkKTsKKyAgICAgICAgICBpZiAoIWZhY2UpCisgICAgICAg ICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAg fQorICAgICAgICBlbHNlCisgICAgICAgICBmYWNlID0gRkFDRV9GUk9NX0lEIChzLT5mLCBzLT5m aXJzdF9nbHlwaC0+ZmFjZV9pZCk7CisgICAgICBiZ0NvbCA9IG5zX2xvb2t1cF9pbmRleGVkX2Nv bG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBzLT5mKTsKKyAgICAgIGZnQ29sID0gbnNf bG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfRk9SRUdST1VORCAoZmFjZSksIHMtPmYpOwor ICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkKKyAgICAgICAgeworICAgICAgICAgIGlmICgh cy0+cm93LT5mdWxsX3dpZHRoX3ApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGludCBv dmVycnVuLCBsZWZ0b3ZlcnJ1bjsKKyAgICAgICAgICAgICAgLyogdHJ1bmNhdGUgdG8gYXZvaWQg b3ZlcndyaXRpbmcgZnJpbmdlIGFuZC9vciBzY3JvbGxiYXIgKi8KKyAgICAgICAgICAgICAgb3Zl cnJ1biA9IG1heCAoMCwgKHMtPnggKyBzLT5iYWNrZ3JvdW5kX3dpZHRoKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLSAoV0lORE9XX0JPWF9SSUdIVF9FREdFX1ggKHMtPncpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIFdJTkRPV19SSUdIVF9GUklOR0VfV0lEVEgg KHMtPncpKSk7CisgICAgICAgICAgICAgICAgICAgIHJbaV0uc2l6ZS53aWR0aCAtPSBvdmVycnVu OworICAgICAgICAgICAgICAvKiB0cnVuY2F0ZSB0byBhdm9pZCBvdmVyd3JpdGluZyB0byBsZWZ0 IG9mIHRoZSB3aW5kb3cgYm94ICovCisgICAgICAgICAgICAgIGxlZnRvdmVycnVuID0gKFdJTkRP V19CT1hfTEVGVF9FREdFX1ggKHMtPncpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsg V0lORE9XX0xFRlRfRlJJTkdFX1dJRFRIIChzLT53KSkgLSBzLT54OworICAgICAgICAgICAgICBp ZiAobGVmdG92ZXJydW4gPiAwKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg IHJbaV0ub3JpZ2luLnggKz0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgICByW2ldLnNp emUud2lkdGggLT0gbGVmdG92ZXJydW47CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAvKiBYWFg6IFRyeSB0byB3b3JrIGJldHdlZW4gcHJvYmxlbSB3aGVyZSBhIHN0cmV0Y2ggZ2x5 cGggb24KKyAgICAgICAgICAgICAgICAgYSBwYXJ0aWFsbHktdmlzaWJsZSBib3R0b20gcm93IHdp bGwgY2xlYXIgcGFydCBvZiB0aGUKKyAgICAgICAgICAgICAgICAgbW9kZWxpbmUsIGFuZCBhbm90 aGVyIHdoZXJlIGxpc3QtYnVmZmVycyBoZWFkZXJzIGFuZCBzaW1pbGFyCisgICAgICAgICAgICAg ICAgIHJvd3MgZXJyb25lb3VzbHkgaGF2ZSB2aXNpYmxlX2hlaWdodCBzZXQgdG8gMC4gIE5vdCBz dXJlCisgICAgICAgICAgICAgICAgIHdoZXJlIHRoaXMgaXMgY29taW5nIGZyb20gYXMgb3RoZXIg dGVybXMgc2VlbSBub3QgdG8gc2hvdy4gKi8KKyAgICAgICAgICAgICAgcltpXS5zaXplLmhlaWdo dCA9IG1pbiAocy0+aGVpZ2h0LCBzLT5yb3ctPnZpc2libGVfaGVpZ2h0KTsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICBbYmdDb2wgc2V0XTsKKyAgICAgICAgICAvKiBOT1RFOiB1bmRlciBOUyB0 aGlzIGlzIE5PVCB1c2VkIHRvIGRyYXcgY3Vyc29ycywgYnV0IHdlIG11c3QgYXZvaWQKKyAgICAg ICAgICAgICBvdmVyd3JpdGluZyBjdXJzb3IgKHVzdWFsbHkgd2hlbiBjdXJzb3Igb24gYSB0YWIp ICovCisgICAgICAgICAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgICAgICAgICAgewor ICAgICAgICAgICAgICAvKiBGSVhNRTogIERvIHdlIHN0aWxsIG5lZWQgdG8gcHJldmVudCB0aGlz IHNlY3Rpb24gb2YgY29kZSBmcm9tCisgICAgICAgICAgICAgIGVyYXNpbmcgdGhlIGZha2UgTUNf SEJBUiB0aGF0IGV4dGVuZHMgdGhlIGVudGlyZSBsZW5ndGggb2YgdGhlCisgICAgICAgICAgICAg IFNUUkVUQ0hfR0xZUEg/ICBUaGlzIG1heSBoYXZlIGJlZW4gZG9uZSBwcmlvciB0byB0aGUgZml4 IHJlbGF0aW5nCisgICAgICAgICAgICAgIHRvIGxlZnQvcmlnaHQgb3ZlcndyaXR0ZW4gZ2x5cGhz LiAqLworICAgICAgICAgICAgICByW2ldLnNpemUuaGVpZ2h0IC09IDE7CisgICAgICAgICAgICAg IC8vICBlbnVtIGZhY2VfaWQgZGVidWdnaW5nX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAo cy0+dywgcy0+ZiwgaW50ZXJuICgiKy1kZWJ1Z2dpbmctZmFjZSIpLCB0cnVlKTsKKyAgICAgICAg ICAgICAgLy8gIHN0cnVjdCBmYWNlICpkZWJ1Z2dpbmdfZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+ ZiwgZGVidWdnaW5nX2ZhY2VfaWQpOworICAgICAgICAgICAgICAvLyAgTlNDb2xvciAqY29sb3Ig PSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChkZWJ1Z2dpbmdf ZmFjZSksIHMtPmYpOworICAgICAgICAgICAgICAvLyAgW2NvbG9yIHNldF07CisgICAgICAgICAg ICAgIENHRmxvYXQgeCA9IHJbaV0ub3JpZ2luLng7CisgICAgICAgICAgICAgIENHRmxvYXQgd2lk dGggPSB3ZDsKKyAgICAgICAgICAgICAgcltpXS5zaXplLndpZHRoIC09IHdpZHRoOworICAgICAg ICAgICAgICByW2ldLm9yaWdpbi54ICs9IHdpZHRoOworICAgICAgICAgICAgICBOU1JlY3RGaWxs IChyW2ldKTsKKyAgICAgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBj dXJzb3IuICovCisgICAgICAgICAgICAgIGlmIChzLT53LT5waHlzX2N1cnNvcl90eXBlID09IE1D X0ZJTExFRF9CT1gpCisgICAgICAgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24g KHMsIGZhY2UsIGJnQ29sLCB3aWR0aCwgeCk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgICAgICAgbWNfbnNfZHJhd190ZXh0X2RlY29yYXRpb24gKHMsIGZhY2UsIGZnQ29sLCB3 aWR0aCwgeCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAgewor ICAvLyAgaW50IHJ4ID0gcltpXS5vcmlnaW4ueDsKKyAgLy8gIGludCByeSA9IHJbaV0ub3JpZ2lu Lnk7CisgIC8vICBpbnQgcncgPSByW2ldLnNpemUud2lkdGg7CisgIC8vICBpbnQgcmggPSByW2ld LnNpemUuaGVpZ2h0OworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfbnNfZHVtcGdseXBoc19z dHJldGNoOiAgdnBvcyAoJWQpIHwgcnggKCVkKSB8IHJ5ICglZCkgfCBydyAoJWQpIHwgcmggKCVk KVxuIiwKKyAgLy8gICAgICAgICAgICAgICAgICAgcy0+Zmlyc3RfZ2x5cGgtPnZwb3MsIHJ4LCBy eSwgcncsIHJoKTsKKyAgICAgICAgICAgICAgTlNSZWN0RmlsbCAocltpXSk7CisgICAgICAgICAg ICB9CisgICAgICAgICAgLyogRHJhdyBvdmVybGluaW5nLCBldGMuIG9uIHRoZSBzdHJldGNoIGds eXBoIChvciB0aGUgcGFydAorICAgICAgICAgICAgIG9mIHRoZSBzdHJldGNoIGdseXBoIGFmdGVy IHRoZSBjdXJzb3IpLiAqLworICAgICAgICAgIG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChz LCBmYWNlLCBmZ0NvbCwgcltpXS5zaXplLndpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICByW2ldLm9yaWdpbi54KTsKKyAgICAgICAgfQorICAgICAgaWYgKChzLT5s ZWZ0X292ZXJ3cml0dGVuX3AgfHwgcy0+cmlnaHRfb3ZlcndyaXR0ZW5fcCkKKyAgICAgICAgICAm JiAocy0+YWN0aW9uX3R5cGUgPT0gTUNfRFJBV19HTFlQSF9TVFJJTkd8fCBzLT5hY3Rpb25fdHlw ZSA9PSBNQ19FUkFTRV9HTFlQSF9TVFJJTkcpKQorICAgICAgICBtY19uc19kcmF3X292ZXJ3cml0 dGVuIChzLCBtYXRyaXgsIHJvdywgcy0+Zmlyc3RfZ2x5cGgpOworICAgICAgbnNfcmVzZXRfY2xp cHBpbmcgKHMtPmYpOworICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgfQor fQorCitzdGF0aWMgdm9pZAorbWNfbnNfZHVtcGdseXBoc19pbWFnZSAoc3RydW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0ZVNv dXJjZU92ZXIKKyAgICAgICAgICAgICAgZnJhY3Rpb246IDEuMAorICAgICAgICAgICByZXNwZWN0 RmxpcHBlZDogWUVTCisgICAgICAgICAgICAgICAgaGludHM6IG5pbF07CisjZWxzZQorICAgICAg W2ltZyBjb21wb3NpdGVUb1BvaW50OiBOU01ha2VQb2ludCAoeCwgeSArIHMtPnNsaWNlLmhlaWdo dCkKKyAgICAgICAgICAgICAgICAgIG9wZXJhdGlvbjogTlNDb21wb3NpdGVTb3VyY2VPdmVyXTsK KyNlbmRpZgorICAgIH0KKyAgaWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgIHsKKyAgICAg IFtGUkFNRV9DVVJTT1JfQ09MT1IgKHMtPmYpIHNldF07CisgICAgICBpZiAocy0+dy0+cGh5c19j dXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgICB0ZENvbCA9IG5zX2xvb2t1cF9p bmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGZhY2UpLCBzLT5mKTsKKyAgICAgICAg ZWxzZQorICAgICAgICAgIC8qIEN1cnJlbnRseSBvbiBOUyBpbWctPm1hc2sgaXMgYWx3YXlzIDAu IFNpbmNlCisgICAgICAgICAgICAgZ2V0X3dpbmRvd19jdXJzb3JfdHlwZSBzcGVjaWZpZXMgYSBo b2xsb3cgYm94IGN1cnNvciB3aGVuIG9uCisgICAgICAgICAgICAgYSBub24tbWFza2VkIGltYWdl IHdlIG5ldmVyIHJlYWNoIHRoaXMgY2xhdXNlLiBCdXQgd2UgcHV0IGl0CisgICAgICAgICAgICAg aW4gaW4gYW50aWNpcGF0aW9uIG9mIGJldHRlciBzdXBwb3J0IGZvciBpbWFnZSBtYXNrcyBvbiBO Uy4gKi8KKyAgICAgICAgICB0ZENvbCA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNF X0ZPUkVHUk9VTkQgKGZhY2UpLCBzLT5mKTsKKyAgICB9CisgICAgZWxzZQorICAgICAgdGRDb2wg PSBuc19sb29rdXBfaW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgcy0+ Zik7CisgIC8qIERyYXcgdW5kZXJsaW5lLCBvdmVybGluZSwgc3RyaWtlLXRocm91Z2guICovCisg IG1jX25zX2RyYXdfdGV4dF9kZWNvcmF0aW9uIChzLCBmYWNlLCB0ZENvbCwgYnIuc2l6ZS53aWR0 aCwgYnIub3JpZ2luLngpOworICAvKiBEcmF3IHJlbGllZiwgaWYgcmVxdWVzdGVkICovCisgIGlm IChzLT5pbWctPnJlbGllZiB8fCBzLT5obCA9PURSQVdfSU1BR0VfUkFJU0VEIHx8IHMtPmhsID09 RFJBV19JTUFHRV9TVU5LRU4pCisgICAgeworICAgICAgaWYgKHMtPmhsID09IERSQVdfSU1BR0Vf U1VOS0VOIHx8IHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VEKQorICAgICAgICB7CisgICAgICAg ICAgdGggPSB0b29sX2Jhcl9idXR0b25fcmVsaWVmID49IDAgPworICAgICAgICAgICAgdG9vbF9i YXJfYnV0dG9uX3JlbGllZiA6IERFRkFVTFRfVE9PTF9CQVJfQlVUVE9OX1JFTElFRjsKKyAgICAg ICAgICByYWlzZWRfcCA9IChzLT5obCA9PSBEUkFXX0lNQUdFX1JBSVNFRCk7CisgICAgICAgIH0K KyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHRoID0gYWJzIChzLT5pbWct PnJlbGllZik7CisgICAgICAgICAgICByYWlzZWRfcCA9IChzLT5pbWctPnJlbGllZiA+IDApOwor ICAgICAgICAgIH0KKyAgICAgIHIub3JpZ2luLnggPSB4IC0gdGg7CisgICAgICByLm9yaWdpbi55 ID0geSAtIHRoOworICAgICAgci5zaXplLndpZHRoID0gcy0+c2xpY2Uud2lkdGggKyAyKnRoLTE7 CisgICAgICByLnNpemUuaGVpZ2h0ID0gcy0+c2xpY2UuaGVpZ2h0ICsgMip0aC0xOworICAgICAg bnNfZHJhd19yZWxpZWYgKHIsIHRoLCByYWlzZWRfcCwKKyAgICAgICAgICAgICAgICAgICAgICBz LT5zbGljZS55ID09IDAsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueSArIHMtPnNs aWNlLmhlaWdodCA9PSBzLT5pbWctPmhlaWdodCwKKyAgICAgICAgICAgICAgICAgICAgICBzLT5z bGljZS54ID09IDAsCisgICAgICAgICAgICAgICAgICAgICAgcy0+c2xpY2UueCArIHMtPnNsaWNl LndpZHRoID09IHMtPmltZy0+d2lkdGgsIHMpOworICAgIH0KKyAgLyogSWYgdGhlcmUgaXMgbm8g bWFzaywgdGhlIGJhY2tncm91bmQgd29uJ3QgYmUgc2VlbiwKKyAgICAgc28gZHJhdyBhIHJlY3Rh bmdsZSBvbiB0aGUgaW1hZ2UgZm9yIHRoZSBjdXJzb3IuCisgICAgIERvIHRoaXMgZm9yIGFsbCBp bWFnZXMsIGdldHRpbmcgdHJhbnNwYXJlbmN5IHJpZ2h0IGlzIG5vdCByZWxpYWJsZS4gKi8KKyAg aWYgKHMtPmhsID09IERSQVdfQ1VSU09SKQorICAgIHsKKyAgICAgIGludCB0aGlja25lc3MgPSBh YnMgKHMtPmltZy0+cmVsaWVmKTsKKyAgICAgIGlmICh0aGlja25lc3MgPT0gMCkgdGhpY2tuZXNz ID0gMTsKKyAgICBpZiAoZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgIHx8IGdseXBo X2ZsYXZvciA9PSBNQ19HTFlQSExFU1MpCisgICAgICB7CisgICAgICAgIE5TQ29sb3IgKmJvcmRl cl9jb2xvciA9IFtOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IGxzbC5yZWQKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmVl bjogbHNsLmdyZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGJsdWU6IGxzbC5ibHVlCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGE6IDEuMF07CisgICAgICAgIG5z X2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBib3JkZXJfY29sb3IsIDEsIDEpOworICAgICAgfQor ICAgICAgZWxzZQorICAgICAgICBuc19kcmF3X2JveCAoYnIsIHRoaWNrbmVzcywgRlJBTUVfQ1VS U09SX0NPTE9SIChzLT5mKSwgMSwgMSk7CisgICAgfQorfQorCitzdGF0aWMgdm9pZAorbWNfbnNf bWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBjaGFy IGZvcmNlX3ApCit7CisgIE5TVFJBQ0UgKCJtY19uc19tYXliZV9kdW1wZ2x5cGhzX2JhY2tncm91 bmQiKTsKKyAgaWYgKCFzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wLyogfHwgcy0+aGwgPT0gRFJBV19N T1VTRV9GQUNFKi8pCisgICAgeworICAgICAgaW50IGJveF9saW5lX3dpZHRoID0gbWF4IChzLT5m YWNlLT5ib3hfbGluZV93aWR0aCwgMCk7CisgICAgICBpZiAoRk9OVF9IRUlHSFQgKHMtPmZvbnQp IDwgcy0+aGVpZ2h0IC0gMiAqIGJveF9saW5lX3dpZHRoCisgICAgICAgICAgLyogV2hlbiB4ZGlz cC5jIGlnbm9yZXMgRk9OVF9IRUlHSFQsIHdlIGNhbm5vdCB0cnVzdCBmb250CisgICAgICAgICAg ICAgZGltZW5zaW9ucywgc2luY2UgdGhlIGFjdHVhbCBnbHlwaHMgbWlnaHQgYmUgbXVjaAorICAg ICAgICAgICAgIHNtYWxsZXIuICBTbyBpbiB0aGF0IGNhc2Ugd2UgYWx3YXlzIGNsZWFyIHRoZSBy ZWN0YW5nbGUKKyAgICAgICAgICAgICB3aXRoIGJhY2tncm91bmQgY29sb3IuICovCisgICAgICAg ICAgfHwgRk9OVF9UT09fSElHSCAocy0+Zm9udCkKKyAgICAgICAgICB8fCBzLT5mb250X25vdF9m b3VuZF9wIHx8IHMtPmV4dGVuZHNfdG9fZW5kX29mX2xpbmVfcCB8fCBmb3JjZV9wKQorICAgICAg ICB7CisgICAgICAgICAgc3RydWN0IGZhY2UgKmZhY2U7CisgICAgICAgICAgaWYgKHMtPmhsID09 IERSQVdfTU9VU0VfRkFDRSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZmFjZSA9IEZB Q0VfRlJPTV9JRCAocy0+ZiwgTU9VU0VfSExfSU5GTyAocy0+ZiktPm1vdXNlX2ZhY2VfZmFjZV9p ZCk7CisgICAgICAgICAgICAgIGlmICghZmFjZSkKKyAgICAgICAgICAgICAgICBmYWNlID0gRkFD RV9GUk9NX0lEIChzLT5mLCBNT1VTRV9GQUNFX0lEKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgZmFjZSA9IEZBQ0VfRlJPTV9JRCAocy0+Ziwgcy0+Zmly c3RfZ2x5cGgtPmZhY2VfaWQpOworICAgICAgICAgIGlmICghZmFjZS0+c3RpcHBsZSkKKyAgICAg ICAgICAgIFsoTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSAhPSAwCisgICAgICAgICAgICAgID8g bnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoZmFjZSksIHMtPmYp CisgICAgICAgICAgICAgIDogRlJBTUVfQkFDS0dST1VORF9DT0xPUiAocy0+ZikpIHNldF07Cisg ICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3Qg bnNfZGlzcGxheV9pbmZvICpkcHlpbmZvID0gRlJBTUVfRElTUExBWV9JTkZPIChzLT5mKTsKKyAg ICAgICAgICAgICAgICBbW2RweWluZm8tPmJpdG1hcHNbZmFjZS0+c3RpcHBsZS0xXS5pbWcgc3Rp cHBsZU1hc2tdIHNldF07CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICBpZiAocy0+aGwgIT0g RFJBV19DVVJTT1IpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPnJlY3RhbmdsZV9u dWtlZF9wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgTlNSZWN0IHIgPSBOU01ha2VSZWN0IChzLT54 LCBzLT55ICsgYm94X2xpbmVfd2lkdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBzLT5iYWNrZ3JvdW5kX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgcy0+aGVpZ2h0LTIqYm94X2xpbmVfd2lkdGgpOworICAgICAgICAgICAgICBOU1JlY3RG aWxsIChyKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9w ID0gMTsKKyAgICAgICAgfQorICAgIH0KK30KKworc3RhdGljIHZvaWQKK21jX25zX2RyYXdfZ2x5 cGhfc3RyaW5nIChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpzLCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICpt YXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICBz dHJ1Y3QgbWNfUkdCIGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAgICAg ICAgICAgICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsCisgICAgICAg ICAgICAgICAgICAgICAgICAgaW50IHdkLCBib29sIGFjdGl2ZV9wLCBib29sIGN1cnNvcl9nY19w KQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0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cmVjdCAo cy0+ZiwgciwgbikpCisgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICAgICAg bWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLT5uZXh0LCAxKTsKKyAgICAgICAg ICAgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIG1jX25zX2R1bXBnbHlwaHNfc3RyZXRjaCAo cy0+bmV4dCwgbWF0cml4LCByb3csIHdkKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9 IDA7CisgICAgICAgICAgfQorICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMgJiYgcy0+ZmFj ZS0+Ym94ICE9IEZBQ0VfTk9fQk9YCisgICAgICAmJiAocy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0g Q0hBUl9HTFlQSAorICAgICAgICAgIHx8IHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lU RV9HTFlQSCkpCisgICAgeworICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0 IChzLCByKTsKKyAgICAgIGlmICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAg ICAgcmV0dXJuOworICAgICAgbWNfbnNfbWF5YmVfZHVtcGdseXBoc19iYWNrZ3JvdW5kIChzLCAx KTsKKyAgICAgIG5zX2R1bXBnbHlwaHNfYm94X29yX3JlbGllZiAocyk7CisgICAgICBuc19yZXNl dF9jbGlwcGluZyAocy0+Zik7CisgICAgICBib3hfZHJhd25fcCA9IDE7CisgICAgfQorICBzd2l0 Y2ggKHMtPmZpcnN0X2dseXBoLT50eXBlKQorICAgIHsKKyAgICBjYXNlIElNQUdFX0dMWVBIOgor ICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlm ICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAg bWNfbnNfZHVtcGdseXBoc19pbWFnZSAocywgclswXSwgbHNsLCBnbHlwaF9mbGF2b3IsIGN1cnNv cl90eXBlLCBhY3RpdmVfcCk7CisgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CisgICAg ICBicmVhazsKKyAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CisgICAgICBtY19uc19kdW1wZ2x5cGhz X3N0cmV0Y2ggKHMsIG1hdHJpeCwgcm93LCB3ZCk7CisgICAgICBicmVhazsKKyAgICBjYXNlIENI QVJfR0xZUEg6CisgICAgY2FzZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICBuID0gbnNfZ2V0X2ds eXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsIHIpOworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3Qg KHMtPmYsIHIsIG4pKQorICAgICAgICByZXR1cm47CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBz CisgICAgICAgICAgfHwgKHMtPmNtcF9mcm9tID4gMAorICAgICAgICAgICAgICAmJiAhIHMtPmZp cnN0X2dseXBoLT51LmNtcC5hdXRvbWF0aWMpKQorICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxl ZF9wID0gMTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIG1jX25zX21heWJlX2R1bXBnbHlwaHNf YmFja2dyb3VuZCAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKTsK KyAgICAgIGludCBmbGFncyA9IChzLT5obCA9PSBEUkFXX0NVUlNPUikKKyAgICAgICAgICAgICAg ICAgICAgPyBOU19EVU1QR0xZUEhfQ1VSU09SCisgICAgICAgICAgICAgICAgICA6IChzLT5obCA9 PSBEUkFXX01PVVNFX0ZBQ0UpCisgICAgICAgICAgICAgICAgICAgID8gTlNfRFVNUEdMWVBIX01P VVNFRkFDRQorICAgICAgICAgICAgICAgICAgOiAocy0+Zm9yX292ZXJsYXBzKQorICAgICAgICAg ICAgICAgICAgICA/IE5TX0RVTVBHTFlQSF9GT1JFR1JPVU5ECisgICAgICAgICAgICAgICAgICA6 IE5TX0RVTVBHTFlQSF9OT1JNQUw7CisgICAgICB1bnNpZ25lZCBsb25nIHNhdmVkX2ZnID0gTlNf RkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKTsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNP UiAmJiBjdXJzb3JfdHlwZSA9PSBNQ19GSUxMRURfQk9YKQorICAgICAgICB7CisgICAgICAgICAg dW5zaWduZWQgbG9uZyB0bXAgPSBOU19GQUNFX0JBQ0tHUk9VTkQgKHMtPmZhY2UpOworICAgICAg ICAgIE5TX0ZBQ0VfQkFDS0dST1VORCAocy0+ZmFjZSkgPSBOU19GQUNFX0ZPUkVHUk9VTkQgKHMt PmZhY2UpOworICAgICAgICAgIE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSB0bXA7Cisg ICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IKKyAgICAgICAg ICAgICAgICAgJiYgY3Vyc29yX3R5cGUgPT0gTUNfRlJBTUVEX0JPWAorICAgICAgICAgICAgICAg ICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9s bG93X2FjdGl2ZV9mYWNlX2lkID0KKyAgICAgICAgICAgICAgbG9va3VwX25hbWVkX2ZhY2UgKHMt PncsIHMtPmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVl KTsKKyAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZS T01fSUQgKHMtPmYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICBOU19GQUNF X0ZPUkVHUk9VTkQgKHMtPmZhY2UpID0gTlNfRkFDRV9GT1JFR1JPVU5EIChob2xsb3dfYWN0aXZl X2ZhY2UpOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0NV UlNPUgorICAgICAgICAgICAgICAgICAgICYmIGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gK KyAgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0KKyAgICAgICAgICAg ICAgICBsb29rdXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJuICgiKy1yZWFsLWZha2Ut Y3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICBzdHJ1 Y3QgZmFjZSAqaG9sbG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxv d19pbmFjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChz LT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VORCAoaG9sbG93X2luYWN0aXZlX2ZhY2UpOworICAg ICAgICAgICAgfQorICAgICAgaWYgKHMtPmZpcnN0X2dseXBoLT50eXBlID09IENPTVBPU0lURV9H TFlQSCkKKyAgICAgICAgbnNfZHJhd19jb21wb3NpdGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQg KHMpOworICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCB3aXRoX2Jn X3AgPSAoKGZsYWdzID09IE5TX0RVTVBHTFlQSF9OT1JNQUwgJiYgIXMtPmJhY2tncm91bmRfZmls bGVkX3ApCisgICAgICAgICAgIC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ZUEhf U1RSSU5HKSkKKyAgICAgICAgbWNfbnNfZHJhd19vdmVyd3JpdHRlbiAocywgbWF0cml4LCByb3cs IHMtPmZpcnN0X2dseXBoKTsKKyAgICAgIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAg ICAgICYmIGN1cnNvcl90eXBlID09IE1DX0ZJTExFRF9CT1gpCisgICAgICAgIHsKKyAgICAgICAg ICB1bnNpZ25lZCBsb25nIHRtcCA9IE5TX0ZBQ0VfQkFDS0dST1VORCAocy0+ZmFjZSk7CisgICAg ICAgICAgTlNfRkFDRV9CQUNLR1JPVU5EIChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VORCAo cy0+ZmFjZSk7CisgICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9IHRtcDsK KyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAg ICAgICAgICAgICAmJiBjdXJzb3JfdHlwZSA9PSBNQ19GUkFNRURfQk9YKQorICAgICAgICAgIE5T X0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSBzYXZlZF9mZzsKKyAgICAgIG5zX3Jlc2V0X2Ns aXBwaW5nIChzLT5mKTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgor ICAgICAgbiA9IG5zX2dldF9nbHlwaF9zdHJpbmdfY2xpcF9yZWN0IChzLCByKTsKKyAgICAgIGlm ICghbnNfY2xpcF90b19yZWN0IChzLT5mLCByLCBuKSkKKyAgICAgICAgcmV0dXJuOworICAgICAg aWYgKHMtPmZvcl9vdmVybGFwcworICAgICAgICAgIHx8IChzLT5jbXBfZnJvbSA+IDAKKyAgICAg ICAgICAgICAgJiYgISBzLT5maXJzdF9nbHlwaC0+dS5jbXAuYXV0b21hdGljKSkKKyAgICAgICAg cy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IDE7CisgICAgICBlbHNlCisgICAgICAgIG1jX25zX21h eWJlX2R1bXBnbHlwaHNfYmFja2dyb3VuZCAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09N UE9TSVRFX0dMWVBIKTsKKyAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChzLT5mKTsKKyAgICAgIGJy ZWFrOworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgICB9CisgIC8qIERy YXcgYm94IGlmIG5vdCBkb25lIGFscmVhZHkuICovCisgIGlmICghcy0+Zm9yX292ZXJsYXBzCisg ICAgICAmJiAhYm94X2RyYXduX3AKKyAgICAgICYmIHMtPmZhY2UtPmJveCAhPSBGQUNFX05PX0JP WCkKKyAgICB7CisgICAgICBuID0gbnNfZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsIHIp OworICAgICAgaWYgKCFuc19jbGlwX3RvX3JlY3QgKHMtPmYsIHIsIG4pKQorICAgICAgICByZXR1 cm47CisgICAgICBuc19kdW1wZ2x5cGhzX2JveF9vcl9yZWxpZWYgKHMpOworICAgICAgbnNfcmVz ZXRfY2xpcHBpbmcgKHMtPmYpOworICAgIH0KKyAgcy0+bnVtX2NsaXBzID0gMDsKK30KKworLyog ZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8q ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09CiAKICAgIE5TVFJBQ0UsIFRyYWNlIHN1cHBvcnQuCkBAIC0xMDc5 LDYgKzIwNDgsMTYgQEAgc3RhdGljIE5TUmVjdCBjb25zdHJhaW5fZnJhbWVfcmVjdChOU1JlY3Qg ZnJhbWVSZWN0LCBib29sIGlzRnVsbHNjcmVlbikKICAgIGV4dGVybmFsIChSSUYpIGNhbGw7IHdo b2xlIGZyYW1lLCBjYWxsZWQgYmVmb3JlIGd1aV91cGRhdGVfd2luZG93X2JlZ2luCiAgICAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLSAqLwogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisKKwogI2lmZGVmIE5TX0lNUExfQ09DT0EKICAgRW1hY3NWaWV3 ICp2aWV3ID0gRlJBTUVfTlNfVklFVyAoZik7CiAKQEAgLTExMDksNiArMjA4OCwxNiBAQCBzdGF0 aWMgTlNSZWN0IGNvbnN0cmFpbl9mcmFtZV9yZWN0KE5TUmVjdCBmcmFtZVJlY3QsIGJvb2wgaXNG dWxsc2NyZWVuKQogCiAvKiAgIGlmIChmID09IE1PVVNFX0hMX0lORk8gKGYpLT5tb3VzZV9mYWNl X21vdXNlX2ZyYW1lKSAqLwogICBNT1VTRV9ITF9JTkZPIChmKS0+bW91c2VfZmFjZV9kZWZlciA9 IDA7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICov CisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBOVUxMOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiB9CiAKIApAQCAtNDc1OSw2ICs1NzQ4LDE3IEBAIGluIGNlcnRhaW4gc2l0dWF0 aW9ucyAocmFwaWQgaW5jb21pbmcgZXZlbnRzKS4KICAgICAgIGJhciA9IFtbRW1hY3NTY3JvbGxl ciBhbGxvY10gaW5pdEZyYW1lOiByIHdpbmRvdzogd2luXTsKICAgICAgIHdzZXRfdmVydGljYWxf c2Nyb2xsX2JhciAod2luZG93LCBtYWtlX21pbnRfcHRyIChiYXIpKTsKICAgICAgIHVwZGF0ZV9w ID0gWUVTOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09S UyAqLworCisgICAgICAvKiBUaGlzIGlzIG9ubHkgZm9yIGRlYnVnZ2luZyBwdXJwb3Nlcy4gKi8K KyAgICAgIFtiYXIgbWNfc2V0X3JlY3RhbmdsZTogcl07CisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgICB9CiAgIGVsc2UKICAgICB7CkBAIC00NzY2LDEyICs1NzY2LDMwIEBAIGlu IGNlcnRhaW4gc2l0dWF0aW9ucyAocmFwaWQgaW5jb21pbmcgZXZlbnRzKS4KICAgICAgIGJhciA9 IFhOU19TQ1JPTExfQkFSICh3aW5kb3ctPnZlcnRpY2FsX3Njcm9sbF9iYXIpOwogICAgICAgb2xk UmVjdCA9IFtiYXIgZnJhbWVdOwogICAgICAgci5zaXplLndpZHRoID0gb2xkUmVjdC5zaXplLndp ZHRoOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCiAgICAgICBpZiAoRlJBTUVfTElWRV9QIChmKSAmJiAhTlNFcXVhbFJlY3RzIChvbGRSZWN0 LCByKSkKICAgICAgICAgeworICAgICAgICAgIC8qIFRoZSBtYWluIHdpbmRvdyBoYXMgcHJvYmFi bHkgYmVlbiByZXNpemVkLiAgR3JhY2lvdXNseSBkZWxldGUgdGhlCisgICAgICAgICAgb2xkIHNj cm9sbCBiYXIgd2l0aG91dCByZXBhaW50aW5nIGl0cyByZWN0YW5nbGU7IGFuZCwgY3JlYXRlIGEg bmV3CisgICAgICAgICAgc2Nyb2xsIGJhciBlbHNld2hlcmUuKi8KICAgICAgICAgICBpZiAob2xk UmVjdC5vcmlnaW4ueCAhPSByLm9yaWdpbi54KQorICAgICAgICAgICAgewogICAgICAgICAgICAg ICBuc19jbGVhcl9mcmFtZV9hcmVhIChmLCBsZWZ0LCB0b3AsIHdpZHRoLCBoZWlnaHQpOworICAg ICAgICAgICAgICBbYmFyIG1jX2p1ZGdlXTsKKyAgICAgICAgICAgICAgYmFyID0gW1tFbWFjc1Nj cm9sbGVyIGFsbG9jXSBpbml0RnJhbWU6IHIgd2luZG93OiB3aW5dOworICAgICAgICAgICAgICB3 c2V0X3ZlcnRpY2FsX3Njcm9sbF9iYXIgKHdpbmRvdywgbWFrZV9taW50X3B0ciAoYmFyKSk7Cisg ICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgW2JhciBzZXRGcmFtZTog cl07CiAgICAgICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgIH0KIAog ICBpZiAodXBkYXRlX3ApCkBAIC00OTMxLDkgKzU5NDksNTcgQEAgaW4gY2VydGFpbiBzaXR1YXRp b25zIChyYXBpZCBpbmNvbWluZyBldmVudHMpLgogICAgIHsKICAgICAgIHZpZXcgPSBbc3Vidmll d3Mgb2JqZWN0QXRJbmRleDogaV07CiAgICAgICBpZiAoIVt2aWV3IGlzS2luZE9mQ2xhc3M6IFtF bWFjc1Njcm9sbGVyIGNsYXNzXV0pIGNvbnRpbnVlOwotICAgICAgaWYgKFt2aWV3IGp1ZGdlXSkK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICAvKiBgWFNFVFdJTkRPVycgd2lsbCBzb21ldGltZXMgY2F1c2UgRW1hY3MgdG8gY3Jhc2ggd2hl biBydW5uaW5nIHVuZGVyIGdkYiBldmVuCisgIHRob3VnaCAodyAhPSBOVUxMKS4gIFRoZXJlZm9y ZSwgd2UgY2Fubm90IHJlbGlhYmx5IHVzZSBgV0lORE9XX0xJVkVfUCcuICovCisgIHN0cnVjdCB3 aW5kb3cgKncgPSBbdmlldyBtY19nZXRfd2luZG93XTsKKyAgaWYgKHcgIT0gTlVMTAorICAgICAg JiYgTklMUCAody0+Y29udGVudHMpKQorICAgIHsKKyAgICAgIEJPT0wgZGVidWdfcCA9IGZhbHNl OworICAgICAgaWYgKGRlYnVnX3AKKyAgICAgICAgICAvKiBgd2luZG93X2JveCcgY2FsbHMgYHdp bmRvd19ib3hfaGVpZ2h0Jywgd2hpY2ggd2lsbCBjYXVzZSBFbWFjcyB0bworICAgICAgICAgIGNy YXNoIGlmIEZSQU1FUCAody0+ZnJhbWUpIGlzIG5vdCBzYXRpc2ZpZWQuICovCisgICAgICAgICAg JiYgRlJBTUVQICh3LT5mcmFtZSkpCisgICAgICAgIHsKKyAgICAgICAgICBOU1JlY3QgcjAgPSBb dmlldyBtY19nZXRfcmVjdGFuZ2xlXTsKKyAgICAgICAgICBpbnQgeDAgPSBOU01pblggKHIwKTsK KyAgICAgICAgICBpbnQgeTAgPSBOU01pblkgKHIwKTsKKyAgICAgICAgICBpbnQgd2QwID0gTlNX aWR0aCAocjApOworICAgICAgICAgIGludCBoMCA9IE5TSGVpZ2h0IChyMCk7CisgICAgICAgICAg aW50IHdpbmRvd195LCB3aW5kb3dfaGVpZ2h0OworICAgICAgICAgIHdpbmRvd19ib3ggKHcsIEFO WV9BUkVBLCAwLCAmd2luZG93X3ksIDAsICZ3aW5kb3dfaGVpZ2h0KTsKKyAgICAgICAgICBpbnQg dG9wID0gd2luZG93X3k7CisgICAgICAgICAgaW50IGhlaWdodCA9IHdpbmRvd19oZWlnaHQ7Cisg ICAgICAgICAgaW50IHdpZHRoID0gV0lORE9XX0NPTkZJR19TQ1JPTExfQkFSX0NPTFMgKHcpICog RlJBTUVfQ09MVU1OX1dJRFRIIChmKTsKKyAgICAgICAgICBpbnQgbGVmdCA9IFdJTkRPV19TQ1JP TExfQkFSX0FSRUFfWCAodyk7CisgICAgICAgICAgTlNSZWN0IHIxID0gTlNNYWtlUmVjdCAobGVm dCwgdG9wLCB3aWR0aCwgaGVpZ2h0KTsKKyAgICAgICAgICAvKiBUaGUgcGFyZW50IHZpZXcgaXMg ZmxpcHBlZCwgc28gd2UgbmVlZCB0byBmbGlwIHkgdmFsdWUuICovCisgICAgICAgICAgRW1hY3NW aWV3ICpmcmFtZV92aWV3ID0gRlJBTUVfTlNfVklFVyAoZik7CisgICAgICAgICAgTlNSZWN0IHYg PSBbZnJhbWVfdmlldyBmcmFtZV07CisgICAgICAgICAgcjEub3JpZ2luLnkgPSAodi5zaXplLmhl aWdodCAtIHIxLnNpemUuaGVpZ2h0IC0gcjEub3JpZ2luLnkpOworICAgICAgICAgIGludCB4MSA9 IE5TTWluWCAocjEpOworICAgICAgICAgIGludCB5MSA9IE5TTWluWSAocjEpOworICAgICAgICAg IGludCB3ZDEgPSBOU1dpZHRoIChyMSk7CisgICAgICAgICAgaW50IGgxID0gTlNIZWlnaHQgKHIx KTsKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIlcyAtLSBERUFEOlxuXAorICAgICAgICAg IHgwL3gxICglZC8lZCkgfCB5MC95MSAoJWQvJWQpIHwgd2QwL3dkMSAoJWQvJWQpIHwgaDAvaDEg KCVkLyVkKVxuIiwKKyAgICAgICAgICBtY193aW5kb3cgKHcpLCB4MCwgeDEsIHkwLCB5MSwgd2Qw LCB3ZDEsIGgwLCBoMSk7CisgICAgICAgIH0KKyAgICAgIGlmIChbdmlldyBtY19qdWRnZV0pCiAg ICAgICAgIHJlbW92ZWQgPSBZRVM7CiAgICAgfQorICAgIGVsc2UgaWYgKFt2aWV3IGp1ZGdlXSkK KyAgICAgIHJlbW92ZWQgPSBZRVM7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKKyAg ICB9CiAKICAgaWYgKHJlbW92ZWQpCiAgICAgW2V2aWV3IHVwZGF0ZUZyYW1lU2l6ZTogTk9dOwpA QCAtNTA3NCw2ICs2MTQwLDIwIEBAIHN0YXRpYyBMaXNwX09iamVjdCBuc19zdHJpbmdfdG9fbGlz cG1vZCAoY29uc3QgY2hhciAqcykKIGV4dGVybiBmcmFtZV9wYXJtX2hhbmRsZXIgbnNfZnJhbWVf cGFybV9oYW5kbGVyc1tdOwogc3RhdGljIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNlIG5zX3Jl ZGlzcGxheV9pbnRlcmZhY2UgPQogeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUtQ1VSU09SUyAqLworCisvKiBgcmVkaXNwbGF5X2ludGVyZmFjZScgaW4gYG5zdGVy bS5tYCBtdXN0IGJlIGluIHRoZSBleGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9p bnRlcmZhY2UnIGluIGBkaXNwZXh0ZXJuLmhgISAqLworCisgIG1jX25zX2RyYXdfd2luZG93X2N1 cnNvciwKKyAgbWNfbnNfZHJhd19nbHlwaF9zdHJpbmcsCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworCisKICAgbnNfZnJhbWVfcGFybV9oYW5kbGVycywKICAgZ3VpX3Byb2R1Y2VfZ2x5cGhz LAogICBndWlfd3JpdGVfZ2x5cGhzLApAQCAtODcxMSw2ICs5NzkxLDQ5IEBAIC0gKEJPT0wpY2Fu QmVjb21lTWFpbldpbmRvdwogCiBAaW1wbGVtZW50YXRpb24gRW1hY3NTY3JvbGxlcgogCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCistICh2b2lk KW1jX3NldF9yZWN0YW5nbGU6IChOU1JlY3QpcmVjdAoreworICBtY19yZWN0YW5nbGUgPSByZWN0 OworfQorCistIChOU1JlY3QpbWNfZ2V0X3JlY3RhbmdsZQoreworICByZXR1cm4gbWNfcmVjdGFu Z2xlOworfQorCistIChzdHJ1Y3Qgd2luZG93ICopbWNfZ2V0X3dpbmRvdworeworICByZXR1cm4g d2luZG93OworfQorCistIChib29sKW1jX2p1ZGdlCit7CisgIE5TVFJBQ0UgKCJbRW1hY3NTY3Jv bGxlciBtY19qdWRnZV0iKTsKKyAgYm9vbCByZXQgPSBjb25kZW1uZWQ7CisgIGJsb2NrX2lucHV0 ICgpOworICBpZiAoY29uZGVtbmVkKQorICAgIHsKKyAgICAgIC8qIGVuc3VyZSBvdGhlciBzY3Jv bGxiYXIgdXBkYXRlcyBhZnRlciBkZWxldGlvbiAqLworICAgICAgRW1hY3NWaWV3ICp2aWV3ID0g KEVtYWNzVmlldyAqKUZSQU1FX05TX1ZJRVcgKGZyYW1lKTsKKyAgICAgIGlmICh2aWV3ICE9IG5p bCkKKyAgICAgICAgdmlldy0+c2Nyb2xsYmFyc05lZWRpbmdVcGRhdGUrKzsKKyAgICB9CisgIGlm ICh3aW5kb3cpCisgICAgd3NldF92ZXJ0aWNhbF9zY3JvbGxfYmFyICh3aW5kb3csIFFuaWwpOwor ICB3aW5kb3cgPSAwOworICBbc2VsZiByZW1vdmVGcm9tU3VwZXJ2aWV3V2l0aG91dE5lZWRpbmdE aXNwbGF5XTsKKyAgW3NlbGYgcmVsZWFzZV07CisgIHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVy biByZXQ7Cit9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIC8qIGZvciByZXBlYXQg YnV0dG9uIHB1c2ggKi8KICNkZWZpbmUgU0NST0xMX0JBUl9GSVJTVF9ERUxBWSAwLjUKICNkZWZp bmUgU0NST0xMX0JBUl9DT05USU5VT1VTX0RFTEFZICgxLjAgLyAxNSkKZGlmZiAtLWdpdCBhL3Ny Yy93MzJ0ZXJtLmMgYi9zcmMvdzMydGVybS5jCmluZGV4IGM2ZTE3NWUuLmNkOTYzOGMgMTAwNjQ0 Ci0tLSBhL3NyYy93MzJ0ZXJtLmMKKysrIGIvc3JjL3czMnRlcm0uYwpAQCAtNjIsNiArNjIsMTE2 NSBAQCBhbG9uZyB3aXRoIEdOVSBFbWFjcy4gIElmIG5vdCwgc2VlIDxodHRwczovL3d3dy5nbnUu b3JnL2xpY2Vuc2VzLz4uICAqLwogI2luY2x1ZGUgImJpdG1hcHMvZ3JheS54Ym0iCiAjZW5kaWYK IAwKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFLUNVUlNP UlMgKi8KKwordHlwZWRlZiBzdHJ1Y3QgeworICB1bnNpZ25lZCBsb25nIHBpeGVsOworICB1bnNp Z25lZCBzaG9ydCByZWQsIGdyZWVuLCBibHVlOworICBja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VnF1aXRfZmxhZyA9IFFuaWw7CisgIGlmIChFUSAoZmxhZywgUWtpbGxfZW1hY3MpKQor ICAgIEZraWxsX2VtYWNzIChRbmlsKTsKKyAgaWYgKEVRIChWdGhyb3dfb25faW5wdXQsIGZsYWcp KQorICAgIEZ0aHJvdyAoVnRocm93X29uX2lucHV0LCBRdCk7CisgIEZzaWduYWwgKFFxdWl0LCBR bmlsKTsKK30KKworI2RlZmluZSBNQ19RVUlUCQkJCQkJXAorICBkbyB7CQkJCQkJCVwKKyAgICBp ZiAoIU5JTFAgKFZxdWl0X2ZsYWcpICYmIE5JTFAgKFZpbmhpYml0X3F1aXQpKQlcCisgICAgICBt Y19wcm9jZXNzX3F1aXRfZmxhZyAoKTsJCQkJXAorICAgIGVsc2UgaWYgKHBlbmRpbmdfc2lnbmFs cykJCQkJXAorICAgICAgcHJvY2Vzc19wZW5kaW5nX3NpZ25hbHMgKCk7CQkJXAorICB9IHdoaWxl IChmYWxzZSkKKworc3RhdGljIExpc3BfT2JqZWN0CittY193MzJfY29sb3JfbWFwX2xvb2t1cCAo Y29uc3QgY2hhciAqY29sb3JuYW1lKQoreworICBMaXNwX09iamVjdCB0YWlsLCByZXQgPSBRbmls OworICBibG9ja19pbnB1dCAoKTsKKyAgZm9yICh0YWlsID0gVnczMl9jb2xvcl9tYXA7IENPTlNQ ICh0YWlsKTsgdGFpbCA9IFhDRFIgKHRhaWwpKQorICAgIHsKKyAgICAgIHJlZ2lzdGVyIExpc3Bf T2JqZWN0IGVsdCwgdGVtOworICAgICAgZWx0ID0gWENBUiAodGFpbCk7CisgICAgICBpZiAoIUNP TlNQIChlbHQpKSBjb250aW51ZTsKKyAgICAgIHRlbSA9IFhDQVIgKGVsdCk7CisgICAgICBpZiAo bHN0cmNtcGkgKFNTREFUQSAodGVtKSwgY29sb3JuYW1lKSA9PSAwKQorICAgICAgICB7CisgICAg ICAgICAgcmV0ID0gRmNkciAoZWx0KTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAg ICAgTUNfUVVJVDsKKyAgICB9CisgIHVuYmxvY2tfaW5wdXQgKCk7CisgIHJldHVybiByZXQ7Cit9 CisKK3N0YXRpYyBMaXNwX09iamVjdAorbWNfeF90b193MzJfY29sb3IgKGNvbnN0IGNoYXIgKiBj b2xvcm5hbWUpCit7CisgIHJlZ2lzdGVyIExpc3BfT2JqZWN0IHJldCA9IFFuaWw7CisgIGJsb2Nr X2lucHV0ICgpOworICBpZiAoY29sb3JuYW1lWzBdID09ICcjJykKKyAgICB7CisgICAgICAvKiBD b3VsZCBiZSBhbiBvbGQtc3R5bGUgUkdCIERldmljZSBzcGVjaWZpY2F0aW9uLiAqLworICAgICAg aW50IHNpemUgPSBzdHJsZW4gKGNvbG9ybmFtZSArIDEpOworICAgICAgY2hhciAqY29sb3IgPSBh bGxvY2EgKHNpemUgKyAxKTsKKyAgICAgIHN0cmNweSAoY29sb3IsIGNvbG9ybmFtZSArIDEpOwor ICAgICAgaWYgKHNpemUgPT0gMyB8fCBzaXplID09IDYgfHwgc2l6ZSA9PSA5IHx8IHNpemUgPT0g MTIpCisgICAgICAgIHsKKyAgICAgICAgICBVSU5UIGNvbG9ydmFsOworICAgICAgICAgIGludCBp LCBwb3M7CisgICAgICAgICAgcG9zID0gMDsKKyAgICAgICAgICBzaXplIC89IDM7CisgICAgICAg ICAgY29sb3J2YWwgPSAwOworICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCAzOyBpKyspCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIGNoYXIgKmVuZDsKKyAgICAgICAgICAgICAgY2hhciB0 OworICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHZhbHVlOworICAgICAgICAgICAgICAvKiBU aGUgY2hlY2sgZm9yICd4JyBpbiB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbmFsIHRha2VzIGludG8K KyAgICAgICAgICAgICAgYWNjb3VudCB0aGUgZmFjdCB0aGF0IHN0cnRvbCBhbGxvd3MgYSAiMHgi IGluIGZyb250IG9mCisgICAgICAgICAgICAgIG91ciBudW1iZXJzLCBhbmQgd2UgZG9uJ3QuICov CisgICAgICAgICAgICAgIGlmICghaXN4ZGlnaXQgKGNvbG9yWzBdKSB8fCBjb2xvclsxXSA9PSAn eCcpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHQgPSBjb2xvcltzaXpl XTsKKyAgICAgICAgICAgICAgY29sb3Jbc2l6ZV0gPSAnXDAnOworICAgICAgICAgICAgICB2YWx1 ZSA9IHN0cnRvdWwgKGNvbG9yLCAmZW5kLCAxNik7CisgICAgICAgICAgICAgIGNvbG9yW3NpemVd ID0gdDsKKyAgICAgICAgICAgICAgaWYgKGVycm5vID09IEVSQU5HRSB8fCBlbmQgLSBjb2xvciAh PSBzaXplKQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICBzd2l0Y2ggKHNp emUpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGNhc2UgMToKKyAgICAgICAg ICAgICAgICAgIHZhbHVlID0gdmFsdWUgKiAweDEwOworICAgICAgICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICAgICAgY2FzZSAzOgorICAgICAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDsKKyAg ICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNDoKKyAgICAgICAg ICAgICAgICAgIHZhbHVlIC89IDB4MTAwOworICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICBjb2xvcnZhbCB8PSAodmFsdWUgPDwgcG9zKTsK KyAgICAgICAgICAgICAgcG9zICs9IDB4ODsKKyAgICAgICAgICAgICAgaWYgKGkgPT0gMikKKyAg ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAg ICAgICAgICAgICAgICAgWFNFVElOVCAocmV0LCBjb2xvcnZhbCk7CisgICAgICAgICAgICAgICAg ICByZXR1cm4gcmV0OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgY29sb3IgPSBl bmQ7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIGVsc2UgaWYgKHN0cm5pY21w IChjb2xvcm5hbWUsICJyZ2I6IiwgNCkgPT0gMCkKKyAgICB7CisgICAgICBjb25zdCBjaGFyICpj b2xvcjsKKyAgICAgIFVJTlQgY29sb3J2YWw7CisgICAgICBpbnQgaSwgcG9zOworICAgICAgcG9z ID0gMDsKKyAgICAgIGNvbG9ydmFsID0gMDsKKyAgICAgIGNvbG9yID0gY29sb3JuYW1lICsgNDsK KyAgICAgIGZvciAoaSA9IDA7IGkgPCAzOyBpKyspCisgICAgICAgIHsKKyAgICAgICAgICBjaGFy ICplbmQ7CisgICAgICAgICAgdW5zaWduZWQgbG9uZyB2YWx1ZTsKKyAgICAgICAgICAvKiBUaGUg Y2hlY2sgZm9yICd4JyBpbiB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbmFsIHRha2VzIGludG8KKyAg ICAgICAgICAgICBhY2NvdW50IHRoZSBmYWN0IHRoYXQgc3RydG9sIGFsbG93cyBhICIweCIgaW4g ZnJvbnQgb2YKKyAgICAgICAgICAgICBvdXIgbnVtYmVycywgYW5kIHdlIGRvbid0LiAqLworICAg ICAgICAgIGlmICghaXN4ZGlnaXQgKGNvbG9yWzBdKSB8fCBjb2xvclsxXSA9PSAneCcpCisgICAg ICAgICAgICBicmVhazsKKyAgICAgICAgICB2YWx1ZSA9IHN0cnRvdWwgKGNvbG9yLCAmZW5kLCAx Nik7CisgICAgICAgICAgaWYgKGVycm5vID09IEVSQU5HRSkKKyAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgIHN3aXRjaCAoZW5kIC0gY29sb3IpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICBjYXNlIDE6CisgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUgKiAweDEwICsgdmFsdWU7Cisg ICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgICAgdmFsdWUgLz0gMHgxMDsK KyAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAg IHZhbHVlIC89IDB4MTAwOworICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1 bHQ6CisgICAgICAgICAgICAgIHZhbHVlID0gVUxPTkdfTUFYOworICAgICAgICAgICAgfQorICAg ICAgICAgIGlmICh2YWx1ZSA9PSBVTE9OR19NQVgpCisgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICBjb2xvcnZhbCB8PSAodmFsdWUgPDwgcG9zKTsKKyAgICAgICAgICBwb3MgKz0gMHg4Owor ICAgICAgICAgIGlmIChpID09IDIpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmICgq ZW5kICE9ICdcMCcpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHVuYmxv Y2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIFhTRVRJTlQgKHJldCwgY29sb3J2YWwpOworICAg ICAgICAgICAgICByZXR1cm4gcmV0OworICAgICAgICAgICAgfQorICAgICAgICAgIGlmICgqZW5k ICE9ICcvJykKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIGNvbG9yID0gZW5kICsgMTsK KyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlIGlmIChzdHJuaWNtcCAoY29sb3JuYW1lLCAicmdi aToiLCA1KSA9PSAwKQorICAgICAgeworICAgICAgICAvKiBUaGlzIGlzIGFuIFJHQiBJbnRlbnNp dHkgc3BlY2lmaWNhdGlvbi4gKi8KKyAgICAgICAgY29uc3QgY2hhciAqY29sb3I7CisgICAgICAg IFVJTlQgY29sb3J2YWw7CisgICAgICAgIGludCBpLCBwb3M7CisgICAgICAgIHBvcyA9IDA7Cisg ICAgICAgIGNvbG9ydmFsID0gMDsKKyAgICAgICAgY29sb3IgPSBjb2xvcm5hbWUgKyA1OworICAg ICAgICBmb3IgKGkgPSAwOyBpIDwgMzsgaSsrKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIGNo YXIgKmVuZDsKKyAgICAgICAgICAgIGRvdWJsZSB2YWx1ZTsKKyAgICAgICAgICAgIFVJTlQgdmFs OworICAgICAgICAgICAgdmFsdWUgPSBzdHJ0b2QgKGNvbG9yLCAmZW5kKTsKKyAgICAgICAgICAg IGlmIChlcnJubyA9PSBFUkFOR0UpCisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAg aWYgKHZhbHVlIDwgMC4wIHx8IHZhbHVlID4gMS4wKQorICAgICAgICAgICAgICBicmVhazsKKyAg ICAgICAgICAgIHZhbCA9IChVSU5UKSgweDEwMCAqIHZhbHVlKTsKKyAgICAgICAgICAgIC8qIFdl IHVzZWQgMHgxMDAgaW5zdGVhZCBvZiAweEZGIHRvIGdpdmUgYSBjb250aW51b3VzCisgICAgICAg ICAgICAgICByYW5nZSBiZXR3ZWVuIDAuMCBhbmQgMS4wIGluY2x1c2l2ZS4gIFRoZSBuZXh0IHN0 YXRlbWVudAorICAgICAgICAgICAgICAgZml4ZXMgdGhlIDEuMCBjYXNlLiAqLworICAgICAgICAg ICAgaWYgKHZhbCA9PSAweDEwMCkKKyAgICAgICAgICAgICAgdmFsID0gMHhGRjsKKyAgICAgICAg ICAgIGNvbG9ydmFsIHw9ICh2YWwgPDwgcG9zKTsKKyAgICAgICAgICAgIHBvcyArPSAweDg7Cisg ICAgICAgICAgICBpZiAoaSA9PSAyKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg aWYgKCplbmQgIT0gJ1wwJykKKyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAg ICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgICAgWFNFVElOVCAocmV0LCBjb2xv cnZhbCk7CisgICAgICAgICAgICAgICAgcmV0dXJuIHJldDsKKyAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgaWYgKCplbmQgIT0gJy8nKQorICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAg ICAgIGNvbG9yID0gZW5kICsgMTsKKyAgICAgICAgICB9CisgICAgICB9CisgIC8qIEkgYW0gbm90 IGdvaW5nIHRvIGF0dGVtcHQgdG8gaGFuZGxlIGFueSBvZiB0aGUgQ0lFIGNvbG9yIHNjaGVtZXMK KyAgICAgb3IgVGVrSFZDLCBzaW5jZSBJIGRvbid0IGtub3cgdGhlIGFsZ29yaXRobXMgZm9yIGNv bnZlcnNpb24gdG8gUkdCLgorICAgICBJZiB3ZSBmYWlsIHRvIGxvb2t1cCB0aGUgY29sb3IgbmFt ZSBpbiB3MzJfY29sb3JfbWFwLCB0aGVuIGNoZWNrIHRoZQorICAgICBjb2xvcm5hbWUgdG8gc2Vl IGlmIGl0IGNhbiBiZSBjcnVkZWx5IGFwcHJveGltYXRlZDogSWYgdGhlIFggY29sb3IKKyAgICAg ZW5kcyBpbiBhIG51bWJlciAoZS5nLiwgImRhcmtzZWFncmVlbjIiKSwgc3RyaXAgdGhlIG51bWJl ciBhbmQKKyAgICAgcmV0dXJuIHRoZSByZXN1bHQgb2YgbG9va2luZyB1cCB0aGUgYmFzZSBjb2xv ciBuYW1lLiAqLworICByZXQgPSBtY193MzJfY29sb3JfbWFwX2xvb2t1cCAoY29sb3JuYW1lKTsK KyAgaWYgKE5JTFAgKHJldCkpCisgICAgeworICAgICAgaW50IGxlbiA9IHN0cmxlbiAoY29sb3Ju YW1lKTsKKyAgICAgIGlmIChpc2RpZ2l0IChjb2xvcm5hbWVbbGVuIC0gMV0pKQorICAgICAgICB7 CisgICAgICAgICAgY2hhciAqcHRyLCAqYXBwcm94ID0gYWxsb2NhIChsZW4gKyAxKTsKKyAgICAg ICAgICBzdHJjcHkgKGFwcHJveCwgY29sb3JuYW1lKTsKKyAgICAgICAgICBwdHIgPSAmYXBwcm94 W2xlbiAtIDFdOworICAgICAgICAgIHdoaWxlIChwdHIgPiBhcHByb3ggJiYgaXNkaWdpdCAoKnB0 cikpCisgICAgICAgICAgICAqcHRyLS0gPSAnXDAnOworICAgICAgICAgIHJldCA9IG1jX3czMl9j b2xvcl9tYXBfbG9va3VwIChhcHByb3gpOworICAgICAgICB9CisgICAgfQorICB1bmJsb2NrX2lu cHV0ICgpOworICByZXR1cm4gcmV0OworfQorCisvKiBEZWNpZGUgaWYgY29sb3IgbmFtZWQgQ09M T1IgaXMgdmFsaWQgZm9yIHRoZSBkaXNwbGF5IGFzc29jaWF0ZWQgd2l0aAorICAgdGhlIHNlbGVj dGVkIGZyYW1lOyBpZiBzbywgcmV0dXJuIHRoZSByZ2IgdmFsdWVzIGluIENPTE9SX0RFRi4KKyAg IElmIEFMTE9DIGlzIG5vbnplcm8sIGFsbG9jYXRlIGEgbmV3IGNvbG9ybWFwIGNlbGwuICovCitp bnQKK21jX3czMl9kZWZpbmVkX2NvbG9yIChzdHJ1Y3QgZnJhbWUgKmYsIGNvbnN0IGNoYXIgKmNv bG9yLCBtY19YQ29sb3IgKmNvbG9yX2RlZiwgYm9vbCBhbGxvY19wKQoreworICByZWdpc3RlciBM aXNwX09iamVjdCB0ZW07CisgIENPTE9SUkVGIHczMl9jb2xvcl9yZWY7CisgIHRlbSA9IG1jX3hf dG9fdzMyX2NvbG9yIChjb2xvcik7CisgIGlmICghTklMUCAodGVtKSkKKyAgICB7CisgICAgICBp ZiAoZikKKyAgICAgICAgeworICAgICAgICAgIC8qIEFwcGx5IGdhbW1hIGNvcnJlY3Rpb24uICov CisgICAgICAgICAgdzMyX2NvbG9yX3JlZiA9IFhVRklYTlVNX1JBVyAodGVtKTsKKyAgICAgICAg ICBnYW1tYV9jb3JyZWN0IChmLCAmdzMyX2NvbG9yX3JlZik7CisgICAgICAgICAgWFNFVElOVCAo dGVtLCB3MzJfY29sb3JfcmVmKTsKKyAgICAgICAgfQorICAgICAgLyogTWFwIHRoaXMgY29sb3Ig dG8gdGhlIHBhbGV0dGUgaWYgaXQgaXMgZW5hYmxlZC4gKi8KKyAgICAgIGlmICghTklMUCAoVncz Ml9lbmFibGVfcGFsZXR0ZSkpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgdzMyX3BhbGV0 dGVfZW50cnkgKiBlbnRyeSA9IG9uZV93MzJfZGlzcGxheV9pbmZvLmNvbG9yX2xpc3Q7CisgICAg ICAgICAgc3RydWN0IHczMl9wYWxldHRlX2VudHJ5ICoqIHByZXYgPSAmb25lX3czMl9kaXNwbGF5 X2luZm8uY29sb3JfbGlzdDsKKyAgICAgICAgICAvKiBjaGVjayBpZiBjb2xvciBpcyBhbHJlYWR5 IG1hcHBlZCAqLworICAgICAgICAgIHdoaWxlIChlbnRyeSkKKyAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgaWYgKE1DX1czMl9DT0xPUiAoZW50cnktPmVudHJ5KSA9PSBYVUZJWE5VTV9SQVcg KHRlbSkpCisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgIHByZXYgPSAmZW50 cnktPm5leHQ7CisgICAgICAgICAgICAgIGVudHJ5ID0gZW50cnktPm5leHQ7CisgICAgICAgICAg ICB9CisgICAgICAgICAgaWYgKGVudHJ5ID09IE5VTEwgJiYgYWxsb2NfcCkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgLyogbm90IGFscmVhZHkgbWFwcGVkLCBzbyBhZGQgdG8gbGlzdCAq LworICAgICAgICAgICAgICBlbnRyeSA9IHhtYWxsb2MgKHNpemVvZiAoc3RydWN0IHczMl9wYWxl dHRlX2VudHJ5KSk7CisgICAgICAgICAgICAgIE1DX1czMl9TRVRfQ09MT1IgKGVudHJ5LT5lbnRy eSwgWFVGSVhOVU1fUkFXICh0ZW0pKTsKKyAgICAgICAgICAgICAgZW50cnktPm5leHQgPSBOVUxM OworICAgICAgICAgICAgICAqcHJldiA9IGVudHJ5OworICAgICAgICAgICAgICBvbmVfdzMyX2Rp c3BsYXlfaW5mby5udW1fY29sb3JzKys7CisgICAgICAgICAgICAgIC8qIHNldCBmbGFnIHRoYXQg cGFsZXR0ZSBtdXN0IGJlIHJlZ2VuZXJhdGVkICovCisgICAgICAgICAgICAgIG9uZV93MzJfZGlz cGxheV9pbmZvLnJlZ2VuX3BhbGV0dGUgPSBUUlVFOworICAgICAgICAgICAgfQorICAgICAgICB9 CisgICAgICAvKiBFbnN1cmUgQ09MT1JSRUYgdmFsdWUgaXMgc25hcHBlZCB0byBuZWFyZXN0IGNv bG9yIGluIChkZWZhdWx0KQorICAgICAgICAgcGFsZXR0ZSBieSBzaW11bGF0aW5nIHRoZSBQQUxF VFRFUkdCIG1hY3JvLiAgVGhpcyB3b3JrcyB3aGV0aGVyCisgICAgICAgICBvciBub3QgdGhlIGRp c3BsYXkgZGV2aWNlIGhhcyBhIHBhbGV0dGUuICovCisgICAgICB3MzJfY29sb3JfcmVmID0gWFVG SVhOVU1fUkFXICh0ZW0pIHwgMHgyMDAwMDAwOworICAgICAgY29sb3JfZGVmLT5waXhlbCA9IHcz Ml9jb2xvcl9yZWY7CisgICAgICBjb2xvcl9kZWYtPnJlZCA9IEdldFJWYWx1ZSAodzMyX2NvbG9y X3JlZikgKiAyNTY7CisgICAgICBjb2xvcl9kZWYtPmdyZWVuID0gR2V0R1ZhbHVlICh3MzJfY29s b3JfcmVmKSAqIDI1NjsKKyAgICAgIGNvbG9yX2RlZi0+Ymx1ZSA9IEdldEJWYWx1ZSAodzMyX2Nv bG9yX3JlZikgKiAyNTY7CisgICAgICByZXR1cm4gMTsKKyAgICB9CisgICAgZWxzZQorICAgICAg eworICAgICAgICByZXR1cm4gMDsKKyAgICAgIH0KK30KKwordm9pZAorbWNfeHdfY29sb3JfdmFs dWVzIChzdHJ1Y3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F9jdXJzb3JfcCkKKyAgICB7CisgICAg ICAvKiBJZiBgeC1zdHJldGNoLWN1cnNvcicgaXMgbmlsLCBkb24ndCBkcmF3IGEgYmxvY2sgY3Vy c29yIGFzIHdpZGUgYXMgdGhlCisgICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgaW50IHdp ZHRoLCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+YmFja2dyb3VuZF93aWR0aDsKKyAgICAgIGludCB4 ID0gcy0+eDsKKyAgICAgIGlmICghcy0+cm93LT5yZXZlcnNlZF9wKQorICAgICAgICB7CisgICAg ICAgICAgaW50IGxlZnRfeCA9IHdpbmRvd19ib3hfbGVmdF9vZmZzZXQgKHMtPncsIFRFWFRfQVJF QSk7CisgICAgICAgICAgaWYgKHggPCBsZWZ0X3gpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIGJhY2tncm91bmRfd2lkdGggLT0gbGVmdF94IC0geDsKKyAgICAgICAgICAgICAgeCA9IGxl ZnRfeDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgICB7 CisgICAgICAgICAgIC8qIEluIFIyTCByb3dzLCBkcmF3IHRoZSBjdXJzb3Igb24gdGhlIHJpZ2h0 IGVkZ2Ugb2YgdGhlCisgICAgICAgICAgICAgIHN0cmV0Y2ggZ2x5cGguICovCisgICAgICAgICAg IGludCByaWdodF94ID0gd2luZG93X2JveF9yaWdodCAocy0+dywgVEVYVF9BUkVBKTsKKyAgICAg ICAgICAgaWYgKHggKyBiYWNrZ3JvdW5kX3dpZHRoID4gcmlnaHRfeCkKKyAgICAgICAgICAgICBi YWNrZ3JvdW5kX3dpZHRoIC09IHggLSByaWdodF94OworICAgICAgICAgICB4ICs9IGJhY2tncm91 bmRfd2lkdGg7CisgICAgICAgICB9CisgICAgICB3aWR0aCA9IG1pbiAoRlJBTUVfQ09MVU1OX1dJ RFRIIChzLT5mKSwgYmFja2dyb3VuZF93aWR0aCk7CisgICAgICBpZiAocy0+cm93LT5yZXZlcnNl ZF9wKQorICAgICAgICB4IC09IHdpZHRoOworICAgICAgLyogRHJhdyBjdXJzb3IuICovCisgICAg ICB3MzJfZHJhd19nbHlwaF9zdHJpbmdfYmdfcmVjdCAocywgeCwgcy0+eSwgd2lkdGgsIHMtPmhl aWdodCk7CisgICAgICAvKiBDbGVhciByZXN0IHVzaW5nIHRoZSBHQyBvZiB0aGUgb3JpZ2luYWwg bm9uLWN1cnNvciBmYWNlLiAqLworICAgICAgaWYgKHdpZHRoIDwgYmFja2dyb3VuZF93aWR0aCkK KyAgICAgICAgeworICAgICAgICAgIEVtYWNzX0dDICpnYyA9IHMtPmZhY2UtPmdjOworICAgICAg ICAgIGludCB5ID0gcy0+eTsKKyAgICAgICAgICBpbnQgdyA9IGJhY2tncm91bmRfd2lkdGggLSB3 aWR0aCwgaCA9IHMtPmhlaWdodDsKKyAgICAgICAgICBSRUNUIHI7CisgICAgICAgICAgSERDIGhk YyA9IHMtPmhkYzsKKyAgICAgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAg ICAgIHggKz0gd2lkdGg7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHggPSBzLT54 OworICAgICAgICAgIGlmIChzLT5yb3ctPm1vdXNlX2ZhY2VfcAorICAgICAgICAgICAgICAmJiBj dXJzb3JfaW5fbW91c2VfZmFjZV9wIChzLT53KSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgdzMyX3NldF9tb3VzZV9mYWNlX2djIChzKTsKKyAgICAgICAgICAgICAgZ2MgPSBzLT5nYzsK KyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgZ2MgPSBzLT5m YWNlLT5nYzsKKyAgICAgICAgICBnZXRfZ2x5cGhfc3RyaW5nX2NsaXBfcmVjdCAocywgJnIpOwor ICAgICAgICAgIHczMl9zZXRfY2xpcF9yZWN0YW5nbGUgKGhkYywgJnIpOworI2lmIDAgLyogVE9E Tzogc3RpcHBsZSAqLworICAgICAgICAgIGlmIChzLT5mYWNlLT5zdGlwcGxlKQorICAgICAgICAg ICAgeworICAgICAgICAgICAgICAvKiBGaWxsIGJhY2tncm91bmQgd2l0aCBhIHN0aXBwbGUgcGF0 dGVybi4gKi8KKyAgICAgICAgICAgICAgWFNldEZpbGxTdHlsZSAocy0+ZGlzcGxheSwgZ2MsIEZp bGxPcGFxdWVTdGlwcGxlZCk7CisgICAgICAgICAgICAgIFhGaWxsUmVjdGFuZ2xlIChzLT5kaXNw bGF5LCBzLT53aW5kb3csIGdjLCB4LCB5LCB3LCBoKTsKKyAgICAgICAgICAgICAgWFNldEZpbGxT dHlsZSAocy0+ZGlzcGxheSwgZ2MsIEZpbGxTb2xpZCk7CisgICAgICAgICAgICB9CisgICAgICAg ICAgICBlbHNlCisjZW5kaWYKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHczMl9m aWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgZ2MtPmJhY2tncm91bmQsIHgsIHksIHcsIGgpOworICAg ICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgZWxzZSBpZiAoIXMtPmJhY2tncm91 bmRfZmlsbGVkX3ApCisgICAgICB7CisgICAgICAgIGludCBiYWNrZ3JvdW5kX3dpZHRoID0gcy0+ YmFja2dyb3VuZF93aWR0aDsKKyAgICAgICAgaW50IHggPSBzLT54LCBsZWZ0X3ggPSB3aW5kb3df Ym94X2xlZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOworICAgICAgICAvKiBEb24ndCBkcmF3 IGludG8gbGVmdCBtYXJnaW4sIGZyaW5nZSBvciBzY3JvbGxiYXIgYXJlYQorICAgICAgICAgICBl eGNlcHQgZm9yIGhlYWRlciBsaW5lIGFuZCBtb2RlIGxpbmUuICovCisgICAgICAgIGlmICh4IDwg bGVmdF94ICYmICFzLT5yb3ctPm1vZGVfbGluZV9wKQorICAgICAgICAg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gICAgICAgICAgfQorICAgICAgICAgIGVsc2UgaWYgKHMt PmhsID09IERSQVdfSU1BR0VfUkFJU0VECisgICAgICAgICAgICAgICAgICAgfHwgcy0+aGwgPT0g RFJBV19JTUFHRV9TVU5LRU4pCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHMtPmdjID0g cy0+ZmFjZS0+Z2M7CisgICAgICAgICAgICAgIHMtPnN0aXBwbGVkX3AgPSBzLT5mYWNlLT5zdGlw cGxlICE9IDA7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg IGVtYWNzX2Fib3J0ICgpOworICAvKiBHQyBtdXN0IGhhdmUgYmVlbiBzZXQuICovCisgIGVhc3Nl cnQgKHMtPmdjICE9IDApOworfQorCisvKiBEcmF3IGEgaG9sbG93IGJveCBjdXJzb3Igb24gd2lu ZG93IFcgaW4gZ2x5cGggcm93IFJPVy4gKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJhd19ob2xs b3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfbWF0cml4ICptYXRyaXgs CisgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCB4 LCBpbnQgZngsIGludCB5LCBpbnQgZnksCisgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQg aHBvcywgaW50IHZwb3MsIGludCB3ZCwgaW50IGgpCit7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhG UkFNRSAoV0lORE9XX0ZSQU1FICh3KSk7CisgIEhEQyBoZGM7CisgIFJFQ1QgcmVjdDsKKyAgSEJS VVNIIGhiID0gQ3JlYXRlU29saWRCcnVzaCAoZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4 ZWwpOworICAvKiBHZXQgdGhlIGdseXBoIHRoZSBjdXJzb3IgaXMgb24uICBJZiB3ZSBjYW4ndCB0 ZWxsIGJlY2F1c2UKKyA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xvcnMgYXJlIGNob3NlbiBz bworICAgICAgICB0aGF0IHRoZSBnbHlwaCBpcyBsZWdpYmxlLiAqLworICAgICAgICBpZiAoZmFj ZS0+YmFja2dyb3VuZCA9PSBjdXJzb3JfY29sb3IKKyAgICAgICAgICAgICYmICFjdXJzb3JfZ2Nf aW52aXNpYmxlX29rYXlfcCkKKyAgICAgICAgICBjdXJzb3JfY29sb3IgPSBmYWNlLT5mb3JlZ3Jv dW5kOworICAgICAgICBpbnQgZGVmYXVsdF9meCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVM X1ggKHcsIHgpOworICAgICAgICBoZGMgPSBnZXRfZnJhbWVfZGMgKGYpOworICAgICAgICB3MzJf Y2xpcF90b19yb3cgKHcsIHJvdywgVEVYVF9BUkVBLCBoZGMpOworICAgICAgICBpbnQgcnggPSBm eDsKKyAgICAgICAgaW50IHJ5ID0gZnk7CisgICAgICAgIGludCBydyA9IHdkOworICAgICAgICBp bnQgcmggPSBoOworICAgICAgICAvLyAgZnByaW50ZiAoc3RkZXJyLCAiTUNfSEJBUjogIGZ4ICgl ZCkgfCBmeSAoJWQpIHwgd2QgKCVkKSB8IGggKCVkKVxuIiwKKyAgICAgICAgLy8gICAgICAgICAg ICAgICAgICAgcngsIHJ5LCBydywgcmgpOworICAgICAgICB3MzJfZmlsbF9hcmVhIChmLCBoZGMs IGN1cnNvcl9jb2xvciwgcngsIHJ5LCBydywgcmgpOworICAgICAgICB3MzJfc2V0X2NsaXBfcmVj dGFuZ2xlIChoZGMsIE5VTEwpOworICAgICAgICByZWxlYXNlX2ZyYW1lX2RjIChmLCBoZGMpOwor ICAgICAgfQorfQorCisvKiBSSUY6IERyYXcgb3IgY2xlYXIgY3Vyc29yIG9uIHdpbmRvdyBXLiAq Lworc3RhdGljIHZvaWQKK21jX3czMl9kcmF3X3dpbmRvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cg KncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAor ICAgICAgICAgICAgICAgICAgaW50IHgsIGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3Ms IGludCB2cG9zLCBpbnQgd2QsIGludCBoLAorICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JH QiBsc2wsIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAg ICBpbnQgY3Vyc29yX3dpZHRoLCBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IsIGJvb2wgb25f cCwgYm9vbCBhY3RpdmVfcCkKK3sKKyAgaWYgKG9uX3ApCisgICAgeworICAgICAgLyogSWYgdGhp cyBpcyB0aGUgYWN0aXZlIGN1cnNvciwgd2UgbmVlZCB0byB0cmFjayBpdCB3aXRoIHRoZQorICAg ICAgc3lzdGVtIGNhcmV0LCBzbyB0aGlyZCBwYXJ0eSBzb2Z0d2FyZSBsaWtlIHNjcmVlbiBtYWdu aWZpZXJzCisgICAgICBhbmQgc3BlZWNoIHN5bnRoZXNpemVycyBjYW4gZm9sbG93IHRoZSBjdXJz b3IuICovCisgICAgICBpZiAoYWN0aXZlX3ApCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3Qg ZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICAgICAgICAgIEhXTkQgaHdu ZCA9IEZSQU1FX1czMl9XSU5ET1cgKGYpOworICAgICAgICAgIHczMl9zeXN0ZW1fY2FyZXRfeAor ICAgICAgICAgICAgPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB4KTsKKyAgICAg ICAgICAvKiBGSVhNRTogIFdoYXQgc2hvdWxkIHdlIHVzZSBpbnN0ZWFkIG9mIGB3LT5waHlzX2N1 cnNvcl9hc2NlbnQnPyAqLworICAgICAgICAgIHczMl9zeXN0ZW1fY2FyZXRfeQorICAgICAgICAg ICAgPSAoV0lORE9XX1RPX0ZSQU1FX1BJWEVMX1kgKHcsIHkpCisgICAgICAgICAgICAgICArIHJv dy0+YXNjZW50IC0gdy0+cGh5c19jdXJzb3JfYXNjZW50KTsKKyAgICAgICAgICB3MzJfc3lzdGVt X2NhcmV0X3dpbmRvdyA9IHc7CisgICAgICAgICAgdzMyX3N5c3RlbV9jYXJldF9oZHJfaGVpZ2h0 ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICAgICAgdzMyX3N5c3RlbV9j YXJldF9tb2RlX2hlaWdodCA9IFdJTkRPV19NT0RFX0xJTkVfSEVJR0hUICh3KTsKKyAgICAgICAg ICBQb3N0TWVzc2FnZSAoaHduZCwgV01fSU1FX1NUQVJUQ09NUE9TSVRJT04sIDAsIDApOworICAg ICAgICAgIC8qIElmIHRoZSBzaXplIG9mIHRoZSBhY3RpdmUgY3Vyc29yIGNoYW5nZWQsIGRlc3Ry b3kgdGhlIG9sZAorICAgICAgICAgICAgIHN5c3RlbSBjYXJldC4gKi8KKyAgICAgICAgICBpZiAo dzMyX3N5c3RlbV9jYXJldF9od25kCisgICAgICAgICAgICAgICYmICh3MzJfc3lzdGVtX2NhcmV0 X2hlaWdodCAhPSBoKSkKKyAgICAgICAgICAgIFBvc3RNZXNzYWdlIChod25kLCBXTV9FTUFDU19E RVNUUk9ZX0NBUkVULCAwLCAwKTsKKyAgICAgICAgICB3MzJfc3lzdGVtX2NhcmV0X2hlaWdodCA9 IGg7CisgICAgICAgICAgLyogTW92ZSB0aGUgc3lzdGVtIGNhcmV0LiAqLworICAgICAgICAgIFBv c3RNZXNzYWdlIChod25kLCBXTV9FTUFDU19UUkFDS19DQVJFVCwgMCwgMCk7CisgICAgICAgIH0K KyAgICAgIC8qIFRoZSBmcmluZ2UgYml0bWFwcyBhcmUgcHJlc2VudGx5IGhhbmRsZWQgZWxzZXdo ZXJlLCBidXQgY291bGQgc29tZWRheQorICAgICAgYmUgbWFuYWdlZCAoaW4gcGFydCkgYXQgd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IiksIHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0 IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2 ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9s bG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVz LmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX3JlZ2lvbl9iZXR3ZWVuX2ZhY2UtPmZvcmVncm91 bmQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9w KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAo IistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAg ICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwg aG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZv cmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAg ICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3Jv dW5kOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFj dGl2ZV9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgZW51 bSBmYWNlX2lkIG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dXRwdXRfZGF0YS53 MzItPmN1cnNvcl9nYyA9IG9yaWdpbmFsX2N1cnNvcl9nYzsKKyAgICAgICAgICB1bmJsb2NrX2lu cHV0ICgpOworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEu dzMyLT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgbWNfdzMyX2RyYXdfaG9sbG93X2N1 cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOwor ICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vy c29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGN1cnNvcl9nbHlwaC0+dHlw ZSA9PSBJTUFHRV9HTFlQSCAmJiBsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNs LmJsdWUgPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWph Y2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICAgIGYt Pm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAg ICBtY193MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5 LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgICB9CisgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgeworIC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ob2xsb3df YWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFj a2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlLT5mb3JlZ3JvdW5kOworICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AK KyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fZW5kKQorICAgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2 ZV9yZWdpb25fZW5kX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgi Ky1yZWFsLWZha2UtY3Vyc29yLWF0LXJlZ2lvbi1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAg ICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX2VuZF9mYWNl ID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9lbmRfZmFjZV9pZCk7Cisg ICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBs b29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16 di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93 X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOwor ICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb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gICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9N X0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICAgIGdj X3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAg ICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2FjdGl2ZV9y ZWdpb25fYmV0d2Vlbl9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZl X2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2Ut Y3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgICAgc3Ry dWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2Fj dGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3Jv dW5kID0gaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAg ICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmJhY2tncm91 bmQ7CisgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIGVsc2Ug aWYgKCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1w cmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZh Y2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfaW5hY3Rp dmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3Jv dW5kID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAg ICAgICAgICAgIGdjX3ZhbHVlcy5iYWNrZ3JvdW5kID0gaG9sbG93X2luYWN0aXZlX2ZhY2UtPmJh Y2tncm91bmQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGYtPm91 dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBGUkFNRV9XMzJfV0lO RE9XIChmKSwgbWFzaywgJmdjX3ZhbHVlcyk7CisgICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgp OworICAgICAgICAgICAgICAvKiBGb3JjZSBgbWNfdzMyX3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBg cy0+Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnLiAqLworICAgICAgICAgICAgICBib29s IGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAgICAgICAgICAgbWNfZHJhd19jdXJzb3JfZ2x5cGgg KHcsIG1hdHJpeCwgcm93LCBEUkFXX0NVUlNPUiwgeCwgaHBvcywgdnBvcywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGxzbCwgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwg d2QsIGFjdGl2ZV9wLCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgIGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAgICAgICAgICAgICB1bmJs b2NrX2lucHV0ICgpOworICAgICAgICAgICAgICBtY193MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3 LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICAg ICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IT0xMT1dfQk9YOgorICAg IHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUg Pj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0 cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRh LnczMi0+Y3Vyc29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgbWNfdzMyX2RyYXdf aG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsIGgpOworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3Jp Z2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICBt Y193MzJfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBo cG9zLCB2cG9zLCB3ZCwgaCk7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19GSUxM RURfQk9YOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAg JiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhp amFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAg ICAgICAgICBmdW5jdGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHczMmZucy5jLiAqLworICAg ICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgIEVtYWNzX0dDIGdjX3ZhbHVlczsKKyAg ICAgICAgICB1bnNpZ25lZCBsb25nIG1hc2sgPSBHQ0ZvcmVncm91bmQgfCBHQ0JhY2tncm91bmQ7 CisgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBGUkFNRV9CQUNLR1JPVU5EX1BJWEVM IChmKTsKKyAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGNvbG9yX3BpeGVsOworICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBG UkFNRV9XMzJfV0lORE9XIChmKSwgbWFzaywgJmdjX3ZhbHVlcyk7CisgICAgICAgICAgLyogRm9y Y2UgYG1jX3czMl9zZXRfY3Vyc29yX2djJyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLnczMi0+ Y3Vyc29yX2djJy4gKi8KKyAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAgICAg ICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4 LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBo X2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAgICAg ICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOwor ICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3AgPSBmYWxzZTsKKyAgICAgICAg ICAgIG1jX2RyYXdfY3Vyc29yX2dseXBoICh3LCBtYXRyaXgsIHJvdywgRFJBV19DVVJTT1IsIHgs IGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBnbHlw aF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgY3Vyc29yX2djX3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOwor ICAgIH0KKyAgICBjYXNlIE1DX0JBUjoKKyAgICB7CisgICAgICBpZiAobHNsLnJlZCA+PSAwICYm IGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4g Ki8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9yX3Bp eGVsOworICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSB0cnVlOwor ICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwg eSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGgsIGN1cnNvcl93aWR0aCwgTUNfQkFSLCBjdXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7Cisg ICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJz b3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAgICAgICAg ICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3AgPSBmYWxzZTsKKyAgICAgICAgICAg IG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhw b3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCwgY3Vy c29yX3dpZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKTsKKyAgICAgICAg ICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBNQ19IQkFSOgorICAgIHsKKyAgICAg IGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAg ICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEu dzMyLT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vy c29yX3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52aXNp YmxlX29rYXlfcCA9IHRydWU7CisgICAgICAgICAgbWNfdzMyX2RyYXdfYmFyX2N1cnNvciAodywg bWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19IQkFSLCBjdXJzb3JfZ2Nf aW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3Jf cGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQor ICAgICAgICAgIHsKKyAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3Ag PSBmYWxzZTsKKyAgICAgICAgICAgIG1jX3czMl9kcmF3X2Jhcl9jdXJzb3IgKHcsIG1hdHJpeCwg cm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19IQkFSLCBjdXJzb3JfZ2NfaW52aXNp YmxlX29rYXlfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGRlZmF1 bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAgfQorICAgIH0KK30KKworLyogRHJhdyBnbHlw aCBzdHJpbmcgUy4gKi8KK3N0YXRpYyB2b2lkCittY193MzJfZHJhd19nbHlwaF9zdHJpbmcgKHN0 cnVjdCBnbHlwaF9zdHJpbmcgKnMsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwgc3RydWN0 IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbWNfUkdC IGxzbCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLAorICAgICAgICAgICAgICAgICAgICAg ICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNvcl90eXBlLCBpbnQgY3Vyc29yX3dpZHRoLAor ICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIGFjdGl2ZV9wLCBib29sIGN1cnNvcl9nY19w KQoreworICBib29sIHJlbGllZl9kcmF3bl9wID0gMDsKKyAgLyogSWYgUyBkcmF3cyBpbnRvIHRo ZSBiYWNrZ3JvdW5kIG9mIGl0cyBzdWNjZXNzb3IsIGRyYXcgdGhlCisgICAgIGJhY2tncm91bmQg b2YgdGhlIHN1Y2Nlc3NvciBmaXJzdCBzbyB0aGF0IFMgY2FuIGRyYXcgaW50byBpdC4KKyAgICAg VGhpcyBtYWtlcyBTLT5uZXh0IHVzZSBYRHJhd1N0cmluZyBpbnN0ZWFkIG9mIFhEcmF3SW1hZ2VT dHJpbmcuICovCisgIGlmIChzLT5uZXh0ICYmIHMtPnJpZ2h0X292ZXJoYW5nICYmICFzLT5mb3Jf b3ZlcmxhcHMpCisgICAgeworICAgICAgaW50IHdpZHRoOworICAgICAgc3RydWN0IGdseXBoX3N0 cmluZyAqbmV4dDsKKyAgICAgIGZvciAod2lkdGggPSAwLCBuZXh0ID0gcy0+bmV4dDsKKyAgICAg ICAgICAgbmV4dCAmJiB3aWR0aCA8IHMtPnJpZ2h0X292ZXJoYW5nOworICAgICAgICAgICB3aWR0 aCArPSBuZXh0LT53aWR0aCwgbmV4dCA9IG5leHQtPm5leHQpCisgICAgICAgIGlmIChuZXh0LT5m aXJzdF9nbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCkKKyAgICAgICAgICB7CisgICAgICAgICAg ICBtY193MzJfc2V0X2dseXBoX3N0cmluZ19nYyAobmV4dCwgY3Vyc29yX2djX3ApOworICAgICAg ICAgICAgdzMyX3NldF9nbHlwaF9zdHJpbmdfY2xpcHBpbmcgKG5leHQpOworICAgICAgICAgICAg aWYgKG5leHQtPmZpcnN0X2dseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgICAgICAgICAg ICAgIG1jX3czMl9kcmF3X3N0cmV0Y2hfZ2x5cGhfc3RyaW5nIChuZXh0KTsKKyAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19iYWNrZ3JvdW5k IChuZXh0LCB0cnVlKTsKKyAgICAgICAgICAgIG5leHQtPm51bV9jbGlwcyA9IDA7CisgICAgICAg ICAgfQorICAgIH0KKyAgLyogU2V0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vbWF0aWMpKQorICAgICAgICBzLT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gdHJ1 ZTsKKyAgICAgIGVsc2UKKyAgICAgICAgdzMyX2RyYXdfZ2x5cGhfc3RyaW5nX2JhY2tncm91bmQg KHMsIHRydWUpOworICAgICAgdzMyX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3Jv dW5kIChzKTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgR0xZUEhMRVNTX0dMWVBIOgorICAgICAg aWYgKHMtPmZvcl9vdmVybGFwcykKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRfcCA9IHRy dWU7CisgICAgICBlbHNlCisgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19iYWNrZ3JvdW5k IChzLCBmYWxzZSk7CisgICAgICB3MzJfZHJhd19nbHlwaGxlc3NfZ2x5cGhfc3RyaW5nX2ZvcmVn cm91bmQgKHMpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAgICAgIGVtYWNzX2Fib3J0 ICgpOworICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMpCisgICAgeworICAgICAgLyogRHJh dyB1bmRlcmxpbmUuICovCisgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3ApCisgICAgICAg IHsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5cGUgPT0gRkFDRV9VTkRFUl9X QVZFKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBDT0xPUlJFRiBjb2xvcjsKKyAgICAg ICAgICAgICAgaWYgKHMtPmZhY2UtPnVuZGVybGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAg ICAgICBjb2xvciA9IHMtPmdjLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgIGVsc2UKKyAg ICAgICAgICAgICAgICAgIGNvbG9yID0gcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yOworICAgICAg ICAgICAgICB3MzJfZHJhd191bmRlcndhdmUgKHMsIGNvbG9yKTsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICBlbHNlIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJ TkUpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNz LCBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaW50IHk7CisgICAgICAgICAgICAgIGlmIChzLT5w cmV2ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVybGluZV9wCisgICAgICAgICAgICAgICAgICAmJiBz LT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAgICAg ICAgICAgICAgeworICAgICAgICAgICAgICAgICAgLyogV2UgdXNlIHRoZSBzYW1lIHVuZGVybGlu ZSBzdHlsZSBhcyB0aGUgcHJldmlvdXMgb25lLiAqLworICAgICAgICAgICAgICAgICAgdGhpY2tu ZXNzID0gcy0+cHJldi0+dW5kZXJsaW5lX3RoaWNrbmVzczsKKyAgICAgICAgICAgICAgICAgIHBv c2l0aW9uID0gcy0+cHJldi0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg IC8qIEdldCB0aGUgdW5kZXJsaW5lIHRoaWNrbmVzcy4gIERlZmF1bHQgaXMgMSBwaXhlbC4gKi8K KyAgICAgICAgICAgICAgICAgIGlmIChzLT5mb250ICYmIHMtPmZvbnQtPnVuZGVybGluZV90aGlj a25lc3MgPiAwKQorICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSBzLT5mb250LT51bmRl cmxpbmVfdGhpY2tuZXNzOworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg ICAgICAgICAgdGhpY2tuZXNzID0gMTsKKyAgICAgICAgICAgICAgICAgIGlmICh4X3VuZGVybGlu ZV9hdF9kZXNjZW50X2xpbmUpCisgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHMtPmhl aWdodCAtIHRoaWNrbmVzcykgLSAocy0+eWJhc2UgLSBzLT55KTsKKyAgICAgICAgICAgICAgICAg ICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAg IC8qIEdldCB0aGUgdW5kZXJsaW5lIHBvc2l0aW9uLiAgVGhpcyBpcyB0aGUgcmVjb21tZW5kZWQK KyAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRpY2FsIG9mZnNldCBpbiBwaXhlbHMgZnJv bSB0aGUgYmFzZWxpbmUgdG8gdGhlIHRvcCBvZgorICAgICAgICAgICAgICAgICAgICAgICAgICAg dGhlIHVuZGVybGluZS4gIFRoaXMgaXMgYSBzaWduZWQgdmFsdWUgYWNjb3JkaW5nIHRvIHRoZQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY3MsIGFuZCBpdHMgZGVmYXVsdCBpcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgUk9VTkQgKChtYXhpbXVtX2Rlc2NlbnQpIC8gMiksIHdp dGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIFJPVU5EICh4KSA9IGZsb29yICh4ICsgMC41 KSAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICh4X3VzZV91bmRlcmxpbmVfcG9zaXRp b25fcHJvcGVydGllcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHMtPmZvbnQgJiYg cy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uID49IDApCisgICAgICAgICAgICAgICAgICAgICAg ICAgIHBvc2l0aW9uID0gcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAgICAg ICAgICAgICAgICAgZWxzZSBpZiAocy0+Zm9udCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg cG9zaXRpb24gPSAocy0+Zm9udC0+ZGVzY2VudCArIDEpIC8gMjsKKyAgICAgICAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IG1heCAocG9zaXRpb24sIHVuZGVy bGluZV9taW5pbXVtX29mZnNldCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAv KiBDaGVjayB0aGUgc2FuaXR5IG9mIHRoaWNrbmVzcyBhbmQgcG9zaXRpb24uICBXZSBzaG91bGQK KyAgICAgICAgICAgICAgICAgYXZvaWQgZHJhd2luZyB1bmRlcmxpbmUgb3V0IG9mIHRoZSBjdXJy ZW50IGxpbmUgYXJlYS4gKi8KKyAgICAgICAgICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPD0g cy0+eWJhc2UgKyBwb3NpdGlvbikKKyAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWln aHQgLSAxKSAtIChzLT55YmFzZSAtIHMtPnkpOworICAgICAgICAgICAgICBpZiAocy0+eSArIHMt PmhlaWdodCA8IHMtPnliYXNlICsgcG9zaXRpb24gKyB0aGlja25lc3MpCisgICAgICAgICAgICAg ICAgdGhpY2tuZXNzID0gKHMtPnkgKyBzLT5oZWlnaHQpIC0gKHMtPnliYXNlICsgcG9zaXRpb24p OworICAgICAgICAgICAgICBzLT51bmRlcmxpbmVfdGhpY2tuZXNzID0gdGhpY2tuZXNzOworICAg ICAgICAgICAgICBzLT51bmRlcmxpbmVfcG9zaXRpb24gPXBvc2l0aW9uOworICAgICAgICAgICAg ICB5ID0gcy0+eWJhc2UgKyBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgaWYgKHMtPmZhY2UtPnVu ZGVybGluZV9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5m LCBzLT5oZGMsIHMtPmdjLT5mb3JlZ3JvdW5kLCBzLT54LAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHksIHMtPndpZHRoLCAxKTsKKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMtPmZhY2UtPnVuZGVybGlu ZV9jb2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHksIHMtPndp ZHRoLCAxKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRHJhdyBvdmVybGlu ZS4gKi8KKyAgICAgIGlmIChzLT5mYWNlLT5vdmVybGluZV9wKQorICAgICAgICB7CisgICAgICAg ICAgdW5zaWduZWQgbG9uZyBkeSA9IDAsIGggPSAxOworICAgICAgICAgIGlmIChzLT5mYWNlLT5v dmVybGluZV9jb2xvcl9kZWZhdWx0ZWRfcCkKKyAgICAgICAgICAgIHczMl9maWxsX2FyZWEgKHMt PmYsIHMtPmhkYywgcy0+Z2MtPmZvcmVncm91bmQsIHMtPngsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICBzLT55ICsgZHksIHMtPndpZHRoLCBoKTsKKyAgICAgICAgICAgIGVsc2UKKyAgICAg ICAgICAgICAgdzMyX2ZpbGxfYXJlYSAocy0+Ziwgcy0+aGRjLCBzLT5mYWNlLT5vdmVybGluZV9j b2xvciwgcy0+eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcy0+eSArIGR5LCBzLT53 aWR0aCwgaCk7CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgc3RyaWtlLXRocm91Z2guICovCisg ICAgICBpZiAocy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfcAorICAgICAgICAgICYmICFGT05UX1RF WFRNRVRSSUMgKHMtPmZvbnQpLnRtU3RydWNrT3V0KQorICAgICAgICB7CisgICAgICAgICAgdW5z aWduZWQgbG9uZyBoID0gMTsKKyAgICAgICAgICB1bnNpZ25lZCBsb25nIGR5ID0gKHMtPmhlaWdo dCAtIGgpIC8gMjsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfY29sb3Jf ZGVmYXVsdGVkX3ApCisgICAgICAgICAgICB3MzJfZmlsbF9hcmVhIChzLT5mLCBzLT5oZGMsIHMt PmdjLT5mb3JlZ3JvdW5kLCBzLT54LCBzLT55ICsgZHksCisgICAgICAgICAgICAgICAgICAgICAg ICAgICBzLT53aWR0aCwgaCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHczMl9m aWxsX2FyZWEgKHMtPmYsIHMtPmhkYywgcy0+ZmFjZS0+c3RyaWtlX3Rocm91Z2hfY29sb3IsIHMt PngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMtPnkgKyBkeSwgcy0+d2lkdGgsIGgp OworICAgICAgICB9CisgICAgICAvKiBEcmF3IHJlbGllZiBpZiBub3QgeWV0IGRyYXduLiAqLwor ICAgICAgaWYgKCFyZWxpZWZfZHJhd25fcCAmJiBzLT5mYWNlLT5ib3ggIT0gRkFDRV9OT19CT1gp CisgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19ib3ggKHMpOworICAgICAgaWYgKHMtPnBy ZXYpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3QgZ2x5cGhfc3RyaW5nICpwcmV2OworICAg ICAgICAgIGZvciAocHJldiA9IHMtPnByZXY7IHByZXY7IHByZXYgPSBwcmV2LT5wcmV2KQorICAg ICAgICAgICAgaWYgKHByZXYtPmhsICE9IHMtPmhsCisgICAgICAgICAgICAgICAgJiYgcHJldi0+ eCArIHByZXYtPndpZHRoICsgcHJldi0+cmlnaHRfb3ZlcmhhbmcgPiBzLT54KQorICAgICAgICAg ICAgICB7CisgICAgICAgICAgICAgICAgLyogQXMgcHJldiB3YXMgZHJhd24gd2hpbGUgY2xpcHBl ZCB0byBpdHMgb3duIGFyZWEsIHdlCisgICAgICAgICAgICAgICAgICAgbXVzdCBkcmF3IHRoZSBy aWdodF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5vdy4gKi8KKyAgICAgICAgICAgICAgICBl bnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IHByZXYtPmhsOworICAgICAgICAgICAgICAgIHBy ZXYtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAgbWNfdzMyX3NldF9nbHlwaF9zdHJpbmdf Z2MgKHByZXYsIGN1cnNvcl9nY19wKTsKKyAgICAgICAgICAgICAgICB3MzJfc2V0X2dseXBoX3N0 cmluZ19jbGlwcGluZ19leGFjdGx5IChzLCBwcmV2KTsKKyAgICAgICAgICAgICAgICBpZiAocHJl di0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSCkKKyAgICAgICAgICAgICAgICAgIHcz Ml9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgICAgICAgICAgdzMyX2RyYXdfY29tcG9zaXRlX2dseXBoX3N0cmlu Z19mb3JlZ3JvdW5kIChwcmV2KTsKKyAgICAgICAgICAgICAgICB3MzJfc2V0X2NsaXBfcmVjdGFu Z2xlIChwcmV2LT5oZGMsIE5VTEwpOworICAgICAgICAgICAgICAgIHByZXYtPmhsID0gc2F2ZTsK KyAgICAgICAgICAgICAgICBwcmV2LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgICAgICB9Cisg ICAgICAgIH0KKyAgICAgIGlmIChzLT5uZXh0KQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0 IGdseXBoX3N0cmluZyAqbmV4dDsKKyAgICAgICAgICBmb3IgKG5leHQgPSBzLT5uZXh0OyBuZXh0 OyBuZXh0ID0gbmV4dC0+bmV4dCkKKyAgICAgICAgICAgIGlmIChuZXh0LT5obCAhPSBzLT5obAor ICAgICAgICAgICAgICAgICYmIG5leHQtPnggLSBuZXh0LT5sZWZ0X292ZXJoYW5nIDwgcy0+eCAr IHMtPndpZHRoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgLyogQXMgbmV4dCB3 aWxsIGJlIGRyYXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLAorICAgICAgICAgICAg ICAgICAgIHdlIG11c3QgZHJhdyB0aGUgbGVmdF9vdmVyaGFuZyBwYXJ0IHVzaW5nIHMtPmhsIG5v dy4gKi8KKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugc2F2ZSA9IG5leHQt PmhsOworICAgICAgICAgICAgICAgIG5leHQtPmhsID0gcy0+aGw7CisgICAgICAgICAgICAgICAg bWNfdzMyX3NldF9nbHlwaF9zdHJpbmdfZ2MgKG5leHQsIGN1cnNvcl9nY19wKTsKKyAgICAgICAg ICAgICAgICB3MzJfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19leGFjdGx5IChzLCBuZXh0KTsK KyAgICAgICAgICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQ SCkKKyAgICAgICAgICAgICAgICAgIHczMl9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChu ZXh0KTsKKyAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgdzMyX2Ry YXdfY29tcG9zaXRlX2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChuZXh0KTsKKyAgICAgICAgICAg ICAgICB3MzJfc2V0X2NsaXBfcmVjdGFuZ2xlIChuZXh0LT5oZGMsIE5VTEwpOworICAgICAgICAg ICAgICAgIG5leHQtPmhsID0gc2F2ZTsKKyAgICAgICAgICAgICAgICBuZXh0LT5udW1fY2xpcHMg PSAwOworICAgICAgICAgICAgICAgIG5leHQtPmNsaXBfaGVhZCA9IHMtPm5leHQ7CisgICAgICAg ICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgLyogUmVzZXQgY2xpcHBpbmcuICovCisgIHcz Ml9zZXRfY2xpcF9yZWN0YW5nbGUgKHMtPmhkYywgTlVMTCk7CisgIHMtPm51bV9jbGlwcyA9IDA7 Cit9CisKKy8qIGVuZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKworCiAvKiBGcmluZ2UgYml0bWFwcy4gICovCiAKIHN0YXRpYyBpbnQgbWF4X2ZyaW5nZV9i bXAgPSAwOwpAQCAtNTQyLDYgKzE3MDEsMTUgQEAgdzMyX3VwZGF0ZV9iZWdpbiAoc3RydWN0IGZy YW1lICpmKQogICBpZiAoISBGUkFNRV9XMzJfUCAoZikpCiAgICAgcmV0dXJuOwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGYtPm1jX3Vw ZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBS ZWdlbmVyYXRlIGRpc3BsYXkgcGFsZXR0ZSBiZWZvcmUgZHJhd2luZyBpZiBsaXN0IG9mIHJlcXVl c3RlZAogICAgICBjb2xvcnMgaGFzIGNoYW5nZWQuICovCiAgIGlmIChkaXNwbGF5X2luZm8tPnJl Z2VuX3BhbGV0dGUpCkBAIC02NzQsNiArMTg0MiwxNiBAQCB3MzJfdXBkYXRlX2VuZCAoc3RydWN0 IGZyYW1lICpmKQogCiAgIC8qIE1vdXNlIGhpZ2hsaWdodCBtYXkgYmUgZGlzcGxheWVkIGFnYWlu LiAgKi8KICAgTU9VU0VfSExfSU5GTyAoZiktPm1vdXNlX2ZhY2VfZGVmZXIgPSBmYWxzZTsKKwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBm LT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIH0KIAogCkBAIC00MDAyLDEzICs1MTgwLDc0IEBAIHczMl9zZXRfdmVydGljYWxfc2Nyb2xs X2JhciAoc3RydWN0IHdpbmRvdyAqdywKIAkgICAgICByZWxlYXNlX2ZyYW1lX2RjIChmLCBoZGMp OwogCSAgICAgIHczMl9jbGVhcl91bmRlcl9pbnRlcm5hbF9ib3JkZXIgKGYpOwogCSAgICB9CisK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICov CisKKy8qIFJFUEFJTlRJTkcgV0hFTiBSRU1PVklORyBTQ1JPTEwgQkFSOgorCistIFNlcXVlbmNl IG9mIEV2ZW50czoKKworICAuIGByZWRpc3BsYXlfaW50ZXJuYWwnIGNhbGxzIHRoZSBgY29uZGVt bl9zY3JvbGxfYmFyc19ob29rJywgd2hpY2ggbWFya3MgYWxsCisgICAgc2Nyb2xsIGJhcnMgYXMg Y2FuZGlkYXRlcyBmb3IgZGVsZXRpb24uCisKKyAgLiBUaGVuIGByZWRpc3BsYXlfaW50ZXJuYWwn IGNhbGxzIGByZWRpc3BsYXlfd2luZG93cycsIHdoaWNoIHdhbGtzIHRoZQorICAgIHdpbmRvdy10 cmVlIGFuZCBleGFtaW5lcyBlYWNoIHdpbmRvdywgd2hlcmVieSBlYWNoIHdpbmRvdyB0aGF0IGlz IHN0aW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FyIGlzICJ2aXNp YmxlIiBiZWZvcmUgbW92aW5nLCB0byBlbnN1cmUgdGhlCiAgICAgICAgICAgICAgYXJlYSBvZiB0 aGUgcGFyZW50IHdpbmRvdyBub3cgZXhwb3NlZCB3aWxsIGJlIHJlZnJlc2hlZC4gICovCi0gICAg ICAgICAgbXlfc2hvd193aW5kb3cgKGYsIGh3bmQsIFNXX0hJREUpOwotLyoqICAgICAgICAgICBN b3ZlV2luZG93IChod25kLCBsZWZ0LCB0b3AsIHdpZHRoLCBtYXggKGhlaWdodCwgMSksIFRSVUUp OyAqKi8KLQkgIC8qIFRyeSB0byBub3QgZHJhdyBvdmVyIGNoaWxkIGZyYW1lcy4gICovCi0JICBT ZXRXaW5kb3dQb3MgKGh3bmQsIEhXTkRfQk9UVE9NLCBsZWZ0LCB0b3AsIHdpZHRoLCBtYXggKGhl aWdodCwgMSksCi0gICAgICAgICAgICAgICAgICAgICAgICBTV1BfRlJBTUVDSEFOR0VEKTsKKyAg ICAgICAgICBpZiAobGVmdCA8PSBiYXItPmxlZnQpCisgICAgICAgICAgICBteV9zaG93X3dpbmRv dyAoZiwgaHduZCwgU1dfSElERSk7CisgICAgICAgICAgTW92ZVdpbmRvdyAoaHduZCwgbGVmdCwg dG9wLCB3aWR0aCwgbWF4IChoZWlnaHQsIDEpLCBsZWZ0IDw9IGJhci0+bGVmdCk7CisKKy8qIGVu ZCBNVUxUSVBMRS1DVVJTT1JTICovCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAJICBz aS5jYlNpemUgPSBzaXplb2YgKHNpKTsKIAkgIHNpLmZNYXNrID0gU0lGX1JBTkdFOwpAQCAtNDI3 Nyw2ICs1NTE2LDIxIEBAIHczMl9qdWRnZV9zY3JvbGxfYmFycyAoc3RydWN0IGZyYW1lICpmKQog ICAgIHsKICAgICAgIHN0cnVjdCBzY3JvbGxfYmFyICpiID0gWFNDUk9MTF9CQVIgKGJhcik7CiAK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAg ICAgIC8qIGBEZXN0cm95V2luZG93JyB3aXRoaW4gYHhfc2Nyb2xsX2Jhcl9yZW1vdmUnIHJlcGFp bnRzIHRoZSByZWN0YW5nbGUuCisgICAgICBUaGVyZWZvcmUsIHdlIGZpcnN0IHNlbmQgYSBtZXNz YWdlIHRvIGluaGliaXQgcmVwYWludGluZy4gKi8KKyAgICAgIGlmICghV0lORE9XX0xJVkVfUCAo Yi0+d2luZG93KSkKKyAgICAgICAgeworICAgICAgICAgIEhXTkQgaHduZCA9IFNDUk9MTF9CQVJf VzMyX1dJTkRPVyAoYik7CisgICAgICAgICAgU2VuZE1lc3NhZ2UgKGh3bmQsIFdNX1NFVFJFRFJB VywgZmFsc2UsIDApOworICAgICAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgICAgIHczMl9zY3JvbGxfYmFyX3JlbW92ZSAoYik7CiAKICAgICAgIG5leHQgPSBiLT5uZXh0 OwpAQCAtNzA4OCw2ICs4MzQyLDIwIEBAIGV4dGVybiBmcmFtZV9wYXJtX2hhbmRsZXIgdzMyX2Zy YW1lX3Bhcm1faGFuZGxlcnNbXTsKIAogc3RhdGljIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNl IHczMl9yZWRpc3BsYXlfaW50ZXJmYWNlID0KIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiog Ki8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworLyogYHJlZGlzcGxheV9pbnRlcmZhY2UnIGlu IGB3MzJ0ZXJtLmNgIG11c3QgYmUgaW4gdGhlIGV4YWN0IHNhbWUgb3JkZXIgYXMgdGhlCitgcmVk aXNwbGF5X2ludGVyZmFjZScgaW4gYGRpc3BleHRlcm4uaGAhICovCisKKyAgbWNfdzMyX2RyYXdf d2luZG93X2N1cnNvciwKKyAgbWNfdzMyX2RyYXdfZ2x5cGhfc3RyaW5nLAorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAgIHczMl9mcmFtZV9wYXJtX2hhbmRsZXJzLAogICBndWlfcHJv ZHVjZV9nbHlwaHMsCiAgIGd1aV93cml0ZV9nbHlwaHMsCmRpZmYgLS1naXQgYS9zcmMvd2luZG93 LmggYi9zcmMvd2luZG93LmgKaW5kZXggNmIwZjBlNS4uMTRkZDM4YSAxMDA2NDQKLS0tIGEvc3Jj L3dpbmRvdy5oCisrKyBiL3NyYy93aW5kb3cuaApAQCAtMzI0LDYgKzMyNCwxNDcgQEAgc3RydWN0 IHdpbmRvdwogCiAjaWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRS1DVVJTT1JTICovCisKKy8qIFN1ZmZpeGVzIGZv ciB0aGUgYG1jYCB3aW5kb3cgcG9pbnRlciBwcmVmaXguICovCitzdHJ1Y3QgbXVsdGlwbGVfY3Vy c29ycworeworICAvKiBUaGUgcmVjb3JkZWQgcGl4ZWwgd2lkdGggb2YgdGhlIGxhc3QgbGluZSBu dW1iZXIgZHJhd24gZHVyaW5nIHJlZGlzcGxheSAqLworICBpbnQgbG51bV9waXhlbF93aWR0aDsK K30gbWM7CisKK3N0cnVjdCBtY19tYXRyaXgKK3sKKyAgcHRyZGlmZl90IHZwb3NfYWxsb2NhdGVk OworICBwdHJkaWZmX3QgdnBvc191c2VkOworICBwdHJkaWZmX3QgY3Vyc29yc191c2VkWzRdOwor ICBlbnVtIG1jX2NhY2hlX3R5cGUKKyAgeworICAgIE1DX0NBQ0hFLAorICAgIENIX0NBQ0hFLAor ICAgIEZDX0NBQ0hFLAorICAgIE5PX0NBQ0hFCisgIH0gY2FjaGVfdHlwZTsKKyAgc3RydWN0IG1j X3Zwb3MKKyAgeworICAgIHB0cmRpZmZfdCBjYWNoZV9hbGxvY2F0ZWRbNF07CisgICAgcHRyZGlm Zl90IGNhY2hlX3VzZWRbNF07CisgICAgc3RydWN0IG1jX2NvbnRlbnRzCisgICAgeworICAgICAg Ym9vbF9iZiBzYW1lX3AgOiAxOworICAgICAgc3RydWN0IGdseXBoIGdseXBoOworICAgICAgaW50 IHg7CisgICAgICBpbnQgZng7CisgICAgICBpbnQgeTsKKyAgICAgIGludCBmeTsKKyAgICAgIGlu dCBocG9zOworICAgICAgaW50IHZwb3M7CisgICAgICBpbnQgd2Q7CisgICAgICBpbnQgaDsKKyAg ICAgIGVudW0gbWNfY3Vyc29yX3R5cGUKKyAgICAgIHsKKyAgICAgICAgLyogTk9URTogIFRoZSBm cmluZ2UgYml0bWFwIGZyYW1ld29yayByZWxpZXMgdXBvbiBNQ19OT19GUklOR0VfQklUTUFQCisg ICAgICAgIGhhdmluZyBhIHZhbHVlIG9mIHplcm8gKDApLiAqLworICAgICAgICBNQ19OT19GUklO R0VfQklUTUFQLAorICAgICAgICBNQ19OT19DVVJTT1IsCisgICAgICAgIE1DX1JJR0hUX0ZSSU5H RV9CSVRNQVAsCisgICAgICAgIE1DX0xFRlRfRlJJTkdFX0JJVE1BUCwKKyAgICAgICAgTUNfRlJB TUVEX0JPWCwKKyAgICAgICAgTUNfRklMTEVEX0JPWCwKKyAgICAgICAgTUNfSE9MTE9XX0JPWCwK KyAgICAgICAgTUNfQkFSLAorICAgICAgICBNQ19IQkFSCisgICAgICB9IGN1cnNvcl90eXBlOwor ICAgICAgaW50IGN1cnNvcl93aWR0aDsKKyAgICAgIHN0cnVjdCBtY19SR0IKKyAgICAgIHsKKyAg ICAgICAgZG91YmxlIHJlZDsKKyAgICAgICAgZG91YmxlIGdyZWVuOworICAgICAgICBkb3VibGUg Ymx1ZTsKKyAgICAgIH0gZmcsIGJnOworICAgICAgYm9vbF9iZiBhY3RpdmVfcCA6IDE7CisgICAg ICBlbnVtIG1jX2ZsYXZvcgorICAgICAgeworICAgICAgICBOT19GTEFWT1IsCisgICAgICAgIE1D X0dMWVBILAorICAgICAgICBNQ19HTFlQSExFU1MsCisgICAgICAgIE1DX09WRVJMQVlfQVJST1df QklUTUFQLAorICAgICAgICBNQ19QSUxDUk9XLAorICAgICAgICBNQ19IT0xMT1dfUkVDVEFOR0xF X1JJR0hUX0FSUk9XLAorICAgICAgICBNQ19SRVZFUlNFRF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hU X0FSUk9XLAorICAgICAgICBNQ19IT0xMT1dfUkVDVEFOR0xFLAorICAgICAgICBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1csCisgICAgICAgIE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdI VF9BUlJPVywKKyAgICAgICAgTUNfVkVSVElDQUxfQkFSLAorICAgICAgICBNQ19SRVZFUlNFRF9W RVJUSUNBTF9CQVIsCisgICAgICAgIE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgIH0g Z2x5cGhfZmxhdm9yOworICAgICAgZW51bSBtY19yb3dfcG9zaXRpb24KKyAgICAgIHsKKyAgICAg ICAgUFJFX1pWLAorICAgICAgICBBVF9aViwKKyAgICAgICAgUE9TVF9aVgorICAgICAgfSByb3df cG9zaXRpb247CisgICAgICBib29sX2JmIGVuYWJsZWRfcCA6IDE7CisgICAgfSAqY2FjaGVbNF07 CisgIH0gKnZwb3M7CisgIC8qIFVzZWQgZWxzZXdoZXJlLiAqLworICBzdH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3JlZHJhd19yb3dfdHlwZQorICB7CisgICAgVVBEQVRFX1dJ TkRPV19fUkVEUkFXX09WRVJMQVBQRURfUk9XUywKKyAgICBHVUlfSU5TRVJUX0dMWVBIUywKKyAg ICBHVUlfRklYX09WRVJMQVBQSU5HX0FSRUEsCisgICAgRFJBV19ST1dfV0lUSF9NT1VTRV9GQUNF LAorICAgIEVYUE9TRV9BUkVBX09ORSwKKyAgICBFWFBPU0VfQVJFQV9UV08sCisgICAgRVhQT1NF X0xJTkUKKyAgfSBtY19yZWRyYXdfcm93X3R5cGVfX2Zyb21fd2hlcmU7Cit9IG1jX21hdHJpeDsK KworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKICAgICAvKiBDdXJzb3IgdHlwZSBvZiBsYXN0IGN1cnNvciBkcmF3biBvbiB0aGUgd2luZG93 LiAgKi8KICAgICBlbnVtIHRleHRfY3Vyc29yX2tpbmRzIHBoeXNfY3Vyc29yX3R5cGU7CiAKZGlm ZiAtLWdpdCBhL3NyYy94ZGlzcC5jIGIvc3JjL3hkaXNwLmMKaW5kZXggNTBmNjQ0My4uOTZkZjNl YiAxMDA2NDQKLS0tIGEvc3JjL3hkaXNwLmMKKysrIGIvc3JjL3hkaXNwLmMKQEAgLTk2Miw2ICs5 NjIsNDg1MCBAQCBzdGF0aWMgdm9pZCBzaG93X21vdXNlX2ZhY2UgKE1vdXNlX0hMSW5mbyAqLCBl bnVtIGRyYXdfZ2x5cGhzX2ZhY2UpOwogc3RhdGljIGJvb2wgY29vcmRzX2luX21vdXNlX2ZhY2Vf cCAoc3RydWN0IHdpbmRvdyAqLCBpbnQsIGludCk7CiAKIAorLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiB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ZXAgMzogIEZyb20gd2l0aGluIHRoZSBuZXcgZW1hY3MgZm9sZGVy IGNyZWF0ZWQgaW4gU3RlcCAxLCBhcHBseSB0aGUgcGF0Y2g6CisKK2dpdCBhcHBseSAvcGF0aC90 by90aGUvcGF0Y2guZGlmZgorCitTdGVwIDQ6ICAuL2F1dG9nZW4uc2gKKworU3RlcCA1OiAgLi9j b25maWd1cmUgLi4uIFt5b3VyIGN1c3RvbSBvcHRpb25zXQorCitTdGVwIDY6ICBtYWtlCisKK1N0 ZXAgNzogIG1ha2UgaW5zdGFsbAorCisKK1VTQUdFOgorCistIEZvciBhIG1pbmltYWwgd29ya2lu ZyBleGFtcGxlIG9mIGJ1aWx0LWluIGZha2UgY3Vyc29ycywgdHlwZTogIE0teCBtYy10ZXN0CisK KyAgOzs7IFRVUk4gT04gRkFLRSBDVVJTT1JTIChidWZmZXIgcG9zaXRpb24sIGN1cnNvci10eXBl LCBjdXJzb3IgY29sb3IpOgorCisgIChzZXRxIG1jLWNvbmYgJygoMSAiaGJhciIgIm1hZ2VudGEi KQorICAgICAgICAgICAgICAgICAgKDIgImJhciIgInB1cnBsZSIpCisgICAgICAgICAgICAgICAg ICAoMyAiYm94IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAoNCAiaG9sbG93IiAiIzAw MDBGRiIpCisgICAgICAgICAgICAgICAgICAoNSAoImhiYXIiIDMpIFsxLjAgMC4wIDEuMF0pCisg ICAgICAgICAgICAgICAgICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkKKyAgICAgICAgICAg ICAgICAgICg3ICJmcmFtZWQiICJPcmFuZ2VSZWQiKSkpKQorCisgIDs7OyBUVVJOIE9GRiBGQUtF IENVUlNPUlM6CisKKyAgKHNldHEgbWMtY29uZiBuaWwpCisKKy0gVG8gdHJ5IG91dCBib3RoIHRo ZSBjcm9zc2hhaXJzIGZlYXR1cmUgYW5kIHRoZSB2aXNpYmxlIGZpbGwgY29sdW1uIGluZGljYXRv cgor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mcmVzaC1jb250ZW50cykKKyAgICAocGFja2FnZS1pbnN0YWxsICdtdWx0aXBsZS1j dXJzb3JzKQorICAgIChtYy9idWlsdC1pbi1jdXJzb3JzKSkKKworCitUT0RPOgorCistIFdoZW4g YW4gaWRsZS10aW1lciBmaXJlcyBhbmQgcG9pbnQgaXMgYXQgdGhlIGVuZCBvZiBhIGhvcml6b250 YWxseSBzY3JvbGxlZAorICBsaW5lIGluIGEgbmFycm93IHdpbmRvdywgdGhlIHRlbXBvcmFyeSBo b3Jpem9udGFsIHNjcm9sbCBpcyBjYW5jZWxlZC4gIENyZWF0ZQorICBhIG1pbmltYWwgd29ya2lu ZyBleGFtcGxlIGFuZCBmaWxlIGEgYnVnIHJlcG9ydC4KKworICAocHJvZ24KKyAgICAoZGVmdW4g dGVzdCAoKQorICAgIChpbnRlcmFjdGl2ZSkKKyAgICAgIChsZXQgKChvdiAobWFrZS1vdmVybGF5 IChwb2ludCkgKDErIChwb2ludCkpIG5pbCB0IHQpKSkKKyAgICAgICAgKG92ZXJsYXktcHV0IG92 ICdmYWNlICcoOmZvcmVncm91bmQgInJlZCIpKSkpCisgICAgKGdsb2JhbC1zZXQta2V5IFtmNV0g J3Rlc3QpCisgICAgKHNwbGl0LXdpbmRvdy1ob3Jpem9udGFsbHkpCisgICAgKHN3aXRjaC10by1i dWZmZXIgKGdldC1idWZmZXItY3JlYXRlICJmb28iKSkKKyAgICAoc2V0cSBiaWRpLWRpc3BsYXkt cmVvcmRlcmluZyBuaWwpCisgICAgKHNldHEtbG9jYWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJl bnQtbGluZSkKKyAgICAoZG90aW1lcyAoaSA4MCkKKyAgICAgIChpbnNlcnQgKGNoYXItdG8tc3Ry aW5nICgrIDY1IGkpKSkpKQorCistIGBuc19kcmF3X3dpbmRvd19jdXJzb3InIGNhbGxzIGBuc19j bGlwX3RvX3JlY3QnLCB3aGljaCBkb2VzIF9ub3RfIHRha2UKKyAgYHJvdy0+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FELCBUQUlM LAlcCisJCQkJCSAgICBITCwgWCwgTEFTVF9YKTsJCVwKKwkgICAgICBlbHNlCQkJCQkJCVwKKwkJ TUNfQlVJTERfQ09NUE9TSVRFX0dMWVBIX1NUUklORyAoU1RBUlQsIEVORCwgSEVBRCwgVEFJTCwJ XAorCQkJCQkgICAgICBITCwgWCwgTEFTVF9YKTsJCVwKKwkgICAgICBicmVhazsJCQkJCQkJXAor CQkJCQkJCQkJXAorCSAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CQkJCQkJXAorCSAgICAgIE1DX0JV SUxEX1NUUkVUQ0hfR0xZUEhfU1RSSU5HIChTVEFSVCwgRU5ELCBIRUFELCBUQUlMLAlcCisJCQkJ CSAgSEwsIFgsIExBU1RfWCk7CQlcCisJICAgICAgYnJlYWs7CQkJCQkJCVwKKwkJCQkJCQkJCVwK KwkgICAgY2FzZSBJTUFHRV9HTFlQSDoJCQkJCQlcCisJICAgICAgTUNfQlVJTERfSU1BR0VfR0xZ UEhfU1RSSU5HIChTVEFSVCwgRU5ELCBIRUFELCBUQUlMLAkJXAorCQkJCQlITCwgWCwgTEFTVF9Y KTsJCQlcCisJICAgICAgYnJlYWs7CisKKyNkZWZpbmUgTUNfQlVJTERfR0xZUEhfU1RSSU5HU19Y VyhTVEFSVCwgRU5ELCBIRUFELCBUQUlMLCBITCwgWCwgTEFTVF9YKQlcCisgICAgICAgICAgICBj YXNlIFhXSURHRVRfR0xZUEg6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBcCisgICAgICAgICAgICAgIE1DX0JVSUxEX1hXSURHRVRfR0xZUEhfU1RSSU5HIChTVEFSVCwg RU5ELCBIRUFELCBUQUlMLCAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBITCwgWCwgTEFTVF9YKTsgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAg IGJyZWFrOworCisjZGVmaW5lIE1DX0JVSUxEX0dMWVBIX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yZGlmZl90IGNvdW50LCBMaXNwX09iamVjdCBhcmcsIC4uLikKK3sKKyAgZWFzc3VtZSAo MCA8IGNvdW50KTsKKyAgTGlzcF9PYmplY3QgdmFsID0gRmNvbnMgKGFyZywgUW5pbCk7CisgIExp c3BfT2JqZWN0IHRhaWwgPSB2YWw7CisgIHZhX2xpc3QgYXA7CisgIHZhX3N0YXJ0IChhcCwgYXJn KTsKKyAgZm9yIChwdHJkaWZmX3QgaSA9IDE7IGkgPCBjb3VudDsgaSsrKQorICAgIHsKKyAgICAg IExpc3BfT2JqZWN0IGVsZW0gPSBGY29ucyAodmFfYXJnIChhcCwgTGlzcF9PYmplY3QpLCBRbmls KTsKKyAgICAgIFhTRVRDRFIgKHRhaWwsIGVsZW0pOworICAgICAgdGFpbCA9IGVsZW07CisgICAg fQorICB2YV9lbmQgKGFwKTsKKyAgcmV0dXJuIHZhbDsKK30KKworTGlzcF9PYmplY3QKK21jX21l bXEgKExpc3BfT2JqZWN0IGVsdCwgTGlzcF9PYmplY3QgbGlzdCkKK3sKKyAgd2hpbGUgKDEpCisg ICAgeworICAgICAgaWYgKCFDT05TUCAobGlzdCkgfHwgRVEgKFhDQVIgKGxpc3QpLCBlbHQpKQor ICAgICAgICBicmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICAgIGlmICghQ09O U1AgKGxpc3QpIHx8IEVRIChYQ0FSIChsaXN0KSwgZWx0KSkKKyAgICAgICAgYnJlYWs7CisgICAg ICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KSB8fCBFUSAoWENB UiAobGlzdCksIGVsdCkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9IFhDRFIgKGxpc3Qp OworICAgIH0KKyAgcmV0dXJuIGxpc3Q7Cit9CisKK0xpc3BfT2JqZWN0CittY19udGggKGludCBu dW0sIExpc3BfT2JqZWN0IGxpc3QpCit7CisgIGZvciAoaW50IGkgPSAwOyBpIDwgbnVtICYmICFO SUxQIChsaXN0KTsgaSsrKQorICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgaWYgKENPTlNQIChs aXN0KSkKKyAgICByZXR1cm4gWENBUiAobGlzdCk7CisgICAgZWxzZQorICAgICAgcmV0dXJuIFFu aWw7Cit9CisKK0xpc3BfT2JqZWN0CittY19hc3NxIChMaXNwX09iamVjdCBrZXksIExpc3BfT2Jq ZWN0IGxpc3QpCit7CisgIHdoaWxlICgxKQorICAgIHsKKyAgICAgIGlmICghQ09OU1AgKGxpc3Qp CisgICAgICAgICAgfHwgKENPTlNQIChYQ0FSIChsaXN0KSkKKyAgICAgICAgICAgICAgJiYgRVEg KFhDQVIgKFhDQVIgKGxpc3QpKSwga2V5KSkpCisgICAgICAgIGJyZWFrOworICAgICAgbGlzdCA9 IFhDRFIgKGxpc3QpOworICAgICAgaWYgKCFDT05TUCAobGlzdCkKKyAgICAgICAgICB8fCAoQ09O U1AgKFhDQVIgKGxpc3QpKQorICAgICAgICAgICAgICAmJiBFUSAoWENBUiAoWENBUiAobGlzdCkp LCBrZXkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAg ICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisg ICAgICAgICAgICAgICYmIEVRIChYQ0FSIChYQ0FSIChsaXN0KSksIGtleSkpKQorICAgICAgICBi cmVhazsKKyAgICAgIGxpc3QgPSBYQ0RSIChsaXN0KTsKKyAgICB9CisgIGlmIChDT05TUCAobGlz dCkpCisgICAgcmV0dXJuIFhDQVIgKGxpc3QpOworICAgIGVsc2UKKyAgICAgIHJldHVybiBRbmls OworfQorCitMaXNwX09iamVjdAorbWNfYXNzb2MgKExpc3BfT2JqZWN0IGtleSwgTGlzcF9PYmpl Y3QgbGlzdCkKK3sKKyAgTGlzcF9PYmplY3QgY2FyOworICB3aGlsZSAoMSkKKyAgICB7CisgICAg ICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisg ICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAg ICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAg ICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChs aXN0KQorICAgICAgICAgIHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYm IChjYXIgPSBYQ0FSIChYQ0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBr ZXkpIHx8ICFOSUxQIChGZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAg ICBsaXN0ID0gWENEUiAobGlzdCk7CisgICAgICBpZiAoIUNPTlNQIChsaXN0KQorICAgICAgICAg IHx8IChDT05TUCAoWENBUiAobGlzdCkpCisgICAgICAgICAgICAgICYmIChjYXIgPSBYQ0FSIChY Q0FSIChsaXN0KSksCisgICAgICAgICAgICAgICAgICBFUSAoY2FyLCBrZXkpIHx8ICFOSUxQIChG ZXF1YWwgKGNhciwga2V5KSkpKSkKKyAgICAgICAgYnJlYWs7CisgICAgICBsaXN0ID0gWENEUiAo bGlzdCk7CisgICAgfQorICBpZiAoQ09OU1AgKGxpc3QpKQorICAgIHJldHVybiBYQ0FSIChsaXN0 KTsKKyAgICBlbHNlCisgICAgICByZXR1cm4gUW5pbDsKK30KKworTGlzcF9PYmplY3QKK21jX3Bs aXN0X2dldCAoTGlzcF9PYmplY3QgcGxpc3QsIExpc3BfT2JqZWN0IHByb3ApCit7CisgIExpc3Bf T2JqZWN0IHRhaWwsIGhhbGZ0YWlsOworICAvKiBoYWxmdGFpbCBpcyB1c2VkIHRvIGRldGVjdCBj aXJjdWxhciBsaXN0cy4gICovCisgIHRhaWwgPSBoYWxmdGFpbCA9IHBsaXN0OworICB3aGlsZSAo Q09OU1AgKHRhaWwpICYmIENPTlNQIChYQ0RSICh0YWlsKSkpCisgICAgeworICAgICAgaWYgKEVR IChwcm9wLCBYQ0FSICh0YWlsKSkpCisgICAgICAgIHJldHVybiBYQ0FSIChYQ0RSICh0YWlsKSk7 CisgICAgICB0YWlsID0gWENEUiAoWENEUiAodGFpbCkpOworICAgICAgaGFsZnRhaWwgPSBYQ0RS IChoYWxmdGFpbCk7CisgICAgICBpZiAoRVEgKHRhaWwsIGhhbGZ0YWlsKSkKKyAgICAgICAgYnJl YWs7CisgICAgfQorICByZXR1cm4gUW5pbDsKK30KKworLyogUkVHSU9OIEJFR0lOOiAgbWNfcmVn aW9uX2xpbWl0ICgxKQorICAgUkVHSU9OIEVORDogIG1jX3JlZ2lvbl9saW1pdCAoMCkgKi8KK3B0 cmRpZmZfdAorbWNfcmVnaW9uX2xpbWl0IChib29sIGJlZ2luX3ApCit7CisgIGlmICghTklMUCAo VnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAmJiBOSUxQIChWbWFya19ldmVuX2lmX2luYWN0 aXZlKQorICAgICAgJiYgTklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIG1hcmtfYWN0aXZlKSkp CisgICAgeHNpZ25hbDAgKFFtYXJrX2luYWN0aXZlKTsKKyAgTGlzcF9PYmplY3QgbWFya2VyID0g QlZBUiAoY3VycmVudF9idWZmZXIsIG1hcmspOworICBpbnQgbSA9IChYTUFSS0VSIChtYXJrZXIp LT5idWZmZXIpCisgICAgICAgICAgPyBYTUFSS0VSIChtYXJrZXIpLT5jaGFycG9zCisgICAgICAg ICAgOiAtMTsKKyAgcmV0dXJuIChtID09IC0xKQorICAgICAgICAgICA/IC0xCisgICAgICAgICA6 IChQVCA8IG0pID09IGJlZ2luX3AKKyAgICAgICAgICAgPyBQVAorICAgICAgICAgOiBjbGlwX3Rv X2JvdW5kcyAoQkVHViwgbSwgWlYpOworfQorCisvKiBDaGVjayB0aGUgcHJlc2VuY2Ugb2YgYSBk aXNwbGF5IHByb3BlcnR5IGFuZCBjb21wdXRlIGl0cyB3aWR0aC4KKyAgIElmIGEgcHJvcGVydHkg d2FzIGZvdW5kIGFuZCBpdHMgd2lkdGggd2FzIGZvdW5kIGFzIHdlbGwsIHJldHVybgorICAgaXRz IHdpZHRoICg+PSAwKSBhbmQgc2V0IHRoZSBwb3NpdGlvbiBvZiB0aGUgZW5kIG9mIHRoZSBwcm9w ZXJ0eQorICAgaW4gRU5EUE9TLgorICAgT3RoZXJ3aXNlIGp1c3QgcmV0dXJuIC0xLiAqLworc3Rh dGljIGludAorbWNfY2hlY2tfZGlzcGxheV93aWR0aCAocHRyZGlmZl90IHBvcywgcHRyZGlmZl90 IGNvbCwgcHRyZGlmZl90ICplbmRwb3MpCit7CisgIExpc3BfT2JqZWN0IHZhbCwgb3ZlcmxheTsK KyAgaWYgKENPTlNQICh2YWwgPSBnZXRfY2hhcl9wcm9wZXJ0eV9hbmRfb3ZlcmxheQorICAgICAg ICAgICAgICAobWFrZV9maXhudW0gKHBvcyksIFFkaXNwbGF5LCBRbmlsLCAmb3ZlcmxheSkpCisg ICAgICAmJiBFUSAoUXNwYWNlLCBYQ0FSICh2YWwpKSkKKyAgICB7IC8qIEZJWE1FOiBVc2UgY2Fs Y19waXhlbF93aWR0aF9vcl9oZWlnaHQuICovCisgICAgICBMaXNwX09iamVjdCBwbGlzdCA9IFhD RFIgKHZhbCksIHByb3A7CisgICAgICBpbnQgd2lkdGggPSAtMTsKKyAgICAgIEVNQUNTX0lOVCBh bGlnbl90b19tYXggPSAoY29sIDwgTU9TVF9QT1NJVElWRV9GSVhOVU0gLSBJTlRfTUFYCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChFTUFDU19JTlQpIElOVF9NQVggKyBjb2wK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTU9TVF9QT1NJVElWRV9GSVhOVU0p OworICAgICAgaWYgKChwcm9wID0gbWNfcGxpc3RfZ2V0IChwbGlzdCwgUUN3aWR0aCksIFJBTkdF RF9GSVhOVU1QICgwLCBwcm9wLCBJTlRfTUFYKSkKKyAgICAgICAgICB8fCAocHJvcCA9IG1jX3Bs aXN0X2dldCAocGxpc3QsIFFDcmVsYXRpdmVfd2lkdGgpLAorICAgICAgICAgICAgICBSQU5HRURf RklYTlVNUCAoMCwgcHJvcCwgSU5UX01BWCkpKQorICAgICAgICB3aWR0aCA9IFhGSVhOVU0gKHBy b3ApOworICAgICAgICBlbHNlIGlmIChGTE9BVFAgKHByb3ApICYmIDAgPD0gWEZMT0FUX0RBVEEg KHByb3ApCisgICAgICAgICAgICAgICAgICYmIFhGTE9BVF9EQVRBIChwcm9wKSA8PSBJTlRfTUFY KQorICAgICAgICAgIHdpZHRoID0gKGludCkoWEZMT0FUX0RBVEEgKHByb3ApICsgMC41KTsKKyAg ICAgICAgICBlbHNlIGlmICgocHJvcCA9IG1jX3BsaXN0X2dldCAocGxpc3QsIFFDYWxpZ25fdG8p LAorICAgICAgICAgICAgICAgICAgICBSQU5HRURfRklYTlVNUCAoY29sLCBwcm9wLCBhbGlnbl90 b19tYXgpKSkKKyAgICAgICAgICAgIHdpZHRoID0gWEZJWE5VTSAocHJvcCkgLSBjb2w7CisgICAg ICAgICAgICAgIGVsc2UgaWYgKEZMT0FUUCAocHJvcCkgJiYgY29sIDw9IFhGTE9BVF9EQVRBIChw cm9wKQorICAgICAgICAgICAgICAgICAgICAgICAmJiAoWEZMT0FUX0RBVEEgKHByb3ApIDw9IGFs aWduX3RvX21heCkpCisgICAgICAgICAgICAgICAgd2lkdGggPSAoaW50KShYRkxPQVRfREFUQSAo cHJvcCkgKyAwLjUpIC0gY29sOworICAgICAgaWYgKHdpZHRoID49IDApCisgICAgICAgIHsKKyAg ICAgICAgICBwdHJkaWZmX3Qgc3RhcnQ7CisgICAgICAgICAgaWYgKE9WRVJMQVlQIChvdmVybGF5 KSkKKyAgICAgICAgICAgICplbmRwb3MgPSBPVkVSTEFZX1BPU0lUSU9OIChPVkVSTEFZX0VORCAo b3ZlcmxheSkpOworICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBnZXRfcHJvcGVydHlf YW5kX3JhbmdlIChwb3MsIFFkaXNwbGF5LCAmdmFsLCAmc3RhcnQsIGVuZHBvcywgUW5pbCk7Cisg ICAgICAgICAgLyogRm9yIDpyZWxhdGl2ZS13aWR0aCwgd2UgbmVlZCB0byBtdWx0aXBseSBieSB0 aGUgY29sdW1uCisgICAgICAgICAgICAgd2lkdGggb2YgdGhlIGNoYXJhY3RlciBhdCBQT1MsIGlm IGl0IGlzIGdyZWF0ZXIgdGhhbiAxLiAqLworICAgICAgICAgIGlmICghTklMUCAobWNfcGxpc3Rf Z2V0IChwbGlzdCwgUUNyZWxhdGl2ZV93aWR0aCkpCisgICAgICAgICAgICAgICYmICFOSUxQIChC VkFSIChjdXJyZW50X2J1ZmZlciwgZW5hYmxlX211bHRpYnl0ZV9jaGFyYWN0ZXJzKSkpCisgICAg ICAgICAgICB7CisgICAgICAgICAgICAgIGludCBiLCB3ZDsKKyAgICAgICAgICAgICAgdW5zaWdu ZWQgY2hhciAqcCA9IEJZVEVfUE9TX0FERFIgKENIQVJfVE9fQllURSAocG9zKSk7CisgICAgICAg ICAgICAgIE1DX01VTFRJQllURV9CWVRFU19XSURUSCAocCwgYnVmZmVyX2Rpc3BsYXlfdGFibGUg KCksIGIsIHdkKTsKKyAgICAgICAgICAgICAgd2lkdGggKj0gd2Q7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgcmV0dXJuIHdpZHRoOworICAgICAgICB9CisgICAgfQorICByZXR1cm4gLTE7Cit9 CisKKy8qIFRyeSB0byBjb21wb3NlIHRoZSBjaGFyYWN0ZXJzIGF0IENIQVJQT1MgYWNjb3JkaW5n IHRvIGNvbXBvc2l0aW9uCisgICBydWxlIFJVTEUgKFtQQVRURVJOIFB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7CisgIGlm IChOSUxQIChyZSkpCisgICAgbGVuID0gMTsKKyAgZWxzZSBpZiAoISBTVFJJTkdQIChyZSkpCisg ICAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIFFuaWwpOworICBlbHNlIGlmICgobGVuID0gZmFz dF9sb29raW5nX2F0IChyZSwgY2hhcnBvcywgYnl0ZXBvcywgbGltaXQsIC0xLCBzdHJpbmcpKQor ICAgICAgICAgICA+IDApCisgICAgeworICAgICAgaWYgKE5JTFAgKHN0cmluZykpCisgICAgICAg IGxlbiA9IEJZVEVfVE9fQ0hBUiAoYnl0ZXBvcyArIGxlbikgLSBjaGFycG9zOworICAgICAgZWxz ZQorICAgICAgICBsZW4gPSBzdHJpbmdfYnl0ZV90b19jaGFyIChzdHJpbmcsIGJ5dGVwb3MgKyBs ZW4pIC0gY2hhcnBvczsKKyAgICB9CisgIGlmIChsZW4gPD0gMCkKKyAgICByZXR1cm4gdW5iaW5k X3RvIChjb3VudCwgUW5pbCk7CisgIHRvID0gbGltaXQgPSBjaGFycG9zICsgbGVuOworI2lmZGVm IEhBVkVfV0lORE9XX1NZU1RFTQorICBpZiAoRlJBTUVfV0lORE9XX1AgKGYpKQorICAgIHsKKyAg ICAgIGZvbnRfb2JqZWN0ID0gZm9udF9yYW5nZSAoY2hhcnBvcywgYnl0ZXBvcywgJnRvLCB3aW4s IGZhY2UsIHN0cmluZyk7CisgICAgICBpZiAoISBGT05UX09CSkVDVF9QIChmb250X29iamVjdCkK KyAgICAgICAgICB8fCAoISBOSUxQIChyZSkKKyAgICAgICAgICAgICAgJiYgdG8gPCBsaW1pdAor ICAgICAgICAgICAgICAmJiAoZmFzdF9sb29raW5nX2F0IChyZSwgY2hhcnBvcywgYnl0ZXBvcywg dG8sIC0xLCBzdHJpbmcpIDw9IDApKSkKKyAgICAgICAgcmV0dXJuIHVuYmluZF90byAoY291bnQs IFFuaWwpOworICAgIH0KKyAgZWxzZQorI2VuZGlmICAgICAgICAvKiBub3QgSEFWRV9XSU5ET1df U1lTVEVNICovCisgICAgZm9udF9vYmplY3QgPSB3aW4tPmZyYW1lOworICBsZ3N0cmluZyA9IEZj b21wb3NpdGlvbl9nZXRfZ3N0cmluZyAocG9zLCBtYWtlX2ZpeG51bSAodG8pLCBmb250X29iamVj dCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyk7CisgIGlm IChOSUxQIChMR1NUUklOR19JRCAobGdzdHJpbmcpKSkKKyAgICB7CisgICAgICAvKiBTYXZlIHBv aW50IGFzIG1hcmtlciBiZWZvcmUgY2FsbGluZyBvdXQgdG8gbGlzcC4gICovCisgICAgICBpZiAo TklMUCAoc3RyaW5nKSkKKyAgICAgICAgcmVjb3JkX3Vud2luZF9wcm90ZWN0IChyZXN0b3JlX3Bv aW50X3Vud2luZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZF9tYXJrZXIg KGN1cnJlbnRfYnVmZmVyLCBwdCwgcHRfYnl0ZSkpOworICAgICAgbGdzdHJpbmcgPSBzYWZlX2Nh bGwgKDYsIFZhdXRvX2NvbXBvc2l0aW9uX2Z1bmN0aW9uLCBBUkVGIChydWxlLCAyKSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBwb3MsIG1ha2VfZml4bnVtICh0byksIGZvbnRfb2JqZWN0 LCBzdHJpbmcpOworICAgIH0KKyAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIGxnc3RyaW5nKTsK K30KKworLyogQ2hlY2sgaWYgdGhlIGNoYXJhY3RlciBhdCBDSEFSUE9TIChhbmQgQllURVBPUykg aXMgY29tcG9zZWQKKyAgIChwb3NzaWJseSB3aXRoIHRoZSBmb2xsb3dpbmcgY2hhcmFjdGVycykg b24gd2luZG93IFcuICBFTkRQT1MgbGltaXRzCisgICBjaGFyYWN0ZXJzIHRvIGJlIGNvbXBvc2Vk LiAgRkFDRSwgaWYgbm9uLU5VTEwsIGlzIGEgYmFzZSBmYWNlIG9mCisgICB0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dCBj b21wb3NlZC4gICovCisgICAgICAgIHJldHVybiAwOworICAgIH0KKyAgaWYgKGVuZHBvcyA8IDAp CisgICAgZW5kcG9zID0gTklMUCAoc3RyaW5nKSA/IEJFR1YgOiAwOworICBpZiAoY21wX2l0LT5j aCA8IDApCisgICAgeworICAgICAgLyogV2UgYXJlIGxvb2tpbmcgYXQgYSBzdGF0aWMgY29tcG9z aXRpb24uICAqLworICAgICAgcHRyZGlmZl90IHN0YXJ0LCBlbmQ7CisgICAgICBMaXNwX09iamVj dCBwcm9wOworICAgICAgZmluZF9jb21wb3NpdGlvbiAoY2hhcnBvcywgLTEsICZzdGFydCwgJmVu ZCwgJnByb3AsIHN0cmluZyk7CisgICAgICBjbXBfaXQtPmlkID0gZ2V0X2NvbXBvc2l0aW9uX2lk IChjaGFycG9zLCBieXRlcG9zLCBlbmQgLSBzdGFydCwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHByb3AsIHN0cmluZyk7CisgICAgICBpZiAoY21wX2l0LT5pZCA8IDAp CisgICAgICAgIGdvdG8gbm9fY29tcG9zaXRpb247CisgICAgICBjbXBfaXQtPm5jaGFycyA9IGVu ZCAtIHN0YXJ0OworICAgICAgY21wX2l0LT5uZ2x5cGhzID0gY29tcG9zaXRpb25fdGFibGVbY21w X2l0LT5pZF0tPmdseXBoX2xlbjsKKyAgICB9CisgIGVsc2UgaWYgKHcpCisgICAgeworICAgICAg TGlzcF9PYmplY3QgbGdzdHJpbmcgPSBRbmlsOworICAgICAgTGlzcF9PYmplY3QgdmFsLCBlbHQ7 CisgICAgICBwdHJkaWZmX3QgaTsKKyAgICAgIHZhbCA9IENIQVJfVEFCTEVfUkVGIChWY29tcG9z aXRpb25fZnVuY3Rpb25fdGFibGUsIGNtcF9pdC0+Y2gpOworICAgICAgZm9yIChpID0gMDsgaSA8 IGNtcF9pdC0+cnVsZV9pZHg7IGkrKywgdmFsID0gWENEUiAodmFsKSk7CisgICAgICBpZiAoY2hh cnBvcyA8IGVuZHBvcykKKyAgICAgICAgeworICAgICAgICAgIGZvciAoOyBDT05TUCAodmFsKTsg dmFsID0gWENEUiAodmFsKSkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgZWx0ID0gWENB UiAodmFsKTsKKyAgICAgICAgICAgICAgaWYgKCEgVkVDVE9SUCAoZWx0KSB8fCBBU0laRSAoZWx0 KSAhPSAzCisgICAgICAgICAgICAgICAgICB8fCAhIElOVEVHRVJQIChBUkVGIChlbHQsIDEpKSkK KyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgaWYgKFhGSVhOQVQgKEFS RUYgKGVsdCwgMSkpICE9IGNtcF9pdC0+bG9va2JhY2spCisgICAgICAgICAgICAgICAgZ290byBu b19jb21wb3NpdGlvbjsKKyAgICAgICAgICAgICAgbGdzdHJpbmcgPSBtY19hdXRvY21wX2NoYXJz IChlbHQsIGNoYXJwb3MsIGJ5dGVwb3MsIGVuZHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB3LCBmYWNlLCBzdHJpbmcpOworICAgICAgICAgICAgICBpZiAoY29t cG9zaXRpb25fZ3N0cmluZ19wIChsZ3N0cmluZykpCisgICAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICAgIGxnc3RyaW5nID0gUW5pbDsKKyAgICAgICAgICAgICAgLyogQ29tcG9zaXRp b24gZmFpbGVkIHBlcmhhcHMgYmVjYXVzZSB0aGUgZm9udCBkb2Vzbid0CisgICAgICAgICAgICAg ICAgIHN1cHBvcnQgc3VmZmljaWVudCByYW5nZSBvZiBjaGFyYWN0ZXJzLiAgVHJ5IHRoZQorICAg ICAgICAgICAgICAgICBvdGhlciBjb21wb3NpdGlvbiBydWxlcyBpZiBhbnkuICAqLworICAgICAg ICAgICAgfQorICAgICAgICAgIGNtcF9pdC0+cmV2ZXJzZWRfcCA9IDA7CisgICAgICAgIH0KKyAg ICAgIGVsc2UKKyAgICAgICAgeworICAgICAgICAgIHB0cmRpZmZfdCBjcG9zID0gY2hhcnBvcywg YnBvcyA9IGJ5dGVwb3M7CisgICAgICAgICAgY21wX2l0LT5yZXZlcnNlZF9wID0gMTsKKyAgICAg ICAgICBlbHQgPSBYQ0FSICh2YWwpOworICAgICAgICAgIGlmIChjbXBfaXQtPmxvb2tiYWNrID4g MCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY3BvcyA9IGNoYXJwb3MgLSBjbXBfaXQt Pmxvb2tiYWNrOworICAgICAgICAgICAgICBpZiAoU1RSSU5HUCAoc3RyaW5nKSkKKyAgICAgICAg ICAgICAgICBicG9zID0gc3RyaW5nX2NoYXJfdG9fYnl0ZSAoc3RyaW5nLCBjcG9zKTsKKyAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIGJwb3MgPSBDSEFSX1RPX0JZVEUgKGNwb3Mp OworICAgICAgICAgICAgfQorICAgICAgICAgIGxnc3RyaW5nID0gbWNfYXV0b2NtcF9jaGFycyAo ZWx0LCBjcG9zLCBicG9zLCBjaGFycG9zICsgMSwgdywgZmFjZSwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHN0cmluZyk7CisgICAgICAgICAgaWYgKCEgY29tcG9zaXRpb25f Z3N0cmluZ19wIChsZ3N0cmluZykKKyAgICAgICAgICAgICAgfHwgY3BvcyArIExHU1RSSU5HX0NI QVJfTEVOIChsZ3N0cmluZykgLSAxICE9IGNoYXJwb3MpCisgICAgICAgICAgICAvKiBDb21wb3Np dGlvbiBmYWlsZWQgb3IgZGlkbid0IGNvdmVyIHRoZSBjdXJyZW50CisgICAgICAgICAgICAgICBj aGFyYWN0ZXIuICAqLworICAgICAgICAgICAgZ290byBub19jb21wb3NpdGlvbjsKKyAgICAgICAg fQorICAgICAgaWYgKE5JTFAgKGxnc3RyaW5nKSkKKyAgICAgICAgZ290byBub19jb21wb3NpdGlv bjsKKyAgICAgIGlmIChOSUxQIChMR1NUUklOR19JRCAobGdzdHJpbmcpKSkKKyAgICAgICAgbGdz dHJpbmcgPSBjb21wb3NpdGlvbl9nc3RyaW5nX3B1dF9jYWNoZSAobGdzdHJpbmcsIC0xKTsKKyAg ICAgIGNtcF9pdC0+aWQgPSBYRklYTlVNIChMR1NUUklOR19JRCAobGdzdHJpbmcpKTsKKyAgICAg IGZvciAoaSA9IDA7IGkgPCBMR1NUUklOR19HTFlQSF9MRU4gKGxnc3RyaW5nKTsgaSsrKQorICAg ICAgICBpZiAoTklMUCAoTEdTVFJJTkdfR0xZUEggKGxnc3RyaW5nLCBpKSkpCisgICAgICAgICAg YnJlYWs7CisgICAgICBjbXBfaXQtPm5nbHlwaHMgPSBpOworICAgICAgY21wX2l0LT5mcm9tID0g MDsKKyAgICAgIGNtcF9pdC0+dG8gPSBpOworICAgIH0KKyAgZWxzZQorICAgIGdvdG8gbm9fY29t cG9zaXRpb247CisgIHJldHVybiAxOworIG5vX2NvbXBvc2l0aW9uOgorICBpZiAoY2hhcnBvcyA9 PSBlbmRwb3MpCisgICAgcmV0dXJuIDA7CisgIGlmIChjaGFycG9zIDwgZW5kcG9zKQorICAgIHsK KyAgICAgIGNoYXJwb3MrKzsKKyAgICAgIGlmIChOSUxQIChzdHJpbmcpKQorICAgICAgICBJTkNf UE9TIChieXRlcG9zKTsKKyAgICAgIGVsc2UKKyAgICAgICAgYnl0ZXBvcyArPSBCWVRFU19CWV9D SEFSX0hFQUQgKCooU0RBVEEgKHN0cmluZykgKyBieXRlcG9zKSk7CisgICAgfQorICBlbHNlCisg ICAgeworICAgICAgY2hhcnBvcy0tOworICAgICAgLyogQllURVBPUyBpcyBjYWxjdWxhdGVkIGlu IGNvbXBvc2l0aW9uX2NvbXB1dGVfc3RvcF9wb3MgKi8KKyAgICAgIGJ5dGVwb3MgPSAtMTsKKyAg ICB9CisgIGlmIChjbXBfaXQtPnJldmVyc2VkX3ApCisgICAgZW5kcG9zID0gLTE7CisgIGNvbXBv c2l0aW9uX2NvbXB1dG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pb24uICovCisgIHdoaWxlIChzY2FuIDwgZW5kKQor ICAgIHsKKyAgICAgIGludCBjOworICAgICAgLyogT2NjYXNpb25hbGx5IHdlIG1heSBuZWVkIHRv IHNraXAgaW52aXNpYmxlIHRleHQuICovCisgICAgICB3aGlsZSAoc2NhbiA9PSBuZXh0X2JvdW5k YXJ5KQorICAgICAgICB7CisgICAgICAgICAgcHRyZGlmZl90IG9sZF9zY2FuID0gc2NhbjsKKyAg ICAgICAgICAvKiBUaGlzIHVwZGF0ZXMgTkVYVF9CT1VOREFSWSB0byB0aGUgbmV4dCBwbGFjZQor ICAgICAgICAgICAgIHdoZXJlIHdlIG1pZ2h0IG5lZWQgdG8gc2tpcCBtb3JlIGludmlzaWJsZSB0 ZXh0LiAqLworICAgICAgICAgIHNjYW4gPSBza2lwX2ludmlzaWJsZSAoc2NhbiwgJm5leHRfYm91 bmRhcnksIGVuZCwgUW5pbCk7CisgICAgICAgICAgaWYgKHNjYW4gIT0gb2xkX3NjYW4pCisgICAg ICAgICAgICBzY2FuX2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOworICAgICAgICAgIGlmIChz Y2FuID49IGVuZCkKKyAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgfQorICAgICAg LyogVGVzdCByZWFjaGluZyB0aGUgZ29hbCBjb2x1bW4uICBXZSBkbyB0aGlzIGFmdGVyIHNraXBw aW5nCisgICBpbnZpc2libGUgY2hhcmFjdGVycywgc28gdGhhdCB3ZSBwdXQgcG9pbnQgYmVmb3Jl IHRoZQorICAgY2hhcmFjdGVyIG9uIHdoaWNoIHRoZSBjdXJzb3Igd2lsbCBhcHBlYXIuICovCisg ICAgICBpZiAoY29sID49IGdvYWwpCisgICAgICAgIGJyZWFrOworICAgICAgcHJldl9jb2wgPSBj b2w7CisgICAgICB7IC8qIENoZWNrIGRpc3BsYXkgcHJvcGVydHkuICovCisgICAgICAgIHB0cmRp ZmZfdCBlbmRwOworICAgICAgICBpbnQgd2lkdGggPSBtY19jaGVja19kaXNwbGF5X3dpZHRoIChz Y2FuLCBjb2wsICZlbmRwKTsKKyAgICAgICAgaWYgKHdpZHRoID49IDApCisgICAgICAgICAgewor ICAgICAgICAgICAgY29sICs9IHdpZHRoOworICAgICAgICAgICAgaWYgKGVuZHAgPiBzY2FuKSAv KiBBdm9pZCBpbmZpbml0ZSBsb29wcyB3aXRoIDAtd2lkdGggb3ZlcmxheXMuICovCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICBzY2FuID0gZW5kcDsKKyAgICAgICAgICAgICAgICBz Y2FuX2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOworICAgICAgICAgICAgICAgIGNvbnRpbnVl OworICAgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgfQorICAgICAgLyogQ2hlY2sg Y29tcG9zaXRpb24gc2VxdWVuY2UuICovCisgICAgICBpZiAoY21wX2l0LmlkID49IDAKKyAgICAg ICAgICB8fCAoc2NhbiA9PSBjbXBfaXQuc3RvcF9wb3MKKyAgICAgICAgICAgICAgJiYgbWNfY29t cG9zaXRpb25fcmVzZWF0X2l0ICgmY21wX2l0LCBzY2FuLCBzY2FuX2J5dGUsIGVuZCwgdywgTlVM TCwgUW5pbCkpKQorICAgICAgICBjb21wb3NpdGlvbl91cGRhdGVfaXQgKCZjbXBfaXQsIHNjYW4s IHNjYW5fYnl0ZSwgUW5pbCk7CisgICAgICBpZiAoY21wX2l0LmlkID49IDApCisgICAgICAgIHsK KyAgICAgICAgICBzY2FuICs9IGNtcF9pdC5uY2hhcnM7CisgICAgICAgICAgc2Nhbl9ieXRlICs9 IGNtcF9pdC5uYnl0ZXM7CisgICAgICAgICAgaWYgKHNjYW4gPD0gZW5kKQorICAgICAgICAgICAg Y29sICs9IGNtcF9pdC53aWR0aDsKKyAgICAgICAgICBpZiAoY21wX2l0LnRvID09IGNtcF9pdC5u Z2x5cGhzKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBjbXBfaXQuaWQgPSAtMTsKKyAg ICAgICAgICAgICAgY29tcG9zaXRpb25fY29tcHV0ZV9zdG9wX3BvcyAoJmNtcF9pdCwgc2Nhbiwg c2Nhbl9ieXRlLCBlbmQsIFFuaWwpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQor ICAgICAgICAgICAgICBjbXBfaXQuZnJvbSA9IGNtcF9pdC50bzsKKyAgICAgICAgICBjb250aW51 ZTsKKyAgICAgICAgfQorICAgICAgYyA9IEZFVENIX0JZVEUgKHNjYW5fYnl0ZSk7CisgICAgICAv KiBTZWUgaWYgdGhlcmUgaXMgYSBkaXNwbGF5IHRhYmxlIGFuZCBpdCByZWxhdGVzIHRvIHRoaXMg Y2hhcmFjdGVyLiAqLworICAgICAgaWYgKGRwICE9IDAKKyAgICAgICAgICAmJiAhIChtdWx0aWJ5 dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQorICAgICAgICAgICYmIFZFQ1RPUlAgKERJU1BfQ0hB Ul9WRUNUT1IgKGRwLCBjKSkpCisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBjaGFy dmVjOworICAgICAgICAgIHB0cmRpZmZfdCBpLCBuOworICAgICAgICAgIC8qIFRoaXMgY2hhcmFj dGVyIGlzIGRpc3BsYXllZCB1c2luZyBhIHZlY3RvciBvZiBnbHlwaHMuCisgICAgICAgICAgICAg VXBkYXRlIHRoZSBjb2x1bW4vcG9zaXRpb24gYmFzZWQgb24gdGhvc2UgZ2x5cGhzLiAqLworICAg ICAgICAgIGNoYXJ2ZWMgPSBESVNQX0NIQVJfVkVDVE9SIChkcCwgYyk7CisgICAgICAgICAgbiA9 IEFTSVpFIChjaGFydmVjKTsKKyAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgaSsrKQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICAvKiBUaGlzIHNob3VsZCBiZSBoYW5kbGVkIHRoZSBz YW1lIGFzCisgICAgICAgICAgICAgIG5leHRfZWxlbWVudF9mcm9tX2Rpc3BsYXlfdmVjdG9yIGRv ZXMgaXQuICovCisgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGVudHJ5ID0gQVJFRiAoY2hhcnZl YywgaSk7CisgICAgICAgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5KSkKKyAgICAgICAg ICAgICAgICBjID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgICAgICAgIGVsc2UK KyAgICAgICAgICAgICAgICBjID0gJyAnOworICAgICAgICAgICAgICBpZiAoYyA9PSAnXG4nKQor ICAgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1xy JyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQor ICAgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgICAgICAgaWYgKGMgPT0gJ1x0 JykKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBjb2wgKz0gdGFiX3dpZHRo OworICAgICAgICAgICAgICAgICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFiX3dpZHRoOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAg ICArK2NvbDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAg ICAgeworICAgICAgICAgICAgLyogVGhlIGRpc3BsYXkgdGFibGUgZG9lc24ndCBhZmZlY3QgdGhp cyBjaGFyYWN0ZXI7CisgICAgICAgICAgICAgICBpdCBkaXNwbGF5cyBhcyBpdHNlbGYuICovCisg ICAgICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgICAgICAgICAgICBnb3RvIGVuZGxvb3A7Cisg ICAgICAgICAgICBpZiAoYyA9PSAnXHInICYmIEVRIChCVkFSIChjdXJyZW50X2J1ZmZlciwgc2Vs ZWN0aXZlX2Rpc3BsYXkpLCBRdCkpCisgICAgICAgICAgICAgIGdvdG8gZW5kbG9vcDsKKyAgICAg ICAgICAgIGlmIChjID09ICdcdCcpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBj b2wgKz0gdGFiX3dpZHRoOworICAgICAgICAgICAgICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAq IHRhYl93aWR0aDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBlbHNlIGlmIChtdWx0 aWJ5dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgIC8qIFN0YXJ0IG9mIG11bHRpLWJ5dGUgZm9ybS4gKi8KKyAgICAgICAgICAgICAg ICAgIHVuc2lnbmVkIGNoYXIgKnB0cjsKKyAgICAgICAgICAgICAgICAgIGludCBieXRlcywgd2lk dGg7CisgICAgICAgICAgICAgICAgICBwdHIgPSBCWVRFX1BPU19BRERSIChzY2FuX2J5dGUpOwor ICAgICAgICAgICAgICAgICAgTUNfTVVMVElCWVRFX0JZVEVTX1dJRFRIIChwdHIsIGRwLCBieXRl cywgd2lkdGgpOworICAgICAgICAgICAgICAgICAgLyogU3VidHJhY3Qgb25lIHRvIGNvbXBlbnNh dGUgZm9yIHRoZSBpbmNyZW1lbnQKKyAgICAgICAgICAgICAgICAgIHRoYXQgaXMgZ29pbmcgdG8g aGFwcGVuIGJlbG93LiAqLworICAgICAgICAgICAgICAgICAgc2Nhbl9ieXRlICs9IGJ5dGVzIC0g MTsKKyAgICAgICAgICAgICAgICAgIGNvbCArPSB3aWR0aDsKKyAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgZWxzZSBpZiAoY3RsX2Fycm93ICYmIChjIDwgMDQwIHx8IGMgPT0gMDE3 NykpCisgICAgICAgICAgICAgICAgICBjb2wgKz0gMjsKKyAgICAgICAgICAgICAgICAgIGVsc2Ug aWYgKGMgPCAwNDAgfHwgYyA+PSAwMTc3KQorICAgICAgICAgICAgICAgICAgICBjb2wgKz0gNDsK KyAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIGNvbCsrOwor ICAgICAgICAgIH0KKyAgICAgIHNjYW4rKzsKKyAgICAgIHNjYW5fYnl0ZSsrOworICAgIH0KKyBl bmRsb29wOgorICBsYXN0X2tub3duX2NvbHVtbiA9IGNvbDsKKyAgbGFzdF9rbm93bl9jb2x1bW5f cG9pbnQgPSBwdDsKKyAgbGFzdF9rbm93bl9jb2x1bW5fbW9kaWZpZWQgPSBNT0RJRkY7CisgIGlm IChnb2FsY29sKQorICAgICpnb2FsY29sID0gY29sOworICBpZiAoZW5kcG9zKQorICAgICplbmRw b3MgPSBzY2FuOworICBpZiAocHJldmNvbCkKKyAgICAqcHJldmNvbCA9IHByZXZfY29sOworfQor CitwdHJkaWZmX3QKK21jX2N1cnJlbnRfY29sdW1uIChzdHJ1Y3Qgd2luZG93ICp3LCBwdHJkaWZm X3QgcHQpCit7CisgIC8qIGBidWZfY2hhcnBvc190b19ieXRlcG9zJzogIGVhc3NlcnQgKEJVRl9C RUcgKGIpIDw9IGNoYXJwb3MgJiYgY2hhcnBvcyA8PSBCVUZfWiAoYikpOyAqLworICBzdHJ1Y3Qg YnVmZmVyICpiID0gWEJVRkZFUiAody0+Y29udGVudHMpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRf YnVmZmVyID0gTlVMTDsKKyAgaWYgKGIgIT0gY3VycmVudF9idWZmZXIpCisgICAgeworICAgICAg b2xkX2J1ZmZlciA9IGN1cnJlbnRfYnVmZmVyOworICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAo Yik7CisgICAgfQorICBib29sIGJhcmZfY3Jhc2ggPSAoQlVGX0JFRyAoYikgPD0gcHQgJiYgcHQg PD0gQlVGX1ogKGIpKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2gpCisgICAgewor ICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9i dWZmZXIpOworICAgICAgcmV0dXJuIDA7CisgICAgfQorICBFTUFDU19JTlQgbGFzdF9rbm93bl9j b2x1bW5fbW9kaWZpZWQgPSAwOworICBwdHJkaWZmX3QgbGFzdF9rbm93bl9jb2x1bW4gPSAwOwor ICBwdHJkaWZmX3QgY29sOworICB1bnNpZ25lZCBjaGFyICpwdHIsICpzdG9wOworICBib29sIHRh Yl9zZWVuOworICBwdHJkaWZmX3QgcG9zdF90YWI7CisgIGludCBjOworICBpbnQgdGFiX3dpZHRo ID0gU0FORV9UQUJfV0lEVEggKGN1cnJlbnRfYnVmZmVyKTsKKyAgYm9vbCBjdGxfYXJyb3cgPSAh TklMUCAoQlZBUiAoY3VycmVudF9idWZmZXIsIGN0bF9hcnJvdykpOworICBzdHJ1Y3QgTGlzcF9D aGFyX1RhYmxlICpkcCA9IGJ1ZmZlcl9kaXNwbGF5X3RhYmxlICgpOworICBpZiAocHQgPT0gbGFz dF9rbm93bl9jb2x1bW5fcG9pbnQKKyAgICAgICYmIE1PRElGRiA9PSBsYXN0X2tub3duX2NvbHVt bl9tb2RpZmllZCkKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0X2J1 ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm4gbGFzdF9rbm93bl9jb2x1 bW47CisgICAgfQorICAvKiBJZiB0aGUgYnVmZmVyIGhhcyBvdmVybGF5cywgdGV4dCBwcm9wZXJ0 aWVzLAorICAgICBvciBtdWx0aWJ5dGUgY2hhcmFjdGVycywgdXNlIGEgbW9yZSBnZW5lcmFsIGFs Z29yaXRobS4gKi8KKyAgaWYgKGJ1ZmZlcl9pbnRlcnZhbHMgKGN1cnJlbnRfYnVmZmVyKQorICAg ICAgfHwgYnVmZmVyX2hhc19vdmVybGF5cyAoKQorICAgICAgfHwgWiAhPSBaX0JZVEUpCisgICAg eworICAgICAgRU1BQ1NfSU5UIGNvbCA9IE1PU1RfUE9TSVRJVkVfRklYTlVNOworICAgICAgbWNf c2Nhbl9mb3JfY29sdW1uICgmcHQsICZjb2wsIE5VTEwsIHB0KTsKKyAgICAgIHsKKyAgICAgICAg aWYgKG9sZF9idWZmZXIpCisgICAgICAgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZl cik7CisgICAgICAgIHJldHVybiBjb2w7CisgICAgICB9CisgICAgfQorICAvKiBTY2FuIGJhY2t3 YXJkcyBmcm9tIHBvaW50IHRvIHRoZSBwcmV2aW91cyBuZXdsaW5lLAorICAgICBjb3VudGluZyB3 aWR0aC4gIFRhYiBjaGFyYWN0ZXJzIGFyZSB0aGUgb25seSBjb21wbGljYXRlZCBjYXNlLiAqLwor ICAvKiBNYWtlIGEgcG9pbnRlciBmb3IgZGVjcmVtZW50aW5nIHRocm91Z2ggdGhlIGNoYXJzIGJl Zm9yZSBwb2ludC4gKi8KKyAgcHRyID0gQllURV9QT1NfQUREUiAoQ0hBUl9UT19CWVRFIChwdCkg LSAxKSArIDE7CisgIC8qIE1ha2UgYSBwb2ludGVyIHRvIHdoZXJlIGNvbnNlY3V0aXZlIGNoYXJz IGxlYXZlIG9mZiwKKyAgICAgZ29pbmcgYmFja3dhcmRzIGZyb20gcG9pbnQuICovCisgIGlmIChw dCA9PSBCRUdWKQorICAgIHN0b3AgPSBwdHI7CisgICAgZWxzZSBpZiAocHQgPD0gR1BUIHx8IEJF R1YgPiBHUFQpCisgICAgICBzdG9wID0gQkVHVl9BRERSOworICAgICAgZWxzZQorICAgICAgICBz dG9wID0gR0FQX0VORF9BRERSOworICBjb2wgPSAwLCB0YWJfc2VlbiA9IDAsIHBvc3RfdGFiID0g MDsKKyAgd2hpbGUgKDEpCisgICAgeworICAgICAgcHRyZGlmZl90IGksIG47CisgICAgICBMaXNw X09iamVjdCBjaGFydmVjOworICAgICAgaWYgKHB0ciA9PSBzdG9wKQorICAgICAgICB7CisgICAg ICAgICAgLyogV2Ugc3RvcHBlZCBlaXRoZXIgZm9yIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGJ1ZmZl cgorICAgICAgICAgICAgIG9yIGZvciB0aGUgZ2FwLiAqLworICAgICAgICAgIGlmIChwdHIgPT0g QkVHVl9BRERSKQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgLyogSXQgd2FzIHRoZSBn YXAuICBKdW1wIGJhY2sgb3ZlciBpdC4gKi8KKyAgICAgICAgICBzdG9wID0gQkVHVl9BRERSOwor ICAgICAgICAgIHB0ciA9IEdQVF9BRERSOworICAgICAgICAgIC8qIENoZWNrIHdoZXRoZXIgdGhh dCBicmluZ3MgdXMgdG8gYmVnaW5uaW5nIG9mIGJ1ZmZlci4gKi8KKyAgICAgICAgICBpZiAoQkVH ViA+PSBHUFQpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgYyA9ICotLXB0 cjsKKyAgICAgIGlmIChkcCAmJiBWRUNUT1JQIChESVNQX0NIQVJfVkVDVE9SIChkcCwgYykpKQor ICAgICAgICB7CisgICAgICAgICAgY2hhcnZlYyA9IERJU1BfQ0hBUl9WRUNUT1IgKGRwLCBjKTsK KyAgICAgICAgICBuID0gQVNJWkUgKGNoYXJ2ZWMpOworICAgICAgICB9CisgICAgICAgIGVsc2UK KyAgICAgICAgICB7CisgICAgICAgICAgICBjaGFydmVjID0gUW5pbDsKKyAgICAgICAgICAgIG4g PSAxOworICAgICAgICAgIH0KKyAgICAgIGZvciAoaSA9IG4gLSAxOyBpID49IDA7IC0taSkKKyAg ICAgICAgeworICAgICAgICAgIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgLyogVGhpcyBzaG91bGQgYmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAg ICAgICAgICBuZXh0X2VsZW1lbnRfZnJvbV9kaXNwbGF5X3ZlY3RvciBkb2VzIGl0LiAqLworICAg ICAgICAgICAgICBMaXNwX09iamVjdCBlbnRyeSA9IEFSRUYgKGNoYXJ2ZWMsIGkpOworICAgICAg ICAgICAgICBpZiAoR0xZUEhfQ09ERV9QIChlbnRyeSkpCisgICAgICAgICAgICAgICAgYyA9IEdM WVBIX0NPREVfQ0hBUiAoZW50cnkpOworICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg ICAgICAgIGMgPSAnICc7CisgICAgICAgICAgICB9CisgICAgICAgICAgaWYgKGMgPj0gMDQwICYm IGMgPCAwMTc3KQorICAgICAgICAgICAgY29sKys7CisgICAgICAgICAgICBlbHNlIGlmIChjID09 ICdcbicKKyAgICAgICAgICAgICAgICAgICAgIHx8IChjID09ICdccicKKyAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5 KSwgUXQpKSkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHB0cisrOworICAgICAg ICAgICAgICAgIGdvdG8gc3RhcnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICBlbHNlIGlmIChjID09ICdcdCcpCisgICAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgICAgaWYgKHRhYl9zZWVuKQorICAgICAgICAgICAgICAgICAgICBjb2wgPSAoKGNv bCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICAgICAgICAg ICAgcG9zdF90YWIgKz0gY29sOworICAgICAgICAgICAgICAgICAgY29sID0gMDsKKyAgICAgICAg ICAgICAgICAgIHRhYl9zZWVuID0gMTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgZWxzZSBpZiAoVkVDVE9SUCAoY2hhcnZlYykpCisgICAgICAgICAgICAgICAgICAvKiBXaXRo IGEgZGlzcGxheSB0YWJsZSBlbnRyeSwgQyBpcyBkaXNwbGF5ZWQgYXMgaXMsIGFuZAorICAgICAg ICAgICAgICAgICAgICAgbm90IGRpc3BsYXllZCBhcyBcTk5OIG9yIGFzIF5OLiAgSWYgQyBpcyBh IHNpbmdsZS1ieXRlCisgICAgICAgICAgICAgICAgICAgICBjaGFyYWN0ZXIsIGl0IHRha2VzIG9u ZSBjb2x1bW4uICBJZiBDIGlzIG11bHRpLWJ5dGUgaW4KKyAgICAgICAgICAgICAgICAgICAgIGEg dW5pYnl0ZSBidWZmZXIsIGl0J3MgdHJhbnNsYXRlZCB0byB1bmlieXRlLCBzbyBpdAorICAgICAg ICAgICAgICAgICAgICAgYWxzbyB0YWtlcyBvbmUgY29sdW1uLiAqLworICAgICAgICAgICAgICAg ICAgKytjb2w7CisgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgIGNv bCArPSAoY3RsX2Fycm93ICYmIGMgPCAwMjAwKSA/IDIgOiA0OworICAgICAgICB9CisgICAgfQor IHN0YXJ0X29mX2xpbmVfZm91bmQ6CisgIGlmICh0YWJfc2VlbikKKyAgICB7CisgICAgICBjb2wg PSAoKGNvbCArIHRhYl93aWR0aCkgLyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgY29s ICs9IHBvc3RfdGFiOworICAgIH0KKyAgbGFzdF9rbm93bl9jb2x1bW4gPSBjb2w7CisgIGxhc3Rf a25vd25fY29sdW1uX3BvaW50ID0gcHQ7CisgIGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkID0g TU9ESUZGOworICBpZiAob2xkX2J1ZmZlcikKKyAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRf YnVmZmVyKTsKKyAgcmV0dXJuIGNvbDsKK30KKworREVGVU4gKCJtYy1jdXJyZW50LWNvbHVtbiIs IEZtY19jdXJyZW50X2NvbHVtbiwgU21jX2N1cnJlbnRfY29sdW1uLCAyLCAyLCAwLAorICAgICAg IGRvYzogLyogUmV0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ByZXN1bHQgPSAoIU5J TFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAmJiBhcmcgPT0gOSkKKyAgICAgICAg ICAgICAgICAgICAgPyAiXFx0IgorICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3Rl cikKKyAgICAgICAgICAgICAgICAgICAgICYmIGFyZyA9PSAxMCkKKyAgICAgICAgICAgICAgICAg ICAgPyAiXFxuIgorICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAg ICAgICAgICAgICAgICAgICYmIGFyZyA9PSAzMikKKyAgICAgICAgICAgICAgICAgICAgPyAiXFxz IgorICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAg ICAgICAgICYmIGFyZyAhPSA5CisgICAgICAgICAgICAgICAgICAgICAmJiBhcmcgIT0gMTAKKyAg ICAgICAgICAgICAgICAgICAgICYmIGFyZyAhPSAzMikKKyAgICAgICAgICAgICAgICAgICAgPyBT U0RBVEEgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgIDogIlxcPyI7CisgIHJldHVybiBy ZXN1bHQ7Cit9CisKK2ludAorbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoTGlzcF9PYmplY3QgYXJn KQoreworICBjaGFyICpzdHI7CisgIGlmIChYVFlQRSAoYXJnKSA9PSBMaXNwX1N0cmluZykKKyAg ICBzdHIgPSBTU0RBVEEgKGFyZyk7CisgICAgZWxzZSBpZiAoWFRZUEUgKGFyZykgPT0gTGlzcF9T eW1ib2wpCisgICAgICBzdHIgPSBTU0RBVEEgKFNZTUJPTF9OQU1FIChhcmcpKTsKKyAgICAgIGVs c2UgcmV0dXJuIC0xOworICBpZiAoIXN0cmNtcCAoc3RyLCAibm8iKSkKKyAgICByZXR1cm4gTUNf Tk9fQ1VSU09SOworICBpZiAoIXN0cmNtcCAoc3RyLCAibWMtbGVmdC1mcmluZ2UtYml0bWF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jvd190eXBlIGZyb21fd2hlcmUpCit7CisgIHN3aXRjaCAoZnJv bV93aGVyZSkKKyAgICB7CisgICAgICBjYXNlIE5PV0hFUkU6IHJldHVybiAiTk9XSEVSRSI7Cisg ICAgICBjYXNlIFNDUklCRV9PTkU6IHJldHVybiAiU0NSSUJFX09ORSI7CisgICAgICBjYXNlIFND UklCRV9UV086IHJldHVybiAiU0NSSUJFX1RXTyI7CisgICAgICBjYXNlIFNDUklCRV9USFJFRTog cmV0dXJuICJTQ1JJQkVfVEhSRUUiOworICAgICAgY2FzZSBTS0lQUEVEOiByZXR1cm4gIlNLSVBQ RUQiOworICAgICAgY2FzZSBQT1NUX0NIQU5HRUQ6IHJldHVybiAiUE9TVF9DSEFOR0VEIjsKKyAg ICAgIGNhc2UgVU5DSEFOR0VEOiByZXR1cm4gIlVOQ0hBTkdFRCI7CisgICAgICBjYXNlIFNFVF9D VVJTT1JfT05FOiByZXR1cm4gIlNFVF9DVVJTT1JfT05FIjsKKyAgICAgIGNhc2UgU0VUX0NVUlNP Ul9UV086IHJldHVybiAiU0VUX0NVUlNPUl9UV08iOworICAgICAgZGVmYXVsdDoKKyAgICAgIHJl dHVybiAiVU5LTk9XTiI7CisgICAgfQorfQorCisvKiBVU0FHRTogIGZwcmludGYgKHN0ZGVyciwg IkZST01fV0hFUkUgKCVzKSIsIG1jX2RyYXdfcm93X3R5cGVfdG9fc3RyaW5nIChhcmcpKTsgKi8K K2NoYXIgKgorbWNfcmVkcmF3X3Jvd190eXBlX3RvX3N0cmluZyAoZW51bSBtY19yZWRyYXdfcm93 X3R5cGUgZnJvbV93aGVyZSkKK3sKKyAgc3dpdGNoIChmcm9tX3doZXJlKQorICAgIHsKKyAgICAg IGNhc2UgVVBEQVRFX1dJTkRPV19fUkVEUkFXX09WRVJMQVBQRURfUk9XUzogcmV0dXJuICJVUERB VEVfV0lORE9XX19SRURSQVdfT1ZFUkxBUFBFRF9ST1dTIjsKKyAgICAgIGNhc2UgR1VJX0lOU0VS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yc191c2VkID0gdy0+bWNfbWF0cml4 LmN1cnNvcnNfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgbWF0 cml4LmN1cnNvcnNfdXNlZFslc10gKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgbWNf Y2FjaGVfdHlwZV90b19zdHJpbmcgKGNhY2hlX3R5cGUpLCBjdXJzb3JzX3VzZWQpOworICAgIH0K KyAgZm9yIChpbnQgdm50aCA9IDA7CisgICAgICAgdm50aCA8IHctPm1jX21hdHJpeC52cG9zX3Vz ZWQ7CisgICAgICAgKyt2bnRoKQorICAgIHsKKyAgICAgIGZvciAoZW51bSBtY19jYWNoZV90eXBl IGNhY2hlX3R5cGUgPSBNQ19DQUNIRTsKKyAgICAgICAgICAgY2FjaGVfdHlwZSA8IE5PX0NBQ0hF OworICAgICAgICAgICArK2NhY2hlX3R5cGUpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgY2Fj aGVfYWxsb2NhdGVkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2Nh Y2hlX3R5cGVdOworICAgICAgICAgIGludCBjYWNoZV91c2VkID0gdy0+bWNfbWF0cml4LnZwb3Nb dm50aF0uY2FjaGVfdXNlZFtjYWNoZV90eXBlXTsKKyAgICAgICAgICBmcHJpbnRmIChzdGRlcnIs ICIgICAgdm50aCAoJWQpIHwgY2FjaGVfYWxsb2NhdGVkWyVzXSAoJWQpIHwgY2FjaGVfdXNlZFsl c10gKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHZudGgsCisgICAgICAgICAg ICAgICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3RvX3N0cmluZyAoY2FjaGVfdHlwZSksCisg ICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZV9hbGxvY2F0ZWQsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICBtY19jYWNoZV90eXBlX3Rv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d2luZG93ICp3LCBzdHJ1Y3QgbWNfZXNz ZW50aWFscyAqZXNzZW50aWFscykKK3sKKyAgaWYgKCFCVUZGRVJQICh3LT5jb250ZW50cykpCisg ICAgcmV0dXJuOworICBpZiAoTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19j b25mKSkKKyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3No YWlycykpCisgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zp c2libGUpKSkKKyAgICByZXR1cm47CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJh bWUpOworICBlc3NlbnRpYWxzLT5hY3RpdmVfcCA9ICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVk X3dpbmRvdykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZiA9PSBGUkFNRV9ESVNQTEFZ X0lORk8gKGYpLT5oaWdobGlnaHRfZnJhbWUpOworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZF UiAody0+Y29udGVudHMpOworICBzdHJ1Y3QgYnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAg cHRyZGlmZl90IG9wb2ludCA9ICh3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykpCisgICAg ICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICA6IFhGSVhOVU0gKEZt YXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOworICBwdHJkaWZmX3QgY3VycmVudF9jb2wgPSBt Y19jdXJyZW50X2NvbHVtbiAodywgb3BvaW50KTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBG UkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZB UiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAoQlZBUiAoYiwg ZmlsbF9jb2x1bW4pKTsKKyAgaW50IGhzY2xfeCA9IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFyX3dp ZHRoOworICBpZiAoYiAhPSBjdXJyZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVmZmVy ID0gY3VycmVudF9idWZmZXI7CisgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9 CisgIGVzc2VudGlhbHMtPnp2ID0gWlY7CisgIGVzc2VudGlhbHMtPnp2X2J5dGUgPSBaVl9CWVRF OworICBlc3NlbnRpYWxzLT5mY194ID0gKGZpbGxfY29sdW1uX3AKKyAgICAgICAgICAgICAgICAg ICAgICAmJiAhTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgPyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoKSArIHctPm1jLmxudW1fcGl4ZWxf d2lkdGggLSBoc2NsX3gKKyAgICAgICAgICAgICAgICAgICAgIDogKGZpbGxfY29sdW1uX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKFZkaXNwbGF5X2xpbmVfbnVtYmVycykpCisg ICAgICAgICAgICAgICAgICAgICAgID8gKGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0aCkgLSBo c2NsX3gKKyAgICAgICAgICAgICAgICAgICAgIDogMDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAg c2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgIGVudW0gZmFjZV9pZCBmaWxsX2Nv bHVtbl9wcmVfenZfZmFjZV9pZCA9CisgICAgKCFlc3NlbnRpYWxzLT5hY3RpdmVfcAorICAgICAm JiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY19pbmFjdGl2ZV93aW5kb3dz KSkKKyAgICAgJiYgT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SUQgKGYsIGJleW9uZF9maWxsX2ZhY2VfaWQpOwor ICAgICAgTGlzcF9PYmplY3QgYmV5b25kX2ZpbGxfY29sb3IgPSBiZXlvbmRfZmlsbF9mYWNlLT5s ZmFjZVtMRkFDRV9GT1JFR1JPVU5EX0lOREVYXTsKKyAgICAgIHN0cnVjdCBtY19SR0IgYmV5b25k X2ZpbGxfZm9yZWdyb3VuZDsKKyAgICAgIG1jX3h3X2NvbG9yX3ZhbHVlcyAodywgYmV5b25kX2Zp bGxfY29sb3IsICZiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kKTsKKyAgICAgIC8qIHJlZCAqLworICAg ICAgaWYgKCghZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAmJiBjdXJyZW50X2NvbCAlIDIgIT0g MAorICAgICAgICAgICAmJiByb3dfcG9zaXRpb24gPT0gUFJFX1pWKQorICAgICAgICAgIHx8IChm aWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICYmIGN1cnJlbnRfY29sICUgMiAhPSAwCisgICAg ICAgICAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sCisgICAgICAgICAgICAgICYmIHJv d19wb3NpdGlvbiA9PSBQUkVfWlYpKQorICAgICAgICB7CisgICAgICAgICAgbHNsX2ZnLT5yZWQg PSBvZGRfZm9yZWdyb3VuZC5yZWQ7CisgICAgICAgICAgbHNsX2ZnLT5ncmVlbiA9IG9kZF9mb3Jl Z3JvdW5kLmdyZWVuOworICAgICAgICAgIGxzbF9mZy0+Ymx1ZSA9IG9kZF9mb3JlZ3JvdW5kLmJs dWU7CisgICAgICAgIH0KKyAgICAgICAgLyogeWVsbG93ICovCisgICAgICAgIGVsc2UgaWYgKCgh ZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgJSAyID09IDAK KyAgICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAg ICAgICAgIHx8IChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50 X2NvbCAlIDIgPT0gMAorICAgICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmls bF9jb2wKKyAgICAgICAgICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpKQor ICAgICAgICAgIHsKKyAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXZlbl9mb3JlZ3JvdW5kLnJl ZDsKKyAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBldmVuX2ZvcmVncm91bmQuZ3JlZW47Cisg ICAgICAgICAgICBsc2xfZmctPmJsdWUgPSBldmVuX2ZvcmVncm91bmQuYmx1ZTsKKyAgICAgICAg ICB9CisgICAgICAgICAgLyogZ3JlZW4gKi8KKyAgICAgICAgICBlbHNlIGlmIChmaWxsX2NvbHVt bl9wCisgICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgPiBmaWxsX2NvbAorICAgICAg ICAgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9PSBQUkVfWlYpCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIGxzbF9mZy0+cmVkID0gYmV5b25kX2ZpbGxfZm9yZWdyb3VuZC5yZWQ7Cisg ICAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLmdyZWVu OworICAgICAgICAgICAgICBsc2xfZmctPmJsdWUgPSBiZXlvbmRfZmlsbF9mb3JlZ3JvdW5kLmJs dWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyb3dfcG9zaXRpb24gPT0g QVRfWlYpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBsc2xfZmctPnJlZCA9IGVz c2VudGlhbHMuc3BfZmcucmVkOworICAgICAgICAgICAgICAgIGxzbF9mZy0+Z3JlZW4gPSBlc3Nl bnRpYWxzLnNwX2ZnLmdyZWVuOworICAgICAgICAgICAgICAgIGxzbF9mZy0+Ymx1ZSA9IGVzc2Vu dGlhbHMuc3BfZmcuYmx1ZTsKKyAgICAgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQor ICAgIGNhc2UgSE9SSVpPTlRBTF9SVUxFUjoKKyAgICB7CisgICAgICBpZiAoZ2x5cGggIT0gTlVM TAorICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDk1CisgICAgICAgICAgJiYgY3Vyc29yX3R5 cGUgPT0gTUNfSEJBUikKKyAgICAgICAgeworICAgICAgICAgIGxzbF9mZy0+cmVkID0gZXNzZW50 aWFscy5zcF9mZy5yZWQ7CisgICAgICAgICAgbHNsX2ZnLT5ncmVlbiA9IGVzc2VudGlhbHMuc3Bf ZmcuZ3JlZW47CisgICAgICAgICAgbHNsX2ZnLT5ibHVlID0gZXNzZW50aWFscy5zcF9mZy5ibHVl OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBsc2xf ZmctPnJlZCA9IGVzc2VudGlhbHMuY2hfZmdbcm93X3Bvc2l0aW9uXS5yZWQ7CisgICAgICAgICAg ICBsc2xfZmctPmdyZWVuID0gZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25dLmdyZWVuOwor ICAgICAgICAgICAgbHNsX2ZnLT5ibHVlID0gZXNzZW50aWFscy5jaF9mZ1tyb3dfcG9zaXRpb25d LmJsdWU7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgVkVSVElD QUxfUlVMRVI6CisgICAgeworICAgICAgbHNsX2ZnLT5yZWQgPSBlc3NlbnRpYWxzLmNoX2ZnW3Jv d19wb3NpdGlvbl0ucmVkOworICAgICAgbHNsX2ZnLT5ncmVlbiA9IGVzc2VudGlhbHMuY2hfZmdb cm93X3Bvc2l0aW9uXS5ncmVlbjsKKyAgICAgIGxzbF9mZy0+Ymx1ZSA9IGVzc2VudGlhbHMuY2hf Zmdbcm93X3Bvc2l0aW9uXS5ibHVlOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgRklM TF9DT0xVTU46CisgICAgeworICAgICAgbHNsX2ZnLT5yZWQgPSBlc3NlbnRpYWxzLmZjX2ZnW3Jv d19wb3NpdGlvbl0ucmVkOworICAgICAgbHNsX2ZnLT5ncmVlbiA9IGVzc2VudGlhbHMuZmNfZmdb cm93X3Bvc2l0aW9uXS5ncmVlbjsKKyAgICAgIGxzbF9mZy0+Ymx1ZSA9IGVzc2VudGlhbHMuZmNf Zmdbcm93X3Bvc2l0aW9uXS5ibHVlOworICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgQ1VS U09SX0lORElDQVRPUjoKKyAgICB7CisgICAgICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHct PmZyYW1lKTsKKyAgICAgIGVudW0gZmFjZV9pZCBjdXJzb3JfZmFjZV9pZCA9CisgICAgICAgICgh ZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpCisgICAgICAgICAmJiByb3dfcG9zaXRp b24gPT0gUFJFX1pWKQorICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVy biAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAg ICAgICA6IChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICYmIHJvd19wb3NpdGlvbiA9 PSBQUkVfWlYpCisgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgi Ky1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogKCFlc3Nl bnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICYmICFOSU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VJFQSBvZiBXLiAqLworaW50CittY19kcmF3X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywg c3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAg ICAgICAgICAgICAgaW50IHgsIGVudW0gZ2x5cGhfcm93X2FyZWEgYXJlYSwgcHRyZGlmZl90IHN0 YXJ0LCBwdHJkaWZmX3QgZW5kLAorICAgICAgICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFj ZSBobCwgaW50IG92ZXJsYXBzLCBpbnQgdnBvcywgc3RydWN0IG1jX1JHQiBsc2wsCisgICAgICAg ICAgICAgICAgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLCBlbnVtIG1jX2N1cnNvcl90eXBl IGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgIGludCB3ZCwgYm9vbCBhY3RpdmVfcCwgYm9v bCBjdXJzb3JfZ2NfcCwKKyAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhfYWN0aW9uIGFj dGlvbl90eXBlLCBib29sIGRyYXdfcCkKK3sKKyAgaW50IHN0YXJ0X3ggPSB4OworICBpbnQgcmVs YXRpdmVfeCA9IDA7CisgIGludCBsZW5ndGggPSAwOworICAvLyAgaWYgKHRyYWNlX3JlZGlzcGxh eV9wKQorICAvLyAgICB7CisgIC8vICAgICAgaW50IHN0YXJ0X2hwb3MgPSBzdGFydDsKKyAgLy8g ICAgICBpbnQgZW5kX2hwb3MgPSBlbmQ7CisgIC8vICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNf ZHJhd19nbHlwaHMgKCVkKTogIHN0YXJ0X3ggKCVkKSB8IHN0YXJ0X2hwb3MgKCVkKSB8IGVuZF9o cG9zICglZClcbiIsCisgIC8vICAgICAgICAgICAgICAgICAgICAgICB2cG9zLCBzdGFydF94LCBz dGFydF9ocG9zLCBlbmRfaHBvcyk7CisgIC8vICAgIH0KKyAgc3RydWN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gYWJvdmUuICovCisgIGlmIChoZWFkICYmICFv dmVybGFwcyAmJiByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wKQorICAgIHsKKyAg ICAgIHN0cnVjdCBnbHlwaF9zdHJpbmcgKmgsICp0OworICAgICAgTW91c2VfSExJbmZvICpobGlu Zm8gPSBNT1VTRV9ITF9JTkZPIChmKTsKKyAgICAgIGludCBtb3VzZV9iZWdfY29sIFVOSU5JVCwg bW91c2VfZW5kX2NvbCBVTklOSVQ7CisgICAgICBib29sIGNoZWNrX21vdXNlX2ZhY2UgPSBmYWxz ZTsKKyAgICAgIGludCBkdW1teV94ID0gMDsKKyAgICAgIC8qIElmIG1vdXNlIGhpZ2hsaWdodGlu ZyBpcyBvbiwgd2UgbWF5IG5lZWQgdG8gZHJhdyBhZGphY2VudAorICAgZ2x5cGhzIHVzaW5nIG1v dXNlLWZhY2UgaGlnaGxpZ2h0aW5nLiAqLworICAgICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYm IHJvdy0+bW91c2VfZmFjZV9wCisgICAgICAgICAgJiYgaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19y b3cgPj0gMAorICAgICAgICAgICYmIGhsaW5mby0+bW91c2VfZmFjZV9lbmRfcm93ID49IDApCisg ICAgICAgIHsKKyAgICAgICAgICBwdHJkaWZmX3Qgcm93X3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1Mg KHJvdywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgICAgICAgIGlmIChyb3dfdnBvcyA+PSBobGlu Zm8tPm1vdXNlX2ZhY2VfYmVnX3JvdworICAgICAgICAgICAgICAmJiByb3dfdnBvcyA8PSBobGlu Zm8tPm1vdXNlX2ZhY2VfZW5kX3JvdykKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgY2hl Y2tfbW91c2VfZmFjZSA9IHRydWU7CisgICAgICAgICAgICAgIG1vdXNlX2JlZ19jb2wgPSAocm93 X3Zwb3MgPT0gaGxpbmZvLT5tb3VzZV9mYWNlX2JlZ19yb3cpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IGhsaW5mby0+bW91c2VfZmFjZV9iZWdfY29sCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6IDA7CisgICAgICAgICAgICAgIG1vdXNlX2VuZF9jb2wgPSAocm93X3Zw b3MgPT0gaGxpbmZvLT5tb3VzZV9mYWNlX2VuZF9yb3cpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA/IGhsaW5mby0+bW91c2VfZmFjZV9lbmRfY29sCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IHJvdy0+dXNlZFtURVhUX0FSRUFdOworICAgICAgICAgICAgfQorICAgICAg ICB9CisgICAgICAvKiBDb21wdXRlIG92ZXJoYW5ncyBmb3IgYWxsIGdseXBoIHN0cmluZ3MuICov CisgICAgICBpZiAoRlJBTUVfUklGIChmKS0+Y29tcHV0ZV9nbHlwaF9zdHJpbmdfb3Zlcmhhbmdz KQorICAgICAgICBmb3IgKHMgPSBoZWFkOyBzOyBzID0gcy0+bmV4dCkKKyAgICAgICAgICBGUkFN RV9SSUYgKGYpLT5jb21wdXRlX2dseXBoX3N0cmluZ19vdmVyaGFuZ3MgKHMpOworICAgICAgLyog UHJlcGVuZCBnbHlwaCBzdHJpbmdzIGZvciBnbHlwaHMgaW4gZnJvbnQgb2YgdGhlIGZpcnN0IGds eXBoCisgICAgICBzdHJpbmcgdGhhdCBhcmUgb3ZlcndyaXR0ZW4gYmVjYXVzZSBvZiB0aGUgZmly c3QgZ2x5cGgKKyAgICAgIHN0cmluZydzIGxlZnQgb3ZlcmhhbmcuICBUaGUgYmFja2dyb3VuZCBv ZiBhbGwgc3RyaW5ncworICAgICAgcHJlcGVuZGVkIG11c3QgYmUgZHJhd24gYmVjYXVzZSB0aGUg Zmlyc3QgZ2x5cGggc3RyaW5nCisgICAgICBkcmF3cyBvdmVyIGl0LiAqLworICAgICAgaSA9IGxl ZnRfb3ZlcndyaXR0ZW4gKGhlYWQpOworICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgeworICAg ICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIC8qIElm IHRoaXMgcm93IGNvbnRhaW5zIG1vdXNlIGhpZ2hsaWdodGluZywgYXR0ZW1wdCB0byBkcmF3Cisg ICAgICAgICAgICAgdGhlIG92ZXJsYXBwZWQgZ2x5cGhzIHdpdGggdGhlIGNvcnJlY3QgaGlnaGxp Z2h0LiAgVGhpcworICAgICAgICAgICAgIGNvZGUgZmFpbHMgaWYgdGhlIG92ZXJsYXAgZW5jb21w YXNzZXMgbW9yZSB0aGFuIG9uZSBnbHlwaAorICAgICAgICAgICAgIGFuZCBtb3VzZS1oaWdobGln aHQgc3BhbnMgb25seSBzb21lIG9mIHRoZXNlIGdseXBocy4KKyAgICAgICAgICAgICBIb3dldmVy LCBtYWtpbmcgaXQgd29yayBwZXJmZWN0bHkgaW52b2x2ZXMgYSBsb3QgbW9yZQorICAgICAgICAg ICAgIGNvZGUsIGFuZCBJIGRvbid0IGtub3cgaWYgdGhlIHBhdGhvbG9naWNhbCBjYXNlIG9jY3Vy cyBpbgorICAgICAgICAgICAgIHByYWN0aWNlLCBzbyB3ZSdsbCBzdGljayB0byB0aGlzIGZvciBu b3cuICAtLS0gY3lkICAqLworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNlCisgICAgICAg ICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBzdGFydCAmJiBtb3VzZV9lbmRfY29sID4gaSkKKyAg ICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01PVVNFX0ZBQ0U7CisgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX05PUk1BTF9URVhUOworICAgICAgICAg IGlmIChobCAhPSBvdmVybGFwX2hsKQorICAgICAgICAgICAgY2xpcF9oZWFkID0gaGVhZD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IFNUUkVUQ0hfR0xZUEggaXMgYGxlZnRfb3ZlcndyaXR0ZW5gLiAgRHJhd2luZwor ICAgICAgICAgIG5vcm1hbCB0ZXh0IGR1cmluZyBgdXBkYXRlX3dpbmRvdycgKERSQVdfTk9STUFM X1RFWFQpIGNhbiBhbHNvIGVyYXNlIGZha2UKKyAgICAgICAgICBjdXJzb3JzIHRoYXQgYXJlIGBs ZWZ0X292ZXJ3cml0dGVuJy4gKi8KKyAgICAgICAgICBsZW5ndGggPSAwOworICAgICAgICAgIGZv ciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBz LT5sZWZ0X292ZXJ3cml0dGVuX3AgPSB0cnVlOworICAgICAgICAgICAgICBzLT5hY3Rpb25fdHlw ZSA9IGFjdGlvbl90eXBlOworICAgICAgICAgICAgICBsZW5ndGggKz0gcy0+Zmlyc3RfZ2x5cGgt PnBpeGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICAgIHJlbGF0aXZlX3ggPSBzdGFy dF94IC0gbGVuZ3RoOworICAgICAgICAgIGZvciAocyA9IGg7IHM7IHMgPSBzLT5uZXh0KQorICAg ICAgICAgICAgeworICAgICAgICAgICAgICBzLT5maXJzdF9nbHlwaC0+cmVsYXRpdmVfeCA9IHJl bGF0aXZlX3g7CisgICAgICAgICAgICAgIHJlbGF0aXZlX3ggKz0gcy0+Zmlyc3RfZ2x5cGgtPnBp eGVsX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICAgIHN0YXJ0ID0gaTsKKyAgICAgICAg ICBjb21wdXRlX292ZXJoYW5nc19hbmRfeCAodCwgaGVhZC0+eCwgdHJ1ZSk7CisgICAgICAgICAg cHJlcGVuZF9nbHlwaF9zdHJpbmdfbGlzdHMgKCZoZWFkLCAmdGFpbCwgaCwgdCk7CisgICAgICAg ICAgaWYgKGNsaXBfaGVhZCA9PSBOVUxMKQorICAgICAgICAgICAgY2xpcF9oZWFkID0gaGVhZDsK KyAgICAgICAgfQorICAgICAgLyogUHJlcGVuZCBnbHlwaCBzdHJpbmdzIGZvciBnbHlwaHMgaW4g ZnJvbnQgb2YgdGhlIGZpcnN0IGdseXBoCisgICAgICBzdHJpbmcgdGhhdCBvdmVyd3JpdGUgdGhh dCBnbHlwaCBzdHJpbmcgYmVjYXVzZSBvZiB0aGVpcgorICAgICAgcmlnaHQgb3ZlcmhhbmcuICBG b3IgdGhlc2Ugc3RyaW5ncywgb25seSB0aGUgZm9yZWdyb3VuZCBtdXN0CisgICAgICBiZSBkcmF3 biwgYmVjYXVzZSBpdCBkcmF3cyBvdmVyIHRoZSBnbHlwaCBzdHJpbmcgYXQgYGhlYWQnLgorICAg ICAgVGhlIGJhY2tncm91bmQgbXVzdCBub3QgYmUgZHJhd24gYmVjYXVzZSB0aGlzIHdvdWxkIG92 ZXJ3cml0ZQorICAgICAgcmlnaHQgb3ZlcmhhbmdzIG9mIHByZWNlZGluZyBnbHlwaHMgZm9yIHdo aWNoIG5vIGdseXBoCisgICAgICBzdHJpbmdzIGV4aXN0LiAqLworICAgICAgaSA9IGxlZnRfb3Zl cndyaXRpbmcgKGhlYWQpOworICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgeworICAgICAgICAg IGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlmIChjaGVja19t b3VzZV9mYWNlCisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBzdGFydCAmJiBtb3Vz ZV9lbmRfY29sID4gaSkKKyAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX01PVVNFX0ZBQ0U7 CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIG92ZXJsYXBfaGwgPSBEUkFXX05PUk1B TF9URVhUOworICAgICAgICAgIGlmIChobCA9PSBvdmVybGFwX2hsIHx8IGNsaXBfaGVhZCA9PSBO VUxMKQorICAgICAgICAgICAgY2xpcF9oZWFkID0gaGVhZDsKKyAgICAgICAgICBNQ19CVUlMRF9H TFlQSF9TVFJJTkdTIChpLCBzdGFydCwgaCwgdCwgb3ZlcmxhcF9obCwgZHVtbXlfeCwgbGFzdF94 KTsKKyAgICAgICAgICBmb3IgKHMgPSBoOyBzOyBzID0gcy0+bmV4dCkKKyAgICAgICAgICAgIHMt PmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAgICAgIGNvbXB1dGVfb3Zlcmhhbmdz X2FuZF94ICh0LCBoZWFkLT54LCB0cnVlKTsKKyAgICAgICAgICBwcmVwZW5kX2dseXBoX3N0cmlu Z19saXN0cyAoJmhlYWQsICZ0YWlsLCBoLCB0KTsKKyAgICAgICAgfQorICAgICAgLyogQXBwZW5k IGdseXBocyBzdHJpbmdzIGZvciBnbHlwaHMgZm9sbG93aW5nIHRoZSBsYXN0IGdseXBoCisgICAg ICBzdHJpbmcgdGFpbCB0aGF0IGFyZSBvdmVyd3JpdHRlbiBieSB0YWlsLiAgVGhlIGJhY2tncm91 bmQgb2YKKyAgICAgIHRoZXNlIHN0cmluZ3MgaGFzIHRvIGJlIGRyYXduIGJlY2F1c2UgdGFpbCdz IGZvcmVncm91bmQgZHJhd3MKKyAgICAgIG92ZXIgaXQuICovCisgICAgICBpID0gcmlnaHRfb3Zl cndyaXR0ZW4gKHRhaWwpOworICAgICAgaWYgKGkgPj0gMCkKKyAgICAgICAgeworICAgICAgICAg IGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVybGFwX2hsOworICAgICAgICAgIGlmIChjaGVja19t b3VzZV9mYWNlCisgICAgICAgICAgICAgICYmIG1vdXNlX2JlZ19jb2wgPCBpICYmIG1vdXNlX2Vu ZF9jb2wgPiBlbmQpCisgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19NT1VTRV9GQUNFOwor ICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICBvdmVybGFwX2hsID0gRFJBV19OT1JNQUxf VEVYVDsKKyAgICAgICAgICBpZiAoaGwgI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gICAgICAgeworICAgICAgICAgIGVudW0gZHJhd19nbHlwaHNfZmFjZSBvdmVy bGFwX2hsOworICAgICAgICAgIGlmIChjaGVja19tb3VzZV9mYWNlCisgICAgICAgICAgICAgICYm IG1vdXNlX2JlZ19jb2wgPCBpICYmIG1vdXNlX2VuZF9jb2wgPiBlbmQpCisgICAgICAgICAgICBv dmVybGFwX2hsID0gRFJBV19NT1VTRV9GQUNFOworICAgICAgICAgICAgZWxzZQorICAgICAgICAg ICAgICBvdmVybGFwX2hsID0gRFJBV19OT1JNQUxfVEVYVDsKKyAgICAgICAgICBpZiAoaGwgPT0g b3ZlcmxhcF9obCB8fCBjbGlwX3RhaWwgPT0gTlVMTCkKKyAgICAgICAgICAgIGNsaXBfdGFpbCA9 IHRhaWw7CisgICAgICAgICAgaSsrOyAgICAgIC8qIFdlIG11c3QgaW5jbHVkZSB0aGUgSXRoIGds eXBoLiAqLworICAgICAgICAgIE1DX0JVSUxEX0dMWVBIX1NUUklOR1MgKGVuZCwgaSwgaCwgdCwg b3ZlcmxhcF9obCwgeCwgbGFzdF94KTsKKyAgICAgICAgICBmb3IgKHMgPSBoOyBzOyBzID0gcy0+ bmV4dCkKKyAgICAgICAgICAgIHMtPmJhY2tncm91bmRfZmlsbGVkX3AgPSB0cnVlOworICAgICAg ICAgIGNvbXB1dGVfb3ZlcmhhbmdzX2FuZF94IChoLCB0YWlsLT54ICsgdGFpbC0+d2lkdGgsIGZh bHNlKTsKKyAgICAgICAgICBhcHBlbmRfZ2x5cGhfc3RyaW5nX2xpc3RzICgmaGVhZCwgJnRhaWws IGgsIHQpOworICAgICAgICB9CisgICAgICB0YWlsID0gZ2x5cGhfc3RyaW5nX2NvbnRhaW5pbmdf YmFja2dyb3VuZF93aWR0aCAodGFpbCk7CisgICAgICBpZiAoY2xpcF90YWlsKQorICAgICAgICBj bGlwX3RhaWwgPSBnbHlwaF9zdHJpbmdfY29udGFpbmluZ19iYWNrZ3JvdW5kX3dpZHRoIChjbGlw X3RhaWwpOworICAgICAgaWYgKGNsaXBfaGVhZCB8fCBjbGlwX3RhaWwpCisgICAgICAgIGZvciAo cyA9IGhlYWQ7IHM7IHMgPSBzLT5uZXh0KQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHMtPmNs aXBfaGVhZCA9IGNsaXBfaGVhZDsKKyAgICAgICAgICAgIHMtPmNsaXBfdGFpbCA9IGNsaXBfdGFp bDsKKyAgICAgICAgICB9CisgICAgfQorICAvKiBEcmF3IGFsbCBzdHJpbmdzLiAqLworICBmb3Ig KHMgPSBoZWFkOyBzICYmIGRyYXdfcDsgcyA9IHMtPm5leHQpCisgICAgRlJBTUVfUklGIChmKS0+ bWNfc2NyaWJlX3N0cmluZyAocywgbWF0cml4LCByb3csIGxzbCwgZ2x5cGhfZmxhdm9yLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZl X3AsIGN1cnNvcl9nY19wKTsKKyNpZm5kZWYgSEFWRV9OUworICAvKiBXaGVuIGZvY3VzIGEgc29s ZSBmcmFtZSBhbmQgbW92ZSBob3Jpem9udGFsbHksIHRoaXMgY2xlYXJzIG9uX3AKKyAgICAgY2F1 c2luZyBhIGZhaWx1cmUgdG8gZXJhc2UgcHJldiBjdXJzb3IgcG9zaXRpb24uICovCisgIGlmIChh cmVhID09IFRFWFRfQVJFQQorICAgICAgJiYgIXJvdy0+ZnVsbF93aWR0aF9wCisgICAgICAvKiBX aGVuIGRyYXdpbmcgb3ZlcmxhcHBpbmcgcm93cywgb25seSB0aGUgZ2x5cGggc3RyaW5ncycKKyAg ICAgIGZvcmVncm91bmQgaXMgZHJhd24sIHdoaWNoIGRvZXNuJ3QgZXJhc2UgYSBjdXJzb3IgY29t cGxldGVseS4gKi8KKyAgICAgICYmICFvdmVybGFwcykKKyAgICB7CisgICAgICBpbnQgeDAgPSBj bGlwX2hlYWQgPyBjbGlwX2hlYWQtPnggOiAoaGVhZCA/IGhlYWQtP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2x5cGhfbWF0cml4ICptYXRyaXgsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAg ICAgICAgICAgICAgICAgICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UgaGwsIGludCB4LCBpbnQgaHBv cywgaW50IHZwb3MsCisgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2wsIGVu dW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciwKKyAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1j X2N1cnNvcl90eXBlIGN1cnNvcl90eXBlLCBpbnQgd2QsIGJvb2wgYWN0aXZlX3AsCisgICAgICAg ICAgICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfcCkKK3sKKyAgLy8gIHN0cnVjdCBnbHlwaCAq Y3Vyc29yX2dseXBoID0gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhwb3Ms IHZwb3MpOworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJhd19jdXJzb3JfZ2x5cGg6ICBj aCAoJWQpIHwgeCAoJWQpLCBocG9zICglZCksIHZwb3MoJWQpLCBobCAoJWQpXG4iLAorICAvLyAg ICAgICAgICAgICAgICAgICAgY3Vyc29yX2dseXBoLT51LmNoLCB4LCBocG9zLCB2cG9zLCBobCk7 CisgIGJsb2NrX2lucHV0ICgpOworICBib29sIGRyYXdfcCA9IHRydWU7CisgIG1jX2RyYXdfZ2x5 cGhzICh3LCBtYXRyaXgsIHJvdywgeCwgVEVYVF9BUkVBLCBocG9zLCBocG9zICsgMSwgaGwsIDAs IHZwb3MsIGxzbCwKKyAgICAgICAgICAgICAgICAgIGdseXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUs IHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3AsCisgICAgICAgICAgICAgICAgICBNQ19EUkFXX0dM WVBIX1NUUklORywgZHJhd19wKTsKKyAgdW5ibG9ja19pbnB1dCAoKTsKKyA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RpbmcgZG9lcyBub3Qu ICovCisgICAgICAmJiByb3ctPnVzZWRbVEVYVF9BUkVBXSA+IGhwb3MgJiYgaHBvcyA+PSAwKQor ICAgIG1vdXNlX2ZhY2VfaGVyZV9wID0gdHJ1ZTsKKyAgLyogTWF5YmUgY2xlYXIgdGhlIGRpc3Bs YXkgdW5kZXIgdGhlIGN1cnNvci4gKi8KKyAgaWYgKGN1cnNvcl90eXBlID09IE1DX0hPTExPV19C T1gKKyAgICAgIHx8IGN1cnNvcl90eXBlID09IE1DX0ZSQU1FRF9CT1gpCisgICAgeworICAgICAg aW50IHRlbXBfeCA9IHg7CisgICAgICBpbnQgaGVhZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9XX0hF QURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICBjdXJzb3JfZ2x5cGggPSBtY19nZXRfY3Vyc29y X2dseXBoICh3LCBtYXRyaXgsIHJvdywgaHBvcywgdnBvcyk7CisgICAgICBpZiAoY3Vyc29yX2ds eXBoID09IE5VTEwpCisgICAgICAgIHsKKyAgICAgICAgICBpZiAoZGVidWdfcCkKKyAgICAgICAg ICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX2VyYXNlX2N1cnNvcjogIHJldHVybiAoJWQpXG4iLCA3 KTsKKyAgICAgICAgICByZXR1cm47CisgICAgICAgIH0KKyAgICAgIGludCB0ZW1wX3dkID0gY3Vy c29yX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgIGlmICh0ZW1wX3ggPCAwKQorICAgICAgICB7 CisgICAgICAgICAgdGVtcF93ZCArPSB0ZW1wX3g7CisgICAgICAgICAgdGVtcF94ID0gMDsKKyAg ICAgICAgfQorICAgICAgdGVtcF93ZCA9IG1pbiAod2QsIHdpbmRvd19ib3hfd2lkdGggKHcsIFRF WFRfQVJFQSkgLSB0ZW1wX3gpOworICAgICAgaW50IGZ5ID0gV0lORE9XX1RPX0ZSQU1FX1BJWEVM X1kgKHcsIG1heCAoaGVhZGVyX2xpbmV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aF90d28gPSAodnBvcyA+PSAwICYmIHZw b3MgPCBtYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdHdv KQorICAgIHJldHVybjsKKyAgaWYgKHggPCAwCisgICAgICB8fCB5IDwgMAorICAgICAgfHwgaHBv cyA8IDAKKyAgICAgIHx8IHZwb3MgPCAwKQorICAgIHJldHVybjsKKyAgYm9vbCBhdXRvX2hzY3Jv bGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRvX2hzY3JvbGxfbW9kZSwg dy0+Y29udGVudHMpLCBRY3VycmVudF9saW5lKTsKKyAgLyogRVhBTVBMRTogIChzY3JvbGwtbGVm dCA1KSAqLworICBib29sIGhzY2xfYWxsX3RlbXBfcCA9ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9s bAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IDApOworICAvKiBFWEFNUExFOiAgQy11IEMt eCA8IGFuZCBkbyBub3RoaW5nLiAqLworICBib29sIGhzY2xfYWxsX3Blcm1fMF9wID0gKHctPnN1 c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19o c2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwg PiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gdy0+aHNjcm9s bCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyBlbHNlIGJlc2lk ZXMgaG9yaXpvbnRhbGx5IHNjcm9sbGluZyB0aGUKKyAgICAgICAgICAgICAgIGN1cnJlbnQgbGlu ZSBkaWZmZXJlbnRseS4KKyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jp em9udGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8x X3AgPSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgYXV0b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hz Y3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwg PT0gdy0+aHNjcm9sbCk7CisgIC8qIEVYQU1QTEU6ICBDLXUgQy14IDwgYW5kIC4uLgorICAgICAg ICAgICAgICAgQ3VycmVudCBsaW5lIGlzIF9ub3RfIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZm ZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzJfcCA9ICghdy0+c3VzcGVuZF9hdXRv X2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9k ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA9PSAwCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIC8q IEVYQU1QTEU6ICAoc2Nyb2xsLWxlZnQgNSk7IGFuZCwgdGhlbiBwcmVzcyB0aGUgbGVmdCBhcnJv dyBrZXkgb25lIHRpbWUuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9u dGFsbHkgc2Nyb2xsZWQgZGlmZmVyZW50bHkuKi8KKyAgYm9vbCBoc2NsX3RlbXBfcCA9ICghdy0+ c3VzcGVuZF9hdXRvX2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3Jv bGxfbW9kZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTog IEMtdSBDLXggPCBhbmQgZG8gc29tZXRoaW5nIHRoYXQgY2F1c2VzIHRoZSBjdXJyZW50IGxpbmUg dG8gYmUKKyAgICAgICAgICAgICAgIGhvcml6b250YWxseSBzY3JvbGxlZCBkaWZmZXJlbnRseS4K KyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBfaXNfIGhvcml6b250YWxseSBzY3JvbGxlZCBk aWZmZXJlbnRseS4gKi8KKyAgYm9vbCBoc2NsX3Blcm1fcCA9ICghdy0+c3VzcGVuZF9hdXRvX2hz Y3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAmJiBhdXRvX2hzY3JvbGxfbW9kZV9wCisgICAg ICAgICAgICAgICAgICAgICAgJiYgdy0+aHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5taW5faHNjcm9sbCA+IDAKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5taW5f aHNjcm9sbCAhPSB3LT5oc2Nyb2xsKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5m cmFtZSk7CisgIGludCBmcmluZ2VfYml0bWFwID0gTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgaW50 IGZhY2VfaWQgPSBERUZBVUxUX0ZBQ0VfSUQ7CisgIGlmICghcmVtb3ZlX3AKKyAgICAgICYmIGds eXBoX2ZsYXZvciA9PSBNQ19PVkVSTEFZX0FSUk9XX0JJVE1BUAorICAgICAgJiYgIWhzY2xfYWxs X3RlbXBfcAorICAgICAgJiYgIWhzY2xfdGVtcF9wCisgICAgICAmJiAhaHNjbF9wZXJtX3AKKyAg ICAgICYmICFoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgJiYgIWhzY2xfYWxsX3Blcm1fMV9wCisg ICAgICAmJiAhaHNjbF9hbGxfcGVybV8yX3ApCisgICAgeworICAgICAgZW51bSBmYWNlX2lkIG92 ZXJsYXlfYXJyb3dfZmFjZV9pZCA9CisgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICYmICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNoX2luYWN0aXZlX3dpbmRvd3MpKSkK KyAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFy cm93LWluYWN0aXZlLXByZS16di1mYWNlIiksIHRydWUpCisgICAgICAgIDogKGFjdGl2ZV9wKQor ICAgICAgICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1h cnJvdy1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAg ICAgIGZhY2VfaWQgPSAoY3Vyc29yX3R5cGUgPT0gTUNfTEVGVF9GUklOR0VfQklUTUFQKQorICAg ICAgICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAgICAgOiBE RUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAvKiBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9i aXRtYXAgKHcsIFFvdmVybGF5X2Fycm93LCBmYWxzZSwgZmFsc2UpOyAqLworICAgICAgaWYgKHct PmhzY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3dfYml0bWFwYCBzYXRpc2ZpZXMgdGhlIGZpcnN0IGNvbmRpdGlvbgorICAgICAgb2Yg KHdoaWNoICE9IE5PX0ZSSU5HRV9CSVRNQVApLiAgQXQgdGhpcyB0aW1lLCBAbGF3bGlzdCBwcmVm ZXJzIG5vdCB0bworICAgICAgcmVseSB1cG9uIGEgTGlzcCBzZXR0aW5nIHVzaW5nIGBzZXQtZnJp bmdlLWJpdG1hcC1mYWNlJy4gKi8KKyAgICAgIHJvdy0+bGVmdF9mcmluZ2VfYml0bWFwID0gKGN1 cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyBmcmluZ2VfYml0bWFwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDogTUNfTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgIHJvdy0+bGVmdF9mcmluZ2VfZmFjZV9p ZCA9IGZhY2VfaWQ7CisgICAgICByb3ctPmxlZnRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICBy b3ctPmZyaW5nZV9iaXRtYXBfcGVyaW9kaWNfcCA9IGZhbHNlOworICAgICAgbWNfZHJhd19mcmlu Z2VfYml0bWFwICh3LCByb3csIHRydWUsIGN1cnNvcl90eXBlKTsKKyAgICB9CisgICAgZWxzZSBp ZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX09WRVJMQVlf QVJST1dfQklUTUFQCisgICAgICAgICAgICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAgICAg ICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2Fs bF9wZXJtXzFfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAgICAg ICAgICAgICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3Blcm1f cCkpCisgICAgICB7CisgICAgICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2VfaWQg PQorICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgY2hfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgICAgID8gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistb3ZlcmxheS1hcnJvdy1oc2NsLWluYWN0 aXZlLXByZS16di1mYWNlIiksIHRydWUpCisgICAgICAgICAgOiAoYWN0aXZlX3ApCisgICAgICAg ICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLW92ZXJsYXktYXJyb3ct aHNjbC1wcmUtenYtZmFjZSIpLCB0cnVlKQorICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOwor ICAgICAgICBmYWNlX2lkID0gKGN1cnNvcl90eXBlID09IE1DX0xFRlRfRlJJTkdFX0JJVE1BUCkK KyAgICAgICAgICAgICAgICAgID8gb3ZlcmxheV9hcnJvd19mYWNlX2lkCisgICAgICAgICAgICAg ICAgICA6IERFRkFVTFRfRkFDRV9JRDsKKyAgICAgICAgaWYgKGhzY2xfYWxsX3Blcm1fMF9wKQor ICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJu ICgiKy1oc2NsLXBlcm0iKSwgZmFsc2UsIGZhbHNlKTsKKyAgICAgICAgICBlbHNlIGlmIChoc2Ns X2FsbF9wZXJtXzFfcCkKKyAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19nZXRfZnJpbmdl X2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwgdHJ1ZSwgZmFsc2UpOworICAgICAg ICAgICAgZWxzZSBpZiAoaHNjbF9hbGxfcGVybV8yX3ApCisgICAgICAgICAgICAgIGZyaW5nZV9i aXRtYXAgPSBtY19nZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXBlcm0iKSwg ZmFsc2UsIHRydWUpOworICAgICAgICAgICAgICBlbHNlIGlmIChoc2NsX3Blcm1fcCkKKyAgICAg ICAgICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVy biAoIistaHNjbC1wZXJtIiksIHRydWUsIHRydWUpOworICAgICAgICAgICAgICAgIGVsc2UgaWYg KGhzY2xfYWxsX3RlbXBfcCkKKyAgICAgICAgICAgICAgICAgIGZyaW5nZV9iaXRtYXAgPSBtY19n ZXRfZnJpbmdlX2JpdG1hcCAodywgaW50ZXJuICgiKy1oc2NsLXRlbXAiKSwgZmFsc2UsIGZhbHNl KTsKKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhzY2xfdGVtcF9wKQorICAgICAgICAgICAg ICAgICAgICBmcmluZ2VfYml0bWFwID0gbWNfZ2V0X2ZyaW5nZV9iaXRtYXAgKHcsIGludGVybiAo IistaHNjbC10ZW1wIiksIHRydWUsIGZhbHNlKTsKKyAgICAgICAgLyogQXMgdG8gYHJvdy0+b3Zl cmxheV9hcnJvd19iaXRtYXBgLCB0aGUgZmFjZSBtYXkgYmUgY2hhbmdlZCB1c2luZworICAgICAg ICB0aGUgYGZhY2UtcmVtYXBwaW5nLWFsaXN0JyBzbyBsb25nIGFzIHdlIGhhdmUgYSBMaXNwIHNl dHRpbmcgb2Y6CisgICAgICAgICAgKHNldC1mcmluZ2UtYml0bWFwLXByZS16di1mYWNlICcrLWZy aW5nZS1yaWdodC1hcnJvdyAnKy1vdmVybGF5LWFycm93LXByZS16di1mYWNlKQorICAgICAgICBJ ZiB3ZSB1c2UgYHJvdy0+bGVmdF9mcmluZ2VfYml0bWFwYCwgdGhlbiB0aGUgZmFjZSBtYXkgYmUg c2V0IHVzaW5nCisgICAgICAgIE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93LCB0 cnVlLCBjdXJzb3JfdHlwZSk7CisgICAgICB9CisgICAgICBlbHNlIGlmICghcmVtb3ZlX3AKKyAg ICAgICAgICAgICAgICYmIChnbHlwaF9mbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdI VF9BUlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19SRVZFUlNF RF9IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgfHwgZ2x5 cGhfZmxhdm9yID09IE1DX0hPTExPV19SRUNUQU5HTEUKKyAgICAgICAgICAgICAgICAgICB8fCBn bHlwaF9mbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgIHx8IGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9C QVIKKyAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVS VElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUl9CQUNLU0xBU0gpKQorICAgICAgICB7CisgICAgICAgICAgTGlzcF9PYmplY3QgYml0 bWFwX2ZsYXZvciA9IChnbHlwaF9mbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9B UlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfaG9sbG93 X3JlY3RhbmdsZV9yaWdodF9hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6IChnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RBTkdMRV9SSUdI VF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19y ZXZlcnNlZF9ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogKGdseXBoX2ZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xF KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUW1jX2hvbGxvd19y ZWN0YW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhf Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJyb3cKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IFFtY19yZXZlcnNlZF92ZXJ0aWNhbF9iYXJfcmlnaHRfYXJy b3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA/IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY19yZXZlcnNlZF92ZXJ0aWNh bF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfZmxh dm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7CisgICAgICAgICAgZnJpbmdlX2Jp dG1hcCA9IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAgICAg ICAgICAgICAgICAgICAgICA/IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9yKQor ICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX05PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAg ICAgZmFjZV9pZCA9IChjdXJzb3JfdHlwZSA9PSBNQ19SSUdIVF9GUklOR0VfQklUTUFQCisgICAg ICAgICAgICAgICAgICAgICAmJiAoZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX0hPTExPV19S RUNUQU5HTEVfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAg ICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VEX1ZFUlRJQ0FMX0JB UikpCisgICAgICAgICAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50 ZXJuICgiKy1yZXZlcnNlZC1iYXItcHJlLXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAg ICAgICAgOiAoY3Vyc29yX3R5cGUgPT0gTUNfUklHSFRfRlJJTkdFX0JJVE1BUAorICAgICAgICAg ICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3IgIT0gTUNfUkVWRVJTRURfSE9MTE9XX1JFQ1RB TkdMRV9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaF9mbGF2b3Ig IT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAg ICAgICAgICYmIGdseXBoX2ZsYXZvciAhPSBNQ19SRVZFUlNFRF9WRVJUSUNBTF9CQVIpCisgICAg ICAgICAgICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1i YXItcHJlLXp2LWZhY2UiKSwgdHJ1ZSkKKyAgICAgICAgICAgICAgICAgICAgOiBERUZBVUxUX0ZB Q0VfSUQ7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3AgPSBmYWxzZTsKKyAgICAg ICAgICByb3ctPnJpZ2h0X2ZyaW5nZV9iaXRtYXAgPSBmcmluZ2VfYml0bWFwOworICAgICAgICAg IHJvdy0+cmlnaHRfZnJpbmdlX2ZhY2VfaWQgPSBmYWNlX2lkOworICAgICAgICAgIHJvdy0+cmln aHRfZnJpbmdlX29mZnNldCA9IDA7CisgICAgICAgICAgcm93LT5mcmluZ2VfYml0bWFwX3Blcmlv ZGljX3AgPSBmYWxzZTsKKyAgICAgICAgICBtY19kcmF3X2ZyaW5nZV9iaXRtYXAgKHcsIHJvdywg ZmFsc2UsIGN1cnNvcl90eXBlKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChnbHlwaF9m bGF2b3IgPT0gTUNfR0xZUEgKKyAgICAgICAgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1D X0dMWVBITEVTUykKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIG9uX3AgPSB0cnVlOwor ICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+bWNfc2NyaWJlX2N1cnNvciAodywgbWF0cml4LCBy b3csIHgsIGZ4LCB5LCBmeSwgaHBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHZwb3MsIHdkLCBoLCBsc2wsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBnbHlwaF9mbGF2 b3IsIG9uX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBh Y3RpdmVfcCk7CisgICAgICAgICAgfQorfQorCisvKiBEdW1wIGNvbnRlbnRzIG9mIGdseXBoIEdM WVBIIHRvIHN0ZGVyci4gIFJPVyBhbmQgQVJFQSBhcmUKKyAgIHRoZSBnbHlwaCByb3cgYW5kIGFy ZWEgd2hlcmUgdGhlIGdseXBoIGNvbWVzIGZyb20uICovCit2b2lkCittY19kdW1wX2dseXBoIChz dHJ1Y3QgZ2x5cGhfcm93ICpyb3csIHN0cnVjdCBnbHlwaCAqZ2x5cGgsIGludCBhcmVhLAorICAg ICAgICAgICAgICAgaW50IHJlbGF0aXZlX3gsIGludCB2cG9zKQoreworICBib29sIGdseXBoX3p2 X3AgPSAoZ2x5cGggLSByb3ctPmdseXBoc1thcmVhXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisg ICAgICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID09IFpW KTsKKyAgaWYgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAgIHx8IGdseXBoLT50eXBl ID09IEdMWVBITEVTU19HTFlQSCkKKyAgICB7CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAg ICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNnggJTRkICUxLjFk JTEuMWQgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJl YV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgKGdseXBoLT50eXBlID09IENI QVJfR0xZUEgKKyAgICAgICAgID8gJ0MnCisgICAgICAgICA6ICdHJyksCisgICAgICAgIGdseXBo LT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8g J0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAn UycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0 aCwKKyAgICAgICAgZ2x5cGgtPnUuY2gsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAg ICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVf cCwKKyAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAg ICAgbWNfY2hhcl90b19zdHJpbmcgKGdseXBoLT51LmNoKSk7CisgICAgfQorICBlbHNlIGlmIChn bHlwaC0+dHlwZSA9PSBTVFJFVENIX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVy ciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAl NGQgJTEuMWQlMS4xZCAgJTNkICVzICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+ dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnUycsCisgICAg ICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgID8gJ0InCisgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgID8gJ1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAg ICAgICAgID8gJzAnCisgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93 aWR0aCwKKyAgICAgICAgMHUsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlw aC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAg ICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxc UyIpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisgICAg eworICAgICAgZnByaW50ZiAoc3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMg JTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICAlM2QgJXMgJWNcbiIsCisgICAg ICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVzZWRb YXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0aXZl X3gsCisgICAgICAgICdJJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZG RVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChTVFJJ TkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChOSUxQ IChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykpKSwK KyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBnbHlw aC0+dS5pbWdfaWQsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVm dF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAg Z2x5cGgtPmhwb3MsIGdseXBoX3p2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgJy4nKTsKKyAg ICB9CisgIGVsc2UgaWYgKGdseXBoLT50eXBlID09IENPTVBPU0lURV9HTFlQSCkKKyAgICB7Cisg ICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJw RCJkICVjICUzZCAweCUwNngiLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVh XSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAnKycsCisgICAgICAgIGdseXBo LT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg ID8gJ0InCisgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg ID8gJ1MnCisgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8g JzAnCisgICAgICAgICAgOiAnLScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAg ICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuY21wLmlkKTsKKyAgICAgIGZwcmludGYgKHN0 ZGVyciwgIiAlNGQgJTEuMWQlMS4xZCIsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAg ICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVf cCk7CisgICAgICBpZiAoZ2x5cGgtPnUuY21wLmF1dG9tYXRpYykKKyAgICAgICAgZnByaW50ZiAo c3RkZXJyLCAiICAlM2QgJXMgLiBbJWQtJWRdXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAg IGdseXBoLT5ocG9zLCBnbHlwaF96dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICAgICAgICAg ICAgICAgICAgZ2x5cGgtPnNsaWNlLmNtcC5mcm9tLCBnbHlwaC0+c2xpY2UuY21wLnRvKTsKKyAg ICAgICAgZWxzZQorICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcbiIpOworICAgIH0KKyAgZWxz ZSBpZiAoZ2x5cGgtPnR5cGUgPT0gWFdJREdFVF9HTFlQSCkKKyAgICB7CisjaWZuZGVmIEhBVkVf WFdJREdFVFMKKyAgICAgIGVhc3N1bWUgKGZhbHNlKTsKKyNlbHNlCisgICAgICBmcHJpbnRmIChz dGRlcnIsCisgICAgICAgICIgICU1ZC8lLTVkICU1ZCAlNGMgJTZkICVjICUzZCAweCUwNXggJTRk ICUxLjFkJTEuMWQgICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVz ZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1gnLAorICAgICAg ICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAg ICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAg ICAgICAgPyAnUycKKyAgICAgICAgIDogJy0nKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0 aCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5l X3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+dS54 d2lkZ2V0LAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhfenZfcCA/ICJaViIgOiAiLS0iLAor ICAgICAgICAnLicpOworI2VuZGlmCisgICAgfQorfQorCisvKiBEdW1wIHRoZSBjb250ZW50cyBv ZiBnbHlwaCByb3cgYXQgVlBPUyBpbiBNQVRSSVggdG8gc3RkZXJyLgorICAgR0xZUEhTIDAgbWVh bnMgZG9uJ3Qgc2hvdyBnbHlwaCBjb250ZW50cy4KKyAgIEdMWVBIUyAxIG1lYW5zIHNob3cgZ2x5 cGhzIGluIHNob3J0IGZvcm0KKyAgIEdMWVBIUyA+IDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4gbG9u ZyBmb3JtLiAqLwordm9pZAorbWNfZHVtcF9nbHlwaF9yb3cgKHN0cnVjdCBnbHlwaF9yb3cgKnJv dywgaW50IHZwb3MsIGludCBnbHlwaHMpCit7CisgIGludCByZWxhdGl2ZV94ID0gMDsKKyAgaWYg KGdseXBocyAhPSAxKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIlxuRFVNUCBHTFlQ SCBST1dcbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiUm93ICAgICBTdGFydCAgICAgICBF bmQgVXNlZCBvRT48XFxDVFpGZXNtICAgICBYICAgIFkgICAgVyAgICBIICAgIFYgICAgQSAgICBQ XG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIik7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIlM2QgJTkicEQiZCAlOSJwRCJkICU0ZCAlMS4xZCUx LjFkJTEuMWQlMS4xZFwKKyUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQlMS4xZCUxLjFkJTEuMWQg ICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkICU0ZFxuIiwKKyAgICAgICAgIHZwb3MsCisgICAgICAg ICBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyksCisgICAgICAgICBNQVRSSVhfUk9XX0VO RF9DSEFSUE9TIChyb3cpLAorICAgICAgICAgcm93LT51c2VkW1RFWFRfQVJFQV0sCisgICAgICAg ICByb3ctPmNvbnRhaW5zX292ZXJsYXBwaW5nX2dseXBoc19wLAorICAgICAgICAgcm93LT5lbmFi bGVkX3AsCisgICAgICAgICByb3ctPnRydW5jYXRlZF9vbl9sZWZ0X3AsCisgICAgICAgICByb3ct PnRydW5jYXRlZF9vbl9yaWdodF9wLAorICAgICAgICAgcm93LT5jb250aW51ZWRfcCwKKyAgICAg ICAgIE1BVFJJWF9ST1dfQ09OVElOVUFUSU9OX0xJTkVfUCAocm93KSwKKyAgICAgICAgIE1BVFJJ WF9ST1dfRElTUExBWVNfVEVYVF9QIChyb3cpLAorICAgICAgICAgcm93LT5lbmRzX2F0X3p2X3As CisgICAgICAgICByb3ctPmZpbGxfbGluZV9wLAorICAgICAgICAgcm93LT5lbmRzX2luX21pZGRs ZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPnN0YXJ0c19pbl9taWRkbGVfb2ZfY2hhcl9wLAor ICAgICAgICAgcm93LT5tb3VzZV9mYWNlX3AsCisgICAgICAgICByb3ctPngsCisgICAgICAgICBy b3ctPnksCisgICAgICAgICByb3ctPnBpeGVsX3dpZHRoLAorICAgICAgICAgcm93LT5oZWlnaHQs CisgICAgICAgICByb3ctPnZpc2libGVfaGVpZ2h0LAorICAgICAgICAgcm93LT5hc2NlbnQsCisg ICAgICAgICByb3ctPnBoeXNfYXNjZW50KTsKKyAgICAgIC8qIFRoZSBuZXh0IDMgbGluZXMgc2hv dWxkIGFsaWduIHRvICJTdGFydCIgaW4gdGhlIGhlYWRlci4gKi8KKyAgICAgIGZwcmludGYgKHN0 ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcdCU1ZFxuIiwgcm93LT5zdGFydC5vdmVybGF5X3N0 cmluZ19pbmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLm92ZXJsYXlfc3RyaW5nX2luZGV4LAorICAg ICAgICAgcm93LT5jb250aW51YXRpb25fbGluZXNfd2lkdGgpOworICAgICAgZnByaW50ZiAoc3Rk ZXJyLCAiICAgICU5InBEImQgJTkicEQiZFxuIiwKKyAgICAgICAgIENIQVJQT1MgKHJvdy0+c3Rh cnQuc3RyaW5nX3BvcyksCisgICAgICAgICBDSEFSUE9TIChyb3ctPmVuZC5zdHJpbmdfcG9zKSk7 CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTlkICU5ZFxuIiwgcm93LT5zdGFydC5kcHZl Y19pbmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLmRwdmVjX2luZGV4KTsKKyAgICB9CisgIGlmIChn bHlwaHMgPiAxKQorICAgIHsKKyAgICAgIGZvciAoaW50IGFyZWEgPSBMRUZUX01BUkdJTl9BUkVB OyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgIHsKKyAgICAgICAgICBzdHJ1Y3Qg Z2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAgICAgc3RydWN0IGdseXBo ICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAgICAgICAgICAvKiBHbHlw aCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAqLworICAgICAgICAgIGlmIChhcmVhID09IFRFWFRf QVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAg ICAgICAgKytnbHlwaF9lbmQ7CisgICAgICAgICAgaWYgKGdseXBoIDwgZ2x5cGhfZW5kKQorICAg ICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiR2x5cGgjL1RvdGFsIFJlbC5YIFQgICAgICAgUG9z IE8gICBXICAgICBDb2RlIEZhY2UgTFIgSFBPUyBaViBDXG4iKTsKKyAgICAgICAgICBmb3IgKDsg Z2x5cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gsIHZwb3MpOworICAg ICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAg IH0KKyAgICAgICAgfQorICAgIH0KKyAgICBlbHNlIGlmIChnbHlwaHMgPT0gMSkKKyAgICAgIHsK KyAgICAgICAgY2hhciBzW1NIUlRfTUFYICsgNF07CisgICAgICAgIGZvciAoaW50IGFyZWEgPSBM RUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgICAgewor ICAgICAgICAgICAgaW50IGk7CisgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcm93LT51c2Vk W2FyZWFdOyArK2kpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5 cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV0gKyBpOworICAgICAgICAgICAgICAgIGlmIChp ID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgJiYgYXJlYSA9PSBU RVhUX0FSRUEKKyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAg ICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAnICcpCisgICAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICAgIHN0cmNweSAoJnNbaV0sICJbXFxuXSIpOworICAgICAgICAgICAg ICAgICAgICBpICs9IDQ7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBl bHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBnbHlwaC0+dS5jaCA8IDB4ODAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGdseXBoLT51LmNoID49ICcgJykKKyAgICAgICAgICAgICAgICAgICAgc1tpXSA9IGdseXBoLT51 LmNoOworICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgc1tp XSA9ICcuJzsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgc1tpXSA9ICdcMCc7CisgICAg ICAgICAgICBmcHJpbnRmIChzdGRlcnIsICIlM2Q6ICglZCkgJyVzJ1xuIiwgdnBvcywgcm93LT5l bmFibGVkX3AsIHMpOworICAgICAgICAgIH0KKyAgICAgIH0KK30KKworREVGVU4gKCJtYy1kdW1w LWdseXBoLXJvdyIsIEZtY19kdW1wX2dseXBoX3JvdywgU21jX2R1bXBfZ2x5cGhfcm93LCAxLCAy LCAiUCIsCisgICAgICAgZG9jOiAvKiBEdW1wIGdseXBoIHJvdyBST1cgdG8gc3RkZXJyLgorSW50 ZXJhY3RpdmVseSwgUk9XIGlzIHRoZSBwcmVmaXggbnVtZXJpYyBhcmd1bWVudCBhbmQgZGVmYXVs dHMgdG8KK3RoZSByb3cgd2hpY2ggZGlzcGxheXMgcG9pbnQuCitPcHRpb25hbCBhcmd1bWVudCBH TFlQSFMgMCBtZWFucyBkb24ndCBkdW1wIGdseXBocy4KK0dMWVBIUyAxIG1lYW5zIGR1bXAgZ2x5 cGhzIGluIHNob3J0IGZvcm0uCitHTFlQSFMgPiAxIG9yIG9taXR0ZWQgbWVhbnMgZHVtcCBnbHlw aHMgaW4gbG9uZyBmb3JtLiAgKi8pCisgIChMaXNwX09iamVjdCByb3csIExpc3BfT2JqZWN0IGds eXBocykKK3sKKyAgc3RydWN0IHdpbmRvdyAqdyA9IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdyk7 CisgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1cnJlbnRfbWF0cml4OworICBF TUFDU19JTlQgdnBvczsKKyAgaWYgKE5JTFAgKHJvdykpCisgICAgeworICAgICAgaW50IGQxLCBk MiwgZDMsIGQ0LCBkNSwgeXBvczsKKyAgICAgIGJvb2wgdmlzaWJsZV9wID0gcG9zX3Zpc2libGVf cCAodywgUFQsICZkMSwgJmQyLCAmZDMsICZkNCwgJmQ1LCAmeXBvcyk7CisgICAgICBpbnQgaGVh ZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgICAgICBp bnQgdm9mZnNldCA9IChoZWFkZXJfbGluZV9oZWlnaHQgPiAwCisgICAgICAgICAgICAgICAgICAg ICAmJiB5cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICA/IHlwb3MgKyAxCisgICAgICAg ICAgICAgICAgICAgICAgOiB5cG9zOworICAgICAgaWYgKHZpc2libGVfcCkKKyAgICAgICAgdnBv cyA9IHZvZmZzZXQ7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB2cG9zID0gMDsKKyAgICB9Cisg ICAgZWxzZQorICAgICAgeworICAgICAgICBDSEVDS19OVU1CRVIgKHJvdyk7CisgICAgICAgIHZw b3MgPSBYRklYTlVNIChyb3cpOworICAgICAgfQorICBpZiAodnBvcyA+PSAwICYmIHZwb3MgP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ggPCBtYXRyaXgu dnBvc1t2bnRoXS5jYWNoZV91c2VkW2NhY2hlX3R5cGVdKQorICAgIHJldHVybiB0cnVlOworICAg IGVsc2UKKyAgICAgIHJldHVybiBmYWxzZTsKK30KKwordm9pZAorbWNfcmVzZXRfY2FjaGUgKHN0 cnVjdCB3aW5kb3cgKncpCit7CisgIGlmICghQlVGRkVSUCAody0+Y29udGVudHMpKQorICAgIHJl dHVybjsKKyAgZm9yIChlbnVtIG1jX2NhY2hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOwor ICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAg eworICAgICAgYm9vbCBidmFyX2FjdGl2ZV9wOworICAgICAgc3dpdGNoIChjYWNoZV90eXBlKQor ICAgICAgICB7CisgICAgICAgICAgY2FzZSBOT19DQUNIRToKKyAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgfQorICAgICAgICAgIGNhc2UgTUNfQ0FDSEU6 CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykK KyAgICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwg bWNfY29uZikpKQorICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgICBlbHNlIGlmIChCVUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25m KSkpCisgICAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gdHJ1ZTsKKyAgICAgICAgICAg ICAgYnJlYWs7CisgICAgICAgICAgICB9CisgICAgICAgICAgY2FzZSBDSF9DQUNIRToKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAg ICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hh aXJzKSkpCisgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IGZhbHNlOworICAgICAgICAg ICAgICAgIGVsc2UgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMp KSkKKyAgICAgICAgICAgICAgICAgIGJ2YXJfYWN0aXZlX3AgPSB0cnVlOworICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBjYXNlIEZDX0NBQ0hFOgorICAgICAg ICAgICAgeworICAgICAgICAgICAgICBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAg ICAgICAgICAgICAmJiBOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2li bGUpKSkKKyAgICAgICAgICAgICAgICBidmFyX2FjdGl2ZV9wID0gZmFsc2U7CisgICAgICAgICAg ICAgICAgZWxzZSBpZiAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgZmNfdmlzaWJsZSkp KQorICAgICAgICAgICAgICAgICAgYnZhcl9hY3RpdmVfcCA9IHRydWU7CisgICAgICAgICAgICAg IGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAoIWJ2YXJfYWN0aXZl X3ApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBEZWNyZWFzZSB0aGUgc2l6ZSBvZiB0aGUgYXJy YXkgdG8gYSBiYXJlIG1pbmltdW0uICovCisgICAgICAgICAgZm9yIChpbnQgdm50aCA9IDA7IHZu dGggPCB3LT5tY19tYXRyaXgudnBvc191c2VkOyArK3ZudGgpCisgICAgICAgICAgICB7CisgICAg ICAgICAgICAgIGlmICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2Fj aGVfdHlwZV0gPiAxKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdID0KKyAgICAgICAgICAgICAgICAg ICAgeG5yZWFsbG9jICh3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXSwg MSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKnctPm1jX21hdHJpeC52 cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdKTsKKyAgICAgICAgICAgICAgICAgIHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlX2FsbG9jYXRlZFtjYWNoZV90eXBlXSA9IDE7CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV91 c2VkW2NhY2hlX3R5cGVdID0gMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICB3LT5tY19tYXRy aXguY3Vyc29yc191c2VkW2NhY2hlX3R5cGVdID0gMDsKKyAgICAgICAgfQorICAgICAgICAvLyAg QWx0aG91Z2ggaXQgd291bGQgbm90IGJlIHZlcnkgZWZmaWNpZW50LCBpdCBpcyBwb3NzaWJsZSB0 byBzZXQKKyAgICAgICAgLy8gIHRoZSBfdXNlZF8gZWxlbWVudHMgb2YgdGhlIGFycmF5IHRvIHpl cm8uICBJbiBzdWNoIGEgY2FzZSwgdGhlCisgICAgICAgIC8vICAuLi5fZWx0cy5hbGxvY2F0ZWRb Y2FjaGVfdHlwZV0gd291bGQgcmVtYWluIHRoZS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9CisgICAgICBpZiAoIXNhbWVfcCkKKyAgICAgICAgbWNfZHJhd19l cmFzZV9oeWJyaWQgKHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdk LCBoLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93 aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgcmVtb3ZlX3ApOworICAg ICAgcmV0dXJuOworICAgIH0KKyAgICBlbHNlIGlmIChkcmF3X3AKKyAgICAgICAgICAgICAmJiAo ZnJvbV93aGVyZSA9PSBTQ1JJQkVfT05FCisgICAgICAgICAgICAgICAgIHx8IGZyb21fd2hlcmUg PT0gU0NSSUJFX1RXTworICAgICAgICAgICAgICAgICB8fCBmcm9tX3doZXJlID09IFNDUklCRV9U SFJFRQorICAgICAgICAgICAgICAgICB8fCBmcm9tX3doZXJlID09IE5PV0hFUkUpKQorICAgICAg eworICAgICAgICBtY19kcmF3X2VyYXNlX2h5YnJpZCAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5 LCBmeSwgaHBvcywgdnBvcywgd2QsIGgsIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwgZ2x5cGhfZmxh dm9yLCByZW1vdmVfcCk7CisgICAgICAgIHJldHVybjsKKyAgICAgIH0KKyAgaWYgKGNhY2hlX3R5 cGUgPT0gTk9fQ0FDSEUpCisgICAgcmV0dXJuOworICArK3ctPm1jX21hdHJpeC5jdXJzb3JzX3Vz ZWRbY2FjaGVfdHlwZV07CisgIGlmICh2bnRoID49IHctPm1jX21hdHJpeC52cG9zX3VzZWQpCisg ICAgdy0+bWNfbWF0cml4LnZwb3NfdXNlZCA9IHZudGggKyAxOworICBpZiAody0+bWNfbWF0cml4 LnZwb3NfYWxsb2N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tjYWNoZV90eXBl XTsKKyAgICAgIHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdID0geHBh bGxvYyAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV0sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ3LT5t Y19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZV9hbGxvY2F0ZWRbY2FjaGVfdHlwZV0sCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19l bHRzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBJTlRfTUFYLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzaXplb2YgKnctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNhY2hl W2NhY2hlX3R5cGVdKTsKKyAgICAgIG1lbXNldCAody0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV0gKyBvbGRfYWxsb2MsIDAsCisgICAgICAgICAgICAgICAody0+bWNfbWF0 cml4LnZwb3Nbdm50aF0uY2FjaGVfYWxsb2NhdGVkW2NhY2hlX3R5cGVdIC0gb2xkX2FsbG9jKQor ICAgICAgICAgICAgICAgICAqIHNpemVvZiAqdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVb Y2FjaGVfdHlwZV0pOworICAgIH0KKyAgaW50IG50aCA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhd LmNhY2hlX3VzZWRbY2FjaGVfdHlwZV0gLSAxOworICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLnNhbWVfcCA9IGZhbHNlOworICB3LT5tY19tYXRyaXgudnBv c1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JlcyBubyBnYXAgYmV0d2VlbiB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHByZXZpb3VzL25leHQgbGluZS4gIFRoZSBGWCBjb29yZGluYXRlIGlzIHNl dAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZXdoZXJlOiAgYHctPmN1 cnNvci54YCAvIGBtYy5mY194YC4gKi8KK3ZvaWQKK21jX2dldF9jdXJzb3JfZ2VvbWV0cnkgKHN0 cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCwKKyAgICAgICAgICAg ICAgICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHgsIGludCAqZngsIGludCB5 LAorICAgICAgICAgICAgICAgICAgICAgICAgaW50ICpmeSwgaW50IGhwb3MsIGludCB2cG9zLCBp bnQgKmgsCisgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIG1jX2N1cnNvcl90eXBlIGN1cnNv cl90eXBlLCBpbnQgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgICAgaW50ICp3 ZCkKK3sKKyAgc3RydWN0IGdseXBoICpnbHlwaCA9IG1jX2dldF9jdXJzb3JfZ2x5cGggKHcsIG1h dHJpeCwgcm93LCBocG9zLCB2cG9zKTsKKyAgaWYgKGdseXBoID09IE5VTEwpCisgICAgcmV0dXJu OworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICAqZngg PSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB4KTsKKyAgKmggPSByb3ctPnZpc2li bGVfaGVpZ2h0OworICAvKiBEb24ndCBsZXQgdGhlIGN1cnNvciBleGNlZWQgdGhlIGRpbWVuc2lv bnMgb2YgdGhlIHJvdywgc28gdGhhdAorICB0aGUgdXBwZXIvbG93ZXIgc2lkZSBvZiB0aGUgYm94 IGFyZW4ndCBjbGlwcGVkLiAgKi8KKyAgaW50IHdfaGVhZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9X X0hFQURFUl9MSU5FX0hFSUdIVCAodyk7CisgIGludCB3X3RleHRfYm90dG9tX3kgPSB3aW5kb3df dGV4dF9ib3R0b21feSAodykgLSAqaDsKKyAgaWYgKHkgPCB3X2hlYWRlcl9saW5lX2hlaWdodCkK KyAgICB7CisgICAgICAqaCA9IG1heCAoKmggLSAod19oZWFkZXJfbGluZV9oZWlnaHQgLSB5KSAr IDEsICpoKTsKKyAgICAgIHkgPSB3X2hlYWRlcl9saW5lX2hlaWdodCAtIDE7CisgICAgICAvLyBm cHJpbnRmIChzdGRlcnIsICJDT05ESVRJT04gIyAxXG4iKTsKKyAgICB9CisgICBlbHNlIGlmICh5 ID4gd190ZXh0X2JvdHRvbV95KQorICAgICB7CisgICAgICAgKmggKz0geSAtIHdfdGV4dF9ib3R0 b21feTsKKyAgICAgICB5ID0gd190ZXh0X2JvdHRvbV95OworICAgICAgIC8vIGZwcmludGYgKHN0 ZGVyciwgIkNPTkRJVElPTiAjIDJcbiIpOworICAgICB9CisgICpmeSA9IFdJTkRPV19UT19GUkFN RV9QSVhFTF9ZICh3LCB5KTsKKyAgc3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICB7CisgICAgICBj YXNlIE1DX0JBUjoKKyAgICAgICAgeworICAgICAgICAgIGlmIChjdXJzb3Jfd2lkdGggPCAxKQor ICAgICAgICAgICAgY3Vyc29yX3dpZHRoID0gbWF4IChGUkFNRV9DVVJTT1JfV0lEVEggKGYpLCAx KTsKKyAgICAgICAgICBpZiAoY3Vyc29yX3dpZHRoIDwgZ2x5cGgtPnBpeGVsX3dpZHRoKQorICAg ICAgICAgICp3ZCA9IGN1cnNvcl93aWR0aDsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQor ICAgICAgY2FzZSBNQ19IQkFSOgorICAgICAgICB7CisgICAgICAgICAgaW50IGN1cnNvcl9oZWln aHQgPS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9ICh3LT5jdXJzb3IudnBvcyAhPSAtMSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPVyAoY3Vyc29yX21h dHJpeCwgdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IE5VTEw7CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0gKHctPmN1cnNvci52cG9zICE9 IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfZ2V0X2N1cnNvcl9nbHlw aCAodywgY3Vyc29yX21hdHJpeCwgY3Vyc29yX3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3Iu dnBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgIGJvb2wgY3Vy c29yX2F0X2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxMCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93 X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3Iu eCA9PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ Y3Vyc29yLnggPT0gY3Vyc29yX3Jvdy0+cGl4ZWxfd2lkdGgpOworICBib29sIGN1cnNvcl9iZXlv bmRfZnJpbmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FS RUFdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhY3Vyc29yX3Jvdy0+ZXhh Y3Rfd2luZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgdy0+Y3Vyc29yLnggPj0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7Cisg IGludCBmcmFtZV9jaGFyX3dpZHRoID0gRlJBTUVfQ09MVU1OX1dJRFRIIChmKTsKKyAgaW50IHRl bXBfZmFjZV9pZCA9IGdseXBoLT5mYWNlX2lkOworICBzdHJ1Y3QgbWNfUkdCIGJhY2tncm91bmQ7 CisgIG1jX3NldF9sc2xfYmcgKHcsIHRlbXBfZmFjZV9pZCwgJmJhY2tncm91bmQpOworICBib29s IHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeCA9PSByZWxhdGl2ZV94CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9ocG9zID09IGhwb3MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3kgPT0gcm93LT55CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpOworCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIENIQVJfR0xZUEggfCBHTFlQ SExFU1NfR0xZUEggICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisgIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICB8fCBnbHlwaC0+dHlwZSA9 PSBHTFlQSExFU1NfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJp bnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMg JTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVzXG4iLAorICAgICAgICBnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDAp ID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAg ICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgPyAnQycKKyAgICAgICAgIDog J0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+ b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmpl Y3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVj dCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAg ICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAg ICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2Jve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tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9SVUxFUjogIENI QVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisgICAgY2FzZSBIT1JJWk9OVEFMX1JVTEVSOgorICAgIHsKKyAgICAgIGlm IChyZWxhdGl2ZV94IDwgcm93LT5waXhlbF93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2Vf Y3Vyc29yX3ApCisgICAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxh dGl2ZV94LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgICAgd2QsIGgs IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAg ICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19HTFlQ SCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFj dGlvbl90eXBlKTsKKyAgICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0g cm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICYmIHJlbGF0aXZlX3ggPD0geF9saW1pdCkK KyAgICAgICAgeworICAgICAgICAgIGlmIChyZWxhdGl2ZV94IDwgcm93LT5waXhlbF93aWR0aCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxf d2lkdGg7CisgICAgICAgICAgICAgIGZ4ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgcmVsYXRp dmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgeF9saW1p dCAtIHJlbGF0aXZlX3gsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlv biwKKyAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQsIGJhY2tncm91bmQsIGVzc2VudGlh bHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywKKyAgICAgICAgICAgICAgICAgICAgIGRyYXdfcCwg ZnJvbV93aGVyZSwgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgICB9CisgICAgICBi cmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAg VkVSVElDQUxfUlVMRVI6ICBDSEFSX0dMWVBIIHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAg ICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJUSUNBTF9SVUxF UjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vyc29yX2F0 X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT5j b250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19W RVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJf UklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNv cl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9w CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jfcm93LT51 c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0g PT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJT RURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09 IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0g TUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1DX1JFVkVSU0VE X1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBNQ19SSUdIVF9GUklOR0VfQklU TUFQOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5 cGgsIHJlbGF0aXZlX3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAg ICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZv cmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZl X3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICBj YWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgRklMTF9DT0xVTU46ICBDSEFSX0dMWVBI IHwgR0xZUEhMRVNTX0dMWVBIICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZv ciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+ dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBl c3NlbnRpYWxzLmZjX3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBjaF92ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvcG9pbnRfeSA9PSB5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvcG9pbnRfdnBvcyA9PSB2cG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIHdkID0gMTsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0 cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94LCBmY19meCwgeSwgZnksIGhwb3MsIHZwb3MsCisg ICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9z aXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlh bHMuYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAg ICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9Cisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIENVUlNPUl9JTkRJQ0FUT1I6CisgICAg eworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIH0KKyAg fQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgIEVO RDogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAgICAgKi8KKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAg ICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2UgaWYg KGdseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3RkZXJyX3Ap CisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVj ICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVzXG4iLAorICAg ICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2Vk W2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2 ZV94LAorICAgICAgICAnUycsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVG RkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQ IChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAg KGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAn LScpKSksCisgICAgICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgMHUsCisgICAgICAg IGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPmhwb3MsIGdseXBoX3p2 X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgIlxcUyIpOworICBzd2l0Y2ggKGFjdGlvbl90eXBl KQorICB7CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAg ICAgTVVMVElQTEVfQ1VSU09SUzogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAq LworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBNVUxUSVBMRV9DVVJTT1JTOgor ICAgIHsKKyAgICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGdseXBoLCByZWxhdGl2ZV94 LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsCisgICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3Jf dHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9zaXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAg ICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3As IGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsK KyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgU1RSRVRDSF9HTFlQSCAgICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUkla T05UQUxfUlVMRVI6CisgICAgeworICAgICAgaWYgKHJlbGF0aXZlX3ggPCByb3ctPnBpeGVsX3dp ZHRoCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgbWNfaGVscGVy ICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBv cywKKyAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg cm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQs IGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAg ICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgaWYgKGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAg ICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAgICB7CisgICAgICAgICAgaWYgKHJl bGF0aXZlX3ggPCByb3ctPnBpeGVsX3dpZHRoKQorICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBn bHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gKHJvdy0+ZmlsbF9s aW5lX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBnbHlwaC0+ZmFjZV9pZAorICAgICAg ICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNFX0lEOworICAgICAgICAgIHN0cnVjdCBt Y19SR0IgYmFja2dyb3VuZDsKKyAgICAgICAgICBtY19zZXRfbHNsX2JnICh3LCB0ZW1wX2ZhY2Vf aWQsICZiYWNrZ3JvdW5kKTsKKyAgICAgICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBn bHlwaCwgcmVsYXRpdmVfeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAg ICAgICAgeF9saW1pdCAtIHJlbGF0aXZlX3gsIGgsIGN1cnNvcl90eXBlLCB4X2xpbWl0IC0gcmVs YXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgIHJvd19wb3NpdGlvbiwgZm9yZWdyb3VuZCwg YmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgIE1D X0dMWVBITEVTUywgZHJhd19wLCBmcm9tX3doZXJlLCBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7 CisgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAq LworLyogICAgICAgICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAgU1RSRVRDSF9H TFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAg ICBjYXNlIFZFUlRJQ0FMX1JVTEVSOgorICAgIHsKKyAgICAgIGlmIChyb3ctPmZpbGxfbGluZV9w CisgICAgICAgICAgJiYgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNl ZFthcmVhXSAtIDEKKyAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3ggKyBnbHlwaC0+ cGl4ZWxfd2lkdGgpCisgICAgICAgIHRlbXBfZmFjZV9pZCA9IGdseXBoLT5mYWNlX2lkOworICAg ICAgICBlbHNlIGlmICghcm93LT5maWxsX2xpbmVfcAorICAgICAgICAgICAgICAgICAmJiBnbHlw aCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAg ICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgp CisgICAgICAgICAgdGVtcF9mYWNlX2lkID0gREVGQVVMVF9GQUNFX0lEOworICAgICAgc3RydWN0 IG1jX1JHQiBiYWNrZ3JvdW5kOworICAgICAgbWNfc2V0X2xzbF9iZyAodywgdGVtcF9mYWNlX2lk LCAmYmFja2dyb3VuZCk7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoY3Vy c29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg cm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg PyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25fcmln aHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNB TF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDog KGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9X CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25kX2Zy aW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJzb3Jf cm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBCRUdJTjogIElNQUdFX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAg ICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUg PT0gSU1BR0VfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRm IChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNk IDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8g MCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAn SScsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICAgICAgICA/ICcwJworICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAg IGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgKHVuc2lnbmVkIGludCkgZ2x5cGgtPnUuaW1n X2lkLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xp bmVfcCwKK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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgp CisgIHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICB7CisgICAgICAgIGZwcmludGYgKHN0 ZGVyciwKKyAgICAgICAgICAiXG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAw eCUwNngiLAorICAgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAg ICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwK KyAgICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAgICcrJywKKyAgICAgICAgICBnbHlwaC0+ Y2hhcnBvcywKKyAgICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg PyAnQicKKyAgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAg ICAgPyAnUycKKyAgICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAg ICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgICAgZ2x5 cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5p ZCk7CisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAlNGQgJTEuMWQlMS4xZCIsCisgICAgICAg ICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAg ICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCk7CisgICAgICBpZiAoZ2x5cGgtPnUuY21w LmF1dG9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ICAgICAgICAgd2hpbGUgKHJlbGF0aXZlX3ggPD0geF9saW1pdCkKKyAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywgZ2x5 cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAgICAgICAg ICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBm b3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlh bHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19wLAorICAgICAgICAgICAgICAgICAgICAg ICAgIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgICAgICAgICAg cmVsYXRpdmVfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9 CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAg ICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1JVTEVSOiAgQ09NUE9TSVRFX0dMWVBIICAgICAg ICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBWRVJU SUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAo Y3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9hdF9mcmluZ2VfcAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93LT50cnVuY2F0ZWRfb25f cmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJU SUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FS Uk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYmV5b25k X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBjdXJz b3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93aWR0aCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGdseXBoX2ZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBnbHlwaF9mbGF2b3IgPT0g TUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZ2x5cGhf Zmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBnbHlwaF9m bGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgfHwgZ2x5cGhfZmxhdm9yID09IE1D X1JFVkVSU0VEX1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBNQ19SSUdIVF9G UklOR0VfQklUTUFQOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgs IHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIG9wb2ludF9meCwgeSwgZnksIGhwb3MsIHZwb3MsCisg ICAgICAgICAgICAgICAgIHdkLCBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCByb3dfcG9z aXRpb24sIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIGJhY2tncm91bmQsIGVzc2VudGlh bHMuYWN0aXZlX3AsIGdseXBoX2ZsYXZvciwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAg ICAgICAgICBjYWNoZV90eXBlLCBhY3Rpb25fdHlwZSk7CisgICAgICBicmVhazsKKyAgICB9Cisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBGSUxM X0NPTFVNTjogIENPTVBPU0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAqLworLyogLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBl bnVtIG1jX2ZsYXZvciBnbHlwaF9mbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgd2QgPSAxOworICAgICAgbWNfaGVscGVyICh3 LCBtYXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBv cywKKyAgICAgICAgICAgICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJv d19wb3NpdGlvbiwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNz ZW50aWFscy5hY3RpdmVfcCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAg ICAgICAgICAgICAgIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsKKyAgICAgIGJyZWFrOworICAg IH0KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgQ1VSU09SX0lORElDQVRPUjoK KyAgICB7CisgICAgICBicmVhazsKKyAgIC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AorICAgICAgICBn bHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFd ID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAor ICAgICAgICAnWCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAo Z2x5cGgtPm9iamVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlw aC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogJy0nKSksCisgICAg ICAgIGdseXBoLT5waXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAg IGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9w LAorICAgICAgICBnbHlwaC0+dS54d2lkZ2V0LAorICAgICAgICBnbHlwaC0+aHBvcywgZ2x5cGhf enZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAnLicpOworI2VuZGlmCisgIHN3aXRjaCAoYWN0 aW9uX3R5cGUpCisgIHsKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAg ICAgICAgICAgICBNVUxUSVBMRV9DVVJTT1JTOiAgWFdJREdFVF9HTFlQSCAgICAgICAgICAgICAg ICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIE1VTFRJUExFX0NV UlNPUlM6CisgICAgeworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJv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ZlX3AsIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hlcmUsCisgICAg ICAgICAgICAgICAgICAgY2FjaGVfdHlwZSwgYWN0aW9uX3R5cGUpOworICAgICAgaWYgKGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAg ICAgJiYgcmVsYXRpdmVfeCA8PSB4X2xpbWl0KQorICAgICAgICB7CisgICAgICAgICAgcmVsYXRp dmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHJlbGF0aXZlX3gg PD0geF9saW1pdCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCBt YXRyaXgsIHJvdywgZ2x5cGgsIHJlbGF0aXZlX3gsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAg ICAgICAgICAgICAgICAgICAgICAgICB3ZCwgaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg cm93X3Bvc2l0aW9uLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tn cm91bmQsIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBITEVTUywgZHJhd19wLAorICAgICAg ICAgICAgICAgICAgICAgICAgIGZyb21fd2hlcmUsIGNhY2hlX3R5cGUsIGFjdGlvbl90eXBlKTsK KyAgICAgICAgICAgICAgcmVsYXRpdmVfeCArPSBmcmFtZV9jaGFyX3dpZHRoOworICAgICAgICAg ICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9SVUxFUjogIFhXSURH RVRfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICov CisgICAgY2FzZSBWRVJUSUNBTF9SVUxFUjoKKyAgICB7CisgICAgICBlbnVtIG1jX2ZsYXZvciBn bHlwaF9mbGF2b3IgPSAoY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfYXRfZnJpbmdlX3AKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVlZF9wCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25f cmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJU SUNBTF9CQVIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9h dF9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93 LT50cnVuY2F0ZWRfb25fcmlnaHRfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKGN1cnNvcl9iZXlvbmRfZnJpbmdlX3AKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVSVElD QUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 IChjdXJzb3JfYmV5b25kX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0gIT0gMQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3Ap CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfUkVWRVJTRURfVkVS VElDQUxfQkFSCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAt IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3ggPj0gcm93LT5waXhlbF93 aWR0aCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQSExF U1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGdseXBoX3p2X3ApCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaWYgKGds eXBoX2ZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICB8fCBn bHlwaF9mbGF2b3IgPT0gTUNfUkVWRVJTRURfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAg ICAgICAgfHwgZ2x5cGhfZmxhdm9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0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAoZ2x5cGhfenZfcCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIGNoX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF95ID09IHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF92cG9zID09IHZwb3MpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgbWNfaGVscGVyICh3LCBtYXRyaXgsIHJvdywg Z2x5cGgsIHJlbGF0aXZlX3gsIGZjX2Z4LCB5LCBmeSwgaHBvcywgdnBvcywKKyAgICAgICAgICAg ICAgICAgd2QsIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgZm9y ZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCwgZXNzZW50aWFscy5hY3RpdmVf cCwgZ2x5cGhfZmxhdm9yLCBkcmF3X3AsIGZyb21f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0gbWNfcm93 X3Bvc2l0aW9uIHJvd19wb3NpdGlvbiwgYm9vbCBkcmF3X3AsIGVudW0gbWNfZHJhd19yb3dfdHlw ZSBmcm9tX3doZXJlKQoreworICAvLyAgY2xvY2tfdCBjbG9ja19zdGFydCA9IGNsb2NrKCk7Cisg IC8qIFczMiBFbWFjcyBjcmFzaGVzIG9uIHN0YXJ0dXAgd2l0aG91dCBhIGBCVUZGRVJQJyBjaGVj ayBpbiBgdXBkYXRlX3dpbmRvdycuICovCisgIGlmICghQlVGRkVSUCAody0+Y29udGVudHMpKQor ICAgIHJldHVybjsKKyAgc3RydWN0IGJ1ZmZlciAqYiA9IFhCVUZGRVIgKHctPmNvbnRlbnRzKTsK KyAgaWYgKE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgJiYgTklMUCAoQlZBUiAoYiwg Y3Jvc3NoYWlycykpCisgICAgICAmJiBOSUxQIChCVkFSIChiLCBmY192aXNpYmxlKSkpCisgICAg cmV0dXJuOworICBzdHJ1Y3QgZ2x5cGhfcm93ICpib3R0b21fcm93ID0gTUFUUklYX0JPVFRPTV9U RVhUX1JPVyAobWF0cml4LCB3KTsKKyAgaW50IGJvdHRvbV92cG9zID0gTUFUUklYX1JPV19WUE9T IChib3R0b21fcm93LCBtYXRyaXgpOworICBpZiAodnBvcyA9PSBib3R0b21fdnBvcykKKyAgICBy ZXR1cm47CisgIGlmICghcm93LT51c2VkW1RFWFRfQVJFQV0pCisgICAgcmV0dXJuOworICBpbnQg aHBvc19zdGFydCA9IHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXTsKKyAgaWYgKHRyYWNl X3JlZGlzcGxheV9wKQorICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX2RyYXdfcm93ICglZCk6ICBk cmF3X3AgKCVzKSB8IGhwb3MgKCVkKSB8IGxlbiAoJWQpXG4iLAorICAgICAgICAgICAgICAgICAg ICAgdnBvcywgZHJhd19wID8gInkiIDogIm4iLCBocG9zX3N0YXJ0LCBocG9zX2xlbmd0aCk7Cisg IGludCBvcG9pbnRfZngsIG9wb2ludF9meSwgb3BvaW50X3dkLCBvcG9pbnRfaDsKKyAgaW50IHRl eHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgIGludCBo ZWFkZXJfbGluZV9mb3JtYXQgPSBXSU5ET1dfSEVBREVSX0xJTkVfSEVJR0hUICh3KTsKKyAgc3Ry dWN0IGdseXBoX3JvdyAqY3Vyc29yX3JvdyA9ICh3LT5jdXJzb3IudnBvcyAhPSAtMSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUFUUklYX1JPVyAoY3Vyc29yX21hdHJpeCwg dy0+Y3Vyc29yLnZwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7 CisgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0gKHctPmN1cnNvci52cG9zICE9IC0xKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbWNfZ2V0X2N1cnNvcl9nbHlwaCAodywg Y3Vyc29yX21hdHJpeCwgY3Vyc29yX3JvdywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcykK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgIGJvb2wgY3Vyc29yX2F0 X2ZyaW5nZV9wID0gKGN1cnNvcl9nbHlwaCA9PSBOVUxMCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiB3LT5jdXJzb3IuaHBvcyA9PSBjdXJzb3Jfcm93LT51c2VkW1RFWFRfQVJFQV0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3Vyc29yX3Jvdy0+ZXhhY3Rfd2luZG93X3dpZHRo X2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA9PSB0 ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29y LnggPT0gY3Vyc29yX3Jvdy0+cGl4ZWxfd2lkdGgpOworICBib29sIGN1cnNvcl9iZXlvbmRfZnJp bmdlX3AgPSAoY3Vyc29yX2dseXBoID09IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIGN1cnNvcl9yb3cgIT0gTlVMTAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgdy0+Y3Vyc29yLmhwb3MgPT0gY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhY3Vyc29yX3Jvdy0+ZXhhY3Rfd2lu ZG93X3dpZHRoX2xpbmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+ Y3Vyc29yLnggPj0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5jdXJzb3IueCA+PSBjdXJzb3Jfcm93LT5waXhlbF93aWR0aCk7CisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgUkVQTEFDRSBUSEUg UkVBTCBDVVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworICBlbnVtIGZhY2VfaWQgYmdf ZmFjZV9pZCA9IChjdXJzb3JfZ2x5cGggIT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgIC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ENVUlNPUl9JTkRJQ0FUT1IpOworICAg IH0KKyAgLyogRVhBTVBMRSAoYnVmZmVyLWxvY2FsKTogIChzZXRxIG1jLXJlYWwtZmFrZS1jdXJz b3IgbmlsLyduby8ibm8iKSAqLworICBlbHNlIGlmICghY3Vyc29yX2F0X2ZyaW5nZV9wCisgICAg ICAgICAgICYmIGN1cnNvcl9nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICYmIGN1cnNvcl90eXBl ID09IE1DX05PX0NVUlNPUgorICAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zCisg ICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgJiYg dy0+Y3Vyc29yLmhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgpCisgICAgeworICAgICAg LyogV2hlbiBhIHVzZXIgaGFzIG5vdCBzcGVjaWZpZWQgYSB2YWx1ZSBmb3IgYG1jLXJlYWwtZmFr ZS1jdXJzb3InLCBvciB0aGUKKyAgICAgIHZhbHVlIGlzIGBub2AgaW4gdGhlIGZvcm0gb2YgYSBz eW1ib2wgb3Igc3RyaW5nLCB0aGVuIHRoZSBkZWZhdWx0IHdlIHVzZQorICAgICAgYW4gTUNfQkFS IGFuZCBhbiBNQ19IQkFSIC0tIGJvdGggaGF2aW5nIGEgY3Vyc29yX3dpZHRoIG9mIDEuICovCisg ICAgICBtY19nZXRfY3Vyc29yX2dlb21ldHJ5ICh3LCBtYXRyaXgsIHJvdywgdy0+Y3Vyc29yLngs ICZvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Jm9wb2ludF9meSwgdy0+Y3Vyc29yLmhwb3MsIHctPmN1cnNvci52cG9zLCAmb3BvaW50X2gsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQ19CQVIsIDEsICZvcG9pbnRfd2QpOworICAg ICAgbWNfaGVscGVyICh3LCBtYXR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g IE1DX0hCQVIsIDEsIHJvd19wb3NpdGlvbiwgY3Vyc29yX2ZnLCBjdXJzb3JfYmcsIGVzc2VudGlh bHMuYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIE1DX0dMWVBILCBkcmF3X3AsIGZyb21fd2hl cmUsIE5JTFAgKEJWQVIgKGIsIG1jX2NvbmYpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogTUNfQ0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAg IH0KKyAgZWxzZSBpZiAoIWN1cnNvcl9hdF9mcmluZ2VfcAorICAgICAgICAgICAmJiBjdXJzb3Jf Z2x5cGggIT0gTlVMTAorICAgICAgICAgICAmJiB2cG9zID09IHctPmN1cnNvci52cG9zCisgICAg ICAgICAgICYmIHctPmN1cnNvci5ocG9zID49IGhwb3Nfc3RhcnQKKyAgICAgICAgICAgJiYgdy0+ Y3Vyc29yLmhwb3MgPCBocG9zX3N0YXJ0ICsgaHBvc19sZW5ndGgKKyAgICAgICAgICAgJiYgY3Vy c29yX2dseXBoLT50eXBlICE9IFNUUkVUQ0hfR0xZUEgpCisgICAgeworICAgICAgbWNfZ2V0X2N1 cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54LCAmb3BvaW50X2Z4LCB3 LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfZnksIHct PmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJm9wb2ludF93ZCk7Cisg ICAgICBtY19oZWxwZXIgKHcsIG1hdHJpeCwgcm93LCBjdXJzb3JfZ2x5cGgsIHctPmN1cnNvci54 LCBvcG9pbnRfZngsIHctPmN1cnNvci55LAorICAgICAgICAgICAgICAgICBvcG9pbnRfZnksIHct PmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywgb3BvaW50X3dkLCBvcG9pbnRfaCwKKyAgICAg ICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgcm93X3Bvc2l0aW9uLCBjdXJz b3JfZmcsIGN1cnNvcl9iZywKKyAgICAgICAgICAgICAgICAgZXNzZW50aWFscy5hY3RpdmVfcCwg TUNfR0xZUEgsIGRyYXdfcCwgZnJvbV93aGVyZSwKKyAgICAgICAgICAgICAgICAgTklMUCAoQlZB UiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgID8gQ0hfQ0FDSEUKKyAgICAgICAgICAg ICAgICAgOiBNQ19DQUNIRSwgQ1VSU09SX0lORElDQVRPUik7CisgICAgfQorICBlbHNlIGlmICgh Y3Vyc29yX2F0X2ZyaW5nZV9wCisgICAgICAgICAgICYmIGN1cnNvcl9nbHlwaCAhPSBOVUxMCisg ICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgJiYgdy0+Y3Vy c29yLmhwb3MgPj0gaHBvc19zdGFydAorICAgICAgICAgICAmJiB3LT5jdXJzb3IuaHBvcyA8IGhw b3Nfc3RhcnQgKyBocG9zX2xlbmd0aAorICAgICAgICAgICAmJiBjdXJzb3JfZ2x5cGgtPnR5cGUg PT0gU1RSRVRDSF9HTFlQSCkKKyAgICB7CisgICAgICAvKiBJZiBhIHVzZXIgaGFzIHNldCBgeC1z dHJldGNoLWN1cnNvcicgdG8gYSBub24tbmlsIHZhbHVlLCBoZS9zaGUgY2hvc2UgdG8KKyAgICAg IGhhdmUgYSBjdXJzb3IgdGhhdCBzcGFucyB0aGUgZW50aXJlIGxlbmd0aCBvZiB0aGUgU1RSRVRD SF9HTFlQSC4gKi8KKyAgICAgIGlmICgheF9zdHJldGNoX2N1cnNvcl9wKQorICAgICAgICB7Cisg ICAgICAgICAgLyogVGhlIE1DX0hCQVIgc2hhbGwgaGF2ZSBhIGBjdXJzb3Jfd2lkdGhgIG9mIDEu ICovCisgICAgICAgICAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHct PmN1cnNvci54LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHctPmN1cnNvci55LCAmb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBvcywKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB3LT5jdXJzb3IudnBvcywgJm9wb2ludF9oLCBNQ19IQkFSLCAx LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZvcG9pbnRfd2QpOworICAgICAg ICAgIG1jX2hlbHBlciAodywgbWF0cml4LCByb3csIGN1cnNvcl9nbHlwaCwgdy0+Y3Vyc29yLngs IG9wb2ludF9meCwKKyAgICAgICAgICAgICAgICAgICAgIHctPmN1cnNvci55LCBvcG9pbnRfZnks IHctPmN1cnNvci5ocG9zLCB3LT5jdXJzb3IudnBvcywKKyAgICAgICAgICAgICAgICAgICAgIG9w b2ludF93ZCwgb3BvaW50X2gsIE1DX0hCQVIsIDEsIHJvd19wb3NpdGlvbiwgY3Vyc29yX2ZnLAor ICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX2JnLCBlc3NlbnRpYWxzLmFjdGl2ZV9wLCBNQ19H TFlQSCwgZHJhd19wLCBmcm9tX3doZXJlLAorICAgICAgICAgICAgICAgICAgICAgTklMUCAoQlZB UiAoYiwgbWNfY29uZikpCisgICAgICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAgICAg ICAgICAgICAgICAgICA6IE1DX0NBQ0hFLCBDVVJTT1JfSU5ESUNBVE9SKTsKKyAgICAgICAgfQor ICAgICAgbWNfZ2V0X2N1cnNvcl9nZW9tZXRyeSAodywgbWF0cml4LCByb3csIHctPmN1cnNvci54 LCAmb3BvaW50X2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdy0+Y3Vyc29yLnks ICZvcG9pbnRfZnksIHctPmN1cnNvci5ocG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdy0+Y3Vyc29yLnZwb3MsICZvcG9pbnRfaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsICZvcG9pbnRfd2QpOworICAgICAgbWNfaGVs cGVyICh3LCBtYXRyaXgsIHJvdywgY3Vyc29yX2dseXBoLCB3LT5jdXJzb3IueCwgb3BvaW50X2Z4 LCB3LT5jdXJzb3IueSwKKyAgICAgICAgICAgICAgICAgb3BvaW50X2Z5LCB3LT5jdXJzb3IuaHBv cywgdy0+Y3Vyc29yLnZwb3MsIG9wb2ludF93ZCwgb3BvaW50X2gsCisgICAgICAgICAgICAgICAg IGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIHJvd19wb3NpdGlvbiwgY3Vyc29yX2ZnLCBjdXJz b3JfYmcsCisgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMuYWN0aXZlX3AsIE1DX0dMWVBILCBk cmF3X3AsIGZyb21fd2hlcmUsCisgICAgICAgICAgICAgICAgIE5JTFAgKEJWQVIgKGIsIG1jX2Nv bmYpKQorICAgICAgICAgICAgICAgICA/IENIX0NBQ0hFCisgICAgICAgICAgICAgICAgIDogTUNf Q0FDSEUsIENVUlNPUl9JTkRJQ0FUT1IpOworICAgIH0KKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KgorICAgICAgICAgICAgICAgICAgICAgICAgICBEUkFXIEFORCBSRUNPUkQgRkFLRSBDVVJTT1JT CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioq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HlwaCBleGlzdHMsIHdl IHVzZSB0aGUgZm9sbG93aW5nCisgICAgICAgICAgdGVzdDogIHRoZSBhcHBlbmRlZCBzcGFjZSBo YXMgYSBwb3NpdGlvbiB0aGF0IGlzIG9uZQorICAgICAgICAgIGxlc3MgdGhhbiB0aGUgZW5kIG9m IHRoZSBtYXRyaXggcm93LiAqLworICAgICAgICAgIGludCBocG9zID0gc3RhcnQgLSByb3ctPmds eXBoc1tURVhUX0FSRUFdOworICAgICAgICAgIHN0cnVjdCBnbHlwaCAqcHJldmlvdXNfZ2x5cGgg PSAoMCA8PSBocG9zIC0gMSAmJiBocG9zIC0gMSA8IHJvdy0+dXNlZFtURVhUX0FSRUFdKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gKyBocG9zIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IE5VTEw7CisgICAgICAgICAgLy8gc3RydWN0IGdseXBoICpsYXN0X2dseXBoID0gcm93LT5n bHlwaHNbVEVYVF9BUkVBXSArIHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMTsKKyAgICAgICAgICBi b29sIHNraXBfcCA9IChwcmV2aW91c19nbHlwaCAhPSBOVUxMCisgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gTUFUUklYX1JPV19FTkRfQ0hBUlBP UyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzdGFydC0+Ynl0ZXBvcyAh PSBlc3NlbnRpYWxzLnp2X2J5dGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQor ICAgICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScg ZW50cnkgY29udGFpbnMKKyAgICAgICAgICAgICAgICAgICAgICAgIGEgdmlzaWJsZSB0YWIgY2hh cmFjdGVyICgiwrsiKSwgdGhlIHN1YnNlcXVlbnQKKyAgICAgICAgICAgICAgICAgICAgICAgIFNU UkVUQ0hfR0xZUEggd2lsbCBoYXZlIHRoZSBzYW1lIHN0YXJ0LT5jaGFycG9zCisgICAgICAgICAg ICAgICAgICAgICAgICBhcyB0aGUgYWZvcmVtZW50aW9uZWQgdmlzaWJsZSB0YWIgY2hhcmFjdGVy LiAqLworICAgICAgICAgICAgICAgICAgICAgICAgOiAocHJldmlvdXNfZ2x5cGggIT0gTlVMTAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0g c3RhcnQtPmNoYXJwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAg ICAgICAgICAgICAgICAgICAgOiBmYWxzZTsKKyAgICAgICAgICBpbnQgcG9zaW50ID0gKHJvd19w b3NpdGlvbiA9PSBQT1NUX1pWKQorICAgICAgICAgICAgICAgICAgICAgICAgID8gLTEKKyAgICAg ICAgICAgICAgICAgICAgICAgOiAocm93X3Bvc2l0aW9uID09IEFUX1pWKQorICAgICAgICAgICAg ICAgICAgICAgICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAgICAgICAgICAgICAgICAgOiAo c3RhcnQtPmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAgICAgICAg ICAgICAgICYmIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbVEVY VF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBNQVRSSVhfUk9XX0VORF9D SEFSUE9TIChyb3cpIC0gMQorICAgICAgICAgICAgICAgICAgICAgICA6IChzdGFydC0+Ynl0ZXBv cyA9PSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgc3Rh cnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMSkK KyAgICAgICAgICAgICAgICAgICAgICAgICA/IGVzc2VudGlhbHMuenYKKyAgICAgICAgICAgICAg ICAgICAgICAgOiBzdGFydC0+Y2hhcnBvczsKKyAgICAgICAgICBMaXNwX09iamVjdCBzcGVjcyA9 IG1jX2Fzc29jIChtYWtlX2ZpeG51bSAocG9zaW50KSwgQlZBUiAoYiwgbWNfY29uZikpOworICAg ICAgICAgIGlmICgoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgdnBvcyA+IDApCisgICAgICAg ICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgJiYgIU5J TFAgKHNwZWNzKQorICAgICAgICAgICAgICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9t X3kgKHcpCisgICAgICAgICAgICAgICYmICFza2lwX3AKKyAgICAgICAgICAgICAgJiYgcm93X3Bv c2l0aW9uICE9IFBPU1RfWlYpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIExpc3BfT2Jq ZWN0IGxpc3BfdHlwZSA9IG1jX250aCAoMSwgc3BlY3MpOworICAgICAgICAgICAgICBlbnVtIG1j X2N1cnNvcl90eXBlIGN1cnNvcl90eXBlID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19saXNwX3RvX2N1cnNv cl90eXBlIChYQ0FSIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiBtY19saXNwX3RvX2N1cnNvcl90eXBlIChsaXNwX3R5cGUpOwor ICAgICAgICAgICAgICBjdXJzb3JfdHlwZSA9IChzdGFydC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1DX0hPTExPV19CT1gKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6IGN1cnNvcl90eXBlOworICAgICAgICAgICAgICBpbnQgY3Vyc29y X3dpZHRoID0gKENPTlNQIChsaXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgPyBYRklYTlVNIChYQ0FSIChYQ0RSIChsaXNwX3R5cGUpKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogLTE7CisgICAgICAgICAgICAgIExpc3BfT2JqZWN0IG1jX2Zv cmVncm91bmQgPSBtY19udGggKDIsIHNwZWNzKTsKKyAgICAgICAgICAgICAgc3RydWN0IG1jX1JH QiBsc2xfZmc7CisgICAgICAgICAgICAgIGlmIChTVFJJTkdQIChtY19mb3JlZ3JvdW5kKSkKKyAg ICAgICAgICAgICAgICBtY194d19jb2xvcl92YWx1ZXMgKHcsIG1jX2ZvcmVncm91bmQsICZsc2xf ZmcpOworICAgICAgICAgICAgICAgIGVsc2UgaWYgKFZFQ1RPUlAgKG1jX2ZvcmVncm91bmQpKQor ICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBsc2xfZmcucmVkID0gWEZM T0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDApKTsKKyAgICAgICAgICAgICAgICAgICAg bHNsX2ZnLmdyZWVuID0gWEZMT0FUX0RBVEEgKEFSRUYgKG1jX2ZvcmVncm91bmQsIDEpKTsKKyAg ICAgICAgICAgICAgICAgICAgbHNsX2ZnLmJsdWUgPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9y ZWdyb3VuZCwgMikpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxz ZSBpZiAoTklMUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAgICAgIG1jX2NvbG9y X3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMsICZsc2xfZmcsIHBvc2ludCwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfdHlwZSwgcm93X3Bvc2l0aW9uLCBN VUxUSVBMRV9DVVJTT1JTKTsKKyAgICAgICAgICAgICAgaW50IHZwb3MgPSBNQVRSSVhfUk9XX1ZQ T1MgKHJvdywgbWF0cml4KTsKKyAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB3aW5kb3dfYm94 X3dpZHRoICh3LCBURVhUX0FSRUEpOworICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJp eCwgcm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0LCByb3ctPnksCisgICAgICAgICAg ICAgICAgICAgICAgICAgc3RhcnQgLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLCB2cG9zLCBjdXJz b3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIGN1cnNvcl9t YXRyaXgsIGVzc2VudGlhbHMsIHJvd19wb3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAg ICBsc2xfZmcsIE1VTFRJUExFX0NVUlNPUlMsIGRyYXdfcCwgZnJvbV93aGVyZSwgTUNfQ0FDSEUp OworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIGZj X3Zpc2libGUpKQorICAgICAgICAgICYmIChlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAg ICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgJiYgIU5JTFAg KEJWQVIgKGIsIGZjX2luYWN0aXZlX3dpbmRvd3MpKSkpCisgICAgICAgICAgJiYgZXNzZW50aWFs cy5mY194IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+ PSB3LT5tYy5sbnVtX3BpeGVsX3dpZHRoKQorICAgICAgICB7CisgICAgICAgICAgaW50IHhfbGlt aXQgPSB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoOworICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1 cnNvcl9wID0gKHctPmN1cnNvci54ID09IGVzc2VudGlhbHMuZmNfeAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci55ID09IHJvdy0+eQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9zID09IHN0YXJ0IC0g cm93LT5nbHlwaHNbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIHctPmN1cnNvci52cG9zID09IHZwb3MpOworICAgICAgICAgIHN0cnVjdCBtY19SR0Ig bHNsX2ZnOworICAgICAgICAgIG1jX2NvbG9yX3BpY2tlciAodywgc3RhcnQsIGVzc2VudGlhbHMs ICZsc2xfZmcsIC0xLCBNQ19CQVIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9z aXRpb24sIEZJTExfQ09MVU1OKTsKKyAgICAgICAgICBpZiAoeCArIHN0YXJ0LT5waXhlbF93aWR0 aCA8PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAgICAgJiYgKChoZWFkZXJfbGluZV9mb3Jt YXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgfHwgaGVhZGVyX2xpbmVfZm9y bWF0ID09IDApCisgICAgICAgICAgICAgICYmICgoc3RhcnQgIT0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSArIHJvdy0+dXNlZFtURVhUX0FSRUFdIC0gMQorICAgICAgICAgICAgICAgICAgICYmIGVz c2VudGlhbHMuZmNfeCA+PSB4CisgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194 IDwgeCArIHN0YXJ0LT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgIHx8IChzdGFydCA9 PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0gLSAxCisgICAg ICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFscy5mY194ID49IHgpKQorICAgICAgICAgICAg ICAmJiByb3ctPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICYm ICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJpeCwg cm93LCBzdGFydCwgVEVYVF9BUkVBLCB4LCB4X2xpbWl0LCByb3ctPnksCisgICAgICAgICAgICAg ICAgICAgICAgIHN0YXJ0IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwgdnBvcywgTUNfQkFSLCAx LAorICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3JfbWF0cml4LCBlc3NlbnRpYWxzLCByb3df cG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAgICAgICAgICAgRklMTF9DT0xVTU4sIGRy YXdfcCwgZnJvbV93aGVyZSwgRkNfQ0FDSEUpOworICAgICAgICB9CisgICAgICBpZiAoIU5JTFAg KEJWQVIgKGIsIGNyb3NzaGFpcnMpKQorICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9o b3Jpem9udGFsX3J1bGVyKSkKKyAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAg ICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYm ICFOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICYmIHZw b3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgeF9saW1pdCA9 IChzdGFydCA9PSByb3ctPmdseXBoc1tURVhUX0FSRUFdICsgcm93LT51c2VkW1RFWFRfQVJFQV0g LSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgPyB0ZXh0X2F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1bGVyKSkKKyAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAg ICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICYm ICFOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkpKQorICAgICAgICAgICYmICFm aWxsX2NvbHVtbl90cnVtcHNfcCkKKyAgICAgICAgeworICAgICAgICAgIGN1cnNvcl90eXBlID0g KHN0YXJ0LT50eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAgICAgICAgICAgICAgPyBN Q19IT0xMT1dfQk9YCisgICAgICAgICAgICAgICAgICAgICAgICA6IE1DX0JBUjsKKyAgICAgICAg ICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisgICAgICAg ICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAody0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnZwb3MgPT0gdnBv cyk7CisgICAgICAgICAgc3RydWN0IG1jX1JHQiBsc2xfZmc7CisgICAgICAgICAgbWNfY29sb3Jf cGlja2VyICh3LCBzdGFydCwgZXNzZW50aWFscywgJmxzbF9mZywgLTEsIGN1cnNvcl90eXBlLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0aW9uLCBWRVJUSUNBTF9SVUxFUik7 CisgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAg ICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAm JiAoKHN0YXJ0ICE9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVzZWRbVEVYVF9BUkVB XSAtIDEKKyAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSB4CisgICAgICAgICAg ICAgICAgICAgJiYgdy0+Y3Vyc29yLnggPCB4ICsgc3RhcnQtPnBpeGVsX3dpZHRoKQorICAgICAg ICAgICAgICAgICAgfHwgKHN0YXJ0ID09IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gKyByb3ctPnVz ZWRbVEVYVF9BUkVBXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+ PSB4KSkKKyAgICAgICAgICAgICAgJiYgcm93LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3 KQorICAgICAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgbWNf ZW5naW5lICh3LCBtYXRyaXgsIHJvdywgc3RhcnQsIFRFWFRfQVJFQSwgeCwgeF9saW1pdCwgcm93 LT55LAorICAgICAgICAgICAgICAgICAgICAgICBzdGFydCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0sIHZwb3MsIGN1cnNvcl90eXBlLCAxLAorICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3Jf bWF0cml4LCBlc3NlbnRpYWxzLCByb3dfcG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAg ICAgICAgICAgVkVSVElDQUxfUlVMRVIsIGRyYXdfcCwgZnJvbV93aGVyZSwgQ0hfQ0FDSEUpOwor ICAgICAgICB9CisgICAgfQorICAgIGVsc2UKKyAgICAgIHsKKyAgICAgICAgaW50IHJlbGF0aXZl X3ggPSAwOworICAgICAgICBmb3IgKGludCBhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8 IExBU1RfQVJFQTsgKythcmVhKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHN0cnVjdCBnbHlw aCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAq Z2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgICAvKiBHbHlw aCBmb3IgYSBsaW5lIGVuZCBpbiB0ZXh0LiAqLworICAgICAgICAgICAgaWYgKGFyZWEgPT0gVEVY VF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+Y2hhcnBvcyA+IDApCisgICAg ICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgICAgZm9yICg7IGdseXBoIDwgZ2x5cGhf ZW5kOyArK2dseXBoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaWYgKHZwb3Mg IT0gdy0+Y3Vyc29yLnZwb3MKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGggIT0gZ2x5cGhf ZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRpYWxzLmZjX3ggPCByZWxhdGl2 ZV94CisgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci54IDwgcmVsYXRpdmVfeAorICAg ICAgICAgICAgICAgICAgICAmJiBOSUxQIChCVkFSIChiLCBtY19jb25mKSkpCisgICAgICAgICAg ICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBpZiAoIU5JTFAgKEJWQVIgKGIsIG1jX2Nv bmYpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAg ICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1jX2luYWN0aXZlX3dpbmRvd3MpKSkp KQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvKiBUaGUgc3BhY2Ug YXBwZW5kZWQgdG8gYSByb3cgZW5kaW5nIHdpdGggYSBuZXcgbGluZSBkb2VzCisgICAgICAgICAg ICAgICAgICAgIG5vdCBoYXZlIGEgYGdseXBoLT5jaGFycG9zYCAoLTEsIDApIHRoYXQgd2UgY2Fu IHVzZSBmb3IgdGhpcworICAgICAgICAgICAgICAgICAgICBwYXJ0aWN1bGFyIGFwcGxpY2F0aW9u LiAgV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkKKyAgICAgICAgICAgICAgICAg ICAgYXNzaWducyBhIHZpc2libGUgZ2x5cGggdG8gYSBuZXcgbGluZSwgdGhlcmUgaXMgbm8gcHJv YmxlbQorICAgICAgICAgICAgICAgICAgICBiZWNhdXNlIHRoYXQgZ2x5cGggaGFzIGEgYGdseXBo LT5jaGFycG9zJyB0aGF0IHdlIGNhbiB1c2UuCisgICAgICAgICAgICAgICAgICAgIFdoZW4gbm8g dmlzaWJsZSBFT0wgZ2x5cGggZXhpc3RzLCB3ZSB1c2UgdGhlIGZvbGxvd2luZyB0ZXN0OgorICAg ICAgICAgICAgICAgICAgICB0aGUgYXBwZW5kZWQgc3BhY2UgaGFzIGEgcG9zaXRpb24gdGhhdCBp cyBvbmUgbGVzcyB0aGFuIHRoZQorICAgICAgICAgICAgICAgICAgICBlbmQgb2YgdGhlIG1hdHJp eCByb3cuICovCisgICAgICAgICAgICAgICAgICAgIGludCBocG9zID0gZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdOworICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZ2x5cGggKnByZXZp b3VzX2dseXBoID0gKDAgPD0gaHBvcyAtIDEgJiYgaHBvcyAtIDEgPCByb3ctPnVzZWRbVEVYVF9B UkVBXSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSArIGhwb3MgLSAxCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5VTEw7CisgICAgICAgICAgICAgICAg ICAgIC8vIHN0cnVjdCBnbHlwaCAqbGFzdF9nbHlwaCA9IHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0g KyByb3ctPnVzZWRbVEVYVF9BUkVBXSAtIDE7CisgICAgICAgICAgICAgICAgICAgIGJvb2wgc2tp cF9wID0gKHByZXZpb3VzX2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgcHJldmlvdXNfZ2x5cGgtPmNoYXJwb3MgPT0gTUFUUklYX1JPV19FTkRfQ0hB UlBPUyAocm93KSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGgtPmJ5dGVwb3MgIT0gZXNzZW50aWFscy56dl9ieXRlKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgPyB0cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg LyogV2hlbiBhIGBidWZmZXItZGlzcGxheS10YWJsZScgZW50cnkgY29udGFpbnMKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBhIHZpc2libGUgdGFiIGNoYXJhY3RlciAoIsK7Iiks IHRoZSBzdWJzZXF1ZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU1RSRVRD SF9HTFlQSCB3aWxsIGhhdmUgdGhlIHNhbWUgZ2x5cGgtPmNoYXJwb3MKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBhcyB0aGUgYWZvcmVtZW50aW9uZWQgdmlzaWJsZSB0YWIgY2hh cmFjdGVyLiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKHByZXZpb3Vz X2dseXBoICE9IE5VTEwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBw cmV2aW91c19nbHlwaC0+Y2hhcnBvcyA9PSBnbHlwaC0+Y2hhcnBvcykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDogZmFsc2U7CisgICAgICAgICAgICAgICAgICAgIGludCBwb3NpbnQgPSAocm93X3Bv c2l0aW9uID09IFBPU1RfWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g LTEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKHJvd19wb3NpdGlvbiA9PSBB VF9aVikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gZXNzZW50aWFscy56 dgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGgtPmJ5dGVwb3MgIT0g ZXNzZW50aWFscy56dl9ieXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm JiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW1RFWFRfQVJFQV0g LSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IE1BVFJJWF9ST1dfRU5E X0NIQVJQT1MgKHJvdykgLSAxCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChn bHlwaC0+Ynl0ZXBvcyA9PSBlc3NlbnRpYWxzLnp2X2J5dGUKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ct PnVzZWRbVEVYVF9BUkVBXSAtIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gZXNzZW50aWFscy56dgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBnbHlw aC0+Y2hhcnBvczsKKyAgICAgICAgICAgICAgICAgICAgTGlzcF9PYmplY3Qgc3BlY3MgPSBtY19h c3NvYyAobWFrZV9maXhudW0gKHBvc2ludCksIEJWQVIgKGIsIG1jX2NvbmYpKTsKKyAgICAgICAg ICAgICAgICAgICAgaWYgKCgoaGVhZGVyX2xpbmVfZm9ybWF0ID4gMCAmJiB2cG9zID4gMCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChzcGVjcykKKyAgICAgICAgICAgICAgICAgICAg ICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAg ICAgICAgICAgICYmICFza2lwX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIHJvd19wb3Np dGlvbiAhPSBQT1NUX1pWKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgIExpc3BfT2JqZWN0IGxpc3BfdHlwZSA9IG1jX250aCAoMSwgc3BlY3MpOworICAg ICAgICAgICAgICAgICAgICAgICAgZW51bSBtY19jdXJzb3JfdHlwZSBjdXJzb3JfdHlwZSA9IChD T05TUCAobGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKFhDQVIgKGxpc3Bf dHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOiBtY19saXNwX3RvX2N1cnNvcl90eXBlIChsaXNwX3R5cGUpOworICAgICAgICAg ICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUgPSAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gTUNfSE9MTE9XX0JPWAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcl90eXBlOworICAg ICAgICAgICAgICAgICAgICAgICAgaW50IGN1cnNvcl93aWR0aCA9IChDT05TUCAobGlzcF90eXBl KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFhGSVhOVU0g KFhDQVIgKFhDRFIgKGxpc3BfdHlwZSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDogLTE7CisgICAgICAgICAgICAgICAgICAgICAgICBMaXNwX09iamVjdCBt Y19mb3JlZ3JvdW5kID0gbWNfbnRoICgyLCBzcGVjcyk7CisgICAgICAgICAgICAgICAgICAgICAg ICBzdHJ1Y3QgbWNfUkdCIGxzbF9mZzsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChTVFJJ TkdQIChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgbWNfeHdfY29s b3JfdmFsdWVzICh3LCBtY19mb3JlZ3JvdW5kLCAmbHNsX2ZnKTsKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgZWxzZSBpZiAoVkVDVE9SUCAobWNfZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLnJl ZCA9IFhGTE9BVF9EQVRBIChBUkVGIChtY19mb3JlZ3JvdW5kLCAwKSk7CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBsc2xfZmcuZ3JlZW4gPSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9y ZWdyb3VuZCwgMSkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsX2ZnLmJsdWUg PSBYRkxPQVRfREFUQSAoQVJFRiAobWNfZm9yZWdyb3VuZCwgMikpOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChOSUxQ IChtY19mb3JlZ3JvdW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2NvbG9y X3BpY2tlciAodywgZ2x5cGgsIGVzc2VudGlhbHMsICZsc2xfZmcsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2ludCwgY3Vyc29yX3R5cGUsIHJvd19w b3NpdGlvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg TVVMVElQTEVfQ1VSU09SUyk7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdnBvcyA9IE1B VFJJWF9ST1dfVlBPUyAocm93LCBtYXRyaXgpOworICAgICAgICAgICAgICAgICAgICAgICAgaW50 IHhfbGltaXQgPSB3aW5kb3dfYm94X3dpZHRoICh3LCBURVhUX0FSRUEpOworICAgICAgICAgICAg ICAgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0 aXZlX3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhfbGltaXQsIHJvdy0+ eSwgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB2cG9zLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfbWF0 cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlc3NlbnRpYWxzLCByb3df cG9zaXRpb24sIGxzbF9mZywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTVVM VElQTEVfQ1VSU09SUywgZHJhd19wLCBmcm9tX3doZXJlLCBNQ19DQUNIRSk7CisgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICgh TklMUCAoQlZBUiAoYiwgZmNfdmlzaWJsZSkpCisgICAgICAgICAgICAgICAgICAgICYmIChlc3Nl bnRpYWxzLmFjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAgICAgICB8fCAoIWVzc2VudGlhbHMu YWN0aXZlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoYiwg ZmNfaW5hY3RpdmVfd2luZG93cykpKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50aWFs cy5mY194IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAmJiBlc3NlbnRp YWxzLmZjX3ggPj0gdy0+bWMubG51bV9waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAgICAgaW50IHhfbGltaXQgPSB3aW5kb3dfYm94X3dpZHRoICh3LCBU RVhUX0FSRUEpOworICAgICAgICAgICAgICAgICAgICBib29sIHJlYWxfZmFrZV9jdXJzb3JfcCA9 ICh3LT5jdXJzb3IueCA9PSBlc3NlbnRpYWxzLmZjX3gKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+Y3Vyc29yLnkgPT0gcm93LT55CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1cnNvci5ocG9z ID09IGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsKKyAg ICAgICAgICAgICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV07CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAg ICAgICAgICAgICBtY19jb2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2Zn LCAtMSwgTUNfQkFSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd19w b3NpdGlvbiwgRklMTF9DT0xVTU4pOworICAgICAgICAgICAgICAgICAgICBpZiAoaHBvcyA+PSBo cG9zX3N0YXJ0CisgICAgICAgICAgICAgICAgICAgICAgICAmJiBocG9zIDwgaHBvc19zdGFydCAr IGhwb3NfbGVuZ3RoCisgICAgICAgICAgICAgICAgICAgICAgICAmJiByZWxhdGl2ZV94ICsgZ2x5 cGgtPnBpeGVsX3dpZHRoIDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICAgICAgICAgICAg ICAgJiYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIHZwb3MgPiAwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAg ICAgICAgICAgICAgJiYgKChnbHlwaCAhPSBnbHlwaF9lbmQgLSAxCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA+PSByZWxhdGl2ZV94CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICYmIGVzc2VudGlhbHMuZmNfeCA8IHJlbGF0aXZlX3ggKyBnbHlw aC0+cGl4ZWxfd2lkdGgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGdseXBoID09 IGdseXBoX2VuZCAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZXNzZW50 aWFscy5mY194ID49IHJlbGF0aXZlX3gpKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgcm93 LT55IDw9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAg JiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUg KHcsIG1hdHJpeCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgeF9saW1pdCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdy0+eSwgaHBvcywgdnBvcywgTUNfQkFSLCAx LCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNzZW50 aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsIEZJTExfQ09MVU1OLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZHJhd19wLCBmcm9tX3doZXJlLCBGQ19DQUNIRSk7CisgICAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBjcm9zc2hh aXJzKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2hvcml6b250 YWxfcnVsZXIpKQorICAgICAgICAgICAgICAgICAgICAmJiAoZXNzZW50aWFscy5hY3RpdmVfcAor ICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCFlc3NlbnRpYWxzLmFjdGl2ZV9wCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX2luYWN0aXZlX3dpbmRv d3MpKSkpCisgICAgICAgICAgICAgICAgICAgICYmIHZwb3MgPT0gdy0+Y3Vyc29yLnZwb3MpCisg ICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCB4X2xpbWl0ID0gd2lu ZG93X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgICAgICAgICAgICAgICAgICAgaW50IGhw b3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAgICAgICAgICAgICAgICAg IHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICAgICAgICBtY19jb2xvcl9waWNr ZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgTUNfSEJBUiwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dfcG9zaXRpb24sIEhPUklaT05UQUxfUlVM RVIpOworICAgICAgICAgICAgICAgICAgICAvKiBQcmVzZXJ2ZSBzdXBwb3J0IGZvciBkZWZhdWx0 IGJlaGF2aW9yIHN1Y2ggdGhhdCBhIHVzZXIgbWF5CisgICAgICAgICAgICAgICAgICAgIHNwZWNp ZnkgdGhlIGhlaWdodCBvZiBhbiBNQ19IQkFSLCB3aGljaCBiZWdpbnMgaXRzIGpvdXJuZXkKKyAg ICAgICAgICAgICAgICAgICAgYXMgdGhlIGBjdXJzb3Jfd2lkdGgnLiAgYG1jX2dldF9jdXJzb3Jf Z2VvbWV0cnknIHJlYWRqdXN0cy4gKi8KKyAgICAgICAgICAgICAgICAgICAgaWYgKGhwb3MgPj0g aHBvc19zdGFydAorICAgICAgICAgICAgICAgICAgICAgICAgJiYgaHBvcyA8IGhwb3Nfc3RhcnQg KyBocG9zX2xlbmd0aCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19lbmdpbmUgKHcsIG1hdHJp eCwgcm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVfeCwgeF9saW1pdCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHJvdy0+eSwgaHBvcywgdnBvcywgTUNfSEJBUiwgMSwgY3Vyc29y X21hdHJpeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzc2VudGlhbHMsIHJv d19wb3NpdGlvbiwgbHNsX2ZnLCBIT1JJWk9OVEFMX1JVTEVSLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZHJhd19wLCBmcm9tX3doZXJlLCBDSF9DQUNIRSk7CisgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJz KSkKKyAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIGNoX3ZlcnRpY2FsX3J1 bGVyKSkKKyAgICAgICAgICAgICAgICAgICAgJiYgKGVzc2VudGlhbHMuYWN0aXZlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAgIHx8ICghZXNzZW50aWFscy5hY3RpdmVfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBjaF9pbmFjdGl2ZV93aW5kb3dzKSkp KQorICAgICAgICAgICAgICAgICAgICAmJiAhZmlsbF9jb2x1bW5fdHJ1bXBzX3ApCisgICAgICAg ICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlID0gKGdseXBoLT50 eXBlID09IElNQUdFX0dMWVBIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g TUNfSE9MTE9XX0JPWAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogTUNfQkFS OworICAgICAgICAgICAgICAgICAgICBpbnQgeF9saW1pdCA9IHdpbmRvd19ib3hfd2lkdGggKHcs IFRFWFRfQVJFQSk7CisgICAgICAgICAgICAgICAgICAgIGJvb2wgcmVhbF9mYWtlX2N1cnNvcl9w ID0gKHctPmN1cnNvci55ID09IHJvdy0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IudnBvcyA9PSB2cG9zKTsKKyAgICAgICAgICAg ICAgICAgICAgaW50IGhwb3MgPSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV07CisgICAg ICAgICAgICAgICAgICAgIHN0cnVjdCBtY19SR0IgbHNsX2ZnOworICAgICAgICAgICAgICAgICAg ICBtY19jb2xvcl9waWNrZXIgKHcsIGdseXBoLCBlc3NlbnRpYWxzLCAmbHNsX2ZnLCAtMSwgY3Vy c29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm93X3Bvc2l0 aW9uLCBWRVJUSUNBTF9SVUxFUik7CisgICAgICAgICAgICAgICAgICAgIGlmIChocG9zID49IGhw b3Nfc3RhcnQKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBocG9zX3N0YXJ0ICsg aHBvc19sZW5ndGgKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICgoaGVhZGVyX2xpbmVfZm9y bWF0ID4gMCAmJiB2cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBoZWFk ZXJfbGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmICgoZ2x5cGgg IT0gZ2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5jdXJz b3IueCA+PSByZWxhdGl2ZV94CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmN1 cnNvci54IDwgcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICB8fCAoZ2x5cGggPT0gZ2x5cGhfZW5kIC0gMQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5jdXJzb3IueCA+PSByZWxhdGl2ZV94KSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICYmIHJvdy0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAg ICAgICAgICAgICAgICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisgICAgICAgICAg ICAgICAgICAgICAgbWNfZW5naW5lICh3LCBtYXRyaXgsIHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0 aXZlX3gsIHhfbGltaXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnks IGhwb3MsIHZwb3MsIGN1cnNvcl90eXBlLCAxLCBjdXJzb3JfbWF0cml4LAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZXNzZW50aWFscywgcm93X3Bvc2l0aW9uLCBsc2xfZmcsIFZF UlRJQ0FMX1JVTEVSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJhd19wLCBm cm9tX3doZXJlLCBDSF9DQUNIRSk7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICAgIH0KKyAg ICAgICAgICB9CisgICAgICB9CisgIC8vICBjbG9ja190IGNsb2NrX2VuZCA9IGNsb2NrKCk7Cisg IC8vICBkb3VibGUgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoY2xvY2tfZW5kIC0gY2xvY2tf c3RhcnQpKSAvIENMT0NLU19QRVJfU0VDOworICAvLyAgZnByaW50ZiAoc3RkZXJyLCAibWNfZHJh d19yb3cgKCVzKTogIFRJTUUgKCVmKVxuIiwgbWNfd2luZG93ICh3KSwgY3B1X3RpbWVfdXNlZCk7 Cit9CisKK2Jvb2wKK21jX3JlZHJhd19yb3cgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlw aF9tYXRyaXggKm1hdHJpeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAorICAgICAgICAgICAgICAg ZW51bSBnbHlwaF9yb3dfYXJlYSBhcmVhLCBpbnQgc3RhcnRfeCwgaW50IHN0YXJ0X2hwb3MsIGlu dCBlbmRfaHBvcywKKyAgICAgICAgICAgICAgIGJvb2wgY2xlYXJfZW9sX3AsIGVudW0gZHJhd19n bHlwaHNfZmFjZSBobCwKKyAgICAgICAgICAgICAgIGVudW0gbWNfcmVkcmF3X3Jvd190eXBlIGZy b21fd2hlcmUpCit7CisgIGJvb2wgZ29fcCA9ICgody0+bWNfbWF0cml4LmN1cnNvcnNfdXNlZFtN Q19DQUNIRV0gPiAwCisgICAgICAgICAgICAgICAgfHwgdy0+bWNfbWF0cml4LmN1cnNvcnNfdXNl ZFtDSF9DQUNIRV0gPiAwCisgICAgICAgICAgICAgICAgfHwgdy0+bWNfbWF0cml4LmN1cnNvcnNf dXNlZFtGQ19DQUNIRV0gPiAwKQorICAgICAgICAgICAgICAgJiYgYXJlYSA9PSBURVhUX0FSRUEK KyAgICAgICAgICAgICAgICYmIHJvdy0+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hlX3R5cGUgY2FjaGVfdHlwZSA9IE1DX0NBQ0hFOwor ICAgICAgIGNhY2hlX3R5cGUgPCBOT19DQUNIRTsKKyAgICAgICArK2NhY2hlX3R5cGUpCisgICAg eworICAgICAgZm9yIChpbnQgbnRoID0gMDsKKyAgICAgICAgICAgbWNfdHJhdmVyc2VfY2FjaGVf cCAody0+bWNfbWF0cml4LCBjYWNoZV90eXBlLCB2bnRoLCBudGgpOworICAgICAgICAgICArK250 aCkKKyAgICAgICAgeworICAgICAgICAgIGludCB4ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0u Y2FjaGVbY2FjaGVfdHlwZV1bbnRoXS54OworICAgICAgICAgIGludCBmeCA9IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZng7CisgICAgICAgICAgaW50IHkg PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLnk7CisgICAg ICAgICAgaW50IGZ5ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1b bnRoXS5meTsKKyAgICAgICAgICBpbnQgaHBvcyA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uaHBvczsKKyAgICAgICAgICBpbnQgdnBvcyA9IHctPm1jX21h dHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0udnBvczsKKyAgICAgICAgICBp bnQgd2QgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLndk OworICAgICAgICAgIGludCBoID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVf dHlwZV1bbnRoXS5oOworICAgICAgICAgIGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUg PSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmN1cnNvcl90 eXBlOworICAgICAgICAgIGludCBjdXJzb3Jfd2lkdGggPSB3LT5tY19tYXRyaXgudnBvc1t2bnRo XS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmN1cnNvcl93aWR0aDsKKyAgICAgICAgICBzdHJ1Y3Qg bWNfUkdCIGxzbF9mZyA9IHsucmVkID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2Fj aGVfdHlwZV1bbnRoXS5mZy5yZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg LmdyZWVuID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5m Zy5ncmVlbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYmx1ZSA9IHctPm1j X21hdHJpeC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZmcuYmx1ZX07CisgICAg ICAgICAgLy8gIHN0cnVjdCBtY19SR0IgbHNsX2JnID0gey5yZWQgPSB3LT5tY19tYXRyaXgudnBv c1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLnJlZCwKKyAgICAgICAgICAvLyAgICAg ICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ncmVlbiwKKyAgICAgICAgICAvLyAgICAgICAgICAgICAg ICAgICAgICAgICAgLmJsdWUgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90 eXBlXVtudGhdLmJnLmJsdWV9OworICAgICAgICAgIGJvb2wgYWN0aXZlX3AgPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmFjdGl2ZV9wOworICAgICAgICAg IGVudW0gbWNfZmxhdm9yIGdseXBoX2ZsYXZvciA9IHctPm1jX21hdHJpeC52cG9zW3ZudGhdLmNh Y2hlW2NhY2hlX3R5cGVdW250aF0uZ2x5cGhfZmxhdm9yOworICAgICAgICAgIGJvb2wgZW5hYmxl ZF9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFi bGVkX3A7CisgICAgICAgICAgaWYgKHZwb3MgPT0gdm50aAorICAgICAgICAgICAgICAmJiAoKGhw b3MgPj0gc3RhcnRfaHBvcworICAgICAgICAgICAgICAgICAgICYmIGhwb3MgPCBlbmRfaHBvcykK KyAgICAgICAgICAgICAgICAgIC8qIEEgZmxvYXRpbmcgY3Vyc29yIGJleW9uZCB0aGUgZW5kIG9m IHRoZSBnbHlwaCByb3cuICovCisgICAgICAgICAgICAgICAgICB8fCAoaHBvcyArIDEgPT0gc3Rh cnRfaHBvcworICAgICAgICAgICAgICAgICAgICAgICYmIGhwb3MgKyAxID09IGVuZF9ocG9zKSkK KyAgICAgICAgICAgICAgJiYgZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAg ICBib29sIHJlbW92ZV9wID0gZmFsc2U7CisgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHli cmlkICh3LCBtYXRyaXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGxzbF9mZywgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBnbHlwaF9mbGF2b3IsIHJlbW92ZV9wKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg IH0KKyAgcmV0dXJuIHRydWU7CisgIC8vICBjbG9ja19lbmQgPSBjbG9jaygpOworICAvLyAgZG91 YmxlIHRpbWV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RoXS5jdXJzb3Jfd2lkdGg7CisgICAgICAgICAgLy8gIHN0cnVjdCBtY19SR0IgbHNsX2Zn ID0gey5yZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhd LmZnLnJlZCwKKyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgLmdyZWVuID0g dy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5mZy5ncmVlbiwK KyAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgLmJsdWUgPSB3LT5tY19tYXRy aXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtudGhdLmZnLmJsdWV9OworICAgICAgICAg IHN0cnVjdCBtY19SR0IgbHNsX2JnID0gey5yZWQgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLmJnLnJlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAuZ3JlZW4gPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBl XVtudGhdLmJnLmdyZWVuLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ibHVl ID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5iZy5ibHVl fTsKKyAgICAgICAgICBib29sIGFjdGl2ZV9wID0gdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2Fj aGVbY2FjaGVfdHlwZV1bbnRoXS5hY3RpdmVfcDsKKyAgICAgICAgICBlbnVtIG1jX2ZsYXZvciBn bHlwaF9mbGF2b3IgPSB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5jYWNoZVtjYWNoZV90eXBlXVtu dGhdLmdseXBoX2ZsYXZvcjsKKyAgICAgICAgICBib29sIGVuYWJsZWRfcCA9IHctPm1jX21hdHJp eC52cG9zW3ZudGhdLmNhY2hlW2NhY2hlX3R5cGVdW250aF0uZW5hYmxlZF9wOworICAgICAgICAg IC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5jYCBjb250YWlucyB0aGUgZm9sbG93aW5nIHRl c3RzLAorICAgICAgICAgIGVhc3NlcnQgKG1hdHJpeCAmJiBtYXRyaXgtPnJvd3MpOworICAgICAg ICAgIGVhc3NlcnQgKHJvdyA+PSAwICYmIHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICAgICAg ICAgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAobWF0cml4ICYmIG1hdHJpeC0+cm93cykgPyBmYWxz ZSA6IHRydWU7CisgICAgICAgICAgaWYgKGJhcmZfY3Jhc2hfb25lKQorICAgICAgICAgICAgY29u dGludWU7CisgICAgICAgICAgYm9vbCBiYXJmX2NyYXNoX3R3byA9ICh2cG9zID49IDAgJiYgdnBv cyA8IG1hdHJpeC0+bnJvd3MpID8gZmFsc2UgOiB0cnVlOworICAgICAgICAgIGlmIChiYXJmX2Ny YXNoX3R3bykKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgIGlmICh2cG9zID09IHZu dGgKKyAgICAgICAgICAgICAgJiYgZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBICisgICAgICAgICAg ICAgICYmIGVuYWJsZWRfcCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfZXJhc2Vf Y3Vyc29yICh3LCBtYXRyaXgsIHJvdywgeCwgeSwgaHBvcywgdnBvcywgZ2x5cGhfZmxhdm9yLCBj dXJzb3JfdHlwZSwgd2QpOworICAgICAgICAgICAgICB3LT5tY19tYXRyaXgudnBvc1t2bnRoXS5j YWNoZVtjYWNoZV90eXBlXVtudGhdLmVuYWJsZWRfcCA9IGZhbHNlOworICAgICAgICAgICAgICAt LXctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAgICB9Cisg ICAgICAgICAgICBlbHNlIGlmICh2cG9zID09IHZudGgKKyAgICAgICAgICAgICAgICAgICAgICYm IGVuYWJsZWRfcCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGJvb2wgcmVtb3Zl X3AgPSB0cnVlOworICAgICAgICAgICAgICAgIG1jX2RyYXdfZXJhc2VfaHlicmlkICh3LCBtYXRy aXgsIHJvdywgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCB3ZCwgaCwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgbHNsX2Jn LCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGhf Zmxhdm9yLCByZW1vdmVfcCk7CisgICAgICAgICAgICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50 aF0uY2FjaGVbY2FjaGVfdHlwZV1bbnRoXS5lbmFibGVkX3AgPSBmYWxzZTsKKyAgICAgICAgICAg ICAgICAtLXctPm1jX21hdHJpeC5jdXJzb3JzX3VzZWRbY2FjaGVfdHlwZV07CisgICAgICAgICAg ICAgIH0KKyAgICAgICAgfQorICAgICAgdy0+bWNfbWF0cml4LnZwb3Nbdm50aF0uY2FjaGVfdXNl ZFtjYWNoZV90eXBlXSA9IDA7CisgICAgfQorfQorCisvKiBFcmFzZSBmYWtlIGN1cnNvcnMgZnJv bSAobWluLCBydW4uY3VycmVudF95LCBydW4uZGVzaXJlZF95KSB0byBlbmQgb2Ygd2luZG93Lgor ICBUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTjoKKyAgICBydW4uaGVpZ2h0 ID0gaXQubGFzdF92aXNpYmxlX3kgLSBydW4uZGVzaXJlZF95CisgICAgW2VtYWNzIC1xOiAgSG9s ZCB1cC1hcnJvdyBrZXkgdHJpZ2dlcmluZyBhdXRv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ctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAg ICAgICAgICAgICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGZjX3Zpc2libGUpKQorICAgICAgICAgICAgICAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkpKTsKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9w KQorICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX3ByZV9zY3JvbGxfY2xlYW4gKCVzKTpcblwKKyAg JXMgfCBnb19vbmVfcCAoJXMpIHwgZ29fdHdvX3AgKCVzKVxuXAorICBzdGFydF92cG9zICglZCkg fCBucm93c19zY3JvbGxlZCAoJWQpXG5cCisgICVzOiAgcnVuLmN1cnJlbnQvZGVzaXJlZF95ICgl ZC8lZCkgfCBydW4uaGVpZ2h0ICglZClcbiIsCisgICAgbWNfd2luZG93ICh3KSwgKGZyb21fd2hl cmUgPT0gVFJZX1dJTkRPV19SRVVTSU5HX0NVUlJFTlRfTUFUUklYX0RPV04pCisgICAgICAgICAg ICAgICAgICAgICA/ICJUUllfV0lORE9XX1JFVVNJTkdfQ1VSUkVOVF9NQVRSSVhfRE9XTiIKKyAg ICAgICAgICAgICAgICAgICA6IChmcm9tX3doZXJlID09IFRSWV9XSU5ET1dfUkVVU0lOR19DVVJS RU5UX01BVFJJWF9VUCkKKyAgICAgICAgICAgICAgICAgICAgID8gIlRSWV9XSU5ET1dfUkVVU0lO R19DVVJSRU5UX01BVFJJWF9VUCIKKyAgICAgICAgICAgICAgICAgICA6IChmcm9tX3doZXJlID09 IFRSWV9XSU5ET1dfSUQpCisgICAgICAgICAgICAgICAgICAgICA/ICJUUllfV0lORE9XX0lEIgor ICAgICAgICAgICAgICAgICAgIDogIlVOS05PV04iLAorICAgIGdvX29uZV9wID8gInllcyIgOiAi bm8iLCBnb190d29fcCA/ICJ5ZXMiIDogIm5vIiwKKyAgICBzdGFydF92cG9zLCBucm93c19zY3Jv bGxlZCwKKyAgICBydW4uY3VycmVudF95IDwgcnVuLmRlc2lyZWRfeSA/ICLihpMiIDogIuKGkSIs CisgICAgcnVuLmN1cnJlbnRfeSwgcnVuLmRlc2lyZWRfeSwgcnVuLmhlaWdodCk7CisgIGlmICgh Z29fb25lX3AgJiYgIWdvX3R3b19wKQorICAgIHJldHVybjsKKyAgYm9vbCB1cGRhdGluZ19mcmFt ZV9wID0gZmFsc2U7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFNRSAody0+ZnJhbWUpOworICBp ZiAoWEZSQU1FICh3LT5mcmFtZSkgIT0gZi0+bWNfdXBkYXRpbmdfZnJhbWUKKyAgICAgICYmIChn b19vbmVfcCB8fCBnb190d29fcCkpCisgICAgeworICAgICAgdXBkYXRpbmdfZnJhbWVfcCA9IHRy dWU7CisgICAgICB1cGRhdGVfYmVnaW4gKGYpOworICAgIH0KKyAgaWYgKHctPnBoeXNfY3Vyc29y X29uX3AKKyAgICAgICYmIGdvX3R3b19wKQorICAgIGVyYXNlX3BoeXNfY3Vyc29yICh3KTsKKyAg c3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4ID0gdy0+Y3VycmVudF9tYXRyaXg7CisgIGZvciAo aW50IHZudGggPSBzdGFydF92cG9zOworICAgICAgIG1hdHJpeCAhPSBOVUxMCisgICAgICAgJiYg dm50aCA8IG1hdHJpeC0+bnJvd3MKKyAgICAgICAmJiBNQVRSSVhfUk9XIChtYXRyaXgsIHZudGgp LT5lbmFibGVkX3AKKyAgICAgICAmJiBnb19vbmVfcDsKKyAgICAgICArK3ZudGgpCisgICAgewor ICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAobWF0cml4LCB2bnRoKTsK KyAgICAgIG1jX2VyYXNlX3JvdyAodywgbWF0cml4LCByb3cpOworICAgIH0KKyAgaWYgKHVwZGF0 aW5nX2ZyYW1lX3ApCisgICAgdXBkYXRlX2VuZCAoZik7CisgIC8vIG1jX3Jlc2V0X2NhY2hlICh3 KTsKK30KKworREVGVU4gKCJtYy1zdGRlcnIiLCBGbWNfc3RkZXJyLCBTbWNfc3RkZXJyLCAwLCAx LCAiUCIsCisgICAgICAgZG9jOiAvKiBUb2dnbGUgdHJhY2luZyBvZiBtdWx0aXBsZSBmYWtlIGN1 cnNvcnMuCitXaXRoIEFSRywgdHVybiB0cmFjaW5nIG9uIGlmIGFuZCBvbmx5IGlmIEFSRyBpcyBw b3NpdGl2ZS4gKi8pCisgIChMaXNwX09iamVjdCBhcmcpCit7CisgIGlmIChOSUxQIChhcmcpKQor ICAgIG1jX3N0ZGVycl9wID0gIW1jX3N0ZGVycl9wOworICBlbHNlCisgICAgeworICAgICAgYXJn ID0gRnByZWZpeF9udW1lcmljX3ZhbHVlIChhcmcpOworICAgICAgbWNfc3RkZXJyX3AgPSBYRklY TlVNIChhcmcpID4gMDsKKyAgICB9CisgIHJldHVybiBRbmlsOworfQorCisvKiBlbmQgTVVMVElQ TEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogDAogLyoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqCiAJCSAgICAgIFdpbmRvdyBkaXNwbGF5IGRpbWVuc2lvbnMKQEAgLTEzNTExLDYgKzE4 MzU1LDY5IEBAIGhzY3JvbGxfd2luZG93X3RyZWUgKExpc3BfT2JqZWN0IHdpbmRvdykKIAkgICAg ICBlbHNlCiAJCXB0ID0gY2xpcF90b19ib3VuZHMgKEJFR1YsIG1hcmtlcl9wb3NpdGlvbiAody0+ cG9pbnRtKSwgWlYpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiA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gaW5pdF90b19yb3dfc3RhcnQgKGl0PTB4N2ZmZjVm YmY5ZTMwLCB3PTB4MTFiZjcyYzk4LAorICAgIHJvdz0weDEyMTI0M2QwMCkgYXQgeGRpc3AuYzo4 NDIzCisjNyAgMHgwMDAwMDAwMTAwMDZjM2Y3IGluIGhzY3JvbGxfd2luZG93X3RyZWUgKHdpbmRv dz0uLi4pIGF0IHhkaXNwLmM6MTg1NDYKKyovCisKKyAgLyogYGluaXRfaXRlcmF0b3InOiAgZWFz c2VydCAoY2hhcnBvcyA8IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKGNo YXJwb3MgPj0gQlVGX0JFRyAoY3VycmVudF9idWZmZXIpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBjaGFycG9zIDw9IFpWKSk7ICovCisKKyAgc3RydWN0IGRpc3BsYXlf cG9zICpwb3MgPSAmY3Vyc29yX3Jvdy0+c3RhcnQ7CisgIHB0cmRpZmZfdCBjaGFycG9zID0gQ0hB UlBPUyAocG9zLT5wb3MpOworCisgIGJvb2wgYmFyZl9jcmFzaF9vbmUgPSAoY2hhcnBvcyA8IDAK KyAgICAgICAgICAgICAgICAgICAgICAgICB8fCAoY2hhcnBvcyA+PSBCVUZfQkVHIChjdXJyZW50 X2J1ZmZlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY2hhcnBvcyA8PSBaVikp CisgICAgICAgICAgICAgICAgICAgICAgICA/IGZhbHNlCisgICAgICAgICAgICAgICAgICAgICAg ICA6IHRydWU7CisgIGlmIChiYXJmX2NyYXNoX29uZSkKKyAgICByZXR1cm4gaHNjcm9sbGVkX3A7 CisKKyAgLyogYHJlc2VhdF8xJzogIENIQVJQT1MgKHBvcykgPj0gQkVHViAmJiBDSEFSUE9TIChw b3MpIDw9IFpWICovCisgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAoY2hhcnBvcyA+PSBCRUdWICYm IGNoYXJwb3MgPD0gWlYpCisgICAgICAgICAgICAgICAgICAgICAgICAgPyBmYWxzZQorICAgICAg ICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdHdvKQorICAgIHJl dHVybiBoc2Nyb2xsZWRfcDsKKworLyogZW5kIE1VTFRJUExFLUNVUlNPUlMgKi8KKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCisKIAkgICAgICAvKiBNb3ZlIGl0ZXJhdG9yIHRvIHB0IHN0YXJ0 aW5nIGF0IGN1cnNvcl9yb3ctPnN0YXJ0IGluCiAJCSBhIGxpbmUgd2l0aCBpbmZpbml0ZSB3aWR0 aC4gICovCiAJICAgICAgaW5pdF90b19yb3dfc3RhcnQgKCZpdCwgdywgY3Vyc29yX3Jvdyk7CkBA IC0xNDM5Nyw5ICsxOTMwNCwyMiBAQCByZWRpc3BsYXlfaW50ZXJuYWwgKHZvaWQpCiAJICAgICAg KnctPmRlc2lyZWRfbWF0cml4LT5tZXRob2QgPSAwOwogCSAgICAgIGRlYnVnX21ldGhvZF9hZGQg KHcsICJvcHRpbWl6YXRpb24gMSIpOwogI2VuZGlmCisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKICNpZmRlZiBIQVZFX1dJTkRPV19TWVNURU0K KyAgaWYgKEJVRkZFUlAgKHctPmNvbnRlbnRzKQorICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZG RVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgIG1jX3VwZGF0ZV93aW5kb3dfZnJp bmdlcyAodywgZmFsc2UpOworICAgIGVsc2UKIAkgICAgICB1cGRhdGVfd2luZG93X2ZyaW5nZXMg KHcsIGZhbHNlKTsKICNlbmRpZgorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAg ICAgZ290byB1cGRhdGU7CiAJICAgIH0KIAkgIGVsc2UKQEAgLTE3NzkyLDEwICsyMjcxMiwyMiBA QCByZWRpc3BsYXlfd2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlzX29u ZV9wKQogICAgIH0KIAogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQorCisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLworCisgIGJvb2wga2VlcF9jdXJy ZW50X3AgPSAoanVzdF90aGlzX29uZV9wCisgICAgICAgICAgICAgICAgICAgICAgICAgfHwgKCF1 c2VkX2N1cnJlbnRfbWF0cml4X3AgJiYgIW92ZXJsYXlfYXJyb3dfc2VlbikKKyAgICAgICAgICAg ICAgICAgICAgICAgICB8fCB3LT5wc2V1ZG9fd2luZG93X3ApOworCisgIGJvb2wgZnJpbmdlc191 cGRhdGVkX3AgPSAoQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY191cGRhdGVfd2luZG93X2ZyaW5nZXMg KHcsIGtlZXBfY3VycmVudF9wKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1cGRhdGVf d2luZG93X2ZyaW5nZXMgKHcsIGtlZXBfY3VycmVudF9wKTsKKwogICBpZiAoRlJBTUVfV0lORE9X X1AgKGYpCi0gICAgICAmJiB1cGRhdGVfd2luZG93X2ZyaW5nZXMgKHcsIChqdXN0X3RoaXNfb25l X3AKLQkJCQkgICAgfHwgKCF1c2VkX2N1cnJlbnRfbWF0cml4X3AgJiYgIW92ZXJsYXlfYXJyb3df c2VlbikKLQkJCQkgICAgfHwgdy0+cHNldWRvX3dpbmRvd19wKSkpCisgICAgICAmJiBmcmluZ2Vz X3VwZGF0ZWRfcCkKICAgICB7CiAgICAgICB1cGRhdGVfYmVnaW4gKGYpOwogICAgICAgYmxvY2tf aW5wdXQgKCk7CkBAIC0xNzgxMCw2ICsyMjc0Miw5IEBAIHJlZGlzcGxheV93aW5kb3cgKExpc3Bf T2JqZWN0IHdpbmRvdywgYm9vbCBqdXN0X3RoaXNfb25lX3ApCiAgICAgICB1cGRhdGVfZW5kIChm KTsKICAgICB9CiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgaWYgKFdJTkRPV19C T1RUT01fRElWSURFUl9XSURUSCAodykpCiAgICAgZ3VpX2RyYXdfYm90dG9tX2RpdmlkZXIgKHcp OwogI2VuZGlmIC8qIEhBVkVfV0lORE9XX1NZU1RFTSAqLwpAQCAtMTgxMjUsNiArMjMwNjAsMTYg QEAgdHJ5X3dpbmRvd19yZXVzaW5nX2N1cnJlbnRfbWF0cml4IChzdHJ1Y3Qgd2luZG93ICp3KQog CSAgICAgIHVwZGF0ZV9iZWdpbiAoZik7CiAJICAgICAgZ3VpX3VwZGF0ZV93aW5kb3dfYmVnaW4g KHcpOwogCSAgICAgIEZSQU1FX1JJRiAoZiktPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsK KworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKwor ICAgIG1jX3ByZV9zY3JvbGxfY2xlYW4gKHcsIHJ1biwgc3RhcnRfdnBvcywgbnJvd3Nfc2Nyb2xs ZWQsIFRSWV9XSU5ET1dfUkVVU0lOR19DVVJSRU5UX01BVFJJWF9ET1dOKTsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogCSAgICAgIEZSQU1FX1JJRiAoZiktPnNjcm9sbF9ydW5faG9v ayAodywgJnJ1bik7CiAJICAgICAgZ3VpX3VwZGF0ZV93aW5kb3dfZW5kICh3LCBmYWxzZSwgZmFs c2UpOwogCSAgICAgIHVwZGF0ZV9lbmQgKGYpOwpAQCAtMTgyOTEsNiArMjMyMzYsMTYgQEAgdHJ5 X3dpbmRvd19yZXVzaW5nX2N1cnJlbnRfbWF0cml4IChzdHJ1Y3Qgd2luZG93ICp3KQogCSAgdXBk YXRlX2JlZ2luIChmKTsKIAkgIGd1aV91cGRhdGVfd2luZG93X2JlZ2luICh3KTsKIAkgIEZSQU1F X1JJRiAoZiktPmNsZWFyX3dpbmRvd19tb3VzZV9mYWNlICh3KTsKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICAgIG1jX3ByZV9zY3JvbGxf Y2xlYW4gKHcsIHJ1biwgc3RhcnRfdnBvcywgbnJvd3Nfc2Nyb2xsZWQsIFRSWV9XSU5ET1dfUkVV U0lOR19DVVJSRU5UX01BVFJJWF9VUCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAkgIEZSQU1FX1JJRiAoZiktPnNjcm9sbF9ydW5faG9vayAodywgJnJ1bik7CiAJICBndWlfdXBk YXRlX3dpbmRvd19lbmQgKHcsIGZhbHNlLCBmYWxzZSk7CiAJICB1cGRhdGVfZW5kIChmKTsKQEAg LTE5MjQ1LDYgKzI0MjAwLDE2IEBAIHRyeV93aW5kb3dfaWQgKHN0cnVjdCB3aW5kb3cgKncpCiAj aWZkZWYgSEFWRV9XSU5ET1dfU1lTVEVNCiAJICBndWlfdXBkYXRlX3dpbmRvd19iZWdpbiAodyk7 CiAJICBGUkFNRV9SSUYgKGYpLT5jbGVhcl93aW5kb3dfbW91c2VfZmFjZSAodyk7CisKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICBtY19w cmVfc2Nyb2xsX2NsZWFuICh3LCBydW4sIGZpcnN0X3VuY2hhbmdlZF9hdF9lbmRfdnBvcywgZHZw b3MsIFRSWV9XSU5ET1dfSUQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICBG UkFNRV9SSUYgKGYpLT5zY3JvbGxfcnVuX2hvb2sgKHcsICZydW4pOwogCSAgZ3VpX3VwZGF0ZV93 aW5kb3dfZW5kICh3LCBmYWxzZSwgZmFsc2UpOwogI2VuZGlmCkBAIC0yMTUyOCw2ICsyNjQ5Mywx NyBAQCBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChzdHJ1Y3QgaXQgKml0KQogICAgICAgU0VU X1RFWFRfUE9TICh0ZW1faXQucG9zaXRpb24sIC0xLCAtMSk7CiAgICAgICBQUk9EVUNFX0dMWVBI UyAoJnRlbV9pdCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKKyAgICAgIC8qIFRoaXMgcGVybWl0cyB1cyB0byBpbnNwZWN0IHRoZSBIUE9T IG9mIGxpbmUgbnVtYmVyIGdseXBocyBhbmQgdGhlIHNwYWNlCisgICAgICBwYWRkaW5nIGJlZm9y ZS9hZnRlciB0aGUgbGluZSBudW1iZXJzLiAgV2Ugc2V0IGBnbHlwaC0+aHBvc2AgZWxzZXdoZXJl LiAqLworICAgICAgdGVtX2l0Lmhwb3MgKz0gMTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAgICAgLyogU3RvcCBwcm9kdWNpbmcgZ2x5cGhzLCBhbmQgcmVmcmFpbiBmcm9tIHBy b2R1Y2luZyB0aGUgbGluZQogCSBudW1iZXIsIGlmIHdlIGRvbid0IGhhdmUgZW5vdWdoIHNwYWNl IG9uIHRoaXMgbGluZS4gICovCiAgICAgICBpZiAodGVtX2l0LmN1cnJlbnRfeCA+PSB3aWR0aF9s aW1pdCkKQEAgLTIxNTM5LDYgKzI2NTE1LDI4IEBAIG1heWJlX3Byb2R1Y2VfbGluZV9udW1iZXIg KHN0cnVjdCBpdCAqaXQpCiAJfQogICAgIH0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K Ky8qIE1VTFRJUExFLUNVUlNPUlMgKi8KKworICBzdHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAo aXQtPnctPmNvbnRlbnRzKTsKKyAgc3RydWN0IGJ1ZmZlciAqb2xkX2J1ZmZlciA9IE5VTEw7Cisg IC8qIE5lZWRlZCBzbyB0aGF0IGJ1ZmZlci1sb2NhbCB2YWx1ZXMgY2FuIGJlIGRldGVybWluZWQ7 IGUuZy4sIHdoZW4gc3dpdGNoaW5nCisgIHRvIHRoZSBtaW5pYnVmZmVyLiAqLworICBpZiAoYiAh PSBjdXJyZW50X2J1ZmZlcikKKyAgICB7CisgICAgICBvbGRfYnVmZmVyID0gY3VycmVudF9idWZm ZXI7CisgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChiKTsKKyAgICB9CisgIGl0LT53LT5tYy5s bnVtX3BpeGVsX3dpZHRoID0gKCFOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gdGVtX2l0LmN1cnJlbnRfeAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogMDsKKyAgaWYgKG9sZF9idWZmZXIpCisgICAgc2V0X2J1ZmZl cl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK ICAgLyogUmVjb3JkIHRoZSB3aWR0aCBpbiBwaXhlbHMgd2UgbmVlZCBmb3IgdGhlIGxpbmUgbnVt YmVyIGRpc3BsYXkuICAqLwogICBpdC0+bG51bV9waXhlbF93aWR0aCA9IHRlbV9pdC5jdXJyZW50 X3g7CiAgIC8qIENvcHkgdGhlIHByb2R1Y2VkIGdseXBocyBpbnRvIElUJ3MgZ2x5cGhfcm93LiAg Ki8KQEAgLTI3MzYwLDYgKzMyMzU4LDE3IEBAIGFwcGVuZF9nbHlwaCAoc3RydWN0IGl0ICppdCkK IAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbYXJlYV07 CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAgZ2x5cGgtPmJ5dGVwb3Mg PSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAg ICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+ b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGlmIChpdC0+cGl4ZWxfd2lkdGggPiAwKQpAQCAt Mjc0NDIsNiArMzI0NTEsMTcgQEAgYXBwZW5kX2NvbXBvc2l0ZV9nbHlwaCAoc3RydWN0IGl0ICpp dCkKIAkgICAgZ1sxXSA9ICpnOwogCSAgZ2x5cGggPSBpdC0+Z2x5cGhfcm93LT5nbHlwaHNbaXQt PmFyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKyAgICAgIGdseXBoLT5i eXRlcG9zID0gSVRfQllURVBPUyAoKml0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisK KwogICAgICAgZ2x5cGgtPmNoYXJwb3MgPSBpdC0+Y21wX2l0LmNoYXJwb3M7CiAgICAgICBnbHlw aC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93aWR0aCA8 PSBTSFJUX01BWCk7CkBAIC0yNzY1MCw2ICszMjY3MCwxNyBAQCBwcm9kdWNlX2ltYWdlX2dseXBo IChzdHJ1Y3QgaXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9yb3ctPmds eXBoc1thcmVhICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVM VElQTEUtQ1VSU09SUyAqLworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworICAgICAg Z2x5cGgtPmJ5dGVwb3MgPSBJVF9CWVRFUE9TICgqaXQpOworCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKworCiAJICBnbHlwaC0+Y2hhcnBvcyA9IENIQVJQT1MgKGl0LT5wb3NpdGlvbik7CiAJ ICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsKIAkgIGdseXBoLT5waXhlbF93aWR0aCA9IGNs aXBfdG9fYm91bmRzICgtMSwgaXQtPnBpeGVsX3dpZHRoLCBTSFJUX01BWCk7CkBAIC0yNzc1Myw2 ICszMjc4NCwxNyBAQCBwcm9kdWNlX3h3aWRnZXRfZ2x5cGggKHN0cnVjdCBpdCAqaXQpCiAJfQog ICAgICAgaWYgKGdseXBoIDwgaXQtPmdseXBoX3Jvdy0+Z2x5cGhzW2FyZWEgKyAxXSkKIAl7CisK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAg ICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElUX0JZ VEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAkgIGdseXBoLT5j aGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKIAkgIGdseXBoLT5vYmplY3QgPSBpdC0+ b2JqZWN0OwogCSAgZ2x5cGgtPnBpeGVsX3dpZHRoID0gY2xpcF90b19ib3VuZHMgKC0xLCBpdC0+ cGl4ZWxfd2lkdGgsIFNIUlRfTUFYKTsKQEAgLTI3ODM5LDYgKzMyODgxLDE3IEBAIGFwcGVuZF9z dHJldGNoX2dseXBoIChzdHJ1Y3QgaXQgKml0LCBMaXNwX09iamVjdCBvYmplY3QsCiAJICAgIHdp ZHRoIC09IGl0LT5maXJzdF92aXNpYmxlX3ggLSBpdC0+Y3VycmVudF94OwogCSAgZWFzc2VydCAo d2lkdGggPiAwKTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBM RS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisgICAgICBnbHlw aC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAg ICAgIGdseXBoLT5vYmplY3QgPSBvYmplY3Q7CiAgICAgICAvKiBGSVhNRTogSXQgd291bGQgYmUg YmV0dGVyIHRvIHVzZSBUWVBFX01BWCBoZXJlLCBidXQKQEAgLTI4MjkzLDYgKzMzMzQ2LDE3IEBA IGFwcGVuZF9nbHlwaGxlc3NfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIGludCBmYWNlX2lkLCBib29s IGZvcl9ub19mb250LCBpbnQgbGVuLAogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5n bHlwaF9yb3ctPmdseXBoc1thcmVhXTsKIAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7 CisgICAgICBnbHlwaC0+Ynl0ZXBvcyA9IElUX0JZVEVQT1MgKCppdCk7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKICAgICAgIGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBv c2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgZWFzc2Vy dCAoaXQtPnBpeGVsX3dpZHRoIDw9IFNIUlRfTUFYKTsKQEAgLTI5MzQzLDEwICszNDQwNywyMCBA QCBndWlfaW5zZXJ0X2dseXBocyAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAq dXBkYXRlZF9yb3csCiAKICAgLyogV3JpdGUgdGhlIGdseXBocy4gICovCiAgIGhwb3MgPSBzdGFy dCAtIHJvdy0+Z2x5cGhzW3VwZGF0ZWRfYXJlYV07CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgaWYgKCFtY19yZWRyYXdfcm93ICh3LCB3 LT5jdXJyZW50X21hdHJpeCwgcm93LCB1cGRhdGVkX2FyZWEsIHctPm91dHB1dF9jdXJzb3IueCwK KyAgICAgICAgICAgICAgICAgICAgICBocG9zLCBocG9zICsgbGVuLCBmYWxzZSwgRFJBV19OT1JN QUxfVEVYVCwgR1VJX0lOU0VSVF9HTFlQSFMpKQogICBkcmF3X2dseXBocyAodywgdy0+b3V0cHV0 X2N1cnNvci54LCByb3csIHVwZGF0ZWRfYXJlYSwKIAkgICAgICAgaHBvcywgaHBvcyArIGxlbiwK IAkgICAgICAgRFJBV19OT1JNQUxfVEVYVCwgMCk7CiAKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworCisKICAgLyogQWR2YW5jZSB0aGUgb3V0cHV0IGN1cnNvci4gICovCiAgIHctPm91dHB1dF9j dXJzb3IuaHBvcyArPSBsZW47CiAgIHctPm91dHB1dF9jdXJzb3IueCArPSBzaGlmdF9ieV93aWR0 aDsKQEAgLTI5NzcyLDkgKzM0ODQ2LDE5IEBAIGd1aV9maXhfb3ZlcmxhcHBpbmdfYXJlYSAoc3Ry dWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqcm93LAogCSAgd2hpbGUgKGkgPCByb3ct PnVzZWRbYXJlYV0KIAkJICYmIHJvdy0+Z2x5cGhzW2FyZWFdW2ldLm92ZXJsYXBzX3ZlcnRpY2Fs bHlfcCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JT ICovCisKKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJv dywgYXJlYSwgc3RhcnRfeCwgc3RhcnQsIGksCisgICAgICAgICAgZmFsc2UsIERSQVdfTk9STUFM X1RFWFQsIEdVSV9GSVhfT1ZFUkxBUFBJTkdfQVJFQSkpCiAJICBkcmF3X2dseXBocyAodywgc3Rh cnRfeCwgcm93LCBhcmVhLAogCQkgICAgICAgc3RhcnQsIGksCiAJCSAgICAgICBEUkFXX05PUk1B TF9URVhULCBvdmVybGFwcyk7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAl9CiAg ICAgICBlbHNlCiAJewpAQCAtMzAwMjUsMTAgKzM1MTA5LDE3IEBAIGRpc3BsYXlfYW5kX3NldF9j dXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgIG5ld19jdXJzb3JfdHlwZSA9IGdl dF93aW5kb3dfY3Vyc29yX3R5cGUgKHcsIGdseXBoLAogCQkJCQkgICAgJm5ld19jdXJzb3Jfd2lk dGgsICZhY3RpdmVfY3Vyc29yKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFLUNVUlNPUlMgKi8KKwogICAvKiBJZiBjdXJzb3IgaXMgY3VycmVudGx5IGJlaW5nIHNo b3duIGFuZCB3ZSBkb24ndCB3YW50IGl0IHRvIGJlIG9yCiAgICAgIGl0IGlzIGluIHRoZSB3cm9u ZyBwbGFjZSwgb3IgdGhlIGN1cnNvciB0eXBlIGlzIG5vdCB3aGF0IHdlIHdhbnQsCiAgICAgIGVy YXNlIGl0LiAgKi8KICAgaWYgKHctPnBoeXNfY3Vyc29yX29uX3AKKyAgICAgICYmIE5JTFAgKEJW QVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpCisgICAgICAmJiBOSUxQIChC VkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGZjX3Zpc2libGUpKQorICAgICAgJiYgTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtY19jb25mKSkKICAgICAgICYmICghb24KIAkg IHx8IHctPnBoeXNfY3Vyc29yLnggIT0geAogCSAgfHwgdy0+cGh5c19jdXJzb3IueSAhPSB5CkBA IC0zMDA0MSw2ICszNTEzMiw5IEBAIGRpc3BsYXlfYW5kX3NldF9jdXJzb3IgKHN0cnVjdCB3aW5k b3cgKncsIGJvb2wgb24sCiAJICAgICAgJiYgbmV3X2N1cnNvcl93aWR0aCAhPSB3LT5waHlzX2N1 cnNvcl93aWR0aCkpKQogICAgIGVyYXNlX3BoeXNfY3Vyc29yICh3KTsKIAorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICAvKiBEb24ndCBjaGVjayBwaHlzX2N1cnNvcl9vbl9wIGhlcmUg YmVjYXVzZSB0aGF0IGZsYWcgaXMgb25seSBzZXQKICAgICAgdG8gZmFsc2UgaW4gc29tZSBjYXNl cyB3aGVyZSB3ZSBrbm93IHRoYXQgdGhlIGN1cnNvciBoYXMgYmVlbgogICAgICBjb21wbGV0ZWx5 IGVyYXNlZCwgdG8gYXZvaWQgdGhlIGV4dHJhIHdvcmsgb2YgZXJhc2luZyB0aGUgY3Vyc29yCkBA IC0zMDA1OSw5ICszNTE1MywyMCBAQCBkaXNwbGF5X2FuZF9zZXRfY3Vyc29yIChzdHJ1Y3Qgd2lu ZG93ICp3LCBib29sIG9uLAogICAgICAgdy0+cGh5c19jdXJzb3IudnBvcyA9IHZwb3M7CiAgICAg fQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAqLwor CisgIGlmIChOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnMpKQor ICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBmY192aXNpYmxlKSkK KyAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfY29uZikpKQog ICBGUkFNRV9SSUYgKGYpLT5kcmF3X3dpbmRvd19jdXJzb3IgKHcsIGdseXBoX3JvdywgeCwgeSwK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY3Vyc29yX3R5cGUsIG5l d19jdXJzb3Jfd2lkdGgsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb24s IGFjdGl2ZV9jdXJzb3IpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIApA QCAtMzAxNTQsNyArMzUyNTksMTggQEAgZHJhd19yb3dfd2l0aF9tb3VzZV9mYWNlIChzdHJ1Y3Qg d2luZG93ICp3LCBpbnQgc3RhcnRfeCwgc3RydWN0IGdseXBoX3JvdyAqcm93LAogI2lmZGVmIEhB VkVfV0lORE9XX1NZU1RFTQogICBpZiAoRlJBTUVfV0lORE9XX1AgKFhGUkFNRSAody0+ZnJhbWUp KSkKICAgICB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1DVVJT T1JTICovCisKKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgs IHJvdywgVEVYVF9BUkVBLCBzdGFydF94LAorICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFy dF9ocG9zLCBlbmRfaHBvcywgZmFsc2UsIGRyYXcsIERSQVdfUk9XX1dJVEhfTU9VU0VfRkFDRSkp CiAgICAgICBkcmF3X2dseXBocyAodywgc3RhcnRfeCwgcm93LCBURVhUX0FSRUEsIHN0YXJ0X2hw b3MsIGVuZF9ocG9zLCBkcmF3LCAwKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAgICAgcmV0dXJuOwogICAgIH0KICNlbmRpZgpAQCAtMzIyMTQsMTEgKzM3MzMwLDIzIEBAIGV4 cG9zZV9hcmVhIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGNvbnN0 IEVtYWNzX1JlY3RhbmdsZSAqciwKICAgc3RydWN0IGdseXBoICpsYXN0OwogICBpbnQgZmlyc3Rf eCwgc3RhcnRfeCwgeDsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExF LUNVUlNPUlMgKi8KKwogICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgcm93LT5maWxsX2xpbmVf cCkKKyAgICB7CisgICAgICBpZiAoIW1jX3JlZHJhd19yb3cgKHcsIHctPmN1cnJlbnRfbWF0cml4 LCByb3csIGFyZWEsIDAsIDAsIHJvdy0+dXNlZFthcmVhXSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEVYUE9TRV9BUkVBX09ORSkpCiAgICAgLyog SWYgcm93IGV4dGVuZHMgZmFjZSB0byBlbmQgb2YgbGluZSB3cml0ZSB0aGUgd2hvbGUgbGluZS4g ICovCiAgICAgZHJhd19nbHlwaHMgKHcsIDAsIHJvdywgYXJlYSwKIAkJIDAsIHJvdy0+dXNlZFth cmVhXSwKIAkJIERSQVdfTk9STUFMX1RFWFQsIDApOworICAgIH0KKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICBlbHNlCiAgICAgewogICAgICAgLyogU2V0IFNUQVJUX1ggdG8gdGhl IHdpbmRvdy1yZWxhdGl2ZSBzdGFydCBwb3NpdGlvbiBmb3IgZHJhd2luZyBnbHlwaHMgb2YKQEAg LTMyMjUwLDExICszNzM3OCwyMyBAQCBleHBvc2VfYXJlYSAoc3RydWN0IHdpbmRvdyAqdywgc3Ry dWN0IGdseXBoX3JvdyAqcm93LCBjb25zdCBFbWFjc19SZWN0YW5nbGUgKnIsCiAJICArK2xhc3Q7 CiAJfQogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUtQ1VSU09SUyAq LworCiAgICAgICAvKiBSZXBhaW50LiAgKi8KLSAgICAgIGlmIChsYXN0ID4gZmlyc3QpCisgICAg ICAvKiBGbG9hdGluZyBmYWtlIGN1cnNvcnMgd2lsbCBleGlzdCB3aGVuIChsYXN0ID09IGZpcnN0 KS4gKi8KKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgsIHJv dywgYXJlYSwgZmlyc3RfeCAtIHN0YXJ0X3gsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGZp cnN0IC0gcm93LT5nbHlwaHNbYXJlYV0sIGxhc3QgLSByb3ctPmdseXBoc1thcmVhXSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEVYUE9TRV9BUkVB X1RXTykKKyAgICAgICAgICAmJiBsYXN0ID4gZmlyc3QpCiAJZHJhd19nbHlwaHMgKHcsIGZpcnN0 X3ggLSBzdGFydF94LCByb3csIGFyZWEsCiAJCSAgICAgZmlyc3QgLSByb3ctPmdseXBoc1thcmVh XSwgbGFzdCAtIHJvdy0+Z2x5cGhzW2FyZWFdLAogCQkgICAgIERSQVdfTk9STUFMX1RFWFQsIDAp OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgfQogfQogCkBAIC0zMjI2OCwx MCArMzc0MDgsMjIgQEAgZXhwb3NlX2xpbmUgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlw aF9yb3cgKnJvdywgY29uc3QgRW1hY3NfUmVjdGFuZ2xlICpyKQogewogICBlYXNzZXJ0IChyb3ct PmVuYWJsZWRfcCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRS1D VVJTT1JTICovCisKICAgaWYgKHJvdy0+bW9kZV9saW5lX3AgfHwgdy0+cHNldWRvX3dpbmRvd19w KQorICAgIHsKKyAgICAgIGlmICghbWNfcmVkcmF3X3JvdyAodywgdy0+Y3VycmVudF9tYXRyaXgs IHJvdywgVEVYVF9BUkVBLCAwLCAwLAorICAgICAgICAgICAgICAgICAgICAgICAgICByb3ctPnVz ZWRbVEVYVF9BUkVBXSwgZmFsc2UsIERSQVdfTk9STUFMX1RFWFQsIEVYUE9TRV9MSU5FKSkKICAg ICBkcmF3X2dseXBocyAodywgMCwgcm93LCBURVhUX0FSRUEsCiAJCSAwLCByb3ctPnVzZWRbVEVY VF9BUkVBXSwKIAkJIERSQVdfTk9STUFMX1RFWFQsIDApOworICAgIH0KKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICBlbHNlCiAgICAgewogICAgICAgaWYgKHJvdy0+dXNlZFtMRUZU X01BUkdJTl9BUkVBXSkKQEAgLTMyODE5LDYgKzM3OTcxLDIyIEBAIGd1aV9pbnRlcnNlY3RfcmVj dGFuZ2xlcyAoY29uc3QgRW1hY3NfUmVjdGFuZ2xlICpyMSwgY29uc3QgRW1hY3NfUmVjdGFuZ2xl ICpyMiwKIHZvaWQKIHN5bXNfb2ZfeGRpc3AgKHZvaWQpCiB7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZGVmc3ViciAoJlNtY19kdW1w X2dseXBoX3Jvdyk7CisKKyAgZGVmc3ViciAoJlNtY19kdW1wX2dseXBoX21hdHJpeCk7CisKKyAg ZGVmc3ViciAoJlNtY19jdXJyZW50X2NvbHVtbik7CisKKyAgZGVmc3ViciAoJlNtY19zdGRlcnIp OworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIFZ3aXRoX2VjaG9fYXJlYV9zYXZl X3ZlY3RvciA9IFFuaWw7CiAgIHN0YXRpY3BybyAoJlZ3aXRoX2VjaG9fYXJlYV9zYXZlX3ZlY3Rv cik7CiAKZGlmZiAtLWdpdCBhL3NyYy94dGVybS5jIGIvc3JjL3h0ZXJtLmMKaW5kZXggYzk2YWE3 NC4uN2Y4ZjFhMCAxMDA2NDQKLS0tIGEvc3JjL3h0ZXJtLmMKKysrIGIvc3JjL3h0ZXJtLmMKQEAg LTEzMiw2ICsxMzIsOTA0IEBAIGFsb25nIHdpdGggR05VIEVtYWNzLiAgSWYgbm90LCBzZWUgPGh0 dHBzOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4gICovCiAjaW5jbHVkZSA8WDExL1hLQmxpYi5o PgogI2VuZGlmCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBiZWdpbiBNVUxUSVBM RS1DVVJTT1JTICovCisKKyNpZmRlZiBHTFlQSF9ERUJVRworc3RhdGljIHZvaWQgeF9jaGVja19m b250IChzdHJ1Y3QgZnJhbWUgKiwgc3RydWN0IGZvbnQgKik7CisjZW5kaWYKKworc3RhdGljIHZv aWQgeF9zZXRfbW9kZV9saW5lX2ZhY2VfZ2MgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKik7CisKK3N0 YXRpYyB2b2lkIHhfc2V0X21vdXNlX2ZhY2VfZ2MgKHN0cnVjdCBnbH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1jX3hfc2V0X2N1cnNvcl9nYyAocywgY3Vyc29yX2djX3ApOworICAgICAg cy0+c3RpcHBsZWRfcCA9IGZhbHNlOworICAgIH0KKyAgZWxzZSBpZiAocy0+aGwgPT0gRFJBV19N T1VTRV9GQUNFKQorICAgIHsKKyAgICAgIHhfc2V0X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAg cy0+c3RpcHBsZWRfcCA9IHMtPmZhY2UtPnN0aXBwbGUgIT0gMDsKKyAgICB9CisgIGVsc2UgaWYg KHMtPmhsID09IERSQVdfSU1BR0VfUkFJU0VECisgICAgICAgICAgIHx8IHMtPmhsID09IERSQVdf SU1BR0VfU1VOS0VOKQorICAgIHsKKyAgICAgIHMtPmdjID0gcy0+ZmFjZS0+Z2M7CisgICAgICBz LT5zdGlwcGxlZF9wID0gcy0+ZmFjZS0+c3RpcHBsZSAhPSAwOworICAgIH0KKyAgZWxzZQorICAg IGVtYWNzX2Fib3J0ICgpOworICAvKiBHQyBtdXN0IGhhdmUgYmVlbiBzZXQuICovCisgIGVhc3Nl cnQgKHMtPmdjICE9IDApOworfQorCisvKiBEcmF3IGEgaG9sbG93IGJveCBjdXJzb3Igb24gd2lu ZG93IFcgaW4gZ2x5cGggcm93IFJPVy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfaG9sbG93 X2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4LCBz dHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHgsIGlu dCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGludCBoKQor eworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICBzdHJ1 Y3QgeF9kaXNwbGF5X2luZm8gKmRweWluZm8gPSBGUkFNRV9ESVNQTEFZX0lORk8gKGYpOworICB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2V0IGNsaXBwaW5nIGFnYWluLiAqLworICB4X2NsaXBfdG9fcm93ICh3LCBy b3csIFRFWFRfQVJFQSwgZ2MpOworICAvKiBgeF9kcmF3X3JlY3RhbmdsZScgbmVlZHMgYSBXRCBh bmQgSCB0aGF0IGFyZSAxIHBpeGVsIGxlc3MuICovCisgIGludCByeCA9IGZ4OworICBpbnQgcnkg PSBmeTsKKyAgaW50IHJ3ID0gd2QgLSAxOworICBpbnQgcmggPSBoIC0gMTsKKyAgeF9kcmF3X3Jl Y3RhbmdsZSAoZiwgZ2MsIHJ4LCByeSwgcncsIHJoKTsKKy8qCisgIGZwcmludGYgKHN0ZGVyciwg Im1jX3hfZHJhd19ob2xsb3dfY3Vyc29yOiAgcnggKCVkKSB8IHJ5ICglZCkgfCBydyAoJWQpIHwg cmggKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgcngsIHJ5LCBydywgcmgpOworKi8KKyAg eF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKGYsIGdjKTsKK30KKworLyogRHJhdyBhIGJhciBjdXJz b3Igb24gd2luZG93IFcgaW4gZ2x5cGggcm93IFJPVy4gKi8KK3N0YXRpYyB2b2lkCittY194X2Ry YXdfYmFyX2N1cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0 cml4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCisgICAgICAgICAgICAgICAgICAgICAgaW50IHgs IGludCBmeCwgaW50IHksIGludCBmeSwgaW50IGhwb3MsIGludCB2cG9zLCBpbnQgd2QsIGludCBo LAorICAgICAgICAgICAgICAgICAgICAgIGludCB3aWR0aCwgZW51bSBtY19jdXJzb3JfdHlwZSBr aW5kLCBib29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wKQoreworICBzdHJ1Y3QgZnJhbWUg KmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAgLyogSWYgY3Vyc29yIGlzIG91dCBvZiBib3VuZHMs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nQgeSwgaW50IGZ5LCBpbnQgaHBvcywgaW50IHZwb3MsIGlu dCB3ZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgaCwgc3RydWN0IG1jX1JHQiBsc2ws IGVudW0gbWNfY3Vyc29yX3R5cGUgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAgICAgICAg ICAgaW50IGN1cnNvcl93aWR0aCwgZW51bSBtY19mbGF2b3IgZ2x5cGhfZmxhdm9yLCBib29sIG9u X3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBhY3RpdmVfcCkKK3sKKyAgc3RydWN0 IGZyYW1lICpmID0gWEZSQU1FIChXSU5ET1dfRlJBTUUgKHcpKTsKKyAgLyogVGhlIGZyaW5nZSBi aXRtYXBzIGFyZSBwcmVzZW50bHkgaGFuZGxlZCBlbHNld2hlcmUsIGJ1dCBjb3VsZCBzb21lZGF5 CisgIGJlIG1hbmFnZWQgKGluIHBhcnQpIGF0IHRoaXMgc2VjdGlvbiBvZiBjb2RlLiAqLworICBp ZiAob25fcCkKKyAgICB7CisgICAgICBpZiAocm93LT5leGFjdF93aW5kb3dfd2lkdGhfbGluZV9w CisgICAgICAgICAgJiYgKHJvdy0+cmV2ZXJzZWRfcAorICAgICAgICAgICAgICA/IChocG9zIDwg MCkKKyAgICAgICAgICAgICAgOiAoaHBvcyA+PSByb3ctPnVzZWRbVEVYVF9BUkVBXSkpKQorICAg ICAgICB7CisgICAgICAgICAgcm93LT5jdXJzb3JfaW5fZnJpbmdlX3AgPSB0cnVlOworICAgICAg ICAgIG1jX2RyYXdfZnJpbmdlX2JpdG1hcCAodywgcm93LCByb3ctPnJldmVyc2VkX3AsIGN1cnNv cl90eXBlKTsKKyAgICAgICAgfQorICAgICAgZWxzZQorICAgICAgICB7CisgIENvbG9ybWFwIGNt YXAgPSBGUkFNRV9YX0NPTE9STUFQIChmKTsKKyAgdW5zaWduZWQgbG9uZyBvcmlnaW5hbF9jdXJz b3JfcGl4ZWwgP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AgIHN0cnVjdCBnbHlwaCAqY3Vyc29yX2dseXBoID0gbWNf Z2V0X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIGhwb3MsIHZwb3MpOworICAgICAgaWYg KGN1cnNvcl9nbHlwaCA9PSBOVUxMKQorICAgICAgICByZXR1cm47CisgICAgICBzdHJ1Y3QgYnVm ZmVyICpiID0gWEJVRkZFUiAody0+Y29udGVudHMpOworICAgICAgYm9vbCByZWdpb25fYWN0aXZl X3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1hcmtfYWN0aXZlKSkpOworICAgICAgcHRyZGlm Zl90IHJlZ2lvbl9iZWcgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IG1jX3JlZ2lvbl9saW1pdCAoMSkg OiAtMTsKKyAgICAgIHB0cmRpZmZfdCByZWdpb25fZW5kID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBt Y19yZWdpb25fbGltaXQgKDApIDogLTE7CisgICAgICBpZiAoY3Vyc29yX2dseXBoLT50eXBlICE9 IElNQUdFX0dMWVBIICYmIGxzbC5yZWQgPj0gMCAmJiBsc2wuZ3JlZW4gPj0gMCAmJiBsc2wuYmx1 ZSA+PSAwKQorICAgICAgICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICBmdW5j dGlvbmFsaXR5IG9mIGB4X21ha2VfZ2MnIGluIHhmbnMuYy4gKi8KKyAgICAgICAgICBpZiAocmVn aW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICYmIGFjdGl2ZV9wCisgICAgICAgICAgICAgICYm IGN1cnNvcl9nbHlwaC0+Y2hhcnBvcyA9PSByZWdpb25fYmVnKQorICAgICAgICAgICAgeworICAg ICAg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gICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9Y X0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVf cmVnaW9uX2JldHdlZW5fZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgIGVsc2UgaWYgKGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYt ZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19h Y3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAg ICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYt Pm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5k KTsKKyAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAo ZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNr Z3JvdW5kKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIGVsc2UgaWYg KCFhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAg IGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxvb2t1cF9uYW1lZF9mYWNl ICh3LCBmLCBpbn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YuZm9yZWdyb3VuZCk7Cisg ICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9nYywgeGdjdi5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICB1bmJsb2NrX2lu cHV0ICgpOworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3Jf cGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBtY194X2RyYXdfaG9sbG93X2N1cnNvciAo dywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgpOworICAgICAg ICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhl bDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChjdXJzb3JfZ2x5cGgtPnR5cGUgPT0gSU1B R0VfR0xZUEggJiYgbHNsLnJlZCA+PSAwICYmIGxzbC5ncmVlbiA+PSAwICYmIGxzbC5ibHVlID49 IDApCisgICAgICAgICAgeworICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5v dXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwnLiAqLworICAgICAgICAgICAgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX3BpeGVsID0gY29sb3IucGl4ZWw7CisgICAgICAgICAgICBtY194X2RyYXdf aG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsIGgpOworICAgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3Jp Z2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2Rh dGEueC0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgICAgIGZ1bmN0aW9u YWxpdHkgb2YgYHhfbWFrZV9nYycgaW4geGZucy5jLiAqLworICAgICAgICAgICAgICBpZiAocmVn aW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiBhY3RpdmVfcAorICAgICAgICAgICAg ICAgICAgJiYgY3Vyc29yX2dseXBoLT5jaGFycG9zID09IHJlZ2lvbl9iZWcpCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVn aW9uX2JlZ19mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1hdC1yZWdpb24tcHJlLXp2LWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAg ICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fYmVnX2ZhY2UgPSBGQUNF X0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX2JlZ19mYWNlX2lkKTsKKyAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFt ZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLXByZS16di1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFj ZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAg ICAgICAgIFhTZXRGb3J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mFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vl bl9mYWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2Fj dGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1m YWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgICBz dHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3df YWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChG UkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19h Y3RpdmVfZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tn cm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywg aG9sbG93X2FjdGl2ZV9yZWdpb25fYmV0d2Vlbl9mYWNlLT5mb3JlZ3JvdW5kKTsKKyAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChhY3RpdmVfcCkKKyAg ICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGZhY2Vf aWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVy biAoIistcmVhbC1mYWtlLWN1cnNvci1wcmUtenYtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01f SUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBY U2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vy c29yX2djLCBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAg ICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3JvdW5kKTsKKyAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2 ZV9wKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAg ICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWluYWN0aXZlLXByZS16di1mYWNl IiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93 X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lk KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElT UExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2luYWN0aXZlX2Zh Y2UtPmZvcmVncm91bmQpOworICAgICAgICAgICAgICAgICAgICAgICAgICBYU2V0QmFja2dyb3Vu ZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xs b3dfaW5hY3RpdmVfZmFjZS0+YmFja2dyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgIGJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAvKiBGb3JjZSBg bWNfeF9zZXRfY3Vyc29yX2djJyB0byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9n YycuICovCisgICAgICAgICAgICAgIGJvb2wgY3Vyc29yX2djX3AgPSB0cnVlOworICAgICAgICAg ICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09SLCB4 LCBocG9zLCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHNsLCBn bHlwaF9mbGF2b3IsIGN1cnNvcl90eXBlLCB3ZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICAgIFhTZXRGb3Jl Z3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2Ms IHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgIFhTZXRCYWNrZ3JvdW5kIChGUkFNRV9Y X0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MsIHhnY3YuYmFja2dyb3Vu ZCk7CisgICAgICAgICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgICAgICAgIC8qIERy YXcgdGhlIGZyYW1lIGFyb3VuZCB0aGUgYm94LiAqLworICAgICAgICAgICAgICBtY194X2RyYXdf aG9sbG93X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsIGgpOworICAgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQor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cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBGUkFNRV9CQUNLR1JPVU5E X1BJWEVMIChmKSk7CisgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAo ZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgY29sb3IucGl4ZWwpOworICAgICAgICAg IC8qIEZvcmNlIGBtY194X3NldF9jdXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEu eC0+Y3Vyc29yX2djJy4gKi8KKyAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0gdHJ1ZTsKKyAg ICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3csIERSQVdfQ1VSU09S LCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGds eXBoX2ZsYXZvciwgY3Vyc29yX3R5cGUsIHdkLCBhY3RpdmVfcCwgY3Vyc29yX2djX3ApOworICAg ICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRwdXRfZGF0 YS54LT5jdXJzb3JfZ2MsIHhnY3YuZm9yZWdyb3VuZCk7CisgICAgICAgICAgWFNldEJhY2tncm91 bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgeGdj di5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICB9Cisg ICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19wID0g ZmFsc2U7CisgICAgICAgICAgICBtY19kcmF3X2N1cnNvcl9nbHlwaCAodywgbWF0cml4LCByb3cs IERSQVdfQ1VSU09SLCB4LCBocG9zLCB2cG9zLCBsc2wsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZ2x5cGhfZmxhdm9yLCBjdXJzb3JfdHlwZSwgd2QsIGFjdGl2ZV9wLCBjdXJz b3JfZ2NfcCk7CisgICAgICAgICAgfQorICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgTUNf QkFSOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49IDAgJiYg bHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFj ayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBmLT5vdXRw dXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBib29sIGN1 cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY194X2RyYXdfYmFy X2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsIGgs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgTUNfQkFSLCBj dXJzb3JfZ2NfaW52aXNpYmxlX29rYXlfcCk7CisgICAgICAgICAgZi0+b3V0cHV0X2RhdGEueC0+ Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVsOworICAgICAgICB9CisgICAgICAg IGVsc2UKKyAgICAgICAgICB7CisgICAgICAgICAgICBib29sIGN1cnNvcl9nY19pbnZpc2libGVf b2theV9wID0gZmFsc2U7CisgICAgICAgICAgICBtY194X2RyYXdfYmFyX2N1cnNvciAodywgbWF0 cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgd2QsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaCwgY3Vyc29yX3dpZHRoLCBNQ19CQVIsIGN1cnNvcl9nY19pbnZp c2libGVfb2theV9wKTsKKyAgICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2Fz ZSBNQ19IQkFSOgorICAgIHsKKyAgICAgIGlmIChsc2wucmVkID49IDAgJiYgbHNsLmdyZWVuID49 IDAgJiYgbHNsLmJsdWUgPj0gMCkKKyAgICAgICAgeworICAgICAgICAgIC8qIFRlbXBvcmFyaWx5 IGhpamFjayBgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsJy4gKi8KKyAgICAgICAgICBm LT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBjb2xvci5waXhlbDsKKyAgICAgICAgICBi b29sIGN1cnNvcl9nY19pbnZpc2libGVfb2theV9wID0gdHJ1ZTsKKyAgICAgICAgICBtY194X2Ry YXdfYmFyX2N1cnNvciAodywgbWF0cml4LCByb3csIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywg d2QsIGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvcl93aWR0aCwgTUNf SEJBUiwgY3Vyc29yX2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQor ICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgYm9vbCBjdXJzb3JfZ2NfaW52 aXNpYmxlX29rYXlfcCA9IGZhbHNlOworICAgICAgICAgICAgbWNfeF9kcmF3X2Jhcl9jdXJzb3Ig KHcsIG1hdHJpeCwgcm93LCB4LCBmeCwgeSwgZnksIGhwb3MsIHZwb3MsIHdkLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl93aWR0aCwgTUNfSEJBUiwgY3Vyc29y X2djX2ludmlzaWJsZV9va2F5X3ApOworICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0K KyAgICBkZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KKyAgICAgICAgfQorI2lm ZGVmIEhBVkVfWF9JMThOCisgIGlmICh3ID09IFhXSU5ET1cgKGYtPnNlbGVjdGVkX3dpbmRvdykp CisgICAgaWYgKEZSQU1FX1hJQyAoZikgJiYgKEZSQU1FX1hJQ19TVFlMRSAoZikgJiBYSU1QcmVl ZGl0UG9zaXRpb24pKQorICAgICAgeGljX3NldF9wcmVlZGl0YXJlYSAodywgeCwgeSk7CisjZW5k aWYKKyAgICB9CisgIFhGbHVzaCAoRlJBTUVfWF9ESVNQTEFZIChmKSk7Cit9CisKKy8qIERyYXcg c3RyZXRjaCBnbHlwaCBzdHJpbmcgUy4gKi8KK3N0YXRpYyB2b2lkCittY194X2RyYXdfc3RyZXRj aF9nbHlwaF9zdHJpbmcgKHN0cnVjdCBnbHlwaF9zdHJpbmcgKnMpCit7CisgIGVhc3NlcnQgKHMt PmZpcnN0X2dseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpOworICBpZiAocy0+aGwgPT0gRFJB V19DVVJTT1IKKyAgICAgICYmICF4X3N0cmV0Y2hfY3Vyc29yX3ApCisgICAgeworICAgICAgLyog SWYgYHgtc3RyZXRjaC1jdXJzb3InIGlzIG5pbCwgZG9uJ3QgZHJhdyBhIGJsb2NrIGN1cnNvciBh cyB3aWRlIGFzIHRoZQorICAgICAgc3RyZXRjaCBnbHlwaC4gKi8KKyAgICAgIGludCB3aWR0aCwg YmFja2dyb3VuZF93aWR0aCA9IHMtPmJhY2tncm91bmRfd2lkdGg7CisgICAgICBpbnQgeCA9IHMt Png7CisgICAgICBpZiAoIXMtPnJvdy0+cmV2ZXJzZWRfcCkKKyAgICAgICAgeworICAgICAgICAg IGludCBsZWZ0X3ggPSB3aW5kb3dfYm94X2xlZnRfb2Zmc2V0IChzLT53LCBURVhUX0FSRUEpOwor ICAgICAgICAgIGlmICh4IDwgbGVmdF94KQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBi YWNrZ3JvdW5kX3dpZHRoIC09IGxlZnRfeCAtIHg7CisgICAgICAgICAgICAgIHggPSBsZWZ0X3g7 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIC8qIEluIFIyTCByb3dzLCBkcmF3IHRoZSBjdXJzb3Igb24gdGhlIHJpZ2h0IGVk Z2Ugb2YgdGhlCisgICAgICAgICAgICAgICBzdHJldGNoIGdseXBoLiAqLworICAgICAgICAgICAg aW50IHJpZ2h0X3ggPSB3aW5kb3dfYm94X3JpZ2h0IChzLT53LCBURVhUX0FSRUEpOworICAgICAg ICAgICAgaWYgKHggKyBiYWNrZ3JvdW5kX3dpZHRoID4gcmlnaHRfeCkKKyAgICAgICAgICAgICAg YmFja2dyb3VuZF93aWR0aCAtPSB4IC0gcmlnaHRfeDsKKyAgICAgICAgICAgIHggKz0gYmFja2dy b3VuZF93aWR0aDsKKyAgICAgICAgICB9CisgICAgICB3aWR0aCA9IG1pbiAoRlJBTUVfQ09MVU1O X1dJRFRIIChzLT5mKSwgYmFja2dyb3VuZF93aWR0aCk7CisgICAgICBpZiAocy0+cm93LT5yZXZl cnNlZF9wKQorICAgICAgICB4IC09IHdpZHRoOworICAgICAgLyogRHJhdyBjdXJzb3IuICovCisg ICAgICB4X2RyYXdfZ2x5cGhfc3RyaW5nX2JnX3JlY3QgKHMsIHgsIHMtPnksIHdpZHRoLCBzLT5o ZWlnaHQpOworICAgICAgLyogQ2xlYXIgcmVzdCB1c2luZyB0aGUgR0Mgb2YgdGhlIG9yaWdpbmFs IG5vbi1jdXJzb3IgZmFjZS4gKi8KKyAgICAgIGlmICh3aWR0aCA8IGJhY2tncm91bmRfd2lkdGgp CisgICAgICAgIHsKKyAgICAgICAgICBpbnQgeSA9IHMtPnk7CisgICAgICAgICAgaW50IHcgPSBi YWNrZ3JvdW5kX3dpZHRoIC0gd2lkdGgsIGggPSBzLT5oZWlnaHQ7CisgICAgICAgICAgWFJlY3Rh bmdsZSByOworICAgICAgICAgIEdDIGdjOworICAgICAgICAgIGlmICghcy0+cm93LT5yZXZlcnNl ZF9wKQorICAgICAgICAgICAgeCArPSB3aWR0aDsKKyAgICAgICAgICBlbHNlCisgICAgICAgICAg ICB4ID0gcy0+eDsKKyAgICAgICAgICBpZiAocy0+cm93LT5tb3VzZV9mYWNlX3AKKyAgICAgICAg ICAgICAgJiYgY3Vyc29yX2luX21vdXNlX2ZhY2VfcCAocy0+dykpCisgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgIHhfc2V0X21vdXNlX2ZhY2VfZ2MgKHMpOworICAgICAgICAgICAgICBnYyA9 IHMtPmdjOworICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGdjID0g cy0+ZmFjZS0+Z2M7CisgICAgICAgICAgZ2V0X2dseXBoX3N0cmluZ19jbGlwX3JlY3QgKHMsICZy KTsKKyAgICAgICAgICB4X3NldF9jbGlwX3JlY3RhbmdsZXMgKHMtPmYsIGdjLCAmciwgMSk7Cisg ICAgICAgICAgaWYgKHMtPmZhY2UtPnN0aXBwbGUpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIC8qIEZpbGwgYmFja2dyb3VuZCB3aXRoIGEgc3RpcHBsZSBwYXR0ZXJuLiAqLworICAgICAg ICAgICAgICBYU2V0RmlsbFN0eWxlIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBnYywgRmlsbE9w YXF1ZVN0aXBwbGVkKTsKKyAgICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAocy0+ZiwgZ2Ms IHgsIHksIHcsIGgpOworICAgICAgICAgICAgICBYU2V0RmlsbFN0eWxlIChGUkFNRV9YX0RJU1BM QVkgKHMtPmYpLCBnYywgRmlsbFNvbGlkKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNl CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIFhHQ1ZhbHVlcyB4Z2N2OworICAgICAgICAg ICAgICBYR2V0R0NWYWx1ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIGdjLCBHQ0ZvcmVncm91 bmQgfCBHQ0JhY2tncm91bmQsICZ4Z2N2KTsKKyAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQg KEZSQU1FX1hfRElTUExBWSAocy0+ZiksIGdjLCB4Z2N2LmJhY2tncm91bmQpOworICAgICAgICAg ICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBnYywgeCwgeSwgdywgaCk7CisgICAgICAgICAg ICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBnYywgeGdjdi5mb3Jl Z3JvdW5kKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICB4X3Jlc2V0X2NsaXBfcmVjdGFuZ2xl cyAocy0+ZiwgZ2MpOworICAgICAgICB9CisgICAgfQorICBlbHNlIGlmICghcy0+YmFja2dyb3Vu ZF9maWxsZWRfcCkKKyAgICB7CisgICAgICBpbnQgYmFja2dyb3VuZF93aWR0aCA9IHMtPmJhY2tn cm91bmRfd2lkdGg7CisgICAgICBpbnQgeCA9IHMtPngsIGxlZnRfeCA9IHdpbmRvd19ib3hfbGVm dF9vZmZzZXQgKHMtPncsIFRFWFRfQVJFQSk7CisgICAgICAvKiBEb24ndCBkcmF3IGludG8gbGVm dCBtYXJnaW4sIGZyaW5nZSBvciBzY3JvbGxiYXIgYXJlYQorICAgICAgICAgZXhjZXB0IGZvciBo ZWFkZXIgbGluZSBhbmQgbW9kZSBsaW5lLiAqLworICAgICAgaWYgKHggPCBsZWZ0X3ggJiYgIXMt PnJvdy0+bW9kZV9saW5lX3ApCisgICAgICAgIHsKKyAgICAgICAgICBiYWNrZ3JvdW5kX3dpZHRo IC09IGxlZnRfeCAtIHg7CisgICAgICAgICAgeCA9IGxlZnRfeDsKKyAgICAgICAgfQorICAgICAg aWYgKGJhY2tncm91bmRfd2lkdGggPiAwKQorICAgICAg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lwaF9zdHJpbmcgKm5l eHQ7CisgICAgICBmb3IgKHdpZHRoID0gMCwgbmV4dCA9IHMtPm5leHQ7CisgICAgICAgICAgIG5l eHQgJiYgd2lkdGggPCBzLT5yaWdodF9vdmVyaGFuZzsKKyAgICAgICAgICAgd2lkdGggKz0gbmV4 dC0+d2lkdGgsIG5leHQgPSBuZXh0LT5uZXh0KQorICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5 cGgtPnR5cGUgIT0gSU1BR0VfR0xZUEgpCisgICAgICAgICAgeworICAgICAgICAgICAgbWNfeF9z ZXRfZ2x5cGhfc3RyaW5nX2djIChuZXh0LCBjdXJzb3JfZ2NfcCk7CisgICAgICAgICAgICB4X3Nl dF9nbHlwaF9zdHJpbmdfY2xpcHBpbmcgKG5leHQpOworICAgICAgICAgICAgaWYgKG5leHQtPmZp cnN0X2dseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgICAgICAgICAgICAgIG1jX3hfZHJh d19zdHJldGNoX2dseXBoX3N0cmluZyAobmV4dCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAg ICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dyb3VuZCAobmV4dCwgdHJ1ZSk7CisgICAg ICAgICAgICBuZXh0LT5udW1fY2xpcHMgPSAwOworICAgICAgICAgIH0KKyAgICB9CisgIC8qIFNl dCB1cCBTLT5nYywgc2V0IGNsaXBwaW5nIGFuZCBkcmF3IFMuICovCisgIG1jX3hfc2V0X2dseXBo X3N0cmluZ19nYyAocywgY3Vyc29yX2djX3ApOworICAvKiBEcmF3IHJlbGllZiAoaWYgYW55KSBp biBhZHZhbmNlIGZvciBjaGFyL2NvbXBvc2l0aW9uIHNvIHRoYXQgdGhlCisgICAgIGdseXBoIHN0 cmluZyBjYW4gYmUgZHJhd24gb3ZlciBpdC4gKi8KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMKKyAg ICAgICYmIHMtPmZhY2UtPmJveCAhPSBGQ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gICAgICAgIHhfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZyAocyk7CisgIHN3aXRjaCAocy0+ Zmlyc3RfZ2x5cGgtPnR5cGUpCisgICAgeworICAgIGNhc2UgSU1BR0VfR0xZUEg6CisgICAgICB4 X2RyYXdfaW1hZ2VfZ2x5cGhfc3RyaW5nIChzKTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgWFdJ REdFVF9HTFlQSDoKKyAgICAgIHhfZHJhd194d2lkZ2V0X2dseXBoX3N0cmluZyAocyk7CisgICAg ICBicmVhazsKKyAgICBjYXNlIFNUUkVUQ0hfR0xZUEg6CisgICAgICBtY194X2RyYXdfc3RyZXRj aF9nbHlwaF9zdHJpbmcgKHMpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBDSEFSX0dMWVBIOgor ICAgICAgaWYgKHMtPmZvcl9vdmVybGFwcykKKyAgICAgICAgcy0+YmFja2dyb3VuZF9maWxsZWRf cCA9IHRydWU7CisgICAgICBlbHNlCisgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYmFja2dy b3VuZCAocywgZmFsc2UpOworICAgICAgeF9kcmF3X2dseXBoX3N0cmluZ19mb3JlZ3JvdW5kIChz KTsKKyAgICAgIGJyZWFrOworICAgIGNhc2UgQ09NUE9TSVRFX0dMWVBIOgorICAgICAgaWYgKHMt PmZvcl9vdmVybGFwcyB8fCAocy0+Y21wX2Zyb20gPiAwCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmJiAhIHMtPmZpcnN0X2dseXBoLT51LmNtcC5hdXRvbWF0aWMpKQorICAgICAgICBz LT5iYWNrZ3JvdW5kX2ZpbGxlZF9wID0gdHJ1ZTsKKyAgICAgIGVsc2UKKyAgICAgICAgeF9kcmF3 X2dseXBoX3N0cmluZ19iYWNrZ3JvdW5kIChzLCB0cnVlKTsKKyAgICAgIHhfZHJhd19jb21wb3Np dGVfZ2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMpOworICAgICAgYnJlYWs7CisgICAgY2FzZSBH TFlQSExFU1NfR0xZUEg6CisgICAgICBpZiAocy0+Zm9yX292ZXJsYXBzKQorICAgICAgICBzLT5i YWNrZ3JvdW5kX2ZpbGxlZF9wID0gdHJ1ZTsKKyAgICAgIGVsc2UKKyAgICAgICAgeF9kcmF3X2ds eXBoX3N0cmluZ19iYWNrZ3JvdW5kIChzLCB0cnVlKTsKKyAgICAgIHhfZHJhd19nbHlwaGxlc3Nf Z2x5cGhfc3RyaW5nX2ZvcmVncm91bmQgKHMpOworICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoK KyAgICAgIGVtYWNzX2Fib3J0ICgpOworICAgIH0KKyAgaWYgKCFzLT5mb3Jfb3ZlcmxhcHMpCisg ICAgeworICAgICAgLyogRHJhdyB1bmRlcmxpbmUuICovCisgICAgICBpZiAocy0+ZmFjZS0+dW5k ZXJsaW5lX3ApCisgICAgICAgIHsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+dW5kZXJsaW5lX3R5 cGUgPT0gRkFDRV9VTkRFUl9XQVZFKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBpZiAo cy0+ZmFjZS0+dW5kZXJsaW5lX2RlZmF1bHRlZF9wKQorICAgICAgICAgICAgICAgIHhfZHJhd191 bmRlcndhdmUgKHMpOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgeworICAg ICAgICAgICAgICAgICAgWEdDVmFsdWVzIHhnY3Y7CisgICAgICAgICAgICAgICAgICBYR2V0R0NW YWx1ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVncm91bmQsICZ4Z2N2 KTsKKyAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMt PmYpLCBzLT5nYywgcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yKTsKKyAgICAgICAgICAgICAgICAg IHhfZHJhd191bmRlcndhdmUgKHMpOworICAgICAgICAgICAgICAgICAgWFNldEZvcmVncm91bmQg KEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCB4Z2N2LmZvcmVncm91bmQpOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmIChzLT5mYWNlLT51 bmRlcmxpbmVfdHlwZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIHVuc2lnbmVkIGxvbmcgdGhpY2tuZXNzLCBwb3NpdGlvbjsKKyAgICAgICAgICAgICAg aW50IHk7CisgICAgICAgICAgICAgIGlmIChzLT5wcmV2ICYmIHMtPnByZXYtPmZhY2UtPnVuZGVy bGluZV9wCisgICAgICAgICAgICAgICAgICAmJiBzLT5wcmV2LT5mYWNlLT51bmRlcmxpbmVfdHlw ZSA9PSBGQUNFX1VOREVSX0xJTkUpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgLyogV2UgdXNlIHRoZSBzYW1lIHVuZGVybGluZSBzdHlsZSBhcyB0aGUgcHJldmlvdXMgb25l LiAqLworICAgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gcy0+cHJldi0+dW5kZXJsaW5lX3Ro aWNrbmVzczsKKyAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gcy0+cHJldi0+dW5kZXJsaW5l X3Bvc2l0aW9uOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgZWxzZQorICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC8qIEdldCB0aGUgdW5kZXJsaW5lIHRoaWNr bmVzcy4gIERlZmF1bHQgaXMgMSBwaXhlbC4gKi8KKyAgICAgICAgICAgICAgICAgIGlmIChzLT5m b250ICYmIHMtPmZvbnQtPnVuZGVybGluZV90aGlja25lc3MgPiAwKQorICAgICAgICAgICAgICAg ICAgICB0aGlja25lc3MgPSBzLT5mb250LT51bmRlcmxpbmVfdGhpY2tuZXNzOworICAgICAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICB0aGlja25lc3MgPSAxOworICAgICAg ICAgICAgICAgICAgaWYgKHhfdW5kZXJsaW5lX2F0X2Rlc2NlbnRfbGluZSkKKyAgICAgICAgICAg ICAgICAgICAgcG9zaXRpb24gPSAocy0+aGVpZ2h0IC0gdGhpY2tuZXNzKSAtIChzLT55YmFzZSAt IHMtPnkpOworICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICB7Cisg ICAgICAgICAgICAgICAgICAgICAgLyogR2V0IHRoZSB1bmRlcmxpbmUgcG9zaXRpb24uICBUaGlz IGlzIHRoZSByZWNvbW1lbmRlZAorICAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRpY2FsIG9m ZnNldCBpbiBwaXhlbHMgZnJvbSB0aGUgYmFzZWxpbmUgdG8gdGhlIHRvcCBvZgorICAgICAgICAg ICAgICAgICAgICAgICAgIHRoZSB1bmRlcmxpbmUuICBUaGlzIGlzIGEgc2lnbmVkIHZhbHVlIGFj Y29yZGluZyB0byB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgICBzcGVjcywgYW5kIGl0cyBk ZWZhdWx0IGlzCisgICAgICAgICAgICAgICAgICAgICAgICAgUk9VTkQgKChtYXhpbXVtIGRlc2Nl bnQpIC8gMiksIHdpdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICBST1VORCh4KSA9IGZsb29y ICh4ICsgMC41KSAgKi8KKyAgICAgICAgICAgICAgICAgICAgICBpZiAoeF91c2VfdW5kZXJsaW5l X3Bvc2l0aW9uX3Byb3BlcnRpZXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcy0+Zm9u dCAmJiBzLT5mb250LT51bmRlcmxpbmVfcG9zaXRpb24gPj0gMCkKKyAgICAgICAgICAgICAgICAg ICAgICAgIHBvc2l0aW9uID0gcy0+Zm9udC0+dW5kZXJsaW5lX3Bvc2l0aW9uOworICAgICAgICAg ICAgICAgICAgICAgIGVsc2UgaWYgKHMtPmZvbnQpCisgICAgICAgICAgICAgICAgICAgICAgICBw b3NpdGlvbiA9IChzLT5mb250LT5kZXNjZW50ICsgMSkgLyAyOworICAgICAgICAgICAgICAgICAg ICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gdW5kZXJsaW5lX21p bmltdW1fb2Zmc2V0OworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBw b3NpdGlvbiA9IG1heCAocG9zaXRpb24sIHVuZGVybGluZV9taW5pbXVtX29mZnNldCk7CisgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAvKiBDaGVjayB0aGUgc2FuaXR5IG9mIHRoaWNr bmVzcyBhbmQgcG9zaXRpb24uICBXZSBzaG91bGQKKyAgICAgICAgICAgICAgICAgYXZvaWQgZHJh d2luZyB1bmRlcmxpbmUgb3V0IG9mIHRoZSBjdXJyZW50IGxpbmUgYXJlYS4gKi8KKyAgICAgICAg ICAgICAgaWYgKHMtPnkgKyBzLT5oZWlnaHQgPD0gcy0+eWJhc2UgKyBwb3NpdGlvbikKKyAgICAg ICAgICAgICAgICBwb3NpdGlvbiA9IChzLT5oZWlnaHQgLSAxKSAtIChzLT55YmFzZSAtIHMtPnkp OworICAgICAgICAgICAgICBpZiAocy0+eSArIHMtPmhlaWdodCA8IHMtPnliYXNlICsgcG9zaXRp b24gKyB0aGlja25lc3MpCisgICAgICAgICAgICAgICAgdGhpY2tuZXNzID0gKHMtPnkgKyBzLT5o ZWlnaHQpIC0gKHMtPnliYXNlICsgcG9zaXRpb24pOworICAgICAgICAgICAgICBzLT51bmRlcmxp bmVfdGhpY2tuZXNzID0gdGhpY2tuZXNzOworICAgICAgICAgICAgICBzLT51bmRlcmxpbmVfcG9z aXRpb24gPSBwb3NpdGlvbjsKKyAgICAgICAgICAgICAgeSA9IHMtPnliYXNlICsgcG9zaXRpb247 CisgICAgICAgICAgICAgIGlmIChzLT5mYWNlLT51bmRlcmxpbmVfZGVmYXVsdGVkX3ApCisgICAg ICAgICAgICAgICAgeF9maWxsX3JlY3RhbmdsZSAocy0+Ziwgcy0+Z2MsIHMtPngsIHksIHMtPndp ZHRoLCB0aGlja25lc3MpOworICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgewor ICAgICAgICAgICAgICAgICAgWEdDVmFsdWVzIHhnY3Y7CisgICAgICAgICAgICAgICAgICBYR2V0 R0NWYWx1ZXMgKEZSQU1FX1hfRElTUExBWSAocy0+ZiksIHMtPmdjLCBHQ0ZvcmVncm91bmQsICZ4 Z2N2KTsKKyAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkg KHMtPmYpLCBzLT5nYywgcy0+ZmFjZS0+dW5kZXJsaW5lX2NvbG9yKTsKKyAgICAgICAgICAgICAg ICAgIHhfZmlsbF9yZWN0YW5nbGUgKHMtPmYsIHMtPmdjLCBzLT54LCB5LCBzLT53aWR0aCwgdGhp Y2tuZXNzKTsKKyAgICAgICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BM QVkgKHMtPmYpLCBzLT5nYywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIC8qIERyYXcgb3ZlcmxpbmUuICovCisgICAg ICBpZiAocy0+ZmFjZS0+b3ZlcmxpbmVfcCkKKyAgICAgICAgeworICAgICAgICAgIHVuc2lnbmVk IGxvbmcgZHkgPSAwLCBoID0gMTsKKyAgICAgICAgICBpZiAocy0+ZmFjZS0+b3ZlcmxpbmVfY29s b3JfZGVmYXVsdGVkX3ApCisgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBzLT5n Yywgcy0+eCwgcy0+eSArIGR5LCBzLT53aWR0aCwgaCk7CisgICAgICAgICAgZWxzZQorICAgICAg ICAgICA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AgICAgICAgICAgIFhTZXRG b3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBzLT5nYywgcy0+ZmFjZS0+c3RyaWtl X3Rocm91Z2hfY29sb3IpOworICAgICAgICAgICAgICB4X2ZpbGxfcmVjdGFuZ2xlIChzLT5mLCBz LT5nYywgcy0+eCwgcy0+eSArIGR5LCBzLT53aWR0aCwgaCk7CisgICAgICAgICAgICAgIFhTZXRG b3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKHMtPmYpLCBzLT5nYywgeGdjdi5mb3JlZ3JvdW5k KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgLyogRHJhdyByZWxpZWYgaWYgbm90 IHlldCBkcmF3bi4gKi8KKyAgICAgIGlmICghcmVsaWVmX2RyYXduX3AgJiYgcy0+ZmFjZS0+Ym94 ICE9IEZBQ0VfTk9fQk9YKQorICAgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfYm94IChzKTsK KyAgICAgIGlmIChzLT5wcmV2KQorICAgICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoX3N0 cmluZyAqcHJldjsKKyAgICAgICAgICBmb3IgKHByZXYgPSBzLT5wcmV2OyBwcmV2OyBwcmV2ID0g cHJldi0+cHJldikKKyAgICAgICAgICAgIGlmIChwcmV2LT5obCAhPSBzLT5obAorICAgICAgICAg ICAgICAgICYmIHByZXYtPnggKyBwcmV2LT53aWR0aCArIHByZXYtPnJpZ2h0X292ZXJoYW5nID4g cy0+eCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIC8qIEFzIHByZXYgd2FzIGRy YXduIHdoaWxlIGNsaXBwZWQgdG8gaXRzIG93biBhcmVhLCB3ZQorICAgICAgICAgICAgICAgICAg IG11c3QgZHJhdyB0aGUgcmlnaHRfb3ZlcmhhbmcgcGFydCB1c2luZyBzLT5obCBub3cuICovCisg ICAgICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIHNhdmUgPSBwcmV2LT5obDsKKyAg ICAgICAgICAgICAgICBwcmV2LT5obCA9IHMtPmhsOworICAgICAgICAgICAgICAgIG1jX3hfc2V0 X2dseXBoX3N0cmluZ19nYyAocHJldiwgY3Vyc29yX2djX3ApOworICAgICAgICAgICAgICAgIHhf c2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19leGFjdGx5IChzLCBwcmV2KTsKKyAgICAgICAgICAg ICAgICBpZiAocHJldi0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSCkKKyAgICAgICAg ICAgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAocHJldik7CisgICAgICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeF9kcmF3X2NvbXBvc2l0ZV9nbHlwaF9z dHJpbmdfZm9yZWdyb3VuZCAocHJldik7CisgICAgICAgICAgICAgICAgeF9yZXNldF9jbGlwX3Jl Y3RhbmdsZXMgKHByZXYtPmYsIHByZXYtPmdjKTsKKyAgICAgICAgICAgICAgICBwcmV2LT5obCA9 IHNhdmU7CisgICAgICAgICAgICAgICAgcHJldi0+bnVtX2NsaXBzID0gMDsKKyAgICAgICAgICAg ICAgfQorICAgICAgICB9CisgICAgICBpZiAocy0+bmV4dCkKKyAgICAgICAgeworICAgICAgICAg IHN0cnVjdCBnbHlwaF9zdHJpbmcgKm5leHQ7CisgICAgICAgICAgZm9yIChuZXh0ID0gcy0+bmV4 dDsgbmV4dDsgbmV4dCA9IG5leHQtPm5leHQpCisgICAgICAgICAgICBpZiAobmV4dC0+aGwgIT0g cy0+aGwKKyAgICAgICAgICAgICAgICAmJiBuZXh0LT54IC0gbmV4dC0+bGVmdF9vdmVyaGFuZyA8 IHMtPnggKyBzLT53aWR0aCkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIC8qIEFz IG5leHQgd2lsbCBiZSBkcmF3biB3aGlsZSBjbGlwcGVkIHRvIGl0cyBvd24gYXJlYSwKKyAgICAg ICAgICAgICAgICAgICB3ZSBtdXN0IGRyYXcgdGhlIGxlZnRfb3ZlcmhhbmcgcGFydCB1c2luZyBz LT5obCBub3cuICovCisgICAgICAgICAgICAgICAgZW51bSBkcmF3X2dseXBoc19mYWNlIHNhdmUg PSBuZXh0LT5obDsKKyAgICAgICAgICAgICAgICBuZXh0LT5obCA9IHMtPmhsOworICAgICAgICAg ICAgICAgIG1jX3hfc2V0X2dseXBoX3N0cmluZ19nYyAobmV4dCwgY3Vyc29yX2djX3ApOworICAg ICAgICAgICAgICAgIHhfc2V0X2dseXBoX3N0cmluZ19jbGlwcGluZ19leGFjdGx5IChzLCBuZXh0 KTsKKyAgICAgICAgICAgICAgICBpZiAobmV4dC0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ0hBUl9H TFlQSCkKKyAgICAgICAgICAgICAgICAgIHhfZHJhd19nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAo bmV4dCk7CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgeF9kcmF3X2Nv bXBvc2l0ZV9nbHlwaF9zdHJpbmdfZm9yZWdyb3VuZCAobmV4dCk7CisgICAgICAgICAgICAgICAg eF9yZXNldF9jbGlwX3JlY3RhbmdsZXMgKG5leHQtPmYsIG5leHQtPmdjKTsKKyAgICAgICAgICAg ICAgICBuZXh0LT5obCA9IHNhdmU7CisgICAgICAgICAgICAgICAgbmV4dC0+bnVtX2NsaXBzID0g MDsKKyAgICAgICAgICAgICAgICBuZXh0LT5jbGlwX2hlYWQgPSBzLT5uZXh0OworICAgICAgICAg ICAgICB9CisgICAgICAgIH0KKyAgICB9CisgIC8qIFJlc2V0IGNsaXBwaW5nLiAqLworICB4X3Jl c2V0X2NsaXBfcmVjdGFuZ2xlcyAocy0+Ziwgcy0+Z2MpOworICBzLT5udW1fY2xpcHMgPSAwOwor fQorCisvKiBlbmQgTVVMVElQTEUtQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogLyogRGVmYXVsdCB0byB1c2luZyBYSU0gaWYgYXZhaWxhYmxlLiAgKi8KICNpZmRlZiBV U0VfWElNCiBib29sIHVzZV94aW0gPSB0cnVlOwpAQCAtMTEwOSw2ICsyMDA3LDE2IEBAIHN0YXRp YyB2b2lkCiB4X3VwZGF0ZV9iZWdpbiAoc3RydWN0IGZyYW1lICpmKQogewogICAvKiBOb3RoaW5n IHRvIGRvLiAgKi8KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNV UlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IGY7CisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworCisKIH0KIAogLyogRHJhdyBhIHZlcnRpY2FsIHdpbmRvdyBib3JkZXIgZnJv bSAoeCx5MCkgdG8gKHgseTEpICAqLwpAQCAtMTI1NCw2ICsyMTYyLDE2IEBAIHhfdXBkYXRlX2Vu ZCAoc3RydWN0IGZyYW1lICpmKQogICBYRmx1c2ggKEZSQU1FX1hfRElTUExBWSAoZikpOwogICB1 bmJsb2NrX2lucHV0ICgpOwogI2VuZGlmCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRS1DVVJTT1JTICovCisKKyAgZi0+bWNfdXBkYXRpbmdfZnJhbWUgPSBOVUxMOwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiB9CiAKIC8qIFRoaXMgZnVuY3Rpb24gaXMg Y2FsbGVkIGZyb20gdmFyaW91cyBwbGFjZXMgaW4geGRpc3AuYwpAQCAtMTMyMzgsNiArMTQxNTYs MjAgQEAgZXh0ZXJuIGZyYW1lX3Bhcm1faGFuZGxlciB4X2ZyYW1lX3Bhcm1faGFuZGxlcnNbXTsK IAogc3RhdGljIHN0cnVjdCByZWRpc3BsYXlfaW50ZXJmYWNlIHhfcmVkaXNwbGF5X2ludGVyZmFj ZSA9CiAgIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFLUNVUlNP UlMgKi8KKworLyogYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGB4dGVybS5jYCBtdXN0IGJlIGlu IHRoZSBleGFjdCBzYW1lIG9yZGVyIGFzIHRoZQorYHJlZGlzcGxheV9pbnRlcmZhY2UnIGluIGBk aXNwZXh0ZXJuLmhgISAqLworCisgIG1jX3hfZHJhd193aW5kb3dfY3Vyc29yLAorICBtY194X2Ry YXdfZ2x5cGhfc3RyaW5nLAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgeF9m cmFtZV9wYXJtX2hhbmRsZXJzLAogICAgIGd1aV9wcm9kdWNlX2dseXBocywKICAgICBndWlfd3Jp dGVfZ2x5cGhzLAo= --Multipart_Tue_Jul_16_12:28:01_2019-1--