From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Thu, 13 Dec 2018 23:11:07 -0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Thu_Dec_13_23:11:07_2018-1" X-Trace: blaine.gmane.org 1544771415 17683 195.159.176.226 (14 Dec 2018 07:10:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2018 07:10:15 +0000 (UTC) Cc: 17684@debbugs.gnu.org, 22873@debbugs.gnu.org To: Eli Zaretskii , Marcin Borkowski , Richard Stallman , John Wiegley , Akio Burns , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 14 08:10:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXhbv-0004XQ-SF for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2018 08:10:13 +0100 Original-Received: from localhost ([::1]:59763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXhe2-00087Z-H8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2018 02:12:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXhdp-00087A-4t for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 02:12:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXhdk-0002bG-BI for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 02:12:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXhdi-0002YH-TN for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 02:12:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gXhdi-0003aa-F3 for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 02:12:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Dec 2018 07:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.154477147513735 (code B ref 17684); Fri, 14 Dec 2018 07:12:02 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 14 Dec 2018 07:11:15 +0000 Original-Received: from localhost ([127.0.0.1]:47232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXhcx-0003ZT-4N for submit@debbugs.gnu.org; Fri, 14 Dec 2018 02:11:15 -0500 Original-Received: from gateway33.websitewelcome.com ([192.185.146.68]:19865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXhcu-0003ZE-RL for 17684@debbugs.gnu.org; Fri, 14 Dec 2018 02:11:13 -0500 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway33.websitewelcome.com (Postfix) with ESMTP id C994C6480D5 for <17684@debbugs.gnu.org>; Fri, 14 Dec 2018 01:11:11 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id Xhctgpt2ZiQerXhctgwRAU; Fri, 14 Dec 2018 01:11:11 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=4Bra0SEHd6MfgDQ1TpZxBvZjwHyrVtgN5xzSzKHnY6k=; b=EOPiziVtjFaDKJfZQ9VDQAHeL6 Eql/HfkfFuYvNIZeq5sD5HSzAs0RcuuT9HSf13DBkcFcJIsynXaBZBX4wEh2N2ONGE8hqPMrXo5Wc a3ueedq5aK3as66GLuhftOug0FHVVTIJASu3kKPhgsNzCpDWgcudhkNGZSRo3uiPUHgXOeKawqwZW romUPfb9MvOIJHRD2axa/TYDcu1kzBROwsKSURtYX3w82+jBouo/unvLqx5fVtI2i7Fe1+fVn+vkq gigpe9A78y4TXF5nwQNH4v9Wl0m5+MUNbE2KN77ZyNH37dN0svCKEgD5n4Em8KK9wkoJXqAwFPBUs LoxgRL/g==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:60064 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gXhcq-002UnL-9U; Fri, 14 Dec 2018 01:11:10 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1gXhcq-002UnL-9U X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:60064 X-Source-Auth: lawlist X-Email-Count: 2 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: 208.118.235.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:153433 Archived-At: --Multipart_Thu_Dec_13_23:11:07_2018-1 Content-Type: text/plain; charset=US-ASCII Version 017.000 [12/13/2018] CHANGELOG: - nsterm.m: Cursors are now drawn subsequent to the expose_frame/window loop of dirty rectangles within drawRect. `update_window_cursor' within `expose_frame' is now disabled when HAVE_NS. - FRAMED_BOX_CURSOR is a new cursor type that is a variant of the FILLED_BOX_CURSOR, which has support for different colors depending upon whether it is in the active/inactive window and at the beginning/ending of an active region. - Visible fill column now takes into consideration the line number pixel-width and horizontal scrolling (if any) when calculating the X coordinate. - Disabled visible fill column when X coordinate is beyond text area width, and when prior to the line number pixel width (or zero if no line numbers) with horizontal scrolling in effect. - Restricted trace-redisplay messages to just the most relevant functions. - Customized a few of the faces to provide better visibility of crosshairs with a white background in an Emacs -Q situation. - Eliminated the usage of MC_GLYPH_TAB as there are really only two kinds that are used: MC_GLYPH | MC_GLYPHLESS - Eliminated a few abort / immediate return of functions that appear to no longer be necessary to avoid crashing Emacs. - Fixed one cash in the multiple fake cursors section of code when the real cursor is not associated with a glyph; i.e., `get_phys_cursor_glyph' == NULL. - As to the real fake cursor of crosshairs (intersection of vertical/horizontal rulers), when mc-real-fake-cursor is nil/"no"/'no, the BAR_CURSOR now uses MC_GLYPHLESS so as not to create a superimposed glyph on top of the MC_GLYPH that was placed when drawing the horizontal ruler. - Identified a right overhang situation that causes the fake cursor over a STRETCH to be erased. [Additional work is needed projects to be done below.] - `mc_get_phys_cursor_geometry' now uses `row->visible_height' without taking into consideration the FRAME_LINE_HEIGHT. - Added some tracing messages to a couple of functions. - Miscellaneous minor bug fixes. 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 12/13/2018: git reset --hard 8ffc0f2dd753879b0795714c29c86082aa9fd155 Step 3: From within the new emacs folder created in Step 1, apply the patch: git apply /path/to/the/attached.diff [There should not be any error messages at this point; i.e, you should be returned to a new command prompt.] Step 4: ./autogen.sh Step 5: ./configure ... [your custom options] Step 6: make Step 7: make install - To try out built-in fake cursors with Magnar Sveen's library (multiple-cursors), install that package first. [If the multiple-cursors package is installed, an eval-after-load "multiple-cursors-core" statement within crosshairs.el will redefine a couple of functions and set up a few keyboard shortcuts.] If the multiple-cursors package by Magnar Sveen is not already installed, then there 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)) - To try out crosshairs and the visible fill column, type: M-x +-mode - To try out only the visible fill column, type: M-x mc-fill-column-mode - To try out the new cursor-type of a FRAMED_BOX_CURSOR without anything extra, evaluate the following snippet -- see the difference between inactive/active windows, and also the beginning/ending of an active region selection: (setq cursor-type 'framed cursor-in-non-selected-windows 'framed) - To use the new cursor type of a FRAMED_BOX_CURSOR with crosshairs or multiple fake cursors, evaluate the following snippet: (setq mc-real-fake-cursor 'framed) - To learn how to use the multiple fake cursors feature, examine the interactive function `mc-test'. - EXAMPLE OF HOW TO USE MULTIPLE FAKE CURSORS: ;;; (BUFFER-POSITION CURSOR-TYPE CURSOR-COLOR) ;;; (setq multiple-cursors-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]))) ;;; TURN OFF. ;;; (setq multiple-cursors-conf nil) TODO: - 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. - Continue working on the sections of code within `draw_glyphs' that are responsible for redrawing a stretch tab (erasing a fake cursor) when the previous/next character has a left/right overhang. left_overwritten: " A" right_overwritten (GNU Emacs welcome screen without `buffer-display-table') and the real fake cursor is to the immediate right of the word "Tour": "Emacs Guided Tour Overview". - 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. - Fake cursors are being redrawn too often when non-selected visible windows have an ongoing process that require frequent redisplay updates (e.g., an eshell buffer. @lawlist may have already corrected the frequent redisplay issue as to mouse-overs, but will need to check this once again to be sure. - Set up some tests to see what (if anything) needs to be done so that these features play nicely with certain overlays and text properties. - Implement functionality similar to Lisp multiple-cursors by Magnar Sveen. - Create a comprehensive list of items to test when modifying these features; and, add a test file. - 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. HOW DOES IT WORK? - Fake cursors are removed in two (2) locations within `redisplay_internal' (if the cursor cache exists). If the frame is not being updated, then call `update_begin' before removing and call `update_end' when removing is complete. - Fake cursors are removed in two (2) locations within `redisplay_window' (if the cursor cache exists). If the frame is not being updated, then call `update_begin' before removing and call `update_end' when removing is complete. - Whenever `display_and_set_cursor' is called and not immediately returned, cursors are calculated and drawn; or, if the cursor cache already exist, then erase and redraw. If the frame is not being updated, then call `update_begin' before drawing/removing and call `update_end' when drawing/removing is complete. - The calculations for drawing fake cursors are based upon modified versions of the functions `dump_glyph_matrix' and `dump_glyph_row', which generate the correct coordinates for placing the fake cursors. - Fake cursors come in two types: (1) cursor with a glyph on top; (2) cursor with nothing on top [e.g., floating anywhere on the visible window]. - There are two basic settings: (1) draw or erase/redraw forthwith (whenever the real cursor would ordinarily be drawn); or, (2) draw on an idle-timer and, if the cursor cache exists, then erase/redraw in certain circumstances when the real cursor would ordinarily be redrawn. New calculations and cursor cache update occur on the initial call of either of the aforementioned two scenarios. - All three features (multiple fake cursors, crosshairs, and visible fill column) operate on the same principal. There are similar functions for each feature, with the only main difference being that multiple fake cursors look for a particular buffer position when dumping the glyph matrix and looping through each row, whereas crosshairs and visible fill column look for a particular window relative X coordinate. - At this time, there is nothing fancy about multiple fake cursors -- i.e., Emacs only looks for a buffer position and creates a fake cursor with the desired cursor type and cursor color. Magnar's Lisp library is still the only mechanism I am aware of that does the magic. Instead of placing a visible overlay where fake cursors would ordinarily be created using Magnar's library, there are a few modifications to his Lisp functions that are contained within crosshairs.el. From the list of fake cursor overlays created by Magnar's library, Emacs gathers the list of buffer positions and then draws built-in fake cursors that are within the confines of the visible windows. --Multipart_Thu_Dec_13_23:11:07_2018-1 Content-Type: application/diff; type=patch Content-Disposition: attachment; filename="2018_12_13__21_40_08_511.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvY3Jvc3NoYWlycy5lbCBiL2xpc3AvY3Jvc3NoYWlycy5lbApuZXcg ZmlsZSBtb2RlIDEwMDc1NQppbmRleCAwMDAwMDAwLi5mNDE1NWE4Ci0tLSAvZGV2L251bGwKKysr IGIvbGlzcC9jcm9zc2hhaXJzLmVsCkBAIC0wLDAgKzEsMTI4NCBAQAorOzs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Cis7OzsgQkVHSU4gbW9kaWZpY2F0aW9uIG9mIHRoZSBNdWx0aXBsZSBDdXJzb3Jz IGxpYnJhcnkgd3JpdHRlbiBieSAgTWFnbmFyIF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lm IChvciAobm90IChzeW1ib2xwIG9yaWdpbmFsLWNvbW1hbmQpKQorICAgICAgICAgICAgICAgICAg ICAgIDs7IGxhbWJkYSByZWdpc3RlcmVkIGJ5IHNtYXJ0cmVwCisgICAgICAgICAgICAgICAgICAg ICAgKHN0cmluZy1wcmVmaXgtcCAiKCIgKHN5bWJvbC1uYW1lIG9yaWdpbmFsLWNvbW1hbmQpKSkK KyAgICAgICAgICAgICAgICAgIChtYy9leGVjdXRlLWNvbW1hbmQtZm9yLWFsbC1mYWtlLWN1cnNv cnMgb3JpZ2luYWwtY29tbWFuZCkKKyAgICAgICAgICAgICAgICA7OyBzbWFydHJlcCBgaW50ZXJu J3MgY29tbWFuZHMgaW50byBvd24gb2JhcnJheSB0byBoZWxwCisgICAgICAgICAgICAgICAgOzsg YGRlc2NyaWJlLWJpbmRpbmdzJy4gIFNvLCBsZXQncyByZS1gaW50ZXJuJyBoZXJlIHRvCisgICAg ICAgICAgICAgICAgOzsgbWFrZSB0aGUgY29tbWFuZCBjb21wYXJhYmxlIGJ5IGBlcScuCisgICAg ICAgICAgICAgICAgKHNldHEgb3JpZ2luYWwtY29tbWFuZCAoaW50ZXJuIChzeW1ib2wtbmFtZSBv cmlnaW5hbC1jb21tYW5kKSkpCisgICAgICAgICAgICAgICAgOzsgb3RoZXJ3aXNlIGl0J3MgYSBz eW1ib2wsIGFuZCB3ZSBjYW4gYmUgbW9yZSB0aG9yb3VnaAorICAgICAgICAgICAgICAgIChpZiAo Z2V0IG9yaWdpbmFsLWNvbW1hbmQgJ21jLS11bnN1cHBvcnRlZCkKKyAgICAgICAgICAgICAgICAg ICAgKG1lc3NhZ2UgIiVTIGlzIG5vdCBzdXBwb3J0ZWQgd2l0aCBtdWx0aXBsZSBjdXJzb3JzJXMi CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsLWNvbW1hbmQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGdldCBvcmlnaW5hbC1jb21tYW5kICdtYy0tdW5zdXBwb3J0 ZWQpKQorICAgICAgICAgICAgICAgICAgKHdoZW4gKGFuZCBvcmlnaW5hbC1jb21tYW5kCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKG1lbXEgb3JpZ2luYWwtY29tbWFuZCBtYy0t ZGVmYXVsdC1jbWRzLXRvLXJ1bi1vbmNlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KG5vdCAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLW9uY2UpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAob3IgbWMvYWx3YXlzLXJ1bi1mb3ItYWxsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jLS1kZWZh dWx0LWNtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobWVtcSBvcmlnaW5hbC1jb21tYW5kIG1jL2NtZHMtdG8tcnVuLWZvci1hbGwpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvcHJvbXB0LWZvci1pbmNsdXNpb24taW4td2hp dGVsaXN0IG9yaWdpbmFsLWNvbW1hbmQpKSkKKyAgICAgICAgICAgICAgICAgICAgKG1jL2V4ZWN1 dGUtY29tbWFuZC1mb3ItYWxsLWZha2UtY3Vyc29ycyBvcmlnaW5hbC1jb21tYW5kKSkpKQorICAg ICAgICAgICAgICAod2hlbiBtYy91c2UtYnVpbHQtaW4tY3Vyc29ycworICAgICAgICAgICAgICAg IChzZXRxIG11bHRpcGxlLWN1cnNvcnMtY29uZgorICAgICAgICAgICAgICAgICAgICAgICAgKG1h cGNhcgorICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmRhICh4KSAobGlzdCAob3Zlcmxh eS1zdGFydCB4KSAiYmFyIiBuaWwpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAobWMvYWxs LWZ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bSBM U0wKK2hhcHBlbnMgaW50ZXJuYWxseSBieSBtdWx0aXBseWluZyBlYWNoIGVsZW1lbnQgb2YgdGhl IExTTCBjb2xvciB2ZWN0b3IgYnkgNjU1MzUuIgorKGludGVyYWN0aXZlKQorICAobGV0ICgoYnVm ZmVyIChnZXQtYnVmZmVyLWNyZWF0ZSAiKk1DLVRFU1QqIikpKQorICAgICh3aXRoLWN1cnJlbnQt YnVmZmVyIGJ1ZmZlcgorICAgICAgKGVyYXNlLWJ1ZmZlcikKKyAgICAgIChpbnNlcnQgIlRoaXMg aXMgYSB0ZXN0ISIpCisgICAgICAoc2V0cSBtdWx0aXBsZS1jdXJzb3JzLWNvbmYgJygoMSAiaGJh ciIgIm1hZ2VudGEiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDIgImJh ciIgInB1cnBsZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMyAiYm94 IiAiIzAwRkYwMCIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNCAiaG9s bG93IiAiIzAwMDBGRiIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNSAo ImhiYXIiIDMpIFsxLjAgMC4wIDEuMF0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoNiAoImJhciIgMykgWzAuMCAxLjAgMS4wXSkpKSkKKyAgICAoc2VsZWN0LXdpbmRvdyAo ZGlzcGxheS1idWZmZXIgYnVmZmVyKSkKKyAgICA7OzsgVGhlIHRyaWdnZXIgaW4gYGtleWJvYXJk LmNgIGlzIG5vdCBhY3RpdmF0ZWQgaW4gdGhpcyBleGFtcGxlLCBzbyB3ZQorICAgIDs7OyBmb3Jj ZSB0aGUgbXVsdGlwbGUgY3Vyc29ycyB0byBiZSBkcmF3bi4KKyAgICAobWMtYWN0aXZhdGUtbXVs dGlwbGUtY3Vyc29ycyAoc2VsZWN0ZWQtd2luZG93KSkpKQorCisoZG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gKG1jLWZpbGwt Y29sdW1uLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAg ICAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAg ICAgICAoZXF1YWwgY3VycmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVs ZG9jLW1vZGUgLTEpKQorICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisg ICAgICAgICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgaml0LWxvY2stY29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGpp dC1sb2NrLWNvbnRleHQtdGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0 LXRpbWVyIChydW4td2l0aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0 LWZvbnRpZnkpKQorICAgICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisg ICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAg ICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0 aW1lcnAgdW5kby1hdXRvLWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNl bC10aW1lciB1bmRvLWF1dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0 ICd1bmRvLWF1dG8tLXVuZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChh ZGQtdG8tbGlzdCAndW5kby1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQt YnVmZmVyKSkpKQorICAgICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkp CisgICAgICAod2hlbiBibGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1v ZGUgLTEpCisgICAgICAgICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21t YW5kLWhvb2spCisgICAgICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxp bmstY3Vyc29yLWNoZWNrKSkpCisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVs eS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0 KSkKKyAgICAgICAgICAgICAgICAgKG51bGwgY3Jvc3NoYWlycy1kcmF3LWZvcnRod2l0aCkpCisg ICAgICAgIChzZXRxIGNyb3NzaGFpcnMtZHJhdy1mb3J0aHdpdGggdCkpCisgICAgICAoc2V0cSBj cm9zc2hhaXJzIHQpCisgICAgICAod2hlbiArLWZpbGwtY29sdW1uCisgICAgICAgIChzZXRxIG1j LWZpbGwtY29sdW1uIHQpKQorICAgICAgKHdoZW4gKGFuZCArLWZpbGwtY29sdW1uCisgICAgICAg ICAgICAgICAgIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAg IChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkKKyAgICAgICAgICAgICAgICAgKG51bGwg bWMtZmlsbC1jb2x1bW4tZHJhdy1mb3J0aHdpdGgpKQorICAgICAgICAoc2V0cSBtYy1maWxsLWNv bHVtbi1kcmF3LWZvcnRod2l0aCB0KSkKKyAgICAgIDs7OyBgYXV0by1jb21wb3N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ZWQtc3RhdGUpIG5pbCkKKyAgICAgICAgKGRvbGlzdCAodmFyICcoYnVmZmVyLWRp c3BsYXktdGFibGUKKyAgICAgICAgICAgICAgICAgICAgICAgZnJpbmdlLWluZGljYXRvci1hbGlz dAorICAgICAgICAgICAgICAgICAgICAgICB0YWItd2lkdGgKKyAgICAgICAgICAgICAgICAgICAg ICAgbGluZS1tb3ZlLXZpc3VhbAorICAgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1saW5l cworICAgICAgICAgICAgICAgICAgICAgICB0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRvd3MK KyAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwKSkKKyAgICAgICAgICAod2hlbiAobG9j YWwtdmFyaWFibGUtcCB2YXIpCisgICAgICAgICAgICAocHVzaCAoY29ucyB2YXIgKHN5bWJvbC12 YWx1ZSB2YXIpKSArLS1zYXZlZC1zdGF0ZSkpKQorICAgICAgICAoc2V0cSBmaWxsLWNvbHVtbiA4 MCkKKyAgICAgICAgKHNldHEgZGlzcGxheS1saW5lLW51bWJlcnMgdCkKKyAgICAgICAgKHNldHEt bG9jYWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJlbnQtbGluZSkKKyAgICAgICAgKHNldHEtbG9j YWwgaHNjcm9sbC1zdGVwIDUpCisgICAgICAgIChzZXRxIGJ1ZmZlci1kaXNwbGF5LXRhYmxlICst YnVmZmVyLWRpc3BsYXktdGFibGUpCisgICAgICAgIChzZXRxIHRhYi13aWR0aCA0KQorICAgICAg ICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdsaW5lLW1vdmUtdmlzdWFsKSB0KQorICAgICAg ICAoc2V0cSB0cnVuY2F0ZS1saW5lcworICAgICAgICAgIChjb25kCisgICAgICAgICAgICAoKGxl dCAoKGxzdCArLXRydW5jYXRlLWxpbmVzLWRlcml2ZWQtbW9kZXMpCisgICAgICAgICAgICAgICAg ICAgIG1vZGUpCisgICAgICAgICAgICAgIChjYXRjaCAnZm91bmQKKyAgICAgICAgICAgICAgICAo d2hpbGUgKHNldHEgbW9kZSAocG9wIGxzdCkpCisgICAgICAgICAgICAgICAgICAod2hlbiAoZGVy aXZlZC1tb2RlLXAgbW9kZSkKKyAgICAgICAgICAgICAgICAgICAgKHRocm93ICdmb3VuZCB0KSkp KSkpCisgICAgICAgICAgICAgKChtZW1xIG1ham9yLW1vZGUgKy10cnVuY2F0ZS1saW5lcy1tYWpv ci1tb2RlcykpCisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgIG5pbCkpKQorICAgICAg ICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICd0cnVuY2F0ZS1wYXJ0aWFsLXdpZHRoLXdpbmRv d3MpIG5pbCkKKyAgICAgICAgKHNldHEgd29yZC13cmFwIHQpCisgICAgICAgIChzZXRxIGluZGlj YXRlLWVtcHR5LWxpbmVzIHQpCisgICAgICAgIChzZXRxIGluZGljYXRlLWJ1ZmZlci1ib3VuZGFy aWVzICdsZWZ0KQorICAgICAgICAoc2V0cSBmcmluZ2UtaW5kaWNhdG9yLWFsaXN0CisgICAgICAg ICAgICA7OzsgaHNjbF9hbGxfdGVtcF9wIHwgaHNjbF90ZW1wX3AKKyAgICAgICAgICAnKCgrLWhz Y2wtdGVtcCAuICgrLXNpbmdsZS1hbmdsZS1sZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKy1kb3VibGUtYW5nbGUtbGVmdCkpCisgICAgICAgICAgICA7OzsgaHNjbF9hbGxfcGVybV8w X3AgfCBoc2NsX2FsbF9wZXJtXzFfcCB8IGhzY2xfYWxsX3Blcm1fMl9wIHwgaHNjbF9wZXJtX3AK KyAgICAgICAgICAgICgrLWhzY2wtcGVybSAuICgrLXNpbmdsZS1hbmdsZS11cAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICstZG91YmxlLWFuZ2xlLXVwCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKy10cmlwbGUtYW5nbGUtdXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAr LXF1YWRydXBsZS1hbmdsZS11cCkpCisgICAgICAgICAgICAoKy1vdmVybGF5LWFycm93IC4gKCst ZnJpbmdlLWxlZnQtYXJyb3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmlu Z2UtcmlnaHQtYXJyb3cpKQorICAgICAgICAgICAgKHRydW5jYXRpb24gLiAoKy1mcmluZ2UtbGVm dC1hcnJvdworICAgICAgICAgICAgICAgICAgICAgICAgICAgKy1mcmluZ2UtcmlnaHQtYXJyb3cp KQorICAgICAgICAgICAgKGNvbnRpbnVhdGlvbiAuICgrLWZyaW5nZS1sZWZ0LWN1cmx5LWFycm93 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICstYmFja3NsYXNoKSkKKyAgICAgICAgICAg IChvdmVybGF5LWFycm93IC4gKy1mcmluZ2UtcmlnaHQtdHJpYW5nbGUpCisgICAgICAgICAgICAo dXAgLiArLWZyaW5nZS11cC1hcnJvdykKKyAgICAgICAgICAgIChkb3duIC4gKy1mcmluZ2UtZG93 bi1hcnJvdykKKyAgICAgICAgICAgICh0b3AgLiArLWZyaW5nZS10b3AtbGVmdC1hbmdsZSkKKyAg ICAgICAgICAgIChib3R0b20gLiArLWZyaW5nZS1ib3R0b20tcmlnaHQtYW5nbGUpCisgICAgICAg ICAgICAodG9wLWJvdHRvbSAuICgrLWZyaW5nZS1sZWZ0LWJyYWNrZXQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICstZnJpbmdlLXJpZ2h0LWJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICstZnJpbmdlLXRvcC1yaWdodC1hbmdsZQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgKy1mcmluZ2UtdG9wLWxlZnQtYW5nbGUpKQorICAgICAgICAgICAgKGVtcHR5LWxpbmUgLiAr LWZyaW5nZS1lbXB0eS1saW5lKQorICAgICAgICAgICAgKHVua25vd24gLiArLWZyaW5nZS1xdWVz dGlvbi1tYXJrKSkpCisgICAgICAgIChzZXRxIGZyaW5nZS1jdXJzb3ItYWxpc3QgJygoYm94IC4g Ky1mcmluZ2UtbGVmdC10cmlhbmdsZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChob2xsb3cgLiArLWhvbGxvdy1yZWN0YW5nbGUpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoYmFyIC4gKy12ZXJ0aWNhbC1iYXIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoaGJhciAuICstZnJpbmdlLWhvcml6b250YWwtYmFyKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGhvbGxvdy1zbWFsbCAuICstZnJpbmdlLWhv bGxvdy1zcXVhcmUpKSkKKyAgICAgICAgKGlmIGNyb3NzaGFpcnMtZHJhdy1mb3J0aHdpdGgKKyAg ICAgICAgICAoYWRkLWhvb2sgJ3Bvc3QtY29tbWFuZC1ob29rICcrLWRyYXctZm9ydGh3aXRoICdh cHBlbmQgJ2xvY2FsKQorICAgICAgICAgIChhZGQtaG9vayAncG9zdC1jb21tYW5kLWhvb2sgJyst ZHJhdy1jcm9zc2hhaXJzICdhcHBlbmQgJ2xvY2FsKSkKKyAgICAgICAgKHdoZW4gY3Jvc3NoYWly cy1kcmF3LWZvcnRod2l0aAorICAgICAgICAgIChhZGQtaG9vayAnd2luZG93LWNvbmZpZ3VyYXRp b24tY2hhbmdlLWhvb2sgJystZHJhdy1mb3J0aHdpdGggbmlsICdsb2NhbCkpCisgICAgICAgIChh ZGQtaG9vayAnY2hhbmdlLW1ham9yLW1vZGUtaG9vayAndHVybi1vZmYtKy1tb2RlIG5pbCAnbG9j YWwpKQorICAgICAgKHdoZW4gKGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgJ2FueSkKKyAgICAgICAg KGlmIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0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ICAgICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDkxKSA9PiBvcGVuaW5nIHNx dWFyZSBicmFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICg9IG9jaGFyIDkxKQorICAgICAg ICAgICAgICAgICAgICAgICA7OzsgKGNoYXItdG8tc3RyaW5nIDEyMykgPT4gb3BlbmluZyB3YXZ5 IGJyYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICAgKD0gb2NoYXIgMTIzKSkpCisgICAgICAg ICAgICAgICAgKG1pbiAoMSsgb3BvaW50KSAocG9pbnQtbWF4KSkpCisgICAgICAgICAgICAgKChv ciA7OzsgKGNoYXItdG8tc3RyaW5nIDQxKSA9PiBjbG9zaW5nIHBhcmVudGhlc2lzCisgICAgICAg ICAgICAgICAgICAoPSBwcmVjZWRpbmctY2hhciA0MSkKKyAgICAgICAgICAgICAgICAgIDs7OyAo Y2hhci10by1zdHJpbmcgOTMpID0+IGNsb3Npbmcgc3F1YXJlIGJyYWNrZXQKKyAgICAgICAgICAg ICAgICAgICg9IHByZWNlZGluZy1jaGFyIDkzKQorICAgICAgICAgICAgICAgICAgOzs7IChjaGFy LXRvLXN0cmluZyAxMjUpID0+IGNsb3Npbmcgd2F2eSBicmFja2V0CisgICAgICAgICAgICAgICAg ICAoPSBwcmVjZWRpbmctY2hhciAxMjUpKQorICAgICAgICAgICAgICAgIChtYXggKHBvaW50LW1p bikgKDEtIG9wb2ludCkpKQorICAgICAgICAgICAgICh0CisgICAgICAgICAgICAgICAgb3BvaW50 KSkpCisgICAgICAgICBwb3MyCisgICAgICAgICBzZWxlY3RlZC1mYWNlKQorICAgIChzYXZlLWV4 Y3Vyc2lvbgorICAgICAgKGNvbmRpdGlvbi1jYXNlIG5pbAorICAgICAgICAod2hpbGUgKHNldHEg cG9zMSAobnRoIDEgKHBhcnNlLXBhcnRpYWwtc2V4cCBmcm9tIHBvczEpKSkKKyAgICAgICAgICAo c2V0cSBwb3MyIChzY2FuLXNleHBzIHBvczEgMSkpCisgICAgICAgICAgKGlmICg9IGkgMTApCisg ICAgICAgICAgICAoc2V0cSBpIDEpCisgICAgICAgICAgICAoc2V0cSBpICgxKyBpKSkpCisgICAg ICAgICAgKHNldHEgc2VsZWN0ZWQtZmFjZSAoY29uZAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoKD0gaSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBh cmVucy1vbmUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgMikK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdHdvLWZhY2UpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPSBpIDMpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJystcGFyZW5zLXRocmVlLWZhY2UpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICgoPSBpIDQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJystcGFyZW5zLWZvdXItZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KCg9IGkgNSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtZml2 ZS1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSA2KQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICcrLXBhcmVucy1zaXgtZmFjZSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkgNykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAnKy1wYXJlbnMtc2V2ZW4tZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKCg9IGkgOCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1w YXJlbnMtZWlnaHQtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg9IGkg OSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtbmluZS1mYWNl KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKD0gaSAxMCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAnKy1wYXJlbnMtdGVuLWZhY2UpKSkKKyAgICAgICAgICAo bGV0ICgob3YgKG1ha2Utb3ZlcmxheSBwb3MxICgxKyBwb3MxKSkpKQorICAgICAgICAgICAgKHVu bGVzcyArLXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAgIChvdmVybGF5LXB1 dCBvdiAnd2luZG93IHdpbikpCisgICAgICAgICAgICAob3ZlcmxheS1wdXQgb3YgJ2ZhY2Ugc2Vs ZWN0ZWQtZmFjZSkpCisgICAgICAgICAgKHdoZW4gcG9zMgorICAgICAgICAgICAgKGxldCAoKG92 IChtYWtlLW92ZXJsYXkgKDEtIHBvczIpIHBvczIpKSkKKyAgICAgICAgICAgICAgKHVubGVzcyAr LXBhcmVucy1pbmFjdGl2ZS13aW5kb3dzCisgICAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92 ICd3aW5kb3cgd2luKSkKKyAgICAgICAgICAgICAgKG92ZXJsYXktcHV0IG92ICdmYWNlIHNlbGVj dGVkLWZhY2UpKSkpCisgICAgICAgIChlcnJvciBuaWwpKSkKKyAgICAoc2V0cSArLXBhcmVucy1v dmVybGF5cy1leGlzdC1wIHQpKSkKKworKGRlZnVuICstcmVtb3ZlLW92ZXJsYXlzIChiZWcgZW5k IG5hbWUgdmFsKQorIlJlbW92ZSB0aGUgb3ZlcmxheXMgdGhhdCBhcmUgYGVxdWFsLWluY2x1ZGlu Zy1wcm9wZXJ0aWVzYC4KK0luY2x1ZGVzIGEgdW5pcXVlIHNpdHVhdGlvbiB3aGVuIGFuIG92ZXJs YXkgd2l0aCBhbiBgJ2FmdGVyLXN0cmluZ2AgcHJvcGVydHkKK2lzIGF0IHRoZSB2ZXJ5IGVuZCBv ZiBhIG5hcnJvd2VkLWJ1ZmZlci4iCisgIChsZXQqICgocG9pbnQtbWF4IChwb2ludC1tYXgpKQor ICAgICAgICAgKHBvaW50LW1pbiAocG9pbnQtbWluKSkKKyAgICAgICAgIChuYXJyb3dlZC1wIChi dWZmZXItbmFycm93ZWQtcCkpCisgICAgICAgICAoYmVnIChpZiBiZWcgYmVnIHBvaW50LW1pbikp CisgICAgICAgICAoZW5kCisgICAgICAgICAgIChjb25kCisgICAgICAgICAgICAgKChhbmQKKyAg ICAgICAgICAgICAgICAgKG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICBlbmQpCisg ICAgICAgICAgICAgICBlbmQpCisgICAgICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAg KG5vdCBuYXJyb3dlZC1wKQorICAgICAgICAgICAgICAgICAobnVsbCBlbmQpKQorICAgICAgICAg ICAgICAgcG9pbnQtbWF4KQorICAgICAgICAgICAgICgoYW5kCisgICAgICAgICAgICAgICAgIG5h cnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAgICAgICAgICAgICAgICg8IGVuZCBw b2ludC1tYXgpKQorICAgICAgICAgICAgICAgZW5kKQorICAgICAgICAgICAgICgoYW5kCisgICAg ICAgICAgICAgICAgIG5hcnJvd2VkLXAKKyAgICAgICAgICAgICAgICAgZW5kCisgICAgICAgICAg ICAgICAgICg9IGVuZCBwb2ludC1tYXgpKQorICAgICAgICAgICAgICAgKDErIGVuZCkpCisgICAg ICAgICAgICAgKChhbmQKKyAgICAgICAgICAgICAgICAgbmFycm93ZWQtcAorICAgICAgICAgICAg ICAgICAobnVsbCBlbmQpKQorICAgICAgICAgICAgICAgKDErIHBvaW50LW1heCkpICkpCisgICAg ICAgICAob3ZlcmxheXMKKyAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgKG92ZXJsYXkt cmVjZW50ZXIgZW5kKQorICAgICAgICAgICAgIChvdmVybGF5cy1pbiBiZWcgZW5kKSkpKQorICAg ICh3aGVuIChhbmQgYmVnIGVuZCBuYW1lIHZhbCkKKyAgICAgIChkb2xpc3QgKG8gb3ZlcmxheXMp CisgICAgICAgIChjb25kCisgICAgICAgICAgKChhbmQgKGVxIG5hbWUgJ2ZhY2UpCisgICAgICAg ICAgICAgICAgKGVxIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisgICAgICAgICAgICA7OyBF aXRoZXIgcHVzaCB0aGlzIG92ZXJsYXkgb3V0c2lkZSBiZWcuLi5lbmQKKyAgICAgICAgICAgIDs7 IG9yIHNwbGl0IGl0IHRvIGV4Y2x1ZGUgYmVnLi4uZW5kCisgICAgICAgICAgICA7OyBvciBkZWxl dGUgaXQgZW50aXJlbHkgKGlmIGl0IGlzIGNvbnRhaW5lZCBpbiBiZWcuLi5lbmQpLgorICAgICAg ICAgICAgKGlmICg8IChvdmVybGF5LXN0YXJ0IG8pIGJlZykKKyAgICAgICAgICAgICAgICAoaWYg KD4gKG92ZXJsYXktZW5kIG8pIGVuZCkKKyAgICAgICAgICAgICAgKHByb2duCisgICAgICAgICAg ICAgICAgKG1vdmUtb3ZlcmxheSAoY29weS1vdmVybGF5IG8pCisgICAgICAgICAgICAgICAgICAo b3ZlcmxheS1zdGFydCBvKSBiZWcpCisgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBvIGVu ZCAob3ZlcmxheS1lbmQgbykpKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBvIChv dmVybGF5LXN0YXJ0IG8pIGJlZykpCisgICAgICAgICAgICAgIChpZiAoPiAob3ZlcmxheS1lbmQg bykgZW5kKQorICAgICAgICAgICAgICAgICAgKG1vdmUtb3ZlcmxheSBvIGVuZCAob3ZlcmxheS1l bmQgbykpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1vdmVybGF5IG8pKSkpCisgICAgICAgICAg KChhbmQgKG5vdCAoZXEgbmFtZSAnZmFjZSkpCisgICAgICAgICAgICAgICAgKGVxdWFsLWluY2x1 ZGluZy1wcm9wZXJ0aWVzIChvdmVybGF5LWdldCBvIG5hbWUpIHZhbCkpCisgICAgICAgICAgICAo ZGVsZXRlLW92ZXJsYXkgbykpKSkpKSkKKworKGRlZnVuICstZGVsZXRlLXBhcmVucy1vdmVybGF5 cyAoKQorICAod2hlbiArLXBhcmVucy1vdmVybGF5cy1leGlzdC1wCisgICAgKGRvbGlzdCAoZmFj ZSAnKCstcGFyZW5zLW9uZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXR3by1m YWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRocmVlLWZhY2UKKyAgICAgICAgICAg ICAgICAgICAgKy1wYXJlbnMtZm91ci1mYWNlCisgICAgICAgICAgICAgICAgICAgICstcGFyZW5z LWZpdmUtZmFjZQorICAgICAgICAgICAgICAgICAgICArLXBhcmVucy1zaXgtZmFjZQorICAgICAg ICAgICAgICAgICAgICArLXBhcmVucy1zZXZlbi1mYWNlCisgICAgICAgICAgICAgICAgICAgICst cGFyZW5zLWVpZ2h0LWZhY2UKKyAgICAgICAgICAgICAgICAgICAgKy1wYXJlbnMtbmluZS1mYWNl CisgICAgICAgICAgICAgICAgICAgICstcGFyZW5zLXRlbi1mYWNlKSkKKyAgICAgICgrLXJlbW92 ZS1vdmVybGF5cyBuaWwgbmlsICdmYWNlIGZhY2UpKQorICAgIChzZXRxICstcGFyZW5zLW92ZXJs YXlzLWV4aXN0LXAgbmlsKSkpCisKKzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OworCis7OzsgQVVU SE9SOiAgTmlrb2xhaiBTY2h1bWFjaGVyIC0tIGh0dHBzOi8vZ2l0aHViLmNvbS9uc2NodW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ZQorICAoY29uZAorICAgIDs7OyBgKy1tb2RlJyBoYXMgdGhlIGFiaWxpdHkgdG8gYWxzbyBkaXNw bGF5IGEgZmlsbCBjb2x1bW4gaW5kaWNhdG9yLgorICAgIDs7OyBTZWUgdGhlIHZhcmlhYmxlIGAr LWZpbGwtY29sdW1uJy4KKyAgICAoKGFuZCBtYy1maWxsLWNvbHVtbi1tb2RlICstbW9kZSkKKyAg ICAgIChzZXRxIG1jLWZpbGwtY29sdW1uLW1vZGUgbmlsKQorICAgICAgKG1lc3NhZ2UgIlR1cm5l ZCBPRkYgYG1jLWZpbGwtY29sdW1uLW1vZGUnICglcykgLS0gc2VlIHRoZSB2YXJpYWJsZSBgKy1m aWxsLWNvbHVtbicuIiAoY3VycmVudC1idWZmZXIpKSkKKyAgICAobWMtZmlsbC1jb2x1bW4tbW9k ZQorICAgICAgKHdoZW4gKGFuZCBnbG9iYWwtZWxkb2MtbW9kZQorICAgICAgICAgICAgICAgICAo Y2FsbGVkLWludGVyYWN0aXZlbHktcCAnYW55KQorICAgICAgICAgICAgICAgICAoZXF1YWwgY3Vy cmVudC1wcmVmaXgtYXJnICcoNCkpKQorICAgICAgICAoZ2xvYmFsLWVsZG9jLW1vZGUgLTEpKQor ICAgICAgKHdoZW4gKGFuZCBqaXQtbG9jay1jb250ZXh0LXRpbWVyCisgICAgICAgICAgICAgICAg IChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBj dXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgaml0LWxvY2st Y29udGV4dC10aW1lcikKKyAgICAgICAgICAoY2FuY2VsLXRpbWVyIGppdC1sb2NrLWNvbnRleHQt dGltZXIpKQorICAgICAgICA7OyAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIChydW4td2l0 aC1pZGxlLXRpbWVyIDUuMCAncmVwZWF0ICdqaXQtbG9jay1jb250ZXh0LWZvbnRpZnkpKQorICAg ICAgICAoc2V0cSBqaXQtbG9jay1jb250ZXh0LXRpbWVyIG5pbCkpCisgICAgICAod2hlbiAoYW5k IChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAgICAgICAgICAgICAgIChlcXVhbCBj dXJyZW50LXByZWZpeC1hcmcgJyg0KSkpCisgICAgICAgICh3aGVuICh0aW1lcnAgdW5kby1hdXRv LWN1cnJlbnQtYm91bmRhcnktdGltZXIpCisgICAgICAgICAgKGNhbmNlbC10aW1lciB1bmRvLWF1 dG8tY3VycmVudC1ib3VuZGFyeS10aW1lcikpCisgICAgICAgIChmc2V0ICd1bmRvLWF1dG8tLXVu ZG9hYmxlLWNoYW5nZQorICAgICAgICAgICAgICAobGFtYmRhICgpIChhZGQtdG8tbGlzdCAndW5k by1hdXRvLS11bmRvYWJseS1jaGFuZ2VkLWJ1ZmZlcnMgKGN1cnJlbnQtYnVmZmVyKSkpKQorICAg ICAgICAoZnNldCAndW5kby1hdXRvLWFtYWxnYW1hdGUgJ2lnbm9yZSkpCisgICAgICAod2hlbiBi bGluay1jdXJzb3ItbW9kZQorICAgICAgICAoYmxpbmstY3Vyc29yLW1vZGUgLTEpCisgICAgICAg ICh3aGVuIChtZW1xICdibGluay1jdXJzb3ItY2hlY2sgcG9zdC1jb21tYW5kLWhvb2spCisgICAg ICAgICAgKHJlbW92ZS1ob29rICdwb3N0LWNvbW1hbmQtaG9vayAnYmxpbmstY3Vyc29yLWNoZWNr KSkpCisgICAgICAod2hlbiAoYW5kIChjYWxsZWQtaW50ZXJhY3RpdmVseS1wICdhbnkpCisgICAg ICAgICAgICAgICAgIChlcXVhbCBjdXJyZW50LXByZWZpeC1hcmcgJyg0KSkKKyAgICAgICAgICAg ICAgICAgKG51bGwgbWMtZmlsbC1jb2x1bW4tZHJhdy1mb3J0aHdpdGgpKQorICAgICAgICAoc2V0 cSBtYy1maWxsLWNvbHVtbi1kcmF3LWZvcnRod2l0aCB0KSkKKyA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KCZRU0Z1bmRhbWVudGFsKTsKICAgc3Rh dGljcHJvICgmVmJ1ZmZlcl9hbGlzdCk7CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisv KiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgREVGU1lNIChRbWNfcmVhbF9mYWtlX2N1cnNvciwg Im1jLXJlYWwtZmFrZS1jdXJzb3IiKTsKKyAgREVGU1lNIChRbXVsdGlwbGVfY3Vyc29yc19jb25m LCAibXVsdGlwbGUtY3Vyc29ycy1jb25mIik7CisgIERFRlNZTSAoUW11bHRpcGxlX2N1cnNvcnNf ZHJhd19mb3J0aHdpdGgsICJtdWx0aXBsZS1jdXJzb3JzLWRyYXctZm9ydGh3aXRoIik7CisgIERF RlNZTSAoUW11bHRpcGxlX2N1cnNvcnNfaW5hY3RpdmVfd2luZG93cywgIm11bHRpcGxlLWN1cnNv cnMtaW5hY3RpdmUtd2luZG93cyIpOworICBERUZTWU0gKFFjcm9zc2hhaXJzLCAiY3Jvc3NoYWly cyIpOworICBERUZTWU0gKFFjcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXIsICJjcm9zc2hhaXJz LWhvcml6b250YWwtcnVsZXIiKTsKKyAgREVGU1lNIChRY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxl ciwgImNyb3NzaGFpcnMtdmVydGljYWwtcnVsZXIiKTsKKyAgREVGU1lNIChRY3Jvc3NoYWlyc19k cmF3X2ZvcnRod2l0aCwgImNyb3NzaGFpcnMtZHJhdy1mb3J0aHdpdGgiKTsKKyAgREVGU1lNIChR Y3Jvc3NoYWlyc19pbmFjdGl2ZV93aW5kb3dzLCAiY3Jvc3NoYWlycy1pbmFjdGl2ZS13aW5kb3dz Iik7CisgIERFRlNZTSAoUW1jX3N0ZGVyciwgIm1jLXN0ZGVyciIpOworICBERUZTWU0gKFFtY19m aWxsX2NvbHVtbiwgIm1jLWZpbGwtY29sdW1uIik7CisgIERFRlNZTSAoUW1jX2ZpbGxfY29sdW1u X2RyYXdfZm9ydGh3aXRoLCAibWMtZmlsbC1jb2x1bW4tZHJhdy1mb3J0aHdpdGgiKTsKKyAgREVG U1lNIChRbWNfZmlsbF9jb2x1bW5faW5hY3RpdmVfd2luZG93LCAibWMtZmlsbC1jb2x1bW4taW5h Y3RpdmUtd2luZG93Iik7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgREVGU1lN IChRY2hvaWNlLCAiY2hvaWNlIik7CiAgIERFRlNZTSAoUWxlZnQsICJsZWZ0Iik7CiAgIERFRlNZ TSAoUXJpZ2h0LCAicmlnaHQiKTsKQEAgLTU0NTIsNiArNTUxNyw2NSBAQCBzeW1zX29mX2J1ZmZl ciAodm9pZCkKICAgRnB1dCAoUXByb3RlY3RlZF9maWVsZCwgUWVycm9yX21lc3NhZ2UsCiAJYnVp bGRfcHVyZV9jX3N0cmluZyAoIkF0dGVtcHQgdG8gbW9kaWZ5IGEgcHJvdGVjdGVkIGZpZWxkIikp OwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLwor CisgIERFRlZBUl9QRVJfQlVGRkVSICgibWMtcmVhbC1mYWtlLWN1cnNvciIsICZCVkFSIChjdXJy ZW50X2J1ZmZlciwgbWNfcmVhbF9mYWtlX2N1cnNvciksIFFuaWwsCisgICAgZG9jOiAvKiBBIGJ1 ZmVyLWxvY2FsIHZhcmlhYmxlIHRvIHNldCB0aGUgY3Vyc29yIHR5cGUgb2YgdGhlIHJlYWwgZmFr ZSBjdXJzb3IuICovKTsKKworICBERUZWQVJfUEVSX0JVRkZFUiAoIm11bHRpcGxlLWN1cnNvcnMt Y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isvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyNkZWZp bmUgTUFYX1BFUl9CVUZGRVJfVkFSUyA2MAogICBjaGFyIGxvY2FsX2ZsYWdzW01BWF9QRVJfQlVG RkVSX1ZBUlNdOwogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIC8qIFNldCB0byB0 aGUgbW9kdGltZSBvZiB0aGUgdmlzaXRlZCBmaWxlIHdoZW4gcmVhZCBvciB3cml0dGVuLgogICAg ICBtb2R0aW1lLnR2X25zZWMgPT0gTk9ORVhJU1RFTlRfTU9EVElNRV9OU0VDUyBtZWFucwogICAg ICB2aXNpdGVkIGZpbGUgd2FzIG5vbmV4aXN0ZW50LiAgbW9kdGltZS50dl9uc2VjID09CkBAIC04 OTYsNiArOTUwLDkyIEBAIFhCVUZGRVIgKExpc3BfT2JqZWN0IGEpCiAvKiBNb3N0IGNvZGUgc2hv dWxkIHVzZSB0aGVzZSBmdW5jdGlvbnMgdG8gc2V0IExpc3AgZmllbGRzIGluIHN0cnVjdAogICAg YnVmZmVyLiAgKFNvbWUgc2V0dGVycyB0aGF0IGFyZSBwcml2YXRlIHRvIGEgc2luZ2xlIC5jIGZp bGUgYXJlCiAgICBkZWZpbmVkIGFzIHN0YXRpYyBpbiB0aG9zZSBmaWxlcy4pICAqLworCisKKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitJTkxJTkUg dm9pZAorYnNldF9ibHZfbWNfcmVhbF9mYWtlX2N1cnNvciAoc3RydWN0IGJ1ZmZlciAqYiwgTGlz cF9PYmplY3QgdmFsKQoreworICBiLT5tY19yZWFsX2Zha2VfY3Vyc29yXyA9IHZhbDsKK30KKwor SU5MSU5FIHZvaWQKK2JzZX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SU09SCiB9OwogCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKworCiAvKiBWYWx1ZXMgcmV0dXJuZWQgZnJvbSBjb29yZGluYXRlc19p bl93aW5kb3cuICAqLwogCiBlbnVtIHdpbmRvd19wYXJ0CkBAIC0zNzksNiArNDAxLDE4IEBAIHN0 cnVjdCBnbHlwaF9zbGljZQogCiBzdHJ1Y3QgZ2x5cGgKIHsKKworCisvKiAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBpbnQgeCwgeSwgaHBvcywgdnBv czsKKworICBib29sX2JmIHp2X3AgOiAxOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIC8qIFBvc2l0aW9uIGZyb20gd2hpY2ggdGhpcyBnbHlwaCB3YXMgZHJhd24uICBJZiBgb2Jq ZWN0JyBiZWxvdyBpcyBhCiAgICAgIExpc3Agc3RyaW5nLCB0aGlzIGlzIGFuIGluZGV4IGludG8g dGhhdCBzdHJpbmcuICBJZiBpdCBpcyBhCiAgICAgIGJ1ZmZlciwgdGhpcyBpcyBhIHBvc2l0aW9u IGluIHRoYXQgYnVmZmVyLiAgSW4gYWRkaXRpb24sIHNvbWUKQEAgLTIyMTMsNiArMjI0NywxNiBA QCBzdHJ1Y3QgY29tcG9zaXRpb25faXQKIAogc3RydWN0IGl0CiB7CisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgYm9vbF9iZiB6dl9wIDog MTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAvKiBUaGUgd2luZG93IGluIHdo aWNoIHdlIGl0ZXJhdGUgb3ZlciBjdXJyZW50X2J1ZmZlciAob3IgYSBzdHJpbmcpLiAgKi8KICAg TGlzcF9PYmplY3Qgd2luZG93OwogICBzdHJ1Y3Qgd2luZG93ICp3OwpAQCAtMzI5OCw2ICszMzQy LDE2IEBAIGV4dGVybiB2b2lkIGhhbmRsZV90b29sX2Jhcl9jbGljayAoc3RydWN0IGZyYW1lICos CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCwgaW50LCBib29sLCBpbnQp OwogCiBleHRlcm4gdm9pZCBleHBvc2VfZnJhbWUgKHN0cnVjdCBmcmFtZSAqLCBpbnQsIGludCwg aW50LCBpbnQpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VS U09SUyAqLworCitleHRlcm4gdm9pZCBtY19leHBvc2VfZnJhbWUgKHN0cnVjdCBmcmFtZSAqLCBp bnQsIGludCwgaW50LCBpbnQpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBleHRl cm4gYm9vbCB4X2ludGVyc2VjdF9yZWN0YW5nbGVzIChYUmVjdGFuZ2xlICosIFhSZWN0YW5nbGUg KiwgWFJlY3RhbmdsZSAqKTsKICNlbmRpZgkvKiBIQVZFX1dJTkRPV19TWVNURU0gKi8KIApkaWZm IC0tZ2l0IGEvc3JjL2ZyYW1lLmggYi9zcmMvZnJhbWUuaAppbmRleCBhZDczNzZhLi4zMWQ5NTI3 IDEwMDY0NAotLS0gYS9zcmMvZnJhbWUuaAorKysgYi9zcmMvZnJhbWUuaApAQCAtMjAyLDYgKzIw MiwxNiBAQCBzdHJ1Y3QgZnJhbWUKIAogICAvKiBCZXlvbmQgaGVyZSwgdGhlcmUgc2hvdWxkIGJl IG5vIG1vcmUgTGlzcF9PYmplY3QgY29tcG9uZW50cy4gICovCiAKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgLyogTm9uLW5pbCB3aGVuIHRo ZSBmcmFtZSBpcyBpbiB0aGUgcHJvY2VzcyBvZiBiZWluZyB1cGRhdGVkLiAqLworICBzdHJ1Y3Qg ZnJhbWUgKm1jX3VwZGF0aW5nX2ZyYW1lOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIC8qIENhY2hlIG9mIHJlYWxpemVkIGZhY2VzLiAgKi8KICAgc3RydWN0IGZhY2VfY2FjaGUg KmZhY2VfY2FjaGU7CiAKZGlmZiAtLWdpdCBhL3NyYy9mcmluZ2UuYyBiL3NyYy9mcmluZ2UuYwpp bmRleCBhMTAxNmFkLi5kYjg1NTA4IDEwMDY0NAotLS0gYS9zcmMvZnJpbmdlLmMKKysrIGIvc3Jj L2ZyaW5nZS5jCkBAIC00MzMsNiArNDMzLDQwMiBAQCBzdGF0aWMgdW5zaWduZWQgc2hvcnQgZW1w dHlfbGluZV9iaXRzW10gPSB7CiAgIDB4MDAsIDB4M2MsIDB4MDAsIDB4MDAsIDB4M2MsIDB4MDAs IDB4MDAsIDB4M2MsIDB4MDB9OwogCiAKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogYmVn aW4gTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBgKy1mcmluZ2UtaGVscGVyLWRlY2ltYWwnIGRl ZmluZWQgaW4gYGNyb3NzaGFpcnMuZWxgICovCisKKy8qIDI0CisgICAgKCstZnJpbmdlLWhlbHBl ci1oZXhhZGVjaW1hbAorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIgorICAgICAg InguLi4uLi4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54eC4uIgorICAgICAgIngu Li4ueHguIgorICAgICAgIngueHh4eHh4IgorICAgICAgIngueHh4eHh4IgorICAgICAgInguLi4u eHguIgorICAgICAgInguLi54eC4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi4uLi4u IgorICAgICAgInguLi4uLi4uIgorICAgICAgInguLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweDgwLCAw eDgwLCAweDgwLCAweDk4LCAweDhjLCAweDg2LCAweGJmLAorICAweGJmLCAweDg2LCAweDhjLCAw eDk4LCAweDgwLCAweDgwLCAweDgwfTsKKworLyogMjUKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLnh4LngiCisgICAgICAieC4uLi54 eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC54eHh4eHgiCisgICAgICAieC4uLi54eHgi CisgICAgICAieC4uLnh4LngiCisgICAgICAieC4ueHguLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93X2JpdHNbXSA9eworICAweGZmLCAw eDgxLCAweDgxLCAweDk5LCAweDhkLCAweDg3LCAweGJmLAorICAweGJmLCAweDg3LCAweDhkLCAw eDk5LCAweDgxLCAweDgxLCAweGZmfTsKKworLyogMjYKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhl eGFkZWNpbWFsCisgICAgICAieHh4eHh4eHgiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4u Li4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4u LngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngi CisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisgICAgICAieC4uLi4uLngiCisg ICAgICAieC4uLi4uLngiCisgICAgICAieHh4eHh4eHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBz aG9ydCBtY19ob2xsb3dfcmVjdGFuZ2xlX2JpdHNbXSA9eworICAweGZmLCAweDgxLCAweDgxLCAw eDgxLCAweDgxLCAweDgxLCAweDgxLAorICAweDgxLCAweDgxLCAweDgxLCAweDgxLCAweDgxLCAw eDgxLCAweGZmfTsKKworLyogMjcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisg ICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAg ICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAi eC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4u Li4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4uLi4iCisgICAgICAieC4uLi4u Li4iCisgICAgICAieC4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY192ZXJ0 aWNhbF9iYXJfYml0c1tdID17CisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAs IDB4ODAsCisgIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODAsIDB4ODB9OworCisv KiAyOAorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAgICAgICJ4eC4uLi4uLiIK KyAgICAgICJ4eC4uLi4uLiIKKyAgICAgICIgeHguLi4uLiIKKyAgICAgICIueHguLi4uLiIKKyAg ICAgICIuLnh4Li4uLiIKKyAgICAgICIuLnh4Li4uLiIKKyAgICAgICIuLi54eC4uLiIKKyAgICAg ICIuLi54eC4uLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIuLi4ueHguLiIKKyAgICAgICIu Li4uLnh4LiIKKyAgICAgICIuLi4uLnh4LiIKKyAgICAgICIuLi4uLi54eCIKKyAgICAgICIuLi4u Li54eCIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX2JhY2tzbGFzaF9iaXRzW10gPXsK KyAgMHhjMCwgMHhjMCwgMHhlMCwgMHg2MCwgMHgzMCwgMHgzMCwgMHgxOCwgMHgxOCwgMHhjLCAw eGMsIDB4NiwgMHg2LCAweDMsIDB4M307CisKKy8qIDI5CisgICAgKCstZnJpbmdlLWhlbHBlci1o ZXhhZGVjaW1hbAorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4Li4uLi4uIgorICAgICAgInh4 eC4uLi4uIgorICAgICAgInh4eC4uLi4uIgorICAgICAgIngueHguLi4uIgorICAgICAgIngueHgu Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLnh4Li4uIgorICAgICAgInguLi54eC4u IgorICAgICAgInguLi54eC4uIgorICAgICAgInguLi4ueHguIgorICAgICAgInguLi4ueHguIgor ICAgICAgInguLi4uLnh4IgorICAgICAgInguLi4uLnh4IikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaF9iaXRzW10gPXsKKyAgMHhjMCwgMHhjMCwg MHhlMCwgMHhlMCwgMHhiMCwgMHhiMCwgMHg5OCwKKyAgMHg5OCwgMHg4YywgMHg4YywgMHg4Niwg MHg4NiwgMHg4MywgMHg4M307CisKKy8qIDMwCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIi54eHh4eHguIgorICAgICAgInh4eHgueC4uIgorICAgICAgInh4eHgueC4u IgorICAgICAgInh4eHgueC4uIgorICAgICAgIi54eHgueC4uIgorICAgICAgIi4uLngueC4uIgor ICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIgorICAg ICAgIi4uLngueC4uIgorICAgICAgIi4uLngueC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hv cnQgbWNfcGlsY3Jvd19iaXRzW10gPXsKKyAgMHg3ZSwgMHhmNCwgMHhmNCwgMHhmNCwgMHg3NCwg MHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNCwgMHgxNH07CisKKy8qIDMxCisgICAgKCstZnJp bmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4ueHh4eC4uIgorICAgICAgIi54eHh4eHgu IgorICAgICAgInguLnh4Li54IgorICAgICAgInguLnh4Li54IgorICAgICAgInh4eHh4eHh4Igor ICAgICAgInh4Li4uLnh4IgorICAgICAgInh4eC4ueHh4IgorICAgICAgIi54eHh4eHguIgorICAg ICAgIi4ueHh4eC4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc21pbGV5X2ZhY2Vf Yml0c1tdID17CisgIDB4M2MsIDB4N2UsIDB4OTksIDB4OTksIDB4ZmYsIDB4YzMsIDB4ZTcsIDB4 N2UsIDB4M2N9OworCisvKiAzMgorICAgICgrLWZyaW5nZS1oZWxwZXItaGV4YWRlY2ltYWwKKyAg ICAgICIuLnguLi4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAg ICIuLi4uLnguLiIKKyAgICAgICIuLi4ueC4uLiIKKyAgICAgICIuLi54Li4uLiIKKyAgICAgICIu LnguLi4uLiIpCisqLworc3RhdGljIHVuc2lnbmVkIHNob3J0IG1jX3NpbmdsZV9hbmdsZV9yaWdo dF9iaXRzW10gPXsKKyAgMHgyMCwgMHgxMCwgMHg4LCAweDQsIDB4OCwgMHgxMCwgMHgyMH07CisK Ky8qIDMzCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4ueC4u IgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC4uLi4uIgor ICAgICAgIi4uLnguLi4uIgorICAgICAgIi4uLi54Li4uIgorICAgICAgIi4uLi4ueC4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0c1tdID17Cisg IDB4NCwgMHg4LCAweDEwLCAweDIwLCAweDEwLCAweDgsIDB4NH07CisKKy8qIDM0CisgICAgKCst ZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgInh4Lnh4Li4uIgorICAgICAgIi54eC54 eC4uIgorICAgICAgIi4ueHgueHguIgorICAgICAgIi4uLnh4Lnh4IgorICAgICAgIi4ueHgueHgu IgorICAgICAgIi54eC54eC4uIgorICAgICAgInh4Lnh4Li4uIikKKyovCitzdGF0aWMgdW5zaWdu ZWQgc2hvcnQgbWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGQ4LCAweDZjLCAw eDM2LCAweDFiLCAweDM2LCAweDZjLCAweGQ4fTsKKworLyogMzUKKyAgICAoKy1mcmluZ2UtaGVs cGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4ueHgueHgiCisgICAgICAiLi54eC54eC4iCisgICAg ICAiLnh4Lnh4Li4iCisgICAgICAieHgueHguLi4iCisgICAgICAiLnh4Lnh4Li4iCisgICAgICAi Li54eC54eC4iCisgICAgICAiLi4ueHgueHgiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBt Y19kb3VibGVfYW5nbGVfbGVmdF9iaXRzW10gPXsKKyAgMHgxYiwgMHgzNiwgMHg2YywgMHhkOCwg MHg2YywgMHgzNiwgMHgxYn07CisKKy8qIDM2CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVj aW1hbAorICAgICAgIngueC54Li4uIgorICAgICAgIi54LngueC4uIgorICAgICAgIi4ueC54Lngu IgorICAgICAgIi4uLngueC54IgorICAgICAgIi4ueC54LnguIgorICAgICAgIi54LngueC4uIgor ICAgICAgIngueC54Li4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2Fu Z2xlX3JpZ2h0X2JpdHNbXSA9eworICAweGE4LCAweDU0LCAweDJhLCAweDE1LCAweDJhLCAweDU0 LCAweGE4fTsKKworLyogMzcKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAg ICAiLi4ueC54LngiCisgICAgICAiLi54LngueC4iCisgICAgICAiLngueC54Li4iCisgICAgICAi eC54LnguLi4iCisgICAgICAiLngueC54Li4iCisgICAgICAiLi54LngueC4iCisgICAgICAiLi4u eC54LngiKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190cmlwbGVfYW5nbGVfbGVmdF9i aXRzW10gPXsKKyAgMHgxNSwgMHgyYSwgMHg1NCwgMHhhOCwgMHg1NCwgMHgyYSwgMHgxNX07CisK Ky8qIDM4CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4u IgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgor ICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAg Ii4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQg bWNfc2luZ2xlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAweDAwLCAw eDEwLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAwLCAweDAwfTsKKworLyogMzkK KyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4uLi4uLi4iCisgICAg ICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAi eC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4u eC4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4u Li4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19zaW5n bGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHg4Miwg MHg0NCwgMHgyOCwgMHgxMCwgMHgwMCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQwCisgICAg KCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4u Li4uLi4uIgorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4u IgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIgor ICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLi4uLi4uIikKKyovCitzdGF0aWMgdW5zaWduZWQg c2hvcnQgbWNfZG91YmxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAweDAwLCAweDAwLCAweDAwLCAw eDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyLCAweDAwLCAweDAwLCAweDAw fTsKKworLyogNDEKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFsCisgICAgICAiLi4u Li4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4u eC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4i CisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisg ICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8K K3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY19kb3VibGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAg MHgwMCwgMHgwMCwgMHgwMCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgx MCwgMHgwMCwgMHgwMCwgMHgwMH07CisKKy8qIDQyCisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhh ZGVjaW1hbAorICAgICAgIi4uLi4uLi4uIgorICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54 Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4u IgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgor ICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4uLnguIgorICAgICAgIi4uLi4uLi4uIikKKyov CitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHNbXSA9eworICAw eDAwLCAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0 LCAweDgyLCAweDAwfTsKKworLyogNDMKKyAgICAoKy1mcmluZ2UtaGVscGVyLWhleGFkZWNpbWFs CisgICAgICAiLi4uLi4uLi4iCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi Li54LnguLi4iCisgICAgICAiLi4ueC4uLi4iCisgICAgICAiLi4uLi4uLi4iKQorKi8KK3N0YXRp YyB1bnNpZ25lZCBzaG9ydCBtY19xdWFkcnVwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHgw MCwgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwg MHgxMCwgMHgwMH07CisKKy8qIDQ0CisgICAgKCstZnJpbmdlLWhlbHBlci1oZXhhZGVjaW1hbAor ICAgICAgIi4uLnguLi4uIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAg ICAgInguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAg InguLnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgIngu LnguLnguIgorICAgICAgIi4ueC54Li4uIgorICAgICAgIi54Li4ueC4uIgorICAgICAgInguLi4u LnguIikKKyovCitzdGF0aWMgdW5zaWduZWQgc2hvcnQgbWNfcXVhZHJ1cGxlX2FuZ2xlX3VwX2Jp dHNbXSA9eworICAweDEwLCAweDI4LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDkyLCAweDI4 LCAweDQ0LCAweDkyLCAweDI4LCAweDQ0LCAweDgyfTsKKworLyogNDUKKyAgICAoKy1mcmluZ2Ut aGVscGVyLWhleGFkZWNpbWFsCisgICAgICAieC4uLi4ueC4iCisgICAgICAiLnguLi54Li4iCisg ICAgICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAg ICAiLi54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAi Li54LnguLi4iCisgICAgICAieC4ueC4ueC4iCisgICAgICAiLnguLi54Li4iCisgICAgICAiLi54 LnguLi4iCisgICAgICAiLi4ueC4uLi4iKQorKi8KK3N0YXRpYyB1bnNpZ25lZCBzaG9ydCBtY190 cmlwbGVfYW5nbGVfZG93bl9iaXRzW10gPXsKKyAgMHg4MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0 NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHg5MiwgMHg0NCwgMHgyOCwgMHgxMH07CisKKy8q IFRPRE86ICBBZGQgdGhlIGZvbGxvd2luZyBiaXRtYXBzOgorICAoZGVmaW5lLWZyaW5nZS1iaXRt YXAgJ2JyZWFrcG9pbnQgIlx4M2NceDdlXHhmZlx4ZmZceGZmXHhmZlx4N2VceDNjIikKKyAgKGRl ZmluZS1mcmluZ2UtYml0bWFwICdob2xsb3ctcmlnaHQtdHJpYW5nbGUgIlx4ZTBceDkwXHg4OFx4 ODRceDg0XHg4OFx4OTBceGUwIikgKi8KKworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8q ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKiAqLworCisKICNkZWZpbmUgQllURVNfUEVSX0JJVE1BUF9ST1cg IChzaXplb2YgKHVuc2lnbmVkIHNob3J0KSkKICNkZWZpbmUgU1RBTkRBUkRfQklUTUFQX0hFSUdI VChiaXRzKSAoc2l6ZW9mIChiaXRzKS9CWVRFU19QRVJfQklUTUFQX1JPVykKICNkZWZpbmUgRlJC SVRTKGJpdHMpICBiaXRzLCBTVEFOREFSRF9CSVRNQVBfSEVJR0hUIChiaXRzKQpAQCAtNDY2LDYg Kzg2Miw1OSBAQCBzdGF0aWMgc3RydWN0IGZyaW5nZV9iaXRtYXAgc3RhbmRhcmRfYml0bWFwc1td ID0KICAgeyBGUkJJVFMgKHZlcnRpY2FsX2Jhcl9iaXRzKSwgICAgICAgOCwgMCwgQUxJR05fQklU TUFQX0NFTlRFUiwgMCB9LAogICB7IEZSQklUUyAoaG9yaXpvbnRhbF9iYXJfYml0cyksICAgICA4 LCAwLCBBTElHTl9CSVRNQVBfQk9UVE9NLCAwIH0sCiAgIHsgRlJCSVRTIChlbXB0eV9saW5lX2Jp dHMpLCAgICAgICAgIDgsIDMsIEFMSUdOX0JJVE1BUF9UT1AsICAgIDAgfSwKKworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAvKiAyNCAqLwor ICB7IEZSQklUUyAobWNfdmVydGljYWxfYmFyX3JpZ2h0X2Fycm93X2JpdHMpLCAgICAgOCwgMCwg QUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAyNSAqLworICB7IEZSQklUUyAobWNfaG9s bG93X3JlY3RhbmdsZV9yaWdodF9hcnJvd19iaXRzKSwgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRF UiwgMCB9LAorICAvKiAyNiAqLworICB7IEZSQklUUyAobWNfaG9sbG93X3JlY3RhbmdsZV9iaXRz KSwgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAyNyAq LworICB7IEZSQklUUyAobWNfdmVydGljYWxfYmFyX2JpdHMpLCAgICAgICAgICAgICAgICAgOCwg MCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAyOCAqLworICB7IEZSQklUUyAobWNf YmFja3NsYXNoX2JpdHMpLCAgICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NF TlRFUiwgMCB9LAorICAvKiAyOSAqLworICB7IEZSQklUUyAobWNfdmVydGljYWxfYmFyX2JhY2tz bGFzaF9iaXRzKSwgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAz MCAqLworICB7IEZSQklUUyAobWNfcGlsY3Jvd19iaXRzKSwgICAgICAgICAgICAgICAgICAgICAg OCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzMSAqLworICB7IEZSQklUUyAo bWNfc21pbGV5X2ZhY2VfYml0cyksICAgICAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQ X0NFTlRFUiwgMCB9LAorICAvKiAzMiAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2FuZ2xlX3Jp Z2h0X2JpdHMpLCAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAv KiAzMyAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2FuZ2xlX2xlZnRfYml0cyksICAgICAgICAg ICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzNCAqLworICB7IEZSQklU UyAobWNfZG91YmxlX2FuZ2xlX3JpZ2h0X2JpdHMpLCAgICAgICAgICAgOCwgMCwgQUxJR05fQklU TUFQX0NFTlRFUiwgMCB9LAorICAvKiAzNSAqLworICB7IEZSQklUUyAobWNfZG91YmxlX2FuZ2xl X2xlZnRfYml0cyksICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAor ICAvKiAzNiAqLworICB7IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX3JpZ2h0X2JpdHMpLCAgICAg ICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzNyAqLworICB7IEZS QklUUyAobWNfdHJpcGxlX2FuZ2xlX2xlZnRfYml0cyksICAgICAgICAgICAgOCwgMCwgQUxJR05f QklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiAzOCAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2Fu Z2xlX3VwX2JpdHMpLCAgICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9 LAorICAvKiAzOSAqLworICB7IEZSQklUUyAobWNfc2luZ2xlX2FuZ2xlX2Rvd25fYml0cyksICAg ICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0MCAqLworICB7 IEZSQklUUyAobWNfZG91YmxlX2FuZ2xlX3VwX2JpdHMpLCAgICAgICAgICAgICAgOCwgMCwgQUxJ R05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0MSAqLworICB7IEZSQklUUyAobWNfZG91Ymxl X2FuZ2xlX2Rvd25fYml0cyksICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwg MCB9LAorICAvKiA0MiAqLworICB7IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX3VwX2JpdHMpLCAg ICAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0MyAqLwor ICB7IEZSQklUUyAobWNfdHJpcGxlX2FuZ2xlX2Rvd25fYml0cyksICAgICAgICAgICAgOCwgMCwg QUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorICAvKiA0NCAqLworICB7IEZSQklUUyAobWNfcXVh ZHJ1cGxlX2FuZ2xlX3VwX2JpdHMpLCAgICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRF UiwgMCB9LAorICAvKiA0NSAqLworICB7IEZSQklUUyAobWNfcXVhZHJ1cGxlX2FuZ2xlX2Rvd25f Yml0cyksICAgICAgICAgOCwgMCwgQUxJR05fQklUTUFQX0NFTlRFUiwgMCB9LAorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiB9OwogCiAjZGVmaW5lIE5PX0ZSSU5HRV9CSVRNQVAgMApA QCAtODI2LDYgKzEyNzUsMjEgQEAgZHJhd19mcmluZ2VfYml0bWFwIChzdHJ1Y3Qgd2luZG93ICp3 LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csIGludCBsZWZ0X3ApCiAKICAgICAgIHN3aXRjaCAody0+ cGh5c19jdXJzb3JfdHlwZSkKIAl7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKKwljYXNlIEZSQU1FRF9CT1hfQ1VSU09SOgorCSAgaWYgKHJv dy0+dmlzaWJsZV9oZWlnaHQgPj0gU1RBTkRBUkRfQklUTUFQX0hFSUdIVCAoaG9sbG93X3JlY3Rh bmdsZV9iaXRzKSkKKwkgICAgY3Vyc29yID0gUWhvbGxvdzsKKwkgIGVsc2UKKwkgICAgY3Vyc29y ID0gUWhvbGxvd19zbWFsbDsKKwkgIGJyZWFrOworCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KworCiAJY2FzZSBIT0xMT1dfQk9YX0NVUlNPUjoKIAkgIGlmIChyb3ctPnZpc2libGVfaGVpZ2h0 ID49IFNUQU5EQVJEX0JJVE1BUF9IRUlHSFQgKGhvbGxvd19yZWN0YW5nbGVfYml0cykpCiAJICAg IGN1cnNvciA9IFFob2xsb3c7CkBAIC0xNzIzLDYgKzIxODcsMTUwIEBAIElmIG5pbCwgYWxzbyBj b250aW51ZSBsaW5lcyB3aGljaCBhcmUgZXhhY3Rse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J1 cGxlLWFuZ2xlLWRvd24iKTsKKyAgVmZyaW5nZV9iaXRtYXBzID0gRmNvbnMgKFFtY19xdWFkcnVw bGVfYW5nbGVfZG93biwgVmZyaW5nZV9iaXRtYXBzKTsKKyAgRnB1dCAoUW1jX3F1YWRydXBsZV9h bmdsZV9kb3duLCBRZnJpbmdlLCBtYWtlX2ZpeG51bSAoNDUpKTsKKyAgLyogKGdldCAnKy1xdWFk cnVwbGUtYW5nbGUtZG93biAnZnJpbmdlKSA9PiA0NSAqLworCisvKiBlbmQgTVVMVElQTEUgQ1VS U09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAvKiBHYXJiYWdlIGNv bGxlY3Rpb24gaG9vayAqLwpkaWZmIC0tZ2l0IGEvc3JjL2tleWJvYXJkLmMgYi9zcmMva2V5Ym9h cmQuYwppbmRleCBiYWYyZjUxLi5hNGY1ODc0IDEwMDY0NAotLS0gYS9zcmMva2V5Ym9hcmQuYwor KysgYi9zcmMva2V5Ym9hcmQuYwpAQCAtMTIzMyw2ICsxMjMzLDgwIEBAIHN0YXRpYyBpbnQgcmVh ZF9rZXlfc2VxdWVuY2UgKExpc3BfT2JqZWN0ICosIExpc3BfT2JqZWN0LAogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgYm9vbCwgYm9vbCwgYm9vbCwgYm9vbCk7CiBzdGF0aWMgdm9pZCBh ZGp1c3RfcG9pbnRfZm9yX3Byb3BlcnR5IChwdHJkaWZmX3QsIGJvb2wpOwogCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCitzdGF0aWMgdm9pZAor bWNfc3dpdGNoZXNfbXVsdGlwbGVfY3Vyc29ycyAoc3RydWN0IHdpbmRvd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c2VfcCkKK3sKKyNpZmRl ZiBHTFlQSF9ERUJVRworICBpZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+Y29u dGVudHMpCisgICAgICAmJiAoIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVs dGlwbGVfY3Vyc29yc19jb25mKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAo dy0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBtY19maWxsX2NvbHVtbikpKSkKKyAgICB7CisgICAgICBMaXNw X09iamVjdCB3aW5kb3c7CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlz cF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7 CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAg ICBmcHJpbnRmIChzdGRlcnIsICJcbm1jX3N3aXRjaGVzX2ZpbGxfY29sdW1uICglcyk6ICAlc1xu IiwKKyAgICAgICAgICAgICAgIHdpbmRvd19jaGFyLCB0cnVlX29yX2ZhbHNlX3AgPyAidHJ1ZSIg OiAiZmFsc2UiKTsKKyAgICB9CisjZW5kaWYKKyAgdy0+bWMuZHJhd19maWxsX2NvbHVtbiA9IHRy dWVfb3JfZmFsc2VfcDsKKyAgdy0+bWMuZXJhc2VfZmlsbF9jb2x1bW4gPSB0cnVlX29yX2ZhbHNl X3A7CisgIGlmICh0cnVlX29yX2ZhbHNlX3ApCisgICAgdy0+bXVzdF9iZV91cGRhdGVkX3AgPSB0 cnVlOworfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiBMaXNwX09iamVjdAogY29t bWFuZF9sb29wXzEgKHZvaWQpCiB7CkBAIC0xNDI4LDYgKzE1MDIsMTYgQEAgY29tbWFuZF9sb29w XzEgKHZvaWQpCiAgICAgICBWcmVhbF90aGlzX2NvbW1hbmQgPSBjbWQ7CiAgICAgICBzYWZlX3J1 bl9ob29rcyAoUXByZV9jb21tYW5kX2hvb2spOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBzdHJ1Y3Qgd2luZG93ICp3ID0gWFdJ TkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgICAgIG1jX3N3aXRjaGVzX211bHRpcGxlX2N1cnNv cnMgKHcsIHRydWUpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBhbHJl YWR5X2FkanVzdGVkID0gMDsKIAogICAgICAgaWYgKE5JTFAgKFZ0aGlzX2NvbW1hbmQpKQpAQCAt MTU3NCw2ICsxNjU4LDE4IEBAIGNvbW1hbmRfbG9vcF8xICh2b2lkKQogICAgICAgaWYgKCFOSUxQ IChLVkFSIChjdXJyZW50X2tib2FyZCwgZGVmaW5pbmdfa2JkX21hY3JvKSkKIAkgICYmIE5JTFAg KEtWQVIgKGN1cnJlbnRfa2JvYXJkLCBWcHJlZml4X2FyZykpKQogCWZpbmFsaXplX2tiZF9tYWNy b19jaGFycyAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgbWNfc3dpdGNoZXNfbXVsdGlwbGVfY3Vyc29ycyAodywgZmFsc2Up OworICAgICAgbWNfc3dpdGNoZXNfY3Jvc3NoYWlycyAodywgZmFsc2UpOworICAgICAgbWNfc3dp dGNoZXNfZmlsbF9jb2x1bW4gKHcsIGZhbHNlKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisKKwogICAgIH0KIH0KIApAQCAtMjQ1Nyw3ICsyNTUzLDE1IEBAIHJlYWRfY2hhciAoaW50IGNv bW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAsCiAJICBpZiAoaGVscF9lY2hvX3Nob3dpbmdfcCAm JiAhRVEgKHNlbGVjdGVkX3dpbmRvdywgbWluaWJ1Zl93aW5kb3cpKQogCSAgICByZWRpc3BsYXlf cHJlc2VydmVfZWNob19hcmVhICg1KTsKIAkgIGVsc2UKLQkgICAgcmVkaXNwbGF5ICgpOworCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAg ICByZWRpc3BsYXkgKDEpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwogCiAJICBpZiAo IWlucHV0X3BlbmRpbmcpCiAJICAgIC8qIE5vcm1hbCBjYXNlOiBubyBpbnB1dCBhcnJpdmVkIGR1 cmluZyByZWRpc3BsYXkuICAqLwpAQCAtMjYzNyw3ICsyNzQxLDE2IEBAIHJlYWRfY2hhciAoaW50 IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAsCiAgICAgewogICAgICAgRmRvX2F1dG9fc2F2 ZSAoYXV0b19zYXZlX25vX21lc3NhZ2UgPyBRdCA6IFFuaWwsIFFuaWwpOwogICAgICAgLyogSG9v a3MgY2FuIGFjdHVhbGx5IGNoYW5nZSBzb21lIGJ1ZmZlcnMgaW4gYXV0byBzYXZlLiAgKi8KLSAg ICAgIHJlZGlzcGxheSAoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJ UExFIENVUlNPUlMgKi8KKworICAgICAgcmVkaXNwbGF5ICgyKTsKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisKKwogICAgIH0KIAogICAvKiBUcnkgcmVhZGluZyB1c2luZyBhbiBYIG1lbnUu CkBAIC0yNzAxLDcgKzI4MTQsMTYgQEAgcmVhZF9jaGFyIChpbnQgY29tbWFuZGZsYWcsIExpc3Bf T2JqZWN0IG1hcCwKIAkgICAgICAmJiAhIENPTlNQIChWdW5yZWFkX2NvbW1hbmRfZXZlbnRzKSkK IAkgICAgewogCSAgICAgIEZkb19hdXRvX3NhdmUgKGF1dG9fc2F2ZV9ub19tZXNzYWdlID8gUXQg OiBRbmlsLCBRbmlsKTsKLQkgICAgICByZWRpc3BsYXkgKCk7CisKKworLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgICAgcmVkaXNwbGF5ICgz KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgICB9CiAJfQogCkBAIC0yODA0 LDcgKzI5MjYsMTUgQEAgcmVhZF9jaGFyIChpbnQgY29tbWFuZGZsYWcsIExpc3BfT2JqZWN0IG1h cCwKICAgICB7CiAgICAgICBpZiAoY29tbWFuZGZsYWcgPj0gMAogCSAgJiYgIWlucHV0X3BlbmRp bmcgJiYgIWRldGVjdF9pbnB1dF9wZW5kaW5nX3J1bl90aW1lcnMgKDApKQotCXJlZGlzcGxheSAo KTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8K KworICAgICAgcmVkaXNwbGF5ICg0KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKIAog ICAgICAgZ290byB3cm9uZ19rYm9hcmQ7CiAgICAgfQpAQCAtMzEwMiw3ICszMjMyLDE1IEBAIHJl YWRfY2hhciAoaW50IGNvbW1hbmRmbGFnLCBMaXNwX09iamVjdCBtYXAsCiAgICAgICAvKiBSZW1v dmUgdGhlIGhlbHAgZnJvbSB0aGUgZnJhbWUuICAqLwogICAgICAgdW5iaW5kX3RvIChjb3VudCwg UW5pbCk7CiAKLSAgICAgIHJlZGlzcGxheSAoKTsKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIHJlZGlzcGxheSAoNSk7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGlmIChFUSAoYywgbWFrZV9maXhudW0gKDA0 MCkpKQogCXsKIAkgIGNhbmNlbF9lY2hvaW5nICgpOwpkaWZmIC0tZ2l0IGEvc3JjL2xpc3AuaCBi L3NyYy9saXNwLmgKaW5kZXggYmRhODQ4NC4uZDNjYTFhYSAxMDA2NDQKLS0tIGEvc3JjL2xpc3Au aAorKysgYi9zcmMvbGlzcC5oCkBAIC0zNTYxLDcgKzM1N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fYmVnaW4KICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCiB7CisKKworLyogKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgZi0+bWNfdXBk YXRpbmdfZnJhbWUgPSBmOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAjaWZkZWYg TlNfSU1QTF9DT0NPQQogICBFbWFjc1ZpZXcgKnZpZXcgPSBGUkFNRV9OU19WSUVXIChmKTsKIApA QCAtMTIwOCw5ICsxMjE4LDE4IEBAIHN0YXRpYyBOU1JlY3QgY29uc3RyYWluX2ZyYW1lX3JlY3Qo TlNSZWN0IGZyYW1lUmVjdCwgYm9vbCBpc0Z1bGxzY3JlZW4pCiAKIC8qICAgaWYgKGYgPT0gTU9V U0VfSExfSU5GTyAoZiktPm1vdXNlX2ZhY2VfbW91c2VfZnJhbWUpICovCiAgIE1PVVNFX0hMX0lO Rk8gKGYpLT5tb3VzZV9mYWNlX2RlZmVyID0gMDsKLX0KIAogCisvKiAqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9 IE5VTEw7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKK30KKwogc3RhdGljIEJPT0wK IG5zX2NsaXBfdG9fcmVjdCAoc3RydWN0IGZyYW1lICpmLCBOU1JlY3QgKnIsIGludCBuKQogLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0KQEAgLTMyMjEsNjUgKzMyNDAsMTc2IEBAIE5vdGUgdGhhdCBDVVJT T1JfV0lEVEggaXMgbWVhbmluZ2Z1bCBvbmx5IGZvciAoaCliYXIgY3Vyc29ycy4KICAgICAgIGgg PSBjdXJzb3JfaGVpZ2h0OwogICAgIH0KIAotICByLm9yaWdpbi54ID0gZngsIHIub3JpZ2luLnkg PSBmeTsKLSAgci5zaXplLmhlaWdodCA9IGg7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIHIub3JpZ2luLnggPSAody0+bWMuZnggPiAwKQor ICAgICAgICAgICAgICAgPyB3LT5tYy5meAorICAgICAgICAgICAgICAgOiBmeDsKKyAgci5vcmln aW4ueSA9ICh3LT5tYy5meSA+IDApCisgICAgICAgICAgICAgICA/IHctPm1jLmZ5CisgICAgICAg ICAgICAgICA6IGZ5OworICByLnNpemUuaGVpZ2h0ID0gKHctPm1jLmggPiAwKQorICAgICAgICAg ICAgICAgICAgPyB3LT5tYy5oCisgICAgICAgICAgICAgICAgICA6IGg7CiAgIHIuc2l6ZS53aWR0 aCA9IHctPnBoeXNfY3Vyc29yX3dpZHRoOwogCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIC8qIFByZXZlbnQgdGhlIGN1cnNvciBmcm9tIGJlaW5nIGRyYXduIG91dHNpZGUgdGhlIHRl eHQgYXJlYS4gICovCiAgIHIgPSBOU0ludGVyc2VjdGlvblJlY3QgKHIsIG5zX3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1VORCAoZmFjZSksIGYpOworCisgIEVYQU1QTEUgT0Yg SE9XIFRPIFBSSU5UIEEgQ09MT1IgVE8gU1RERVJSOgorICBMaXNwX09iamVjdCBmb3JlZ3JvdW5k ID0gZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CisgIExpc3BfT2JqZWN0IGJh Y2tncm91bmQgPSBmYWNlLT5sZmFjZVtMRkFDRV9CQUNLR1JPVU5EX0lOREVYXTsKKyAgZnByaW50 ZiAoc3RkZXJyLCAiXG5mb3JlZ3JvdW5kICglcykgfCBiYWNrZ3JvdW5kICglcylcbiIsCisgICAg ICAgICAgICAgICAgICAgKCFOSUxQIChmb3JlZ3JvdW5kKSA/IFNTREFUQSAoZm9yZWdyb3VuZCkg OiAiTklMUCIpLAorICAgICAgICAgICAgICAgICAgICghTklMUCAoYmFja2dyb3VuZCkgPyBTU0RB VEEgKGJhY2tncm91bmQpIDogIk5JTFAiKSk7CisKKyAgRVhBTVBMRSBPRiBIT1cgVE8gQ1JFQVRF IEEgQ09MT1IgV0lUSCBSR0IvTFNMIGZsb2F0IHZhbHVlczoKKyAgTlNDb2xvciAqbXlfY29sb3Ig PSBbTlNDb2xvciBjb2xvcldpdGhDYWxpYnJhdGVkUmVkOiBzLT53LT5tYy5yZWQKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyZWVuOiBzLT53LT5tYy5n cmVlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJs dWU6IHMtPnctPm1jLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGFscGhhOiAxLjBdOyAqLworCisgIGlmICh3LT5tYy5nbHlwaF9mbGF2b3IgPT0g TUNfR0xZUEgKKyAgICAgIHx8IHctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1MpCisg ICAgW1tOU0NvbG9yIGNvbG9yV2l0aENhbGlicmF0ZWRSZWQ6IHctPm1jLnJlZCBncmVlbjogdy0+ bWMuZ3JlZW4gYmx1ZTogdy0+bWMuYmx1ZSBhbHBoYTogMS4wXSBzZXRdOworICAgIGVsc2UKKyAg ICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKGYpIHNldF07CisKKyAgaWYgKGN1cnNvcl90eXBlID09 IEZSQU1FRF9CT1hfQ1VSU09SKQorICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNv bnRlbnRzOworICAgICAgQ0hFQ0tfQlVGRkVSIChidWYpOworICAgICAgc3RydWN0IGJ1ZmZlciAq YiA9IFhCVUZGRVIgKGJ1Zik7CisgICAgICBib29sIHJlZ2lvbl9hY3RpdmVfcCA9ICghTklMUCAo VnRyYW5zaWVudF9tYXJrX21vZGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAh TklMUCAoQlZBUiAoYiwgbWFya19hY3RpdmUpKSk7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2Jl Z2lubmluZyA9IChyZWdpb25fYWN0aXZlX3ApID8gWEZJWE5VTSAoRnJlZ2lvbl9iZWdpbm5pbmcg KCkpIDogLTE7CisgICAgICBwdHJkaWZmX3QgcmVnaW9uX2VuZCA9IChyZWdpb25fYWN0aXZlX3Ap ID8gWEZJWE5VTSAoRnJlZ2lvbl9lbmQgKCkpIDogLTE7CisgICAgICBwdHJkaWZmX3Qgb3BvaW50 X3B0ID0gKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBYRklYTlVNIChG bWFya2VyX3Bvc2l0aW9uICh3LT5wb2ludG0pKTsKKyAgICAgIGJvb2wgcmVnaW9uX2luX2JvdW5k c19wID0gKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgb3BvaW50X3B0ID49IHJlZ2lvbl9iZWdpbm5pbmcKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF9wdCA8IHJlZ2lvbl9lbmQpOworICAgICAgaWYgKHJlZ2lvbl9h Y3RpdmVfcAorICAgICAgICAgICYmIHJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICYmIGFj dGl2ZV9wKQogICAgICAgICB7Ci0gICAgICAgIGNhc2UgREVGQVVMVF9DVVJTT1I6Ci0gICAgICAg IGNhc2UgTk9fQ1VSU09SOgotICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIEZJTExFRF9C T1hfQ1VSU09SOgotICAgICAgICAgIE5TUmVjdEZpbGwgKHIpOwotICAgICAgICAgIGJyZWFrOwot ICAgICAgICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgotICAgICAgICAgIE5TUmVjdEZpbGwgKHIp OwotICAgICAgICAgIFtob2xsb3dfY29sb3Igc2V0XTsKLSAgICAgICAgICBOU1JlY3RGaWxsIChO U0luc2V0UmVjdCAociwgMSwgMSkpOwotICAgICAgICAgIFtGUkFNRV9DVVJTT1JfQ09MT1IgKGYp IHNldF07Ci0gICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgSEJBUl9DVVJTT1I6Ci0gICAg ICAgICAgTlNSZWN0RmlsbCAocik7Ci0gICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgQkFS X0NVUlNPUjoKLSAgICAgICAgICBzID0gcjsKLSAgICAgICAgICAvKiBJZiB0aGUgY2hhcmFjdGVy IHVuZGVyIGN1cnNvciBpcyBSMkwsIGRyYXcgdGhlIGJhciBjdXJzb3IKLSAgICAgICAgICAgICBv biB0aGUgcmlnaHQgb2YgaXRzIGdseXBoLCByYXRoZXIgdGhhbiBvbiB0aGUgbGVmdC4gICovCi0g ICAgICAgICAgY3Vyc29yX2dseXBoID0gZ2V0X3BoeXNfY3Vyc29yX2dseX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sLWZha2UtY3Vyc29yLXJlZ2lvbi1mYWNlIiksIHRydWUpOworICAgICAgICAgICAg c3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlID0gRkFDRV9GUk9NX0lE IChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfZmFjZV9pZCk7CisgICAgICAgICAgICBOU0Nv bG9yICpob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfY29sb3IgPSBuc19sb29rdXBfaW5kZXhlZF9j b2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChob2xsb3dfYWN0aXZlX3JlZ2lvbl9vdXRfZmFjZSks IGYpOworICAgICAgICAgICAgaG9sbG93X2NvbG9yID0gaG9sbG93X2FjdGl2ZV9yZWdpb25fb3V0 X2NvbG9yOworICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIGlmICghcmVnaW9uX2FjdGl2ZV9w ICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQg aG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAo IistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICBzdHJ1Y3Qg ZmFjZSAqaG9sbG93X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZl X2ZhY2VfaWQpOworICAgICAgICAgICAgICBOU0NvbG9yICpob2xsb3dfYWN0aXZlX2NvbG9yID0g bnNfbG9va3VwX2luZGV4ZWRfY29sb3IgKE5TX0ZBQ0VfQkFDS0dST1VORCAoaG9sbG93X2FjdGl2 ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgIGhvbGxvd19jb2xvciA9IGhvbGxvd19hY3RpdmVf Y29sb3I7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvKiBUaGUgcmVnaW9uIGlzIF9ub3Rf IHZpc2libGUgaW4gdGhlIGluYWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRoZSBvdmVybGF5IHdpbmRv dyBwcm9wZXJ0eSBpcyB1c2VkLiAqLworICAgICAgICAgICAgZWxzZSBpZiAoIWFjdGl2ZV9wKQor ICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFj dGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1m YWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVj dCBmYWNlICpob2xsb3dfaW5hY3RpdmVfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2lu YWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAgICAgICAgIE5TQ29sb3IgKmhvbGxvd19pbmFjdGl2 ZV9jb2xvciA9IG5zX2xvb2t1cF9pbmRleGVkX2NvbG9yIChOU19GQUNFX0JBQ0tHUk9VTkQgKGhv bGxvd19pbmFjdGl2ZV9mYWNlKSwgZik7CisgICAgICAgICAgICAgICAgaG9sbG93X2NvbG9yID0g aG9sbG93X2luYWN0aXZlX2NvbG9yOworICAgICAgICAgICAgICB9CisgICAgfQorICAgIGVsc2Ug aWYgKGZhY2UgJiYgTlNfRkFDRV9CQUNLR1JPVU5EIChmYWNlKSA9PSBuc19pbmRleF9jb2xvciAo RlJBTUVfQ1VSU09SX0NPTE9SIChmKSwgZikpCisgICAgICB7CisgICAgICAgIFtuc19sb29rdXBf aW5kZXhlZF9jb2xvciAoTlNfRkFDRV9GT1JFR1JPVU5EIChmYWNlKSwgZikgc2V0XTsKKyAgICAg ICAgaG9sbG93X2NvbG9yID0gRlJBTUVfQ1VSU09SX0NPTE9SIChmKTsKKyAgICAgIH0KKyNpZmRl ZiBOU19JTVBMX0NPQ09BCisgIE5TRGlzYWJsZVNjcmVlblVwZGF0ZXMgKCk7CisjZW5kaWYKKyAg c3dpdGNoIChjdXJzb3JfdHlwZSkKKyAgICB7CisgICAgICBjYXNlIERFRkFVTFRfQ1VSU09SOgor ICAgICAgY2FzZSBOT19DVVJTT1I6CisgICAgICAgIGJyZWFrOworICAgICAgY2FzZSBGSUxMRURf Qk9YX0NVUlNPUjoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAgICAgIGJyZWFrOworICAg ICAgY2FzZSBGUkFNRURfQk9YX0NVUlNPUjoKKyAgICAgICAgTlNSZWN0RmlsbCAocik7CisgICAg ICAgIFtob2xsb3dfY29sb3Igc2V0XTsKKyAgICAgICAgTlNSZWN0RmlsbCAoTlNJbnNldFJlY3Qg KHIsIDEsIDEpKTsKKyAgICAgICAgW0ZSQU1FX0NVUlNPUl9DT0xPUiAoZikgc2V0XTsKKyAgICAg ICAgYnJlYWs7CisgICAgICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgorICAgICAgICBOU1JlY3RG aWxsIChyKTsKKyAgICAgICAgW2hvbGxvd19jb2xvciBzZXRdOworICAgICAgICBOU1JlY3RGaWxs IChOU0luc2V0UmVjdCAociwgMSwgMSkpOworICAgICAgICBbRlJBTUVfQ1VSU09SX0NPTE9SIChm KSBzZXRdOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgSEJBUl9DVVJTT1I6CisgICAgICAg IE5TUmVjdEZpbGwgKHIpOworICAgICAgICBicmVhazsKKyAgICAgIGNhc2UgQkFSX0NVUlNPUjoK KyAgICAgICAgcyA9IHI7CisgICAgICAgIC8qIEBsYXdsaXN0IGlzIGZvY3VzaW5nIHRoZSBpbml0 aWFsIGRldmVsb3BtZW50IG9mIGZlYXR1cmUgcmVxdWVzdHMKKyAgICAgICAgIzE3Njg0IGFuZCAj MjI4NzMgb24gTDJSIGxhbmd1YWdlcy4gKi8KKyAgICAgICAgaWYgKHctPm1jLmdseXBoX2ZsYXZv ciAhPSBNQ19HTFlQSAorICAgICAgICAgICAgJiYgdy0+bWMuZ2x5cGhfZmxhdm9yICE9IE1DX0dM WVBITEVTUykKKyAgICAgICAgICB7CisgICAgICAgICAgICAvKiBJZiB0aGUgY2hhcmFjdGVyIHVu ZGVyIGN1cnNvciBpcyBSMkwsIGRyYXcgdGhlIGJhciBjdXJzb3IKKyAgICAgICAgICAgICAgIG9u IHRoZSByaWdodCBvZiBpdHMgZ2x5cGgsIHJhdGhlciB0aGFuIG9uIHRoZSBsZWZ0LiAgKi8KKyAg ICAgICAgICAgIGN1cnNvcl9nbHlwaCA9IGdldF9waHlzX2N1cnNvcl9nbHlwaCAodyk7CisgICAg ICAgICAgICBpZiAoKGN1cnNvcl9nbHlwaC0+cmVzb2x2ZWRfbGV2ZWwgJiAxKSAhPSAwKQorICAg ICAgICAgICAgICBzLm9yaWdpbi54ICs9IGN1cnNvcl9nbHlwaC0+cGl4ZWxfd2lkdGggLSBzLnNp emUud2lkdGg7CisgICAgICAgICAgfQorICAgICAgICBOU1JlY3RGaWxsIChzKTsKKyAgICAgICAg YnJlYWs7CisgICAgfQogCiAgICAgICAvKiBkcmF3IHRoZSBjaGFyYWN0ZXIgdW5kZXIgdGhlIGN1 cnNvciAqLwotICAgICAgaWYgKGN1cnNvcl90eXBlICE9IE5PX0NVUlNPUikKKyAgICAgIGlmIChj dXJzb3JfdHlwZSAhPSBOT19DVVJTT1IKKyAgICAgICAgICAmJiB3LT5tYy5nbHlwaF9mbGF2b3Ig IT0gTUNfR0xZUEhMRVNTKQogICAgICAgICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlw aF9yb3csIERSQVdfQ1VSU09SKTsKIAorLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIG5zX3Jlc2V0X2NsaXBwaW5nIChmKTsKICAg ICB9CisKKyAgLyogMTE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bHlwaF9mbGF2b3Ig PT0gTUNfR0xZUEgKKyAgICAgICAgfHwgcy0+dy0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dMWVBI TEVTUykKKyAgICAgIHsKKyAgICAgICAgTlNDb2xvciAqYm9yZGVyX2NvbG9yID0gW05TQ29sb3Ig Y29sb3JXaXRoQ2FsaWJyYXRlZFJlZDogcy0+dy0+bWMucmVkCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JlZW46IHMtPnctPm1jLmdy ZWVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGJsdWU6IHMtPnctPm1jLmJsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHBoYTogMS4wXTsKKyAgICAgICAgbnNfZHJh d19ib3ggKGJyLCB0aGlja25lc3MsIGJvcmRlcl9jb2xvciwgMSwgMSk7CisgICAgICB9CisgICAg ICBlbHNlCisgICAgICAgIG5zX2RyYXdfYm94IChiciwgdGhpY2tuZXNzLCBGUkFNRV9DVVJTT1Jf Q09MT1IgKHMtPmYpLCAxLCAxKTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAg IH0KIH0KIApAQCAtNDI0NywxMiArNDM5NiwzNyBAQCBvdmVyd3JpdGluZyBjdXJzb3IgKHVzdWFs bHkgd2hlbiBjdXJzb3Igb24gYSB0YWIpLiAgKi8KICAgICAgICAgICAgIG5zX21heWJlX2R1bXBn bHlwaHNfYmFja2dyb3VuZAogICAgICAgICAgICAgICAocywgcy0+Zmlyc3RfZ2x5cGgtPnR5cGUg PT0gQ09NUE9TSVRFX0dMWVBIKTsKIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworICAgICAgICAgIHVuc2lnbmVkIGxvbmcgc2F2ZWRfZmcgPSBO U19GQUNFX0ZPUkVHUk9VTkQgKHMtPmZhY2UpOworCiAgICAgICAgICAgaWYgKHMtPmhsID09IERS QVdfQ1VSU09SICYmIHMtPnctPnBoeXNfY3Vyc29yX3R5cGUgPT0gRklMTEVEX0JPWF9DVVJTT1Ip CiAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdG1wID0gTlNfRkFD RV9CQUNLR1JPVU5EIChzLT5mYWNlKTsKICAgICAgICAgICAgICAgTlNfRkFDRV9CQUNLR1JPVU5E IChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSk7CiAgICAgICAgICAgICAg IE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkgPSB0bXA7CiAgICAgICAgICAgICB9CisgICAg ICAgICAgICBlbHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgICAgICAgICAgICAg ICAgJiYgcy0+dy0+cGh5c19jdXJzb3JfdHlwZSA9PSBGUkFNRURfQk9YX0NVUlNPUgorICAgICAg ICAgICAgICAgICAgICAgJiYgcy0+dy0+bWMuYWN0aXZlX3ApCisgICAgICAgICAgICAgIHsKKyAg ICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9va3Vw X25hbWVkX2ZhY2UgKHMtPncsIHMtPmYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNl IiksIHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2Zh Y2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAg ICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNlKSA9IE5TX0ZBQ0VfRk9SRUdST1VO RCAoaG9sbG93X2FjdGl2ZV9mYWNlKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBl bHNlIGlmIChzLT5obCA9PSBEUkFXX0NVUlNPUgorICAgICAgICAgICAgICAgICAgICAgICAmJiBz LT53LT5waHlzX2N1cnNvcl90eXBlID09IEZSQU1FRF9CT1hfQ1VSU09SCisgICAgICAgICAgICAg ICAgICAgICAgICYmICFzLT53LT5tYy5hY3RpdmVfcCkKKyAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2luYWN0aXZlX2ZhY2VfaWQgPSBsb29r dXBfbmFtZWRfZmFjZSAocy0+dywgcy0+ZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWlu YWN0aXZlLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9s bG93X2luYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKHMtPmYsIGhvbGxvd19pbmFjdGl2ZV9m YWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgIE5TX0ZBQ0VfRk9SRUdST1VORCAocy0+ZmFjZSkg PSBOU19GQUNFX0ZPUkVHUk9VTkQgKGhvbGxvd19pbmFjdGl2ZV9mYWNlKTsKKyAgICAgICAgICAg ICAgICB9CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKICAgICAgICAgICB7CiAgICAg ICAgICAgICBCT09MIGlzQ29tcG9zaXRlID0gcy0+Zmlyc3RfZ2x5cGgtPnR5cGUgPT0gQ09NUE9T SVRFX0dMWVBIOwpAQCAtNDI3NCwxMiArNDQ0OCwyMiBAQCBvdmVyd3JpdGluZyBjdXJzb3IgKHVz dWFsbHkgd2hlbiBjdXJzb3Igb24gYSB0YWIpLiAgKi8KICAgICAgICAgICAgIG5zX2RyYXdfdGV4 dF9kZWNvcmF0aW9uIChzLCBzLT5mYWNlLCBjb2wsIHMtPndpZHRoLCBzLT54KTsKICAgICAgICAg ICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKICAgICAgICAgICBpZiAocy0+aGwgPT0gRFJBV19DVVJTT1IgJiYgcy0+dy0+cGh5c19jdXJz b3JfdHlwZSA9PSBGSUxMRURfQk9YX0NVUlNPUikKICAgICAgICAgICAgIHsKICAgICAgICAgICAg ICAgdW5zaWduZWQgbG9uZyB0bXAgPSBOU19GQUNFX0JBQ0tHUk9VTkQgKHMtPmZhY2UpOwogICAg ICAgICAgICAgICBOU19GQUNFX0JBQ0tHUk9VTkQgKHMtPmZhY2UpID0gTlNfRkFDRV9GT1JFR1JP VU5EIChzLT5mYWNlKTsKICAgICAgICAgICAgICAgTlNfRkFDRV9GT1JFR1JPVU5EIChzLT5mYWNl KSA9IHRtcDsKICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKHMtPmhsID09IERS QVdfQ1VSU09SCisgICAgICAgICAgICAgICAgICAgICAmJiBzLT53LT5waHlzX2N1cnNvcl90eXBl ID09IEZSQU1FRF9CT1hfQ1VSU09SKQorICAgICAgICAgICAgICBOU19GQUNFX0ZPUkVHUk9VTkQg KHMtPmZhY2UpID0gc2F2ZWRfZmc7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKICAg ICAgICAgICBuc19yZXNldF9jbGlwcGluZyAocy0+Zik7CiAgICAgICAgIH0KQEAgLTgxOTMsNiAr ODM3NywxOCBAQCAtICh2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ikpCiAgICAg cmV0dXJuOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09S UyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogICAvKiBSZWdlbmVyYXRlIGRpc3BsYXkgcGFsZXR0ZSBiZWZvcmUgZHJhd2lu ZyBpZiBsaXN0IG9mIHJlcXVlc3RlZAogICAgICBjb2xvcnMgaGFzIGNoYW5nZWQuICovCiAgIGlm IChkaXNwbGF5X2luZm8tPnJlZ2VuX3BhbGV0dGUpCkBAIC03NTQsNiArNzYzLDE2IEBAIHhfdXBk YXRlX2VuZCAoc3RydWN0IGZyYW1lICpmKQogCiAgIC8qIE1vdXNlIGhpZ2hsaWdodCBtYXkgYmUg ZGlzcGxheWVkIGFnYWluLiAgKi8KICAgTU9VU0VfSExfSU5GTyAoZiktPm1vdXNlX2ZhY2VfZGVm ZXIgPSBmYWxzZTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICBmLT5tY191cGRhdGluZ19mcmFtZSA9IE5VTEw7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIH0KIAogCkBAIC05NzMsNiArOTkyLDIwIEBAIHN0YXRpYyB2b2lk IHczMl9kcmF3X2JveF9yZWN0IChzdHJ1Y3QgZ2x5cGhfc3RyaW5nICosIGludCwgaW50LCBpbnQs IGludCwKIHN0YXRpYyB2b2lkCiB4X3NldF9jdXJzb3JfZ2MgKHN0cnVjdCBnbHlwaF9zdHJpbmcg KnMpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JT ICovCisKKyAgaWYgKHMtPnctPm1jLmN1cnNvcl9nY19kZWZhdWx0KQorICAgIHsKKyAgICAgIHMt PmdjID0gcy0+Zi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3JfZ2M7CisgICAgICByZXR1cm47Cisg ICAgfQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgIGlmIChzLT5mb250ID09IEZS QU1FX0ZPTlQgKHMtPmYpCiAgICAgICAmJiBzLT5mYWNlLT5iYWNrZ3JvdW5kID09IEZSQU1FX0JB Q0tHUk9VTkRfUElYRUwgKHMtPmYpCiAgICAgICAmJiBzLT5mYWNlLT5mb3JlZ3JvdW5kID09IEZS QU1FX0ZPUkVHUk9VTkRfUElYRUwgKHMtPmYpCkBAIC01NjkwLDYgKzU3MjMsMjYgQEAgeF9kcmF3 X2hvbGxvd19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdykK IAogICAvKiBDb21wdXRlIGZyYW1lLXJlbGF0aXZlIGNvb3JkaW5hdGVzIGZvciBwaHlzIGN1cnNv ci4gICovCiAgIGdldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCBjdXJzb3JfZ2x5cGgs ICZsZWZ0LCAmdG9wLCAmaCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKy8qIExFR0VORDoKKworLSAgdG9wIHkgPT0gV0lORE9XX1RPX0ZS QU1FX1BJWEVMX1kgKHcsIHJvdy0+eSkKKworLSAgYm90dG9tIHkgPT0gV0lORE9XX1RPX0ZSQU1F X1BJWEVMX1kgKHcsIHJvdy0+eSkgLSByb3ctPmhlaWdodAorCistICBoIG9mIEhPTExPV19CT1hf Q1VSU09SID09IHJvdy0+aGVpZ2h0CisgICBbVGhpcyBhdm9pZHMgYSB2aXNpYmxlIGdhcCBhYm92 ZS9iZWxvdy5dICovCisKKyAgaWYgKHctPm1jLmggPiAwKQorICAgIGggPSByb3ctPmhlaWdodDsK KworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICByZWN0LmxlZnQgPSBsZWZ0OwogICAv KiBXaGVuIG9uIFIyTCBjaGFyYWN0ZXIsIHNob3cgY3Vyc29yIGF0IHRoZSByaWdodCBlZGdlIG9m IHRoZQogICAgICBnbHlwaCwgdW5sZXNzIHRoZSBjdXJzb3IgYm94IGlzIGFzIHdpZGUgYXMgdGhl IGdseXBoIG9yIHdpZGVyCkBAIC01NzUzLDcgKzU4MDYsMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3Ig KHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgaW52aXNpYmxlLiAg VXNlIHRoZSBnbHlwaCdzIGZvcmVncm91bmQgY29sb3IgaW5zdGVhZCBpbiB0aGlzCiAJIGNhc2Us IG9uIHRoZSBhc3N1bXB0aW9uIHRoYXQgdGhlIGdseXBoJ3MgY29sb3JzIGFyZSBjaG9zZW4gc28K IAkgdGhhdCB0aGUgZ2x5cGggaXMgbGVnaWJsZS4gICovCi0gICAgICBpZiAoZmFjZS0+YmFja2dy b3VuZCA9PSBjdXJzb3JfY29sb3IpCisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBN VUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAgIGlmIChmYWNlLT5iYWNrZ3JvdW5kID09IGN1cnNv cl9jb2xvcgorICAgICAgICAgICYmICF3LT5tYy5jdXJzb3JfZ2NfaW52aXNpYmxlX29rYXkpCisK Ky8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAljdXJzb3JfY29sb3IgPSBmYWNlLT5mb3Jl Z3JvdW5kOwogCiAgICAgICB4ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgdy0+ cGh5c19jdXJzb3IueCk7CkBAIC01Nzc0LDYgKzU4MzcsMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3Ig KHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKIAkgIGlmICgoY3Vyc29y X2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAJICAgIHggKz0gY3Vyc29yX2dseXBo LT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyog TVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogQWxpZ24gYWxsIGZha2UgQkFSX0NVUlNPUiBv ZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBgb3BvaW50X3gnLiAqLworICAgIGlmICh3LT5tYy5m eCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor CisKIAkgIHczMl9maWxsX2FyZWEgKGYsIGhkYywgY3Vyc29yX2NvbG9yLCB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ZST01fSUQgKGYsIERFRkFVTFRfRkFDRV9JRCk7 CisgICAgICBMaXNwX09iamVjdCBidWYgPSB3LT5jb250ZW50czsKKyAgICAgIENIRUNLX0JVRkZF UiAoYnVmKTsKKyAgICAgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICAgICAg Ym9vbCByZWdpb25fYWN0aXZlX3AgPSAoIU5JTFAgKFZ0cmFuc2llbnRfbWFya19tb2RlKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKGIsIG1hcmtfYWN0aXZl KSkpOworICAgICAgcHRyZGlmZl90IHJlZ2lvbl9iZWdpbm5pbmcgPSAocmVnaW9uX2FjdGl2ZV9w KSA/IFhGSVhOVU0gKEZyZWdpb25fYmVnaW5uaW5nICgpKSA6IC0xOworICAgICAgcHRyZGlmZl90 IHJlZ2lvbl9lbmQgPSAocmVnaW9uX2FjdGl2ZV9wKSA/IFhGSVhOVU0gKEZyZWdpb25fZW5kICgp KSA6IC0xOworICAgICAgcHRyZGlmZl90IG9wb2ludF9wdCA9ICh3ID09IFhXSU5ET1cgKHNlbGVj dGVkX3dpbmRvdykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBQVAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDogWEZJWE5VTSAoRm1hcmtlcl9wb3NpdGlvbiAody0+cG9pbnRt KSk7CisgICAgICBib29sIHJlZ2lvbl9pbl9ib3VuZHNfcCA9IChyZWdpb25fYWN0aXZlX3AKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2ludF9wdCA+PSByZWdpb25fYmVn aW5uaW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfcHQgPCBy ZWdpb25fZW5kKTsKKyAgICAgIGlmIChnbHlwaC0+dHlwZSAhPSBJTUFHRV9HTFlQSCAmJiB3LT5t Yy5yZWQgPj0gMCAmJiB3LT5tYy5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gICBnY192YWx1ZXMu YmFja2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2UtPmJhY2tncm91bmQ7CisgICAg ICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmIChyZWdpb25fYWN0aXZlX3AKKyAgICAgICAg ICAgICAgICAgICAgICYmICFyZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAgICAgICAgICAgICAg ICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgZW51bSBmYWNl X2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2Ug KHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24tZmFjZSIpLCB0cnVlKTsK KyAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9yZWdpb25fb3V0X2Zh Y2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlX2lkKTsK KyAgICAgICAgICAgICAgICBlbnVtIGZhY2VfaWQgaG9sbG93X2FjdGl2ZV9mYWNlX2lkID0gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1mYWNlIiks IHRydWUpOworICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZlX2ZhY2Ug PSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAg ICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZvcmVncm91bmQ7 CisgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfYWN0aXZlX3Jl Z2lvbl9vdXRfZmFjZS0+Zm9yZWdyb3VuZDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICBlbHNlIGlmICghcmVnaW9uX2FjdGl2ZV9wICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQg PSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWZh Y2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93X2FjdGl2 ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAg ICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2ZhY2UtPmZv cmVncm91bmQ7CisgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhvbGxv d19hY3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICAgICAgLyogVGhlIHJlZ2lvbiBpcyBfbm90XyB2aXNpYmxlIGluIHRoZSBpbmFjdGl2ZSB3aW5k b3cgYmVjYXVzZSB0aGUgb3ZlcmxheSB3aW5kb3cgcHJvcGVydHkgaXMgdXNlZC4gKi8KKyAgICAg ICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICB7CisgICAg ICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCA9IGxv b2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3Rp dmUtZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxv d19pbmFjdGl2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B4X2RyYXdfaG9sbG93X2N1cnNv ciAodywgZ2x5cGhfcm93KTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9w aXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlm IChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCAmJiB3LT5tYy5yZWQgPj0gMCAmJiB3LT5tYy5i bHVlID49IDAgJiYgdy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsJy4g ICovCisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IGNvbG9y X3BpeGVsOworICAgICAgICAgICAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jvdyk7 CisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9IG9yaWdpbmFs X2N1cnNvcl9waXhlbDsKKyAgICAgICAgICB9CisgICAgICAgICAgZWxzZQorICAgICAgICAgICAg eworICAgICAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLncz Mi0+Y3Vyc29yX2djJyBieSBib3Jyb3dpbmcgdGhlCisgICAgICAgICAgICAgIGZ1bmN0aW9uYWxp dHkgb2YgYHhfbWFrZV9nYycgaW4gdzMyZm5zLmMuICAqLworICAgICAgICAgICAgICBpZiAocmVn aW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiByZWdpb25faW5fYm91bmRzX3AKKyAg ICAgICAgICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlX2lkID0gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24t ZmFjZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0 aXZlX3JlZ2lvbl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9m YWNlX2lkKTsKKyAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2Zh Y2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vy c29yLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9sbG93 X2FjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOwor ICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmZvcmVncm91bmQgPSBob2xsb3dfYWN0aXZlX2Zh Y2UtPmZvcmVncm91bmQ7CisgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9 IGhvbGxvd19hY3RpdmVfcmVnaW9uX2ZhY2UtPmJhY2tncm91bmQ7CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKHJlZ2lvbl9hY3RpdmVfcAorICAgICAgICAgICAg ICAgICAgICAgICAgICYmICFyZWdpb25faW5fYm91bmRzX3AKKyAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg ICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlX2lkID0gbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24tZmFj ZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3Rp dmVfcmVnaW9uX291dF9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX3JlZ2lv bl9vdXRfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3df YWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFs LWZha2UtY3Vyc29yLWZhY2UiKSwgdHJ1ZSk7CisgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBm YWNlICpob2xsb3dfYWN0aXZlX2ZhY2UgPSBGQUNFX0ZST01fSUQgKGYsIGhvbGxvd19hY3RpdmVf ZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgIGdjX3ZhbHVlcy5mb3JlZ3JvdW5kID0gaG9s bG93X2FjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOworICAgICAgICAgICAgICAgICAgICBnY192YWx1 ZXMuYmFja2dyb3VuZCA9IGhvbGxvd19hY3RpdmVfcmVnaW9uX291dF9mYWNlLT5mb3JlZ3JvdW5k OworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIXJlZ2lv bl9hY3RpdmVfcCAmJiBhY3RpdmVfcCkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQgPSBsb29rdXBf bmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWZhY2UiKSwgdHJ1 ZSk7CisgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19hY3RpdmVfZmFj ZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9mYWNlX2lkKTsKKyAgICAgICAgICAg ICAgICAgICAgICBnY192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9y ZWdyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICBnY192YWx1ZXMuYmFja2dyb3VuZCA9IGhv bGxvd19hY3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICAvKiBUaGUgcmVnaW9uIGlzIF9ub3RfIHZpc2libGUgaW4gdGhlIGlu YWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRoZSBvdmVybGF5IHdpbmRvdyBwcm9wZXJ0eSBpcyB1c2Vk LiAqLworICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxv d19pbmFjdGl2ZV9mYWNlX2lkID0gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIist cmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAg ICAgICAgICAgc3RydWN0IGZhY2UgKmhvbGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lE IChmLCBob2xsb3dfaW5hY3RpdmVfZmFjZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBn Y192YWx1ZXMuZm9yZWdyb3VuZCA9IGhvbGxvd19pbmFjdGl2ZV9mYWNlLT5mb3JlZ3JvdW5kOwor ICAgICAgICAgICAgICAgICAgICAgICAgZ2NfdmFsdWVzLmJhY2tncm91bmQgPSBob2xsb3dfaW5h Y3RpdmVfZmFjZS0+YmFja2dyb3VuZDsKKyAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gWENyZWF0ZUdDIChOVUxMLCBG UkFNRV9XMzJfV0lORE9XIChmKSwgbWFzaywgJmdjX3ZhbHVlcyk7CisgICAgICAgICAgICAgIGJs b2NrX2lucHV0ICgpOworICAgICAgICAgICAgICAvKiBGb3JjZSBgeF9zZXRfY3Vyc29yX2djJyB0 byB1c2UgYHMtPmYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djJy4gICovCisgICAgICAgICAg ICAgIHctPm1jLmN1cnNvcl9nY19kZWZhdWx0ID0gdHJ1ZTsKKyAgICAgICAgICAgICAgZHJhd19w aHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFXX0NVUlNPUik7CisgICAgICAgICAg ICAgIHctPm1jLmN1cnNvcl9nY19kZWZhdWx0ID0gZmFsc2U7CisgICAgICAgICAgICAgIGYtPm91 dHB1dF9kYXRhLnczMi0+Y3Vyc29yX2djID0gb3JpZ2luYWxfY3Vyc29yX2djOworICAgICAgICAg ICAgICB1bmJsb2NrX2lucHV0ICgpOworICAgICAgICAgICAgICB4X2RyYXdfaG9sbG93X2N1cnNv ciAodywgZ2x5cGhfcm93KTsKKyAgICAgICAgICAgIH0KKyAgICAgIGJyZWFrOworICAgIH0KKyAg ICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgorICAgIHsKKyAgICAgIGlmICh3LT5tYy5yZWQgPj0g MCAmJiB3LT5tYy5ibHVlID49IDAgJiYgdy0+bWMuZ3JlZW4gPj0gMCkKKyAgICAgICAgeworICAg ICAgICAgIC8qIFRlbXBvcmFyaWx5IGhpamFjayBgZi0+b3V0cHV0X2RhdGEudzMyLT5jdXJzb3Jf cGl4ZWwnLiAgKi8KKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1cnNvcl9waXhlbCA9 IGNvbG9yX3BpeGVsOworICAgICAgICAgIHhfZHJhd19ob2xsb3dfY3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lOworICAg ICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29y X3BpeGVsOworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1 cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEJBUl9DVVJTT1IpOworICAgICAgYnJl YWs7CisgICAgfQorICAgIGNhc2UgSEJBUl9DVVJTT1I6CisgICAgeworICAgICAgaWYgKHctPm1j LnJlZCA+PSAwICYmIHctPm1jLmJsdWUgPj0gMCAmJiB3LT5tYy5ncmVlbiA+PSAwKQorICAgICAg ICB7CisgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS53MzIt PmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLnczMi0+Y3Vyc29y X3BpeGVsID0gY29sb3JfcGl4ZWw7CisgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJs ZV9va2F5ID0gdHJ1ZTsKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93 LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3JfZ2Nf aW52aXNpYmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS53MzItPmN1 cnNvcl9waXhlbCA9IG9yaWdpbmFsX2N1cnNvcl9waXhlbDsKKyAgICAgICAgfQorICAgICAgICBl bHNlCisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dp ZHRoLCBIQkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBOT19DVVJT T1I6CisgICAgICB3LT5waHlzX2N1cnNvcl93aWR0aCA9IDA7CisgICAgICBicmVhazsKKyAgICBk ZWZhdWx0OgorICAgICAgZW1hY3NfYWJvcnQgKCk7CisgIH0KIAotCWNhc2UgSEJBUl9DVVJTT1I6 Ci0JICB4X2RyYXdfYmFyX2N1cnNvciAodywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJf Q1VSU09SKTsKLQkgIGJyZWFrOworLyogZW5kIE1VTFRJUExFIENVUlNPUlMgKi8KKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLwogCi0JY2FzZSBOT19DVVJTT1I6Ci0JICB3LT5waHlzX2N1cnNvcl93 aWR0aCA9IDA7Ci0JICBicmVhazsKIAotCWRlZmF1bHQ6Ci0JICBlbWFjc19hYm9ydCAoKTsKLQl9 CiAgICAgfQogfQogCmRpZmYgLS1naXQgYS9zcmMvd2luZG93LmggYi9zcmMvd2luZG93LmgKaW5k ZXggNGJiNjI5My4uYWZhNGZkMyAxMDA2NDQKLS0tIGEvc3JjL3dpbmRvdy5oCisrKyBiL3NyYy93 aW5kb3cuaApAQCAtODgsNiArODgsNjggQEAgZGlzcGxheSB0aGUgbWVudSBiYXIgb3IgdGhlIHRv b2wgYmFyICh3aGVuIEVtYWNzIHVzZXMgdG9vbGtpdHMgdGhhdAogZG9uJ3QgZGlzcGxheSB0aGVp ciBvd24gbWVudSBiYXIgYW5kIHRvb2wgYmFyKSBvciBhIHRvb2x0aXAgaW4gYQogdG9vbHRpcCBm cmFtZSAod2hlbiB0b29sdGlwcyBhcmUgbm90IGRpc3BsYXkgYnkgdGhlIHRvb2xraXQpLiAgKi8K IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1VTFRJUExFIENVUlNPUlMg Ki8KKworLyogU3VmZml4ZXMgZm9yIHRoZSB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IGNvbHVtbiBoYXMgbm90IHlldCBi ZWVuIGRyYXduLiAqLworICBib29sX2JmIGRyYXdfZmlsbF9jb2x1bW4gOiAxOworCisgIC8qIFRy dWUgbWVhbnMgdGhlIHZpc2libGUgZmlsbCBjb2x1bW4gaGFzIG5vdCB5ZXQgYmVlbiBlcmFzZWQu ICovCisgIGJvb2xfYmYgZXJhc2VfZmlsbF9jb2x1bW4gOiAxOworCisgIC8qIFRoZSByZWNvcmRl ZCBwaXhlbCB3aWR0aCBvZiB0aGUgbGFzdCBsaW5lIG51bWJlciBkcmF3biBkdXJpbmcgcmVkaXNw bGF5ICovCisgIGludCBsbnVtX3BpeGVsX3dpZHRoOworfTsKKworLyogZW5kIE1VTFRJUExFIENV UlNPUlMgKi8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIHN0cnVjdCBjdXJzb3JfcG9z CiB7CiAgIC8qIFBpeGVsIHBvc2l0aW9uLiAgVGhlc2UgYXJlIGFsd2F5cyB3aW5kb3cgcmVsYXRp dmUuICAqLwpAQCAtMjA3LDYgKzI2OSwyOCBAQCBzdHJ1Y3Qgd2luZG93CiAgICAgLyogVGhlIGhl bHAgZWNobyB0ZXh0IGZvciB0aGlzIHdpbmRvdy4gIFFuaWwgaWYgdGhlcmUncyBub25lLiAgKi8K ICAgICBMaXNwX09iamVjdCBtb2RlX2xpbmVfaGVscF9lY2hvOwogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogVGhlIGNhY2hlIGZv ciBtdWx0aXBsZSBnbHlwaCBjdXJzb3JzLiAgRm9yIGFuIGV4YW1wbGUgb2YgdGhlIHN0cnVjdHVy ZSBvZgorICAgIHRoZSBsaXN0LCBzZWUgdGhlI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ICBUaGUg bWVtYmVyIGN1cnJlbnRfbWF0cml4IG11c3QgYmUgdGhlCiAgICAgICAgZmlyc3Qgbm9uLUxpc3Ag bWVtYmVyLiAgKi8KQEAgLTMwOSw2ICszOTMsMTYgQEAgc3RydWN0IHdpbmRvdwogCiAjaWZkZWYg SEFWRV9XSU5ET1dfU1lTVEVNCiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKyAgICAvKiBUaGUgcHJlZml4IGZvciB3aW5kb3cgcG9pbnRlcnMg cmVsYXRpbmcgdG8gbXVsdGlwbGUgY3Vyc29ycy4gICovCisgICAgc3RydWN0IG11bHRpcGxlX2N1 cnNvcnMgbWM7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAvKiBDdXJzb3Ig dHlwZSBvZiBsYXN0IGN1cnNvciBkcmF3biBvbiB0aGUgd2luZG93LiAgKi8KICAgICBlbnVtIHRl eHRfY3Vyc29yX2tpbmRzIHBoeXNfY3Vyc29yX3R5cGU7CiAKQEAgLTQ0Nyw2ICs1NDEsMzEgQEAg WFdJTkRPVyAoTGlzcF9PYmplY3QgYSkKICAgcmV0dXJuIFhVTlRBRyAoYSwgTGlzcF9WZWN0b3Js aWtlLCBzdHJ1Y3Qgd2luZG93KTsKIH0KIAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworSU5MSU5FIHZvaWQKK3dzZXRfbXVsdGlwbGVfY3Vyc29y c19jYWNoZSAoc3RydWN0IHdpbmRvdyAqdywgTGlzcF9PYmplY3QgdmFsKQoreworICB3LT5tdW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bCAodm9pZCk7CisKKworLyogKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKK3N0YXRpYyB2b2lkIHJlZGlzcGxheV9pbnRl cm5hbCAoaW50KTsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogc3RhdGljIHZvaWQg ZWNob19hcmVhX2Rpc3BsYXkgKGJvb2wpOwogc3RhdGljIHZvaWQgYmxvY2tfYnVmZmVyX2ZsaXBz ICh2b2lkKTsKIHN0YXRpYyB2b2lkIHVuYmxvY2tfYnVmZmVyX2ZsaXBzICh2b2lkKTsKQEAgLTky MSw2ICs5MzAsNTE3MiBAQCBzdGF0aWMgdm9pZCBzaG93X21vdXNlX2ZhY2UgKE1vdXNlX0hMSW5m byAqLCBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2UpOwogc3RhdGljIGJvb2wgY29vcmRzX2luX21vdXNl X2ZhY2VfcCAoc3RydWN0IHdpbmRvdyAqLCBpbnQsIGludCk7CiAKIAorLyogKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqICovCisvKiBiZWdpbiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIE1VTFRJUExFIENV UlNPUlM6ICBFbWFjcyBCdWcgIzIyODczIChmZWF0dXJlIHJlcXVlc3QpCisKKyAgIENST1NTSEFJ UlM6ICBFbWFjcyBCdWcgIzE3Njg0IChmZWF0dXJlIHJlcXVlc3QpCisKKworUEFUQ0ggVkVSU0lP TjogIDAxNC4wMDAgWzA4LzI4LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwMSBbMDkvMDEv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDAyIFswOS8wMi8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMDMgWzA5LzA1LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwNCBbMDkvMDgv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDA1IFswOS8wOS8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMDYgWzA5LzA5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAwNyBbMDkvMTAv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDA4IFswOS8xMC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMDkgWzA5LzExLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxMCBbMDkvMTMv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDExIFswOS8xNC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMTIgWzA5LzE3LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxMyBbMDkvMTgv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDE0IFswOS8xOS8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMTUgWzA5LzIzLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxNiBbMDkvMjQv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDE3IFswOS8yNS8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMTggWzA5LzI2LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAxOSBbMTAvMDEv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDIwIFsxMC8wMi8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMjEgWzEwLzA5LzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAyMiBbMTAvMTAv MjAxOF0KKyAgICAgICAgICAgICAgICAwMTQuMDIzIFsxMC8xMC8yMDE4XQorICAgICAgICAgICAg ICAgIDAxNC4wMjQgWzEwLzEzLzIwMThdCisgICAgICAgICAgICAgICAgMDE0LjAyNSBbMTE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CA9PiBYRklYTkFUCisKKyNpZmRlZiBHTFlQSF9ERUJVRworICBp ZiAodHJhY2VfcmVkaXNwbGF5X3AgJiYgQlVGRkVSUCAody0+Y29udGVudHMpCisgICAgICAmJiAo IU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbXVsdGlwbGVfY3Vyc29yc19jb25m KSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9z c2hhaXJzKSkKKyAgICAgICAgICB8fCAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMp LCBtY19maWxsX2NvbHVtbikpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7Cisg ICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0 cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5k b3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIs ICJcbndpbmRvdyAoJXMpXG4iLCB3aW5kb3dfY2hhcik7CisgICAgfQorI2VuZGlmCisKKyNpZmRl ZiBHTFlQSF9ERUJVRworICBzdHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKHctPmZyYW1lKTsKKyAg aW50IHRlbXBfZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCB3LT5waHlzX2N1 cnNvci54KTsKKyAgaW50IHRlbXBfZnkgPSBXSU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgdy0+ cGh5c19jdXJzb3IueSk7CisgIGVudW0gd2luZG93X3BhcnQgcGFydCA9IE9OX05PVEhJTkc7Cisg IExpc3BfT2JqZWN0IHdpbmRvdyA9IHdpbmRvd19mcm9tX2Nvb3JkaW5hdGVzIChmLCB0ZW1wX2Z4 LCB0ZW1wX2Z5LCAmcGFydCwgZmFsc2UpOworICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0g RnByaW4xX3RvX3N0cmluZyAod2luZG93LCBRbmlsKTsKKyAgZGVidWdfbWV0aG9kX2FkZCAodywg IndpbmRvdyAoJXMpIiwgU1NEQVRBICh3aW5kb3dfc3RyaW5nKSk7CisjZW5kaWYKKworY2hhciAq d19jb250ZW50cyA9IChCVUZGRVJQICh3LT5jb250ZW50cykgJiYgU1RSSU5HUCAoQlZBUiAoWEJV RkZFUiAody0+Y29udGVudHMpLCBuYW1lKSkpCisgICAgICAgICAgICAgICAgICAgPyBTU0RBVEEg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbmFtZSkpCisgICAgICAgICAgICAgICAgICAg OiAibmlsIjsKK2ZwcmludGYgKHN0ZGVyciwgIlxuQnVmZmVyICglcylcbiIsIHdfY29udGVudHMp OworCitzdHJ1Y3QgZmFjZSAqZmFjZSA9IG1jX2xvb2t1cF9mYWNlIChpdCk7CitMaXNwX09iamVj dCBmb3JlZ3JvdW5kID0gZmFjZS0+bGZhY2VbTEZBQ0VfRk9SRUdST1VORF9JTkRFWF07CitMaXNw X09iamVjdCBiYWNrZ3JvdW5kID0gZmFjZS0+bGZhY2VbTEZBQ0VfQkFDS0dST1VORF9JTkRFWF07 CitmcHJpbnRmIChzdGRlcnIsICJcbmZvcmVncm91bmQgKCVzKSB8IGJhY2tncm91bmQgKCVzKVxu IiwKKyAgICAgICAgICAgICAgICAgKCFOSUxQIChmb3JlZ3JvdW5kKSA/IFNTREFUQSAoZm9yZWdy b3VuZCkgOiAiTklMUCIpLAorICAgICAgICAgICAgICAgICAoIU5JTFAgKGJhY2tncm91bmQpID8g U1NEQVRBIChiYWNrZ3JvdW5kKSA6ICJOSUxQIikpOworCitmcHJpbnRmIChzdGRlcnIsICJNeSBs aXNwIG9iamVjdDogICVzXG4iLCBTU0RBVEEgKEZjaGFyX3RvX3N0cmluZyAobWFrZV9maXhudW0g KDEwMSkpKSk7CisKK2ZwcmludGYgKHN0ZGVyciwgInN0cmluZzogJXMgfCBpbnQ6ICVkXG4iLCBT U0RBVEEgKGJ1aWxkX3N0cmluZyAoImZvbyIpKSwgNjkpOworCitpZiAoQlVGRkVSUCAody0+Y29u dGVudHMpICYmIFNUUklOR1AgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbmFtZSkpKQor ICBmcHJpbnRmIChzdGRlcnIsICJuc191cGRhdGVfd2luZG93X2VuZDogICVzXG4iLCBTU0RBVEEg KEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbmFtZSkpKTsKKworQVVUT19TVFJJTkcgKG15 X3N0cmluZ19vbmUsICJUaGlzIGlzIHRoZSB2YWx1ZSBvZiBgbXlfb2JqZWN0X29uZSc6ICAlcyIp OworTGlzcF9PYmplY3QgbXlfb2JqZWN0X29uZSA9IG1ha2VfZmxvYXQgKDAuMSk7CitDQUxMTiAo Rm1lc3NhZ2UsIG15X3N0cmluZ19vbmUsIG15X29iamVjdF9vbmUpOworCitBVVRPX1NUUklORyAo bXlfc3RyaW5nX3R3bywgIlRoaXMgaXMgdGhlIHZhbHVlIG9mIGBteV9vYmplY3RfdHdvJzogICVz Iik7CitMaXNwX09iamVjdCBteV9vYmplY3RfdHdvID0gbWFrZV9maXhudW0gKDc3Nyk7CitDQUxM TiAoRm1lc3NhZ2UsIG15X3N0cmluZ190d28sIG15X29iamVjdF90d28pOworCitXSU5ET1c6ICB3 LT5jb250ZW50cworCitCVUZGRVI6ICBYQlVGRkVSICh3LT5jb250ZW50cykKKworQlVGRkVSIExP Q0FMIFZBUklBQkxFOiAgQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCB2YXJpYWJsZV9uYW1l KQorCitOTyBOQVJST1dJTkc6CisKK0JFRyA9PSBCZWdpbm5pbmcgb2YgQnVmZmVyICh3aW5kb3cg ZGlzcGxheXMgY3VycmVudCBidWZmZXIpCisK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BkbyB0aGlzIGFmdGVyIHNraXBwaW5nCisgICBpbnZpc2libGUgY2hh cmFjdGVycywgc28gdGhhdCB3ZSBwdXQgcG9pbnQgYmVmb3JlIHRoZQorICAgY2hhcmFjdGVyIG9u IHdoaWNoIHRoZSBjdXJzb3Igd2lsbCBhcHBlYXIuICAqLworICAgICAgaWYgKGNvbCA+PSBnb2Fs KQorICBicmVhazsKKyAgICAgIHByZXZfY29sID0gY29sOworICAgICAgeyAvKiBDaGVjayBkaXNw bGF5IHByb3BlcnR5LiAgKi8KKyAgcHRyZGlmZl90IGVuZHA7CisgIGludCB3aWR0aCA9IG1jX2No ZWNrX2Rpc3BsYXlfd2lkdGggKHNjYW4sIGNvbCwgJmVuZHApOworICBpZiAod2lkdGggPj0gMCkK KyAgICB7CisgICAgICBjb2wgKz0gd2lkdGg7CisgICAgICBpZiAoZW5kcCA+IHNjYW4pIC8qIEF2 b2lkIGluZmluaXRlIGxvb3BzIHdpdGggMC13aWR0aCBvdmVybGF5cy4gICovCisgICAgICAgIHsK KyAgICBzY2FuID0gZW5kcDsKKyAgICBzY2FuX2J5dGUgPSBDSEFSX1RPX0JZVEUgKHNjYW4pOwor ICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgfQorICAgICAgfQorICAgICAgLyogQ2hlY2sg Y29tcG9zaXRpb24gc2VxdWVuY2UuICAqLworICAgICAgaWYgKGNtcF9pdC5pZCA+PSAwCisgICAg fHwgKHNjYW4gPT0gY21wX2l0LnN0b3BfcG9zCisgICAgICAgICYmIGNvbXBvc2l0aW9uX3Jlc2Vh dF9pdCAoJmNtcF9pdCwgc2Nhbiwgc2Nhbl9ieXRlLCBlbmQsCisgICAgICAgICAgdywgTlVMTCwg UW5pbCkpKQorICBjb21wb3NpdGlvbl91cGRhdGVfaXQgKCZjbXBfaXQsIHNjYW4sIHNjYW5fYnl0 ZSwgUW5pbCk7CisgICAgICBpZiAoY21wX2l0LmlkID49IDApCisgIHsKKyAgICBzY2FuICs9IGNt cF9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CisgICAgICB7CisgICAgICAgIC8qIFRoaXMg c2hvdWxkIGJlIGhhbmRsZWQgdGhlIHNhbWUgYXMKKyAgICAgbmV4dF9lbGVtZW50X2Zyb21fZGlz cGxheV92ZWN0b3IgZG9lcyBpdC4gICovCisgICAgICAgIExpc3BfT2JqZWN0IGVudHJ5ID0gQVJF RiAoY2hhcnZlYywgaSk7CisgICAgICAgIGlmIChHTFlQSF9DT0RFX1AgKGVudHJ5KSkKKyAgICBj ID0gR0xZUEhfQ09ERV9DSEFSIChlbnRyeSk7CisgICAgICAgIGVsc2UKKyAgICBjID0gJyAnOwor ICAgICAgICBpZiAoYyA9PSAnXG4nKQorICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgaWYgKGMg PT0gJ1xyJyAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwg UXQpKQorICAgIGdvdG8gZW5kbG9vcDsKKyAgICAgICAgaWYgKGMgPT0gJ1x0JykKKyAgICB7Cisg ICAgICBjb2wgKz0gdGFiX3dpZHRoOworICAgICAgY29sID0gY29sIC8gdGFiX3dpZHRoICogdGFi X3dpZHRoOworICAgIH0KKyAgICAgICAgZWxzZQorICAgICsrY29sOworICAgICAgfQorICB9Cisg ICAgICBlbHNlCisgIHsKKyAgICAvKiBUaGUgZGlzcGxheSB0YWJsZSBkb2Vzbid0IGFmZmVjdCB0 aGlzIGNoYXJhY3RlcjsKKyAgICAgICBpdCBkaXNwbGF5cyBhcyBpdHNlbGYuICAqLworICAgIGlm IChjID09ICdcbicpCisgICAgICBnb3RvIGVuZGxvb3A7CisgICAgaWYgKGMgPT0gJ1xyJyAmJiBF USAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9kaXNwbGF5KSwgUXQpKQorICAgICAg Z290byBlbmRsb29wOworICAgIGlmIChjID09ICdcdCcpCisgICAgICB7CisgICAgICAgIGNvbCAr PSB0YWJfd2lkdGg7CisgICAgICAgIGNvbCA9IGNvbCAvIHRhYl93aWR0aCAqIHRhYl93aWR0aDsK KyAgICAgIH0KKyAgICBlbHNlIGlmIChtdWx0aWJ5dGUgJiYgTEVBRElOR19DT0RFX1AgKGMpKQor ICAgICAgeworICAgICAgICAvKiBTdGFydCBvZiBtdWx0aS1ieXRlIGZvcm0uICAqLworICAgICAg ICB1bnNpZ25lZCBjaGFyICpwdHI7CisgICAgICAgIGludCBieXRlcywgd2lkdGg7CisgICAgICAg IHB0ciA9IEJZVEVfUE9TX0FERFIgKHNjYW5fYnl0ZSk7CisgICAgICAgIE1DX01VTFRJQllURV9C WVRFU19XSURUSCAocHRyLCBkcCwgYnl0ZXMsIHdpZHRoKTsKKyAgICAgICAgLyogU3VidHJhY3Qg b25lIHRvIGNvbXBlbnNhdGUgZm9yIHRoZSBpbmNyZW1lbnQKKyAgICAgdGhhdCBpcyBnb2luZyB0 byBoYXBwZW4gYmVsb3cuICAqLworICAgICAgICBzY2FuX2J5dGUgKz0gYnl0ZXMgLSAxOworICAg ICAgICBjb2wgKz0gd2lkdGg7CisgICAgICB9CisgICAgZWxzZSBpZiAoY3RsX2Fycm93ICYmIChj IDwgMDQwIHx8IGMgPT0gMDE3NykpCisgICAgICBjb2wgKz0gMjsKKyAgICBlbHNlIGlmIChjIDwg MDQwIHx8IGMgPj0gMDE3NykKKyAgICAgIGNvbCArPSA0OworICAgIGVsc2UKKyAgICAgIGNvbCsr OworICB9CisgICAgICBzY2FuKys7CisgICAgICBzY2FuX2J5dGUrKzsKKyAgICB9CisgZW5kbG9v cDoKKyAgbGFzdF9rbm93bl9jb2x1bW4gPSBjb2w7CisgIGxhc3Rfa25vd25fY29sdW1uX3BvaW50 ID0gcHQ7CisgIGxhc3Rfa25vd25fY29sdW1uX21vZGlmaWVkID0gTU9ESUZGOworICBpZiAoZ29h bGNvbCkKKyAgICAqZ29hbGNvbCA9IGNvbDsKKyAgaWYgKGVuZHBvcykKKyAgICAqZW5kcG9zID0g c2NhbjsKKyAgaW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HViA+IEdQVCkKKyAg ICBzdG9wID0gQkVHVl9BRERSOworICBlbHNlCisgICAgc3RvcCA9IEdBUF9FTkRfQUREUjsKKyAg Y29sID0gMCwgdGFiX3NlZW4gPSAwLCBwb3N0X3RhYiA9IDA7CisgIHdoaWxlICgxKQorICAgIHsK KyAgICAgIHB0cmRpZmZfdCBpLCBuOworICAgICAgTGlzcF9PYmplY3QgY2hhcnZlYzsKKyAgICAg IGlmIChwdHIgPT0gc3RvcCkKKyAgeworICAgIC8qIFdlIHN0b3BwZWQgZWl0aGVyIGZvciB0aGUg YmVnaW5uaW5nIG9mIHRoZSBidWZmZXIKKyAgICAgICBvciBmb3IgdGhlIGdhcC4gICovCisgICAg aWYgKHB0ciA9PSBCRUdWX0FERFIpCisgICAgICBicmVhazsKKyAgICAvKiBJdCB3YXMgdGhlIGdh cC4gIEp1bXAgYmFjayBvdmVyIGl0LiAgKi8KKyAgICBzdG9wID0gQkVHVl9BRERSOworICAgIHB0 ciA9IEdQVF9BRERSOworICAgIC8qIENoZWNrIHdoZXRoZXIgdGhhdCBicmluZ3MgdXMgdG8gYmVn aW5uaW5nIG9mIGJ1ZmZlci4gICovCisgICAgaWYgKEJFR1YgPj0gR1BUKQorICAgICAgYnJlYWs7 CisgIH0KKyAgICAgIGMgPSAqLS1wdHI7CisgICAgICBpZiAoZHAgJiYgVkVDVE9SUCAoRElTUF9D SEFSX1ZFQ1RPUiAoZHAsIGMpKSkKKyAgeworICAgIGNoYXJ2ZWMgPSBESVNQX0NIQVJfVkVDVE9S IChkcCwgYyk7CisgICAgbiA9IEFTSVpFIChjaGFydmVjKTsKKyAgfQorICAgICAgZWxzZQorICB7 CisgICAgY2hhcnZlYyA9IFFuaWw7CisgICAgbiA9IDE7CisgIH0KKyAgICAgIGZvciAoaSA9IG4g LSAxOyBpID49IDA7IC0taSkKKyAgeworICAgIGlmIChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAg IHsKKyAgICAgICAgLyogVGhpcyBzaG91bGQgYmUgaGFuZGxlZCB0aGUgc2FtZSBhcworICAgICBu ZXh0X2VsZW1lbnRfZnJvbV9kaXNwbGF5X3ZlY3RvciBkb2VzIGl0LiAgKi8KKyAgICAgICAgTGlz cF9PYmplY3QgZW50cnkgPSBBUkVGIChjaGFydmVjLCBpKTsKKyAgICAgICAgaWYgKEdMWVBIX0NP REVfUCAoZW50cnkpKQorICAgIGMgPSBHTFlQSF9DT0RFX0NIQVIgKGVudHJ5KTsKKyAgICAgICAg ZWxzZQorICAgIGMgPSAnICc7CisgICAgICB9CisgICAgaWYgKGMgPj0gMDQwICYmIGMgPCAwMTc3 KQorICAgICAgY29sKys7CisgICAgZWxzZSBpZiAoYyA9PSAnXG4nCisgICAgICAgfHwgKGMgPT0g J1xyJworICAgICAgICAgICAmJiBFUSAoQlZBUiAoY3VycmVudF9idWZmZXIsIHNlbGVjdGl2ZV9k aXNwbGF5KSwgUXQpKSkKKyAgICAgIHsKKyAgICAgICAgcHRyKys7CisgICAgICAgIGdvdG8gc3Rh cnRfb2ZfbGluZV9mb3VuZDsKKyAgICAgIH0KKyAgICBlbHNlIGlmIChjID09ICdcdCcpCisgICAg ICB7CisgICAgICAgIGlmICh0YWJfc2VlbikKKyAgICBjb2wgPSAoKGNvbCArIHRhYl93aWR0aCkg LyB0YWJfd2lkdGgpICogdGFiX3dpZHRoOworICAgICAgICBwb3N0X3RhYiArPSBjb2w7CisgICAg ICAgIGNvbCA9IDA7CisgICAgICAgIHRhYl9zZWVuID0gMTsKKyAgICAgIH0KKyAgICBlbHNlIGlm IChWRUNUT1JQIChjaGFydmVjKSkKKyAgICAgIC8qIFdpdGggYSBkaXNwbGF5IHRhYmxlIGVudHJ5 LCBDIGlzIGRpc3BsYXllZCBhcyBpcywgYW5kCisgICAgICAgICBub3QgZGlzcGxheWVkIGFzIFxO Tk4gb3IgYXMgXk4uICBJZiBDIGlzIGEgc2luZ2xlLWJ5dGUKKyAgICAgICAgIGNoYXJhY3Rlciwg aXQgdGFrZXMgb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mICghc3RyY21wIChzdHIs ICJob2xsb3ciKSkKKyAgICByZXR1cm4gSE9MTE9XX0JPWF9DVVJTT1I7CisgIGlmICghc3RyY21w IChzdHIsICJoYmFyIikpCisgICAgcmV0dXJuIEhCQVJfQ1VSU09SOworICBpZiAoIXN0cmNtcCAo c3RyLCAiYmFyIikpCisgICAgcmV0dXJuIEJBUl9DVVJTT1I7CisgIGlmICghc3RyY21wIChzdHIs ICJsZWZ0LWZyaW5nZS1iaXRtYXAiKSkKKyAgICByZXR1cm4gTEVGVF9GUklOR0VfQklUTUFQOwor ICBpZiAoIXN0cmNtcCAoc3RyLCAicmlnaHQtZnJpbmdlLWJpdG1hcCIpKQorICAgIHJldHVybiBS SUdIVF9GUklOR0VfQklUTUFQOworICBpZiAoIXN0cmNtcCAoc3RyLCAibm8iKSkKKyAgICByZXR1 cm4gTk9fQ1VSU09SOworICByZXR1cm4gLTE7Cit9CisKK3N0YXRpYyBMaXNwX09iamVjdAorbWNf Y3Vyc29yX3R5cGVfdG9fbGlzcCAoaW50IGFyZykKK3sKKyAgc3dpdGNoIChhcmcpCisgICAgewor ICAgIGNhc2UgRklMTEVEX0JPWF9DVVJTT1I6IHJldHVybiBRYm94OworICAgIGNhc2UgRlJBTUVE X0JPWF9DVVJTT1I6IHJldHVybiBRZnJhbWVkOworICAgIGNhc2UgSE9MTE9XX0JPWF9DVVJTT1I6 IHJldHVybiBRaG9sbG93OworICAgIGNhc2UgSEJBUl9DVVJTT1I6IHJldHVybiBRaGJhcjsKKyAg ICBjYXNlIEJBUl9DVVJTT1I6IHJldHVybiBRYmFyOworICAgIGNhc2UgTEVGVF9GUklOR0VfQklU TUFQOiByZXR1cm4gaW50ZXJuICgibGVmdC1mcmluZ2UtYml0bWFwIik7CisgICAgY2FzZSBSSUdI VF9GUklOR0VfQklUTUFQOiByZXR1cm4gaW50ZXJuICgicmlnaHQtZnJpbmdlLWJpdG1hcCIpOwor ICAgIGNhc2UgTk9fQ1VSU09SOgorICAgIGRlZmF1bHQ6IHJldHVybiBpbnRlcm4gKCJubyIpOwor ICAgIH0KK30KKworc3RhdGljIExpc3BfT2JqZWN0CittY19jb2xvcl92ZWN0b3JfY2FsYyAoc3Ry dWN0IHdpbmRvdyAqdywgTGlzcF9PYmplY3QgY29sb3IpCit7CisgIENIRUNLX1NUUklORyAoY29s b3IpOworICBMaXNwX09iamVjdCB0YXJnZXRfZnJhbWUgPSB3LT5mcmFtZTsKKyAgTGlzcF9PYmpl Y3QgY29sb3JfdmFsdWVzOworICBkb3VibGUgdmFsbWF4ID0gWEZJWE5VTSAoWENBUiAoRnh3X2Nv bG9yX3ZhbHVlcyAoYnVpbGRfc3RyaW5nICgiI2ZmZmZmZiIpLCB0YXJnZXRfZnJhbWUpKSk7Cisg IExpc3BfT2JqZWN0IHZsaXN0OworICBwdHJkaWZmX3QgeDsKKyAgaW50IGkgPSAwOworICBMaXNw X09iamVjdCB0ZW1wID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgdmVjdG9yID0gKEZtYWtlX3ZlY3Rv ciAobWFrZV9maXhudW0gKDMpLCBRbmlsKSk7CisgIGlmICghTklMUCAoRm1lbXEgKChGZnJhbWVw ICh0YXJnZXRfZnJhbWUpKSwgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsIGludGVybiAoIngiKSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgaW50ZXJuICgidzMyIiksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVybiAoIm5z IikpKSkpCisgICAgeworICAgICAgY29sb3JfdmFsdWVzID0gKEZ4d19jb2xvcl92YWx1ZXMgKGNv bG9yLCB0YXJnZXRfZnJhbWUpKTsKKyAgICAgIGZvciAodmxpc3QgPSBjb2xvcl92YWx1ZXM7Cisg ICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAg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gICAgICAgICB8fCBmYWNlX2lkID09IE1PREVfTElORV9JTkFDVElWRV9GQUNFX0lEIC8q IFFtb2RlX2xpbmVfaW5hY3RpdmUgKi8KKyAgICAgICAgICB8fCBmYWNlX2lkID09IEhFQURFUl9M SU5FX0ZBQ0VfSUQgLyogUWhlYWRlcl9saW5lICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBU T09MX0JBUl9GQUNFX0lEIC8qIFF0b29sX2JhciAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0g RlJJTkdFX0ZBQ0VfSUQgLyogUWZyaW5nZSAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gU0NS T0xMX0JBUl9GQUNFX0lEIC8qIFFzY3JvbGxfYmFyICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9 PSBCT1JERVJfRkFDRV9JRCAvKiBRYm9yZGVyICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBD VVJTT1JfRkFDRV9JRCAvKiBRY3Vyc29yICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBNT1VT RV9GQUNFX0lEIC8qIFFtb3VzZSAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gTUVOVV9GQUNF X0lEIC8qIFFtZW51ICovCisgICAgICAgICAgfHwgZmFjZV9pZCA9PSBXSU5ET1dfRElWSURFUl9G QUNFX0lEIC8qIFF3aW5kb3dfZGl2aWRlciAqLworICAgICAgICAgIHx8IGZhY2VfaWQgPT0gV0lO RE9XX0RJVklERVJfRklSU1RfUElYRUxfRkFDRV9JRCAvKiBRd2luZG93X2RpdmlkZXJfZmlyc3Rf cGl4ZWwgKi8KKyAgICAgICAgICB8fCBmYWNlX2lkID09IFdJTkRPV19ESVZJREVSX0xBU1RfUElY RUxfRkFDRV9JRCAvKiBRd2luZG93X2RpdmlkZXJfbGFzdF9waXhlbCAqLworICAgICAgICAgIHx8 IGZhY2VfaWQgPT0gVkVSVElDQUxfQk9SREVSX0ZBQ0VfSUQgLyogUXZlc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WEJVRkZFUiAody0+Y29udGVu dHMpLCBmcmluZ2VfaW5kaWNhdG9yX2FsaXN0KSksICFOSUxQIChjbWFwKSkKKyAgICB7CisgICAg ICBibTEgPSBGYXNzcSAoYml0bWFwLCBjbWFwKTsKKyAgICAgIGlmIChDT05TUCAoYm0xKSkKKyAg eworICAgIGlmICgoYm0xID0gWENEUiAoYm0xKSksIE5JTFAgKGJtMSkpCisgICAgICByZXR1cm4g Tk9fRlJJTkdFX0JJVE1BUDsKKyAgICBpZiAoQ09OU1AgKGJtMSkpCisgICAgICB7CisgICAgICAg IGxuMSA9IFhGSVhOVU0gKEZsZW5ndGggKGJtMSkpOworICAgICAgICBpZiAocGFydGlhbF9wKQor ICAgIHsKKyAgICAgIGlmIChsbjEgPiBpeDIpCisgICAgICAgIHsKKyAgICAgICAgICBibSA9IEZu dGggKG1ha2VfZml4bnVtIChpeDIpLCBibTEpOworICAgICAgICAgIGlmICghRVEgKGJtLCBRdCkp CisgICAgICBnb3RvIGZvdW5kOworICAgICAgICB9CisgICAgfQorICAgICAgICBlbHNlCisgICAg eworICAgICAgaWYgKGxuMSA+IGl4MSkKKyAgICAgICAgeworICAgICAgICAgIGJtID0gRm50aCAo bWFrZV9maXhudW0gKGl4MSksIGJtMSk7CisgICAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAg ICAgIGdvdG8gZm91bmQ7CisgICAgICAgIH0KKyAgICB9CisgICAgICB9CisgICAgZWxzZSBpZiAo KGJtID0gYm0xLCAhRVEgKGJtLCBRdCkpKQorICAgICAgZ290byBmb3VuZDsKKyAgfQorICAgIH0K KyAgaWYgKCFFUSAoY21hcCwgQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdlX2luZGljYXRv cl9hbGlzdCkpCisgICAgICAmJiAhTklMUCAoQlZBUiAoJmJ1ZmZlcl9kZWZhdWx0cywgZnJpbmdl X2luZGljYXRvcl9hbGlzdCkpKQorICAgIHsKKyAgICAgIGJtMiA9IEZhc3NxIChiaXRtYXAsIEJW QVIgKCZidWZmZXJfZGVmYXVsdHMsIGZyaW5nZV9pbmRpY2F0b3JfYWxpc3QpKTsKKyAgICAgIGlm IChDT05TUCAoYm0yKSkKKyAgeworICAgIGlmICgoYm0yID0gWENEUiAoYm0yKSksICFOSUxQIChi bTIpKQorICAgICAgeworICAgICAgICBpZiAoQ09OU1AgKGJtMikpCisgICAgeworICAgICAgbG4y ID0gWEZJWE5VTSAoRmxlbmd0aCAoYm0yKSk7CisgICAgICBpZiAocGFydGlhbF9wKQorICAgICAg ICB7CisgICAgICAgICAgaWYgKGxuMiA+IGl4MikKKyAgICAgIHsKKyAgICAgICAgYm0gPSBGbnRo IChtYWtlX2ZpeG51bSAoaXgyKSwgYm0yKTsKKyAgICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAg ICAgICAgICBnb3RvIGZvdW5kOworICAgICAgfQorICAgICAgICB9CisgICAgfQorICAgICAgfQor ICB9CisgICAgfQorICBpZiAobG4xID4gaXgxKQorICAgIHsKKyAgICAgIGJtID0gRm50aCAobWFr ZV9maXhudW0gKGl4MSksIGJtMSk7CisgICAgICBpZiAoIUVRIChibSwgUXQpKQorICBnb3RvIGZv dW5kOworICAgIH0KKyAgaWYgKGxuMiA+IGl4MSkKKyAgICB7CisgICAgICBibSA9IEZudGggKG1h a2VfZml4bnVtIChpeDEpLCBibTIpOworICAgICAgaWYgKCFFUSAoYm0sIFF0KSkKKyAgZ290byBm b3VuZDsKKyAgICAgIHJldHVybiBOT19GUklOR0VfQklUTUFQOworICAgIH0KKyAgZWxzZSBpZiAo KGJtID0gYm0yLCBOSUxQIChibSkpKQorICAgIHJldHVybiBOT19GUklOR0VfQklUTUFQOworIGZv dW5kOgorICByZXR1cm4gbG9va3VwX2ZyaW5nZV9iaXRtYXAgKGJtKTsKK30KKwordm9pZAorbWNf ZXJhc2VfcGh5c19jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGludCBmbGF2b3IpCit7CisgIHN0 cnV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UlNPUjsKK30KKworc3RhdGljIHZvaWQKK21jX2VyYXNl X2dseXBoX2N1cnNvcnMgKHN0cnVjdCB3aW5kb3cgKncsIGludCB4LCBpbnQgeSwgaW50IGhwb3Ms IGludCB2cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgZW51bSB0ZXh0X2N1cnNvcl9raW5k cyBjdXJzb3JfdHlwZSwgaW50IGN1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAg IGludCBmbGF2b3IpCit7CisgIC8qIGBtYXRyaXhfcm93JyBpbiBgZGlzcG5ldy5jYCBjb250YWlu cyB0aGUgZm9sbG93aW5nIHRlc3RzLAorICBlYXNzZXJ0IChtYXRyaXggJiYgbWF0cml4LT5yb3dz KTsKKyAgZWFzc2VydCAocm93ID49IDAgJiYgcm93IDwgbWF0cml4LT5ucm93cyk7ICovCisgIGJv b2wgYmFyZl9jcmFzaF9vbmUgPSAody0+Y3VycmVudF9tYXRyaXggJiYgdy0+Y3VycmVudF9tYXRy aXgtPnJvd3MpID8gZmFsc2UgOiB0cnVlOworICBpZiAoYmFyZl9jcmFzaF9vbmUpCisgICAgcmV0 dXJuOworICBib29sIGJhcmZfY3Jhc2hfdHdvID0gKHZwb3MgPj0gMCAmJiB2cG9zIDwgdy0+Y3Vy cmVudF9tYXRyaXgtPm5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsKKyAgaWYgKGJhcmZfY3Jhc2hfdHdv KQorICAgIHJldHVybjsKKyAgaWYgKHggPCAwCisgICAgICB8fCB5IDwgMAorICAgICAgfHwgaHBv cyA8IDAKKyAgICAgIHx8IHZwb3MgPCAwKQorICAgIHJldHVybjsKKyAgLyogUmVjb3JkIHNvbWUg b2YgdGhlIGN1cnJlbnQgdmFsdWVzIGZvciB0aGUgY3Vyc29yIGFuZCBnbHlwaF9yb3cuICovCisg IGJvb2wgcGh5c19jdXJzb3Jfb25fcCA9IHctPnBoeXNfY3Vyc29yX29uX3A7CisgIHN0cnVjdCBn bHlw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JhcmZfY3Jhc2hfdHdvKQorICAgIHJldHVybjsKKyAgaWYgKHggPCAwCisgICAgICB8fCB5IDwg MAorICAgICAgfHwgaHBvcyA8IDAKKyAgICAgIHx8IHZwb3MgPCAwKQorICAgIHJldHVybjsKKyAg TGlzcF9PYmplY3QgYnVmID0gdy0+Y29udGVudHM7CisgIENIRUNLX0JVRkZFUiAoYnVmKTsKKyAg Ym9vbCBhdXRvX2hzY3JvbGxfbW9kZV9wID0gRVEgKEZidWZmZXJfbG9jYWxfdmFsdWUgKFFhdXRv X2hzY3JvbGxfbW9kZSwgYnVmKSwgUWN1cnJlbnRfbGluZSk7CisgIC8qIEVYQU1QTEU6ICAoc2Ny b2xsLWxlZnQgNSkgKi8KKyAgYm9vbCBoc2NsX2FsbF90ZW1wX3AgPSAody0+c3VzcGVuZF9hdXRv X2hzY3JvbGwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVf cAorICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAg ICAgICAgICAgICAgICAgICAmJiB3LT5taW5faHNjcm9sbCA9PSAwKTsKKyAgLyogRVhBTVBMRTog IEMtdSBDLXggPCBhbmQgZG8gbm90aGluZy4gKi8KKyAgYm9vbCBoc2NsX2FsbF9wZXJtXzBfcCA9 ICh3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYm IGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiB3LT5o c2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xs ID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID09IHct PmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCBkbyBzb21ldGhpbmcgZWxz ZSBiZXNpZGVzIGhvcml6b250YWxseSBzY3JvbGxpbmcgdGhlCisgICAgICAgICAgICAgICBjdXJy ZW50IGxpbmUgZGlmZmVyZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgaXMgX25v dF8gaG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiAqLworICBib29sIGhzY2xfYWxs X3Blcm1fMV9wID0gKCF3LT5zdXNwZW5kX2F1dG9faHNjcm9sbAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmIGF1dG9faHNjcm9sbF9tb2RlX3AKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiB3LT5oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHct Pm1pbl9oc2Nyb2xsID4gMAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9o c2Nyb2xsID09IHctPmhzY3JvbGwpOworICAvKiBFWEFNUExFOiAgQy11IEMteCA8IGFuZCAuLi4K KyAgICAgICAgICAgICAgIEN1cnJlbnQgbGluZSBpcyBfbm90XyBob3Jpem9udGFsbHkgc2Nyb2xs ZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9hbGxfcGVybV8yX3AgPSAoIXctPnN1c3Bl bmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Ny b2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPT0g MAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsID4gMAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICYmIHctPm1pbl9oc2Nyb2xsICE9IHctPmhzY3JvbGwp OworICAvKiBFWEFNUExFOiAgKHNjcm9sbC1sZWZ0IDUpOyBhbmQsIHRoZW4gcHJlc3MgdGhlIGxl ZnQgYXJyb3cga2V5IG9uZSB0aW1lLgorICAgICAgICAgICAgICAgQ3VycmVudCBsaW5lIF9pc18g aG9yaXpvbnRhbGx5IHNjcm9sbGVkIGRpZmZlcmVudGx5LiovCisgIGJvb2wgaHNjbF90ZW1wX3Ag PSAoIXctPnN1c3BlbmRfYXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0 b19oc2Nyb2xsX21vZGVfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAw CisgICAgICAgICAgICAgICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPT0gMCk7CisgIC8qIEVY QU1QTEU6ICBDLXUgQy14IDwgYW5kIGRvIHNvbWV0aGluZyB0aGF0IGNhdXNlcyB0aGUgY3VycmVu dCBsaW5lIHRvIGJlCisgICAgICAgICAgICAgICBob3Jpem9udGFsbHkgc2Nyb2xsZWQgZGlmZmVy ZW50bHkuCisgICAgICAgICAgICAgICBDdXJyZW50IGxpbmUgX2lzXyBob3Jpem9udGFsbHkgc2Ny b2xsZWQgZGlmZmVyZW50bHkuICovCisgIGJvb2wgaHNjbF9wZXJtX3AgPSAoIXctPnN1c3BlbmRf YXV0b19oc2Nyb2xsCisgICAgICAgICAgICAgICAgICAgICAgJiYgYXV0b19oc2Nyb2xsX21vZGVf cAorICAgICAgICAgICAgICAgICAgICAgICYmIHctPmhzY3JvbGwgPiAwCisgICAgICAgICAgICAg ICAgICAgICAgJiYgdy0+bWluX2hzY3JvbGwgPiAwCisgICAgICAgICAgICAgICAgICAgICAgJiYg dy0+bWluX2hzY3JvbGwgIT0gdy0+aHNjcm9sbCk7CisgIHN0cnVjdCBmcmFtZSAqZiA9IFhGUkFN RSAody0+ZnJhbWUpOworICAvKiBSZWNvcmQgc29tZSBvZiB0aGUgY3VycmVudCB2YWx1ZXMgZm9y IHRoZSBjdXJzb3IgYW5kIGdseXBoX3Jvdy4gKi8KKyAgYm9vbCBwaHlzX2N1cnNvcl9vbl9wID0g dy0+cGh5c19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2V0ID0gMDsK KyAgICAgIGRyYXdfZnJpbmdlX2JpdG1hcCAodywgZ2x5cGhfcm93LCB0cnVlKTsKKyAgICB9Cisg ICAgZWxzZSBpZiAoIXJlbW92ZV9wCisgICAgICAgICAgICAgJiYgZmxhdm9yID09IE1DX09WRVJM QVlfQVJST1dfQklUTUFQCisgICAgICAgICAgICAgJiYgKGhzY2xfYWxsX3RlbXBfcAorICAgICAg ICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzBfcAorICAgICAgICAgICAgICAgICB8fCBoc2Ns X2FsbF9wZXJtXzFfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX2FsbF9wZXJtXzJfcAorICAg ICAgICAgICAgICAgICB8fCBoc2NsX3RlbXBfcAorICAgICAgICAgICAgICAgICB8fCBoc2NsX3Bl cm1fcCkpCisgICAgICB7CisgICAgICAgIGVudW0gZmFjZV9pZCBvdmVybGF5X2Fycm93X2ZhY2Vf aWQgPQorICAgICAgICAgICghYWN0aXZlX3AKKyAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhC VUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlyc19pbmFjdGl2ZV93aW5kb3dzKSkpCisgICAg ICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93 LWhzY2wtaW5hY3RpdmUtZmFjZSIpLCB0cnVlKQorICAgICAgICAgIDogKGFjdGl2ZV9wCisgICAg ICAgICAgICAgJiYgbWluaW1hbF9wKQorICAgICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAo dywgZiwgaW50ZXJuICgiKy1vdmVybGF5LWFycm93LWhzY2wtbWluaW1hbC1mYWNlIiksIHRydWUp CisgICAgICAgICAgOiAoYWN0aXZlX3AKKyAgICAgICAgICAgICAmJiAhbWluaW1hbF9wKQorICAg ICAgICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1vd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HN0ZGVyciBt ZXNzYWdlcworICAgICAgICB0byBzZWUgdGhhdCBgZ2x5cGhfcm93LT5vdmVybGF5X2Fycm93X2Jp dG1hcGAgc2F0aXNmaWVzIHRoZSBmaXJzdCBjb25kaXRpb24KKyAgICAgICAgb2YgKHdoaWNoICE9 IE5PX0ZSSU5HRV9CSVRNQVApLiAgQXQgdGhpcyB0aW1lLCBAbGF3bGlzdCBwcmVmZXJzIG5vdCB0 bworICAgICAgICByZWx5IHVwb24gYSBMaXNwIHNldHRpbmcgdXNpbmcgYHNldC1mcmluZ2UtYml0 bWFwLWZhY2UnLiAqLworICAgICAgICBnbHlwaF9yb3ctPmxlZnRfZnJpbmdlX2JpdG1hcCA9IChj dXJzb3JfdHlwZSA9PSBMRUZUX0ZSSU5HRV9CSVRNQVApCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IGZyaW5nZV9iaXRtYXAKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogTk9fRlJJTkdFX0JJVE1BUDsKKyAgICAgICAgZ2x5cGhf cm93LT5sZWZ0X2ZyaW5nZV9vZmZzZXQgPSAwOworICAgICAgICBkcmF3X2ZyaW5nZV9iaXRtYXAg KHcsIGdseXBoX3JvdywgdHJ1ZSk7CisgICAgICB9CisgICAgICBlbHNlIGlmICghcmVtb3ZlX3AK KyAgICAgICAgICAgICAgICYmIChmbGF2b3IgPT0gTUNfSE9MTE9XX1JFQ1RBTkdMRV9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xF CisgICAgICAgICAgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9B UlJPVworICAgICAgICAgICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJUSUNBTF9CQVIKKyAg ICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX0JBQ0tTTEFTSCkp CisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBiaXRtYXBfZmxhdm9yID0gKGZsYXZv ciA9PSBNQ19IT0xMT1dfUkVDVEFOR0xFX1JJR0hUX0FSUk9XKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA/IFFtY19ob2xsb3dfcmVjdGFuZ2xlX3JpZ2h0X2Fycm93Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKGZsYXZvciA9PSBNQ19IT0xM T1dfUkVDVEFOR0xFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8g UW1jX2hvbGxvd19yZWN0YW5nbGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVykKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFFtY192ZXJ0aWNhbF9iYXJfcmlnaHRfYXJy b3cKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoZmxhdm9yID09IE1D X1ZFUlRJQ0FMX0JBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ IFFtY192ZXJ0aWNhbF9iYXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OiAoZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgPyBRbWNfdmVydGljYWxfYmFyX2JhY2tzbGFzaAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7CisgICAgICAgICAgZnJp bmdlX2JpdG1hcCA9IChjdXJzb3JfdHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgICAgICAgICAgICAgICA/IGxvb2t1cF9mcmluZ2VfYml0bWFwIChiaXRtYXBfZmxhdm9y KQorICAgICAgICAgICAgICAgICAgICAgICAgICA6IE5PX0ZSSU5HRV9CSVRNQVA7CisgICAgICAg ICAgZmFjZV9pZCA9IChjdXJzb3JfdHlwZSA9PSBSSUdIVF9GUklOR0VfQklUTUFQKQorICAgICAg ICAgICAgICAgICAgICA/IGxvb2t1cF9uYW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXZlcnRp Y2FsLWJhci1mYWNlIiksIHRydWUpCisgICAgICAgICAgICAgICAgICAgIDogREVGQVVMVF9GQUNF X0lEOworICAgICAgICAgIGdseXBoX3Jvdy0+Y3Vyc29yX2luX2ZyaW5nZV9wID0gZmFsc2U7Cisg ICAgICAgICAgZ2x5cGhfcm93LT5mcmluZ2VfYml0bWFwX3BlcmlvZGljX3AgPSAwOworICAgICAg ICAgIGdseXBoX3Jvdy0+cmlnaHRfZnJpbmdlX2JpdG1hcCA9IGZyaW5nZV9iaXRtYXA7CisgICAg ICAgICAgZ2x5cGhfcm93LT5yaWdodF9mcmluZ2VfZmFjZV9pZCA9IGZhY2VfaWQ7CisgICAgICAg ICAgZ2x5cGhfcm93LT5yaWdodF9mcmluZ2Vfb2Zmc2V0ID0gMDsKKyAgICAgICAgICBkcmF3X2Zy aW5nZV9iaXRtYXAgKHcsIGdseXBoX3JvdywgZmFsc2UpOworICAgICAgICB9CisgICAgICAgIGVs c2UgaWYgKGZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICAgICAgICAgICB8fCBmbGF2b3IgPT0g TUNfR0xZUEhMRVNTKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHctPm1jLmggPSBoOworICAg ICAgICAgICAgdy0+bWMuZnggPSBmeDsKKyAgICAgICAgICAgIHctPm1jLmZ5ID0gZnk7CisgICAg ICAgICAgICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBmbGF2b3I7CisgICAgICAgICAgICB3LT5tYy5y ZWQgPSBYRkxPQVRfREFUQSAoQVJFRiAoY29sb3JfdmVjdG9yLCAwKSk7CisgICAgICAgICAgICB3 LT5tYy5ncmVlbiA9IFhGTE9BVF9EQVRBIChBUkVGIChjb2xvcl92ZWN0b3IsIDEpKTsKKyAgICAg ICAgICAgIHctPm1jLmJsdWUgPSBYRkxPQVRfREFUQSAoQVJFRiAoY29sb3JfdmVjdG9yLCAyKSk7 CisgICAgICAgICAgICB3LT5tYy5wb3NpbnQgPSBwb3NpbnQ7CisgICAgICAgICAgICB3LT5tYy5h Y3RpdmVfcCA9IGFjdGl2ZV9wOworICAgICAgICAgICAgLyogU29tZSBvZiB0aGVzZSB2YWx1ZXMg Y29tZSB0aHJvdWdoIGFzIDEuMDAzOTA2LCB3aGljaCBjYXVzZXMgYSBicmVha2FnZQorICAgICAg ICAgICAgb2YgdGhlIGNvbG9ycyBpbiB0aGF0IG11bHRpcGxpY2F0aW9uIGJ5IHRoZSBiYXNlIHdp bGwgZXhjZWVkIHRoZSBiYXNlLiAqLworICAgICAgICAgICAgaWYgKHctPm1jLnJlZCA+IDEuMCkK KyAgICAgICAgICAgICAgdy0+bWMucmVkID0gMS4wOworICAgICAgICAgICAgaWYgKHctPm1jLmdy ZWVuID4gMS4wKQorICAgICAgICAgICAgICB3LT5tYy5ncmVlbiA9IDEuMDsKKyAgICAgICAgICAg IGlmICh3LT5tYy5ibHVlID4gMS4wKQorICAgICAgICAgICAgICB3LT5tYy5ibHVlID0gMS4wOwor ICAgICAgICAgICAgRlJBTUVfUklGIChmKS0+ZHJhd193aW5kb3dfY3Vyc29yICh3LCBnbHlwaF9y b3csIHgsIHksIGN1cnNvcl90eXBlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBjdXJzb3Jfd2lkdGgsIHRydWUsIGFjdGl2ZV9wKTsKKyAgICAgICAgICAg IHctPm1jLmggPSAtMTsKKyAgICAgICAgICAgIHctPm1jLmZ4ID0gLTE7Cisg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gIG1jX2V4 cG9zZV93aW5kb3dfdHJlZSAoWFdJTkRPVyAody0+Y29udGVudHMpLCByKTsKKyAgICAgICAgZWxz ZQorICAgICAgICAgIG1jX2V4cG9zZV93aW5kb3cgKHcsIHIpOworICAgICAgdyA9IE5JTFAgKHct Pm5leHQpID8gTlVMTCA6IFhXSU5ET1cgKHctPm5leHQpOworICAgIH0KK30KKwordm9pZAorbWNf ZXhwb3NlX2ZyYW1lIChzdHJ1Y3QgZnJhbWUgKmYsIGludCB4LCBpbnQgeSwgaW50IHcsIGludCBo KQoreworICBYUmVjdGFuZ2xlIHI7CisgIGlmIChGUkFNRV9GQUNFX0NBQ0hFIChmKSA9PSBOVUxM CisgICAgICB8fCBGUkFNRV9GQUNFX0NBQ0hFIChmKS0+dXNlZCA8IEJBU0lDX0ZBQ0VfSURfU0VO VElORUwpCisgICAgcmV0dXJuOworICBpZiAodyA9PSAwIHx8IGggPT0gMCkKKyAgICB7CisgICAg ICByLnggPSByLnkgPSAwOworICAgICAgci53aWR0aCA9IEZSQU1FX1RFWFRfV0lEVEggKGYpOwor ICAgICAgci5oZWlnaHQgPSBGUkFNRV9URVhUX0hFSUdIVCAoZik7CisgICAgfQorICAgIGVsc2UK KyAgICAgIHsKKyAgICAgICAgci54ID0geDsKKyAgICAgICAgci55ID0geTsKKyAgICAgICAgci53 aWR0aCA9IHc7CisgICAgICAgIHIuaGVpZ2h0ID0gaDsKKyAgICAgIH0KKyAgVFJBQ0UgKChzdGRl cnIsICJtY19leHBvc2VfZnJhbWUgKCVkLCAlZCwgJWQsICVkKVxuIiwgci54LCByLnksIHIud2lk dGgsIHIuaGVpZ2h0KSk7CisgIG1jX2V4cG9zZV93aW5kb3dfdHJlZSAoWFdJTkRPVyAoZi0+cm9v dF93aW5kb3cpLCAmcik7Cit9CisKKy8qIER1bXAgY29udGVudHMgb2YgZ2x5cGggR0xZUEggdG8g c3RkZXJyLiAgUk9XIGFuZCBBUkVBIGFyZQorICAgdGhlIGdseXBoIHJvdyBhbmQgYXJlYSB3aGVy ZSB0aGUgZ2x5cGggY29tZXMgZnJvbS4gICovCisKK3ZvaWQKK21jX2R1bXBfZ2x5cGggKHN0cnVj dCBnbHlwaF9yb3cgKnJvdywgc3RydWN0IGdseXBoICpnbHlwaCwgaW50IGFyZWEsIGludCByZWxh dGl2ZV94KQoreworICBMaXNwX09iamVjdCBjaGFyYWN0ZXIgPSAoQ0hBUkFDVEVSUCAobWFrZV9m aXhudW0gKGdseXBoLT51LmNoKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgID8gRmNoYXJf dG9fc3RyaW5nIChtYWtlX2ZpeG51bSAoZ2x5cGgtPnUuY2gpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICA6IFFuaWw7CisgIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICB8 fCBnbHlwaC0+dHlwZSA9PSBHTFlQSExFU1NfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAo c3RkZXJyLAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHgl MDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVzXG4iLAorICAgICAgICBn bHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFd ID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAor ICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQSAorICAgICAgICAgPyAnQycKKyAgICAg ICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChCVUZGRVJQIChn bHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAgICAgICAgIDogKFNUUklOR1AgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgt Pm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisgICAgICAgICAgICAgICA6ICctJykpKSwK KyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAg ICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAg ICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnks IGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAg ICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gOSkK KyAgICAgICAgICAgPyAiXFx0IgorICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAg ICAgICAgICYmIGdseXBoLT51LmNoID09IDEwKQorICAgICAgICAgICA/ICJcXG4iCisgICAgICAg ICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIp CisgICAgICAgICAgID8gIlxccyIKKyAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAg ICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAh PSAxMAorICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMzIpCisgICAgICAgICAgID8gU1NE QVRBIChjaGFyYWN0ZXIpCisgICAgICAgICA6ICJcXD8iKSk7CisgICAgfQorICBlbHNlIGlmIChn bHlwaC0+dHlwZSA9PSBTVFJFVENIX0dMWVBIKQorICAgIHsKKyAgICAgIGZwcmludGYgKHN0ZGVy ciwKKyAgICAgICAgIiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAl NGQgJTEuMWQlMS4xZCAlNWQgJTRkICAlM2QgICUzZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGgg LSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAw KSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAg ICAgJ1MnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDogKFNUUklOR1AgKGdseXBo LT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDogKE5JTFAgKGdseXBoLT5v YmplY3QpCisgICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBn bHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwK KyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2Jv eF9saW5lX3AsCisgICAgICAgIGdseXBoLT54LCBnbHlwaC0+eSwgZ2x5cGgtPmhwb3MsIGdseXBo LT52cG9zLCBnbHlwaC0+enZfcCA/ICJaViIgOiAiLS0iLAorICAgICAgICAiXFxTIik7CisgICAg fQorICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKKyAgICB7CisgICAgICBm cHJpbnRmIChzdGRlcnIsCisgICAgICAgICIgJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVj ICUzZCAweCUwNnggJTRkICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2QgJXMgJWNcbiIsCisg ICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgKChyb3ctPnVz ZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisgICAgICAgIHJlbGF0 aXZlX3gsCisgICAgICAgICdJJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3MsCisgICAgICAgIChC VUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnQicKKyAgICAgICAgICA6IChT VFJJTkdQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICA6IChO SUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICA6ICctJykp KSwKKyAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRoLAorICAgICAgICAodW5zaWduZWQgaW50KSBn bHlwaC0+dS5pbWdfaWQsCisgICAgICAgIGdseXBoLT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+ bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAg ICAgZ2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56 dl9wID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisgICAgfQorICBlbHNlIGlmIChnbHlw aC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpCisgICAgeworICAgICAgZnByaW50ZiAoc3RkZXJy LAorICAgICAgICAiICU1InBEImQvJS01ZCAlNWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4IiwK KyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+ dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVs YXRpdmVfeCwKKyAgICAgICAgJysnLAorICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAg KEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdCJworICAgICAgICAgIDog KFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAgICAgICAgIDog KE5JTFAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICcwJworICAgICAgICAgIDogJy0n KSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQp IGdseXBoLT51LmNtcC5pZCk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgJTRkICUxLjFkJTEu MWQiLAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xp bmVfcCwKKyAgICAgICAgZ2x5cGgtPnJpZ2h0X2JveF9saW5lX3ApOworICAgICAgaWYgKGdseXBo LT51LmNtcC5hdXRvbWF0aWMpCisgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAlNWQgJTRkICAl M2QgICUzZCAlcyAuIFslZC0lZF1cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgt PngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9wID8gIlpW IiA6ICItLSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGgtPnNsaWNlLmNtcC5mcm9t LCBnbHlwaC0+c2xpY2UuY21wLnRvKTsKKyAgICAgICAgZWxzZQorICAgICAgICBmcHJpbnRmIChz dGRlcnIsICJcbiIpOworICAgIH0KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gWFdJREdFVF9H TFlQSCkKKyAgICB7CisjaWZuZGVmIEhBVkVfWFdJREdFVFMKKyAgICAgIGVhc3N1bWUgKGZhbHNl KTsKKyNlbHNlCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICIgICU1ZC8lLTVkICU1 ZCAlNGMgJTZkICVjICUzZCAweCUwNXggJTRkICUxLjFkJTEuMWQgJTVkICU0ZCAgJTNkICAlM2Qg JXMgJWNcbiIsCisgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAg ICAgKChyb3ctPnVzZWRbYXJlYV0gPT0gMCkgPyAwIDogcm93LT51c2VkW2FyZWFdIC0gMSksCisg ICAgICAgIHJlbGF0aXZlX3gsCisgICAgICAgICdYJywKKyAgICAgICAgZ2x5cGgtPmNoYXJwb3Ms CisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICA/ICdCJworICAg ICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAg ICAgICA6ICctJykpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAgICAgIGdseXBo LT5mYWNlX2lkLAorICAgICAgICBnbHlwaC0+bGVmdF9ib3hfbGluZV9wLAorICAgICAgICBnbHlw aC0+cmlnaHRfYm94X2xpbmVfcCwKKyAgICAgICAgZ2x5cGgtPnUueHdpZGdldCwKKyAgICAgICAg Z2x5cGgtPngsIGdseXBoLT55LCBnbHlwaC0+aHBvcywgZ2x5cGgtPnZwb3MsIGdseXBoLT56dl9w ID8gIlpWIiA6ICItLSIsCisgICAgICAgICcuJyk7CisjZW5kaWYKKyAgICB9Cit9CisKKy8qIER1 bXAgdGhlIGNvbnRlbnRzIG9mIGdseXBoIHJvdyBhdCBWUE9TIGluIE1BVFJJWCB0byBzdGRlcnIu CisgICBHTFlQSFMgMCBtZWFucyBkb24ndCBzaG93IGdseXBoIGNvbnRlbnRzLgorICAgR0xZUEhT IDEgbWVhbnMgc2hvdyBnbHlwaHMgaW4gc2hvcnQgZm9ybQorICAgR0xZUEhTID4gMSBtZWFucyBz aG93IGdseXBocyBpbiBsb25nIGZvcm0uICAqLworCit2b2lkCittY19kdW1wX2dseXBoX3JvdyAo c3RydWN0IGdseXBoX3JvdyAqcm93LCBpbnQgdnBvcywgaW50IGdseXBocykKK3sKKyAgaW50IHJl bGF0aXZlX3ggPSAwOworICBpZiAoZ2x5cGhzICE9IDEpCisgICAgeworICAgICAgZnByaW50ZiAo c3RkZXJyLCAiXG5EVU1QIEdMWVBIIFJPV1xuIik7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJS b3cgICAgIFN0YXJ0ICAgICAgIEVuZCBVc2VkIG9FPjxcXENUWkZlc20gICAgIFggICAgWSAgICBX ICAgIEggICAgViAgICBBICAgIFBcbiIpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09XG4iKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiUzZCAlOSJwRCJk ICU5InBEImQgJTRkICUxLjFkJTEuMWQlMS4xZCUxLjFkXAorJTEuMWQlMS4xZCUxLjFkJTEuMWQl MS4xZCUxLjFkJTEuMWQlMS4xZCAgJTRkICU0ZCAlNGQgJTRkICU0ZCAlNGQgJTRkXG4iLAorICAg ICAgICAgdnBvcywKKyAgICAgICAgIE1BVFJJWF9ST1dfU1RBUlRfQ0hBUlBPUyAocm93KSwKKyAg ICAgICAgIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdyksCisgICAgICAgICByb3ctPnVzZWRb VEVYVF9BUkVBXSwKKyAgICAgICAgIHJvdy0+Y29udGFpbnNfb3ZlcmxhcHBpbmdfZ2x5cGhzX3As CisgICAgICAgICByb3ctPmVuYWJsZWRfcCwKKyAgICAgICAgIHJvdy0+dHJ1bmNhdGVkX29uX2xl ZnRfcCwKKyAgICAgICAgIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AsCisgICAgICAgICByb3ct PmNvbnRpbnVlZF9wLAorICAgICAgICAgTUFUUklYX1JPV19DT05USU5VQVRJT05fTElORV9QIChy b3cpLAorICAgICAgICAgTUFUUklYX1JPV19ESVNQTEFZU19URVhUX1AgKHJvdyksCisgICAgICAg ICByb3ctPmVuZHNfYXRfenZfcCwKKyAgICAgICAgIHJvdy0+ZmlsbF9saW5lX3AsCisgICAgICAg ICByb3ctPmVuZHNfaW5fbWlkZGxlX29mX2NoYXJfcCwKKyAgICAgICAgIHJvdy0+c3RhcnRzX2lu X21pZGRsZV9vZl9jaGFyX3AsCisgICAgICAgICByb3ctPm1vdXNlX2ZhY2VfcCwKKyAgICAgICAg IHJvdy0+eCwKKyAgICAgICAgIHJvdy0+eSwKKyAgICAgICAgIHJvdy0+cGl4ZWxfd2lkdGgsCisg ICAgICAgICByb3ctPmhlaWdodCwKKyAgICAgICAgIHJvdy0+dmlzaWJsZV9oZWlnaHQsCisgICAg ICAgICByb3ctPmFzY2VudCwKKyAgICAgICAgIHJvdy0+cGh5c19hc2NlbnQpOworICAgICAgLyog VGhlIG5leHQgMyBsaW5lcyBzaG91bGQgYWxpZ24gdG8gIlN0YXJ0IiBpbiB0aGUgaGVhZGVyLiAg Ki8KKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAgICAlOSJwRCJkICU5InBEImRcdCU1ZFxuIiwg cm93LT5zdGFydC5vdmVybGF5X3N0cmluZ19pbmRleCwKKyAgICAgICAgIHJvdy0+ZW5kLm92ZXJs YXlfc3RyaW5nX2luZGV4LAorICAgICAgICAgcm93LT5jb250aW51YXRpb25fbGluZXNfd2lkdGgp OworICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICAgICU5InBEImQgJTkicEQiZFxuIiwKKyAgICAg ICAgIENIQVJQT1MgKHJvdy0+c3RhcnQuc3RyaW5nX3BvcyksCisgICAgICAgICBDSEFSUE9TIChy b3ctPmVuZC5zdHJpbmdfcG9zKSk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICIgICAgJTlkICU5 ZFxuIiwgcm93LT5zdGFydC5kcHZlY19p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E7 ICsrYXJlYSkKKyAgeworICAgIGludCBpOworICAgIGZvciAoaSA9IDA7IGkgPCByb3ctPnVzZWRb YXJlYV07ICsraSkKKyAgICAgIHsKKyAgICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IHJvdy0+ Z2x5cGhzW2FyZWFdICsgaTsKKyAgICAgICAgaWYgKGkgPT0gcm93LT51c2VkW2FyZWFdIC0gMQor ICAgICAgJiYgYXJlYSA9PSBURVhUX0FSRUEKKyAgICAgICYmIE5JTFAgKGdseXBoLT5vYmplY3Qp CisgICAgICAmJiBnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBICisgICAgICAmJiBnbHlwaC0+dS5j aCA9PSAnICcpCisgICAgeworICAgICAgc3RyY3B5ICgmc1tpXSwgIltcXG5dIik7CisgICAgICBp ICs9IDQ7CisgICAgfQorICAgICAgICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDSEFSX0dMWVBI CisgICAgICAgICAgICYmIGdseXBoLT51LmNoIDwgMHg4MAorICAgICAgICAgICAmJiBnbHlwaC0+ dS5jaCA+PSAnICcpCisgICAgc1tpXSA9IGdseXBoLT51LmNoOworICAgICAgICBlbHNlCisgICAg c1tpXSA9ICcuJzsKKyAgICAgIH0KKyAgICBzW2ldID0gJ1wwJzsKKyAgICBmcHJpbnRmIChzdGRl cnIsICIlM2Q6ICglZCkgJyVzJ1xuIiwgdnBvcywgcm93LT5lbmFibGVkX3AsIHMpOworICB9Cisg ICAgfQorfQorCitERUZVTiAoIm1jLWR1bXAtZ2x5cGgtcm93IiwgRm1jX2R1bXBfZ2x5cGhfcm93 LCBTbWNfZHVtcF9nbHlwaF9yb3csIDEsIDIsICJQIiwKKyAgICAgICBkb2M6IC8qIER1bXAgZ2x5 cGggcm93IFJPVyB0byBzdGRlcnIuCitJbnRlcmFjdGl2ZWx5LCBST1cgaXMgdGhlIHByZWZpeCBu dW1lcmljIGFyZ3VtZW50IGFuZCBkZWZhdWx0cyB0bwordGhlIHJvdyB3aGljaCBkaXNwbGF5cyBw b2ludC4KK09wdGlvbmFsIGFyZ3VtZW50IEdMWVBIUyAwIG1lYW5zIGRvbid0IGR1bXAgZ2x5cGhz LgorR0xZUEhTIDEgbWVhbnMgZHVtcCBnbHlwaHMgaW4gc2hvcnQgZm9ybS4KK0dMWVBIUyA+IDEg b3Igb21pdHRlZCBtZWFucyBkdW1wIGdseXBocyBpbiBsb25nIGZvcm0uICAqLykKKyAgKExpc3Bf T2JqZWN0IHJvdywgTGlzcF9PYmplY3QgZ2x5cGhzKQoreworICBzdHJ1Y3Qgd2luZG93ICp3ID0g WFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KTsKKyAgc3RydWN0IGdseXBoX21hdHJpeCAqbWF0cml4 OworICBFTUFDU19JTlQgdnBvczsKKyAgaWYgKE5JTFAgKHJvdykpCisgICAgeworICAgICAgaW50 IGQxLCBkMiwgZDMsIGQ0LCBkNSwgeXBvczsKKyAgICAgIGJvb2wgdmlzaWJsZV9wID0gcG9zX3Zp c2libGVfcCAodywgUFQsICZkMSwgJmQyLCAmZDMsICZkNCwgJmQ1LCAmeXBvcyk7CisgICAgICBp bnQgaGVhZGVyX2xpbmVfaGVpZ2h0ID0gV0lORE9XX0hFQURFUl9MSU5FX0hFSUdIVCAodyk7Cisg ICAgICBpbnQgdm9mZnNldCA9IChoZWFkZXJfbGluZV9oZWlnaHQgPiAwCisgICAgICAgICAgICAg ICAgICAgICAmJiB5cG9zID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICA/IHlwb3MgKyAxCisg ICAgICAgICAgICAgICAgICAgICAgOiB5cG9zOworICAgICAgaWYgKHZpc2libGVfcCkKKyAgICAg ICAgdnBvcyA9IHZvZmZzZXQ7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB2cG9zID0gMDsKKyAg ICB9CisgICAgZWxzZQorICAgICAgeworICAgICAgICBDSEVDS19OVU1CRVIgKHJvdyk7CisgICAg ICAgIHZwb3MgPSBYRklYTlVNIChyb3cpOworICA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Nob3J0IGZv cm07Cit3aXRoIG51bWVyaWMgYXJndW1lbnQsIGl0cyB2YWx1ZSBpcyBwYXNzZWQgYXMgdGhlIEdM WVBIUyBmbGFnLiAgKi8pCisgIChMaXNwX09iamVjdCBnbHlwaHMpCit7CisgIHN0cnVjdCB3aW5k b3cgKncgPSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpOworICBzdHJ1Y3QgYnVmZmVyICpidWZm ZXIgPSBYQlVGRkVSICh3LT5jb250ZW50cyk7CisgIGZwcmludGYgKHN0ZGVyciwgIlBUID0gJSJw RCJkLCBCRUdWID0gJSJwRCJkLiBaViA9ICUicEQiZFxuIiwKKyAgICAgQlVGX1BUIChidWZmZXIp LCBCVUZfQkVHViAoYnVmZmVyKSwgQlVGX1pWIChidWZmZXIpKTsKKyAgZnByaW50ZiAoc3RkZXJy LCAiQ3Vyc29yIHggPSAlZCwgeSA9ICVkLCBocG9zID0gJWQsIHZwb3MgPSAlZFxuIiwKKyAgICAg dy0+Y3Vyc29yLngsIHctPmN1cnNvci55LCB3LT5jdXJzb3IuaHBvcywgdy0+Y3Vyc29yLnZwb3Mp OworICBmcHJpbnRmIChzdGRlcnIsICI9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT1cbiIpOworICBtY19kdW1wX2dseXBoX21hdHJpeCAody0+Y3VycmVudF9tYXRy aXgsCisgICAgICAgICBUWVBFX1JBTkdFRF9GSVhOVU1QIChpbnQsIGdseXBocykgPyBYRklYTlVN IChnbHlwaHMpIDogMCk7CisgIHJldHVybiBRbmlsOworfQorCitzdGF0aWMgdm9pZAorbWNfaGVs cGVyIChzdHJ1Y3Qgd2luZG93ICp3LCBpbnQgeCwgaW50IGZ4LCBpbnQgeSwgaW50IGZ5LCBpbnQg aHBvcywKKyAgICAgICAgICAgaW50IHZwb3MsIGludCBoLCBlbnVtIHRleHRfY3Vyc29yX2tpbmRz IGN1cnNvcl90eXBlLCBpbnQgY3Vyc29yX3dpZHRoLA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xpc3RuIChDT05TVFlQRV9I RUFQLCAxNSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9m aXhudW0gKHgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtl X2ZpeG51bSAoZngpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBt YWtlX2ZpeG51bSAoeSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1ha2VfZml4bnVtIChmeSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1ha2VfZml4bnVtIChocG9zKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbWFrZV9maXhudW0gKHZwb3MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAoaCksCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG1jX2N1cnNvcl90eXBlX3RvX2xpc3AgKGN1cnNvcl90eXBlKSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKGN1cnNv cl93aWR0aCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVn cm91bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91 bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfZml4bnVt IChhY3RpdmVfcCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1h a2VfZml4bnVtIChtaW5pbWFsX3ApLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBtYWtlX2ZpeG51bSAoZmxhdm9yKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA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dFU19PVVRTSURFX01BUkdJTlMgKHcpCisgICAgICAgICAgICAgICA/IFJJ R0hUX01BUkdJTl9BUkVBCisgICAgICAgICAgICAgICA6IFRFWFRfQVJFQSkpOworICAgICAgY3Iu eSA9IHJvdy0+eTsKKyAgICAgIGNyLndpZHRoID0gV0lORE9XX1JJR0hUX0ZSSU5HRV9XSURUSCAo dyk7CisgICAgICBjci5oZWlnaHQgPSByb3ctPmhlaWdodDsKKyAgICAgIHJldHVybiB4X2ludGVy c2VjdF9yZWN0YW5nbGVzICgmY3IsIHIsICZyZXN1bHQpOworICAgIH0KKyAgY3Vyc29yX2dseXBo ID0gbWNfZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3LCBocG9zLCB2cG9zKTsKKyAgaWYgKGN1cnNv cl9nbHlwaCkKKyAgICB7CisgICAgICAvKiByIGlzIHJlbGF0aXZlIHRvIFcncyBib3gsIGJ1dCB3 LT5waHlzX2N1cnNvci54IGlzIHJlbGF0aXZlCisgICAgICB0byBsZWZ0IGVkZ2Ugb2YgVydzIFRF WFQgYXJlYS4gIEFkanVzdCBpdC4gICovCisgICAgICBjci54ID0gd2luZG93X2JveF9sZWZ0X29m ZnNldCAodywgVEVYVF9BUkVBKSArIHg7CisgICAgICBjci55ID0geTsKKyAgICAgIGNyLndpZHRo ID0gY3Vyc29yX2dseXBoLT5waXhlbF93aWR0aDsKKyAgICAgIC8qIENyb3NzaGFpcnMgdXNlIHRo ZSBgcm93LT5oZWlnaHRgIGluc3RlYWQgb2YgdGhlIGN1cnNvciBoZWlnaHQuICovCisgICAgICBj ci5oZWlnaHQgPSByb3ctPmhlaWdodDsKKyAgICAgIHJldHVybiB4X2ludGVyc2VjdF9yZWN0YW5n bGVzICgmY3IsIHIsICZyZXN1bHQpOworICAgIH0KKyAgLyogSWYgd2UgZG9uJ3QgdW5kZXJzdGFu ZCB0aGUgZm9ybWF0LCBwcmV0ZW5kIHdlJ3JlIG5vdCBpbiB0aGUgaG90LXNwb3QuICAqLworICBy ZXR1cm4gZmFsc2U7Cit9CisKKy8qIE1VTFRJUExFX0NVUlNPUlM6ICBXZSBkbyBub3QgdXNlIHRo aXMgZnVuY3Rpb24uCisgICBIT1JJWk9OVEFMX1JVTEVSOiAgV2Ugd2FudCBhIHVuaXZlcnNhbCBm eSBjb29yZGluYXRlIGZvciBhIGxldmVsIHJ1bGVyLgorICAgVkVSVElDQUxfUlVMRVI6ICBXZSB3 YW50IGFuIGggdGhhdCBlbnN1cmVzIG5vIGdhcCBiZXR3ZWVuIHByZXZpb3VzL25leHQgbGluZS4K KyAgICAgICAgICAgICAgICAgICAgVGhlIGZ4IGNvb3JkaW5hdGUgaXMgc2V0IGVsc2V3aGVyZSBi YXNlZCB1cG9uIG9wb2ludF94LiAqLworCit2b2lkCittY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0 cnkgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgaW50IHgsIGludCAqZngsIGludCB5LCBpbnQgKmZ5LCBpbnQgaHBv cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHZwb3MsIGludCAqaCwgZW51bSB0 ZXh0X2N1cnNvcl9raW5kcyBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgaW50IGN1cnNvcl93aWR0aCwgaW50ICp3ZCkKK3sKKyAgc3RydWN0IGdseXBoICpmYWtlX3Bo eXNfY3Vyc29yX2dseXBoID0gbWNfZ2V0X3BoeXNfY3Vyc29yX2dseXBoICh3LCBocG9zLCB2cG9z KTsKKyAgaWYgKGZha2VfcGh5c19jdXJzb3JfZ2x5cGggIT0gTlVMTCkKKyAgICB7CisgICAgICBz dHJ1Y3QgZnJhbWUgKmYgPSBYRlJBTUUgKFdJTkRPV19GUkFNRSAodykpOworICAgICAgaW50IGgw ID0gcm93LT52aXNpYmxlX2hlaWdodDsKKyAgICAgIGludCB5MCA9IFdJTkRPV19IRUFERVJfTElO RV9IRUlHSFQgKHcpOworICAgICAgaW50IGFzY2VudCA9IHJvdy0+YXNjZW50OworICAgICAgLyog Q29tcHV0ZSB0aGUgd2lkdGggb2YgdGhlIHJlY3RhbmdsZSB0byBkcmF3LiAgSWYgb24gYSBzdHJl dGNoCisgICAgICAgICBnbHlwaCwgYW5kIGB4LXN0cmV0Y2gtYmxvY2stY3Vyc29yJyBpcyBuaWws IGRvbid0IGRyYXcgYQorICAgICAgICAgcmVjdGFuZ2xlIGFzIHdpZGUgYXMgdGhlIGdseXBoLCBi dXQgdXNlIGEgY2Fub25pY2FsIGNoYXJhY3RlcgorICAgICAgICAgd2lkdGggaW5zdGVhZC4gICov CisgICAgICAqd2QgPSBzY3JhdGNoX2dseXBocy0+cGl4ZWxfd2lkdGg7CisgICAgICBpZiAoeCA8 IDApCisgICAgICAgIHsKKyAgICAgICAgICAqd2QgKz0geDsKKyAgICAgICAgICB4ID0gMDsKKyAg ICAgICAgfQorICAgICAgaWYgKHNjcmF0Y2hfZ2x5cGhzLT50eXBlID09IFNUUkVUQ0hfR0xZUEgK KyAgICAgICAgICAmJiAheF9zdHJldGNoX2N1cnNvcl9wKQorICAgICAgICAqd2QgPSBtaW4gKEZS QU1FX0NPTFVNTl9XSURUSCAoZiksICp3ZCk7CisgICAgICAvKiBEb24ndCBsZXQgdGhlIGhvbGxv dyBjdXJzb3IgZ2x5cGggZGVzY2VuZCBiZWxvdyB0aGUgZ2x5cGggcm93J3MKKyAgICAgICAgIGFz Y2VudCB2YWx1ZSwgbGVzdCB0aGUgaG9sbG93IGN1cnNvciBsb29rcyBmdW5ueS4gICovCisgICAg ICBpZiAocm93LT5hc2NlbnQgPCBzY3JhdGNoX2dseXBocy0+YXNjZW50KQorICAgICAgICB7Cisg ICAgICAgICAgeSAtPSBzY3JhdGNoX2dseXBocy0+YXNjZW50IC0gcm93LT5hc2NlbnQ7CisgICAg ICAgICAgYXNjZW50ID0gc2NyYXRjaF9nbHlwaHMtPmFzY2VudDsKKyAgICAgICAgfQorICAgICAg LyogSWYgeSBpcyBiZWxvdyB3aW5kb3cgYm90dG9tLCBlbnN1cmUgdGhhdCB3ZSBzdGlsbCBzZWUg YSBjdXJzb3IuICovCisgICAgICBpbnQgaF90ZW1wID0gbWF4IChoMCwgYXNjZW50ICsgc2NyYXRj aF9nbHlwaHMtPmRlc2NlbnQpOworICAgICAgaDAgPSBtaW4gKGgwLCBhc2NlbnQgKyBzY3JhdGNo X2dseXBocy0+ZGVzY2VudCk7CisgICAgICBpZiAoeSA8IHkwKQorICAgICAgICB7CisgICAgICAg ICAgaF90ZW1wID0gbWF4IChoX3RlbXAgLSAoeTAgLSB5KSArIDEsIGgwKTsKKyAgICAgICAgICB5 ID0geTAgLSAxOworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICB5 MCA9IHdpbmRvd190ZXh0X2JvdHRvbV95ICh3KSAtIGgwOworICAgICAgICAgIGlmICh5ID4geTAp CisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGhfdGVtcCArPSB5IC0geTA7CisgICAgICAg ICAgICAgIHkgPSB5MDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgKmZ4ID0gV0lO RE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgeCk7CisgICAgICAqZnkgPSBXSU5ET1dfVE9f RlJBTUVfUElYRUxfWSAodywgeSk7CisgICAgICAqaCA9IGhfdGVtcDsKKyAgICAgIGlmIChjdXJz b3JfdHlwZSA9PSBIQkFSX0NVUlNPUikKKyAgICAgICAgeworICAgICAgICAgIGludCBjdXJzb3Jf aGVpZ2h0ID0gKGN1cnNvcl93aWR0aCA8IDEpID8gbHJpbnQgKDAuMjUgKiAqaCkgOiBjdXJzb3Jf d2lkdGg7CisgICAgICAgICAgaWYgKGN1cnNvcl9oZWlnaHQgPiByb3ctPmhlaWdodCkKKyAgICAg ICAgICAgIGN1cnNvcl9oZWlnaH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9IChDSEFSQUNURVJQIChtYWtlX2ZpeG51bSAoZ2x5 cGgtPnUuY2gpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgPyBGY2hhcl90b19zdHJpbmcg KG1ha2VfZml4bnVtIChnbHlwaC0+dS5jaCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgIDog UW5pbDsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3LT5mcmFtZSk7CisgIExpc3BfT2Jq ZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOworICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgIHN0cnVjdCBi dWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93 X2JveF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFN RV9DT0xVTU5fV0lEVEggKGYpOworICBib29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAo YiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGZpbGxfY29sID0gWEZJWE5VTSAoQlZBUiAoYiwgZmls bF9jb2x1bW4pKTsKKyAgaW50IGhzY2xfeCA9IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFyX3dpZHRo OworICBpbnQgZmlsbF9jb2x1bW5feCA9IChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAg ICAgICAgICYmICFOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMpKQorICAgICAgICAgICAgICAg ICAgICAgICAgPyAoZmlsbF9jb2wgKiBmcmFtZV9jaGFyX3dpZHRoKSArIHctPm1jLmxudW1fcGl4 ZWxfd2lkdGggLSBoc2NsX3gKKyAgICAgICAgICAgICAgICAgICAgICA6IChmaWxsX2NvbHVtbl9w CisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJz KSkKKyAgICAgICAgICAgICAgICAgICAgICAgID8gKGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0 aCkgLSBoc2NsX3gKKyAgICAgICAgICAgICAgICAgICAgICA6IDA7CisgIGludCB0ZW1wX3ggPSBy ZWxhdGl2ZV94OworICBpbnQgdGVtcF95ID0gcm93LT55OworICBpbnQgdGVtcF9ocG9zID0gZ2x5 cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdOworICBpbnQgdGVtcF92cG9zID0gTUFUUklYX1JP V19WUE9TIChyb3csIHctPmN1cnJlbnRfbWF0cml4KTsKKyAgaW50IHRlbXBfZmFjZV9pZCA9IGds eXBoLT5mYWNlX2lkOworICBpbnQgdGVtcF9jaGFycG9zID0gZ2x5cGgtPmNoYXJwb3M7CisKKy8q IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgIEJFR0lOOiAg Q0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAgICAgICAgICAgICAgICAgICovCisvKiAtLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0gKi8KKyAgaWYgKGdseXBoLT50eXBlID09IENIQVJfR0xZUEgKKyAgICAg IHx8IGdseXBoLT50eXBlID09IEdMWVBITEVTU19HTFlQSCkKKyAgeworICAgIGlmIChtY19zdGRl cnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVyciwKKyAgICAgICAgIlxuICU1InBEImQvJS01ZCAl NWQgJWMgJTkicEQiZCAlYyAlM2QgMHglMDZ4ICU0ZCAlMS4xZCUxLjFkICU1ZCAlNGQgICUzZCAg JTNkICVzICVzXG4iLAorICAgICAgICBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisg ICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8gMCA6IHJvdy0+dXNlZFthcmVhXSAtIDEp LAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAoZ2x5cGgtPnR5cGUgPT0gQ0hBUl9HTFlQ SAorICAgICAgICAgPyAnQycKKyAgICAgICAgIDogJ0cnKSwKKyAgICAgICAgZ2x5cGgtPmNoYXJw b3MsCisgICAgICAgIChCVUZGRVJQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgPyAnQicKKyAg ICAgICAgIDogKFNUUklOR1AgKGdseXBoLT5vYmplY3QpCisgICAgICAgICAgICA/ICdTJworICAg ICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgID8gJzAnCisg ICAgICAgICAgICAgICA6ICctJykpKSwKKyAgICAgICAgICAgICAgZ2x5cGgtPnBpeGVsX3dpZHRo LAorICAgICAgICBnbHlwaC0+dS5jaCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAg IGdseXBoLT5sZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9w LAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywg Z2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQor ICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gOSkKKyAgICAgICAgICAgPyAiXFx0IgorICAgICAg ICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEw KQorICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAg ICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAgICAgICAgID8gIlxccyIKKyAgICAg ICAgIDogKCFOSUxQIChjaGFy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tLS0tLSAqLworLyogICAgICAg ICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgQ0hBUl9HTFlQSCB8IEdMWVBITEVTU19HTFlQSCAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKyAgICBjYXNlIEhPUkla T05UQUxfUlVMRVI6CisgICAgeworICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3Bv aW50X3ggPT0gcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X2hwb3MgPT0gdGVtcF9ocG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBvcG9pbnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAgIGludCBfZngsIGZ5LCBfaCwg X3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwg Jl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnksIHRl bXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm X2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaWYgKHRlbXBfeCA8 PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAg ICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVt cF92cG9zLAorICAgICAgICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNl X2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSCwg dGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgLyogSXQgaXMgcG9zc2libGUgdG8gdXNlIE1D X0dMWVBIIGFuZCBhZGp1c3QgdGhlIGZ4IGNvb3JkaW5hdGU7IGhvd2V2ZXIsCisgICAgICB0aGUg bWlkZGxlLWRvdCAvIHNwYWNlIGdseXBoIG9uIGEgd29yZC13cmFwcGVkIGxpbmUgd2lsbCBiZSBv dmVyd3JpdHRlbgorICAgICAgbnVtZXJvdXMgdGltZXMgYW5kIGlzIHVuc2lnaHRseS4gKi8KKyAg ICAgIGlmIChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFd IC0gMSkKKyAgICAgICAgeworICAgICAgICAgIGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAg ICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwgdGVtcF9o cG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAm X2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgICAgIHRlbXBfeCAr PSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8PSB0ZXh0X2Fy ZWFfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2hlbHBlciAodywgdGVt cF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9oc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ICAgICAgYm9vbCBjdXJzb3JfaW5fZnJpbmdlX3AgPSBvcG9pbnRfeCArIGds eXBoLT5waXhlbF93aWR0aCA+PSB0ZXh0X2FyZWFfd2lkdGg7CisgICAgICBpbnQgZmxhdm9yID0g KGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAmJiByb3ctPnRydW5jYXRl ZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfUklH SFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAg ICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAg ICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgICAgICAgICAgOiAoY3Vy c29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVk X29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT5jb250aW51ZWRfcCkK KyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElDQUxfQkFSCisgICAgICAgICAgICAgICAg ICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAt IDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeCA+IHJlbGF0aXZlX3gpCisgICAg ICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKHp2 X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUworICAgICAgICAgICAgICAg ICAgIDogTUNfR0xZUEg7CisgICAgICBpbnQgdGVtcF94ID0gKGdseXBoIC0gcm93LT5nbHlwaHNb VEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgPyBvcG9pbnRfeAor ICAgICAgICAgICAgICAgICAgICA6IHJlbGF0aXZlX3g7CisgICAgICBpZiAoZmxhdm9yID09IE1D X1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBNQ19WRVJU SUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JB UikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAgICAgaW50 IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcs IHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAg ICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBvcG9pbnRfeCk7Cisg ICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVt cF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBm b3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCks IGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9jaGFy cG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICA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2 X3AgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAt IDEKKyAgICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpID09 IFpWKTsKKyAgICAgIGludCBmbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFd ID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1 bW5feCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dM WVBITEVTUworICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJz KSkKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29u dGVudHMpLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgICAgICAgICAgICAgICAg ICAmJiBvcG9pbnRfeSA9PSB0ZW1wX3kKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRf dnBvcyA9PSB0ZW1wX3Zwb3MpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpbnQgdGVtcF94ID0gKGdseXBo IC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAg ICAgICAgICAgICAgICYmIGZpbGxfY29sdW1uX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAg ICAgICAgICA/IGZpbGxfY29sdW1uX3gKKyAgICAgICAgICAgICAgICAgICAgOiByZWxhdGl2ZV94 OworICAgICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3Jf Z2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwg Jl93ZCk7CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBm aWxsX2NvbHVtbl94KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAt MSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBl LCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAo dywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwg Zmxhdm9yLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9CisgIH0K KyAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAg IEVORDogIENIQVJfR0xZUEggfCBHTFlQSExFU1NfR0xZUEggICAgICAgICAgICAgICAgICAgKi8K Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8q ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIFNUUkVUQ0hfR0xZUEggICAgICAg ICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisgIGVsc2Ug aWYgKGdseXBoLT50eXBlID09IFNUUkVUQ0hfR0xZUEgpCisgIHsKKyAgICBpZiAobWNfc3RkZXJy X3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAgICJcbiAlNSJwRCJkLyUtNWQgJTVk ICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQlMS4xZCAlNWQgJTRkICAlM2QgICUz ZCAlcyAlc1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdLAorICAg ICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwK KyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ1MnLAorICAgICAgICBnbHlwaC0+Y2hhcnBv cywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3QpCisgICAgICAgICA/ICdCJworICAg ICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgID8gJ1MnCisgICAg ICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAgICAgICAgICAgICAgPyAnMCcKKyAg ICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlwaC0+cGl4ZWxfd2lkdGgsCisgICAg ICAgIDB1LAorICAgICAgICBnbHlwaC0+ZmFjZV9pZCwKKyAgICAgICA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AqLworLyogICAgICAgICAgICAgICAgICAgICAgICBIT1JJWk9OVEFMX1JVTEVSOiAgU1RS RVRDSF9HTFlQSCAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0g Ki8KKyAgICBjYXNlIEhPUklaT05UQUxfUlVMRVI6CisgICAgeworICAgICAgYm9vbCByZWFsX2Zh a2VfY3Vyc29yX3AgPSAob3BvaW50X3ggPT0gcmVsYXRpdmVfeAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgb3BvaW50X2hwb3MgPT0gdGVtcF9ocG9zCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKTsKKyAgICAg IGludCBfZngsIGZ5LCBfaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5 ICh3LCByb3csIHRlbXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdGVtcF95LCAmZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmX2gsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOwor ICAgICAgaWYgKHRlbXBfeCA8PSB0ZXh0X2FyZWFfd2lkdGgKKyAgICAgICAgICAmJiAhcmVhbF9m YWtlX2N1cnNvcl9wKQorICAgICAgICB3aGlsZSAodGVtcF94IDwgcmVsYXRpdmVfeCArIGdseXBo LT5waXhlbF93aWR0aCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBtY19oZWxwZXIgKHcsIHRl bXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAg ICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwKKyAg ICAgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQpLCBhY3RpdmVf cCwKKyAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSExFU1MsIHRlbXBf Y2hhcnBvcywgcmVzdWx0KTsKKyAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dpZHRo OworICAgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAodGVtcF94ICsgZ2x5cGgtPnBpeGVsX3dp ZHRoIDwgdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgICAgICAgICYmIHJlYWxfZmFrZV9jdXJz b3JfcAorICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+cGl4ZWxfd2lkdGggPiBmcmFtZV9jaGFy X3dpZHRoKQorICAgICAgICAgIHsKKyAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9jaGFyX3dp ZHRoOworICAgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4 ZWxfd2lkdGgpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtY19oZWxwZXIgKHcs IHRlbXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91 bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9p ZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19H TFlQSExFU1MsIHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgICAgICAgICAgICB0ZW1wX3gg Kz0gZnJhbWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAg IC8qIEl0IGlzIHBvc3NpYmxlIHRvIHVzZSBNQ19HTFlQSCBhbmQgYWRqdXN0IHRoZSBmeCBjb29y ZGluYXRlOyBob3dldmVyLAorICAgICAgdGhlIG1pZGRsZS1kb3QgLyBzcGFjZSBnbHlwaCBvbiBh IHdvcmQtd3JhcHBlZCBsaW5lIHdpbGwgYmUgb3ZlcndyaXR0ZW4KKyAgICAgIG51bWVyb3VzIHRp bWVzIGFuZCBpcyB1bnNpZ2h0bHkuICovCisgICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tU RVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEpCisgICAgICAgIHsKKyAgICAgICAgICBp bnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAgICAgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0 cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdGVtcF95LCAmZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRo LCAmX3dkKTsKKyAgICAgICAgICB0ZW1wX2ZhY2VfaWQgPSAocm93LT5maWxsX2xpbmVfcCkKKyAg ICAgICAgICAgICAgICAgICAgICAgICA/IGdseXBoLT5mYWNlX2lkCisgICAgICAgICAgICAgICAg ICAgICAgICAgOiBERUZBVUxUX0ZBQ0VfSUQ7CisgICAgICAgICAgd2hpbGUgKHRlbXBfeCA8PSB0 ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIG1jX2hlbHBlciAo dywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAg ICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91 bmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2ZhY2VfaWQp LCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBI TEVTUywgdGVtcF9jaGFycG9zLCByZXN1bHQpOworICAgICAgICAgICAgICB0ZW1wX3ggKz0gZnJh bWVfY2hhcl93aWR0aDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgYnJlYWs7Cisg ICAgfQorLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAg ICAgVkVSVElDQUxfUlVMRVI6ICBTVFJFVENIX0dMWVBIICAgICAgICAgICAgICAgICAgICAgKi8K Ky8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICAgIGNhc2UgVkVSVElDQUxfUlVMRVI6CisgICAg eworICAgICAgaWYgKHJvdy0+ZmlsbF9saW5lX3AKKyAgICAgICAgICAmJiBnbHlwaCAtIHJvdy0+ Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICYmIG9w b2ludF94ID4gcmVsYXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgdGVtcF9m YWNlX2lkID0gZ2x5cGgtPmZhY2VfaWQ7CisgICAgICAgIGVsc2UgaWYgKCFyb3ctPmZpbGxfbGlu ZV9wCisgICAgICAgICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9 PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICYmIG9wb2ludF94ID4gcmVs YXRpdmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICB0ZW1wX2ZhY2VfaWQgPSBE RUZBVUxUX0ZBQ0VfSUQ7CisgICAgICBib29sIGN1cnNvcl9pbl9mcmluZ2VfcCA9IG9wb2ludF94 ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAgICAgIGludCBmbGF2 b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+dHJ1 bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JB Ul9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1cnNvcl9pbl9mcmluZ2VfcAor ICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVkX3ApCisgICAgICAgICAgICAg ICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICAgICAgICAgICA6 IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiAhcm93LT50cnVu Y2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAgICYmICFyb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVIKKyAgICAgICAgICAg ICAgICAgICA6IE1DX0dMWVBITEVTUzsKKyAgICAgIGludCB0ZW1wX3ggPSBvcG9pbnRfeDsKKyAg ICAgIGlmIChmbGF2b3IgPT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAg fHwgZmxhdm9yID09IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2 b3IgPT0gTUNfVkVSVElDQUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5H RV9CSVRNQVA7CisgICAgICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlz X2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJl9meSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZoLCBjdXJzb3JfdHlwZSwgY3Vyc29y X3dpZHRoLCAmX3dkKTsKKyAgICAgIGludCBmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVM X1ggKHcsIG9wb2ludF94KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95 LCAtMSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90 eXBlLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xz bCAodywgdGVtcF9mYWNlX2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIG1pbmltYWxf cCwgZmxhdm9yLCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9Cisv KiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgICBGSUxM X0NPTFVNTjogIFNUUkVUQ0hfR0xZUEggICAgICAgICAgICAgICAgICAgICAqLworLyogLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisgICAgY2FzZSBGSUxMX0NPTFVNTjoKKyAgICB7CisgICAgICBpZiAo cm93LT5maWxsX2xpbmVfcAorICAgICAgICAgICYmIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9B UkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgJiYgZmlsbF9jb2x1bW5feCA+ IHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGgpCisgICAgICAgIHRlbXBfZmFjZV9pZCA9 IGdseXBoLT5mYWNlX2lkOworICAgICAgICBlbHNlIGlmICghcm93LT5maWxsX2xpbmVfcAorICAg ICAgICAgICAgICAgICAmJiBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51 c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAmJiBmaWxsX2NvbHVtbl94ID4gcmVsYXRp dmVfeCArIGdseXBoLT5waXhlbF93aWR0aCkKKyAgICAgICAgICB0ZW1wX2ZhY2VfaWQgPSBERUZB VUxUX0ZBQ0VfSUQ7CisgICAgICBpbnQgZmxhdm9yID0gTUNfR0xZUEhMRVNTOworICAgICAgaW50 IHRlbXBfeCA9IGZpbGxfY29sdW1uX3g7CisgICAgICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAg ICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gsICZfZngsCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJl9meSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0gKi8KKyAgZWxzZSBpZiAoZ2x5cGgtPnR5cGUgPT0gSU1BR0VfR0xZUEgpCisg IHsKKyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICBmcHJpbnRmIChzdGRlcnIsCisgICAgICAg ICJcbiAlNSJwRCJkLyUtNWQgJTVkICVjICU5InBEImQgJWMgJTNkIDB4JTA2eCAlNGQgJTEuMWQl MS4xZCAlNWQgJTRkICAlM2QgICUzZCAlcyAlY1xuIiwKKyAgICAgICAgZ2x5cGggLSByb3ctPmds eXBoc1tURVhUX0FSRUFdLAorICAgICAgICAoKHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiBy b3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAgICAgcmVsYXRpdmVfeCwKKyAgICAgICAgJ0knLAor ICAgICAgICBnbHlwaC0+Y2hhcnBvcywKKyAgICAgICAgKEJVRkZFUlAgKGdseXBoLT5vYmplY3Qp CisgICAgICAgICA/ICdCJworICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAg ICAgICAgICAgID8gJ1MnCisgICAgICAgICAgICA6IChOSUxQIChnbHlwaC0+b2JqZWN0KQorICAg ICAgICAgICAgICAgPyAnMCcKKyAgICAgICAgICAgICAgIDogJy0nKSkpLAorICAgICAgICBnbHlw aC0+cGl4ZWxfd2lkdGgsCisgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmltZ19pZCwK KyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5sZWZ0X2JveF9saW5lX3As CisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAgICBnbHlwaC0+eCwgZ2x5 cGgtPnksIGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0t Ii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tLS0tLSAqLworLyogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIEVORDogIElNQUdFX0dMWVBIICAgICAgICAgICAgICAg ICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKworLyogLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCRUdJTjogIENPTVBP U0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBDT01QT1NJVEVfR0xZUEgpCisgIHsK KyAgICBpZiAobWNfc3RkZXJyX3ApCisgICAgICB7CisgICAgICAgIGZwcmludGYgKHN0ZGVyciwK KyAgICAgICAgICAiXG4gJTUicEQiZC8lLTVkICU1ZCAlYyAlOSJwRCJkICVjICUzZCAweCUwNngi LAorICAgICAgICAgIGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSwKKyAgICAgICAgICAo KHJvdy0+dXNlZFthcmVhXSA9PSAwKSA/IDAgOiByb3ctPnVzZWRbYXJlYV0gLSAxKSwKKyAgICAg ICAgICByZWxhdGl2ZV94LAorICAgICAgICAgICcrJywKKyAgICAgICAgICBnbHlwaC0+Y2hhcnBv cywKKyAgICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgPyAnQicK KyAgICAgICAgICAgOiAoU1RSSU5HUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAgPyAn UycKKyAgICAgICAgICAgICAgOiAoTklMUCAoZ2x5cGgtPm9iamVjdCkKKyAgICAgICAgICAgICAg ICAgPyAnMCcKKyAgICAgICAgICAgICAgICAgOiAnLScpKSksCisgICAgICAgICAgZ2x5cGgtPnBp eGVsX3dpZHRoLAorICAgICAgICAgICh1bnNpZ25lZCBpbnQpIGdseXBoLT51LmNtcC5pZCk7Cisg ICAgICAgIGZwcmludGYgKHN0ZGVyciwgIiAlNGQgJTEuMWQlMS4xZCIsCisgICAgICAgICAgZ2x5 cGgtPmZhY2VfaWQsCisgICAgICAgICAgZ2x5cGgtPmxlZnRfYm94X2xpbmVfcCwKKyAgICAgICAg ICBnbHlwaC0+cmlnaHRfYm94X2xpbmVfcCk7CisgICAgICBpZiAoZ2x5cGgtPnUuY21wLmF1dG9t YXRpYykKKyAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiICU1ZCAlNGQgICUzZCAgJTNkICVzIC4g WyVkLSVkXVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnks IGdseXBoLT5ocG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICBnbHlwaC0+c2xpY2UuY21wLmZyb20sIGdseXBoLT5zbGlj ZS5jbXAudG8pOworICAgICAgICBlbHNlCisgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiXG4i KTsKKyAgICAgIH0KKyAgc3dpdGNoIChhY3Rpb25fdHlwZSkKKyAgeworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgTVVMVElQTEVfQ1VSU09SUzogIENP TVBPU0lURV9HTFlQSCAgICAgICAgICAg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gICYmIG9wb2ludF95ID09IGdseXBoLT55CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1wX3Zwb3MpOworICAgICAgaW50IF9meCwgZnksIF9o LCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94 LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZmeSwg dGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICBpZiAodGVtcF94 IDw9IHRleHRfYXJlYV93aWR0aAorICAgICAgICAgICYmICFyZWFsX2Zha2VfY3Vyc29yX3ApCisg ICAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCAtMSwgdGVtcF95LCBmeSwgdGVtcF9ocG9zLCB0 ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgICAgLTEsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3LCB0ZW1wX2Zh Y2VfaWQpLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIE1DX0dMWVBI LCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAvKiBJdCBpcyBwb3NzaWJsZSB0byB1c2Ug TUNfR0xZUEggYW5kIGFkanVzdCB0aGUgZnggY29vcmRpbmF0ZTsgaG93ZXZlciwKKyAgICAgIHRo ZSBtaWRkbGUtZG90IC8gc3BhY2UgZ2x5cGggb24gYSB3b3JkLXdyYXBwZWQgbGluZSB3aWxsIGJl IG92ZXJ3cml0dGVuCisgICAgICBudW1lcm91cyB0aW1lcyBhbmQgaXMgdW5zaWdodGx5LiAqLwor ICAgICAgaWYgKGdseXBoIC0gcm93LT5nbHlwaHNbVEVYVF9BUkVBXSA9PSByb3ctPnVzZWRbYXJl YV0gLSAxKQorICAgICAgICB7CisgICAgICAgICAgaW50IF9meCwgZnksIF9oLCBfd2Q7CisgICAg ICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRlbXBfeCwgJl9meCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0ZW1w X2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICZfaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgICAgdGVtcF94 ICs9IGdseXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICB3aGlsZSAodGVtcF94IDw9IHRleHRf YXJlYV93aWR0aCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfaGVscGVyICh3LCB0 ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAg ICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwK KyAgICAgICAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFj dGl2ZV9wLAorICAgICAgICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEhMRVNT LCB0ZW1wX2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICAgICAgICAgIHRlbXBfeCArPSBmcmFtZV9j aGFyX3dpZHRoOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBicmVhazsKKyAgICB9 CisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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cGhzW1RF WFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICYmIE1B VFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdykgPT0gWlYpOworICAgICAgYm9vbCBjdXJzb3JfaW5f ZnJpbmdlX3AgPSBvcG9pbnRfeCArIGdseXBoLT5waXhlbF93aWR0aCA+PSB0ZXh0X2FyZWFfd2lk dGg7CisgICAgICBpbnQgZmxhdm9yID0gKGN1cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAg ICAgICAgICAmJiByb3ctPnRydW5jYXRlZF9vbl9yaWdodF9wKQorICAgICAgICAgICAgICAgICAg ICAgPyBNQ19WRVJUSUNBTF9CQVJfUklHSFRfQVJST1cKKyAgICAgICAgICAgICAgICAgICA6IChj dXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAgICAgICAmJiByb3ctPmNvbnRpbnVl ZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisg ICAgICAgICAgICAgICAgICAgOiAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAg ICAgICAgJiYgIXJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3AKKyAgICAgICAgICAgICAgICAgICAg ICAmJiAhcm93LT5jb250aW51ZWRfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfVkVSVElD QUxfQkFSCisgICAgICAgICAgICAgICAgICAgOiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FS RUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9p bnRfeCA+IHJlbGF0aXZlX3gpCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dMWVBITEVTUwor ICAgICAgICAgICAgICAgICAgIDogKHp2X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX0dM WVBITEVTUworICAgICAgICAgICAgICAgICAgIDogTUNfR0xZUEg7CisgICAgICBpZiAoZmxhdm9y ID09IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgIHx8IGZsYXZvciA9PSBN Q19WRVJUSUNBTF9CQVJfQkFDS1NMQVNICisgICAgICAgICAgfHwgZmxhdm9yID09IE1DX1ZFUlRJ Q0FMX0JBUikKKyAgICAgICAgY3Vyc29yX3R5cGUgPSBSSUdIVF9GUklOR0VfQklUTUFQOworICAg ICAgaW50IF9meCwgX2Z5LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0 cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB0ZW1wX3ksICZfZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0aCwgJl93ZCk7 CisgICAgICBpbnQgZnggPSBXSU5ET1dfVEVYVF9UT19GUkFNRV9QSVhFTF9YICh3LCBvcG9pbnRf eCk7CisgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBv cywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dp ZHRoLCBmb3JlZ3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFj ZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVt cF9jaGFycG9zLCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICBGSUxMX0NPTFVNTjogIENPTVBP U0lURV9HTFlQSCAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAq LworICAgIGNhc2UgRklMTF9DT0xVTU46CisgICAgeworICAgICAgLyogYGdseXBoLT5jaGFycG9z YCBpcyB1bnJlbGlhYmxlIHdoZW4gdGVzdGluZyBmb3IgWlYgLS0gd2l0aG91dCBsaW5lCisgICAg ICBudW1iZXJzLCB0aGUgdmFsdWUgaXMgLTE7IHdpdGggbGluZSBudW1iZXJzLCB0aGUgdmFsdWUg aXMgX3NvbWV0aW1lc18gWlYuCisgICAgICBgZ2x5cGgtPnp2X3BgIGlzIHJlbGlhYmxlLCBidXQg cmVsaWVzIHVwb24gYSBmZXcgY29yZSBtb2RpZmljYXRpb24uCisgICAgICBgenZfcGAgZW5jb21w YXNzZXMgYSBjb3VwbGUgb2Ygc2l0dWF0aW9uczogIGEgbGluZSBlbmRpbmcgaW4gWlYsIGJ1dAor ICAgICAgIGNvbnRhaW5pbmcgb25lIG9yIG1vcmUgY2hhcmFjdGVycyBiZWZvcmUgWlY7IGFuZCwg YSBsaW5lIGJleW9uZCBaViB0aGF0CisgICAgICAgbWF5IGNvbnNpc3Qgb2Ygc3BhY2VzIGVxdWFs IHRvIGBpdC0+bG51bV9waXhlbF93aWR0aGAgLyBmcmFtZV9jaGFyX3dpZHRoLAorICAgICAgIG9y IGp1c3Qgb25lIHNwYWNlIGlmIHRoZXJlIGFyZSBubyBsaW5lIG51bWJlcnMuICovCisgICAgICBi b29sIHp2X3AgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFth cmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAmJiBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChy b3cpID09IFpWKTsKKyAgICAgIGludCBmbGF2b3IgPSAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhU X0FSRUFdID09IHJvdy0+dXNlZFthcmVhXSAtIDEKKyAgICAgICAgICAgICAgICAgICAgICAmJiBm aWxsX2NvbHVtbl94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZ UEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAg ID8gTUNfR0xZUEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKEJWQVIgKGIsIGNy b3NzaGFpcnMpKQorICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVS ICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfdmVydGljYWxfcnVsZXIpKQorICAgICAgICAgICAg ICAgICAgICAgICYmIG9wb2ludF95ID09IHRlbXBfeQorICAgICAgICAgICAgICAgICAgICAgICYm IG9wb2ludF92cG9zID09IHRlbXBfdnBvcykKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZ UEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGludCBfZngsIF9m eSwgaCwgX3dkOworICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29yX2dlb21ldHJ5ICh3LCByb3csIHRl bXBfeCwgJl9meCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAm X2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJmgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lkdGgsICZfd2QpOworICAgICAgaW50IGZ4 ID0gV0lORE9XX1RFWFRfVE9fRlJBTUVfUElYRUxfWCAodywgZmlsbF9jb2x1bW5feCk7CisgICAg ICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgZngsIHRlbXBfeSwgLTEsIHRlbXBfaHBvcywgdGVtcF92 cG9zLAorICAgICAgICAgICAgICAgICBoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3Jl Z3JvdW5kLAorICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFjZV9pZCksIGFj dGl2ZV9wLAorICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIGZsYXZvciwgdGVtcF9jaGFycG9z LCByZXN1bHQpOworICAgICAgYnJlYWs7CisgICAgfQorICB9CisgIH0KKy8qIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLSAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFTkQ6ICBDT01QT1NJ VEVfR0xZUEggICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAtLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0gKi8KKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgQkVHSU46ICBYV0lER0VUX0dMWVBIICAgICAgICAgICAgICAgICAgICAgICAgICAg Ki8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAqLworICBlbHNlIGlmIChnbHlwaC0+dHlwZSA9PSBY V0lER0VUX0dMWVBIKQorICB7CisjaWZuZGVmIEhBVkVfWFdJREdFVFMKKyAgICBlYXNzdW1lIChm YWxzZSk7CisjZWxzZQorICAgIGlmIChtY19zdGRlcnJfcCkKKyAgICAgIGZwcmludGYgKHN0ZGVy ciwKKyAgICAgICAgIlxuICAlNWQvJS01ZCAlNWQgJTRjICU2ZCAlYyAlM2QgMHglMDV4ICU0ZCAl MS4xZCUxLjFkICU1ZCAlNGQgICUzZCAgJTNkICVzICVjXG4iLAorICAgICAgICBnbHlwaCAtIHJv dy0+Z2x5cGhzW1RFWFRfQVJFQV0sCisgICAgICAgICgocm93LT51c2VkW2FyZWFdID09IDApID8g MCA6IHJvdy0+dXNlZFthcmVhXSAtIDEpLAorICAgICAgICByZWxhdGl2ZV94LAorICAgICAgICAn WCcsCisgICAgICAgIGdseXBoLT5jaGFycG9zLAorICAgICAgICAoQlVGRkVSUCAoZ2x5cGgtPm9i amVjdCkKKyAgICAgICAgID8gJ0InCisgICAgICAgICA6IChTVFJJTkdQIChnbHlwaC0+b2JqZWN0 KQorICAgICAgICAgICAgPyAnUycKKyAgICAgICAgICAgIDogJy0nKSksCisgICAgICAgIGdseXBo LT5waXhlbF93aWR0aCwKKyAgICAgICAgZ2x5cGgtPmZhY2VfaWQsCisgICAgICAgIGdseXBoLT5s ZWZ0X2JveF9saW5lX3AsCisgICAgICAgIGdseXBoLT5yaWdodF9ib3hfbGluZV9wLAorICAgICAg ICBnbHlwaC0+dS54d2lkZ2V0LAorICAgICAgICBnbHlwaC0+eCwgZ2x5cGgtPnksIGdseXBoLT5o cG9zLCBnbHlwaC0+dnBvcywgZ2x5cGgtPnp2X3AgPyAiWlYiIDogIi0tIiwKKyAgICAgICAgJy4n KTsKKyNlbmRpZgorICBzd2l0Y2ggKGFjdGlvbl90eXBlKQorICB7CisvKiAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgIC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zID09IHRlbXBfaHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgb3BvaW50X3kgPT0gZ2x5cGgtPnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIG9wb2ludF92cG9zID09IHRlbXBfdnBvcyk7CisgICAgICBpbnQgX2Z4LCBmeSwgX2gs IF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRyeSAodywgcm93LCB0ZW1wX3gs ICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBfeSwgJmZ5LCB0 ZW1wX2hwb3MsIHRlbXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Jl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgIGlmICh0ZW1wX3gg PD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAgICAgJiYgIXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAg ICAgICAgbWNfaGVscGVyICh3LCB0ZW1wX3gsIC0xLCB0ZW1wX3ksIGZ5LCB0ZW1wX2hwb3MsIHRl bXBfdnBvcywKKyAgICAgICAgICAgICAgICAgICAtMSwgY3Vyc29yX3R5cGUsIGN1cnNvcl93aWR0 aCwgZm9yZWdyb3VuZCwKKyAgICAgICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIHRlbXBfZmFj ZV9pZCksIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgTUNfR0xZUEgs IHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgIC8qIEl0IGlzIHBvc3NpYmxlIHRvIHVzZSBN Q19HTFlQSCBhbmQgYWRqdXN0IHRoZSBmeCBjb29yZGluYXRlOyBob3dldmVyLAorICAgICAgdGhl IG1pZGRsZS1kb3QgLyBzcGFjZSBnbHlwaCBvbiBhIHdvcmQtd3JhcHBlZCBsaW5lIHdpbGwgYmUg b3ZlcndyaXR0ZW4KKyAgICAgIG51bWVyb3VzIHRpbWVzIGFuZCBpcyB1bnNpZ2h0bHkuICovCisg ICAgICBpZiAoZ2x5cGggLSByb3ctPmdseXBoc1tURVhUX0FSRUFdID09IHJvdy0+dXNlZFthcmVh XSAtIDEpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgX2Z4LCBmeSwgX2gsIF93ZDsKKyAgICAg ICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVtcF94LCAmX2Z4LAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcF95LCAmZnksIHRlbXBf aHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Jl9oLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAgICAgICAgICB0ZW1wX3gg Kz0gZ2x5cGgtPnBpeGVsX3dpZHRoOworICAgICAgICAgIHdoaWxlICh0ZW1wX3ggPD0gdGV4dF9h cmVhX3dpZHRoKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBtY19oZWxwZXIgKHcsIHRl bXBfeCwgLTEsIHRlbXBfeSwgZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAg ICAgICAgICAgICAgIC0xLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLAor ICAgICAgICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNlX2lkKSwgYWN0 aXZlX3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNQ19HTFlQSExFU1Ms IHRlbXBfY2hhcnBvcywgcmVzdWx0KTsKKyAgICAgICAgICAgICAgdGVtcF94ICs9IGZyYW1lX2No YXJfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIGJyZ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iZXJzLiAqLworICAgICAgYm9vbCB6dl9wID0gKGdseXBoIC0gcm93LT5nbHlwaHNbVEVY VF9BUkVBXSA9PSByb3ctPnVzZWRbYXJlYV0gLSAxCisgICAgICAgICAgICAgICAgICAgJiYgTUFU UklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSA9PSBaVik7CisgICAgICBib29sIGN1cnNvcl9pbl9m cmluZ2VfcCA9IG9wb2ludF94ICsgZ2x5cGgtPnBpeGVsX3dpZHRoID49IHRleHRfYXJlYV93aWR0 aDsKKyAgICAgIGludCBmbGF2b3IgPSAoY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAg ICAgICAgICYmIHJvdy0+dHJ1bmNhdGVkX29uX3JpZ2h0X3ApCisgICAgICAgICAgICAgICAgICAg ICA/IE1DX1ZFUlRJQ0FMX0JBUl9SSUdIVF9BUlJPVworICAgICAgICAgICAgICAgICAgIDogKGN1 cnNvcl9pbl9mcmluZ2VfcAorICAgICAgICAgICAgICAgICAgICAgICYmIHJvdy0+Y29udGludWVk X3ApCisgICAgICAgICAgICAgICAgICAgICA/IE1DX1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAg ICAgICAgICAgICAgICAgICA6IChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICAgICAgICAgICAg ICAgICAmJiAhcm93LT50cnVuY2F0ZWRfb25fcmlnaHRfcAorICAgICAgICAgICAgICAgICAgICAg ICYmICFyb3ctPmNvbnRpbnVlZF9wKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19WRVJUSUNB TF9CQVIKKyAgICAgICAgICAgICAgICAgICA6IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJF QV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIG9wb2lu dF94ID4gcmVsYXRpdmVfeCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZUEhMRVNTCisg ICAgICAgICAgICAgICAgICAgOiAoenZfcCkKKyAgICAgICAgICAgICAgICAgICAgID8gTUNfR0xZ UEhMRVNTCisgICAgICAgICAgICAgICAgICAgOiBNQ19HTFlQSDsKKyAgICAgIGlmIChmbGF2b3Ig PT0gTUNfVkVSVElDQUxfQkFSX1JJR0hUX0FSUk9XCisgICAgICAgICAgfHwgZmxhdm9yID09IE1D X1ZFUlRJQ0FMX0JBUl9CQUNLU0xBU0gKKyAgICAgICAgICB8fCBmbGF2b3IgPT0gTUNfVkVSVElD QUxfQkFSKQorICAgICAgICBjdXJzb3JfdHlwZSA9IFJJR0hUX0ZSSU5HRV9CSVRNQVA7CisgICAg ICBpbnQgX2Z4LCBfZnksIGgsIF93ZDsKKyAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRy eSAodywgcm93LCB0ZW1wX3gsICZfZngsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHRlbXBfeSwgJl9meSwgdGVtcF9ocG9zLCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICZoLCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCAmX3dkKTsK KyAgICAgIGludCBmeCA9IFdJTkRPV19URVhUX1RPX0ZSQU1FX1BJWEVMX1ggKHcsIG9wb2ludF94 KTsKKyAgICAgIG1jX2hlbHBlciAodywgdGVtcF94LCBmeCwgdGVtcF95LCAtMSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsCisgICAgICAgICAgICAgICAgIGgsIGN1cnNvcl90eXBlLCBjdXJzb3Jfd2lk dGgsIGZvcmVncm91bmQsCisgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgdGVtcF9mYWNl X2lkKSwgYWN0aXZlX3AsCisgICAgICAgICAgICAgICAgIG1pbmltYWxfcCwgZmxhdm9yLCB0ZW1w X2NoYXJwb3MsIHJlc3VsdCk7CisgICAgICBicmVhazsKKyAgICB9CisvKiAtLS0tLS0tLS0tLS0t L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nbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2Fy ZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICYmIE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJv dykgPT0gWlYpOworICAgICAgaW50IGZsYXZvciA9IChnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRf QVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAgICYmIGZp bGxfY29sdW1uX3ggPiByZWxhdGl2ZV94KQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQ SExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICh6dl9wKQorICAgICAgICAgICAgICAgICAgICAg PyBNQ19HTFlQSExFU1MKKyAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoQlZBUiAoYiwgY3Jv c3NoYWlycykpCisgICAgICAgICAgICAgICAgICAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIg KHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxlcikpCisgICAgICAgICAgICAg ICAgICAgICAgJiYgb3BvaW50X3kgPT0gdGVtcF95CisgICAgICAgICAgICAgICAgICAgICAgJiYg b3BvaW50X3Zwb3MgPT0gdGVtcF92cG9zKQorICAgICAgICAgICAgICAgICAgICAgPyBNQ19HTFlQ SExFU1MKKyAgICAgICAgICAgICAgICAgICA6IE1DX0dMWVBIOworICAgICAgaW50IF9meCwgX2Z5 LCBoLCBfd2Q7CisgICAgICBtY19nZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgdGVt cF94LCAmX2Z4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wX3ksICZf ZnksIHRlbXBfaHBvcywgdGVtcF92cG9zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmaCwgY3Vyc29yX3R5cGUsIGN1cn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sID4gMCkKKyAgICB7CisgICAgICB3LT5waHlzX2N1 cnNvci54ID0gdy0+b3V0cHV0X2N1cnNvci54OworICAgICAgdy0+cGh5c19jdXJzb3IueSA9IHct Pm91dHB1dF9jdXJzb3IueTsKKyAgICAgIHctPnBoeXNfY3Vyc29yLmhwb3MgPSB3LT5vdXRwdXRf Y3Vyc29yLmhwb3M7CisgICAgICB3LT5waHlzX2N1cnNvci52cG9zID0gdy0+b3V0cHV0X2N1cnNv ci52cG9zOworICAgIH0KKyAgZXJhc2VfcGh5c19jdXJzb3IgKHcpOworLyogLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFJFUExBQ0UgVEhFIFJFQUwg Q1VSU09SICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LSAqLworICBwdHJkaWZmX3QgY3VycmVudF9jb2w7CisgIGJvb2wgZmlsbF9jb2x1bW5fcCA9ICFO SUxQIChCVkFSIChiLCBmaWxsX2NvbHVtbikpOworICBpbnQgZmlsbF9jb2wgPSBYRklYTlVNIChC VkFSIChiLCBmaWxsX2NvbHVtbikpOworICBlbnVtIGZhY2VfaWQgZXZlbl9mYWNlX2lkID0KKyAg ICAoIWFjdGl2ZV9wCisgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IGNyb3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgID8gbG9va3VwX25hbWVkX2ZhY2Ug KHcsIGYsIGludGVybiAoIistZXZlbi1udW1iZXJlZC1jb2x1bW4taW5hY3RpdmUtZmFjZSIpLCB0 cnVlKQorICAgIDog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X3R5cGUgPSAoQ09OU1AgKGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtY19saXNwX3RvX2N1cnNv cl90eXBlIChYQ0FSIChjdXJzb3JfbGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDogbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoY3Vyc29yX2xp c3BfdHlwZSk7CisgIGludCB0ZW1wX2N1cnNvcl93aWR0aCA9IChDT05TUCAoY3Vyc29yX2xpc3Bf dHlwZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICA/IFhGSVhOVU0gKFhDQVIgKFhDRFIg KGN1cnNvcl9saXNwX3R5cGUpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDogMTsKKyAg ZW51bSBmYWNlX2lkIGN1cnNvcl9mYWNlX2lkID0KKyAgICAoIWFjdGl2ZV9wCisgICAgICYmICFO SUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNyb3NzaGFpcnNfaW5hY3RpdmVfd2lu ZG93cykpKQorICAgID8gbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1m YWtlLWN1cnNvci1pbmFjdGl2ZS1mYWNlIiksIHRydWUpCisgICAgOiBsb29rdXBfbmFtZWRfZmFj ZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vyc29yLWZhY2UiKSwgdHJ1ZSk7CisgIHN0 cnVjdCBmYWNlICpjdXJzb3JfZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgY3Vyc29yX2ZhY2VfaWQp OworICBMaXNwX09iamVjdCBjdXJzb3JfY29sb3IgPSBjdXJzb3JfZmFjZS0+bGZhY2VbTEZBQ0Vf Rk9SRUdST1VORF9JTkRFWF07CisgIENIRUNLX1NUUklORyAoY3Vyc29yX2NvbG9yKTsKKyAgY3Vy cmVudF9jb2wgPSBtY19jdXJyZW50X2NvbHVtbiAodywgb3BvaW50X3B0KTsKKyAgLyogcmVkICov CisgIGlmIChjdXJyZW50X2NvbCAlIDIgIT0gMAorICAgICAgJiYgIWZpbGxfY29sdW1uX3ApCisg ICAgZm9yZWdyb3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7CisgIC8qIHllbGxvdyAqLworICBpZiAo Y3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICYmICFmaWxsX2NvbHVtbl9wKQorICAgIGZvcmVn cm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyogcmVkICovCisgIGlmIChjdXJyZW50X2Nv bCAlIDIgIT0gMAorICAgICAgJiYgZmlsbF9jb2x1bW5fcAorICAgICAgJiYgY3VycmVudF9jb2wg PD0gZmlsbF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IG9kZF9jb2xvcl92ZWN0b3I7CisgIC8qIHll bGxvdyAqLworICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICYmIGZpbGxfY29sdW1u X3AKKyAgICAgICYmIGN1cnJlbnRfY29sIDw9IGZpbGxfY29sKQorICAgIGZvcmVncm91bmQgPSBl dmVuX2NvbG9yX3ZlY3RvcjsKKyAgLyogZ3JlZW4gKi8KKyAgaWYgKGZpbGxfY29sdW1uX3AKKyAg ICAgICYmIGN1cnJlbnRfY29sID4gZmlsbF9jb2wpCisgICAgZm9yZWdyb3VuZCA9IGZpbGxfY29s b3JfdmVjdG9yOworICBMaXNwX09iamVjdCBjdXJzb3JfZmcgPSAoYWN0aXZlX3ApCisgICAgICAg ICAgICAgICAgICAgICAgICAgID8gZm9yZWdyb3VuZAorICAgICAgICAgICAgICAgICAgICAgICAg ICA6IG1jX2NvbG9yX3ZlY3Rvcl9jYWxjICh3LCBjdXJzb3JfY29sb3IpOworICBzdHJ1Y3QgZ2x5 cGggKmN1cnNvcl9nbHlwaCA9CisgICAgICAgICAgICBtY19nZXRfcGh5c19jdX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SAoRm50aCAobWFrZV9maXhudW0gKDApLCBzcGVjcykpOworICAg ICAgbGlzcF90eXBlID0gRm50aCAobWFrZV9maXhudW0gKDEpLCBzcGVjcyk7CisgICAgICBpZiAo Q09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgIGN1cnNvcl90eXBlID0gbWNfbGlzcF90b19jdXJz b3JfdHlwZSAoWENBUiAobGlzcF90eXBlKSk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICBjdXJz b3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKGxpc3BfdHlwZSk7CisgICAgICBpZiAo Q09OU1AgKGxpc3BfdHlwZSkpCisgICAgICAgIGN1cnNvcl93aWR0aCA9IFhGSVhOVU0gKFhDQVIg KFhDRFIgKGxpc3BfdHlwZSkpKTsKKyAgICAgICAgZWxzZQorICAgICAgICAgIGN1cnNvcl93aWR0 aCA9IDE7CisgICAgICBmb3JlZ3JvdW5kID0gRm50aCAobWFrZV9maXhudW0gKDIpLCBzcGVjcyk7 CisgICAgICBpZiAoU1RSSU5HUCAoZm9yZWdyb3VuZCkpCisgICAgICAgIGZvcmVncm91bmQgPSBt Y19jb2xvcl92ZWN0b3JfY2FsYyAodywgZm9yZWdyb3VuZCk7CisgICAgICBzdHJ1Y3QgZ2x5cGhf bWF0cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgICAgIGludCByb3dfc3RhcnQs IHJvd19lbmQsIHdpbmRvd19yb3dfc3RhcnQsIHdpbmRvd19yb3dfZW5kOworICAgICAgaW50IGk7 CisgICAgICBMaXNwX09iamVjdCB0ZW1wID0gUW5pbDsKKyAgICAgIExpc3BfT2JqZWN0IHZzcGVj cyA9IFFuaWw7CisgICAgICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsgKytpKQorICAg ICAgICB7CisgICAgICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAobWF0 cml4LCBpKTsKKyAgICAgICAgICByb3dfc3RhcnQgPSBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1Mg KHJvdyk7CisgICAgICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3JtYXQgPiAwICYmIGkgPT0gMSkK KyAgICAgICAgICAgICAgIHx8IChoZWFkZXJfbGluZV9mb3JtYXQgPT0gMCAmJiBpID09IDApKQor ICAgICAgICAgICAgd2luZG93X3Jvd19zdGFydCA9IHJvd19zdGFydDsKKyAgICAgICAgICBpZiAo IXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICB3aW5kb3dfcm93 X2VuZCA9IHJvd19lbmQ7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAg ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgcm93X2VuZCA9 IE1BVFJJWF9ST1dfRU5EX0NIQVJQT1MgKHJvdyk7CisgICAgICAgICAgICAgICAgdGVtcCA9IGxp c3RuIChDT05TVFlQRV9IRUFQLCAzLCBtYWtlX2ZpeG51bSAoaSksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAocm93X3N0YXJ0KSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2VfZml4 bnVtIChyb3dfZW5kKSk7CisgICAgICAgICAgICAgICAgdnNwZWNzID0gRmNvbnMgKHRlbXAsIHZz cGVjcyk7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgaWYgKHBvc2ludCA+PSB3 aW5kb3dfcm93X3N0YXJ0CisgICAgICAgICAgJiYgcG9zaW50IDw9IHdpbmRvd19yb3dfZW5kKQor ICAgICAgICB7CisgICAgICAgIExpc3BfT2JqZWN0IHZsaXN0OworICAgICAgICBmb3IgKHZsaXN0 ID0gRm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgICAgICAgIENPTlNQICh2bGlzdCk7CisgICAg ICAgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgICAgICAgeworICAgICAgICAgICAg aW50IGNvdW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDApLCBYQ0FSICh2bGlzdCkp KTsKKyAgICAgICAgICAgIGludCBwb3Nfc3RhcnQgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51 bSAoMSksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgaW50IHBvc19lbmQgPSBYRklYTlVN IChGbnRoIChtYWtlX2ZpeG51bSAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgICAgICAgc3Ry dWN0IGdseXBoX3JvdyAqcm93ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50 KTsKKyAgICAgICAgICAgIGludCBhcmVhOworICAgICAgICAgICAgaW50IHJlbGF0aXZlX3ggPSAw OworICAgICAgICAgICAgZm9yIChhcmVhID0gTEVGVF9NQVJHSU5fQVJFQTsgYXJlYSA8IExBU1Rf QVJFQTsgKythcmVhKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgc3RydWN0IGds eXBoICpnbHlwaCA9IHJvdy0+Z2x5cGhzW2FyZWFdOworICAgICAgICAgICAgICAgIHN0cnVjdCBn bHlwaCAqZ2x5cGhfZW5kID0gZ2x5cGggKyByb3ctPnVzZWRbYXJlYV07CisgICAgICAgICAgICAg ICAgaWYgKGFyZWEgPT0gVEVYVF9BUkVBICYmIGdseXBoID09IGdseXBoX2VuZCAmJiBnbHlwaC0+ Y2hhcnBvcyA+IDApCisgICAgICAgICAgICAgICAgICArK2dseXBoX2VuZDsKKyAgICAgICAgICAg ICAgICBpZiAobWNfc3RkZXJyX3AKKyAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGggPCBnbHlw aF9lbmQpCisgICAgICAgICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsCisiXG5jb3VudCAoJWQp IHwgd2luZG93X3Jvd19zdGFydC9lbmQgKCVkLyVkKSB8IHJvd19zdGFydC9lbmQgKCVkLyVkKVxu XAorPT09PT09PT09PT09PT09PT09PT09PT09PT09PSBNVUxUSVBMRSBDVVJTT1JTID09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PVxuXAorR2x5cGgjL1RvdGFsIFJlbC5YIFQgICAgICAg UG9zIE8gICBXICAgICBDb2RlIEZhY2UgTFIgICAgIFggICAgWSBIUE9TIFZQT1MgWlYgQ1xuIiwK K2NvdW50LCB3aW5kb3dfcm93X3N0YXJ0LCB3aW5kb3dfcm93X2VuZCwgcG9zX3N0YXJ0LCBwb3Nf ZW5kKTsKKyAgICAgICAgICAgICAgICBmb3IgKDsgZ2x5cGggPCBnbHlwaF9lbmQ7ICsrZ2x5cGgp CisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICgoKGhlYWRlcl9s aW5lX2Zvcm1hdCA+IDAgJiYgY291bnQgPiAwKQorICAgICAgICAgICAgICAgICAgICAgICAgIHx8 IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgKGds eXBoLT5jaGFycG9zID09IHBvc2ludAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFRo ZSBzcGFjZSBhcHBlbmRlZCB0byBhIHJvdyBlbmRpbmcgd2l0aCBhIG5ldyBsaW5lCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZG9lcyBub3QgaGF2ZSBhIGBnbHlwaC0+Y2hhcnBvc2AgKC0x LCAwKSB0aGF0IHdlIGNhbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZSBmb3IgdGhp cyBwYXJ0aWN1bGFyIGFwcGxpY2F0aW9uLiAgV2hlbiB0aGVyZSBpcyBhCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgYGJ1ZmZlci1kaXNwbGF5LXRhYmxlJyBlbnRyeSB0aGF0IGFzc2lnbnMg YSB2aXNpYmxlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2x5cGggdG8gYSBuZXcgbGlu ZSwgdGhlcmUgaXMgbm8gcHJvYmxlbSBiZWNhdXNlIHRoYXQKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBnbHlwaCBoYXMgYSBgZ2x5cGgtPmNoYXJwb3MnIHRoYXQgd2UgY2FuIHVzZS4gIFdo ZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBubyB2aXNpYmxlIEVPTCBnbHlwaCBleGlz dHMsIHdlIHVzZSB0aGUgZm9sbG93aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVz dDogIHRoZSBhcHBlbmRlZCBzcGFjZSBoYXMgYSBwb3NpdGlvbiB0aGF0IGlzIG9uZQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxlc3MgdGhhbiB0aGUgZW5kIG9mIHRoZSBtYXRyaXggcm93 LiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IChnbHlwaCAtIHJvdy0+Z2x5cGhz W1RFWFRfQVJFQV0gPT0gcm93LT51c2VkW2FyZWFdIC0gMQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAmJiBwb3NpbnQgPT0gTUFUUklYX1JPV19FTkRfQ0hBUlBPUyAocm93KSAtIDEp KQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnkgPD0gd2luZG93X3RleHRfYm90 dG9tX3kgKHcpKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAg ICAgIGN1cnJlbnRfY29sID0gbWNfY3VycmVudF9jb2x1bW4gKHcsIHBvc2ludCk7CisgICAgICAg ICAgICAgICAgICAgICAgICBpZiAoTklMUCAoZm9yZWdyb3VuZCkpCisgICAgICAgICAgICAgICAg ICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiByZWQgKi8KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAyICE9IDAKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgIWZpbGxfY29sdW1uX3ApCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5kID0gb2RkX2NvbG9yX3ZlY3RvcjsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAvKiB5ZWxsb3cgKi8KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgIWZpbGxfY29sdW1uX3ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBm b3JlZ3JvdW5kID0gZXZlbl9jb2xvcl92ZWN0b3I7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgLyogcmVkICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRfY29s ICUgMiAhPSAwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGZpbGxfY29sdW1u X3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgY3VycmVudF9jb2wgPD0gZmls bF9jb2wpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlZ3JvdW5kID0gb2RkX2Nv bG9yX3ZlY3RvcjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB5ZWxsb3cgKi8KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudF9jb2wgJSAyID09IDAKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZmlsbF9jb2x1bW5fcAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAmJiBjdXJyZW50X2NvbCA8PSBmaWxsX2NvbCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGZvcmVncm91bmQgPSBldmVuX2NvbG9yX3ZlY3RvcjsKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBncmVlbiAqLworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGlmIChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICYmIGN1cnJlbnRfY29sID4gZmlsbF9jb2wpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBmb3JlZ3JvdW5kID0gZmlsbF9jb2xvcl92ZWN0b3I7CisgICAgICAgICAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAocm93LCBnbHlwaCwg YXJlYSwgcmVsYXRpdmVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdywg cG9zaW50LCBjdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBNVUxUSVBMRV9D VVJTT1JTLCAmcmVzdWx0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtY19zdGRl cnJfcCkKKyAgICAgICAgICAgICAgICAgICAgICAgIG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5cGgs IGFyZWEsIHJlbGF0aXZlX3gpOworICAgICAgICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGds eXBoLT5waXhlbF93aWR0aDsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgfQor ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgaWYgKHVwZGF0aW5nX2ZyYW1lX3ApCisg ICAgdXBkYXRlX2VuZCAoWEZSQU1FICh3LT5mcmFtZSkpOworLyogYHctPm11bHRpcGxlX2N1cnNv cnNfY2FjaGUnIGlzIHNldCBmb3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ZG93X2NoYXIsIGFjdGl2ZV9wLCBtaW5pbWFsX3ApOworICAgIH0KKyNl bmRpZgorICBib29sIG1jX3N0ZGVycl9wID0gIU5JTFAgKEJWQVIgKGN1cnJlbnRfYnVmZmVyLCBt Y19zdGRlcnIpKTsKKyAgcHRyZGlmZl90IG9wb2ludF9wdCA9ICh3ID09IFhXSU5ET1cgKHNlbGVj dGVkX3dpbmRvdykpCisgICAgICAgICAgICAgICAgICAgICAgICA/IFBUCisgICAgICAgICAgICAg ICAgICAgICAgICA6IFhGSVhOVU0gKEZtYXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOworICBp bnQgb3BvaW50X3ggPSB3LT5waHlzX2N1cnNvci54OworICBpbnQgb3BvaW50X3kgPSB3LT5waHlz X2N1cnNvci55OworICBpbnQgb3BvaW50X2hwb3MgPSB3LT5waHlzX2N1cnNvci5ocG9zOworICBp bnQgb3BvaW50X3Zwb3MgPSB3LT5waHlzX2N1cnNvci52cG9zOworICBzdHJ1Y3QgZ2x5cGggKnJl YWxfcGh5c19jdXJzb3JfZ2x5cGggPQorICAgIG1jX2dldF9waHlzX2N1cnNvcl9nbHlwaCAodywg b3BvaW50X2hwb3MsIG9wb2ludF92cG9zKTsKKyAgc3RydWN0IGZyYW1lICpmID0gWEZSQU1FICh3 LT5mcmFtZSk7CisgIExpc3BfT2JqZWN0IGJ1ZiA9IHctPmNvbnRlbnRzOworICBDSEVDS19CVUZG RVIgKGJ1Zik7CisgIHN0cnVjdCBidWZmZXIgKmIgPSBYQlVGRkVSIChidWYpOworICBzdHJ1Y3Qg YnVmZmVyICpvbGRfYnVmZmVyID0gTlVMTDsKKyAgTGlzcF9PYmplY3Qgd2luZG93OworICBYU0VU V0lORE9XICh3aW5kb3csIHcpOworICAvKiBXaGVuIHN3aWNoaW5nIHRvIGFub3RoZXIgYnVmZmVy IChlLmcuLCBhIG5ldyBidWZmZXIpLCBgdy0+Y29udGVudHNgIG1heSBub3QKKyAgbmVjZXNzYXJp bHkg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mZmVyKQorICAgICAgICBzZXRfYnVm ZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisgIGlmICgh QlVGRkVSUCAoYnVmKSkKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0 X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQorICBp ZiAoTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlycykpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVm ZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJl dHVybjsKKyAgICB9CisgIGlmIChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzX2hvcml6b250YWxf cnVsZXIpKQorICAgICAgJiYgTklMUCAoQlZBUiAoYiwgY3Jvc3NoYWlyc192ZXJ0aWNhbF9ydWxl cikpKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAgICAgICBzZXRfYnVmZmVyX2lu dGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAgICB9CisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJFR0lOIEpPVVJORVkg Li4uCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBG UkFNRV9DT0xVTU5fV0lEVEggKGYpOworICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2Jv eF93aWR0aCAodywgVEVYVF9BUkVBKTsKKyAgYm9vbCBjdXJzb3JfaW5fZnJpbmdlX3AgPSB3LT5v dXRwdXRfY3Vyc29yLnggKyBmcmFtZV9jaGFyX3dpZHRoID49IHRleHRfYXJlYV93aWR0aDsKKyAg c3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93OworICBpbnQgY3Vyc29yX3dpZHRoID0gMTsKKyAg cHRyZGlmZl90IHBvc2ludCA9IC0xOworICBwdHJkaWZmX3QgY3VycmVudF9jb2wgPSBtY19jdXJy ZW50X2NvbHVtbiAodywgb3BvaW50X3B0KTsKKyAgYm9vbCBmaWxsX2NvbHVtbl9wID0gIU5JTFAg KEJWQVIgKGIsIGZpbGxfY29sdW1uKSk7CisgIGludCBmaWxsX2NvbCA9IFhGSVhOVU0gKEJWQVIg KGIsIGZpbGxfY29sdW1uKSk7CisgIGludCBoc2NsX3ggPSB3LT5oc2Nyb2xsICogZnJhbWVfY2hh cl93aWR0aDsKKyAgaW50IGZpbGxfY29sdW1uX3ggPSAoZmlsbF9jb2x1bW5fcAorICAgICAgICAg ICAgICAgICAgICAgICAmJiAhTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgID8gKGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0aCkgKyB3LT5tYy5s bnVtX3BpeGVsX3dpZHRoIC0gaHNjbF94CisgICAgICAgICAgICAgICAgICAgICAgOiAoZmlsbF9j b2x1bW5fcAorICAgICAgICAgICAgICAgICAgICAgICAgICYmIE5JTFAgKFZkaXNwbGF5X2xpbmVf bnVtYmVycykpCisgICAgICAgICAgICAgICAgICAgICAgICA/IChmaWxsX2NvbCAqIGZyYW1lX2No YXJfd2lkdGgpIC0gaHNjbF94CisgICAgICAgICAgICAgICAgICAgICAgOiAwOworICBMaXNwX09i amVjdCByZXN1bHQgPSBRbmlsOworICBpbnQgZmxhdm9yOworICAvKiBWYWx1ZXMgZm9yIHRoZSBj dXJyZW50IGNvbHVtbiBvZiB0aGUgdmVydGljYWwgbGluZS4gKi8KKyAgTGlzcF9PYmplY3QgZm9y ZWdyb3VuZCA9IEZtYWtlX3ZlY3RvciAobWFrZV9maXhudW0gKDMpLCBRbmlsKTsKKyAgZW51bSBm YWNlX2lkIGZhY2VfaWQ7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgQ09MT1IgT0YgQ1JPU1NIQUlSUworKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq ICovCisgIGVudW0gZmFjZV9pZCBldmVuX2ZhY2VfaWQgPQorICAgICghYWN0aXZlX3AKKyAgICAg JiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jvc3NoYWlyc19pbmFjdGl2 ZV93aW5kb3dzKSkpCisgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1l dmVuLW51bWJlcmVkLWNvbHVtbi1pbmFjdGl2ZS1mYWNlIiksIHRydWUpCisgICAgOiBsb29rdXBf bmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1ldmVuLW51bWJlcmVkLWNvbHVtbi1mYWNlIiks IHRydWUpOworICBzdHJ1Y3QgZmFjZSAqZXZlbl9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBldmVu X2ZhY2VfaWQpOworICBMaXNwX09iamVjdCBldmVuX2NvbG9yID0gZXZlbl9mYWNlLT5sZmFjZVtM RkFDRV9GT1JFR1JPVU5EX0lOREVYXTsKKyAgQ0hFQ0tfU1RSSU5HIChldmVuX2NvbG9yKTsKKyAg TGlzcF9PYmplY3QgZXZlbl9jb2xvcl92ZWN0b3IgPSBtY19jb2xvcl92ZWN0b3JfY2FsYyAodywg ZXZlbl9jb2xvcik7CisgIGVudW0gZmFjZV9pZCBvZGRfZmFjZV9pZCA9CisgIC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Fm b3JlbWVudGlvbmVkIGNvb3JkaW5hdGVzLCByZXNldHRpbmcgdGhvc2UgY29vcmRpbmF0ZXMgYWZ0 ZXIgdGhlIGZhY3QKK2lzIGluc3VmZmljaWVudCB0byBmaXggdGhlIHByb2JsZW0uICBXZSB1c2Ug YHctPm91dHB1dF9jdXJzb3IueC95L2hwb3MvdnBvc2AKK2JlY2F1c2UgdGhvc2UgY29vcmRpbmF0 ZXMgYXJlIGNvcnJlY3QuICBXZSBmaXggYHctPnBoeXNfY3Vyc29yLngveS9ocG9zL3Zwb3NgCitC RUZPUkUgY2FsbGluZyBgZXJhc2VfcGh5c19jdXJzb3InIHNvIHRoYXQgb3RoZXIgZ29vZGllcyBh cmUgdXBkYXRlZC4gKi8KKyAgaWYgKHctPmhzY3JvbGwgPiAwKQorICAgIHsKKyAgICAgIHctPnBo eXNfY3Vyc29yLnggPSB3LT5vdXRwdXRfY3Vyc29yLng7CisgICAgICB3LT5waHlzX2N1cnNvci55 ID0gdy0+b3V0cHV0X2N1cnNvci55OworICAgICAgdy0+cGh5c19jdXJzb3IuaHBvcyA9IHctPm91 dHB1dF9jdXJzb3IuaHBvczsKKyAgICAgIHctPnBoeXNfY3Vyc29yLnZwb3MgPSB3LT5vdXRwdXRf Y3Vyc29yLnZwb3M7CisgICAgfQorICBpZiAoIW1pbmltYWxfcCkKKyAgICBlcmFzZV9waHlzX2N1 cnNvciAodyk7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgUkVQTEFDRSBUSEUgUkVBTCBDVVJTT1IKKyoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor ICBnbHlwaF9yb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgb3BvaW50X3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B1bndpdHRpbmdseSBjb21lIHVwIHdpdGggc29t ZSB1bmFjY2VwdGFibGUgZm9ybSBvZiB1bnJlY29nbml6ZWQgY3Vyc29yIHR5cGUuICovCisgIExp c3BfT2JqZWN0IGN1cnNvcl9saXNwX3R5cGUgPSBCVkFSIChiLCBtY19yZWFsX2Zha2VfY3Vyc29y KTsKKyAgZW51bSB0ZXh0X2N1cnNvcl9raW5kcyB0ZW1wX2N1cnNvcl90eXBlID0gKENPTlNQIChj dXJzb3JfbGlzcF90eXBlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gbWNfbGlzcF90b19jdXJzb3JfdHlwZSAoWENBUiAoY3Vyc29yX2xpc3BfdHlwZSkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1jX2xpc3Bf dG9fY3Vyc29yX3R5cGUgKGN1cnNvcl9saXNwX3R5cGUpOworICBpbnQgaW5pdGlhbF9jdXJzb3Jf d2lkdGggPSAoQ09OU1AgKGN1cnNvcl9saXNwX3R5cGUpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgPyBYRklYTlVNIChYQ0FSIChYQ0RSIChjdXJzb3JfbGlzcF90eXBlKSkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6IDE7CisgIGVudW0gZmFjZV9pZCBjdXJzb3JfZmFj ZV9pZCA9CisgICAgKCFhY3RpdmVfcAorICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+ Y29udGVudHMpLCBjcm9zc2hhaXJzX2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICA/IGxvb2t1cF9u YW1lZF9mYWNlICh3LCBmLCBpbnRlcm4gKCIrLXJlYWwtZmFrZS1jdXJzb3ItaW5hY3RpdmUtZmFj ZSIpLCB0cnVlKQorICAgIDogbG9va3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVh bC1mYWtlLWN1cnNvci1mYW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jcm9zc2hhaXJzX2ZpbmlzaDsKKyAgICBlbHNlIGlmIChYRlJBTUUgKHctPmZy YW1lKSAhPSBYRlJBTUUgKHctPmZyYW1lKS0+bWNfdXBkYXRpbmdfZnJhbWUpCisgICAgeworICAg ICAgdXBkYXRpbmdfZnJhbWVfcCA9IHRydWU7CisgICAgICB1cGRhdGVfYmVnaW4gKFhGUkFNRSAo dy0+ZnJhbWUpKTsKKyAgICB9CisgIGlmIChjdXJzb3JfaW5fZnJpbmdlX3AKKyAgICAgICYmICFt aW5pbWFsX3ApCisgICAgbWNfaGVscGVyICh3LCBvcG9pbnRfeCwgb3BvaW50X2Z4LCBvcG9pbnRf eSwgb3BvaW50X2Z5LCBvcG9pbnRfaHBvcywKKyAgICAgICAgICAgICAgIG9wb2ludF92cG9zLCBv cG9pbnRfaCwgUklHSFRfRlJJTkdFX0JJVE1BUCwgY3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcsCisg ICAgICAgICAgICAgICBtY19iZ19sc2wgKHcsIGZhY2VfaWQpLCBhY3RpdmVfcCwgbWluaW1hbF9w LCBmbGF2b3IsCisgICAgICAgICAgICAgICBvcG9pbnRfcHQsICZyZXN1bHQpOworICAgIC8qIEVY QU1QTEUgKGJ1ZmZlci1sb2NhbCk6ICAoc2V0cSBtYy1yZWFsLWZha2UtY3Vyc29yIG5pbC8nbm8v Im5vIikgKi8KKyAgICBlbHNlIGlmICghY3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAg JiYgdGVtcF9jdXJzb3JfdHlwZSA9PSBOT19DVVJTT1IKKyAgICAgICAgICAgICAmJiAhbWluaW1h bF9wKQorICAgICAgeworICAgICAgICBpbnQgX3dkID0gMDsKKyAgICAgICAgb3BvaW50X2Z4ID0g LTE7CisgICAgICAgIG9wb2ludF9meSA9IC0xOworICAgICAgICBvcG9pbnRfaCA9IC0xOworICAg ICAgICBpbnQgdGVtcF94ID0gb3BvaW50X3g7CisgICAgICAgIGludCB0ZW1wX3kgPSBvcG9pbnRf eTsKKyAgICAgICAgaW50IHRlbXBfaHBvcyA9IG9wb2ludF9ocG9zOworICAgICAgICBpbnQgdGVt cF92cG9zID0gb3BvaW50X3Zwb3M7CisgICAgICAgIG1jX2dldF9waHlzX2N1cnNvcl9nZW9tZXRy eSAodywgZ2x5cGhfcm93LCB0ZW1wX3gsICZvcG9pbnRfZngsIHRlbXBfeSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAmb3BvaW50X2Z5LCB0ZW1wX2hwb3MsIHRlbXBfdnBv cywgJm9wb2ludF9oLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhCQVJf Q1VSU09SLCBpbml0aWFsX2N1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgIG1jX2hlbHBlciAo dywgdGVtcF94LCBvcG9pbnRfZngsIHRlbXBfeSwgb3BvaW50X2Z5LCB0ZW1wX2hwb3MsCisgICAg ICAgICAgICAgICAgICAgdGVtcF92cG9zLCBvcG9pbnRfaCwgSEJBUl9DVVJTT1IsIGN1cnNvcl93 aWR0aCwgY3Vyc29yX2ZnLAorICAgICAgICAgICAgICAgICAgIG1jX2JnX2xzbCAodywgZmFjZV9p ZCksIGFjdGl2ZV9wLCBtaW5pbWFsX3AsIE1DX0dMWVBILAorICAgICAgICAgICAgICAgICAgIG9w b2ludF9wdCwgJnJlc3VsdCk7CisgICAgICAgIC8qIFVzZSBNQ19HTFlQSExFU1Mgc28gYXMgbm90 IHRvIHN1cGVyaW1wb3NlL292ZXJ3cml0ZSBhbm90aGVyIGdseXBoLiAqLworICAgICAgICBfd2Qg PSAwOworICAgICAgICBvcG9pbnRfZnggPSAtMTsKKyAgICAgICAgb3BvaW50X2Z5ID0gLTE7Cisg ICAgICAgIG9wb2ludF9oID0gLTE7CisgICAgICAgIHRlbXBfeCA9IG9wb2ludF94OworICAgICAg ICB0ZW1wX3kgPSBvcG9pbnRfeTsKKyAgICAgICAgdGVtcF9ocG9zID0gb3BvaW50X2hwb3M7Cisg ICAgICAgIHRlbXBfdnBvcyA9IG9wb2ludF92cG9zOworICAgICAgICBtY19nZXRfcGh5c19jdXJz b3JfZ2VvbWV0cnkgKHcsIGdseXBoX3JvdywgdGVtcF94LCAmb3BvaW50X2Z4LCB0ZW1wX3ksCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsICZvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBCQVJfQ1VSU09SLCBpbml0aWFsX2N1cnNvcl93aWR0aCwgJl93ZCk7CisgICAgICAgIG1j X2hlbHBlciAodywgdGVtcF94LCBvcG9pbnRfZngsIHRlbXBfeSwgb3BvaW50X2Z5LCB0ZW1wX2hw b3MsCisgICAgICAgICAgICAgICAgICAgdGVtcF92cG9zLCBvcG9pbnRfaCwgQkFSX0NVUlNPUiwg Y3Vyc29yX3dpZHRoLCBjdXJzb3JfZmcsCisgICAgICAgICAgICAgICAgICAgbWNfYmdfbHNsICh3 LCBmYWNlX2lkKSwgYWN0aXZlX3AsIG1pbmltYWxfcCwgTUNfR0xZUEhMRVNTLAorICAgICAgICAg ICAgICAgICAgIG9wb2ludF9wdCwgJnJlc3VsdCk7CisgICAgICB9CisgICAgICBlbHNlIGlmICgh Y3Vyc29yX2luX2ZyaW5nZV9wCisgICAgICAgICAgICAgICAmJiAhbWluaW1hbF9wKQorICAgICAg ICB7CisgICAgICAgICAgaW50IF93ZCA9IDA7CisgICAgICAgICAgb3BvaW50X2Z4ID0gLTE7Cisg ICAgICAgICAgb3BvaW50X2Z5ID0gLTE7CisgICAgICAgICAgb3BvaW50X2ggPSAtMTsKKyAgICAg ICAgICBpbnQgdGVtcF94ID0gb3BvaW50X3g7CisgICAgICAgICAgaW50IHRlbXBfeSA9IG9wb2lu dF95OworICAgICAgICAgIGludCB0ZW1wX2hwb3MgPSBvcG9pbnRfaHBvczsKKyAgICAgICAgICBp bnQgdGVtcF92cG9zID0gb3BvaW50X3Zwb3M7CisgICAgICAgICAgbWNfZ2V0X3BoeXNfY3Vyc29y X2dlb21ldHJ5ICh3LCBnbHlwaF9yb3csIHRlbXBfeCwgJm9wb2ludF9meCwgdGVtcF95LAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wb2ludF9meSwgdGVtcF9ocG9z LCB0ZW1wX3Zwb3MsICZvcG9pbnRfaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHRlbXBfY3Vyc29yX3R5cGUsIGluaXRpYWxfY3Vyc29yX3dpZHRoLCAmX3dkKTsKKyAg ICAgICAgICBtY19oZWxwZXIgKHcsIHRlbXBfeCwgb3BvaW50X2Z4LCB0ZW1wX3ksIG9wb2ludF9m eSwgdGVtcF9ocG9zLAorICAgICAgICAgICAgICAgICAgICAgdGVtcF92cG9zLCBvcG9pbnRfaCwg dGVtcF9jdXJzb3JfdHlwZSwgY3Vyc29yX3dpZHRoLAorICAgICAgICAgICAgICAgICAgICAgY3Vy c29yX2ZnLCBtY19iZ19sc2wgKHcsIGZhY2VfaWQpLCBhY3RpdmVfcCwgbWluaW1hbF9wLAorICAg ICAgICAgICAgICAgICAgICAgZmxhdm9yLCBvcG9pbnRfcHQsICZyZXN1bHQpOworICAgICAgICB9 CisgIGlmIChOSUxQIChCVkFSIChiLCBjcm9zc2hhaXJzX2hvcml6b250YWxfcnVsZXIpKSkKKyAg ICBnb3RvIHZlcnRpY2FsX3J1bGVyOworICAgIGVsc2UKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KgorICAgICAgICAgICAgICAgIEhPUklaT05UQUwgUlVMRVI6ICBGSVJTVCBYID0+IEVPTAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmQKKyAgICAgICBIT1JJWk9OVEFMIFJVTEVS OiAgRFJBVyBGTE9BVElORyBHTFlQSExFU1MgTElORSAoRU9MIFRPIEZSSU5HRSkKKyoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworICAgIHsKKyAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdyA9IE1B VFJJWF9ST1cgKHctPmN1cnJlbnRfbWF0cml4LCBvcG9pbnRfdnBvcyk7CisgICAgICBpbnQgYXJl YTsKKyAgICAgIGludCByZWxhdGl2ZV94ID0gMDsKKyAgICAgIGZvciAoYXJlYSA9IExFRlRfTUFS R0lOX0FSRUE7IGFyZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgeworICAgICAgICAg IHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAgICAgICBzdHJ1 Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAgICAgICAg IC8qIEdseXBoIGZvciBhIGxpbmUgZW5kIGluIHRleHQuICAqLworICAgICAgICAgIGlmIChhcmVh ID09IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQgJiYgZ2x5cGgtPmNoYXJwb3MgPiAw KQorICAgICAgICAgICAgKytnbHlwaF9lbmQ7CisgICAgICAgICAgaWYgKG1jX3N0ZGVycl9wCisg ICAgICAgICAgICAgICYmIGdseXBoIDwgZ2x5cGhfZW5kKQorICAgICAgICAgICAgZnByaW50ZiAo c3RkZXJyLAorIlxuPT09PT09PT09PT09PT09PT09PT09PT09PT09PSBIT1JJWk9OVEFMIFJVTEVS ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblwKK0dseXBoIy9Ub3RhbCBSZWwu WCBUICAgICAgIFBvcyBPICAgVyAgICAgQ29kZSBGYWNlIExSICAgICBYICAgIFkgSFBPUyBWUE9T IFpWIENcbiIpOworICAgICAgICAgIGZvciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkK KyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgbWNfZW5naW5lIChyb3csIGdseXBoLCBhcmVh LCByZWxhdGl2ZV94LAorICAgICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgSEJBUl9D VVJTT1IsIGN1cnNvcl93aWR0aCwgZm9yZWdyb3VuZCwgYWN0aXZlX3AsCisgICAgICAgICAgICAg ICAgICAgICAgICAgbWluaW1hbF9wLCBIT1JJWk9OVEFMX1JVTEVSLCAmcmVzdWx0KTsKKyAgICAg ICAgICAgICAgcmVsYXRpdmVfeCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAg VkVSVElDQUwgUlVMRVI6ICBDT01CSU5BVElPTiBPRiBHTFlQSCAmIEdMWVBITEVTUyBDVVJTT1JT CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgdmVydGljYWxfcnVsZXI6CisgIGlmIChOSUxQ IChCVkFSIChiLCBjcm9zc2hhaXJzX3ZlcnRpY2FsX3J1bGVyKSkKKyAgICAgIHx8IGZpbGxfY29s dW1uX3RydW1wc19wKQorICAgIGdvdG8gY3Jvc3NoYWlyc19maW5pc2g7CisgICAgZWxzZQorICAg ICAgeworICAgICAgICBpbnQgaGVhZGVyX2xpbmVfZm9ybWF0ID0gV0lORE9XX0hFQURFUl9MSU5F X0hFSUdIVCAodyk7CisgICAgICAgIHN0cnVjdCBnbHlwaF9tYXRyaXggKm1hdHJpeCA9IHctPmN1 cnJlbnRfbWF0cml4OworICAgICAgICBpbnQgcm93X3N0YXJ0LCByb3dfZW5kLCB3aW5kb3dfcm93 X3N0YXJ0LCB3aW5kb3dfcm93X2VuZDsKKyAgICAgICAgaW50IGk7CisgICAgICAgIExpc3BfT2Jq ZWN0IHRlbXAgPSBRbmlsOworICAgICAgICBMaXNwX09iamVjdCB2c3BlY3MgPSBRbmlsOworICAg ICAgICBmb3IgKGkgPSAwOyBpIDwgbWF0cml4LT5ucm93czsgKytpKQorICAgICAgICAgIHsKKyAg ICAgICAgICAgIHN0cnVjdCBnbHlwaF9yb3cgKnJvdyA9IE1BVFJJWF9ST1cgKG1hdHJpeCwgaSk7 CisgICAgICAgICAgICByb3dfc3RhcnQgPSBNQVRSSVhfUk9XX1NUQVJUX0NIQVJQT1MgKHJvdyk7 CisgICAgICAgICAgICBpZiAoKGhlYWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgaSA9PSAxKQorICAg ICAgICAgICAgICAgICB8fCAoaGVhZGVyX2xpbmVfZm9ybWF0ID09IDAgJiYgaSA9PSAwKSkKKyAg ICAgICAgICAgICAgd2luZG93X3Jvd19zdGFydCA9IHJvd19zdGFydDsKKyAgICAgICAgICAgIGlm ICghcm93LT5lbmFibGVkX3ApCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICB3aW5k b3dfcm93X2VuZCA9IHJvd19lbmQ7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgIHJvd19lbmQgPSBNQVRSSVhfUk9XX0VORF9DSEFSUE9TIChyb3cpOworICAgICAgICAg ICAgICAgICAgdGVtcCA9IGxpc3RuIChDT05TVFlQRV9IRUFQLCAzLCBtYWtlX2ZpeG51bSAoaSks CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ha2Vf Zml4bnVtIChyb3dfc3RhcnQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBtYWtlX2ZpeG51bSAocm93X2VuZCkpOworICAgICAgICAgICAgICAgICAg dnNwZWNzID0gRmNvbnMgKHRlbXAsIHZzcGVjcyk7CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgIH0KKyAgICAgICAgTGlzcF9PYmplY3Qgdmxpc3Q7CisgICAgICAgIGZvciAodmxpc3QgPSBG bnJldmVyc2UgKHZzcGVjcyk7CisgICAgICAgICAgICAgQ09OU1AgKHZsaXN0KTsKKyAgICAgICAg ICAgICB2bGlzdCA9IFhDRFIgKHZsaXN0KSkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpbnQg Y291bnQgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMCksIFhDQVIgKHZsaXN0KSkpOwor ICAgICAgICAgICAgaW50IHBvc19zdGFydCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgx KSwgWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgICBpbnQgcG9zX2VuZCA9IFhGSVhOVU0gKEZu dGggKG1ha2VfZml4bnVtICgyKSwgWENBUiAodmxpc3QpKSk7CisgICAgICAgICAgICBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3cgPSBNQVRSSVhfUk9XICh3LT5jdXJyZW50X21hdHJpeCwgY291bnQpOwor ICAgICAgICAgICAgaW50IHRlbXBfdnBvcyA9IE1BVFJJWF9ST1dfVlBPUyAocm93LCB3LT5jdXJy ZW50X21hdHJpeCk7CisgICAgICAgICAgICBpbnQgYXJlYTsKKyAgICAgICAgICAgIGludCByZWxh dGl2ZV94ID0gMDsKKyAgICAgICAgICAgIGZvciAoYXJlYSA9IExFRlRfTUFSR0lOX0FSRUE7IGFy ZWEgPCBMQVNUX0FSRUE7ICsrYXJlYSkKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg IHN0cnVjdCBnbHlwaCAqZ2x5cGggPSByb3ctPmdseXBoc1thcmVhXTsKKyAgICAgICAgICAgICAg ICBzdHJ1Y3QgZ2x5cGggKmdseXBoX2VuZCA9IGdseXBoICsgcm93LT51c2VkW2FyZWFdOworICAg ICAgICAgICAgICAgIGlmIChhcmVhID09IFRFWFRfQVJFQSAmJiBnbHlwaCA9PSBnbHlwaF9lbmQg JiYgZ2x5cGgtPmNoYXJwb3MgPiAwKQorICAgICAgICAgICAgICAgICAgKytnbHlwaF9lbmQ7Cisg ICAgICAgICAgICAgICAgaWYgKG1jX3N0ZGVycl9wCisgICAgICAgICAgICAgICAgICAgICYmIGds eXBoIDwgZ2x5cGhfZW5kKQorICAgICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLAorIlxu Y291bnQgKCVkKSB8IHdpbmRvd19yb3dfc3RhcnQvZW5kICglZC8lZCkgfCByb3dfc3RhcnQvZW5k ICglZC8lZClcblwKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09IFZFUlRJQ0FMIFJVTEVS ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblwKK0dseXBoIy9Ub3RhbCBSZWwu WCBUICAgICAgIFBvcyBPICAgVyAgICAgQ29kZSBGYWNlIExSICAgICBYICAgIFkgSFBPUyBWUE9T IFpWIENcbiIsCitjb3VudCwgd2luZG93X3Jvd19zdGFydCwgd2luZG93X3Jvd19lbmQsIHBvc19z dGFydCwgcG9zX2VuZCk7CisgICAgICAgICAgICAgICAgZm9yICg7IGdseXBoIDwgZ2x5cGhfZW5k OyArK2dseXBoKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBib29s IHJlYWxfZmFrZV9jdXJzb3JfcCA9IChvcG9pbnRfeSA9PSBnbHlwaC0+eQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfdnBvcyA9PSB0ZW1w X3Zwb3MpOworICAgICAgICAgICAgICAgICAgICBpZiAoKChoZWFkZXJfbGluZV9mb3JtYXQgPiAw ICYmIGNvdW50ID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJfbGluZV9m b3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICYmIChyZWxhdGl2ZV94ICsgZ2x5 cGgtPnBpeGVsX3dpZHRoID4gb3BvaW50X3gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8 fCBnbHlwaCA9PSBnbHlwaF9lbmQgLSAxKQorICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5 cGgtPnkgPD0gd2luZG93X3RleHRfYm90dG9tX3kgKHcpCisgICAgICAgICAgICAgICAgICAgICAg ICAmJiAhcmVhbF9mYWtlX2N1cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgIG1jX2VuZ2luZSAocm93LCBnbHlwaCwgYXJlYSwgcmVsYXRpdmVf eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdywgcG9zaW50LCBCQVJfQ1VS U09SLCBjdXJzb3Jfd2lkdGgsIGZvcmVncm91bmQsIGFjdGl2ZV9wLAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBtaW5pbWFsX3AsIFZFUlRJQ0FMX1JVTEVSLCAmcmVzdWx0KTsK KyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtY19zdGRlcnJfcCkKKyAgICAgICAgICAg ICAgICAgICAgICAgIG1jX2R1bXBfZ2x5cGggKHJvdywgZ2x5cGgsIGFyZWEsIHJlbGF0aXZlX3gp OworICAgICAgICAgICAgICAgICAgICByZWxhdGl2ZV94ICs9IGdseXBoLT5waXhlbF93aWR0aDsK KyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAg IH0KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBTRVQgVEhFIENBQ0hFCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgY3Jvc3NoYWly c19maW5pc2g6CisgIGlmICghbWluaW1hbF9wCisgICAgICAmJiB1cGRhdGluZ19mcmFtZV9wKQor ICAgIHVwZGF0ZV9lbmQgKFhGUkFNRSAody0+ZnJhbWUpKTsKKyAgaWYgKCFOSUxQIChyZXN1bHQp KQorICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNoZSAodywgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRnJldmVyc2UgKHJlc3VsdCks CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNvbnMgKHdpbmRvdywgUW5p bCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmNvbnMgKHctPmNvbnRl bnRzLCBRbmlsKSkpOworICB3LT5tYy5kcmF3X2Nyb3NzaGFpcnMgPSBmYWxzZTsKKyAgaWYgKG9s ZF9idWZmZXIpCisgICAgc2V0X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisvKgorI2lm ZGVmIEdMWVBIX0RFQlVHCisgIGVuZCA9IGNsb2NrKCk7CisgIGNwdV90aW1lX3VzZWQgPSAoKGRv dWJsZSkgKGVuZCAtIHN0YXJ0KSkgLyBDTE9DS1NfUEVSX1NFQzsKKyAgZHRvYXN0ciAoYnVmX3Rp bWUsIHNpemVvZiBidWZfdGltZSwgMCwgMCwgY3B1X3RpbWVfdXNlZCk7CisgIGRlYnVnX21ldGhv ZF9hZGQgKHcsICJtY19kcmF3X2Nyb3NzaGFpcnM6ICBUSU1FICglcykiLCBid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ZvbGxvd2luZyB0ZXN0cywKKyAg ZWFzc2VydCAobWF0cml4ICYmIG1hdHJpeC0+cm93cyk7CisgIGVhc3NlcnQgKHJvdyA+PSAwICYm IHJvdyA8IG1hdHJpeC0+bnJvd3MpOyAqLworICBib29sIGJhcmZfY3Jhc2hfb25lID0gKHctPmN1 cnJlbnRfbWF0cml4ICYmIHctPmN1cnJlbnRfbWF0cml4LT5yb3dzKSA/IGZhbHNlIDogdHJ1ZTsK KyAgaWYgKGJhcmZfY3Jhc2hfb25lKQorICAgIHsKKyAgICAgIGlmIChvbGRfYnVmZmVyKQorICAg ICAgICBzZXRfYnVmZmVyX2ludGVybmFsIChvbGRfYnVmZmVyKTsKKyAgICAgIHJldHVybjsKKyAg ICB9CisgIGJvb2wgYmFyZl9jcmFzaF90d28gPSAob3BvaW50X3Zwb3MgPj0gMCAmJiBvcG9pbnRf dnBvcyA8IHctPmN1cnJlbnRfbWF0cml4LT5ucm93cykgPyBmYWxzZSA6IHRydWU7CisgIGlmIChi YXJmX2NyYXNoX3R3bykKKyAgICB7CisgICAgICBpZiAob2xkX2J1ZmZlcikKKyAgICAgICAgc2V0 X2J1ZmZlcl9pbnRlcm5hbCAob2xkX2J1ZmZlcik7CisgICAgICByZXR1cm47CisgICAgfQorICBp ZiAoIUJVRkZFUlAgKGJ1ZikpCisgICAgeworICAgICAgaWYgKG9sZF9idWZmZXIpCisgICAgICAg IHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOworICAgICAgcmV0dXJuOworICAgIH0K KyAgaWYgKE5JTFAgKEJWQVIgKGIsIG1jX2ZpbGxfY29sdW1uKSkpCisgICAgeworICAgICAgaWYg KG9sZF9idWZmZXIpCisgICAgICAgIHNldF9idWZmZXJfaW50ZXJuYWwgKG9sZF9idWZmZXIpOwor ICAgICAgcmV0dXJuOworICAgIH0KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgQkVHSU4gSk9VUk5FWSAuLi4KKyoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworICBpbnQgdGV4dF9hcmVhX3dpZHRoID0gd2luZG93X2JveF93aWR0aCAodywgVEVY VF9BUkVBKTsKKyAgaW50IGZyYW1lX2NoYXJfd2lkdGggPSBGUkFNRV9DT0xVTU5fV0lEVEggKGYp OworICBpbnQgY3Vyc29yX3dpZHRoID0gMTsKKyAgcHRyZGlmZl90IHBvc2ludCA9IC0xOworICBi b29sIGZpbGxfY29sdW1uX3AgPSAhTklMUCAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50 IGZpbGxfY29sID0gWEZJWE5VTSAoQlZBUiAoYiwgZmlsbF9jb2x1bW4pKTsKKyAgaW50IGhzY2xf eCA9IHctPmhzY3JvbGwgKiBmcmFtZV9jaGFyX3dpZHRoOworICBpbnQgZmlsbF9jb2x1bW5feCA9 IChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgICAgICYmICFOSUxQIChWZGlzcGxh eV9saW5lX251bWJlcnMpKQorICAgICAgICAgICAgICAgICAgICAgICAgPyAoZmlsbF9jb2wgKiBm cmFtZV9jaGFyX3dpZHRoKSArIHctPm1jLmxudW1fcGl4ZWxfd2lkdGggLSBoc2NsX3gKKyAgICAg ICAgICAgICAgICAgICAgICA6IChmaWxsX2NvbHVtbl9wCisgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgTklMUCAoVmRpc3BsYXlfbGluZV9udW1iZXJzKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgID8gKGZpbGxfY29sICogZnJhbWVfY2hhcl93aWR0aCkgLSBoc2NsX3gKKyAgICAgICAgICAg ICAgICAgICAgICA6IDA7CisgIExpc3BfT2JqZWN0IHJlc3VsdCA9IFFuaWw7CisgIGludCBsbnVt X3BpeGVsX3dpZHRoID0gKCFOSUxQIChWZGlzcGxheV9saW5lX251bWJlcnMpKQorICAgICAgICAg ICAgICAgICAgICAgICAgID8gdy0+bWMubG51bV9waXhlbF93aWR0aAorICAgICAgICAgICAgICAg ICAgICAgICAgIDogMDsKKyAgaWYgKGZpbGxfY29sdW1uX3ggPiB0ZXh0X2FyZWFfd2lkdGgKKyAg ICAgIHx8IGZpbGxfY29sdW1uX3ggPCBsbnVtX3BpeGVsX3dpZHRoKQorICAgIGdvdG8gbWNfZmls bF9jb2x1bW5fZmluaXNoOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIENPTE9SIE9GIEZJTEwgQ09MVU1OCisqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiogKi8KKyAgZW51bSBmYWNlX2lkIGZpbGxfY29sdW1uX2ZhY2VfaWQgPQorICAgICghYWN0aXZl X3AKKyAgICAgJiYgIU5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgbWNfZmlsbF9j b2x1bW5faW5hY3RpdmVfd2luZG93cykpCisgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHct PmNvbnRlbnRzKSwgY3Jvc3NoYWlycykpKQorICAgICAgPyBsb29rdXBfbmFtZWRfZmFjZSAodywg ZiwgaW50ZXJuICgibWMtZmlsbC1jb2x1bW4taW5hY3RpdmUtZmFjZSIpLCB0cnVlKQorICAgIDog KCFhY3RpdmVfcAorICAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyks IG1jX2ZpbGxfY29sdW1uX2luYWN0aXZlX3dpbmRvd3MpKQorICAgICAgICYmICFOSUxQIChCVkFS IChYQlVGRkVSICh3LT5jb250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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK KyAgICAgICAgICAgRklMTCBDT0xVTU46ICBDT01CSU5BVElPTiBPRiBHTFlQSCAmIEdMWVBITEVT UyBDVVJTT1JTCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgaW50IGhlYWRlcl9saW5lX2Zv cm1hdCA9IFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQgKHcpOworICBzdHJ1Y3QgZ2x5cGhfbWF0 cml4ICptYXRyaXggPSB3LT5jdXJyZW50X21hdHJpeDsKKyAgaW50IHJvd19zdGFydCwgcm93X2Vu ZCwgd2luZG93X3Jvd19zdGFydCwgd2luZG93X3Jvd19lbmQ7CisgIGludCBpOworICBMaXNwX09i amVjdCB0ZW1wID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgdnNwZWNzID0gUW5pbDsKKyAgZm9yIChp ID0gMDsgaSA8IG1hdHJpeC0+bnJvd3M7ICsraSkKKyAgICB7CisgICAgICBzdHJ1Y3QgZ2x5cGhf cm93ICpyb3cgPSBNQVRSSVhfUk9XIChtYXRyaXgsIGkpOworICAgICAgcm93X3N0YXJ0ID0gTUFU UklYX1JPV19TVEFSVF9DSEFSUE9TIChyb3cpOworICAgICAgaWYgKChoZWFkZXJfbGluZV9mb3Jt YXQgPiAwICYmIGkgPT0gMSkKKyAgICAgICAgICAgfHwgKGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAw ICYmIGkgPT0gMCkpCisgICAgICAgIHdpbmRvd19yb3dfc3RhcnQgPSByb3dfc3RhcnQ7CisgICAg ICBpZiAoIXJvdy0+ZW5hYmxlZF9wKQorICAgICAgICB7CisgICAgICAgICAgd2luZG93X3Jvd19l bmQgPSByb3dfZW5kOworICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGVsc2UK KyAgICAgICAgICB7CisgICAgICAgICAgICByb3dfZW5kID0gTUFUUklYX1JPV19FTkRfQ0hBUlBP UyAocm93KTsKKyAgICAgICAgICAgIHRlbXAgPSBsaXN0biAoQ09OU1RZUEVfSEVBUCwgMywgbWFr ZV9maXhudW0gKGkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBtYWtlX2ZpeG51bSAocm93X3N0YXJ0KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFrZV9maXhudW0gKHJvd19lbmQpKTsKKyAgICAgICAgICAgIHZzcGVj cyA9IEZjb25zICh0ZW1wLCB2c3BlY3MpOworICAgICAgICAgIH0KKyAgICB9CisgIExpc3BfT2Jq ZWN0IHZsaXN0OworICBmb3IgKHZsaXN0ID0gRm5yZXZlcnNlICh2c3BlY3MpOworICAgICAgIENP TlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgeworICAgICAg aW50IGNvdW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDApLCBYQ0FSICh2bGlzdCkp KTsKKyAgICAgIGludCBwb3Nfc3RhcnQgPSBYRklYTlVNIChGbnRoIChtYWtlX2ZpeG51bSAoMSks IFhDQVIgKHZsaXN0KSkpOworICAgICAgaW50IHBvc19lbmQgPSBYRklYTlVNIChGbnRoIChtYWtl X2ZpeG51bSAoMiksIFhDQVIgKHZsaXN0KSkpOworICAgICAgc3RydWN0IGdseXBoX3JvdyAqcm93 ID0gTUFUUklYX1JPVyAody0+Y3VycmVudF9tYXRyaXgsIGNvdW50KTsKKyAgICAgIGludCB0ZW1w X3Zwb3MgPSBNQVRSSVhfUk9XX1ZQT1MgKHJvdywgdy0+Y3VycmVudF9tYXRyaXgpOworICAgICAg aW50IGFyZWE7CisgICAgICBpbnQgcmVsYXRpdmVfeCA9IDA7CisgICAgICBmb3IgKGFyZWEgPSBM RUZUX01BUkdJTl9BUkVBOyBhcmVhIDwgTEFTVF9BUkVBOyArK2FyZWEpCisgICAgICAgIHsKKyAg ICAgICAgICBzdHJ1Y3QgZ2x5cGggKmdseXBoID0gcm93LT5nbHlwaHNbYXJlYV07CisgICAgICAg ICAgc3RydWN0IGdseXBoICpnbHlwaF9lbmQgPSBnbHlwaCArIHJvdy0+dXNlZFthcmVhXTsKKyAg ICAgICAgICBpZiAoYXJlYSA9PSBURVhUX0FSRUEgJiYgZ2x5cGggPT0gZ2x5cGhfZW5kICYmIGds eXBoLT5jaGFycG9zID4gMCkKKyAgICAgICAgICAgICsrZ2x5cGhfZW5kOworICAgICAgICAgIGlm IChtY19zdGRlcnJfcAorICAgICAgICAgICAgICAmJiBnbHlwaCA8IGdseXBoX2VuZCkKKyAgICAg ICAgICAgIGZwcmludGYgKHN0ZGVyciwKKyJcbmNvdW50ICglZCkgfCB3aW5kb3dfcm93X3N0YXJ0 L2VuZCAoJWQvJWQpIHwgcm93X3N0YXJ0L2VuZCAoJWQvJWQpXG5cCis9PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PSBGSUxMIENPTFVNTiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09XG5cCitHbHlwaCMvVG90YWwgUmVsLlggVCAgICAgICBQb3MgTyAgIFcgICAgIENvZGUg RmFjZSBMUiAgICAgWCAgICBZIEhQT1MgVlBPUyBaViBDXG4iLAorY291bnQsIHdpbmRvd19yb3df c3RhcnQsIHdpbmRvd19yb3dfZW5kLCBwb3Nfc3RhcnQsIHBvc19lbmQpOworICAgICAgICAgIGZv ciAoOyBnbHlwaCA8IGdseXBoX2VuZDsgKytnbHlwaCkKKyAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgYm9vbCByZWFsX2Zha2VfY3Vyc29yX3AgPSAob3BvaW50X3ggPT0gZmlsbF9jb2x1bW5f eAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBvcG9pbnRfeSA9 PSBnbHlwaC0+eQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBv cG9pbnRfaHBvcyA9PSBnbHlwaCAtIHJvdy0+Z2x5cGhzW1RFWFRfQVJFQV0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3Zwb3MgPT0gdGVtcF92cG9z KTsKKyAgICAgICAgICAgICAgaWYgKHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPiB0 ZXh0X2FyZWFfd2lkdGgpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgaWYg KG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg ICAgZnByaW50ZiAoc3RkZXJyLCAiXG5CRVlPTkQgdGV4dF9hcmVhX3dpZHRoXG4iKTsKKyAgICAg ICAgICAgICAgICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2 ZV94KTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCgoaGVhZGVyX2xpbmVf Zm9ybWF0ID4gMCAmJiBjb3VudCA+IDApCisgICAgICAgICAgICAgICAgICAgICB8fCBoZWFkZXJf bGluZV9mb3JtYXQgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgJiYgKHJlbGF0aXZlX3ggKyBn bHlwaC0+cGl4ZWxfd2lkdGggPiBmaWxsX2NvbHVtbl94CisgICAgICAgICAgICAgICAgICAgICAg ICB8fCBnbHlwaCA9PSBnbHlwaF9lbmQgLSAxKQorICAgICAgICAgICAgICAgICAgICAmJiBnbHlw aC0+eSA8PSB3aW5kb3dfdGV4dF9ib3R0b21feSAodykKKyAgICAgICAgICAgICAgICAgICAgJiYg IXJlYWxfZmFrZV9jdXJzb3JfcCkKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAg ICAgICAgbWNfZW5naW5lIChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94LAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHcsIHBvc2ludCwgQkFSX0NVUlNPUiwgY3Vyc29yX3dpZHRo LCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBt aW5pbWFsX3AsIEZJTExfQ09MVU1OLCAmcmVzdWx0KTsKKyAgICAgICAgICAgICAgICAgICAgYnJl YWs7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNlIGlmICgoKGhl YWRlcl9saW5lX2Zvcm1hdCA+IDAgJiYgY291bnQgPiAwKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHx8IGhlYWRlcl9saW5lX2Zvcm1hdCA9PSAwKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgJiYgKHJlbGF0aXZlX3ggKyBnbHlwaC0+cGl4ZWxfd2lkdGggPiBmaWxsX2NvbHVtbl94 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZ2x5cGggPT0gZ2x5cGhfZW5kIC0g MSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT55IDw9IHdpbmRvd190ZXh0 X2JvdHRvbV95ICh3KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgcmVhbF9mYWtlX2N1 cnNvcl9wKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgaWYg KG1jX3N0ZGVycl9wKQorICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAg ICAgICAgICAgICBmcHJpbnRmIChzdGRlcnIsICJcblJFQUwgRkFLRSBDVVJTT1JcbiIpOworICAg ICAgICAgICAgICAgICAgICAgICAgICBtY19kdW1wX2dseXBoIChyb3csIGdseXBoLCBhcmVhLCBy ZWxhdGl2ZV94KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg ICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBl bHNlIGlmIChtY19zdGRlcnJfcCkKKyAgICAgICAgICAgICAgICAgICAgICBtY19kdW1wX2dseXBo IChyb3csIGdseXBoLCBhcmVhLCByZWxhdGl2ZV94KTsKKyAgICAgICAgICAgICAgcmVsYXRpdmVf eCArPSBnbHlwaC0+cGl4ZWxfd2lkdGg7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9 CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgU0VUIFRIRSBDQUNIRQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIG1jX2ZpbGxfY29s dW1uX2ZpbmlzaDoKKyAgaWYgKCFtaW5pbWFsX3AKKyAgICAgICYmIHVwZGF0aW5nX2ZyYW1lX3AK KyAgICAgICYmIGZpbGxfY29sdW1uX3ggPD0gdGV4dF9hcmVhX3dpZHRoCisgICAgICAmJiBmaWxs X2NvbHVtbl94ID49IGxudW1fcGl4ZWxfd2lkdGgpCisgICAgdXBkYXRlX2VuZCAoWEZSQU1FICh3 LT5mcmFtZSkpOworICBpZiAoIU5JTFAgKHJlc3VsdCkpCisgICAgd3NldF9tY19maWxsX2NvbHVt bl9jYWNoZSAodywgbGlzdG4gKENPTlNUWVBFX0hFQVAsIDMsCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgRnJldmVyc2UgKHJlc3VsdCksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgRmNvbnMgKHdpbmRvdywgUW5pbCksCisgICAgICAgICAgICAgICAg ICAgICAgICA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ICAgICAgbWluaW1hbF9wID0gWEZJWE5VTSAo Rm50aCAobWFrZV9maXhudW0gKDEyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZmxhdm9y ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEzKSwgZmlmdGVlbl9lbGVtZW50cykpOwor ICAgICAgcG9zaW50ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDE0KSwgZmlmdGVlbl9l bGVtZW50cykpOworICAgICAgYm9vbCByZW1vdmVfcCA9IGZhbHNlOworICAgICAgbWNfZHJhd19l cmFzZV9oeWJyaWQgKHcsIHgsIGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBh Y3RpdmVfcCwgbWluaW1hbF9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1DX0dMWVBI LCBwb3NpbnQsIHJlbW92ZV9wKTsKKyAgICB9CisgIGlmICh1cGRhdGluZ19mcmFtZV9wKQorICAg IHVwZGF0ZV9lbmQgKFhGUkFNRSAody0+ZnJhbWUpKTsKKy8qCisjaWZkZWYgR0xZUEhfREVCVUcK KyAgZW5kID0gY2xvY2soKTsKKyAgY3B1X3RpbWVfdXNlZCA9ICgoZG91YmxlKSAoZW5kIC0gc3Rh cnQpKSAvIENMT0NLU19QRVJfU0VDOworICBkdG9hc3RyIChidWZfdGltZSwgc2l6ZW9mIGJ1Zl90 aW1lLCAwLCAwLCBjcHVfdGltZV91c2VkKTsKKyAgZGVidWdfbWV0aG9kX2FkZCAodywgIm1jX3Jl ZHJhd19tdWx0aXBsZV9jdXJzb3JzOiAgVElNRSAoJXMpIiwgYnVmX3RpbWUpOworI2VuZGlmCisq LworfQorCit2b2lkCittY19yZWRyYXdfY3Jvc3NoYWlycyAoc3RydWN0IHdpbmRvdyAqdykKK3sK Ky8qCisjaWZkZW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jdXJzb3JfdHlwZSA9IG1jX2xpc3BfdG9fY3Vyc29yX3R5cGUgKEZudGggKG1ha2VfZml4bnVt ICg3KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3dpZHRoID0gWEZJWE5VTSAo Rm50aCAobWFrZV9maXhudW0gKDgpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAgICBmb3JlZ3Jv dW5kID0gRm50aCAobWFrZV9maXhudW0gKDkpLCBmaWZ0ZWVuX2VsZW1lbnRzKTsKKyAgICAgIGJh Y2tncm91bmQgPSBGbnRoIChtYWtlX2ZpeG51bSAoMTApLCBmaWZ0ZWVuX2VsZW1lbnRzKTsKKyAg ICAgIGFjdGl2ZV9wID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDExKSwgZmlmdGVlbl9l bGVtZW50cykpOworICAgICAgbWluaW1hbF9wID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0g KDEyKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZmxhdm9yID0gWEZJWE5VTSAoRm50aCAo bWFrZV9maXhudW0gKDEzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgcG9zaW50ID0gWEZJ WE5VTSAoRm50aCAobWFrZV9maXhudW0gKDE0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAg Ym9vbCByZW1vdmVfcCA9IGZhbHNlOworICAgICAgbWNfZHJhd19lcmFzZV9oeWJyaWQgKHcsIHgs IGZ4LCB5LCBmeSwgaHBvcywgdnBvcywgaCwgY3Vyc29yX3R5cGUsCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBmb3JlZ3JvdW5kLCBhY3RpdmVfcCwgbWluaW1hbF9w LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYXZvciwgcG9zaW50LCByZW1vdmVfcCk7 CisgICAgfQorICBpZiAodXBkYXRpbmdfZnJhbWVfcCkKKyAgICB1cGRh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7 CisgIGJvb2wgdXBkYXRpbmdfZnJhbWVfcCA9IGZhbHNlOworICBpZiAoWEZSQU1FICh3LT5mcmFt ZSkgIT0gWEZSQU1FICh3LT5mcmFtZSktPm1jX3VwZGF0aW5nX2ZyYW1lKQorICAgIHsKKyAgICAg IHVwZGF0aW5nX2ZyYW1lX3AgPSB0cnVlOworICAgICAgdXBkYXRlX2JlZ2luIChYRlJBTUUgKHct PmZyYW1lKSk7CisgICAgfQorICBtY19lcmFzZV9nbHlwaF9jdXJzb3JzICh3LCB3LT5waHlzX2N1 cnNvci54LCB3LT5waHlzX2N1cnNvci55LCB3LT5waHlzX2N1cnNvci5ocG9zLAorICAgICAgICAg ICAgICAgICAgICAgICAgICB3LT5waHlzX2N1cnNvci52cG9zLCB3LT5waHlzX2N1cnNvcl90eXBl LCB3LT5waHlzX2N1cnNvcl93aWR0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhdm9y KTsKKyAgZm9yICh2bGlzdCA9IFhDQVIgKHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpOworICAg ICAgIENPTlNQICh2bGlzdCk7CisgICAgICAgdmxpc3QgPSBYQ0RSICh2bGlzdCkpCisgICAgewor ICAgICAgZmlmdGVlbl9lbGVtZW50cyA9IFhDQVIgKHZsaXN0KTsKKyAgICAgIHggPSBYRklYTlVN IChGbnRoIChtYWtlX2ZpeG51bSAoMCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZ4ID0g WEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDEpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7CisgICAg ICB5ID0gWEZJWE5VTSAoRm50aCAobWFrZV9maXhudW0gKDIpLCBmaWZ0ZWVuX2VsZW1lbnRzKSk7 CisgICAgICBmeSA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgzKSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgaHBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg0KSwgZmlm dGVlbl9lbGVtZW50cykpOworICAgICAgdnBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVt ICg1KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaCA9IFhGSVhOVU0gKEZudGggKG1ha2Vf Zml4bnVtICg2KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19s aXNwX3RvX2N1cnNvcl90eXBlIChGbnRoIChtYWtlX2ZpeG51bSAoNyksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGN1cnNvcl93aWR0aCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg4 KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfZml4 bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFr ZV9maXhudW0gKDEwKSwgZmlmdGVlbl9lbGVtZW50cyk7CisgICAgICBhY3RpdmVfcCA9IFhGSVhO VU0gKEZudGggKG1ha2VfZml4bnVtICgxMSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIG1p bmltYWxfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMiksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGZsYXZvciA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMyksIGZp ZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIHBvc2ludCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4 bnVtICgxNCksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGJvb2wgcmVtb3ZlX3AgPSB0cnVl OworICAgICAgaWYgKGZsYXZvciA9PSBNQ19HTFlQSCkKKyAgICAgICAgbWNfZXJhc2VfZ2x5cGhf Y3Vyc29ycyAodywgeCwgeSw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190IHN0YXJ0 LCBlbmQ7CisgIGRvdWJsZSBjcHVfdGltZV91c2VkOworICBjaGFyIGJ1Zl90aW1lW0RCTF9CVUZT SVpFX0JPVU5EXTsKKyAgc3RhcnQgPSBjbG9jaygpOworI2VuZGlmCisqLworI2lmZGVmIEdMWVBI X0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcAorICAgICAgJiYgQlVGRkVSUCAody0+Y29u dGVudHMpCisgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9z c2hhaXJzKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJ TkRPVyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJp bjFfdG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBT U0RBVEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfZXJhc2Vf Y3Jvc3NoYWlycyAoJXMpOiAgZGVsZXRlX2NhY2hlICglZClcbiIsCisgICAgICAgICAgICAgICAg ICAgICAgIHdpbmRvd19jaGFyLCBkZWxldGVfY2FjaGUpOworICAgIH0KKyNlbmRpZgorICBMaXNw X09iamVjdCB2bGlzdCA9IFFuaWw7CisgIExpc3BfT2JqZWN0IGZpZnRlZW5fZWxlbWVudHMgPSBR bmlsOworICBpbnQgeCwgZngsIHksIGZ5LCBocG9zLCB2cG9zLCBoOworICBlbnVtIHRleHRfY3Vy c29yX2tpbmRzIGN1cnNvcl90eXBlOworICBpbnQgY3Vyc29yX3dpZHRoOworICBMaXNwX09iamVj dCBmb3JlZ3JvdW5kID0gUW5pbDsKKyAgTGlzcF9PYmplY3QgYmFja2dyb3VuZCA9IFFuaWw7Cisg IGJvb2wgYWN0aXZlX3AgPSBmYWxzZTsKKyAgaW50IGZsYXZvci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tICgzKSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAgaHBvcyA9IFhG SVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg0KSwgZmlmdGVlbl9lbGVtZW50cykpOworICAgICAg dnBvcyA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg1KSwgZmlmdGVlbl9lbGVtZW50cykp OworICAgICAgaCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg2KSwgZmlmdGVlbl9lbGVt ZW50cykpOworICAgICAgY3Vyc29yX3R5cGUgPSBtY19saXNwX3RvX2N1cnNvcl90eXBlIChGbnRo IChtYWtlX2ZpeG51bSAoNyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGN1cnNvcl93aWR0 aCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICg4KSwgZmlmdGVlbl9lbGVtZW50cykpOwor ICAgICAgZm9yZWdyb3VuZCA9IEZudGggKG1ha2VfZml4bnVtICg5KSwgZmlmdGVlbl9lbGVtZW50 cyk7CisgICAgICBiYWNrZ3JvdW5kID0gRm50aCAobWFrZV9maXhudW0gKDEwKSwgZmlmdGVlbl9l bGVtZW50cyk7CisgICAgICBhY3RpdmVfcCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgx MSksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIG1pbmltYWxfcCA9IFhGSVhOVU0gKEZudGgg KG1ha2VfZml4bnVtICgxMiksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAgIGZsYXZvciA9IFhG SVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxMyksIGZpZnRlZW5fZWxlbWVudHMpKTsKKyAgICAg IHBvc2ludCA9IFhGSVhOVU0gKEZudGggKG1ha2VfZml4bnVtICgxNCksIGZpZnRlZW5fZWxlbWVu dHMpKTsKKyAgICAgIGJvb2wgcmVtb3ZlX3AgPSB0cnVlOworICAgICAgaWYgKGZsYXZvciA9PSBN Q19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5LCBocG9zLCB2cG9zLCBoLCBjdXJzb3JfdHlwZSwKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgY3Vyc29yX3dpZHRoLCBiYWNrZ3JvdW5kLCBhY3RpdmVfcCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluaW1hbF9wLCBmbGF2b3IsIHBvc2lu dCwgcmVtb3ZlX3ApOworICAgIH0KKyAgaWYgKHVwZGF0aW5nX2ZyYW1lX3ApCisgICAgdXBkYXRl X2VuZCAoWEZSQU1FICh3LT5mcmFtZSkpOworICBpZiAoZGVsZXRlX2NhY2hlKQorICAgIHdzZXRf bWNfZmlsbF9jb2x1bW5fY2FjaGUgKHcsIFFuaWwpOworICB3LT5tYy5lcmFzZV9maWxsX2NvbHVt biA9IGZhbHNlOworLyoKKyNpZmRlZiBHTFlQSF9ERUJVRworICBlbmQgPSBjbG9jaygpOworICBj cHVfdGltZV91c2VkID0gKChkb3VibGUpIChlbmQgLSBzdGFydCkpIC8gQ0xPQ0tTX1BFUl9TRUM7 CisgIGR0b2FzdHIgKGJ1Zl90aW1lLCBzaXplb2YgYnVmX3RpbWUsIDAsIDAsIGNwdV90aW1lX3Vz ZWQpOworICBkZWJ1Z19tZXRob2RfYWRkICh3LCAibWNfZXJhc2VfZmlsbF9jb2x1bW46ICBUSU1F ICglcykiLCBidWZfdGltZSk7CisjZW5kaWYKKyovCit9CisKK3ZvaWQKK21jX3JlbW92ZV9tdWx0 aXBsZV9jdXJzb3JzIChzdHJ1Y3Qgd2luZG93ICp3KQoreworICBib29sIGRlbGV0ZV9jYWNoZSA9 ICh3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVhID09IDgKKyAgICAgICAgICAgICAg ICAgICAgICAgfHwgbWNfcmVkaXNwbGF5ID09IDMpCisgICAgICAgICAgICAgICAgICAgICAgPyBm YWxzZQorICAgICAgICAgICAgICAgICAgICAgIDogdHJ1ZTsKKyNpZmRlZiBHTFlQSF9ER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m50aCAobWFrZV9maXhudW0gKDEpLCB3LT5tdWx0 aXBsZV9jdXJzb3JzX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGgg KG1ha2VfZml4bnVtICgxKSwgdy0+bXVsdGlwbGVfY3Vyc29yc19jYWNoZSkpKQorICAgICAgJiYg RVEgKHctPmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMiksIHctPm11bHRpcGxl X2N1cnNvcnNfY2FjaGUpKSkpCisgICAgbWNfZXJhc2VfbXVsdGlwbGVfY3Vyc29ycyAodywgZGVs ZXRlX2NhY2hlKTsKK30KKwordm9pZAorbWNfcmVtb3ZlX2Nyb3NzaGFpcnMgKHN0cnVjdCB3aW5k b3cgKncpCit7CisgIGJvb2wgZGVsZXRlX2NhY2hlID0gKCh3LT5tYy5yZWRpc3BsYXlfcHJlc2Vy dmVfZWNob19hcmVhID09IDgKKyAgICAgICAgICAgICAgICAgICAgICAgIHx8IG1jX3JlZGlzcGxh eSA9PSAzKQorICAgICAgICAgICAgICAgICAgICAgICAmJiAhdy0+bWMuZHJhd19jcm9zc2hhaXJz CisgICAgICAgICAgICAgICAgICAgICAgICYmICF3LT5tYy5lcmFzZV9jcm9zc2hhaXJzKQorICAg ICAgICAgICAgICAgICAgICAgID8gZmFsc2UKKyAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7 CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wCisgICAgICAmJiBC VUZGRVJQICh3LT5jb250ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5j b250ZW50cyksIGNyb3NzaGFpcnMpKSkKKyAgICB7CisgICAgICBMaXNwX09iamVjdCB3aW5kb3c7 CisgICAgICBYU0VUV0lORE9XICh3aW5kb3csIHcpOworICAgICAgTGlzcF9PYmplY3Qgd2luZG93 X3N0cmluZyA9IEZwcmluMV90b19zdHJpb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Jv c3NoYWlycyAodywgZGVsZXRlX2NhY2hlLCBtaW5pbWFsX3ApOworICAgIH0KK30KKwordm9pZAor bWNfcmVtb3ZlX2ZpbGxfY29sdW1uIChzdHJ1Y3Qgd2luZG93ICp3KQoreworICBib29sIGRlbGV0 ZV9jYWNoZSA9ICgody0+bWMucmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9PSA4CisgICAg ICAgICAgICAgICAgICAgICAgICB8fCBtY19yZWRpc3BsYXkgPT0gMykKKyAgICAgICAgICAgICAg ICAgICAgICAgJiYgIXctPm1jLmRyYXdfZmlsbF9jb2x1bW4KKyAgICAgICAgICAgICAgICAgICAg ICAgJiYgIXctPm1jLmVyYXNlX2ZpbGxfY29sdW1uKQorICAgICAgICAgICAgICAgICAgICAgID8g ZmFsc2UKKyAgICAgICAgICAgICAgICAgICAgICA6IHRydWU7CisjaWZkZWYgR0xZUEhfREVCVUcK KyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wCisgICAgICAmJiBCVUZGRVJQICh3LT5jb250ZW50cykK KyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29s dW1uKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93OworICAgICAgWFNFVFdJTkRP VyAod2luZG93LCB3KTsKKyAgICAgIExpc3BfT2JqZWN0IHdpbmRvd19zdHJpbmcgPSBGcHJpbjFf dG9fc3RyaW5nICh3aW5kb3csIFFuaWwpOworICAgICAgY2hhciAqd2luZG93X2NoYXIgPSBTU0RB VEEgKHdpbmRvd19zdHJpbmcpOworICAgICAgZnByaW50ZiAoc3RkZXJyLCAibWNfcmVtb3ZlX2Zp bGxfY29sdW1uICglcyk6ICBkZWxldGVfY2FjaGUgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAg ICAgICAgIHdpbmRvd19jaGFyLCBkZWxldGVfY2FjaGUpOworICAgIH0KKyNlbmRpZgorICAvKiBS ZW1v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1cnNvcnNfY29uZikpKQorICAgIHsK KyAgICAgIExpc3BfT2JqZWN0IHdpbmRvdzsKKyAgICAgIFhTRVRXSU5ET1cgKHdpbmRvdywgdyk7 CisgICAgICBMaXNwX09iamVjdCB3aW5kb3dfc3RyaW5nID0gRnByaW4xX3RvX3N0cmluZyAod2lu ZG93LCBRbmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19jaGFyID0gU1NEQVRBICh3aW5kb3dfc3Ry aW5nKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1jX211bHRpcGxlX2N1cnNvcnNfcG9ydGFs ICglcyk6ICBvbiAoJWQpIHwgYWN0aXZlX3AgKCVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAg ICAgIHdpbmRvd19jaGFyLCBvbiwgYWN0aXZlX3ApOworICAgIH0KKyNlbmRpZgorICBib29sIG1p bmltYWxfcCA9ICghdy0+bWMuZHJhd19tdWx0aXBsZV9jdXJzb3JzCisgICAgICAgICAgICAgICAg ICAgICYmIG1jX3JlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgIT0gOAorICAgICAgICAgICAg ICAgICAgICAmJiBtY19yZWRpc3BsYXkgIT0gMworICAgICAgICAgICAgICAgICAgICAmJiB3ID09 IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykKKyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAo QlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2RyYXdfZm9ydGh3 aXRoKSkpOworICBpZiAody0+bWMuZXJhc2VfbXVsdGlwbGVfY3Vyc29ycyAmJiB3LT5tYy5kcmF3 X211bHRpcGxlX2N1cnNvcnMKKyAgICAgICYmICFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYg IU5JTFAgKHctPm11bHRpcGxlX2N1cnNvcnNfY2FjaGUpCisgICAgICAmJiBXSU5ET1dQIChYQ0FS IChGbnRoIChtYWtlX2ZpeG51bSAoM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YmICFN SU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93 KQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG11bHRp cGxlX2N1cnNvcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgJiYgTklMUCAody0+bXVsdGlw bGVfY3Vyc29yc19jYWNoZSkKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250 ZW50cyksIG11bHRpcGxlX2N1cnNvcnNfY29uZikpKQorICAgIG1jX2RyYXdfbXVsdGlwbGVfY3Vy c29ycyAodywgYWN0aXZlX3AsIG1pbmltYWxfcCk7CisgICAgZWxzZSBpZiAob24KKyAgICAgICAg ICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICAgICAgICAmJiAhTklMUCAody0+bXVs dGlwbGVfY3Vyc29yc19jYWNoZSkKKyAgICAgICAgICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZF UiAody0+Y29udGVudHMpLCBtdWx0aXBsZV9jdXJzb3JzX2NvbmYpKQorICAgICAgICAgICAgICYm IFdJTkRPV1AgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+bXVsdGlwbGVfY3Vyc29y c19jYWNoZSkpKQorICAgICAgICAgICAgICYmIHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAobWFr ZV9maXhudW0gKDEpLCB3LT5tdWx0aXBsZV9jdXJzb3JzX2NhY2hlKSkpCisgICAgICAgICAgICAg JiYgRVEgKHctPmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMiksIHctPm11bHRp cGxlX2N1cnNvcnNfY2FjaGUpKSkpCisgICAgICB7CisgICAgICAgIG1jX2VyYXNlX211bHRpcGxl X2N1cnNvcnMgKHcsIGZhbHNlKTsKKyAgICAgICAgbWNfcmVkcmF3X211bHRpcGxlX2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cmluZyA9IEZwcmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBj aGFyICp3aW5kb3dfY2hhciA9IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRm IChzdGRlcnIsICJtY19jcm9zc2hhaXJzX3BvcnRhbCAoJXMpOiAgb24gKCVkKSB8IGFjdGl2ZV9w ICglZClcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3dfY2hhciwgb24sIGFjdGl2 ZV9wKTsKKyAgICB9CisjZW5kaWYKKyAgYm9vbCBtaW5pbWFsX3AgPSAoIXctPm1jLmRyYXdfY3Jv c3NoYWlycworICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3BsYXlfcHJlc2VydmVfZWNo b19hcmVhICE9IDgKKyAgICAgICAgICAgICAgICAgICAgJiYgbWNfcmVkaXNwbGF5ICE9IDMKKyAg ICAgICAgICAgICAgICAgICAgJiYgdyA9PSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpCisgICAg ICAgICAgICAgICAgICAgICYmIE5JTFAgKEJWQVIgKFhCVUZGRVIgKHctPmNvbnRlbnRzKSwgY3Jv c3NoYWlyc19kcmF3X2ZvcnRod2l0aCkpKTsKKyAgaWYgKHctPm1jLmVyYXNlX2Nyb3NzaGFpcnMg JiYgdy0+bWMuZHJhd19jcm9zc2hhaXJzCisgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAodykKKyAg ICAgICYmICFOSUxQICh3LT5jcm9zc2hhaXJzX2NhY2hlKQorICAgICAgJiYgV0lORE9XUCAoWENB UiAoRm50aCAobWFrZV9maXhudW0gKDEpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkpCisgICAgICAm JiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+Y3Jvc3NoYWly c19jYWNoZSkpKQorICAgICAgJiYgRVEgKHctPmNvbnRlbnRzLCBYQ0FSIChGbnRoIChtYWtlX2Zp eG51bSAoMiksIHctPmNyb3NzaGFpcnNfY2FjaGUpKSkpCisgICAgbWNfZXJhc2VfY3Jvc3NoYWly cyAodywgdHJ1ZSwgbWluaW1hbF9wKTsKKyAgLyogYHctPmNyb3NzaGFpcnNfY2FjaGVgIGJlbG9u Z3MgdG8gdGhlIHdpbmRvdywgbm90IHRoZSBidWZmZXIuICBTd2l0Y2hpbmcKKyAgYnVmZmVycyB3 aXRoaW4gdGhlIHNhbWUgd2luZG93IHJlbmRlcnMgdGhlIGNhY2hlIHVzZWxlc3MuICovCisgIGlm ICghTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICFOSUxQICh3LT5jcm9zc2hhaXJzX2NhY2hl KQorICAgICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9maXhudW0gKDEpLCB3LT5jcm9z c2hhaXJzX2NhY2hlKSkpCisgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIgKEZudGggKG1ha2Vf Zml4bnVtICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAgJiYgIUVRICh3LT5jb250 ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0gKDIpLCB3LT5jcm9zc2hhaXJzX2NhY2hlKSkp KQorICAgIHsKKyAgICAgIHdzZXRfY3Jvc3NoYWlyc19jYWNoZSAodywgUW5pbCk7CisgICAgICB3 LT5tYy5lcmFzZV9jcm9zc2hhaXJzID0gZmFsc2U7CisgICAgfQorICBpZiAob24KKyAgICAgICYm ICFNSU5JX1dJTkRPV19QICh3KQorICAgICAgJiYgKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2lu ZG93KQorICAgICAgICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIGNy b3NzaGFpcnNfaW5hY3RpdmVfd2luZG93cykpKQorICAgICAgJiYgTklMUCAody0+Y3Jvc3NoYWly c19jYWNoZSkKKyAgICAgICYmICghTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBj cm9zc2hhaXJzKSkpKQorICAgIG1jX2RyYXdfY3Jvc3NoYWlycyAodywgYWN0aXZlX3AsIG1pbmlt YWxfcCk7CisgICAgZWxzZSBpZiAob24KKyAgICAgICAgICAgICAmJiAhTUlOSV9XSU5ET1dfUCAo dykKKyAgICAgICAgICAgICAmJiAhTklMUCAody0+Y3Jvc3NoYWlyc19jYWNoZSkKKyAgICAgICAg ICAgICAmJiAhTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVudHMpLCBjcm9zc2hhaXJzKSkK KyAgICAgICAgICAgICAmJiBXSU5ET1dQIChYQ0FSIChGbnRoIChtYWtlX2ZpeG51bSAoMSksIHct PmNyb3NzaGFpcnNfY2FjaGUpKSkKKyAgICAgICAgICAgICAmJiB3ID09IFhXSU5ET1cgKFhDQVIg KEZudGggKG1ha2VfZml4bnVtICgxKSwgdy0+Y3Jvc3NoYWlyc19jYWNoZSkpKQorICAgICAgICAg ICAgICYmIEVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFrZV9maXhudW0gKDIpLCB3LT5j cm9zc2hhaXJzX2NhY2hlKSkpKQorICAgICAgeworICAgICAgICBtY19lcmFzZV9jcm9zc2hhaXJz ICh3LCBmYWxzZSwgbWluaW1hbF9wKTsKKyAgICAgICAgbWNfcmVkcmF3X2Nyb3NzaGFpcnMgKHcp OworICAgICAgfQorfQorCit2b2lkCittY19maWxsX2NvbHVtbl9wb3J0YWwgKHN0cnVjdCB3aW5k b3cgKncsIGJvb2wgb24sIGJvb2wgYWN0aXZlX3ApCit7CisgIC8qIFJlbW92ZSBtY19maWxsX2Nv bHVtbiBhbmQgZGVsZXRlIHRoZSBjYWNoZSwgYnV0IE9OTFkgaWYgd2UgcGxhbiBvbiByZWRyYXdp bmcgdGhlbS4KKyAgSW4gYSB0aW1lciBzaXR1YXRpb24sIHdlIHdhbnQgdG8gZXJhc2UgYW5kIHJl ZHJhdyAtLSB3ZSBnbyBm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3LT5tYy5k cmF3X2ZpbGxfY29sdW1uCisgICAgICAgICAgICAgICAgICAgICYmIG1jX3JlZGlzcGxheV9wcmVz ZXJ2ZV9lY2hvX2FyZWEgIT0gOAorICAgICAgICAgICAgICAgICAgICAmJiBtY19yZWRpc3BsYXkg IT0gMworICAgICAgICAgICAgICAgICAgICAmJiB3ID09IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRv dykKKyAgICAgICAgICAgICAgICAgICAgJiYgTklMUCAoQlZBUiAoWEJVRkZFUiAody0+Y29udGVu dHMpLCBtY19maWxsX2NvbHVtbl9kcmF3X2ZvcnRod2l0aCkpKTsKKyAgaWYgKHctPm1jLmVyYXNl X2ZpbGxfY29sdW1uICYmIHctPm1jLmRyYXdfZmlsbF9jb2x1bW4KKyAgICAgICYmICFNSU5JX1dJ TkRPV19QICh3KQorICAgICAgJiYgIU5JTFAgKHctPm1jX2ZpbGxfY29sdW1uX2NhY2hlKQorICAg ICAgJiYgV0lORE9XUCAoWENBUiAoRm50aCAobWFrZV9maXhudW0gKDEpLCB3LT5tY19maWxsX2Nv bHVtbl9jYWNoZSkpKQorICAgICAgJiYgdyA9PSBYV0lORE9XIChYQ0FSIChGbnRoIChtYWtlX2Zp eG51bSAoMSksIHctPm1jX2ZpbGxfY29sdW1uX2NhY2hlKSkpCisgICAgICAmJiBFUSAody0+Y29u dGVudHMsIFhDQVIgKEZudGggKG1ha2VfZml4bnVtICgyKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2Fj aGUpKSkpCisgICAgbWNfZXJhc2VfZmlsbF9jb2x1bW4gKHcsIHRydWUpOworICAvKiBgdy0+bWNf ZmlsbF9jb2x1bW5fY2FjaGVgIGJlbG9uZ3MgdG8gdGhlIHdpbmRvdywgbm90IHRoZSBidWZmZXIu ICBTd2l0Y2hpbmcKKyAgYnVmZmVycyB3aXRoaW4gdGhlIHNhbWUgd2luZG93IHJlbmRlcnMgdGhl IGNhY2hlIHVzZWxlc3MuICovCisgIGlmICghTUlOSV9XSU5ET1dfUCAodykKKyAgICAgICYmICFO SUxQICh3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkKKyAgICAgICYmIFdJTkRPV1AgKFhDQVIgKEZu dGggKG1ha2VfZml4bnVtICgxKSwgdy0+bWNfZmlsbF9jb2x1bW5fY2FjaGUpKSkKKyAgICAgICYm IHcgPT0gWFdJTkRPVyAoWENBUiAoRm50aCAobWFrZV9maXhudW0gKDEpLCB3LT5tY19maWxsX2Nv bHVtbl9jYWNoZSkpKQorICAgICAgJiYgIUVRICh3LT5jb250ZW50cywgWENBUiAoRm50aCAobWFr ZV9maXhudW0gKDIpLCB3LT5tY19maWxsX2NvbHVtbl9jYWNoZSkpKSkKKyAgICB7CisgICAgICB3 c2V0X21jX2ZpbGxfY29sdW1uX2NhY2hlICh3LCBRbmlsKTsKKyAgICAgIHctPm1jLmVyYXNlX2Zp bGxfY29sdW1uID0gZmFsc2U7CisgICAgfQorICBpZiAob24KKyAgICAgICYmICFNSU5JX1dJTkRP V19QICh3KQorICAgICAgJiYgKHcgPT0gWFdJTkRPVyAoc2VsZWN0ZWRfd2luZG93KQorICAgICAg ICAgIHx8ICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2ZpbGxfY29sdW1u X2luYWN0aXZlX3dpbmRvd3MpKSkKKyAgICAgICYmIE5JTFAgKHctPm1jX2ZpbGxfY29sdW1uX2Nh Y2hlKQorICAgICAgJiYgKCFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2Zp bGxfY29sdW1uKSkpKQorICAgIG1jX2RyYXdfZmlsbF9jb2x1bW4gKHcsIGFjdGl2ZV9wLCBtaW5p bWFsX3ApOworICAgIGVsc2UgaWYgKG9uCisgICAgICAgICAgICAgJiYgIU1JTklfV0lORE9XX1Ag KHcpCisgICAgICAgICAgICAgJiYgIU5JTFAgKHctPm1jX2ZpbGxfY29sdW1uX2NhY2hlKQorICAg ICAgICAgICAgICYmICFOSUx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yAod2luZG93LCBRbmlsKTsKKyAgICAgIGNoYXIgKndpbmRvd19j aGFyID0gU1NEQVRBICh3aW5kb3dfc3RyaW5nKTsKKyAgICAgIGZwcmludGYgKHN0ZGVyciwgIm1j LWFjdGl2YXRlLWNyb3NzaGFpcnMgKCVzKVxuIiwgd2luZG93X2NoYXIpOworICAgIH0KKyNlbmRp ZgorICB3LT5tYy5kcmF3X2Nyb3NzaGFpcnMgPSB0cnVlOworICB3LT5tYy5lcmFzZV9jcm9zc2hh aXJzID0gdHJ1ZTsKKyAgdy0+bXVzdF9iZV91cGRhdGVkX3AgPSB0cnVlOworICByZXR1cm4gUW5p bDsKK30KKworREVGVU4gKCJtYy1hY3RpdmF0ZS1maWxsLWNvbHVtbiIsIEZtY19hY3RpdmF0ZV9m aWxsX2NvbHVtbiwgU21jX2FjdGl2YXRlX2ZpbGxfY29sdW1uLCAxLCAxLCAwLAorICAgICAgIGRv YzogLyogRG9jLXN0cmluZy4gKi8pCisgIChMaXNwX09iamVjdCB3aW5kb3cpCit7CisgIHN0cnVj dCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHdpbmRvdyk7CisjaWZkZWYgR0xZUEhf REVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wCisgICAgICAmJiBCVUZGRVJQICh3LT5jb250 ZW50cykKKyAgICAgICYmICFOSUxQIChCVkFSIChYQlVGRkVSICh3LT5jb250ZW50cyksIG1jX2Zp bGxfY29sdW1uKSkpCisgICAgeworICAgICAgTGlzcF9PYmplY3Qgd2luZG93X3N0cmluZyA9IEZw cmluMV90b19zdHJpbmcgKHdpbmRvdywgUW5pbCk7CisgICAgICBjaGFyICp3aW5kb3dfY2hhciA9 IFNTREFUQSAod2luZG93X3N0cmluZyk7CisgICAgICBmcHJpbnRmIChzdGRlcnIsICJtYy1hY3Rp dmF0ZS1tYy1maWxsLWNvbHVtbiAoJXMpXG4iLCB3aW5kb3dfY2hhcik7CisgICAgfQorI2VuZG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RxIGJ1ZmZlci1kaXNwbGF5LXRhYmxlIChtYWtl LWRpc3BsYXktdGFibGUpKQorICAgIChhc2V0IGJ1ZmZlci1kaXNwbGF5LXRhYmxlCisgICAgICAg ICAgP1x0CisgICAgICAgICAgKHZlY3RvciAobWFrZS1nbHlwaC1jb2RlID9cdTAwQkIgJ2ZvbnQt bG9jay13YXJuaW5nLWZhY2UpCisgICAgICAgICAgICAgICAgICAobWFrZS1nbHlwaC1jb2RlID9c dCAnaGlnaGxpZ2h0KSkpCisgICAgKGFzZXQgYnVmZmVyLWRpc3BsYXktdGFibGUKKyAgICAgICAg ICA/XG4KKyAgICAgICAgICAodmVjdG9yIChtYWtlLWdseXBoLWNvZGUgP1x1MDBCNiAnZm9udC1s b2NrLWNvbW1lbnQtZmFjZSkKKyAgICAgICAgICAgICAgICAgID9cbikpCisgICAgKHNldHEgdGFi LXdpZHRoIDgpCisgICAgKHNldHEtbG9jYWwgYXV0by1oc2Nyb2xsLW1vZGUgJ2N1cnJlbnQtbGlu ZSkgKi8KKworREVGVU4gKCJtYy1kZWJ1ZyIsIEZtY19kZWJ1ZywgU21jX2RlYnVnLCAwLCAwLCAi IiwKKyAgICAgICBkb2M6IC8qIFRoaXMgZnVuY3Rpb24gdXNlZCBmb3IgZGVidWdnaW5nLiAqLykK KyAgKHZvaWQpCit7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAg ICAgICBQUkVMSU1JTkFSWSBTVFVGRgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisgIHN0cnVj dCB3aW5kb3cgKncgPSBkZWNvZGVfbGl2ZV93aW5kb3cgKHNlbGVjdGVkX3dpbmRvdyk7CisgIHN0 cnVjdCBpdCBpdDsKKyAgdm9pZCAqaXRkYXRhID0gYmlkaV9zaGVsdmVfY2FjaGUgKCk7CisgIHN0 cnVjdCBpdCBpdDI7CisgIHZvaWQgKml0MmRhdGEgPSBOVUxMOworICBzdHJ1Y3QgaXQgaXQzOwor ICB2b2lkICppdDNkYXRhID0gTlVMTDsKKyAgZW51bSBtb3ZlX2l0X3Jlc3VsdCByYyA9IE1PVkVf WF9SRUFDSEVEOworICBzdHJ1Y3QgdGV4dF9wb3Mgc3RhcnRfdGV4dF9wb3NpdGlvbjsKKyAgaW50 IGNvdW50ID0gMDsKKyAgaW50IG5ld194ID0gMDsKKyAgaW50IHByZXZpb3VzX2l0X2MgPSAwOwor ICBpbnQgcHJldmlvdXNfaXRfZmV0Y2hieXRlID0gMDsKKyAgaW50IHByZXZpb3VzX2l0X2N1cnJl bnRfeCA9IDA7CisgIGludCBwcmV2aW91c19pdF9jaGFycG9zID0gMDsKKyAgaW50IHByZXZpb3Vz X2l0X3BpeGVsX3dpZHRoID0gMDsKKyAgYm9vbCBmaW5hbF9sb29wX3AgPSBmYWxzZTsKKyAgaW50 IHRleHRfYXJlYV93aWR0aCA9IHdpbmRvd19ib3hfd2lkdGggKHcsIFRFWFRfQVJFQSk7CisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICAgICAgICAgICAgICBTVEFSVCBESVNQTEFZ IC0tIHctPnN0YXJ0CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgLyogQmVnaW4gdGhlIGpv dXJuZXkgYXQgdy0+c3RhcnQuICovCisgIFNFVF9URVhUX1BPU19GUk9NX01BUktFUiAoc3RhcnRf dGV4dF9wb3NpdGlvbiwgdy0+c3RhcnQpOworICBzdGFydF9kaXNwbGF5ICgmaXQsIHcsIHN0YXJ0 X3RleHRfcG9zaXRpb24pOworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAgICAg ICAgR08gVE8gVEhFIEJFR0lOTklORyBPRiBUSEUgQ1VSUkVOVCBMSU5FLgorKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisgIC8qIFBsYWNlIHRoZSBJVCBvbiB0aGUgY3VycmVudCBsaW5lIGNvbnRh aW5pbmcgUFQuICovCisgIGludCB2b2Zmc2V0ID0gKFdJTkRPV19IRUFERVJfTElORV9IRUlHSFQg KHcpID4gMAorICAgICAgICAgICAgICAgICAmJiB3LT5vdXRwdXRfY3Vyc29yLnZwb3MgPiAwKQor ICAgICAgICAgICAgICAgICAgPyB3LT5vdXRwdXRfY3Vyc29yLnZwb3MgLSAxCisgICAgICAgICAg ICAgICAgICA6IHctPm91dHB1dF9jdXJzb3IudnBvczsKKyAgaWYgKHZvZmZzZXQgPiAwKQorICAg IG1vdmVfaXRfYnlfbGluZXMgKCZpdCwgdm9mZnNldCk7CisvKiAqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioKKyAgICAgICAgICAgICAgICAgICAgICAgTU9WRSBJVDogIElOQ1JFTUVOVCA9PSAxIHBpeGVs CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKyAgZnByaW50ZiAoc3RkZXJyLCAiXG5pdC5maXJz dF92aXNpYmxlX3ggKCVkKVxuIiwgaXQuZmlyc3RfdmlzaWJsZV94KTsKKyAgd2hpbGUgKCFmaW5h bF9sb29wX3ApCisgICAgeworICAgICAgbWNfZGVidWdfcCA9IHRydWU7CisgICAgICBmaW5hbF9s b29wX3AgPSAoSVRfQ0hBUlBPUyAoaXQpID09IFpWKQorICAgICAgICAgICAgICAgICAgICAgICA/ IHRydWUKKyAgICAgICAgICAgICAgICAgICAgIDogKEZFVENIX0JZVEUgKElUX0JZVEVQT1MgKGl0 KSkgPT0gJ1xuJworICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyAhPSAwKQorICAgICAg ICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAgICAgICAgIDogKHJjID09IE1P VkVfTElORV9DT05USU5VRUQpCisgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZQorICAgICAg ICAgICAgICAgICAgICAgOiAocmMgPT0gTU9WRV9MSU5FX1RSVU5DQVRFRAorICAgICAgICAgICAg ICAgICAgICAgICAgJiYgaXQuY3VycmVudF94IC0gaXQuZmlyc3RfdmlzaWJsZV94ID4gdGV4dF9h cmVhX3dpZHRoKQorICAgICAgICAgICAgICAgICAgICAgICA/IHRydWUKKyAgICAgICAgICAgICAg ICAgICAgIDogZmFsc2U7CisgICAgICBpZiAoaXQuY3VycmVudF94ID4gcHJldmlvdXNfaXRfY3Vy cmVudF94CisgICAgICAgICAgfHwgSVRfQ0hBUlBPUyAoaXQpID4gcHJldmlvdXNfaXRfY2hhcnBv cworICAgICAgICAgIHx8IGl0LmMgIT0gcHJldmlvdXNfaXRfYworICAgICAgICAgIHx8IGl0LmMg PT0gMAorICAgICAgICAgIHx8IGl0LmMgPT0gMTApCisgICAgICAgIHsKKyAgICAgICAgICBMaXNw X09iamVjdCBjaGFyYWN0ZXIgPSBGY2hhcl90b19zdHJpbmcgKG1ha2VfZml4bnVtIChpdC5jKSk7 CisgICAgICAgICAgaW50IGNoYXJwb3MgPSBJVF9DSEFSUE9TIChpdCk7CisgICAgICAgICAgZnBy aW50ZiAoc3RkZXJyLCAiXG5jaGFycG9zICglZC8lZC8lZCkgfCBmaXJzdF94ICglZCkgfCBwcmV2 aW91c194ICglZCkgfCB4ICglZCkgfCBjICglcykgfCBwdyAoJWQpIHwgaHBvcyAoJWQpXG4iLAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhcnBvcywgcHJldmlvdXNfaXRfY2hhcnBvcywg RkVUQ0hfQllURSAoSVRfQllURVBPUyAoaXQpKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg IGl0LmZpcnN0X3Zpc2libGVfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3Vz X2l0X2N1cnJlbnRfeCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0LmN1cnJlbnRfeCwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICgoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyA9PSA5KQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgID8gIlxcdCIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5JTFAg KGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXQuYyA9PSAx MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXG4iCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICYmIGl0LmMgIT0gOQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAmJiBpdC5jICE9IDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gU1NEQVRB IChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogIj8iKSwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIGl0LnBpeGVsX3dpZHRoLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgaXQuaHBvcyk7CisgICAgICAgICAgcHJldmlvdXNfaXRfYyA9IGl0LmM7CisgICAg ICAgICAgcHJldmlvdXNfaXRfY3VycmVudF94ID0gaXQuY3VycmVudF94OworICAgICAgICAgIHBy ZXZpb3VzX2l0X2NoYXJwb3MgPSBJVF9DSEFSUE9TIChpdCk7CisgICAgICAgICAgcHJldmlvdXNf aXRfZmV0Y2hieXRlID0gRkVUQ0hfQllURSAoSVRfQllURVBPUyAoaXQpKTsKKyAgICAgICAgICBw cmV2aW91c19pdF9waXhlbF93aWR0aCA9IGl0LnBpeGVsX3dpZHRoOworICAgICAgICAgIGNvdW50 ICs9IDE7CisgICAgICAgIH0KKyAgICAgIG5ld194ICs9IDE7CisgICAgICBTQVZFX0lUIChpdDIs IGl0LCBpdDJkYXRhKTsKKyAgICAgIHJjID0gbW92ZV9pdF9pbl9kaXNwbGF5X2xpbmVfdG8gKCZp dCwgWlYsIG5ld194LCBNT1ZFX1RPX1BPUyB8IE1PVkVfVE9fWCk7CisgICAgICBTQVZFX0lUIChp dDMsIGl0LCBpdDNkYXRhKTsKKyAgICB9CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRIRSBFTkQKKyoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworICBtY19kZWJ1Z19wID0gZmFsc2U7CisgIGJpZGlfdW5zaGVsdmVfY2FjaGUgKGl0ZGF0 YSwgZmFsc2UpOworICByZXR1cm4gUW5pbDsKK30KKworLyogZW5kIE1VTFRJUExFIENVUlNPUlMg Ki8KKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKIAwKIC8qKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogCQkg ICAgICBXaW5kb3cgZGlzcGxheSBkaW1lbnNpb25zCkBAIC0xMTIxNCw3ICsxNjM4OSwxOCBAQCBy ZXNpemVfZWNob19hcmVhX2V4YWN0bHkgKHZvaWQpCiAJewogCSAgd2luZG93c19vcl9idWZmZXJz X2NoYW5nZWQgPSA0MjsKIAkgIHVwZGF0ZV9tb2RlX2xpbmVzID0gMzA7Ci0JICByZWRpc3BsYXlf aW50ZXJuYWwgKCk7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBD VVJTT1JTICovCisKKyAgICAgIG1jX3JlZGlzcGxheV9pbnRlcm5hbCA9IDE7CisgICAgICByZWRp c3BsYXlfaW50ZXJuYWwgKDEpOworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gMDsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogCX0KICAgICB9CiB9CkBAIC0xMTcwMSw3ICsx Njg4NywxOCBAQCBlY2hvX2FyZWFfZGlzcGxheSAoYm9vbCB1cGRhdGVfZnJhbWVfcCkKIAkgICAg ICBwdHJkaWZmX3QgY291bnQgPSBTUEVDUERMX0lOREVYICgpOwogCSAgICAgIHNwZWNiaW5kIChR cmVkaXNwbGF5X2RvbnRfcGF1c2UsIFF0KTsKIAkgICAgICBmc2V0X3JlZGlzcGxheSAoZik7Ci0J ICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgpOworCisKKy8qICoqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAq LworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICAgICAgbWNfcmVkaXNwbGF5X2ludGVy bmFsID0gMjsKKyAgICAgICAgICByZWRpc3BsYXlfaW50ZXJuYWwgKDIpOworICAgICAgICAgIG1j X3JlZGlzcGxheV9pbnRlcm5hbCA9IDA7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAkgICAgICB1bmJpbmRfdG8gKGNvdW50LCBRbmlsKTsKIAkgICAgfQogCSAgZWxzZSBpZiAoRlJB TUVfV0lORE9XX1AgKGYpICYmIG4gPT0gMCkKQEAgLTEzNjIwLDEyICsxODgxNywyNiBAQCB0ZXh0 X291dHNpZGVfbGluZV91bmNoYW5nZWRfcCAoc3RydWN0IHdpbmRvdyAqdywKICAgIGlzIG5vIGxv bmdlciByZXF1ZXN0ZWQsIHdlIGNsZWFyIHRoZSBlY2hvIGFyZWEgb3IgYnJpbmcgYmFjayB0aGUK ICAgIG1pbmktYnVmZmVyIGlmIHRoYXQgaXMgaW4gdXNlLiAgKi8KIAorCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwogdm9pZAotcmVkaXNwbGF5ICh2 b2lkKQorcmVkaXNwbGF5IChpbnQgZnJvbV93aGVyZSkKIHsKLSAgcmVkaXNwbGF5X2ludGVybmFs ICgpOworI2lmZGVmIEdMWVBIX0RFQlVHCisgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCkKKyAgICBm cHJpbnRmIChzdGRlcnIsICJcbnJlZGlzcGxheSAoJWQpXG4iLCBmcm9tX3doZXJlKTsKKyNlbmRp ZgorICBtY19yZWRpc3BsYXkgPSBmcm9tX3doZXJlOworICBtY19yZWRpc3BsYXlfaW50ZXJuYWwg PSAzOworICByZWRpc3BsYXlfaW50ZXJuYWwgKDMpOworICBtY19yZWRpc3BsYXlfaW50ZXJuYWwg PSAwOworICBtY19yZWRpc3BsYXkgPSAwOwogfQogCisvKiAqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8K KwogCiBzdGF0aWMgTGlzcF9PYmplY3QKIG92ZXJsYXlfYXJyb3dfc3RyaW5nX29yX3Byb3BlcnR5 IChMaXNwX09iamVjdCB2YXIpCkBAIC0xMzg5MSw5ICsxOTEwMiwyMSBAQCBkbyB7IGlmIChwb2xs aW5nX3N0b3BwZWRfaGVyZSkgc3RhcnRfcG9sbGluZyAoKTsJXAogLyogUGVyaGFwcyBpbiB0aGUg ZnV0dXJlIGF2b2lkIHJlY2VudGVyaW5nIHdpbmRvd3MgaWYgaXQKICAgIGlzIG5vdCBuZWNlc3Nh cnk7IGN1cnJlbnRseSB0aGF0IGNhdXNlcyBzb21lIHByb2JsZW1zLiAgKi8KIAorCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwogc3RhdGljIHZvaWQK LXJlZGlzcGxheV9pbnRlcm5hbCAodm9pZCkKK3JlZGlzcGxheV9pbnRlcm5hbCAoaW50IGZyb21f d2hlcmUpCiB7CisjaWZkZWYgR0xZUEhfREVCVUcKKyAgaWYgKHRyYWNlX3JlZGlzcGxheV9wKQor ICAgIGZwcmludGYgKHN0ZGVyciwgIlxucmVkaXNwbGF5X2ludGVybmFsICglZClcbiIsIGZyb21f d2hlcmUpOworI2VuZGlmCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgc3RydWN0 IHdpbmRvdyAqdyA9IFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdyk7CiAgIHN0cnVjdCB3aW5kb3cg KnN3OwogICBzdHJ1Y3QgZnJhbWUgKmZyOwpAQCAtMTQyOTUsNiArMTk1MTgsMjYgQEAgcmVkaXNw bGF5X2ludGVybmFsICh2b2lkKQogI2lmZGVmIEhBVkVfV0lORE9XX1NZU1RFTQogCSAgICAgIHVw ZGF0ZV93aW5kb3dfZnJpbmdlcyAodywgZmFsc2UpOwogI2VuZGlmCisKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKy8qIE5PVEU6ICBBbiBpZGxl LXRpbWVyIGZ1bmN0aW9uIG1heSBub3QgbmVjZXNzYXJpbHkgdHJpZ2dlciBgcmVkaXNwbGF5X3dp bmRvdycuCisgICBgdy0+bXVzdF9iZV91cGRhdGVkX3AnIGlzIHNldCB0byB0cnVlIHdpdGhpbiBg bWMtYWN0aXZhdGUtY3Jvc3NoYWlycycuCistICBgb3B0aW1pemF0aW9uIDFgIChlLmcuLCBsZWZ0 L3JpZ2h0IGN1cnNvciBtb3ZlbWVudCBvbiB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUpLgorLSAgYG9w dGltaXphdGlvbiAzYCAoZS5nLiwgbGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gc2NyZWVu IGxpbmVzIHN1YnNlcXVlbnQKKyAgICB0byB0aGUgZmlyc3Qgc2NyZWVuIGxpbmUpLCBieXBhc3Mg YHJlZGlzcGxheV93aW5kb3cnLiAqLworCisgIGJsb2NrX2lucHV0ICgpOworICBtY19yZW1vdmVf bXVsdGlwbGVfY3Vyc29ycyAodyk7CisgIG1jX3JlbW92ZV9jcm9zc2hhaXJzICh3KTsKKyAgbWNf cmVtb3ZlX2ZpbGxfY29sdW1uICh3KTsKKyAgdW5ibG9ja19pbnB1dCAoKTsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogCSAgICAgIGdvdG8gdXBkYXRlOwogCSAgICB9CiAJICBlbHNl CkBAIC0xNDMxNyw2ICsxOTU2MCwyMiBAQCByZWRpc3BsYXlfaW50ZXJuYWwgKHZvaWQpCiAJCSAg JiYgKHcgPSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpKSAhPSBzdykKIAkJZ290byByZXRyeTsK IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor LyogTk9URTogIEFuIGlkbGUtdGltZXIgZnVuY3Rpb24gbWF5IG5vdCBuZWNlc3NhcmlseSB0cmln Z2VyIGByZWRpc3BsYXlfd2luZG93Jy4KKyAgIGB3LT5tdXN0X2JlX3VwZGF0ZWRfcCcgaXMgc2V0 IHRvIHRydWUgd2l0aGluIGBtYy1hY3RpdmF0ZS1jcm9zc2hhaXJzJy4KKy0gIGBvcHRpbWl6YXRp b24gMWAgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHRoZSBmaXJzdCBzY3Jl ZW4gbGluZSkuCistICBgb3B0aW1pemF0aW9uIDNgIChlLmcuLCBsZWZ0L3JpZ2h0IGN1cnNvciBt b3ZlbWVudCBvbiBzY3JlZW4gbGluZXMgc3Vic2VxdWVudAorICAgIHRvIHRoZSBmaXJzdCBzY3Jl ZW4gbGluZSksIGJ5cGFzcyBgcmVkaXNwbGF5X3dpbmRvdycuICovCisKKyAgICBpZiAody0+bXVz dF9iZV91cGRhdGVkX3ApCisgICAgICBnb3RvIHVwZGF0ZTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogCSAgICAgIC8qIFdlIHVzZWQgdG8gYWx3YXlzIGdvdG8gZW5kX29mX3JlZGlz cGxheSBoZXJlLCBidXQgdGhpcwogCQkgaXNuJ3QgZW5vdWdo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X2ZpbGxfY29sdW1uICh3KTsKKyAgdW5ibG9ja19pbnB1dCAoKTsKKworLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogCQkgIGdvdG8gdXBkYXRlOwogCQl9CiAJICAgICAgZWxzZQpAQCAt MTQ3MzgsMTYgKzIwMDE3LDM2IEBAIHJlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgKGludCBm cm9tX3doZXJlKQogICBibG9ja19idWZmZXJfZmxpcHMgKCk7CiAgIHVuYmxvY2tfaW5wdXQgKCk7 CiAKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisK KyAgc3RydWN0IHdpbmRvdyAqdyA9IGRlY29kZV9saXZlX3dpbmRvdyAoc2VsZWN0ZWRfd2luZG93 KTsKKyAgdy0+bWMucmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IGZyb21fd2hlcmU7Cisg IG1jX3JlZGlzcGxheV9wcmVzZXJ2ZV9lY2hvX2FyZWEgPSBmcm9tX3doZXJlOworCiAgIGlmICgh TklMUCAoZWNob19hcmVhX2J1ZmZlclsxXSkpCiAgICAgewogICAgICAgLyogV2UgaGF2ZSBhIHBy ZXZpb3VzbHkgZGlzcGxheWVkIG1lc3NhZ2UsIGJ1dCBubyBjdXJyZW50CiAJIG1lc3NhZ2UuICBS ZWRpc3BsYXkgdGhlIHByZXZpb3VzIG1lc3NhZ2UuICAqLwogICAgICAgZGlzcGxheV9sYXN0X2Rp c3BsYXllZF9tZXNzYWdlX3AgPSB0cnVlOwotICAgICAgcmVkaXNwbGF5X2ludGVybmFsICgpOwor ICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0gNDsKKyAgICAgIHJlZGlzcGxheV9pbnRlcm5h bCAoNCk7CisgICAgICBtY19yZWRpc3BsYXlfaW50ZXJuYWwgPSAwOwogICAgICAgZGlzcGxheV9s YXN0X2Rpc3BsYXllZF9tZXNzYWdlX3AgPSBmYWxzZTsKICAgICB9CiAgIGVsc2UKLSAgICByZWRp c3BsYXlfaW50ZXJuYWwgKCk7CisgICAgeworICAgICAgbWNfcmVkaXNwbGF5X2ludGVybmFsID0g NTsKKyAgICAgIHJlZGlzcGxheV9pbnRlcm5hbCAoNSk7CisgICAgICBtY19yZWRpc3BsYXlfaW50 ZXJuYWwgPSAwOworICAgIH0KKworICB3LT5tYy5yZWRpc3BsYXlfcHJlc2VydmVfZWNob19hcmVh ID0gMDsKKyAgbWNfcmVkaXNwbGF5X3ByZXNlcnZlX2VjaG9fYXJlYSA9IDA7CisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworCiAKICAgZmx1c2hfZnJhbWUgKFNFTEVDVEVEX0ZSQU1FICgpKTsK ICAgdW5iaW5kX3RvIChjb3VudCwgUW5pbCk7CkBAIC0xNzMwMiw2ICsyMjYwMSwyNSBAQCByZWRp c3BsYXlfd2luZG93IChMaXNwX09iamVjdCB3aW5kb3csIGJvb2wganVzdF90aGlzX29uZV9wKQog ICBkZWJ1Z19tZXRob2RfYWRkICh3LCAicmVjZW50ZXIiKTsKICNlbmRpZgogCisKKy8qICoqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisvKiBOT1RFOiAgQW4g aWRsZS10aW1lciBmdW5jdGlvbiBtYXkgbm90IG5lY2Vzc2FyaWx5IHRyaWdnZXIgYHJlZGlzcGxh eV93aW5kb3cnLgorICAgYHctPm11c3RfYmVfdXBkYXRlZF9wJyBpcyBzZXQgdG8gdHJ1ZSB3aXRo aW4gYG1jLWFjdGl2YXRlLWNyb3NzaGFpcnMnLgorLSAgYG9wdGltaXphdGlvbiAxYCAoZS5nLiwg bGVmdC9yaWdodCBjdXJzb3IgbW92ZW1lbnQgb24gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKS4KKy0g IGBvcHRpbWl6YXRpb24gM2AgKGUuZy4sIGxlZnQvcmlnaHQgY3Vyc29yIG1vdmVtZW50IG9uIHNj cmVlbiBsaW5lcyBzdWJzZXF1ZW50CisgICAgdG8gdGhlIGZpcnN0IHNjcmVlbiBsaW5lKSwgYnlw YXNzIGByZWRpc3BsYXlfd2luZG93Jy4gKi8KKworICBibG9ja19pbnB1dCAoKTsKKyAgbWNfcmVt b3ZlX211bHRpcGxlX2N1cnNvcnMgKHcpOworICBtY19yZW1vdmVfY3Jvc3NoYWlycyAodyk7Cisg IG1jX3JlbW92ZV9maWxsX2NvbHVtbiAodyk7CisgIHVuYmxvY2tfaW5wdXQgKCk7CisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworCisKICAgLyogRm9yZ2V0IGFueSBwcmV2aW91c2x5IHJlY29y ZGVkIGJhc2UgbGluZSBmb3IgbGluZSBudW1iZXIgZGlzcGxheS4gICovCiAgIGlmICghYnVmZmVy X3VuY2hhbmdlZF9wKQogICAgIHctPmJhc2VfbGluZV9udW1iZXIgPSAwOwpAQCAtMTc3MzIsNiAr MjMwNTAsMjUgQEAgcmVkaXNwbGF5X3dpbmRvdyAoTGlzcF9PYmplY3Qgd2luZG93LCBib29sIGp1 c3RfdGhpc19vbmVfcCkKICAgZWxzZQogICAgIFRFTVBfU0VUX1BUX0JPVEggKENIQVJQT1MgKG9w b2ludCksIEJZVEVQT1MgKG9wb2ludCkpOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi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0NTksMTcgQEAgYXBwZW5kX3NwYWNlX2Zvcl9uZXdsaW5lIChz dHJ1Y3QgaXQgKml0LCBib29sIGRlZmF1bHRfZmFjZV9wKQogCSAgbWVtc2V0ICgmaXQtPnBvc2l0 aW9uLCAwLCBzaXplb2YgaXQtPnBvc2l0aW9uKTsKIAkgIGl0LT5vYmplY3QgPSBRbmlsOwogCSAg aXQtPmMgPSBpdC0+Y2hhcl90b19kaXNwbGF5ID0gJyAnOworCisKKy8qICoqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgICBpZiAoSVRfQllURVBPUyAo Kml0KSA+PSBaVl9CWVRFKQorICAgICAgICBpdC0+enZfcCA9IHRydWU7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIAkgIGl0LT5sZW4gPSAxOwogCiAJICAvKiBJZiB0aGUgZGVmYXVs dCBmYWNlIHdhcyByZW1hcHBlZCwgYmUgc3VyZSB0byB1c2UgdGhlCkBAIC0yMTI1NSw5ICsyNjYw MywyMiBAQCBtYXliZV9wcm9kdWNlX2xpbmVfbnVtYmVyIChzdHJ1Y3QgaXQgKml0KQogICAgICAg ZWxzZQogCXRlbV9pdC5jID0gdGVtX2l0LmNoYXJfdG9fZGlzcGxheSA9ICpwOwogICAgICAgdGVt X2l0LmxlbiA9IDE7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBD VVJTT1JTICovCisKKyAgICAgIGlmIChiZXlvbmRfenYpCisgICAgICAgIHRlbV9pdC56dl9wID0g dHJ1ZTsKKyAgICAgIHRlbV9pdC5jdXJyZW50X3kgPSBpdC0+Y3VycmVudF95OworICAgICAgdGVt X2l0LnZwb3MgPSBpdC0+dnBvczsKICAgICAgIC8qIE1ha2Ugc3VyZSB0aGVzZSBnbHlwaHMgd2ls bCBoYXZlIGEgInBvc2l0aW9uIiBvZiAtMS4gICovCiAgICAgICBTRVRfVEVYVF9QT1MgKHRlbV9p dC5wb3NpdGlvbiwgLTEsIC0xKTsKICAgICAgIFBST0RVQ0VfR0xZUEhTICgmdGVtX2l0KTsKKyAg ICAgIHRlbV9pdC5ocG9zICs9IDE7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCiAKICAg ICAgIC8qIFN0b3AgcHJvZHVjaW5nIGdseXBocywgYW5kIHJlZnJhaW4gZnJvbSBwcm9kdWNpbmcg dGhlIGxpbmUKIAkgbnVtYmVyLCBpZiB3ZSBkb24ndCBoYXZlIGVub3VnaCBzcGFjZSBvbiB0aGlz IGxpbmUuICAqLwpAQCAtMjEyNzAsNiArMjY2MzEsMTUgQEAgbWF5YmVfcHJvZHVjZV9saW5lX251 bWJlciAoc3RydWN0IGl0ICppdCkKIAl9CiAgICAgfQogCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGl0LT53LT5tYy5sbnVtX3BpeGVsX3dp ZHRoID0gdGVtX2l0LmN1cnJlbnRfeDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwog ICAvKiBSZWNvcmQgdGhlIHdpZHRoIGluIHBpeGVscyB3ZSBuZWVkIGZvciB0aGUgbGluZSBudW1i ZXIgZGlzcGxheS4gICovCiAgIGl0LT5sbnVtX3BpeGVsX3dpZHRoID0gdGVtX2l0LmN1cnJlbnRf eDsKICAgLyogQ29weSB0aGUgcHJvZHVjZWQgZ2x5cGhzIGludG8gSVQncyBnbHlwaF9yb3cuICAq LwpAQCAtMjY4NDEsNyArMzIyMTEsNjcgQEAgZHJhd19nbHlwaHMgKHN0cnVjdCB3aW5kb3cgKncs IGludCB4LCBzdHJ1Y3QgZ2x5cGhfcm93ICpyb3csCiAJIHByZXBlbmRlZCBtdXN0IGJlIGRyYXdu IGJlY2F1c2UgdGhlIGZpcnN0IGdseXBoIHN0cmluZwogCSBkcmF3cyBvdmVyIGl0LiAgKi8KICAg ICAgIGkgPSBsZWZ0X292ZXJ3cml0dGVuIChoZWFkKTsKLSAgICAgIGlmIChpID49IDApCisKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgICAg IGJvb2wgc2tpcF9wID0gZmFsc2U7CisgICAgICBpbnQgYmVnID0gaTsKKworICAgICAgaWYgKGkg Pj0gMAorICAgICAgICAgICYmIGhsID09IERSQVdfQ1VSU09SCisgICAgICAgICAgJiYgKHctPm1j LmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSAorICAgICAgICAgICAgICB8fCB3LT5tYy5nbHlwaF9m bGF2b3IgPT0gTUNfR0xZUEhMRVNTKSkKKyAgICAgICAgd2hpbGUgKHN0YXJ0ID4gYmVnKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIHN0cnVjdCBnbHlwaCAqZ2x5cGggPSAocm93KS0+Z2x5cGhz W2FyZWFdICsgYmVnOworICAgICAgICAgICAgc3dpdGNoIChnbHlwaC0+dHlwZSkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgY2FzZSBDSEFSX0dMWVBIOgorICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICAgICAgICBjYXNlIENPTVBPU0lURV9HTFlQSDoKKyAgICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgICAgY2FzZSBTVFJFVENIX0dMWVBIOgorICAgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmICh0cmFjZV9yZWRpc3BsYXlfcCkKKyAgICAgICAg ICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgIExpc3BfT2JqZWN0IGNoYXJhY3Rl ciA9IChDSEFSQUNURVJQIChtYWtlX2ZpeG51bSAoZ2x5cGgtPnUuY2gpKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBGY2hhcl90b19zdHJpbmcgKG1h a2VfZml4bnVtIChnbHlwaC0+dS5jaCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDogUW5pbDsKKyAgICAgICAgICAgICAgICAgICAgICBmcHJpbnRmIChz dGRlcnIsICJkcmF3X2dseXBocyAtLSBsZWZ0X292ZXJ3cml0dGVuOiAgJWQgfCAlc1xuIiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdseXBoLT51LmNoLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCghTklMUCAoY2hhcmFjdGVyKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAx MCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHQiCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0 ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBo LT51LmNoID09IDEwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ID8gIlxcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoIU5J TFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJiYgZ2x5cGgtPnUuY2ggPT0gMzIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgPyAiXFxzIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCAhPSA5CisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoICE9IDEwCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoICE9IDMyKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gU1NEQVRBIChjaGFyYWN0 ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogIlxcPyIpKTsK KyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgc2tpcF9wID0gdHJ1ZTsK KyAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgY2FzZSBJTUFHRV9HTFlQSDoKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICAgIGJlZyArPSAxOworICAgICAgICAgIH0KKworICAgICAgaWYgKGkgPj0g MAorICAgICAgICAgICYmICFza2lwX3ApCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisK IAl7CiAJICBlbnVtIGRyYXdfZ2x5cGhzX2ZhY2Ugb3ZlcmxhcF9obDsKIApAQCAtMjY5MDMsNyAr MzIzMzMsNjcgQEAgZHJhd19nbHlwaHMgKHN0cnVjdCB3aW5kb3cgKncsIGludCB4LCBzdHJ1Y3Qg Z2x5cGhfcm93ICpyb3csCiAJIHRoZXNlIHN0cmluZ3MgaGFzIHRvIGJlIGRyYXduIGJlY2F1c2Ug dGFpbCdzIGZvcmVncm91bmQgZHJhd3MKIAkgb3ZlciBpdC4gICovCiAgICAgICBpID0gcmlnaHRf b3ZlcndyaXR0ZW4gKHRhaWwpOwotICAgICAgaWYgKGkgPj0gMCkKKworCisvKiAqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgc2tpcF9wID0gZmFs c2U7CisgICAgICBiZWcgPSBpOworCisgICAgICBpZiAoaSA+PSAwCisgICAgICAgICAgJiYgaGwg PT0gRFJBV19DVVJTT1IKKyAgICAgICAgICAmJiAody0+bWMuZ2x5cGhfZmxhdm9yID09IE1DX0dM WVBICisgICAgICAgICAgICAgIHx8IHctPm1jLmdseXBoX2ZsYXZvciA9PSBNQ19HTFlQSExFU1Mp KQorICAgICAgICB3aGlsZSAoYmVnID49IGVuZCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBz dHJ1Y3QgZ2x5cGggKmdseXBoID0gKHJvdyktPmdseXBoc1thcmVhXSArIGJlZzsKKyAgICAgICAg ICAgIHN3aXRjaCAoZ2x5cGgtPnR5cGUpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIGNh c2UgQ0hBUl9HTFlQSDoKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgY2Fz ZSBDT01QT1NJVEVfR0xZUEg6CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg IGNhc2UgU1RSRVRDSF9HTFlQSDoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAg ICBpZiAodHJhY2VfcmVkaXNwbGF5X3ApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAg ICAgICAgICAgICAgICBMaXNwX09iamVjdCBjaGFyYWN0ZXIgPSAoQ0hBUkFDVEVSUCAobWFrZV9m aXhudW0gKGdseXBoLT51LmNoKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgID8gRmNoYXJfdG9fc3RyaW5nIChtYWtlX2ZpeG51bSAoZ2x5cGgtPnUuY2gp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFFuaWw7 CisgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZiAoc3RkZXJyLCAiZHJhd19nbHlwaHMgLS0g cmlnaHRfb3ZlcndyaXR0ZW46ICAlZCB8ICVzXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZ2x5cGgtPnUuY2gsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoKCFOSUxQIChjaGFyYWN0ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICYmIGdseXBoLT51LmNoID09IDEwKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gIlxcdCIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOiAoIU5JTFAgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggPT0gMTApCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAiXFxuIgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICghTklMUCAoY2hhcmFjdGVyKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBnbHlwaC0+dS5jaCA9PSAz MikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJcXHMiCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKCFOSUxQIChjaGFyYWN0 ZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIGdseXBo LT51LmNoICE9IDkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg JiYgZ2x5cGgtPnUuY2ggIT0gMTAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgJiYgZ2x5cGgtPnUuY2ggIT0gMzIpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgPyBTU0RBVEEgKGNoYXJhY3RlcikKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOiAiXFw/IikpOworICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgICBza2lwX3AgPSB0cnVlOworICAgICAgICAgICAgICAgICAgYnJl YWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBjYXNlIElNQUdFX0dMWVBIOgor ICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYmVnIC09 IDE7CisgICAgICAgICAgfQorCisgICAgICBpZiAoaSA+PSAwCisgICAgICAgICAgJiYgIXNraXBf cCkKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCXsKIAkgIGVudW0gZHJhd19nbHlw aHNfZmFjZSBvdmVybGFwX2hsOwogCkBAIC0yNzA2OSw2ICszMjU1OSwyNCBAQCBhcHBlbmRfZ2x5 cGggKHN0cnVjdCBpdCAqaXQpCiAJICAgIGdbMV0gPSAqZzsKIAkgIGdseXBoID0gaXQtPmdseXBo X3Jvdy0+Z2x5cGhzW2FyZWFdOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94Owor CisgICAgICBnbHlwaC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0g aXQtPmhwb3M7CisKKyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBo LT56dl9wID0gaXQtPnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAg IGdseXBoLT5jaGFycG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5v YmplY3QgPSBpdC0+b2JqZWN0OwogICAgICAgaWYgKGl0LT5waXhlbF93aWR0aCA+IDApCkBAIC0y NzE1Miw2ICszMjY2MCwyNCBAQCBhcHBlbmRfY29tcG9zaXRlX2dseXBoIChzdHJ1Y3QgaXQgKml0 KQogCSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBoc1tpdC0+ YXJlYV07CiAJfQorCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VS U09SUyAqLworCisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBo LT55ID0gaXQtPmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKwor ICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+ enZfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICAgICAgZ2x5cGgtPmNoYXJw b3MgPSBpdC0+Y21wX2l0LmNoYXJwb3M7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVj dDsKICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93aWR0aCA8PSBTSFJUX01BWCk7CkBAIC0yNzM2 MCw2ICszMjg4NiwyNCBAQCBwcm9kdWNlX2ltYWdlX2dseXBoIChzdHJ1Y3QgaXQgKml0KQogCX0K ICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9yb3ctPmdseXBoc1thcmVhICsgMV0pCiAJewor CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisg ICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGdseXBoLT55ID0gaXQtPmN1 cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsKKworICAgICAgZ2x5cGgt PnZwb3MgPSBpdC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBpdC0+enZfcDsKKworLyog KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqICovCisKKwogCSAgZ2x5cGgtPmNoYXJwb3MgPSBDSEFSUE9TIChp dC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmplY3Q7CiAJICBnbHlwaC0+ cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5kcyAoLTEsIGl0LT5waXhlbF93aWR0aCwgU0hSVF9N QVgpOwpAQCAtMjc0NjMsNiArMzMwMDcsMjQgQEAgcHJvZHVjZV94d2lkZ2V0X2dseXBoIChzdHJ1 Y3QgaXQgKml0KQogCX0KICAgICAgIGlmIChnbHlwaCA8IGl0LT5nbHlwaF9yb3ctPmdseXBoc1th cmVhICsgMV0pCiAJeworCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUg Q1VSU09SUyAqLworCisgICAgICBnbHlwaC0+eCA9IGl0LT5jdXJyZW50X3g7CisKKyAgICAgIGds eXBoLT55ID0gaXQtPmN1cnJlbnRfeTsKKworICAgICAgZ2x5cGgtPmhwb3MgPSBpdC0+aHBvczsK KworICAgICAgZ2x5cGgtPnZwb3MgPSBpdC0+dnBvczsKKworICAgICAgZ2x5cGgtPnp2X3AgPSBp dC0+enZfcDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCSAgZ2x5cGgtPmNoYXJw b3MgPSBDSEFSUE9TIChpdC0+cG9zaXRpb24pOwogCSAgZ2x5cGgtPm9iamVjdCA9IGl0LT5vYmpl Y3Q7CiAJICBnbHlwaC0+cGl4ZWxfd2lkdGggPSBjbGlwX3RvX2JvdW5kcyAoLTEsIGl0LT5waXhl bF93aWR0aCwgU0hSVF9NQVgpOwpAQCAtMjc1NDksNiArMzMxMTEsMjQgQEAgYXBwZW5kX3N0cmV0 Y2hfZ2x5cGggKHN0cnVjdCBpdCAqaXQsIExpc3BfT2JqZWN0IG9iamVjdCwKIAkgICAgd2lkdGgg LT0gaXQtPmZpcnN0X3Zpc2libGVfeCAtIGl0LT5jdXJyZW50X3g7CiAJICBlYXNzZXJ0ICh3aWR0 aCA+IDApOwogCX0KKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENV UlNPUlMgKi8KKworICAgICAgZ2x5cGgtPnggPSBpdC0+Y3VycmVudF94OworCisgICAgICBnbHlw aC0+eSA9IGl0LT5jdXJyZW50X3k7CisKKyAgICAgIGdseXBoLT5ocG9zID0gaXQtPmhwb3M7CisK KyAgICAgIGdseXBoLT52cG9zID0gaXQtPnZwb3M7CisKKyAgICAgIGdseXBoLT56dl9wID0gaXQt Pnp2X3A7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGdseXBoLT5jaGFy cG9zID0gQ0hBUlBPUyAoaXQtPnBvc2l0aW9uKTsKICAgICAgIGdseXBoLT5vYmplY3QgPSBvYmpl Y3Q7CiAgICAgICAvKiBGSVhNRTogSXQgd291bGQgYmUgYmV0dGVyIHRvIHVzZSBUWVBFX01BWCBo ZXJlLCBidXQKQEAgLTI4MDAzLDYgKzMzNTgzLDI0IEBAIGFwcGVuZF9nbHlwaGxlc3NfZ2x5cGgg KHN0cnVjdCBpdCAqaXQsIGludCBmYWNlX2lkLCBib29sIGZvcl9ub19mb250LCBpbnQgbGVuLAog CSAgICBnWzFdID0gKmc7CiAJICBnbHlwaCA9IGl0LT5nbHlwaF9yb3ctPmdseXBoc1thcmVhXTsK IAl9CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICov CisKKyAgICAgIGdseXBoLT54ID0gaXQtPmN1cnJlbnRfeDsKKworICAgICAgZ2x5cGgtPnkgPSBp dC0+Y3VycmVudF95OworCisgICAgICBnbHlwaC0+aHBvcyA9IGl0LT5ocG9zOworCisgICAgICBn bHlwaC0+dnBvcyA9IGl0LT52cG9zOworCisgICAgICBnbHlwaC0+enZfcCA9IGl0LT56dl9wOwor CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAgICAgICBnbHlwaC0+Y2hhcnBvcyA9IENI QVJQT1MgKGl0LT5wb3NpdGlvbik7CiAgICAgICBnbHlwaC0+b2JqZWN0ID0gaXQtPm9iamVjdDsK ICAgICAgIGVhc3NlcnQgKGl0LT5waXhlbF93aWR0aCA8PSBTSFJUX01BWCk7CkBAIC0yOTE1NCw2 ICszNDc1MiwxNiBAQCBnZXRfc3BlY2lmaWVkX2N1cnNvcl90eXBlIChMaXNwX09iamVjdCBhcmcs IGludCAqd2lkdGgpCiB7CiAgIGVudW0gdGV4dF9jdXJzb3Jfa2luZHMgdHlwZTsKIAorCisvKiAq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBpZiAoRVEg KGFyZywgUWZyYW1lZCkpCisgICAgcmV0dXJuIEZSQU1FRF9CT1hfQ1VSU09SOworCisvKiAqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKiogKi8KKworCiAgIGlmIChOSUxQIChhcmcpKQogICAgIHJldHVybiBOT19D VVJTT1I7CiAKQEAgLTI5MzAzLDkgKzM0OTExLDE5IEBAIGdldF93aW5kb3dfY3Vyc29yX3R5cGUg KHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaCAqZ2x5cGgsIGludCAqd2lkdGgsCiAgICAg ICBhbHRfY3Vyc29yID0gQlZBUiAoYiwgY3Vyc29yX2luX25vbl9zZWxlY3RlZF93aW5kb3dzKTsK ICAgICAgIGlmICghRVEgKFF0LCBhbHRfY3Vyc29yKSkKIAlyZXR1cm4gZ2V0X3NwZWNpZmllZF9j dXJzb3JfdHlwZSAoYWx0X2N1cnNvciwgd2lkdGgpOworCisKKy8qICoqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCiAgICAgICAvKiB0IG1lYW5zIG1vZGlmeSB0 aGUgbm9ybWFsIGN1cnNvciB0eXBlLiAgKi8KLSAgICAgIGlmIChjdXJzb3JfdHlwZSA9PSBGSUxM RURfQk9YX0NVUlNPUikKLQljdXJzb3JfdHlwZSA9IEhPTExPV19CT1hfQ1VSU09SOworICAgICAg aWYgKGN1cnNvcl90eXBlID09IEZJTExFRF9CT1hfQ1VSU09SCisgICAgICAgICAgfHwgY3Vyc29y X3R5cGUgPT0gRlJBTUVEX0JPWF9DVVJTT1IpCisgICAgICAgIGN1cnNvcl90eXBlID0gSE9MTE9X X0JPWF9DVVJTT1I7CisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICAgIGVsc2Ug aWYgKGN1cnNvcl90eXBlID09IEJBUl9DVVJTT1IgJiYgKndpZHRoID4gMSkKIAktLSp3aWR0aDsK ICAgICAgIHJldHVybiBjdXJzb3JfdHlwZTsKQEAgLTI5MzE4LDcgKzM0OTM2LDE3IEBAIGdldF93 aW5kb3dfY3Vyc29yX3R5cGUgKHN0cnVjdCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaCAqZ2x5cGgs IGludCAqd2lkdGgsCiAgICAgICAgIHJldHVybiBOT19DVVJTT1I7CiAgICAgICBpZiAoZ2x5cGgg IT0gTlVMTCAmJiBnbHlwaC0+dHlwZSA9PSBJTUFHRV9HTFlQSCkKIAl7Ci0JICBpZiAoY3Vyc29y X3R5cGUgPT0gRklMTEVEX0JPWF9DVVJTT1IpCisKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKwkgIGlmIChjdXJzb3JfdHlwZSA9PSBGSUxMRURf Qk9YX0NVUlNPUgorICAgICAgICAgIHx8IGN1cnNvcl90eXBlID09IEZSQU1FRF9CT1hfQ1VSU09S KQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJICAgIHsKIAkgICAgICAvKiBVc2lu ZyBhIGJsb2NrIGN1cnNvciBvbiBsYXJnZSBpbWFnZXMgY2FuIGJlIHZlcnkgYW5ub3lpbmcuCiAJ CSBTbyB1c2UgYSBob2xsb3cgY3Vyc29yIGZvciAibGFyZ2UiIGltYWdlcy4KQEAgLTI5MzcwLDkg KzM0OTk4LDE3IEBAIGdldF93aW5kb3dfY3Vyc29yX3R5cGUgKHN0cnVjdCB3aW5kb3cgKncsIHN0 cnVjdCBnbHlwaCAqZ2x5cGgsIGludCAqd2lkdGgsCiAgICAgICAgbmFycm93IFtoXWJhciAgIDwt PiAgIG5vIGN1cnNvcgogICAgICAgIG90aGVyIHR5cGUgICAgICA8LT4gICBubyBjdXJzb3IgICov CiAKLSAgaWYgKGN1cnNvcl90eXBlID09IEZJTExFRF9CT1hfQ1VSU09SKQorCisvKiAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKworICBpZiAoY3Vyc29yX3R5 cGUgPT0gRklMTEVEX0JPWF9DVVJTT1IKKyAgICAgIHx8IGN1cnNvcl90eXBlID09IEZSQU1FRF9C T1hfQ1VSU09SKQogICAgIHJldHVybiBIT0xMT1dfQk9YX0NVUlNPUjsKIAorLyogKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqICovCisKKwogICBpZiAoKGN1cnNvcl90eXBlID09IEJBUl9DVVJTT1IgfHwgY3Vy c29yX3R5cGUgPT0gSEJBUl9DVVJTT1IpICYmICp3aWR0aCA+IDEpCiAgICAgewogICAgICAgKndp ZHRoID0gMTsKQEAgLTI5NjI5LDggKzM1MjY1LDE3IEBAIGVyYXNlX3BoeXNfY3Vyc29yIChzdHJ1 Y3Qgd2luZG93ICp3KQogICAgICAgJiYgY3Vyc29yX3Jvdy0+dXNlZFtURVhUX0FSRUFdID4gaHBv cyAmJiBocG9zID49IDApCiAgICAgbW91c2VfZmFjZV9oZXJlX3AgPSB0cnVlOwogCisKKy8qICoq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCiAgIC8qIE1heWJl IGNsZWFyIHRoZSBkaXNwbGF5IHVuZGVyIHRoZSBjdXJzb3IuICAqLwotICBpZiAody0+cGh5c19j dXJzb3JfdHlwZSA9PSBIT0xMT1dfQk9YX0NVUlNPUikKKyAgaWYgKHctPnBoeXNfY3Vyc29yX3R5 cGUgPT0gSE9MTE9XX0JPWF9DVVJTT1IKKyAgICAgIHx8IHctPnBoeXNfY3Vyc29yX3R5cGUgPT0g RlJBTUVEX0JPWF9DVVJTT1IpCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCisKICAgICB7 CiAgICAgICBpbnQgeCwgeTsKICAgICAgIGludCBoZWFkZXJfbGluZV9oZWlnaHQgPSBXSU5ET1df SEVBREVSX0xJTkVfSEVJR0hUICh3KTsKQEAgLTI5NzY5LDkgKzM1NDE0LDM4IEBAIGRpc3BsYXlf YW5kX3NldF9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb24sCiAgICAgICB3LT5waHlz X2N1cnNvci52cG9zID0gdnBvczsKICAgICB9CiAKKworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgdy0+bWMuaCA9IC0xOworICB3LT5tYy5meCA9 IC0xOworICB3LT5tYy5meSA9IC0xOworICB3LT5tYy5nbHlwaF9mbGF2b3IgPSBOT19GTEFWT1I7 CisgIHctPm1jLnJlZCA9IC0xLjA7CisgIHctPm1jLmdyZWVuID0gLTEuMDsKKyAgdy0+bWMuYmx1 ZSA9IC0xLjA7CisgIHctPm1jLnBvc2ludCA9IC0xOworCisgIC8qIEZvciB0aGUgYmVuZWZpdCBv ZiB0aGUgTlMgcG9ydCB1c2Vycywgd2Ugc2V0IGB3LT5tYy5hY3RpdmVfcGAsIHdoaWNoIGlzCisg IHVzZWQgYnkgYG5zX2RyYXdfZ2x5cGhfc3RyaW5nJyB3aGVuIHNldHRpbmcgdGhlIGdseXBoIGNo YXJhY3RlciBmb3JlZ3JvdW5kLiAqLworICB3LT5tYy5hY3RpdmVfcCA9IGFjdGl2ZV9jdXJzb3I7 CisKICAgRlJBTUVfUklGIChmKS0+ZHJhd193aW5kb3dfY3Vyc29yICh3LCBnbHlwaF9yb3csIHgs IHksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2N1cnNvcl90eXBl LCBuZXdfY3Vyc29yX3dpZHRoLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG9uLCBhY3RpdmVfY3Vyc29yKTsKKworICB3LT5tYy5hY3RpdmVfcCA9IGZhbHNlOworCisgIG1j X211bHRpcGxlX2N1cnNvcnNfcG9ydGFsICh3LCBvbiwgYWN0aXZlX2N1cnNvcik7CisKKyAgbWNf Y3Jvc3NoYWlyc19wb3J0YWwgKHcsIG9uLCBhY3RpdmVfY3Vyc29yKTsKKworICBtY19maWxsX2Nv bHVtbl9wb3J0YWwgKHcsIG9uLCBhY3RpdmVfY3Vyc29yKTsKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisKKwogfQogCiAKQEAgLTI5ODM2LDYgKzM1NTEwLDE2IEBAIHVwZGF0ZV9jdXJzb3Jf aW5fd2luZG93X3RyZWUgKHN0cnVjdCB3aW5kb3cgKncsIGJvb2wgb25fcCkKIHZvaWQKIHhfdXBk YXRlX2N1cnNvciAoc3RydWN0IGZyYW1lICpmLCBib29sIG9uX3ApCiB7CisKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKKyAgVFJBQ0UgKChzdGRl cnIsICJ4X3VwZGF0ZV9jdXJzb3I6ICBvbl9wICglZClcbiIsIG9uX3ApKTsKKworLyogKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqICovCisKKwogICB1cGRhdGVfY3Vyc29yX2luX3dpbmRvd190cmVlIChYV0lO RE9XIChmLT5yb290X3dpbmRvdyksIG9uX3ApOwogfQogCkBAIC0yOTg0OCw4ICszNTUzMiwyMCBA QCB4X3VwZGF0ZV9jdXJzb3IgKHN0cnVjdCBmcmFtZSAqZiwgYm9vbCBvbl9wKQogdm9pZAogeF9j bGVhcl9jdXJzb3IgKHN0cnVjdCB3aW5kb3cgKncpCiB7CisKKworLyogKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqICovCisvKiBNVUxUSVBMRSBDVVJTT1JTICovCisKICAgaWYgKEZSQU1FX1ZJU0lCTEVfUCAo WEZSQU1FICh3LT5mcmFtZSkpICYmIHctPnBoeXNfY3Vyc29yX29uX3ApCi0gICAgdXBkYXRlX3dp bmRvd19jdXJzb3IgKHcsIGZhbHNlKTsKKyAgICB7CisgICAgICBUUkFDRSAoKHN0ZGVyciwgInhf Y2xlYXJfY3Vyc29yXG4iKSk7CisgICAgICB1cGRhdGVfd2luZG93X2N1cnNvciAodywgZmFsc2Up OworICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAjZW5kaWYgLyog SEFWRV9XSU5ET1dfU1lTVEVNICovCkBAIC0zMjMzOCwxMCArMzgwMzQsMjAgQEAgZXhwb3NlX3dp bmRvdyAoc3RydWN0IHdpbmRvdyAqdywgWFJlY3RhbmdsZSAqZnIpCiAJICBpZiAoV0lORE9XX0JP VFRPTV9ESVZJREVSX1dJRFRIICh3KSkKIAkgICAgeF9kcmF3X2JvdHRvbV9kaXZpZGVyICh3KTsK IAorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1VTFRJUExFIENVUlNPUlMgKi8KKwor I2lmICFkZWZpbmVkIChIQVZFX05TKQogCSAgLyogVHVybiB0aGUgY3Vyc29yIG9uIGFnYWluLiAg Ki8KIAkgIGlmIChjdXJzb3JfY2xlYXJlZF9wCiAJICAgICAgfHwgKHBoeXNfY3Vyc29yX29uX3Ag JiYgIXctPnBoeXNfY3Vyc29yX29uX3ApKQogCSAgICB1cGRhdGVfd2luZG93X2N1cnNvciAodywg dHJ1ZSk7CisjZW5kaWYKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogCX0KICAgICB9 CiAKQEAgLTMyNTM5LDYgKzM4MjQ1LDMwIEBAIHhfaW50ZXJzZWN0X3JlY3RhbmdsZXMgKFhSZWN0 YW5nbGUgKnIxLCBYUmVjdGFuZ2xlICpyMiwgWFJlY3RhbmdsZSAqcmVzdWx0KQogdm9pZAogc3lt c19vZl94ZGlzcCAodm9pZCkKIHsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIE1V TFRJUExFIENVUlNPUlMgKi8KKworICBkZWZzdWJyICgmU21jX2R1bXBfZ2x5cGhfcm93KTsKKwor ICBkZWZzdWJyICgmU21jX2R1bXBfZ2x5cGhfbWF0cml4KTsKKworICBkZWZzdWJyICgmU21jX2Fj dGl2YXRlX211bHRpcGxlX2N1cnNvcnMpOworCisgIGRlZnN1YnIgKCZTbWNfYWN0aXZhdGVfY3Jv c3NoYWlycyk7CisKKyAgZGVmc3ViciAoJlNtY19zdGRlcnIpOworCisgIGRlZnN1YnIgKCZTbWNf ZGVidWcpOworCisgIGRlZnN1YnIgKCZTbWNfYWN0aXZhdGVfZmlsbF9jb2x1bW4pOworCisgIERF RlNZTSAoUWZyYW1lZCwgImZyYW1lZCIpOworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKwor CiAgIFZ3aXRoX2VjaG9fYXJlYV9zYXZlX3ZlY3RvciA9IFFuaWw7CiAgIHN0YXRpY3BybyAoJlZ3 aXRoX2VjaG9fYXJlYV9zYXZlX3ZlY3Rvcik7CiAKZGlmZiAtLWdpdCBhL3NyYy94dGVybS5jIGIv c3JjL3h0ZXJtLmMKaW5kZXggOTQzZjRjMy4uNTgxMjE0YyAxMDA2NDQKLS0tIGEvc3JjL3h0ZXJt LmMKKysrIGIvc3JjL3h0ZXJtLmMKQEAgLTk5Nyw2ICs5OTcsMTUgQEAgeF91cGRhdGVfYmVnaW4g KHN0cnVjdCBmcmFtZSAqZikKICAgaWYgKEZSQU1FX1RPT0xUSVBfUCAoZikgJiYgIUZSQU1FX1ZJ U0lCTEVfUCAoZikpCiAgICAgcmV0dXJuOwogCisKKy8qICoqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwor LyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2ZyYW1lID0gZjsKKwor LyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBpZiAoISBGUkFNRV9DUl9TVVJGQUNFIChm KSkKICAgICB7CiAgICAgICBpbnQgd2lkdGgsIGhlaWdodDsKQEAgLTEyNjQsNiArMTI3MywxNiBA QCB4X3VwZGF0ZV9lbmQgKHN0cnVjdCBmcmFtZSAqZikKICAgWEZsdXNoIChGUkFNRV9YX0RJU1BM QVkgKGYpKTsKICAgdW5ibG9ja19pbnB1dCAoKTsKICNlbmRpZgorCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgIGYtPm1jX3VwZGF0aW5nX2Zy YW1lID0gTlVMTDsKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogfQogCiAvKiBUaGlz IGZ1bmN0aW9uIGlzIGNhbGxlZCBmcm9tIHZhcmlvdXMgcGxhY2VzIGluIHhkaXNwLmMKQEAgLTE1 MzYsNiArMTU1NSwyMCBAQCBzdGF0aWMgdm9pZCB4X2NoZWNrX2ZvbnQgKHN0cnVjdCBmcmFtZSAq LCBzdHJ1Y3QgZm9udCAqKTsKIHN0YXRpYyB2b2lkCiB4X3NldF9jdXJzb3JfZ2MgKHN0cnVjdCBn bHlwaF9zdHJpbmcgKnMpCiB7CisKKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiBNVUxU SVBMRSBDVVJTT1JTICovCisKKyAgaWYgKHMtPnctPm1jLmN1cnNvcl9nY19kZWZhdWx0KQorICAg IHsKKyAgICAgIHMtPmdjID0gcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djOworICAgICAg cmV0dXJuOworICAgIH0KKworLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisKKwogICBpZiAocy0+ Zm9udCA9PSBGUkFNRV9GT05UIChzLT5mKQogICAgICAgJiYgcy0+ZmFjZS0+YmFja2dyb3VuZCA9 PSBGUkFNRV9CQUNLR1JPVU5EX1BJWEVMIChzLT5mKQogICAgICAgJiYgcy0+ZmFjZS0+Zm9yZWdy b3VuZCA9PSBGUkFNRV9GT1JFR1JPVU5EX1BJWEVMIChzLT5mKQpAQCAtOTI1OCw2ICs5MjkxLDI2 IEBAIHhfZHJhd19ob2xsb3dfY3Vyc29yIChzdHJ1Y3Qgd2luZG93ICp3LCBzdHJ1Y3QgZ2x5cGhf cm93ICpyb3cpCiAKICAgLyogQ29tcHV0ZSBmcmFtZS1yZWxhdGl2ZSBjb29yZGluYXRlcyBmb3Ig cGh5cyBjdXJzb3IuICAqLwogICBnZXRfcGh5c19jdXJzb3JfZ2VvbWV0cnkgKHcsIHJvdywgY3Vy c29yX2dseXBoLCAmeCwgJnksICZoKTsKKworCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8q IE1VTFRJUExFIENVUlNPUlMgKi8KKworLyogTEVHRU5EOgorCistICB0b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qKioqKioqKioqKioqKioqKioqKioqKiAqLworLyogTVVMVElQ TEUgQ1VSU09SUyAqLworCisgICAgICBpZiAoZmFjZS0+YmFja2dyb3VuZCA9PSBmLT5vdXRwdXRf ZGF0YS54LT5jdXJzb3JfcGl4ZWwKKyAgICAgICAgICAmJiAhdy0+bWMuY3Vyc29yX2djX2ludmlz aWJsZV9va2F5KQorCisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKworCiAJeGdjdi5iYWNrZ3Jv dW5kID0geGdjdi5mb3JlZ3JvdW5kID0gZmFjZS0+Zm9yZWdyb3VuZDsKICAgICAgIGVsc2UKIAl4 Z2N2LmJhY2tncm91bmQgPSB4Z2N2LmZvcmVncm91bmQgPSBmLT5vdXRwdXRfZGF0YS54LT5jdXJz b3JfcGl4ZWw7CkBAIC05MzY1LDYgKzk0MjgsMTcgQEAgeF9kcmF3X2Jhcl9jdXJzb3IgKHN0cnVj dCB3aW5kb3cgKncsIHN0cnVjdCBnbHlwaF9yb3cgKnJvdywgaW50IHdpZHRoLCBlbnVtIHRleHQK IAkgIGlmICgoY3Vyc29yX2dseXBoLT5yZXNvbHZlZF9sZXZlbCAmIDEpICE9IDApCiAJICAgIHgg Kz0gY3Vyc29yX2dseXBoLT5waXhlbF93aWR0aCAtIHdpZHRoOwogCisKKy8qICoqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKiAqLworLyogTVVMVElQTEUgQ1VSU09SUyAqLworCisgICAgLyogQWxpZ24gYWxsIGZh a2UgQkFSX0NVUlNPUiBvZiB0aGUgVkVSVElDQUxfUlVMRVIgd2l0aCBgb3BvaW50X3gnLiAqLwor ICAgIGlmICh3LT5tYy5meCA+IDApCisgICAgICB4ID0gdy0+bWMuZng7CisKKy8qICoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKiAqLworCisKIAkgIHhfZmlsbF9yZWN0YW5nbGUgKGYsIGdjLCB4LAogCQkJICBX SU5ET1dfVE9fRlJBTUVfUElYRUxfWSAodywgdy0+cGh5c19jdXJzb3IueSksCiAJCQkgIHdpZHRo LCByb3ctPmhlaWdodCk7CkBAIC05NDQxLDMxICs5NTE1LDI0MCBAQCB4X2RyYXdfd2luZG93X2N1 cnNvciAoc3RydWN0IHdpbmRvdyAqdywgc3RydWN0IGdseXBoX3JvdyAqZ2x5cGhfcm93LCBpbnQg eCwKIAl9CiAgICAgICBlbHNlCiAJewotCSAgc3dpdGNoIChjdXJzb3JfdHlwZSkKLQkgICAgewot CSAgICBjYXNlIEhPTExPV19CT1hfQ1VSU09SOgotCSAgICAgIHhfZHJhd19ob2xsb3dfY3Vyc29y ICh3LCBnbHlwaF9yb3cpOwotCSAgICAgIGJyZWFrOwogCi0JICAgIGNhc2UgRklMTEVEX0JPWF9D VVJTT1I6Ci0JICAgICAgZHJhd19waHlzX2N1cnNvcl9nbHlwaCAodywgZ2x5cGhfcm93LCBEUkFX X0NVUlNPUik7Ci0JICAgICAgYnJlYWs7CiAKLQkgICAgY2FzZSBCQVJfQ1VSU09SOgotCSAgICAg IHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgQkFSX0NVUlNP Uik7Ci0JICAgICAgYnJlYWs7CisvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qIGJlZ2luIE1V TFRJUExFIENVUlNPUlMgKi8KIAotCSAgICBjYXNlIEhCQVJfQ1VSU09SOgotCSAgICAgIHhfZHJh d19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93aWR0aCwgSEJBUl9DVVJTT1IpOwot CSAgICAgIGJyZWFrOworICBDb2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VuID0gaW50X2dyZWVuOworICBjb2xvci5ibHVlID0gaW50X2Js dWU7CisgIC8qIGB4X2FsbG9jX25lYXJlc3RfY29sb3InIHNldHMgdGhlIGBjb2xvci5waXhlbGAu ICovCisgIHhfYWxsb2NfbmVhcmVzdF9jb2xvciAoZiwgY21hcCwgJmNvbG9yKTsKKyAgc3dpdGNo IChjdXJzb3JfdHlwZSkKKyAgeworICAgIGNhc2UgRlJBTUVEX0JPWF9DVVJTT1I6CisgICAgewor ICAgICAgc3RydWN0IGdseXBoICpnbHlwaCA9IGdldF9waHlzX2N1cnNvcl9nbHlwaCAodyk7Cisg ICAgICBpZiAoZ2x5cGggPT0gTlVMTCkKKyAgICAgICAgcmV0dXJuOworICAgICAgTGlzcF9PYmpl Y3QgYnVmID0gdy0+Y29udGVudHM7CisgICAgICBDSEVDS19CVUZGRVIgKGJ1Zik7CisgICAgICBz dHJ1Y3QgYnVmZmVyICpiID0gWEJVRkZFUiAoYnVmKTsKKyAgICAgIGJvb2wgcmVnaW9uX2FjdGl2 ZV9wID0gKCFOSUxQIChWdHJhbnNpZW50X21hcmtfbW9kZSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICYmICFOSUxQIChCVkFSIChiLCBtYXJrX2FjdGl2ZSkpKTsKKyAgICAgIHB0cmRp ZmZfdCByZWdpb25fYmVnaW5uaW5nID0gKHJlZ2lvbl9hY3RpdmVfcCkgPyBYRklYTlVNIChGcmVn aW9uX2JlZ2lubmluZyAoKSkgOiAtMTsKKyAgICAgIHB0cmRpZmZfdCByZWdpb25fZW5kID0gKHJl Z2lvbl9hY3RpdmVfcCkgPyBYRklYTlVNIChGcmVnaW9uX2VuZCAoKSkgOiAtMTsKKyAgICAgIHB0 cmRpZmZfdCBvcG9pbnRfcHQgPSAodyA9PSBYV0lORE9XIChzZWxlY3RlZF93aW5kb3cpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgID8gUFQKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6IFhGSVhOVU0gKEZtYXJrZXJfcG9zaXRpb24gKHctPnBvaW50bSkpOworICAgICAgYm9vbCBy ZWdpb25faW5fYm91bmRzX3AgPSAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAmJiBvcG9pbnRfcHQgPj0gcmVnaW9uX2JlZ2lubmluZworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3BvaW50X3B0IDwgcmVnaW9uX2VuZCk7CisgICAg ICBpZiAoZ2x5cGgtPnR5cGUgIT0gSU1BR0VfR0xZUEggJiYgdy0+bWMucmVkID49IDAgJiYgdy0+ bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAv KiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYycgYnkgYm9y cm93aW5nIHRoZQorICAgICAgICAgIGZ1bmN0aW9uYWxpdHkgb2YgYHhfbWFrZV9nYycgaW4geGZu cy5jLiAgKi8KKyAgICAgICAgICBpZiAocmVnaW9uX2FjdGl2ZV9wCisgICAgICAgICAgICAgICYm IHJlZ2lvbl9pbl9ib3VuZHNfcAorICAgICAgICAgICAgICAmJiBhY3RpdmVfcCkKKyAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19hY3RpdmVfcmVnaW9uX2Zh Y2VfaWQgPSBsb29rdXBfbmFtZWRfZmFjZSAodywgZiwgaW50ZXJuICgiKy1yZWFsLWZha2UtY3Vy c29yLXJlZ2lvbi1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICBzdHJ1Y3QgZmFjZSAqaG9s bG93X2FjdGl2ZV9yZWdpb25fZmFjZSA9IEZBQ0VfRlJPTV9JRCAoZiwgaG9sbG93X2FjdGl2ZV9y ZWdpb25fZmFjZV9pZCk7CisgICAgICAgICAgICAgIGVudW0gZmFjZV9pZCBob2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dy0+bWMucmVkID49IDAgJiYg dy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgICAgeworICAgICAg ICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4 ZWwnLiAgKi8KKyAgICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNv bG9yLnBpeGVsOworICAgICAgICAgICAgeF9kcmF3X2hvbGxvd19jdXJzb3IgKHcsIGdseXBoX3Jv dyk7CisgICAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfcGl4ZWwgPSBvcmlnaW5h bF9jdXJzb3JfcGl4ZWw7CisgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgLyogVGVtcG9yYXJpbHkgaGlqYWNrIGBmLT5vdXRwdXRfZGF0YS54 LT5jdXJzb3JfZ2MnIGJ5IGJvcnJvd2luZyB0aGUKKyAgICAgICAgICAgICAgZnVuY3Rpb25hbGl0 eSBvZiBgeF9tYWtlX2djJyBpbiB4Zm5zLmMuICAqLworICAgICAgICAgICAgICBpZiAocmVnaW9u X2FjdGl2ZV9wCisgICAgICAgICAgICAgICAgICAmJiByZWdpb25faW5fYm91bmRzX3AKKyAgICAg ICAgICAgICAgICAgICYmIGFjdGl2ZV9wKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAg ICAgICAgIGVudW0gZmFjZV9pZCBob2xsb3dfYWN0aXZlX3JlZ2lvbl9mYWNlX2lkID0gbG9va3Vw X25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1yZWdpb24tZmFj ZSIpLCB0cnVlKTsKKyAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYWNlICpob2xsb3dfYWN0aXZl X3JlZ2lvbl9mYWNlID0gRkFDRV9GUk9NX0l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1Y3QgZmFjZSAqaG9sbG93X2FjdGl2ZV9m YWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfYWN0aXZlX2ZhY2VfaWQpOworICAgICAgICAg ICAgICAgICAgICAgIFhTZXRGb3JlZ3JvdW5kIChGUkFNRV9YX0RJU1BMQVkgKGYpLCBmLT5vdXRw dXRfZGF0YS54LT5jdXJzb3JfZ2MsIGhvbGxvd19hY3RpdmVfZmFjZS0+Zm9yZWdyb3VuZCk7Cisg ICAgICAgICAgICAgICAgICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiks IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgaG9sbG93X2FjdGl2ZV9mYWNlLT5iYWNrZ3Jv dW5kKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAvKiBUaGUg cmVnaW9uIGlzIF9ub3RfIHZpc2libGUgaW4gdGhlIGluYWN0aXZlIHdpbmRvdyBiZWNhdXNlIHRo ZSBvdmVybGF5IHdpbmRvdyBwcm9wZXJ0eSBpcyB1c2VkLiAqLworICAgICAgICAgICAgICAgICAg ICBlbHNlIGlmICghYWN0aXZlX3ApCisgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAg ICAgICAgICAgICAgICAgZW51bSBmYWNlX2lkIGhvbGxvd19pbmFjdGl2ZV9mYWNlX2lkID0gbG9v a3VwX25hbWVkX2ZhY2UgKHcsIGYsIGludGVybiAoIistcmVhbC1mYWtlLWN1cnNvci1pbmFjdGl2 ZS1mYWNlIiksIHRydWUpOworICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZhY2UgKmhv bGxvd19pbmFjdGl2ZV9mYWNlID0gRkFDRV9GUk9NX0lEIChmLCBob2xsb3dfaW5hY3RpdmVfZmFj ZV9pZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBYU2V0Rm9yZWdyb3VuZCAoRlJBTUVfWF9E SVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xsb3dfaW5hY3RpdmVf ZmFjZS0+Zm9yZWdyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgICBYU2V0QmFja2dyb3Vu ZCAoRlJBTUVfWF9ESVNQTEFZIChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCBob2xs b3dfaW5hY3RpdmVfZmFjZS0+YmFja2dyb3VuZCk7CisgICAgICAgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgICBibG9ja19pbnB1dCAoKTsKKyAgICAgICAgICAgICAgLyogRm9yY2UgYHhf c2V0X2N1cnNvcl9nYycgdG8gdXNlIGBzLT5mLT5vdXRwdXRfZGF0YS54LT5jdXJzb3JfZ2MnLiAg Ki8KKyAgICAgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2RlZmF1bHQgPSB0cnVlOworICAgICAg ICAgICAgICBkcmF3X3BoeXNfY3Vyc29yX2dseXBoICh3LCBnbHlwaF9yb3csIERSQVdfQ1VSU09S KTsKKyAgICAgICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2RlZmF1bHQgPSBmYWxzZTsKKyAgICAg ICAgICAgICAgWFNldEZvcmVncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9nYywgeGdjdi5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICAgICAgWFNldEJh Y2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9n YywgeGdjdi5iYWNrZ3JvdW5kKTsKKyAgICAgICAgICAgICAgdW5ibG9ja19pbnB1dCAoKTsKKyAg ICAgICAgICAgICAgLyogRHJhdyB0aGUgZnJhbWUgYXJvdW5kIHRoZSBib3guICovCisgICAgICAg ICAgICAgIHhfZHJhd19ob2xsb3dfY3Vyc29yICh3LCBnbHlwaF9yb3cpOworICAgICAgICAgICAg fQorICA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JWEVMIChmKSk7CisgICAg ICAgICAgWFNldEJhY2tncm91bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRh LngtPmN1cnNvcl9nYywgY29sb3IucGl4ZWwpOworICAgICAgICAgIC8qIEZvcmNlIGB4X3NldF9j dXJzb3JfZ2MnIHRvIHVzZSBgcy0+Zi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djJy4gICovCisg ICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2RlZmF1bHQgPSB0cnVlOworICAgICAgICAgIGRyYXdf cGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOworICAgICAgICAg IHctPm1jLmN1cnNvcl9nY19kZWZhdWx0ID0gZmFsc2U7CisgICAgICAgICAgWFNldEZvcmVncm91 bmQgKEZSQU1FX1hfRElTUExBWSAoZiksIGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9nYywgeGdj di5mb3JlZ3JvdW5kKTsKKyAgICAgICAgICBYU2V0QmFja2dyb3VuZCAoRlJBTUVfWF9ESVNQTEFZ IChmKSwgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX2djLCB4Z2N2LmJhY2tncm91bmQpOworICAg ICAgICAgIHVuYmxvY2tfaW5wdXQgKCk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZQorICAgICAg ICAgIGRyYXdfcGh5c19jdXJzb3JfZ2x5cGggKHcsIGdseXBoX3JvdywgRFJBV19DVVJTT1IpOwor ICAgICAgYnJlYWs7CisgICAgfQorICAgIGNhc2UgQkFSX0NVUlNPUjoKKyAgICB7CisgICAgICBp ZiAody0+bWMucmVkID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAwICYmIHctPm1jLmdyZWVuID49IDAp CisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3JhcmlseSBoaWphY2sgYGYtPm91dHB1dF9k YXRhLngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAgIGYtPm91dHB1dF9kYXRhLngtPmN1 cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAgIHctPm1jLmN1cnNvcl9nY19pbnZp c2libGVfb2theSA9IHRydWU7CisgICAgICAgICAgeF9kcmF3X2Jhcl9jdXJzb3IgKHcsIGdseXBo X3JvdywgY3Vyc29yX3dpZHRoLCBCQVJfQ1VSU09SKTsKKyAgICAgICAgICB3LT5tYy5jdXJzb3Jf Z2NfaW52aXNpYmxlX29rYXkgPSBmYWxzZTsKKyAgICAgICAgICBmLT5vdXRwdXRfZGF0YS54LT5j dXJzb3JfcGl4ZWwgPSBvcmlnaW5hbF9jdXJzb3JfcGl4ZWw7CisgICAgICAgIH0KKyAgICAgICAg ZWxzZQorICAgICAgICAgIHhfZHJhd19iYXJfY3Vyc29yICh3LCBnbHlwaF9yb3csIGN1cnNvcl93 aWR0aCwgQkFSX0NVUlNPUik7CisgICAgICBicmVhazsKKyAgICB9CisgICAgY2FzZSBIQkFSX0NV UlNPUjoKKyAgICB7CisgICAgICBpZiAody0+bWMucmVkID49IDAgJiYgdy0+bWMuYmx1ZSA+PSAw ICYmIHctPm1jLmdyZWVuID49IDApCisgICAgICAgIHsKKyAgICAgICAgICAvKiBUZW1wb3Jhcmls eSBoaWphY2sgYGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCcuICAqLworICAgICAgICAg IGYtPm91dHB1dF9kYXRhLngtPmN1cnNvcl9waXhlbCA9IGNvbG9yLnBpeGVsOworICAgICAgICAg IHctPm1jLmN1cnNvcl9nY19pbnZpc2libGVfb2theSA9IHRydWU7CisgICAgICAgICAgeF9kcmF3 X2Jhcl9jdXJzb3IgKHcsIGdseXBoX3JvdywgY3Vyc29yX3dpZHRoLCBIQkFSX0NVUlNPUik7Cisg ICAgICAgICAgdy0+bWMuY3Vyc29yX2djX2ludmlzaWJsZV9va2F5ID0gZmFsc2U7CisgICAgICAg ICAgZi0+b3V0cHV0X2RhdGEueC0+Y3Vyc29yX3BpeGVsID0gb3JpZ2luYWxfY3Vyc29yX3BpeGVs OworICAgICAgICB9CisgICAgICAgIGVsc2UKKyAgICAgICAgICB4X2RyYXdfYmFyX2N1cnNvciAo dywgZ2x5cGhfcm93LCBjdXJzb3Jfd2lkdGgsIEhCQVJfQ1VSU09SKTsKKyAgICAgIGJyZWFrOwor ICAgIH0KKyAgICBjYXNlIE5PX0NVUlNPUjoKKyAgICAgIHctPnBoeXNfY3Vyc29yX3dpZHRoID0g MDsKKyAgICAgIGJyZWFrOworICAgIGRlZmF1bHQ6CisgICAgICBlbWFjc19hYm9ydCAoKTsKKyAg fQorCisvKiBlbmQgTVVMVElQTEUgQ1VSU09SUyAqLworLyogKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICov CiAKLQkgICAgY2FzZSBOT19DVVJTT1I6Ci0JICAgICAgdy0+cGh5c19jdXJzb3Jfd2lkdGggPSAw OwotCSAgICAgIGJyZWFrOwogCi0JICAgIGRlZmF1bHQ6Ci0JICAgICAgZW1hY3NfYWJvcnQgKCk7 Ci0JICAgIH0KIAl9CiAKICNpZmRlZiBIQVZFX1hfSTE4Tgo= --Multipart_Thu_Dec_13_23:11:07_2018-1--